summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_quopri.py
blob: 2497705a2d8bfa3361bda9f79cd50a4b1bc5c6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import test_support
import unittest

from cStringIO import StringIO
from quopri import *



ENCSAMPLE = """\
Here's a bunch of special=20

=A1=A2=A3=A4=A5=A6=A7=A8=A9
=AA=AB=AC=AD=AE=AF=B0=B1=B2=B3
=B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE
=BF=C0=C1=C2=C3=C4=C5=C6
=C7=C8=C9=CA=CB=CC=CD=CE=CF
=D0=D1=D2=D3=D4=D5=D6=D7
=D8=D9=DA=DB=DC=DD=DE=DF
=E0=E1=E2=E3=E4=E5=E6=E7
=E8=E9=EA=EB=EC=ED=EE=EF
=F0=F1=F2=F3=F4=F5=F6=F7
=F8=F9=FA=FB=FC=FD=FE=FF

characters... have fun!
"""

# First line ends with a space
DECSAMPLE = "Here's a bunch of special \n" + \
"""\

\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9
\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3
\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe
\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6
\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf
\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7
\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf
\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7
\xe8\xe9\xea\xeb\xec\xed\xee\xef
\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7
\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff

characters... have fun!
"""



class QuopriTestCase(unittest.TestCase):
    # Each entry is a tuple of (plaintext, encoded string).  These strings are
    # used in the "quotetabs=0" tests.
    STRINGS = (
        # Some normal strings
        ('hello', 'hello'),
        ('''hello
        there
        world''', '''hello
        there
        world'''),
        ('''hello
        there
        world
''', '''hello
        there
        world
'''),
        ('\201\202\203', '=81=82=83'),
        # Add some trailing MUST QUOTE strings
        ('hello ', 'hello=20'),
        ('hello\t', 'hello=09'),
        # Some long lines.  First, a single line of 108 characters
        ('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
         '''xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=D8=D9=DA=DB=DC=DD=DE=DFx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'''),
        # A line of exactly 76 characters, no soft line break should be needed
        ('yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
        'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'),
        # A line of 77 characters, forcing a soft line break at position 75,
        # and a second line of exactly 2 characters (because the soft line
        # break `=' sign counts against the line length limit).
        ('zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
         '''zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz=
zz'''),
        # A line of 151 characters, forcing a soft line break at position 75,
        # with a second line of exactly 76 characters and no trailing =
        ('zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
         '''zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz=
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'''),
        # A string containing a hard line break, but which the first line is
        # 151 characters and the second line is exactly 76 characters.  This
        # should leave us with three lines, the first which has a soft line
        # break, and which the second and third do not.
        ('''yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''',
         '''yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy=
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'''),
        # Now some really complex stuff ;)
        (DECSAMPLE, ENCSAMPLE),
        )

    # These are used in the "quotetabs=1" tests.
    ESTRINGS = (
        ('hello world', 'hello=20world'),
        ('hello\tworld', 'hello=09world'),
        )

    # These are used in the "header=1" tests.
    HSTRINGS = (
        ('hello world', 'hello_world'),
        ('hello_world', 'hello=5Fworld'),
        )

    def test_encodestring(self):
        for p, e in self.STRINGS:
            self.assert_(encodestring(p) == e)

    def test_decodestring(self):
        for p, e in self.STRINGS:
            self.assert_(decodestring(e) == p)

    def test_idempotent_string(self):
        for p, e in self.STRINGS:
            self.assert_(decodestring(encodestring(e)) == e)

    def test_encode(self):
        for p, e in self.STRINGS:
            infp = StringIO(p)
            outfp = StringIO()
            encode(infp, outfp, quotetabs=0)
            self.assert_(outfp.getvalue() == e)

    def test_decode(self):
        for p, e in self.STRINGS:
            infp = StringIO(e)
            outfp = StringIO()
            decode(infp, outfp)
            self.assert_(outfp.getvalue() == p)

    def test_embedded_ws(self):
        for p, e in self.ESTRINGS:
            self.assert_(encodestring(p, quotetabs=1) == e)
            self.assert_(decodestring(e) == p)

    def test_encode_header(self):
        for p, e in self.HSTRINGS:
            self.assert_(encodestring(p, header = 1) == e)

    def test_decode_header(self):
        for p, e in self.HSTRINGS:
            self.assert_(decodestring(e, header = 1) == p)

def test_main():
    test_support.run_unittest(QuopriTestCase)


if __name__ == "__main__":
    test_main()
n corrupted data situation. Reversed the fix in svn-r24463 in which a check for null pointer prior to calling H5O_dec_rc() Platforms tested: Linux/64 (jelly) * HDF5 1 8 fix fortran build on macs (#186) * Correct fortran and shared libs option * Fix for no shared fortran build * OESS-98 fix hdf5 link target (#191) * Partial changes to RELEASE.txt for release. (#185) * Partial changes to RELEASE.txt for release. * Update supported and tested platforms. * Update version to 1.8.22-12. * close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Update directory for SZ filter in HDF5PluginMacros.cmake. Updates for release: Switch configure default to production mode. Set HDF5_GENERATE_HEADERS to OFF. * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Restores maintainer mode in the autotools (#200) (#203) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Hdf5 1 8 22 (#212) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Brings ttsafe_attr_vlen.c changes from develop (#214) Fixes exposed pthread problem on Windows. * Update SO numbers for Hdf5 1 8 22 (#215) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Hdf5 1 8 22 (#224) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> * Update CMake/HDF5Examples version in bin/release * Update CMake/HDF5Examples version number in bin/release (#225) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> * Fixed typo in an error message. (#228) * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Bring 3 small changes from Hdf5 1.8 to 1.8.22 (#241) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Stat st blocks fix 1822 (#251) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Fixes Autotools detection of the st_blocks field in stat (#246) * Fixes Autotools detection of the st_blocks field in stat The Autotools and CMake will now both correctly determine if the stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS appropriately. * Fixes a typo in configure.ac * Restore lines in RELEASE.txt. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Stat st blocks fix 1822 (#256) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Fixes Autotools detection of the st_blocks field in stat (#246) * Fixes Autotools detection of the st_blocks field in stat The Autotools and CMake will now both correctly determine if the stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS appropriately. * Fixes a typo in configure.ac * Restore lines in RELEASE.txt. * Updated configure with reconfigure. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * RELEASE.txt cleanup. * Hdf5 1 8 22 (#261) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Hdf5 1 8 22 (#266) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Hdf5 1 8 22 - Reverts lock/unlock callback signature to 1.8.21 version (#267) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Update version in H5public.h * Hdf5 1 8 22 (#269) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. * Hdf5 1 8 22 (#279) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270) (#277) * Cache the pointer to the next point to process after the last call to H5S__get_select_elem_pointlist. This allows the normal process of iterating over the points in batches to be much more efficient, as the library does not need to traverse the entirety of the preceding points every time the funciton is re-entered. * Update RELEASE.txt for point selection iteration performance fix. * Hdf5 1 8 22 (#281) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. * Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270) (#277) * Cache the pointer to the next point to process after the last call to H5S__get_select_elem_pointlist. This allows the normal process of iterating over the points in batches to be much more efficient, as the library does not need to traverse the entirety of the preceding points every time the funciton is re-entered. * Update RELEASE.txt for point selection iteration performance fix. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org> * Hdf5 1 8 22 (#284) * Fixed typo in an error message. * Updated for HDFFV-11150, HDFFV-10480, and HDFFV-11159 * Update "Support for New Platforms and Compilers" section in RELEASE.txt; add check_version workaround for binary compatibility to "Known Problems". * Add SUSE Linux to tested platforms. * Update numbers in config/lt_vers.am and run bin/reconfigure for so numbers. * Update version in 3 files missed by merge. Co-authored-by: Allen Byrne <byrn@hdfgroup.org> Co-authored-by: Vailin Choi <vchoi@hdfgroup.org> Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org> Co-authored-by: hdftest <hdftest@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <derobins@hdfgroup.org> Co-authored-by: Binh-Minh Ribler <bmribler@hdfgroup.org> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Diffstat
-rw-r--r--.autom4te.cfg2
-rw-r--r--.clang-format65
-rw-r--r--.github/CODEOWNERS40
-rw-r--r--.github/workflows/clang-format-check.yml17
-rw-r--r--.github/workflows/main.yml139
-rw-r--r--.github/workflows/pr-check.yml133
-rw-r--r--.h5chkright.ini2
-rw-r--r--CMakeFilters.cmake30
-rw-r--r--CMakeInstallation.cmake65
-rw-r--r--CMakeLists.txt333
-rw-r--r--CMakePlugins.cmake56
-rw-r--r--CTestConfig.cmake27
-rw-r--r--MANIFEST194
-rw-r--r--Makefile.am26
-rw-r--r--Makefile.dist2
-rw-r--r--Makefile.in37
-rw-r--r--README.txt91
-rw-r--r--UserMacros.cmake2
-rw-r--r--acsite.m42
-rwxr-xr-xbin/COPYING2
-rw-r--r--bin/Makefile.am57
-rw-r--r--bin/Makefile.in1311
-rwxr-xr-xbin/batch/ctest.qsub.in.cmake21
-rw-r--r--bin/batch/ctestP.lsf.in.cmake19
-rw-r--r--bin/batch/ctestP.sl.in.cmake14
-rw-r--r--bin/batch/ctestS.lsf.in.cmake18
-rw-r--r--bin/batch/ctestS.sl.in.cmake15
-rw-r--r--bin/batch/knl_H5detect.sl.in.cmake20
-rw-r--r--bin/batch/knl_ctestP.sl.in.cmake16
-rw-r--r--bin/batch/knl_ctestS.sl.in.cmake17
-rw-r--r--bin/batch/ray_ctestP.lsf.in.cmake20
-rw-r--r--bin/batch/ray_ctestS.lsf.in.cmake18
-rwxr-xr-xbin/batch/raybsub7
-rwxr-xr-xbin/bbrelease2
-rwxr-xr-xbin/buildhdf52
-rwxr-xr-xbin/checkapi2
-rwxr-xr-xbin/checkposix2
-rwxr-xr-xbin/chkconfigure2
-rwxr-xr-xbin/chkcopyright16
-rwxr-xr-xbin/chkmanifest2
-rwxr-xr-xbin/cmakehdf52
-rwxr-xr-xbin/debug-ohdr2
-rwxr-xr-xbin/dependencies2
-rwxr-xr-xbin/deploy2
-rw-r--r--bin/distdep2
-rwxr-xr-xbin/errors2
-rwxr-xr-xbin/format_source26
-rwxr-xr-xbin/format_source_patch34
-rwxr-xr-xbin/gcov_script2
-rwxr-xr-xbin/genltanalyze95
-rwxr-xr-xbin/genparser259
-rw-r--r--bin/h5cc.in (renamed from tools/misc/h5cc.in)2
-rw-r--r--bin/h5redeploy.in (renamed from tools/misc/h5redeploy.in)2
-rwxr-xr-xbin/h5vers6
-rwxr-xr-xbin/iostats2
-rwxr-xr-xbin/locate_sw2
-rwxr-xr-xbin/make_err8
-rwxr-xr-xbin/make_overflow4
-rwxr-xr-xbin/make_vers4
-rwxr-xr-xbin/mkdirs2
-rwxr-xr-xbin/newer2
-rw-r--r--bin/output_filter.sh20
-rw-r--r--bin/pkgscrpts/build_and_package_hdf5_binaries.sh2
-rwxr-xr-xbin/pkgscrpts/h5rmflags10
-rw-r--r--bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec2
-rwxr-xr-xbin/pkgscrpts/make1816TarFiles.pl2
-rw-r--r--bin/pkgscrpts/testbinaries.sh2
-rwxr-xr-xbin/reconfigure8
-rwxr-xr-xbin/release104
-rwxr-xr-xbin/runtest2
-rwxr-xr-xbin/snapshot2
-rw-r--r--bin/snapshot_version2
-rwxr-xr-xbin/switch_maint_mode81
-rwxr-xr-x[-rw-r--r--]bin/test-driver0
-rwxr-xr-xbin/timekeeper2
-rwxr-xr-xbin/trace159
-rwxr-xr-xbin/yodconfigure2
-rw-r--r--c++/CMakeLists.txt30
-rw-r--r--c++/COPYING2
-rw-r--r--c++/Makefile.am10
-rw-r--r--c++/Makefile.in32
-rw-r--r--c++/examples/CMakeLists.txt50
-rw-r--r--c++/examples/CMakeTests.cmake138
-rw-r--r--c++/examples/Makefile.am6
-rw-r--r--c++/examples/Makefile.in32
-rw-r--r--c++/examples/chunks.cpp92
-rw-r--r--c++/examples/compound.cpp331
-rw-r--r--c++/examples/create.cpp196
-rw-r--r--c++/examples/extend_ds.cpp394
-rw-r--r--c++/examples/h5group.cpp96
-rw-r--r--c++/examples/h5tutr_cmprss.cpp106
-rw-r--r--c++/examples/h5tutr_crtatt.cpp75
-rw-r--r--c++/examples/h5tutr_crtdat.cpp40
-rw-r--r--c++/examples/h5tutr_crtgrp.cpp28
-rw-r--r--c++/examples/h5tutr_crtgrpar.cpp42
-rw-r--r--c++/examples/h5tutr_crtgrpd.cpp84
-rw-r--r--c++/examples/h5tutr_extend.cpp113
-rw-r--r--c++/examples/h5tutr_rdwt.cpp38
-rw-r--r--c++/examples/h5tutr_subset.cpp97
-rw-r--r--c++/examples/readdata.cpp358
-rw-r--r--c++/examples/run-c++-ex.sh.in29
-rw-r--r--c++/examples/testh5c++.sh.in4
-rw-r--r--c++/examples/writedata.cpp200
-rw-r--r--c++/src/C2Cppfunction_map.htm48536
-rw-r--r--c++/src/CMakeLists.txt89
-rw-r--r--c++/src/H5AbstractDs.cpp103
-rw-r--r--c++/src/H5AbstractDs.h112
-rw-r--r--c++/src/H5AcreatProp.cpp26
-rw-r--r--c++/src/H5AcreatProp.h48
-rw-r--r--c++/src/H5Alltypes.h2
-rw-r--r--c++/src/H5ArrayType.cpp44
-rw-r--r--c++/src/H5ArrayType.h62
-rw-r--r--c++/src/H5AtomType.cpp97
-rw-r--r--c++/src/H5AtomType.h70
-rw-r--r--c++/src/H5Attribute.cpp228
-rw-r--r--c++/src/H5Attribute.h142
-rw-r--r--c++/src/H5Classes.h54
-rw-r--r--c++/src/H5CommonFG.cpp397
-rw-r--r--c++/src/H5CommonFG.h240
-rw-r--r--c++/src/H5CompType.cpp165
-rw-r--r--c++/src/H5CompType.h142
-rw-r--r--c++/src/H5Cpp.h6
-rw-r--r--c++/src/H5CppDoc.h18
-rw-r--r--c++/src/H5DataSet.cpp295
-rw-r--r--c++/src/H5DataSet.h213
-rw-r--r--c++/src/H5DataSpace.cpp281
-rw-r--r--c++/src/H5DataSpace.h165
-rw-r--r--c++/src/H5DataType.cpp286
-rw-r--r--c++/src/H5DataType.h201
-rw-r--r--c++/src/H5DcreatProp.cpp291
-rw-r--r--c++/src/H5DcreatProp.h161
-rw-r--r--c++/src/H5DxferProp.cpp236
-rw-r--r--c++/src/H5DxferProp.h143
-rw-r--r--c++/src/H5EnumType.cpp95
-rw-r--r--c++/src/H5EnumType.h86
-rw-r--r--c++/src/H5Exception.cpp191
-rw-r--r--c++/src/H5Exception.h181
-rw-r--r--c++/src/H5FaccProp.cpp250
-rw-r--r--c++/src/H5FaccProp.h180
-rw-r--r--c++/src/H5FcreatProp.cpp115
-rw-r--r--c++/src/H5FcreatProp.h88
-rw-r--r--c++/src/H5File.cpp178
-rw-r--r--c++/src/H5File.h139
-rw-r--r--c++/src/H5FloatType.cpp90
-rw-r--r--c++/src/H5FloatType.h80
-rw-r--r--c++/src/H5Group.cpp43
-rw-r--r--c++/src/H5Group.h78
-rw-r--r--c++/src/H5IdComponent.cpp91
-rw-r--r--c++/src/H5IdComponent.h130
-rw-r--r--c++/src/H5Include.h11
-rw-r--r--c++/src/H5IntType.cpp40
-rw-r--r--c++/src/H5IntType.h56
-rw-r--r--c++/src/H5LaccProp.cpp42
-rw-r--r--c++/src/H5LaccProp.h56
-rw-r--r--c++/src/H5LcreatProp.cpp26
-rw-r--r--c++/src/H5LcreatProp.h48
-rw-r--r--c++/src/H5Library.cpp89
-rw-r--r--c++/src/H5Library.h58
-rw-r--r--c++/src/H5Location.cpp450
-rw-r--r--c++/src/H5Location.h454
-rw-r--r--c++/src/H5Object.cpp166
-rw-r--r--c++/src/H5Object.h100
-rw-r--r--c++/src/H5OcreatProp.cpp56
-rw-r--r--c++/src/H5OcreatProp.h63
-rw-r--r--c++/src/H5PredType.cpp685
-rw-r--r--c++/src/H5PredType.h644
-rw-r--r--c++/src/H5PropList.cpp270
-rw-r--r--c++/src/H5PropList.h158
-rw-r--r--c++/src/H5StrType.cpp58
-rw-r--r--c++/src/H5StrType.h72
-rw-r--r--c++/src/H5StrcreatProp.cpp38
-rw-r--r--c++/src/H5StrcreatProp.h44
-rw-r--r--c++/src/H5VarLenType.cpp24
-rw-r--r--c++/src/H5VarLenType.h50
-rw-r--r--c++/src/Makefile.am2
-rw-r--r--c++/src/Makefile.in46
-rw-r--r--c++/src/cpp_doc_config22
-rw-r--r--c++/src/footer.html2
-rw-r--r--c++/src/h5c++.in8
-rw-r--r--c++/src/header.html2
-rw-r--r--c++/test/CMakeLists.txt46
-rw-r--r--c++/test/CMakeTests.cmake61
-rw-r--r--c++/test/CMakeVFDTests.cmake73
-rw-r--r--c++/test/H5srcdir_str.h.in2
-rw-r--r--c++/test/Makefile.am2
-rw-r--r--c++/test/Makefile.in28
-rw-r--r--c++/test/dsets.cpp672
-rw-r--r--c++/test/h5cpputil.cpp101
-rw-r--r--c++/test/h5cpputil.h97
-rw-r--r--c++/test/tarray.cpp232
-rw-r--r--c++/test/tattr.cpp893
-rw-r--r--c++/test/tcompound.cpp466
-rw-r--r--c++/test/tdspl.cpp71
-rw-r--r--c++/test/testhdf5.cpp66
-rw-r--r--c++/test/tfile.cpp469
-rw-r--r--c++/test/tfilter.cpp105
-rw-r--r--c++/test/th5s.cpp303
-rw-r--r--c++/test/tlinks.cpp285
-rw-r--r--c++/test/tobject.cpp177
-rw-r--r--c++/test/trefer.cpp393
-rw-r--r--c++/test/ttypes.cpp262
-rw-r--r--c++/test/tvlstr.cpp286
-rw-r--r--config/BlankForm2
-rw-r--r--config/COPYING2
-rw-r--r--config/Makefile.am.blank2
-rw-r--r--config/apple5
-rw-r--r--config/cce-fflags2
-rw-r--r--config/cce-flags2
-rw-r--r--config/clang-cxxflags200
-rw-r--r--config/clang-flags200
-rw-r--r--config/clang-warnings/developer-general4
-rw-r--r--config/clang-warnings/error-general80
-rw-r--r--config/clang-warnings/general26
-rw-r--r--config/clang-warnings/no-developer-general1
-rw-r--r--config/cmake/CTestCustom.cmake256
-rw-r--r--config/cmake/CTestScript.cmake17
-rw-r--r--config/cmake/ConfigureChecks.cmake97
-rw-r--r--config/cmake/ConversionTests.c4
-rw-r--r--config/cmake/FindHDFS.cmake70
-rw-r--r--config/cmake/H5cxx_config.h.in4
-rw-r--r--config/cmake/H5pubconf.h.in76
-rw-r--r--config/cmake/HDF518_Examples.cmake.in12
-rw-r--r--config/cmake/HDF5Macros.cmake10
-rw-r--r--config/cmake/HDF5PluginCache.cmake29
-rw-r--r--config/cmake/HDF5PluginMacros.cmake104
-rw-r--r--config/cmake/HDF5UseFortran.cmake483
-rw-r--r--config/cmake/HDF5_Examples_options.cmake3
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake354
-rw-r--r--config/cmake/HDFCompilerFlags.cmake345
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake112
-rw-r--r--config/cmake/PkgInfo.in2
-rw-r--r--config/cmake/README.txt.cmake.in22
-rw-r--r--config/cmake/UserMacros/Windows_MT.cmake5
-rw-r--r--config/cmake/cacheinit.cmake139
-rw-r--r--config/cmake/fileCompareTest.cmake104
-rw-r--r--config/cmake/hdf5-config-version.cmake.in52
-rw-r--r--config/cmake/hdf5-config.cmake.in49
-rw-r--r--config/cmake/libh5cc.in2
-rw-r--r--config/cmake/libhdf5.settings.cmake.in79
-rw-r--r--config/cmake/mccacheinit.cmake12
-rw-r--r--config/cmake/patch.xml4
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake667
-rwxr-xr-xconfig/cmake/scripts/HDF5config.cmake470
-rw-r--r--config/cmake/scripts/HDF5options.cmake63
-rw-r--r--config/cmake/scripts/HPC/bsub-HDF5options.cmake31
-rw-r--r--config/cmake/scripts/HPC/qsub-HDF5options.cmake42
-rw-r--r--config/cmake/scripts/HPC/raybsub-HDF5options.cmake32
-rw-r--r--config/cmake/scripts/HPC/sbatch-HDF5options.cmake43
-rw-r--r--config/cmake/userblockTest.cmake34
-rw-r--r--config/cmake/vfdTest.cmake28
-rw-r--r--config/cmake/wait_H5Tinit.cmake11
-rw-r--r--config/cmake_ext_mod/CTestCustom.cmake19
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake382
-rw-r--r--config/cmake_ext_mod/FindSZIP.cmake234
-rw-r--r--config/cmake_ext_mod/GetTimeOfDayTest.cpp2
-rw-r--r--config/cmake_ext_mod/HDFCXXTests.cpp2
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake161
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake229
-rw-r--r--config/cmake_ext_mod/HDFTests.c83
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake109
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake190
-rw-r--r--config/cmake_ext_mod/grepTest.cmake160
-rw-r--r--config/cmake_ext_mod/runTest.cmake305
-rw-r--r--config/commence.am6
-rw-r--r--config/conclude.am11
-rw-r--r--config/cygwin2
-rw-r--r--config/examples.am2
-rw-r--r--config/freebsd2
-rw-r--r--config/gnu-cxxflags263
-rw-r--r--config/gnu-fflags146
-rw-r--r--config/gnu-flags879
-rw-r--r--config/gnu-warnings/4.825
-rw-r--r--config/gnu-warnings/4.8-4.last3
-rw-r--r--config/gnu-warnings/4.91
-rw-r--r--config/gnu-warnings/52
-rw-r--r--config/gnu-warnings/69
-rw-r--r--config/gnu-warnings/77
-rw-r--r--config/gnu-warnings/83
-rw-r--r--config/gnu-warnings/92
-rw-r--r--config/gnu-warnings/cxx-4.91
-rw-r--r--config/gnu-warnings/cxx-51
-rw-r--r--config/gnu-warnings/cxx-error-511
-rw-r--r--config/gnu-warnings/cxx-error-general32
-rw-r--r--config/gnu-warnings/cxx-general31
-rw-r--r--config/gnu-warnings/developer-4.823
-rw-r--r--config/gnu-warnings/developer-71
-rw-r--r--config/gnu-warnings/developer-83
-rw-r--r--config/gnu-warnings/developer-general13
-rw-r--r--config/gnu-warnings/error-512
-rw-r--r--config/gnu-warnings/error-825
-rw-r--r--config/gnu-warnings/error-general94
-rw-r--r--config/gnu-warnings/general32
-rw-r--r--config/gnu-warnings/gfort-4.817
-rw-r--r--config/gnu-warnings/gfort-51
-rw-r--r--config/gnu-warnings/gfort-61
-rw-r--r--config/gnu-warnings/gfort-81
-rw-r--r--config/gnu-warnings/gfort-general12
-rw-r--r--config/gnu-warnings/no-developer-4.813
-rw-r--r--config/gnu-warnings/no-developer-82
-rw-r--r--config/gnu-warnings/no-developer-general8
-rw-r--r--config/ibm-aix2
-rw-r--r--config/ibm-flags2
-rw-r--r--config/intel-fflags46
-rw-r--r--config/intel-flags84
-rw-r--r--config/intel-warnings/general2
-rw-r--r--config/intel-warnings/ifort-general1
-rw-r--r--config/linux-gnu2
-rw-r--r--config/linux-gnuaout2
-rw-r--r--config/linux-gnueabihf16
-rw-r--r--config/linux-gnulibc136
-rw-r--r--config/linux-gnulibc22
-rw-r--r--config/lt_vers.am20
-rw-r--r--config/netbsd56
-rw-r--r--config/pgi-fflags2
-rw-r--r--config/pgi-flags2
-rw-r--r--config/sanitizer/LICENSE174
-rw-r--r--config/sanitizer/README.md307
-rw-r--r--config/sanitizer/code-coverage.cmake536
-rw-r--r--config/sanitizer/formatting.cmake92
-rw-r--r--config/sanitizer/sanitizers.cmake94
-rw-r--r--config/sanitizer/tools.cmake114
-rw-r--r--config/site-specific/BlankForm2
-rw-r--r--config/solaris3
-rw-r--r--config/toolchain/GCC.cmake11
-rw-r--r--config/toolchain/PGI.cmake11
-rw-r--r--config/toolchain/build32.cmake79
-rw-r--r--config/toolchain/clang.cmake11
-rw-r--r--config/toolchain/crayle.cmake10
-rw-r--r--config/toolchain/intel.cmake18
-rw-r--r--config/toolchain/mingw64.cmake14
-rwxr-xr-xconfigure1504
-rw-r--r--configure.ac976
-rw-r--r--examples/CMakeLists.txt53
-rw-r--r--examples/CMakeTests.cmake214
-rw-r--r--examples/Makefile.am6
-rw-r--r--examples/Makefile.in32
-rw-r--r--examples/README2
-rw-r--r--examples/h5_attribute.c374
-rw-r--r--examples/h5_chunk_read.c105
-rw-r--r--examples/h5_cmprss.c142
-rw-r--r--examples/h5_compound.c58
-rw-r--r--examples/h5_crtatt.c59
-rw-r--r--examples/h5_crtdat.c45
-rw-r--r--examples/h5_crtgrp.c28
-rw-r--r--examples/h5_crtgrpar.c40
-rw-r--r--examples/h5_crtgrpd.c101
-rw-r--r--examples/h5_drivers.c21
-rw-r--r--examples/h5_dtransform.c100
-rw-r--r--examples/h5_elink_unix2win.c128
-rw-r--r--examples/h5_extend.c143
-rw-r--r--examples/h5_extend_write.c104
-rw-r--r--examples/h5_extlink.c260
-rw-r--r--examples/h5_group.c107
-rw-r--r--examples/h5_interm_group.c76
-rw-r--r--examples/h5_mount.c200
-rw-r--r--examples/h5_rdwt.c46
-rw-r--r--examples/h5_read.c106
-rw-r--r--examples/h5_ref2reg.c95
-rw-r--r--examples/h5_reference.c241
-rw-r--r--examples/h5_select.c226
-rw-r--r--examples/h5_shared_mesg.c205
-rw-r--r--examples/h5_subset.c165
-rw-r--r--examples/h5_write.c40
-rw-r--r--examples/ph5example.c868
-rwxr-xr-xexamples/run-all-ex.sh2
-rw-r--r--examples/run-c-ex.sh.in31
-rw-r--r--examples/testh5cc.sh.in5
-rw-r--r--fortran/CMakeLists.txt4
-rw-r--r--fortran/COPYING2
-rw-r--r--fortran/Makefile.am13
-rw-r--r--fortran/Makefile.in35
-rw-r--r--fortran/examples/CMakeLists.txt181
-rw-r--r--fortran/examples/CMakeTests.cmake142
-rw-r--r--fortran/examples/Makefile.am6
-rw-r--r--fortran/examples/Makefile.in32
-rw-r--r--fortran/examples/compound.f9024
-rw-r--r--fortran/examples/compound_complex_fortran2003.f9024
-rw-r--r--fortran/examples/compound_fortran2003.f9024
-rw-r--r--fortran/examples/h5_cmprss.f9024
-rw-r--r--fortran/examples/h5_crtatt.f9024
-rw-r--r--fortran/examples/h5_crtdat.f9024
-rw-r--r--fortran/examples/h5_crtgrp.f9024
-rw-r--r--fortran/examples/h5_crtgrpar.f9024
-rw-r--r--fortran/examples/h5_crtgrpd.f9024
-rw-r--r--fortran/examples/h5_extend.f9024
-rw-r--r--fortran/examples/h5_rdwt.f9024
-rw-r--r--fortran/examples/h5_subset.f9024
-rw-r--r--fortran/examples/hyperslab.f9024
-rw-r--r--fortran/examples/mountexample.f9024
-rw-r--r--fortran/examples/nested_derived_type.f9024
-rw-r--r--fortran/examples/ph5example.f9024
-rw-r--r--fortran/examples/refobjexample.f902
-rw-r--r--fortran/examples/refregexample.f9024
-rw-r--r--fortran/examples/run-fortran-ex.sh.in32
-rw-r--r--fortran/examples/rwdset_fortran2003.f9024
-rw-r--r--fortran/examples/selectele.f9024
-rw-r--r--fortran/examples/testh5fc.sh.in2
-rw-r--r--fortran/src/CMakeLists.txt520
-rw-r--r--fortran/src/H5Af.c1478
-rw-r--r--fortran/src/H5Aff.f9024
-rw-r--r--fortran/src/H5Aff_F03.f9024
-rw-r--r--fortran/src/H5Aff_F90.f9024
-rw-r--r--fortran/src/H5Df.c2401
-rw-r--r--fortran/src/H5Dff.f9024
-rw-r--r--fortran/src/H5Dff_F03.f908
-rw-r--r--fortran/src/H5Dff_F90.f9024
-rw-r--r--fortran/src/H5Ef.c116
-rw-r--r--fortran/src/H5Eff.f9024
-rw-r--r--fortran/src/H5Eff_F03.f9024
-rw-r--r--fortran/src/H5Eff_F90.f9020
-rw-r--r--fortran/src/H5FDmpiof.c207
-rw-r--r--fortran/src/H5FDmpioff.f9024
-rw-r--r--fortran/src/H5Ff.c612
-rw-r--r--fortran/src/H5Fff.f9024
-rw-r--r--fortran/src/H5Fff_F03.f9026
-rw-r--r--fortran/src/H5Fff_F90.f9024
-rw-r--r--fortran/src/H5Gf.c519
-rw-r--r--fortran/src/H5Gff.f9024
-rw-r--r--fortran/src/H5If.c191
-rw-r--r--fortran/src/H5Iff.f9020
-rw-r--r--fortran/src/H5Lf.c522
-rw-r--r--fortran/src/H5Lff.f9024
-rw-r--r--fortran/src/H5Lff_F03.f9024
-rw-r--r--fortran/src/H5Lff_F90.f9020
-rw-r--r--fortran/src/H5Of.c972
-rw-r--r--fortran/src/H5Off.f9024
-rw-r--r--fortran/src/H5Off_F03.f9024
-rw-r--r--fortran/src/H5Off_F90.f9024
-rw-r--r--fortran/src/H5Pf.c4073
-rw-r--r--fortran/src/H5Pff.f9024
-rw-r--r--fortran/src/H5Pff_F03.f9020
-rw-r--r--fortran/src/H5Pff_F90.f9020
-rw-r--r--fortran/src/H5Rf.c479
-rw-r--r--fortran/src/H5Rff.f9024
-rw-r--r--fortran/src/H5Rff_F03.f908
-rw-r--r--fortran/src/H5Rff_F90.f908
-rw-r--r--fortran/src/H5Sf.c991
-rw-r--r--fortran/src/H5Sff.f9024
-rw-r--r--fortran/src/H5Tf.c1615
-rw-r--r--fortran/src/H5Tff.f9024
-rw-r--r--fortran/src/H5Tff_F03.f9024
-rw-r--r--fortran/src/H5Tff_F90.f9024
-rw-r--r--fortran/src/H5Zf.c70
-rw-r--r--fortran/src/H5Zff.f9020
-rw-r--r--fortran/src/H5_DBLE_InterfaceExclude.f9024
-rw-r--r--fortran/src/H5_DBLE_InterfaceInclude.f9024
-rw-r--r--fortran/src/H5_f.c861
-rw-r--r--fortran/src/H5_ff.f9024
-rw-r--r--fortran/src/H5_ff_F03.f9020
-rw-r--r--fortran/src/H5_ff_F90.f9024
-rw-r--r--fortran/src/H5f90.h7
-rw-r--r--fortran/src/H5f90global.f9024
-rw-r--r--fortran/src/H5f90i.h7
-rw-r--r--fortran/src/H5f90kit.c27
-rw-r--r--fortran/src/H5f90proto.h2207
-rw-r--r--fortran/src/H5match_types.c620
-rw-r--r--fortran/src/H5test_kind.f904
-rw-r--r--fortran/src/H5test_kind_SIZEOF.f906
-rw-r--r--fortran/src/H5test_kind_STORAGE_SIZE.f9010
-rw-r--r--fortran/src/HDF5.f9024
-rw-r--r--fortran/src/HDF5mpio.f908
-rw-r--r--fortran/src/Makefile.am2
-rw-r--r--fortran/src/Makefile.in46
-rw-r--r--fortran/src/h5fc.in2
-rw-r--r--fortran/src/hdf5_fortrandll.def.in6
-rw-r--r--fortran/test/CMakeLists.txt459
-rw-r--r--fortran/test/CMakeTests.cmake166
-rw-r--r--fortran/test/Makefile.am2
-rw-r--r--fortran/test/Makefile.in28
-rw-r--r--fortran/test/fflush1.f9024
-rw-r--r--fortran/test/fflush2.f9024
-rw-r--r--fortran/test/fortranlib_test.f9024
-rw-r--r--fortran/test/fortranlib_test_1_8.f9024
-rw-r--r--fortran/test/fortranlib_test_F03.f9024
-rw-r--r--fortran/test/t.c112
-rw-r--r--fortran/test/t.h24
-rw-r--r--fortran/test/tH5A.f9024
-rw-r--r--fortran/test/tH5A_1_8.f9024
-rw-r--r--fortran/test/tH5D.f9024
-rw-r--r--fortran/test/tH5E.f9024
-rw-r--r--fortran/test/tH5E_F03.f9024
-rw-r--r--fortran/test/tH5F.f9024
-rw-r--r--fortran/test/tH5F_F03.f9024
-rw-r--r--fortran/test/tH5G.f9024
-rw-r--r--fortran/test/tH5G_1_8.f9024
-rw-r--r--fortran/test/tH5I.f9024
-rw-r--r--fortran/test/tH5L_F03.f9024
-rw-r--r--fortran/test/tH5MISC_1_8.f9024
-rw-r--r--fortran/test/tH5O.f9024
-rw-r--r--fortran/test/tH5O_F03.f9024
-rw-r--r--fortran/test/tH5P.f9024
-rw-r--r--fortran/test/tH5P_F03.f9024
-rw-r--r--fortran/test/tH5R.f9024
-rw-r--r--fortran/test/tH5S.f9024
-rw-r--r--fortran/test/tH5Sselect.f9024
-rw-r--r--fortran/test/tH5T.f9024
-rw-r--r--fortran/test/tH5T_F03.f9026
-rw-r--r--fortran/test/tH5VL.f9024
-rw-r--r--fortran/test/tH5Z.f9024
-rw-r--r--fortran/test/tHDF5.f9024
-rw-r--r--fortran/test/tHDF5_1_8.f9024
-rw-r--r--fortran/test/tHDF5_F03.f9024
-rw-r--r--fortran/test/tf.f9024
-rw-r--r--fortran/test/tf_F03.f9024
-rw-r--r--fortran/test/tf_F08.f9024
-rw-r--r--fortran/test/tf_F90.f9024
-rw-r--r--fortran/testpar/CMakeLists.txt61
-rw-r--r--fortran/testpar/CMakeTests.cmake4
-rw-r--r--fortran/testpar/Makefile.am2
-rw-r--r--fortran/testpar/Makefile.in28
-rw-r--r--fortran/testpar/hyper.f905
-rw-r--r--fortran/testpar/mdset.f905
-rw-r--r--fortran/testpar/ptest.f907
-rw-r--r--hl/CMakeLists.txt17
-rw-r--r--hl/COPYING2
-rw-r--r--hl/Makefile.am15
-rw-r--r--hl/Makefile.in34
-rw-r--r--hl/c++/CMakeLists.txt4
-rw-r--r--hl/c++/COPYING2
-rw-r--r--hl/c++/Makefile.am10
-rw-r--r--hl/c++/Makefile.in32
-rw-r--r--hl/c++/examples/CMakeLists.txt42
-rw-r--r--hl/c++/examples/CMakeTests.cmake6
-rw-r--r--hl/c++/examples/Makefile.am6
-rw-r--r--hl/c++/examples/Makefile.in32
-rw-r--r--hl/c++/examples/ptExampleFL.cpp53
-rw-r--r--hl/c++/examples/run-hlc++-ex.sh.in30
-rw-r--r--hl/c++/src/CMakeLists.txt75
-rw-r--r--hl/c++/src/H5PacketTable.cpp514
-rw-r--r--hl/c++/src/H5PacketTable.h54
-rw-r--r--hl/c++/src/Makefile.am2
-rw-r--r--hl/c++/src/Makefile.in46
-rw-r--r--hl/c++/test/CMakeLists.txt59
-rw-r--r--hl/c++/test/CMakeTests.cmake11
-rw-r--r--hl/c++/test/Makefile.am2
-rw-r--r--hl/c++/test/Makefile.in28
-rw-r--r--hl/c++/test/ptableTest.cpp600
-rw-r--r--hl/c++/test/ptableTest.h4
-rw-r--r--hl/examples/CMakeLists.txt25
-rw-r--r--hl/examples/CMakeTests.cmake67
-rw-r--r--hl/examples/Makefile.am6
-rw-r--r--hl/examples/Makefile.in32
-rw-r--r--hl/examples/ex_ds1.c174
-rw-r--r--hl/examples/ex_image1.c87
-rw-r--r--hl/examples/ex_image2.c272
-rw-r--r--hl/examples/ex_lite1.c29
-rw-r--r--hl/examples/ex_lite2.c52
-rw-r--r--hl/examples/ex_lite3.c72
-rw-r--r--hl/examples/ex_table_01.c191
-rw-r--r--hl/examples/ex_table_02.c182
-rw-r--r--hl/examples/ex_table_03.c189
-rw-r--r--hl/examples/ex_table_04.c248
-rw-r--r--hl/examples/ex_table_05.c244
-rw-r--r--hl/examples/ex_table_06.c125
-rw-r--r--hl/examples/ex_table_07.c157
-rw-r--r--hl/examples/ex_table_08.c207
-rw-r--r--hl/examples/ex_table_09.c210
-rw-r--r--hl/examples/ex_table_10.c196
-rw-r--r--hl/examples/ex_table_11.c166
-rw-r--r--hl/examples/ex_table_12.c150
-rw-r--r--hl/examples/pal_rgb.h524
-rw-r--r--hl/examples/ptExampleFL.c90
-rwxr-xr-xhl/examples/run-hl-ex.sh2
-rw-r--r--hl/examples/run-hlc-ex.sh.in29
-rw-r--r--hl/fortran/CMakeLists.txt4
-rw-r--r--hl/fortran/COPYING2
-rw-r--r--hl/fortran/Makefile.am10
-rw-r--r--hl/fortran/Makefile.in32
-rw-r--r--hl/fortran/examples/CMakeLists.txt50
-rw-r--r--hl/fortran/examples/CMakeTests.cmake31
-rw-r--r--hl/fortran/examples/Makefile.am6
-rw-r--r--hl/fortran/examples/Makefile.in32
-rw-r--r--hl/fortran/examples/ex_ds1.f9024
-rw-r--r--hl/fortran/examples/exlite.f9024
-rw-r--r--hl/fortran/examples/run-hlfortran-ex.sh.in6
-rw-r--r--hl/fortran/src/CMakeLists.txt272
-rw-r--r--hl/fortran/src/H5DSfc.c584
-rw-r--r--hl/fortran/src/H5DSff.f9024
-rw-r--r--hl/fortran/src/H5IMcc.c567
-rw-r--r--hl/fortran/src/H5IMcc.h32
-rw-r--r--hl/fortran/src/H5IMfc.c811
-rw-r--r--hl/fortran/src/H5IMff.f9024
-rw-r--r--hl/fortran/src/H5LTf90proto.h2171
-rw-r--r--hl/fortran/src/H5LTfc.c2183
-rw-r--r--hl/fortran/src/H5LTff.f9024
-rw-r--r--hl/fortran/src/H5TBfc.c887
-rw-r--r--hl/fortran/src/H5TBff.f9024
-rw-r--r--hl/fortran/src/Makefile.am17
-rw-r--r--hl/fortran/src/Makefile.in69
-rw-r--r--hl/fortran/test/CMakeLists.txt110
-rw-r--r--hl/fortran/test/CMakeTests.cmake83
-rw-r--r--hl/fortran/test/Makefile.am2
-rw-r--r--hl/fortran/test/Makefile.in28
-rw-r--r--hl/fortran/test/tstds.f9024
-rw-r--r--hl/fortran/test/tstimage.f9024
-rw-r--r--hl/fortran/test/tstlite.f9024
-rw-r--r--hl/fortran/test/tsttable.f9024
-rw-r--r--hl/src/CMakeLists.txt80
-rw-r--r--hl/src/COPYING2
-rw-r--r--hl/src/H5DO.c116
-rw-r--r--hl/src/H5DOpublic.h21
-rw-r--r--hl/src/H5DS.c1819
-rw-r--r--hl/src/H5DSprivate.h12
-rw-r--r--hl/src/H5DSpublic.h50
-rw-r--r--hl/src/H5HLprivate2.h3
-rw-r--r--hl/src/H5IM.c1328
-rw-r--r--hl/src/H5IMprivate.h12
-rw-r--r--hl/src/H5IMpublic.h87
-rw-r--r--hl/src/H5LT.c4722
-rw-r--r--hl/src/H5LTanalyze.c214
-rw-r--r--hl/src/H5LTanalyze.l28
-rw-r--r--hl/src/H5LTparse.c2280
-rw-r--r--hl/src/H5LTparse.h182
-rw-r--r--hl/src/H5LTparse.y21
-rw-r--r--hl/src/H5LTprivate.h25
-rw-r--r--hl/src/H5LTpublic.h353
-rw-r--r--hl/src/H5PT.c887
-rw-r--r--hl/src/H5PTprivate.h3
-rw-r--r--hl/src/H5PTpublic.h30
-rw-r--r--hl/src/H5TB.c3307
-rw-r--r--hl/src/H5TBprivate.h29
-rw-r--r--hl/src/H5TBpublic.h197
-rw-r--r--hl/src/Makefile.am2
-rw-r--r--hl/src/Makefile.in46
-rw-r--r--hl/src/hdf5_hl.h3
-rw-r--r--hl/test/CMakeLists.txt128
-rw-r--r--hl/test/CMakeTests.cmake80
-rw-r--r--hl/test/COPYING2
-rw-r--r--hl/test/H5srcdir_str.h.in2
-rw-r--r--hl/test/Makefile.am3
-rw-r--r--hl/test/Makefile.in29
-rw-r--r--hl/test/dectris_hl_perf.c481
-rw-r--r--hl/test/gen_test_ds.c419
-rw-r--r--hl/test/h5hltest.h21
-rw-r--r--hl/test/pal_rgb.h518
-rw-r--r--hl/test/test_ds.c4164
-rw-r--r--hl/test/test_dset_opt.c1696
-rw-r--r--hl/test/test_file_image.c230
-rw-r--r--hl/test/test_image.c822
-rw-r--r--hl/test/test_lite.c2213
-rw-r--r--hl/test/test_packet.c796
-rw-r--r--hl/test/test_packet_vlen.c1275
-rw-r--r--hl/test/test_table.c1878
-rw-r--r--hl/tools/CMakeLists.txt4
-rw-r--r--hl/tools/COPYING2
-rw-r--r--hl/tools/Makefile.am2
-rw-r--r--hl/tools/Makefile.in28
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt112
-rw-r--r--hl/tools/gif2h5/CMakeTests.cmake38
-rw-r--r--hl/tools/gif2h5/Makefile.am14
-rw-r--r--hl/tools/gif2h5/Makefile.in44
-rw-r--r--hl/tools/gif2h5/decompress.c210
-rw-r--r--hl/tools/gif2h5/gif.h146
-rw-r--r--hl/tools/gif2h5/gif2hdf.c54
-rw-r--r--hl/tools/gif2h5/gif2mem.c200
-rw-r--r--hl/tools/gif2h5/gifread.c333
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c76
-rw-r--r--hl/tools/gif2h5/h52giftest.sh.in4
-rw-r--r--hl/tools/gif2h5/hdf2gif.c259
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c215
-rw-r--r--hl/tools/gif2h5/testfiles/README (renamed from hl/tools/gif2h5/testfiles/REAMDE)0
-rw-r--r--hl/tools/gif2h5/writehdf.c61
-rw-r--r--m4/aclocal_cxx.m474
-rw-r--r--m4/aclocal_fc.f90162
-rw-r--r--m4/aclocal_fc.m4336
-rw-r--r--m4/libtool.m45
-rw-r--r--m4/ltsugar.m411
-rw-r--r--release_docs/COPYING2
-rw-r--r--release_docs/HISTORY-1_0-1_8_0_rc3.txt3324
-rw-r--r--release_docs/HISTORY-1_8.txt4966
-rw-r--r--release_docs/INSTALL21
-rw-r--r--release_docs/INSTALL_CMake.txt664
-rw-r--r--release_docs/INSTALL_Cygwin.txt164
-rw-r--r--release_docs/INSTALL_Warnings.txt474
-rw-r--r--release_docs/INSTALL_parallel35
-rw-r--r--release_docs/README_HDF5_CMake24
-rw-r--r--release_docs/README_HPC206
-rw-r--r--release_docs/RELEASE.txt997
-rw-r--r--release_docs/USING_CMake_Examples.txt29
-rw-r--r--release_docs/USING_HDF5_CMake.txt230
-rw-r--r--release_docs/USING_HDF5_VS.txt62
-rw-r--r--src/CMakeLists.txt856
-rw-r--r--src/COPYING2
-rw-r--r--src/H5.c682
-rw-r--r--src/H5A.c1048
-rw-r--r--src/H5AC.c3651
-rw-r--r--src/H5ACpkg.h94
-rw-r--r--src/H5ACprivate.h284
-rw-r--r--src/H5ACpublic.h252
-rw-r--r--src/H5Abtree2.c206
-rw-r--r--src/H5Adense.c1356
-rw-r--r--src/H5Adeprec.c177
-rw-r--r--src/H5Aint.c1190
-rw-r--r--src/H5Apkg.h208
-rw-r--r--src/H5Aprivate.h42
-rw-r--r--src/H5Apublic.h109
-rw-r--r--src/H5Atest.c60
-rw-r--r--src/H5B.c1633
-rw-r--r--src/H5B2.c726
-rw-r--r--src/H5B2cache.c385
-rw-r--r--src/H5B2dbg.c263
-rw-r--r--src/H5B2hdr.c234
-rw-r--r--src/H5B2int.c2190
-rw-r--r--src/H5B2pkg.h315
-rw-r--r--src/H5B2private.h121
-rw-r--r--src/H5B2public.h3
-rw-r--r--src/H5B2stat.c37
-rw-r--r--src/H5B2test.c187
-rw-r--r--src/H5Bcache.c141
-rw-r--r--src/H5Bdbg.c280
-rw-r--r--src/H5Bpkg.h41
-rw-r--r--src/H5Bprivate.h140
-rw-r--r--src/H5Bpublic.h2
-rw-r--r--src/H5C.c10482
-rw-r--r--src/H5CS.c89
-rw-r--r--src/H5CSprivate.h20
-rw-r--r--src/H5Cpkg.h1521
-rw-r--r--src/H5Cprivate.h1115
-rw-r--r--src/H5Cpublic.h17
-rw-r--r--src/H5D.c775
-rw-r--r--src/H5Dbtree.c618
-rw-r--r--src/H5Dchunk.c3167
-rw-r--r--src/H5Dcompact.c286
-rw-r--r--src/H5Dcontig.c865
-rw-r--r--src/H5Ddbg.c53
-rw-r--r--src/H5Ddeprec.c265
-rw-r--r--src/H5Defl.c278
-rw-r--r--src/H5Dfill.c308
-rw-r--r--src/H5Dint.c1766
-rw-r--r--src/H5Dio.c945
-rw-r--r--src/H5Dlayout.c254
-rw-r--r--src/H5Dmpio.c1197
-rw-r--r--src/H5Doh.c227
-rw-r--r--src/H5Dpkg.h794
-rw-r--r--src/H5Dprivate.h161
-rw-r--r--src/H5Dpublic.h138
-rw-r--r--src/H5Dscatgath.c634
-rw-r--r--src/H5Dselect.c176
-rw-r--r--src/H5Dtest.c62
-rw-r--r--src/H5E.c948
-rw-r--r--src/H5Edefin.h6
-rw-r--r--src/H5Edeprec.c242
-rw-r--r--src/H5Einit.h300
-rw-r--r--src/H5Eint.c684
-rw-r--r--src/H5Epkg.h82
-rw-r--r--src/H5Eprivate.h141
-rw-r--r--src/H5Epubgen.h6
-rw-r--r--src/H5Epublic.h197
-rw-r--r--src/H5Eterm.h4
-rw-r--r--src/H5F.c1087
-rw-r--r--src/H5FD.c1660
-rw-r--r--src/H5FDcore.c885
-rw-r--r--src/H5FDcore.h20
-rw-r--r--src/H5FDdirect.c1035
-rw-r--r--src/H5FDdirect.h29
-rw-r--r--src/H5FDfamily.c1038
-rw-r--r--src/H5FDfamily.h18
-rw-r--r--src/H5FDhdfs.c1698
-rw-r--r--src/H5FDhdfs.h123
-rw-r--r--src/H5FDint.c218
-rw-r--r--src/H5FDlog.c918
-rw-r--r--src/H5FDlog.h43
-rw-r--r--src/H5FDmpi.c185
-rw-r--r--src/H5FDmpi.h13
-rw-r--r--src/H5FDmpio.c1576
-rw-r--r--src/H5FDmpio.h17
-rw-r--r--src/H5FDmulti.c2000
-rw-r--r--src/H5FDmulti.h29
-rw-r--r--src/H5FDpkg.h24
-rw-r--r--src/H5FDprivate.h135
-rw-r--r--src/H5FDpublic.h364
-rw-r--r--src/H5FDros3.c1576
-rw-r--r--src/H5FDros3.h103
-rw-r--r--src/H5FDs3comms.c2883
-rw-r--r--src/H5FDs3comms.h562
-rw-r--r--src/H5FDsec2.c484
-rw-r--r--src/H5FDsec2.h13
-rw-r--r--src/H5FDspace.c156
-rw-r--r--src/H5FDstdio.c561
-rw-r--r--src/H5FDstdio.h10
-rw-r--r--src/H5FDwindows.c30
-rw-r--r--src/H5FDwindows.h8
-rw-r--r--src/H5FL.c1080
-rw-r--r--src/H5FLprivate.h305
-rw-r--r--src/H5FO.c140
-rw-r--r--src/H5FOprivate.h31
-rw-r--r--src/H5FS.c521
-rw-r--r--src/H5FScache.c399
-rw-r--r--src/H5FSdbg.c181
-rw-r--r--src/H5FSpkg.h205
-rw-r--r--src/H5FSprivate.h228
-rw-r--r--src/H5FSpublic.h5
-rw-r--r--src/H5FSsection.c1455
-rw-r--r--src/H5FSstat.c41
-rw-r--r--src/H5FStest.c65
-rw-r--r--src/H5Faccum.c569
-rw-r--r--src/H5Fcwfs.c132
-rw-r--r--src/H5Fdbg.c93
-rw-r--r--src/H5Fefc.c330
-rw-r--r--src/H5Ffake.c39
-rw-r--r--src/H5Fint.c1495
-rw-r--r--src/H5Fio.c61
-rw-r--r--src/H5Fmount.c509
-rw-r--r--src/H5Fmpi.c128
-rw-r--r--src/H5Fpkg.h339
-rw-r--r--src/H5Fprivate.h876
-rw-r--r--src/H5Fpublic.h158
-rw-r--r--src/H5Fquery.c551
-rw-r--r--src/H5Fsfile.c89
-rw-r--r--src/H5Fsuper.c328
-rw-r--r--src/H5Fsuper_cache.c450
-rw-r--r--src/H5Ftest.c90
-rw-r--r--src/H5G.c555
-rw-r--r--src/H5Gbtree2.c173
-rw-r--r--src/H5Gcache.c140
-rw-r--r--src/H5Gcompact.c273
-rw-r--r--src/H5Gdense.c945
-rw-r--r--src/H5Gdeprec.c597
-rw-r--r--src/H5Gent.c217
-rw-r--r--src/H5Gint.c501
-rw-r--r--src/H5Glink.c212
-rw-r--r--src/H5Gloc.c494
-rw-r--r--src/H5Gname.c643
-rw-r--r--src/H5Gnode.c681
-rw-r--r--src/H5Gobj.c615
-rw-r--r--src/H5Goh.c180
-rw-r--r--src/H5Gpkg.h427
-rw-r--r--src/H5Gprivate.h246
-rw-r--r--src/H5Gpublic.h146
-rw-r--r--src/H5Groot.c206
-rw-r--r--src/H5Gstab.c563
-rw-r--r--src/H5Gtest.c407
-rw-r--r--src/H5Gtraverse.c472
-rw-r--r--src/H5HF.c301
-rw-r--r--src/H5HFbtree2.c327
-rw-r--r--src/H5HFcache.c767
-rw-r--r--src/H5HFdbg.c492
-rw-r--r--src/H5HFdblock.c342
-rw-r--r--src/H5HFdtable.c146
-rw-r--r--src/H5HFhdr.c666
-rw-r--r--src/H5HFhuge.c467
-rw-r--r--src/H5HFiblock.c868
-rw-r--r--src/H5HFiter.c245
-rw-r--r--src/H5HFman.c284
-rw-r--r--src/H5HFpkg.h826
-rw-r--r--src/H5HFprivate.h99
-rw-r--r--src/H5HFpublic.h5
-rw-r--r--src/H5HFsection.c1976
-rw-r--r--src/H5HFspace.c214
-rw-r--r--src/H5HFstat.c77
-rw-r--r--src/H5HFtest.c133
-rw-r--r--src/H5HFtiny.c218
-rw-r--r--src/H5HG.c400
-rw-r--r--src/H5HGcache.c233
-rw-r--r--src/H5HGdbg.c133
-rw-r--r--src/H5HGpkg.h75
-rw-r--r--src/H5HGprivate.h41
-rw-r--r--src/H5HGpublic.h4
-rw-r--r--src/H5HGquery.c25
-rw-r--r--src/H5HL.c795
-rw-r--r--src/H5HLcache.c349
-rw-r--r--src/H5HLdbg.c134
-rw-r--r--src/H5HLint.c144
-rw-r--r--src/H5HLpkg.h96
-rw-r--r--src/H5HLprivate.h54
-rw-r--r--src/H5HLpublic.h4
-rw-r--r--src/H5HP.c397
-rw-r--r--src/H5HPprivate.h25
-rw-r--r--src/H5I.c1656
-rw-r--r--src/H5Ipkg.h18
-rw-r--r--src/H5Iprivate.h64
-rw-r--r--src/H5Ipublic.h77
-rw-r--r--src/H5Itest.c53
-rw-r--r--src/H5L.c1581
-rw-r--r--src/H5Lexternal.c531
-rw-r--r--src/H5Lpkg.h20
-rw-r--r--src/H5Lprivate.h69
-rw-r--r--src/H5Lpublic.h170
-rw-r--r--src/H5MF.c649
-rw-r--r--src/H5MFaggr.c595
-rw-r--r--src/H5MFdbg.c117
-rw-r--r--src/H5MFpkg.h121
-rw-r--r--src/H5MFprivate.h31
-rw-r--r--src/H5MFsection.c224
-rw-r--r--src/H5MM.c107
-rw-r--r--src/H5MMprivate.h10
-rw-r--r--src/H5MMpublic.h9
-rw-r--r--src/H5MP.c205
-rw-r--r--src/H5MPpkg.h49
-rw-r--r--src/H5MPprivate.h19
-rw-r--r--src/H5MPtest.c64
-rw-r--r--src/H5O.c1744
-rw-r--r--src/H5Oainfo.c244
-rw-r--r--src/H5Oalloc.c1398
-rw-r--r--src/H5Oattr.c433
-rw-r--r--src/H5Oattribute.c1025
-rw-r--r--src/H5Obogus.c142
-rw-r--r--src/H5Obtreek.c122
-rw-r--r--src/H5Ocache.c629
-rw-r--r--src/H5Ochunk.c173
-rw-r--r--src/H5Ocont.c121
-rw-r--r--src/H5Ocopy.c959
-rw-r--r--src/H5Odbg.c395
-rw-r--r--src/H5Odrvinfo.c136
-rw-r--r--src/H5Odtype.c1385
-rw-r--r--src/H5Oefl.c340
-rw-r--r--src/H5Ofill.c643
-rw-r--r--src/H5Oginfo.c186
-rw-r--r--src/H5Olayout.c360
-rw-r--r--src/H5Olinfo.c295
-rw-r--r--src/H5Olink.c442
-rw-r--r--src/H5Omessage.c939
-rw-r--r--src/H5Omtime.c451
-rw-r--r--src/H5Oname.c142
-rw-r--r--src/H5Onull.c51
-rw-r--r--src/H5Opkg.h548
-rw-r--r--src/H5Opline.c513
-rw-r--r--src/H5Oprivate.h620
-rw-r--r--src/H5Opublic.h173
-rw-r--r--src/H5Orefcount.c137
-rw-r--r--src/H5Osdspace.c331
-rw-r--r--src/H5Oshared.c290
-rw-r--r--src/H5Oshared.h157
-rw-r--r--src/H5Oshmesg.c102
-rw-r--r--src/H5Ostab.c209
-rw-r--r--src/H5Otest.c268
-rw-r--r--src/H5Ounknown.c63
-rw-r--r--src/H5P.c576
-rw-r--r--src/H5PL.c531
-rw-r--r--src/H5PLextern.h17
-rw-r--r--src/H5PLpkg.h10
-rw-r--r--src/H5PLprivate.h13
-rw-r--r--src/H5PLpublic.h35
-rw-r--r--src/H5Pacpl.c54
-rw-r--r--src/H5Pdapl.c332
-rw-r--r--src/H5Pdcpl.c1057
-rw-r--r--src/H5Pdeprec.c102
-rw-r--r--src/H5Pdxpl.c790
-rw-r--r--src/H5Pfapl.c1519
-rw-r--r--src/H5Pfcpl.c466
-rw-r--r--src/H5Pfmpl.c69
-rw-r--r--src/H5Pgcpl.c204
-rw-r--r--src/H5Pint.c2270
-rw-r--r--src/H5Plapl.c439
-rw-r--r--src/H5Plcpl.c91
-rw-r--r--src/H5Pocpl.c1050
-rw-r--r--src/H5Pocpypl.c283
-rw-r--r--src/H5Ppkg.h182
-rw-r--r--src/H5Pprivate.h108
-rw-r--r--src/H5Ppublic.h428
-rw-r--r--src/H5Pstrcpl.c87
-rw-r--r--src/H5Ptest.c73
-rw-r--r--src/H5R.c470
-rw-r--r--src/H5RC.c28
-rw-r--r--src/H5RCprivate.h16
-rw-r--r--src/H5RS.c72
-rw-r--r--src/H5RSprivate.h15
-rw-r--r--src/H5Rdeprec.c56
-rw-r--r--src/H5Rpkg.h19
-rw-r--r--src/H5Rprivate.h5
-rw-r--r--src/H5Rpublic.h51
-rw-r--r--src/H5S.c1265
-rw-r--r--src/H5SL.c1235
-rw-r--r--src/H5SLprivate.h42
-rw-r--r--src/H5SM.c1413
-rw-r--r--src/H5SMbtree2.c99
-rw-r--r--src/H5SMcache.c276
-rw-r--r--src/H5SMmessage.c117
-rw-r--r--src/H5SMpkg.h190
-rw-r--r--src/H5SMprivate.h54
-rw-r--r--src/H5SMtest.c52
-rw-r--r--src/H5ST.c204
-rw-r--r--src/H5STprivate.h39
-rw-r--r--src/H5Sall.c296
-rw-r--r--src/H5Sdbg.c67
-rw-r--r--src/H5Shyper.c4519
-rw-r--r--src/H5Smpio.c769
-rw-r--r--src/H5Snone.c238
-rw-r--r--src/H5Spkg.h188
-rw-r--r--src/H5Spoint.c730
-rw-r--r--src/H5Sprivate.h307
-rw-r--r--src/H5Spublic.h179
-rw-r--r--src/H5Sselect.c846
-rw-r--r--src/H5Stest.c40
-rw-r--r--src/H5T.c3828
-rw-r--r--src/H5TS.c288
-rw-r--r--src/H5TSprivate.h122
-rw-r--r--src/H5Tarray.c185
-rw-r--r--src/H5Tbit.c546
-rw-r--r--src/H5Tcommit.c507
-rw-r--r--src/H5Tcompound.c264
-rw-r--r--src/H5Tconv.c9208
-rw-r--r--src/H5Tcset.c62
-rw-r--r--src/H5Tdbg.c272
-rw-r--r--src/H5Tdeprec.c121
-rw-r--r--src/H5Tenum.c342
-rw-r--r--src/H5Tfields.c368
-rw-r--r--src/H5Tfixed.c68
-rw-r--r--src/H5Tfloat.c210
-rw-r--r--src/H5Tnative.c1097
-rw-r--r--src/H5Toffset.c117
-rw-r--r--src/H5Toh.c94
-rw-r--r--src/H5Topaque.c59
-rw-r--r--src/H5Torder.c140
-rw-r--r--src/H5Tpad.c59
-rw-r--r--src/H5Tpkg.h1568
-rw-r--r--src/H5Tprecis.c143
-rw-r--r--src/H5Tprivate.h134
-rw-r--r--src/H5Tpublic.h584
-rw-r--r--src/H5Tstrpad.c61
-rw-r--r--src/H5Tvisit.c64
-rw-r--r--src/H5Tvlen.c550
-rw-r--r--src/H5VM.c763
-rw-r--r--src/H5VMprivate.h328
-rw-r--r--src/H5WB.c71
-rw-r--r--src/H5WBprivate.h14
-rw-r--r--src/H5Z.c1268
-rw-r--r--src/H5Zdeflate.c177
-rw-r--r--src/H5Zfletcher32.c109
-rw-r--r--src/H5Znbit.c1453
-rw-r--r--src/H5Zpkg.h5
-rw-r--r--src/H5Zprivate.h82
-rw-r--r--src/H5Zpublic.h136
-rw-r--r--src/H5Zscaleoffset.c2286
-rw-r--r--src/H5Zshuffle.c289
-rw-r--r--src/H5Zszip.c255
-rw-r--r--src/H5Ztrans.c1391
-rw-r--r--src/H5api_adpt.h346
-rw-r--r--src/H5checksum.c187
-rw-r--r--src/H5config.h.in50
-rw-r--r--src/H5dbg.c109
-rw-r--r--src/H5detect.c1997
-rw-r--r--src/H5err.txt8
-rw-r--r--src/H5make_libsettings.c303
-rw-r--r--src/H5overflow.h317
-rw-r--r--src/H5overflow.txt3
-rw-r--r--src/H5private.h1919
-rw-r--r--src/H5public.h337
-rw-r--r--src/H5system.c982
-rw-r--r--src/H5timer.c114
-rw-r--r--src/H5trace.c2021
-rw-r--r--src/H5vers.txt2
-rw-r--r--src/H5version.h2
-rw-r--r--src/H5win32defs.h205
-rw-r--r--src/Makefile.am18
-rw-r--r--src/Makefile.in223
-rw-r--r--src/hdf5.h56
-rw-r--r--src/hdf5.lnt2
-rw-r--r--src/libhdf5.settings.in67
-rw-r--r--test/CMakeLists.txt469
-rw-r--r--test/CMakeTests.cmake1070
-rw-r--r--test/CMakeVFDTests.cmake207
-rw-r--r--test/COPYING2
-rw-r--r--test/H5srcdir.h54
-rw-r--r--test/H5srcdir_str.h.in2
-rw-r--r--test/Makefile.am10
-rw-r--r--test/Makefile.in123
-rw-r--r--test/accum.c1413
-rw-r--r--test/app_ref.c130
-rw-r--r--test/big.c643
-rw-r--r--test/bittests.c1217
-rw-r--r--test/btree2.c4803
-rw-r--r--test/cache.c30584
-rw-r--r--test/cache_api.c4577
-rw-r--r--test/cache_common.c4564
-rw-r--r--test/cache_common.h1008
-rw-r--r--test/cmpd_dset.c2178
-rw-r--r--test/cross_read.c236
-rw-r--r--test/dangle.c388
-rw-r--r--test/dsets.c9376
-rw-r--r--test/dt_arith.c6031
-rw-r--r--test/dtransform.c1002
-rw-r--r--test/dtypes.c7137
-rw-r--r--test/dynlib1.c74
-rw-r--r--test/dynlib2.c68
-rw-r--r--test/dynlib3.c78
-rw-r--r--test/dynlib4.c75
-rw-r--r--test/efc.c3053
-rw-r--r--test/enum.c732
-rw-r--r--test/err_compat.c371
-rw-r--r--test/error_test.c599
-rw-r--r--test/extend.c354
-rw-r--r--test/external.c1026
-rw-r--r--test/fheap.c11629
-rw-r--r--test/file_image.c682
-rw-r--r--test/fillval.c2686
-rw-r--r--test/filter_fail.c350
-rw-r--r--test/flush1.c237
-rw-r--r--test/flush2.c135
-rw-r--r--test/freespace.c2202
-rw-r--r--test/gen_bad_compound.c26
-rw-r--r--test/gen_bad_offset.c79
-rw-r--r--test/gen_bad_ohdr.c68
-rw-r--r--test/gen_bogus.c107
-rw-r--r--test/gen_cross.c786
-rw-r--r--test/gen_deflate.c129
-rw-r--r--test/gen_file_image.c89
-rw-r--r--test/gen_filters.c190
-rw-r--r--test/gen_idx.c49
-rw-r--r--test/gen_mergemsg.c52
-rw-r--r--test/gen_new_array.c70
-rw-r--r--test/gen_new_fill.c89
-rw-r--r--test/gen_new_group.c78
-rw-r--r--test/gen_new_mtime.c15
-rw-r--r--test/gen_new_super.c32
-rw-r--r--test/gen_noencoder.c31
-rw-r--r--test/gen_nullspace.c38
-rw-r--r--test/gen_old_array.c73
-rw-r--r--test/gen_old_group.c28
-rw-r--r--test/gen_old_layout.c32
-rw-r--r--test/gen_old_mtime.c16
-rw-r--r--test/gen_sizes_lheap.c17
-rw-r--r--test/gen_udlinks.c98
-rw-r--r--test/getname.c3360
-rw-r--r--test/gheap.c671
-rw-r--r--test/h5test.c1196
-rw-r--r--test/h5test.h238
-rw-r--r--test/hdfs.c1577
-rw-r--r--test/hyperslab.c1206
-rw-r--r--test/istore.c721
-rw-r--r--test/lheap.c156
-rw-r--r--test/links.c15754
-rw-r--r--test/links_env.c155
-rw-r--r--test/mf.c3131
-rw-r--r--test/mount.c3272
-rw-r--r--test/mtime.c164
-rw-r--r--test/ntypes.c2307
-rw-r--r--test/objcopy.c13036
-rw-r--r--test/ohdr.c667
-rw-r--r--test/plugin.c766
-rw-r--r--test/pool.c372
-rw-r--r--test/reserved.c425
-rw-r--r--test/ros3.c1818
-rw-r--r--test/s3comms.c2643
-rw-r--r--test/set_extent.c2391
-rw-r--r--test/space_overflow.c25
-rw-r--r--test/stab.c1149
-rw-r--r--test/tarray.c1567
-rw-r--r--test/tattr.c4011
-rw-r--r--test/tbogus.h5bin3792 -> 4512 bytes
-rw-r--r--test/tcheck_version.c92
-rw-r--r--test/tchecksum.c44
-rw-r--r--test/tconfig.c88
-rw-r--r--test/tcoords.c396
-rw-r--r--test/test_plugin.sh.in2
-rw-r--r--test/testcheck_version.sh.in8
-rw-r--r--test/testerror.sh.in2
-rw-r--r--test/testfiles/err_compat_12
-rw-r--r--test/testfiles/err_compat_22
-rw-r--r--test/testfiles/error_test_22
-rw-r--r--test/testframe.c587
-rw-r--r--test/testhdf5.c54
-rw-r--r--test/testhdf5.h274
-rw-r--r--test/testlibinfo.sh.in2
-rw-r--r--test/testlinks_env.sh.in15
-rw-r--r--test/testmeta.c156
-rw-r--r--test/tfile.c1182
-rw-r--r--test/tgenprop.c826
-rw-r--r--test/th5o.c306
-rw-r--r--test/th5s.c939
-rw-r--r--test/theap.c522
-rw-r--r--test/tid.c935
-rw-r--r--test/titerate.c532
-rw-r--r--test/tmeta.c108
-rw-r--r--test/tmisc.c2485
-rw-r--r--test/trefer.c642
-rw-r--r--test/trefstr.c201
-rw-r--r--test/tselect.c10787
-rw-r--r--test/tskiplist.c1203
-rw-r--r--test/tsohm.c1418
-rw-r--r--test/ttime.c110
-rw-r--r--test/ttsafe.c58
-rw-r--r--test/ttsafe.h29
-rw-r--r--test/ttsafe_acreate.c154
-rw-r--r--test/ttsafe_attr_vlen.c176
-rw-r--r--test/ttsafe_cancel.c233
-rw-r--r--test/ttsafe_dcreate.c145
-rw-r--r--test/ttsafe_error.c221
-rw-r--r--test/ttst.c245
-rw-r--r--test/tunicode.c1142
-rw-r--r--test/tverbounds18.c92
-rw-r--r--test/tvlstr.c382
-rw-r--r--test/tvltypes.c1870
-rw-r--r--test/unlink.c2547
-rw-r--r--test/unregister.c291
-rw-r--r--test/vfd.c1662
-rw-r--r--testpar/CMakeLists.txt79
-rw-r--r--testpar/CMakeTests.cmake144
-rw-r--r--testpar/CMakeVFDTests.cmake75
-rw-r--r--testpar/COPYING2
-rw-r--r--testpar/Makefile.am14
-rw-r--r--testpar/Makefile.in56
-rw-r--r--testpar/t_cache.c6188
-rw-r--r--testpar/t_chunk_alloc.c303
-rw-r--r--testpar/t_coll_chunk.c1203
-rw-r--r--testpar/t_dset.c2732
-rw-r--r--testpar/t_file.c92
-rw-r--r--testpar/t_file_image.c313
-rw-r--r--testpar/t_filter_read.c368
-rw-r--r--testpar/t_init_term.c35
-rw-r--r--testpar/t_mdset.c2108
-rw-r--r--testpar/t_mpi.c1548
-rw-r--r--testpar/t_pflush1.c275
-rw-r--r--testpar/t_pflush2.c282
-rw-r--r--testpar/t_ph5basic.c151
-rw-r--r--testpar/t_prestart.c95
-rw-r--r--testpar/t_pshutdown.c82
-rw-r--r--testpar/t_shapesame.c4322
-rw-r--r--testpar/t_span_tree.c3113
-rw-r--r--testpar/testpar.h98
-rw-r--r--testpar/testpflush.sh.in64
-rw-r--r--testpar/testphdf5.c650
-rw-r--r--testpar/testphdf5.h305
-rw-r--r--tools/CMakeLists.txt27
-rw-r--r--tools/COPYING2
-rw-r--r--tools/Makefile.am10
-rw-r--r--tools/Makefile.in35
-rw-r--r--tools/h5copy/CMakeLists.txt96
-rw-r--r--tools/h5copy/CMakeTests.cmake123
-rw-r--r--tools/h5copy/Makefile.am16
-rw-r--r--tools/h5copy/Makefile.in80
-rw-r--r--tools/h5copy/dynlib_copy.c56
-rw-r--r--tools/h5copy/h5copy.c378
-rw-r--r--tools/h5copy/h5copygentest.c607
-rw-r--r--tools/h5copy/testfiles/h5copy_misc1.err1
-rw-r--r--tools/h5copy/testfiles/h5copy_misc1.out1
-rw-r--r--tools/h5copy/testh5copy.sh.in9
-rw-r--r--tools/h5diff/CMakeLists.txt187
-rw-r--r--tools/h5diff/CMakeTests.cmake248
-rw-r--r--tools/h5diff/Makefile.am23
-rw-r--r--tools/h5diff/Makefile.in56
-rw-r--r--tools/h5diff/dynlib_diff.c56
-rw-r--r--tools/h5diff/h5diff_common.c769
-rw-r--r--tools/h5diff/h5diff_common.h7
-rw-r--r--tools/h5diff/h5diff_main.c52
-rw-r--r--tools/h5diff/h5diff_plugin.sh.in89
-rw-r--r--tools/h5diff/h5diffgentest.c4138
-rw-r--r--tools/h5diff/ph5diff_main.c149
-rw-r--r--tools/h5diff/testfiles/dangling_link.err (renamed from tools/h5diff/testfiles/h5diff_459_ERR.err)0
-rw-r--r--tools/h5diff/testfiles/h5diff_19.txt26
-rw-r--r--tools/h5diff/testfiles/h5diff_454_ERR.err4
-rw-r--r--tools/h5diff/testfiles/h5diff_454_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_455_ERR.err4
-rw-r--r--tools/h5diff/testfiles/h5diff_455_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_457_ERR.err4
-rw-r--r--tools/h5diff/testfiles/h5diff_457_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_458_ERR.err4
-rw-r--r--tools/h5diff/testfiles/h5diff_458_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_459_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_600.txt1
-rw-r--r--tools/h5diff/testfiles/h5diff_601_ERR.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_udfail.err12
-rw-r--r--tools/h5diff/testfiles/h5diff_udfail.txt1
-rw-r--r--tools/h5diff/testh5diff.sh.in8
-rw-r--r--tools/h5diff/testph5diff.sh.in2
-rw-r--r--tools/h5dump/CMakeLists.txt151
-rw-r--r--tools/h5dump/CMakeTests.cmake627
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake141
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake172
-rw-r--r--tools/h5dump/CMakeVFDTests.cmake85
-rw-r--r--tools/h5dump/Makefile.am15
-rw-r--r--tools/h5dump/Makefile.in46
-rw-r--r--tools/h5dump/binread.c23
-rw-r--r--tools/h5dump/dynlib_dump.c56
-rw-r--r--tools/h5dump/errfiles/tarray1_big.err31
-rw-r--r--tools/h5dump/errfiles/tattrregR.err21
-rw-r--r--tools/h5dump/errfiles/tdataregR.err21
-rw-r--r--tools/h5dump/h5dump.c1738
-rw-r--r--tools/h5dump/h5dump.h97
-rw-r--r--tools/h5dump/h5dump_ddl.c1603
-rw-r--r--tools/h5dump/h5dump_ddl.h31
-rw-r--r--tools/h5dump/h5dump_defines.h59
-rw-r--r--tools/h5dump/h5dump_extern.h95
-rw-r--r--tools/h5dump/h5dump_plugin.sh.in2
-rw-r--r--tools/h5dump/h5dump_xml.c3111
-rw-r--r--tools/h5dump/h5dump_xml.h20
-rw-r--r--tools/h5dump/h5dumpgentest.c6259
-rw-r--r--tools/h5dump/testh5dump.sh.in104
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in6
-rw-r--r--tools/h5dump/testh5dumpxml.sh.in2
-rw-r--r--tools/h5import/CMakeLists.txt70
-rw-r--r--tools/h5import/CMakeTests.cmake259
-rw-r--r--tools/h5import/Makefile.am11
-rw-r--r--tools/h5import/Makefile.in75
-rw-r--r--tools/h5import/h5import.c5323
-rw-r--r--tools/h5import/h5import.h198
-rw-r--r--tools/h5import/h5importtest.c518
-rw-r--r--tools/h5import/h5importtestutil.sh.in2
-rw-r--r--tools/h5jam/CMakeLists.txt137
-rw-r--r--tools/h5jam/CMakeTests.cmake80
-rw-r--r--tools/h5jam/Makefile.am9
-rw-r--r--tools/h5jam/Makefile.in34
-rw-r--r--tools/h5jam/getub.c75
-rw-r--r--tools/h5jam/h5jam.c439
-rw-r--r--tools/h5jam/h5jamgentest.c403
-rw-r--r--tools/h5jam/h5unjam.c224
-rw-r--r--tools/h5jam/tellub.c196
-rw-r--r--tools/h5jam/testh5jam.sh.in30
-rw-r--r--tools/h5ls/CMakeLists.txt102
-rw-r--r--tools/h5ls/CMakeTests.cmake198
-rw-r--r--tools/h5ls/Makefile.am10
-rw-r--r--tools/h5ls/Makefile.in38
-rw-r--r--tools/h5ls/dynlib_ls.c56
-rw-r--r--tools/h5ls/errfiles/nosuchfile.err1
-rw-r--r--tools/h5ls/errfiles/textlinksrc-nodangle-1.err2
-rw-r--r--tools/h5ls/errfiles/tgroup-1.err2
-rw-r--r--tools/h5ls/h5ls.c2784
-rw-r--r--tools/h5ls/h5ls_plugin.sh.in2
-rw-r--r--tools/h5ls/testh5ls.sh.in13
-rw-r--r--tools/h5repack/CMakeLists.txt194
-rw-r--r--tools/h5repack/CMakeTests.cmake647
-rw-r--r--tools/h5repack/CMakeVFDTests.cmake103
-rw-r--r--tools/h5repack/Makefile.am31
-rw-r--r--tools/h5repack/Makefile.in157
-rw-r--r--tools/h5repack/dynlib_rpk.c60
-rw-r--r--tools/h5repack/dynlib_vrpk.c75
-rw-r--r--tools/h5repack/h5repack.c586
-rw-r--r--tools/h5repack/h5repack.h172
-rw-r--r--tools/h5repack/h5repack.sh.in122
-rw-r--r--tools/h5repack/h5repack_copy.c1454
-rw-r--r--tools/h5repack/h5repack_filters.c385
-rw-r--r--tools/h5repack/h5repack_main.c471
-rw-r--r--tools/h5repack/h5repack_opttable.c136
-rw-r--r--tools/h5repack/h5repack_parse.c318
-rw-r--r--tools/h5repack/h5repack_plugin.sh.in2
-rw-r--r--tools/h5repack/h5repack_refs.c747
-rw-r--r--tools/h5repack/h5repack_verify.c409
-rw-r--r--tools/h5repack/h5repackgentest.c350
-rw-r--r--tools/h5repack/h5repacktst.c3941
-rw-r--r--tools/h5repack/testfiles/h5repack-help.txt19
-rw-r--r--tools/h5repack/testfiles/h5repack_f32le.h5bin0 -> 2336 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_f32le_ex-0.datbin0 -> 288 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_f32le_ex.h5bin0 -> 1464 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_1d.h5bin0 -> 2096 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_1d_ex-0.dat1
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_1d_ex-1.datbin0 -> 24 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_1d_ex.h5bin0 -> 1504 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_2d.h5bin0 -> 2304 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_2d_ex-0.datbin0 -> 256 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_2d_ex.h5bin0 -> 1472 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_3d.h5bin0 -> 4096 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_3d_ex-0.datbin0 -> 2048 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_int32le_3d_ex.h5bin0 -> 1472 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be.h5bin0 -> 2304 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be_ex-0.datbin0 -> 64 bytes
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be_ex-1.dat1
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be_ex-2.dat1
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be_ex-3.dat1
-rw-r--r--tools/h5repack/testfiles/h5repack_uint8be_ex.h5bin0 -> 1608 bytes
-rw-r--r--tools/h5repack/testh5repack_detect_szip.c15
-rw-r--r--tools/h5stat/CMakeLists.txt60
-rw-r--r--tools/h5stat/CMakeTests.cmake74
-rw-r--r--tools/h5stat/Makefile.am11
-rw-r--r--tools/h5stat/Makefile.in75
-rw-r--r--tools/h5stat/h5stat.c1421
-rw-r--r--tools/h5stat/h5stat_gentest.c357
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_dims.err (renamed from tools/h5stat/testfiles/h5stat_err1_dims.ddl)0
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_links.err (renamed from tools/h5stat/testfiles/h5stat_err1_links.ddl)0
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_numattrs.err (renamed from tools/h5stat/testfiles/h5stat_err2_numattrs.ddl)0
-rw-r--r--tools/h5stat/testfiles/h5stat_err2_numattrs.err (renamed from tools/h5stat/testfiles/h5stat_err1_numattrs.ddl)0
-rw-r--r--tools/h5stat/testfiles/h5stat_help1.ddl11
-rw-r--r--tools/h5stat/testfiles/h5stat_help2.ddl11
-rw-r--r--tools/h5stat/testfiles/h5stat_nofile.ddl12
-rw-r--r--tools/h5stat/testfiles/h5stat_nofile.err1
-rw-r--r--tools/h5stat/testfiles/h5stat_notexist.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_notexist.err1
-rw-r--r--tools/h5stat/testh5stat.sh.in35
-rw-r--r--tools/lib/CMakeLists.txt101
-rw-r--r--tools/lib/Makefile.am2
-rw-r--r--tools/lib/Makefile.in28
-rw-r--r--tools/lib/h5diff.c1446
-rw-r--r--tools/lib/h5diff.h181
-rw-r--r--tools/lib/h5diff_array.c3956
-rw-r--r--tools/lib/h5diff_attr.c664
-rw-r--r--tools/lib/h5diff_dset.c645
-rw-r--r--tools/lib/h5diff_util.c339
-rw-r--r--tools/lib/h5tools.c999
-rw-r--r--tools/lib/h5tools.h363
-rw-r--r--tools/lib/h5tools_dump.c3870
-rw-r--r--tools/lib/h5tools_dump.h96
-rw-r--r--tools/lib/h5tools_error.h237
-rw-r--r--tools/lib/h5tools_filters.c199
-rw-r--r--tools/lib/h5tools_ref.c79
-rw-r--r--tools/lib/h5tools_ref.h3
-rw-r--r--tools/lib/h5tools_str.c1138
-rw-r--r--tools/lib/h5tools_str.h49
-rw-r--r--tools/lib/h5tools_type.c14
-rw-r--r--tools/lib/h5tools_utils.c755
-rw-r--r--tools/lib/h5tools_utils.h115
-rw-r--r--tools/lib/h5trav.c622
-rw-r--r--tools/lib/h5trav.h99
-rw-r--r--tools/lib/io_timer.c136
-rw-r--r--tools/lib/io_timer.h50
-rw-r--r--tools/lib/ph5diff.h35
-rw-r--r--tools/libtest/CMakeLists.txt28
-rw-r--r--tools/libtest/CMakeTests.cmake49
-rw-r--r--tools/libtest/Makefile.am34
-rw-r--r--tools/libtest/Makefile.in1427
-rw-r--r--tools/libtest/h5tools_test_utils.c1291
-rw-r--r--tools/misc/CMakeLists.txt148
-rw-r--r--tools/misc/CMakeTests.cmake264
-rw-r--r--tools/misc/CMakeTestsMkgrp.cmake172
-rw-r--r--tools/misc/CMakeTestsRepart.cmake114
-rw-r--r--tools/misc/Makefile.am33
-rw-r--r--tools/misc/Makefile.in244
-rw-r--r--tools/misc/h5debug.c284
-rw-r--r--tools/misc/h5mkgrp.c129
-rw-r--r--tools/misc/h5repart.c670
-rw-r--r--tools/misc/h5repart_gentest.c73
-rw-r--r--tools/misc/repart_test.c49
-rw-r--r--tools/misc/talign.c142
-rw-r--r--tools/misc/testfiles/h5mkgrp_version.txt.in2
-rw-r--r--tools/misc/testh5mkgrp.sh.in2
-rw-r--r--tools/misc/testh5repart.sh.in2
-rw-r--r--tools/perform/CMakeLists.txt272
-rw-r--r--tools/perform/CMakeTests.cmake294
-rw-r--r--tools/perform/COPYING2
-rw-r--r--tools/perform/Makefile.am2
-rw-r--r--tools/perform/Makefile.in28
-rwxr-xr-xtools/perform/build_h5perf_alone.sh2
-rwxr-xr-xtools/perform/build_h5perf_serial_alone.sh2
-rw-r--r--tools/perform/chunk.c580
-rwxr-xr-xtools/perform/gen_report.pl2
-rw-r--r--tools/perform/iopipe.c365
-rw-r--r--tools/perform/overhead.c316
-rw-r--r--tools/perform/perf.c415
-rw-r--r--tools/perform/perf_meta.c632
-rw-r--r--tools/perform/pio_engine.c3757
-rw-r--r--tools/perform/pio_perf.c1399
-rw-r--r--tools/perform/pio_perf.h92
-rw-r--r--tools/perform/pio_standalone.c157
-rw-r--r--tools/perform/pio_standalone.h689
-rw-r--r--tools/perform/sio_engine.c1234
-rw-r--r--tools/perform/sio_perf.c1205
-rw-r--r--tools/perform/sio_perf.h80
-rw-r--r--tools/perform/sio_standalone.c184
-rw-r--r--tools/perform/sio_standalone.h718
-rw-r--r--tools/perform/zip_perf.c350
-rw-r--r--tools/testfiles/h5dump-help.txt12
-rw-r--r--tools/testfiles/help-1.ls11
-rw-r--r--tools/testfiles/help-2.ls11
-rw-r--r--tools/testfiles/help-3.ls11
-rw-r--r--tools/testfiles/non_existing.ddl1
-rw-r--r--tools/testfiles/nosuchfile.ls1
-rw-r--r--tools/testfiles/pbits/tnofilename-with-packed-bits.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsIncomplete.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLengthExceeded.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsLengthPositive.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsMaxExceeded.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetExceeded.ddl13
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetNegative.ddl13
-rw-r--r--tools/testfiles/tall-2.ls18
-rw-r--r--tools/testfiles/tarray1.ls2
-rw-r--r--tools/testfiles/tarray1_big.ddl2015
-rw-r--r--tools/testfiles/tattr2.ls342
-rw-r--r--tools/testfiles/tattrreg.ddl16
-rw-r--r--tools/testfiles/tattrregR.ddl64
-rw-r--r--tools/testfiles/tattrreg_be.ls33
-rw-r--r--tools/testfiles/tattrreg_le.ls33
-rw-r--r--tools/testfiles/tbinregR.ddl16
-rw-r--r--tools/testfiles/tbinregR.exp12
-rw-r--r--tools/testfiles/tcomp-1.ls82
-rw-r--r--tools/testfiles/tdatareg.ddl15
-rw-r--r--tools/testfiles/tdataregR.ddl64
-rw-r--r--tools/testfiles/tdset-1.ls178
-rw-r--r--tools/testfiles/tempty.ls10
-rw-r--r--tools/testfiles/texceedsubblock.ddl1
-rw-r--r--tools/testfiles/texceedsubcount.ddl1
-rw-r--r--tools/testfiles/texceedsubstart.ddl1
-rw-r--r--tools/testfiles/texceedsubstride.ddl1
-rw-r--r--tools/testfiles/textlinksrc-nodangle-1.ls13
-rw-r--r--tools/testfiles/tgroup-1.ls13
-rw-r--r--tools/testfiles/tgrpnullspace.ls1
-rw-r--r--tools/testfiles/tnestcomp-1.ls16
-rw-r--r--tools/testfiles/tnestcomp-3.ls40
-rw-r--r--tools/testfiles/treference.ddl288
-rw-r--r--tools/testfiles/tsaf.ls1129
-rw-r--r--tools/testfiles/tstr-1.ls538
-rw-r--r--tools/testfiles/tudfilter.ls27
-rw-r--r--tools/testfiles/tudlink-2.ddl1
-rw-r--r--tools/testfiles/tvldtypes1.ls8
1488 files changed, 341218 insertions, 317193 deletions
diff --git a/.autom4te.cfg b/.autom4te.cfg
index e7c2ec1..95af4d2 100644
--- a/.autom4te.cfg
+++ b/.autom4te.cfg
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..4779a35
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,65 @@
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AlignConsecutiveMacros: true
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+AlwaysBreakAfterReturnType: AllDefinitions
+BraceWrapping:
+ AfterFunction: true
+ BeforeCatch: true
+ BeforeElse: true
+BreakBeforeBraces: Stroustrup
+BreakAfterJavaFieldAnnotations: true
+BreakStringLiterals: true
+ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
+IncludeCategories:
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ Priority: 3
+ SortPriority: 0
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
+ Priority: 4
+ SortPriority: 0
+ - Regex: '.*'
+ Priority: 0
+ SortPriority: 0
+ - Regex: '^H5*.*'
+ Priority: 1
+ SortPriority: 0
+ - Regex: 'private.*'
+ Priority: 2
+ SortPriority: 0
+IncludeIsMainRegex: '(public)?$'
+IndentCaseLabels: true
+IndentGotoLabels: false
+IndentWidth: 4
+MacroBlockBegin: "^BEGIN_FUNC"
+MacroBlockEnd: "^END_FUNC"
+ObjCBlockIndentWidth: 4
+ReflowComments: true
+SortIncludes: false
+StatementMacros:
+ - FUNC_ENTER_API
+ - FUNC_LEAVE_API
+ - FUNC_ENTER_NOAPI_NOINIT_NOERR
+ - FUNC_LEAVE_NOAPI
+ - H5_BEGIN_TAG
+ - HGOTO_DONE_TAG
+ - H5_END_TAG
+ - HSYS_DONE_ERROR
+ - HSYS_GOTO_ERROR
+ - HDONE_ERROR
+ - HERROR
+ - H5_LEAVE
+ - H5E_PRINTF
+ - H5E_THROW
+ - HGOTO_DONE
+ - HGOTO_ERROR
+ - HMPI_ERROR
+ - HMPI_DONE_ERROR
+ - HMPI_GOTO_ERROR
+ - H5_GCC_DIAG_OFF
+ - H5_GCC_DIAG_ON
+ - CATCH
+...
+
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..7d7bcdd
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,40 @@
+# Lines starting with '#' are comments.
+# Each line is a file pattern followed by one or more owners.
+
+# These owners will be the default owners for everything in the repo.
+* @lrknox
+
+# Order is important. The last matching pattern has the most precedence.
+# So if a pull request only touches javascript files, only these owners
+# will be requested to review.
+*.cmake @byrnHDF @derobins
+CMakeLists.txt @byrnHDF @derobins
+CMakeTests.* @byrnHDF @derobins
+
+/bin/ @lrknox @derobins
+
+/c++/ @bmribler @byrnHDF
+
+/config/ @lrknox @derobins @byrnHDF
+
+/doc/ @gnuoyd @jrmainzer
+
+/examples/ @lrknox @derobins @bljhdf
+
+/fortran/ @brtnfld @epourmal
+
+/hl/ @bmribler @byrnHDF
+
+/m4/ @lrknox @derobins
+
+/release_docs/ @lrknox @bljhdf @byrnHDF
+
+/src/ @jhendersonHDF @derobins @fortnern @soumagne @vchoi-hdfgroup @jrmainzer
+
+/test/ @jhendersonHDF @derobins @fortnern @soumagne @vchoi-hdfgroup @jrmainzer
+
+/testpar/ @jhendersonHDF @rawarren @jrmainzer
+
+/tools/ @byrnHDF @bmribler
+
+/utils/ @lrknox @byrnHDF
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
new file mode 100644
index 0000000..6bf522c
--- /dev/null
+++ b/.github/workflows/clang-format-check.yml
@@ -0,0 +1,17 @@
+name: clang-format Check
+on: [workflow_dispatch, push, pull_request]
+jobs:
+ formatting-check:
+ name: Formatting Check
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+ steps:
+ - uses: actions/checkout@v2
+ - name: Run clang-format style check for C programs.
+ uses: DoozyX/clang-format-lint-action@v0.10
+ with:
+ source: '.'
+ extensions: 'c,h,cpp,hpp'
+ clangFormatVersion: 10
+ style: file
+ exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..c548000
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,139 @@
+name: hdf5 dev CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ workflow_dispatch:
+ push:
+ branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
+ paths-ignore:
+ - '.github/**'
+ - 'doc/**'
+ - 'release_docs/**'
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ strategy:
+# fail-fast: false
+ matrix:
+ name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
+ include:
+ - name: "Windows Latest MSVC"
+ artifact: "Windows-MSVC.tar.xz"
+ os: windows-latest
+ build_type: "Release"
+ toolchain: ""
+ fortran: OFF
+ generator: "-G \"Visual Studio 16 2019\" -A x64"
+ - name: "Ubuntu Latest GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "macOS Latest Clang"
+ artifact: "macOS.tar.xz"
+ os: macos-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/clang.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Debug GCC"
+ artifact: "LinuxDBG.tar.xz"
+ os: ubuntu-latest
+ build_type: "Debug"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Autotools GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: enable
+ fortran: enable
+ parallel: disable
+ toolchain: ""
+ generator: "autogen"
+# - name: "Ubuntu Parallel GCC"
+# artifact: "LinuxPar.tar.xz"
+# os: ubuntu-latest
+# build_type: "Release"
+# cpp: OFF
+# fortran: OFF
+# parallel: ON
+# toolchain: "config/toolchain/GCC.cmake"
+# generator: "-G Ninja"
+
+ name: ${{ matrix.name }}
+ # The type of runner that the job will run on
+ runs-on: ${{ matrix.os }}
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Install Dependencies (Linux)
+ run: sudo apt-get install ninja-build
+ if: matrix.os == 'ubuntu-latest'
+ - name: Install Autotools Dependencies (Linux)
+ run: sudo apt-get install automake autoconf libtool libtool-bin
+ if: matrix.generator == 'autogen'
+ - name: Install Dependencies (Windows)
+ run: choco install ninja
+ if: matrix.os == 'windows-latest'
+ - name: Install Dependencies (macOS)
+ run: brew install ninja
+ if: matrix.os == 'macos-latest'
+ - name: Set environment for MSVC (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ # Set these env vars so cmake picks the correct compiler
+ echo "CXX=cl.exe" >> $GITHUB_ENV
+ echo "CC=cl.exe" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v2
+
+ - name: Autotools Configure
+ if: matrix.generator == 'autogen'
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
+ shell: bash
+
+ - name: Configure
+ if: matrix.generator != 'autogen'
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
+ shell: bash
+
+ - name: Autotools Build
+ if: matrix.generator == 'autogen'
+ run: make
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Build
+ if: matrix.generator != 'autogen'
+ run: cmake --build . --config ${{ matrix.build_type }}
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Test
+ if: matrix.generator == 'autogen'
+ run: make check
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Test
+ if: matrix.generator != 'autogen'
+ run: ctest --build . -C ${{ matrix.build_type }} -V
+ working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
new file mode 100644
index 0000000..aac96dd
--- /dev/null
+++ b/.github/workflows/pr-check.yml
@@ -0,0 +1,133 @@
+name: hdf5 dev CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ pull_request:
+ branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ strategy:
+# fail-fast: false
+ matrix:
+ name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
+ include:
+ - name: "Windows Latest MSVC"
+ artifact: "Windows-MSVC.tar.xz"
+ os: windows-latest
+ build_type: "Release"
+ toolchain: ""
+ fortran: OFF
+ generator: "-G \"Visual Studio 16 2019\" -A x64"
+ - name: "Ubuntu Latest GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "macOS Latest Clang"
+ artifact: "macOS.tar.xz"
+ os: macos-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/clang.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Debug GCC"
+ artifact: "LinuxDBG.tar.xz"
+ os: ubuntu-latest
+ build_type: "Debug"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Autotools GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: enable
+ fortran: enable
+ parallel: disable
+ toolchain: ""
+ generator: "autogen"
+# - name: "Ubuntu Parallel GCC"
+# artifact: "LinuxPar.tar.xz"
+# os: ubuntu-latest
+# build_type: "Release"
+# cpp: OFF
+# fortran: OFF
+# parallel: ON
+# toolchain: "config/toolchain/GCC.cmake"
+# generator: "-G Ninja"
+
+ name: ${{ matrix.name }}
+ # The type of runner that the job will run on
+ runs-on: ${{ matrix.os }}
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Install Dependencies (Linux)
+ run: sudo apt-get install ninja-build
+ if: matrix.os == 'ubuntu-latest'
+ - name: Install Autotools Dependencies (Linux)
+ run: sudo apt-get install automake autoconf libtool libtool-bin
+ if: matrix.generator == 'autogen'
+ - name: Install Dependencies (Windows)
+ run: choco install ninja
+ if: matrix.os == 'windows-latest'
+ - name: Install Dependencies (macOS)
+ run: brew install ninja
+ if: matrix.os == 'macos-latest'
+ - name: Set environment for MSVC (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ # Set these env vars so cmake picks the correct compiler
+ echo "CXX=cl.exe" >> $GITHUB_ENV
+ echo "CC=cl.exe" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v2
+
+ - name: Autotools Configure
+ if: matrix.generator == 'autogen'
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
+ shell: bash
+
+ - name: Configure
+ if: matrix.generator != 'autogen'
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
+ shell: bash
+
+ - name: Autotools Build
+ if: matrix.generator == 'autogen'
+ run: make
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Build
+ if: matrix.generator != 'autogen'
+ run: cmake --build . --config ${{ matrix.build_type }}
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Test
+ if: matrix.generator == 'autogen'
+ run: make check
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Test
+ if: matrix.generator != 'autogen'
+ run: ctest --build . -C ${{ matrix.build_type }} -V
+ working-directory: ${{ runner.workspace }}/build
diff --git a/.h5chkright.ini b/.h5chkright.ini
index 1010dce..c9ca1c1 100644
--- a/.h5chkright.ini
+++ b/.h5chkright.ini
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 71dabb1..97d8be1 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -5,12 +5,15 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+option (USE_LIBAEC "Use AEC library as SZip Filter" OFF)
include (ExternalProject)
+include (FetchContent)
+
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
@@ -27,7 +30,18 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
+ if (NOT EXISTS "${ZLIB_URL}")
+ set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (STATUS "Filter ZLIB file ${ZLIB_URL} not found")
+ endif ()
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
+ if (USE_LIBAEC)
+ set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
+ endif ()
+ if (NOT EXISTS "${SZIP_URL}")
+ set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (STATUS "Filter SZIP file ${SZIP_URL} not found")
+ endif ()
else ()
set (ZLIB_USE_EXTERNAL 0)
set (SZIP_USE_EXTERNAL 0)
@@ -46,7 +60,6 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
find_package (ZLIB) # Legacy find
if (ZLIB_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES})
endif ()
endif ()
endif ()
@@ -77,9 +90,6 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
endif ()
- if (BUILD_SHARED_LIBS)
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
- endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
@@ -97,7 +107,6 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
endif ()
endif ()
endif ()
@@ -114,13 +123,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
+ if (USE_LIBAEC)
+ message (STATUS "... with library AEC")
+ set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
+ else ()
+ set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
+ endif ()
else ()
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif ()
endif ()
- if (BUILD_SHARED_LIBS)
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
- endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 5d3daff..1cce45e 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -23,16 +23,6 @@ if (WIN32)
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif ()
-#-----------------------------------------------------------------------------
-# Add file(s) to CMake Install
-#-----------------------------------------------------------------------------
-if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
- install (
- FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
- DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT headers
- )
-endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
@@ -43,7 +33,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF5_PACKAGE}::
+ NAMESPACE ${HDF_PACKAGE_NAMESPACE}
COMPONENT configinstall
)
endif ()
@@ -51,13 +41,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
- if (NOT HDF5_EXTERNALLY_CONFIGURED)
- export (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF5_PACKAGE}::
- )
- endif ()
+ export (
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF_PACKAGE_NAMESPACE}
+ )
endif ()
#-----------------------------------------------------------------------------
@@ -65,7 +53,7 @@ endif ()
#-----------------------------------------------------------------------------
set (HDF5_INCLUDES_BUILD_TIME
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
- ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
+ ${HDF5_TOOLS_SRC_DIR} ${HDF5_SRC_BINARY_DIR}
)
#-----------------------------------------------------------------------------
@@ -114,9 +102,10 @@ endif ()
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- configure_file (
- ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
- ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ write_basic_package_version_file (
+ "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake"
+ VERSION ${HDF5_PACKAGE_VERSION}
+ COMPATIBILITY SameMinorVersion
)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
@@ -135,10 +124,10 @@ else ()
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
- ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
+ ${HDF5_SRC_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
)
install (
- FILES ${HDF5_BINARY_DIR}/libhdf5.settings
+ FILES ${HDF5_SRC_BINARY_DIR}/libhdf5.settings
DESTINATION ${HDF5_INSTALL_LIB_DIR}
COMPONENT libraries
)
@@ -205,8 +194,7 @@ endif ()
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
- FILES
- ${HDF5_SOURCE_DIR}/COPYING
+ FILES ${HDF5_SOURCE_DIR}/COPYING
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
@@ -225,6 +213,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_PACK_INSTALL_DOCS)
set (release_files
${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Warnings.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL
@@ -256,19 +245,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif ()
endif ()
-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- if (CMAKE_HOST_UNIX)
- set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- else ()
- GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
- set (CMAKE_INSTALL_PREFIX
- "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- set (CMAKE_GENERIC_PROGRAM_FILES)
- endif ()
-endif ()
-
#-----------------------------------------------------------------------------
# Set the cpack variables
#-----------------------------------------------------------------------------
@@ -285,7 +261,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VERSION_PATCH "")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
- set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
+ set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif ()
set (CPACK_PACKAGE_RELOCATABLE TRUE)
@@ -479,6 +455,13 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
endif ()
endif ()
+ if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL)
+ if (WIN32)
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;ALL;/")
+ else ()
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${PLUGIN_BINARY_DIR};PLUGIN;libraries;/")
+ endif ()
+ endif ()
endif ()
endif ()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8fa2b6b..5715da6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,13 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5 C CXX)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5 C)
+
+if (POLICY CMP0074)
+ cmake_policy (SET CMP0074 NEW)
+endif ()
+
+if (POLICY CMP0083)
+ cmake_policy (SET CMP0083 NEW)
+endif ()
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
@@ -10,8 +18,8 @@ PROJECT (HDF5 C CXX)
# set CMAKE_INSTALL_PREFIX to the required install path.
# Make install can be used to install all components for system-wide use.
#
-if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
+ message (FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
"NEXT STEPS:\n"
@@ -28,6 +36,17 @@ if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
)
endif ()
+# CMake version 3.14 added option --ignore-eol to compare files
+# cmake -E compare_files --ignore-eol file1 file2
+set (CMAKE_IGNORE_EOL "--ignore-eol")
+if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set (CMAKE_IGNORE_EOL "")
+ if (WIN32)
+ message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
+ endif()
+else ()
+endif ()
+
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
#
@@ -46,6 +65,9 @@ endif ()
# dependencies of the HDF5 libs may be 'incomplete', add additional
# dependencies to this variable so that external projects pick them up
#
+#option (HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." "")
+set (HDF5_EXTERNAL_LIB_PREFIX "" CACHE STRING "Use prefix for custom library naming.")
+mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
# HDF5_EXTERNAL_LIB_PREFIX :
# If the parent project needs to install hdf libraries, but avoid
# name conflicts with system versions, then a prefix may be added
@@ -87,7 +109,7 @@ endif ()
# # Add the sub project
# add_subdirectory (Utilities/hdf5-1.8)
#-----------------------------------------------------------------------------
-string(TIMESTAMP CONFIG_DATE "%Y-%m-%d")
+string (TIMESTAMP CONFIG_DATE "%Y-%m-%d")
#-----------------------------------------------------------------------------
# Allow Visual Studio solution directories
@@ -193,7 +215,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
-string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*)\".*$"
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
@@ -266,15 +288,17 @@ set (HDF5_PACKAGE_NAME "HDF5")
set (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
set (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
set (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
-if (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
- set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
+if (H5_VERS_SUBRELEASE)
+ set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}.${H5_VERS_SUBRELEASE}")
+ set (HDF5_RELEASE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
else ()
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
+ set (HDF5_RELEASE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
endif ()
set (HDF5_LIB_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
+set (HDF5_LIB_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}")
set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
set (HDF5_TOOLS_PACKAGE_SOVERSION_MAJOR "${H5_TOOLS_SOVERS_MAJOR}")
-set (HDF5_LIB_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}")
set (HDF5_CXX_PACKAGE_SOVERSION "${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
set (HDF5_CXX_PACKAGE_SOVERSION_MAJOR "${H5_CXX_SOVERS_MAJOR}")
set (HDF5_F_PACKAGE_SOVERSION "${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
@@ -298,6 +322,7 @@ include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake)
HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
+include (${HDF_RESOURCES_DIR}/HDF5PluginMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
#-----------------------------------------------------------------------------
@@ -331,24 +356,48 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
# Mac OS X Options
#-----------------------------------------------------------------------------
if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
- set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
endif ()
#-----------------------------------------------------------------------------
# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
+option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
+set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
+option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
+mark_as_advanced (ONLY_SHARED_LIBS)
+
+if (BUILD_STATIC_LIBS)
+ set (H5_ENABLE_STATIC_LIB YES)
+endif ()
if (BUILD_SHARED_LIBS)
set (H5_ENABLE_SHARED_LIB YES)
endif ()
-set (H5_ENABLE_STATIC_LIB YES)
+
+# Force only shared libraries if all OFF
+if (NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+ set (ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE)
+endif ()
+
+if (ONLY_SHARED_LIBS)
+ set (H5_ENABLE_STATIC_LIB NO)
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
+endif ()
+
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+if (NOT BUILD_SHARED_LIBS)
+ set (tgt_file_ext "")
+else ()
+ set (tgt_file_ext "-shared")
+endif ()
+
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
-option (BUILD_STATIC_EXECS "Build Static Executabless" OFF)
+option (BUILD_STATIC_EXECS "Build Static Executables" OFF)
if (BUILD_STATIC_EXECS)
if (NOT WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
@@ -356,14 +405,34 @@ if (BUILD_STATIC_EXECS)
endif ()
endif ()
+if (HDF5_ENABLE_ANALYZER_TOOLS)
+ include (${HDF5_SOURCE_DIR}/config/sanitizer/tools.cmake)
+endif ()
+if (HDF5_ENABLE_SANITIZERS)
+ include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
+endif ()
+if (HDF5_ENABLE_FORMATTERS)
+ include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake)
+endif ()
+
#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
if (HDF5_ENABLE_COVERAGE)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
+ include (${HDF5_SOURCE_DIR}/config/sanitizer/code-coverage.cmake)
+ if(CODE_COVERAGE AND CODE_COVERAGE_ADDED)
+ add_code_coverage () # Adds instrumentation to all targets
+ else ()
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage -O0 -fprofile-arcs -ftest-coverage")
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
+ link_libraries (gcov)
+ else ()
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
+ endif ()
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -399,14 +468,15 @@ endif ()
# Certain systems may add /Debug or /Release to output paths
# and we need to call the executable from inside the CMake configuration
#-----------------------------------------------------------------------------
-set (EXE_EXT "")
if (WIN32)
- set (EXE_EXT ".exe")
- add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
- add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- add_definitions (-D_CONSOLE)
+ add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
+ if (MSVC)
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE)
+ endif ()
endif ()
+option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
+
if (MSVC)
set (CMAKE_MFC_FLAG 0)
set (WIN_COMPILE_FLAGS "")
@@ -432,22 +502,12 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF)
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
mark_as_advanced (HDF5_ENABLE_TRACE)
if (${HDF_CFG_NAME} MATCHES "Debug")
- add_definitions (-DDEBUG)
- # Enable tracing of the API
- if (HDF5_ENABLE_TRACE)
- add_definitions (-DH5_DEBUG_API )
- endif ()
# Enable instrumenting of the library's internal operations
option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)
if (HDF5_ENABLE_INSTRUMENT)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
endif ()
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
-else ()
- add_definitions (-DNDEBUG)
- if (HDF5_ENABLE_TRACE)
- add_definitions (-DH5_DEBUG_API )
- endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -463,16 +523,32 @@ else ()
endif ()
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
+set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
-# All libs/tests/examples need the main include directories
+# Option to Enable HDFS
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+option (HDF5_ENABLE_HDFS "Enable HDFS" OFF)
+if (HDF5_ENABLE_HDFS)
+ find_package(JNI REQUIRED)
+ if (JNI_FOUND)
+ set (H5_HAVE_LIBJVM 1)
+ endif ()
+ find_package(HDFS REQUIRED)
+ if (HDFS_FOUND)
+ set (H5_HAVE_LIBHDFS 1)
+ set (H5_HAVE_HDFS_H 1)
+ if (NOT MSVC)
+ list (APPEND LINK_LIBS -pthread)
+ endif ()
+ else ()
+ message (FATAL_ERROR "Set to use libhdfs library, but could not find or use libhdfs. Please verify that the path to HADOOP_HOME is valid, and/or reconfigure without HDF5_ENABLE_HDFS")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
-set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
find_package(MPI REQUIRED)
@@ -480,13 +556,13 @@ if (HDF5_ENABLE_PARALLEL)
set (H5_HAVE_PARALLEL 1)
# MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail
# and once set, they are cached as false and not regenerated
- set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}" )
+ set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}")
+ set (CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_DIRS}")
# Used by Fortran + MPI
- CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
- CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
- INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_DIRS})
+ CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
+ CHECK_SYMBOL_EXISTS (MPI_Info_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
else ()
- message (STATUS "Parallel libraries not found")
+ message (FATAL_ERROR "Parallel libraries not found")
endif ()
endif ()
@@ -498,15 +574,26 @@ if (H5_HAVE_PARALLEL)
endif ()
endif ()
-set (DEFAULT_API_VERSION "v18")
+#option (DEFAULT_API_VERSION "Enable v1.8 API (v16, v18)" "v18")
+set (DEFAULT_API_VERSION "v18" CACHE STRING "Enable v1.8 API (v16, v18)")
+set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18)
#-----------------------------------------------------------------------------
# Option to use 1.6.x API
#-----------------------------------------------------------------------------
-option (HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF)
set (H5_USE_16_API_DEFAULT 0)
-if (HDF5_USE_16_API_DEFAULT)
+if (DEFAULT_API_VERSION MATCHES "v16")
set (H5_USE_16_API_DEFAULT 1)
- set (DEFAULT_API_VERSION "v16")
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to use 1.8.x API
+#-----------------------------------------------------------------------------
+if (NOT DEFAULT_API_VERSION)
+ set (DEFAULT_API_VERSION "v18")
+endif ()
+set (H5_USE_18_API_DEFAULT 0)
+if (DEFAULT_API_VERSION MATCHES "v18")
+ set (H5_USE_18_API_DEFAULT 1)
endif ()
#-----------------------------------------------------------------------------
@@ -535,38 +622,41 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif ()
endif ()
endif ()
+
#-----------------------------------------------------------------------------
# Option to use threadsafe
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
- message (STATUS " **** thread-safety option not supported with static library **** ")
- message (STATUS " **** thread-safety option will not be used building static library **** ")
+ if (WIN32)
+ message (STATUS " **** thread-safety option not supported with static library **** ")
+ message (STATUS " **** thread-safety option will not be used building static library **** ")
+ endif ()
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_CPP_LIB)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_HL_LIB)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** HL and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
endif ()
@@ -579,10 +669,10 @@ if (HDF5_ENABLE_THREADSAFE)
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
endif ()
endif ()
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_package(Threads)
- if (NOT Threads_FOUND)
- message (STATUS " **** thread-safe package not found - threads still might work **** ")
+ set (THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package (Threads REQUIRED)
+ if (Threads_FOUND)
+ set (H5_HAVE_THREADSAFE 1)
endif ()
endif ()
@@ -593,13 +683,17 @@ add_subdirectory (src)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- add_dependencies (${HDF5_LIB_TARGET} ZLIB)
+ if (NOT ONLY_SHARED_LIBS)
+ add_dependencies (${HDF5_LIB_TARGET} ZLIB)
+ endif ()
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF5_LIBSH_TARGET} ZLIB)
endif ()
endif ()
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- add_dependencies (${HDF5_LIB_TARGET} SZIP)
+ if (NOT ONLY_SHARED_LIBS)
+ add_dependencies (${HDF5_LIB_TARGET} SZIP)
+ endif ()
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF5_LIBSH_TARGET} SZIP)
endif ()
@@ -612,10 +706,15 @@ endif ()
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
if (BUILD_TESTING)
set (DART_TESTING_TIMEOUT 1200
- CACHE INTEGER
+ CACHE STRING
"Timeout in seconds for each test (default 1200=20minutes)"
)
+ # Generate a list of timeouts based on DART_TESTING_TIMEOUT
+ math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2")
+ math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
+ math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
+
option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
mark_as_advanced (HDF5_TEST_VFD)
if (HDF5_TEST_VFD)
@@ -626,15 +725,30 @@ if (BUILD_TESTING)
option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
mark_as_advanced (HDF_TEST_EXPRESS)
- option (TEST_SHARED_PROGRAMS "Enable testing of Shared programs" OFF)
- mark_as_advanced (TEST_SHARED_PROGRAMS)
-
enable_testing ()
include (CTest)
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+ option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_SERIAL)
+
+ option (HDF5_TEST_TOOLS "Execute tools tests" ON)
+ mark_as_advanced (HDF5_TEST_TOOLS)
+
+ option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
+ mark_as_advanced (HDF5_TEST_EXAMPLES)
+
+ option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_PARALLEL)
+
+ option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
+ mark_as_advanced (HDF5_TEST_FORTRAN)
+
+ option (HDF5_TEST_CPP "Execute cpp tests" ON)
+ mark_as_advanced (HDF5_TEST_CPP)
+
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (test)
@@ -658,6 +772,21 @@ if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools
endif ()
#-----------------------------------------------------------------------------
+# Include filter plugins
+#-----------------------------------------------------------------------------
+include (CMakePlugins.cmake)
+
+if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES)
+ if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND)
+ PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
+# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON)
+# mark_as_advanced (HDF5_TEST_PLUGIN)
+
+# TEST_PLUGIN_LIBRARY ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Option to build examples
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
@@ -692,38 +821,56 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
if (HDF5_BUILD_FORTRAN)
if (BUILD_SHARED_LIBS AND APPLE)
if (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
+ message (STATUS " **** Shared FORTRAN libraries are unsupported, override with ALLOW_UNSUPPORTED option **** ")
set (SKIP_HDF5_FORTRAN_SHARED ON)
else ()
message (STATUS " **** Allowing unsupported Fortran shared libraries **** ")
endif ()
endif ()
- option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
-
- include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
-
- set (LINK_Fortran_LIBS ${LINK_LIBS})
-
- if (HDF5_ENABLE_F2003)
- if (NOT FORTRAN_HAVE_ISO_C_BINDING)
- set (HDF5_ENABLE_F2003 OFF)
- endif ()
- endif ()
-
- # Parallel IO usage requires MPI to be Linked and Included
- if (H5_HAVE_PARALLEL)
- set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES})
- if (MPI_Fortran_LINK_FLAGS)
- set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
- endif ()
- endif ()
-
- add_subdirectory (fortran)
- if (HDF5_BUILD_HL_LIB)
- if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
- #-- Build the High Level Fortran source codes
- add_subdirectory (hl/fortran)
- endif ()
+ if (ONLY_SHARED_LIBS AND SKIP_HDF5_FORTRAN_SHARED)
+ set (HDF5_BUILD_FORTRAN OFF FORCE)
+ else ()
+ option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
+
+ include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
+
+ message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
+ include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
+ include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
+ set (LINK_Fortran_LIBS ${LINK_LIBS})
+
+ if (HDF5_ENABLE_F2003)
+ if (NOT H5_FORTRAN_HAVE_ISO_C_BINDING)
+ set (HDF5_ENABLE_F2003 OFF)
+ endif ()
+ endif ()
+
+ # Parallel IO usage requires MPI to be Linked and Included
+ if (H5_HAVE_PARALLEL)
+ set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES})
+ if (MPI_Fortran_LINK_FLAGS)
+ set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
+ endif ()
+ endif ()
+
+ #option (HDF5_INSTALL_MOD_FORTRAN "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" "NO")
+ set (HDF5_INSTALL_MOD_FORTRAN "SHARED" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)")
+ set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC)
+ if (NOT HDF5_INSTALL_MOD_FORTRAN MATCHES "NO")
+ if (NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
+ set (HDF5_INSTALL_MOD_FORTRAN "STATIC")
+ elseif (BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
+ set (HDF5_INSTALL_MOD_FORTRAN "SHARED")
+ endif ()
+ endif ()
+
+ add_subdirectory (fortran)
+ if (HDF5_BUILD_HL_LIB)
+ if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ #-- Build the High Level Fortran source codes
+ add_subdirectory (hl/fortran)
+ endif ()
+ endif ()
endif ()
endif ()
endif ()
@@ -737,11 +884,15 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
endif ()
endif ()
+
+ include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake)
+ include (${HDF_RESOURCES_DIR}/HDFCXXCompilerFlags.cmake)
+
if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)
endif ()
@@ -760,7 +911,7 @@ endif ()
# being built then configure should fail due to bug HDFFV-889.
#-----------------------------------------------------------------------------
if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB)
- if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+ if (NOT H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ")
endif ()
endif ()
@@ -768,6 +919,12 @@ endif ()
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
+configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY)
+
+#-----------------------------------------------------------------------------
+# Options for use by cross compiling and toolchains
+#-----------------------------------------------------------------------------
+option (HDF5_USE_PREGEN "Use pre-generated Files" OFF)
+option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF)
include (CMakeInstallation.cmake)
diff --git a/CMakePlugins.cmake b/CMakePlugins.cmake
new file mode 100644
index 0000000..16fb874
--- /dev/null
+++ b/CMakePlugins.cmake
@@ -0,0 +1,56 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+include (ExternalProject)
+#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
+set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
+if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
+ set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
+ elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT TGZPATH)
+ set (TGZPATH ${HDF5_SOURCE_DIR})
+ endif ()
+ set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
+ if (NOT EXISTS "${PLUGIN_URL}")
+ set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
+ endif ()
+ else ()
+ set (PLUGIN_USE_EXTERNAL 0)
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option for PLUGIN support
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
+if (HDF5_ENABLE_PLUGIN_SUPPORT)
+ if (NOT PLUGIN_USE_EXTERNAL)
+ find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ if (NOT PLUGIN_FOUND)
+ find_package (PLUGIN) # Legacy find
+ endif ()
+ endif ()
+ if (NOT PLUGIN_FOUND)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ EXTERNAL_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
+ message (STATUS "Filter PLUGIN is built")
+ else ()
+ message (FATAL_ERROR " PLUGIN is Required for PLUGIN support in HDF5")
+ endif ()
+ endif ()
+ message (STATUS "Filter PLUGIN is ON")
+endif ()
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 5880d83..f302097 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -19,25 +19,34 @@ set (CTEST_PROJECT_NAME "HDF5")
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
set (CTEST_DROP_METHOD "http")
-if (CDASH_LOCAL)
- set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
- set (CTEST_DROP_LOCATION "/submit.php?project=HDF5.1.8")
+if (CTEST_DROP_SITE_INIT)
+ set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}")
else ()
- set (CTEST_DROP_SITE "cdash.hdfgroup.org")
- set (CTEST_DROP_LOCATION "/submit.php?project=HDF518")
+ if (CDASH_LOCAL)
+ set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
+ else ()
+ set (CTEST_DROP_SITE "cdash.hdfgroup.org")
+ endif ()
+endif ()
+if (CTEST_DROP_LOCATION_INIT)
+ set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}")
+else ()
+ if (CDASH_LOCAL)
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF5.1.8")
+ else ()
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF5")
+ endif ()
endif ()
set (CTEST_DROP_SITE_CDASH TRUE)
set (UPDATE_TYPE git)
set (VALGRIND_COMMAND "/usr/bin/valgrind")
set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
-set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
-set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)
-SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
+set (CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
"How long to wait between timed-out CTest submissions.")
diff --git a/MANIFEST b/MANIFEST
index 23e5242..1abe835 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -31,14 +31,21 @@
./m4/ltversion.m4 _DO_NOT_DISTRIBUTE_
./m4/lt~obsolete.m4 _DO_NOT_DISTRIBUTE_
./m4/ltoptions.m4 _DO_NOT_DISTRIBUTE_
-./m4/aclocal_cxx.m4
-./m4/aclocal_fc.m4
+./m4/aclocal_cxx.m4 _DO_NOT_DISTRIBUTE_
+./m4/aclocal_fc.m4 _DO_NOT_DISTRIBUTE_
+./m4/aclocal_fc.f90
./README.txt
./aclocal.m4
./acsite.m4
./configure
./configure.ac
+./.clang-format
+./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_
+./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_
+./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_
+./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_
+
./bin/COPYING
./bin/bbrelease _DO_NOT_DISTRIBUTE_
./bin/buildhdf5
@@ -58,8 +65,12 @@
./bin/deploy
./bin/distdep
./bin/errors _DO_NOT_DISTRIBUTE_
+./bin/format_source
+./bin/format_source_patch
./bin/gcov_script _DO_NOT_DISTRIBUTE_
-./bin/genltanalyze _DO_NOT_DISTRIBUTE_
+./bin/genparser _DO_NOT_DISTRIBUTE_
+./bin/h5cc.in
+./bin/h5redeploy.in
./bin/h5vers
./bin/install-sh
./bin/iostats
@@ -68,6 +79,8 @@
./bin/make_err
./bin/make_overflow
./bin/make_vers
+./bin/Makefile.am
+./bin/Makefile.in
./bin/makehelp
./bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec
./bin/pkgscrpts/make1816TarFiles.pl _DO_NOT_DISTRIBUTE_
@@ -84,11 +97,23 @@
./bin/runtest _DO_NOT_DISTRIBUTE_
./bin/snapshot
./bin/snapshot_version _DO_NOT_DISTRIBUTE_
+./bin/switch_maint_mode _DO_NOT_DISTRIBUTE_
./bin/test-driver
./bin/pkgscrpts/testbinaries.sh _DO_NOT_DISTRIBUTE_
./bin/timekeeper _DO_NOT_DISTRIBUTE_
./bin/trace
./bin/yodconfigure
+./bin/batch/ctestP.lsf.in.cmake
+./bin/batch/ctestP.sl.in.cmake
+./bin/batch/ctestS.lsf.in.cmake
+./bin/batch/ctestS.sl.in.cmake
+./bin/batch/knl_ctestP.sl.in.cmake
+./bin/batch/knl_ctestS.sl.in.cmake
+./bin/batch/knl_H5detect.sl.in.cmake
+./bin/batch/ctest.qsub.in.cmake
+./bin/batch/ray_ctestP.lsf.in.cmake
+./bin/batch/ray_ctestS.lsf.in.cmake
+./bin/batch/raybsub
./config/COPYING
./config/BlankForm
@@ -97,25 +122,67 @@
./config/cce-flags
./config/commence.am
./config/conclude.am
-./config/cygwin
./config/examples.am
./config/freebsd
+./config/gnu-cxxflags
./config/gnu-fflags
./config/gnu-flags
+./config/cygwin
./config/ibm-aix
./config/ibm-flags
./config/intel-fflags
./config/intel-flags
./config/linux-gnu
./config/linux-gnuaout
+./config/linux-gnueabihf
./config/linux-gnulibc1
./config/linux-gnulibc2
./config/lt_vers.am
./config/Makefile.am.blank
+./config/netbsd
./config/pgi-fflags
./config/pgi-flags
./config/solaris
+#warnings files for both autotools and CMake
+./config/clang-cxxflags
+./config/clang-flags
+./config/clang-warnings/developer-general
+./config/clang-warnings/error-general
+./config/clang-warnings/general
+./config/clang-warnings/no-developer-general
+./config/gnu-warnings/4.8-4.last
+./config/gnu-warnings/4.8
+./config/gnu-warnings/4.9
+./config/gnu-warnings/5
+./config/gnu-warnings/6
+./config/gnu-warnings/7
+./config/gnu-warnings/8
+./config/gnu-warnings/9
+./config/gnu-warnings/cxx-general
+./config/gnu-warnings/cxx-4.9
+./config/gnu-warnings/cxx-5
+./config/gnu-warnings/cxx-error-5
+./config/gnu-warnings/cxx-error-general
+./config/gnu-warnings/developer-4.8
+./config/gnu-warnings/developer-7
+./config/gnu-warnings/developer-8
+./config/gnu-warnings/developer-general
+./config/gnu-warnings/error-5
+./config/gnu-warnings/error-8
+./config/gnu-warnings/error-general
+./config/gnu-warnings/general
+./config/gnu-warnings/gfort-general
+./config/gnu-warnings/gfort-4.8
+./config/gnu-warnings/gfort-5
+./config/gnu-warnings/gfort-6
+./config/gnu-warnings/gfort-8
+./config/gnu-warnings/no-developer-4.8
+./config/gnu-warnings/no-developer-8
+./config/gnu-warnings/no-developer-general
+./config/intel-warnings/ifort-general
+./config/intel-warnings/general
+
./config/site-specific/BlankForm
./examples/Attributes.txt
@@ -460,7 +527,10 @@
./release_docs/INSTALL_CMake.txt
./release_docs/INSTALL_Cygwin.txt
./release_docs/INSTALL_parallel
+./release_docs/INSTALL_Warnings.txt
./release_docs/INSTALL_Windows.txt
+./release_docs/README_HDF5_CMake
+./release_docs/README_HPC
./release_docs/RELEASE.txt
./release_docs/USING_HDF5_CMake.txt
./release_docs/USING_HDF5_VS.txt
@@ -577,6 +647,8 @@
./src/H5FDdirect.h
./src/H5FDfamily.c
./src/H5FDfamily.h
+./src/H5FDhdfs.c
+./src/H5FDhdfs.h
./src/H5FDint.c
./src/H5FDlog.c
./src/H5FDlog.h
@@ -586,9 +658,13 @@
./src/H5FDmpio.h
./src/H5FDmulti.c
./src/H5FDmulti.h
+./src/H5FDros3.c
+./src/H5FDros3.h
./src/H5FDpkg.h
./src/H5FDprivate.h
./src/H5FDpublic.h
+./src/H5FDs3comms.h
+./src/H5FDs3comms.c
./src/H5FDsec2.c
./src/H5FDsec2.h
./src/H5FDspace.c
@@ -916,6 +992,7 @@
./test/group_old.h5
./test/h5test.c
./test/h5test.h
+./test/hdfs.c
./test/hyperslab.c
./test/istore.c
./test/le_data.h5
@@ -935,7 +1012,9 @@
./test/objcopy.c
./test/plugin.c
./test/reserved.c
+./test/ros3.c
./test/pool.c
+./test/s3comms.c
./test/set_extent.c
# ====distribute this for now. See HDFFV-8236====
./test/space_overflow.c
@@ -984,6 +1063,7 @@
./test/ttsafe.c
./test/ttsafe.h
./test/ttsafe_acreate.c
+./test/ttsafe_attr_vlen.c
./test/ttsafe_cancel.c
./test/ttsafe_dcreate.c
./test/ttsafe_error.c
@@ -1025,6 +1105,7 @@
./testpar/t_span_tree.c
./testpar/t_init_term.c
./testpar/testpar.h
+./testpar/testpflush.sh.in
./testpar/testphdf5.c
./testpar/testphdf5.h
@@ -1133,6 +1214,7 @@
./tools/h5repack/dynlib_vrpk.c
./tools/h5repack/h5repack.sh.in
./tools/h5repack/h5repack_plugin.sh.in
+./tools/h5repack/h5repackgentest.c
./tools/h5repack/h5repacktst.c
./tools/h5repack/testh5repack_detect_szip.c
@@ -1144,6 +1226,11 @@
./tools/h5ls/h5ls_plugin.sh.in
./tools/h5ls/testh5ls.sh.in
+# h5ls test error files
+./tools/h5ls/errfiles/nosuchfile.err
+./tools/h5ls/errfiles/textlinksrc-nodangle-1.err
+./tools/h5ls/errfiles/tgroup-1.err
+
# h5copy sources
./tools/h5copy/Makefile.am
./tools/h5copy/Makefile.in
@@ -1180,12 +1267,14 @@
./tools/lib/io_timer.c
./tools/lib/io_timer.h
+./tools/libtest/Makefile.am
+./tools/libtest/Makefile.in
+./tools/libtest/h5tools_test_utils.c
+
./tools/misc/Makefile.am
./tools/misc/Makefile.in
-./tools/misc/h5cc.in
./tools/misc/h5debug.c
./tools/misc/h5mkgrp.c
-./tools/misc/h5redeploy.in
./tools/misc/h5repart.c
./tools/misc/h5repart_gentest.c
./tools/misc/repart_test.c
@@ -1205,10 +1294,10 @@
./tools/h5stat/testh5stat.sh.in
./tools/h5stat/testfiles/h5stat_dims1.ddl
./tools/h5stat/testfiles/h5stat_dims2.ddl
-./tools/h5stat/testfiles/h5stat_err1_dims.ddl
-./tools/h5stat/testfiles/h5stat_err1_links.ddl
-./tools/h5stat/testfiles/h5stat_err1_numattrs.ddl
-./tools/h5stat/testfiles/h5stat_err2_numattrs.ddl
+./tools/h5stat/testfiles/h5stat_err1_dims.err
+./tools/h5stat/testfiles/h5stat_err1_links.err
+./tools/h5stat/testfiles/h5stat_err1_numattrs.err
+./tools/h5stat/testfiles/h5stat_err2_numattrs.err
./tools/h5stat/testfiles/h5stat_filters.ddl
./tools/h5stat/testfiles/h5stat_filters-d.ddl
./tools/h5stat/testfiles/h5stat_filters-dT.ddl
@@ -1238,6 +1327,8 @@
./tools/h5stat/testfiles/h5stat_threshold.h5
./tools/h5stat/testfiles/h5stat_tsohm.ddl
./tools/h5stat/testfiles/h5stat_tsohm.h5
+./tools/h5stat/testfiles/h5stat_notexist.err
+./tools/h5stat/testfiles/h5stat_nofile.err
# h5dump test files
./tools/testfiles/charsets.h5
@@ -1544,11 +1635,8 @@
./tools/h5dump/errfiles/tall-2A.err
./tools/h5dump/errfiles/tall-2A0.err
./tools/h5dump/errfiles/tall-2B.err
-./tools/h5dump/errfiles/tarray1_big.err
./tools/h5dump/errfiles/tattr-3.err
-./tools/h5dump/errfiles/tattrregR.err
./tools/h5dump/errfiles/tcomp-3.err
-./tools/h5dump/errfiles/tdataregR.err
./tools/h5dump/errfiles/tdset-2.err
./tools/h5dump/errfiles/texceedsubblock.err
./tools/h5dump/errfiles/texceedsubcount.err
@@ -1806,6 +1894,7 @@
./tools/h5diff/testfiles/h5diff_172.txt
./tools/h5diff/testfiles/h5diff_18.txt
./tools/h5diff/testfiles/h5diff_18_1.txt
+./tools/h5diff/testfiles/h5diff_19.txt
./tools/h5diff/testfiles/h5diff_20.txt
./tools/h5diff/testfiles/h5diff_21.txt
./tools/h5diff/testfiles/h5diff_22.txt
@@ -1833,7 +1922,6 @@
./tools/h5diff/testfiles/h5diff_600.txt
./tools/h5diff/testfiles/h5diff_601.txt
./tools/h5diff/testfiles/h5diff_601_ERR.err
-./tools/h5diff/testfiles/h5diff_601_ERR.txt
./tools/h5diff/testfiles/h5diff_603.txt
./tools/h5diff/testfiles/h5diff_604.txt
./tools/h5diff/testfiles/h5diff_605.txt
@@ -1940,21 +2028,12 @@
./tools/h5diff/testfiles/h5diff_452.txt
./tools/h5diff/testfiles/h5diff_453.txt
./tools/h5diff/testfiles/h5diff_454.txt
-./tools/h5diff/testfiles/h5diff_454_ERR.err
-./tools/h5diff/testfiles/h5diff_454_ERR.txt
+./tools/h5diff/testfiles/dangling_link.err
./tools/h5diff/testfiles/h5diff_455.txt
-./tools/h5diff/testfiles/h5diff_455_ERR.err
-./tools/h5diff/testfiles/h5diff_455_ERR.txt
./tools/h5diff/testfiles/h5diff_456.txt
./tools/h5diff/testfiles/h5diff_457.txt
-./tools/h5diff/testfiles/h5diff_457_ERR.err
-./tools/h5diff/testfiles/h5diff_457_ERR.txt
./tools/h5diff/testfiles/h5diff_458.txt
-./tools/h5diff/testfiles/h5diff_458_ERR.err
-./tools/h5diff/testfiles/h5diff_458_ERR.txt
./tools/h5diff/testfiles/h5diff_459.txt
-./tools/h5diff/testfiles/h5diff_459_ERR.err
-./tools/h5diff/testfiles/h5diff_459_ERR.txt
./tools/h5diff/testfiles/h5diff_465.txt
./tools/h5diff/testfiles/h5diff_466.txt
./tools/h5diff/testfiles/h5diff_467.txt
@@ -2044,6 +2123,7 @@
./tools/h5diff/testfiles/tudfilter.h5
./tools/h5diff/testfiles/tudfilter2.h5
./tools/h5diff/testfiles/h5diff_ud.txt
+./tools/h5diff/testfiles/h5diff_udfail.err
./tools/h5diff/testfiles/h5diff_udfail.txt
./tools/h5diff/testfiles/diff_strings1.h5
./tools/h5diff/testfiles/diff_strings2.h5
@@ -2057,10 +2137,23 @@
./tools/h5repack/testfiles/h5repack_early.h5
./tools/h5repack/testfiles/h5repack_ext.bin
./tools/h5repack/testfiles/h5repack_ext.h5
+./tools/h5repack/testfiles/h5repack_f32le.h5
+./tools/h5repack/testfiles/h5repack_f32le_ex-0.dat
+./tools/h5repack/testfiles/h5repack_f32le_ex.h5
./tools/h5repack/testfiles/h5repack_fill.h5
./tools/h5repack/testfiles/h5repack_filters.h5
./tools/h5repack/testfiles/h5repack_fletcher.h5
./tools/h5repack/testfiles/h5repack_hlink.h5
+./tools/h5repack/testfiles/h5repack_int32le_1d.h5
+./tools/h5repack/testfiles/h5repack_int32le_1d_ex-0.dat
+./tools/h5repack/testfiles/h5repack_int32le_1d_ex-1.dat
+./tools/h5repack/testfiles/h5repack_int32le_1d_ex.h5
+./tools/h5repack/testfiles/h5repack_int32le_2d.h5
+./tools/h5repack/testfiles/h5repack_int32le_2d_ex-0.dat
+./tools/h5repack/testfiles/h5repack_int32le_2d_ex.h5
+./tools/h5repack/testfiles/h5repack_int32le_3d.h5
+./tools/h5repack/testfiles/h5repack_int32le_3d_ex-0.dat
+./tools/h5repack/testfiles/h5repack_int32le_3d_ex.h5
./tools/h5repack/testfiles/h5repack.info
./tools/h5repack/testfiles/h5repack_layout.h5
./tools/h5repack/testfiles/h5repack_layouto.h5
@@ -2077,6 +2170,12 @@
./tools/h5repack/testfiles/h5repack_shuffle.h5
./tools/h5repack/testfiles/h5repack_soffset.h5
./tools/h5repack/testfiles/h5repack_szip.h5
+./tools/h5repack/testfiles/h5repack_uint8be.h5
+./tools/h5repack/testfiles/h5repack_uint8be_ex-0.dat
+./tools/h5repack/testfiles/h5repack_uint8be_ex-1.dat
+./tools/h5repack/testfiles/h5repack_uint8be_ex-2.dat
+./tools/h5repack/testfiles/h5repack_uint8be_ex-3.dat
+./tools/h5repack/testfiles/h5repack_uint8be_ex.h5
./tools/h5repack/testfiles/ublock.bin
./tools/h5repack/testfiles/crtorder.tordergr.h5.ddl
./tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
@@ -2123,6 +2222,7 @@
./tools/h5copy/testfiles/h5copy_extlinks_src.h5
./tools/h5copy/testfiles/h5copy_extlinks_trg.h5
./tools/h5copy/testfiles/h5copy_extlinks_src.out.ls
+./tools/h5copy/testfiles/h5copy_misc1.err
./tools/h5copy/testfiles/h5copy_misc1.out
./tools/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt
./tools/h5copy/testfiles/h5copy_plugin_test.out.h5.txt
@@ -2274,7 +2374,7 @@
./hl/tools/gif2h5/writehdf.c
./hl/tools/gif2h5/h52gifgentst.c
./hl/tools/gif2h5/h52giftest.sh.in
-./hl/tools/gif2h5/testfiles/REAMDE
+./hl/tools/gif2h5/testfiles/README
./hl/tools/gif2h5/testfiles/ex_image2.h5
./hl/tools/gif2h5/testfiles/image1.gif
./hl/tools/gif2h5/testfiles/h52giftst.h5
@@ -2326,17 +2426,32 @@
./hl/c++/test/Makefile.in
# CMake-specific Files
+./config/toolchain/build32.cmake
+./config/toolchain/clang.cmake
+./config/toolchain/crayle.cmake
+./config/toolchain/GCC.cmake
+./config/toolchain/intel.cmake
+./config/toolchain/mingw64.cmake
+./config/toolchain/PGI.cmake
+
./config/cmake/cacheinit.cmake
./config/cmake/ConversionTests.c
./config/cmake/ConfigureChecks.cmake
./config/cmake/CPack.Info.plist.in
./config/cmake/CTestCustom.cmake
+./config/cmake/fileCompareTest.cmake
+./config/cmake/FindHDFS.cmake
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
./config/cmake/hdf5-config.cmake.in
./config/cmake/hdf5-config-version.cmake.in
./config/cmake/HDFCompilerFlags.cmake
+./config/cmake/HDFCXXCompilerFlags.cmake
+./config/cmake/HDFFortranCompilerFlags.cmake
./config/cmake/HDF5Macros.cmake
+./config/cmake/HDF5PluginMacros.cmake
+./config/cmake/HDF5PluginCache.cmake
+./config/cmake/HDF5UseFortran.cmake
./config/cmake/libh5cc.in
./config/cmake/libhdf5.pc.in
./config/cmake/libhdf5.settings.cmake.in
@@ -2346,6 +2461,7 @@
./config/cmake/README.txt.cmake.in
./config/cmake/userblockTest.cmake
./config/cmake/vfdTest.cmake
+./config/cmake/wait_H5Tinit.cmake
./config/cmake_ext_mod/ConfigureChecks.cmake
./config/cmake_ext_mod/CTestCustom.cmake
@@ -2359,6 +2475,7 @@
./config/cmake_ext_mod/HDFLibMacros.cmake
./config/cmake_ext_mod/HDFMacros.cmake
./config/cmake_ext_mod/HDFTests.c
+./config/cmake_ext_mod/HDFUseCXX.cmake
./config/cmake_ext_mod/HDFUseFortran.cmake
./config/cmake_ext_mod/NSIS.InstallOptions.ini.in
./config/cmake_ext_mod/NSIS.template.in
@@ -2375,6 +2492,7 @@
./CMakeLists.txt
./CMakeFilters.cmake
./CMakeInstallation.cmake
+./CMakePlugins.cmake
./CTestConfig.cmake
./UserMacros.cmake
./c++/CMakeLists.txt
@@ -2383,6 +2501,7 @@
./c++/src/CMakeLists.txt
./c++/test/CMakeLists.txt
./c++/test/CMakeTests.cmake
+./c++/test/CMakeVFDTests.cmake
./examples/CMakeLists.txt
./examples/CMakeTests.cmake
./examples/run-all-ex.sh
@@ -2419,8 +2538,10 @@
./src/CMakeLists.txt
./test/CMakeLists.txt
./test/CMakeTests.cmake
+./test/CMakeVFDTests.cmake
./testpar/CMakeLists.txt
./testpar/CMakeTests.cmake
+./testpar/CMakeVFDTests.cmake
./tools/CMakeLists.txt
./tools/h5copy/CMakeLists.txt
./tools/h5copy/CMakeTests.cmake
@@ -2430,6 +2551,7 @@
./tools/h5dump/CMakeTests.cmake
./tools/h5dump/CMakeTestsPBITS.cmake
./tools/h5dump/CMakeTestsXML.cmake
+./tools/h5dump/CMakeVFDTests.cmake
./tools/h5import/CMakeLists.txt
./tools/h5import/CMakeTests.cmake
./tools/h5jam/CMakeLists.txt
@@ -2438,11 +2560,15 @@
./tools/h5ls/CMakeTests.cmake
./tools/h5repack/CMakeLists.txt
./tools/h5repack/CMakeTests.cmake
+./tools/h5repack/CMakeVFDTests.cmake
./tools/h5stat/CMakeLists.txt
./tools/h5stat/CMakeTests.cmake
./tools/lib/CMakeLists.txt
+./tools/libtest/CMakeLists.txt
+./tools/libtest/CMakeTests.cmake
./tools/misc/CMakeLists.txt
-./tools/misc/CMakeTests.cmake
+./tools/misc/CMakeTestsMkgrp.cmake
+./tools/misc/CMakeTestsRepart.cmake
./tools/perform/CMakeLists.txt
./tools/perform/CMakeTests.cmake
@@ -2452,3 +2578,17 @@
./config/cmake/scripts/CTestScript.cmake
./config/cmake/scripts/HDF5config.cmake
./config/cmake/scripts/HDF5options.cmake
+
+# CMake-specific Sanitizer Scripts
+./config/sanitizer/code-coverage.cmake
+./config/sanitizer/formatting.cmake
+./config/sanitizer/sanitizers.cmake
+./config/sanitizer/tools.cmake
+./config/sanitizer/LICENSE
+./config/sanitizer/README.md
+
+# CMake-specific HPC Scripts
+./config/cmake/scripts/HPC/sbatch-HDF5options.cmake
+./config/cmake/scripts/HPC/bsub-HDF5options.cmake
+./config/cmake/scripts/HPC/qsub-HDF5options.cmake
+./config/cmake/scripts/HPC/raybsub-HDF5options.cmake
diff --git a/Makefile.am b/Makefile.am
index 32dea3e..0af782b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -49,11 +49,6 @@ include $(top_srcdir)/config/commence.am
# Conditionals. These conditionals are defined during configure
# Define each variable to empty if it is not used to placate pmake
-if BUILD_PARALLEL_CONDITIONAL
- TESTPARALLEL_DIR =testpar
-else
- TESTPARALLEL_DIR=
-endif
if BUILD_CXX_CONDITIONAL
CXX_DIR =c++
else
@@ -69,9 +64,24 @@ if BUILD_HDF5_HL_CONDITIONAL
else
HDF5_HL_DIR=
endif
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+if BUILD_TESTS_PARALLEL_CONDITIONAL
+ TESTPARALLEL_DIR =testpar
+else
+ TESTPARALLEL_DIR=
+endif
+if BUILD_TOOLS_CONDITIONAL
+ TOOLS_DIR =tools
+else
+ TOOLS_DIR=
+endif
-SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
- $(HDF5_HL_DIR)
+SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) . \
+ $(CXX_DIR) $(FORTRAN_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
# Some files generated during configure that should be cleaned
diff --git a/Makefile.dist b/Makefile.dist
index 9edb476..9647f1c 100644
--- a/Makefile.dist
+++ b/Makefile.dist
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/Makefile.in b/Makefile.in
index 06eb5b8..b0f79b3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -191,9 +191,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/compile \
$(top_srcdir)/bin/config.guess $(top_srcdir)/bin/config.sub \
$(top_srcdir)/bin/install-sh $(top_srcdir)/bin/ltmain.sh \
$(top_srcdir)/bin/missing $(top_srcdir)/bin/mkinstalldirs \
- $(top_srcdir)/config/commence.am COPYING bin/COPYING \
- bin/compile bin/config.guess bin/config.sub bin/depcomp \
- bin/install-sh bin/ltmain.sh bin/missing bin/mkinstalldirs
+ $(top_srcdir)/config/commence.am COPYING
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -245,9 +243,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -262,6 +260,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -280,6 +279,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -307,6 +307,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -314,9 +316,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -332,6 +337,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -353,6 +359,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -365,8 +372,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -380,6 +389,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -421,6 +431,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -506,7 +517,7 @@ TRACE = perl $(top_srcdir)/bin/trace
# Some files/directories generated during check that should be cleaned
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *-tmp
-@BUILD_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
+@BUILD_CXX_CONDITIONAL_FALSE@CXX_DIR =
# Define subdirectories to build.
# Add this directory to SUBDIRS so that examples get built after tools
@@ -518,15 +529,19 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *-tmp
# Conditionals. These conditionals are defined during configure
# Define each variable to empty if it is not used to placate pmake
-@BUILD_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar
-@BUILD_CXX_CONDITIONAL_FALSE@CXX_DIR =
@BUILD_CXX_CONDITIONAL_TRUE@CXX_DIR = c++
@BUILD_FORTRAN_CONDITIONAL_FALSE@FORTRAN_DIR =
@BUILD_FORTRAN_CONDITIONAL_TRUE@FORTRAN_DIR = fortran
@BUILD_HDF5_HL_CONDITIONAL_FALSE@HDF5_HL_DIR =
@BUILD_HDF5_HL_CONDITIONAL_TRUE@HDF5_HL_DIR = hl
-SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
- $(HDF5_HL_DIR)
+@BUILD_TESTS_CONDITIONAL_FALSE@TESTSERIAL_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TESTSERIAL_DIR = test
+@BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
+@BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar
+@BUILD_TOOLS_CONDITIONAL_FALSE@TOOLS_DIR =
+@BUILD_TOOLS_CONDITIONAL_TRUE@TOOLS_DIR = tools
+SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) . \
+ $(CXX_DIR) $(FORTRAN_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
diff --git a/README.txt b/README.txt
index b546f7c..cf076b6 100644
--- a/README.txt
+++ b/README.txt
@@ -1,35 +1,80 @@
-HDF5 version 1.8.21 released on 2018-06-04
+HDF5 version 1.8.22 released on 2021-02-05
+
+------------------------------------------------------------------------------
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
-This release is fully functional for the API described in the documentation.
-See the RELEASE.txt file in the release_docs/ directory for information
-specific to this release of the library. Several INSTALL* files can also be
-found in the release_docs/ directory: INSTALL contains instructions for
-compiling and installing the library; INSTALL_parallel contains instructions
-for installing the parallel version of the library; similarly-named files
-contain instructions for several environments on MS Windows systems.
+THE HDF GROUP
+---------------
+
+The HDF Group is the developer of HDF5®, a high-performance software library and
+data format that has been adopted across multiple industries and has become a
+de facto standard in scientific and research communities.
+
+More information about The HDF Group, the HDF5 Community and the HDF5 software
+project, tools and services can be found at the Group's website.
+
+ https://www.hdfgroup.org/
+
+
+DOCUMENTATION
+-------------
+This release is fully functional for the API described in the documentation.
+ https://portal.hdfgroup.org/display/HDF5/The+HDF5+API
+
+Full Documentation and Programming Resources for this release can be found at
+ https://portal.hdfgroup.org/display/HDF5
+
+See the RELEASE.txt file in the release_docs/ directory for information specific
+to the features and updates included in this release of the library.
+
+Several more files are located within the release_docs/ directory with specific
+details for several common platforms and configurations.
+
+ INSTALL - Start Here. General instructions for compiling and installing the library
+ INSTALL_CMAKE - instructions for building with CMake (Kitware.com)
+ INSTALL_parallel - instructions for building and configuring Parallel HDF5
+ INSTALL_Windows and INSTALL_Cygwin - MS Windows installations.
+
+
+
+HELP AND SUPPORT
+----------------
+Information regarding Help Desk and Support services is available at
+
+ https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk
+
+
+
+FORUM and NEWS
+--------------
+The following public forums are provided for public announcements and discussions
+of interest to the general HDF5 Community.
-Documentation for this release can be found at the following URL:
- https://support.hdfgroup.org/HDF5/doc1.8/
+ Homepage of the Forum
+ https://forum.hdfgroup.org
-The following mailing lists are currently set up for HDF5 Library users:
+ News and Announcement
+ https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
- news - For announcements of HDF5 related developments,
- not a discussion list.
+ HDF5 and HDF4 Topics
+ https://forum.hdfgroup.org/c/hdf5
- Sign up for the news mailing list here:
- https://www.hdfgroup.org/hdfnews/
+These forums are provided as an open and public service for searching and reading.
+Posting requires completing a simple registration and allows one to join in the
+conversation. Please read the following instructions pertaining to the Forum's
+use and configuration
+ https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum
- hdf-forum - For general discussion of the HDF5 library with
- other users.
- To subscribe to the hdf-forum, send mail to:
- hdf-forum-subscribe@lists.hdfgroup.org
+SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE
+--------------------------------------------
+Periodically development code snapshots are provided at the following URL:
+ https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/
- Messages sent to the list should be addressed to:
- hdf-forum@lists.hdfgroup.org
+Source packages for current and previous releases are located at:
+ https://portal.hdfgroup.org/display/support/Downloads
-The HDF5 website is located at: https://www.hdfgroup.org/hdf5/
+Development code is available at our Github location:
+ https://github.com/HDFGroup/hdf5.git
-Bugs should be reported to help@hdfgroup.org.
diff --git a/UserMacros.cmake b/UserMacros.cmake
index c578c91..c916223 100644
--- a/UserMacros.cmake
+++ b/UserMacros.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/acsite.m4 b/acsite.m4
index 663c661..c9f407d 100644
--- a/acsite.m4
+++ b/acsite.m4
@@ -8,7 +8,7 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
-dnl dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+dnl dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl dnl If you do not have access to either file, you may request a copy from
dnl dnl help@hdfgroup.org.
dnl
diff --git a/bin/COPYING b/bin/COPYING
index 6497ace..97969da 100755
--- a/bin/COPYING
+++ b/bin/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..25df36f
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,57 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src directory
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
+
+# These are our main targets
+bin_SCRIPTS=h5redeploy
+
+# Tell automake to clean h5redeploy script
+CLEANFILES=h5redeploy
+
+# These were generated by configure. Remove them only when distclean.
+DISTCLEANFILES=h5cc
+
+# All programs rely on hdf5 library and h5tools library
+LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+
+# How to build h5redeploy script
+h5redeploy: h5redeploy.in
+ @cp $(srcdir)/$@.in $@
+
+# h5cc needs custom install and uninstall rules, since it may be
+# named h5pcc if hdf5 is being built in parallel mode.
+if BUILD_PARALLEL_CONDITIONAL
+ H5CC_NAME=h5pcc
+else
+ H5CC_NAME=h5cc
+endif
+
+$(DESTDIR)$(bindir):
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1;
+
+install-exec-local: $(DESTDIR)$(bindir)
+ @$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME)
+uninstall-local:
+ @$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME)
+
+include $(top_srcdir)/config/conclude.am
diff --git a/bin/Makefile.in b/bin/Makefile.in
new file mode 100644
index 0000000..3c5b1bf
--- /dev/null
+++ b/bin/Makefile.in
@@ -0,0 +1,1311 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF5 Library Makefile(.in)
+#
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS =
+subdir = bin
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/H5config.h
+CONFIG_CLEAN_FILES = h5cc
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(bin_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/h5cc.in \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am COPYING compile config.guess \
+ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs \
+ test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
+AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
+
+# Include src directory
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tools/lib
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
+CLEARFILEBUF = @CLEARFILEBUF@
+CODESTACK = @CODESTACK@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_MODE = @CONFIG_MODE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_VERSION = @CXX_VERSION@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_PKG = @DEBUG_PKG@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
+
+# Make sure that these variables are exported to the Makefiles
+F9XMODEXT = @F9XMODEXT@
+F9XMODFLAG = @F9XMODFLAG@
+F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
+FC = @FC@
+FC2003 = @FC2003@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+FC_VERSION = @FC_VERSION@
+FGREP = @FGREP@
+FSEARCH_DIRS = @FSEARCH_DIRS@
+GREP = @GREP@
+H5_CFLAGS = @H5_CFLAGS@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_LDFLAGS = @H5_LDFLAGS@
+H5_VERSION = @H5_VERSION@
+HADDR_T = @HADDR_T@
+HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
+HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_HL = @HDF5_HL@
+HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
+HDF_CXX = @HDF_CXX@
+HDF_FORTRAN = @HDF_FORTRAN@
+HDF_FORTRAN2003 = @HDF_FORTRAN2003@
+HID_T = @HID_T@
+HL = @HL@
+HL_FOR = @HL_FOR@
+HSIZE_T = @HSIZE_T@
+HSSIZE_T = @HSSIZE_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTRUMENT = @INSTRUMENT@
+INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LL_PATH = @LL_PATH@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_STATIC_EXEC = @LT_STATIC_EXEC@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PROFILING = @PROFILING@
+RANLIB = @RANLIB@
+ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
+RUNPARALLEL = @RUNPARALLEL@
+RUNSERIAL = @RUNSERIAL@
+R_INTEGER = @R_INTEGER@
+R_LARGE = @R_LARGE@
+SEARCH = @SEARCH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZE_T = @SIZE_T@
+STATIC_EXEC = @STATIC_EXEC@
+STATIC_SHARED = @STATIC_SHARED@
+STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
+STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+THREADSAFE = @THREADSAFE@
+TIME = @TIME@
+TR = @TR@
+TRACE_API = @TRACE_API@
+UNAME_CYGWIN = @UNAME_CYGWIN@
+UNAME_INFO = @UNAME_INFO@
+USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
+USE_FILTER_SZIP = @USE_FILTER_SZIP@
+USINGMEMCHECKER = @USINGMEMCHECKER@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Install directories that automake doesn't know about
+docdir = $(exec_prefix)/doc
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+examplesdir = @examplesdir@
+exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Shell commands used in Makefiles
+RM = rm -f
+CP = cp
+
+# Some machines need a command to run executables; this is that command
+# so that our tests will run.
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
+# some tests need to be run with a different command. Older versions
+# of the makefiles used the command
+# $(LIBTOOL) --mode=execute
+# in some directories, for instance.
+RUNEXEC = $(RUNSERIAL)
+
+# Libraries to link to while building
+LIBHDF5 = $(top_builddir)/src/libhdf5.la
+LIBH5TEST = $(top_builddir)/test/libh5test.la
+LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
+LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
+LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
+LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
+LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
+LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
+LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
+# Scripts used to build examples
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
+ACLOCAL_AMFLAGS = "-I m4"
+
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
+# .chkexe files are used to mark tests that have run successfully.
+# .chklog files are output from those tests.
+# *.clog and *.clog2 are from the MPE option.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
+
+# These are our main targets
+bin_SCRIPTS = h5redeploy
+
+# Tell automake to clean h5redeploy script
+CLEANFILES = h5redeploy
+
+# These were generated by configure. Remove them only when distclean.
+DISTCLEANFILES = h5cc
+
+# All programs rely on hdf5 library and h5tools library
+LDADD = $(LIBH5TOOLS) $(LIBHDF5)
+@BUILD_PARALLEL_CONDITIONAL_FALSE@H5CC_NAME = h5cc
+
+# h5cc needs custom install and uninstall rules, since it may be
+# named h5pcc if hdf5 is being built in parallel mode.
+@BUILD_PARALLEL_CONDITIONAL_TRUE@H5CC_NAME = h5pcc
+
+# Automake needs to be taught how to build lib, progs and tests targets.
+# These will be filled in automatically for the most part (e.g.,
+# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
+# EXTRA_TEST variables are supplied to allow the user to force targets to
+# be built at certain times.
+LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
+ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
+
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign bin/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+h5cc: $(top_builddir)/config.status $(srcdir)/h5cc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+.sh.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(SCRIPTS) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-exec-local
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-local
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am all-local check check-TESTS check-am clean \
+ clean-generic clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binSCRIPTS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags-am uninstall uninstall-am \
+ uninstall-binSCRIPTS uninstall-local
+
+.PRECIOUS: Makefile
+
+
+# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
+# This tells the Makefiles that these targets are not files to be built but
+# commands that should be executed even if a file with the same name already
+# exists.
+.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc _exec_check-s _test help
+
+help:
+ @$(top_srcdir)/bin/makehelp
+
+# How to build h5redeploy script
+h5redeploy: h5redeploy.in
+ @cp $(srcdir)/$@.in $@
+
+$(DESTDIR)$(bindir):
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1;
+
+install-exec-local: $(DESTDIR)$(bindir)
+ @$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME)
+uninstall-local:
+ @$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME)
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(chk_TESTS)
+
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# Tell Automake to build tests when the user types `make all' (this is
+# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
+# Automake won't build them automatically, either.
+all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
+
+# make install-doc doesn't do anything outside of doc directory, but
+# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is deprecated.
+install-doc uninstall-doc:
+ @echo "Nothing to be done."
+
+# clean up files generated by tests so they can be re-run.
+build-check-clean:
+ $(RM) -rf $(CHECK_CLEANFILES)
+
+# run check-clean whenever mostlyclean is run
+mostlyclean-local: build-check-clean
+
+# check-install is just a synonym for installcheck
+check-install: installcheck
+
+# Run each test in order, passing $(TEST_FLAGS) to the program.
+# Since tests are done in a shell loop, "make -i" does apply inside it.
+# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
+# The timestamps give a rough idea how much time the tests use.
+#
+# Note that targets in chk_TESTS (defined above) will be built when the user
+# types 'make tests' or 'make check', but only programs in TEST_PROG,
+# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
+check-TESTS: test
+
+test _test:
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
+
+# Actual execution of check-s.
+build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The dummy.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
+ tname=$(@:.chkexe_=)$(EXEEXT);\
+ log=$(@:.chkexe_=.chklog); \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
+ echo "No need to test $${tname} again."; \
+ else \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
+ echo "" >> $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
+ fi; \
+ fi
+
+# The dummysh.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
+ cmd=$(@:.chkexe_=);\
+ tname=`basename $$cmd`;\
+ chkname=`basename $(@:.chkexe_=.chkexe)`;\
+ log=`basename $(@:.chkexe_=.chklog)`; \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ else \
+ echo "Testing $${tname} $(TEST_FLAGS)"; \
+ echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $${chkname} || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# Actual execution of check-p.
+build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @if test -n "$(TEST_PROG_PARA)"; then \
+ echo "**** Hint ****"; \
+ echo "Parallel test files reside in the current directory" \
+ "by default."; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
+ echo " HDF5_PARAPREFIX=/PFS/user/me"; \
+ echo " export HDF5_PARAPREFIX"; \
+ echo " make check"; \
+ echo "**** end of Hint ****"; \
+ fi
+ @for test in $(TEST_PROG_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
+ fi; \
+ done
+ @for test in $(TEST_SCRIPT_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
+ fi; \
+ done
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+# Run test with different Virtual File Driver
+check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
+ @for vfd in $(VFD_LIST) dummy; do \
+ if test $$vfd != dummy; then \
+ echo "============================"; \
+ echo "Testing Virtual File Driver $$vfd"; \
+ echo "============================"; \
+ $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
+ HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
+ fi; \
+ done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/bin/batch/ctest.qsub.in.cmake b/bin/batch/ctest.qsub.in.cmake
new file mode 100755
index 0000000..702fca7
--- /dev/null
+++ b/bin/batch/ctest.qsub.in.cmake
@@ -0,0 +1,21 @@
+#!/bin/bash -l
+if [ $# -gt 0 ]; then
+ SUMMARY_FILE=$1
+fi
+ACCOUNT_ID=@ACCOUNT_ID@
+
+echo "Run parallel test command. Test output will be in build/${SUMMARY_FILE}"
+CTEST_CMD=`which ctest`
+
+#SKIPTESTS <<KEYWORD:script inserts list of skips tests here -- don't remove>>
+
+cd @HDF5_BINARY_DIR@
+if [[ $SUMMARY_FILE == *"ctestS"* ]]; then
+ CMD="${CTEST_CMD} . -E MPI_TEST_ -C Release -j 32 -T test"
+else
+ CMD="${CTEST_CMD} . -R MPI_TEST_ ${SKIP_TESTS} -C Release -T test"
+fi
+
+qsub -t 60 -n 1 -q debug-flat-quad -A ${ACCOUNT_ID} ${CMD} >& ${SUMMARY_FILE}
+
+echo "Done running ctest parallel command."
diff --git a/bin/batch/ctestP.lsf.in.cmake b/bin/batch/ctestP.lsf.in.cmake
new file mode 100644
index 0000000..3fdd5ce
--- /dev/null
+++ b/bin/batch/ctestP.lsf.in.cmake
@@ -0,0 +1,19 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -nnodes 1 #number of nodes
+#BSUB -W 30 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestPerrors.txt #stderr
+#BSUB -o ctestPoutput.txt #stdout
+#BSUB -J hdf5_ctestP #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+##date; hostname
+##echo -n 'JobID is '; echo $LSB_JOBID
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest . -R MPI_TEST_ -C Release -T test >& ctestP.out
+
+echo "Done running ctest parallel command."
diff --git a/bin/batch/ctestP.sl.in.cmake b/bin/batch/ctestP.sl.in.cmake
new file mode 100644
index 0000000..1069fa9
--- /dev/null
+++ b/bin/batch/ctestP.sl.in.cmake
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestP
+
+cd @HDF5_BINARY_DIR@
+ctest . -R MPI_TEST_ -C Release -T test >& ctestP.out
+
+echo "Done running ctestP.sl"
+
diff --git a/bin/batch/ctestS.lsf.in.cmake b/bin/batch/ctestS.lsf.in.cmake
new file mode 100644
index 0000000..a01d39b
--- /dev/null
+++ b/bin/batch/ctestS.lsf.in.cmake
@@ -0,0 +1,18 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -nnodes 1 #number of nodes
+#BSUB -W 29 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestSerrors.txt #stderr
+#BSUB -o ctestSoutput.txt #stdout
+#BSUB -J hdf5_ctestS #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest . -E MPI_TEST_ -C Release -j 32 -T test >& ctestS.out
+
+##$CMD >& ctestS.out
+echo "Done running command."
+
diff --git a/bin/batch/ctestS.sl.in.cmake b/bin/batch/ctestS.sl.in.cmake
new file mode 100644
index 0000000..4f96bb9
--- /dev/null
+++ b/bin/batch/ctestS.sl.in.cmake
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+cd @HDF5_BINARY_DIR@
+CMD="ctest . -E MPI_TEST_ -C Release -j 32 -T test"
+
+echo "Run $CMD. Test output will be in build/ctestS.out"
+$CMD >& ctestS.out
+echo "Done running $CMD"
diff --git a/bin/batch/knl_H5detect.sl.in.cmake b/bin/batch/knl_H5detect.sl.in.cmake
new file mode 100644
index 0000000..39a3ef3
--- /dev/null
+++ b/bin/batch/knl_H5detect.sl.in.cmake
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad
+#SBATCH --nodes=1
+#SBATCH -t 00:10:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+#SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=knl_h5detect
+
+
+# Inputs: Build directory, output file name, executable file name (username/email if available).
+PROGNAME=H5detect
+OUTPUT=H5Tinit.c
+
+CMD="@HDF5_BINARY_DIR@/bin/${PROGNAME} @HDF5_GENERATED_SOURCE_DIR@/${OUTPUT}"
+echo "Run $CMD"
+srun -n 1 $CMD
+echo "Done running $CMD"
+
diff --git a/bin/batch/knl_ctestP.sl.in.cmake b/bin/batch/knl_ctestP.sl.in.cmake
new file mode 100644
index 0000000..f985fbb
--- /dev/null
+++ b/bin/batch/knl_ctestP.sl.in.cmake
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,cache
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestP
+
+cd @HDF5_BINARY_DIR@
+#run parallel tests except t_cache_image test
+ctest . -R MPI_TEST_ -C Release -T test >& ctestP.out
+
+echo "Done running $CMD"
+
diff --git a/bin/batch/knl_ctestS.sl.in.cmake b/bin/batch/knl_ctestS.sl.in.cmake
new file mode 100644
index 0000000..af6353b
--- /dev/null
+++ b/bin/batch/knl_ctestS.sl.in.cmake
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#SBATCH -p knl -C quad,cache
+#SBATCH --nodes=1
+#SBATCH -t 00:30:00
+#SBATCH --mail-type=BEGIN,END,FAIL
+##SBATCH --mail-user=<username>@sandia.gov
+#SBATCH --export=ALL
+#SBATCH --job-name=h5_ctestS
+
+cd @HDF5_BINARY_DIR@
+CMD="ctest . -E MPI_TEST_ -C Release -j 32 -T test"
+
+echo "Run $CMD. Test output will be in build/ctestS.out"
+$CMD >& ctestS.out
+echo "Done running $CMD"
+
diff --git a/bin/batch/ray_ctestP.lsf.in.cmake b/bin/batch/ray_ctestP.lsf.in.cmake
new file mode 100644
index 0000000..7067a65
--- /dev/null
+++ b/bin/batch/ray_ctestP.lsf.in.cmake
@@ -0,0 +1,20 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -n 6 #number of nodes
+#BSUB -R "span[ptile=6]"
+#BSUB -W 30 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestPerrors.txt #stderr
+#BSUB -o ctestPoutput.txt #stdout
+#BSUB -J hdf5_ctestP #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+##date; hostname
+##echo -n 'JobID is '; echo $LSB_JOBID
+
+cd @HDF5_BINARY_DIR@
+echo "Run parallel test command. Test output will be in build/ctestP.out"
+ctest . -R 'MPI_TEST_' -C Release -T test >& ctestP.out
+
+echo "Done running ctest parallel command."
diff --git a/bin/batch/ray_ctestS.lsf.in.cmake b/bin/batch/ray_ctestS.lsf.in.cmake
new file mode 100644
index 0000000..da20438
--- /dev/null
+++ b/bin/batch/ray_ctestS.lsf.in.cmake
@@ -0,0 +1,18 @@
+#!/bin/tcsh
+### LSF syntax
+#BSUB -n 1 #number of nodes
+#BSUB -W 29 #walltime in minutes
+#BSUB -G guests #account
+#BSUB -e ctestSerrors.txt #stderr
+#BSUB -o ctestSoutput.txt #stdout
+#BSUB -J hdf5_ctestS #job
+##BSUB -q pbatch #queue to use
+#BSUB -q pdebug
+
+cd @HDF5_BINARY_DIR@
+echo "Run command. Test output will be in build/ctestS.out"
+ctest . -E 'MPI_TEST_' -C Release -j 32 -T test >& ctestS.out
+
+##$CMD >& ctestS.out
+echo "Done running command."
+
diff --git a/bin/batch/raybsub b/bin/batch/raybsub
new file mode 100755
index 0000000..19dceef
--- /dev/null
+++ b/bin/batch/raybsub
@@ -0,0 +1,7 @@
+#!/bin/tcsh
+
+# ray.llnl.gov requires a '<' with bsub for submitting .lsf batch jobs.
+# CMake is reluctant to pass the '<', so we put it in this script and use
+# the script to submit the bsub command on ray.
+
+bsub < $1
diff --git a/bin/bbrelease b/bin/bbrelease
index 10526df..0e5f3fa 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/buildhdf5 b/bin/buildhdf5
index 064000a..113a278 100755
--- a/bin/buildhdf5
+++ b/bin/buildhdf5
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/checkapi b/bin/checkapi
index 6882dea..2ff5dfa 100755
--- a/bin/checkapi
+++ b/bin/checkapi
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/checkposix b/bin/checkposix
index 7ab741c..237c177 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -9,7 +9,7 @@ require 5.003;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/chkconfigure b/bin/chkconfigure
index d03f421..b2b53c6 100755
--- a/bin/chkconfigure
+++ b/bin/chkconfigure
@@ -6,7 +6,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
##
diff --git a/bin/chkcopyright b/bin/chkcopyright
index ae98402..1ae8b18 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -118,7 +118,7 @@ BUILDCOPYRIGHT()
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
EOF
@@ -132,7 +132,7 @@ EOF
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
EOF
@@ -146,7 +146,7 @@ EOF
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
EOF
@@ -160,7 +160,7 @@ EOF
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
EOF
@@ -174,7 +174,7 @@ EOF
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
EOF
@@ -188,7 +188,7 @@ EOF
@REM This file is part of HDF5. The full HDF5 copyright notice, including
@REM terms governing use, modification, and redistribution, is contained in
@REM the COPYING file, which can be found at the root of the source code
-@REM distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+@REM distribution tree, or in https://www.hdfgroup.org/licenses.
@REM If you do not have access to either file, you may request a copy from
@REM help@hdfgroup.org.
EOF
@@ -202,7 +202,7 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
-dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl If you do not have access to either file, you may request a copy from
dnl help@hdfgroup.org.
EOF
diff --git a/bin/chkmanifest b/bin/chkmanifest
index a016b0f..d22f368 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index 8594bd1..ab91e2d 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/debug-ohdr b/bin/debug-ohdr
index 5b0a4b3..71a315b 100755
--- a/bin/debug-ohdr
+++ b/bin/debug-ohdr
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/dependencies b/bin/dependencies
index 82247da..409f98f 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/deploy b/bin/deploy
index 73f4b25..cb9a467 100755
--- a/bin/deploy
+++ b/bin/deploy
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/distdep b/bin/distdep
index 4643700..4336d41 100644
--- a/bin/distdep
+++ b/bin/distdep
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/errors b/bin/errors
index 3c99fdc..1511773 100755
--- a/bin/errors
+++ b/bin/errors
@@ -12,7 +12,7 @@ use Text::Tabs;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/format_source b/bin/format_source
new file mode 100755
index 0000000..1128def
--- /dev/null
+++ b/bin/format_source
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Recursively format all C & C++ sources and header files, except those in the
+# 'config' directory and generated files, such as H5LTanalyze.c, etc.
+#
+# Note that any files or directories that are excluded here should also be
+# added to the 'exclude' list in .github/workflows/clang-format-check.yml
+#
+# (Remember to update both bin/format_source and bin/format_source_patch)
+
+find . -type d \( -path ./config \) -prune \
+ -or \( \( \! \( \
+ -name H5LTanalyze.c \
+ -or -name H5LTparse.c \
+ -or -name H5LTparse.h \
+ -or -name H5Epubgen.h \
+ -or -name H5Einit.h \
+ -or -name H5Eterm.h \
+ -or -name H5Edefin.h \
+ -or -name H5version.h \
+ -or -name H5overflow.h \
+ \) \) \
+ -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+exit 0
diff --git a/bin/format_source_patch b/bin/format_source_patch
new file mode 100755
index 0000000..8d6be01
--- /dev/null
+++ b/bin/format_source_patch
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# Recursively format all C & C++ sources and header files, except those in the
+# 'config' directory and generated files, such as H5LTanalyze.c, etc.
+#
+# Note that any files or directories that are excluded here should also be
+# added to the 'exclude' list in .github/workflows/clang-format-check.yml
+#
+# (Remember to update both bin/format_source and bin/format_source_patch)
+
+find . -type d \( -path ./config \) -prune \
+ -or \( \( \! \( \
+ -name H5LTanalyze.c \
+ -or -name H5LTparse.c \
+ -or -name H5LTparse.h \
+ -or -name H5Epubgen.h \
+ -or -name H5Einit.h \
+ -or -name H5Eterm.h \
+ -or -name H5Edefin.h \
+ -or -name H5version.h \
+ -or -name H5overflow.h \
+ \) \) \
+ -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+git diff > clang_format.patch
+
+# Delete if 0 size
+if [ ! -s clang_format.patch ]
+then
+ rm clang_format.patch
+fi
+
+exit 0
diff --git a/bin/gcov_script b/bin/gcov_script
index 9a6512d..679d675 100755
--- a/bin/gcov_script
+++ b/bin/gcov_script
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/genltanalyze b/bin/genltanalyze
deleted file mode 100755
index 0578588..0000000
--- a/bin/genltanalyze
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/sh
-##
-## Copyright by The HDF Group.
-## Copyright by the Board of Trustees of the University of Illinois.
-## All rights reserved.
-##
-## This file is part of HDF5. The full HDF5 copyright notice, including
-## terms governing use, modification, and redistribution, is contained in
-## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-## If you do not have access to either file, you may request a copy from
-## help@hdfgroup.org.
-##
-# regenerate hl/src/H5LTanalyze.c
-
-# HDF5 currently uses the following versions of the bison flex:
-BISON_VERSION="bison (GNU Bison) 2.7"
-FLEX_VERSION="flex 2.5.37"
-
-# If paths to bison flex are not specified by the user, assume tools are
-# running on jam in /mnt/hdf/packages and set paths accordingly.
-if test -z ${BISON}; then
- BISON=/usr/hdf/bin/bison
-fi
-if test -z ${FLEX}; then
- FLEX=/usr/hdf/bin/flex
-fi
-
-# Check version numbers of all bison flex against the "correct" versions
-BI_VERS=`${BISON} --version 2>&1 | grep "^${BISON_VERSION}"`
-if test -z "${BI_VERS}"; then
- echo "${BISON} version is not ${BISON_VERSION}"
- exit 1
-fi
-FL_VERS=`${FLEX} --version 2>&1 | grep "^${FLEX_VERSION}"`
-if test -z "${FL_VERS}"; then
- echo "${FLEX} version is not ${FLEX_VERSION}"
- exit 1
-fi
-
-# Make sure that the tools are in the path.
-BISON_DIR=`dirname ${BISON}`
-FLEX_DIR=`dirname ${FLEX}`
-
-# Main body
-cd hl/src
-echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
-bison -pH5LTyy -o H5LTparse.c -d H5LTparse.y
-echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
-flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l
-
-# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
-# instead of int. Currently the generated function H5LTyyparse is
-# generated with a return value of type int, which is a mapping to the
-# flex yyparse function. The return value in the HL library should be
-# an hid_t.
-# I propose to not use flex to generate this function, but for now I am
-# adding a perl command to find and replace this function declaration in
-# H5LTparse.c.
-perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
-perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
-
-# Add code that disables warnings in the flex/bison-generated code.
-#
-# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
-# will simply ignore them, but we want to avoid those warnings.
-for f in H5LTparse.c H5LTanalyze.c
-do
- echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
- echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
- echo '#elif defined __SUNPRO_CC ' >> tmp.out
- echo '#pragma disable_warn ' >> tmp.out
- echo '#elif defined _MSC_VER ' >> tmp.out
- echo '#pragma warning(push, 1) ' >> tmp.out
- echo '#endif ' >> tmp.out
-
- cat $f >> tmp.out
- mv tmp.out $f
-done
-
-cd ../..
-
-exit 0
diff --git a/bin/genparser b/bin/genparser
new file mode 100755
index 0000000..d333c6d
--- /dev/null
+++ b/bin/genparser
@@ -0,0 +1,259 @@
+#! /bin/bash
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+# This script runs flex/lex and bison/yacc to generate parser code for
+# the high-level library. It used to be a part of autogen.sh, but many
+# people encountered problems with installing flex and bison on their
+# system and the parser code rarely changes, so those parts of the
+# script were moved to their own file.
+#
+# NOTE CAREFULLY!
+#
+# There is NO dependency in either the autotools or CMake to regenerate
+# the parser code. If you modify H5LT analyze.l or H5LTparse.y, you
+# will need to run this scrpit manually on a system with a suitable
+# lexer and parser generator.
+#
+# IMPORTANT OS X NOTE
+#
+# If you are using OS X, you will probably not have flex or bison
+# installed. In addtion, even if you do have bison installed, the bison
+# version you have installed may also have a bug that makes it unable to
+# process our input files.
+#
+# The easiest way to fix this is to install everything via Homebrew:
+#
+# http://brew.sh/
+#
+# After you install the base packages, install flex/bison.
+#
+# brew install flex
+# brew install bison
+#
+# END IMPORTANT OS X NOTE
+#
+# If you want to use a particular version of flex or bison, the paths
+# to each tool can be overridden using the following environment
+# variables:
+#
+# HDF5_FLEX
+# HDF5_BISON
+#
+# This script takes two potential options:
+#
+# -p
+#
+# When this is selected, the flex/bison versions are set to the paths
+# and versions used by The HDF Group to produce the released versions
+# of the library.
+#
+# NOTE: This is probably temporary. Once we update our dev machines
+# to have recent versions of the autotools this option will probably
+# be removed.
+#
+# -v
+#
+# This emits some extra information, mainly tool versions.
+
+echo
+echo "*******************************************"
+echo "* HDF5 high-level parser generator script *"
+echo "*******************************************"
+echo
+
+# Default is not verbose output
+verbose=false
+
+optspec=":hpv-"
+while getopts "$optspec" optchar; do
+ case "${optchar}" in
+ h)
+ echo "usage: $0 [OPTIONS] /path/to/hl/src/directory"
+ echo
+ echo " -h Print this help message."
+ echo
+ echo " -p Used by THG to use hard-codes flex/bison"
+ echo " paths on THG machines. Not for non-HDF-Group"
+ echo " users!"
+ echo
+ echo " -v Show more verbose output."
+ echo
+ echo " NOTE: Each tool can be set via an environment variable."
+ echo " These are documented inside this script."
+ echo
+ exit 0
+ ;;
+ p)
+ echo "Setting THG production mode..."
+ echo
+ production=true
+ ;;
+ v)
+ echo "Setting verbosity: high"
+ echo
+ verbose=true
+ ;;
+ *)
+ if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
+ echo "Non-option argument: '-${OPTARG}'" >&2
+ fi
+ ;;
+ esac
+done
+
+# Get the path to the hl src directory
+shift $(($OPTIND - 1))
+path_to_hl_src=$1
+if test -z ${path_to_hl_src}; then
+ echo "*** ERROR *** - Path to hl/src not set"
+ echo "Please add the path to the hl/src directory as a parameter"
+ echo "See $0 -h for more help."
+ echo
+ exit -1
+fi
+
+if [ "$production" = true ] ; then
+
+ # Production mode
+ #
+ # Hard-code canonical HDF Group tool locations.
+
+ # If paths to tools are not specified, assume they are
+ # located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
+ if test -z ${HDF5_BISON}; then
+ HDF5_BISON=/usr/hdf/bin/AUTOTOOLS/bison
+ fi
+ if test -z ${HDF5_FLEX}; then
+ HDF5_FLEX=/usr/hdf/bin/AUTOTOOLS/flex
+ fi
+
+else
+
+ # Not in production mode
+ #
+ # If paths to autotools are not specified, use whatever the system
+ # has installed as the default. We use 'which <tool>' to
+ # show exactly what's being used.
+ if test -z ${HDF5_BISON}; then
+ HDF5_BISON=$(which bison)
+ fi
+ if test -z ${HDF5_FLEX}; then
+ HDF5_FLEX=$(which flex)
+ fi
+
+fi # production
+
+# Make sure that these versions of the tools are in the path
+BISON_DIR=`dirname ${HDF5_BISON}`
+FLEX_DIR=`dirname ${HDF5_FLEX}`
+PATH=${FLEX_DIR}:${BISON_DIR}:$PATH
+
+# Run flex and bison
+# automatically generates hl/src/H5LTanalyze.c and hl/src/H5LTparse.c
+# Note that, as of Xcode 6.1 (2015), the default bison version on OS X
+# is old enough to have the circular dependency bug. You'll have
+# to install a later version of bison. See the OS X note at the top
+# of this script.
+echo
+echo "Generating H5LT parser code (requires yacc/bison):"
+echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
+# HDF5_BISON is set via the environment or 'which bison', above
+if test -z ${HDF5_BISON}; then
+ echo
+ echo "*************************"
+ echo " ERROR - bison not found"
+ echo "*************************"
+ echo "bison is required to generate parser code in H5LT"
+ echo
+ exit 127
+fi
+if [ "$verbose" = true ] ; then
+ ${HDF5_BISON} --version
+fi
+${HDF5_BISON} -pH5LTyy -o ${path_to_hl_src}/H5LTparse.c -d ${path_to_hl_src}/H5LTparse.y
+
+echo
+echo "Generating H5LT lexer code (requires lex/flex):"
+echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
+# HDF5_FLEX is set via the environment or 'which flex', above
+if test -z ${HDF5_FLEX}; then
+ echo
+ echo "************************"
+ echo " ERROR - flex not found"
+ echo "************************"
+ echo "flex is required to generate lexer code in H5LT"
+ echo
+ exit 127
+fi
+if [ "$verbose" = true ] ; then
+ ${HDF5_FLEX} --version
+fi
+${HDF5_FLEX} --nounistd -PH5LTyy -o ${path_to_hl_src}/H5LTanalyze.c ${path_to_hl_src}/H5LTanalyze.l
+
+# fix H5LTparse.c and H5LTlparse.h to declare H5LTyyparse return type as an
+# hid_t instead of int. Currently the generated function H5LTyyparse is
+# generated with a return value of type int, which is a mapping to the
+# flex yyparse function. The return value in the HL library should be
+# an hid_t.
+# I propose to not use flex to generate this function, but for now I am
+# adding a perl command to find and replace this function declaration in
+# H5LTparse.c.
+perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.c
+perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.c
+perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.c
+perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.h
+perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.h
+perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.h
+
+# Add code that disables warnings in the flex/bison-generated code.
+#
+# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
+# will simply ignore them, but we want to avoid those warnings.
+for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
+do
+ echo '#if defined (__GNUC__) ' >> tmp.out
+ echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wredundant-decls" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
+ echo '#endif ' >> tmp.out
+ echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600 ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wnull-dereference" ' >> tmp.out
+ echo '#endif ' >> tmp.out
+ echo '#elif defined __SUNPRO_CC ' >> tmp.out
+ echo '#pragma disable_warn ' >> tmp.out
+ echo '#elif defined _MSC_VER ' >> tmp.out
+ echo '#pragma warning(push, 1) ' >> tmp.out
+ echo '#endif ' >> tmp.out
+
+ cat $f >> tmp.out
+ mv tmp.out $f
+done
+
+echo
+exit 0
+
diff --git a/tools/misc/h5cc.in b/bin/h5cc.in
index 9c4e3ca..76121b4 100644
--- a/tools/misc/h5cc.in
+++ b/bin/h5cc.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/tools/misc/h5redeploy.in b/bin/h5redeploy.in
index 242459a..86183e8 100644
--- a/tools/misc/h5redeploy.in
+++ b/bin/h5redeploy.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/h5vers b/bin/h5vers
index c8abef8..adaef6c 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -13,11 +13,11 @@ use strict;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Robb Matzke <matzke@llnl.gov>
+# Robb Matzke
# 17 July 1998
### Purpose
@@ -207,7 +207,7 @@ my (@curver) = getvers $contents;
# Determine the new version number.
my @newver; #new version
if ($set) {
- if ($set =~ /(\d+)\.(\d+)\.(\d+)(-([a-zA-Z]\w*))?/) {
+ if ($set =~ /(\d+)\.(\d+)\.(\d+)(-([\da-zA-Z]\w*))?/) {
@newver = ($1, $2, $3, $5);
} elsif ($set =~ /(\d+)\D+(\d+)\D+(\d+)(\s*\(([a-zA-Z]\w*)\))?\D*$/) {
@newver = ($1, $2, $3, $5);
diff --git a/bin/iostats b/bin/iostats
index f054b9c..4b18dcf 100755
--- a/bin/iostats
+++ b/bin/iostats
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/locate_sw b/bin/locate_sw
index bab7bd2..1cf84e2 100755
--- a/bin/locate_sw
+++ b/bin/locate_sw
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/make_err b/bin/make_err
index bfe8861..5964bb6 100755
--- a/bin/make_err
+++ b/bin/make_err
@@ -10,7 +10,7 @@ $indent=4;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -37,7 +37,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
- print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
+ print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
@@ -244,7 +244,7 @@ sub create_init ($) {
print HEADER "/* Major error codes */\n";
print HEADER "/*********************/\n\n";
foreach $name (keys %major) {
- print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
+ print HEADER " "x(0*$indent),"HDassert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E_create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
@@ -260,7 +260,7 @@ sub create_init ($) {
# Iterate over all the minor errors in each section
for $name ( @{$section_list{$sect_name}}) {
- print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
+ print HEADER " "x(0*$indent),"HDassert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E_create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
diff --git a/bin/make_overflow b/bin/make_overflow
index ccd640e..81ef1e0 100755
--- a/bin/make_overflow
+++ b/bin/make_overflow
@@ -15,7 +15,7 @@ my @ctypes = ( () );
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -66,7 +66,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
- print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
+ print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
diff --git a/bin/make_vers b/bin/make_vers
index 064bf0e..bbeeb1a 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -17,7 +17,7 @@ $min_sup_idx = 3;
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -44,7 +44,7 @@ sub print_copyright ($) {
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
print $fh " * the COPYING file, which can be found at the root of the source code *\n";
- print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n";
+ print $fh " * distribution tree, or in https://www.hdfgroup.org/licenses. *\n";
print $fh " * If you do not have access to either file, you may request a copy from *\n";
print $fh " * help\@hdfgroup.org. *\n";
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
diff --git a/bin/mkdirs b/bin/mkdirs
index 43972b6..3a36aa2 100755
--- a/bin/mkdirs
+++ b/bin/mkdirs
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/newer b/bin/newer
index 8083cae..e60ec45 100755
--- a/bin/newer
+++ b/bin/newer
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/output_filter.sh b/bin/output_filter.sh
index a080b55..ba68cb3 100644
--- a/bin/output_filter.sh
+++ b/bin/output_filter.sh
@@ -3,10 +3,10 @@
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://www.hdfgroup.org/licenses.
+## If you do not have access to either file, you may request a copy from
+## help@hdfgroup.org.
# This contains function definitions of output filtering.
# This file should only be sourced in by another shell script.
@@ -16,15 +16,15 @@
# Comment added to address HDFFV-8270:
-# As I understand it, the purpose of this file is to remove extraneous messages
-# that appear in stdout and stderr on some machines that have been tested outside
-# of the HDF Group realm. The purpose of this script is to filter those
+# As I understand it, the purpose of this file is to remove extraneous messages
+# that appear in stdout and stderr on some machines that have been tested outside
+# of the HDF Group realm. The purpose of this script is to filter those
# extraneous messages from stdout and stderr so that when the output files are
-# compared to the expected output, the extra messages will not cause failures in
+# compared to the expected output, the extra messages will not cause failures in
# the tests. The system messages in the comments below are out of date, meaning
-# I suppose that while the script code to filter messages on the system was
+# I suppose that while the script code to filter messages on the system was
# correct correct when last used, the output in the comments doesn't match the
-# script code that follows. I don't currently have access to any of these
+# script code that follows. I don't currently have access to any of these
# systems to see the current output and the effect of the script code. If using
# this file in the future, please update the comments to match the scripts in use.
# Larry Knox 2017/3/15
diff --git a/bin/pkgscrpts/build_and_package_hdf5_binaries.sh b/bin/pkgscrpts/build_and_package_hdf5_binaries.sh
index a9b4115..1568937 100644
--- a/bin/pkgscrpts/build_and_package_hdf5_binaries.sh
+++ b/bin/pkgscrpts/build_and_package_hdf5_binaries.sh
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/pkgscrpts/h5rmflags b/bin/pkgscrpts/h5rmflags
index 80a249e..d0f87c0 100755
--- a/bin/pkgscrpts/h5rmflags
+++ b/bin/pkgscrpts/h5rmflags
@@ -7,16 +7,14 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-## This script wasextracted from h5redeploy to find hdf5 compile scripts and
-## remove build paths from hdf5 compile scripts. Script is intended to be
-## called from the make18xxTarFiles.pl script, so it could be stripped of options.
-## Actions are predetermined and written in this script instead of in a command
-## file.
+## Remove paths to libraries used to build HDF5 when packaging HDF5
+## binaries.
+## For help page, use "h5rmflags -help"
# Constants definitions
EXIT_SUCCESS=0
diff --git a/bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec b/bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec
index 8205e8a..6868494 100644
--- a/bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec
+++ b/bin/pkgscrpts/hdf5-1.8.16-1-x86_64-szip.spec
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/pkgscrpts/make1816TarFiles.pl b/bin/pkgscrpts/make1816TarFiles.pl
index 1d520f0..26f0836 100755
--- a/bin/pkgscrpts/make1816TarFiles.pl
+++ b/bin/pkgscrpts/make1816TarFiles.pl
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/pkgscrpts/testbinaries.sh b/bin/pkgscrpts/testbinaries.sh
index 1950213..c27fd07 100644
--- a/bin/pkgscrpts/testbinaries.sh
+++ b/bin/pkgscrpts/testbinaries.sh
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/reconfigure b/bin/reconfigure
index ffd98ed..5f133d7 100755
--- a/bin/reconfigure
+++ b/bin/reconfigure
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -141,10 +141,4 @@ echo
echo " Running API version generation script:"
bin/make_vers src/H5vers.txt || exit 1
-# Run flex
-# automatically generates the lexical file for hl/src/H5LTanalyze.c
-echo
-echo " Running flex generation script:"
-bin/genltanalyze || exit 1
-
exit 0
diff --git a/bin/release b/bin/release
index 3f75a00..7c664f8 100755
--- a/bin/release
+++ b/bin/release
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -169,14 +169,14 @@ tar2zip()
# Note: do this in a temporary directory to avoid changing
# the original source directory which may be around.
# 2. add build-unix.sh script.
-# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
# 4. create gzipped tar file with these contents:
# build-unix.sh script
# hdf5-<version> source code directory extracted from tar file
# CTestScript.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5config.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5options.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
-# SZip.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
+# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
@@ -188,46 +188,47 @@ tar2zip()
# Returns 0 if successful; 1 otherwise
#
# need function to create another temporary directory, extract the
- # $tmpdir/$HDF5_VERS.tar into it, add (create) build-unix.sh,
- # CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz and ZLib.tar.gz,
- # and then tar.gz it.
+ # $tmpdir/$HDF5_VERS.tar into it, create build-VS*.bat files,
+ # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
+ # ZLib.tar.gz, HDF5 examples, and then zip it.
tar2cmakezip()
{
if [ $# -ne 3 ]; then
- echo "usage: tar2cmakezip <tarfilename> <tgzfilename>"
+ echo "usage: tar2cmakezip <tarfilename> <zipfilename>"
return 1
fi
cmziptmpdir=/tmp/cmziptmpdir$$
- mkdir -p $cmziptmpdir
+ cmziptmpsubdir=$cmziptmpdir/CMake-$HDF5_VERS
+ mkdir -p $cmziptmpsubdir
version=$1
tarfile=$2
zipfile=$3
# step 1: untar tarball in cmgztmpdir
- (cd $cmziptmpdir; tar xf -) < $tarfile
+ (cd $cmziptmpsubdir; tar xf -) < $tarfile
# sanity check
- if [ ! -d $cmziptmpdir/$version ]; then
- echo "untar did not create $cmziptmpdir/$version source dir"
+ if [ ! -d $cmziptmpsubdir/$version ]; then
+ echo "untar did not create $cmziptmpsubdir/$version source dir"
# cleanup
rm -rf $cmziptmpdir
return 1
fi
- # step 2: add batch files for building CMake on windows
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2013-32.bat $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2013-64.bat $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2015-32.bat $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2015-64.bat $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2017-32.bat $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2017-64.bat $cmziptmpdir
-
- # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmziptmpdir
- cp $cmziptmpdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpdir
- cp $cmziptmpdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpdir
- cp $cmziptmpdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpdir
+ # step 2: add batch file for building CMake on window
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -V -O hdf5.log" > build-VS2013-32.bat; chmod 755 build-VS2013-32.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -V -O hdf5.log" > build-VS2013-64.bat; chmod 755 build-VS2013-64.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf5.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat)
+ (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat)
+
+ # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
+ cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-0.2.12-Source.tar.gz $cmziptmpsubdir
+ cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
+ cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
+ cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir
# step 4: convert text files
# There maybe a simpler way to do this.
@@ -235,16 +236,12 @@ tar2cmakezip()
# -k Keep the date stamp
# -q quiet mode
# grep redirect output to /dev/null because -q or -s are not portable.
- find $cmziptmpdir/$version | \
+ find $cmziptmpsubdir/$version | \
while read inf; do \
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
unix2dos -q -k $inf; \
fi\
done
-
-
- mkdir $cmziptmpdir/CMake-$HDF5_VERS
- mv $cmziptmpdir/* $cmziptmpdir/CMake-$HDF5_VERS
# step 3: make zipball
# -9 maximum compression
# -y Store symbolic links as such in the zip archive
@@ -270,14 +267,14 @@ tar2cmakezip()
# Note: do this in a temporary directory to avoid changing
# the original source directory which may be around.
# 2. add build-unix.sh script.
-# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
# 4. create gzipped tar file with these contents:
# build-unix.sh script
# hdf5-<version> source code directory extracted from tar file
# CTestScript.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5config.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5options.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
-# SZip.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
+# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
@@ -289,9 +286,9 @@ tar2cmakezip()
# Returns 0 if successful; 1 otherwise
#
# need function to create another temporary directory, extract the
- # $tmpdir/$HDF5_VERS.tar into it, add (create) build-unix.sh,
- # CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz and ZLib.tar.gz,
- # and then tar.gz it.
+ # $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh,
+ # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
+ # ZLib.tar.gz, HDF5 examples, and then tar.gz it.
tar2cmaketgz()
{
if [ $# -ne 3 ]; then
@@ -299,16 +296,17 @@ tar2cmaketgz()
return 1
fi
cmgztmpdir=/tmp/cmgztmpdir$$
- mkdir -p $cmgztmpdir
+ cmgztmpsubdir=$cmgztmpdir/CMake-$HDF5_VERS
+ mkdir -p $cmgztmpsubdir
version=$1
tarfile=$2
tgzfile=$3
# step 1: untar tarball in cmgztmpdir
- (cd $cmgztmpdir; tar xf -) < $tarfile
+ (cd $cmgztmpsubdir; tar xf -) < $tarfile
# sanity check
- if [ ! -d $cmgztmpdir/$version ]; then
- echo "untar did not create $cmgztmpdir/$version source dir"
+ if [ ! -d $cmgztmpsubdir/$version ]; then
+ echo "untar did not create $cmgztmpsubdir/$version source dir"
# cleanup
rm -rf $cmgztmpdir
return 1
@@ -316,17 +314,15 @@ tar2cmaketgz()
# step 2: add build-unix.sh script
- (cd $cmgztmpdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh)
-
- # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmgztmpdir
- cp $cmgztmpdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpdir
- cp $cmgztmpdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpdir
- cp $cmgztmpdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpdir
- mkdir $cmgztmpdir/CMake-$HDF5_VERS
- mv $cmgztmpdir/* $cmgztmpdir/CMake-$HDF5_VERS
+ (cd $cmgztmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh)
+
+ # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
+ cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-0.2.12-Source.tar.gz $cmgztmpsubdir
+ cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
+ cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
+ cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir
tar czf $DEST/CMake-$HDF5_VERS.tar.gz -C $cmgztmpdir . || exit 1
# cleanup
@@ -453,12 +449,6 @@ fi
bin/chkmanifest || fail=yes
if [ "X$fail" = "Xyes" ]; then
if [ $check = yes ]; then
- echo ""
- echo "Note! If you are running bin/release in a development branch"
- echo "later than v 1.8 the MANIFEST check is expected to fail when"
- echo "autogen.sh has not been run successfully. Either run autogen.sh "
- echo "with /usr/hdf/bin/AUTOTOOLS at the beginning of PATH or add the"
- echo "--nocheck argument to the bin/release command."
exit 1
else
echo "Continuing anyway..."
diff --git a/bin/runtest b/bin/runtest
index d55099f..9501c52 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/snapshot b/bin/snapshot
index c144125..aa32b34 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/bin/snapshot_version b/bin/snapshot_version
index cb2fd2e..eea5bc9 100644
--- a/bin/snapshot_version
+++ b/bin/snapshot_version
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/bin/switch_maint_mode b/bin/switch_maint_mode
new file mode 100755
index 0000000..fb1568b
--- /dev/null
+++ b/bin/switch_maint_mode
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Switch AM_MAINTAINER_MODE value in configure.ac
+# Usage: See USAGE()
+# Programmer: Dana Robinson
+# Creation date: January 2016
+
+USAGE()
+{
+cat <<EOF
+
+switch_maint_mode reverses the status of AM_MAINTAINER_MODE in
+configure.ac from enable to disable or vice-versa. When enabled,
+this feature forces the autotools to run when the input files are
+older than the output files. This is the default for development
+branches. When disabled, the autotools will NOT be re-run regardless
+of their timestamps or any modifications. This is the default for
+tarballs and release branches since it avoids having end-users
+requiring the autotools.
+
+Command Syntax
+==============
+switch_maint_mode [-help] [-enable|disable] <path-to-configure.ac>
+
+EOF
+}
+
+MODE="notset"
+CONFIG_AC_PATH=
+
+# Display help/usage if any options were passed in
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -enable)
+ MODE="enable"
+ ;;
+ -disable)
+ MODE="disable"
+ ;;
+ -help)
+ USAGE
+ exit 0
+ ;;
+ *)
+ CONFIG_AC_PATH="$1"
+ ;;
+ esac
+ shift
+done
+
+# Did we get a file path?
+if test -z $CONFIG_AC_PATH ; then
+ USAGE
+ exit 1
+fi
+
+# Did we get a mode?
+if test -z $MODE ; then
+ USAGE
+ exit 1
+fi
+
+# Run perl over configure.ac
+if test "X-$MODE" = "X-enable" ; then
+ perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1enable$3/g' $CONFIG_AC_PATH
+fi
+if test "X-$MODE" = "X-disable" ; then
+ perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1disable$3/g' $CONFIG_AC_PATH
+fi
+
diff --git a/bin/test-driver b/bin/test-driver
index d306056..d306056 100644..100755
--- a/bin/test-driver
+++ b/bin/test-driver
diff --git a/bin/timekeeper b/bin/timekeeper
index 14adf2c..03bc8d5 100755
--- a/bin/timekeeper
+++ b/bin/timekeeper
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/bin/trace b/bin/trace
index 8b3f68e..46076ea 100755
--- a/bin/trace
+++ b/bin/trace
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
##
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -7,11 +7,12 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
require 5.003;
+use warnings;
$Source = "";
##############################################################################
@@ -30,28 +31,29 @@ $Source = "";
"hbool_t" => "b",
"double" => "d",
"H5D_alloc_time_t" => "Da",
- "H5FD_mpio_collective_opt_t" => "Dc",
+ "H5FD_mpio_collective_opt_t" => "Dc",
"H5D_fill_time_t" => "Df",
"H5D_fill_value_t" => "DF",
- "H5FD_mpio_chunk_opt_t" => "Dh",
+ "H5FD_mpio_chunk_opt_t" => "Dh",
"H5D_mpio_actual_io_mode_t" => "Di",
"H5D_layout_t" => "Dl",
"H5D_mpio_no_collective_cause_t" => "Dn",
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
"H5D_space_status_t" => "Ds",
"H5FD_mpio_xfer_t" => "Dt",
+ "H5FD_splitter_vfd_config_t" => "Dr",
"herr_t" => "e",
"H5E_direction_t" => "Ed",
"H5E_error_t" => "Ee",
- "H5E_type_t" => "Et",
- "H5F_close_degree_t" => "Fd",
+ "H5E_type_t" => "Et",
+ "H5F_close_degree_t" => "Fd",
"H5F_scope_t" => "Fs",
- "H5F_libver_t" => "Fv",
+ "H5F_libver_t" => "Fv",
"H5G_obj_t" => "Go",
"H5G_stat_t" => "Gs",
- "hsize_t" => "h",
+ "hsize_t" => "h",
"hssize_t" => "Hs",
- "H5E_major_t" => "i",
+ "H5E_major_t" => "i",
"H5E_minor_t" => "i",
"H5_iter_order_t" => "Io",
"H5_index_t" => "Ii",
@@ -61,16 +63,17 @@ $Source = "";
"unsigned" => "Iu",
"unsigned int" => "Iu",
"uint32_t" => "Iu",
+ "uint64_t" => "UL",
"H5I_type_t" => "It",
- "H5G_link_t" => "Ll", #Same as H5L_type_t now
- "H5L_type_t" => "Ll",
+ "H5G_link_t" => "Ll", #Same as H5L_type_t now
+ "H5L_type_t" => "Ll",
"MPI_Comm" => "Mc",
"MPI_Info" => "Mi",
"H5FD_mem_t" => "Mt",
"off_t" => "o",
"H5O_type_t" => "Ot",
"H5P_class_t" => "p",
- "hobj_ref_t" => "r",
+ "hobj_ref_t" => "r",
"H5R_type_t" => "Rt",
"char" => "s",
"unsigned char" => "s",
@@ -92,9 +95,9 @@ $Source = "";
"void" => "x",
"FILE" => "x",
"H5A_operator_t" => "x",
- "H5A_operator1_t" => "x",
- "H5A_operator2_t" => "x",
- "H5A_info_t" => "x",
+ "H5A_operator1_t" => "x",
+ "H5A_operator2_t" => "x",
+ "H5A_info_t" => "x",
"H5AC_cache_config_t" => "x",
"H5D_gather_func_t" => "x",
"H5D_operator_t" => "x",
@@ -105,21 +108,24 @@ $Source = "";
"H5E_walk_t" => "x",
"H5E_walk1_t" => "x",
"H5E_walk2_t" => "x",
- "H5F_info_t" => "x",
+ "H5F_info_t" => "x",
"H5FD_t" => "x",
"H5FD_class_t" => "x",
"H5FD_stream_fapl_t" => "x",
+ "H5FD_ros3_fapl_t" => "x",
+ "H5FD_hdfs_fapl_t" => "x",
"H5FD_file_image_callbacks_t" => "x",
+ "H5FD_mirror_fapl_t" => "x",
"H5G_iterate_t" => "x",
- "H5G_info_t" => "x",
- "H5I_free_t" => "x",
- "H5I_search_func_t" => "x",
- "H5L_class_t" => "x",
+ "H5G_info_t" => "x",
+ "H5I_free_t" => "x",
+ "H5I_search_func_t" => "x",
+ "H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
"H5L_iterate_t" => "x",
"H5MM_allocate_t" => "x",
"H5MM_free_t" => "x",
- "H5O_info_t" => "x",
+ "H5O_info_t" => "x",
"H5O_iterate_t" => "x",
"H5O_mcdt_search_cb_t" => "x",
"H5P_cls_create_func_t" => "x",
@@ -147,9 +153,19 @@ $Source = "";
"ssize_t" => "Zs",
);
+
+##############################################################################
+# Maximum length of H5TRACE macro line
+# If the ColumnLimit in .clang-format is changed, this value will need to be updated
+#
+my $max_trace_macro_line_len = 110;
+
+
##############################################################################
# Print an error message.
#
+my $found_errors = 0;
+
sub errmesg ($$@) {
my ($file, $func, @mesg) = @_;
my ($mesg) = join "", @mesg;
@@ -159,6 +175,8 @@ sub errmesg ($$@) {
$lineno = tr/\n/\n/;
}
+ $found_errors = 1;
+
print "$file: in function \`$func\':\n";
print "$file:$lineno: $mesg\n";
}
@@ -175,6 +193,11 @@ sub argstring ($$$) {
# certain type qualifiers, and indirection.
$atype =~ s/^\bconst\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g;
+ $atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEBUG_API_USED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_USED\b//g;
$atype =~ s/\s+/ /g;
$ptr = length $1 if $atype =~ s/(\*+)//;
$atype =~ s/^\s+//;
@@ -215,7 +238,7 @@ sub rewrite_func ($$$$$) {
# Parse arguments
if ($args eq "void") {
- $trace = "H5TRACE0(\"$rettype\",\"\");\n";
+ $trace = "H5TRACE0(\"$rettype\", \"\");\n";
} else {
# Split arguments. First convert `/*in,out*/' to get rid of the
# comma, then split the arguments on commas.
@@ -229,48 +252,64 @@ sub rewrite_func ($$$$$) {
next;
}
unless ($arg=~/^(([a-z_A-Z]\w*\s+)+\**)
- ([a-z_A-Z]\w*)(\[.*?\])?
- (\s*\/\*\s*(in|out|in_out)\s*\*\/)?\s*$/x) {
- errmesg $file, $name, "unable to parse \`$arg\'";
- goto error;
+ ([a-z_A-Z]\w*)(\[.*?\])?
+ (\s*\/\*\s*(in|out|in_out)\s*\*\/)?\s*$/x) {
+ errmesg $file, $name, "unable to parse \`$arg\'";
+ goto error;
} else {
- my ($atype, $aname, $array, $adir) = ($1, $3, $4, $6);
- $names{$aname} = $argno++;
- $adir ||= "in";
- $atype =~ s/\s+$//;
- push @arg_name, $aname;
+ my ($atype, $aname, $array, $adir) = ($1, $3, $4, $6);
+ $names{$aname} = $argno++;
+ $adir ||= "in";
+ $atype =~ s/\s+$//;
+ push @arg_name, $aname;
- if ($adir eq "out") {
- push @arg_str, "x";
- } else {
- if (defined $array) {
- $atype .= "*";
- if ($array =~ /^\[\/\*([a-z_A-Z]\w*)\*\/\]$/) {
- my $asize = $1;
- if (exists $names{$asize}) {
- $atype .= '[a' . $names{$asize} . ']';
- } else {
- warn "bad array size: $asize";
- $atype .= "*";
- }
- }
- }
- push @arg_str, argstring $file, $name, $atype;
- }
+ if ($adir eq "out") {
+ push @arg_str, "x";
+ } else {
+ if (defined $array) {
+ $atype .= "*";
+ if ($array =~ /^\[\/\*([a-z_A-Z]\w*)\*\/\]$/) {
+ my $asize = $1;
+ if (exists $names{$asize}) {
+ $atype .= '[a' . $names{$asize} . ']';
+ } else {
+ warn "bad array size: $asize";
+ $atype .= "*";
+ }
+ }
+ }
+ push @arg_str, argstring $file, $name, $atype;
+ }
}
}
+
+ # Compose the trace macro
$trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \"";
$trace .= join("", @arg_str) . "\"";
- my $len = 4 + length $trace;
+ my $len = 4 + length $trace; # Add 4, for indenting the line
for (@arg_name) {
- if ($len + length >= 77) {
- $trace .= ",\n $_";
- $len = 13 + length;
+ # Wrap lines that will be longer than the limit, after ');' is added
+ if ($len + length >= ($max_trace_macro_line_len - 2)) {
+ # Wrap line, with indention
+ $trace .= ",\n ";
+ $len = 13; # Set to 13, for indention
+
+ # Indent an extra space to account for extra digit in 'H5TRACE' macro
+ if (scalar(@arg_str) >= 10) {
+ $trace .= " ";
+ $len++;
+ }
} else {
- $trace .= ", $_";
- $len += 1 + length;
+ $trace .= ", ";
+ $len += 2; # Add 2, for ', '
}
+
+ # Append argument
+ $trace .= "$_";
+ $len += length; # Add length of appended argument name
}
+
+ # Append final ');' for macro
$trace .= ");\n";
}
goto error if grep {/!/} @arg_str;
@@ -280,7 +319,7 @@ sub rewrite_func ($$$$$) {
# Ignored due to NO TRACE comment.
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
# Replaced an H5TRACE macro.
- } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
+ } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*[ \t]*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
errmesg $file, $name, "unable to insert tracing information";
@@ -328,5 +367,13 @@ for $file (@ARGV) {
}
}
-printf "Finished processing HDF5 API calls\n"
+if ($found_errors eq 1) {
+ printf "\n";
+ printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
+ printf "*** ERRORS FOUND *** ERRORS FOUND *** ERRORS FOUND ****\n";
+ printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
+ exit 1;
+} else {
+ printf "Finished processing HDF5 API calls\n";
+}
diff --git a/bin/yodconfigure b/bin/yodconfigure
index 44d7d99..a91507d 100755
--- a/bin/yodconfigure
+++ b/bin/yodconfigure
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 2c161f1..036735e 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -1,31 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_CPP)
-
-#-----------------------------------------------------------------------------
-# Apply Definitions to compiler in this directory and below
-#-----------------------------------------------------------------------------
-add_definitions (${HDF_EXTRA_C_FLAGS})
-
-#-----------------------------------------------------------------------------
-# Generate configure file
-#-----------------------------------------------------------------------------
-configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
- ${HDF5_BINARY_DIR}/H5cxx_pubconf.h
-)
-
-#-----------------------------------------------------------------------------
-# Setup Include directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_CPP_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
-
-#-----------------------------------------------------------------------------
-# Parallel/MPI, prevent spurious cpp/cxx warnings
-#-----------------------------------------------------------------------------
-if (H5_HAVE_PARALLEL)
- add_definitions ("-DMPICH_SKIP_MPICXX")
- add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
-endif ()
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_CPP CXX)
add_subdirectory (src)
diff --git a/c++/COPYING b/c++/COPYING
index 6497ace..97969da 100644
--- a/c++/COPYING
+++ b/c++/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/c++/Makefile.am b/c++/Makefile.am
index 94fbefc..3219747 100644
--- a/c++/Makefile.am
+++ b/c++/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -18,9 +18,15 @@
include $(top_srcdir)/config/commence.am
+if BUILD_TESTS_CONDITIONAL
+ TEST_DIR = test
+else
+ TEST_DIR=
+endif
+
## Only recurse into subdirectories if C++ interface is enabled.
if BUILD_CXX_CONDITIONAL
- SUBDIRS=src test
+ SUBDIRS=src $(TEST_DIR)
endif
DIST_SUBDIRS = src test examples
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 8598ae7..1e16e4f 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -406,9 +406,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -423,6 +423,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -441,6 +442,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -468,6 +470,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -475,9 +479,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -493,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,6 +522,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -526,8 +535,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -541,6 +552,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -582,6 +594,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -665,14 +678,16 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-@BUILD_CXX_CONDITIONAL_TRUE@SUBDIRS = src test
+@BUILD_TESTS_CONDITIONAL_FALSE@TEST_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TEST_DIR = test
+@BUILD_CXX_CONDITIONAL_TRUE@SUBDIRS = src $(TEST_DIR)
DIST_SUBDIRS = src test examples
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1179,6 +1194,7 @@ check-clean ::
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1214,7 +1230,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1375,7 +1391,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 22ecb19..c50315f 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_CPP_EXAMPLES)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -34,18 +34,54 @@ set (tutr_examples
foreach (example ${examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
- TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
- target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (cpp_ex_${example} STATIC)
+ target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
+ target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE -static-libgcc -static-libstdc++
+ )
+ endif ()
+ endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
+ endif ()
endforeach ()
foreach (example ${tutr_examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
- TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
- target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories (cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (cpp_ex_${example} STATIC)
+ target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
+ target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE -static-libgcc -static-libstdc++
+ )
+ endif ()
+ endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
+ endif ()
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index bd1f95b..a7fc9b8 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,81 +16,79 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
- add_test (
- NAME CPP_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- Group.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "CPP_ex-clear-objects")
+add_test (
+ NAME CPP_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ Group.h5
+ SDS.h5
+ SDScompound.h5
+ SDSextendible.h5
+ Select.h5
+)
+set_tests_properties (CPP_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_cppex)
- foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- else ()
- add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=cpp_ex_${example}.txt"
- #-D "TEST_REFERENCE=cpp_ex_${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "CPP_ex_${example}")
- endforeach ()
+foreach (example ${examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (CPP_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_cppex)
+ if (last_test)
+ set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "CPP_ex_${example}")
+endforeach ()
#the following dependencies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
- add_test (
- NAME CPP_ex_tutr-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5tutr_cmprss.h5
- h5tutr_dset.h5
- h5tutr_extend.h5
- h5tutr_group.h5
- h5tutr_groups.h5
- h5tutr_subset.h5
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "CPP_ex_tutr-clear-objects")
+add_test (
+ NAME CPP_ex_tutr-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5tutr_cmprss.h5
+ h5tutr_dset.h5
+ h5tutr_extend.h5
+ h5tutr_group.h5
+ h5tutr_groups.h5
+ h5tutr_subset.h5
+)
+set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES FIXTURES_SETUP clear_cppex_tutr)
- foreach (example ${tutr_examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- else ()
- add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=cpp_ex_${example}.txt"
- #-D "TEST_REFERENCE=cpp_ex_${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "CPP_ex_${example}")
- endforeach ()
+foreach (example ${tutr_examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (CPP_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_cppex_tutr)
+ if (last_test)
+ set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "CPP_ex_${example}")
+endforeach ()
#the following dependencies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am
index 51ab8e3..b7d3b04 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -49,8 +49,8 @@ CXX_API=yes
# Where to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR=$(examplesdir)/c++
+EXAMPLETOPDIR=$(examplesdir)
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index 1bd5fb1..40d4d7c 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -353,9 +353,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -370,6 +370,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -388,6 +389,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -415,6 +417,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -422,9 +426,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -440,6 +447,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,6 +469,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -473,8 +482,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -488,6 +499,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -529,6 +541,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -637,8 +650,8 @@ CXX_API = yes
# Where to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR = $(examplesdir)/c++
+EXAMPLETOPDIR = $(examplesdir)
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -648,11 +661,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1132,6 +1145,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1167,7 +1181,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1328,7 +1342,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp
index ba2c089..25490ec 100644
--- a/c++/examples/chunks.cpp
+++ b/c++/examples/chunks.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,31 +25,31 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "SDSextendible.h5" );
-const H5std_string DATASET_NAME( "ExtendibleArray" );
-const int NX = 10;
-const int NY = 5;
-const int RANK = 2;
-const int RANKC = 1;
+const H5std_string FILE_NAME("SDSextendible.h5");
+const H5std_string DATASET_NAME("ExtendibleArray");
+const int NX = 10;
+const int NY = 5;
+const int RANK = 2;
+const int RANKC = 1;
-int main (void)
+int
+main(void)
{
- hsize_t i, j;
+ hsize_t i, j;
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -59,8 +59,8 @@ int main (void)
/*
* Open the file and the dataset.
*/
- H5File file( FILE_NAME, H5F_ACC_RDONLY );
- DataSet dataset = file.openDataSet( DATASET_NAME );
+ H5File file(FILE_NAME, H5F_ACC_RDONLY);
+ DataSet dataset = file.openDataSet(DATASET_NAME);
/*
* Get filespace for rank and dimension
@@ -75,10 +75,9 @@ int main (void)
/*
* Get and print the dimension sizes of the file dataspace
*/
- hsize_t dims[2]; // dataset dimensions
- rank = filespace.getSimpleExtentDims( dims );
- cout << "dataset rank = " << rank << ", dimensions "
- << (unsigned long)(dims[0]) << " x "
+ hsize_t dims[2]; // dataset dimensions
+ rank = filespace.getSimpleExtentDims(dims);
+ cout << "dataset rank = " << rank << ", dimensions " << (unsigned long)(dims[0]) << " x "
<< (unsigned long)(dims[1]) << endl;
/*
@@ -89,13 +88,12 @@ int main (void)
/*
* Read dataset back and display.
*/
- int data_out[NX][NY]; // buffer for dataset to be read
- dataset.read( data_out, PredType::NATIVE_INT, mspace1, filespace );
+ int data_out[NX][NY]; // buffer for dataset to be read
+ dataset.read(data_out, PredType::NATIVE_INT, mspace1, filespace);
cout << "\n";
cout << "Dataset: \n";
- for (j = 0; j < dims[0]; j++)
- {
+ for (j = 0; j < dims[0]; j++) {
for (i = 0; i < dims[1]; i++)
cout << data_out[j][i] << " ";
cout << endl;
@@ -125,20 +123,20 @@ int main (void)
*/
hsize_t col_dims[1];
col_dims[0] = 10;
- DataSpace mspace2( RANKC, col_dims );
+ DataSpace mspace2(RANKC, col_dims);
/*
* Define the column (hyperslab) to read.
*/
- hsize_t offset[2] = { 0, 2 };
- hsize_t count[2] = { 10, 1 };
- int column[10]; // buffer for column to be read
+ hsize_t offset[2] = {0, 2};
+ hsize_t count[2] = {10, 1};
+ int column[10]; // buffer for column to be read
/*
* Define hyperslab and read.
*/
- filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
- dataset.read( column, PredType::NATIVE_INT, mspace2, filespace );
+ filespace.selectHyperslab(H5S_SELECT_SET, count, offset);
+ dataset.read(column, PredType::NATIVE_INT, mspace2, filespace);
cout << endl;
cout << "Third column: " << endl;
@@ -169,20 +167,18 @@ int main (void)
*/
hsize_t chunk_dims[2];
int rank_chunk;
- if( H5D_CHUNKED == cparms.getLayout() )
- {
+ if (H5D_CHUNKED == cparms.getLayout()) {
/*
* Get chunking information: rank and dimensions
*/
- rank_chunk = cparms.getChunk( 2, chunk_dims);
- cout << "chunk rank " << rank_chunk << "dimensions "
- << (unsigned long)(chunk_dims[0]) << " x "
- << (unsigned long)(chunk_dims[1]) << endl;
+ rank_chunk = cparms.getChunk(2, chunk_dims);
+ cout << "chunk rank " << rank_chunk << "dimensions " << (unsigned long)(chunk_dims[0]) << " x "
+ << (unsigned long)(chunk_dims[1]) << endl;
/*
* Define the memory space to read a chunk.
*/
- DataSpace mspace3( rank_chunk, chunk_dims );
+ DataSpace mspace3(rank_chunk, chunk_dims);
/*
* Define chunk in the file (hyperslab) to read.
@@ -191,17 +187,16 @@ int main (void)
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
- filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
+ filespace.selectHyperslab(H5S_SELECT_SET, count, offset);
/*
* Read chunk back and display.
*/
- int chunk_out[2][5]; // buffer for chunk to be read
- dataset.read( chunk_out, PredType::NATIVE_INT, mspace3, filespace );
+ int chunk_out[2][5]; // buffer for chunk to be read
+ dataset.read(chunk_out, PredType::NATIVE_INT, mspace3, filespace);
cout << endl;
cout << "Chunk:" << endl;
- for (j = 0; j < chunk_dims[0]; j++)
- {
+ for (j = 0; j < chunk_dims[0]; j++) {
for (i = 0; i < chunk_dims[1]; i++)
cout << chunk_out[j][i] << " ";
cout << endl;
@@ -212,25 +207,22 @@ int main (void)
* 2 0 0 0 0
*/
}
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch( FileIException error )
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp
index 284ce16..eb67b61 100644
--- a/c++/examples/compound.cpp
+++ b/c++/examples/compound.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,186 +26,181 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "SDScompound.h5" );
-const H5std_string DATASET_NAME( "ArrayOfStructures" );
-const H5std_string MEMBER1( "a_name" );
-const H5std_string MEMBER2( "b_name" );
-const H5std_string MEMBER3( "c_name" );
-const int LENGTH = 10;
-const int RANK = 1;
+const H5std_string FILE_NAME("SDScompound.h5");
+const H5std_string DATASET_NAME("ArrayOfStructures");
+const H5std_string MEMBER1("a_name");
+const H5std_string MEMBER2("b_name");
+const H5std_string MEMBER3("c_name");
+const int LENGTH = 10;
+const int RANK = 1;
-int main(void)
+int
+main(void)
{
- /* First structure and dataset*/
- typedef struct s1_t {
+ /* First structure and dataset*/
+ typedef struct s1_t {
int a;
float b;
double c;
- } s1_t;
+ } s1_t;
- /* Second structure (subset of s1_t) and dataset*/
- typedef struct s2_t {
+ /* Second structure (subset of s1_t) and dataset*/
+ typedef struct s2_t {
double c;
int a;
- } s2_t;
-
- // Try block to detect exceptions raised by any of the calls inside it
- try
- {
- /*
- * Initialize the data
- */
- int i;
- s1_t s1[LENGTH];
- for (i = 0; i< LENGTH; i++)
- {
- s1[i].a = i;
- s1[i].b = i*i;
- s1[i].c = 1./(i+1);
- }
-
- /*
- * Turn off the auto-printing when failure occurs so that we can
- * handle the errors appropriately
- */
- Exception::dontPrint();
-
- /*
- * Create the data space.
- */
- hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
- DataSpace space( RANK, dim );
-
- /*
- * Create the file.
- */
- H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
-
- /*
- * Create the memory datatype.
- */
- CompType mtype1( sizeof(s1_t) );
- mtype1.insertMember( MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT);
- mtype1.insertMember( MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE);
- mtype1.insertMember( MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
-
- /*
- * Create the dataset.
- */
- DataSet* dataset;
- dataset = new DataSet(file->createDataSet(DATASET_NAME, mtype1, space));
-
- /*
- * Write data to the dataset;
- */
- dataset->write( s1, mtype1 );
-
- /*
- * Release resources
- */
- delete dataset;
- delete file;
-
- /*
- * Open the file and the dataset.
- */
- file = new H5File( FILE_NAME, H5F_ACC_RDONLY );
- dataset = new DataSet (file->openDataSet( DATASET_NAME ));
-
- /*
- * Create a datatype for s2
- */
- CompType mtype2( sizeof(s2_t) );
-
- mtype2.insertMember( MEMBER3, HOFFSET(s2_t, c), PredType::NATIVE_DOUBLE);
- mtype2.insertMember( MEMBER1, HOFFSET(s2_t, a), PredType::NATIVE_INT);
-
- /*
- * Read two fields c and a from s1 dataset. Fields in the file
- * are found by their names "c_name" and "a_name".
- */
- s2_t s2[LENGTH];
- dataset->read( s2, mtype2 );
-
- /*
- * Display the fields
- */
- cout << endl << "Field c : " << endl;
- for( i = 0; i < LENGTH; i++)
- cout << s2[i].c << " ";
- cout << endl;
-
- cout << endl << "Field a : " << endl;
- for( i = 0; i < LENGTH; i++)
- cout << s2[i].a << " ";
- cout << endl;
-
- /*
- * Create a datatype for s3.
- */
- CompType mtype3( sizeof(float) );
-
- mtype3.insertMember( MEMBER2, 0, PredType::NATIVE_FLOAT);
-
- /*
- * Read field b from s1 dataset. Field in the file is found by its name.
- */
- float s3[LENGTH]; // Third "structure" - used to read float field of s1
- dataset->read( s3, mtype3 );
-
- /*
- * Display the field
- */
- cout << endl << "Field b : " << endl;
- for( i = 0; i < LENGTH; i++)
- cout << s3[i] << " ";
- cout << endl;
-
- /*
- * Release resources
- */
- delete dataset;
- delete file;
- } // end of try block
-
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataTypeIException error )
- {
- error.printError();
- return -1;
- }
-
- return 0;
+ } s2_t;
+
+ // Try block to detect exceptions raised by any of the calls inside it
+ try {
+ /*
+ * Initialize the data
+ */
+ int i;
+ s1_t s1[LENGTH];
+ for (i = 0; i < LENGTH; i++) {
+ s1[i].a = i;
+ s1[i].b = i * i;
+ s1[i].c = 1. / (i + 1);
+ }
+
+ /*
+ * Turn off the auto-printing when failure occurs so that we can
+ * handle the errors appropriately
+ */
+ Exception::dontPrint();
+
+ /*
+ * Create the data space.
+ */
+ hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
+ DataSpace space(RANK, dim);
+
+ /*
+ * Create the file.
+ */
+ H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
+
+ /*
+ * Create the memory datatype.
+ */
+ CompType mtype1(sizeof(s1_t));
+ mtype1.insertMember(MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT);
+ mtype1.insertMember(MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE);
+ mtype1.insertMember(MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
+
+ /*
+ * Create the dataset.
+ */
+ DataSet *dataset;
+ dataset = new DataSet(file->createDataSet(DATASET_NAME, mtype1, space));
+
+ /*
+ * Write data to the dataset;
+ */
+ dataset->write(s1, mtype1);
+
+ /*
+ * Release resources
+ */
+ delete dataset;
+ delete file;
+
+ /*
+ * Open the file and the dataset.
+ */
+ file = new H5File(FILE_NAME, H5F_ACC_RDONLY);
+ dataset = new DataSet(file->openDataSet(DATASET_NAME));
+
+ /*
+ * Create a datatype for s2
+ */
+ CompType mtype2(sizeof(s2_t));
+
+ mtype2.insertMember(MEMBER3, HOFFSET(s2_t, c), PredType::NATIVE_DOUBLE);
+ mtype2.insertMember(MEMBER1, HOFFSET(s2_t, a), PredType::NATIVE_INT);
+
+ /*
+ * Read two fields c and a from s1 dataset. Fields in the file
+ * are found by their names "c_name" and "a_name".
+ */
+ s2_t s2[LENGTH];
+ dataset->read(s2, mtype2);
+
+ /*
+ * Display the fields
+ */
+ cout << endl << "Field c : " << endl;
+ for (i = 0; i < LENGTH; i++)
+ cout << s2[i].c << " ";
+ cout << endl;
+
+ cout << endl << "Field a : " << endl;
+ for (i = 0; i < LENGTH; i++)
+ cout << s2[i].a << " ";
+ cout << endl;
+
+ /*
+ * Create a datatype for s3.
+ */
+ CompType mtype3(sizeof(float));
+
+ mtype3.insertMember(MEMBER2, 0, PredType::NATIVE_FLOAT);
+
+ /*
+ * Read field b from s1 dataset. Field in the file is found by its name.
+ */
+ float s3[LENGTH]; // Third "structure" - used to read float field of s1
+ dataset->read(s3, mtype3);
+
+ /*
+ * Display the field
+ */
+ cout << endl << "Field b : " << endl;
+ for (i = 0; i < LENGTH; i++)
+ cout << s3[i] << " ";
+ cout << endl;
+
+ /*
+ * Release resources
+ */
+ delete dataset;
+ delete file;
+ } // end of try block
+
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataSpaceIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataTypeIException error) {
+ error.printError();
+ return -1;
+ }
+
+ return 0;
}
diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp
index 2993a0c..6062895 100644
--- a/c++/examples/create.cpp
+++ b/c++/examples/create.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,108 +25,102 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "SDS.h5" );
-const H5std_string DATASET_NAME( "IntArray" );
-const int NX = 5; // dataset dimensions
-const int NY = 6;
-const int RANK = 2;
+const H5std_string FILE_NAME("SDS.h5");
+const H5std_string DATASET_NAME("IntArray");
+const int NX = 5; // dataset dimensions
+const int NY = 6;
+const int RANK = 2;
-int main (void)
+int
+main(void)
{
- /*
- * Data initialization.
- */
- int i, j;
- int data[NX][NY]; // buffer for data to write
- for (j = 0; j < NX; j++)
- {
- for (i = 0; i < NY; i++)
- data[j][i] = i + j;
- }
- /*
- * 0 1 2 3 4 5
- * 1 2 3 4 5 6
- * 2 3 4 5 6 7
- * 3 4 5 6 7 8
- * 4 5 6 7 8 9
- */
-
- // Try block to detect exceptions raised by any of the calls inside it
- try
- {
- /*
- * Turn off the auto-printing when failure occurs so that we can
- * handle the errors appropriately
- */
- Exception::dontPrint();
-
- /*
- * Create a new file using H5F_ACC_TRUNC access,
- * default file creation properties, and default file
- * access properties.
- */
- H5File file( FILE_NAME, H5F_ACC_TRUNC );
-
- /*
- * Define the size of the array and create the data space for fixed
- * size dataset.
- */
- hsize_t dimsf[2]; // dataset dimensions
- dimsf[0] = NX;
- dimsf[1] = NY;
- DataSpace dataspace( RANK, dimsf );
-
- /*
- * Define datatype for the data in the file.
- * We will store little endian INT numbers.
- */
- IntType datatype( PredType::NATIVE_INT );
- datatype.setOrder( H5T_ORDER_LE );
-
- /*
- * Create a new dataset within the file using defined dataspace and
- * datatype and default dataset creation properties.
- */
- DataSet dataset = file.createDataSet( DATASET_NAME, datatype, dataspace );
-
- /*
- * Write the data to the dataset using default memory space, file
- * space, and transfer properties.
- */
- dataset.write( data, PredType::NATIVE_INT );
- } // end of try block
-
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataTypeIException error )
- {
- error.printError();
- return -1;
- }
-
- return 0; // successfully terminated
+ /*
+ * Data initialization.
+ */
+ int i, j;
+ int data[NX][NY]; // buffer for data to write
+ for (j = 0; j < NX; j++) {
+ for (i = 0; i < NY; i++)
+ data[j][i] = i + j;
+ }
+ /*
+ * 0 1 2 3 4 5
+ * 1 2 3 4 5 6
+ * 2 3 4 5 6 7
+ * 3 4 5 6 7 8
+ * 4 5 6 7 8 9
+ */
+
+ // Try block to detect exceptions raised by any of the calls inside it
+ try {
+ /*
+ * Turn off the auto-printing when failure occurs so that we can
+ * handle the errors appropriately
+ */
+ Exception::dontPrint();
+
+ /*
+ * Create a new file using H5F_ACC_TRUNC access,
+ * default file creation properties, and default file
+ * access properties.
+ */
+ H5File file(FILE_NAME, H5F_ACC_TRUNC);
+
+ /*
+ * Define the size of the array and create the data space for fixed
+ * size dataset.
+ */
+ hsize_t dimsf[2]; // dataset dimensions
+ dimsf[0] = NX;
+ dimsf[1] = NY;
+ DataSpace dataspace(RANK, dimsf);
+
+ /*
+ * Define datatype for the data in the file.
+ * We will store little endian INT numbers.
+ */
+ IntType datatype(PredType::NATIVE_INT);
+ datatype.setOrder(H5T_ORDER_LE);
+
+ /*
+ * Create a new dataset within the file using defined dataspace and
+ * datatype and default dataset creation properties.
+ */
+ DataSet dataset = file.createDataSet(DATASET_NAME, datatype, dataspace);
+
+ /*
+ * Write the data to the dataset using default memory space, file
+ * space, and transfer properties.
+ */
+ dataset.write(data, PredType::NATIVE_INT);
+ } // end of try block
+
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataSpaceIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataTypeIException error) {
+ error.printError();
+ return -1;
+ }
+
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index dbedfc9..ed28dbb 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,212 +27,206 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "SDSextendible.h5" );
-const H5std_string DATASET_NAME( "ExtendibleArray" );
-const int NX = 10;
-const int NY = 5;
-const int RANK = 2;
+const H5std_string FILE_NAME("SDSextendible.h5");
+const H5std_string DATASET_NAME("ExtendibleArray");
+const int NX = 10;
+const int NY = 5;
+const int RANK = 2;
-int main (void)
+int
+main(void)
{
- /*
- * Try block to detect exceptions raised by any of the calls inside it
- */
- try
- {
- /*
- * Turn off the auto-printing when failure occurs so that we can
- * handle the errors appropriately
- */
- Exception::dontPrint();
-
- /*
- * Create the data space with unlimited dimensions.
- */
- hsize_t dims[2] = { 3, 3}; // dataset dimensions at creation
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- DataSpace mspace1( RANK, dims, maxdims);
-
- /*
- * Create a new file. If file exists its contents will be overwritten.
- */
- H5File file( FILE_NAME, H5F_ACC_TRUNC );
-
- /*
- * Modify dataset creation properties, i.e. enable chunking.
- */
- DSetCreatPropList cparms;
-
- hsize_t chunk_dims[2] ={2, 5};
- cparms.setChunk( RANK, chunk_dims );
-
- /*
- * Set fill value for the dataset
- */
- int fill_val = 0;
- cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
-
- /*
- * Create a new dataset within the file using cparms
- * creation properties.
- */
- DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
-
- /*
- * Extend the dataset. This call assures that dataset is at least 3 x 3.
- */
- hsize_t size[2];
- size[0] = 3;
- size[1] = 3;
- dataset.extend( size );
-
- /*
- * Select a hyperslab.
- */
- DataSpace fspace1 = dataset.getSpace ();
- hsize_t offset[2];
- offset[0] = 0;
- offset[1] = 0;
- hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */
- fspace1.selectHyperslab( H5S_SELECT_SET, dims1, offset );
-
- /*
- * Write the data to the hyperslab.
- */
- int data1[3][3] = { {1, 1, 1}, /* data to write */
- {1, 1, 1},
- {1, 1, 1} };
- dataset.write( data1, PredType::NATIVE_INT, mspace1, fspace1 );
-
- /*
- * Extend the dataset. Dataset becomes 10 x 3.
- */
- hsize_t dims2[2] = { 7, 1}; /* data2 dimensions */
- dims[0] = dims1[0] + dims2[0];
- size[0] = dims[0];
- size[1] = dims[1];
- dataset.extend( size );
-
- /*
- * Select a hyperslab.
- */
- DataSpace fspace2 = dataset.getSpace ();
- offset[0] = 3;
- offset[1] = 0;
- fspace2.selectHyperslab( H5S_SELECT_SET, dims2, offset );
-
- /*
- * Define memory space
- */
- DataSpace mspace2( RANK, dims2 );
-
- /*
- * Write the data to the hyperslab.
- */
- int data2[7] = { 2, 2, 2, 2, 2, 2, 2};
- dataset.write( data2, PredType::NATIVE_INT, mspace2, fspace2 );
-
- /*
- * Extend the dataset. Dataset becomes 10 x 5.
- */
- hsize_t dims3[2] = { 2, 2}; /* data3 dimensions */
- dims[1] = dims1[1] + dims3[1];
- size[0] = dims[0];
- size[1] = dims[1];
- dataset.extend( size );
-
- /*
- * Select a hyperslab
- */
- DataSpace fspace3 = dataset.getSpace ();
- offset[0] = 0;
- offset[1] = 3;
- fspace3.selectHyperslab( H5S_SELECT_SET, dims3, offset );
-
- /*
- * Define memory space.
- */
- DataSpace mspace3( RANK, dims3 );
-
- /*
- * Write the data to the hyperslab.
- */
- int data3[2][2] = { {3, 3}, {3, 3} };
- dataset.write( data3, PredType::NATIVE_INT, mspace3, fspace3 );
-
- /*
- * Read the data from this dataset and display it.
- */
- int i, j;
- int data_out[NX][NY];
- for (i = 0; i < NX; i++)
- {
- for (j = 0; j < NY; j++)
- data_out[i][j] = 0;
- }
- dataset.read( data_out, PredType::NATIVE_INT );
- /*
- * Resulting dataset
- *
- * 1 1 1 3 3
- * 1 1 1 3 3
- * 1 1 1 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- * 2 0 0 0 0
- */
- /*
- * Display the result.
- */
- for (i=0; i < NX; i++)
- {
- for(j=0; j < NY; j++)
- cout << data_out[i][j] << " ";
- cout << endl;
- }
- } // end of try block
-
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataTypeIException error )
- {
- error.printError();
- return -1;
- }
- return 0;
+ /*
+ * Try block to detect exceptions raised by any of the calls inside it
+ */
+ try {
+ /*
+ * Turn off the auto-printing when failure occurs so that we can
+ * handle the errors appropriately
+ */
+ Exception::dontPrint();
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ hsize_t dims[2] = {3, 3}; // dataset dimensions at creation
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ DataSpace mspace1(RANK, dims, maxdims);
+
+ /*
+ * Create a new file. If file exists its contents will be overwritten.
+ */
+ H5File file(FILE_NAME, H5F_ACC_TRUNC);
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking.
+ */
+ DSetCreatPropList cparms;
+
+ hsize_t chunk_dims[2] = {2, 5};
+ cparms.setChunk(RANK, chunk_dims);
+
+ /*
+ * Set fill value for the dataset
+ */
+ int fill_val = 0;
+ cparms.setFillValue(PredType::NATIVE_INT, &fill_val);
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ DataSet dataset = file.createDataSet(DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
+
+ /*
+ * Extend the dataset. This call assures that dataset is at least 3 x 3.
+ */
+ hsize_t size[2];
+ size[0] = 3;
+ size[1] = 3;
+ dataset.extend(size);
+
+ /*
+ * Select a hyperslab.
+ */
+ DataSpace fspace1 = dataset.getSpace();
+ hsize_t offset[2];
+ offset[0] = 0;
+ offset[1] = 0;
+ hsize_t dims1[2] = {3, 3}; /* data1 dimensions */
+ fspace1.selectHyperslab(H5S_SELECT_SET, dims1, offset);
+
+ /*
+ * Write the data to the hyperslab.
+ */
+ int data1[3][3] = {{1, 1, 1}, /* data to write */
+ {1, 1, 1},
+ {1, 1, 1}};
+ dataset.write(data1, PredType::NATIVE_INT, mspace1, fspace1);
+
+ /*
+ * Extend the dataset. Dataset becomes 10 x 3.
+ */
+ hsize_t dims2[2] = {7, 1}; /* data2 dimensions */
+ dims[0] = dims1[0] + dims2[0];
+ size[0] = dims[0];
+ size[1] = dims[1];
+ dataset.extend(size);
+
+ /*
+ * Select a hyperslab.
+ */
+ DataSpace fspace2 = dataset.getSpace();
+ offset[0] = 3;
+ offset[1] = 0;
+ fspace2.selectHyperslab(H5S_SELECT_SET, dims2, offset);
+
+ /*
+ * Define memory space
+ */
+ DataSpace mspace2(RANK, dims2);
+
+ /*
+ * Write the data to the hyperslab.
+ */
+ int data2[7] = {2, 2, 2, 2, 2, 2, 2};
+ dataset.write(data2, PredType::NATIVE_INT, mspace2, fspace2);
+
+ /*
+ * Extend the dataset. Dataset becomes 10 x 5.
+ */
+ hsize_t dims3[2] = {2, 2}; /* data3 dimensions */
+ dims[1] = dims1[1] + dims3[1];
+ size[0] = dims[0];
+ size[1] = dims[1];
+ dataset.extend(size);
+
+ /*
+ * Select a hyperslab
+ */
+ DataSpace fspace3 = dataset.getSpace();
+ offset[0] = 0;
+ offset[1] = 3;
+ fspace3.selectHyperslab(H5S_SELECT_SET, dims3, offset);
+
+ /*
+ * Define memory space.
+ */
+ DataSpace mspace3(RANK, dims3);
+
+ /*
+ * Write the data to the hyperslab.
+ */
+ int data3[2][2] = {{3, 3}, {3, 3}};
+ dataset.write(data3, PredType::NATIVE_INT, mspace3, fspace3);
+
+ /*
+ * Read the data from this dataset and display it.
+ */
+ int i, j;
+ int data_out[NX][NY];
+ for (i = 0; i < NX; i++) {
+ for (j = 0; j < NY; j++)
+ data_out[i][j] = 0;
+ }
+ dataset.read(data_out, PredType::NATIVE_INT);
+ /*
+ * Resulting dataset
+ *
+ * 1 1 1 3 3
+ * 1 1 1 3 3
+ * 1 1 1 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ * 2 0 0 0 0
+ */
+ /*
+ * Display the result.
+ */
+ for (i = 0; i < NX; i++) {
+ for (j = 0; j < NY; j++)
+ cout << data_out[i][j] << " ";
+ cout << endl;
+ }
+ } // end of try block
+
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataSpaceIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataTypeIException error) {
+ error.printError();
+ return -1;
+ }
+ return 0;
}
diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp
index 6e1764f..5ea2094 100644
--- a/c++/examples/h5group.cpp
+++ b/c++/examples/h5group.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,33 +29,32 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "Group.h5" );
+const H5std_string FILE_NAME("Group.h5");
const int RANK = 2;
// Operator function
-extern "C" herr_t file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo,
- void *opdata);
+extern "C" herr_t file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata);
-int main(void)
+int
+main(void)
{
- hsize_t dims[2];
- hsize_t cdims[2];
+ hsize_t dims[2];
+ hsize_t cdims[2];
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -66,12 +65,12 @@ int main(void)
* Create the named file, truncating the existing one if any,
* using default create and access property lists.
*/
- H5File *file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
+ H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
/*
* Create a group in the file
*/
- Group* group = new Group( file->createGroup( "/Data" ));
+ Group *group = new Group(file->createGroup("/Data"));
/*
* Create dataset "Compressed Data" in the group using absolute
@@ -79,21 +78,20 @@ int main(void)
* GZIP compression with the compression effort set to 6.
* Note that compression can be used only when dataset is chunked.
*/
- dims[0] = 1000;
- dims[1] = 20;
- cdims[0] = 20;
- cdims[1] = 20;
- DataSpace *dataspace = new DataSpace(RANK, dims); // create new dspace
- DSetCreatPropList ds_creatplist; // create dataset creation prop list
- ds_creatplist.setChunk( 2, cdims ); // then modify it for compression
- ds_creatplist.setDeflate( 6 );
+ dims[0] = 1000;
+ dims[1] = 20;
+ cdims[0] = 20;
+ cdims[1] = 20;
+ DataSpace * dataspace = new DataSpace(RANK, dims); // create new dspace
+ DSetCreatPropList ds_creatplist; // create dataset creation prop list
+ ds_creatplist.setChunk(2, cdims); // then modify it for compression
+ ds_creatplist.setDeflate(6);
/*
* Create the first dataset.
*/
- DataSet* dataset = new DataSet(file->createDataSet(
- "/Data/Compressed_Data", PredType::NATIVE_INT,
- *dataspace, ds_creatplist ));
+ DataSet *dataset = new DataSet(
+ file->createDataSet("/Data/Compressed_Data", PredType::NATIVE_INT, *dataspace, ds_creatplist));
/*
* Close the first dataset.
@@ -104,11 +102,10 @@ int main(void)
/*
* Create the second dataset.
*/
- dims[0] = 500;
- dims[1] = 20;
+ dims[0] = 500;
+ dims[1] = 20;
dataspace = new DataSpace(RANK, dims); // create second dspace
- dataset = new DataSet(file->createDataSet("/Data/Float_Data",
- PredType::NATIVE_FLOAT, *dataspace));
+ dataset = new DataSet(file->createDataSet("/Data/Float_Data", PredType::NATIVE_FLOAT, *dataspace));
delete dataset;
delete dataspace;
@@ -118,16 +115,16 @@ int main(void)
/*
* Now reopen the file and group in the file.
*/
- file = new H5File(FILE_NAME, H5F_ACC_RDWR);
+ file = new H5File(FILE_NAME, H5F_ACC_RDWR);
group = new Group(file->openGroup("Data"));
/*
* Access "Compressed_Data" dataset in the group.
*/
- try { // to determine if the dataset exists in the group
- dataset = new DataSet( group->openDataSet( "Compressed_Data" ));
+ try { // to determine if the dataset exists in the group
+ dataset = new DataSet(group->openDataSet("Compressed_Data"));
}
- catch( GroupIException not_found_error ) {
+ catch (GroupIException not_found_error) {
cout << " Dataset is not found." << endl;
}
cout << "dataset \"/Data/Compressed_Data\" is open" << endl;
@@ -140,17 +137,16 @@ int main(void)
/*
* Create hard link to the Data group.
*/
- file->link( H5L_TYPE_HARD, "Data", "Data_new" );
+ file->link(H5L_TYPE_HARD, "Data", "Data_new");
/*
* We can access "Compressed_Data" dataset using created
* hard link "Data_new".
*/
- try { // to determine if the dataset exists in the file
- dataset = new DataSet(file->openDataSet( "/Data_new/Compressed_Data" ));
+ try { // to determine if the dataset exists in the file
+ dataset = new DataSet(file->openDataSet("/Data_new/Compressed_Data"));
}
- catch( FileIException not_found_error )
- {
+ catch (FileIException not_found_error) {
cout << " Dataset is not found." << endl;
}
cout << "dataset \"/Data_new/Compressed_Data\" is open" << endl;
@@ -173,11 +169,10 @@ int main(void)
* of the objects in the file root direvtory.
*/
cout << "Unlinking..." << endl;
- try { // attempt to unlink the dataset
- file->unlink( "Data" );
+ try { // attempt to unlink the dataset
+ file->unlink("Data");
}
- catch( FileIException unlink_error )
- {
+ catch (FileIException unlink_error) {
cout << " unlink failed." << endl;
}
cout << "\"Data\" is unlinked" << endl;
@@ -191,32 +186,28 @@ int main(void)
*/
delete group;
delete file;
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch( FileIException error )
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
// catch failure caused by the Attribute operations
- catch( AttributeIException error )
- {
+ catch (AttributeIException error) {
error.printError();
return -1;
}
@@ -244,4 +235,3 @@ file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata)
H5Gclose(group);
return 0;
}
-
diff --git a/c++/examples/h5tutr_cmprss.cpp b/c++/examples/h5tutr_cmprss.cpp
index 32f67ad..e6a1a6e 100644
--- a/c++/examples/h5tutr_cmprss.cpp
+++ b/c++/examples/h5tutr_cmprss.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,39 +22,39 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("h5tutr_cmprss.h5");
-const H5std_string DATASET_NAME("Compressed_Data");
-const int DIM0 = 100;
-const int DIM1 = 20;
+const H5std_string FILE_NAME("h5tutr_cmprss.h5");
+const H5std_string DATASET_NAME("Compressed_Data");
+const int DIM0 = 100;
+const int DIM1 = 20;
-int main (void)
+int
+main(void)
{
- hsize_t dims[2] = { DIM0, DIM1 }; // dataset dimensions
- hsize_t chunk_dims[2] = { 20, 20 }; // chunk dimensions
- int i,j, buf[DIM0][DIM1];
+ hsize_t dims[2] = {DIM0, DIM1}; // dataset dimensions
+ hsize_t chunk_dims[2] = {20, 20}; // chunk dimensions
+ int i, j, buf[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
- // Create a new file using the default property lists.
+ // Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset.
DataSpace *dataspace = new DataSpace(2, dims);
// Modify dataset creation property to enable chunking
- DSetCreatPropList *plist = new DSetCreatPropList;
+ DSetCreatPropList *plist = new DSetCreatPropList;
plist->setChunk(2, chunk_dims);
// Set ZLIB (DEFLATE) Compression using level 6.
@@ -65,14 +65,14 @@ int main (void)
// unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
// unsigned szip_pixels_per_block = 16;
// plist->setSzip(szip_options_mask, szip_pixels_per_block);
-
- // Create the dataset.
- DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME,
- PredType::STD_I32BE, *dataspace, *plist) );
- for (i = 0; i< DIM0; i++)
- for (j=0; j<DIM1; j++)
- buf[i][j] = i+j;
+ // Create the dataset.
+ DataSet *dataset =
+ new DataSet(file.createDataSet(DATASET_NAME, PredType::STD_I32BE, *dataspace, *plist));
+
+ for (i = 0; i < DIM0; i++)
+ for (j = 0; j < DIM1; j++)
+ buf[i][j] = i + j;
// Write data to dataset.
dataset->write(buf, PredType::NATIVE_INT);
@@ -84,77 +84,73 @@ int main (void)
file.close();
// -----------------------------------------------
- // Re-open the file and dataset, retrieve filter
+ // Re-open the file and dataset, retrieve filter
// information for dataset and read the data back.
// -----------------------------------------------
-
- int rbuf[DIM0][DIM1];
- int numfilt;
- size_t nelmts={1}, namelen={1};
- unsigned flags, filter_info, cd_values[1], idx;
- char name[1];
+
+ int rbuf[DIM0][DIM1];
+ int numfilt;
+ size_t nelmts = {1}, namelen = {1};
+ unsigned flags, filter_info, cd_values[1], idx;
+ char name[1];
H5Z_filter_t filter_type;
// Open the file and the dataset in the file.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
- dataset = new DataSet(file.openDataSet( DATASET_NAME));
+ dataset = new DataSet(file.openDataSet(DATASET_NAME));
// Get the create property list of the dataset.
- plist = new DSetCreatPropList(dataset->getCreatePlist ());
+ plist = new DSetCreatPropList(dataset->getCreatePlist());
// Get the number of filters associated with the dataset.
numfilt = plist->getNfilters();
cout << "Number of filters associated with dataset: " << numfilt << endl;
- for (idx=0; idx < numfilt; idx++) {
+ for (idx = 0; idx < numfilt; idx++) {
nelmts = 0;
- filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name , filter_info);
+ filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name, filter_info);
cout << "Filter Type: ";
switch (filter_type) {
- case H5Z_FILTER_DEFLATE:
- cout << "H5Z_FILTER_DEFLATE" << endl;
- break;
- case H5Z_FILTER_SZIP:
- cout << "H5Z_FILTER_SZIP" << endl;
- break;
- default:
- cout << "Other filter type included." << endl;
- }
+ case H5Z_FILTER_DEFLATE:
+ cout << "H5Z_FILTER_DEFLATE" << endl;
+ break;
+ case H5Z_FILTER_SZIP:
+ cout << "H5Z_FILTER_SZIP" << endl;
+ break;
+ default:
+ cout << "Other filter type included." << endl;
+ }
}
// Read data.
dataset->read(rbuf, PredType::NATIVE_INT);
- delete plist;
+ delete plist;
delete dataset;
- file.close(); // can be skipped
+ file.close(); // can be skipped
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch(DataSpaceIException error)
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp
index bdc2fc5..a83826b 100644
--- a/c++/examples/h5tutr_crtatt.cpp
+++ b/c++/examples/h5tutr_crtatt.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,72 +22,65 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "h5tutr_dset.h5" );
-const H5std_string DATASET_NAME( "dset" );
-const H5std_string ATTR_NAME( "Units" );
+const H5std_string FILE_NAME("h5tutr_dset.h5");
+const H5std_string DATASET_NAME("dset");
+const H5std_string ATTR_NAME("Units");
-const int DIM1 = 2;
+const int DIM1 = 2;
-int main (void)
+int
+main(void)
{
- int attr_data[2] = { 100, 200};
- hsize_t dims[1] = { DIM1 };
-
+ int attr_data[2] = {100, 200};
+ hsize_t dims[1] = {DIM1};
- // Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ // Try block to detect exceptions raised by any of the calls inside it
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
- H5File file( FILE_NAME, H5F_ACC_RDWR );
- DataSet dataset = file.openDataSet( DATASET_NAME );
+ H5File file(FILE_NAME, H5F_ACC_RDWR);
+ DataSet dataset = file.openDataSet(DATASET_NAME);
// Create the data space for the attribute.
- DataSpace attr_dataspace = DataSpace (1, dims );
+ DataSpace attr_dataspace = DataSpace(1, dims);
- // Create a dataset attribute.
- Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE,
- attr_dataspace);
-
- // Write the attribute data.
- attribute.write( PredType::NATIVE_INT, attr_data);
+ // Create a dataset attribute.
+ Attribute attribute = dataset.createAttribute(ATTR_NAME, PredType::STD_I32BE, attr_dataspace);
- } // end of try block
+ // Write the attribute data.
+ attribute.write(PredType::NATIVE_INT, attr_data);
- // catch failure caused by the H5File operations
- catch( DataSpaceIException error )
- {
+ } // end of try block
+
+ // catch failure caused by the H5File operations
+ catch (DataSpaceIException error) {
error.printError();
return -1;
- }
+ }
- // catch failure caused by the H5File operations
- catch( AttributeIException error )
- {
+ // catch failure caused by the H5File operations
+ catch (AttributeIException error) {
error.printError();
return -1;
- }
+ }
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
error.printError();
return -1;
- }
+ }
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
error.printError();
return -1;
- }
+ }
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/h5tutr_crtdat.cpp b/c++/examples/h5tutr_crtdat.cpp
index 9fed595..a2fd3d6 100644
--- a/c++/examples/h5tutr_crtdat.cpp
+++ b/c++/examples/h5tutr_crtdat.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,59 +22,55 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME("h5tutr_dset.h5");
-const H5std_string DATASET_NAME("dset");
-const int NX = 4; // dataset dimensions
-const int NY = 6;
-const int RANK = 2;
+const H5std_string FILE_NAME("h5tutr_dset.h5");
+const H5std_string DATASET_NAME("dset");
+const int NX = 4; // dataset dimensions
+const int NY = 6;
+const int RANK = 2;
-int main (void)
+int
+main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
- // Create a new file using the default property lists.
+ // Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset.
- hsize_t dims[2]; // dataset dimensions
+ hsize_t dims[2]; // dataset dimensions
dims[0] = NX;
dims[1] = NY;
DataSpace dataspace(RANK, dims);
- // Create the dataset.
+ // Create the dataset.
DataSet dataset = file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace);
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch(DataSpaceIException error)
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/h5tutr_crtgrp.cpp b/c++/examples/h5tutr_crtgrp.cpp
index cee306c..236e26b 100644
--- a/c++/examples/h5tutr_crtgrp.cpp
+++ b/c++/examples/h5tutr_crtgrp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,46 +22,44 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_group.h5");
-int main(void)
+int
+main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Create a new file using default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
-
+
// Create a group named "/MygGroup" in the file
Group group(file.createGroup("/MyGroup"));
// File and group will be closed as their instances go out of scope.
-
+
} // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the Group operations
- catch(GroupIException error)
- {
+ catch (GroupIException error) {
error.printError();
return -1;
}
-
+
return 0;
}
diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp
index d120833..6f2a2b3 100644
--- a/c++/examples/h5tutr_crtgrpar.cpp
+++ b/c++/examples/h5tutr_crtgrpar.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,22 +22,22 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_groups.h5");
-int main(void)
+int
+main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
-
+ try {
+
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately.
@@ -48,43 +48,39 @@ int main(void)
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create group "MyGroup" in the root group using an absolute name.
-
- Group group1(file.createGroup( "/MyGroup"));
-
+
+ Group group1(file.createGroup("/MyGroup"));
+
// Create group "Group_A" in group "MyGroup" using an
// absolute name.
- Group group2(file.createGroup("/MyGroup/Group_A"));
+ Group group2(file.createGroup("/MyGroup/Group_A"));
// Create group "Group_B" in group "MyGroup" using a
// relative name.
-
- Group group3(group1.createGroup ("Group_B"));
-
+
+ Group group3(group1.createGroup("Group_B"));
+
// Close the groups and file.
group1.close();
group2.close();
group3.close();
file.close();
-
+
} // end of try block
// catch failure caused by the File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the Group operations
- catch(GroupIException error)
- {
+ catch (GroupIException error) {
error.printError();
return -1;
}
return 0;
}
-
-
diff --git a/c++/examples/h5tutr_crtgrpd.cpp b/c++/examples/h5tutr_crtgrpd.cpp
index 12c6848..17033da 100644
--- a/c++/examples/h5tutr_crtgrpd.cpp
+++ b/c++/examples/h5tutr_crtgrpd.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,43 +22,43 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_groups.h5");
const H5std_string DATASET_NAME1("/MyGroup/dset1");
const H5std_string DATASET_NAME2("dset2");
-const int RANK = 2;
-const int D1DIM1 = 3;
-const int D1DIM2 = 3;
-const int D2DIM1 = 2;
-const int D2DIM2 = 10;
-
-int main(void)
+const int RANK = 2;
+const int D1DIM1 = 3;
+const int D1DIM2 = 3;
+const int D2DIM1 = 2;
+const int D2DIM2 = 10;
+
+int
+main(void)
{
int dset1_data[D1DIM1][D1DIM2], dset2_data[D2DIM1][D2DIM2]; // data buffers
int i, j;
// Try block to catch exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
- // Initialize the first dataset.
+ // Initialize the first dataset.
for (i = 0; i < D1DIM1; i++)
for (j = 0; j < D1DIM2; j++)
- dset1_data[i][j] = j + 1;
+ dset1_data[i][j] = j + 1;
- // Initialize the second dataset.
+ // Initialize the second dataset.
for (i = 0; i < D2DIM1; i++)
- for (j = 0; j < D2DIM2; j++)
- dset2_data[i][j] = j + 1;
+ for (j = 0; j < D2DIM2; j++)
+ dset2_data[i][j] = j + 1;
// Open an existing file and dataset.
H5File file(FILE_NAME, H5F_ACC_RDWR);
@@ -67,15 +67,14 @@ int main(void)
// pointer for the instance 'dataspace'. It can be deleted and
// used again later for another data space. An HDF5 identifier is
// closed by the destructor or the method 'close()'.
- hsize_t dims[RANK]; // dataset dimensions
- dims[0] = D1DIM1;
- dims[1] = D1DIM2;
- DataSpace *dataspace = new DataSpace (RANK, dims);
+ hsize_t dims[RANK]; // dataset dimensions
+ dims[0] = D1DIM1;
+ dims[1] = D1DIM2;
+ DataSpace *dataspace = new DataSpace(RANK, dims);
// Create the dataset in group "MyGroup". Same note as for the
// dataspace above.
- DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1,
- PredType::STD_I32BE, *dataspace));
+ DataSet *dataset = new DataSet(file.createDataSet(DATASET_NAME1, PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
@@ -86,16 +85,15 @@ int main(void)
delete dataspace;
// Create the data space for the second dataset.
- dims[0] = D2DIM1;
- dims[1] = D2DIM2;
- dataspace = new DataSpace (RANK, dims);
+ dims[0] = D2DIM1;
+ dims[1] = D2DIM2;
+ dataspace = new DataSpace(RANK, dims);
// Create group "Group_A" in group "MyGroup".
Group group(file.openGroup("/MyGroup/Group_A"));
// Create the second dataset in group "Group_A".
- dataset = new DataSet (group.createDataSet(DATASET_NAME2,
- PredType::STD_I32BE, *dataspace));
+ dataset = new DataSet(group.createDataSet(DATASET_NAME2, PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
@@ -105,35 +103,31 @@ int main(void)
delete dataspace;
delete dataset;
group.close();
-
+
} // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
- error.printError();
- return -1;
+ catch (FileIException error) {
+ error.printError();
+ return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
- error.printError();
- return -1;
+ catch (DataSetIException error) {
+ error.printError();
+ return -1;
}
// catch failure caused by the DataSpace operations
- catch(DataSpaceIException error)
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
// catch failure caused by the Group operations
- catch(GroupIException error)
- {
+ catch (GroupIException error) {
error.printError();
return -1;
}
-
- return 0;
+
+ return 0;
}
diff --git a/c++/examples/h5tutr_extend.cpp b/c++/examples/h5tutr_extend.cpp
index 92576f1..0780b89 100644
--- a/c++/examples/h5tutr_extend.cpp
+++ b/c++/examples/h5tutr_extend.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,76 +22,70 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("h5tutr_extend.h5");
-const H5std_string DATASETNAME("ExtendibleArray");
+const H5std_string FILE_NAME("h5tutr_extend.h5");
+const H5std_string DATASETNAME("ExtendibleArray");
-int main (void)
+int
+main(void)
{
- hsize_t dims[2] = {3,3}; // dataset dimensions at creation
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={2, 5};
- int data[3][3] = { {1, 1, 1}, // data to write
- {1, 1, 1},
- {1, 1, 1} };
-
- // Variables used in extending and writing to the extended portion of dataset
-
- hsize_t size[2];
- hsize_t offset[2];
- hsize_t dimsext[2] = {7, 3}; // extend dimensions
- int dataext[7][3] = { {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4} };
+ hsize_t dims[2] = {3, 3}; // dataset dimensions at creation
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {2, 5};
+ int data[3][3] = {{1, 1, 1}, // data to write
+ {1, 1, 1},
+ {1, 1, 1}};
+
+ // Variables used in extending and writing to the extended portion of dataset
+
+ hsize_t size[2];
+ hsize_t offset[2];
+ hsize_t dimsext[2] = {7, 3}; // extend dimensions
+ int dataext[7][3] = {{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}};
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
- // Create a new file using the default property lists.
+ // Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset. Note the use of pointer
// for the instance 'dataspace'. It can be deleted and used again
// later for another dataspace. An HDF5 identifier can be closed
// by the destructor or the method 'close()'.
- DataSpace *dataspace = new DataSpace (2, dims, maxdims);
+ DataSpace *dataspace = new DataSpace(2, dims, maxdims);
// Modify dataset creation property to enable chunking
DSetCreatPropList prop;
prop.setChunk(2, chunk_dims);
// Create the chunked dataset. Note the use of pointer.
- DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME,
- PredType::STD_I32BE, *dataspace, prop) );
-
+ DataSet *dataset =
+ new DataSet(file.createDataSet(DATASETNAME, PredType::STD_I32BE, *dataspace, prop));
+
// Write data to dataset.
dataset->write(data, PredType::NATIVE_INT);
// Extend the dataset. Dataset becomes 10 x 3.
size[0] = dims[0] + dimsext[0];
size[1] = dims[1];
- dataset->extend(size);
+ dataset->extend(size);
// Select a hyperslab in extended portion of the dataset.
- DataSpace *filespace = new DataSpace(dataset->getSpace ());
- offset[0] = 3;
- offset[1] = 0;
+ DataSpace *filespace = new DataSpace(dataset->getSpace());
+ offset[0] = 3;
+ offset[1] = 0;
filespace->selectHyperslab(H5S_SELECT_SET, dimsext, offset);
-
+
// Define memory space.
DataSpace *memspace = new DataSpace(2, dimsext, NULL);
@@ -106,37 +100,38 @@ int main (void)
delete dataset;
file.close();
- // ---------------------------------------
+ // ---------------------------------------
// Re-open the file and read the data back
- // ---------------------------------------
+ // ---------------------------------------
- int rdata[10][3];
- int i,j, rank, rank_chunk;
- hsize_t chunk_dimsr[2], dimsr[2];
+ int rdata[10][3];
+ int i, j, rank, rank_chunk;
+ hsize_t chunk_dimsr[2], dimsr[2];
// Open the file and dataset.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
- dataset = new DataSet(file.openDataSet( DATASETNAME));
+ dataset = new DataSet(file.openDataSet(DATASETNAME));
// Get the dataset's dataspace and creation property list.
filespace = new DataSpace(dataset->getSpace());
- prop = dataset->getCreatePlist();
+ prop = dataset->getCreatePlist();
// Get information to obtain memory dataspace.
- rank = filespace->getSimpleExtentNdims();
+ rank = filespace->getSimpleExtentNdims();
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
if (H5D_CHUNKED == prop.getLayout())
- rank_chunk = prop.getChunk(rank, chunk_dimsr);
- cout << "rank chunk = " << rank_chunk << endl;;
+ rank_chunk = prop.getChunk(rank, chunk_dimsr);
+ cout << "rank chunk = " << rank_chunk << endl;
+ ;
memspace = new DataSpace(rank, dimsr, NULL);
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
-
+
cout << endl;
for (j = 0; j < dimsr[0]; j++) {
for (i = 0; i < dimsr[1]; i++)
- cout << " " << rdata[j][i];
+ cout << " " << rdata[j][i];
cout << endl;
}
@@ -146,30 +141,26 @@ int main (void)
delete memspace;
delete dataset;
file.close();
-
- } // end of try block
+
+ } // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch(DataSpaceIException error)
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/h5tutr_rdwt.cpp b/c++/examples/h5tutr_rdwt.cpp
index 076822f..d8b5da9 100644
--- a/c++/examples/h5tutr_rdwt.cpp
+++ b/c++/examples/h5tutr_rdwt.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,56 +22,54 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME("h5tutr_dset.h5");
-const H5std_string DATASET_NAME("dset");
-const int DIM0 = 4; // dataset dimensions
-const int DIM1 = 6;
+const H5std_string FILE_NAME("h5tutr_dset.h5");
+const H5std_string DATASET_NAME("dset");
+const int DIM0 = 4; // dataset dimensions
+const int DIM1 = 6;
-int main (void)
+int
+main(void)
{
-
+
// Data initialization.
-
+
int i, j;
- int data[DIM0][DIM1]; // buffer for data to write
+ int data[DIM0][DIM1]; // buffer for data to write
for (j = 0; j < DIM0; j++)
for (i = 0; i < DIM1; i++)
- data[j][i] = i * 6 + j + 1;
+ data[j][i] = i * 6 + j + 1;
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
- H5File file(FILE_NAME, H5F_ACC_RDWR);
+ H5File file(FILE_NAME, H5F_ACC_RDWR);
DataSet dataset = file.openDataSet(DATASET_NAME);
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
dataset.write(data, PredType::NATIVE_INT);
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
diff --git a/c++/examples/h5tutr_subset.cpp b/c++/examples/h5tutr_subset.cpp
index 13720b9..68c9695 100644
--- a/c++/examples/h5tutr_subset.cpp
+++ b/c++/examples/h5tutr_subset.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,65 +22,63 @@
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("h5tutr_subset.h5");
-const H5std_string DATASET_NAME("IntArray");
+const H5std_string FILE_NAME("h5tutr_subset.h5");
+const H5std_string DATASET_NAME("IntArray");
-const int RANK = 2;
-const int DIM0_SUB = 3; // subset dimensions
-const int DIM1_SUB = 4;
-const int DIM0 = 8; // size of dataset
-const int DIM1 = 10;
+const int RANK = 2;
+const int DIM0_SUB = 3; // subset dimensions
+const int DIM1_SUB = 4;
+const int DIM0 = 8; // size of dataset
+const int DIM1 = 10;
-int main (void)
+int
+main(void)
{
- int i,j;
- int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
+ int i, j;
+ int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// ---------------------------------------------------
- // Create a new file using the default property lists.
- // Then create a dataset and write data to it.
+ // Create a new file using the default property lists.
+ // Then create a dataset and write data to it.
// Close the file and dataset.
// ---------------------------------------------------
-
- H5File file(FILE_NAME, H5F_ACC_TRUNC);
- hsize_t dims[2];
- dims[0] = DIM0;
- dims[1] = DIM1;
- DataSpace dataspace = DataSpace (RANK, dims);
+ H5File file(FILE_NAME, H5F_ACC_TRUNC);
- DataSet dataset(file.createDataSet( DATASET_NAME,
- PredType::STD_I32BE, dataspace) );
+ hsize_t dims[2];
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ DataSpace dataspace = DataSpace(RANK, dims);
+ DataSet dataset(file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace));
for (j = 0; j < DIM0; j++) {
- for (i = 0; i < DIM1; i++)
- if (i< (DIM1/2))
+ for (i = 0; i < DIM1; i++)
+ if (i < (DIM1 / 2))
data[j][i] = 1;
- else
+ else
data[j][i] = 2;
- }
+ }
dataset.write(data, PredType::NATIVE_INT);
cout << endl << "Data Written to File:" << endl;
for (j = 0; j < DIM0; j++) {
for (i = 0; i < DIM1; i++)
- cout << " " << data[j][i];
+ cout << " " << data[j][i];
cout << endl;
}
@@ -99,20 +97,20 @@ int main (void)
file.openFile(FILE_NAME, H5F_ACC_RDWR);
dataset = file.openDataSet(DATASET_NAME);
- // Specify size and shape of subset to write.
+ // Specify size and shape of subset to write.
offset[0] = 1;
offset[1] = 2;
- count[0] = DIM0_SUB;
- count[1] = DIM1_SUB;
+ count[0] = DIM0_SUB;
+ count[1] = DIM1_SUB;
stride[0] = 1;
stride[1] = 1;
block[0] = 1;
block[1] = 1;
-
+
// Define Memory Dataspace. Get file dataspace and select
// a subset from the file dataspace.
@@ -122,7 +120,7 @@ int main (void)
DataSpace memspace(RANK, dimsm, NULL);
dataspace = dataset.getSpace();
- dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block);
+ dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block);
// Write a subset of data to the dataset, then read the
// entire dataset back from the file.
@@ -131,17 +129,16 @@ int main (void)
cout << " offset=1x2 stride=1x1 count=3x4 block=1x1" << endl;
for (j = 0; j < DIM0_SUB; j++) {
for (i = 0; i < DIM1_SUB; i++)
- sdata[j][i] = 5;
- }
-
+ sdata[j][i] = 5;
+ }
+
dataset.write(sdata, PredType::NATIVE_INT, memspace, dataspace);
dataset.read(rdata, PredType::NATIVE_INT);
-
cout << endl << "Data in File after Subset is Written:" << endl;
for (i = 0; i < DIM0; i++) {
- for (j = 0; j < DIM1; j++)
- cout << " " << rdata[i][j];
+ for (j = 0; j < DIM1; j++)
+ cout << " " << rdata[i][j];
cout << endl;
}
cout << endl;
@@ -153,29 +150,25 @@ int main (void)
dataset.close();
file.close();
- } // end of try block
+ } // end of try block
// catch failure caused by the H5File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch(DataSetIException error)
- {
+ catch (DataSetIException error) {
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
- catch(DataSpaceIException error)
- {
+ catch (DataSpaceIException error) {
error.printError();
return -1;
}
- return 0; // successfully terminated
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp
index 3826090..d8cff55 100644
--- a/c++/examples/readdata.cpp
+++ b/c++/examples/readdata.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,195 +26,185 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "SDS.h5" );
-const H5std_string DATASET_NAME( "IntArray" );
-const int NX_SUB = 3; // hyperslab dimensions
-const int NY_SUB = 4;
-const int NX = 7; // output buffer dimensions
-const int NY = 7;
-const int NZ = 3;
-const int RANK_OUT = 3;
-
-int main (void)
+const H5std_string FILE_NAME("SDS.h5");
+const H5std_string DATASET_NAME("IntArray");
+const int NX_SUB = 3; // hyperslab dimensions
+const int NY_SUB = 4;
+const int NX = 7; // output buffer dimensions
+const int NY = 7;
+const int NZ = 3;
+const int RANK_OUT = 3;
+
+int
+main(void)
{
- /*
- * Output buffer initialization.
- */
- int i, j, k;
- int data_out[NX][NY][NZ ]; /* output buffer */
- for (j = 0; j < NX; j++)
- {
- for (i = 0; i < NY; i++)
- {
- for (k = 0; k < NZ ; k++)
- data_out[j][i][k] = 0;
- }
- }
-
- /*
- * Try block to detect exceptions raised by any of the calls inside it
- */
- try
- {
- /*
- * Turn off the auto-printing when failure occurs so that we can
- * handle the errors appropriately
- */
- Exception::dontPrint();
-
- /*
- * Open the specified file and the specified dataset in the file.
- */
- H5File file( FILE_NAME, H5F_ACC_RDONLY );
- DataSet dataset = file.openDataSet( DATASET_NAME );
-
- /*
- * Get the class of the datatype that is used by the dataset.
- */
- H5T_class_t type_class = dataset.getTypeClass();
-
- /*
- * Get class of datatype and print message if it's an integer.
- */
- if( type_class == H5T_INTEGER )
- {
- cout << "Data set has INTEGER type" << endl;
-
- /*
- * Get the integer datatype
- */
- IntType intype = dataset.getIntType();
-
- /*
- * Get order of datatype and print message if it's a little endian.
- */
- H5std_string order_string;
- H5T_order_t order = intype.getOrder( order_string );
- cout << order_string << endl;
-
- /*
- * Get size of the data element stored in file and print it.
- */
- size_t size = intype.getSize();
- cout << "Data size is " << size << endl;
- }
-
- /*
- * Get dataspace of the dataset.
- */
- DataSpace dataspace = dataset.getSpace();
-
- /*
- * Get the number of dimensions in the dataspace.
- */
- int rank = dataspace.getSimpleExtentNdims();
-
- /*
- * Get the dimension size of each dimension in the dataspace and
- * display them.
- */
- hsize_t dims_out[2];
- int ndims = dataspace.getSimpleExtentDims( dims_out, NULL);
- cout << "rank " << rank << ", dimensions " <<
- (unsigned long)(dims_out[0]) << " x " <<
- (unsigned long)(dims_out[1]) << endl;
-
- /*
- * Define hyperslab in the dataset; implicitly giving strike and
- * block NULL.
- */
- hsize_t offset[2]; // hyperslab offset in the file
- hsize_t count[2]; // size of the hyperslab in the file
- offset[0] = 1;
- offset[1] = 2;
- count[0] = NX_SUB;
- count[1] = NY_SUB;
- dataspace.selectHyperslab( H5S_SELECT_SET, count, offset );
-
- /*
- * Define the memory dataspace.
- */
- hsize_t dimsm[3]; /* memory space dimensions */
- dimsm[0] = NX;
- dimsm[1] = NY;
- dimsm[2] = NZ ;
- DataSpace memspace( RANK_OUT, dimsm );
-
- /*
- * Define memory hyperslab.
- */
- hsize_t offset_out[3]; // hyperslab offset in memory
- hsize_t count_out[3]; // size of the hyperslab in memory
- offset_out[0] = 3;
- offset_out[1] = 0;
- offset_out[2] = 0;
- count_out[0] = NX_SUB;
- count_out[1] = NY_SUB;
- count_out[2] = 1;
- memspace.selectHyperslab( H5S_SELECT_SET, count_out, offset_out );
-
- /*
- * Read data from hyperslab in the file into the hyperslab in
- * memory and display the data.
- */
- dataset.read( data_out, PredType::NATIVE_INT, memspace, dataspace );
-
- for (j = 0; j < NX; j++)
- {
- for (i = 0; i < NY; i++)
- cout << data_out[j][i][0] << " ";
- cout << endl;
- }
- /*
- * 0 0 0 0 0 0 0
- * 0 0 0 0 0 0 0
- * 0 0 0 0 0 0 0
- * 3 4 5 6 0 0 0
- * 4 5 6 7 0 0 0
- * 5 6 7 8 0 0 0
- * 0 0 0 0 0 0 0
- */
- } // end of try block
-
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
- error.printError();
- return -1;
- }
-
- // catch failure caused by the DataSpace operations
- catch( DataTypeIException error )
- {
- error.printError();
- return -1;
- }
-
- return 0; // successfully terminated
+ /*
+ * Output buffer initialization.
+ */
+ int i, j, k;
+ int data_out[NX][NY][NZ]; /* output buffer */
+ for (j = 0; j < NX; j++) {
+ for (i = 0; i < NY; i++) {
+ for (k = 0; k < NZ; k++)
+ data_out[j][i][k] = 0;
+ }
+ }
+
+ /*
+ * Try block to detect exceptions raised by any of the calls inside it
+ */
+ try {
+ /*
+ * Turn off the auto-printing when failure occurs so that we can
+ * handle the errors appropriately
+ */
+ Exception::dontPrint();
+
+ /*
+ * Open the specified file and the specified dataset in the file.
+ */
+ H5File file(FILE_NAME, H5F_ACC_RDONLY);
+ DataSet dataset = file.openDataSet(DATASET_NAME);
+
+ /*
+ * Get the class of the datatype that is used by the dataset.
+ */
+ H5T_class_t type_class = dataset.getTypeClass();
+
+ /*
+ * Get class of datatype and print message if it's an integer.
+ */
+ if (type_class == H5T_INTEGER) {
+ cout << "Data set has INTEGER type" << endl;
+
+ /*
+ * Get the integer datatype
+ */
+ IntType intype = dataset.getIntType();
+
+ /*
+ * Get order of datatype and print message if it's a little endian.
+ */
+ H5std_string order_string;
+ H5T_order_t order = intype.getOrder(order_string);
+ cout << order_string << endl;
+
+ /*
+ * Get size of the data element stored in file and print it.
+ */
+ size_t size = intype.getSize();
+ cout << "Data size is " << size << endl;
+ }
+
+ /*
+ * Get dataspace of the dataset.
+ */
+ DataSpace dataspace = dataset.getSpace();
+
+ /*
+ * Get the number of dimensions in the dataspace.
+ */
+ int rank = dataspace.getSimpleExtentNdims();
+
+ /*
+ * Get the dimension size of each dimension in the dataspace and
+ * display them.
+ */
+ hsize_t dims_out[2];
+ int ndims = dataspace.getSimpleExtentDims(dims_out, NULL);
+ cout << "rank " << rank << ", dimensions " << (unsigned long)(dims_out[0]) << " x "
+ << (unsigned long)(dims_out[1]) << endl;
+
+ /*
+ * Define hyperslab in the dataset; implicitly giving strike and
+ * block NULL.
+ */
+ hsize_t offset[2]; // hyperslab offset in the file
+ hsize_t count[2]; // size of the hyperslab in the file
+ offset[0] = 1;
+ offset[1] = 2;
+ count[0] = NX_SUB;
+ count[1] = NY_SUB;
+ dataspace.selectHyperslab(H5S_SELECT_SET, count, offset);
+
+ /*
+ * Define the memory dataspace.
+ */
+ hsize_t dimsm[3]; /* memory space dimensions */
+ dimsm[0] = NX;
+ dimsm[1] = NY;
+ dimsm[2] = NZ;
+ DataSpace memspace(RANK_OUT, dimsm);
+
+ /*
+ * Define memory hyperslab.
+ */
+ hsize_t offset_out[3]; // hyperslab offset in memory
+ hsize_t count_out[3]; // size of the hyperslab in memory
+ offset_out[0] = 3;
+ offset_out[1] = 0;
+ offset_out[2] = 0;
+ count_out[0] = NX_SUB;
+ count_out[1] = NY_SUB;
+ count_out[2] = 1;
+ memspace.selectHyperslab(H5S_SELECT_SET, count_out, offset_out);
+
+ /*
+ * Read data from hyperslab in the file into the hyperslab in
+ * memory and display the data.
+ */
+ dataset.read(data_out, PredType::NATIVE_INT, memspace, dataspace);
+
+ for (j = 0; j < NX; j++) {
+ for (i = 0; i < NY; i++)
+ cout << data_out[j][i][0] << " ";
+ cout << endl;
+ }
+ /*
+ * 0 0 0 0 0 0 0
+ * 0 0 0 0 0 0 0
+ * 0 0 0 0 0 0 0
+ * 3 4 5 6 0 0 0
+ * 4 5 6 7 0 0 0
+ * 5 6 7 8 0 0 0
+ * 0 0 0 0 0 0 0
+ */
+ } // end of try block
+
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataSpaceIException error) {
+ error.printError();
+ return -1;
+ }
+
+ // catch failure caused by the DataSpace operations
+ catch (DataTypeIException error) {
+ error.printError();
+ return -1;
+ }
+
+ return 0; // successfully terminated
}
-
diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in
index 315010e..ff71945 100644
--- a/c++/examples/run-c++-ex.sh.in
+++ b/c++/examples/run-c++-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the c++ examples from source files #
-# installed in .../share/hdf5_examples/c++ using h5c++. The #
+# installed in @examplesdir@/c++ using h5c++. The #
# order for running programs with RunTest in the MAIN section below is taken #
# from the Makefile. The order is important since some of the test programs #
# use data files created by earlier test programs. Any future additions should #
@@ -30,9 +30,32 @@
EXIT_SUCCESS=0
EXIT_FAILURE=1
+#
+# Try to derive the path to the installation $prefix established
+# by ./configure relative to the examples directory established by
+# ./configure. If successful, set `prefix_relto_examplesdir` to the
+# relative path. Otherwise, set `prefix_relto_examplesdir` to the
+# absolute installation $prefix.
+#
+# This script uses the value of `prefix` in the user's environment, if
+# it is set, below. The content of $() is evaluated in a sub-shell, so
+# if `prefix` is set in the user's environment, the shell statements in
+# $() won't clobber it.
+#
+prefix_relto_examplesdir=$(
+prefix=@prefix@
+examplesdir=@examplesdir@
+if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
+else
+ echo $prefix
+fi
+)
+
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../}"
+prefix="${prefix:-../${prefix_relto_examplesdir}}"
AR="@AR@"
RANLIB="@RANLIB@"
H5TOOL="h5c++" # The tool name
diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in
index c82ccc3..041d349 100644
--- a/c++/examples/testh5c++.sh.in
+++ b/c++/examples/testh5c++.sh.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -57,7 +57,7 @@ applib=libapp${H5TOOL}.a
# short hands
# Caution: if some *.h5 files must be cleaned here, list them by names.
# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated
-# by otehr test programs. This will cause a racing condition error when
+# by other test programs. This will cause a racing condition error when
# parallel make (e.g., gmake -j 4) is used.
temp_SRC="$hdf5main $appmain $prog1 $prog2"
temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"`
diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp
index f8a1cea..afbd8dc 100644
--- a/c++/examples/writedata.cpp
+++ b/c++/examples/writedata.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,42 +29,42 @@
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
- using std::cout;
- using std::endl;
-#endif // H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
- using namespace H5;
+using namespace H5;
#endif
-const H5std_string FILE_NAME( "Select.h5" );
-const H5std_string DATASET_NAME( "Matrix in file" );
-const int MSPACE1_RANK = 1; // Rank of the first dataset in memory
-const int MSPACE1_DIM = 50; // Dataset size in memory
-const int MSPACE2_RANK = 1; // Rank of the second dataset in memory
-const int MSPACE2_DIM = 4; // Dataset size in memory
-const int FSPACE_RANK = 2; // Dataset rank as it is stored in the file
-const int FSPACE_DIM1 = 8; // Dimension sizes of the dataset as it is
-const int FSPACE_DIM2 = 12; // stored in the file
-const int MSPACE_RANK = 2; // Rank of the first dataset in memory
-const int MSPACE_DIM1 = 8; // We will read dataset back from the file
-const int MSPACE_DIM2 = 9; // to the dataset in memory with these
- // dataspace parameters
-const int NPOINTS = 4; // Number of points that will be selected
- // and overwritten
-
-int main (void)
+const H5std_string FILE_NAME("Select.h5");
+const H5std_string DATASET_NAME("Matrix in file");
+const int MSPACE1_RANK = 1; // Rank of the first dataset in memory
+const int MSPACE1_DIM = 50; // Dataset size in memory
+const int MSPACE2_RANK = 1; // Rank of the second dataset in memory
+const int MSPACE2_DIM = 4; // Dataset size in memory
+const int FSPACE_RANK = 2; // Dataset rank as it is stored in the file
+const int FSPACE_DIM1 = 8; // Dimension sizes of the dataset as it is
+const int FSPACE_DIM2 = 12; // stored in the file
+const int MSPACE_RANK = 2; // Rank of the first dataset in memory
+const int MSPACE_DIM1 = 8; // We will read dataset back from the file
+const int MSPACE_DIM2 = 9; // to the dataset in memory with these
+ // dataspace parameters
+const int NPOINTS = 4; // Number of points that will be selected
+ // and overwritten
+
+int
+main(void)
{
- int i,j; // loop indices */
+ int i, j; // loop indices */
/*
* Try block to detect exceptions raised by any of the calls inside it
*/
- try
- {
+ try {
/*
* Turn off the auto-printing when failure occurs so that we can
* handle the errors appropriately
@@ -74,47 +74,51 @@ int main (void)
/*
* Create a file.
*/
- H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC );
+ H5File *file = new H5File(FILE_NAME, H5F_ACC_TRUNC);
/*
- * Create property list for a dataset and set up fill values.
- */
- int fillvalue = 0; /* Fill value for the dataset */
+ * Create property list for a dataset and set up fill values.
+ */
+ int fillvalue = 0; /* Fill value for the dataset */
DSetCreatPropList plist;
plist.setFillValue(PredType::NATIVE_INT, &fillvalue);
/*
* Create dataspace for the dataset in the file.
*/
- hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2}; // dim sizes of ds (on disk)
- DataSpace fspace( FSPACE_RANK, fdim );
+ hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2}; // dim sizes of ds (on disk)
+ DataSpace fspace(FSPACE_RANK, fdim);
/*
* Create dataset and write it into the file.
*/
- DataSet* dataset = new DataSet(file->createDataSet(
- DATASET_NAME, PredType::NATIVE_INT, fspace, plist));
+ DataSet *dataset =
+ new DataSet(file->createDataSet(DATASET_NAME, PredType::NATIVE_INT, fspace, plist));
/*
* Select hyperslab for the dataset in the file, using 3x2 blocks,
* (4,3) stride and (2,4) count starting at the position (0,1).
*/
- hsize_t start[2]; // Start of hyperslab
+ hsize_t start[2]; // Start of hyperslab
hsize_t stride[2]; // Stride of hyperslab
hsize_t count[2]; // Block count
hsize_t block[2]; // Block sizes
- start[0] = 0; start[1] = 1;
- stride[0] = 4; stride[1] = 3;
- count[0] = 2; count[1] = 4;
- block[0] = 3; block[1] = 2;
- fspace.selectHyperslab( H5S_SELECT_SET, count, start, stride, block);
+ start[0] = 0;
+ start[1] = 1;
+ stride[0] = 4;
+ stride[1] = 3;
+ count[0] = 2;
+ count[1] = 4;
+ block[0] = 3;
+ block[1] = 2;
+ fspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
* Create dataspace for the first dataset.
*/
- hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
- (in memory) */
- DataSpace mspace1( MSPACE1_RANK, dim1 );
+ hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
+ (in memory) */
+ DataSpace mspace1(MSPACE1_RANK, dim1);
/*
* Select hyperslab.
@@ -125,7 +129,7 @@ int main (void)
stride[0] = 1;
count[0] = 48;
block[0] = 1;
- mspace1.selectHyperslab( H5S_SELECT_SET, count, start, stride, block);
+ mspace1.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
* Write selection from the vector buffer to the dataset in the file.
@@ -140,7 +144,7 @@ int main (void)
* 0 41 42 0 43 44 0 45 46 0 47 48
* 0 0 0 0 0 0 0 0 0 0 0 0
*/
- int vector[MSPACE1_DIM]; // vector buffer for dset
+ int vector[MSPACE1_DIM]; // vector buffer for dset
/*
* Buffer initialization.
@@ -149,7 +153,7 @@ int main (void)
for (i = 1; i < MSPACE1_DIM - 1; i++)
vector[i] = i;
- dataset->write( vector, PredType::NATIVE_INT, mspace1, fspace );
+ dataset->write(vector, PredType::NATIVE_INT, mspace1, fspace);
/*
* Reset the selection for the file dataspace fid.
@@ -159,27 +163,31 @@ int main (void)
/*
* Create dataspace for the second dataset.
*/
- hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
- (in memory */
- DataSpace mspace2( MSPACE2_RANK, dim2 );
+ hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
+ (in memory */
+ DataSpace mspace2(MSPACE2_RANK, dim2);
/*
* Select sequence of NPOINTS points in the file dataspace.
*/
hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
from the file dataspace */
- coord[0][0] = 0; coord[0][1] = 0;
- coord[1][0] = 3; coord[1][1] = 3;
- coord[2][0] = 3; coord[2][1] = 5;
- coord[3][0] = 5; coord[3][1] = 6;
+ coord[0][0] = 0;
+ coord[0][1] = 0;
+ coord[1][0] = 3;
+ coord[1][1] = 3;
+ coord[2][0] = 3;
+ coord[2][1] = 5;
+ coord[3][0] = 5;
+ coord[3][1] = 6;
- fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hsize_t *)coord);
+ fspace.selectElements(H5S_SELECT_SET, NPOINTS, (const hsize_t *)coord);
/*
* Write new selection of points to the dataset.
*/
- int values[] = {53, 59, 61, 67}; /* New values to be written */
- dataset->write( values, PredType::NATIVE_INT, mspace2, fspace );
+ int values[] = {53, 59, 61, 67}; /* New values to be written */
+ dataset->write(values, PredType::NATIVE_INT, mspace2, fspace);
/*
* File dataset should look like this:
@@ -203,12 +211,12 @@ int main (void)
/*
* Open the file.
*/
- file = new H5File( FILE_NAME, H5F_ACC_RDONLY );
+ file = new H5File(FILE_NAME, H5F_ACC_RDONLY);
/*
* Open the dataset.
*/
- dataset = new DataSet( file->openDataSet( DATASET_NAME ));
+ dataset = new DataSet(file->openDataSet(DATASET_NAME));
/*
* Get dataspace of the dataset.
@@ -223,10 +231,14 @@ int main (void)
* 0 59 0 61
*
*/
- start[0] = 1; start[1] = 2;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 3; count[1] = 4;
+ start[0] = 1;
+ start[1] = 2;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 3;
+ count[1] = 4;
fspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
/*
@@ -242,10 +254,14 @@ int main (void)
* 19 20
* 0 61
*/
- start[0] = 2; start[1] = 4;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 6; count[1] = 5;
+ start[0] = 2;
+ start[1] = 4;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 6;
+ count[1] = 5;
fspace.selectHyperslab(H5S_SELECT_OR, count, start, stride, block);
/*
@@ -261,15 +277,23 @@ int main (void)
* Select two hyperslabs in memory. Hyperslabs has the same
* size and shape as the selected hyperslabs for the file dataspace.
*/
- start[0] = 0; start[1] = 0;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 3; count[1] = 4;
+ start[0] = 0;
+ start[1] = 0;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 3;
+ count[1] = 4;
mspace.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
- start[0] = 1; start[1] = 2;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 6; count[1] = 5;
+ start[0] = 1;
+ start[1] = 2;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 6;
+ count[1] = 5;
mspace.selectHyperslab(H5S_SELECT_OR, count, start, stride, block);
/*
@@ -297,9 +321,8 @@ int main (void)
* 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 0 0
*/
- for (i=0; i < MSPACE_DIM1; i++)
- {
- for(j=0; j < MSPACE_DIM2; j++)
+ for (i = 0; i < MSPACE_DIM1; i++) {
+ for (j = 0; j < MSPACE_DIM2; j++)
cout << matrix_out[i][j] << " ";
cout << endl;
}
@@ -309,28 +332,25 @@ int main (void)
*/
delete dataset;
delete file;
- } // end of try block
+ } // end of try block
- // catch failure caused by the H5File operations
- catch( FileIException error )
- {
+ // catch failure caused by the H5File operations
+ catch (FileIException error) {
error.printError();
return -1;
- }
+ }
- // catch failure caused by the DataSet operations
- catch( DataSetIException error )
- {
+ // catch failure caused by the DataSet operations
+ catch (DataSetIException error) {
error.printError();
return -1;
- }
+ }
- // catch failure caused by the DataSpace operations
- catch( DataSpaceIException error )
- {
+ // catch failure caused by the DataSpace operations
+ catch (DataSpaceIException error) {
error.printError();
return -1;
- }
+ }
- return 0;
+ return 0;
}
diff --git a/c++/src/C2Cppfunction_map.htm b/c++/src/C2Cppfunction_map.htm
index b3f406d..b53ea15 100644
--- a/c++/src/C2Cppfunction_map.htm
+++ b/c++/src/C2Cppfunction_map.htm
@@ -1,24268 +1,24268 @@
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 15">
-<meta name=Originator content="Microsoft Word 15">
-<link rel=File-List href="C2Cppfunction_map_files/filelist.xml">
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Author>bmribler</o:Author>
- <o:Template>Normal</o:Template>
- <o:LastAuthor>bmribler</o:LastAuthor>
- <o:Revision>2</o:Revision>
- <o:TotalTime>1347</o:TotalTime>
- <o:Created>2018-05-21T15:01:00Z</o:Created>
- <o:LastSaved>2018-05-21T15:01:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>6393</o:Words>
- <o:Characters>36443</o:Characters>
- <o:Company>Microsoft</o:Company>
- <o:Lines>303</o:Lines>
- <o:Paragraphs>85</o:Paragraphs>
- <o:CharactersWithSpaces>42751</o:CharactersWithSpaces>
- <o:Version>15.00</o:Version>
- </o:DocumentProperties>
- <o:OfficeDocumentSettings>
- <o:RelyOnVML/>
- <o:AllowPNG/>
- </o:OfficeDocumentSettings>
-</xml><![endif]-->
-<link rel=themeData href="C2Cppfunction_map_files/themedata.thmx">
-<link rel=colorSchemeMapping
-href="C2Cppfunction_map_files/colorschememapping.xml">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:HideSpellingErrors/>
- <w:GrammarState>Clean</w:GrammarState>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:EnableOpenTypeKerning/>
- <w:DontFlipMirrorIndents/>
- <w:OverrideTableStyleHps/>
- </w:Compatibility>
- <m:mathPr>
- <m:mathFont m:val="Cambria Math"/>
- <m:brkBin m:val="before"/>
- <m:brkBinSub m:val="&#45;-"/>
- <m:smallFrac m:val="off"/>
- <m:dispDef/>
- <m:lMargin m:val="0"/>
- <m:rMargin m:val="0"/>
- <m:defJc m:val="centerGroup"/>
- <m:wrapIndent m:val="1440"/>
- <m:intLim m:val="subSup"/>
- <m:naryLim m:val="undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
- DefSemiHidden="false" DefQFormat="false" DefPriority="99"
- LatentStyleCount="371">
- <w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
- <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
- <w:LsdException Locked="false" Priority="9" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 6"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 7"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 8"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index 9"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 1"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 2"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 3"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 4"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 5"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 6"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 7"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 8"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" Name="toc 9"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Normal Indent"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="footnote text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="annotation text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="header"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="footer"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="index heading"/>
- <w:LsdException Locked="false" Priority="35" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="caption"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="table of figures"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="envelope address"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="envelope return"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="footnote reference"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="annotation reference"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="line number"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="page number"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="endnote reference"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="endnote text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="table of authorities"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="macro"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="toa heading"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Bullet"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Number"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Bullet 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Bullet 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Bullet 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Bullet 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Number 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Number 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Number 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Number 5"/>
- <w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Closing"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Signature"/>
- <w:LsdException Locked="false" Priority="1" SemiHidden="true"
- UnhideWhenUsed="true" Name="Default Paragraph Font"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text Indent"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Continue"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Continue 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Continue 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Continue 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="List Continue 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Message Header"/>
- <w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Salutation"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Date"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text First Indent"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text First Indent 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Note Heading"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text Indent 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Body Text Indent 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Block Text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Hyperlink"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="FollowedHyperlink"/>
- <w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
- <w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Document Map"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Plain Text"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="E-mail Signature"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Top of Form"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Bottom of Form"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Normal (Web)"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Acronym"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Address"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Cite"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Code"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Definition"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Keyboard"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Preformatted"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Sample"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Typewriter"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="HTML Variable"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Normal Table"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="annotation subject"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="No List"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Outline List 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Outline List 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Outline List 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Simple 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Simple 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Simple 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Classic 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Classic 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Classic 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Classic 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Colorful 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Colorful 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Colorful 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Columns 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Columns 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Columns 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Columns 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Columns 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 6"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 7"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Grid 8"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 4"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 5"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 6"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 7"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table List 8"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table 3D effects 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table 3D effects 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table 3D effects 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Contemporary"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Elegant"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Professional"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Subtle 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Subtle 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Web 1"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Web 2"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Web 3"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Balloon Text"/>
- <w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
- <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
- Name="Table Theme"/>
- <w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
- <w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
- <w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
- <w:LsdException Locked="false" Priority="34" QFormat="true"
- Name="List Paragraph"/>
- <w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
- <w:LsdException Locked="false" Priority="30" QFormat="true"
- Name="Intense Quote"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
- <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
- <w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
- <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
- <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
- <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
- <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
- <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
- <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
- <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
- <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
- <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
- <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
- <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
- <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
- <w:LsdException Locked="false" Priority="19" QFormat="true"
- Name="Subtle Emphasis"/>
- <w:LsdException Locked="false" Priority="21" QFormat="true"
- Name="Intense Emphasis"/>
- <w:LsdException Locked="false" Priority="31" QFormat="true"
- Name="Subtle Reference"/>
- <w:LsdException Locked="false" Priority="32" QFormat="true"
- Name="Intense Reference"/>
- <w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
- <w:LsdException Locked="false" Priority="37" SemiHidden="true"
- UnhideWhenUsed="true" Name="Bibliography"/>
- <w:LsdException Locked="false" Priority="39" SemiHidden="true"
- UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
- <w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
- <w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
- <w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
- <w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
- <w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
- <w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
- <w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
- <w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
- <w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 1"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 1"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 1"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 2"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 2"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 2"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 3"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 3"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 3"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 4"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 4"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 4"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 5"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 5"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 5"/>
- <w:LsdException Locked="false" Priority="46"
- Name="Grid Table 1 Light Accent 6"/>
- <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
- <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
- <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
- <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
- <w:LsdException Locked="false" Priority="51"
- Name="Grid Table 6 Colorful Accent 6"/>
- <w:LsdException Locked="false" Priority="52"
- Name="Grid Table 7 Colorful Accent 6"/>
- <w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
- <w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
- <w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 1"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 1"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 1"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 2"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 2"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 2"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 3"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 3"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 3"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 4"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 4"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 4"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 5"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 5"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 5"/>
- <w:LsdException Locked="false" Priority="46"
- Name="List Table 1 Light Accent 6"/>
- <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
- <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
- <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
- <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
- <w:LsdException Locked="false" Priority="51"
- Name="List Table 6 Colorful Accent 6"/>
- <w:LsdException Locked="false" Priority="52"
- Name="List Table 7 Colorful Accent 6"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:Helvetica;
- panose-1:2 11 6 4 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:Courier;
- panose-1:2 7 4 9 2 2 5 2 4 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:"Tms Rmn";
- panose-1:2 2 6 3 4 5 5 2 3 4;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:Helv;
- panose-1:2 11 6 4 2 2 2 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:"New York";
- panose-1:2 4 5 3 6 5 6 2 3 4;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:System;
- panose-1:0 0 0 0 0 0 0 0 0 0;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:Wingdings;
- panose-1:5 0 0 0 0 0 0 0 0 0;
- mso-font-charset:2;
- mso-generic-font-family:auto;
- mso-font-pitch:variable;
- mso-font-signature:0 268435456 0 0 -2147483648 0;}
-@font-face
- {font-family:"MS Mincho";
- panose-1:2 2 6 9 4 2 5 8 3 4;
- mso-font-alt:"\FF2D\FF33 \660E\671D";
- mso-font-charset:128;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 134676480 16 0 131072 0;}
-@font-face
- {font-family:Batang;
- panose-1:2 3 6 0 0 1 1 1 1 1;
- mso-font-alt:\BC14\D0D5;
- mso-font-charset:129;
- mso-generic-font-family:auto;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 151388160 16 0 524288 0;}
-@font-face
- {font-family:SimSun;
- panose-1:2 1 6 0 3 1 1 1 1 1;
- mso-font-alt:\5B8B\4F53;
- mso-font-charset:134;
- mso-generic-font-family:auto;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:1 135135232 16 0 262144 0;}
-@font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:auto;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:1 134742016 16 0 1048576 0;}
-@font-face
- {font-family:"MS Gothic";
- panose-1:2 11 6 9 7 2 5 8 2 4;
- mso-font-alt:"\FF2D\FF33 \30B4\30B7\30C3\30AF";
- mso-font-charset:128;
- mso-generic-font-family:modern;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 134676480 16 0 131072 0;}
-@font-face
- {font-family:Dotum;
- panose-1:2 11 6 0 0 1 1 1 1 1;
- mso-font-alt:\B3CB\C6C0;
- mso-font-charset:129;
- mso-generic-font-family:modern;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 151388160 16 0 524288 0;}
-@font-face
- {font-family:SimHei;
- panose-1:2 1 6 9 6 1 1 1 1 1;
- mso-font-alt:\9ED1\4F53;
- mso-font-charset:134;
- mso-generic-font-family:modern;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 135135232 16 0 262144 0;}
-@font-face
- {font-family:MingLiU;
- panose-1:2 2 5 9 0 0 0 0 0 0;
- mso-font-alt:\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:modern;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 134742016 16 0 1048576 0;}
-@font-face
- {font-family:Mincho;
- panose-1:2 2 6 9 4 3 5 8 3 5;
- mso-font-alt:\660E\671D;
- mso-font-charset:128;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 134676480 16 0 131072 0;}
-@font-face
- {font-family:Gulim;
- panose-1:2 11 6 0 0 1 1 1 1 1;
- mso-font-alt:\AD74\B9BC;
- mso-font-charset:129;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:fixed;
- mso-font-signature:1 151388160 16 0 524288 0;}
-@font-face
- {font-family:Century;
- panose-1:2 4 6 4 5 5 5 2 3 4;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:"Angsana New";
- panose-1:2 2 6 3 5 4 5 2 3 4;
- mso-font-charset:222;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:16777217 0 0 0 65536 0;}
-@font-face
- {font-family:"Cordia New";
- panose-1:2 11 3 4 2 2 2 2 2 4;
- mso-font-charset:222;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:16777217 0 0 0 65536 0;}
-@font-face
- {font-family:Mangal;
- panose-1:2 4 5 3 5 2 3 3 2 2;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:8192 0 0 0 0 0;}
-@font-face
- {font-family:Latha;
- panose-1:2 11 6 4 2 2 2 2 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:262144 0 0 0 0 0;}
-@font-face
- {font-family:Sylfaen;
- panose-1:1 10 5 2 5 3 6 3 3 3;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:12583555 0 0 0 13 0;}
-@font-face
- {font-family:Vrinda;
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Raavi;
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Shruti;
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Sendnya;
- panose-1:0 0 4 0 0 0 0 0 0 0;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Gautami;
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Tunga;
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:"Estrangelo Edessa";
- panose-1:3 8 6 0 0 0 0 0 0 0;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:"Arial Unicode MS";
- panose-1:2 11 6 4 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
-@font-face
- {font-family:"Calibri Light";
- panose-1:2 15 3 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-536859905 -1073732485 9 0 511 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-536859905 -1073732485 9 0 511 0;}
-@font-face
- {font-family:"Segoe UI";
- panose-1:2 11 5 2 4 2 4 2 2 3;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:3 0 0 0 1 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:8.0pt;
- margin-left:0in;
- line-height:107%;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- font-family:"Calibri",sans-serif;
- mso-ascii-font-family:Calibri;
- mso-ascii-theme-font:minor-latin;
- mso-fareast-font-family:Calibri;
- mso-fareast-theme-font:minor-latin;
- mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:minor-bidi;}
-h2
- {mso-style-priority:9;
- mso-style-qformat:yes;
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:2.0pt;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:0in;
- margin-bottom:.0001pt;
- line-height:107%;
- mso-pagination:widow-orphan lines-together;
- page-break-after:avoid;
- mso-outline-level:2;
- font-size:13.0pt;
- font-family:"Calibri Light",sans-serif;
- mso-ascii-font-family:"Calibri Light";
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:"Calibri Light";
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#2E74B5;
- mso-themecolor:accent1;
- mso-themeshade:191;
- font-weight:normal;}
-a:link, span.MsoHyperlink
- {mso-style-noshow:yes;
- mso-style-priority:99;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-noshow:yes;
- mso-style-priority:99;
- color:#954F72;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-priority:9;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Calibri Light",sans-serif;
- mso-ascii-font-family:"Calibri Light";
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:"Calibri Light";
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#2E74B5;
- mso-themecolor:accent1;
- mso-themeshade:191;}
-span.msoIns
- {mso-style-type:export-only;
- mso-style-name:"";
- text-decoration:underline;
- text-underline:single;
- color:teal;}
-span.msoDel
- {mso-style-type:export-only;
- mso-style-name:"";
- text-decoration:line-through;
- color:red;}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-family:"Calibri",sans-serif;
- mso-ascii-font-family:Calibri;
- mso-ascii-theme-font:minor-latin;
- mso-fareast-font-family:Calibri;
- mso-fareast-theme-font:minor-latin;
- mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:minor-bidi;}
-.MsoPapDefault
- {mso-style-type:export-only;
- margin-bottom:8.0pt;
- line-height:107%;}
-@page WordSection1
- {size:11.0in 8.5in;
- mso-page-orientation:landscape;
- margin:1.0in 1.0in 1.0in 1.0in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.WordSection1
- {page:WordSection1;}
- /* List Definitions */
- @list l0
- {mso-list-id:364453017;
- mso-list-template-ids:-1899575734;}
-@list l0:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-@list l0:level2
- {mso-level-number-format:bullet;
- mso-level-text:o;
- mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:"Courier New";
- mso-bidi-font-family:"Times New Roman";}
-@list l0:level3
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level4
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level5
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level6
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level7
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level8
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l0:level9
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1
- {mso-list-id:1808625326;
- mso-list-template-ids:-1664603998;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-@list l1:level2
- {mso-level-number-format:bullet;
- mso-level-text:o;
- mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:"Courier New";
- mso-bidi-font-family:"Times New Roman";}
-@list l1:level3
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level4
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level5
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level6
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level7
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level8
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l1:level9
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2
- {mso-list-id:2000766018;
- mso-list-template-ids:-780390354;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Symbol;}
-@list l2:level2
- {mso-level-number-format:bullet;
- mso-level-text:o;
- mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:"Courier New";
- mso-bidi-font-family:"Times New Roman";}
-@list l2:level3
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level4
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level5
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level6
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level7
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level8
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-@list l2:level9
- {mso-level-number-format:bullet;
- mso-level-text:\F0A7;
- mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- mso-ansi-font-size:10.0pt;
- font-family:Wingdings;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin-top:0in;
- mso-para-margin-right:0in;
- mso-para-margin-bottom:8.0pt;
- mso-para-margin-left:0in;
- line-height:107%;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- font-family:"Calibri",sans-serif;
- mso-ascii-font-family:Calibri;
- mso-ascii-theme-font:minor-latin;
- mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:minor-bidi;}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-priority:39;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- font-family:"Calibri",sans-serif;
- mso-ascii-font-family:Calibri;
- mso-ascii-theme-font:minor-latin;
- mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:minor-bidi;}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext="edit" spidmax="1026"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext="edit">
- <o:idmap v:ext="edit" data="1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=EN-US link=blue vlink="#954F72" style='tab-interval:.5in'>
-
-<div class=WordSection1>
-
-<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
-normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
-107%;font-family:"Times New Roman",serif'>C++ API Wrappers of HDF5 C Functions<o:p></o:p></span></b></p>
-
-<p class=MsoNormal><o:p>&nbsp;</o:p></p>
-
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=0
- style='width:736.55pt;margin-left:5.65pt;border-collapse:collapse;border:none;
- mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:1184;mso-padding-alt:
- 0in 5.4pt 0in 5.4pt'>
- <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><b style='mso-bidi-font-weight:normal'>C Function<o:p></o:p></b></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border:solid windowtext 1.0pt;
- border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>C++
- Wrapper<o:p></o:p></b></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border:solid windowtext 1.0pt;
- border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>1.8<o:p></o:p></b></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border:solid windowtext 1.0pt;
- border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>1.10<o:p></o:p></b></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border:solid windowtext 1.0pt;
- border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
- solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>Comment<o:p></o:p></b></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:1'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Acreate2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Location::createAttribute( const char* name, const
- DataType&amp; data_type, const DataSpace&amp; data_space, const PropList&amp;
- create_plist = PropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:2'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Location::createAttribute( const H5std_string&amp; name,
- const DataType&amp; data_type, const DataSpace&amp; data_space, const
- PropList&amp; create_plist = PropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:3'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Object::createAttribute( const char* name, const
- DataType&amp; data_type, const DataSpace&amp; data_space, const PropList&amp;
- create_plist = PropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Revised model</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:4'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Object::createAttribute( const H5std_string&amp; name,
- const DataType&amp; data_type, const DataSpace&amp; data_space, const
- PropList&amp; create_plist = PropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Revised model</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:5'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Acreate_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:6'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aopen</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Location::openAttribute( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:7'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Location::openAttribute( const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:8'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Object::openAttribute( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:9'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Object::openAttribute( const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:10'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aopen_by_idx</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aopen_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Location::openAttribute( const unsigned int idx )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:11'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute H5Object::openAttribute( const unsigned int idx )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:12'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aopen_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:13'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Awrite</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::write( const DataType&amp; mem_type, const void *buf
- )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:14'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::write(const DataType&amp; mem_type, const
- H5std_string&amp; strg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:15'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aread</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::read( const DataType&amp; mem_type, void *buf )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:16'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::read(const DataType&amp; mem_type, H5std_string&amp;
- strg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:17'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:18'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Attribute::~Attribute()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:19'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_space</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSpace Attribute::getSpace()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:20'>
- <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType AbstractDs::getDataType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:21'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType AbstractDs::getArrayType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:22'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>CompType AbstractDs::getCompType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:23'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType AbstractDs::getEnumType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:24'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>IntType AbstractDs::getIntType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:25'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FloatType AbstractDs::getFloatType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:26'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>StrType AbstractDs::getStrType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:27'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType AbstractDs::getVarLenType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:28'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_create_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:29'>
- <td width=263 rowspan=5 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t Attribute::getName(char* attr_name, size_t buf_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:30'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string Attribute::getName()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:31'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string Attribute::getName(size_t len) const</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:32'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t Attribute::getName(H5std_string&amp; attr_name, size_t len)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:33'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t Attribute::getName( size_t len, H5std_string&amp; attr_name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:34'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_name_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:35'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_storage_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t Attribute::getStorageSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:36'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:37'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_info_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:38'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aget_info_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:39'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Arename</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::renameAttr(const char* oldname, const char* newname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:40'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Object::renameAttr(const char* oldname, const char* newname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:41'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Arename_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:42'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aiterate2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int H5Location::iterateAttrs( attr_operator_t user_op, unsigned
- *_idx, void *op_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:43'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx,
- void *op_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:44'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aiterate_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:45'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Adelete</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::removeAttr( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:46'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Object::removeAttr( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:47'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Adelete_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:48'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Adelete_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:49'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aexists</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool H5Location::attrExists(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated in 1.8.19</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:50'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool H5Object::attrExists(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:51'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Aexists_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:52'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:53'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dcreate2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet CommonFG::createDataSet( const char* name, const
- DataType&amp; data_type, const DataSpace&amp; data_space, const
- DSetCreatPropList&amp; create_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:54'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet CommonFG::createDataSet( const H5std_string&amp; name, const
- DataType&amp; data_type, const DataSpace&amp; data_space, const
- DSetCreatPropList&amp; create_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:55'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet H5Location::createDataSet( const char* name, const
- DataType&amp; data_type, const DataSpace&amp; data_space, const
- DSetCreatPropList&amp; create_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:56'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet H5Location::createDataSet( const H5std_string&amp; name,
- const DataType&amp; data_type, const DataSpace&amp; data_space, const
- DSetCreatPropList&amp; create_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:57'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dcreate_anon</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:58'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dopen2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet CommonFG::openDataSet( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:59'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet CommonFG::openDataSet( const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:60'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet H5Location::openDataSet( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:61'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet H5Location::openDataSet( const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:62'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:63'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet destructor</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:64'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_space</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSpace DataSet::getSpace()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:65'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_space_status</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::getSpaceStatus(H5D_space_status_t&amp; status)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:66'>
- <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType AbstractDs::getDataType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:67'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType AbstractDs::getArrayType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:68'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>CompType AbstractDs::getCompType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:69'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType AbstractDs::getEnumType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:70'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>IntType AbstractDs::getIntType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:71'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FloatType AbstractDs::getFloatType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:72'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>StrType AbstractDs::getStrType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:73'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType AbstractDs::getVarLenType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:74'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_create_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DSetCreatPropList DataSet::getCreatePlist()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:75'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_access_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:76'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_storage_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t DataSet::getStorageSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:77'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dget_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>haddr_t DataSet::getOffset()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:78'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dread</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::read( void* buf, const DataType&amp; mem_type, const
- DataSpace&amp; mem_space, const DataSpace&amp; file_space, const
- DSetMemXferPropList&amp; xfer_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:79'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::read(H5std_string&amp; strg, const DataType&amp;
- mem_type, const DataSpace&amp; mem_space, const DataSpace&amp; file_space,
- const DSetMemXferPropList&amp; xfer_plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:80'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dwrite</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::write( const void* buf, const DataType&amp; mem_type,
- const DataSpace&amp; mem_space, const DataSpace&amp; file_space, const
- DSetMemXferPropList&amp; xfer_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:81'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::write( const H5std_string&amp; strg, const
- DataType&amp; mem_type, const DataSpace&amp; mem_space, const DataSpace&amp;
- file_space, const DSetMemXferPropList&amp; xfer_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:82'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Diterate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DataSet::iterateElems( void* buf, const DataType&amp; type, const
- DataSpace&amp; space, H5D_operator_t op, void* op_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:83'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dvlen_reclaim</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::vlenReclaim(const DataType&amp; type, const
- DataSpace&amp; space, const DSetMemXferPropList&amp; xfer_plist, void* buf )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Remove this one</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:84'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::vlenReclaim(void* buf, const DataType&amp; type, const
- DataSpace&amp; space, const DSetMemXferPropList&amp; xfer_plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Better prototype</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:85'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dvlen_get_buf_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t DataSet::getVlenBufSize(const DataType&amp; type, const
- DataSpace&amp; space)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:86'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dfill</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::fillMemBuf(const void *fill, const DataType&amp;
- fill_type, void *buf, const DataType&amp; buf_type, const DataSpace&amp;
- space)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:87'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::fillMemBuf(void *buf, const DataType&amp; buf_type,
- const DataSpace&amp; space</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:88'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dset_extent</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSet::extend( const hsize_t* size )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:89'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dscatter</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:90'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Dgather</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:91'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ddebug</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:92'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:93'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eregister_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:94'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eunregister_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:95'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eclose_msg</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:96'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ecreate_msg</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:97'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ecreate_stack</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:98'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eget_current_stack</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:99'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eclose_stack</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:100'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eget_class_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:101'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eset_current_stack</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:102'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Epush2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:103'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Epop</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:104'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eprint2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Exception::printErrorStack(FILE* stream, hid_t err_stack)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:105'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ewalk2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Exception::walkErrorStack( H5E_direction_t direction,
- H5E_walk2_t func, void* client_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:106'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eget_auto2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Exception::getAutoPrint( H5E_auto2_t&amp; func, void**
- client_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:107'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eset_auto2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Exception::setAutoPrint( H5E_auto2_t&amp; func, void*
- client_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:108'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eclear2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Exception::clearErrorStack()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:109'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eauto_is_v2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:110'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eget_msg</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string Exception::getMajorString( hid_t err_major )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:111'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string Exception::getMinorString( hid_t err_minor )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:112'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Eget_num</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:113'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:114'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_core</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setCore (size_t increment, hbool_t
- backing_store)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:115'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fapl_core</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::getCore (size_t&amp; increment, hbool_t&amp;
- backing_store)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:116'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_direct</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:117'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fapl_direct</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:118'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_family_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:119'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_family</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList&amp;
- memb_plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:120'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fapl_family</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::getFamily(hsize_t&amp; memb_size,
- FileAccPropList&amp; memb_plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:121'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_log</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setLog(const char *logfile, unsigned flags,
- size_t buf_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:122'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_multi_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:123'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_multi</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:124'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fapl_multi</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:125'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_split</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSplit(const FileAccPropList&amp; meta_plist,
- const FileAccPropList&amp; raw_plist, const char* meta_ext, const char*
- raw_ext )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:126'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSplit(FileAccPropList&amp; meta_plist,
- FileAccPropList&amp; raw_plist, const char* meta_ext, const char* raw_ext )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:127'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSplit(const FileAccPropList&amp; meta_plist,
- const FileAccPropList&amp; raw_plist, const H5std_string&amp; meta_ext, const
- H5std_string&amp; raw_ext )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:128'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSplit(FileAccPropList&amp; meta_plist,
- FileAccPropList&amp; raw_plist, const H5std_string&amp; meta_ext, const
- H5std_string&amp; raw_ext )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:129'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_log_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:130'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_core_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:131'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_direct_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:132'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:133'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:134'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDunregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:135'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDopen</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:136'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:137'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDcmp</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:138'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDquery</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:139'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDalloc</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:140'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDfree</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:141'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDget_eoa</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:142'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDset_eoa</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:143'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDget_eof</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:144'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDget_vfd_handle</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:145'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDread</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:146'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDwrite</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:147'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDflush</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:148'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FDtruncate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:149'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_sec2_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:150'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_sec2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSec2()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:151'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_stdio_init</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:152'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_stdio</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setStdio()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:153'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fapl_windows</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:154'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fis_hdf5</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool H5File::isHdf5(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:155'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fcreate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5File::H5File( const char* name, unsigned int flags, const
- FileCreatPropList&amp; create_plist, const FileAccPropList&amp; access_plist
- )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:156'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5File::H5File( const H5std_string&amp; name, unsigned int flags,
- const FileCreatPropList&amp; create_plist, const FileAccPropList&amp;
- access_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:157'>
- <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fopen</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5File::H5File( const char* name, unsigned int flags, const
- FileCreatPropList&amp; create_plist, const FileAccPropList&amp; access_plist
- )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:158'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5File::H5File( const H5std_string&amp; name, unsigned int flags,
- const FileCreatPropList&amp; create_plist, const FileAccPropList&amp;
- access_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:159'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::openFile(const char* name, unsigned int flags, const
- FileAccPropList&amp; access_plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:160'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Freopen</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::reOpen()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:161'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fflush</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::flush(H5F_scope_t scope)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:162'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Attribute::flush(H5F_scope_t scope)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:163'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:164'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5File destructor</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:165'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_create_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FileCreatPropList H5File::getCreatePlist()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:166'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_access_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FileAccPropList H5File::getAccessPlist()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:167'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_intent</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:168'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_obj_count</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5File::getObjCount(unsigned types)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:169'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5File::getObjCount()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:170'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_obj_ids</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t
- *oid_list)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:171'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_vfd_handle</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::getVFDHandle(const FileAccPropList&amp; fapl, void
- **file_handle)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:172'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5File::getVFDHandle(void **file_handle)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:173'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fmount</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::mount(const char* name, const H5File&amp; child, const
- PropList&amp; plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:174'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::mount(const char* name, H5File&amp; child,
- PropList&amp; plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:175'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::mount(const H5std_string&amp; name, const H5File&amp;
- child, const PropList&amp; plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:176'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::mount(const H5std_string&amp; name, H5File&amp; child,
- PropList&amp; plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:177'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Funmount</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::unmount( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:178'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::unmount( const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:179'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_freespace</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hssize_t H5File::getFreeSpace()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:180'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_filesize</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t H5File::getFileSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:181'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_file_image</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:182'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_mdc_config</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:183'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fset_mdc_config</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:184'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_mdc_hit_rate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:185'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_mdc_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:186'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Freset_mdc_hit_rate_stats</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:187'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string H5Location::getFileName()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:188'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string Attribute::getFileName()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Will be retired</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:189'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_info2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:190'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fget_free_sections</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:191'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Fclear_elink_file_cache</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:192'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:193'>
- <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gcreate2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group CommonFG::createGroup( const char* name, size_t size_hint )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:194'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group CommonFG::createGroup( const H5std_string&amp; name, size_t
- size_hint )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:195'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group H5Location::createGroup( const char* name, size_t size_hint )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:196'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group H5Location::createGroup( const H5std_string&amp; name, size_t
- size_hint )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:197'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group createGroup(const char* name, const LinkCreatPropList&amp;
- lcpl)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:198'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group createGroup(const H5std_string&amp; name, const
- LinkCreatPropList&amp; lcpl)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:199'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gcreate_anon</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:200'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gopen2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group CommonFG::openGroup( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:201'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group CommonFG::openGroup( const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:202'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group H5Location::openGroup( const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:203'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group H5Location::openGroup( const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:204'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_create_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:205'>
- <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t CommonFG::getNumObjs()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:206'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t H5Location::getNumObjs()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Moved to Group in 1.10.2</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:207'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t Group::getNumObjs()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:208'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_info_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:209'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_info_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:210'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void Group::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:211'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Group destructor</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:212'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Glink</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:213'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Glink2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:214'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gmove</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:215'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gmove2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:216'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gunlink</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:217'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_hard</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:218'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_soft</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:219'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_linkval</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:220'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gset_comment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:221'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_comment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:222'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Giterate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t
- op , void* op_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:223'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int CommonFG::iterateElems( const H5std_string&amp; name, int *idx,
- H5G_iterate_t op , void* op_data )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:224'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_num_objs</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>no</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:225'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Gget_objinfo<o:p></o:p></span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::getObjinfo( const char* name, hbool_t follow_link,
- H5G_stat_t&amp; statbuf )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:226'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::getObjinfo( const H5std_string&amp; name, hbool_t
- follow_link, H5G_stat_t&amp; statbuf )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:227'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::getObjinfo( const char* name, H5G_stat_t&amp; statbuf
- )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:228'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::getObjinfo( const H5std_string&amp; name,
- H5G_stat_t&amp; statbuf )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:229'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Gget_objname_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:230'>
- <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Gget_objtype_by_idx</span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:231'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:232'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string&amp;
- type_name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:233'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:234'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:235'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iobject_verify</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:236'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iremove_verify</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:237'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iget_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:238'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iget_file_id</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:239'>
- <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iget_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5Object::getObjName(char *obj_name, size_t buf_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:240'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string H5Object::getObjName()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:241'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5Object::getObjName(H5std_string&amp; obj_name, size_t len)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:242'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iinc_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void IdComponent::incRefCount(const hid_t obj_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:243'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void IdComponent::incRefCount()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:244'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Idec_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void IdComponent::decRefCount(const hid_t obj_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:245'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void IdComponent::decRefCount()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:246'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iget_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int IdComponent::getCounter(const hid_t obj_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:247'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int IdComponent::getCounter()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:248'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iregister_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:249'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iclear_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:250'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Idestroy_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:251'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iinc_type_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:252'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Idec_type_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:253'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iget_type_ref</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:254'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Isearch</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:255'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Inmembers</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:256'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Itype_exists</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:257'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Iis_valid</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:258'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:259'>
- <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lmove</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::moveLink(const char* src_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const Group&amp;
- dst, const char* dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:260'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::moveLink(const H5std_string&amp; src_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const Group&amp;
- dst, const H5std_string&amp; dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:261'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::moveLink(const char* src_name, const char* dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:262'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::moveLink(const H5std_string&amp; src_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- H5std_string&amp; dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>            </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:263'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::move( const char* src, const char* dst )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated due to inadequate functionality</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:264'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::move( const H5std_string&amp; src, const
- H5std_string&amp; dst )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Same as above</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:265'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcopy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::copyLink(const char *src_name, const Group&amp; dst,
- const char *dst_name, const LinkCreatPropList&amp; lcpl =
- LinkCreatPropList::DEFAULT, </p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:266'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::copyLink(const H5std_string&amp; src_name, const
- Group&amp; dst, const H5std_string&amp; dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT, </p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:267'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::copyLink(const char *src_name, const char *dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const<span style='mso-spacerun:yes'>  </span>LinkAccPropList&amp;
- lapl = LinkAccPropList::DEFAULT) </p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:268'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::copyLink(const H5std_string&amp; src_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const H5std_string&amp; dst_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:269'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_hard</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const char *curr_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const Group&amp;
- new_loc, const char *new_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:270'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const H5std_string&amp; curr_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const Group&amp;
- new_loc, const H5std_string&amp; new_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:271'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const char *curr_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const hid_t
- same_loc, const char *new_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:272'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const H5std_string&amp; curr_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const hid_t
- same_loc, const H5std_string&amp; new_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:273'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_soft</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const char *target_name, const char *link_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:274'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::link(const H5std_string&amp; target_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- H5std_string&amp; link_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:275'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_hard</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_soft</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::link( H5L_type_t link_type, const char* curr_name,
- const char* new_name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated due to inadequate functionality</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:276'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::link( H5L_type_t link_type, const H5std_string&amp;
- curr_name, const H5std_string&amp; new_name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Deprecated due to inadequate functionality</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:277'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ldelete</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::unlink( const char* name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Added second argument in 1.8.21</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:278'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CommonFG::unlink( const H5std_string&amp; name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Added second argument in 1.8.21</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:279'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::unlink( const char* name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Moved from CommonFG &amp; added 2<sup>nd</sup> arg in 1.10.2</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:280'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::unlink( const H5std_string&amp; name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>             </span>const LinkAccPropList&amp;
- lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Moved from CommonFG &amp; added 2<sup>nd</sup> arg in 1.10.2</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:281'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ldelete_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:282'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lget_val</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string CommonFG::getLinkval( const char* name, size_t size )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:283'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string CommonFG::getLinkval( const H5std_string&amp; name,
- size_t size )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:284'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string H5Location::getLinkval( const char* name, size_t size )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:285'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string H5Location::getLinkval( const H5std_string&amp; name,
- size_t size )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:286'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lget_val_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:287'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lexists</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool H5Location::nameExists(const char* name, const
- LinkAccPropList&amp; lapl)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:288'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool H5Location::nameExists(const H5std_string&amp; name, const
- LinkAccPropList&amp; lapl)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:289'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lget_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5L_info_t getLinkInfo(const char* link_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-tab-count:1'>               </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:290'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5L_info_t getLinkInfo(const H5std_string&amp; link_name,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-tab-count:1'>               </span>const
- LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:291'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lget_info_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:292'>
- <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lget_name_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string CommonFG::getObjnameByIdx(hsize_t idx)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:293'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t
- size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:294'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string&amp;
- name, size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:295'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string H5Location::getObjnameByIdx(hsize_t idx)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:296'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5Location::getObjnameByIdx(hsize_t idx, char* name, size_t
- size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:297'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t H5Location::getObjnameByIdx(hsize_t idx, H5std_string&amp;
- name, size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:298'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Literate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:299'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Literate_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:300'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lvisit</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:301'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lvisit_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:302'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:303'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_ud</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:304'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:305'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lunregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:306'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lis_registered</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:307'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lunpack_elink_val</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:308'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Lcreate_external</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:309'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:310'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oopen</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:311'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oopen_by_addr</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:312'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oopen_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:313'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oexists_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:314'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oget_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:315'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oget_info_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t CommonFG::childObjType(const char* objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:316'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t CommonFG::childObjType(const H5std_string&amp; objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:317'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t H5Location::childObjType(const char* objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:318'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t H5Location::childObjType(const H5std_string&amp; objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:319'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oget_info_by_idx</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t
- index_type, H5_iter_order_t order, const char* objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:320'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t
- index_type, H5_iter_order_t order, const char* objname)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
- background1;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:321'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Olink</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:322'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oincr_refcount</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:323'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Odecr_refcount</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:324'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ocopy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:325'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oset_comment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:326'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oset_comment_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:327'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oget_comment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:328'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oget_comment_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:329'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ovisit</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:330'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Ovisit_by_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:331'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Oclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:332'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:333'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5PLset_loading_state</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:334'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5PLget_loading_state</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:335'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:336'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pcreate_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:337'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_class_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string PropList::getClassName()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:338'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pcreate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>PropList::PropList(const hid_t plist_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:339'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pregister2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:340'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pinsert2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:341'>
- <td width=263 rowspan=5 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::setProperty(const char* name, void* value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:342'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::setProperty(const char* name, const char* charptr)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:343'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::setProperty(const char* name, H5std_string&amp; strg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:344'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::setProperty(const H5std_string&amp; name, void* value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:345'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::setProperty(const H5std_string&amp; name,
- H5std_string&amp; strg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:346'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pexist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool PropList::propExist(const char* name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:347'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool PropList::propExist(const H5std_string&amp; name )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:348'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pencode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::encode()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:349'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pdecode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* DataType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* ArrayType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* CompType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* DataType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* EnumType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* FloatType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* IntType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* StrType::decode()</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* VarLenType::decode()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:350;height:10.0pt'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t PropList::getPropSize(const char *name)</p>
- </td>
- <td width=35 rowspan=2 valign=top style='width:26.05pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 rowspan=2 valign=top style='width:31.45pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 rowspan=2 valign=top style='width:126.65pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:351;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t PropList::getPropSize(const H5std_string&amp; name)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:352'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_nprops</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t PropList::getNumProps()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:353'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hid_t PropList::getClass()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:354'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_class_parent</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>PropList PropList::getClassParent()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:355;height:10.0pt'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::getProperty(const char* name, void* value)</p>
- </td>
- <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:356;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string PropList::getProperty(const char* name)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:357;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::getProperty(const H5std_string&amp; name, void* value)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:358;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string PropList::getProperty(const H5std_string&amp; name)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:359'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pequal</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool PropList::operator==(const PropList&amp; rhs)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:360'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pisa_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool PropList::isAClass(const PropList&amp; prop_class)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:361'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Piterate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:362;height:10.0pt'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pcopy_prop</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::copyProp(PropList&amp; dest, const char *name)</p>
- </td>
- <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:363;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::copyProp( PropList&amp; dest, const H5std_string&amp;
- name )</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:364;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::copyProp( PropList&amp; dest, PropList&amp; src, const
- char *name )</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:365;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::copyProp( PropList&amp; dest, PropList&amp; src, const
- H5std_string&amp; name )</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:366;height:10.0pt'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Premove</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::removeProp(const char *name)</p>
- </td>
- <td width=35 rowspan=2 valign=top style='width:26.05pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 rowspan=2 valign=top style='width:31.45pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 rowspan=2 valign=top style='width:126.65pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:367;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::removeProp(const H5std_string&amp; name)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:368'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Punregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:369'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pclose_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::closeClass()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:370'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:371'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>PropList destructor</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:372'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pcopy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void PropList::copy( const PropList&amp; like_plist )</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:373'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_attr_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact = 8,
- unsigned min_dense = 6)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:374'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_attr_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void ObjCreatPropList::getAttrPhaseChange(unsigned&amp; max_compact,
- unsigned&amp; min_dense)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:375'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_attr_creation_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:376'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_attr_creation_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>unsigned ObjCreatPropList::getAttrCrtOrder()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:377'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_obj_track_times</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:378'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_obj_track_times</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:379'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pmodify_filter</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t
- cd_nelmts, const unsigned int cd_values[])</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:380'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_filter</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned
- int flags,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>size_t cd_nelmts, const
- unsigned int cd_values[])</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:381'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_nfilters</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DSetCreatPropList::getNfilters()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:382'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_filter2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>unsigned int
- &amp;flags, size_t &amp;cd_nelmts, unsigned int* cd_values,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>size_t namelen, char
- name[], unsigned int&amp; filter_config)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:383'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_filter_by_id2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>unsigned int
- &amp;flags, size_t &amp;cd_nelmts, unsigned int* cd_values,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>size_t namelen, char
- name[], unsigned int &amp;filter_config)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:384'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pall_filters_avail</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DSetCreatPropList::allFiltersAvail()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:385'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Premove_filter</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:386'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_deflate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setDeflate(int level)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:387'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fletcher32</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setFletcher32()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:388'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_userblock</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::setUserblock(hsize_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:389'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_userblock</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t FileCreatPropList::getUserblock()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:390'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_sizes</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::setSizes(size_t sizeof_addr, size_t
- sizeof_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:391'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_sizes</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::getSizes(size_t&amp; sizeof_addr, size_t&amp;
- sizeof_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:392'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_sym_k</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::setSymk(unsigned ik, unsigned lk)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:393'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_sym_k</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::getSymk(unsigned&amp; ik, unsigned&amp; lk)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:394'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_istore_k</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::setIstorek(unsigned ik)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:395'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_istore_k</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>unsigned FileCreatPropList::getIstorek()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:396'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_shared_mesg_nindexes</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:397'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_shared_mesg_nindexes</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:398'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_shared_mesg_index</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:399'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_shared_mesg_index</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:400'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_shared_mesg_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:401'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_shared_mesg_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:402'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_file_space</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t
- strategy, hbool_t persist, hsize_t threshold)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:403'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_file_space</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void
- FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t&amp; strategy,
- hbool_t&amp; persist, hsize_t&amp; threshold)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:404'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_alignment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setAlignment(hsize_t threshold, hsize_t
- alignment)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:405'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_alignment</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::getAlignment(hsize_t &amp;threshold, hsize_t
- &amp;alignment)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:406'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_driver</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setDriver(hid_t new_driver_id, const void
- *new_driver_info)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:407'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_driver</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hid_t FileAccPropList::getDriver()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:408'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_driver_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:409'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_family_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setFamilyOffset(hsize_t offset)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:410'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_family_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t FileAccPropList::getFamilyOffset()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:411'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_multi_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setMultiType(H5FD_mem_t dtype)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:412'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_multi_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5FD_mem_t FileAccPropList::getMultiType()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:413'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_cache</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts,
- size_t rdcc_nbytes, double rdcc_w0)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:414'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_cache</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::getCache(int&amp; mdc_nelmts, size_t&amp;
- rdcc_nelmts, size_t&amp; rdcc_nbytes, double&amp; rdcc_w0)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:415'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_mdc_config</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:416'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_mdc_config</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:417'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_gc_references</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setGcReferences(unsigned gc_ref)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:418'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_gc_references</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>unsigned FileAccPropList::getGcReferences()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:419'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fclose_degree</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:420'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fclose_degree</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5F_close_degree_t FileAccPropList::getFcloseDegree()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:421'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_meta_block_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setMetaBlockSize(hsize_t &amp;block_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:422'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_meta_block_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t FileAccPropList::getMetaBlockSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:423'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_sieve_buf_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setSieveBufSize(size_t bufsize)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:424'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_sieve_buf_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t FileAccPropList::getSieveBufSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:425'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_small_data_block_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:426'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_small_data_block_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hsize_t DSetMemXferPropList::getSmallDataBlockSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:427'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_libver_bounds</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::setLibverBounds(H5F_libver_t libver_low,
- H5F_libver_t libver_high)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:428'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_libver_bounds</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FileAccPropList::getLibverBounds(H5F_libver_t&amp; libver_low,
- H5F_libver_t&amp; libver_high)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:429'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_file_cache_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:430'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_file_cache_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:431'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_elink_file_cache_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:432'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_file_image</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:433'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_file_image</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:434'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_file_image_callbacks</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:435'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_file_image_callbacks</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:436'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:437'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_core_write_tracking</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:438'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_core_write_tracking</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:439'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:440'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_layout</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setLayout(H5D_layout_t layout)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:441'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_layout</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5D_layout_t DSetCreatPropList::getLayout()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:442'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_chunk</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:443'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_chunk</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:444'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_external</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setExternal(const char* name, off_t offset,
- hsize_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:445'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_external_count</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DSetCreatPropList::getExternalCount</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:446'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_external</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::getExternal(unsigned idx, size_t name_size,
- char* name, off_t&amp; offset, hsize_t&amp; size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:447'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_szip</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned
- int pixels_per_block)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:448'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_shuffle</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setShuffle()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:449'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_nbit</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setNbit()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:450'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_scaleoffset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:451'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fill_value</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setFillValue(const DataType&amp; fvalue_type,
- const void* value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:452'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fill_value</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::getFillValue(const DataType&amp; fvalue_type,
- void* value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:453'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pfill_value_defined</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5D_fill_value_t DSetCreatPropList::isFillValueDefined()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:454'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_alloc_time</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:455'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_alloc_time</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5D_alloc_time_t DSetCreatPropList::getAllocTime()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:456'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_fill_time</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:457'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_fill_time</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5D_fill_time_t DSetCreatPropList::getFillTime()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:458'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_chunk_cache</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:459'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_chunk_cache</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:460'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_data_transform</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setDataTransform(const char* expression)</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setDataTransform(const H5std_string&amp;
- expression)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:461'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_data_transform</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t
- buf_size)</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string DSetMemXferPropList::getDataTransform()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:462'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_buffer</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setBuffer(size_t size, void* tconv, void*
- bkg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:463'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_buffer</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t DSetMemXferPropList::getBuffer(void** tconv, void** bkg)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:464'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_preserve</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setPreserve(bool status)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:465'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_preserve</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DSetMemXferPropList::getPreserve()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:466'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_edc_check</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:467'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Z_EDC_t H5Pget_edc_check</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Z_EDC_t DSetMemXferPropList::getEDCCheck()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:468'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_filter_callback</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:469'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_btree_ratios</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setBtreeRatios(double left, double middle,
- double right)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:470'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_btree_ratios</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::getBtreeRatios(double&amp; left,
- double&amp; middle, double&amp; right)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:471'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_vlen_mem_manager</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setVlenMemManager() </p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func,
- void* alloc_info, H5MM_free_t free_func, void* free_info)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:472'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_vlen_mem_manager</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t&amp;
- alloc_func, void** alloc_info, H5MM_free_t&amp; free_func, void** free_info)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:473'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_hyper_vector_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:474'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_hyper_vector_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t DSetMemXferPropList::getHyperVectorSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:475'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_type_conv_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op,
- void *user_data)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:476'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_type_conv_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op,
- void **user_data)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:477'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_create_intermediate_group</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:478'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_create_intermediate_group</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:479'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_local_heap_size_hint</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:480'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_local_heap_size_hint</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:481'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_link_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:482'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_link_phase_change</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:483'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_est_link_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:484'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_est_link_info</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:485'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_link_creation_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:486'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_link_creation_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:487'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_char_encoding</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ASAP</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:488'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_char_encoding</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ASAP</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:489'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_nlinks</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void LinkAccPropList::setNumLinks(size_t nlinks)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:490'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_nlinks</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t LinkAccPropList::getNumLinks()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:491'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_prefix</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:492'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_elink_prefix</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:493'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_elink_fapl</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:494'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_fapl</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:495'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_acc_flags</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:496'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_elink_acc_flags</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:497'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_elink_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:498'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_elink_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:499'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:500'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_copy_object</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:501'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_copy_object</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:502'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Padd_merge_committed_dtype_path</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:503'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pfree_merge_committed_dtype_paths</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:504'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pset_mcdt_search_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:505'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Pget_mcdt_search_cb</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:506'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:507'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5open</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::open()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:508'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5close</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:509'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5dont_atexit</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::dontAtExit()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:510'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5garbage_collect</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal;tab-stops:46.65pt'>void H5Library::garbageCollect()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:511'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5set_free_list_limits</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::setFreeListLimits(int reg_global_lim, int
- reg_list_lim,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>int arr_global_lim, int
- arr_list_lim, int blk_global_lim,</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='mso-spacerun:yes'>        </span>int blk_list_lim)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:512'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5get_libversion</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::getLibVersion(unsigned&amp; majnum, unsigned&amp;
- minnum, unsigned&amp; relnum)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:513'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5check_version</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Library::checkVersion(unsigned majnum, unsigned minnum,
- unsigned relnum)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:514'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5free_memory</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No wrapper</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:515'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5allocate_memory</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No wrapper</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:516'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5resize_memory</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No wrapper</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:517'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:518;height:17.45pt'>
- <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Rcreate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::reference(void* ref, const char* name, const
- DataSpace&amp; dataspace, H5R_type_t ref_type)</p>
- </td>
- <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
- border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:519;height:17.45pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::reference(void* ref, const H5std_string&amp; name,
- const DataSpace&amp; dataspace, H5R_type_t ref_type)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:520;height:17.45pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::reference(void* ref, const char* name, H5R_type_t
- ref_type)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:521;height:17.45pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void H5Location::reference(void* ref, const H5std_string&amp; name,
- H5R_type_t ref_type)</p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:522'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Rdereference2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSet::DataSet(const H5Location&amp; loc, const void* ref,
- H5R_type_t ref_type)</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:523'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Rget_region</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:524'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Rget_obj_type2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:525'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Rget_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:526'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:527'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Rget_obj_type1<o:p></o:p></span></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>Should be remove from code</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:528'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:529'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Screate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSpace::DataSpace(H5S_class_t type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:530'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Screate_simple</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataSpace::DataSpace(int rank, const hsize_t * dims, const hsize_t *
- maxdims)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'>x</p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:531'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sset_extent_simple</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::setExtentSimple(int rank, const hsize_t
- *current_size, const hsize_t *maximum_size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:532'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Scopy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::copy(const DataSpace&amp; like_space)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:533'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:534'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sencode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:535'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sdecode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:536'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_simple_extent_npoints</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hssize_t DataSpace::getSimpleExtentNpoints</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:537'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_simple_extent_ndims</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DataSpace::getSimpleExtentNdims ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:538'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_simple_extent_dims</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int DataSpace::getSimpleExtentDims (hsize_t *dims, hsize_t *maxdims)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:539'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sis_simple</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataSpace::isSimple ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:540'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_npoints</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hssize_t DataSpace::getSelectNpoints ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:541'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sselect_hyperslab</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t
- *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:542'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sselect_elements</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::selectElements (H5S_seloper_t op, const size_t
- num_elements, const hsize_t *coord)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:543'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_simple_extent_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5S_class_t DataSpace::getSimpleExtentType ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:544'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sset_extent_none</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::setExtentNone ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:545'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sextent_copy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::extentCopy (const DataSpace&amp; dest_space)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:546'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sextent_equal</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:547'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sselect_all</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::selectAll ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:548'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sselect_none</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::selectNone ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:549'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Soffset_simple</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::offsetSimple (const hssize_t* offset)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:550'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sselect_valid</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataSpace::selectValid ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:551'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sis_regular_hyperslab</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:552'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_regular_hyperslab</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:553'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_hyper_nblocks</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hssize_t DataSpace::getSelectHyperNblocks ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:554'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_elem_npoints</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>hssize_t DataSpace::getSelectElemNpoints ()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:555'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_hyper_blocklist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t
- numblocks, hsize_t *buf)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:556'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_elem_pointlist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t
- numpoints, hsize_t *buf)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:557'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_bounds</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:558'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Sget_select_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:559'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
- 242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
- background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:560'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcreate</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType::DataType(const H5T_class_t type_class, size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:561'>
- <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcopy</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType::DataType(const PredType&amp; pred_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:562'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::copy(const DataType&amp; like_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:563'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::copy(const DataSet&amp; dset)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:564'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tclose</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::close()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:565;height:10.0pt'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType destructor</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:566'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tequal</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataType::operator==(const DataType&amp; compared_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:567'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tlock</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::lock()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:568'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcommit2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::commit(const H5Location&amp; loc, const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:569'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::commit(const H5Location&amp; loc, const
- H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:570'>
- <td width=263 rowspan=16 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Topen2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType CommonFG::openDataType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:571'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType CommonFG::openDataType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:572'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType CommonFG::openArrayType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:573'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType CommonFG::openArrayType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:574'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>CompType CommonFG::openCompType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:575'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>CompType CommonFG::openCompType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:576'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType CommonFG::openEnumType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:577'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType CommonFG::openEnumType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:578'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>IntType CommonFG::openIntType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:579'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>IntType CommonFG::openIntType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:580'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FloatType CommonFG::openFloatType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:581'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FloatType CommonFG::openFloatType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:582'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>StrType CommonFG::openStrType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:583'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>StrType CommonFG::openStrType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:584'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType CommonFG::openVarLenType(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:585'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType CommonFG::openVarLenType(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:586'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcommit_anon</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:587'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_create_plist</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>PropList DataType::getCreatePlist()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:588'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcommitted</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataType::committed()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:589'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tencode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::encode()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:590'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tdecode</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* DataType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* ArrayType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* CompType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* DataType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* EnumType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* FloatType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* IntType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* StrType::decode() const;</p>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>virtual DataType* VarLenType::decode() const;</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:591'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tinsert</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CompType::insertMember(const H5std_string&amp; name, size_t
- offset, const DataType&amp; new_member)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:592'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tpack</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CompType::pack()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:593'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tenum_create</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType::EnumType(const IntType&amp; data_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:594'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tenum_insert</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void EnumType::insert(const char* name, void *value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:595'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tenum_nameof</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string EnumType::nameOf(void *value, size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:596'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tenum_valueof</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void EnumType::valueOf(const char* name, void *value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:597'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tvlen_create</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType::VarLenType(const DataType* base_type)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:598'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tarray_create2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType::ArrayType(const DataType&amp; base_type, int ndims, const
- hsize_t* dims)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:599'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_array_ndims</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int ArrayType::getArrayNDims()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:600'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_array_dims2</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int ArrayType::getArrayDims(hsize_t* dims)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:601'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_tag</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::setTag(const char* tag)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:602'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::setTag(const H5std_string&amp; tag)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:603'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_tag</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string DataType::getTag()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:604'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_super</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType DataType::getSuper()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:605'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_class_t DataType::getClass()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:606'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tdetect_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataType::detectClass(H5T_class_t cls)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:607'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t DataType::getSize()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:608'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_order_t AtomType::getOrder()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:609'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_precision</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t AtomType::getPrecision()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:610'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int AtomType::getOffset()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:611'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_pad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::getPad(H5T_pad_t&amp; lsb, H5T_pad_t&amp; msb)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:612'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_sign</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_sign_t IntType::getSign()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:613'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_fields</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FloatType::getFields(size_t&amp; spos, size_t&amp; epos,
- size_t&amp; esize, size_t&amp; mpos, size_t&amp; msize)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:614'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_ebias</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t FloatType::getEbias()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:615'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_norm</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_norm_t FloatType::getNorm(H5std_string&amp; norm_string)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:616'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_inpad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_pad_t FloatType::getInpad(H5std_string&amp; pad_string)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:617'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_strpad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_str_t StrType::getStrpad()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:618'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_nmembers</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int CompType::getNmembers()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:619'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int EnumType::getNmembers()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:620'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_name</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5std_string CompType::getMemberName(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:621'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_index</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int CompType::getMemberIndex(const char* name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:622'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>int CompType::getMemberIndex(const H5std_string&amp; name)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:623'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>size_t CompType::getMemberOffset(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:624'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_class</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_class_t CompType::getMemberClass(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:625'>
- <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>DataType CompType::getMemberDataType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:626'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>ArrayType CompType::getMemberArrayType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:627'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>CompType CompType::getMemberCompType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:628'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>EnumType CompType::getMemberEnumType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:629'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>IntType CompType::getMemberIntType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:630'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>FloatType CompType::getMemberFloatType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:631'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>StrType CompType::getMemberStrType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:632'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>VarLenType CompType::getMemberVarLenType(unsigned member_num)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:633'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_member_value</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void EnumType::getMemberValue(unsigned memb_no, void *value)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:634'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_cset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_cset_t StrType::getCset()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:635'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tis_variable_str</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>bool DataType::isVariableStr()</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:636'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tget_native_type</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:637'>
- <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
- border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_size</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::setSize(size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:638'>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void CompType::setSize(size_t size)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:639'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_order</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::setOrder(H5T_order_t order)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:640'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_precision</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::setPrecision(size_t precision)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:641'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_offset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::setOffset(size_t offset)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:642'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_pad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:643'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_sign</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void IntType::setSign(H5T_sign_t sign)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:644'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_fields</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FloatType::setFields(size_t spos, size_t epos, size_t esize,
- size_t mpos, size_t msize)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:645'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_ebias</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FloatType::setEbias(size_t ebias)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:646'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_norm</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FloatType::setNorm(H5T_norm_t norm)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:647'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_inpad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void FloatType::setInpad(H5T_pad_t inpad)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:648'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_cset</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void StrType::setCset(H5T_cset_t cset)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:649'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tset_strpad</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void StrType::setStrpad(H5T_str_t strpad)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:650'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::registerFunc(H5T_pers_t pers, const char* name, const
- DataType&amp; dest, H5T_conv_t func)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:651'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tunregister</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::unregister(H5T_pers_t pers, const char* name, const
- DataType&amp; dest, H5T_conv_t func)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:652'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tfind</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5T_conv_t DataType::find(const DataType&amp; dest, H5T_cdata_t
- **pcdata)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:653'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tcompiler_conv</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>No</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:654'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5Tconvert</p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>void DataType::convert(const DataType&amp; dest, size_t nelmts, void
- *buf, void *background, const PropList&amp; plist)</p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
- <tr style='mso-yfti-irow:655;mso-yfti-lastrow:yes'>
- <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
- none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
- padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
- text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
- </td>
- <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
- none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
- mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
- mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
- <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'><o:p>&nbsp;</o:p></p>
- </td>
- </tr>
-</table>
-
-<p class=MsoNormal><o:p>&nbsp;</o:p></p>
-
-<p class=MsoNormal><o:p>&nbsp;</o:p></p>
-
-</div>
-
-</body>
-
-</html>
+<html xmlns:v="urn:schemas-microsoft-com:vml"
+xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 15">
+<meta name=Originator content="Microsoft Word 15">
+<link rel=File-List href="C2Cppfunction_map_files/filelist.xml">
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Author>bmribler</o:Author>
+ <o:Template>Normal</o:Template>
+ <o:LastAuthor>bmribler</o:LastAuthor>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>1347</o:TotalTime>
+ <o:Created>2018-05-21T15:01:00Z</o:Created>
+ <o:LastSaved>2018-05-21T15:01:00Z</o:LastSaved>
+ <o:Pages>1</o:Pages>
+ <o:Words>6393</o:Words>
+ <o:Characters>36443</o:Characters>
+ <o:Company>Microsoft</o:Company>
+ <o:Lines>303</o:Lines>
+ <o:Paragraphs>85</o:Paragraphs>
+ <o:CharactersWithSpaces>42751</o:CharactersWithSpaces>
+ <o:Version>15.00</o:Version>
+ </o:DocumentProperties>
+ <o:OfficeDocumentSettings>
+ <o:RelyOnVML/>
+ <o:AllowPNG/>
+ </o:OfficeDocumentSettings>
+</xml><![endif]-->
+<link rel=themeData href="C2Cppfunction_map_files/themedata.thmx">
+<link rel=colorSchemeMapping
+href="C2Cppfunction_map_files/colorschememapping.xml">
+<!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:HideSpellingErrors/>
+ <w:GrammarState>Clean</w:GrammarState>
+ <w:TrackMoves>false</w:TrackMoves>
+ <w:TrackFormatting/>
+ <w:PunctuationKerning/>
+ <w:ValidateAgainstSchemas/>
+ <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
+ <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
+ <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
+ <w:DoNotPromoteQF/>
+ <w:LidThemeOther>EN-US</w:LidThemeOther>
+ <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
+ <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
+ <w:Compatibility>
+ <w:BreakWrappedTables/>
+ <w:SnapToGridInCell/>
+ <w:WrapTextWithPunct/>
+ <w:UseAsianBreakRules/>
+ <w:DontGrowAutofit/>
+ <w:SplitPgBreakAndParaMark/>
+ <w:EnableOpenTypeKerning/>
+ <w:DontFlipMirrorIndents/>
+ <w:OverrideTableStyleHps/>
+ </w:Compatibility>
+ <m:mathPr>
+ <m:mathFont m:val="Cambria Math"/>
+ <m:brkBin m:val="before"/>
+ <m:brkBinSub m:val="&#45;-"/>
+ <m:smallFrac m:val="off"/>
+ <m:dispDef/>
+ <m:lMargin m:val="0"/>
+ <m:rMargin m:val="0"/>
+ <m:defJc m:val="centerGroup"/>
+ <m:wrapIndent m:val="1440"/>
+ <m:intLim m:val="subSup"/>
+ <m:naryLim m:val="undOvr"/>
+ </m:mathPr></w:WordDocument>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
+ DefSemiHidden="false" DefQFormat="false" DefPriority="99"
+ LatentStyleCount="371">
+ <w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 6"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 7"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 8"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 9"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 1"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 2"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 3"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 4"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 5"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 6"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 7"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 8"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 9"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Normal Indent"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="footnote text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="annotation text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="header"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="footer"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index heading"/>
+ <w:LsdException Locked="false" Priority="35" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="caption"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="table of figures"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="envelope address"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="envelope return"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="footnote reference"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="annotation reference"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="line number"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="page number"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="endnote reference"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="endnote text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="table of authorities"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="macro"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="toa heading"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Bullet"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Number"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Bullet 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Bullet 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Bullet 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Bullet 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Number 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Number 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Number 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Number 5"/>
+ <w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Closing"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Signature"/>
+ <w:LsdException Locked="false" Priority="1" SemiHidden="true"
+ UnhideWhenUsed="true" Name="Default Paragraph Font"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text Indent"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Continue"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Continue 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Continue 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Continue 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="List Continue 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Message Header"/>
+ <w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Salutation"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Date"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text First Indent"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text First Indent 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Note Heading"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text Indent 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Body Text Indent 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Block Text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Hyperlink"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="FollowedHyperlink"/>
+ <w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
+ <w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Document Map"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Plain Text"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="E-mail Signature"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Top of Form"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Bottom of Form"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Normal (Web)"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Acronym"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Address"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Cite"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Code"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Definition"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Keyboard"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Preformatted"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Sample"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Typewriter"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="HTML Variable"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Normal Table"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="annotation subject"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="No List"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Outline List 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Outline List 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Outline List 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Simple 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Simple 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Simple 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Classic 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Classic 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Classic 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Classic 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Colorful 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Colorful 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Colorful 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Columns 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Columns 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Columns 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Columns 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Columns 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 6"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 7"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Grid 8"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 4"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 5"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 6"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 7"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table List 8"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table 3D effects 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table 3D effects 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table 3D effects 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Contemporary"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Elegant"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Professional"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Subtle 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Subtle 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Web 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Web 2"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Web 3"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Balloon Text"/>
+ <w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="Table Theme"/>
+ <w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
+ <w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
+ <w:LsdException Locked="false" Priority="34" QFormat="true"
+ Name="List Paragraph"/>
+ <w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
+ <w:LsdException Locked="false" Priority="30" QFormat="true"
+ Name="Intense Quote"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="19" QFormat="true"
+ Name="Subtle Emphasis"/>
+ <w:LsdException Locked="false" Priority="21" QFormat="true"
+ Name="Intense Emphasis"/>
+ <w:LsdException Locked="false" Priority="31" QFormat="true"
+ Name="Subtle Reference"/>
+ <w:LsdException Locked="false" Priority="32" QFormat="true"
+ Name="Intense Reference"/>
+ <w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
+ <w:LsdException Locked="false" Priority="37" SemiHidden="true"
+ UnhideWhenUsed="true" Name="Bibliography"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
+ <w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
+ <w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
+ <w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
+ <w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
+ <w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
+ <w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
+ <w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
+ <w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
+ <w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 1"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 1"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 1"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 2"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 2"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 2"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 3"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 3"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 3"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 4"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 4"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 4"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 5"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 5"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 5"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 6"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 6"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 6"/>
+ <w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
+ <w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
+ <w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 1"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 1"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 1"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 2"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 2"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 2"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 3"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 3"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 3"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 4"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 4"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 4"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 5"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 5"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 5"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="List Table 1 Light Accent 6"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="List Table 6 Colorful Accent 6"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="List Table 7 Colorful Accent 6"/>
+ </w:LatentStyles>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+ @font-face
+ {font-family:Helvetica;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Courier;
+ panose-1:2 7 4 9 2 2 5 2 4 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Tms Rmn";
+ panose-1:2 2 6 3 4 5 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Helv;
+ panose-1:2 11 6 4 2 2 2 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"New York";
+ panose-1:2 4 5 3 6 5 6 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:System;
+ panose-1:0 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Wingdings;
+ panose-1:5 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:2;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"MS Mincho";
+ panose-1:2 2 6 9 4 2 5 8 3 4;
+ mso-font-alt:"\FF2D\FF33 \660E\671D";
+ mso-font-charset:128;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 134676480 16 0 131072 0;}
+@font-face
+ {font-family:Batang;
+ panose-1:2 3 6 0 0 1 1 1 1 1;
+ mso-font-alt:\BC14\D0D5;
+ mso-font-charset:129;
+ mso-generic-font-family:auto;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 151388160 16 0 524288 0;}
+@font-face
+ {font-family:SimSun;
+ panose-1:2 1 6 0 3 1 1 1 1 1;
+ mso-font-alt:\5B8B\4F53;
+ mso-font-charset:134;
+ mso-generic-font-family:auto;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:1 135135232 16 0 262144 0;}
+@font-face
+ {font-family:PMingLiU;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-alt:\65B0\7D30\660E\9AD4;
+ mso-font-charset:136;
+ mso-generic-font-family:auto;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:1 134742016 16 0 1048576 0;}
+@font-face
+ {font-family:"MS Gothic";
+ panose-1:2 11 6 9 7 2 5 8 2 4;
+ mso-font-alt:"\FF2D\FF33 \30B4\30B7\30C3\30AF";
+ mso-font-charset:128;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 134676480 16 0 131072 0;}
+@font-face
+ {font-family:Dotum;
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-alt:\B3CB\C6C0;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 151388160 16 0 524288 0;}
+@font-face
+ {font-family:SimHei;
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-alt:\9ED1\4F53;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 135135232 16 0 262144 0;}
+@font-face
+ {font-family:MingLiU;
+ panose-1:2 2 5 9 0 0 0 0 0 0;
+ mso-font-alt:\7D30\660E\9AD4;
+ mso-font-charset:136;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 134742016 16 0 1048576 0;}
+@font-face
+ {font-family:Mincho;
+ panose-1:2 2 6 9 4 3 5 8 3 5;
+ mso-font-alt:\660E\671D;
+ mso-font-charset:128;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 134676480 16 0 131072 0;}
+@font-face
+ {font-family:Gulim;
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-alt:\AD74\B9BC;
+ mso-font-charset:129;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 151388160 16 0 524288 0;}
+@font-face
+ {font-family:Century;
+ panose-1:2 4 6 4 5 5 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Angsana New";
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:222;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:16777217 0 0 0 65536 0;}
+@font-face
+ {font-family:"Cordia New";
+ panose-1:2 11 3 4 2 2 2 2 2 4;
+ mso-font-charset:222;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:16777217 0 0 0 65536 0;}
+@font-face
+ {font-family:Mangal;
+ panose-1:2 4 5 3 5 2 3 3 2 2;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:8192 0 0 0 0 0;}
+@font-face
+ {font-family:Latha;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:262144 0 0 0 0 0;}
+@font-face
+ {font-family:Sylfaen;
+ panose-1:1 10 5 2 5 3 6 3 3 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:12583555 0 0 0 13 0;}
+@font-face
+ {font-family:Vrinda;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Raavi;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Shruti;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Sendnya;
+ panose-1:0 0 4 0 0 0 0 0 0 0;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Gautami;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Tunga;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:"Estrangelo Edessa";
+ panose-1:3 8 6 0 0 0 0 0 0 0;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:"Cambria Math";
+ panose-1:2 4 5 3 5 4 6 3 2 4;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:"Arial Unicode MS";
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Calibri Light";
+ panose-1:2 15 3 2 2 2 4 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536859905 -1073732485 9 0 511 0;}
+@font-face
+ {font-family:Calibri;
+ panose-1:2 15 5 2 2 2 4 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536859905 -1073732485 9 0 511 0;}
+@font-face
+ {font-family:"Segoe UI";
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+ /* Style Definitions */
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-parent:"";
+ margin-top:0in;
+ margin-right:0in;
+ margin-bottom:8.0pt;
+ margin-left:0in;
+ line-height:107%;
+ mso-pagination:widow-orphan;
+ font-size:11.0pt;
+ font-family:"Calibri",sans-serif;
+ mso-ascii-font-family:Calibri;
+ mso-ascii-theme-font:minor-latin;
+ mso-fareast-font-family:Calibri;
+ mso-fareast-theme-font:minor-latin;
+ mso-hansi-font-family:Calibri;
+ mso-hansi-theme-font:minor-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:minor-bidi;}
+h2
+ {mso-style-priority:9;
+ mso-style-qformat:yes;
+ mso-style-link:"Heading 2 Char";
+ mso-style-next:Normal;
+ margin-top:2.0pt;
+ margin-right:0in;
+ margin-bottom:0in;
+ margin-left:0in;
+ margin-bottom:.0001pt;
+ line-height:107%;
+ mso-pagination:widow-orphan lines-together;
+ page-break-after:avoid;
+ mso-outline-level:2;
+ font-size:13.0pt;
+ font-family:"Calibri Light",sans-serif;
+ mso-ascii-font-family:"Calibri Light";
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:"Calibri Light";
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#2E74B5;
+ mso-themecolor:accent1;
+ mso-themeshade:191;
+ font-weight:normal;}
+a:link, span.MsoHyperlink
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ color:blue;
+ text-decoration:underline;
+ text-underline:single;}
+a:visited, span.MsoHyperlinkFollowed
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ color:#954F72;
+ mso-themecolor:followedhyperlink;
+ text-decoration:underline;
+ text-underline:single;}
+span.Heading2Char
+ {mso-style-name:"Heading 2 Char";
+ mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"Heading 2";
+ mso-ansi-font-size:13.0pt;
+ mso-bidi-font-size:13.0pt;
+ font-family:"Calibri Light",sans-serif;
+ mso-ascii-font-family:"Calibri Light";
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:"Calibri Light";
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#2E74B5;
+ mso-themecolor:accent1;
+ mso-themeshade:191;}
+span.msoIns
+ {mso-style-type:export-only;
+ mso-style-name:"";
+ text-decoration:underline;
+ text-underline:single;
+ color:teal;}
+span.msoDel
+ {mso-style-type:export-only;
+ mso-style-name:"";
+ text-decoration:line-through;
+ color:red;}
+.MsoChpDefault
+ {mso-style-type:export-only;
+ mso-default-props:yes;
+ font-family:"Calibri",sans-serif;
+ mso-ascii-font-family:Calibri;
+ mso-ascii-theme-font:minor-latin;
+ mso-fareast-font-family:Calibri;
+ mso-fareast-theme-font:minor-latin;
+ mso-hansi-font-family:Calibri;
+ mso-hansi-theme-font:minor-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:minor-bidi;}
+.MsoPapDefault
+ {mso-style-type:export-only;
+ margin-bottom:8.0pt;
+ line-height:107%;}
+@page WordSection1
+ {size:11.0in 8.5in;
+ mso-page-orientation:landscape;
+ margin:1.0in 1.0in 1.0in 1.0in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.WordSection1
+ {page:WordSection1;}
+ /* List Definitions */
+ @list l0
+ {mso-list-id:364453017;
+ mso-list-template-ids:-1899575734;}
+@list l0:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l0:level2
+ {mso-level-number-format:bullet;
+ mso-level-text:o;
+ mso-level-tab-stop:1.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:"Courier New";
+ mso-bidi-font-family:"Times New Roman";}
+@list l0:level3
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:1.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level4
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level5
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level6
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level7
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level8
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l0:level9
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1
+ {mso-list-id:1808625326;
+ mso-list-template-ids:-1664603998;}
+@list l1:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l1:level2
+ {mso-level-number-format:bullet;
+ mso-level-text:o;
+ mso-level-tab-stop:1.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:"Courier New";
+ mso-bidi-font-family:"Times New Roman";}
+@list l1:level3
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:1.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level4
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level5
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level6
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level7
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level8
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l1:level9
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2
+ {mso-list-id:2000766018;
+ mso-list-template-ids:-780390354;}
+@list l2:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l2:level2
+ {mso-level-number-format:bullet;
+ mso-level-text:o;
+ mso-level-tab-stop:1.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:"Courier New";
+ mso-bidi-font-family:"Times New Roman";}
+@list l2:level3
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:1.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level4
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level5
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:2.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level6
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level7
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:3.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level8
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.0in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+@list l2:level9
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0A7;
+ mso-level-tab-stop:4.5in;
+ mso-level-number-position:left;
+ text-indent:-.25in;
+ mso-ansi-font-size:10.0pt;
+ font-family:Wingdings;}
+ol
+ {margin-bottom:0in;}
+ul
+ {margin-bottom:0in;}
+-->
+</style>
+<!--[if gte mso 10]>
+<style>
+ /* Style Definitions */
+ table.MsoNormalTable
+ {mso-style-name:"Table Normal";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-parent:"";
+ mso-padding-alt:0in 5.4pt 0in 5.4pt;
+ mso-para-margin-top:0in;
+ mso-para-margin-right:0in;
+ mso-para-margin-bottom:8.0pt;
+ mso-para-margin-left:0in;
+ line-height:107%;
+ mso-pagination:widow-orphan;
+ font-size:11.0pt;
+ font-family:"Calibri",sans-serif;
+ mso-ascii-font-family:Calibri;
+ mso-ascii-theme-font:minor-latin;
+ mso-hansi-font-family:Calibri;
+ mso-hansi-theme-font:minor-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:minor-bidi;}
+table.MsoTableGrid
+ {mso-style-name:"Table Grid";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-priority:39;
+ mso-style-unhide:no;
+ border:solid windowtext 1.0pt;
+ mso-border-alt:solid windowtext .5pt;
+ mso-padding-alt:0in 5.4pt 0in 5.4pt;
+ mso-border-insideh:.5pt solid windowtext;
+ mso-border-insidev:.5pt solid windowtext;
+ mso-para-margin:0in;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:11.0pt;
+ font-family:"Calibri",sans-serif;
+ mso-ascii-font-family:Calibri;
+ mso-ascii-theme-font:minor-latin;
+ mso-hansi-font-family:Calibri;
+ mso-hansi-theme-font:minor-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:minor-bidi;}
+</style>
+<![endif]--><!--[if gte mso 9]><xml>
+ <o:shapedefaults v:ext="edit" spidmax="1026"/>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <o:shapelayout v:ext="edit">
+ <o:idmap v:ext="edit" data="1"/>
+ </o:shapelayout></xml><![endif]-->
+</head>
+
+<body lang=EN-US link=blue vlink="#954F72" style='tab-interval:.5in'>
+
+<div class=WordSection1>
+
+<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
+normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
+107%;font-family:"Times New Roman",serif'>C++ API Wrappers of HDF5 C Functions<o:p></o:p></span></b></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=0
+ style='width:736.55pt;margin-left:5.65pt;border-collapse:collapse;border:none;
+ mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:1184;mso-padding-alt:
+ 0in 5.4pt 0in 5.4pt'>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><b style='mso-bidi-font-weight:normal'>C Function<o:p></o:p></b></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>C++
+ Wrapper<o:p></o:p></b></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>1.8<o:p></o:p></b></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>1.10<o:p></o:p></b></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border:solid windowtext 1.0pt;
+ border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
+ solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><b style='mso-bidi-font-weight:normal'>Comment<o:p></o:p></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Acreate2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Location::createAttribute( const char* name, const
+ DataType&amp; data_type, const DataSpace&amp; data_space, const PropList&amp;
+ create_plist = PropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Location::createAttribute( const H5std_string&amp; name,
+ const DataType&amp; data_type, const DataSpace&amp; data_space, const
+ PropList&amp; create_plist = PropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Object::createAttribute( const char* name, const
+ DataType&amp; data_type, const DataSpace&amp; data_space, const PropList&amp;
+ create_plist = PropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Revised model</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Object::createAttribute( const H5std_string&amp; name,
+ const DataType&amp; data_type, const DataSpace&amp; data_space, const
+ PropList&amp; create_plist = PropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Revised model</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Acreate_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aopen</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Location::openAttribute( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Location::openAttribute( const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Object::openAttribute( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Object::openAttribute( const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aopen_by_idx</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aopen_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Location::openAttribute( const unsigned int idx )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute H5Object::openAttribute( const unsigned int idx )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aopen_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Awrite</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::write( const DataType&amp; mem_type, const void *buf
+ )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::write(const DataType&amp; mem_type, const
+ H5std_string&amp; strg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aread</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::read( const DataType&amp; mem_type, void *buf )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::read(const DataType&amp; mem_type, H5std_string&amp;
+ strg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Attribute::~Attribute()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:19'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_space</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSpace Attribute::getSpace()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:20'>
+ <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType AbstractDs::getDataType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:21'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType AbstractDs::getArrayType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:22'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>CompType AbstractDs::getCompType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:23'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType AbstractDs::getEnumType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:24'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>IntType AbstractDs::getIntType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:25'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FloatType AbstractDs::getFloatType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:26'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>StrType AbstractDs::getStrType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:27'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType AbstractDs::getVarLenType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:28'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_create_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:29'>
+ <td width=263 rowspan=5 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t Attribute::getName(char* attr_name, size_t buf_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:30'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string Attribute::getName()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:31'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string Attribute::getName(size_t len) const</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:32'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t Attribute::getName(H5std_string&amp; attr_name, size_t len)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:33'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t Attribute::getName( size_t len, H5std_string&amp; attr_name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:34'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_name_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:35'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_storage_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t Attribute::getStorageSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:36'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:37'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_info_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:38'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aget_info_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:39'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Arename</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::renameAttr(const char* oldname, const char* newname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:40'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Object::renameAttr(const char* oldname, const char* newname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:41'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Arename_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:42'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aiterate2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int H5Location::iterateAttrs( attr_operator_t user_op, unsigned
+ *_idx, void *op_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:43'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx,
+ void *op_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:44'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aiterate_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:45'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Adelete</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::removeAttr( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:46'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Object::removeAttr( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:47'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Adelete_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:48'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Adelete_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:49'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aexists</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool H5Location::attrExists(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated in 1.8.19</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:50'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool H5Object::attrExists(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:51'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Aexists_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:52'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:53'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dcreate2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet CommonFG::createDataSet( const char* name, const
+ DataType&amp; data_type, const DataSpace&amp; data_space, const
+ DSetCreatPropList&amp; create_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:54'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet CommonFG::createDataSet( const H5std_string&amp; name, const
+ DataType&amp; data_type, const DataSpace&amp; data_space, const
+ DSetCreatPropList&amp; create_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:55'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet H5Location::createDataSet( const char* name, const
+ DataType&amp; data_type, const DataSpace&amp; data_space, const
+ DSetCreatPropList&amp; create_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:56'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet H5Location::createDataSet( const H5std_string&amp; name,
+ const DataType&amp; data_type, const DataSpace&amp; data_space, const
+ DSetCreatPropList&amp; create_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:57'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dcreate_anon</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:58'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dopen2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet CommonFG::openDataSet( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:59'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet CommonFG::openDataSet( const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:60'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet H5Location::openDataSet( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:61'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet H5Location::openDataSet( const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:62'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:63'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet destructor</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:64'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_space</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSpace DataSet::getSpace()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:65'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_space_status</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::getSpaceStatus(H5D_space_status_t&amp; status)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:66'>
+ <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType AbstractDs::getDataType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:67'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType AbstractDs::getArrayType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:68'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>CompType AbstractDs::getCompType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:69'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType AbstractDs::getEnumType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:70'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>IntType AbstractDs::getIntType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:71'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FloatType AbstractDs::getFloatType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:72'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>StrType AbstractDs::getStrType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:73'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType AbstractDs::getVarLenType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:74'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_create_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DSetCreatPropList DataSet::getCreatePlist()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:75'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_access_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:76'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_storage_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t DataSet::getStorageSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:77'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dget_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>haddr_t DataSet::getOffset()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:78'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dread</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::read( void* buf, const DataType&amp; mem_type, const
+ DataSpace&amp; mem_space, const DataSpace&amp; file_space, const
+ DSetMemXferPropList&amp; xfer_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:79'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::read(H5std_string&amp; strg, const DataType&amp;
+ mem_type, const DataSpace&amp; mem_space, const DataSpace&amp; file_space,
+ const DSetMemXferPropList&amp; xfer_plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:80'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dwrite</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::write( const void* buf, const DataType&amp; mem_type,
+ const DataSpace&amp; mem_space, const DataSpace&amp; file_space, const
+ DSetMemXferPropList&amp; xfer_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:81'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::write( const H5std_string&amp; strg, const
+ DataType&amp; mem_type, const DataSpace&amp; mem_space, const DataSpace&amp;
+ file_space, const DSetMemXferPropList&amp; xfer_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:82'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Diterate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DataSet::iterateElems( void* buf, const DataType&amp; type, const
+ DataSpace&amp; space, H5D_operator_t op, void* op_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:83'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dvlen_reclaim</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::vlenReclaim(const DataType&amp; type, const
+ DataSpace&amp; space, const DSetMemXferPropList&amp; xfer_plist, void* buf )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Remove this one</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:84'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::vlenReclaim(void* buf, const DataType&amp; type, const
+ DataSpace&amp; space, const DSetMemXferPropList&amp; xfer_plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Better prototype</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:85'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dvlen_get_buf_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t DataSet::getVlenBufSize(const DataType&amp; type, const
+ DataSpace&amp; space)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:86'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dfill</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::fillMemBuf(const void *fill, const DataType&amp;
+ fill_type, void *buf, const DataType&amp; buf_type, const DataSpace&amp;
+ space)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:87'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::fillMemBuf(void *buf, const DataType&amp; buf_type,
+ const DataSpace&amp; space</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:88'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dset_extent</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSet::extend( const hsize_t* size )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:89'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dscatter</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:90'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Dgather</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:91'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ddebug</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:92'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:93'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eregister_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:94'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eunregister_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:95'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eclose_msg</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:96'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ecreate_msg</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:97'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ecreate_stack</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:98'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eget_current_stack</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:99'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eclose_stack</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:100'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eget_class_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:101'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eset_current_stack</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:102'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Epush2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:103'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Epop</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:104'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eprint2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Exception::printErrorStack(FILE* stream, hid_t err_stack)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:105'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ewalk2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Exception::walkErrorStack( H5E_direction_t direction,
+ H5E_walk2_t func, void* client_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:106'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eget_auto2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Exception::getAutoPrint( H5E_auto2_t&amp; func, void**
+ client_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:107'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eset_auto2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Exception::setAutoPrint( H5E_auto2_t&amp; func, void*
+ client_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:108'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eclear2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Exception::clearErrorStack()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:109'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eauto_is_v2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:110'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eget_msg</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string Exception::getMajorString( hid_t err_major )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:111'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string Exception::getMinorString( hid_t err_minor )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:112'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Eget_num</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:113'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'><o:p>&nbsp;</o:p></span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:114'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_core</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setCore (size_t increment, hbool_t
+ backing_store)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:115'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fapl_core</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::getCore (size_t&amp; increment, hbool_t&amp;
+ backing_store)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:116'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_direct</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:117'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fapl_direct</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:118'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_family_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:119'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_family</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList&amp;
+ memb_plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:120'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fapl_family</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::getFamily(hsize_t&amp; memb_size,
+ FileAccPropList&amp; memb_plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:121'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_log</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setLog(const char *logfile, unsigned flags,
+ size_t buf_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:122'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_multi_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:123'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_multi</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:124'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fapl_multi</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:125'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_split</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSplit(const FileAccPropList&amp; meta_plist,
+ const FileAccPropList&amp; raw_plist, const char* meta_ext, const char*
+ raw_ext )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:126'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSplit(FileAccPropList&amp; meta_plist,
+ FileAccPropList&amp; raw_plist, const char* meta_ext, const char* raw_ext )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:127'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSplit(const FileAccPropList&amp; meta_plist,
+ const FileAccPropList&amp; raw_plist, const H5std_string&amp; meta_ext, const
+ H5std_string&amp; raw_ext )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:128'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSplit(FileAccPropList&amp; meta_plist,
+ FileAccPropList&amp; raw_plist, const H5std_string&amp; meta_ext, const
+ H5std_string&amp; raw_ext )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:129'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_log_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:130'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_core_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:131'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_direct_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:132'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:133'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:134'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDunregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:135'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDopen</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:136'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:137'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDcmp</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:138'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDquery</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:139'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDalloc</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:140'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDfree</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:141'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDget_eoa</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:142'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDset_eoa</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:143'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDget_eof</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:144'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDget_vfd_handle</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:145'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDread</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:146'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDwrite</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:147'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDflush</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:148'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FDtruncate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:149'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_sec2_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:150'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_sec2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSec2()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:151'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_stdio_init</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:152'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_stdio</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setStdio()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:153'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fapl_windows</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:154'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fis_hdf5</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool H5File::isHdf5(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:155'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fcreate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5File::H5File( const char* name, unsigned int flags, const
+ FileCreatPropList&amp; create_plist, const FileAccPropList&amp; access_plist
+ )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:156'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5File::H5File( const H5std_string&amp; name, unsigned int flags,
+ const FileCreatPropList&amp; create_plist, const FileAccPropList&amp;
+ access_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:157'>
+ <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fopen</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5File::H5File( const char* name, unsigned int flags, const
+ FileCreatPropList&amp; create_plist, const FileAccPropList&amp; access_plist
+ )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:158'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5File::H5File( const H5std_string&amp; name, unsigned int flags,
+ const FileCreatPropList&amp; create_plist, const FileAccPropList&amp;
+ access_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:159'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::openFile(const char* name, unsigned int flags, const
+ FileAccPropList&amp; access_plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:160'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Freopen</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::reOpen()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:161'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fflush</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::flush(H5F_scope_t scope)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:162'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Attribute::flush(H5F_scope_t scope)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:163'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:164'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5File destructor</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:165'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_create_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FileCreatPropList H5File::getCreatePlist()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:166'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_access_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FileAccPropList H5File::getAccessPlist()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:167'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_intent</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:168'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_obj_count</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5File::getObjCount(unsigned types)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:169'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5File::getObjCount()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:170'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_obj_ids</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t
+ *oid_list)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:171'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_vfd_handle</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::getVFDHandle(const FileAccPropList&amp; fapl, void
+ **file_handle)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:172'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5File::getVFDHandle(void **file_handle)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:173'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fmount</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::mount(const char* name, const H5File&amp; child, const
+ PropList&amp; plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:174'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::mount(const char* name, H5File&amp; child,
+ PropList&amp; plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:175'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::mount(const H5std_string&amp; name, const H5File&amp;
+ child, const PropList&amp; plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:176'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::mount(const H5std_string&amp; name, H5File&amp; child,
+ PropList&amp; plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:177'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Funmount</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::unmount( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:178'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::unmount( const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:179'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_freespace</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hssize_t H5File::getFreeSpace()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:180'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_filesize</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t H5File::getFileSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:181'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_file_image</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:182'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_mdc_config</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:183'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fset_mdc_config</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:184'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_mdc_hit_rate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:185'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_mdc_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:186'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Freset_mdc_hit_rate_stats</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:187'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string H5Location::getFileName()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:188'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string Attribute::getFileName()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Will be retired</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:189'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_info2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:190'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_free_sections</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:191'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fclear_elink_file_cache</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:192'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:193'>
+ <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gcreate2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group CommonFG::createGroup( const char* name, size_t size_hint )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:194'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group CommonFG::createGroup( const H5std_string&amp; name, size_t
+ size_hint )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:195'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group H5Location::createGroup( const char* name, size_t size_hint )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:196'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group H5Location::createGroup( const H5std_string&amp; name, size_t
+ size_hint )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:197'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group createGroup(const char* name, const LinkCreatPropList&amp;
+ lcpl)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:198'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group createGroup(const H5std_string&amp; name, const
+ LinkCreatPropList&amp; lcpl)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:199'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gcreate_anon</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:200'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gopen2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group CommonFG::openGroup( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:201'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group CommonFG::openGroup( const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:202'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group H5Location::openGroup( const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:203'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group H5Location::openGroup( const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:204'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_create_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:205'>
+ <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t CommonFG::getNumObjs()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:206'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t H5Location::getNumObjs()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Moved to Group in 1.10.2</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:207'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t Group::getNumObjs()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:208'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_info_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:209'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_info_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:210'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void Group::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:211'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Group destructor</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:212'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Glink</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:213'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Glink2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:214'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gmove</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:215'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gmove2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:216'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gunlink</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:217'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_hard</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:218'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_soft</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:219'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_linkval</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:220'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gset_comment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:221'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_comment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:222'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Giterate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t
+ op , void* op_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:223'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int CommonFG::iterateElems( const H5std_string&amp; name, int *idx,
+ H5G_iterate_t op , void* op_data )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:224'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_num_objs</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>no</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:225'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Gget_objinfo<o:p></o:p></span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::getObjinfo( const char* name, hbool_t follow_link,
+ H5G_stat_t&amp; statbuf )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:226'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::getObjinfo( const H5std_string&amp; name, hbool_t
+ follow_link, H5G_stat_t&amp; statbuf )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:227'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::getObjinfo( const char* name, H5G_stat_t&amp; statbuf
+ )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:228'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::getObjinfo( const H5std_string&amp; name,
+ H5G_stat_t&amp; statbuf )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:229'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Gget_objname_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:230'>
+ <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Gget_objtype_by_idx</span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:231'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:232'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string&amp;
+ type_name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:233'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:234'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:235'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iobject_verify</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:236'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iremove_verify</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:237'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iget_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:238'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iget_file_id</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:239'>
+ <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iget_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5Object::getObjName(char *obj_name, size_t buf_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:240'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string H5Object::getObjName()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:241'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5Object::getObjName(H5std_string&amp; obj_name, size_t len)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:242'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iinc_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void IdComponent::incRefCount(const hid_t obj_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:243'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void IdComponent::incRefCount()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:244'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Idec_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void IdComponent::decRefCount(const hid_t obj_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:245'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void IdComponent::decRefCount()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:246'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iget_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int IdComponent::getCounter(const hid_t obj_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:247'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int IdComponent::getCounter()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:248'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iregister_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:249'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iclear_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:250'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Idestroy_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:251'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iinc_type_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:252'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Idec_type_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:253'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iget_type_ref</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:254'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Isearch</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:255'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Inmembers</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:256'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Itype_exists</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:257'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Iis_valid</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:258'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:259'>
+ <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lmove</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::moveLink(const char* src_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const Group&amp;
+ dst, const char* dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:260'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::moveLink(const H5std_string&amp; src_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const Group&amp;
+ dst, const H5std_string&amp; dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:261'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::moveLink(const char* src_name, const char* dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:262'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::moveLink(const H5std_string&amp; src_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ H5std_string&amp; dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>            </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:263'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::move( const char* src, const char* dst )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated due to inadequate functionality</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:264'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::move( const H5std_string&amp; src, const
+ H5std_string&amp; dst )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Same as above</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:265'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcopy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::copyLink(const char *src_name, const Group&amp; dst,
+ const char *dst_name, const LinkCreatPropList&amp; lcpl =
+ LinkCreatPropList::DEFAULT, </p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:266'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::copyLink(const H5std_string&amp; src_name, const
+ Group&amp; dst, const H5std_string&amp; dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT, </p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:267'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::copyLink(const char *src_name, const char *dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const<span style='mso-spacerun:yes'>  </span>LinkAccPropList&amp;
+ lapl = LinkAccPropList::DEFAULT) </p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:268'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::copyLink(const H5std_string&amp; src_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const H5std_string&amp; dst_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>const LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT) </p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:269'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_hard</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const char *curr_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const Group&amp;
+ new_loc, const char *new_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:270'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const H5std_string&amp; curr_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const Group&amp;
+ new_loc, const H5std_string&amp; new_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:271'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const char *curr_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const hid_t
+ same_loc, const char *new_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:272'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const H5std_string&amp; curr_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const hid_t
+ same_loc, const H5std_string&amp; new_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:273'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_soft</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const char *target_name, const char *link_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:274'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::link(const H5std_string&amp; target_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ H5std_string&amp; link_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkCreatPropList&amp; lcpl = LinkCreatPropList::DEFAULT,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:275'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_hard</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_soft</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::link( H5L_type_t link_type, const char* curr_name,
+ const char* new_name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated due to inadequate functionality</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:276'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::link( H5L_type_t link_type, const H5std_string&amp;
+ curr_name, const H5std_string&amp; new_name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Deprecated due to inadequate functionality</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:277'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ldelete</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::unlink( const char* name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Added second argument in 1.8.21</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:278'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CommonFG::unlink( const H5std_string&amp; name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Added second argument in 1.8.21</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:279'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::unlink( const char* name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Moved from CommonFG &amp; added 2<sup>nd</sup> arg in 1.10.2</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:280'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::unlink( const H5std_string&amp; name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>             </span>const LinkAccPropList&amp;
+ lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Moved from CommonFG &amp; added 2<sup>nd</sup> arg in 1.10.2</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:281'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ldelete_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:282'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lget_val</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string CommonFG::getLinkval( const char* name, size_t size )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:283'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string CommonFG::getLinkval( const H5std_string&amp; name,
+ size_t size )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:284'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string H5Location::getLinkval( const char* name, size_t size )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:285'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string H5Location::getLinkval( const H5std_string&amp; name,
+ size_t size )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:286'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lget_val_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:287'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lexists</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool H5Location::nameExists(const char* name, const
+ LinkAccPropList&amp; lapl)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:288'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool H5Location::nameExists(const H5std_string&amp; name, const
+ LinkAccPropList&amp; lapl)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:289'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lget_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5L_info_t getLinkInfo(const char* link_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-tab-count:1'>               </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:290'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5L_info_t getLinkInfo(const H5std_string&amp; link_name,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-tab-count:1'>               </span>const
+ LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:291'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lget_info_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:292'>
+ <td width=263 rowspan=6 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lget_name_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string CommonFG::getObjnameByIdx(hsize_t idx)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:293'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t
+ size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:294'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string&amp;
+ name, size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:295'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string H5Location::getObjnameByIdx(hsize_t idx)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:296'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5Location::getObjnameByIdx(hsize_t idx, char* name, size_t
+ size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:297'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t H5Location::getObjnameByIdx(hsize_t idx, H5std_string&amp;
+ name, size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:298'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Literate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:299'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Literate_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:300'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lvisit</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:301'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lvisit_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:302'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:303'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_ud</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:304'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:305'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lunregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:306'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lis_registered</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:307'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lunpack_elink_val</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:308'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Lcreate_external</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:309'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:310'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oopen</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:311'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oopen_by_addr</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:312'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oopen_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:313'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oexists_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:314'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oget_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:315'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oget_info_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t CommonFG::childObjType(const char* objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:316'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t CommonFG::childObjType(const H5std_string&amp; objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:317'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t H5Location::childObjType(const char* objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:318'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t H5Location::childObjType(const H5std_string&amp; objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:319'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oget_info_by_idx</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t
+ index_type, H5_iter_order_t order, const char* objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:320'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t
+ index_type, H5_iter_order_t order, const char* objname)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:white;mso-background-themecolor:
+ background1;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:321'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Olink</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:322'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oincr_refcount</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:323'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Odecr_refcount</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:324'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ocopy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:325'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oset_comment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:326'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oset_comment_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:327'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oget_comment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:328'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oget_comment_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:329'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ovisit</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:330'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Ovisit_by_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:331'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Oclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:332'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:333'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5PLset_loading_state</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:334'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5PLget_loading_state</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:335'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:336'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pcreate_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:337'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_class_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string PropList::getClassName()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:338'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pcreate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>PropList::PropList(const hid_t plist_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:339'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pregister2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:340'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pinsert2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:341'>
+ <td width=263 rowspan=5 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::setProperty(const char* name, void* value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:342'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::setProperty(const char* name, const char* charptr)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:343'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::setProperty(const char* name, H5std_string&amp; strg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:344'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::setProperty(const H5std_string&amp; name, void* value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:345'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::setProperty(const H5std_string&amp; name,
+ H5std_string&amp; strg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:346'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pexist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool PropList::propExist(const char* name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:347'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool PropList::propExist(const H5std_string&amp; name )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:348'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pencode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::encode()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:349'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pdecode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* DataType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* ArrayType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* CompType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* DataType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* EnumType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* FloatType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* IntType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* StrType::decode()</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* VarLenType::decode()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:350;height:10.0pt'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t PropList::getPropSize(const char *name)</p>
+ </td>
+ <td width=35 rowspan=2 valign=top style='width:26.05pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 rowspan=2 valign=top style='width:31.45pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 rowspan=2 valign=top style='width:126.65pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:351;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t PropList::getPropSize(const H5std_string&amp; name)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:352'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_nprops</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t PropList::getNumProps()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:353'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hid_t PropList::getClass()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:354'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_class_parent</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>PropList PropList::getClassParent()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:355;height:10.0pt'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::getProperty(const char* name, void* value)</p>
+ </td>
+ <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:356;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string PropList::getProperty(const char* name)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:357;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::getProperty(const H5std_string&amp; name, void* value)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:358;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string PropList::getProperty(const H5std_string&amp; name)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:359'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pequal</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool PropList::operator==(const PropList&amp; rhs)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:360'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pisa_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool PropList::isAClass(const PropList&amp; prop_class)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:361'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Piterate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:362;height:10.0pt'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pcopy_prop</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::copyProp(PropList&amp; dest, const char *name)</p>
+ </td>
+ <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:363;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::copyProp( PropList&amp; dest, const H5std_string&amp;
+ name )</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:364;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::copyProp( PropList&amp; dest, PropList&amp; src, const
+ char *name )</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:365;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::copyProp( PropList&amp; dest, PropList&amp; src, const
+ H5std_string&amp; name )</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:366;height:10.0pt'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Premove</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::removeProp(const char *name)</p>
+ </td>
+ <td width=35 rowspan=2 valign=top style='width:26.05pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 rowspan=2 valign=top style='width:31.45pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 rowspan=2 valign=top style='width:126.65pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:367;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::removeProp(const H5std_string&amp; name)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:368'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Punregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:369'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pclose_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::closeClass()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:370'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:371'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>PropList destructor</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:372'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pcopy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void PropList::copy( const PropList&amp; like_plist )</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:373'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_attr_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact = 8,
+ unsigned min_dense = 6)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:374'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_attr_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void ObjCreatPropList::getAttrPhaseChange(unsigned&amp; max_compact,
+ unsigned&amp; min_dense)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:375'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_attr_creation_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:376'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_attr_creation_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>unsigned ObjCreatPropList::getAttrCrtOrder()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:377'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_obj_track_times</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:378'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_obj_track_times</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:379'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pmodify_filter</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t
+ cd_nelmts, const unsigned int cd_values[])</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:380'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_filter</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned
+ int flags,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>size_t cd_nelmts, const
+ unsigned int cd_values[])</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:381'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_nfilters</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DSetCreatPropList::getNfilters()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:382'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_filter2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>unsigned int
+ &amp;flags, size_t &amp;cd_nelmts, unsigned int* cd_values,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>size_t namelen, char
+ name[], unsigned int&amp; filter_config)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:383'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_filter_by_id2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>unsigned int
+ &amp;flags, size_t &amp;cd_nelmts, unsigned int* cd_values,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>size_t namelen, char
+ name[], unsigned int &amp;filter_config)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:384'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pall_filters_avail</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DSetCreatPropList::allFiltersAvail()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:385'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Premove_filter</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:386'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_deflate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setDeflate(int level)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:387'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fletcher32</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setFletcher32()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:388'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_userblock</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::setUserblock(hsize_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:389'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_userblock</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t FileCreatPropList::getUserblock()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:390'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_sizes</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::setSizes(size_t sizeof_addr, size_t
+ sizeof_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:391'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_sizes</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::getSizes(size_t&amp; sizeof_addr, size_t&amp;
+ sizeof_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:392'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_sym_k</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::setSymk(unsigned ik, unsigned lk)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:393'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_sym_k</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::getSymk(unsigned&amp; ik, unsigned&amp; lk)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:394'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_istore_k</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::setIstorek(unsigned ik)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:395'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_istore_k</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>unsigned FileCreatPropList::getIstorek()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:396'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_shared_mesg_nindexes</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:397'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_shared_mesg_nindexes</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:398'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_shared_mesg_index</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:399'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_shared_mesg_index</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:400'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_shared_mesg_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:401'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_shared_mesg_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:402'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_file_space</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t
+ strategy, hbool_t persist, hsize_t threshold)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:403'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_file_space</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void
+ FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t&amp; strategy,
+ hbool_t&amp; persist, hsize_t&amp; threshold)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:404'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_alignment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setAlignment(hsize_t threshold, hsize_t
+ alignment)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:405'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_alignment</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::getAlignment(hsize_t &amp;threshold, hsize_t
+ &amp;alignment)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:406'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_driver</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setDriver(hid_t new_driver_id, const void
+ *new_driver_info)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:407'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_driver</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hid_t FileAccPropList::getDriver()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:408'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_driver_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:409'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_family_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setFamilyOffset(hsize_t offset)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:410'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_family_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t FileAccPropList::getFamilyOffset()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:411'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_multi_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setMultiType(H5FD_mem_t dtype)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:412'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_multi_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5FD_mem_t FileAccPropList::getMultiType()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:413'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_cache</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts,
+ size_t rdcc_nbytes, double rdcc_w0)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:414'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_cache</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::getCache(int&amp; mdc_nelmts, size_t&amp;
+ rdcc_nelmts, size_t&amp; rdcc_nbytes, double&amp; rdcc_w0)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:415'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_mdc_config</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:416'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_mdc_config</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:417'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_gc_references</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setGcReferences(unsigned gc_ref)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:418'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_gc_references</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>unsigned FileAccPropList::getGcReferences()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:419'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fclose_degree</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:420'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fclose_degree</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5F_close_degree_t FileAccPropList::getFcloseDegree()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:421'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_meta_block_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setMetaBlockSize(hsize_t &amp;block_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:422'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_meta_block_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t FileAccPropList::getMetaBlockSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:423'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_sieve_buf_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setSieveBufSize(size_t bufsize)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:424'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_sieve_buf_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t FileAccPropList::getSieveBufSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:425'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_small_data_block_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:426'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_small_data_block_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hsize_t DSetMemXferPropList::getSmallDataBlockSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:427'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_libver_bounds</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::setLibverBounds(H5F_libver_t libver_low,
+ H5F_libver_t libver_high)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:428'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_libver_bounds</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FileAccPropList::getLibverBounds(H5F_libver_t&amp; libver_low,
+ H5F_libver_t&amp; libver_high)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:429'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_file_cache_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:430'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_file_cache_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:431'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_elink_file_cache_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:432'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_file_image</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:433'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_file_image</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:434'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_file_image_callbacks</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:435'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_file_image_callbacks</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:436'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:437'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_core_write_tracking</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:438'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_core_write_tracking</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:439'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:440'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_layout</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setLayout(H5D_layout_t layout)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:441'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_layout</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5D_layout_t DSetCreatPropList::getLayout()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:442'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_chunk</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:443'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_chunk</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:444'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_external</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setExternal(const char* name, off_t offset,
+ hsize_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:445'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_external_count</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DSetCreatPropList::getExternalCount</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:446'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_external</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::getExternal(unsigned idx, size_t name_size,
+ char* name, off_t&amp; offset, hsize_t&amp; size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:447'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_szip</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned
+ int pixels_per_block)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:448'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_shuffle</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setShuffle()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:449'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_nbit</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setNbit()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:450'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_scaleoffset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:451'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fill_value</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setFillValue(const DataType&amp; fvalue_type,
+ const void* value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:452'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fill_value</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::getFillValue(const DataType&amp; fvalue_type,
+ void* value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:453'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pfill_value_defined</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5D_fill_value_t DSetCreatPropList::isFillValueDefined()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:454'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_alloc_time</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:455'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_alloc_time</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5D_alloc_time_t DSetCreatPropList::getAllocTime()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:456'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_fill_time</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:457'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_fill_time</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5D_fill_time_t DSetCreatPropList::getFillTime()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:458'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_chunk_cache</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:459'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_chunk_cache</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:460'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_data_transform</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setDataTransform(const char* expression)</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setDataTransform(const H5std_string&amp;
+ expression)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:461'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_data_transform</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t
+ buf_size)</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string DSetMemXferPropList::getDataTransform()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:462'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_buffer</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setBuffer(size_t size, void* tconv, void*
+ bkg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:463'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_buffer</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t DSetMemXferPropList::getBuffer(void** tconv, void** bkg)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:464'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_preserve</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setPreserve(bool status)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:465'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_preserve</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DSetMemXferPropList::getPreserve()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:466'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_edc_check</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:467'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Z_EDC_t H5Pget_edc_check</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Z_EDC_t DSetMemXferPropList::getEDCCheck()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:468'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_filter_callback</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:469'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_btree_ratios</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setBtreeRatios(double left, double middle,
+ double right)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:470'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_btree_ratios</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::getBtreeRatios(double&amp; left,
+ double&amp; middle, double&amp; right)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:471'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_vlen_mem_manager</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setVlenMemManager() </p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func,
+ void* alloc_info, H5MM_free_t free_func, void* free_info)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:472'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_vlen_mem_manager</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t&amp;
+ alloc_func, void** alloc_info, H5MM_free_t&amp; free_func, void** free_info)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:473'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_hyper_vector_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:474'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_hyper_vector_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t DSetMemXferPropList::getHyperVectorSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:475'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_type_conv_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op,
+ void *user_data)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:476'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_type_conv_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op,
+ void **user_data)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:477'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_create_intermediate_group</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:478'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_create_intermediate_group</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:479'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_local_heap_size_hint</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:480'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_local_heap_size_hint</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:481'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_link_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:482'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_link_phase_change</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:483'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_est_link_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:484'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_est_link_info</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:485'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_link_creation_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:486'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_link_creation_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:487'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_char_encoding</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ASAP</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:488'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_char_encoding</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ASAP</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:489'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_nlinks</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void LinkAccPropList::setNumLinks(size_t nlinks)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:490'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_nlinks</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t LinkAccPropList::getNumLinks()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:491'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_prefix</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:492'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_elink_prefix</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:493'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_elink_fapl</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:494'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_fapl</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:495'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_acc_flags</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:496'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_elink_acc_flags</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:497'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_elink_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:498'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_elink_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:499'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:500'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_copy_object</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:501'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_copy_object</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:502'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Padd_merge_committed_dtype_path</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:503'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pfree_merge_committed_dtype_paths</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:504'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pset_mcdt_search_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:505'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Pget_mcdt_search_cb</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:506'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:507'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5open</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::open()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:508'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5close</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:509'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5dont_atexit</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::dontAtExit()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:510'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5garbage_collect</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal;tab-stops:46.65pt'>void H5Library::garbageCollect()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:511'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5set_free_list_limits</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::setFreeListLimits(int reg_global_lim, int
+ reg_list_lim,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>int arr_global_lim, int
+ arr_list_lim, int blk_global_lim,</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='mso-spacerun:yes'>        </span>int blk_list_lim)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:512'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5get_libversion</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::getLibVersion(unsigned&amp; majnum, unsigned&amp;
+ minnum, unsigned&amp; relnum)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:513'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5check_version</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Library::checkVersion(unsigned majnum, unsigned minnum,
+ unsigned relnum)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:514'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5free_memory</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No wrapper</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:515'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5allocate_memory</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No wrapper</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:516'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5resize_memory</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No wrapper</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:517'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:518;height:17.45pt'>
+ <td width=263 rowspan=4 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Rcreate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::reference(void* ref, const char* name, const
+ DataSpace&amp; dataspace, H5R_type_t ref_type)</p>
+ </td>
+ <td width=35 rowspan=4 valign=top style='width:26.05pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 rowspan=4 valign=top style='width:31.45pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 rowspan=4 valign=top style='width:126.65pt;border-top:none;
+ border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:519;height:17.45pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::reference(void* ref, const H5std_string&amp; name,
+ const DataSpace&amp; dataspace, H5R_type_t ref_type)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:520;height:17.45pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::reference(void* ref, const char* name, H5R_type_t
+ ref_type)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:521;height:17.45pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:17.45pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void H5Location::reference(void* ref, const H5std_string&amp; name,
+ H5R_type_t ref_type)</p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:522'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Rdereference2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSet::DataSet(const H5Location&amp; loc, const void* ref,
+ H5R_type_t ref_type)</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:523'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Rget_region</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:524'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Rget_obj_type2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:525'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Rget_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:526'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:527'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><span style='background:lightgrey;mso-highlight:lightgrey'>H5Rget_obj_type1<o:p></o:p></span></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>Should be remove from code</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:528'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:529'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Screate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSpace::DataSpace(H5S_class_t type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:530'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Screate_simple</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataSpace::DataSpace(int rank, const hsize_t * dims, const hsize_t *
+ maxdims)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'>x</p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:531'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sset_extent_simple</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::setExtentSimple(int rank, const hsize_t
+ *current_size, const hsize_t *maximum_size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:532'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Scopy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::copy(const DataSpace&amp; like_space)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:533'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:534'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sencode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:535'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sdecode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:536'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_simple_extent_npoints</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hssize_t DataSpace::getSimpleExtentNpoints</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:537'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_simple_extent_ndims</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DataSpace::getSimpleExtentNdims ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:538'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_simple_extent_dims</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int DataSpace::getSimpleExtentDims (hsize_t *dims, hsize_t *maxdims)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:539'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sis_simple</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataSpace::isSimple ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:540'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_npoints</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hssize_t DataSpace::getSelectNpoints ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:541'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sselect_hyperslab</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t
+ *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:542'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sselect_elements</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::selectElements (H5S_seloper_t op, const size_t
+ num_elements, const hsize_t *coord)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:543'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_simple_extent_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5S_class_t DataSpace::getSimpleExtentType ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:544'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sset_extent_none</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::setExtentNone ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:545'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sextent_copy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::extentCopy (const DataSpace&amp; dest_space)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:546'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sextent_equal</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:547'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sselect_all</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::selectAll ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:548'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sselect_none</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::selectNone ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:549'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Soffset_simple</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::offsetSimple (const hssize_t* offset)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:550'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sselect_valid</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataSpace::selectValid ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:551'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sis_regular_hyperslab</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:552'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_regular_hyperslab</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:553'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_hyper_nblocks</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hssize_t DataSpace::getSelectHyperNblocks ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:554'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_elem_npoints</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>hssize_t DataSpace::getSelectElemNpoints ()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:555'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_hyper_blocklist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t
+ numblocks, hsize_t *buf)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:556'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_elem_pointlist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t
+ numpoints, hsize_t *buf)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:557'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_bounds</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:558'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Sget_select_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:559'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ background:#F2F2F2;mso-background-themecolor:background1;mso-background-themeshade:
+ 242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;background:#F2F2F2;mso-background-themecolor:
+ background1;mso-background-themeshade:242;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:560'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcreate</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType::DataType(const H5T_class_t type_class, size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:561'>
+ <td width=263 rowspan=3 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcopy</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType::DataType(const PredType&amp; pred_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:562'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::copy(const DataType&amp; like_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:563'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::copy(const DataSet&amp; dset)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:564'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tclose</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::close()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:565;height:10.0pt'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType destructor</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt;height:10.0pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:566'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tequal</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataType::operator==(const DataType&amp; compared_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:567'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tlock</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::lock()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:568'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcommit2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::commit(const H5Location&amp; loc, const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:569'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::commit(const H5Location&amp; loc, const
+ H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:570'>
+ <td width=263 rowspan=16 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Topen2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType CommonFG::openDataType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:571'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType CommonFG::openDataType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:572'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType CommonFG::openArrayType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:573'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType CommonFG::openArrayType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:574'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>CompType CommonFG::openCompType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:575'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>CompType CommonFG::openCompType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:576'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType CommonFG::openEnumType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:577'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType CommonFG::openEnumType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:578'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>IntType CommonFG::openIntType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:579'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>IntType CommonFG::openIntType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:580'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FloatType CommonFG::openFloatType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:581'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FloatType CommonFG::openFloatType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:582'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>StrType CommonFG::openStrType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:583'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>StrType CommonFG::openStrType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:584'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType CommonFG::openVarLenType(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:585'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType CommonFG::openVarLenType(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:586'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcommit_anon</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:587'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_create_plist</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>PropList DataType::getCreatePlist()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:588'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcommitted</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataType::committed()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:589'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tencode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::encode()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:590'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tdecode</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* DataType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* ArrayType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* CompType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* DataType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* EnumType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* FloatType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* IntType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* StrType::decode() const;</p>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>virtual DataType* VarLenType::decode() const;</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:591'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tinsert</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CompType::insertMember(const H5std_string&amp; name, size_t
+ offset, const DataType&amp; new_member)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:592'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tpack</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CompType::pack()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:593'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tenum_create</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType::EnumType(const IntType&amp; data_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:594'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tenum_insert</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void EnumType::insert(const char* name, void *value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:595'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tenum_nameof</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string EnumType::nameOf(void *value, size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:596'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tenum_valueof</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void EnumType::valueOf(const char* name, void *value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:597'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tvlen_create</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType::VarLenType(const DataType* base_type)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:598'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tarray_create2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType::ArrayType(const DataType&amp; base_type, int ndims, const
+ hsize_t* dims)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:599'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_array_ndims</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int ArrayType::getArrayNDims()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:600'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_array_dims2</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int ArrayType::getArrayDims(hsize_t* dims)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:601'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_tag</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::setTag(const char* tag)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:602'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::setTag(const H5std_string&amp; tag)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:603'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_tag</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string DataType::getTag()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:604'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_super</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType DataType::getSuper()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:605'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_class_t DataType::getClass()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:606'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tdetect_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataType::detectClass(H5T_class_t cls)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:607'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t DataType::getSize()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:608'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_order_t AtomType::getOrder()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:609'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_precision</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t AtomType::getPrecision()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:610'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int AtomType::getOffset()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:611'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_pad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::getPad(H5T_pad_t&amp; lsb, H5T_pad_t&amp; msb)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:612'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_sign</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_sign_t IntType::getSign()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:613'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_fields</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FloatType::getFields(size_t&amp; spos, size_t&amp; epos,
+ size_t&amp; esize, size_t&amp; mpos, size_t&amp; msize)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:614'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_ebias</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t FloatType::getEbias()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:615'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_norm</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_norm_t FloatType::getNorm(H5std_string&amp; norm_string)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:616'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_inpad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_pad_t FloatType::getInpad(H5std_string&amp; pad_string)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:617'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_strpad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_str_t StrType::getStrpad()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:618'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_nmembers</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int CompType::getNmembers()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:619'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int EnumType::getNmembers()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:620'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_name</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5std_string CompType::getMemberName(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:621'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_index</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int CompType::getMemberIndex(const char* name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:622'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>int CompType::getMemberIndex(const H5std_string&amp; name)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:623'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>size_t CompType::getMemberOffset(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:624'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_class</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_class_t CompType::getMemberClass(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:625'>
+ <td width=263 rowspan=8 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>DataType CompType::getMemberDataType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:626'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>ArrayType CompType::getMemberArrayType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:627'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>CompType CompType::getMemberCompType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:628'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>EnumType CompType::getMemberEnumType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:629'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>IntType CompType::getMemberIntType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:630'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>FloatType CompType::getMemberFloatType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:631'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>StrType CompType::getMemberStrType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:632'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>VarLenType CompType::getMemberVarLenType(unsigned member_num)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:633'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_member_value</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void EnumType::getMemberValue(unsigned memb_no, void *value)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:634'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_cset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_cset_t StrType::getCset()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:635'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tis_variable_str</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>bool DataType::isVariableStr()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:636'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tget_native_type</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:637'>
+ <td width=263 rowspan=2 style='width:197.2pt;border:solid windowtext 1.0pt;
+ border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_size</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::setSize(size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:638'>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void CompType::setSize(size_t size)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:639'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_order</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::setOrder(H5T_order_t order)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:640'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_precision</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::setPrecision(size_t precision)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:641'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_offset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::setOffset(size_t offset)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:642'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_pad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:643'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_sign</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void IntType::setSign(H5T_sign_t sign)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:644'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_fields</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FloatType::setFields(size_t spos, size_t epos, size_t esize,
+ size_t mpos, size_t msize)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:645'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_ebias</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FloatType::setEbias(size_t ebias)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:646'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_norm</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FloatType::setNorm(H5T_norm_t norm)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:647'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_inpad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void FloatType::setInpad(H5T_pad_t inpad)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:648'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_cset</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void StrType::setCset(H5T_cset_t cset)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:649'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tset_strpad</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void StrType::setStrpad(H5T_str_t strpad)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:650'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::registerFunc(H5T_pers_t pers, const char* name, const
+ DataType&amp; dest, H5T_conv_t func)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:651'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tunregister</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::unregister(H5T_pers_t pers, const char* name, const
+ DataType&amp; dest, H5T_conv_t func)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:652'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tfind</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5T_conv_t DataType::find(const DataType&amp; dest, H5T_cdata_t
+ **pcdata)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:653'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tcompiler_conv</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>No</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:654'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Tconvert</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>void DataType::convert(const DataType&amp; dest, size_t nelmts, void
+ *buf, void *background, const PropList&amp; plist)</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:655;mso-yfti-lastrow:yes'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+</div>
+
+</body>
+
+</html>
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 9b9b745..ba08f16 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,17 +1,17 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_CPP_SRC)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
- ${HDF5_BINARY_DIR}/H5cxx_pubconf.h
+ ${HDF5_SRC_BINARY_DIR}/H5cxx_pubconf.h
)
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
-set (CPP_SRCS
+set (CPP_SOURCES
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5AcreatProp.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
@@ -86,33 +86,62 @@ set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
)
-add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SRCS} ${CPP_HDRS})
-TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES
- FOLDER libraries/cpp
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set (install_targets ${HDF5_CPP_LIB_TARGET})
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS})
+ target_include_directories (${HDF5_CPP_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+ target_compile_definitions(${HDF5_CPP_LIB_TARGET}
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
+ )
+ TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
+ set (install_targets ${HDF5_CPP_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SRCS} ${CPP_HDRS})
- TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
+ add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS})
+ target_include_directories (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+ target_compile_definitions(${HDF5_CPP_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
+ )
+ TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
+ target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
+ PUBLIC ${HDF5_LIBSH_TARGET}
+ )
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE -static-libgcc -static-libstdc++
+ )
+ endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX")
- set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES
- FOLDER libraries/cpp
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
+ set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp)
set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET})
+ else ()
+ clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
@@ -131,7 +160,9 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
+ endif ()
install (
TARGETS
@@ -158,13 +189,15 @@ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
set (_PKG_CONFIG_LIBS_PRIVATE)
-set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+endif ()
if (BUILD_SHARED_LIBS)
set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
endif ()
-set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
-set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.pc.in
@@ -177,7 +210,7 @@ install (
COMPONENT cpplibraries
)
-if (NOT WIN32)
+if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 92733ab..b28571f 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -32,7 +32,7 @@ namespace H5 {
///\brief Default constructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-AbstractDs::AbstractDs(){}
+AbstractDs::AbstractDs() {}
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
@@ -55,19 +55,20 @@ AbstractDs::AbstractDs(){}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_class_t AbstractDs::getTypeClass() const
+H5T_class_t
+AbstractDs::getTypeClass() const
{
// Gets the datatype used by this dataset or attribute.
// p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
hid_t datatype_id;
try {
- datatype_id = p_get_type(); // returned value is already validated
+ datatype_id = p_get_type(); // returned value is already validated
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getTypeClass", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getTypeClass", E.getDetailMsg());
}
@@ -76,23 +77,21 @@ H5T_class_t AbstractDs::getTypeClass() const
// Close temporary datatype_id
herr_t ret_value = H5Tclose(datatype_id);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
if (fromClass() == "DataSet")
throw DataTypeIException("DataSet::getTypeClass", "H5Tclose failed");
- else if (fromClass() == "Attribute")
+ else if (fromClass() == "Attribute")
throw DataTypeIException("Attribute::getTypeClass", "H5Tclose failed");
}
// Check on the returned type_class
- if (type_class == H5T_NO_CLASS)
- {
+ if (type_class == H5T_NO_CLASS) {
if (fromClass() == "DataSet")
- throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
- else if (fromClass() == "Attribute")
- throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
+ throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
+ else if (fromClass() == "Attribute")
+ throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
}
- return(type_class);
+ return (type_class);
}
//--------------------------------------------------------------------------
@@ -103,7 +102,8 @@ H5T_class_t AbstractDs::getTypeClass() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType AbstractDs::getDataType() const
+DataType
+AbstractDs::getDataType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -112,12 +112,12 @@ DataType AbstractDs::getDataType() const
try {
DataType datatype;
f_DataType_setId(&datatype, p_get_type());
- return(datatype);
+ return (datatype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getDataType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getDataType", E.getDetailMsg());
}
}
@@ -130,7 +130,8 @@ DataType AbstractDs::getDataType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-ArrayType AbstractDs::getArrayType() const
+ArrayType
+AbstractDs::getArrayType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -141,12 +142,12 @@ ArrayType AbstractDs::getArrayType() const
// problem described in the JIRA issue HDFFV-7947
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_type());
- return(arraytype);
+ return (arraytype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getArrayType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getArrayType", E.getDetailMsg());
}
}
@@ -159,7 +160,8 @@ ArrayType AbstractDs::getArrayType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-CompType AbstractDs::getCompType() const
+CompType
+AbstractDs::getCompType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -168,12 +170,12 @@ CompType AbstractDs::getCompType() const
try {
CompType comptype;
f_DataType_setId(&comptype, p_get_type());
- return(comptype);
+ return (comptype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getCompType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getCompType", E.getDetailMsg());
}
}
@@ -186,7 +188,8 @@ CompType AbstractDs::getCompType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType AbstractDs::getEnumType() const
+EnumType
+AbstractDs::getEnumType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -195,12 +198,12 @@ EnumType AbstractDs::getEnumType() const
try {
EnumType enumtype;
f_DataType_setId(&enumtype, p_get_type());
- return(enumtype);
+ return (enumtype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getEnumType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getEnumType", E.getDetailMsg());
}
}
@@ -213,7 +216,8 @@ EnumType AbstractDs::getEnumType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType AbstractDs::getIntType() const
+IntType
+AbstractDs::getIntType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -222,12 +226,12 @@ IntType AbstractDs::getIntType() const
try {
IntType inttype;
f_DataType_setId(&inttype, p_get_type());
- return(inttype);
+ return (inttype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getIntType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getIntType", E.getDetailMsg());
}
}
@@ -240,7 +244,8 @@ IntType AbstractDs::getIntType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType AbstractDs::getFloatType() const
+FloatType
+AbstractDs::getFloatType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -249,12 +254,12 @@ FloatType AbstractDs::getFloatType() const
try {
FloatType floatype;
f_DataType_setId(&floatype, p_get_type());
- return(floatype);
+ return (floatype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getFloatType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getFloatType", E.getDetailMsg());
}
}
@@ -267,7 +272,8 @@ FloatType AbstractDs::getFloatType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType AbstractDs::getStrType() const
+StrType
+AbstractDs::getStrType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -276,12 +282,12 @@ StrType AbstractDs::getStrType() const
try {
StrType strtype;
f_DataType_setId(&strtype, p_get_type());
- return(strtype);
+ return (strtype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getStrType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getStrType", E.getDetailMsg());
}
}
@@ -294,7 +300,8 @@ StrType AbstractDs::getStrType() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-VarLenType AbstractDs::getVarLenType() const
+VarLenType
+AbstractDs::getVarLenType() const
{
// Gets the id of the datatype used by this dataset or attribute using
// p_get_type. p_get_type calls either H5Dget_type or H5Aget_type
@@ -303,12 +310,12 @@ VarLenType AbstractDs::getVarLenType() const
try {
VarLenType varlentype;
f_DataType_setId(&varlentype, p_get_type());
- return(varlentype);
+ return (varlentype);
}
- catch (DataSetIException& E) {
+ catch (DataSetIException &E) {
throw DataTypeIException("DataSet::getVarLenType", E.getDetailMsg());
}
- catch (AttributeIException& E) {
+ catch (AttributeIException &E) {
throw DataTypeIException("Attribute::getVarLenType", E.getDetailMsg());
}
}
@@ -320,4 +327,4 @@ VarLenType AbstractDs::getVarLenType() const
//--------------------------------------------------------------------------
AbstractDs::~AbstractDs() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index ae74c62..f502c9f 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -36,61 +36,61 @@ class VarLenType;
class DataSpace;
class H5_DLLCPP AbstractDs {
- public:
- // Gets a copy the datatype of that this abstract dataset uses.
- // Note that this datatype is a generic one and can only be accessed
- // via generic member functions, i.e., member functions belong
- // to DataType. To get specific datatype, i.e. EnumType, FloatType,
- // etc..., use the specific functions, that follow, instead.
- DataType getDataType() const;
-
- // Gets a copy of the specific datatype of this abstract dataset.
- ArrayType getArrayType() const;
- CompType getCompType() const;
- EnumType getEnumType() const;
- IntType getIntType() const;
- FloatType getFloatType() const;
- StrType getStrType() const;
- VarLenType getVarLenType() const;
-
- ///\brief Gets the size in memory of this abstract dataset.
- virtual size_t getInMemDataSize() const = 0;
-
- ///\brief Gets the dataspace of this abstract dataset - pure virtual.
- virtual DataSpace getSpace() const = 0;
-
- // Gets the class of the datatype that is used by this abstract
- // dataset.
- H5T_class_t getTypeClass() const;
-
- ///\brief Returns the amount of storage size required - pure virtual.
- virtual hsize_t getStorageSize() const = 0;
-
- // Returns this class name - pure virtual.
- virtual H5std_string fromClass() const = 0;
-
- // Destructor
- virtual ~AbstractDs();
-
- protected:
- // Default constructor
- AbstractDs();
-
- // *** Deprecation warning ***
- // The following two constructors are no longer appropriate after the
- // data member "id" had been moved to the sub-classes.
- // The copy constructor is a noop and is removed in 1.8.15 and the
- // other will be removed from 1.10 release, and then from 1.8 if its
- // removal does not raise any problems in two 1.10 releases.
-
- // Mar 2016 -BMR, AbstractDs(const hid_t h5_id);
-
- // Copy constructor
- // AbstractDs(const AbstractDs& original);
-
- private:
- // This member function is implemented by DataSet and Attribute - pure virtual.
- virtual hid_t p_get_type() const = 0;
+ public:
+ // Gets a copy the datatype of that this abstract dataset uses.
+ // Note that this datatype is a generic one and can only be accessed
+ // via generic member functions, i.e., member functions belong
+ // to DataType. To get specific datatype, i.e. EnumType, FloatType,
+ // etc..., use the specific functions, that follow, instead.
+ DataType getDataType() const;
+
+ // Gets a copy of the specific datatype of this abstract dataset.
+ ArrayType getArrayType() const;
+ CompType getCompType() const;
+ EnumType getEnumType() const;
+ IntType getIntType() const;
+ FloatType getFloatType() const;
+ StrType getStrType() const;
+ VarLenType getVarLenType() const;
+
+ ///\brief Gets the size in memory of this abstract dataset.
+ virtual size_t getInMemDataSize() const = 0;
+
+ ///\brief Gets the dataspace of this abstract dataset - pure virtual.
+ virtual DataSpace getSpace() const = 0;
+
+ // Gets the class of the datatype that is used by this abstract
+ // dataset.
+ H5T_class_t getTypeClass() const;
+
+ ///\brief Returns the amount of storage size required - pure virtual.
+ virtual hsize_t getStorageSize() const = 0;
+
+ // Returns this class name - pure virtual.
+ virtual H5std_string fromClass() const = 0;
+
+ // Destructor
+ virtual ~AbstractDs();
+
+ protected:
+ // Default constructor
+ AbstractDs();
+
+ // *** Deprecation warning ***
+ // The following two constructors are no longer appropriate after the
+ // data member "id" had been moved to the sub-classes.
+ // The copy constructor is a noop and is removed in 1.8.15 and the
+ // other will be removed from 1.10 release, and then from 1.8 if its
+ // removal does not raise any problems in two 1.10 releases.
+
+ // Mar 2016 -BMR, AbstractDs(const hid_t h5_id);
+
+ // Copy constructor
+ // AbstractDs(const AbstractDs& original);
+
+ private:
+ // This member function is implemented by DataSet and Attribute - pure virtual.
+ virtual hid_t p_get_type() const = 0;
}; // end of AbstractDs
} // namespace H5
diff --git a/c++/src/H5AcreatProp.cpp b/c++/src/H5AcreatProp.cpp
index 825d230..5f01a15 100644
--- a/c++/src/H5AcreatProp.cpp
+++ b/c++/src/H5AcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,7 +28,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-AttrCreatPropList* AttrCreatPropList::DEFAULT_ = 0;
+AttrCreatPropList *AttrCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: AttrCreatPropList::getConstant
@@ -41,13 +41,13 @@ AttrCreatPropList* AttrCreatPropList::DEFAULT_ = 0;
// happen.
// May 2018
//--------------------------------------------------------------------------
-AttrCreatPropList* AttrCreatPropList::getConstant()
+AttrCreatPropList *
+AttrCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -56,8 +56,9 @@ AttrCreatPropList* AttrCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new AttrCreatPropList(H5P_ATTRIBUTE_CREATE);
else
- throw PropListIException("AttrCreatPropList::getConstant", "AttrCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("AttrCreatPropList::getConstant",
+ "AttrCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -67,7 +68,8 @@ AttrCreatPropList* AttrCreatPropList::getConstant()
// exception H5::PropListIException
// May 2018
//--------------------------------------------------------------------------
-void AttrCreatPropList::deleteConstants()
+void
+AttrCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -76,7 +78,7 @@ void AttrCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default link creation property
//--------------------------------------------------------------------------
-const AttrCreatPropList& AttrCreatPropList::DEFAULT = *getConstant();
+const AttrCreatPropList &AttrCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -93,7 +95,7 @@ AttrCreatPropList::AttrCreatPropList() : StrCreatPropList(H5P_ATTRIBUTE_CREATE)
///\param original - IN: AttrCreatPropList instance to copy
// May 2018
//--------------------------------------------------------------------------
-AttrCreatPropList::AttrCreatPropList(const AttrCreatPropList& original) : StrCreatPropList(original) {}
+AttrCreatPropList::AttrCreatPropList(const AttrCreatPropList &original) : StrCreatPropList(original) {}
//--------------------------------------------------------------------------
// Function: AttrCreatPropList overloaded constructor
@@ -110,4 +112,4 @@ AttrCreatPropList::AttrCreatPropList(const hid_t plist_id) : StrCreatPropList(pl
//--------------------------------------------------------------------------
AttrCreatPropList::~AttrCreatPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5AcreatProp.h b/c++/src/H5AcreatProp.h
index 9f81897..6be2506 100644
--- a/c++/src/H5AcreatProp.h
+++ b/c++/src/H5AcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,39 +23,43 @@ namespace H5 {
*/
// Inheritance: StrCreatPropList -> PropList -> IdComponent
class H5_DLLCPP AttrCreatPropList : public StrCreatPropList {
- public:
- ///\brief Default attribute creation property list.
- static const AttrCreatPropList& DEFAULT;
+ public:
+ ///\brief Default attribute creation property list.
+ static const AttrCreatPropList &DEFAULT;
- // Creates a attribute creation property list.
- AttrCreatPropList();
+ // Creates a attribute creation property list.
+ AttrCreatPropList();
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("AttrCreatPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("AttrCreatPropList");
+ }
- // Copy constructor: same as the original AttrCreatPropList.
- AttrCreatPropList(const AttrCreatPropList& original);
+ // Copy constructor: same as the original AttrCreatPropList.
+ AttrCreatPropList(const AttrCreatPropList &original);
- // Creates a copy of an existing attribute creation property list
- // using the property list id.
- AttrCreatPropList(const hid_t acpl_id);
+ // Creates a copy of an existing attribute creation property list
+ // using the property list id.
+ AttrCreatPropList(const hid_t acpl_id);
- // Noop destructor
- virtual ~AttrCreatPropList();
+ // Noop destructor
+ virtual ~AttrCreatPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static AttrCreatPropList* DEFAULT_;
+ private:
+ static AttrCreatPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static AttrCreatPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static AttrCreatPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; // end of AttrCreatPropList
+}; // end of AttrCreatPropList
} // namespace H5
diff --git a/c++/src/H5Alltypes.h b/c++/src/H5Alltypes.h
index aaf3074..d4c8f38 100644
--- a/c++/src/H5Alltypes.h
+++ b/c++/src/H5Alltypes.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 857729c..183bfc0 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -41,14 +41,14 @@ ArrayType::ArrayType() : DataType() {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType(const hid_t existing_id) : DataType( existing_id ) {}
+ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id) {}
//--------------------------------------------------------------------------
// Function: ArrayType copy constructor
-///\brief Copy constructor: makes a copy of the original ArrayType object.
+///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType(const ArrayType& original) : DataType(original) {}
+ArrayType::ArrayType(const ArrayType &original) : DataType(original) {}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
@@ -60,7 +60,7 @@ ArrayType::ArrayType(const ArrayType& original) : DataType(original) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
+ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) : DataType()
{
// Call C API to create an array data type
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
@@ -85,7 +85,7 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-ArrayType::ArrayType(const H5Location& loc, const char *type_name) : DataType()
+ArrayType::ArrayType(const H5Location &loc, const char *type_name) : DataType()
{
id = p_opentype(loc, type_name);
}
@@ -104,7 +104,7 @@ ArrayType::ArrayType(const H5Location& loc, const char *type_name) : DataType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-ArrayType::ArrayType(const H5Location& loc, const H5std_string& type_name) : DataType()
+ArrayType::ArrayType(const H5Location &loc, const H5std_string &type_name) : DataType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -120,21 +120,21 @@ ArrayType::ArrayType(const H5Location& loc, const H5std_string& type_name) : Dat
// each data member from the rhs object. (Issue HDFFV-9562)
// Programmer Binh-Minh Ribler - Mar 2016
//--------------------------------------------------------------------------
-ArrayType& ArrayType::operator=(const ArrayType& rhs)
+ArrayType &
+ArrayType::operator=(const ArrayType &rhs)
{
- if (this != &rhs)
- {
+ if (this != &rhs) {
// handling references to this id
try {
setId(rhs.id);
// Note: a = b, so there are two objects with the same hdf5 id
// that's why incRefCount is needed, and it is called by setId
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataTypeIException(inMemFunc("operator="), close_error.getDetailMsg());
}
}
- return(*this);
+ return (*this);
}
//--------------------------------------------------------------------------
@@ -144,7 +144,8 @@ ArrayType& ArrayType::operator=(const ArrayType& rhs)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* ArrayType::decode() const
+DataType *
+ArrayType::decode() const
{
hid_t encoded_arrtype_id = H5I_INVALID_HID;
try {
@@ -155,7 +156,7 @@ DataType* ArrayType::decode() const
}
ArrayType *encoded_arrtype = new ArrayType;
encoded_arrtype->p_setId(encoded_arrtype_id);
- return(encoded_arrtype);
+ return (encoded_arrtype);
}
//--------------------------------------------------------------------------
@@ -168,16 +169,16 @@ DataType* ArrayType::decode() const
// Apr, 2016
// Became const.
//--------------------------------------------------------------------------
-int ArrayType::getArrayNDims() const
+int
+ArrayType::getArrayNDims() const
{
// Get the rank of the array type specified by id from the C API
int ndims = H5Tget_array_ndims(id);
- if (ndims < 0)
- {
+ if (ndims < 0) {
throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
}
- return(ndims);
+ return (ndims);
}
//--------------------------------------------------------------------------
@@ -191,7 +192,8 @@ int ArrayType::getArrayNDims() const
// Apr, 2016
// Became const.
//--------------------------------------------------------------------------
-int ArrayType::getArrayDims(hsize_t* dims) const
+int
+ArrayType::getArrayDims(hsize_t *dims) const
{
// Get the dimensions
int ndims = H5Tget_array_dims2(id, dims);
@@ -199,7 +201,7 @@ int ArrayType::getArrayDims(hsize_t* dims) const
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// Return the number of dimensions
- return(ndims);
+ return (ndims);
}
//--------------------------------------------------------------------------
@@ -209,4 +211,4 @@ int ArrayType::getArrayDims(hsize_t* dims) const
//--------------------------------------------------------------------------
ArrayType::~ArrayType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 952aae1..988a3b2 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,44 +23,48 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP ArrayType : public DataType {
- public:
- // Constructor that creates a new array data type based on the
- // specified base type.
- ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
+ public:
+ // Constructor that creates a new array data type based on the
+ // specified base type.
+ ArrayType(const DataType &base_type, int ndims, const hsize_t *dims);
- // Constructors that open an array datatype, given a location.
- ArrayType(const H5Location& loc, const char* name);
- ArrayType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open an array datatype, given a location.
+ ArrayType(const H5Location &loc, const char *name);
+ ArrayType(const H5Location &loc, const H5std_string &name);
- // Assignment operator
- ArrayType& operator=(const ArrayType& rhs);
+ // Assignment operator
+ ArrayType &operator=(const ArrayType &rhs);
- // Returns an ArrayType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an ArrayType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- // Returns the number of dimensions of this array datatype.
- int getArrayNDims() const;
- //int getArrayNDims(); // removed 1.8.18 and 1.10.1
+ // Returns the number of dimensions of this array datatype.
+ int getArrayNDims() const;
+ // int getArrayNDims(); // removed 1.8.18 and 1.10.1
- // Returns the sizes of dimensions of this array datatype.
- int getArrayDims(hsize_t* dims) const;
- //int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
+ // Returns the sizes of dimensions of this array datatype.
+ int getArrayDims(hsize_t *dims) const;
+ // int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("ArrayType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("ArrayType");
+ }
- // Copy constructor: makes copy of the original object.
- ArrayType(const ArrayType& original);
+ // Copy constructor: makes copy of the original object.
+ ArrayType(const ArrayType &original);
- // Constructor that takes an existing id
- ArrayType(const hid_t existing_id);
+ // Constructor that takes an existing id
+ ArrayType(const hid_t existing_id);
- // Noop destructor
- virtual ~ArrayType();
+ // Noop destructor
+ virtual ~ArrayType();
- // Default constructor
- ArrayType();
+ // Default constructor
+ ArrayType();
}; // end of ArrayType
} // namespace H5
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index bd46d7b..63f34ca 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -42,14 +42,14 @@ AtomType::AtomType() : DataType() {}
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-AtomType::AtomType(const hid_t existing_id) : DataType( existing_id ) {}
+AtomType::AtomType(const hid_t existing_id) : DataType(existing_id) {}
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
///\brief Copy constructor: makes a copy of the original AtomType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-AtomType::AtomType(const AtomType& original) : DataType( original ) {}
+AtomType::AtomType(const AtomType &original) : DataType(original) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
@@ -59,12 +59,12 @@ AtomType::AtomType(const AtomType& original) : DataType( original ) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::setSize(size_t size) const
+void
+AtomType::setSize(size_t size) const
{
// Call C routine H5Tset_size to set the total size
herr_t ret_value = H5Tset_size(id, size);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setSize"), "H5Tset_size failed");
}
}
@@ -79,18 +79,17 @@ void AtomType::setSize(size_t size) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-H5T_order_t AtomType::getOrder() const
+H5T_order_t
+AtomType::getOrder() const
{
// Call C routine to get the byte ordering
H5T_order_t type_order = H5Tget_order(id);
// return a byte order constant if successful
- if(type_order == H5T_ORDER_ERROR)
- {
- throw DataTypeIException(inMemFunc("getOrder"),
- "H5Tget_order returns H5T_ORDER_ERROR");
+ if (type_order == H5T_ORDER_ERROR) {
+ throw DataTypeIException(inMemFunc("getOrder"), "H5Tget_order returns H5T_ORDER_ERROR");
}
- return(type_order);
+ return (type_order);
}
//--------------------------------------------------------------------------
@@ -110,19 +109,20 @@ H5T_order_t AtomType::getOrder() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_order_t AtomType::getOrder(H5std_string& order_string) const
+H5T_order_t
+AtomType::getOrder(H5std_string &order_string) const
{
// Call the overloaded to get the type order without text
H5T_order_t type_order = getOrder();
// Then provide the text and return the type order
- if(type_order == H5T_ORDER_LE)
- order_string = "Little endian byte ordering (0)";
- else if(type_order == H5T_ORDER_BE)
- order_string = "Big endian byte ordering (1)";
- else if(type_order == H5T_ORDER_VAX)
- order_string = "VAX mixed byte ordering (2)";
- return(type_order);
+ if (type_order == H5T_ORDER_LE)
+ order_string = "Little endian byte ordering (0)";
+ else if (type_order == H5T_ORDER_BE)
+ order_string = "Big endian byte ordering (1)";
+ else if (type_order == H5T_ORDER_VAX)
+ order_string = "VAX mixed byte ordering (2)";
+ return (type_order);
}
//--------------------------------------------------------------------------
@@ -135,12 +135,12 @@ H5T_order_t AtomType::getOrder(H5std_string& order_string) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::setOrder(H5T_order_t order) const
+void
+AtomType::setOrder(H5T_order_t order) const
{
// Call C routine to set the byte ordering
herr_t ret_value = H5Tset_order(id, order);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setOrder"), "H5Tset_order failed");
}
}
@@ -156,17 +156,17 @@ void AtomType::setOrder(H5T_order_t order) const
/// value returned by \c DataType::getSize().
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-size_t AtomType::getPrecision() const
+size_t
+AtomType::getPrecision() const
{
- size_t num_signi_bits = H5Tget_precision(id); // C routine
+ size_t num_signi_bits = H5Tget_precision(id); // C routine
// returns number of significant bits if successful
- if(num_signi_bits == 0)
- {
+ if (num_signi_bits == 0) {
throw DataTypeIException(inMemFunc("getPrecision"),
- "H5Tget_precision returns invalid number of significant bits");
+ "H5Tget_precision returns invalid number of significant bits");
}
- return(num_signi_bits);
+ return (num_signi_bits);
}
//--------------------------------------------------------------------------
@@ -179,12 +179,12 @@ size_t AtomType::getPrecision() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetPrecision
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::setPrecision(size_t precision) const
+void
+AtomType::setPrecision(size_t precision) const
{
// Call C routine to set the datatype precision
herr_t ret_value = H5Tset_precision(id, precision);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setPrecision"), "H5Tset_precision failed");
}
}
@@ -203,17 +203,16 @@ void AtomType::setPrecision(size_t precision) const
// - return type changed from size_t to int
// - offset = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
-int AtomType::getOffset() const
+int
+AtomType::getOffset() const
{
- int offset = H5Tget_offset(id); // C routine
+ int offset = H5Tget_offset(id); // C routine
// returns a non-negative offset value if successful
- if(offset == -1)
- {
- throw DataTypeIException(inMemFunc("getOffset"),
- "H5Tget_offset returns a negative offset value");
+ if (offset == -1) {
+ throw DataTypeIException(inMemFunc("getOffset"), "H5Tget_offset returns a negative offset value");
}
- return(offset);
+ return (offset);
}
//--------------------------------------------------------------------------
@@ -226,12 +225,12 @@ int AtomType::getOffset() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetOffset
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::setOffset(size_t offset) const
+void
+AtomType::setOffset(size_t offset) const
{
// Call C routine to set the bit offset
herr_t ret_value = H5Tset_offset(id, offset);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setOffset"), "H5Tset_offset failed");
}
}
@@ -250,12 +249,12 @@ void AtomType::setOffset(size_t offset) const
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const
+void
+AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
{
// Call C routine to get the padding type
herr_t ret_value = H5Tget_pad(id, &lsb, &msb);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("getPad"), "H5Tget_pad failed");
}
}
@@ -273,12 +272,12 @@ void AtomType::getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
+void
+AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
{
// Call C routine to set the padding type
herr_t ret_value = H5Tset_pad(id, lsb, msb);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setPad"), "H5Tset_pad failed");
}
}
@@ -292,4 +291,4 @@ void AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
AtomType::~AtomType() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index 4a091f0..b157cbf 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,54 +26,58 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP AtomType : public DataType {
- public:
- // Returns the byte order of an atomic datatype.
- H5T_order_t getOrder() const;
- H5T_order_t getOrder(H5std_string& order_string) const;
+ public:
+ // Returns the byte order of an atomic datatype.
+ H5T_order_t getOrder() const;
+ H5T_order_t getOrder(H5std_string &order_string) const;
- // Sets the byte ordering of an atomic datatype.
- void setOrder(H5T_order_t order) const;
+ // Sets the byte ordering of an atomic datatype.
+ void setOrder(H5T_order_t order) const;
- // Retrieves the bit offset of the first significant bit.
- // 12/05/00 - changed return type to int from size_t - C API
- int getOffset() const;
+ // Retrieves the bit offset of the first significant bit.
+ // 12/05/00 - changed return type to int from size_t - C API
+ int getOffset() const;
- // Sets the bit offset of the first significant bit.
- void setOffset(size_t offset) const;
+ // Sets the bit offset of the first significant bit.
+ void setOffset(size_t offset) const;
- // Retrieves the padding type of the least and most-significant bit padding.
- void getPad(H5T_pad_t& lsb, H5T_pad_t& msb) const;
+ // Retrieves the padding type of the least and most-significant bit padding.
+ void getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const;
- // Sets the least and most-significant bits padding types
- void setPad(H5T_pad_t lsb, H5T_pad_t msb) const;
+ // Sets the least and most-significant bits padding types
+ void setPad(H5T_pad_t lsb, H5T_pad_t msb) const;
- // Returns the precision of an atomic datatype.
- size_t getPrecision() const;
+ // Returns the precision of an atomic datatype.
+ size_t getPrecision() const;
- // Sets the precision of an atomic datatype.
- void setPrecision(size_t precision) const;
+ // Sets the precision of an atomic datatype.
+ void setPrecision(size_t precision) const;
- // Sets the total size for an atomic datatype.
- void setSize(size_t size) const;
+ // Sets the total size for an atomic datatype.
+ void setSize(size_t size) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("AtomType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("AtomType");
+ }
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Copy constructor - makes copy of the original object
- AtomType(const AtomType& original);
+ // Copy constructor - makes copy of the original object
+ AtomType(const AtomType &original);
- // Noop destructor
- virtual ~AtomType();
+ // Noop destructor
+ virtual ~AtomType();
#endif // DOXYGEN_SHOULD_SKIP_THIS
- protected:
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Default constructor
- AtomType();
+ // Default constructor
+ AtomType();
- // Constructor that takes an existing id
- AtomType(const hid_t existing_id);
+ // Constructor that takes an existing id
+ AtomType(const hid_t existing_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of AtomType
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 207d73c..2e411ef 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,7 +18,7 @@
#endif
#include <string>
-#include "H5private.h" // for HDfree
+#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,11 +39,11 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
-//class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
+// class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
//--------------------------------------------------------------------------
// Function: Attribute default constructor
@@ -58,7 +58,7 @@ Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID) {}
///\param original - IN: Original Attribute object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute::Attribute(const Attribute& original) : AbstractDs(), H5Location(), id(original.id)
+Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -84,11 +84,11 @@ Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(e
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Attribute::write(const DataType& mem_type, const void *buf) const
+void
+Attribute::write(const DataType &mem_type, const void *buf) const
{
herr_t ret_value = H5Awrite(id, mem_type.getId(), buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::write", "H5Awrite failed");
}
}
@@ -102,32 +102,29 @@ void Attribute::write(const DataType& mem_type, const void *buf) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
-void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
+void
+Attribute::write(const DataType &mem_type, const H5std_string &strg) const
{
// Check if this attribute has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
- if (is_variable_len < 0)
- {
+ if (is_variable_len < 0) {
throw AttributeIException("Attribute::write", "H5Tis_variable_str failed");
}
// Convert string to C-string
- const char* strg_C;
- strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
+ const char *strg_C;
+ strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
herr_t ret_value = 0;
// Pass string in differently depends on variable or fixed length
- if (!is_variable_len)
- {
+ if (!is_variable_len) {
ret_value = H5Awrite(id, mem_type.getId(), strg_C);
}
- else
- {
+ else {
// passing third argument by address
ret_value = H5Awrite(id, mem_type.getId(), &strg_C);
}
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::write", "H5Awrite failed");
}
}
@@ -140,11 +137,11 @@ void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Attribute::read(const DataType& mem_type, void *buf) const
+void
+Attribute::read(const DataType &mem_type, void *buf) const
{
herr_t ret_value = H5Aread(id, mem_type.getId(), buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::read", "H5Aread failed");
}
}
@@ -169,22 +166,21 @@ void Attribute::read(const DataType& mem_type, void *buf) const
// variable-len string data: p_read_fixed_len and
// p_read_variable_len. This should improve readability. -BMR
//--------------------------------------------------------------------------
-void Attribute::read(const DataType& mem_type, H5std_string& strg) const
+void
+Attribute::read(const DataType &mem_type, H5std_string &strg) const
{
// Check if this attribute has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
- if (is_variable_len < 0)
- {
+ if (is_variable_len < 0) {
throw AttributeIException("Attribute::read", "H5Tis_variable_str failed");
}
- if (!is_variable_len) // only allocate for fixed-len string
+ if (!is_variable_len) // only allocate for fixed-len string
{
p_read_fixed_len(mem_type, strg);
}
- else
- {
+ else {
p_read_variable_len(mem_type, strg);
}
}
@@ -196,62 +192,55 @@ void Attribute::read(const DataType& mem_type, H5std_string& strg) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr 2009
//--------------------------------------------------------------------------
-size_t Attribute::getInMemDataSize() const
+size_t
+Attribute::getInMemDataSize() const
{
const char *func = "Attribute::getInMemDataSize";
// Get the data type of this attribute
hid_t mem_type_id = H5Aget_type(id);
- if(mem_type_id < 0)
- {
+ if (mem_type_id < 0) {
throw AttributeIException(func, "H5Aget_type failed");
}
// Get the data type's size by first getting its native type then getting
// the native type's size.
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
- if (native_type < 0)
- {
+ if (native_type < 0) {
throw AttributeIException(func, "H5Tget_native_type failed");
}
size_t type_size = H5Tget_size(native_type);
- if (type_size == 0)
- {
+ if (type_size == 0) {
throw AttributeIException(func, "H5Tget_size failed");
}
// Close the native type and the datatype of this attribute.
- if (H5Tclose(native_type) < 0)
- {
+ if (H5Tclose(native_type) < 0) {
throw DataSetIException(func, "H5Tclose(native_type) failed");
}
- if (H5Tclose(mem_type_id) < 0)
- {
+ if (H5Tclose(mem_type_id) < 0) {
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
}
// Get number of elements of the attribute by first getting its dataspace
// then getting the number of elements in the dataspace
hid_t space_id = H5Aget_space(id);
- if (space_id < 0)
- {
+ if (space_id < 0) {
throw AttributeIException(func, "H5Aget_space failed");
}
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
- if (num_elements < 0)
- {
+ if (num_elements < 0) {
throw AttributeIException(func, "H5Sget_simple_extent_npoints failed");
}
// Close the dataspace
- if (H5Sclose(space_id) < 0)
- {
+ if (H5Sclose(space_id) < 0) {
throw DataSetIException(func, "H5Sclose failed");
}
// Calculate and return the size of the data
size_t data_size = type_size * num_elements;
- return(data_size);
+ return (data_size);
}
//--------------------------------------------------------------------------
@@ -261,20 +250,19 @@ size_t Attribute::getInMemDataSize() const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace Attribute::getSpace() const
+DataSpace
+Attribute::getSpace() const
{
// Calls C function H5Aget_space to get the id of the dataspace
hid_t dataspace_id = H5Aget_space(id);
// If the dataspace id is valid, create and return the DataSpace object
- if(dataspace_id > 0)
- {
+ if (dataspace_id > 0) {
DataSpace dataspace;
f_DataSpace_setId(&dataspace, dataspace_id);
- return(dataspace);
+ return (dataspace);
}
- else
- {
+ else {
throw AttributeIException("Attribute::getSpace", "H5Aget_space failed");
}
}
@@ -296,22 +284,21 @@ DataSpace Attribute::getSpace() const
/// first argument and ignore the second argument.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
+ssize_t
+Attribute::getName(char *attr_name, size_t buf_size) const
{
// H5Aget_name will get buf_size-1 chars of the name to null terminate it
ssize_t name_size = H5Aget_name(id, buf_size, attr_name);
// If H5Aget_name returns a negative value, raise an exception
- if (name_size < 0)
- {
+ if (name_size < 0) {
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
- else if (name_size == 0)
- {
+ else if (name_size == 0) {
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Return length of the name
- return(name_size);
+ return (name_size);
}
//--------------------------------------------------------------------------
@@ -324,7 +311,8 @@ ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
// Mar 2014 - BMR
// Revised to use the modified getName() above
//--------------------------------------------------------------------------
-H5std_string Attribute::getName() const
+H5std_string
+Attribute::getName() const
{
H5std_string attr_name(""); // attribute name to return
@@ -332,32 +320,28 @@ H5std_string Attribute::getName() const
ssize_t name_size = H5Aget_name(id, static_cast<size_t>(0), NULL);
// If H5Aget_name failed, throw exception
- if (name_size < 0)
- {
+ if (name_size < 0) {
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
- else if (name_size == 0)
- {
+ else if (name_size == 0) {
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Attribute's name exists, retrieve it
- else if (name_size > 0)
- {
- char* name_C = new char[name_size+1]; // temporary C-string
- HDmemset(name_C, 0, name_size+1); // clear buffer
+ else if (name_size > 0) {
+ char *name_C = new char[name_size + 1]; // temporary C-string
+ HDmemset(name_C, 0, name_size + 1); // clear buffer
// Use overloaded function
- name_size = getName(name_C, name_size+1);
+ name_size = getName(name_C, name_size + 1);
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
- delete []name_C;
-
+ delete[] name_C;
}
// Return attribute's name
- return(attr_name);
+ return (attr_name);
}
//--------------------------------------------------------------------------
@@ -373,14 +357,15 @@ H5std_string Attribute::getName() const
// Mar 2014 - BMR
// Revised to use the new getName() below
//--------------------------------------------------------------------------
-H5std_string Attribute::getName(size_t len) const
+H5std_string
+Attribute::getName(size_t len) const
{
H5std_string attr_name;
- ssize_t name_size = getName(attr_name, len);
+ ssize_t name_size = getName(attr_name, len);
if (name_size < 0)
- return("");
+ return ("");
else
- return(attr_name);
+ return (attr_name);
}
//--------------------------------------------------------------------------
@@ -400,35 +385,34 @@ H5std_string Attribute::getName(size_t len) const
// Added to replace getName(size_t, H5std_string&) so that it'll
// allow the argument "len" to be skipped.
//--------------------------------------------------------------------------
-ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
+ssize_t
+Attribute::getName(H5std_string &attr_name, size_t len) const
{
ssize_t name_size = 0;
// If no length is provided, get the entire attribute name
- if (len == 0)
- {
+ if (len == 0) {
attr_name = getName();
name_size = attr_name.length();
}
// If length is provided, get that number of characters in name
- else
- {
- char* name_C = new char[len+1]; // temporary C-string
- HDmemset(name_C, 0, len+1); // clear buffer
+ else {
+ char *name_C = new char[len + 1]; // temporary C-string
+ HDmemset(name_C, 0, len + 1); // clear buffer
// Use overloaded function
- name_size = getName(name_C, len+1);
+ name_size = getName(name_C, len + 1);
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
- delete []name_C;
+ delete[] name_C;
}
// Otherwise, keep attr_name intact
// Return name size
- return(name_size);
+ return (name_size);
}
//--------------------------------------------------------------------------
@@ -446,7 +430,7 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//ssize_t Attribute::getName(size_t len, H5std_string& attr_name) const
+// ssize_t Attribute::getName(size_t len, H5std_string& attr_name) const
//{
// return (getName(attr_name, len));
//}
@@ -460,7 +444,8 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// function should have no failure. (from SLU)
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-hsize_t Attribute::getStorageSize() const
+hsize_t
+Attribute::getStorageSize() const
{
hsize_t storage_size = H5Aget_storage_size(id);
return (storage_size);
@@ -482,11 +467,11 @@ hsize_t Attribute::getStorageSize() const
// Mar 2013 - BMR
// Duplicated from H5Location
//--------------------------------------------------------------------------
-void Attribute::flush(H5F_scope_t scope) const
+void
+Attribute::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::flush", "H5Fflush failed");
}
}
@@ -502,9 +487,10 @@ void Attribute::flush(H5F_scope_t scope) const
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t Attribute::getId() const
+hid_t
+Attribute::getId() const
{
- return(id);
+ return (id);
}
//--------------------------------------------------------------------------
@@ -516,13 +502,13 @@ hid_t Attribute::getId() const
// This private function is used in AbstractDs.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hid_t Attribute::p_get_type() const
+hid_t
+Attribute::p_get_type() const
{
hid_t type_id = H5Aget_type(id);
- if(type_id > 0)
- return(type_id);
- else
- {
+ if (type_id > 0)
+ return (type_id);
+ else {
throw AttributeIException("", "H5Aget_type failed");
}
}
@@ -539,7 +525,8 @@ hid_t Attribute::p_get_type() const
// Separated the fixed length case from the original
// Attribute::read
//--------------------------------------------------------------------------
-void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const
+void
+Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const
{
// Only allocate for fixed-len string.
@@ -547,19 +534,17 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
size_t attr_size = getInMemDataSize();
// If there is data, allocate buffer and read it.
- if (attr_size > 0)
- {
- char *strg_C = new char[attr_size+1];
+ if (attr_size > 0) {
+ char * strg_C = new char[attr_size + 1];
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
- if(ret_value < 0)
- {
- delete []strg_C; // de-allocate for fixed-len string
+ if (ret_value < 0) {
+ delete[] strg_C; // de-allocate for fixed-len string
throw AttributeIException("Attribute::read", "H5Aread failed");
}
// Get string from the C char* and release resource allocated locally
strg_C[attr_size] = '\0';
- strg = strg_C;
- delete []strg_C;
+ strg = strg_C;
+ delete[] strg_C;
}
}
@@ -575,7 +560,8 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
// Separated the variable length case from the original
// Attribute::read. -BMR
//--------------------------------------------------------------------------
-void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const
+void
+Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) const
{
// Prepare and call C API to read attribute.
char *strg_C;
@@ -583,8 +569,7 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
// Read attribute, no allocation for variable-len string; C library will
herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::read", "H5Aread failed");
}
@@ -606,13 +591,14 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Attribute::p_setId(const hid_t new_id)
+void
+Attribute::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw AttributeIException("Attribute::p_setId", close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -627,7 +613,8 @@ void Attribute::p_setId(const hid_t new_id)
///\exception H5::AttributeIException
// May 2018
//--------------------------------------------------------------------------
-void Attribute::throwException(const H5std_string& func_name, const H5std_string& msg) const
+void
+Attribute::throwException(const H5std_string &func_name, const H5std_string &msg) const
{
throw AttributeIException(inMemFunc(func_name.c_str()), msg);
}
@@ -641,13 +628,12 @@ void Attribute::throwException(const H5std_string& func_name, const H5std_string
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void Attribute::close()
+void
+Attribute::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Aclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw AttributeIException("Attribute::close", "H5Aclose failed");
}
// reset the id
@@ -670,8 +656,8 @@ Attribute::~Attribute()
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
cerr << "Attribute::~Attribute - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index cb07ab7..900b7f7 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,89 +27,99 @@ namespace H5 {
*/
// Inheritance: multiple H5Location/AbstractDs
class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
- public:
+ public:
+ // Copy constructor: makes a copy of an existing Attribute object.
+ Attribute(const Attribute &original);
- // Copy constructor: makes a copy of an existing Attribute object.
- Attribute(const Attribute& original);
+ // Default constructor
+ Attribute();
- // Default constructor
- Attribute();
+ // Creates a copy of an existing attribute using the attribute id
+ Attribute(const hid_t attr_id);
- // Creates a copy of an existing attribute using the attribute id
- Attribute(const hid_t attr_id);
+ // Closes this attribute.
+ virtual void close();
- // Closes this attribute.
- virtual void close();
+ // Gets the name of this attribute.
+ ssize_t getName(char *attr_name, size_t buf_size = 0) const;
+ H5std_string getName(size_t len) const;
+ H5std_string getName() const;
+ ssize_t getName(H5std_string &attr_name, size_t len = 0) const;
+ // The overloaded function below is replaced by the one above and it
+ // is kept for backward compatibility purpose. Removed in 1.8.21.
+ // ssize_t getName(size_t buf_size, H5std_string& attr_name) const;
- // Gets the name of this attribute.
- ssize_t getName(char* attr_name, size_t buf_size = 0) const;
- H5std_string getName(size_t len) const;
- H5std_string getName() const;
- ssize_t getName(H5std_string& attr_name, size_t len = 0) const;
- // The overloaded function below is replaced by the one above and it
- // is kept for backward compatibility purpose. Removed in 1.8.21.
- // ssize_t getName(size_t buf_size, H5std_string& attr_name) const;
+ // Gets a copy of the dataspace for this attribute.
+ virtual DataSpace getSpace() const;
- // Gets a copy of the dataspace for this attribute.
- virtual DataSpace getSpace() const;
+ // Returns the amount of storage size required for this attribute.
+ virtual hsize_t getStorageSize() const;
- // Returns the amount of storage size required for this attribute.
- virtual hsize_t getStorageSize() const;
+ // Returns the in memory size of this attribute's data.
+ virtual size_t getInMemDataSize() const;
- // Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const;
+ // Reads data from this attribute.
+ void read(const DataType &mem_type, void *buf) const;
+ void read(const DataType &mem_type, H5std_string &strg) const;
- // Reads data from this attribute.
- void read(const DataType& mem_type, void *buf) const;
- void read(const DataType& mem_type, H5std_string& strg) const;
+ // Writes data to this attribute.
+ void write(const DataType &mem_type, const void *buf) const;
+ void write(const DataType &mem_type, const H5std_string &strg) const;
- // Writes data to this attribute.
- void write(const DataType& mem_type, const void *buf) const;
- void write(const DataType& mem_type, const H5std_string& strg) const;
+ // Flushes all buffers associated with the file specified by this
+ // attribute to disk.
+ void flush(H5F_scope_t scope) const;
- // Flushes all buffers associated with the file specified by this
- // attribute to disk.
- void flush(H5F_scope_t scope) const;
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("Attribute");
+ }
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("Attribute"); }
+ // Gets the attribute id.
+ virtual hid_t getId() const;
- // Gets the attribute id.
- virtual hid_t getId() const;
+ // Throw group exception.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
- // Throw group exception.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
-
- // Destructor: properly terminates access to this attribute.
- virtual ~Attribute();
+ // Destructor: properly terminates access to this attribute.
+ virtual ~Attribute();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- protected:
- // Sets the attribute id.
- virtual void p_setId(const hid_t new_id);
+ protected:
+ // Sets the attribute id.
+ virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- hid_t id; // HDF5 attribute id
-
- // This function contains the common code that is used by
- // getTypeClass and various API functions getXxxType
- // defined in AbstractDs for generic datatype and specific
- // sub-types
- virtual hid_t p_get_type() const;
-
- // Reads variable or fixed len strings from this attribute.
- void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
- void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
-
- // do not inherit H5Object::iterateAttrs
- int iterateAttrs() { return 0; }
-
- // do not inherit H5Object::renameAttr
- void renameAttr() {}
-
- // Friend function to set Attribute id. For library use only.
- friend void f_Attribute_setId(Attribute* attr, hid_t new_id);
+ private:
+ hid_t id; // HDF5 attribute id
+
+ // This function contains the common code that is used by
+ // getTypeClass and various API functions getXxxType
+ // defined in AbstractDs for generic datatype and specific
+ // sub-types
+ virtual hid_t p_get_type() const;
+
+ // Reads variable or fixed len strings from this attribute.
+ void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
+ void p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const;
+
+ // do not inherit H5Object::iterateAttrs
+ int
+ iterateAttrs()
+ {
+ return 0;
+ }
+
+ // do not inherit H5Object::renameAttr
+ void
+ renameAttr()
+ {
+ }
+
+ // Friend function to set Attribute id. For library use only.
+ friend void f_Attribute_setId(Attribute *attr, hid_t new_id);
}; // end of Attribute
} // namespace H5
diff --git a/c++/src/H5Classes.h b/c++/src/H5Classes.h
index 6baa3d0..f2d7907 100644
--- a/c++/src/H5Classes.h
+++ b/c++/src/H5Classes.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,30 +16,30 @@
#define __H5Classes_H
namespace H5 {
- class Exception;
- class IdComponent;
- class H5Location;
- class H5Object;
- class PropList;
- class FileCreatPropList;
- class FileAccPropList;
- class DSetCreatPropList;
- class DSetMemXferPropList;
- class DTypePropList;
- class DataType;
- class DataSpace;
- class AtomType;
- class PredType;
- class IntType;
- class FloatType;
- class StrType;
- class EnumType;
- class CompType;
- class AbstractDs;
- class DataSet;
- class Group;
- class H5File;
- class Attribute;
- class H5Library;
-}
+class Exception;
+class IdComponent;
+class H5Location;
+class H5Object;
+class PropList;
+class FileCreatPropList;
+class FileAccPropList;
+class DSetCreatPropList;
+class DSetMemXferPropList;
+class DTypePropList;
+class DataType;
+class DataSpace;
+class AtomType;
+class PredType;
+class IntType;
+class FloatType;
+class StrType;
+class EnumType;
+class CompType;
+class AbstractDs;
+class DataSet;
+class Group;
+class H5File;
+class Attribute;
+class H5Library;
+} // namespace H5
#endif // __H5Classes_H
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 314a9fe..a8527e5 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -72,14 +72,14 @@ namespace H5 {
// May 2018 - 1.8.21
// - Added an argument with default value LinkCreatPropList::DEFAULT
//--------------------------------------------------------------------------
-Group CommonFG::createGroup(const char* name, size_t size_hint, const LinkCreatPropList& lcpl) const
+Group
+CommonFG::createGroup(const char *name, size_t size_hint, const LinkCreatPropList &lcpl) const
{
// Group creation property list for size hint
hid_t gcpl_id = 0;
// Set the local heap size hint
- if (size_hint > 0)
- {
+ if (size_hint > 0) {
// If the creation of the property list failed, throw an exception
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
throwException("createGroup", "H5Pcreate failed");
@@ -95,18 +95,18 @@ Group CommonFG::createGroup(const char* name, size_t size_hint, const LinkCreatP
hid_t group_id = H5Gcreate2(getLocId(), name, lcpl.getId(), gcpl_id, H5P_DEFAULT);
// Close the group creation property list, if necessary
- if(gcpl_id > 0)
+ if (gcpl_id > 0)
H5Pclose(gcpl_id);
// If the creation of the group failed, throw an exception
- if(group_id < 0)
+ if (group_id < 0)
throwException("createGroup", "H5Gcreate2 failed");
// No failure, create and return the Group object
- Group group;
+ Group group;
CommonFG *ptr = &group;
ptr->p_setId(group_id);
- return(group);
+ return (group);
}
//--------------------------------------------------------------------------
@@ -118,9 +118,10 @@ Group CommonFG::createGroup(const char* name, size_t size_hint, const LinkCreatP
// May 2018 - 1.8.21
// - Added LinkCreatPropList& with default value LinkCreatPropList::DEFAULT
//--------------------------------------------------------------------------
-Group CommonFG::createGroup(const H5std_string& name, size_t size_hint, const LinkCreatPropList& lcpl) const
+Group
+CommonFG::createGroup(const H5std_string &name, size_t size_hint, const LinkCreatPropList &lcpl) const
{
- return(createGroup(name.c_str(), size_hint, lcpl));
+ return (createGroup(name.c_str(), size_hint, lcpl));
}
//--------------------------------------------------------------------------
@@ -132,21 +133,22 @@ Group CommonFG::createGroup(const H5std_string& name, size_t size_hint, const Li
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group CommonFG::openGroup(const char* name) const
+Group
+CommonFG::openGroup(const char *name) const
{
// Call C routine H5Gopen2 to open the named group, giving the
// location id which can be a file id or a group id
hid_t group_id = H5Gopen2(getLocId(), name, H5P_DEFAULT);
// If the opening of the group failed, throw an exception
- if(group_id < 0)
+ if (group_id < 0)
throwException("openGroup", "H5Gopen2 failed");
// No failure, create and return the Group object
- Group group;
+ Group group;
CommonFG *ptr = &group;
ptr->p_setId(group_id);
- return(group);
+ return (group);
}
//--------------------------------------------------------------------------
@@ -156,9 +158,10 @@ Group CommonFG::openGroup(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group CommonFG::openGroup(const H5std_string& name) const
+Group
+CommonFG::openGroup(const H5std_string &name) const
{
- return(openGroup(name.c_str()));
+ return (openGroup(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -172,24 +175,27 @@ Group CommonFG::openGroup(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet CommonFG::createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const
+DataSet
+CommonFG::createDataSet(const char *name, const DataType &data_type, const DataSpace &data_space,
+ const DSetCreatPropList &create_plist) const
{
// Obtain identifiers for C API
- hid_t type_id = data_type.getId();
- hid_t space_id = data_space.getId();
+ hid_t type_id = data_type.getId();
+ hid_t space_id = data_space.getId();
hid_t create_plist_id = create_plist.getId();
// Call C routine H5Dcreate2 to create the named dataset
- hid_t dataset_id = H5Dcreate2(getLocId(), name, type_id, space_id, H5P_DEFAULT, create_plist_id, H5P_DEFAULT);
+ hid_t dataset_id =
+ H5Dcreate2(getLocId(), name, type_id, space_id, H5P_DEFAULT, create_plist_id, H5P_DEFAULT);
// If the creation of the dataset failed, throw an exception
- if(dataset_id < 0)
+ if (dataset_id < 0)
throwException("createDataSet", "H5Dcreate2 failed");
// No failure, create and return the DataSet object
DataSet dataset;
f_DataSet_setId(&dataset, dataset_id);
- return(dataset);
+ return (dataset);
}
//--------------------------------------------------------------------------
@@ -199,9 +205,11 @@ DataSet CommonFG::createDataSet(const char* name, const DataType& data_type, con
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet CommonFG::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const
+DataSet
+CommonFG::createDataSet(const H5std_string &name, const DataType &data_type, const DataSpace &data_space,
+ const DSetCreatPropList &create_plist) const
{
- return(createDataSet(name.c_str(), data_type, data_space, create_plist));
+ return (createDataSet(name.c_str(), data_type, data_space, create_plist));
}
//--------------------------------------------------------------------------
@@ -212,20 +220,21 @@ DataSet CommonFG::createDataSet(const H5std_string& name, const DataType& data_t
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet CommonFG::openDataSet(const char* name) const
+DataSet
+CommonFG::openDataSet(const char *name) const
{
// Call C function H5Dopen2 to open the specified dataset, giving
// the location id and the dataset's name
hid_t dataset_id = H5Dopen2(getLocId(), name, H5P_DEFAULT);
// If the dataset's opening failed, throw an exception
- if(dataset_id < 0)
+ if (dataset_id < 0)
throwException("openDataSet", "H5Dopen2 failed");
// No failure, create and return the DataSet object
DataSet dataset;
f_DataSet_setId(&dataset, dataset_id);
- return(dataset);
+ return (dataset);
}
//--------------------------------------------------------------------------
@@ -235,9 +244,10 @@ DataSet CommonFG::openDataSet(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet CommonFG::openDataSet(const H5std_string& name) const
+DataSet
+CommonFG::openDataSet(const H5std_string &name) const
{
- return(openDataSet(name.c_str()));
+ return (openDataSet(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -262,13 +272,15 @@ DataSet CommonFG::openDataSet(const H5std_string& name) const
// Modification
// 2007: QAK modified to use H5L APIs - BMR
//--------------------------------------------------------------------------
-void CommonFG::link(H5L_type_t link_type, const char* curr_name, const char* new_name) const
+void
+CommonFG::link(H5L_type_t link_type, const char *curr_name, const char *new_name) const
{
herr_t ret_value = -1;
- switch(link_type) {
+ switch (link_type) {
case H5L_TYPE_HARD:
- ret_value = H5Lcreate_hard(getLocId(), curr_name, H5L_SAME_LOC, new_name, H5P_DEFAULT, H5P_DEFAULT);
+ ret_value =
+ H5Lcreate_hard(getLocId(), curr_name, H5L_SAME_LOC, new_name, H5P_DEFAULT, H5P_DEFAULT);
break;
case H5L_TYPE_SOFT:
@@ -283,7 +295,7 @@ void CommonFG::link(H5L_type_t link_type, const char* curr_name, const char* new
break;
} /* end switch */
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("link", "creating link failed");
}
@@ -294,7 +306,8 @@ void CommonFG::link(H5L_type_t link_type, const char* curr_name, const char* new
/// \c H5std_string for \a curr_name and \a new_name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const
+void
+CommonFG::link(H5L_type_t link_type, const H5std_string &curr_name, const H5std_string &new_name) const
{
link(link_type, curr_name.c_str(), new_name.c_str());
}
@@ -348,10 +361,11 @@ void CommonFG::unlink(const H5std_string& name) const
// 2007: QAK modified to use H5L APIs - BMR
// May 2018: Deprecated in favor of H5Location::moveLink (1.8.21)
//--------------------------------------------------------------------------
-void CommonFG::move(const char* src, const char* dst) const
+void
+CommonFG::move(const char *src, const char *dst) const
{
herr_t ret_value = H5Lmove(getLocId(), src, H5L_SAME_LOC, dst, H5P_DEFAULT, H5P_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("move", "H5Lmove failed");
}
@@ -364,7 +378,8 @@ void CommonFG::move(const char* src, const char* dst) const
// Modification
// May 2018: Deprecated in favor of H5Location::moveLink (1.8.21)
//--------------------------------------------------------------------------
-void CommonFG::move(const H5std_string& src, const H5std_string& dst) const
+void
+CommonFG::move(const H5std_string &src, const H5std_string &dst) const
{
move(src.c_str(), dst.c_str());
}
@@ -383,10 +398,11 @@ void CommonFG::move(const H5std_string& src, const H5std_string& dst) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-GetObjinfo
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const
+void
+CommonFG::getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const
{
herr_t ret_value = H5Gget_objinfo(getLocId(), name, follow_link, &statbuf);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("getObjinfo", "H5Gget_objinfo failed");
}
@@ -397,7 +413,8 @@ void CommonFG::getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& sta
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const
+void
+CommonFG::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const
{
getObjinfo(name.c_str(), follow_link, statbuf);
}
@@ -410,10 +427,11 @@ void CommonFG::getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_sta
// Programmer Binh-Minh Ribler - Nov, 2005
// Note: need to modify to use H5Oget_info and H5Lget_info - BMR
//--------------------------------------------------------------------------
-void CommonFG::getObjinfo(const char* name, H5G_stat_t& statbuf) const
+void
+CommonFG::getObjinfo(const char *name, H5G_stat_t &statbuf) const
{
herr_t ret_value = H5Gget_objinfo(getLocId(), name, 0, &statbuf);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("getObjinfo", "H5Gget_objinfo failed");
}
@@ -424,7 +442,8 @@ void CommonFG::getObjinfo(const char* name, H5G_stat_t& statbuf) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - Nov, 2005
//--------------------------------------------------------------------------
-void CommonFG::getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const
+void
+CommonFG::getObjinfo(const H5std_string &name, H5G_stat_t &statbuf) const
{
getObjinfo(name.c_str(), statbuf);
}
@@ -503,7 +522,8 @@ H5std_string CommonFG::getLinkval(const H5std_string& name, size_t size) const
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void CommonFG::mount(const char* name, const H5File& child, const PropList& plist) const
+void
+CommonFG::mount(const char *name, const H5File &child, const PropList &plist) const
{
// Obtain identifiers for C API
hid_t plist_id = plist.getId();
@@ -513,7 +533,7 @@ void CommonFG::mount(const char* name, const H5File& child, const PropList& plis
herr_t ret_value = H5Fmount(getLocId(), name, child_id, plist_id);
// Raise exception if H5Fmount returns negative value
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("mount", "H5Fmount failed");
}
@@ -525,7 +545,8 @@ void CommonFG::mount(const char* name, const H5File& child, const PropList& plis
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void CommonFG::mount(const H5std_string& name, const H5File& child, const PropList& plist) const
+void
+CommonFG::mount(const H5std_string &name, const H5File &child, const PropList &plist) const
{
mount(name.c_str(), child, plist);
}
@@ -537,13 +558,14 @@ void CommonFG::mount(const H5std_string& name, const H5File& child, const PropLi
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::unmount(const char* name) const
+void
+CommonFG::unmount(const char *name) const
{
// Call C routine H5Fmount to do the mouting
herr_t ret_value = H5Funmount(getLocId(), name);
// Raise exception if H5Funmount returns negative value
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("unmount", "H5Funmount failed");
}
@@ -554,7 +576,8 @@ void CommonFG::unmount(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::unmount(const H5std_string& name) const
+void
+CommonFG::unmount(const H5std_string &name) const
{
unmount(name.c_str());
}
@@ -567,20 +590,21 @@ void CommonFG::unmount(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType CommonFG::openDataType(const char* name) const
+DataType
+CommonFG::openDataType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openDataType", "H5Topen2 failed");
// No failure, create and return the DataType object
DataType data_type;
f_DataType_setId(&data_type, type_id);
- return(data_type);
+ return (data_type);
}
//--------------------------------------------------------------------------
@@ -590,9 +614,10 @@ DataType CommonFG::openDataType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType CommonFG::openDataType(const H5std_string& name) const
+DataType
+CommonFG::openDataType(const H5std_string &name) const
{
- return(openDataType(name.c_str()));
+ return (openDataType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -603,20 +628,21 @@ DataType CommonFG::openDataType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-ArrayType CommonFG::openArrayType(const char* name) const
+ArrayType
+CommonFG::openArrayType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openArrayType", "H5Topen2 failed");
// No failure, create and return the ArrayType object
ArrayType array_type;
f_DataType_setId(&array_type, type_id);
- return(array_type);
+ return (array_type);
}
//--------------------------------------------------------------------------
@@ -626,9 +652,10 @@ ArrayType CommonFG::openArrayType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-ArrayType CommonFG::openArrayType(const H5std_string& name) const
+ArrayType
+CommonFG::openArrayType(const H5std_string &name) const
{
- return(openArrayType(name.c_str()));
+ return (openArrayType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -639,20 +666,21 @@ ArrayType CommonFG::openArrayType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-CompType CommonFG::openCompType(const char* name) const
+CompType
+CommonFG::openCompType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openCompType", "H5Topen2 failed");
// No failure, create and return the CompType object
CompType comp_type;
f_DataType_setId(&comp_type, type_id);
- return(comp_type);
+ return (comp_type);
}
//--------------------------------------------------------------------------
@@ -662,9 +690,10 @@ CompType CommonFG::openCompType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-CompType CommonFG::openCompType(const H5std_string& name) const
+CompType
+CommonFG::openCompType(const H5std_string &name) const
{
- return(openCompType(name.c_str()));
+ return (openCompType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -675,20 +704,21 @@ CompType CommonFG::openCompType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType CommonFG::openEnumType(const char* name) const
+EnumType
+CommonFG::openEnumType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openEnumType", "H5Topen2 failed");
// No failure, create and return the EnumType object
EnumType enum_type;
f_DataType_setId(&enum_type, type_id);
- return(enum_type);
+ return (enum_type);
}
//--------------------------------------------------------------------------
@@ -698,9 +728,10 @@ EnumType CommonFG::openEnumType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType CommonFG::openEnumType(const H5std_string& name) const
+EnumType
+CommonFG::openEnumType(const H5std_string &name) const
{
- return(openEnumType(name.c_str()));
+ return (openEnumType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -711,20 +742,21 @@ EnumType CommonFG::openEnumType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType CommonFG::openIntType(const char* name) const
+IntType
+CommonFG::openIntType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openIntType", "H5Topen2 failed");
// No failure, create and return the IntType object
IntType int_type;
f_DataType_setId(&int_type, type_id);
- return(int_type);
+ return (int_type);
}
//--------------------------------------------------------------------------
@@ -734,9 +766,10 @@ IntType CommonFG::openIntType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType CommonFG::openIntType(const H5std_string& name) const
+IntType
+CommonFG::openIntType(const H5std_string &name) const
{
- return(openIntType(name.c_str()));
+ return (openIntType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -747,20 +780,21 @@ IntType CommonFG::openIntType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType CommonFG::openFloatType(const char* name) const
+FloatType
+CommonFG::openFloatType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openFloatType", "H5Topen2 failed");
// No failure, create and return the FloatType object
FloatType float_type;
f_DataType_setId(&float_type, type_id);
- return(float_type);
+ return (float_type);
}
//--------------------------------------------------------------------------
@@ -770,9 +804,10 @@ FloatType CommonFG::openFloatType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType CommonFG::openFloatType(const H5std_string& name) const
+FloatType
+CommonFG::openFloatType(const H5std_string &name) const
{
- return(openFloatType(name.c_str()));
+ return (openFloatType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -783,20 +818,21 @@ FloatType CommonFG::openFloatType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType CommonFG::openStrType(const char* name) const
+StrType
+CommonFG::openStrType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openStrType", "H5Topen2 failed");
// No failure, create and return the StrType object
StrType str_type;
f_DataType_setId(&str_type, type_id);
- return(str_type);
+ return (str_type);
}
//--------------------------------------------------------------------------
@@ -806,9 +842,10 @@ StrType CommonFG::openStrType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType CommonFG::openStrType(const H5std_string& name) const
+StrType
+CommonFG::openStrType(const H5std_string &name) const
{
- return(openStrType(name.c_str()));
+ return (openStrType(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -819,20 +856,21 @@ StrType CommonFG::openStrType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-VarLenType CommonFG::openVarLenType(const char* name) const
+VarLenType
+CommonFG::openVarLenType(const char *name) const
{
// Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
- if(type_id < 0)
+ if (type_id < 0)
throwException("openVarLenType", "H5Topen2 failed");
// No failure, create and return the VarLenType object
VarLenType varlen_type;
f_DataType_setId(&varlen_type, type_id);
- return(varlen_type);
+ return (varlen_type);
}
//--------------------------------------------------------------------------
@@ -842,9 +880,10 @@ VarLenType CommonFG::openVarLenType(const char* name) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-VarLenType CommonFG::openVarLenType(const H5std_string& name) const
+VarLenType
+CommonFG::openVarLenType(const H5std_string &name) const
{
- return(openVarLenType(name.c_str()));
+ return (openVarLenType(name.c_str()));
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -861,14 +900,14 @@ VarLenType CommonFG::openVarLenType(const H5std_string& name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int CommonFG::iterateElems(const char* name, int *idx, H5G_iterate_t op , void* op_data)
+int
+CommonFG::iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_data)
{
int ret_value = H5Giterate(getLocId(), name, idx, op, op_data);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("iterateElems", "H5Giterate failed");
}
- return(ret_value);
+ return (ret_value);
}
//--------------------------------------------------------------------------
@@ -878,9 +917,10 @@ int CommonFG::iterateElems(const char* name, int *idx, H5G_iterate_t op , void*
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int CommonFG::iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op , void* op_data)
+int
+CommonFG::iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, void *op_data)
{
- return(iterateElems(name.c_str(), idx, op, op_data));
+ return (iterateElems(name.c_str(), idx, op, op_data));
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -891,12 +931,13 @@ int CommonFG::iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
-hsize_t CommonFG::getNumObjs() const
+hsize_t
+CommonFG::getNumObjs() const
{
- H5G_info_t ginfo; /* Group information */
+ H5G_info_t ginfo; /* Group information */
herr_t ret_value = H5Gget_info(getLocId(), &ginfo);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("getNumObjs", "H5Gget_info failed");
return (ginfo.nlinks);
}
@@ -916,28 +957,30 @@ hsize_t CommonFG::getNumObjs() const
/// each time the group is opened.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
+H5std_string
+CommonFG::getObjnameByIdx(hsize_t idx) const
{
// call H5Lget_name_by_idx with name as NULL to get its length
- ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
- if(name_len < 0)
+ ssize_t name_len =
+ H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
+ if (name_len < 0)
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
// now, allocate C buffer to get the name
- char* name_C = new char[name_len+1];
- HDmemset(name_C, 0, name_len+1); // clear buffer
+ char *name_C = new char[name_len + 1];
+ HDmemset(name_C, 0, name_len + 1); // clear buffer
- name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len+1, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len + 1,
+ H5P_DEFAULT);
- if (name_len < 0)
- {
- delete []name_C;
+ if (name_len < 0) {
+ delete[] name_C;
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// clean up and return the string
H5std_string name = H5std_string(name_C);
- delete []name_C;
+ delete[] name_C;
return (name);
}
@@ -958,10 +1001,12 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
/// each time the group is opened.
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
-ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
+ssize_t
+CommonFG::getObjnameByIdx(hsize_t idx, char *name, size_t size) const
{
- ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT);
- if(name_len < 0)
+ ssize_t name_len =
+ H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT);
+ if (name_len < 0)
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
return (name_len);
@@ -974,22 +1019,22 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
-ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const
+ssize_t
+CommonFG::getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const
{
- char* name_C = new char[size+1]; // temporary C-string for object name
- HDmemset(name_C, 0, size+1); // clear buffer
+ char *name_C = new char[size + 1]; // temporary C-string for object name
+ HDmemset(name_C, 0, size + 1); // clear buffer
// call overloaded function to get the name
- ssize_t name_len = getObjnameByIdx(idx, name_C, size+1);
- if(name_len < 0)
- {
- delete []name_C;
+ ssize_t name_len = getObjnameByIdx(idx, name_C, size + 1);
+ if (name_len < 0) {
+ delete[] name_C;
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// clean up and return the string
name = H5std_string(name_C);
- delete []name_C;
+ delete[] name_C;
return (name_len);
}
@@ -1011,7 +1056,8 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size)
/// - object type is not one of the valid values above
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
-H5O_type_t CommonFG::childObjType(const char* objname) const
+H5O_type_t
+CommonFG::childObjType(const char *objname) const
{
H5O_info_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
@@ -1024,19 +1070,18 @@ H5O_type_t CommonFG::childObjType(const char* objname) const
throwException("childObjType", "H5Oget_info_by_name failed");
// Return a valid type or throw an exception for unknown type
else
- switch (objinfo.type)
- {
- case H5O_TYPE_GROUP:
- case H5O_TYPE_DATASET:
- case H5O_TYPE_NAMED_DATATYPE:
- objtype = objinfo.type;
- break;
- case H5O_TYPE_UNKNOWN:
- case H5O_TYPE_NTYPES:
- default:
- throwException("childObjType", "Unknown type of object");
+ switch (objinfo.type) {
+ case H5O_TYPE_GROUP:
+ case H5O_TYPE_DATASET:
+ case H5O_TYPE_NAMED_DATATYPE:
+ objtype = objinfo.type;
+ break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
+ default:
+ throwException("childObjType", "Unknown type of object");
}
- return(objtype);
+ return (objtype);
}
//--------------------------------------------------------------------------
@@ -1049,11 +1094,12 @@ H5O_type_t CommonFG::childObjType(const char* objname) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
-H5O_type_t CommonFG::childObjType(const H5std_string& objname) const
+H5O_type_t
+CommonFG::childObjType(const H5std_string &objname) const
{
// Use overloaded function
H5O_type_t objtype = childObjType(objname.c_str());
- return(objtype);
+ return (objtype);
}
//--------------------------------------------------------------------------
@@ -1085,9 +1131,10 @@ H5O_type_t CommonFG::childObjType(const H5std_string& objname) const
// can be added later when needed.
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
-H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char* objname) const
+H5O_type_t
+CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char *objname) const
{
- herr_t ret_value;
+ herr_t ret_value;
H5O_info_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
@@ -1099,19 +1146,18 @@ H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_
throwException("childObjType", "H5Oget_info_by_idx failed");
// Return a valid type or throw an exception for unknown type
else
- switch (objinfo.type)
- {
- case H5O_TYPE_GROUP:
- case H5O_TYPE_DATASET:
- case H5O_TYPE_NAMED_DATATYPE:
- objtype = objinfo.type;
- break;
- case H5O_TYPE_UNKNOWN:
- case H5O_TYPE_NTYPES:
- default:
- throwException("childObjType", "Unknown type of object");
+ switch (objinfo.type) {
+ case H5O_TYPE_GROUP:
+ case H5O_TYPE_DATASET:
+ case H5O_TYPE_NAMED_DATATYPE:
+ objtype = objinfo.type;
+ break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
+ default:
+ throwException("childObjType", "Unknown type of object");
}
- return(objtype);
+ return (objtype);
}
//--------------------------------------------------------------------------
@@ -1128,10 +1174,11 @@ H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_
/// - version number is not one of the valid values above
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
-unsigned CommonFG::childObjVersion(const char* objname) const
+unsigned
+CommonFG::childObjVersion(const char *objname) const
{
H5O_info_t objinfo;
- unsigned version = 0;
+ unsigned version = 0;
// Use C API to get information of the object
herr_t ret_value = H5Oget_info_by_name(getLocId(), objname, &objinfo, H5P_DEFAULT);
@@ -1140,13 +1187,12 @@ unsigned CommonFG::childObjVersion(const char* objname) const
if (ret_value < 0)
throwException("childObjVersion", "H5Oget_info_by_name failed");
// Return a valid version or throw an exception for invalid value
- else
- {
+ else {
version = objinfo.hdr.version;
if (version != H5O_VERSION_1 && version != H5O_VERSION_2)
throwException("childObjVersion", "Invalid version for object");
}
- return(version);
+ return (version);
}
//--------------------------------------------------------------------------
@@ -1159,11 +1205,12 @@ unsigned CommonFG::childObjVersion(const char* objname) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
-unsigned CommonFG::childObjVersion(const H5std_string& objname) const
+unsigned
+CommonFG::childObjVersion(const H5std_string &objname) const
{
// Use overloaded function
unsigned version = childObjVersion(objname.c_str());
- return(version);
+ return (version);
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1177,7 +1224,8 @@ unsigned CommonFG::childObjVersion(const H5std_string& objname) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
-H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
+H5G_obj_t
+CommonFG::getObjTypeByIdx(hsize_t idx) const
{
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
if (obj_type == H5G_UNKNOWN)
@@ -1199,10 +1247,11 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
// Modification
// Modified to use the other function. -BMR, 2016/03/07
//--------------------------------------------------------------------------
-H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
+H5G_obj_t
+CommonFG::getObjTypeByIdx(hsize_t idx, char *type_name) const
{
H5std_string stype_name(type_name);
- return(getObjTypeByIdx(idx, stype_name));
+ return (getObjTypeByIdx(idx, stype_name));
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
@@ -1215,15 +1264,23 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
-H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
+H5G_obj_t
+CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const
{
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
- switch (obj_type)
- {
- case H5G_LINK: type_name = H5std_string("symbolic link"); break;
- case H5G_GROUP: type_name = H5std_string("group"); break;
- case H5G_DATASET: type_name = H5std_string("dataset"); break;
- case H5G_TYPE: type_name = H5std_string("datatype"); break;
+ switch (obj_type) {
+ case H5G_LINK:
+ type_name = H5std_string("symbolic link");
+ break;
+ case H5G_GROUP:
+ type_name = H5std_string("group");
+ break;
+ case H5G_DATASET:
+ type_name = H5std_string("dataset");
+ break;
+ case H5G_TYPE:
+ type_name = H5std_string("datatype");
+ break;
case H5G_UNKNOWN:
case H5G_UDLINK:
case H5G_RESERVED_5:
@@ -1263,7 +1320,8 @@ CommonFG::~CommonFG() {}
// param new_id - IN: New id to set
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void f_DataType_setId(DataType* dtype, hid_t new_id)
+void
+f_DataType_setId(DataType *dtype, hid_t new_id)
{
dtype->p_setId(new_id);
}
@@ -1278,11 +1336,12 @@ void f_DataType_setId(DataType* dtype, hid_t new_id)
// param new_id - IN: New id to set
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void f_DataSet_setId(DataSet* dset, hid_t new_id)
+void
+f_DataSet_setId(DataSet *dset, hid_t new_id)
{
dset->p_setId(new_id);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index fa08263..a0b2a69 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,145 +27,149 @@ class ArrayType;
class VarLenType;
class H5_DLLCPP CommonFG {
- public:
- // Creates a new group at this location which can be a file
- // or another group.
- Group createGroup(const char* name, size_t size_hint = 0, const LinkCreatPropList& lc_plist = LinkCreatPropList::DEFAULT) const;
- Group createGroup(const H5std_string& name, size_t size_hint = 0, const LinkCreatPropList& lc_plist = LinkCreatPropList::DEFAULT) const;
-
- // Opens an existing group in a location which can be a file
- // or another group.
- Group openGroup(const char* name) const;
- Group openGroup(const H5std_string& name) const;
-
- // Creates a new dataset at this location.
- DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
- DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
-
- // Opens an existing dataset at this location.
- DataSet openDataSet(const char* name) const;
- DataSet openDataSet(const H5std_string& name) const;
-
- // Returns the value of a symbolic link.
- // Moved to H5Location in 1.8.21.
- //H5std_string getLinkval(const char* link_name, size_t size=0) const;
- //H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
-
- // Returns the number of objects in this group.
- hsize_t getNumObjs() const;
-
- // Retrieves the name of an object in this group, given the
- // object's index.
- H5std_string getObjnameByIdx(hsize_t idx) const;
- ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
- ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
-
- // Retrieves the type of an object in this file or group, given the
- // object's name
- H5O_type_t childObjType(const H5std_string& objname) const;
- H5O_type_t childObjType(const char* objname) const;
- H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
-
- // Returns the object header version of an object in this file or group,
- // given the object's name.
- unsigned childObjVersion(const char* objname) const;
- unsigned childObjVersion(const H5std_string& objname) const;
+ public:
+ // Creates a new group at this location which can be a file
+ // or another group.
+ Group createGroup(const char *name, size_t size_hint = 0,
+ const LinkCreatPropList &lc_plist = LinkCreatPropList::DEFAULT) const;
+ Group createGroup(const H5std_string &name, size_t size_hint = 0,
+ const LinkCreatPropList &lc_plist = LinkCreatPropList::DEFAULT) const;
+
+ // Opens an existing group in a location which can be a file
+ // or another group.
+ Group openGroup(const char *name) const;
+ Group openGroup(const H5std_string &name) const;
+
+ // Creates a new dataset at this location.
+ DataSet createDataSet(const char *name, const DataType &data_type, const DataSpace &data_space,
+ const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT) const;
+ DataSet createDataSet(const H5std_string &name, const DataType &data_type, const DataSpace &data_space,
+ const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT) const;
+
+ // Opens an existing dataset at this location.
+ DataSet openDataSet(const char *name) const;
+ DataSet openDataSet(const H5std_string &name) const;
+
+ // Returns the value of a symbolic link.
+ // Moved to H5Location in 1.8.21.
+ // H5std_string getLinkval(const char* link_name, size_t size=0) const;
+ // H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
+
+ // Returns the number of objects in this group.
+ hsize_t getNumObjs() const;
+
+ // Retrieves the name of an object in this group, given the
+ // object's index.
+ H5std_string getObjnameByIdx(hsize_t idx) const;
+ ssize_t getObjnameByIdx(hsize_t idx, char *name, size_t size) const;
+ ssize_t getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const;
+
+ // Retrieves the type of an object in this file or group, given the
+ // object's name
+ H5O_type_t childObjType(const H5std_string &objname) const;
+ H5O_type_t childObjType(const char *objname) const;
+ H5O_type_t childObjType(hsize_t index, H5_index_t index_type = H5_INDEX_NAME,
+ H5_iter_order_t order = H5_ITER_INC, const char *objname = ".") const;
+
+ // Returns the object header version of an object in this file or group,
+ // given the object's name.
+ unsigned childObjVersion(const char *objname) const;
+ unsigned childObjVersion(const H5std_string &objname) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Returns the type of an object in this group, given the
- // object's index.
- H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
- H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
- H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
-
- // Returns information about an HDF5 object, given by its name,
- // at this location.
- void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
- void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
- void getObjinfo(const char* name, H5G_stat_t& statbuf) const;
- void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const;
-
- // Iterates over the elements of this group - not implemented in
- // C++ style yet.
- int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
- int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data);
+ // Returns the type of an object in this group, given the
+ // object's index.
+ H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
+ H5G_obj_t getObjTypeByIdx(hsize_t idx, char *type_name) const;
+ H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const;
+
+ // Returns information about an HDF5 object, given by its name,
+ // at this location.
+ void getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const;
+ void getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const;
+ void getObjinfo(const char *name, H5G_stat_t &statbuf) const;
+ void getObjinfo(const H5std_string &name, H5G_stat_t &statbuf) const;
+
+ // Iterates over the elements of this group - not implemented in
+ // C++ style yet.
+ int iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_data);
+ int iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, void *op_data);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Creates a link of the specified type from new_name to current_name;
- // both names are interpreted relative to the specified location id.
- // Deprecated in favor of H5Location::link overloaded (1.8.21)
- void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const;
- void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const;
+ // Creates a link of the specified type from new_name to current_name;
+ // both names are interpreted relative to the specified location id.
+ // Deprecated in favor of H5Location::link overloaded (1.8.21)
+ void link(H5L_type_t link_type, const char *curr_name, const char *new_name) const;
+ void link(H5L_type_t link_type, const H5std_string &curr_name, const H5std_string &new_name) const;
- // Removes the specified name at this location.
- // Deprecated in favor of H5Location::unlink overloaded (1.8.21)
- // These functions can be removed immediately because their replacements
- // have a default argument out of two.
- //void unlink(const char* name) const;
- //void unlink(const H5std_string& name) const;
+ // Removes the specified name at this location.
+ // Deprecated in favor of H5Location::unlink overloaded (1.8.21)
+ // These functions can be removed immediately because their replacements
+ // have a default argument out of two.
+ // void unlink(const char* name) const;
+ // void unlink(const H5std_string& name) const;
- // Mounts the file 'child' onto this location.
- void mount(const char* name, const H5File& child, const PropList& plist) const;
- void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
+ // Mounts the file 'child' onto this location.
+ void mount(const char *name, const H5File &child, const PropList &plist) const;
+ void mount(const H5std_string &name, const H5File &child, const PropList &plist) const;
- // Unmounts the file named 'name' from this parent location.
- void unmount(const char* name) const;
- void unmount(const H5std_string& name) const;
+ // Unmounts the file named 'name' from this parent location.
+ void unmount(const char *name) const;
+ void unmount(const H5std_string &name) const;
- // Renames an object at this location.
- // Deprecated in favor of H5Location::moveLink (1.8.21)
- void move(const char* src, const char* dst) const;
- void move(const H5std_string& src, const H5std_string& dst) const;
+ // Renames an object at this location.
+ // Deprecated in favor of H5Location::moveLink (1.8.21)
+ void move(const char *src, const char *dst) const;
+ void move(const H5std_string &src, const H5std_string &dst) const;
- // Opens a generic named datatype in this location.
- DataType openDataType(const char* name) const;
- DataType openDataType(const H5std_string& name) const;
+ // Opens a generic named datatype in this location.
+ DataType openDataType(const char *name) const;
+ DataType openDataType(const H5std_string &name) const;
- // Opens a named array datatype in this location.
- ArrayType openArrayType(const char* name) const;
- ArrayType openArrayType(const H5std_string& name) const;
+ // Opens a named array datatype in this location.
+ ArrayType openArrayType(const char *name) const;
+ ArrayType openArrayType(const H5std_string &name) const;
- // Opens a named compound datatype in this location.
- CompType openCompType(const char* name) const;
- CompType openCompType(const H5std_string& name) const;
+ // Opens a named compound datatype in this location.
+ CompType openCompType(const char *name) const;
+ CompType openCompType(const H5std_string &name) const;
- // Opens a named enumeration datatype in this location.
- EnumType openEnumType(const char* name) const;
- EnumType openEnumType(const H5std_string& name) const;
+ // Opens a named enumeration datatype in this location.
+ EnumType openEnumType(const char *name) const;
+ EnumType openEnumType(const H5std_string &name) const;
- // Opens a named integer datatype in this location.
- IntType openIntType(const char* name) const;
- IntType openIntType(const H5std_string& name) const;
+ // Opens a named integer datatype in this location.
+ IntType openIntType(const char *name) const;
+ IntType openIntType(const H5std_string &name) const;
- // Opens a named floating-point datatype in this location.
- FloatType openFloatType(const char* name) const;
- FloatType openFloatType(const H5std_string& name) const;
+ // Opens a named floating-point datatype in this location.
+ FloatType openFloatType(const char *name) const;
+ FloatType openFloatType(const H5std_string &name) const;
- // Opens a named string datatype in this location.
- StrType openStrType(const char* name) const;
- StrType openStrType(const H5std_string& name) const;
+ // Opens a named string datatype in this location.
+ StrType openStrType(const char *name) const;
+ StrType openStrType(const H5std_string &name) const;
- // Opens a named variable length datatype in this location.
- VarLenType openVarLenType(const char* name) const;
- VarLenType openVarLenType(const H5std_string& name) const;
+ // Opens a named variable length datatype in this location.
+ VarLenType openVarLenType(const char *name) const;
+ VarLenType openVarLenType(const H5std_string &name) const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- /// For subclasses, H5File and Group, to return the correct
- /// object id, i.e. file or group id.
- virtual hid_t getLocId() const = 0;
+ /// For subclasses, H5File and Group, to return the correct
+ /// object id, i.e. file or group id.
+ virtual hid_t getLocId() const = 0;
+ /// For subclasses, H5File and Group, to throw appropriate exception.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const = 0;
- /// For subclasses, H5File and Group, to throw appropriate exception.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
+ // Default constructor.
+ CommonFG();
- // Default constructor.
- CommonFG();
+ // Noop destructor.
+ virtual ~CommonFG();
- // Noop destructor.
- virtual ~CommonFG();
-
- protected:
- virtual void p_setId(const hid_t new_id) = 0;
+ protected:
+ virtual void p_setId(const hid_t new_id) = 0;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 5ff610e..e630c06 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -43,7 +43,7 @@ CompType::CompType() : DataType() {}
///\param original - IN: Original CompType instance
// 2000
//--------------------------------------------------------------------------
-CompType::CompType(const CompType& original) : DataType(original) {}
+CompType::CompType(const CompType &original) : DataType(original) {}
//--------------------------------------------------------------------------
// Function: CompType overloaded constructor
@@ -73,14 +73,13 @@ CompType::CompType(size_t size) : DataType(H5T_COMPOUND, size) {}
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-CompType::CompType(const DataSet& dataset) : DataType()
+CompType::CompType(const DataSet &dataset) : DataType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
// If the datatype id is invalid, throw exception
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("CompType constructor", "H5Dget_type failed");
}
}
@@ -99,7 +98,7 @@ CompType::CompType(const DataSet& dataset) : DataType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-CompType::CompType(const H5Location& loc, const char *type_name) : DataType()
+CompType::CompType(const H5Location &loc, const char *type_name) : DataType()
{
id = p_opentype(loc, type_name);
}
@@ -118,7 +117,7 @@ CompType::CompType(const H5Location& loc, const char *type_name) : DataType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-CompType::CompType(const H5Location& loc, const H5std_string& type_name) : DataType()
+CompType::CompType(const H5Location &loc, const H5std_string &type_name) : DataType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -130,7 +129,8 @@ CompType::CompType(const H5Location& loc, const H5std_string& type_name) : DataT
///\exception H5::DataTypeIException
// Sept 2017
//--------------------------------------------------------------------------
-DataType* CompType::decode() const
+DataType *
+CompType::decode() const
{
hid_t encoded_cmptype_id = H5I_INVALID_HID;
try {
@@ -141,7 +141,7 @@ DataType* CompType::decode() const
}
CompType *encoded_cmptype = new CompType;
encoded_cmptype->p_setId(encoded_cmptype_id);
- return(encoded_cmptype);
+ return (encoded_cmptype);
}
//--------------------------------------------------------------------------
@@ -151,15 +151,15 @@ DataType* CompType::decode() const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-int CompType::getNmembers() const
+int
+CompType::getNmembers() const
{
int num_members = H5Tget_nmembers(id);
- if(num_members < 0)
- {
+ if (num_members < 0) {
throw DataTypeIException("CompType::getNmembers",
- "H5Tget_nmembers returns negative number of members");
+ "H5Tget_nmembers returns negative number of members");
}
- return(num_members);
+ return (num_members);
}
//--------------------------------------------------------------------------
@@ -170,17 +170,18 @@ int CompType::getNmembers() const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-H5std_string CompType::getMemberName(unsigned member_num) const
+H5std_string
+CompType::getMemberName(unsigned member_num) const
{
- char* member_name_C = H5Tget_member_name(id, member_num);
- if(member_name_C == NULL) // NULL means failure
+ char *member_name_C = H5Tget_member_name(id, member_num);
+ if (member_name_C == NULL) // NULL means failure
{
throw DataTypeIException("CompType::getMemberName",
- "H5Tget_member_name returns NULL for member name");
+ "H5Tget_member_name returns NULL for member name");
}
H5std_string member_name = H5std_string(member_name_C); // convert C string to string
- H5free_memory(member_name_C); // free the C string
- return(member_name); // return the member name string
+ H5free_memory(member_name_C); // free the C string
+ return (member_name); // return the member name string
}
//--------------------------------------------------------------------------
@@ -195,15 +196,14 @@ H5std_string CompType::getMemberName(unsigned member_num) const
/// function \c CompType::getNmembers.
// May 2002
//--------------------------------------------------------------------------
-int CompType::getMemberIndex(const char* name) const
+int
+CompType::getMemberIndex(const char *name) const
{
int member_index = H5Tget_member_index(id, name);
- if(member_index < 0)
- {
- throw DataTypeIException("CompType::getMemberIndex",
- "H5Tget_member_index returns negative value");
+ if (member_index < 0) {
+ throw DataTypeIException("CompType::getMemberIndex", "H5Tget_member_index returns negative value");
}
- return(member_index);
+ return (member_index);
}
//--------------------------------------------------------------------------
@@ -220,9 +220,10 @@ int CompType::getMemberIndex(const char* name) const
/// function \c CompType::getNmembers.
// Apr 2018
//--------------------------------------------------------------------------
-int CompType::getMemberIndex(const H5std_string& name) const
+int
+CompType::getMemberIndex(const H5std_string &name) const
{
- return(getMemberIndex(name.c_str()));
+ return (getMemberIndex(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -240,10 +241,11 @@ int CompType::getMemberIndex(const H5std_string& name) const
// Note that byte offset being returned as 0 doesn't indicate
// a failure.
//--------------------------------------------------------------------------
-size_t CompType::getMemberOffset(unsigned member_num) const
+size_t
+CompType::getMemberOffset(unsigned member_num) const
{
size_t offset = H5Tget_member_offset(id, member_num);
- return(offset);
+ return (offset);
}
//--------------------------------------------------------------------------
@@ -256,29 +258,28 @@ size_t CompType::getMemberOffset(unsigned member_num) const
// Modification
// Modified to use H5Tget_member_class instead. - Jul, 2005
//--------------------------------------------------------------------------
-H5T_class_t CompType::getMemberClass(unsigned member_num) const
+H5T_class_t
+CompType::getMemberClass(unsigned member_num) const
{
H5T_class_t member_class = H5Tget_member_class(id, member_num);
- if(member_class == H5T_NO_CLASS)
- {
- throw DataTypeIException("CompType::getMemberClass",
- "H5Tget_member_class returns H5T_NO_CLASS");
+ if (member_class == H5T_NO_CLASS) {
+ throw DataTypeIException("CompType::getMemberClass", "H5Tget_member_class returns H5T_NO_CLASS");
}
- return(member_class);
+ return (member_class);
}
// This private member function calls the C API to get the identifier
// of the specified member. It provides the id to construct appropriate
// sub-types in the functions getMemberXxxType below, where Xxx indicates
// the sub-types.
-hid_t CompType::p_get_member_type(unsigned member_num) const
+hid_t
+CompType::p_get_member_type(unsigned member_num) const
{
// get the id of the specified member first
hid_t member_type_id = H5Tget_member_type(id, member_num);
- if(member_type_id > 0)
- return(member_type_id);
- else
- {
+ if (member_type_id > 0)
+ return (member_type_id);
+ else {
// p_get_member_type is private, caller will catch this exception
// then throw another with appropriate API name
throw DataTypeIException("", "H5Tget_member_type failed");
@@ -294,14 +295,15 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-DataType CompType::getMemberDataType(unsigned member_num) const
+DataType
+CompType::getMemberDataType(unsigned member_num) const
{
try {
DataType datatype;
f_DataType_setId(&datatype, p_get_member_type(member_num));
- return(datatype);
+ return (datatype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
}
}
@@ -315,14 +317,15 @@ DataType CompType::getMemberDataType(unsigned member_num) const
///\exception H5::DataTypeIException
// Jul 2005
//--------------------------------------------------------------------------
-ArrayType CompType::getMemberArrayType(unsigned member_num) const
+ArrayType
+CompType::getMemberArrayType(unsigned member_num) const
{
try {
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_member_type(member_num));
- return(arraytype);
+ return (arraytype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberArrayType", E.getDetailMsg());
}
}
@@ -336,14 +339,15 @@ ArrayType CompType::getMemberArrayType(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-CompType CompType::getMemberCompType(unsigned member_num) const
+CompType
+CompType::getMemberCompType(unsigned member_num) const
{
try {
CompType comptype;
f_DataType_setId(&comptype, p_get_member_type(member_num));
- return(comptype);
+ return (comptype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberCompType", E.getDetailMsg());
}
}
@@ -357,14 +361,15 @@ CompType CompType::getMemberCompType(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-EnumType CompType::getMemberEnumType(unsigned member_num) const
+EnumType
+CompType::getMemberEnumType(unsigned member_num) const
{
try {
EnumType enumtype;
f_DataType_setId(&enumtype, p_get_member_type(member_num));
- return(enumtype);
+ return (enumtype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberEnumType", E.getDetailMsg());
}
}
@@ -378,14 +383,15 @@ EnumType CompType::getMemberEnumType(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-IntType CompType::getMemberIntType(unsigned member_num) const
+IntType
+CompType::getMemberIntType(unsigned member_num) const
{
try {
IntType inttype;
f_DataType_setId(&inttype, p_get_member_type(member_num));
- return(inttype);
+ return (inttype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberIntType", E.getDetailMsg());
}
}
@@ -399,14 +405,15 @@ IntType CompType::getMemberIntType(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-FloatType CompType::getMemberFloatType(unsigned member_num) const
+FloatType
+CompType::getMemberFloatType(unsigned member_num) const
{
try {
FloatType floatype;
f_DataType_setId(&floatype, p_get_member_type(member_num));
- return(floatype);
+ return (floatype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberFloatType", E.getDetailMsg());
}
}
@@ -420,14 +427,15 @@ FloatType CompType::getMemberFloatType(unsigned member_num) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-StrType CompType::getMemberStrType(unsigned member_num) const
+StrType
+CompType::getMemberStrType(unsigned member_num) const
{
try {
StrType strtype;
f_DataType_setId(&strtype, p_get_member_type(member_num));
- return(strtype);
+ return (strtype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberStrType", E.getDetailMsg());
}
}
@@ -441,14 +449,15 @@ StrType CompType::getMemberStrType(unsigned member_num) const
///\exception H5::DataTypeIException
// Jul 2005
//--------------------------------------------------------------------------
-VarLenType CompType::getMemberVarLenType(unsigned member_num) const
+VarLenType
+CompType::getMemberVarLenType(unsigned member_num) const
{
try {
VarLenType varlentype;
f_DataType_setId(&varlentype, p_get_member_type(member_num));
- return(varlentype);
+ return (varlentype);
}
- catch (DataTypeIException& E) {
+ catch (DataTypeIException &E) {
throw DataTypeIException("CompType::getMemberVarLenType", E.getDetailMsg());
}
}
@@ -495,18 +504,18 @@ void CompType::getMemberType(unsigned member_num, StrType& strtype) const
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-void CompType::insertMember(const H5std_string& name, size_t offset, const DataType& new_member) const
+void
+CompType::insertMember(const H5std_string &name, size_t offset, const DataType &new_member) const
{
// Convert string to C-string
- const char* name_C;
- name_C = name.c_str(); // name_C refers to the contents of name as a C-str
+ const char *name_C;
+ name_C = name.c_str(); // name_C refers to the contents of name as a C-str
- hid_t new_member_id = new_member.getId(); // get new_member id for C API
+ hid_t new_member_id = new_member.getId(); // get new_member id for C API
// Call C routine H5Tinsert to add the new member
herr_t ret_value = H5Tinsert(id, name_C, offset, new_member_id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("CompType::insertMember", "H5Tinsert failed");
}
}
@@ -518,12 +527,12 @@ void CompType::insertMember(const H5std_string& name, size_t offset, const DataT
///\exception H5::DataTypeIException
// 2000
//--------------------------------------------------------------------------
-void CompType::pack() const
+void
+CompType::pack() const
{
// Calls C routine H5Tpack to remove padding
herr_t ret_value = H5Tpack(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("CompType::pack", "H5Tpack failed");
}
}
@@ -537,12 +546,12 @@ void CompType::pack() const
// H5Tset_size works on atom datatypes and compound datatypes only
// March 2014
//--------------------------------------------------------------------------
-void CompType::setSize(size_t size) const
+void
+CompType::setSize(size_t size) const
{
// Call C routine H5Tset_size to set the total size
herr_t ret_value = H5Tset_size(id, size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("CompType::setSize", "H5Tset_size failed");
}
}
@@ -554,4 +563,4 @@ void CompType::setSize(size_t size) const
//--------------------------------------------------------------------------
CompType::~CompType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 3aabf55..b528aa4 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,99 +27,103 @@ class ArrayType;
class VarLenType;
class H5_DLLCPP CompType : public DataType {
- public:
- // Default constructor
- CompType();
+ public:
+ // Default constructor
+ CompType();
- // Creates a compound datatype using an existing id
- CompType(const hid_t existing_id);
+ // Creates a compound datatype using an existing id
+ CompType(const hid_t existing_id);
- // Creates a new compound datatype, given the type's size
- CompType(size_t size); // H5Tcreate
+ // Creates a new compound datatype, given the type's size
+ CompType(size_t size); // H5Tcreate
- // Gets the compound datatype of the specified dataset
- CompType(const DataSet& dataset); // H5Dget_type
+ // Gets the compound datatype of the specified dataset
+ CompType(const DataSet &dataset); // H5Dget_type
- // Copy constructor - makes a copy of original object
- CompType(const CompType& original);
+ // Copy constructor - makes a copy of original object
+ CompType(const CompType &original);
- // Constructors that open a compound datatype, given a location.
- CompType(const H5Location& loc, const char* name);
- CompType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open a compound datatype, given a location.
+ CompType(const H5Location &loc, const char *name);
+ CompType(const H5Location &loc, const H5std_string &name);
- // Returns a CompType object via DataType* by decoding the binary
- // object description of this type.
- virtual DataType* decode() const;
+ // Returns a CompType object via DataType* by decoding the binary
+ // object description of this type.
+ virtual DataType *decode() const;
- // Returns the type class of the specified member of this compound
- // datatype. It provides to the user a way of knowing what type
- // to create another datatype of the same class
- H5T_class_t getMemberClass(unsigned member_num) const;
+ // Returns the type class of the specified member of this compound
+ // datatype. It provides to the user a way of knowing what type
+ // to create another datatype of the same class
+ H5T_class_t getMemberClass(unsigned member_num) const;
- // Returns the index of a member in this compound data type.
- int getMemberIndex(const char* name) const;
- int getMemberIndex(const H5std_string& name) const;
+ // Returns the index of a member in this compound data type.
+ int getMemberIndex(const char *name) const;
+ int getMemberIndex(const H5std_string &name) const;
- // Returns the offset of a member of this compound datatype.
- size_t getMemberOffset(unsigned memb_no) const;
+ // Returns the offset of a member of this compound datatype.
+ size_t getMemberOffset(unsigned memb_no) const;
- // Returns the name of a member of this compound datatype.
- H5std_string getMemberName(unsigned member_num) const;
+ // Returns the name of a member of this compound datatype.
+ H5std_string getMemberName(unsigned member_num) const;
- // Returns the generic datatype of the specified member in
- // this compound datatype.
- DataType getMemberDataType(unsigned member_num) const;
+ // Returns the generic datatype of the specified member in
+ // this compound datatype.
+ DataType getMemberDataType(unsigned member_num) const;
- // Returns the array datatype of the specified member in
- // this compound datatype.
- ArrayType getMemberArrayType(unsigned member_num) const;
+ // Returns the array datatype of the specified member in
+ // this compound datatype.
+ ArrayType getMemberArrayType(unsigned member_num) const;
- // Returns the compound datatype of the specified member in
- // this compound datatype.
- CompType getMemberCompType(unsigned member_num) const;
+ // Returns the compound datatype of the specified member in
+ // this compound datatype.
+ CompType getMemberCompType(unsigned member_num) const;
- // Returns the enumeration datatype of the specified member in
- // this compound datatype.
- EnumType getMemberEnumType(unsigned member_num) const;
+ // Returns the enumeration datatype of the specified member in
+ // this compound datatype.
+ EnumType getMemberEnumType(unsigned member_num) const;
- // Returns the integer datatype of the specified member in
- // this compound datatype.
- IntType getMemberIntType(unsigned member_num) const;
+ // Returns the integer datatype of the specified member in
+ // this compound datatype.
+ IntType getMemberIntType(unsigned member_num) const;
- // Returns the floating-point datatype of the specified member in
- // this compound datatype.
- FloatType getMemberFloatType(unsigned member_num) const;
+ // Returns the floating-point datatype of the specified member in
+ // this compound datatype.
+ FloatType getMemberFloatType(unsigned member_num) const;
- // Returns the string datatype of the specified member in
- // this compound datatype.
- StrType getMemberStrType(unsigned member_num) const;
+ // Returns the string datatype of the specified member in
+ // this compound datatype.
+ StrType getMemberStrType(unsigned member_num) const;
- // Returns the variable length datatype of the specified member in
- // this compound datatype.
- VarLenType getMemberVarLenType(unsigned member_num) const;
+ // Returns the variable length datatype of the specified member in
+ // this compound datatype.
+ VarLenType getMemberVarLenType(unsigned member_num) const;
- // Returns the number of members in this compound datatype.
- int getNmembers() const;
+ // Returns the number of members in this compound datatype.
+ int getNmembers() const;
- // Adds a new member to this compound datatype.
- void insertMember(const H5std_string& name, size_t offset, const DataType& new_member) const;
+ // Adds a new member to this compound datatype.
+ void insertMember(const H5std_string &name, size_t offset, const DataType &new_member) const;
- // Recursively removes padding from within this compound datatype.
- void pack() const;
+ // Recursively removes padding from within this compound datatype.
+ void pack() const;
- // Sets the total size for this compound datatype.
- void setSize(size_t size) const;
+ // Sets the total size for this compound datatype.
+ void setSize(size_t size) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("CompType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("CompType");
+ }
- // Noop destructor.
- virtual ~CompType();
+ // Noop destructor.
+ virtual ~CompType();
- private:
- // Contains common code that is used by the member functions
- // getMemberXxxType
- hid_t p_get_member_type(unsigned member_num) const;
+ private:
+ // Contains common code that is used by the member functions
+ // getMemberXxxType
+ hid_t p_get_member_type(unsigned member_num) const;
}; // end of CompType
} // namespace H5
diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h
index 4108831..b18165d 100644
--- a/c++/src/H5Cpp.h
+++ b/c++/src/H5Cpp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -55,9 +55,9 @@
*/
#ifndef H5_CXX_HAVE_OFFSETOF
#ifdef HOFFSET
- #undef HOFFSET
+#undef HOFFSET
#endif
-#define HOFFSET(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#define HOFFSET(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER)
#endif
#endif // __H5Cpp_H
diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h
index 220185e..42ecb45 100644
--- a/c++/src/H5CppDoc.h
+++ b/c++/src/H5CppDoc.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,7 +25,7 @@
* \section intro_sec Introduction
*
* The C++ API provides C++ wrappers for the HDF5 C Library.
- *
+ *
* It is assumed that the user has knowledge of the HDF5 file format and its
* components. For more information on the HDF5 C Library, please refer to
* the HDF5 Software Documentation page.
@@ -53,13 +53,13 @@
* <br />
* \section install_sec Installation
*
- * The HDF5 C++ API is included with the HDF5 source code and can
- * be obtained from
- * <a href="https://portal.hdfgroup.org/display/support/Downloads">
- * https://portal.hdfgroup.org/display/support/Downloads</a>.
- *
- * Please refer to the release_docs/INSTALL file under the top directory
- * of the HDF5 source code for information about installing, building,
+ * The HDF5 C++ API is included with the HDF5 source code and can
+ * be obtained from
+ * <a href="https://support.hdfgroup.org/HDF5/release/obtainsrc.html">
+ * https://support.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
+ *
+ * Please refer to the release_docs/INSTALL file under the top directory
+ * of the HDF5 source code for information about installing, building,
* and testing the C++ API.
*
* <br />
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index f8277f9..ac7421f 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,7 +18,7 @@
#endif
#include <string>
-#include "H5private.h" // for HDfree and HDmemset
+#include "H5private.h" // for HDfree and HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,9 +39,9 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
//--------------------------------------------------------------------------
// Function: DataSet default constructor
@@ -73,7 +73,7 @@ DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs(), id(existin
///\param original - IN: DataSet instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs(), id(original.id)
+DataSet::DataSet(const DataSet &original) : H5Object(), AbstractDs(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -95,7 +95,8 @@ DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs(), id(origina
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
+DataSet::DataSet(const H5Location &loc, const void *ref, H5R_type_t ref_type)
+ : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereferenced");
}
@@ -113,7 +114,8 @@ DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type) :
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
+DataSet::DataSet(const Attribute &attr, const void *ref, H5R_type_t ref_type)
+ : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
@@ -125,32 +127,32 @@ DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type) :
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace DataSet::getSpace() const
+DataSpace
+DataSet::getSpace() const
{
// Calls C function H5Dget_space to get the id of the dataspace
hid_t dataspace_id = H5Dget_space(id);
// If the dataspace id is invalid, throw an exception
- if(dataspace_id < 0)
- {
+ if (dataspace_id < 0) {
throw DataSetIException("DataSet::getSpace", "H5Dget_space failed");
}
- //create dataspace object using the existing id then return the object
+ // create dataspace object using the existing id then return the object
DataSpace data_space;
f_DataSpace_setId(&data_space, dataspace_id);
- return(data_space);
+ return (data_space);
}
// This private member function calls the C API to get the identifier
// of the datatype that is used by this dataset. It is used
// by the various AbstractDs functions to get the specific datatype.
-hid_t DataSet::p_get_type() const
+hid_t
+DataSet::p_get_type() const
{
hid_t type_id = H5Dget_type(id);
- if(type_id > 0)
- return(type_id);
- else
- {
+ if (type_id > 0)
+ return (type_id);
+ else {
throw DataSetIException("", "H5Dget_type failed");
}
}
@@ -162,18 +164,18 @@ hid_t DataSet::p_get_type() const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList DataSet::getCreatePlist() const
+DSetCreatPropList
+DataSet::getCreatePlist() const
{
hid_t create_plist_id = H5Dget_create_plist(id);
- if(create_plist_id < 0)
- {
+ if (create_plist_id < 0) {
throw DataSetIException("DataSet::getCreatePlist", "H5Dget_create_plist failed");
}
// create and return the DSetCreatPropList object
DSetCreatPropList create_plist;
f_PropList_setId(&create_plist, create_plist_id);
- return(create_plist);
+ return (create_plist);
}
//--------------------------------------------------------------------------
@@ -185,10 +187,11 @@ DSetCreatPropList DataSet::getCreatePlist() const
// function should have no failure. (from SLU)
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-hsize_t DataSet::getStorageSize() const
+hsize_t
+DataSet::getStorageSize() const
{
hsize_t storage_size = H5Dget_storage_size(id);
- return(storage_size);
+ return (storage_size);
}
//--------------------------------------------------------------------------
@@ -198,62 +201,55 @@ hsize_t DataSet::getStorageSize() const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - Apr 2009
//--------------------------------------------------------------------------
-size_t DataSet::getInMemDataSize() const
+size_t
+DataSet::getInMemDataSize() const
{
const char *func = "DataSet::getInMemDataSize";
// Get the data type of this dataset
hid_t mem_type_id = H5Dget_type(id);
- if(mem_type_id < 0)
- {
+ if (mem_type_id < 0) {
throw DataSetIException(func, "H5Dget_type failed");
}
// Get the data type's size by first getting its native type then getting
// the native type's size.
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
- if (native_type < 0)
- {
+ if (native_type < 0) {
throw DataSetIException(func, "H5Tget_native_type failed");
}
size_t type_size = H5Tget_size(native_type);
- if (type_size == 0)
- {
+ if (type_size == 0) {
throw DataSetIException(func, "H5Tget_size failed");
}
// Close the native type and the datatype of this dataset.
- if (H5Tclose(native_type) < 0)
- {
+ if (H5Tclose(native_type) < 0) {
throw DataSetIException(func, "H5Tclose(native_type) failed");
}
- if (H5Tclose(mem_type_id) < 0)
- {
+ if (H5Tclose(mem_type_id) < 0) {
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
}
// Get number of elements of the dataset by first getting its dataspace,
// then getting the number of elements in the dataspace
hid_t space_id = H5Dget_space(id);
- if (space_id < 0)
- {
+ if (space_id < 0) {
throw DataSetIException(func, "H5Dget_space failed");
}
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
- if (num_elements < 0)
- {
+ if (num_elements < 0) {
throw DataSetIException(func, "H5Sget_simple_extent_npoints failed");
}
// Close the dataspace
- if (H5Sclose(space_id) < 0)
- {
+ if (H5Sclose(space_id) < 0) {
throw DataSetIException(func, "H5Sclose failed");
}
// Calculate and return the size of the data
size_t data_size = type_size * num_elements;
- return(data_size);
+ return (data_size);
}
//--------------------------------------------------------------------------
@@ -263,16 +259,16 @@ size_t DataSet::getInMemDataSize() const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-haddr_t DataSet::getOffset() const
+haddr_t
+DataSet::getOffset() const
{
haddr_t ds_addr; // for address of dataset
ds_addr = H5Dget_offset(id);
- if(ds_addr == HADDR_UNDEF)
- {
+ if (ds_addr == HADDR_UNDEF) {
throw DataSetIException("DataSet::getOffset", "H5Dget_offset returned HADDR_UNDEF");
}
- return(ds_addr);
+ return (ds_addr);
}
//--------------------------------------------------------------------------
@@ -282,11 +278,11 @@ haddr_t DataSet::getOffset() const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::getSpaceStatus(H5D_space_status_t& status) const
+void
+DataSet::getSpaceStatus(H5D_space_status_t &status) const
{
herr_t ret_value = H5Dget_space_status(id, &status);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::getSpaceStatus", "H5Dget_space_status failed");
}
}
@@ -302,20 +298,20 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space) const
+hsize_t
+DataSet::getVlenBufSize(const DataType &type, const DataSpace &space) const
{
// Obtain identifiers for C API
- hid_t type_id = type.getId();
+ hid_t type_id = type.getId();
hid_t space_id = space.getId();
hsize_t size; // for amount of storage
herr_t ret_value = H5Dvlen_get_buf_size(id, type_id, space_id, &size);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::getVlenBufSize", "H5Dvlen_get_buf_size failed");
}
- return(size);
+ return (size);
}
//--------------------------------------------------------------------------
@@ -331,7 +327,7 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space) co
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//hsize_t DataSet::getVlenBufSize(DataType& type, DataSpace& space) const
+// hsize_t DataSet::getVlenBufSize(DataType& type, DataSpace& space) const
//{
// return(getVlenBufSize(type, space));
//}
@@ -347,16 +343,17 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space) co
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf)
+void
+DataSet::vlenReclaim(const DataType &type, const DataSpace &space, const DSetMemXferPropList &xfer_plist,
+ void *buf)
{
// Obtain identifiers for C API
- hid_t type_id = type.getId();
- hid_t space_id = space.getId();
+ hid_t type_id = type.getId();
+ hid_t space_id = space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
herr_t ret_value = H5Dvlen_reclaim(type_id, space_id, xfer_plist_id, buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::vlenReclaim", "H5Dvlen_reclaim failed");
}
}
@@ -375,16 +372,17 @@ void DataSet::vlenReclaim(const DataType& type, const DataSpace& space, const DS
// This function has better prototype for the users than the
// other, which might be removed at some point. BMR - 2006/12/20
//--------------------------------------------------------------------------
-void DataSet::vlenReclaim(void* buf, const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist)
+void
+DataSet::vlenReclaim(void *buf, const DataType &type, const DataSpace &space,
+ const DSetMemXferPropList &xfer_plist)
{
// Obtain identifiers for C API
- hid_t type_id = type.getId();
- hid_t space_id = space.getId();
+ hid_t type_id = type.getId();
+ hid_t space_id = space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
herr_t ret_value = H5Dvlen_reclaim(type_id, space_id, xfer_plist_id, buf);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::vlenReclaim", "H5Dvlen_reclaim failed");
}
}
@@ -404,17 +402,18 @@ void DataSet::vlenReclaim(void* buf, const DataType& type, const DataSpace& spac
/// to memory datatype \a mem_type and dataspace \a mem_space.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::read(void* buf, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
+void
+DataSet::read(void *buf, const DataType &mem_type, const DataSpace &mem_space, const DataSpace &file_space,
+ const DSetMemXferPropList &xfer_plist) const
{
// Obtain identifiers for C API
- hid_t mem_type_id = mem_type.getId();
- hid_t mem_space_id = mem_space.getId();
+ hid_t mem_type_id = mem_type.getId();
+ hid_t mem_space_id = mem_space.getId();
hid_t file_space_id = file_space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::read", "H5Dread failed");
}
}
@@ -438,28 +437,28 @@ void DataSet::read(void* buf, const DataType& mem_type, const DataSpace& mem_spa
// DataSet::p_read_fixed_len and
// DataSet::p_read_variable_len
//--------------------------------------------------------------------------
-void DataSet::read(H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
+void
+DataSet::read(H5std_string &strg, const DataType &mem_type, const DataSpace &mem_space,
+ const DataSpace &file_space, const DSetMemXferPropList &xfer_plist) const
{
// Check if this dataset has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
- if (is_variable_len < 0)
- {
+ if (is_variable_len < 0) {
throw DataSetIException("DataSet::read", "H5Tis_variable_str failed");
}
// Obtain identifiers for C API
- hid_t mem_type_id = mem_type.getId();
- hid_t mem_space_id = mem_space.getId();
+ hid_t mem_type_id = mem_type.getId();
+ hid_t mem_space_id = mem_space.getId();
hid_t file_space_id = file_space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
- if (!is_variable_len) // only allocate for fixed-len string
+ if (!is_variable_len) // only allocate for fixed-len string
{
p_read_fixed_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
}
- else
- {
+ else {
p_read_variable_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
}
}
@@ -480,17 +479,18 @@ void DataSet::read(H5std_string& strg, const DataType& mem_type, const DataSpace
/// and dataspace.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::write(const void* buf, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
+void
+DataSet::write(const void *buf, const DataType &mem_type, const DataSpace &mem_space,
+ const DataSpace &file_space, const DSetMemXferPropList &xfer_plist) const
{
// Obtain identifiers for C API
- hid_t mem_type_id = mem_type.getId();
- hid_t mem_space_id = mem_space.getId();
+ hid_t mem_type_id = mem_type.getId();
+ hid_t mem_space_id = mem_space.getId();
hid_t file_space_id = file_space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
herr_t ret_value = H5Dwrite(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::write", "H5Dwrite failed");
}
}
@@ -505,39 +505,37 @@ void DataSet::write(const void* buf, const DataType& mem_type, const DataSpace&
// Modified to pass the buffer into H5Dwrite properly depending
// whether the dataset has variable- or fixed-length string.
//--------------------------------------------------------------------------
-void DataSet::write(const H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
+void
+DataSet::write(const H5std_string &strg, const DataType &mem_type, const DataSpace &mem_space,
+ const DataSpace &file_space, const DSetMemXferPropList &xfer_plist) const
{
// Check if this attribute has variable-len string or fixed-len string and
// proceed appropriately.
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
- if (is_variable_len < 0)
- {
+ if (is_variable_len < 0) {
throw DataSetIException("DataSet::write", "H5Tis_variable_str failed");
}
// Obtain identifiers for C API
- hid_t mem_type_id = mem_type.getId();
- hid_t mem_space_id = mem_space.getId();
+ hid_t mem_type_id = mem_type.getId();
+ hid_t mem_space_id = mem_space.getId();
hid_t file_space_id = file_space.getId();
hid_t xfer_plist_id = xfer_plist.getId();
// Convert string to C-string
- const char* strg_C;
- strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
+ const char *strg_C;
+ strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
herr_t ret_value = 0;
// Pass string in differently depends on variable or fixed length
- if (!is_variable_len)
- {
+ if (!is_variable_len) {
ret_value = H5Dwrite(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
}
- else
- {
+ else {
// passing string argument by address
ret_value = H5Dwrite(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C);
}
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::write", "H5Dwrite failed");
}
}
@@ -559,15 +557,17 @@ void DataSet::write(const H5std_string& strg, const DataType& mem_type, const Da
/// under development.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DataSet::iterateElems(void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data)
+int
+DataSet::iterateElems(void *buf, const DataType &type, const DataSpace &space, H5D_operator_t op,
+ void *op_data)
{
// Obtain identifiers for C API
- hid_t type_id = type.getId();
- hid_t space_id = space.getId();
+ hid_t type_id = type.getId();
+ hid_t space_id = space.getId();
herr_t ret_value = H5Diterate(buf, type_id, space_id, op, op_data);
- if(ret_value >= 0)
- return(ret_value);
- else // raise exception when H5Diterate returns a negative value
+ if (ret_value >= 0)
+ return (ret_value);
+ else // raise exception when H5Diterate returns a negative value
{
throw DataSetIException("DataSet::iterateElems", "H5Diterate failed");
}
@@ -585,10 +585,11 @@ int DataSet::iterateElems(void* buf, const DataType& type, const DataSpace& spac
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Extend
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::extend(const hsize_t* size) const
+void
+DataSet::extend(const hsize_t *size) const
{
herr_t ret_value = H5Dset_extent(id, size);
- if(ret_value < 0) // raise exception when H5Dset_extent returns a neg value
+ if (ret_value < 0) // raise exception when H5Dset_extent returns a neg value
throw DataSetIException("DataSet::extend", "H5Dset_extent failed");
}
@@ -604,14 +605,15 @@ void DataSet::extend(const hsize_t* size) const
// Programmer Binh-Minh Ribler - 2014
// Modification
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const
+void
+DataSet::fillMemBuf(const void *fill, const DataType &fill_type, void *buf, const DataType &buf_type,
+ const DataSpace &space) const
{
- hid_t fill_type_id = fill_type.getId();
- hid_t buf_type_id = buf_type.getId();
- hid_t space_id = space.getId();
- herr_t ret_value = H5Dfill(fill, fill_type_id, buf, buf_type_id, space_id);
- if(ret_value < 0)
- {
+ hid_t fill_type_id = fill_type.getId();
+ hid_t buf_type_id = buf_type.getId();
+ hid_t space_id = space.getId();
+ herr_t ret_value = H5Dfill(fill, fill_type_id, buf, buf_type_id, space_id);
+ if (ret_value < 0) {
throw DataSetIException("DataSet::fillMemBuf", "H5Dfill failed");
}
}
@@ -633,7 +635,8 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
+// void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace&
+// space)
//{
// fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
//}
@@ -649,13 +652,13 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const
+void
+DataSet::fillMemBuf(void *buf, const DataType &buf_type, const DataSpace &space) const
{
- hid_t buf_type_id = buf_type.getId();
- hid_t space_id = space.getId();
- herr_t ret_value = H5Dfill(NULL, buf_type_id, buf, buf_type_id, space_id);
- if(ret_value < 0)
- {
+ hid_t buf_type_id = buf_type.getId();
+ hid_t space_id = space.getId();
+ herr_t ret_value = H5Dfill(NULL, buf_type_id, buf, buf_type_id, space_id);
+ if (ret_value < 0) {
throw DataSetIException("DataSet::fillMemBuf", "H5Dfill failed");
}
}
@@ -675,7 +678,7 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
+// void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
//{
// fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
//}
@@ -691,9 +694,10 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t DataSet::getId() const
+hid_t
+DataSet::getId() const
{
- return(id);
+ return (id);
}
//--------------------------------------------------------------------------
@@ -707,7 +711,9 @@ hid_t DataSet::getId() const
// Jul 2009
// Added in follow to the change in Attribute::read
//--------------------------------------------------------------------------
-void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const
+void
+DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
+ const hid_t xfer_plist_id, H5std_string &strg) const
{
// Only allocate for fixed-len string.
@@ -715,22 +721,20 @@ void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id
size_t data_size = getInMemDataSize();
// If there is data, allocate buffer and read it.
- if (data_size > 0)
- {
- char *strg_C = new char [data_size+1];
- HDmemset(strg_C, 0, data_size+1); // clear buffer
+ if (data_size > 0) {
+ char *strg_C = new char[data_size + 1];
+ HDmemset(strg_C, 0, data_size + 1); // clear buffer
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
- if(ret_value < 0)
- {
- delete []strg_C; // de-allocate for fixed-len string
+ if (ret_value < 0) {
+ delete[] strg_C; // de-allocate for fixed-len string
throw DataSetIException("DataSet::read", "H5Dread failed for fixed length string");
}
// Get string from the C char* and release resource allocated locally
strg = strg_C;
- delete []strg_C;
+ delete[] strg_C;
}
}
@@ -745,7 +749,9 @@ void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id
// Jul 2009
// Added in follow to the change in Attribute::read
//--------------------------------------------------------------------------
-void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const
+void
+DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
+ const hid_t xfer_plist_id, H5std_string &strg) const
{
// Prepare and call C API to read dataset.
char *strg_C;
@@ -753,8 +759,7 @@ void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space
// Read dataset, no allocation for variable-len string; C library will
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::read", "H5Dread failed for variable length string");
}
@@ -776,13 +781,14 @@ void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::p_setId(const hid_t new_id)
+void
+DataSet::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataSetIException(inMemFunc("p_setId"), close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -799,7 +805,8 @@ void DataSet::p_setId(const hid_t new_id)
// param new_id - IN: New id to set
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void f_PropList_setId(PropList* plist, hid_t new_id)
+void
+f_PropList_setId(PropList *plist, hid_t new_id)
{
plist->p_setId(new_id);
}
@@ -813,13 +820,12 @@ void f_PropList_setId(PropList* plist, hid_t new_id)
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void DataSet::close()
+void
+DataSet::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Dclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSetIException("DataSet::close", "H5Dclose failed");
}
// reset the id
@@ -835,7 +841,8 @@ void DataSet::close()
///\exception H5::DataSetIException
// May 2018
//--------------------------------------------------------------------------
-void DataSet::throwException(const H5std_string& func_name, const H5std_string& msg) const
+void
+DataSet::throwException(const H5std_string &func_name, const H5std_string &msg) const
{
throw DataSetIException(inMemFunc(func_name.c_str()), msg);
}
@@ -855,8 +862,8 @@ DataSet::~DataSet()
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
cerr << "DataSet::~DataSet - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index f0178f4..3c06179 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,108 +26,127 @@ namespace H5 {
*/
// Inheritance: multiple H5Object/AbstractDs -> H5Location -> IdComponent
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
- public:
- // Close this dataset.
- virtual void close();
-
- // Extends the dataset with unlimited dimension.
- void extend(const hsize_t* size) const;
-
- // Fills a selection in memory with a value
- void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
- //void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
-
- // Fills a selection in memory with zero
- void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
- //void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
-
- // Gets the creation property list of this dataset.
- DSetCreatPropList getCreatePlist() const;
-
- // Returns the address of this dataset in the file.
- haddr_t getOffset() const;
-
- // Gets the dataspace of this dataset.
- virtual DataSpace getSpace() const;
-
- // Determines whether space has been allocated for a dataset.
- void getSpaceStatus(H5D_space_status_t& status) const;
-
- // Returns the amount of storage size required for this dataset.
- virtual hsize_t getStorageSize() const;
-
- // Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const;
-
- // Returns the number of bytes required to store VL data.
- hsize_t getVlenBufSize(const DataType& type, const DataSpace& space) const;
- //hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // removed from 1.8.18 and 1.10.1
-
- // Reclaims VL datatype memory buffers.
- static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf);
- static void vlenReclaim(void *buf, const DataType& type, const DataSpace& space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT);
-
- // Reads the data of this dataset and stores it in the provided buffer.
- // The memory and file dataspaces and the transferring property list
- // can be defaults.
- void read(void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT) const;
- void read(H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT) const;
-
- // Writes the buffered data to this dataset.
- // The memory and file dataspaces and the transferring property list
- // can be defaults.
- void write(const void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT) const;
- void write(const H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT) const;
-
- // Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
- int iterateElems(void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL);
-
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("DataSet"); }
-
- // Throw DataSetIException.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
-
- // Creates a dataset by way of dereference.
- DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
- // Default constructor.
- DataSet();
-
- // Copy constructor.
- DataSet(const DataSet& original);
-
- // Creates a copy of an existing DataSet using its id.
- DataSet(const hid_t existing_id);
-
- // Gets the dataset id.
- virtual hid_t getId() const;
-
- // Destructor: properly terminates access to this dataset.
- virtual ~DataSet();
-
- protected:
+ public:
+ // Close this dataset.
+ virtual void close();
+
+ // Extends the dataset with unlimited dimension.
+ void extend(const hsize_t *size) const;
+
+ // Fills a selection in memory with a value
+ void fillMemBuf(const void *fill, const DataType &fill_type, void *buf, const DataType &buf_type,
+ const DataSpace &space) const;
+ // void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace&
+ // space); // removed from 1.8.18 and 1.10.1
+
+ // Fills a selection in memory with zero
+ void fillMemBuf(void *buf, const DataType &buf_type, const DataSpace &space) const;
+ // void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
+
+ // Gets the creation property list of this dataset.
+ DSetCreatPropList getCreatePlist() const;
+
+ // Returns the address of this dataset in the file.
+ haddr_t getOffset() const;
+
+ // Gets the dataspace of this dataset.
+ virtual DataSpace getSpace() const;
+
+ // Determines whether space has been allocated for a dataset.
+ void getSpaceStatus(H5D_space_status_t &status) const;
+
+ // Returns the amount of storage size required for this dataset.
+ virtual hsize_t getStorageSize() const;
+
+ // Returns the in memory size of this attribute's data.
+ virtual size_t getInMemDataSize() const;
+
+ // Returns the number of bytes required to store VL data.
+ hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
+ // hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // removed from 1.8.18 and 1.10.1
+
+ // Reclaims VL datatype memory buffers.
+ static void vlenReclaim(const DataType &type, const DataSpace &space,
+ const DSetMemXferPropList &xfer_plist, void *buf);
+ static void vlenReclaim(void *buf, const DataType &type, const DataSpace &space = DataSpace::ALL,
+ const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT);
+
+ // Reads the data of this dataset and stores it in the provided buffer.
+ // The memory and file dataspaces and the transferring property list
+ // can be defaults.
+ void read(void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
+ const DataSpace & file_space = DataSpace::ALL,
+ const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
+ void read(H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
+ const DataSpace & file_space = DataSpace::ALL,
+ const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
+
+ // Writes the buffered data to this dataset.
+ // The memory and file dataspaces and the transferring property list
+ // can be defaults.
+ void write(const void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
+ const DataSpace & file_space = DataSpace::ALL,
+ const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
+ void write(const H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
+ const DataSpace & file_space = DataSpace::ALL,
+ const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
+
+ // Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
+ int iterateElems(void *buf, const DataType &type, const DataSpace &space, H5D_operator_t op,
+ void *op_data = NULL);
+
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("DataSet");
+ }
+
+ // Throw DataSetIException.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
+
+ // Creates a dataset by way of dereference.
+ DataSet(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+ DataSet(const Attribute &attr, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+
+ // Default constructor.
+ DataSet();
+
+ // Copy constructor.
+ DataSet(const DataSet &original);
+
+ // Creates a copy of an existing DataSet using its id.
+ DataSet(const hid_t existing_id);
+
+ // Gets the dataset id.
+ virtual hid_t getId() const;
+
+ // Destructor: properly terminates access to this dataset.
+ virtual ~DataSet();
+
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Sets the dataset id.
- virtual void p_setId(const hid_t new_id);
+ // Sets the dataset id.
+ virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- hid_t id; // HDF5 dataset id
+ private:
+ hid_t id; // HDF5 dataset id
- // This function contains the common code that is used by
- // getTypeClass and various API functions getXxxType
- // defined in AbstractDs for generic datatype and specific
- // sub-types
- virtual hid_t p_get_type() const;
+ // This function contains the common code that is used by
+ // getTypeClass and various API functions getXxxType
+ // defined in AbstractDs for generic datatype and specific
+ // sub-types
+ virtual hid_t p_get_type() const;
- // Reads variable or fixed len strings from this dataset.
- void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
- void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
+ // Reads variable or fixed len strings from this dataset.
+ void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
+ const hid_t xfer_plist_id, H5std_string &strg) const;
+ void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
+ const hid_t xfer_plist_id, H5std_string &strg) const;
- // Friend function to set DataSet id. For library use only.
- friend void f_DataSet_setId(DataSet* dset, hid_t new_id);
+ // Friend function to set DataSet id. For library use only.
+ friend void f_DataSet_setId(DataSet *dset, hid_t new_id);
}; // end of DataSet
} // namespace H5
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index b4fd431..727ae4c 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,9 +25,9 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
@@ -35,7 +35,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-DataSpace* DataSpace::ALL_ = 0;
+DataSpace *DataSpace::ALL_ = 0;
//--------------------------------------------------------------------------
// Function: DataSpace::getConstant
@@ -47,13 +47,13 @@ DataSpace* DataSpace::ALL_ = 0;
// a DataSpaceIException. This scenario should not happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-DataSpace* DataSpace::getConstant()
+DataSpace *
+DataSpace::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -62,8 +62,9 @@ DataSpace* DataSpace::getConstant()
if (ALL_ == 0)
ALL_ = new DataSpace(H5S_ALL);
else
- throw DataSpaceIException("DataSpace::getConstant", "DataSpace::getConstant is being invoked on an allocated ALL_");
- return(ALL_);
+ throw DataSpaceIException("DataSpace::getConstant",
+ "DataSpace::getConstant is being invoked on an allocated ALL_");
+ return (ALL_);
}
//--------------------------------------------------------------------------
@@ -71,7 +72,8 @@ DataSpace* DataSpace::getConstant()
// Purpose: Deletes the constant object that DataSpace::ALL_ points to
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void DataSpace::deleteConstants()
+void
+DataSpace::deleteConstants()
{
if (ALL_ != 0)
delete ALL_;
@@ -80,7 +82,7 @@ void DataSpace::deleteConstants()
//--------------------------------------------------------------------------
// Purpose Constant for default dataspace.
//--------------------------------------------------------------------------
-const DataSpace& DataSpace::ALL = *getConstant();
+const DataSpace &DataSpace::ALL = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -96,8 +98,7 @@ const DataSpace& DataSpace::ALL = *getConstant();
DataSpace::DataSpace(H5S_class_t type) : IdComponent()
{
id = H5Screate(type);
- if(id < 0)
- {
+ if (id < 0) {
throw DataSpaceIException("DataSpace constructor", "H5Screate failed");
}
}
@@ -111,11 +112,10 @@ DataSpace::DataSpace(H5S_class_t type) : IdComponent()
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims) : IdComponent()
+DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) : IdComponent()
{
id = H5Screate_simple(rank, dims, maxdims);
- if(id < 0)
- {
+ if (id < 0) {
throw DataSpaceIException("DataSpace constructor", "H5Screate_simple failed");
}
}
@@ -139,7 +139,7 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id)
///\param original - IN: DataSpace object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(const DataSpace& original) : IdComponent(), id(original.id)
+DataSpace::DataSpace(const DataSpace &original) : IdComponent(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -156,22 +156,23 @@ DataSpace::DataSpace(const DataSpace& original) : IdComponent(), id(original.id)
// - Replaced decRefCount with close() to let the C library
// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
-void DataSpace::copy(const DataSpace& like_space)
+void
+DataSpace::copy(const DataSpace &like_space)
{
// If this object has an hdf5 valid id, close it
- if(id != H5S_ALL) {
+ if (id != H5S_ALL) {
try {
- close();
+ close();
}
- catch (Exception& close_error) {
- throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
+ catch (Exception &close_error) {
+ throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
}
- } // end if
+ } // end if
// call C routine to copy the dataspace
id = H5Scopy(like_space.getId());
- if(id < 0)
+ if (id < 0)
throw DataSpaceIException("DataSpace::copy", "H5Scopy failed");
}
@@ -186,11 +187,12 @@ void DataSpace::copy(const DataSpace& like_space)
// the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace& DataSpace::operator=(const DataSpace& rhs)
+DataSpace &
+DataSpace::operator=(const DataSpace &rhs)
{
if (this != &rhs)
copy(rhs);
- return(*this);
+ return (*this);
}
//--------------------------------------------------------------------------
@@ -201,17 +203,16 @@ DataSpace& DataSpace::operator=(const DataSpace& rhs)
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DataSpace::isSimple () const
+bool
+DataSpace::isSimple() const
{
htri_t simple = H5Sis_simple(id);
- if(simple > 0)
+ if (simple > 0)
return true;
- else if(simple == 0)
+ else if (simple == 0)
return false;
- else
- {
- throw DataSpaceIException("DataSpace::isSimple",
- "H5Sis_simple returns negative value");
+ else {
+ throw DataSpaceIException("DataSpace::isSimple", "H5Sis_simple returns negative value");
}
}
@@ -227,11 +228,11 @@ bool DataSpace::isSimple () const
/// it to be re-defined.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::offsetSimple (const hssize_t* offset) const
+void
+DataSpace::offsetSimple(const hssize_t *offset) const
{
herr_t ret_value = H5Soffset_simple(id, offset);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::offsetSimple", "H5Soffset_simple failed");
}
}
@@ -246,15 +247,15 @@ void DataSpace::offsetSimple (const hssize_t* offset) const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DataSpace::getSimpleExtentDims (hsize_t *dims, hsize_t *maxdims) const
+int
+DataSpace::getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims) const
{
int ndims = H5Sget_simple_extent_dims(id, dims, maxdims);
- if(ndims < 0)
- {
+ if (ndims < 0) {
throw DataSpaceIException("DataSpace::getSimpleExtentDims",
- "H5Sget_simple_extent_dims returns negative number of dimensions");
+ "H5Sget_simple_extent_dims returns negative number of dimensions");
}
- return(ndims);
+ return (ndims);
}
//--------------------------------------------------------------------------
@@ -264,15 +265,16 @@ int DataSpace::getSimpleExtentDims (hsize_t *dims, hsize_t *maxdims) const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DataSpace::getSimpleExtentNdims () const
+int
+DataSpace::getSimpleExtentNdims() const
{
int ndims = H5Sget_simple_extent_ndims(id);
- if(ndims < 0)
- {
- throw DataSpaceIException("DataSpace::getSimpleExtentNdims",
- "H5Sget_simple_extent_ndims returns negative value for dimensionality of the dataspace");
+ if (ndims < 0) {
+ throw DataSpaceIException(
+ "DataSpace::getSimpleExtentNdims",
+ "H5Sget_simple_extent_ndims returns negative value for dimensionality of the dataspace");
}
- return(ndims);
+ return (ndims);
}
//--------------------------------------------------------------------------
@@ -286,16 +288,17 @@ int DataSpace::getSimpleExtentNdims () const
// num_elements = -1 when failure occurs vs. 0
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hssize_t DataSpace::getSimpleExtentNpoints () const
+hssize_t
+DataSpace::getSimpleExtentNpoints() const
{
hssize_t num_elements = H5Sget_simple_extent_npoints(id);
- if(num_elements > -1)
- return(num_elements);
- else
- {
+ if (num_elements > -1)
+ return (num_elements);
+ else {
throw DataSpaceIException("DataSpace::getSimpleExtentNpoints",
- "H5Sget_simple_extent_npoints returns negative value for the number of elements in the dataspace");
+ "H5Sget_simple_extent_npoints returns negative value for the number of "
+ "elements in the dataspace");
}
}
@@ -306,15 +309,15 @@ hssize_t DataSpace::getSimpleExtentNpoints () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5S_class_t DataSpace::getSimpleExtentType () const
+H5S_class_t
+DataSpace::getSimpleExtentType() const
{
H5S_class_t class_name = H5Sget_simple_extent_type(id);
- if(class_name == H5S_NO_CLASS)
- {
+ if (class_name == H5S_NO_CLASS) {
throw DataSpaceIException("DataSpace::getSimpleExtentType",
- "H5Sget_simple_extent_type returns H5S_NO_CLASS");
+ "H5Sget_simple_extent_type returns H5S_NO_CLASS");
}
- return(class_name);
+ return (class_name);
}
//--------------------------------------------------------------------------
@@ -326,12 +329,12 @@ H5S_class_t DataSpace::getSimpleExtentType () const
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void DataSpace::extentCopy (const DataSpace& dest_space) const
+void
+DataSpace::extentCopy(const DataSpace &dest_space) const
{
- hid_t dest_space_id = dest_space.getId();
- herr_t ret_value = H5Sextent_copy(dest_space_id, id);
- if(ret_value < 0)
- {
+ hid_t dest_space_id = dest_space.getId();
+ herr_t ret_value = H5Sextent_copy(dest_space_id, id);
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::extentCopy", "H5Sextent_copy failed");
}
}
@@ -349,7 +352,7 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void DataSpace::extentCopy(DataSpace& dest_space) const
+// void DataSpace::extentCopy(DataSpace& dest_space) const
//{
// extentCopy(dest_space);
//}
@@ -363,12 +366,12 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size) const
+void
+DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size) const
{
herr_t ret_value;
ret_value = H5Sset_extent_simple(id, rank, current_size, maximum_size);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::setExtentSimple", "H5Sset_extent_simple failed");
}
}
@@ -380,11 +383,11 @@ void DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsi
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::setExtentNone () const
+void
+DataSpace::setExtentNone() const
{
herr_t ret_value = H5Sset_extent_none(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::setExtentNone", "H5Sset_extent_none failed");
}
}
@@ -396,15 +399,16 @@ void DataSpace::setExtentNone () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hssize_t DataSpace::getSelectNpoints () const
+hssize_t
+DataSpace::getSelectNpoints() const
{
hssize_t num_elements = H5Sget_select_npoints(id);
- if(num_elements < 0)
- {
- throw DataSpaceIException("DataSpace::getSelectNpoints",
- "H5Sget_select_npoints returns negative value for number of elements in the dataspace selection");
+ if (num_elements < 0) {
+ throw DataSpaceIException(
+ "DataSpace::getSelectNpoints",
+ "H5Sget_select_npoints returns negative value for number of elements in the dataspace selection");
}
- return(num_elements);
+ return (num_elements);
}
//--------------------------------------------------------------------------
@@ -414,15 +418,16 @@ hssize_t DataSpace::getSelectNpoints () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hssize_t DataSpace::getSelectHyperNblocks () const
+hssize_t
+DataSpace::getSelectHyperNblocks() const
{
hssize_t num_blocks = H5Sget_select_hyper_nblocks(id);
- if(num_blocks < 0)
- {
- throw DataSpaceIException("DataSpace::getSelectHyperNblocks",
- "H5Sget_select_hyper_nblocks returns negative value for the number of hyperslab blocks");
+ if (num_blocks < 0) {
+ throw DataSpaceIException(
+ "DataSpace::getSelectHyperNblocks",
+ "H5Sget_select_hyper_nblocks returns negative value for the number of hyperslab blocks");
}
- return(num_blocks);
+ return (num_blocks);
}
//--------------------------------------------------------------------------
@@ -434,14 +439,14 @@ hssize_t DataSpace::getSelectHyperNblocks () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const
+void
+DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const
{
herr_t ret_value;
ret_value = H5Sget_select_hyper_blocklist(id, startblock, numblocks, buf);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::getSelectHyperBlocklist",
- "H5Sget_select_hyper_blocklist failed");
+ "H5Sget_select_hyper_blocklist failed");
}
}
@@ -452,15 +457,14 @@ void DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, h
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hssize_t DataSpace::getSelectElemNpoints () const
+hssize_t
+DataSpace::getSelectElemNpoints() const
{
hssize_t num_points = H5Sget_select_elem_npoints(id);
- if(num_points < 0)
- {
- throw DataSpaceIException("DataSpace::getSelectElemNpoints",
- "H5Sget_select_elem_npoints failed");
+ if (num_points < 0) {
+ throw DataSpaceIException("DataSpace::getSelectElemNpoints", "H5Sget_select_elem_npoints failed");
}
- return(num_points);
+ return (num_points);
}
//--------------------------------------------------------------------------
@@ -476,14 +480,13 @@ hssize_t DataSpace::getSelectElemNpoints () const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemPointList
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const
+void
+DataSpace::getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const
{
herr_t ret_value;
ret_value = H5Sget_select_elem_pointlist(id, startpoint, numpoints, buf);
- if(ret_value < 0)
- {
- throw DataSpaceIException("DataSpace::getSelectElemPointlist",
- "H5Sget_select_elem_pointlist failed");
+ if (ret_value < 0) {
+ throw DataSpaceIException("DataSpace::getSelectElemPointlist", "H5Sget_select_elem_pointlist failed");
}
}
@@ -500,13 +503,12 @@ void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t numpoints, h
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectBounds
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end) const
+void
+DataSpace::getSelectBounds(hsize_t *start, hsize_t *end) const
{
herr_t ret_value = H5Sget_select_bounds(id, start, end);
- if(ret_value < 0)
- {
- throw DataSpaceIException("DataSpace::getSelectBounds",
- "H5Sget_select_bounds failed");
+ if (ret_value < 0) {
+ throw DataSpaceIException("DataSpace::getSelectBounds", "H5Sget_select_bounds failed");
}
}
@@ -526,14 +528,13 @@ void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectElements (H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
+void
+DataSpace::selectElements(H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
{
herr_t ret_value;
ret_value = H5Sselect_elements(id, op, num_elements, coord);
- if(ret_value < 0)
- {
- throw DataSpaceIException("DataSpace::selectElements",
- "H5Sselect_elements failed");
+ if (ret_value < 0) {
+ throw DataSpaceIException("DataSpace::selectElements", "H5Sselect_elements failed");
}
}
@@ -544,11 +545,11 @@ void DataSpace::selectElements (H5S_seloper_t op, const size_t num_elements, con
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectAll () const
+void
+DataSpace::selectAll() const
{
herr_t ret_value = H5Sselect_all(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::selectAll", "H5Sselect_all failed");
}
}
@@ -560,13 +561,12 @@ void DataSpace::selectAll () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectNone () const
+void
+DataSpace::selectNone() const
{
herr_t ret_value = H5Sselect_none(id);
- if(ret_value < 0)
- {
- throw DataSpaceIException("DataSpace::selectNone",
- "H5Sselect_none failed");
+ if (ret_value < 0) {
+ throw DataSpaceIException("DataSpace::selectNone", "H5Sselect_none failed");
}
}
@@ -579,17 +579,16 @@ void DataSpace::selectNone () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DataSpace::selectValid () const
+bool
+DataSpace::selectValid() const
{
htri_t ret_value = H5Sselect_valid(id);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
- else
- {
- throw DataSpaceIException("DataSpace::selectValid",
- "H5Sselect_valid returns negative value");
+ else {
+ throw DataSpaceIException("DataSpace::selectValid", "H5Sselect_valid returns negative value");
}
}
@@ -608,14 +607,14 @@ bool DataSpace::selectValid () const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block) const
+void
+DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start,
+ const hsize_t *stride, const hsize_t *block) const
{
herr_t ret_value;
ret_value = H5Sselect_hyperslab(id, op, start, stride, count, block);
- if(ret_value < 0)
- {
- throw DataSpaceIException("DataSpace::selectHyperslab",
- "H5Sselect_hyperslab failed");
+ if (ret_value < 0) {
+ throw DataSpaceIException("DataSpace::selectHyperslab", "H5Sselect_hyperslab failed");
}
}
@@ -631,9 +630,10 @@ void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hs
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t DataSpace::getId() const
+hid_t
+DataSpace::getId() const
{
- return(id);
+ return (id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -649,13 +649,14 @@ hid_t DataSpace::getId() const
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::p_setId(const hid_t new_id)
+void
+DataSpace::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataSpaceIException(inMemFunc("p_setId"), close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -670,14 +671,13 @@ void DataSpace::p_setId(const hid_t new_id)
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void DataSpace::close()
+void
+DataSpace::close()
{
// check if id is a valid hdf5 object id before trying to close it
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Sclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataSpaceIException("DataSpace::close", "H5Sclose failed");
}
// reset the id
@@ -699,8 +699,9 @@ DataSpace::~DataSpace()
{
try {
close();
- } catch (Exception& close_error) {
+ }
+ catch (Exception &close_error) {
cerr << "DataSpace::~DataSpace - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index ed141a3..5565d18 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,127 +23,132 @@ namespace H5 {
*/
// Inheritance: IdComponent
class H5_DLLCPP DataSpace : public IdComponent {
- public:
- ///\brief Default DataSpace objects
- static const DataSpace& ALL;
+ public:
+ ///\brief Default DataSpace objects
+ static const DataSpace &ALL;
- // Creates a dataspace object given the space type
- DataSpace(H5S_class_t type = H5S_SCALAR);
+ // Creates a dataspace object given the space type
+ DataSpace(H5S_class_t type = H5S_SCALAR);
- // Creates a simple dataspace
- DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
+ // Creates a simple dataspace
+ DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims = NULL);
- // Creates a DataSpace object using an existing dataspace id.
- DataSpace(const hid_t space_id);
+ // Creates a DataSpace object using an existing dataspace id.
+ DataSpace(const hid_t space_id);
- // Copy constructor: makes a copy of the original DataSpace object.
- DataSpace(const DataSpace& original);
+ // Copy constructor: makes a copy of the original DataSpace object.
+ DataSpace(const DataSpace &original);
- // Assignment operator
- DataSpace& operator=(const DataSpace& rhs);
+ // Assignment operator
+ DataSpace &operator=(const DataSpace &rhs);
- // Closes this dataspace.
- virtual void close();
+ // Closes this dataspace.
+ virtual void close();
- // Makes copy of an existing dataspace.
- void copy(const DataSpace& like_space);
+ // Makes copy of an existing dataspace.
+ void copy(const DataSpace &like_space);
- // Copies the extent of this dataspace.
- void extentCopy(const DataSpace& dest_space) const;
- // removed from 1.8.18 and 1.10.1
- //void extentCopy(DataSpace& dest_space) const;
+ // Copies the extent of this dataspace.
+ void extentCopy(const DataSpace &dest_space) const;
+ // removed from 1.8.18 and 1.10.1
+ // void extentCopy(DataSpace& dest_space) const;
- // Gets the bounding box containing the current selection.
- void getSelectBounds(hsize_t* start, hsize_t* end) const;
+ // Gets the bounding box containing the current selection.
+ void getSelectBounds(hsize_t *start, hsize_t *end) const;
- // Gets the number of element points in the current selection.
- hssize_t getSelectElemNpoints() const;
+ // Gets the number of element points in the current selection.
+ hssize_t getSelectElemNpoints() const;
- // Retrieves the list of element points currently selected.
- void getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const;
+ // Retrieves the list of element points currently selected.
+ void getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const;
- // Gets the list of hyperslab blocks currently selected.
- void getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const;
+ // Gets the list of hyperslab blocks currently selected.
+ void getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const;
- // Get number of hyperslab blocks.
- hssize_t getSelectHyperNblocks() const;
+ // Get number of hyperslab blocks.
+ hssize_t getSelectHyperNblocks() const;
- // Gets the number of elements in this dataspace selection.
- hssize_t getSelectNpoints() const;
+ // Gets the number of elements in this dataspace selection.
+ hssize_t getSelectNpoints() const;
- // Retrieves dataspace dimension size and maximum size.
- int getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims = NULL) const;
+ // Retrieves dataspace dimension size and maximum size.
+ int getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims = NULL) const;
- // Gets the dimensionality of this dataspace.
- int getSimpleExtentNdims() const;
+ // Gets the dimensionality of this dataspace.
+ int getSimpleExtentNdims() const;
- // Gets the number of elements in this dataspace.
- // 12/05/00 - changed return type to hssize_t from hsize_t - C API
- hssize_t getSimpleExtentNpoints() const;
+ // Gets the number of elements in this dataspace.
+ // 12/05/00 - changed return type to hssize_t from hsize_t - C API
+ hssize_t getSimpleExtentNpoints() const;
- // Gets the current class of this dataspace.
- H5S_class_t getSimpleExtentType() const;
+ // Gets the current class of this dataspace.
+ H5S_class_t getSimpleExtentType() const;
- // Determines if this dataspace is a simple one.
- bool isSimple() const;
+ // Determines if this dataspace is a simple one.
+ bool isSimple() const;
- // Sets the offset of this simple dataspace.
- void offsetSimple(const hssize_t* offset) const;
+ // Sets the offset of this simple dataspace.
+ void offsetSimple(const hssize_t *offset) const;
- // Selects the entire dataspace.
- void selectAll() const;
+ // Selects the entire dataspace.
+ void selectAll() const;
- // Selects array elements to be included in the selection for
- // this dataspace.
- void selectElements(H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const;
+ // Selects array elements to be included in the selection for
+ // this dataspace.
+ void selectElements(H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const;
- // Selects a hyperslab region to add to the current selected region.
- void selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL) const;
+ // Selects a hyperslab region to add to the current selected region.
+ void selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start,
+ const hsize_t *stride = NULL, const hsize_t *block = NULL) const;
- // Resets the selection region to include no elements.
- void selectNone() const;
+ // Resets the selection region to include no elements.
+ void selectNone() const;
- // Verifies that the selection is within the extent of the dataspace.
- bool selectValid() const;
+ // Verifies that the selection is within the extent of the dataspace.
+ bool selectValid() const;
- // Removes the extent from this dataspace.
- void setExtentNone() const;
+ // Removes the extent from this dataspace.
+ void setExtentNone() const;
- // Sets or resets the size of this dataspace.
- void setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL) const;
+ // Sets or resets the size of this dataspace.
+ void setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("DataSpace"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("DataSpace");
+ }
- // Gets the dataspace id.
- virtual hid_t getId() const;
+ // Gets the dataspace id.
+ virtual hid_t getId() const;
- // Deletes the global constant
- static void deleteConstants();
+ // Deletes the global constant
+ static void deleteConstants();
- // Destructor: properly terminates access to this dataspace.
- virtual ~DataSpace();
+ // Destructor: properly terminates access to this dataspace.
+ virtual ~DataSpace();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- protected:
- // Sets the dataspace id.
- virtual void p_setId(const hid_t new_id);
+ protected:
+ // Sets the dataspace id.
+ virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- hid_t id; // HDF5 dataspace id
+ private:
+ hid_t id; // HDF5 dataspace id
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- static DataSpace* ALL_;
+ static DataSpace *ALL_;
- // Creates the global constant
- static DataSpace* getConstant();
+ // Creates the global constant
+ static DataSpace *getConstant();
- // Friend function to set DataSpace id. For library use only.
- friend void f_DataSpace_setId(DataSpace *dspace, hid_t new_id);
+ // Friend function to set DataSpace id. For library use only.
+ friend void f_DataSpace_setId(DataSpace *dspace, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 3ed8113..4d298e5 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,7 +18,7 @@
#endif
#include <string>
-#include "H5private.h" // for HDcalloc
+#include "H5private.h" // for HDcalloc
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,9 +39,9 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
//--------------------------------------------------------------------------
// Function: DataType default constructor
@@ -80,8 +80,7 @@ DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), enco
{
// Call C routine to create the new datatype
id = H5Tcreate(type_class, size);
- if(id < 0)
- {
+ if (id < 0) {
throw DataTypeIException("DataType constructor", "H5Tcreate failed");
}
}
@@ -99,7 +98,8 @@ DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), enco
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type)
+ : H5Object(), encoded_buf(NULL), buf_size(0)
{
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereference");
}
@@ -117,7 +117,8 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type)
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const Attribute &attr, const void *ref, H5R_type_t ref_type)
+ : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0)
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
@@ -127,7 +128,7 @@ DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type)
///\brief Copy constructor: makes a copy of the original DataType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType(const DataType& original) : H5Object(), id(original.id), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const DataType &original) : H5Object(), id(original.id), encoded_buf(NULL), buf_size(0)
{
incRefCount(); // increment number of references to this id
}
@@ -145,7 +146,7 @@ DataType::DataType(const DataType& original) : H5Object(), id(original.id), enco
// unnecessarily and will produce undefined behavior.
// -BMR, Apr 2015
//--------------------------------------------------------------------------
-DataType::DataType(const PredType& pred_type) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const PredType &pred_type) : H5Object(), encoded_buf(NULL), buf_size(0)
{
// call C routine to copy the datatype
id = H5Tcopy(pred_type.getId());
@@ -167,7 +168,7 @@ DataType::DataType(const PredType& pred_type) : H5Object(), encoded_buf(NULL), b
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-DataType::DataType(const H5Location& loc, const char *type_name) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const H5Location &loc, const char *type_name) : H5Object(), encoded_buf(NULL), buf_size(0)
{
id = p_opentype(loc, type_name);
}
@@ -186,7 +187,8 @@ DataType::DataType(const H5Location& loc, const char *type_name) : H5Object(), e
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-DataType::DataType(const H5Location& loc, const H5std_string& type_name) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const H5Location &loc, const H5std_string &type_name)
+ : H5Object(), encoded_buf(NULL), buf_size(0)
{
id = p_opentype(loc, type_name.c_str());
}
@@ -203,19 +205,20 @@ DataType::DataType(const H5Location& loc, const H5std_string& type_name) : H5Obj
// - Replaced decRefCount with close() to let the C library
// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
-void DataType::copy(const DataType& like_type)
+void
+DataType::copy(const DataType &like_type)
{
// close the current data type before copying like_type to this object
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataTypeIException(inMemFunc("copy"), close_error.getDetailMsg());
}
// call C routine to copy the datatype
id = H5Tcopy(like_type.getId());
- if(id < 0)
+ if (id < 0)
throw DataTypeIException(inMemFunc("copy"), "H5Tcopy failed");
}
@@ -228,19 +231,20 @@ void DataType::copy(const DataType& like_type)
///\par Description
/// The resulted dataset will be transient and modifiable.
//--------------------------------------------------------------------------
-void DataType::copy(const DataSet& dset)
+void
+DataType::copy(const DataSet &dset)
{
// close the current data type before copying dset's datatype to this object
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataTypeIException(inMemFunc("copy"), close_error.getDetailMsg());
}
// call C routine to copy the datatype
id = H5Tcopy(dset.getId());
- if(id < 0)
+ if (id < 0)
throw DataTypeIException(inMemFunc("copy"), "H5Tcopy failed");
}
@@ -251,7 +255,8 @@ void DataType::copy(const DataSet& dset)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* DataType::decode() const
+DataType *
+DataType::decode() const
{
hid_t encoded_dtype_id = H5I_INVALID_HID;
try {
@@ -262,7 +267,7 @@ DataType* DataType::decode() const
}
DataType *encoded_dtype = new DataType;
encoded_dtype->p_setId(encoded_dtype_id);
- return(encoded_dtype);
+ return (encoded_dtype);
}
//--------------------------------------------------------------------------
@@ -271,27 +276,24 @@ DataType* DataType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-void DataType::encode()
+void
+DataType::encode()
{
// Call H5Tencode passing in null to determine the size of the buffer
herr_t ret_value = H5Tencode(id, NULL, &buf_size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("DataType::encode", "Failed to get buf_size");
}
// Allocate buffer and call C function again to encode
- if (buf_size > 0)
- {
+ if (buf_size > 0) {
encoded_buf = (unsigned char *)HDcalloc((size_t)1, buf_size);
- ret_value = H5Tencode(id, encoded_buf, &buf_size);
- if (ret_value < 0)
- {
+ ret_value = H5Tencode(id, encoded_buf, &buf_size);
+ if (ret_value < 0) {
throw DataTypeIException("DataType::encode", "H5Tencode failed");
}
}
- else
- {
+ else {
throw DataTypeIException("DataType::encode", "Failed to allocate buffer for encoding");
}
}
@@ -303,7 +305,8 @@ void DataType::encode()
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-bool DataType::hasBinaryDesc() const
+bool
+DataType::hasBinaryDesc() const
{
if (encoded_buf != NULL)
return true;
@@ -330,13 +333,13 @@ bool DataType::hasBinaryDesc() const
// transient datatype.
// BMR - Mar, 2015
//--------------------------------------------------------------------------
-DataType& DataType::operator=(const DataType& rhs)
+DataType &
+DataType::operator=(const DataType &rhs)
{
- if (this != &rhs)
- {
+ if (this != &rhs) {
setId(rhs.id);
}
- return(*this);
+ return (*this);
}
//--------------------------------------------------------------------------
@@ -348,17 +351,17 @@ DataType& DataType::operator=(const DataType& rhs)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DataType::operator==(const DataType& compared_type) const
+bool
+DataType::operator==(const DataType &compared_type) const
{
// Call C routine H5Tequal to determines whether two datatype
// identifiers refer to the same datatype
htri_t ret_value = H5Tequal(id, compared_type.getId());
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
- else
- {
+ else {
throw DataTypeIException(inMemFunc("operator=="), "H5Tequal returns negative value");
}
}
@@ -372,7 +375,8 @@ bool DataType::operator==(const DataType& compared_type) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::commit(const H5Location& loc, const char* name)
+void
+DataType::commit(const H5Location &loc, const char *name)
{
p_commit(loc.getId(), name);
}
@@ -391,7 +395,7 @@ void DataType::commit(const H5Location& loc, const char* name)
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void DataType::commit(H5Location& loc, const char* name)
+// void DataType::commit(H5Location& loc, const char* name)
//{
// p_commit(loc.getId(), name);
//}
@@ -403,7 +407,8 @@ void DataType::commit(const H5Location& loc, const char* name)
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::commit(const H5Location& loc, const H5std_string& name)
+void
+DataType::commit(const H5Location &loc, const H5std_string &name)
{
p_commit(loc.getId(), name.c_str());
}
@@ -422,7 +427,7 @@ void DataType::commit(const H5Location& loc, const H5std_string& name)
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void DataType::commit(H5Location& loc, const H5std_string& name)
+// void DataType::commit(H5Location& loc, const H5std_string& name)
//{
// p_commit(loc.getId(), name.c_str());
//}
@@ -436,7 +441,8 @@ void DataType::commit(const H5Location& loc, const H5std_string& name)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DataType::committed() const
+bool
+DataType::committed() const
{
// Call C function to determine if a datatype is a named one
htri_t is_committed = H5Tcommitted(id);
@@ -444,8 +450,7 @@ bool DataType::committed() const
return true;
else if (is_committed == 0)
return false;
- else
- {
+ else {
throw DataTypeIException(inMemFunc("committed"), "H5Tcommitted return negative value");
}
}
@@ -460,15 +465,15 @@ bool DataType::committed() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_conv_t DataType::find(const DataType& dest, H5T_cdata_t **pcdata) const
+H5T_conv_t
+DataType::find(const DataType &dest, H5T_cdata_t **pcdata) const
{
// Call C routine to find the conversion function
H5T_conv_t func = H5Tfind(id, dest.getId(), pcdata);
- if(func == NULL)
- {
+ if (func == NULL) {
throw DataTypeIException(inMemFunc("find"), "H5Tfind returns a NULL function");
}
- return(func);
+ return (func);
}
//--------------------------------------------------------------------------
@@ -484,17 +489,18 @@ H5T_conv_t DataType::find(const DataType& dest, H5T_cdata_t **pcdata) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::convert(const DataType& dest, size_t nelmts, void *buf, void *background, const PropList& plist) const
+void
+DataType::convert(const DataType &dest, size_t nelmts, void *buf, void *background,
+ const PropList &plist) const
{
// Get identifiers for C API
- hid_t dest_id = dest.getId();
+ hid_t dest_id = dest.getId();
hid_t plist_id = plist.getId();
// Call C routine H5Tconvert to convert the data
herr_t ret_value;
ret_value = H5Tconvert(id, dest_id, nelmts, buf, background, plist_id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("convert"), "H5Tconvert failed");
}
}
@@ -513,12 +519,12 @@ void DataType::convert(const DataType& dest, size_t nelmts, void *buf, void *bac
/// the entire library is closed.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::lock() const
+void
+DataType::lock() const
{
// Call C routine to lock the datatype
herr_t ret_value = H5Tlock(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("lock"), "H5Tlock failed");
}
}
@@ -530,16 +536,16 @@ void DataType::lock() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_class_t DataType::getClass() const
+H5T_class_t
+DataType::getClass() const
{
H5T_class_t type_class = H5Tget_class(id);
// Return datatype class identifier if successful
- if(type_class == H5T_NO_CLASS)
- {
+ if (type_class == H5T_NO_CLASS) {
throw DataTypeIException(inMemFunc("getClass"), "H5Tget_class returns H5T_NO_CLASS");
}
- return(type_class);
+ return (type_class);
}
//--------------------------------------------------------------------------
@@ -549,15 +555,16 @@ H5T_class_t DataType::getClass() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-size_t DataType::getSize() const
+size_t
+DataType::getSize() const
{
// Call C routine to get the datatype size
size_t type_size = H5Tget_size(id);
- if(type_size <= 0) // valid data types are never zero size
+ if (type_size <= 0) // valid data types are never zero size
{
throw DataTypeIException(inMemFunc("getSize"), "H5Tget_size returns invalid datatype size");
}
- return(type_size);
+ return (type_size);
}
//--------------------------------------------------------------------------
@@ -567,7 +574,8 @@ size_t DataType::getSize() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType DataType::getSuper() const
+DataType
+DataType::getSuper() const
{
// Call C routine to get the base datatype from which the specified
// datatype is derived.
@@ -575,14 +583,12 @@ DataType DataType::getSuper() const
// If H5Tget_super returns a valid datatype id, create and return
// the base type, otherwise, raise exception
- if(base_type_id > 0)
- {
+ if (base_type_id > 0) {
DataType base_type;
base_type.p_setId(base_type_id);
- return(base_type);
+ return (base_type);
}
- else
- {
+ else {
throw DataTypeIException(inMemFunc("getSuper"), "H5Tget_super failed");
}
}
@@ -603,14 +609,14 @@ DataType DataType::getSuper() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-Register
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func) const
+void
+DataType::registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
{
- hid_t dest_id = dest.getId(); // get id of the destination datatype
+ hid_t dest_id = dest.getId(); // get id of the destination datatype
// Call C routine H5Tregister to register the conversion function
herr_t ret_value = H5Tregister(pers, name, id, dest_id, func);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("registerFunc"), "H5Tregister failed");
}
}
@@ -622,7 +628,8 @@ void DataType::registerFunc(H5T_pers_t pers, const char* name, const DataType& d
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::registerFunc(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func) const
+void
+DataType::registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const
{
registerFunc(pers, name.c_str(), dest, func);
}
@@ -640,14 +647,14 @@ void DataType::registerFunc(H5T_pers_t pers, const H5std_string& name, const Dat
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::unregister(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func) const
+void
+DataType::unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
{
- hid_t dest_id = dest.getId(); // get id of the dest datatype for C API
+ hid_t dest_id = dest.getId(); // get id of the dest datatype for C API
// Call C routine H5Tunregister to remove the conversion function
herr_t ret_value = H5Tunregister(pers, name, id, dest_id, func);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("unregister"), "H5Tunregister failed");
}
}
@@ -659,7 +666,8 @@ void DataType::unregister(H5T_pers_t pers, const char* name, const DataType& des
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::unregister(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func) const
+void
+DataType::unregister(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const
{
unregister(pers, name.c_str(), dest, func);
}
@@ -672,12 +680,12 @@ void DataType::unregister(H5T_pers_t pers, const H5std_string& name, const DataT
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::setTag(const char* tag) const
+void
+DataType::setTag(const char *tag) const
{
// Call C routine H5Tset_tag to tag an opaque datatype.
herr_t ret_value = H5Tset_tag(id, tag);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("setTag"), "H5Tset_tag failed");
}
}
@@ -689,7 +697,8 @@ void DataType::setTag(const char* tag) const
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::setTag(const H5std_string& tag) const
+void
+DataType::setTag(const H5std_string &tag) const
{
setTag(tag.c_str());
}
@@ -701,20 +710,19 @@ void DataType::setTag(const H5std_string& tag) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string DataType::getTag() const
+H5std_string
+DataType::getTag() const
{
- char* tag_Cstr = H5Tget_tag(id);
+ char *tag_Cstr = H5Tget_tag(id);
// if the tag C-string returned is not NULL, convert it to C++ string
// and return it, otherwise, raise an exception
- if(tag_Cstr != NULL)
- {
+ if (tag_Cstr != NULL) {
H5std_string tag = H5std_string(tag_Cstr); // C string to string object
- H5free_memory(tag_Cstr); // free the C string
- return (tag); // return the tag
+ H5free_memory(tag_Cstr); // free the C string
+ return (tag); // return the tag
}
- else
- {
+ else {
throw DataTypeIException(inMemFunc("getTag"), "H5Tget_tag returns NULL for tag");
}
}
@@ -728,17 +736,16 @@ H5std_string DataType::getTag() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-bool DataType::detectClass(H5T_class_t cls) const
+bool
+DataType::detectClass(H5T_class_t cls) const
{
htri_t ret_value = H5Tdetect_class(id, cls);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
- else
- {
- throw DataTypeIException(inMemFunc("detectClass"),
- "H5Tdetect_class returns negative value");
+ else {
+ throw DataTypeIException(inMemFunc("detectClass"), "H5Tdetect_class returns negative value");
}
}
@@ -750,17 +757,16 @@ bool DataType::detectClass(H5T_class_t cls) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-bool DataType::isVariableStr() const
+bool
+DataType::isVariableStr() const
{
htri_t is_varlen_str = H5Tis_variable_str(id);
- if(is_varlen_str == 1)
+ if (is_varlen_str == 1)
return true;
- else if(is_varlen_str == 0)
+ else if (is_varlen_str == 0)
return false;
- else
- {
- throw DataTypeIException(inMemFunc("isVariableStr"),
- "H5Tis_variable_str returns negative value");
+ else {
+ throw DataTypeIException(inMemFunc("isVariableStr"), "H5Tis_variable_str returns negative value");
}
}
@@ -775,18 +781,17 @@ bool DataType::isVariableStr() const
// Currently, there is no datatype creation property list class
// in the C++ API because there is no associated functionality.
//--------------------------------------------------------------------------
-PropList DataType::getCreatePlist() const
+PropList
+DataType::getCreatePlist() const
{
hid_t create_plist_id = H5Tget_create_plist(id);
- if (create_plist_id < 0)
- {
- throw DataTypeIException(inMemFunc("getCreatePlist"),
- "H5Tget_create_plist returns negative value");
+ if (create_plist_id < 0) {
+ throw DataTypeIException(inMemFunc("getCreatePlist"), "H5Tget_create_plist returns negative value");
}
// create and return the DSetCreatPropList object
PropList create_plist;
f_PropList_setId(&create_plist, create_plist_id);
- return(create_plist);
+ return (create_plist);
}
//--------------------------------------------------------------------------
@@ -801,9 +806,10 @@ PropList DataType::getCreatePlist() const
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t DataType::getId() const
+hid_t
+DataType::getId() const
{
- return(id);
+ return (id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -821,11 +827,12 @@ hid_t DataType::getId() const
// to be commonly used by several overloads of DataType::commit.
// BMR - Jan, 2007
//--------------------------------------------------------------------------
-void DataType::p_commit(hid_t loc_id, const char* name)
+void
+DataType::p_commit(hid_t loc_id, const char *name)
{
// Call C routine to commit the transient datatype
herr_t ret_value = H5Tcommit2(loc_id, name, id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throw DataTypeIException(inMemFunc("p_commit"), "H5Tcommit2 failed");
}
@@ -836,11 +843,11 @@ void DataType::p_commit(hid_t loc_id, const char* name)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-hid_t DataType::p_decode() const
+hid_t
+DataType::p_decode() const
{
// Make sure that the buffer can be decoded
- if (encoded_buf == NULL)
- {
+ if (encoded_buf == NULL) {
throw DataTypeIException("DataType::p_decode", "No encoded buffer");
}
@@ -848,13 +855,11 @@ hid_t DataType::p_decode() const
hid_t encoded_dtype_id = H5Tdecode(encoded_buf);
// If H5Tdecode fails, raise exception
- if (encoded_dtype_id < 0)
- {
+ if (encoded_dtype_id < 0) {
throw DataTypeIException("DataType::p_decode", "H5Tdecode failed");
}
- else
- {
- return(encoded_dtype_id);
+ else {
+ return (encoded_dtype_id);
}
}
@@ -869,13 +874,14 @@ hid_t DataType::p_decode() const
// This function was introduced in 1.8.20 to be used by the
// new XxxType constructors that open a datatype. -BMR, Sept 2017
//--------------------------------------------------------------------------
-hid_t DataType::p_opentype(const H5Location& loc, const char *type_name) const
+hid_t
+DataType::p_opentype(const H5Location &loc, const char *type_name) const
{
// Call C function to open the named datatype at this location
hid_t ret_value = H5Topen2(loc.getId(), type_name, H5P_DEFAULT);
if (ret_value < 0)
throw DataTypeIException(inMemFunc("constructor"), "H5Topen2 failed");
- return(ret_value);
+ return (ret_value);
}
//--------------------------------------------------------------------------
@@ -890,13 +896,14 @@ hid_t DataType::p_opentype(const H5Location& loc, const char *type_name) const
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::p_setId(const hid_t new_id)
+void
+DataType::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw DataTypeIException(inMemFunc("p_setId"), close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -911,13 +918,12 @@ void DataType::p_setId(const hid_t new_id)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void DataType::close()
+void
+DataType::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Tclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
}
// reset the id
@@ -933,7 +939,8 @@ void DataType::close()
///\exception H5::DataTypeIException
// May 2018
//--------------------------------------------------------------------------
-void DataType::throwException(const H5std_string& func_name, const H5std_string& msg) const
+void
+DataType::throwException(const H5std_string &func_name, const H5std_string &msg) const
{
throw DataTypeIException(inMemFunc(func_name.c_str()), msg);
}
@@ -958,12 +965,11 @@ void DataType::throwException(const H5std_string& func_name, const H5std_string&
//--------------------------------------------------------------------------
DataType::~DataType()
{
- try
- {
+ try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index efb0c14..e5474e2 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,146 +26,151 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP DataType : public H5Object {
- public:
- // Creates a datatype given its class and size
- DataType(const H5T_class_t type_class, size_t size);
+ public:
+ // Creates a datatype given its class and size
+ DataType(const H5T_class_t type_class, size_t size);
- // Copy constructor: makes a copy of the original object
- DataType(const DataType& original);
+ // Copy constructor: makes a copy of the original object
+ DataType(const DataType &original);
- // Creates a copy of a predefined type
- DataType(const PredType& pred_type);
+ // Creates a copy of a predefined type
+ DataType(const PredType &pred_type);
- // Opens a generic named datatype at a given location.
- DataType(const H5Location& loc, const char* name);
- DataType(const H5Location& loc, const H5std_string& name);
+ // Opens a generic named datatype at a given location.
+ DataType(const H5Location &loc, const char *name);
+ DataType(const H5Location &loc, const H5std_string &name);
- // Creates a datatype by way of dereference.
- DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
+ // Creates a datatype by way of dereference.
+ DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+ DataType(const Attribute &attr, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
- // Closes this datatype.
- virtual void close();
+ // Closes this datatype.
+ virtual void close();
- // Copies an existing datatype to this datatype object.
- void copy(const DataType& like_type);
+ // Copies an existing datatype to this datatype object.
+ void copy(const DataType &like_type);
- // Copies the datatype of dset to this datatype object.
- void copy(const DataSet& dset);
+ // Copies the datatype of dset to this datatype object.
+ void copy(const DataSet &dset);
- // Returns a DataType instance by decoding the binary object
- // description of this datatype.
- virtual DataType* decode() const;
+ // Returns a DataType instance by decoding the binary object
+ // description of this datatype.
+ virtual DataType *decode() const;
- // Creates a binary object description of this datatype.
- void encode();
+ // Creates a binary object description of this datatype.
+ void encode();
- // Returns the datatype class identifier.
- H5T_class_t getClass() const;
+ // Returns the datatype class identifier.
+ H5T_class_t getClass() const;
- // Commits a transient datatype to a file; this datatype becomes
- // a named datatype which can be accessed from the location.
- void commit(const H5Location& loc, const char* name);
- void commit(const H5Location& loc, const H5std_string& name);
+ // Commits a transient datatype to a file; this datatype becomes
+ // a named datatype which can be accessed from the location.
+ void commit(const H5Location &loc, const char *name);
+ void commit(const H5Location &loc, const H5std_string &name);
- // Determines whether this datatype is a named datatype or
- // a transient datatype.
- bool committed() const;
+ // Determines whether this datatype is a named datatype or
+ // a transient datatype.
+ bool committed() const;
- // Finds a conversion function that can handle the conversion
- // this datatype to the given datatype, dest.
- H5T_conv_t find(const DataType& dest, H5T_cdata_t **pcdata) const;
+ // Finds a conversion function that can handle the conversion
+ // this datatype to the given datatype, dest.
+ H5T_conv_t find(const DataType &dest, H5T_cdata_t **pcdata) const;
- // Converts data from between specified datatypes.
- void convert(const DataType& dest, size_t nelmts, void *buf, void *background, const PropList& plist=PropList::DEFAULT) const;
+ // Converts data from between specified datatypes.
+ void convert(const DataType &dest, size_t nelmts, void *buf, void *background,
+ const PropList &plist = PropList::DEFAULT) const;
- // Assignment operator
- DataType& operator=(const DataType& rhs);
+ // Assignment operator
+ DataType &operator=(const DataType &rhs);
- // Determines whether two datatypes are the same.
- bool operator==(const DataType& compared_type) const;
+ // Determines whether two datatypes are the same.
+ bool operator==(const DataType &compared_type) const;
- // Locks a datatype.
- void lock() const;
+ // Locks a datatype.
+ void lock() const;
- // Returns the size of a datatype.
- size_t getSize() const;
+ // Returns the size of a datatype.
+ size_t getSize() const;
- // Returns the base datatype from which a datatype is derived.
- // Note: not quite right for specific types yet???
- DataType getSuper() const;
+ // Returns the base datatype from which a datatype is derived.
+ // Note: not quite right for specific types yet???
+ DataType getSuper() const;
- // Registers a conversion function.
- void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func) const;
- void registerFunc(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func) const;
+ // Registers a conversion function.
+ void registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const;
+ void registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const;
- // Removes a conversion function from all conversion paths.
- void unregister(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func) const;
- void unregister(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func) const;
+ // Removes a conversion function from all conversion paths.
+ void unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const;
+ void unregister(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const;
- // Tags an opaque datatype.
- void setTag(const char* tag) const;
- void setTag(const H5std_string& tag) const;
+ // Tags an opaque datatype.
+ void setTag(const char *tag) const;
+ void setTag(const H5std_string &tag) const;
- // Gets the tag associated with an opaque datatype.
- H5std_string getTag() const;
+ // Gets the tag associated with an opaque datatype.
+ H5std_string getTag() const;
- // Checks whether this datatype contains (or is) a certain type class.
- bool detectClass(H5T_class_t cls) const;
+ // Checks whether this datatype contains (or is) a certain type class.
+ bool detectClass(H5T_class_t cls) const;
- // Checks whether this datatype is a variable-length string.
- bool isVariableStr() const;
+ // Checks whether this datatype is a variable-length string.
+ bool isVariableStr() const;
- // Returns a copy of the creation property list of a datatype.
- PropList getCreatePlist() const;
+ // Returns a copy of the creation property list of a datatype.
+ PropList getCreatePlist() const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("DataType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("DataType");
+ }
- // Throw DataTypeIException.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
+ // Throw DataTypeIException.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
- // Creates a copy of an existing DataType using its id
- DataType(const hid_t type_id);
+ // Creates a copy of an existing DataType using its id
+ DataType(const hid_t type_id);
- // Default constructor
- DataType();
+ // Default constructor
+ DataType();
- // Determines whether this datatype has a binary object description.
- bool hasBinaryDesc() const;
+ // Determines whether this datatype has a binary object description.
+ bool hasBinaryDesc() const;
- // Gets the datatype id.
- virtual hid_t getId() const;
+ // Gets the datatype id.
+ virtual hid_t getId() const;
- // Destructor: properly terminates access to this datatype.
- virtual ~DataType();
+ // Destructor: properly terminates access to this datatype.
+ virtual ~DataType();
- protected:
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- hid_t id; // HDF5 datatype id
+ hid_t id; // HDF5 datatype id
- // Returns an id of a type by decoding the binary object
- // description of this datatype.
- hid_t p_decode() const;
+ // Returns an id of a type by decoding the binary object
+ // description of this datatype.
+ hid_t p_decode() const;
- // Sets the datatype id.
- virtual void p_setId(const hid_t new_id);
+ // Sets the datatype id.
+ virtual void p_setId(const hid_t new_id);
- // Opens a datatype and returns the id.
- hid_t p_opentype(const H5Location& loc, const char* dtype_name) const;
+ // Opens a datatype and returns the id.
+ hid_t p_opentype(const H5Location &loc, const char *dtype_name) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- // Buffer for binary object description of this datatype, allocated
- // in DataType::encode and used in DataType::decode
- unsigned char *encoded_buf;
- size_t buf_size;
+ private:
+ // Buffer for binary object description of this datatype, allocated
+ // in DataType::encode and used in DataType::decode
+ unsigned char *encoded_buf;
+ size_t buf_size;
- // Friend function to set DataType id. For library use only.
- friend void f_DataType_setId(DataType* dtype, hid_t new_id);
+ // Friend function to set DataType id. For library use only.
+ friend void f_DataType_setId(DataType *dtype, hid_t new_id);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- void p_commit(hid_t loc_id, const char* name);
+ void p_commit(hid_t loc_id, const char *name);
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of DataType
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 2e5b2e4..a815afa 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -34,7 +34,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-DSetCreatPropList* DSetCreatPropList::DEFAULT_ = 0;
+DSetCreatPropList *DSetCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getConstant
@@ -48,13 +48,13 @@ DSetCreatPropList* DSetCreatPropList::DEFAULT_ = 0;
// not happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-DSetCreatPropList* DSetCreatPropList::getConstant()
+DSetCreatPropList *
+DSetCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -63,8 +63,9 @@ DSetCreatPropList* DSetCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new DSetCreatPropList(H5P_DATASET_CREATE);
else
- throw PropListIException("DSetCreatPropList::getConstant", "DSetCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("DSetCreatPropList::getConstant",
+ "DSetCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -73,7 +74,8 @@ DSetCreatPropList* DSetCreatPropList::getConstant()
// points to.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void DSetCreatPropList::deleteConstants()
+void
+DSetCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -82,7 +84,7 @@ void DSetCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose Constant for dataset creation default property
//--------------------------------------------------------------------------
-const DSetCreatPropList& DSetCreatPropList::DEFAULT = *getConstant();
+const DSetCreatPropList &DSetCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -99,7 +101,7 @@ DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) {}
/// DSetCreatPropList object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList& orig) : ObjCreatPropList(orig) {}
+DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPropList(orig) {}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList overloaded constructor
@@ -124,11 +126,11 @@ DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(pl
/// changed to \c H5D_CHUNKED, if it is not so already.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim) const
+void
+DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const
{
herr_t ret_value = H5Pset_chunk(id, ndims, dim);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("DSetCreatPropList::setChunk", "H5Pset_chunk failed");
}
}
@@ -142,15 +144,14 @@ void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim) const
+int
+DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const
{
int chunk_size = H5Pget_chunk(id, max_ndims, dim);
- if(chunk_size < 0)
- {
- throw PropListIException("DSetCreatPropList::getChunk",
- "H5Pget_chunk returns negative chunk size");
+ if (chunk_size < 0) {
+ throw PropListIException("DSetCreatPropList::getChunk", "H5Pget_chunk returns negative chunk size");
}
- return(chunk_size);
+ return (chunk_size);
}
//--------------------------------------------------------------------------
@@ -163,13 +164,12 @@ int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLayout
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setLayout(H5D_layout_t layout) const
+void
+DSetCreatPropList::setLayout(H5D_layout_t layout) const
{
herr_t ret_value = H5Pset_layout(id, layout);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setLayout",
- "H5Pset_layout failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setLayout", "H5Pset_layout failed");
}
}
@@ -189,15 +189,14 @@ void DSetCreatPropList::setLayout(H5D_layout_t layout) const
///\par Description
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_layout_t DSetCreatPropList::getLayout() const
+H5D_layout_t
+DSetCreatPropList::getLayout() const
{
H5D_layout_t layout = H5Pget_layout(id);
- if(layout == H5D_LAYOUT_ERROR)
- {
- throw PropListIException("DSetCreatPropList::getLayout",
- "H5Pget_layout returns H5D_LAYOUT_ERROR");
+ if (layout == H5D_LAYOUT_ERROR) {
+ throw PropListIException("DSetCreatPropList::getLayout", "H5Pget_layout returns H5D_LAYOUT_ERROR");
}
- return(layout);
+ return (layout);
}
//--------------------------------------------------------------------------
@@ -212,13 +211,12 @@ H5D_layout_t DSetCreatPropList::getLayout() const
/// less compression.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setDeflate(int level) const
+void
+DSetCreatPropList::setDeflate(int level) const
{
herr_t ret_value = H5Pset_deflate(id, level);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setDeflate",
- "H5Pset_deflate failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setDeflate", "H5Pset_deflate failed");
}
}
@@ -239,13 +237,12 @@ void DSetCreatPropList::setDeflate(int level) const
/// https://support.hdfgroup.org/HDF5/doc/RM_H5P.html#Property-SetSzip
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
-void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const
+void
+DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const
{
herr_t ret_value = H5Pset_szip(id, options_mask, pixels_per_block);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setSzip",
- "H5Pset_szip failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setSzip", "H5Pset_szip failed");
}
}
@@ -261,13 +258,12 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-setNbit
// Programmer Binh-Minh Ribler - Apr, 2016
//--------------------------------------------------------------------------
-void DSetCreatPropList::setNbit() const
+void
+DSetCreatPropList::setNbit() const
{
herr_t ret_value = H5Pset_nbit(id);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setNbit",
- "H5Pset_nbit failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setNbit", "H5Pset_nbit failed");
}
}
@@ -289,13 +285,12 @@ void DSetCreatPropList::setNbit() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFillValue(const DataType& fvalue_type, const void* value) const
+void
+DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value) const
{
herr_t ret_value = H5Pset_fill_value(id, fvalue_type.getId(), value);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFillValue",
- "H5Pset_fill_value failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFillValue", "H5Pset_fill_value failed");
}
}
@@ -312,13 +307,12 @@ void DSetCreatPropList::setFillValue(const DataType& fvalue_type, const void* va
/// specified by \a fvalue_type.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getFillValue(const DataType& fvalue_type, void* value) const
+void
+DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const
{
herr_t ret_value = H5Pget_fill_value(id, fvalue_type.getId(), value);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getFillValue",
- "H5Pget_fill_value failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getFillValue", "H5Pget_fill_value failed");
}
}
@@ -332,14 +326,14 @@ void DSetCreatPropList::getFillValue(const DataType& fvalue_type, void* value) c
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
+H5D_fill_value_t
+DSetCreatPropList::isFillValueDefined() const
{
H5D_fill_value_t status;
- herr_t ret_value = H5Pfill_value_defined(id, &status);
- if(ret_value < 0)
- {
+ herr_t ret_value = H5Pfill_value_defined(id, &status);
+ if (ret_value < 0) {
throw PropListIException("DSetCreatPropList::isFillValueDefined",
- "H5Pfill_value_defined returned H5D_FILL_VALUE_ERROR (-1)");
+ "H5Pfill_value_defined returned H5D_FILL_VALUE_ERROR (-1)");
}
else
return (status);
@@ -365,14 +359,13 @@ H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags,
- size_t cd_nelmts, const unsigned int cd_values[]) const
+void
+DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[]) const
{
herr_t ret_value = H5Pset_filter(id, filter_id, flags, cd_nelmts, cd_values);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFilter",
- "H5Pset_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFilter", "H5Pset_filter failed");
}
}
@@ -386,13 +379,12 @@ void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags,
/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
+void
+DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
{
herr_t ret_value = H5Premove_filter(id, filter_id);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::removeFilter",
- "H5Premove_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::removeFilter", "H5Premove_filter failed");
}
}
@@ -403,16 +395,16 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getNfilters() const
+int
+DSetCreatPropList::getNfilters() const
{
int num_filters = H5Pget_nfilters(id);
- if(num_filters < 0)
- {
+ if (num_filters < 0) {
throw PropListIException("DSetCreatPropList::getNfilters",
- "H5Pget_nfilters returned negative number of filters");
+ "H5Pget_nfilters returned negative number of filters");
}
else
- return(num_filters);
+ return (num_filters);
}
//--------------------------------------------------------------------------
@@ -435,18 +427,18 @@ int DSetCreatPropList::getNfilters() const
// of unsigned int, but for backward compatibility, it cannot be
// changed. -BMR (2014/04/15)
//--------------------------------------------------------------------------
-H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
- unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
- size_t namelen, char name[], unsigned int& filter_config) const
+H5Z_filter_t
+DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int *cd_values, size_t namelen, char name[],
+ unsigned int &filter_config) const
{
H5Z_filter_t filter_id;
- filter_id = H5Pget_filter2(id, filter_number, &flags, &cd_nelmts,
- cd_values, namelen, name, &filter_config);
- if(filter_id == H5Z_FILTER_ERROR)
- throw PropListIException("DSetCreatPropList::getFilter",
- "H5Pget_filter2 returned H5Z_FILTER_ERROR");
- else
- return(filter_id);
+ filter_id =
+ H5Pget_filter2(id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config);
+ if (filter_id == H5Z_FILTER_ERROR)
+ throw PropListIException("DSetCreatPropList::getFilter", "H5Pget_filter2 returned H5Z_FILTER_ERROR");
+ else
+ return (filter_id);
}
//--------------------------------------------------------------------------
@@ -464,15 +456,15 @@ H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,
- unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
- size_t namelen, char name[], unsigned int &filter_config) const
+void
+DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int *cd_values, size_t namelen, char name[],
+ unsigned int &filter_config) const
{
- herr_t ret_value = H5Pget_filter_by_id2(id, filter_id, &flags, &cd_nelmts,
- cd_values, namelen, name, &filter_config);
+ herr_t ret_value =
+ H5Pget_filter_by_id2(id, filter_id, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config);
if (ret_value < 0)
- throw PropListIException("DSetCreatPropList::getFilterById",
- "H5Pget_filter_by_id2 failed");
+ throw PropListIException("DSetCreatPropList::getFilterById", "H5Pget_filter_by_id2 failed");
}
//--------------------------------------------------------------------------
@@ -496,14 +488,13 @@ void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int
- flags, size_t cd_nelmts, const unsigned int cd_values[]) const
+void
+DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[]) const
{
herr_t ret_value = H5Pmodify_filter(id, filter_id, flags, cd_nelmts, cd_values);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::modifyFilter",
- "H5Pmodify_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::modifyFilter", "H5Pmodify_filter failed");
}
}
@@ -516,16 +507,18 @@ void DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DSetCreatPropList::allFiltersAvail() const
+bool
+DSetCreatPropList::allFiltersAvail() const
{
htri_t ret_value = H5Pall_filters_avail(id);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Pall_filters_avail returns a negative value
{
- throw PropListIException("DSetCreatPropList::allFiltersAvail", "H5Pall_filters_avail returned negative value");
+ throw PropListIException("DSetCreatPropList::allFiltersAvail",
+ "H5Pall_filters_avail returned negative value");
}
}
@@ -540,13 +533,12 @@ bool DSetCreatPropList::allFiltersAvail() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetShuffle
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setShuffle() const
+void
+DSetCreatPropList::setShuffle() const
{
herr_t ret_value = H5Pset_shuffle(id);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setShuffle",
- "H5Pset_shuffle failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setShuffle", "H5Pset_shuffle failed");
}
}
@@ -564,14 +556,13 @@ void DSetCreatPropList::setShuffle() const
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
+H5D_alloc_time_t
+DSetCreatPropList::getAllocTime() const
{
H5D_alloc_time_t alloc_time;
- herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getAllocTime",
- "H5Pget_alloc_time failed");
+ herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getAllocTime", "H5Pget_alloc_time failed");
}
else
return (alloc_time);
@@ -588,14 +579,13 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_time_t DSetCreatPropList::getFillTime() const
+H5D_fill_time_t
+DSetCreatPropList::getFillTime() const
{
H5D_fill_time_t fill_time;
- herr_t ret_value = H5Pget_fill_time(id, &fill_time);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getFillTime",
- "H5Pget_fill_time failed");
+ herr_t ret_value = H5Pget_fill_time(id, &fill_time);
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getFillTime", "H5Pget_fill_time failed");
}
else
return (fill_time);
@@ -614,13 +604,12 @@ H5D_fill_time_t DSetCreatPropList::getFillTime() const
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
+void
+DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
{
herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setAllocTime",
- "H5Pset_alloc_time failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setAllocTime", "H5Pset_alloc_time failed");
}
}
@@ -635,13 +624,12 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
+void
+DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
{
herr_t ret_value = H5Pset_fill_time(id, fill_time);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFillTime",
- "H5Pset_fill_time failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFillTime", "H5Pset_fill_time failed");
}
}
@@ -652,13 +640,12 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFletcher32() const
+void
+DSetCreatPropList::setFletcher32() const
{
herr_t ret_value = H5Pset_fletcher32(id);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFletcher32",
- "H5Pset_fletcher32 failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFletcher32", "H5Pset_fletcher32 failed");
}
}
@@ -678,13 +665,12 @@ void DSetCreatPropList::setFletcher32() const
/// the extending).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setExternal(const char* name, off_t offset, hsize_t size) const
+void
+DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const
{
herr_t ret_value = H5Pset_external(id, name, offset, size);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setExternal",
- "H5Pset_external failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setExternal", "H5Pset_external failed");
}
}
@@ -695,16 +681,16 @@ void DSetCreatPropList::setExternal(const char* name, off_t offset, hsize_t size
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getExternalCount() const
+int
+DSetCreatPropList::getExternalCount() const
{
int num_ext_files = H5Pget_external_count(id);
- if(num_ext_files < 0)
- {
+ if (num_ext_files < 0) {
throw PropListIException("DSetCreatPropList::getExternalCount",
- "H5Pget_external_count returns negative number of external files");
+ "H5Pget_external_count returns negative number of external files");
}
else
- return(num_ext_files);
+ return (num_ext_files);
}
//--------------------------------------------------------------------------
@@ -729,13 +715,12 @@ int DSetCreatPropList::getExternalCount() const
/// will not be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size) const
+void
+DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
{
herr_t ret_value = H5Pget_external(id, idx, name_size, name, &offset, &size);
- if(ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getExternal",
- "H5Pget_external failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getExternal", "H5Pget_external failed");
}
}
@@ -744,6 +729,6 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name,
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::~DSetCreatPropList () {}
+DSetCreatPropList::~DSetCreatPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index e085fa5..e437aea 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,117 +26,126 @@ namespace H5 {
class DataType;
class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
- public:
- ///\brief Default dataset creation property list.
- static const DSetCreatPropList& DEFAULT;
+ public:
+ ///\brief Default dataset creation property list.
+ static const DSetCreatPropList &DEFAULT;
- // Creates a dataset creation property list.
- DSetCreatPropList();
+ // Creates a dataset creation property list.
+ DSetCreatPropList();
- // Queries whether all the filters set in this property list are
- // available currently.
- bool allFiltersAvail() const;
+ // Queries whether all the filters set in this property list are
+ // available currently.
+ bool allFiltersAvail() const;
- // Get space allocation time for this property.
- H5D_alloc_time_t getAllocTime() const;
+ // Get space allocation time for this property.
+ H5D_alloc_time_t getAllocTime() const;
- // Set space allocation time for dataset during creation.
- void setAllocTime(H5D_alloc_time_t alloc_time) const;
+ // Set space allocation time for dataset during creation.
+ void setAllocTime(H5D_alloc_time_t alloc_time) const;
- // Retrieves the size of the chunks used to store a chunked layout dataset.
- int getChunk(int max_ndims, hsize_t* dim) const;
+ // Retrieves the size of the chunks used to store a chunked layout dataset.
+ int getChunk(int max_ndims, hsize_t *dim) const;
- // Sets the size of the chunks used to store a chunked layout dataset.
- void setChunk(int ndims, const hsize_t* dim) const;
+ // Sets the size of the chunks used to store a chunked layout dataset.
+ void setChunk(int ndims, const hsize_t *dim) const;
- // Returns information about an external file.
- void getExternal(unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size) const;
+ // Returns information about an external file.
+ void getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const;
- // Returns the number of external files for a dataset.
- int getExternalCount() const;
+ // Returns the number of external files for a dataset.
+ int getExternalCount() const;
- // Gets fill value writing time.
- H5D_fill_time_t getFillTime() const;
+ // Gets fill value writing time.
+ H5D_fill_time_t getFillTime() const;
- // Sets fill value writing time for dataset.
- void setFillTime(H5D_fill_time_t fill_time) const;
+ // Sets fill value writing time for dataset.
+ void setFillTime(H5D_fill_time_t fill_time) const;
- // Retrieves a dataset fill value.
- void getFillValue(const DataType& fvalue_type, void* value) const;
+ // Retrieves a dataset fill value.
+ void getFillValue(const DataType &fvalue_type, void *value) const;
- // Sets a dataset fill value.
- void setFillValue(const DataType& fvalue_type, const void* value) const;
+ // Sets a dataset fill value.
+ void setFillValue(const DataType &fvalue_type, const void *value) const;
- // Returns information about a filter in a pipeline.
- H5Z_filter_t getFilter(int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
+ // Returns information about a filter in a pipeline.
+ H5Z_filter_t getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts, unsigned int *cd_values,
+ size_t namelen, char name[], unsigned int &filter_config) const;
- // Returns information about a filter in a pipeline given the filter id.
- void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
+ // Returns information about a filter in a pipeline given the filter id.
+ void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int *cd_values, size_t namelen, char name[],
+ unsigned int &filter_config) const;
- // Gets the layout of the raw data storage of the data that uses this
- // property list.
- H5D_layout_t getLayout() const;
+ // Gets the layout of the raw data storage of the data that uses this
+ // property list.
+ H5D_layout_t getLayout() const;
- // Sets the type of storage used to store the raw data for the
- // dataset that uses this property list.
- void setLayout(H5D_layout_t layout) const;
+ // Sets the type of storage used to store the raw data for the
+ // dataset that uses this property list.
+ void setLayout(H5D_layout_t layout) const;
- // Returns the number of filters in the pipeline.
- int getNfilters() const;
+ // Returns the number of filters in the pipeline.
+ int getNfilters() const;
- // Checks if fill value has been defined for this property.
- H5D_fill_value_t isFillValueDefined() const;
+ // Checks if fill value has been defined for this property.
+ H5D_fill_value_t isFillValueDefined() const;
- // Modifies the specified filter.
- void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[]) const;
+ // Modifies the specified filter.
+ void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[]) const;
- // Remove one or all filters from the filter pipeline.
- void removeFilter(H5Z_filter_t filter_id) const;
+ // Remove one or all filters from the filter pipeline.
+ void removeFilter(H5Z_filter_t filter_id) const;
- // Sets compression method and compression level.
- void setDeflate(int level) const;
+ // Sets compression method and compression level.
+ void setDeflate(int level) const;
- // Adds an external file to the list of external files.
- void setExternal(const char* name, off_t offset, hsize_t size) const;
+ // Adds an external file to the list of external files.
+ void setExternal(const char *name, off_t offset, hsize_t size) const;
- // Adds a filter to the filter pipeline.
- void setFilter(H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const;
+ // Adds a filter to the filter pipeline.
+ void setFilter(H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0,
+ const unsigned int cd_values[] = NULL) const;
- // Sets Fletcher32 checksum of EDC for this property list.
- void setFletcher32() const;
+ // Sets Fletcher32 checksum of EDC for this property list.
+ void setFletcher32() const;
- // Sets method of the shuffle filter.
- void setShuffle() const;
+ // Sets method of the shuffle filter.
+ void setShuffle() const;
- // Sets SZIP compression method.
- void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
+ // Sets SZIP compression method.
+ void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
- // Sets N-bit compression method.
- void setNbit() const;
+ // Sets N-bit compression method.
+ void setNbit() const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("DSetCreatPropList");
+ }
- // Copy constructor: creates a copy of a DSetCreatPropList object.
- DSetCreatPropList(const DSetCreatPropList& orig);
+ // Copy constructor: creates a copy of a DSetCreatPropList object.
+ DSetCreatPropList(const DSetCreatPropList &orig);
- // Creates a copy of an existing dataset creation property list
- // using the property list id.
- DSetCreatPropList(const hid_t plist_id);
+ // Creates a copy of an existing dataset creation property list
+ // using the property list id.
+ DSetCreatPropList(const hid_t plist_id);
- // Noop destructor.
- virtual ~DSetCreatPropList();
+ // Noop destructor.
+ virtual ~DSetCreatPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static DSetCreatPropList* DEFAULT_;
+ private:
+ static DSetCreatPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static DSetCreatPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static DSetCreatPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index f303e95..629a8c1 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -28,7 +28,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-DSetMemXferPropList* DSetMemXferPropList::DEFAULT_ = 0;
+DSetMemXferPropList *DSetMemXferPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getConstant
@@ -42,13 +42,13 @@ DSetMemXferPropList* DSetMemXferPropList::DEFAULT_ = 0;
// happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-DSetMemXferPropList* DSetMemXferPropList::getConstant()
+DSetMemXferPropList *
+DSetMemXferPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -57,8 +57,10 @@ DSetMemXferPropList* DSetMemXferPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new DSetMemXferPropList(H5P_DATASET_XFER);
else
- throw PropListIException("DSetMemXferPropList::getConstant", "DSetMemXferPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException(
+ "DSetMemXferPropList::getConstant",
+ "DSetMemXferPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -67,7 +69,8 @@ DSetMemXferPropList* DSetMemXferPropList::getConstant()
// points to.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void DSetMemXferPropList::deleteConstants()
+void
+DSetMemXferPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -76,7 +79,7 @@ void DSetMemXferPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose Constant for default dataset memory and transfer property list.
//--------------------------------------------------------------------------
-const DSetMemXferPropList& DSetMemXferPropList::DEFAULT = *getConstant();
+const DSetMemXferPropList &DSetMemXferPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -94,7 +97,7 @@ DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
/// expression.
// March 2014
//--------------------------------------------------------------------------
-DSetMemXferPropList::DSetMemXferPropList(const char* exp) : PropList(H5P_DATASET_XFER)
+DSetMemXferPropList::DSetMemXferPropList(const char *exp) : PropList(H5P_DATASET_XFER)
{
setDataTransform(exp);
}
@@ -107,7 +110,7 @@ DSetMemXferPropList::DSetMemXferPropList(const char* exp) : PropList(H5P_DATASET
/// list object to copy
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList& original) : PropList(original) {}
+DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function DSetMemXferPropList overloaded constructor
@@ -128,13 +131,12 @@ DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setBuffer(size_t size, void* tconv, void* bkg) const
+void
+DSetMemXferPropList::setBuffer(size_t size, void *tconv, void *bkg) const
{
herr_t ret_value = H5Pset_buffer(id, size, tconv, bkg);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setBuffer",
- "H5Pset_buffer failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setBuffer", "H5Pset_buffer failed");
}
}
@@ -147,15 +149,15 @@ void DSetMemXferPropList::setBuffer(size_t size, void* tconv, void* bkg) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-size_t DSetMemXferPropList::getBuffer(void** tconv, void** bkg) const
+size_t
+DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const
{
size_t buffer_size = H5Pget_buffer(id, tconv, bkg);
- if(buffer_size == 0)
- {
+ if (buffer_size == 0) {
throw PropListIException("DSetMemXferPropList::getBuffer",
- "H5Pget_buffer returned 0 for buffer size - failure");
+ "H5Pget_buffer returned 0 for buffer size - failure");
}
- return(buffer_size);
+ return (buffer_size);
}
//--------------------------------------------------------------------------
@@ -165,13 +167,12 @@ size_t DSetMemXferPropList::getBuffer(void** tconv, void** bkg) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setPreserve(bool status) const
+void
+DSetMemXferPropList::setPreserve(bool status) const
{
- herr_t ret_value = H5Pset_preserve(id, (hbool_t) status);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setPreserve",
- "H5Pset_preserve failed");
+ herr_t ret_value = H5Pset_preserve(id, (hbool_t)status);
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setPreserve", "H5Pset_preserve failed");
}
}
@@ -182,17 +183,17 @@ void DSetMemXferPropList::setPreserve(bool status) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DSetMemXferPropList::getPreserve() const
+bool
+DSetMemXferPropList::getPreserve() const
{
int ret_value = H5Pget_preserve(id);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
- else
- {
+ else {
throw PropListIException("DSetMemXferPropList::getPreserve",
- "H5Pget_preserve returned negative value for status");
+ "H5Pget_preserve returned negative value for status");
}
}
@@ -205,13 +206,12 @@ bool DSetMemXferPropList::getPreserve() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) const
+void
+DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) const
{
herr_t ret_value = H5Pset_btree_ratios(id, left, middle, right);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setBtreeRatios",
- "H5Pset_btree_ratios failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setBtreeRatios", "H5Pset_btree_ratios failed");
}
}
@@ -224,13 +224,12 @@ void DSetMemXferPropList::setBtreeRatios(double left, double middle, double righ
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::getBtreeRatios(double& left, double& middle, double& right) const
+void
+DSetMemXferPropList::getBtreeRatios(double &left, double &middle, double &right) const
{
herr_t ret_value = H5Pget_btree_ratios(id, &left, &middle, &right);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::getBtreeRatios",
- "H5Pget_btree_ratios failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::getBtreeRatios", "H5Pget_btree_ratios failed");
}
}
@@ -241,13 +240,12 @@ void DSetMemXferPropList::getBtreeRatios(double& left, double& middle, double& r
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setDataTransform(const char* expression) const
+void
+DSetMemXferPropList::setDataTransform(const char *expression) const
{
herr_t ret_value = H5Pset_data_transform(id, expression);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setDataTransform",
- "H5Pset_data_transform failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setDataTransform", "H5Pset_data_transform failed");
}
}
@@ -259,7 +257,8 @@ void DSetMemXferPropList::setDataTransform(const char* expression) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setDataTransform(const H5std_string& expression) const
+void
+DSetMemXferPropList::setDataTransform(const H5std_string &expression) const
{
setDataTransform(expression.c_str());
}
@@ -273,7 +272,8 @@ void DSetMemXferPropList::setDataTransform(const H5std_string& expression) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
+ssize_t
+DSetMemXferPropList::getDataTransform(char *exp, size_t buf_size) const
{
// H5Pget_data_transform will get buf_size characters of the expression
// including the null terminator
@@ -281,10 +281,8 @@ ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
exp_len = H5Pget_data_transform(id, exp, buf_size);
// H5Pget_data_transform returns a negative value, raise an exception
- if (exp_len < 0)
- {
- throw PropListIException("DSetMemXferPropList::getDataTransform",
- "H5Pget_data_transform failed");
+ if (exp_len < 0) {
+ throw PropListIException("DSetMemXferPropList::getDataTransform", "H5Pget_data_transform failed");
}
// H5Pget_data_transform will put a null terminator at the end of the
@@ -292,7 +290,7 @@ ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
// of the buffer.
// Return the expression length, which might be different from buf_size
- return(exp_len);
+ return (exp_len);
}
//--------------------------------------------------------------------------
@@ -303,7 +301,8 @@ ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-H5std_string DSetMemXferPropList::getDataTransform() const
+H5std_string
+DSetMemXferPropList::getDataTransform() const
{
// Initialize string to "", so that if there is no expression, the returned
// string will be empty
@@ -313,29 +312,27 @@ H5std_string DSetMemXferPropList::getDataTransform() const
ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0);
// If H5Pget_data_transform returns a negative value, raise an exception
- if (exp_len < 0)
- {
+ if (exp_len < 0) {
throw PropListIException("DSetMemXferPropList::getDataTransform", "H5Pget_data_transform failed");
}
// If expression exists, calls C routine again to get it
- else if (exp_len > 0)
- {
+ else if (exp_len > 0) {
// Temporary buffer for char* expression
- char* exp_C = new char[exp_len+1];
- HDmemset(exp_C, 0, exp_len+1); // clear buffer
+ char *exp_C = new char[exp_len + 1];
+ HDmemset(exp_C, 0, exp_len + 1); // clear buffer
// Used overloaded function
- exp_len = getDataTransform(exp_C, exp_len+1);
+ exp_len = getDataTransform(exp_C, exp_len + 1);
// Convert the C expression to return
expression = exp_C;
// Clean up resource
- delete []exp_C;
+ delete[] exp_C;
}
// Return the string expression
- return(expression);
+ return (expression);
}
//--------------------------------------------------------------------------
@@ -347,13 +344,12 @@ H5std_string DSetMemXferPropList::getDataTransform() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const
+void
+DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const
{
herr_t ret_value = H5Pset_type_conv_cb(id, op, user_data);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setTypeConvCB",
- "H5Pset_type_conv_cb failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setTypeConvCB", "H5Pset_type_conv_cb failed");
}
}
@@ -365,13 +361,12 @@ void DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_da
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const
+void
+DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const
{
herr_t ret_value = H5Pget_type_conv_cb(id, op, user_data);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::getTypeConvCB",
- "H5Pget_type_conv_cb failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::getTypeConvCB", "H5Pget_type_conv_cb failed");
}
}
@@ -385,14 +380,13 @@ void DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void* alloc_info, H5MM_free_t free_func, void* free_info) const
+void
+DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func,
+ void *free_info) const
{
- herr_t ret_value = H5Pset_vlen_mem_manager(id, alloc_func, alloc_info,
- free_func, free_info);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setVlenMemManager",
- "H5Pset_vlen_mem_manager failed");
+ herr_t ret_value = H5Pset_vlen_mem_manager(id, alloc_func, alloc_info, free_func, free_info);
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setVlenMemManager", "H5Pset_vlen_mem_manager failed");
}
}
@@ -404,7 +398,8 @@ void DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void* al
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setVlenMemManager() const
+void
+DSetMemXferPropList::setVlenMemManager() const
{
setVlenMemManager(NULL, NULL, NULL, NULL);
}
@@ -419,13 +414,13 @@ void DSetMemXferPropList::setVlenMemManager() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t& alloc_func, void** alloc_info, H5MM_free_t& free_func, void** free_info) const
+void
+DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t &alloc_func, void **alloc_info, H5MM_free_t &free_func,
+ void **free_info) const
{
herr_t ret_value = H5Pget_vlen_mem_manager(id, &alloc_func, alloc_info, &free_func, free_info);
- if(ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::getVlenMemManager",
- "H5Pget_vlen_mem_manager failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::getVlenMemManager", "H5Pget_vlen_mem_manager failed");
}
}
@@ -439,13 +434,13 @@ void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t& alloc_func, void**
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSmallData
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
+void
+DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
{
herr_t ret_value = H5Pset_small_data_block_size(id, size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::setSmallDataBlockSize",
- "H5Pset_small_data_block_size failed");
+ "H5Pset_small_data_block_size failed");
}
}
@@ -456,16 +451,16 @@ void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-hsize_t DSetMemXferPropList::getSmallDataBlockSize() const
+hsize_t
+DSetMemXferPropList::getSmallDataBlockSize() const
{
hsize_t size;
- herr_t ret_value = H5Pget_small_data_block_size(id, &size);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Pget_small_data_block_size(id, &size);
+ if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::getSmallDataBlockSize",
- "H5Pget_small_data_block_size failed");
+ "H5Pget_small_data_block_size failed");
}
- return(size);
+ return (size);
}
//--------------------------------------------------------------------------
@@ -479,13 +474,13 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetHyperVectorSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
+void
+DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
{
herr_t ret_value = H5Pset_hyper_vector_size(id, vector_size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::setHyperVectorSize",
- "H5Pset_hyper_vector_size failed");
+ "H5Pset_hyper_vector_size failed");
}
}
@@ -497,16 +492,16 @@ void DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-size_t DSetMemXferPropList::getHyperVectorSize() const
+size_t
+DSetMemXferPropList::getHyperVectorSize() const
{
size_t vector_size;
herr_t ret_value = H5Pget_hyper_vector_size(id, &vector_size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::getHyperVectorSize",
- "H5Pget_hyper_vector_size failed");
+ "H5Pget_hyper_vector_size failed");
}
- return(vector_size);
+ return (vector_size);
}
//--------------------------------------------------------------------------
@@ -527,13 +522,12 @@ size_t DSetMemXferPropList::getHyperVectorSize() const
/// \li \c H5Z_DISABLE_EDC
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
+void
+DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
{
herr_t ret_value = H5Pset_edc_check(id, check);
- if (ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setEDCCheck",
- "H5Pset_edc_check failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetMemXferPropList::setEDCCheck", "H5Pset_edc_check failed");
}
}
@@ -544,15 +538,14 @@ void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5Z_EDC_t DSetMemXferPropList::getEDCCheck() const
+H5Z_EDC_t
+DSetMemXferPropList::getEDCCheck() const
{
H5Z_EDC_t check = H5Pget_edc_check(id);
- if (check < 0)
- {
- throw PropListIException("DSetMemXferPropList::getEDCCheck",
- "H5Pget_edc_check failed");
+ if (check < 0) {
+ throw PropListIException("DSetMemXferPropList::getEDCCheck", "H5Pget_edc_check failed");
}
- return(check);
+ return (check);
}
//--------------------------------------------------------------------------
@@ -562,5 +555,4 @@ H5Z_EDC_t DSetMemXferPropList::getEDCCheck() const
//--------------------------------------------------------------------------
DSetMemXferPropList::~DSetMemXferPropList() {}
-} // end namespace
-
+} // namespace H5
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index a8b1fa9..fbe28b8 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,105 +23,108 @@ namespace H5 {
*/
// Inheritance: PropList -> IdComponent
class H5_DLLCPP DSetMemXferPropList : public PropList {
- public:
- ///\brief Default dataset memory and transfer property list.
- static const DSetMemXferPropList& DEFAULT;
+ public:
+ ///\brief Default dataset memory and transfer property list.
+ static const DSetMemXferPropList &DEFAULT;
- // Creates a dataset memory and transfer property list.
- DSetMemXferPropList();
+ // Creates a dataset memory and transfer property list.
+ DSetMemXferPropList();
- // Creates a dataset transform property list.
- DSetMemXferPropList(const char* expression);
+ // Creates a dataset transform property list.
+ DSetMemXferPropList(const char *expression);
- // Sets type conversion and background buffers.
- void setBuffer(size_t size, void* tconv, void* bkg) const;
+ // Sets type conversion and background buffers.
+ void setBuffer(size_t size, void *tconv, void *bkg) const;
- // Reads buffer settings.
- size_t getBuffer(void** tconv, void** bkg) const;
+ // Reads buffer settings.
+ size_t getBuffer(void **tconv, void **bkg) const;
- // Sets B-tree split ratios for a dataset transfer property list.
- void setBtreeRatios(double left, double middle, double right) const;
+ // Sets B-tree split ratios for a dataset transfer property list.
+ void setBtreeRatios(double left, double middle, double right) const;
- // Gets B-tree split ratios for a dataset transfer property list.
- void getBtreeRatios(double& left, double& middle, double& right) const;
+ // Gets B-tree split ratios for a dataset transfer property list.
+ void getBtreeRatios(double &left, double &middle, double &right) const;
- // Sets data transform expression.
- void setDataTransform(const char* expression) const;
- void setDataTransform(const H5std_string& expression) const;
+ // Sets data transform expression.
+ void setDataTransform(const char *expression) const;
+ void setDataTransform(const H5std_string &expression) const;
- // Gets data transform expression.
- ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
- H5std_string getDataTransform() const;
+ // Gets data transform expression.
+ ssize_t getDataTransform(char *exp, size_t buf_size = 0) const;
+ H5std_string getDataTransform() const;
- // Sets the dataset transfer property list status to TRUE or FALSE.
- void setPreserve(bool status) const;
+ // Sets the dataset transfer property list status to TRUE or FALSE.
+ void setPreserve(bool status) const;
- // Checks status of the dataset transfer property list.
- bool getPreserve() const;
+ // Checks status of the dataset transfer property list.
+ bool getPreserve() const;
- // Sets an exception handling callback for datatype conversion.
- void setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const;
+ // Sets an exception handling callback for datatype conversion.
+ void setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const;
- // Gets the exception handling callback for datatype conversion.
- void getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const;
+ // Gets the exception handling callback for datatype conversion.
+ void getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const;
- // Sets the memory manager for variable-length datatype
- // allocation in H5Dread and H5Dvlen_reclaim.
- void setVlenMemManager(H5MM_allocate_t alloc, void* alloc_info,
- H5MM_free_t free, void* free_info) const;
+ // Sets the memory manager for variable-length datatype
+ // allocation in H5Dread and H5Dvlen_reclaim.
+ void setVlenMemManager(H5MM_allocate_t alloc, void *alloc_info, H5MM_free_t free, void *free_info) const;
- // alloc and free are set to NULL, indicating that system
- // malloc and free are to be used.
- void setVlenMemManager() const;
+ // alloc and free are set to NULL, indicating that system
+ // malloc and free are to be used.
+ void setVlenMemManager() const;
- // Gets the memory manager for variable-length datatype
- // allocation in H5Dread and H5Tvlen_reclaim.
- void getVlenMemManager(H5MM_allocate_t& alloc, void** alloc_info,
- H5MM_free_t& free, void** free_info) const;
+ // Gets the memory manager for variable-length datatype
+ // allocation in H5Dread and H5Tvlen_reclaim.
+ void getVlenMemManager(H5MM_allocate_t &alloc, void **alloc_info, H5MM_free_t &free,
+ void **free_info) const;
- // Sets the size of a contiguous block reserved for small data.
- void setSmallDataBlockSize(hsize_t size) const;
+ // Sets the size of a contiguous block reserved for small data.
+ void setSmallDataBlockSize(hsize_t size) const;
- // Returns the current small data block size setting.
- hsize_t getSmallDataBlockSize() const;
+ // Returns the current small data block size setting.
+ hsize_t getSmallDataBlockSize() const;
- // Sets number of I/O vectors to be read/written in hyperslab I/O.
- void setHyperVectorSize(size_t vector_size) const;
+ // Sets number of I/O vectors to be read/written in hyperslab I/O.
+ void setHyperVectorSize(size_t vector_size) const;
- // Returns the number of I/O vectors to be read/written in
- // hyperslab I/O.
- size_t getHyperVectorSize() const;
+ // Returns the number of I/O vectors to be read/written in
+ // hyperslab I/O.
+ size_t getHyperVectorSize() const;
- // Enables or disables error-detecting for a dataset reading
- // process.
- void setEDCCheck(H5Z_EDC_t check) const;
+ // Enables or disables error-detecting for a dataset reading
+ // process.
+ void setEDCCheck(H5Z_EDC_t check) const;
- // Determines whether error-detection is enabled for dataset reads.
- H5Z_EDC_t getEDCCheck() const;
+ // Determines whether error-detection is enabled for dataset reads.
+ H5Z_EDC_t getEDCCheck() const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("DSetMemXferPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("DSetMemXferPropList");
+ }
- // Copy constructor: makes a copy of a DSetMemXferPropList object.
- DSetMemXferPropList(const DSetMemXferPropList& orig);
+ // Copy constructor: makes a copy of a DSetMemXferPropList object.
+ DSetMemXferPropList(const DSetMemXferPropList &orig);
- // Creates a copy of an existing dataset memory and transfer
- // property list using the property list id.
- DSetMemXferPropList(const hid_t plist_id);
+ // Creates a copy of an existing dataset memory and transfer
+ // property list using the property list id.
+ DSetMemXferPropList(const hid_t plist_id);
- // Noop destructor
- virtual ~DSetMemXferPropList();
+ // Noop destructor
+ virtual ~DSetMemXferPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static DSetMemXferPropList* DEFAULT_;
+ private:
+ static DSetMemXferPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static DSetMemXferPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static DSetMemXferPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 9bd359a..8a8764d 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -55,7 +55,7 @@ EnumType::EnumType(const hid_t existing_id) : DataType(existing_id) {}
///\brief Copy constructor: makes a copy of the original EnumType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType::EnumType(const EnumType& original) : DataType(original) {}
+EnumType::EnumType(const EnumType &original) : DataType(original) {}
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
@@ -76,14 +76,13 @@ EnumType::EnumType(size_t size) : DataType(H5T_ENUM, size) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType::EnumType(const DataSet& dataset) : DataType()
+EnumType::EnumType(const DataSet &dataset) : DataType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
// If the datatype id is not valid, throw an exception
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("EnumType constructor", "H5Dget_type failed");
}
}
@@ -95,14 +94,13 @@ EnumType::EnumType(const DataSet& dataset) : DataType()
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-EnumType::EnumType(const IntType& data_type) : DataType()
+EnumType::EnumType(const IntType &data_type) : DataType()
{
// Calls C function H5Tenum_create to get the id of the datatype
id = H5Tenum_create(data_type.getId());
// If the datatype id is not valid, throw an exception
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("EnumType constructor", "H5Tenum_create failed");
}
}
@@ -121,7 +119,7 @@ EnumType::EnumType(const IntType& data_type) : DataType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-EnumType::EnumType(const H5Location& loc, const char *type_name) : DataType()
+EnumType::EnumType(const H5Location &loc, const char *type_name) : DataType()
{
id = p_opentype(loc, type_name);
}
@@ -140,7 +138,7 @@ EnumType::EnumType(const H5Location& loc, const char *type_name) : DataType()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-EnumType::EnumType(const H5Location& loc, const H5std_string& type_name) : DataType()
+EnumType::EnumType(const H5Location &loc, const H5std_string &type_name) : DataType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -152,7 +150,8 @@ EnumType::EnumType(const H5Location& loc, const H5std_string& type_name) : DataT
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* EnumType::decode() const
+DataType *
+EnumType::decode() const
{
hid_t encoded_enumtype_id = H5I_INVALID_HID;
try {
@@ -163,7 +162,7 @@ DataType* EnumType::decode() const
}
EnumType *encoded_enumtype = new EnumType;
encoded_enumtype->p_setId(encoded_enumtype_id);
- return(encoded_enumtype);
+ return (encoded_enumtype);
}
//--------------------------------------------------------------------------
@@ -174,12 +173,12 @@ DataType* EnumType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::insert(const char* name, void *value) const
+void
+EnumType::insert(const char *name, void *value) const
{
// Calls C routine H5Tenum_insert to insert the new enum datatype member.
herr_t ret_value = H5Tenum_insert(id, name, value);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("EnumType::insert", "H5Tenum_insert failed");
}
}
@@ -191,7 +190,8 @@ void EnumType::insert(const char* name, void *value) const
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::insert(const H5std_string& name, void *value) const
+void
+EnumType::insert(const H5std_string &name, void *value) const
{
insert(name.c_str(), value);
}
@@ -205,24 +205,24 @@ void EnumType::insert(const H5std_string& name, void *value) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string EnumType::nameOf(void *value, size_t size) const
+H5std_string
+EnumType::nameOf(void *value, size_t size) const
{
- char* name_C = new char[size+1]; // temporary C-string for C API
- HDmemset(name_C, 0, size+1); // clear buffer
+ char *name_C = new char[size + 1]; // temporary C-string for C API
+ HDmemset(name_C, 0, size + 1); // clear buffer
// Calls C routine H5Tenum_nameof to get the name of the specified enum type
herr_t ret_value = H5Tenum_nameof(id, value, name_C, size);
// If H5Tenum_nameof returns a negative value, raise an exception,
- if(ret_value < 0)
- {
- delete []name_C;
+ if (ret_value < 0) {
+ delete[] name_C;
throw DataTypeIException("EnumType::nameOf", "H5Tenum_nameof failed");
}
// otherwise, create the string to hold the datatype name and return it
H5std_string name(name_C);
- delete []name_C;
- return(name);
+ delete[] name_C;
+ return (name);
}
//--------------------------------------------------------------------------
@@ -234,12 +234,12 @@ H5std_string EnumType::nameOf(void *value, size_t size) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::valueOf(const char* name, void *value) const
+void
+EnumType::valueOf(const char *name, void *value) const
{
- // Calls C routine H5Tenum_valueof to get the enum datatype value
+ // Calls C routine H5Tenum_valueof to get the enum datatype value
herr_t ret_value = H5Tenum_valueof(id, name, value);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("EnumType::valueOf", "H5Tenum_valueof failed");
}
}
@@ -251,7 +251,8 @@ void EnumType::valueOf(const char* name, void *value) const
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::valueOf(const H5std_string& name, void *value) const
+void
+EnumType::valueOf(const H5std_string &name, void *value) const
{
valueOf(name.c_str(), value);
}
@@ -266,15 +267,14 @@ void EnumType::valueOf(const H5std_string& name, void *value) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
-int EnumType::getMemberIndex(const char *name) const
+int
+EnumType::getMemberIndex(const char *name) const
{
int member_index = H5Tget_member_index(id, name);
- if(member_index < 0)
- {
- throw DataTypeIException("EnumType::getMemberIndex",
- "H5Tget_member_index returns negative value");
+ if (member_index < 0) {
+ throw DataTypeIException("EnumType::getMemberIndex", "H5Tget_member_index returns negative value");
}
- return(member_index);
+ return (member_index);
}
//--------------------------------------------------------------------------
@@ -284,9 +284,10 @@ int EnumType::getMemberIndex(const char *name) const
/// argument \a name.
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
-int EnumType::getMemberIndex(const H5std_string& name) const
+int
+EnumType::getMemberIndex(const H5std_string &name) const
{
- return(EnumType::getMemberIndex(name.c_str()));
+ return (EnumType::getMemberIndex(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -296,15 +297,15 @@ int EnumType::getMemberIndex(const H5std_string& name) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-int EnumType::getNmembers() const
+int
+EnumType::getNmembers() const
{
int num_members = H5Tget_nmembers(id);
- if(num_members < 0)
- {
+ if (num_members < 0) {
throw DataTypeIException("EnumType::getNmembers",
- "H5Tget_nmembers returns negative number of members");
+ "H5Tget_nmembers returns negative number of members");
}
- return(num_members);
+ return (num_members);
}
//--------------------------------------------------------------------------
@@ -316,12 +317,12 @@ int EnumType::getNmembers() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::getMemberValue(unsigned memb_no, void *value) const
+void
+EnumType::getMemberValue(unsigned memb_no, void *value) const
{
// Call C routine H5Tget_member_value to get the datatype member's value
hid_t ret_value = H5Tget_member_value(id, memb_no, value);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("EnumType::getMemberValue", "H5Tget_member_value failed");
}
}
@@ -333,4 +334,4 @@ void EnumType::getMemberValue(unsigned memb_no, void *value) const
//--------------------------------------------------------------------------
EnumType::~EnumType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 745c09b..a7fe3ff 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,61 +23,65 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP EnumType : public DataType {
- public:
- // Creates an empty enumeration datatype based on a native signed
- // integer type, whose size is given by size.
- EnumType(size_t size);
+ public:
+ // Creates an empty enumeration datatype based on a native signed
+ // integer type, whose size is given by size.
+ EnumType(size_t size);
- // Gets the enum datatype of the specified dataset
- EnumType(const DataSet& dataset); // H5Dget_type
+ // Gets the enum datatype of the specified dataset
+ EnumType(const DataSet &dataset); // H5Dget_type
- // Creates a new enum datatype based on an integer datatype
- EnumType(const IntType& data_type); // H5Tenum_create
+ // Creates a new enum datatype based on an integer datatype
+ EnumType(const IntType &data_type); // H5Tenum_create
- // Constructors that open an enum datatype, given a location.
- EnumType(const H5Location& loc, const char* name);
- EnumType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open an enum datatype, given a location.
+ EnumType(const H5Location &loc, const char *name);
+ EnumType(const H5Location &loc, const H5std_string &name);
- // Returns an EnumType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an EnumType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- // Returns the number of members in this enumeration datatype.
- int getNmembers () const;
+ // Returns the number of members in this enumeration datatype.
+ int getNmembers() const;
- // Returns the index of a member in this enumeration data type.
- int getMemberIndex(const char* name) const;
- int getMemberIndex(const H5std_string& name) const;
+ // Returns the index of a member in this enumeration data type.
+ int getMemberIndex(const char *name) const;
+ int getMemberIndex(const H5std_string &name) const;
- // Returns the value of an enumeration datatype member
- void getMemberValue(unsigned memb_no, void *value) const;
+ // Returns the value of an enumeration datatype member
+ void getMemberValue(unsigned memb_no, void *value) const;
- // Inserts a new member to this enumeration type.
- void insert(const char* name, void *value) const;
- void insert(const H5std_string& name, void *value) const;
+ // Inserts a new member to this enumeration type.
+ void insert(const char *name, void *value) const;
+ void insert(const H5std_string &name, void *value) const;
- // Returns the symbol name corresponding to a specified member
- // of this enumeration datatype.
- H5std_string nameOf(void *value, size_t size) const;
+ // Returns the symbol name corresponding to a specified member
+ // of this enumeration datatype.
+ H5std_string nameOf(void *value, size_t size) const;
- // Returns the value corresponding to a specified member of this
- // enumeration datatype.
- void valueOf(const char* name, void *value) const;
- void valueOf(const H5std_string& name, void *value) const;
+ // Returns the value corresponding to a specified member of this
+ // enumeration datatype.
+ void valueOf(const char *name, void *value) const;
+ void valueOf(const H5std_string &name, void *value) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("EnumType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("EnumType");
+ }
- // Default constructor
- EnumType();
+ // Default constructor
+ EnumType();
- // Creates an enumeration datatype using an existing id
- EnumType(const hid_t existing_id);
+ // Creates an enumeration datatype using an existing id
+ EnumType(const hid_t existing_id);
- // Copy constructor: makes a copy of the original EnumType object.
- EnumType(const EnumType& original);
+ // Copy constructor: makes a copy of the original EnumType object.
+ EnumType(const EnumType &original);
- virtual ~EnumType();
+ virtual ~EnumType();
}; // end of EnumType
} // namespace H5
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index e5cc7b2..9c2ba82 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -35,7 +35,10 @@ Exception::Exception() : detail_message(""), func_name("") {}
///\param message - IN: Message on the failure
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception(const H5std_string& func, const H5std_string& message) : detail_message(message), func_name(func) {}
+Exception::Exception(const H5std_string &func, const H5std_string &message)
+ : detail_message(message), func_name(func)
+{
+}
//--------------------------------------------------------------------------
// Function: Exception copy constructor
@@ -43,7 +46,9 @@ Exception::Exception(const H5std_string& func, const H5std_string& message) : de
///\param orig - IN: Exception instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception(const Exception& orig) : detail_message(orig.detail_message), func_name(orig.func_name) {}
+Exception::Exception(const Exception &orig) : detail_message(orig.detail_message), func_name(orig.func_name)
+{
+}
//--------------------------------------------------------------------------
// Function: Exception::getMajorString
@@ -56,32 +61,30 @@ Exception::Exception(const Exception& orig) : detail_message(orig.detail_message
/// will be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string Exception::getMajorString(hid_t err_major) const
+H5std_string
+Exception::getMajorString(hid_t err_major) const
{
// Preliminary call to H5Eget_msg() to get the length of the message
ssize_t mesg_size = H5Eget_msg(err_major, NULL, NULL, 0);
// If H5Eget_msg() returns a negative value, raise an exception,
- if(mesg_size < 0)
- throw IdComponentException("Exception::getMajorString",
- "H5Eget_msg failed");
+ if (mesg_size < 0)
+ throw IdComponentException("Exception::getMajorString", "H5Eget_msg failed");
// Call H5Eget_msg again to get the actual message
- char* mesg_C = new char[mesg_size+1]; // temporary C-string for C API
- mesg_size = H5Eget_msg(err_major, NULL, mesg_C, mesg_size+1);
+ char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API
+ mesg_size = H5Eget_msg(err_major, NULL, mesg_C, mesg_size + 1);
// Check for failure again
- if(mesg_size < 0)
- {
- delete []mesg_C;
- throw IdComponentException("Exception::getMajorString",
- "H5Eget_msg failed");
+ if (mesg_size < 0) {
+ delete[] mesg_C;
+ throw IdComponentException("Exception::getMajorString", "H5Eget_msg failed");
}
// Convert the C error description and return
H5std_string major_str(mesg_C);
- delete []mesg_C;
- return(major_str);
+ delete[] mesg_C;
+ return (major_str);
}
//--------------------------------------------------------------------------
@@ -95,32 +98,30 @@ H5std_string Exception::getMajorString(hid_t err_major) const
/// will be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string Exception::getMinorString(hid_t err_minor) const
+H5std_string
+Exception::getMinorString(hid_t err_minor) const
{
// Preliminary call to H5Eget_msg() to get the length of the message
ssize_t mesg_size = H5Eget_msg(err_minor, NULL, NULL, 0);
// If H5Eget_msg() returns a negative value, raise an exception,
- if(mesg_size < 0)
- throw IdComponentException("Exception::getMinorString",
- "H5Eget_msg failed");
+ if (mesg_size < 0)
+ throw IdComponentException("Exception::getMinorString", "H5Eget_msg failed");
// Call H5Eget_msg again to get the actual message
- char* mesg_C = new char[mesg_size+1]; // temporary C-string for C API
- mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, mesg_size+1);
+ char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API
+ mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, mesg_size + 1);
// Check for failure again
- if(mesg_size < 0)
- {
- delete []mesg_C;
- throw IdComponentException("Exception::getMinorString",
- "H5Eget_msg failed");
+ if (mesg_size < 0) {
+ delete[] mesg_C;
+ throw IdComponentException("Exception::getMinorString", "H5Eget_msg failed");
}
// Convert the C error description and return
H5std_string minor_str(mesg_C);
- delete []mesg_C;
- return(minor_str);
+ delete[] mesg_C;
+ return (minor_str);
}
//--------------------------------------------------------------------------
@@ -139,12 +140,13 @@ H5std_string Exception::getMinorString(hid_t err_minor) const
/// handlers
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::setAutoPrint(H5E_auto2_t& func, void* client_data)
+void
+Exception::setAutoPrint(H5E_auto2_t &func, void *client_data)
{
// calls the C API routine H5Eset_auto to set the auto printing to
// the specified function.
herr_t ret_value = H5Eset_auto2(H5E_DEFAULT, func, client_data);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Exception::setAutoPrint", "H5Eset_auto failed");
}
@@ -153,12 +155,13 @@ void Exception::setAutoPrint(H5E_auto2_t& func, void* client_data)
///\brief Turns off the automatic error printing from the C library.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::dontPrint()
+void
+Exception::dontPrint()
{
// calls the C API routine H5Eset_auto with NULL parameters to turn
// off the automatic error printing.
herr_t ret_value = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Exception::dontPrint", "H5Eset_auto failed");
}
@@ -172,12 +175,13 @@ void Exception::dontPrint()
/// the error function
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::getAutoPrint(H5E_auto2_t& func, void** client_data)
+void
+Exception::getAutoPrint(H5E_auto2_t &func, void **client_data)
{
// calls the C API routine H5Eget_auto to get the current setting of
// the automatic error printing
herr_t ret_value = H5Eget_auto2(H5E_DEFAULT, &func, client_data);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Exception::getAutoPrint", "H5Eget_auto failed");
}
@@ -189,11 +193,12 @@ void Exception::getAutoPrint(H5E_auto2_t& func, void** client_data)
/// called, with certain exceptions (for instance, \c H5Eprint).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::clearErrorStack()
+void
+Exception::clearErrorStack()
{
// calls the C API routine H5Eclear to clear the error stack
herr_t ret_value = H5Eclear2(H5E_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Exception::clearErrorStack", "H5Eclear failed");
}
@@ -238,11 +243,12 @@ void Exception::clearErrorStack()
///\endcode
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void* client_data)
+void
+Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *client_data)
{
// calls the C API routine H5Ewalk to walk the error stack
herr_t ret_value = H5Ewalk2(H5E_DEFAULT, direction, func, client_data);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Exception::walkErrorStack", "H5Ewalk failed");
}
@@ -253,9 +259,10 @@ void Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void
///\return Text message - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string Exception::getDetailMsg() const
+H5std_string
+Exception::getDetailMsg() const
{
- return(detail_message);
+ return (detail_message);
}
//--------------------------------------------------------------------------
@@ -265,9 +272,10 @@ H5std_string Exception::getDetailMsg() const
///\return Text message - \c char pointer
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-const char* Exception::getCDetailMsg() const
+const char *
+Exception::getCDetailMsg() const
{
- return(detail_message.c_str());
+ return (detail_message.c_str());
}
//--------------------------------------------------------------------------
@@ -276,9 +284,10 @@ const char* Exception::getCDetailMsg() const
///\return Text message - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5std_string Exception::getFuncName() const
+H5std_string
+Exception::getFuncName() const
{
- return(func_name);
+ return (func_name);
}
//--------------------------------------------------------------------------
@@ -287,9 +296,10 @@ H5std_string Exception::getFuncName() const
///\return Text message - \c char pointer
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-const char* Exception::getCFuncName() const
+const char *
+Exception::getCFuncName() const
{
- return(func_name.c_str());
+ return (func_name.c_str());
}
//--------------------------------------------------------------------------
@@ -299,10 +309,11 @@ const char* Exception::getCFuncName() const
///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0)
// Programmer Binh-Minh Ribler - Apr, 2014 (1.8.13)
//--------------------------------------------------------------------------
-void Exception::printErrorStack(FILE* stream, hid_t err_stack)
+void
+Exception::printErrorStack(FILE *stream, hid_t err_stack)
{
herr_t ret_value = H5Eprint2(err_stack, stream);
- if(ret_value < 0)
+ if (ret_value < 0)
throw Exception("Printing error stack", "H5Eprint2 failed");
}
@@ -318,7 +329,8 @@ void Exception::printErrorStack(FILE* stream, hid_t err_stack)
// -BMR, 2014/04/24
// Removed from documentation. -BMR, 2016/03/23
//--------------------------------------------------------------------------
-void Exception::printError(FILE* stream) const
+void
+Exception::printError(FILE *stream) const
{
Exception::printErrorStack(stream, H5E_DEFAULT);
}
@@ -338,7 +350,7 @@ Exception::~Exception() throw() {}
// Function: LocationException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-LocationException::LocationException() : Exception(){}
+LocationException::LocationException() : Exception() {}
//--------------------------------------------------------------------------
// Function: LocationException overloaded constructor
///\brief Creates a LocationException with the name of the function,
@@ -346,7 +358,10 @@ LocationException::LocationException() : Exception(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-LocationException::LocationException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+LocationException::LocationException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: LocationException destructor
///\brief Noop destructor.
@@ -361,7 +376,7 @@ LocationException::~LocationException() throw() {}
// Function: GroupIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-GroupIException::GroupIException() : LocationException(){}
+GroupIException::GroupIException() : LocationException() {}
//--------------------------------------------------------------------------
// Function: GroupIException overloaded constructor
///\brief Creates a GroupIException with the name of the function,
@@ -369,7 +384,10 @@ GroupIException::GroupIException() : LocationException(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-GroupIException::GroupIException(const H5std_string& func, const H5std_string& message) : LocationException(func, message) {}
+GroupIException::GroupIException(const H5std_string &func, const H5std_string &message)
+ : LocationException(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: GroupIException destructor
///\brief Noop destructor.
@@ -384,7 +402,7 @@ GroupIException::~GroupIException() throw() {}
// Function: FileIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-FileIException::FileIException():GroupIException(){}
+FileIException::FileIException() : GroupIException() {}
//--------------------------------------------------------------------------
// Function: FileIException overloaded constructor
///\brief Creates a FileIException with the name of the function,
@@ -392,7 +410,10 @@ FileIException::FileIException():GroupIException(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-FileIException::FileIException(const H5std_string& func, const H5std_string& message) : GroupIException(func, message) {}
+FileIException::FileIException(const H5std_string &func, const H5std_string &message)
+ : GroupIException(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: FileIException destructor
///\brief Noop destructor.
@@ -407,7 +428,7 @@ FileIException::~FileIException() throw() {}
// Function: DataSpaceIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-DataSpaceIException::DataSpaceIException() : Exception(){}
+DataSpaceIException::DataSpaceIException() : Exception() {}
//--------------------------------------------------------------------------
// Function: DataSpaceIException overloaded constructor
///\brief Creates a DataSpaceIException with the name of the function,
@@ -415,7 +436,10 @@ DataSpaceIException::DataSpaceIException() : Exception(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataSpaceIException::DataSpaceIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+DataSpaceIException::DataSpaceIException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: DataSpaceIException destructor
///\brief Noop destructor.
@@ -430,7 +454,7 @@ DataSpaceIException::~DataSpaceIException() throw() {}
// Function: DataTypeIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-DataTypeIException::DataTypeIException() : LocationException(){}
+DataTypeIException::DataTypeIException() : LocationException() {}
//--------------------------------------------------------------------------
// Function: DataTypeIException overloaded constructor
///\brief Creates a DataTypeIException with the name of the function,
@@ -438,7 +462,10 @@ DataTypeIException::DataTypeIException() : LocationException(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataTypeIException::DataTypeIException(const H5std_string& func, const H5std_string& message) : LocationException(func, message) {}
+DataTypeIException::DataTypeIException(const H5std_string &func, const H5std_string &message)
+ : LocationException(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: DataTypeIException destructor
///\brief Noop destructor.
@@ -453,7 +480,7 @@ DataTypeIException::~DataTypeIException() throw() {}
// Function: PropListIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-PropListIException::PropListIException() : Exception(){}
+PropListIException::PropListIException() : Exception() {}
//--------------------------------------------------------------------------
// Function: PropListIException overloaded constructor
///\brief Creates a PropListIException with the name of the function,
@@ -461,7 +488,10 @@ PropListIException::PropListIException() : Exception(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-PropListIException::PropListIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+PropListIException::PropListIException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: PropListIException destructor
///\brief Noop destructor.
@@ -476,7 +506,7 @@ PropListIException::~PropListIException() throw() {}
// Function: DataSetIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-DataSetIException::DataSetIException() : LocationException(){}
+DataSetIException::DataSetIException() : LocationException() {}
//--------------------------------------------------------------------------
// Function: DataSetIException overloaded constructor
///\brief Creates a DataSetIException with the name of the function,
@@ -484,7 +514,10 @@ DataSetIException::DataSetIException() : LocationException(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataSetIException::DataSetIException(const H5std_string& func, const H5std_string& message) : LocationException(func, message) {}
+DataSetIException::DataSetIException(const H5std_string &func, const H5std_string &message)
+ : LocationException(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: DataSetIException destructor
///\brief Noop destructor.
@@ -499,7 +532,7 @@ DataSetIException::~DataSetIException() throw() {}
// Function: AttributeIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-AttributeIException::AttributeIException() : LocationException(){}
+AttributeIException::AttributeIException() : LocationException() {}
//--------------------------------------------------------------------------
// Function: AttributeIException overloaded constructor
///\brief Creates an AttributeIException with the name of the function,
@@ -507,7 +540,10 @@ AttributeIException::AttributeIException() : LocationException(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-AttributeIException::AttributeIException(const H5std_string& func, const H5std_string& message) : LocationException(func, message) {}
+AttributeIException::AttributeIException(const H5std_string &func, const H5std_string &message)
+ : LocationException(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: AttributeIException destructor
///\brief Noop destructor.
@@ -522,7 +558,7 @@ AttributeIException::~AttributeIException() throw() {}
// Function: ReferenceException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-ReferenceException::ReferenceException() : Exception(){}
+ReferenceException::ReferenceException() : Exception() {}
//--------------------------------------------------------------------------
// Function: ReferenceException overloaded constructor
///\brief Creates a ReferenceException with the name of the function,
@@ -530,7 +566,10 @@ ReferenceException::ReferenceException() : Exception(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-ReferenceException::ReferenceException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+ReferenceException::ReferenceException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: ReferenceException destructor
///\brief Noop destructor.
@@ -545,7 +584,7 @@ ReferenceException::~ReferenceException() throw() {}
// Function: LibraryIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-LibraryIException::LibraryIException() : Exception(){}
+LibraryIException::LibraryIException() : Exception() {}
//--------------------------------------------------------------------------
// Function: LibraryIException overloaded constructor
///\brief Creates a LibraryIException with the name of the function,
@@ -553,7 +592,10 @@ LibraryIException::LibraryIException() : Exception(){}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-LibraryIException::LibraryIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+LibraryIException::LibraryIException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: LibraryIException destructor
///\brief Noop destructor.
@@ -568,7 +610,7 @@ LibraryIException::~LibraryIException() throw() {}
// Function: IdComponentException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
-IdComponentException::IdComponentException(): Exception() {}
+IdComponentException::IdComponentException() : Exception() {}
//--------------------------------------------------------------------------
// Function: IdComponentException overloaded constructor
///\brief Creates a IdComponentException with the name of the function,
@@ -576,10 +618,13 @@ IdComponentException::IdComponentException(): Exception() {}
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-IdComponentException::IdComponentException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
+IdComponentException::IdComponentException(const H5std_string &func, const H5std_string &message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: IdComponentException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
IdComponentException::~IdComponentException() throw() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index e15d81c..0e1fb5e 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,9 +20,9 @@
namespace H5 {
#ifdef H5_NO_STD
- #define H5std_string ::string
+#define H5std_string ::string
#else
- #define H5std_string std::string
+#define H5std_string std::string
#endif
/*! \class Exception
@@ -31,141 +31,140 @@ namespace H5 {
Many classes are derived from Exception for specific HDF5 C interfaces.
*/
class H5_DLLCPP Exception {
- public:
- // Creates an exception with a function name where the failure occurs
- // and an optional detailed message
- Exception(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
+ public:
+ // Creates an exception with a function name where the failure occurs
+ // and an optional detailed message
+ Exception(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
- // Returns a character string that describes the error specified by
- // a major error number.
- H5std_string getMajorString(hid_t err_major_id) const;
+ // Returns a character string that describes the error specified by
+ // a major error number.
+ H5std_string getMajorString(hid_t err_major_id) const;
- // Returns a character string that describes the error specified by
- // a minor error number.
- H5std_string getMinorString(hid_t err_minor_id) const;
+ // Returns a character string that describes the error specified by
+ // a minor error number.
+ H5std_string getMinorString(hid_t err_minor_id) const;
- // Returns the detailed message set at the time the exception is thrown
- H5std_string getDetailMsg() const;
- const char* getCDetailMsg() const; // C string of detailed message
- H5std_string getFuncName() const; // function name as a string object
- const char* getCFuncName() const; // function name as a char string
+ // Returns the detailed message set at the time the exception is thrown
+ H5std_string getDetailMsg() const;
+ const char * getCDetailMsg() const; // C string of detailed message
+ H5std_string getFuncName() const; // function name as a string object
+ const char * getCFuncName() const; // function name as a char string
- // Turns on the automatic error printing.
- static void setAutoPrint(H5E_auto2_t& func, void* client_data);
+ // Turns on the automatic error printing.
+ static void setAutoPrint(H5E_auto2_t &func, void *client_data);
- // Turns off the automatic error printing.
- static void dontPrint();
+ // Turns off the automatic error printing.
+ static void dontPrint();
- // Retrieves the current settings for the automatic error stack
- // traversal function and its data.
- static void getAutoPrint(H5E_auto2_t& func, void** client_data);
+ // Retrieves the current settings for the automatic error stack
+ // traversal function and its data.
+ static void getAutoPrint(H5E_auto2_t &func, void **client_data);
- // Clears the error stack for the current thread.
- static void clearErrorStack();
+ // Clears the error stack for the current thread.
+ static void clearErrorStack();
- // Walks the error stack for the current thread, calling the
- // specified function.
- static void walkErrorStack(H5E_direction_t direction,
- H5E_walk2_t func, void* client_data);
+ // Walks the error stack for the current thread, calling the
+ // specified function.
+ static void walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *client_data);
- // Prints the error stack in a default manner.
- static void printErrorStack(FILE* stream = stderr,
- hid_t err_stack = H5E_DEFAULT); // Static
- virtual void printError(FILE* stream = NULL) const;
+ // Prints the error stack in a default manner.
+ static void printErrorStack(FILE *stream = stderr,
+ hid_t err_stack = H5E_DEFAULT); // Static
+ virtual void printError(FILE *stream = NULL) const;
- // Default constructor
- Exception();
+ // Default constructor
+ Exception();
- // copy constructor
- Exception(const Exception& orig);
+ // copy constructor
+ Exception(const Exception &orig);
- // virtual Destructor
- virtual ~Exception() throw();
+ // virtual Destructor
+ virtual ~Exception() throw();
- protected:
- // Default value for detail_message
- static const char DEFAULT_MSG[];
+ protected:
+ // Default value for detail_message
+ static const char DEFAULT_MSG[];
- private:
- H5std_string detail_message;
- H5std_string func_name;
+ private:
+ H5std_string detail_message;
+ H5std_string func_name;
};
class H5_DLLCPP LocationException : public Exception {
- public:
- LocationException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- LocationException();
- virtual ~LocationException() throw();
+ public:
+ LocationException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ LocationException();
+ virtual ~LocationException() throw();
};
class H5_DLLCPP GroupIException : public LocationException {
- public:
- GroupIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- GroupIException();
- virtual ~GroupIException() throw();
+ public:
+ GroupIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ GroupIException();
+ virtual ~GroupIException() throw();
};
class H5_DLLCPP FileIException : public GroupIException {
- public:
- FileIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- FileIException();
- virtual ~FileIException() throw();
+ public:
+ FileIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ FileIException();
+ virtual ~FileIException() throw();
};
class H5_DLLCPP DataSpaceIException : public Exception {
- public:
- DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- DataSpaceIException();
- virtual ~DataSpaceIException() throw();
+ public:
+ DataSpaceIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ DataSpaceIException();
+ virtual ~DataSpaceIException() throw();
};
class H5_DLLCPP DataTypeIException : public LocationException {
- public:
- DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- DataTypeIException();
- virtual ~DataTypeIException() throw();
+ public:
+ DataTypeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ DataTypeIException();
+ virtual ~DataTypeIException() throw();
};
class H5_DLLCPP PropListIException : public Exception {
- public:
- PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- PropListIException();
- virtual ~PropListIException() throw();
+ public:
+ PropListIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ PropListIException();
+ virtual ~PropListIException() throw();
};
class H5_DLLCPP DataSetIException : public LocationException {
- public:
- DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- DataSetIException();
- virtual ~DataSetIException() throw();
+ public:
+ DataSetIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ DataSetIException();
+ virtual ~DataSetIException() throw();
};
class H5_DLLCPP AttributeIException : public LocationException {
- public:
- AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- AttributeIException();
- virtual ~AttributeIException() throw();
+ public:
+ AttributeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ AttributeIException();
+ virtual ~AttributeIException() throw();
};
class H5_DLLCPP ReferenceException : public Exception {
- public:
- ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- ReferenceException();
- virtual ~ReferenceException() throw();
+ public:
+ ReferenceException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ ReferenceException();
+ virtual ~ReferenceException() throw();
};
class H5_DLLCPP LibraryIException : public Exception {
- public:
- LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- LibraryIException();
- virtual ~LibraryIException() throw();
+ public:
+ LibraryIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ LibraryIException();
+ virtual ~LibraryIException() throw();
};
class H5_DLLCPP IdComponentException : public Exception {
- public:
- IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
- IdComponentException();
- virtual ~IdComponentException() throw();
+ public:
+ IdComponentException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
+ IdComponentException();
+ virtual ~IdComponentException() throw();
}; // end of IdComponentException
} // namespace H5
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index a4781bc..d07f4f0 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,7 +27,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-FileAccPropList* FileAccPropList::DEFAULT_ = 0;
+FileAccPropList *FileAccPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: FileAccPropList::getConstant
@@ -40,13 +40,13 @@ FileAccPropList* FileAccPropList::DEFAULT_ = 0;
// happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-FileAccPropList* FileAccPropList::getConstant()
+FileAccPropList *
+FileAccPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -55,8 +55,9 @@ FileAccPropList* FileAccPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new FileAccPropList(H5P_FILE_ACCESS);
else
- throw PropListIException("FileAccPropList::getConstant", "FileAccPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("FileAccPropList::getConstant",
+ "FileAccPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -66,7 +67,8 @@ FileAccPropList* FileAccPropList::getConstant()
// exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void FileAccPropList::deleteConstants()
+void
+FileAccPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -75,7 +77,7 @@ void FileAccPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default property
//--------------------------------------------------------------------------
-const FileAccPropList& FileAccPropList::DEFAULT = *getConstant();
+const FileAccPropList &FileAccPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -92,7 +94,7 @@ FileAccPropList::FileAccPropList() : PropList(H5P_FILE_ACCESS) {}
///\param original - IN: FileAccPropList instance to copy
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FileAccPropList::FileAccPropList(const FileAccPropList& original) : PropList(original) {}
+FileAccPropList::FileAccPropList(const FileAccPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: FileAccPropList overloaded constructor
@@ -109,11 +111,11 @@ FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) {}
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setStdio() const
+void
+FileAccPropList::setStdio() const
{
herr_t ret_value = H5Pset_fapl_stdio(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setStdio", "H5Pset_fapl_stdio failed");
}
}
@@ -129,14 +131,14 @@ void FileAccPropList::setStdio() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-hid_t FileAccPropList::getDriver() const
+hid_t
+FileAccPropList::getDriver() const
{
hid_t driver = H5Pget_driver(id);
- if (driver < 0)
- {
+ if (driver < 0) {
throw PropListIException("FileAccPropList::getDriver", "H5Pget_driver failed");
}
- return(driver);
+ return (driver);
}
//--------------------------------------------------------------------------
@@ -151,11 +153,11 @@ hid_t FileAccPropList::getDriver() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetDriver
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
+void
+FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
{
herr_t ret_value = H5Pset_driver(id, new_driver_id, new_driver_info);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setDriver", "H5Pset_driver failed");
}
}
@@ -167,11 +169,11 @@ void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setFamilyOffset(hsize_t offset) const
+void
+FileAccPropList::setFamilyOffset(hsize_t offset) const
{
herr_t ret_value = H5Pset_family_offset(id, offset);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setFamilyOffset", "H5Pset_family_offset failed");
}
}
@@ -183,15 +185,15 @@ void FileAccPropList::setFamilyOffset(hsize_t offset) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-hsize_t FileAccPropList::getFamilyOffset() const
+hsize_t
+FileAccPropList::getFamilyOffset() const
{
hsize_t offset;
- herr_t ret_value = H5Pget_family_offset(id, &offset);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Pget_family_offset(id, &offset);
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getFamilyOffset", "H5Pget_family_offset failed");
}
- return(offset);
+ return (offset);
}
//--------------------------------------------------------------------------
@@ -209,12 +211,12 @@ hsize_t FileAccPropList::getFamilyOffset() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplCore
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
+void
+FileAccPropList::setCore(size_t increment, hbool_t backing_store) const
{
- herr_t ret_value = H5Pset_fapl_core (id, increment, backing_store);
- if (ret_value < 0)
- {
- throw PropListIException ("FileAccPropList::setCore", "H5Pset_fapl_core failed");
+ herr_t ret_value = H5Pset_fapl_core(id, increment, backing_store);
+ if (ret_value < 0) {
+ throw PropListIException("FileAccPropList::setCore", "H5Pset_fapl_core failed");
}
}
@@ -227,11 +229,11 @@ void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
+void
+FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const
{
herr_t ret_value = H5Pget_fapl_core(id, &increment, &backing_store);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getCore", "H5Pget_fapl_core failed");
}
}
@@ -247,11 +249,11 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
/// Note that \a memb_size is used only when creating a new file.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList& memb_plist) const
+void
+FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const
{
- herr_t ret_value = H5Pset_fapl_family (id, memb_size, memb_plist.getId());
- if(ret_value < 0)
- {
+ herr_t ret_value = H5Pset_fapl_family(id, memb_size, memb_plist.getId());
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setFamily", "H5Pset_fapl_family failed");
}
}
@@ -266,15 +268,15 @@ void FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList& memb_p
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const
+void
+FileAccPropList::getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) const
{
- hid_t memb_plist_id;
+ hid_t memb_plist_id;
herr_t ret_value = H5Pget_fapl_family(id, &memb_size, &memb_plist_id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getFamily", "H5Pget_fapl_family failed");
}
- memb_plist.p_setId(memb_plist_id);
+ memb_plist.p_setId(memb_plist_id);
}
//--------------------------------------------------------------------------
@@ -287,16 +289,16 @@ void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
+FileAccPropList
+FileAccPropList::getFamily(hsize_t &memb_size) const
{
- hid_t memb_plist_id;
+ hid_t memb_plist_id;
herr_t ret_value = H5Pget_fapl_family(id, &memb_size, &memb_plist_id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getFamily", "H5Pget_fapl_family failed");
}
- FileAccPropList memb_plist(memb_plist_id);
- return(memb_plist);
+ FileAccPropList memb_plist(memb_plist_id);
+ return (memb_plist);
}
//--------------------------------------------------------------------------
@@ -315,13 +317,14 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext) const
+void
+FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
+ const char *meta_ext, const char *raw_ext) const
{
- hid_t meta_pid = meta_plist.getId();
- hid_t raw_pid = raw_plist.getId();
+ hid_t meta_pid = meta_plist.getId();
+ hid_t raw_pid = raw_plist.getId();
herr_t ret_value = H5Pset_fapl_split(id, meta_ext, meta_pid, raw_ext, raw_pid);
- if(ret_value < 0)
-{
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setSplit", "H5Pset_fapl_split failed");
}
}
@@ -339,7 +342,9 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext) const
+void
+FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
+ const H5std_string &meta_ext, const H5std_string &raw_ext) const
{
setSplit(meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str());
}
@@ -356,15 +361,15 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-size_t FileAccPropList::getSieveBufSize() const
+size_t
+FileAccPropList::getSieveBufSize() const
{
size_t bufsize;
herr_t ret_value = H5Pget_sieve_buf_size(id, &bufsize);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getSieveBufSize", "H5Pget_sieve_buf_size failed");
}
- return(bufsize);
+ return (bufsize);
}
//--------------------------------------------------------------------------
@@ -377,11 +382,11 @@ size_t FileAccPropList::getSieveBufSize() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSieveBufSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setSieveBufSize(size_t bufsize) const
+void
+FileAccPropList::setSieveBufSize(size_t bufsize) const
{
herr_t ret_value = H5Pset_sieve_buf_size(id, bufsize);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getSieveBufSize", "H5Pget_sieve_buf_size failed");
}
}
@@ -397,11 +402,11 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMetaBlockSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
+void
+FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
{
herr_t ret_value = H5Pset_meta_block_size(id, block_size);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setMetaBlockSize", "H5Pset_meta_block_size failed");
}
}
@@ -413,15 +418,15 @@ void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-hsize_t FileAccPropList::getMetaBlockSize() const
+hsize_t
+FileAccPropList::getMetaBlockSize() const
{
hsize_t block_size;
- herr_t ret_value = H5Pget_meta_block_size(id, &block_size);
- if(ret_value < 0)
- {
+ herr_t ret_value = H5Pget_meta_block_size(id, &block_size);
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getMetaBlockSize", "H5Pget_meta_block_size failed");
}
- return(block_size);
+ return (block_size);
}
//--------------------------------------------------------------------------
@@ -437,11 +442,11 @@ hsize_t FileAccPropList::getMetaBlockSize() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplLog
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
+void
+FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
{
herr_t ret_value = H5Pset_fapl_log(id, logfile, flags, buf_size);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setLog", "H5Pset_fapl_log failed");
}
}
@@ -456,7 +461,8 @@ void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_siz
///\param buf_size - IN: Size of the logging buffer
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const
+void
+FileAccPropList::setLog(const H5std_string &logfile, unsigned flags, size_t buf_size) const
{
setLog(logfile.c_str(), flags, buf_size);
}
@@ -469,11 +475,11 @@ void FileAccPropList::setLog(const H5std_string& logfile, unsigned flags, size_t
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setSec2() const
+void
+FileAccPropList::setSec2() const
{
herr_t ret_value = H5Pset_fapl_sec2(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setSec2", "H5Pset_fapl_sec2 failed");
}
}
@@ -494,11 +500,11 @@ void FileAccPropList::setSec2() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAlignment
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const
+void
+FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const
{
herr_t ret_value = H5Pset_alignment(id, threshold, alignment);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setAlignment", "H5Pset_alignment failed");
}
}
@@ -512,11 +518,11 @@ void FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const
+void
+FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const
{
herr_t ret_value = H5Pget_alignment(id, &threshold, &alignment);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getAlignment", "H5Pget_alignment failed");
}
}
@@ -531,11 +537,11 @@ void FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMultiType
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
+void
+FileAccPropList::setMultiType(H5FD_mem_t dtype) const
{
herr_t ret_value = H5Pset_multi_type(id, dtype);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setMultiType", "H5Pset_multi_type failed");
}
}
@@ -550,15 +556,15 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMultiType
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5FD_mem_t FileAccPropList::getMultiType() const
+H5FD_mem_t
+FileAccPropList::getMultiType() const
{
H5FD_mem_t dtype;
- herr_t ret_value = H5Pget_multi_type(id, &dtype);
- if(ret_value < 0)
- {
+ herr_t ret_value = H5Pget_multi_type(id, &dtype);
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getMultiType", "H5Pget_multi_type failed");
}
- return(dtype);
+ return (dtype);
}
//--------------------------------------------------------------------------
@@ -578,11 +584,11 @@ H5FD_mem_t FileAccPropList::getMultiType() const
/// means fully read chunks are always preempted before other chunks.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const
+void
+FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const
{
herr_t ret_value = H5Pset_cache(id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setCache", "H5Pset_cache failed");
}
}
@@ -597,11 +603,11 @@ void FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_n
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileAccPropList::getCache(int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0) const
+void
+FileAccPropList::getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const
{
herr_t ret_value = H5Pget_cache(id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getCache", "H5Pget_cache failed");
}
}
@@ -613,11 +619,11 @@ void FileAccPropList::getCache(int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdc
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
+void
+FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
{
herr_t ret_value = H5Pset_fclose_degree(id, degree);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setFcloseDegree", "H5Pset_fclose_degree failed");
}
}
@@ -629,15 +635,15 @@ void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5F_close_degree_t FileAccPropList::getFcloseDegree() const
+H5F_close_degree_t
+FileAccPropList::getFcloseDegree() const
{
H5F_close_degree_t degree;
- herr_t ret_value = H5Pget_fclose_degree(id, &degree);
- if(ret_value < 0)
- {
+ herr_t ret_value = H5Pget_fclose_degree(id, &degree);
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getFcloseDegree", "H5Pget_fclose_degree failed");
}
- return(degree);
+ return (degree);
}
//--------------------------------------------------------------------------
@@ -651,11 +657,11 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetGCReferences
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileAccPropList::setGcReferences(unsigned gc_ref) const
+void
+FileAccPropList::setGcReferences(unsigned gc_ref) const
{
herr_t ret_value = H5Pset_gc_references(id, gc_ref);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setGcReferences", "H5Pset_gc_references failed");
}
}
@@ -667,17 +673,17 @@ void FileAccPropList::setGcReferences(unsigned gc_ref) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-unsigned FileAccPropList::getGcReferences() const
+unsigned
+FileAccPropList::getGcReferences() const
{
unsigned gc_ref;
// the name of this routine will be changed to H5Pget_gc_references???
herr_t ret_value = H5Pget_gc_references(id, &gc_ref);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getGcReferences", "H5Pget_gc_references failed");
}
- return(gc_ref);
+ return (gc_ref);
}
//--------------------------------------------------------------------------
@@ -702,11 +708,11 @@ unsigned FileAccPropList::getGcReferences() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLibverBounds
// Programmer: Binh-Minh Ribler - March, 2015
//--------------------------------------------------------------------------
-void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const
+void
+FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const
{
herr_t ret_value = H5Pset_libver_bounds(id, libver_low, libver_high);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::setLibverBounds", "H5Pset_libver_bounds failed");
}
}
@@ -732,11 +738,11 @@ void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libv
/// \li \c H5F_LIBVER_LATEST
// Programmer: Binh-Minh Ribler - March, 2015
//--------------------------------------------------------------------------
-void FileAccPropList::getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const
+void
+FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_high) const
{
herr_t ret_value = H5Pget_libver_bounds(id, &libver_low, &libver_high);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("FileAccPropList::getLibverBounds", "H5Pget_libver_bounds failed");
}
}
@@ -748,4 +754,4 @@ void FileAccPropList::getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& li
//--------------------------------------------------------------------------
FileAccPropList::~FileAccPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index fe249ef..49cea36 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,133 +23,133 @@ namespace H5 {
*/
// Inheritance: PropList -> IdComponent
class H5_DLLCPP FileAccPropList : public PropList {
- public:
- ///\brief Default file access property list.
- static const FileAccPropList& DEFAULT;
+ public:
+ ///\brief Default file access property list.
+ static const FileAccPropList &DEFAULT;
- // Creates a file access property list.
- FileAccPropList();
+ // Creates a file access property list.
+ FileAccPropList();
- // Modifies this property list to use the H5FD_STDIO driver
- void setStdio() const;
+ // Modifies this property list to use the H5FD_STDIO driver
+ void setStdio() const;
- // Set file driver for this property list
- void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
+ // Set file driver for this property list
+ void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
- // Returns a low-level file driver identifier.
- hid_t getDriver() const;
+ // Returns a low-level file driver identifier.
+ hid_t getDriver() const;
- // Sets offset for family driver.
- void setFamilyOffset(hsize_t offset) const;
+ // Sets offset for family driver.
+ void setFamilyOffset(hsize_t offset) const;
- // Gets offset for family driver.
- hsize_t getFamilyOffset() const;
+ // Gets offset for family driver.
+ hsize_t getFamilyOffset() const;
- // Modifies this file access property list to use the sec2 driver.
- void setSec2() const;
+ // Modifies this file access property list to use the sec2 driver.
+ void setSec2() const;
- // Modifies this file access property list to use the H5FD_CORE
- // driver.
- void setCore (size_t increment, hbool_t backing_store) const;
+ // Modifies this file access property list to use the H5FD_CORE
+ // driver.
+ void setCore(size_t increment, hbool_t backing_store) const;
- // Queries H5FD_CORE driver properties.
- void getCore (size_t& increment, hbool_t& backing_store) const;
+ // Queries H5FD_CORE driver properties.
+ void getCore(size_t &increment, hbool_t &backing_store) const;
- // Sets this file access properties list to the family driver.
- void setFamily(hsize_t memb_size, const FileAccPropList& memb_plist) const;
+ // Sets this file access properties list to the family driver.
+ void setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const;
- // Returns information about the family file access property list.
- void getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const;
- FileAccPropList getFamily(hsize_t& memb_size) const;
+ // Returns information about the family file access property list.
+ void getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) const;
+ FileAccPropList getFamily(hsize_t &memb_size) const;
- // Emulates the old split file driver,
- void setSplit(const FileAccPropList& meta_plist,
- const FileAccPropList& raw_plist,
- const char* meta_ext = ".meta",
- const char* raw_ext = ".raw") const;
- void setSplit(const FileAccPropList& meta_plist,
- const FileAccPropList& raw_plist,
- const H5std_string& meta_ext = ".meta",
- const H5std_string& raw_ext = ".raw") const;
+ // Emulates the old split file driver,
+ void setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
+ const char *meta_ext = ".meta", const char *raw_ext = ".raw") const;
+ void setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
+ const H5std_string &meta_ext = ".meta", const H5std_string &raw_ext = ".raw") const;
- // Sets the maximum size of the data sieve buffer.
- void setSieveBufSize(size_t bufsize) const;
+ // Sets the maximum size of the data sieve buffer.
+ void setSieveBufSize(size_t bufsize) const;
- // Returns the current settings for the data sieve buffer size
- // property
- size_t getSieveBufSize() const;
+ // Returns the current settings for the data sieve buffer size
+ // property
+ size_t getSieveBufSize() const;
- // Sets the minimum size of metadata block allocations.
- void setMetaBlockSize(hsize_t &block_size) const;
+ // Sets the minimum size of metadata block allocations.
+ void setMetaBlockSize(hsize_t &block_size) const;
- // Returns the current metadata block size setting.
- hsize_t getMetaBlockSize() const;
+ // Returns the current metadata block size setting.
+ hsize_t getMetaBlockSize() const;
- // Modifies this file access property list to use the logging driver.
- void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
- void setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const;
+ // Modifies this file access property list to use the logging driver.
+ void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
+ void setLog(const H5std_string &logfile, unsigned flags, size_t buf_size) const;
- // Sets alignment properties of this file access property list
- void setAlignment(hsize_t threshold = 1, hsize_t alignment = 1) const;
+ // Sets alignment properties of this file access property list
+ void setAlignment(hsize_t threshold = 1, hsize_t alignment = 1) const;
- // Retrieves the current settings for alignment properties from
- // this property list.
- void getAlignment(hsize_t& threshold, hsize_t& alignment) const;
+ // Retrieves the current settings for alignment properties from
+ // this property list.
+ void getAlignment(hsize_t &threshold, hsize_t &alignment) const;
- // Sets data type for multi driver.
- void setMultiType(H5FD_mem_t dtype) const;
+ // Sets data type for multi driver.
+ void setMultiType(H5FD_mem_t dtype) const;
- // Returns the data type property for MULTI driver.
- H5FD_mem_t getMultiType() const;
+ // Returns the data type property for MULTI driver.
+ H5FD_mem_t getMultiType() const;
- // Sets the meta data cache and raw data chunk cache parameters.
- void setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const;
+ // Sets the meta data cache and raw data chunk cache parameters.
+ void setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const;
- // Queries the meta data cache and raw data chunk cache parameters.
- void getCache(int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0) const;
+ // Queries the meta data cache and raw data chunk cache parameters.
+ void getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const;
- // Sets the degree for the file close behavior.
- void setFcloseDegree(H5F_close_degree_t degree) const;
+ // Sets the degree for the file close behavior.
+ void setFcloseDegree(H5F_close_degree_t degree) const;
- // Returns the degree for the file close behavior.
- H5F_close_degree_t getFcloseDegree() const;
+ // Returns the degree for the file close behavior.
+ H5F_close_degree_t getFcloseDegree() const;
- // Sets garbage collecting references flag.
- void setGcReferences(unsigned gc_ref = 0) const;
+ // Sets garbage collecting references flag.
+ void setGcReferences(unsigned gc_ref = 0) const;
- // Returns garbage collecting references setting.
- unsigned getGcReferences() const;
+ // Returns garbage collecting references setting.
+ unsigned getGcReferences() const;
- // Sets bounds on versions of library format to be used when creating
- // or writing objects.
- void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
+ // Sets bounds on versions of library format to be used when creating
+ // or writing objects.
+ void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
- // Gets the current settings for the library version format bounds.
- void getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const;
+ // Gets the current settings for the library version format bounds.
+ void getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_high) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("FileAccPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("FileAccPropList");
+ }
- // Copy constructor: creates a copy of a FileAccPropList object.
- FileAccPropList(const FileAccPropList& original);
+ // Copy constructor: creates a copy of a FileAccPropList object.
+ FileAccPropList(const FileAccPropList &original);
- // Creates a copy of an existing file access property list
- // using the property list id.
- FileAccPropList (const hid_t plist_id);
+ // Creates a copy of an existing file access property list
+ // using the property list id.
+ FileAccPropList(const hid_t plist_id);
- // Noop destructor
- virtual ~FileAccPropList();
+ // Noop destructor
+ virtual ~FileAccPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static FileAccPropList* DEFAULT_;
+ private:
+ static FileAccPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static FileAccPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static FileAccPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index 9cc4c88..c86ffa2 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,7 +27,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-FileCreatPropList* FileCreatPropList::DEFAULT_ = 0;
+FileCreatPropList *FileCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getConstant
@@ -39,13 +39,13 @@ FileCreatPropList* FileCreatPropList::DEFAULT_ = 0;
// object, throw a PropListIException. This scenario should not happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-FileCreatPropList* FileCreatPropList::getConstant()
+FileCreatPropList *
+FileCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -54,8 +54,9 @@ FileCreatPropList* FileCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new FileCreatPropList(H5P_FILE_CREATE);
else
- throw PropListIException("FileCreatPropList::getConstant", "FileCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("FileCreatPropList::getConstant",
+ "FileCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -64,7 +65,8 @@ FileCreatPropList* FileCreatPropList::getConstant()
// points to.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void FileCreatPropList::deleteConstants()
+void
+FileCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -73,7 +75,7 @@ void FileCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose Constant for default property
//--------------------------------------------------------------------------
-const FileCreatPropList& FileCreatPropList::DEFAULT = *getConstant();
+const FileCreatPropList &FileCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -91,7 +93,7 @@ FileCreatPropList::FileCreatPropList() : PropList(H5P_FILE_CREATE) {}
///\param original - IN: FileCreatPropList instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FileCreatPropList::FileCreatPropList(const FileCreatPropList& original) : PropList(original) {}
+FileCreatPropList::FileCreatPropList(const FileCreatPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: FileCreatPropList overloaded constructor
@@ -114,13 +116,12 @@ FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id)
/// Any (or even all) of the output arguments can be null pointers.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::getVersion(unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr) const
+void
+FileCreatPropList::getVersion(unsigned &super, unsigned &freelist, unsigned &stab, unsigned &shhdr) const
{
herr_t ret_value = H5Pget_version(id, &super, &freelist, &stab, &shhdr);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::getVersion",
- "H5Pget_version failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::getVersion", "H5Pget_version failed");
}
}
@@ -134,13 +135,12 @@ void FileCreatPropList::getVersion(unsigned& super, unsigned& freelist, unsigned
/// of 2 equal to 512 or greater (512, 1024, 2048, etc.)
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setUserblock(hsize_t size) const
+void
+FileCreatPropList::setUserblock(hsize_t size) const
{
herr_t ret_value = H5Pset_userblock(id, size);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::setUserblock",
- "H5Pset_userblock failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::setUserblock", "H5Pset_userblock failed");
}
}
@@ -151,16 +151,15 @@ void FileCreatPropList::setUserblock(hsize_t size) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hsize_t FileCreatPropList::getUserblock() const
+hsize_t
+FileCreatPropList::getUserblock() const
{
hsize_t userblock_size;
- herr_t ret_value = H5Pget_userblock(id, &userblock_size);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::getUserblock",
- "H5Pget_userblock failed");
+ herr_t ret_value = H5Pget_userblock(id, &userblock_size);
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::getUserblock", "H5Pget_userblock failed");
}
- return(userblock_size);
+ return (userblock_size);
}
//--------------------------------------------------------------------------
@@ -176,13 +175,12 @@ hsize_t FileCreatPropList::getUserblock() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSizes
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const
+void
+FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const
{
herr_t ret_value = H5Pset_sizes(id, sizeof_addr, sizeof_size);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::setSizes",
- "H5Pset_sizes failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::setSizes", "H5Pset_sizes failed");
}
}
@@ -194,13 +192,12 @@ void FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::getSizes(size_t& sizeof_addr, size_t& sizeof_size) const
+void
+FileCreatPropList::getSizes(size_t &sizeof_addr, size_t &sizeof_size) const
{
herr_t ret_value = H5Pget_sizes(id, &sizeof_addr, &sizeof_size);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::getSizes",
- "H5Pget_sizes failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::getSizes", "H5Pget_sizes failed");
}
}
@@ -216,13 +213,12 @@ void FileCreatPropList::getSizes(size_t& sizeof_addr, size_t& sizeof_size) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setSymk(unsigned ik, unsigned lk) const
+void
+FileCreatPropList::setSymk(unsigned ik, unsigned lk) const
{
herr_t ret_value = H5Pset_sym_k(id, ik, lk);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::setSymk",
- "H5Pset_sym_k failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::setSymk", "H5Pset_sym_k failed");
}
}
@@ -237,13 +233,12 @@ void FileCreatPropList::setSymk(unsigned ik, unsigned lk) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::getSymk(unsigned& ik, unsigned& lk) const
+void
+FileCreatPropList::getSymk(unsigned &ik, unsigned &lk) const
{
herr_t ret_value = H5Pget_sym_k(id, &ik, &lk);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::getSymk",
- "H5Pget_sym_k failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::getSymk", "H5Pget_sym_k failed");
}
}
@@ -258,13 +253,12 @@ void FileCreatPropList::getSymk(unsigned& ik, unsigned& lk) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetIstoreK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setIstorek(unsigned ik) const
+void
+FileCreatPropList::setIstorek(unsigned ik) const
{
herr_t ret_value = H5Pset_istore_k(id, ik);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::setIstorek",
- "H5Pset_istore_k failed");
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::setIstorek", "H5Pset_istore_k failed");
}
}
@@ -278,16 +272,15 @@ void FileCreatPropList::setIstorek(unsigned ik) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetIstoreK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-unsigned FileCreatPropList::getIstorek() const
+unsigned
+FileCreatPropList::getIstorek() const
{
unsigned ik;
- herr_t ret_value = H5Pget_istore_k(id, &ik);
- if(ret_value < 0)
- {
- throw PropListIException("FileCreatPropList::getIstorek",
- "H5Pget_istore_k failed");
+ herr_t ret_value = H5Pget_istore_k(id, &ik);
+ if (ret_value < 0) {
+ throw PropListIException("FileCreatPropList::getIstorek", "H5Pget_istore_k failed");
}
- return(ik);
+ return (ik);
}
//--------------------------------------------------------------------------
@@ -297,4 +290,4 @@ unsigned FileCreatPropList::getIstorek() const
//--------------------------------------------------------------------------
FileCreatPropList::~FileCreatPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 02897b8..66cdc95 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,66 +23,70 @@ namespace H5 {
*/
// Inheritance: PropList -> IdComponent
class H5_DLLCPP FileCreatPropList : public PropList {
- public:
- ///\brief Default file creation property list.
- static const FileCreatPropList& DEFAULT;
+ public:
+ ///\brief Default file creation property list.
+ static const FileCreatPropList &DEFAULT;
- // Creates a file create property list.
- FileCreatPropList();
+ // Creates a file create property list.
+ FileCreatPropList();
- // Retrieves version information for various parts of a file.
- void getVersion(unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr) const;
+ // Retrieves version information for various parts of a file.
+ void getVersion(unsigned &super, unsigned &freelist, unsigned &stab, unsigned &shhdr) const;
- // Sets the userblock size field of a file creation property list.
- void setUserblock(hsize_t size) const;
+ // Sets the userblock size field of a file creation property list.
+ void setUserblock(hsize_t size) const;
- // Gets the size of a user block in this file creation property list.
- hsize_t getUserblock() const;
+ // Gets the size of a user block in this file creation property list.
+ hsize_t getUserblock() const;
- // Retrieves the size-of address and size quantities stored in a
- // file according to this file creation property list.
- void getSizes(size_t& sizeof_addr, size_t& sizeof_size) const;
+ // Retrieves the size-of address and size quantities stored in a
+ // file according to this file creation property list.
+ void getSizes(size_t &sizeof_addr, size_t &sizeof_size) const;
- // Sets file size-of addresses and sizes.
- void setSizes(size_t sizeof_addr = 4, size_t sizeof_size = 4) const;
+ // Sets file size-of addresses and sizes.
+ void setSizes(size_t sizeof_addr = 4, size_t sizeof_size = 4) const;
- // Retrieves the size of the symbol table B-tree 1/2 rank and the
- // symbol table leaf node 1/2 size.
- void getSymk(unsigned& int_nodes_k, unsigned& leaf_nodes_k) const;
+ // Retrieves the size of the symbol table B-tree 1/2 rank and the
+ // symbol table leaf node 1/2 size.
+ void getSymk(unsigned &int_nodes_k, unsigned &leaf_nodes_k) const;
- // Sets the size of parameters used to control the symbol table nodes.
- void setSymk(unsigned int_nodes_k, unsigned leaf_nodes_k) const;
+ // Sets the size of parameters used to control the symbol table nodes.
+ void setSymk(unsigned int_nodes_k, unsigned leaf_nodes_k) const;
- // Returns the 1/2 rank of an indexed storage B-tree.
- unsigned getIstorek() const;
+ // Returns the 1/2 rank of an indexed storage B-tree.
+ unsigned getIstorek() const;
- // Sets the size of parameter used to control the B-trees for
- // indexing chunked datasets.
- void setIstorek(unsigned ik) const;
+ // Sets the size of parameter used to control the B-trees for
+ // indexing chunked datasets.
+ void setIstorek(unsigned ik) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("FileCreatPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("FileCreatPropList");
+ }
- // Copy constructor: creates a copy of a FileCreatPropList object.
- FileCreatPropList(const FileCreatPropList& orig);
+ // Copy constructor: creates a copy of a FileCreatPropList object.
+ FileCreatPropList(const FileCreatPropList &orig);
- // Creates a copy of an existing file create property list
- // using the property list id.
- FileCreatPropList (const hid_t plist_id);
+ // Creates a copy of an existing file create property list
+ // using the property list id.
+ FileCreatPropList(const hid_t plist_id);
- // Noop destructor
- virtual ~FileCreatPropList();
+ // Noop destructor
+ virtual ~FileCreatPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static FileCreatPropList* DEFAULT_;
+ private:
+ static FileCreatPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static FileCreatPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static FileCreatPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 7b19c7e..2a87be0 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -37,9 +37,9 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
//--------------------------------------------------------------------------
// Function H5File default constructor
@@ -79,11 +79,14 @@ H5File::H5File() : Group(), id(H5I_INVALID_HID) {}
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
+H5File::H5File(const char *name, unsigned int flags, const FileCreatPropList &create_plist,
+ const FileAccPropList &access_plist)
+ : Group(), id(H5I_INVALID_HID)
{
try {
p_get_file(name, flags, create_plist, access_plist);
- } catch (FileIException& open_file) {
+ }
+ catch (FileIException &open_file) {
throw open_file;
}
}
@@ -104,11 +107,14 @@ H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& cr
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
+H5File::H5File(const H5std_string &name, unsigned int flags, const FileCreatPropList &create_plist,
+ const FileAccPropList &access_plist)
+ : Group(), id(H5I_INVALID_HID)
{
try {
p_get_file(name.c_str(), flags, create_plist, access_plist);
- } catch (FileIException& open_file) {
+ }
+ catch (FileIException &open_file) {
throw open_file;
}
}
@@ -122,26 +128,26 @@ H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatProp
// - removed H5F_ACC_CREAT because H5Fcreate will fail with
// H5F_ACC_CREAT. - BMR, Sep 17, 2014
//--------------------------------------------------------------------------
-void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist)
+void
+H5File::p_get_file(const char *name, unsigned int flags, const FileCreatPropList &create_plist,
+ const FileAccPropList &access_plist)
{
// These bits only set for creation, so if any of them are set,
// create the file.
- if(flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))
- {
+ if (flags & (H5F_ACC_EXCL | H5F_ACC_TRUNC)) {
hid_t create_plist_id = create_plist.getId();
hid_t access_plist_id = access_plist.getId();
- id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
- if(id < 0) // throw an exception when open/create fail
+ id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
{
throw FileIException("H5File constructor", "H5Fcreate failed");
}
}
// Open the file if none of the bits above are set.
- else
- {
+ else {
hid_t access_plist_id = access_plist.getId();
- id = H5Fopen(name, flags, access_plist_id);
- if(id < 0) // throw an exception when open/create fail
+ id = H5Fopen(name, flags, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
{
throw FileIException("H5File constructor", "H5Fopen failed");
}
@@ -176,7 +182,7 @@ H5File::H5File(hid_t existing_id) : Group()
///\param original - IN: H5File instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File(const H5File& original) : Group()
+H5File::H5File(const H5File &original) : Group()
{
id = original.getId();
incRefCount(); // increment number of references to this id
@@ -190,14 +196,15 @@ H5File::H5File(const H5File& original) : Group()
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool H5File::isHdf5(const char* name)
+bool
+H5File::isHdf5(const char *name)
{
// Calls C routine H5Fis_hdf5 to determine whether the file is in
// HDF5 format. It returns positive value, 0, or negative value
htri_t ret_value = H5Fis_hdf5(name);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Fis_hdf5 returns a negative value
{
@@ -212,9 +219,10 @@ bool H5File::isHdf5(const char* name)
///\param name - IN: Name of the file - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool H5File::isHdf5(const H5std_string& name)
+bool
+H5File::isHdf5(const H5std_string &name)
{
- return(isHdf5(name.c_str()));
+ return (isHdf5(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -235,18 +243,19 @@ bool H5File::isHdf5(const H5std_string& name)
///
// Programmer Binh-Minh Ribler - Oct, 2005
//--------------------------------------------------------------------------
-void H5File::openFile(const char* name, unsigned int flags, const FileAccPropList& access_plist)
+void
+H5File::openFile(const char *name, unsigned int flags, const FileAccPropList &access_plist)
{
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw FileIException("H5File::openFile", close_error.getDetailMsg());
}
hid_t access_plist_id = access_plist.getId();
- id = H5Fopen (name, flags, access_plist_id);
- if (id < 0) // throw an exception when open fails
+ id = H5Fopen(name, flags, access_plist_id);
+ if (id < 0) // throw an exception when open fails
{
throw FileIException("H5File::openFile", "H5Fopen failed");
}
@@ -262,7 +271,8 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
/// FileAccPropList::DEFAULT
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::openFile(const H5std_string& name, unsigned int flags, const FileAccPropList& access_plist)
+void
+H5File::openFile(const H5std_string &name, unsigned int flags, const FileAccPropList &access_plist)
{
openFile(name.c_str(), flags, access_plist);
}
@@ -284,19 +294,20 @@ void H5File::openFile(const H5std_string& name, unsigned int flags, const FileAc
// - Replaced decRefCount with close() to let the C library
// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
-void H5File::reOpen()
+void
+H5File::reOpen()
{
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw FileIException("H5File::reOpen", close_error.getDetailMsg());
}
// call C routine to reopen the file - Note: not sure about this,
// which id to be the parameter when closing?
id = H5Freopen(id);
- if(id < 0) // Raise exception when H5Freopen returns a neg value
+ if (id < 0) // Raise exception when H5Freopen returns a neg value
throw FileIException("H5File::reOpen", "H5Freopen failed");
}
@@ -307,19 +318,18 @@ void H5File::reOpen()
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FileCreatPropList H5File::getCreatePlist() const
+FileCreatPropList
+H5File::getCreatePlist() const
{
hid_t create_plist_id = H5Fget_create_plist(id);
// if H5Fget_create_plist returns a valid id, create and return
// the FileCreatPropList object for this property list
- if(create_plist_id > 0)
- {
- FileCreatPropList create_plist(create_plist_id);
- return(create_plist);
+ if (create_plist_id > 0) {
+ FileCreatPropList create_plist(create_plist_id);
+ return (create_plist);
}
- else
- {
+ else {
throw FileIException("H5File::getCreatePlist", "H5Fget_create_plist failed");
}
}
@@ -331,15 +341,15 @@ FileCreatPropList H5File::getCreatePlist() const
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FileAccPropList H5File::getAccessPlist() const
+FileAccPropList
+H5File::getAccessPlist() const
{
hid_t access_plist_id = H5Fget_access_plist(id);
// if H5Fget_access_plist returns a valid id, create and return
// the FileAccPropList object for this property list
- if(access_plist_id > 0)
- {
- FileAccPropList access_plist(access_plist_id);
+ if (access_plist_id > 0) {
+ FileAccPropList access_plist(access_plist_id);
return access_plist;
}
else // Raise an exception
@@ -358,11 +368,11 @@ FileAccPropList H5File::getAccessPlist() const
/// superblock extension, free space management, and shared object
// Programmer Binh-Minh Ribler - May 2017
//--------------------------------------------------------------------------
-void H5File::getFileInfo(H5F_info_t& file_info) const
+void
+H5File::getFileInfo(H5F_info_t &file_info) const
{
herr_t ret_value = H5Fget_info(id, &file_info);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw FileIException("H5File::getFileInfo", "H5Fget_info failed");
}
}
@@ -374,17 +384,16 @@ void H5File::getFileInfo(H5F_info_t& file_info) const
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-hssize_t H5File::getFreeSpace() const
+hssize_t
+H5File::getFreeSpace() const
{
hssize_t free_space = H5Fget_freespace(id);
- if(free_space < 0)
- {
+ if (free_space < 0) {
throw FileIException("H5File::getFreeSpace", "H5Fget_freespace failed");
}
return (free_space);
}
-
//--------------------------------------------------------------------------
// Function: H5File::getObjCount
///\brief Returns the number of opened object IDs (files, datasets,
@@ -406,11 +415,11 @@ hssize_t H5File::getFreeSpace() const
/// Multiple object types can be combined with the logical OR operator (|).
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ssize_t H5File::getObjCount(unsigned types) const
+ssize_t
+H5File::getObjCount(unsigned types) const
{
ssize_t num_objs = H5Fget_obj_count(id, types);
- if(num_objs < 0)
- {
+ if (num_objs < 0) {
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
}
return (num_objs);
@@ -441,11 +450,11 @@ ssize_t H5File::getObjCount(unsigned types) const
// Notes: will do the overload for this one after hearing from Quincey???
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
+void
+H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
{
ssize_t ret_value = H5Fget_obj_ids(id, types, max_objs, oid_list);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw FileIException("H5File::getObjIDs", "H5Fget_obj_ids failed");
}
}
@@ -471,12 +480,12 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
// Modification
// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
-void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
+void
+H5File::getVFDHandle(const FileAccPropList &fapl, void **file_handle) const
{
- hid_t fapl_id = fapl.getId();
+ hid_t fapl_id = fapl.getId();
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw FileIException("H5File::getVFDHandle", "H5Fget_vfd_handle failed");
}
}
@@ -496,7 +505,7 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
//--------------------------------------------------------------------------
-//void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
+// void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
//{
// getVFDHandle((const FileAccPropList)fapl, file_handle);
//}
@@ -511,11 +520,11 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-void H5File::getVFDHandle(void **file_handle) const
+void
+H5File::getVFDHandle(void **file_handle) const
{
herr_t ret_value = H5Fget_vfd_handle(id, H5P_DEFAULT, file_handle);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw FileIException("H5File::getVFDHandle", "H5Fget_vfd_handle failed");
}
}
@@ -530,12 +539,12 @@ void H5File::getVFDHandle(void **file_handle) const
/// order to learn the true size of the underlying file.
// Programmer Raymond Lu - June 24, 2004
//--------------------------------------------------------------------------
-hsize_t H5File::getFileSize() const
+hsize_t
+H5File::getFileSize() const
{
hsize_t file_size;
- herr_t ret_value = H5Fget_filesize(id, &file_size);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Fget_filesize(id, &file_size);
+ if (ret_value < 0) {
throw FileIException("H5File::getFileSize", "H5Fget_filesize failed");
}
return (file_size);
@@ -553,9 +562,10 @@ hsize_t H5File::getFileSize() const
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t H5File::getId() const
+hid_t
+H5File::getId() const
{
- return(id);
+ return (id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -567,7 +577,8 @@ hid_t H5File::getId() const
// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::reopen()
+void
+H5File::reopen()
{
H5File::reOpen();
}
@@ -580,9 +591,10 @@ void H5File::reopen()
// is used by CommonFG member functions to get the file id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hid_t H5File::getLocId() const
+hid_t
+H5File::getLocId() const
{
- return(getId());
+ return (getId());
}
//--------------------------------------------------------------------------
@@ -597,13 +609,14 @@ hid_t H5File::getLocId() const
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::p_setId(const hid_t new_id)
+void
+H5File::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& E) {
+ catch (Exception &E) {
throw FileIException("H5File::p_setId", E.getDetailMsg());
}
// reset object's id to the given id
@@ -618,13 +631,12 @@ void H5File::p_setId(const hid_t new_id)
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void H5File::close()
+void
+H5File::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Fclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw FileIException("H5File::close", "H5Fclose failed");
}
// reset the id
@@ -640,7 +652,8 @@ void H5File::close()
///\exception H5::FileIException
// December 2000
//--------------------------------------------------------------------------
-void H5File::throwException(const H5std_string& func_name, const H5std_string& msg) const
+void
+H5File::throwException(const H5std_string &func_name, const H5std_string &msg) const
{
throw FileIException(inMemFunc(func_name.c_str()), msg);
}
@@ -659,9 +672,10 @@ H5File::~H5File()
{
try {
close();
- } catch (Exception& close_error) {
+ }
+ catch (Exception &close_error) {
cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index c3dca46..2c68b60 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,101 +28,106 @@ namespace H5 {
*/
// Inheritance: Group -> CommonFG/H5Object -> H5Location -> IdComponent
class H5_DLLCPP H5File : public Group {
- public:
- // Creates or opens an HDF5 file.
- H5File(const char* name, unsigned int flags,
- const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
- const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
- H5File(const H5std_string& name, unsigned int flags,
- const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
- const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
+ public:
+ // Creates or opens an HDF5 file.
+ H5File(const char *name, unsigned int flags,
+ const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT,
+ const FileAccPropList & access_plist = FileAccPropList::DEFAULT);
+ H5File(const H5std_string &name, unsigned int flags,
+ const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT,
+ const FileAccPropList & access_plist = FileAccPropList::DEFAULT);
- // Open the file
- void openFile(const H5std_string& name, unsigned int flags,
- const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
- void openFile(const char* name, unsigned int flags,
- const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
+ // Open the file
+ void openFile(const H5std_string &name, unsigned int flags,
+ const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
+ void openFile(const char *name, unsigned int flags,
+ const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
- // Close this file.
- virtual void close();
+ // Close this file.
+ virtual void close();
- // Gets the access property list of this file.
- FileAccPropList getAccessPlist() const;
+ // Gets the access property list of this file.
+ FileAccPropList getAccessPlist() const;
- // Gets the creation property list of this file.
- FileCreatPropList getCreatePlist() const;
+ // Gets the creation property list of this file.
+ FileCreatPropList getCreatePlist() const;
- // Gets general information about this file.
- void getFileInfo(H5F_info_t& file_info) const;
+ // Gets general information about this file.
+ void getFileInfo(H5F_info_t &file_info) const;
- // Retrieves the file size of an opened file.
- hsize_t getFileSize() const;
+ // Retrieves the file size of an opened file.
+ hsize_t getFileSize() const;
- // Returns the amount of free space in the file.
- hssize_t getFreeSpace() const;
+ // Returns the amount of free space in the file.
+ hssize_t getFreeSpace() const;
- // Returns the number of opened object IDs (files, datasets, groups
- // and datatypes) in the same file.
- ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const;
+ // Returns the number of opened object IDs (files, datasets, groups
+ // and datatypes) in the same file.
+ ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const;
- // Retrieves a list of opened object IDs (files, datasets, groups
- // and datatypes) in the same file.
- void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
+ // Retrieves a list of opened object IDs (files, datasets, groups
+ // and datatypes) in the same file.
+ void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
- // Returns the pointer to the file handle of the low-level file driver.
- void getVFDHandle(void **file_handle) const;
- void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
- //void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // removed from 1.8.18 and 1.10.1
+ // Returns the pointer to the file handle of the low-level file driver.
+ void getVFDHandle(void **file_handle) const;
+ void getVFDHandle(const FileAccPropList &fapl, void **file_handle) const;
+ // void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // removed from 1.8.18 and 1.10.1
- // Determines if a file, specified by its name, is in HDF5 format
- static bool isHdf5(const char* name);
- static bool isHdf5(const H5std_string& name);
+ // Determines if a file, specified by its name, is in HDF5 format
+ static bool isHdf5(const char *name);
+ static bool isHdf5(const H5std_string &name);
- // Reopens this file.
- void reOpen(); // added for better name
+ // Reopens this file.
+ void reOpen(); // added for better name
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- void reopen(); // obsolete in favor of reOpen()
+ void reopen(); // obsolete in favor of reOpen()
- // Gets the file id
- virtual hid_t getLocId() const;
+ // Gets the file id
+ virtual hid_t getLocId() const;
- // Creates an H5File using an existing file id. Not recommended
- // in applications.
- H5File(hid_t existing_id);
+ // Creates an H5File using an existing file id. Not recommended
+ // in applications.
+ H5File(hid_t existing_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("H5File"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("H5File");
+ }
- // Throw file exception.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
+ // Throw file exception.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
- // Default constructor
- H5File();
+ // Default constructor
+ H5File();
- // Copy constructor: makes a copy of the original H5File object.
- H5File(const H5File& original);
+ // Copy constructor: makes a copy of the original H5File object.
+ H5File(const H5File &original);
- // Gets the HDF5 file id.
- virtual hid_t getId() const;
+ // Gets the HDF5 file id.
+ virtual hid_t getId() const;
- // H5File destructor.
- virtual ~H5File();
+ // H5File destructor.
+ virtual ~H5File();
- protected:
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Sets the HDF5 file id.
- virtual void p_setId(const hid_t new_id);
+ // Sets the HDF5 file id.
+ virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- hid_t id; // HDF5 file id
+ private:
+ hid_t id; // HDF5 file id
- // This function is private and contains common code between the
- // constructors taking a string or a char*
- void p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist);
+ // This function is private and contains common code between the
+ // constructors taking a string or a char*
+ void p_get_file(const char *name, unsigned int flags, const FileCreatPropList &create_plist,
+ const FileAccPropList &access_plist);
}; // end of H5File
} // namespace H5
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index fb9fe58..045446f 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -46,7 +46,7 @@ FloatType::FloatType() {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType::FloatType(const PredType& pred_type) : AtomType()
+FloatType::FloatType(const PredType &pred_type) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy(pred_type);
@@ -67,7 +67,7 @@ FloatType::FloatType(const hid_t existing_id) : AtomType(existing_id) {}
///\brief Copy constructor: makes a copy of the original FloatType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType::FloatType(const FloatType& original) : AtomType(original){}
+FloatType::FloatType(const FloatType &original) : AtomType(original) {}
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
@@ -77,13 +77,12 @@ FloatType::FloatType(const FloatType& original) : AtomType(original){}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FloatType::FloatType(const DataSet& dataset) : AtomType()
+FloatType::FloatType(const DataSet &dataset) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("FloatType constructor", "H5Dget_type failed");
}
}
@@ -102,7 +101,7 @@ FloatType::FloatType(const DataSet& dataset) : AtomType()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-FloatType::FloatType(const H5Location& loc, const char *type_name) : AtomType()
+FloatType::FloatType(const H5Location &loc, const char *type_name) : AtomType()
{
id = p_opentype(loc, type_name);
}
@@ -121,7 +120,7 @@ FloatType::FloatType(const H5Location& loc, const char *type_name) : AtomType()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-FloatType::FloatType(const H5Location& loc, const H5std_string& type_name) : AtomType()
+FloatType::FloatType(const H5Location &loc, const H5std_string &type_name) : AtomType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -133,7 +132,8 @@ FloatType::FloatType(const H5Location& loc, const H5std_string& type_name) : Ato
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* FloatType::decode() const
+DataType *
+FloatType::decode() const
{
hid_t encoded_flttype_id = H5I_INVALID_HID;
try {
@@ -144,7 +144,7 @@ DataType* FloatType::decode() const
}
FloatType *encoded_flttype = new FloatType;
encoded_flttype->p_setId(encoded_flttype_id);
- return(encoded_flttype);
+ return (encoded_flttype);
}
//--------------------------------------------------------------------------
@@ -158,11 +158,11 @@ DataType* FloatType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FloatType::getFields(size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize) const
+void
+FloatType::getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, size_t &msize) const
{
herr_t ret_value = H5Tget_fields(id, &spos, &epos, &esize, &mpos, &msize);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("FloatType::getFields", "H5Tget_fields failed");
}
}
@@ -179,11 +179,11 @@ void FloatType::getFields(size_t& spos, size_t& epos, size_t& esize, size_t& mpo
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const
+void
+FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const
{
herr_t ret_value = H5Tset_fields(id, spos, epos, esize, mpos, msize);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("FloatType::setFields", "H5Tset_fields failed");
}
}
@@ -195,15 +195,15 @@ void FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, s
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-size_t FloatType::getEbias() const
+size_t
+FloatType::getEbias() const
{
size_t ebias = H5Tget_ebias(id);
// Returns the bias if successful
- if(ebias == 0)
- {
+ if (ebias == 0) {
throw DataTypeIException("FloatType::getEbias", "H5Tget_ebias failed - returned exponent bias as 0");
}
- return(ebias);
+ return (ebias);
}
//--------------------------------------------------------------------------
@@ -213,11 +213,11 @@ size_t FloatType::getEbias() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FloatType::setEbias(size_t ebias) const
+void
+FloatType::setEbias(size_t ebias) const
{
herr_t ret_value = H5Tset_ebias(id, ebias);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("FloatType::setEbias", "H5Tset_ebias failed");
}
}
@@ -237,21 +237,21 @@ void FloatType::setEbias(size_t ebias) const
/// \a norm_string.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_norm_t FloatType::getNorm(H5std_string& norm_string) const
+H5T_norm_t
+FloatType::getNorm(H5std_string &norm_string) const
{
- H5T_norm_t norm = H5Tget_norm(id); // C routine
+ H5T_norm_t norm = H5Tget_norm(id); // C routine
// Returns a valid normalization type if successful
- if(norm == H5T_NORM_ERROR)
- {
+ if (norm == H5T_NORM_ERROR) {
throw DataTypeIException("FloatType::getNorm", "H5Tget_norm failed - returned H5T_NORM_ERROR");
}
- if(norm == H5T_NORM_IMPLIED)
+ if (norm == H5T_NORM_IMPLIED)
norm_string = "H5T_NORM_IMPLIED (0)";
- else if(norm == H5T_NORM_MSBSET)
+ else if (norm == H5T_NORM_MSBSET)
norm_string = "H5T_NORM_MSBSET (1)";
- else if(norm == H5T_NORM_NONE)
+ else if (norm == H5T_NORM_NONE)
norm_string = "H5T_NORM_NONE (2)";
- return(norm);
+ return (norm);
}
//--------------------------------------------------------------------------
@@ -266,11 +266,11 @@ H5T_norm_t FloatType::getNorm(H5std_string& norm_string) const
/// \li \c H5T_NORM_NONE (2) - Mantissa is not normalized
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FloatType::setNorm(H5T_norm_t norm) const
+void
+FloatType::setNorm(H5T_norm_t norm) const
{
herr_t ret_value = H5Tset_norm(id, norm);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("FloatType::setNorm", "H5Tset_norm failed");
}
}
@@ -290,21 +290,21 @@ void FloatType::setNorm(H5T_norm_t norm) const
/// \a pad_string.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_pad_t FloatType::getInpad(H5std_string& pad_string) const
+H5T_pad_t
+FloatType::getInpad(H5std_string &pad_string) const
{
H5T_pad_t pad_type = H5Tget_inpad(id);
// Returns a valid padding type if successful
- if(pad_type == H5T_PAD_ERROR)
- {
+ if (pad_type == H5T_PAD_ERROR) {
throw DataTypeIException("FloatType::getInpad", "H5Tget_inpad failed - returned H5T_PAD_ERROR");
}
- if(pad_type == H5T_PAD_ZERO)
+ if (pad_type == H5T_PAD_ZERO)
pad_string = "H5T_PAD_ZERO (0)";
- else if(pad_type == H5T_PAD_ONE)
+ else if (pad_type == H5T_PAD_ONE)
pad_string = "H5T_PAD_ONE (1)";
- else if(pad_type == H5T_PAD_BACKGROUND)
+ else if (pad_type == H5T_PAD_BACKGROUND)
pad_string = "H5T_PAD_BACKGROUD (2)";
- return(pad_type);
+ return (pad_type);
}
//--------------------------------------------------------------------------
@@ -324,11 +324,11 @@ H5T_pad_t FloatType::getInpad(H5std_string& pad_string) const
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FloatType::setInpad(H5T_pad_t inpad) const
+void
+FloatType::setInpad(H5T_pad_t inpad) const
{
herr_t ret_value = H5Tset_inpad(id, inpad);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("FloatType::setInpad", "H5Tset_inpad failed");
}
}
@@ -340,4 +340,4 @@ void FloatType::setInpad(H5T_pad_t inpad) const
//--------------------------------------------------------------------------
FloatType::~FloatType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index d26df5c..7f2f868 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,59 +23,63 @@ namespace H5 {
*/
// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP FloatType : public AtomType {
- public:
- // Creates a floating-point type using a predefined type.
- FloatType(const PredType& pred_type);
+ public:
+ // Creates a floating-point type using a predefined type.
+ FloatType(const PredType &pred_type);
- // Gets the floating-point datatype of the specified dataset.
- FloatType(const DataSet& dataset);
+ // Gets the floating-point datatype of the specified dataset.
+ FloatType(const DataSet &dataset);
- // Constructors that open an HDF5 float datatype, given a location.
- FloatType(const H5Location& loc, const char* name);
- FloatType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open an HDF5 float datatype, given a location.
+ FloatType(const H5Location &loc, const char *name);
+ FloatType(const H5Location &loc, const H5std_string &name);
- // Returns an FloatType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an FloatType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- // Retrieves the exponent bias of a floating-point type.
- size_t getEbias() const;
+ // Retrieves the exponent bias of a floating-point type.
+ size_t getEbias() const;
- // Sets the exponent bias of a floating-point type.
- void setEbias(size_t ebias) const;
+ // Sets the exponent bias of a floating-point type.
+ void setEbias(size_t ebias) const;
- // Retrieves floating point datatype bit field information.
- void getFields(size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize) const;
+ // Retrieves floating point datatype bit field information.
+ void getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, size_t &msize) const;
- // Sets locations and sizes of floating point bit fields.
- void setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const;
+ // Sets locations and sizes of floating point bit fields.
+ void setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const;
- // Retrieves the internal padding type for unused bits in floating-point datatypes.
- H5T_pad_t getInpad(H5std_string& pad_string) const;
+ // Retrieves the internal padding type for unused bits in floating-point datatypes.
+ H5T_pad_t getInpad(H5std_string &pad_string) const;
- // Fills unused internal floating point bits.
- void setInpad(H5T_pad_t inpad) const;
+ // Fills unused internal floating point bits.
+ void setInpad(H5T_pad_t inpad) const;
- // Retrieves mantissa normalization of a floating-point datatype.
- H5T_norm_t getNorm(H5std_string& norm_string) const;
+ // Retrieves mantissa normalization of a floating-point datatype.
+ H5T_norm_t getNorm(H5std_string &norm_string) const;
- // Sets the mantissa normalization of a floating-point datatype.
- void setNorm(H5T_norm_t norm) const;
+ // Sets the mantissa normalization of a floating-point datatype.
+ void setNorm(H5T_norm_t norm) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("FloatType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("FloatType");
+ }
- // Default constructor
- FloatType();
+ // Default constructor
+ FloatType();
- // Creates a floating-point datatype using an existing id.
- FloatType(const hid_t existing_id);
+ // Creates a floating-point datatype using an existing id.
+ FloatType(const hid_t existing_id);
- // Copy constructor: makes a copy of the original FloatType object.
- FloatType(const FloatType& original);
+ // Copy constructor: makes a copy of the original FloatType object.
+ FloatType(const FloatType &original);
- // Noop destructor.
- virtual ~FloatType();
+ // Noop destructor.
+ virtual ~FloatType();
}; // end of FloatType
} // namespace H5
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index dd2dd48..6978a8b 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -36,9 +36,9 @@
namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
//--------------------------------------------------------------------------
// Function: Group default constructor
@@ -53,7 +53,7 @@ Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) {}
///\param original - IN: Original group to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
+Group::Group(const Group &original) : H5Object(), CommonFG(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -64,9 +64,10 @@ Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
///\return Id of this group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hid_t Group::getLocId() const
+hid_t
+Group::getLocId() const
{
- return(getId());
+ return (getId());
}
//--------------------------------------------------------------------------
@@ -92,7 +93,7 @@ Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id)
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
-Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
+Group::Group(const H5Location &loc, const void *ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereference");
}
@@ -128,9 +129,10 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Ob
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t Group::getId() const
+hid_t
+Group::getId() const
{
- return(id);
+ return (id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -146,13 +148,14 @@ hid_t Group::getId() const
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void Group::p_setId(const hid_t new_id)
+void
+Group::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw GroupIException("Group::p_setId", close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -167,13 +170,12 @@ void Group::p_setId(const hid_t new_id)
///\exception H5::GroupIException
// March 2005
//--------------------------------------------------------------------------
-void Group::close()
+void
+Group::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Gclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw GroupIException("Group::close", "H5Gclose failed");
}
// reset the id
@@ -189,7 +191,8 @@ void Group::close()
///\exception H5::GroupIException
// December 2000
//--------------------------------------------------------------------------
-void Group::throwException(const H5std_string& func_name, const H5std_string& msg) const
+void
+Group::throwException(const H5std_string &func_name, const H5std_string &msg) const
{
throw GroupIException(inMemFunc(func_name.c_str()), msg);
}
@@ -209,9 +212,9 @@ Group::~Group()
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index 88c1a3b..8ee9eec 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,56 +22,60 @@ namespace H5 {
*/
// Inheritance: CommonFG/H5Object -> H5Location -> IdComponent
class H5_DLLCPP Group : public H5Object, public CommonFG {
- public:
- // Close this group.
- virtual void close();
+ public:
+ // Close this group.
+ virtual void close();
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("Group"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("Group");
+ }
- // Throw group exception.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
+ // Throw group exception.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
- // for CommonFG to get the file id.
- virtual hid_t getLocId() const;
+ // for CommonFG to get the file id.
+ virtual hid_t getLocId() const;
- // Creates a group by way of dereference.
- Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- // Removed in 1.8.19, because H5Location is baseclass
- //Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
+ // Creates a group by way of dereference.
+ Group(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+ // Removed in 1.8.19, because H5Location is baseclass
+ // Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- // default constructor
- Group();
+ // default constructor
+ Group();
- // Copy constructor: makes a copy of the original object
- Group(const Group& original);
+ // Copy constructor: makes a copy of the original object
+ Group(const Group &original);
- // Gets the group id.
- virtual hid_t getId() const;
+ // Gets the group id.
+ virtual hid_t getId() const;
- // Destructor
- virtual ~Group();
+ // Destructor
+ virtual ~Group();
- // Creates a copy of an existing group using its id.
- Group(const hid_t group_id);
+ // Creates a copy of an existing group using its id.
+ Group(const hid_t group_id);
- // The "using" lines below are to avoid the compilation error
- // "error: request for member ‘link’ is ambiguous" when both CommonFG and
- // H5Location have overloaded functions of the same name. CommonFG's
- // member functions need to be kept for backward compatibility for a while.
- // They can be removed after these functions are removed.
- // -BMR, May 2018
- using H5Location::link;
- using CommonFG::link;
+ // The "using" lines below are to avoid the compilation error
+ // "error: request for member ‘link’ is ambiguous" when both CommonFG and
+ // H5Location have overloaded functions of the same name. CommonFG's
+ // member functions need to be kept for backward compatibility for a while.
+ // They can be removed after these functions are removed.
+ // -BMR, May 2018
+ using CommonFG::link;
+ using H5Location::link;
- protected:
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Sets the group id.
- virtual void p_setId(const hid_t new_id);
+ // Sets the group id.
+ virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
- private:
- hid_t id; // HDF5 group id
+ private:
+ hid_t id; // HDF5 group id
}; // end of Group
} // namespace H5
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index c54e901..810d0cc 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5Library.h"
@@ -37,7 +37,8 @@ bool IdComponent::H5dontAtexit_called = false;
///\brief Increment reference counter for a given id.
// Programmer Binh-Minh Ribler - May 2005
//--------------------------------------------------------------------------
-void IdComponent::incRefCount(const hid_t obj_id) const
+void
+IdComponent::incRefCount(const hid_t obj_id) const
{
if (p_valid_id(obj_id))
if (H5Iinc_ref(obj_id) < 0)
@@ -49,7 +50,8 @@ void IdComponent::incRefCount(const hid_t obj_id) const
///\brief Increment reference counter for the id of this object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void IdComponent::incRefCount() const
+void
+IdComponent::incRefCount() const
{
incRefCount(getId());
}
@@ -62,17 +64,15 @@ void IdComponent::incRefCount() const
// Added the check for ref counter to give a little more info
// on why H5Idec_ref fails in some cases - BMR 5/19/2005
//--------------------------------------------------------------------------
-void IdComponent::decRefCount(const hid_t obj_id) const
+void
+IdComponent::decRefCount(const hid_t obj_id) const
{
if (p_valid_id(obj_id))
- if (H5Idec_ref(obj_id) < 0)
- {
+ if (H5Idec_ref(obj_id) < 0) {
if (H5Iget_ref(obj_id) <= 0)
- throw IdComponentException(inMemFunc("decRefCount"),
- "object ref count is 0 or negative");
+ throw IdComponentException(inMemFunc("decRefCount"), "object ref count is 0 or negative");
else
- throw IdComponentException(inMemFunc("decRefCount"),
- "decrementing object ref count failed");
+ throw IdComponentException(inMemFunc("decRefCount"), "decrementing object ref count failed");
}
}
@@ -81,7 +81,8 @@ void IdComponent::decRefCount(const hid_t obj_id) const
///\brief Decrement reference counter for the id of this object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void IdComponent::decRefCount() const
+void
+IdComponent::decRefCount() const
{
decRefCount(getId());
}
@@ -92,14 +93,15 @@ void IdComponent::decRefCount() const
///\return Reference count
// Programmer Binh-Minh Ribler - May 2005
//--------------------------------------------------------------------------
-int IdComponent::getCounter(const hid_t obj_id) const
+int
+IdComponent::getCounter(const hid_t obj_id) const
{
int counter = 0;
- if (p_valid_id(obj_id))
- {
+ if (p_valid_id(obj_id)) {
counter = H5Iget_ref(obj_id);
if (counter < 0)
- throw IdComponentException(inMemFunc("incRefCount"), "getting object ref count failed - negative");
+ throw IdComponentException(inMemFunc("incRefCount"),
+ "getting object ref count failed - negative");
}
return (counter);
}
@@ -110,7 +112,8 @@ int IdComponent::getCounter(const hid_t obj_id) const
///\return Reference count
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int IdComponent::getCounter() const
+int
+IdComponent::getCounter() const
{
return (getCounter(getId()));
}
@@ -129,7 +132,8 @@ int IdComponent::getCounter() const
/// input object id is invalid.
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
+H5I_type_t
+IdComponent::getHDFObjType(const hid_t obj_id)
{
if (obj_id <= 0)
return H5I_BADID; // invalid
@@ -155,9 +159,10 @@ H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
/// input object id is invalid.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-H5I_type_t IdComponent::getHDFObjType() const
+H5I_type_t
+IdComponent::getHDFObjType() const
{
- return(getHDFObjType(getId()));
+ return (getHDFObjType(getId()));
}
//--------------------------------------------------------------------------
@@ -169,7 +174,8 @@ H5I_type_t IdComponent::getHDFObjType() const
/// reference count of at least 1.
// Programmer Binh-Minh Ribler - Mar 1, 2017
//--------------------------------------------------------------------------
-bool IdComponent::isValid(hid_t an_id)
+bool
+IdComponent::isValid(hid_t an_id)
{
// Call C function
htri_t ret_value = H5Iis_valid(an_id);
@@ -199,17 +205,17 @@ bool IdComponent::isValid(hid_t an_id)
// care of close() and setId takes care incRefCount().
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IdComponent& IdComponent::operator=(const IdComponent& rhs)
+IdComponent &
+IdComponent::operator=(const IdComponent &rhs)
{
- if (this != &rhs)
- {
+ if (this != &rhs) {
// handling references to this id
try {
setId(rhs.getId());
// Note: a = b, so there are two objects with the same hdf5 id
// that's why incRefCount is needed, and it is called by setId
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw FileIException(inMemFunc("operator="), close_error.getDetailMsg());
}
}
@@ -237,7 +243,8 @@ IdComponent& IdComponent::operator=(const IdComponent& rhs)
// the id passed to setId is that of another C++ API object, so
// setId must call incRefCount.
//--------------------------------------------------------------------------
-void IdComponent::setId(const hid_t new_id)
+void
+IdComponent::setId(const hid_t new_id)
{
// set to new_id
p_setId(new_id);
@@ -271,7 +278,8 @@ IdComponent::~IdComponent() {}
/// an exception is thrown.
// Programmer Binh-Minh Ribler - Aug 6, 2005
//--------------------------------------------------------------------------
-H5std_string IdComponent::inMemFunc(const char* func_name) const
+H5std_string
+IdComponent::inMemFunc(const char *func_name) const
{
H5std_string full_name = func_name;
full_name.insert(0, "::");
@@ -288,8 +296,7 @@ IdComponent::IdComponent()
{
// initH5cpp will register the terminating functions with atexit().
// This should only be done once.
- if (!H5cppinit)
- {
+ if (!H5cppinit) {
H5Library::initH5cpp();
H5cppinit = true;
}
@@ -301,7 +308,8 @@ IdComponent::IdComponent()
// Exception: H5::IdComponentException
// July 2004
//--------------------------------------------------------------------------
-H5std_string IdComponent::p_get_file_name() const
+H5std_string
+IdComponent::p_get_file_name() const
{
hid_t temp_id = getId();
@@ -309,28 +317,26 @@ H5std_string IdComponent::p_get_file_name() const
ssize_t name_size = H5Fget_name(temp_id, NULL, 0);
// If H5Fget_name returns a negative value, raise an exception,
- if(name_size < 0)
- {
+ if (name_size < 0) {
throw IdComponentException("", "H5Fget_name failed");
}
// Call H5Fget_name again to get the actual file name
- char* name_C = new char[name_size+1]; // temporary C-string for C API
- HDmemset(name_C, 0, name_size+1); // clear buffer
+ char *name_C = new char[name_size + 1]; // temporary C-string for C API
+ HDmemset(name_C, 0, name_size + 1); // clear buffer
- name_size = H5Fget_name(temp_id, name_C, name_size+1);
+ name_size = H5Fget_name(temp_id, name_C, name_size + 1);
// Check for failure again
- if(name_size < 0)
- {
- delete []name_C;
+ if (name_size < 0) {
+ delete[] name_C;
throw IdComponentException("", "H5Fget_name failed");
}
// Convert the C file name and return
H5std_string file_name(name_C);
- delete []name_C;
- return(file_name);
+ delete[] name_C;
+ return (file_name);
}
//
@@ -344,7 +350,8 @@ H5std_string IdComponent::p_get_file_name() const
// Return true if id is valid, false, otherwise
// Programmer Binh-Minh Ribler - May, 2005
//--------------------------------------------------------------------------
-bool IdComponent::p_valid_id(const hid_t obj_id)
+bool
+IdComponent::p_valid_id(const hid_t obj_id)
{
if (obj_id <= 0)
return false;
@@ -366,4 +373,4 @@ bool IdComponent::p_valid_id(const hid_t obj_id)
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}
+} // namespace H5
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 744a780..5a5d1fb 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,97 +25,99 @@ namespace H5 {
rarely needs them.
*/
class H5_DLLCPP IdComponent {
- public:
+ public:
+ // Increment reference counter.
+ void incRefCount(const hid_t obj_id) const;
+ void incRefCount() const;
- // Increment reference counter.
- void incRefCount(const hid_t obj_id) const;
- void incRefCount() const;
+ // Decrement reference counter.
+ void decRefCount(const hid_t obj_id) const;
+ void decRefCount() const;
- // Decrement reference counter.
- void decRefCount(const hid_t obj_id) const;
- void decRefCount() const;
+ // Get the reference counter to this identifier.
+ int getCounter(const hid_t obj_id) const;
+ int getCounter() const;
- // Get the reference counter to this identifier.
- int getCounter(const hid_t obj_id) const;
- int getCounter() const;
+ // Returns an HDF5 object type, given the object id.
+ static H5I_type_t getHDFObjType(const hid_t obj_id);
- // Returns an HDF5 object type, given the object id.
- static H5I_type_t getHDFObjType(const hid_t obj_id);
+ // Returns an HDF5 object type of this object.
+ H5I_type_t getHDFObjType() const;
- // Returns an HDF5 object type of this object.
- H5I_type_t getHDFObjType() const;
+ // Checks if the given ID is valid.
+ static bool isValid(hid_t an_id);
- // Checks if the given ID is valid.
- static bool isValid(hid_t an_id);
+ // Assignment operator.
+ IdComponent &operator=(const IdComponent &rhs);
- // Assignment operator.
- IdComponent& operator=(const IdComponent& rhs);
+ // Sets the identifier of this object to a new value.
+ void setId(const hid_t new_id);
- // Sets the identifier of this object to a new value.
- void setId(const hid_t new_id);
+ // *** Deprecation warning ***
+ // The following two constructors are no longer appropriate after the
+ // data member "id" had been moved to the sub-classes.
+ // The copy constructor is a noop and is removed in 1.8.15 and the
+ // other will be removed from 1.10 release, and then from 1.8 if its
+ // removal does not raise any problems in two 1.10 releases.
- // *** Deprecation warning ***
- // The following two constructors are no longer appropriate after the
- // data member "id" had been moved to the sub-classes.
- // The copy constructor is a noop and is removed in 1.8.15 and the
- // other will be removed from 1.10 release, and then from 1.8 if its
- // removal does not raise any problems in two 1.10 releases.
-
- // Creates an object to hold an HDF5 identifier.
- // IdComponent(const hid_t h5_id); - removed in 1.8.19
+ // Creates an object to hold an HDF5 identifier.
+ // IdComponent(const hid_t h5_id); - removed in 1.8.19
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Copy constructor: makes copy of the original IdComponent object.
- // IdComponent(const IdComponent& original); - removed from 1.8.15
+ // Copy constructor: makes copy of the original IdComponent object.
+ // IdComponent(const IdComponent& original); - removed from 1.8.15
- // Gets the identifier of this object.
- virtual hid_t getId () const = 0;
+ // Gets the identifier of this object.
+ virtual hid_t getId() const = 0;
- // For subclasses to throw appropriate exception, used in H5Location,
- // H5CommonFG, and H5Object.
- virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const {};
+ // For subclasses to throw appropriate exception, used in H5Location,
+ // H5CommonFG, and H5Object.
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const {};
- // Pure virtual function for there are various H5*close for the
- // subclasses.
- virtual void close() = 0;
+ // Pure virtual function for there are various H5*close for the
+ // subclasses.
+ virtual void close() = 0;
- // Makes and returns the string "<class-name>::<func_name>";
- // <class-name> is returned by fromClass().
- H5std_string inMemFunc(const char* func_name) const;
+ // Makes and returns the string "<class-name>::<func_name>";
+ // <class-name> is returned by fromClass().
+ H5std_string inMemFunc(const char *func_name) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass() const { return("IdComponent");}
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("IdComponent");
+ }
#endif // DOXYGEN_SHOULD_SKIP_THIS
- // Destructor
- virtual ~IdComponent();
+ // Destructor
+ virtual ~IdComponent();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- protected:
-
- // Default constructor.
- IdComponent();
+ protected:
+ // Default constructor.
+ IdComponent();
- // Gets the name of the file, in which an HDF5 object belongs.
- H5std_string p_get_file_name() const;
+ // Gets the name of the file, in which an HDF5 object belongs.
+ H5std_string p_get_file_name() const;
- // Verifies that the given id is valid.
- static bool p_valid_id(const hid_t obj_id);
+ // Verifies that the given id is valid.
+ static bool p_valid_id(const hid_t obj_id);
- // Sets the identifier of this object to a new value. - this one
- // doesn't increment reference count
- virtual void p_setId(const hid_t new_id) = 0;
+ // Sets the identifier of this object to a new value. - this one
+ // doesn't increment reference count
+ virtual void p_setId(const hid_t new_id) = 0;
- // This flag is used to decide whether H5dont_atexit should be called
- static bool H5dontAtexit_called;
+ // This flag is used to decide whether H5dont_atexit should be called
+ static bool H5dontAtexit_called;
- private:
- // This flag indicates whether H5Library::initH5cpp has been called
- // to register various terminating functions with atexit()
- static bool H5cppinit;
+ private:
+ // This flag indicates whether H5Library::initH5cpp has been called
+ // to register various terminating functions with atexit()
+ static bool H5cppinit;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5Include.h b/c++/src/H5Include.h
index 1d12233..1f03150 100644
--- a/c++/src/H5Include.h
+++ b/c++/src/H5Include.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,18 +23,17 @@
#undef true
#endif
typedef int bool;
-const bool false = 0;
-const bool true = 1;
+const bool false = 0;
+const bool true = 1;
#endif
// These are defined in H5Opkg.h, which should not be included in the C++ API,
// so re-define them here for now.
/* Initial version of the object header format */
-#define H5O_VERSION_1 1
+#define H5O_VERSION_1 1
/* Revised version - leaves out reserved bytes and alignment padding, and adds
* magic number as prefix and checksum as suffix for all chunks.
*/
-#define H5O_VERSION_2 2
-
+#define H5O_VERSION_2 2
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index 8861434..913eb23 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -44,7 +44,7 @@ IntType::IntType() {}
///\brief Copy constructor: makes a copy of the original IntType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType::IntType(const IntType& original) : AtomType(original) {}
+IntType::IntType(const IntType &original) : AtomType(original) {}
//--------------------------------------------------------------------------
// Function: IntType overloaded constructor
@@ -53,7 +53,7 @@ IntType::IntType(const IntType& original) : AtomType(original) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType::IntType(const PredType& pred_type) : AtomType()
+IntType::IntType(const PredType &pred_type) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy(pred_type);
@@ -76,13 +76,12 @@ IntType::IntType(const hid_t existing_id) : AtomType(existing_id) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-IntType::IntType(const DataSet& dataset) : AtomType()
+IntType::IntType(const DataSet &dataset) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("IntType constructor", "H5Dget_type failed");
}
}
@@ -101,7 +100,7 @@ IntType::IntType(const DataSet& dataset) : AtomType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-IntType::IntType(const H5Location& loc, const char *type_name) : AtomType()
+IntType::IntType(const H5Location &loc, const char *type_name) : AtomType()
{
id = p_opentype(loc, type_name);
}
@@ -120,7 +119,7 @@ IntType::IntType(const H5Location& loc, const char *type_name) : AtomType()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-IntType::IntType(const H5Location& loc, const H5std_string& type_name) : AtomType()
+IntType::IntType(const H5Location &loc, const H5std_string &type_name) : AtomType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -132,7 +131,8 @@ IntType::IntType(const H5Location& loc, const H5std_string& type_name) : AtomTyp
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* IntType::decode() const
+DataType *
+IntType::decode() const
{
hid_t encoded_inttype_id = H5I_INVALID_HID;
try {
@@ -143,7 +143,7 @@ DataType* IntType::decode() const
}
IntType *encoded_inttype = new IntType;
encoded_inttype->p_setId(encoded_inttype_id);
- return(encoded_inttype);
+ return (encoded_inttype);
}
//--------------------------------------------------------------------------
@@ -153,17 +153,17 @@ DataType* IntType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_sign_t IntType::getSign() const
+H5T_sign_t
+IntType::getSign() const
{
- H5T_sign_t type_sign = H5Tget_sign(id); // C routine
+ H5T_sign_t type_sign = H5Tget_sign(id); // C routine
// Returns a valid sign type if no errors
- if(type_sign == H5T_SGN_ERROR)
- {
+ if (type_sign == H5T_SGN_ERROR) {
throw DataTypeIException("IntType::getSign",
- "H5Tget_sign failed - returned H5T_SGN_ERROR for the sign type");
+ "H5Tget_sign failed - returned H5T_SGN_ERROR for the sign type");
}
- return(type_sign);
+ return (type_sign);
}
//--------------------------------------------------------------------------
@@ -173,12 +173,12 @@ H5T_sign_t IntType::getSign() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void IntType::setSign(H5T_sign_t sign) const
+void
+IntType::setSign(H5T_sign_t sign) const
{
// Call C routine to set the sign property
herr_t ret_value = H5Tset_sign(id, sign);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("IntType::setSign", "H5Tset_sign failed");
}
}
@@ -190,4 +190,4 @@ void IntType::setSign(H5T_sign_t sign) const
//--------------------------------------------------------------------------
IntType::~IntType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h
index 3e10111..005d11f 100644
--- a/c++/src/H5IntType.h
+++ b/c++/src/H5IntType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,41 +25,45 @@ class PredType;
*/
// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP IntType : public AtomType {
- public:
- // Creates an integer type using a predefined type
- IntType(const PredType& pred_type);
+ public:
+ // Creates an integer type using a predefined type
+ IntType(const PredType &pred_type);
- // Gets the integer datatype of the specified dataset
- IntType(const DataSet& dataset);
+ // Gets the integer datatype of the specified dataset
+ IntType(const DataSet &dataset);
- // Constructors that open an HDF5 integer datatype, given a location.
- IntType(const H5Location& loc, const char* name);
- IntType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open an HDF5 integer datatype, given a location.
+ IntType(const H5Location &loc, const char *name);
+ IntType(const H5Location &loc, const H5std_string &name);
- // Returns an IntType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an IntType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- // Retrieves the sign type for an integer type
- H5T_sign_t getSign() const;
+ // Retrieves the sign type for an integer type
+ H5T_sign_t getSign() const;
- // Sets the sign proprety for an integer type.
- void setSign(H5T_sign_t sign) const;
+ // Sets the sign proprety for an integer type.
+ void setSign(H5T_sign_t sign) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("IntType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("IntType");
+ }
- // Default constructor
- IntType();
+ // Default constructor
+ IntType();
- // Creates a integer datatype using an existing id
- IntType(const hid_t existing_id);
+ // Creates a integer datatype using an existing id
+ IntType(const hid_t existing_id);
- // Copy constructor: makes copy of IntType object
- IntType(const IntType& original);
+ // Copy constructor: makes copy of IntType object
+ IntType(const IntType &original);
- // Noop destructor.
- virtual ~IntType();
+ // Noop destructor.
+ virtual ~IntType();
}; // end of IntType
} // namespace H5
diff --git a/c++/src/H5LaccProp.cpp b/c++/src/H5LaccProp.cpp
index d5e7a1c..4f73024 100644
--- a/c++/src/H5LaccProp.cpp
+++ b/c++/src/H5LaccProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,7 +27,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-LinkAccPropList* LinkAccPropList::DEFAULT_ = 0;
+LinkAccPropList *LinkAccPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: LinkAccPropList::getConstant
@@ -40,13 +40,13 @@ LinkAccPropList* LinkAccPropList::DEFAULT_ = 0;
// happen.
// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
-LinkAccPropList* LinkAccPropList::getConstant()
+LinkAccPropList *
+LinkAccPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -55,8 +55,9 @@ LinkAccPropList* LinkAccPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new LinkAccPropList(H5P_LINK_ACCESS);
else
- throw PropListIException("LinkAccPropList::getConstant", "LinkAccPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("LinkAccPropList::getConstant",
+ "LinkAccPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -66,7 +67,8 @@ LinkAccPropList* LinkAccPropList::getConstant()
// exception H5::PropListIException
// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
-void LinkAccPropList::deleteConstants()
+void
+LinkAccPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -75,7 +77,7 @@ void LinkAccPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default property
//--------------------------------------------------------------------------
-const LinkAccPropList& LinkAccPropList::DEFAULT = *getConstant();
+const LinkAccPropList &LinkAccPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -92,7 +94,7 @@ LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS) {}
///\param original - IN: LinkAccPropList instance to copy
// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
-LinkAccPropList::LinkAccPropList(const LinkAccPropList& original) : PropList(original) {}
+LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: LinkAccPropList overloaded constructor
@@ -110,12 +112,12 @@ LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) {}
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - March 1, 2017
//--------------------------------------------------------------------------
-void LinkAccPropList::setNumLinks(size_t nlinks) const
+void
+LinkAccPropList::setNumLinks(size_t nlinks) const
{
herr_t ret_value = H5Pset_nlinks(id, nlinks);
// Throw exception if H5Pset_nlinks returns failure
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("LinkAccPropList::setNumLinks", "H5Pset_nlinks failed");
}
}
@@ -127,16 +129,16 @@ void LinkAccPropList::setNumLinks(size_t nlinks) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - March 1, 2017
//--------------------------------------------------------------------------
-size_t LinkAccPropList::getNumLinks() const
+size_t
+LinkAccPropList::getNumLinks() const
{
- size_t nlinks = 0;
+ size_t nlinks = 0;
herr_t ret_value = H5Pget_nlinks(id, &nlinks);
// Throw exception if H5Pget_nlinks returns failure
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("LinkAccPropList::getNumLinks", "H5Pget_nlinks failed");
}
- return(nlinks);
+ return (nlinks);
}
//--------------------------------------------------------------------------
@@ -146,4 +148,4 @@ size_t LinkAccPropList::getNumLinks() const
//--------------------------------------------------------------------------
LinkAccPropList::~LinkAccPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h
index 9e7802f..77b7b1e 100644
--- a/c++/src/H5LaccProp.h
+++ b/c++/src/H5LaccProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,43 +24,47 @@ namespace H5 {
Inheritance: PropList -> IdComponent
*/
class H5_DLLCPP LinkAccPropList : public PropList {
- public:
- ///\brief Default link access property list.
- static const LinkAccPropList& DEFAULT;
+ public:
+ ///\brief Default link access property list.
+ static const LinkAccPropList &DEFAULT;
- // Creates a link access property list.
- LinkAccPropList();
+ // Creates a link access property list.
+ LinkAccPropList();
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("LinkAccPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("LinkAccPropList");
+ }
- // Copy constructor: creates a copy of a LinkAccPropList object.
- LinkAccPropList(const LinkAccPropList& original);
+ // Copy constructor: creates a copy of a LinkAccPropList object.
+ LinkAccPropList(const LinkAccPropList &original);
- // Creates a copy of an existing link access property list
- // using the property list id.
- LinkAccPropList(const hid_t lapl_id);
+ // Creates a copy of an existing link access property list
+ // using the property list id.
+ LinkAccPropList(const hid_t lapl_id);
- // Sets the number of soft or user-defined links that can be
- // traversed before a failure occurs.
- void setNumLinks(size_t nlinks) const;
+ // Sets the number of soft or user-defined links that can be
+ // traversed before a failure occurs.
+ void setNumLinks(size_t nlinks) const;
- // Gets the number of soft or user-defined link traversals allowed
- size_t getNumLinks() const;
+ // Gets the number of soft or user-defined link traversals allowed
+ size_t getNumLinks() const;
- // Noop destructor
- virtual ~LinkAccPropList();
+ // Noop destructor
+ virtual ~LinkAccPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static LinkAccPropList* DEFAULT_;
+ private:
+ static LinkAccPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static LinkAccPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static LinkAccPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp
index 1f17f88..26467d3 100644
--- a/c++/src/H5LcreatProp.cpp
+++ b/c++/src/H5LcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,7 +28,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-LinkCreatPropList* LinkCreatPropList::DEFAULT_ = 0;
+LinkCreatPropList *LinkCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: LinkCreatPropList::getConstant
@@ -41,13 +41,13 @@ LinkCreatPropList* LinkCreatPropList::DEFAULT_ = 0;
// happen.
// May 2018
//--------------------------------------------------------------------------
-LinkCreatPropList* LinkCreatPropList::getConstant()
+LinkCreatPropList *
+LinkCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -56,8 +56,9 @@ LinkCreatPropList* LinkCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new LinkCreatPropList(H5P_LINK_CREATE);
else
- throw PropListIException("LinkCreatPropList::getConstant", "LinkCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("LinkCreatPropList::getConstant",
+ "LinkCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -67,7 +68,8 @@ LinkCreatPropList* LinkCreatPropList::getConstant()
// exception H5::PropListIException
// May 2018
//--------------------------------------------------------------------------
-void LinkCreatPropList::deleteConstants()
+void
+LinkCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -76,7 +78,7 @@ void LinkCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default link creation property
//--------------------------------------------------------------------------
-const LinkCreatPropList& LinkCreatPropList::DEFAULT = *getConstant();
+const LinkCreatPropList &LinkCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -93,7 +95,7 @@ LinkCreatPropList::LinkCreatPropList() : StrCreatPropList(H5P_LINK_CREATE) {}
///\param original - IN: LinkCreatPropList instance to copy
// May 2018
//--------------------------------------------------------------------------
-LinkCreatPropList::LinkCreatPropList(const LinkCreatPropList& original) : StrCreatPropList(original) {}
+LinkCreatPropList::LinkCreatPropList(const LinkCreatPropList &original) : StrCreatPropList(original) {}
//--------------------------------------------------------------------------
// Function: LinkCreatPropList overloaded constructor
@@ -110,4 +112,4 @@ LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : StrCreatPropList(pl
//--------------------------------------------------------------------------
LinkCreatPropList::~LinkCreatPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h
index 2a3b700..a5affd1 100644
--- a/c++/src/H5LcreatProp.h
+++ b/c++/src/H5LcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,39 +23,43 @@ namespace H5 {
*/
// Inheritance: StrCreatPropList -> PropList -> IdComponent
class H5_DLLCPP LinkCreatPropList : public StrCreatPropList {
- public:
- ///\brief Default link creation property list.
- static const LinkCreatPropList& DEFAULT;
+ public:
+ ///\brief Default link creation property list.
+ static const LinkCreatPropList &DEFAULT;
- // Creates a link creation property list.
- LinkCreatPropList();
+ // Creates a link creation property list.
+ LinkCreatPropList();
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("LinkCreatPropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("LinkCreatPropList");
+ }
- // Copy constructor: same as the original LinkCreatPropList.
- LinkCreatPropList(const LinkCreatPropList& original);
+ // Copy constructor: same as the original LinkCreatPropList.
+ LinkCreatPropList(const LinkCreatPropList &original);
- // Creates a copy of an existing link creation property list
- // using the property list id.
- LinkCreatPropList(const hid_t lcpl_id);
+ // Creates a copy of an existing link creation property list
+ // using the property list id.
+ LinkCreatPropList(const hid_t lcpl_id);
- // Noop destructor
- virtual ~LinkCreatPropList();
+ // Noop destructor
+ virtual ~LinkCreatPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static LinkCreatPropList* DEFAULT_;
+ private:
+ static LinkCreatPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static LinkCreatPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static LinkCreatPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; // end of LinkCreatPropList
+}; // end of LinkCreatPropList
} // namespace H5
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 3813b79..92f0296 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,7 +14,7 @@
#include <string>
#include <cstdlib>
-#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
+#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -45,11 +45,11 @@ namespace H5 {
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::open()
+void
+H5Library::open()
{
herr_t ret_value = H5open();
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::open", "H5open failed");
}
}
@@ -61,11 +61,11 @@ void H5Library::open()
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::close()
+void
+H5Library::close()
{
herr_t ret_value = H5close();
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::close", "H5close failed");
}
}
@@ -80,9 +80,10 @@ void H5Library::close()
// Removed the check for failure returned from H5dont_atexit.
// will be fixed to not fail (HDFFV-9540)
//--------------------------------------------------------------------------
-void H5Library::dontAtExit()
+void
+H5Library::dontAtExit()
{
- herr_t ret_value = H5dont_atexit();
+ (void)H5dont_atexit();
}
//--------------------------------------------------------------------------
@@ -94,11 +95,11 @@ void H5Library::dontAtExit()
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& relnum)
+void
+H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum)
{
herr_t ret_value = H5get_libversion(&majnum, &minnum, &relnum);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::getLibVersion", "H5get_libversion failed");
}
}
@@ -117,11 +118,11 @@ void H5Library::getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& reln
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-VersCheck
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
+void
+H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
{
herr_t ret_value = H5check_version(majnum, minnum, relnum);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::checkVersion", "H5check_version failed");
}
}
@@ -146,11 +147,11 @@ void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
/// lists when the application ends.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Library::garbageCollect()
+void
+H5Library::garbageCollect()
{
herr_t ret_value = H5garbage_collect();
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::garbageCollect", "H5garbage_collect failed");
}
}
@@ -170,12 +171,13 @@ void H5Library::garbageCollect()
//
// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
-void H5Library::initH5cpp()
+void
+H5Library::initH5cpp()
{
// Register terminating functions with atexit(); they will be invoked in
// the reversed order
int ret_value = 0;
- ret_value = std::atexit(termH5cpp);
+ ret_value = std::atexit(termH5cpp);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registering termH5cpp failed");
@@ -189,35 +191,43 @@ void H5Library::initH5cpp()
ret_value = std::atexit(LinkAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering LinkAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering LinkAccPropList::deleteConstants failed");
ret_value = std::atexit(LinkCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering LinkCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering LinkCreatPropList::deleteConstants failed");
ret_value = std::atexit(AttrCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering AttrCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering AttrCreatPropList::deleteConstants failed");
ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering FileAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering FileAccPropList::deleteConstants failed");
ret_value = std::atexit(FileCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering FileCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering FileCreatPropList::deleteConstants failed");
ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering DSetMemXferPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering DSetMemXferPropList::deleteConstants failed");
ret_value = std::atexit(DSetCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering DSetCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering DSetCreatPropList::deleteConstants failed");
ret_value = std::atexit(ObjCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering ObjCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering ObjCreatPropList::deleteConstants failed");
ret_value = std::atexit(DataSpace::deleteConstants);
if (ret_value != 0)
@@ -231,7 +241,8 @@ void H5Library::initH5cpp()
/// If the C library fails to terminate, exit with a failure.
// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
-void H5Library::termH5cpp()
+void
+H5Library::termH5cpp()
{
// Close the C library
herr_t ret_value = H5close();
@@ -256,23 +267,23 @@ void H5Library::termH5cpp()
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-SetFreeListLimits
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
- int arr_global_lim, int arr_list_lim, int blk_global_lim,
- int blk_list_lim)
+void
+H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim)
{
- herr_t ret_value = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
- if(ret_value < 0)
- {
+ herr_t ret_value = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim,
+ blk_global_lim, blk_list_lim);
+ if (ret_value < 0) {
throw LibraryIException("H5Library::setFreeListLimits", "H5set_free_list_limits failed");
}
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor - private
-H5Library::H5Library(){}
+H5Library::H5Library() {}
// Destructor - private
-H5Library::~H5Library(){}
+H5Library::~H5Library() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index d079bde..f6571dd 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,45 +24,45 @@ namespace H5 {
methods.
*/
class H5_DLLCPP H5Library {
- public:
- // Initializes the HDF5 library.
- static void open();
+ public:
+ // Initializes the HDF5 library.
+ static void open();
- // Flushes all data to disk, closes files, and cleans up memory.
- static void close();
+ // Flushes all data to disk, closes files, and cleans up memory.
+ static void close();
- // Instructs library not to install atexit cleanup routine
- static void dontAtExit();
+ // Instructs library not to install atexit cleanup routine
+ static void dontAtExit();
- // Returns the HDF library release number.
- static void getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& relnum);
+ // Returns the HDF library release number.
+ static void getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum);
- // Verifies that the arguments match the version numbers compiled
- // into the library
- static void checkVersion(unsigned majnum, unsigned minnum, unsigned relnum);
+ // Verifies that the arguments match the version numbers compiled
+ // into the library
+ static void checkVersion(unsigned majnum, unsigned minnum, unsigned relnum);
- // Walks through all the garbage collection routines for the library,
- // which are supposed to free any unused memory they have allocated.
- static void garbageCollect();
+ // Walks through all the garbage collection routines for the library,
+ // which are supposed to free any unused memory they have allocated.
+ static void garbageCollect();
- // Sets limits on the different kinds of free lists.
- static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int
- arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim);
+ // Sets limits on the different kinds of free lists.
+ static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim);
- // Initializes C++ library and registers terminating functions at exit.
- // Only for the library functions, not for user-defined functions.
- static void initH5cpp(void);
+ // Initializes C++ library and registers terminating functions at exit.
+ // Only for the library functions, not for user-defined functions.
+ static void initH5cpp(void);
- // Sends request for terminating the HDF5 library.
- static void termH5cpp(void);
+ // Sends request for terminating the HDF5 library.
+ static void termH5cpp(void);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- private:
- // Default constructor - no instance ever created from outsiders
- H5Library();
+ private:
+ // Default constructor - no instance ever created from outsiders
+ H5Library();
- // Destructor
- ~H5Library();
+ // Destructor
+ ~H5Library();
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of H5Library
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index c62437c..c712f44 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -40,14 +40,14 @@ namespace H5 {
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
-extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
- const H5A_info_t *ainfo, void *op_data)
+extern "C" herr_t
+userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data)
{
H5std_string s_attr_name = H5std_string(attr_name);
#ifdef NO_STATIC_CAST
- UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
+ UserData4Aiterate *myData = (UserData4Aiterate *)op_data;
#else
- UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
+ UserData4Aiterate *myData = static_cast<UserData4Aiterate *>(op_data);
#endif
myData->op(*myData->location, s_attr_name, myData->opData);
return 0;
@@ -120,30 +120,31 @@ May, 2018 (1.8.21)
/// at:
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
//--------------------------------------------------------------------------
-int H5Location::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data)
+int
+H5Location::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data)
{
// store the user's function and data
- UserData4Aiterate* userData = new UserData4Aiterate;
- userData->opData = op_data;
- userData->op = user_op;
- userData->location = this;
+ UserData4Aiterate *userData = new UserData4Aiterate;
+ userData->opData = op_data;
+ userData->op = user_op;
+ userData->location = this;
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? static_cast<hsize_t>(*_idx) : 0;
- int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
- userAttrOpWrpr, static_cast<void *>(userData));
+ int ret_value =
+ H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx, userAttrOpWrpr, static_cast<void *>(userData));
// release memory
delete userData;
- if(ret_value >= 0) {
+ if (ret_value >= 0) {
/* Pass back update index value to calling code */
if (_idx)
*_idx = static_cast<unsigned>(idx);
- return(ret_value);
+ return (ret_value);
}
- else // raise exception when H5Aiterate returns a negative value
+ else // raise exception when H5Aiterate returns a negative value
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
}
@@ -156,13 +157,14 @@ int H5Location::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_d
// - Moved from H5Object to allow passing an attribute id to the
// C API, in 1.8.20.
//--------------------------------------------------------------------------
-int H5Location::getNumAttrs() const
+int
+H5Location::getNumAttrs() const
{
- H5O_info_t objinfo; /* Object info */
+ H5O_info_t objinfo; /* Object info */
- if(H5Oget_info(getId(), &objinfo) < 0)
+ if (H5Oget_info(getId(), &objinfo) < 0)
throwException("getNumAttrs", "H5Oget_info failed");
- return(static_cast<int>(objinfo.num_attrs));
+ return (static_cast<int>(objinfo.num_attrs));
}
//--------------------------------------------------------------------------
@@ -178,7 +180,8 @@ int H5Location::getNumAttrs() const
/// H5::AttributeIException
// December 2016
//--------------------------------------------------------------------------
-bool H5Location::nameExists(const char* name, const LinkAccPropList& lapl) const
+bool
+H5Location::nameExists(const char *name, const LinkAccPropList &lapl) const
{
htri_t ret_value = H5Lexists(getId(), name, lapl.getId());
if (ret_value > 0)
@@ -204,9 +207,10 @@ bool H5Location::nameExists(const char* name, const LinkAccPropList& lapl) const
/// H5::AttributeIException
// December 2016
//--------------------------------------------------------------------------
-bool H5Location::nameExists(const H5std_string& name, const LinkAccPropList& lapl) const
+bool
+H5Location::nameExists(const H5std_string &name, const LinkAccPropList &lapl) const
{
- return(nameExists(name.c_str(), lapl));
+ return (nameExists(name.c_str(), lapl));
}
//--------------------------------------------------------------------------
@@ -229,11 +233,11 @@ bool H5Location::nameExists(const H5std_string& name, const LinkAccPropList& lap
// Sep 2012 - BMR
// Moved from H5File/H5Object
//--------------------------------------------------------------------------
-void H5Location::flush(H5F_scope_t scope) const
+void
+H5Location::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("flush", "H5Fflush failed");
}
}
@@ -250,12 +254,13 @@ void H5Location::flush(H5F_scope_t scope) const
/// H5::AttributeIException
// July 2004
//--------------------------------------------------------------------------
-H5std_string H5Location::getFileName() const
+H5std_string
+H5Location::getFileName() const
{
try {
- return(p_get_file_name());
+ return (p_get_file_name());
}
- catch (IdComponentException& E) {
+ catch (IdComponentException &E) {
throwException("getFileName", E.getDetailMsg());
}
}
@@ -272,11 +277,11 @@ H5std_string H5Location::getFileName() const
/// H5::AttributeIException
// August 2017
//--------------------------------------------------------------------------
-void H5Location::getObjectInfo(H5O_info_t *objinfo) const
+void
+H5Location::getObjectInfo(H5O_info_t *objinfo) const
{
herr_t ret_value = H5Oget_info(getId(), objinfo);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("getObjectInfo", "H5Oget_info failed");
}
}
@@ -293,12 +298,11 @@ void H5Location::getObjectInfo(H5O_info_t *objinfo) const
/// H5::AttributeIException
// August 2017
//--------------------------------------------------------------------------
-void H5Location::getObjectInfo(const char *name, H5O_info_t *objinfo,
- const LinkAccPropList& lapl) const
+void
+H5Location::getObjectInfo(const char *name, H5O_info_t *objinfo, const LinkAccPropList &lapl) const
{
herr_t ret_value = H5Oget_info_by_name(getId(), name, objinfo, lapl.getId());
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("getObjectInfo", "H5Oget_info_by_name failed");
}
}
@@ -315,12 +319,11 @@ void H5Location::getObjectInfo(const char *name, H5O_info_t *objinfo,
/// H5::AttributeIException
// August 2017
//--------------------------------------------------------------------------
-void H5Location::getObjectInfo(const H5std_string& name, H5O_info_t *objinfo,
- const LinkAccPropList& lapl) const
+void
+H5Location::getObjectInfo(const H5std_string &name, H5O_info_t *objinfo, const LinkAccPropList &lapl) const
{
herr_t ret_value = H5Oget_info_by_name(getId(), name.c_str(), objinfo, lapl.getId());
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("getObjectInfo", "H5Oget_info_by_name failed");
}
}
@@ -342,10 +345,11 @@ void H5Location::getObjectInfo(const H5std_string& name, H5O_info_t *objinfo,
/// - version number is not one of the valid values above
// August 2017
//--------------------------------------------------------------------------
-unsigned H5Location::objVersion() const
+unsigned
+H5Location::objVersion() const
{
H5O_info_t objinfo;
- unsigned version = 0;
+ unsigned version = 0;
// Use C API to get information of the object
herr_t ret_value = H5Oget_info(getId(), &objinfo);
@@ -354,13 +358,12 @@ unsigned H5Location::objVersion() const
if (ret_value < 0)
throwException("objVersion", "H5Oget_info failed");
// Return a valid version or throw an exception for invalid value
- else
- {
+ else {
version = objinfo.hdr.version;
if (version != H5O_VERSION_1 && version != H5O_VERSION_2)
throwException("objVersion", "Invalid version for object");
}
- return(version);
+ return (version);
}
//--------------------------------------------------------------------------
@@ -385,10 +388,11 @@ unsigned H5Location::objVersion() const
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-void H5Location::setComment(const char* name, const char* comment) const
+void
+H5Location::setComment(const char *name, const char *comment) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), name, comment, H5P_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("setComment", "H5Oset_comment_by_name failed");
}
@@ -401,7 +405,8 @@ void H5Location::setComment(const char* name, const char* comment) const
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-void H5Location::setComment(const H5std_string& name, const H5std_string& comment) const
+void
+H5Location::setComment(const H5std_string &name, const H5std_string &comment) const
{
setComment(name.c_str(), comment.c_str());
}
@@ -419,10 +424,11 @@ void H5Location::setComment(const H5std_string& name, const H5std_string& commen
/// H5::AttributeIException
// Sep 2013
//--------------------------------------------------------------------------
-void H5Location::setComment(const char* comment) const
+void
+H5Location::setComment(const char *comment) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), ".", comment, H5P_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("setComment", "H5Oset_comment_by_name failed");
}
@@ -433,7 +439,8 @@ void H5Location::setComment(const char* comment) const
/// \c H5std_string for \a comment.
// Sep 2013
//--------------------------------------------------------------------------
-void H5Location::setComment(const H5std_string& comment) const
+void
+H5Location::setComment(const H5std_string &comment) const
{
setComment(comment.c_str());
}
@@ -452,10 +459,11 @@ void H5Location::setComment(const H5std_string& comment) const
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-void H5Location::removeComment(const char* name) const
+void
+H5Location::removeComment(const char *name) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), name, NULL, H5P_DEFAULT);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("removeComment", "H5Oset_comment_by_name failed");
}
@@ -468,7 +476,8 @@ void H5Location::removeComment(const char* name) const
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-void H5Location::removeComment(const H5std_string& name) const
+void
+H5Location::removeComment(const H5std_string &name) const
{
removeComment(name.c_str());
}
@@ -493,7 +502,8 @@ void H5Location::removeComment(const H5std_string& name) const
/// will be truncated to accommodate the null terminator.
// March 2014
//--------------------------------------------------------------------------
-ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment) const
+ssize_t
+H5Location::getComment(const char *name, size_t buf_size, char *comment) const
{
// H5Oget_comment_by_name will get buf_size chars of the comment including
// the null terminator
@@ -501,17 +511,16 @@ ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment)
comment_len = H5Oget_comment_by_name(getId(), name, comment, buf_size, H5P_DEFAULT);
// If H5Oget_comment_by_name returns a negative value, raise an exception
- if (comment_len < 0)
- {
+ if (comment_len < 0) {
throwException("getComment", "H5Oget_comment_by_name failed");
}
// If the comment is longer than the provided buffer size, the C library
// will not null terminate it
if (static_cast<size_t>(comment_len) >= buf_size)
- comment[buf_size-1] = '\0';
+ comment[buf_size - 1] = '\0';
// Return the actual comment length, which might be different from buf_size
- return(comment_len);
+ return (comment_len);
}
//--------------------------------------------------------------------------
@@ -531,7 +540,8 @@ ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment)
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-H5std_string H5Location::getComment(const char* name, size_t buf_size) const
+H5std_string
+H5Location::getComment(const char *name, size_t buf_size) const
{
// Initialize string to "", so that if there is no comment, the returned
// string will be empty
@@ -541,14 +551,12 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT);
// If H5Oget_comment_by_name returns a negative value, raise an exception
- if (comment_len < 0)
- {
+ if (comment_len < 0) {
throwException("getComment", "H5Oget_comment_by_name failed");
}
// If comment exists, calls C routine again to get it
- else if (comment_len > 0)
- {
+ else if (comment_len > 0) {
size_t tmp_len = buf_size;
// If buffer size is not provided, use comment length
@@ -556,14 +564,13 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
tmp_len = comment_len;
// Temporary buffer for char* comment
- char* comment_C = new char[tmp_len+1];
- HDmemset(comment_C, 0, tmp_len+1); // clear buffer
+ char *comment_C = new char[tmp_len + 1];
+ HDmemset(comment_C, 0, tmp_len + 1); // clear buffer
// Used overloaded function
- ssize_t temp_len = getComment(name, tmp_len+1, comment_C);
- if (temp_len < 0)
- {
- delete []comment_C;
+ ssize_t temp_len = getComment(name, tmp_len + 1, comment_C);
+ if (temp_len < 0) {
+ delete[] comment_C;
throwException("getComment", "H5Oget_comment_by_name failed");
}
@@ -571,11 +578,11 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
comment = comment_C;
// Clean up resource
- delete []comment_C;
+ delete[] comment_C;
}
// Return the string comment
- return(comment);
+ return (comment);
}
//--------------------------------------------------------------------------
@@ -593,9 +600,10 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
// Modification
// Moved from CommonFG, Sep 2013
//--------------------------------------------------------------------------
-H5std_string H5Location::getComment(const H5std_string& name, size_t buf_size) const
+H5std_string
+H5Location::getComment(const H5std_string &name, size_t buf_size) const
{
- return(getComment(name.c_str(), buf_size));
+ return (getComment(name.c_str(), buf_size));
}
//--------------------------------------------------------------------------
@@ -615,14 +623,14 @@ H5std_string H5Location::getComment(const H5std_string& name, size_t buf_size) c
/// its type.
// May 2017
//--------------------------------------------------------------------------
-hid_t H5Location::openObjId(const char* obj_name, const LinkAccPropList& lapl) const
+hid_t
+H5Location::openObjId(const char *obj_name, const LinkAccPropList &lapl) const
{
hid_t ret_value = H5Oopen(getId(), obj_name, lapl.getId());
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throwException("openObjId", "H5Oopen failed");
}
- return(ret_value);
+ return (ret_value);
}
//--------------------------------------------------------------------------
@@ -640,9 +648,10 @@ hid_t H5Location::openObjId(const char* obj_name, const LinkAccPropList& lapl) c
/// H5::AttributeIException
// May 2017
//--------------------------------------------------------------------------
-hid_t H5Location::openObjId(const H5std_string& obj_name, const LinkAccPropList& lapl) const
+hid_t
+H5Location::openObjId(const H5std_string &obj_name, const LinkAccPropList &lapl) const
{
- return(openObjId(obj_name.c_str(), lapl));
+ return (openObjId(obj_name.c_str(), lapl));
}
//--------------------------------------------------------------------------
@@ -652,11 +661,11 @@ hid_t H5Location::openObjId(const H5std_string& obj_name, const LinkAccPropList&
///\exception H5::LocationException
// May 2017
//--------------------------------------------------------------------------
-void H5Location::closeObjId(hid_t obj_id)
+void
+H5Location::closeObjId(hid_t obj_id)
{
herr_t ret_value = H5Oclose(obj_id);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LocationException("closeObjId", "H5Oclose failed");
}
}
@@ -673,11 +682,11 @@ void H5Location::closeObjId(hid_t obj_id)
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Location::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
+void
+H5Location::p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t ref_type) const
{
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw ReferenceException(inMemFunc("reference"), "H5Rcreate failed");
}
}
@@ -698,12 +707,13 @@ void H5Location::p_reference(void* ref, const char* name, hid_t space_id, H5R_ty
///\note This method is more suitable for a dataset region reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Location::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
+void
+H5Location::reference(void *ref, const char *name, const DataSpace &dataspace, H5R_type_t ref_type) const
{
try {
- p_reference(ref, name, dataspace.getId(), ref_type);
+ p_reference(ref, name, dataspace.getId(), ref_type);
}
- catch (ReferenceException& E) {
+ catch (ReferenceException &E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
@@ -724,12 +734,14 @@ void H5Location::reference(void* ref, const char* name, const DataSpace& dataspa
///\note This method is more suitable for a dataset region reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Location::reference(void* ref, const H5std_string& name, const DataSpace& dataspace, H5R_type_t ref_type) const
+void
+H5Location::reference(void *ref, const H5std_string &name, const DataSpace &dataspace,
+ H5R_type_t ref_type) const
{
try {
- p_reference(ref, name.c_str(), dataspace.getId(), ref_type);
+ p_reference(ref, name.c_str(), dataspace.getId(), ref_type);
}
- catch (ReferenceException& E) {
+ catch (ReferenceException &E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
@@ -748,12 +760,13 @@ void H5Location::reference(void* ref, const H5std_string& name, const DataSpace&
///\note This method is more suitable for an object reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Location::reference(void* ref, const char* name, H5R_type_t ref_type) const
+void
+H5Location::reference(void *ref, const char *name, H5R_type_t ref_type) const
{
try {
- p_reference(ref, name, -1, ref_type);
+ p_reference(ref, name, -1, ref_type);
}
- catch (ReferenceException& E) {
+ catch (ReferenceException &E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
@@ -771,7 +784,8 @@ void H5Location::reference(void* ref, const char* name, H5R_type_t ref_type) con
///\note This method is more suitable for an object reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_type) const
+void
+H5Location::reference(void *ref, const H5std_string &name, H5R_type_t ref_type) const
{
reference(ref, name.c_str(), ref_type);
}
@@ -791,15 +805,15 @@ void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_t
// May 2008 - BMR
// Moved from IdComponent.
//--------------------------------------------------------------------------
-hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const char* from_func)
+hid_t
+H5Location::p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, const char *from_func)
{
hid_t temp_id = H5Rdereference(loc_id, ref_type, ref);
- if (temp_id < 0)
- {
+ if (temp_id < 0) {
throw ReferenceException(inMemFunc(from_func), "H5Rdereference failed");
}
- return(temp_id);
+ return (temp_id);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -815,7 +829,8 @@ hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_ty
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
-void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type)
+void
+H5Location::dereference(const H5Location &loc, const void *ref, H5R_type_t ref_type)
{
p_setId(p_dereference(loc.getId(), ref, ref_type, "dereference"));
}
@@ -835,9 +850,9 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
// Removed in 1.8.21 because H5Location is Attribute's baseclass
// now. -BMR
//--------------------------------------------------------------------------
-//void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type)
+// void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type)
//{
- //p_setId(p_dereference(attr.getId(), ref, ref_type, "dereference"));
+// p_setId(p_dereference(attr.getId(), ref, ref_type, "dereference"));
//}
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -860,12 +875,13 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
// Modification
// Sep 2012: Moved up from H5File, Group, DataSet, and DataType
//--------------------------------------------------------------------------
-H5G_obj_t H5Location::getObjType(void *ref, H5R_type_t ref_type) const
+H5G_obj_t
+H5Location::getObjType(void *ref, H5R_type_t ref_type) const
{
try {
- return(p_get_obj_type(ref, ref_type));
+ return (p_get_obj_type(ref, ref_type));
}
- catch (ReferenceException& E) {
+ catch (ReferenceException &E) {
throw ReferenceException(inMemFunc("getObjType"), E.getDetailMsg());
}
}
@@ -887,15 +903,15 @@ H5G_obj_t H5Location::getObjType(void *ref, H5R_type_t ref_type) const
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
+H5G_obj_t
+H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
{
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
- if (obj_type == H5G_UNKNOWN)
- {
+ if (obj_type == H5G_UNKNOWN) {
throw ReferenceException(inMemFunc("getObjType"), "H5Rget_obj_type1 failed");
}
- return(obj_type);
+ return (obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -916,12 +932,13 @@ H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
+H5O_type_t
+H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
{
try {
- return(p_get_ref_obj_type(ref, ref_type));
+ return (p_get_ref_obj_type(ref, ref_type));
}
- catch (ReferenceException& E) {
+ catch (ReferenceException &E) {
throw ReferenceException(inMemFunc("getRefObjType"), E.getDetailMsg());
}
}
@@ -942,19 +959,18 @@ H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
+H5O_type_t
+H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
{
- H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
- herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
- if (ret_value < 0)
- {
+ H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
+ herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
+ if (ret_value < 0) {
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 failed");
}
- if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
- {
+ if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES) {
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 returned invalid type");
}
- return(obj_type);
+ return (obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -975,19 +991,19 @@ H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
// ref count, as a work-around for a problem described in the JIRA
// issue HDFFV-7947. -BMR
//--------------------------------------------------------------------------
-DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
+DataSpace
+H5Location::getRegion(void *ref, H5R_type_t ref_type) const
{
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
- if (space_id < 0)
- {
+ if (space_id < 0) {
throw ReferenceException(inMemFunc("getRegion"), "H5Rget_region failed");
}
try {
DataSpace dataspace;
f_DataSpace_setId(&dataspace, space_id);
- return(dataspace);
+ return (dataspace);
}
- catch (DataSpaceIException& E) {
+ catch (DataSpaceIException &E) {
throw ReferenceException(inMemFunc("getRegion"), E.getDetailMsg());
}
}
@@ -1012,12 +1028,13 @@ DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
/// H5Lcreate_soft APIs in the HDF5 C Reference Manual.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const char *target_name, const char *link_name,
- const LinkCreatPropList& lcpl, const LinkAccPropList& lapl) const
+void
+H5Location::link(const char *target_name, const char *link_name, const LinkCreatPropList &lcpl,
+ const LinkAccPropList &lapl) const
{
herr_t ret_value = -1;
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lcreate_soft(target_name, getId(), link_name, lcpl_id, lapl_id);
if (ret_value < 0)
@@ -1031,9 +1048,9 @@ void H5Location::link(const char *target_name, const char *link_name,
/// \c H5std_string for \a target_name and \a link_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const H5std_string& target_name,
- const H5std_string& link_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::link(const H5std_string &target_name, const H5std_string &link_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
link(target_name.c_str(), link_name.c_str(), lcpl, lapl);
}
@@ -1059,17 +1076,17 @@ void H5Location::link(const H5std_string& target_name,
/// H5Lcreate_hard APIs in the HDF5 C Reference Manual.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const char *curr_name, const H5Location& new_loc,
- const char *new_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::link(const char *curr_name, const H5Location &new_loc, const char *new_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
- herr_t ret_value = -1;
- hid_t new_loc_id = new_loc.getId();
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ herr_t ret_value = -1;
+ hid_t new_loc_id = new_loc.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
- ret_value = H5Lcreate_hard(getId(), curr_name, new_loc.getId(), new_name, lcpl_id, lapl_id);
- if (ret_value < 0)
+ ret_value = H5Lcreate_hard(getId(), curr_name, new_loc_id, new_name, lcpl_id, lapl_id);
+ if (ret_value < 0)
throwException("link", "creating link failed");
}
@@ -1080,9 +1097,9 @@ void H5Location::link(const char *curr_name, const H5Location& new_loc,
/// \c H5std_string for \a curr_name and \a new_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const H5std_string& curr_name, const H5Location& new_loc,
- const H5std_string& new_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::link(const H5std_string &curr_name, const H5Location &new_loc, const H5std_string &new_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
link(curr_name.c_str(), new_loc, new_name.c_str(), lcpl, lapl);
}
@@ -1109,17 +1126,17 @@ void H5Location::link(const H5std_string& curr_name, const H5Location& new_loc,
/// H5Lcreate_hard APIs in the HDF5 C Reference Manual.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const char *curr_name, const hid_t same_loc,
- const char *new_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::link(const char *curr_name, const hid_t same_loc, const char *new_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
herr_t ret_value = -1;
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lcreate_hard(getId(), curr_name, same_loc, new_name, lcpl_id, lapl_id);
- if (ret_value < 0)
+ if (ret_value < 0)
throwException("link", "creating link failed");
}
@@ -1130,14 +1147,13 @@ void H5Location::link(const char *curr_name, const hid_t same_loc,
/// \c H5std_string for \a curr_name and \a new_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::link(const H5std_string& curr_name, const hid_t same_loc,
- const H5std_string& new_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::link(const H5std_string &curr_name, const hid_t same_loc, const H5std_string &new_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
link(curr_name.c_str(), same_loc, new_name.c_str(), lcpl, lapl);
}
-
//--------------------------------------------------------------------------
// Function: H5Location::copyLink
///\brief Copies a link from one location to another.
@@ -1154,17 +1170,17 @@ void H5Location::link(const H5std_string& curr_name, const hid_t same_loc,
/// H5::AttributeIException
// May 2018
//--------------------------------------------------------------------------
-void H5Location::copyLink(const char *src_name, const H5Location& dst,
- const char *dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::copyLink(const char *src_name, const H5Location &dst, const char *dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
herr_t ret_value;
- hid_t dst_id = dst.getId();
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t dst_id = dst.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lcopy(getId(), src_name, dst_id, dst_name, lcpl_id, lapl_id);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("copyLink", "H5Lcopy failed");
}
@@ -1175,9 +1191,9 @@ void H5Location::copyLink(const char *src_name, const H5Location& dst,
/// \c H5std_string for \a src_name and \a dst_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::copyLink(const H5std_string& src_name, const H5Location& dst,
- const H5std_string& dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::copyLink(const H5std_string &src_name, const H5Location &dst, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
copyLink(src_name.c_str(), dst, dst_name.c_str(), lcpl, lapl);
}
@@ -1197,16 +1213,16 @@ void H5Location::copyLink(const H5std_string& src_name, const H5Location& dst,
/// H5::AttributeIException
// May 2018
//--------------------------------------------------------------------------
-void H5Location::copyLink(const char *src_name,
- const char *dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::copyLink(const char *src_name, const char *dst_name, const LinkCreatPropList &lcpl,
+ const LinkAccPropList &lapl) const
{
herr_t ret_value;
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lcopy(getId(), src_name, H5L_SAME_LOC, dst_name, lcpl_id, lapl_id);
- if(ret_value < 0)
+ if (ret_value < 0)
throwException("copyLink", "H5Lcopy H5L_SAME_LOC failed");
}
@@ -1217,9 +1233,9 @@ void H5Location::copyLink(const char *src_name,
/// \c H5std_string for \a src_name and \a dst_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::copyLink(const H5std_string& src_name,
- const H5std_string& dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::copyLink(const H5std_string &src_name, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
copyLink(src_name.c_str(), dst_name.c_str(), lcpl, lapl);
}
@@ -1244,14 +1260,14 @@ void H5Location::copyLink(const H5std_string& src_name,
/// to the Group Interface in the HDF5 User's Guide for details.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::moveLink(const char* src_name, const H5Location& dst,
- const char* dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::moveLink(const char *src_name, const H5Location &dst, const char *dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
herr_t ret_value;
- hid_t dst_id = dst.getId();
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t dst_id = dst.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lmove(getId(), src_name, dst_id, dst_name, lcpl_id, lapl_id);
if (ret_value < 0)
@@ -1265,9 +1281,9 @@ void H5Location::moveLink(const char* src_name, const H5Location& dst,
/// \c H5std_string for \a src_name and \a dst_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::moveLink(const H5std_string& src_name, const H5Location& dst,
- const H5std_string& dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::moveLink(const H5std_string &src_name, const H5Location &dst, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
moveLink(src_name.c_str(), dst, dst_name.c_str(), lcpl, lapl);
}
@@ -1291,12 +1307,13 @@ void H5Location::moveLink(const H5std_string& src_name, const H5Location& dst,
/// to the Group Interface in the HDF5 User's Guide for details.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::moveLink(const char* src_name, const char* dst_name,
- const LinkCreatPropList& lcpl, const LinkAccPropList& lapl) const
+void
+H5Location::moveLink(const char *src_name, const char *dst_name, const LinkCreatPropList &lcpl,
+ const LinkAccPropList &lapl) const
{
herr_t ret_value;
- hid_t lcpl_id = lcpl.getId();
- hid_t lapl_id = lapl.getId();
+ hid_t lcpl_id = lcpl.getId();
+ hid_t lapl_id = lapl.getId();
ret_value = H5Lmove(getId(), src_name, H5L_SAME_LOC, dst_name, lcpl_id, lapl_id);
if (ret_value < 0)
@@ -1310,9 +1327,9 @@ void H5Location::moveLink(const char* src_name, const char* dst_name,
/// \c H5std_string for \a src_name and \a dst_name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::moveLink(const H5std_string& src_name,
- const H5std_string& dst_name, const LinkCreatPropList& lcpl,
- const LinkAccPropList& lapl) const
+void
+H5Location::moveLink(const H5std_string &src_name, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl, const LinkAccPropList &lapl) const
{
moveLink(src_name.c_str(), dst_name.c_str(), lcpl, lapl);
}
@@ -1334,7 +1351,8 @@ void H5Location::moveLink(const H5std_string& src_name,
// which was replaced by H5Ldelete. The name "unlink" was kept
// to help with backward compatibility.
//--------------------------------------------------------------------------
-void H5Location::unlink(const char* name, const LinkAccPropList& lapl) const
+void
+H5Location::unlink(const char *name, const LinkAccPropList &lapl) const
{
herr_t ret_value = H5Ldelete(getId(), name, lapl.getId());
if (ret_value < 0)
@@ -1348,7 +1366,8 @@ void H5Location::unlink(const char* name, const LinkAccPropList& lapl) const
/// \c H5std_string for \a name.
// May 2018
//--------------------------------------------------------------------------
-void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) const
+void
+H5Location::unlink(const H5std_string &name, const LinkAccPropList &lapl) const
{
unlink(name.c_str(), lapl);
}
@@ -1362,7 +1381,8 @@ void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) c
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
// 2000
//--------------------------------------------------------------------------
-H5L_info_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList& lapl) const
+H5L_info_t
+H5Location::getLinkInfo(const char *link_name, const LinkAccPropList &lapl) const
{
H5L_info_t linkinfo; // link info structure
@@ -1370,7 +1390,7 @@ H5L_info_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList&
if (ret_value < 0)
throwException("getLinkInfo", "H5Lget_info to find buffer size failed");
- return(linkinfo);
+ return (linkinfo);
}
//--------------------------------------------------------------------------
@@ -1379,9 +1399,10 @@ H5L_info_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList&
/// It differs from the above function in that it takes an
/// \c H5std_string for \a link_name.
//--------------------------------------------------------------------------
-H5L_info_t H5Location::getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl) const
+H5L_info_t
+H5Location::getLinkInfo(const H5std_string &link_name, const LinkAccPropList &lapl) const
{
- return(getLinkInfo(link_name.c_str(), lapl));
+ return (getLinkInfo(link_name.c_str(), lapl));
}
//--------------------------------------------------------------------------
@@ -1393,17 +1414,17 @@ H5L_info_t H5Location::getLinkInfo(const H5std_string& link_name, const LinkAccP
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
// 2000
//--------------------------------------------------------------------------
-H5std_string H5Location::getLinkval(const char* name, size_t size) const
+H5std_string
+H5Location::getLinkval(const char *name, size_t size) const
{
- H5L_info_t linkinfo;
- char *value_C; // value in C string
- size_t val_size = size;
- H5std_string value = "";
- herr_t ret_value;
+ H5L_info_t linkinfo;
+ char * value_C; // value in C string
+ size_t val_size = size;
+ H5std_string value = "";
+ herr_t ret_value;
// if user doesn't provide buffer size, determine it
- if (size == 0)
- {
+ if (size == 0) {
ret_value = H5Lget_info(getId(), name, &linkinfo, H5P_DEFAULT);
if (ret_value < 0)
throwException("getLinkval", "H5Lget_info to find buffer size failed");
@@ -1412,22 +1433,20 @@ H5std_string H5Location::getLinkval(const char* name, size_t size) const
}
// if link has value, retrieve the value, otherwise, return null string
- if (val_size > 0)
- {
- value_C = new char[val_size+1]; // temporary C-string for C API
- HDmemset(value_C, 0, val_size+1); // clear buffer
+ if (val_size > 0) {
+ value_C = new char[val_size + 1]; // temporary C-string for C API
+ HDmemset(value_C, 0, val_size + 1); // clear buffer
ret_value = H5Lget_val(getId(), name, value_C, val_size, H5P_DEFAULT);
- if (ret_value < 0)
- {
- delete []value_C;
+ if (ret_value < 0) {
+ delete[] value_C;
throwException("getLinkval", "H5Lget_val failed");
}
value = H5std_string(value_C);
- delete []value_C;
+ delete[] value_C;
}
- return(value);
+ return (value);
}
//--------------------------------------------------------------------------
@@ -1454,9 +1473,10 @@ H5Location::~H5Location() {}
// param new_id - IN: New id to set
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void f_DataSpace_setId(DataSpace* dspace, hid_t new_id)
+void
+f_DataSpace_setId(DataSpace *dspace, hid_t new_id)
{
dspace->p_setId(new_id);
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index e76a6fc..e0acf8e 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,22 +15,21 @@
#ifndef __H5Location_H
#define __H5Location_H
-#include "H5Classes.h" // constains forward class declarations
+#include "H5Classes.h" // constains forward class declarations
namespace H5 {
-class H5Location; // forward declaration for UserData4Aiterate
+class H5Location; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
-typedef void (*attr_operator_t)(H5Location& loc/*in*/,
- const H5std_string attr_name/*in*/,
- void *operator_data/*in,out*/);
+typedef void (*attr_operator_t)(H5Location &loc /*in*/, const H5std_string attr_name /*in*/,
+ void *operator_data /*in,out*/);
class UserData4Aiterate { // user data for attribute iteration
- public:
- attr_operator_t op;
- void* opData;
- H5Location* location;
+ public:
+ attr_operator_t op;
+ void * opData;
+ H5Location * location;
};
/*! \class H5Location
@@ -40,250 +39,239 @@ class UserData4Aiterate { // user data for attribute iteration
*/
// Inheritance: IdComponent
class H5_DLLCPP H5Location : public IdComponent {
- public:
- // Determines the number of attributes belong to this object.
- int getNumAttrs() const;
+ public:
+ // Determines the number of attributes belong to this object.
+ int getNumAttrs() const;
- // Checks if a link of a given name exists in this location
- bool nameExists(const char* name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- bool nameExists(const H5std_string& name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ // Checks if a link of a given name exists in this location
+ bool nameExists(const char *name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+ bool nameExists(const H5std_string &name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
- // Flushes all buffers associated with this location to disk.
- void flush(H5F_scope_t scope) const;
+ // Flushes all buffers associated with this location to disk.
+ void flush(H5F_scope_t scope) const;
- // Gets the name of the file, specified by this location.
- H5std_string getFileName() const;
+ // Gets the name of the file, specified by this location.
+ H5std_string getFileName() const;
- // Retrieves information about an object at this location
- // specified by location
- void getObjectInfo(H5O_info_t *oinfo) const;
- // specified by the object's name
- void getObjectInfo(const char *name, H5O_info_t *oinfo,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void getObjectInfo(const H5std_string& name, H5O_info_t *oinfo,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ // Retrieves information about an object at this location
+ // specified by location
+ void getObjectInfo(H5O_info_t *oinfo) const;
+ // specified by the object's name
+ void getObjectInfo(const char *name, H5O_info_t *oinfo,
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+ void getObjectInfo(const H5std_string &name, H5O_info_t *oinfo,
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Retrieves the type of object that an object reference points to.
- H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
+ // Retrieves the type of object that an object reference points to.
+ H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Retrieves the type of object that an object reference points to.
- H5O_type_t getRefObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
- // Note: getRefObjType deprecates getObjType, but getObjType's name is
- // misleading, so getRefObjType is used in the new function instead.
-
- // Returns the object header version of an object
- unsigned objVersion() const;
-
- // Sets the comment for an HDF5 object specified by its name.
- void setComment(const char* name, const char* comment) const;
- void setComment(const H5std_string& name, const H5std_string& comment) const;
- void setComment(const char* comment) const;
- void setComment(const H5std_string& comment) const;
-
- // Retrieves comment for the HDF5 object specified by its name.
- ssize_t getComment(const char* name, size_t buf_size, char* comment) const;
- H5std_string getComment(const char* name, size_t buf_size=0) const;
- H5std_string getComment(const H5std_string& name, size_t buf_size=0) const;
-
- // Removes the comment for the HDF5 object specified by its name.
- void removeComment(const char* name) const;
- void removeComment(const H5std_string& name) const;
-
- // Creates a reference to a named object or to a dataset region
- // in this object.
- void reference(void* ref, const char* name,
- H5R_type_t ref_type = H5R_OBJECT) const;
- void reference(void* ref, const H5std_string& name,
- H5R_type_t ref_type = H5R_OBJECT) const;
- void reference(void* ref, const char* name, const DataSpace& dataspace,
- H5R_type_t ref_type = H5R_DATASET_REGION) const;
- void reference(void* ref, const H5std_string& name, const DataSpace& dataspace,
- H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
- // Open a referenced object whose location is specified by either
- // a file, an HDF5 object, or an attribute.
- void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
- // Retrieves a dataspace with the region pointed to selected.
- DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
- // Opens an object at this location, without knowing the object type.
- hid_t openObjId(const char* name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- hid_t openObjId(const H5std_string& name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Closes an object opened by openObjId()
- static void closeObjId(hid_t obj_id);
-
- // Creates a soft link from link_name to target_name.
- void link(const char *target_name, const char *link_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void link(const H5std_string& target_name,
- const H5std_string& link_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Creates a hard link from new_name to curr_name.
- void link(const char *curr_name,
- const H5Location& new_loc, const char *new_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void link(const H5std_string& curr_name,
- const H5Location& new_loc, const H5std_string& new_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Creates a hard link from new_name to curr_name in same location.
- void link(const char *curr_name,
- const hid_t same_loc, const char *new_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void link(const H5std_string& curr_name,
- const hid_t same_loc, const H5std_string& new_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Removes the specified link from this location.
- void unlink(const char *link_name,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void unlink(const H5std_string& link_name,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Copies a link from this location to another.
- void copyLink(const char *src_name,
- const H5Location& dst, const char *dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void copyLink(const H5std_string& src_name,
- const H5Location& dst, const H5std_string& dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Makes a copy of a link in the same location.
- void copyLink(const char *src_name, const char *dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void copyLink(const H5std_string& src_name,
- const H5std_string& dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Renames a link in this location and moves to a new location.
- void moveLink(const char* src_name,
- const H5Location& dst, const char* dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void moveLink(const H5std_string& src_name,
- const H5Location& dst, const H5std_string& dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Renames a link in this location.
- void moveLink(const char* src_name, const char* dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void moveLink(const H5std_string& src_name,
- const H5std_string& dst_name,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Returns the information of the named link.
- H5L_info_t getLinkInfo(const char* link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- H5L_info_t getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
-
- // Returns the value of a symbolic link.
- H5std_string getLinkval(const char* link_name, size_t size=0) const;
- H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
-
- ///\brief Returns an identifier. (pure virtual)
- virtual hid_t getId() const = 0;
-
-/***************************************************************************
- Notes for H5A wrappers
- ======================
- These H5A wrappers are marked "deprecated" in 1.8.19.
- They are moved to H5Object to prevent the object id from being
- passed in to H5A APIs.
- Updated: they are removed from source code in 1.8.21.
-***************************************************************************/
-
- // Creates an attribute for the specified object at this location
- // PropList is currently not used, so always be default.
- // Deprecated
- //virtual Attribute createAttribute(const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
- //virtual Attribute createAttribute(const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
-
- // Given its name, opens the attribute that belongs to an object at
- // this location.
- // Deprecated
- //virtual Attribute openAttribute(const char* name) const;
- //virtual Attribute openAttribute(const H5std_string& name) const;
-
- // Given its index, opens the attribute that belongs to an object at
- // this location.
- //virtual Attribute openAttribute(const unsigned int idx) const; // Deprecated
-
- // Iterate user's function over the attributes at this location.
- virtual int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL,
- void* op_data = NULL); // Deprecated
-
- // Checks whether the named attribute exists at this location.
- // Deprecated
- //virtual bool attrExists(const char* name) const;
- //virtual bool attrExists(const H5std_string& name) const;
-
- // Renames the named attribute to a new name.
- // Deprecated
- //virtual void renameAttr(const char* oldname, const char* newname) const;
- //virtual void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
-
- // Removes the named attribute from this location.
- // Deprecated
- //virtual void removeAttr(const char* name) const;
- //virtual void removeAttr(const H5std_string& name) const;
-
-/**************************** End of H5A note *******************************/
-
- protected:
+ // Retrieves the type of object that an object reference points to.
+ H5O_type_t getRefObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
+ // Note: getRefObjType deprecates getObjType, but getObjType's name is
+ // misleading, so getRefObjType is used in the new function instead.
+
+ // Returns the object header version of an object
+ unsigned objVersion() const;
+
+ // Sets the comment for an HDF5 object specified by its name.
+ void setComment(const char *name, const char *comment) const;
+ void setComment(const H5std_string &name, const H5std_string &comment) const;
+ void setComment(const char *comment) const;
+ void setComment(const H5std_string &comment) const;
+
+ // Retrieves comment for the HDF5 object specified by its name.
+ ssize_t getComment(const char *name, size_t buf_size, char *comment) const;
+ H5std_string getComment(const char *name, size_t buf_size = 0) const;
+ H5std_string getComment(const H5std_string &name, size_t buf_size = 0) const;
+
+ // Removes the comment for the HDF5 object specified by its name.
+ void removeComment(const char *name) const;
+ void removeComment(const H5std_string &name) const;
+
+ // Creates a reference to a named object or to a dataset region
+ // in this object.
+ void reference(void *ref, const char *name, H5R_type_t ref_type = H5R_OBJECT) const;
+ void reference(void *ref, const H5std_string &name, H5R_type_t ref_type = H5R_OBJECT) const;
+ void reference(void *ref, const char *name, const DataSpace &dataspace,
+ H5R_type_t ref_type = H5R_DATASET_REGION) const;
+ void reference(void *ref, const H5std_string &name, const DataSpace &dataspace,
+ H5R_type_t ref_type = H5R_DATASET_REGION) const;
+
+ // Open a referenced object whose location is specified by either
+ // a file, an HDF5 object, or an attribute.
+ void dereference(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+ void dereference(const Attribute &attr, const void *ref, H5R_type_t ref_type = H5R_OBJECT);
+
+ // Retrieves a dataspace with the region pointed to selected.
+ DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
+
+ // Opens an object at this location, without knowing the object type.
+ hid_t openObjId(const char *name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+ hid_t openObjId(const H5std_string &name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+
+ // Closes an object opened by openObjId()
+ static void closeObjId(hid_t obj_id);
+
+ // Creates a soft link from link_name to target_name.
+ void link(const char *target_name, const char *link_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void link(const H5std_string &target_name, const H5std_string &link_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Creates a hard link from new_name to curr_name.
+ void link(const char *curr_name, const H5Location &new_loc, const char *new_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void link(const H5std_string &curr_name, const H5Location &new_loc, const H5std_string &new_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Creates a hard link from new_name to curr_name in same location.
+ void link(const char *curr_name, const hid_t same_loc, const char *new_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void link(const H5std_string &curr_name, const hid_t same_loc, const H5std_string &new_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Removes the specified link from this location.
+ void unlink(const char *link_name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+ void unlink(const H5std_string &link_name, const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+
+ // Copies a link from this location to another.
+ void copyLink(const char *src_name, const H5Location &dst, const char *dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void copyLink(const H5std_string &src_name, const H5Location &dst, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Makes a copy of a link in the same location.
+ void copyLink(const char *src_name, const char *dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void copyLink(const H5std_string &src_name, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Renames a link in this location and moves to a new location.
+ void moveLink(const char *src_name, const H5Location &dst, const char *dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void moveLink(const H5std_string &src_name, const H5Location &dst, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Renames a link in this location.
+ void moveLink(const char *src_name, const char *dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ void moveLink(const H5std_string &src_name, const H5std_string &dst_name,
+ const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
+ const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+
+ // Returns the information of the named link.
+ H5L_info_t getLinkInfo(const char * link_name,
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+ H5L_info_t getLinkInfo(const H5std_string & link_name,
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
+
+ // Returns the value of a symbolic link.
+ H5std_string getLinkval(const char *link_name, size_t size = 0) const;
+ H5std_string getLinkval(const H5std_string &link_name, size_t size = 0) const;
+
+ ///\brief Returns an identifier. (pure virtual)
+ virtual hid_t getId() const = 0;
+
+ /***************************************************************************
+ Notes for H5A wrappers
+ ======================
+ These H5A wrappers are marked "deprecated" in 1.8.19.
+ They are moved to H5Object to prevent the object id from being
+ passed in to H5A APIs.
+ Updated: they are removed from source code in 1.8.21.
+ ***************************************************************************/
+
+ // Creates an attribute for the specified object at this location
+ // PropList is currently not used, so always be default.
+ // Deprecated
+ // virtual Attribute createAttribute(const char* name, const DataType& type, const DataSpace& space, const
+ // PropList& create_plist = PropList::DEFAULT) const; virtual Attribute createAttribute(const
+ // H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist =
+ // PropList::DEFAULT) const;
+
+ // Given its name, opens the attribute that belongs to an object at
+ // this location.
+ // Deprecated
+ // virtual Attribute openAttribute(const char* name) const;
+ // virtual Attribute openAttribute(const H5std_string& name) const;
+
+ // Given its index, opens the attribute that belongs to an object at
+ // this location.
+ // virtual Attribute openAttribute(const unsigned int idx) const; // Deprecated
+
+ // Iterate user's function over the attributes at this location.
+ virtual int iterateAttrs(attr_operator_t user_op, unsigned *idx = NULL,
+ void *op_data = NULL); // Deprecated
+
+ // Checks whether the named attribute exists at this location.
+ // Deprecated
+ // virtual bool attrExists(const char* name) const;
+ // virtual bool attrExists(const H5std_string& name) const;
+
+ // Renames the named attribute to a new name.
+ // Deprecated
+ // virtual void renameAttr(const char* oldname, const char* newname) const;
+ // virtual void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
+
+ // Removes the named attribute from this location.
+ // Deprecated
+ // virtual void removeAttr(const char* name) const;
+ // virtual void removeAttr(const H5std_string& name) const;
+
+ /**************************** End of H5A note *******************************/
+
+ protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Default constructor
- H5Location();
+ // Default constructor
+ H5Location();
- // *** Deprecation warning ***
- // The following two constructors are no longer appropriate after the
- // data member "id" had been moved to the sub-classes.
- // The copy constructor is a noop and is removed in 1.8.15 and the
- // other will be removed from 1.10 release, and then from 1.8 if its
- // removal does not raise any problems in two 1.10 releases.
+ // *** Deprecation warning ***
+ // The following two constructors are no longer appropriate after the
+ // data member "id" had been moved to the sub-classes.
+ // The copy constructor is a noop and is removed in 1.8.15 and the
+ // other will be removed from 1.10 release, and then from 1.8 if its
+ // removal does not raise any problems in two 1.10 releases.
- // Creates a copy of an existing object giving the location id.
- H5Location(const hid_t loc_id);
+ // Creates a copy of an existing object giving the location id.
+ H5Location(const hid_t loc_id);
- // Creates a reference to an HDF5 object or a dataset region.
- void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
+ // Creates a reference to an HDF5 object or a dataset region.
+ void p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t ref_type) const;
- // Dereferences a ref into an HDF5 id.
- hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const char* from_func);
+ // Dereferences a ref into an HDF5 id.
+ hid_t p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, const char *from_func);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Retrieves the type of object that an object reference points to.
- H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
+ // Retrieves the type of object that an object reference points to.
+ H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Retrieves the type of object that an object reference points to.
- H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
+ // Retrieves the type of object that an object reference points to.
+ H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
- // Sets the identifier of this object to a new value. - this one
- // doesn't increment reference count
- virtual void p_setId(const hid_t new_id) = 0;
+ // Sets the identifier of this object to a new value. - this one
+ // doesn't increment reference count
+ virtual void p_setId(const hid_t new_id) = 0;
#endif // DOXYGEN_SHOULD_SKIP_THIS
- // Noop destructor.
- virtual ~H5Location();
+ // Noop destructor.
+ virtual ~H5Location();
}; // end of H5Location
} // namespace H5
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 868a5d3..02cc564 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,7 +19,7 @@
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -40,19 +40,19 @@ namespace H5 {
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
- /* extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
- const H5A_info_t *ainfo, void *op_data)
+/* extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
+ const H5A_info_t *ainfo, void *op_data)
{
- H5std_string s_attr_name = H5std_string(attr_name);
+ H5std_string s_attr_name = H5std_string(attr_name);
#ifdef NO_STATIC_CAST
- UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
+ UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
- UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
+ UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
#endif
- myData->op(*myData->location, s_attr_name, myData->opData);
- return 0;
+ myData->op(*myData->location, s_attr_name, myData->opData);
+ return 0;
}
- */
+*/
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
@@ -70,7 +70,8 @@ H5Object::H5Object() : H5Location() {}
// param new_id - IN: New id to set
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void f_Attribute_setId(Attribute* attr, hid_t new_id)
+void
+f_Attribute_setId(Attribute *attr, hid_t new_id)
{
attr->p_setId(new_id);
}
@@ -106,19 +107,20 @@ May, 2017 (1.8.19)
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute H5Object::createAttribute(const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist) const
+Attribute
+H5Object::createAttribute(const char *name, const DataType &data_type, const DataSpace &data_space,
+ const PropList &create_plist) const
{
- hid_t type_id = data_type.getId();
+ hid_t type_id = data_type.getId();
hid_t space_id = data_space.getId();
hid_t plist_id = create_plist.getId();
- hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT);
+ hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT);
// If the attribute id is valid, create and return the Attribute object
- if (attr_id > 0)
- {
+ if (attr_id > 0) {
Attribute attr;
f_Attribute_setId(&attr, attr_id);
- return(attr);
+ return (attr);
}
else
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
@@ -131,9 +133,11 @@ Attribute H5Object::createAttribute(const char* name, const DataType& data_type,
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute H5Object::createAttribute(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist) const
+Attribute
+H5Object::createAttribute(const H5std_string &name, const DataType &data_type, const DataSpace &data_space,
+ const PropList &create_plist) const
{
- return(createAttribute(name.c_str(), data_type, data_space, create_plist));
+ return (createAttribute(name.c_str(), data_type, data_space, create_plist));
}
//--------------------------------------------------------------------------
@@ -144,17 +148,16 @@ Attribute H5Object::createAttribute(const H5std_string& name, const DataType& da
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute H5Object::openAttribute(const char* name) const
+Attribute
+H5Object::openAttribute(const char *name) const
{
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
- if (attr_id > 0)
- {
+ if (attr_id > 0) {
Attribute attr;
f_Attribute_setId(&attr, attr_id);
- return(attr);
+ return (attr);
}
- else
- {
+ else {
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
}
}
@@ -166,9 +169,10 @@ Attribute H5Object::openAttribute(const char* name) const
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute H5Object::openAttribute(const H5std_string& name) const
+Attribute
+H5Object::openAttribute(const H5std_string &name) const
{
- return(openAttribute(name.c_str()));
+ return (openAttribute(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -179,18 +183,17 @@ Attribute H5Object::openAttribute(const H5std_string& name) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute H5Object::openAttribute(const unsigned int idx) const
+Attribute
+H5Object::openAttribute(const unsigned int idx) const
{
- hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
- H5_ITER_INC, static_cast<hsize_t>(idx), H5P_DEFAULT, H5P_DEFAULT);
- if (attr_id > 0)
- {
+ hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, static_cast<hsize_t>(idx),
+ H5P_DEFAULT, H5P_DEFAULT);
+ if (attr_id > 0) {
Attribute attr;
f_Attribute_setId(&attr, attr_id);
- return(attr);
+ return (attr);
}
- else
- {
+ else {
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
}
}
@@ -202,15 +205,16 @@ Attribute H5Object::openAttribute(const unsigned int idx) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2013
//--------------------------------------------------------------------------
-bool H5Object::attrExists(const char* name) const
+bool
+H5Object::attrExists(const char *name) const
{
// Call C routine H5Aexists to determine whether an attribute exists
// at this location, which could be specified by a file, group, dataset,
// or named datatype.
herr_t ret_value = H5Aexists(getId(), name);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Aexists returns a negative value
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
@@ -223,9 +227,10 @@ bool H5Object::attrExists(const char* name) const
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool H5Object::attrExists(const H5std_string& name) const
+bool
+H5Object::attrExists(const H5std_string &name) const
{
- return(attrExists(name.c_str()));
+ return (attrExists(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -235,10 +240,11 @@ bool H5Object::attrExists(const H5std_string& name) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Object::removeAttr(const char* name) const
+void
+H5Object::removeAttr(const char *name) const
{
herr_t ret_value = H5Adelete(getId(), name);
- if(ret_value < 0)
+ if (ret_value < 0)
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
}
@@ -249,7 +255,8 @@ void H5Object::removeAttr(const char* name) const
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Object::removeAttr(const H5std_string& name) const
+void
+H5Object::removeAttr(const H5std_string &name) const
{
removeAttr(name.c_str());
}
@@ -262,7 +269,8 @@ void H5Object::removeAttr(const H5std_string& name) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-void H5Object::renameAttr(const char* oldname, const char* newname) const
+void
+H5Object::renameAttr(const char *oldname, const char *newname) const
{
herr_t ret_value = H5Arename(getId(), oldname, newname);
if (ret_value < 0)
@@ -276,9 +284,10 @@ void H5Object::renameAttr(const char* oldname, const char* newname) const
/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
+void
+H5Object::renameAttr(const H5std_string &oldname, const H5std_string &newname) const
{
- renameAttr (oldname.c_str(), newname.c_str());
+ renameAttr(oldname.c_str(), newname.c_str());
}
// end of Notes for H5A wrappers
@@ -294,13 +303,14 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna
// - Moved to H5Location to allow passing an attribute id to the
// C API, in 1.8.20.
//--------------------------------------------------------------------------
-int H5Object::getNumAttrs() const
+int
+H5Object::getNumAttrs() const
{
- H5O_info_t oinfo; /* Object info */
+ H5O_info_t oinfo; /* Object info */
- if(H5Oget_info(getId(), &oinfo) < 0)
+ if (H5Oget_info(getId(), &oinfo) < 0)
throwException("getNumAttrs", "H5Oget_info failed");
- return(static_cast<int>(oinfo.num_attrs));
+ return (static_cast<int>(oinfo.num_attrs));
}
//--------------------------------------------------------------------------
@@ -309,22 +319,21 @@ int H5Object::getNumAttrs() const
///\return The name of the object
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const
+ssize_t
+H5Object::getObjName(char *obj_name, size_t buf_size) const
{
// H5Iget_name will get buf_size-1 chars of the name to null terminate it
ssize_t name_size = H5Iget_name(getId(), obj_name, buf_size);
// If H5Iget_name returns a negative value, raise an exception
- if (name_size < 0)
- {
+ if (name_size < 0) {
throwException("getObjName", "H5Iget_name failed");
}
- else if (name_size == 0)
- {
+ else if (name_size == 0) {
throwException("getObjName", "Object must have a name, but name length is 0");
}
// Return length of the name
- return(name_size);
+ return (name_size);
}
//--------------------------------------------------------------------------
@@ -334,7 +343,8 @@ ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const
///\exception H5::Exception
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-H5std_string H5Object::getObjName() const
+H5std_string
+H5Object::getObjName() const
{
H5std_string obj_name(""); // object name to return
@@ -342,31 +352,28 @@ H5std_string H5Object::getObjName() const
ssize_t name_size = H5Iget_name(getId(), NULL, static_cast<size_t>(0));
// If H5Iget_name failed, throw exception
- if (name_size < 0)
- {
+ if (name_size < 0) {
throwException("getObjName", "H5Iget_name failed");
}
- else if (name_size == 0)
- {
+ else if (name_size == 0) {
throwException("getObjName", "Object must have a name, but name length is 0");
}
// Object's name exists, retrieve it
- else if (name_size > 0)
- {
- char* name_C = new char[name_size+1]; // temporary C-string
- HDmemset(name_C, 0, name_size+1); // clear buffer
+ else if (name_size > 0) {
+ char *name_C = new char[name_size + 1]; // temporary C-string
+ HDmemset(name_C, 0, name_size + 1); // clear buffer
// Use overloaded function
- name_size = getObjName(name_C, name_size+1);
+ name_size = getObjName(name_C, name_size + 1);
// Convert the C object name to return
obj_name = name_C;
// Clean up resource
- delete []name_C;
+ delete[] name_C;
}
// Return object's name
- return(obj_name);
+ return (obj_name);
}
//--------------------------------------------------------------------------
@@ -382,35 +389,34 @@ H5std_string H5Object::getObjName() const
/// which case the entire name will be retrieved.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
-ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
+ssize_t
+H5Object::getObjName(H5std_string &obj_name, size_t len) const
{
ssize_t name_size = 0;
// If no length is provided, get the entire object name
- if (len == 0)
- {
- obj_name = getObjName();
+ if (len == 0) {
+ obj_name = getObjName();
name_size = obj_name.length();
}
// If length is provided, get that number of characters in name
- else
- {
- char* name_C = new char[len+1]; // temporary C-string
- HDmemset(name_C, 0, len+1); // clear buffer
+ else {
+ char *name_C = new char[len + 1]; // temporary C-string
+ HDmemset(name_C, 0, len + 1); // clear buffer
// Use overloaded function
- name_size = getObjName(name_C, len+1);
+ name_size = getObjName(name_C, len + 1);
// Convert the C object name to return
obj_name = name_C;
// Clean up resource
- delete []name_C;
+ delete[] name_C;
}
// Otherwise, keep obj_name intact
// Return name size
- return(name_size);
+ return (name_size);
}
//--------------------------------------------------------------------------
@@ -421,4 +427,4 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
H5Object::~H5Object() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 4d40415..a52eda9 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -35,60 +35,62 @@ namespace H5 {
// Inheritance: H5Location -> IdComponent
class H5_DLLCPP H5Object : public H5Location {
- public:
- // Creates an attribute for the specified object
- // PropList is currently not used, so always be default.
- Attribute createAttribute(const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
- Attribute createAttribute(const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
-
- // Given its name, opens the attribute that belongs to this object.
- Attribute openAttribute(const char* name) const;
- Attribute openAttribute(const H5std_string& name) const;
-
- // Given its index, opens the attribute that belongs to this object.
- Attribute openAttribute(const unsigned int idx) const;
-
- // Determines the number of attributes belong to this object.
- int getNumAttrs() const;
-
- // Checks whether the named attribute exists for this object.
- bool attrExists(const char* name) const;
- bool attrExists(const H5std_string& name) const;
-
- // Renames the named attribute of this object to a new name.
- void renameAttr(const char* oldname, const char* newname) const;
- void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
-
- // Removes the named attribute from this object.
- void removeAttr(const char* name) const;
- void removeAttr(const H5std_string& name) const;
-
- // Gets the name of this HDF5 object, i.e., Group, DataSet, or
- // DataType.
- ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
- ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
- H5std_string getObjName() const;
+ public:
+ // Creates an attribute for the specified object
+ // PropList is currently not used, so always be default.
+ Attribute createAttribute(const char *name, const DataType &type, const DataSpace &space,
+ const PropList &create_plist = PropList::DEFAULT) const;
+ Attribute createAttribute(const H5std_string &name, const DataType &type, const DataSpace &space,
+ const PropList &create_plist = PropList::DEFAULT) const;
+
+ // Given its name, opens the attribute that belongs to this object.
+ Attribute openAttribute(const char *name) const;
+ Attribute openAttribute(const H5std_string &name) const;
+
+ // Given its index, opens the attribute that belongs to this object.
+ Attribute openAttribute(const unsigned int idx) const;
+
+ // Determines the number of attributes belong to this object.
+ int getNumAttrs() const;
+
+ // Checks whether the named attribute exists for this object.
+ bool attrExists(const char *name) const;
+ bool attrExists(const H5std_string &name) const;
+
+ // Renames the named attribute of this object to a new name.
+ void renameAttr(const char *oldname, const char *newname) const;
+ void renameAttr(const H5std_string &oldname, const H5std_string &newname) const;
+
+ // Removes the named attribute from this object.
+ void removeAttr(const char *name) const;
+ void removeAttr(const H5std_string &name) const;
+
+ // Gets the name of this HDF5 object, i.e., Group, DataSet, or
+ // DataType.
+ ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
+ ssize_t getObjName(H5std_string &obj_name, size_t len = 0) const;
+ H5std_string getObjName() const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Noop destructor.
- virtual ~H5Object();
+ // Noop destructor.
+ virtual ~H5Object();
- protected:
- // Default constructor
- H5Object();
+ protected:
+ // Default constructor
+ H5Object();
- // *** Deprecation warning ***
- // The following two constructors are no longer appropriate after the
- // data member "id" had been moved to the sub-classes.
- // The copy constructor is a noop and is removed in 1.8.15 and the
- // other will be removed from 1.10 release, and then from 1.8 if its
- // removal does not raise any problems in two 1.10 releases.
+ // *** Deprecation warning ***
+ // The following two constructors are no longer appropriate after the
+ // data member "id" had been moved to the sub-classes.
+ // The copy constructor is a noop and is removed in 1.8.15 and the
+ // other will be removed from 1.10 release, and then from 1.8 if its
+ // removal does not raise any problems in two 1.10 releases.
- // Creates a copy of an existing object giving the object id
- // H5Object(const hid_t object_id);
+ // Creates a copy of an existing object giving the object id
+ // H5Object(const hid_t object_id);
- // Copy constructor: makes copy of an H5Object object.
- // H5Object(const H5Object& original);
+ // Copy constructor: makes copy of an H5Object object.
+ // H5Object(const H5Object& original);
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp
index afa8653..56098d0 100644
--- a/c++/src/H5OcreatProp.cpp
+++ b/c++/src/H5OcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,7 +28,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-ObjCreatPropList* ObjCreatPropList::DEFAULT_ = 0;
+ObjCreatPropList *ObjCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::getConstant
@@ -41,13 +41,13 @@ ObjCreatPropList* ObjCreatPropList::DEFAULT_ = 0;
// happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-ObjCreatPropList* ObjCreatPropList::getConstant()
+ObjCreatPropList *
+ObjCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -56,8 +56,9 @@ ObjCreatPropList* ObjCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new ObjCreatPropList(H5P_OBJECT_CREATE);
else
- throw PropListIException("ObjCreatPropList::getConstant", "ObjCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("ObjCreatPropList::getConstant",
+ "ObjCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -67,7 +68,8 @@ ObjCreatPropList* ObjCreatPropList::getConstant()
// exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::deleteConstants()
+void
+ObjCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -76,7 +78,7 @@ void ObjCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default property
//--------------------------------------------------------------------------
-const ObjCreatPropList& ObjCreatPropList::DEFAULT = *getConstant();
+const ObjCreatPropList &ObjCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -93,7 +95,7 @@ ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE) {}
///\param original - IN: ObjCreatPropList instance to copy
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList& original) : PropList(original) {}
+ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: ObjCreatPropList overloaded constructor
@@ -118,11 +120,11 @@ ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrPhaseChange
// Programmer: Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
+void
+ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
{
herr_t ret_value = H5Pset_attr_phase_change(id, max_compact, min_dense);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::setAttrPhaseChange", "H5Pset_attr_phase_change failed");
}
}
@@ -142,12 +144,12 @@ void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_den
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrPhaseChange
// Programmer: Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const
+void
+ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) const
{
herr_t ret_value;
ret_value = H5Pget_attr_phase_change(id, &max_compact, &min_dense);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::getAttrPhaseChange", "H5Pget_attr_phase_change failed");
}
}
@@ -171,11 +173,11 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrCreationOrder
// Programmer: Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
+void
+ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
{
herr_t ret_value = H5Pset_attr_creation_order(id, crt_order_flags);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::setAttrCrtOrder", "H5Pset_attr_creation_order failed");
}
}
@@ -193,16 +195,16 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrCreationOrder
// Programmer: Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-unsigned ObjCreatPropList::getAttrCrtOrder() const
+unsigned
+ObjCreatPropList::getAttrCrtOrder() const
{
- herr_t ret_value;
+ herr_t ret_value;
unsigned crt_order_flags = 0;
- ret_value = H5Pget_attr_creation_order(id, &crt_order_flags);
- if (ret_value < 0)
- {
+ ret_value = H5Pget_attr_creation_order(id, &crt_order_flags);
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::getAttrCrtOrder", "H5Pget_attr_creation_order failed");
}
- return(crt_order_flags);
+ return (crt_order_flags);
}
//--------------------------------------------------------------------------
@@ -212,4 +214,4 @@ unsigned ObjCreatPropList::getAttrCrtOrder() const
//--------------------------------------------------------------------------
ObjCreatPropList::~ObjCreatPropList() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h
index b494e85..a15ea56 100644
--- a/c++/src/H5OcreatProp.h
+++ b/c++/src/H5OcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,49 +23,52 @@ namespace H5 {
*/
// Inheritance: PropList -> IdComponent
class H5_DLLCPP ObjCreatPropList : public PropList {
- public:
- ///\brief Default object creation property list.
- static const ObjCreatPropList& DEFAULT;
+ public:
+ ///\brief Default object creation property list.
+ static const ObjCreatPropList &DEFAULT;
- // Creates a object creation property list.
- ObjCreatPropList();
+ // Creates a object creation property list.
+ ObjCreatPropList();
- // Sets attribute storage phase change thresholds.
- void setAttrPhaseChange(unsigned max_compact = 8, unsigned min_dense = 6) const;
+ // Sets attribute storage phase change thresholds.
+ void setAttrPhaseChange(unsigned max_compact = 8, unsigned min_dense = 6) const;
- // Gets attribute storage phase change thresholds.
- void getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const;
+ // Gets attribute storage phase change thresholds.
+ void getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) const;
- // Sets tracking and indexing of attribute creation order.
- void setAttrCrtOrder(unsigned crt_order_flags) const;
+ // Sets tracking and indexing of attribute creation order.
+ void setAttrCrtOrder(unsigned crt_order_flags) const;
- // Gets tracking and indexing settings for attribute creation order.
- unsigned getAttrCrtOrder() const;
+ // Gets tracking and indexing settings for attribute creation order.
+ unsigned getAttrCrtOrder() const;
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("ObjCreatPropList");
+ }
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("ObjCreatPropList"); }
+ // Copy constructor: creates a copy of a ObjCreatPropList object.
+ ObjCreatPropList(const ObjCreatPropList &original);
- // Copy constructor: creates a copy of a ObjCreatPropList object.
- ObjCreatPropList(const ObjCreatPropList& original);
+ // Creates a copy of an existing object creation property list
+ // using the property list id.
+ ObjCreatPropList(const hid_t plist_id);
- // Creates a copy of an existing object creation property list
- // using the property list id.
- ObjCreatPropList (const hid_t plist_id);
-
- // Noop destructor
- virtual ~ObjCreatPropList();
+ // Noop destructor
+ virtual ~ObjCreatPropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the global constant, should only be used by the library
- static void deleteConstants();
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
- private:
- static ObjCreatPropList* DEFAULT_;
+ private:
+ static ObjCreatPropList *DEFAULT_;
- // Creates the global constant, should only be used by the library
- static ObjCreatPropList* getConstant();
+ // Creates the global constant, should only be used by the library
+ static ObjCreatPropList *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 0838f1c..446a585 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -39,10 +39,7 @@ namespace H5 {
// the provided HDF5 predefined datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id)
-{
- id = H5Tcopy(predtype_id);
-}
+PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id) { id = H5Tcopy(predtype_id); }
//--------------------------------------------------------------------------
// Function: PredType default constructor
@@ -58,7 +55,7 @@ PredType::PredType() : AtomType() {}
///\param original - IN: PredType instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PredType::PredType(const PredType& original) : AtomType(original) {}
+PredType::PredType(const PredType &original) : AtomType(original) {}
//--------------------------------------------------------------------------
// Function: PredType::operator=
@@ -71,29 +68,35 @@ PredType::PredType(const PredType& original) : AtomType(original) {}
// the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PredType& PredType::operator=(const PredType& rhs)
+PredType &
+PredType::operator=(const PredType &rhs)
{
if (this != &rhs)
copy(rhs);
- return(*this);
+ return (*this);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
-void PredType::commit(H5Location& loc, const char* name)
+void
+PredType::commit(H5Location &loc, const char *name)
{
- throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!");
+ throw DataTypeIException("PredType::commit",
+ "Error: Attempted to commit a predefined datatype. Invalid operation!");
}
-void PredType::commit(H5Location& loc, const H5std_string& name)
+void
+PredType::commit(H5Location &loc, const H5std_string &name)
{
commit(loc, name.c_str());
}
-bool PredType::committed()
+bool
+PredType::committed()
{
- throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype.");
+ throw DataTypeIException("PredType::committed",
+ "Error: Attempting to check for commit status on a predefined datatype.");
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -113,180 +116,180 @@ PredType::~PredType() {}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Definition pointers for the constants
-PredType* PredType::PREDTYPE_CONST_ = 0; //dummy
-PredType* PredType::STD_I8BE_;
-PredType* PredType::STD_I8LE_;
-PredType* PredType::STD_I16BE_;
-PredType* PredType::STD_I16LE_;
-PredType* PredType::STD_I32BE_;
-PredType* PredType::STD_I32LE_;
-PredType* PredType::STD_I64BE_;
-PredType* PredType::STD_I64LE_;
-PredType* PredType::STD_U8BE_;
-PredType* PredType::STD_U8LE_;
-PredType* PredType::STD_U16BE_;
-PredType* PredType::STD_U16LE_;
-PredType* PredType::STD_U32BE_;
-PredType* PredType::STD_U32LE_;
-PredType* PredType::STD_U64BE_;
-PredType* PredType::STD_U64LE_;
-PredType* PredType::STD_B8BE_;
-PredType* PredType::STD_B8LE_;
-PredType* PredType::STD_B16BE_;
-PredType* PredType::STD_B16LE_;
-PredType* PredType::STD_B32BE_;
-PredType* PredType::STD_B32LE_;
-PredType* PredType::STD_B64BE_;
-PredType* PredType::STD_B64LE_;
-PredType* PredType::STD_REF_OBJ_;
-PredType* PredType::STD_REF_DSETREG_;
-
-PredType* PredType::C_S1_;
-PredType* PredType::FORTRAN_S1_;
-
-PredType* PredType::IEEE_F32BE_;
-PredType* PredType::IEEE_F32LE_;
-PredType* PredType::IEEE_F64BE_;
-PredType* PredType::IEEE_F64LE_;
-
-PredType* PredType::UNIX_D32BE_;
-PredType* PredType::UNIX_D32LE_;
-PredType* PredType::UNIX_D64BE_;
-PredType* PredType::UNIX_D64LE_;
-
-PredType* PredType::INTEL_I8_;
-PredType* PredType::INTEL_I16_;
-PredType* PredType::INTEL_I32_;
-PredType* PredType::INTEL_I64_;
-PredType* PredType::INTEL_U8_;
-PredType* PredType::INTEL_U16_;
-PredType* PredType::INTEL_U32_;
-PredType* PredType::INTEL_U64_;
-PredType* PredType::INTEL_B8_;
-PredType* PredType::INTEL_B16_;
-PredType* PredType::INTEL_B32_;
-PredType* PredType::INTEL_B64_;
-PredType* PredType::INTEL_F32_;
-PredType* PredType::INTEL_F64_;
-
-PredType* PredType::ALPHA_I8_;
-PredType* PredType::ALPHA_I16_;
-PredType* PredType::ALPHA_I32_;
-PredType* PredType::ALPHA_I64_;
-PredType* PredType::ALPHA_U8_;
-PredType* PredType::ALPHA_U16_;
-PredType* PredType::ALPHA_U32_;
-PredType* PredType::ALPHA_U64_;
-PredType* PredType::ALPHA_B8_;
-PredType* PredType::ALPHA_B16_;
-PredType* PredType::ALPHA_B32_;
-PredType* PredType::ALPHA_B64_;
-PredType* PredType::ALPHA_F32_;
-PredType* PredType::ALPHA_F64_;
-
-PredType* PredType::MIPS_I8_;
-PredType* PredType::MIPS_I16_;
-PredType* PredType::MIPS_I32_;
-PredType* PredType::MIPS_I64_;
-PredType* PredType::MIPS_U8_;
-PredType* PredType::MIPS_U16_;
-PredType* PredType::MIPS_U32_;
-PredType* PredType::MIPS_U64_;
-PredType* PredType::MIPS_B8_;
-PredType* PredType::MIPS_B16_;
-PredType* PredType::MIPS_B32_;
-PredType* PredType::MIPS_B64_;
-PredType* PredType::MIPS_F32_;
-PredType* PredType::MIPS_F64_;
-
-PredType* PredType::NATIVE_CHAR_;
-PredType* PredType::NATIVE_SCHAR_;
-PredType* PredType::NATIVE_UCHAR_;
-PredType* PredType::NATIVE_SHORT_;
-PredType* PredType::NATIVE_USHORT_;
-PredType* PredType::NATIVE_INT_;
-PredType* PredType::NATIVE_UINT_;
-PredType* PredType::NATIVE_LONG_;
-PredType* PredType::NATIVE_ULONG_;
-PredType* PredType::NATIVE_LLONG_;
-PredType* PredType::NATIVE_ULLONG_;
-PredType* PredType::NATIVE_FLOAT_;
-PredType* PredType::NATIVE_DOUBLE_;
-PredType* PredType::NATIVE_LDOUBLE_;
-PredType* PredType::NATIVE_B8_;
-PredType* PredType::NATIVE_B16_;
-PredType* PredType::NATIVE_B32_;
-PredType* PredType::NATIVE_B64_;
-PredType* PredType::NATIVE_OPAQUE_;
-PredType* PredType::NATIVE_HSIZE_;
-PredType* PredType::NATIVE_HSSIZE_;
-PredType* PredType::NATIVE_HERR_;
-PredType* PredType::NATIVE_HBOOL_;
-
-PredType* PredType::NATIVE_INT8_;
-PredType* PredType::NATIVE_UINT8_;
-PredType* PredType::NATIVE_INT16_;
-PredType* PredType::NATIVE_UINT16_;
-PredType* PredType::NATIVE_INT32_;
-PredType* PredType::NATIVE_UINT32_;
-PredType* PredType::NATIVE_INT64_;
-PredType* PredType::NATIVE_UINT64_;
+PredType *PredType::PREDTYPE_CONST_ = 0; // dummy
+PredType *PredType::STD_I8BE_;
+PredType *PredType::STD_I8LE_;
+PredType *PredType::STD_I16BE_;
+PredType *PredType::STD_I16LE_;
+PredType *PredType::STD_I32BE_;
+PredType *PredType::STD_I32LE_;
+PredType *PredType::STD_I64BE_;
+PredType *PredType::STD_I64LE_;
+PredType *PredType::STD_U8BE_;
+PredType *PredType::STD_U8LE_;
+PredType *PredType::STD_U16BE_;
+PredType *PredType::STD_U16LE_;
+PredType *PredType::STD_U32BE_;
+PredType *PredType::STD_U32LE_;
+PredType *PredType::STD_U64BE_;
+PredType *PredType::STD_U64LE_;
+PredType *PredType::STD_B8BE_;
+PredType *PredType::STD_B8LE_;
+PredType *PredType::STD_B16BE_;
+PredType *PredType::STD_B16LE_;
+PredType *PredType::STD_B32BE_;
+PredType *PredType::STD_B32LE_;
+PredType *PredType::STD_B64BE_;
+PredType *PredType::STD_B64LE_;
+PredType *PredType::STD_REF_OBJ_;
+PredType *PredType::STD_REF_DSETREG_;
+
+PredType *PredType::C_S1_;
+PredType *PredType::FORTRAN_S1_;
+
+PredType *PredType::IEEE_F32BE_;
+PredType *PredType::IEEE_F32LE_;
+PredType *PredType::IEEE_F64BE_;
+PredType *PredType::IEEE_F64LE_;
+
+PredType *PredType::UNIX_D32BE_;
+PredType *PredType::UNIX_D32LE_;
+PredType *PredType::UNIX_D64BE_;
+PredType *PredType::UNIX_D64LE_;
+
+PredType *PredType::INTEL_I8_;
+PredType *PredType::INTEL_I16_;
+PredType *PredType::INTEL_I32_;
+PredType *PredType::INTEL_I64_;
+PredType *PredType::INTEL_U8_;
+PredType *PredType::INTEL_U16_;
+PredType *PredType::INTEL_U32_;
+PredType *PredType::INTEL_U64_;
+PredType *PredType::INTEL_B8_;
+PredType *PredType::INTEL_B16_;
+PredType *PredType::INTEL_B32_;
+PredType *PredType::INTEL_B64_;
+PredType *PredType::INTEL_F32_;
+PredType *PredType::INTEL_F64_;
+
+PredType *PredType::ALPHA_I8_;
+PredType *PredType::ALPHA_I16_;
+PredType *PredType::ALPHA_I32_;
+PredType *PredType::ALPHA_I64_;
+PredType *PredType::ALPHA_U8_;
+PredType *PredType::ALPHA_U16_;
+PredType *PredType::ALPHA_U32_;
+PredType *PredType::ALPHA_U64_;
+PredType *PredType::ALPHA_B8_;
+PredType *PredType::ALPHA_B16_;
+PredType *PredType::ALPHA_B32_;
+PredType *PredType::ALPHA_B64_;
+PredType *PredType::ALPHA_F32_;
+PredType *PredType::ALPHA_F64_;
+
+PredType *PredType::MIPS_I8_;
+PredType *PredType::MIPS_I16_;
+PredType *PredType::MIPS_I32_;
+PredType *PredType::MIPS_I64_;
+PredType *PredType::MIPS_U8_;
+PredType *PredType::MIPS_U16_;
+PredType *PredType::MIPS_U32_;
+PredType *PredType::MIPS_U64_;
+PredType *PredType::MIPS_B8_;
+PredType *PredType::MIPS_B16_;
+PredType *PredType::MIPS_B32_;
+PredType *PredType::MIPS_B64_;
+PredType *PredType::MIPS_F32_;
+PredType *PredType::MIPS_F64_;
+
+PredType *PredType::NATIVE_CHAR_;
+PredType *PredType::NATIVE_SCHAR_;
+PredType *PredType::NATIVE_UCHAR_;
+PredType *PredType::NATIVE_SHORT_;
+PredType *PredType::NATIVE_USHORT_;
+PredType *PredType::NATIVE_INT_;
+PredType *PredType::NATIVE_UINT_;
+PredType *PredType::NATIVE_LONG_;
+PredType *PredType::NATIVE_ULONG_;
+PredType *PredType::NATIVE_LLONG_;
+PredType *PredType::NATIVE_ULLONG_;
+PredType *PredType::NATIVE_FLOAT_;
+PredType *PredType::NATIVE_DOUBLE_;
+PredType *PredType::NATIVE_LDOUBLE_;
+PredType *PredType::NATIVE_B8_;
+PredType *PredType::NATIVE_B16_;
+PredType *PredType::NATIVE_B32_;
+PredType *PredType::NATIVE_B64_;
+PredType *PredType::NATIVE_OPAQUE_;
+PredType *PredType::NATIVE_HSIZE_;
+PredType *PredType::NATIVE_HSSIZE_;
+PredType *PredType::NATIVE_HERR_;
+PredType *PredType::NATIVE_HBOOL_;
+
+PredType *PredType::NATIVE_INT8_;
+PredType *PredType::NATIVE_UINT8_;
+PredType *PredType::NATIVE_INT16_;
+PredType *PredType::NATIVE_UINT16_;
+PredType *PredType::NATIVE_INT32_;
+PredType *PredType::NATIVE_UINT32_;
+PredType *PredType::NATIVE_INT64_;
+PredType *PredType::NATIVE_UINT64_;
// LEAST types
#if H5_SIZEOF_INT_LEAST8_T != 0
-PredType* PredType::NATIVE_INT_LEAST8_;
+PredType *PredType::NATIVE_INT_LEAST8_;
#endif /* H5_SIZEOF_INT_LEAST8_T */
#if H5_SIZEOF_UINT_LEAST8_T != 0
-PredType* PredType::NATIVE_UINT_LEAST8_;
+PredType *PredType::NATIVE_UINT_LEAST8_;
#endif /* H5_SIZEOF_UINT_LEAST8_T */
#if H5_SIZEOF_INT_LEAST16_T != 0
-PredType* PredType::NATIVE_INT_LEAST16_;
+PredType *PredType::NATIVE_INT_LEAST16_;
#endif /* H5_SIZEOF_INT_LEAST16_T */
#if H5_SIZEOF_UINT_LEAST16_T != 0
-PredType* PredType::NATIVE_UINT_LEAST16_;
+PredType *PredType::NATIVE_UINT_LEAST16_;
#endif /* H5_SIZEOF_UINT_LEAST16_T */
#if H5_SIZEOF_INT_LEAST32_T != 0
-PredType* PredType::NATIVE_INT_LEAST32_;
+PredType *PredType::NATIVE_INT_LEAST32_;
#endif /* H5_SIZEOF_INT_LEAST32_T */
#if H5_SIZEOF_UINT_LEAST32_T != 0
-PredType* PredType::NATIVE_UINT_LEAST32_;
+PredType *PredType::NATIVE_UINT_LEAST32_;
#endif /* H5_SIZEOF_UINT_LEAST32_T */
#if H5_SIZEOF_INT_LEAST64_T != 0
-PredType* PredType::NATIVE_INT_LEAST64_;
+PredType *PredType::NATIVE_INT_LEAST64_;
#endif /* H5_SIZEOF_INT_LEAST64_T */
#if H5_SIZEOF_UINT_LEAST64_T != 0
-PredType* PredType::NATIVE_UINT_LEAST64_;
+PredType *PredType::NATIVE_UINT_LEAST64_;
#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
#if H5_SIZEOF_INT_FAST8_T != 0
-PredType* PredType::NATIVE_INT_FAST8_;
+PredType *PredType::NATIVE_INT_FAST8_;
#endif /* H5_SIZEOF_INT_FAST8_T */
#if H5_SIZEOF_UINT_FAST8_T != 0
-PredType* PredType::NATIVE_UINT_FAST8_;
+PredType *PredType::NATIVE_UINT_FAST8_;
#endif /* H5_SIZEOF_UINT_FAST8_T */
#if H5_SIZEOF_INT_FAST16_T != 0
-PredType* PredType::NATIVE_INT_FAST16_;
+PredType *PredType::NATIVE_INT_FAST16_;
#endif /* H5_SIZEOF_INT_FAST16_T */
#if H5_SIZEOF_UINT_FAST16_T != 0
-PredType* PredType::NATIVE_UINT_FAST16_;
+PredType *PredType::NATIVE_UINT_FAST16_;
#endif /* H5_SIZEOF_UINT_FAST16_T */
#if H5_SIZEOF_INT_FAST32_T != 0
-PredType* PredType::NATIVE_INT_FAST32_;
+PredType *PredType::NATIVE_INT_FAST32_;
#endif /* H5_SIZEOF_INT_FAST32_T */
#if H5_SIZEOF_UINT_FAST32_T != 0
-PredType* PredType::NATIVE_UINT_FAST32_;
+PredType *PredType::NATIVE_UINT_FAST32_;
#endif /* H5_SIZEOF_UINT_FAST32_T */
#if H5_SIZEOF_INT_FAST64_T != 0
-PredType* PredType::NATIVE_INT_FAST64_;
+PredType *PredType::NATIVE_INT_FAST64_;
#endif /* H5_SIZEOF_INT_FAST64_T */
#if H5_SIZEOF_UINT_FAST64_T != 0
-PredType* PredType::NATIVE_UINT_FAST64_;
+PredType *PredType::NATIVE_UINT_FAST64_;
#endif /* H5_SIZEOF_UINT_FAST64_T */
//--------------------------------------------------------------------------
@@ -303,13 +306,13 @@ PredType* PredType::NATIVE_UINT_FAST64_;
//
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-PredType* PredType::getPredTypes()
+PredType *
+PredType::getPredTypes()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -318,7 +321,9 @@ PredType* PredType::getPredTypes()
if (PREDTYPE_CONST_ == 0)
makePredTypes();
else
- throw H5::DataTypeIException("PredType::getPredTypes", "PredType::getPredTypes is being invoked on an allocated PREDTYPE_CONST_");
+ throw H5::DataTypeIException(
+ "PredType::getPredTypes",
+ "PredType::getPredTypes is being invoked on an allocated PREDTYPE_CONST_");
return PREDTYPE_CONST_;
}
@@ -327,38 +332,39 @@ PredType* PredType::getPredTypes()
// Purpose: Allocate all PredType constants.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void PredType::makePredTypes()
+void
+PredType::makePredTypes()
{
PREDTYPE_CONST_ = new PredType;
- C_S1_ = new PredType(H5T_C_S1);
- FORTRAN_S1_ = new PredType(H5T_FORTRAN_S1);
+ C_S1_ = new PredType(H5T_C_S1);
+ FORTRAN_S1_ = new PredType(H5T_FORTRAN_S1);
- STD_I8BE_ = new PredType(H5T_STD_I8BE);
- STD_I8LE_ = new PredType(H5T_STD_I8LE);
+ STD_I8BE_ = new PredType(H5T_STD_I8BE);
+ STD_I8LE_ = new PredType(H5T_STD_I8LE);
STD_I16BE_ = new PredType(H5T_STD_I16BE);
STD_I16LE_ = new PredType(H5T_STD_I16LE);
STD_I32BE_ = new PredType(H5T_STD_I32BE);
STD_I32LE_ = new PredType(H5T_STD_I32LE);
STD_I64BE_ = new PredType(H5T_STD_I64BE);
STD_I64LE_ = new PredType(H5T_STD_I64LE);
- STD_U8BE_ = new PredType(H5T_STD_U8BE);
- STD_U8LE_ = new PredType(H5T_STD_U8LE);
+ STD_U8BE_ = new PredType(H5T_STD_U8BE);
+ STD_U8LE_ = new PredType(H5T_STD_U8LE);
STD_U16BE_ = new PredType(H5T_STD_U16BE);
STD_U16LE_ = new PredType(H5T_STD_U16LE);
STD_U32BE_ = new PredType(H5T_STD_U32BE);
STD_U32LE_ = new PredType(H5T_STD_U32LE);
STD_U64BE_ = new PredType(H5T_STD_U64BE);
STD_U64LE_ = new PredType(H5T_STD_U64LE);
- STD_B8BE_ = new PredType(H5T_STD_B8BE);
- STD_B8LE_ = new PredType(H5T_STD_B8LE);
-
- STD_B16BE_ = new PredType(H5T_STD_B16BE);
- STD_B16LE_ = new PredType(H5T_STD_B16LE);
- STD_B32BE_ = new PredType(H5T_STD_B32BE);
- STD_B32LE_ = new PredType(H5T_STD_B32LE);
- STD_B64BE_ = new PredType(H5T_STD_B64BE);
- STD_B64LE_ = new PredType(H5T_STD_B64LE);
- STD_REF_OBJ_ = new PredType(H5T_STD_REF_OBJ);
+ STD_B8BE_ = new PredType(H5T_STD_B8BE);
+ STD_B8LE_ = new PredType(H5T_STD_B8LE);
+
+ STD_B16BE_ = new PredType(H5T_STD_B16BE);
+ STD_B16LE_ = new PredType(H5T_STD_B16LE);
+ STD_B32BE_ = new PredType(H5T_STD_B32BE);
+ STD_B32LE_ = new PredType(H5T_STD_B32LE);
+ STD_B64BE_ = new PredType(H5T_STD_B64BE);
+ STD_B64LE_ = new PredType(H5T_STD_B64LE);
+ STD_REF_OBJ_ = new PredType(H5T_STD_REF_OBJ);
STD_REF_DSETREG_ = new PredType(H5T_STD_REF_DSETREG);
IEEE_F32BE_ = new PredType(H5T_IEEE_F32BE);
@@ -371,84 +377,84 @@ void PredType::makePredTypes()
UNIX_D64BE_ = new PredType(H5T_UNIX_D64BE);
UNIX_D64LE_ = new PredType(H5T_UNIX_D64LE);
- INTEL_I8_ = new PredType(H5T_INTEL_I8);
+ INTEL_I8_ = new PredType(H5T_INTEL_I8);
INTEL_I16_ = new PredType(H5T_INTEL_I16);
INTEL_I32_ = new PredType(H5T_INTEL_I32);
INTEL_I64_ = new PredType(H5T_INTEL_I64);
- INTEL_U8_ = new PredType(H5T_INTEL_U8);
+ INTEL_U8_ = new PredType(H5T_INTEL_U8);
INTEL_U16_ = new PredType(H5T_INTEL_U16);
INTEL_U32_ = new PredType(H5T_INTEL_U32);
INTEL_U64_ = new PredType(H5T_INTEL_U64);
- INTEL_B8_ = new PredType(H5T_INTEL_B8);
+ INTEL_B8_ = new PredType(H5T_INTEL_B8);
INTEL_B16_ = new PredType(H5T_INTEL_B16);
INTEL_B32_ = new PredType(H5T_INTEL_B32);
INTEL_B64_ = new PredType(H5T_INTEL_B64);
INTEL_F32_ = new PredType(H5T_INTEL_F32);
INTEL_F64_ = new PredType(H5T_INTEL_F64);
- ALPHA_I8_ = new PredType(H5T_ALPHA_I8);
+ ALPHA_I8_ = new PredType(H5T_ALPHA_I8);
ALPHA_I16_ = new PredType(H5T_ALPHA_I16);
ALPHA_I32_ = new PredType(H5T_ALPHA_I32);
ALPHA_I64_ = new PredType(H5T_ALPHA_I64);
- ALPHA_U8_ = new PredType(H5T_ALPHA_U8);
+ ALPHA_U8_ = new PredType(H5T_ALPHA_U8);
ALPHA_U16_ = new PredType(H5T_ALPHA_U16);
ALPHA_U32_ = new PredType(H5T_ALPHA_U32);
ALPHA_U64_ = new PredType(H5T_ALPHA_U64);
- ALPHA_B8_ = new PredType(H5T_ALPHA_B8);
+ ALPHA_B8_ = new PredType(H5T_ALPHA_B8);
ALPHA_B16_ = new PredType(H5T_ALPHA_B16);
ALPHA_B32_ = new PredType(H5T_ALPHA_B32);
ALPHA_B64_ = new PredType(H5T_ALPHA_B64);
ALPHA_F32_ = new PredType(H5T_ALPHA_F32);
ALPHA_F64_ = new PredType(H5T_ALPHA_F64);
- MIPS_I8_ = new PredType(H5T_MIPS_I8);
+ MIPS_I8_ = new PredType(H5T_MIPS_I8);
MIPS_I16_ = new PredType(H5T_MIPS_I16);
MIPS_I32_ = new PredType(H5T_MIPS_I32);
MIPS_I64_ = new PredType(H5T_MIPS_I64);
- MIPS_U8_ = new PredType(H5T_MIPS_U8);
+ MIPS_U8_ = new PredType(H5T_MIPS_U8);
MIPS_U16_ = new PredType(H5T_MIPS_U16);
MIPS_U32_ = new PredType(H5T_MIPS_U32);
MIPS_U64_ = new PredType(H5T_MIPS_U64);
- MIPS_B8_ = new PredType(H5T_MIPS_B8);
+ MIPS_B8_ = new PredType(H5T_MIPS_B8);
MIPS_B16_ = new PredType(H5T_MIPS_B16);
MIPS_B32_ = new PredType(H5T_MIPS_B32);
MIPS_B64_ = new PredType(H5T_MIPS_B64);
MIPS_F32_ = new PredType(H5T_MIPS_F32);
MIPS_F64_ = new PredType(H5T_MIPS_F64);
- NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR);
- NATIVE_INT_ = new PredType(H5T_NATIVE_INT);
- NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT);
- NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR);
- NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR);
- NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT);
+ NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR);
+ NATIVE_INT_ = new PredType(H5T_NATIVE_INT);
+ NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT);
+ NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR);
+ NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR);
+ NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT);
NATIVE_USHORT_ = new PredType(H5T_NATIVE_USHORT);
- NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT);
- NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG);
- NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG);
- NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG);
+ NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT);
+ NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG);
+ NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG);
+ NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG);
NATIVE_ULLONG_ = new PredType(H5T_NATIVE_ULLONG);
NATIVE_DOUBLE_ = new PredType(H5T_NATIVE_DOUBLE);
-#if H5_SIZEOF_LONG_DOUBLE !=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
NATIVE_LDOUBLE_ = new PredType(H5T_NATIVE_LDOUBLE);
#endif
- NATIVE_B8_ = new PredType(H5T_NATIVE_B8);
- NATIVE_B16_ = new PredType(H5T_NATIVE_B16);
- NATIVE_B32_ = new PredType(H5T_NATIVE_B32);
- NATIVE_B64_ = new PredType(H5T_NATIVE_B64);
+ NATIVE_B8_ = new PredType(H5T_NATIVE_B8);
+ NATIVE_B16_ = new PredType(H5T_NATIVE_B16);
+ NATIVE_B32_ = new PredType(H5T_NATIVE_B32);
+ NATIVE_B64_ = new PredType(H5T_NATIVE_B64);
NATIVE_OPAQUE_ = new PredType(H5T_NATIVE_OPAQUE);
- NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE);
+ NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE);
NATIVE_HSSIZE_ = new PredType(H5T_NATIVE_HSSIZE);
- NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR);
- NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL);
+ NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR);
+ NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL);
- NATIVE_INT8_ = new PredType(H5T_NATIVE_INT8);
- NATIVE_UINT8_ = new PredType(H5T_NATIVE_UINT8);
- NATIVE_INT16_ = new PredType(H5T_NATIVE_INT16);
+ NATIVE_INT8_ = new PredType(H5T_NATIVE_INT8);
+ NATIVE_UINT8_ = new PredType(H5T_NATIVE_UINT8);
+ NATIVE_INT16_ = new PredType(H5T_NATIVE_INT16);
NATIVE_UINT16_ = new PredType(H5T_NATIVE_UINT16);
- NATIVE_INT32_ = new PredType(H5T_NATIVE_INT32);
+ NATIVE_INT32_ = new PredType(H5T_NATIVE_INT32);
NATIVE_UINT32_ = new PredType(H5T_NATIVE_UINT32);
- NATIVE_INT64_ = new PredType(H5T_NATIVE_INT64);
+ NATIVE_INT64_ = new PredType(H5T_NATIVE_INT64);
NATIVE_UINT64_ = new PredType(H5T_NATIVE_UINT64);
// LEAST types
@@ -511,13 +517,13 @@ void PredType::makePredTypes()
} // makePredTypes
-
//--------------------------------------------------------------------------
// Function: PredType::deleteConstants
// Purpose: Deletes all PredType constant pointers.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void PredType::deleteConstants()
+void
+PredType::deleteConstants()
{
delete STD_I8BE_;
delete STD_I8LE_;
@@ -707,186 +713,186 @@ void PredType::deleteConstants()
// PredType constants. Note that, there is a similar function to getPredTypes()
// in other classes, that have global constants, is called getConstant().
-const PredType& PredType::PREDTYPE_CONST = *PredType::getPredTypes();
-const PredType& PredType::STD_I8BE = *STD_I8BE_;
-const PredType& PredType::STD_I8LE = *STD_I8LE_;
-const PredType& PredType::STD_I16BE = *STD_I16BE_;
-const PredType& PredType::STD_I16LE = *STD_I16LE_;
-const PredType& PredType::STD_I32BE = *STD_I32BE_;
-const PredType& PredType::STD_I32LE = *STD_I32LE_;
-const PredType& PredType::STD_I64BE = *STD_I64BE_;
-const PredType& PredType::STD_I64LE = *STD_I64LE_;
-const PredType& PredType::STD_U8BE = *STD_U8BE_;
-const PredType& PredType::STD_U8LE = *STD_U8LE_;
-const PredType& PredType::STD_U16BE = *STD_U16BE_;
-const PredType& PredType::STD_U16LE = *STD_U16LE_;
-const PredType& PredType::STD_U32BE = *STD_U32BE_;
-const PredType& PredType::STD_U32LE = *STD_U32LE_;
-const PredType& PredType::STD_U64BE = *STD_U64BE_;
-const PredType& PredType::STD_U64LE = *STD_U64LE_;
-const PredType& PredType::STD_B8BE = *STD_B8BE_;
-const PredType& PredType::STD_B8LE = *STD_B8LE_;
-const PredType& PredType::STD_B16BE = *STD_B16BE_;
-const PredType& PredType::STD_B16LE = *STD_B16LE_;
-const PredType& PredType::STD_B32BE = *STD_B32BE_;
-const PredType& PredType::STD_B32LE = *STD_B32LE_;
-const PredType& PredType::STD_B64BE = *STD_B64BE_;
-const PredType& PredType::STD_B64LE = *STD_B64LE_;
-const PredType& PredType::STD_REF_OBJ = *STD_REF_OBJ_;
-const PredType& PredType::STD_REF_DSETREG = *STD_REF_DSETREG_;
-
-const PredType& PredType::C_S1 = *C_S1_;
-const PredType& PredType::FORTRAN_S1 = *FORTRAN_S1_;
-
-const PredType& PredType::IEEE_F32BE = *IEEE_F32BE_;
-const PredType& PredType::IEEE_F32LE = *IEEE_F32LE_;
-const PredType& PredType::IEEE_F64BE = *IEEE_F64BE_;
-const PredType& PredType::IEEE_F64LE = *IEEE_F64LE_;
-
-const PredType& PredType::UNIX_D32BE = *UNIX_D32BE_;
-const PredType& PredType::UNIX_D32LE = *UNIX_D32LE_;
-const PredType& PredType::UNIX_D64BE = *UNIX_D64BE_;
-const PredType& PredType::UNIX_D64LE = *UNIX_D64LE_;
-
-const PredType& PredType::INTEL_I8 = *INTEL_I8_;
-const PredType& PredType::INTEL_I16 = *INTEL_I16_;
-const PredType& PredType::INTEL_I32 = *INTEL_I32_;
-const PredType& PredType::INTEL_I64 = *INTEL_I64_;
-const PredType& PredType::INTEL_U8 = *INTEL_U8_;
-const PredType& PredType::INTEL_U16 = *INTEL_U16_;
-const PredType& PredType::INTEL_U32 = *INTEL_U32_;
-const PredType& PredType::INTEL_U64 = *INTEL_U64_;
-const PredType& PredType::INTEL_B8 = *INTEL_B8_;
-const PredType& PredType::INTEL_B16 = *INTEL_B16_;
-const PredType& PredType::INTEL_B32 = *INTEL_B32_;
-const PredType& PredType::INTEL_B64 = *INTEL_B64_;
-const PredType& PredType::INTEL_F32 = *INTEL_F32_;
-const PredType& PredType::INTEL_F64 = *INTEL_F64_;
-
-const PredType& PredType::ALPHA_I8 = *ALPHA_I8_;
-const PredType& PredType::ALPHA_I16 = *ALPHA_I16_;
-const PredType& PredType::ALPHA_I32 = *ALPHA_I32_;
-const PredType& PredType::ALPHA_I64 = *ALPHA_I64_;
-const PredType& PredType::ALPHA_U8 = *ALPHA_U8_;
-const PredType& PredType::ALPHA_U16 = *ALPHA_U16_;
-const PredType& PredType::ALPHA_U32 = *ALPHA_U32_;
-const PredType& PredType::ALPHA_U64 = *ALPHA_U64_;
-const PredType& PredType::ALPHA_B8 = *ALPHA_B8_;
-const PredType& PredType::ALPHA_B16 = *ALPHA_B16_;
-const PredType& PredType::ALPHA_B32 = *ALPHA_B32_;
-const PredType& PredType::ALPHA_B64 = *ALPHA_B64_;
-const PredType& PredType::ALPHA_F32 = *ALPHA_F32_;
-const PredType& PredType::ALPHA_F64 = *ALPHA_F64_;
-
-const PredType& PredType::MIPS_I8 = *MIPS_I8_;
-const PredType& PredType::MIPS_I16 = *MIPS_I16_;
-const PredType& PredType::MIPS_I32 = *MIPS_I32_;
-const PredType& PredType::MIPS_I64 = *MIPS_I64_;
-const PredType& PredType::MIPS_U8 = *MIPS_U8_;
-const PredType& PredType::MIPS_U16 = *MIPS_U16_;
-const PredType& PredType::MIPS_U32 = *MIPS_U32_;
-const PredType& PredType::MIPS_U64 = *MIPS_U64_;
-const PredType& PredType::MIPS_B8 = *MIPS_B8_;
-const PredType& PredType::MIPS_B16 = *MIPS_B16_;
-const PredType& PredType::MIPS_B32 = *MIPS_B32_;
-const PredType& PredType::MIPS_B64 = *MIPS_B64_;
-const PredType& PredType::MIPS_F32 = *MIPS_F32_;
-const PredType& PredType::MIPS_F64 = *MIPS_F64_;
-
-const PredType& PredType::NATIVE_CHAR = *NATIVE_CHAR_;
-const PredType& PredType::NATIVE_SCHAR = *NATIVE_SCHAR_;
-const PredType& PredType::NATIVE_UCHAR = *NATIVE_UCHAR_;
-const PredType& PredType::NATIVE_SHORT = *NATIVE_SHORT_;
-const PredType& PredType::NATIVE_USHORT = *NATIVE_USHORT_;
-const PredType& PredType::NATIVE_INT = *NATIVE_INT_;
-const PredType& PredType::NATIVE_UINT = *NATIVE_UINT_;
-const PredType& PredType::NATIVE_LONG = *NATIVE_LONG_;
-const PredType& PredType::NATIVE_ULONG = *NATIVE_ULONG_;
-const PredType& PredType::NATIVE_LLONG = *NATIVE_LLONG_;
-const PredType& PredType::NATIVE_ULLONG = *NATIVE_ULLONG_;
-const PredType& PredType::NATIVE_FLOAT = *NATIVE_FLOAT_;
-const PredType& PredType::NATIVE_DOUBLE = *NATIVE_DOUBLE_;
-const PredType& PredType::NATIVE_LDOUBLE = *NATIVE_LDOUBLE_;
-const PredType& PredType::NATIVE_B8 = *NATIVE_B8_;
-const PredType& PredType::NATIVE_B16 = *NATIVE_B16_;
-const PredType& PredType::NATIVE_B32 = *NATIVE_B32_;
-const PredType& PredType::NATIVE_B64 = *NATIVE_B64_;
-const PredType& PredType::NATIVE_OPAQUE = *NATIVE_OPAQUE_;
-const PredType& PredType::NATIVE_HSIZE = *NATIVE_HSIZE_;
-const PredType& PredType::NATIVE_HSSIZE = *NATIVE_HSSIZE_;
-const PredType& PredType::NATIVE_HERR = *NATIVE_HERR_;
-const PredType& PredType::NATIVE_HBOOL = *NATIVE_HBOOL_;
-
-const PredType& PredType::NATIVE_INT8 = *NATIVE_INT8_;
-const PredType& PredType::NATIVE_UINT8 = *NATIVE_UINT8_;
-const PredType& PredType::NATIVE_INT16 = *NATIVE_INT16_;
-const PredType& PredType::NATIVE_UINT16 = *NATIVE_UINT16_;
-const PredType& PredType::NATIVE_INT32 = *NATIVE_INT32_;
-const PredType& PredType::NATIVE_UINT32 = *NATIVE_UINT32_;
-const PredType& PredType::NATIVE_INT64 = *NATIVE_INT64_;
-const PredType& PredType::NATIVE_UINT64 = *NATIVE_UINT64_;
+const PredType &PredType::PREDTYPE_CONST = *PredType::getPredTypes();
+const PredType &PredType::STD_I8BE = *STD_I8BE_;
+const PredType &PredType::STD_I8LE = *STD_I8LE_;
+const PredType &PredType::STD_I16BE = *STD_I16BE_;
+const PredType &PredType::STD_I16LE = *STD_I16LE_;
+const PredType &PredType::STD_I32BE = *STD_I32BE_;
+const PredType &PredType::STD_I32LE = *STD_I32LE_;
+const PredType &PredType::STD_I64BE = *STD_I64BE_;
+const PredType &PredType::STD_I64LE = *STD_I64LE_;
+const PredType &PredType::STD_U8BE = *STD_U8BE_;
+const PredType &PredType::STD_U8LE = *STD_U8LE_;
+const PredType &PredType::STD_U16BE = *STD_U16BE_;
+const PredType &PredType::STD_U16LE = *STD_U16LE_;
+const PredType &PredType::STD_U32BE = *STD_U32BE_;
+const PredType &PredType::STD_U32LE = *STD_U32LE_;
+const PredType &PredType::STD_U64BE = *STD_U64BE_;
+const PredType &PredType::STD_U64LE = *STD_U64LE_;
+const PredType &PredType::STD_B8BE = *STD_B8BE_;
+const PredType &PredType::STD_B8LE = *STD_B8LE_;
+const PredType &PredType::STD_B16BE = *STD_B16BE_;
+const PredType &PredType::STD_B16LE = *STD_B16LE_;
+const PredType &PredType::STD_B32BE = *STD_B32BE_;
+const PredType &PredType::STD_B32LE = *STD_B32LE_;
+const PredType &PredType::STD_B64BE = *STD_B64BE_;
+const PredType &PredType::STD_B64LE = *STD_B64LE_;
+const PredType &PredType::STD_REF_OBJ = *STD_REF_OBJ_;
+const PredType &PredType::STD_REF_DSETREG = *STD_REF_DSETREG_;
+
+const PredType &PredType::C_S1 = *C_S1_;
+const PredType &PredType::FORTRAN_S1 = *FORTRAN_S1_;
+
+const PredType &PredType::IEEE_F32BE = *IEEE_F32BE_;
+const PredType &PredType::IEEE_F32LE = *IEEE_F32LE_;
+const PredType &PredType::IEEE_F64BE = *IEEE_F64BE_;
+const PredType &PredType::IEEE_F64LE = *IEEE_F64LE_;
+
+const PredType &PredType::UNIX_D32BE = *UNIX_D32BE_;
+const PredType &PredType::UNIX_D32LE = *UNIX_D32LE_;
+const PredType &PredType::UNIX_D64BE = *UNIX_D64BE_;
+const PredType &PredType::UNIX_D64LE = *UNIX_D64LE_;
+
+const PredType &PredType::INTEL_I8 = *INTEL_I8_;
+const PredType &PredType::INTEL_I16 = *INTEL_I16_;
+const PredType &PredType::INTEL_I32 = *INTEL_I32_;
+const PredType &PredType::INTEL_I64 = *INTEL_I64_;
+const PredType &PredType::INTEL_U8 = *INTEL_U8_;
+const PredType &PredType::INTEL_U16 = *INTEL_U16_;
+const PredType &PredType::INTEL_U32 = *INTEL_U32_;
+const PredType &PredType::INTEL_U64 = *INTEL_U64_;
+const PredType &PredType::INTEL_B8 = *INTEL_B8_;
+const PredType &PredType::INTEL_B16 = *INTEL_B16_;
+const PredType &PredType::INTEL_B32 = *INTEL_B32_;
+const PredType &PredType::INTEL_B64 = *INTEL_B64_;
+const PredType &PredType::INTEL_F32 = *INTEL_F32_;
+const PredType &PredType::INTEL_F64 = *INTEL_F64_;
+
+const PredType &PredType::ALPHA_I8 = *ALPHA_I8_;
+const PredType &PredType::ALPHA_I16 = *ALPHA_I16_;
+const PredType &PredType::ALPHA_I32 = *ALPHA_I32_;
+const PredType &PredType::ALPHA_I64 = *ALPHA_I64_;
+const PredType &PredType::ALPHA_U8 = *ALPHA_U8_;
+const PredType &PredType::ALPHA_U16 = *ALPHA_U16_;
+const PredType &PredType::ALPHA_U32 = *ALPHA_U32_;
+const PredType &PredType::ALPHA_U64 = *ALPHA_U64_;
+const PredType &PredType::ALPHA_B8 = *ALPHA_B8_;
+const PredType &PredType::ALPHA_B16 = *ALPHA_B16_;
+const PredType &PredType::ALPHA_B32 = *ALPHA_B32_;
+const PredType &PredType::ALPHA_B64 = *ALPHA_B64_;
+const PredType &PredType::ALPHA_F32 = *ALPHA_F32_;
+const PredType &PredType::ALPHA_F64 = *ALPHA_F64_;
+
+const PredType &PredType::MIPS_I8 = *MIPS_I8_;
+const PredType &PredType::MIPS_I16 = *MIPS_I16_;
+const PredType &PredType::MIPS_I32 = *MIPS_I32_;
+const PredType &PredType::MIPS_I64 = *MIPS_I64_;
+const PredType &PredType::MIPS_U8 = *MIPS_U8_;
+const PredType &PredType::MIPS_U16 = *MIPS_U16_;
+const PredType &PredType::MIPS_U32 = *MIPS_U32_;
+const PredType &PredType::MIPS_U64 = *MIPS_U64_;
+const PredType &PredType::MIPS_B8 = *MIPS_B8_;
+const PredType &PredType::MIPS_B16 = *MIPS_B16_;
+const PredType &PredType::MIPS_B32 = *MIPS_B32_;
+const PredType &PredType::MIPS_B64 = *MIPS_B64_;
+const PredType &PredType::MIPS_F32 = *MIPS_F32_;
+const PredType &PredType::MIPS_F64 = *MIPS_F64_;
+
+const PredType &PredType::NATIVE_CHAR = *NATIVE_CHAR_;
+const PredType &PredType::NATIVE_SCHAR = *NATIVE_SCHAR_;
+const PredType &PredType::NATIVE_UCHAR = *NATIVE_UCHAR_;
+const PredType &PredType::NATIVE_SHORT = *NATIVE_SHORT_;
+const PredType &PredType::NATIVE_USHORT = *NATIVE_USHORT_;
+const PredType &PredType::NATIVE_INT = *NATIVE_INT_;
+const PredType &PredType::NATIVE_UINT = *NATIVE_UINT_;
+const PredType &PredType::NATIVE_LONG = *NATIVE_LONG_;
+const PredType &PredType::NATIVE_ULONG = *NATIVE_ULONG_;
+const PredType &PredType::NATIVE_LLONG = *NATIVE_LLONG_;
+const PredType &PredType::NATIVE_ULLONG = *NATIVE_ULLONG_;
+const PredType &PredType::NATIVE_FLOAT = *NATIVE_FLOAT_;
+const PredType &PredType::NATIVE_DOUBLE = *NATIVE_DOUBLE_;
+const PredType &PredType::NATIVE_LDOUBLE = *NATIVE_LDOUBLE_;
+const PredType &PredType::NATIVE_B8 = *NATIVE_B8_;
+const PredType &PredType::NATIVE_B16 = *NATIVE_B16_;
+const PredType &PredType::NATIVE_B32 = *NATIVE_B32_;
+const PredType &PredType::NATIVE_B64 = *NATIVE_B64_;
+const PredType &PredType::NATIVE_OPAQUE = *NATIVE_OPAQUE_;
+const PredType &PredType::NATIVE_HSIZE = *NATIVE_HSIZE_;
+const PredType &PredType::NATIVE_HSSIZE = *NATIVE_HSSIZE_;
+const PredType &PredType::NATIVE_HERR = *NATIVE_HERR_;
+const PredType &PredType::NATIVE_HBOOL = *NATIVE_HBOOL_;
+
+const PredType &PredType::NATIVE_INT8 = *NATIVE_INT8_;
+const PredType &PredType::NATIVE_UINT8 = *NATIVE_UINT8_;
+const PredType &PredType::NATIVE_INT16 = *NATIVE_INT16_;
+const PredType &PredType::NATIVE_UINT16 = *NATIVE_UINT16_;
+const PredType &PredType::NATIVE_INT32 = *NATIVE_INT32_;
+const PredType &PredType::NATIVE_UINT32 = *NATIVE_UINT32_;
+const PredType &PredType::NATIVE_INT64 = *NATIVE_INT64_;
+const PredType &PredType::NATIVE_UINT64 = *NATIVE_UINT64_;
// LEAST types
#if H5_SIZEOF_INT_LEAST8_T != 0
-const PredType& PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_;
+const PredType &PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_;
#endif /* H5_SIZEOF_INT_LEAST8_T */
#if H5_SIZEOF_UINT_LEAST8_T != 0
-const PredType& PredType::NATIVE_UINT_LEAST8 = *NATIVE_UINT_LEAST8_;
+const PredType &PredType::NATIVE_UINT_LEAST8 = *NATIVE_UINT_LEAST8_;
#endif /* H5_SIZEOF_UINT_LEAST8_T */
#if H5_SIZEOF_INT_LEAST16_T != 0
-const PredType& PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_;
+const PredType &PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_;
#endif /* H5_SIZEOF_INT_LEAST16_T */
#if H5_SIZEOF_UINT_LEAST16_T != 0
-const PredType& PredType::NATIVE_UINT_LEAST16 = *NATIVE_UINT_LEAST16_;
+const PredType &PredType::NATIVE_UINT_LEAST16 = *NATIVE_UINT_LEAST16_;
#endif /* H5_SIZEOF_UINT_LEAST16_T */
#if H5_SIZEOF_INT_LEAST32_T != 0
-const PredType& PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_;
+const PredType &PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_;
#endif /* H5_SIZEOF_INT_LEAST32_T */
#if H5_SIZEOF_UINT_LEAST32_T != 0
-const PredType& PredType::NATIVE_UINT_LEAST32 = *NATIVE_UINT_LEAST32_;
+const PredType &PredType::NATIVE_UINT_LEAST32 = *NATIVE_UINT_LEAST32_;
#endif /* H5_SIZEOF_UINT_LEAST32_T */
#if H5_SIZEOF_INT_LEAST64_T != 0
-const PredType& PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_;
+const PredType &PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_;
#endif /* H5_SIZEOF_INT_LEAST64_T */
#if H5_SIZEOF_UINT_LEAST64_T != 0
-const PredType& PredType::NATIVE_UINT_LEAST64 = *NATIVE_UINT_LEAST64_;
+const PredType &PredType::NATIVE_UINT_LEAST64 = *NATIVE_UINT_LEAST64_;
#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
#if H5_SIZEOF_INT_FAST8_T != 0
-const PredType& PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_;
+const PredType &PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_;
#endif /* H5_SIZEOF_INT_FAST8_T */
#if H5_SIZEOF_UINT_FAST8_T != 0
-const PredType& PredType::NATIVE_UINT_FAST8 = *NATIVE_UINT_FAST8_;
+const PredType &PredType::NATIVE_UINT_FAST8 = *NATIVE_UINT_FAST8_;
#endif /* H5_SIZEOF_UINT_FAST8_T */
#if H5_SIZEOF_INT_FAST16_T != 0
-const PredType& PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_;
+const PredType &PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_;
#endif /* H5_SIZEOF_INT_FAST16_T */
#if H5_SIZEOF_UINT_FAST16_T != 0
-const PredType& PredType::NATIVE_UINT_FAST16 = *NATIVE_UINT_FAST16_;
+const PredType &PredType::NATIVE_UINT_FAST16 = *NATIVE_UINT_FAST16_;
#endif /* H5_SIZEOF_UINT_FAST16_T */
#if H5_SIZEOF_INT_FAST32_T != 0
-const PredType& PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_;
+const PredType &PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_;
#endif /* H5_SIZEOF_INT_FAST32_T */
#if H5_SIZEOF_UINT_FAST32_T != 0
-const PredType& PredType::NATIVE_UINT_FAST32 = *NATIVE_UINT_FAST32_;
+const PredType &PredType::NATIVE_UINT_FAST32 = *NATIVE_UINT_FAST32_;
#endif /* H5_SIZEOF_UINT_FAST32_T */
#if H5_SIZEOF_INT_FAST64_T != 0
-const PredType& PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_;
+const PredType &PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_;
#endif /* H5_SIZEOF_INT_FAST64_T */
#if H5_SIZEOF_UINT_FAST64_T != 0
-const PredType& PredType::NATIVE_UINT_FAST64 = *NATIVE_UINT_FAST64_;
+const PredType &PredType::NATIVE_UINT_FAST64 = *NATIVE_UINT_FAST64_;
#endif /* H5_SIZEOF_UINT_FAST64_T */
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5
/***************************************************************************
Design Note
@@ -917,7 +923,7 @@ September 2015:
+ FileCreatPropList
+ DSetMemXferPropList
+ DSetCreatPropList
-
+
The new method includes these main points:
@@ -1091,4 +1097,3 @@ September 2015:
using PropList's because of the class types and in favor of clarity.
****************************************************************************/
-
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index c631fb9..c9e3f12 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,412 +26,416 @@ namespace H5 {
*/
// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP PredType : public AtomType {
- public:
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("PredType"); }
-
- // Makes a copy of the predefined type and stores the new
- // id in the left hand side object.
- PredType& operator=(const PredType& rhs);
-
- // Copy constructor - makes copy of the original object
- PredType(const PredType& original);
-
- // Noop destructor
- virtual ~PredType();
-
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- void commit(H5Location& loc, const H5std_string& name);
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- void commit(H5Location& loc, const char* name);
- /*! \brief This dummy function do not inherit from DataType - it will
- throw a DataTypeIException if invoked.
- */
- bool committed();
-
- ///\brief PredType constants
- static const PredType& STD_I8BE;
- static const PredType& STD_I8LE;
- static const PredType& STD_I16BE;
- static const PredType& STD_I16LE;
- static const PredType& STD_I32BE;
- static const PredType& STD_I32LE;
- static const PredType& STD_I64BE;
- static const PredType& STD_I64LE;
- static const PredType& STD_U8BE;
- static const PredType& STD_U8LE;
- static const PredType& STD_U16BE;
- static const PredType& STD_U16LE;
- static const PredType& STD_U32BE;
- static const PredType& STD_U32LE;
- static const PredType& STD_U64BE;
- static const PredType& STD_U64LE;
- static const PredType& STD_B8BE;
- static const PredType& STD_B8LE;
- static const PredType& STD_B16BE;
- static const PredType& STD_B16LE;
- static const PredType& STD_B32BE;
- static const PredType& STD_B32LE;
- static const PredType& STD_B64BE;
- static const PredType& STD_B64LE;
- static const PredType& STD_REF_OBJ;
- static const PredType& STD_REF_DSETREG;
-
- static const PredType& C_S1;
- static const PredType& FORTRAN_S1;
-
- static const PredType& IEEE_F32BE;
- static const PredType& IEEE_F32LE;
- static const PredType& IEEE_F64BE;
- static const PredType& IEEE_F64LE;
-
- static const PredType& UNIX_D32BE;
- static const PredType& UNIX_D32LE;
- static const PredType& UNIX_D64BE;
- static const PredType& UNIX_D64LE;
-
- static const PredType& INTEL_I8;
- static const PredType& INTEL_I16;
- static const PredType& INTEL_I32;
- static const PredType& INTEL_I64;
- static const PredType& INTEL_U8;
- static const PredType& INTEL_U16;
- static const PredType& INTEL_U32;
- static const PredType& INTEL_U64;
- static const PredType& INTEL_B8;
- static const PredType& INTEL_B16;
- static const PredType& INTEL_B32;
- static const PredType& INTEL_B64;
- static const PredType& INTEL_F32;
- static const PredType& INTEL_F64;
-
- static const PredType& ALPHA_I8;
- static const PredType& ALPHA_I16;
- static const PredType& ALPHA_I32;
- static const PredType& ALPHA_I64;
- static const PredType& ALPHA_U8;
- static const PredType& ALPHA_U16;
- static const PredType& ALPHA_U32;
- static const PredType& ALPHA_U64;
- static const PredType& ALPHA_B8;
- static const PredType& ALPHA_B16;
- static const PredType& ALPHA_B32;
- static const PredType& ALPHA_B64;
- static const PredType& ALPHA_F32;
- static const PredType& ALPHA_F64;
-
- static const PredType& MIPS_I8;
- static const PredType& MIPS_I16;
- static const PredType& MIPS_I32;
- static const PredType& MIPS_I64;
- static const PredType& MIPS_U8;
- static const PredType& MIPS_U16;
- static const PredType& MIPS_U32;
- static const PredType& MIPS_U64;
- static const PredType& MIPS_B8;
- static const PredType& MIPS_B16;
- static const PredType& MIPS_B32;
- static const PredType& MIPS_B64;
- static const PredType& MIPS_F32;
- static const PredType& MIPS_F64;
-
- static const PredType& NATIVE_CHAR;
- static const PredType& NATIVE_SCHAR;
- static const PredType& NATIVE_UCHAR;
- static const PredType& NATIVE_SHORT;
- static const PredType& NATIVE_USHORT;
- static const PredType& NATIVE_INT;
- static const PredType& NATIVE_UINT;
- static const PredType& NATIVE_LONG;
- static const PredType& NATIVE_ULONG;
- static const PredType& NATIVE_LLONG;
- static const PredType& NATIVE_ULLONG;
- static const PredType& NATIVE_FLOAT;
- static const PredType& NATIVE_DOUBLE;
- static const PredType& NATIVE_LDOUBLE;
- static const PredType& NATIVE_B8;
- static const PredType& NATIVE_B16;
- static const PredType& NATIVE_B32;
- static const PredType& NATIVE_B64;
- static const PredType& NATIVE_OPAQUE;
- static const PredType& NATIVE_HSIZE;
- static const PredType& NATIVE_HSSIZE;
- static const PredType& NATIVE_HERR;
- static const PredType& NATIVE_HBOOL;
-
- static const PredType& NATIVE_INT8;
- static const PredType& NATIVE_UINT8;
- static const PredType& NATIVE_INT16;
- static const PredType& NATIVE_UINT16;
- static const PredType& NATIVE_INT32;
- static const PredType& NATIVE_UINT32;
- static const PredType& NATIVE_INT64;
- static const PredType& NATIVE_UINT64;
+ public:
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("PredType");
+ }
+
+ // Makes a copy of the predefined type and stores the new
+ // id in the left hand side object.
+ PredType &operator=(const PredType &rhs);
+
+ // Copy constructor - makes copy of the original object
+ PredType(const PredType &original);
+
+ // Noop destructor
+ virtual ~PredType();
+
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ void commit(H5Location &loc, const H5std_string &name);
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ void commit(H5Location &loc, const char *name);
+ /*! \brief This dummy function do not inherit from DataType - it will
+ throw a DataTypeIException if invoked.
+ */
+ bool committed();
+
+ ///\brief PredType constants
+ static const PredType &STD_I8BE;
+ static const PredType &STD_I8LE;
+ static const PredType &STD_I16BE;
+ static const PredType &STD_I16LE;
+ static const PredType &STD_I32BE;
+ static const PredType &STD_I32LE;
+ static const PredType &STD_I64BE;
+ static const PredType &STD_I64LE;
+ static const PredType &STD_U8BE;
+ static const PredType &STD_U8LE;
+ static const PredType &STD_U16BE;
+ static const PredType &STD_U16LE;
+ static const PredType &STD_U32BE;
+ static const PredType &STD_U32LE;
+ static const PredType &STD_U64BE;
+ static const PredType &STD_U64LE;
+ static const PredType &STD_B8BE;
+ static const PredType &STD_B8LE;
+ static const PredType &STD_B16BE;
+ static const PredType &STD_B16LE;
+ static const PredType &STD_B32BE;
+ static const PredType &STD_B32LE;
+ static const PredType &STD_B64BE;
+ static const PredType &STD_B64LE;
+ static const PredType &STD_REF_OBJ;
+ static const PredType &STD_REF_DSETREG;
+
+ static const PredType &C_S1;
+ static const PredType &FORTRAN_S1;
+
+ static const PredType &IEEE_F32BE;
+ static const PredType &IEEE_F32LE;
+ static const PredType &IEEE_F64BE;
+ static const PredType &IEEE_F64LE;
+
+ static const PredType &UNIX_D32BE;
+ static const PredType &UNIX_D32LE;
+ static const PredType &UNIX_D64BE;
+ static const PredType &UNIX_D64LE;
+
+ static const PredType &INTEL_I8;
+ static const PredType &INTEL_I16;
+ static const PredType &INTEL_I32;
+ static const PredType &INTEL_I64;
+ static const PredType &INTEL_U8;
+ static const PredType &INTEL_U16;
+ static const PredType &INTEL_U32;
+ static const PredType &INTEL_U64;
+ static const PredType &INTEL_B8;
+ static const PredType &INTEL_B16;
+ static const PredType &INTEL_B32;
+ static const PredType &INTEL_B64;
+ static const PredType &INTEL_F32;
+ static const PredType &INTEL_F64;
+
+ static const PredType &ALPHA_I8;
+ static const PredType &ALPHA_I16;
+ static const PredType &ALPHA_I32;
+ static const PredType &ALPHA_I64;
+ static const PredType &ALPHA_U8;
+ static const PredType &ALPHA_U16;
+ static const PredType &ALPHA_U32;
+ static const PredType &ALPHA_U64;
+ static const PredType &ALPHA_B8;
+ static const PredType &ALPHA_B16;
+ static const PredType &ALPHA_B32;
+ static const PredType &ALPHA_B64;
+ static const PredType &ALPHA_F32;
+ static const PredType &ALPHA_F64;
+
+ static const PredType &MIPS_I8;
+ static const PredType &MIPS_I16;
+ static const PredType &MIPS_I32;
+ static const PredType &MIPS_I64;
+ static const PredType &MIPS_U8;
+ static const PredType &MIPS_U16;
+ static const PredType &MIPS_U32;
+ static const PredType &MIPS_U64;
+ static const PredType &MIPS_B8;
+ static const PredType &MIPS_B16;
+ static const PredType &MIPS_B32;
+ static const PredType &MIPS_B64;
+ static const PredType &MIPS_F32;
+ static const PredType &MIPS_F64;
+
+ static const PredType &NATIVE_CHAR;
+ static const PredType &NATIVE_SCHAR;
+ static const PredType &NATIVE_UCHAR;
+ static const PredType &NATIVE_SHORT;
+ static const PredType &NATIVE_USHORT;
+ static const PredType &NATIVE_INT;
+ static const PredType &NATIVE_UINT;
+ static const PredType &NATIVE_LONG;
+ static const PredType &NATIVE_ULONG;
+ static const PredType &NATIVE_LLONG;
+ static const PredType &NATIVE_ULLONG;
+ static const PredType &NATIVE_FLOAT;
+ static const PredType &NATIVE_DOUBLE;
+ static const PredType &NATIVE_LDOUBLE;
+ static const PredType &NATIVE_B8;
+ static const PredType &NATIVE_B16;
+ static const PredType &NATIVE_B32;
+ static const PredType &NATIVE_B64;
+ static const PredType &NATIVE_OPAQUE;
+ static const PredType &NATIVE_HSIZE;
+ static const PredType &NATIVE_HSSIZE;
+ static const PredType &NATIVE_HERR;
+ static const PredType &NATIVE_HBOOL;
+
+ static const PredType &NATIVE_INT8;
+ static const PredType &NATIVE_UINT8;
+ static const PredType &NATIVE_INT16;
+ static const PredType &NATIVE_UINT16;
+ static const PredType &NATIVE_INT32;
+ static const PredType &NATIVE_UINT32;
+ static const PredType &NATIVE_INT64;
+ static const PredType &NATIVE_UINT64;
// LEAST types
#if H5_SIZEOF_INT_LEAST8_T != 0
- static const PredType& NATIVE_INT_LEAST8;
+ static const PredType &NATIVE_INT_LEAST8;
#endif /* H5_SIZEOF_INT_LEAST8_T */
#if H5_SIZEOF_UINT_LEAST8_T != 0
- static const PredType& NATIVE_UINT_LEAST8;
+ static const PredType &NATIVE_UINT_LEAST8;
#endif /* H5_SIZEOF_UINT_LEAST8_T */
#if H5_SIZEOF_INT_LEAST16_T != 0
- static const PredType& NATIVE_INT_LEAST16;
+ static const PredType &NATIVE_INT_LEAST16;
#endif /* H5_SIZEOF_INT_LEAST16_T */
#if H5_SIZEOF_UINT_LEAST16_T != 0
- static const PredType& NATIVE_UINT_LEAST16;
+ static const PredType &NATIVE_UINT_LEAST16;
#endif /* H5_SIZEOF_UINT_LEAST16_T */
#if H5_SIZEOF_INT_LEAST32_T != 0
- static const PredType& NATIVE_INT_LEAST32;
+ static const PredType &NATIVE_INT_LEAST32;
#endif /* H5_SIZEOF_INT_LEAST32_T */
#if H5_SIZEOF_UINT_LEAST32_T != 0
- static const PredType& NATIVE_UINT_LEAST32;
+ static const PredType &NATIVE_UINT_LEAST32;
#endif /* H5_SIZEOF_UINT_LEAST32_T */
#if H5_SIZEOF_INT_LEAST64_T != 0
- static const PredType& NATIVE_INT_LEAST64;
+ static const PredType &NATIVE_INT_LEAST64;
#endif /* H5_SIZEOF_INT_LEAST64_T */
#if H5_SIZEOF_UINT_LEAST64_T != 0
- static const PredType& NATIVE_UINT_LEAST64;
+ static const PredType &NATIVE_UINT_LEAST64;
#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
#if H5_SIZEOF_INT_FAST8_T != 0
- static const PredType& NATIVE_INT_FAST8;
+ static const PredType &NATIVE_INT_FAST8;
#endif /* H5_SIZEOF_INT_FAST8_T */
#if H5_SIZEOF_UINT_FAST8_T != 0
- static const PredType& NATIVE_UINT_FAST8;
+ static const PredType &NATIVE_UINT_FAST8;
#endif /* H5_SIZEOF_UINT_FAST8_T */
#if H5_SIZEOF_INT_FAST16_T != 0
- static const PredType& NATIVE_INT_FAST16;
+ static const PredType &NATIVE_INT_FAST16;
#endif /* H5_SIZEOF_INT_FAST16_T */
#if H5_SIZEOF_UINT_FAST16_T != 0
- static const PredType& NATIVE_UINT_FAST16;
+ static const PredType &NATIVE_UINT_FAST16;
#endif /* H5_SIZEOF_UINT_FAST16_T */
#if H5_SIZEOF_INT_FAST32_T != 0
- static const PredType& NATIVE_INT_FAST32;
+ static const PredType &NATIVE_INT_FAST32;
#endif /* H5_SIZEOF_INT_FAST32_T */
#if H5_SIZEOF_UINT_FAST32_T != 0
- static const PredType& NATIVE_UINT_FAST32;
+ static const PredType &NATIVE_UINT_FAST32;
#endif /* H5_SIZEOF_UINT_FAST32_T */
#if H5_SIZEOF_INT_FAST64_T != 0
- static const PredType& NATIVE_INT_FAST64;
+ static const PredType &NATIVE_INT_FAST64;
#endif /* H5_SIZEOF_INT_FAST64_T */
#if H5_SIZEOF_UINT_FAST64_T != 0
- static const PredType& NATIVE_UINT_FAST64;
+ static const PredType &NATIVE_UINT_FAST64;
#endif /* H5_SIZEOF_UINT_FAST64_T */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the PredType global constants
- static void deleteConstants();
-
- // Dummy constant
- static const PredType& PREDTYPE_CONST; // dummy constant
-
- protected:
- // Default constructor
- PredType();
-
- // Creates a pre-defined type using an HDF5 pre-defined constant
- PredType(const hid_t predtype_id); // used by the library only
-
- private:
- // Activates the creation of the PredType global constants
- static PredType* getPredTypes();
-
- // Dynamically allocates PredType global constants
- static void makePredTypes();
-
- // Dummy constant
- static PredType* PREDTYPE_CONST_;
-
- // Declaration of pointers to constants
- static PredType* STD_I8BE_;
- static PredType* STD_I8LE_;
- static PredType* STD_I16BE_;
- static PredType* STD_I16LE_;
- static PredType* STD_I32BE_;
- static PredType* STD_I32LE_;
- static PredType* STD_I64BE_;
- static PredType* STD_I64LE_;
- static PredType* STD_U8BE_;
- static PredType* STD_U8LE_;
- static PredType* STD_U16BE_;
- static PredType* STD_U16LE_;
- static PredType* STD_U32BE_;
- static PredType* STD_U32LE_;
- static PredType* STD_U64BE_;
- static PredType* STD_U64LE_;
- static PredType* STD_B8BE_;
- static PredType* STD_B8LE_;
- static PredType* STD_B16BE_;
- static PredType* STD_B16LE_;
- static PredType* STD_B32BE_;
- static PredType* STD_B32LE_;
- static PredType* STD_B64BE_;
- static PredType* STD_B64LE_;
- static PredType* STD_REF_OBJ_;
- static PredType* STD_REF_DSETREG_;
-
- static PredType* C_S1_;
- static PredType* FORTRAN_S1_;
-
- static PredType* IEEE_F32BE_;
- static PredType* IEEE_F32LE_;
- static PredType* IEEE_F64BE_;
- static PredType* IEEE_F64LE_;
-
- static PredType* UNIX_D32BE_;
- static PredType* UNIX_D32LE_;
- static PredType* UNIX_D64BE_;
- static PredType* UNIX_D64LE_;
-
- static PredType* INTEL_I8_;
- static PredType* INTEL_I16_;
- static PredType* INTEL_I32_;
- static PredType* INTEL_I64_;
- static PredType* INTEL_U8_;
- static PredType* INTEL_U16_;
- static PredType* INTEL_U32_;
- static PredType* INTEL_U64_;
- static PredType* INTEL_B8_;
- static PredType* INTEL_B16_;
- static PredType* INTEL_B32_;
- static PredType* INTEL_B64_;
- static PredType* INTEL_F32_;
- static PredType* INTEL_F64_;
-
- static PredType* ALPHA_I8_;
- static PredType* ALPHA_I16_;
- static PredType* ALPHA_I32_;
- static PredType* ALPHA_I64_;
- static PredType* ALPHA_U8_;
- static PredType* ALPHA_U16_;
- static PredType* ALPHA_U32_;
- static PredType* ALPHA_U64_;
- static PredType* ALPHA_B8_;
- static PredType* ALPHA_B16_;
- static PredType* ALPHA_B32_;
- static PredType* ALPHA_B64_;
- static PredType* ALPHA_F32_;
- static PredType* ALPHA_F64_;
-
- static PredType* MIPS_I8_;
- static PredType* MIPS_I16_;
- static PredType* MIPS_I32_;
- static PredType* MIPS_I64_;
- static PredType* MIPS_U8_;
- static PredType* MIPS_U16_;
- static PredType* MIPS_U32_;
- static PredType* MIPS_U64_;
- static PredType* MIPS_B8_;
- static PredType* MIPS_B16_;
- static PredType* MIPS_B32_;
- static PredType* MIPS_B64_;
- static PredType* MIPS_F32_;
- static PredType* MIPS_F64_;
-
- static PredType* NATIVE_CHAR_;
- static PredType* NATIVE_SCHAR_;
- static PredType* NATIVE_UCHAR_;
- static PredType* NATIVE_SHORT_;
- static PredType* NATIVE_USHORT_;
- static PredType* NATIVE_INT_;
- static PredType* NATIVE_UINT_;
- static PredType* NATIVE_LONG_;
- static PredType* NATIVE_ULONG_;
- static PredType* NATIVE_LLONG_;
- static PredType* NATIVE_ULLONG_;
- static PredType* NATIVE_FLOAT_;
- static PredType* NATIVE_DOUBLE_;
- static PredType* NATIVE_LDOUBLE_;
- static PredType* NATIVE_B8_;
- static PredType* NATIVE_B16_;
- static PredType* NATIVE_B32_;
- static PredType* NATIVE_B64_;
- static PredType* NATIVE_OPAQUE_;
- static PredType* NATIVE_HSIZE_;
- static PredType* NATIVE_HSSIZE_;
- static PredType* NATIVE_HERR_;
- static PredType* NATIVE_HBOOL_;
-
- static PredType* NATIVE_INT8_;
- static PredType* NATIVE_UINT8_;
- static PredType* NATIVE_INT16_;
- static PredType* NATIVE_UINT16_;
- static PredType* NATIVE_INT32_;
- static PredType* NATIVE_UINT32_;
- static PredType* NATIVE_INT64_;
- static PredType* NATIVE_UINT64_;
+ // Deletes the PredType global constants
+ static void deleteConstants();
+
+ // Dummy constant
+ static const PredType &PREDTYPE_CONST; // dummy constant
+
+ protected:
+ // Default constructor
+ PredType();
+
+ // Creates a pre-defined type using an HDF5 pre-defined constant
+ PredType(const hid_t predtype_id); // used by the library only
+
+ private:
+ // Activates the creation of the PredType global constants
+ static PredType *getPredTypes();
+
+ // Dynamically allocates PredType global constants
+ static void makePredTypes();
+
+ // Dummy constant
+ static PredType *PREDTYPE_CONST_;
+
+ // Declaration of pointers to constants
+ static PredType *STD_I8BE_;
+ static PredType *STD_I8LE_;
+ static PredType *STD_I16BE_;
+ static PredType *STD_I16LE_;
+ static PredType *STD_I32BE_;
+ static PredType *STD_I32LE_;
+ static PredType *STD_I64BE_;
+ static PredType *STD_I64LE_;
+ static PredType *STD_U8BE_;
+ static PredType *STD_U8LE_;
+ static PredType *STD_U16BE_;
+ static PredType *STD_U16LE_;
+ static PredType *STD_U32BE_;
+ static PredType *STD_U32LE_;
+ static PredType *STD_U64BE_;
+ static PredType *STD_U64LE_;
+ static PredType *STD_B8BE_;
+ static PredType *STD_B8LE_;
+ static PredType *STD_B16BE_;
+ static PredType *STD_B16LE_;
+ static PredType *STD_B32BE_;
+ static PredType *STD_B32LE_;
+ static PredType *STD_B64BE_;
+ static PredType *STD_B64LE_;
+ static PredType *STD_REF_OBJ_;
+ static PredType *STD_REF_DSETREG_;
+
+ static PredType *C_S1_;
+ static PredType *FORTRAN_S1_;
+
+ static PredType *IEEE_F32BE_;
+ static PredType *IEEE_F32LE_;
+ static PredType *IEEE_F64BE_;
+ static PredType *IEEE_F64LE_;
+
+ static PredType *UNIX_D32BE_;
+ static PredType *UNIX_D32LE_;
+ static PredType *UNIX_D64BE_;
+ static PredType *UNIX_D64LE_;
+
+ static PredType *INTEL_I8_;
+ static PredType *INTEL_I16_;
+ static PredType *INTEL_I32_;
+ static PredType *INTEL_I64_;
+ static PredType *INTEL_U8_;
+ static PredType *INTEL_U16_;
+ static PredType *INTEL_U32_;
+ static PredType *INTEL_U64_;
+ static PredType *INTEL_B8_;
+ static PredType *INTEL_B16_;
+ static PredType *INTEL_B32_;
+ static PredType *INTEL_B64_;
+ static PredType *INTEL_F32_;
+ static PredType *INTEL_F64_;
+
+ static PredType *ALPHA_I8_;
+ static PredType *ALPHA_I16_;
+ static PredType *ALPHA_I32_;
+ static PredType *ALPHA_I64_;
+ static PredType *ALPHA_U8_;
+ static PredType *ALPHA_U16_;
+ static PredType *ALPHA_U32_;
+ static PredType *ALPHA_U64_;
+ static PredType *ALPHA_B8_;
+ static PredType *ALPHA_B16_;
+ static PredType *ALPHA_B32_;
+ static PredType *ALPHA_B64_;
+ static PredType *ALPHA_F32_;
+ static PredType *ALPHA_F64_;
+
+ static PredType *MIPS_I8_;
+ static PredType *MIPS_I16_;
+ static PredType *MIPS_I32_;
+ static PredType *MIPS_I64_;
+ static PredType *MIPS_U8_;
+ static PredType *MIPS_U16_;
+ static PredType *MIPS_U32_;
+ static PredType *MIPS_U64_;
+ static PredType *MIPS_B8_;
+ static PredType *MIPS_B16_;
+ static PredType *MIPS_B32_;
+ static PredType *MIPS_B64_;
+ static PredType *MIPS_F32_;
+ static PredType *MIPS_F64_;
+
+ static PredType *NATIVE_CHAR_;
+ static PredType *NATIVE_SCHAR_;
+ static PredType *NATIVE_UCHAR_;
+ static PredType *NATIVE_SHORT_;
+ static PredType *NATIVE_USHORT_;
+ static PredType *NATIVE_INT_;
+ static PredType *NATIVE_UINT_;
+ static PredType *NATIVE_LONG_;
+ static PredType *NATIVE_ULONG_;
+ static PredType *NATIVE_LLONG_;
+ static PredType *NATIVE_ULLONG_;
+ static PredType *NATIVE_FLOAT_;
+ static PredType *NATIVE_DOUBLE_;
+ static PredType *NATIVE_LDOUBLE_;
+ static PredType *NATIVE_B8_;
+ static PredType *NATIVE_B16_;
+ static PredType *NATIVE_B32_;
+ static PredType *NATIVE_B64_;
+ static PredType *NATIVE_OPAQUE_;
+ static PredType *NATIVE_HSIZE_;
+ static PredType *NATIVE_HSSIZE_;
+ static PredType *NATIVE_HERR_;
+ static PredType *NATIVE_HBOOL_;
+
+ static PredType *NATIVE_INT8_;
+ static PredType *NATIVE_UINT8_;
+ static PredType *NATIVE_INT16_;
+ static PredType *NATIVE_UINT16_;
+ static PredType *NATIVE_INT32_;
+ static PredType *NATIVE_UINT32_;
+ static PredType *NATIVE_INT64_;
+ static PredType *NATIVE_UINT64_;
// LEAST types
#if H5_SIZEOF_INT_LEAST8_T != 0
- static PredType* NATIVE_INT_LEAST8_;
+ static PredType *NATIVE_INT_LEAST8_;
#endif /* H5_SIZEOF_INT_LEAST8_T */
#if H5_SIZEOF_UINT_LEAST8_T != 0
- static PredType* NATIVE_UINT_LEAST8_;
+ static PredType *NATIVE_UINT_LEAST8_;
#endif /* H5_SIZEOF_UINT_LEAST8_T */
#if H5_SIZEOF_INT_LEAST16_T != 0
- static PredType* NATIVE_INT_LEAST16_;
+ static PredType *NATIVE_INT_LEAST16_;
#endif /* H5_SIZEOF_INT_LEAST16_T */
#if H5_SIZEOF_UINT_LEAST16_T != 0
- static PredType* NATIVE_UINT_LEAST16_;
+ static PredType *NATIVE_UINT_LEAST16_;
#endif /* H5_SIZEOF_UINT_LEAST16_T */
#if H5_SIZEOF_INT_LEAST32_T != 0
- static PredType* NATIVE_INT_LEAST32_;
+ static PredType *NATIVE_INT_LEAST32_;
#endif /* H5_SIZEOF_INT_LEAST32_T */
#if H5_SIZEOF_UINT_LEAST32_T != 0
- static PredType* NATIVE_UINT_LEAST32_;
+ static PredType *NATIVE_UINT_LEAST32_;
#endif /* H5_SIZEOF_UINT_LEAST32_T */
#if H5_SIZEOF_INT_LEAST64_T != 0
- static PredType* NATIVE_INT_LEAST64_;
+ static PredType *NATIVE_INT_LEAST64_;
#endif /* H5_SIZEOF_INT_LEAST64_T */
#if H5_SIZEOF_UINT_LEAST64_T != 0
- static PredType* NATIVE_UINT_LEAST64_;
+ static PredType *NATIVE_UINT_LEAST64_;
#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
#if H5_SIZEOF_INT_FAST8_T != 0
- static PredType* NATIVE_INT_FAST8_;
+ static PredType *NATIVE_INT_FAST8_;
#endif /* H5_SIZEOF_INT_FAST8_T */
#if H5_SIZEOF_UINT_FAST8_T != 0
- static PredType* NATIVE_UINT_FAST8_;
+ static PredType *NATIVE_UINT_FAST8_;
#endif /* H5_SIZEOF_UINT_FAST8_T */
#if H5_SIZEOF_INT_FAST16_T != 0
- static PredType* NATIVE_INT_FAST16_;
+ static PredType *NATIVE_INT_FAST16_;
#endif /* H5_SIZEOF_INT_FAST16_T */
#if H5_SIZEOF_UINT_FAST16_T != 0
- static PredType* NATIVE_UINT_FAST16_;
+ static PredType *NATIVE_UINT_FAST16_;
#endif /* H5_SIZEOF_UINT_FAST16_T */
#if H5_SIZEOF_INT_FAST32_T != 0
- static PredType* NATIVE_INT_FAST32_;
+ static PredType *NATIVE_INT_FAST32_;
#endif /* H5_SIZEOF_INT_FAST32_T */
#if H5_SIZEOF_UINT_FAST32_T != 0
- static PredType* NATIVE_UINT_FAST32_;
+ static PredType *NATIVE_UINT_FAST32_;
#endif /* H5_SIZEOF_UINT_FAST32_T */
#if H5_SIZEOF_INT_FAST64_T != 0
- static PredType* NATIVE_INT_FAST64_;
+ static PredType *NATIVE_INT_FAST64_;
#endif /* H5_SIZEOF_INT_FAST64_T */
#if H5_SIZEOF_UINT_FAST64_T != 0
- static PredType* NATIVE_UINT_FAST64_;
+ static PredType *NATIVE_UINT_FAST64_;
#endif /* H5_SIZEOF_UINT_FAST64_T */
- // End of Declaration of pointers
+ // End of Declaration of pointers
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 13be182..da24904 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,18 +19,17 @@
#include <string>
-#include "H5private.h" // for HDmemset
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
-
-namespace H5{
+namespace H5 {
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
@@ -38,7 +37,7 @@ namespace H5{
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-PropList* PropList::DEFAULT_ = 0;
+PropList *PropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: PropList::getConstant
@@ -50,13 +49,13 @@ PropList* PropList::DEFAULT_ = 0;
// throw a PropListIException. This scenario should not happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-PropList* PropList::getConstant()
+PropList *
+PropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -65,8 +64,9 @@ PropList* PropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new PropList(H5P_DEFAULT);
else
- throw PropListIException("PropList::getConstant", "PropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("PropList::getConstant",
+ "PropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -74,7 +74,8 @@ PropList* PropList::getConstant()
// Purpose: Deletes the constant object that PropList::DEFAULT_ points to.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void PropList::deleteConstants()
+void
+PropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -83,7 +84,7 @@ void PropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose Constant for default property.
//--------------------------------------------------------------------------
-const PropList& PropList::DEFAULT = *getConstant();
+const PropList &PropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -100,7 +101,7 @@ PropList::PropList() : IdComponent(), id(H5P_DEFAULT) {}
///\param original - IN: The original property list to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PropList::PropList(const PropList& original) : IdComponent(), id(original.id)
+PropList::PropList(const PropList &original) : IdComponent(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -125,24 +126,22 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
H5I_type_t id_type = H5Iget_type(plist_id);
switch (id_type) {
case H5I_GENPROP_CLS:
- // call C routine to create a new property from the given prop class
- id = H5Pcreate(plist_id);
- if(id < 0)
- {
- throw PropListIException("PropList constructor", "H5Pcreate failed");
- }
- break;
+ // call C routine to create a new property from the given prop class
+ id = H5Pcreate(plist_id);
+ if (id < 0) {
+ throw PropListIException("PropList constructor", "H5Pcreate failed");
+ }
+ break;
case H5I_GENPROP_LST:
- // call C routine to make a copy of the given property list
- id = H5Pcopy(plist_id);
- if(id < 0)
- {
- throw PropListIException("PropList constructor", "H5Pcopy failed");
- }
- break;
+ // call C routine to make a copy of the given property list
+ id = H5Pcopy(plist_id);
+ if (id < 0) {
+ throw PropListIException("PropList constructor", "H5Pcopy failed");
+ }
+ break;
default:
- id = H5P_DEFAULT;
- break;
+ id = H5P_DEFAULT;
+ break;
}
}
@@ -158,20 +157,21 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
// - Replaced decRefCount with close() to let the C library
// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
-void PropList::copy(const PropList& like_plist)
+void
+PropList::copy(const PropList &like_plist)
{
// If this object is representing an hdf5 object, close it before
// copying like_plist to it
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw PropListIException(inMemFunc("copy"), close_error.getDetailMsg());
}
// call C routine to copy the property list
id = H5Pcopy(like_plist.getId());
- if(id < 0)
+ if (id < 0)
throw PropListIException(inMemFunc("copy"), "H5Pcopy failed");
}
@@ -186,11 +186,12 @@ void PropList::copy(const PropList& like_plist)
// and stores the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PropList& PropList::operator=(const PropList& rhs)
+PropList &
+PropList::operator=(const PropList &rhs)
{
if (this != &rhs)
copy(rhs);
- return(*this);
+ return (*this);
}
//--------------------------------------------------------------------------
@@ -201,12 +202,12 @@ PropList& PropList::operator=(const PropList& rhs)
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-void PropList::copyProp(PropList& dest, const char *name) const
+void
+PropList::copyProp(PropList &dest, const char *name) const
{
- hid_t dst_id = dest.getId();
+ hid_t dst_id = dest.getId();
herr_t ret_value = H5Pcopy_prop(dst_id, id, name);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("copyProp"), "H5Pcopy_prop failed");
}
}
@@ -220,9 +221,10 @@ void PropList::copyProp(PropList& dest, const char *name) const
///\param name - IN: Name of the property to copy - \c H5std_string
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
-void PropList::copyProp(PropList& dest, const H5std_string& name) const
+void
+PropList::copyProp(PropList &dest, const H5std_string &name) const
{
- copyProp(dest, name.c_str());
+ copyProp(dest, name.c_str());
}
//--------------------------------------------------------------------------
@@ -235,16 +237,15 @@ void PropList::copyProp(PropList& dest, const H5std_string& name) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void PropList::copyProp(PropList& dest, PropList& src, const char *name) const
+void
+PropList::copyProp(PropList &dest, PropList &src, const char *name) const
{
- hid_t dst_id = dest.getId();
- hid_t src_id = src.getId();
+ hid_t dst_id = dest.getId();
+ hid_t src_id = src.getId();
herr_t ret_value = H5Pcopy_prop(dst_id, src_id, name);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("copyProp"), "H5Pcopy_prop failed");
}
-
}
//--------------------------------------------------------------------------
@@ -257,7 +258,8 @@ void PropList::copyProp(PropList& dest, PropList& src, const char *name) const
///\param name - IN: Name of the property to copy - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void PropList::copyProp(PropList& dest, PropList& src, const H5std_string& name) const
+void
+PropList::copyProp(PropList &dest, PropList &src, const H5std_string &name) const
{
copyProp(dest, src, name.c_str());
}
@@ -273,9 +275,10 @@ void PropList::copyProp(PropList& dest, PropList& src, const H5std_string& name)
// IdComponent::getId now becomes pure virtual function.
// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
-hid_t PropList::getId() const
+hid_t
+PropList::getId() const
{
- return(id);
+ return (id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -291,13 +294,14 @@ hid_t PropList::getId() const
// Then the object's id is reset to the new id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void PropList::p_setId(const hid_t new_id)
+void
+PropList::p_setId(const hid_t new_id)
{
// handling references to this old id
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
throw PropListIException(inMemFunc("p_setId"), close_error.getDetailMsg());
}
// reset object's id to the given id
@@ -313,13 +317,12 @@ void PropList::p_setId(const hid_t new_id)
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
-void PropList::close()
+void
+PropList::close()
{
- if (p_valid_id(id))
- {
+ if (p_valid_id(id)) {
herr_t ret_value = H5Pclose(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("close"), "H5Pclose failed");
}
// reset the id
@@ -334,15 +337,14 @@ void PropList::close()
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-hid_t PropList::getClass() const
+hid_t
+PropList::getClass() const
{
hid_t plist_class = H5Pget_class(id);
- if(plist_class == H5P_ROOT)
- {
- throw PropListIException(inMemFunc("getClass"),
- "H5Pget_class failed - returned H5P_ROOT");
+ if (plist_class == H5P_ROOT) {
+ throw PropListIException(inMemFunc("getClass"), "H5Pget_class failed - returned H5P_ROOT");
}
- return(plist_class);
+ return (plist_class);
}
//--------------------------------------------------------------------------
@@ -357,15 +359,16 @@ hid_t PropList::getClass() const
/// list or class.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-bool PropList::propExist(const char* name) const
+bool
+PropList::propExist(const char *name) const
{
// Calls C routine H5Pexist to determine whether a property exists
// within a property list or class. It returns a positive value, 0,
// or a negative value
htri_t ret_value = H5Pexist(id, name);
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Pexist returns a negative value
{
@@ -380,9 +383,10 @@ bool PropList::propExist(const char* name) const
///\param name - IN: Name of property to check for - \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-bool PropList::propExist(const H5std_string& name) const
+bool
+PropList::propExist(const H5std_string &name) const
{
- return(propExist(name.c_str()));
+ return (propExist(name.c_str()));
}
//--------------------------------------------------------------------------
@@ -395,11 +399,11 @@ bool PropList::propExist(const H5std_string& name) const
/// list class hierarchy.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::closeClass() const
+void
+PropList::closeClass() const
{
herr_t ret_value = H5Pclose_class(id);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("closeClass"), "H5Pclose_class failed");
}
}
@@ -416,11 +420,11 @@ void PropList::closeClass() const
/// throw an exception.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::getProperty(const char* name, void* value) const
+void
+PropList::getProperty(const char *name, void *value) const
{
herr_t ret_value = H5Pget(id, name, value);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("getProperty"), "H5Pget failed");
}
}
@@ -434,27 +438,27 @@ void PropList::getProperty(const char* name, void* value) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5std_string PropList::getProperty(const char* name) const
+H5std_string
+PropList::getProperty(const char *name) const
{
// Get property size first
size_t size = getPropSize(name);
// Allocate buffer then get the property
- char* prop_strg_C = new char[size+1]; // temporary C-string for C API
- HDmemset(prop_strg_C, 0, size+1); // clear buffer
+ char *prop_strg_C = new char[size + 1]; // temporary C-string for C API
+ HDmemset(prop_strg_C, 0, size + 1); // clear buffer
herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API
// Throw exception if H5Pget returns failure
- if (ret_value < 0)
- {
- delete []prop_strg_C;
+ if (ret_value < 0) {
+ delete[] prop_strg_C;
throw PropListIException(inMemFunc("getProperty"), "H5Pget failed");
}
// Return propety value as a string after deleting temp C-string
H5std_string prop_strg(prop_strg_C);
- delete []prop_strg_C;
+ delete[] prop_strg_C;
return (prop_strg);
}
//--------------------------------------------------------------------------
@@ -466,7 +470,8 @@ H5std_string PropList::getProperty(const char* name) const
///\param value - OUT: Pointer to the buffer for the property value
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::getProperty(const H5std_string& name, void* value) const
+void
+PropList::getProperty(const H5std_string &name, void *value) const
{
getProperty(name.c_str(), value);
}
@@ -479,7 +484,8 @@ void PropList::getProperty(const H5std_string& name, void* value) const
///\return The property that is a \c H5std_string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5std_string PropList::getProperty(const H5std_string& name) const
+H5std_string
+PropList::getProperty(const H5std_string &name) const
{
return (getProperty(name.c_str()));
}
@@ -497,15 +503,15 @@ H5std_string PropList::getProperty(const H5std_string& name) const
/// lists and classes.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-size_t PropList::getPropSize(const char *name) const
+size_t
+PropList::getPropSize(const char *name) const
{
size_t prop_size;
herr_t ret_value = H5Pget_size(id, name, &prop_size);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("getPropSize"), "H5Pget_size failed");
}
- return(prop_size);
+ return (prop_size);
}
//--------------------------------------------------------------------------
// Function: PropList::getPropSize
@@ -516,7 +522,8 @@ size_t PropList::getPropSize(const char *name) const
///
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-size_t PropList::getPropSize(const H5std_string& name) const
+size_t
+PropList::getPropSize(const H5std_string &name) const
{
return (getPropSize(name.c_str()));
}
@@ -528,17 +535,17 @@ size_t PropList::getPropSize(const H5std_string& name) const
/// a NULL string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-H5std_string PropList::getClassName() const
+H5std_string
+PropList::getClassName() const
{
- char* temp_str;
+ char *temp_str;
temp_str = H5Pget_class_name(id); // this API specified that temp_str must
- // be freed.
+ // be freed.
- if (temp_str != NULL)
- {
+ if (temp_str != NULL) {
H5std_string class_name(temp_str);
H5free_memory(temp_str);
- return(class_name);
+ return (class_name);
}
else
return 0;
@@ -550,12 +557,12 @@ H5std_string PropList::getClassName() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-size_t PropList::getNumProps() const
+size_t
+PropList::getNumProps() const
{
size_t nprops;
- herr_t ret_value = H5Pget_nprops (id, &nprops);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Pget_nprops(id, &nprops);
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("getNumProps"), "H5Pget_nprops failed");
}
return (nprops);
@@ -569,11 +576,11 @@ size_t PropList::getNumProps() const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::setProperty(const char* name, void* value) const
+void
+PropList::setProperty(const char *name, void *value) const
{
herr_t ret_value = H5Pset(id, name, value);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
}
}
@@ -586,11 +593,11 @@ void PropList::setProperty(const char* name, void* value) const
///\param charptr - IN: Char pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::setProperty(const char* name, const char* charptr) const
+void
+PropList::setProperty(const char *name, const char *charptr) const
{
- herr_t ret_value = H5Pset(id, name, (void*)charptr);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Pset(id, name, (void *)charptr);
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
}
}
@@ -603,7 +610,8 @@ void PropList::setProperty(const char* name, const char* charptr) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::setProperty(const char* name, H5std_string& strg) const
+void
+PropList::setProperty(const char *name, H5std_string &strg) const
{
setProperty(name, strg.c_str());
}
@@ -617,7 +625,8 @@ void PropList::setProperty(const char* name, H5std_string& strg) const
///\param value - IN: Void pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::setProperty(const H5std_string& name, void* value) const
+void
+PropList::setProperty(const H5std_string &name, void *value) const
{
setProperty(name.c_str(), value);
}
@@ -631,7 +640,8 @@ void PropList::setProperty(const H5std_string& name, void* value) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
+void
+PropList::setProperty(const H5std_string &name, H5std_string &strg) const
{
setProperty(name.c_str(), strg.c_str());
}
@@ -645,18 +655,18 @@ void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-bool PropList::isAClass(const PropList& prop_class) const
+bool
+PropList::isAClass(const PropList &prop_class) const
{
htri_t ret_value = H5Pisa_class(id, prop_class.getId());
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Pisa_class returns a negative value
{
throw PropListIException(inMemFunc("isAClass"), "H5Pisa_class failed");
}
-
}
//--------------------------------------------------------------------------
@@ -666,11 +676,11 @@ bool PropList::isAClass(const PropList& prop_class) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::removeProp(const char *name) const
+void
+PropList::removeProp(const char *name) const
{
herr_t ret_value = H5Premove(id, name);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException(inMemFunc("removeProp"), "H5Premove failed");
}
}
@@ -683,7 +693,8 @@ void PropList::removeProp(const char *name) const
///\param name - IN: Name of property to remove - \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void PropList::removeProp(const H5std_string& name) const
+void
+PropList::removeProp(const H5std_string &name) const
{
removeProp(name.c_str());
}
@@ -697,12 +708,13 @@ void PropList::removeProp(const H5std_string& name) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-bool PropList::operator==(const PropList& rhs) const
+bool
+PropList::operator==(const PropList &rhs) const
{
htri_t ret_value = H5Pequal(id, rhs.getId());
- if(ret_value > 0)
+ if (ret_value > 0)
return true;
- else if(ret_value == 0)
+ else if (ret_value == 0)
return false;
else // Raise exception when H5Pequal returns a negative value
{
@@ -717,15 +729,15 @@ bool PropList::operator==(const PropList& rhs) const
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-PropList PropList::getClassParent() const
+PropList
+PropList::getClassParent() const
{
hid_t class_id = H5Pget_class_parent(id);
- if (class_id < 0)
- {
+ if (class_id < 0) {
throw PropListIException(inMemFunc("getClassParent"), "H5Pget_class_parent failed");
}
- PropList pclass(class_id);
- return(pclass);
+ PropList pclass(class_id);
+ return (pclass);
}
//--------------------------------------------------------------------------
@@ -743,8 +755,8 @@ PropList::~PropList()
try {
close();
}
- catch (Exception& close_error) {
+ catch (Exception &close_error) {
cerr << "PropList::~PropList - " << close_error.getDetailMsg() << endl;
}
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index 014b2c2..2f08332 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,116 +24,120 @@ namespace H5 {
*/
// Inheritance: IdComponent
class H5_DLLCPP PropList : public IdComponent {
- public:
- ///\brief Default property list
- static const PropList& DEFAULT;
+ public:
+ ///\brief Default property list
+ static const PropList &DEFAULT;
- // Creates a property list of a given type or creates a copy of an
- // existing property list giving the property list id.
- PropList(const hid_t plist_id);
+ // Creates a property list of a given type or creates a copy of an
+ // existing property list giving the property list id.
+ PropList(const hid_t plist_id);
- // Make a copy of the given property list using assignment statement
- PropList& operator=(const PropList& rhs);
+ // Make a copy of the given property list using assignment statement
+ PropList &operator=(const PropList &rhs);
- // Compares this property list or class against the given list or class.
- bool operator==(const PropList& rhs) const;
+ // Compares this property list or class against the given list or class.
+ bool operator==(const PropList &rhs) const;
- // Close this property list.
- virtual void close();
+ // Close this property list.
+ virtual void close();
- // Close a property list class.
- void closeClass() const;
+ // Close a property list class.
+ void closeClass() const;
- // Makes a copy of the given property list.
- void copy(const PropList& like_plist);
+ // Makes a copy of the given property list.
+ void copy(const PropList &like_plist);
- // Copies a property from this property list or class to another
- void copyProp(PropList& dest, const char* name) const;
- void copyProp(PropList& dest, const H5std_string& name) const;
+ // Copies a property from this property list or class to another
+ void copyProp(PropList &dest, const char *name) const;
+ void copyProp(PropList &dest, const H5std_string &name) const;
- // Copies a property from one property list or property class to another
- void copyProp(PropList& dest, PropList& src, const char* name) const;
- void copyProp(PropList& dest, PropList& src, const H5std_string& name) const;
+ // Copies a property from one property list or property class to another
+ void copyProp(PropList &dest, PropList &src, const char *name) const;
+ void copyProp(PropList &dest, PropList &src, const H5std_string &name) const;
- // Gets the class of this property list, i.e. H5P_FILE_CREATE,
- // H5P_FILE_ACCESS, ...
- hid_t getClass() const;
+ // Gets the class of this property list, i.e. H5P_FILE_CREATE,
+ // H5P_FILE_ACCESS, ...
+ hid_t getClass() const;
- // Return the name of a generic property list class.
- H5std_string getClassName() const;
+ // Return the name of a generic property list class.
+ H5std_string getClassName() const;
- // Returns the parent class of a generic property class.
- PropList getClassParent() const;
+ // Returns the parent class of a generic property class.
+ PropList getClassParent() const;
- // Returns the number of properties in this property list or class.
- size_t getNumProps() const;
+ // Returns the number of properties in this property list or class.
+ size_t getNumProps() const;
- // Query the value of a property in a property list.
- void getProperty(const char* name, void* value) const;
- void getProperty(const H5std_string& name, void* value) const;
- H5std_string getProperty(const char* name) const;
- H5std_string getProperty(const H5std_string& name) const;
+ // Query the value of a property in a property list.
+ void getProperty(const char *name, void *value) const;
+ void getProperty(const H5std_string &name, void *value) const;
+ H5std_string getProperty(const char *name) const;
+ H5std_string getProperty(const H5std_string &name) const;
- // Set a property's value in a property list.
- void setProperty(const char* name, void* value) const;
- void setProperty(const char* name, const char* charptr) const;
- void setProperty(const char* name, H5std_string& strg) const;
- void setProperty(const H5std_string& name, void* value) const;
- void setProperty(const H5std_string& name, H5std_string& strg) const;
+ // Set a property's value in a property list.
+ void setProperty(const char *name, void *value) const;
+ void setProperty(const char *name, const char *charptr) const;
+ void setProperty(const char *name, H5std_string &strg) const;
+ void setProperty(const H5std_string &name, void *value) const;
+ void setProperty(const H5std_string &name, H5std_string &strg) const;
- // Query the size of a property in a property list or class.
- size_t getPropSize(const char *name) const;
- size_t getPropSize(const H5std_string& name) const;
+ // Query the size of a property in a property list or class.
+ size_t getPropSize(const char *name) const;
+ size_t getPropSize(const H5std_string &name) const;
- // Determines whether a property list is a certain class.
- bool isAClass(const PropList& prop_class) const;
+ // Determines whether a property list is a certain class.
+ bool isAClass(const PropList &prop_class) const;
- /// Query the existance of a property in a property object.
- bool propExist(const char* name) const;
- bool propExist(const H5std_string& name) const;
+ /// Query the existance of a property in a property object.
+ bool propExist(const char *name) const;
+ bool propExist(const H5std_string &name) const;
- // Removes a property from a property list.
- void removeProp(const char *name) const;
- void removeProp(const H5std_string& name) const;
+ // Removes a property from a property list.
+ void removeProp(const char *name) const;
+ void removeProp(const H5std_string &name) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("PropList"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("PropList");
+ }
- // Default constructor: creates a stub PropList object.
- PropList();
+ // Default constructor: creates a stub PropList object.
+ PropList();
- // Copy constructor: creates a copy of a PropList object.
- PropList(const PropList& original);
+ // Copy constructor: creates a copy of a PropList object.
+ PropList(const PropList &original);
- // Gets the property list id.
- virtual hid_t getId() const;
+ // Gets the property list id.
+ virtual hid_t getId() const;
- // Destructor: properly terminates access to this property list.
- virtual ~PropList();
+ // Destructor: properly terminates access to this property list.
+ virtual ~PropList();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Deletes the PropList global constant
- static void deleteConstants();
+ // Deletes the PropList global constant
+ static void deleteConstants();
- protected:
- hid_t id; // HDF5 property list id
+ protected:
+ hid_t id; // HDF5 property list id
- // Sets the property list id.
- virtual void p_setId(const hid_t new_id);
+ // Sets the property list id.
+ virtual void p_setId(const hid_t new_id);
- private:
- static PropList* DEFAULT_;
+ private:
+ static PropList *DEFAULT_;
- // Dynamically allocates the PropList global constant
- static PropList* getConstant();
+ // Dynamically allocates the PropList global constant
+ static PropList *getConstant();
- // Friend function to set PropList id. For library use only.
- friend void f_PropList_setId(PropList* plist, hid_t new_id);
+ // Friend function to set PropList id. For library use only.
+ friend void f_PropList_setId(PropList *plist, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of PropList
} // namespace H5
-#endif // __H5PropList_H
+#endif // __H5PropList_H
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index c2c5b92..438e389 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -31,7 +31,6 @@
#include "H5PredType.h"
#include "H5StrType.h"
-
namespace H5 {
//--------------------------------------------------------------------------
@@ -48,7 +47,7 @@ StrType::StrType() : AtomType() {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType::StrType(const PredType& pred_type) : AtomType()
+StrType::StrType(const PredType &pred_type) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy(pred_type);
@@ -77,7 +76,7 @@ StrType::StrType(const PredType& pred_type) : AtomType()
// Planned for removal. -BMR, 2005/12/02
// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
-StrType::StrType(const PredType& pred_type, const size_t& size) : AtomType()
+StrType::StrType(const PredType &pred_type, const size_t &size) : AtomType()
{
// use DataType::copy to make a copy of the string predefined type
// then set its length
@@ -101,7 +100,7 @@ StrType::StrType(const PredType& pred_type, const size_t& size) : AtomType()
// This constructor replaced the previous one.
// Programmer Binh-Minh Ribler - Nov 28, 2005
//--------------------------------------------------------------------------
-StrType::StrType(const int dummy, const size_t& size) : AtomType()
+StrType::StrType(const int dummy, const size_t &size) : AtomType()
{
// use DataType::copy to make a copy of the string predefined type
// then set its length
@@ -123,7 +122,7 @@ StrType::StrType(const hid_t existing_id) : AtomType(existing_id) {}
///\brief Copy constructor: makes a copy of the original StrType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType::StrType(const StrType& original) : AtomType (original) {}
+StrType::StrType(const StrType &original) : AtomType(original) {}
//--------------------------------------------------------------------------
// Function: StrType overloaded constructor
@@ -132,13 +131,12 @@ StrType::StrType(const StrType& original) : AtomType (original) {}
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrType::StrType(const DataSet& dataset) : AtomType ()
+StrType::StrType(const DataSet &dataset) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
- if(id < 0)
- {
+ if (id < 0) {
throw DataSetIException("StrType constructor", "H5Dget_type failed");
}
}
@@ -157,7 +155,7 @@ StrType::StrType(const DataSet& dataset) : AtomType ()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-StrType::StrType(const H5Location& loc, const char *type_name) : AtomType()
+StrType::StrType(const H5Location &loc, const char *type_name) : AtomType()
{
id = p_opentype(loc, type_name);
}
@@ -176,7 +174,7 @@ StrType::StrType(const H5Location& loc, const char *type_name) : AtomType()
// to improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-StrType::StrType(const H5Location& loc, const H5std_string& type_name) : AtomType()
+StrType::StrType(const H5Location &loc, const H5std_string &type_name) : AtomType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -188,7 +186,8 @@ StrType::StrType(const H5Location& loc, const H5std_string& type_name) : AtomTyp
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* StrType::decode() const
+DataType *
+StrType::decode() const
{
hid_t encoded_strtype_id = H5I_INVALID_HID;
try {
@@ -199,7 +198,7 @@ DataType* StrType::decode() const
}
StrType *encoded_strtype = new StrType;
encoded_strtype->p_setId(encoded_strtype_id);
- return(encoded_strtype);
+ return (encoded_strtype);
}
//--------------------------------------------------------------------------
@@ -217,16 +216,16 @@ DataType* StrType::decode() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_cset_t StrType::getCset() const
+H5T_cset_t
+StrType::getCset() const
{
H5T_cset_t cset = H5Tget_cset(id);
// Returns a valid character set type if successful
- if(cset == H5T_CSET_ERROR)
- {
+ if (cset == H5T_CSET_ERROR) {
throw DataTypeIException("StrType::getCset", "H5Tget_cset failed");
}
- return(cset);
+ return (cset);
}
//--------------------------------------------------------------------------
@@ -244,12 +243,12 @@ H5T_cset_t StrType::getCset() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void StrType::setCset(H5T_cset_t cset) const
+void
+StrType::setCset(H5T_cset_t cset) const
{
herr_t ret_value = H5Tset_cset(id, cset);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("StrType::setCset", "H5Tset_cset failed");
}
}
@@ -264,17 +263,16 @@ void StrType::setCset(H5T_cset_t cset) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_str_t StrType::getStrpad() const
+H5T_str_t
+StrType::getStrpad() const
{
H5T_str_t strpad = H5Tget_strpad(id);
// Returns a valid string padding type if successful
- if(strpad == H5T_STR_ERROR)
- {
- throw DataTypeIException("StrType::getStrpad",
- "H5Tget_strpad failed - returned H5T_STR_ERROR");
+ if (strpad == H5T_STR_ERROR) {
+ throw DataTypeIException("StrType::getStrpad", "H5Tget_strpad failed - returned H5T_STR_ERROR");
}
- return(strpad);
+ return (strpad);
}
//--------------------------------------------------------------------------
@@ -287,12 +285,12 @@ H5T_str_t StrType::getStrpad() const
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetStrpad
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void StrType::setStrpad(H5T_str_t strpad) const
+void
+StrType::setStrpad(H5T_str_t strpad) const
{
herr_t ret_value = H5Tset_strpad(id, strpad);
- if(ret_value < 0)
- {
+ if (ret_value < 0) {
throw DataTypeIException("StrType::setStrpad", "H5Tset_strpad failed");
}
}
@@ -304,4 +302,4 @@ void StrType::setStrpad(H5T_str_t strpad) const
//--------------------------------------------------------------------------
StrType::~StrType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index 24c9ca3..659c17a 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,53 +23,57 @@ namespace H5 {
*/
// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP StrType : public AtomType {
- public:
- // Creates a string type using a predefined type
- StrType(const PredType& pred_type);
+ public:
+ // Creates a string type using a predefined type
+ StrType(const PredType &pred_type);
- // Creates a string type with specified length - may be obsolete
- StrType(const PredType& pred_type, const size_t& size);
+ // Creates a string type with specified length - may be obsolete
+ StrType(const PredType &pred_type, const size_t &size);
- // Creates a string type with specified length
- StrType(const int dummy, const size_t& size);
+ // Creates a string type with specified length
+ StrType(const int dummy, const size_t &size);
- // Gets the string datatype of the specified dataset
- StrType(const DataSet& dataset);
+ // Gets the string datatype of the specified dataset
+ StrType(const DataSet &dataset);
- // Constructors that open an HDF5 string datatype, given a location.
- StrType(const H5Location& loc, const char* name);
- StrType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open an HDF5 string datatype, given a location.
+ StrType(const H5Location &loc, const char *name);
+ StrType(const H5Location &loc, const H5std_string &name);
- // Returns an StrType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an StrType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- // Retrieves the character set type of this string datatype.
- H5T_cset_t getCset() const;
+ // Retrieves the character set type of this string datatype.
+ H5T_cset_t getCset() const;
- // Sets character set to be used.
- void setCset(H5T_cset_t cset) const;
+ // Sets character set to be used.
+ void setCset(H5T_cset_t cset) const;
- // Retrieves the string padding method for this string datatype.
- H5T_str_t getStrpad() const;
+ // Retrieves the string padding method for this string datatype.
+ H5T_str_t getStrpad() const;
- // Defines the storage mechanism for character strings.
- void setStrpad(H5T_str_t strpad) const;
+ // Defines the storage mechanism for character strings.
+ void setStrpad(H5T_str_t strpad) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("StrType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("StrType");
+ }
- // default constructor
- StrType();
+ // default constructor
+ StrType();
- // Creates a string datatype using an existing id
- StrType(const hid_t existing_id);
+ // Creates a string datatype using an existing id
+ StrType(const hid_t existing_id);
- // Copy constructor - makes a copy of the original object
- StrType(const StrType& original);
+ // Copy constructor - makes a copy of the original object
+ StrType(const StrType &original);
- // Noop destructor.
- virtual ~StrType();
+ // Noop destructor.
+ virtual ~StrType();
}; // end of StrType
} // namespace H5
diff --git a/c++/src/H5StrcreatProp.cpp b/c++/src/H5StrcreatProp.cpp
index a12dc00..8b86f30 100644
--- a/c++/src/H5StrcreatProp.cpp
+++ b/c++/src/H5StrcreatProp.cpp
@@ -6,13 +6,17 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#include <iostream>
+using std::cerr;
+using std::endl;
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -27,7 +31,7 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: StrCreatPropList default constructor
///\brief Default constructor: Creates a string create property list
-// May 2018
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrCreatPropList::StrCreatPropList() : PropList(H5P_STRING_CREATE) {}
@@ -36,16 +40,16 @@ StrCreatPropList::StrCreatPropList() : PropList(H5P_STRING_CREATE) {}
///\brief Copy constructor: makes a copy of the original
/// StrCreatPropList object.
///\param original - IN: StrCreatPropList instance to copy
-// May 2018
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-StrCreatPropList::StrCreatPropList(const StrCreatPropList& original) : PropList(original) {}
+StrCreatPropList::StrCreatPropList(const StrCreatPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: StrCreatPropList overloaded constructor
///\brief Creates a file creation property list using the id of an
/// existing one.
///\param plist_id - IN: StrCreatPropList id to use
-// May 2018
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrCreatPropList::StrCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
@@ -54,16 +58,15 @@ StrCreatPropList::StrCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
//--------------------------------------------------------------------------
// Function: StrCreatPropList::setCharEncoding
///\brief Sets the character encoding of the string.
-///\param encoding - IN: String encoding character set
///\exception H5::PropListIException
-// May 2018
+// March 2018
//--------------------------------------------------------------------------
-void StrCreatPropList::setCharEncoding(H5T_cset_t encoding) const
+void
+StrCreatPropList::setCharEncoding(H5T_cset_t encoding) const
{
herr_t ret_value = H5Pset_char_encoding(id, encoding);
// Throw exception if H5Pset_char_encoding returns failure
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("StrCreatPropList::setCharEncoding", "H5Pset_char_encoding failed");
}
}
@@ -71,20 +74,19 @@ void StrCreatPropList::setCharEncoding(H5T_cset_t encoding) const
//--------------------------------------------------------------------------
// Function: StrCreatPropList::getCharEncoding
///\brief Gets the character encoding of the string.
-///\return The string encoding character set
///\exception H5::PropListIException
-// May 2018
+// March 2018
//--------------------------------------------------------------------------
-H5T_cset_t StrCreatPropList::getCharEncoding() const
+H5T_cset_t
+StrCreatPropList::getCharEncoding() const
{
H5T_cset_t encoding;
- herr_t ret_value = H5Pget_char_encoding(id, &encoding);
+ herr_t ret_value = H5Pget_char_encoding(id, &encoding);
// Throw exception if H5Pget_char_encoding returns failure
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("StrCreatPropList::getCharEncoding", "H5Pget_char_encoding failed");
}
- return(encoding);
+ return (encoding);
}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5StrcreatProp.h b/c++/src/H5StrcreatProp.h
index 3e78c45..96efa4d 100644
--- a/c++/src/H5StrcreatProp.h
+++ b/c++/src/H5StrcreatProp.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,35 +22,39 @@ namespace H5 {
// Inheritance: PropList -> IdComponent
class H5_DLLCPP StrCreatPropList : public PropList {
- public:
- // There is no StrCreatPropList::DEFAULT;
+ public:
+ // There is no StrCreatPropList::DEFAULT;
- // Returns this class name.
- virtual H5std_string fromClass () const { return("StrCreatPropList"); }
+ // Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("StrCreatPropList");
+ }
- // Sets the character encoding of the string.
- void setCharEncoding(H5T_cset_t encoding) const;
+ // Sets the character encoding of the string.
+ void setCharEncoding(H5T_cset_t encoding) const;
- // Gets the character encoding of the string.
- H5T_cset_t getCharEncoding() const;
+ // Gets the character encoding of the string.
+ H5T_cset_t getCharEncoding() const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- protected:
- // Creates a string creation property list.
- StrCreatPropList();
+ protected:
+ // Creates a link creation property list.
+ StrCreatPropList();
- // Copy constructor: same as the original StrCreatPropList.
- StrCreatPropList(const StrCreatPropList& original);
+ // Copy constructor: same as the original StrCreatPropList.
+ StrCreatPropList(const StrCreatPropList &original);
- // Creates a copy of an existing string creation property list
- // using the property list id.
- StrCreatPropList(const hid_t plist_id);
+ // Creates a copy of an existing link creation property list
+ // using the property list id.
+ StrCreatPropList(const hid_t plist_id);
- // Noop destructor
- virtual ~StrCreatPropList() {};
+ // Noop destructor
+ virtual ~StrCreatPropList(){};
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; // end of StrCreatPropList
+}; // end of StrCreatPropList
} // namespace H5
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 902de79..df5be49 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,7 +27,6 @@
namespace H5 {
-
//--------------------------------------------------------------------------
// Function: VarLenType default constructor
///\brief Default constructor: Creates a stub variable-length datatype.
@@ -48,7 +47,7 @@ VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {}
///\brief Copy constructor: makes a copy of the original VarLenType object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-VarLenType::VarLenType(const VarLenType& original) : DataType(original) {}
+VarLenType::VarLenType(const VarLenType &original) : DataType(original) {}
//--------------------------------------------------------------------------
// Function: VarLenType overloaded constructor
@@ -61,13 +60,11 @@ VarLenType::VarLenType(const VarLenType& original) : DataType(original) {}
// constructor.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-VarLenType::VarLenType(const DataType* base_type) : DataType()
+VarLenType::VarLenType(const DataType *base_type) : DataType()
{
id = H5Tvlen_create(base_type->getId());
- if (id < 0)
- {
- throw DataTypeIException("VarLenType constructor",
- "H5Tvlen_create returns negative value");
+ if (id < 0) {
+ throw DataTypeIException("VarLenType constructor", "H5Tvlen_create returns negative value");
}
}
@@ -85,7 +82,7 @@ VarLenType::VarLenType(const DataType* base_type) : DataType()
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-VarLenType::VarLenType(const H5Location& loc, const char *type_name) : DataType()
+VarLenType::VarLenType(const H5Location &loc, const char *type_name) : DataType()
{
id = p_opentype(loc, type_name);
}
@@ -104,7 +101,7 @@ VarLenType::VarLenType(const H5Location& loc, const char *type_name) : DataType(
// improve usability.
// -BMR, Sept 2017
//--------------------------------------------------------------------------
-VarLenType::VarLenType(const H5Location& loc, const H5std_string& type_name) : DataType()
+VarLenType::VarLenType(const H5Location &loc, const H5std_string &type_name) : DataType()
{
id = p_opentype(loc, type_name.c_str());
}
@@ -116,7 +113,8 @@ VarLenType::VarLenType(const H5Location& loc, const H5std_string& type_name) : D
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Sept 2017
//--------------------------------------------------------------------------
-DataType* VarLenType::decode() const
+DataType *
+VarLenType::decode() const
{
hid_t encoded_vltype_id = H5I_INVALID_HID;
try {
@@ -127,7 +125,7 @@ DataType* VarLenType::decode() const
}
VarLenType *encoded_vltype = new VarLenType;
encoded_vltype->p_setId(encoded_vltype_id);
- return(encoded_vltype);
+ return (encoded_vltype);
}
//--------------------------------------------------------------------------
@@ -137,4 +135,4 @@ DataType* VarLenType::decode() const
//--------------------------------------------------------------------------
VarLenType::~VarLenType() {}
-} // end namespace
+} // namespace H5
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index a9713ad..dc75051 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -7,7 +7,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,36 +23,40 @@ namespace H5 {
*/
// Inheritance: DataType -> H5Object -> H5Location -> IdComponent
class H5_DLLCPP VarLenType : public DataType {
- public:
- // Constructor that creates a variable-length datatype based
- // on the specified base type.
- VarLenType(const DataType& base_type);
+ public:
+ // Constructor that creates a variable-length datatype based
+ // on the specified base type.
+ VarLenType(const DataType &base_type);
- // Deprecated - will be removed after 1.8.20
- VarLenType(const DataType* base_type);
+ // Deprecated - will be removed after 1.8.20
+ VarLenType(const DataType *base_type);
- // Constructors that open a variable-length datatype, given a location.
- VarLenType(const H5Location& loc, const char* name);
- VarLenType(const H5Location& loc, const H5std_string& name);
+ // Constructors that open a variable-length datatype, given a location.
+ VarLenType(const H5Location &loc, const char *name);
+ VarLenType(const H5Location &loc, const H5std_string &name);
- // Returns an VarLenType object via DataType* by decoding the
- // binary object description of this type.
- virtual DataType* decode() const;
+ // Returns an VarLenType object via DataType* by decoding the
+ // binary object description of this type.
+ virtual DataType *decode() const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass () const { return("VarLenType"); }
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("VarLenType");
+ }
- // Copy constructor: makes copy of the original object.
- VarLenType(const VarLenType& original);
+ // Copy constructor: makes copy of the original object.
+ VarLenType(const VarLenType &original);
- // Constructor that takes an existing id
- VarLenType(const hid_t existing_id);
+ // Constructor that takes an existing id
+ VarLenType(const hid_t existing_id);
- // Noop destructor
- virtual ~VarLenType();
+ // Noop destructor
+ virtual ~VarLenType();
- // Default constructor
- VarLenType();
+ // Default constructor
+ VarLenType();
}; // end of VarLenType
} // namespace H5
diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am
index 416a3d3..7f6f79b 100644
--- a/c++/src/Makefile.am
+++ b/c++/src/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index c4b89c6..523217a 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -417,11 +417,11 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -436,6 +436,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -454,6 +455,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -481,6 +483,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -488,9 +492,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -506,6 +513,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -527,6 +535,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -539,8 +548,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -554,6 +565,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -595,6 +607,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -683,26 +696,26 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
# This is our main target
@@ -747,11 +760,11 @@ DISTCLEANFILES = h5c++ libhdf5.settings
# Mark this directory as part of the C++ API
CXX_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1346,6 +1359,7 @@ mostlyclean-local:
@if test -d ii_files; then \
$(RM) -rf ii_files; \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1381,7 +1395,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1542,7 +1556,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index e6642ad..e962fce 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
# Doxyfile 1.8.5
# This file describes the settings to be used by the documentation system
@@ -38,8 +49,7 @@ PROJECT_NAME = "HDF5 C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-
-PROJECT_NUMBER = "1.8.21"
+PROJECT_NUMBER = "1.8.22"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -1011,7 +1021,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
@@ -1125,7 +1135,7 @@ HTML_STYLESHEET =
# defined cascading style sheet that is included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefore more robust against future updates.
+# standard style sheet and is therefor more robust against future updates.
# Doxygen will copy the style sheet file to the output directory. For an example
# see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1140,7 +1150,7 @@ HTML_EXTRA_STYLESHEET =
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_FILES = ./header_files/help.jpg \
+HTML_EXTRA_FILES = ./header_files/help.jpg \
./C2Cppfunction_map.htm
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
@@ -2010,7 +2020,7 @@ PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have an
+# remove all refrences to function-like macros that are alone on a line, have an
# all uppercase name, and do not end with a semicolon. Such function macros are
# typically used for boiler-plate code, and will confuse the parser if not
# removed.
diff --git a/c++/src/footer.html b/c++/src/footer.html
index 248ac16..79b9a25 100644
--- a/c++/src/footer.html
+++ b/c++/src/footer.html
@@ -11,7 +11,7 @@
</address>
</td><td width="5%">&nbsp;</td>
<td align="right">
- <a href="https://support.hdfgroup.org/ftp/HDF5/releases/COPYING">Copyright</a> by
+ <a href="https://www.hdfgroup.org/licenses">Copyright Notices</a> by
<a href="https://www.hdfgroup.org">The HDF Group</a>
<br>
and the Board of Trustees of the University of Illinois
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 00502d9..b9b77da 100644
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -38,7 +38,7 @@ HL="@HL@"
## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ##
## ##
-## These settings can be overriden by setting HDF5_CXXFLAGS, ##
+## These settings can be overridden by setting HDF5_CXXFLAGS, ##
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
@@ -140,7 +140,7 @@ usage() {
echo " [default: no except when built with only"
echo " shared libraries]"
echo " You can also add or change paths and flags to the compile line using"
- echo " the following environment varibles or by assigning them to their counterparts"
+ echo " the following environment variables or by assigning them to their counterparts"
echo " in the 'Things You Can Modify to Override...'" section of $prog_name
echo " "
echo " Variable Current value to be replaced"
@@ -311,7 +311,7 @@ fi
if test "x$do_link" = "xyes"; then
shared_link=""
- # conditionnaly link with the hl library
+ # conditionally link with the hl library
if test "X$HL" = "Xhl"; then
libraries=" $libraries -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 "
else
diff --git a/c++/src/header.html b/c++/src/header.html
index cb42565..5b92416 100644
--- a/c++/src/header.html
+++ b/c++/src/header.html
@@ -13,7 +13,7 @@ xmlns="http://www.w3.org/TR/REC-html40">
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 665a49f..80f7543 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -1,5 +1,6 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_CPP_TEST)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_CPP_TEST CXX)
+
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
# with "cpp_". This allows for easier filtering of the test suite when
@@ -11,7 +12,7 @@ PROJECT (HDF5_CPP_TEST)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-set (CPP_TEST_SRCS
+set (CPP_TEST_SOURCES
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tarray.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
@@ -35,16 +36,33 @@ set (CPP_TEST_SRCS
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
-TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ")
-target_link_libraries (cpp_testhdf5
- ${HDF5_CPP_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
-)
-set_target_properties (cpp_testhdf5 PROPERTIES
- FOLDER test/cpp
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ${HDF5_CPP_TEST_SOURCE_DIR}/h5cpputil.h)
+target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(cpp_testhdf5 PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+target_compile_definitions(cpp_testhdf5
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (cpp_testhdf5 STATIC)
+ target_link_libraries (cpp_testhdf5 PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (cpp_testhdf5 SHARED)
+ target_link_libraries (cpp_testhdf5 PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE -static-libgcc -static-libstdc++
+ )
+ endif ()
+endif ()
+set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_TEST_cpp_testhdf5_FORMAT cpp_testhdf5)
+endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 11463a0..ca5f6bd 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -31,9 +31,10 @@ add_test (
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME CPP_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
+ add_test (NAME CPP_testhdf5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_testhdf5>)
else ()
add_test (NAME CPP_testhdf5 COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -46,54 +47,12 @@ else ()
endif ()
set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects)
-if (HDF5_TEST_VFD)
-
- set (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- if (DIRECT_VFD)
- set (VFD_LIST ${VFD_LIST} direct)
- endif ()
-
- macro (ADD_VFD_TEST vfdname resultcode)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
- add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- tattr_basic.h5
- tattr_compound.h5
- tattr_dtype.h5
- tattr_multi.h5
- tattr_scalar.h5
- tfattrs.h5
- )
- add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=cpp_testhdf5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
- set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
- endif ()
- endmacro ()
-
- # Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- endforeach ()
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
+if (HDF5_TEST_VFD)
+ include (CMakeVFDTests.cmake)
endif ()
diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake
new file mode 100644
index 0000000..70556ba
--- /dev/null
+++ b/c++/test/CMakeVFDTests.cmake
@@ -0,0 +1,73 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+set (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+)
+
+if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+endif ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+macro (ADD_VFD_TEST vfdname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
+ add_test (
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ tattr_basic.h5
+ tattr_compound.h5
+ tattr_dtype.h5
+ tattr_multi.h5
+ tattr_scalar.h5
+ tfattrs.h5
+ titerate.h5
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
+ )
+ add_test (
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-cpp_testhdf5.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
+ set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
+ endif ()
+endmacro ()
+
+# Run test with different Virtual File Driver
+foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+endforeach ()
diff --git a/c++/test/H5srcdir_str.h.in b/c++/test/H5srcdir_str.h.in
index bab1df3..988c065 100644
--- a/c++/test/H5srcdir_str.h.in
+++ b/c++/test/H5srcdir_str.h.in
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am
index a9fcfdf..1e5091e 100644
--- a/c++/test/Makefile.am
+++ b/c++/test/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 4ea9261..aa5352f 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -405,12 +405,12 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src, test, and c++/src directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/test -I$(top_srcdir)/c++/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -425,6 +425,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -443,6 +444,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -470,6 +472,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -477,9 +481,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -495,6 +502,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -516,6 +524,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -528,8 +537,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -543,6 +554,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -584,6 +596,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -686,11 +699,11 @@ testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tarray.cpp \
# Tell conclude.am that these are C++ tests.
CXX_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1186,6 +1199,7 @@ mostlyclean-local:
@if test -d ii_files; then \
$(RM) -rf ii_files; \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1221,7 +1235,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1382,7 +1396,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 0a187ef..cb6afa7 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -32,28 +32,28 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
-const H5std_string FILE1("dataset.h5");
-const H5std_string DSET_DEFAULT_NAME("default");
-const H5std_string DSET_DEFAULT_NAME_PATH("/default");
-const H5std_string DSET_CHUNKED_NAME("chunked");
-const H5std_string DSET_SIMPLE_IO_NAME("simple_io");
-const H5std_string DSET_TCONV_NAME ("tconv");
-const H5std_string DSET_COMPRESS_NAME("compressed");
-const H5std_string DSET_BOGUS_NAME ("bogus");
+const H5std_string FILE1("dataset.h5");
+const H5std_string DSET_DEFAULT_NAME("default");
+const H5std_string DSET_DEFAULT_NAME_PATH("/default");
+const H5std_string DSET_CHUNKED_NAME("chunked");
+const H5std_string DSET_SIMPLE_IO_NAME("simple_io");
+const H5std_string DSET_TCONV_NAME("tconv");
+const H5std_string DSET_COMPRESS_NAME("compressed");
+const H5std_string DSET_BOGUS_NAME("bogus");
/* Temporary filter IDs used for testing */
const int H5Z_FILTER_BOGUS = 305;
-static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf);
// H5_ATTR_UNUSED variables caused warning, but taking them out caused failure.
-
/*-------------------------------------------------------------------------
* Function: test_create
*
@@ -68,10 +68,10 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
*
*-------------------------------------------------------------------------
*/
-const H5std_string DSET_COMMENT ("This is a dataset");
-const H5std_string NON_EXISTING_DSET ("does_not_exist");
+const H5std_string DSET_COMMENT("This is a dataset");
+const H5std_string NON_EXISTING_DSET("does_not_exist");
static herr_t
-test_create( H5File& file)
+test_create(H5File &file)
{
SUBTEST("Create, open, close");
@@ -79,18 +79,16 @@ test_create( H5File& file)
DataSet *dataset = NULL;
try {
// Create a data space
- hsize_t dims[2];
+ hsize_t dims[2];
dims[0] = 256;
dims[1] = 512;
- DataSpace space (2, dims, NULL);
+ DataSpace space(2, dims, NULL);
// Create a dataset using the default dataset creation properties.
- dataset = new DataSet (file.createDataSet
- (DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
-
+ dataset = new DataSet(file.createDataSet(DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
// Add a comment to the dataset
- file.setComment (DSET_DEFAULT_NAME, DSET_COMMENT);
+ file.setComment(DSET_DEFAULT_NAME, DSET_COMMENT);
// Close the dataset
delete dataset;
@@ -100,18 +98,19 @@ test_create( H5File& file)
// dataset can only be created once. If an exception is not thrown for
// this action by createDataSet, then throw an invalid action exception.
try {
- dataset = new DataSet (file.createDataSet
- (DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
+ dataset = new DataSet(file.createDataSet(DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
// continuation here, that means no exception has been thrown
- throw InvalidActionException("H5File::createDataSet", "Library allowed overwrite of existing dataset");
+ throw InvalidActionException("H5File::createDataSet",
+ "Library allowed overwrite of existing dataset");
}
- catch (FileIException& E) // catching invalid creating dataset
- {} // do nothing, exception expected
+ catch (FileIException &E) // catching invalid creating dataset
+ {
+ } // do nothing, exception expected
// Open the dataset we created above and then close it. This is one
// way to open an existing dataset for accessing.
- dataset = new DataSet (file.openDataSet (DSET_DEFAULT_NAME));
+ dataset = new DataSet(file.openDataSet(DSET_DEFAULT_NAME));
// Get and verify the name of this dataset, using
// H5std_string getObjName()
@@ -127,30 +126,31 @@ test_create( H5File& file)
delete dataset;
// This is another way to open an existing dataset for accessing.
- DataSet another_dataset(file.openDataSet (DSET_DEFAULT_NAME));
+ DataSet another_dataset(file.openDataSet(DSET_DEFAULT_NAME));
// Try opening a non-existent dataset. This should fail so if an
// exception is not thrown for this action by openDataSet, then
// display failure information and throw an exception.
try {
- dataset = new DataSet (file.openDataSet(NON_EXISTING_DSET));
+ dataset = new DataSet(file.openDataSet(NON_EXISTING_DSET));
// continuation here, that means no exception has been thrown
throw InvalidActionException("H5File::openDataSet", "Attempted to open a non-existent dataset");
}
- catch (FileIException& E ) // catching opening non-existent dataset
- {} // do nothing, exception expected
+ catch (FileIException &E) // catching opening non-existent dataset
+ {
+ } // do nothing, exception expected
// Create a new dataset that uses chunked storage instead of the
// default layout.
DSetCreatPropList create_parms;
- hsize_t csize[2];
+ hsize_t csize[2];
csize[0] = 5;
csize[1] = 100;
- create_parms.setChunk( 2, csize );
+ create_parms.setChunk(2, csize);
- dataset = new DataSet (file.createDataSet
- (DSET_CHUNKED_NAME, PredType::NATIVE_DOUBLE, space, create_parms));
+ dataset =
+ new DataSet(file.createDataSet(DSET_CHUNKED_NAME, PredType::NATIVE_DOUBLE, space, create_parms));
// Note: this one has no error message in C when failure occurs?
// clean up and return with success
@@ -158,10 +158,9 @@ test_create( H5File& file)
PASSED();
return 0;
- } // outer most try block
+ } // outer most try block
- catch (InvalidActionException& E)
- {
+ catch (InvalidActionException &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
@@ -171,8 +170,7 @@ test_create( H5File& file)
return -1;
}
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_create", __LINE__, __FILE__);
// clean up and return with failure
@@ -180,9 +178,8 @@ test_create( H5File& file)
delete dataset;
return -1;
}
-} // test_create
+} // test_create
-
/*-------------------------------------------------------------------------
* Function: test_simple_io
*
@@ -200,79 +197,75 @@ test_create( H5File& file)
*-------------------------------------------------------------------------
*/
static herr_t
-test_simple_io( H5File& file)
+test_simple_io(H5File &file)
{
SUBTEST("Simple I/O");
int points[100][200];
int check[100][200];
- int i, j, n;
+ int i, j, n;
// Initialize the dataset
- for (i = n = 0; i < 100; i++)
- {
+ for (i = n = 0; i < 100; i++) {
for (j = 0; j < 200; j++) {
points[i][j] = n++;
}
}
- char* tconv_buf = new char [1000];
- try
- {
+ char *tconv_buf = new char[1000];
+ try {
// Create the data space
hsize_t dims[2];
dims[0] = 100;
dims[1] = 200;
- DataSpace space (2, dims, NULL);
+ DataSpace space(2, dims, NULL);
// Create a small conversion buffer to test strip mining
DSetMemXferPropList xfer;
- xfer.setBuffer (1000, tconv_buf, NULL);
+ xfer.setBuffer(1000, tconv_buf, NULL);
// Create the dataset
- DataSet dataset (file.createDataSet (DSET_SIMPLE_IO_NAME, PredType::NATIVE_INT, space));
+ DataSet dataset(file.createDataSet(DSET_SIMPLE_IO_NAME, PredType::NATIVE_INT, space));
// Write the data to the dataset
- dataset.write(static_cast<void*>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset.write(static_cast<void *>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL,
+ xfer);
// Read the dataset back
- dataset.read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset.read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < 100; i++)
- for (j = 0; j < 200; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < 200; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("DataSet::read");
}
// clean up and return with success
- delete [] tconv_buf;
+ delete[] tconv_buf;
PASSED();
return 0;
- } // end try
+ } // end try
// catch all dataset, space, plist exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
// clean up and return with failure
if (tconv_buf)
- delete [] tconv_buf;
+ delete[] tconv_buf;
return -1;
}
-} // test_simple_io
+} // test_simple_io
-
/*-------------------------------------------------------------------------
* Function: test_datasize
*
- * Purpose: Tests DataSet::getInMemDataSize().
+ * Purpose: Tests DataSet::getInMemDataSize().
*
* Return: Success: 0
*
@@ -287,22 +280,20 @@ static herr_t
test_datasize(FileAccPropList &fapl)
{
SUBTEST("DataSet::getInMemDataSize()");
- try
- {
+ try {
// Open FILE1.
H5File file(FILE1, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);
// Open dataset DSET_SIMPLE_IO_NAME.
- DataSet dset = file.openDataSet (DSET_SIMPLE_IO_NAME);
+ DataSet dset = file.openDataSet(DSET_SIMPLE_IO_NAME);
// Get the dataset's dataspace to calculate the size for verification.
DataSpace space(dset.getSpace());
// Get the dimension sizes.
hsize_t dims[2];
- int n_dims = space.getSimpleExtentDims(dims);
- if (n_dims < 0)
- {
+ int n_dims = space.getSimpleExtentDims(dims);
+ if (n_dims < 0) {
throw Exception("test_compression", "DataSpace::getSimpleExtentDims() failed");
}
@@ -314,8 +305,7 @@ test_datasize(FileAccPropList &fapl)
size_t ds_size = dset.getInMemDataSize();
// Verify the data size.
- if (ds_size != expected_size)
- {
+ if (ds_size != expected_size) {
H5_FAILED();
cerr << " Expected data size = " << expected_size;
cerr << " but dset.getInMemDataSize() returned " << ds_size << endl;
@@ -324,19 +314,17 @@ test_datasize(FileAccPropList &fapl)
PASSED();
return 0;
- } // end try
+ } // end try
// catch all dataset, space, plist exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
return -1;
}
-} // test_datasize
+} // test_datasize
-
/*-------------------------------------------------------------------------
* Function: test_tconv
*
@@ -352,81 +340,76 @@ test_datasize(FileAccPropList &fapl)
*-------------------------------------------------------------------------
*/
static herr_t
-test_tconv(H5File& file)
+test_tconv(H5File &file)
{
// Prepare buffers for input/output
- char *out=NULL, *in=NULL;
- out = new char [4*1000000];
+ char *out = NULL, *in = NULL;
+ out = new char[4 * 1000000];
// assert (out); - should use exception handler for new - BMR
- in = new char [4*1000000];
- //assert (in);
+ in = new char[4 * 1000000];
+ // assert (in);
SUBTEST("Data type conversion");
// Initialize the dataset
for (int i = 0; i < 1000000; i++) {
- out[i*4+0] = 0x11;
- out[i*4+1] = 0x22;
- out[i*4+2] = 0x33;
- out[i*4+3] = 0x44;
+ out[i * 4 + 0] = 0x11;
+ out[i * 4 + 1] = 0x22;
+ out[i * 4 + 2] = 0x33;
+ out[i * 4 + 3] = 0x44;
}
- try
- {
+ try {
// Create the data space
hsize_t dims[1];
dims[0] = 1000000;
- DataSpace space (1, dims, NULL);
+ DataSpace space(1, dims, NULL);
// Create the data set
- DataSet dataset (file.createDataSet (DSET_TCONV_NAME, PredType::STD_I32LE, space));
+ DataSet dataset(file.createDataSet(DSET_TCONV_NAME, PredType::STD_I32LE, space));
// Write the data to the dataset
- dataset.write (static_cast<void*>(out), PredType::STD_I32LE);
+ dataset.write(static_cast<void *>(out), PredType::STD_I32LE);
// Read data with byte order conversion
- dataset.read (static_cast<void*>(in), PredType::STD_I32BE);
+ dataset.read(static_cast<void *>(in), PredType::STD_I32BE);
// Check
for (int i = 0; i < 1000000; i++) {
- if (in[4*i+0]!=out[4*i+3] ||
- in[4*i+1]!=out[4*i+2] ||
- in[4*i+2]!=out[4*i+1] ||
- in[4*i+3]!=out[4*i+0])
- {
+ if (in[4 * i + 0] != out[4 * i + 3] || in[4 * i + 1] != out[4 * i + 2] ||
+ in[4 * i + 2] != out[4 * i + 1] || in[4 * i + 3] != out[4 * i + 0]) {
throw Exception("DataSet::read", "Read with byte order conversion failed");
}
}
// clean up and return with success
- delete [] out;
- delete [] in;
+ delete[] out;
+ delete[] in;
PASSED();
return 0;
- } // end try
+ } // end try
// catch all dataset and space exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
// clean up and return with failure
- delete [] out;
- delete [] in;
+ delete[] out;
+ delete[] in;
return -1;
}
-} // test_tconv
+} // test_tconv
/* This message derives from H5Z */
const H5Z_class2_t H5Z_BOGUS[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version number */
- H5Z_FILTER_BOGUS, /* Filter id number */
- 1, 1, /* Encode and decode enabled */
- "bogus", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)filter_bogus, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version number */
+ H5Z_FILTER_BOGUS, /* Filter id number */
+ 1, 1, /* Encode and decode enabled */
+ "bogus", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)filter_bogus, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
@@ -444,15 +427,13 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{
*-------------------------------------------------------------------------
*/
static size_t
-filter_bogus(unsigned int flags, size_t cd_nelmts,
- const unsigned int cd_values[], size_t nbytes,
- size_t *buf_size, void **buf)
+filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[], size_t nbytes,
+ size_t *buf_size, void **buf)
// H5_ATTR_UNUSED variables caused warning, but taking them out caused failure.
{
return nbytes;
}
-
/*-------------------------------------------------------------------------
* Function: test_compression
*
@@ -471,68 +452,65 @@ filter_bogus(unsigned int flags, size_t cd_nelmts,
*-------------------------------------------------------------------------
*/
static herr_t
-test_compression(H5File& file)
+test_compression(H5File &file)
{
#ifndef H5_HAVE_FILTER_DEFLATE
- const char *not_supported;
+ const char *not_supported;
not_supported = " Deflate compression is not enabled.";
#endif /* H5_HAVE_FILTER_DEFLATE */
- int points[100][200];
- int check[100][200];
- hsize_t i, j, n;
+ int points[100][200];
+ int check[100][200];
+ hsize_t i, j, n;
// Initialize the dataset
- for (i = n = 0; i < 100; i++)
- {
+ for (i = n = 0; i < 100; i++) {
for (j = 0; j < 200; j++) {
points[i][j] = (int)n++;
}
}
- char* tconv_buf = new char [1000];
- DataSet* dataset = NULL;
- try
- {
- const hsize_t size[2] = {100, 200};
+ char * tconv_buf = new char[1000];
+ DataSet *dataset = NULL;
+ try {
+ const hsize_t size[2] = {100, 200};
// Create the data space
DataSpace space1(2, size, NULL);
// Create a small conversion buffer to test strip mining
DSetMemXferPropList xfer;
- xfer.setBuffer (1000, tconv_buf, NULL);
+ xfer.setBuffer(1000, tconv_buf, NULL);
// Use chunked storage with compression
DSetCreatPropList dscreatplist;
- const hsize_t chunk_size[2] = {2, 25};
- dscreatplist.setChunk (2, chunk_size);
- dscreatplist.setDeflate (6);
+ const hsize_t chunk_size[2] = {2, 25};
+ dscreatplist.setChunk(2, chunk_size);
+ dscreatplist.setDeflate(6);
#ifdef H5_HAVE_FILTER_DEFLATE
SUBTEST("Compression (setup)");
// Create the dataset
- dataset = new DataSet (file.createDataSet
- (DSET_COMPRESS_NAME, PredType::NATIVE_INT, space1, dscreatplist));
+ dataset =
+ new DataSet(file.createDataSet(DSET_COMPRESS_NAME, PredType::NATIVE_INT, space1, dscreatplist));
PASSED();
/*----------------------------------------------------------------------
- * STEP 1: Read uninitialized data. It should be zero.
- *----------------------------------------------------------------------
- */
+ * STEP 1: Read uninitialized data. It should be zero.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (uninitialized read)");
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
- for (i=0; i<size[0]; i++) {
- for (j=0; j<size[1]; j++) {
- if (0!=check[i][j]) {
+ for (i = 0; i < size[0]; i++) {
+ for (j = 0; j < size[1]; j++) {
+ if (0 != check[i][j]) {
H5_FAILED();
cerr << " Read a non-zero value." << endl;
- cerr << " At index " << (unsigned long)i << "," <<
- (unsigned long)j << endl;
+ cerr << " At index " << (unsigned long)i << "," << (unsigned long)j << endl;
throw Exception("test_compression", "Failed in uninitialized read");
}
}
@@ -540,38 +518,36 @@ test_compression(H5File& file)
PASSED();
/*----------------------------------------------------------------------
- * STEP 2: Test compression by setting up a chunked dataset and writing
- * to it.
- *----------------------------------------------------------------------
- */
+ * STEP 2: Test compression by setting up a chunked dataset and writing
+ * to it.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (write)");
- for (i=n=0; i<size[0]; i++)
- {
- for (j=0; j<size[1]; j++)
- {
+ for (i = n = 0; i < size[0]; i++) {
+ for (j = 0; j < size[1]; j++) {
points[i][j] = (int)n++;
}
}
- dataset->write (static_cast<void*>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->write(static_cast<void *>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL,
+ xfer);
PASSED();
/*----------------------------------------------------------------------
- * STEP 3: Try to read the data we just wrote.
- *----------------------------------------------------------------------
- */
+ * STEP 3: Try to read the data we just wrote.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (read)");
// Read the dataset back
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < size[1]; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("test_compression", "Failed in read");
}
@@ -579,31 +555,29 @@ test_compression(H5File& file)
PASSED();
/*----------------------------------------------------------------------
- * STEP 4: Write new data over the top of the old data. The new data is
- * random thus not very compressible, and will cause the chunks to move
- * around as they grow. We only change values for the left half of the
- * dataset although we rewrite the whole thing.
- *----------------------------------------------------------------------
- */
+ * STEP 4: Write new data over the top of the old data. The new data is
+ * random thus not very compressible, and will cause the chunks to move
+ * around as they grow. We only change values for the left half of the
+ * dataset although we rewrite the whole thing.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (modify)");
- for (i=0; i<size[0]; i++)
- {
- for (j=0; j<size[1]/2; j++)
- {
- points[i][j] = rand ();
+ for (i = 0; i < size[0]; i++) {
+ for (j = 0; j < size[1] / 2; j++) {
+ points[i][j] = rand();
}
}
- dataset->write (static_cast<void*>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->write(static_cast<void *>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL,
+ xfer);
// Read the dataset back and check it
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < size[1]; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("test_compression", "Failed in modify");
}
@@ -611,66 +585,63 @@ test_compression(H5File& file)
PASSED();
/*----------------------------------------------------------------------
- * STEP 5: Close the dataset and then open it and read it again. This
- * insures that the compression message is picked up properly from the
- * object header.
- *----------------------------------------------------------------------
- */
+ * STEP 5: Close the dataset and then open it and read it again. This
+ * insures that the compression message is picked up properly from the
+ * object header.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (re-open)");
// close this dataset to reuse the var
delete dataset;
- dataset = new DataSet (file.openDataSet (DSET_COMPRESS_NAME));
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset = new DataSet(file.openDataSet(DSET_COMPRESS_NAME));
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < size[1]; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("test_compression", "Failed in re-open");
}
PASSED();
-
/*----------------------------------------------------------------------
- * STEP 6: Test partial I/O by writing to and then reading from a
- * hyperslab of the dataset. The hyperslab does not line up on chunk
- * boundaries (we know that case already works from above tests).
- *----------------------------------------------------------------------
- */
+ * STEP 6: Test partial I/O by writing to and then reading from a
+ * hyperslab of the dataset. The hyperslab does not line up on chunk
+ * boundaries (we know that case already works from above tests).
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (partial I/O)");
- const hsize_t hs_size[2] = {4, 50};
- const hsize_t hs_offset[2] = {7, 30};
+ const hsize_t hs_size[2] = {4, 50};
+ const hsize_t hs_offset[2] = {7, 30};
for (i = 0; i < hs_size[0]; i++) {
for (j = 0; j < hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = rand ();
+ points[hs_offset[0] + i][hs_offset[1] + j] = rand();
}
}
- space1.selectHyperslab( H5S_SELECT_SET, hs_size, hs_offset );
- dataset->write (static_cast<void*>(points), PredType::NATIVE_INT, space1, space1, xfer);
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, space1, space1, xfer);
+ space1.selectHyperslab(H5S_SELECT_SET, hs_size, hs_offset);
+ dataset->write(static_cast<void *>(points), PredType::NATIVE_INT, space1, space1, xfer);
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, space1, space1, xfer);
// Check that the values read are the same as the values written
- for (i=0; i<hs_size[0]; i++) {
- for (j=0; j<hs_size[1]; j++) {
- if (points[hs_offset[0]+i][hs_offset[1]+j] !=
- check[hs_offset[0]+i][hs_offset[1]+j]) {
- H5_FAILED();
- cerr << " Read different values than written.\n" << endl;
- cerr << " At index " << (unsigned long)(hs_offset[0]+i) <<
- "," << (unsigned long)(hs_offset[1]+j) << endl;
-
- cerr << " At original: " << (int)points[hs_offset[0]+i][hs_offset[1]+j] << endl;
- cerr << " At returned: " << (int)check[hs_offset[0]+i][hs_offset[1]+j] << endl;
- throw Exception("test_compression", "Failed in partial I/O");
- }
- } // for j
- } // for i
+ for (i = 0; i < hs_size[0]; i++) {
+ for (j = 0; j < hs_size[1]; j++) {
+ if (points[hs_offset[0] + i][hs_offset[1] + j] != check[hs_offset[0] + i][hs_offset[1] + j]) {
+ H5_FAILED();
+ cerr << " Read different values than written.\n" << endl;
+ cerr << " At index " << (unsigned long)(hs_offset[0] + i) << ","
+ << (unsigned long)(hs_offset[1] + j) << endl;
+
+ cerr << " At original: " << (int)points[hs_offset[0] + i][hs_offset[1] + j] << endl;
+ cerr << " At returned: " << (int)check[hs_offset[0] + i][hs_offset[1] + j] << endl;
+ throw Exception("test_compression", "Failed in partial I/O");
+ }
+ } // for j
+ } // for i
delete dataset;
dataset = NULL;
@@ -684,29 +655,30 @@ test_compression(H5File& file)
#endif
/*----------------------------------------------------------------------
- * STEP 7: Register an application-defined compression method and use it
- * to write and then read the dataset.
- *----------------------------------------------------------------------
- */
+ * STEP 7: Register an application-defined compression method and use it
+ * to write and then read the dataset.
+ *----------------------------------------------------------------------
+ */
SUBTEST("Compression (app-defined method)");
- if (H5Zregister (H5Z_BOGUS)<0)
- throw Exception("test_compression", "Failed in app-defined method");
- if (H5Pset_filter (dscreatplist.getId(), H5Z_FILTER_BOGUS, 0, 0, NULL)<0)
+ if (H5Zregister(H5Z_BOGUS) < 0)
+ throw Exception("test_compression", "Failed in app-defined method");
+ if (H5Pset_filter(dscreatplist.getId(), H5Z_FILTER_BOGUS, 0, 0, NULL) < 0)
throw Exception("test_compression", "Failed in app-defined method");
- dscreatplist.setFilter (H5Z_FILTER_BOGUS, 0, 0, NULL);
+ dscreatplist.setFilter(H5Z_FILTER_BOGUS, 0, 0, NULL);
- DataSpace space2 (2, size, NULL);
- dataset = new DataSet (file.createDataSet (DSET_BOGUS_NAME, PredType::NATIVE_INT, space2, dscreatplist));
+ DataSpace space2(2, size, NULL);
+ dataset =
+ new DataSet(file.createDataSet(DSET_BOGUS_NAME, PredType::NATIVE_INT, space2, dscreatplist));
- dataset->write (static_cast<void*>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
- dataset->read (static_cast<void*>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset->write(static_cast<void *>(points), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL,
+ xfer);
+ dataset->read(static_cast<void *>(check), PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < size[1]; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("test_compression", "Failed in app-defined method");
}
@@ -714,17 +686,16 @@ test_compression(H5File& file)
PASSED();
/*----------------------------------------------------------------------
- * Cleanup
- *----------------------------------------------------------------------
- */
+ * Cleanup
+ *----------------------------------------------------------------------
+ */
delete dataset;
- delete [] tconv_buf;
+ delete[] tconv_buf;
return 0;
} // end try
// catch all dataset, file, space, and plist exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
@@ -732,12 +703,11 @@ test_compression(H5File& file)
if (dataset != NULL)
delete dataset;
if (tconv_buf)
- delete [] tconv_buf;
+ delete[] tconv_buf;
return -1;
}
-} // test_compression
+} // test_compression
-
/*-------------------------------------------------------------------------
* Function: test_nbit_methods
*
@@ -752,18 +722,19 @@ test_compression(H5File& file)
*
*-------------------------------------------------------------------------
*/
-const H5std_string DSET_NBIT_NAME("nbit_dataset");
-const hsize_t DIM1 = 2;
-const hsize_t DIM2 = 5;
-static herr_t test_nbit_compression(H5File& file)
+const H5std_string DSET_NBIT_NAME("nbit_dataset");
+const hsize_t DIM1 = 2;
+const hsize_t DIM2 = 5;
+static herr_t
+test_nbit_compression(H5File &file)
{
typedef struct {
- int i;
- char c;
+ int i;
+ char c;
short s;
} s1_t;
- const hsize_t size[2] = {DIM1, DIM2};
+ const hsize_t size[2] = {DIM1, DIM2};
const hsize_t chunk_size[2] = {DIM1, DIM2};
s1_t orig_data[DIM1][DIM2];
s1_t new_data[DIM1][DIM2];
@@ -771,8 +742,7 @@ static herr_t test_nbit_compression(H5File& file)
SUBTEST("N-bit compression (setup)");
- try
- {
+ try {
// Define datatypes of members of compound datatype
IntType i_type(PredType::NATIVE_INT);
IntType c_type(PredType::NATIVE_CHAR);
@@ -791,7 +761,7 @@ static herr_t test_nbit_compression(H5File& file)
mem_cmpd.insertMember("s", HOFFSET(s1_t, s), s_type);
// Set order of dataset compound datatype
- //cmpd.setOrder(H5T_ORDER_BE); only for atomic type?
+ // cmpd.setOrder(H5T_ORDER_BE); only for atomic type?
// Create the data space
DataSpace space(2, size);
@@ -806,36 +776,33 @@ static herr_t test_nbit_compression(H5File& file)
// Initialize data, assuming size of long long >= size of member datatypes
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
+ for (j = 0; j < size[1]; j++) {
orig_data[i][j].i = static_cast<int>(i * j);
orig_data[i][j].c = static_cast<char>('a' + i);
orig_data[i][j].s = static_cast<short>(i + j);
// Some even-numbered integer values are negative
- if ((i*size[1]+j+1)%2 == 0) {
+ if ((i * size[1] + j + 1) % 2 == 0) {
orig_data[i][j].i = -orig_data[i][j].i;
orig_data[i][j].s = static_cast<short>(-orig_data[i][j].s);
}
}
// Write to the dataset
- dataset.write(static_cast<void*>(orig_data), mem_cmpd);
+ dataset.write(static_cast<void *>(orig_data), mem_cmpd);
// Read the dataset back */
- dataset.read(static_cast<void*>(new_data), mem_cmpd);
+ dataset.read(static_cast<void *>(new_data), mem_cmpd);
// Check that the values read are the same as the values written.
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- if((new_data[i][j].i != orig_data[i][j].i) ||
- (new_data[i][j].c != orig_data[i][j].c) ||
- (new_data[i][j].s != orig_data[i][j].s))
- {
+ for (j = 0; j < size[1]; j++) {
+ if ((new_data[i][j].i != orig_data[i][j].i) || (new_data[i][j].c != orig_data[i][j].c) ||
+ (new_data[i][j].s != orig_data[i][j].s)) {
H5_FAILED();
printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n", static_cast<unsigned long>(i), static_cast<unsigned long>(j));
+ printf(" At index %lu,%lu\n", static_cast<unsigned long>(i),
+ static_cast<unsigned long>(j));
}
}
@@ -844,8 +811,7 @@ static herr_t test_nbit_compression(H5File& file)
} // end try block
// catch all dataset, file, space, and plist exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
@@ -853,7 +819,6 @@ static herr_t test_nbit_compression(H5File& file)
}
} // test_nbit_compression
-
/*-------------------------------------------------------------------------
* Function: test_multiopen
*
@@ -872,30 +837,30 @@ static herr_t test_nbit_compression(H5File& file)
*-------------------------------------------------------------------------
*/
static herr_t
-test_multiopen (H5File& file)
+test_multiopen(H5File &file)
{
SUBTEST("Multi-open with extending");
- DataSpace* space = NULL;
+ DataSpace *space = NULL;
try {
// Create a dataset creation property list
DSetCreatPropList dcpl;
// Set chunk size to given size
- hsize_t cur_size[1] = {10};
- dcpl.setChunk (1, cur_size);
+ hsize_t cur_size[1] = {10};
+ dcpl.setChunk(1, cur_size);
// Create a simple data space with unlimited size
hsize_t max_size[1] = {H5S_UNLIMITED};
- space = new DataSpace (1, cur_size, max_size);
+ space = new DataSpace(1, cur_size, max_size);
// Create first dataset
- DataSet dset1 = file.createDataSet ("multiopen", PredType::NATIVE_INT, *space, dcpl);
+ DataSet dset1 = file.createDataSet("multiopen", PredType::NATIVE_INT, *space, dcpl);
// Open again the first dataset from the file to another DataSet object.
- DataSet dset2 = file.openDataSet ("multiopen");
+ DataSet dset2 = file.openDataSet("multiopen");
// Relieve the dataspace
delete space;
@@ -903,17 +868,15 @@ test_multiopen (H5File& file)
// Extend the dimensionality of the first dataset
cur_size[0] = 20;
- dset1.extend (cur_size);
+ dset1.extend(cur_size);
// Get the size from the second handle
- space = new DataSpace (dset2.getSpace());
+ space = new DataSpace(dset2.getSpace());
- hsize_t tmp_size[1];
- space->getSimpleExtentDims (tmp_size);
- if (cur_size[0]!=tmp_size[0])
- {
- cerr << " Got " << (int)tmp_size[0] << " instead of "
- << (int)cur_size[0] << "!" << endl;
+ hsize_t tmp_size[1];
+ space->getSimpleExtentDims(tmp_size);
+ if (cur_size[0] != tmp_size[0]) {
+ cerr << " Got " << (int)tmp_size[0] << " instead of " << (int)cur_size[0] << "!" << endl;
throw Exception("test_multiopen", "Failed in multi-open with extending");
}
@@ -924,8 +887,7 @@ test_multiopen (H5File& file)
} // end try block
// catch all dataset, file, space, and plist exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
@@ -934,9 +896,8 @@ test_multiopen (H5File& file)
delete space;
return -1;
}
-} // test_multiopen
+} // test_multiopen
-
/*-------------------------------------------------------------------------
* Function: test_types
*
@@ -952,24 +913,24 @@ test_multiopen (H5File& file)
*-------------------------------------------------------------------------
*/
static herr_t
-test_types(H5File& file)
+test_types(H5File &file)
{
SUBTEST("Various datatypes");
- size_t i;
- DataSet* dset = NULL;
+ size_t i;
+ DataSet *dset = NULL;
try {
// Create a group in the file that was passed in from the caller
- Group grp = file.createGroup ("typetests");
+ Group grp = file.createGroup("typetests");
/* bitfield_1 */
- unsigned char buf[32];
- hsize_t nelmts = sizeof(buf);
- DataType type;
+ unsigned char buf[32];
+ hsize_t nelmts = sizeof(buf);
+ DataType type;
try { // block of bitfield_1
// test copying a predefined type
- type.copy (PredType::STD_B8LE);
+ type.copy(PredType::STD_B8LE);
// Test copying a user-defined type using DataType::copy
DataType copied_type;
@@ -980,7 +941,7 @@ test_types(H5File& file)
another_copied_type = type;
// Test copying a user-defined int type using DataType::operator=
- IntType orig_int(PredType::STD_B8LE);
+ IntType orig_int(PredType::STD_B8LE);
DataType generic_type;
generic_type = orig_int;
@@ -991,45 +952,45 @@ test_types(H5File& file)
IntType another_int_type;
another_int_type = new_int_type;
- DataSpace space (1, &nelmts);
+ DataSpace space(1, &nelmts);
dset = new DataSet(grp.createDataSet("bitfield_1", type, space));
// Fill buffer
- for (i=0; i<sizeof buf; i++)
+ for (i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
// Write data from buf using all default dataspaces and property list
- dset->write (buf, type);
+ dset->write(buf, type);
// no failure in bitfield_1, close this dataset
delete dset;
} // end try block of bitfield_1
// catch exceptions thrown in try block of bitfield_1
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
- cerr << " <<< " << "bitfield_1: " << E.getFuncName()
- << " - " << E.getDetailMsg() << " >>>" << endl << endl;
+ cerr << " <<< "
+ << "bitfield_1: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
+ << endl;
if (dset != NULL)
delete dset;
return -1;
}
/* bitfield_2 */
- nelmts = sizeof(buf)/2;
+ nelmts = sizeof(buf) / 2;
try { // bitfield_2 block
- type.copy (PredType::STD_B16LE);
- DataSpace space (1, &nelmts);
+ type.copy(PredType::STD_B16LE);
+ DataSpace space(1, &nelmts);
dset = new DataSet(grp.createDataSet("bitfield_2", type, space));
// Fill buffer
- for (i=0; i<sizeof(buf); i++)
+ for (i = 0; i < sizeof(buf); i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
// Write data from buf using all default dataspaces and property
// list; if writing fails, deallocate dset and return.
- dset->write (buf, type);
+ dset->write(buf, type);
// no failure in bitfield_2, close this dataset and reset for
// variable reuse
@@ -1038,44 +999,46 @@ test_types(H5File& file)
} // end try block of bitfield_2
// catch exceptions thrown in try block of bitfield_2
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
- cerr << " <<< " << "bitfield_2: " << E.getFuncName()
- << " - " << E.getDetailMsg() << " >>>" << endl << endl;
+ cerr << " <<< "
+ << "bitfield_2: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
+ << endl;
if (dset != NULL)
delete dset;
throw E; // propagate the exception
}
/* opaque_1 */
- DataType* optype = NULL;
+ DataType *optype = NULL;
try { // opaque_1 block
optype = new DataType(H5T_OPAQUE, 1);
nelmts = sizeof(buf);
- DataSpace space (1, &nelmts);
- optype->setTag ("testing 1-byte opaque type");
+ DataSpace space(1, &nelmts);
+ optype->setTag("testing 1-byte opaque type");
dset = new DataSet(grp.createDataSet("opaque_1", *optype, space));
// Fill buffer
- for (i=0; i<sizeof buf; i++)
+ for (i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
// Write data from buf using all default dataspaces and property
// list; if writing fails, deallocate dset and return.
- dset->write (buf, *optype);
+ dset->write(buf, *optype);
// no failure in opaque_1
- delete dset; dset = NULL;
- delete optype; optype = NULL;
+ delete dset;
+ dset = NULL;
+ delete optype;
+ optype = NULL;
} // end try block of opaque_1
// catch exceptions thrown in try block of opaque_1
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
- cerr << " <<< " << "opaque_1: " << E.getFuncName()
- << " - " << E.getDetailMsg() << " >>>" << endl << endl;
+ cerr << " <<< "
+ << "opaque_1: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
+ << endl;
if (dset != NULL)
delete dset;
if (optype != NULL)
@@ -1085,31 +1048,33 @@ test_types(H5File& file)
/* opaque_2 */
try { // block opaque_2
- nelmts = sizeof(buf)/4;
- DataSpace space (1, &nelmts);
+ nelmts = sizeof(buf) / 4;
+ DataSpace space(1, &nelmts);
optype = new DataType(H5T_OPAQUE, 4);
- optype->setTag ("testing 4-byte opaque type");
+ optype->setTag("testing 4-byte opaque type");
dset = new DataSet(grp.createDataSet("opaque_2", *optype, space));
// Fill buffer
- for (i=0; i<sizeof(buf); i++)
+ for (i = 0; i < sizeof(buf); i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
// Write data from buf using all default dataspaces and property
// list; if writing fails, deallocate dset and return.
- dset->write (buf, *optype);
+ dset->write(buf, *optype);
// no failure in opaque_1
- delete dset; dset = NULL;
- delete optype; optype = NULL;
- } //end try block of opaque_2
+ delete dset;
+ dset = NULL;
+ delete optype;
+ optype = NULL;
+ } // end try block of opaque_2
// catch exceptions thrown in try block of opaque_2
- catch (Exception& E)
- {
+ catch (Exception &E) {
cerr << " FAILED" << endl;
- cerr << " <<< " << "opaque_2: " << E.getFuncName()
- << " - " << E.getDetailMsg() << " >>>" << endl << endl;
+ cerr << " <<< "
+ << "opaque_2: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
+ << endl;
if (dset != NULL)
delete dset;
if (optype != NULL)
@@ -1121,13 +1086,11 @@ test_types(H5File& file)
return 0;
} // end top try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
return -1;
}
-} // test_types
+} // test_types
-
/*-------------------------------------------------------------------------
* Function: test_dset
*
@@ -1150,16 +1113,15 @@ test_types(H5File& file)
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_dset()
+extern "C" void
+test_dset()
{
- hid_t fapl_id;
+ hid_t fapl_id;
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
- int nerrors=0; // keep track of number of failures occurr
+ int nerrors = 0; // keep track of number of failures occurr
- try
- {
+ try {
// Use the file access template id to create a file access prop.
// list object to pass in H5File::H5File
FileAccPropList fapl(fapl_id);
@@ -1167,16 +1129,16 @@ void test_dset()
H5File file(FILE1, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
// Cause the library to emit initial messages
- Group grp = file.createGroup( "emit diagnostics", 0);
+ Group grp = file.createGroup("emit diagnostics", 0);
grp.setComment("Causes diagnostic messages to be emitted");
- nerrors += test_create(file) < 0 ? 1:0;
- nerrors += test_simple_io(file) < 0 ? 1:0;
- nerrors += test_tconv(file) < 0 ? 1:0;
- nerrors += test_compression(file) < 0 ? 1:0;
- nerrors += test_nbit_compression(file) < 0 ? 1:0;
- nerrors += test_multiopen (file) < 0 ? 1:0;
- nerrors += test_types(file) < 0 ? 1:0;
+ nerrors += test_create(file) < 0 ? 1 : 0;
+ nerrors += test_simple_io(file) < 0 ? 1 : 0;
+ nerrors += test_tconv(file) < 0 ? 1 : 0;
+ nerrors += test_compression(file) < 0 ? 1 : 0;
+ nerrors += test_nbit_compression(file) < 0 ? 1 : 0;
+ nerrors += test_multiopen(file) < 0 ? 1 : 0;
+ nerrors += test_types(file) < 0 ? 1 : 0;
// Close group "emit diagnostics".
grp.close();
@@ -1184,16 +1146,15 @@ void test_dset()
// Close the file before testing data size.
file.close();
- nerrors += test_datasize(fapl) <0 ? 1:0;
+ nerrors += test_datasize(fapl) < 0 ? 1 : 0;
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
test_report(nerrors, H5std_string(" Dataset"));
}
// Clean up data file
cleanup_dsets();
-} // test_dset
+} // test_dset
/*-------------------------------------------------------------------------
* Function: cleanup_dsets
@@ -1206,9 +1167,8 @@ void test_dset()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_dsets()
+extern "C" void
+cleanup_dsets()
{
HDremove(FILE1.c_str());
} // cleanup_dsets
-
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index 9f81895..a0dd077 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,13 +28,12 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
#include "h5test.h"
#include "h5cpputil.h"
-
/*-------------------------------------------------------------------------
* Function: test_report
*
@@ -51,24 +50,21 @@ using namespace H5;
*
*-------------------------------------------------------------------------
*/
-int test_report( int nerrors, const H5std_string& testname )
+int
+test_report(int nerrors, const H5std_string &testname)
{
- if (nerrors)
- {
- nerrors = MAX(1, nerrors);
+ if (nerrors) {
+ nerrors = MAX(1, nerrors);
if (1 == nerrors)
- cerr << "***** " << nerrors << testname
- << " TEST FAILED! *****" << endl;
+ cerr << "***** " << nerrors << testname << " TEST FAILED! *****" << endl;
else
- cerr << "***** " << nerrors << testname
- << " TESTS FAILED! *****" << endl;
- return 1;
- }
- else
- {
- cerr << "All" << testname << " tests passed." << endl;
- return 0;
- }
+ cerr << "***** " << nerrors << testname << " TESTS FAILED! *****" << endl;
+ return 1;
+ }
+ else {
+ cerr << "All" << testname << " tests passed." << endl;
+ return 0;
+ }
}
/*-------------------------------------------------------------------------
@@ -83,14 +79,14 @@ int test_report( int nerrors, const H5std_string& testname )
*
*-------------------------------------------------------------------------
*/
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* message)
+void
+issue_fail_msg(const char *where, int line, const char *file_name, const char *message)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << ">>> FAILED in " << where << " at line " << line
- << " in " << file_name << " - " << message << endl << endl;
+ cerr << ">>> FAILED in " << where << " at line " << line << " in " << file_name << " - " << message
+ << endl
+ << endl;
}
}
@@ -106,15 +102,15 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
*
*-------------------------------------------------------------------------
*/
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* func_name, const char* message)
+void
+issue_fail_msg(const char *where, int line, const char *file_name, const char *func_name, const char *message)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << ">>> FAILED in " << where << ": " << func_name << endl <<
- " at line " << line << " in " << file_name << endl <<
- " C library detail: " << message << endl << endl;
+ cerr << ">>> FAILED in " << where << ": " << func_name << endl
+ << " at line " << line << " in " << file_name << endl
+ << " C library detail: " << message << endl
+ << endl;
}
}
@@ -137,13 +133,13 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
*
*-------------------------------------------------------------------------
*/
-int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
+int
+check_values(hsize_t i, hsize_t j, int apoint, int acheck)
{
- if (apoint != acheck)
- {
+ if (apoint != acheck) {
cerr << " Read different values than written.\n" << endl;
- cerr << " At index " << static_cast<unsigned long>(i) << "," <<
- static_cast<unsigned long>(j) << endl;
+ cerr << " At index " << static_cast<unsigned long>(i) << "," << static_cast<unsigned long>(j)
+ << endl;
return -1;
}
return 0;
@@ -165,20 +161,18 @@ int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
*
*-------------------------------------------------------------------------
*/
-void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name)
+void
+verify_val(const char *x, const char *value, const char *where, int line, const char *file_name)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << " Call to routine: " << where << " at line " << line
- << " in " << file_name << " had value " << x << endl;
+ cerr << " Call to routine: " << where << " at line " << line << " in " << file_name << " had value "
+ << x << endl;
}
- if (strcmp(x, value) != 0)
- {
+ if (strcmp(x, value) != 0) {
cerr << endl;
- cerr << "*** UNEXPECTED VALUE from " << where << " should be "
- << value << ", but is " << x << " at line " << line
- << " in " << file_name << endl;
+ cerr << "*** UNEXPECTED VALUE from " << where << " should be " << value << ", but is " << x
+ << " at line " << line << " in " << file_name << endl;
IncTestNumErrs();
throw TestFailedException(where, "");
}
@@ -187,7 +181,7 @@ void verify_val(const char* x, const char* value, const char* where, int line, c
//--------------------------------------------------------------------------
// Function: InvalidActionException default constructor
//--------------------------------------------------------------------------
-InvalidActionException::InvalidActionException():Exception(){}
+InvalidActionException::InvalidActionException() : Exception() {}
//--------------------------------------------------------------------------
// Function: InvalidActionException overloaded constructor
@@ -199,7 +193,10 @@ InvalidActionException::InvalidActionException():Exception(){}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
-InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message) : Exception(func, message) {}
+InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: InvalidActionException destructor
@@ -209,7 +206,7 @@ InvalidActionException::~InvalidActionException() throw() {}
//--------------------------------------------------------------------------
// Function: TestFailedException default constructor
//--------------------------------------------------------------------------
-TestFailedException::TestFailedException():Exception(){}
+TestFailedException::TestFailedException() : Exception() {}
//--------------------------------------------------------------------------
// Function: TestFailedException overloaded constructor
@@ -221,10 +218,12 @@ TestFailedException::TestFailedException():Exception(){}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
-TestFailedException::TestFailedException(const H5std_string func, const H5std_string message) : Exception(func, message) {}
+TestFailedException::TestFailedException(const H5std_string func, const H5std_string message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: TestFailedException destructor
//--------------------------------------------------------------------------
TestFailedException::~TestFailedException() throw() {}
-
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index 53f1663..1f93290 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -31,91 +31,94 @@ using std::cerr;
using std::endl;
#endif
-#define MESSAGE(V,A) {if (HDGetTestVerbosity()>(V)) print_func A;}
-#define SUBTEST(TEST) {printf(" Subtest: %-52s",TEST); fflush(stdout);}
+#define MESSAGE(V, A) \
+ { \
+ if (HDGetTestVerbosity() > (V)) \
+ print_func A; \
+ }
+#define SUBTEST(TEST) \
+ { \
+ printf(" Subtest: %-52s", TEST); \
+ fflush(stdout); \
+ }
-int check_values (hsize_t i, hsize_t j, int apoint, int acheck);
-int test_report (int, const H5std_string&);
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* message="");
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* func_name, const char* message);
+int check_values(hsize_t i, hsize_t j, int apoint, int acheck);
+int test_report(int, const H5std_string &);
+void issue_fail_msg(const char *where, int line, const char *file_name, const char *message = "");
+void issue_fail_msg(const char *where, int line, const char *file_name, const char *func_name,
+ const char *message);
class InvalidActionException : public Exception {
- public:
- InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
- InvalidActionException();
- virtual ~InvalidActionException() throw();
+ public:
+ InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
+ InvalidActionException();
+ virtual ~InvalidActionException() throw();
};
class TestFailedException : public Exception {
- public:
- TestFailedException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
- TestFailedException();
- virtual ~TestFailedException() throw();
+ public:
+ TestFailedException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
+ TestFailedException();
+ virtual ~TestFailedException() throw();
};
// Overloaded/Template functions to verify values and display proper info
-void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name);
+void verify_val(const char *x, const char *value, const char *where, int line, const char *file_name);
template <class Type1, class Type2>
- void verify_val(Type1 x, Type2 value, const char* where, int line, const char* file_name)
+void
+verify_val(Type1 x, Type2 value, const char *where, int line, const char *file_name)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << " Call to routine: " << where << " at line " << line
- << " in " << file_name << " had value " << x << endl;
+ cerr << " Call to routine: " << where << " at line " << line << " in " << file_name << " had value "
+ << x << endl;
}
- if (x != value)
- {
+ if (x != value) {
cerr << endl;
- cerr << "*** UNEXPECTED VALUE from " << where << " should be "
- << value << ", but is " << x << " at line " << line
- << " in " << file_name << endl;
+ cerr << "*** UNEXPECTED VALUE from " << where << " should be " << value << ", but is " << x
+ << " at line " << line << " in " << file_name << endl;
IncTestNumErrs();
throw TestFailedException(where, "");
}
}
template <class Type1, class Type2>
- void verify_val(Type1 x, Type2 value, const char* msg, const char* file_name, int line)
+void
+verify_val(Type1 x, Type2 value, const char *msg, const char *file_name, int line)
{
- if (x != value)
- {
+ if (x != value) {
cerr << endl;
- cerr << "*** UNEXPECTED VALUE: " << file_name << ":line " << line
- << ":" << msg << " different: " << x << ", should be " << value
- << endl;
+ cerr << "*** UNEXPECTED VALUE: " << file_name << ":line " << line << ":" << msg << " different: " << x
+ << ", should be " << value << endl;
IncTestNumErrs();
throw TestFailedException(file_name, msg);
}
}
template <class Type1, class Type2>
- void verify_val_noteq(Type1 x, Type2 value, const char* where, int line, const char* file_name)
+void
+verify_val_noteq(Type1 x, Type2 value, const char *where, int line, const char *file_name)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << " Call to routine: " << where << " at line " << line
- << " in " << file_name << " had value " << x << endl;
+ cerr << " Call to routine: " << where << " at line " << line << " in " << file_name << " had value "
+ << x << endl;
}
- if (x == value)
- {
+ if (x == value) {
cerr << endl;
- cerr << "*** UNEXPECTED VALUE from " << where << " should not be "
- << value << " at line " << line << " in " << file_name << endl;
+ cerr << "*** UNEXPECTED VALUE from " << where << " should not be " << value << " at line " << line
+ << " in " << file_name << endl;
IncTestNumErrs();
throw TestFailedException(where, "");
}
}
template <class Type1, class Type2>
- void CHECK(Type1 x, Type2 value, const char* msg, int line, const char* file_name)
+void
+CHECK(Type1 x, Type2 value, const char *msg, int line, const char *file_name)
{
- if (x == value)
- {
+ if (x == value) {
cerr << endl;
cerr << "*** Function " << msg << " FAILED at line " << line << endl;
IncTestNumErrs();
@@ -123,7 +126,6 @@ template <class Type1, class Type2>
}
}
-
/* Prototypes for the test routines */
extern "C" {
void test_array();
@@ -154,7 +156,6 @@ void cleanup_object();
void cleanup_reference();
void cleanup_types();
void cleanup_vlstrings();
-
}
/* not yet
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index 218e4e5..07b60af 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,28 +26,35 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
-const H5std_string FILENAME("tarray.h5");
-const H5std_string ARRAYTYPE_NAME("/Array type 1");
-const int SPACE1_RANK = 1;
-const hsize_t SPACE1_DIM1 = 4;
-const int ARRAY1_RANK = 1;
-const hsize_t ARRAY1_DIM1 = 4;
+const H5std_string FILENAME("tarray.h5");
+const H5std_string ARRAYTYPE_NAME("/Array type 1");
+const int SPACE1_RANK = 1;
+const hsize_t SPACE1_DIM1 = 4;
+const int ARRAY1_RANK = 1;
+const hsize_t ARRAY1_DIM1 = 4;
-typedef enum flt_t {
- FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER
-} flt_t;
+typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t;
typedef enum int_t {
- INT_CHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
- INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, INT_OTHER
+ INT_CHAR,
+ INT_UCHAR,
+ INT_SHORT,
+ INT_USHORT,
+ INT_INT,
+ INT_UINT,
+ INT_LONG,
+ INT_ULONG,
+ INT_LLONG,
+ INT_ULLONG,
+ INT_OTHER
} int_t;
-
/*-------------------------------------------------------------------------
* Function: test_array_compound_array
*
@@ -60,29 +67,29 @@ typedef enum int_t {
*
*-------------------------------------------------------------------------
*/
-static void test_array_compound_array()
+static void
+test_array_compound_array()
{
SUBTEST("ArrayType::getArrayNDims & ArrayType::getArrayDims");
- typedef struct { // Typedef for compound datatype */
- int i;
+ typedef struct { // Typedef for compound datatype */
+ int i;
float f[ARRAY1_DIM1];
} s1_t;
- s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information to write
- s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information read in
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int nmemb; // Number of compound members
- int ii; // counting variables
- hsize_t idxi, idxj, idxk; // dimension indicing variables
- H5T_class_t mclass; // Datatype class for field
+ s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information to write
+ s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information read in
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int nmemb; // Number of compound members
+ int ii; // counting variables
+ hsize_t idxi, idxj, idxk; // dimension indicing variables
+ H5T_class_t mclass; // Datatype class for field
// Initialize array data to write
- for (idxi =0; idxi < SPACE1_DIM1; idxi++)
+ for (idxi = 0; idxi < SPACE1_DIM1; idxi++)
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
wdata[idxi][idxj].i = idxi * 10 + idxj;
- for(idxk = 0; idxk < ARRAY1_DIM1; idxk++)
- {
- float temp = idxi * 10.0 + idxj * 2.5 + idxk;
+ for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
+ float temp = idxi * 10.0 + idxj * 2.5 + idxk;
wdata[idxi][idxj].f[idxk] = temp;
}
} // end for
@@ -158,8 +165,8 @@ static void test_array_compound_array()
// Verify that it is an array of compounds
DataType dstype = dataset.getDataType();
- mclass = dstype.getClass();
- verify_val(mclass==H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
+ mclass = dstype.getClass();
+ verify_val(mclass == H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
dstype.close();
@@ -175,11 +182,12 @@ static void test_array_compound_array()
atype_check.getArrayDims(rdims1);
// Check the array dimensions
- for (ii =0; ii <ndims; ii++)
- if (rdims1[ii]!=tdims1[ii]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n", ii, rdims1[ii], ii, tdims1[ii]);
- continue;
- } // end if
+ for (ii = 0; ii < ndims; ii++)
+ if (rdims1[ii] != tdims1[ii]) {
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n",
+ ii, rdims1[ii], ii, tdims1[ii]);
+ continue;
+ } // end if
// Test ArrayType::ArrayType(const hid_t existing_id)
ArrayType new_arrtype(atype_check.getId());
@@ -194,9 +202,10 @@ static void test_array_compound_array()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n", ii, rdims1[ii], ii, tdims1[ii]);
- continue;
- } // end if
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n",
+ ii, rdims1[ii], ii, tdims1[ii]);
+ continue;
+ } // end if
/*
* Check the compound datatype and the array of floats datatype
@@ -205,28 +214,28 @@ static void test_array_compound_array()
// Get the compound datatype, which is the base datatype of the
// array datatype atype_check.
DataType base_type = atype_check.getSuper();
- mclass = base_type.getClass();
- verify_val(mclass==H5T_COMPOUND, true, "atype_check.getClass", __LINE__, __FILE__);
+ mclass = base_type.getClass();
+ verify_val(mclass == H5T_COMPOUND, true, "atype_check.getClass", __LINE__, __FILE__);
// Verify the compound datatype info
CompType ctype_check(base_type.getId());
base_type.close();
-
+
// Check the number of members
nmemb = ctype_check.getNmembers();
verify_val(nmemb, 2, "ctype_check.getNmembers", __LINE__, __FILE__);
// Check the 2nd field's name
H5std_string field2_name = ctype_check.getMemberName(1);
- if (HDstrcmp(field2_name.c_str(),"f") != 0)
- TestErrPrintf("Compound field name doesn't match!, field2_name=%s\n",field2_name.c_str());
+ if (HDstrcmp(field2_name.c_str(), "f") != 0)
+ TestErrPrintf("Compound field name doesn't match!, field2_name=%s\n", field2_name.c_str());
// Get the 2nd field's datatype
DataType f2_type = ctype_check.getMemberDataType(1);
// Get the 2nd field's class, this 2nd field should have an array type
mclass = f2_type.getClass();
- verify_val(mclass==H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
+ verify_val(mclass == H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
f2_type.close();
// Get the 2nd field, array of floats datatype, to check
@@ -243,7 +252,8 @@ static void test_array_compound_array()
// Check the array dimensions
for (ii = 0; ii < ndims; ii++)
if (rdims1[ii] != tdims1[ii]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n", ii, rdims1[ii], ii, tdims1[ii]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=%zd\n",
+ ii, rdims1[ii], ii, tdims1[ii]);
continue;
} // end if
@@ -258,26 +268,26 @@ static void test_array_compound_array()
for (idxi = 0; idxi < SPACE1_DIM1; idxi++) {
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
if (wdata[idxi][idxj].i != rdata[idxi][idxj].i) {
- TestErrPrintf("Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n",idxi,idxj,wdata[idxi][idxj].i,idxi,idxj,rdata[idxi][idxj].i);
+ TestErrPrintf(
+ "Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n",
+ idxi, idxj, wdata[idxi][idxj].i, idxi, idxj, rdata[idxi][idxj].i);
continue;
} // end if
- } // end for
- } // end for
+ } // end for
+ } // end for
// Close all
atype_check.close();
dataset.close();
file1.close();
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_array_compound_array", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_array_compound_array()
-
/*-------------------------------------------------------------------------
* Function: test_array_assignment
*
@@ -296,16 +306,19 @@ static void test_array_compound_array()
/*
* Helper routine to demonstrate the issue in HDFFV-9562
*/
-H5::DataType getArr()
+H5::DataType
+getArr()
{
- hsize_t *dims = new hsize_t;
- *dims = 5;
- H5::ArrayType ret;
- ret = H5::ArrayType(H5::PredType::NATIVE_INT, 1, dims);
- delete[] dims;
- return ret; }
-
-static void test_array_assignment()
+ hsize_t *dims = new hsize_t;
+ *dims = 5;
+ H5::ArrayType ret;
+ ret = H5::ArrayType(H5::PredType::NATIVE_INT, 1, dims);
+ delete[] dims;
+ return ret;
+}
+
+static void
+test_array_assignment()
{
hsize_t sdims1[] = {SPACE1_DIM1};
SUBTEST("ArrayType::operator=");
@@ -342,14 +355,12 @@ static void test_array_assignment()
file1.close();
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_array_assignment", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_array_assignment()
-
/*-------------------------------------------------------------------------
* Function: test_array_info
*
@@ -362,29 +373,27 @@ static void test_array_assignment()
*
*-------------------------------------------------------------------------
*/
-static void test_array_info()
+static void
+test_array_info()
{
SUBTEST("ArrayType Const Methods");
- typedef struct { // Typedef for compound datatype */
- int i;
+ typedef struct { // Typedef for compound datatype */
+ int i;
float f[ARRAY1_DIM1];
} s1_t;
- s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information to write
- s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information read in
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int nmemb; // Number of compound members
- int ii; // counting variables
- hsize_t idxi, idxj, idxk; // dimension indicing variables
- H5T_class_t mclass; // Datatype class for field
+ s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information to write
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ii; // counting variables
+ hsize_t idxi, idxj, idxk; // dimension indicing variables
+ H5T_class_t mclass; // Datatype class for field
// Initialize array data to write
- for (idxi =0; idxi < SPACE1_DIM1; idxi++)
+ for (idxi = 0; idxi < SPACE1_DIM1; idxi++)
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
wdata[idxi][idxj].i = idxi * 10 + idxj;
- for(idxk = 0; idxk < ARRAY1_DIM1; idxk++)
- {
- float temp = idxi * 10.0 + idxj * 2.5 + idxk;
+ for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
+ float temp = idxi * 10.0 + idxj * 2.5 + idxk;
wdata[idxi][idxj].f[idxk] = temp;
}
} // end for
@@ -433,51 +442,51 @@ static void test_array_info()
// Verify that it is an array of compounds
DataType dstype = dataset.getDataType();
- mclass = dstype.getClass();
- verify_val(mclass==H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
+ mclass = dstype.getClass();
+ verify_val(mclass == H5T_ARRAY, true, "f2_type.getClass", __LINE__, __FILE__);
dstype.close();
{ // Let atype_check go out of scope
- // Get the array datatype, declared as const
- const ArrayType atype_check = dataset.getArrayType();
-
- // Check the array rank with the const method
- int ndims = atype_check.getArrayNDims();
- verify_val(ndims, ARRAY1_RANK, "atype_check.getArrayNDims", __LINE__, __FILE__);
-
- // Get the array dimensions with the const method
- hsize_t rdims1[H5S_MAX_RANK];
- atype_check.getArrayDims(rdims1);
-
- // Check the array dimensions
- for (ii =0; ii <ndims; ii++)
- if (rdims1[ii]!=tdims1[ii]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n", ii, rdims1[ii], ii, tdims1[ii]);
- continue;
- } // end if
+ // Get the array datatype, declared as const
+ const ArrayType atype_check = dataset.getArrayType();
+
+ // Check the array rank with the const method
+ int ndims = atype_check.getArrayNDims();
+ verify_val(ndims, ARRAY1_RANK, "atype_check.getArrayNDims", __LINE__, __FILE__);
+
+ // Get the array dimensions with the const method
+ hsize_t rdims1[H5S_MAX_RANK];
+ atype_check.getArrayDims(rdims1);
+
+ // Check the array dimensions
+ for (ii = 0; ii < ndims; ii++)
+ if (rdims1[ii] != tdims1[ii]) {
+ TestErrPrintf(
+ "Array dimension information doesn't match!, rdims1[%d]=%zd, tdims1[%d]=z%d\n", ii,
+ rdims1[ii], ii, tdims1[ii]);
+ continue;
+ } // end if
}
// Close all
dataset.close();
file1.close();
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_array_info", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_array_info()
-
/****************************************************************
**
** test_array(): Main datatypes testing routine.
**
****************************************************************/
-extern "C"
-void test_array()
+extern "C" void
+test_array()
{
// Output message about test being performed
MESSAGE(5, ("Testing Array Datatypes\n"));
@@ -491,9 +500,8 @@ void test_array()
// Test const functions (HDFFV-9725)
test_array_info();
-} // test_array()
+} // test_array()
-
/*-------------------------------------------------------------------------
* Function: cleanup_array
*
@@ -506,8 +514,8 @@ void test_array()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_array()
+extern "C" void
+cleanup_array()
{
HDremove(FILENAME.c_str());
-} // cleanup_array
+} // cleanup_array
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 25b5ff8..1114568 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,22 +27,23 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
-const H5std_string FILE_BASIC("tattr_basic.h5");
-const H5std_string FILE_COMPOUND("tattr_compound.h5");
-const H5std_string FILE_SCALAR("tattr_scalar.h5");
-const H5std_string FILE_MULTI("tattr_multi.h5");
-const H5std_string FILE_DTYPE("tattr_dtype.h5");
-const H5std_string ATTR_TMP_NAME("temp_attr_name");
-const H5std_string FATTR_TMP_NAME("temp_fattr_name");
-const size_t ATTR_MAX_DIMS = 7;
+const H5std_string FILE_BASIC("tattr_basic.h5");
+const H5std_string FILE_COMPOUND("tattr_compound.h5");
+const H5std_string FILE_SCALAR("tattr_scalar.h5");
+const H5std_string FILE_MULTI("tattr_multi.h5");
+const H5std_string FILE_DTYPE("tattr_dtype.h5");
+const H5std_string ATTR_TMP_NAME("temp_attr_name");
+const H5std_string FATTR_TMP_NAME("temp_fattr_name");
+const size_t ATTR_MAX_DIMS = 7;
/* 3-D dataset with fixed dimensions */
-const int SPACE1_RANK = 3;
+const int SPACE1_RANK = 3;
const hsize_t SPACE1_DIM1 = 3;
const hsize_t SPACE1_DIM2 = 15;
const hsize_t SPACE1_DIM3 = 13;
@@ -54,52 +55,54 @@ const H5std_string TYPE1_NAME("/Type");
/* Attribute Rank & Dimensions */
const H5std_string ATTR1_NAME("Attr1");
-const int ATTR1_RANK = 1;
-const hsize_t ATTR1_DIM1 = 3;
-int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
+const int ATTR1_RANK = 1;
+const hsize_t ATTR1_DIM1 = 3;
+int attr_data1[ATTR1_DIM1] = {512, -234, 98123}; /* Test data for 1st attribute */
// File attribute, using the same rank and dimensions as ATTR1_NAME's
const H5std_string FATTR1_NAME("File Attr1");
const H5std_string FATTR2_NAME("File Attr2");
const H5std_string ATTR2_NAME("Attr2");
-const int ATTR2_RANK = 2;
-const hsize_t ATTR2_DIM1 = 2;
-const hsize_t ATTR2_DIM2 = 2;
-int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */
+const int ATTR2_RANK = 2;
+const hsize_t ATTR2_DIM1 = 2;
+const hsize_t ATTR2_DIM2 = 2;
+int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416}, {197814, -3}}; /* Test data for 2nd attribute */
const H5std_string ATTR3_NAME("Attr3");
-const int ATTR3_RANK = 3;
-const hsize_t ATTR3_DIM1 = 2;
-const hsize_t ATTR3_DIM2 = 2;
-const hsize_t ATTR3_DIM3 = 2;
-double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3,-26.1},{0.123,-10.0}},{{981724.2,-0.91827},{2.0,23.0}}}; /* Test data for 3rd attribute */
+const int ATTR3_RANK = 3;
+const hsize_t ATTR3_DIM1 = 2;
+const hsize_t ATTR3_DIM2 = 2;
+const hsize_t ATTR3_DIM3 = 2;
+double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
+ {{2.3, -26.1}, {0.123, -10.0}}, {{981724.2, -0.91827}, {2.0, 23.0}}}; /* Test data for 3rd attribute */
const H5std_string ATTR4_NAME("Attr4");
-const int ATTR4_RANK = 2;
-const hsize_t ATTR4_DIM1 = 2;
-const hsize_t ATTR4_DIM2 = 2;
+const int ATTR4_RANK = 2;
+const hsize_t ATTR4_DIM1 = 2;
+const hsize_t ATTR4_DIM2 = 2;
const H5std_string ATTR4_FIELDNAME1("i");
const H5std_string ATTR4_FIELDNAME2("d");
const H5std_string ATTR4_FIELDNAME3("c");
-size_t attr4_field1_off=0;
-size_t attr4_field2_off=0;
-size_t attr4_field3_off=0;
+size_t attr4_field1_off = 0;
+size_t attr4_field2_off = 0;
+size_t attr4_field3_off = 0;
struct attr4_struct {
- int i;
+ int i;
double d;
- char c;
- } attr_data4[ATTR4_DIM1][ATTR4_DIM2]={{{3,-26.1,'d'},{-100000, 0.123,'3'}},
- {{-23,981724.2,'Q'},{0,2.0,'\n'}}}; // Test data for 4th attribute
+ char c;
+} attr_data4[ATTR4_DIM1][ATTR4_DIM2] = {
+ {{3, -26.1, 'd'}, {-100000, 0.123, '3'}},
+ {{-23, 981724.2, 'Q'}, {0, 2.0, '\n'}}}; // Test data for 4th attribute
const H5std_string ATTR5_NAME("Attr5");
-const int ATTR5_RANK = 0;
-float attr_data5 = (float)-5.123; // Test data for 5th attribute
+const int ATTR5_RANK = 0;
+float attr_data5 = (float)-5.123; // Test data for 5th attribute
/* Info for another attribute */
const H5std_string ATTR1A_NAME("Attr1_a");
-int attr_data1a[ATTR1_DIM1]={256,11945,-22107};
+int attr_data1a[ATTR1_DIM1] = {256, 11945, -22107};
/****************************************************************
**
@@ -107,12 +110,13 @@ int attr_data1a[ATTR1_DIM1]={256,11945,-22107};
** Tests integer attributes on both datasets and groups
**
****************************************************************/
-static void test_attr_basic_write()
+static void
+test_attr_basic_write()
{
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR1_DIM1};
- hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
- int read_data1[ATTR1_DIM1]={0}; // Buffer for reading 1st attribute
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR1_DIM1};
+ hsize_t dims3[] = {ATTR2_DIM1, ATTR2_DIM2};
+ int read_data1[ATTR1_DIM1] = {0}; // Buffer for reading 1st attribute
hsize_t i;
// Output message about test being performed
@@ -120,10 +124,10 @@ static void test_attr_basic_write()
try {
// Create file
- H5File fid1 (FILE_BASIC, H5F_ACC_TRUNC);
+ H5File fid1(FILE_BASIC, H5F_ACC_TRUNC);
// Create dataspace for dataset
- DataSpace ds_space (SPACE1_RANK, dims1);
+ DataSpace ds_space(SPACE1_RANK, dims1);
/*
* Test attribute with dataset
@@ -133,55 +137,59 @@ static void test_attr_basic_write()
DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR, ds_space);
// Create dataspace for attribute
- DataSpace att_space (ATTR1_RANK, dims2);
+ DataSpace att_space(ATTR1_RANK, dims2);
// Create a file attribute
- Attribute file_attr2 = fid1.createAttribute (FATTR1_NAME, PredType::NATIVE_INT, att_space);
+ Attribute file_attr2 = fid1.createAttribute(FATTR1_NAME, PredType::NATIVE_INT, att_space);
// Create a file attribute
- Attribute file_attr1 = fid1.createAttribute (FATTR2_NAME, PredType::NATIVE_INT, att_space);
+ Attribute file_attr1 = fid1.createAttribute(FATTR2_NAME, PredType::NATIVE_INT, att_space);
// Create an attribute for the dataset
- Attribute ds_attr1 = dataset.createAttribute (ATTR1_NAME, PredType::NATIVE_INT, att_space);
+ Attribute ds_attr1 = dataset.createAttribute(ATTR1_NAME, PredType::NATIVE_INT, att_space);
// Try creating an attribute that already exists. This should fail
// since two attributes cannot have the same name. If an exception
// is not thrown for this action by createAttribute, then throw an
// invalid action exception.
try {
- Attribute invalid_attr = dataset.createAttribute (ATTR1_NAME, PredType::NATIVE_INT, att_space);
+ Attribute invalid_attr = dataset.createAttribute(ATTR1_NAME, PredType::NATIVE_INT, att_space);
// continuation here, that means no exception has been thrown
- throw InvalidActionException("H5File::createDataSet", "Library allowed overwrite of existing dataset");
+ throw InvalidActionException("H5File::createDataSet",
+ "Library allowed overwrite of existing dataset");
}
- catch (AttributeIException& E) // catching invalid creating attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid creating attribute
+ {
+ } // do nothing, exception expected
// Write attribute information
- ds_attr1.write (PredType::NATIVE_INT, attr_data1);
+ ds_attr1.write(PredType::NATIVE_INT, attr_data1);
// Read attribute information immediately, without closing attribute
- ds_attr1.read (PredType::NATIVE_INT, read_data1);
+ ds_attr1.read(PredType::NATIVE_INT, read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n",__LINE__,i,attr_data1[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
+ i, attr_data1[i], i, read_data1[i]);
// Create two more attributes for this dataset, but only write to one.
- Attribute ds_attr2 = dataset.createAttribute (ATTR2_NAME, PredType::NATIVE_INT, att_space);
- Attribute ds_attr3 = dataset.createAttribute (ATTR3_NAME, PredType::NATIVE_INT, att_space);
+ Attribute ds_attr2 = dataset.createAttribute(ATTR2_NAME, PredType::NATIVE_INT, att_space);
+ Attribute ds_attr3 = dataset.createAttribute(ATTR3_NAME, PredType::NATIVE_INT, att_space);
// Write attribute information
- ds_attr2.write (PredType::NATIVE_INT, attr_data1a);
+ ds_attr2.write(PredType::NATIVE_INT, attr_data1a);
// Read attribute information immediately, without closing attribute
- ds_attr2.read (PredType::NATIVE_INT, read_data1);
+ ds_attr2.read(PredType::NATIVE_INT, read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1a[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",__LINE__,i,attr_data1a[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1a[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",
+ __LINE__, i, attr_data1a[i], i, read_data1[i]);
// Close both attributes
ds_attr1.close();
@@ -193,45 +201,45 @@ static void test_attr_basic_write()
*/
// Create group in file fid1
- Group group = fid1.createGroup (GROUP1_NAME);
+ Group group = fid1.createGroup(GROUP1_NAME);
// Create dataspace for attribute
DataSpace sid3(ATTR2_RANK, dims3);
// Create an attribute for the group
- Attribute gr_attr = group.createAttribute (ATTR2_NAME, PredType::NATIVE_INT, sid3);
+ Attribute gr_attr = group.createAttribute(ATTR2_NAME, PredType::NATIVE_INT, sid3);
// Check storage size for attribute
hsize_t attr_size = gr_attr.getStorageSize();
- verify_val((long)attr_size, (long)(ATTR2_DIM1*ATTR2_DIM2*sizeof(int)),
- "Attribute::getStorageSize",__LINE__,__FILE__);
+ verify_val((long)attr_size, (long)(ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)),
+ "Attribute::getStorageSize", __LINE__, __FILE__);
// Try to create the same attribute again (should fail)
try {
- Attribute invalid_attr = group.createAttribute (ATTR2_NAME, PredType::NATIVE_INT, sid3);
+ Attribute invalid_attr = group.createAttribute(ATTR2_NAME, PredType::NATIVE_INT, sid3);
// continuation here, that means no exception has been thrown
throw InvalidActionException("H5Group::createAttribute",
- "Attempting to create an existing attribute");
+ "Attempting to create an existing attribute");
}
- catch (AttributeIException& E) // catching invalid creating attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid creating attribute
+ {
+ } // do nothing, exception expected
// Write attribute information
- gr_attr.write (PredType::NATIVE_INT, attr_data2);
+ gr_attr.write(PredType::NATIVE_INT, attr_data2);
// Check storage size for attribute
attr_size = gr_attr.getStorageSize();
- verify_val((long)attr_size, (long)(ATTR2_DIM1*ATTR2_DIM2*sizeof(int)),
- "Attribute::getStorageSize", __LINE__, __FILE__);
+ verify_val((long)attr_size, (long)(ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)),
+ "Attribute::getStorageSize", __LINE__, __FILE__);
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_basic_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_basic_write()
+} // test_attr_basic_write()
/****************************************************************
**
@@ -256,7 +264,8 @@ static void test_attr_basic_write()
** With buffer size equals the name's length, i.e., buf_size=0
**
****************************************************************/
-static void test_attr_getname()
+static void
+test_attr_getname()
{
// Output message about test being performed
SUBTEST("Testing all overloads of Attribute::getName");
@@ -274,7 +283,7 @@ static void test_attr_getname()
if (attr_exists == false)
throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
- // Open attribute
+ // Open attribute
Attribute fattr1(fid1.openAttribute(FATTR1_NAME));
// A. Get attribute name with
@@ -282,36 +291,37 @@ static void test_attr_getname()
// using different buffer sizes and verify against FATTR1_NAME (3 cases)
// 1. With arbitrary buf_size that is larger than the name size
- size_t buf_size = FATTR1_NAME.length() + 10;
- char* fattr1_name = new char[buf_size+1];
- HDmemset(fattr1_name, 0, buf_size+1);
+ size_t buf_size = FATTR1_NAME.length() + 10;
+ char * fattr1_name = new char[buf_size + 1];
+ HDmemset(fattr1_name, 0, buf_size + 1);
ssize_t name_size = 0; // actual length of attribute name
- name_size = fattr1.getName(fattr1_name, buf_size+1);
+ name_size = fattr1.getName(fattr1_name, buf_size + 1);
CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
verify_val((size_t)name_size, FATTR1_NAME.length(), "Attribute::getName", __LINE__, __FILE__);
- verify_val((const char*)fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
- delete []fattr1_name;
+ verify_val((const char *)fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
+ delete[] fattr1_name;
// 2. With arbitrary buf_size that is smaller than the name's length.
// Let's try 4 first characters in the name.
- buf_size = 4;
+ buf_size = 4;
char short_name[5] = "File"; // to verify the read name
- fattr1_name = new char[buf_size+1];
- HDmemset(fattr1_name, 0, buf_size+1);
- name_size = fattr1.getName(fattr1_name, buf_size+1);
+ fattr1_name = new char[buf_size + 1];
+ HDmemset(fattr1_name, 0, buf_size + 1);
+ name_size = fattr1.getName(fattr1_name, buf_size + 1);
CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
verify_val((size_t)name_size, FATTR1_NAME.size(), "Attribute::getName", __LINE__, __FILE__);
- verify_val((const char*)fattr1_name, (const char*)short_name, "Attribute::getName", __LINE__, __FILE__);
- delete []fattr1_name;
+ verify_val((const char *)fattr1_name, (const char *)short_name, "Attribute::getName", __LINE__,
+ __FILE__);
+ delete[] fattr1_name;
// 3. With a buf_size that equals the name's length.
- buf_size = FATTR1_NAME.length();
- fattr1_name = new char[buf_size+1];
- HDmemset(fattr1_name, 0, buf_size+1);
- name_size = fattr1.getName(fattr1_name, buf_size+1);
+ buf_size = FATTR1_NAME.length();
+ fattr1_name = new char[buf_size + 1];
+ HDmemset(fattr1_name, 0, buf_size + 1);
+ name_size = fattr1.getName(fattr1_name, buf_size + 1);
CHECK(name_size, FAIL, "Attribute::getName", __LINE__, __FILE__);
verify_val(fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
- delete []fattr1_name;
+ delete[] fattr1_name;
// B. Get attribute name with
// ssize_t Attribute::getName(H5std_string& attr_name, size_t buf_size)
@@ -349,7 +359,7 @@ static void test_attr_getname()
// Open attribute
Attribute attr1(dataset.openAttribute(ATTR1_NAME));
- size_t len = 4;
+ size_t len = 4;
H5std_string dattr_name1 = attr1.getName(len);
verify_val(dattr_name1, "Attr", "Attribute::getName", __LINE__, __FILE__);
@@ -362,20 +372,20 @@ static void test_attr_getname()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_getname()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_getname()
+} // test_attr_getname()
/****************************************************************
**
** test_attr_rename(): Test renaming attribute function.
**
****************************************************************/
-static void test_attr_rename()
+static void
+test_attr_rename()
{
- int read_data1[ATTR1_DIM1]={0}; // Buffer for reading the attribute
+ int read_data1[ATTR1_DIM1] = {0}; // Buffer for reading the attribute
hsize_t i;
// Output message about test being performed
@@ -429,12 +439,13 @@ static void test_attr_rename()
verify_val(attr_name, ATTR_TMP_NAME, "Attribute::getName", __LINE__, __FILE__);
// Read attribute information immediately, without closing attribute
- attr1.read (PredType::NATIVE_INT, read_data1);
+ attr1.read(PredType::NATIVE_INT, read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n",__LINE__,i,attr_data1[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
+ i, attr_data1[i], i, read_data1[i]);
// Close attribute
attr1.close();
@@ -452,12 +463,13 @@ static void test_attr_rename()
verify_val(attr2_name, ATTR2_NAME, "Attribute::getName", __LINE__, __FILE__);
// Read attribute information immediately, without closing attribute
- attr2.read (PredType::NATIVE_INT, read_data1);
+ attr2.read(PredType::NATIVE_INT, read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1a[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",__LINE__,i,attr_data1a[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1a[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1a[%d]=%d,read_data1[%d]=%d\n",
+ __LINE__, i, attr_data1a[i], i, read_data1[i]);
// Close attribute
attr2.close();
@@ -473,18 +485,18 @@ static void test_attr_rename()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_rename()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_rename()
+} // test_attr_rename()
/********************************************************************
**
** test_attr_basic_read(): Test basic read attribute.
**
********************************************************************/
-static void test_attr_basic_read()
+static void
+test_attr_basic_read()
{
hsize_t i, j;
@@ -503,16 +515,17 @@ static void test_attr_basic_read()
verify_val(num_attrs, 3, "DataSet::getNumAttrs", __LINE__, __FILE__);
// Open an attribute for the dataset
- Attribute ds_attr=dataset.openAttribute(ATTR1_NAME);
+ Attribute ds_attr = dataset.openAttribute(ATTR1_NAME);
// Read attribute information
- int read_data1[ATTR1_DIM1]={0}; // Buffer for reading 1st attribute
+ int read_data1[ATTR1_DIM1] = {0}; // Buffer for reading 1st attribute
ds_attr.read(PredType::NATIVE_INT, &read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d, read_data1[%d]=%d\n",__LINE__,i,attr_data1[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d, read_data1[%d]=%d\n",
+ __LINE__, i, attr_data1[i], i, read_data1[i]);
/*
* Test attribute with group
@@ -528,35 +541,37 @@ static void test_attr_basic_read()
Attribute gr_attr = group.openAttribute(ATTR2_NAME);
// Buffer for reading 2nd attribute
- int read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}};
+ int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}};
// Read attribute information
gr_attr.read(PredType::NATIVE_INT, read_data2);
// Verify values read in
- for(i=0; i<ATTR2_DIM1; i++)
- for(j=0; j<ATTR2_DIM2; j++)
- if(attr_data2[i][j]!=read_data2[i][j]) {
- TestErrPrintf("%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",__LINE__, i,j,attr_data2[i][j],i,j,read_data2[i][j]);
+ for (i = 0; i < ATTR2_DIM1; i++)
+ for (j = 0; j < ATTR2_DIM2; j++)
+ if (attr_data2[i][j] != read_data2[i][j]) {
+ TestErrPrintf(
+ "%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",
+ __LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
}
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_basic_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_basic_read()
+} // test_attr_basic_read()
/****************************************************************
**
** test_attr_compound_write(): Tests compound datatype attributes
**
****************************************************************/
-static void test_attr_compound_write()
+static void
+test_attr_compound_write()
{
- // Output message about test being performed
+ // Output message about test being performed
SUBTEST("Multiple Attribute Functions");
try {
@@ -564,11 +579,11 @@ static void test_attr_compound_write()
H5File fid1(FILE_COMPOUND.c_str(), H5F_ACC_TRUNC);
// Create dataspace for dataset
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a dataset
- DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR,sid1);
+ DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR, sid1);
// Create the attribute datatype.
CompType comp_type(sizeof(struct attr4_struct));
@@ -583,7 +598,7 @@ static void test_attr_compound_write()
comp_type.insertMember(ATTR4_FIELDNAME3, attr4_field3_off, PredType::NATIVE_SCHAR);
// Create dataspace for 1st attribute
- hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2};
+ hsize_t dims2[] = {ATTR4_DIM1, ATTR4_DIM2};
DataSpace sid2(ATTR4_RANK, dims2);
// Create complex attribute for the dataset
@@ -591,10 +606,11 @@ static void test_attr_compound_write()
// Try to create the same attribute again (should fail)
try {
- Attribute invalid_attr = dataset.createAttribute (ATTR4_NAME, comp_type, sid2);
+ Attribute invalid_attr = dataset.createAttribute(ATTR4_NAME, comp_type, sid2);
}
- catch (AttributeIException& E) // catching invalid creating attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid creating attribute
+ {
+ } // do nothing, exception expected
// Write complex attribute data
attr.write(comp_type, attr_data4);
@@ -602,22 +618,22 @@ static void test_attr_compound_write()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_compound_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_compound_write()
+} // test_attr_compound_write()
/****************************************************************
**
** test_attr_compound_read(): Test basic H5A (attribute) code.
**
****************************************************************/
-static void test_attr_compound_read()
+static void
+test_attr_compound_read()
{
- hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
- size_t size; // Attribute datatype size as stored in file
- size_t offset; // Attribute datatype field offset
+ hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
+ size_t size; // Attribute datatype size as stored in file
+ size_t offset; // Attribute datatype field offset
struct attr4_struct read_data4[ATTR4_DIM1][ATTR4_DIM2]; // Buffer for reading 4th attribute
// Output message about test being performed
@@ -649,8 +665,8 @@ static void test_attr_compound_read()
// Get the dims of the dataspace and verify them
int ndims = space.getSimpleExtentDims(dims);
verify_val(ndims, ATTR4_RANK, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
- verify_val((long)dims[0], (long)ATTR4_DIM1, "DataSpace::getSimpleExtentDims",__LINE__, __FILE__);
- verify_val((long)dims[1], (long)ATTR4_DIM2, "DataSpace::getSimpleExtentDims",__LINE__, __FILE__);
+ verify_val((long)dims[0], (long)ATTR4_DIM1, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val((long)dims[1], (long)ATTR4_DIM2, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Get the class of the datatype that is used by attr
H5T_class_t type_class;
@@ -669,13 +685,11 @@ static void test_attr_compound_read()
// Verify that the fields have the same names as when the type
// was created
int j;
- for(j=0; j<fields; j++)
- {
+ for (j = 0; j < fields; j++) {
H5std_string fieldname = datatype.getMemberName(j);
- if(!((fieldname == ATTR4_FIELDNAME1) ||
- (fieldname == ATTR4_FIELDNAME2) ||
- (fieldname == ATTR4_FIELDNAME3)))
- TestErrPrintf("%d:invalid field name for field #%d: %s\n",__LINE__,j,fieldname.c_str());
+ if (!((fieldname == ATTR4_FIELDNAME1) || (fieldname == ATTR4_FIELDNAME2) ||
+ (fieldname == ATTR4_FIELDNAME3)))
+ TestErrPrintf("%d:invalid field name for field #%d: %s\n", __LINE__, j, fieldname.c_str());
} /* end for */
offset = datatype.getMemberOffset(0);
@@ -693,8 +707,8 @@ static void test_attr_compound_read()
type_class = datatype.getMemberClass(0);
verify_val(type_class, H5T_INTEGER, "DataType::getMemberClass", __LINE__, __FILE__);
// Get and verify the order of this member's type
- IntType i_type = datatype.getMemberIntType(0);
- H5T_order_t order = i_type.getOrder();
+ IntType i_type = datatype.getMemberIntType(0);
+ H5T_order_t order = i_type.getOrder();
verify_val(order, PredType::NATIVE_INT.getOrder(), "DataType::getOrder", __LINE__, __FILE__);
// Get and verify the size of this member's type
@@ -705,7 +719,7 @@ static void test_attr_compound_read()
type_class = datatype.getMemberClass(1);
verify_val(type_class, H5T_FLOAT, "DataType::getMemberClass", __LINE__, __FILE__);
FloatType f_type = datatype.getMemberFloatType(1);
- order = f_type.getOrder();
+ order = f_type.getOrder();
verify_val(order, PredType::NATIVE_DOUBLE.getOrder(), "DataType::getOrder", __LINE__, __FILE__);
size = f_type.getSize();
verify_val(size, PredType::NATIVE_DOUBLE.getSize(), "DataType::getSize", __LINE__, __FILE__);
@@ -716,7 +730,7 @@ static void test_attr_compound_read()
// Note: H5T_INTEGER is correct here!
StrType s_type = datatype.getMemberStrType(2);
- order = s_type.getOrder();
+ order = s_type.getOrder();
verify_val(order, PredType::NATIVE_SCHAR.getOrder(), "DataType::getOrder", __LINE__, __FILE__);
size = s_type.getSize();
verify_val(size, PredType::NATIVE_SCHAR.getSize(), "DataType::getSize", __LINE__, __FILE__);
@@ -726,26 +740,30 @@ static void test_attr_compound_read()
// Verify values read in
hsize_t ii, jj;
- for(ii=0; ii<ATTR4_DIM1; ii++)
- for(jj=0; jj<ATTR4_DIM2; jj++)
- if(HDmemcmp(&attr_data4[ii][jj],&read_data4[ii][jj],sizeof(struct attr4_struct))) {
- TestErrPrintf("%d:attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",__LINE__,ii,jj,attr_data4[ii][jj].i,ii,jj,read_data4[ii][jj].i);
- TestErrPrintf("%d:attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",__LINE__,ii,jj,attr_data4[ii][jj].d,ii,jj,read_data4[ii][jj].d);
- TestErrPrintf("%d:attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n",__LINE__,ii,jj,attr_data4[ii][jj].c,ii,jj,read_data4[ii][jj].c);
- } /* end if */
+ for (ii = 0; ii < ATTR4_DIM1; ii++)
+ for (jj = 0; jj < ATTR4_DIM2; jj++)
+ if (HDmemcmp(&attr_data4[ii][jj], &read_data4[ii][jj], sizeof(struct attr4_struct))) {
+ TestErrPrintf(
+ "%d:attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
+ __LINE__, ii, jj, attr_data4[ii][jj].i, ii, jj, read_data4[ii][jj].i);
+ TestErrPrintf(
+ "%d:attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
+ __LINE__, ii, jj, attr_data4[ii][jj].d, ii, jj, read_data4[ii][jj].d);
+ TestErrPrintf(
+ "%d:attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n",
+ __LINE__, ii, jj, attr_data4[ii][jj].c, ii, jj, read_data4[ii][jj].c);
+ } /* end if */
// Verify name
H5std_string attr_name = attr.getName();
verify_val(attr_name, ATTR4_NAME, "Attribute::getName", __LINE__, __FILE__);
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_compound_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
- try
- {
+ try {
// Now, try truncating the file to make sure reference counting is good.
// If any references to ids in the previous block are left unterminated,
// the truncating will fail, because the file will not be closed in
@@ -755,18 +773,19 @@ static void test_attr_compound_read()
PASSED();
} // end try block
- catch (FileIException& E)
- {
- issue_fail_msg("test_attr_compound_read()", __LINE__, __FILE__, "Unable to truncate file, possibly because some objects are left opened");
+ catch (FileIException &E) {
+ issue_fail_msg("test_attr_compound_read()", __LINE__, __FILE__,
+ "Unable to truncate file, possibly because some objects are left opened");
}
-} // test_attr_compound_read()
+} // test_attr_compound_read()
/****************************************************************
**
** test_attr_scalar_write(): Test scalar attribute writing functionality.
**
****************************************************************/
-static void test_attr_scalar_write()
+static void
+test_attr_scalar_write()
{
// Output message about test being performed
SUBTEST("Basic Scalar Attribute Writing Functions");
@@ -776,11 +795,11 @@ static void test_attr_scalar_write()
H5File fid1(FILE_SCALAR, H5F_ACC_TRUNC);
// Create dataspace for dataset
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a dataset
- DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR,sid1);
+ DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR, sid1);
// Close dataset's dataspace
sid1.close();
@@ -789,39 +808,41 @@ static void test_attr_scalar_write()
DataSpace att_space(ATTR5_RANK, NULL);
// Create an attribute for the dataset
- Attribute ds_attr = dataset.createAttribute (ATTR5_NAME, PredType::NATIVE_FLOAT, att_space);
+ Attribute ds_attr = dataset.createAttribute(ATTR5_NAME, PredType::NATIVE_FLOAT, att_space);
// Try creating an attribute that already exists. This should fail
// since two attributes cannot have the same name. If an exception
// is not thrown for this action by createAttribute, then throw an
// invalid action exception.
try {
- Attribute invalid_attr = dataset.createAttribute (ATTR5_NAME, PredType::NATIVE_FLOAT, att_space);
+ Attribute invalid_attr = dataset.createAttribute(ATTR5_NAME, PredType::NATIVE_FLOAT, att_space);
// continuation here, that means no exception has been thrown
- throw InvalidActionException("H5File::createDataSet", "Library allowed overwrite of existing dataset");
+ throw InvalidActionException("H5File::createDataSet",
+ "Library allowed overwrite of existing dataset");
}
- catch (AttributeIException& E) // catching invalid creating attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid creating attribute
+ {
+ } // do nothing, exception expected
// Write attribute information
- ds_attr.write (PredType::NATIVE_FLOAT, &attr_data5);
+ ds_attr.write(PredType::NATIVE_FLOAT, &attr_data5);
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_scalar_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_scalar_write()
+} // test_attr_scalar_write()
/****************************************************************
**
** test_attr_scalar_read(): Test scalar attribute reading functionality.
**
****************************************************************/
-static void test_attr_scalar_read()
+static void
+test_attr_scalar_read()
{
// Output message about test being performed
SUBTEST("Basic Scalar Attribute Reading Functions");
@@ -838,11 +859,11 @@ static void test_attr_scalar_read()
verify_val(num_attrs, 1, "DataSet::getNumAttrs", __LINE__, __FILE__);
// Open an attribute for the dataset
- Attribute ds_attr=dataset.openAttribute(ATTR5_NAME);
+ Attribute ds_attr = dataset.openAttribute(ATTR5_NAME);
// Read attribute information
- float read_data2=0.0; // Buffer for reading 1st attribute
- ds_attr.read(PredType::NATIVE_FLOAT,&read_data2);
+ float read_data2 = 0.0; // Buffer for reading 1st attribute
+ ds_attr.read(PredType::NATIVE_FLOAT, &read_data2);
verify_val(read_data2, attr_data5, "Attribute::read", __LINE__, __FILE__);
// Get the dataspace of the attribute
@@ -855,98 +876,100 @@ static void test_attr_scalar_read()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_scalar_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_scalar_read()
+} // test_attr_scalar_read()
/****************************************************************
**
** test_attr_mult_write(): Test multiple attributes
**
****************************************************************/
-static void test_attr_mult_write()
+static void
+test_attr_mult_write()
{
// Output message about test being performed
SUBTEST("Multiple Attribute Writing Functions");
try {
// Create file
- H5File fid1 (FILE_MULTI, H5F_ACC_TRUNC);
+ H5File fid1(FILE_MULTI, H5F_ACC_TRUNC);
// Create dataspace for dataset
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- DataSpace ds_space (SPACE1_RANK, dims1);
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ DataSpace ds_space(SPACE1_RANK, dims1);
// Create a dataset
DataSet dataset = fid1.createDataSet(DSET1_NAME, PredType::NATIVE_UCHAR, ds_space);
// Create dataspace for 1st attribute
- hsize_t dims2[] = {ATTR1_DIM1};
- DataSpace att_space (ATTR1_RANK, dims2);
+ hsize_t dims2[] = {ATTR1_DIM1};
+ DataSpace att_space(ATTR1_RANK, dims2);
// Create 1st attribute for the dataset
- Attribute ds_attr = dataset.createAttribute (ATTR1_NAME, PredType::NATIVE_INT, att_space);
+ Attribute ds_attr = dataset.createAttribute(ATTR1_NAME, PredType::NATIVE_INT, att_space);
// Write attribute information
- ds_attr.write (PredType::NATIVE_INT, attr_data1);
+ ds_attr.write(PredType::NATIVE_INT, attr_data1);
// Create dataspace for 2nd attribute
- hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
- DataSpace att2_space (ATTR2_RANK, dims3);
+ hsize_t dims3[] = {ATTR2_DIM1, ATTR2_DIM2};
+ DataSpace att2_space(ATTR2_RANK, dims3);
// Create 2nd attribute for the dataset
- Attribute ds_attr2 = dataset.createAttribute (ATTR2_NAME, PredType::NATIVE_INT, att2_space);
+ Attribute ds_attr2 = dataset.createAttribute(ATTR2_NAME, PredType::NATIVE_INT, att2_space);
// Write 2nd attribute information
- ds_attr2.write (PredType::NATIVE_INT, attr_data2);
+ ds_attr2.write(PredType::NATIVE_INT, attr_data2);
// Create dataspace for 3rd attribute
- hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3};
- DataSpace att3_space (ATTR3_RANK, dims4);
+ hsize_t dims4[] = {ATTR3_DIM1, ATTR3_DIM2, ATTR3_DIM3};
+ DataSpace att3_space(ATTR3_RANK, dims4);
// Create 3rd attribute for the dataset
- Attribute ds_attr3 = dataset.createAttribute (ATTR3_NAME, PredType::NATIVE_DOUBLE, att3_space);
+ Attribute ds_attr3 = dataset.createAttribute(ATTR3_NAME, PredType::NATIVE_DOUBLE, att3_space);
// Try creating an attribute that already exists. This should fail
// since two attributes cannot have the same name. If an exception
// is not thrown for this action by createAttribute, then throw an
// invalid action exception.
try {
- Attribute invalid_attr = dataset.createAttribute (ATTR3_NAME, PredType::NATIVE_DOUBLE, att3_space);
+ Attribute invalid_attr = dataset.createAttribute(ATTR3_NAME, PredType::NATIVE_DOUBLE, att3_space);
// continuation here, that means no exception has been thrown
- throw InvalidActionException("DataSet::createAttribute", "Attempting to create a duplicate attribute");
+ throw InvalidActionException("DataSet::createAttribute",
+ "Attempting to create a duplicate attribute");
}
- catch (AttributeIException& E) // catching invalid creating attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid creating attribute
+ {
+ } // do nothing, exception expected
// Write 3rd attribute information
- ds_attr3.write (PredType::NATIVE_DOUBLE, attr_data3);
+ ds_attr3.write(PredType::NATIVE_DOUBLE, attr_data3);
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_mult_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_mult_write()
+} // test_attr_mult_write()
/****************************************************************
**
** test_attr_mult_read(): Test reading multiple attributes.
**
****************************************************************/
-static void test_attr_mult_read()
+static void
+test_attr_mult_read()
{
- int read_data1[ATTR1_DIM1]={0}; // Buffer for reading 1st attribute
- int read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; // Buffer for reading 2nd attribute
- double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{0}}}; // Buffer for reading 3rd attribute
- hsize_t i,j,k;
+ int read_data1[ATTR1_DIM1] = {0}; // Buffer for reading 1st attribute
+ int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; // Buffer for reading 2nd attribute
+ double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {{{0}}}; // Buffer for reading 3rd attribute
+ hsize_t i, j, k;
- // Output message about test being performed
+ // Output message about test being performed
SUBTEST("Multiple Attribute Reading Functions");
try {
@@ -973,10 +996,11 @@ static void test_attr_mult_read()
verify_val(rank, ATTR1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Get the dims of the dataspace and verify them
- hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
- int ndims = space.getSimpleExtentDims(dims);
+ hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions
+ int ndims = space.getSimpleExtentDims(dims);
if ((long)dims[0] != (long)ATTR1_DIM1)
- TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %d\n",__LINE__,(int)dims[0],ATTR1_DIM1);
+ TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %d\n", __LINE__,
+ (int)dims[0], ATTR1_DIM1);
/* Verify Datatype */
@@ -1001,9 +1025,10 @@ static void test_attr_mult_read()
attr.read(PredType::NATIVE_INT, read_data1);
// Verify values read in
- for(i=0; i<ATTR1_DIM1; i++)
- if(attr_data1[i]!=read_data1[i])
- TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n",__LINE__,i,attr_data1[i],i,read_data1[i]);
+ for (i = 0; i < ATTR1_DIM1; i++)
+ if (attr_data1[i] != read_data1[i])
+ TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d,read_data1[%d]=%d\n", __LINE__,
+ i, attr_data1[i], i, read_data1[i]);
// Verify Name
H5std_string attr_name = attr.getName();
@@ -1027,8 +1052,8 @@ static void test_attr_mult_read()
// Get the dims of the dataspace and verify them
ndims = space.getSimpleExtentDims(dims);
- verify_val((long)dims[0], (long)ATTR2_DIM1, "DataSpace::getSimpleExtentDims",__LINE__, __FILE__);
- verify_val((long)dims[1], (long)ATTR2_DIM2, "DataSpace::getSimpleExtentDims",__LINE__, __FILE__);
+ verify_val((long)dims[0], (long)ATTR2_DIM1, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val((long)dims[1], (long)ATTR2_DIM2, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
/* Verify Datatype */
@@ -1051,13 +1076,15 @@ static void test_attr_mult_read()
// Read attribute information
attr.read(PredType::NATIVE_INT, read_data2);
- //attr.read(i_type, read_data2);
+ // attr.read(i_type, read_data2);
// Verify values read in
- for(i=0; i<ATTR2_DIM1; i++)
- for(j=0; j<ATTR2_DIM2; j++)
- if(attr_data2[i][j]!=read_data2[i][j])
- TestErrPrintf("%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",__LINE__,i,j,attr_data2[i][j],i,j,read_data2[i][j]);
+ for (i = 0; i < ATTR2_DIM1; i++)
+ for (j = 0; j < ATTR2_DIM2; j++)
+ if (attr_data2[i][j] != read_data2[i][j])
+ TestErrPrintf(
+ "%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",
+ __LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]);
// Verify Name
attr_name = attr.getName();
@@ -1079,9 +1106,9 @@ static void test_attr_mult_read()
// Get the dims of the dataspace and verify them
ndims = space.getSimpleExtentDims(dims);
- verify_val((long)dims[0],(long)ATTR3_DIM1,"attribute dimensions",__FILE__,__LINE__);
- verify_val((long)dims[1],(long)ATTR3_DIM2,"attribute dimensions",__FILE__,__LINE__);
- verify_val((long)dims[2],(long)ATTR3_DIM3,"attribute dimensions",__FILE__,__LINE__);
+ verify_val((long)dims[0], (long)ATTR3_DIM1, "attribute dimensions", __FILE__, __LINE__);
+ verify_val((long)dims[1], (long)ATTR3_DIM2, "attribute dimensions", __FILE__, __LINE__);
+ verify_val((long)dims[2], (long)ATTR3_DIM3, "attribute dimensions", __FILE__, __LINE__);
/* Verify Datatype */
@@ -1106,11 +1133,13 @@ static void test_attr_mult_read()
attr.read(PredType::NATIVE_DOUBLE, read_data3);
// Verify values read in
- for(i=0; i<ATTR3_DIM1; i++)
- for(j=0; j<ATTR3_DIM2; j++)
- for(k=0; k<ATTR3_DIM3; k++)
- if(attr_data3[i][j][k]!=read_data3[i][j][k])
- TestErrPrintf("%d: attribute data different: attr_data3[%d][%d][%d]=%f, read_data3[%d][%d][%d]=%f\n",__LINE__,i,j,k,attr_data3[i][j][k],i,j,k,read_data3[i][j][k]);
+ for (i = 0; i < ATTR3_DIM1; i++)
+ for (j = 0; j < ATTR3_DIM2; j++)
+ for (k = 0; k < ATTR3_DIM3; k++)
+ if (attr_data3[i][j][k] != read_data3[i][j][k])
+ TestErrPrintf("%d: attribute data different: attr_data3[%d][%d][%d]=%f, "
+ "read_data3[%d][%d][%d]=%f\n",
+ __LINE__, i, j, k, attr_data3[i][j][k], i, j, k, read_data3[i][j][k]);
// Verify Name
attr_name = attr.getName();
@@ -1119,11 +1148,10 @@ static void test_attr_mult_read()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_mult_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_mult_read()
+} // test_attr_mult_read()
/****************************************************************
**
@@ -1131,10 +1159,10 @@ static void test_attr_mult_read()
** hdf5 objects.
**
****************************************************************/
-static void test_attr_delete()
+static void
+test_attr_delete()
{
- H5std_string attr_name; // Buffer for attribute names
- int ii;
+ H5std_string attr_name; // Buffer for attribute names
// Output message about test being performed
SUBTEST("Removing Attribute Function");
@@ -1156,10 +1184,10 @@ static void test_attr_delete()
// Verify the name of the only file attribute left
Attribute fattr = fid1.openAttribute((unsigned)0);
- attr_name = fattr.getName();
+ attr_name = fattr.getName();
verify_val(attr_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
fattr.close();
-
+
// Test deleting non-existing attribute
// Open the dataset
@@ -1174,10 +1202,12 @@ static void test_attr_delete()
dataset.removeAttr("Bogus");
// continuation here, that means no exception has been thrown
- throw InvalidActionException("DataSet::removeAttr", "Attempting to remove non-existing attribute");
+ throw InvalidActionException("DataSet::removeAttr",
+ "Attempting to remove non-existing attribute");
}
- catch (AttributeIException& E) // catching invalid removing attribute
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid removing attribute
+ {
+ } // do nothing, exception expected
// Test deleting dataset's attributes
@@ -1237,11 +1267,10 @@ static void test_attr_delete()
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_delete()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_delete()
+} // test_attr_delete()
/****************************************************************
**
@@ -1249,14 +1278,15 @@ static void test_attr_delete()
** in attributes.
**
****************************************************************/
-static void test_attr_dtype_shared()
+static void
+test_attr_dtype_shared()
{
- int data=8; /* Data to write */
- int rdata=0; /* Read read in */
+ int data = 8; /* Data to write */
+ int rdata = 0; /* Read read in */
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5G_stat_t statbuf; /* Object's information */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- h5_stat_size_t filesize; /* Size of file after modifications */
+ H5G_stat_t statbuf; /* Object's information */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ h5_stat_size_t filesize; /* Size of file after modifications */
// Output message about test being performed
SUBTEST("Shared Datatypes with Attributes");
@@ -1269,7 +1299,7 @@ static void test_attr_dtype_shared()
fid1.close();
// Get size of file
- h5_stat_size_t empty_filesize; // Size of empty file
+ h5_stat_size_t empty_filesize; // Size of empty file
empty_filesize = h5_get_file_size(FILE_DTYPE.c_str(), H5P_DEFAULT);
if (empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
@@ -1282,76 +1312,77 @@ static void test_attr_dtype_shared()
// scope, causing incorrect number of ref counts.
{ // First enclosed block
- // Create a datatype to commit and use
- IntType dtype(PredType::NATIVE_INT);
+ // Create a datatype to commit and use
+ IntType dtype(PredType::NATIVE_INT);
- // Commit datatype to file
- dtype.commit(fid1, TYPE1_NAME);
+ // Commit datatype to file
+ dtype.commit(fid1, TYPE1_NAME);
- // Retrieve and verify information about the type
- H5O_info_t oinfo;
- dtype.getObjectInfo(TYPE1_NAME, &oinfo);
- fid1.getObjectInfo(TYPE1_NAME, &oinfo);
- if (oinfo.type != H5O_TYPE_NAMED_DATATYPE)
- TestErrPrintf("Line %d: object type wrong!\n", __LINE__);
- verify_val(oinfo.num_attrs, 0, "DataType::getObjinfo reference count", __LINE__, __FILE__);
- verify_val((int)oinfo.rc, 1, "DataType::getObjinfo reference count", __LINE__, __FILE__);
+ // Retrieve and verify information about the type
+ H5O_info_t oinfo;
+ dtype.getObjectInfo(TYPE1_NAME, &oinfo);
+ fid1.getObjectInfo(TYPE1_NAME, &oinfo);
+ if (oinfo.type != H5O_TYPE_NAMED_DATATYPE)
+ TestErrPrintf("Line %d: object type wrong!\n", __LINE__);
+ verify_val(oinfo.num_attrs, 0, "DataType::getObjinfo reference count", __LINE__, __FILE__);
+ verify_val((int)oinfo.rc, 1, "DataType::getObjinfo reference count", __LINE__, __FILE__);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__);
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Create dataspace for dataset
- DataSpace dspace;
+ // Create dataspace for dataset
+ DataSpace dspace;
- DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace);
+ DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__);
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Create attribute on dataset
- Attribute attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
+ // Create attribute on dataset
+ Attribute attr = dset.createAttribute(ATTR1_NAME, dtype, dspace);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__);
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Close attribute
- attr.close();
+ // Close attribute
+ attr.close();
- // Delete attribute
- dset.removeAttr(ATTR1_NAME);
+ // Delete attribute
+ dset.removeAttr(ATTR1_NAME);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__);
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__,
+ __FILE__);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Create attribute on dataset
- attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
+ // Create attribute on dataset
+ attr = dset.createAttribute(ATTR1_NAME, dtype, dspace);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__);
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- // Write data into the attribute
- attr.write(PredType::NATIVE_INT,&data);
+ // Write data into the attribute
+ attr.write(PredType::NATIVE_INT, &data);
- // Close attribute, dataset, dataspace, datatype, and file
- attr.close();
- dset.close();
- dspace.close();
- dtype.close();
+ // Close attribute, dataset, dataspace, datatype, and file
+ attr.close();
+ dset.close();
+ dspace.close();
+ dtype.close();
} // end of first enclosing
fid1.close();
@@ -1361,25 +1392,25 @@ static void test_attr_dtype_shared()
{ // Second enclosed block...
- // Open dataset
- DataSet *dset2 = new DataSet (fid1.openDataSet(DSET1_NAME));
+ // Open dataset
+ DataSet *dset2 = new DataSet(fid1.openDataSet(DSET1_NAME));
- // Open attribute
- Attribute *attr2 = new Attribute (dset2->openAttribute(ATTR1_NAME));
+ // Open attribute
+ Attribute *attr2 = new Attribute(dset2->openAttribute(ATTR1_NAME));
- // Read data from the attribute
- attr2->read(PredType::NATIVE_INT, &rdata);
- verify_val(data, rdata, "Attribute::read", __LINE__, __FILE__);
+ // Read data from the attribute
+ attr2->read(PredType::NATIVE_INT, &rdata);
+ verify_val(data, rdata, "Attribute::read", __LINE__, __FILE__);
- // Close attribute and dataset
- delete attr2;
- delete dset2;
+ // Close attribute and dataset
+ delete attr2;
+ delete dset2;
#ifndef H5_NO_DEPRECATED_SYMBOLS
- // Check reference count on named datatype
- fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ // Check reference count on named datatype
+ fid1.getObjinfo(TYPE1_NAME, statbuf);
+ verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__);
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
} // end of second enclosing
// Unlink the dataset
@@ -1402,21 +1433,18 @@ static void test_attr_dtype_shared()
verify_val((long)filesize, (long)empty_filesize, "Checking file size", __LINE__, __FILE__);
PASSED();
- } // end try block
+ } // end try block
- catch (DataTypeIException& E)
- {
+ catch (DataTypeIException &E) {
issue_fail_msg("test_attr_dtype_shared()", __LINE__, __FILE__, E.getCDetailMsg());
}
- catch (FileIException& E)
- {
+ catch (FileIException &E) {
issue_fail_msg("test_attr_dtype_shared()", __LINE__, __FILE__, E.getCDetailMsg());
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_dtype_shared()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_dtype_shared()
+} // test_attr_dtype_shared()
/****************************************************************
**
@@ -1429,9 +1457,10 @@ const H5std_string ATTR1_FL_STR_NAME("String_attr 1");
const H5std_string ATTR2_FL_STR_NAME("String_attr 2");
const H5std_string ATTR_VL_STR_NAME("String_attr");
const H5std_string ATTRSTR_DATA("String Attribute");
-const int ATTR_LEN = 17;
+const int ATTR_LEN = 17;
-static void test_string_attr()
+static void
+test_string_attr()
{
// Output message about test being performed
SUBTEST("I/O on FL and VL String Attributes");
@@ -1450,7 +1479,7 @@ static void test_string_attr()
Group root = fid1.openGroup("/");
// Create dataspace for the attribute.
- DataSpace att_space (H5S_SCALAR);
+ DataSpace att_space(H5S_SCALAR);
/* Test Attribute::write(...,const void *buf) with Fixed len string */
@@ -1473,18 +1502,20 @@ static void test_string_attr()
// Read and verify the attribute string as a string of chars.
char flstring_att_check[ATTR_LEN];
gr_flattr1.read(fls_type, flstring_att_check);
- if(HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
+ if (HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
+ __LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
// Read and verify the attribute string as a string of chars; buffer
// is dynamically allocated.
size_t attr_size = gr_flattr1.getInMemDataSize();
- char *fl_dyn_string_att_check;
- fl_dyn_string_att_check = new char[attr_size+1];
+ char * fl_dyn_string_att_check;
+ fl_dyn_string_att_check = new char[attr_size + 1];
gr_flattr1.read(fls_type, fl_dyn_string_att_check);
- if(HDstrcmp(fl_dyn_string_att_check, ATTRSTR_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), fl_dyn_string_att_check);
- delete []fl_dyn_string_att_check;
+ if (HDstrcmp(fl_dyn_string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
+ __LINE__, ATTRSTR_DATA.c_str(), fl_dyn_string_att_check);
+ delete[] fl_dyn_string_att_check;
/* Test Attribute::read(...,H5std_string& strg) with FL string */
@@ -1492,13 +1523,15 @@ static void test_string_attr()
H5std_string read_flstr1;
gr_flattr1.read(fls_type, read_flstr1);
if (read_flstr1 != ATTRSTR_DATA)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr1=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_flstr1.c_str());
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr1=%s\n", __LINE__,
+ ATTRSTR_DATA.c_str(), read_flstr1.c_str());
// Read and verify the attribute string as a string of chars.
HDstrcpy(flstring_att_check, "");
gr_flattr2.read(fls_type, flstring_att_check);
- if(HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
+ if (HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
+ __LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
/* Test Attribute::read(...,H5std_string& strg) with FL string */
@@ -1506,7 +1539,8 @@ static void test_string_attr()
H5std_string read_flstr2;
gr_flattr2.read(fls_type, read_flstr2);
if (read_flstr2 != ATTRSTR_DATA)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr2=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_flstr2.c_str());
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr2=%s\n", __LINE__,
+ ATTRSTR_DATA.c_str(), read_flstr2.c_str());
//
// Variable-lenth string attributes
@@ -1524,8 +1558,9 @@ static void test_string_attr()
// Read and verify the attribute string as a string of chars.
char *string_att_check;
gr_vlattr.read(vls_type, &string_att_check);
- if(HDstrcmp(string_att_check, ATTRSTR_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
+ if (HDstrcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",
+ __LINE__, ATTRSTR_DATA.c_str(), string_att_check);
HDfree(string_att_check);
/* Test Attribute::read(...,H5std_string& strg) with VL string */
@@ -1533,15 +1568,15 @@ static void test_string_attr()
H5std_string read_str;
gr_vlattr.read(vls_type, read_str);
if (read_str != ATTRSTR_DATA)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_str.c_str());
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n", __LINE__,
+ ATTRSTR_DATA.c_str(), read_str.c_str());
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_string_attr()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_string_attr()
+} // test_string_attr()
/****************************************************************
**
@@ -1549,7 +1584,8 @@ static void test_string_attr()
** (additional attrExists tests are in test_attr_rename())
**
****************************************************************/
-static void test_attr_exists()
+static void
+test_attr_exists()
{
// Output message about test being performed
SUBTEST("Check Attribute Existence");
@@ -1564,12 +1600,14 @@ static void test_attr_exists()
// Check for existence of attribute
bool attr_exists = fid1.attrExists(ATTR1_FL_STR_NAME);
if (attr_exists == false)
- throw InvalidActionException("H5File::attrExists", "fid1, ATTR1_FL_STR_NAMEAttribute should exist but does not");
+ throw InvalidActionException("H5File::attrExists",
+ "fid1, ATTR1_FL_STR_NAMEAttribute should exist but does not");
// Check for existence of attribute
attr_exists = fid1.attrExists(FATTR1_NAME);
if (attr_exists == false)
- throw InvalidActionException("H5File::attrExists", "fid1,FATTR2_NAMEAttribute should exist but does not");
+ throw InvalidActionException("H5File::attrExists",
+ "fid1,FATTR2_NAMEAttribute should exist but does not");
// Open a group.
Group group = fid1.openGroup(GROUP1_NAME);
@@ -1577,7 +1615,8 @@ static void test_attr_exists()
// Check for existence of attribute, Group::attrExists
attr_exists = group.attrExists(ATTR2_NAME);
if (attr_exists == false)
- throw InvalidActionException("H5File::attrExists", "group, ATTR2_NAMEAttribute should exist but does not");
+ throw InvalidActionException("H5File::attrExists",
+ "group, ATTR2_NAMEAttribute should exist but does not");
// Open attribute
Attribute attr = group.openAttribute(ATTR2_NAME);
@@ -1586,20 +1625,19 @@ static void test_attr_exists()
// Attribute::nameExists
bool name_exists = attr.nameExists(GROUP1_NAME);
if (name_exists == false)
- throw InvalidActionException("Attribute::nameExists", "group GROUP1_NAME should exist but does not");
+ throw InvalidActionException("Attribute::nameExists",
+ "group GROUP1_NAME should exist but does not");
PASSED();
} // end try block
- catch (InvalidActionException& E)
- {
+ catch (InvalidActionException &E) {
issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_exists()
+} // test_attr_exists()
/****************************************************************
**
@@ -1608,25 +1646,25 @@ static void test_attr_exists()
**
****************************************************************/
const H5std_string FILE_CRTPROPS("tattr_crt_properties.h5");
-const int NAME_BUF_SIZE = 1024;
-const unsigned MAX_COMPACT_DEF = 8;
-const unsigned MIN_DENSE_DEF = 6;
+const int NAME_BUF_SIZE = 1024;
+const unsigned MAX_COMPACT_DEF = 8;
+const unsigned MIN_DENSE_DEF = 6;
-static void test_attr_dense_create(FileCreatPropList& fcpl,
- FileAccPropList& fapl)
+static void
+test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl)
{
// Output message about test being performed
SUBTEST("Dense Attribute Storage Creation");
try {
// Create file
- H5File fid1 (FILE_CRTPROPS, H5F_ACC_TRUNC, fcpl, fapl);
+ H5File fid1(FILE_CRTPROPS, H5F_ACC_TRUNC, fcpl, fapl);
// Close file
fid1.close();
// Get size of file
- h5_stat_size_t empty_filesize; // Size of empty file
+ h5_stat_size_t empty_filesize; // Size of empty file
empty_filesize = h5_get_file_size(FILE_CRTPROPS.c_str(), fapl.getId());
if (empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
@@ -1647,16 +1685,18 @@ static void test_attr_dense_create(FileCreatPropList& fcpl,
// Retrieve limits for compact/dense attribute storage
dcpl.getAttrPhaseChange(max_compact, min_dense);
- verify_val(max_compact, MAX_COMPACT_DEF, "DSetCreatPropList::getAttrPhaseChange",__LINE__,__FILE__);
- verify_val(min_dense, MIN_DENSE_DEF, "DSetCreatPropList::getAttrPhaseChange",__LINE__,__FILE__);
+ verify_val(max_compact, MAX_COMPACT_DEF, "DSetCreatPropList::getAttrPhaseChange", __LINE__, __FILE__);
+ verify_val(min_dense, MIN_DENSE_DEF, "DSetCreatPropList::getAttrPhaseChange", __LINE__, __FILE__);
// Set new compact/dense attribute storage limits to some random numbers
dcpl.setAttrPhaseChange(7, 5);
// Retrieve limits for compact/dense attribute storage and verify them
dcpl.getAttrPhaseChange(max_compact, min_dense);
- verify_val(max_compact, static_cast<unsigned>(7), "DSetCreatPropList::getAttrPhaseChange",__LINE__,__FILE__);
- verify_val(min_dense, static_cast<unsigned>(5), "DSetCreatPropList::getAttrPhaseChange",__LINE__,__FILE__);
+ verify_val(max_compact, static_cast<unsigned>(7), "DSetCreatPropList::getAttrPhaseChange", __LINE__,
+ __FILE__);
+ verify_val(min_dense, static_cast<unsigned>(5), "DSetCreatPropList::getAttrPhaseChange", __LINE__,
+ __FILE__);
// Close property list
dcpl.close();
@@ -1664,10 +1704,9 @@ static void test_attr_dense_create(FileCreatPropList& fcpl,
// H5O_is_attr_dense_test - un-usable
// Add attributes, until just before converting to dense storage
- char attr_name[NAME_BUF_SIZE];
+ char attr_name[NAME_BUF_SIZE];
unsigned attr_num;
- for (attr_num = 0; attr_num < max_compact; attr_num++)
- {
+ for (attr_num = 0; attr_num < max_compact; attr_num++) {
// Create attribute
sprintf(attr_name, "attr %02u", attr_num);
Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space);
@@ -1689,26 +1728,26 @@ static void test_attr_dense_create(FileCreatPropList& fcpl,
}
// Attempt to add attribute again, which should fail
- try
- {
+ try {
// Create another attribute
sprintf(attr_name, "attr %02u", attr_num);
Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space);
// continuation here, that means no exception has been thrown
- throw InvalidActionException("DataSet::createAttribute", "Maximum number of attributes has been reached");
+ throw InvalidActionException("DataSet::createAttribute",
+ "Maximum number of attributes has been reached");
}
- catch (AttributeIException& E) // catching invalid action
- {} // do nothing, exception expected
+ catch (AttributeIException &E) // catching invalid action
+ {
+ } // do nothing, exception expected
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_dense_create()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_dense_create()
+} // test_attr_dense_create()
/****************************************************************
**
@@ -1716,23 +1755,23 @@ static void test_attr_dense_create(FileCreatPropList& fcpl,
** Tests creating an object w/attribute creation order info
**
****************************************************************/
-static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
- FileAccPropList& fapl)
+static void
+test_attr_corder_create_basic(FileCreatPropList &fcpl, FileAccPropList &fapl)
{
// Output message about test being performed
SUBTEST("Basic Code for Attributes with Creation Order Info");
try {
// Create file
- H5File fid1 (FILE_CRTPROPS, H5F_ACC_TRUNC, fcpl, fapl);
+ H5File fid1(FILE_CRTPROPS, H5F_ACC_TRUNC, fcpl, fapl);
// Create dataset creation property list.
DSetCreatPropList dcpl;
// Get creation order indexing on object
unsigned crt_order_flags = 0;
- crt_order_flags = dcpl.getAttrCrtOrder();
- verify_val(crt_order_flags, 0, "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
+ crt_order_flags = dcpl.getAttrCrtOrder();
+ verify_val(crt_order_flags, 0, "DSetCreatPropList::getAttrCrtOrder", __LINE__, __FILE__);
// Setting invalid combination of a attribute order creation order
// indexing on should fail
@@ -1740,16 +1779,19 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
dcpl.setAttrCrtOrder(H5P_CRT_ORDER_INDEXED);
// continuation here, that means no exception has been thrown
- throw InvalidActionException("DSetCreatPropList::getAttrCrtOrder", "Indexing cannot be set alone, order tracking is required");
+ throw InvalidActionException("DSetCreatPropList::getAttrCrtOrder",
+ "Indexing cannot be set alone, order tracking is required");
}
- catch (PropListIException& E) // catching invalid action
- {} // do nothing, exception expected
+ catch (PropListIException &E) // catching invalid action
+ {
+ } // do nothing, exception expected
// Set attribute creation order tracking & indexing for object then
// verify them
dcpl.setAttrCrtOrder(H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
crt_order_flags = dcpl.getAttrCrtOrder();
- verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
+ verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED),
+ "DSetCreatPropList::getAttrCrtOrder", __LINE__, __FILE__);
// Create dataspace for dataset
DataSpace ds_space(H5S_SCALAR);
@@ -1784,31 +1826,30 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
// Query the attribute creation properties
crt_order_flags = dcpl.getAttrCrtOrder();
- verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED), "DSetCreatPropList::getAttrCrtOrder",__LINE__,__FILE__);
+ verify_val(crt_order_flags, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED),
+ "DSetCreatPropList::getAttrCrtOrder", __LINE__, __FILE__);
PASSED();
} // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr_corder_create_basic()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr_corder_create_basic()
+} // test_attr_corder_create_basic()
/****************************************************************
**
** test_attr(): Main attribute testing routine.
**
****************************************************************/
-extern "C"
-void test_attr()
+extern "C" void
+test_attr()
{
// Output message about test being performed
- //MESSAGE("Testing Attributes\n");
+ // MESSAGE("Testing Attributes\n");
MESSAGE(5, ("Testing Attributes\n"));
- try
- {
+ try {
// Create a default file access property list
FileAccPropList fapl;
@@ -1830,45 +1871,41 @@ void test_attr()
// Loop over using new group format
hbool_t new_format;
- for (new_format = FALSE; new_format <= TRUE; new_format++)
- {
+ for (new_format = FALSE; new_format <= TRUE; new_format++) {
FileAccPropList curr_fapl;
// Set the file access proplist for the type of format
- if (new_format)
- {
- MESSAGE(7, ("testing with new file format\n"));
- curr_fapl = fapl_new;
+ if (new_format) {
+ MESSAGE(7, ("testing with new file format\n"));
+ curr_fapl = fapl_new;
}
- else
- {
- MESSAGE(7, ("testing with old file format\n"));
- curr_fapl = fapl;
+ else {
+ MESSAGE(7, ("testing with old file format\n"));
+ curr_fapl = fapl;
}
- test_attr_basic_write(); // Test basic H5A writing code
- test_attr_getname(); // Test overloads of Attribute::getName
- test_attr_rename(); // Test renaming attribute
- test_attr_basic_read(); // Test basic H5A reading code
+ test_attr_basic_write(); // Test basic H5A writing code
+ test_attr_getname(); // Test overloads of Attribute::getName
+ test_attr_rename(); // Test renaming attribute
+ test_attr_basic_read(); // Test basic H5A reading code
test_attr_compound_write(); // Test complex datatype H5A writing code
test_attr_compound_read(); // Test complex datatype H5A reading code
- test_attr_scalar_write(); // Test scalar dataspace H5A writing code
- test_attr_scalar_read(); // Test scalar dataspace H5A reading code
+ test_attr_scalar_write(); // Test scalar dataspace H5A writing code
+ test_attr_scalar_read(); // Test scalar dataspace H5A reading code
- test_attr_mult_write(); // Test writing multiple attributes
- test_attr_mult_read(); // Test reading multiple attributes
- test_attr_delete(); // Test deleting attributes
+ test_attr_mult_write(); // Test writing multiple attributes
+ test_attr_mult_read(); // Test reading multiple attributes
+ test_attr_delete(); // Test deleting attributes
- test_attr_dtype_shared(); // Test using shared datatypes in attributes
+ test_attr_dtype_shared(); // Test using shared datatypes in attributes
- test_string_attr(); // Test read/write string attribute
- test_attr_exists(); // Test H5Location::attrExists
+ test_string_attr(); // Test read/write string attribute
+ test_attr_exists(); // Test H5Location::attrExists
// Test with new format
- if (new_format)
- {
+ if (new_format) {
// Test dense attribute storage creation
test_attr_dense_create(fcpl, curr_fapl);
@@ -1876,14 +1913,13 @@ void test_attr()
test_attr_corder_create_basic(fcpl, curr_fapl);
}
} // end for
- } // end try block
+ } // end try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_attr()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_attr()
-
+} // test_attr()
+
/*-------------------------------------------------------------------------
* Function: cleanup_attr
*
@@ -1896,8 +1932,8 @@ void test_attr()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_attr()
+extern "C" void
+cleanup_attr()
{
HDremove(FILE_BASIC.c_str());
HDremove(FILE_COMPOUND.c_str());
@@ -1906,4 +1942,3 @@ void cleanup_attr()
HDremove(FILE_DTYPE.c_str());
HDremove(FILE_CRTPROPS.c_str());
}
-
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index ce2d061..7864b40 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,10 +26,11 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
/* Number of elements in each test */
#define NTESTELEM 100000
@@ -39,7 +40,6 @@ typedef struct complex_t {
double im;
} complex_t;
-
/*-------------------------------------------------------------------------
* Function: test_compound_1
*
@@ -52,7 +52,8 @@ typedef struct complex_t {
*
*-------------------------------------------------------------------------
*/
-static void test_compound_1()
+static void
+test_compound_1()
{
// Output message about test being performed
SUBTEST("Compound Data Types");
@@ -64,15 +65,13 @@ static void test_compound_1()
complex_type.insertMember("real", HOFFSET(complex_t, re), PredType::NATIVE_DOUBLE);
complex_type.insertMember("imaginary", HOFFSET(complex_t, im), PredType::NATIVE_DOUBLE);
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_compound_1()
+} // test_compound_1()
-
/*-------------------------------------------------------------------------
* Function: test_compound_2
*
@@ -87,7 +86,8 @@ static void test_compound_1()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_2()
+static void
+test_compound_2()
{
typedef struct {
int a, b, c[4], d, e;
@@ -96,33 +96,33 @@ static void test_compound_2()
int e, d, c[4], b, a;
} dst_typ_t;
- src_typ_t *s_ptr;
- dst_typ_t *d_ptr;
- const int nelmts = NTESTELEM;
- const hsize_t four = 4;
- int i;
+ src_typ_t * s_ptr;
+ dst_typ_t * d_ptr;
+ const int nelmts = NTESTELEM;
+ const hsize_t four = 4;
+ int i;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- ArrayType *array_dt = NULL;
+ ArrayType * array_dt = NULL;
// Output message about test being performed
SUBTEST("Compound Element Reordering");
try {
// Sizes should be the same, but be careful just in case
- buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
- bkg = (unsigned char*)HDmalloc(nelmts * sizeof(dst_typ_t));
- orig = (unsigned char*)HDmalloc(nelmts * sizeof(src_typ_t));
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- s_ptr->a = i*8+0;
- s_ptr->b = i*8+1;
- s_ptr->c[0] = i*8+2;
- s_ptr->c[1] = i*8+3;
- s_ptr->c[2] = i*8+4;
- s_ptr->c[3] = i*8+5;
- s_ptr->d = i*8+6;
- s_ptr->e = i*8+7;
+ buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
+ bkg = (unsigned char *)HDmalloc(nelmts * sizeof(dst_typ_t));
+ orig = (unsigned char *)HDmalloc(nelmts * sizeof(src_typ_t));
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ s_ptr->a = i * 8 + 0;
+ s_ptr->b = i * 8 + 1;
+ s_ptr->c[0] = i * 8 + 2;
+ s_ptr->c[1] = i * 8 + 3;
+ s_ptr->c[2] = i * 8 + 4;
+ s_ptr->c[3] = i * 8 + 5;
+ s_ptr->d = i * 8 + 6;
+ s_ptr->e = i * 8 + 7;
}
- memcpy(buf, orig, nelmts*sizeof(src_typ_t));
+ memcpy(buf, orig, nelmts * sizeof(src_typ_t));
// Build hdf5 datatypes
array_dt = new ArrayType(PredType::NATIVE_INT, 1, &four);
@@ -152,27 +152,20 @@ static void test_compound_2()
st.convert(dt, (size_t)nelmts, buf, bkg);
// Compare results
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- d_ptr = ((dst_typ_t*)buf) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->b != d_ptr->b ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->d != d_ptr->d ||
- s_ptr->e != d_ptr->e) {
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ d_ptr = ((dst_typ_t *)buf) + i;
+ if (s_ptr->a != d_ptr->a || s_ptr->b != d_ptr->b || s_ptr->c[0] != d_ptr->c[0] ||
+ s_ptr->c[1] != d_ptr->c[1] || s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] ||
+ s_ptr->d != d_ptr->d || s_ptr->e != d_ptr->e) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
- << s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
- cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
- << s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b << "c=[" << s_ptr->c[0] << ","
+ << s_ptr->c[1] << "," << s_ptr->c[2] << "," << s_ptr->c[3] << ", d=" << s_ptr->d
+ << ", e=" << s_ptr->e << "}" << endl;
+ cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b << "c=[" << s_ptr->c[0] << ","
+ << s_ptr->c[1] << "," << s_ptr->c[2] << "," << s_ptr->c[3] << ", d=" << s_ptr->d
+ << ", e=" << s_ptr->e << "}" << endl;
}
}
// Release resources
@@ -184,18 +177,16 @@ static void test_compound_2()
st.close();
dt.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
- if(array_dt)
+ if (array_dt)
delete array_dt;
-} // test_compound_2()
+} // test_compound_2()
-
/*-------------------------------------------------------------------------
* Function: test_compound_3
*
@@ -210,42 +201,43 @@ static void test_compound_2()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_3()
+static void
+test_compound_3()
{
typedef struct {
int a, b, c[4], d, e;
} src_typ_t;
typedef struct {
- int a, c[4], e;
+ int a, c[4], e;
} dst_typ_t;
- src_typ_t *s_ptr;
- dst_typ_t *d_ptr;
- int i;
- const int nelmts = NTESTELEM;
- const hsize_t four = 4;
+ src_typ_t * s_ptr;
+ dst_typ_t * d_ptr;
+ int i;
+ const int nelmts = NTESTELEM;
+ const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- ArrayType* array_dt = NULL;
+ ArrayType * array_dt = NULL;
// Output message about test being performed
SUBTEST("Compound Datatype Subset Conversions");
try {
/* Initialize */
- buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
- bkg = (unsigned char*)HDmalloc(nelmts * sizeof(dst_typ_t));
- orig = (unsigned char*)HDmalloc(nelmts * sizeof(src_typ_t));
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- s_ptr->a = i*8+0;
- s_ptr->b = i*8+1;
- s_ptr->c[0] = i*8+2;
- s_ptr->c[1] = i*8+3;
- s_ptr->c[2] = i*8+4;
- s_ptr->c[3] = i*8+5;
- s_ptr->d = i*8+6;
- s_ptr->e = i*8+7;
+ buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
+ bkg = (unsigned char *)HDmalloc(nelmts * sizeof(dst_typ_t));
+ orig = (unsigned char *)HDmalloc(nelmts * sizeof(src_typ_t));
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ s_ptr->a = i * 8 + 0;
+ s_ptr->b = i * 8 + 1;
+ s_ptr->c[0] = i * 8 + 2;
+ s_ptr->c[1] = i * 8 + 3;
+ s_ptr->c[2] = i * 8 + 4;
+ s_ptr->c[3] = i * 8 + 5;
+ s_ptr->d = i * 8 + 6;
+ s_ptr->e = i * 8 + 7;
}
- memcpy(buf, orig, nelmts*sizeof(src_typ_t));
+ memcpy(buf, orig, nelmts * sizeof(src_typ_t));
/* Build hdf5 datatypes */
array_dt = new ArrayType(PredType::NATIVE_INT, 1, &four);
@@ -273,27 +265,20 @@ static void test_compound_3()
st.convert(dt, (size_t)nelmts, buf, bkg);
/* Compare results */
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- d_ptr = ((dst_typ_t*)buf) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->e != d_ptr->e) {
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ d_ptr = ((dst_typ_t *)buf) + i;
+ if (s_ptr->a != d_ptr->a || s_ptr->c[0] != d_ptr->c[0] || s_ptr->c[1] != d_ptr->c[1] ||
+ s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] || s_ptr->e != d_ptr->e) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << ", c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << "], d="
- << s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
- cerr << " dst={a=" << d_ptr->a
- << ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
- << d_ptr->c[2] << "," << d_ptr->c[3] << "], e="
- << d_ptr->e << "}" << endl;
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b << ", c=[" << s_ptr->c[0] << ","
+ << s_ptr->c[1] << "," << s_ptr->c[2] << "," << s_ptr->c[3] << "], d=" << s_ptr->d
+ << ", e=" << s_ptr->e << "}" << endl;
+ cerr << " dst={a=" << d_ptr->a << ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
+ << d_ptr->c[2] << "," << d_ptr->c[3] << "], e=" << d_ptr->e << "}" << endl;
} // if
- } // for
+ } // for
/* Release resources */
HDfree(buf);
@@ -304,18 +289,16 @@ static void test_compound_3()
st.close();
dt.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
- if(array_dt)
+ if (array_dt)
delete array_dt;
-} // test_compound_3()
+} // test_compound_3()
-
/*-------------------------------------------------------------------------
* Function: test_compound_4
*
@@ -330,7 +313,8 @@ static void test_compound_3()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_4()
+static void
+test_compound_4()
{
typedef struct {
@@ -339,38 +323,38 @@ static void test_compound_4()
typedef struct {
short b;
- int a, c[4];
+ int a, c[4];
short d;
- int e;
+ int e;
} dst_typ_t;
- src_typ_t *s_ptr;
- dst_typ_t *d_ptr;
- int i;
- const int nelmts = NTESTELEM;
- const hsize_t four = 4;
+ src_typ_t * s_ptr;
+ dst_typ_t * d_ptr;
+ int i;
+ const int nelmts = NTESTELEM;
+ const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- ArrayType* array_dt = NULL;
+ ArrayType * array_dt = NULL;
// Output message about test being performed
SUBTEST("Compound Element Shrinking & Reordering");
try {
/* Sizes should be the same, but be careful just in case */
- buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
- bkg = (unsigned char*)HDmalloc(nelmts * sizeof(dst_typ_t));
- orig = (unsigned char*)HDmalloc(nelmts * sizeof(src_typ_t));
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- s_ptr->a = i*8+0;
- s_ptr->b = (i*8+1) & 0x7fff;
- s_ptr->c[0] = i*8+2;
- s_ptr->c[1] = i*8+3;
- s_ptr->c[2] = i*8+4;
- s_ptr->c[3] = i*8+5;
- s_ptr->d = (i*8+6) & 0x7fff;
- s_ptr->e = i*8+7;
+ buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
+ bkg = (unsigned char *)HDmalloc(nelmts * sizeof(dst_typ_t));
+ orig = (unsigned char *)HDmalloc(nelmts * sizeof(src_typ_t));
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ s_ptr->a = i * 8 + 0;
+ s_ptr->b = (i * 8 + 1) & 0x7fff;
+ s_ptr->c[0] = i * 8 + 2;
+ s_ptr->c[1] = i * 8 + 3;
+ s_ptr->c[2] = i * 8 + 4;
+ s_ptr->c[3] = i * 8 + 5;
+ s_ptr->d = (i * 8 + 6) & 0x7fff;
+ s_ptr->e = i * 8 + 7;
}
- memcpy(buf, orig, nelmts*sizeof(src_typ_t));
+ memcpy(buf, orig, nelmts * sizeof(src_typ_t));
/* Build hdf5 datatypes */
array_dt = new ArrayType(PredType::NATIVE_INT, 1, &four);
@@ -400,30 +384,22 @@ static void test_compound_4()
st.convert(dt, (size_t)nelmts, buf, bkg);
/* Compare results */
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- d_ptr = ((dst_typ_t*)buf) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->b != d_ptr->b ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->d != d_ptr->d ||
- s_ptr->e != d_ptr->e)
- {
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ d_ptr = ((dst_typ_t *)buf) + i;
+ if (s_ptr->a != d_ptr->a || s_ptr->b != d_ptr->b || s_ptr->c[0] != d_ptr->c[0] ||
+ s_ptr->c[1] != d_ptr->c[1] || s_ptr->c[2] != d_ptr->c[2] || s_ptr->c[3] != d_ptr->c[3] ||
+ s_ptr->d != d_ptr->d || s_ptr->e != d_ptr->e) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
- << s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
- cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b
- << "c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
- << d_ptr->c[2] << "," << d_ptr->c[3] << ", d="
- << d_ptr->d << ", e=" << d_ptr->e << "}" << endl;
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b << "c=[" << s_ptr->c[0] << ","
+ << s_ptr->c[1] << "," << s_ptr->c[2] << "," << s_ptr->c[3] << ", d=" << s_ptr->d
+ << ", e=" << s_ptr->e << "}" << endl;
+ cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b << "c=[" << d_ptr->c[0] << ","
+ << d_ptr->c[1] << "," << d_ptr->c[2] << "," << d_ptr->c[3] << ", d=" << d_ptr->d
+ << ", e=" << d_ptr->e << "}" << endl;
} // if
- } // for
+ } // for
/* Release resources */
HDfree(buf);
@@ -434,18 +410,16 @@ static void test_compound_4()
st.close();
dt.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
- if(array_dt)
+ if (array_dt)
delete array_dt;
-} // test_compound_4()
+} // test_compound_4()
-
/*-------------------------------------------------------------------------
* Function: test_compound_5
*
@@ -461,27 +435,27 @@ static void test_compound_4()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_5()
+static void
+test_compound_5()
{
typedef struct {
- char name[16];
- short tdim;
- short coll_ids[4];
+ char name[16];
+ short tdim;
+ short coll_ids[4];
} src_typ_t;
typedef struct {
- char name[16];
- short tdim;
- int coll_ids[4];
+ char name[16];
+ short tdim;
+ int coll_ids[4];
} dst_typ_t;
- hsize_t dims[1] = {4};
- src_typ_t src[2] = {{"one", 102, {104, 105, 106, 107}},
- {"two", 202, {204, 205, 206, 207}}};
+ hsize_t dims[1] = {4};
+ src_typ_t src[2] = {{"one", 102, {104, 105, 106, 107}}, {"two", 202, {204, 205, 206, 207}}};
dst_typ_t *dst;
- void *buf = HDcalloc(2, sizeof(dst_typ_t));
- void *bkg = HDcalloc(2, sizeof(dst_typ_t));
- ArrayType* array_dt = NULL;
+ void * buf = HDcalloc(2, sizeof(dst_typ_t));
+ void * bkg = HDcalloc(2, sizeof(dst_typ_t));
+ ArrayType *array_dt = NULL;
// Output message about test being performed
SUBTEST("Optimized Struct Converter");
@@ -489,17 +463,17 @@ static void test_compound_5()
/* Build datatypes */
array_dt = new ArrayType(PredType::NATIVE_SHORT, 1, dims);
- CompType short_array(4*sizeof(short));
+ CompType short_array(4 * sizeof(short));
short_array.insertMember("_", 0, *array_dt);
array_dt->close();
delete array_dt;
- CompType int_array(4*sizeof(int));
+ CompType int_array(4 * sizeof(int));
array_dt = new ArrayType(PredType::NATIVE_INT, 1, dims);
int_array.insertMember("_", 0, *array_dt);
array_dt->close();
- StrType strg(PredType::C_S1, 16);
+ StrType strg(PredType::C_S1, 16);
CompType src_type(sizeof(src_typ_t));
src_type.insertMember("name", HOFFSET(src_typ_t, name), strg);
src_type.insertMember("tdim", HOFFSET(src_typ_t, tdim), PredType::NATIVE_SHORT);
@@ -513,7 +487,7 @@ static void test_compound_5()
/* Convert data */
memcpy(buf, src, sizeof(src));
src_type.convert(dst_type, (size_t)2, buf, bkg);
- dst = (dst_typ_t*)buf;
+ dst = (dst_typ_t *)buf;
/* Cleanup */
src_type.close();
@@ -523,31 +497,27 @@ static void test_compound_5()
int_array.close();
/* Check results */
- if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) ||
- src[1].tdim!=dst[1].tdim ||
- src[1].coll_ids[0]!=dst[1].coll_ids[0] ||
- src[1].coll_ids[1]!=dst[1].coll_ids[1] ||
- src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
- src[1].coll_ids[3]!=dst[1].coll_ids[3])
- { H5_FAILED(); }
+ if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) || src[1].tdim != dst[1].tdim ||
+ src[1].coll_ids[0] != dst[1].coll_ids[0] || src[1].coll_ids[1] != dst[1].coll_ids[1] ||
+ src[1].coll_ids[2] != dst[1].coll_ids[2] || src[1].coll_ids[3] != dst[1].coll_ids[3]) {
+ H5_FAILED();
+ }
/* Free memory buffers */
HDfree(buf);
HDfree(bkg);
dst = NULL;
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
- if(array_dt)
+ if (array_dt)
delete array_dt;
-} // test_compound_5()
+} // test_compound_5()
-
/*-------------------------------------------------------------------------
* Function: test_compound_6
*
@@ -562,7 +532,8 @@ static void test_compound_5()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_6()
+static void
+test_compound_6()
{
typedef struct {
short b;
@@ -574,25 +545,25 @@ static void test_compound_6()
long d;
} dst_typ_t;
- src_typ_t *s_ptr;
- dst_typ_t *d_ptr;
- int i;
- const int nelmts = NTESTELEM;
- unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
+ src_typ_t * s_ptr;
+ dst_typ_t * d_ptr;
+ int i;
+ const int nelmts = NTESTELEM;
+ unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
// Output message about test being performed
SUBTEST("Compound Element Growing");
try {
/* Sizes should be the same, but be careful just in case */
- buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
- bkg = (unsigned char*)HDmalloc(nelmts * sizeof(dst_typ_t));
- orig = (unsigned char*)HDmalloc(nelmts * sizeof(src_typ_t));
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- s_ptr->b = (i*8+1) & 0x7fff;
- s_ptr->d = (i*8+6) & 0x7fff;
+ buf = (unsigned char *)HDmalloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
+ bkg = (unsigned char *)HDmalloc(nelmts * sizeof(dst_typ_t));
+ orig = (unsigned char *)HDmalloc(nelmts * sizeof(src_typ_t));
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ s_ptr->b = (i * 8 + 1) & 0x7fff;
+ s_ptr->d = (i * 8 + 6) & 0x7fff;
}
- memcpy(buf, orig, nelmts*sizeof(src_typ_t));
+ memcpy(buf, orig, nelmts * sizeof(src_typ_t));
/* Build hdf5 datatypes */
CompType st(sizeof(src_typ_t));
@@ -607,20 +578,16 @@ static void test_compound_6()
st.convert(dt, (size_t)nelmts, buf, bkg);
/* Compare results */
- for (i=0; i<nelmts; i++) {
- s_ptr = ((src_typ_t*)orig) + i;
- d_ptr = ((dst_typ_t*)buf) + i;
- if (s_ptr->b != d_ptr->b ||
- s_ptr->d != d_ptr->d)
- {
+ for (i = 0; i < nelmts; i++) {
+ s_ptr = ((src_typ_t *)orig) + i;
+ d_ptr = ((dst_typ_t *)buf) + i;
+ if (s_ptr->b != d_ptr->b || s_ptr->d != d_ptr->d) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d
- << "}" << endl;
- cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d
- << "}" << endl;
+ cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d << "}" << endl;
+ cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d << "}" << endl;
} // if
- } // for
+ } // for
/* Release resources */
HDfree(buf);
@@ -631,13 +598,12 @@ static void test_compound_6()
st.close();
dt.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_compound_6()
+} // test_compound_6()
/*-------------------------------------------------------------------------
* Function: test_compound_7
@@ -652,18 +618,19 @@ static void test_compound_6()
*
*-------------------------------------------------------------------------
*/
-static void test_compound_7()
+static void
+test_compound_7()
{
typedef struct {
- int a;
+ int a;
float b;
- long c;
+ long c;
} s1_typ_t;
typedef struct {
- int a;
- float b;
- long c;
+ int a;
+ float b;
+ long c;
double d;
} s2_typ_t;
@@ -672,9 +639,9 @@ static void test_compound_7()
try {
CompType tid1(sizeof(s1_typ_t));
- tid1.insertMember("a", HOFFSET(s1_typ_t,a),PredType::NATIVE_INT);
- tid1.insertMember("b", HOFFSET(s1_typ_t,b),PredType::NATIVE_FLOAT);
- tid1.insertMember("c", HOFFSET(s1_typ_t,c),PredType::NATIVE_LONG);
+ tid1.insertMember("a", HOFFSET(s1_typ_t, a), PredType::NATIVE_INT);
+ tid1.insertMember("b", HOFFSET(s1_typ_t, b), PredType::NATIVE_FLOAT);
+ tid1.insertMember("c", HOFFSET(s1_typ_t, c), PredType::NATIVE_LONG);
size_t type_size = tid1.getSize();
verify_val(type_size, sizeof(s1_typ_t), "DataType::getSize", __LINE__, __FILE__);
@@ -689,21 +656,23 @@ static void test_compound_7()
try {
tid2.insertMember("d", HOFFSET(s2_typ_t, d), PredType::NATIVE_DOUBLE);
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("CompType::insertMember", "Attempted to insert field past end of compound data type.");
- } catch (DataTypeIException& err) {}
+ throw InvalidActionException("CompType::insertMember",
+ "Attempted to insert field past end of compound data type.");
+ }
+ catch (DataTypeIException &err) {
+ }
/* Release resources */
tid1.close();
tid2.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_compound_7()
-
+} // test_compound_7()
+
/*-------------------------------------------------------------------------
* Function: test_compound_set_size
*
@@ -717,7 +686,8 @@ static void test_compound_7()
*-------------------------------------------------------------------------
*/
const H5std_string COMPFILE("tcompound_types.h5");
-static void test_compound_set_size()
+static void
+test_compound_set_size()
{
typedef struct {
int a, b, c[4], d, e;
@@ -784,14 +754,13 @@ static void test_compound_set_size()
file.close();
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_compound_set_size()
-
+} // test_compound_set_size()
+
/*-------------------------------------------------------------------------
* Function: test_compound
*
@@ -804,23 +773,22 @@ static void test_compound_set_size()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_compound()
+extern "C" void
+test_compound()
{
// Output message about test being performed
MESSAGE(5, ("Testing Compound Data Type operations\n"));
- test_compound_1(); // various things about compound data types
- test_compound_2(); // compound element reordering
- test_compound_3(); // compound datatype subset conversions
- test_compound_4(); // compound element shrinking & reordering
- test_compound_5(); // optimized struct converter
- test_compound_6(); // compound element growing
- test_compound_7(); // compound element insertion
- test_compound_set_size(); // set size on compound data types
-} // test_compound()
-
-
+ test_compound_1(); // various things about compound data types
+ test_compound_2(); // compound element reordering
+ test_compound_3(); // compound datatype subset conversions
+ test_compound_4(); // compound element shrinking & reordering
+ test_compound_5(); // optimized struct converter
+ test_compound_6(); // compound element growing
+ test_compound_7(); // compound element insertion
+ test_compound_set_size(); // set size on compound data types
+} // test_compound()
+
/*-------------------------------------------------------------------------
* Function: cleanup_compound
*
@@ -830,8 +798,8 @@ void test_compound()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_compound()
+extern "C" void
+cleanup_compound()
{
HDremove(COMPFILE.c_str());
-} // cleanup_file
+} // cleanup_file
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp
index 0a60a86..4170387 100644
--- a/c++/test/tdspl.cpp
+++ b/c++/test/tdspl.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,19 +27,21 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
const H5std_string FILENAME("tdatatransform.h5");
-static void test_transfplist()
+static void
+test_transfplist()
{
- const char* c_to_f = "(9/5.0)*x + 32";
- const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
+ const char *c_to_f = "(9/5.0)*x + 32";
+ const char *simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
/* inverses the utrans transform in init_test to get back original array */
- const char* utrans_inv = "(x/3)*4 - 100";
+ const char *utrans_inv = "(x/3)*4 - 100";
SUBTEST("DSetMemXferPropList::set/getDataTransform()");
try {
@@ -63,12 +65,12 @@ static void test_transfplist()
// Find out the length of the transform expression, allocate the buffer
// for it, then read and verify the expression from the copied plist
- ssize_t tran_len = dxpl_c_to_f_copy.getDataTransform(NULL);
- char *c_to_f_read = (char *)HDmalloc(tran_len+1);
- HDmemset(c_to_f_read, 0, tran_len+1);
- dxpl_c_to_f_copy.getDataTransform(c_to_f_read, tran_len+1);
- verify_val((const char*)c_to_f_read, (const char*)c_to_f,
- "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ ssize_t tran_len = dxpl_c_to_f_copy.getDataTransform(NULL);
+ char * c_to_f_read = (char *)HDmalloc(tran_len + 1);
+ HDmemset(c_to_f_read, 0, tran_len + 1);
+ dxpl_c_to_f_copy.getDataTransform(c_to_f_read, tran_len + 1);
+ verify_val((const char *)c_to_f_read, (const char *)c_to_f, "DSetMemXferPropList::getDataTransform",
+ __LINE__, __FILE__);
HDfree(c_to_f_read);
//
@@ -78,57 +80,54 @@ static void test_transfplist()
// Get and verify the expression with:
// ssize_t getDataTransform(char* exp, const size_t buf_size [default=0])
- tran_len = dxpl_c_to_f.getDataTransform(NULL);
- c_to_f_read = (char *)HDmalloc(tran_len+1);
- HDmemset(c_to_f_read, 0, tran_len+1);
- dxpl_c_to_f.getDataTransform(c_to_f_read, tran_len+1);
- verify_val((const char*)c_to_f_read, (const char*)c_to_f,
- "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ tran_len = dxpl_c_to_f.getDataTransform(NULL);
+ c_to_f_read = (char *)HDmalloc(tran_len + 1);
+ HDmemset(c_to_f_read, 0, tran_len + 1);
+ dxpl_c_to_f.getDataTransform(c_to_f_read, tran_len + 1);
+ verify_val((const char *)c_to_f_read, (const char *)c_to_f, "DSetMemXferPropList::getDataTransform",
+ __LINE__, __FILE__);
HDfree(c_to_f_read);
// Get and verify the expression with:
// H5std_string DSetMemXferPropList::getDataTransform()
H5std_string simple_read = dxpl_simple.getDataTransform();
- verify_val((const char*)simple_read.c_str(), (const char*)simple,
- "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ verify_val((const char *)simple_read.c_str(), (const char *)simple,
+ "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
// Get and verify the expression with:
// ssize_t getDataTransform(char* exp, const size_t buf_size)
- tran_len = dxpl_utrans_inv.getDataTransform(NULL, 0);
- char *utrans_inv_read = (char *)HDmalloc(tran_len+1);
- HDmemset(utrans_inv_read, 0, tran_len+1);
- dxpl_utrans_inv.getDataTransform(utrans_inv_read, tran_len+1);
- verify_val((const char*)utrans_inv_read, (const char*)utrans_inv,
- "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ tran_len = dxpl_utrans_inv.getDataTransform(NULL, 0);
+ char *utrans_inv_read = (char *)HDmalloc(tran_len + 1);
+ HDmemset(utrans_inv_read, 0, tran_len + 1);
+ dxpl_utrans_inv.getDataTransform(utrans_inv_read, tran_len + 1);
+ verify_val((const char *)utrans_inv_read, (const char *)utrans_inv,
+ "DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
HDfree(utrans_inv_read);
PASSED();
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_transfplist", __LINE__, __FILE__, E.getCDetailMsg());
}
}
-
/****************************************************************
**
** test_dsproplist(): Main dataset property list testing routine.
**
****************************************************************/
-extern "C"
-void test_dsproplist()
+extern "C" void
+test_dsproplist()
{
// Output message about test being performed
MESSAGE(5, ("Testing Generic Dataset Property Lists\n"));
test_transfplist(); // test set/getDataTransform()
-} // test_dsproplist()
+} // test_dsproplist()
-
-extern "C"
-void cleanup_dsproplist()
+extern "C" void
+cleanup_dsproplist()
{
HDremove(FILENAME.c_str());
}
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index b998f76..c516381 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -48,16 +48,16 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
int
main(int argc, char *argv[])
{
- try
- {
+ try {
// Turn of the auto-printing when failure occurs so that we can
// handle the errors appropriately since sometime failures are
// caused deliberately and expected.
@@ -70,37 +70,36 @@ main(int argc, char *argv[])
// testing dataset functionalities in dset.cpp
AddTest("dsets", test_dset, cleanup_dsets, "Dataset I/O Operations", NULL);
// testing dataspace functionalities in th5s.cpp
- AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
+ AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
// testing attribute functionalities in tattr.cpp
- AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL);
+ AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL);
// testing object functionalities in tobject.cpp
- AddTest("tobject", test_object, cleanup_object, "Objects", NULL);
+ AddTest("tobject", test_object, cleanup_object, "Objects", NULL);
// testing reference functionalities in trefer.cpp
- AddTest("trefer", test_reference, cleanup_reference, "References", NULL);
+ AddTest("trefer", test_reference, cleanup_reference, "References", NULL);
// testing variable-length strings in tvlstr.cpp
- AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
- AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL);
- AddTest("tarray", test_array, cleanup_array, "Array Datatypes", NULL);
- AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL);
- AddTest("tdspl", test_dsproplist, cleanup_dsproplist, "Dataset Property List", NULL);
- AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL);
- AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL);
-/* Comment out tests that are not done yet. - BMR, Feb 2001
- AddTest("select", test_select, cleanup_select, "Selections", NULL);
- AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
- AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
- AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
- AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
- AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL);
-
-Comment out tests that are not done yet */
-
-/* Tentative - BMR 2007/1/12
- AddTest("enum", test_enum, cleanup_enum, "Enum Data Types", NULL);
-*/
+ AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
+ AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL);
+ AddTest("tarray", test_array, cleanup_array, "Array Datatypes", NULL);
+ AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL);
+ AddTest("tdspl", test_dsproplist, cleanup_dsproplist, "Dataset Property List", NULL);
+ AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL);
+ AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL);
+ /* Comment out tests that are not done yet. - BMR, Feb 2001
+ AddTest("select", test_select, cleanup_select, "Selections", NULL);
+ AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
+ AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
+ AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
+ AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
+ AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL);
+
+ Comment out tests that are not done yet */
+
+ /* Tentative - BMR 2007/1/12
+ AddTest("enum", test_enum, cleanup_enum, "Enum Data Types", NULL);
+ */
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("Tests failed", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -108,7 +107,7 @@ Comment out tests that are not done yet */
TestInfo(argv[0]);
/* Parse command line arguments */
- TestParseCmdLine(argc,argv);
+ TestParseCmdLine(argc, argv);
/* Perform requested testing */
PerformTests();
@@ -121,5 +120,8 @@ Comment out tests that are not done yet */
if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
TestCleanup();
+ /* Release test infrastructure */
+ TestShutdown();
+
return (GetTestNumErrs());
}
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index d5278d5..31a7aa0 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,37 +30,37 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
-
-const hsize_t F1_USERBLOCK_SIZE = (hsize_t)0;
-const size_t F1_OFFSET_SIZE = sizeof(haddr_t);
-const size_t F1_LENGTH_SIZE = sizeof(hsize_t);
-const unsigned F1_SYM_LEAF_K = 4;
-const unsigned F1_SYM_INTERN_K = 16;
-const H5std_string FILE1("tfile1.h5");
-
-const hsize_t F2_USERBLOCK_SIZE = (hsize_t)512;
-const size_t F2_OFFSET_SIZE = 8;
-const size_t F2_LENGTH_SIZE = 8;
-const unsigned F2_SYM_LEAF_K = 8;
-const unsigned F2_SYM_INTERN_K = 32;
-const unsigned F2_ISTORE = 64;
-const H5std_string FILE2("tfile2.h5");
-
-const hsize_t F3_USERBLOCK_SIZE = (hsize_t)0;
-const size_t F3_OFFSET_SIZE = F2_OFFSET_SIZE;
-const size_t F3_LENGTH_SIZE = F2_LENGTH_SIZE;
-const unsigned F3_SYM_LEAF_K = F2_SYM_LEAF_K;
-const unsigned F3_SYM_INTERN_K = F2_SYM_INTERN_K;
-const H5std_string FILE3("tfile3.h5");
-
-const int KB = 1024;
-const H5std_string FILE4("tfile4.h5");
-
-
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
+
+const hsize_t F1_USERBLOCK_SIZE = (hsize_t)0;
+const size_t F1_OFFSET_SIZE = sizeof(haddr_t);
+const size_t F1_LENGTH_SIZE = sizeof(hsize_t);
+const unsigned F1_SYM_LEAF_K = 4;
+const unsigned F1_SYM_INTERN_K = 16;
+const H5std_string FILE1("tfile1.h5");
+
+const hsize_t F2_USERBLOCK_SIZE = (hsize_t)512;
+const size_t F2_OFFSET_SIZE = 8;
+const size_t F2_LENGTH_SIZE = 8;
+const unsigned F2_SYM_LEAF_K = 8;
+const unsigned F2_SYM_INTERN_K = 32;
+const unsigned F2_ISTORE = 64;
+const H5std_string FILE2("tfile2.h5");
+
+const hsize_t F3_USERBLOCK_SIZE = (hsize_t)0;
+const size_t F3_OFFSET_SIZE = F2_OFFSET_SIZE;
+const size_t F3_LENGTH_SIZE = F2_LENGTH_SIZE;
+const unsigned F3_SYM_LEAF_K = F2_SYM_LEAF_K;
+const unsigned F3_SYM_INTERN_K = F2_SYM_INTERN_K;
+const H5std_string FILE3("tfile3.h5");
+
+const int KB = 1024;
+const H5std_string FILE4("tfile4.h5");
+
/*-------------------------------------------------------------------------
* Function: test_file_create
*
@@ -81,7 +81,8 @@ const H5std_string FILE4("tfile4.h5");
*
*-------------------------------------------------------------------------
*/
-static void test_file_create()
+static void
+test_file_create()
{
// Output message about test being performed
SUBTEST("File Creation I/O");
@@ -94,21 +95,22 @@ static void test_file_create()
remove(FILE1.c_str());
// Setting this to NULL for cleaning up in failure situations
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
// Create file FILE1
- file1 = new H5File (FILE1, H5F_ACC_EXCL);
+ file1 = new H5File(FILE1, H5F_ACC_EXCL);
// Try to create the same file with H5F_ACC_TRUNC. This should fail
// because file1 is the same file and is currently open.
try {
- H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
+ H5File file2(FILE1, H5F_ACC_TRUNC); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "Attempted to create an existing file.");
}
- catch (FileIException& E) // catch truncating existing file
- {} // do nothing, FAIL expected
+ catch (FileIException &E) // catch truncating existing file
+ {
+ } // do nothing, FAIL expected
// Close file1
delete file1;
@@ -117,52 +119,56 @@ static void test_file_create()
// Try again with H5F_ACC_EXCL. This should fail because the file
// already exists from the previous steps.
try {
- H5File file2(FILE1, H5F_ACC_EXCL); // should throw E
+ H5File file2(FILE1, H5F_ACC_EXCL); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "File already exists.");
}
- catch (FileIException& E) // catching creating existing file
- {} // do nothing, FAIL expected
+ catch (FileIException &E) // catching creating existing file
+ {
+ } // do nothing, FAIL expected
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
- file1 = new H5File (FILE1, H5F_ACC_TRUNC);
+ file1 = new H5File(FILE1, H5F_ACC_TRUNC);
// Try to create first file again. This should fail because file1
// is the same file and is currently open.
try {
- H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
+ H5File file2(FILE1, H5F_ACC_TRUNC); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "H5F_ACC_TRUNC attempt on an opened file.");
}
- catch (FileIException& E) // catching truncating opened file
- {} // do nothing, FAIL expected
+ catch (FileIException &E) // catching truncating opened file
+ {
+ } // do nothing, FAIL expected
// Try with H5F_ACC_EXCL. This should fail too because the file already
// exists.
try {
- H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E
+ H5File file3(FILE1, H5F_ACC_EXCL); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "H5F_ACC_EXCL attempt on an existing file.");
}
- catch (FileIException& E) // catching H5F_ACC_EXCL on existing file
- {} // do nothing, FAIL expected
+ catch (FileIException &E) // catching H5F_ACC_EXCL on existing file
+ {
+ } // do nothing, FAIL expected
// Get the file-creation template
FileCreatPropList tmpl1 = file1->getCreatePlist();
hsize_t ublock = tmpl1.getUserblock();
- verify_val((long)ublock, (long)F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
+ verify_val((long)ublock, (long)F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__,
+ __FILE__);
- size_t parm1, parm2; // file-creation parameters
- tmpl1.getSizes( parm1, parm2);
+ size_t parm1, parm2; // file-creation parameters
+ tmpl1.getSizes(parm1, parm2);
verify_val(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- unsigned iparm1,iparm2; // file-creation parameters
- tmpl1.getSymk( iparm1, iparm2);
+ unsigned iparm1, iparm2; // file-creation parameters
+ tmpl1.getSymk(iparm1, iparm2);
verify_val(iparm1, F1_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
verify_val(iparm2, F1_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
@@ -172,85 +178,84 @@ static void test_file_create()
// Close first file
delete file1;
}
- catch (InvalidActionException& E)
- {
+ catch (InvalidActionException &E) {
cerr << " *FAILED*" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
if (file1 != NULL) // clean up
delete file1;
}
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_create()", __LINE__, __FILE__, E.getCDetailMsg());
if (file1 != NULL) // clean up
delete file1;
}
// Setting this to NULL for cleaning up in failure situations
- FileCreatPropList* tmpl1 = NULL;
- try
- {
+ FileCreatPropList *tmpl1 = NULL;
+ try {
// Create a new file with a non-standard file-creation template
tmpl1 = new FileCreatPropList;
// Set the new file-creation parameters
- tmpl1->setUserblock (F2_USERBLOCK_SIZE);
- tmpl1->setSizes( F2_OFFSET_SIZE, F2_LENGTH_SIZE );
- tmpl1->setSymk( F2_SYM_INTERN_K, F2_SYM_LEAF_K );
+ tmpl1->setUserblock(F2_USERBLOCK_SIZE);
+ tmpl1->setSizes(F2_OFFSET_SIZE, F2_LENGTH_SIZE);
+ tmpl1->setSymk(F2_SYM_INTERN_K, F2_SYM_LEAF_K);
// Try to create second file, with non-standard file-creation template
// params.
- H5File file2( FILE2, H5F_ACC_TRUNC, *tmpl1 );
+ H5File file2(FILE2, H5F_ACC_TRUNC, *tmpl1);
// Release file-creation template
delete tmpl1;
tmpl1 = NULL;
// Get the file-creation template
- tmpl1 = new FileCreatPropList (file2.getCreatePlist());
+ tmpl1 = new FileCreatPropList(file2.getCreatePlist());
// Get the file-creation parameters
hsize_t ublock = tmpl1->getUserblock();
- verify_val((long)ublock, (long)F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
+ verify_val((long)ublock, (long)F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__,
+ __FILE__);
- size_t parm1, parm2; // file-creation parameters
- tmpl1->getSizes( parm1, parm2);
+ size_t parm1, parm2; // file-creation parameters
+ tmpl1->getSizes(parm1, parm2);
verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- unsigned iparm1,iparm2; // file-creation parameters
- tmpl1->getSymk( iparm1, iparm2);
+ unsigned iparm1, iparm2; // file-creation parameters
+ tmpl1->getSymk(iparm1, iparm2);
verify_val(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
verify_val(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
// Clone the file-creation template
FileCreatPropList tmpl2;
- tmpl2.copy (*tmpl1);
+ tmpl2.copy(*tmpl1);
// Release file-creation template
delete tmpl1;
tmpl1 = NULL;
// Set the new file-creation parameter
- tmpl2.setUserblock( F3_USERBLOCK_SIZE );
+ tmpl2.setUserblock(F3_USERBLOCK_SIZE);
// Try to create second file, with non-standard file-creation template
// params
- H5File file3( FILE3, H5F_ACC_TRUNC, tmpl2 );
+ H5File file3(FILE3, H5F_ACC_TRUNC, tmpl2);
// Get the file-creation template
- tmpl1 = new FileCreatPropList (file3.getCreatePlist());
+ tmpl1 = new FileCreatPropList(file3.getCreatePlist());
// Get the file-creation parameters
ublock = tmpl1->getUserblock();
- verify_val((long)ublock, (long)F3_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
+ verify_val((long)ublock, (long)F3_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__,
+ __FILE__);
- tmpl1->getSizes( parm1, parm2);
+ tmpl1->getSizes(parm1, parm2);
verify_val(parm1, F3_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F3_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- tmpl1->getSymk( iparm1, iparm2);
+ tmpl1->getSymk(iparm1, iparm2);
verify_val(iparm1, F3_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
verify_val(iparm2, F3_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
@@ -259,15 +264,13 @@ static void test_file_create()
PASSED();
}
// catch all exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_create()", __LINE__, __FILE__, E.getCDetailMsg());
- if (tmpl1 != NULL) // clean up
+ if (tmpl1 != NULL) // clean up
delete tmpl1;
}
-} // test_file_create()
+} // test_file_create()
-
/*-------------------------------------------------------------------------
* Function: test_file_open
*
@@ -288,7 +291,8 @@ static void test_file_create()
*
*-------------------------------------------------------------------------
*/
-static void test_file_open()
+static void
+test_file_open()
{
// Output message about test being performed
SUBTEST("File Opening I/O");
@@ -296,21 +300,22 @@ static void test_file_open()
try {
// Open first file
- H5File file1 (FILE2, H5F_ACC_RDWR );
+ H5File file1(FILE2, H5F_ACC_RDWR);
// Get the file-creation template
FileCreatPropList tmpl1 = file1.getCreatePlist();
// Get the file-creation parameters
hsize_t ublock = tmpl1.getUserblock();
- verify_val((long)ublock, (long)F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
+ verify_val((long)ublock, (long)F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__,
+ __FILE__);
- size_t parm1, parm2; // file-creation parameters
+ size_t parm1, parm2; // file-creation parameters
tmpl1.getSizes(parm1, parm2);
verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- unsigned iparm1,iparm2; // file-creation parameters
+ unsigned iparm1, iparm2; // file-creation parameters
tmpl1.getSymk(iparm1, iparm2);
verify_val(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
verify_val(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__);
@@ -322,13 +327,14 @@ static void test_file_open()
// Try truncating the file, and it should fail because the file is
// still opened with file2.
try {
- H5File file3 (FILE2, H5F_ACC_TRUNC); // should throw E
+ H5File file3(FILE2, H5F_ACC_TRUNC); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "Attempt truncating an opened file.");
}
- catch (FileIException& E) // catching H5F_ACC_TRUNC on opened file
- {} // do nothing, FAIL expected
+ catch (FileIException &E) // catching H5F_ACC_TRUNC on opened file
+ {
+ } // do nothing, FAIL expected
// Now, really close the file.
file2.close();
@@ -345,15 +351,13 @@ static void test_file_open()
H5File file4(FILE2, H5F_ACC_TRUNC);
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_open()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_file_open()
+} // test_file_open()
-
/*-------------------------------------------------------------------------
* Function: test_file_size
*
@@ -366,7 +370,8 @@ static void test_file_open()
*
*-------------------------------------------------------------------------
*/
-static void test_file_size()
+static void
+test_file_size()
{
// Output message about test being performed
SUBTEST("File Size");
@@ -385,27 +390,28 @@ static void test_file_size()
// fapl.setSec2();
// Create a file
- H5File file4( FILE4, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
+ H5File file4(FILE4, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
// Get file size
hsize_t file_size = file4.getFileSize();
// Check if file size is reasonable. It's supposed to be 2KB now.
- if (file_size < 1*KB || file_size > 4*KB)
- issue_fail_msg("test_file_size()", __LINE__, __FILE__, "getFileSize() returned unreasonable value");
+ if (file_size < 1 * KB || file_size > 4 * KB)
+ issue_fail_msg("test_file_size()", __LINE__, __FILE__,
+ "getFileSize() returned unreasonable value");
// Get the amount of free space in the file
hssize_t free_space = file4.getFreeSpace();
// Check if it's reasonable. It's 0 now.
- if (free_space < 0 || free_space > 4*KB)
- issue_fail_msg("test_file_size()", __LINE__, __FILE__, "getFreeSpace returned unreasonable value");
+ if (free_space < 0 || free_space > 4 * KB)
+ issue_fail_msg("test_file_size()", __LINE__, __FILE__,
+ "getFreeSpace returned unreasonable value");
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_size()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -414,9 +420,8 @@ static void test_file_size()
if (ret < 0)
issue_fail_msg("test_file_size()", __LINE__, __FILE__, "H5Pclose failed");
-} // test_file_size()
+} // test_file_size()
-
/*-------------------------------------------------------------------------
* Function: test_file_name
*
@@ -429,14 +434,14 @@ static void test_file_size()
*
*-------------------------------------------------------------------------
*/
-const int RANK = 2;
-const int NX = 4;
-const int NY = 5;
-const H5std_string GROUPNAME ("group");
-const H5std_string DSETNAME ("dataset");
-const H5std_string DATTRNAME ("dataset attribute");
-const H5std_string FATTRNAME ("file attribute");
-const H5std_string DTYPENAME ("compound");
+const int RANK = 2;
+const int NX = 4;
+const int NY = 5;
+const H5std_string GROUPNAME("group");
+const H5std_string DSETNAME("dataset");
+const H5std_string DATTRNAME("dataset attribute");
+const H5std_string FATTRNAME("file attribute");
+const H5std_string DTYPENAME("compound");
// Compound datatype
typedef struct s1_t {
@@ -444,7 +449,8 @@ typedef struct s1_t {
float b;
} s1_t;
-static void test_file_name()
+static void
+test_file_name()
{
// Output message about test being performed.
SUBTEST("File Name");
@@ -466,11 +472,11 @@ static void test_file_name()
verify_val(file_name, FILE4, "Group::getFileName", __LINE__, __FILE__);
// Create the data space.
- hsize_t dims[RANK] = {NX, NY};
+ hsize_t dims[RANK] = {NX, NY};
DataSpace space(RANK, dims);
// Create a new dataset.
- DataSet dataset(file4.createDataSet (DSETNAME, PredType::NATIVE_INT, space));
+ DataSet dataset(file4.createDataSet(DSETNAME, PredType::NATIVE_INT, space));
// Get and verify file name via a dataset.
file_name = dataset.getFileName();
@@ -484,7 +490,7 @@ static void test_file_name()
verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__);
// Create a compound datatype.
- CompType comp_type (sizeof(s1_t));
+ CompType comp_type(sizeof(s1_t));
// Insert fields.
comp_type.insertMember("a", HOFFSET(s1_t, a), PredType::NATIVE_INT);
@@ -503,15 +509,13 @@ static void test_file_name()
verify_val(finfo.sohm.hdr_size, 0, "H5File::getFileInfo", __LINE__, __FILE__);
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_name()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_file_name()
+} // test_file_name()
-
/*-------------------------------------------------------------------------
*
* Function: test_file_attribute
@@ -521,15 +525,16 @@ static void test_file_name()
* Return None
*-------------------------------------------------------------------------
*/
-const int RANK1 = 1;
-const int ATTR1_DIM1 = 3;
-const H5std_string FILE5("tfattrs.h5");
-const H5std_string FATTR1_NAME ("file attribute 1");
-const H5std_string FATTR2_NAME ("file attribute 2");
-int fattr_data[ATTR1_DIM1]={512,-234,98123}; // Test data for file attribute
-int dattr_data[ATTR1_DIM1]={256,-123,1000}; // Test data for dataset attribute
-
-static void test_file_attribute()
+const int RANK1 = 1;
+const int ATTR1_DIM1 = 3;
+const H5std_string FILE5("tfattrs.h5");
+const H5std_string FATTR1_NAME("file attribute 1");
+const H5std_string FATTR2_NAME("file attribute 2");
+int fattr_data[ATTR1_DIM1] = {512, -234, 98123}; // Test data for file attribute
+int dattr_data[ATTR1_DIM1] = {256, -123, 1000}; // Test data for dataset attribute
+
+static void
+test_file_attribute()
{
int rdata[ATTR1_DIM1];
int i;
@@ -543,7 +548,7 @@ static void test_file_attribute()
H5File file5(FILE5, H5F_ACC_TRUNC);
// Create the data space
- hsize_t dims[RANK1] = {ATTR1_DIM1};
+ hsize_t dims[RANK1] = {ATTR1_DIM1};
DataSpace space(RANK1, dims);
// Create two attributes for the file
@@ -556,13 +561,15 @@ static void test_file_attribute()
// Try to create the same attribute again (should fail)
Attribute fattr_dup(file5.createAttribute(FATTR2_NAME, PredType::NATIVE_INT, space));
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("H5File createAttribute", "Attempted to create an existing attribute.");
+ throw InvalidActionException("H5File createAttribute",
+ "Attempted to create an existing attribute.");
}
- catch (AttributeIException& E) // catch creating existing attribute
- {} // do nothing, FAIL expected
+ catch (AttributeIException &E) // catch creating existing attribute
+ {
+ } // do nothing, FAIL expected
// Create a new dataset
- DataSet dataset(file5.createDataSet (DSETNAME, PredType::NATIVE_INT, space));
+ DataSet dataset(file5.createDataSet(DSETNAME, PredType::NATIVE_INT, space));
// Create an attribute for the dataset
Attribute dattr(dataset.createAttribute(DATTRNAME, PredType::NATIVE_INT, space));
@@ -588,7 +595,7 @@ static void test_file_attribute()
verify_val(num_objs, 0, "H5File::getObjCount(H5F_OBJ_DATATYPE)", __LINE__, __FILE__);
num_objs = file5.getObjCount(H5F_OBJ_FILE);
verify_val(num_objs, 1, "H5File::getObjCount(H5F_OBJ_FILE)", __LINE__, __FILE__);
-
+
// Get the file name using the attributes
H5std_string fname = fattr1.getFileName();
verify_val(fname, FILE5, "H5File::getFileName()", __LINE__, __FILE__);
@@ -630,29 +637,27 @@ static void test_file_attribute()
if (rdata[i] != dattr_data[i]) {
H5_FAILED();
cerr << endl;
- cerr << "element [" << i << "] is " << rdata[i] <<
- "but should have been " << dattr_data[i] << endl;
- }
+ cerr << "element [" << i << "] is " << rdata[i] << "but should have been " << dattr_data[i]
+ << endl;
}
+ }
PASSED();
- } // end of try block
+ } // end of try block
// Catch creating existing attribute
- catch (AttributeIException& E)
- {} // do nothing, exception expected
+ catch (AttributeIException &E) {
+ } // do nothing, exception expected
// Catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_file_attribute()
+} // test_file_attribute()
-
-const H5std_string FILE6("tfile5.h5");
-const H5std_string ROOTGROUP("/");
-const H5std_string GROUP1("/G1");
-const H5std_string SUBGROUP3("/G1/G3");
+const H5std_string FILE6("tfile5.h5");
+const H5std_string ROOTGROUP("/");
+const H5std_string GROUP1("/G1");
+const H5std_string SUBGROUP3("/G1/G3");
/*-------------------------------------------------------------------------
* Function: test_libver_bounds_real
@@ -668,71 +673,70 @@ const H5std_string SUBGROUP3("/G1/G3");
*
*-------------------------------------------------------------------------
*/
-static void test_libver_bounds_real(
- H5F_libver_t libver_create, unsigned oh_vers_create,
- H5F_libver_t libver_mod, unsigned oh_vers_mod)
+static void
+test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, H5F_libver_t libver_mod,
+ unsigned oh_vers_mod)
{
try {
- /*
- * Create a new file using the default creation property and access property
- * with latest library version.
- */
- FileAccPropList fapl;
- fapl.setLibverBounds(libver_create, H5F_LIBVER_LATEST);
- H5File file(FILE6, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
+ /*
+ * Create a new file using the default creation property and access property
+ * with latest library version.
+ */
+ FileAccPropList fapl;
+ fapl.setLibverBounds(libver_create, H5F_LIBVER_LATEST);
+ H5File file(FILE6, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
- /*
- * Make sure the root group has the correct object header version
- */
- unsigned obj_version = file.childObjVersion(ROOTGROUP);
- verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
+ /*
+ * Make sure the root group has the correct object header version
+ */
+ unsigned obj_version = file.childObjVersion(ROOTGROUP);
+ verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
- /*
- * Reopen the file and make sure the root group still has the correct version
- */
- file.close();
+ /*
+ * Reopen the file and make sure the root group still has the correct version
+ */
+ file.close();
- fapl.setLibverBounds(libver_mod, H5F_LIBVER_LATEST);
+ fapl.setLibverBounds(libver_mod, H5F_LIBVER_LATEST);
- file.openFile(FILE6, H5F_ACC_RDWR, fapl);
+ file.openFile(FILE6, H5F_ACC_RDWR, fapl);
- obj_version = file.childObjVersion(ROOTGROUP);
- verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
+ obj_version = file.childObjVersion(ROOTGROUP);
+ verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
- /*
- * Create a group named "/G1" in the file, and make sure it has the correct
- * object header version
- */
- Group group = file.createGroup(GROUP1);
+ /*
+ * Create a group named "/G1" in the file, and make sure it has the correct
+ * object header version
+ */
+ Group group = file.createGroup(GROUP1);
- obj_version = group.objVersion();
- verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
+ obj_version = group.objVersion();
+ verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
- group.close(); // close "/G1"
+ group.close(); // close "/G1"
- /*
- * Create a group named "/G1/G3" in the file, and make sure it has the
- * correct object header version
- */
- group = file.createGroup(SUBGROUP3);
+ /*
+ * Create a group named "/G1/G3" in the file, and make sure it has the
+ * correct object header version
+ */
+ group = file.createGroup(SUBGROUP3);
- obj_version = group.objVersion();
- verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
+ obj_version = group.objVersion();
+ verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
- group.close(); // close "/G1/G3"
+ group.close(); // close "/G1/G3"
- /*
- * Make sure the root group still has the correct object header version
- */
- obj_version = file.childObjVersion(ROOTGROUP);
- verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
+ /*
+ * Make sure the root group still has the correct object header version
+ */
+ obj_version = file.childObjVersion(ROOTGROUP);
+ verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__);
- // Everything should be closed as they go out of scope
- } // end of try block
+ // Everything should be closed as they go out of scope
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_libver_bounds_real()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -752,7 +756,8 @@ static void test_libver_bounds_real(
*
*-------------------------------------------------------------------------
*/
-static void test_libver_bounds()
+static void
+test_libver_bounds()
{
// Output message about test being performed
SUBTEST("Setting library version bounds");
@@ -763,7 +768,6 @@ static void test_libver_bounds()
PASSED();
} /* end test_libver_bounds() */
-
/*-------------------------------------------------------------------------
* Function: test_commonfg
*
@@ -776,7 +780,8 @@ static void test_libver_bounds()
*
*-------------------------------------------------------------------------
*/
-static void test_commonfg()
+static void
+test_commonfg()
{
// Output message about test being performed
SUBTEST("Root group");
@@ -792,11 +797,11 @@ static void test_commonfg()
Group group(rootgroup.createGroup(GROUPNAME, 0));
// Create the data space.
- hsize_t dims[RANK] = {NX, NY};
+ hsize_t dims[RANK] = {NX, NY};
DataSpace space(RANK, dims);
// Create a new dataset.
- DataSet dataset(group.createDataSet (DSETNAME, PredType::NATIVE_INT, space));
+ DataSet dataset(group.createDataSet(DSETNAME, PredType::NATIVE_INT, space));
// Get and verify file name via a dataset.
H5std_string file_name = dataset.getFileName();
@@ -817,17 +822,15 @@ static void test_commonfg()
verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__);
PASSED();
- } // end of try block
+ } // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_commonfg()", __LINE__, __FILE__, E.getCDetailMsg());
}
} /* end test_commonfg() */
-
-const H5std_string FILE7("tfile7.h5");
+const H5std_string FILE7("tfile7.h5");
/*-------------------------------------------------------------------------
* Function: test_file_info
@@ -844,15 +847,13 @@ const H5std_string FILE7("tfile7.h5");
*-------------------------------------------------------------------------
*/
const hsize_t FSP_SIZE_DEF = 4096;
-const hsize_t FSP_SIZE512 = 512;
-static void test_file_info()
+const hsize_t FSP_SIZE512 = 512;
+static void
+test_file_info()
{
// Output message about test being performed
SUBTEST("File general information");
- hsize_t out_threshold = 0; // Free space section threshold to get
- hbool_t out_persist = FALSE;// Persist free-space read
-
try {
// Create a file using default properties.
H5File tempfile(FILE7, H5F_ACC_TRUNC);
@@ -883,7 +884,7 @@ static void test_file_info()
fcpl.close();
// Get the file's version information.
- file7.getFileInfo(finfo); // there's no C test for H5Fget_info
+ file7.getFileInfo(finfo); // there's no C test for H5Fget_info
// Close the file.
file7.close();
@@ -895,7 +896,7 @@ static void test_file_info()
FileCreatPropList fcpl2 = file7.getCreatePlist();
// Get the file's version information.
- file7.getFileInfo(finfo); // there's no C test for H5Fget_info
+ file7.getFileInfo(finfo); // there's no C test for H5Fget_info
// Retrieve the property values & check them.
hsize_t userblock = fcpl2.getUserblock();
@@ -915,14 +916,12 @@ static void test_file_info()
verify_val(istore_ik, F2_ISTORE, "FileCreatPropList::getIstorek", __LINE__, __FILE__);
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_filespace_info()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} /* test_file_info() */
+} /* test_file_info() */
-
/*-------------------------------------------------------------------------
* Function: test_file
*
@@ -935,23 +934,22 @@ static void test_file_info()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_file()
+extern "C" void
+test_file()
{
// Output message about test being performed
MESSAGE(5, ("Testing File I/O Operations\n"));
- test_file_create(); // Test file creation (also creation templates)
- test_file_open(); // Test file opening
- test_file_size(); // Test file size
- test_file_name(); // Test getting file's name
- test_file_attribute(); // Test file attribute feature
- test_libver_bounds(); // Test format version
- test_commonfg(); // Test H5File as a root group
- test_file_info(); // Test various file info
-} // test_file()
-
-
+ test_file_create(); // Test file creation (also creation templates)
+ test_file_open(); // Test file opening
+ test_file_size(); // Test file size
+ test_file_name(); // Test getting file's name
+ test_file_attribute(); // Test file attribute feature
+ test_libver_bounds(); // Test format version
+ test_commonfg(); // Test H5File as a root group
+ test_file_info(); // Test various file info
+} // test_file()
+
/*-------------------------------------------------------------------------
* Function: cleanup_file
*
@@ -966,7 +964,8 @@ void test_file()
#ifdef __cplusplus
extern "C"
#endif
-void cleanup_file()
+ void
+ cleanup_file()
{
HDremove(FILE1.c_str());
HDremove(FILE2.c_str());
@@ -975,4 +974,4 @@ void cleanup_file()
HDremove(FILE5.c_str());
HDremove(FILE6.c_str());
HDremove(FILE7.c_str());
-} // cleanup_file
+} // cleanup_file
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 2e3c07c..52ebfec 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,14 +25,15 @@
#include <string>
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
#define DSET_DIM1 100
#define DSET_DIM2 200
@@ -59,13 +60,13 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
static size_t filter_bogus(size_t nbytes);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_BOGUS[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_BOGUS, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "bogus", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)filter_bogus, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_BOGUS, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "bogus", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)filter_bogus, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
@@ -112,25 +113,26 @@ filter_bogus(size_t nbytes)
// Chunk dimensions
const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2};
-static void test_null_filter()
+static void
+test_null_filter()
{
// Output message about test being performed
SUBTEST("'Null' filter");
try {
- //hsize_t null_size; // Size of dataset with null filter
+ // hsize_t null_size; // Size of dataset with null filter
// Prepare dataset create property list
DSetCreatPropList dsplist;
dsplist.setChunk(2, chunk_size);
- if (H5Zregister (H5Z_BOGUS)<0)
+ if (H5Zregister(H5Z_BOGUS) < 0)
throw Exception("test_null_filter", "H5Zregister failed");
// Set some pretent filter
dsplist.setFilter(H5Z_FILTER_BOGUS);
// this function is just a stub right now; will work on it later - BMR
- //if(test_filter_internal(file,DSET_BOGUS_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&null_size)<0)
+ // if(test_filter_internal(file,DSET_BOGUS_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&null_size)<0)
// throw Exception("test_null_filter", "test_filter_internal failed");
// Close objects.
@@ -139,11 +141,10 @@ static void test_null_filter()
} // end of try
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_null_filter()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_null_filter
+} // test_null_filter
/*-------------------------------------------------------------------------
* Function: test_szip_filter
@@ -161,30 +162,31 @@ static void test_null_filter()
*-------------------------------------------------------------------------
*/
-const H5std_string DSET_SZIP_NAME("szipped dataset");
+const H5std_string DSET_SZIP_NAME("szipped dataset");
-static void test_szip_filter(H5File& file1)
+static void
+test_szip_filter(H5File &file1)
{
#ifdef H5_HAVE_FILTER_SZIP
int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
- unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK;
- unsigned szip_pixels_per_block=4;
+ unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
+ unsigned szip_pixels_per_block = 4;
// Output message about test being performed
SUBTEST("szip filter (with encoder)");
- if ( h5_szip_can_encode() == 1) {
- char* tconv_buf = new char [1000];
+ if (h5_szip_can_encode() == 1) {
+ char *tconv_buf = new char[1000];
try {
- const hsize_t size[2] = {DSET_DIM1, DSET_DIM2};
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2};
// Create the data space
DataSpace space1(2, size, NULL);
// Create a small conversion buffer to test strip mining (?)
DSetMemXferPropList xfer;
- xfer.setBuffer (1000, tconv_buf, NULL);
+ xfer.setBuffer(1000, tconv_buf, NULL);
// Prepare dataset create property list
DSetCreatPropList dsplist;
@@ -194,27 +196,24 @@ static void test_szip_filter(H5File& file1)
dsplist.setSzip(szip_options_mask, szip_pixels_per_block);
// Create a dataset with szip compression
- DataSpace space2 (2, size, NULL);
- DataSet dataset(file1.createDataSet (DSET_SZIP_NAME, PredType::NATIVE_INT, space2, dsplist));
+ DataSpace space2(2, size, NULL);
+ DataSet dataset(file1.createDataSet(DSET_SZIP_NAME, PredType::NATIVE_INT, space2, dsplist));
hsize_t i, j, n;
- for (i=n=0; i<size[0]; i++)
- {
- for (j=0; j<size[1]; j++)
- {
+ for (i = n = 0; i < size[0]; i++) {
+ for (j = 0; j < size[1]; j++) {
points[i][j] = (int)n++;
}
}
// Write to the dataset then read back the values
- dataset.write ((void*)points, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
- dataset.read ((void*)check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset.write((void *)points, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
+ dataset.read((void *)check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
// Check that the values read are the same as the values written
for (i = 0; i < size[0]; i++)
- for (j = 0; j < size[1]; j++)
- {
- int status = check_values (i, j, points[i][j], check[i][j]);
+ for (j = 0; j < size[1]; j++) {
+ int status = check_values(i, j, points[i][j], check[i][j]);
if (status == -1)
throw Exception("test_szip_filter", "Failed in testing szip method");
}
@@ -223,8 +222,7 @@ static void test_szip_filter(H5File& file1)
} // end of try
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -234,32 +232,30 @@ static void test_szip_filter(H5File& file1)
SKIPPED();
}
-#else /* H5_HAVE_FILTER_SZIP */
+#else /* H5_HAVE_FILTER_SZIP */
SUBTEST("szip filter");
SKIPPED();
H5std_string fname = file1.getFileName();
cerr << " Szip filter not enabled for file '" << fname << "'" << endl;
#endif /* H5_HAVE_FILTER_SZIP */
-} // test_szip_filter
+} // test_szip_filter
-
/****************************************************************
**
** test_filters(): Main routine for testing filters.
**
****************************************************************/
-const H5std_string FILE1("tfilters.h5");
-extern "C"
-void test_filters()
+const H5std_string FILE1("tfilters.h5");
+extern "C" void
+test_filters()
{
// Output message about test being performed
MESSAGE(5, ("Testing Various Filters\n"));
- hid_t fapl_id;
+ hid_t fapl_id;
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
- try
- {
+ try {
// Use the file access template id to create a file access prop. list
FileAccPropList fapl(fapl_id);
@@ -269,11 +265,10 @@ void test_filters()
test_null_filter();
test_szip_filter(file1);
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_filters()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_filters()
+} // test_filters()
/*-------------------------------------------------------------------------
* Function: cleanup_filters
@@ -287,8 +282,8 @@ void test_filters()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_filters()
+extern "C" void
+cleanup_filters()
{
HDremove(FILE1.c_str());
}
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 18cd460..fc8320c 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,42 +28,43 @@
#include <string>
#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#endif // H5_NO_STD
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
-#include "H5srcdir.h" // srcdir querying header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
+#include "H5srcdir.h" // srcdir querying header file
-const H5std_string TESTFILE("th5s.h5");
-const H5std_string DATAFILE("th5s1.h5");
+const H5std_string TESTFILE("th5s.h5");
+const H5std_string DATAFILE("th5s1.h5");
/* 3-D dataset with fixed dimensions */
const H5std_string SPACE1_NAME("Space1");
-const int SPACE1_RANK = 3;
-const int SPACE1_DIM1 = 3;
-const int SPACE1_DIM2 = 15;
-const int SPACE1_DIM3 = 13;
+const int SPACE1_RANK = 3;
+const int SPACE1_DIM1 = 3;
+const int SPACE1_DIM2 = 15;
+const int SPACE1_DIM3 = 13;
/* 4-D dataset with one unlimited dimension */
const H5std_string SPACE2_NAME("Space2");
-const int SPACE2_RANK = 4;
-const int SPACE2_DIM1 = 0;
-const int SPACE2_DIM2 = 15;
-const int SPACE2_DIM3 = 13;
-const int SPACE2_DIM4 = 23;
-const hsize_t SPACE2_MAX1 = H5S_UNLIMITED;
-const hsize_t SPACE2_MAX2 = 15;
-const hsize_t SPACE2_MAX3 = 13;
-const hsize_t SPACE2_MAX4 = 23;
+const int SPACE2_RANK = 4;
+const int SPACE2_DIM1 = 0;
+const int SPACE2_DIM2 = 15;
+const int SPACE2_DIM3 = 13;
+const int SPACE2_DIM4 = 23;
+const hsize_t SPACE2_MAX1 = H5S_UNLIMITED;
+const hsize_t SPACE2_MAX2 = 15;
+const hsize_t SPACE2_MAX3 = 13;
+const hsize_t SPACE2_MAX4 = 23;
/* Scalar dataset with simple datatype */
const H5std_string SPACE3_NAME("Scalar1");
-const int SPACE3_RANK = 0;
-unsigned space3_data=65;
+const int SPACE3_RANK = 0;
+unsigned space3_data = 65;
/* Scalar dataset with compound datatype */
const H5std_string SPACE4_NAME("Scalar2");
@@ -71,16 +72,16 @@ const H5std_string SPACE4_FIELDNAME1("c1");
const H5std_string SPACE4_FIELDNAME2("u");
const H5std_string SPACE4_FIELDNAME3("f");
const H5std_string SPACE4_FIELDNAME4("c2");
-size_t space4_field1_off=0;
-size_t space4_field2_off=0;
-size_t space4_field3_off=0;
-size_t space4_field4_off=0;
+size_t space4_field1_off = 0;
+size_t space4_field2_off = 0;
+size_t space4_field3_off = 0;
+size_t space4_field4_off = 0;
struct space4_struct {
- char c1;
+ char c1;
unsigned u;
- float f;
- char c2;
- } space4_data={'v',987123,(float)-3.14,'g'}; /* Test data for 4th dataspace */
+ float f;
+ char c2;
+} space4_data = {'v', 987123, (float)-3.14, 'g'}; /* Test data for 4th dataspace */
/* Null dataspace */
int space5_data = 7;
@@ -108,48 +109,48 @@ int space5_data = 7;
* size to be zero. So I took out the test against it.
*-------------------------------------------------------------------------
*/
-static void test_h5s_basic()
+static void
+test_h5s_basic()
{
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
- SPACE2_DIM4};
- hsize_t dims3[H5S_MAX_RANK+1];
- hsize_t tmax[4];
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, SPACE2_DIM4};
+ hsize_t dims3[H5S_MAX_RANK + 1];
+ hsize_t tmax[4];
// Output message about test being performed
SUBTEST("Dataspace Manipulation");
try {
// Create simple dataspace sid1
- DataSpace sid1 (SPACE1_RANK, dims1 );
+ DataSpace sid1(SPACE1_RANK, dims1);
// Get simple extent npoints of the dataspace sid1 and verify it
- hssize_t n; // Number of dataspace elements
+ hssize_t n; // Number of dataspace elements
n = sid1.getSimpleExtentNpoints();
verify_val((long)n, (long)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3),
- "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of dataspace sid1 and verify it
- int rank; // Logical rank of dataspace
+ int rank; // Logical rank of dataspace
rank = sid1.getSimpleExtentNdims();
verify_val(rank, SPACE1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Retrieves dimension size of dataspace sid1 and verify it
- int ndims; // Number of dimensions
- hsize_t tdims[4]; // Dimension array to test with
- ndims = sid1.getSimpleExtentDims( tdims );
+ int ndims; // Number of dimensions
+ hsize_t tdims[4]; // Dimension array to test with
+ ndims = sid1.getSimpleExtentDims(tdims);
verify_val(ndims, SPACE1_RANK, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
verify_val(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Create simple dataspace sid2
- hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
- DataSpace sid2 (SPACE2_RANK, dims2, max2);
+ hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
+ DataSpace sid2(SPACE2_RANK, dims2, max2);
// Get simple extent npoints of dataspace sid2 and verify it
n = sid2.getSimpleExtentNpoints();
verify_val((long)n, (long)(SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4),
- "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of dataspace sid2 and verify it
rank = sid2.getSimpleExtentNdims();
@@ -157,34 +158,36 @@ static void test_h5s_basic()
// Retrieves dimension size and max size of dataspace sid2 and
// verify them
- ndims = sid2.getSimpleExtentDims( tdims, tmax );
+ ndims = sid2.getSimpleExtentDims(tdims, tmax);
verify_val(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
- verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0, "DataSpace::getSimpleExtentDims",
+ __LINE__, __FILE__);
// Check to be sure we can't create a simple data space that has too
// many dimensions.
try {
- DataSpace manydims_ds(H5S_MAX_RANK+1, dims3, NULL);
+ DataSpace manydims_ds(H5S_MAX_RANK + 1, dims3, NULL);
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("DataSpace constructor", "Library allowed overwrite of existing dataset");
+ throw InvalidActionException("DataSpace constructor",
+ "Library allowed overwrite of existing dataset");
}
- catch (DataSpaceIException& E) // Simple data space with too many dims
- {} // do nothing, exception expected
-
- /*
- * Try reading a file that has been prepared that has a dataset with a
- * higher dimensionality than what the library can handle.
- *
- * If this test fails and the H5S_MAX_RANK variable has changed, follow
- * the instructions in space_overflow.c for regenating the th5s.h5 file.
- */
- char *tmp_str = new char[TESTFILE.length()+1];
+ catch (DataSpaceIException &E) // Simple data space with too many dims
+ {
+ } // do nothing, exception expected
+
+ /*
+ * Try reading a file that has been prepared that has a dataset with a
+ * higher dimensionality than what the library can handle.
+ *
+ * If this test fails and the H5S_MAX_RANK variable has changed, follow
+ * the instructions in space_overflow.c for regenating the th5s.h5 file.
+ */
+ char *tmp_str = new char[TESTFILE.length() + 1];
strcpy(tmp_str, TESTFILE.c_str());
const char *testfile = H5_get_srcdir_filename(tmp_str);
- delete []tmp_str;
+ delete[] tmp_str;
// Create file
H5File fid1(testfile, H5F_ACC_RDONLY);
@@ -192,31 +195,32 @@ static void test_h5s_basic()
// Try to open the dataset that has higher dimensionality than
// what the library can handle and this operation should fail.
try {
- DataSet dset1 = fid1.openDataSet( "dset" );
+ DataSet dset1 = fid1.openDataSet("dset");
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("H5File::openDataSet", "Opening a dataset with higher dimensionality than what the library can handle");
+ throw InvalidActionException(
+ "H5File::openDataSet",
+ "Opening a dataset with higher dimensionality than what the library can handle");
}
- catch (FileIException& E) // catching higher dimensionality dataset
- {} // do nothing, exception expected
+ catch (FileIException &E) // catching higher dimensionality dataset
+ {
+ } // do nothing, exception expected
- // CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure
- // in the p_close see how this will handle it. - BMR
+ // CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure
+ // in the p_close see how this will handle it. - BMR
PASSED();
- } // end of try block
+ } // end of try block
- catch (InvalidActionException& E)
- {
+ catch (InvalidActionException &E) {
cerr << " FAILED" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
}
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_h5s_basic()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_basic()
+} // test_h5s_basic()
/*-------------------------------------------------------------------------
*
@@ -238,7 +242,8 @@ static void test_h5s_basic()
* with a special routine.
*-------------------------------------------------------------------------
*/
-static void test_h5s_scalar_write()
+static void
+test_h5s_scalar_write()
{
// Output message about test being performed
SUBTEST("Scalar Dataspace Writing");
@@ -250,37 +255,36 @@ static void test_h5s_scalar_write()
// Create scalar dataspace
DataSpace sid1(SPACE3_RANK, NULL);
- //n = H5Sget_simple_extent_npoints(sid1);
- hssize_t n; // Number of dataspace elements
+ // n = H5Sget_simple_extent_npoints(sid1);
+ hssize_t n; // Number of dataspace elements
n = sid1.getSimpleExtentNpoints();
verify_val((long)n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
- int rank; // Logical rank of dataspace
+ int rank; // Logical rank of dataspace
rank = sid1.getSimpleExtentNdims();
verify_val(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Retrieves dimension size of dataspace sid1 and verify it
- int ndims; // Number of dimensions
- hsize_t tdims[4]; // Dimension array to test with
- ndims = sid1.getSimpleExtentDims( tdims );
+ int ndims; // Number of dimensions
+ hsize_t tdims[4]; // Dimension array to test with
+ ndims = sid1.getSimpleExtentDims(tdims);
verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Verify extent type
- H5S_class_t ext_type; // Extent type
+ H5S_class_t ext_type; // Extent type
ext_type = sid1.getSimpleExtentType();
verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__);
// Create and write a dataset
- DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
+ DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT, sid1);
dataset.write(&space3_data, PredType::NATIVE_UINT);
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_h5s_scalar_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_scalar_write()
+} // test_h5s_scalar_write()
/*-------------------------------------------------------------------------
*
@@ -302,9 +306,10 @@ static void test_h5s_scalar_write()
* with a special routine.
*-------------------------------------------------------------------------
*/
-static void test_h5s_scalar_read()
+static void
+test_h5s_scalar_read()
{
- hsize_t tdims[4]; // Dimension array to test with
+ hsize_t tdims[4]; // Dimension array to test with
// Output message about test being performed
SUBTEST("Scalar Dataspace Reading");
@@ -330,19 +335,18 @@ static void test_h5s_scalar_read()
verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Read data back and verify it
- unsigned rdata; // Scalar data read in
+ unsigned rdata; // Scalar data read in
dataset.read(&rdata, PredType::NATIVE_UINT);
verify_val(rdata, space3_data, "DataSet::read", __LINE__, __FILE__);
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
// all the exceptions caused by negative returned values by C APIs
issue_fail_msg("test_h5s_scalar_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_scalar_read()
+} // test_h5s_scalar_read()
/*-------------------------------------------------------------------------
*
@@ -364,7 +368,8 @@ static void test_h5s_scalar_read()
* with a special routine.
*-------------------------------------------------------------------------
*/
-static void test_h5s_null()
+static void
+test_h5s_null()
{
// Output message about test being performed
SUBTEST("Null Dataspace Writing");
@@ -376,12 +381,12 @@ static void test_h5s_null()
// Create scalar dataspace
DataSpace sid1(H5S_NULL);
- hssize_t n; // Number of dataspace elements
+ hssize_t n; // Number of dataspace elements
n = sid1.getSimpleExtentNpoints();
verify_val((long)n, 0, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Create a dataset
- DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
+ DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT, sid1);
// Try to write nothing to the dataset
dataset.write(&space5_data, PredType::NATIVE_INT);
@@ -392,11 +397,10 @@ static void test_h5s_null()
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_h5s_null()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_null()
+} // test_h5s_null()
/*-------------------------------------------------------------------------
*
@@ -419,7 +423,8 @@ static void test_h5s_null()
* with a special routine.
*-------------------------------------------------------------------------
*/
-static void test_h5s_compound_scalar_write()
+static void
+test_h5s_compound_scalar_write()
{
// Output message about test being performed
SUBTEST("Compound Dataspace Writing");
@@ -430,18 +435,14 @@ static void test_h5s_compound_scalar_write()
// Create the compound datatype.
CompType tid1(sizeof(struct space4_struct));
- space4_field1_off=HOFFSET(struct space4_struct, c1);
- tid1.insertMember(SPACE4_FIELDNAME1, space4_field1_off,
- PredType::NATIVE_SCHAR);
- space4_field2_off=HOFFSET(struct space4_struct, u);
- tid1.insertMember(SPACE4_FIELDNAME2, space4_field2_off,
- PredType::NATIVE_UINT);
- space4_field3_off=HOFFSET(struct space4_struct, f);
- tid1.insertMember(SPACE4_FIELDNAME3, space4_field3_off,
- PredType::NATIVE_FLOAT);
- space4_field4_off=HOFFSET(struct space4_struct, c2);
- tid1.insertMember(SPACE4_FIELDNAME4, space4_field4_off,
- PredType::NATIVE_SCHAR);
+ space4_field1_off = HOFFSET(struct space4_struct, c1);
+ tid1.insertMember(SPACE4_FIELDNAME1, space4_field1_off, PredType::NATIVE_SCHAR);
+ space4_field2_off = HOFFSET(struct space4_struct, u);
+ tid1.insertMember(SPACE4_FIELDNAME2, space4_field2_off, PredType::NATIVE_UINT);
+ space4_field3_off = HOFFSET(struct space4_struct, f);
+ tid1.insertMember(SPACE4_FIELDNAME3, space4_field3_off, PredType::NATIVE_FLOAT);
+ space4_field4_off = HOFFSET(struct space4_struct, c2);
+ tid1.insertMember(SPACE4_FIELDNAME4, space4_field4_off, PredType::NATIVE_SCHAR);
// Create scalar dataspace
DataSpace sid1(SPACE3_RANK, NULL);
@@ -454,7 +455,7 @@ static void test_h5s_compound_scalar_write()
int ndims = sid1.getSimpleExtentNdims();
verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
- hsize_t tdims[4]; // Dimension array to test with
+ hsize_t tdims[4]; // Dimension array to test with
ndims = sid1.getSimpleExtentDims(tdims);
verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
@@ -463,13 +464,12 @@ static void test_h5s_compound_scalar_write()
dataset.write(&space4_data, tid1);
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
// all the exceptions caused by negative returned values by C APIs
issue_fail_msg("test_h5s_compound_scalar_write()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_compound_scalar_write()
+} // test_h5s_compound_scalar_write()
/*-------------------------------------------------------------------------
*
@@ -492,9 +492,10 @@ static void test_h5s_compound_scalar_write()
* with a special routine.
*-------------------------------------------------------------------------
*/
-static void test_h5s_compound_scalar_read()
+static void
+test_h5s_compound_scalar_read()
{
- hsize_t tdims[4]; // Dimension array to test with
+ hsize_t tdims[4]; // Dimension array to test with
// Output message about test being performed
SUBTEST("Compound Dataspace Reading");
@@ -521,29 +522,27 @@ static void test_h5s_compound_scalar_read()
// Get the datatype of this dataset.
CompType type(dataset);
- struct space4_struct rdata; // Scalar data read in
+ struct space4_struct rdata; // Scalar data read in
dataset.read(&rdata, type);
// Verify read data
- if(HDmemcmp(&space4_data,&rdata,sizeof(struct space4_struct)))
- {
- cerr << "scalar data different: space4_data.c1="
- << space4_data.c1 << ", read_data4.c1=" << rdata.c1 << endl;
- cerr << "scalar data different: space4_data.u="
- << space4_data.u << ", read_data4.u=" << rdata.u << endl;
- cerr << "scalar data different: space4_data.f="
- << space4_data.f << ", read_data4.f=" << rdata.f << endl;
- TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n",
- space4_data.c1, rdata.c2);
+ if (HDmemcmp(&space4_data, &rdata, sizeof(struct space4_struct))) {
+ cerr << "scalar data different: space4_data.c1=" << space4_data.c1
+ << ", read_data4.c1=" << rdata.c1 << endl;
+ cerr << "scalar data different: space4_data.u=" << space4_data.u << ", read_data4.u=" << rdata.u
+ << endl;
+ cerr << "scalar data different: space4_data.f=" << space4_data.f << ", read_data4.f=" << rdata.f
+ << endl;
+ TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1,
+ rdata.c2);
} // end if
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
// all the exceptions caused by negative returned values by C APIs
issue_fail_msg("test_h5s_compound_scalar_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_h5s_compound_scalar_read()
+} // test_h5s_compound_scalar_read()
/*-------------------------------------------------------------------------
*
@@ -558,21 +557,20 @@ static void test_h5s_compound_scalar_read()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_h5s()
+extern "C" void
+test_h5s()
{
// Output message about test being performed
MESSAGE(5, ("Testing Dataspaces\n"));
- test_h5s_basic(); // Test basic H5S code
- test_h5s_scalar_write(); // Test scalar H5S writing code
- test_h5s_scalar_read(); // Test scalar H5S reading code
- test_h5s_null(); // Test null H5S code
- test_h5s_compound_scalar_write(); // Test compound datatype scalar H5S writing code
- test_h5s_compound_scalar_read(); // Test compound datatype scalar H5S reading code
-} // test_h5s()
+ test_h5s_basic(); // Test basic H5S code
+ test_h5s_scalar_write(); // Test scalar H5S writing code
+ test_h5s_scalar_read(); // Test scalar H5S reading code
+ test_h5s_null(); // Test null H5S code
+ test_h5s_compound_scalar_write(); // Test compound datatype scalar H5S writing code
+ test_h5s_compound_scalar_read(); // Test compound datatype scalar H5S reading code
+} // test_h5s()
-
/*-------------------------------------------------------------------------
* Function: cleanup_h5s
*
@@ -585,9 +583,8 @@ void test_h5s()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_h5s()
+extern "C" void
+cleanup_h5s()
{
HDremove(DATAFILE.c_str());
-} // cleanup_h5s
-
+} // cleanup_h5s
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index ae0d53a..97f1174 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,10 +26,10 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ test utilility header file
+#include "h5cpputil.h" // C++ test utilility header file
// A lot of the definition inherited from C test links.c is left here until
// the H5L API is implemented and tests are completed - BMR 10/19/2009
@@ -46,7 +46,7 @@ using namespace H5;
//#include "H5Lprivate.h" // Links
/* File for external link test. Created with gen_udlinks.c */
-#define LINKED_FILE "be_extlink2.h5"
+#define LINKED_FILE "be_extlink2.h5"
#if 0
const char *FILENAME[] = {
@@ -100,31 +100,31 @@ const char *FILENAME[] = {
#endif // 0
-#define TMPDIR "tmp"
+#define TMPDIR "tmp"
-#define FAMILY_SIZE 1024
-#define CORE_INCREMENT 1024
-#define NUM400 400
+#define FAMILY_SIZE 1024
+#define CORE_INCREMENT 1024
+#define NUM400 400
/* do not do check_all_closed() for "ext*" files and "tmp/ext*" */
-#define EXTSTOP 12
+#define EXTSTOP 12
-#define LINK_BUF_SIZE 1024
-#define NAME_BUF_SIZE 1024
-#define MAX_NAME_LEN ((64*1024)+1024)
+#define LINK_BUF_SIZE 1024
+#define NAME_BUF_SIZE 1024
+#define MAX_NAME_LEN ((64 * 1024) + 1024)
/* Link type IDs */
-#define UD_HARD_TYPE 201
-#define UD_CB_TYPE H5L_TYPE_MAX
-#define UD_PLIST_TYPE 128
-#define UD_CBFAIL_TYPE UD_PLIST_TYPE
-#define UD_ERROR_TYPE 189
-#define UD_BAD_TYPE1 H5L_TYPE_HARD
-#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
-#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
-
-#define DEST_PROP_NAME "destination_group"
-#define REREG_TARGET_NAME "rereg_target"
+#define UD_HARD_TYPE 201
+#define UD_CB_TYPE H5L_TYPE_MAX
+#define UD_PLIST_TYPE 128
+#define UD_CBFAIL_TYPE UD_PLIST_TYPE
+#define UD_ERROR_TYPE 189
+#define UD_BAD_TYPE1 H5L_TYPE_HARD
+#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
+#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
+
+#define DEST_PROP_NAME "destination_group"
+#define REREG_TARGET_NAME "rereg_target"
#define UD_CB_LINK_NAME "ud_callback_link"
#define NEW_UD_CB_LINK_NAME "ud_callback_link2"
@@ -134,31 +134,31 @@ const char *FILENAME[] = {
#define LE_FILENAME "le_extlink1.h5"
#define BE_FILENAME "be_extlink1.h5"
-#define ELINK_CB_FAM_SIZE (hsize_t) 100
+#define ELINK_CB_FAM_SIZE (hsize_t)100
#define H5L_DIM1 100
#define H5L_DIM2 100
/* Creation order macros */
-#define CORDER_GROUP_NAME "corder_group"
-#define CORDER_SOFT_GROUP_NAME "corder_soft_group"
-#define CORDER_NLINKS 18
-#define CORDER_ITER_STOP 3
-#define CORDER_EST_ENTRY_LEN 9
+#define CORDER_GROUP_NAME "corder_group"
+#define CORDER_SOFT_GROUP_NAME "corder_soft_group"
+#define CORDER_NLINKS 18
+#define CORDER_ITER_STOP 3
+#define CORDER_EST_ENTRY_LEN 9
/* Timestamp macros */
-#define TIMESTAMP_GROUP_1 "timestamp1"
-#define TIMESTAMP_GROUP_2 "timestamp2"
+#define TIMESTAMP_GROUP_1 "timestamp1"
+#define TIMESTAMP_GROUP_2 "timestamp2"
/* Link iteration struct */
typedef struct {
- H5_iter_order_t order; /* Direction of iteration */
- unsigned ncalled; /* # of times callback is entered */
- unsigned nskipped; /* # of links skipped */
- int stop; /* # of iterations to stop after */
- int64_t curr; /* Current creation order value */
- size_t max_visit; /* Size of "visited link" flag array */
- hbool_t *visited; /* Pointer to array of "visited link" flags */
+ H5_iter_order_t order; /* Direction of iteration */
+ unsigned ncalled; /* # of times callback is entered */
+ unsigned nskipped; /* # of links skipped */
+ int stop; /* # of iterations to stop after */
+ int64_t curr; /* Current creation order value */
+ size_t max_visit; /* Size of "visited link" flag array */
+ hbool_t * visited; /* Pointer to array of "visited link" flags */
} link_iter_info_t;
#if 0
@@ -312,14 +312,8 @@ typedef struct {
} ovisit_ud_t;
#endif
-static const char *FILENAME[] = {
- "link0",
- "link1.h5",
- "link2.h5",
- NULL
-};
+static const char *FILENAME[] = {"link0", "link1.h5", "link2.h5", NULL};
-
/*-------------------------------------------------------------------------
* Function: test_basic_links
*
@@ -332,17 +326,17 @@ static const char *FILENAME[] = {
*
*-------------------------------------------------------------------------
*/
-static void test_basic_links(hid_t fapl_id, hbool_t new_format)
+static void
+test_basic_links(hid_t fapl_id, hbool_t new_format)
{
hsize_t size[1] = {1};
- char filename[NAME_BUF_SIZE];
+ char filename[NAME_BUF_SIZE];
// Use the file access template id to create a file access prop. list.
FileAccPropList fapl(fapl_id);
- try
- {
- if(new_format)
+ try {
+ if (new_format)
SUBTEST("Link creation (w/new group format)")
else
SUBTEST("Link creation")
@@ -351,7 +345,7 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
H5File file(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
// Create simple dataspace
- DataSpace scalar (1, size, size);
+ DataSpace scalar(1, size, size);
// Create a group then close it by letting the object go out of scope
{
@@ -367,25 +361,19 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
// Because these are not implemented in the C++ API yet, they are
// used so CommonFG::getLinkval can be tested.
- if(H5Lcreate_hard(
- file_id, "dset1", H5L_SAME_LOC, "grp1/hard1",
- H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_hard(file_id, "dset1", H5L_SAME_LOC, "grp1/hard1", H5P_DEFAULT, H5P_DEFAULT) < 0)
throw Exception("test_basic_links", "H5Lcreate_hard failed");
// Create a symbolic link
- if(H5Lcreate_soft(
- "/dset1", file_id, "grp1/soft", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft("/dset1", file_id, "grp1/soft", H5P_DEFAULT, H5P_DEFAULT) < 0)
throw Exception("test_basic_links", "H5Lcreate_soft failed");
// Create a symbolic link to something that doesn't exist
- if(H5Lcreate_soft(
- "foobar", file_id, "grp1/dangle", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft("foobar", file_id, "grp1/dangle", H5P_DEFAULT, H5P_DEFAULT) < 0)
throw Exception("test_basic_links", "H5Lcreate_soft failed");
// Create a recursive symbolic link
- if(H5Lcreate_soft(
- "/grp1/recursive", file_id, "/grp1/recursive",
- H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft("/grp1/recursive", file_id, "/grp1/recursive", H5P_DEFAULT, H5P_DEFAULT) < 0)
throw Exception("test_basic_links", "H5Lcreate_soft failed");
// Verify link values before closing the file
@@ -400,21 +388,19 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
verify_val(reclink_val, "/grp1/recursive", "H5File::getLinkval grp1/recursive", __LINE__, __FILE__);
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_basic_links()", __LINE__, __FILE__, E.getCDetailMsg());
}
// Open the file and check on the links in it
- try
- {
+ try {
// Open the file above
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);
// Verify link existence
- if(file.nameExists("dset1", LinkAccPropList::DEFAULT) != TRUE)
+ if (file.nameExists("dset1", LinkAccPropList::DEFAULT) != TRUE)
throw InvalidActionException("H5File::nameExists", "dset1 doesn't exist");
- if(file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
+ if (file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
throw InvalidActionException("H5File::nameExists", "grp1/soft doesn't exist");
// Verify link values
@@ -426,12 +412,11 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_basic_links()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_basic_links
-
+
/*-------------------------------------------------------------------------
* Function: test_lcpl
*
@@ -449,16 +434,15 @@ static void
test_lcpl(hid_t fapl_id, hbool_t new_format)
{
H5L_info_t linfo;
- char filename[1024];
- hsize_t dims[2];
+ char filename[1024];
+ hsize_t dims[2];
- if(new_format)
+ if (new_format)
SUBTEST("Link creation property lists (w/new group format)")
else
SUBTEST("Link creation property lists")
- try
- {
+ try {
FileAccPropList fapl(fapl_id);
// Create a new file.
@@ -471,7 +455,7 @@ test_lcpl(hid_t fapl_id, hbool_t new_format)
// Check that its character encoding is the default.
linfo = file.getLinkInfo(GROUP1NAME);
- if(linfo.cset != H5T_CSET_ASCII)
+ if (linfo.cset != H5T_CSET_ASCII)
throw InvalidActionException("H5Lget_info", "Character encoding is not default");
// Create and commit a datatype with the default LCPL.
@@ -486,7 +470,7 @@ test_lcpl(hid_t fapl_id, hbool_t new_format)
// Create a simple dataspace.
dims[0] = H5L_DIM1;
dims[1] = H5L_DIM2;
- DataSpace dspace(2 ,dims);
+ DataSpace dspace(2, dims);
// Create a dataset using the default LCPL.
DataSet dset(file.createDataSet("/dataset", PredType::NATIVE_INT, dspace));
@@ -510,12 +494,11 @@ test_lcpl(hid_t fapl_id, hbool_t new_format)
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_lcpl()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_lcpl()
-
+
/*-------------------------------------------------------------------------
* Function: test_move
*
@@ -529,15 +512,14 @@ test_lcpl(hid_t fapl_id, hbool_t new_format)
static void
test_move(hid_t fapl_id, hbool_t new_format)
{
- char filename[1024];
+ char filename[1024];
- if(new_format)
+ if (new_format)
SUBTEST("Group::moveLink (w/new group format)")
else
SUBTEST("Group::moveLink")
- try
- {
+ try {
FileAccPropList fapl(fapl_id);
// Create two new files
@@ -560,15 +542,16 @@ test_move(hid_t fapl_id, hbool_t new_format)
grp_1.moveLink("group_move", file_b, "group_new_name");
// Should throw an exception but didn't
- H5_FAILED();
- cerr << " Group group_move should not be moved across files" << endl;
- } catch (Exception& E) {
+ H5_FAILED();
+ cerr << " Group group_move should not be moved across files" << endl;
+ }
+ catch (Exception &E) {
// expected
}
// Move a soft link across files, should succeed
grp_2.moveLink("soft", file_b, "soft_new_name");
- if(file_b.nameExists("soft_new_name") != TRUE)
+ if (file_b.nameExists("soft_new_name") != TRUE)
throw InvalidActionException("H5File::nameExists", "grp1/soft doesn't exist");
// Move a group across groups in the same file while renaming it
@@ -583,9 +566,10 @@ test_move(hid_t fapl_id, hbool_t new_format)
moved_grp = grp_1.openGroup("group_move");
// Should throw an exception but didn't
- H5_FAILED();
- cerr << " Group group_move should not be in original location" << endl;
- } catch (Exception& E) {
+ H5_FAILED();
+ cerr << " Group group_move should not be in original location" << endl;
+ }
+ catch (Exception &E) {
// expected
}
@@ -617,46 +601,49 @@ test_move(hid_t fapl_id, hbool_t new_format)
moved_grp = grp_1.openGroup("group_newer_name");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_newer_name should not be in GROUP1NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_newer_name should not be in GROUP1NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
try {
moved_grp = grp_2.openGroup("group_newer_name");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_newer_name should not be in GROUP2NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_newer_name should not be in GROUP2NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
try {
moved_grp = grp_2.openGroup("group_new_name");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_new_name should not be in GROUP2NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_new_name should not be in GROUP2NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
try {
moved_grp = grp_1.openGroup("group_copy");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_copy should not be in GROUP1NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_copy should not be in GROUP1NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_move()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_move
-
+
/*-------------------------------------------------------------------------
* Function: test_copy
*
@@ -667,17 +654,17 @@ test_move(hid_t fapl_id, hbool_t new_format)
* May 2018
*-------------------------------------------------------------------------
*/
-static void test_copy(hid_t fapl_id, hbool_t new_format)
+static void
+test_copy(hid_t fapl_id, hbool_t new_format)
{
char filename[1024];
- if(new_format)
+ if (new_format)
SUBTEST("Group::copyLink (w/new group format)")
else
SUBTEST("Group::copyLink")
- try
- {
+ try {
// Create two new files
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
H5File file_a(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_id);
@@ -696,7 +683,8 @@ static void test_copy(hid_t fapl_id, hbool_t new_format)
// Copy a group across files, should fail
try {
grp_1.copyLink("group_copy", file_b, "group_new_name");
- } catch (Exception& E) {
+ }
+ catch (Exception &E) {
// expected
}
@@ -766,9 +754,10 @@ static void test_copy(hid_t fapl_id, hbool_t new_format)
moved_grp = grp_2.openGroup("group_newer_name");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_newer_name should not be in GROUP2NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_newer_name should not be in GROUP2NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
@@ -778,20 +767,20 @@ static void test_copy(hid_t fapl_id, hbool_t new_format)
moved_grp = grp_1.openGroup("group_copy");
moved_grp.close();
- H5_FAILED(); // Should throw an exception but didn't
- cerr << " Group group_copy should not be in GROUP1NAME" << endl;
- } catch (Exception& E) {
+ H5_FAILED(); // Should throw an exception but didn't
+ cerr << " Group group_copy should not be in GROUP1NAME" << endl;
+ }
+ catch (Exception &E) {
// expected
}
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_copy()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_copy
-
+
/*-------------------------------------------------------------------------
* Function: test_num_links
*
@@ -803,17 +792,17 @@ static void test_copy(hid_t fapl_id, hbool_t new_format)
* March, 2017
*-------------------------------------------------------------------------
*/
-static void test_num_links(hid_t fapl_id, hbool_t new_format)
+static void
+test_num_links(hid_t fapl_id, hbool_t new_format)
{
char filename[NAME_BUF_SIZE];
- if(new_format)
+ if (new_format)
SUBTEST("Setting number of links (w/new group format)")
else
SUBTEST("Setting number of links")
- try
- {
+ try {
// Use the file access template id to create a file access prop. list.
FileAccPropList fapl(fapl_id);
@@ -821,7 +810,7 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format)
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);
LinkAccPropList lapl;
- size_t nlinks = 5;
+ size_t nlinks = 5;
lapl.setNumLinks(nlinks);
// Read it back and verify
@@ -830,12 +819,11 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format)
PASSED();
} // end of try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_num_links()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_num_links
-
+
/*-------------------------------------------------------------------------
* Function: test_links
*
@@ -848,38 +836,36 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format)
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_links()
+extern "C" void
+test_links()
{
- hid_t fapl_id, fapl2_id; // File access property lists
- hbool_t new_format; // Whether to use the new format or not
+ hid_t fapl_id, fapl2_id; // File access property lists
+ hbool_t new_format; // Whether to use the new format or not
const char *envval;
envval = HDgetenv("HDF5_DRIVER");
- if(envval == NULL)
+ if (envval == NULL)
envval = "nomatch";
fapl_id = h5_fileaccess();
// Output message about test being performed
MESSAGE(5, ("Testing Various Links\n"));
- try
- {
+ try {
/* Copy the file access property list */
- if((fapl2_id = H5Pcopy(fapl_id)) < 0)
+ if ((fapl2_id = H5Pcopy(fapl_id)) < 0)
throw Exception("test_links", "H5Pcopy failed");
/* Set the "use the latest version of the format" bounds for creating objects in the file */
- if(H5Pset_libver_bounds(fapl2_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- throw Exception("test_links", "H5Pset_libver_bounds failed");
+ if (H5Pset_libver_bounds(fapl2_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ throw Exception("test_links", "H5Pset_libver_bounds failed");
/* Loop over using new group format */
- for(new_format = FALSE; new_format <= TRUE; new_format++)
- {
+ for (new_format = FALSE; new_format <= TRUE; new_format++) {
hid_t my_fapl_id;
/* Check for FAPL to use */
- if(new_format)
+ if (new_format)
my_fapl_id = fapl2_id;
else
my_fapl_id = fapl_id;
@@ -975,7 +961,7 @@ void test_links()
/* Keep this test last, it's testing files that are used above */
/* do not do this for files used by external link tests */
nerrors += check_all_closed(my_fapl, new_format, EXTSTOP) < 0 ? 1 : 0;
-#endif // 0
+#endif // 0
} /* end for */
#if 0
@@ -1012,16 +998,14 @@ void test_links()
h5_clean_files(FILENAME, fapl_id);
/* Test that external links can be used after a library reset. MUST be
- * called last so the reset doesn't interfere with the property lists. This
- * routine will delete its own file. */
+ * called last so the reset doesn't interfere with the property lists. This
+ * routine will delete its own file. */
/* nerrors += external_reset_register() < 0 ? 1 : 0;
- */
+ */
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_links()", __LINE__, __FILE__, E.getCDetailMsg());
}
-
}
/*-------------------------------------------------------------------------
@@ -1036,9 +1020,8 @@ void test_links()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_links()
+extern "C" void
+cleanup_links()
{
HDremove(FILENAME[0]);
}
-
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
index b5e9ff0..094acd6 100644
--- a/c++/test/tobject.cpp
+++ b/c++/test/tobject.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,26 +26,27 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
-
-const H5std_string FILE_OBJECTS("tobjects.h5");
-const H5std_string FILE_OBJHDR("tobject_header.h5");
-const H5std_string GROUP1("Top Group");
-const H5std_string GROUP1_PATH("/Top Group");
-const H5std_string GROUP1_1("Sub-Group 1.1");
-const H5std_string GROUP1_1_PATH("/Top Group/Sub-Group 1.1");
-const H5std_string GROUP1_2("Sub-Group 1.2");
-const H5std_string GROUP1_2_PATH("/Top Group/Sub-Group 1.2");
-const H5std_string DSET_DEFAULT_NAME("default");
-const H5std_string DSET_IN_FILE("Dataset in File");
-const H5std_string DSET_IN_FILE_PATH("/Dataset in File");
-const H5std_string DSET_IN_GRP1("Dataset in Group 1");
-const H5std_string DSET_IN_GRP1_PATH("/Top Group/Dataset in Group 1");
-const H5std_string DSET_IN_GRP1_2("Dataset in Group 1.2");
-const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset in Group 1.2");
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
+
+const H5std_string FILE_OBJECTS("tobjects.h5");
+const H5std_string FILE_OBJHDR("tobject_header.h5");
+const H5std_string GROUP1("Top Group");
+const H5std_string GROUP1_PATH("/Top Group");
+const H5std_string GROUP1_1("Sub-Group 1.1");
+const H5std_string GROUP1_1_PATH("/Top Group/Sub-Group 1.1");
+const H5std_string GROUP1_2("Sub-Group 1.2");
+const H5std_string GROUP1_2_PATH("/Top Group/Sub-Group 1.2");
+const H5std_string DSET_DEFAULT_NAME("default");
+const H5std_string DSET_IN_FILE("Dataset in File");
+const H5std_string DSET_IN_FILE_PATH("/Dataset in File");
+const H5std_string DSET_IN_GRP1("Dataset in Group 1");
+const H5std_string DSET_IN_GRP1_PATH("/Top Group/Dataset in Group 1");
+const H5std_string DSET_IN_GRP1_2("Dataset in Group 1.2");
+const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset in Group 1.2");
/*-------------------------------------------------------------------------
* Function: test_get_objname
@@ -60,7 +61,8 @@ const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset in
*
*-------------------------------------------------------------------------
*/
-static void test_get_objname()
+static void
+test_get_objname()
{
SUBTEST("H5Object::getObjName on Groups and Datasets");
@@ -69,19 +71,18 @@ static void test_get_objname()
H5File file(FILE_OBJECTS, H5F_ACC_TRUNC);
// Create a top group and 2 subgroups
- Group grp1 = file.createGroup(GROUP1, 0);
+ Group grp1 = file.createGroup(GROUP1, 0);
Group grp1_1 = grp1.createGroup(GROUP1_1, 0);
Group grp1_2 = grp1.createGroup(GROUP1_2, 0);
// Attempted to create a same group to generate a failure, which should
// be caught with sub-class exception clause, if available.
try {
- Group grp1_2 = grp1.createGroup(GROUP1_2, 0);
+ grp1_2 = grp1.createGroup(GROUP1_2, 0);
}
- catch (GroupIException& E)
- {} // do nothing, exception expected
- catch (Exception& E)
- {
+ catch (GroupIException &E) {
+ } // do nothing, exception expected
+ catch (Exception &E) {
cerr << "Exception should have been caught by the previous catch" << endl;
issue_fail_msg("test_get_objname", __LINE__, __FILE__);
}
@@ -93,27 +94,24 @@ static void test_get_objname()
ssize_t name_len = grp1.getObjName(NULL);
// Random length is 4
- if (name_len > 4)
- {
- char* grp1_name = new char[5];
- name_len = grp1.getObjName(grp1_name, 5);
- verify_val((const char*)grp1_name, "/Top", "Group::getObjName", __LINE__, __FILE__);
- delete []grp1_name;
+ if (name_len > 4) {
+ char *grp1_name = new char[5];
+ name_len = grp1.getObjName(grp1_name, 5);
+ verify_val((const char *)grp1_name, "/Top", "Group::getObjName", __LINE__, __FILE__);
+ delete[] grp1_name;
}
// Create a data space
- hsize_t dims[2];
+ hsize_t dims[2];
dims[0] = 2;
dims[1] = 5;
- DataSpace space (2, dims, NULL);
+ DataSpace space(2, dims, NULL);
// Create a dataset in the file
- DataSet dsinfile = file.createDataSet(DSET_IN_FILE,
- PredType::NATIVE_DOUBLE, space);
+ DataSet dsinfile = file.createDataSet(DSET_IN_FILE, PredType::NATIVE_DOUBLE, space);
// Create a dataset in the group
- DataSet dsingrp = grp1.createDataSet(DSET_IN_GRP1,
- PredType::NATIVE_INT, space);
+ DataSet dsingrp = grp1.createDataSet(DSET_IN_GRP1, PredType::NATIVE_INT, space);
// Get and verify the name of each dataset, using
// H5std_string getObjName() and
@@ -140,21 +138,20 @@ static void test_get_objname()
// Reopen that same dataset then check the name again with another
// overload: ssize_t getObjName(H5std_string& obj_name, size_t len = 0)
- dsingrp = grp1_2.openDataSet(DSET_IN_GRP1_2);
+ dsingrp = grp1_2.openDataSet(DSET_IN_GRP1_2);
name_len = dsingrp.getObjName(ds_name);
verify_val(ds_name, DSET_IN_GRP1_2_PATH, "DataSet::getObjName", __LINE__, __FILE__);
// Everything will be closed as they go out of scope
PASSED();
- } // try block
+ } // try block
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_get_objname", __LINE__, __FILE__);
}
-} // test_get_objname
+} // test_get_objname
/*-------------------------------------------------------------------------
* Function: test_get_objname_ontypes
@@ -169,7 +166,8 @@ static void test_get_objname()
*
*-------------------------------------------------------------------------
*/
-static void test_get_objname_ontypes()
+static void
+test_get_objname_ontypes()
{
SUBTEST("H5Object::getObjName on Committed Datatypes");
@@ -178,7 +176,7 @@ static void test_get_objname_ontypes()
H5File file(FILE_OBJECTS, H5F_ACC_RDWR);
// Create a group
- Group grp = file.createGroup ("typetests");
+ Group grp = file.createGroup("typetests");
// Create a datatype and save it
IntType inttype(PredType::STD_B8LE);
@@ -221,7 +219,8 @@ static void test_get_objname_ontypes()
// Name this datatype
new_int_type.commit(grp, "IntType NATIVE_INT");
ssize_t name_len = new_int_type.getObjName(type_name); // default len
- verify_val(name_len, (ssize_t)HDstrlen("/typetests/IntType NATIVE_INT"), "DataType::getObjName", __LINE__, __FILE__);
+ verify_val(name_len, (ssize_t)HDstrlen("/typetests/IntType NATIVE_INT"), "DataType::getObjName",
+ __LINE__, __FILE__);
verify_val(type_name, "/typetests/IntType NATIVE_INT", "DataType::getObjName", __LINE__, __FILE__);
// Close everything or they can be closed when objects go out of scope
@@ -233,11 +232,10 @@ static void test_get_objname_ontypes()
PASSED();
} // end top try block
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_get_objname_ontypes", __LINE__, __FILE__);
}
-} // test_get_objname_ontypes
+} // test_get_objname_ontypes
/*-------------------------------------------------------------------------
* Function: test_get_objtype
@@ -252,7 +250,8 @@ static void test_get_objname_ontypes()
*
*-------------------------------------------------------------------------
*/
-static void test_get_objtype()
+static void
+test_get_objtype()
{
SUBTEST("H5File::childObjType and H5Group::childObjType");
@@ -293,15 +292,14 @@ static void test_get_objtype()
// Everything will be closed as they go out of scope
PASSED();
- } // try block
+ } // try block
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_get_objtype", __LINE__, __FILE__);
}
-} // test_get_objtype
-
+} // test_get_objtype
+
/*-------------------------------------------------------------------------
* Function: test_open_object_header
*
@@ -322,10 +320,10 @@ const H5std_string DSETNAME("dataset");
#define RANK 2
#define DIM0 5
#define DIM1 10
-static void test_open_object_header()
+static void
+test_open_object_header()
{
- hsize_t dims[2];
- H5G_info_t ginfo; /* Group info struct */
+ hsize_t dims[2];
// Output message about test being performed
SUBTEST("H5Location::openObjId and H5Location::closeObjId");
@@ -337,6 +335,7 @@ static void test_open_object_header()
// Create a group in the root group
Group grp(file1.createGroup(GROUPNAME));
+ grp.close();
// Commit the type inside the file
IntType dtype(PredType::NATIVE_INT);
@@ -347,7 +346,7 @@ static void test_open_object_header()
dims[0] = DIM0;
dims[1] = DIM1;
DataSpace dspace(RANK, dims);
- DataSet dset(file1.createDataSet(DSETNAME, PredType::NATIVE_INT, dspace));
+ DataSet dset(file1.createDataSet(DSETNAME, PredType::NATIVE_INT, dspace));
// Create a dataset in the group
DataSet dsingrp(grp.createDataSet(DSET_IN_GRP1, PredType::NATIVE_INT, dspace));
@@ -355,12 +354,11 @@ static void test_open_object_header()
// Close dataset, dataspace, and group
dset.close();
dspace.close();
- grp.close();
// Now make sure that openObjId can open all three types of objects
- hid_t obj_grp = file1.openObjId(GROUPNAME);
+ hid_t obj_grp = file1.openObjId(GROUPNAME);
hid_t obj_dtype = file1.openObjId(DTYPENAME);
- hid_t obj_dset = file1.openObjId(DSETNAME);
+ hid_t obj_dset = file1.openObjId(DSETNAME);
// Make sure that each is the right kind of ID
H5I_type_t id_type = IdComponent::getHDFObjType(obj_grp);
@@ -372,7 +370,7 @@ static void test_open_object_header()
/* Do something more complex with each of the IDs to make sure */
- Group grp2(obj_grp);
+ Group grp2(obj_grp);
hsize_t num_objs = grp2.getNumObjs();
verify_val(num_objs, 2, "H5Gget_info", __LINE__, __FILE__);
@@ -381,8 +379,9 @@ static void test_open_object_header()
// Do a few things using the dset object identifier
dset.setId(obj_dset);
- dspace = dset.getSpace();
+ dspace = dset.getSpace();
bool is_simple = dspace.isSimple();
+ verify_val(is_simple, true, "isSimple", __LINE__, __FILE__);
dspace.close();
// Open datatype object from the group
@@ -412,34 +411,30 @@ static void test_open_object_header()
try {
Group grp3 = dsingrp.openObjId(NOGROUPNAME);
}
- catch (DataSetIException& E)
- {} // do nothing, exception expected and caught correctly
- catch (Exception& E)
- {
+ catch (DataSetIException &E) {
+ } // do nothing, exception expected and caught correctly
+ catch (Exception &E) {
cerr << "Exception should have been caught by the previous catch" << endl;
issue_fail_msg("test_get_objname", __LINE__, __FILE__);
}
PASSED();
- } // end of try block
+ } // end of try block
// catch invalid action exception
- catch (InvalidActionException& E)
- {
+ catch (InvalidActionException &E) {
cerr << " in InvalidActionException" << endl;
cerr << " *FAILED*" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
}
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_file_name()", __LINE__, __FILE__, E.getCDetailMsg());
}
} /* test_open_object_header() */
-
+
/*-------------------------------------------------------------------------
* Function: test_is_valid
*
- * Purpose: Tests validating IDs.
*
* Return: Success: 0
* Failure: -1
@@ -449,7 +444,8 @@ static void test_open_object_header()
*
*-------------------------------------------------------------------------
*/
-static void test_is_valid()
+static void
+test_is_valid()
{
SUBTEST("IdComponent::isValid");
@@ -458,8 +454,8 @@ static void test_is_valid()
IntType int1(PredType::NATIVE_INT);
// Check that the ID is valid
- hid_t int1_id = int1.getId();
- bool is_valid = IdComponent::isValid(int1_id);
+ hid_t int1_id = int1.getId();
+ bool is_valid = IdComponent::isValid(int1_id);
verify_val(is_valid, true, "IdComponent::isValid", __LINE__, __FILE__);
// Create another datatype
@@ -479,14 +475,13 @@ static void test_is_valid()
verify_val(is_valid, false, "IdComponent::isValid", __LINE__, __FILE__);
PASSED();
- } // try block
+ } // try block
// catch all other exceptions
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_get_objtype", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_is_valid
+} // test_is_valid
/*-------------------------------------------------------------------------
* Function: test_objects
@@ -501,19 +496,19 @@ static void test_is_valid()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_object()
+extern "C" void
+test_object()
{
// Output message about test being performed
MESSAGE(5, ("Testing Object Functions\n"));
- test_get_objname(); // Test get object name from groups/datasets
+ test_get_objname(); // Test get object name from groups/datasets
test_get_objname_ontypes(); // Test get object name from types
- test_get_objtype(); // Test get object type
- test_is_valid(); // Test validating IDs
- test_open_object_header(); // Test object header functions (H5O)
+ test_get_objtype(); // Test get object type
+ test_is_valid(); // Test validating IDs
+ test_open_object_header(); // Test object header functions (H5O)
-} // test_objects
+} // test_objects
/*-------------------------------------------------------------------------
* Function: cleanup_objects
@@ -526,8 +521,8 @@ void test_object()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_object()
+extern "C" void
+cleanup_object()
{
HDremove(FILE_OBJECTS.c_str());
} // cleanup_objects
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 9f43054..5d8a1d5 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,25 +25,26 @@
#endif
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
// File names
-const H5std_string FILE1("trefer1.h5");
-const H5std_string FILE2("trefer2.h5");
+const H5std_string FILE1("trefer1.h5");
+const H5std_string FILE2("trefer2.h5");
// Dataset and datatype names
-const H5std_string DSET1_NAME("Dataset1");
-const H5std_string DSET2_NAME("Dataset2");
-const H5std_string DSET3_NAME("Dataset3");
-const H5std_string DTYPE_NAME("Datatype1");
+const H5std_string DSET1_NAME("Dataset1");
+const H5std_string DSET2_NAME("Dataset2");
+const H5std_string DSET3_NAME("Dataset3");
+const H5std_string DTYPE_NAME("Datatype1");
// Compound type member names
-const H5std_string MEMBER1( "a_name" );
-const H5std_string MEMBER2( "b_name" );
-const H5std_string MEMBER3( "c_name" );
+const H5std_string MEMBER1("a_name");
+const H5std_string MEMBER2("b_name");
+const H5std_string MEMBER3("c_name");
// 1-D dataset with fixed dimensions
const int SPACE1_RANK = 1;
@@ -60,7 +61,7 @@ const int POINT1_NPOINTS = 10;
typedef struct s1_t {
unsigned int a;
unsigned int b;
- float c;
+ float c;
} s1_t;
/****************************************************************
@@ -77,23 +78,23 @@ test_reference_params(void)
// Output message about test being performed
SUBTEST("Object Reference Parameters");
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
- hobj_ref_t *wbuf, // buffer to write to disk
- *rbuf, // buffer read from disk
- *tbuf; // temp. buffer read from disk
+ hobj_ref_t *wbuf, // buffer to write to disk
+ *rbuf, // buffer read from disk
+ *tbuf; // temp. buffer read from disk
// Allocate write & read buffers
- int temp_size = MAX(sizeof(unsigned),sizeof(hobj_ref_t));
- wbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
- rbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
- tbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
+ int temp_size = MAX(sizeof(unsigned), sizeof(hobj_ref_t));
+ wbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
+ rbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
+ tbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
// Create file FILE1
- file1 = new H5File (FILE1, H5F_ACC_TRUNC);
+ file1 = new H5File(FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a group
@@ -105,10 +106,10 @@ test_reference_params(void)
// Create a dataset (inside /Group1)
DataSet dataset = group.createDataSet(DSET1_NAME, PredType::NATIVE_UINT, sid1);
- unsigned *tu32; // Temporary pointer to uint32 data
- int i;
- for (tu32=(unsigned *)wbuf, i=0; i<SPACE1_DIM1; i++)
- *tu32++=i*3; // from C test
+ unsigned *tu32; // Temporary pointer to uint32 data
+ int i;
+ for (tu32 = (unsigned *)wbuf, i = 0; i < SPACE1_DIM1; i++)
+ *tu32++ = i * 3; // from C test
// Write selection to disk
dataset.write(wbuf, PredType::NATIVE_UINT);
@@ -143,19 +144,29 @@ test_reference_params(void)
/* Test parameters to H5Location::reference */
try {
file1->reference(NULL, "/Group1/Dataset1");
- } catch (ReferenceException& E) {} // We expect this to fail
+ }
+ catch (ReferenceException &E) {
+ } // We expect this to fail
try {
file1->reference(&wbuf[0], NULL);
- } catch (ReferenceException& E) {} // We expect this to fail
+ }
+ catch (ReferenceException &E) {
+ } // We expect this to fail
try {
file1->reference(&wbuf[0], "");
- } catch (ReferenceException& E) {} // We expect this to fail
+ }
+ catch (ReferenceException &E) {
+ } // We expect this to fail
try {
file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_MAXTYPE);
- } catch (ReferenceException& E) {} // We expect this to fail
+ }
+ catch (ReferenceException &E) {
+ } // We expect this to fail
try {
file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_DATASET_REGION);
- } catch (ReferenceException& E) {} // We expect this to fail
+ }
+ catch (ReferenceException &E) {
+ } // We expect this to fail
// Close resources
dataset.close();
@@ -169,15 +180,13 @@ test_reference_params(void)
PASSED();
} // end try
- catch (Exception& E)
- {
- issue_fail_msg("test_reference_param()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ catch (Exception &E) {
+ issue_fail_msg("test_reference_param()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}
- if(file1)
+ if (file1)
delete file1;
-} /* test_reference_param() */
+} /* test_reference_param() */
/****************************************************************
**
@@ -185,31 +194,32 @@ test_reference_params(void)
** to various kinds of objects
**
****************************************************************/
-static void test_reference_obj(void)
+static void
+test_reference_obj(void)
{
- int i; // counting variables
- const H5std_string write_comment="Foo!"; // Comments for group
+ int i; // counting variables
+ const H5std_string write_comment = "Foo!"; // Comments for group
// Output message about test being performed
SUBTEST("Object Reference Functions");
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
- hobj_ref_t *wbuf, // buffer to write to disk
- *rbuf, // buffer read from disk
- *tbuf; // temp. buffer read from disk
+ hobj_ref_t *wbuf, // buffer to write to disk
+ *rbuf, // buffer read from disk
+ *tbuf; // temp. buffer read from disk
// Allocate write & read buffers
- int temp_size = MAX(sizeof(unsigned),sizeof(hobj_ref_t));
- wbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
- rbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
- tbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
+ int temp_size = MAX(sizeof(unsigned), sizeof(hobj_ref_t));
+ wbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
+ rbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
+ tbuf = (hobj_ref_t *)HDmalloc(temp_size * SPACE1_DIM1);
// Create file FILE1
- file1 = new H5File (FILE1, H5F_ACC_TRUNC);
+ file1 = new H5File(FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a group
@@ -221,9 +231,9 @@ static void test_reference_obj(void)
// Create a dataset (inside /Group1)
DataSet dataset = group.createDataSet(DSET1_NAME, PredType::NATIVE_UINT, sid1);
- unsigned *tu32; // Temporary pointer to uint32 data
+ unsigned *tu32; // Temporary pointer to uint32 data
for (tu32 = (unsigned *)wbuf, i = 0; i < SPACE1_DIM1; i++)
- *tu32++=i*3; // from C test
+ *tu32++ = i * 3; // from C test
// Write selection to disk
dataset.write(wbuf, PredType::NATIVE_UINT);
@@ -258,22 +268,22 @@ static void test_reference_obj(void)
// Create reference to dataset and test getRefObjType
file1->reference(&wbuf[0], "/Group1/Dataset1");
H5O_type_t refobj_type = dataset.getRefObjType(&wbuf[0], H5R_OBJECT);
- verify_val(refobj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(refobj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType", __LINE__, __FILE__);
// Create reference to dataset and test getRefObjType
file1->reference(&wbuf[1], "/Group1/Dataset2");
refobj_type = dataset.getRefObjType(&wbuf[1], H5R_OBJECT);
- verify_val(refobj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(refobj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType", __LINE__, __FILE__);
// Create reference to group
file1->reference(&wbuf[2], "/Group1");
refobj_type = dataset.getRefObjType(&wbuf[2], H5R_OBJECT);
- verify_val(refobj_type, H5O_TYPE_GROUP, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(refobj_type, H5O_TYPE_GROUP, "DataSet::getRefObjType", __LINE__, __FILE__);
// Create reference to named datatype
file1->reference(&wbuf[3], "/Group1/Datatype1");
refobj_type = dataset.getRefObjType(&wbuf[3], H5R_OBJECT);
- verify_val(refobj_type, H5O_TYPE_NAMED_DATATYPE, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(refobj_type, H5O_TYPE_NAMED_DATATYPE, "DataSet::getRefObjType", __LINE__, __FILE__);
// Write selection to disk
dataset.write(wbuf, PredType::STD_REF_OBJ);
@@ -297,15 +307,15 @@ static void test_reference_obj(void)
DataSet dset2(dataset, &rbuf[0], H5R_OBJECT);
// Check information in the referenced dataset
- sid1 = dset2.getSpace();
+ sid1 = dset2.getSpace();
hssize_t n_elements = sid1.getSimpleExtentNpoints();
- verify_val((long)n_elements, 4, "DataSpace::getSimpleExtentNpoints",__LINE__,__FILE__);
+ verify_val((long)n_elements, 4, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Read from disk
dset2.read(tbuf, PredType::NATIVE_UINT);
- for(tu32 = (unsigned *)tbuf, i = 0; i < SPACE1_DIM1; i++, tu32++)
- verify_val(*tu32, (uint32_t)(i*3), "DataSpace::getSimpleExtentNpoints",__LINE__,__FILE__);
+ for (tu32 = (unsigned *)tbuf, i = 0; i < SPACE1_DIM1; i++, tu32++)
+ verify_val(*tu32, (uint32_t)(i * 3), "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Close dereferenced dataset
dset2.close();
@@ -316,18 +326,19 @@ static void test_reference_obj(void)
// Get group's comment using
// H5std_string getComment(const char* name, <buf_size=0 by default>)
H5std_string read_comment1 = group.getComment(".", 10);
- verify_val(read_comment1.c_str(), write_comment, "Group::getComment",__LINE__,__FILE__);
+ verify_val(read_comment1.c_str(), write_comment, "Group::getComment", __LINE__, __FILE__);
// Test with the old default value
read_comment1 = group.getComment(".", 256);
- verify_val(read_comment1.c_str(), write_comment, "Group::getComment",__LINE__,__FILE__);
+ verify_val(read_comment1.c_str(), write_comment, "Group::getComment", __LINE__, __FILE__);
// Test that getComment handles failures gracefully, using
// H5std_string getComment(const char* name, <buf_size=0 by default>)
try {
H5std_string read_comment_tmp = group.getComment(NULL);
}
- catch (Exception& E) {} // We expect this to fail
+ catch (Exception &E) {
+ } // We expect this to fail
// Close group
group.close();
@@ -342,9 +353,9 @@ static void test_reference_obj(void)
H5T_class_t tclass;
tclass = dtype1.getClass();
- verify_val(tclass, H5T_COMPOUND, "DataType::getClass",__LINE__,__FILE__);
+ verify_val(tclass, H5T_COMPOUND, "DataType::getClass", __LINE__, __FILE__);
int n_members = dtype1.getNmembers();
- verify_val(n_members, 3, "CompType::getNmembers",__LINE__,__FILE__);
+ verify_val(n_members, 3, "CompType::getNmembers", __LINE__, __FILE__);
// Close all objects and file
dtype1.close();
@@ -358,16 +369,13 @@ static void test_reference_obj(void)
PASSED();
} // end try
- catch (Exception& E)
- {
- issue_fail_msg("test_reference_obj()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ catch (Exception &E) {
+ issue_fail_msg("test_reference_obj()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}
- if(file1)
+ if (file1)
delete file1;
-} // test_reference_obj()
-
+} // test_reference_obj()
/****************************************************************
**
@@ -376,25 +384,25 @@ static void test_reference_obj(void)
** dereferenced group
**
****************************************************************/
-#define GROUPNAME "/group"
-#define GROUPNAME2 "group2"
-#define GROUPNAME3 "group3"
-#define DSETNAME "/dset"
-#define DSETNAME2 "dset2"
-#define ATTRNAME "some attribute"
-#define NAME_SIZE 16
+#define GROUPNAME "/group"
+#define GROUPNAME2 "group2"
+#define GROUPNAME3 "group3"
+#define DSETNAME "/dset"
+#define DSETNAME2 "dset2"
+#define ATTRNAME "some attribute"
+#define NAME_SIZE 16
static void
test_reference_group(void)
{
- hobj_ref_t wref; /* Reference to write */
- hobj_ref_t rref; /* Reference to read */
- const H5std_string write_comment="Foo!"; // Comments for group
+ hobj_ref_t wref; /* Reference to write */
+ hobj_ref_t rref; /* Reference to read */
+ const H5std_string write_comment = "Foo!"; // Comments for group
// Output message about test being performed
SUBTEST("Object Reference to Group");
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
/*
* Create file with a group and a dataset containing an object
@@ -402,7 +410,7 @@ test_reference_group(void)
*/
// Create file FILE1
- file1 = new H5File (FILE1, H5F_ACC_TRUNC);
+ file1 = new H5File(FILE1, H5F_ACC_TRUNC);
// Create scalar dataspace
DataSpace sid1;
@@ -466,32 +474,32 @@ test_reference_group(void)
// Check number of objects in the group dereferenced by constructor
hsize_t nobjs = refgroup.getNumObjs();
- verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs",__LINE__,__FILE__);
+ verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs", __LINE__, __FILE__);
// Check getting file name given the group dereferenced via constructor
H5std_string fname = refgroup.getFileName();
- verify_val(fname, FILE1, "H5Group::getFileName",__LINE__,__FILE__);
-
+ verify_val(fname, FILE1, "H5Group::getFileName", __LINE__, __FILE__);
+
// Check number of objects in the group dereferenced by constructor
nobjs = attrrefgroup.getNumObjs();
- verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs",__LINE__,__FILE__);
+ verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs", __LINE__, __FILE__);
// Check getting file name given the group dereferenced via constructor
fname = attrrefgroup.getFileName();
- verify_val(fname, FILE1, "H5Group::getFileName",__LINE__,__FILE__);
-
+ verify_val(fname, FILE1, "H5Group::getFileName", __LINE__, __FILE__);
+
// Check number of objects in the group dereferenced by ::reference
nobjs = group.getNumObjs();
- verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs",__LINE__,__FILE__);
+ verify_val(nobjs, (hsize_t)3, "H5Group::getNumObjs", __LINE__, __FILE__);
// Check getting file name given the group dereferenced by ::reference
fname = group.getFileName();
- verify_val(fname, FILE1, "H5Group::getFileName",__LINE__,__FILE__);
+ verify_val(fname, FILE1, "H5Group::getFileName", __LINE__, __FILE__);
// Unlink one of the objects in the dereferenced group, and re-check
refgroup.unlink(GROUPNAME2);
nobjs = refgroup.getNumObjs();
- verify_val(nobjs, (hsize_t)2, "H5Group::getNumObjs",__LINE__,__FILE__);
+ verify_val(nobjs, (hsize_t)2, "H5Group::getNumObjs", __LINE__, __FILE__);
// Close resources
group.close();
@@ -503,15 +511,13 @@ test_reference_group(void)
PASSED();
} // end try
- catch (Exception& E)
- {
- issue_fail_msg("test_reference_group()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ catch (Exception &E) {
+ issue_fail_msg("test_reference_group()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}
- if(file1)
+ if (file1)
delete file1;
-} /* test_reference_group() */
+} /* test_reference_group() */
/****************************************************************
**
@@ -522,28 +528,28 @@ test_reference_group(void)
static void
test_reference_region_1D(void)
{
- hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
- hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
- hsize_t * coords; /* Coordinate buffer */
- hsize_t low[SPACE3_RANK]; /* Selection bounds */
- hsize_t high[SPACE3_RANK]; /* Selection bounds */
- int i; /* counting variables */
+ hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
+ hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hsize_t *coords; /* Coordinate buffer */
+ hsize_t low[SPACE3_RANK]; /* Selection bounds */
+ hsize_t high[SPACE3_RANK]; /* Selection bounds */
+ int i; /* counting variables */
// Output message about test being performed
SUBTEST("1-D Dataset Region Reference Functions");
try {
- hdset_reg_ref_t *wbuf, // buffer to write to disk
- *rbuf; // buffer read from disk
- uint8_t *dwbuf, // Buffer for writing numeric data to disk
- *drbuf; // Buffer for reading numeric data from disk
+ hdset_reg_ref_t *wbuf, // buffer to write to disk
+ *rbuf; // buffer read from disk
+ uint8_t *dwbuf, // Buffer for writing numeric data to disk
+ *drbuf; // Buffer for reading numeric data from disk
// Allocate write & read buffers
- wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
- rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
+ wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1);
dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE3_DIM1);
drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
@@ -551,13 +557,13 @@ test_reference_region_1D(void)
H5File file1(FILE2, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims3[] = {SPACE3_DIM1};
+ hsize_t dims3[] = {SPACE3_DIM1};
DataSpace sid3(SPACE3_RANK, dims3);
// Create a dataset
DataSet dset3 = file1.createDataSet(DSET2_NAME, PredType::STD_U8LE, sid3);
- uint8_t *tu8; // Temporary pointer to uint8 data
+ uint8_t *tu8; // Temporary pointer to uint8 data
for (tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++)
*tu8++ = i * 3; // from C test
@@ -568,7 +574,7 @@ test_reference_region_1D(void)
dset3.close();
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a dataset
@@ -579,24 +585,24 @@ test_reference_region_1D(void)
*/
/* Select 15 2x1 hyperslabs for first reference */
- start[0] = 2;
+ start[0] = 2;
stride[0] = 5;
- count[0] = 15;
- block[0] = 2;
+ count[0] = 15;
+ block[0] = 2;
// Select a hyperslab region to add to the current selected region
sid3.selectHyperslab(H5S_SELECT_SET, count, start, stride, block);
// Get and verify the number of elements in a dataspace selection
hssize_t nelms = sid3.getSelectNpoints();
- verify_val(nelms, 30, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(nelms, 30, "DataSet::getRefObjType", __LINE__, __FILE__);
// Store first dataset region
file1.reference(&wbuf[0], "/Dataset2", sid3);
// Get and verify object type
H5O_type_t obj_type = dset1.getRefObjType(&wbuf[0], H5R_DATASET_REGION);
- verify_val(obj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(obj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType", __LINE__, __FILE__);
/* Select sequence of ten points for second reference */
coord1[0][0] = 16;
@@ -615,7 +621,7 @@ test_reference_region_1D(void)
// Get and verify the number of elements in a dataspace selection
nelms = sid3.getSelectNpoints();
- verify_val(nelms, 10, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(nelms, 10, "DataSet::getRefObjType", __LINE__, __FILE__);
// Store first dataset region
file1.reference(&wbuf[1], "/Dataset2", sid3);
@@ -647,12 +653,12 @@ test_reference_region_1D(void)
// Get and verify object type
obj_type = dset1.getRefObjType(&rbuf[0], H5R_DATASET_REGION);
- verify_val(obj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType",__LINE__,__FILE__);
+ verify_val(obj_type, H5O_TYPE_DATASET, "DataSet::getRefObjType", __LINE__, __FILE__);
// Get dataspace of dset3 the verify number of elements
- sid1 = dset3.getSpace();
+ sid1 = dset3.getSpace();
nelms = sid1.getSimpleExtentNpoints();
- verify_val((long)nelms, 100, "DataSpace::getSimpleExtentNpoints",__LINE__,__FILE__);
+ verify_val((long)nelms, 100, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
} // End of test DataSet::dereference
{ // Test DataSet constructor -by dereference
@@ -661,9 +667,9 @@ test_reference_region_1D(void)
DataSet newds(dset1, &rbuf[0], H5R_DATASET_REGION);
// Get dataspace of newds then verify number of elements
- sid1 = newds.getSpace();
+ sid1 = newds.getSpace();
nelms = sid1.getSimpleExtentNpoints();
- verify_val((long)nelms, 100, "DataSpace::getSimpleExtentNpoints",__LINE__,__FILE__);
+ verify_val((long)nelms, 100, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Close objects for this mini test
newds.close();
@@ -673,8 +679,8 @@ test_reference_region_1D(void)
// Read from disk
dset3.read(drbuf, PredType::STD_U8LE);
- for(tu8 = (uint8_t *)drbuf, i = 0; i < SPACE3_DIM1; i++, tu8++)
- verify_val(*tu8, (uint8_t)(i * 3), "DataSpace::getSimpleExtentNpoints",__LINE__,__FILE__);
+ for (tu8 = (uint8_t *)drbuf, i = 0; i < SPACE3_DIM1; i++, tu8++)
+ verify_val(*tu8, (uint8_t)(i * 3), "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
/*
* Test getting the referenced region
@@ -685,11 +691,11 @@ test_reference_region_1D(void)
// Get and verify number of elements in a dataspace selection
nelms = reg_sp.getSelectNpoints();
- verify_val((long)nelms, 30, "DataSpace::getSelectNpoints",__LINE__,__FILE__);
+ verify_val((long)nelms, 30, "DataSpace::getSelectNpoints", __LINE__, __FILE__);
// Get and verify number of hyperslab blocks
nelms = reg_sp.getSelectHyperNblocks();
- verify_val((long)nelms, 15, "DataSpace::getSelectNpoints",__LINE__,__FILE__);
+ verify_val((long)nelms, 15, "DataSpace::getSelectNpoints", __LINE__, __FILE__);
/* Allocate space for the hyperslab blocks */
coords = (hsize_t *)HDmalloc(nelms * SPACE3_RANK * sizeof(hsize_t) * 2);
@@ -698,43 +704,43 @@ test_reference_region_1D(void)
reg_sp.getSelectHyperBlocklist((hsize_t)0, (hsize_t)nelms, coords);
// Verify values in the list
- verify_val(coords[0], (hsize_t)2, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[1], (hsize_t)3, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[2], (hsize_t)7, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[3], (hsize_t)8, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[4],(hsize_t)12, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[5],(hsize_t)13, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[6],(hsize_t)17, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[7],(hsize_t)18, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[8],(hsize_t)22, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[9],(hsize_t)23, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[10],(hsize_t)27, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[11],(hsize_t)28, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[12],(hsize_t)32, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[13],(hsize_t)33, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[14],(hsize_t)37, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[15],(hsize_t)38, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[16],(hsize_t)42, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[17],(hsize_t)43, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[18],(hsize_t)47, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[19],(hsize_t)48, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[20],(hsize_t)52, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[21],(hsize_t)53, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[22],(hsize_t)57, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[23],(hsize_t)58, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[24],(hsize_t)62, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[25],(hsize_t)63, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[26],(hsize_t)67, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[27],(hsize_t)68, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[28],(hsize_t)72, "Hyperslab Coordinates",__LINE__,__FILE__);
- verify_val(coords[29],(hsize_t)73, "Hyperslab Coordinates",__LINE__,__FILE__);
+ verify_val(coords[0], (hsize_t)2, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[1], (hsize_t)3, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[2], (hsize_t)7, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[3], (hsize_t)8, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[4], (hsize_t)12, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[5], (hsize_t)13, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[6], (hsize_t)17, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[7], (hsize_t)18, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[8], (hsize_t)22, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[9], (hsize_t)23, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[10], (hsize_t)27, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[11], (hsize_t)28, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[12], (hsize_t)32, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[13], (hsize_t)33, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[14], (hsize_t)37, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[15], (hsize_t)38, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[16], (hsize_t)42, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[17], (hsize_t)43, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[18], (hsize_t)47, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[19], (hsize_t)48, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[20], (hsize_t)52, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[21], (hsize_t)53, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[22], (hsize_t)57, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[23], (hsize_t)58, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[24], (hsize_t)62, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[25], (hsize_t)63, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[26], (hsize_t)67, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[27], (hsize_t)68, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[28], (hsize_t)72, "Hyperslab Coordinates", __LINE__, __FILE__);
+ verify_val(coords[29], (hsize_t)73, "Hyperslab Coordinates", __LINE__, __FILE__);
HDfree(coords);
// Check boundaries
reg_sp.getSelectBounds(low, high);
- verify_val(low[0],(hsize_t)2, "DataSpace::getSelectBounds",__LINE__,__FILE__);
- verify_val(high[0],(hsize_t)73, "DataSpace::getSelectBounds",__LINE__,__FILE__);
+ verify_val(low[0], (hsize_t)2, "DataSpace::getSelectBounds", __LINE__, __FILE__);
+ verify_val(high[0], (hsize_t)73, "DataSpace::getSelectBounds", __LINE__, __FILE__);
/* Close region space */
reg_sp.close();
@@ -748,7 +754,7 @@ test_reference_region_1D(void)
// Get and verify number of element points in the current selection
hssize_t nelmspts = elm_sp.getSelectElemNpoints();
- verify_val((long)nelmspts, 10, "DataSpace::getSelectNpoints",__LINE__,__FILE__);
+ verify_val((long)nelmspts, 10, "DataSpace::getSelectNpoints", __LINE__, __FILE__);
/* Allocate space for the hyperslab blocks */
coords = (hsize_t *)HDmalloc(nelmspts * SPACE3_RANK * sizeof(hsize_t));
@@ -757,23 +763,23 @@ test_reference_region_1D(void)
elm_sp.getSelectElemPointlist((hsize_t)0, (hsize_t)nelmspts, coords);
// Verify points
- verify_val(coords[0], coord1[0][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[1], coord1[1][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[2], coord1[2][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[3], coord1[3][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[4], coord1[4][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[5], coord1[5][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[6], coord1[6][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[7], coord1[7][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[8], coord1[8][0], "Element Coordinates",__LINE__,__FILE__);
- verify_val(coords[9], coord1[9][0], "Element Coordinates",__LINE__,__FILE__);
+ verify_val(coords[0], coord1[0][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[1], coord1[1][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[2], coord1[2][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[3], coord1[3][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[4], coord1[4][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[5], coord1[5][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[6], coord1[6][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[7], coord1[7][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[8], coord1[8][0], "Element Coordinates", __LINE__, __FILE__);
+ verify_val(coords[9], coord1[9][0], "Element Coordinates", __LINE__, __FILE__);
HDfree(coords);
// Check boundaries
elm_sp.getSelectBounds(low, high);
- verify_val(low[0],(hsize_t)3, "DataSpace::getSelectBounds",__LINE__,__FILE__);
- verify_val(high[0],(hsize_t)97, "DataSpace::getSelectBounds",__LINE__,__FILE__);
+ verify_val(low[0], (hsize_t)3, "DataSpace::getSelectBounds", __LINE__, __FILE__);
+ verify_val(high[0], (hsize_t)97, "DataSpace::getSelectBounds", __LINE__, __FILE__);
// Close element space
elm_sp.close();
@@ -792,13 +798,10 @@ test_reference_region_1D(void)
PASSED();
} // end try
- catch (Exception& E)
- {
- issue_fail_msg("test_reference_region_1D()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ catch (Exception &E) {
+ issue_fail_msg("test_reference_region_1D()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}
-} /* test_reference_region_1D() */
-
+} /* test_reference_region_1D() */
/****************************************************************
**
@@ -806,22 +809,22 @@ test_reference_region_1D(void)
** Tests references to various kinds of objects using deprecated API.
**
****************************************************************/
-static void test_reference_compat(void)
+static void
+test_reference_compat(void)
{
- // Not yet
-} // test_reference_compat()
-
+ // Not yet
+} // test_reference_compat()
/****************************************************************
**
** test_reference(): Main reference testing routine.
**
****************************************************************/
-extern "C"
-void test_reference(void)
+extern "C" void
+test_reference(void)
{
// Output message about test being performed
- //MESSAGE("Testing References\n");
+ // MESSAGE("Testing References\n");
MESSAGE(5, ("Testing References\n"));
test_reference_params(); // Test basic parameters of reference functionality
@@ -830,18 +833,16 @@ void test_reference(void)
test_reference_region_1D(); // Test 1-D reference functionality
test_reference_compat(); // Tests deprecated reference routines (not yet)
-} // test_reference()
+} // test_reference()
-
/****************************************************************
** Function: cleanup_reference
** Purpose: Cleanup temporary test files
** Return: none
****************************************************************/
-extern "C"
-void cleanup_reference(void)
+extern "C" void
+cleanup_reference(void)
{
HDremove(FILE1.c_str());
HDremove(FILE2.c_str());
}
-
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index a706197..c975158 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,16 +26,17 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
/*
* Offset from alinged memory returned by malloc(). This can be used to test
* that type conversions handle non-aligned buffers correctly.
*/
-#define ALIGNMENT 1
+#define ALIGNMENT 1
/*
* Define if you want to test alignment code on a machine that doesn't
@@ -50,32 +51,32 @@ using namespace H5;
#define H5T_PACKAGE
#include "H5Tpkg.h"
#endif
-#define SET_ALIGNMENT(TYPE,VAL) \
- H5T_NATIVE_##TYPE##_ALIGN_g=MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL)
+#define SET_ALIGNMENT(TYPE, VAL) H5T_NATIVE_##TYPE##_ALIGN_g = MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL)
#endif
-const char *FILENAME[] = {
- "dtypes1.h5",
- "dtypes2.h5",
- "dtypes3.h5",
- NULL
-};
+const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", NULL};
/*
* Count up or down depending on whether the machine is big endian or little
* endian. If local variable `endian' is H5T_ORDER_BE then the result will
* be I, otherwise the result will be Z-(I+1).
*/
-#define ENDIAN(Z,I) (H5T_ORDER_BE==endian?(I):(Z)-((I)+1))
+#define ENDIAN(Z, I) (H5T_ORDER_BE == endian ? (I) : (Z) - ((I) + 1))
-
-typedef enum flt_t {
- FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER
-} flt_t;
+typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t;
typedef enum int_t {
- INT_CHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
- INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, INT_OTHER
+ INT_CHAR,
+ INT_UCHAR,
+ INT_SHORT,
+ INT_USHORT,
+ INT_INT,
+ INT_UINT,
+ INT_LONG,
+ INT_ULONG,
+ INT_LLONG,
+ INT_ULLONG,
+ INT_OTHER
} int_t;
typedef struct {
@@ -84,7 +85,7 @@ typedef struct {
long c;
double d;
} src_typ_t;
-
+
/*-------------------------------------------------------------------------
* Function: test_classes
*
@@ -97,7 +98,8 @@ typedef struct {
*
*-------------------------------------------------------------------------
*/
-static void test_classes()
+static void
+test_classes()
{
SUBTEST("PredType::getClass()");
try {
@@ -105,23 +107,23 @@ static void test_classes()
// PredType::NATIVE_INT should be in H5T_INTEGER class
H5T_class_t tcls = PredType::NATIVE_INT.getClass();
- if (H5T_INTEGER!=tcls) {
+ if (H5T_INTEGER != tcls) {
puts(" Invalid type class for H5T_NATIVE_INT");
}
// PredType::NATIVE_DOUBLE should be in H5T_FLOAT class
tcls = PredType::NATIVE_DOUBLE.getClass();
- if (H5T_FLOAT!=tcls) {
- verify_val(tcls, H5T_FLOAT, "test_class: invalid type class for NATIVE_DOUBLE -", __LINE__, __FILE__);
+ if (H5T_FLOAT != tcls) {
+ verify_val(tcls, H5T_FLOAT, "test_class: invalid type class for NATIVE_DOUBLE -", __LINE__,
+ __FILE__);
}
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_classes", __LINE__, __FILE__, E.getCDetailMsg());
}
}
-
+
/*-------------------------------------------------------------------------
* Function: test_copy
*
@@ -134,7 +136,8 @@ static void test_classes()
*
*-------------------------------------------------------------------------
*/
-static void test_copy()
+static void
+test_copy()
{
SUBTEST("DataType::copy() and DataType::operator=");
try {
@@ -144,7 +147,7 @@ static void test_copy()
// Test copying a predefined type using DataType::copy
DataType copied_type;
- copied_type.copy (PredType::STD_B8LE);
+ copied_type.copy(PredType::STD_B8LE);
// Test copying a user-defined type using DataType::operator=
DataType assigned_usertype;
@@ -155,7 +158,7 @@ static void test_copy()
copied_usertype.copy(copied_type);
// Test copying a user-defined int type using DataType::operator=
- IntType orig_int(PredType::STD_B8LE);
+ IntType orig_int(PredType::STD_B8LE);
DataType generic_type;
generic_type = orig_int;
@@ -168,13 +171,11 @@ static void test_copy()
PASSED();
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_copy", __LINE__, __FILE__, E.getCDetailMsg());
}
}
-
/*-------------------------------------------------------------------------
* Function: test_query
*
@@ -191,14 +192,14 @@ static void test_copy()
const H5std_string CompT_NAME("Compound_type");
const H5std_string EnumT_NAME("Enum_type");
-static void test_query()
+static void
+test_query()
{
- short enum_val;
+ short enum_val;
// Output message about test being performed
SUBTEST("Query functions of compound and enumeration types");
- try
- {
+ try {
// Create File
H5File file(FILENAME[2], H5F_ACC_TRUNC);
@@ -213,11 +214,11 @@ static void test_query()
// Create a enumerate datatype
EnumType tid2(sizeof(short));
- tid2.insert("RED", (enum_val=0,&enum_val));
- tid2.insert("GREEN", (enum_val=1,&enum_val));
- tid2.insert("BLUE", (enum_val=2,&enum_val));
- tid2.insert("ORANGE", (enum_val=3,&enum_val));
- tid2.insert("YELLOW", (enum_val=4,&enum_val));
+ tid2.insert("RED", (enum_val = 0, &enum_val));
+ tid2.insert("GREEN", (enum_val = 1, &enum_val));
+ tid2.insert("BLUE", (enum_val = 2, &enum_val));
+ tid2.insert("ORANGE", (enum_val = 3, &enum_val));
+ tid2.insert("YELLOW", (enum_val = 4, &enum_val));
// Query member number and member index by name, for compound type
int nmembs = tid1.getNmembers();
@@ -237,10 +238,10 @@ static void test_query()
// prop list, then close it
tid1.commit(file, CompT_NAME);
PropList tcpl = tid1.getCreatePlist();
- if (!IdComponent::isValid(tcpl.getId()))
- {
+ if (!IdComponent::isValid(tcpl.getId())) {
// Throw an invalid action exception
- throw InvalidActionException("IdComponent::isValid", "Datatype creation property list is not valid");
+ throw InvalidActionException("IdComponent::isValid",
+ "Datatype creation property list is not valid");
}
tcpl.close();
tid1.close();
@@ -249,10 +250,10 @@ static void test_query()
// prop list, then close it
tid2.commit(file, EnumT_NAME);
tcpl = tid2.getCreatePlist();
- if (!IdComponent::isValid(tcpl.getId()))
- {
+ if (!IdComponent::isValid(tcpl.getId())) {
// Throw an invalid action exception
- throw InvalidActionException("IdComponent::isValid", "Datatype creation property list is not valid");
+ throw InvalidActionException("IdComponent::isValid",
+ "Datatype creation property list is not valid");
}
tcpl.close();
tid2.close();
@@ -285,14 +286,12 @@ static void test_query()
H5File file1(FILENAME[2], H5F_ACC_TRUNC);
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_query", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_query
+} // test_query
-
/*-------------------------------------------------------------------------
* Function: test_transient
*
@@ -305,16 +304,17 @@ static void test_query()
*
*-------------------------------------------------------------------------
*/
-const char* filename1 = "dtypes1.h5";
-static void test_transient ()
+const char *filename1 = "dtypes1.h5";
+static void
+test_transient()
{
- static hsize_t ds_size[2] = {10, 20};
+ static hsize_t ds_size[2] = {10, 20};
SUBTEST("Transient datatypes");
try {
// Create the file and the dataspace.
- H5File file(filename1, H5F_ACC_TRUNC);
+ H5File file(filename1, H5F_ACC_TRUNC);
DataSpace space(2, ds_size, ds_size);
// Copying a predefined type results in a modifiable copy
@@ -325,8 +325,11 @@ static void test_transient ()
try {
Attribute attr(type.createAttribute("attr1", PredType::NATIVE_INT, space));
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("H5Object::createAttribute", "Attempted to commit a predefined datatype.");
- } catch (AttributeIException& err) {} // do nothing, failure expected
+ throw InvalidActionException("H5Object::createAttribute",
+ "Attempted to commit a predefined datatype.");
+ }
+ catch (AttributeIException &err) {
+ } // do nothing, failure expected
// Create a dataset from a transient datatype
// type.close(); - put trace in H5Tclose to make sure it's closed
@@ -339,8 +342,11 @@ static void test_transient ()
itype.setPrecision(256);
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("PredType::setPrecision", "Dataset datatypes should not be modifiable!");
- } catch (DataTypeIException& err) {}
+ throw InvalidActionException("PredType::setPrecision",
+ "Dataset datatypes should not be modifiable!");
+ }
+ catch (DataTypeIException &err) {
+ }
itype.close();
// Get a copy of the dataset's datatype by applying DataType::copy()
@@ -360,14 +366,12 @@ static void test_transient ()
type.close();
space.close();
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_transient", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_transient
+} // test_transient
-
/*-------------------------------------------------------------------------
* Function: test_named
*
@@ -381,12 +385,13 @@ static void test_transient ()
*-------------------------------------------------------------------------
*/
const H5std_string filename2("dtypes2.h5");
-static void test_named ()
+static void
+test_named()
{
- static hsize_t ds_size[2] = {10, 20};
- hsize_t i;
- unsigned attr_data[10][20];
- DataType *ds_type = NULL;
+ static hsize_t ds_size[2] = {10, 20};
+ hsize_t i;
+ unsigned attr_data[10][20];
+ DataType * ds_type = NULL;
SUBTEST("Named datatypes");
try {
@@ -403,15 +408,16 @@ static void test_named ()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("PredType::commit", "Attempted to commit a predefined datatype.");
- } catch (DataTypeIException& err) {}
+ }
+ catch (DataTypeIException &err) {
+ }
// Copy a predefined datatype and commit the copy.
IntType itype(PredType::NATIVE_INT);
itype.commit(file, "native-int");
// Test commit passing in const H5File& for prototype with const
- try
- {
+ try {
// Create random char type
IntType atype(PredType::NATIVE_UCHAR);
@@ -421,9 +427,8 @@ static void test_named ()
// Commit type passing in const group; compilation would fail if
// no matching prototype
atype.commit(const_grp, "random uchar");
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_named", __LINE__, __FILE__, "Commit at const group");
}
@@ -433,11 +438,14 @@ static void test_named ()
// We should not be able to modify a type after it has been committed.
try {
- itype.setPrecision(256); // attempt an invalid action...
+ itype.setPrecision(256); // attempt an invalid action...
// Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("IntType::setPrecision", "Attempted to modify a committed datatype.");
- } catch (DataTypeIException& err) {}
+ throw InvalidActionException("IntType::setPrecision",
+ "Attempted to modify a committed datatype.");
+ }
+ catch (DataTypeIException &err) {
+ }
// We should not be able to re-commit a committed type
try {
@@ -445,12 +453,14 @@ static void test_named ()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("IntType::commit", "Attempted to re-commit a committed datatype.");
- } catch (DataTypeIException& err) {} // do nothing, failure expected
+ }
+ catch (DataTypeIException &err) {
+ } // do nothing, failure expected
// It should be possible to define an attribute for the named type
Attribute attr1 = itype.createAttribute("attr1", PredType::NATIVE_UCHAR, space);
- for (i=0; i<ds_size[0]*ds_size[1]; i++)
- attr_data[0][i] = (int)i;/*tricky*/
+ for (i = 0; i < ds_size[0] * ds_size[1]; i++)
+ attr_data[0][i] = (int)i; /*tricky*/
attr1.write(PredType::NATIVE_UINT, attr_data);
attr1.close();
@@ -459,13 +469,15 @@ static void test_named ()
IntType trans_type;
trans_type.copy(itype);
bool iscommitted = trans_type.committed();
- verify_val(iscommitted, 0, "DataType::committed() - Copying a named type should result in a transient type!", __LINE__, __FILE__);
+ verify_val(iscommitted, 0,
+ "DataType::committed() - Copying a named type should result in a transient type!",
+ __LINE__, __FILE__);
trans_type.setPrecision(256);
trans_type.close();
// Close the committed type and reopen it. It should be a named type.
itype.close();
- itype = file.openIntType("native-int");
+ itype = file.openIntType("native-int");
iscommitted = itype.committed();
if (!iscommitted)
throw InvalidActionException("IntType::committed()", "Opened named types should be named types!");
@@ -473,8 +485,8 @@ static void test_named ()
// Create a dataset that uses the named type, then get the dataset's
// datatype and make sure it's a named type.
DataSet dset = file.createDataSet("dset1", itype, space);
- ds_type = new DataType(dset.getDataType());
- iscommitted = ds_type->committed();
+ ds_type = new DataType(dset.getDataType());
+ iscommitted = ds_type->committed();
if (!iscommitted)
throw InvalidActionException("IntType::committed()", "Dataset type should be named type!");
dset.close();
@@ -483,8 +495,8 @@ static void test_named ()
// Reopen the dataset and its type, then make sure the type is
// a named type.
- dset = file.openDataSet("dset1");
- ds_type = new DataType(dset.getDataType());
+ dset = file.openDataSet("dset1");
+ ds_type = new DataType(dset.getDataType());
iscommitted = ds_type->committed();
if (!iscommitted)
throw InvalidActionException("IntType::committed()", "Dataset type should be named type!");
@@ -498,8 +510,8 @@ static void test_named ()
delete ds_type;
// Reopen the second dataset and make sure the type is shared
- dset = file.openDataSet("dset2");
- ds_type = new DataType(dset.getDataType());
+ dset = file.openDataSet("dset2");
+ ds_type = new DataType(dset.getDataType());
iscommitted = ds_type->committed();
if (!iscommitted)
throw InvalidActionException("DataType::iscommitted()", "Dataset type should be named type!");
@@ -518,17 +530,15 @@ static void test_named ()
space.close();
file.close();
PASSED();
- } // end of try block
- catch (Exception& E)
- {
+ } // end of try block
+ catch (Exception &E) {
issue_fail_msg("test_named", __LINE__, __FILE__, E.getCDetailMsg());
}
- if(ds_type)
+ if (ds_type)
delete ds_type;
-} // test_named
+} // test_named
-
/*-------------------------------------------------------------------------
* Function: test_encode_decode
*
@@ -542,11 +552,12 @@ static void test_named ()
*-------------------------------------------------------------------------
*/
const H5std_string filename3("encode_decode.h5");
-const int ARRAY1_RANK = 1;
-const int ARRAY1_DIM = 10;
-static void test_encode_decode()
+const int ARRAY1_RANK = 1;
+const int ARRAY1_DIM = 10;
+static void
+test_encode_decode()
{
- short enum_val;
+ short enum_val;
SUBTEST("DataType::encode() and DataType::decode()");
try {
@@ -572,7 +583,7 @@ static void test_encode_decode()
verify_val(cmptyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Decode compound type's buffer to a new CompType
- CompType* decoded_cmp_ptr(static_cast<CompType *>(cmptyp.decode()));
+ CompType *decoded_cmp_ptr(static_cast<CompType *>(cmptyp.decode()));
// Verify that the datatype was copied exactly via encoding/decoding
verify_val(cmptyp == *decoded_cmp_ptr, true, "DataType::decode", __LINE__, __FILE__);
@@ -596,11 +607,11 @@ static void test_encode_decode()
// Create a enumerate datatype
EnumType enumtyp(sizeof(short));
- enumtyp.insert("RED", (enum_val=0,&enum_val));
- enumtyp.insert("GREEN", (enum_val=1,&enum_val));
- enumtyp.insert("BLUE", (enum_val=2,&enum_val));
- enumtyp.insert("ORANGE", (enum_val=3,&enum_val));
- enumtyp.insert("YELLOW", (enum_val=4,&enum_val));
+ enumtyp.insert("RED", (enum_val = 0, &enum_val));
+ enumtyp.insert("GREEN", (enum_val = 1, &enum_val));
+ enumtyp.insert("BLUE", (enum_val = 2, &enum_val));
+ enumtyp.insert("ORANGE", (enum_val = 3, &enum_val));
+ enumtyp.insert("YELLOW", (enum_val = 4, &enum_val));
// Encode compound type in a buffer
enumtyp.encode();
@@ -609,7 +620,7 @@ static void test_encode_decode()
verify_val(enumtyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Decode enumeration type's buffer to a new EnumType
- EnumType* decoded_enum_ptr(static_cast<EnumType *>(enumtyp.decode()));
+ EnumType *decoded_enum_ptr(static_cast<EnumType *>(enumtyp.decode()));
// Verify that the datatype was copied exactly via encoding/decoding
verify_val(enumtyp == *decoded_enum_ptr, true, "DataType::decode", __LINE__, __FILE__);
@@ -641,7 +652,7 @@ static void test_encode_decode()
verify_val(vlsttyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Decode the variable-length type's buffer to a new StrType
- StrType* decoded_str_ptr(static_cast<StrType *>(vlsttyp.decode()));
+ StrType *decoded_str_ptr(static_cast<StrType *>(vlsttyp.decode()));
verify_val(vlsttyp == *decoded_str_ptr, true, "DataType::decode", __LINE__, __FILE__);
verify_val(decoded_str_ptr->isVariableStr(), true, "DataType::decode", __LINE__, __FILE__);
@@ -651,7 +662,7 @@ static void test_encode_decode()
// Test decoding the type by way of DataType*
// Decode variable-length string type to a new DataType
- DataType* decoded_vlstr_ptr(vlsttyp.decode());
+ DataType *decoded_vlstr_ptr(vlsttyp.decode());
// Create a StrType instance from the DataType object and verify it
StrType decoded_vlsttyp(decoded_vlstr_ptr->getId());
@@ -676,7 +687,7 @@ static void test_encode_decode()
verify_val(arrtyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Create an ArrayType instance from the decoded pointer and verify it
- ArrayType* decoded_arr_ptr(static_cast<ArrayType *>(arrtyp.decode()));
+ ArrayType *decoded_arr_ptr(static_cast<ArrayType *>(arrtyp.decode()));
verify_val(arrtyp == *decoded_arr_ptr, true, "DataType::decode", __LINE__, __FILE__);
@@ -708,7 +719,7 @@ static void test_encode_decode()
verify_val(inttyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Create an IntType instance from the decoded pointer and verify it
- IntType* decoded_int_ptr(static_cast<IntType *>(inttyp.decode()));
+ IntType * decoded_int_ptr(static_cast<IntType *>(inttyp.decode()));
H5T_sign_t int_sign = decoded_int_ptr->getSign();
verify_val(int_sign, H5T_SGN_NONE, "DataType::decode", __LINE__, __FILE__);
verify_val(inttyp == *decoded_int_ptr, true, "DataType::decode", __LINE__, __FILE__);
@@ -729,34 +740,32 @@ static void test_encode_decode()
verify_val(flttyp.hasBinaryDesc(), true, "DataType::encode", __LINE__, __FILE__);
// Decode the array type's buffer
- DataType* decoded_flt_ptr(flttyp.decode());
+ DataType *decoded_flt_ptr(flttyp.decode());
// Create a IntType instance from the decoded pointer and verify it
FloatType decoded_flttyp(decoded_flt_ptr->getId());
verify_val(flttyp == decoded_flttyp, true, "DataType::decode", __LINE__, __FILE__);
- H5std_string norm_string;
- H5T_norm_t mant_norm = decoded_flttyp.getNorm(norm_string);
- //verify_val(decoded_flttyp.isVariableStr(), true, "DataType::decode", __LINE__, __FILE__);
+ // H5std_string norm_string;
+ // H5T_norm_t mant_norm = decoded_flttyp.getNorm(norm_string);
+ // verify_val(decoded_flttyp.isVariableStr(), true, "DataType::decode", __LINE__, __FILE__);
delete decoded_flt_ptr;
PASSED();
}
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_encode_decode", __LINE__, __FILE__, E.getCDetailMsg());
}
}
-
/****************************************************************
**
** test_types(): Main datatypes testing routine.
**
****************************************************************/
-extern "C"
-void test_types()
+extern "C" void
+test_types()
{
// Output message about test being performed
MESSAGE(5, ("Testing Generic Data Types\n"));
@@ -769,9 +778,8 @@ void test_types()
test_named();
test_encode_decode();
-} // test_types()
+} // test_types()
-
/*-------------------------------------------------------------------------
* Function: cleanup_types
*
@@ -784,9 +792,9 @@ void test_types()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_types()
+extern "C" void
+cleanup_types()
{
for (int i = 0; i < 3; i++)
HDremove(FILENAME[i]);
-} // cleanup_types
+} // cleanup_types
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index d5f2afe..6154083 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,16 +28,17 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5test.h"
+#include "h5cpputil.h" // C++ utilility header file
// Data file used in most test functions
const H5std_string FILENAME("tvlstr.h5");
// 1-D dataset with fixed dimensions
-const int SPACE1_RANK = 1;
+const int SPACE1_RANK = 1;
const hsize_t SPACE1_DIM1 = 4;
/****************************************************************
@@ -125,10 +126,11 @@ static void test_vlstr_free_custom(void *_mem, void *info)
const H5std_string DSET1_NAME("String_ds");
const H5std_string DSET1_DATA("String Dataset");
-static void test_vlstring_dataset()
+static void
+test_vlstring_dataset()
{
char *dynstring_ds_write = NULL;
- char *string_ds_check = NULL;
+ char *string_ds_check = NULL;
// Output message about test being performed
SUBTEST("VL String on Datasets");
@@ -144,7 +146,7 @@ static void test_vlstring_dataset()
Group root = file1.openGroup("/");
// Create dataspace for the dataset.
- DataSpace ds_space (H5S_SCALAR);
+ DataSpace ds_space(H5S_SCALAR);
// Create an dataset in the root group.
DataSet dset1 = root.createDataSet(DSET1_NAME, vlst, ds_space);
@@ -154,17 +156,19 @@ static void test_vlstring_dataset()
// Read and verify the dataset string as a string of chars.
dset1.read(&string_ds_check, vlst);
- if(HDstrcmp(string_ds_check, DSET1_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,string_ds_check=%s\n",__LINE__, DSET1_DATA.c_str(), string_ds_check);
+ if (HDstrcmp(string_ds_check, DSET1_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,string_ds_check=%s\n", __LINE__,
+ DSET1_DATA.c_str(), string_ds_check);
- HDfree(string_ds_check); // note: no need for std::string test
+ HDfree(string_ds_check); // note: no need for std::string test
string_ds_check = NULL;
// Read and verify the dataset string as an std::string.
H5std_string read_str;
dset1.read(read_str, vlst);
if (read_str != DSET1_DATA)
- TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,read_str=%s\n",__LINE__, DSET1_DATA.c_str(), read_str.c_str());
+ TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,read_str=%s\n", __LINE__,
+ DSET1_DATA.c_str(), read_str.c_str());
// Close the dataset.
dset1.close();
@@ -172,7 +176,7 @@ static void test_vlstring_dataset()
// Test scalar type dataset with 1 value.
dset1 = root.createDataSet("test_scalar_small", vlst, ds_space);
- dynstring_ds_write = (char*)HDcalloc(1, sizeof(char));
+ dynstring_ds_write = (char *)HDcalloc(1, sizeof(char));
HDmemset(dynstring_ds_write, 'A', 1);
// Write data to the dataset, then read it back.
@@ -180,8 +184,9 @@ static void test_vlstring_dataset()
dset1.read(&string_ds_check, vlst);
// Verify data read.
- if(HDstrcmp(string_ds_check,dynstring_ds_write)!=0)
- TestErrPrintf("VL string datasets don't match!, dynstring_ds_write=%s, string_ds_check=%s\n",dynstring_ds_write,string_ds_check);
+ if (HDstrcmp(string_ds_check, dynstring_ds_write) != 0)
+ TestErrPrintf("VL string datasets don't match!, dynstring_ds_write=%s, string_ds_check=%s\n",
+ dynstring_ds_write, string_ds_check);
HDfree(string_ds_check);
string_ds_check = NULL;
dset1.close();
@@ -197,16 +202,15 @@ static void test_vlstring_dataset()
} // end try block
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstring_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
}
- if(dynstring_ds_write)
+ if (dynstring_ds_write)
HDfree(dynstring_ds_write);
- if(string_ds_check)
+ if (string_ds_check)
HDfree(string_ds_check);
-} // test_vlstring_dataset()
+} // test_vlstring_dataset()
/*-------------------------------------------------------------------------
* Function: test_vlstring_array_dataset
@@ -221,22 +225,22 @@ static void test_vlstring_dataset()
*-------------------------------------------------------------------------
*/
const H5std_string DSSTRARR_NAME("StringArray_dset");
-static void test_vlstring_array_dataset()
+static void
+test_vlstring_array_dataset()
{
- const char *string_ds_array[SPACE1_DIM1]= {
- "Line 1", "Line 2", "Line 3", "Line 4"
- }; // Information to write
+ const char *string_ds_array[SPACE1_DIM1] = {"Line 1", "Line 2", "Line 3",
+ "Line 4"}; // Information to write
// Output message about test being performed
SUBTEST("VL String Array on Datasets");
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
// Create file.
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
// Create dataspace for datasets.
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace ds_space(SPACE1_RANK, dims1);
// Create a datatype to refer to.
@@ -252,10 +256,10 @@ static void test_vlstring_array_dataset()
dataset.read(string_ds_check, vlst);
hsize_t ii;
- for (ii = 0; ii < SPACE1_DIM1; ii++)
- {
- if(HDstrcmp(string_ds_check[ii], string_ds_array[ii])!=0)
- TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
+ for (ii = 0; ii < SPACE1_DIM1; ii++) {
+ if (HDstrcmp(string_ds_check[ii], string_ds_array[ii]) != 0)
+ TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n", __LINE__,
+ string_ds_array[ii], string_ds_check[ii]);
HDfree(string_ds_check[ii]);
}
@@ -273,14 +277,14 @@ static void test_vlstring_array_dataset()
// Create and write another dataset.
DataSet dataset2(file1->createDataSet("Dataset2", vlst, scalar_space));
- char *wdata2 = (char*)HDcalloc(65534, sizeof(char));
+ char * wdata2 = (char *)HDcalloc(65534, sizeof(char));
HDmemset(wdata2, 'A', 65533);
dataset2.write(&wdata2, vlst);
char *rdata2;
dataset2.read(&rdata2, vlst);
- if (HDstrcmp(wdata2, rdata2)!=0)
- TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, wdata2, rdata2);
+ if (HDstrcmp(wdata2, rdata2) != 0)
+ TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n", __LINE__, wdata2, rdata2);
// Release resources from second dataset operation.
scalar_space.close();
@@ -297,12 +301,11 @@ static void test_vlstring_array_dataset()
} // end try
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstring_array_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
}
- if(file1)
+ if (file1)
delete file1;
} // end test_vlstring_array_dataset()
@@ -319,11 +322,12 @@ static void test_vlstring_array_dataset()
*
*-------------------------------------------------------------------------
*/
-static void test_vlstrings_special()
+static void
+test_vlstrings_special()
{
- const char *wdata[SPACE1_DIM1] = {"one", "two", "", "four"};
+ const char *wdata[SPACE1_DIM1] = {"one", "two", "", "four"};
const char *wdata2[SPACE1_DIM1] = {NULL, NULL, NULL, NULL};
- char *rdata[SPACE1_DIM1]; // Information read in
+ char * rdata[SPACE1_DIM1]; // Information read in
// Output message about test being performed.
SUBTEST("Special VL Strings");
@@ -333,7 +337,7 @@ static void test_vlstrings_special()
H5File file1(FILENAME, H5F_ACC_TRUNC);
// Create dataspace for datasets.
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a datatype to refer to.
@@ -347,30 +351,29 @@ static void test_vlstrings_special()
// Check data read in.
hsize_t ii; // counting variable
- for (ii=0; ii<SPACE1_DIM1; ii++)
- if(rdata[ii]!=NULL)
- TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
+ for (ii = 0; ii < SPACE1_DIM1; ii++)
+ if (rdata[ii] != NULL)
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n", (int)ii, rdata[ii]);
// Write dataset to disk, then read it back.
dataset.write(wdata, vlst);
dataset.read(rdata, vlst);
// Compare data read in.
- for (ii = 0; ii < SPACE1_DIM1; ii++)
- {
+ for (ii = 0; ii < SPACE1_DIM1; ii++) {
size_t wlen = HDstrlen(wdata[ii]);
size_t rlen = HDstrlen(rdata[ii]);
- if(wlen != rlen)
- {
- TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
+ if (wlen != rlen) {
+ TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n",
+ (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
continue;
} // end if
- if(HDstrcmp(wdata[ii],rdata[ii]) != 0)
- {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii], (int)ii, rdata[ii]);
+ if (HDstrcmp(wdata[ii], rdata[ii]) != 0) {
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii],
+ (int)ii, rdata[ii]);
continue;
} // end if
- } // end for
+ } // end for
// Reclaim the read VL data.
DataSet::vlenReclaim((void *)rdata, vlst, sid1);
@@ -385,7 +388,7 @@ static void test_vlstrings_special()
// Create the property list and set the fill value for the second
// dataset.
DSetCreatPropList dcpl;
- char *fill = NULL; // Fill value
+ char * fill = NULL; // Fill value
dcpl.setFillValue(vlst, &fill);
dataset = file1.createDataSet("Dataset4", vlst, sid1, dcpl);
@@ -396,9 +399,9 @@ static void test_vlstrings_special()
dataset.read(rdata, vlst);
// Check data read in.
- for (ii=0; ii<SPACE1_DIM1; ii++)
- if(rdata[ii]!=NULL)
- TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
+ for (ii = 0; ii < SPACE1_DIM1; ii++)
+ if (rdata[ii] != NULL)
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n", (int)ii, rdata[ii]);
// Try to write nil strings to disk.
dataset.write(wdata2, vlst);
@@ -407,9 +410,9 @@ static void test_vlstrings_special()
dataset.read(rdata, vlst);
// Check data read in.
- for (ii=0; ii<SPACE1_DIM1; ii++)
- if(rdata[ii]!=NULL)
- TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
+ for (ii = 0; ii < SPACE1_DIM1; ii++)
+ if (rdata[ii] != NULL)
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n", (int)ii, rdata[ii]);
// Close objects and file.
dataset.close();
@@ -421,8 +424,7 @@ static void test_vlstrings_special()
} // end try
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstrings_special()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_vlstrings_special
@@ -439,13 +441,14 @@ static void test_vlstrings_special()
*
*-------------------------------------------------------------------------
*/
-const H5std_string VLSTR_TYPE("vl_string_type");
-static void test_vlstring_type()
+const H5std_string VLSTR_TYPE("vl_string_type");
+static void
+test_vlstring_type()
{
// Output message about test being performed.
SUBTEST("VL String Type");
- H5File* file1 = NULL;
+ H5File *file1 = NULL;
try {
// Open file.
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
@@ -495,17 +498,17 @@ static void test_vlstring_type()
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
{ // deprecated
- // Open the variable-length string datatype just created.
- vlst = file1->openStrType(VLSTR_TYPE);
+ // Open the variable-length string datatype just created.
+ vlst = file1->openStrType(VLSTR_TYPE);
- // Verify character set and padding.
- cset = vlst.getCset();
- verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
- pad = vlst.getStrpad();
- verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
+ // Verify character set and padding.
+ cset = vlst.getCset();
+ verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
+ pad = vlst.getStrpad();
+ verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
- // Close type to test new function.
- vlst.close();
+ // Close type to test new function.
+ vlst.close();
} // deprecated
// Open the variable-length string datatype just created.
@@ -525,12 +528,11 @@ static void test_vlstring_type()
} // end try block
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstring_type()", __LINE__, __FILE__, E.getCDetailMsg());
}
- if(file1)
+ if (file1)
delete file1;
} // end test_vlstring_type()
@@ -546,7 +548,8 @@ static void test_vlstring_type()
*
*-------------------------------------------------------------------------
*/
-static void test_compact_vlstring()
+static void
+test_compact_vlstring()
{
// Output message about test being performed
SUBTEST("VL Strings on Compact Dataset");
@@ -556,7 +559,7 @@ static void test_compact_vlstring()
H5File file1(FILENAME, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a datatype to refer to
@@ -574,21 +577,23 @@ static void test_compact_vlstring()
dataset.write(wdata, vlst);
// Read dataset from disk
- char *rdata[SPACE1_DIM1]; // Information read in
+ char *rdata[SPACE1_DIM1]; // Information read in
dataset.read(rdata, vlst);
// Compare data read in
hsize_t i;
- for (i=0; i<SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i])!=strlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ for (i = 0; i < SPACE1_DIM1; i++) {
+ if (HDstrlen(wdata[i]) != strlen(rdata[i])) {
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
+ (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} // end if
- if (HDstrcmp(wdata[i],rdata[i]) != 0) {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
+ (int)i, rdata[i]);
continue;
} // end if
- } // end for
+ } // end for
// Reclaim the read VL data
DataSet::vlenReclaim((void *)rdata, vlst, sid1);
@@ -604,11 +609,10 @@ static void test_compact_vlstring()
} // end try
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_compact_vlstrings()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_compact_vlstrings
+} // test_compact_vlstrings
/*-------------------------------------------------------------------------
* Function: test_vlstring_attribute
@@ -623,13 +627,14 @@ static void test_compact_vlstring()
*-------------------------------------------------------------------------
*/
// String for writing to attribute
-static char *string_att_write=NULL;
+static char *string_att_write = NULL;
// Info for a string attribute
const H5std_string ATTRSTR_NAME("String_attr");
const H5std_string ATTRSTR_DATA("String Attribute");
-static void test_vlstring_attribute()
+static void
+test_vlstring_attribute()
{
// Output message about test being performed
SUBTEST("VL String on Attributes");
@@ -645,7 +650,7 @@ static void test_vlstring_attribute()
Group root = file1.openGroup("/");
// Create dataspace for the attribute.
- DataSpace att_space (H5S_SCALAR);
+ DataSpace att_space(H5S_SCALAR);
// Create an attribute for the root group.
Attribute gr_attr = root.createAttribute(ATTRSTR_NAME, vlst, att_space);
@@ -656,16 +661,18 @@ static void test_vlstring_attribute()
// Read and verify the attribute string as a string of chars.
char *string_att_check;
gr_attr.read(vlst, &string_att_check);
- if(HDstrcmp(string_att_check, ATTRSTR_DATA.c_str())!=0)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
+ if (HDstrcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",
+ __LINE__, ATTRSTR_DATA.c_str(), string_att_check);
- HDfree(string_att_check); // note: no need for std::string test
+ HDfree(string_att_check); // note: no need for std::string test
// Read and verify the attribute string as an std::string.
H5std_string read_str;
gr_attr.read(vlst, read_str);
if (read_str != ATTRSTR_DATA)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_str.c_str());
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n", __LINE__,
+ ATTRSTR_DATA.c_str(), read_str.c_str());
// Close group's attribute.
gr_attr.close();
@@ -673,7 +680,7 @@ static void test_vlstring_attribute()
// Test creating a "large" sized string attribute
gr_attr = root.createAttribute("test_scalar_large", vlst, att_space);
- string_att_write = (char*)HDcalloc(8192, sizeof(char));
+ string_att_write = (char *)HDcalloc(8192, sizeof(char));
HDmemset(string_att_write, 'A', 8191);
// Write data to the attribute, then read it back.
@@ -681,8 +688,9 @@ static void test_vlstring_attribute()
gr_attr.read(vlst, &string_att_check);
// Verify data read.
- if(HDstrcmp(string_att_check,string_att_write)!=0)
- TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
+ if (HDstrcmp(string_att_check, string_att_write) != 0)
+ TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
+ string_att_write, string_att_check);
// Release resources.
HDfree(string_att_check);
@@ -694,11 +702,10 @@ static void test_vlstring_attribute()
} // end try block
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstring_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_vlstring_attribute()
+} // test_vlstring_attribute()
#if 0
/*-------------------------------------------------------------------------
@@ -777,11 +784,11 @@ static void test_read_vl_string_attribute()
*/
const H5std_string ATTRSTRARR_NAME("StringArray_attr");
-static void test_vlstring_array_attribute()
+static void
+test_vlstring_array_attribute()
{
- const char *string_att_array[SPACE1_DIM1]= {
- "Line 1", "Line 2", "Line 3", "Line 4"
- }; // Information to write
+ const char *string_att_array[SPACE1_DIM1] = {"Line 1", "Line 2", "Line 3",
+ "Line 4"}; // Information to write
// Output message about test being performed
SUBTEST("VL String Array on Attributes");
@@ -797,7 +804,7 @@ static void test_vlstring_array_attribute()
Group root = file1.openGroup("/");
// Create dataspace for datasets.
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace att_space(SPACE1_RANK, dims1);
// Create an attribute for the root group.
@@ -812,12 +819,12 @@ static void test_vlstring_array_attribute()
gr_attr.read(vlst, &string_att_check);
hsize_t ii;
- for (ii = 0; ii < SPACE1_DIM1; ii++)
- {
- if(HDstrcmp(string_att_check[ii], string_att_array[ii])!=0)
- TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
+ for (ii = 0; ii < SPACE1_DIM1; ii++) {
+ if (HDstrcmp(string_att_check[ii], string_att_array[ii]) != 0)
+ TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n", __LINE__,
+ string_att_check[ii], string_att_check[ii]);
- HDfree(string_att_check[ii]); // note: no need for std::string test
+ HDfree(string_att_check[ii]); // note: no need for std::string test
}
// Close group's attribute.
@@ -828,15 +835,14 @@ static void test_vlstring_array_attribute()
} // end try block
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vlstring_array_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
-} // test_vlstring_array_attribute()
+} // test_vlstring_array_attribute()
/* Helper routine for test_vl_rewrite() */
-static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+static void
+write_scalar_dset(H5File &file, DataType &type, DataSpace &space, char *name, char *data)
{
DataSet dset;
try {
@@ -844,34 +850,34 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
dset.write(&data, type, space, space);
dset.close();
} // end try
- catch (FileIException& ferr) {
+ catch (FileIException &ferr) {
throw;
}
- catch (DataSetIException& derr) {
+ catch (DataSetIException &derr) {
throw;
}
}
/* Helper routine for test_vl_rewrite() */
-static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+static void
+read_scalar_dset(H5File &file, DataType &type, DataSpace &space, char *name, char *data)
{
- char *data_read;
+ char * data_read;
DataSet dset;
try {
dset = file.openDataSet(name);
dset.read(&data_read, type, space, space);
dset.close();
- if(HDstrcmp(data, data_read))
+ if (HDstrcmp(data, data_read))
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
HDfree(data_read);
} // end try
- catch (FileIException& ferr) {
+ catch (FileIException &ferr) {
throw;
}
- catch (DataSetIException& derr) {
+ catch (DataSetIException &derr) {
throw;
}
}
@@ -890,8 +896,9 @@ static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
*-------------------------------------------------------------------------
*/
const H5std_string FILENAME2("tvlstr2.h5");
-const int REWRITE_NDATASETS = 32;
-static void test_vl_rewrite()
+const int REWRITE_NDATASETS = 32;
+static void
+test_vl_rewrite()
{
// Output message about test being performed
SUBTEST("I/O on VL strings with link/unlink");
@@ -905,37 +912,37 @@ static void test_vl_rewrite()
StrType type(0, H5T_VARIABLE);
// Create dataspace for the attribute.
- DataSpace space (H5S_SCALAR);
+ DataSpace space(H5S_SCALAR);
// Create in file 1.
- int i;
+ int i;
char name[256]; // Buffer for names & data
- for (i=0; i<REWRITE_NDATASETS; i++) {
+ for (i = 0; i < REWRITE_NDATASETS; i++) {
sprintf(name, "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
// Effectively copy data from file 1 to 2.
- for (i=0; i<REWRITE_NDATASETS; i++) {
+ for (i = 0; i < REWRITE_NDATASETS; i++) {
sprintf(name, "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
// Read back from file 2.
- for (i=0; i<REWRITE_NDATASETS; i++) {
+ for (i = 0; i < REWRITE_NDATASETS; i++) {
sprintf(name, "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
}
// Remove from file 2.
- for (i=0; i<REWRITE_NDATASETS; i++) {
+ for (i = 0; i < REWRITE_NDATASETS; i++) {
sprintf(name, "/set_%d", i);
file2.unlink(name);
}
// Effectively copy from file 1 to file 2.
- for (i=0; i<REWRITE_NDATASETS; i++) {
+ for (i = 0; i < REWRITE_NDATASETS; i++) {
sprintf(name, "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
@@ -951,8 +958,7 @@ static void test_vl_rewrite()
} // end try
// Catch all exceptions.
- catch (Exception& E)
- {
+ catch (Exception &E) {
issue_fail_msg("test_vl_rewrite()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_vl_rewrite()
@@ -969,8 +975,8 @@ static void test_vl_rewrite()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void test_vlstrings()
+extern "C" void
+test_vlstrings()
{
// Output message about test being performed
MESSAGE(5, ("Testing Variable-Length Strings"));
@@ -992,9 +998,8 @@ void test_vlstrings()
// Test writing VL datasets in files with lots of unlinking
test_vl_rewrite();
-} // test_vlstrings()
+} // test_vlstrings()
-
/*-------------------------------------------------------------------------
* Function: cleanup_vlstrings
*
@@ -1007,10 +1012,9 @@ void test_vlstrings()
*
*-------------------------------------------------------------------------
*/
-extern "C"
-void cleanup_vlstrings()
+extern "C" void
+cleanup_vlstrings()
{
HDremove(FILENAME.c_str());
HDremove(FILENAME2.c_str());
}
-
diff --git a/config/BlankForm b/config/BlankForm
index a452f92..ce4bf53 100644
--- a/config/BlankForm
+++ b/config/BlankForm
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/COPYING b/config/COPYING
index 6497ace..97969da 100644
--- a/config/COPYING
+++ b/config/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/config/Makefile.am.blank b/config/Makefile.am.blank
index b01735b..37d0e6e 100644
--- a/config/Makefile.am.blank
+++ b/config/Makefile.am.blank
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/apple b/config/apple
index 0b15dfe..98dede2 100644
--- a/config/apple
+++ b/config/apple
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -49,6 +49,7 @@ fi
# Figure out compiler flags
. $srcdir/config/gnu-flags
+. $srcdir/config/clang-flags
# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
# use -O option as it causes failures in test/dt_arith.
case "$host_os" in
@@ -155,11 +156,13 @@ esac
# get c++ version info
case $CXX in
clang++)
+ . $srcdir/config/clang-cxxflags
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'Apple' | sed 's/(.*//'`
;;
*g++*)
+ . $srcdir/config/gnu-cxxflags
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;
diff --git a/config/cce-fflags b/config/cce-fflags
index 38e902b..2e93b36 100644
--- a/config/cce-fflags
+++ b/config/cce-fflags
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/cce-flags b/config/cce-flags
index 47e24bf..d6d6085 100644
--- a/config/cce-flags
+++ b/config/cce-flags
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/clang-cxxflags b/config/clang-cxxflags
new file mode 100644
index 0000000..bd8ce2d
--- /dev/null
+++ b/config/clang-cxxflags
@@ -0,0 +1,200 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# Clang clang++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not Clang; otherwise 'cxx_flags_set' is set to 'yes'
+#
+
+#
+# For now, do not promote any warnings to errors.
+#
+PROMOTE_ERRORS_DFLT=no
+
+#
+# This filter rewrites -Werror= as -W, in that way demoting warnings
+# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+#
+demote_errors()
+{
+ if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ sed 's,-Werror=,-W,g'
+ else
+ cat
+ fi
+}
+
+#
+# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_clang_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+# Get the compiler version in a way that works for clang++
+# unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: clang++
+# cxx_version: Version number: 6.0.0, 7.3.0, ... 10.0.1
+#
+if test "X-" = "X-$cxx_flags_set"; then
+ # clang++ -v will return version number following "clang" on Linux machines,
+ # but on Macs the version number will follow "Apple LLVM version"
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ if test -n "$cxx_version"; then
+ cxx_vendor="clang"
+ else
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\
+ grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`"
+ if test -n "$cxx_version"; then
+ cxx_vendor="Apple LLVM"
+ fi
+ fi
+ if test "X-" != "X-$cxx_version"; then
+
+ # Get the compiler version numbers
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+ cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
+ test -n "$cxx_vers_major" || cxx_vers_major=0
+ test -n "$cxx_vers_minor" || cxx_vers_minor=0
+ test -n "$cxx_vers_patch" || cxx_vers_patch=0
+ fi
+fi
+
+if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then
+ echo "compiler '$CXX' is $cxx_vendor-$cxx_version"
+ ###############################
+ # Architecture-specific flags #
+ ###############################
+
+ arch=
+ case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "uname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*-i386)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*|*III*|*IV*|*Athlon*)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+
+ case "$host_os-$host_cpu" in
+ # cygwin needs the "-std=c99" flag removed, so make
+ # a specific case for Cygwin without the flag and a default
+ # case to add the flag everywhere else
+ cygwin-*)
+ ;;
+
+ *)
+ H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11"
+ ;;
+ esac
+
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CXXFLAGS=
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ DEBUG_CXXFLAGS="-ftrapv -fno-common"
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_CXXFLAGS=
+ SYMBOLS_CXXFLAGS="-g -fno-omit-frame-pointer"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CXXFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-g"
+ NO_OPT_CXXFLAGS="-O0"
+
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)"
+ H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)"
+
+ ######################
+ # Developer warnings #
+ ######################
+
+ NO_DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments no-developer-general)
+ DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments developer-general)
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+
+ #################
+ # Flags are set #
+ #################
+ cxx_flags_set=yes
+fi
+
+# Clear cxx info if no flags set
+if test "X$cxx_flags_set" = "X"; then
+ cxx_vendor=
+ cxx_version=
+fi
+
diff --git a/config/clang-flags b/config/clang-flags
new file mode 100644
index 0000000..ab37749
--- /dev/null
+++ b/config/clang-flags
@@ -0,0 +1,200 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# Clang compiler or a derivative. It is careful not to do anything
+# if the compiler is not Clang; otherwise 'cc_flags_set' is set to 'yes'
+#
+
+#
+# For now, do not promote any warnings to errors.
+#
+PROMOTE_ERRORS_DFLT=no
+
+#
+# This filter rewrites -Werror= as -W, in that way demoting warnings
+# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+#
+demote_errors()
+{
+ if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ sed 's,-Werror=,-W,g'
+ else
+ cat
+ fi
+}
+
+#
+# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_clang_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+# Get the compiler version in a way that works for clang
+# unless a compiler version is already known
+#
+# cc_vendor: The compiler name: clang
+# cc_version: Version number: 6.0.0, 7.3.0, ... 10.0.1
+#
+if test "X-" = "X-$cc_flags_set"; then
+ # clang -v will return version number following "clang" on Linux machines,
+ # but on Macs the version number will follow "Apple LLVM version"
+ cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ if test -n "$cc_version"; then
+ cc_vendor="clang"
+ else
+ cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\
+ grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`"
+ if test -n "$cc_version"; then
+ cc_vendor="Apple LLVM"
+ fi
+ fi
+ if test "X-" != "X-$cc_version"; then
+
+ # Get the compiler version numbers
+ cc_vers_major=`echo $cc_version | cut -f1 -d.`
+ cc_vers_minor=`echo $cc_version | cut -f2 -d.`
+ cc_vers_patch=`echo $cc_version | cut -f3 -d.`
+ test -n "$cc_vers_major" || cc_vers_major=0
+ test -n "$cc_vers_minor" || cc_vers_minor=0
+ test -n "$cc_vers_patch" || cc_vers_patch=0
+ fi
+fi
+
+if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then
+ echo "compiler '$CC' is $cc_vendor-$cc_version"
+ ###############################
+ # Architecture-specific flags #
+ ###############################
+
+ arch=
+ case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "uname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*-i386)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*|*III*|*IV*|*Athlon*)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+
+ case "$host_os-$host_cpu" in
+ # cygwin needs the "-std=c99" flag removed, so make
+ # a specific case for Cygwin without the flag and a default
+ # case to add the flag everywhere else
+ cygwin-*)
+ ;;
+
+ *)
+ H5_CFLAGS="$H5_CFLAGS -std=c99"
+ ;;
+ esac
+
+ H5_CFLAGS="$H5_CFLAGS $arch"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CFLAGS=
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ DEBUG_CFLAGS="-ftrapv -fno-common"
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_CFLAGS=
+ SYMBOLS_CFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-g"
+ NO_OPT_CFLAGS="-O0"
+
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)"
+ H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)"
+
+ ######################
+ # Developer warnings #
+ ######################
+
+ NO_DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments no-developer-general)
+ DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments developer-general)
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+
+ #################
+ # Flags are set #
+ #################
+ cc_flags_set=yes
+fi
+
+# Clear cc info if no flags set
+if test "X$cc_flags_set" = "X"; then
+ cc_vendor=
+ cc_version=
+fi
+
diff --git a/config/clang-warnings/developer-general b/config/clang-warnings/developer-general
new file mode 100644
index 0000000..74d8404
--- /dev/null
+++ b/config/clang-warnings/developer-general
@@ -0,0 +1,4 @@
+-Wformat-nonliteral
+-Wmissing-noreturn
+-Wsometimes-uninitialized
+-Wswitch-enum
diff --git a/config/clang-warnings/error-general b/config/clang-warnings/error-general
new file mode 100644
index 0000000..883dff7
--- /dev/null
+++ b/config/clang-warnings/error-general
@@ -0,0 +1,80 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+-Werror=bad-function-cast
+-Werror=implicit-function-declaration
+-Werror=incompatible-pointer-types
+-Werror=missing-declarations
+-Werror=packed
+-Werror=shadow
+-Werror=switch
+#
+# NOTE: Following files are not compatible with incompatible-pointer-types as errors
+# src/H5Dchunk.c,src/H5Dint.c,src/H5Gint.c,src/H5HFcache.c,src/H5I.c,src/H5T.c
+-Wno-error=incompatible-pointer-types-discards-qualifiers
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
+# -Werror=unused-function
+#
+-Wunused-function
+#
+# H5FDdrvr_module.h
+# -Werror=unused-variable
+#
+-Wunused-variable
+#
+# H5VLpassthru.c
+# -Werror=unused-parameter
+#
+-Wunused-parameter
+#
+#
+#
+# NOTE: Tools files are not compatible with these warnings as errors
+# lib/h5tools.c
+# -Werror=cast-align
+#
+-Wcast-align
+#
+# lib/h5tools_utils.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: JNI files are not compatible with these warnings as errors
+# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
+# jni/h5sImp.c,jni/h5tImp.c
+# -Werror=cast-align
+# jni/h5util.c
+# -Werror=format(-overflow)
+#
+-Wformat
+#
+#
+#Examples and tests do not use the same set of extensive warning flags as libraries
+# Here is a list of tests and examples that have issues with the stricter warnings as error
+#
+# NOTE: Test files are not compatible with these warnings as errors
+# thread_id.c,
+# -Werror=unused-function
+# dsets.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: Examples files are not compatible with these warnings as errors
+# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
+# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
+# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
+# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
+# h5_reference_deprec.c
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=strict-prototypes
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=old-style-definition
+# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
+# -Werror=unused-variable
+# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
+# -Werror=unused-parameter
+
diff --git a/config/clang-warnings/general b/config/clang-warnings/general
new file mode 100644
index 0000000..f0c9b93
--- /dev/null
+++ b/config/clang-warnings/general
@@ -0,0 +1,26 @@
+# general clang warnings flags
+-Wall
+-Warray-bounds
+-Wcast-qual
+-Wconversion
+-Wdouble-promotion
+-Wextra
+-Wformat=2
+-Wframe-larger-than=16384
+-Wimplicit-fallthrough
+#
+# NOTE: Due to the divergence in the C and C++, we're dropping support for
+# compiling the C library with a C++ compiler and dropping the -Wc++-compat
+# warning.
+#
+-Wno-c++-compat
+#
+# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
+# it to the developer flags.
+#
+-Wno-format-nonliteral
+-Wnull-dereference
+-Wunused-const-variable
+-Wwrite-strings
+-Wpedantic
+-Wvolatile-register-var
diff --git a/config/clang-warnings/no-developer-general b/config/clang-warnings/no-developer-general
new file mode 100644
index 0000000..2bf1703
--- /dev/null
+++ b/config/clang-warnings/no-developer-general
@@ -0,0 +1 @@
+-Wno-missing-noreturn
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 9f5262f..cf3a591 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -5,14 +5,14 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
# Allow full output to go to CDash set to 0
-SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
-SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
+set (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
+set (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
# WARNING! This could be a lot of output and could overwhelm CDash and the
# MySQL DB so this might not be a good idea!
@@ -24,13 +24,17 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
"note.*expected.*void.*but argument is of type.*volatile"
"H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type"
"H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
- "SZIP.src.*:[ \t]*warning"
+ "src.ZLIB.*:[ \t]*warning"
+ "warning LNK4197:.*ZLIB-prefix"
+ "src.SZIP.*:[ \t]*warning"
"POSIX name for this item is deprecated"
"disabling jobserver mode"
"config.cmake.xlatefile.c"
- "warning.*implicit declaration of function"
+ "warning.*unknown pragma"
+ "warning.*unrecognized .pragma"
"note: expanded from macro"
-# "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro"
+ # HDDFFV-11074
+ "This directive is not standard"
)
set (CTEST_CUSTOM_MEMCHECK_IGNORE
@@ -41,19 +45,36 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5TEST-err_compat #uses runTest.cmake
H5TEST-links_env #uses runTest.cmake
H5TEST-testlibinfo #uses grepTest.cmake
- H5TEST-clear-testhdf5-objects
+ #########
H5TEST-clear-objects
- H5TEST-clear-cache-objects
- H5TEST-clear-cache_api-objects
- H5TEST-clear-cache_tagging-objects
- H5TEST-clear-ttsafe-objects
- H5TEST-clear-err_compat-objects
- H5TEST-clear-error_test-objects
- H5TEST-clear-links_env-objects
+ H5TEST-cache-clear-objects
+ H5TEST-cache_image-clear-objects
+ H5TEST-del_many_dense_attrs-clear-objects
+ H5TEST-external_env-clear-objects
+ H5TEST-filenotclosed-clear-objects
+ H5TEST-flush-clear-objects
+ H5TEST-links_env-clear-objects
+ H5TEST-testflushrefresh-clear-objects
+ H5TEST-testhdf5-clear-objects
+ H5TEST-vds_env-clear-objects
PERFORM_h5perform-clear-objects
- HL_TOOLS-clear-objects
HL_test-clear-objects
- HL_fortran_test-clear-objects
+ HL_FORTRAN_test-clear-objects
+ FORTRAN_testhdf5-clear-objects
+ FORTRAN_flush1-clear-objects
+ CPP_testhdf5-clear-objects
+ ######### examples #########
+ EXAMPLES-clear-objects
+ CPP_ex-clear-objects
+ CPP_ex_tutr-clear-objects
+ HL_ex-clear-objects
+ f90_ex-clear-objects
+ HL_CPP_ptableTest-clear-objects
+ HL_CPP_ex_ptExampleFL-clear-objects
+ HL_FORTRAN_f90_ex-clear-objects
+ ######### tools/h5clear #########
+ H5CLEAR-clearall-objects
+ H5CLEAR-h5clear_gentest # does not close ids by design
######### tools/h5copy #########
H5COPY-clearall-objects
######### tools/h5diff #########
@@ -66,140 +87,71 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5IMPORT-h5importtest-clear-objects
H5IMPORT-clear-objects
######### tools/h5jam #########
- H5JAM-SETUP-N_twithub_u10_c-clear-objects
- H5JAM-SETUP-N_twithub_u10_c
- H5JAM-N_twithub_u10_c-clear-objects
- H5JAM-NONE_COPY-N_twithub_u10_c
- H5JAM-CHECKFILE-N_twithub_u10_c-clear-objects
- H5JAM-SETUP-N_twithub_u511_c-clear-objects
- H5JAM-SETUP-N_twithub_u511_c
- H5JAM-N_twithub_u511_c-clear-objects
- H5JAM-NONE_COPY-N_twithub_u511_c
- H5JAM-CHECKFILE-N_twithub_u511_c-clear-objects
- H5JAM-SETUP-N_twithub_u512_c-clear-objects
- H5JAM-SETUP-N_twithub_u512_c
- H5JAM-N_twithub_u512_c-clear-objects
- H5JAM-NONE_COPY-N_twithub_u512_c
- H5JAM-CHECKFILE-N_twithub_u512_c-clear-objects
- H5JAM-SETUP-N_twithub_u513_c-clear-objects
- H5JAM-SETUP-N_twithub_u513_c
- H5JAM-N_twithub_u513_c-clear-objects
- H5JAM-NONE_COPY-N_twithub_u513_c
- H5JAM-CHECKFILE-N_twithub_u513_c-clear-objects
- H5JAM-SETUP-N_twithub513_u10_c-clear-objects
- H5JAM-SETUP-N_twithub513_u10_c
- H5JAM-N_twithub513_u10_c-clear-objects
- H5JAM-NONE_COPY-N_twithub513_u10_c
- H5JAM-CHECKFILE-N_twithub513_u10_c-clear-objects
- H5JAM-SETUP-N_twithub513_u511_c-clear-objects
- H5JAM-SETUP-N_twithub513_u511_c
- H5JAM-N_twithub513_u511_c-clear-objects
- H5JAM-NONE_COPY-N_twithub513_u511_c
- H5JAM-CHECKFILE-N_twithub513_u511_c-clear-objects
- H5JAM-SETUP-N_twithub513_u512_c-clear-objects
- H5JAM-SETUP-N_twithub513_u512_c
- H5JAM-N_twithub513_u512_c-clear-objects
- H5JAM-NONE_COPY-N_twithub513_u512_c
- H5JAM-CHECKFILE-N_twithub513_u512_c-clear-objects
- H5JAM-SETUP-N_twithub513_u513_c-clear-objects
- H5JAM-SETUP-N_twithub513_u513_c
- H5JAM-N_twithub513_u513_c-clear-objects
- H5JAM-NONE_COPY-N_twithub513_u513_c
- H5JAM-CHECKFILE-N_twithub513_u513_c-clear-objects
- H5JAM-CHECKFILE-twithub_u10_c-clear-objects
- H5JAM-twithub_u511_c-clear-objects
- H5JAM-CHECKFILE-twithub_u511_c-clear-objects
- H5JAM-twithub_u512_c-clear-objects
- H5JAM-CHECKFILE-twithub_u512_c-clear-objects
- H5JAM-twithub_u513_c-clear-objects
- H5JAM-CHECKFILE-twithub_u513_c-clear-objects
- H5JAM-twithub513_u10_c-clear-objects
- H5JAM-CHECKFILE-twithub513_u10_c-clear-objects
- H5JAM-twithub513_u511_c-clear-objects
- H5JAM-CHECKFILE-twithub513_u511_c-clear-objects
- H5JAM-twithub513_u512_c-clear-objects
- H5JAM-CHECKFILE-twithub513_u512_c-clear-objects
- H5JAM-twithub513_u513_c-clear-objects
- H5JAM-CHECKFILE-twithub513_u513_c-clear-objects
- H5JAM-SETUP-twithub_tall-clear-objects
- H5JAM-SETUP-twithub_tall
- H5JAM-UNJAM-twithub_tall-clear-objects
- H5JAM-UNJAM_D-twithub_tall-clear-objects
- H5JAM-CHECKFILE-twithub_tall-clear-objects
- H5JAM-SETUP-twithub513_tall-clear-objects
- H5JAM-SETUP-twithub513_tall
- H5JAM-UNJAM-twithub513_tall-clear-objects
- H5JAM-UNJAM_D-twithub513_tall-clear-objects
- H5JAM-CHECKFILE-twithub513_tall-clear-objects
- H5JAM-SETUP-N_twithub_tall-clear-objects
- H5JAM-SETUP-N_twithub_tall
- H5JAM-UNJAM-N_twithub_tall-clear-objects
- H5JAM-UNJAM_D-N_twithub_tall-clear-objects
- H5JAM-CHECKFILE-N_twithub_tall-clear-objects
- H5JAM-SETUP-N_twithub513_tall-clear-objects
- H5JAM-SETUP-N_twithub513_tall
- H5JAM-UNJAM-N_twithub513_tall-clear-objects
- H5JAM-UNJAM_D-N_twithub513_tall-clear-objects
- H5JAM-CHECKFILE-N_twithub513_tall-clear-objects
- H5JAM-SETUP-D_twithub_tall-clear-objects
- H5JAM-SETUP-D_twithub_tall
- H5JAM-UNJAM-D_twithub_tall-clear-objects
- H5JAM-UNJAM_D-D_twithub_tall-clear-objects
- H5JAM-CHECKFILE-D_twithub_tall-clear-objects
- H5JAM-SETUP-D_twithub513_tall-clear-objects
- H5JAM-SETUP-D_twithub513_tall
- H5JAM-UNJAM-D_twithub513_tall-clear-objects
- H5JAM-UNJAM_D-D_twithub513_tall-clear-objects
- H5JAM-CHECKFILE-D_twithub513_tall-clear-objects
- H5JAM-CHECKFILE-ta_u513-clear-objects
- H5JAM-twithub_u10-clear-objects
- H5JAM-CHECKFILE-twithub_u10-clear-objects
- H5JAM-twithub_u511-clear-objects
- H5JAM-CHECKFILE-twithub_u511-clear-objects
- H5JAM-twithub_u512-clear-objects
- H5JAM-CHECKFILE-twithub_u512-clear-objects
- H5JAM-twithub_u513-clear-objects
- H5JAM-CHECKFILE-twithub_u513-clear-objects
- H5JAM-twithub513_u10-clear-objects
- H5JAM-CHECKFILE-twithub513_u10-clear-objects
- H5JAM-twithub513_u511-clear-objects
- H5JAM-CHECKFILE-twithub513_u511-clear-objects
- H5JAM-twithub513_u512-clear-objects
- H5JAM-CHECKFILE-twithub513_u512-clear-objects
- H5JAM-twithub513_u513-clear-objects
- H5JAM-CHECKFILE-twithub513_u513-clear-objects
- H5JAM-twithub_u10_c-clear-objects
- H5JAM-tall_u10-clear-objects
- H5JAM-CHECKFILE-tall_u10-clear-objects
- H5JAM-tall_u511-clear-objects
- H5JAM-CHECKFILE-tall_u511-clear-objects
- H5JAM-tall_u512-clear-objects
- H5JAM-CHECKFILE-tall_u512-clear-objects
- H5JAM-tall_u513-clear-objects
- H5JAM-CHECKFILE-tall_u513-clear-objects
- H5JAM-SETUP-ta_u10-clear-objects
- H5JAM-SETUP-ta_u10
- H5JAM-ta_u10-clear-objects
- H5JAM-NONE_COPY-ta_u10
- H5JAM-CHECKFILE-ta_u10-clear-objects
- H5JAM-SETUP-ta_u511-clear-objects
- H5JAM-SETUP-ta_u511
- H5JAM-ta_u511-clear-objects
- H5JAM-NONE_COPY-ta_u511
- H5JAM-CHECKFILE-ta_u511-clear-objects
- H5JAM-SETUP-ta_u512-clear-objects
- H5JAM-SETUP-ta_u512
- H5JAM-ta_u512-clear-objects
- H5JAM-NONE_COPY-ta_u512
- H5JAM-CHECKFILE-ta_u512-clear-objects
- H5JAM-SETUP-ta_u513-clear-objects
- H5JAM-SETUP-ta_u513
- H5JAM-ta_u513-clear-objects
- H5JAM-NONE_COPY-ta_u513
######### tools/h5ls #########
H5LS-clearall-objects
######### tools/h5repack #########
H5REPACK-clearall-objects
+ H5REPACK-add_alignment-clear-objects
+ H5REPACK-add_userblock-clear-objects
+ H5REPACK-all_filters-clear-objects
+ H5REPACK-attr-clear-objects
+ H5REPACK-committed_dt-clear-objects
+ H5REPACK-deflate_convert-clear-objects
+ H5REPACK-deflate_copy-clear-objects
+ H5REPACK-deflate_file-clear-objects
+ H5REPACK-deflate_remove-clear-objects
+ H5REPACK-early-clear-objects
+ H5REPACK-error4-clear-objects
+ H5REPACK-family-clear-objects
+ H5REPACK-fill-clear-objects
+ H5REPACK-fletcher_all-clear-objects
+ H5REPACK-fletcher_copy-clear-objects
+ H5REPACK-fletcher_individual-clear-objects
+ H5REPACK-fletcher_remove-clear-objects
+ H5REPACK-global_filters-clear-objects
+ H5REPACK-gt_mallocsize-clear-objects
+ H5REPACK-gzip_all-clear-objects
+ H5REPACK-gzip_individual-clear-objects
+ H5REPACK-hlink-clear-objects
+ H5REPACK-layout-clear-objects
+ H5REPACK-native_attr-clear-objects
+ H5REPACK-native_fill-clear-objects
+ H5REPACK-nbit_add-clear-objects
+ H5REPACK-nbit_copy-clear-objects
+ H5REPACK-nbit_remove-clear-objects
+ H5REPACK-nested_8bit_enum-clear-objects
+ H5REPACK-objs-clear-objects
+ H5REPACK-remove_all-clear-objects
+ H5REPACK-scale_add-clear-objects
+ H5REPACK-scale_copy-clear-objects
+ H5REPACK-scale_remove-clear-objects
+ H5REPACK-shuffle_all-clear-objects
+ H5REPACK-shuffle_copy-clear-objects
+ H5REPACK-shuffle_individual-clear-objects
+ H5REPACK-shuffle_remove-clear-objects
+ H5REPACK-szip_all-clear-objects
+ H5REPACK-szip_convert-clear-objects
+ H5REPACK-szip_copy-clear-objects
+ H5REPACK-szip_individual-clear-objects
+ H5REPACK-szip_remove-clear-objects
+ H5REPACK-upgrade_layout-clear-objects
+ H5REPACK_DMP-crtorder-clear-objects
+ H5REPACK_DMP-deflate_limit-clear-objects
+ H5REPACK-bug1814-clear-objects
+ H5REPACK-HDFFV-5932-clear-objects
+ H5REPACK-HDFFV-7840-clear-objects
+ H5REPACK_META-meta_long-clear-objects
+ H5REPACK_META-meta_short-clear-objects
+ H5REPACK_STAT-GS_AGGR-clear-objects
+ H5REPACK_STAT-S_AGGR-clear-objects
+ H5REPACK_STAT-SP_NONE-clear-objects
+ H5REPACK_STAT-SP_PAGE-clear-objects
+ H5REPACK_STAT-SPT_FSM_AGGR-clear-objects
+ H5REPACK_STAT-STG_PAGE-clear-objects
+ #########
+ H5REPACK_META-meta_long
+ H5REPACK_META-meta_short
+ #########
H5REPACK-gzip_verbose_filters #uses runTest.cmake
H5REPACK_VERIFY_LAYOUT-dset2_chunk_20x10 #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-chunk_20x10 #uses grepTest.cmake
@@ -227,11 +179,9 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
######### tools/misc #########
H5REPART-clearall-objects
H5MKGRP-clearall-objects
- ######### examples #########
- EXAMPLES-clear-objects
- CPP_ex-clear-objects
- CPP_ex_tutr-clear-objects
- HL_ex-clear-objects
- f90_ex-clear-objects
- HL_FORTRAN_f90_ex-clear-objects
+ ######### tools/perform #########
+ PERFORM_h5perform-clearall-objects
+ ######### hl/tools #########
+ HL_TOOLS-clear-objects
+ H5WATCH-clearall-objects
)
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index 0269ba8..0ed9063 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -5,11 +5,11 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
########################################################
# For any comments please contact cdashhelp@hdfgroup.org
#
@@ -72,7 +72,7 @@ set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
if (CTEST_USE_TAR_SOURCE)
## Uncompress source if tar or zip file provided
## --------------------------
- if (WIN32)
+ if (WIN32 AND NOT MINGW)
message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
else ()
@@ -101,6 +101,11 @@ endif ()
include (ProcessorCount)
ProcessorCount (N)
if (NOT N EQUAL 0)
+ if (MAX_PROC_COUNT)
+ if (N GREATER MAX_PROC_COUNT)
+ set (N ${MAX_PROC_COUNT})
+ endif ()
+ endif ()
if (NOT WIN32)
set (CTEST_BUILD_FLAGS -j${N})
endif ()
@@ -114,8 +119,12 @@ set(CTEST_CONFIGURE_TOOLSET "")
if(CMAKE_GENERATOR_TOOLSET)
set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
endif()
+set(CTEST_CONFIGURE_ARCHITECTURE "")
+if(CMAKE_GENERATOR_ARCHITECTURE)
+ set(CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}")
+endif()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
#-----------------------------------------------------------------------------
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 85e0492..a4d6070 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -20,7 +20,7 @@ include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
#-----------------------------------------------------------------------------
option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
if (HDF5_Enable_Clear_File_Buffers)
- set (H5_CLEAR_MEMORY 1)
+ set (${HDF_PREFIX}_CLEAR_MEMORY 1)
endif ()
MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
@@ -29,7 +29,7 @@ MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
#-----------------------------------------------------------------------------
option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
if (HDF5_STRICT_FORMAT_CHECKS)
- set (H5_STRICT_FORMAT_CHECKS 1)
+ set (${HDF_PREFIX}_STRICT_FORMAT_CHECKS 1)
endif ()
MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
@@ -38,7 +38,7 @@ MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
option (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
if (HDF5_METADATA_TRACE_FILE)
- set (H5_METADATA_TRACE_FILE 1)
+ set (${HDF_PREFIX}_METADATA_TRACE_FILE 1)
endif ()
MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
@@ -47,10 +47,10 @@ MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# conversions. If not, some hard conversions will still be prefered even
# though the data may be wrong (for example, some compilers don't
# support denormalized floating values) to maximize speed.
-#
+#-----------------------------------------------------------------------------
option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON)
if (HDF5_WANT_DATA_ACCURACY)
- set (H5_WANT_DATA_ACCURACY 1)
+ set (${HDF_PREFIX}_WANT_DATA_ACCURACY 1)
endif ()
MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
@@ -59,19 +59,19 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# checked and data conversion exceptions are returned. This is mainly
# for the speed optimization of hard conversions. Soft conversions can
# actually benefit little.
-#
+#-----------------------------------------------------------------------------
option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON)
if (HDF5_WANT_DCONV_EXCEPTION)
- set (H5_WANT_DCONV_EXCEPTION 1)
+ set (${HDF_PREFIX}_WANT_DCONV_EXCEPTION 1)
endif ()
MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
# ----------------------------------------------------------------------
# Check if they would like the function stack support compiled in
-#
+#-----------------------------------------------------------------------------
option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
if (HDF5_ENABLE_CODESTACK)
- set (H5_HAVE_CODESTACK 1)
+ set (${HDF_PREFIX}_HAVE_CODESTACK 1)
endif ()
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
@@ -84,49 +84,50 @@ if (HDF5_ENABLE_HSIZET)
endif ()
# so far we have no check for this
-set (H5_HAVE_TMPFILE 1)
+set (${HDF_PREFIX}_HAVE_TMPFILE 1)
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
-#
-set (H5_DEFAULT_VFD H5FD_SEC2)
+#-----------------------------------------------------------------------------
+set (${HDF_PREFIX}_DEFAULT_VFD H5FD_SEC2)
-if (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
+if (NOT DEFINED "${HDF_PREFIX}_DEFAULT_PLUGINDIR")
if (WINDOWS)
- set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin")
+ set (${HDF_PREFIX}_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin")
else ()
- set (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
+ set (${HDF_PREFIX}_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
endif ()
endif ()
if (WINDOWS)
- set (H5_HAVE_WINDOWS 1)
+ set (${HDF_PREFIX}_HAVE_WINDOWS 1)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine has window style pathname,
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
- set (H5_HAVE_WINDOW_PATH 1)
+ #-----------------------------------------------------------------------
+ set (${HDF_PREFIX}_HAVE_WINDOW_PATH 1)
endif ()
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
-CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME)
+CHECK_FUNCTION_EXISTS (difftime ${HDF_PREFIX}_HAVE_DIFFTIME)
# Find the library containing clock_gettime()
-if (NOT WINDOWS)
+if (MINGW OR NOT WINDOWS)
CHECK_FUNCTION_EXISTS (clock_gettime CLOCK_GETTIME_IN_LIBC)
CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4)
if (CLOCK_GETTIME_IN_LIBC)
- set (H5_HAVE_CLOCK_GETTIME 1)
+ set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1)
elseif (CLOCK_GETTIME_IN_LIBRT)
- set (H5_HAVE_CLOCK_GETTIME 1)
+ set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1)
list (APPEND LINK_LIBS rt)
elseif (CLOCK_GETTIME_IN_LIBPOSIX4)
- set (H5_HAVE_CLOCK_GETTIME 1)
+ set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1)
list (APPEND LINK_LIBS posix4)
endif ()
endif ()
@@ -168,6 +169,21 @@ if (NOT WINDOWS)
endif ()
endif ()
+#-----------------------------------------------------------------------------
+# Check if ROS3 driver can be built
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
+ if (HDF5_ENABLE_ROS3_VFD)
+ find_package(CURL REQUIRED)
+ find_package(OpenSSL REQUIRED)
+ if (${CURL_FOUND} AND ${OPENSSL_FOUND})
+ set (${HDF_PREFIX}_HAVE_ROS3_VFD 1)
+ list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
+ INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
+ else ()
+ message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@@ -215,8 +231,8 @@ endmacro ()
# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
-#
-H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
+#-----------------------------------------------------------------------------
+H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
@@ -224,8 +240,8 @@ H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts
# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
-#
-H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
+#-----------------------------------------------------------------------------
+H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'long double' to '(unsigned) long long' values. (This flag should be set for
@@ -234,32 +250,17 @@ H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can conve
# start to go wrong on these two machines. Adjusting it higher to
# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted
# values wildly wrong. This test detects this wrong behavior and disable the test.
-#
-H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values")
+#-----------------------------------------------------------------------------
+H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# '(unsigned) long long' to 'long double' values. (This flag should be set for
# all machines, except for Mac OS 10.4, when the bit sequences are 003fff...,
# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice
# as big as they should be.
-#
-H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
+#-----------------------------------------------------------------------------
+H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
# ----------------------------------------------------------------------
# Check if pointer alignments are enforced
-#
-H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
-
-# -----------------------------------------------------------------------
-# wrapper script variables
-#
-set (prefix ${CMAKE_INSTALL_PREFIX})
-set (exec_prefix "\${prefix}")
-set (libdir "${exec_prefix}/lib")
-set (includedir "\${prefix}/include")
-set (host_os ${CMAKE_HOST_SYSTEM_NAME})
-set (CC ${CMAKE_C_COMPILER})
-set (CXX ${CMAKE_CXX_COMPILER})
-set (FC ${CMAKE_Fortran_COMPILER})
-foreach (LINK_LIB ${LINK_LIBS})
- set (LIBS "${LIBS} -l${LINK_LIB}")
-endforeach ()
+#-----------------------------------------------------------------------------
+H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index 321d879..39d74db 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -5,11 +5,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-+
+
#if defined(__has_attribute)
#if __has_attribute(no_sanitize)
#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
diff --git a/config/cmake/FindHDFS.cmake b/config/cmake/FindHDFS.cmake
new file mode 100644
index 0000000..e401a94
--- /dev/null
+++ b/config/cmake/FindHDFS.cmake
@@ -0,0 +1,70 @@
+
+# DerivedFrom: https://github.com/cloudera/Impala/blob/cdh5-trunk/cmake_modules/FindHDFS.cmake
+# - Find HDFS (hdfs.h and libhdfs.so)
+# This module defines
+# Hadoop_VERSION, version string of ant if found
+# HDFS_INCLUDE_DIR, directory containing hdfs.h
+# HDFS_LIBRARIES, location of libhdfs.so
+# HDFS_FOUND, whether HDFS is found.
+
+exec_program($ENV{HADOOP_HOME}/bin/hadoop ARGS version OUTPUT_VARIABLE Hadoop_VERSION
+ RETURN_VALUE Hadoop_RETURN)
+
+# currently only looking in HADOOP_HOME
+find_path(HDFS_INCLUDE_DIR hdfs.h PATHS
+ $ENV{HADOOP_HOME}/include/
+ # make sure we don't accidentally pick up a different version
+ NO_DEFAULT_PATH
+)
+
+if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+ set(arch_hint "x64")
+elseif ("$ENV{LIB}" MATCHES "(amd64|ia64)")
+ set(arch_hint "x64")
+else ()
+ set(arch_hint "x86")
+endif()
+
+message(STATUS "Architecture: ${arch_hint}")
+
+if ("${arch_hint}" STREQUAL "x64")
+ set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)
+else ()
+ set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)
+endif ()
+
+message(STATUS "HDFS_LIB_PATHS: ${HDFS_LIB_PATHS}")
+
+find_library(HDFS_LIB NAMES hdfs PATHS
+ ${HDFS_LIB_PATHS}
+ # make sure we don't accidentally pick up a different version
+ NO_DEFAULT_PATH
+)
+
+if (HDFS_LIB)
+ set(HDFS_FOUND TRUE)
+ set(HDFS_LIBRARIES ${HDFS_LIB})
+ set(HDFS_STATIC_LIB ${HDFS_LIB_PATHS}/${CMAKE_STATIC_LIBRARY_PREFIX}hdfs${CMAKE_STATIC_LIBRARY_SUFFIX})
+
+ add_library(hdfs_static STATIC IMPORTED)
+ set_target_properties(hdfs_static PROPERTIES IMPORTED_LOCATION ${HDFS_STATIC_LIB})
+else ()
+ set(HDFS_FOUND FALSE)
+endif ()
+
+if (HDFS_FOUND)
+ if (NOT HDFS_FIND_QUIETLY)
+ message(STATUS "${Hadoop_VERSION}")
+ message(STATUS "HDFS_INCLUDE_DIR: ${HDFS_INCLUDE_DIR}")
+ message(STATUS "HDFS_LIBRARIES: ${HDFS_LIBRARIES}")
+ message(STATUS "hdfs_static: ${HDFS_STATIC_LIB}")
+ endif ()
+else ()
+ message(FATAL_ERROR "HDFS includes and libraries NOT found."
+ "(${HDFS_INCLUDE_DIR}, ${HDFS_LIB})")
+endif ()
+
+mark_as_advanced(
+ HDFS_LIBRARIES
+ HDFS_INCLUDE_DIR
+)
diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in
index 82e85c6..b5ae8ce 100644
--- a/config/cmake/H5cxx_config.h.in
+++ b/config/cmake/H5cxx_config.h.in
@@ -5,12 +5,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* src/H5cxx_config.h.in Created manually. */
/* Define if offsetof extension is present */
-#cmakedefine HAVE_OFFSETOF ${HAVE_OFFSETOF}
+#cmakedefine H5_HAVE_OFFSETOF ${H5_HAVE_OFFSETOF}
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 4d106aa..e7fc0fc 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -34,7 +34,7 @@
#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@
/* Define if C++ compiler recognizes offsetof */
-#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
+#cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@
/* Define the default plugins path to compile */
#cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@"
@@ -78,6 +78,9 @@
/* Define if the function stack tracing code is to be compiled in */
#cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@
+/* Define to 1 if you have the <curl/curl.h> header file. */
+#cmakedefine H5_HAVE_CURL_H @H5_HAVE_CURL_H@
+
/* Define if Darwin or Mac OS X */
#cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@
@@ -156,6 +159,9 @@
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine H5_HAVE_GETTIMEOFDAY @H5_HAVE_GETTIMEOFDAY@
+/* Define to 1 if you have the <hdfs.h> header file. */
+#cmakedefine H5_HAVE_HDFS_H @H5_HAVE_HDFS_H@
+
/* Define if the compiler understands inline */
#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@
@@ -172,12 +178,24 @@
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#cmakedefine H5_HAVE_LIBCRYPTO @H5_HAVE_LIBCRYPTO@
+
+/* Define to 1 if you have the `curl' library (-lcurl). */
+#cmakedefine H5_HAVE_LIBCURL @H5_HAVE_LIBCURL@
+
/* Define to 1 if you have the `dl' library (-ldl). */
#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@
/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@
+/* Proceed to build with libhdfs */
+#cmakedefine H5_HAVE_LIBHDFS @H5_HAVE_LIBHDFS@
+
+/* Define to 1 if you have the `jvm' library (-ljvm). */
+#cmakedefine H5_HAVE_LIBJVM @H5_HAVE_LIBJVM@
+
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine H5_HAVE_LIBM @H5_HAVE_LIBM@
@@ -229,27 +247,37 @@
/* Define to 1 if you have the <mpe.h> header file. */
#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@
-/* Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists */
+/* Define if MPI_Comm_c2f and MPI_Comm_f2c exists */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@
-/* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */
+/* Define if MPI_Info_c2f and MPI_Info_f2c exists */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Info @H5_HAVE_MPI_MULTI_LANG_Info@
+/* Define to 1 if you have the <openssl/evp.h> header file. */
+#cmakedefine H5_HAVE_OPENSSL_EVP_H @H5_HAVE_OPENSSL_EVP_H@
+
+/* Define to 1 if you have the <openssl/hmac.h> header file. */
+#cmakedefine H5_HAVE_OPENSSL_HMAC_H @H5_HAVE_OPENSSL_HMAC_H@
+
+/* Define to 1 if you have the <openssl/sha.h> header file. */
+#cmakedefine H5_HAVE_OPENSSL_SHA_H @H5_HAVE_OPENSSL_SHA_H@
+
/* Define if we have parallel support */
#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@
/* Define to 1 if you have the <pthread.h> header file. */
#cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@
-/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */
-#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@
-
/* Define to 1 if you have the `random' function. */
#cmakedefine H5_HAVE_RANDOM @H5_HAVE_RANDOM@
/* Define to 1 if you have the `rand_r' function. */
#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
+/* Define whether the Read-Only S3 virtual file driver (VFD) should be
+ compiled */
+#cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
+
/* Define to 1 if you have the `round' function. */
#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
@@ -304,22 +332,22 @@
/* Define to 1 if you have the `strdup' function. */
#cmakedefine H5_HAVE_STRDUP @H5_HAVE_STRDUP@
-/* Define to 1 if you have the `strtoll' function. */
-#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@
-
-/* Define to 1 if you have the `strtoull' function. */
-#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@
-
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine H5_HAVE_STRING_H @H5_HAVE_STRING_H@
-/* Define if `struct text_info' is defined */
+/* Define to 1 if you have the `strtoll' function. */
+#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@
+
+/* Define to 1 if you have the `strtoull' function. */
+#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@
+
+/* Define if struct text_info is defined */
#cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@
-/* Define if `struct videoconfig' is defined */
+/* Define if struct videoconfig is defined */
#cmakedefine H5_HAVE_STRUCT_VIDEOCONFIG @H5_HAVE_STRUCT_VIDEOCONFIG@
/* Define to 1 if you have the `symlink' function. */
@@ -355,10 +383,15 @@
/* Define to 1 if you have the <szlib.h> header file. */
#cmakedefine H5_HAVE_SZLIB_H @H5_HAVE_SZLIB_H@
+#if defined(_WIN32) && !defined(H5_BUILT_AS_DYNAMIC_LIB)
+/* Not supported on WIN32 platforms with static linking */
+/* #undef H5_HAVE_THREADSAFE */
+#else
/* Define if we have thread safe support */
-#cmakedefine H5_HAVE_THREADSAFE @H5_HAVE_THREADSAFE@
+# cmakedefine H5_HAVE_THREADSAFE @H5_HAVE_THREADSAFE@
+#endif
-/* Define if `timezone' is a global variable */
+/* Define if timezone is a global variable */
#cmakedefine H5_HAVE_TIMEZONE @H5_HAVE_TIMEZONE@
/* Define if the ioctl TIOCGETD is defined */
@@ -370,7 +403,7 @@
/* Define to 1 if you have the `tmpfile' function. */
#cmakedefine H5_HAVE_TMPFILE @H5_HAVE_TMPFILE@
-/* Define if `tm_gmtoff' is a member of `struct tm' */
+/* Define if tm_gmtoff is a member of struct tm */
#cmakedefine H5_HAVE_TM_GMTOFF @H5_HAVE_TM_GMTOFF@
/* Define to 1 if you have the <unistd.h> header file. */
@@ -391,7 +424,7 @@
/* Define if your system has window style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@
-/* Define to 1 if you have the <winsock.h> header file. */
+/* Define to 1 if you have the <winsock2.h> header file. */
#cmakedefine H5_HAVE_WINSOCK2_H @H5_HAVE_WINSOCK2_H@
/* Define to 1 if you have the <zlib.h> header file. */
@@ -409,7 +442,7 @@
/* Define if the compiler understands __inline__ */
#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@
-/* Define if HDF5's high-level library headers should be included in hdf5.h */
+/* Define if the high-level library headers should be included in hdf5.h */
#cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@
/* Define if your system can convert long double to (unsigned) long long
@@ -616,6 +649,9 @@
/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@
+/* Define using v1.8 public API symbols by default */
+#cmakedefine H5_USE_18_API_DEFAULT @H5_USE_18_API_DEFAULT@
+
/* Define if a memory checking tool will be used on the library, to cause
library to be very picky about memory operations and also disable the
internal free list manager code. */
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index c95a6f6..0adc31c 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -5,11 +5,11 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
@@ -48,7 +48,11 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${
##################################################################
if(NOT DEFINED INSTALLDIR)
- set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+ if(WIN32)
+ set(INSTALLDIR "C:/Program Files/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@")
+ else()
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+ endif()
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
@@ -70,7 +74,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-0.2.4-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-0.2.10-Source")
#endif()
###############################################################################################################
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index fe38b82..090524a 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -15,6 +15,8 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
# SOVERSION passed in ARGN when shared
if (${libtype} MATCHES "SHARED")
set (PACKAGE_SOVERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION})
+ set (PACKAGE_COMPATIBILITY ${H5_${libpackage}_SOVERS_INTERFACE}.0.0)
+ set (PACKAGE_CURRENT ${H5_${libpackage}_SOVERS_INTERFACE}.${H5_${libpackage}_SOVERS_MINOR}.0)
if (WIN32)
set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
else ()
@@ -26,6 +28,11 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
else ()
set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION})
endif ()
+ if (CMAKE_C_OSX_CURRENT_VERSION_FLAG)
+ set_property(TARGET ${libtarget} APPEND PROPERTY
+ LINK_FLAGS "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${PACKAGE_CURRENT} ${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${PACKAGE_COMPATIBILITY}"
+ )
+ endif ()
endif ()
HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype})
@@ -34,7 +41,6 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
if (HDF5_BUILD_WITH_INSTALL_NAME)
set_target_properties (${libtarget} PROPERTIES
- LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake
new file mode 100644
index 0000000..2b9e48c
--- /dev/null
+++ b/config/cmake/HDF5PluginCache.cmake
@@ -0,0 +1,29 @@
+# This is the CMakeCache file.
+
+########################
+# EXTERNAL cache entries
+########################
+
+# examples are the tests for plugins
+set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable h5pl testing" FORCE)
+set (BUILD_EXAMPLES ON CACHE BOOL "Build h5pl Examples" FORCE)
+
+set (HDF5_HDF5_HEADER "h5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
+set (HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "hdf5 target" FORCE)
+#set (HDF5_INCLUDE_DIR $<TARGET_PROPERTY:${HDF5_LIBSH_TARGET},INCLUDE_DIRECTORIES> CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_INCLUDE_DIR "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_INCLUDE_DIRS "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "hdf5 build folder" FORCE)
+
+set (HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump-shared> CACHE STRING "hdf5 h5dump target" FORCE)
+set (HDF5_REPACK_EXECUTABLE $<TARGET_FILE:h5repack-shared> CACHE STRING "hdf5 h5repack target" FORCE)
+
+set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+
+set (H5PL_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/h5plugin.git" CACHE STRING "Use plugins from HDF repository" FORCE)
+set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE)
+
+set (PL_PACKAGE_NAME "${PLUGIN_PACKAGE_NAME}" CACHE STRING "Name of plugins package" FORCE)
+set (H5PL_CPACK_ENABLE OFF CACHE BOOL "Enable the CPACK include and components" FORCE)
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
new file mode 100644
index 0000000..a858353
--- /dev/null
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -0,0 +1,104 @@
+#-------------------------------------------------------------------------------
+# Plugins must be built SHARED
+#-------------------------------------------------------------------------------
+macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
+ if (${compress_type} MATCHES "GIT")
+ FetchContent_Declare (PLUGIN
+ GIT_REPOSITORY ${PLUGIN_URL}
+ GIT_TAG ${PLUGIN_BRANCH}
+ )
+ elseif (${compress_type} MATCHES "TGZ")
+ FetchContent_Declare (PLUGIN
+ URL ${PLUGIN_URL}
+ URL_HASH ""
+ )
+ endif ()
+ FetchContent_GetProperties(PLUGIN)
+ message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ if(NOT PLUGIN_POPULATED)
+ FetchContent_Populate(PLUGIN)
+ include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake)
+ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+ add_subdirectory(${plugin_SOURCE_DIR} ${plugin_BINARY_DIR})
+ if (ENABLE_BLOSC)
+ add_dependencies (h5blosc ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_blosc ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_blosc PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_BSHUF)
+ add_dependencies (h5bshuf ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_bshuf ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_bshuf PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_BZIP2)
+ add_dependencies (h5bz2 ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_bzip2 ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_bzip2 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_JPEG)
+ add_dependencies (h5jpeg ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_jpeg ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_jpeg PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_LZ4)
+ add_dependencies (h5lz4 ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_lz4 ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_lz4 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_LZF)
+ add_dependencies (h5lzf ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_lzf ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_lzf PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_MAFISC)
+ add_dependencies (h5mafisc ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_mafisc ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_mafisc PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_SZF)
+ add_dependencies (h5szf ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_sz ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_sz PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_ZFP)
+ add_dependencies (h5zfp ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ endif()
+ message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}")
+ set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}")
+ set (PLUGIN_LIBRARY "PLUGIN")
+ set (PLUGIN_FOUND 1)
+endmacro ()
+
+#-------------------------------------------------------------------------------
+macro (FILTER_OPTION plname)
+ string(TOLOWER ${plname} PLUGIN_NAME)
+ option (ENABLE_${plname} "Enable Library Building for ${plname} plugin" ON)
+ if (ENABLE_${plname})
+ option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" 0)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ set (HDF_${plname}_USE_EXTERNAL 1 CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ set (HDF_${plname}_URL ${HDF_${plname}_GIT_URL})
+ set (HDF_${plname}_BRANCH ${HDF_${plname}_GIT_BRANCH})
+ elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT TGZPATH)
+ set (TGZPATH ${H5PL_SOURCE_DIR})
+ endif ()
+ set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
+ endif ()
+ endif ()
+ add_subdirectory (${plname})
+ set_global_variable (H5PL_LIBRARIES_TO_EXPORT "${H5PL_LIBRARIES_TO_EXPORT};${H5${plname}_LIBRARIES_TO_EXPORT}")
+ endif ()
+endmacro ()
+
+#-------------------------------------------------------------------------------
+macro (PACKAGE_PLUGIN_LIBRARY compress_type)
+ if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
+ message (STATUS "Filter PLUGIN is to be packaged")
+ endif ()
+endmacro ()
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
new file mode 100644
index 0000000..e616984
--- /dev/null
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -0,0 +1,483 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+#
+# This file provides functions for HDF5 specific Fortran support.
+#
+#-------------------------------------------------------------------------------
+enable_language (Fortran)
+
+set (HDF_PREFIX "H5")
+include (CheckFortranFunctionExists)
+
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
+
+# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
+macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
+ file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
+ string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
+ set (RETURN_VAR "${SOURCE_CODE}")
+endmacro ()
+
+set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+else ()
+# The provided CMake Fortran macros don't provide a general compile/run function
+# so this one is used.
+#-----------------------------------------------------------------------------
+macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR)
+ message (STATUS "Detecting Fortran ${FUNCTION_NAME}")
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
+ "${SOURCE_CODE}"
+ )
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
+ )
+
+ if (${COMPILE_RESULT_VAR})
+ set(${RETURN_VAR} ${RUN_RESULT_VAR})
+ if (${RUN_RESULT_VAR} MATCHES 0)
+ message (STATUS "Testing Fortran ${FUNCTION_NAME} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Fortran ${FUNCTION_NAME} exists passed\n"
+ )
+ else ()
+ message (STATUS "Testing Fortran ${FUNCTION_NAME} - Fail")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n"
+ )
+ endif ()
+ else ()
+ message (STATUS "Compiling Fortran ${FUNCTION_NAME} - Fail")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n"
+ )
+ set(${RETURN_VAR} ${COMPILE_RESULT_VAR})
+ endif ()
+endmacro ()
+endif ()
+#-----------------------------------------------------------------------------
+# Check to see C_LONG_DOUBLE is available
+
+READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE)
+endif ()
+
+if (${FORTRAN_HAVE_C_LONG_DOUBLE})
+ set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1)
+else ()
+ set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 0)
+endif ()
+
+# Check to see C_LONG_DOUBLE is different from C_DOUBLE
+
+READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE)
+endif ()
+if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
+ set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1)
+else ()
+ set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0)
+endif ()
+
+## Set the sizeof function for use later in the fortran tests
+if (${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
+ set (FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)")
+ set (FC_SIZEOF_B "STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)")
+ set (FC_SIZEOF_C "STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)")
+elseif (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF)
+ set (FC_SIZEOF_A "SIZEOF(a)")
+ set (FC_SIZEOF_B "SIZEOF(b)")
+ set (FC_SIZEOF_C "SIZEOF(c)")
+else ()
+ message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE")
+endif ()
+
+#-----------------------------------------------------------------------------
+# Determine the available KINDs for REALs and INTEGERs
+#-----------------------------------------------------------------------------
+
+#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+set (PROG_SRC_CODE
+ "
+ PROGRAM FC_AVAIL_KINDS
+ IMPLICIT NONE
+ INTEGER :: ik, jk, k, max_decimal_prec
+ INTEGER :: num_rkinds = 1, num_ikinds = 1
+ INTEGER, DIMENSION(1:10) :: list_ikinds = -1
+ INTEGER, DIMENSION(1:10) :: list_rkinds = -1
+
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+
+ ! Find integer KINDs
+ list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
+ DO ik = 2, 36
+ k = SELECTED_INT_KIND(ik)
+ IF(k.LT.0) EXIT
+ IF(k.GT.list_ikinds(num_ikinds))THEN
+ num_ikinds = num_ikinds + 1
+ list_ikinds(num_ikinds) = k
+ ENDIF
+ ENDDO
+
+ DO k = 1, num_ikinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
+ IF(k.NE.num_ikinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ ! Find real KINDs
+ list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
+ max_decimal_prec = 1
+
+ prec: DO ik = 2, 36
+ exp: DO jk = 1, 17000
+ k = SELECTED_REAL_KIND(ik,jk)
+ IF(k.LT.0) EXIT exp
+ IF(k.GT.list_rkinds(num_rkinds))THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ ENDIF
+ max_decimal_prec = ik
+ ENDDO exp
+ ENDDO prec
+
+ DO k = 1, num_rkinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
+ IF(k.NE.num_rkinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ WRITE(8,'(I0)') max_decimal_prec
+ WRITE(8,'(I0)') num_ikinds
+ WRITE(8,'(I0)') num_rkinds
+ END PROGRAM FC_AVAIL_KINDS
+ "
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
+else ()
+FORTRAN_RUN ("REAL and INTEGER KINDs"
+ "${PROG_SRC_CODE}"
+ XX
+ YY
+ FC_AVAIL_KINDS_RESULT
+)
+endif ()
+
+# dnl The output from the above program will be:
+# dnl -- LINE 1 -- valid integer kinds (comma seperated list)
+# dnl -- LINE 2 -- valid real kinds (comma seperated list)
+# dnl -- LINE 3 -- max decimal precision for reals
+# dnl -- LINE 4 -- number of valid integer kinds
+# dnl -- LINE 5 -- number of valid real kinds
+
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_fconftest.out" PROG_OUTPUT)
+# Convert the string to a list of strings by replacing the carriage return with a semicolon
+string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
+
+list (GET PROG_OUTPUT 0 pac_validIntKinds)
+list (GET PROG_OUTPUT 1 pac_validRealKinds)
+list (GET PROG_OUTPUT 2 ${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION)
+
+# If the lists are empty then something went wrong.
+if (NOT pac_validIntKinds)
+ message (FATAL_ERROR "Failed to find available INTEGER KINDs for Fortran")
+endif ()
+if (NOT pac_validRealKinds)
+ message (FATAL_ERROR "Failed to find available REAL KINDs for Fortran")
+endif ()
+if (NOT ${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION)
+ message (FATAL_ERROR "No output from Fortran decimal precision program")
+endif ()
+
+set (PAC_FC_ALL_INTEGER_KINDS "\{${pac_validIntKinds}\}")
+set (PAC_FC_ALL_REAL_KINDS "\{${pac_validRealKinds}\}")
+
+list (GET PROG_OUTPUT 3 NUM_IKIND)
+list (GET PROG_OUTPUT 4 NUM_RKIND)
+
+set (PAC_FORTRAN_NUM_INTEGER_KINDS "${NUM_IKIND}")
+
+set (${HDF_PREFIX}_H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}")
+set (${HDF_PREFIX}_H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)")
+
+message (STATUS "....NUMBER OF INTEGER KINDS FOUND ${PAC_FORTRAN_NUM_INTEGER_KINDS}")
+message (STATUS "....REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
+message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_INTEGER_KINDS}")
+message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION}")
+
+#-----------------------------------------------------------------------------
+# Determine the available KINDs for REALs and INTEGERs
+#-----------------------------------------------------------------------------
+# **********
+# INTEGERS
+# **********
+string (REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
+
+foreach (KIND ${VAR})
+ set (PROG_SRC_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
+ )
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_${KIND}} VALIDINTKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1)
+ string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
+ set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
+endforeach ()
+
+if (pack_int_sizeof STREQUAL "")
+ message (FATAL_ERROR "Failed to find available INTEGER KINDs for Fortran")
+endif ()
+
+string (STRIP ${pack_int_sizeof} pack_int_sizeof)
+
+#Remove trailing comma
+string (REGEX REPLACE ",$" "" pack_int_sizeof "${pack_int_sizeof}")
+#Remove spaces
+string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}")
+
+set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}")
+
+message (STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
+# **********
+# REALS
+# **********
+string (REGEX REPLACE "," ";" VAR "${pac_validRealKinds}")
+
+#find the maximum kind of the real
+list (LENGTH VAR LEN_VAR)
+math (EXPR _LEN "${LEN_VAR}-1")
+list (GET VAR ${_LEN} max_real_fortran_kind)
+
+foreach (KIND ${VAR} )
+ set (PROG_SRC2_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ REAL (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
+ )
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC2_${KIND}} VALIDREALKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1)
+ string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
+ set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
+endforeach ()
+
+if (pack_real_sizeof STREQUAL "")
+ message (FATAL_ERROR "Failed to find available REAL KINDs for Fortran")
+endif ()
+
+string(STRIP ${pack_real_sizeof} pack_real_sizeof)
+
+#Remove trailing comma
+string (REGEX REPLACE ",$" "" pack_real_sizeof "${pack_real_sizeof}")
+#Remove spaces
+string (REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}")
+
+set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)")
+
+message (STATUS "....FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
+
+set (PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
+
+#find the maximum kind of the real
+string (REGEX REPLACE "," ";" VAR "${pack_real_sizeof}")
+list (LENGTH VAR LEN_VAR)
+math (EXPR _LEN "${LEN_VAR}-1")
+list (GET VAR ${_LEN} max_real_fortran_sizeof)
+
+#-----------------------------------------------------------------------------
+# Find sizeof of native kinds
+#-----------------------------------------------------------------------------
+set (PROG_SRC3
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER a
+ REAL b
+ DOUBLE PRECISION c
+ OPEN(8,FILE='pac_sizeof_native_kinds.out',FORM='formatted')
+ WRITE(8,*) ${FC_SIZEOF_A}
+ WRITE(8,*) kind(a)
+ WRITE(8,*) ${FC_SIZEOF_B}
+ WRITE(8,*) kind(b)
+ WRITE(8,*) ${FC_SIZEOF_C}
+ WRITE(8,*) kind(c)
+ CLOSE(8)
+ END
+ "
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC3} PAC_SIZEOF_NATIVE_KINDS_RESULT SRC_EXT f90)
+else ()
+ FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT)
+endif ()
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
+# dnl The output from the above program will be:
+# dnl -- LINE 1 -- sizeof INTEGER
+# dnl -- LINE 2 -- kind of INTEGER
+# dnl -- LINE 3 -- sizeof REAL
+# dnl -- LINE 4 -- kind of REAL
+# dnl -- LINE 5 -- sizeof DOUBLE PRECISION
+# dnl -- LINE 6 -- kind of DOUBLE PRECISION
+
+# Convert the string to a list of strings by replacing the carriage return with a semicolon
+string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
+
+list (GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
+list (GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND)
+list (GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF)
+list (GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND)
+list (GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
+list (GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND)
+
+if (NOT PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE INTEGER KINDs for Fortran")
+endif ()
+if (NOT PAC_FORTRAN_NATIVE_REAL_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE REAL KINDs for Fortran")
+endif ()
+if (NOT PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE DOUBLE KINDs for Fortran")
+endif ()
+if (NOT PAC_FORTRAN_NATIVE_INTEGER_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE INTEGER for Fortran")
+endif ()
+if (NOT PAC_FORTRAN_NATIVE_REAL_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE REAL for Fortran")
+endif ()
+if (NOT PAC_FORTRAN_NATIVE_DOUBLE_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE DOUBLE for Fortran")
+endif ()
+
+
+set (${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
+
+set (${HDF_PREFIX}_H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}")
+
+string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS})
+string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR})
+set (${HDF_PREFIX}_H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)")
+
+string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF})
+string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR})
+set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)")
+
+ENABLE_LANGUAGE (C)
+
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckCSourceRuns)
+else ()
+#-----------------------------------------------------------------------------
+# The provided CMake C macros don't provide a general compile/run function
+# so this one is used.
+#-----------------------------------------------------------------------------
+macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
+ message (STATUS "Detecting C ${FUNCTION_NAME}")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
+ else ()
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif ()
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ ${SOURCE_CODE}
+ )
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ RUN_OUTPUT_VARIABLE OUTPUT_VAR
+ )
+
+ set (${RETURN_VAR} ${OUTPUT_VAR})
+
+ #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
+ #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
+ #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+
+ if (${COMPILE_RESULT_VAR})
+ if (${RUN_RESULT_VAR} MATCHES 1)
+ set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ message (STATUS "Testing C ${FUNCTION_NAME} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
+ "${OUTPUT_VAR}\n\n"
+ )
+ else ()
+ message (STATUS "Testing C ${FUNCTION_NAME} - Fail")
+ set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
+ "${OUTPUT_VAR}\n\n")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
+ endif ()
+endmacro ()
+endif ()
+
+
+# Setting definition if there is a 16 byte fortran integer
+string (FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos)
+if (${pos} EQUAL -1)
+ set (${HDF_PREFIX}_HAVE_Fortran_INTEGER_SIZEOF_16 0)
+else ()
+ set (${HDF_PREFIX}_HAVE_Fortran_INTEGER_SIZEOF_16 1)
+endif ()
diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake
index b108b5b..b042c06 100644
--- a/config/cmake/HDF5_Examples_options.cmake
+++ b/config/cmake/HDF5_Examples_options.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -17,6 +17,7 @@
#### HDF_BUILD_C:BOOL=ON ###
#### HDF_BUILD_CXX:BOOL=OFF ###
#### HDF_BUILD_FORTRAN:BOOL=OFF ###
+#### HDF_BUILD_FILTERS:BOOL=OFF ###
#### BUILD_TESTING:BOOL=OFF ###
#### HDF_ENABLE_PARALLEL:BOOL=OFF ###
#### HDF_ENABLE_THREADSAFE:BOOL=OFF ###
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
new file mode 100644
index 0000000..b0f9e23
--- /dev/null
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -0,0 +1,354 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+set(CMAKE_CXX_STANDARD 98)
+set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
+#-----------------------------------------------------------------------------
+# Compiler specific flags : Shouldn't there be compiler tests for these
+#-----------------------------------------------------------------------------
+if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
+ if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to disable compiler warnings
+#-----------------------------------------------------------------------------
+if (HDF5_DISABLE_COMPILER_WARNINGS)
+ message (STATUS "....Compiler warnings are suppressed")
+ # MSVC uses /w to suppress warnings. It also complains if another
+ # warning level is given, so remove it.
+ if (MSVC)
+ set (HDF5_WARNINGS_BLOCKED 1)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
+ endif ()
+ endif ()
+ if (WIN32)
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
+ endif ()
+
+ # Most compilers use -w to suppress warnings.
+ if (NOT HDF5_WARNINGS_BLOCKED)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# HDF5 library compile options
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# CDash is configured to only allow 3000 warnings, so
+# break into groups (from the config/gnu-flags file)
+#-----------------------------------------------------------------------------
+if (NOT MSVC AND NOT MINGW)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP")
+ else ()
+ # General flags
+ #
+ # Note that some of the flags listed here really should be developer
+ # flags (listed in a separate variable, below) but we put them here
+ # because they are not raised by the current code and we'd like to
+ # know if they do start showing up.
+ #
+ # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+ # warnings that are emitted. If you need it, add it at configure time.
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
+ list (APPEND H5_CXXFLAGS0 "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow")
+ list (APPEND H5_CXXFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED
+ AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ # add the general CXX flags for g++ compiler versions 4.8 and above.
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
+ ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
+ endif ()
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
+ endif ()
+ message (STATUS "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
+ endif ()
+
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to enable developer warnings
+ # Developer warnings (suggestions from gcc, not code problems)
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ message (STATUS "....HDF5 developer group warnings are enabled")
+ # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ # list (APPEND H5_CXXFLAGS0 "-Winline -Wreorder -Wport -Wstrict-aliasing")
+ # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
+ # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ # ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
+ # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ # ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
+ endif ()
+ endif ()
+
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... Only needed for gcc 4.X
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
+ endif ()
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
+ endif ()
+ endif ()
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9")
+ endif ()
+
+ # Append more extra warning flags that only gcc 5.1+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
+ endif ()
+
+ # Append more extra warning flags that only gcc 6.x+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
+ endif ()
+
+ # Append more extra warning flags that only gcc 7.x+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
+ #else ()
+ # ADD_H5_FLAGS (H5_CXXFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
+ endif ()
+ endif ()
+
+ # Append more extra warning flags that only gcc 8.x+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
+ #ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
+ else ()
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
+ endif ()
+ endif ()
+
+ # Append more extra warning flags that only gcc 9.x+ know about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS4 "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ endif ()
+ endif ()
+else ()
+ if (NOT MINGW)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/EHsc")
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable all warnings
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_ALL_WARNINGS)
+ message (STATUS "....All Warnings are enabled")
+ if (MSVC)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/Wall /wd4668")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3")
+ endif ()
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0} ${H5_CXXFLAGS1} ${H5_CXXFLAGS2} ${H5_CXXFLAGS3} ${H5_CXXFLAGS4})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable warnings by groups
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_GROUPZERO_WARNINGS)
+ message (STATUS "....Group Zero warnings are enabled")
+ if (MSVC)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/W1")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable warnings by groups
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_GROUPONE_WARNINGS)
+ message (STATUS "....Group One warnings are enabled")
+ if (MSVC)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/W2")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS1})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable warnings by groups
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_GROUPTWO_WARNINGS)
+ message (STATUS "....Group Two warnings are enabled")
+ if (MSVC)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS2})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable warnings by groups
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
+ message (STATUS "....Group Three warnings are enabled")
+ if (MSVC)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "/W4")
+ endif ()
+ else ()
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS3})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable warnings by groups
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
+ message (STATUS "....Group Four warnings are enabled")
+ if (NOT MSVC)
+ if (CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS4})
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# This is in here to help some of the GCC based IDES like Eclipse
+# and code blocks parse the compiler errors and warnings better.
+#-----------------------------------------------------------------------------
+if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option for --enable-symbols
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_SYMBOLS MATCHES "YES")
+ if(CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+ endif ()
+ endif ()
+elseif (HDF5_ENABLE_SYMBOLS MATCHES "NO")
+ if(CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wl,-s")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option for --enable-profiling
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_PROFILING)
+ if(CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "${PROFILE_CXXFLAGS}")
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option for --enable-optimization
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_OPTIMIZATION)
+ if(CMAKE_CXX_COMPILER_LOADED)
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "${OPTIMIZE_CXXFLAGS}")
+ endif ()
+endif ()
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 56277fa..e4808d2 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -5,53 +5,45 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED TRUE)
+
+set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
+set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
if (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
if (${HDF_CFG_NAME} MATCHES "Debug")
- set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")
endif ()
else ()
- set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
endif ()
endif ()
-if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- if (${HDF_CFG_NAME} MATCHES "Debug")
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
- endif ()
- else ()
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
- endif ()
- endif ()
-endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
#-----------------------------------------------------------------------------
option (HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF)
if (HDF5_DISABLE_COMPILER_WARNINGS)
+ message (STATUS "....Compiler warnings are suppressed")
# MSVC uses /w to suppress warnings. It also complains if another
# warning level is given, so remove it.
if (MSVC)
set (HDF5_WARNINGS_BLOCKED 1)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
endif ()
if (WIN32)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
@@ -65,142 +57,141 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
# Most compilers use -w to suppress warnings.
if (NOT HDF5_WARNINGS_BLOCKED)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
endif ()
endif ()
#-----------------------------------------------------------------------------
+# HDF5 library compile options
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so
# break into groups (from the config/gnu-flags file)
#-----------------------------------------------------------------------------
-if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
- if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set (CMAKE_C_FLAGS_5 "${CMAKE_C_FLAGS_5} -Wcast-qual")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs")
+if (NOT MSVC AND NOT MINGW)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP")
else ()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=%none -DBSD_COMP")
+ # General flags
+ #
+ # Note that some of the flags listed here really should be developer
+ # flags (listed in a separate variable, below) but we put them here
+ # because they are not raised by the current code and we'd like to
+ # know if they do start showing up.
+ #
+ # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+ # warnings that are emitted. If you need it, add it at configure time.
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
+ list (APPEND H5_CFLAGS0 "-Wcomment -Wdeprecated -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith")
+ list (APPEND H5_CFLAGS0 "-Wreturn-type -Wstrict-prototypes -Wuninitialized")
+ list (APPEND H5_CFLAGS0 "-Wunknown-pragmas -Wunused-function -Wunused-variable")
+ # this is just a failsafe
+ list (APPEND H5_CFLAGS0 "-finline-functions")
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
+ list (APPEND H5_CFLAGS0 "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow")
+ list (APPEND H5_CFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings")
+ endif()
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ # Add general CFlags for GCC versions 4.8 and above
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
+ endif ()
+ # gcc automatically inlines based on the optimization level
+ # this is just a failsafe
+ list (APPEND H5_CFLAGS0 "-finline-functions")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
+ list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
+ endif ()
+ message (STATUS "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
endif ()
- #-----------------------------------------------------------------------------
- # Option to allow the user to enable developer warnings
- #-----------------------------------------------------------------------------
- option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
- if (HDF5_ENABLE_DEV_WARNINGS)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winline -Waggregate-return")
- else ()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-inline -Wno-aggregate-return")
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to enable developer warnings
+ # Developer warnings (suggestions from gcc, not code problems)
+ #-----------------------------------------------------------------------------
+ option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ message (STATUS "....HDF5 developer group warnings are enabled")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ list (APPEND H5_CFLAGS0 "-Winline -Wreorder -Wport -Wstrict-aliasing")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
-
- # Append warning flags
- # Don't use the '-Wtraditional' flag, we're way past having K&R C code
- # set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional")
- # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
- # from GCC's assert macro
- # set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional-conversion")
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #set (H5_CFLAGS "${H5_CFLAGS} -Wfloat-equal -Wmissing-format-attribute -Wpadded")
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wfloat-equal -Wmissing-format-attribute")
-
- # Append warning flags from gcc-3.2* case
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wpacked -Wdisabled-optimization")
- if (HDF5_ENABLE_DEV_WARNINGS)
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn")
- else ()
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wno-missing-noreturn")
+ else ()
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
endif ()
+ endif ()
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- set (H5_CFLAGS1_5 "${H5_CFLAGS1_5} -Wformat=2")
-
- # Append warning flags from gcc-3.3* case
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wendif-labels")
-
- # Append warning flags from gcc-3.4* case
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
-
- # Append more extra warning flags that only gcc4.0+ know about
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros")
-
- # Append more extra warning flags that only gcc 4.1+ know about
- set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wunsafe-loop-optimizations")
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wc++-compat")
-
- # Append more extra warning flags that only gcc 4.2+ know about
- set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wstrict-overflow")
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-strict-overflow")
- # Append more extra warning flags that only gcc 4.3+ know about
- #
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wlogical-op -Wlarger-than=2048 -Wvla")
-
- # Append more extra warning flags that only gcc 4.4+ know about
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
-
- # Append more extra warning flags that only gcc 4.5+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
- set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wjump-misses-init -Wunsuffixed-float-constants")
- endif ()
-
- # Append more extra warning flags that only gcc 4.6+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdouble-promotion -Wtrampolines")
- if (HDF5_ENABLE_DEV_WARNINGS)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=const")
- else ()
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=const")
- endif ()
- endif ()
-
- # The "unreachable code" warning appears to be reliable now...
- # (this warning was removed in gcc 4.5+)
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wunreachable-code")
- endif ()
-
- # Append more extra warning flags that only gcc 4.7+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wstack-usage=8192 -Wvector-operation-performance")
- if (HDF5_ENABLE_DEV_WARNINGS)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
- else ()
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn")
- endif ()
+ # we should approach them a bit cautiously... Only needed for gcc 4.X
+ if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
# Append more extra warning flags that only gcc 4.8+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
if (HDF5_ENABLE_DEV_WARNINGS)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=format")
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
else ()
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=format")
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
endif ()
endif ()
# Append more extra warning flags that only gcc 4.9+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdate-time -Wopenmp-simd")
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
endif ()
- # (There was no release of gcc 5.0)
-
- # Append more extra warning flags that only gcc 5.1+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1)
- set (H5_CFLAGS3 "${H5_CFLAGS3} -Warray-bounds=2 -Wc99-c11-compat")
+ # Append more extra warning flags that only gcc 5.x+ know about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
endif ()
# Append more extra warning flags that only gcc 6.x+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
- set (H5_CFLAGS4 "${H5_CFLAGS4} -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa")
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
+ endif ()
+
+ # Append more extra warning flags that only gcc 7.x+ know about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
+ ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
+ #else ()
+ # ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
+ endif ()
endif ()
+ # Append more extra warning flags that only gcc 8.x+ know about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
+ endif ()
+ endif ()
+
+ # Append more extra warning flags that only gcc 9.x+ know about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
+ ADD_H5_FLAGS (H5_CFLAGS4 "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ endif ()
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -208,22 +199,17 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
if (HDF5_ENABLE_ALL_WARNINGS)
+ message (STATUS "....All Warnings are enabled")
if (MSVC)
if (HDF5_ENABLE_DEV_WARNINGS)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /wd4668")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/Wall /wd4668")
else ()
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/W3")
endif ()
else ()
- if (CMAKE_COMPILER_IS_GNUCC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2}")
- endif ()
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0} ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4})
endif ()
endif ()
@@ -232,15 +218,12 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_GROUPZERO_WARNINGS "Enable group zero warnings" OFF)
if (HDF5_ENABLE_GROUPZERO_WARNINGS)
+ message (STATUS "....Group Zero warnings are enabled")
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/W1")
else ()
- if (CMAKE_COMPILER_IS_GNUCC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
- endif ()
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0})
endif ()
endif ()
@@ -249,13 +232,12 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_GROUPONE_WARNINGS "Enable group one warnings" OFF)
if (HDF5_ENABLE_GROUPONE_WARNINGS)
+ message (STATUS "....Group One warnings are enabled")
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/W2")
else ()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS1})
endif ()
endif ()
@@ -264,13 +246,12 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_GROUPTWO_WARNINGS "Enable group two warnings" OFF)
if (HDF5_ENABLE_GROUPTWO_WARNINGS)
+ message (STATUS "....Group Two warnings are enabled")
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/W3")
else ()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS2})
endif ()
endif ()
@@ -279,13 +260,12 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_GROUPTHREE_WARNINGS "Enable group three warnings" OFF)
if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
+ message (STATUS "....Group Three warnings are enabled")
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}")
+ list (APPEND HDF5_CMAKE_C_FLAGS "/W4")
else ()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS3})
endif ()
endif ()
@@ -294,8 +274,9 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF)
if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
+ message (STATUS "....Group Four warnings are enabled")
if (NOT MSVC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS4}")
+ list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS4})
endif ()
endif ()
@@ -306,6 +287,60 @@ endif ()
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
endif ()
-if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
+
+#-----------------------------------------------------------------------------
+# Option for --enable-asserts
+# By default, CMake adds NDEBUG to CMAKE_${lang}_FLAGS for Release build types
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+#option (HDF5_ENABLE_ASSERTS "Determines whether NDEBUG is defined to control assertions." OFF)
+set (HDF5_ENABLE_ASSERTS "OFF" CACHE STRING "Determines whether NDEBUG is defined to control assertions (OFF NO YES)")
+set_property (CACHE HDF5_ENABLE_ASSERTS PROPERTY STRINGS OFF NO YES)
+if (HDF5_ENABLE_ASSERTS MATCHES "YES")
+ add_compile_options ("-UNDEBUG")
+elseif (HDF5_ENABLE_ASSERTS MATCHES "NO")
+ add_compile_options ("-DNDEBUG")
+endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_ASSERTS)
+
+#-----------------------------------------------------------------------------
+# Option for --enable-symbols
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+#option (HDF5_ENABLE_SYMBOLS "Add debug symbols to the library independent of the build mode and optimization level." OFF)
+set (HDF5_ENABLE_SYMBOLS "OFF" CACHE STRING "Add debug symbols to the library independent of the build mode and optimization level (OFF NO YES)")
+set_property (CACHE HDF5_ENABLE_SYMBOLS PROPERTY STRINGS OFF NO YES)
+if (HDF5_ENABLE_SYMBOLS MATCHES "YES")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fno-omit-frame-pointer")
+ endif ()
+elseif (HDF5_ENABLE_SYMBOLS MATCHES "NO")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-s")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
+ endif ()
+endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_SYMBOLS)
+
+#-----------------------------------------------------------------------------
+# Option for --enable-profiling
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_PROFILING "Enable profiling flags independently from the build mode." OFF)
+if (HDF5_ENABLE_PROFILING)
+ list (APPEND HDF5_CMAKE_C_FLAGS "${PROFILE_CFLAGS}")
+endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_PROFILING)
+
+#-----------------------------------------------------------------------------
+# Option for --enable-optimization
+# This option will force/override the default setting for all configurations
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_OPTIMIZATION "Enable optimization flags/settings independently from the build mode" OFF)
+if (HDF5_ENABLE_OPTIMIZATION)
+ list (APPEND HDF5_CMAKE_C_FLAGS "${OPTIMIZE_CFLAGS}")
endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_OPTIMIZATION)
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
new file mode 100644
index 0000000..d133069
--- /dev/null
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -0,0 +1,112 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to disable compiler warnings
+#-----------------------------------------------------------------------------
+if (HDF5_DISABLE_COMPILER_WARNINGS)
+ message (STATUS "....Compiler warnings are suppressed")
+ # MSVC uses /w to suppress warnings. It also complains if another
+ # warning level is given, so remove it.
+ if (MSVC)
+ set (HDF5_WARNINGS_BLOCKED 1)
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /warn:none")
+ endif ()
+ endif ()
+ if (WIN32)
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
+ endif ()
+ # Borland uses -w- to suppress warnings.
+ if (BORLAND)
+ set (HDF5_WARNINGS_BLOCKED 1)
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -w-")
+ endif ()
+
+ # Most compilers use -w to suppress warnings.
+ if (NOT HDF5_WARNINGS_BLOCKED)
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -w")
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# HDF5 library compile options
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# CDash is configured to only allow 3000 warnings, so
+# break into groups (from the config/gnu-flags file)
+#-----------------------------------------------------------------------------
+if (NOT MSVC AND NOT MINGW)
+ # General flags
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand:f03" "-free")
+ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none")
+ if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0 AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008ts")
+ else ()
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008")
+ endif ()
+ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03")
+ endif ()
+ message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
+
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8")
+ endif ()
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.9)
+ # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.9")
+ #endif ()
+
+ # Append more extra warning flags that only gcc 5.x+ know about
+ if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
+ endif ()
+
+ # Append more extra warning flags that only gcc 6.x+ know about
+ if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-6")
+ endif ()
+
+ # Append more extra warning flags that only gcc 7.x+ know about
+ #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0)
+ # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-7")
+ #endif ()
+
+ # Append more extra warning flags that only gcc 8.x+ know about
+ if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-8")
+ endif ()
+
+ # Append more extra warning flags that only gcc 9.x+ know about
+ #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0)
+ # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-9")
+ #endif ()
+ endif ()
+else ()
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
+ #ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "/warn:all" "/stand:f03" "/free")
+ endif ()
+endif ()
+
diff --git a/config/cmake/PkgInfo.in b/config/cmake/PkgInfo.in
index e530f88..ae54035 100644
--- a/config/cmake/PkgInfo.in
+++ b/config/cmake/PkgInfo.in
@@ -1 +1 @@
-FMWK???? \ No newline at end of file
+FMWK????
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index 3e6e249..5465262 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -16,6 +16,18 @@ The contents of this directory are:
README.txt - This file
@HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package
+This binary was built with the ZLIB and SZIP/Libaec external libraries and are
+included for convenience. Libaec is an unrestricted open-source replacement for SZIP
+(version 1.0.4, Encoder ENABLED).
+
+The official ZLIB and SZIP/Libaec pages are at:
+
+ ZLIB: https://git.savannah.gnu.org/cgit/gzip.git/
+ https://git.savannah.gnu.org/cgit/gzip.git/tree/COPYING
+ SZIP/Libaec: https://gitlab.dkrz.de/k202009/libaec
+ https://gitlab.dkrz.de/k202009/libaec/-/blob/master/Copyright.txt
+
+
Installation
===========================================================================
1. Execute @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@
@@ -27,15 +39,16 @@ After Installation
The examples folder, HDF5Examples, located in the
HDF5 install folder, can be built and tested with CMake and the supplied
HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers. Also, the CMake
+been installed in the default location with above compilers (see the
+libhdf5.settings file in the lib install folder). Also, the CMake
utility should be installed.
To test the installation with the examples;
Create a directory to run the examples.
Copy HDF5Examples folder to this directory.
+ Copy CTestScript.cmake to this directory.
Copy HDF518_Examples.cmake to this directory.
Copy HDF5_Examples_options.cmake to this directory.
- Copy CTestScript.cmake to this directory.
The default source folder is defined as "HDF5Examples". It can be changed
with the CTEST_SOURCE_NAME script option.
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
@@ -61,9 +74,6 @@ For more information see USING_CMake_Examples.txt in the install folder.
===========================================================================
Documentation for this release can be found at the following URL:
- http://www.hdfgroup.org/HDF5/doc/.
-
-See the HDF5 home page for further details:
- http://hdfgroup.org/HDF5/
+ https://portal.hdfgroup.org/display/support
Bugs should be reported to help@hdfgroup.org.
diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake
index b6cc513..15cffba 100644
--- a/config/cmake/UserMacros/Windows_MT.cmake
+++ b/config/cmake/UserMacros/Windows_MT.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -14,7 +14,8 @@
########################################################
# To use this option, copy both the macro and option code
-# into the root UserMacros.cmake file.
+# into the root UserMacros.cmake file. Then enable the option,
+# using the command line add "-DBUILD_STATIC_CRT_LIBS:BOOL=ON"
# OR add an include to the root UserMacros.cmake file:
# INCLUDE(path_to_file/WINDOWS_MT.cmake)
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index d5c5e52..fc85277 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -19,8 +19,13 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Framework
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)
+
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+set (HDF5_INSTALL_MOD_FORTRAN "NO" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" FORCE)
+set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC)
+
set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE)
set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
@@ -35,13 +40,141 @@ set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE)
set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
+set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" FORCE)
+
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
+set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-
+set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+
+#######################
+# filter plugin options
+#######################
+set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+
+set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
+
+############
+# bitshuffle
+###########
+
+set (BSHUF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
+set (BSHUF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BSHUF_TGZ_NAME "bitshuffle.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
+
+set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
+
+#######
+# blosc
+#######
+
+set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github" FORCE)
+set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
+
+set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE)
+
+set (ZLIB_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/zlib.git" CACHE STRING "Use ZLIB from HDF repo" FORCE)
+set (ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+#######
+# bzip2
+######
+#
+set (BZ2_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bzip2.git" CACHE STRING "Use BZ2 from HDF repository" FORCE)
+set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BZ2_TGZ_NAME "BZ2.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
+
+set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
+
+#######
+# fpzip
+#######
+
+set (FPZIP_GIT_URL "https://https://github.com/LLNL/fpzip" CACHE STRING "Use FPZIP from github repository" FORCE)
+set (FPZIP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
+
+set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
+
+######
+# jpeg
+######
+
+set (JPEG_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/jpeg.git" CACHE STRING "Use JPEG from HDF repository" FORCE)
+set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE)
+
+#set (JPEG_TGZ_NAME "JPEG9c.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+set (JPEG_TGZ_NAME "JPEG.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+
+set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
+
+######
+# lz4
+######
+
+set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE)
+
+set (LZ4_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lz4.git" CACHE STRING "Use LZ4 from HDF repository" FORCE)
+set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
+
+set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
+
+######
+# lzf
+######
+
+set (LZF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lzf.git" CACHE STRING "Use LZF from HDF repository" FORCE)
+set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
+
+set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
+
+########
+# mafisc
+########
+
+#set (BUILD_MAFISC_LIBRARY_SOURCE OFF CACHE BOOL "build the mafisc library within the plugin" FORCE)
+
+#set (MAFISC_PACKAGE_NAME "mafisc" CACHE STRING "Name of MAFISC package" FORCE)
+
+######
+# szf
+######
+
+set (SZF_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE)
+set (SZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (SZF_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE)
+
+set (SZF_PACKAGE_NAME "szf" CACHE STRING "Name of SZ package" FORCE)
+
+######
+# zfp
+######
+
+set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from Github" FORCE)
+set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
+
+set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
+
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
new file mode 100644
index 0000000..2bbeecc
--- /dev/null
+++ b/config/cmake/fileCompareTest.cmake
@@ -0,0 +1,104 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# fileCompareTest.cmake compares two files.
+
+# arguments checking
+if (NOT TEST_FOLDER)
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_ONEFILE)
+ message (FATAL_ERROR "Require TEST_ONEFILE the first file to be defined")
+endif ()
+if (NOT TEST_TWOFILE)
+ message (FATAL_ERROR "Require TEST_TWOFILE the second file to be defined")
+endif ()
+if (NOT TEST_FUNCTION)
+ message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined")
+endif ()
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif ()
+
+set (TEST_ONE_SIZE 0)
+set (TEST_TWO_SIZE 0)
+set (TEST_ONE_STRING 0)
+set (TEST_TWO_STRING 0)
+set (TEST_ONE_STRING_LEN 0)
+set (TEST_TWO_STRING_LEN 0)
+
+if (TEST_STRINGS STREQUAL "YES")
+ # find the length of the first file
+ #s1=`cat $ufile | wc -c | sed -e 's/ //g'`
+ file (STRINGS ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_STRING)
+ string (LENGTH ${TEST_ONE_STRING} TEST_ONE_STRING_LEN)
+
+ # Get the size of the second file.
+ file (STRINGS ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_STRING)
+ string (LENGTH ${TEST_TWO_STRING} TEST_TWO_STRING_LEN)
+
+ math (EXPR TEST_STRING_SIZE "${TEST_ONE_STRING_LEN} - ${TEST_TWO_STRING_LEN}" )
+
+ # now compare the outputs
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ # if the return value is !=${TEST_EXPECT} bail out
+ if (NOT TEST_RESULT EQUAL TEST_EXPECT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
+ endif ()
+else ()
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ message (FATAL_ERROR "CANNOT get file size, file command SIZE not supported")
+ else ()
+ file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE)
+ file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
+ if (TEST_FUNCTION MATCHES "LT")
+ if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "LTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "EQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GT")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}")
+ endif ()
+ endif ()
+endif ()
+
+# everything went fine...
+
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index 8e16725..8e93dc6 100644
--- a/config/cmake/hdf5-config-version.cmake.in
+++ b/config/cmake/hdf5-config-version.cmake.in
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -21,38 +21,38 @@
set (PACKAGE_VERSION "@HDF5_VERSION_STRING@")
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else ()
- if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@")
+else()
+ if("@H5_VERS_MAJOR@.@H5_VERS_MINOR@" MATCHES "^([0-9]+)\\.([0-9]+)")
+ set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
+ set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
+ else()
+ set(CVF_VERSION_MAJOR "@HDF5_VERSION_STRING@")
+ set(CVF_VERSION_MINOR "")
+ endif()
+
+ if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND
+ (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR))
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ else()
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+ endif()
+
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
- # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
- if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
-
- # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- set (PACKAGE_VERSION_COMPATIBLE TRUE)
-
- if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@")
- set (PACKAGE_VERSION_EXACT TRUE)
-
- if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@")
- # not using this yet
- endif ()
- endif ()
- else ()
- set (PACKAGE_VERSION_COMPATIBLE FALSE)
- endif ()
- endif ()
-endif ()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
-endif ()
+endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif ()
+endif()
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index c4823c7..f7187ec 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -37,13 +37,18 @@ set (${HDF5_PACKAGE_NAME}_ENABLE_F2003 @HDF5_ENABLE_F2003@)
set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE @HDF5_ENABLE_THREADSAFE@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_PLUGIN_SUPPORT @HDF5_ENABLE_PLUGIN_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @H5_ENABLE_SHARED_LIB@)
+set (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS @H5_ENABLE_STATIC_LIB@)
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
+set (${HDF5_PACKAGE_NAME}_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@")
set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
+set (${HDF5_PACKAGE_NAME}_DEFAULT_API_VERSION "@DEFAULT_API_VERSION@")
#-----------------------------------------------------------------------------
# Dependencies
@@ -85,42 +90,48 @@ endif ()
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
-set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+set (${HDF5_PACKAGE_NAME}_VERSION_STRING @HDF5_VERSION_STRING@)
+set (${HDF5_PACKAGE_NAME}_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF5_PACKAGE@")
- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZ_PACKAGE_NAME@/@SZ_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
# Handle default component(static) :
if (NOT ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
+ if (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS)
set (${HDF5_PACKAGE_NAME}_LIB_TYPE)
set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL static)
set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_static_C true)
+ else ()
+ set (${HDF5_PACKAGE_NAME}_LIB_TYPE)
+ set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL shared)
+ set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_shared_C true)
+ endif ()
endif ()
# Handle requested components:
list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
- if (${comp} STREQUAL "shared")
+ if (comp STREQUAL "shared")
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/shared")
endif ()
- elseif (${comp} STREQUAL "static")
+ elseif (comp STREQUAL "static")
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
@@ -132,20 +143,20 @@ endforeach ()
foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
set (hdf5_comp2)
- if (${comp} STREQUAL "C")
+ if (comp STREQUAL "C")
set (hdf5_comp "hdf5")
- elseif (${comp} STREQUAL "CXX")
+ elseif (comp STREQUAL "CXX")
set (hdf5_comp "hdf5_cpp")
- elseif (${comp} STREQUAL "HL")
+ elseif (comp STREQUAL "HL")
set (hdf5_comp "hdf5_hl")
- elseif (${comp} STREQUAL "CXX_HL")
+ elseif (comp STREQUAL "CXX_HL")
set (hdf5_comp "hdf5_hl_cpp")
- elseif (${comp} STREQUAL "Tools")
+ elseif (comp STREQUAL "Tools")
set (hdf5_comp "hdf5_tools")
- elseif (${comp} STREQUAL "Fortran")
+ elseif (comp STREQUAL "Fortran")
set (hdf5_comp2 "hdf5_f90cstub")
set (hdf5_comp "hdf5_fortran")
- elseif (${comp} STREQUAL "Fortran_HL")
+ elseif (comp STREQUAL "Fortran_HL")
set (hdf5_comp2 "hdf5_hl_f90cstub")
set (hdf5_comp "hdf5_hl_fortran")
endif ()
@@ -160,12 +171,12 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
- set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF_PACKAGE_NAMESPACE@${hdf5_comp2}-${libtype} @HDF_PACKAGE_NAMESPACE@${hdf5_comp}-${libtype})
endif ()
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
- set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF_PACKAGE_NAMESPACE@${hdf5_comp}-${libtype})
endif ()
endif ()
endforeach ()
diff --git a/config/cmake/libh5cc.in b/config/cmake/libh5cc.in
index f462d56..f7cab98 100644
--- a/config/cmake/libh5cc.in
+++ b/config/cmake/libh5cc.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index c337dea..4945463 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -1,71 +1,82 @@
- SUMMARY OF THE HDF5 CONFIGURATION
- =================================
+ SUMMARY OF THE HDF5 CONFIGURATION
+ =================================
General Information:
-------------------
HDF5 Version: @HDF5_PACKAGE_VERSION_STRING@
Configured on: @CONFIG_DATE@
Configured by: @CMAKE_GENERATOR@
- Configure mode: CMAKE @CMAKE_VERSION@
Host system: @CMAKE_HOST_SYSTEM@
Uname information: @CMAKE_SYSTEM_NAME@
Byte sex: @BYTESEX@
- Libraries: @BUILD_NAME_EXT@
Installation point: @CMAKE_INSTALL_PREFIX@
Compiling Options:
------------------
- Compilation Mode: @CMAKE_BUILD_TYPE@ @CMAKE_C_COMPILER_VERSION@
- C Compiler: @CMAKE_C_COMPILER@
- CFLAGS: @CMAKE_C_FLAGS@
- H5_CFLAGS: @H5_CFLAGS@
- AM_CFLAGS: @AM_CFLAGS@
- CPPFLAGS: @CPPFLAGS@
- H5_CPPFLAGS: @H5_CPPFLAGS@
- AM_CPPFLAGS: @AM_CPPFLAGS@
- Shared C Library: @H5_ENABLE_SHARED_LIB@
- Static C Library: @H5_ENABLE_STATIC_LIB@
+ Build Mode: @CMAKE_BUILD_TYPE@
+ Debugging Symbols: @HDF5_ENABLE_SYMBOLS@
+ Asserts: @HDF5_ENABLE_ASSERTS@
+ Profiling: @HDF5_ENABLE_PROFILING@
+ Optimization Level: @HDF5_ENABLE_OPTIMIZATION@
+
+Linking Options:
+----------------
+ Libraries: @BUILD_NAME_EXT@
Statically Linked Executables: @BUILD_STATIC_EXECS@
LDFLAGS: @CMAKE_SHARED_LINKER_FLAGS@
+ H5_LDFLAGS: @H5_LDFLAGS@
AM_LDFLAGS: @AM_LDFLAGS@
Extra libraries: @LINK_LIBS@
Archiver: @CMAKE_AR@
Ranlib: @CMAKE_RANLIB@
- Debugged Packages: @DEBUG_PKG@
- API Tracing: @HDF5_ENABLE_TRACE@
Languages:
----------
+ C: YES
+ C Compiler: @CMAKE_C_COMPILER@ @CMAKE_C_COMPILER_VERSION@
+ CPPFLAGS: @CPPFLAGS@
+ H5_CPPFLAGS: @H5_CPPFLAGS@
+ AM_CPPFLAGS: @AM_CPPFLAGS@
+ CFLAGS: @CMAKE_C_FLAGS@
+ H5_CFLAGS: @HDF5_CMAKE_C_FLAGS@
+ AM_CFLAGS: @AM_CFLAGS@
+ Shared C Library: @H5_ENABLE_SHARED_LIB@
+ Static C Library: @H5_ENABLE_STATIC_LIB@
+
Fortran: @HDF5_BUILD_FORTRAN@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HDF5_ENABLE_F2003@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@
+@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: YES
+@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@
C++: @HDF5_BUILD_CPP_LIB@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CMAKE_CXX_FLAGS@
-@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@
+@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@
-@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: YES
+@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@
Features:
---------
- Parallel HDF5: @HDF5_ENABLE_PARALLEL@
- High Level library: @HDF5_BUILD_HL_LIB@
- Threadsafety: @HDF5_ENABLE_THREADSAFE@
- Default API Mapping: @DEFAULT_API_VERSION@
- With Deprecated Public Symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
- I/O filters (external): @EXTERNAL_FILTERS@
- MPE: @H5_HAVE_LIBLMPE@
- Direct VFD: @H5_HAVE_DIRECT@
- dmalloc: @H5_HAVE_LIBDMALLOC@
-Clear file buffers before write: @HDF5_Enable_Clear_File_Buffers@
- Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
- Function Stack Tracing: @HDF5_ENABLE_CODESTACK@
- Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@
- Optimization Instrumentation: @HDF5_Enable_Instrument@
+ Parallel HDF5: @HDF5_ENABLE_PARALLEL@
+ High Level library: @HDF5_BUILD_HL_LIB@
+ Build HDF5 Tests: @BUILD_TESTING@
+ Build HDF5 Tools: @HDF5_BUILD_TOOLS@
+ Threadsafety: @HDF5_ENABLE_THREADSAFE@
+ Default API mapping: @DEFAULT_API_VERSION@
+ With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
+ I/O filters (external): @EXTERNAL_FILTERS@
+ MPE: @H5_HAVE_LIBLMPE@
+ Direct VFD: @H5_HAVE_DIRECT@
+ (Read-Only) S3 VFD: @H5_HAVE_ROS3_VFD@
+ (Read-Only) HDFS VFD: @H5_HAVE_LIBHDFS@
+ dmalloc: @H5_HAVE_LIBDMALLOC@
+ Clear file buffers before write: @HDF5_Enable_Clear_File_Buffers@
+ Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
+ Function Stack Tracing: @HDF5_ENABLE_CODESTACK@
+ Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@
+ Optimization Instrumentation: @HDF5_Enable_Instrument@
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 725777d..3e1ed5c 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -15,12 +15,14 @@
# EXTERNAL cache entries
########################
-set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
+set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace" FORCE)
+
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
@@ -39,7 +41,7 @@ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
@@ -51,11 +53,13 @@ set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
+set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (CTEST_CONFIGURATION_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-
+set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/patch.xml b/config/cmake/patch.xml
index 70571c5..1bdff3e 100644
--- a/config/cmake/patch.xml
+++ b/config/cmake/patch.xml
@@ -1,5 +1,5 @@
<CPackWiXPatch>
- <CPackWiXFragment Id="CM_CP_libraries.bin.hdf5.dll">
+ <CPackWiXFragment Id="CM_CP_libraries.bin.hdf5.dll">
<Environment Id="PATH"
Name="PATH"
Value="[CM_DP_libraries.bin]"
@@ -7,5 +7,5 @@
Part="last"
Action="set"
System="yes"/>
- </CPackWiXFragment>
+ </CPackWiXFragment>
</CPackWiXPatch>
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 670196b..b142ade 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -5,298 +5,381 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
-########################################################
-# This dashboard is maintained by The HDF Group
-# For any comments please contact cdashhelp@hdfgroup.org
-#
-########################################################
-# -----------------------------------------------------------
-# -- Get environment
-# -----------------------------------------------------------
-if (NOT SITE_OS_NAME)
- ## machine name not provided - attempt to discover with uname
- ## -- set hostname
- ## --------------------------
- find_program (HOSTNAME_CMD NAMES hostname)
- exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
- set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
- find_program (UNAME NAMES uname)
- macro (getuname name flag)
- exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
- endmacro ()
-
- getuname (osname -s)
- getuname (osrel -r)
- getuname (cpu -m)
- message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
-
- set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if (SITE_BUILDNAME_SUFFIX)
- set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
- endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
-else ()
- ## machine name provided
- ## --------------------------
- if (CMAKE_HOST_UNIX)
- set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
- else ()
- set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
- endif ()
- if (SITE_BUILDNAME_SUFFIX)
- set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
- endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-endif ()
-
-#-----------------------------------------------------------------------------
-# MAC machines need special option
-#-----------------------------------------------------------------------------
-if (APPLE)
- # Compiler choice
- execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set (ENV{CC} "${XCODE_CC}")
- set (ENV{CXX} "${XCODE_CXX}")
-
- set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif ()
-
-#-----------------------------------------------------------------------------
-set (NEED_REPOSITORY_CHECKOUT 0)
-set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-if (CTEST_USE_TAR_SOURCE)
- ## Uncompress source if tar file provided
- ## --------------------------
- if (WIN32)
- message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else ()
- message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif ()
-
- if (NOT rv EQUAL 0)
- message (STATUS "extracting... [error-(${rv}) clean up]")
- file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
- endif ()
-
- file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
- set (LOCAL_SKIP_UPDATE "TRUE")
-else ()
- if (LOCAL_UPDATE)
- if (CTEST_USE_GIT_SOURCE)
- find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
- set (CTEST_GIT_UPDATE_OPTIONS)
-
- if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set (NEED_REPOSITORY_CHECKOUT 1)
- endif ()
-
- if (${NEED_REPOSITORY_CHECKOUT})
- if (REPOSITORY_BRANCH)
- set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- else ()
- set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- endif ()
- set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
- else ()
- set (CTEST_GIT_options "pull")
- endif ()
- set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
- else ()
- ## --------------------------
- ## use subversion to get source
- #-----------------------------------------------------------------------------
- ## cygwin does not handle the find_package() call
- ## --------------------------
- set (CTEST_UPDATE_COMMAND "SVNCommand")
- if (NOT SITE_CYGWIN})
- find_package (Subversion)
- set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
- set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
- else ()
- set (CTEST_SVN_COMMAND "/usr/bin/svn")
- set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
- endif ()
-
- if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set (NEED_REPOSITORY_CHECKOUT 1)
- endif ()
-
- if (NOT CTEST_REPO_VERSION)
- set (CTEST_REPO_VERSION "HEAD")
- endif ()
- if (${NEED_REPOSITORY_CHECKOUT})
- set (CTEST_CHECKOUT_COMMAND
- "\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
- else ()
- if (CTEST_REPO_VERSION)
- set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
- endif ()
- endif ()
- endif ()
- endif ()
-endif ()
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
- file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-else ()
- ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
-endif ()
-
-# Use multiple CPU cores to build
-include (ProcessorCount)
-ProcessorCount (N)
-if (NOT N EQUAL 0)
- if (NOT WIN32)
- set (CTEST_BUILD_FLAGS -j${N})
- endif ()
- set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif ()
-
-#-----------------------------------------------------------------------------
-# Send the main script as a note.
-list (APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
-)
-
-#-----------------------------------------------------------------------------
-# Check for required variables.
-# --------------------------
-foreach (req
- CTEST_CMAKE_GENERATOR
- CTEST_SITE
- CTEST_BUILD_NAME
- )
- if (NOT DEFINED ${req})
- message (FATAL_ERROR "The containing script must set ${req}")
- endif ()
-endforeach ()
-
-#-----------------------------------------------------------------------------
-# Initialize the CTEST commands
-#------------------------------
-if(CMAKE_GENERATOR_TOOLSET)
- set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
-else ()
- set(CTEST_CONFIGURE_TOOLSET "")
-endif()
-if (LOCAL_MEMCHECK_TEST)
- find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
-else ()
- if (LOCAL_COVERAGE_TEST)
- find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
- endif ()
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
-endif ()
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set ($ENV{LC_MESSAGES} "en_EN")
-
-# Print summary information.
-foreach (v
- CTEST_SITE
- CTEST_BUILD_NAME
- CTEST_SOURCE_DIRECTORY
- CTEST_BINARY_DIRECTORY
- CTEST_CMAKE_GENERATOR
- CTEST_CONFIGURATION_TYPE
- CTEST_GIT_COMMAND
- CTEST_CHECKOUT_COMMAND
- CTEST_CONFIGURE_COMMAND
- CTEST_SCRIPT_DIRECTORY
- CTEST_USE_LAUNCHERS
- )
- set (vars "${vars} ${v}=[${${v}}]\n")
-endforeach ()
-message (STATUS "Dashboard script configuration:\n${vars}\n")
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
- ## NORMAL process
- ## -- LOCAL_UPDATE updates the source folder from svn
- ## -- LOCAL_SUBMIT reports to CDash server
- ## -- LOCAL_SKIP_TEST skips the test process (only builds)
- ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
- ## -- LOCAL_COVERAGE_TEST executes code coverage process
- ## --------------------------
- ctest_start (${MODEL} TRACK ${MODEL})
- if (LOCAL_UPDATE)
- ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
- endif ()
- configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
- ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
- ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Update Configure Notes)
- endif ()
- if (${res} LESS 0 OR ${res} GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
- endif ()
-
- ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Build)
- endif ()
- if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
- endif ()
-
- if (NOT LOCAL_SKIP_TEST)
- if (NOT LOCAL_MEMCHECK_TEST)
- ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Test)
- endif ()
- if (${res} LESS 0 OR ${res} GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
- endif ()
- else ()
- ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS MemCheck)
- endif ()
- endif ()
- if (LOCAL_COVERAGE_TEST)
- ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Coverage)
- endif ()
- endif ()
- endif ()
-
- if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
- ##-----------------------------------------------
- ## Package the product
- ##-----------------------------------------------
- execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if (cpackResult GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
- endif ()
- endif ()
-#-----------------------------------------------------------------------------
+cmake_minimum_required (VERSION 3.12)
+########################################################
+# This dashboard is maintained by The HDF Group
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+########################################################
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+if (NOT SITE_OS_NAME)
+ ## machine name not provided - attempt to discover with uname
+ ## -- set hostname
+ ## --------------------------
+ find_program (HOSTNAME_CMD NAMES hostname)
+ exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program (UNAME NAMES uname)
+ macro (getuname name flag)
+ exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro ()
+
+ getuname (osname -s)
+ getuname (osrel -r)
+ getuname (cpu -m)
+ message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+else ()
+ ## machine name provided
+ ## --------------------------
+ if (CMAKE_HOST_UNIX)
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+ else ()
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+ endif ()
+endif ()
+if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+endif ()
+set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+
+# Launchers work only with Makefile and Ninja generators.
+if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja")
+ set(CTEST_USE_LAUNCHERS 0)
+ set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF")
+else()
+ set(CTEST_USE_LAUNCHERS 1)
+ set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON")
+endif()
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if (APPLE)
+ # Compiler choice
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
+
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
+
+#-----------------------------------------------------------------------------
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
+ ## Uncompress source if tar file provided
+ ## --------------------------
+ if (WIN32 AND NOT MINGW)
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else ()
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif ()
+
+ if (NOT rv EQUAL 0)
+ message (STATUS "extracting... [error-(${rv}) clean up]")
+ file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+ endif ()
+
+ file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set (LOCAL_SKIP_UPDATE "TRUE")
+else ()
+ if (LOCAL_UPDATE)
+ if (CTEST_USE_GIT_SOURCE)
+ find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
+ set (CTEST_GIT_UPDATE_OPTIONS)
+
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
+
+ if (${NEED_REPOSITORY_CHECKOUT})
+ if (REPOSITORY_BRANCH)
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ else ()
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ endif ()
+ set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
+ else ()
+ set (CTEST_GIT_options "pull")
+ endif ()
+ set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+ else ()
+ ## --------------------------
+ ## use subversion to get source
+ #-----------------------------------------------------------------------------
+ ## cygwin does not handle the find_package() call
+ ## --------------------------
+ set (CTEST_UPDATE_COMMAND "SVNCommand")
+ if (NOT SITE_CYGWIN})
+ find_package (Subversion)
+ set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ else ()
+ set (CTEST_SVN_COMMAND "/usr/bin/svn")
+ set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
+ endif ()
+
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
+
+ if (NOT CTEST_REPO_VERSION)
+ set (CTEST_REPO_VERSION "HEAD")
+ endif ()
+ if (${NEED_REPOSITORY_CHECKOUT})
+ set (CTEST_CHECKOUT_COMMAND
+ "\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
+ else ()
+ if (CTEST_REPO_VERSION)
+ set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
+ endif ()
+ endif ()
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
+ file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
+ ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+endif ()
+
+# Use multiple CPU cores to build
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+ if (MAX_PROC_COUNT)
+ if (N GREATER MAX_PROC_COUNT)
+ set (N ${MAX_PROC_COUNT})
+ endif ()
+ endif ()
+ if (NOT WIN32)
+ set (CTEST_BUILD_FLAGS -j${N})
+ endif ()
+ set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
+
+#-----------------------------------------------------------------------------
+# Send the main script as a note.
+list (APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+)
+
+#-----------------------------------------------------------------------------
+# Check for required variables.
+# --------------------------
+foreach (req
+ CTEST_CMAKE_GENERATOR
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ )
+ if (NOT DEFINED ${req})
+ message (FATAL_ERROR "The containing script must set ${req}")
+ endif ()
+endforeach ()
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+if (CMAKE_GENERATOR_TOOLSET)
+ set (CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+else ()
+ set (CTEST_CONFIGURE_TOOLSET "")
+endif()
+if (CMAKE_GENERATOR_ARCHITECTURE)
+ set (CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}")
+else ()
+ set (CTEST_CONFIGURE_ARCHITECTURE "")
+endif()
+if (LOCAL_MEMCHECK_TEST)
+ if(LOCAL_USE_VALGRIND)
+ set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ endif()
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+else ()
+ if (LOCAL_COVERAGE_TEST)
+ if(LOCAL_USE_GCOV)
+ find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
+ endif ()
+ endif ()
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set ($ENV{LC_MESSAGES} "en_EN")
+
+# Print summary information.
+foreach (v
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ CTEST_SOURCE_DIRECTORY
+ CTEST_BINARY_DIRECTORY
+ CTEST_CMAKE_GENERATOR
+ CTEST_CONFIGURATION_TYPE
+ CTEST_GIT_COMMAND
+ CTEST_CHECKOUT_COMMAND
+ CTEST_CONFIGURE_COMMAND
+ CTEST_SCRIPT_DIRECTORY
+ CTEST_USE_LAUNCHERS
+ )
+ set (vars "${vars} ${v}=[${${v}}]\n")
+endforeach ()
+message (STATUS "Dashboard script configuration:\n${vars}\n")
+
+#-----------------------------------------------------------------------------
+
+###################################################################
+######### Following is for submission to CDash ############
+###################################################################
+if (NOT DEFINED MODEL)
+ set (MODEL "Experimental")
+endif ()
+
+#-----------------------------------------------------------------------------
+ ## NORMAL process
+ ## -- LOCAL_UPDATE updates the source folder from svn
+ ## -- LOCAL_SUBMIT reports to CDash server
+ ## -- LOCAL_SKIP_TEST skips the test process (only builds)
+ ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
+ ## -- LOCAL_COVERAGE_TEST executes code coverage process
+ ## --------------------------
+ ctest_start (${MODEL} TRACK ${MODEL})
+ if (LOCAL_UPDATE)
+ ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+ endif ()
+ configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+ ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Update Configure Notes)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+ endif ()
+
+ # On Cray XC40, configuring fails in the Fortran section when using the craype-mic-knl module.
+ # When the configure phase is done with the craype-haswell module and the build phase is done
+ # with the craype-mic-knl module, configure succeeds and tests pass on the knl compute nodes
+ # for Intel, Cray, GCC and Clang compilers. If the variables aren't set or if not
+ # cross compiling, the module switch will not occur.
+ if (CMAKE_CROSSCOMPILING AND COMPILENODE_HWCOMPILE_MODULE AND COMPUTENODE_HWCOMPILE_MODULE)
+ execute_process (COMMAND module switch ${COMPILENODE_HWCOMPILE_MODULE} ${COMPUTENODE_HWCOMPILE_MODULE})
+ endif ()
+
+ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Build)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+ endif ()
+
+ if (NOT LOCAL_SKIP_TEST)
+ if (NOT LOCAL_MEMCHECK_TEST)
+ if (NOT LOCAL_BATCH_TEST)
+ ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+ else ()
+ file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$")
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
+ else ()
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestS.out)
+ else ()
+ execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
+ endif()
+ endif ()
+ message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml")
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ while(result)
+ ctest_sleep(60)
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ endwhile(result)
+ if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+ endif ()
+ message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for serial tests. Renaming to SerialTest.xml")
+ file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml)
+ file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log)
+ unset(result CACHE)
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
+ else ()
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestP.out)
+ else ()
+ execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
+ endif ()
+ endif ()
+ message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml")
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ while(result)
+ ctest_sleep(60)
+ execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+ endwhile(result)
+ message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for parallel tests.")
+ endif()
+ endif ()
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
+ else ()
+ ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS MemCheck)
+ endif ()
+ endif ()
+ if (LOCAL_COVERAGE_TEST)
+ ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Coverage)
+ endif ()
+ endif ()
+ endif ()
+
+ if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
+ ##-----------------------------------------------
+ ## Package the product
+ ##-----------------------------------------------
+ execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE cpackResult
+ OUTPUT_VARIABLE cpackLog
+ ERROR_VARIABLE cpackLog.err
+ )
+ file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ if (cpackResult GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
+ endif ()
+ endif ()
+#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index b811e80..63fa9c1 100755
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -5,236 +5,260 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-#############################################################################################
-### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ###
-### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf518.log ###
-#############################################################################################
-
-cmake_minimum_required (VERSION 3.10)
-############################################################################
-# Usage:
-# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
-# where valid options for OPTION are:
-# BUILD_GENERATOR - The cmake build generator:
-# Unix * Unix Makefiles
+### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf518.log ###
+#############################################################################################
+
+cmake_minimum_required (VERSION 3.12)
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# MinGW * MinGW Makefiles
+# Unix * Unix Makefiles
+# VS2019 * Visual Studio 16 2019
+# VS201964 * Visual Studio 16 2019
# VS2017 * Visual Studio 15 2017
# VS201764 * Visual Studio 15 2017 Win64
-# VS2015 * Visual Studio 14 2015
-# VS201564 * Visual Studio 14 2015 Win64
-# VS2013 * Visual Studio 12 2013
-# VS201364 * Visual Studio 12 2013 Win64
-#
-# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
-# CTEST_SOURCE_NAME - source folder
-##############################################################################
-
-set (CTEST_SOURCE_VERSION "1.8.21")
-set (CTEST_SOURCE_VERSEXT "")
-
-##############################################################################
-# handle input parameters to script.
-#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.x
-if (DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach (current_var ${script_args})
- if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif ()
- endforeach ()
-endif ()
-
-# build generator must be defined
-if (NOT DEFINED BUILD_GENERATOR)
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+#
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+##############################################################################
+
+set (CTEST_SOURCE_VERSION "1.8.22")
+set (CTEST_SOURCE_VERSEXT "")
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.8 root folder
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.x
+#MODEL - CDash group name
+#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
+#MPI - enable MPI
+if (DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach (current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif ()
+ endforeach ()
+endif ()
+
+#HPC - run alternate configurations for HPC machines
+if (DEFINED HPC)
+ set (BUILD_GENERATOR "Unix")
+endif ()
+
+# build generator must be defined
+if (NOT DEFINED BUILD_GENERATOR)
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
-endif ()
-
-###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+endif ()
+
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
### (default use command line -C value)
-set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
-###################################################################
-
-if (NOT DEFINED INSTALLDIR)
- if (WIN32)
- set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- else ()
- set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- endif ()
-endif ()
-if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set (CTEST_CONFIGURATION_TYPE "Release")
-endif ()
-if (NOT DEFINED CTEST_SOURCE_NAME)
- set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
-endif ()
-
-set (CTEST_BINARY_NAME "build")
-set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
-if (WIN32)
- set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else ()
- set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif ()
-
-###################################################################
-######### Following describes compiler ############
-if (WIN32)
- set (SITE_OS_NAME "Windows")
- set (SITE_OS_VERSION "WIN7")
- if (${BUILD_GENERATOR} STREQUAL "VS201764")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2017")
- set (SITE_COMPILER_VERSION "15")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2017")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2017")
- set (SITE_COMPILER_VERSION "15")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201564")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2015")
- set (SITE_COMPILER_VERSION "14")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2015")
- set (SITE_COMPILER_VERSION "14")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2013")
- set (SITE_COMPILER_VERSION "12")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2013")
- set (SITE_COMPILER_VERSION "12")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2012")
- set (SITE_COMPILER_VERSION "11")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2012")
- set (SITE_COMPILER_VERSION "11")
+set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+###################################################################
+
+if (NOT DEFINED INSTALLDIR)
+ if (WIN32)
+ set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+ else ()
+ set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+ endif ()
+endif ()
+if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set (CTEST_CONFIGURATION_TYPE "Release")
+endif ()
+if (NOT DEFINED CTEST_SOURCE_NAME)
+ set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif ()
+
+set (CTEST_BINARY_NAME "build")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
+if (WIN32 AND NOT MINGW)
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+else ()
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+endif ()
+
+###################################################################
+######### Following describes compiler ############
+if (NOT DEFINED HPC)
+ if (NOT DEFINED BUILD_GENERATOR)
+ message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
+ endif ()
+ if (WIN32 AND NOT MINGW)
+ set (SITE_OS_NAME "Windows")
+ set (SITE_OS_VERSION "WIN10")
+ if (BUILD_GENERATOR STREQUAL "VS201964")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
+ set (CMAKE_GENERATOR_ARCHITECTURE "x64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2019")
+ set (SITE_COMPILER_VERSION "16")
+ elseif (BUILD_GENERATOR STREQUAL "VS2019")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
+ set (CMAKE_GENERATOR_ARCHITECTURE "Win32")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2019")
+ set (SITE_COMPILER_VERSION "16")
+ elseif (BUILD_GENERATOR STREQUAL "VS201764")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2017")
+ set (SITE_COMPILER_VERSION "15")
+ elseif (BUILD_GENERATOR STREQUAL "VS2017")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2017")
+ set (SITE_COMPILER_VERSION "15")
+ elseif (BUILD_GENERATOR STREQUAL "VS201564")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (BUILD_GENERATOR STREQUAL "VS2015")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (BUILD_GENERATOR STREQUAL "VS201364")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (BUILD_GENERATOR STREQUAL "VS2013")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (BUILD_GENERATOR STREQUAL "VS201264")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
+ elseif (BUILD_GENERATOR STREQUAL "VS2012")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
+ else ()
+ message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
+ endif ()
+ ## Set the following to unique id your computer ##
+ set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
+ else ()
+ if (MINGW)
+ set (CTEST_CMAKE_GENERATOR "MinGW Makefiles")
+ else ()
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ endif ()
+ ## Set the following to unique id your computer ##
+ if (APPLE)
+ set (CTEST_SITE "MAC.XXXX")
+ else ()
+ set (CTEST_SITE "LINUX.XXXX")
+ endif ()
+ if (APPLE)
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
+ set (CTEST_USE_LAUNCHERS 1)
+ endif ()
+ endif ()
+else ()
+ set (CTEST_SITE "${SITE_OS_NAME}")
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+endif ()
+###################################################################
+
+###################################################################
+##### Following controls CDash submission #####
+#set (LOCAL_SUBMIT "TRUE")
+##### Following controls test process #####
+#set (LOCAL_SKIP_TEST "TRUE")
+#set (LOCAL_MEMCHECK_TEST "TRUE")
+#set (LOCAL_COVERAGE_TEST "TRUE")
+##### Following controls cpack command #####
+#set (LOCAL_NO_PACKAGE "TRUE")
+##### Following controls source update #####
+#set (LOCAL_UPDATE "TRUE")
+set (REPOSITORY_URL "https://github.com/HDFGroup/hdf5.git")
+set (REPOSITORY_BRANCH "hdf5_1_8")
+
+#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
+#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
+###################################################################
+
+
+###################################################################
+
+if (WIN32 AND NOT MINGW)
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
+ include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
+ include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+else ()
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+ include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
+ if (DEFINED HPC)
+ include (${CTEST_SOURCE_DIRECTORY}/config/cmake/scripts/HPC/${HPC}-HDF5options.cmake)
+ endif ()
+ include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+ if (APPLE)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
else ()
- message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
+ if (CYGWIN)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ else ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ endif ()
endif ()
-## Set the following to unique id your computer ##
- set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
-else ()
- set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
-## Set the following to unique id your computer ##
- if (APPLE)
- set (CTEST_SITE "MAC.XXXX")
- else ()
- set (CTEST_SITE "LINUX.XXXX")
- endif ()
- if (APPLE)
- execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set (ENV{CC} "${XCODE_CC}")
- set (ENV{CXX} "${XCODE_CXX}")
- set (CTEST_USE_LAUNCHERS 1)
- set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
- set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
- set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
- set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
- set (RR_FLAGS_C "${RR_FLAGS_COMMON}")
- set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
- set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
- set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
- endif ()
-endif ()
-###################################################################
-
-###################################################################
-######### Following is for submission to CDash ############
-###################################################################
-set (MODEL "Experimental")
-###################################################################
-
-###################################################################
-##### Following controls CDash submission #####
-#set (LOCAL_SUBMIT "TRUE")
-##### Following controls test process #####
-#set (LOCAL_SKIP_TEST "TRUE")
-#set (LOCAL_MEMCHECK_TEST "TRUE")
-#set (LOCAL_COVERAGE_TEST "TRUE")
-##### Following controls cpack command #####
-#set (LOCAL_NO_PACKAGE "TRUE")
-##### Following controls source update #####
-#set (LOCAL_UPDATE "TRUE")
-set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
-set (REPOSITORY_BRANCH "hdf5_1_8_21")
-
-#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
-###################################################################
-
-
-###################################################################
-
-if (WIN32)
- set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
- include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
- include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
-else ()
- set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
- include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
- include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
- if (APPLE)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- else ()
- if (CYGWIN)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- else ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- endif ()
- endif ()
-endif ()
+endif ()
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 23477ff..943822c 100644
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -17,13 +17,19 @@
### uncomment/comment and change the following lines for other configuration options
#############################################################################################
+#### maximum parallel processor count for build and test ####
+#set (MAX_PROC_COUNT 8)
+
+#############################################################################################
#### alternate toolsets ####
-#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+#set (CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
#############################################################################################
#### Only build static libraries ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
-#### Add PICC option on linux/mac ####
+#### Only build shared libraries ####
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DONLY_SHARED_LIBS:BOOL=OFF")
+#### Add PIC option on linux/mac ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
#############################################################################################
@@ -44,29 +50,56 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTA
#### ext libraries ####
### ext libs from tgz
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
### ext libs from git
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
### ext libs on system
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO")
+#set(ENV{ZLIB_ROOT} "some_location")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
+#set(ENV{SZIP_ROOT} "some_location")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+
+### disable using ext zlib
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
+### disable using ext szip
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
+
+#### package examples ####
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-0.2.11-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
+
+#############################################################################################
+### enable parallel builds
+if (DEFINED MPI)
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
+endif()
+#############################################################################################
+### enable thread-safety builds
-### disable ext zlib building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
-### disable ext szip building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_HL_LIB:BOOL=OFF")
#############################################################################################
### disable test program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
#############################################################################################
### disable packaging
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
### Create install package with external libraries (szip, zlib)
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+
+#############################################################################################
+### use a toolchain file
+
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake")
#############################################################################################
diff --git a/config/cmake/scripts/HPC/bsub-HDF5options.cmake b/config/cmake/scripts/HPC/bsub-HDF5options.cmake
new file mode 100644
index 0000000..37fdb8b
--- /dev/null
+++ b/config/cmake/scripts/HPC/bsub-HDF5options.cmake
@@ -0,0 +1,31 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_COMMAND "bsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (LOCAL_BATCH_SCRIPT_NAME "ctestS.lsf")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.lsf")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=srun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
diff --git a/config/cmake/scripts/HPC/qsub-HDF5options.cmake b/config/cmake/scripts/HPC/qsub-HDF5options.cmake
new file mode 100644
index 0000000..fe33546
--- /dev/null
+++ b/config/cmake/scripts/HPC/qsub-HDF5options.cmake
@@ -0,0 +1,42 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_NAME "ctest.qsub")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctest.qsub")
+if (DEFINED KNL)
+ ### some additions and alternatives to cross compile on haswell for knl
+ set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
+endif ()
+set (LOCAL_BATCH_SCRIPT_COMMAND "qsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=aprun")
+# Option to suppress writing job statistics; to avoid issues with h5diff comparisons.
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_PREFLAGS:STRING=-q")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DACCOUNT_ID:STRING=${LOCAL_BATCH_SCRIPT_ARGS}")
+
+#############################################################################################
+#############################################################################################
diff --git a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake
new file mode 100644
index 0000000..89ce4f0
--- /dev/null
+++ b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake
@@ -0,0 +1,32 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_COMMAND "raybsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (LOCAL_BATCH_SCRIPT_NAME "ray_ctestS.lsf")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ray_ctestP.lsf")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_COMMAND:STRING=${LOCAL_BATCH_SCRIPT_COMMAND}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=mpirun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-np")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
diff --git a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake
new file mode 100644
index 0000000..ddf4858
--- /dev/null
+++ b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake
@@ -0,0 +1,43 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+if (DEFINED KNL)
+ ### some additions and alternatives to cross compile on haswell for knl
+ set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
+ set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
+ set (LOCAL_BATCH_SCRIPT_NAME "knl_ctestS.sl")
+ set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "knl_ctestP.sl")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
+else ()
+ set (LOCAL_BATCH_SCRIPT_NAME "ctestS.sl")
+ set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.sl")
+endif ()
+set (LOCAL_BATCH_SCRIPT_COMMAND "sbatch")
+set (LOCAL_BATCH_TEST "TRUE")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=srun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
+
+#############################################################################################
+#############################################################################################
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 9af7e5b..e6a278c 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -20,7 +20,7 @@ if (NOT TEST_GET_PROGRAM)
message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined")
endif ()
if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_HFILE)
message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined")
@@ -54,15 +54,15 @@ if (TEST_CHECKUB STREQUAL "YES")
# 'tellub' calls H5Fget_user_block to get the size
# of the user block
#s2=`$JAM_BIN/tellub $origfile`
- EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_OFILE}
+ execute_process (
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_HFILE}.len.txt
OUTPUT_VARIABLE TEST_OUT
ERROR_VARIABLE TEST_ERROR
)
- if (NOT ${TEST_RESULT} STREQUAL "0")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
endif ()
file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
@@ -70,10 +70,10 @@ if (TEST_CHECKUB STREQUAL "YES")
math( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
- if (NOT TEST_O_STRING_LEN STREQUAL "0")
+ if (TEST_O_STRING_LEN)
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
- EXECUTE_PROCESS (
- COMMAND ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
+ execute_process (
+ COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_HFILE}-ub.cmp
@@ -90,8 +90,8 @@ if (TEST_CHECKUB STREQUAL "YES")
endif ()
#$JAM_BIN/getub -c $size $hfile > $tfile
- EXECUTE_PROCESS (
- COMMAND ${TEST_GET_PROGRAM} -c ${TEST_STRING_SIZE} ${TEST_HFILE}
+ execute_process (
+ COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_STRING_SIZE} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_HFILE}.cmp
@@ -101,31 +101,31 @@ if (TEST_CHECKUB STREQUAL "YES")
)
# now compare the outputs
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
RESULT_VARIABLE TEST_RESULT
)
message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}")
# if the return value is !=${TEST_EXPECT} bail out
- if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ if (NOT TEST_RESULT EQUAL TEST_EXPECT)
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
endif ()
else ()
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
- EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_HFILE}
+ execute_process (
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_H_STRING_LEN
OUTPUT_VARIABLE TEST_OUT
ERROR_VARIABLE TEST_ERROR
)
- if (NOT TEST_H_STRING_LEN STREQUAL "0")
+ if (TEST_H_STRING_LEN)
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
endif ()
endif ()
# everything went fine...
-message ("Passed: The output of CHECK matched expectation")
+message (STATUS "Passed: The output of CHECK matched expectation")
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index 66a97c0..f5a4e3e 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -17,32 +17,32 @@ if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
endif ()
if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_VFD)
message (FATAL_ERROR "Require TEST_VFD to be defined")
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
# if there is not an error reference file add the error output to the stdout file
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif ()
+#if (NOT TEST_ERRREF)
+# set (ERROR_APPEND 1)
+#endif ()
-message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}")
set (ENV{HDF5_DRIVER} "${TEST_VFD}")
# run the test program, capture the stdout/stderr and the result var
execute_process (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_OUTPUT}_${TEST_VFD}.out
@@ -54,17 +54,17 @@ execute_process (
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
-if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
+if (ERROR_APPEND AND EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}")
endif ()
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
- if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out)
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM)
- message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}")
+ message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}")
endif ()
endif ()
message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
@@ -73,4 +73,4 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
# everything went fine...
-message ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
+message (STATUS "Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake
new file mode 100644
index 0000000..b778765
--- /dev/null
+++ b/config/cmake/wait_H5Tinit.cmake
@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 3.12)
+
+message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
+execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)
+while(H5TI_result)
+ ctest_sleep(30)
+ message(STATUS "Checking again for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
+ execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)
+endwhile(H5TI_result)
+file (TOUCH "${HDF5_BINARY_DIR}/H5Tinit_created")
+message(STATUS "Found ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake
index 025bce4..2d72e8d 100644
--- a/config/cmake_ext_mod/CTestCustom.cmake
+++ b/config/cmake_ext_mod/CTestCustom.cmake
@@ -1,16 +1,17 @@
set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
-
+
set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
- "note.*expected.*void.*but argument is of type.*volatile"
- "SZIP.src.*:[ \t]*warning"
- "jpeg.src.*:[ \t]*warning"
- "POSIX name for this item is deprecated"
- "disabling jobserver mode"
- "warning.*implicit declaration of function"
- "note: expanded from macro"
+ ".*note.*expected.*void.*but argument is of type.*volatile.*"
+ ".*src.SZIP.*:[ \t]*warning.*"
+ ".*src.ZLIB.*:[ \t]*warning.*"
+ ".*src.JPEG.*:[ \t]*warning.*"
+ ".*POSIX name for this item is deprecated.*"
+ ".*disabling jobserver mode.*"
+ ".*warning.*implicit declaration of function.*"
+ ".*note: expanded from macro.*"
)
-
+
set (CTEST_CUSTOM_MEMCHECK_IGNORE
${CTEST_CUSTOM_MEMCHECK_IGNORE}
)
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 3797768..c654702 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -14,17 +14,13 @@
#-----------------------------------------------------------------------------
include (CheckFunctionExists)
include (CheckIncludeFile)
-include (CheckIncludeFileCXX)
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckSymbolExists)
include (CheckTypeSize)
include (CheckVariableExists)
-include (CheckFortranFunctionExists)
include (TestBigEndian)
-if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED)
- include (TestForSTDNamespace)
-endif ()
+include (CheckStructHasMember)
#-----------------------------------------------------------------------------
# APPLE/Darwin setup
@@ -33,7 +29,7 @@ if (APPLE)
list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
if (ARCH_LENGTH GREATER 1)
set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
- message(FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
+ message (FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
"due to technical reasons. The best approach would be build each architecture in separate directories"
"and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
"variable has been set to a blank value which will build the default architecture for this system.")
@@ -66,17 +62,18 @@ endmacro ()
# ----------------------------------------------------------------------
# WINDOWS Hard code Values
# ----------------------------------------------------------------------
-
set (WINDOWS)
-if (WIN32)
- if (MINGW)
- set (${HDF_PREFIX}_HAVE_MINGW 1)
- set (WINDOWS 1) # MinGW tries to imitate Windows
- set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- endif ()
- set (${HDF_PREFIX}_HAVE_WIN32_API 1)
- set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
- if (NOT UNIX AND NOT MINGW)
+
+if (MINGW)
+ set (${HDF_PREFIX}_HAVE_MINGW 1)
+ set (WINDOWS 1) # MinGW tries to imitate Windows
+ set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
+ set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
+ set (__USE_MINGW_ANSI_STDIO 1)
+endif ()
+
+if (WIN32 AND NOT MINGW)
+ if (NOT UNIX)
set (WINDOWS 1)
set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
if (MSVC)
@@ -86,34 +83,102 @@ if (WIN32)
endif ()
if (WINDOWS)
- set (${HDF_PREFIX}_HAVE_STDDEF_H 1)
- set (${HDF_PREFIX}_HAVE_SYS_STAT_H 1)
- set (${HDF_PREFIX}_HAVE_SYS_TYPES_H 1)
+ set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
+ set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
set (${HDF_PREFIX}_HAVE_SYSTEM 1)
set (${HDF_PREFIX}_HAVE_LONGJMP 1)
if (NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
+ set (${HDF_PREFIX}_HAVE_FUNCTION 1)
endif ()
- if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+ if (NOT UNIX AND NOT CYGWIN)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
+ set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
+ set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
+ set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
+ set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
endif ()
- set (${HDF_PREFIX}_HAVE_FUNCTION 1)
- set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
- set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
- set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
- if (MINGW)
- set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
- endif ()
- set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
- set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
endif ()
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
+if (NOT WINDOWS)
+ TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Check IF header file exists and add it to the list.
+#-----------------------------------------------------------------------------
+macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
+ CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
+ if (${VARIABLE})
+ set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
+ endif ()
+endmacro ()
+
+#-----------------------------------------------------------------------------
+# Check for the existence of certain header files
+#-----------------------------------------------------------------------------
+CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
+CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
+CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
+
+# Darwin
+CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
+
+# Windows
+CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
+if (NOT CYGWIN)
+ CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
+endif ()
+CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
+
+if (CMAKE_SYSTEM_NAME MATCHES "OSF")
+ CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
+ CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
+else ()
+ set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
+ set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
+endif ()
+
+CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
+CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
+CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
+CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H)
+CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H)
+CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H)
+CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
+# _Bool type support
+CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
+
+## Check for non-standard extenstion quadmath.h
+
+CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH)
+if (${C_HAVE_QUADMATH})
+ set(${HDF_PREFIX}_HAVE_QUADMATH_H 1)
+else ()
+ set(${HDF_PREFIX}_HAVE_QUADMATH_H 0)
+endif ()
+
if (CYGWIN)
set (${HDF_PREFIX}_HAVE_LSEEK64 0)
endif ()
@@ -121,7 +186,7 @@ endif ()
#-----------------------------------------------------------------------------
# Check for the math library "m"
#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
+if (MINGW OR NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil ${HDF_PREFIX}_HAVE_LIBM)
CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen ${HDF_PREFIX}_HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup ${HDF_PREFIX}_HAVE_LIBWS2_32)
@@ -132,25 +197,17 @@ endif ()
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB)
# For other tests to use the same libraries
-set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
+set (HDF5_REQUIRED_LIBRARIES ${HDF5_REQUIRED_LIBRARIES} ${LINK_LIBS})
set (USE_INCLUDES "")
if (WINDOWS)
set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
endif ()
-if (NOT WINDOWS)
- TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
-endif ()
-
# For other specific tests, use this MACRO.
macro (HDF_FUNCTION_TEST OTHER_TEST)
if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST})
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif ()
foreach (def
HAVE_SYS_TIME_H
@@ -170,11 +227,11 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
endif ()
#message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
+ try_compile (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
+ COMPILE_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
if (${OTHER_TEST})
@@ -197,74 +254,6 @@ endmacro ()
HDF_FUNCTION_TEST (STDC_HEADERS)
#-----------------------------------------------------------------------------
-# Check IF header file exists and add it to the list.
-#-----------------------------------------------------------------------------
-macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
- CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
- if (${VARIABLE})
- set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Check for the existence of certain header files
-#-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
-CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
-
-# IF the c compiler found stdint, check the C++ as well. On some systems this
-# file will be found by C but not C++, only do this test IF the C++ compiler
-# has been initialized (e.g. the project also includes some c++)
-if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
- CHECK_INCLUDE_FILE_CXX ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
- if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
- set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
- set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
- endif ()
-endif ()
-
-# Darwin
-CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
-
-# Windows
-CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
-if (NOT CYGWIN)
- CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
-endif ()
-CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
-
-if (CMAKE_SYSTEM_NAME MATCHES "OSF")
- CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
- CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
-else ()
- set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif ()
-
-CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
-CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
-CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
-CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H)
-CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H)
-CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H)
-CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
-CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
-
-#-----------------------------------------------------------------------------
# Check for large file support
#-----------------------------------------------------------------------------
@@ -273,7 +262,7 @@ set (LINUX_LFS 0)
set (HDF_EXTRA_C_FLAGS)
set (HDF_EXTRA_FLAGS)
-if (NOT WINDOWS)
+if (MINGW OR NOT WINDOWS)
# Might want to check explicitly for Linux and possibly Cygwin
# instead of checking for not Solaris or Darwin.
if (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN)
@@ -286,20 +275,19 @@ if (NOT WINDOWS)
# systems.
# POSIX feature information can be found in the gcc manual at:
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200112L)
+ set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
# Need to add this so that O_DIRECT is visible for the direct
# VFD on Linux systems.
- set (HDF_EXTRA_C_FLAGS -D_GNU_SOURCE)
+ set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE)
option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- if (HDF_ENABLE_LARGE_FILE)
+ if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
set (msg "Performing TEST_LFS_WORKS")
- TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
+ try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS
- OUTPUT_VARIABLE OUTPUT
+ COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
)
# The LARGEFILE definitions were from the transition period
@@ -316,14 +304,14 @@ if (NOT WINDOWS)
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
+ "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
)
endif ()
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
+ "Test TEST_LFS_WORKS Compile failed\n"
)
endif ()
endif ()
@@ -331,26 +319,19 @@ if (NOT WINDOWS)
endif ()
endif ()
-add_definitions (${HDF_EXTRA_FLAGS})
-
#-----------------------------------------------------------------------------
# Check for HAVE_OFF64_T functionality
#-----------------------------------------------------------------------------
-if (NOT WINDOWS OR MINGW)
+if (MINGW OR NOT WINDOWS)
HDF_FUNCTION_TEST (HAVE_OFF64_T)
if (${HDF_PREFIX}_HAVE_OFF64_T)
CHECK_FUNCTION_EXISTS (lseek64 ${HDF_PREFIX}_HAVE_LSEEK64)
- CHECK_FUNCTION_EXISTS (fseeko64 ${HDF_PREFIX}_HAVE_FSEEKO64)
- CHECK_FUNCTION_EXISTS (ftello64 ${HDF_PREFIX}_HAVE_FTELLO64)
- CHECK_FUNCTION_EXISTS (ftruncate64 ${HDF_PREFIX}_HAVE_FTRUNCATE64)
endif ()
CHECK_FUNCTION_EXISTS (fseeko ${HDF_PREFIX}_HAVE_FSEEKO)
- CHECK_FUNCTION_EXISTS (ftello ${HDF_PREFIX}_HAVE_FTELLO)
- HDF_FUNCTION_TEST (HAVE_STAT64_STRUCT)
+ CHECK_STRUCT_HAS_MEMBER("struct stat64" st_blocks "sys/types.h;sys/stat.h" HAVE_STAT64_STRUCT)
if (HAVE_STAT64_STRUCT)
- CHECK_FUNCTION_EXISTS (fstat64 ${HDF_PREFIX}_HAVE_FSTAT64)
CHECK_FUNCTION_EXISTS (stat64 ${HDF_PREFIX}_HAVE_STAT64)
endif ()
endif ()
@@ -420,7 +401,7 @@ if (NOT APPLE)
if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
endif ()
- if (NOT WINDOWS)
+ if (MINGW OR NOT WINDOWS)
HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
endif ()
endif ()
@@ -430,13 +411,13 @@ HDF_CHECK_TYPE_SIZE (off64_t ${HDF_PREFIX}_SIZEOF_OFF64_T)
if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
set (${HDF_PREFIX}_SIZEOF_OFF64_T 0)
endif ()
+HDF_CHECK_TYPE_SIZE (time_t ${HDF_PREFIX}_SIZEOF_TIME_T)
#-----------------------------------------------------------------------------
# Extra C99 types
#-----------------------------------------------------------------------------
# _Bool type support
-CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
if (HAVE_STDBOOL_H)
set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
@@ -444,7 +425,7 @@ else ()
HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
endif ()
-if (NOT WINDOWS)
+if (MINGW OR NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check if the dev_t type is a scalar type
#-----------------------------------------------------------------------------
@@ -459,39 +440,42 @@ if (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check a bunch of time functions
#-----------------------------------------------------------------------------
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE_TM_GMTOFF)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" __tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE___TM_GMTOFF)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec "sys/types.h;sys/time.h;time.h" ${HDF_PREFIX}_TIME_WITH_SYS_TIME)
+ if (${HDF_PREFIX}_HAVE_SYS_TIME_H)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;sys/time.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
+ else ()
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
+ endif ()
CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
- foreach (test
- HAVE_TM_GMTOFF
- HAVE___TM_GMTOFF
+ foreach (time_test
# HAVE_TIMEZONE
- HAVE_STRUCT_TIMEZONE
GETTIMEOFDAY_GIVES_TZ
- TIME_WITH_SYS_TIME
HAVE_TM_ZONE
HAVE_STRUCT_TM_TM_ZONE
)
- HDF_FUNCTION_TEST (${test})
+ HDF_FUNCTION_TEST (${time_test})
endforeach ()
if (NOT CYGWIN AND NOT MINGW)
HDF_FUNCTION_TEST (HAVE_TIMEZONE)
-# HDF_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
endif ()
# ----------------------------------------------------------------------
# Does the struct stat have the st_blocks field? This field is not Posix.
#
- HDF_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
+ CHECK_STRUCT_HAS_MEMBER("struct stat" st_blocks "sys/types.h;sys/stat.h" ${HDF_PREFIX}_HAVE_STAT_ST_BLOCKS)
# ----------------------------------------------------------------------
# How do we figure out the width of a tty in characters?
#
CHECK_FUNCTION_EXISTS (ioctl ${HDF_PREFIX}_HAVE_IOCTL)
- HDF_FUNCTION_TEST (HAVE_STRUCT_VIDEOCONFIG)
- HDF_FUNCTION_TEST (HAVE_STRUCT_TEXT_INFO)
+ CHECK_STRUCT_HAS_MEMBER ("struct videoconfig" numtextcols "" ${HDF_PREFIX}_HAVE_STRUCT_VIDEOCONFIG)
+ CHECK_STRUCT_HAS_MEMBER ("struct text_info" screenwidth "" ${HDF_PREFIX}_HAVE_STRUCT_TEXT_INFO)
CHECK_FUNCTION_EXISTS (_getvideoconfig ${HDF_PREFIX}_HAVE__GETVIDEOCONFIG)
CHECK_FUNCTION_EXISTS (gettextinfo ${HDF_PREFIX}_HAVE_GETTEXTINFO)
CHECK_FUNCTION_EXISTS (_scrsize ${HDF_PREFIX}_HAVE__SCRSIZE)
- if (NOT CYGWIN AND NOT MINGW)
+ if (NOT CYGWIN)
CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
endif ()
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
@@ -523,6 +507,8 @@ CHECK_FUNCTION_EXISTS (lround ${HDF_PREFIX}_HAVE_LROUND)
CHECK_FUNCTION_EXISTS (lroundf ${HDF_PREFIX}_HAVE_LROUNDF)
CHECK_FUNCTION_EXISTS (lstat ${HDF_PREFIX}_HAVE_LSTAT)
+CHECK_FUNCTION_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
+CHECK_FUNCTION_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND)
@@ -550,7 +536,7 @@ CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)
CHECK_FUNCTION_EXISTS (vsnprintf ${HDF_PREFIX}_HAVE_VSNPRINTF)
-if (NOT WINDOWS)
+if (MINGW OR NOT WINDOWS)
if (${HDF_PREFIX}_HAVE_VSNPRINTF)
HDF_FUNCTION_TEST (VSNPRINTF_WORKS)
endif ()
@@ -571,8 +557,8 @@ endif ()
#-----------------------------------------------------------------------------
# Check a bunch of other functions
#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- foreach (test
+if (MINGW OR NOT WINDOWS)
+ foreach (other_test
HAVE_ATTRIBUTE
HAVE_C99_FUNC
# STDC_HEADERS
@@ -581,72 +567,7 @@ if (NOT WINDOWS)
SYSTEM_SCOPE_THREADS
HAVE_SOCKLEN_T
)
- HDF_FUNCTION_TEST (${test})
- endforeach ()
-endif ()
-
-# For other CXX specific tests, use this MACRO.
-macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
- if (NOT DEFINED ${OTHER_TEST})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif ()
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_FILE_H
- )
- if ("${${HDF_PREFIX}_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ()
- endforeach ()
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif ()
-
- #message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (${OTHER_TEST} EQUAL 0)
- set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
- else ()
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
- set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif ()
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Check a bunch of cxx functions
-#-----------------------------------------------------------------------------
-if (CMAKE_CXX_COMPILER_LOADED)
- foreach (test
- OLD_HEADER_FILENAME
- ${HDF_PREFIX}_NO_NAMESPACE
- ${HDF_PREFIX}_NO_STD
- BOOL_NOTDEFINED
- NO_STATIC_CAST
- CXX_HAVE_OFFSETOF
- )
- HDF_CXX_FUNCTION_TEST (${test})
+ HDF_FUNCTION_TEST (${other_test})
endforeach ()
endif ()
@@ -656,36 +577,27 @@ endif ()
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
message (STATUS "Checking for InitOnceExecuteOnce:")
- if (NOT DEFINED ${${HDF_PREFIX}_HAVE_IOEO})
+ if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO)
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
endif ()
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- endif ()
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
if (CMAKE_REQUIRED_INCLUDES)
- set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else ()
set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
endif ()
TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
- "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
- COMPILE_OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
+ COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${MACRO_CHECK_FUNCTION_DEFINITIONS}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
+ CMAKE_FLAGS "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES} -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}"
+ COMPILE_OUTPUT_VARIABLE OUTPUT
+ )
# if it did not compile make the return value fail code of 1
if (NOT HAVE_IOEO_COMPILED)
set (HAVE_IOEO_EXITCODE 1)
@@ -736,8 +648,8 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
TRY_RUN (${HDF_PREFIX}_PRINTF_LL_TEST_RUN ${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
+ COMPILE_DEFINITIONS "${CURRENT_TEST_DEFINITIONS}"
+ RUN_OUTPUT_VARIABLE OUTPUT
)
if (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
if (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
@@ -745,11 +657,11 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
set (PRINT_LL_FOUND 1)
else ()
- message ("Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
endif ()
else ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed with the following output:\n ${OUTPUT}\n"
+ "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed\n"
)
endif ()
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 699be85..c3dc04a 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -5,140 +5,112 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+#########################################################################
+
+# - Derived from the FindTiff.cmake and FindJPEG.cmake that is included with cmake
+# FindSZIP
-# - Find SZIP library
-# - Derived from the FindTiff.cmake that is included with cmake
# Find the native SZIP includes and library
-# This module defines
-# SZIP_INCLUDE_DIRS, where to find tiff.h, etc.
-# SZIP_LIBRARIES, libraries to link against to use SZIP.
-# SZIP_FOUND, If false, do not try to use SZIP.
-# also defined, but not for general use are
-# SZIP_LIBRARY, where to find the SZIP library.
-# SZIP_LIBRARY_DEBUG - Debug version of SZIP library
-# SZIP_LIBRARY_RELEASE - Release Version of SZIP library
-# message (STATUS "Finding SZIP library and headers..." )
+# Imported targets
+##################
-############################################
+# This module defines the following :prop_tgt:`IMPORTED` targets:
#
-# Check the existence of the libraries.
+# SZIP::SZIP
+# The SZIP library, if found.
#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-#########################################################################
+# Result variables
+###################
-macro (SZIP_ADJUST_LIB_VARS basename)
- if (${basename}_INCLUDE_DIR)
+# This module will set the following variables in your project:
- # if only the release version was found, set the debug variable also to the release version
- if (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
- set (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
- endif ()
+# SZIP_FOUND, true if the SZIP headers and libraries were found.
+# SZIP_INCLUDE_DIR, the directory containing the SZIP headers.
+# SZIP_INCLUDE_DIRS, the directory containing the SZIP headers.
+# SZIP_LIBRARIES, libraries to link against to use SZIP.
- # if only the debug version was found, set the release variable also to the debug version
- if (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- set (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
- endif ()
- if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- else ()
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
- endif ()
- set (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- endif ()
+# Cache variables
+#################
- set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
+# The following variables may also be set:
- if (${basename}_LIBRARY)
- set (${basename}_FOUND 1)
- endif ()
- endif ()
+# SZIP_LIBRARY, where to find the SZIP library.
+# SZIP_LIBRARY_DEBUG - Debug version of SZIP library
+# SZIP_LIBRARY_RELEASE - Release Version of SZIP library
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
-endmacro ()
-
-
-# Look for the header file.
-set (SZIP_INCLUDE_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/include
- $ENV{SZIP_INSTALL}/include/szip
- /usr/include
- /usr/include/szip
-)
-
-set (SZIP_LIB_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/lib
- /usr/lib
-)
-
-set (SZIP_BIN_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/bin
- /usr/bin
-)
-
-FIND_PATH (SZIP_INCLUDE_DIR
- NAMES szlib.h
- PATHS ${SZIP_INCLUDE_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-if (WIN32)
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-else ()
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-endif ()
+# message (STATUS "Finding SZIP library and headers..." )
+#########################################################################
-# Look for the library.
-FIND_LIBRARY (SZIP_LIBRARY_DEBUG
- NAMES ${SZIP_SEARCH_DEBUG_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-FIND_LIBRARY (SZIP_LIBRARY_RELEASE
- NAMES ${SZIP_SEARCH_RELEASE_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-SZIP_ADJUST_LIB_VARS (SZIP)
-
-if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- set (SZIP_FOUND 1)
- set (SZIP_LIBRARIES ${SZIP_LIBRARY})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- if (SZIP_LIBRARY_DEBUG)
- get_filename_component (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- elseif ()
- get_filename_component (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- endif ()
-else ()
- set (SZIP_FOUND 0)
- set (SZIP_LIBRARIES)
- set (SZIP_INCLUDE_DIRS)
-endif ()
+
+find_path(SZIP_INCLUDE_DIR szlib.h)
+
+set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static)
+foreach(name ${szip_names})
+ list (APPEND szip_names_debug "${name}d")
+endforeach()
+
+if(NOT SZIP_LIBRARY)
+ find_library(SZIP_LIBRARY_RELEASE NAMES ${szip_names})
+ find_library(SZIP_LIBRARY_DEBUG NAMES ${szip_names_debug})
+ include(SelectLibraryConfigurations)
+ select_library_configurations(SZIP)
+ mark_as_advanced(SZIP_LIBRARY_RELEASE SZIP_LIBRARY_DEBUG)
+endif()
+unset(szip_names)
+unset(szip_names_debug)
+
+if(SZIP_INCLUDE_DIR AND EXISTS "${SZIP_INCLUDE_DIR}/SZconfig.h")
+ file(STRINGS "${SZIP_INCLUDE_DIR}/SZconfig.h" szip_version_str
+ REGEX "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+.*")
+
+ string(REGEX REPLACE "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+([0-9]+).*"
+ "\\1" SZIP_VERSION "${szip_version_str}")
+ unset(szip_version_str)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SZIP
+ REQUIRED_VARS SZIP_LIBRARY SZIP_INCLUDE_DIR
+ VERSION_VAR SZIP_VERSION)
+
+if(SZIP_FOUND)
+ set(SZIP_LIBRARIES ${SZIP_LIBRARY})
+ set(SZIP_INCLUDE_DIRS "${SZIP_INCLUDE_DIR}")
+
+ if(NOT TARGET SZIP::SZIP)
+ add_library(SZIP::SZIP UNKNOWN IMPORTED)
+ if(SZIP_INCLUDE_DIRS)
+ set_target_properties(SZIP::SZIP PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIRS}")
+ endif()
+ if(EXISTS "${SZIP_LIBRARY}")
+ set_target_properties(SZIP::SZIP PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${SZIP_LIBRARY}")
+ endif()
+ if(EXISTS "${SZIP_LIBRARY_RELEASE}")
+ set_property(TARGET SZIP::SZIP APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(SZIP::SZIP PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
+ IMPORTED_LOCATION_RELEASE "${SZIP_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${SZIP_LIBRARY_DEBUG}")
+ set_property(TARGET SZIP::SZIP APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(SZIP::SZIP PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
+ IMPORTED_LOCATION_DEBUG "${SZIP_LIBRARY_DEBUG}")
+ endif()
+ endif()
+endif()
+
+mark_as_advanced(SZIP_LIBRARY SZIP_INCLUDE_DIR)
# Report the results.
if (NOT SZIP_FOUND)
@@ -153,29 +125,3 @@ if (NOT SZIP_FOUND)
endif ()
endif ()
endif ()
-
-if (SZIP_FOUND)
- include (CheckSymbolExists)
- #############################################
- # Find out if SZIP was build using dll's
- #############################################
- # Save required variable
- set (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
- set (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
- # Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
-
- # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
- set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
- set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
- #
- #############################################
-endif ()
-
-if (FIND_SZIP_DEBUG)
- message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
- message (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
- message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
- message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
- message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif ()
diff --git a/config/cmake_ext_mod/GetTimeOfDayTest.cpp b/config/cmake_ext_mod/GetTimeOfDayTest.cpp
index 5fd7c04..b35efa5 100644
--- a/config/cmake_ext_mod/GetTimeOfDayTest.cpp
+++ b/config/cmake_ext_mod/GetTimeOfDayTest.cpp
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp
index 1b98092..f05151b 100644
--- a/config/cmake_ext_mod/HDFCXXTests.cpp
+++ b/config/cmake_ext_mod/HDFCXXTests.cpp
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 54e408b..821ac2d 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -14,30 +14,13 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
# May need to build JPEG with PIC on x64 machines with gcc
# Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (JPEG
- SVN_REPOSITORY ${JPEG_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
- elseif (${compress_type} MATCHES "GIT")
+ if (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (JPEG
GIT_REPOSITORY ${JPEG_URL}
GIT_TAG ${JPEG_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -47,6 +30,8 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (JPEG
@@ -54,7 +39,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -64,25 +49,19 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
endif ()
externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target jpeg-static
- add_library(jpeg-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "")
- add_dependencies (JPEG jpeg-static)
- set (JPEG_STATIC_LIBRARY "jpeg-static")
+ add_library(${HDF_PACKAGE_NAMESPACE}jpeg-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}jpeg-static "jpeg" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}jpeg-static JPEG)
+ set (JPEG_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}jpeg-static")
set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target jpeg-shared
- add_library(jpeg-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
- add_dependencies (JPEG jpeg-shared)
- set (JPEG_SHARED_LIBRARY "jpeg-shared")
- set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY})
- endif ()
set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
@@ -97,38 +76,20 @@ macro (PACKAGE_JPEG_LIBRARY compress_type)
COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
add_dependencies (JPEG-GenHeader-Copy JPEG)
endif ()
endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (SZIP
- SVN_REPOSITORY ${SZIP_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
- elseif (${compress_type} MATCHES "GIT")
+ if (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (SZIP
GIT_REPOSITORY ${SZIP_URL}
GIT_TAG ${SZIP_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -139,6 +100,8 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (SZIP
@@ -146,7 +109,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -157,25 +120,29 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
endif ()
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
+##include (${BINARY_DIR}/${SZ_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target szip-static
- add_library(szip-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "")
- add_dependencies (SZIP szip-static)
- set (SZIP_STATIC_LIBRARY "szip-static")
- set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target szip-shared
- add_library(szip-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
- add_dependencies (SZIP szip-shared)
- set (SZIP_SHARED_LIBRARY "szip-shared")
- set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY})
+ if (USE_LIBAEC)
+ add_library(${HDF_PACKAGE_NAMESPACE}sz-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}sz-static "sz" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}sz-static SZIP)
+ add_library(${HDF_PACKAGE_NAMESPACE}aec-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}aec-static "aec" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}aec-static SZIP)
+ set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}sz-static;${HDF_PACKAGE_NAMESPACE}aec-static")
+ else ()
+ add_library(${HDF_PACKAGE_NAMESPACE}szip-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-static "szip" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-static SZIP)
+ set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-static")
endif ()
+ set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
@@ -185,42 +152,29 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (PACKAGE_SZIP_LIBRARY compress_type)
+ set (SZIP_HDR "SZconfig")
+ if (USE_LIBAEC)
+ set (SZIP_HDR "libaec_Export")
+ endif ()
add_custom_target (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/${SZIP_HDR}.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
+ COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/${SZIP_HDR}.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SZIP_HDR}.h)
+ if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
add_dependencies (SZIP-GenHeader-Copy SZIP)
endif ()
endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_ZLIB_LIBRARY compress_type)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (ZLIB
- SVN_REPOSITORY ${ZLIB_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
- elseif (${compress_type} MATCHES "GIT")
+ if (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (ZLIB
GIT_REPOSITORY ${ZLIB_URL}
GIT_TAG ${ZLIB_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -230,6 +184,8 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (ZLIB
@@ -237,7 +193,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -247,6 +203,8 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
endif ()
externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
@@ -258,19 +216,12 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
endif ()
##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target zlib-static
- add_library(zlib-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "")
- add_dependencies (ZLIB zlib-static)
- set (ZLIB_STATIC_LIBRARY "zlib-static")
+ add_library(${HDF_PACKAGE_NAMESPACE}zlib-static STATIC IMPORTED)
+# add_library(${HDF_PACKAGE_NAMESPACE}zlib-static ALIAS zlib-static)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-static ${ZLIB_LIB_NAME} STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-static ZLIB)
+ set (ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target zlib-shared
- add_library(zlib-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "")
- add_dependencies (ZLIB zlib-shared)
- set (ZLIB_SHARED_LIBRARY "zlib-shared")
- set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
- endif ()
set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
@@ -285,7 +236,7 @@ macro (PACKAGE_ZLIB_LIBRARY compress_type)
COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
add_dependencies (ZLIB-GenHeader-Copy ZLIB)
endif ()
endmacro ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 04d60e1..c26956b 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -14,7 +14,7 @@
macro (SET_HDF_BUILD_TYPE)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
- set(HDF_CFG_NAME ${CTEST_CONFIGURATION_TYPE})
+ set(HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
set(HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR})
set(HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME})
else()
@@ -28,7 +28,7 @@ macro (SET_HDF_BUILD_TYPE)
endif()
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
+ message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
@@ -73,22 +73,21 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
- if (WIN32 AND MSVC)
+ if (WIN32 AND MSVC AND NOT DISABLE_PDB_FILES)
get_target_property (target_type ${libtarget} TYPE)
if (${libtype} MATCHES "SHARED")
set (targetfilename $<TARGET_PDB_FILE:${libtarget}>)
else ()
- get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO)
+ get_property (target_name TARGET ${libtarget} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
- FILES
- ${targetfilename}
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
+ FILES ${targetfilename}
+ DESTINATION ${targetdestination}
+ CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
- )
+ OPTIONAL
+ )
endif ()
endmacro ()
@@ -96,53 +95,45 @@ endmacro ()
macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
if (WIN32 AND MSVC)
install (
- FILES
- $<TARGET_PDB_FILE:${progtarget}>
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
+ FILES $<TARGET_PDB_FILE:${progtarget}>
+ DESTINATION ${targetdestination}
+ CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
- )
+ OPTIONAL
+ )
endif ()
endmacro ()
#-------------------------------------------------------------------------------
macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
- if (WIN32)
- set (LIB_DEBUG_SUFFIX "_D")
- else ()
- set (LIB_DEBUG_SUFFIX "_debug")
- endif ()
if (${libtype} MATCHES "SHARED")
set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}${LIB_DEBUG_SUFFIX}")
+ set (LIB_DEBUG_NAME "${libname}${CMAKE_DEBUG_POSTFIX}")
else ()
- if (WIN32)
+ if (WIN32 AND NOT MINGW)
set (LIB_RELEASE_NAME "lib${libname}")
- set (LIB_DEBUG_NAME "lib${libname}${LIB_DEBUG_SUFFIX}")
+ set (LIB_DEBUG_NAME "lib${libname}${CMAKE_DEBUG_POSTFIX}")
else ()
set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}${LIB_DEBUG_SUFFIX}")
+ set (LIB_DEBUG_NAME "${libname}${CMAKE_DEBUG_POSTFIX}")
endif ()
endif ()
- set_target_properties (${libtarget}
- PROPERTIES
- OUTPUT_NAME
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_DEBUG
- ${LIB_DEBUG_NAME}
- OUTPUT_NAME_RELEASE
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_MINSIZEREL
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_RELWITHDEBINFO
- ${LIB_RELEASE_NAME}
+ set_target_properties (${libtarget} PROPERTIES
+ OUTPUT_NAME ${LIB_RELEASE_NAME}
+# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
)
+ #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME)
+ #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG)
+ #get_property (target_name_rwdi TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO)
+ #message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}")
+
if (${libtype} MATCHES "STATIC")
if (WIN32)
- set_target_properties (${libtarget}
- PROPERTIES
+ set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
@@ -152,10 +143,9 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
endif ()
endif ()
- #----- Use MSVC Naming conventions for Shared Libraries
- if (MINGW AND ${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget}
- PROPERTIES
+ option (HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF)
+ if (HDF5_MSVC_NAMING_CONVENTION AND MINGW AND ${libtype} MATCHES "SHARED")
+ set_target_properties (${libtarget} PROPERTIES
IMPORT_SUFFIX ".lib"
IMPORT_PREFIX ""
PREFIX ""
@@ -170,7 +160,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
if (${importtype} MATCHES "IMPORT")
set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}")
endif ()
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug")
set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME})
else ()
set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME})
@@ -190,7 +180,12 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
)
endif ()
else ()
- if (CYGWIN)
+ if (MINGW)
+ set_target_properties (${libtarget} PROPERTIES
+ IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib"
+ IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ )
+ elseif (CYGWIN)
set_target_properties (${libtarget} PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
@@ -219,37 +214,14 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
endmacro ()
#-------------------------------------------------------------------------------
-macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags)
- if (MSVC)
- TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- else ()
- set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
- endif ()
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags)
- if (MSVC)
- set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
- endif ()
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (TARGET_FORTRAN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
- if (WIN32)
- TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- endif ()
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
- if (MSVC)
- if (${libtype} MATCHES "SHARED")
- set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
- else ()
- set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
- endif ()
- endif ()
+macro (TARGET_C_PROPERTIES wintarget libtype)
+ target_compile_options(${wintarget} PRIVATE
+ $<$<C_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
+ $<$<CXX_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
+ )
+ if(MSVC)
+ set_property(TARGET ${wintarget} APPEND PROPERTY LINK_FLAGS "${WIN_LINK_FLAGS}")
+ endif()
endmacro ()
#-----------------------------------------------------------------------------
@@ -277,6 +249,10 @@ macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_PLATFORM "${BINARY_PLATFORM} Intel")
if (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel 17")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel 18")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel 19")
else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel ${CMAKE_C_COMPILER_VERSION}")
endif ()
@@ -293,16 +269,18 @@ macro (HDF_README_PROPERTIES target_fortran)
elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
if (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.0.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
- else ()
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.16.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017")
- endif ()
+ else () #19.23
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2019")
+ endif ()
else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
endif ()
endif ()
elseif (APPLE)
set (BINARY_EXAMPLE_ENDING "tar.gz")
- set (BINARY_INSTALL_ENDING "dmg")
+ set (BINARY_INSTALL_ENDING "sh") # if packaging changes - use dmg
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
else ()
@@ -316,7 +294,9 @@ macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
endif ()
- if (BUILD_SHARED_LIBS)
+ if (ONLY_SHARED_LIBS)
+ set (LIB_TYPE "Shared")
+ elseif (BUILD_SHARED_LIBS)
set (LIB_TYPE "Static and Shared")
else ()
set (LIB_TYPE "Static")
@@ -363,7 +343,7 @@ macro (HDF_DIR_PATHS package_prefix)
set (${package_prefix}_INSTALL_INCLUDE_DIR include)
endif ()
if (NOT ${package_prefix}_INSTALL_DATA_DIR)
- if (NOT WIN32)
+ if (NOT MSVC)
if (APPLE)
if (${package_prefix}_BUILD_FRAMEWORKS)
set (${package_prefix}_INSTALL_EXTRA_DIR ../SharedSupport)
@@ -373,17 +353,47 @@ macro (HDF_DIR_PATHS package_prefix)
set (${package_prefix}_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
endif ()
set (${package_prefix}_INSTALL_DATA_DIR share)
- set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake)
else ()
set (${package_prefix}_INSTALL_DATA_DIR ".")
- set (${package_prefix}_INSTALL_CMAKE_DIR cmake)
endif ()
endif ()
+ if (NOT ${package_prefix}_INSTALL_CMAKE_DIR)
+ set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake)
+ endif ()
+
+ # Always use full RPATH, i.e. don't skip the full RPATH for the build tree
+ set (CMAKE_SKIP_BUILD_RPATH FALSE)
+ # when building, don't use the install RPATH already
+ # (but later on when installing)
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+ # add the automatically determined parts of the RPATH
+ # which point to directories outside the build tree to the install RPATH
+ set (CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+ if (APPLE)
+ set (CMAKE_INSTALL_NAME_DIR "@rpath")
+ set (CMAKE_INSTALL_RPATH
+ "@executable_path/../${${package_prefix}_INSTALL_LIB_DIR}"
+ "@executable_path/"
+ "@loader_path/../${${package_prefix}_INSTALL_LIB_DIR}"
+ "@loader_path/"
+ )
+ else ()
+ set (CMAKE_INSTALL_RPATH "\$ORIGIN/../${${package_prefix}_INSTALL_LIB_DIR}:\$ORIGIN/")
+ endif ()
if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
endif ()
+ #set the default debug suffix for all library targets
+ if(NOT CMAKE_DEBUG_POSTFIX)
+ if (WIN32)
+ set (CMAKE_DEBUG_POSTFIX "_D")
+ else ()
+ set (CMAKE_DEBUG_POSTFIX "_debug")
+ endif ()
+ endif ()
+
SET_HDF_BUILD_TYPE()
#-----------------------------------------------------------------------------
@@ -402,13 +412,14 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_Fortran_MODULE_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules."
)
- if (WIN32)
- set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE})
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig)
+ set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
set (CMAKE_PDB_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
)
else ()
- set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE})
+ set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif ()
else ()
# if we are externally configured, but the project uses old cmake scripts
@@ -417,5 +428,49 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
endif ()
endif ()
+
+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ if (CMAKE_HOST_UNIX)
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ else ()
+ GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
+ set (CMAKE_INSTALL_PREFIX
+ "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ set (CMAKE_GENERIC_PROGRAM_FILES)
+ endif ()
+ endif ()
+
+#-----------------------------------------------------------------------------
+# Setup pre-3.14 FetchContent
+#-----------------------------------------------------------------------------
+ if(${CMAKE_VERSION} VERSION_LESS 3.14)
+ macro(FetchContent_MakeAvailable NAME)
+ FetchContent_GetProperties(${NAME})
+ if(NOT ${NAME}_POPULATED)
+ FetchContent_Populate(${NAME})
+ add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
+ endif()
+ endmacro()
+ endif()
+endmacro ()
+
+macro (ADD_H5_FLAGS h5_flag_var infile)
+ file (STRINGS ${infile} TEST_FLAG_STREAM)
+ #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
+ list (LENGTH TEST_FLAG_STREAM len_flag)
+ if (len_flag GREATER 0)
+ math (EXPR _FP_LEN "${len_flag} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET TEST_FLAG_STREAM ${line} str_flag)
+ string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
+ #message (STATUS "str_flag=${str_flag}")
+ if (str_flag)
+ list (APPEND ${h5_flag_var} "${str_flag}")
+ endif ()
+ endforeach ()
+ endif ()
+ #message (STATUS "h5_flag_var=${${h5_flag_var}}")
endmacro ()
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 320fd5b..2d7e1b4 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -88,25 +88,6 @@ int main(void)
}
#endif
-
-#ifdef TIME_WITH_SYS_TIME
-/* Time with sys/time test */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-
-#endif
-
#ifdef STDC_HEADERS
#include <stdlib.h>
#include <stdarg.h>
@@ -162,26 +143,6 @@ main ()
#endif /* HAVE_FUNCTION */
-#ifdef HAVE_TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE___TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.__tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
#ifdef HAVE_TIMEZONE
#ifdef HAVE_SYS_TIME_H
@@ -192,24 +153,6 @@ SIMPLE_TEST(timezone=0);
#endif /* HAVE_TIMEZONE */
-#ifdef HAVE_STRUCT_TIMEZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct timezone tz; tz.tz_minuteswest=0);
-
-#endif /* HAVE_STRUCT_TIMEZONE */
-
-#ifdef HAVE_STAT_ST_BLOCKS
-
-#include <sys/stat.h>
-SIMPLE_TEST(struct stat sb; sb.st_blocks=0);
-
-#endif /* HAVE_STAT_ST_BLOCKS */
-
#ifdef PRINTF_LL_WIDTH
#ifdef HAVE_LONG_LONG
@@ -235,7 +178,7 @@ int DebugReport(int reportType, char* message, int* returnValue)
int main(void)
{
- char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL };
+ char *llwidthArgs[] = { "I64", "l64", "ll", "l", "L", "q", NULL };
char *s = malloc(128);
char **currentArg = NULL;
LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
@@ -319,16 +262,6 @@ int main()
}
#endif
-#ifdef HAVE_STAT64_STRUCT
-#include <sys/types.h>
-#include <sys/stat.h>],
-struct stat64 sb;
-int main()
-{
- return 0;
-}
-#endif
-
#ifdef TEST_DIRECT_VFD_WORKS
#include <sys/types.h>
#include <sys/stat.h>
@@ -432,18 +365,6 @@ int main ()
#endif /* HAVE_IOEO */
-#ifdef HAVE_STRUCT_VIDEOCONFIG
-
-SIMPLE_TEST(struct videoconfig w; w.numtextcols=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_STRUCT_TEXT_INFO
-
-SIMPLE_TEST(struct text_info w; w.screenwidth=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
#if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE )
#ifndef __cplusplus
#if defined( HAVE_INLINE )
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
new file mode 100644
index 0000000..9b4b138
--- /dev/null
+++ b/config/cmake_ext_mod/HDFUseCXX.cmake
@@ -0,0 +1,109 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#
+# This file provides functions for C++ support.
+#
+#-------------------------------------------------------------------------------
+ENABLE_LANGUAGE (CXX)
+set (HDF_PREFIX "H5")
+
+#-------------------------------------------------------------------------------
+# Fix CXX flags if we are compiling staticly on Windows using
+# Windows_MT.cmake from config/cmake/UserMacros
+#-------------------------------------------------------------------------------
+if (BUILD_STATIC_CRT_LIBS)
+ TARGET_STATIC_CRT_FLAGS ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Configure Checks which require CXX compilation must go in here
+# not in the main ConfigureChecks.cmake files, because if the user has
+# no CXX compiler, problems arise.
+#-----------------------------------------------------------------------------
+include (CheckIncludeFileCXX)
+include (TestForSTDNamespace)
+
+# IF the c compiler found stdint, check the C++ as well. On some systems this
+# file will be found by C but not C++, only do this test IF the C++ compiler
+# has been initialized (e.g. the project also includes some c++)
+if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
+ CHECK_INCLUDE_FILE_CXX ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
+ if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
+ set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
+ set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
+ endif ()
+endif ()
+
+# For other CXX specific tests, use this MACRO.
+macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
+ if (NOT DEFINED ${OTHER_TEST})
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
+ set (OTHER_TEST_ADD_LIBRARIES)
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+
+ foreach (def
+ HAVE_SYS_TIME_H
+ HAVE_UNISTD_H
+ HAVE_SYS_TYPES_H
+ HAVE_SYS_SOCKET_H
+ HAVE_SYS_FILE_H
+ )
+ if ("${${HDF_PREFIX}_${def}}")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
+ endif ()
+ endforeach ()
+
+ if (LARGEFILE)
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
+ "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
+ )
+ endif ()
+
+ #message (STATUS "Performing ${OTHER_TEST}")
+ TRY_COMPILE (${OTHER_TEST}
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${OTHER_TEST_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+ if (${OTHER_TEST} EQUAL 0)
+ set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
+ message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
+ else ()
+ message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
+ set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
+ "${OUTPUT}\n"
+ )
+ endif ()
+ endif ()
+endmacro ()
+
+#-----------------------------------------------------------------------------
+# Check a bunch of cxx functions
+#-----------------------------------------------------------------------------
+if (CMAKE_CXX_COMPILER_LOADED)
+ foreach (cxx_test
+ OLD_HEADER_FILENAME
+ HDF_NO_NAMESPACE
+ HDF_NO_STD
+ BOOL_NOTDEFINED
+ NO_STATIC_CAST
+ CXX_HAVE_OFFSETOF
+ )
+ HDF_CXX_FUNCTION_TEST (${cxx_test})
+ endforeach ()
+endif ()
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 5be2c49..17fdefb 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -13,7 +13,13 @@
# This file provides functions for Fortran support.
#
#-------------------------------------------------------------------------------
-ENABLE_LANGUAGE (Fortran)
+enable_language (Fortran)
+set (HDF_PREFIX "H5")
+
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
#-------------------------------------------------------------------------------
# Fix Fortran flags if we are compiling staticly on Windows using
@@ -41,71 +47,15 @@ file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,
string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
-#-----------------------------------------------------------------------------
-# The provided CMake Fortran macros don't provide a general check function
-# so this one is used for a sizeof test.
-#-----------------------------------------------------------------------------
-macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- message (STATUS "Testing Fortran ${FUNCTION}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- "${CODE}"
- )
- TRY_COMPILE (RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# message ( "Test result ${OUTPUT}")
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- if (${RESULT_VAR})
- set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- else ()
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require Fortran compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no Fortran compiler, problems arise.
-#
-# Be careful with leading spaces here, do not remove them.
-#-----------------------------------------------------------------------------
-
-# Check for Non-standard extension intrinsic function SIZEOF
-set (FORTRAN_HAVE_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(sizeof
+#test code source
+set (SIZEOF_CODE
"
PROGRAM main
i = sizeof(x)
END PROGRAM
"
- FORTRAN_HAVE_SIZEOF
)
-
-# Check for F2008 standard intrinsic function C_SIZEOF
-set (FORTRAN_HAVE_C_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(c_sizeof
+set (C_SIZEOF_CODE
"
PROGRAM main
USE ISO_C_BINDING
@@ -114,11 +64,8 @@ CHECK_FORTRAN_FEATURE(c_sizeof
result = c_sizeof(a)
END PROGRAM
"
- FORTRAN_HAVE_C_SIZEOF
)
-
-# Check for F2008 standard intrinsic function STORAGE_SIZE
-CHECK_FORTRAN_FEATURE(storage_size
+set (STORAGE_SIZE_CODE
"
PROGRAM main
INTEGER :: a
@@ -126,22 +73,15 @@ CHECK_FORTRAN_FEATURE(storage_size
result = storage_size(a)
END PROGRAM
"
- FORTRAN_HAVE_STORAGE_SIZE
)
-
-# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
-set (HAVE_ISO_FORTRAN_ENV FALSE)
-CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
+set (ISO_FORTRAN_ENV_CODE
"
PROGRAM main
USE, INTRINSIC :: ISO_FORTRAN_ENV
END PROGRAM
"
- HAVE_ISO_FORTRAN_ENV
)
-
-set (FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
-CHECK_FORTRAN_FEATURE(RealIsNotDouble
+set (REALISNOTDOUBLE_CODE
"
MODULE type_mod
INTERFACE h5t
@@ -164,14 +104,8 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
CALL h5t(d)
END PROGRAM main
"
- FORTRAN_DEFAULT_REAL_NOT_DOUBLE
)
-
-#-----------------------------------------------------------------------------
-# Checks if the ISO_C_BINDING module meets all the requirements
-#-----------------------------------------------------------------------------
-set (FORTRAN_HAVE_ISO_C_BINDING FALSE)
-CHECK_FORTRAN_FEATURE(iso_c_binding
+set (ISO_C_BINDING_CODE
"
PROGRAM main
USE iso_c_binding
@@ -183,15 +117,101 @@ CHECK_FORTRAN_FEATURE(iso_c_binding
ptr = C_LOC(ichr(1:1))
END PROGRAM
"
- FORTRAN_HAVE_ISO_C_BINDING
)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+ check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
+ check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
+else ()
+ #-----------------------------------------------------------------------------
+ # The provided CMake Fortran macros don't provide a general check function
+ # so this one is used for a sizeof test.
+ #-----------------------------------------------------------------------------
+ macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
+ message (STATUS "Testing Fortran ${FUNCTION}")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
+ else ()
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif ()
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ "${CODE}"
+ )
+ TRY_COMPILE (RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (STATUS "Test result ${OUTPUT}")
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+
+ if (${RESULT_VAR})
+ set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
+ "${OUTPUT}\n\n"
+ )
+ else ()
+ message (STATUS "Testing Fortran ${FUNCTION} - Fail")
+ set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
+ "${OUTPUT}\n\n")
+ endif ()
+ endmacro ()
+
+ #-----------------------------------------------------------------------------
+ # Configure Checks which require Fortran compilation must go in here
+ # not in the main ConfigureChecks.cmake files, because if the user has
+ # no Fortran compiler, problems arise.
+ #
+ # Be careful with leading spaces here, do not remove them.
+ #-----------------------------------------------------------------------------
+
+ # Check for Non-standard extension intrinsic function SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF)
+
+ # Check for F2008 standard intrinsic function C_SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF)
+
+ # Check for F2008 standard intrinsic function STORAGE_SIZE
+ CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
+
+ # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
+ set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
+ CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV)
+
+ set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
+ CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+
+ #-----------------------------------------------------------------------------
+ # Checks if the ISO_C_BINDING module meets all the requirements
+ #-----------------------------------------------------------------------------
+ set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
+ CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING)
+endif ()
+
#-----------------------------------------------------------------------------
# Add debug information (intel Fortran : JB)
#-----------------------------------------------------------------------------
if (CMAKE_Fortran_COMPILER MATCHES ifort)
- if (WIN32)
- set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
- set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
+ if (WIN32 AND NOT MINGW)
+ set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE STRING "flags" FORCE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE STRING "flags" FORCE)
endif ()
endif ()
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index b812d73..8538f32 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -20,7 +20,7 @@ endif ()
# message (STATUS "Require TEST_ARGS to be defined")
#endif ()
if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
@@ -29,17 +29,38 @@ endif ()
# message (STATUS "Require TEST_EXPECT to be defined")
#endif ()
if (NOT TEST_FILTER)
- message (STATUS "Require TEST_FILTER to be defined")
+ message (STATUS "Optional TEST_FILTER to be defined")
endif ()
if (NOT TEST_REFERENCE)
message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
endif ()
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}")
+
+if (TEST_LIBRARY_DIRECTORY)
+ if (WIN32)
+ set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
+ else ()
+ set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
+ endif ()
+endif ()
+
+if (TEST_ENV_VAR)
+ set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
+ #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+endif ()
# run the test program, capture the stdout/stderr and the result var
execute_process (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_OUTPUT}
@@ -49,27 +70,130 @@ execute_process (
)
message (STATUS "COMMAND Result: ${TEST_RESULT}")
+
message (STATUS "COMMAND Error: ${TEST_ERROR}")
-# now grep the output with the reference
+# remove special output
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+string (FIND TEST_STREAM "_pmi_alps" "${TEST_FIND_RESULT}")
+if (TEST_FIND_RESULT GREATER 0)
+ string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
+endif ()
+
+# if the TEST_ERRREF exists grep the error output with the error reference
+set (TEST_ERRREF_RESULT 0)
+if (TEST_ERRREF)
+ # if the .err file exists grep the error output with the error reference before comparing stdout
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM)
+ list (LENGTH TEST_ERR_STREAM test_len)
+ if (test_len GREATER 0)
+ # TEST_ERRREF should always be matched
+ string (REGEX MATCH "${TEST_ERRREF}" TEST_MATCH ${TEST_ERR_STREAM})
+ string (COMPARE EQUAL "${TEST_ERRREF}" "${TEST_MATCH}" TEST_ERRREF_RESULT)
+ if (NOT TEST_ERRREF_RESULT)
+ message (FATAL_ERROR "Failed: The error output of ${TEST_PROGRAM} did not contain ${TEST_ERRREF}")
+ endif ()
+ endif ()
+ endif ()
+
+ #always compare output file to reference unless this must be skipped
+ set (TEST_COMPARE_RESULT 0)
+ if (NOT TEST_SKIP_COMPARE)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (WIN32)
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif ()
+ if (NOT TEST_SORT_COMPARE)
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_COMPARE_RESULT
+ )
+ else ()
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+ list (SORT v1)
+ list (SORT v2)
+ if (NOT v1 STREQUAL v2)
+ set(TEST_COMPARE_RESULT 1)
+ endif ()
+ endif ()
+
+ if (TEST_COMPARE_RESULT)
+ set (TEST_COMPARE_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ list (LENGTH test_ref len_ref)
+ if (len_act GREATER 0 AND len_ref GREATER 0)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
+ set (TEST_COMPARE_RESULT 1)
+ message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
+ endif ()
+ endforeach ()
+ else ()
+ if (len_act EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if (len_ref EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ endif ()
+ endif ()
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_COMPARE_RESULT 1)
+ endif ()
+ endif ()
+ endif ()
-# TEST_REFERENCE should always be matched
-string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
-string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-if ("${TEST_RESULT}" STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ message (STATUS "COMPARE Result: ${TEST_COMPARE_RESULT}")
+
+ # again, if return value is !=0 scream and shout
+ if (TEST_COMPARE_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif ()
+ endif ()
+ endif ()
+else ()
+ # else grep the output with the reference
+ set (TEST_GREP_RESULT 0)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+
+ # TEST_REFERENCE should always be matched
+ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+ string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (NOT TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ endif ()
endif ()
-string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-if ("${TEST_EXPECT}" STREQUAL "1")
- # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
- string (LENGTH "${TEST_MATCH}" TEST_RESULT)
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+
+if (TEST_FILTER)
+ string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
+ if (TEST_EXPECT)
+ # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match
+ string (LENGTH "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+ endif ()
endif ()
endif ()
# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matched")
+message (STATUS "Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 2479728..f552dcd 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -18,7 +18,7 @@ if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
endif ()
if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
@@ -26,27 +26,19 @@ endif ()
if (NOT TEST_EXPECT)
message (STATUS "Require TEST_EXPECT to be defined")
endif ()
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
-# if there is not an error reference file add the error output to the stdout file
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif ()
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}")
if (TEST_LIBRARY_DIRECTORY)
- if (WIN32 AND NOT MINGW)
+ if (WIN32)
set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
else ()
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
@@ -55,12 +47,13 @@ endif ()
if (TEST_ENV_VAR)
set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
+ #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
endif ()
if (NOT TEST_INPUT)
# run the test program, capture the stdout/stderr and the result var
execute_process (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_OUTPUT}
@@ -71,7 +64,7 @@ if (NOT TEST_INPUT)
else ()
# run the test program with stdin, capture the stdout/stderr and the result var
execute_process (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
INPUT_FILE ${TEST_INPUT}
@@ -87,7 +80,7 @@ if (TEST_REGEX)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM})
string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT)
- if ("${REGEX_RESULT}" STREQUAL "0")
+ if (NOT REGEX_RESULT)
message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}")
endif ()
endif ()
@@ -95,9 +88,24 @@ endif ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
-if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (TEST_MASK_FILE)
+ STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
+ endif ()
+ # remove special output
+ string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+
+ if (NOT ERROR_APPEND)
+ # write back to original .err file
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ else ()
+ # append error output to the stdout output file
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ endif ()
+ endif ()
endif ()
# append the test result status with a predefined text
@@ -106,9 +114,9 @@ if (TEST_APPEND)
endif ()
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
- if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
message (STATUS "Output :\n${TEST_STREAM}")
endif ()
@@ -118,6 +126,33 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
+# remove special output
+file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT)
+if (TEST_FIND_RESULT GREATER -1)
+ string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
+endif ()
+
+# remove special error output
+if (NOT TEST_ERRREF)
+ # the error stack has been appended to the output file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+else ()
+ # the error stack remains in the .err file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+endif ()
+string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT)
+if (TEST_FIND_RESULT GREATER -1)
+ string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ # write back the changes to the original files
+ if (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ else ()
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ endif ()
+endif ()
+
# if the output file needs Storage text removed
if (TEST_MASK)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
@@ -128,7 +163,7 @@ endif ()
# if the output file needs Modified text removed
if (TEST_MASK_MOD)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()
@@ -166,123 +201,177 @@ endif ()
if (TEST_REF_FILTER)
#message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
# compare output files to references unless this must be skipped
+set (TEST_COMPARE_RESULT 0)
if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif ()
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (WIN32)
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif ()
- if (NOT TEST_SORT_COMPARE)
- # now compare the output with the reference
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- else ()
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
- list (SORT v1)
- list (SORT v2)
- if (NOT v1 STREQUAL v2)
- set(TEST_RESULT 1)
- endif ()
- endif ()
+ if (NOT TEST_SORT_COMPARE)
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_COMPARE_RESULT
+ )
+ else ()
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+ list (SORT v1)
+ list (SORT v2)
+ if (NOT v1 STREQUAL v2)
+ set(TEST_COMPARE_RESULT 1)
+ endif ()
+ endif ()
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- list (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- list (LENGTH test_ref len_ref)
- if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
- math (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- list (GET test_act ${line} str_act)
- list (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ if (TEST_COMPARE_RESULT)
+ set (TEST_COMPARE_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ list (LENGTH test_ref len_ref)
+ if (len_act GREATER 0 AND len_ref GREATER 0)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
+ set (TEST_COMPARE_RESULT 1)
+ message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
+ endif ()
+ endforeach ()
+ else ()
+ if (len_act EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if (len_ref EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
endif ()
endif ()
- endforeach ()
- else ()
- if ("${len_act}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
- endif ()
- if ("${len_ref}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_COMPARE_RESULT 1)
+ endif ()
endif ()
endif ()
- if (NOT "${len_act}" STREQUAL "${len_ref}")
- set (TEST_RESULT 1)
- endif ()
- endif ()
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
+ message (STATUS "COMPARE Result: ${TEST_COMPARE_RESULT}")
- # again, if return value is !=0 scream and shout
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ # again, if return value is !=0 scream and shout
+ if (TEST_COMPARE_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif ()
endif ()
# now compare the .err file with the error reference, if supplied
+ set (TEST_ERRREF_RESULT 0)
if (TEST_ERRREF)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
- endif ()
+ file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (WIN32)
+ configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
+ if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ endif ()
+ #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ endif ()
- # now compare the error output with the error reference
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
- list (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
- list (LENGTH test_ref len_ref)
- math (EXPR _FP_LEN "${len_ref} - 1")
- if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
+ # now compare the error output with the error reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ RESULT_VARIABLE TEST_ERRREF_RESULT
+ )
+ if (TEST_ERRREF_RESULT)
+ set (TEST_ERRREF_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
+ list (LENGTH test_ref len_ref)
math (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- list (GET test_act ${line} str_act)
- list (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif ()
+ if (len_act GREATER 0 AND len_ref GREATER 0)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
+ set (TEST_ERRREF_RESULT 1)
+ message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
+ endif ()
+ endforeach ()
+ else ()
+ if (len_act EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
+ endif ()
+ if (len_ref EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
endif ()
- endforeach ()
- else ()
- if ("${len_act}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
endif ()
- if ("${len_ref}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_ERRREF_RESULT 1)
endif ()
endif ()
- if (NOT "${len_act}" STREQUAL "${len_ref}")
- set (TEST_RESULT 1)
- endif ()
endif ()
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
+ message (STATUS "COMPARE Result: ${TEST_ERRREF_RESULT}")
# again, if return value is !=0 scream and shout
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ if (TEST_ERRREF_RESULT)
message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
endif ()
endif ()
endif ()
+set (TEST_GREP_RESULT 0)
+if (TEST_GREP_COMPARE)
+ # now grep the output with the reference
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ # TEST_REFERENCE should always be matched
+ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+ string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (NOT TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ endif ()
+
+ string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
+ if (TEST_EXPECT)
+ # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match
+ string (LENGTH "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+ endif ()
+ endif ()
+ endif ()
+endif ()
+
+# dump the output unless nodisplay option is set
+if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
+ RESULT_VARIABLE TEST_RESULT
+ )
+endif ()
+
# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
+message (STATUS "${TEST_PROGRAM} Passed")
+
diff --git a/config/commence.am b/config/commence.am
index eed5304..731ad43 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -8,7 +8,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
@@ -69,9 +69,9 @@ H5CPP=${DESTDIR}$(bindir)/h5c++
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_FCFLAGS=@AM_FCFLAGS@ @H5_FCFLAGS@
-AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_CPPFLAGS=@AM_CPPFLAGS@ @H5_CPPFLAGS@
AM_LDFLAGS=@AM_LDFLAGS@ @H5_LDFLAGS@
diff --git a/config/conclude.am b/config/conclude.am
index e6635d0..2abc6e3 100644
--- a/config/conclude.am
+++ b/config/conclude.am
@@ -8,7 +8,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
@@ -16,11 +16,11 @@
## Textually included at the end of most HDF5 Makefiles.am.
## Contains build rules.
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
@@ -32,6 +32,7 @@ TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
REALTIMEOUTPUT = $(realtimeOutput)
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -67,7 +68,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -233,7 +234,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/config/cygwin b/config/cygwin
index 6ead871..8343138 100644
--- a/config/cygwin
+++ b/config/cygwin
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/examples.am b/config/examples.am
index 247dfa8..1cdee34 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -8,7 +8,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
diff --git a/config/freebsd b/config/freebsd
index 936c29f..5ac3de5 100644
--- a/config/freebsd
+++ b/config/freebsd
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
new file mode 100644
index 0000000..b8cac77
--- /dev/null
+++ b/config/gnu-cxxflags
@@ -0,0 +1,263 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# GNU g++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not GNU; otherwise `cxx_flags_set' is set to `yes'
+#
+
+#
+# For now, do not promote any warnings to errors.
+#
+PROMOTE_ERRORS_DFLT=no
+
+#
+# This filter rewrites -Werror= as -W, in that way demoting warnings
+# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+#
+demote_errors()
+{
+ if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ sed 's,-Werror=,-W,g'
+ else
+ cat
+ fi
+}
+
+#
+# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_gnu_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
+# Get the compiler version in a way that works for g++
+# unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: g++
+# cxx_version: Version number: 2.91.60, 2.7.2.1
+#
+if test "X-" = "X-$cxx_flags_set"; then
+ # PathScale compiler spits out gcc version string too. Need to
+ # filter it out.
+ # icc beginning with version 12 includes a "gcc version compatiblilty"
+ # string, causing the gcc H5_CXXFLAGS to be erroneously added. The line
+ # "grep -v 'icc version'" causes the discarding of any output
+ # containing 'icc version'. The cxx_version for icc is correctly determined
+ # and flags added in the intel-flags script.
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\
+ grep -v '^icc.*version' |\
+ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+ cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'`
+ cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'`
+ if test X = "X$cxx_vendor" -a X != "X$cxx_version"; then
+ cxx_vendor=g++
+ fi
+ if test "-" != "$cxx_vendor-$cxx_version"; then
+ echo "compiler '$CXX' is GNU $cxx_vendor-$cxx_version"
+ fi
+
+ # Get the compiler version numbers
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+ cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
+ test -n "$cxx_vers_major" || cxx_vers_major=0
+ test -n "$cxx_vers_minor" || cxx_vers_minor=0
+ test -n "$cxx_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+fi
+
+if test "X-g++" = "X-$cxx_vendor"; then
+
+ ###############################
+ # Architecture-specific flags #
+ ###############################
+
+ arch=
+ case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "uname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*-i386)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*|*III*|*IV*|*Athlon*)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+
+ # C++-specific
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ if test $cxx_vers_major -le 4; then
+ PROD_CXXFLAGS=
+ else
+ PROD_CXXFLAGS="-fstdarg-opt"
+ fi
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ if test $cxx_vers_major -le 4; then
+ DEBUG_CXXFLAGS=
+ else
+ DEBUG_CXXFLAGS="-ftrapv -fno-common"
+ fi
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CXXFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ if test $cxx_vers_major -le 4; then
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS=
+ else
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-Og"
+ fi
+ NO_OPT_CXXFLAGS="-O0"
+
+ ############
+ # Warnings #
+ ############
+
+# First load the C warnings then add CXX warnings (if needed)
+
+ ###########
+ # General #
+ ###########
+
+ # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later.
+ if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)"
+ H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)"
+
+ ######################
+ # Developer warnings #
+ ######################
+
+ NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
+ DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
+
+ fi
+
+ #######################
+ # gcc 4 special cases #
+ #######################
+
+ # GCC 4.8 through the end of GCC 4 series
+ if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)"
+ fi
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+ # gcc >= 4.8
+ if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8)"
+ DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)"
+ NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)"
+ fi
+
+ # gcc >= 4.9
+ if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 9; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.9)"
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.9)"
+ fi
+
+ # gcc >= 5
+ if test $cxx_vers_major -ge 5; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-5)"
+ H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-5)"
+ fi
+
+ # gcc >= 6
+ if test $cxx_vers_major -ge 6; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 6)"
+ fi
+
+ # gcc >= 7
+ if test $cxx_vers_major -ge 7; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 7)"
+ DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-7)"
+ fi
+
+ # gcc 8
+ if test $cxx_vers_major -ge 8; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)"
+ #H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)"
+ DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)"
+ NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)"
+ fi
+
+ # gcc 9
+ if test $cxx_vers_major -ge 9; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 9)"
+ fi
+
+ #################
+ # Flags are set #
+ #################
+ cxx_flags_set=yes
+fi
+
+# Clear cxx info if no flags set
+if test "X$cxx_flags_set" = "X"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 822b716..09c96ce 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -17,6 +17,20 @@
# if the compiler is not GNU; otherwise `f9x_flags_set' is set to `yes'
#
+#
+# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_gnu_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for GNU fortran
# gfortran unless a compiler version is already known
#
@@ -25,9 +39,8 @@
#
if test X = "X$f9x_flags_set"; then
f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 |grep 'gcc version' |\
- sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+ sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
if test X != "X$f9x_version"; then
-# is_mpi="`$FC $FCFLAGS $H5_FCFLAGS -help 2>&1 |grep 'link MPI'`"
f9x_vendor=`echo $f9x_version |sed 's/\([a-z]*\).*/\1/'`
f9x_version=`echo $f9x_version |sed 's/[-a-z]//g'`
if test X = "X$f9x_vendor" -a X != "X$f9x_version"; then
@@ -37,24 +50,36 @@ if test X = "X$f9x_flags_set"; then
echo "compiler '$FC' is GNU $f9x_vendor-$f9x_version"
fi
- # Some version numbers
+ # Get the compiler version numbers
f9x_vers_major=`echo $f9x_version | cut -f1 -d.`
f9x_vers_minor=`echo $f9x_version | cut -f2 -d.`
f9x_vers_patch=`echo $f9x_version | cut -f3 -d.`
test -n "$f9x_vers_major" || f9x_vers_major=0
test -n "$f9x_vers_minor" || f9x_vers_minor=0
test -n "$f9x_vers_patch" || f9x_vers_patch=0
- f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch`
fi
fi
-# Common GNU flags for various situations
if test "X-gfortran" = "X-$f9x_vendor"; then
- # Insert section about version specific problems from gnu-flags here, if
- # necessary.
+
+ FC_BASENAME=gfortran
+ F9XSUFFIXFLAG=""
+ FSEARCH_DIRS=""
+
+ # Need Fortran 2008 support for storage_size() in gcc 4.6 on
+ # (2008ts in some versions)
+ if test $f9x_vers_major -ge 8; then
+ H5_FCFLAGS="$H5_FCFLAGS -std=f2008"
+ elif test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 6; then
+ H5_FCFLAGS="$H5_FCFLAGS -std=f2008ts"
+ fi
+
+
+ ###############################
+ # Architecture-specific flags #
+ ###############################
arch=
- # Architecture-specific flags
# Nothing currently. (Uncomment code below and modify to add any)
#case "$host_os-$host_cpu" in
# *-i686)
@@ -62,30 +87,93 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# ;;
#esac
- # Host-specific flags
- # Nothing currently. (Uncomment code below and modify to add any)
- #case "`hostname`" in
- # sleipnir.ncsa.uiuc.edu)
- # arch="$arch -pipe"
- # ;;
- #esac
+ H5_FCFLAGS="$H5_FCFLAGS $arch"
- # General
- FC_BASENAME=gfortran40
- F9XSUFFIXFLAG=""
- FSEARCH_DIRS=""
- H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W"
+ ##############
+ # Production #
+ ##############
+
+ PROD_FCFLAGS=
+
+ #########
+ # Debug #
+ #########
+
+ if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then
+ DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fcheck=all"
+ else
+ DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fbounds-check"
+ fi
- # Production
- PROD_FCFLAGS="-O2 -s"
+ ###########
+ # Symbols #
+ ###########
- # Debug
- DEBUG_FCFLAGS="-g -fbounds-check"
+ NO_SYMBOLS_FCFLAGS="-s"
+ SYMBOLS_FCFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_FCFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ if test $f9x_vers_major -le 4; then
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS=
+ else
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS="-Og"
+ fi
+ NO_OPT_FCFLAGS="-O0"
+
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-general)"
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+ # gfortran >= 4.8
+ if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 8; then
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.8)"
+ fi
+
+ # gfortran 4.9 (nothing new)
+
+ # gfortran >= 5
+ if test $f9x_vers_major -ge 5; then
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-5)"
+ fi
+
+ # gfortran >= 6
+ if test $f9x_vers_major -ge 6; then
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-6)"
+ fi
+
+ # gfortran 7 (nothing new)
+
+ # gfortran >= 8
+ if test $f9x_vers_major -ge 8; then
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-8)"
+ fi
- # Profile
- PROFILE_FCFLAGS="-g -pg"
+ # gfortran 9 (nothing new)
- # Flags are set
+ #################
+ # Flags are set #
+ #################
f9x_flags_set=yes
fi
diff --git a/config/gnu-flags b/config/gnu-flags
index 008e819..ee570c5 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -7,23 +7,55 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
# This file should be sourced into configure if the compiler is the
# GNU gcc compiler or a derivative. It is careful not to do anything
-# if the compiler is not GNU; otherwise `cc_flags_set' is set to `yes'
+# if the compiler is not GNU; otherwise 'cc_flags_set' is set to 'yes'
#
+#
+# For now, do not promote any warnings to errors.
+#
+PROMOTE_ERRORS_DFLT=no
+
+#
+# This filter rewrites -Werror= as -W, in that way demoting warnings
+# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+#
+demote_errors()
+{
+ if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ sed 's,-Werror=,-W,g'
+ else
+ cat
+ fi
+}
+
+#
+# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_gnu_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for gcc
# unless a compiler version is already known
#
# cc_vendor: The compiler name: gcc
# cc_version: Version number: 2.91.60, 2.7.2.1
#
-if test X = "X$cc_flags_set"; then
+if test "X-" = "X-$cc_flags_set"; then
# PathScale compiler spits out gcc version string too. Need to
# filter it out.
# icc beginning with version 12 includes a "gcc version compatiblilty"
@@ -32,31 +64,32 @@ if test X = "X$cc_flags_set"; then
# containing 'icc version'. The cc_version for icc is correctly determined
# and flags added in the intel-flags script.
cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 | grep -v 'PathScale' |\
- grep -v 'icc version' |\
+ grep -v '^icc.*version' |\
grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
cc_version=`echo $cc_version |sed 's/[-a-z]//g'`
if test X = "X$cc_vendor" -a X != "X$cc_version"; then
- cc_vendor=gcc
+ cc_vendor=gcc
fi
if test "-" != "$cc_vendor-$cc_version"; then
- echo "compiler '$CC' is GNU $cc_vendor-$cc_version"
+ echo "compiler '$CC' is GNU $cc_vendor-$cc_version"
fi
- # Some version numbers
+ # Get the compiler version numbers
cc_vers_major=`echo $cc_version | cut -f1 -d.`
cc_vers_minor=`echo $cc_version | cut -f2 -d.`
cc_vers_patch=`echo $cc_version | cut -f3 -d.`
test -n "$cc_vers_major" || cc_vers_major=0
test -n "$cc_vers_minor" || cc_vers_minor=0
test -n "$cc_vers_patch" || cc_vers_patch=0
- cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
fi
-# Common GCC flags for various situations
-case "$cc_vendor-$cc_version" in
- gcc*)
- # Architecture-specific flags
+if test "X-gcc" = "X-$cc_vendor"; then
+
+ ###############################
+ # Architecture-specific flags #
+ ###############################
+
arch=
case "$host_os-$host_cpu" in
# FreeBSD sets the information from "uname -m" to the general machine
@@ -84,741 +117,155 @@ case "$cc_vendor-$cc_version" in
;;
esac
- # Host-specific flags
- case "`hostname`" in
- sleipnir.ncsa.uiuc.edu)
- arch="$arch -pipe"
+ case "$host_os-$host_cpu" in
+ # cygwin needs the "-std=c99" flag removed, so make
+ # a specific case for Cygwin without the flag and a default
+ # case to add the flag everywhere else
+ cygwin-*)
;;
- esac
- # General
- H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
-
- # Production
- case "$cc_vendor-$cc_version" in
- gcc-[34].*)
- PROD_CFLAGS="-O3"
- ;;
- gcc-5.*)
- PROD_CFLAGS="-O3 -fstdarg-opt"
- ;;
- *)
- PROD_CFLAGS="-O -finline-functions"
- ;;
- esac
- PROD_CPPFLAGS=
-
- # Debug
- case "$cc_vendor-$cc_version" in
- gcc-5.*)
- DEBUG_CFLAGS="-Og -g -ftrapv -fno-common"
- ;;
- *)
- DEBUG_CFLAGS="-g"
- ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS -std=c99"
+ ;;
esac
- #DEBUG_CFLAGS="$DEBUG_CFLAGS -fsanitize=undefined"
- DEBUG_CPPFLAGS=
-
- # Try out the new "stack protector" feature introduced in gcc 4.1
- # (We should also think about adding some of the other memory protection options)
- #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
-
- # Profile
- PROFILE_CFLAGS="-Og -g -pg"
- PROFILE_CPPFLAGS=
-
- # Flags are set
- cc_flags_set=yes
- ;;
-esac
-
-# Version specific GCC flags
-#
-# Please follow the pattern below by adding new versions at the top, copying
-# the information from the previous version and adding modifications to that.
-case "$cc_vendor-$cc_version" in
-
-# Closer to the gcc 5.2 release, we should check for additional flags to
-# include and break it out into it's own section, like the other versions
-# below. -QAK
- gcc-5*)
- # Append warning flags
- # Don't use the '-Wtraditional' flag, we're way past having K&R C code
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
- # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
- # from GCC's assert macro
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
-
- # Append more extra warning flags that only gcc 4.6+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
-
- # Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
-
- # Append more extra warning flags that only gcc 4.8+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
-
- # Append more extra warning flags that only gcc 4.9+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdate-time -Wopenmp-simd"
-
- # (There was no release of gcc 5.0)
-
- # Append more extra warning flags that only gcc 5.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat"
- ;;
-
- gcc-4.9*)
- # Append warning flags
- # Don't use the '-Wtraditional' flag, we're way past having K&R C code
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
- # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
- # from GCC's assert macro
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
-
- # Append more extra warning flags that only gcc 4.6+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
-
- # Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
-
- # Append more extra warning flags that only gcc 4.8+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
-
- # Append more extra warning flags that only gcc 4.9+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdate-time -Wopenmp-simd"
- ;;
-
- gcc-4.8*)
- # Append warning flags
- # Don't use the '-Wtraditional' flag, we're way past having K&R C code
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
- # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
- # from GCC's assert macro
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init"
-
- # Append more extra warning flags that only gcc 4.6+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
-
- # Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
-
- # Append more extra warning flags that only gcc 4.8+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
- ;;
-
- gcc-4.7*)
- # Append warning flags
- # Don't use the '-Wtraditional' flag, we're way past having K&R C code
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
- # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
- # from GCC's assert macro
- # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- # (this warning was removed in gcc 4.5+)
- #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
-
- # Append more extra warning flags that only gcc 4.6+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
- # Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
- ;;
+ H5_CFLAGS="$H5_CFLAGS $arch"
- gcc-4.6*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ ##############
+ # Production #
+ ##############
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- # (this warning was removed in gcc 4.5+)
- #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
-
- # Append more extra warning flags that only gcc 4.6+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
- ;;
-
- gcc-4.5*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- # (this warning was removed in gcc 4.5+)
- #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
-
- # Append more extra warning flags that only gcc 4.5+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
- ;;
-
- gcc-4.4*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
-
- # Append more extra warning flags that only gcc 4.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
- ;;
-
- gcc-4.3*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning appears to be reliable now...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
-
- # Append more extra warning flags that only gcc 4.3+ know about
- #
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... -QAK
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wvla"
- ;;
-
- gcc-4.2*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning does not appear to be reliable yet...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc 4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var"
-
- # Append more extra warning flags that only gcc 4.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
- ;;
-
- gcc-4.1.*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
-
- # Enable more format checking flags, beyond the basic -Wformat included
- # in -Wall
- H5_CFLAGS="$H5_CFLAGS -Wformat=2"
-
- # The "unreachable code" warning does not appear to be reliable yet...
- H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
-
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
-
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
-
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
-
- # Append more extra warning flags that only gcc 4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
-
- # Append more extra warning flags that only gcc 4.1+ know about
- H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var"
- ;;
-
- gcc-4.0*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+ # NDEBUG is handled explicitly by the configure script
+ if test $cc_vers_major -le 4; then
+ PROD_CFLAGS=
+ else
+ PROD_CFLAGS="-fstdarg-opt"
+ fi
- # The "format=2" warning generates too many warnings about valid
- # usage in the library.
- #CFLAGS="$CFLAGS -Wformat=2"
+ #########
+ # Debug #
+ #########
- # The "unreachable code" warning does not appear to be reliable yet...
- #CFLAGS="$CFLAGS -Wunreachable-code"
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ if test $cc_vers_major -le 4; then
+ DEBUG_CFLAGS=
+ else
+ DEBUG_CFLAGS="-ftrapv -fno-common"
+ fi
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+ ###########
+ # Symbols #
+ ###########
- # Append warning flags from gcc-3.4* case
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+ NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g -fno-omit-frame-pointer"
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+ #############
+ # Profiling #
+ #############
- # Append more extra warning flags that only gcc 4.0+ know about
- H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
- ;;
+ PROFILE_CFLAGS="-pg"
- gcc-3.4*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ ################
+ # Optimization #
+ ################
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ if test $cc_vers_major -le 4; then
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS=
+ else
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-Og"
+ fi
+ NO_OPT_CFLAGS="-O0"
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+ ############
+ # Warnings #
+ ############
- # The "format=2" warning generates too many warnings about valid
- # usage in the library.
- #CFLAGS="$CFLAGS -Wformat=2"
+ ###########
+ # General #
+ ###########
- # The "unreachable code" warning does not appear to be reliable yet...
- #CFLAGS="$CFLAGS -Wunreachable-code"
+ # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later.
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)"
+ H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)"
- # Append warning flags from gcc-3.3* case
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+ ######################
+ # Developer warnings #
+ ######################
- # Append more extra warning flags that only gcc3.4+ know about
- H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+ NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general)
+ DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general)
- # Replace old -W flag with new -Wextra flag
- H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
- ;;
+ fi
- gcc-3.3*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ #######################
+ # gcc 4 special cases #
+ #######################
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ # GCC 4.8 through the end of GCC 4 series
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8-4.last)"
+ fi
- # Append warning flags from gcc-3.2* case
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+ #############################
+ # Version-specific warnings #
+ #############################
- # The "format=2" warning generates too many warnings about valid
- # usage in the library.
- #CFLAGS="$CFLAGS -Wformat=2"
+ # gcc >= 4.8
+ if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8)"
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-4.8)"
+ NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-4.8)"
+ fi
- # The "unreachable code" warning does not appear to be reliable yet...
- #CFLAGS="$CFLAGS -Wunreachable-code"
+ # gcc >= 4.9
+ if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 9; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.9)"
+ fi
- # Append more extra warning flags that only gcc3.3+ know about
- H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
- ;;
+ # gcc >= 5
+ if test $cc_vers_major -ge 5; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 5)"
+ H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-5)"
+ fi
- gcc-3.2*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
-
- # Append warning flags from gcc-3* case
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
-
- # Append more extra warning flags that only gcc3.2+ know about
- H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+ # gcc >= 6
+ if test $cc_vers_major -ge 6; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 6)"
+ fi
- # The "format=2" warning generates too many warnings about valid
- # usage in the library.
- #CFLAGS="$CFLAGS -Wformat=2"
+ # gcc >= 7
+ if test $cc_vers_major -ge 7; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 7)"
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-7)"
+ fi
- # The "unreachable code" warning does not appear to be reliable yet...
- #CFLAGS="$CFLAGS -Wunreachable-code"
- ;;
+ # gcc 8
+ if test $cc_vers_major -ge 8; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 8)"
+ H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-8)"
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-8)"
+ NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-8)"
+ fi
- gcc-3*)
- # Disable warnings about using 'long long' type
- H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ # gcc 9
+ if test $cc_vers_major -ge 9; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9)"
+ fi
- # Append some extra warning flags that only gcc3+ know about
- # (don't use -Wpadded flag for normal builds, many of the warnings its
- # issuing can't be fixed and they are making it hard to detect other,
- # more important warnings)
- #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
- ;;
-esac
+ #################
+ # Flags are set #
+ #################
+ cc_flags_set=yes
+fi
# Clear cc info if no flags set
if test "X$cc_flags_set" = "X"; then
- cc_vendor=
- cc_version=
+ cc_vendor=
+ cc_version=
fi
+
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8
new file mode 100644
index 0000000..c7e3dd1
--- /dev/null
+++ b/config/gnu-warnings/4.8
@@ -0,0 +1,25 @@
+# warning flags added for GCC >= 4.3
+-Wlarger-than=2560
+-Wlogical-op
+
+# warning flags added for GCC >= 4.4
+-Wframe-larger-than=16384
+-Wpacked-bitfield-compat
+-Wsync-nand
+
+# warning flag added for GCC >= 4.5
+-Wstrict-overflow=5
+
+# warning flags added for GCC >= 4.6
+-Wdouble-promotion
+-Wtrampolines
+
+# warning flag added for GCC >= 4.7
+#
+# -Wstack-usage=8192 warnings need to be swept up on a branch so
+# that we can stop burdening the whole development team.
+#
+-Wstack-usage=8192
+
+# warning flag added for GCC >= 4.8
+-Wmaybe-uninitialized
diff --git a/config/gnu-warnings/4.8-4.last b/config/gnu-warnings/4.8-4.last
new file mode 100644
index 0000000..2db90fb
--- /dev/null
+++ b/config/gnu-warnings/4.8-4.last
@@ -0,0 +1,3 @@
+# -Wvla was later incorporated into -Wpedantic and
+# only needs to be specified explicitly for gcc 4
+-Wvla
diff --git a/config/gnu-warnings/4.9 b/config/gnu-warnings/4.9
new file mode 100644
index 0000000..78aa929
--- /dev/null
+++ b/config/gnu-warnings/4.9
@@ -0,0 +1 @@
+-Wdate-time
diff --git a/config/gnu-warnings/5 b/config/gnu-warnings/5
new file mode 100644
index 0000000..32cb196
--- /dev/null
+++ b/config/gnu-warnings/5
@@ -0,0 +1,2 @@
+-Warray-bounds=2
+-Wc99-c11-compat
diff --git a/config/gnu-warnings/6 b/config/gnu-warnings/6
new file mode 100644
index 0000000..736a446
--- /dev/null
+++ b/config/gnu-warnings/6
@@ -0,0 +1,9 @@
+#
+# Careful! -Wduplicated-cond, combined with HDF5's heavy use of
+# macros, can make a lot of noise.
+#
+-Wduplicated-cond
+-Whsa
+-Wnormalized
+-Wnull-dereference
+-Wunused-const-variable
diff --git a/config/gnu-warnings/7 b/config/gnu-warnings/7
new file mode 100644
index 0000000..266f5c1
--- /dev/null
+++ b/config/gnu-warnings/7
@@ -0,0 +1,7 @@
+-Walloca
+-Walloc-zero
+-Wduplicated-branches
+-Wformat-overflow=2
+-Wformat-truncation=1
+-Wimplicit-fallthrough=5
+-Wrestrict
diff --git a/config/gnu-warnings/8 b/config/gnu-warnings/8
new file mode 100644
index 0000000..5e7519d
--- /dev/null
+++ b/config/gnu-warnings/8
@@ -0,0 +1,3 @@
+-Wattribute-alias
+-Wcast-align=strict
+-Wshift-overflow=2
diff --git a/config/gnu-warnings/9 b/config/gnu-warnings/9
new file mode 100644
index 0000000..c084350
--- /dev/null
+++ b/config/gnu-warnings/9
@@ -0,0 +1,2 @@
+-Wattribute-alias=2
+-Wmissing-profile
diff --git a/config/gnu-warnings/cxx-4.9 b/config/gnu-warnings/cxx-4.9
new file mode 100644
index 0000000..046d6db
--- /dev/null
+++ b/config/gnu-warnings/cxx-4.9
@@ -0,0 +1 @@
+-Wopenmp-simd
diff --git a/config/gnu-warnings/cxx-5 b/config/gnu-warnings/cxx-5
new file mode 100644
index 0000000..723e448
--- /dev/null
+++ b/config/gnu-warnings/cxx-5
@@ -0,0 +1 @@
+-Warray-bounds=2
diff --git a/config/gnu-warnings/cxx-error-5 b/config/gnu-warnings/cxx-error-5
new file mode 100644
index 0000000..8cc8c9d
--- /dev/null
+++ b/config/gnu-warnings/cxx-error-5
@@ -0,0 +1,11 @@
+#
+# In GCC 4.4.7, the compiler gripes about shadowed global
+# declarations when a local variable uses the name of a
+# function that's in a system header file. For some reason,
+# later versions of GCC (e.g., 5.2.0) don't complain about
+# the shadowed globals. Maybe later versions are less fussy?
+# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
+# is not a supported compiler, so let us promote shadowed globals
+# warnings to errors only for GCC 5 and later.
+#
+-Werror=shadow
diff --git a/config/gnu-warnings/cxx-error-general b/config/gnu-warnings/cxx-error-general
new file mode 100644
index 0000000..85cd9a3
--- /dev/null
+++ b/config/gnu-warnings/cxx-error-general
@@ -0,0 +1,32 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tcompound.cpp
+# -Werror=cast-align
+-Wcast-align
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp
+# -Werror=missing-declarations
+-Wmissing-declarations
+-Werror=packed
+-Werror=redundant-decls
+-Werror=switch
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tattr.cpp
+# -Werror=unused-but-set-variable
+-Wunused-but-set-variable
+-Werror=unused-function
+-Werror=unused-variable
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp
+# -Werror=unused-parameter
+-Wunused-parameter
+#
+# Other files not compatible
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/titerate.cpp,c++/test/tarray.cpp
+# -Werror=missing-declarations
+# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp
+# -Werror=unused-parameter
diff --git a/config/gnu-warnings/cxx-general b/config/gnu-warnings/cxx-general
new file mode 100644
index 0000000..9548cc0
--- /dev/null
+++ b/config/gnu-warnings/cxx-general
@@ -0,0 +1,31 @@
+# Note that some of the flags listed here really should be developer
+# flags (listed in separate files, gnu-warnings-developer*) but we put
+# them here because they are not raised by the current code and we'd like to
+# know if they do start showing up.
+#
+# NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+# warnings that are emitted. If you need it, add it from the
+# environment variable at configure time.
+-Wall
+-Wcast-qual
+-Wconversion
+-Wctor-dtor-privacy
+-Weffc++
+-Wextra
+-Wfloat-equal
+-Wformat=2
+-Winit-self
+-Winvalid-pch
+-Wmissing-include-dirs
+-Wno-format-nonliteral
+-Wnon-virtual-dtor
+-Wold-style-cast
+-Woverloaded-virtual
+-Wreorder
+-Wshadow
+-Wsign-promo
+##-Wunreachable-code
+-Wundef
+##-Wvariadic-macros
+-Wwrite-strings
+-pedantic
diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8
new file mode 100644
index 0000000..fd76f6c
--- /dev/null
+++ b/config/gnu-warnings/developer-4.8
@@ -0,0 +1,23 @@
+# developer warning flags added for GCC >= 4.5
+#
+# -Wjump-misses-init makes lots of noise for a questionable benefit.
+# Can jumping over an initialization in C cause any harm, if
+# the variable is never *used* before it has been initialized?
+#
+-Wjump-misses-init
+-Wunsuffixed-float-constants
+
+# developer warning flag added for GCC >= 4.6
+-Wsuggest-attribute=const
+
+# developer warning flags added for GCC >= 4.7
+-Wsuggest-attribute=noreturn
+-Wsuggest-attribute=pure
+#
+# It's not clear that -Wvector-operation-performance warnings are
+# actionable, so they are demoted to "developer" warnings.
+#
+-Wvector-operation-performance
+
+# developer warning flag added for GCC >= 4.8
+-Wsuggest-attribute=format
diff --git a/config/gnu-warnings/developer-7 b/config/gnu-warnings/developer-7
new file mode 100644
index 0000000..2a3ce7e
--- /dev/null
+++ b/config/gnu-warnings/developer-7
@@ -0,0 +1 @@
+-Wstringop-overflow=2
diff --git a/config/gnu-warnings/developer-8 b/config/gnu-warnings/developer-8
new file mode 100644
index 0000000..a2ba7ca
--- /dev/null
+++ b/config/gnu-warnings/developer-8
@@ -0,0 +1,3 @@
+-Wstringop-overflow=4
+-Wsuggest-attribute=cold
+-Wsuggest-attribute=malloc
diff --git a/config/gnu-warnings/developer-general b/config/gnu-warnings/developer-general
new file mode 100644
index 0000000..b34c4b7
--- /dev/null
+++ b/config/gnu-warnings/developer-general
@@ -0,0 +1,13 @@
+# (suggestions from gcc, not code problems)
+# NOTE: -Wformat-nonliteral added back in here (from being disabled in
+# H5_CFLAGS)
+-Waggregate-return
+-Wdisabled-optimization
+-Wformat-nonliteral
+-Winline
+-Wmissing-format-attribute
+-Wmissing-noreturn
+-Wswitch-default
+-Wswitch-enum
+-Wunsafe-loop-optimizations
+-Wunused-macros
diff --git a/config/gnu-warnings/error-5 b/config/gnu-warnings/error-5
new file mode 100644
index 0000000..f7e1138
--- /dev/null
+++ b/config/gnu-warnings/error-5
@@ -0,0 +1,12 @@
+-Werror=incompatible-pointer-types
+#
+# In GCC 4.4.7, the compiler gripes about shadowed global
+# declarations when a local variable uses the name of a
+# function that's in a system header file. For some reason,
+# later versions of GCC (e.g., 5.2.0) don't complain about
+# the shadowed globals. Maybe later versions are less fussy?
+# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
+# is not a supported compiler, so let us promote shadowed globals
+# warnings to errors only for GCC 5 and later.
+#
+-Werror=shadow
diff --git a/config/gnu-warnings/error-8 b/config/gnu-warnings/error-8
new file mode 100644
index 0000000..2f54a4d
--- /dev/null
+++ b/config/gnu-warnings/error-8
@@ -0,0 +1,25 @@
+# NOTE: src/ files are not compatible with these warnings as errors
+# src/H5Dchunk.c
+# -Werror=cast-function-type
+-Wcast-function-type
+#
+# For GCC 8, promote maybe-initialized warnings to an error. GCC 8
+# reports 0 maybe-uninitialized warnings where earlier versions
+# make many false reports. GCC 8 seems to analyze calls to static
+# in order to detect initializations that occur there. It's possible
+# that GCC 8 only performs that analysis at -O3, though.
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDlog.c,
+# -Werror=maybe-uninitialized
+-Wmaybe-uninitialized
+# NOTE: src/ files are not compatible with these warnings as errors
+# src/H5Shyper.c,src/H5SL.c,src/H5Shyper.c
+# -Werror=maybe-uninitialized
+# NOTE: Test files are not compatible with these warnings as errors
+# test/cache_common.c,
+# -Werror=maybe-uninitialized
+# NOTE: hl/src/ files are not compatible with these warnings as errors
+# hl/src/H5DS.c,
+# -Werror=maybe-uninitialized
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
new file mode 100644
index 0000000..4b822a5
--- /dev/null
+++ b/config/gnu-warnings/error-general
@@ -0,0 +1,94 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+-Werror=bad-function-cast
+-Werror=declaration-after-statement
+-Werror=implicit-function-declaration
+-Werror=missing-declarations
+-Werror=missing-prototypes
+-Werror=nested-externs
+-Werror=old-style-definition
+-Werror=packed
+-Werror=pointer-sign
+-Werror=pointer-to-int-cast
+-Werror=strict-prototypes
+-Werror=switch
+#
+#-Werror=discarded-qualifiers
+#
+# NOTE: hl/src/H5LTparse.c file is not compatible with these warnings as errors
+# -Werror=redundant-decls
+#
+-Wredundant-decls
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
+# -Werror=unused-function
+#
+-Wunused-function
+#
+# H5FDdrvr_module.h
+# -Werror=unused-variable
+#
+-Wunused-variable
+#
+# H5VLpassthru.c
+# -Werror=unused-parameter
+#
+-Wunused-parameter
+#
+#
+#
+# NOTE: Tools files are not compatible with these warnings as errors
+# lib/h5tools.c
+# -Werror=cast-align
+#
+-Wcast-align
+#
+# lib/h5diff_array.c
+# -Werror=unused-but-set-variable
+#
+-Wunused-but-set-variable
+#
+# lib/h5tools_utils.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: JNI files are not compatible with these warnings as errors
+# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
+# jni/h5sImp.c,jni/h5tImp.c
+# -Werror=cast-align
+# jni/h5util.c
+# -Werror=format(-overflow)
+#
+-Wformat
+#
+#
+#Examples and tests do not use the same set of extensive warning flags as libraries
+# Here is a list of tests and examples that have issues with the stricter warnings as error
+#
+# NOTE: Test files are not compatible with these warnings as errors
+# thread_id.c,
+# -Werror=unused-function
+# dsets.c
+# -Werror=unused-parameter
+# external.c,perform/sio_engine.c
+# -Werror=format(-truncation)
+#
+#
+# NOTE: Examples files are not compatible with these warnings as errors
+# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
+# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
+# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
+# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
+# h5_reference_deprec.c
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=strict-prototypes
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=old-style-definition
+# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
+# -Werror=unused-variable
+# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
+# -Werror=unused-parameter
+
diff --git a/config/gnu-warnings/general b/config/gnu-warnings/general
new file mode 100644
index 0000000..a7a20b7
--- /dev/null
+++ b/config/gnu-warnings/general
@@ -0,0 +1,32 @@
+# Note that some of the flags listed here really should be developer
+# flags (listed in separate files, gnu-warnings-developer*) but we put
+# them here because they are not raised by the current code and we'd like to
+# know if they do start showing up.
+#
+# NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+# warnings that are emitted. If you need it, add it from the
+# environment variable at configure time.
+-Wall
+-Wcast-qual
+-Wconversion
+-Wextra
+-Wfloat-equal
+-Wformat=2
+-Winit-self
+-Winvalid-pch
+-Wmissing-include-dirs
+#
+# NOTE: Due to the divergence in the C and C++, we're dropping support for
+# compiling the C library with a C++ compiler and dropping the -Wc++-compat
+# warning.
+#
+-Wno-c++-compat
+#
+# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
+# it to the developer flags.
+#
+-Wno-format-nonliteral
+-Wshadow
+-Wundef
+-Wwrite-strings
+-pedantic
diff --git a/config/gnu-warnings/gfort-4.8 b/config/gnu-warnings/gfort-4.8
new file mode 100644
index 0000000..9d880de
--- /dev/null
+++ b/config/gnu-warnings/gfort-4.8
@@ -0,0 +1,17 @@
+# warning flags added for gfortran >= 4.4
+-Warray-temporaries
+-Wintrinsics-std
+
+# warning flag added for gfortran >= 4.5
+-Wimplicit-procedure
+
+# warning flags added for gfortran >= 4.7
+-Wreal-q-constant
+-Wfunction-elimination
+
+# warning flags added for gfortran >= 4.8
+-Wrealloc-lhs
+-Wrealloc-lhs-all
+# Turn off warnings for passing non-ANSI types to BIND().
+# We pass a lot of hid_t, etc. types so this generates a LOT of spurious warnings.
+-Wno-c-binding-type
diff --git a/config/gnu-warnings/gfort-5 b/config/gnu-warnings/gfort-5
new file mode 100644
index 0000000..c5d3850
--- /dev/null
+++ b/config/gnu-warnings/gfort-5
@@ -0,0 +1 @@
+-Wuse-without-only
diff --git a/config/gnu-warnings/gfort-6 b/config/gnu-warnings/gfort-6
new file mode 100644
index 0000000..f70466c
--- /dev/null
+++ b/config/gnu-warnings/gfort-6
@@ -0,0 +1 @@
+-Winteger-division
diff --git a/config/gnu-warnings/gfort-8 b/config/gnu-warnings/gfort-8
new file mode 100644
index 0000000..5097365
--- /dev/null
+++ b/config/gnu-warnings/gfort-8
@@ -0,0 +1 @@
+-Wfrontend-loop-interchange
diff --git a/config/gnu-warnings/gfort-general b/config/gnu-warnings/gfort-general
new file mode 100644
index 0000000..4028316
--- /dev/null
+++ b/config/gnu-warnings/gfort-general
@@ -0,0 +1,12 @@
+# Note that some of the flags listed here really should be developer
+# flags (listed in separate files, gnu-warnings-developer*) but we put
+# them here because they are not raised by the current code and we'd like to
+# know if they do start showing up.
+-Waliasing
+-Wall
+-Wcharacter-truncation
+-Wextra
+-Wimplicit-interface
+-Wsurprising
+-Wunderflow
+-pedantic
diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8
new file mode 100644
index 0000000..1e29c78
--- /dev/null
+++ b/config/gnu-warnings/no-developer-4.8
@@ -0,0 +1,13 @@
+# no-developer warning flag added for GCC >= 4.5
+-Wno-jump-misses-init
+-Wno-unsuffixed-float-constants
+
+# no-developer warning flag added for GCC >= 4.6
+-Wno-suggest-attribute=const
+
+# no-developer warning flags added for GCC >= 4.7
+-Wno-suggest-attribute=noreturn
+-Wno-suggest-attribute=pure
+
+# no-developer warning flag added for GCC >= 4.8
+-Wno-suggest-attribute=format
diff --git a/config/gnu-warnings/no-developer-8 b/config/gnu-warnings/no-developer-8
new file mode 100644
index 0000000..2134bad
--- /dev/null
+++ b/config/gnu-warnings/no-developer-8
@@ -0,0 +1,2 @@
+-Wno-suggest-attribute=cold
+-Wno-suggest-attribute=malloc
diff --git a/config/gnu-warnings/no-developer-general b/config/gnu-warnings/no-developer-general
new file mode 100644
index 0000000..18831dd
--- /dev/null
+++ b/config/gnu-warnings/no-developer-general
@@ -0,0 +1,8 @@
+-Wno-aggregate-return
+-Wno-inline
+-Wno-missing-format-attribute
+-Wno-missing-noreturn
+# NOTE: -pedantic includes -Woverlength-strings which triggers a warning
+# regarding the library settings string (H5libhdf5_settings). We'll turn
+# it off here but leave it on in the developer flags.
+-Wno-overlength-strings
diff --git a/config/ibm-aix b/config/ibm-aix
index 5515faf..c046b83 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/ibm-flags b/config/ibm-flags
index 85ce130..5c12b79 100644
--- a/config/ibm-flags
+++ b/config/ibm-flags
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/intel-fflags b/config/intel-fflags
index 5fbdcc1..b759dfa 100644
--- a/config/intel-fflags
+++ b/config/intel-fflags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -17,6 +17,20 @@
# if the compiler is not Intel; otherwise `f9x_flags_set' is set to `yes'
#
+#
+# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_intel_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for ifort
# ifort unless a compiler version is already known
#
@@ -44,8 +58,8 @@ fi
# Common Intel flags for various situations
if test "X-ifort" = "X-$f9x_vendor"; then
- # Insert section about version specific problems from gnu-flags here, if
- # necessary.
+ # Insert section about version specific problems from compiler flags here,
+ # if necessary.
arch=
# Architecture-specific flags
@@ -68,19 +82,31 @@ if test "X-ifort" = "X-$f9x_vendor"; then
FC_BASENAME=ifort
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
- H5_FCFLAGS="$H5_FCFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)"
# Production
- PROD_FCFLAGS="-O3"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -check all"
+ DEBUG_FCFLAGS="-check all"
- # Profile
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS=
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
- # Flags are set
+ #################
+ # Flags are set #
+ #################
f9x_flags_set=yes
fi
diff --git a/config/intel-flags b/config/intel-flags
index af6b955..409ffe9 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -17,6 +17,20 @@
# if the compiler is not Intel; otherwise `cc_flags_set' is set to `yes'
#
+#
+# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_intel_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for icc
# icc unless a compiler version is already known
#
@@ -66,46 +80,64 @@ if test "X-icc" = "X-$cc_vendor"; then
# General
# Default to C99 standard.
- H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch}"
+ H5_CFLAGS="$H5_CFLAGS $arch -std=c99"
- # Production is set to default; see settings for specific version further down
- PROD_CFLAGS="-O"
- PROD_CPPFLAGS=
+ # Production
+ PROD_CFLAGS=
# Debug
- DEBUG_CFLAGS="-Wcheck -Wall -g -O0"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
+
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS="-Wl,-s"
- # Profile
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
- PROFILE_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
- # Flags are set
- cc_flags_set=yes
+ # Optimization
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
-fi
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general)"
+
+ #############################
+ # Version-specific warnings #
+ #############################
-# Version specific ICC flags
-#
-# Please follow the pattern below by adding new versions at the top, copying
-# the information from the previous version and adding modifications to that.
-# The default at the bottom will apply if no earlier version matches.
case "$cc_vendor-$cc_version" in
+ icc-1[5-6]*)
+ H5_CFLAGS="$H5_CFLAGS -Wcomment -Wdeprecated -Wextra-tokens -Wformat -Wformat-security -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-variable -Wwrite-strings"
+ ;;
icc-10*)
- PROD_CFLAGS="-O1 -Wl,-s"
+ HIGH_OPT_CFLAGS="-O1"
;;
icc-8.0*)
- # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2.
- PROD_CFLAGS="-O2 -Wl,-s"
- ;;
+ # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2.
+ HIGH_OPT_CFLAGS="-O2"
+ ;;
icc-*)
- # -s became obsolete; we also fixed bugs that allow us to enable higher level
- # of optimization starting with 1.8.7
- PROD_CFLAGS="-O3"
;;
esac
+ #################
+ # Flags are set #
+ #################
+ cc_flags_set=yes
+
+fi
+
# Clear cc info if no flags set
if test "X-$cc_flags_set" = "X-"; then
cc_vendor=
diff --git a/config/intel-warnings/general b/config/intel-warnings/general
new file mode 100644
index 0000000..d0b2e25
--- /dev/null
+++ b/config/intel-warnings/general
@@ -0,0 +1,2 @@
+-Wall
+-Wcheck \ No newline at end of file
diff --git a/config/intel-warnings/ifort-general b/config/intel-warnings/ifort-general
new file mode 100644
index 0000000..a9da0e5
--- /dev/null
+++ b/config/intel-warnings/ifort-general
@@ -0,0 +1 @@
+-warn:all
diff --git a/config/linux-gnu b/config/linux-gnu
index 243b087..117fada 100644
--- a/config/linux-gnu
+++ b/config/linux-gnu
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/linux-gnuaout b/config/linux-gnuaout
index 243b087..117fada 100644
--- a/config/linux-gnuaout
+++ b/config/linux-gnuaout
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/linux-gnueabihf b/config/linux-gnueabihf
new file mode 100644
index 0000000..596bf3a
--- /dev/null
+++ b/config/linux-gnueabihf
@@ -0,0 +1,16 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+# ARM for Raspberry Pi, etc.
+# This is the same as linux-gnulibc1
+
+. $srcdir/config/linux-gnulibc1
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index ce07853..a02b08a 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -42,6 +42,9 @@ fi
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
+# Figure out Clang C compiler flags
+. $srcdir/config/clang-flags
+
# Use default Fortran 90 compiler according to what C compiler is used.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
@@ -49,7 +52,7 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
- pgcc*)
+ pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
@@ -61,6 +64,11 @@ if test "X-" = "X-$FC"; then
FC=mpif90
FC_BASENAME=mpif90
;;
+ clang*)
+ # clang has no fortran compiler. Use gfortran.
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
esac
else
case $FC in
@@ -98,12 +106,14 @@ else
echo "compiler '$FC' is $fc_version_info"
$RM $tmpfile
;;
-
*)
;;
esac
fi
+# Figure out GNU FC compiler flags
+. $srcdir/config/gnu-fflags
+
# Figure out PGI FC compiler flags
. $srcdir/config/pgi-fflags
@@ -119,10 +129,10 @@ case $FC_BASENAME in
#
f95)
# Set required flag for compiling C stubs
- H5_CFLAGS="$H5_CFLAGS"
+ H5_CFLAGS="$H5_CFLAGS"
F9XSUFFIXFLAG=""
-# We force compiler to use upper case for external names
+# We force compiler to use upper case for external names
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS"
FSEARCH_DIRS=""
@@ -173,6 +183,12 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi
+# Figure out GNU CXX compiler flags
+. $srcdir/config/gnu-cxxflags
+
+# Figure out Clang CXX compiler flags
+. $srcdir/config/clang-cxxflags
+
# compiler version strings
# check if the compiler_version_info is already set
@@ -202,6 +218,11 @@ case $CC in
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;
+ *clang*)
+ cc_version_info="`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ ;;
+
*)
echo "No match to get cc_version_info for $CC"
;;
@@ -296,6 +317,11 @@ case $CXX in
cxx_version_info=`echo $cxx_version_info`
;;
+ *clang++*)
+ cxx_version_info="`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ ;;
+
*)
echo "No match to get cxx_version_info for $CXX"
;;
diff --git a/config/linux-gnulibc2 b/config/linux-gnulibc2
index 01a0d20..c7447a1 100644
--- a/config/linux-gnulibc2
+++ b/config/linux-gnulibc2
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 17c033e..1f2646e 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -8,7 +8,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
##
@@ -16,9 +16,9 @@
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
## If the API changes *at all*, increment LT_VERS_INTERFACE and
## reset LT_VERS_REVISION to 0.
@@ -40,26 +40,26 @@ LT_VERS_AGE = 3
## Version numbers for wrapper shared library files.
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
diff --git a/config/netbsd b/config/netbsd
new file mode 100644
index 0000000..dae3734
--- /dev/null
+++ b/config/netbsd
@@ -0,0 +1,56 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file is part of the HDF5 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compile modes.
+#
+# See BlankForm in this directory for details.
+
+# The default compiler is `gcc'
+if test "X-" = "X-$CC"; then
+ CC=gcc
+ CC_BASENAME=gcc
+fi
+
+# Figure out C compiler flags
+. $srcdir/config/gnu-flags
+
+# Figure out Intel C compiler flags
+. $srcdir/config/intel-flags
+
+# The default Fortran 90 compiler
+if test "X-" = "X-$FC"; then
+ case $CC_BASENAME in
+ gcc*|pgcc*)
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
+ icc*)
+ FC=ifort
+ FC_BASENAME=ifort
+ ;;
+ mpicc*)
+ FC=mpif90
+ FC_BASENAME=mpif90
+ ;;
+ esac
+fi
+
+# Figure out FORTRAN compiler flags
+. $srcdir/config/gnu-fflags
+
+# Figure out Intel F90 compiler flags
+. $srcdir/config/intel-fflags
+
diff --git a/config/pgi-fflags b/config/pgi-fflags
index dec139d..3e5529d 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/pgi-flags b/config/pgi-flags
index b8ca4b8..b426558 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/sanitizer/LICENSE b/config/sanitizer/LICENSE
new file mode 100644
index 0000000..895657b
--- /dev/null
+++ b/config/sanitizer/LICENSE
@@ -0,0 +1,174 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability. \ No newline at end of file
diff --git a/config/sanitizer/README.md b/config/sanitizer/README.md
new file mode 100644
index 0000000..0d5fb6c
--- /dev/null
+++ b/config/sanitizer/README.md
@@ -0,0 +1,307 @@
+# CMake Scripts <!-- omit in toc -->
+
+[![pipeline status](https://git.stabletec.com/other/cmake-scripts/badges/master/pipeline.svg)](https://git.stabletec.com/other/cmake-scripts/commits/master)
+[![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://git.stabletec.com/other/cmake-scripts/blob/master/LICENSE)
+
+This is a collection of quite useful scripts that expand the possibilities for building software with CMake, by making some things easier and otherwise adding new build types
+
+- [C++ Standards `c++-standards.cmake`](#c-standards-c-standardscmake)
+- [Sanitizer Builds `sanitizers.cmake`](#sanitizer-builds-sanitizerscmake)
+- [Code Coverage `code-coverage.cmake`](#code-coverage-code-coveragecmake)
+ - [Added Targets](#added-targets)
+ - [Usage](#usage)
+ - [Example 1 - All targets instrumented](#example-1---all-targets-instrumented)
+ - [1a - Via global command](#1a---via-global-command)
+ - [1b - Via target commands](#1b---via-target-commands)
+ - [Example 2: Target instrumented, but with regex pattern of files to be excluded from report](#example-2-target-instrumented-but-with-regex-pattern-of-files-to-be-excluded-from-report)
+ - [Example 3: Target added to the 'ccov' and 'ccov-all' targets](#example-3-target-added-to-the-ccov-and-ccov-all-targets)
+- [Compiler Options `compiler-options.cmake`](#compiler-options-compiler-optionscmake)
+- [Dependency Graph `dependency-graph.cmake`](#dependency-graph-dependency-graphcmake)
+ - [Required Arguments](#required-arguments)
+ - [OUTPUT_TYPE *STR*](#output_type-str)
+ - [Optional Arguments](#optional-arguments)
+ - [ADD_TO_DEP_GRAPH](#add_to_dep_graph)
+ - [TARGET_NAME *STR*](#target_name-str)
+ - [OUTPUT_DIR *STR*](#output_dir-str)
+- [Doxygen `doxygen.cmake`](#doxygen-doxygencmake)
+ - [Optional Arguments](#optional-arguments-1)
+ - [ADD_TO_DOC](#add_to_doc)
+ - [INSTALLABLE](#installable)
+ - [PROCESS_DOXYFILE](#process_doxyfile)
+ - [TARGET_NAME *STR*](#target_name-str-1)
+ - [OUTPUT_DIR *STR*](#output_dir-str-1)
+ - [INSTALL_PATH *STR*](#install_path-str)
+ - [DOXYFILE_PATH *STR*](#doxyfile_path-str)
+- [Prepare the Catch Test Framework `prepare_catch.cmake`](#prepare-the-catch-test-framework-prepare_catchcmake)
+ - [Optional Arguments](#optional-arguments-2)
+ - [COMPILED_CATCH](#compiled_catch)
+ - [CATCH1](#catch1)
+ - [CLONE](#clone)
+- [Tools `tools.cmake`](#tools-toolscmake)
+ - [clang-tidy](#clang-tidy)
+ - [include-what-you-use](#include-what-you-use)
+ - [cppcheck](#cppcheck)
+- [Formatting `formatting.cmake`](#formatting-formattingcmake)
+ - [clang-format](#clang-format)
+ - [cmake-format](#cmake-format)
+
+## C++ Standards [`c++-standards.cmake`](c++-standards.cmake)
+
+Using the functions `cxx_11()`, `cxx_14()`, `cxx_17()` or `cxx_20()` this adds the appropriate flags for both unix and MSVC compilers, even for those before 3.11 with improper support.
+
+These obviously force the standard to be required, and also disables compiler-specific extensions, ie `--std=gnu++11`. This helps to prevent fragmenting the code base with items not available elsewhere, adhering to the agreed C++ standards only.
+
+## Sanitizer Builds [`sanitizers.cmake`](sanitizers.cmake)
+
+Sanitizers are tools that perform checks during a program’s runtime and returns issues, and as such, along with unit testing, code coverage and static analysis, is another tool to add to the programmers toolbox. And of course, like the previous tools, are tragically simple to add into any project using CMake, allowing any project and developer to quickly and easily use.
+
+A quick rundown of the tools available, and what they do:
+- [LeakSanitizer](https://clang.llvm.org/docs/LeakSanitizer.html) detects memory leaks, or issues where memory is allocated and never deallocated, causing programs to slowly consume more and more memory, eventually leading to a crash.
+- [AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html) is a fast memory error detector. It is useful for detecting most issues dealing with memory, such as:
+ - Out of bounds accesses to heap, stack, global
+ - Use after free
+ - Use after return
+ - Use after scope
+ - Double-free, invalid free
+ - Memory leaks (using LeakSanitizer)
+- [ThreadSanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) detects data races for multi-threaded code.
+- [UndefinedBehaviourSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) detects the use of various features of C/C++ that are explicitly listed as resulting in undefined behaviour. Most notably:
+ - Using misaligned or null pointer.
+ - Signed integer overflow
+ - Conversion to, from, or between floating-point types which would overflow the destination
+ - Division by zero
+ - Unreachable code
+- [MemorySanitizer](https://clang.llvm.org/docs/MemorySanitizer.html) detects uninitialized reads.
+
+These are used by declaring the `USE_SANITIZER` CMake variable as one of:
+- Address
+- Memory
+- MemoryWithOrigins
+- Undefined
+- Thread
+- Address;Undefined
+- Undefined;Address
+- Leak
+
+## Code Coverage [`code-coverage.cmake`](code-coverage.cmake)
+
+![Code Coverage Examples](img/code-cov.png)
+
+> In computer science, test coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs. A program with high test coverage, measured as a percentage, has had more of its source code executed during testing, which suggests it has a lower chance of containing undetected software bugs compared to a program with low test coverage. Many different metrics can be used to calculate test coverage; some of the most basic are the percentage of program subroutines and the percentage of program statements called during execution of the test suite.
+>
+> [Wikipedia, Code Coverage](https://en.wikipedia.org/wiki/Code_coverage)
+
+Code coverage is the detailing of, during the execution of a binary, which regions, functions, or lines of code are *actually* executed. This can be used in a number of ways, from figuring out areas that automated testing is lacking or not touching, to giving a user an instrumented binary to determine which areas of code are used most/least to determine which areas to focus on. Although this does come with the caveat that coverage is no guarantee of good testing, just of what code has been.
+
+Coverage here is supported on both GCC and Clang. GCC requires the `lcov` program, and Clang requires `llvm-cov` and `llvm-profdata`, often provided with the llvm toolchain.
+
+To enable, turn on the `CODE_COVERAGE` variable.
+
+### Added Targets
+
+- GCOV/LCOV:
+ - ccov : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+ - ccov-${TARNGET_NAME} : Generates HTML code coverage report for the associated named target.
+ - ccov-all : Generates HTML code coverage report, merging every target added with 'ALL' parameter into a single detailed report.
+ - ccov-all-capture : Generates an all-merged.info file, for use with coverage dashboards (e.g. codecov.io, coveralls).
+- LLVM-COV:
+ - ccov : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+ - ccov-report : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+ - ccov-${TARGET_NAME} : Generates HTML code coverage report.
+ - ccov-rpt-${TARGET_NAME} : Prints to command line summary per-file coverage information.
+ - ccov-show-${TARGET_NAME} : Prints to command line detailed per-line coverage information.
+ - ccov-all : Generates HTML code coverage report, merging every target added with 'ALL' parameter into a single detailed report.
+ - ccov-all-report : Prints summary per-file coverage information for every target added with ALL' parameter to the command line.
+
+### Usage
+
+To enable any code coverage instrumentation/targets, the single CMake option of `CODE_COVERAGE` needs to be set to 'ON', either by GUI, ccmake, or on the command line ie `-DCODE_COVERAGE=ON`.
+
+From this point, there are two primary methods for adding instrumentation to targets:
+1. A blanket instrumentation by calling `add_code_coverage()`, where all targets in that directory and all subdirectories are automatically instrumented.
+2. Per-target instrumentation by calling `target_code_coverage(<TARGET_NAME>)`, where the target is given and thus only that target is instrumented. This applies to both libraries and executables.
+
+To add coverage targets, such as calling `make ccov` to generate the actual coverage information for perusal or consumption, call `target_code_coverage(<TARGET_NAME>)` on an *executable* target.
+
+**NOTE:** For more options, please check the actual [`code-coverage.cmake`](code-coverage.cmake) file.
+
+#### Example 1 - All targets instrumented
+
+In this case, the coverage information reported will will be that of the `theLib` library target and `theExe` executable.
+
+##### 1a - Via global command
+
+```
+add_code_coverage() # Adds instrumentation to all targets
+
+add_library(theLib lib.cpp)
+
+add_executable(theExe main.cpp)
+target_link_libraries(theExe PRIVATE theLib)
+target_code_coverage(theExe) # As an executable target, adds the 'ccov-theExe' target (instrumentation already added via global anyways) for generating code coverage reports.
+```
+
+##### 1b - Via target commands
+
+```
+add_library(theLib lib.cpp)
+target_code_coverage(theLib) # As a library target, adds coverage instrumentation but no targets.
+
+add_executable(theExe main.cpp)
+target_link_libraries(theExe PRIVATE theLib)
+target_code_coverage(theExe) # As an executable target, adds the 'ccov-theExe' target and instrumentation for generating code coverage reports.
+```
+
+#### Example 2: Target instrumented, but with regex pattern of files to be excluded from report
+
+```
+add_executable(theExe main.cpp non_covered.cpp)
+target_code_coverage(theExe EXCLUDE non_covered.cpp) # As an executable target, the reports will exclude the non-covered.cpp file.
+```
+
+#### Example 3: Target added to the 'ccov' and 'ccov-all' targets
+
+```
+add_code_coverage_all_targets(EXCLUDE test/*) # Adds the 'ccov-all' target set and sets it to exclude all files in test/ folders.
+
+add_executable(theExe main.cpp non_covered.cpp)
+target_code_coverage(theExe AUTO ALL EXCLUDE non_covered.cpp test/*) # As an executable target, adds to the 'ccov' and ccov-all' targets, and the reports will exclude the non-covered.cpp file, and any files in a test/ folder.
+```
+
+## Compiler Options [`compiler-options.cmake`](compiler-options.cmake)
+
+Allows for easy use of some pre-made compiler options for the major compilers.
+
+Using `-DENABLE_ALL_WARNINGS=ON` will enable almost all of the warnings available for a compiler:
+
+| Compiler | Options |
+| :------- | :------------ |
+| MSVC | /W4 |
+| GCC | -Wall -Wextra |
+| Clang | -Wall -Wextra |
+
+Using `-DENABLE_EFFECTIVE_CXX=ON` adds the `-Weffc++` for both GCC and clang.
+
+Using `-DGENERATE_DEPENDENCY_DATA=ON` generates `.d` files along with regular object files on a per-source file basis on GCC/Clang compilers. These files contains the list of all header files used during compilation of that compilation unit.
+
+## Dependency Graph [`dependency-graph.cmake`](dependency-graph.cmake)
+
+CMake, with the dot application available, will build a visual representation of the library/executable dependencies, like so:
+![Dependency Graph](img/dp-graph.png)
+
+### Required Arguments
+
+#### OUTPUT_TYPE *STR*
+The type of output of `dot` to produce. Can be whatever `dot` itself supports (eg. png, ps, pdf).
+
+### Optional Arguments
+
+#### ADD_TO_DEP_GRAPH
+If specified, add this generated target to be a dependency of the more general `dep-graph` target.
+
+#### TARGET_NAME *STR*
+The name to give the doc target. (Default: doc-${PROJECT_NAME})
+
+#### OUTPUT_DIR *STR*
+The directory to place the generated output
+
+## Doxygen [`doxygen.cmake`](doxygen.cmake)
+
+Builds doxygen documentation with a default 'Doxyfile.in' or with a specified one, and can make the results installable (under the `doc` install target)
+
+This can only be used once per project, as each target generated is as `doc-${PROJECT_NAME}` unless TARGET_NAME is specified.
+
+### Optional Arguments
+
+#### ADD_TO_DOC
+If specified, adds this generated target to be a dependency of the more general `doc` target.
+
+#### INSTALLABLE
+Adds the generated documentation to the generic `install` target, under the `documentation` installation group.
+
+#### PROCESS_DOXYFILE
+If set, then will process the found Doxyfile through the CMAKE `configure_file` function for macro replacements before using it. (@ONLY)
+
+#### TARGET_NAME *STR*
+The name to give the doc target. (Default: doc-${PROJECT_NAME})
+
+#### OUTPUT_DIR *STR*
+The directory to place the generated output. (Default: ${CMAKE_CURRENT_BINARY_DIR}/doc)
+
+#### INSTALL_PATH *STR*
+The path to install the documenttation under. (if not specified, defaults to 'share/${PROJECT_NAME})
+
+#### DOXYFILE_PATH *STR*
+The given doxygen file to use/process. (Defaults to'${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile')
+
+## Prepare the Catch Test Framework [`prepare_catch.cmake`](prepare_catch.cmake)
+
+The included `prepare_catch` function contained within attempts to add the infrastructure necessary for automatically adding C/C++ tests using the Catch2 library, including either an interface or pre-compiled 'catch' target library.
+
+It first attempts to find the header on the local machine, and failing that, clones the single header variant for use. It does make the determination between pre-C++11 and will use Catch1.X rather than Catch2 (when cloned), automatically or forced.. Adds a subdirectory of tests/ if it exists from the macro's calling location.
+
+### Optional Arguments
+
+#### COMPILED_CATCH
+If this option is specified, then generates the 'catch' target as a library with catch already pre-compiled as part of the library. Otherwise acts just an interface library for the header location.
+
+#### CATCH1
+Force the use of Catch1.X, rather than auto-detecting the C++ version in use.
+
+#### CLONE
+Force cloning of Catch, rather than attempting to use a locally-found variant.
+
+## Tools [`tools.cmake`](tools.cmake)
+
+### clang-tidy
+
+> clang-tidy is a clang-based C++ “linter†tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis. clang-tidy is modular and provides a convenient interface for writing new checks.
+>
+> [clang-tidy page](https://clang.llvm.org/extra/clang-tidy/)
+
+When detected, [clang-tidy](https://clang.llvm.org/extra/clang-tidy/) can be enabled by using the option of `-DCLANG_TIDY=ON`, as it is disabled by default.
+
+To use, add the `clang_tidy()` function, with the arguments being the options to pass to the clang tidy program, such as '-checks=*'.
+
+### include-what-you-use
+
+This tool helps to organize headers for all files encompass all items being used in that file, without accidentally relying upon headers deep down a chain of other headers. This is disabled by default, and can be enabled via have the program installed and adding `-DIWYU=ON`.
+
+To use, add the `include_what_you_use()` function, with the arguments being the options to pass to the program.
+
+### cppcheck
+
+This tool is another static analyzer in the vein of clang-tidy, which focuses on having no false positives. This is by default disabled, and can be enabled via have the program installed and adding `-DCPPCHECK=ON`.
+
+To use, add the `cppcheck()` function, with the arguments being the options to pass to the program.
+
+## Formatting [`formatting.cmake`](formatting.cmake)
+
+### clang-format
+
+Allows to automatically perform code formatting using the clang-format program, by calling an easy-to-use target ala `make format`. It requires a target name, and the list of files to format. As well, if the target name is the name of another target, then all files associated with that target will be added, and the target name changed to be `format_<TARGET>`. As well, any targets otherwise listed with the files will also have their files imported for formatting.
+
+```
+file(GLOB_RECURSE ALL_CODE_FILES
+ ${PROJECT_SOURCE_DIR}/src/*.[ch]pp
+ ${PROJECT_SOURCE_DIR}/src/*.[ch]
+ ${PROJECT_SOURCE_DIR}/include/*.[h]pp
+ ${PROJECT_SOURCE_DIR}/include/*.[h]
+ ${PROJECT_SOURCE_DIR}/example/*.[ch]pp
+ ${PROJECT_SOURCE_DIR}/example/*.[ch]
+)
+
+clang_format(TARGET_NAME ${ALL_CODE_FILES})
+```
+
+### cmake-format
+
+Similar to the clang-format above, creates a target `cmake-format` when the `cmake_format(<FILES>)` function is defined in CMake scripts, and any <FILES> passed in will be formatted by the cmake-format program, if it is found.
+
+```
+file(GLOB_RECURSE CMAKE_FILES
+ CMakeLists.txt
+)
+
+cmake_format(TARGET_NAME ${CMAKE_FILES})
+``` \ No newline at end of file
diff --git a/config/sanitizer/code-coverage.cmake b/config/sanitizer/code-coverage.cmake
new file mode 100644
index 0000000..8d765f7
--- /dev/null
+++ b/config/sanitizer/code-coverage.cmake
@@ -0,0 +1,536 @@
+#
+# Copyright (C) 2018 by George Cave - gcave@stablecoder.ca
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+# USAGE: To enable any code coverage instrumentation/targets, the single CMake
+# option of `CODE_COVERAGE` needs to be set to 'ON', either by GUI, ccmake, or
+# on the command line.
+#
+# From this point, there are two primary methods for adding instrumentation to
+# targets: 1 - A blanket instrumentation by calling `add_code_coverage()`, where
+# all targets in that directory and all subdirectories are automatically
+# instrumented. 2 - Per-target instrumentation by calling
+# `target_code_coverage(<TARGET_NAME>)`, where the target is given and thus only
+# that target is instrumented. This applies to both libraries and executables.
+#
+# To add coverage targets, such as calling `make ccov` to generate the actual
+# coverage information for perusal or consumption, call
+# `target_code_coverage(<TARGET_NAME>)` on an *executable* target.
+#
+# Example 1: All targets instrumented
+#
+# In this case, the coverage information reported will will be that of the
+# `theLib` library target and `theExe` executable.
+#
+# 1a: Via global command
+#
+# ~~~
+# add_code_coverage() # Adds instrumentation to all targets
+#
+# add_library(theLib lib.cpp)
+#
+# add_executable(theExe main.cpp)
+# target_link_libraries(theExe PRIVATE theLib)
+# target_code_coverage(theExe) # As an executable target, adds the 'ccov-theExe' target (instrumentation already added via global anyways) for generating code coverage reports.
+# ~~~
+#
+# 1b: Via target commands
+#
+# ~~~
+# add_library(theLib lib.cpp)
+# target_code_coverage(theLib) # As a library target, adds coverage instrumentation but no targets.
+#
+# add_executable(theExe main.cpp)
+# target_link_libraries(theExe PRIVATE theLib)
+# target_code_coverage(theExe) # As an executable target, adds the 'ccov-theExe' target and instrumentation for generating code coverage reports.
+# ~~~
+#
+# Example 2: Target instrumented, but with regex pattern of files to be excluded
+# from report
+#
+# ~~~
+# add_executable(theExe main.cpp non_covered.cpp)
+# target_code_coverage(theExe EXCLUDE non_covered.cpp test/*) # As an executable target, the reports will exclude the non-covered.cpp file, and any files in a test/ folder.
+# ~~~
+#
+# Example 3: Target added to the 'ccov' and 'ccov-all' targets
+#
+# ~~~
+# add_code_coverage_all_targets(EXCLUDE test/*) # Adds the 'ccov-all' target set and sets it to exclude all files in test/ folders.
+#
+# add_executable(theExe main.cpp non_covered.cpp)
+# target_code_coverage(theExe AUTO ALL EXCLUDE non_covered.cpp test/*) # As an executable target, adds to the 'ccov' and ccov-all' targets, and the reports will exclude the non-covered.cpp file, and any files in a test/ folder.
+# ~~~
+
+# Options
+option(
+ CODE_COVERAGE
+ "Builds targets with code coverage instrumentation. (Requires GCC or Clang)"
+ OFF)
+
+# Programs
+find_program(LLVM_COV_PATH llvm-cov)
+find_program(LLVM_PROFDATA_PATH llvm-profdata)
+find_program(LCOV_PATH lcov)
+find_program(GENHTML_PATH genhtml)
+
+# Variables
+set(CMAKE_COVERAGE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/ccov)
+
+# Common initialization/checks
+if(CODE_COVERAGE AND NOT CODE_COVERAGE_ADDED)
+ set(CODE_COVERAGE_ADDED ON)
+
+ # Common Targets
+ add_custom_target(
+ ccov-preprocessing
+ COMMAND ${CMAKE_COMMAND} -E make_directory
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}
+ DEPENDS ccov-clean)
+
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ # Messages
+ message(STATUS "Building with llvm Code Coverage Tools")
+
+ if(NOT LLVM_COV_PATH)
+ message(FATAL_ERROR "llvm-cov not found! Aborting.")
+ else()
+ # Version number checking for 'EXCLUDE' compatibility
+ execute_process(COMMAND ${LLVM_COV_PATH} --version
+ OUTPUT_VARIABLE LLVM_COV_VERSION_CALL_OUTPUT)
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LLVM_COV_VERSION
+ ${LLVM_COV_VERSION_CALL_OUTPUT})
+
+ if(LLVM_COV_VERSION VERSION_LESS "7.0.0")
+ message(
+ WARNING
+ "target_code_coverage()/add_code_coverage_all_targets() 'EXCLUDE' option only available on llvm-cov >= 7.0.0"
+ )
+ endif()
+ endif()
+
+ # Targets
+ add_custom_target(
+ ccov-clean
+ COMMAND rm -f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list
+ COMMAND rm -f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list)
+
+ # Used to get the shared object file list before doing the main all-
+ # processing
+ add_custom_target(
+ ccov-libs
+ COMMAND ;
+ COMMENT "libs ready for coverage report.")
+
+ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ # Messages
+ message(STATUS "Building with lcov Code Coverage Tools")
+
+ if(CMAKE_BUILD_TYPE)
+ string(TOUPPER ${CMAKE_BUILD_TYPE} upper_build_type)
+ if(NOT ${upper_build_type} STREQUAL "DEBUG")
+ message(
+ WARNING
+ "Code coverage results with an optimized (non-Debug) build may be misleading"
+ )
+ endif()
+ else()
+ message(
+ WARNING
+ "Code coverage results with an optimized (non-Debug) build may be misleading"
+ )
+ endif()
+ if(NOT LCOV_PATH)
+ message(FATAL_ERROR "lcov not found! Aborting...")
+ endif()
+ if(NOT GENHTML_PATH)
+ message(FATAL_ERROR "genhtml not found! Aborting...")
+ endif()
+
+ # Targets
+ add_custom_target(ccov-clean COMMAND ${LCOV_PATH} --directory
+ ${CMAKE_BINARY_DIR} --zerocounters)
+
+ else()
+ set(CODE_COVERAGE_ADDED OFF)
+ message(STATUS "Code coverage requires Clang or GCC.(${CMAKE_C_COMPILER_ID})")
+ endif()
+endif()
+
+# Adds code coverage instrumentation to a library, or instrumentation/targets
+# for an executable target.
+# ~~~
+# EXECUTABLE ADDED TARGETS:
+# GCOV/LCOV:
+# ccov : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+# ccov-${TARGET_NAME} : Generates HTML code coverage report for the associated named target.
+# ccov-all : Generates HTML code coverage report, merging every target added with 'ALL' parameter into a single detailed report.
+#
+# LLVM-COV:
+# ccov : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+# ccov-report : Generates HTML code coverage report for every target added with 'AUTO' parameter.
+# ccov-${TARGET_NAME} : Generates HTML code coverage report.
+# ccov-report-${TARGET_NAME} : Prints to command line summary per-file coverage information.
+# ccov-show-${TARGET_NAME} : Prints to command line detailed per-line coverage information.
+# ccov-all : Generates HTML code coverage report, merging every target added with 'ALL' parameter into a single detailed report.
+# ccov-all-report : Prints summary per-file coverage information for every target added with ALL' parameter to the command line.
+#
+# Required:
+# TARGET_NAME - Name of the target to generate code coverage for.
+# Optional:
+# AUTO - Adds the target to the 'ccov' target so that it can be run in a batch with others easily. Effective on executable targets.
+# ALL - Adds the target to the 'ccov-all' and 'ccov-all-report' targets, which merge several executable targets coverage data to a single report. Effective on executable targets.
+# EXTERNAL - For GCC's lcov, allows the profiling of 'external' files from the processing directory
+# EXCLUDE <REGEX_PATTERNS> - Excludes files of the patterns provided from coverage. **These do not copy to the 'all' targets.**
+# OBJECTS <TARGETS> - For executables ONLY, if the provided targets are shared libraries, adds coverage information to the output
+# ~~~
+function(target_code_coverage TARGET_NAME)
+ # Argument parsing
+ set(options AUTO ALL EXTERNAL)
+ set(multi_value_keywords EXCLUDE OBJECTS)
+ cmake_parse_arguments(target_code_coverage "${options}" ""
+ "${multi_value_keywords}" ${ARGN})
+
+ if(CODE_COVERAGE)
+
+ # Add code coverage instrumentation to the target's linker command
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ target_compile_options(${TARGET_NAME} PRIVATE -fprofile-instr-generate
+ -fcoverage-mapping)
+ set_property(
+ TARGET ${TARGET_NAME}
+ APPEND_STRING
+ PROPERTY LINK_FLAGS "-fprofile-instr-generate ")
+ set_property(
+ TARGET ${TARGET_NAME}
+ APPEND_STRING
+ PROPERTY LINK_FLAGS "-fcoverage-mapping ")
+ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_compile_options(${TARGET_NAME} PRIVATE -fprofile-arcs
+ -ftest-coverage)
+ target_link_libraries(${TARGET_NAME} PRIVATE gcov)
+ endif()
+
+ # Targets
+ get_target_property(target_type ${TARGET_NAME} TYPE)
+
+ # Add shared library to processing for 'all' targets
+ if(target_type STREQUAL "SHARED_LIBRARY" AND target_code_coverage_ALL)
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ add_custom_target(
+ ccov-run-${TARGET_NAME}
+ COMMAND echo "-object=$<TARGET_FILE:${TARGET_NAME}>" >>
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list
+ DEPENDS ccov-preprocessing ${TARGET_NAME})
+
+ if(NOT TARGET ccov-libs)
+ message(
+ FATAL_ERROR
+ "Calling target_code_coverage with 'ALL' must be after a call to 'add_code_coverage_all_targets'."
+ )
+ endif()
+
+ add_dependencies(ccov-libs ccov-run-${TARGET_NAME})
+ endif()
+ endif()
+
+ # For executables add targets to run and produce output
+ if(target_type STREQUAL "EXECUTABLE")
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Cc]lang")
+
+ # If there are shared objects to also work with, generate the string to
+ # add them here
+ foreach(SO_TARGET ${target_code_coverage_OBJECTS})
+ # Check to see if the target is a shared object
+ if(TARGET ${SO_TARGET})
+ get_target_property(SO_TARGET_TYPE ${SO_TARGET} TYPE)
+ if(${SO_TARGET_TYPE} STREQUAL "SHARED_LIBRARY")
+ set(SO_OBJECTS ${SO_OBJECTS} -object=$<TARGET_FILE:${SO_TARGET}>)
+ endif()
+ endif()
+ endforeach()
+
+ # Run the executable, generating raw profile data
+ add_custom_target(
+ ccov-run-${TARGET_NAME}
+ COMMAND LLVM_PROFILE_FILE=${TARGET_NAME}.profraw
+ $<TARGET_FILE:${TARGET_NAME}>
+ COMMAND echo "-object=$<TARGET_FILE:${TARGET_NAME}>" >>
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list
+ COMMAND echo "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.profraw " >>
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list
+ DEPENDS ccov-preprocessing ccov-libs ${TARGET_NAME})
+
+ # Merge the generated profile data so llvm-cov can process it
+ add_custom_target(
+ ccov-processing-${TARGET_NAME}
+ COMMAND ${LLVM_PROFDATA_PATH} merge -sparse ${TARGET_NAME}.profraw -o
+ ${TARGET_NAME}.profdata
+ DEPENDS ccov-run-${TARGET_NAME})
+
+ # Ignore regex only works on LLVM >= 7
+ if(LLVM_COV_VERSION VERSION_GREATER_EQUAL "7.0.0")
+ foreach(EXCLUDE_ITEM ${target_code_coverage_EXCLUDE})
+ set(EXCLUDE_REGEX ${EXCLUDE_REGEX}
+ -ignore-filename-regex='${EXCLUDE_ITEM}')
+ endforeach()
+ endif()
+
+ # Print out details of the coverage information to the command line
+ add_custom_target(
+ ccov-show-${TARGET_NAME}
+ COMMAND
+ ${LLVM_COV_PATH} show $<TARGET_FILE:${TARGET_NAME}> ${SO_OBJECTS}
+ -instr-profile=${TARGET_NAME}.profdata -show-line-counts-or-regions
+ ${EXCLUDE_REGEX}
+ DEPENDS ccov-processing-${TARGET_NAME})
+
+ # Print out a summary of the coverage information to the command line
+ add_custom_target(
+ ccov-report-${TARGET_NAME}
+ COMMAND ${LLVM_COV_PATH} report $<TARGET_FILE:${TARGET_NAME}>
+ ${SO_OBJECTS} -instr-profile=${TARGET_NAME}.profdata
+ ${EXCLUDE_REGEX}
+ DEPENDS ccov-processing-${TARGET_NAME})
+
+ # Generates HTML output of the coverage information for perusal
+ add_custom_target(
+ ccov-${TARGET_NAME}
+ COMMAND
+ ${LLVM_COV_PATH} show $<TARGET_FILE:${TARGET_NAME}> ${SO_OBJECTS}
+ -instr-profile=${TARGET_NAME}.profdata -show-line-counts-or-regions
+ -output-dir=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/${TARGET_NAME}
+ -format="html" ${EXCLUDE_REGEX}
+ DEPENDS ccov-processing-${TARGET_NAME})
+
+ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set(COVERAGE_INFO
+ "${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/${TARGET_NAME}.info")
+
+ # Run the executable, generating coverage information
+ add_custom_target(
+ ccov-run-${TARGET_NAME}
+ COMMAND $<TARGET_FILE:${TARGET_NAME}>
+ DEPENDS ccov-preprocessing ${TARGET_NAME})
+
+ # Generate exclusion string for use
+ foreach(EXCLUDE_ITEM ${target_code_coverage_EXCLUDE})
+ set(EXCLUDE_REGEX ${EXCLUDE_REGEX} --remove ${COVERAGE_INFO}
+ '${EXCLUDE_ITEM}')
+ endforeach()
+
+ if(EXCLUDE_REGEX)
+ set(EXCLUDE_COMMAND ${LCOV_PATH} ${EXCLUDE_REGEX} --output-file
+ ${COVERAGE_INFO})
+ else()
+ set(EXCLUDE_COMMAND ;)
+ endif()
+
+ if(NOT ${target_code_coverage_EXTERNAL})
+ set(EXTERNAL_OPTION --no-external)
+ endif()
+
+ # Capture coverage data
+ add_custom_target(
+ ccov-capture-${TARGET_NAME}
+ COMMAND ${CMAKE_COMMAND} -E remove ${COVERAGE_INFO}
+ COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters
+ COMMAND $<TARGET_FILE:${TARGET_NAME}>
+ COMMAND
+ ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --base-directory
+ ${CMAKE_SOURCE_DIR} --capture ${EXTERNAL_OPTION} --output-file
+ ${COVERAGE_INFO}
+ COMMAND ${EXCLUDE_COMMAND}
+ DEPENDS ccov-preprocessing ${TARGET_NAME})
+
+ # Generates HTML output of the coverage information for perusal
+ add_custom_target(
+ ccov-${TARGET_NAME}
+ COMMAND ${GENHTML_PATH} -o
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/${TARGET_NAME}
+ ${COVERAGE_INFO}
+ DEPENDS ccov-capture-${TARGET_NAME})
+ endif()
+
+ add_custom_command(
+ TARGET ccov-${TARGET_NAME}
+ POST_BUILD
+ COMMAND ;
+ COMMENT
+ "Open ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/${TARGET_NAME}/index.html in your browser to view the coverage report."
+ )
+
+ # AUTO
+ if(target_code_coverage_AUTO)
+ if(NOT TARGET ccov)
+ add_custom_target(ccov)
+ endif()
+ add_dependencies(ccov ccov-${TARGET_NAME})
+
+ if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ if(NOT TARGET ccov-report)
+ add_custom_target(ccov-report)
+ endif()
+ add_dependencies(ccov-report ccov-report-${TARGET_NAME})
+ endif()
+ endif()
+
+ # ALL
+ if(target_code_coverage_ALL)
+ if(NOT TARGET ccov-all-processing)
+ message(
+ FATAL_ERROR
+ "Calling target_code_coverage with 'ALL' must be after a call to 'add_code_coverage_all_targets'."
+ )
+ endif()
+
+ add_dependencies(ccov-all-processing ccov-run-${TARGET_NAME})
+ endif()
+ endif()
+ endif()
+endfunction()
+
+# Adds code coverage instrumentation to all targets in the current directory and
+# any subdirectories. To add coverage instrumentation to only specific targets,
+# use `target_code_coverage`.
+function(add_code_coverage)
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
+ add_link_options(-fprofile-instr-generate -fcoverage-mapping)
+ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ add_compile_options(-fprofile-arcs -ftest-coverage)
+ link_libraries(gcov)
+ endif()
+endfunction()
+
+# Adds the 'ccov-all' type targets that calls all targets added via
+# `target_code_coverage` with the `ALL` parameter, but merges all the coverage
+# data from them into a single large report instead of the numerous smaller
+# reports. Also adds the ccov-all-capture Generates an all-merged.info file, for
+# use with coverage dashboards (e.g. codecov.io, coveralls).
+# ~~~
+# Optional:
+# EXCLUDE <REGEX_PATTERNS> - Excludes files of the regex patterns provided from coverage.
+# ~~~
+function(add_code_coverage_all_targets)
+ # Argument parsing
+ set(multi_value_keywords EXCLUDE)
+ cmake_parse_arguments(add_code_coverage_all_targets "" ""
+ "${multi_value_keywords}" ${ARGN})
+
+ if(CODE_COVERAGE)
+ if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+
+ # Merge the profile data for all of the run executables
+ add_custom_target(
+ ccov-all-processing
+ COMMAND
+ ${LLVM_PROFDATA_PATH} merge -o
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata -sparse `cat
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list`)
+
+ # Regex exclude only available for LLVM >= 7
+ if(LLVM_COV_VERSION VERSION_GREATER_EQUAL "7.0.0")
+ foreach(EXCLUDE_ITEM ${add_code_coverage_all_targets_EXCLUDE})
+ set(EXCLUDE_REGEX ${EXCLUDE_REGEX}
+ -ignore-filename-regex='${EXCLUDE_ITEM}')
+ endforeach()
+ endif()
+
+ # Print summary of the code coverage information to the command line
+ add_custom_target(
+ ccov-all-report
+ COMMAND
+ ${LLVM_COV_PATH} report `cat
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list`
+ -instr-profile=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata
+ ${EXCLUDE_REGEX}
+ DEPENDS ccov-all-processing)
+
+ # Export coverage information so continuous integration tools (e.g.
+ # Jenkins) can consume it
+ add_custom_target(
+ ccov-all-export
+ COMMAND
+ ${LLVM_COV_PATH} export `cat
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list`
+ -instr-profile=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata
+ -format="text" ${EXCLUDE_REGEX} >
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/coverage.json
+ DEPENDS ccov-all-processing)
+
+ # Generate HTML output of all added targets for perusal
+ add_custom_target(
+ ccov-all
+ COMMAND
+ ${LLVM_COV_PATH} show `cat
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list`
+ -instr-profile=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata
+ -show-line-counts-or-regions
+ -output-dir=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged
+ -format="html" ${EXCLUDE_REGEX}
+ DEPENDS ccov-all-processing)
+
+ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set(COVERAGE_INFO "${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.info")
+
+ # Nothing required for gcov
+ add_custom_target(ccov-all-processing COMMAND ;)
+
+ # Exclusion regex string creation
+ foreach(EXCLUDE_ITEM ${add_code_coverage_all_targets_EXCLUDE})
+ set(EXCLUDE_REGEX ${EXCLUDE_REGEX} --remove ${COVERAGE_INFO}
+ '${EXCLUDE_ITEM}')
+ endforeach()
+
+ if(EXCLUDE_REGEX)
+ set(EXCLUDE_COMMAND ${LCOV_PATH} ${EXCLUDE_REGEX} --output-file
+ ${COVERAGE_INFO})
+ else()
+ set(EXCLUDE_COMMAND ;)
+ endif()
+
+ # Capture coverage data
+ add_custom_target(
+ ccov-all-capture
+ COMMAND ${CMAKE_COMMAND} -E remove ${COVERAGE_INFO}
+ COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --capture
+ --output-file ${COVERAGE_INFO}
+ COMMAND ${EXCLUDE_COMMAND}
+ DEPENDS ccov-all-processing)
+
+ # Generates HTML output of all targets for perusal
+ add_custom_target(
+ ccov-all
+ COMMAND ${GENHTML_PATH} -o ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged
+ ${COVERAGE_INFO}
+ DEPENDS ccov-all-capture)
+
+ endif()
+
+ add_custom_command(
+ TARGET ccov-all
+ POST_BUILD
+ COMMAND ;
+ COMMENT
+ "Open ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged/index.html in your browser to view the coverage report."
+ )
+ endif()
+endfunction()
diff --git a/config/sanitizer/formatting.cmake b/config/sanitizer/formatting.cmake
new file mode 100644
index 0000000..5aaa2a6
--- /dev/null
+++ b/config/sanitizer/formatting.cmake
@@ -0,0 +1,92 @@
+#
+# Copyright (C) 2019 by George Cave - gcave@stablecoder.ca
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+#
+# clang-format
+#
+find_program(CLANG_FORMAT_EXE "clang-format")
+mark_as_advanced(FORCE CLANG_FORMAT_EXE)
+if(CLANG_FORMAT_EXE)
+ message(STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
+else()
+ message(STATUS "clang-format not found!")
+endif()
+
+# Generates a 'format' target using a custom name, files, and include
+# directories all being parameters.
+#
+# Do note that in order for sources to be inherited properly, the source paths
+# must be reachable from where the macro is called, or otherwise require a full
+# path for proper inheritance.
+#
+# ~~~
+# Required:
+# TARGET_NAME - The name of the target to create.
+#
+# Optional: ARGN - The list of targets OR files to format. Relative and absolute
+# paths are accepted.
+# ~~~
+function(clang_format TARGET_NAME)
+ if(CLANG_FORMAT_EXE)
+ set(FORMAT_FILES)
+ # Check through the ARGN's, determine existent files
+ foreach(item IN LISTS ARGN)
+ if(TARGET ${item})
+ # If the item is a target, then we'll attempt to grab the associated
+ # source files from it.
+ get_target_property(_TARGET_TYPE ${item} TYPE)
+ if(NOT
+ _TARGET_TYPE
+ STREQUAL
+ "INTERFACE_LIBRARY")
+ get_property(
+ _TEMP
+ TARGET ${item}
+ PROPERTY SOURCES)
+ foreach(iter IN LISTS _TEMP)
+ if(EXISTS ${iter})
+ set(FORMAT_FILES ${FORMAT_FILES} ${iter})
+ endif()
+ endforeach()
+ endif()
+ elseif(EXISTS ${item})
+ # Check if it's a full file path
+ set(FORMAT_FILES ${FORMAT_FILES} ${item})
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${item})
+ # Check if it's based on the current source dir
+ set(FORMAT_FILES ${FORMAT_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${item})
+ endif()
+ endforeach()
+
+ # Make the target
+ if(FORMAT_FILES)
+ if(TARGET ${TARGET_NAME})
+ message(
+ ERROR
+ "Cannot create clang-format target '${TARGET_NAME}', already exists.")
+ else()
+ add_custom_target(${TARGET_NAME} COMMAND ${CLANG_FORMAT_EXE} -i -style=file ${FORMAT_FILES})
+
+ if(NOT TARGET format)
+ add_custom_target(format)
+ endif()
+
+ add_dependencies(format ${TARGET_NAME})
+ endif()
+ endif()
+
+ endif()
+endfunction()
+
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake
new file mode 100644
index 0000000..0803279
--- /dev/null
+++ b/config/sanitizer/sanitizers.cmake
@@ -0,0 +1,94 @@
+#
+# Copyright (C) 2018 by George Cave - gcave@stablecoder.ca
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+set(USE_SANITIZER
+ ""
+ CACHE
+ STRING
+ "Compile with a sanitizer. Options are: Address, Memory, MemoryWithOrigins, Undefined, Thread, Leak, 'Address;Undefined'"
+)
+
+function(append value)
+ foreach(variable ${ARGN})
+ set(${variable}
+ "${${variable}} ${value}"
+ PARENT_SCOPE)
+ endforeach(variable)
+endfunction()
+
+message(STATUS "USE_SANITIZER=${USE_SANITIZER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}")
+if(USE_SANITIZER)
+ if(INTEL_CLANG OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+ append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}")
+
+ if(UNIX)
+ if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ append("-O1" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ endif()
+
+ if(USE_SANITIZER MATCHES "([Aa]ddress);([Uu]ndefined)"
+ OR USE_SANITIZER MATCHES "([Uu]ndefined);([Aa]ddress)")
+ message(STATUS "Building with Address, Undefined sanitizers")
+ append("-fsanitize=address,undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ set(MEMCHECK_TYPE AddressSanitizer)
+ elseif(USE_SANITIZER MATCHES "([Aa]ddress)")
+ # Optional: -fno-optimize-sibling-calls -fsanitize-address-use-after-scope
+ message(STATUS "Building with Address sanitizer")
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ set(MEMCHECK_TYPE AddressSanitizer)
+ elseif(USE_SANITIZER MATCHES "([Mm]emory([Ww]ith[Oo]rigins)?)")
+ # Optional: -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2
+ append("-fsanitize=memory" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ if(USE_SANITIZER MATCHES "([Mm]emory[Ww]ith[Oo]rigins)")
+ message(STATUS "Building with MemoryWithOrigins sanitizer")
+ append("-fsanitize-memory-track-origins" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ else()
+ message(STATUS "Building with Memory sanitizer")
+ endif()
+ set(MEMCHECK_TYPE MemorySanitizer)
+ elseif(USE_SANITIZER MATCHES "([Uu]ndefined)")
+ message(STATUS "Building with Undefined sanitizer")
+ append("-fsanitize=undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ if(EXISTS "${BLACKLIST_FILE}")
+ append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ endif()
+ set(MEMCHECK_TYPE UndefinedBehaviorSanitizer)
+ elseif(USE_SANITIZER MATCHES "([Tt]hread)")
+ message(STATUS "Building with Thread sanitizer")
+ append("-fsanitize=thread" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ set(MEMCHECK_TYPE ThreadSanitizer)
+ elseif(USE_SANITIZER MATCHES "([Ll]eak)")
+ message(STATUS "Building with Leak sanitizer")
+ append("-fsanitize=leak" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ set(MEMCHECK_TYPE LeakSanitizer)
+ else()
+ message(
+ FATAL_ERROR "Unsupported value of USE_SANITIZER: ${USE_SANITIZER}")
+ endif()
+ elseif(MSVC)
+ if(USE_SANITIZER MATCHES "([Aa]ddress)")
+ message(STATUS "Building with Address sanitizer")
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ else()
+ message(FATAL_ERROR "This sanitizer not yet supported in the MSVC environment: ${USE_SANITIZER}")
+ endif()
+ else()
+ message(FATAL_ERROR "USE_SANITIZER is not supported on this platform.")
+ endif()
+ endif()
+endif()
diff --git a/config/sanitizer/tools.cmake b/config/sanitizer/tools.cmake
new file mode 100644
index 0000000..242e33f
--- /dev/null
+++ b/config/sanitizer/tools.cmake
@@ -0,0 +1,114 @@
+#
+# Copyright (C) 2018-2020 by George Cave - gcave@stablecoder.ca
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+option(CLANG_TIDY "Turns on clang-tidy processing if it is found." OFF)
+option(IWYU "Turns on include-what-you-use processing if it is found." OFF)
+option(CPPCHECK "Turns on cppcheck processing if it is found." OFF)
+
+# Adds clang-tidy checks to the compilation, with the given arguments being used
+# as the options set.
+macro(clang_tidy)
+ if(CLANG_TIDY AND CLANG_TIDY_EXE)
+ set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN})
+ endif()
+endmacro()
+
+# Adds include_what_you_use to the compilation, with the given arguments being
+# used as the options set.
+macro(include_what_you_use)
+ if(IWYU AND IWYU_EXE)
+ set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
+ endif()
+endmacro()
+
+# Adds cppcheck to the compilation, with the given arguments being used as the
+# options set.
+macro(cppcheck)
+ if(CPPCHECK AND CPPCHECK_EXE)
+ set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
+ endif()
+endmacro()
+
+find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
+mark_as_advanced(FORCE CLANG_TIDY_EXE)
+if(CLANG_TIDY_EXE)
+ message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
+ if(NOT CLANG_TIDY)
+ message(STATUS "clang-tidy NOT ENABLED via 'CLANG_TIDY' variable!")
+ set(CMAKE_CXX_CLANG_TIDY
+ ""
+ CACHE STRING "" FORCE) # delete it
+ endif()
+elseif(CLANG_TIDY)
+ message(SEND_ERROR "Cannot enable clang-tidy, as executable not found!")
+ set(CMAKE_CXX_CLANG_TIDY
+ ""
+ CACHE STRING "" FORCE) # delete it
+else()
+ message(STATUS "clang-tidy not found!")
+ set(CMAKE_CXX_CLANG_TIDY
+ ""
+ CACHE STRING "" FORCE) # delete it
+endif()
+
+find_program(IWYU_EXE NAMES "include-what-you-use")
+mark_as_advanced(FORCE IWYU_EXE)
+if(IWYU_EXE)
+ message(STATUS "include-what-you-use found: ${IWYU_EXE}")
+ if(NOT IWYU)
+ message(STATUS "include-what-you-use NOT ENABLED via 'IWYU' variable!")
+ set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
+ ""
+ CACHE STRING "" FORCE) # delete it
+ endif()
+elseif(IWYU)
+ message(
+ SEND_ERROR "Cannot enable include-what-you-use, as executable not found!")
+ set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
+ ""
+ CACHE STRING "" FORCE) # delete it
+else()
+ message(STATUS "include-what-you-use not found!")
+ set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
+ ""
+ CACHE STRING "" FORCE) # delete it
+endif()
+
+find_program(CPPCHECK_EXE NAMES "cppcheck")
+mark_as_advanced(FORCE CPPCHECK_EXE)
+if(CPPCHECK_EXE)
+ message(STATUS "cppcheck found: ${CPPCHECK_EXE}")
+ if(CPPECHECK)
+ set(CMAKE_CXX_CPPCHECK
+ "${CPPCHECK_EXE};--enable=warning,performance,portability,missingInclude;--template=\"[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)\";--suppress=missingIncludeSystem;--quiet;--verbose;--force"
+ )
+ endif()
+ if(NOT CPPCHECK)
+ message(STATUS "cppcheck NOT ENABLED via 'CPPCHECK' variable!")
+ set(CMAKE_CXX_CPPCHECK
+ ""
+ CACHE STRING "" FORCE) # delete it
+ endif()
+elseif(CPPCHECK)
+ message(SEND_ERROR "Cannot enable cppcheck, as executable not found!")
+ set(CMAKE_CXX_CPPCHECK
+ ""
+ CACHE STRING "" FORCE) # delete it
+else()
+ message(STATUS "cppcheck not found!")
+ set(CMAKE_CXX_CPPCHECK
+ ""
+ CACHE STRING "" FORCE) # delete it
+endif()
diff --git a/config/site-specific/BlankForm b/config/site-specific/BlankForm
index 03d421c..04d5d0e 100644
--- a/config/site-specific/BlankForm
+++ b/config/site-specific/BlankForm
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/config/solaris b/config/solaris
index 394daaf..1b63f42 100644
--- a/config/solaris
+++ b/config/solaris
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -67,6 +67,7 @@ fi
if test "X-" = "X-$f9x_flags_set"; then
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
+
H5_FCFLAGS="$H5_FCFLAGS"
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
diff --git a/config/toolchain/GCC.cmake b/config/toolchain/GCC.cmake
new file mode 100644
index 0000000..c41d0ca
--- /dev/null
+++ b/config/toolchain/GCC.cmake
@@ -0,0 +1,11 @@
+# Uncomment the following line and the correct system name to use cross-compiling
+#set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_COMPILER_VENDOR "GCC")
+
+set(CMAKE_C_COMPILER cc)
+set(CMAKE_CXX_COMPILER c++)
+set(CMAKE_Fortran_COMPILER gfortran)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
diff --git a/config/toolchain/PGI.cmake b/config/toolchain/PGI.cmake
new file mode 100644
index 0000000..ec58cbb
--- /dev/null
+++ b/config/toolchain/PGI.cmake
@@ -0,0 +1,11 @@
+# Uncomment the following to use cross-compiling
+#set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_COMPILER_VENDOR "PGI")
+
+set(CMAKE_C_COMPILER pgcc)
+set(CMAKE_CXX_COMPILER pgc++)
+set(CMAKE_Fortran_COMPILER pgf90)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
diff --git a/config/toolchain/build32.cmake b/config/toolchain/build32.cmake
new file mode 100644
index 0000000..a2566c3
--- /dev/null
+++ b/config/toolchain/build32.cmake
@@ -0,0 +1,79 @@
+if (WIN32)
+ set (CMAKE_SYSTEM_NAME Windows)
+ set (CMAKE_GENERATOR_PLATFORM "x86")
+elseif(APPLE)
+ set (CMAKE_OSX_ARCHITECTURES "i386")
+elseif(MINGW)
+ set (CMAKE_SYSTEM_NAME Windows)
+ set (TOOLCHAIN_PREFIX i686-w64-mingw32)
+ set (CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+ set (CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+ set (CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
+ set (CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
+
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
+
+ set (LIB32 /usr/lib) # Fedora
+
+ if (EXISTS "/usr/lib32")
+ set (LIB32 /usr/lib32) # Arch, Solus
+ endif ()
+
+ set (CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE)
+ set (CMAKE_LIBRARY_PATH ${LIB32} CACHE STRING "library search path" FORCE)
+
+ # this is probably unlikely to be needed, but just in case
+ set (CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE)
+ set (CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE)
+ set (CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE)
+
+ # on Fedora and Arch and similar, point pkgconfig at 32 bit .pc files. We have
+ # to include the regular system .pc files as well (at the end), because some
+ # are not always present in the 32 bit directory
+ if (EXISTS "${LIB32}/pkgconfig")
+ set (ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig)
+ endif ()
+
+ set (CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ set (CMAKE_CROSSCOMPILING_EMULATOR wine)
+
+ include_directories(/usr/${TOOLCHAIN_PREFIX}/include)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS On CACHE BOOL "Export windows symbols")
+else ()
+ set (CMAKE_SYSTEM_NAME Linux)
+
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
+
+ set (LIB32 /usr/lib) # Fedora
+
+ if (EXISTS "/usr/lib32")
+ set (LIB32 /usr/lib32) # Arch, Solus
+ endif ()
+
+ set (CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE)
+ set (CMAKE_LIBRARY_PATH ${LIB32} CACHE STRING "library search path" FORCE)
+
+ # this is probably unlikely to be needed, but just in case
+ set (CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE)
+ set (CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE)
+ set (CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE)
+
+ # on Fedora and Arch and similar, point pkgconfig at 32 bit .pc files. We have
+ # to include the regular system .pc files as well (at the end), because some
+ # are not always present in the 32 bit directory
+ if (EXISTS "${LIB32}/pkgconfig")
+ set (ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig)
+ endif ()
+# where is the target environment
+ set (CMAKE_FIND_ROOT_PATH ${LIB32})
+# search for programs in the build host directories
+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endif ()
diff --git a/config/toolchain/clang.cmake b/config/toolchain/clang.cmake
new file mode 100644
index 0000000..5e3b13a
--- /dev/null
+++ b/config/toolchain/clang.cmake
@@ -0,0 +1,11 @@
+# Uncomment the following to use cross-compiling
+#set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_COMPILER_VENDOR "clang")
+
+set(CMAKE_C_COMPILER clang)
+set(CMAKE_CXX_COMPILER clang++)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake
new file mode 100644
index 0000000..bf7cf69
--- /dev/null
+++ b/config/toolchain/crayle.cmake
@@ -0,0 +1,10 @@
+# The following line will use cross-compiling
+set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment")
+
+set(CMAKE_C_COMPILER cc)
+set(CMAKE_Fortran_COMPILER ftn)
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
diff --git a/config/toolchain/intel.cmake b/config/toolchain/intel.cmake
new file mode 100644
index 0000000..ae1d2f8
--- /dev/null
+++ b/config/toolchain/intel.cmake
@@ -0,0 +1,18 @@
+# Uncomment the following to use cross-compiling
+#set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_COMPILER_VENDOR "intel")
+
+if(USE_SANITIZER)
+ set(CMAKE_C_COMPILER icl)
+ set(CMAKE_CXX_COMPILER icl++)
+ set(CMAKE_Fortran_COMPILER ifort)
+ set(INTEL_CLANG ON)
+else ()
+ set(CMAKE_C_COMPILER icc)
+ set(CMAKE_CXX_COMPILER icpc)
+ set(CMAKE_Fortran_COMPILER ifort)
+endif ()
+
+# the following is used if cross-compiling
+set(CMAKE_CROSSCOMPILING_EMULATOR "")
diff --git a/config/toolchain/mingw64.cmake b/config/toolchain/mingw64.cmake
new file mode 100644
index 0000000..1830488
--- /dev/null
+++ b/config/toolchain/mingw64.cmake
@@ -0,0 +1,14 @@
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
+set (CMAKE_SYSTEM_NAME Windows)
+set (CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+set (CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set (CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
+set (CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
+set (CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set (CMAKE_CROSSCOMPILING_EMULATOR wine64)
+
+include_directories(/usr/${TOOLCHAIN_PREFIX}/include)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS On CACHE BOOL "Export windows symbols")
diff --git a/configure b/configure
index 3117049..9ec7e96 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.8.21.
+# Generated by GNU Autoconf 2.69 for HDF5 1.8.22.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.8.21'
-PACKAGE_STRING='HDF5 1.8.21'
+PACKAGE_VERSION='1.8.22'
+PACKAGE_STRING='HDF5 1.8.22'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -642,6 +642,12 @@ HAVE_SHARED_CONDITIONAL_FALSE
HAVE_SHARED_CONDITIONAL_TRUE
fortran_linux_linker_option
SEARCH
+BUILD_TOOLS_CONDITIONAL_FALSE
+BUILD_TOOLS_CONDITIONAL_TRUE
+BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE
+BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE
+BUILD_TESTS_CONDITIONAL_FALSE
+BUILD_TESTS_CONDITIONAL_TRUE
BUILD_HDF5_HL_CONDITIONAL_FALSE
BUILD_HDF5_HL_CONDITIONAL_TRUE
BUILD_FORTRAN_CONDITIONAL_FALSE
@@ -665,6 +671,12 @@ CONFIG_MODE
CONFIG_USER
CONFIG_DATE
H5_VERSION
+examplesdir
+JNI_LDFLAGS
+HAVE_LIBHDFS
+ROS3_VFD_CONDITIONAL_FALSE
+ROS3_VFD_CONDITIONAL_TRUE
+ROS3_VFD
DIRECT_VFD_CONDITIONAL_FALSE
DIRECT_VFD_CONDITIONAL_TRUE
ADD_PARALLEL_FILES
@@ -673,6 +685,10 @@ CLEARFILEBUF
INSTRUMENT_LIBRARY
TRACE_API
DEBUG_PKG
+OPTIMIZATION
+PROFILING
+DEV_WARNINGS
+SYMBOLS
HAVE_PTHREAD
BUILD_SHARED_SZIP_CONDITIONAL_FALSE
BUILD_SHARED_SZIP_CONDITIONAL_TRUE
@@ -708,6 +724,8 @@ EGREP
GREP
SED
LIBTOOL
+HDF5_TOOLS
+HDF5_TESTS
FORTRAN_SHARED_CONDITIONAL_FALSE
FORTRAN_SHARED_CONDITIONAL_TRUE
H5_FORTRAN_SHARED
@@ -771,6 +789,7 @@ ac_ct_CC
LDFLAGS
CFLAGS
CC
+CLANG_SANITIZE_CHECKS
UNAME_INFO
enable_static
enable_shared
@@ -796,9 +815,11 @@ AM_CXXFLAGS
AM_FCFLAGS
AM_CFLAGS
H5_LDFLAGS
+H5_ECXXFLAGS
H5_CXXFLAGS
H5_FCFLAGS
H5_CPPFLAGS
+H5_ECFLAGS
H5_CFLAGS
CPPFLAGS
host_os
@@ -882,12 +903,15 @@ ac_user_opts='
enable_option_checking
enable_silent_rules
enable_maintainer_mode
+enable_sanitize_checks
enable_dependency_tracking
enable_unsupported
enable_fortran
enable_fortran2003
enable_cxx
enable_hl
+enable_tests
+enable_tools
enable_shared
enable_static
with_pic
@@ -905,6 +929,10 @@ with_zlib
with_szlib
enable_threadsafe
with_pthread
+enable_symbols
+enable_developer_warnings
+enable_profiling
+enable_optimization
enable_debug
enable_codestack
enable_metadata_trace_file
@@ -915,6 +943,9 @@ enable_using_memchecker
enable_parallel
with_mpe
enable_direct_vfd
+enable_ros3_vfd
+with_libhdfs
+with_examplesdir
with_default_plugindir
enable_dconv_exception
enable_dconv_accuracy
@@ -1480,7 +1511,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.8.21 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.8.22 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1550,7 +1581,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.8.21:";;
+ short | recursive ) echo "Configuration of HDF5 1.8.22:";;
esac
cat <<\_ACEOF
@@ -1563,6 +1594,12 @@ Optional Features:
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
+ --enable-sanitize-checks=address
+ (clang/clang++ compilers only) Enable sanitize
+ checks. Address is useful for detecting issues
+ dealing with memory. See AddressSanitizer in
+ config/sanitizer/README.md for more information.
+ [default=none]
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1573,6 +1610,8 @@ Optional Features:
specify --enable-fortran [default=no]
--enable-cxx Compile the C++ interface [default=no]
--enable-hl Enable the high level library [default=yes]
+ --enable-tests Compile the HDF5 tests [default=yes]
+ --enable-tools Compile the HDF5 tools [default=yes]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1586,6 +1625,38 @@ Optional Features:
--enable-threadsafe Enable thread-safe capability. Not compatible with
the high-level library, Fortran, or C++ wrappers.
[default=no]
+ --enable-symbols=(yes|no|<custom>)
+ Add debug symbols to the library (e.g.: build with
+ -g). This is independent of the build mode and
+ optimization level. The custom string allows special
+ settings like -ggdb, etc. to be used. [default=yes
+ if debug build, otherwise no]
+ --enable-developer-warnings
+ Determines whether developer warnings will be
+ emitted. These are usually performance suggestions
+ (e.g. -Wsuggest-attribute) and do not flag poor code
+ quality. [default=no]
+ --enable-profiling=(yes|no|<custom>)
+ Enable profiling flags (e.g.: -pg). This can be set
+ independently from the build mode. The custom
+ setting can be used to pass alternative profiling
+ flags (e.g.: -P for using Prof with gcc).
+ [default=no]
+ --enable-optimization=(high|debug|none|<custom>)
+ Enable optimization flags/settings (e.g.: -O3). This
+ can be set independently from the build mode.
+ Optimizations for a given compiler can be specified
+ at several levels: High, with aggressive
+ optimizations turned on; debug, with optimizations
+ that are unlikely to interfere with debugging or
+ profiling; and none, with no optimizations at all.
+ See the compiler-specific config/*-flags file for
+ more details. Alternatively, optimization options
+ can be specified directly by specifying them as a
+ string value. These custom optimzation flags will
+ completely replace all other optimization flags.
+ [default depends on build mode: debug=debug,
+ production=high, clean=none]
--enable-debug=all Turn on debugging in all packages. One may also
specify a comma-separated list of package names
without the leading H5 or the word no. The default
@@ -1606,12 +1677,14 @@ Optional Features:
Enable this option if a memory allocation and/or
bounds checking tool will be used on the HDF5
library. Enabling this causes the library to be more
- picky about it's memory operations and also disables
- the library's free space manager code. Default=no.
+ picky about its memory operations and also disables
+ the library's free space manager code. [default=no]
--enable-parallel Search for MPI-IO and MPI support files
--enable-direct-vfd Build the direct I/O virtual file driver (VFD). This
is based on the POSIX (sec2) VFD and requires the
open() call to take the O_DIRECT flag. [default=no]
+ --enable-ros3-vfd Build the Read-Only S3 virtual file driver (VFD).
+ [default=no]
--enable-dconv-exception
if exception handling functions is checked during
data conversions [default=yes]
@@ -1655,6 +1728,11 @@ Optional Packages:
--with-pthread=DIR Specify alternative path to Pthreads library when
thread-safe capability is built
--with-mpe=DIR Use MPE instrumentation [default=no]
+ --with-libhdfs=DIR Provide libhdfs library to enable HDFS virtual file
+ driver (VFD) [default=no]
+ --with-examplesdir=location
+ Specify path for examples
+ [default="DATAROOTDIR/hdf5_examples"]
--with-default-plugindir=location
Specify default location for plugins
[default="/usr/local/hdf5/lib/plugin"]
@@ -1745,7 +1823,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.8.21
+HDF5 configure 1.8.22
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2682,7 +2760,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.8.21, which was
+It was created by HDF5 $as_me 1.8.22, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3553,7 +3631,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.8.21'
+ VERSION='1.8.22'
cat >>confdefs.h <<_ACEOF
@@ -3686,16 +3764,45 @@ fi
AM_BACKSLASH='\'
-## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies
-## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE
-## is *not* included here, these files will be rebuilt if out of date.
-## This is a problem because if users try to build on a machine with
-## the wrong versions of autoconf and automake, these files will be
-## rebuilt with the wrong versions and bad things can happen.
-## Also, CVS doesn't preserve dependencies between timestamps, so
-## Makefiles will often think rebuilding needs to occur when it doesn't.
-## Developers should './configure --enable-maintainer-mode' to turn on
-## rebuild rules.
+## AM_MAINTAINER_MODE determines the behavior of "rebuild rules" that contain
+## dependencies for Makefile.in files, configure, src/H5config.h, etc. If
+## AM_MAINTAINER_MODE is enabled, these files will be rebuilt if out of date.
+## When disabled, the autotools build files can get out of sync and the build
+## system will not complain or try to regenerate downstream files.
+##
+## The AM_MAINTAINER_MODE macro also determines whether the
+## --(enable|disable)-maintainer-mode configure option is available. When the
+## macro is present, with or without a parameter, the option will be added
+## to the generated configure script.
+##
+## In summary:
+##
+## AM_MAINTAINER_MODE([enable])
+## - Build dependencies ON by default
+## - Configure option exists
+##
+## AM_MAINTAINER_MODE([disable])
+## - Build dependencies OFF by default
+## - Configure option exists
+##
+## AM_MAINTAINER_MODE
+## - Build dependencies OFF by default
+## - Configure option exists
+##
+## No AM_MAINTAINER_MODE macro
+## - Build dependencies ON by default
+## - No configure option to control build dependencies
+##
+## The biggest concern for us is that version control systems like git
+## usually don't preserve dependencies between timestamps, so the build
+## system will often think that upstream build files like Makefile.am are
+## dirty and that rebuilding needs to occur when it doesn't. This is a problem
+## in release branches where we provide the autotools-generated files. Users
+## who don't have autoconf, automake, etc. will then have difficulty building
+## release branches checked out from git.
+##
+## By default, maintainer mode is enabled in development branches and disabled
+## in release branches.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
@@ -3826,6 +3933,11 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but
## not exported to h5cc (or h5fc, etc.)
+##
+## H5_ECFLAGS (and company) are for warnings that should be treated as errors.
+##
+
+
@@ -3970,13 +4082,13 @@ fi
## turning on debug or profiling flags for the compiler. The search order
## is:
##
-## CPU-VENDOR-OS
-## VENDOR-OS
-## CPU-OS
-## CPU-VENDOR
-## OS
-## VENDOR
-## CPU
+## CPU-VENDOR-OS
+## VENDOR-OS
+## CPU-OS
+## CPU-VENDOR
+## OS
+## VENDOR
+## CPU
##
## If the `OS' ends with a version number then remove it. For instance,
## `freebsd3.1' would become `freebsd'
@@ -3988,6 +4100,9 @@ case $host_os in
freebsd*)
host_os_novers=freebsd
;;
+ netbsd*)
+ host_os_novers=netbsd
+ ;;
solaris*)
host_os_novers=solaris
;;
@@ -4043,6 +4158,61 @@ $as_echo "no" >&6; }
test "$hname_tmp" = "$hname" && break
done
+##
+## Enable/disable sanitizer checks for clang compilers, initially address sanitizer
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang sanitizer checks" >&5
+$as_echo_n "checking for clang sanitizer checks... " >&6; }
+# Check whether --enable-sanitize-checks was given.
+if test "${enable_sanitize_checks+set}" = set; then :
+ enableval=$enable_sanitize_checks; CLANG_SANITIZE_CHECKS=$enableval
+fi
+
+
+# Set default
+if test "X-$CLANG_SANITIZE_CHECKS" = X- ; then
+ CLANG_SANITIZE_CHECKS=none
+fi
+
+if test "X$CC_BASENAME" = "Xclang"; then
+
+
+ # There are several sanitizer tools. At present we are testing
+ # and describing only -fsanitizer=address with autotools.
+ case "X-$CLANG_SANITIZE_CHECKS" in
+ X-no|X-none)
+ CLANG_SANITIZE_CHECKS=none
+ CLANG_SANITIZE_LIST=
+ ;;
+ *)
+ CLANG_SANITIZE_LIST=$CLANG_SANITIZE_CHECKS
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_SANITIZE_CHECKS" >&5
+$as_echo "$CLANG_SANITIZE_CHECKS" >&6; }
+
+ # Other tools can be added to the list of checks
+ # The clang compiler doesn't support some of them; they should be
+ # checked before adding them to the list in the help message.
+ # The sanitizers/sanitizers.cmake file lists these options:
+ # address, memory, memoryWithOrigins, undefined, thread, leak,
+ # 'address;undefined'. Which and which combinations of these are
+ # supported varies by compiler version, but unsupported options
+ # or combinations will result in configure errors reported in config.log.
+ # Comma separated lists of sanitize options wil be entered intact in
+ # one -fsanitize=<list> flag. Space separated lists will be entered in
+ # separate -fsanitize=<item> flags.
+ # NOTE: No sanity checking done here!
+ if test -n "$CLANG_SANITIZE_LIST"; then
+ H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer"
+ H5_CXXFLAGS="$H5_CXXFLAGS -fno-omit-frame-pointer"
+ for sanitizer in `echo $CLANG_SANITIZE_LIST`; do
+ H5_CFLAGS="$H5_CFLAGS -fsanitize=${sanitizer}"
+ H5_CXXFLAGS="$H5_CXXFLAGS -fsanitize=${sanitizer}"
+ done
+ fi
+fi
+
## ----------------------------------------------------------------------
## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
## we need to add this in so configure works as intended. We will need to
@@ -6473,12 +6643,9 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
HAVE_SIZEOF_FORTRAN="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5
$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; }
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_SIZEOF/,/END PROGRAM PROG_FC_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
cat > conftest.$ac_ext <<_ACEOF
-
- PROGRAM main
- i = sizeof(x)
- END PROGRAM
-
+$TEST_SRC
_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -6497,15 +6664,9 @@ rm -f core conftest.err conftest.$ac_objext \
HAVE_C_SIZEOF_FORTRAN="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5
$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; }
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_C_SIZEOF/,/END PROGRAM PROG_FC_C_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
cat > conftest.$ac_ext <<_ACEOF
-
- PROGRAM main
- USE ISO_C_BINDING
- INTEGER(C_INT) :: a
- INTEGER(C_SIZE_T) :: result
- result = C_SIZEOF(a)
- END PROGRAM
-
+$TEST_SRC
_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -6524,14 +6685,9 @@ rm -f core conftest.err conftest.$ac_objext \
HAVE_STORAGE_SIZE_FORTRAN="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5
$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; }
+ TEST_SRC="`sed -ne '/PROGRAM PROG_FC_STORAGE_SIZE/,/END PROGRAM PROG_FC_STORAGE_SIZE/p' $srcdir/m4/aclocal_fc.f90`"
cat > conftest.$ac_ext <<_ACEOF
-
- PROGRAM main
- INTEGER :: a
- INTEGER :: result
- result = STORAGE_SIZE(a)
- END PROGRAM
-
+$TEST_SRC
_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -6593,35 +6749,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
## Checking if the compiler supports the required Fortran 2003 features and
## disable Fortran 2003 if it does not.
+ HAVE_F2003_REQUIREMENTS="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5
$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; }
- HAVE_FORTRAN_2003="no"
- HAVE_F2003_REQUIREMENTS="no"
- cat > conftest.$ac_ext <<_ACEOF
- program main
-
-
- USE iso_c_binding
- IMPLICIT NONE
- TYPE(C_PTR) :: ptr
- TYPE(C_FUNPTR) :: funptr
- CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
-
- ptr = C_LOC(ichr(1:1))
-
-
- end
+ TEST_SRC="`sed -n '/PROG_FC_HAVE_F2003_REQUIREMENTS/,/END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS/p' $srcdir/m4/aclocal_fc.f90`"
+ cat > conftest.$ac_ext <<_ACEOF
+$TEST_SRC
_ACEOF
-if ac_fn_fc_try_link "$LINENO"; then :
+if ac_fn_fc_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- HAVE_F2003_REQUIREMENTS=yes
+ HAVE_F2003_REQUIREMENTS="yes"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then
@@ -6689,7 +6832,7 @@ fi
## We need to check for a C++ compiler unconditionally, since
## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will
## miss even if c++ is not enabled.
- ac_ext=cpp
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -7106,7 +7249,7 @@ else
fi
- ac_ext=cpp
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -7238,7 +7381,7 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ## this is checked for when AC_HEADER_STDC is done
+ ## this is checked for when AC_HEADER_STDC is done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5
$as_echo_n "checking if c++ interface enabled... " >&6; }
@@ -7253,6 +7396,9 @@ if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
HDF5_INTERFACES="$HDF5_INTERFACES c++"
+ ## Expose the compiler for *.in files
+
+
## Change to the C++ language
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -7261,18 +7407,16 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Checking if C++ needs old style header files in includes
+ ## Checking if C++ needs old style header files in includes
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5
$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; }
+ TEST_SRC="`(echo \"#define OLD_HEADER_FILENAME 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <iostream>
-
-int main(void) { return 0; }
-
+$TEST_SRC
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -7287,23 +7431,15 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # Checking if C++ can handle namespaces
+ ## Checking if C++ can handle namespaces
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5
$as_echo_n "checking if $CXX can handle namespaces... " >&6; }
+ TEST_SRC="`(echo \"#define HDF_NO_NAMESPACE 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-namespace H5 {
-int fnord;
-}
-
-int main(void) {
- using namespace H5;
- fnord = 37;
- return 0;
-}
-
+$TEST_SRC
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -7311,88 +7447,57 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"
+ CXXFLAGS="${CXXFLAGS} -DHDF_NO_NAMESPACE"
+ AM_CXXFLAGS="${AM_CXXFLAGS} -DHDF_NO_NAMESPACE"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # Checking if C++ has offsetof extension
+ ## if C++ can handle static cast
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5
-$as_echo_n "checking if $CXX has offsetof extension... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <stdio.h>
- #include <stddef.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-
- struct index_st
- {
- unsigned char type;
- unsigned char num;
- unsigned int len;
- };
- typedef struct index_st index_t;
- int x,y;
- x = offsetof(struct index_st, len);
- y = offsetof(index_t, num)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5
+$as_echo_n "checking if $CXX can handle static cast... " >&6; }
+ TEST_SRC="`(echo \"#define NO_STATIC_CAST 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
- ;
- return 0;
-}
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$TEST_SRC
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-
-$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+ CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
+ AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # if C++ can handle static cast
+ ## Checking if C++ has offsetof extension,
+ ## note: this test has to be the last of the C++ tests because it sets a definition
+ ## which would be used in the other tests, causing them to fail.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5
+$as_echo_n "checking if $CXX has offsetof extension... " >&6; }
+ TEST_SRC="`(echo \"#define CXX_HAVE_OFFSETOF 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5
-$as_echo_n "checking if $CXX can handle static cast... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-int main(void) {
- float test_float;
- int test_int;
- test_float = 37.0;
- test_int = static_cast <int> (test_float);
- return 0;
-}
-
+$TEST_SRC
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+
+$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h
+
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -7501,7 +7606,6 @@ fi
## Check which archiving tool to use. This needs to be done before
## the AM_PROG_LIBTOOL macro.
##
-
if test -z "$AR"; then
for ac_prog in ar xar
do
@@ -7661,36 +7765,36 @@ fi
## The following variables are used to distinguish between building a
## serial and parallel library.
##
-## HAVE_PARALLEL -- defined in H5config.h if we are building
-## a parallel library even if configure wasn't
-## able to find some header file or library that
-## might be required. This is defined if the
-## user explicitly states
-## that a parallel library is being built by supplying
-## the `--enable-parallel' configure switch.
+## HAVE_PARALLEL -- defined in H5config.h if we are building
+## a parallel library even if configure wasn't
+## able to find some header file or library that
+## might be required. This is defined if the
+## user explicitly states
+## that a parallel library is being built by supplying
+## the `--enable-parallel' configure switch.
##
-## PARALLEL -- This variable is set to a non-null value if
-## we're building a parallel version of the library.
+## PARALLEL -- This variable is set to a non-null value if
+## we're building a parallel version of the library.
##
-## RUNSERIAL -- This is a command which will be prepended to
-## the executable name to run the executable using
-## a single process. For serial versions of the
-## library this will normally be empty. For parallel
-## versions it might be something like `mpiexec -n 1'.
-## The value of this variable is substituted in *.in
-## files.
+## RUNSERIAL -- This is a command which will be prepended to
+## the executable name to run the executable using
+## a single process. For serial versions of the
+## library this will normally be empty. For parallel
+## versions it might be something like `mpiexec -n 1'.
+## The value of this variable is substituted in *.in
+## files.
##
-## RUNPARALLEL -- This is a command which will be prepended to
-## the executable name to run the executable on
-## multiple processors. For the serial library the
-## value will normally be the empty string. For
-## parallel library it should be something like
-## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will
-## eventually contain the number of processors on which
-## to run the executable (the double dollarsigns are to
-## protect the expansion until make executes the
-## command). The value of this variable is
-## substituted in *.in files.
+## RUNPARALLEL -- This is a command which will be prepended to
+## the executable name to run the executable on
+## multiple processors. For the serial library the
+## value will normally be the empty string. For
+## parallel library it should be something like
+## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will
+## eventually contain the number of processors on which
+## to run the executable (the double dollarsigns are to
+## protect the expansion until make executes the
+## command). The value of this variable is
+## substituted in *.in files.
##
@@ -7752,6 +7856,52 @@ fi
## ----------------------------------------------------------------------
+## Check if they would like to disable building tests
+##
+
+## This needs to be exposed for the library info file.
+
+
+## Default is to build tests
+HDF5_TESTS=yes
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if building tests is disabled" >&5
+$as_echo_n "checking if building tests is disabled... " >&6; }
+
+# Check whether --enable-tests was given.
+if test "${enable_tests+set}" = set; then :
+ enableval=$enable_tests; HDF5_TESTS=$enableval
+fi
+
+
+if test "X$HDF5_TESTS" = "Xno"; then
+ echo "Building HDF5 tests is disabled"
+fi
+
+## ----------------------------------------------------------------------
+## Check if they would like to disable building tools
+##
+
+## This needs to be exposed for the library info file.
+
+
+## Default is to build tests and tools
+HDF5_TOOLS=yes
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if building tools is disabled" >&5
+$as_echo_n "checking if building tools is disabled... " >&6; }
+
+# Check whether --enable-tools was given.
+if test "${enable_tools+set}" = set; then :
+ enableval=$enable_tools; HDF5_TOOLS=$enableval
+fi
+
+
+if test "X$HDF5_TOOLS" = "Xno"; then
+ echo "Building HDF5 tools is disabled"
+fi
+
+## ----------------------------------------------------------------------
## Create libtool. If shared/static libraries are going to be enabled
## or disabled, it should happen before these macros.
@@ -22292,8 +22442,8 @@ if test "X$STATIC_EXEC" = "Xyes"; then
echo "yes"
## Issue a warning if -static flag is not supported.
if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then
- echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
- LT_STATIC_EXEC=""
+ echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
+ LT_STATIC_EXEC=""
else
LT_STATIC_EXEC="-all-static"
fi
@@ -24962,7 +25112,6 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
-
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -24979,12 +25128,18 @@ fi
## ----------------------------------------------------------------------
-## Is the dmalloc present? It has a header file `dmalloc.h' and a library
-## `-ldmalloc' and their locations might be specified with the `--with-dmalloc'
-## command-line switch. The value is an include path and/or a library path.
-## If the library path is specified then it must be preceded by a comma.
+## Is dmalloc (debug malloc library) requested? It has a header file
+## `dmalloc.h' and a library `-ldmalloc' and their locations might be
+## specified with the `--with-dmalloc' command-line switch. The value
+## is an include path and/or a library path. If the library path is
+## specified then it must be preceded by a comma.
##
+
+## Default is not present
+HAVE_DMALLOC=no
+
+
# Check whether --with-dmalloc was given.
if test "${with_dmalloc+set}" = set; then :
withval=$with_dmalloc;
@@ -24993,8 +25148,8 @@ else
fi
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_DMALLOC="yes"
for ac_header in dmalloc.h
do :
@@ -25071,7 +25226,7 @@ fi
as_fn_error $? "couldn't find dmalloc library" "$LINENO" 5
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_DMALLOC="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc library" >&5
$as_echo_n "checking for dmalloc library... " >&6; }
@@ -25203,8 +25358,8 @@ else
fi
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_ZLIB="yes"
for ac_header in zlib.h
do :
@@ -25289,7 +25444,7 @@ fi
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_ZLIB="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
$as_echo_n "checking for zlib... " >&6; }
@@ -25423,7 +25578,7 @@ $as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -25443,8 +25598,8 @@ else
fi
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_SZLIB="yes"
for ac_header in szlib.h
do :
@@ -25521,7 +25676,7 @@ fi
as_fn_error $? "couldn't find szlib library" "$LINENO" 5
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_SZLIB="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib" >&5
$as_echo_n "checking for szlib... " >&6; }
@@ -25553,27 +25708,13 @@ $as_echo "suppressed" >&6; }
AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc"
fi
- for ac_header in szlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_szlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SZLIB_H 1
-_ACEOF
- HAVE_SZLIB_H="yes"
-else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB
-fi
-
-done
-
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
- if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ if test "x$HAVE_SZLIB" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
$as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; }
if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then :
@@ -25626,9 +25767,28 @@ _ACEOF
LIBS="-lsz $LIBS"
else
- LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB
fi
+ if test -n "$HAVE_SZLIB"; then
+ for ac_header in szlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_szlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SZLIB_H 1
+_ACEOF
+ HAVE_SZLIB_H="yes"
+else
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB
+fi
+
+done
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled." >&5
+$as_echo "Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled." >&6; }
+ fi
fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
@@ -25648,7 +25808,7 @@ $as_echo_n "checking for szlib encoder... " >&6; }
if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
else
- export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$szlib_lib"
fi
LL_PATH="$LD_LIBRARY_PATH"
@@ -25665,16 +25825,29 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <szlib.h>
+ #include "szlib.h"
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
- int main(void)
- {
/* SZ_encoder_enabled returns 1 if encoder is present */
- if(SZ_encoder_enabled() == 1)
- exit(0);
- else
- exit(1);
- }
+ if(SZ_encoder_enabled() == 1)
+ exit(0);
+ else
+ exit(1);
+
+ ;
+ return 0;
+}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -25686,6 +25859,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
@@ -25708,13 +25882,13 @@ $as_echo "no" >&6; }
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
fi
fi
@@ -25818,6 +25992,11 @@ rm -f confcache
## Enable thread-safe version of library. It requires Pthreads support
## on POSIX systems.
##
+
+
+## Default is no thread-safety
+THREADSAFE=no
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread safe support" >&5
$as_echo_n "checking for thread safe support... " >&6; }
# Check whether --enable-threadsafe was given.
@@ -25846,7 +26025,7 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
fi
fi
-## --enable-threadsafe is also incompatible with --enable-fortran, unless
+## --enable-threadsafe is also incompatible with --enable-fortran unless
## --enable-unsupported has been specified on the configure line.
if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then
@@ -25877,7 +26056,7 @@ $as_echo "#define HAVE_THREADSAFE 1" >>confdefs.h
## ----------------------------------------------------------------------
- ## Is the pthreads library present? It has a header file `pthread.h' and
+ ## Is the Pthreads library present? It has a header file `pthread.h' and
## a library `-lpthread' and their locations might be specified with the
## `--with-pthread' command-line switch. The value is an include path
## and/or a library path. If the library path is specified then it must
@@ -26176,6 +26355,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <sys/time.h>
#include <time.h>
+
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
@@ -26252,7 +26432,7 @@ esac
## ----------------------------------------------------------------------
-## Does the struct stat have the st_blocks field? This field is not Posix.
+## Does the struct stat have the st_blocks field? This field is not POSIX.
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blocks in struct stat" >&5
$as_echo_n "checking for st_blocks in struct stat... " >&6; }
@@ -26404,7 +26584,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking for TIOCGWINSZ... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <sys/ioctl.h>
+
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
@@ -26437,7 +26619,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking for TIOCGETD... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <sys/ioctl.h>
+
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
@@ -26849,7 +27033,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
int
main ()
{
- const char *fname = __FUNCTION__;
+
;
return 0;
}
@@ -26925,17 +27109,30 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
- int main(void)
- {
- char *s = malloc(128);
- long long x = (long long)1048576 * (long long)1048576;
- sprintf(s,"%${hdf5_cv_printf_ll}d",x);
- exit(strcmp(s,"1099511627776"));
- }
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+ char *s = malloc(128);
+ long long x = (long long)1048576 * (long long)1048576;
+ sprintf(s,"%${hdf5_cv_printf_ll}d",x);
+ exit(strcmp(s,"1099511627776"));
+
+ ;
+ return 0;
+}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -27015,6 +27212,200 @@ $as_echo "no" >&6; }
fi
## ----------------------------------------------------------------------
+## Check if the compiler should include symbols
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking enable debugging symbols" >&5
+$as_echo_n "checking enable debugging symbols... " >&6; }
+# Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+ enableval=$enable_symbols; SYMBOLS=$enableval
+fi
+
+
+## Set default
+if test "X-$SYMBOLS" = X- ; then
+ if test "X-$CONFIG_MODE" = "X-development" ; then
+ SYMBOLS=yes
+ else
+ SYMBOLS=no
+ fi
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$SYMBOLS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS"
+ SYMBOLS="custom ($SYMBOLS)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOLS" >&5
+$as_echo "$SYMBOLS" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if developer warnings should be turned on
+## These are warnings that provide suggestions like gcc's -Wsuggest-attribute.
+## They do not indicate code problems.
+##
+## Note that developers don't need to build with these regularly. They
+## are just handy to check once in a while (before releases, etc.).
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking enable developer warnings" >&5
+$as_echo_n "checking enable developer warnings... " >&6; }
+# Check whether --enable-developer-warnings was given.
+if test "${enable_developer_warnings+set}" = set; then :
+ enableval=$enable_developer_warnings; DEV_WARNINGS=$enableval
+fi
+
+
+## Set default
+if test "X-$DEV_WARNINGS" = X- ; then
+ DEV_WARNINGS=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$DEV_WARNINGS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $DEVELOPER_WARNING_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_DEVELOPER_WARNING_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ as_fn_error $? "Unrecognized value: $DEV_WARNINGS" "$LINENO" 5
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use profiling flags/settings
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking profiling" >&5
+$as_echo_n "checking profiling... " >&6; }
+# Check whether --enable-profiling was given.
+if test "${enable_profiling+set}" = set; then :
+ enableval=$enable_profiling; PROFILING=$enableval
+fi
+
+
+## Default is no profiling
+if test "X-$PROFILING" = X- ; then
+ PROFILING=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$PROFILING" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $PROFILING"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILING"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILING"
+ PROFILING="custom ($PROFILING)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILING" >&5
+$as_echo "$PROFILING" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use a particular optimization setting
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking optimization level" >&5
+$as_echo_n "checking optimization level... " >&6; }
+# Check whether --enable-optimization was given.
+if test "${enable_optimization+set}" = set; then :
+ enableval=$enable_optimization; OPTIMIZATION=$enableval
+fi
+
+
+## Set the default optimization level. This depends on the compiler mode.
+if test "X-$OPTIMIZATION" = X- ; then
+ case "X-$CONFIG_MODE" in
+ X-debug)
+ OPTIMIZATION=debug
+ ;;
+ X-production)
+ OPTIMIZATION=high
+ ;;
+ X-clean)
+ OPTIMIZATION=none
+ ;;
+ esac
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$OPTIMIZATION" in
+ X-high)
+ H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: high" >&5
+$as_echo "high" >&6; }
+ ;;
+ X-debug)
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
+$as_echo "debug" >&6; }
+ ;;
+ X-none)
+ H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION"
+ H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION"
+ H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION"
+ OPTIMIZATION="custom ($OPTIMIZATION)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPTIMIZATION" >&5
+$as_echo "$OPTIMIZATION" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
## Turn on debugging by setting compiler flags
## This must come after the enable-production since it depends on production.
##
@@ -27232,7 +27623,6 @@ esac
## more scrupulous with it's memory operations. Enabling this also
## disables the library's free space manager code.
##
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a memory checking tool will be used" >&5
$as_echo_n "checking whether a memory checking tool will be used... " >&6; }
# Check whether --enable-using-memchecker was given.
@@ -27241,20 +27631,30 @@ if test "${enable_using_memchecker+set}" = set; then :
fi
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+## Set the default level.
+if test "X-$USINGMEMCHECKER" = X- ; then
+ USINGMEMCHECKER=no
+fi
+
case "X-$USINGMEMCHECKER" in
X-yes)
- USINGMEMCHECKER=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
$as_echo "#define USING_MEMCHECKER 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
;;
- *)
- USINGMEMCHECKER=no
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
+ *)
+ as_fn_error $? "Unrecognized value: $USINGMEMCHECKER" "$LINENO" 5
+ ;;
esac
## Checkpoint the cache
@@ -27405,7 +27805,7 @@ int
main ()
{
MPI_Init(0, (void *)0);
- MPI_File_open(0, (void *)0, 0, 0, (void *)0);
+ MPI_File_open(0, (void *)0, 0, 0, (void *)0);
;
return 0;
}
@@ -27416,7 +27816,7 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5
+ as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -27429,17 +27829,11 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-
+ TEST_SRC="`sed -n '/PROGRAM FC_MPI_CHECK/,/END PROGRAM FC_MPI_CHECK/p' $srcdir/m4/aclocal_fc.f90`"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5
$as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; }
cat > conftest.$ac_ext <<_ACEOF
-
- PROGRAM main
- USE mpi
- INTEGER :: comm, amode, info, fh, ierror
- CHARACTER(LEN=1) :: filename
- CALL MPI_File_open( comm, filename, amode, info, fh, ierror)
- END
+$TEST_SRC
_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -27476,12 +27870,16 @@ esac
## ----------------------------------------------------------------------
## Print some other parallel information and do some sanity checks.
+## Needs to be done outside of the PARALLEL block since the serial
+## build also needs to have values defined.
##
ADD_PARALLEL_FILES="no"
if test -n "$PARALLEL"; then
- ## The 'testpar' directory should participate in the build
- TESTPARALLEL=testpar
+ if test "X$HDF5_TESTS" = "Xyes"; then
+ ## The 'testpar' directory should participate in the build
+ TESTPARALLEL=testpar
+ fi
## We are building a parallel library
@@ -27521,7 +27919,9 @@ $as_echo_n "checking for MPI_Comm_c2f and MPI_Comm_f2c functions... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <mpi.h>
+
+ #include <mpi.h>
+
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
@@ -27542,7 +27942,7 @@ if ac_fn_c_try_link "$LINENO"; then :
$as_echo "#define HAVE_MPI_MULTI_LANG_Comm 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -27577,7 +27977,7 @@ if ac_fn_c_try_link "$LINENO"; then :
$as_echo "#define HAVE_MPI_MULTI_LANG_Info 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -27864,8 +28264,9 @@ fi
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
-## Check these regardless. If the checks are moved inside the main
-## direct VFD block, the output is nested.
+
+## Default is no direct VFD
+DIRECT_VFD=no
if ${hdf5_cv_direct_io+:} false; then :
$as_echo_n "(cached) " >&6
@@ -27925,6 +28326,7 @@ else
$as_echo "no" >&6; }
fi
+## Direct VFD files are not built if not required.
if test "X$DIRECT_VFD" = "Xyes"; then
DIRECT_VFD_CONDITIONAL_TRUE=
DIRECT_VFD_CONDITIONAL_FALSE='#'
@@ -27935,6 +28337,548 @@ fi
## ----------------------------------------------------------------------
+## Check if Read-Only S3 virtual file driver is enabled by --enable-ros3-vfd
+##
+
+
+## Default is no Read-Only S3 VFD
+ROS3_VFD=no
+
+# Check whether --enable-ros3-vfd was given.
+if test "${enable_ros3_vfd+set}" = set; then :
+ enableval=$enable_ros3_vfd; ROS3_VFD=$enableval
+else
+ ROS3_VFD=no
+fi
+
+
+if test "X$ROS3_VFD" = "Xyes"; then
+ for ac_header in curl/curl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
+if test "x$ac_cv_header_curl_curl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CURL_CURL_H 1
+_ACEOF
+
+else
+ unset ROS3_VFD
+fi
+
+done
+
+ for ac_header in openssl/evp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_EVP_H 1
+_ACEOF
+
+else
+ unset ROS3_VFD
+fi
+
+done
+
+ for ac_header in openssl/hmac.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_hmac_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_HMAC_H 1
+_ACEOF
+
+else
+ unset ROS3_VFD
+fi
+
+done
+
+ for ac_header in openssl/sha.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_sha_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_SHA_H 1
+_ACEOF
+
+else
+ unset ROS3_VFD
+fi
+
+done
+
+ if test "X$ROS3_VFD" = "Xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_global_init in -lcurl" >&5
+$as_echo_n "checking for curl_global_init in -lcurl... " >&6; }
+if ${ac_cv_lib_curl_curl_global_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char curl_global_init ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return curl_global_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_curl_curl_global_init=yes
+else
+ ac_cv_lib_curl_curl_global_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_global_init" >&5
+$as_echo "$ac_cv_lib_curl_curl_global_init" >&6; }
+if test "x$ac_cv_lib_curl_curl_global_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCURL 1
+_ACEOF
+
+ LIBS="-lcurl $LIBS"
+
+else
+ unset ROS3_VFD
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
+$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_EVP_sha256+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char EVP_sha256 ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return EVP_sha256 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_EVP_sha256=yes
+else
+ ac_cv_lib_crypto_EVP_sha256=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha256" >&5
+$as_echo "$ac_cv_lib_crypto_EVP_sha256" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_sha256" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
+
+ LIBS="-lcrypto $LIBS"
+
+else
+ unset ROS3_VFD
+fi
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Read-Only S3 virtual file driver (VFD) is enabled" >&5
+$as_echo_n "checking if the Read-Only S3 virtual file driver (VFD) is enabled... " >&6; }
+ if test "X$ROS3_VFD" = "Xyes"; then
+
+$as_echo "#define HAVE_ROS3_VFD 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ROS3_VFD=no
+ as_fn_error $? "The Read-Only S3 VFD was requested but cannot be built.
+ Please check that openssl and cURL are available on your
+ system, and/or re-configure without option
+ --enable-ros3-vfd." "$LINENO" 5
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Read-Only S3 virtual file driver (VFD) is enabled" >&5
+$as_echo_n "checking if the Read-Only S3 virtual file driver (VFD) is enabled... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ROS3_VFD=no
+
+fi
+
+## Read-only S3 files are not built if not required.
+ if test "X$ROS3_VFD" = "Xyes"; then
+ ROS3_VFD_CONDITIONAL_TRUE=
+ ROS3_VFD_CONDITIONAL_FALSE='#'
+else
+ ROS3_VFD_CONDITIONAL_TRUE='#'
+ ROS3_VFD_CONDITIONAL_FALSE=
+fi
+
+
+
+## ----------------------------------------------------------------------
+## Is libhdfs (Hadoop Distributed File System) present?
+## It might be specified with the `--with-libhdfs' command-line switch.
+## If found, enables the HDFS VFD.
+##
+
+
+# Check whether --with-libhdfs was given.
+if test "${with_libhdfs+set}" = set; then :
+ withval=$with_libhdfs;
+else
+ withval=no
+fi
+
+
+case $withval in
+ no)
+ HAVE_LIBHDFS="no"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhdfs" >&5
+$as_echo_n "checking for libhdfs... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
+$as_echo "suppressed" >&6; }
+ ;;
+ *)
+ HAVE_LIBHDFS="yes"
+ case "$withval" in
+ *,*)
+ libhdfs_inc="`echo $withval |cut -f1 -d,`"
+ libhdfs_lib="`echo $withval |cut -f2 -d, -s`"
+ ;;
+ yes)
+ libhdfs_inc="$HADOOP_HOME/include"
+ libhdfs_lib="$HADOOP_HOME/lib"
+ ;;
+ *)
+ if test -n "$withval"; then
+ libhdfs_inc="$withval/include"
+ libhdfs_lib="$withval/lib"
+ fi
+ ;;
+ esac
+
+ if test -n "$libhdfs_inc"; then
+ CPPFLAGS="$CPPFLAGS -I$libhdfs_inc"
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$libhdfs_inc"
+ fi
+ for ac_header in hdfs.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "hdfs.h" "ac_cv_header_hdfs_h" "$ac_includes_default"
+if test "x$ac_cv_header_hdfs_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_HDFS_H 1
+_ACEOF
+
+else
+ unset HAVE_LIBHDFS
+fi
+
+done
+
+
+ if test "x$HAVE_LIBHDFS" = "xyes"; then
+ JNI_LDFLAGS=""
+ if test $JAVA_HOME != ""
+ then
+ JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH -L$JAVA_HOME/jre/lib/$OS_ARCH/server"
+ fi
+ ldflags_bak=$LDFLAGS
+ LDFLAGS="$LDFLAGS $JNI_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetCreatedJavaVMs in -ljvm" >&5
+$as_echo_n "checking for JNI_GetCreatedJavaVMs in -ljvm... " >&6; }
+if ${ac_cv_lib_jvm_JNI_GetCreatedJavaVMs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljvm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char JNI_GetCreatedJavaVMs ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return JNI_GetCreatedJavaVMs ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_jvm_JNI_GetCreatedJavaVMs=yes
+else
+ ac_cv_lib_jvm_JNI_GetCreatedJavaVMs=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetCreatedJavaVMs" >&5
+$as_echo "$ac_cv_lib_jvm_JNI_GetCreatedJavaVMs" >&6; }
+if test "x$ac_cv_lib_jvm_JNI_GetCreatedJavaVMs" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJVM 1
+_ACEOF
+
+ LIBS="-ljvm $LIBS"
+
+fi
+
+ LDFLAGS=$ldflags_bak
+
+ if test -n "$libhdfs_lib"; then
+ ## Hadoop distribution hides libraries down one level in 'lib/native'
+ libhdfs_lib="$libhdfs_lib/native"
+ LDFLAGS="$LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS"
+ AM_LDFLAGS="$AM_LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdfsConnect in -lhdfs" >&5
+$as_echo_n "checking for hdfsConnect in -lhdfs... " >&6; }
+if ${ac_cv_lib_hdfs_hdfsConnect+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhdfs $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char hdfsConnect ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return hdfsConnect ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_hdfs_hdfsConnect=yes
+else
+ ac_cv_lib_hdfs_hdfsConnect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdfs_hdfsConnect" >&5
+$as_echo "$ac_cv_lib_hdfs_hdfsConnect" >&6; }
+if test "x$ac_cv_lib_hdfs_hdfsConnect" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBHDFS 1
+_ACEOF
+
+ LIBS="-lhdfs $LIBS"
+
+else
+ unset HAVE_LIBHDFS
+fi
+
+ fi
+
+ if test -z "$HAVE_LIBHDFS"; then
+ as_fn_error $? "Set to use libhdfs library, but could not find or use
+ libhdfs. Please verify that the path to HADOOP_HOME is
+ valid, and/or reconfigure without --with-libhdfs." "$LINENO" 5
+ fi
+ ;;
+esac
+
+if test "x$HAVE_LIBHDFS" = "xyes"; then
+
+$as_echo "#define HAVE_LIBHDFS 1" >>confdefs.h
+
+fi
+
+## Checkpoint the cache
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+## ----------------------------------------------------------------------
+## Use custom examples path.
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for custom examples path definition" >&5
+$as_echo_n "checking for custom examples path definition... " >&6; }
+
+# Check whether --with-examplesdir was given.
+if test "${with_examplesdir+set}" = set; then :
+ withval=$with_examplesdir;
+else
+ withval="${datarootdir}/hdf5_examples"
+fi
+
+
+if test "X$withval" = "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
+$as_echo "default" >&6; }
+ examplesdir="${datarootdir}/hdf5_examples"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
+$as_echo "$withval" >&6; }
+ examplesdir=$withval
+fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define EXAMPLESDIR "$examplesdir"
+_ACEOF
+
+
+## ----------------------------------------------------------------------
## Enable custom plugin default path for library. It requires SHARED support.
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for custom plugin default path definition" >&5
@@ -28849,7 +29793,7 @@ else
BUILD_CXX_CONDITIONAL_FALSE=
fi
- if test -n "$TESTPARALLEL"; then
+ if test "X$PARALLEL" = "Xyes"; then
BUILD_PARALLEL_CONDITIONAL_TRUE=
BUILD_PARALLEL_CONDITIONAL_FALSE='#'
else
@@ -28873,6 +29817,29 @@ else
BUILD_HDF5_HL_CONDITIONAL_FALSE=
fi
+ if test "X$HDF5_TESTS" = "Xyes"; then
+ BUILD_TESTS_CONDITIONAL_TRUE=
+ BUILD_TESTS_CONDITIONAL_FALSE='#'
+else
+ BUILD_TESTS_CONDITIONAL_TRUE='#'
+ BUILD_TESTS_CONDITIONAL_FALSE=
+fi
+
+ if test -n "$TESTPARALLEL"; then
+ BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE=
+ BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE='#'
+else
+ BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE='#'
+ BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE=
+fi
+
+ if test "X$HDF5_TOOLS" = "Xyes"; then
+ BUILD_TOOLS_CONDITIONAL_TRUE=
+ BUILD_TOOLS_CONDITIONAL_FALSE='#'
+else
+ BUILD_TOOLS_CONDITIONAL_TRUE='#'
+ BUILD_TOOLS_CONDITIONAL_FALSE=
+fi
## ----------------------------------------------------------------------
@@ -29315,7 +30282,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-HDF5 config.lt 1.8.21
+HDF5 config.lt 1.8.22
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -30769,7 +31736,7 @@ else
fi
-ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/h5dump_plugin.sh tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/Makefile tools/h5ls/h5ls_plugin.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/h5diff_plugin.sh tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
+ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testpflush.sh tools/Makefile tools/h5dump/Makefile tools/h5dump/h5dump_plugin.sh tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/Makefile tools/h5ls/h5ls_plugin.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/h5diff_plugin.sh tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/libtest/Makefile tools/misc/Makefile tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh bin/h5cc bin/Makefile c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
cat >confcache <<\_ACEOF
@@ -30954,6 +31921,10 @@ if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL
as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ROS3_VFD_CONDITIONAL_TRUE}" && test -z "${ROS3_VFD_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"ROS3_VFD_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then
as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -30974,6 +31945,18 @@ if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDI
as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_TESTS_CONDITIONAL_TRUE}" && test -z "${BUILD_TESTS_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TESTS_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TESTS_PARALLEL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_TOOLS_CONDITIONAL_TRUE}" && test -z "${BUILD_TOOLS_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TOOLS_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_SHARED_CONDITIONAL_TRUE}" && test -z "${HAVE_SHARED_CONDITIONAL_FALSE}"; then
as_fn_error $? "conditional \"HAVE_SHARED_CONDITIONAL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -31375,7 +32358,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by HDF5 $as_me 1.8.21, which was
+This file was extended by HDF5 $as_me 1.8.22, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31441,7 +32424,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-HDF5 config.status 1.8.21
+HDF5 config.status 1.8.22
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -32053,6 +33036,7 @@ do
"test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;;
"test/test_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_plugin.sh" ;;
"testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;;
+ "testpar/testpflush.sh") CONFIG_FILES="$CONFIG_FILES testpar/testpflush.sh" ;;
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;;
"tools/h5dump/h5dump_plugin.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/h5dump_plugin.sh" ;;
@@ -32076,8 +33060,8 @@ do
"tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
"tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
"tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;;
+ "tools/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tools/libtest/Makefile" ;;
"tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;;
- "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;;
"tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;;
"tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;;
"tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;;
@@ -32086,6 +33070,8 @@ do
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;;
"examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;;
+ "bin/h5cc") CONFIG_FILES="$CONFIG_FILES bin/h5cc" ;;
+ "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
"c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;;
"c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;;
"c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;;
@@ -33728,7 +34714,7 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-chmod 755 tools/misc/h5cc
+chmod 755 bin/h5cc
if test "X$HDF_CXX" = "Xyes"; then
chmod 755 c++/src/h5c++
fi
@@ -33745,14 +34731,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
;;
esac
- ### libtool does not pass the correct argument linking (-WL,-Wl,,) for the NAG Fortran compiler
+ ### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler
### on Linux (other OSs have not been tested).
### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
### wl="-Wl,-Wl,," in the libtool file. (HDFFV-10037)
case "`uname`" in
Linux*)
if test "X$FC_BASENAME" = "Xnagfor"; then
- cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
+ cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
fi
;;
esac
diff --git a/configure.ac b/configure.ac
index 2301d05..b3c13a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
-## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.
@@ -24,7 +24,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.8.21], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.8.22], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADERS([src/H5config.h])
@@ -36,17 +36,46 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
-## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies
-## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE
-## is *not* included here, these files will be rebuilt if out of date.
-## This is a problem because if users try to build on a machine with
-## the wrong versions of autoconf and automake, these files will be
-## rebuilt with the wrong versions and bad things can happen.
-## Also, CVS doesn't preserve dependencies between timestamps, so
-## Makefiles will often think rebuilding needs to occur when it doesn't.
-## Developers should './configure --enable-maintainer-mode' to turn on
-## rebuild rules.
-AM_MAINTAINER_MODE
+## AM_MAINTAINER_MODE determines the behavior of "rebuild rules" that contain
+## dependencies for Makefile.in files, configure, src/H5config.h, etc. If
+## AM_MAINTAINER_MODE is enabled, these files will be rebuilt if out of date.
+## When disabled, the autotools build files can get out of sync and the build
+## system will not complain or try to regenerate downstream files.
+##
+## The AM_MAINTAINER_MODE macro also determines whether the
+## --(enable|disable)-maintainer-mode configure option is available. When the
+## macro is present, with or without a parameter, the option will be added
+## to the generated configure script.
+##
+## In summary:
+##
+## AM_MAINTAINER_MODE([enable])
+## - Build dependencies ON by default
+## - Configure option exists
+##
+## AM_MAINTAINER_MODE([disable])
+## - Build dependencies OFF by default
+## - Configure option exists
+##
+## AM_MAINTAINER_MODE
+## - Build dependencies OFF by default
+## - Configure option exists
+##
+## No AM_MAINTAINER_MODE macro
+## - Build dependencies ON by default
+## - No configure option to control build dependencies
+##
+## The biggest concern for us is that version control systems like git
+## usually don't preserve dependencies between timestamps, so the build
+## system will often think that upstream build files like Makefile.am are
+## dirty and that rebuilding needs to occur when it doesn't. This is a problem
+## in release branches where we provide the autotools-generated files. Users
+## who don't have autoconf, automake, etc. will then have difficulty building
+## release branches checked out from git.
+##
+## By default, maintainer mode is enabled in development branches and disabled
+## in release branches.
+AM_MAINTAINER_MODE([disable])
## ----------------------------------------------------------------------
## Set prefix default (install directory) to a directory in the build area.
@@ -99,10 +128,15 @@ AC_SUBST([CPPFLAGS])
## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but
## not exported to h5cc (or h5fc, etc.)
+##
+## H5_ECFLAGS (and company) are for warnings that should be treated as errors.
+##
AC_SUBST([H5_CFLAGS])
+AC_SUBST([H5_ECFLAGS])
AC_SUBST([H5_CPPFLAGS])
AC_SUBST([H5_FCFLAGS])
AC_SUBST([H5_CXXFLAGS])
+AC_SUBST([H5_ECXXFLAGS])
AC_SUBST([H5_LDFLAGS])
## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5,
@@ -190,7 +224,7 @@ AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a`
## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
## that it actually does what it's supposed to do. Catch this early
-## since configure and scripts relies upon them heavily and there's
+## since configure and scripts relies upon them heavily and there's
## no use continuing if it's broken.
##
AC_MSG_CHECKING([if basename works])
@@ -229,13 +263,13 @@ fi
## turning on debug or profiling flags for the compiler. The search order
## is:
##
-## CPU-VENDOR-OS
-## VENDOR-OS
-## CPU-OS
-## CPU-VENDOR
-## OS
-## VENDOR
-## CPU
+## CPU-VENDOR-OS
+## VENDOR-OS
+## CPU-OS
+## CPU-VENDOR
+## OS
+## VENDOR
+## CPU
##
## If the `OS' ends with a version number then remove it. For instance,
## `freebsd3.1' would become `freebsd'
@@ -247,6 +281,9 @@ case $host_os in
freebsd*)
host_os_novers=freebsd
;;
+ netbsd*)
+ host_os_novers=netbsd
+ ;;
solaris*)
host_os_novers=solaris
;;
@@ -296,6 +333,63 @@ while test -n "$hname"; do
test "$hname_tmp" = "$hname" && break
done
+##
+## Enable/disable sanitizer checks for clang compilers, initially address sanitizer
+##
+AC_MSG_CHECKING([for clang sanitizer checks])
+AC_ARG_ENABLE([sanitize-checks],
+ [AS_HELP_STRING([--enable-sanitize-checks=address],
+ [(clang/clang++ compilers only) Enable sanitize checks.
+ Address is useful for detecting issues dealing with
+ memory. See AddressSanitizer in config/sanitizer/README.md
+ for more information.
+ [default=none]
+ ])],
+ [CLANG_SANITIZE_CHECKS=$enableval])
+
+# Set default
+if test "X-$CLANG_SANITIZE_CHECKS" = X- ; then
+ CLANG_SANITIZE_CHECKS=none
+fi
+
+if test "X$CC_BASENAME" = "Xclang"; then
+ AC_SUBST([CLANG_SANITIZE_CHECKS])
+
+ # There are several sanitizer tools. At present we are testing
+ # and describing only -fsanitizer=address with autotools.
+ case "X-$CLANG_SANITIZE_CHECKS" in
+ X-no|X-none)
+ CLANG_SANITIZE_CHECKS=none
+ CLANG_SANITIZE_LIST=
+ ;;
+ *)
+ CLANG_SANITIZE_LIST=$CLANG_SANITIZE_CHECKS
+ ;;
+ esac
+ AC_MSG_RESULT([$CLANG_SANITIZE_CHECKS])
+
+ # Other tools can be added to the list of checks
+ # The clang compiler doesn't support some of them; they should be
+ # checked before adding them to the list in the help message.
+ # The sanitizers/sanitizers.cmake file lists these options:
+ # address, memory, memoryWithOrigins, undefined, thread, leak,
+ # 'address;undefined'. Which and which combinations of these are
+ # supported varies by compiler version, but unsupported options
+ # or combinations will result in configure errors reported in config.log.
+ # Comma separated lists of sanitize options wil be entered intact in
+ # one -fsanitize=<list> flag. Space separated lists will be entered in
+ # separate -fsanitize=<item> flags.
+ # NOTE: No sanity checking done here!
+ if test -n "$CLANG_SANITIZE_LIST"; then
+ H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer"
+ H5_CXXFLAGS="$H5_CXXFLAGS -fno-omit-frame-pointer"
+ for sanitizer in `echo $CLANG_SANITIZE_LIST`; do
+ H5_CFLAGS="$H5_CFLAGS -fsanitize=${sanitizer}"
+ H5_CXXFLAGS="$H5_CXXFLAGS -fsanitize=${sanitizer}"
+ done
+ fi
+fi
+
## ----------------------------------------------------------------------
## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
## we need to add this in so configure works as intended. We will need to
@@ -332,7 +426,7 @@ AC_ARG_ENABLE([unsupported],
[Allow unsupported combinations of configure options])],
[ALLOW_UNSUPPORTED=$enableval])
-case "X-$ALLOW_UNSUPPORTED" in
+case "X-$ALLOW_UNSUPPORTED" in
X-|X-no)
AC_MSG_RESULT([no])
;;
@@ -413,7 +507,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## --------------------------------------------------------------------
## Check for a Fortran compiler and how to include modules.
- ##
+ ##
AC_PROG_FC([PAC_FC_SEARCH_LIST],)
AC_F9X_MODS
@@ -433,7 +527,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
PAC_PROG_FC_C_SIZEOF
## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE"
- PAC_PROG_FC_STORAGE_SIZE
+ PAC_PROG_FC_STORAGE_SIZE
## Check to see if -r8 was specified to determine if we need to
## compile the DOUBLE PRECISION interfaces.
@@ -470,8 +564,8 @@ AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDB
## We need to check for a C++ compiler unconditionally, since
## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will
## miss even if c++ is not enabled.
- AC_PROG_CXX
- AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done
+AC_PROG_CXX
+AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done
AC_MSG_CHECKING([if c++ interface enabled])
@@ -484,21 +578,26 @@ if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
HDF5_INTERFACES="$HDF5_INTERFACES c++"
+ ## Expose the compiler for *.in files
+ AC_SUBST([CXX])
+
## Change to the C++ language
AC_LANG_PUSH(C++)
- # Checking if C++ needs old style header files in includes
+ ## Checking if C++ needs old style header files in includes
PAC_PROG_CXX_HEADERS
- # Checking if C++ can handle namespaces
+ ## Checking if C++ can handle namespaces
PAC_PROG_CXX_NAMESPACE
-
- # Checking if C++ has offsetof extension
- PAC_PROG_CXX_OFFSETOF
- # if C++ can handle static cast
+ ## if C++ can handle static cast
PAC_PROG_CXX_STATIC_CAST
+ ## Checking if C++ has offsetof extension,
+ ## note: this test has to be the last of the C++ tests because it sets a definition
+ ## which would be used in the other tests, causing them to fail.
+ PAC_PROG_CXX_OFFSETOF
+
else
AC_MSG_RESULT([no])
CXX="no"
@@ -551,7 +650,6 @@ fi
## Check which archiving tool to use. This needs to be done before
## the AM_PROG_LIBTOOL macro.
##
-
if test -z "$AR"; then
AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH])
fi
@@ -597,36 +695,36 @@ fi
## The following variables are used to distinguish between building a
## serial and parallel library.
##
-## HAVE_PARALLEL -- defined in H5config.h if we are building
-## a parallel library even if configure wasn't
-## able to find some header file or library that
-## might be required. This is defined if the
-## user explicitly states
-## that a parallel library is being built by supplying
-## the `--enable-parallel' configure switch.
-##
-## PARALLEL -- This variable is set to a non-null value if
-## we're building a parallel version of the library.
-##
-## RUNSERIAL -- This is a command which will be prepended to
-## the executable name to run the executable using
-## a single process. For serial versions of the
-## library this will normally be empty. For parallel
-## versions it might be something like `mpiexec -n 1'.
-## The value of this variable is substituted in *.in
-## files.
-##
-## RUNPARALLEL -- This is a command which will be prepended to
-## the executable name to run the executable on
-## multiple processors. For the serial library the
-## value will normally be the empty string. For
-## parallel library it should be something like
-## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will
-## eventually contain the number of processors on which
-## to run the executable (the double dollarsigns are to
-## protect the expansion until make executes the
-## command). The value of this variable is
-## substituted in *.in files.
+## HAVE_PARALLEL -- defined in H5config.h if we are building
+## a parallel library even if configure wasn't
+## able to find some header file or library that
+## might be required. This is defined if the
+## user explicitly states
+## that a parallel library is being built by supplying
+## the `--enable-parallel' configure switch.
+##
+## PARALLEL -- This variable is set to a non-null value if
+## we're building a parallel version of the library.
+##
+## RUNSERIAL -- This is a command which will be prepended to
+## the executable name to run the executable using
+## a single process. For serial versions of the
+## library this will normally be empty. For parallel
+## versions it might be something like `mpiexec -n 1'.
+## The value of this variable is substituted in *.in
+## files.
+##
+## RUNPARALLEL -- This is a command which will be prepended to
+## the executable name to run the executable on
+## multiple processors. For the serial library the
+## value will normally be the empty string. For
+## parallel library it should be something like
+## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will
+## eventually contain the number of processors on which
+## to run the executable (the double dollarsigns are to
+## protect the expansion until make executes the
+## command). The value of this variable is
+## substituted in *.in files.
##
AC_SUBST([PARALLEL])
AC_SUBST([RUNSERIAL])
@@ -642,8 +740,8 @@ H5_FORTRAN_SHARED="no"
if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
AC_MSG_CHECKING([if shared Fortran libraries are supported])
H5_FORTRAN_SHARED="yes"
- ## tell libtool to do the right thing with COMMON symbols, this fixes
- ## corrupt values with COMMON and EQUIVALENCE when building shared
+ ## tell libtool to do the right thing with COMMON symbols, this fixes
+ ## corrupt values with COMMON and EQUIVALENCE when building shared
## Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772).
case "`uname`" in
Darwin*)
@@ -652,7 +750,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
esac
## Report results of check(s)
-
+
if test "X${H5_FORTRAN_SHARED}" = "Xno"; then
AC_MSG_RESULT([no])
AC_MSG_WARN([$CHECK_WARN])
@@ -674,6 +772,48 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
## ----------------------------------------------------------------------
+## Check if they would like to disable building tests
+##
+
+## This needs to be exposed for the library info file.
+AC_SUBST([HDF5_TESTS])
+
+## Default is to build tests
+HDF5_TESTS=yes
+
+AC_MSG_CHECKING([if building tests is disabled])
+
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests],
+ [Compile the HDF5 tests [default=yes]])],
+ [HDF5_TESTS=$enableval])
+
+if test "X$HDF5_TESTS" = "Xno"; then
+ echo "Building HDF5 tests is disabled"
+fi
+
+## ----------------------------------------------------------------------
+## Check if they would like to disable building tools
+##
+
+## This needs to be exposed for the library info file.
+AC_SUBST([HDF5_TOOLS])
+
+## Default is to build tests and tools
+HDF5_TOOLS=yes
+
+AC_MSG_CHECKING([if building tools is disabled])
+
+AC_ARG_ENABLE([tools],
+ [AS_HELP_STRING([--enable-tools],
+ [Compile the HDF5 tools [default=yes]])],
+ [HDF5_TOOLS=$enableval])
+
+if test "X$HDF5_TOOLS" = "Xno"; then
+ echo "Building HDF5 tools is disabled"
+fi
+
+## ----------------------------------------------------------------------
## Create libtool. If shared/static libraries are going to be enabled
## or disabled, it should happen before these macros.
LT_PREREQ([2.2])
@@ -686,7 +826,7 @@ LT_INIT([dlopen,win32-dll])
## ----------------------------------------------------------------------
## Check if we should install only statically linked executables.
## This check needs to occur after libtool is initialized because
-## we check a libtool cache value and may issue a warning based
+## we check a libtool cache value and may issue a warning based
## on its result.
AC_MSG_CHECKING([if we should install only statically linked executables])
AC_ARG_ENABLE([static_exec],
@@ -699,8 +839,8 @@ if test "X$STATIC_EXEC" = "Xyes"; then
echo "yes"
## Issue a warning if -static flag is not supported.
if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then
- echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
- LT_STATIC_EXEC=""
+ echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
+ LT_STATIC_EXEC=""
else
LT_STATIC_EXEC="-all-static"
fi
@@ -892,11 +1032,11 @@ fi
## ----------------------------------------------------------------------
## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines
-## that might need to be set for largefile support to behave
+## that might need to be set for largefile support to behave
## correctly. This macro is defined in acsite.m4 and overrides
## the version provided by Autoconf (as of v2.65). The custom
-## macro additionally adds the appropriate defines to AM_CPPFLAGS
-## so that later configure checks have them visible.
+## macro additionally adds the appropriate defines to AM_CPPFLAGS
+## so that later configure checks have them visible.
## Check for _FILE_OFFSET_BITS
_AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64],
@@ -919,10 +1059,10 @@ case "$host_cpu-$host_vendor-$host_os" in
*linux*)
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
- ## defined correctly in <stdio.h>.
+ ## defined correctly in <stdio.h>.
##
## This flag was removed from h5cc as of 2009-10-17 when it was found
- ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
+ ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen
## is used only by H5_debug_mask which is used only when debugging in
## H5_init_library (all in H5.c). When the flag was removed this was
@@ -945,7 +1085,7 @@ case "$host_cpu-$host_vendor-$host_os" in
;;
esac
-## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
+## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
## for configure checks.
## Note: Both will be restored by the end of configure.
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
@@ -1034,17 +1174,16 @@ AC_CACHE_SAVE
## Check if the dev_t type is a scalar type (must come after the check for
## sys/types.h)
AC_MSG_CHECKING([if dev_t is scalar])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
- ],
- [dev_t d1, d2; if(d1==d2) return 0;],
- AC_DEFINE([DEV_T_IS_SCALAR], [1],
- [Define if `dev_t' is a scalar])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
-)
+ ]],
+ [[dev_t d1, d2; if(d1==d2) return 0;]])],
+ [AC_DEFINE([DEV_T_IS_SCALAR], [1],
+ [Define if dev_t is a scalar])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
## ----------------------------------------------------------------------
## Fake --with-xxx option to allow us to create a help message for the
@@ -1063,18 +1202,24 @@ AC_ARG_WITH([fnord],
])
## ----------------------------------------------------------------------
-## Is the dmalloc present? It has a header file `dmalloc.h' and a library
-## `-ldmalloc' and their locations might be specified with the `--with-dmalloc'
-## command-line switch. The value is an include path and/or a library path.
-## If the library path is specified then it must be preceded by a comma.
+## Is dmalloc (debug malloc library) requested? It has a header file
+## `dmalloc.h' and a library `-ldmalloc' and their locations might be
+## specified with the `--with-dmalloc' command-line switch. The value
+## is an include path and/or a library path. If the library path is
+## specified then it must be preceded by a comma.
##
+AC_SUBST([HAVE_DMALLOC])
+
+## Default is not present
+HAVE_DMALLOC=no
+
AC_ARG_WITH([dmalloc],
[AS_HELP_STRING([--with-dmalloc=DIR],
[Use dmalloc memory debugging aid [default=no]])],,
[withval=no])
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_DMALLOC="yes"
AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC])
if test "x$HAVE_DMALLOC" = "xyes"; then
@@ -1084,7 +1229,7 @@ case $withval in
AC_MSG_ERROR([couldn't find dmalloc library])
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_DMALLOC="no"
AC_MSG_CHECKING([for dmalloc library])
AC_MSG_RESULT([suppressed])
@@ -1144,8 +1289,8 @@ AC_ARG_WITH([zlib],
filter [default=yes]])],,
[withval=yes])
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_ZLIB="yes"
AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB])
if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
@@ -1159,7 +1304,7 @@ case $withval in
AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_ZLIB="no"
AC_MSG_CHECKING([for zlib])
AC_MSG_RESULT([suppressed])
@@ -1221,7 +1366,7 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2"
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -1238,8 +1383,8 @@ AC_ARG_WITH([szlib],
filter [default=no]])],,
[withval=no])
-case $withval in
- yes)
+case "X-$withval" in
+ X-yes)
HAVE_SZLIB="yes"
AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB])
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
@@ -1249,7 +1394,7 @@ case $withval in
AC_MSG_ERROR([couldn't find szlib library])
fi
;;
- no)
+ X-|X-no|X-none)
HAVE_SZLIB="no"
AC_MSG_CHECKING([for szlib])
AC_MSG_RESULT([suppressed])
@@ -1268,29 +1413,33 @@ case $withval in
fi
;;
esac
-
+
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
-
+
if test -n "$szlib_inc"; then
CPPFLAGS="$CPPFLAGS -I$szlib_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc"
fi
-
- AC_CHECK_HEADERS([szlib.h],
- [HAVE_SZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
+
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
-
- if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+
+ if test "x$HAVE_SZLIB" = "xyes"; then
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ if test -n "$HAVE_SZLIB"; then
+ AC_CHECK_HEADERS([szlib.h],
+ [HAVE_SZLIB_H="yes"],
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
+ else
+ AC_MSG_RESULT([Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled.])
+ fi
fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
@@ -1304,53 +1453,53 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_MSG_CHECKING([for szlib encoder])
## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## Also add LL_PATH substitution to Makefiles so they can use the
## path as well, for testing examples.
if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
else
- export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$szlib_lib"
fi
AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH"
AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
- [AC_TRY_RUN([
- #include <szlib.h>
-
- int main(void)
- {
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([
+ #include "szlib.h"
+ ],[[
/* SZ_encoder_enabled returns 1 if encoder is present */
- if(SZ_encoder_enabled() == 1)
- exit(0);
- else
- exit(1);
- }
- ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)])
-
- AC_DEFINE([HAVE_FILTER_SZIP], [1],
+ if(SZ_encoder_enabled() == 1)
+ exit(0);
+ else
+ exit(1);
+ ]])]
+ , [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]
+ )
+
+ AC_DEFINE([HAVE_FILTER_SZIP], [1],
[Define if support for szip filter is enabled])
USE_FILTER_SZIP="yes"
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
AC_MSG_RESULT([yes])
- fi
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
AC_MSG_RESULT([no])
- fi
-
+ fi
+
## Add "szip" to external filter list
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
- fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
fi
fi
@@ -1363,6 +1512,11 @@ AC_CACHE_SAVE
## Enable thread-safe version of library. It requires Pthreads support
## on POSIX systems.
##
+AC_SUBST([THREADSAFE])
+
+## Default is no thread-safety
+THREADSAFE=no
+
AC_MSG_CHECKING([for thread safe support])
AC_ARG_ENABLE([threadsafe],
[AS_HELP_STRING([--enable-threadsafe],
@@ -1390,7 +1544,7 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
fi
fi
-## --enable-threadsafe is also incompatible with --enable-fortran, unless
+## --enable-threadsafe is also incompatible with --enable-fortran unless
## --enable-unsupported has been specified on the configure line.
if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then
@@ -1403,7 +1557,7 @@ case "X-$THREADSAFE" in
AC_MSG_RESULT([no])
;;
X-yes)
- THREADSAFE=yes
+ THREADSAFE=yes
AC_MSG_RESULT([yes])
;;
*)
@@ -1416,7 +1570,7 @@ if test "X$THREADSAFE" = "Xyes"; then
AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support])
## ----------------------------------------------------------------------
- ## Is the pthreads library present? It has a header file `pthread.h' and
+ ## Is the Pthreads library present? It has a header file `pthread.h' and
## a library `-lpthread' and their locations might be specified with the
## `--with-pthread' command-line switch. The value is an include path
## and/or a library path. If the library path is specified then it must
@@ -1496,11 +1650,12 @@ AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monoton
## First check if `struct tm' has a `tm_gmtoff' member.
AC_MSG_CHECKING([for tm_gmtoff in struct tm])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/time.h>
- #include <time.h>], [struct tm tm; tm.tm_gmtoff=0;],
+ #include <time.h>
+]], [[struct tm tm; tm.tm_gmtoff=0;]])],
[AC_DEFINE([HAVE_TM_GMTOFF], [1],
- [Define if `tm_gmtoff' is a member of `struct tm'])
+ [Define if tm_gmtoff is a member of struct tm])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -1512,11 +1667,11 @@ case "`uname`" in
AC_MSG_RESULT([disabled in CYGWIN])
;;
*)
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/time.h>
- #include <time.h>], [timezone=0;],
+ #include <time.h>]], [[timezone=0;]])],
[AC_DEFINE([HAVE_TIMEZONE], [1],
- [Define if `timezone' is a global variable])
+ [Define if timezone is a global variable])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
;;
@@ -1524,13 +1679,13 @@ esac
## ----------------------------------------------------------------------
-## Does the struct stat have the st_blocks field? This field is not Posix.
+## Does the struct stat have the st_blocks field? This field is not POSIX.
##
AC_MSG_CHECKING([for st_blocks in struct stat])
-AC_TRY_COMPILE([
- #include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/stat.h>]],[[struct stat sb; sb.st_blocks=0;]])],
[AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1],
- [Define if `struct stat' has the `st_blocks' field])
+ [Define if struct stat has the st_blocks field])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -1548,28 +1703,32 @@ esac
AC_CHECK_FUNCS([_scrsize ioctl])
AC_MSG_CHECKING([for struct videoconfig])
-AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[struct videoconfig w; w.numtextcols=0;]])],
[AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1],
- [Define if `struct videoconfig' is defined])
+ [Define if struct videoconfig is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for struct text_info])
-AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct text_info w; w.screenwidth=0;]])],
[AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1],
- [Define if `struct text_info' is defined])
+ [Define if struct text_info is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for TIOCGWINSZ])
-AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGWINSZ;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/ioctl.h>
+]],[[int w=TIOCGWINSZ;]])],
[AC_DEFINE([HAVE_TIOCGWINSZ], [1],
[Define if the ioctl TIOGWINSZ is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for TIOCGETD])
-AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGETD;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/ioctl.h>
+]],[[int w=TIOCGETD;]])],
[AC_DEFINE([HAVE_TIOCGETD], [1],
[Define if the ioctl TIOCGETD is defined])
AC_MSG_RESULT([yes])],
@@ -1617,26 +1776,26 @@ AC_COMPILE_IFELSE(
)
AC_MSG_CHECKING([for __attribute__ extension])
-AC_TRY_COMPILE(,[int __attribute__((unused)) x],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])],
[AC_DEFINE([HAVE_ATTRIBUTE], [1],
[Define if the __attribute__(()) extension is present])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for __func__ extension])
-AC_TRY_COMPILE(,[ const char *fname = __func__; ],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ const char *fname = __func__; ]])],
[AC_DEFINE([HAVE_C99_FUNC], [1],
[Define if the compiler understands the __func__ keyword])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for __FUNCTION__ extension])
-AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],,[[ const char *fname = __FUNCTION__; ]])],
[AC_DEFINE([HAVE_FUNCTION], [1],
[Define if the compiler understands the __FUNCTION__ keyword])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for C99 designated initialization support])
-AC_TRY_COMPILE(,[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
typedef struct {
int x;
union {
@@ -1644,7 +1803,7 @@ AC_TRY_COMPILE(,[
double d;
} u;
} di_struct_t;
- di_struct_t x = {0, { .d = 0.0}}; ],
+ di_struct_t x = {0, { .d = 0.0}}; ]])],
[AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1],
[Define if the compiler understands C99 designated initialization of structs and unions])
AC_MSG_RESULT([yes])],
@@ -1659,23 +1818,22 @@ AC_MSG_CHECKING([how to print long long])
AC_CACHE_VAL([hdf5_cv_printf_ll], [
for hdf5_cv_printf_ll in l ll L q unknown; do
- AC_TRY_RUN([
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- int main(void)
- {
- char *s = malloc(128);
- long long x = (long long)1048576 * (long long)1048576;
- sprintf(s,"%${hdf5_cv_printf_ll}d",x);
- exit(strcmp(s,"1099511627776"));
- }
- ], [break],,[continue])
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ ],[[
+ char *s = malloc(128);
+ long long x = (long long)1048576 * (long long)1048576;
+ sprintf(s,"%${hdf5_cv_printf_ll}d",x);
+ exit(strcmp(s,"1099511627776"));
+ ]])]
+ , [break],,[continue])
done])
AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
-AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
+AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
[Width for printf() for type `long long' or `__int64', use `ll'])
## ----------------------------------------------------------------------
@@ -1710,6 +1868,210 @@ else
fi
## ----------------------------------------------------------------------
+## Check if the compiler should include symbols
+##
+AC_MSG_CHECKING([enable debugging symbols])
+AC_ARG_ENABLE([symbols],
+ [AS_HELP_STRING([--enable-symbols=(yes|no|<custom>)],
+ [Add debug symbols to the library (e.g.: build with -g).
+ This is independent of the build mode and optimization
+ level. The custom string allows special settings like
+ -ggdb, etc. to be used.
+ [default=yes if debug build, otherwise no]
+ ])],
+ [SYMBOLS=$enableval])
+
+## Set default
+if test "X-$SYMBOLS" = X- ; then
+ if test "X-$CONFIG_MODE" = "X-development" ; then
+ SYMBOLS=yes
+ else
+ SYMBOLS=no
+ fi
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([SYMBOLS])
+
+case "X-$SYMBOLS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS_FCFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS"
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS"
+ SYMBOLS="custom ($SYMBOLS)"
+ AC_MSG_RESULT([$SYMBOLS])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if developer warnings should be turned on
+## These are warnings that provide suggestions like gcc's -Wsuggest-attribute.
+## They do not indicate code problems.
+##
+## Note that developers don't need to build with these regularly. They
+## are just handy to check once in a while (before releases, etc.).
+##
+AC_MSG_CHECKING([enable developer warnings])
+AC_ARG_ENABLE([developer-warnings],
+ [AS_HELP_STRING([--enable-developer-warnings],
+ [Determines whether developer warnings will be
+ emitted. These are usually performance suggestions
+ (e.g. -Wsuggest-attribute) and do not flag poor code
+ quality.
+ [default=no]
+ ])],
+ [DEV_WARNINGS=$enableval])
+
+## Set default
+if test "X-$DEV_WARNINGS" = X- ; then
+ DEV_WARNINGS=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([DEV_WARNINGS])
+
+case "X-$DEV_WARNINGS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $DEVELOPER_WARNING_CFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_DEVELOPER_WARNING_CFLAGS"
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $DEV_WARNINGS])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use profiling flags/settings
+##
+AC_MSG_CHECKING([profiling])
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling=(yes|no|<custom>)],
+ [Enable profiling flags (e.g.: -pg).
+ This can be set independently from the build mode.
+ The custom setting can be used to pass alternative
+ profiling flags (e.g.: -P for using Prof with gcc).
+ [default=no]
+ ])],
+ [PROFILING=$enableval])
+
+## Default is no profiling
+if test "X-$PROFILING" = X- ; then
+ PROFILING=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([PROFILING])
+
+case "X-$PROFILING" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $PROFILING"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILING"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILING"
+ PROFILING="custom ($PROFILING)"
+ AC_MSG_RESULT([$PROFILING])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use a particular optimization setting
+##
+AC_MSG_CHECKING([optimization level])
+AC_ARG_ENABLE([optimization],
+ [AS_HELP_STRING([--enable-optimization=(high|debug|none|<custom>)],
+ [Enable optimization flags/settings (e.g.: -O3).
+ This can be set independently from the build mode.
+ Optimizations for a given compiler can be specified
+ at several levels: High, with aggressive optimizations
+ turned on; debug, with optimizations that are
+ unlikely to interfere with debugging or profiling;
+ and none, with no optimizations at all.
+ See the compiler-specific config/*-flags file for more
+ details.
+ Alternatively, optimization options can
+ be specified directly by specifying them as a
+ string value. These custom optimzation flags will
+ completely replace all other optimization flags.
+ [default depends on build mode: debug=debug,
+ production=high, clean=none]
+ ])],
+ [OPTIMIZATION=$enableval])
+
+## Set the default optimization level. This depends on the compiler mode.
+if test "X-$OPTIMIZATION" = X- ; then
+ case "X-$CONFIG_MODE" in
+ X-debug)
+ OPTIMIZATION=debug
+ ;;
+ X-production)
+ OPTIMIZATION=high
+ ;;
+ X-clean)
+ OPTIMIZATION=none
+ ;;
+ esac
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([OPTIMIZATION])
+
+case "X-$OPTIMIZATION" in
+ X-high)
+ H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS"
+ AC_MSG_RESULT([high])
+ ;;
+ X-debug)
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS"
+ AC_MSG_RESULT([debug])
+ ;;
+ X-none)
+ H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS"
+ AC_MSG_RESULT([none])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION"
+ H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION"
+ H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION"
+ OPTIMIZATION="custom ($OPTIMIZATION)"
+ AC_MSG_RESULT([$OPTIMIZATION])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
## Turn on debugging by setting compiler flags
## This must come after the enable-production since it depends on production.
##
@@ -1906,31 +2268,41 @@ esac
## more scrupulous with it's memory operations. Enabling this also
## disables the library's free space manager code.
##
-AC_SUBST([USINGMEMCHECKER])
AC_MSG_CHECKING([whether a memory checking tool will be used])
AC_ARG_ENABLE([using-memchecker],
[AS_HELP_STRING([--enable-using-memchecker],
[Enable this option if a memory allocation and/or
bounds checking tool will be used on the HDF5
library. Enabling this causes the library to be
- more picky about it's memory operations and also
+ more picky about its memory operations and also
disables the library's free space manager code.
- Default=no.])],
+ [default=no]
+ ])],
[USINGMEMCHECKER=$enableval])
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([USINGMEMCHECKER])
+
+## Set the default level.
+if test "X-$USINGMEMCHECKER" = X- ; then
+ USINGMEMCHECKER=no
+fi
+
case "X-$USINGMEMCHECKER" in
X-yes)
- USINGMEMCHECKER=yes
- AC_MSG_RESULT([yes])
AC_DEFINE([USING_MEMCHECKER], [1],
[Define if a memory checking tool will be used on the library,
to cause library to be very picky about memory operations and
also disable the internal free list manager code.])
+ AC_MSG_RESULT([yes])
;;
- *)
- USINGMEMCHECKER=no
+ X-no)
AC_MSG_RESULT([no])
;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $USINGMEMCHECKER])
+ ;;
esac
## Checkpoint the cache
@@ -1977,11 +2349,11 @@ case "X-$enable_parallel" in
## Try link a simple MPI program.
AC_MSG_CHECKING([whether a simple MPI-IO C program can be linked])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]],
- [[ MPI_Init(0, (void *)0);
- MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([unable to link a simple MPI-IO C program])])
+ [[ MPI_Init(0, (void *)0);
+ MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([unable to link a simple MPI-IO C program])])
if test "X$HDF_FORTRAN" = "Xyes"; then
PAC_PROG_FC_MPI_CHECK
@@ -2001,12 +2373,16 @@ esac
## ----------------------------------------------------------------------
## Print some other parallel information and do some sanity checks.
+## Needs to be done outside of the PARALLEL block since the serial
+## build also needs to have values defined.
##
AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no"
if test -n "$PARALLEL"; then
- ## The 'testpar' directory should participate in the build
- TESTPARALLEL=testpar
+ if test "X$HDF5_TESTS" = "Xyes"; then
+ ## The 'testpar' directory should participate in the build
+ TESTPARALLEL=testpar
+ fi
## We are building a parallel library
AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support])
@@ -2024,7 +2400,7 @@ if test -n "$PARALLEL"; then
fi
## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with
- ## the empty string. This means that no launch commands were requested,
+ ## the empty string. This means that no launch commands were requested,
## so we will not use any launch commands.
if test "X$RUNSERIAL" = "Xnone"; then
RUNSERIAL=""
@@ -2037,21 +2413,23 @@ if test -n "$PARALLEL"; then
ADD_PARALLEL_FILES="yes"
AC_MSG_CHECKING([for MPI_Comm_c2f and MPI_Comm_f2c functions])
- AC_TRY_LINK([#include <mpi.h>],
- [MPI_Comm c_comm; MPI_Comm_c2f(c_comm)],
- AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1],
- [Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <mpi.h>
+ ]],
+ [[MPI_Comm c_comm; MPI_Comm_c2f(c_comm)]])],
+ [AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1],
+ [Define if MPI_Comm_c2f and MPI_Comm_f2c exist])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
)
AC_MSG_CHECKING([for MPI_Info_c2f and MPI_Info_f2c functions])
- AC_TRY_LINK([#include <mpi.h>],
- [MPI_Info c_info; MPI_Info_c2f(c_info)],
- AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1],
- [Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]],
+ [[MPI_Info c_info; MPI_Info_c2f(c_info)]])],
+ [AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1],
+ [Define if MPI_Info_c2f and MPI_Info_f2c exist])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
)
fi
@@ -2090,7 +2468,7 @@ if test -n "$PARALLEL"; then
fi
;;
esac
-
+
if test -n "$mpe_inc"; then
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
@@ -2100,7 +2478,7 @@ if test -n "$PARALLEL"; then
else
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
fi
-
+
if test -n "$mpe_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
@@ -2122,9 +2500,10 @@ fi
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
+AC_SUBST([DIRECT_VFD])
-## Check these regardless. If the checks are moved inside the main
-## direct VFD block, the output is nested.
+## Default is no direct VFD
+DIRECT_VFD=no
AC_CACHE_VAL([hdf5_cv_direct_io],
AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include <fcntl.h>]]))
@@ -2158,9 +2537,161 @@ else
AC_MSG_RESULT([no])
fi
+## Direct VFD files are not built if not required.
AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"])
## ----------------------------------------------------------------------
+## Check if Read-Only S3 virtual file driver is enabled by --enable-ros3-vfd
+##
+AC_SUBST([ROS3_VFD])
+
+## Default is no Read-Only S3 VFD
+ROS3_VFD=no
+
+AC_ARG_ENABLE([ros3-vfd],
+ [AS_HELP_STRING([--enable-ros3-vfd],
+ [Build the Read-Only S3 virtual file driver (VFD).
+ [default=no]])],
+ [ROS3_VFD=$enableval], [ROS3_VFD=no])
+
+if test "X$ROS3_VFD" = "Xyes"; then
+ AC_CHECK_HEADERS([curl/curl.h],, [unset ROS3_VFD])
+ AC_CHECK_HEADERS([openssl/evp.h],, [unset ROS3_VFD])
+ AC_CHECK_HEADERS([openssl/hmac.h],, [unset ROS3_VFD])
+ AC_CHECK_HEADERS([openssl/sha.h],, [unset ROS3_VFD])
+ if test "X$ROS3_VFD" = "Xyes"; then
+ AC_CHECK_LIB([curl], [curl_global_init],, [unset ROS3_VFD])
+ AC_CHECK_LIB([crypto], [EVP_sha256],, [unset ROS3_VFD])
+ fi
+
+ AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled])
+ if test "X$ROS3_VFD" = "Xyes"; then
+ AC_DEFINE([HAVE_ROS3_VFD], [1],
+ [Define whether the Read-Only S3 virtual file driver (VFD) should be compiled])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ ROS3_VFD=no
+ AC_MSG_ERROR([The Read-Only S3 VFD was requested but cannot be built.
+ Please check that openssl and cURL are available on your
+ system, and/or re-configure without option
+ --enable-ros3-vfd.])
+ fi
+else
+ AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled])
+ AC_MSG_RESULT([no])
+ ROS3_VFD=no
+
+fi
+
+## Read-only S3 files are not built if not required.
+AM_CONDITIONAL([ROS3_VFD_CONDITIONAL], [test "X$ROS3_VFD" = "Xyes"])
+
+
+## ----------------------------------------------------------------------
+## Is libhdfs (Hadoop Distributed File System) present?
+## It might be specified with the `--with-libhdfs' command-line switch.
+## If found, enables the HDFS VFD.
+##
+AC_SUBST([HAVE_LIBHDFS])
+AC_ARG_WITH([libhdfs],
+ [AS_HELP_STRING([--with-libhdfs=DIR],
+ [Provide libhdfs library to enable HDFS virtual file driver (VFD) [default=no]])],,
+ [withval=no])
+
+case $withval in
+ no)
+ HAVE_LIBHDFS="no"
+ AC_MSG_CHECKING([for libhdfs])
+ AC_MSG_RESULT([suppressed])
+ ;;
+ *)
+ HAVE_LIBHDFS="yes"
+ case "$withval" in
+ *,*)
+ libhdfs_inc="`echo $withval |cut -f1 -d,`"
+ libhdfs_lib="`echo $withval |cut -f2 -d, -s`"
+ ;;
+ yes)
+ libhdfs_inc="$HADOOP_HOME/include"
+ libhdfs_lib="$HADOOP_HOME/lib"
+ ;;
+ *)
+ if test -n "$withval"; then
+ libhdfs_inc="$withval/include"
+ libhdfs_lib="$withval/lib"
+ fi
+ ;;
+ esac
+
+ if test -n "$libhdfs_inc"; then
+ CPPFLAGS="$CPPFLAGS -I$libhdfs_inc"
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$libhdfs_inc"
+ fi
+ AC_CHECK_HEADERS([hdfs.h],,
+ [unset HAVE_LIBHDFS])
+
+ if test "x$HAVE_LIBHDFS" = "xyes"; then
+ dnl Check for '-ljvm' needed by libhdfs
+ JNI_LDFLAGS=""
+ if test $JAVA_HOME != ""
+ then
+ JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH -L$JAVA_HOME/jre/lib/$OS_ARCH/server"
+ fi
+ ldflags_bak=$LDFLAGS
+ LDFLAGS="$LDFLAGS $JNI_LDFLAGS"
+ AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs])
+ LDFLAGS=$ldflags_bak
+ AC_SUBST([JNI_LDFLAGS])
+ if test -n "$libhdfs_lib"; then
+ ## Hadoop distribution hides libraries down one level in 'lib/native'
+ libhdfs_lib="$libhdfs_lib/native"
+ LDFLAGS="$LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS"
+ AM_LDFLAGS="$AM_LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS"
+ fi
+ AC_CHECK_LIB([hdfs], [hdfsConnect],,
+ [unset HAVE_LIBHDFS])
+ fi
+
+ if test -z "$HAVE_LIBHDFS"; then
+ AC_MSG_ERROR([Set to use libhdfs library, but could not find or use
+ libhdfs. Please verify that the path to HADOOP_HOME is
+ valid, and/or reconfigure without --with-libhdfs.])
+ fi
+ ;;
+esac
+
+if test "x$HAVE_LIBHDFS" = "xyes"; then
+ AC_DEFINE([HAVE_LIBHDFS], [1],
+ [Proceed to build with libhdfs])
+fi
+
+## Checkpoint the cache
+AC_CACHE_SAVE
+
+## ----------------------------------------------------------------------
+## Use custom examples path.
+##
+AC_MSG_CHECKING([for custom examples path definition])
+AC_ARG_WITH([examplesdir],
+ [AS_HELP_STRING([--with-examplesdir=location],
+ [Specify path for examples
+ [default="DATAROOTDIR/hdf5_examples"]])],,
+ withval="${datarootdir}/hdf5_examples")
+
+if test "X$withval" = "X"; then
+ AC_MSG_RESULT([default])
+ examplesdir="${datarootdir}/hdf5_examples"
+else
+ AC_MSG_RESULT([$withval])
+ examplesdir=$withval
+fi
+
+AC_SUBST([examplesdir])
+AC_DEFINE_UNQUOTED([EXAMPLESDIR], ["$examplesdir"],
+ [Define the examples directory])
+
+## ----------------------------------------------------------------------
## Enable custom plugin default path for library. It requires SHARED support.
##
AC_MSG_CHECKING([for custom plugin default path definition])
@@ -2185,12 +2716,12 @@ AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"],
## Decide whether the presence of user's exception handling functions is
## checked and data conversion exceptions are returned. This is mainly
## for the speed optimization of hard conversions. Soft conversions can
-## actually benefit little.
+## actually benefit little.
##
AC_MSG_CHECKING([whether exception handling functions is checked during data conversions])
AC_ARG_ENABLE([dconv-exception],
[AS_HELP_STRING([--enable-dconv-exception],
- [if exception handling functions is checked during
+ [if exception handling functions is checked during
data conversions [default=yes]])],
[DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes])
@@ -2205,13 +2736,13 @@ fi
## ----------------------------------------------------------------------
## Decide whether the data accuracy has higher priority during data
## conversions. If not, some hard conversions will still be prefered even
-## though the data may be wrong (for example, some compilers don't
+## though the data may be wrong (for example, some compilers don't
## support denormalized floating values) to maximize speed.
-##
+##
AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions])
AC_ARG_ENABLE([dconv-accuracy],
[AS_HELP_STRING([--enable-dconv-accuracy],
- [if data accuracy is guaranteed during
+ [if data accuracy is guaranteed during
data conversions [default=yes]])],
[DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes])
@@ -2244,9 +2775,9 @@ esac
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm to convert
-## 'long double' to '(unsigned) long' values. (This flag should only be set for
-## the IBM Power6 Linux. When the bit sequence of long double is
-## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
+## 'long double' to '(unsigned) long' values. (This flag should only be set for
+## the IBM Power6 Linux. When the bit sequence of long double is
+## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
## The machine's conversion gets the correct value. We define the macro and disable
## this kind of test until we figure out what algorithm they use.
@@ -2323,10 +2854,10 @@ fi
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm
-## to convert some values of '(unsigned) long' to 'long double' values.
-## (This flag should be off for all machines, except for IBM Power6 Linux,
-## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
-## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
+## to convert some values of '(unsigned) long' to 'long double' values.
+## (This flag should be off for all machines, except for IBM Power6 Linux,
+## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
+## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
## macro and skip the test for now until we know about the algorithm.
##
AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values])
@@ -2767,9 +3298,9 @@ esac
AC_MSG_CHECKING([whether to have library information embedded in the executables])
AC_ARG_ENABLE([embedded-libinfo],
[AS_HELP_STRING([--enable-embedded-libinfo],
- [Enable embedded library information [default=yes]])],
- [enable_embedded_libinfo=$enableval],
- [enable_embedded_libinfo=yes])
+ [Enable embedded library information [default=yes]])],
+ [enable_embedded_libinfo=$enableval],
+ [enable_embedded_libinfo=yes])
if test "${enable_embedded_libinfo}" = "yes"; then
AC_MSG_RESULT([yes])
@@ -2842,10 +3373,12 @@ LDFLAGS="$saved_user_LDFLAGS"
## need to be compiled
AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"])
-AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
+AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test "X$PARALLEL" = "Xyes"])
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
-
+AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"])
+AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
+AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"])
## ----------------------------------------------------------------------
## Build the Makefiles.
@@ -2920,7 +3453,7 @@ fi
if test "X$HDF_FORTRAN" = "Xyes"; then
- ### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler
+ ### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler
### on Linux (other OSs have not been tested).
### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
### wl="-Wl,-Wl,," in the libtool file. (HDFFV-10037)
@@ -2955,6 +3488,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
test/testlinks_env.sh
test/test_plugin.sh
testpar/Makefile
+ testpar/testpflush.sh
tools/Makefile
tools/h5dump/Makefile
tools/h5dump/h5dump_plugin.sh
@@ -2978,8 +3512,8 @@ AC_CONFIG_FILES([src/libhdf5.settings
tools/h5copy/Makefile
tools/h5copy/testh5copy.sh
tools/lib/Makefile
+ tools/libtest/Makefile
tools/misc/Makefile
- tools/misc/h5cc
tools/misc/testh5mkgrp.sh
tools/misc/testh5repart.sh
tools/h5stat/testh5stat.sh
@@ -2988,6 +3522,8 @@ AC_CONFIG_FILES([src/libhdf5.settings
examples/Makefile
examples/run-c-ex.sh
examples/testh5cc.sh
+ bin/h5cc
+ bin/Makefile
c++/Makefile
c++/src/Makefile
c++/src/h5c++
@@ -3026,7 +3562,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
AC_OUTPUT
-chmod 755 tools/misc/h5cc
+chmod 755 bin/h5cc
if test "X$HDF_CXX" = "Xyes"; then
chmod 755 c++/src/h5c++
fi
@@ -3034,8 +3570,8 @@ fi
if test "X$HDF_FORTRAN" = "Xyes"; then
chmod 755 fortran/src/h5fc
- ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler
- ## on OS X, which is needed when building shared libraries on OS X. This script
+ ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler
+ ## on OS X, which is needed when building shared libraries on OS X. This script
## replaces the 3rd occurrence, which is for Fortran, of wl="" with wl="-Wl," (HDFFV-2772)
case "`uname`" in
Darwin*)
@@ -3043,14 +3579,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
;;
esac
- ### libtool does not pass the correct argument linking (-WL,-Wl,,) for the NAG Fortran compiler
+ ### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler
### on Linux (other OSs have not been tested).
### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
### wl="-Wl,-Wl,," in the libtool file. (HDFFV-10037)
case "`uname`" in
Linux*)
if test "X$FC_BASENAME" = "Xnagfor"; then
- cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
+ cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
fi
;;
esac
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d643f35..467dfa4 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,10 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_EXAMPLES)
-
-#-----------------------------------------------------------------------------
-# Apply Definitions to compiler in this directory and below
-#-----------------------------------------------------------------------------
-add_definitions (${HDF_EXTRA_C_FLAGS})
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_EXAMPLES C)
#-----------------------------------------------------------------------------
# Define Sources
@@ -38,30 +33,44 @@ set (examples
foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_C_PROPERTIES (${example} STATIC " " " ")
- target_link_libraries (${example} ${HDF5_LIB_TARGET})
+ target_include_directories (${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${example} STATIC)
+ target_link_libraries (${example} PRIVATE ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (${example} SHARED)
+ target_link_libraries (${example} PRIVATE ${HDF5_LIBSH_TARGET})
+ endif ()
set_target_properties (${example} PROPERTIES FOLDER examples)
- if (BUILD_SHARED_LIBS)
- add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_C_PROPERTIES (${example}-shared SHARED " " " ")
- target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET})
- set_target_properties (${example}-shared PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_${example}_FORMAT ${example})
endif ()
endforeach ()
if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
- TARGET_C_PROPERTIES (ph5example STATIC " " " ")
- target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
+ target_include_directories (ph5example PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (ph5example STATIC)
+ target_link_libraries (ph5example PRIVATE ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
+ else ()
+ TARGET_C_PROPERTIES (ph5example SHARED)
+ target_link_libraries (ph5example PRIVATE ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
+ endif ()
set_target_properties (ph5example PROPERTIES FOLDER examples)
- if (BUILD_SHARED_LIBS)
- add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
- TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
- target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
- set_target_properties (ph5example-shared PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_ph5example_FORMAT ph5example)
endif ()
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index 592f762..d2b7e56 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -15,59 +15,56 @@
### T E S T I N G ###
##############################################################################
##############################################################################
- file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
- if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5EX-shared")
- file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared/red ${PROJECT_BINARY_DIR}/H5EX-shared/blue ${PROJECT_BINARY_DIR}/H5EX-shared/u2w)
- endif ()
+file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
+
+set (test_ex_CLEANFILES
+ Attributes.h5
+ btrees_file.h5
+ cmprss.h5
+ default_file.h5
+ dset.h5
+ extend.h5
+ extlink_prefix_source.h5
+ extlink_source.h5
+ extlink_target.h5
+ group.h5
+ groups.h5
+ hard_link.h5
+ mount1.h5
+ mount2.h5
+ one_index_file.h5
+ only_dspaces_and_attrs_file.h5
+ only_huge_mesgs_file.h5
+ REF_REG.h5
+ refere.h5
+ SDS.h5
+ SDScompound.h5
+ SDSextendible.h5
+ Select.h5
+ separate_indexes_file.h5
+ small_lists_file.h5
+ soft_link.h5
+ subset.h5
+ unix2win.h5
+ blue/prefix_target.h5
+ red/prefix_target.h5
+ u2w/u2w_target.h5
+)
+if (HDF5_TEST_SERIAL)
# Remove any output file left over from previous test run
add_test (
NAME EXAMPLES-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- Attributes.h5
- btrees_file.h5
- cmprss.h5
- default_file.h5
- dset.h5
- extend.h5
- extlink_prefix_source.h5
- extlink_source.h5
- extlink_target.h5
- group.h5
- groups.h5
- hard_link.h5
- mount1.h5
- mount2.h5
- one_index_file.h5
- only_dspaces_and_attrs_file.h5
- only_huge_mesgs_file.h5
- REF_REG.h5
- refere.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
- separate_indexes_file.h5
- small_lists_file.h5
- soft_link.h5
- subset.h5
- unix2win.h5
- blue/prefix_target.h5
- red/prefix_target.h5
- u2w/u2w_target.h5
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-clear-objects")
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ add_test (NAME EXAMPLES-${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${example}>)
else ()
add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -78,119 +75,32 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-${example} PROPERTIES FIXTURES_REQUIRED clear_EXAMPLES)
+ if (last_test)
set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "EXAMPLES-${example}")
endforeach ()
+endif ()
- if (BUILD_SHARED_LIBS)
- # Remove any output file left over from previous test run
- add_test (
- NAME EXAMPLES-shared-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- Attributes.h5
- btrees_file.h5
- cmprss.h5
- default_file.h5
- dset.h5
- extend.h5
- extlink_prefix_source.h5
- extlink_source.h5
- extlink_target.h5
- group.h5
- groups.h5
- hard_link.h5
- mount1.h5
- mount2.h5
- one_index_file.h5
- only_dspaces_and_attrs_file.h5
- only_huge_mesgs_file.h5
- REF_REG.h5
- refere.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
- separate_indexes_file.h5
- small_lists_file.h5
- soft_link.h5
- subset.h5
- unix2win.h5
- blue/prefix_target.h5
- red/prefix_target.h5
- u2w/u2w_target.h5
- WORKING_DIRECTORY
- ${PROJECT_BINARY_DIR}/H5EX-shared
+### Windows pops up a modal permission dialog on this test
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5example> ${MPIEXEC_POSTFLAGS})
+ else ()
+ add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5example>;${MPIEXEC_POSTFLAGS}"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=ph5example.out"
+ -D "TEST_REFERENCE:STRING=PHDF5 tests finished with no errors"
+ -D "TEST_FILTER:STRING=PHDF5 tests finished with no errors"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-shared-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-shared-clear-objects")
-
- foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-shared-${example} COMMAND $<TARGET_FILE:${example}-shared>)
- else ()
- add_test (NAME EXAMPLES-shared-${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${example}.txt"
- #-D "TEST_REFERENCE=${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5EX-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (EXAMPLES-shared-${example} PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-shared-${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-shared-${example}")
- endforeach ()
endif ()
-
-### Windows pops up a modal permission dialog on this test
- if (H5_HAVE_PARALLEL AND NOT WIN32)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
- else ()
- add_test (NAME EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:ph5example>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=ph5example.txt"
- #-D "TEST_REFERENCE=ph5example.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-ph5example")
- if (BUILD_SHARED_LIBS)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-shared-ph5example COMMAND $<TARGET_FILE:ph5example-shared>)
- else ()
- add_test (NAME EXAMPLES-shared-ph5example COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:ph5example-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=ph5example-shared.txt"
- #-D "TEST_REFERENCE=ph5example-shared.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5EX-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-shared-ph5example")
- endif ()
+ if (last_test)
+ set_tests_properties (MPI_TEST_EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
endif ()
+ set (last_test "MPI_TEST_EXAMPLES-ph5example")
+endif ()
diff --git a/examples/Makefile.am b/examples/Makefile.am
index f737814..4f004bf 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -80,8 +80,8 @@ CHECK_CLEANFILES+=$(EXTLINK_DIRS)
# Example directory
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR=$(examplesdir)/c
+EXAMPLETOPDIR=$(examplesdir)
# List dependencies for each program. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 76cf389..dfe4e14 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -353,9 +353,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -370,6 +370,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -388,6 +389,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -415,6 +417,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -422,9 +426,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -440,6 +447,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,6 +469,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -473,8 +482,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -488,6 +499,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -529,6 +541,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -647,8 +660,8 @@ EXTLINK_DIRS = red blue u2w
# Example directory
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR = $(examplesdir)/c
+EXAMPLETOPDIR = $(examplesdir)
@BUILD_SHARED_SZIP_CONDITIONAL_TRUE@LD_LIBRARY_PATH = $(LL_PATH)
# Assume that all tests in this directory are examples, and tell
@@ -659,11 +672,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1162,6 +1175,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1197,7 +1211,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1358,7 +1372,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/examples/README b/examples/README
index 0550b15..e0a3364 100644
--- a/examples/README
+++ b/examples/README
@@ -2,7 +2,7 @@
This directory contains example programs for the installed APIs and scripts to
compile and run them. Examples in the c and hl/c subdirectories are always
-installed, and those in fortan, hl/fortran, c++ and hl/c++ will be installed
+installed, and those in fortran, hl/fortran, c++ and hl/c++ will be installed
when fortran or c++ are enabled.
Running the run-all-ex.sh script in this directory will run the scripts and in
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 335f9c2..d88f589 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,193 +29,192 @@
#define H5FILE_NAME "Attributes.h5"
-#define RANK 1 /* Rank and size of the dataset */
-#define SIZE 7
+#define RANK 1 /* Rank and size of the dataset */
+#define SIZE 7
-#define ARANK 2 /* Rank and dimension sizes of the first dataset attribute */
+#define ARANK 2 /* Rank and dimension sizes of the first dataset attribute */
#define ADIM1 2
#define ADIM2 3
-#define ANAME "Float attribute" /* Name of the array attribute */
+#define ANAME "Float attribute" /* Name of the array attribute */
#define ANAMES "Character attribute" /* Name of the string attribute */
static herr_t attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata);
- /* Operator function */
+/* Operator function */
int
-main (void)
+main(void)
{
- hid_t file, dataset; /* File and dataset identifiers */
-
- hid_t fid; /* Dataspace identifier */
- hid_t attr1, attr2, attr3; /* Attribute identifiers */
- hid_t attr;
- hid_t aid1, aid2, aid3; /* Attribute dataspace identifiers */
- hid_t atype, atype_mem; /* Attribute type */
- H5T_class_t type_class;
-
- hsize_t fdim[] = {SIZE};
- hsize_t adim[] = {ADIM1, ADIM2}; /* Dimensions of the first attribute */
-
- float matrix[ADIM1][ADIM2]; /* Attribute data */
-
- herr_t ret; /* Return value */
- H5O_info_t oinfo; /* Object info */
- unsigned i, j; /* Counters */
- char string_out[80]; /* Buffer to read string attribute back */
- int point_out; /* Buffer to read scalar attribute back */
-
- /*
- * Data initialization.
- */
- int vector[] = {1, 2, 3, 4, 5, 6, 7}; /* Dataset data */
- int point = 1; /* Value of the scalar attribute */
- char string[] = "ABCD"; /* Value of the string attribute */
-
-
- for (i=0; i < ADIM1; i++) { /* Values of the array attribute */
- for (j=0; j < ADIM2; j++)
- matrix[i][j] = -1.;
- }
-
- /*
- * Create a file.
- */
- file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create the dataspace for the dataset in the file.
- */
- fid = H5Screate(H5S_SIMPLE);
- ret = H5Sset_extent_simple(fid, RANK, fdim, NULL);
-
- /*
- * Create the dataset in the file.
- */
- dataset = H5Dcreate2(file, "Dataset", H5T_NATIVE_INT, fid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Write data to the dataset.
- */
- ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL , H5S_ALL, H5P_DEFAULT, vector);
-
- /*
- * Create dataspace for the first attribute.
- */
- aid1 = H5Screate(H5S_SIMPLE);
- ret = H5Sset_extent_simple(aid1, ARANK, adim, NULL);
-
- /*
- * Create array attribute.
- */
- attr1 = H5Acreate2(dataset, ANAME, H5T_NATIVE_FLOAT, aid1, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Write array attribute.
- */
- ret = H5Awrite(attr1, H5T_NATIVE_FLOAT, matrix);
-
- /*
- * Create scalar attribute.
- */
- aid2 = H5Screate(H5S_SCALAR);
- attr2 = H5Acreate2(dataset, "Integer attribute", H5T_NATIVE_INT, aid2,
- H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Write scalar attribute.
- */
- ret = H5Awrite(attr2, H5T_NATIVE_INT, &point);
-
- /*
- * Create string attribute.
- */
- aid3 = H5Screate(H5S_SCALAR);
- atype = H5Tcopy(H5T_C_S1);
- H5Tset_size(atype, 5);
- H5Tset_strpad(atype,H5T_STR_NULLTERM);
- attr3 = H5Acreate2(dataset, ANAMES, atype, aid3, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Write string attribute.
- */
- ret = H5Awrite(attr3, atype, string);
-
- /*
- * Close attribute and file dataspaces, and datatype.
- */
- ret = H5Sclose(aid1);
- ret = H5Sclose(aid2);
- ret = H5Sclose(aid3);
- ret = H5Sclose(fid);
- ret = H5Tclose(atype);
-
- /*
- * Close the attributes.
- */
- ret = H5Aclose(attr1);
- ret = H5Aclose(attr2);
- ret = H5Aclose(attr3);
-
- /*
- * Close the dataset.
- */
- ret = H5Dclose(dataset);
-
- /*
- * Close the file.
- */
- ret = H5Fclose(file);
-
- /*
- * Reopen the file.
- */
- file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
-
- /*
- * Open the dataset.
- */
- dataset = H5Dopen2(file, "Dataset", H5P_DEFAULT);
-
- /*
- * Attach to the scalar attribute using attribute name, then read and
- * display its value.
- */
- attr = H5Aopen(dataset, "Integer attribute", H5P_DEFAULT);
- ret = H5Aread(attr, H5T_NATIVE_INT, &point_out);
- printf("The value of the attribute \"Integer attribute\" is %d \n", point_out);
- ret = H5Aclose(attr);
-
- /*
- * Find string attribute by iterating through all attributes
- */
- ret = H5Oget_info(dataset, &oinfo);
- for(i = 0; i < (unsigned)oinfo.num_attrs; i++) {
- attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)i, H5P_DEFAULT, H5P_DEFAULT);
- atype = H5Aget_type(attr);
- type_class = H5Tget_class(atype);
- if (type_class == H5T_STRING) {
- atype_mem = H5Tget_native_type(atype, H5T_DIR_ASCEND);
- ret = H5Aread(attr, atype_mem, string_out);
- printf("Found string attribute; its index is %d , value = %s \n", i, string_out);
- ret = H5Tclose(atype_mem);
- }
- ret = H5Aclose(attr);
- ret = H5Tclose(atype);
+ hid_t file, dataset; /* File and dataset identifiers */
+
+ hid_t fid; /* Dataspace identifier */
+ hid_t attr1, attr2, attr3; /* Attribute identifiers */
+ hid_t attr;
+ hid_t aid1, aid2, aid3; /* Attribute dataspace identifiers */
+ hid_t atype, atype_mem; /* Attribute type */
+ H5T_class_t type_class;
+
+ hsize_t fdim[] = {SIZE};
+ hsize_t adim[] = {ADIM1, ADIM2}; /* Dimensions of the first attribute */
+
+ float matrix[ADIM1][ADIM2]; /* Attribute data */
+
+ herr_t ret; /* Return value */
+ H5O_info_t oinfo; /* Object info */
+ unsigned i, j; /* Counters */
+ char string_out[80]; /* Buffer to read string attribute back */
+ int point_out; /* Buffer to read scalar attribute back */
+
+ /*
+ * Data initialization.
+ */
+ int vector[] = {1, 2, 3, 4, 5, 6, 7}; /* Dataset data */
+ int point = 1; /* Value of the scalar attribute */
+ char string[] = "ABCD"; /* Value of the string attribute */
+
+ for (i = 0; i < ADIM1; i++) { /* Values of the array attribute */
+ for (j = 0; j < ADIM2; j++)
+ matrix[i][j] = -1.;
+ }
+
+ /*
+ * Create a file.
+ */
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create the dataspace for the dataset in the file.
+ */
+ fid = H5Screate(H5S_SIMPLE);
+ ret = H5Sset_extent_simple(fid, RANK, fdim, NULL);
+
+ /*
+ * Create the dataset in the file.
+ */
+ dataset = H5Dcreate2(file, "Dataset", H5T_NATIVE_INT, fid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Write data to the dataset.
+ */
+ ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, vector);
+
+ /*
+ * Create dataspace for the first attribute.
+ */
+ aid1 = H5Screate(H5S_SIMPLE);
+ ret = H5Sset_extent_simple(aid1, ARANK, adim, NULL);
+
+ /*
+ * Create array attribute.
+ */
+ attr1 = H5Acreate2(dataset, ANAME, H5T_NATIVE_FLOAT, aid1, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Write array attribute.
+ */
+ ret = H5Awrite(attr1, H5T_NATIVE_FLOAT, matrix);
+
+ /*
+ * Create scalar attribute.
+ */
+ aid2 = H5Screate(H5S_SCALAR);
+ attr2 = H5Acreate2(dataset, "Integer attribute", H5T_NATIVE_INT, aid2, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Write scalar attribute.
+ */
+ ret = H5Awrite(attr2, H5T_NATIVE_INT, &point);
+
+ /*
+ * Create string attribute.
+ */
+ aid3 = H5Screate(H5S_SCALAR);
+ atype = H5Tcopy(H5T_C_S1);
+ H5Tset_size(atype, 5);
+ H5Tset_strpad(atype, H5T_STR_NULLTERM);
+ attr3 = H5Acreate2(dataset, ANAMES, atype, aid3, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Write string attribute.
+ */
+ ret = H5Awrite(attr3, atype, string);
+
+ /*
+ * Close attribute and file dataspaces, and datatype.
+ */
+ ret = H5Sclose(aid1);
+ ret = H5Sclose(aid2);
+ ret = H5Sclose(aid3);
+ ret = H5Sclose(fid);
+ ret = H5Tclose(atype);
+
+ /*
+ * Close the attributes.
+ */
+ ret = H5Aclose(attr1);
+ ret = H5Aclose(attr2);
+ ret = H5Aclose(attr3);
+
+ /*
+ * Close the dataset.
+ */
+ ret = H5Dclose(dataset);
+
+ /*
+ * Close the file.
+ */
+ ret = H5Fclose(file);
+
+ /*
+ * Reopen the file.
+ */
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+
+ /*
+ * Open the dataset.
+ */
+ dataset = H5Dopen2(file, "Dataset", H5P_DEFAULT);
+
+ /*
+ * Attach to the scalar attribute using attribute name, then read and
+ * display its value.
+ */
+ attr = H5Aopen(dataset, "Integer attribute", H5P_DEFAULT);
+ ret = H5Aread(attr, H5T_NATIVE_INT, &point_out);
+ printf("The value of the attribute \"Integer attribute\" is %d \n", point_out);
+ ret = H5Aclose(attr);
+
+ /*
+ * Find string attribute by iterating through all attributes
+ */
+ ret = H5Oget_info(dataset, &oinfo);
+ for (i = 0; i < (unsigned)oinfo.num_attrs; i++) {
+ attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)i, H5P_DEFAULT,
+ H5P_DEFAULT);
+ atype = H5Aget_type(attr);
+ type_class = H5Tget_class(atype);
+ if (type_class == H5T_STRING) {
+ atype_mem = H5Tget_native_type(atype, H5T_DIR_ASCEND);
+ ret = H5Aread(attr, atype_mem, string_out);
+ printf("Found string attribute; its index is %d , value = %s \n", i, string_out);
+ ret = H5Tclose(atype_mem);
+ }
+ ret = H5Aclose(attr);
+ ret = H5Tclose(atype);
}
- /*
- * Get attribute info using iteration function.
- */
+ /*
+ * Get attribute info using iteration function.
+ */
ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_info, NULL);
- /*
- * Close the dataset and the file.
- */
- H5Dclose(dataset);
- H5Fclose(file);
+ /*
+ * Close the dataset and the file.
+ */
+ H5Dclose(dataset);
+ H5Fclose(file);
- return 0;
+ return 0;
}
/*
@@ -224,13 +223,13 @@ main (void)
static herr_t
attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
{
- hid_t attr, atype, aspace; /* Attribute, datatype and dataspace identifiers */
- int rank;
+ hid_t attr, atype, aspace; /* Attribute, datatype and dataspace identifiers */
+ int rank;
hsize_t sdim[64];
- herr_t ret;
- int i;
- size_t npoints; /* Number of elements in the array attribute. */
- float *float_array; /* Pointer to the array attribute. */
+ herr_t ret;
+ int i;
+ size_t npoints; /* Number of elements in the array attribute. */
+ float * float_array; /* Pointer to the array attribute. */
/* avoid warnings */
opdata = opdata;
@@ -250,17 +249,17 @@ attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
*/
atype = H5Aget_type(attr);
aspace = H5Aget_space(attr);
- rank = H5Sget_simple_extent_ndims(aspace);
- ret = H5Sget_simple_extent_dims(aspace, sdim, NULL);
+ rank = H5Sget_simple_extent_ndims(aspace);
+ ret = H5Sget_simple_extent_dims(aspace, sdim, NULL);
/*
* Display rank and dimension sizes for the array attribute.
*/
- if(rank > 0) {
+ if (rank > 0) {
printf("Rank : %d \n", rank);
printf("Dimension sizes : ");
- for (i=0; i< rank; i++)
+ for (i = 0; i < rank; i++)
printf("%d ", (int)sdim[i]);
printf("\n");
}
@@ -271,11 +270,11 @@ attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
if (H5T_FLOAT == H5Tget_class(atype)) {
printf("Type : FLOAT \n");
- npoints = H5Sget_simple_extent_npoints(aspace);
- float_array = (float *)malloc(sizeof(float)*(int)npoints);
- ret = H5Aread(attr, atype, float_array);
+ npoints = H5Sget_simple_extent_npoints(aspace);
+ float_array = (float *)malloc(sizeof(float) * (int)npoints);
+ ret = H5Aread(attr, atype, float_array);
printf("Values : ");
- for( i = 0; i < (int)npoints; i++)
+ for (i = 0; i < (int)npoints; i++)
printf("%f ", float_array[i]);
printf("\n");
free(float_array);
@@ -290,4 +289,3 @@ attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
return 0;
}
-
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index c3455f4..408a844 100644
--- a/examples/h5_chunk_read.c
+++ b/examples/h5_chunk_read.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,68 +18,66 @@
#include "hdf5.h"
-#define H5FILE_NAME "SDSextendible.h5"
+#define H5FILE_NAME "SDSextendible.h5"
#define DATASETNAME "ExtendibleArray"
-#define RANK 2
-#define RANKC 1
-#define NX 10
-#define NY 5
+#define RANK 2
+#define RANKC 1
+#define NX 10
+#define NY 5
int
-main (void)
+main(void)
{
- hid_t file; /* handles */
- hid_t dataset;
- hid_t filespace;
- hid_t memspace;
- hid_t cparms;
- hsize_t dims[2]; /* dataset and chunk dimensions*/
- hsize_t chunk_dims[2];
- hsize_t col_dims[1];
- hsize_t count[2];
- hsize_t offset[2];
-
- herr_t status, status_n;
-
- int data_out[NX][NY]; /* buffer for dataset to be read */
- int chunk_out[2][5]; /* buffer for chunk to be read */
- int column[10]; /* buffer for column to be read */
- int rank, rank_chunk;
- int i, j;
-
-
+ hid_t file; /* handles */
+ hid_t dataset;
+ hid_t filespace;
+ hid_t memspace;
+ hid_t cparms;
+ hsize_t dims[2]; /* dataset and chunk dimensions*/
+ hsize_t chunk_dims[2];
+ hsize_t col_dims[1];
+ hsize_t count[2];
+ hsize_t offset[2];
+
+ herr_t status, status_n;
+
+ int data_out[NX][NY]; /* buffer for dataset to be read */
+ int chunk_out[2][5]; /* buffer for chunk to be read */
+ int column[10]; /* buffer for column to be read */
+ int rank, rank_chunk;
+ int i, j;
/*
* Open the file and the dataset.
*/
- file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen2(file, DATASETNAME, H5P_DEFAULT);
/*
* Get dataset rank and dimension.
*/
- filespace = H5Dget_space(dataset); /* Get filespace handle first. */
+ filespace = H5Dget_space(dataset); /* Get filespace handle first. */
rank = H5Sget_simple_extent_ndims(filespace);
status_n = H5Sget_simple_extent_dims(filespace, dims, NULL);
- printf("dataset rank %d, dimensions %lu x %lu\n",
- rank, (unsigned long)(dims[0]), (unsigned long)(dims[1]));
+ printf("dataset rank %d, dimensions %lu x %lu\n", rank, (unsigned long)(dims[0]),
+ (unsigned long)(dims[1]));
/*
* Define the memory space to read dataset.
*/
- memspace = H5Screate_simple(RANK,dims,NULL);
+ memspace = H5Screate_simple(RANK, dims, NULL);
/*
* Read dataset back and display.
*/
- status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5P_DEFAULT, data_out);
+ status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, data_out);
printf("\n");
printf("Dataset: \n");
for (j = 0; j < dims[0]; j++) {
- for (i = 0; i < dims[1]; i++) printf("%d ", data_out[j][i]);
- printf("\n");
+ for (i = 0; i < dims[1]; i++)
+ printf("%d ", data_out[j][i]);
+ printf("\n");
}
/*
@@ -110,7 +108,7 @@ main (void)
* and read it into column array.
*/
col_dims[0] = 10;
- memspace = H5Screate_simple(RANKC, col_dims, NULL);
+ memspace = H5Screate_simple(RANKC, col_dims, NULL);
/*
* Define the column (hyperslab) to read.
@@ -119,14 +117,12 @@ main (void)
offset[1] = 2;
count[0] = 10;
count[1] = 1;
- status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL,
- count, NULL);
- status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5P_DEFAULT, column);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, count, NULL);
+ status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, column);
printf("\n");
printf("Third column: \n");
for (i = 0; i < 10; i++) {
- printf("%d \n", column[i]);
+ printf("%d \n", column[i]);
}
/*
@@ -153,19 +149,19 @@ main (void)
*/
cparms = H5Dget_create_plist(dataset); /* Get properties handle first. */
- if (H5D_CHUNKED == H5Pget_layout(cparms)) {
+ if (H5D_CHUNKED == H5Pget_layout(cparms)) {
- /*
- * Get chunking information: rank and dimensions
- */
- rank_chunk = H5Pget_chunk(cparms, 2, chunk_dims);
- printf("chunk rank %d, dimensions %lu x %lu\n", rank_chunk,
- (unsigned long)(chunk_dims[0]), (unsigned long)(chunk_dims[1]));
+ /*
+ * Get chunking information: rank and dimensions
+ */
+ rank_chunk = H5Pget_chunk(cparms, 2, chunk_dims);
+ printf("chunk rank %d, dimensions %lu x %lu\n", rank_chunk, (unsigned long)(chunk_dims[0]),
+ (unsigned long)(chunk_dims[1]));
/*
* Define the memory space to read a chunk.
*/
- memspace = H5Screate_simple(rank_chunk,chunk_dims,NULL);
+ memspace = H5Screate_simple(rank_chunk, chunk_dims, NULL);
/*
* Define chunk in the file (hyperslab) to read.
@@ -174,18 +170,17 @@ main (void)
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
- status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL,
- count, NULL);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, count, NULL);
/*
* Read chunk back and display.
*/
- status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5P_DEFAULT, chunk_out);
+ status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, chunk_out);
printf("\n");
printf("Chunk: \n");
for (j = 0; j < chunk_dims[0]; j++) {
- for (i = 0; i < chunk_dims[1]; i++) printf("%d ", chunk_out[j][i]);
+ for (i = 0; i < chunk_dims[1]; i++)
+ printf("%d ", chunk_out[j][i]);
printf("\n");
}
/*
diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c
index ebc7712..59a59f5 100644
--- a/examples/h5_cmprss.c
+++ b/examples/h5_cmprss.c
@@ -6,118 +6,116 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
+/*
* This example illustrates how to create a compressed dataset.
* It is used in the HDF5 Tutorial.
- */
+ */
#include "hdf5.h"
-#define FILE "cmprss.h5"
-#define RANK 2
-#define DIM0 100
-#define DIM1 20
-
-int main () {
+#define FILE "cmprss.h5"
+#define RANK 2
+#define DIM0 100
+#define DIM1 20
- hid_t file_id, dataset_id, dataspace_id; /* identifiers */
- hid_t plist_id;
+int
+main()
+{
- size_t nelmts;
- unsigned flags, filter_info;
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hid_t plist_id;
+
+ size_t nelmts;
+ unsigned flags, filter_info;
H5Z_filter_t filter_type;
- herr_t status;
- hsize_t dims[2];
- hsize_t cdims[2];
-
- int idx;
- int i,j, numfilt;
- int buf[DIM0][DIM1];
- int rbuf [DIM0][DIM1];
+ herr_t status;
+ hsize_t dims[2];
+ hsize_t cdims[2];
+
+ int i, j, numfilt;
+ int buf[DIM0][DIM1];
+ int rbuf[DIM0][DIM1];
- /* Uncomment these variables to use SZIP compression
+ /* Uncomment these variables to use SZIP compression
unsigned szip_options_mask;
unsigned szip_pixels_per_block;
*/
/* Create a file. */
- file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create dataset "Compressed Data" in the group using absolute name. */
- dims[0] = DIM0;
- dims[1] = DIM1;
- dataspace_id = H5Screate_simple (RANK, dims, NULL);
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ dataspace_id = H5Screate_simple(RANK, dims, NULL);
- plist_id = H5Pcreate (H5P_DATASET_CREATE);
+ plist_id = H5Pcreate(H5P_DATASET_CREATE);
/* Dataset must be chunked for compression */
cdims[0] = 20;
cdims[1] = 20;
- status = H5Pset_chunk (plist_id, 2, cdims);
+ status = H5Pset_chunk(plist_id, 2, cdims);
/* Set ZLIB / DEFLATE Compression using compression level 6.
- * To use SZIP Compression comment out these lines.
- */
- status = H5Pset_deflate (plist_id, 6);
+ * To use SZIP Compression comment out these lines.
+ */
+ status = H5Pset_deflate(plist_id, 6);
- /* Uncomment these lines to set SZIP Compression
+ /* Uncomment these lines to set SZIP Compression
szip_options_mask = H5_SZIP_NN_OPTION_MASK;
szip_pixels_per_block = 16;
status = H5Pset_szip (plist_id, szip_options_mask, szip_pixels_per_block);
*/
-
- dataset_id = H5Dcreate2 (file_id, "Compressed_Data", H5T_STD_I32BE,
- dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- for (i = 0; i< DIM0; i++)
- for (j=0; j<DIM1; j++)
- buf[i][j] = i+j;
+ dataset_id = H5Dcreate2(file_id, "Compressed_Data", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, plist_id,
+ H5P_DEFAULT);
- status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ for (i = 0; i < DIM0; i++)
+ for (j = 0; j < DIM1; j++)
+ buf[i][j] = i + j;
- status = H5Sclose (dataspace_id);
- status = H5Dclose (dataset_id);
- status = H5Pclose (plist_id);
- status = H5Fclose (file_id);
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+
+ status = H5Sclose(dataspace_id);
+ status = H5Dclose(dataset_id);
+ status = H5Pclose(plist_id);
+ status = H5Fclose(file_id);
/* Now reopen the file and dataset in the file. */
- file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- dataset_id = H5Dopen2 (file_id, "Compressed_Data", H5P_DEFAULT);
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ dataset_id = H5Dopen2(file_id, "Compressed_Data", H5P_DEFAULT);
/* Retrieve filter information. */
- plist_id = H5Dget_create_plist (dataset_id);
-
- numfilt = H5Pget_nfilters (plist_id);
- printf ("Number of filters associated with dataset: %i\n", numfilt);
-
- for (i=0; i<numfilt; i++) {
- nelmts = 0;
- filter_type = H5Pget_filter2 (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
- &filter_info);
- printf ("Filter Type: ");
- switch (filter_type) {
- case H5Z_FILTER_DEFLATE:
- printf ("H5Z_FILTER_DEFLATE\n");
- break;
- case H5Z_FILTER_SZIP:
- printf ("H5Z_FILTER_SZIP\n");
- break;
- default:
- printf ("Other filter type included.\n");
- }
+ plist_id = H5Dget_create_plist(dataset_id);
+
+ numfilt = H5Pget_nfilters(plist_id);
+ printf("Number of filters associated with dataset: %i\n", numfilt);
+
+ for (i = 0; i < numfilt; i++) {
+ nelmts = 0;
+ filter_type = H5Pget_filter2(plist_id, 0, &flags, &nelmts, NULL, 0, NULL, &filter_info);
+ printf("Filter Type: ");
+ switch (filter_type) {
+ case H5Z_FILTER_DEFLATE:
+ printf("H5Z_FILTER_DEFLATE\n");
+ break;
+ case H5Z_FILTER_SZIP:
+ printf("H5Z_FILTER_SZIP\n");
+ break;
+ default:
+ printf("Other filter type included.\n");
+ }
}
- status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, rbuf);
-
- status = H5Dclose (dataset_id);
- status = H5Pclose (plist_id);
- status = H5Fclose (file_id);
+ status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
+
+ status = H5Dclose(dataset_id);
+ status = H5Pclose(plist_id);
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_compound.c b/examples/h5_compound.c
index b3b3a4a..093852d 100644
--- a/examples/h5_compound.c
+++ b/examples/h5_compound.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,10 +19,10 @@
#include "hdf5.h"
-#define H5FILE_NAME "SDScompound.h5"
-#define DATASETNAME "ArrayOfStructures"
-#define LENGTH 10
-#define RANK 1
+#define H5FILE_NAME "SDScompound.h5"
+#define DATASETNAME "ArrayOfStructures"
+#define LENGTH 10
+#define RANK 1
int
main(void)
@@ -30,38 +30,37 @@ main(void)
/* First structure and dataset*/
typedef struct s1_t {
- int a;
- float b;
- double c;
+ int a;
+ float b;
+ double c;
} s1_t;
- s1_t s1[LENGTH];
- hid_t s1_tid; /* File datatype identifier */
+ s1_t s1[LENGTH];
+ hid_t s1_tid; /* File datatype identifier */
/* Second structure (subset of s1_t) and dataset*/
typedef struct s2_t {
- double c;
- int a;
+ double c;
+ int a;
} s2_t;
- s2_t s2[LENGTH];
- hid_t s2_tid; /* Memory datatype handle */
+ s2_t s2[LENGTH];
+ hid_t s2_tid; /* Memory datatype handle */
/* Third "structure" ( will be used to read float field of s1) */
- hid_t s3_tid; /* Memory datatype handle */
- float s3[LENGTH];
-
- int i;
- hid_t file, dataset, space; /* Handles */
- herr_t status;
- hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
+ hid_t s3_tid; /* Memory datatype handle */
+ float s3[LENGTH];
+ int i;
+ hid_t file, dataset, space; /* Handles */
+ herr_t status;
+ hsize_t dim[] = {LENGTH}; /* Dataspace dimensions */
/*
* Initialize the data
*/
- for (i = 0; i< LENGTH; i++) {
+ for (i = 0; i < LENGTH; i++) {
s1[i].a = i;
- s1[i].b = i*i;
- s1[i].c = 1./(i+1);
+ s1[i].b = i * i;
+ s1[i].c = 1. / (i + 1);
}
/*
@@ -77,7 +76,7 @@ main(void)
/*
* Create the memory data type.
*/
- s1_tid = H5Tcreate (H5T_COMPOUND, sizeof(s1_t));
+ s1_tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
H5Tinsert(s1_tid, "a_name", HOFFSET(s1_t, a), H5T_NATIVE_INT);
H5Tinsert(s1_tid, "c_name", HOFFSET(s1_t, c), H5T_NATIVE_DOUBLE);
H5Tinsert(s1_tid, "b_name", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT);
@@ -126,12 +125,14 @@ main(void)
*/
printf("\n");
printf("Field c : \n");
- for( i = 0; i < LENGTH; i++) printf("%.4f ", s2[i].c);
+ for (i = 0; i < LENGTH; i++)
+ printf("%.4f ", s2[i].c);
printf("\n");
printf("\n");
printf("Field a : \n");
- for( i = 0; i < LENGTH; i++) printf("%d ", s2[i].a);
+ for (i = 0; i < LENGTH; i++)
+ printf("%d ", s2[i].a);
printf("\n");
/*
@@ -151,7 +152,8 @@ main(void)
*/
printf("\n");
printf("Field b : \n");
- for( i = 0; i < LENGTH; i++) printf("%.4f ", s3[i]);
+ for (i = 0; i < LENGTH; i++)
+ printf("%.4f ", s3[i]);
printf("\n");
/*
diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c
index ade17ba..3edc75d 100644
--- a/examples/h5_crtatt.c
+++ b/examples/h5_crtatt.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,43 +19,44 @@
#include "hdf5.h"
#define FILE "dset.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */
- hsize_t dims;
- int attr_data[2];
- herr_t status;
+ hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */
+ hsize_t dims;
+ int attr_data[2];
+ herr_t status;
- /* Initialize the attribute data. */
- attr_data[0] = 100;
- attr_data[1] = 200;
+ /* Initialize the attribute data. */
+ attr_data[0] = 100;
+ attr_data[1] = 200;
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- /* Open an existing dataset. */
- dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
- /* Create the data space for the attribute. */
- dims = 2;
- dataspace_id = H5Screate_simple(1, &dims, NULL);
+ /* Create the data space for the attribute. */
+ dims = 2;
+ dataspace_id = H5Screate_simple(1, &dims, NULL);
- /* Create a dataset attribute. */
- attribute_id = H5Acreate2 (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a dataset attribute. */
+ attribute_id = H5Acreate2(dataset_id, "Units", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);
- /* Write the attribute data. */
- status = H5Awrite(attribute_id, H5T_NATIVE_INT, attr_data);
+ /* Write the attribute data. */
+ status = H5Awrite(attribute_id, H5T_NATIVE_INT, attr_data);
- /* Close the attribute. */
- status = H5Aclose(attribute_id);
+ /* Close the attribute. */
+ status = H5Aclose(attribute_id);
- /* Close the dataspace. */
- status = H5Sclose(dataspace_id);
+ /* Close the dataspace. */
+ status = H5Sclose(dataspace_id);
- /* Close to the dataset. */
- status = H5Dclose(dataset_id);
+ /* Close to the dataset. */
+ status = H5Dclose(dataset_id);
- /* Close the file. */
- status = H5Fclose(file_id);
+ /* Close the file. */
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c
index 4a876d2..4450367 100644
--- a/examples/h5_crtdat.c
+++ b/examples/h5_crtdat.c
@@ -6,44 +6,45 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * This example illustrates how to create a dataset that is a 4 x 6
+ * This example illustrates how to create a dataset that is a 4 x 6
* array. It is used in the HDF5 Tutorial.
*/
#include "hdf5.h"
#define FILE "dset.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, dataset_id, dataspace_id; /* identifiers */
- hsize_t dims[2];
- herr_t status;
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* Create the data space for the dataset. */
- dims[0] = 4;
- dims[1] = 6;
- dataspace_id = H5Screate_simple(2, dims, NULL);
+ /* Create the data space for the dataset. */
+ dims[0] = 4;
+ dims[1] = 6;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
- /* Create the dataset. */
- dataset_id = H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create the dataset. */
+ dataset_id =
+ H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* End access to the dataset and release resources used by it. */
- status = H5Dclose(dataset_id);
+ /* End access to the dataset and release resources used by it. */
+ status = H5Dclose(dataset_id);
- /* Terminate access to the data space. */
- status = H5Sclose(dataspace_id);
+ /* Terminate access to the data space. */
+ status = H5Sclose(dataspace_id);
- /* Close the file. */
- status = H5Fclose(file_id);
+ /* Close the file. */
+ status = H5Fclose(file_id);
}
-
diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c
index 89bddce..abddf09 100644
--- a/examples/h5_crtgrp.c
+++ b/examples/h5_crtgrp.c
@@ -6,33 +6,35 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * This example illustrates how to create and close a group.
+ * This example illustrates how to create and close a group.
* It is used in the HDF5 Tutorial.
*/
#include "hdf5.h"
#define FILE "group.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, group_id; /* identifiers */
- herr_t status;
+ hid_t file_id, group_id; /* identifiers */
+ herr_t status;
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* Create a group named "/MyGroup" in the file. */
- group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a group named "/MyGroup" in the file. */
+ group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* Close the group. */
- status = H5Gclose(group_id);
+ /* Close the group. */
+ status = H5Gclose(group_id);
- /* Terminate access to the file. */
- status = H5Fclose(file_id);
+ /* Terminate access to the file. */
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c
index 6f8c6e8..a4d5f38 100644
--- a/examples/h5_crtgrpar.c
+++ b/examples/h5_crtgrpar.c
@@ -6,41 +6,43 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * This example illustrates the creation of groups using absolute and
+ * This example illustrates the creation of groups using absolute and
* relative names. It is used in the HDF5 Tutorial.
*/
#include "hdf5.h"
#define FILE "groups.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */
- herr_t status;
+ hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */
+ herr_t status;
- /* Create a new file using default properties. */
- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* Create group "MyGroup" in the root group using absolute name. */
- group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create group "MyGroup" in the root group using absolute name. */
+ group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* Create group "Group_A" in group "MyGroup" using absolute name. */
- group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create group "Group_A" in group "MyGroup" using absolute name. */
+ group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* Create group "Group_B" in group "MyGroup" using relative name. */
- group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create group "Group_B" in group "MyGroup" using relative name. */
+ group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* Close groups. */
- status = H5Gclose(group1_id);
- status = H5Gclose(group2_id);
- status = H5Gclose(group3_id);
+ /* Close groups. */
+ status = H5Gclose(group1_id);
+ status = H5Gclose(group2_id);
+ status = H5Gclose(group3_id);
- /* Close the file. */
- status = H5Fclose(file_id);
+ /* Close the file. */
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c
index 35c4389..3095aa0 100644
--- a/examples/h5_crtgrpd.c
+++ b/examples/h5_crtgrpd.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,71 +19,70 @@
#include "hdf5.h"
#define FILE "groups.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */
- hsize_t dims[2];
- herr_t status;
- int i, j, dset1_data[3][3], dset2_data[2][10];
+ hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
+ int i, j, dset1_data[3][3], dset2_data[2][10];
- /* Initialize the first dataset. */
- for (i = 0; i < 3; i++)
- for (j = 0; j < 3; j++)
- dset1_data[i][j] = j + 1;
+ /* Initialize the first dataset. */
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
+ dset1_data[i][j] = j + 1;
- /* Initialize the second dataset. */
- for (i = 0; i < 2; i++)
- for (j = 0; j < 10; j++)
- dset2_data[i][j] = j + 1;
+ /* Initialize the second dataset. */
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 10; j++)
+ dset2_data[i][j] = j + 1;
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- /* Create the data space for the first dataset. */
- dims[0] = 3;
- dims[1] = 3;
- dataspace_id = H5Screate_simple(2, dims, NULL);
+ /* Create the data space for the first dataset. */
+ dims[0] = 3;
+ dims[1] = 3;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
- /* Create a dataset in group "MyGroup". */
- dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create a dataset in group "MyGroup". */
+ dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT);
- /* Write the first dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset1_data);
+ /* Write the first dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1_data);
- /* Close the data space for the first dataset. */
- status = H5Sclose(dataspace_id);
+ /* Close the data space for the first dataset. */
+ status = H5Sclose(dataspace_id);
- /* Close the first dataset. */
- status = H5Dclose(dataset_id);
+ /* Close the first dataset. */
+ status = H5Dclose(dataset_id);
- /* Open an existing group of the specified file. */
- group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
+ /* Open an existing group of the specified file. */
+ group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
- /* Create the data space for the second dataset. */
- dims[0] = 2;
- dims[1] = 10;
- dataspace_id = H5Screate_simple(2, dims, NULL);
+ /* Create the data space for the second dataset. */
+ dims[0] = 2;
+ dims[1] = 10;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
- /* Create the second dataset in group "Group_A". */
- dataset_id = H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create the second dataset in group "Group_A". */
+ dataset_id =
+ H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* Write the second dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset2_data);
+ /* Write the second dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_data);
- /* Close the data space for the second dataset. */
- status = H5Sclose(dataspace_id);
+ /* Close the data space for the second dataset. */
+ status = H5Sclose(dataspace_id);
- /* Close the second dataset */
- status = H5Dclose(dataset_id);
+ /* Close the second dataset */
+ status = H5Dclose(dataset_id);
- /* Close the group. */
- status = H5Gclose(group_id);
+ /* Close the group. */
+ status = H5Gclose(group_id);
- /* Close the file. */
- status = H5Fclose(file_id);
+ /* Close the file. */
+ status = H5Fclose(file_id);
}
-
diff --git a/examples/h5_drivers.c b/examples/h5_drivers.c
index 43c1fc7..bd57004 100644
--- a/examples/h5_drivers.c
+++ b/examples/h5_drivers.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,13 +22,12 @@
#include "stdlib.h"
/* global variables */
-int cleanup_g = -1; /* whether to clean. Init to not set. */
+int cleanup_g = -1; /* whether to clean. Init to not set. */
/* prototypes */
void cleanup(const char *);
void split_file(void);
-
/*
* Cleanup a file unless $HDF5_NOCLEANUP is set.
*/
@@ -36,12 +35,11 @@ void
cleanup(const char *filename)
{
if (cleanup_g == -1)
- cleanup_g = getenv("HDF5_NOCLEANUP") ? 0 : 1;
+ cleanup_g = getenv("HDF5_NOCLEANUP") ? 0 : 1;
if (cleanup_g)
- remove(filename);
+ remove(filename);
}
-
/*
* This shows how to use the split file driver.
*/
@@ -55,7 +53,7 @@ split_file(void)
/* the metadata and rawdata files. */
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT);
- fid=H5Fcreate("Station1",H5F_ACC_TRUNC,H5P_DEFAULT,fapl);
+ fid = H5Fcreate("Station1", H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
/* using the file ... */
H5Fclose(fid);
H5Pclose(fapl);
@@ -68,7 +66,7 @@ split_file(void)
/* the metadata and rawdata files. */
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "/tmp/%s-r.h5", H5P_DEFAULT);
- fid=H5Fcreate("PointA",H5F_ACC_TRUNC,H5P_DEFAULT,fapl);
+ fid = H5Fcreate("PointA", H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
/* using the file ... */
H5Fclose(fid);
H5Pclose(fapl);
@@ -81,7 +79,7 @@ split_file(void)
/* the metadata and rawdata files. */
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_split(fapl, NULL, H5P_DEFAULT, NULL, H5P_DEFAULT);
- fid=H5Fcreate("Measure",H5F_ACC_TRUNC,H5P_DEFAULT,fapl);
+ fid = H5Fcreate("Measure", H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
/* using the file ... */
H5Fclose(fid);
H5Pclose(fapl);
@@ -90,13 +88,12 @@ split_file(void)
cleanup("Measure.raw");
}
-
/* Main Body */
int
-main (void)
+main(void)
{
split_file();
- return(0);
+ return (0);
}
diff --git a/examples/h5_dtransform.c b/examples/h5_dtransform.c
index 0b718ad..a364ec1 100644
--- a/examples/h5_dtransform.c
+++ b/examples/h5_dtransform.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -33,50 +33,48 @@
#include "hdf5.h"
-#define ROWS 12
-#define COLS 18
+#define ROWS 12
+#define COLS 18
+/* clang-format off */
const float windchillF[ROWS][COLS] =
- { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0 },
- {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } ,
- {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 },
- {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 },
- {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 },
- {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 },
- {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 },
- {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 },
- {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0 },
+ { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0},
+ {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0},
+ {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0},
+ {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0},
+ {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0},
+ {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0},
+ {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0},
+ {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0},
+ {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0},
{26.0, 19.0, 12.0, 4.0, -3.0, -10.0, -17.0, -24.0, -31.0, -38.0, -45.0, -52.0, -60.0, -67.0, -74.0, -81.0, -88.0, -95.0},
{25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0},
{25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0}
};
+/* clang-format on */
-#define PRINT(array) \
-{ \
- for(i=0; i<ROWS; i++) \
- { \
- for(j=0; j<COLS; j++) \
- printf("%6.2f ", array[i][j]); \
- printf("\n"); \
- } \
-}
-
-
-
+#define PRINT(array) \
+ { \
+ for (i = 0; i < ROWS; i++) { \
+ for (j = 0; j < COLS; j++) \
+ printf("%6.2f ", array[i][j]); \
+ printf("\n"); \
+ } \
+ }
int
-main (void)
+main(void)
{
- hid_t file, dataset; /* file and dataset handles */
- hid_t dataspace; /* handles */
- hsize_t dimsf[2]; /* dataset dimensions */
+ hid_t file, dataset; /* file and dataset handles */
+ hid_t dataspace; /* handles */
+ hsize_t dimsf[2]; /* dataset dimensions */
herr_t status;
- hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */
- const char* f_to_c = "(5/9.0)*(x-32)";
- const char* c_to_f = "(9/5.0)*x + 32";
- char* transform;
- float windchillC[ROWS][COLS];
- int i,j, transform_size;
+ hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */
+ const char *f_to_c = "(5/9.0)*(x-32)";
+ const char *c_to_f = "(9/5.0)*x + 32";
+ char * transform;
+ float windchillC[ROWS][COLS];
+ int i, j, transform_size;
/*
* Create a new file using H5F_ACC_TRUNC access,
@@ -89,28 +87,25 @@ main (void)
* Describe the size of the array and create the data space for fixed
* size dataset.
*/
- dimsf[0] = ROWS;
- dimsf[1] = COLS;
+ dimsf[0] = ROWS;
+ dimsf[1] = COLS;
dataspace = H5Screate_simple(2, dimsf, NULL);
/*
* Create a new dataset within the file using defined dataspace and
* datatype and default dataset creation properties.
*/
- dataset = H5Dcreate2(file, "data_no_trans", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset =
+ H5Dcreate2(file, "data_no_trans", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
printf("\nOriginal Data: \n");
PRINT(windchillF);
-
-
-
-/**************** PART 1 **************/
+ /**************** PART 1 **************/
/*
* Write the data to the dataset using default transfer properties (ie, no transform set)
*/
- status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, windchillF);
+ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, windchillF);
/* Create the dataset transfer property list */
dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER);
@@ -125,13 +120,11 @@ main (void)
printf("\nData with no write transform, but a read transform: \n");
PRINT(windchillC);
-
-/**************** PART 2 **************/
+ /**************** PART 2 **************/
/*
* Write the data to the dataset with the f_to_c transform set
*/
- status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- dxpl_id_f_to_c, windchillF);
+ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillF);
/* Read out the data with the default transfer list (ie, no transform set) */
H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, windchillC);
@@ -140,8 +133,7 @@ main (void)
printf("\nData with write transform, but no read transform: \n");
PRINT(windchillC);
-/************** PART 3 ***************/
-
+ /************** PART 3 ***************/
/* Create the dataset transfer property list */
dxpl_id_c_to_f = H5Pcreate(H5P_DATASET_XFER);
@@ -149,12 +141,10 @@ main (void)
/* Set the data transform to be used on the read*/
H5Pset_data_transform(dxpl_id_c_to_f, c_to_f);
-
/*
* Write the data to the dataset using the f_to_c transform
*/
- status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- dxpl_id_f_to_c, windchillF);
+ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillF);
/* Read the data with the c_to_f data transform */
H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f, windchillC);
@@ -163,10 +153,10 @@ main (void)
printf("\nData with both read and write data transform: \n");
PRINT(windchillC);
-/************** PART 4 **************/
+ /************** PART 4 **************/
transform_size = H5Pget_data_transform(dxpl_id_f_to_c, NULL, 0);
- transform = (char*) malloc(transform_size+1);
- H5Pget_data_transform(dxpl_id_f_to_c, transform, transform_size+1);
+ transform = (char *)malloc(transform_size + 1);
+ H5Pget_data_transform(dxpl_id_f_to_c, transform, transform_size + 1);
printf("\nTransform string (from dxpl_id_f_to_c) is: %s\n", transform);
diff --git a/examples/h5_elink_unix2win.c b/examples/h5_elink_unix2win.c
index df52015..bc2e246 100644
--- a/examples/h5_elink_unix2win.c
+++ b/examples/h5_elink_unix2win.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <string.h>
-
/* "Windows to Unix" traversal function for external links
*
* Translates a filename stored in Unix format to Windows format by replacing
@@ -37,45 +36,44 @@
* Note that this may not be necessary on your system; many Windows systems can
* understand Unix paths.
*/
-static hid_t elink_unix2win_trav(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id)
+static hid_t
+elink_unix2win_trav(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size,
+ hid_t lapl_id)
{
- hid_t fid;
- const char *file_name;
- const char *obj_name;
- char *new_fname = NULL; /* Buffer allocated to hold Unix file path */
- ssize_t prefix_len; /* External link prefix length */
- size_t fname_len;
- size_t start_pos; /* Initial position in new_fname buffer */
- size_t x; /* Counter variable */
- hid_t ret_value = -1;
+ hid_t fid;
+ const char *file_name;
+ const char *obj_name;
+ char * new_fname = NULL; /* Buffer allocated to hold Unix file path */
+ ssize_t prefix_len; /* External link prefix length */
+ size_t fname_len;
+ size_t start_pos; /* Initial position in new_fname buffer */
+ size_t x; /* Counter variable */
+ hid_t ret_value = -1;
printf("Converting Unix path to Windows path.\n");
- if(H5Lunpack_elink_val(udata, udata_size, NULL, &file_name, &obj_name) < 0)
+ if (H5Lunpack_elink_val(udata, udata_size, NULL, &file_name, &obj_name) < 0)
goto error;
fname_len = strlen(file_name);
/* See if the external link prefix property is set */
- if((prefix_len = H5Pget_elink_prefix(lapl_id, NULL, 0)) < 0)
+ if ((prefix_len = H5Pget_elink_prefix(lapl_id, NULL, 0)) < 0)
goto error;
/* If so, prepend it to the filename. We assume that the prefix
* is in the correct format for the current file system.
*/
- if(prefix_len > 0)
- {
+ if (prefix_len > 0) {
/* Allocate a buffer to hold the filename plus prefix */
new_fname = malloc(prefix_len + fname_len + 1);
/* Copy the prefix into the buffer */
- if(H5Pget_elink_prefix(lapl_id, new_fname, (size_t)(prefix_len + 1)) < 0)
+ if (H5Pget_elink_prefix(lapl_id, new_fname, (size_t)(prefix_len + 1)) < 0)
goto error;
start_pos = prefix_len;
}
- else
- {
+ else {
/* Allocate a buffer to hold just the filename */
new_fname = malloc(fname_len + 1);
start_pos = 0;
@@ -84,9 +82,8 @@ static hid_t elink_unix2win_trav(const char *link_name, hid_t cur_group,
/* We should now copy file_name into new_fname starting at position pos.
* We'll convert '/' characters into '\' characters as we go.
*/
- for(x=0; file_name[x] != '\0'; x++)
- {
- if(file_name[x] == '/')
+ for (x = 0; file_name[x] != '\0'; x++) {
+ if (file_name[x] == '/')
new_fname[x + start_pos] = '\\';
else
new_fname[x + start_pos] = file_name[x];
@@ -94,38 +91,37 @@ static hid_t elink_unix2win_trav(const char *link_name, hid_t cur_group,
new_fname[x + start_pos] = '\0';
/* Now open the file and object within it */
- if((fid = H5Fopen(new_fname, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(new_fname, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto error;
ret_value = H5Oopen(fid, obj_name, lapl_id); /* If this fails, our return value will be negative. */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
goto error;
/* Free file name if it's been allocated */
- if(new_fname)
+ if (new_fname)
free(new_fname);
return ret_value;
error:
/* Free file name if it's been allocated */
- if(new_fname)
+ if (new_fname)
free(new_fname);
return -1;
}
const H5L_class_t elink_unix2win_class[1] = {{
- H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
- H5L_TYPE_EXTERNAL, /* Link type id number */
- "unix2win external link", /* Link class name for debugging */
- NULL, /* Creation callback */
- NULL, /* Move callback */
- NULL, /* Copy callback */
- elink_unix2win_trav, /* The actual traversal function */
- NULL, /* Deletion callback */
- NULL /* Query callback */
+ H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
+ H5L_TYPE_EXTERNAL, /* Link type id number */
+ "unix2win external link", /* Link class name for debugging */
+ NULL, /* Creation callback */
+ NULL, /* Move callback */
+ NULL, /* Copy callback */
+ elink_unix2win_trav, /* The actual traversal function */
+ NULL, /* Deletion callback */
+ NULL /* Query callback */
}};
-
/* The example function.
* Creates a file named "unix2win.h5" with an external link pointing to
* the file "u2w/u2w_target.h5".
@@ -136,55 +132,65 @@ const H5L_class_t elink_unix2win_class[1] = {{
static int
unix2win_example(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group ID */
/* Create the target file. */
#ifdef H5_HAVE_WIN32_API
- if((fid=H5Fcreate("u2w\\u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) goto error;
+ if ((fid = H5Fcreate("u2w\\u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
#else
- if((fid=H5Fcreate("u2w/u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) goto error;
+ if ((fid = H5Fcreate("u2w/u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
#endif
- if(H5Fclose(fid) < 0) goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
/* Create the source file with an external link in Windows format */
- if((fid=H5Fcreate("unix2win.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) goto error;
+ if ((fid = H5Fcreate("unix2win.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
/* Create the external link */
- if(H5Lcreate_external("u2w/../u2w/u2w_target.h5", "/", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0) goto error;
+ if (H5Lcreate_external("u2w/../u2w/u2w_target.h5", "/", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto error;
- /* If we are not on Windows, assume we are on a Unix-y filesystem and
- * follow the external link normally.
- * If we are on Windows, register the unix2win traversal function so
- * that external links can be traversed.
- */
+ /* If we are not on Windows, assume we are on a Unix-y filesystem and
+ * follow the external link normally.
+ * If we are on Windows, register the unix2win traversal function so
+ * that external links can be traversed.
+ */
#ifdef H5_HAVE_WIN32_API
/* Register the elink_unix2win class defined above to replace default
* external links
*/
- if(H5Lregister(elink_unix2win_class) < 0) goto error;
+ if (H5Lregister(elink_unix2win_class) < 0)
+ goto error;
#endif
/* Now follow the link */
- if((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) goto error;
+ if ((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0)
+ goto error;
printf("Successfully followed external link.\n");
/* Close the group and the file */
- if(H5Gclose(gid) <0) goto error;
- if(H5Fclose(fid) <0) goto error;
+ if (H5Gclose(gid) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
return 0;
- error:
+error:
printf("Error!\n");
- H5E_BEGIN_TRY {
- H5Gclose (gid);
- H5Fclose (fid);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY
+ {
+ H5Gclose(gid);
+ H5Fclose(fid);
+ }
+ H5E_END_TRY;
return -1;
}
-
/* Main function
*
@@ -193,12 +199,10 @@ unix2win_example(void)
int
main(void)
{
- int ret;
+ int ret;
printf("Testing unix2win external links.\n");
ret = unix2win_example();
return ret;
}
-
-
diff --git a/examples/h5_extend.c b/examples/h5_extend.c
index 6e3cff2..5807694 100644
--- a/examples/h5_extend.c
+++ b/examples/h5_extend.c
@@ -6,139 +6,126 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * This example how to work with extendible datasets. The dataset
+ * This example how to work with extendible datasets. The dataset
* must be chunked in order to be extendible.
- *
+ *
* It is used in the HDF5 Tutorial.
*/
-
#include "hdf5.h"
#define FILENAME "extend.h5"
#define DATASETNAME "ExtendibleArray"
-#define RANK 2
+#define RANK 2
int
-main (void)
+main(void)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t filespace, memspace;
- hid_t prop;
-
- hsize_t dims[2] = {3, 3}; /* dataset dimensions at creation time */
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- herr_t status;
- hsize_t chunk_dims[2] = {2, 5};
- int data[3][3] = { {1, 1, 1}, /* data to write */
- {1, 1, 1},
- {1, 1, 1} };
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t filespace, memspace;
+ hid_t prop;
+
+ hsize_t dims[2] = {3, 3}; /* dataset dimensions at creation time */
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ herr_t status;
+ hsize_t chunk_dims[2] = {2, 5};
+ int data[3][3] = {{1, 1, 1}, /* data to write */
+ {1, 1, 1},
+ {1, 1, 1}};
/* Variables used in extending and writing to the extended portion of dataset */
- hsize_t size[2];
- hsize_t offset[2];
- hsize_t dimsext[2] = {7, 3}; /* extend dimensions */
- int dataext[7][3] = { {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4},
- {2, 3, 4} };
+ hsize_t size[2];
+ hsize_t offset[2];
+ hsize_t dimsext[2] = {7, 3}; /* extend dimensions */
+ int dataext[7][3] = {{2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, {2, 3, 4}};
/* Variables used in reading data back */
- hsize_t chunk_dimsr[2];
- hsize_t dimsr[2];
- hsize_t i, j;
- int rdata[10][3];
- herr_t status_n;
- int rank, rank_chunk;
+ hsize_t chunk_dimsr[2];
+ hsize_t dimsr[2];
+ hsize_t i, j;
+ int rdata[10][3];
+ herr_t status_n;
+ int rank, rank_chunk;
/* Create the data space with unlimited dimensions. */
- dataspace = H5Screate_simple (RANK, dims, maxdims);
+ dataspace = H5Screate_simple(RANK, dims, maxdims);
/* Create a new file. If file exists its contents will be overwritten. */
- file = H5Fcreate (FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Modify dataset creation properties, i.e. enable chunking */
- prop = H5Pcreate (H5P_DATASET_CREATE);
- status = H5Pset_chunk (prop, RANK, chunk_dims);
+ prop = H5Pcreate(H5P_DATASET_CREATE);
+ status = H5Pset_chunk(prop, RANK, chunk_dims);
- /* Create a new dataset within the file using chunk
+ /* Create a new dataset within the file using chunk
creation properties. */
- dataset = H5Dcreate2 (file, DATASETNAME, H5T_NATIVE_INT, dataspace,
- H5P_DEFAULT, prop, H5P_DEFAULT);
+ dataset = H5Dcreate2(file, DATASETNAME, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, prop, H5P_DEFAULT);
/* Write data to dataset */
- status = H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, data);
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
/* Extend the dataset. Dataset becomes 10 x 3 */
- size[0] = dims[0]+ dimsext[0];
+ size[0] = dims[0] + dimsext[0];
size[1] = dims[1];
- status = H5Dset_extent (dataset, size);
+ status = H5Dset_extent(dataset, size);
/* Select a hyperslab in extended portion of dataset */
- filespace = H5Dget_space (dataset);
+ filespace = H5Dget_space(dataset);
offset[0] = 3;
offset[1] = 0;
- status = H5Sselect_hyperslab (filespace, H5S_SELECT_SET, offset, NULL,
- dimsext, NULL);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dimsext, NULL);
/* Define memory space */
- memspace = H5Screate_simple (RANK, dimsext, NULL);
+ memspace = H5Screate_simple(RANK, dimsext, NULL);
/* Write the data to the extended portion of dataset */
- status = H5Dwrite (dataset, H5T_NATIVE_INT, memspace, filespace,
- H5P_DEFAULT, dataext);
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, dataext);
/* Close resources */
- status = H5Dclose (dataset);
- status = H5Pclose (prop);
- status = H5Sclose (dataspace);
- status = H5Sclose (memspace);
- status = H5Sclose (filespace);
- status = H5Fclose (file);
+ status = H5Dclose(dataset);
+ status = H5Pclose(prop);
+ status = H5Sclose(dataspace);
+ status = H5Sclose(memspace);
+ status = H5Sclose(filespace);
+ status = H5Fclose(file);
/********************************************
* Re-open the file and read the data back. *
********************************************/
- file = H5Fopen (FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
- dataset = H5Dopen2 (file, DATASETNAME, H5P_DEFAULT);
+ file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dataset = H5Dopen2(file, DATASETNAME, H5P_DEFAULT);
- filespace = H5Dget_space (dataset);
- rank = H5Sget_simple_extent_ndims (filespace);
- status_n = H5Sget_simple_extent_dims (filespace, dimsr, NULL);
+ filespace = H5Dget_space(dataset);
+ rank = H5Sget_simple_extent_ndims(filespace);
+ status_n = H5Sget_simple_extent_dims(filespace, dimsr, NULL);
- prop = H5Dget_create_plist (dataset);
+ prop = H5Dget_create_plist(dataset);
- if (H5D_CHUNKED == H5Pget_layout (prop))
- rank_chunk = H5Pget_chunk (prop, rank, chunk_dimsr);
+ if (H5D_CHUNKED == H5Pget_layout(prop))
+ rank_chunk = H5Pget_chunk(prop, rank, chunk_dimsr);
- memspace = H5Screate_simple (rank, dimsr, NULL);
- status = H5Dread (dataset, H5T_NATIVE_INT, memspace, filespace,
- H5P_DEFAULT, rdata);
+ memspace = H5Screate_simple(rank, dimsr, NULL);
+ status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rdata);
printf("\n");
printf("Dataset: \n");
- for (j = 0; j < dimsr[0]; j++)
- {
- for (i = 0; i < dimsr[1]; i++)
- printf("%d ", rdata[j][i]);
- printf("\n");
+ for (j = 0; j < dimsr[0]; j++) {
+ for (i = 0; i < dimsr[1]; i++)
+ printf("%d ", rdata[j][i]);
+ printf("\n");
}
- status = H5Pclose (prop);
- status = H5Dclose (dataset);
- status = H5Sclose (filespace);
- status = H5Sclose (memspace);
- status = H5Fclose (file);
+ status = H5Pclose(prop);
+ status = H5Dclose(dataset);
+ status = H5Sclose(filespace);
+ status = H5Sclose(memspace);
+ status = H5Fclose(file);
}
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index 4abda30..f5db1cf 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,43 +20,42 @@
#include "hdf5.h"
-#define H5FILE_NAME "SDSextendible.h5"
+#define H5FILE_NAME "SDSextendible.h5"
#define DATASETNAME "ExtendibleArray"
-#define RANK 2
-#define NX 10
-#define NY 5
+#define RANK 2
+#define NX 10
+#define NY 5
int
-main (void)
+main(void)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t filespace;
- hid_t cparms;
- hsize_t dims[2] = { 3, 3}; /*
- * dataset dimensions
- * at the creation time
- */
- hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */
- hsize_t dims2[2] = { 7, 1}; /* data2 dimensions */
- hsize_t dims3[2] = { 2, 2}; /* data3 dimensions */
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t filespace;
+ hid_t cparms;
+ hsize_t dims[2] = {3, 3}; /*
+ * dataset dimensions
+ * at the creation time
+ */
+ hsize_t dims1[2] = {3, 3}; /* data1 dimensions */
+ hsize_t dims2[2] = {7, 1}; /* data2 dimensions */
+ hsize_t dims3[2] = {2, 2}; /* data3 dimensions */
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={2, 5};
- hsize_t size[2];
- hsize_t offset[2];
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {2, 5};
+ hsize_t size[2];
+ hsize_t offset[2];
- herr_t status;
+ herr_t status;
- int data1[3][3] = { {1, 1, 1}, /* data to write */
- {1, 1, 1},
- {1, 1, 1} };
+ int data1[3][3] = {{1, 1, 1}, /* data to write */
+ {1, 1, 1},
+ {1, 1, 1}};
- int data2[7] = { 2, 2, 2, 2, 2, 2, 2};
+ int data2[7] = {2, 2, 2, 2, 2, 2, 2};
- int data3[2][2] = { {3, 3},
- {3, 3} };
- int fillvalue = 0;
+ int data3[2][2] = {{3, 3}, {3, 3}};
+ int fillvalue = 0;
/*
* Create the data space with unlimited dimensions.
@@ -72,22 +71,21 @@ main (void)
* Modify dataset creation properties, i.e. enable chunking.
*/
cparms = H5Pcreate(H5P_DATASET_CREATE);
- status = H5Pset_chunk( cparms, RANK, chunk_dims);
- status = H5Pset_fill_value (cparms, H5T_NATIVE_INT, &fillvalue );
+ status = H5Pset_chunk(cparms, RANK, chunk_dims);
+ status = H5Pset_fill_value(cparms, H5T_NATIVE_INT, &fillvalue);
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- dataset = H5Dcreate2(file, DATASETNAME, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT);
+ dataset = H5Dcreate2(file, DATASETNAME, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);
/*
* Extend the dataset. This call assures that dataset is at least 3 x 3.
*/
- size[0] = 3;
- size[1] = 3;
- status = H5Dset_extent(dataset, size);
+ size[0] = 3;
+ size[1] = 3;
+ status = H5Dset_extent(dataset, size);
/*
* Select a hyperslab.
@@ -95,22 +93,20 @@ main (void)
filespace = H5Dget_space(dataset);
offset[0] = 0;
offset[1] = 0;
- status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL,
- dims1, NULL);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dims1, NULL);
/*
* Write the data to the hyperslab.
*/
- status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5P_DEFAULT, data1);
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace, H5P_DEFAULT, data1);
/*
* Extend the dataset. Dataset becomes 10 x 3.
*/
- dims[0] = dims1[0] + dims2[0];
- size[0] = dims[0];
- size[1] = dims[1];
- status = H5Dset_extent(dataset, size);
+ dims[0] = dims1[0] + dims2[0];
+ size[0] = dims[0];
+ size[1] = dims[1];
+ status = H5Dset_extent(dataset, size);
/*
* Select a hyperslab.
@@ -118,8 +114,7 @@ main (void)
filespace = H5Dget_space(dataset);
offset[0] = 3;
offset[1] = 0;
- status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL,
- dims2, NULL);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dims2, NULL);
/*
* Define memory space
@@ -129,16 +124,15 @@ main (void)
/*
* Write the data to the hyperslab.
*/
- status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5P_DEFAULT, data2);
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace, H5P_DEFAULT, data2);
/*
* Extend the dataset. Dataset becomes 10 x 5.
*/
- dims[1] = dims1[1] + dims3[1];
- size[0] = dims[0];
- size[1] = dims[1];
- status = H5Dset_extent(dataset, size);
+ dims[1] = dims1[1] + dims3[1];
+ size[0] = dims[0];
+ size[1] = dims[1];
+ status = H5Dset_extent(dataset, size);
/*
* Select a hyperslab
@@ -146,8 +140,7 @@ main (void)
filespace = H5Dget_space(dataset);
offset[0] = 0;
offset[1] = 3;
- status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL,
- dims3, NULL);
+ status = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dims3, NULL);
/*
* Define memory space.
@@ -157,8 +150,7 @@ main (void)
/*
* Write the data to the hyperslab.
*/
- status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5P_DEFAULT, data3);
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace, H5P_DEFAULT, data3);
/*
* Resulting dataset
diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c
index ba632f5..341bea5 100644
--- a/examples/h5_extlink.c
+++ b/examples/h5_extlink.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,37 +26,36 @@
#define PREFIX_SOURCE_FILE "extlink_prefix_source.h5"
-#define SOFT_LINK_FILE "soft_link.h5"
-#define SOFT_LINK_NAME "soft_link_to_group"
+#define SOFT_LINK_FILE "soft_link.h5"
+#define SOFT_LINK_NAME "soft_link_to_group"
#define UD_SOFT_LINK_NAME "ud_soft_link"
-#define TARGET_GROUP "target_group"
+#define TARGET_GROUP "target_group"
#define UD_SOFT_CLASS 65
-#define HARD_LINK_FILE "hard_link.h5"
-#define HARD_LINK_NAME "hard_link_to_group"
+#define HARD_LINK_FILE "hard_link.h5"
+#define HARD_LINK_NAME "hard_link_to_group"
#define UD_HARD_LINK_NAME "ud_hard_link"
#define UD_HARD_CLASS 66
#define PLIST_LINK_PROP "plist_link_prop"
-#define UD_PLIST_CLASS 66
+#define UD_PLIST_CLASS 66
-
-
/* Basic external link example
*
* Creates two files and uses an external link to access an object in the
* second file from the first file.
*/
-static void extlink_example(void)
+static void
+extlink_example(void)
{
hid_t source_file_id, targ_file_id;
hid_t group_id, group2_id;
/* Create two files, a source and a target */
source_file_id = H5Fcreate(SOURCE_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- targ_file_id = H5Fcreate(TARGET_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ targ_file_id = H5Fcreate(TARGET_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create a group in the target file for the external link to point to. */
group_id = H5Gcreate2(targ_file_id, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -96,7 +95,6 @@ static void extlink_example(void)
*/
}
-
/* External link prefix example
*
* Uses a group access property list to set a "prefix" for the filenames
@@ -109,7 +107,8 @@ static void extlink_example(void)
* where it is run (so to run this example on Unix, first mkdir red and mkdir
* blue).
*/
-static void extlink_prefix_example(void)
+static void
+extlink_prefix_example(void)
{
hid_t source_file_id, red_file_id, blue_file_id;
hid_t group_id, group2_id;
@@ -119,14 +118,15 @@ static void extlink_prefix_example(void)
* the same name, but one will be located in the red directory and one will
* be located in the blue directory */
source_file_id = H5Fcreate(PREFIX_SOURCE_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- red_file_id = H5Fcreate("red/prefix_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- blue_file_id = H5Fcreate("blue/prefix_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ red_file_id = H5Fcreate("red/prefix_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ blue_file_id = H5Fcreate("blue/prefix_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* This test needs a red and a blue directory in the filesystem. If they're not present,
* trying to create the files above will fail.
*/
- if(red_file_id < 0 || blue_file_id < 0)
- printf("This test requires directories named 'red' and 'blue' to exist. Did you forget to create them?\n");
+ if (red_file_id < 0 || blue_file_id < 0)
+ printf("This test requires directories named 'red' and 'blue' to exist. Did you forget to create "
+ "them?\n");
/* Create an external link in the source file pointing to the root group of
* a file named prefix_target.h5. This file doesn't exist in the current
@@ -163,7 +163,7 @@ static void extlink_prefix_example(void)
* directory.
*/
H5Pset_elink_prefix(gapl_id, "blue/");
- group_id = H5Gopen2(source_file_id, "ext_link", gapl_id);
+ group_id = H5Gopen2(source_file_id, "ext_link", gapl_id);
group2_id = H5Gcreate2(group_id, "sky blue", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close both groups. */
@@ -171,7 +171,7 @@ static void extlink_prefix_example(void)
H5Gclose(group_id);
/* Each file has had a group created inside it using the same external link. */
- group_id = H5Gopen2(red_file_id, "pink", H5P_DEFAULT);
+ group_id = H5Gopen2(red_file_id, "pink", H5P_DEFAULT);
group2_id = H5Gopen2(blue_file_id, "sky blue", H5P_DEFAULT);
/* Clean up our open IDs */
@@ -189,7 +189,6 @@ static void extlink_prefix_example(void)
*/
}
-
/* Soft Link example
*
* Create a new class of user-defined links that behave like HDF5's built-in
@@ -207,10 +206,11 @@ static void extlink_prefix_example(void)
* We might also have wanted to supply a creation callback that checks
* that a path was supplied in the udata.
*/
-static hid_t UD_soft_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id);
+static hid_t UD_soft_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size,
+ hid_t lapl_id);
-static void soft_link_example(void)
+static void
+soft_link_example(void)
{
hid_t file_id;
hid_t group_id;
@@ -220,27 +220,26 @@ static void soft_link_example(void)
* callback.
*/
const H5L_class_t UD_soft_class[1] = {{
- H5L_LINK_CLASS_T_VERS, /* Version number for this struct.
- * This field is always H5L_LINK_CLASS_T_VERS */
- (H5L_type_t)UD_SOFT_CLASS, /* Link class id number. This can be any
- * value between H5L_TYPE_UD_MIN (64) and
- * H5L_TYPE_MAX (255). It should be a
- * value that isn't already being used by
- * another kind of link. We'll use 65. */
- "UD_soft_link", /* Link class name for debugging */
- NULL, /* Creation callback */
- NULL, /* Move callback */
- NULL, /* Copy callback */
- UD_soft_traverse, /* The actual traversal function */
- NULL, /* Deletion callback */
- NULL /* Query callback */
+ H5L_LINK_CLASS_T_VERS, /* Version number for this struct.
+ * This field is always H5L_LINK_CLASS_T_VERS */
+ (H5L_type_t)UD_SOFT_CLASS, /* Link class id number. This can be any
+ * value between H5L_TYPE_UD_MIN (64) and
+ * H5L_TYPE_MAX (255). It should be a
+ * value that isn't already being used by
+ * another kind of link. We'll use 65. */
+ "UD_soft_link", /* Link class name for debugging */
+ NULL, /* Creation callback */
+ NULL, /* Move callback */
+ NULL, /* Copy callback */
+ UD_soft_traverse, /* The actual traversal function */
+ NULL, /* Deletion callback */
+ NULL /* Query callback */
}};
-
/* First, create a file and an object within the file for the link to
* point to.
*/
- file_id = H5Fcreate(SOFT_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(SOFT_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group_id = H5Gcreate2(file_id, TARGET_GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
@@ -275,12 +274,12 @@ static void soft_link_example(void)
* The actual traversal function simply needs to open the correct object by
* name and return its ID.
*/
-
-static hid_t UD_soft_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id)
+
+static hid_t
+UD_soft_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size, hid_t lapl_id)
{
- const char *target = (const char *) udata;
- hid_t ret_value;
+ const char *target = (const char *)udata;
+ hid_t ret_value;
/* Pass the udata straight through to HDF5. If it's invalid, let HDF5
* return an error.
@@ -289,7 +288,6 @@ static hid_t UD_soft_traverse(const char *link_name, hid_t cur_group,
return ret_value;
}
-
/* Hard Link example
*
* Create a new class of user-defined links that behave like HDF5's built-in
@@ -305,17 +303,17 @@ static hid_t UD_soft_traverse(const char *link_name, hid_t cur_group,
* To keep the example simple, these links don't have a query callback.
* Generally, real link classes should always be query-able.
*/
-static herr_t UD_hard_create(const char *link_name, hid_t loc_group,
- const void *udata, size_t udata_size, hid_t lcpl_id);
-static herr_t UD_hard_delete(const char *link_name, hid_t loc_group,
- const void *udata, size_t udata_size);
-static hid_t UD_hard_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id);
-
-static void hard_link_example(void)
+static herr_t UD_hard_create(const char *link_name, hid_t loc_group, const void *udata, size_t udata_size,
+ hid_t lcpl_id);
+static herr_t UD_hard_delete(const char *link_name, hid_t loc_group, const void *udata, size_t udata_size);
+static hid_t UD_hard_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size,
+ hid_t lapl_id);
+
+static void
+hard_link_example(void)
{
- hid_t file_id;
- hid_t group_id;
+ hid_t file_id;
+ hid_t group_id;
H5L_info_t li;
/* Define the link class that we'll use to register "user-defined hard
* links" using the callbacks we defined above.
@@ -323,27 +321,26 @@ static void hard_link_example(void)
* callback.
*/
const H5L_class_t UD_hard_class[1] = {{
- H5L_LINK_CLASS_T_VERS, /* Version number for this struct.
- * This field is always H5L_LINK_CLASS_T_VERS */
- (H5L_type_t)UD_HARD_CLASS, /* Link class id number. This can be any
- * value between H5L_TYPE_UD_MIN (64) and
- * H5L_TYPE_MAX (255). It should be a
- * value that isn't already being used by
- * another kind of link. We'll use 66. */
- "UD_hard_link", /* Link class name for debugging */
- UD_hard_create, /* Creation callback */
- NULL, /* Move callback */
- NULL, /* Copy callback */
- UD_hard_traverse, /* The actual traversal function */
- UD_hard_delete, /* Deletion callback */
- NULL /* Query callback */
+ H5L_LINK_CLASS_T_VERS, /* Version number for this struct.
+ * This field is always H5L_LINK_CLASS_T_VERS */
+ (H5L_type_t)UD_HARD_CLASS, /* Link class id number. This can be any
+ * value between H5L_TYPE_UD_MIN (64) and
+ * H5L_TYPE_MAX (255). It should be a
+ * value that isn't already being used by
+ * another kind of link. We'll use 66. */
+ "UD_hard_link", /* Link class name for debugging */
+ UD_hard_create, /* Creation callback */
+ NULL, /* Move callback */
+ NULL, /* Copy callback */
+ UD_hard_traverse, /* The actual traversal function */
+ UD_hard_delete, /* Deletion callback */
+ NULL /* Query callback */
}};
-
/* First, create a file and an object within the file for the link to
* point to.
*/
- file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group_id = H5Gcreate2(file_id, TARGET_GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
@@ -366,8 +363,8 @@ static void hard_link_example(void)
/* Now create a user-defined link. We give it the group's address
* as its udata.
*/
- H5Lcreate_ud(file_id, UD_HARD_LINK_NAME, (H5L_type_t)UD_HARD_CLASS, &(li.u.address),
- sizeof(li.u.address), H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_ud(file_id, UD_HARD_LINK_NAME, (H5L_type_t)UD_HARD_CLASS, &(li.u.address), sizeof(li.u.address),
+ H5P_DEFAULT, H5P_DEFAULT);
/* The UD hard link has now incremented the group's reference count
* like a normal hard link would. This means that we can unlink the
@@ -401,42 +398,39 @@ static void hard_link_example(void)
* If this function returns a negative value, the call to H5Lcreate_ud()
* will also return failure and the link will not be created.
*/
-static herr_t UD_hard_create(const char *link_name, hid_t loc_group,
- const void *udata, size_t udata_size, hid_t lcpl_id)
+static herr_t
+UD_hard_create(const char *link_name, hid_t loc_group, const void *udata, size_t udata_size, hid_t lcpl_id)
{
haddr_t addr;
- hid_t target_obj = -1;
- herr_t ret_value = 0;
+ hid_t target_obj = -1;
+ herr_t ret_value = 0;
/* Make sure that the address passed in looks valid */
- if(udata_size != sizeof(haddr_t))
- {
- ret_value = -1;
- goto done;
+ if (udata_size != sizeof(haddr_t)) {
+ ret_value = -1;
+ goto done;
}
- addr = *((const haddr_t *) udata);
+ addr = *((const haddr_t *)udata);
/* Open the object this link points to so that we can increment
* its reference count. This also ensures that the address passed
* in points to a real object (although this check is not perfect!) */
- target_obj= H5Oopen_by_addr(loc_group, addr);
- if(target_obj < 0)
- {
- ret_value = -1;
- goto done;
+ target_obj = H5Oopen_by_addr(loc_group, addr);
+ if (target_obj < 0) {
+ ret_value = -1;
+ goto done;
}
/* Increment the reference count of the target object */
- if(H5Oincr_refcount(target_obj) < 0)
- {
- ret_value = -1;
- goto done;
+ if (H5Oincr_refcount(target_obj) < 0) {
+ ret_value = -1;
+ goto done;
}
done:
/* Close the target object if we opened it */
- if(target_obj >= 0)
+ if (target_obj >= 0)
H5Oclose(target_obj);
return ret_value;
}
@@ -445,42 +439,39 @@ done:
* Since the creation function increments the object's reference count, it's
* important to decrement it again when the link is deleted.
*/
-static herr_t UD_hard_delete(const char *link_name, hid_t loc_group,
- const void *udata, size_t udata_size)
+static herr_t
+UD_hard_delete(const char *link_name, hid_t loc_group, const void *udata, size_t udata_size)
{
haddr_t addr;
- hid_t target_obj = -1;
- herr_t ret_value = 0;
+ hid_t target_obj = -1;
+ herr_t ret_value = 0;
/* Sanity check; we have already verified the udata's size in the creation
* callback.
*/
- if(udata_size != sizeof(haddr_t))
- {
- ret_value = -1;
- goto done;
+ if (udata_size != sizeof(haddr_t)) {
+ ret_value = -1;
+ goto done;
}
- addr = *((const haddr_t *) udata);
+ addr = *((const haddr_t *)udata);
/* Open the object this link points to */
- target_obj= H5Oopen_by_addr(loc_group, addr);
- if(target_obj < 0)
- {
- ret_value = -1;
- goto done;
+ target_obj = H5Oopen_by_addr(loc_group, addr);
+ if (target_obj < 0) {
+ ret_value = -1;
+ goto done;
}
/* Decrement the reference count of the target object */
- if(H5Odecr_refcount(target_obj) < 0)
- {
- ret_value = -1;
- goto done;
+ if (H5Odecr_refcount(target_obj) < 0) {
+ ret_value = -1;
+ goto done;
}
done:
/* Close the target object if we opened it */
- if(target_obj >= 0)
+ if (target_obj >= 0)
H5Oclose(target_obj);
return ret_value;
}
@@ -489,19 +480,19 @@ done:
* The actual traversal function simply needs to open the correct object and
* return its ID.
*/
-static hid_t UD_hard_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id)
+static hid_t
+UD_hard_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size, hid_t lapl_id)
{
- haddr_t addr;
- hid_t ret_value = -1;
+ haddr_t addr;
+ hid_t ret_value = -1;
/* Sanity check; we have already verified the udata's size in the creation
* callback.
*/
- if(udata_size != sizeof(haddr_t))
- return -1;
+ if (udata_size != sizeof(haddr_t))
+ return -1;
- addr = *((const haddr_t *) udata);
+ addr = *((const haddr_t *)udata);
/* Open the object by address. If H5Oopen_by_addr fails, ret_value will
* be negative to indicate that the traversal function failed.
@@ -511,8 +502,6 @@ static hid_t UD_hard_traverse(const char *link_name, hid_t cur_group,
return ret_value;
}
-
-
/* Plist example
*
* Create a new class of user-defined links that open objects within a file
@@ -526,10 +515,11 @@ static hid_t UD_hard_traverse(const char *link_name, hid_t cur_group,
* These are defined after the example below.
* These links have no udata, so they don't need a query function.
*/
-static hid_t UD_plist_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id);
+static hid_t UD_plist_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size,
+ hid_t lapl_id);
-static void plist_link_example(void)
+static void
+plist_link_example(void)
{
hid_t file_id;
hid_t group_id, group2_id;
@@ -558,11 +548,10 @@ static void plist_link_example(void)
NULL /* Query callback */
}};
-
/* First, create a file and two objects within the file for the link to
* point to.
*/
- file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group_id = H5Gcreate2(file_id, "group_1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
group_id = H5Gcreate2(file_id, "group_1/group_2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -570,8 +559,7 @@ static void plist_link_example(void)
/* Register "plist links" and create one. It has no udata at all. */
H5Lregister(UD_plist_class);
- H5Lcreate_ud(file_id, "plist_link", (H5L_type_t)UD_PLIST_CLASS, NULL, 0,
- H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_ud(file_id, "plist_link", (H5L_type_t)UD_PLIST_CLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
/* Create a group access property list to pass in the target for the
* plist link.
@@ -617,17 +605,17 @@ static void plist_link_example(void)
/* UD_plist_traverse
* Open a path passed in through the property list.
*/
-static hid_t UD_plist_traverse(const char *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t lapl_id)
+static hid_t
+UD_plist_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t udata_size, hid_t lapl_id)
{
- char * path;
- hid_t ret_value = -1;
+ char *path;
+ hid_t ret_value = -1;
/* If the link property isn't set or can't be found, traversal fails. */
- if(H5Pexist(lapl_id, PLIST_LINK_PROP) < 0)
+ if (H5Pexist(lapl_id, PLIST_LINK_PROP) < 0)
goto error;
- if(H5Pget(lapl_id, PLIST_LINK_PROP, &path) < 0)
+ if (H5Pget(lapl_id, PLIST_LINK_PROP, &path) < 0)
goto error;
/* Open the object by address. If H5Oopen_by_addr fails, ret_value will
@@ -641,13 +629,11 @@ error:
return -1;
}
-
-
/* Main function
*
* Invokes the example functions.
*/
- int
+int
main(void)
{
printf("Testing basic external links.\n");
@@ -667,5 +653,3 @@ main(void)
return 0;
}
-
-
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 8e89165..59b0422 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,31 +19,29 @@
* in the root group and in the created group.
*/
-
#include "hdf5.h"
-
-#define H5FILE_NAME "group.h5"
-#define RANK 2
+#define H5FILE_NAME "group.h5"
+#define RANK 2
static herr_t file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo,
- void *opdata); /* Link iteration operator function */
+ void *opdata); /* Link iteration operator function */
static herr_t group_info(hid_t loc_id, const char *name, const H5L_info_t *linfo,
- void *opdata); /* Link iteration operator function */
+ void *opdata); /* Link iteration operator function */
int
main(void)
{
- hid_t file;
- hid_t grp;
- hid_t dataset, dataspace;
- hid_t plist;
+ hid_t file;
+ hid_t grp;
+ hid_t dataset, dataspace;
+ hid_t plist;
- herr_t status;
- hsize_t dims[2];
- hsize_t cdims[2];
+ herr_t status;
+ hsize_t dims[2];
+ hsize_t cdims[2];
- int idx_f, idx_g;
+ int idx_f, idx_g;
/*
* Create a file.
@@ -61,16 +59,16 @@ main(void)
* GZIP compression with the compression effort set to 6.
* Note that compression can be used only when dataset is chunked.
*/
- dims[0] = 1000;
- dims[1] = 20;
- cdims[0] = 20;
- cdims[1] = 20;
+ dims[0] = 1000;
+ dims[1] = 20;
+ cdims[0] = 20;
+ cdims[1] = 20;
dataspace = H5Screate_simple(RANK, dims, NULL);
plist = H5Pcreate(H5P_DATASET_CREATE);
- H5Pset_chunk(plist, 2, cdims);
- H5Pset_deflate( plist, 6);
- dataset = H5Dcreate2(file, "/Data/Compressed_Data", H5T_NATIVE_INT,
- dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
+ H5Pset_chunk(plist, 2, cdims);
+ H5Pset_deflate(plist, 6);
+ dataset =
+ H5Dcreate2(file, "/Data/Compressed_Data", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
/*
* Close the first dataset .
*/
@@ -80,11 +78,11 @@ main(void)
/*
* Create the second dataset.
*/
- dims[0] = 500;
- dims[1] = 20;
+ dims[0] = 500;
+ dims[1] = 20;
dataspace = H5Screate_simple(RANK, dims, NULL);
- dataset = H5Dcreate2(file, "/Data/Float_Data", H5T_NATIVE_FLOAT,
- dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(file, "/Data/Float_Data", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT);
/*
*Close the second dataset and file.
@@ -105,7 +103,8 @@ main(void)
* Access "Compressed_Data" dataset in the group.
*/
dataset = H5Dopen2(grp, "Compressed_Data", H5P_DEFAULT);
- if( dataset < 0) printf(" Dataset 'Compressed-Data' is not found. \n");
+ if (dataset < 0)
+ printf(" Dataset 'Compressed-Data' is not found. \n");
printf("\"/Data/Compressed_Data\" dataset is open \n");
/*
@@ -123,7 +122,8 @@ main(void)
* hard link "Data_new".
*/
dataset = H5Dopen2(file, "/Data_new/Compressed_Data", H5P_DEFAULT);
- if( dataset < 0) printf(" Dataset is not found. \n");
+ if (dataset < 0)
+ printf(" Dataset is not found. \n");
printf("\"/Data_new/Compressed_Data\" dataset is open \n");
/*
@@ -131,7 +131,6 @@ main(void)
*/
status = H5Dclose(dataset);
-
/*
* Use iterator to see the names of the objects in the root group.
*/
@@ -141,10 +140,10 @@ main(void)
* Unlink name "Data" and use iterator to see the names
* of the objects in the file root direvtory.
*/
- if(H5Ldelete(file, "Data", H5P_DEFAULT) < 0)
- printf(" H5Ldelete failed \n");
+ if (H5Ldelete(file, "Data", H5P_DEFAULT) < 0)
+ printf(" H5Ldelete failed \n");
else
- printf("\"Data\" is unlinked \n");
+ printf("\"Data\" is unlinked \n");
idx_f = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, NULL, file_info, NULL);
@@ -152,7 +151,8 @@ main(void)
* Use iterator to see the names of the objects in the group
* /Data_new.
*/
- idx_g = H5Literate_by_name(grp, "/Data_new", H5_INDEX_NAME, H5_ITER_INC, NULL, group_info, NULL, H5P_DEFAULT);
+ idx_g =
+ H5Literate_by_name(grp, "/Data_new", H5_INDEX_NAME, H5_ITER_INC, NULL, group_info, NULL, H5P_DEFAULT);
/*
* Close the file.
@@ -173,7 +173,7 @@ file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata)
/* avoid compiler warnings */
loc_id = loc_id;
opdata = opdata;
- linfo = linfo;
+ linfo = linfo;
/*
* Display group name. The name is passed to the function by
@@ -184,23 +184,22 @@ file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata)
return 0;
}
-
/*
* Operator function.
*/
static herr_t
group_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata)
{
- hid_t did; /* dataset identifier */
- hid_t tid; /* datatype identifier */
+ hid_t did; /* dataset identifier */
+ hid_t tid; /* datatype identifier */
H5T_class_t t_class;
- hid_t pid; /* data_property identifier */
- hsize_t chunk_dims_out[2];
- int rank_chunk;
+ hid_t pid; /* data_property identifier */
+ hsize_t chunk_dims_out[2];
+ int rank_chunk;
/* avoid warnings */
opdata = opdata;
- linfo = linfo;
+ linfo = linfo;
/*
* Open the datasets using their names.
@@ -215,38 +214,37 @@ group_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata
/*
* Display dataset information.
*/
- tid = H5Dget_type(did); /* get datatype*/
+ tid = H5Dget_type(did); /* get datatype*/
pid = H5Dget_create_plist(did); /* get creation property list */
/*
* Check if dataset is chunked.
*/
- if(H5D_CHUNKED == H5Pget_layout(pid)) {
+ if (H5D_CHUNKED == H5Pget_layout(pid)) {
/*
* get chunking information: rank and dimensions.
*/
rank_chunk = H5Pget_chunk(pid, 2, chunk_dims_out);
- printf("chunk rank %d, dimensions %lu x %lu\n", rank_chunk,
- (unsigned long)(chunk_dims_out[0]),
- (unsigned long)(chunk_dims_out[1]));
+ printf("chunk rank %d, dimensions %lu x %lu\n", rank_chunk, (unsigned long)(chunk_dims_out[0]),
+ (unsigned long)(chunk_dims_out[1]));
}
else {
t_class = H5Tget_class(tid);
- if(t_class < 0) {
+ if (t_class < 0) {
puts(" Invalid datatype.\n");
}
else {
- if(t_class == H5T_INTEGER)
+ if (t_class == H5T_INTEGER)
puts(" Datatype is 'H5T_NATIVE_INTEGER'.\n");
- if(t_class == H5T_FLOAT)
+ if (t_class == H5T_FLOAT)
puts(" Datatype is 'H5T_NATIVE_FLOAT'.\n");
- if(t_class == H5T_STRING)
+ if (t_class == H5T_STRING)
puts(" Datatype is 'H5T_NATIVE_STRING'.\n");
- if(t_class == H5T_BITFIELD)
+ if (t_class == H5T_BITFIELD)
puts(" Datatype is 'H5T_NATIVE_BITFIELD'.\n");
- if(t_class == H5T_OPAQUE)
+ if (t_class == H5T_OPAQUE)
puts(" Datatype is 'H5T_NATIVE_OPAQUE'.\n");
- if(t_class == H5T_COMPOUND)
+ if (t_class == H5T_COMPOUND)
puts(" Datatype is 'H5T_NATIVE_COMPOUND'.\n");
}
}
@@ -256,4 +254,3 @@ group_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata
H5Tclose(tid);
return 0;
}
-
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index 6507fd1..c2cafa6 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,27 +16,24 @@
* all intermediate groups.
*/
-
#include "hdf5.h"
-
-#define H5FILE_NAME "interm_group.h5"
-#define TRUE 1
-#define FALSE 0
+#define H5FILE_NAME "interm_group.h5"
+#define TRUE 1
+#define FALSE 0
int
main(void)
{
- hid_t file;
- hid_t g1_id, g2_id, g3_id;
- hid_t grp_crt_plist;
+ hid_t file;
+ hid_t g1_id, g2_id, g3_id;
+ hid_t grp_crt_plist;
H5G_info_t g2_info;
- char name[3];
-
- herr_t status;
- int i;
+ char name[3];
+ herr_t status;
+ int i;
/*
* Create a file using the default properties.
@@ -59,53 +56,44 @@ main(void)
/*
* Check if group /G1 exists in the file.
*/
- if(H5Lexists(file, "/G1", H5P_DEFAULT) !=FALSE)
- printf("Group /G1 exists in the file\n");
+ if (H5Lexists(file, "/G1", H5P_DEFAULT) != FALSE)
+ printf("Group /G1 exists in the file\n");
/*
* Check that group G2/G3 exists in /G1 and if not create it using
* intermediate group creation property.
*/
g1_id = H5Gopen2(file, "/G1", H5P_DEFAULT);
-/* Next commented call causes error stack to be printed out; the next one
- * works fine; is it a bug or a feature? EIP 04-25-07
-*/
-/* if (H5Lexists(g1_id, "G2/G3", H5P_DEFAULT) !=TRUE) { */
- if (H5Lexists(g1_id, "G2", H5P_DEFAULT) !=TRUE) {
-
- grp_crt_plist = H5Pcreate(H5P_LINK_CREATE);
-
- /* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(grp_crt_plist, TRUE);
- g3_id = H5Gcreate2(g1_id, "G2/G3", grp_crt_plist, H5P_DEFAULT, H5P_DEFAULT);
- H5Gclose(g3_id);
+ /* Next commented call causes error stack to be printed out; the next one
+ * works fine; is it a bug or a feature? EIP 04-25-07
+ */
+ /* if (H5Lexists(g1_id, "G2/G3", H5P_DEFAULT) !=TRUE) { */
+ if (H5Lexists(g1_id, "G2", H5P_DEFAULT) != TRUE) {
+
+ grp_crt_plist = H5Pcreate(H5P_LINK_CREATE);
+
+ /* Set flag for intermediate group creation */
+ status = H5Pset_create_intermediate_group(grp_crt_plist, TRUE);
+ g3_id = H5Gcreate2(g1_id, "G2/G3", grp_crt_plist, H5P_DEFAULT, H5P_DEFAULT);
+ H5Gclose(g3_id);
}
H5Gclose(g1_id);
-
/* Now check if group /G1/G2 exists in the file, then open it and print
* its members names
*/
if (H5Lexists(file, "/G1/G2", H5P_DEFAULT)) {
- g2_id = H5Gopen2(file, "/G1/G2", H5P_DEFAULT);
- status = H5Gget_info(g2_id, &g2_info);
- printf("Group /G1/G2 has %d member(s)\n", (int)g2_info.nlinks);
+ g2_id = H5Gopen2(file, "/G1/G2", H5P_DEFAULT);
+ status = H5Gget_info(g2_id, &g2_info);
+ printf("Group /G1/G2 has %d member(s)\n", (int)g2_info.nlinks);
- for (i=0; i < (int)g2_info.nlinks; i++) {
- H5Lget_name_by_idx(g2_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)i,
- name, 3, H5P_DEFAULT);
- printf("Object's name is %s\n", name);
-
- }
- H5Gclose(g2_id);
+ for (i = 0; i < (int)g2_info.nlinks; i++) {
+ H5Lget_name_by_idx(g2_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)i, name, 3, H5P_DEFAULT);
+ printf("Object's name is %s\n", name);
+ }
+ H5Gclose(g2_id);
}
H5Fclose(file);
return 0;
}
-
-
-
-
-
-
diff --git a/examples/h5_mount.c b/examples/h5_mount.c
index a2e16c5..e984d5b 100644
--- a/examples/h5_mount.c
+++ b/examples/h5_mount.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,107 +25,105 @@
#define FILE2 "mount2.h5"
#define RANK 2
-#define NX 4
-#define NY 5
+#define NX 4
+#define NY 5
-int main(void)
+int
+main(void)
{
- hid_t fid1, fid2, gid; /* Files and group identifiers */
- hid_t did, tid, sid; /* Dataset and datatype identifiers */
-
- herr_t status;
- hsize_t dims[] = {NX,NY}; /* Dataset dimensions */
-
- int i, j;
- int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */
-
- /*
- * Initialization of buffer matrix "bm"
- */
- for(i =0; i < NX; i++)
- for(j = 0; j < NY; j++)
- bm[i][j] = i + j;
-
- /*
- * Create first file and a group in it.
- */
- fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- gid = H5Gcreate2(fid1, "/G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Close group and file
- */
- H5Gclose(gid);
- H5Fclose(fid1);
-
- /*
- * Create second file and dataset "D" in it.
- */
- fid2 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- dims[0] = NX;
- dims[1] = NY;
- sid = H5Screate_simple(RANK, dims, NULL);
- did = H5Dcreate2(fid2, "D", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Write data to the dataset.
- */
- status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, bm);
-
- /*
- * Close all identifiers.
- */
- H5Sclose(sid);
- H5Dclose(did);
- H5Fclose(fid2);
-
- /*
- * Reopen both files
- */
- fid1 = H5Fopen(FILE1, H5F_ACC_RDONLY, H5P_DEFAULT);
- fid2 = H5Fopen(FILE2, H5F_ACC_RDONLY, H5P_DEFAULT);
-
- /*
- * Mount second file under G in the first file.
- */
- H5Fmount(fid1, "/G", fid2, H5P_DEFAULT);
-
- /*
- * Access dataset D in the first file under /G/D name.
- */
- did = H5Dopen2(fid1, "/G/D", H5P_DEFAULT);
- tid = H5Dget_type(did);
- status = H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, bm_out);
-
- /*
- * Print out the data.
- */
- for(i=0; i<NX; i++){
- for(j=0; j<NY; j++)
- printf(" %d", bm_out[i][j]);
- printf("\n");
- }
-
- /*
- * Close all identifers
- */
- H5Tclose(tid);
- H5Dclose(did);
-
- /*
- * Unmounting second file
- */
- H5Funmount(fid1, "/G");
-
- /*
- * Close both files
- */
- H5Fclose(fid1);
- H5Fclose(fid2);
-
- return 0;
+ hid_t fid1, fid2, gid; /* Files and group identifiers */
+ hid_t did, tid, sid; /* Dataset and datatype identifiers */
+
+ herr_t status;
+ hsize_t dims[] = {NX, NY}; /* Dataset dimensions */
+
+ int i, j;
+ int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */
+
+ /*
+ * Initialization of buffer matrix "bm"
+ */
+ for (i = 0; i < NX; i++)
+ for (j = 0; j < NY; j++)
+ bm[i][j] = i + j;
+
+ /*
+ * Create first file and a group in it.
+ */
+ fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ gid = H5Gcreate2(fid1, "/G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Close group and file
+ */
+ H5Gclose(gid);
+ H5Fclose(fid1);
+
+ /*
+ * Create second file and dataset "D" in it.
+ */
+ fid2 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ dims[0] = NX;
+ dims[1] = NY;
+ sid = H5Screate_simple(RANK, dims, NULL);
+ did = H5Dcreate2(fid2, "D", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Write data to the dataset.
+ */
+ status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, bm);
+
+ /*
+ * Close all identifiers.
+ */
+ H5Sclose(sid);
+ H5Dclose(did);
+ H5Fclose(fid2);
+
+ /*
+ * Reopen both files
+ */
+ fid1 = H5Fopen(FILE1, H5F_ACC_RDONLY, H5P_DEFAULT);
+ fid2 = H5Fopen(FILE2, H5F_ACC_RDONLY, H5P_DEFAULT);
+
+ /*
+ * Mount second file under G in the first file.
+ */
+ H5Fmount(fid1, "/G", fid2, H5P_DEFAULT);
+
+ /*
+ * Access dataset D in the first file under /G/D name.
+ */
+ did = H5Dopen2(fid1, "/G/D", H5P_DEFAULT);
+ tid = H5Dget_type(did);
+ status = H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, bm_out);
+
+ /*
+ * Print out the data.
+ */
+ for (i = 0; i < NX; i++) {
+ for (j = 0; j < NY; j++)
+ printf(" %d", bm_out[i][j]);
+ printf("\n");
+ }
+
+ /*
+ * Close all identifers
+ */
+ H5Tclose(tid);
+ H5Dclose(did);
+
+ /*
+ * Unmounting second file
+ */
+ H5Funmount(fid1, "/G");
+
+ /*
+ * Close both files
+ */
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+
+ return 0;
}
-
-
-
diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c
index 6cd7f0f..ba5ddae 100644
--- a/examples/h5_rdwt.c
+++ b/examples/h5_rdwt.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
+/*
* This example illustrates how to write and read data in an existing
* dataset. It is used in the HDF5 Tutorial.
*/
@@ -19,33 +19,33 @@
#include "hdf5.h"
#define FILE "dset.h5"
-int main() {
+int
+main()
+{
- hid_t file_id, dataset_id; /* identifiers */
- herr_t status;
- int i, j, dset_data[4][6];
+ hid_t file_id, dataset_id; /* identifiers */
+ herr_t status;
+ int i, j, dset_data[4][6];
- /* Initialize the dataset. */
- for (i = 0; i < 4; i++)
- for (j = 0; j < 6; j++)
- dset_data[i][j] = i * 6 + j + 1;
+ /* Initialize the dataset. */
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 6; j++)
+ dset_data[i][j] = i * 6 + j + 1;
- /* Open an existing file. */
- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- /* Open an existing dataset. */
- dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
- /* Write the dataset. */
- status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset_data);
+ /* Write the dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
- status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- dset_data);
+ status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
- /* Close the dataset. */
- status = H5Dclose(dataset_id);
+ /* Close the dataset. */
+ status = H5Dclose(dataset_id);
- /* Close the file. */
- status = H5Fclose(file_id);
+ /* Close the file. */
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_read.c b/examples/h5_read.c
index 7fd8ad4..afd3b14 100644
--- a/examples/h5_read.c
+++ b/examples/h5_read.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,71 +20,73 @@
#include "hdf5.h"
-#define H5FILE_NAME "SDS.h5"
+#define H5FILE_NAME "SDS.h5"
#define DATASETNAME "IntArray"
-#define NX_SUB 3 /* hyperslab dimensions */
-#define NY_SUB 4
-#define NX 7 /* output buffer dimensions */
-#define NY 7
-#define NZ 3
-#define RANK 2
-#define RANK_OUT 3
+#define NX_SUB 3 /* hyperslab dimensions */
+#define NY_SUB 4
+#define NX 7 /* output buffer dimensions */
+#define NY 7
+#define NZ 3
+#define RANK 2
+#define RANK_OUT 3
int
-main (void)
+main(void)
{
- hid_t file, dataset; /* handles */
+ hid_t file, dataset; /* handles */
hid_t datatype, dataspace;
hid_t memspace;
- H5T_class_t t_class; /* data type class */
- H5T_order_t order; /* data order */
- size_t size; /*
- * size of the data element
- * stored in file
- */
- hsize_t dimsm[3]; /* memory space dimensions */
- hsize_t dims_out[2]; /* dataset dimensions */
- herr_t status;
-
- int data_out[NX][NY][NZ ]; /* output buffer */
-
- hsize_t count[2]; /* size of the hyperslab in the file */
- hsize_t offset[2]; /* hyperslab offset in the file */
- hsize_t count_out[3]; /* size of the hyperslab in memory */
- hsize_t offset_out[3]; /* hyperslab offset in memory */
- int i, j, k, status_n, rank;
+ H5T_class_t t_class; /* data type class */
+ H5T_order_t order; /* data order */
+ size_t size; /*
+ * size of the data element
+ * stored in file
+ */
+ hsize_t dimsm[3]; /* memory space dimensions */
+ hsize_t dims_out[2]; /* dataset dimensions */
+ herr_t status;
+
+ int data_out[NX][NY][NZ]; /* output buffer */
+
+ hsize_t count[2]; /* size of the hyperslab in the file */
+ hsize_t offset[2]; /* hyperslab offset in the file */
+ hsize_t count_out[3]; /* size of the hyperslab in memory */
+ hsize_t offset_out[3]; /* hyperslab offset in memory */
+ int i, j, k, status_n, rank;
for (j = 0; j < NX; j++) {
- for (i = 0; i < NY; i++) {
- for (k = 0; k < NZ ; k++)
- data_out[j][i][k] = 0;
- }
+ for (i = 0; i < NY; i++) {
+ for (k = 0; k < NZ; k++)
+ data_out[j][i][k] = 0;
+ }
}
/*
* Open the file and the dataset.
*/
- file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen2(file, DATASETNAME, H5P_DEFAULT);
/*
* Get datatype and dataspace handles and then query
* dataset class, order, size, rank and dimensions.
*/
- datatype = H5Dget_type(dataset); /* datatype handle */
- t_class = H5Tget_class(datatype);
- if (t_class == H5T_INTEGER) printf("Data set has INTEGER type \n");
- order = H5Tget_order(datatype);
- if (order == H5T_ORDER_LE) printf("Little endian order \n");
-
- size = H5Tget_size(datatype);
+ datatype = H5Dget_type(dataset); /* datatype handle */
+ t_class = H5Tget_class(datatype);
+ if (t_class == H5T_INTEGER)
+ printf("Data set has INTEGER type \n");
+ order = H5Tget_order(datatype);
+ if (order == H5T_ORDER_LE)
+ printf("Little endian order \n");
+
+ size = H5Tget_size(datatype);
printf(" Data size is %d \n", (int)size);
- dataspace = H5Dget_space(dataset); /* dataspace handle */
+ dataspace = H5Dget_space(dataset); /* dataspace handle */
rank = H5Sget_simple_extent_ndims(dataspace);
status_n = H5Sget_simple_extent_dims(dataspace, dims_out, NULL);
- printf("rank %d, dimensions %lu x %lu \n", rank,
- (unsigned long)(dims_out[0]), (unsigned long)(dims_out[1]));
+ printf("rank %d, dimensions %lu x %lu \n", rank, (unsigned long)(dims_out[0]),
+ (unsigned long)(dims_out[1]));
/*
* Define hyperslab in the dataset.
@@ -93,16 +95,15 @@ main (void)
offset[1] = 2;
count[0] = NX_SUB;
count[1] = NY_SUB;
- status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL,
- count, NULL);
+ status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL, count, NULL);
/*
* Define the memory dataspace.
*/
dimsm[0] = NX;
dimsm[1] = NY;
- dimsm[2] = NZ ;
- memspace = H5Screate_simple(RANK_OUT,dimsm,NULL);
+ dimsm[2] = NZ;
+ memspace = H5Screate_simple(RANK_OUT, dimsm, NULL);
/*
* Define memory hyperslab.
@@ -113,18 +114,17 @@ main (void)
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = 1;
- status = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL,
- count_out, NULL);
+ status = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL, count_out, NULL);
/*
* Read data from hyperslab in the file into the hyperslab in
* memory and display.
*/
- status = H5Dread(dataset, H5T_NATIVE_INT, memspace, dataspace,
- H5P_DEFAULT, data_out);
+ status = H5Dread(dataset, H5T_NATIVE_INT, memspace, dataspace, H5P_DEFAULT, data_out);
for (j = 0; j < NX; j++) {
- for (i = 0; i < NY; i++) printf("%d ", data_out[j][i][0]);
- printf("\n");
+ for (i = 0; i < NY; i++)
+ printf("%d ", data_out[j][i][0]);
+ printf("\n");
}
/*
* 0 0 0 0 0 0 0
diff --git a/examples/h5_ref2reg.c b/examples/h5_ref2reg.c
index d045db1..6e635b6 100644
--- a/examples/h5_ref2reg.c
+++ b/examples/h5_ref2reg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,33 +26,34 @@
#include "hdf5.h"
-#define filename "REF_REG.h5"
+#define filename "REF_REG.h5"
#define dsetnamev "MATRIX"
#define dsetnamer "REGION_REFERENCES"
-int main(void)
+int
+main(void)
{
- hid_t file_id; /* file identifier */
- hid_t space_id; /* dataspace identifiers */
- hid_t spacer_id;
- hid_t dsetv_id; /*dataset identifiers*/
- hid_t dsetr_id;
- hsize_t dims[2] = {2,9};
- hsize_t dimsr[1] = {2};
- int rank = 2;
- int rankr =1;
- herr_t status;
+ hid_t file_id; /* file identifier */
+ hid_t space_id; /* dataspace identifiers */
+ hid_t spacer_id;
+ hid_t dsetv_id; /*dataset identifiers*/
+ hid_t dsetr_id;
+ hsize_t dims[2] = {2, 9};
+ hsize_t dimsr[1] = {2};
+ int rank = 2;
+ int rankr = 1;
+ herr_t status;
hdset_reg_ref_t ref[2];
hdset_reg_ref_t ref_out[2];
- int data[2][9] = {{1,1,2,3,3,4,5,5,6},{1,2,2,3,4,4,5,6,6}};
- int data_out[2][9] = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0}};
- hsize_t start[2];
- hsize_t count[2];
- hsize_t coord[2][3] = {{0, 0, 1}, {6, 0, 8}};
- unsigned num_points = 3;
- int i, j;
- size_t name_size1, name_size2;
- char buf1[10], buf2[10];
+ int data[2][9] = {{1, 1, 2, 3, 3, 4, 5, 5, 6}, {1, 2, 2, 3, 4, 4, 5, 6, 6}};
+ int data_out[2][9] = {{0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}};
+ hsize_t start[2];
+ hsize_t count[2];
+ hsize_t coord[2][3] = {{0, 0, 1}, {6, 0, 8}};
+ unsigned num_points = 3;
+ int i, j;
+ size_t name_size1, name_size2;
+ char buf1[10], buf2[10];
/*
* Create file with default file access and file creation properties.
@@ -62,24 +63,26 @@ int main(void)
/*
* Create dataspace for datasets.
*/
- space_id = H5Screate_simple(rank, dims, NULL);
+ space_id = H5Screate_simple(rank, dims, NULL);
spacer_id = H5Screate_simple(rankr, dimsr, NULL);
/*
* Create integer dataset.
*/
- dsetv_id = H5Dcreate2(file_id, dsetnamev, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dsetv_id =
+ H5Dcreate2(file_id, dsetnamev, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write data to the dataset.
*/
- status = H5Dwrite(dsetv_id, H5T_NATIVE_INT, H5S_ALL , H5S_ALL, H5P_DEFAULT,data);
+ status = H5Dwrite(dsetv_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
status = H5Dclose(dsetv_id);
/*
* Dataset with references.
*/
- dsetr_id = H5Dcreate2(file_id, dsetnamer, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dsetr_id =
+ H5Dcreate2(file_id, dsetnamer, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create a reference to the hyperslab.
@@ -88,8 +91,8 @@ int main(void)
start[1] = 3;
count[0] = 2;
count[1] = 3;
- status = H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL);
- status = H5Rcreate(&ref[0], file_id, dsetnamev, H5R_DATASET_REGION, space_id);
+ status = H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL);
+ status = H5Rcreate(&ref[0], file_id, dsetnamev, H5R_DATASET_REGION, space_id);
/*
* Create a reference to elements selection.
@@ -101,7 +104,7 @@ int main(void)
/*
* Write dataset with the references.
*/
- status = H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT,ref);
+ status = H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref);
/*
* Close all objects.
@@ -114,7 +117,7 @@ int main(void)
/*
* Reopen the file to read selections back.
*/
- file_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+ file_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
/*
* Reopen the dataset with object references and read references
@@ -122,8 +125,7 @@ int main(void)
*/
dsetr_id = H5Dopen2(file_id, dsetnamer, H5P_DEFAULT);
- status = H5Dread(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, ref_out);
+ status = H5Dread(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_out);
/*
* Dereference the first reference.
@@ -133,26 +135,26 @@ int main(void)
* Get name of the dataset the first region reference points to
* using H5Rget_name
*/
- name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, 10);
- printf(" Dataset's name (returned by H5Rget_name) the reference points to is %s, name length is %d\n", buf1, (int)name_size1);
+ name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char *)buf1, 10);
+ printf(" Dataset's name (returned by H5Rget_name) the reference points to is %s, name length is %d\n",
+ buf1, (int)name_size1);
/*
* Get name of the dataset the first region reference points to
* using H5Iget_name
*/
- name_size2 = H5Iget_name(dsetv_id, (char*)buf2, 10);
- printf(" Dataset's name (returned by H5Iget_name) the reference points to is %s, name length is %d\n", buf2, (int)name_size2);
+ name_size2 = H5Iget_name(dsetv_id, (char *)buf2, 10);
+ printf(" Dataset's name (returned by H5Iget_name) the reference points to is %s, name length is %d\n",
+ buf2, (int)name_size2);
- space_id = H5Rget_region(dsetr_id, H5R_DATASET_REGION,&ref_out[0]);
+ space_id = H5Rget_region(dsetr_id, H5R_DATASET_REGION, &ref_out[0]);
/*
* Read and display hyperslab selection from the dataset.
*/
- status = H5Dread(dsetv_id, H5T_NATIVE_INT, H5S_ALL, space_id,
- H5P_DEFAULT, data_out);
+ status = H5Dread(dsetv_id, H5T_NATIVE_INT, H5S_ALL, space_id, H5P_DEFAULT, data_out);
printf("Selected hyperslab: ");
- for (i = 0; i <= 1; i++)
- {
+ for (i = 0; i <= 1; i++) {
printf("\n");
for (j = 0; j <= 8; j++)
printf("%d ", data_out[i][j]);
@@ -176,17 +178,15 @@ int main(void)
* Dereference the second reference.
*/
dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[1]);
- space_id = H5Rget_region(dsetv_id, H5R_DATASET_REGION,&ref_out[1]);
+ space_id = H5Rget_region(dsetv_id, H5R_DATASET_REGION, &ref_out[1]);
/*
* Read selected data from the dataset.
*/
- status = H5Dread(dsetv_id, H5T_NATIVE_INT, H5S_ALL, space_id,
- H5P_DEFAULT, data_out);
+ status = H5Dread(dsetv_id, H5T_NATIVE_INT, H5S_ALL, space_id, H5P_DEFAULT, data_out);
printf("Selected points: ");
- for (i = 0; i <= 1; i++)
- {
+ for (i = 0; i <= 1; i++) {
printf("\n");
for (j = 0; j <= 8; j++)
printf("%d ", data_out[i][j]);
@@ -203,6 +203,3 @@ int main(void)
return 0;
}
-
-
-
diff --git a/examples/h5_reference.c b/examples/h5_reference.c
index c73ce89..72cc8a3 100644
--- a/examples/h5_reference.c
+++ b/examples/h5_reference.c
@@ -6,20 +6,20 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- /*
- * This program illustrates how references to objects can be used.
- * Program creates a dataset and a group in a file. It also creates
- * second dataset, and references to the first dataset and the group
- * are stored in it.
- * Program reopens the file and reads dataset with the references.
- * References are used to open the objects. Information about the
- * objects is displayed.
- */
+/*
+ * This program illustrates how references to objects can be used.
+ * Program creates a dataset and a group in a file. It also creates
+ * second dataset, and references to the first dataset and the group
+ * are stored in it.
+ * Program reopens the file and reads dataset with the references.
+ * References are used to open the objects. Information about the
+ * objects is displayed.
+ */
#include <stdlib.h>
@@ -28,120 +28,119 @@
#define H5FILE_NAME "refere.h5"
int
-main(void) {
- hid_t fid; /* File, group, datasets, datatypes */
- hid_t gid_a; /* and dataspaces identifiers */
- hid_t did_b, sid_b, tid_b;
- hid_t did_r, tid_r, sid_r;
- H5O_type_t obj_type;
- herr_t status;
-
- hobj_ref_t *wbuf; /* buffer to write to disk */
- hobj_ref_t *rbuf; /* buffer to read from disk */
-
-
- hsize_t dim_r[1];
- hsize_t dim_b[2];
-
- /*
- * Create a file using default properties.
- */
- fid = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create group "A" in the file.
- */
- gid_a = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create dataset "B" in the file.
- */
- dim_b[0] = 2;
- dim_b[1] = 6;
- sid_b = H5Screate_simple(2, dim_b, NULL);
- did_b = H5Dcreate2(fid, "B", H5T_NATIVE_FLOAT, sid_b, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create dataset "R" to store references to the objects "A" and "B".
- */
- dim_r[0] = 2;
- sid_r = H5Screate_simple(1, dim_r, NULL);
- tid_r = H5Tcopy(H5T_STD_REF_OBJ);
- did_r = H5Dcreate2(fid, "R", tid_r, sid_r, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Allocate write and read buffers.
- */
- wbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * 2);
- rbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * 2);
-
- /*
- * Create references to the group "A" and dataset "B"
- * and store them in the wbuf.
- */
- H5Rcreate(&wbuf[0], fid, "A", H5R_OBJECT, (hid_t)-1);
- H5Rcreate(&wbuf[1], fid, "B", H5R_OBJECT, (hid_t)-1);
-
- /*
- * Write dataset R using default transfer properties.
- */
- status = H5Dwrite(did_r, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
-
- /*
- * Close all objects.
- */
- H5Gclose(gid_a);
-
- H5Sclose(sid_b);
- H5Dclose(did_b);
-
- H5Tclose(tid_r);
- H5Sclose(sid_r);
- H5Dclose(did_r);
-
- H5Fclose(fid);
-
- /*
- * Reopen the file.
- */
- fid = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
-
- /*
- * Open and read dataset "R".
- */
- did_r = H5Dopen2(fid, "R", H5P_DEFAULT);
- status = H5Dread(did_r, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
-
- /*
- * Find the type of referenced objects.
- */
+main(void)
+{
+ hid_t fid; /* File, group, datasets, datatypes */
+ hid_t gid_a; /* and dataspaces identifiers */
+ hid_t did_b, sid_b, tid_b;
+ hid_t did_r, tid_r, sid_r;
+ H5O_type_t obj_type;
+ herr_t status;
+
+ hobj_ref_t *wbuf; /* buffer to write to disk */
+ hobj_ref_t *rbuf; /* buffer to read from disk */
+
+ hsize_t dim_r[1];
+ hsize_t dim_b[2];
+
+ /*
+ * Create a file using default properties.
+ */
+ fid = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create group "A" in the file.
+ */
+ gid_a = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create dataset "B" in the file.
+ */
+ dim_b[0] = 2;
+ dim_b[1] = 6;
+ sid_b = H5Screate_simple(2, dim_b, NULL);
+ did_b = H5Dcreate2(fid, "B", H5T_NATIVE_FLOAT, sid_b, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create dataset "R" to store references to the objects "A" and "B".
+ */
+ dim_r[0] = 2;
+ sid_r = H5Screate_simple(1, dim_r, NULL);
+ tid_r = H5Tcopy(H5T_STD_REF_OBJ);
+ did_r = H5Dcreate2(fid, "R", tid_r, sid_r, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Allocate write and read buffers.
+ */
+ wbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * 2);
+ rbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * 2);
+
+ /*
+ * Create references to the group "A" and dataset "B"
+ * and store them in the wbuf.
+ */
+ H5Rcreate(&wbuf[0], fid, "A", H5R_OBJECT, (hid_t)-1);
+ H5Rcreate(&wbuf[1], fid, "B", H5R_OBJECT, (hid_t)-1);
+
+ /*
+ * Write dataset R using default transfer properties.
+ */
+ status = H5Dwrite(did_r, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
+
+ /*
+ * Close all objects.
+ */
+ H5Gclose(gid_a);
+
+ H5Sclose(sid_b);
+ H5Dclose(did_b);
+
+ H5Tclose(tid_r);
+ H5Sclose(sid_r);
+ H5Dclose(did_r);
+
+ H5Fclose(fid);
+
+ /*
+ * Reopen the file.
+ */
+ fid = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /*
+ * Open and read dataset "R".
+ */
+ did_r = H5Dopen2(fid, "R", H5P_DEFAULT);
+ status = H5Dread(did_r, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
+
+ /*
+ * Find the type of referenced objects.
+ */
status = H5Rget_obj_type2(did_r, H5R_OBJECT, &rbuf[0], &obj_type);
- if(obj_type == H5O_TYPE_GROUP)
+ if (obj_type == H5O_TYPE_GROUP)
printf("First dereferenced object is a group. \n");
status = H5Rget_obj_type2(did_r, H5R_OBJECT, &rbuf[1], &obj_type);
- if(obj_type == H5O_TYPE_DATASET)
+ if (obj_type == H5O_TYPE_DATASET)
printf("Second dereferenced object is a dataset. \n");
- /*
- * Get datatype of the dataset "B"
- */
- did_b = H5Rdereference(did_r, H5R_OBJECT, &rbuf[1]);
- tid_b = H5Dget_type(did_b);
- if(H5Tequal(tid_b, H5T_NATIVE_FLOAT))
- printf("Datatype of the dataset is H5T_NATIVE_FLOAT.\n");
- printf("\n");
-
- /*
- * Close all objects and free memory buffers.
- */
- H5Dclose(did_r);
- H5Dclose(did_b);
- H5Tclose(tid_b);
- H5Fclose(fid);
- free(rbuf);
- free(wbuf);
-
- return 0;
- }
-
+ /*
+ * Get datatype of the dataset "B"
+ */
+ did_b = H5Rdereference(did_r, H5R_OBJECT, &rbuf[1]);
+ tid_b = H5Dget_type(did_b);
+ if (H5Tequal(tid_b, H5T_NATIVE_FLOAT))
+ printf("Datatype of the dataset is H5T_NATIVE_FLOAT.\n");
+ printf("\n");
+
+ /*
+ * Close all objects and free memory buffers.
+ */
+ H5Dclose(did_r);
+ H5Dclose(did_b);
+ H5Tclose(tid_b);
+ H5Fclose(fid);
+ free(rbuf);
+ free(wbuf);
+
+ return 0;
+}
diff --git a/examples/h5_select.c b/examples/h5_select.c
index bbc877c..e8aeb50 100644
--- a/examples/h5_select.c
+++ b/examples/h5_select.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,78 +26,80 @@
#define H5FILE_NAME "Select.h5"
-#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
-#define MSPACE1_DIM 50 /* Dataset size in memory */
+#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
+#define MSPACE1_DIM 50 /* Dataset size in memory */
-#define MSPACE2_RANK 1 /* Rank of the second dataset in memory */
-#define MSPACE2_DIM 4 /* Dataset size in memory */
+#define MSPACE2_RANK 1 /* Rank of the second dataset in memory */
+#define MSPACE2_DIM 4 /* Dataset size in memory */
-#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
-#define FSPACE_DIM1 8 /* Dimension sizes of the dataset as it is
- stored in the file */
-#define FSPACE_DIM2 12
+#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
+#define FSPACE_DIM1 \
+ 8 /* Dimension sizes of the dataset as it is \
+ stored in the file */
+#define FSPACE_DIM2 12
- /* We will read dataset back from the file
- to the dataset in memory with these
- dataspace parameters. */
-#define MSPACE_RANK 2
-#define MSPACE_DIM1 8
-#define MSPACE_DIM2 9
+/* We will read dataset back from the file
+ to the dataset in memory with these
+ dataspace parameters. */
+#define MSPACE_RANK 2
+#define MSPACE_DIM1 8
+#define MSPACE_DIM2 9
-#define NPOINTS 4 /* Number of points that will be selected
- and overwritten */
+#define NPOINTS \
+ 4 /* Number of points that will be selected \
+ and overwritten */
int
-main (void)
+main(void)
{
- hid_t file, dataset; /* File and dataset identifiers */
- hid_t mid1, mid2, mid, fid; /* Dataspace identifiers */
- hid_t plist; /* Dataset property list identifier */
+ hid_t file, dataset; /* File and dataset identifiers */
+ hid_t mid1, mid2, mid, fid; /* Dataspace identifiers */
+ hid_t plist; /* Dataset property list identifier */
- hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
+ hsize_t dim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
(in memory) */
- hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
+ hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset
(in memory */
- hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2};
- /* Dimension sizes of the dataset (on disk) */
- hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
- dataset in memory when we
- read selection from the
- dataset on the disk */
-
- hsize_t start[2]; /* Start of hyperslab */
- hsize_t stride[2]; /* Stride of hyperslab */
- hsize_t count[2]; /* Block count */
- hsize_t block[2]; /* Block sizes */
-
- hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
- from the file dataspace */
- herr_t ret;
- unsigned i,j;
- int fillvalue = 0; /* Fill value for the dataset */
-
- int matrix_out[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
- dataset */
- int vector[MSPACE1_DIM];
- int values[] = {53, 59, 61, 67}; /* New values to be written */
-
- /*
- * Buffers' initialization.
- */
- vector[0] = vector[MSPACE1_DIM - 1] = -1;
- for(i = 1; i < MSPACE1_DIM - 1; i++)
- vector[i] = i;
-
- /*
- * Create a file.
- */
- file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create property list for a dataset and set up fill values.
- */
- plist = H5Pcreate(H5P_DATASET_CREATE);
- ret = H5Pset_fill_value(plist, H5T_NATIVE_INT, &fillvalue);
+ hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2};
+ /* Dimension sizes of the dataset (on disk) */
+ hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
+ dataset in memory when we
+ read selection from the
+ dataset on the disk */
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
+ from the file dataspace */
+ herr_t ret;
+ unsigned i, j;
+ int fillvalue = 0; /* Fill value for the dataset */
+
+ int matrix_out[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
+ dataset */
+ int vector[MSPACE1_DIM];
+ int values[] = {53, 59, 61, 67}; /* New values to be written */
+
+ /*
+ * Buffers' initialization.
+ */
+ vector[0] = vector[MSPACE1_DIM - 1] = -1;
+ for (i = 1; i < MSPACE1_DIM - 1; i++)
+ vector[i] = i;
+
+ /*
+ * Create a file.
+ */
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create property list for a dataset and set up fill values.
+ */
+ plist = H5Pcreate(H5P_DATASET_CREATE);
+ ret = H5Pset_fill_value(plist, H5T_NATIVE_INT, &fillvalue);
/*
* Create dataspace for the dataset in the file.
@@ -114,11 +116,15 @@ main (void)
* Select hyperslab for the dataset in the file, using 3x2 blocks,
* (4,3) stride and (2,4) count starting at the position (0,1).
*/
- start[0] = 0; start[1] = 1;
- stride[0] = 4; stride[1] = 3;
- count[0] = 2; count[1] = 4;
- block[0] = 3; block[1] = 2;
- ret = H5Sselect_hyperslab(fid, H5S_SELECT_SET, start, stride, count, block);
+ start[0] = 0;
+ start[1] = 1;
+ stride[0] = 4;
+ stride[1] = 3;
+ count[0] = 2;
+ count[1] = 4;
+ block[0] = 3;
+ block[1] = 2;
+ ret = H5Sselect_hyperslab(fid, H5S_SELECT_SET, start, stride, count, block);
/*
* Create dataspace for the first dataset.
@@ -134,7 +140,7 @@ main (void)
stride[0] = 1;
count[0] = 48;
block[0] = 1;
- ret = H5Sselect_hyperslab(mid1, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(mid1, H5S_SELECT_SET, start, stride, count, block);
/*
* Write selection from the vector buffer to the dataset in the file.
@@ -149,7 +155,7 @@ main (void)
* 0 41 42 0 43 44 0 45 46 0 47 48
* 0 0 0 0 0 0 0 0 0 0 0 0
*/
- ret = H5Dwrite(dataset, H5T_NATIVE_INT, mid1, fid, H5P_DEFAULT, vector);
+ ret = H5Dwrite(dataset, H5T_NATIVE_INT, mid1, fid, H5P_DEFAULT, vector);
/*
* Reset the selection for the file dataspace fid.
@@ -164,10 +170,14 @@ main (void)
/*
* Select sequence of NPOINTS points in the file dataspace.
*/
- coord[0][0] = 0; coord[0][1] = 0;
- coord[1][0] = 3; coord[1][1] = 3;
- coord[2][0] = 3; coord[2][1] = 5;
- coord[3][0] = 5; coord[3][1] = 6;
+ coord[0][0] = 0;
+ coord[0][1] = 0;
+ coord[1][0] = 3;
+ coord[1][1] = 3;
+ coord[2][0] = 3;
+ coord[2][1] = 5;
+ coord[3][0] = 5;
+ coord[3][1] = 6;
ret = H5Sselect_elements(fid, H5S_SELECT_SET, NPOINTS, (const hsize_t *)coord);
@@ -229,11 +239,15 @@ main (void)
* 0 59 0 61
*
*/
- start[0] = 1; start[1] = 2;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 3; count[1] = 4;
- ret = H5Sselect_hyperslab(fid, H5S_SELECT_SET, start, stride, count, block);
+ start[0] = 1;
+ start[1] = 2;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 3;
+ count[1] = 4;
+ ret = H5Sselect_hyperslab(fid, H5S_SELECT_SET, start, stride, count, block);
/*
* Add second selected hyperslab to the selection.
@@ -248,11 +262,15 @@ main (void)
* 19 20
* 0 61
*/
- start[0] = 2; start[1] = 4;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 6; count[1] = 5;
- ret = H5Sselect_hyperslab(fid, H5S_SELECT_OR, start, stride, count, block);
+ start[0] = 2;
+ start[1] = 4;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 6;
+ count[1] = 5;
+ ret = H5Sselect_hyperslab(fid, H5S_SELECT_OR, start, stride, count, block);
/*
* Create memory dataspace.
@@ -263,30 +281,37 @@ main (void)
* Select two hyperslabs in memory. Hyperslabs has the same
* size and shape as the selected hyperslabs for the file dataspace.
*/
- start[0] = 0; start[1] = 0;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 3; count[1] = 4;
- ret = H5Sselect_hyperslab(mid, H5S_SELECT_SET, start, stride, count, block);
-
- start[0] = 1; start[1] = 2;
- block[0] = 1; block[1] = 1;
- stride[0] = 1; stride[1] = 1;
- count[0] = 6; count[1] = 5;
- ret = H5Sselect_hyperslab(mid, H5S_SELECT_OR, start, stride, count, block);
+ start[0] = 0;
+ start[1] = 0;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 3;
+ count[1] = 4;
+ ret = H5Sselect_hyperslab(mid, H5S_SELECT_SET, start, stride, count, block);
+
+ start[0] = 1;
+ start[1] = 2;
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 6;
+ count[1] = 5;
+ ret = H5Sselect_hyperslab(mid, H5S_SELECT_OR, start, stride, count, block);
/*
* Initialize data buffer.
*/
for (i = 0; i < MSPACE_DIM1; i++) {
- for (j = 0; j < MSPACE_DIM2; j++)
+ for (j = 0; j < MSPACE_DIM2; j++)
matrix_out[i][j] = 0;
}
/*
* Read data back to the buffer matrix_out.
*/
- ret = H5Dread(dataset, H5T_NATIVE_INT, mid, fid,
- H5P_DEFAULT, matrix_out);
+ ret = H5Dread(dataset, H5T_NATIVE_INT, mid, fid, H5P_DEFAULT, matrix_out);
/*
* Display the result. Memory dataset is:
@@ -300,8 +325,8 @@ main (void)
* 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 0 0
*/
- for(i = 0; i < MSPACE_DIM1; i++) {
- for(j = 0; j < MSPACE_DIM2; j++)
+ for (i = 0; i < MSPACE_DIM1; i++) {
+ for (j = 0; j < MSPACE_DIM2; j++)
printf("%3d ", matrix_out[i][j]);
printf("\n");
}
@@ -329,4 +354,3 @@ main (void)
return 0;
}
-
diff --git a/examples/h5_shared_mesg.c b/examples/h5_shared_mesg.c
index 4e1f92a..0f623b9 100644
--- a/examples/h5_shared_mesg.c
+++ b/examples/h5_shared_mesg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,29 +27,13 @@
#include "hdf5.h"
#define NUM_DATASETS 40
-const char* DSETNAME[] = {
- "dataset0", "dataset1",
- "dataset2", "dataset3",
- "dataset4", "dataset5",
- "dataset6", "dataset7",
- "dataset8", "dataset9",
- "dataset10", "dataset11",
- "dataset12", "dataset13",
- "dataset14", "dataset15",
- "dataset16", "dataset17",
- "dataset18", "dataset19",
- "dataset20", "dataset21",
- "dataset22", "dataset23",
- "dataset24", "dataset25",
- "dataset26", "dataset27",
- "dataset28", "dataset29",
- "dataset30", "dataset31",
- "dataset32", "dataset33",
- "dataset34", "dataset35",
- "dataset36", "dataset37",
- "dataset38", "dataset39",
- NULL
-};
+const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4", "dataset5",
+ "dataset6", "dataset7", "dataset8", "dataset9", "dataset10", "dataset11",
+ "dataset12", "dataset13", "dataset14", "dataset15", "dataset16", "dataset17",
+ "dataset18", "dataset19", "dataset20", "dataset21", "dataset22", "dataset23",
+ "dataset24", "dataset25", "dataset26", "dataset27", "dataset28", "dataset29",
+ "dataset30", "dataset31", "dataset32", "dataset33", "dataset34", "dataset35",
+ "dataset36", "dataset37", "dataset38", "dataset39", NULL};
herr_t create_standard_file(const char *filename, hid_t fcpl);
@@ -61,21 +45,24 @@ herr_t create_standard_file(const char *filename, hid_t fcpl);
*
*-------------------------------------------------------------------------
*/
-int main(void)
+int
+main(void)
{
- hid_t fcpl_id;
+ hid_t fcpl_id;
herr_t ret;
/* Create a file creation property list */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
- if(fcpl_id < 0) goto error;
+ if (fcpl_id < 0)
+ goto error;
/* The file creation property list is the default list right now.
* Create a file using it (this is the same as creating a file with
* H5P_DEFAULT). Implicit shared messages will be disabled.
*/
ret = create_standard_file("default_file.h5", fcpl_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* There are five kinds of messages that can be shared: datatypes,
* dataspaces, attributes, fill values, and filter pipelines.
@@ -86,7 +73,8 @@ int main(void)
*/
/* To begin with, use only one index. */
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* Each index has a "minimum message size" for a message of that
* type to be shared. Since sharing a message creates some overhead,
@@ -111,7 +99,8 @@ int main(void)
* shared in this single index.
*/
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 40);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* The other property that can be set for shared messages is the
* list/B-tree cutoff for the indexes.
@@ -128,7 +117,8 @@ int main(void)
* second the minimum B-tree size.
*/
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 30, 20);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* Now create a file with this property list. After the FCPL is used,
* everything is automatic; messages will be shared and this will be
@@ -137,7 +127,8 @@ int main(void)
* written later.
*/
ret = create_standard_file("one_index_file.h5", fcpl_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* Now try some variations on this. The FCPL hasn't been closed, so
* we don't need to re-create it.
@@ -147,36 +138,42 @@ int main(void)
* overhead).
*/
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 1000);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = create_standard_file("only_huge_mesgs_file.h5", fcpl_id);
- if(ret < 0) goto error;
-
+ if (ret < 0)
+ goto error;
/* Or, suppose we only wanted to shared dataspaces and
* attributes (which might make sense if we were going to use committed
* datatypes). We could change the flags on the index:
*/
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_ATTR_FLAG, 40);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = create_standard_file("only_dspaces_and_attrs_file.h5", fcpl_id);
- if(ret < 0) goto error;
-
+ if (ret < 0)
+ goto error;
/* We could create a second index and put attributes in it to separate them
* from datatypes and dataspaces (and then run some performance metrics to
* see whether this improved caching performance).
*/
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_SDSPACE_FLAG, 40);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_ATTR_FLAG, 40);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = create_standard_file("separate_indexes_file.h5", fcpl_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* We can try twiddling the "phase change" values and see what it does to
* the file size. Since there's only a few different messages (two
@@ -184,25 +181,30 @@ int main(void)
* save some space.
*/
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 40);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 5, 0);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = create_standard_file("small_lists_file.h5", fcpl_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* Or we could create indexes that are never lists, but are created as
* B-trees. We do this by setting the "maximum list size" to zero.
*/
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 0, 0);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = create_standard_file("btrees_file.h5", fcpl_id);
- if(ret < 0) goto error;
-
+ if (ret < 0)
+ goto error;
/* Obviously there are a lot more permutations of these options possible.
* Performance will often be a tradeoff of speed for space, but will
@@ -212,10 +214,10 @@ int main(void)
* Please let The HDF Group (help@hdfgroup.org) know what you find!
*/
-
/* Close the property list */
ret = H5Pclose(fcpl_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
return 0;
error:
@@ -238,21 +240,22 @@ error:
herr_t
create_standard_file(const char *filename, hid_t fcpl_id)
{
- hid_t file_id=-1;
- hid_t type_id=-1, temp_type_id=-1;
- hsize_t dims[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
- hid_t space_id=-1;
- hid_t attr_type_id = -1;
- hid_t attr_space_id = -1;
- int attr_data[] = {1,2,3,4,5,6,7,8,9,0};
- hid_t dset_id=-1;
- hid_t attr_id=-1;
- int x;
- herr_t ret;
+ hid_t file_id = -1;
+ hid_t type_id = -1, temp_type_id = -1;
+ hsize_t dims[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+ hid_t space_id = -1;
+ hid_t attr_type_id = -1;
+ hid_t attr_space_id = -1;
+ int attr_data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
+ hid_t dset_id = -1;
+ hid_t attr_id = -1;
+ int x;
+ herr_t ret;
/* Create the file */
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT);
- if(file_id < 0) goto error;
+ if (file_id < 0)
+ goto error;
/* Create the datatype we'll be using. Generally, sharing messages
* is most useful when the message is complex and takes more space on
@@ -260,66 +263,80 @@ create_standard_file(const char *filename, hid_t fcpl_id)
* However, any type can be shared.
*/
temp_type_id = H5Tarray_create2(H5T_NATIVE_INT, 2, dims);
- if(temp_type_id < 0) goto error;
- type_id = H5Tarray_create2(temp_type_id, 2, dims);
- if(type_id < 0) goto error;
+ if (temp_type_id < 0)
+ goto error;
+ type_id = H5Tarray_create2(temp_type_id, 2, dims);
+ if (type_id < 0)
+ goto error;
ret = H5Tclose(temp_type_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
/* Create the dataspace we'll be using.
* Again, create a more complex dataspace so that more space will
* be saved when we share it.
*/
space_id = H5Screate_simple(10, dims, dims);
- if(space_id < 0) goto error;
+ if (space_id < 0)
+ goto error;
/* Create a datatype and dataspace for the attributes we'll be creating.
* The datatype will be a single integer, and each attribute will hold
* 10 integers.
*/
attr_type_id = H5Tcopy(H5T_NATIVE_INT);
- if(attr_type_id < 0) goto error;
+ if (attr_type_id < 0)
+ goto error;
attr_space_id = H5Screate_simple(1, dims, dims);
- if(attr_space_id < 0) goto error;
-
+ if (attr_space_id < 0)
+ goto error;
/* Begin using the messages many times. Do this by creating datasets
* that use this datatype, dataspace, and have this attribute.
*/
- for(x = 0; x < NUM_DATASETS; ++x) {
- /* Create a dataset */
- dset_id = H5Dcreate2(file_id, DSETNAME[x], type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if(dset_id < 0) goto error;
-
- /* Create an attribute on the dataset */
- attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
- if(attr_id < 0) goto error;
-
- /* Write data to the attribute */
- ret = H5Awrite(attr_id, H5T_NATIVE_INT, attr_data);
- if(ret < 0) goto error;
-
- ret = H5Aclose(attr_id);
- if(ret < 0) goto error;
- ret = H5Dclose(dset_id);
- if(ret < 0) goto error;
+ for (x = 0; x < NUM_DATASETS; ++x) {
+ /* Create a dataset */
+ dset_id = H5Dcreate2(file_id, DSETNAME[x], type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (dset_id < 0)
+ goto error;
+
+ /* Create an attribute on the dataset */
+ attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
+ if (attr_id < 0)
+ goto error;
+
+ /* Write data to the attribute */
+ ret = H5Awrite(attr_id, H5T_NATIVE_INT, attr_data);
+ if (ret < 0)
+ goto error;
+
+ ret = H5Aclose(attr_id);
+ if (ret < 0)
+ goto error;
+ ret = H5Dclose(dset_id);
+ if (ret < 0)
+ goto error;
}
/* Close all open IDs */
ret = H5Tclose(attr_type_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Sclose(attr_space_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Tclose(type_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Sclose(space_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
ret = H5Fclose(file_id);
- if(ret < 0) goto error;
+ if (ret < 0)
+ goto error;
return 0;
error:
return -1;
}
-
diff --git a/examples/h5_subset.c b/examples/h5_subset.c
index 904d3f8..3580046 100644
--- a/examples/h5_subset.c
+++ b/examples/h5_subset.c
@@ -6,102 +6,97 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * This example illustrates how to read/write a subset of data (a slab)
+/*
+ * This example illustrates how to read/write a subset of data (a slab)
* from/to a dataset in an HDF5 file. It is used in the HDF5 Tutorial.
*/
-
+
#include "hdf5.h"
#define FILE "subset.h5"
-#define DATASETNAME "IntArray"
-#define RANK 2
-
-#define DIM0_SUB 3 /* subset dimensions */
-#define DIM1_SUB 4
+#define DATASETNAME "IntArray"
+#define RANK 2
+#define DIM0_SUB 3 /* subset dimensions */
+#define DIM1_SUB 4
-#define DIM0 8 /* size of dataset */
-#define DIM1 10
+#define DIM0 8 /* size of dataset */
+#define DIM1 10
int
-main (void)
+main(void)
{
- hsize_t dims[2], dimsm[2];
- int data[DIM0][DIM1]; /* data to write */
- int sdata[DIM0_SUB][DIM1_SUB]; /* subset to write */
- int rdata[DIM0][DIM1]; /* buffer for read */
-
- hid_t file_id, dataset_id; /* handles */
- hid_t dataspace_id, memspace_id;
-
- herr_t status;
-
- hsize_t count[2]; /* size of subset in the file */
- hsize_t offset[2]; /* subset offset in the file */
- hsize_t stride[2];
- hsize_t block[2];
- int i, j;
-
-
+ hsize_t dims[2], dimsm[2];
+ int data[DIM0][DIM1]; /* data to write */
+ int sdata[DIM0_SUB][DIM1_SUB]; /* subset to write */
+ int rdata[DIM0][DIM1]; /* buffer for read */
+
+ hid_t file_id, dataset_id; /* handles */
+ hid_t dataspace_id, memspace_id;
+
+ herr_t status;
+
+ hsize_t count[2]; /* size of subset in the file */
+ hsize_t offset[2]; /* subset offset in the file */
+ hsize_t stride[2];
+ hsize_t block[2];
+ int i, j;
+
/*****************************************************************
* Create a new file with default creation and access properties.*
* Then create a dataset and write data to it and close the file *
* and dataset. *
*****************************************************************/
- file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- dims[0] = DIM0;
- dims[1] = DIM1;
- dataspace_id = H5Screate_simple (RANK, dims, NULL);
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- dataset_id = H5Dcreate2 (file_id, DATASETNAME, H5T_STD_I32BE, dataspace_id,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ dataspace_id = H5Screate_simple(RANK, dims, NULL);
+ dataset_id =
+ H5Dcreate2(file_id, DATASETNAME, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (j = 0; j < DIM0; j++) {
- for (i = 0; i < DIM1; i++)
- if (i< (DIM1/2))
- data[j][i] = 1;
+ for (i = 0; i < DIM1; i++)
+ if (i < (DIM1 / 2))
+ data[j][i] = 1;
else
- data[j][i] = 2;
- }
+ data[j][i] = 2;
+ }
- status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, data);
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
- printf ("\nData Written to File:\n");
- for (i = 0; i<DIM0; i++){
- for (j = 0; j<DIM1; j++)
- printf (" %i", data[i][j]);
- printf ("\n");
+ printf("\nData Written to File:\n");
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++)
+ printf(" %i", data[i][j]);
+ printf("\n");
}
- status = H5Sclose (dataspace_id);
- status = H5Dclose (dataset_id);
- status = H5Fclose (file_id);
-
+ status = H5Sclose(dataspace_id);
+ status = H5Dclose(dataset_id);
+ status = H5Fclose(file_id);
/*****************************************************
* Reopen the file and dataset and write a subset of *
- * values to the dataset.
+ * values to the dataset.
*****************************************************/
- file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- dataset_id = H5Dopen2 (file_id, DATASETNAME, H5P_DEFAULT);
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ dataset_id = H5Dopen2(file_id, DATASETNAME, H5P_DEFAULT);
/* Specify size and shape of subset to write. */
offset[0] = 1;
offset[1] = 2;
- count[0] = DIM0_SUB;
- count[1] = DIM1_SUB;
+ count[0] = DIM0_SUB;
+ count[1] = DIM1_SUB;
stride[0] = 1;
stride[1] = 1;
@@ -109,43 +104,39 @@ main (void)
block[0] = 1;
block[1] = 1;
- /* Create memory space with size of subset. Get file dataspace
+ /* Create memory space with size of subset. Get file dataspace
and select subset from file dataspace. */
- dimsm[0] = DIM0_SUB;
- dimsm[1] = DIM1_SUB;
- memspace_id = H5Screate_simple (RANK, dimsm, NULL);
+ dimsm[0] = DIM0_SUB;
+ dimsm[1] = DIM1_SUB;
+ memspace_id = H5Screate_simple(RANK, dimsm, NULL);
- dataspace_id = H5Dget_space (dataset_id);
- status = H5Sselect_hyperslab (dataspace_id, H5S_SELECT_SET, offset,
- stride, count, block);
+ dataspace_id = H5Dget_space(dataset_id);
+ status = H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET, offset, stride, count, block);
- /* Write a subset of data to the dataset, then read the
+ /* Write a subset of data to the dataset, then read the
entire dataset back from the file. */
- printf ("\nWrite subset to file specifying:\n");
- printf (" offset=1x2 stride=1x1 count=3x4 block=1x1\n");
+ printf("\nWrite subset to file specifying:\n");
+ printf(" offset=1x2 stride=1x1 count=3x4 block=1x1\n");
for (j = 0; j < DIM0_SUB; j++) {
- for (i = 0; i < DIM1_SUB; i++)
- sdata[j][i] = 5;
- }
-
- status = H5Dwrite (dataset_id, H5T_NATIVE_INT, memspace_id,
- dataspace_id, H5P_DEFAULT, sdata);
-
- status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, rdata);
-
- printf ("\nData in File after Subset is Written:\n");
- for (i = 0; i<DIM0; i++){
- for (j = 0; j<DIM1; j++)
- printf (" %i", rdata[i][j]);
- printf ("\n");
+ for (i = 0; i < DIM1_SUB; i++)
+ sdata[j][i] = 5;
+ }
+
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, memspace_id, dataspace_id, H5P_DEFAULT, sdata);
+
+ status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
+
+ printf("\nData in File after Subset is Written:\n");
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++)
+ printf(" %i", rdata[i][j]);
+ printf("\n");
}
- status = H5Sclose (memspace_id);
- status = H5Sclose (dataspace_id);
- status = H5Dclose (dataset_id);
- status = H5Fclose (file_id);
-
+ status = H5Sclose(memspace_id);
+ status = H5Sclose(dataspace_id);
+ status = H5Dclose(dataset_id);
+ status = H5Fclose(file_id);
}
diff --git a/examples/h5_write.c b/examples/h5_write.c
index 1a7cfe7..c2bf136 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,28 +18,28 @@
#include "hdf5.h"
-#define H5FILE_NAME "SDS.h5"
+#define H5FILE_NAME "SDS.h5"
#define DATASETNAME "IntArray"
-#define NX 5 /* dataset dimensions */
-#define NY 6
-#define RANK 2
+#define NX 5 /* dataset dimensions */
+#define NY 6
+#define RANK 2
int
-main (void)
+main(void)
{
- hid_t file, dataset; /* file and dataset handles */
- hid_t datatype, dataspace; /* handles */
- hsize_t dimsf[2]; /* dataset dimensions */
- herr_t status;
- int data[NX][NY]; /* data to write */
- int i, j;
+ hid_t file, dataset; /* file and dataset handles */
+ hid_t datatype, dataspace; /* handles */
+ hsize_t dimsf[2]; /* dataset dimensions */
+ herr_t status;
+ int data[NX][NY]; /* data to write */
+ int i, j;
/*
* Data and output buffer initialization.
*/
- for(j = 0; j < NX; j++)
- for(i = 0; i < NY; i++)
- data[j][i] = i + j;
+ for (j = 0; j < NX; j++)
+ for (i = 0; i < NY; i++)
+ data[j][i] = i + j;
/*
* 0 1 2 3 4 5
* 1 2 3 4 5 6
@@ -59,8 +59,8 @@ main (void)
* Describe the size of the array and create the data space for fixed
* size dataset.
*/
- dimsf[0] = NX;
- dimsf[1] = NY;
+ dimsf[0] = NX;
+ dimsf[1] = NY;
dataspace = H5Screate_simple(RANK, dimsf, NULL);
/*
@@ -68,14 +68,13 @@ main (void)
* We will store little endian INT numbers.
*/
datatype = H5Tcopy(H5T_NATIVE_INT);
- status = H5Tset_order(datatype, H5T_ORDER_LE);
+ status = H5Tset_order(datatype, H5T_ORDER_LE);
/*
* Create a new dataset within the file using defined dataspace and
* datatype and default dataset creation properties.
*/
- dataset = H5Dcreate2(file, DATASETNAME, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(file, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -92,4 +91,3 @@ main (void)
return 0;
}
-
diff --git a/examples/ph5example.c b/examples/ph5example.c
index d718479..a5f3c75 100644
--- a/examples/ph5example.c
+++ b/examples/ph5example.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -46,69 +46,73 @@
/* Define some handy debugging shorthands, routines, ... */
/* debugging tools */
-#define MESG(x)\
- if (verbose) printf("%s\n", x);\
-
-#define MPI_BANNER(mesg)\
- {printf("--------------------------------\n");\
- printf("Proc %d: ", mpi_rank); \
- printf("*** %s\n", mesg);\
- printf("--------------------------------\n");}
+#define MESG(x) \
+ if (verbose) \
+ printf("%s\n", x);
+
+#define MPI_BANNER(mesg) \
+ { \
+ printf("--------------------------------\n"); \
+ printf("Proc %d: ", mpi_rank); \
+ printf("*** %s\n", mesg); \
+ printf("--------------------------------\n"); \
+ }
-#define SYNC(comm)\
- {MPI_BANNER("doing a SYNC"); MPI_Barrier(comm); MPI_BANNER("SYNC DONE");}
+#define SYNC(comm) \
+ { \
+ MPI_BANNER("doing a SYNC"); \
+ MPI_Barrier(comm); \
+ MPI_BANNER("SYNC DONE"); \
+ }
/* End of Define some handy debugging shorthands, routines, ... */
/* Constants definitions */
/* 24 is a multiple of 2, 3, 4, 6, 8, 12. Neat for parallel tests. */
-#define SPACE1_DIM1 24
-#define SPACE1_DIM2 24
-#define SPACE1_RANK 2
-#define DATASETNAME1 "Data1"
-#define DATASETNAME2 "Data2"
-#define DATASETNAME3 "Data3"
+#define SPACE1_DIM1 24
+#define SPACE1_DIM2 24
+#define SPACE1_RANK 2
+#define DATASETNAME1 "Data1"
+#define DATASETNAME2 "Data2"
+#define DATASETNAME3 "Data3"
/* hyperslab layout styles */
-#define BYROW 1 /* divide into slabs of rows */
-#define BYCOL 2 /* divide into blocks of columns */
-
-#define PARAPREFIX "HDF5_PARAPREFIX" /* file prefix environment variable name */
+#define BYROW 1 /* divide into slabs of rows */
+#define BYCOL 2 /* divide into blocks of columns */
+#define PARAPREFIX "HDF5_PARAPREFIX" /* file prefix environment variable name */
/* dataset data type. Int's can be easily octo dumped. */
typedef int DATATYPE;
/* global variables */
-int nerrors = 0; /* errors count */
+int nerrors = 0; /* errors count */
#ifndef PATH_MAX
-#define PATH_MAX 512
-#endif /* !PATH_MAX */
-char testfiles[2][PATH_MAX];
+#define PATH_MAX 512
+#endif /* !PATH_MAX */
+char testfiles[2][PATH_MAX];
-
-int mpi_size, mpi_rank; /* mpi variables */
+int mpi_size, mpi_rank; /* mpi variables */
/* option flags */
-int verbose = 0; /* verbose, default as no. */
-int doread=1; /* read test */
-int dowrite=1; /* write test */
-int docleanup=1; /* cleanup */
+int verbose = 0; /* verbose, default as no. */
+int doread = 1; /* read test */
+int dowrite = 1; /* write test */
+int docleanup = 1; /* cleanup */
/* Prototypes */
void slab_set(hsize_t start[], hsize_t count[], hsize_t stride[], int mode);
-void dataset_fill(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset);
-void dataset_print(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset);
-int dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset, DATATYPE *original);
+void dataset_fill(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset);
+void dataset_print(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset);
+int dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset, DATATYPE *original);
void phdf5writeInd(char *filename);
void phdf5readInd(char *filename);
void phdf5writeAll(char *filename);
void phdf5readAll(char *filename);
void test_split_comm_access(char filenames[][PATH_MAX]);
-int parse_options(int argc, char **argv);
+int parse_options(int argc, char **argv);
void usage(void);
-int mkfilenames(char *prefix);
+int mkfilenames(char *prefix);
void cleanup(void);
-
/*
* Setup the dimensions of the hyperslab.
* Two modes--by rows or by columns.
@@ -117,113 +121,110 @@ void cleanup(void);
void
slab_set(hsize_t start[], hsize_t count[], hsize_t stride[], int mode)
{
- switch (mode){
- case BYROW:
- /* Each process takes a slabs of rows. */
- stride[0] = 1;
- stride[1] = 1;
- count[0] = SPACE1_DIM1/mpi_size;
- count[1] = SPACE1_DIM2;
- start[0] = mpi_rank*count[0];
- start[1] = 0;
- break;
- case BYCOL:
- /* Each process takes a block of columns. */
- stride[0] = 1;
- stride[1] = 1;
- count[0] = SPACE1_DIM1;
- count[1] = SPACE1_DIM2/mpi_size;
- start[0] = 0;
- start[1] = mpi_rank*count[1];
- break;
- default:
- /* Unknown mode. Set it to cover the whole dataset. */
- printf("unknown slab_set mode (%d)\n", mode);
- stride[0] = 1;
- stride[1] = 1;
- count[0] = SPACE1_DIM1;
- count[1] = SPACE1_DIM2;
- start[0] = 0;
- start[1] = 0;
- break;
+ switch (mode) {
+ case BYROW:
+ /* Each process takes a slabs of rows. */
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = SPACE1_DIM1 / mpi_size;
+ count[1] = SPACE1_DIM2;
+ start[0] = mpi_rank * count[0];
+ start[1] = 0;
+ break;
+ case BYCOL:
+ /* Each process takes a block of columns. */
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = SPACE1_DIM1;
+ count[1] = SPACE1_DIM2 / mpi_size;
+ start[0] = 0;
+ start[1] = mpi_rank * count[1];
+ break;
+ default:
+ /* Unknown mode. Set it to cover the whole dataset. */
+ printf("unknown slab_set mode (%d)\n", mode);
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = SPACE1_DIM1;
+ count[1] = SPACE1_DIM2;
+ start[0] = 0;
+ start[1] = 0;
+ break;
}
}
-
/*
* Fill the dataset with trivial data for testing.
* Assume dimension rank is 2 and data is stored contiguous.
*/
void
-dataset_fill(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset)
+dataset_fill(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset)
{
DATATYPE *dataptr = dataset;
- hsize_t i, j;
+ hsize_t i, j;
/* put some trivial data in the data_array */
- for (i=0; i < count[0]; i++){
- for (j=0; j < count[1]; j++){
- *dataptr++ = (i*stride[0]+start[0])*100 + (j*stride[1]+start[1]+1);
- }
+ for (i = 0; i < count[0]; i++) {
+ for (j = 0; j < count[1]; j++) {
+ *dataptr++ = (i * stride[0] + start[0]) * 100 + (j * stride[1] + start[1] + 1);
+ }
}
}
-
/*
* Print the content of the dataset.
*/
-void dataset_print(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset)
+void
+dataset_print(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset)
{
DATATYPE *dataptr = dataset;
- hsize_t i, j;
+ hsize_t i, j;
/* print the slab read */
- for (i=0; i < count[0]; i++){
- printf("Row %lu: ", (unsigned long)(i*stride[0]+start[0]));
- for (j=0; j < count[1]; j++){
- printf("%03d ", *dataptr++);
- }
- printf("\n");
+ for (i = 0; i < count[0]; i++) {
+ printf("Row %lu: ", (unsigned long)(i * stride[0] + start[0]));
+ for (j = 0; j < count[1]; j++) {
+ printf("%03d ", *dataptr++);
+ }
+ printf("\n");
}
}
-
/*
* Print the content of the dataset.
*/
-int dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset, DATATYPE *original)
+int
+dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset, DATATYPE *original)
{
-#define MAX_ERR_REPORT 10 /* Maximum number of errors reported */
+#define MAX_ERR_REPORT 10 /* Maximum number of errors reported */
hsize_t i, j;
- int nerr;
+ int nerr;
/* print it if verbose */
if (verbose)
- dataset_print(start, count, stride, dataset);
+ dataset_print(start, count, stride, dataset);
nerr = 0;
- for (i=0; i < count[0]; i++){
- for (j=0; j < count[1]; j++){
- if (*dataset++ != *original++){
- nerr++;
- if (nerr <= MAX_ERR_REPORT){
- printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j,
- (unsigned long)(i*stride[0]+start[0]), (unsigned long)(j*stride[1]+start[1]),
- *(dataset-1), *(original-1));
- }
- }
- }
+ for (i = 0; i < count[0]; i++) {
+ for (j = 0; j < count[1]; j++) {
+ if (*dataset++ != *original++) {
+ nerr++;
+ if (nerr <= MAX_ERR_REPORT) {
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)(i * stride[0] + start[0]),
+ (unsigned long)(j * stride[1] + start[1]), *(dataset - 1), *(original - 1));
+ }
+ }
+ }
}
if (nerr > MAX_ERR_REPORT)
- printf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (nerr)
- printf("%d errors found in dataset_vrfy\n", nerr);
- return(nerr);
+ printf("%d errors found in dataset_vrfy\n", nerr);
+ return (nerr);
}
-
/*
* Example of using the parallel HDF5 library to create two datasets
* in one HDF5 files with parallel MPIO access support.
@@ -235,32 +236,31 @@ int dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *d
void
phdf5writeInd(char *filename)
{
- hid_t fid1; /* HDF5 file IDs */
- hid_t acc_tpl1; /* File access templates */
- hid_t sid1; /* Dataspace ID */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
- hid_t dataset1, dataset2; /* Dataset ID */
- hsize_t dims1[SPACE1_RANK] =
- {SPACE1_DIM1,SPACE1_DIM2}; /* dataspace dim sizes */
- DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+ hid_t fid1; /* HDF5 file IDs */
+ hid_t acc_tpl1; /* File access templates */
+ hid_t sid1; /* Dataspace ID */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t dataset1, dataset2; /* Dataset ID */
+ hsize_t dims1[SPACE1_RANK] = {SPACE1_DIM1, SPACE1_DIM2}; /* dataspace dim sizes */
+ DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
- hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
- hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
if (verbose)
- printf("Independent write test on file %s\n", filename);
+ printf("Independent write test on file %s\n", filename);
/* -------------------
* START AN HDF5 FILE
* -------------------*/
/* setup file access template with parallel IO access. */
- acc_tpl1 = H5Pcreate (H5P_FILE_ACCESS);
+ acc_tpl1 = H5Pcreate(H5P_FILE_ACCESS);
assert(acc_tpl1 != FAIL);
MESG("H5Pcreate access succeed");
/* set Parallel access with communicator */
@@ -277,70 +277,60 @@ phdf5writeInd(char *filename)
ret = H5Pclose(acc_tpl1);
assert(ret != FAIL);
-
/* --------------------------
* Define the dimensions of the overall datasets
* and the slabs local to the MPI process.
* ------------------------- */
/* setup dimensionality object */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- assert (sid1 != FAIL);
+ assert(sid1 != FAIL);
MESG("H5Screate_simple succeed");
-
/* create a dataset collectively */
- dataset1 = H5Dcreate2(fid1, DATASETNAME1, H5T_NATIVE_INT, sid1,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset1 = H5Dcreate2(fid1, DATASETNAME1, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(dataset1 != FAIL);
MESG("H5Dcreate2 succeed");
/* create another dataset collectively */
- dataset2 = H5Dcreate2(fid1, DATASETNAME2, H5T_NATIVE_INT, sid1,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset2 = H5Dcreate2(fid1, DATASETNAME2, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(dataset2 != FAIL);
MESG("H5Dcreate2 succeed");
-
-
/* set up dimensions of the slab this process accesses */
- start[0] = mpi_rank*SPACE1_DIM1/mpi_size;
- start[1] = 0;
- count[0] = SPACE1_DIM1/mpi_size;
- count[1] = SPACE1_DIM2;
+ start[0] = mpi_rank * SPACE1_DIM1 / mpi_size;
+ start[1] = 0;
+ count[0] = SPACE1_DIM1 / mpi_size;
+ count[1] = SPACE1_DIM2;
stride[0] = 1;
- stride[1] =1;
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ stride[1] = 1;
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* put some trivial data in the data_array */
dataset_fill(start, count, stride, &data_array1[0][0]);
MESG("data_array initialized");
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
MESG("H5Dget_space succeed");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
MESG("H5Sset_hyperslab succeed");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* write data independently */
- ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- H5P_DEFAULT, data_array1);
+ ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
/* write data independently */
- ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- H5P_DEFAULT, data_array1);
+ ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
@@ -348,10 +338,10 @@ if (verbose)
H5Sclose(file_dataspace);
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
assert(ret != FAIL);
MESG("H5Dclose1 succeed");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
assert(ret != FAIL);
MESG("H5Dclose2 succeed");
@@ -366,39 +356,38 @@ if (verbose)
void
phdf5readInd(char *filename)
{
- hid_t fid1; /* HDF5 file IDs */
- hid_t acc_tpl1; /* File access templates */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
- hid_t dataset1, dataset2; /* Dataset ID */
- DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
- DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2]; /* expected data buffer */
+ hid_t fid1; /* HDF5 file IDs */
+ hid_t acc_tpl1; /* File access templates */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t dataset1, dataset2; /* Dataset ID */
+ DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+ DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2]; /* expected data buffer */
- hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
- hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
if (verbose)
- printf("Independent read test on file %s\n", filename);
+ printf("Independent read test on file %s\n", filename);
/* setup file access template */
- acc_tpl1 = H5Pcreate (H5P_FILE_ACCESS);
+ acc_tpl1 = H5Pcreate(H5P_FILE_ACCESS);
assert(acc_tpl1 != FAIL);
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(acc_tpl1, comm, info);
assert(ret != FAIL);
-
/* open the file collectively */
- fid1=H5Fopen(filename,H5F_ACC_RDWR,acc_tpl1);
+ fid1 = H5Fopen(filename, H5F_ACC_RDWR, acc_tpl1);
assert(fid1 != FAIL);
/* Release file-access template */
- ret=H5Pclose(acc_tpl1);
+ ret = H5Pclose(acc_tpl1);
assert(ret != FAIL);
/* open the dataset1 collectively */
@@ -409,37 +398,33 @@ phdf5readInd(char *filename)
dataset2 = H5Dopen2(fid1, DATASETNAME1, H5P_DEFAULT);
assert(dataset2 != FAIL);
-
/* set up dimensions of the slab this process accesses */
- start[0] = mpi_rank*SPACE1_DIM1/mpi_size;
- start[1] = 0;
- count[0] = SPACE1_DIM1/mpi_size;
- count[1] = SPACE1_DIM2;
+ start[0] = mpi_rank * SPACE1_DIM1 / mpi_size;
+ start[1] = 0;
+ count[0] = SPACE1_DIM1 / mpi_size;
+ count[1] = SPACE1_DIM2;
stride[0] = 1;
- stride[1] =1;
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ stride[1] = 1;
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* fill dataset with test data */
dataset_fill(start, count, stride, &data_origin1[0][0]);
/* read data independently */
- ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- H5P_DEFAULT, data_array1);
+ ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1);
assert(ret != FAIL);
/* verify the read data with original expected data */
@@ -447,8 +432,7 @@ if (verbose)
assert(ret != FAIL);
/* read data independently */
- ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- H5P_DEFAULT, data_array1);
+ ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1);
assert(ret != FAIL);
/* verify the read data with original expected data */
@@ -456,9 +440,9 @@ if (verbose)
assert(ret == 0);
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
assert(ret != FAIL);
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
assert(ret != FAIL);
/* release all IDs created */
@@ -468,7 +452,6 @@ if (verbose)
H5Fclose(fid1);
}
-
/*
* Example of using the parallel HDF5 library to create two datasets
* in one HDF5 file with collective parallel access support.
@@ -481,33 +464,32 @@ if (verbose)
void
phdf5writeAll(char *filename)
{
- hid_t fid1; /* HDF5 file IDs */
- hid_t acc_tpl1; /* File access templates */
- hid_t xfer_plist; /* Dataset transfer properties list */
- hid_t sid1; /* Dataspace ID */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
- hid_t dataset1, dataset2; /* Dataset ID */
- hsize_t dims1[SPACE1_RANK] =
- {SPACE1_DIM1,SPACE1_DIM2}; /* dataspace dim sizes */
- DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
-
- hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
- hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
-
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 file IDs */
+ hid_t acc_tpl1; /* File access templates */
+ hid_t xfer_plist; /* Dataset transfer properties list */
+ hid_t sid1; /* Dataspace ID */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t dataset1, dataset2; /* Dataset ID */
+ hsize_t dims1[SPACE1_RANK] = {SPACE1_DIM1, SPACE1_DIM2}; /* dataspace dim sizes */
+ DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+
+ hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
+
+ herr_t ret; /* Generic return value */
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
if (verbose)
- printf("Collective write test on file %s\n", filename);
+ printf("Collective write test on file %s\n", filename);
/* -------------------
* START AN HDF5 FILE
* -------------------*/
/* setup file access template with parallel IO access. */
- acc_tpl1 = H5Pcreate (H5P_FILE_ACCESS);
+ acc_tpl1 = H5Pcreate(H5P_FILE_ACCESS);
assert(acc_tpl1 != FAIL);
MESG("H5Pcreate access succeed");
/* set Parallel access with communicator */
@@ -516,25 +498,23 @@ phdf5writeAll(char *filename)
MESG("H5Pset_fapl_mpio succeed");
/* create the file collectively */
- fid1=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl1);
+ fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl1);
assert(fid1 != FAIL);
MESG("H5Fcreate succeed");
/* Release file-access template */
- ret=H5Pclose(acc_tpl1);
+ ret = H5Pclose(acc_tpl1);
assert(ret != FAIL);
-
/* --------------------------
* Define the dimensions of the overall datasets
* and create the dataset
* ------------------------- */
/* setup dimensionality object */
- sid1 = H5Screate_simple (SPACE1_RANK, dims1, NULL);
- assert (sid1 != FAIL);
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ assert(sid1 != FAIL);
MESG("H5Screate_simple succeed");
-
/* create a dataset collectively */
dataset1 = H5Dcreate2(fid1, DATASETNAME1, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(dataset1 != FAIL);
@@ -551,43 +531,40 @@ phdf5writeAll(char *filename)
/* Dataset1: each process takes a block of rows. */
slab_set(start, count, stride, BYROW);
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
MESG("H5Dget_space succeed");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
MESG("H5Sset_hyperslab succeed");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* fill the local slab with some trivial data */
dataset_fill(start, count, stride, &data_array1[0][0]);
MESG("data_array initialized");
- if (verbose){
- MESG("data_array created");
- dataset_print(start, count, stride, &data_array1[0][0]);
+ if (verbose) {
+ MESG("data_array created");
+ dataset_print(start, count, stride, &data_array1[0][0]);
}
/* set up the collective transfer properties list */
- xfer_plist = H5Pcreate (H5P_DATASET_XFER);
+ xfer_plist = H5Pcreate(H5P_DATASET_XFER);
assert(xfer_plist != FAIL);
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
assert(ret != FAIL);
MESG("H5Pcreate xfer succeed");
/* write data collectively */
- ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- xfer_plist, data_array1);
+ ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
@@ -600,51 +577,48 @@ if (verbose)
/* Dataset2: each process takes a block of columns. */
slab_set(start, count, stride, BYCOL);
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* put some trivial data in the data_array */
dataset_fill(start, count, stride, &data_array1[0][0]);
MESG("data_array initialized");
- if (verbose){
- MESG("data_array created");
- dataset_print(start, count, stride, &data_array1[0][0]);
+ if (verbose) {
+ MESG("data_array created");
+ dataset_print(start, count, stride, &data_array1[0][0]);
}
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
MESG("H5Dget_space succeed");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
MESG("H5Sset_hyperslab succeed");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* fill the local slab with some trivial data */
dataset_fill(start, count, stride, &data_array1[0][0]);
MESG("data_array initialized");
- if (verbose){
- MESG("data_array created");
- dataset_print(start, count, stride, &data_array1[0][0]);
+ if (verbose) {
+ MESG("data_array created");
+ dataset_print(start, count, stride, &data_array1[0][0]);
}
/* set up the collective transfer properties list */
- xfer_plist = H5Pcreate (H5P_DATASET_XFER);
+ xfer_plist = H5Pcreate(H5P_DATASET_XFER);
assert(xfer_plist != FAIL);
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
assert(ret != FAIL);
MESG("H5Pcreate xfer succeed");
/* write data independently */
- ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- xfer_plist, data_array1);
+ ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1);
assert(ret != FAIL);
MESG("H5Dwrite succeed");
@@ -653,14 +627,13 @@ if (verbose)
H5Sclose(mem_dataspace);
H5Pclose(xfer_plist);
-
/*
* All writes completed. Close datasets collectively
*/
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
assert(ret != FAIL);
MESG("H5Dclose1 succeed");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
assert(ret != FAIL);
MESG("H5Dclose2 succeed");
@@ -683,31 +656,31 @@ if (verbose)
void
phdf5readAll(char *filename)
{
- hid_t fid1; /* HDF5 file IDs */
- hid_t acc_tpl1; /* File access templates */
- hid_t xfer_plist; /* Dataset transfer properties list */
- hid_t file_dataspace; /* File dataspace ID */
- hid_t mem_dataspace; /* memory dataspace ID */
- hid_t dataset1, dataset2; /* Dataset ID */
- DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
- DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2]; /* expected data buffer */
+ hid_t fid1; /* HDF5 file IDs */
+ hid_t acc_tpl1; /* File access templates */
+ hid_t xfer_plist; /* Dataset transfer properties list */
+ hid_t file_dataspace; /* File dataspace ID */
+ hid_t mem_dataspace; /* memory dataspace ID */
+ hid_t dataset1, dataset2; /* Dataset ID */
+ DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2]; /* data buffer */
+ DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2]; /* expected data buffer */
- hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
- hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t start[SPACE1_RANK]; /* for hyperslab setting */
+ hsize_t count[SPACE1_RANK], stride[SPACE1_RANK]; /* for hyperslab setting */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
if (verbose)
- printf("Collective read test on file %s\n", filename);
+ printf("Collective read test on file %s\n", filename);
/* -------------------
* OPEN AN HDF5 FILE
* -------------------*/
/* setup file access template with parallel IO access. */
- acc_tpl1 = H5Pcreate (H5P_FILE_ACCESS);
+ acc_tpl1 = H5Pcreate(H5P_FILE_ACCESS);
assert(acc_tpl1 != FAIL);
MESG("H5Pcreate access succeed");
/* set Parallel access with communicator */
@@ -716,15 +689,14 @@ phdf5readAll(char *filename)
MESG("H5Pset_fapl_mpio succeed");
/* open the file collectively */
- fid1=H5Fopen(filename,H5F_ACC_RDWR,acc_tpl1);
+ fid1 = H5Fopen(filename, H5F_ACC_RDWR, acc_tpl1);
assert(fid1 != FAIL);
MESG("H5Fopen succeed");
/* Release file-access template */
- ret=H5Pclose(acc_tpl1);
+ ret = H5Pclose(acc_tpl1);
assert(ret != FAIL);
-
/* --------------------------
* Open the datasets in it
* ------------------------- */
@@ -744,43 +716,40 @@ phdf5readAll(char *filename)
/* Dataset1: each process takes a block of columns. */
slab_set(start, count, stride, BYCOL);
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
MESG("H5Dget_space succeed");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
MESG("H5Sset_hyperslab succeed");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* fill dataset with test data */
dataset_fill(start, count, stride, &data_origin1[0][0]);
MESG("data_array initialized");
- if (verbose){
- MESG("data_array created");
- dataset_print(start, count, stride, &data_array1[0][0]);
+ if (verbose) {
+ MESG("data_array created");
+ dataset_print(start, count, stride, &data_array1[0][0]);
}
/* set up the collective transfer properties list */
- xfer_plist = H5Pcreate (H5P_DATASET_XFER);
+ xfer_plist = H5Pcreate(H5P_DATASET_XFER);
assert(xfer_plist != FAIL);
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
assert(ret != FAIL);
MESG("H5Pcreate xfer succeed");
/* read data collectively */
- ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- xfer_plist, data_array1);
+ ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1);
assert(ret != FAIL);
MESG("H5Dread succeed");
@@ -797,43 +766,40 @@ if (verbose)
/* Dataset2: each process takes a block of rows. */
slab_set(start, count, stride, BYROW);
-if (verbose)
- printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1],
- (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)(count[0]*count[1]));
+ if (verbose)
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), total datapoints=%lu\n", (unsigned long)start[0],
+ (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ (unsigned long)(count[0] * count[1]));
/* create a file dataspace independently */
- file_dataspace = H5Dget_space (dataset1);
+ file_dataspace = H5Dget_space(dataset1);
assert(file_dataspace != FAIL);
MESG("H5Dget_space succeed");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride,
- count, NULL);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, NULL);
assert(ret != FAIL);
MESG("H5Sset_hyperslab succeed");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (SPACE1_RANK, count, NULL);
- assert (mem_dataspace != FAIL);
+ mem_dataspace = H5Screate_simple(SPACE1_RANK, count, NULL);
+ assert(mem_dataspace != FAIL);
/* fill dataset with test data */
dataset_fill(start, count, stride, &data_origin1[0][0]);
MESG("data_array initialized");
- if (verbose){
- MESG("data_array created");
- dataset_print(start, count, stride, &data_array1[0][0]);
+ if (verbose) {
+ MESG("data_array created");
+ dataset_print(start, count, stride, &data_array1[0][0]);
}
/* set up the collective transfer properties list */
- xfer_plist = H5Pcreate (H5P_DATASET_XFER);
+ xfer_plist = H5Pcreate(H5P_DATASET_XFER);
assert(xfer_plist != FAIL);
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
assert(ret != FAIL);
MESG("H5Pcreate xfer succeed");
/* read data independently */
- ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
- xfer_plist, data_array1);
+ ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1);
assert(ret != FAIL);
MESG("H5Dread succeed");
@@ -846,14 +812,13 @@ if (verbose)
H5Sclose(mem_dataspace);
H5Pclose(xfer_plist);
-
/*
* All reads completed. Close datasets collectively
*/
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
assert(ret != FAIL);
MESG("H5Dclose1 succeed");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
assert(ret != FAIL);
MESG("H5Dclose2 succeed");
@@ -877,51 +842,51 @@ test_split_comm_access(char filenames[][PATH_MAX])
{
MPI_Comm comm;
MPI_Info info = MPI_INFO_NULL;
- int color, mrc;
- int newrank, newprocs;
- hid_t fid; /* file IDs */
- hid_t acc_tpl; /* File access properties */
- herr_t ret; /* generic return value */
+ int color, mrc;
+ int newrank, newprocs;
+ hid_t fid; /* file IDs */
+ hid_t acc_tpl; /* File access properties */
+ herr_t ret; /* generic return value */
if (verbose)
- printf("Independent write test on file %s %s\n",
- filenames[0], filenames[1]);
-
- color = mpi_rank%2;
- mrc = MPI_Comm_split (MPI_COMM_WORLD, color, mpi_rank, &comm);
- assert(mrc==MPI_SUCCESS);
- MPI_Comm_size(comm,&newprocs);
- MPI_Comm_rank(comm,&newrank);
-
- if (color){
- /* odd-rank processes */
- mrc = MPI_Barrier(comm);
- assert(mrc==MPI_SUCCESS);
- }else{
- /* even-rank processes */
- /* setup file access template */
- acc_tpl = H5Pcreate (H5P_FILE_ACCESS);
- assert(acc_tpl != FAIL);
-
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(acc_tpl, comm, info);
- assert(ret != FAIL);
-
- /* create the file collectively */
- fid=H5Fcreate(filenames[color],H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
- assert(fid != FAIL);
- MESG("H5Fcreate succeed");
-
- /* Release file-access template */
- ret=H5Pclose(acc_tpl);
- assert(ret != FAIL);
-
- ret=H5Fclose(fid);
- assert(ret != FAIL);
+ printf("Independent write test on file %s %s\n", filenames[0], filenames[1]);
+
+ color = mpi_rank % 2;
+ mrc = MPI_Comm_split(MPI_COMM_WORLD, color, mpi_rank, &comm);
+ assert(mrc == MPI_SUCCESS);
+ MPI_Comm_size(comm, &newprocs);
+ MPI_Comm_rank(comm, &newrank);
+
+ if (color) {
+ /* odd-rank processes */
+ mrc = MPI_Barrier(comm);
+ assert(mrc == MPI_SUCCESS);
}
- if (mpi_rank == 0){
- mrc = MPI_File_delete(filenames[color], info);
- assert(mrc==MPI_SUCCESS);
+ else {
+ /* even-rank processes */
+ /* setup file access template */
+ acc_tpl = H5Pcreate(H5P_FILE_ACCESS);
+ assert(acc_tpl != FAIL);
+
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_mpio(acc_tpl, comm, info);
+ assert(ret != FAIL);
+
+ /* create the file collectively */
+ fid = H5Fcreate(filenames[color], H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
+ assert(fid != FAIL);
+ MESG("H5Fcreate succeed");
+
+ /* Release file-access template */
+ ret = H5Pclose(acc_tpl);
+ assert(ret != FAIL);
+
+ ret = H5Fclose(fid);
+ assert(ret != FAIL);
+ }
+ if (mpi_rank == 0) {
+ mrc = MPI_File_delete(filenames[color], info);
+ assert(mrc == MPI_SUCCESS);
}
}
@@ -944,7 +909,6 @@ usage(void)
printf("\n");
}
-
/*
* compose the test filename with the prefix supplied.
* return code: 0 if no error
@@ -953,88 +917,93 @@ usage(void)
int
mkfilenames(char *prefix)
{
- int i, n;
+ int i, n;
size_t strsize;
/* filename will be prefix/ParaEgN.h5 where N is 0 to 9. */
/* So, string must be big enough to hold the prefix, / and 10 more chars */
/* and the terminating null. */
strsize = strlen(prefix) + 12;
- if (strsize > PATH_MAX){
- printf("File prefix too long; Use a short path name.\n");
- return(1);
+ if (strsize > PATH_MAX) {
+ printf("File prefix too long; Use a short path name.\n");
+ return (1);
}
- n = sizeof(testfiles)/sizeof(testfiles[0]);
- if (n > 9){
- printf("Warning: Too many entries in testfiles. "
- "Need to adjust the code to accommodate the large size.\n");
+ n = sizeof(testfiles) / sizeof(testfiles[0]);
+ if (n > 9) {
+ printf("Warning: Too many entries in testfiles. "
+ "Need to adjust the code to accommodate the large size.\n");
}
- for (i=0; i<n; i++){
- sprintf(testfiles[i], "%s/ParaEg%d.h5", prefix, i);
+ for (i = 0; i < n; i++) {
+ sprintf(testfiles[i], "%s/ParaEg%d.h5", prefix, i);
}
- return(0);
-
+ return (0);
}
-
/*
* parse the command line options
*/
int
-parse_options(int argc, char **argv){
+parse_options(int argc, char **argv)
+{
int i, n;
/* initialize testfiles to nulls */
- n = sizeof(testfiles)/sizeof(testfiles[0]);
- for (i=0; i<n; i++){
- testfiles[i][0] = '\0';
+ n = sizeof(testfiles) / sizeof(testfiles[0]);
+ for (i = 0; i < n; i++) {
+ testfiles[i][0] = '\0';
}
- while (--argc){
- if (**(++argv) != '-'){
- break;
- }else{
- switch(*(*argv+1)){
- case 'f': ++argv;
- if (--argc < 1){
- usage();
- nerrors++;
- return(1);
- }
- if (mkfilenames(*argv)){
- nerrors++;
- return(1);
- }
- break;
- case 'c': docleanup = 0; /* no cleanup */
- break;
- case 'r': doread = 0;
- break;
- case 'w': dowrite = 0;
- break;
- case 'v': verbose = 1;
- break;
- default: usage();
- nerrors++;
- return(1);
- }
- }
+ while (--argc) {
+ if (**(++argv) != '-') {
+ break;
+ }
+ else {
+ switch (*(*argv + 1)) {
+ case 'f':
+ ++argv;
+ if (--argc < 1) {
+ usage();
+ nerrors++;
+ return (1);
+ }
+ if (mkfilenames(*argv)) {
+ nerrors++;
+ return (1);
+ }
+ break;
+ case 'c':
+ docleanup = 0; /* no cleanup */
+ break;
+ case 'r':
+ doread = 0;
+ break;
+ case 'w':
+ dowrite = 0;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ default:
+ usage();
+ nerrors++;
+ return (1);
+ }
+ }
}
/* check the file prefix */
- if (testfiles[0][0] == '\0'){
- /* try get it from environment variable HDF5_PARAPREFIX */
- char *env;
- char *env_default = "."; /* default to current directory */
- if ((env=getenv(PARAPREFIX))==NULL){
- env = env_default;
- }
- mkfilenames(env);
+ if (testfiles[0][0] == '\0') {
+ /* try get it from environment variable HDF5_PARAPREFIX */
+ char *env;
+ char *env_default = "."; /* default to current directory */
+ if ((env = getenv(PARAPREFIX)) == NULL) {
+ env = env_default;
+ }
+ mkfilenames(env);
}
- return(0);
+ return (0);
}
-
/*
* cleanup test files created
*/
@@ -1043,88 +1012,87 @@ cleanup(void)
{
int i, n;
- n = sizeof(testfiles)/sizeof(testfiles[0]);
- for (i=0; i<n; i++){
- MPI_File_delete(testfiles[i], MPI_INFO_NULL);
+ n = sizeof(testfiles) / sizeof(testfiles[0]);
+ for (i = 0; i < n; i++) {
+ MPI_File_delete(testfiles[i], MPI_INFO_NULL);
}
}
-
/* Main Program */
int
main(int argc, char **argv)
{
- int mpi_namelen;
+ int mpi_namelen;
char mpi_name[MPI_MAX_PROCESSOR_NAME];
- int i, n;
+ int i, n;
- MPI_Init(&argc,&argv);
- MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
- MPI_Get_processor_name(mpi_name,&mpi_namelen);
+ MPI_Init(&argc, &argv);
+ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ MPI_Get_processor_name(mpi_name, &mpi_namelen);
/* Make sure datasets can be divided into equal chunks by the processes */
- if ((SPACE1_DIM1 % mpi_size) || (SPACE1_DIM2 % mpi_size)){
- printf("DIM1(%d) and DIM2(%d) must be multiples of processes (%d)\n",
- SPACE1_DIM1, SPACE1_DIM2, mpi_size);
- nerrors++;
- goto finish;
+ if ((SPACE1_DIM1 % mpi_size) || (SPACE1_DIM2 % mpi_size)) {
+ printf("DIM1(%d) and DIM2(%d) must be multiples of processes (%d)\n", SPACE1_DIM1, SPACE1_DIM2,
+ mpi_size);
+ nerrors++;
+ goto finish;
}
if (parse_options(argc, argv) != 0)
- goto finish;
+ goto finish;
/* show test file names */
- if (mpi_rank == 0){
- n = sizeof(testfiles)/sizeof(testfiles[0]);
- printf("Parallel test files are:\n");
- for (i=0; i<n; i++){
- printf(" %s\n", testfiles[i]);
- }
+ if (mpi_rank == 0) {
+ n = sizeof(testfiles) / sizeof(testfiles[0]);
+ printf("Parallel test files are:\n");
+ for (i = 0; i < n; i++) {
+ printf(" %s\n", testfiles[i]);
+ }
}
- if (dowrite){
- MPI_BANNER("testing PHDF5 dataset using split communicators...");
- test_split_comm_access(testfiles);
- MPI_BANNER("testing PHDF5 dataset independent write...");
- phdf5writeInd(testfiles[0]);
- MPI_BANNER("testing PHDF5 dataset collective write...");
- phdf5writeAll(testfiles[1]);
+ if (dowrite) {
+ MPI_BANNER("testing PHDF5 dataset using split communicators...");
+ test_split_comm_access(testfiles);
+ MPI_BANNER("testing PHDF5 dataset independent write...");
+ phdf5writeInd(testfiles[0]);
+ MPI_BANNER("testing PHDF5 dataset collective write...");
+ phdf5writeAll(testfiles[1]);
}
- if (doread){
- MPI_BANNER("testing PHDF5 dataset independent read...");
- phdf5readInd(testfiles[0]);
- MPI_BANNER("testing PHDF5 dataset collective read...");
- phdf5readAll(testfiles[1]);
+ if (doread) {
+ MPI_BANNER("testing PHDF5 dataset independent read...");
+ phdf5readInd(testfiles[0]);
+ MPI_BANNER("testing PHDF5 dataset collective read...");
+ phdf5readAll(testfiles[1]);
}
- if (!(dowrite || doread)){
- usage();
- nerrors++;
+ if (!(dowrite || doread)) {
+ usage();
+ nerrors++;
}
finish:
- if (mpi_rank == 0){ /* only process 0 reports */
- if (nerrors)
- printf("***PHDF5 tests detected %d errors***\n", nerrors);
- else{
- printf("===================================\n");
- printf("PHDF5 tests finished with no errors\n");
- printf("===================================\n");
- }
+ if (mpi_rank == 0) { /* only process 0 reports */
+ if (nerrors)
+ printf("***PHDF5 tests detected %d errors***\n", nerrors);
+ else {
+ printf("===================================\n");
+ printf("PHDF5 tests finished with no errors\n");
+ printf("===================================\n");
+ }
}
if (docleanup)
- cleanup();
+ cleanup();
MPI_Finalize();
- return(nerrors);
+ return (nerrors);
}
-#else /* H5_HAVE_PARALLEL */
+#else /* H5_HAVE_PARALLEL */
/* dummy program since H5_HAVE_PARALLE is not configured in */
int
main(void)
{
-printf("No PHDF5 example because parallel is not configured in\n");
-return(0);
+ printf("No PHDF5 example because parallel is not configured in\n");
+ return (0);
}
#endif /* H5_HAVE_PARALLEL */
diff --git a/examples/run-all-ex.sh b/examples/run-all-ex.sh
index 878e0f8..afd4308 100755
--- a/examples/run-all-ex.sh
+++ b/examples/run-all-ex.sh
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index a684a38..dc3f7ae 100644
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the c examples from source files installed #
-# in .../share/hdf5_examples/c using h5cc or h5pc. The order for running #
+# in @examplesdir@/c using h5cc or h5pc. The order for running #
# programs with RunTest in the MAIN section below is taken from the Makefile. #
# The order is important since some of the test programs use data files created #
# by earlier test programs. Any future additions should be placed accordingly. #
@@ -28,10 +28,33 @@
# Initializations
EXIT_SUCCESS=0
EXIT_FAILURE=1
-
+
+#
+# Try to derive the path to the installation $prefix established
+# by ./configure relative to the examples directory established by
+# ./configure. If successful, set `prefix_relto_examplesdir` to the
+# relative path. Otherwise, set `prefix_relto_examplesdir` to the
+# absolute installation $prefix.
+#
+# This script uses the value of `prefix` in the user's environment, if
+# it is set, below. The content of $() is evaluated in a sub-shell, so
+# if `prefix` is set in the user's environment, the shell statements in
+# $() won't clobbered it.
+#
+prefix_relto_examplesdir=$(
+prefix=@prefix@
+examplesdir=@examplesdir@
+if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
+else
+ echo $prefix
+fi
+)
+
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../}"
+prefix="${prefix:-../${prefix_relto_examplesdir}}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in
index 4e898c1..71254d2 100644
--- a/examples/testh5cc.sh.in
+++ b/examples/testh5cc.sh.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -29,8 +29,7 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-# Note: no '/' after DESTDIR. Explanation in commence.am
-prefix="${prefix:-${DESTDIR}@prefix@}"
+prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 8c7b8f6..7b90d83 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_F90 C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_F90 C Fortran)
if (H5_HAVE_PARALLEL)
if (MPI_Fortran_LINK_FLAGS)
diff --git a/fortran/COPYING b/fortran/COPYING
index 6497ace..97969da 100644
--- a/fortran/COPYING
+++ b/fortran/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/fortran/Makefile.am b/fortran/Makefile.am
index 38084b9..d70fda0 100644
--- a/fortran/Makefile.am
+++ b/fortran/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -22,14 +22,21 @@
include $(top_srcdir)/config/commence.am
-if BUILD_PARALLEL_CONDITIONAL
+if BUILD_TESTS_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR=testpar
+else
+ TESTPARALLEL_DIR=
+endif
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR=test
+else
+ TESTSERIAL_DIR=
endif
# Subdirectories in build order, not including examples directory
## Only recurse into subdirectories if HDF5 is configured to use Fortran.
if BUILD_FORTRAN_CONDITIONAL
- SUBDIRS=src test $(TESTPARALLEL_DIR)
+ SUBDIRS=src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR)
endif
# All directories that have Makefiles
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 0183f58..5d941ab 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -410,9 +410,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -427,6 +427,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -445,6 +446,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -472,6 +474,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -479,9 +483,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -497,6 +504,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -530,8 +539,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -545,6 +556,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -586,6 +598,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -669,19 +682,22 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-@BUILD_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar
+@BUILD_TESTS_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
+@BUILD_TESTS_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar
+@BUILD_TESTS_CONDITIONAL_FALSE@TESTSERIAL_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TESTSERIAL_DIR = test
# Subdirectories in build order, not including examples directory
-@BUILD_FORTRAN_CONDITIONAL_TRUE@SUBDIRS = src test $(TESTPARALLEL_DIR)
+@BUILD_FORTRAN_CONDITIONAL_TRUE@SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR)
# All directories that have Makefiles
DIST_SUBDIRS = src test testpar examples
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1188,6 +1204,7 @@ check-clean ::
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1223,7 +1240,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1384,7 +1401,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 5300453..2092dbe 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,16 +1,11 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_F90_EXAMPLES C Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
# with "f90_ex_". This allows for easier filtering of the examples.
# --------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
-
-#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
set (examples
@@ -40,26 +35,38 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ")
- target_link_libraries (f90_ex_${example}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- )
- target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_target_properties (f90_ex_${example} PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER examples/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- )
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ")
- target_link_libraries (f90_ex_${example}-shared
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_compile_options(f90_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ if (NOT ONLY_SHARED_LIBS)
+ target_include_directories (f90_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
+ )
+ target_link_libraries (f90_ex_${example} PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ else ()
+ target_include_directories (f90_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
)
- target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (f90_ex_${example}-shared PROPERTIES
+ target_link_libraries (f90_ex_${example} PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
@@ -67,59 +74,93 @@ foreach (example ${examples})
endif ()
endforeach ()
-if (HDF5_ENABLE_F2003)
- foreach (example ${F2003_examples})
- add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ")
- target_link_libraries (f03_ex_${example}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
+foreach (example ${F2003_examples})
+ add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
+ target_compile_options(f03_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ if (NOT ONLY_SHARED_LIBS)
+ target_include_directories (f03_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
)
- target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (f03_ex_${example} PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (f03_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ")
- target_link_libraries (f03_ex_${example}-shared
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
- )
- target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (f03_ex_${example}-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER examples/fortran03
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
- endif ()
- endforeach ()
-endif ()
+ else ()
+ target_include_directories (f03_ex_${example}
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
+ )
+ target_link_libraries (f03_ex_${example} PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (f03_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran03
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+ endif ()
+endforeach ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ")
- target_link_libraries (f90_ex_ph5example
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- )
- target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_target_properties (f90_ex_ph5example PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER examples/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- )
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ")
- target_link_libraries (f90_ex_ph5example-shared
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_compile_options(f90_ex_ph5example PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ if (NOT ONLY_SHARED_LIBS)
+ target_include_directories (f90_ex_ph5example
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ )
+ target_link_libraries (f90_ex_ph5example
+ PRIVATE
+ ${HDF5_F90_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ )
+ set_target_properties (f90_ex_ph5example PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ else ()
+ target_include_directories (f90_ex_ph5example
+ PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_SRC_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ )
+ target_link_libraries (f90_ex_ph5example
+ PRIVATE
+ ${HDF5_F90_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
- target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (f90_ex_ph5example-shared PROPERTIES
+ set_target_properties (f90_ex_ph5example PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
@@ -127,6 +168,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
endif ()
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index af6b994..e59d6f8 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,101 +16,61 @@
##############################################################################
##############################################################################
+if (HDF5_TEST_SERIAL)
+ set (test_ex_fortran_CLEANFILES
+ compound.h5
+ copy1.h5
+ copy2.h5
+ dsetf.h5
+ extend.h5
+ FORTRAN.h5
+ groupf.h5
+ groupsf.h5
+ h5_cmprss.h5
+ mount1.h5
+ mount2.h5
+ sdsf.h5
+ subset.h5
+ SDScompound.h5
+ test.h5
+ )
+
# Remove any output file left over from previous test run
add_test (
NAME f90_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- compound.h5
- copy1.h5
- copy2.h5
- dsetf.h5
- extend.h5
- FORTRAN.h5
- groupf.h5
- groupsf.h5
- h5_cmprss.h5
- mount1.h5
- mount2.h5
- sdsf.h5
- subset.h5
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex-clear-objects")
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_test (
- NAME f90_ex-shared-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- compound.h5
- copy1.h5
- copy2.h5
- dsetf.h5
- extend.h5
- FORTRAN.h5
- groupf.h5
- groupsf.h5
- h5_cmprss.h5
- mount1.h5
- mount2.h5
- sdsf.h5
- subset.h5
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex-shared-clear-objects")
- endif ()
+ set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
-foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
- else ()
- add_test (NAME f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=f90_ex_${example}.txt"
- #-D "TEST_REFERENCE=f90_ex_${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex_${example}")
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f90_ex-shared_${example} COMMAND $<TARGET_FILE:f90_ex_${example}-shared>)
+ add_test (NAME f90_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f90_ex_${example}>)
else ()
- add_test (NAME f90_ex-shared_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}-shared>"
+ add_test (NAME f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=f90_ex_${example}-shared.txt"
- #-D "TEST_REFERENCE=f90_ex_${example}-shared.out"
+ -D "TEST_OUTPUT=f90_ex_${example}.txt"
+ #-D "TEST_REFERENCE=f90_ex_${example}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (f90_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
+ if (last_test)
+ set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "f90_ex-shared_${example}")
- endif ()
-endforeach ()
+ set (last_test "f90_ex_${example}")
+ endforeach ()
-if (HDF5_ENABLE_F2003)
foreach (example ${F2003_examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
+ add_test (NAME f03_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f03_ex_${example}>)
else ()
add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -121,36 +81,14 @@ if (HDF5_ENABLE_F2003)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (f03_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
+ if (last_test)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex_${example}")
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
- else ()
- add_test (NAME f03_ex-shared_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=f03_ex_${example}-shared.txt"
- #-D "TEST_REFERENCE=f03_ex_${example}-shared.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f03_ex-shared_${example}")
- endif ()
endforeach ()
endif ()
-if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
- endif ()
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND MPI_Fortran_FOUND)
+ add_test (NAME MPI_TEST_f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
endif ()
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index d78cbb3..a7797fe 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -76,8 +76,8 @@ endif
# Tell automake how to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR=$(examplesdir)/fortran
+EXAMPLETOPDIR=$(examplesdir)
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 7cc5bff..e67bfda 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -361,9 +361,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -378,6 +378,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -396,6 +397,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -423,6 +425,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -430,9 +434,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -448,6 +455,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -469,6 +477,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -481,8 +490,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -496,6 +507,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -537,6 +549,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -649,8 +662,8 @@ FORTRAN_API = yes
# Tell automake how to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples
+EXAMPLEDIR = $(examplesdir)/fortran
+EXAMPLETOPDIR = $(examplesdir)
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -660,11 +673,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1153,6 +1166,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1188,7 +1202,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1349,7 +1363,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/fortran/examples/compound.f90 b/fortran/examples/compound.f90
index f5e91d6..c37bbec 100644
--- a/fortran/examples/compound.f90
+++ b/fortran/examples/compound.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This program creates a dataset that is one dimensional array of
diff --git a/fortran/examples/compound_complex_fortran2003.f90 b/fortran/examples/compound_complex_fortran2003.f90
index a0bfe27..bcf1a32 100644
--- a/fortran/examples/compound_complex_fortran2003.f90
+++ b/fortran/examples/compound_complex_fortran2003.f90
@@ -1,16 +1,16 @@
! This is the F2003 version of the h5_compound.c example source code.
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example shows how to create an array of a compound datatype which
! contains an array of type complex and how to write it to hdf5
diff --git a/fortran/examples/compound_fortran2003.f90 b/fortran/examples/compound_fortran2003.f90
index d9f1032..24cd2a2 100644
--- a/fortran/examples/compound_fortran2003.f90
+++ b/fortran/examples/compound_fortran2003.f90
@@ -1,16 +1,16 @@
! This is the F2003 version of the h5_compound.c example source code.
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example shows how to create a compound data type,
! write an array which has the compound data type to the file,
diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90
index 61dd7b0..29d43ec 100644
--- a/fortran/examples/h5_cmprss.f90
+++ b/fortran/examples/h5_cmprss.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example illustrates how to create a compressed dataset.
! It is used in the HDF5 Tutorial.
diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90
index d3df380..33cc13d 100644
--- a/fortran/examples/h5_crtatt.f90
+++ b/fortran/examples/h5_crtatt.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example shows how to create and write a dataset attribute.
! It opens the existing file 'dset.h5', obtains the identifier of
diff --git a/fortran/examples/h5_crtdat.f90 b/fortran/examples/h5_crtdat.f90
index dce4408..ad6408a 100644
--- a/fortran/examples/h5_crtdat.f90
+++ b/fortran/examples/h5_crtdat.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! The following example shows how to create an empty dataset.
diff --git a/fortran/examples/h5_crtgrp.f90 b/fortran/examples/h5_crtgrp.f90
index 12f07e7..ba52c18 100644
--- a/fortran/examples/h5_crtgrp.f90
+++ b/fortran/examples/h5_crtgrp.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! The following example shows how to create and close a group.
diff --git a/fortran/examples/h5_crtgrpar.f90 b/fortran/examples/h5_crtgrpar.f90
index 341b648..a071491 100644
--- a/fortran/examples/h5_crtgrpar.f90
+++ b/fortran/examples/h5_crtgrpar.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! The following example code shows how to create groups
diff --git a/fortran/examples/h5_crtgrpd.f90 b/fortran/examples/h5_crtgrpd.f90
index 41c1f53..61404c7 100644
--- a/fortran/examples/h5_crtgrpd.f90
+++ b/fortran/examples/h5_crtgrpd.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This example shows how to create a dataset in a particular group.
diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90
index 20b91ff..d5b68f4 100644
--- a/fortran/examples/h5_extend.f90
+++ b/fortran/examples/h5_extend.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example extends an HDF5 dataset. It is used in the HDF5 Tutorial.
diff --git a/fortran/examples/h5_rdwt.f90 b/fortran/examples/h5_rdwt.f90
index 2fbd85d..9dee468 100644
--- a/fortran/examples/h5_rdwt.f90
+++ b/fortran/examples/h5_rdwt.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! The following example shows how to write and read to/from an existing dataset.
diff --git a/fortran/examples/h5_subset.f90 b/fortran/examples/h5_subset.f90
index ab33c86..e189820 100644
--- a/fortran/examples/h5_subset.f90
+++ b/fortran/examples/h5_subset.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example shows how to write and read a hyperslab.
! It is used in the HDF5 Tutorial.
diff --git a/fortran/examples/hyperslab.f90 b/fortran/examples/hyperslab.f90
index d340161..2e39aa7 100644
--- a/fortran/examples/hyperslab.f90
+++ b/fortran/examples/hyperslab.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This example shows how to write and read a hyperslab.
diff --git a/fortran/examples/mountexample.f90 b/fortran/examples/mountexample.f90
index 4a2821d..50cf583 100644
--- a/fortran/examples/mountexample.f90
+++ b/fortran/examples/mountexample.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
!In the following example we create one file with a group in it,
diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90
index fac8d15..f1c1d7d 100644
--- a/fortran/examples/nested_derived_type.f90
+++ b/fortran/examples/nested_derived_type.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This example shows how to create a nested compound data type,
! write an array which has the compound data type to the file,
diff --git a/fortran/examples/ph5example.f90 b/fortran/examples/ph5example.f90
index 9d4281e..da82f80 100644
--- a/fortran/examples/ph5example.f90
+++ b/fortran/examples/ph5example.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! Fortran parallel example. Copied from Tutorial's example program of
! dataset.f90.
diff --git a/fortran/examples/refobjexample.f90 b/fortran/examples/refobjexample.f90
index d017598..d420192 100644
--- a/fortran/examples/refobjexample.f90
+++ b/fortran/examples/refobjexample.f90
@@ -6,7 +6,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/fortran/examples/refregexample.f90 b/fortran/examples/refregexample.f90
index ab45598..6764427 100644
--- a/fortran/examples/refregexample.f90
+++ b/fortran/examples/refregexample.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This program shows how to create, store and dereference references
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index 41bf9b1..34782d3 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the fortran examples from source files #
-# installed in .../share/hdf5_examples/fortran using h5fc or h5pfc. The #
+# installed in @examplesdir@/fortran using h5fc or h5pfc. The #
# order for running programs with RunTest in the MAIN section below is taken #
# from the Makefile. The order is important since some of the test programs #
# use data files created by earlier test programs. Any future additions should #
@@ -30,9 +30,32 @@
EXIT_SUCCESS=0
EXIT_FAILURE=1
+#
+# Try to derive the path to the installation $prefix established
+# by ./configure relative to the examples directory established by
+# ./configure. If successful, set `prefix_relto_examplesdir` to the
+# relative path. Otherwise, set `prefix_relto_examplesdir` to the
+# absolute installation $prefix.
+#
+# This script uses the value of `prefix` in the user's environment, if
+# it is set, below. The content of $() is evaluated in a sub-shell, so
+# if `prefix` is set in the user's environment, the shell statements in
+# $() won't clobbered it.
+#
+prefix_relto_examplesdir=$(
+prefix=@prefix@
+examplesdir=@examplesdir@
+if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
+else
+ echo $prefix
+fi
+)
+
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../}"
+prefix="${prefix:-../${prefix_relto_examplesdir}}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
@@ -120,12 +143,11 @@ then
EXIT_VALUE=${EXIT_FAILURE}
fi
fi
-
# Cleanup
rm *.o
rm *.h5
echo
-exit $EXIT_VALUE
+exit $EXIT_VALUE
diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90
index 9f50eae..81daf10 100644
--- a/fortran/examples/rwdset_fortran2003.f90
+++ b/fortran/examples/rwdset_fortran2003.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! The following example shows how to write and read to/from an existing dataset.
diff --git a/fortran/examples/selectele.f90 b/fortran/examples/selectele.f90
index 4281ea6..c1a925c 100644
--- a/fortran/examples/selectele.f90
+++ b/fortran/examples/selectele.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This program creates two files, copy1.h5, and copy2.h5.
diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in
index f384909..db4606f 100644
--- a/fortran/examples/testh5fc.sh.in
+++ b/fortran/examples/testh5fc.sh.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 00035ba..9172033 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-project (HDF5_F90_SRC C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_F90_SRC C Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
@@ -19,95 +19,69 @@ if (WIN32)
endif ()
endif ()
+set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
+
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
# H5test_kind(_SIZEOF,_STORAGE_SIZE).f90 used to generate H5fortran_detect.f90
# H5fortran_detect.f90 used to generate H5fort_type_defines.h
# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90
#-----------------------------------------------------------------------------
-if (FORTRAN_HAVE_STORAGE_SIZE)
- add_executable (H5test_FortranHavekind
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90
- )
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (H5test_FortranHavekind-shared
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90
- )
- endif ()
+if (H5_FORTRAN_HAVE_STORAGE_SIZE)
+ add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90)
set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod")
else ()
- if (FORTRAN_HAVE_SIZEOF)
- add_executable (H5test_FortranHavekind
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90
- )
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (H5test_FortranHavekind-shared
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90
- )
- endif ()
+ if (H5_FORTRAN_HAVE_SIZEOF)
+ add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90)
set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod")
else ()
- add_executable (H5test_FortranHavekind
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
- )
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (H5test_FortranHavekind-shared
- ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
- )
- endif ()
+ add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90)
endif ()
endif ()
-if (WIN32 AND MSVC)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- set_target_properties (H5test_FortranHavekind-shared
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- endif ()
- set_target_properties (H5test_FortranHavekind
- PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
-endif ()
+
set_target_properties (H5test_FortranHavekind PROPERTIES
LINKER_LANGUAGE Fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- set_target_properties (H5test_FortranHavekind-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+#set_property(TARGET H5test_FortranHavekind APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#target_compile_definitions(H5test_FortranHavekind PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>)
+if (MSVC)
+ set_target_properties (H5test_FortranHavekind PROPERTIES
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ COMPILE_FLAGS "/MT"
)
endif ()
+target_include_directories(H5test_FortranHavekind PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
- COMMAND $<TARGET_FILE:H5test_FortranHavekind>
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5test_FortranHavekind>
ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5test_FortranHavekind
)
#-----------------------------------------------------------------------------
-add_executable (H5fortran_detect
- ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
+add_executable (H5fortran_detect ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90)
+target_include_directories(H5fortran_detect PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
+#if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+# target_compile_definitions(H5fortran_detect PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>)
+#endif ()
+if(MSVC)
+ set_property(TARGET H5fortran_detect PROPERTY COMPILE_FLAGS "/MT")
+endif()
+#set_property(TARGET H5fortran_detect APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+if(MSVC)
+ set_property(TARGET H5fortran_detect PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE")
+endif()
+
+set_target_properties (H5fortran_detect PROPERTIES
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-if (WIN32 AND MSVC)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- set_target_properties (H5fortran_detect
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- endif ()
- set_target_properties (H5fortran_detect
- PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
-endif ()
-set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
- COMMAND $<TARGET_FILE:H5fortran_detect>
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5fortran_detect>
ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5fortran_detect
@@ -117,30 +91,33 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
-
-INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+if (NOT ONLY_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
+endif ()
#-----------------------------------------------------------------------------
add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
- COMMAND $<TARGET_FILE:H5match_types>
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS H5match_types
-)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90 PROPERTIES GENERATED TRUE)
+target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT ONLY_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
+ DEPENDS H5match_types
+ )
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90 PROPERTIES GENERATED TRUE)
+endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.f90
- COMMAND $<TARGET_FILE:H5match_types>
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
DEPENDS H5match_types
)
@@ -170,6 +147,12 @@ set (f90CStub_C_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c
)
set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C)
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set (f90CStub_C_SOURCES
+ ${f90CStub_C_SOURCES}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c
+ )
+endif ()
set (f90CStub_C_HDRS
# generated files
@@ -180,32 +163,39 @@ set (f90CStub_C_SHHDRS
${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
-add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
-target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
-TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
- FOLDER libraries/fortran
- LINKER_LANGUAGE C
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set (install_targets ${HDF5_F90_C_LIB_TARGET})
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
+ target_include_directories (${HDF5_F90_C_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_F90_C_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ LINKER_LANGUAGE C
+ )
+ set (install_targets ${HDF5_F90_C_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
- target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
- TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
+ target_include_directories (${HDF5_F90_C_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
+ TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE C
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET})
endif ()
@@ -224,7 +214,7 @@ endif ()
#-----------------------------------------------------------------------------
# Fortran Real Size
#-----------------------------------------------------------------------------
-if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+if (H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
# default real is 4 bytes, so include double signatures
set (F_DBLE "Include")
else ()
@@ -233,12 +223,32 @@ else ()
endif ()
#-----------------------------------------------------------------------------
-# Fortran Modules
+# Add Target to clang-format
#-----------------------------------------------------------------------------
-set (f90_F_SRCS
- # generated files
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIB_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ else ()
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIBSH_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ endif ()
+endif ()
+#-----------------------------------------------------------------------------
+# Fortran Modules
+#-----------------------------------------------------------------------------
+set (f90_F_BASE_SOURCES
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5_ff${F_STATUS}.f90
@@ -272,74 +282,104 @@ set (f90_F_SRCS
# Add H5FDMPIO if parallel
#-----------------------------------------------------------------------------
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- set (f90_F_SRCS
- ${f90_F_SRCS}
+ set (f90_F_BASE_SOURCES
+ ${f90_F_BASE_SOURCES}
${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90
)
else ()
- set (f90_F_SRCS
- ${f90_F_SRCS}
+ set (f90_F_BASE_SOURCES
+ ${f90_F_BASE_SOURCES}
${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90
)
endif ()
-set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran)
+
+if (NOT ONLY_SHARED_LIBS)
+ set (f90_F_SRCS
+ # generated files
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
+
+ ${f90_F_BASE_SOURCES}
+ )
+ set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran)
+endif ()
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ set (f90_F_SRCS_SHARED
+ # generated files
+ ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.f90
+
+ ${f90_F_BASE_SOURCES}
+ )
+ set_source_files_properties (${f90_F_SRCS_SHARED} PROPERTIES LANGUAGE Fortran)
+endif ()
#-----------------------------------------------------------------------------
# Add Main fortran library
#-----------------------------------------------------------------------------
-add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS})
-set (SHARED_LINK_FLAGS " ")
-TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET})
-target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS})
-target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
-endif ()
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
- FOLDER libraries/fortran
- LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
-)
-if (WIN32)
- set_property (TARGET ${HDF5_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS})
+ target_include_directories (${HDF5_F90_LIB_TARGET}
+ PRIVATE "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
+ )
+ target_compile_options(${HDF5_F90_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_F90_LIB_TARGET}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_LIB_TARGET}
+ PUBLIC ${HDF5_F90_C_LIB_TARGET}
+ PRIVATE
+ ${LINK_Fortran_LIBS}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
+# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
+ set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
endif ()
-set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS})
- set (SHARED_LINK_FLAGS " ")
- if (WIN32 AND MSVC)
- set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
- endif ()
- TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET})
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
- target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
- endif ()
- set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
- H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")
+ add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS_SHARED})
+ target_include_directories (${HDF5_F90_LIBSH_TARGET}
+ PRIVATE "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
+ )
+ target_compile_options(${HDF5_F90_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_F90_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_DLL;HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_LIBSH_TARGET}
+ PUBLIC ${HDF5_F90_C_LIBSH_TARGET}
+ PRIVATE ${LINK_Fortran_LIBS} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ )
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">)
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def">)
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} /DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
+ endif()
set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32)
- set_property (TARGET ${HDF5_F90_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS"
- )
- endif ()
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")
set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET})
endif ()
@@ -351,52 +391,91 @@ install (
${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
- ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
+if (NOT ONLY_SHARED_LIBS)
+ install (
+ FILES
+ ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+endif ()
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ install (
+ FILES
+ ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.f90
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+endif ()
-set (mod_files
- ${MOD_BUILD_DIR}/h5fortran_types.mod
- ${MOD_BUILD_DIR}/hdf5.mod
- ${MOD_BUILD_DIR}/h5global.mod
- ${MOD_BUILD_DIR}/h5a.mod
- ${MOD_BUILD_DIR}/h5d.mod
- ${MOD_BUILD_DIR}/h5e.mod
- ${MOD_BUILD_DIR}/h5f.mod
- ${MOD_BUILD_DIR}/h5g.mod
- ${MOD_BUILD_DIR}/h5i.mod
- ${MOD_BUILD_DIR}/h5l.mod
- ${MOD_BUILD_DIR}/h5lib.mod
- ${MOD_BUILD_DIR}/h5o.mod
- ${MOD_BUILD_DIR}/h5p.mod
- ${MOD_BUILD_DIR}/h5r.mod
- ${MOD_BUILD_DIR}/h5s.mod
- ${MOD_BUILD_DIR}/h5t.mod
- ${MOD_BUILD_DIR}/h5z.mod
- ${MOD_BUILD_DIR}/h5a_provisional.mod
- ${MOD_BUILD_DIR}/h5d_provisional.mod
- ${MOD_BUILD_DIR}/h5e_provisional.mod
- ${MOD_BUILD_DIR}/h5f_provisional.mod
- ${MOD_BUILD_DIR}/h5l_provisional.mod
- ${MOD_BUILD_DIR}/h5lib_provisional.mod
- ${MOD_BUILD_DIR}/h5o_provisional.mod
- ${MOD_BUILD_DIR}/h5p_provisional.mod
- ${MOD_BUILD_DIR}/h5r_provisional.mod
- ${MOD_BUILD_DIR}/h5t_provisional.mod
- ${MOD_BUILD_DIR}/h5_dble_interface.mod
-)
-install (
- FILES
+if (NOT ONLY_SHARED_LIBS)
+ set (mod_files
+ ${MOD_BUILD_DIR}/h5fortran_types.mod
+ ${MOD_BUILD_DIR}/hdf5.mod
+ ${MOD_BUILD_DIR}/h5global.mod
+ ${MOD_BUILD_DIR}/h5a.mod
+ ${MOD_BUILD_DIR}/h5d.mod
+ ${MOD_BUILD_DIR}/h5e.mod
+ ${MOD_BUILD_DIR}/h5f.mod
+ ${MOD_BUILD_DIR}/h5g.mod
+ ${MOD_BUILD_DIR}/h5i.mod
+ ${MOD_BUILD_DIR}/h5l.mod
+ ${MOD_BUILD_DIR}/h5lib.mod
+ ${MOD_BUILD_DIR}/h5o.mod
+ ${MOD_BUILD_DIR}/h5p.mod
+ ${MOD_BUILD_DIR}/h5r.mod
+ ${MOD_BUILD_DIR}/h5s.mod
+ ${MOD_BUILD_DIR}/h5t.mod
+ ${MOD_BUILD_DIR}/h5z.mod
+ ${MOD_BUILD_DIR}/h5a_provisional.mod
+ ${MOD_BUILD_DIR}/h5d_provisional.mod
+ ${MOD_BUILD_DIR}/h5e_provisional.mod
+ ${MOD_BUILD_DIR}/h5f_provisional.mod
+ ${MOD_BUILD_DIR}/h5l_provisional.mod
+ ${MOD_BUILD_DIR}/h5lib_provisional.mod
+ ${MOD_BUILD_DIR}/h5o_provisional.mod
+ ${MOD_BUILD_DIR}/h5p_provisional.mod
+ ${MOD_BUILD_DIR}/h5r_provisional.mod
+ ${MOD_BUILD_DIR}/h5t_provisional.mod
+ ${MOD_BUILD_DIR}/h5_dble_interface.mod
+ )
+ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set (mod_files
${mod_files}
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/static
- COMPONENT
- fortheaders
-)
+ ${MOD_BUILD_DIR}/HDF5mpio.mod
+ ${MOD_BUILD_DIR}/H5FDmpioff.mod
+ )
+ endif ()
+ install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}/static
+ COMPONENT
+ fortheaders
+ )
+ if (HDF5_INSTALL_MOD_FORTRAN MATCHES "STATIC")
+ install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+ endif ()
+endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (modsh_files
@@ -429,6 +508,13 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
${MODSH_BUILD_DIR}/h5t_provisional.mod
${MODSH_BUILD_DIR}/h5_dble_interface.mod
)
+ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set (modsh_files
+ ${modsh_files}
+ ${MODSH_BUILD_DIR}/HDF5mpio.mod
+ ${MODSH_BUILD_DIR}/H5FDmpioff.mod
+ )
+ endif ()
install (
FILES
${modsh_files}
@@ -437,6 +523,16 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
COMPONENT
fortheaders
)
+ if (HDF5_INSTALL_MOD_FORTRAN MATCHES "SHARED")
+ install (
+ FILES
+ ${modsh_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -447,8 +543,10 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
+ endif ()
install (
TARGETS
@@ -462,3 +560,51 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_F90_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}")
+endif ()
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT fortlibraries
+)
+
+if (NOT WIN32 AND NOT MINGW)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT fortlibraries
+ )
+endif ()
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index f25ee94..ccc20fa 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -44,29 +44,30 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id)
+nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id)
/*******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL);
- /*
- * Call H5Acreate2 function.
- */
- if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0)
+ /*
+ * Call H5Acreate2 function.
+ */
+ if ((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*crt_prp, (hid_t)*aapl)) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -90,28 +91,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id)
+nh5aopen_name_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id)
/*******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
HGOTO_DONE(FAIL);
- /*
- * Call H5Aopen function.
- */
- if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_name, H5P_DEFAULT)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aopen function.
+ */
+ if ((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_name, H5P_DEFAULT)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -136,98 +137,96 @@ done:
* dims paramete added.
* April 4, 2001
* SOURCE
-*/
+ */
int_f
-nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5awritec_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
-
-
/****if* H5Af/h5awrite_c
* NAME
* h5awrite_c
@@ -252,264 +251,263 @@ nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
* called by Fortran routines.
* October 9, 2006 EIP
* SOURCE
-*/
+ */
int_f
-nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_integer_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_real_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_double_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5awrite_c function.
- */
- return nh5awrite_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5awrite_c function.
+ */
+ return nh5awrite_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
+nh5awrite_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Awrite function.
- */
- if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0)
+ /*
+ * Call H5Awrite function.
+ */
+ if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0)
HGOTO_DONE(FAIL);
done:
- return ret_value;
+ return ret_value;
}
-
/****if* H5Af/h5areadc_c
* NAME
* h5areadc_c
@@ -535,97 +533,95 @@ done:
* called by Fortran routines.
* October 9, 2006 EIP
* SOURCE
-*/
+ */
int_f
-nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
int_f
-nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
+nh5areadc_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims);
}
-
-
/****if* H5Af/h5aread_c
* NAME
* h5aread_c
@@ -651,264 +647,263 @@ nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims)
* called by Fortran routines.
* October 9, 2006 EIP
* SOURCE
-*/
+ */
int_f
-nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Aread function.
- */
- if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aread function.
+ */
+ if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0)
+ HGOTO_DONE(FAIL);
done:
- return ret_value;
+ return ret_value;
}
int_f
-nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_integer_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_real_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
int_f
-nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims)
+nh5aread_double_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims)
/******/
{
- /*
- * Call h5aread_c function.
- */
- return nh5aread_c(attr_id, mem_type_id, buf, dims);
+ /*
+ * Call h5aread_c function.
+ */
+ return nh5aread_c(attr_id, mem_type_id, buf, dims);
}
-
/****if* H5Af/h5aclose_c
* NAME
* h5aclose_c
@@ -924,13 +919,13 @@ nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aclose_c ( hid_t_f *attr_id )
+nh5aclose_c(hid_t_f *attr_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
if (H5Aclose((hid_t)*attr_id) < 0)
HGOTO_DONE(FAIL);
@@ -956,34 +951,33 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen)
+nh5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
HGOTO_DONE(FAIL);
- /*
- * Call H5Adelete function.
- */
- if(H5Adelete((hid_t)*obj_id, c_name) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Adelete function.
+ */
+ if (H5Adelete((hid_t)*obj_id, c_name) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
-
/****if* H5Af/h5aopen_idx_c
* NAME
* h5aopen_idx_c
@@ -1002,24 +996,24 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id)
+nh5aopen_idx_c(hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Aopen_by_idx function.
- */
- if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ /*
+ * Call H5Aopen_by_idx function.
+ */
+ if ((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC,
+ (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_DONE(FAIL);
done:
- return ret_value;
+ return ret_value;
}
-
/****if* H5Af/h5aget_space_c
* NAME
* h5aget_space_c
@@ -1037,21 +1031,21 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id)
+nh5aget_space_c(hid_t_f *attr_id, hid_t_f *space_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Aget_space function.
- */
- if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_space function.
+ */
+ if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Af/h5aget_type_c
@@ -1071,21 +1065,21 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id)
+nh5aget_type_c(hid_t_f *attr_id, hid_t_f *type_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Aget_type function.
- */
- if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_type function.
+ */
+ if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Af/h5aget_num_attrs_c
@@ -1105,25 +1099,25 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
+nh5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num)
/******/
{
- H5O_info_t oinfo; /* Object info */
- int_f ret_value = 0; /* Return value */
+ H5O_info_t oinfo; /* Object info */
+ int_f ret_value = 0; /* Return value */
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info((hid_t)*obj_id, &oinfo) < 0)
+ if (H5Oget_info((hid_t)*obj_id, &oinfo) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
*attr_num = (int_f)oinfo.num_attrs;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Af/h5aget_name_c
@@ -1144,37 +1138,38 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
/******/
{
- size_t c_bufsize;
- char *c_buf=NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
+ size_t c_bufsize;
+ char * c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- c_bufsize = (size_t)*bufsize+1;
+ c_bufsize = (size_t)*bufsize + 1;
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
- HGOTO_DONE(FAIL);
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aget_name function
- */
- if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, c_bufsize, c_buf)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_name function
+ */
+ if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, c_bufsize, c_buf)) < 0)
+ HGOTO_DONE(FAIL);
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize-1);
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize - 1);
done:
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Af/h5aget_storage_size_c
@@ -1194,13 +1189,13 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size)
+nh5aget_storage_size_c(hid_t_f *attr_id, hsize_t_f *size)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
if ((*size = (hsize_t_f)H5Aget_storage_size((hid_t)*attr_id)) < 0)
HGOTO_DONE(FAIL);
@@ -1226,13 +1221,13 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id)
+nh5aget_create_plist_c(hid_t_f *attr_id, hid_t_f *creation_prop_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
if ((*creation_prop_id = (hid_t_f)H5Aget_create_plist((hid_t)*attr_id)) < 0)
HGOTO_DONE(FAIL);
@@ -1266,39 +1261,38 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen,
- hid_t_f *lapl_id )
+nh5arename_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name,
+ size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen,
+ hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_old_attr_name = NULL; /* Buffer to hold C string */
- char *c_new_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ char *c_old_attr_name = NULL; /* Buffer to hold C string */
+ char *c_new_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- if(H5Arename_by_name((hid_t)*loc_id,c_obj_name,c_old_attr_name,c_new_attr_name,(hid_t)*lapl_id) < 0)
+ if (H5Arename_by_name((hid_t)*loc_id, c_obj_name, c_old_attr_name, c_new_attr_name, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_old_attr_name)
- HDfree(c_old_attr_name);
- if(c_new_attr_name)
- HDfree(c_new_attr_name);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_old_attr_name)
+ HDfree(c_old_attr_name);
+ if (c_new_attr_name)
+ HDfree(c_new_attr_name);
return ret_value;
}
@@ -1322,28 +1316,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id)
+nh5aopen_c(hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id)
/******/
{
- char *c_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
HGOTO_DONE(FAIL);
- /*
- * Call H5Aopen function.
- */
+ /*
+ * Call H5Aopen function.
+ */
- if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_attr_name, (hid_t)*aapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_attr_name, (hid_t)*aapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
}
@@ -1370,33 +1364,34 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id)
+nh5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ char *c_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Adelete_by_name function.
- */
- if(H5Adelete_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Adelete_by_name function.
+ */
+ if (H5Adelete_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
}
@@ -1423,29 +1418,30 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
+nh5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order,
+ hsize_t_f *n, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Adelete_by_name function.
- */
- if(H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*lapl_id) < 0)
+ /*
+ * Call H5Adelete_by_name function.
+ */
+ if (H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -1493,51 +1489,50 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name,
- size_t_f *size, hid_t_f *lapl_id)
+nh5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order,
+ hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
ssize_t c_size;
- size_t c_buf_size;
- char *c_buf = NULL;
- int_f ret_value = 0; /* Return value */
+ size_t c_buf_size;
+ char * c_buf = NULL;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
/*
* Allocate buffer to hold name of an attribute
*/
c_buf_size = (size_t)*size + 1;
- if(NULL == (c_buf = (char *)HDmalloc(c_buf_size)))
+ if (NULL == (c_buf = (char *)HDmalloc(c_buf_size)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Aget_name_by_idx function.
- */
- c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, c_buf, c_buf_size,(hid_t)*lapl_id);
- if(c_size < 0)
+ /*
+ * Call H5Aget_name_by_idx function.
+ */
+ c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, c_buf, c_buf_size, (hid_t)*lapl_id);
+ if (c_size < 0)
HGOTO_DONE(FAIL)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_buf_size - 1);
- *size = (size_t_f)c_size;
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_buf_size - 1);
+ *size = (size_t_f)c_size;
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_buf)
- HDfree(c_buf);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_buf)
+ HDfree(c_buf);
return ret_value;
}
@@ -1576,29 +1571,31 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id )
+nh5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order,
+ hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Aopen_by_idx function.
- */
- if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
+ /*
+ * Call H5Aopen_by_idx function.
+ */
+ if ((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type,
+ (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*aapl_id,
+ (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -1626,30 +1623,29 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+nh5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
H5A_info_t ainfo;
-
- /*
- * Call H5Aget_info function.
- */
- if(H5Aget_info((hid_t)*loc_id,&ainfo) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_info function.
+ */
+ if (H5Aget_info((hid_t)*loc_id, &ainfo) < 0)
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
*corder_valid = 0;
- if(ainfo.corder_valid > 0) *corder_valid = 1;
+ if (ainfo.corder_valid > 0)
+ *corder_valid = 1;
- *corder = (int_f)ainfo.corder;
- *cset = (int_f)ainfo.cset;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
@@ -1695,41 +1691,40 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+nh5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order,
+ hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset,
+ hsize_t_f *data_size)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
H5A_info_t ainfo;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Ainfo_by_idx function.
- */
- if(H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n,
- &ainfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Ainfo_by_idx function.
+ */
+ if (H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, &ainfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL)
/* Unpack the structure */
*corder_valid = 0;
- if(ainfo.corder_valid > 0)
+ if (ainfo.corder_valid > 0)
*corder_valid = 1;
- *corder = (int_f)ainfo.corder;
- *cset = (int_f)ainfo.cset;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -1762,45 +1757,44 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+nh5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder,
+ int_f *cset, hsize_t_f *data_size)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_attr_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_attr_name = NULL; /* Buffer to hold C string */
H5A_info_t ainfo;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)))
+ if (NULL == (c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Ainfo_by_name function.
- */
- if(H5Aget_info_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, &ainfo, (hid_t)*lapl_id) < 0)
+ /*
+ * Call H5Ainfo_by_name function.
+ */
+ if (H5Aget_info_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, &ainfo, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
/* Unpack the structure */
*corder_valid = 0;
- if(ainfo.corder_valid > 0)
+ if (ainfo.corder_valid > 0)
*corder_valid = 1;
- *corder = (int_f)ainfo.corder;
- *cset = (int_f)ainfo.cset;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
@@ -1839,37 +1833,37 @@ done:
* SOURCE
*/
int_f
-nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id,
- hid_t_f *lapl_id, hid_t_f *attr_id )
+nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id,
+ hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ char *c_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Acreate_by_name function.
- */
- if((*attr_id = (hid_t_f)H5Acreate_by_name((hid_t)*loc_id, c_obj_name, c_attr_name,
- (hid_t)*type_id, (hid_t)*space_id,(hid_t)*acpl_id,(hid_t)*aapl_id,(hid_t)*lapl_id )) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Acreate_by_name function.
+ */
+ if ((*attr_id = (hid_t_f)H5Acreate_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*type_id,
+ (hid_t)*space_id, (hid_t)*acpl_id, (hid_t)*aapl_id,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_attr_name)
- HDfree(c_attr_name);
- return ret_value;
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_attr_name)
+ HDfree(c_attr_name);
+ return ret_value;
}
/****if* H5Af/h5aexists_c
@@ -1892,28 +1886,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists)
+nh5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aexists function.
- */
- if((*attr_exists = (hid_t_f)H5Aexists((hid_t)*obj_id, c_name)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aexists function.
+ */
+ if ((*attr_exists = (hid_t_f)H5Aexists((hid_t)*obj_id, c_name)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -1940,34 +1934,35 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *lapl_id, int_f *attr_exists)
+nh5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold object name C string */
- char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold object name C string */
+ char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aexists_by_name function.
- */
- if((*attr_exists = (int_f)H5Aexists_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aexists_by_name function.
+ */
+ if ((*attr_exists = (int_f)H5Aexists_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id)) <
+ 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
}
@@ -1995,36 +1990,37 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
+nh5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold object name C string */
- char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold object name C string */
+ char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aopen function.
- */
- if((*attr_id = (hid_t_f)H5Aopen_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aopen function.
+ */
+ if ((*attr_id = (hid_t_f)H5Aopen_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*aapl_id,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
- done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_attr_name)
- HDfree(c_attr_name);
- return ret_value;
+done:
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_attr_name)
+ HDfree(c_attr_name);
+ return ret_value;
}
/****if* H5Af/h5arename_c
@@ -2048,33 +2044,32 @@ nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5arename_c( hid_t_f *loc_id,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen)
+nh5arename_c(hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name,
+ size_t_f *new_attr_namelen)
/******/
{
- char *c_old_attr_name = NULL; /* Buffer to hold C string */
- char *c_new_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ char *c_old_attr_name = NULL; /* Buffer to hold C string */
+ char *c_new_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- if(H5Arename((hid_t)*loc_id,c_old_attr_name,c_new_attr_name) < 0)
+ if (H5Arename((hid_t)*loc_id, c_old_attr_name, c_new_attr_name) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_old_attr_name)
- HDfree(c_old_attr_name);
- if(c_new_attr_name)
- HDfree(c_new_attr_name);
+ if (c_old_attr_name)
+ HDfree(c_old_attr_name);
+ if (c_new_attr_name)
+ HDfree(c_new_attr_name);
return ret_value;
}
/****if* H5Af/h5awrite_f_c
@@ -2095,19 +2090,20 @@ done:
*
*
* SOURCE
-*/
+ */
int_f
-h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
+h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- ret = H5Awrite( (hid_t)*attr_id, (hid_t)*mem_type_id, buf);
+ ret = H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Af/h5aread_f_c
@@ -2128,18 +2124,18 @@ h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
*
*
* SOURCE
-*/
+ */
int_f
-h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
+h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- ret = H5Aread( (hid_t)*attr_id, (hid_t)*mem_type_id, buf);
+ ret = H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90
index b03aa4a..d6a372c 100644
--- a/fortran/src/H5Aff.f90
+++ b/fortran/src/H5Aff.f90
@@ -10,18 +10,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90
index c8176c5..324bfcd 100644
--- a/fortran/src/H5Aff_F03.f90
+++ b/fortran/src/H5Aff_F03.f90
@@ -12,18 +12,18 @@
! instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
!
diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90
index 771c263..5be90d8 100644
--- a/fortran/src/H5Aff_F90.f90
+++ b/fortran/src/H5Aff_F90.f90
@@ -15,18 +15,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 9c67e82..400d70a 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -44,34 +44,34 @@
* - Added optional parameters introduced in version 1.8
* February, 2008
* SOURCE
-*/
+ */
int_f
-nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
+nh5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
/******/
{
- char *c_name = NULL;
- hid_t c_dset_id;
- int ret_value = -1;
+ char *c_name = NULL;
+ hid_t c_dset_id;
+ int ret_value = -1;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- goto DONE;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto DONE;
- /*
- * Call H5Dcreate2 function.
- */
- if((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id,
- (hid_t)*lcpl_id, (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
- goto DONE;
- *dset_id = (hid_t_f)c_dset_id;
+ /*
+ * Call H5Dcreate2 function.
+ */
+ if ((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*lcpl_id,
+ (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
+ goto DONE;
+ *dset_id = (hid_t_f)c_dset_id;
- ret_value = 0;
+ ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -96,37 +96,36 @@ DONE:
* HISTORY
* Added 1.8 parameter: dapl_id
* SOURCE
-*/
+ */
int_f
nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id)
/******/
{
- char *c_name = NULL;
- hid_t c_dset_id;
- int ret_value = -1;
+ char *c_name = NULL;
+ hid_t c_dset_id;
+ int ret_value = -1;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- goto DONE;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto DONE;
- /*
- * Call H5Dopen2 function.
- */
- if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0)
- goto DONE;
+ /*
+ * Call H5Dopen2 function.
+ */
+ if ((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0)
+ goto DONE;
- *dset_id = (hid_t_f)c_dset_id;
- ret_value = 0;
+ *dset_id = (hid_t_f)c_dset_id;
+ ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
-
/****if* H5Df/h5dwritec_c
* NAME
* h5dwritec_c
@@ -151,129 +150,138 @@ DONE:
* SOURCE
*/
int_f
-nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dwritec_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dwrite_c function.
- */
- ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
/****if* H5Df/h5dwrite_c
@@ -303,287 +311,304 @@ nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h
* October 10, 2006 EIP
*
* SOURCE
-*/
+ */
int_f
-nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims)
+nh5dwrite_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_integer_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
int_f
-nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_real_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dwrite_double_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dwrite_c function.
- */
- return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dwrite_c function.
+ */
+ return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
-
/****if* H5Df/h5dwrite_ref_obj_c
* NAME
* h5dwrite_ref_obj_c
@@ -606,19 +631,20 @@ nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space
* This function was added to accomodate h5dwrite_f with the
* dims argumnet being of INTEGER(HSIZE_T) type.
* SOURCE
-*/
+ */
int_f
-nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims)
+nh5dwrite_ref_obj_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hobj_ref_t *buf_c;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hobj_ref_t * buf_c;
unsigned int i, n;
/*
@@ -629,24 +655,26 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
/*
* Allocate temporary buffer and copy references from Fortran.
*/
- n = (unsigned int)*dims;
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n);
- if ( buf_c != NULL ) {
+ n = (unsigned int)*dims;
+ buf_c = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * n);
+ if (buf_c != NULL) {
for (i = 0; i < n; i++)
- HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t));
+ HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t));
}
- else return ret_value;
+ else
+ return ret_value;
/*
* Call H5Dwrite function.
*/
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
HDfree(buf_c);
- if (ret < 0) return ret_value;
+ if (ret < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -673,55 +701,55 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
* This function was added to accomodate h5dwrite_f with the
* dims argument being of INTEGER(HSIZE_T) type
* SOURCE
-*/
+ */
int_f
-nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
+nh5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hdset_reg_ref_t *buf_c = NULL;
- unsigned int i, n;
-
- n = (unsigned int)*dims;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer and copy references from Fortran.
- */
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n);
- if ( buf_c != NULL ) {
- for (i = 0; i < n; i++) {
- HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
- buf = buf + REF_REG_BUF_LEN_F;
- }
- }
- else return ret_value;
-
-
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- HDfree(buf_c);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hdset_reg_ref_t *buf_c = NULL;
+ unsigned int i, n;
+ n = (unsigned int)*dims;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+ /*
+ * Allocate temporary buffer and copy references from Fortran.
+ */
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * n);
+ if (buf_c != NULL) {
+ for (i = 0; i < n; i++) {
+ HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
+ buf = buf + REF_REG_BUF_LEN_F;
+ }
+ }
+ else
+ return ret_value;
+
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ HDfree(buf_c);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
/****if* H5Df/h5dreadc_c
* NAME
@@ -745,131 +773,140 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
* This function was added to accomodate h5dread_f subroutine
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
* SOURCE
-*/
+ */
int_f
-nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
int_f
-nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
+nh5dreadc_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dread_c function.
- */
- ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
+ /*
+ * Call h5dread_c function.
+ */
+ ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims);
- return ret_value;
+ return ret_value;
}
/****if* H5Df/h5dread_c
@@ -900,276 +937,302 @@ nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi
* October 10, 2006 EIP
*
* SOURCE
-*/
+ */
int_f
-nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims)
+nh5dread_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_integer_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_real_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
int_f
-nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
+nh5dread_double_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf, hsize_t_f *dims)
{
- /*
- * Call h5dread_c function.
- */
- return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
+ /*
+ * Call h5dread_c function.
+ */
+ return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims);
}
/****if* H5Df/h5dread_ref_obj_c
@@ -1194,20 +1257,21 @@ nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
* This function was added to accomodate h5dread_f subroutine
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
* SOURCE
-*/
+ */
int_f
-nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims)
+nh5dread_ref_obj_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
+ int ret_value = -1;
+ herr_t ret = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
hobj_ref_t *buf_c = NULL;
- hsize_t i,n;
+ hsize_t i, n;
/*
* Define transfer property
@@ -1217,24 +1281,26 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
/*
* Allocate temporary buffer.
*/
- n = (hsize_t)*dims;
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n);
- if ( buf_c != NULL ) {
+ n = (hsize_t)*dims;
+ buf_c = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)n);
+ if (buf_c != NULL) {
/*
* Call H5Dread function.
*/
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
c_file_space_id = (hid_t)*file_space_id;
ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
- for (i = 0; i < n; i++)
- HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t));
+ if (ret >= 0) {
+ for (i = 0; i < n; i++)
+ HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t));
}
- if ( buf_c != NULL ) HDfree(buf_c);
+ if (buf_c != NULL)
+ HDfree(buf_c);
}
- if (ret < 0) return ret_value;
+ if (ret < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -1261,54 +1327,55 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
* This function was added to accomodate h5dread_f subroutine
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
* SOURCE
-*/
+ */
int_f
-nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims)
+nh5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hdset_reg_ref_t *buf_c = NULL;
- hsize_t i, n;
- n = (hsize_t)*dims;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer.
- */
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(size_t)n);
- if ( buf_c != NULL ) {
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
+ int ret_value = -1;
+ herr_t ret = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hdset_reg_ref_t *buf_c = NULL;
+ hsize_t i, n;
+ n = (hsize_t)*dims;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate temporary buffer.
+ */
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * (size_t)n);
+ if (buf_c != NULL) {
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ if (ret >= 0) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
- buf = buf + REF_REG_BUF_LEN_F;
+ HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
+ buf = buf + REF_REG_BUF_LEN_F;
}
- }
- if ( buf_c != NULL ) HDfree(buf_c);
- }
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ }
+ if (buf_c != NULL)
+ HDfree(buf_c);
+ }
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
-
/****if* H5Df/h5dclose_c
* NAME
* h5dclose_c
@@ -1324,17 +1391,18 @@ nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dclose_c ( hid_t_f *dset_id )
+nh5dclose_c(hid_t_f *dset_id)
/******/
{
- int ret_value = 0;
- hid_t c_dset_id;
- c_dset_id = (hid_t)*dset_id;
- if ( H5Dclose(c_dset_id) < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_dset_id;
+ c_dset_id = (hid_t)*dset_id;
+ if (H5Dclose(c_dset_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Df/h5dget_space_c
@@ -1354,22 +1422,23 @@ nh5dclose_c ( hid_t_f *dset_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id)
+nh5dget_space_c(hid_t_f *dset_id, hid_t_f *space_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_space_id;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_space_id;
- c_dset_id = (hid_t)*dset_id;
- c_space_id = H5Dget_space(c_dset_id);
- if(c_space_id < 0 ) return ret_value;
- ret_value = 0;
- *space_id = (hid_t_f)c_space_id;
- return ret_value;
+ c_dset_id = (hid_t)*dset_id;
+ c_space_id = H5Dget_space(c_dset_id);
+ if (c_space_id < 0)
+ return ret_value;
+ ret_value = 0;
+ *space_id = (hid_t_f)c_space_id;
+ return ret_value;
}
/****if* H5Df/h5dget_type_c
@@ -1389,24 +1458,25 @@ nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id)
+nh5dget_type_c(hid_t_f *dset_id, hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_type_id;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_type_id;
- c_dset_id = (hid_t)*dset_id;
- c_type_id = H5Dget_type(c_dset_id);
+ c_dset_id = (hid_t)*dset_id;
+ c_type_id = H5Dget_type(c_dset_id);
- if(c_type_id < 0 ) return ret_value;
+ if (c_type_id < 0)
+ return ret_value;
- *type_id = (hid_t_f)c_type_id;
- ret_value = 0;
- return ret_value;
+ *type_id = (hid_t_f)c_type_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_create_plist_c
@@ -1427,27 +1497,27 @@ nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id)
+nh5dget_create_plist_c(hid_t_f *dset_id, hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_plist_id;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_plist_id;
- c_dset_id = (hid_t)*dset_id;
- c_plist_id = H5Dget_create_plist(c_dset_id);
+ c_dset_id = (hid_t)*dset_id;
+ c_plist_id = H5Dget_create_plist(c_dset_id);
- if(c_plist_id < 0 ) return ret_value;
+ if (c_plist_id < 0)
+ return ret_value;
- ret_value = 0;
- *plist_id = (hid_t_f)c_plist_id;
- return ret_value;
+ ret_value = 0;
+ *plist_id = (hid_t_f)c_plist_id;
+ return ret_value;
}
-
/****if* H5Df/h5dset_extent_c
* NAME
* h5dset_extent_c
@@ -1468,37 +1538,38 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id)
* to h5dset_extent in order to match new fortran interface.
* -MSB- March 14, 2008
* SOURCE
-*/
+ */
int_f
-nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
+nh5dset_extent_c(hid_t_f *dset_id, hsize_t_f *dims)
/******/
{
- hid_t c_space_id;
- hsize_t c_dims[H5S_MAX_RANK];
- int rank;
- int i;
- int status;
- int ret_value = -1;
+ hid_t c_space_id;
+ hsize_t c_dims[H5S_MAX_RANK];
+ int rank;
+ int i;
+ int status;
+ int ret_value = -1;
- if((c_space_id = H5Dget_space((hid_t)*dset_id)) < 0) return ret_value;
+ if ((c_space_id = H5Dget_space((hid_t)*dset_id)) < 0)
+ return ret_value;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- H5Sclose(c_space_id);
- if(rank < 0 ) return ret_value;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ H5Sclose(c_space_id);
+ if (rank < 0)
+ return ret_value;
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for (i = 0; i < rank; i++)
+ c_dims[i] = (hsize_t)dims[rank - i - 1];
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
- for(i = 0; i < rank; i++)
- c_dims[i] = (hsize_t)dims[rank - i - 1];
-
- status = H5Dset_extent((hid_t)*dset_id, c_dims);
+ status = H5Dset_extent((hid_t)*dset_id, c_dims);
- if(status >= 0)
- ret_value = 0;
- return ret_value;
+ if (status >= 0)
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/nh5dget_storage_size_c
@@ -1519,22 +1590,23 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size)
+nh5dget_storage_size_c(hid_t_f *dset_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hsize_t c_size;
- hid_t c_dset_id;
+ int ret_value = -1;
+ hsize_t c_size;
+ hid_t c_dset_id;
- c_dset_id = (hid_t)*dset_id;
- c_size = H5Dget_storage_size(c_dset_id);
- if (c_size == 0) return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
- return ret_value;
+ c_dset_id = (hid_t)*dset_id;
+ c_size = H5Dget_storage_size(c_dset_id);
+ if (c_size == 0)
+ return ret_value;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/nh5dvlen_get_max_len_c
@@ -1556,44 +1628,48 @@ nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len)
+nh5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len)
/******/
{
- int ret_value = -1;
- size_t c_len;
- hid_t c_dset_id;
- hid_t c_type_id;
- hid_t c_space_id;
- hvl_t *c_buf;
- int i;
- hssize_t num_elem;
- herr_t status;
-
- c_dset_id = (hid_t)*dset_id;
- c_type_id = (hid_t)*type_id;
- c_space_id = (hid_t)*space_id;
-
- num_elem = H5Sget_select_npoints(c_space_id);
- if( num_elem < 0) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t)*(size_t)num_elem);
- if (c_buf == NULL) return ret_value;
- status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
- if(status < 0) goto DONE;
-
- c_len = 0;
- for (i=0; i < num_elem; i++) c_len = H5_MAX(c_len, c_buf[i].len);
- *len = (size_t_f)c_len;
- H5Dvlen_reclaim(c_type_id, c_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ size_t c_len;
+ hid_t c_dset_id;
+ hid_t c_type_id;
+ hid_t c_space_id;
+ hvl_t * c_buf;
+ int i;
+ hssize_t num_elem;
+ herr_t status;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_type_id = (hid_t)*type_id;
+ c_space_id = (hid_t)*space_id;
+
+ num_elem = H5Sget_select_npoints(c_space_id);
+ if (num_elem < 0)
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t) * (size_t)num_elem);
+ if (c_buf == NULL)
+ return ret_value;
+ status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
+ if (status < 0)
+ goto DONE;
+
+ c_len = 0;
+ for (i = 0; i < num_elem; i++)
+ c_len = H5_MAX(c_len, c_buf[i].len);
+ *len = (size_t_f)c_len;
+ H5Dvlen_reclaim(c_type_id, c_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/nh5dwrite_vl_integer_c
* NAME
@@ -1619,53 +1695,56 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
+nh5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- int_f *tmp;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- tmp = (int_f *)buf;
- for (i=0; i < num_elem; i++) {
- c_buf[i].len = (size_t)len[i];
- c_buf[i].p = tmp;
- tmp = tmp + max_len;
- }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
-
- if( status < 0) goto DONE;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ int_f *tmp;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ tmp = (int_f *)buf;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i].len = (size_t)len[i];
+ c_buf[i].p = tmp;
+ tmp = tmp + max_len;
+ }
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/nh5dread_vl_integer_c
@@ -1693,51 +1772,55 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
+nh5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hssize_t num_elem;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- max_len = (size_t)dims[0];
- num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != (hssize_t)dims[1]) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if ( status < 0 ) goto DONE;
- for (i=0; i < (hsize_t)num_elem; i++) {
- len[i] = (size_t_f)c_buf[i].len;
- memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int_f));
- }
- H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hssize_t num_elem;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ max_len = (size_t)dims[0];
+ num_elem = H5Sget_select_npoints(c_mem_space_id);
+ if (num_elem != (hssize_t)dims[1])
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0)
+ goto DONE;
+ for (i = 0; i < (hsize_t)num_elem; i++) {
+ len[i] = (size_t_f)c_buf[i].len;
+ memcpy(&buf[i * max_len], c_buf[i].p, c_buf[i].len * sizeof(int_f));
+ }
+ H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/nh5dwrite_vl_string_c
@@ -1763,69 +1846,73 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
+nh5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- char *tmp, *tmp_p;
- size_t max_len;
-
- char **c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate arra of character pointers
- */
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
- if (c_buf == NULL) return ret_value;
-
- /* Copy data to long C string */
- tmp = (char *)HD5f2cstring(buf, (size_t)(max_len*num_elem));
- if (tmp == NULL) { HDfree(c_buf);
- return ret_value;
- }
- /*
- * Move data from temorary buffer
- */
- tmp_p = tmp;
- for (i=0; i < num_elem; i++) {
- c_buf[i] = (char *) HDmalloc((size_t)len[i]+1);
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ char * tmp, *tmp_p;
+ size_t max_len;
+
+ char ** c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate arra of character pointers
+ */
+ c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ if (c_buf == NULL)
+ return ret_value;
+
+ /* Copy data to long C string */
+ tmp = (char *)HD5f2cstring(buf, (size_t)(max_len * num_elem));
+ if (tmp == NULL) {
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /*
+ * Move data from temorary buffer
+ */
+ tmp_p = tmp;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i] = (char *)HDmalloc((size_t)len[i] + 1);
memcpy(c_buf[i], tmp_p, (size_t)len[i]);
c_buf[i][len[i]] = '\0';
- tmp_p = tmp_p + max_len;
- }
+ tmp_p = tmp_p + max_len;
+ }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if( status < 0) goto DONE;
- ret_value = 0;
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
- return ret_value;
+ H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ HDfree(c_buf);
+ HDfree(tmp);
+ return ret_value;
}
/****if* H5Df/nh5dread_vl_string_c
* NAME
@@ -1850,64 +1937,68 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
+nh5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- char *tmp, *tmp_p;
- size_t max_len;
-
- char **c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate array of character pointers
- */
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
- if (c_buf == NULL) return ret_value;
-
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if (status < 0) { HDfree(c_buf);
- return ret_value;
- }
- /* Copy data to long C string */
- tmp = (char *)HDmalloc((size_t)(max_len*num_elem) +1);
- tmp_p = tmp;
- for (i=0; i<max_len*num_elem; i++) tmp[i] = ' ';
- tmp[max_len*num_elem] = '\0';
- for (i=0; i < num_elem; i++) {
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ char * tmp, *tmp_p;
+ size_t max_len;
+
+ char ** c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate array of character pointers
+ */
+ c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ if (c_buf == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0) {
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /* Copy data to long C string */
+ tmp = (char *)HDmalloc((size_t)(max_len * num_elem) + 1);
+ tmp_p = tmp;
+ for (i = 0; i < max_len * num_elem; i++)
+ tmp[i] = ' ';
+ tmp[max_len * num_elem] = '\0';
+ for (i = 0; i < num_elem; i++) {
memcpy(tmp_p, c_buf[i], strlen(c_buf[i]));
len[i] = (size_t_f)strlen(c_buf[i]);
- tmp_p = tmp_p + max_len;
- }
- HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len*num_elem));
- ret_value = 0;
- H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
- return ret_value;
+ tmp_p = tmp_p + max_len;
+ }
+ HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len * num_elem));
+ ret_value = 0;
+ H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ HDfree(c_buf);
+ HDfree(tmp);
+ return ret_value;
}
/****if* H5Df/nh5dwrite_vl_real_c
@@ -1934,53 +2025,56 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
+nh5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- real_f *tmp;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- tmp = (real_f *)buf;
- for (i=0; i < num_elem; i++) {
- c_buf[i].len = (size_t)len[i];
- c_buf[i].p = tmp;
- tmp = tmp + max_len;
- }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
-
- if( status < 0) goto DONE;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ real_f *tmp;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ tmp = (real_f *)buf;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i].len = (size_t)len[i];
+ c_buf[i].p = tmp;
+ tmp = tmp + max_len;
+ }
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/nh5dread_vl_real_c
@@ -2008,52 +2102,56 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
+nh5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hssize_t num_elem;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- max_len = (size_t)dims[0];
- num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != (hssize_t)dims[1]) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if ( status <0 ) goto DONE;
- for (i=0; i < (hsize_t)num_elem; i++) {
- len[i] = (size_t_f)c_buf[i].len;
- memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(real_f));
- }
-
- H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hssize_t num_elem;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ max_len = (size_t)dims[0];
+ num_elem = H5Sget_select_npoints(c_mem_space_id);
+ if (num_elem != (hssize_t)dims[1])
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0)
+ goto DONE;
+ for (i = 0; i < (hsize_t)num_elem; i++) {
+ len[i] = (size_t_f)c_buf[i].len;
+ memcpy(&buf[i * max_len], c_buf[i].p, c_buf[i].len * sizeof(real_f));
+ }
+
+ H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dfillc_c
@@ -2075,19 +2173,19 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id)
+nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5dfill_c function.
- */
- ret_value = h5dfill_c(_fcdtocp(fill_value), fill_type_id, space_id, _fcdtocp(buf), mem_type_id);
+ /*
+ * Call h5dfill_c function.
+ */
+ ret_value = h5dfill_c(_fcdtocp(fill_value), fill_type_id, space_id, _fcdtocp(buf), mem_type_id);
- return ret_value;
+ return ret_value;
}
/****if* H5Df/h5dfill_c
* NAME
@@ -2108,101 +2206,106 @@ nh5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id)
+h5dfill_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf, hid_t_f *mem_type_id)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_fill_type_id;
- hid_t c_mem_type_id;
- hid_t c_space_id;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_fill_type_id;
+ hid_t c_mem_type_id;
+ hid_t c_space_id;
- c_fill_type_id = (hid_t)*fill_type_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_space_id = (hid_t)*space_id;
+ c_fill_type_id = (hid_t)*fill_type_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_space_id = (hid_t)*space_id;
- /*
- * Call H5Dfill function.
- */
- ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
+ /*
+ * Call H5Dfill function.
+ */
+ ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id)
+nh5dfill_integer_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_fill_type_id;
- hid_t c_mem_type_id;
- hid_t c_space_id;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_fill_type_id;
+ hid_t c_mem_type_id;
+ hid_t c_space_id;
- c_fill_type_id = (hid_t)*fill_type_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_space_id = (hid_t)*space_id;
+ c_fill_type_id = (hid_t)*fill_type_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_space_id = (hid_t)*space_id;
- /*
- * Call H5Dfill function.
- */
- ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
+ /*
+ * Call H5Dfill function.
+ */
+ ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id)
+nh5dfill_real_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf, hid_t_f *mem_type_id)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_fill_type_id;
- hid_t c_mem_type_id;
- hid_t c_space_id;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_fill_type_id;
+ hid_t c_mem_type_id;
+ hid_t c_space_id;
- c_fill_type_id = (hid_t)*fill_type_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_space_id = (hid_t)*space_id;
+ c_fill_type_id = (hid_t)*fill_type_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_space_id = (hid_t)*space_id;
- /*
- * Call H5Dfill function.
- */
- ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
+ /*
+ * Call H5Dfill function.
+ */
+ ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id)
+nh5dfill_double_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf, hid_t_f *mem_type_id)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_fill_type_id;
- hid_t c_mem_type_id;
- hid_t c_space_id;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_fill_type_id;
+ hid_t c_mem_type_id;
+ hid_t c_space_id;
- c_fill_type_id = (hid_t)*fill_type_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_space_id = (hid_t)*space_id;
+ c_fill_type_id = (hid_t)*fill_type_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_space_id = (hid_t)*space_id;
- /*
- * Call H5Dfill function.
- */
- ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
+ /*
+ * Call H5Dfill function.
+ */
+ ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_space_status_c
@@ -2222,27 +2325,28 @@ nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag)
+nh5dget_space_status_c(hid_t_f *dset_id, int_f *flag)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- H5D_space_status_t c_flag;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ H5D_space_status_t c_flag;
- c_dset_id = (hid_t)*dset_id;
+ c_dset_id = (hid_t)*dset_id;
- /*
- * Call H5Dget_space_status
- */
- ret = H5Dget_space_status(c_dset_id, &c_flag);
+ /*
+ * Call H5Dget_space_status
+ */
+ ret = H5Dget_space_status(c_dset_id, &c_flag);
- if (ret < 0) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dcreate_anon_c
* NAME
@@ -2266,25 +2370,25 @@ nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag)
* M. Scot Breitenfeld
* February, 2008
* SOURCE
-*/
+ */
int_f
-nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
+nh5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id,
+ hid_t_f *dset_id)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call H5Dcreate2 function.
- */
- if((*dset_id = (hid_t_f)H5Dcreate_anon((hid_t)*loc_id, (hid_t)*type_id, (hid_t)*space_id,
- (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
- goto DONE;
+ /*
+ * Call H5Dcreate2 function.
+ */
+ if ((*dset_id = (hid_t_f)H5Dcreate_anon((hid_t)*loc_id, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
+ goto DONE;
- ret_value = 0;
+ ret_value = 0;
- DONE:
- return ret_value;
+DONE:
+ return ret_value;
}
/****if* H5Df/h5dwrite_f_c
@@ -2308,37 +2412,38 @@ nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
*
*
* SOURCE
-*/
+ */
int_f
-h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf)
+h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
-
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
-
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dread_f_c
@@ -2366,33 +2471,34 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf)
+h5dread_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/nh5dget_access_plist_c
* NAME
@@ -2410,22 +2516,22 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
* April 13, 2009
*
* SOURCE
-*/
+ */
int_f
-nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id)
+nh5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- /*
- * Call H5Dget_access_plist function.
- */
- if((*plist_id = (hid_t_f)H5Dget_access_plist((hid_t)*dset_id)) < 0)
- goto DONE;
+ int ret_value = -1;
+ /*
+ * Call H5Dget_access_plist function.
+ */
+ if ((*plist_id = (hid_t_f)H5Dget_access_plist((hid_t)*dset_id)) < 0)
+ goto DONE;
- ret_value = 0;
+ ret_value = 0;
- DONE:
- return ret_value;
+DONE:
+ return ret_value;
}
/****if* H5Df/nh5dvlen_reclaim_c
@@ -2434,32 +2540,33 @@ nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id)
* PURPOSE
* Call H5Dvlen_reclaim
* INPUTS
- * type_id - Identifier of the datatype.
- * space_id - Identifier of the dataspace.
- * plist_id - Identifier of the property list used to create the buffer.
- * buf - Pointer to the buffer to be reclaimed.
+ * type_id - Identifier of the datatype.
+ * space_id - Identifier of the dataspace.
+ * plist_id - Identifier of the property list used to create the buffer.
+ * buf - Pointer to the buffer to be reclaimed.
*
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
- * January 15, 2011
+ * January 15, 2011
*
* SOURCE
-*/
+ */
int_f
h5dvlen_reclaim_c(hid_t_f *type_id, hid_t_f *space_id, hid_t_f *plist_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t status;
+ int ret_value = -1;
+ herr_t status;
- /*
- * Call H5Dvlen_reclaim function.
- */
- status = H5Dvlen_reclaim((hid_t)*type_id, (hid_t)*space_id, (hid_t)*plist_id, buf);
- if ( status < 0 ) return ret_value;
+ /*
+ * Call H5Dvlen_reclaim function.
+ */
+ status = H5Dvlen_reclaim((hid_t)*type_id, (hid_t)*space_id, (hid_t)*plist_id, buf);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90
index c86deb8..0e7de29 100644
--- a/fortran/src/H5Dff.f90
+++ b/fortran/src/H5Dff.f90
@@ -12,18 +12,18 @@
! are enabled or disabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90
index 1322f96..36bbed9 100644
--- a/fortran/src/H5Dff_F03.f90
+++ b/fortran/src/H5Dff_F03.f90
@@ -17,10 +17,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90
index 431e116..8f6f4c4 100644
--- a/fortran/src/H5Dff_F90.f90
+++ b/fortran/src/H5Dff_F90.f90
@@ -12,18 +12,18 @@
! if Fortran 2003 functions are not enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! (1) The maximum rank of an array allowed in Fortran is 7, therefore
diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c
index c89ccd9..114486c 100644
--- a/fortran/src/H5Ef.c
+++ b/fortran/src/H5Ef.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -38,18 +38,18 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5eclear_c(hid_t_f *estack_id )
+nh5eclear_c(hid_t_f *estack_id)
/******/
{
- int_f ret_value = 0;
+ int_f ret_value = 0;
- /*
- * Call H5Eclear function.
- */
- if(H5Eclear2((hid_t)*estack_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Eclear function.
+ */
+ if (H5Eclear2((hid_t)*estack_id) < 0)
+ HGOTO_DONE(FAIL)
done:
return ret_value;
@@ -74,30 +74,30 @@ done:
* Bug fix: Added call to close the file with the error messages
* EP 11/26/01
* SOURCE
-*/
+ */
int_f
-nh5eprint_c1(_fcd name, int_f* namelen)
+nh5eprint_c1(_fcd name, int_f *namelen)
/******/
{
- FILE *file = NULL;
- char *c_name = NULL;
+ FILE *file = NULL;
+ char *c_name = NULL;
int_f ret_value = 0;
- if(NULL == (c_name = (char*)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (file = HDfopen(c_name, "a")))
+ if (NULL == (file = HDfopen(c_name, "a")))
HGOTO_DONE(FAIL)
/*
* Call H5Eprint2 function.
*/
- if(H5Eprint2(H5E_DEFAULT, file) < 0)
+ if (H5Eprint2(H5E_DEFAULT, file) < 0)
HGOTO_DONE(FAIL)
done:
- if(file)
+ if (file)
HDfclose(file);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -120,7 +120,7 @@ done:
* Wednesday, March 29, 2000
*
* SOURCE
-*/
+ */
int_f
nh5eprint_c2(void)
/******/
@@ -130,7 +130,7 @@ nh5eprint_c2(void)
/*
* Call H5Eprint2 function.
*/
- if(H5Eprint2(H5E_DEFAULT, NULL) < 0)
+ if (H5Eprint2(H5E_DEFAULT, NULL) < 0)
HGOTO_DONE(FAIL)
done:
@@ -155,31 +155,31 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen)
+nh5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
size_t c_namelen = (size_t)*namelen;
- int_f ret_value = 0;
+ int_f ret_value = 0;
- if(c_namelen > 0)
+ if (c_namelen > 0)
c_name = (char *)HDmalloc(c_namelen + 1);
- if(!c_name)
+ if (!c_name)
HGOTO_DONE(FAIL)
/*
* Call H5Eget_msg function.
*/
H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen);
- HD5packFstring((char*)c_name, _fcdtocp(name), c_namelen);
- if(!HDstrcmp(c_name, "Invalid major error number"))
+ HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen);
+ if (!HDstrcmp(c_name, "Invalid major error number"))
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -203,19 +203,19 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
+nh5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
size_t c_namelen = (size_t)*namelen;
- int_f ret_value = 0;
+ int_f ret_value = 0;
- if(c_namelen > 0)
+ if (c_namelen > 0)
c_name = (char *)HDmalloc(c_namelen + 1);
- if(!c_name)
+ if (!c_name)
HGOTO_DONE(FAIL)
/*
@@ -223,11 +223,11 @@ nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
*/
H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen);
HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen);
- if(!HDstrcmp(c_name, "Invalid minor error number"))
+ if (!HDstrcmp(c_name, "Invalid minor error number"))
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -250,26 +250,25 @@ done:
* HISTORY
* Major bug fix: Function never disabled printing.
* SOURCE
-*/
+ */
int_f
-nh5eset_auto_c(int_f* printflag)
+nh5eset_auto_c(int_f *printflag)
/******/
{
- herr_t status = -1;
- int_f ret_value = 0;
+ herr_t status = -1;
+ int_f ret_value = 0;
- if(*printflag == 1)
+ if (*printflag == 1)
status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
- else if(*printflag == 0)
+ else if (*printflag == 0)
status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if(status < 0)
+ if (status < 0)
HGOTO_DONE(FAIL)
done:
return ret_value;
}
-
/****if* H5Ef/h5eset_auto2_c
* NAME
* h5eset_auto2_c
@@ -279,29 +278,30 @@ done:
* estack_id - Error stack identifier.
* func - Function to be called upon an error condition.
* client_data - Data passed to the error function.
- *
+ *
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
* July 22, 2009
* SOURCE
-*/
+ */
int_f
h5eset_auto2_c(int_f *printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data)
/******/
{
- int ret_val = -1;
- herr_t status = -1;
+ int ret_val = -1;
+ herr_t status = -1;
- if (*printflag == 1 && *estack_id == -1)
- status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
- else if (*printflag == 1)
- status = H5Eset_auto2((hid_t)*estack_id, func, client_data);
- else if (*printflag == 0)
- status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (status >= 0) ret_val = 0;
+ if (*printflag == 1 && *estack_id == -1)
+ status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
+ else if (*printflag == 1)
+ status = H5Eset_auto2((hid_t)*estack_id, func, client_data);
+ else if (*printflag == 0)
+ status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+ if (status >= 0)
+ ret_val = 0;
- return ret_val;
+ return ret_val;
}
diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90
index 56da8a7..740f271 100644
--- a/fortran/src/H5Eff.f90
+++ b/fortran/src/H5Eff.f90
@@ -10,18 +10,18 @@
! This Module contains Fortran interfaces for H5E functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90
index 5a86aa3..d681416 100644
--- a/fortran/src/H5Eff_F03.f90
+++ b/fortran/src/H5Eff_F03.f90
@@ -15,18 +15,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90
index 6e99528..d6799dd 100644
--- a/fortran/src/H5Eff_F90.f90
+++ b/fortran/src/H5Eff_F90.f90
@@ -12,16 +12,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! *** IMPORTANT ***
diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c
index f865dde..adf181d 100644
--- a/fortran/src/H5FDmpiof.c
+++ b/fortran/src/H5FDmpiof.c
@@ -12,19 +12,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include <mpi.h>
#include "H5public.h"
-
/* Support for C to Fortran translation in MPI */
#ifndef H5_HAVE_MPI_MULTI_LANG_Comm
#define MPI_Comm_c2f(comm) (int_f)(comm)
@@ -53,27 +52,28 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
+nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- MPI_Comm c_comm;
- MPI_Info c_info;
- c_comm = MPI_Comm_f2c(*comm);
- c_info = MPI_Info_f2c(*info);
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ MPI_Comm c_comm;
+ MPI_Info c_info;
+ c_comm = MPI_Comm_f2c(*comm);
+ c_info = MPI_Info_f2c(*info);
- /*
- * Call H5Pset_mpi function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_mpi function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5FDmpiof/h5pget_fapl_mpio_c
* NAME
@@ -92,27 +92,28 @@ nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
+nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- MPI_Comm c_comm;
- MPI_Info c_info;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ MPI_Comm c_comm;
+ MPI_Info c_info;
- /*
- * Call H5Pget_mpi function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info);
- if (ret < 0) return ret_value;
- *comm = (int_f) MPI_Comm_c2f(c_comm);
- *info = (int_f) MPI_Info_c2f(c_info);
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_mpi function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info);
+ if (ret < 0)
+ return ret_value;
+ *comm = (int_f)MPI_Comm_c2f(c_comm);
+ *info = (int_f)MPI_Info_c2f(c_info);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5FDmpiof/h5pset_dxpl_mpio_c
* NAME
@@ -131,38 +132,39 @@ nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
+nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5FD_mpio_xfer_t c_data_xfer_mode;
-/*
- switch (*data_xfer_mode) {
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5FD_mpio_xfer_t c_data_xfer_mode;
+ /*
+ switch (*data_xfer_mode) {
- case H5FD_MPIO_INDEPENDENT_F:
- c_data_xfer_mode = H5FD_MPIO_INDEPENDENT;
- break;
+ case H5FD_MPIO_INDEPENDENT_F:
+ c_data_xfer_mode = H5FD_MPIO_INDEPENDENT;
+ break;
- case H5FD_MPIO_COLLECTIVE_F:
- c_data_xfer_mode = H5FD_MPIO_COLLECTIVE;
- break;
- default:
- return ret_value;
- }
-*/
- c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode;
- /*
- * Call H5Pset_dxpl_mpio function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ case H5FD_MPIO_COLLECTIVE_F:
+ c_data_xfer_mode = H5FD_MPIO_COLLECTIVE;
+ break;
+ default:
+ return ret_value;
+ }
+ */
+ c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode;
+ /*
+ * Call H5Pset_dxpl_mpio function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5FDmpiof/h5pget_dxpl_mpio_c
@@ -182,40 +184,41 @@ nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
+nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5FD_mpio_xfer_t c_data_xfer_mode;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5FD_mpio_xfer_t c_data_xfer_mode;
- /*
- * Call H5Pget_xfer function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode);
- if (ret < 0) return ret_value;
- *data_xfer_mode = (int_f)c_data_xfer_mode;
-/*
- switch (c_data_xfer_mode) {
+ /*
+ * Call H5Pget_xfer function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode);
+ if (ret < 0)
+ return ret_value;
+ *data_xfer_mode = (int_f)c_data_xfer_mode;
+ /*
+ switch (c_data_xfer_mode) {
- case H5FD_MPIO_INDEPENDENT:
- *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F;
- break;
+ case H5FD_MPIO_INDEPENDENT:
+ *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F;
+ break;
- case H5FD_MPIO_COLLECTIVE:
- *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F;
- break;
+ case H5FD_MPIO_COLLECTIVE:
+ *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F;
+ break;
- default:
- return ret_value;
- }
-*/
- ret_value = 0;
- return ret_value;
+ default:
+ return ret_value;
+ }
+ */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_mpio_actual_io_mode_c
@@ -235,22 +238,22 @@ nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
* M. Scot Breitenfeld
* July 27, 2012
* SOURCE
-*/
+ */
int_f
nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode)
/******/
{
- int ret_value = -1;
- H5D_mpio_actual_io_mode_t c_actual_io_mode;
+ int ret_value = -1;
+ H5D_mpio_actual_io_mode_t c_actual_io_mode;
- /*
- * Call H5Pget_mpio_actual_io_mode_f function.
- */
- if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pget_mpio_actual_io_mode_f function.
+ */
+ if ((H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) < 0)
+ return ret_value; /* error occurred */
- *actual_io_mode =(int_f)c_actual_io_mode;
+ *actual_io_mode = (int_f)c_actual_io_mode;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90
index 6ec2fc0..40f32d2 100644
--- a/fortran/src/H5FDmpioff.f90
+++ b/fortran/src/H5FDmpioff.f90
@@ -8,18 +8,18 @@
! parallel MPI programs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 8d3dba6..9f54bf0 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -41,54 +41,55 @@
* Elena Pourmal
* Monday, July 26, 1999
* SOURCE
-*/
+ */
int_f
-nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id)
+nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp,
+ hid_t_f *file_id)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_file_id;
- unsigned c_access_flags;
- hid_t c_crt_prp;
- hid_t c_acc_prp;
-
- /*
- * Define access flags
- */
- c_access_flags = (unsigned) *access_flags;
-
- /*
- * Define creation property
- */
- c_crt_prp = *crt_prp;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if(c_name == NULL)
- return ret_value;
-
- /*
- * Call H5Fcreate function.
- */
- c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp);
-
- if (c_file_id >= 0) {
- ret_value = 0;
- *file_id = c_file_id;
- }
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_file_id;
+ unsigned c_access_flags;
+ hid_t c_crt_prp;
+ hid_t c_acc_prp;
+
+ /*
+ * Define access flags
+ */
+ c_access_flags = (unsigned)*access_flags;
+
+ /*
+ * Define creation property
+ */
+ c_crt_prp = *crt_prp;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fcreate function.
+ */
+ c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp);
+
+ if (c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = c_file_id;
+ }
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5fflush_c
@@ -107,31 +108,31 @@ nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, h
* Xiangyang Su
* Friday, November 5, 1999
* SOURCE
-*/
+ */
int_f
-nh5fflush_c (hid_t_f *object_id, int_f *scope)
+nh5fflush_c(hid_t_f *object_id, int_f *scope)
/******/
{
- int ret_value = -1;
- hid_t c_file_id;
- H5F_scope_t c_scope;
- htri_t status;
- c_scope = (H5F_scope_t)*scope;
+ int ret_value = -1;
+ hid_t c_file_id;
+ H5F_scope_t c_scope;
+ htri_t status;
+ c_scope = (H5F_scope_t)*scope;
- /*
- * Call H5Fflush function.
- */
+ /*
+ * Call H5Fflush function.
+ */
- c_file_id = *object_id;
+ c_file_id = *object_id;
- status = H5Fflush(c_file_id, c_scope);
+ status = H5Fflush(c_file_id, c_scope);
- if (status >= 0) ret_value = 0;
+ if (status >= 0)
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
-
/****if* H5Ff/h5fmount_c
* NAME
* h5fmount_c
@@ -149,45 +150,47 @@ nh5fflush_c (hid_t_f *object_id, int_f *scope)
* Xiangyang Su
* Monday, October 25, 1999
* HISTORY
-*/
+ */
int_f
-nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp)
+nh5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_loc_id;
- hid_t c_file_id;
- hid_t c_acc_prp;
- htri_t status;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-/*
- if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
-*/
-
- c_loc_id = *loc_id;
- c_file_id = *file_id;
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fmount function.
- */
- status = H5Fmount(c_loc_id, c_name, c_file_id, c_acc_prp);
-
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_loc_id;
+ hid_t c_file_id;
+ hid_t c_acc_prp;
+ htri_t status;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+ /*
+ if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
+ */
+
+ c_loc_id = *loc_id;
+ c_file_id = *file_id;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fmount function.
+ */
+ status = H5Fmount(c_loc_id, c_name, c_file_id, c_acc_prp);
+
+ if (status >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5funmount_c
@@ -205,38 +208,38 @@ nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, h
* Xiangyang Su
* Monday, October 25, 1999
* SOURCE
-*/
+ */
int_f
-nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
+nh5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_loc_id;
- htri_t status;
-
- c_loc_id = *loc_id;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fmount function.
- */
- status = H5Funmount(c_loc_id, c_name);
-
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
-}
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_loc_id;
+ htri_t status;
+ c_loc_id = *loc_id;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fmount function.
+ */
+ status = H5Funmount(c_loc_id, c_name);
+
+ if (status >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
+}
/****if* H5Ff/h5fopen_c
* NAME
@@ -256,49 +259,49 @@ nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
* Elena Pourmal
* Tuesday, August 3, 1999
* SOURCE
-*/
+ */
int_f
-nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id)
+nh5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_file_id;
- unsigned c_access_flags;
- hid_t c_acc_prp;
- c_acc_prp = (hid_t)*acc_prp;
-
- /*
- * Define access flags
- */
- c_access_flags = (unsigned) *access_flags;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if(c_name == NULL)
- return ret_value;
-
- /*
- * Call H5Fopen function.
- */
- c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp);
-
- if(c_file_id >= 0) {
- ret_value = 0;
- *file_id = (hid_t_f)c_file_id;
- } /* end if */
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_file_id;
+ unsigned c_access_flags;
+ hid_t c_acc_prp;
+ c_acc_prp = (hid_t)*acc_prp;
+
+ /*
+ * Define access flags
+ */
+ c_access_flags = (unsigned)*access_flags;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fopen function.
+ */
+ c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp);
+
+ if (c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = (hid_t_f)c_file_id;
+ } /* end if */
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5freopen_c
@@ -316,22 +319,23 @@ nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hi
* Xiangyang Su
* Wednesday, November 3, 1999
* SOURCE
-*/
+ */
int_f
-nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2)
+nh5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2)
/******/
{
- int ret_value = -1;
- hid_t c_file_id1, c_file_id2;
+ int ret_value = -1;
+ hid_t c_file_id1, c_file_id2;
- c_file_id1 = *file_id1;
- c_file_id2 = H5Freopen(c_file_id1);
+ c_file_id1 = *file_id1;
+ c_file_id2 = H5Freopen(c_file_id1);
- if (c_file_id2 < 0) return ret_value;
- *file_id2 = (hid_t_f)c_file_id2;
+ if (c_file_id2 < 0)
+ return ret_value;
+ *file_id2 = (hid_t_f)c_file_id2;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fget_create_plist_c
@@ -349,22 +353,23 @@ nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2)
* Elena Pourmal, Xiangyang Su
* Wednesday, November 3, 1999
* SOURCE
-*/
+ */
int_f
-nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id)
+nh5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id)
/******/
{
- int ret_value = -1;
- hid_t c_file_id, c_prop_id;
+ int ret_value = -1;
+ hid_t c_file_id, c_prop_id;
- c_file_id = (hid_t)*file_id;
- c_prop_id = H5Fget_create_plist(c_file_id);
+ c_file_id = (hid_t)*file_id;
+ c_prop_id = H5Fget_create_plist(c_file_id);
- if (c_prop_id < 0) return ret_value;
- *prop_id = (hid_t_f)c_prop_id;
+ if (c_prop_id < 0)
+ return ret_value;
+ *prop_id = (hid_t_f)c_prop_id;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fget_access_plist_c
@@ -384,22 +389,23 @@ nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
+nh5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id)
/******/
{
- int ret_value = -1;
- hid_t c_file_id, c_access_id;
+ int ret_value = -1;
+ hid_t c_file_id, c_access_id;
- c_file_id = (hid_t)*file_id;
- c_access_id = H5Fget_access_plist(c_file_id);
+ c_file_id = (hid_t)*file_id;
+ c_access_id = H5Fget_access_plist(c_file_id);
- if (c_access_id < 0) return ret_value;
- *access_id = (hid_t_f)c_access_id;
+ if (c_access_id < 0)
+ return ret_value;
+ *access_id = (hid_t_f)c_access_id;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fis_hdf5_c
@@ -421,32 +427,34 @@ nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag)
+nh5fis_hdf5_c(_fcd name, int_f *namelen, int_f *flag)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- htri_t status;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fopen function.
- */
- status = H5Fis_hdf5(c_name);
- *flag = (int_f)status;
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ htri_t status;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fopen function.
+ */
+ status = H5Fis_hdf5(c_name);
+ *flag = (int_f)status;
+ if (status >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5fclose_c
* NAME
@@ -463,18 +471,19 @@ nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5fclose_c ( hid_t_f *file_id )
+nh5fclose_c(hid_t_f *file_id)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
+ int ret_value = 0;
+ hid_t c_file_id;
- c_file_id = (hid_t)*file_id;
- if ( H5Fclose(c_file_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_file_id = (hid_t)*file_id;
+ if (H5Fclose(c_file_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Ff/h5fget_obj_count_c
* NAME
@@ -495,23 +504,23 @@ nh5fclose_c ( hid_t_f *file_id )
* Changed type of obj_count to size_t_f
* Thursday, September 25, 2008
* SOURCE
-*/
+ */
int_f
-nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
+nh5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
- unsigned c_obj_type;
- ssize_t c_obj_count;
-
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+ ssize_t c_obj_count;
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
- if ( (c_obj_count=H5Fget_obj_count(c_file_id, c_obj_type)) < 0 ) ret_value = -1;
- *obj_count = (size_t_f)c_obj_count;
- return ret_value;
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned)*obj_type;
+ if ((c_obj_count = H5Fget_obj_count(c_file_id, c_obj_type)) < 0)
+ ret_value = -1;
+ *obj_count = (size_t_f)c_obj_count;
+ return ret_value;
}
/****if* H5Ff/h5fget_obj_ids_c
* NAME
@@ -532,31 +541,30 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
* Changed type of max_obj to size_t_f; added parameter for the
* number of open objects
* Thursday, September 25, 2008 EIP
- *
+ *
* SOURCE
-*/
+ */
int_f
-nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs,
- hid_t_f *obj_ids, size_t_f *num_objs)
+nh5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
+ int ret_value = 0;
+ hid_t c_file_id;
unsigned c_obj_type;
- size_t u;
- size_t c_max_objs;
- ssize_t c_num_objs;
- hid_t *c_obj_ids;
+ size_t u;
+ size_t c_max_objs;
+ ssize_t c_num_objs;
+ hid_t * c_obj_ids;
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned)*obj_type;
c_max_objs = (size_t)*max_objs;
- c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
+ c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t) * c_max_objs);
c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
- if(c_num_objs < 0)
+ if (c_num_objs < 0)
ret_value = -1;
- for(u = 0; u < c_max_objs; u++)
+ for (u = 0; u < c_max_objs; u++)
obj_ids[u] = (hid_t_f)c_obj_ids[u];
HDfree(c_obj_ids);
@@ -579,20 +587,21 @@ nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs,
* Quincey Koziol
* Tuesday, October 7, 2003
* SOURCE
-*/
+ */
int_f
-nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space)
+nh5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
- hssize_t c_free_space;
-
- c_file_id = (hid_t)*file_id;
- if ( (c_free_space=H5Fget_freespace(c_file_id)) < 0 ) ret_value = -1;
- *free_space=(hssize_t_f)c_free_space;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_file_id;
+ hssize_t c_free_space;
+
+ c_file_id = (hid_t)*file_id;
+ if ((c_free_space = H5Fget_freespace(c_file_id)) < 0)
+ ret_value = -1;
+ *free_space = (hssize_t_f)c_free_space;
+ return ret_value;
}
/****if* H5Ff/h5fget_name_c
@@ -612,36 +621,37 @@ nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space)
* Elena Pourmal
* Tuesday, July 6, 2004
* SOURCE
-*/
+ */
int_f
nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
/******/
{
- char *c_buf = NULL; /* Buffer to hold C string */
- ssize_t size_c = -1;
- int_f ret_value = 0; /* Return value */
-
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Fget_name function
- */
- if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
- HGOTO_DONE(FAIL);
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buflen);
+ char * c_buf = NULL; /* Buffer to hold C string */
+ ssize_t size_c = -1;
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Fget_name function
+ */
+ if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buflen);
done:
- *size = (size_t_f)size_c;
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ *size = (size_t_f)size_c;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Ff/h5fget_filesize_c
@@ -659,23 +669,23 @@ done:
* Elena Pourmal
* Wednesday, July 7, 2004
* SOURCE
-*/
+ */
int_f
nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size)
/******/
{
hsize_t size_c;
- herr_t ret_value=0; /* Return value */
+ herr_t ret_value = 0; /* Return value */
- /*
- * Call H5Fget_filesize function
- */
- if ((ret_value = H5Fget_filesize((hid_t)*file_id, &size_c)) < 0)
- HGOTO_DONE(FAIL);
- *size = (hsize_t_f)size_c;
+ /*
+ * Call H5Fget_filesize function
+ */
+ if ((ret_value = H5Fget_filesize((hid_t)*file_id, &size_c)) < 0)
+ HGOTO_DONE(FAIL);
+ *size = (hsize_t_f)size_c;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Ff/h5fget_file_image_c
@@ -695,22 +705,22 @@ done:
* M. Scot Breitenfeld
* November 26, 2012
* SOURCE
-*/
+ */
int_f
h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req)
/******/
{
- herr_t ret_value=0; /* Return value */
+ herr_t ret_value = 0; /* Return value */
ssize_t c_buf_req;
/*
* Call h5fget_file_image function
*/
-
- if ( (c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
- HGOTO_DONE(FAIL);
+
+ if ((c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
+ HGOTO_DONE(FAIL);
*buf_req = (size_t_f)c_buf_req;
done:
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90
index 787c4e0..9f0365a 100644
--- a/fortran/src/H5Fff.f90
+++ b/fortran/src/H5Fff.f90
@@ -10,18 +10,18 @@
! This file contains Fortran interfaces for H5F functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90
index 2201567..ef7cf46 100644
--- a/fortran/src/H5Fff_F03.f90
+++ b/fortran/src/H5Fff_F03.f90
@@ -7,18 +7,18 @@
! This file contains Fortran 2003 interfaces for H5F functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
@@ -78,7 +78,7 @@ CONTAINS
INTEGER(HID_T) , INTENT(IN) :: file_id
TYPE(C_PTR) , VALUE :: buf_ptr
INTEGER(SIZE_T), INTENT(IN) :: buf_len
- INTEGER(SIZE_T), INTENT(IN) :: buf_size
+ INTEGER(SIZE_T), INTENT(OUT) :: buf_size
END FUNCTION h5fget_file_image_c
END INTERFACE
diff --git a/fortran/src/H5Fff_F90.f90 b/fortran/src/H5Fff_F90.f90
index 88a588d..ce74d21 100644
--- a/fortran/src/H5Fff_F90.f90
+++ b/fortran/src/H5Fff_F90.f90
@@ -11,18 +11,18 @@
! functions are not enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 420c7f2..70f189e 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -45,51 +45,52 @@
* H5Gcreate1 can be compiled out of the library
* QAK - 2007/08/23
* SOURCE
-*/
+ */
int_f
-nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint,
- hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id )
+nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
+ hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id)
/******/
{
- hid_t c_gcpl_id = -1; /* Group creation property list */
- char *c_name = NULL;
+ hid_t c_gcpl_id = -1; /* Group creation property list */
+ char *c_name = NULL;
hid_t c_grp_id;
int_f ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Call H5Gcreate function.
*/
- if(*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F ){
- c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name,(hid_t)*lcpl_id,(hid_t)*gcpl_id,(hid_t)*gapl_id);}
+ if (*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F) {
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, (hid_t)*lcpl_id, (hid_t)*gcpl_id, (hid_t)*gapl_id);
+ }
else {
- /* Create the group creation property list */
- if((c_gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
- goto DONE;
+ /* Create the group creation property list */
+ if ((c_gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ goto DONE;
- /* Set the local heap size hint */
- if(H5Pset_local_heap_size_hint(c_gcpl_id, (size_t)*size_hint) < 0)
- goto DONE;
+ /* Set the local heap size hint */
+ if (H5Pset_local_heap_size_hint(c_gcpl_id, (size_t)*size_hint) < 0)
+ goto DONE;
- /* Create the group */
- c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, c_gcpl_id, H5P_DEFAULT);
+ /* Create the group */
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, c_gcpl_id, H5P_DEFAULT);
}
- if(c_grp_id < 0)
+ if (c_grp_id < 0)
goto DONE;
/* Everything OK, set values to return */
- *grp_id = (hid_t_f)c_grp_id;
+ *grp_id = (hid_t_f)c_grp_id;
ret_value = 0;
DONE:
- if(c_gcpl_id > 0)
+ if (c_gcpl_id > 0)
H5Pclose(c_gcpl_id);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -113,35 +114,35 @@ DONE:
* Wednesday, August 5, 1999
*
* SOURCE
-*/
+ */
int_f
nh5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id)
/******/
{
- char *c_name = NULL;
- hid_t c_grp_id;
- int ret_value = -1;
-
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ char *c_name = NULL;
+ hid_t c_grp_id;
+ int ret_value = -1;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- /*
- * Call H5Gopen function.
- */
- if((c_grp_id = H5Gopen2((hid_t)*loc_id, c_name, (hid_t)*gapl_id)) < 0)
+ /*
+ * Call H5Gopen function.
+ */
+ if ((c_grp_id = H5Gopen2((hid_t)*loc_id, c_name, (hid_t)*gapl_id)) < 0)
goto DONE;
/* Everything OK, set values to return */
- *grp_id = (hid_t_f)c_grp_id;
+ *grp_id = (hid_t_f)c_grp_id;
ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Gf/h5gget_obj_info_idx_c
@@ -165,48 +166,49 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
-nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
- _fcd obj_name, int_f *obj_namelen, int_f *obj_type)
+nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name,
+ int_f *obj_namelen, int_f *obj_type)
/******/
{
H5O_info_t oinfo;
- hid_t c_loc_id = (hid_t)*loc_id;
- char *c_name = NULL;
- size_t c_obj_namelen;
- char *c_obj_name = NULL;
- hsize_t c_idx = (hsize_t)*idx;
- hid_t gid = (-1); /* Temporary group ID */
- int ret_value = -1;
+ hid_t c_loc_id = (hid_t)*loc_id;
+ char * c_name = NULL;
+ size_t c_obj_namelen;
+ char * c_obj_name = NULL;
+ hsize_t c_idx = (hsize_t)*idx;
+ hid_t gid = (-1); /* Temporary group ID */
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold name of the object
*/
c_obj_namelen = (size_t)*obj_namelen;
- if(c_obj_namelen)
- if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
- goto DONE;
+ if (c_obj_namelen)
+ if (NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
+ goto DONE;
/* Get a temporary group ID for the group to query */
- if((gid = H5Gopen2(c_loc_id, c_name, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(c_loc_id, c_name, H5P_DEFAULT)) < 0)
goto DONE;
/* Query the object's information */
- if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
+ if (H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen,
+ H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0)
+ if (H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0)
goto DONE;
-/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
- * work on non-hard links - QAK
- */
+ /* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
+ * work on non-hard links - QAK
+ */
*obj_type = oinfo.type;
/*
@@ -217,12 +219,12 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
DONE:
/* Close the temporary group, if it was opened */
- if(gid > 0)
+ if (gid > 0)
H5Gclose(gid);
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -244,30 +246,30 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
H5G_info_t ginfo;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/* Call H5Gget_info_by_name() for the number of objects in the group */
- if(H5Gget_info_by_name((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
+ if (H5Gget_info_by_name((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
goto DONE;
*nmembers = (int_f)ginfo.nlinks;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -285,7 +287,7 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
nh5gclose_c(hid_t_f *grp_id)
@@ -293,12 +295,11 @@ nh5gclose_c(hid_t_f *grp_id)
{
int ret_value = 0;
- if(H5Gclose((hid_t)*grp_id) < 0)
+ if (H5Gclose((hid_t)*grp_id) < 0)
ret_value = -1;
return ret_value;
}
-
/****if* H5Gf/h5glink_c
* NAME
* h5glink_c
@@ -318,67 +319,68 @@ nh5gclose_c(hid_t_f *grp_id)
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name,
- int_f *current_namelen, _fcd new_name, int_f *new_namelen)
+nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name,
+ int_f *new_namelen)
/******/
{
char *c_current_name = NULL, *c_new_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
- * Convert Fortran name to C name
- */
- if(NULL == (c_current_name = (char *)HD5f2cstring(current_name, (size_t)*current_namelen)))
+ * Convert Fortran name to C name
+ */
+ if (NULL == (c_current_name = (char *)HD5f2cstring(current_name, (size_t)*current_namelen)))
goto DONE;
- if(NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
+ if (NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
goto DONE;
/*
- * Call appropriate link creation function
- */
- switch((H5L_type_t)*link_type) {
+ * Call appropriate link creation function
+ */
+ switch ((H5L_type_t)*link_type) {
case H5L_TYPE_HARD:
- if(H5Lcreate_hard((hid_t)*loc_id, c_current_name, H5L_SAME_LOC, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_hard((hid_t)*loc_id, c_current_name, H5L_SAME_LOC, c_new_name, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
goto DONE;
break;
case H5L_TYPE_SOFT:
- if(H5Lcreate_soft(c_current_name, (hid_t)*loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft(c_current_name, (hid_t)*loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
- /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
case H5L_TYPE_EXTERNAL:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_MAX:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_ERROR:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
- /* End of the warnings fix */
-
- default: /* Unknown/unhandled link type */
+ /* End of the warnings fix */
+
+ default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
ret_value = 0;
DONE:
- if(c_current_name)
+ if (c_current_name)
HDfree(c_current_name);
- if(c_new_name)
+ if (c_new_name)
HDfree(c_new_name);
- return ret_value ;
+ return ret_value;
}
/****if* H5Gf/h5glink2_c
@@ -405,65 +407,66 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen,
- int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen)
+nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id,
+ _fcd new_name, int_f *new_namelen)
/******/
{
char *c_cur_name = NULL, *c_new_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_cur_name = (char *)HD5f2cstring(cur_name, (size_t)*cur_namelen)))
+ if (NULL == (c_cur_name = (char *)HD5f2cstring(cur_name, (size_t)*cur_namelen)))
goto DONE;
- if(NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
+ if (NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
goto DONE;
/*
- * Call appropriate link creation function
- */
- switch((H5L_type_t)*link_type) {
+ * Call appropriate link creation function
+ */
+ switch ((H5L_type_t)*link_type) {
case H5L_TYPE_HARD:
- if(H5Lcreate_hard((hid_t)*cur_loc_id, c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_hard((hid_t)*cur_loc_id, c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
goto DONE;
break;
case H5L_TYPE_SOFT:
- if(H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
- /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
case H5L_TYPE_EXTERNAL:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_MAX:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_ERROR:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
- /* End of the warnings fix */
+ /* End of the warnings fix */
- default: /* Unknown/unhandled link type */
+ default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
ret_value = 0;
DONE:
- if(c_cur_name)
+ if (c_cur_name)
HDfree(c_cur_name);
- if(c_new_name)
+ if (c_new_name)
HDfree(c_new_name);
- return ret_value ;
+ return ret_value;
}
/****if* H5Gf/h5gunlink_c
@@ -480,30 +483,30 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen)
/******/
{
- char *c_name = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Call H5Gunlink function
*/
- if(H5Ldelete((hid_t)*loc_id, c_name, H5P_DEFAULT) < 0)
+ if (H5Ldelete((hid_t)*loc_id, c_name, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -525,35 +528,35 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen)
+nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen)
/******/
{
char *c_src_name = NULL, *c_dst_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
goto DONE;
- if(NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
+ if (NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
goto DONE;
/*
* Call H5Gmove function
*/
- if(H5Lmove((hid_t)*loc_id, c_src_name, H5L_SAME_LOC, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lmove((hid_t)*loc_id, c_src_name, H5L_SAME_LOC, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dst_name)
+ if (c_dst_name)
HDfree(c_dst_name);
return ret_value;
}
@@ -577,35 +580,36 @@ DONE:
* Wednesday, September 25, 2002
*
* SOURCE
-*/
+ */
int_f
-nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen)
+nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name,
+ int_f *dst_namelen)
/******/
{
char *c_src_name = NULL, *c_dst_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
goto DONE;
- if(NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
+ if (NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
goto DONE;
/*
* Call H5Gmove2 function
*/
- if(H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dst_name)
+ if (c_dst_name)
HDfree(c_dst_name);
return ret_value;
}
@@ -628,37 +632,37 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size,
- _fcd value)
+nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value)
/******/
{
- char *c_name = NULL;
- char *c_value = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ char *c_value = NULL;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold name of the value
*/
- if(*size) c_value = (char *)HDmalloc((size_t)*size);
- if(c_value == NULL) {
- HDfree(c_name);
- return ret_value;
- }
+ if (*size)
+ c_value = (char *)HDmalloc((size_t)*size);
+ if (c_value == NULL) {
+ HDfree(c_name);
+ return ret_value;
+ }
/*
* Call H5Lget_val function
*/
- if(H5Lget_val((hid_t)*loc_id, c_name, c_value, (size_t)*size, H5P_DEFAULT) < 0)
- goto DONE;
+ if (H5Lget_val((hid_t)*loc_id, c_name, c_value, (size_t)*size, H5P_DEFAULT) < 0)
+ goto DONE;
/*
* Convert C name to FORTRAN and place it in the given buffer
@@ -667,9 +671,9 @@ nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size,
ret_value = 0;
DONE:
- if(c_value)
+ if (c_value)
HDfree(c_value);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -693,34 +697,33 @@ DONE:
* HISTORY
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment,
- int_f *commentlen)
+nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen)
/******/
{
char *c_name = NULL, *c_comment = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- if(NULL == (c_comment = (char *)HD5f2cstring(comment, (size_t)*commentlen)))
+ if (NULL == (c_comment = (char *)HD5f2cstring(comment, (size_t)*commentlen)))
goto DONE;
/*
* Call H5Oset_comment_by_name function
*/
- if(H5Oset_comment_by_name((hid_t)*loc_id, c_name, c_comment, H5P_DEFAULT) < 0)
+ if (H5Oset_comment_by_name((hid_t)*loc_id, c_name, c_comment, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_comment)
+ if (c_comment)
HDfree(c_comment);
return ret_value;
}
@@ -742,47 +745,46 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize,
- _fcd comment)
+nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment)
/******/
{
- char *c_name = NULL, *c_comment = NULL;
+ char * c_name = NULL, *c_comment = NULL;
size_t c_bufsize;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold the comment
*/
c_bufsize = (size_t)*bufsize;
- if(c_bufsize) {
- if(NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1)))
+ if (c_bufsize) {
+ if (NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1)))
goto DONE;
} /* end if */
/*
* Call H5Oget_comment_by_name function
*/
- if(H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, c_bufsize, H5P_DEFAULT) < 0)
+ if (H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, c_bufsize, H5P_DEFAULT) < 0)
goto DONE;
/*
- * Convert C name to FORTRAN and place it in the given buffer
- */
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
HD5packFstring(c_comment, _fcdtocp(comment), c_bufsize);
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_comment)
+ if (c_comment)
HDfree(c_comment);
return ret_value;
}
@@ -806,16 +808,16 @@ DONE:
* M. Scot Breitenfeld
* February 15, 2008
* SOURCE
-*/
+ */
int_f
nh5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- if ((*grp_id = (hid_t_f)H5Gcreate_anon((hid_t)*loc_id,(hid_t)*gcpl_id,(hid_t)*gapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*grp_id = (hid_t_f)H5Gcreate_anon((hid_t)*loc_id, (hid_t)*gcpl_id, (hid_t)*gapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
@@ -838,21 +840,20 @@ done:
* M. Scot Breitenfeld
* February 15, 2008
* SOURCE
-*/
+ */
int_f
-nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id )
+nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- if ((*gcpl_id = (hid_t_f)H5Gget_create_plist((hid_t)*grp_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*gcpl_id = (hid_t_f)H5Gget_create_plist((hid_t)*grp_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
}
-
/****if* H5Gf/h5gget_info_c
* NAME
* h5gget_info_c
@@ -882,34 +883,34 @@ done:
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
-nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted )
+nh5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
H5G_info_t ginfo;
- /*
- * Call H5Gget_info function.
- */
- if(H5Gget_info((hid_t)*group_id,&ginfo) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Gget_info function.
+ */
+ if (H5Gget_info((hid_t)*group_id, &ginfo) < 0)
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
*storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
done:
return ret_value;
}
-
/****if* H5Gf/h5gget_info_by_idx_c
* NAME
* h5gget_info_by_idx_c
@@ -946,41 +947,42 @@ done:
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
-nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted )
+nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks,
+ int_f *max_corder, int_f *mounted)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold group name C string */
- int_f ret_value = 0; /* Return value */
- H5G_info_t ginfo;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Gget_info_by_idx function.
- */
- if(H5Gget_info_by_idx((hid_t)*loc_id,c_group_name, (H5_index_t)*index_type,(H5_iter_order_t)*order,(hsize_t)*n,
- &ginfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- /* Unpack the structure */
-
- *storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold group name C string */
+ int_f ret_value = 0; /* Return value */
+ H5G_info_t ginfo;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Gget_info_by_idx function.
+ */
+ if (H5Gget_info_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, &ginfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Unpack the structure */
+
+ *storage_type = (int_f)ginfo.storage_type;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Gf/h5gget_info_by_name_c
@@ -1016,37 +1018,38 @@ nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
+ int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold group name C string */
- int_f ret_value = 0; /* Return value */
- H5G_info_t ginfo;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Gget_info_by_name function.
- */
- if(H5Gget_info_by_name((hid_t)*loc_id, c_group_name, &ginfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- /* Unpack the structure */
-
- *storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold group name C string */
+ int_f ret_value = 0; /* Return value */
+ H5G_info_t ginfo;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Gget_info_by_name function.
+ */
+ if (H5Gget_info_by_name((hid_t)*loc_id, c_group_name, &ginfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Unpack the structure */
+
+ *storage_type = (int_f)ginfo.storage_type;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90
index b1d2d48..bb5c029 100644
--- a/fortran/src/H5Gff.f90
+++ b/fortran/src/H5Gff.f90
@@ -10,18 +10,18 @@
! This file contains Fortran interfaces for H5G functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index 60e1b27..0a8d0eb 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -38,24 +38,25 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5iget_type_c (hid_t_f *obj_id, int_f *type)
+nh5iget_type_c(hid_t_f *obj_id, int_f *type)
/******/
{
- int ret_value = -1;
- hid_t c_obj_id;
- H5I_type_t c_type;
+ int ret_value = -1;
+ hid_t c_obj_id;
+ H5I_type_t c_type;
- /*
- * Call H5Iget_type function.
- */
- c_obj_id = *obj_id;
- c_type = H5Iget_type(c_obj_id);
- if (c_type == H5I_BADID) return ret_value;
- *type = (int_f)c_type;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Iget_type function.
+ */
+ c_obj_id = *obj_id;
+ c_type = H5Iget_type(c_obj_id);
+ if (c_type == H5I_BADID)
+ return ret_value;
+ *type = (int_f)c_type;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5If/h5iget_name_c
* NAME
@@ -79,41 +80,43 @@ nh5iget_type_c (hid_t_f *obj_id, int_f *type)
* exact size of the string (buf_size) is passed in.
* M. Scot Breitenfeld, April 21, 2008
* SOURCE
-*/
+ */
int_f
nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size)
/******/
{
- int ret_value = -1;
- hid_t c_obj_id;
- ssize_t c_size;
- size_t c_buf_size;
- char *c_buf =NULL;
+ int ret_value = -1;
+ hid_t c_obj_id;
+ ssize_t c_size;
+ size_t c_buf_size;
+ char * c_buf = NULL;
- /*
- * Allocate buffer to hold name of an object
- */
- c_buf_size = (size_t)*buf_size +1;
- c_buf = (char *)HDmalloc(c_buf_size);
- if (c_buf == NULL) return ret_value;
+ /*
+ * Allocate buffer to hold name of an object
+ */
+ c_buf_size = (size_t)*buf_size + 1;
+ c_buf = (char *)HDmalloc(c_buf_size);
+ if (c_buf == NULL)
+ return ret_value;
- /*
- * Call H5IAget_name function
- */
- c_obj_id = (hid_t)*obj_id;
- c_size = H5Iget_name(c_obj_id, c_buf, c_buf_size);
- if (c_size < 0) goto DONE;
+ /*
+ * Call H5IAget_name function
+ */
+ c_obj_id = (hid_t)*obj_id;
+ c_size = H5Iget_name(c_obj_id, c_buf, c_buf_size);
+ if (c_size < 0)
+ goto DONE;
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size-1);
- *name_size = (size_t_f)c_size;
- ret_value = 0;
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size - 1);
+ *name_size = (size_t_f)c_size;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5If/h5iinc_ref_c
@@ -131,25 +134,25 @@ DONE:
* Quincey Koziol
* Tuesday, December 9, 2003
* SOURCE
-*/
+ */
int_f
nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Iinc_ref function
- */
- if ((ret_value = H5Iinc_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iinc_ref function
+ */
+ if ((ret_value = H5Iinc_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5idec_ref_c
@@ -167,25 +170,25 @@ done:
* Quincey Koziol
* Tuesday, December 9, 2003
* SOURCE
-*/
+ */
int_f
nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Idec_ref function
- */
- if ((ret_value = H5Idec_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Idec_ref function
+ */
+ if ((ret_value = H5Idec_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5iget_ref_c
@@ -204,25 +207,25 @@ done:
* Tuesday, December 9, 2003
*
* SOURCE
-*/
+ */
int_f
nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Iget_ref function
- */
- if ((ret_value = H5Iget_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iget_ref function
+ */
+ if ((ret_value = H5Iget_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5iget_file_id_c
@@ -241,26 +244,26 @@ done:
* Tuesday, August 24, 2004
*
* SOURCE
-*/
+ */
int_f
nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id)
/******/
{
- int ret_value;
- hid_t c_file_id;
+ int ret_value;
+ hid_t c_file_id;
- /*
- * Call H5Iget_file_id
- */
- if ((c_file_id = H5Iget_file_id(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iget_file_id
+ */
+ if ((c_file_id = H5Iget_file_id(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *file_id=(hid_t_f)c_file_id;
- ret_value=0;
+ *file_id = (hid_t_f)c_file_id;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -276,19 +279,19 @@ done:
int_f
nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid)
{
- int ret_value;
- htri_t c_ret_value;
+ int ret_value;
+ htri_t c_ret_value;
- /*
- * Call H5Iis_valid
- */
- if ((c_ret_value = H5Iis_valid(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iis_valid
+ */
+ if ((c_ret_value = H5Iis_valid(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
- /* Set output & return values */
- *c_valid = (int_f)c_ret_value;
- ret_value=0;
+ /* Set output & return values */
+ *c_valid = (int_f)c_ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90
index 5029eca..598dac0 100644
--- a/fortran/src/H5Iff.f90
+++ b/fortran/src/H5Iff.f90
@@ -11,16 +11,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 89fd002..fa1a6af 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -48,40 +48,39 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name,
+ size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_src_name = NULL;
+ char *c_src_name = NULL;
char *c_dest_name = NULL;
- int_f ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
+ if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
HGOTO_DONE(FAIL)
/*
* Call H5Lcopy function.
*/
- if(H5Lcopy((hid_t)*src_loc_id, c_src_name, (hid_t) *dest_loc_id,
- c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id ) < 0)
+ if (H5Lcopy((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dest_name)
+ if (c_dest_name)
HDfree(c_dest_name);
- return ret_value;
+ return ret_value;
}
/****if* H5Lf/h5lcreate_external_c
@@ -105,45 +104,45 @@ done:
* M. Scot Breitenfeld
* February 29, 2008
* SOURCE
-*/
+ */
int_f
nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+ hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id,
+ hid_t_f *lapl_id)
/******/
{
- char *c_file_name = NULL;
- char *c_obj_name = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_file_name = HD5f2cstring(file_name, (size_t)*file_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Lcopy function.
- */
- if( H5Lcreate_external( c_file_name, c_obj_name, (hid_t) *link_loc_id, c_link_name,
- (hid_t) *lcpl_id, (hid_t) *lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ char *c_file_name = NULL;
+ char *c_obj_name = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_file_name = HD5f2cstring(file_name, (size_t)*file_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Lcopy function.
+ */
+ if (H5Lcreate_external(c_file_name, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_file_name)
- HDfree(c_file_name);
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_link_name)
- HDfree(c_link_name);
-
- return ret_value;
+ if (c_file_name)
+ HDfree(c_file_name);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_link_name)
+ HDfree(c_link_name);
+
+ return ret_value;
}
/****if* H5Lf/h5ldelete_c
@@ -165,29 +164,29 @@ done:
* M. Scot Breitenfeld
* January, 2008
* SOURCE
-*/
+ */
int_f
-nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id )
+nh5ldelete_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL;
- int_f ret_value = 0;
+ char *c_name = NULL;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Ldelete function.
- */
- if( H5Ldelete( (hid_t)*loc_id, c_name, (hid_t)*lapl_id ) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Ldelete function.
+ */
+ if (H5Ldelete((hid_t)*loc_id, c_name, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -213,37 +212,35 @@ done:
* M. Scot Breitenfeld
* February 20, 2008
* SOURCE
-*/
+ */
int_f
-nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_name_len,
- hid_t_f *lcpl_id, hid_t_f *lapl_id )
+nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name,
+ size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_target_path = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_target_path = HD5f2cstring(target_path, (size_t)*target_path_len)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_name_len)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Adelete function.
- */
- if ( H5Lcreate_soft(c_target_path,(hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_target_path)
+ char *c_target_path = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_target_path = HD5f2cstring(target_path, (size_t)*target_path_len)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Adelete function.
+ */
+ if (H5Lcreate_soft(c_target_path, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_target_path)
HDfree(c_target_path);
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -271,36 +268,35 @@ nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
* M. Scot Breitenfeld
* February 27, 2008
* SOURCE
-*/
+ */
int_f
-nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id )
+nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id,
+ _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Lcreate_hard function.
- */
- if ( H5Lcreate_hard((hid_t)*obj_loc_id, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_obj_name)
+ char *c_obj_name = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Lcreate_hard function.
+ */
+ if (H5Lcreate_hard((hid_t)*obj_loc_id, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -340,34 +336,35 @@ nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
+nh5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- H5_index_t c_index_field;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ H5_index_t c_index_field;
H5_iter_order_t c_order;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
+ c_order = (H5_iter_order_t)*order;
- /*
- * Call H5Ldelete_by_name function.
- */
- if(H5Ldelete_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Ldelete_by_name function.
+ */
+ if (H5Ldelete_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, (hid_t)*lapl_id) <
+ 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_group_name)
+ if (c_group_name)
HDfree(c_group_name);
return ret_value;
}
@@ -393,28 +390,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists)
+nh5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Lexists function.
- */
- if((*link_exists = (int_f)H5Lexists((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Lexists function.
+ */
+ if ((*link_exists = (int_f)H5Lexists((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -452,41 +449,41 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- haddr_t_f *address, size_t_f *val_size,
- hid_t_f *lapl_id)
+nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder,
+ int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size,
+ hid_t_f *lapl_id)
/******/
{
- char *c_link_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char * c_link_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
H5L_info_t link_buff;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
HGOTO_DONE(FAIL);
/*
* Call H5Linfo function.
*/
- if(H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
+ if (H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
/* Unpack the structure */
- *cset = (int_f)link_buff.cset;
- *corder = (int_f)link_buff.corder;
+ *cset = (int_f)link_buff.cset;
+ *corder = (int_f)link_buff.corder;
*corder_valid = 0;
- if(link_buff.corder_valid > 0) *corder_valid = 1;
+ if (link_buff.corder_valid > 0)
+ *corder_valid = 1;
*link_type = (int_f)link_buff.type;
- *address = (haddr_t_f)link_buff.u.address;
- *val_size = (size_t_f)link_buff.u.val_size;
+ *address = (haddr_t_f)link_buff.u.address;
+ *val_size = (size_t_f)link_buff.u.val_size;
done:
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -521,44 +518,45 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id)
+nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder,
+ int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- H5_index_t c_index_field;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ H5_index_t c_index_field;
H5_iter_order_t c_order;
- int_f ret_value = 0; /* Return value */
- H5L_info_t link_buff;
+ int_f ret_value = 0; /* Return value */
+ H5L_info_t link_buff;
/*
* Convert FORTRAN name to C name
*/
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
- /*
- * Call H5Linfo_by_idx function.
- */
- if(H5Lget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &link_buff, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ c_order = (H5_iter_order_t)*order;
+ /*
+ * Call H5Linfo_by_idx function.
+ */
+ if (H5Lget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, &link_buff,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
*corder_valid = 0;
- if(link_buff.corder_valid > 0) *corder_valid = 1;
+ if (link_buff.corder_valid > 0)
+ *corder_valid = 1;
- *corder = (int_f)link_buff.corder;
- *cset = (int_f)link_buff.cset;
+ *corder = (int_f)link_buff.corder;
+ *cset = (int_f)link_buff.cset;
*link_type = (int_f)link_buff.type;
- *address = (haddr_t_f)link_buff.u.address;
- *val_size = (size_t_f)link_buff.u.val_size;
+ *address = (haddr_t_f)link_buff.u.address;
+ *val_size = (size_t_f)link_buff.u.val_size;
done:
return ret_value;
@@ -584,12 +582,12 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
nh5lis_registered_c(int_f *link_cls_id)
/******/
{
- int_f ret_value; /* Return value */
+ int_f ret_value; /* Return value */
/*
* Call H5Lis_registered
@@ -604,7 +602,6 @@ nh5lis_registered_c(int_f *link_cls_id)
/* H5L_type_t c_link_cls_id; /\* User-defined link class identifier *\/ */
/* htri_t registered; /\* registration status *\/ */
-
/* c_link_cls_id = (H5L_type_t)*link_cls_id; */
/* /\* */
/* * Call H5Lis_registered */
@@ -616,7 +613,6 @@ nh5lis_registered_c(int_f *link_cls_id)
/* return ret_value; */
/* } */
-
/****if* H5Lf/h5lmove_c
* NAME
* h5lmove_c
@@ -639,35 +635,35 @@ nh5lis_registered_c(int_f *link_cls_id)
* M. Scot Breitenfeld
* March 3, 2008
* SOURCE
-*/
+ */
int_f
-nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
+nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name,
+ size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_src_name = NULL; /* Buffer to hold C string */
+ char *c_src_name = NULL; /* Buffer to hold C string */
char *c_dest_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
+ if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Lmove function.
- */
- if(H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id,
- c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ /*
+ * Call H5Lmove function.
+ */
+ if (H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dest_name)
+ if (c_dest_name)
HDfree(c_dest_name);
return ret_value;
@@ -697,23 +693,22 @@ done:
* M. Scot Breitenfeld
* March 10, 2008
* SOURCE
-*/
+ */
int_f
-nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- size_t_f *size, _fcd name, hid_t_f *lapl_id)
+nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- size_t c_size;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ char * c_name = NULL; /* Buffer to hold C string */
+ size_t c_size;
ssize_t c_size_link;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
+ if (NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
HGOTO_DONE(FAIL)
c_size = (size_t)*size + 1;
@@ -721,11 +716,12 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Allocate buffer to hold name of an attribute
*/
- if(NULL == (c_name = (char *)HDmalloc(c_size)))
+ if (NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
- if((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
- (H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
+ if ((c_size_link =
+ H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
+ (H5_iter_order_t)*order, (hsize_t)*n, c_name, c_size, (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
*size = (size_t_f)c_size_link;
@@ -733,19 +729,18 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- if(c_name)
+ if (c_name)
HD5packFstring(c_name, _fcdtocp(name), c_size - 1);
done:
- if(c_group_name)
+ if (c_group_name)
HDfree(c_group_name);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
-
/* /\****if* H5Lf/h5lget_val_c */
/* * NAME */
/* * h5lget_val_c */
@@ -795,12 +790,10 @@ done:
/* *\/ */
/* HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize-1); */
-
/* done: */
/* return ret_value; */
/* } */
-
/* /\****if* H5Lf/ */
/* * NAME */
/* * H5Lregistered_c */
@@ -934,29 +927,29 @@ done:
* M. Scot Breitenfeld
* April 11, 2008
* SOURCE
-*/
+ */
int_f
nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size,
- void *linkval_buff, hid_t_f *lapl_id)
+ void *linkval_buff, hid_t_f *lapl_id)
/******/
-{
+{
char *c_link_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
HGOTO_DONE(FAIL)
/*
* Call H5Lget_val
*/
- if(H5Lget_val((hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id )< 0)
+ if (H5Lget_val((hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -986,27 +979,29 @@ done:
* M. Scot Breitenfeld
* July 8, 2008
* SOURCE
-*/
+ */
int_f
-h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data )
+h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op,
+ void *op_data)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- hsize_t idx_c = 0;
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ hsize_t idx_c = 0;
- idx_c = (hsize_t)*idx;
+ idx_c = (hsize_t)*idx;
- /*
- * Call H5Linterate
- */
+ /*
+ * Call H5Linterate
+ */
- func_ret_value = H5Literate( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
+ func_ret_value =
+ H5Literate((hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
- ret_value = (int_f)func_ret_value;
- *idx = (hsize_t_f)idx_c;
+ ret_value = (int_f)func_ret_value;
+ *idx = (hsize_t_f)idx_c;
- return ret_value;
+ return ret_value;
}
/****if* H5Lf/h5literate_by_name_c
@@ -1036,38 +1031,37 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
* M. Scot Breitenfeld
* August 18, 2008
* SOURCE
-*/
+ */
int_f
-h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id)
+h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order,
+ hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- hsize_t idx_c = 0;
- char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ hsize_t idx_c = 0;
+ char * c_name = NULL; /* Buffer to hold C string */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- return ret_value=-1;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ return ret_value = -1;
- idx_c = (hsize_t)*idx;
+ idx_c = (hsize_t)*idx;
- /*
- * Call H5Linterate
- */
+ /*
+ * Call H5Linterate
+ */
- func_ret_value = H5Literate_by_name((hid_t)*loc_id, c_name,(H5_index_t)*index_type,(H5_iter_order_t)*order,&idx_c,op,op_data,(hid_t)*lapl_id);
+ func_ret_value = H5Literate_by_name((hid_t)*loc_id, c_name, (H5_index_t)*index_type,
+ (H5_iter_order_t)*order, &idx_c, op, op_data, (hid_t)*lapl_id);
- ret_value = (int_f)func_ret_value;
- *idx = (hsize_t_f)idx_c;
+ ret_value = (int_f)func_ret_value;
+ *idx = (hsize_t_f)idx_c;
- if(c_name) HDfree(c_name);
+ if (c_name)
+ HDfree(c_name);
- return ret_value;
+ return ret_value;
}
-
-
-
-
diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90
index 8210212..32fb7d2 100644
--- a/fortran/src/H5Lff.f90
+++ b/fortran/src/H5Lff.f90
@@ -9,18 +9,18 @@
! are enabled or disabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90
index e7d6ab4..cce1c8b 100644
--- a/fortran/src/H5Lff_F03.f90
+++ b/fortran/src/H5Lff_F03.f90
@@ -14,18 +14,18 @@
! instead of H5Lff_F90.f90 if Fortran 2003 functions are enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90
index 6920586..d228d0d 100644
--- a/fortran/src/H5Lff_F90.f90
+++ b/fortran/src/H5Lff_F90.f90
@@ -14,16 +14,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! *** IMPORTANT ***
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index a2d42b7..31382e2 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -11,94 +11,93 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
-int_f
-fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info);
+int_f fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info);
int_f
-fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
-
- struct tm *ts;
-
- object_info->fileno = Oinfo.fileno;
- object_info->addr = (haddr_t_f)Oinfo.addr;
-
- object_info->type = (int_f)Oinfo.type;
- object_info->rc = (int_f)Oinfo.rc;
-
- ts = HDgmtime(&Oinfo.atime);
-
- object_info->atime[0] = (int_f)ts->tm_year+1900; /* year starts at 1900 */
- object_info->atime[1] = (int_f)ts->tm_mon+1; /* month starts at 0 in C */
- object_info->atime[2] = (int_f)ts->tm_mday;
- object_info->atime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->atime[4] = (int_f)ts->tm_hour;
- object_info->atime[5] = (int_f)ts->tm_min;
- object_info->atime[6] = (int_f)ts->tm_sec;
- object_info->atime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
-
- ts = HDgmtime(&Oinfo.btime);
-
- object_info->btime[0] = (int_f)ts->tm_year+1900; /* year starts at 1900 */
- object_info->btime[1] = (int_f)ts->tm_mon+1; /* month starts at 0 in C */
- object_info->btime[2] = (int_f)ts->tm_mday;
- object_info->btime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->btime[4] = (int_f)ts->tm_hour;
- object_info->btime[5] = (int_f)ts->tm_min;
- object_info->btime[6] = (int_f)ts->tm_sec;
- object_info->btime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
-
- ts = HDgmtime(&Oinfo.ctime);
-
- object_info->ctime[0] = (int_f)ts->tm_year+1900; /* year starts at 1900 */
- object_info->ctime[1] = (int_f)ts->tm_mon+1; /* month starts at 0 in C */
- object_info->ctime[2] = (int_f)ts->tm_mday;
- object_info->ctime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->ctime[4] = (int_f)ts->tm_hour;
- object_info->ctime[5] = (int_f)ts->tm_min;
- object_info->ctime[6] = (int_f)ts->tm_sec;
- object_info->ctime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
-
- ts = HDgmtime(&Oinfo.mtime);
-
- object_info->mtime[0] = (int_f)ts->tm_year+1900; /* year starts at 1900 */
- object_info->mtime[1] = (int_f)ts->tm_mon+1; /* month starts at 0 in C */
- object_info->mtime[2] = (int_f)ts->tm_mday;
- object_info->mtime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->mtime[4] = (int_f)ts->tm_hour;
- object_info->mtime[5] = (int_f)ts->tm_min;
- object_info->mtime[6] = (int_f)ts->tm_sec;
- object_info->mtime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
-
- object_info->num_attrs = (hsize_t_f)Oinfo.num_attrs;
-
- object_info->hdr.version = (int_f)Oinfo.hdr.version;
- object_info->hdr.nmesgs = (int_f)Oinfo.hdr.nmesgs;
- object_info->hdr.nchunks = (int_f)Oinfo.hdr.nchunks;
- object_info->hdr.flags = (int_f)Oinfo.hdr.flags;
-
- object_info->hdr.space.total = (hsize_t_f)Oinfo.hdr.space.total;
- object_info->hdr.space.meta = (hsize_t_f)Oinfo.hdr.space.meta;
- object_info->hdr.space.mesg = (hsize_t_f)Oinfo.hdr.space.mesg;
- object_info->hdr.space.free = (hsize_t_f)Oinfo.hdr.space.free;
-
- object_info->hdr.mesg.present = Oinfo.hdr.mesg.present;
- object_info->hdr.mesg.shared = Oinfo.hdr.mesg.shared;
-
- object_info->meta_size.obj.index_size = (hsize_t_f)Oinfo.meta_size.obj.index_size;
- object_info->meta_size.obj.heap_size = (hsize_t_f)Oinfo.meta_size.obj.heap_size;
-
- return 0;
+fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info)
+{
+ struct tm *ts;
+
+ object_info->fileno = Oinfo.fileno;
+ object_info->addr = (haddr_t_f)Oinfo.addr;
+
+ object_info->type = (int_f)Oinfo.type;
+ object_info->rc = (int_f)Oinfo.rc;
+
+ ts = HDgmtime(&Oinfo.atime);
+
+ object_info->atime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */
+ object_info->atime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */
+ object_info->atime[2] = (int_f)ts->tm_mday;
+ object_info->atime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->atime[4] = (int_f)ts->tm_hour;
+ object_info->atime[5] = (int_f)ts->tm_min;
+ object_info->atime[6] = (int_f)ts->tm_sec;
+ object_info->atime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
+
+ ts = HDgmtime(&Oinfo.btime);
+
+ object_info->btime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */
+ object_info->btime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */
+ object_info->btime[2] = (int_f)ts->tm_mday;
+ object_info->btime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->btime[4] = (int_f)ts->tm_hour;
+ object_info->btime[5] = (int_f)ts->tm_min;
+ object_info->btime[6] = (int_f)ts->tm_sec;
+ object_info->btime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
+
+ ts = HDgmtime(&Oinfo.ctime);
+
+ object_info->ctime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */
+ object_info->ctime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */
+ object_info->ctime[2] = (int_f)ts->tm_mday;
+ object_info->ctime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->ctime[4] = (int_f)ts->tm_hour;
+ object_info->ctime[5] = (int_f)ts->tm_min;
+ object_info->ctime[6] = (int_f)ts->tm_sec;
+ object_info->ctime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
+
+ ts = HDgmtime(&Oinfo.mtime);
+
+ object_info->mtime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */
+ object_info->mtime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */
+ object_info->mtime[2] = (int_f)ts->tm_mday;
+ object_info->mtime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->mtime[4] = (int_f)ts->tm_hour;
+ object_info->mtime[5] = (int_f)ts->tm_min;
+ object_info->mtime[6] = (int_f)ts->tm_sec;
+ object_info->mtime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
+
+ object_info->num_attrs = (hsize_t_f)Oinfo.num_attrs;
+
+ object_info->hdr.version = (int_f)Oinfo.hdr.version;
+ object_info->hdr.nmesgs = (int_f)Oinfo.hdr.nmesgs;
+ object_info->hdr.nchunks = (int_f)Oinfo.hdr.nchunks;
+ object_info->hdr.flags = (int_f)Oinfo.hdr.flags;
+
+ object_info->hdr.space.total = (hsize_t_f)Oinfo.hdr.space.total;
+ object_info->hdr.space.meta = (hsize_t_f)Oinfo.hdr.space.meta;
+ object_info->hdr.space.mesg = (hsize_t_f)Oinfo.hdr.space.mesg;
+ object_info->hdr.space.free = (hsize_t_f)Oinfo.hdr.space.free;
+
+ object_info->hdr.mesg.present = Oinfo.hdr.mesg.present;
+ object_info->hdr.mesg.shared = Oinfo.hdr.mesg.shared;
+
+ object_info->meta_size.obj.index_size = (hsize_t_f)Oinfo.meta_size.obj.index_size;
+ object_info->meta_size.obj.heap_size = (hsize_t_f)Oinfo.meta_size.obj.heap_size;
+
+ return 0;
}
/****if* H5Of/h5olink_c
@@ -119,32 +118,31 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
* M. Scot Breitenfeld
* April 21, 2008
* SOURCE
-*/
+ */
int_f
-nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+nh5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id,
+ hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if( (c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Olink function.
- */
- if((hid_t_f)H5Olink((hid_t)*object_id, (hid_t)*new_loc_id, c_name,
- (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Olink function.
+ */
+ if ((hid_t_f)H5Olink((hid_t)*object_id, (hid_t)*new_loc_id, c_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oopen_c
@@ -165,30 +163,30 @@ nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namele
* M. Scot Breitenfeld
* April 18, 2008
* SOURCE
-*/
+ */
int_f
-nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id)
+nh5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oopen function.
- */
- if((*obj_id = (hid_t_f)H5Oopen((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oopen function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oclose_c
* NAME
@@ -196,25 +194,25 @@ nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid
* PURPOSE
* Call H5Oclose
* INPUTS
- * object_id - Object identifier
+ * object_id - Object identifier
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
* December 17, 2008
* SOURCE
-*/
+ */
int_f
-nh5oclose_c ( hid_t_f *object_id )
+nh5oclose_c(hid_t_f *object_id)
/******/
{
- int_f ret_value=0; /* Return value */
-
- if (H5Oclose((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- return ret_value;
+ int_f ret_value = 0; /* Return value */
+
+ if (H5Oclose((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ return ret_value;
}
/****if* H5Of/h5ovisit_c
@@ -239,22 +237,23 @@ nh5oclose_c ( hid_t_f *object_id )
* M. Scot Breitenfeld
* November 19, 2008
* SOURCE
-*/
+ */
int_f
-h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data )
+h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
- /*
- * Call H5Ovisit
- */
- func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data);
+ /*
+ * Call H5Ovisit
+ */
+ func_ret_value =
+ H5Ovisit((hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data);
- ret_value = (int_f)func_ret_value;
+ ret_value = (int_f)func_ret_value;
- return ret_value;
+ return ret_value;
}
/****if* H5Of/h5oopen_by_addr_c
@@ -267,7 +266,7 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
* addr - Object’s address in the file
*
* OUTPUTS
- * obj_id - Dataset identifier
+ * obj_id - Dataset identifier
*
* RETURNS
* 0 on success, -1 on failure
@@ -275,21 +274,21 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
* M. Scot Breitenfeld
* September 14, 2009
* SOURCE
-*/
+ */
int_f
-nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
+nh5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Oopen_by_address function.
- */
- if((*obj_id = (hid_t_f)H5Oopen_by_addr((hid_t)*loc_id, (haddr_t)*addr)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oopen_by_address function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen_by_addr((hid_t)*loc_id, (haddr_t)*addr)) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/H5Oget_info_by_name_c
@@ -311,35 +310,34 @@ nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id)
* M. Scot Breitenfeld
* December 1, 2008
* SOURCE
-*/
+ */
int_f
-h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
- H5O_info_t_f *object_info)
+h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
+ H5O_info_t_f *object_info)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oinfo_by_name function.
- */
- if(H5Oget_info_by_name((hid_t)*loc_id, c_name,
- &Oinfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char * c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ H5O_info_t Oinfo;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oinfo_by_name function.
+ */
+ if (H5Oget_info_by_name((hid_t)*loc_id, c_name, &Oinfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/H5Oget_info_by_idx_c
@@ -361,40 +359,40 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
* M. Scot Breitenfeld
* December 1, 2008
* SOURCE
-*/
+ */
int_f
-h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info)
+h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field, int_f *order,
+ hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
- H5_index_t c_index_field;
- H5_iter_order_t c_order;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring( group_name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
-
- /*
- * Call H5Oinfo_by_idx function.
- */
- if(H5Oget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ H5O_info_t Oinfo;
+ H5_index_t c_index_field;
+ H5_iter_order_t c_order;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ c_index_field = (H5_index_t)*index_field;
+ c_order = (H5_iter_order_t)*order;
+
+ /*
+ * Call H5Oinfo_by_idx function.
+ */
+ if (H5Oget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, &Oinfo,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Of/H5Oget_info_c
@@ -413,24 +411,24 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
+h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info)
/******/
{
- int_f ret_value = 0; /* Return value */
- H5O_info_t Oinfo;
-
- /*
- * Call H5Oinfo_by_name function.
- */
- if(H5Oget_info((hid_t)*object_id, &Oinfo) < 0)
- HGOTO_DONE(FAIL);
-
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
-
- done:
- return ret_value;
+ int_f ret_value = 0; /* Return value */
+ H5O_info_t Oinfo;
+
+ /*
+ * Call H5Oinfo_by_name function.
+ */
+ if (H5Oget_info((hid_t)*object_id, &Oinfo) < 0)
+ HGOTO_DONE(FAIL);
+
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
+
+done:
+ return ret_value;
}
/* ***if* H5Of/H5Ocopy_c
@@ -438,12 +436,12 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
* H5Ocopy_c
* PURPOSE
* Calls H5Ocopy
- * INPUTS
- * src_loc_id - Object identifier indicating the location of the source object to be copied
- * src_name - Name of the source object to be copied
+ * INPUTS
+ * src_loc_id - Object identifier indicating the location of the source object to be copied
+ * src_name - Name of the source object to be copied
* src_name_len - Length of src_name
- * dst_loc_id - Location identifier specifying the destination
- * dst_name - Name to be assigned to the new copy
+ * dst_loc_id - Location identifier specifying the destination
+ * dst_name - Name to be assigned to the new copy
* dst_name_len - Length of dst_name
* ocpypl_id - Object copy property list
* lcpl_id - Link creation property list for the new hard link
@@ -454,41 +452,39 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
* M. Scot Breitenfeld
* March 14, 2012
* SOURCE
-*/
+ */
int_f
-nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
- hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
- hid_t_f *ocpypl_id, hid_t_f *lcpl_id )
+nh5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name,
+ size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id)
/******/
{
- char *c_src_name = NULL; /* Buffer to hold C string */
- char *c_dst_name = NULL; /* Buffer to hold C string */
-
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_src_name = HD5f2cstring(src_name, (size_t)*src_name_len)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_dst_name = HD5f2cstring(dst_name, (size_t)*dst_name_len)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Ocopy function.
- */
- if(H5Ocopy( (hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name,
- (hid_t)*ocpypl_id, (hid_t)*lcpl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_src_name)
- HDfree(c_src_name);
- if(c_dst_name)
- HDfree(c_dst_name);
-
- return ret_value;
-
+ char *c_src_name = NULL; /* Buffer to hold C string */
+ char *c_dst_name = NULL; /* Buffer to hold C string */
+
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_src_name = HD5f2cstring(src_name, (size_t)*src_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_dst_name = HD5f2cstring(dst_name, (size_t)*dst_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Ocopy function.
+ */
+ if (H5Ocopy((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, (hid_t)*ocpypl_id,
+ (hid_t)*lcpl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_src_name)
+ HDfree(c_src_name);
+ if (c_dst_name)
+ HDfree(c_dst_name);
+
+ return ret_value;
}
/****if* H5Of/h5ovisit_by_name_c
@@ -513,34 +509,33 @@ nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
- H5O_iterate_t op, void *op_data, hid_t_f *lapl_id )
+h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
+ H5O_iterate_t op, void *op_data, hid_t_f *lapl_id)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- char *c_object_name = NULL; /* Buffer to hold C string */
-
- /*
- * Convert FORTRAN name to C name
- */
- if( (c_object_name = HD5f2cstring(object_name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Ovisit
- */
- func_ret_value = H5Ovisit_by_name( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, (hid_t)*lapl_id);
- ret_value = (int_f)func_ret_value;
-
- done:
- if(c_object_name)
- HDfree(c_object_name);
- return ret_value;
-
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ char * c_object_name = NULL; /* Buffer to hold C string */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_object_name = HD5f2cstring(object_name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Ovisit
+ */
+ func_ret_value = H5Ovisit_by_name((hid_t)*loc_id, c_object_name, (H5_index_t)*index_type,
+ (H5_iter_order_t)*order, op, op_data, (hid_t)*lapl_id);
+ ret_value = (int_f)func_ret_value;
+
+done:
+ if (c_object_name)
+ HDfree(c_object_name);
+ return ret_value;
}
/****if* H5Of/h5odecr_refcount_c
@@ -556,21 +551,21 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-nh5odecr_refcount_c (hid_t_f *object_id)
+nh5odecr_refcount_c(hid_t_f *object_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Odecr_refcount function.
- */
- if((hid_t_f)H5Odecr_refcount((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Odecr_refcount function.
+ */
+ if ((hid_t_f)H5Odecr_refcount((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/h5oexists_by_name_c
@@ -590,30 +585,30 @@ nh5odecr_refcount_c (hid_t_f *object_id)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
+nh5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oopen function.
- */
- if((ret_value = (int_f)H5Oexists_by_name((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oopen function.
+ */
+ if ((ret_value = (int_f)H5Oexists_by_name((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oincr_refcount_c
@@ -629,21 +624,21 @@ nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *la
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-nh5oincr_refcount_c (hid_t_f *object_id)
+nh5oincr_refcount_c(hid_t_f *object_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Oincr_refcount function.
- */
- if((hid_t_f)H5Oincr_refcount((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oincr_refcount function.
+ */
+ if ((hid_t_f)H5Oincr_refcount((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/h5oset_comment_c
@@ -661,30 +656,30 @@ nh5oincr_refcount_c (hid_t_f *object_id)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
+nh5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oset_comment function.
- */
- if((hid_t_f)H5Oset_comment((hid_t)*object_id, c_comment) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_comment)
- HDfree(c_comment);
- return ret_value;
+ char *c_comment = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oset_comment function.
+ */
+ if ((hid_t_f)H5Oset_comment((hid_t)*object_id, c_comment) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_comment)
+ HDfree(c_comment);
+ return ret_value;
}
/****if* H5Of/h5oset_comment_by_name_c
@@ -694,8 +689,8 @@ nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
* Calls H5Oset_comment_by_name
* INPUTS
* object_id - Identifier of the target object.
- * name - Name of the object whose comment is to be set or reset,
- * specified as a path relative to loc_id.
+ * name - Name of the object whose comment is to be set or reset,
+ * specified as a path relative to loc_id.
* namelen - Length of the name.
* comment - The new comment.
* commentlen - Length of the comment.
@@ -706,38 +701,39 @@ nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id)
+nh5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment,
+ size_t_f *commentlen, hid_t_f *lapl_id)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
- HGOTO_DONE(FAIL);
- /*
- * Convert FORTRAN string to C string
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oset_comment_by_name function.
- */
- if((hid_t_f)H5Oset_comment_by_name((hid_t)*object_id, c_name, c_comment, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- if(c_comment)
- HDfree(c_comment);
- return ret_value;
+ char *c_comment = NULL; /* Buffer to hold C string */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
+ HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oset_comment_by_name function.
+ */
+ if ((hid_t_f)H5Oset_comment_by_name((hid_t)*object_id, c_name, c_comment, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ if (c_comment)
+ HDfree(c_comment);
+ return ret_value;
}
/****if* H5Of/h5oopen_by_idx_c
* NAME
@@ -760,36 +756,37 @@ nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _f
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
+nh5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order,
+ hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0;
- H5_index_t c_index_type;
- H5_iter_order_t c_order;
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_group_name = HD5f2cstring( group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_index_type = (H5_index_t)*index_type;
- c_order = (H5_iter_order_t)*order;
-
- /*
- * Call H5Oopen_by_idx function.
- */
- if((*obj_id =(hid_t_f)H5Oopen_by_idx((hid_t)*loc_id, c_group_name, c_index_type, c_order, (hsize_t)*n, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
+ H5_index_t c_index_type;
+ H5_iter_order_t c_order;
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ c_index_type = (H5_index_t)*index_type;
+ c_order = (H5_iter_order_t)*order;
+
+ /*
+ * Call H5Oopen_by_idx function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen_by_idx((hid_t)*loc_id, c_group_name, c_index_type, c_order, (hsize_t)*n,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Of/h5oget_comment_c
@@ -809,43 +806,43 @@ nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
* M. Scot Breitenfeld
* June 24, 2012
* SOURCE
-*/
+ */
int_f
-nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize)
+nh5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- size_t c_commentsize;
-
- c_commentsize = (size_t)*commentsize + 1;
-
- /*
- * Allocate buffer to hold comment name
- */
-
- if(NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oget_comment function.
- */
-
- if((*bufsize = (hssize_t_f)H5Oget_comment((hid_t)*object_id, c_comment, (size_t)*commentsize)) < 0)
- HGOTO_DONE(FAIL);
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- if(c_comment)
- HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
- return ret_value;
-
- done:
- if(c_comment)
- HDfree(c_comment);
-
- return ret_value;
+ char * c_comment = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ size_t c_commentsize;
+
+ c_commentsize = (size_t)*commentsize + 1;
+
+ /*
+ * Allocate buffer to hold comment name
+ */
+
+ if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oget_comment function.
+ */
+
+ if ((*bufsize = (hssize_t_f)H5Oget_comment((hid_t)*object_id, c_comment, (size_t)*commentsize)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ if (c_comment)
+ HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ return ret_value;
+
+done:
+ if (c_comment)
+ HDfree(c_comment);
+
+ return ret_value;
}
/****if* H5Of/h5oget_comment_by_name_c
@@ -865,54 +862,55 @@ nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hss
* M. Scot Breitenfeld
* July 6, 2012
* SOURCE
-*/
+ */
int_f
-nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
- _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id)
+nh5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment,
+ size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- ssize_t c_bufsize;
- size_t c_commentsize;
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_name = HD5f2cstring(name, (size_t)*name_size)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_commentsize = (size_t)*commentsize + 1;
-
- /*
- * Allocate buffer to hold comment name
- */
-
- if(NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oget_comment_by_name function.
- */
-
- if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
- HGOTO_DONE(FAIL);
-
- *bufsize = (size_t_f)c_bufsize;
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- if(c_comment)
- HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
- return ret_value;
-
- done:
- if(c_comment)
- HDfree(c_comment);
- if(c_name)
- HDfree(c_name);
-
- return ret_value;
+ char * c_comment = NULL; /* Buffer to hold C string */
+ char * c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ ssize_t c_bufsize;
+ size_t c_commentsize;
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*name_size)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ c_commentsize = (size_t)*commentsize + 1;
+
+ /*
+ * Allocate buffer to hold comment name
+ */
+
+ if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oget_comment_by_name function.
+ */
+
+ if ((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+ *bufsize = (size_t_f)c_bufsize;
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ if (c_comment)
+ HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ return ret_value;
+
+done:
+ if (c_comment)
+ HDfree(c_comment);
+ if (c_name)
+ HDfree(c_name);
+
+ return ret_value;
}
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index ce13604..e33f78c 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -13,18 +13,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index 66d9cec..2dbb38e 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -10,18 +10,18 @@
! instead of H5Off_F90.f90 if Fortran 2003 functions are enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90
index 98d3376..6f15b15 100644
--- a/fortran/src/H5Off_F90.f90
+++ b/fortran/src/H5Off_F90.f90
@@ -13,18 +13,18 @@
! Currently contains no functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 220c563..4293d4c 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -38,17 +38,17 @@
* Wednesday, October 9, 2002
*
* SOURCE
-*/
+ */
int_f
-nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id )
+nh5pcreate_c(hid_t_f *cls, hid_t_f *prp_id)
/******/
{
hid_t c_prp_id;
int_f ret_value = 0;
c_prp_id = H5Pcreate((hid_t)*cls);
- if(c_prp_id < 0)
+ if (c_prp_id < 0)
HGOTO_DONE(FAIL)
*prp_id = (hid_t_f)c_prp_id;
@@ -71,21 +71,20 @@ done:
* Saturday, August 14, 1999
*
* SOURCE
-*/
+ */
int_f
-nh5pclose_c ( hid_t_f *prp_id )
+nh5pclose_c(hid_t_f *prp_id)
/******/
{
int_f ret_value = 0;
- if(H5Pclose((hid_t)*prp_id) < 0)
+ if (H5Pclose((hid_t)*prp_id) < 0)
ret_value = -1;
return ret_value;
}
-
/****if* H5Pf/h5pcopy_c
* NAME
* h5pcopy_c
@@ -102,16 +101,16 @@ nh5pclose_c ( hid_t_f *prp_id )
* Saturday, August 14, 1999
*
* SOURCE
-*/
+ */
int_f
-nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id)
+nh5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id)
/******/
{
hid_t c_new_prp_id;
int_f ret_value = 0;
c_new_prp_id = H5Pcopy((hid_t)*prp_id);
- if(c_new_prp_id < 0)
+ if (c_new_prp_id < 0)
HGOTO_DONE(FAIL)
*new_prp_id = (hid_t_f)c_new_prp_id;
@@ -137,16 +136,16 @@ done:
* Monday, September 30, 2002
*
* SOURCE
-*/
+ */
int_f
-nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag)
+nh5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag)
/******/
{
htri_t c_c_flag;
- int_f ret_value = 0;
+ int_f ret_value = 0;
c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id);
- if(c_c_flag < 0)
+ if (c_c_flag < 0)
HGOTO_DONE(FAIL)
*c_flag = (int_f)c_c_flag;
@@ -155,7 +154,6 @@ done:
return ret_value;
}
-
/****if* H5Pf/h5pget_class_c
* NAME
* h5pget_class_c
@@ -171,17 +169,17 @@ done:
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype)
+nh5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype)
/******/
{
hid_t c_classtype;
int_f ret_value = 0;
- if( (c_classtype = H5Pget_class((hid_t)*prp_id)) < 0)
- HGOTO_DONE(FAIL)
+ if ((c_classtype = H5Pget_class((hid_t)*prp_id)) < 0)
+ HGOTO_DONE(FAIL)
*classtype = (hid_t_f)c_classtype;
@@ -204,25 +202,26 @@ done:
* Elena Pourmal
* Thursday, February 17, 2000
* SOURCE
-*/
+ */
int_f
-nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag)
+nh5pset_preserve_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
- hbool_t c_flag = 0;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
+ hbool_t c_flag = 0;
- if (*flag > 0) c_flag = 1;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_preserve(c_prp_id, c_flag);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ if (*flag > 0)
+ c_flag = 1;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_preserve(c_prp_id, c_flag);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_preserve_c
* NAME
* h5pget_preserve_c
@@ -239,21 +238,22 @@ nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag)
* Elena Pourmal
* Thursday, February 17, 2000
* SOURCE
-*/
+ */
int_f
-nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag)
+nh5pget_preserve_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- int c_flag;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ int c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = H5Pget_preserve(c_prp_id);
- if ( c_flag < 0 ) ret_value = -1;
- *flag = (int_f)c_flag;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = H5Pget_preserve(c_prp_id);
+ if (c_flag < 0)
+ ret_value = -1;
+ *flag = (int_f)c_flag;
+ return ret_value;
}
/****if* H5Pf/h5pset_deflate_c
@@ -270,26 +270,25 @@ nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag)
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
+nh5pset_deflate_c(hid_t_f *prp_id, int_f *level)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- unsigned c_level;
- herr_t status;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ unsigned c_level;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_level = (unsigned)*level;
- status = H5Pset_deflate(c_prp_id, c_level);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_level = (unsigned)*level;
+ status = H5Pset_deflate(c_prp_id, c_level);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
-
-
/****if* H5Pf/h5pset_chunk_c
* NAME
* h5pset_chunk_c
@@ -306,34 +305,34 @@ nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
* AUTHOR
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims )
+nh5pset_chunk_c(hid_t_f *prp_id, int_f *rank, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- int c_rank = (int)*rank;
- hsize_t c_dims[H5S_MAX_RANK];
- herr_t status;
- int i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ int c_rank = (int)*rank;
+ hsize_t c_dims[H5S_MAX_RANK];
+ herr_t status;
+ int i;
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < c_rank ; i++)
- c_dims[i] = (hsize_t)dims[c_rank - i - 1];
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for (i = 0; i < c_rank; i++)
+ c_dims[i] = (hsize_t)dims[c_rank - i - 1];
- status = H5Pset_chunk(c_prp_id, c_rank, c_dims);
- if (status < 0) goto DONE;
- ret_value = 0;
+ status = H5Pset_chunk(c_prp_id, c_rank, c_dims);
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_chunk_c
* NAME
* h5pget_chunk_c
@@ -350,29 +349,30 @@ DONE:
* AUTHOR
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
+nh5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- hsize_t c_dims[H5S_MAX_RANK];
- int rank;
- int c_max_rank = (int)*max_rank;
- int i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ hsize_t c_dims[H5S_MAX_RANK];
+ int rank;
+ int c_max_rank = (int)*max_rank;
+ int i;
- rank = H5Pget_chunk(c_prp_id, c_max_rank, c_dims);
+ rank = H5Pget_chunk(c_prp_id, c_max_rank, c_dims);
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < c_max_rank ; i++)
- dims[c_max_rank - i - 1] = (hsize_t_f)c_dims[i];
- if (rank < 0) return ret_value;
- ret_value = (int_f)rank;
- return ret_value;
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for (i = 0; i < c_max_rank; i++)
+ dims[c_max_rank - i - 1] = (hsize_t_f)c_dims[i];
+ if (rank < 0)
+ return ret_value;
+ ret_value = (int_f)rank;
+ return ret_value;
}
/****if* H5Pf/h5pset_fill_valuec_c
@@ -390,19 +390,19 @@ nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
* AUTHOR
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
+nh5pset_fill_valuec_c(hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5pset_fill_value_c function.
- */
- ret_value = h5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));
+ /*
+ * Call h5pset_fill_value_c function.
+ */
+ ret_value = h5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_fill_value_c
@@ -420,54 +420,55 @@ nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_type_id;
+ herr_t ret;
- /*
- * Call H5Pset_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
+ /*
+ * Call H5Pset_fill_value function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_type_id = (hid_t)*type_id;
+ ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pset_fill_value_integer_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
/******/
{
- /*
- * Call h5pset_fill_value_c function.
- */
- return h5pset_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pset_fill_value_c function.
+ */
+ return h5pset_fill_value_c(prp_id, type_id, fillvalue);
}
int_f
-nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pset_fill_value_real_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
- /*
- * Call h5pset_fill_value_c function.
- */
- return h5pset_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pset_fill_value_c function.
+ */
+ return h5pset_fill_value_c(prp_id, type_id, fillvalue);
}
int_f
-nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pset_fill_value_double_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
- /*
- * Call h5pset_fill_value_c function.
- */
- return h5pset_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pset_fill_value_c function.
+ */
+ return h5pset_fill_value_c(prp_id, type_id, fillvalue);
}
/****if* H5Pf/h5pget_fill_valuec_c
@@ -489,19 +490,19 @@ nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* to nh5pget_fill_value_c. MSB - 7/21/2014
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
+nh5pget_fill_valuec_c(hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5pget_fill_value_c function.
- */
- ret_value = h5pget_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));
+ /*
+ * Call h5pget_fill_value_c function.
+ */
+ ret_value = h5pget_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_fill_value_c
@@ -519,53 +520,54 @@ nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_type_id;
+ herr_t ret;
- /*
- * Call H5Pget_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);
+ /*
+ * Call H5Pget_fill_value function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_type_id = (hid_t)*type_id;
+ ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
int_f
-nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pget_fill_value_integer_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
- /*
- * Call h5pget_fill_value_c function.
- */
- return h5pget_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pget_fill_value_c function.
+ */
+ return h5pget_fill_value_c(prp_id, type_id, fillvalue);
}
int_f
-nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pget_fill_value_real_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
- /*
- * Call h5pget_fill_value_c function.
- */
- return h5pget_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pget_fill_value_c function.
+ */
+ return h5pget_fill_value_c(prp_id, type_id, fillvalue);
}
int_f
-nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+nh5pget_fill_value_double_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
- /*
- * Call h5pget_fill_value_c function.
- */
- return h5pget_fill_value_c(prp_id, type_id, fillvalue);
+ /*
+ * Call h5pget_fill_value_c function.
+ */
+ return h5pget_fill_value_c(prp_id, type_id, fillvalue);
}
/****if* H5Pf/h5pget_version_c
@@ -589,41 +591,42 @@ nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* HISTORY
* Removed extra length parameters EP 7/6/00
* SOURCE
-*/
+ */
int_f
-nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
+nh5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
#ifndef H5_NO_DEPRECATED_SYMBOLS
- herr_t ret;
- unsigned c_boot;
- unsigned c_freelist;
- unsigned c_stab;
- unsigned c_shhdr;
-
- /*
- * Call H5Pget_version function.
- */
- ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
- if (ret < 0) return ret_value;
-
- *boot = (int_f)c_boot;
- *freelist = (int_f)c_freelist;
- *stab = (int_f)c_stab;
- *shhdr = (int_f)c_shhdr;
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- /*
- * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
- */
- *boot = (int_f)0;
- *freelist = (int_f)0;
- *stab = (int_f)0;
- *shhdr = (int_f)0;
+ herr_t ret;
+ unsigned c_boot;
+ unsigned c_freelist;
+ unsigned c_stab;
+ unsigned c_shhdr;
+
+ /*
+ * Call H5Pget_version function.
+ */
+ ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
+ if (ret < 0)
+ return ret_value;
+
+ *boot = (int_f)c_boot;
+ *freelist = (int_f)c_freelist;
+ *stab = (int_f)c_stab;
+ *shhdr = (int_f)c_shhdr;
+#else /* H5_NO_DEPRECATED_SYMBOLS */
+ /*
+ * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
+ */
+ *boot = (int_f)0;
+ *freelist = (int_f)0;
+ *stab = (int_f)0;
+ *shhdr = (int_f)0;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- ret_value = 0;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_userblock_c
@@ -641,27 +644,28 @@ nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab,
* Xiangyang Su
* Wednesday, February 23, 2000
* SOURCE
-*/
+ */
int_f
-nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
+nh5pget_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_size;
- /*
- * Call H5Pget_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_userblock(c_prp_id, &c_size);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_userblock function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_userblock(c_prp_id, &c_size);
+ if (ret < 0)
+ return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_userblock_c
@@ -679,26 +683,27 @@ nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
* Xiangyang Su
* Wednesday, February 23, 2000
* SOURCE
-*/
+ */
int_f
-nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
+nh5pset_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
- c_size = (hsize_t)*size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_size;
+ c_size = (hsize_t)*size;
- /*
- * Call H5Pset_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_userblock(c_prp_id, c_size);
+ /*
+ * Call H5Pset_userblock function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_userblock(c_prp_id, c_size);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_sizes_c
@@ -719,29 +724,30 @@ nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
* HISTORY
* Deleted extra length parameters. EP 6/7/00
* SOURCE
-*/
+ */
int_f
-nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
+nh5pget_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- size_t c_sizeof_addr;
- size_t c_sizeof_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ size_t c_sizeof_addr;
+ size_t c_sizeof_size;
- /*
- * Call H5Pget_sizes function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_sizes(c_prp_id, &c_sizeof_addr, &c_sizeof_size);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_sizes function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_sizes(c_prp_id, &c_sizeof_addr, &c_sizeof_size);
+ if (ret < 0)
+ return ret_value;
- *sizeof_addr = (size_t_f)c_sizeof_addr;
- *sizeof_size = (size_t_f)c_sizeof_size;
- ret_value = 0;
+ *sizeof_addr = (size_t_f)c_sizeof_addr;
+ *sizeof_size = (size_t_f)c_sizeof_size;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_sizes_c
@@ -761,27 +767,28 @@ nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
+nh5pset_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- size_t c_addr, c_size;
- c_addr = (size_t)*sizeof_addr;
- c_size = (size_t)*sizeof_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ size_t c_addr, c_size;
+ c_addr = (size_t)*sizeof_addr;
+ c_size = (size_t)*sizeof_size;
- /*
- * Call H5Pset_sizes function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_sizes(c_prp_id, c_addr, c_size);
+ /*
+ * Call H5Pset_sizes function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_sizes(c_prp_id, c_addr, c_size);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_sym_k_c
@@ -800,28 +807,29 @@ nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size
* Xiangyang Su
* Friday, February 25, 2000
* SOURCE
-*/
+ */
int_f
-nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
+nh5pset_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_ik;
- unsigned c_lk;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_ik;
+ unsigned c_lk;
+ herr_t ret;
- /*
- * Call H5Pset_sym_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_ik = (unsigned)*ik;
- c_lk = (unsigned)*lk;
- ret = H5Pset_sym_k(c_prp_id, c_ik, c_lk);
+ /*
+ * Call H5Pset_sym_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_ik = (unsigned)*ik;
+ c_lk = (unsigned)*lk;
+ ret = H5Pset_sym_k(c_prp_id, c_ik, c_lk);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_sym_k_c
@@ -843,27 +851,28 @@ nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
+nh5pget_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_ik;
- unsigned c_lk;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_ik;
+ unsigned c_lk;
- /*
- * Call H5Pget_sym_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_sym_k(c_prp_id, &c_ik, &c_lk);
- *ik = (int_f)c_ik;
- *lk = (int_f)c_lk;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_sym_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_sym_k(c_prp_id, &c_ik, &c_lk);
+ *ik = (int_f)c_ik;
+ *lk = (int_f)c_lk;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_istore_k_c
@@ -883,26 +892,27 @@ nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik)
+nh5pset_istore_k_c(hid_t_f *prp_id, int_f *ik)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_ik;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_ik;
+ herr_t ret;
- /*
- * Call H5Pset_istore_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_ik = (unsigned)*ik;
- ret = H5Pset_istore_k(c_prp_id, c_ik);
+ /*
+ * Call H5Pset_istore_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_ik = (unsigned)*ik;
+ ret = H5Pset_istore_k(c_prp_id, c_ik);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_istore_k_c
@@ -923,25 +933,26 @@ nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik)
+nh5pget_istore_k_c(hid_t_f *prp_id, int_f *ik)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_ik;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_ik;
- /*
- * Call H5Pget_istore_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_istore_k(c_prp_id, &c_ik);
- *ik = (int_f)c_ik;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_istore_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_istore_k(c_prp_id, &c_ik);
+ *ik = (int_f)c_ik;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_driver_c
@@ -961,25 +972,26 @@ nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver)
+nh5pget_driver_c(hid_t_f *prp_id, hid_t_f *driver)
/******/
{
- int ret_value = -1;
- hid_t c_driver;
+ int ret_value = -1;
+ hid_t c_driver;
- /*
- * Call H5Pget_driver function.
- */
- c_driver = H5Pget_driver((hid_t)*prp_id);
- if (c_driver < 0) goto DONE;
+ /*
+ * Call H5Pget_driver function.
+ */
+ c_driver = H5Pget_driver((hid_t)*prp_id);
+ if (c_driver < 0)
+ goto DONE;
- *driver = (hid_t_f) c_driver;
- ret_value = 0;
+ *driver = (hid_t_f)c_driver;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_stdio_c
@@ -998,22 +1010,23 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_stdio_c (hid_t_f *prp_id)
+nh5pset_fapl_stdio_c(hid_t_f *prp_id)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pset_fapl_stdio function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_stdio(c_prp_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pset_fapl_stdio function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_stdio(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#ifdef NO_SUCH_F90_FUNCTION
/****if* H5Pf/h5pget_fapl_stdio_c
@@ -1035,23 +1048,24 @@ nh5pset_fapl_stdio_c (hid_t_f *prp_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io)
+nh5pget_fapl_stdio_c(hid_t_f *prp_id, int_f *io)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pget_fapl_stdio function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_stdio(c_prp_id);
- if (ret < 0) return ret_value;
- *io = (int_f)ret;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pget_fapl_stdio function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_stdio(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ *io = (int_f)ret;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -1072,22 +1086,23 @@ nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_sec2_c (hid_t_f *prp_id)
+nh5pset_fapl_sec2_c(hid_t_f *prp_id)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pset_fapl_sec2 function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_sec2(c_prp_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pset_fapl_sec2 function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_sec2(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#ifdef NO_SUCH_F90_FUNCTION
@@ -1110,23 +1125,24 @@ nh5pset_fapl_sec2_c (hid_t_f *prp_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2)
+nh5pget_fapl_sec2_c(hid_t_f *prp_id, int_f *sec2)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pget_fapl_sec2 function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_sec2(c_prp_id);
- if (ret < 0) return ret_value;
- *sec2 = (int_f)ret;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pget_fapl_sec2 function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_sec2(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ *sec2 = (int_f)ret;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -1148,25 +1164,26 @@ nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
+nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_threshold, c_alignment;
- c_threshold = (hsize_t)*threshold;
- c_alignment = (hsize_t)* alignment;
- /*
- * Call H5Pset_alignment function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_alignment(c_prp_id, c_threshold, c_alignment);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_threshold, c_alignment;
+ c_threshold = (hsize_t)*threshold;
+ c_alignment = (hsize_t)*alignment;
+ /*
+ * Call H5Pset_alignment function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_alignment(c_prp_id, c_threshold, c_alignment);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_alignment_c
@@ -1187,26 +1204,27 @@ nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
+nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_threshold, c_alignment;
- /*
- * Call H5Pget_alignment function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_alignment(c_prp_id, &c_threshold, &c_alignment);
- if (ret < 0) return ret_value;
- *threshold = (hsize_t_f)c_threshold;
- *alignment = (hsize_t_f)c_alignment;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_threshold, c_alignment;
+ /*
+ * Call H5Pget_alignment function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_alignment(c_prp_id, &c_threshold, &c_alignment);
+ if (ret < 0)
+ return ret_value;
+ *threshold = (hsize_t_f)c_threshold;
+ *alignment = (hsize_t_f)c_alignment;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_core_c
@@ -1228,27 +1246,28 @@ nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
+nh5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_increment;
- hbool_t c_backing_store;
- c_increment = (size_t)*increment;
- c_backing_store = (hbool_t)*flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_increment;
+ hbool_t c_backing_store;
+ c_increment = (size_t)*increment;
+ c_backing_store = (hbool_t)*flag;
- /*
- * Call H5Pset_fapl_core function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_core(c_prp_id, c_increment, c_backing_store);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_fapl_core function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_core(c_prp_id, c_increment, c_backing_store);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_core_c
@@ -1268,27 +1287,29 @@ nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
+nh5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_increment = 0;
- hbool_t c_backing_store;
- *flag = 0;
- /*
- * Call H5Pset_fapl_core function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_core(c_prp_id, &c_increment, &c_backing_store);
- if (ret < 0) return ret_value;
- *increment = (size_t_f)c_increment;
- if(c_backing_store > 0) *flag = 1;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_increment = 0;
+ hbool_t c_backing_store;
+ *flag = 0;
+ /*
+ * Call H5Pset_fapl_core function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_core(c_prp_id, &c_increment, &c_backing_store);
+ if (ret < 0)
+ return ret_value;
+ *increment = (size_t_f)c_increment;
+ if (c_backing_store > 0)
+ *flag = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_family_c
@@ -1310,26 +1331,27 @@ nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist )
+nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- hsize_t c_memb_size;
- hid_t c_memb_plist;
- c_memb_size =(hsize_t) *memb_size;
- c_memb_plist =(hid_t) *memb_plist;
- /*
- * Call H5Pset_fapl_family function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_family(c_prp_id, c_memb_size, c_memb_plist);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ hsize_t c_memb_size;
+ hid_t c_memb_plist;
+ c_memb_size = (hsize_t)*memb_size;
+ c_memb_plist = (hid_t)*memb_plist;
+ /*
+ * Call H5Pset_fapl_family function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_family(c_prp_id, c_memb_size, c_memb_plist);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_family_c
@@ -1351,27 +1373,28 @@ nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist)
+nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- hsize_t c_memb_size = 0;
- hid_t c_memb_plist = -1;
- /*
- * Call H5Pget_fapl_family function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_family(c_prp_id, &c_memb_size, &c_memb_plist);
- if (ret < 0) return ret_value;
- *memb_size = (hsize_t_f)c_memb_size;
- *memb_plist = (hid_t_f)c_memb_plist;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ hsize_t c_memb_size = 0;
+ hid_t c_memb_plist = -1;
+ /*
+ * Call H5Pget_fapl_family function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_family(c_prp_id, &c_memb_size, &c_memb_plist);
+ if (ret < 0)
+ return ret_value;
+ *memb_size = (hsize_t_f)c_memb_size;
+ *memb_plist = (hid_t_f)c_memb_plist;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_cache_c
@@ -1396,31 +1419,33 @@ nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist
* Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00
* instead of double
* SOURCE
-*/
+ */
int_f
-nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 )
+nh5pset_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- int c_mdc_nelmts;
- size_t c_rdcc_nelmts;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- c_rdcc_nbytes =(size_t) *rdcc_nbytes;
- c_rdcc_w0 = (double)*rdcc_w0;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ int c_mdc_nelmts;
+ size_t c_rdcc_nelmts;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ c_rdcc_nbytes = (size_t)*rdcc_nbytes;
+ c_rdcc_w0 = (double)*rdcc_w0;
- /*
- * Call H5Pset_cache function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_mdc_nelmts = (int)*mdc_nelmts;
- c_rdcc_nelmts = (size_t)*rdcc_nelmts;
- ret = H5Pset_cache(c_prp_id, c_mdc_nelmts, c_rdcc_nelmts, c_rdcc_nbytes, c_rdcc_w0 );
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_cache function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_mdc_nelmts = (int)*mdc_nelmts;
+ c_rdcc_nelmts = (size_t)*rdcc_nelmts;
+ ret = H5Pset_cache(c_prp_id, c_mdc_nelmts, c_rdcc_nelmts, c_rdcc_nbytes, c_rdcc_w0);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_cache_c
@@ -1448,31 +1473,33 @@ nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size
* Changed type of the rdcc_nelmts parameter to be int_f.
* EIP October 10, 2003
* SOURCE
-*/
+ */
int_f
-nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0)
+nh5pget_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- int c_mdc_nelmts;
- size_t c_rdcc_nelmts;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- /*
- * Call H5Pget_cache function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_cache(c_prp_id, &c_mdc_nelmts, &c_rdcc_nelmts, &c_rdcc_nbytes, &c_rdcc_w0);
- if (ret < 0) return ret_value;
- *mdc_nelmts = (int_f)c_mdc_nelmts;
- *rdcc_nelmts = (size_t_f)c_rdcc_nelmts;
- *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
- *rdcc_w0 = (real_f)c_rdcc_w0;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ int c_mdc_nelmts;
+ size_t c_rdcc_nelmts;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ /*
+ * Call H5Pget_cache function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_cache(c_prp_id, &c_mdc_nelmts, &c_rdcc_nelmts, &c_rdcc_nbytes, &c_rdcc_w0);
+ if (ret < 0)
+ return ret_value;
+ *mdc_nelmts = (int_f)c_mdc_nelmts;
+ *rdcc_nelmts = (size_t_f)c_rdcc_nelmts;
+ *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
+ *rdcc_w0 = (real_f)c_rdcc_w0;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_split_c
@@ -1497,44 +1524,47 @@ nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist)
+nh5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *meta_plist, int_f *raw_len,
+ _fcd raw_ext, hid_t_f *raw_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_meta_plist;
- hid_t c_raw_plist;
- herr_t ret = -1;
- char* c_meta_ext;
- char* c_raw_ext;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_meta_plist;
+ hid_t c_raw_plist;
+ herr_t ret = -1;
+ char * c_meta_ext;
+ char * c_raw_ext;
- c_meta_ext = (char *)HD5f2cstring(meta_ext, (size_t)*meta_len);
- if (c_meta_ext == NULL) return ret_value;
- c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
- if (c_raw_ext == NULL) { HDfree(c_meta_ext);
- return ret_value;
- }
+ c_meta_ext = (char *)HD5f2cstring(meta_ext, (size_t)*meta_len);
+ if (c_meta_ext == NULL)
+ return ret_value;
+ c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
+ if (c_raw_ext == NULL) {
+ HDfree(c_meta_ext);
+ return ret_value;
+ }
- /*
- * Call H5Pset_fapl_split function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_meta_plist = (hid_t)*meta_plist;
- c_raw_plist = (hid_t)*raw_plist;
- ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist );
+ /*
+ * Call H5Pset_fapl_split function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_meta_plist = (hid_t)*meta_plist;
+ c_raw_plist = (hid_t)*raw_plist;
+ ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_meta_ext);
- HDfree(c_raw_ext);
- return ret_value;
+ HDfree(c_meta_ext);
+ HDfree(c_raw_ext);
+ return ret_value;
}
-
#ifdef NO_SUCH_F90_FUNCTION
/****if* H5Pf/h5pget_fapl_split_c
* NAME
@@ -1561,41 +1591,45 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist)
+nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext, hid_t_f *meta_plist,
+ size_t_f *raw_ext_size, _fcd raw_ext, hid_t_f *raw_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_meta_ext_size, c_raw_ext_size;
- hid_t c_meta_plist = -1;
- hid_t c_raw_plist = -1;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_meta_ext_size, c_raw_ext_size;
+ hid_t c_meta_plist = -1;
+ hid_t c_raw_plist = -1;
- char* c_meta_ext = NULL;
- char* c_raw_ext = NULL;
+ char *c_meta_ext = NULL;
+ char *c_raw_ext = NULL;
- c_meta_ext_size = (size_t) *meta_ext_size;
- c_raw_ext_size = (size_t) *raw_ext_size;
- c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
- c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
- if(c_meta_ext == NULL || c_raw_ext == NULL) return ret_value;
+ c_meta_ext_size = (size_t)*meta_ext_size;
+ c_raw_ext_size = (size_t)*raw_ext_size;
+ c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
+ c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
+ if (c_meta_ext == NULL || c_raw_ext == NULL)
+ return ret_value;
- /*
- * Call H5Pget_fapl_split function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_split(c_prp_id, c_meta_ext_size, c_meta_ext,&c_meta_plist, c_raw_ext_size, c_raw_ext, &c_raw_plist );
+ /*
+ * Call H5Pget_fapl_split function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_split(c_prp_id, c_meta_ext_size, c_meta_ext, &c_meta_plist, c_raw_ext_size, c_raw_ext,
+ &c_raw_plist);
- if (ret < 0) return ret_value;
- *meta_plist = c_meta_plist;
- *raw_plist = c_raw_plist;
- HD5packFstring(c_meta_ext, _fcdtocp(meta_ext), strlen(c_meta_ext));
- HD5packFstring(c_raw_ext, _fcdtocp(raw_ext), strlen(c_raw_ext));
+ if (ret < 0)
+ return ret_value;
+ *meta_plist = c_meta_plist;
+ *raw_plist = c_raw_plist;
+ HD5packFstring(c_meta_ext, _fcdtocp(meta_ext), strlen(c_meta_ext));
+ HD5packFstring(c_raw_ext, _fcdtocp(raw_ext), strlen(c_raw_ext));
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -1617,26 +1651,27 @@ nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, h
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
+nh5pset_gc_references_c(hid_t_f *prp_id, int_f *gc_references)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_gc_references;
- c_gc_references = (unsigned)*gc_references;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_gc_references;
+ c_gc_references = (unsigned)*gc_references;
- /*
- * Call H5Pset_gc_references function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_gc_references(c_prp_id, c_gc_references);
+ /*
+ * Call H5Pset_gc_references function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_gc_references(c_prp_id, c_gc_references);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_gc_references_c
@@ -1657,24 +1692,25 @@ nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
+nh5pget_gc_references_c(hid_t_f *prp_id, int_f *gc_references)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_gc_references;
- herr_t ret;
- /*
- * Call H5Pget_gc_references function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_gc_references(c_prp_id, &c_gc_references);
- if (ret < 0) return ret_value;
- *gc_references = (int_f)c_gc_references;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_gc_references;
+ herr_t ret;
+ /*
+ * Call H5Pget_gc_references function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_gc_references(c_prp_id, &c_gc_references);
+ if (ret < 0)
+ return ret_value;
+ *gc_references = (int_f)c_gc_references;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_layout_c
@@ -1694,25 +1730,26 @@ nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_layout_c (hid_t_f *prp_id, int_f* layout)
+nh5pset_layout_c(hid_t_f *prp_id, int_f *layout)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5D_layout_t c_layout;
- c_layout = (H5D_layout_t)*layout;
- /*
- * Call H5Pset_layout function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_layout(c_prp_id, c_layout);
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5D_layout_t c_layout;
+ c_layout = (H5D_layout_t)*layout;
+ /*
+ * Call H5Pset_layout function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_layout(c_prp_id, c_layout);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_layout_c
@@ -1733,23 +1770,24 @@ nh5pset_layout_c (hid_t_f *prp_id, int_f* layout)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_layout_c (hid_t_f *prp_id, int_f* layout)
+nh5pget_layout_c(hid_t_f *prp_id, int_f *layout)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_layout_t c_layout;
- /*
- * Call H5Pget_layout function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_layout = H5Pget_layout(c_prp_id);
- if (c_layout < 0) return ret_value;
- *layout = (int_f)c_layout;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_layout_t c_layout;
+ /*
+ * Call H5Pget_layout function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_layout = H5Pget_layout(c_prp_id);
+ if (c_layout < 0)
+ return ret_value;
+ *layout = (int_f)c_layout;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_filter_c
@@ -1772,36 +1810,38 @@ nh5pget_layout_c (hid_t_f *prp_id, int_f* layout)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
+nh5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- herr_t ret;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- unsigned int c_flags = (unsigned)*flags;
- H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
- unsigned int * c_cd_values;
- unsigned i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ herr_t ret;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ unsigned int c_flags = (unsigned)*flags;
+ H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
+ unsigned int *c_cd_values;
+ unsigned i;
- c_cd_values = (unsigned int*)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
- if (!c_cd_values) return ret_value;
- for (i = 0; i < c_cd_nelmts; i++)
- c_cd_values[i] = (unsigned int)cd_values[i];
+ c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ if (!c_cd_values)
+ return ret_value;
+ for (i = 0; i < c_cd_nelmts; i++)
+ c_cd_values[i] = (unsigned int)cd_values[i];
- /*
- * Call H5Pset_filter function.
- */
- ret = H5Pset_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );
+ /*
+ * Call H5Pset_filter function.
+ */
+ ret = H5Pset_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts, c_cd_values);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_cd_values);
- return ret_value;
+ HDfree(c_cd_values);
+ return ret_value;
}
/****if* H5Pf/h5pget_nfilters_c
@@ -1820,25 +1860,26 @@ DONE:
* Xiangyang Su
* Friday, February 25, 2000
* SOURCE
-*/
+ */
int_f
-nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters)
+nh5pget_nfilters_c(hid_t_f *prp_id, int_f *nfilters)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- int c_nfilters;
- /*
- * Call H5Pget_nfilters function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_nfilters = H5Pget_nfilters(c_prp_id);
- if (c_nfilters < 0) return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ int c_nfilters;
+ /*
+ * Call H5Pget_nfilters function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_nfilters = H5Pget_nfilters(c_prp_id);
+ if (c_nfilters < 0)
+ return ret_value;
- *nfilters = (int_f)c_nfilters;
- ret_value = 0;
+ *nfilters = (int_f)c_nfilters;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -1865,45 +1906,47 @@ nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters)
* MSB January 27, 2009
*---------------------------------------------------------------------------*/
int_f
-nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id)
+nh5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values,
+ size_t_f *namelen, _fcd name, int_f *filter_id)
/******/
{
unsigned int c_flags;
- size_t c_cd_nelmts = 0;
- H5Z_filter_t c_filter;
+ size_t c_cd_nelmts = 0;
+ H5Z_filter_t c_filter;
unsigned int *c_cd_values = NULL;
- char *c_name = NULL;
- unsigned i;
- int ret_value = -1;
+ char * c_name = NULL;
+ unsigned i;
+ int ret_value = -1;
c_cd_nelmts = (size_t)*cd_nelmts;
- if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
+ if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
goto DONE;
/*
* Call H5Pget_filter2 function.
*/
- if((c_filter = H5Pget_filter2((hid_t)*prp_id, (unsigned)*filter_number, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL)) < 0)
+ if ((c_filter = H5Pget_filter2((hid_t)*prp_id, (unsigned)*filter_number, &c_flags, &c_cd_nelmts,
+ c_cd_values, (size_t)*namelen, c_name, NULL)) < 0)
goto DONE;
*filter_id = (int_f)c_filter;
*cd_nelmts = (size_t_f)c_cd_nelmts;
- *flags = (int_f)c_flags;
+ *flags = (int_f)c_flags;
HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
- for(i = 0; i < c_cd_nelmts; i++)
- cd_values[i] = (int_f)c_cd_values[i];
+ for (i = 0; i < c_cd_nelmts; i++)
+ cd_values[i] = (int_f)c_cd_values[i];
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_cd_values)
+ if (c_cd_values)
HDfree(c_cd_values);
return ret_value;
}
@@ -1928,39 +1971,40 @@ DONE:
* Wednesday, February 23, 2000
* HISTORY
* Changed type of 'offset' from int_f to off_t_f -- MSB January 9, 2012
- *
+ *
* SOURCE
-*/
+ */
int_f
-nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes)
+nh5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset, hsize_t_f *bytes)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_bytes;
- char* c_name;
- size_t c_namelen = (size_t)*namelen;
- off_t c_offset;
- c_bytes = (hsize_t) *bytes;
- c_offset = (off_t) *offset;
-
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_bytes;
+ char * c_name;
+ size_t c_namelen = (size_t)*namelen;
+ off_t c_offset;
+ c_bytes = (hsize_t)*bytes;
+ c_offset = (off_t)*offset;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, c_namelen);
+ if (c_name == NULL)
+ return ret_value;
- /*
- * Call H5Pset_external function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);
+ /*
+ * Call H5Pset_external function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_name);
- return ret_value;
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pget_external_count_c
@@ -1981,23 +2025,24 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
+nh5pget_external_count_c(hid_t_f *prp_id, int_f *count)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- int c_count;
- /*
- * Call H5Pget_external_count function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_count = H5Pget_external_count(c_prp_id);
- if (c_count < 0) return ret_value;
- *count = (int_f)c_count;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ int c_count;
+ /*
+ * Call H5Pget_external_count function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_count = H5Pget_external_count(c_prp_id);
+ if (c_count < 0)
+ return ret_value;
+ *count = (int_f)c_count;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_external_c
@@ -2023,93 +2068,90 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
* Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
*
* SOURCE
-*/
+ */
int_f
-nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes)
+nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, off_t_f *offset,
+ hsize_t_f *bytes)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_idx;
- herr_t status;
- size_t c_namelen;
- char* c_name = NULL;
- off_t c_offset;
- hsize_t size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_idx;
+ herr_t status;
+ size_t c_namelen;
+ char * c_name = NULL;
+ off_t c_offset;
+ hsize_t size;
- c_namelen = (size_t)*name_size;
- /*
- * Allocate memory to store the name of the external file.
- */
- if(c_namelen) c_name = (char*)HDmalloc(c_namelen + 1);
- if (c_name == NULL) return ret_value;
+ c_namelen = (size_t)*name_size;
+ /*
+ * Allocate memory to store the name of the external file.
+ */
+ if (c_namelen)
+ c_name = (char *)HDmalloc(c_namelen + 1);
+ if (c_name == NULL)
+ return ret_value;
- /*
- * Call H5Pget_external function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_idx = (unsigned)*idx;
- status = H5Pget_external(c_prp_id, c_idx, c_namelen+1, c_name, &c_offset, &size );
+ /*
+ * Call H5Pget_external function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_idx = (unsigned)*idx;
+ status = H5Pget_external(c_prp_id, c_idx, c_namelen + 1, c_name, &c_offset, &size);
- if (status < 0) goto DONE;
+ if (status < 0)
+ goto DONE;
- *offset = (off_t_f)c_offset;
- *bytes = (hsize_t_f)size;
- /* Note: if the size of the fortran buffer is larger then the returned string
- * from the function then we need to give HD5packFstring the fortran buffer size so
- * that it fills the remaining unused characters with blanks. MSB
- */
- HD5packFstring(c_name, _fcdtocp(name), c_namelen);
- ret_value = 0;
+ *offset = (off_t_f)c_offset;
+ *bytes = (hsize_t_f)size;
+ /* Note: if the size of the fortran buffer is larger then the returned string
+ * from the function then we need to give HD5packFstring the fortran buffer size so
+ * that it fills the remaining unused characters with blanks. MSB
+ */
+ HD5packFstring(c_name, _fcdtocp(name), c_namelen);
+ ret_value = 0;
DONE:
- HDfree(c_name);
- return ret_value;
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pset_btree_ratios_c
* NAME
* h5pset_btree_ratios_c
* PURPOSE
- * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a
- * dataset transfer property list.
- * INPUTS
- * prp_id - property list identifier
- * left - The B-tree split ratio for left-most nodes.
- * middle - The B-tree split ratio for all other nodes
- * right - The B-tree split ratio for right-most nodes
- * and lone nodes.
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Xiangyang Su
+ * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer
+ * property list. a dataset transfer property list. INPUTS prp_id - property list identifier left - The B-tree
+ * split ratio for left-most nodes. middle - The B-tree split ratio for all other nodes right - The B-tree
+ * split ratio for right-most nodes and lone nodes. RETURNS 0 on success, -1 on failure AUTHOR Xiangyang Su
* Friday, February 25, 2000
* HISTORY
* Changed the type of the last three parameters from double to real_f
* SOURCE
-*/
+ */
int_f
-nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
+nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- double c_left;
- double c_middle;
- double c_right;
- c_left = (double)*left;
- c_middle = (double)*middle;
- c_right = (double)*right;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ double c_left;
+ double c_middle;
+ double c_right;
+ c_left = (double)*left;
+ c_middle = (double)*middle;
+ c_right = (double)*right;
- /*
- * Call H5Pset_btree_ratios function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_btree_ratios(c_prp_id, c_left, c_middle, c_right);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_btree_ratios function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_btree_ratios(c_prp_id, c_left, c_middle, c_right);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_btree_ratios_c
@@ -2132,27 +2174,28 @@ nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri
* HISTORY
* Changed the type of the last three parameters from double to real_f
* SOURCE
-*/
+ */
int_f
-nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
+nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- double c_left, c_right, c_middle;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ double c_left, c_right, c_middle;
- /*
- * Call H5Pget_btree_ratios function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_btree_ratios(c_prp_id, &c_left, &c_middle, &c_right);
- *left = (real_f)c_left;
- *middle = (real_f)c_middle;
- *right = (real_f)c_right;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_btree_ratios function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_btree_ratios(c_prp_id, &c_left, &c_middle, &c_right);
+ *left = (real_f)c_left;
+ *middle = (real_f)c_middle;
+ *right = (real_f)c_right;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fclose_degree_c
* NAME
@@ -2176,22 +2219,23 @@ nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
+nh5pget_fclose_degree_c(hid_t_f *fapl_id, int_f *degree)
/******/
{
- int ret_value = -1;
- hid_t c_fapl_id;
- H5F_close_degree_t c_degree;
+ int ret_value = -1;
+ hid_t c_fapl_id;
+ H5F_close_degree_t c_degree;
- c_fapl_id = (hid_t)*fapl_id;
- if( H5Pget_fclose_degree(c_fapl_id, &c_degree) < 0) return ret_value;
+ c_fapl_id = (hid_t)*fapl_id;
+ if (H5Pget_fclose_degree(c_fapl_id, &c_degree) < 0)
+ return ret_value;
- *degree = (int_f)c_degree;
- ret_value = 0;
- return ret_value;
+ *degree = (int_f)c_degree;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fclose_degree_c
@@ -2214,22 +2258,23 @@ nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
+nh5pset_fclose_degree_c(hid_t_f *fapl_id, int_f *degree)
/******/
{
- int ret_value = -1;
- hid_t c_fapl_id;
- H5F_close_degree_t c_degree;
+ int ret_value = -1;
+ hid_t c_fapl_id;
+ H5F_close_degree_t c_degree;
- c_fapl_id = (hid_t)*fapl_id;
- c_degree = (H5F_close_degree_t)*degree;
- if( H5Pset_fclose_degree(c_fapl_id, c_degree) < 0) return ret_value;
+ c_fapl_id = (hid_t)*fapl_id;
+ c_degree = (H5F_close_degree_t)*degree;
+ if (H5Pset_fclose_degree(c_fapl_id, c_degree) < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_buffer_c
@@ -2250,20 +2295,21 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pset_buffer_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_buffer_c
@@ -2283,22 +2329,23 @@ nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pget_buffer_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
- if ( c_size == 0 ) return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
+ if (c_size == 0)
+ return ret_value;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pfill_value_defined_c
* NAME
@@ -2317,21 +2364,22 @@ nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag)
+nh5pfill_value_defined_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_value_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_value_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pfill_value_defined(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pfill_value_defined(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_alloc_time_c
* NAME
@@ -2351,21 +2399,22 @@ nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
+nh5pget_alloc_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_alloc_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_alloc_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_alloc_time(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_alloc_time(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_alloc_time_c
* NAME
@@ -2384,21 +2433,22 @@ nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
+nh5pset_alloc_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_alloc_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_alloc_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5D_alloc_time_t)*flag;
- if ( H5Pset_alloc_time(c_prp_id, c_flag) < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5D_alloc_time_t)*flag;
+ if (H5Pset_alloc_time(c_prp_id, c_flag) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fill_time_c
* NAME
@@ -2418,21 +2468,22 @@ nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag)
+nh5pget_fill_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_fill_time(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_fill_time(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fill_time_c
* NAME
@@ -2451,21 +2502,22 @@ nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag)
+nh5pset_fill_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5D_fill_time_t)*flag;
- if ( H5Pset_fill_time(c_prp_id, c_flag) < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5D_fill_time_t)*flag;
+ if (H5Pset_fill_time(c_prp_id, c_flag) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_meta_block_size_c
* NAME
@@ -2485,20 +2537,21 @@ nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pset_meta_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (hsize_t)*size;
- if ( H5Pset_meta_block_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (hsize_t)*size;
+ if (H5Pset_meta_block_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_meta_block_size_c
* NAME
@@ -2518,20 +2571,21 @@ nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pget_meta_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_meta_block_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (hsize_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_meta_block_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (hsize_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_sieve_buf_size_c
* NAME
@@ -2551,20 +2605,21 @@ nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
+nh5pset_sieve_buf_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_sieve_buf_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_sieve_buf_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_sieve_buf_size_c
* NAME
@@ -2584,20 +2639,21 @@ nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
+nh5pget_sieve_buf_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_sieve_buf_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (size_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_sieve_buf_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (size_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_small_data_block_size_c
* NAME
@@ -2617,20 +2673,21 @@ nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pset_small_data_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (hsize_t)*size;
- if ( H5Pset_small_data_block_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (hsize_t)*size;
+ if (H5Pset_small_data_block_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_small_data_block_size_c
* NAME
@@ -2650,20 +2707,21 @@ nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+nh5pget_small_data_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_small_data_block_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (hsize_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_small_data_block_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (hsize_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_hyper_vector_size_c
* NAME
@@ -2683,20 +2741,21 @@ nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
+nh5pset_hyper_vector_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_hyper_vector_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_hyper_vector_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_hyper_vector_size_c
* NAME
@@ -2716,20 +2775,21 @@ nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
+nh5pget_hyper_vector_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_hyper_vector_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (size_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_hyper_vector_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (size_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pcreate_class_c
* NAME
@@ -2750,18 +2810,17 @@ nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
*
* HISTORY
* SOURCE
-*/
+ */
int_f
nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- ret_value = h5pcreate_class_c(parent, name, name_len, cls, NULL, NULL, NULL, NULL, NULL, NULL);
- return ret_value;
+ ret_value = h5pcreate_class_c(parent, name, name_len, cls, NULL, NULL, NULL, NULL, NULL, NULL);
+ return ret_value;
}
-
/****if* H5Pf/h5pcreate_class_c
* NAME
* h5pcreate_class_c
@@ -2783,36 +2842,38 @@ nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls
* Added the callback parameters (FORTRAN 2003 compilers only)
* M. Scot Breitenfeld, July 3, 2008
* SOURCE
-*/
+ */
int_f
-h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data)
+h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create,
+ void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close,
+ void *close_data)
/******/
{
- int ret_value = -1;
- hid_t c_class;
- char* c_name;
+ int ret_value = -1;
+ hid_t c_class;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pcreate_class function.
- */
- c_class = H5Pcreate_class((hid_t)*parent, c_name, create, create_data, copy, copy_data, close, close_data);
+ /*
+ * Call H5Pcreate_class function.
+ */
+ c_class =
+ H5Pcreate_class((hid_t)*parent, c_name, create, create_data, copy, copy_data, close, close_data);
- if (c_class < 0) goto DONE;
- *cls = (hid_t_f)c_class;
- ret_value = 0;
+ if (c_class < 0)
+ goto DONE;
+ *cls = (hid_t_f)c_class;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
-
/****if* H5Pf/h5pregisterc_c
* NAME
* h5pregisterc_c
@@ -2832,18 +2893,19 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len)
+nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value,
+ int_f H5_ATTR_UNUSED *value_len)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call h5pregister_c function
- */
- ret_value = h5pregister_c(cls, name, name_len, size, _fcdtocp(value));
- return ret_value;
+ /*
+ * Call h5pregister_c function
+ */
+ ret_value = h5pregister_c(cls, name, name_len, size, _fcdtocp(value));
+ return ret_value;
}
/****if* H5Pf/h5pregister_c
@@ -2865,55 +2927,55 @@ nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd v
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value)
/******/
{
- char* c_name = NULL;
- int_f ret_value = -1;
+ char *c_name = NULL;
+ int_f ret_value = -1;
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
- goto DONE;
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
+ goto DONE;
- /*
- * Call H5Pregister2 function.
- */
- if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pregister2 function.
+ */
+ if (H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL)
- HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
int_f
nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pregister_c function
- */
- return h5pregister_c(cls, name, name_len, size, value);
+ /*
+ * Call h5pregister_c function
+ */
+ return h5pregister_c(cls, name, name_len, size, value);
}
int_f
nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pregister_c function
- */
- return h5pregister_c(cls, name, name_len, size, value);
+ /*
+ * Call h5pregister_c function
+ */
+ return h5pregister_c(cls, name, name_len, size, value);
}
int_f
nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pregister_c function
- */
- return h5pregister_c(cls, name, name_len, size, value);
+ /*
+ * Call h5pregister_c function
+ */
+ return h5pregister_c(cls, name, name_len, size, value);
}
/****if* H5Pf/h5pinsertc_c
@@ -2935,18 +2997,19 @@ nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len)
+nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value,
+ int_f H5_ATTR_UNUSED *value_len)
/******/
{
- int_f ret_value = -1;
+ int_f ret_value = -1;
- /*
- * Call h5pinsert_c function
- */
- ret_value = h5pinsert_c(plist, name, name_len, size, _fcdtocp(value));
- return ret_value;
+ /*
+ * Call h5pinsert_c function
+ */
+ ret_value = h5pinsert_c(plist, name, name_len, size, _fcdtocp(value));
+ return ret_value;
}
/****if* H5Pf/h5pinsert_c
@@ -2968,55 +3031,55 @@ nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd v
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value)
/******/
{
- char* c_name = NULL;
- int_f ret_value = -1;
+ char *c_name = NULL;
+ int_f ret_value = -1;
- if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
- goto DONE;
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
+ goto DONE;
- /*
- * Call H5Pinsert2 function.
- */
- if(H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pinsert2 function.
+ */
+ if (H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
int_f
nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pinsert_c function
- */
- return h5pinsert_c(plist, name, name_len, size, value);
+ /*
+ * Call h5pinsert_c function
+ */
+ return h5pinsert_c(plist, name, name_len, size, value);
}
int_f
nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pinsert_c function
- */
- return h5pinsert_c(plist, name, name_len, size, value);
+ /*
+ * Call h5pinsert_c function
+ */
+ return h5pinsert_c(plist, name, name_len, size, value);
}
int_f
nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
- /*
- * Call h5pinsert_c function
- */
- return h5pinsert_c(plist, name, name_len, size, value);
+ /*
+ * Call h5pinsert_c function
+ */
+ return h5pinsert_c(plist, name, name_len, size, value);
}
/****if* H5Pf/h5pexist_c
@@ -3037,29 +3100,31 @@ nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
- htri_t status;
+ int_f ret_value = -1;
+ hid_t c_class;
+ char * c_name;
+ htri_t status;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_class = (hid_t)*cls;
- /*
- * Call H5Pexist function.
- */
- status = H5Pexist(c_class, c_name);
- ret_value = status;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Pexist function.
+ */
+ status = H5Pexist(c_class, c_name);
+ ret_value = status;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pisa_class_c
* NAME
@@ -3078,25 +3143,25 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- hid_t c_plist;
- htri_t status;
+ int_f ret_value = -1;
+ hid_t c_class;
+ hid_t c_plist;
+ htri_t status;
- c_class = (hid_t)*cls;
- c_plist = (hid_t)*plist;
+ c_class = (hid_t)*cls;
+ c_plist = (hid_t)*plist;
- /*
- * Call H5Pisa_class function.
- */
- status = H5Pisa_class(c_plist, c_class);
- ret_value = status;
- return ret_value;
+ /*
+ * Call H5Pisa_class function.
+ */
+ status = H5Pisa_class(c_plist, c_class);
+ ret_value = status;
+ return ret_value;
}
/****if* H5Pf/h5pget_size_c
* NAME
@@ -3117,30 +3182,33 @@ nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size)
/******/
{
- int_f ret_value = -1;
- hid_t c_plist;
- char* c_name;
- size_t c_size;
+ int_f ret_value = -1;
+ hid_t c_plist;
+ char * c_name;
+ size_t c_size;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_plist = (hid_t)*plist;
- /*
- * Call H5Pget_size function.
- */
- if( H5Pget_size(c_plist, c_name, &c_size) < 0) goto DONE;
- *size = (size_t_f)c_size;
- ret_value = 0;
+ c_plist = (hid_t)*plist;
+ /*
+ * Call H5Pget_size function.
+ */
+ if (H5Pget_size(c_plist, c_name, &c_size) < 0)
+ goto DONE;
+ *size = (size_t_f)c_size;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pget_nprops_c
* NAME
@@ -3159,25 +3227,26 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops)
/******/
{
- int_f ret_value = -1;
- hid_t c_plist;
- size_t c_nprops;
+ int_f ret_value = -1;
+ hid_t c_plist;
+ size_t c_nprops;
- c_plist = (hid_t)*plist;
+ c_plist = (hid_t)*plist;
- /*
- * Call H5Pget_nprops function.
- */
- if( H5Pget_nprops(c_plist, &c_nprops) < 0) return ret_value;
+ /*
+ * Call H5Pget_nprops function.
+ */
+ if (H5Pget_nprops(c_plist, &c_nprops) < 0)
+ return ret_value;
- *nprops = (size_t_f)c_nprops;
- ret_value = 0;
- return ret_value;
+ *nprops = (size_t_f)c_nprops;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_class_parent_c
* NAME
@@ -3197,26 +3266,27 @@ nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- hid_t c_parent_id;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_parent_id;
- c_prp_id = (hid_t)*prp_id;
+ c_prp_id = (hid_t)*prp_id;
- /*
- * Call H5Pget_class_parent function.
- */
- c_parent_id = H5Pget_class_parent(c_prp_id);
- if( c_parent_id < 0) return ret_value;
+ /*
+ * Call H5Pget_class_parent function.
+ */
+ c_parent_id = H5Pget_class_parent(c_prp_id);
+ if (c_parent_id < 0)
+ return ret_value;
- *parent_id =(hid_t_f)c_parent_id;
- ret_value = 0;
- return ret_value;
+ *parent_id = (hid_t_f)c_parent_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pcopy_prop_c
* NAME
@@ -3237,29 +3307,32 @@ nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_dst_id, c_src_id;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_dst_id, c_src_id;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_dst_id = (hid_t)*dst_id;
- c_src_id = (hid_t)*src_id;
- /*
- * Call H5Pcopy_prop function.
- */
- if( H5Pcopy_prop(c_dst_id, c_src_id, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_dst_id = (hid_t)*dst_id;
+ c_src_id = (hid_t)*src_id;
+ /*
+ * Call H5Pcopy_prop function.
+ */
+ if (H5Pcopy_prop(c_dst_id, c_src_id, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5premove_c
* NAME
@@ -3278,28 +3351,31 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_plid;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_plid;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_plid = (hid_t)*plid;
- /*
- * Call H5Premove function.
- */
- if( H5Premove(c_plid, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_plid = (hid_t)*plid;
+ /*
+ * Call H5Premove function.
+ */
+ if (H5Premove(c_plid, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5punregister_c
* NAME
@@ -3318,28 +3394,31 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_class;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_class = (hid_t)*cls;
- /*
- * Call H5Punregister function.
- */
- if( H5Punregister(c_class, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Punregister function.
+ */
+ if (H5Punregister(c_class, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pclose_class_c
* NAME
@@ -3356,21 +3435,22 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pclose_class_c(hid_t_f *cls)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
+ int_f ret_value = -1;
+ hid_t c_class;
- c_class = (hid_t)*cls;
- /*
- * Call H5Pclose_class function.
- */
- if( H5Pclose_class(c_class) < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Pclose_class function.
+ */
+ if (H5Pclose_class(c_class) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_class_name_c
@@ -3390,29 +3470,29 @@ nh5pclose_class_c(hid_t_f *cls)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
+ int_f ret_value = -1;
- /* Buffer to return name by C function */
- char *c_name;
+ /* Buffer to return name by C function */
+ char *c_name;
- /*
- * Call H5Pget_class_name function. c_name is allocated by the library,
- * has to be freed by application.
- */
- if(NULL == (c_name = H5Pget_class_name((hid_t)*cls)))
- goto DONE;
+ /*
+ * Call H5Pget_class_name function. c_name is allocated by the library,
+ * has to be freed by application.
+ */
+ if (NULL == (c_name = H5Pget_class_name((hid_t)*cls)))
+ goto DONE;
- HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
- ret_value = (int_f)HDstrlen(c_name);
- H5free_memory(c_name);
+ HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
+ ret_value = (int_f)HDstrlen(c_name);
+ H5free_memory(c_name);
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5psetc_c
@@ -3433,18 +3513,18 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len)
/******/
{
- int_f ret_value = -1;
+ int_f ret_value = -1;
- /*
- * Call h5pset_c function
- */
- ret_value = h5pset_c(plist, name, name_len, _fcdtocp(value));
- return ret_value;
+ /*
+ * Call h5pset_c function
+ */
+ ret_value = h5pset_c(plist, name, name_len, _fcdtocp(value));
+ return ret_value;
}
/****if* H5Pf/h5pset_c
@@ -3465,53 +3545,56 @@ nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
/******/
{
- int_f ret_value = -1;
- char* c_name;
+ int_f ret_value = -1;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pset function.
- */
- if( H5Pset((hid_t)*plist, c_name, value) <0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pset function.
+ */
+ if (H5Pset((hid_t)*plist, c_name, value) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
int_f
nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pset_c function
- */
- return h5pset_c(plist, name, name_len, value);
+ /*
+ * Call h5pset_c function
+ */
+ return h5pset_c(plist, name, name_len, value);
}
int_f
nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pset_c function
- */
- return h5pset_c(plist, name, name_len, value);
+ /*
+ * Call h5pset_c function
+ */
+ return h5pset_c(plist, name, name_len, value);
}
int_f
nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pset_c function
- */
- return h5pset_c(plist, name, name_len, value);
+ /*
+ * Call h5pset_c function
+ */
+ return h5pset_c(plist, name, name_len, value);
}
/****if* H5Pf/h5pgetc_c
* NAME
@@ -3531,18 +3614,18 @@ nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len)
/******/
{
- int_f ret_value = -1;
+ int_f ret_value = -1;
- /*
- * Call h5pget_c function
- */
- ret_value = h5pget_c(plist, name, name_len, _fcdtocp(value));
- return ret_value;
+ /*
+ * Call h5pget_c function
+ */
+ ret_value = h5pget_c(plist, name, name_len, _fcdtocp(value));
+ return ret_value;
}
/****if* H5Pf/h5pget_c
@@ -3554,7 +3637,7 @@ nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR
* plist - property list class identifier
* name - name of the new property
* name_len - length of the "name" buffer
- * Output:
+ * Output:
* value - property value
* RETURNS
* 0 on success, -1 on failure
@@ -3564,56 +3647,58 @@ nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
/******/
{
- int_f ret_value = -1;
- char* c_name;
+ int_f ret_value = -1;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pset function.
- */
- if( H5Pget((hid_t)*plist, c_name, value) <0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pset function.
+ */
+ if (H5Pget((hid_t)*plist, c_name, value) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
int_f
nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pget_c function
- */
- return h5pget_c(plist, name, name_len, value);
+ /*
+ * Call h5pget_c function
+ */
+ return h5pget_c(plist, name, name_len, value);
}
int_f
nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pget_c function
- */
- return h5pget_c(plist, name, name_len, value);
+ /*
+ * Call h5pget_c function
+ */
+ return h5pget_c(plist, name, name_len, value);
}
int_f
nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
- /*
- * Call h5pget_c function
- */
- return h5pget_c(plist, name, name_len, value);
+ /*
+ * Call h5pget_c function
+ */
+ return h5pget_c(plist, name, name_len, value);
}
-
/****if* H5Pf/h5pset_shuffle_c
* NAME
* h5pset_shuffle_c
@@ -3630,20 +3715,21 @@ nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_shuffle_c ( hid_t_f *prp_id )
+nh5pset_shuffle_c(hid_t_f *prp_id)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_shuffle(c_prp_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_shuffle(c_prp_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_fletcher32_c
* NAME
@@ -3660,20 +3746,21 @@ nh5pset_shuffle_c ( hid_t_f *prp_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fletcher32_c ( hid_t_f *prp_id )
+nh5pset_fletcher32_c(hid_t_f *prp_id)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_fletcher32(c_prp_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_fletcher32(c_prp_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_edc_check_c
@@ -3692,22 +3779,23 @@ nh5pset_fletcher32_c ( hid_t_f *prp_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag )
+nh5pset_edc_check_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- H5Z_EDC_t c_flag;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ H5Z_EDC_t c_flag;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5Z_EDC_t)*flag;
- status = H5Pset_edc_check(c_prp_id, c_flag);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5Z_EDC_t)*flag;
+ status = H5Pset_edc_check(c_prp_id, c_flag);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_edc_check_c
@@ -3726,21 +3814,22 @@ nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag )
+nh5pget_edc_check_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- H5Z_EDC_t c_flag;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ H5Z_EDC_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = H5Pget_edc_check(c_prp_id);
- if ( c_flag < 0 ) ret_value = -1;
- *flag = (int_f)c_flag;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = H5Pget_edc_check(c_prp_id);
+ if (c_flag < 0)
+ ret_value = -1;
+ *flag = (int_f)c_flag;
+ return ret_value;
}
/****if* H5Pf/h5pset_family_offset_c
* NAME
@@ -3758,22 +3847,23 @@ nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
+nh5pset_family_offset_c(hid_t_f *prp_id, hsize_t_f *offset)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_offset;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_offset;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_offset = (hsize_t)*offset;
- status = H5Pset_family_offset(c_prp_id, c_offset);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_offset = (hsize_t)*offset;
+ status = H5Pset_family_offset(c_prp_id, c_offset);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_multi_c
@@ -3797,71 +3887,81 @@ nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-/*nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */
-nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag)
-/******/
-{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
- hid_t c_memb_fapl[H5FD_MEM_NTYPES];
- char *c_memb_name[H5FD_MEM_NTYPES];
- haddr_t c_memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
- herr_t status;
- char *tmp, *tmp_p, *tmp_pp;
- int i;
- int c_lenmax;
- long double tmp_max_addr;
- c_lenmax = (int)*lenmax;
- relax = (hbool_t)*flag;
-/*
- * Check that we got correct values from Fortran for memb_addr array
- */
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- if(memb_addr[i] >= 1.0f) return ret_value;
- }
/*
- * Take care of names array
- */
-
- tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES));
- if (tmp ==NULL) return ret_value;
- tmp_p = tmp;
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
- HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
- tmp_pp = c_memb_name[i];
- tmp_pp[len[i]] = '\0';
- tmp_p = tmp_p + c_lenmax;
- }
-/*
- * Take care of othe arguments
- */
- tmp_max_addr = (long double)(HADDR_MAX);
- c_prp_id = (hid_t)*prp_id;
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_map[i] = (H5FD_mem_t)memb_map[i];
- c_memb_fapl[i] = (hid_t)memb_fapl[i];
- if(memb_addr[i] < 0) c_memb_addr[i] = HADDR_UNDEF;
- else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr));
- }
-/*
- * Call H5Pset_fapl_multi function
+ * nh5pset_fapl_multi_c(hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name,
+ * int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag)
*/
+nh5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len,
+ int_f *lenmax, real_f *memb_addr, int_f *flag)
+/******/
+{
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
+ hid_t c_memb_fapl[H5FD_MEM_NTYPES];
+ char * c_memb_name[H5FD_MEM_NTYPES];
+ haddr_t c_memb_addr[H5FD_MEM_NTYPES];
+ hbool_t relax;
+ herr_t status;
+ char * tmp, *tmp_p, *tmp_pp;
+ int i;
+ int c_lenmax;
+ long double tmp_max_addr;
+ c_lenmax = (int)*lenmax;
+ relax = (hbool_t)*flag;
+ /*
+ * Check that we got correct values from Fortran for memb_addr array
+ */
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ if (memb_addr[i] >= 1.0f)
+ return ret_value;
+ }
+ /*
+ * Take care of names array
+ */
- status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax);
- if ( status < 0 ) goto DONE;
- ret_value = 0;
+ tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax * (H5FD_MEM_NTYPES));
+ if (tmp == NULL)
+ return ret_value;
+ tmp_p = tmp;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
+ HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
+ tmp_pp = c_memb_name[i];
+ tmp_pp[len[i]] = '\0';
+ tmp_p = tmp_p + c_lenmax;
+ }
+ /*
+ * Take care of othe arguments
+ */
+ tmp_max_addr = (long double)(HADDR_MAX);
+ c_prp_id = (hid_t)*prp_id;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ c_memb_map[i] = (H5FD_mem_t)memb_map[i];
+ c_memb_fapl[i] = (hid_t)memb_fapl[i];
+ if (memb_addr[i] < 0)
+ c_memb_addr[i] = HADDR_UNDEF;
+ else
+ c_memb_addr[i] = (haddr_t)(((float)memb_addr[i]) * (tmp_max_addr));
+ }
+ /*
+ * Call H5Pset_fapl_multi function
+ */
+
+ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char *const *)c_memb_name,
+ c_memb_addr, relax);
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
- return ret_value;
+ HDfree(tmp);
+ for (i = 0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_multi_sc
@@ -3879,27 +3979,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
+nh5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- hbool_t relax;
- herr_t status;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ hbool_t relax;
+ herr_t status;
- relax = (hbool_t)*flag;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pset_fapl_multi function
- */
+ relax = (hbool_t)*flag;
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pset_fapl_multi function
+ */
- status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
- if ( status < 0 ) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
+ if (status < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_multi_c
* NAME
@@ -3923,66 +4024,70 @@ nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out)
+nh5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len,
+ int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
- hid_t c_memb_fapl[H5FD_MEM_NTYPES];
- char *c_memb_name[H5FD_MEM_NTYPES];
- haddr_t c_memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
- herr_t status;
- char *tmp, *tmp_p;
- int i;
- size_t c_lenmax;
- size_t length = 0;
- c_lenmax = (size_t)*lenmax;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
+ hid_t c_memb_fapl[H5FD_MEM_NTYPES];
+ char * c_memb_name[H5FD_MEM_NTYPES];
+ haddr_t c_memb_addr[H5FD_MEM_NTYPES];
+ hbool_t relax;
+ herr_t status;
+ char * tmp, *tmp_p;
+ int i;
+ size_t c_lenmax;
+ size_t length = 0;
+ c_lenmax = (size_t)*lenmax;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pget_fapl_multi function
- */
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pget_fapl_multi function
+ */
- status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax);
- if ( status < 0 ) return ret_value;
+ status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax);
+ if (status < 0)
+ return ret_value;
-/*
- * Take care of names array
- */
- tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1);
- tmp_p = tmp;
- HDmemset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
- tmp[c_lenmax*H5FD_MEM_NTYPES] = '\0';
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
- len[i] = (int_f)strlen(c_memb_name[i]);
- length = H5_MAX(length, strlen(c_memb_name[i]));
- tmp_p = tmp_p + c_lenmax;
- }
-HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));
+ /*
+ * Take care of names array
+ */
+ tmp = (char *)HDmalloc(c_lenmax * H5FD_MEM_NTYPES + 1);
+ tmp_p = tmp;
+ HDmemset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES);
+ tmp[c_lenmax * H5FD_MEM_NTYPES] = '\0';
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
+ len[i] = (int_f)strlen(c_memb_name[i]);
+ length = H5_MAX(length, strlen(c_memb_name[i]));
+ tmp_p = tmp_p + c_lenmax;
+ }
+ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax * H5FD_MEM_NTYPES));
-/*
- * Take care of other arguments
- */
+ /*
+ * Take care of other arguments
+ */
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- memb_map[i] = (int_f)c_memb_map[i];
- memb_fapl[i] = (hid_t_f)c_memb_fapl[i];
- if(c_memb_addr[i] == HADDR_UNDEF) memb_addr[i] = -1;
- else memb_addr[i] = (real_f) (c_memb_addr[i]/HADDR_MAX);
- }
- *flag = (int_f)relax;
- *maxlen_out = (int_f)length;
- ret_value = 0;
- HDfree(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
- return ret_value;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ memb_map[i] = (int_f)c_memb_map[i];
+ memb_fapl[i] = (hid_t_f)c_memb_fapl[i];
+ if (c_memb_addr[i] == HADDR_UNDEF)
+ memb_addr[i] = -1;
+ else
+ memb_addr[i] = (real_f)(c_memb_addr[i] / HADDR_MAX);
+ }
+ *flag = (int_f)relax;
+ *maxlen_out = (int_f)length;
+ ret_value = 0;
+ HDfree(tmp);
+ for (i = 0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
+ return ret_value;
}
/****if* H5Pf/h5pset_szip_c
@@ -4002,29 +4107,30 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block)
+nh5pset_szip_c(hid_t_f *prp_id, int_f *options_mask, int_f *pixels_per_block)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- unsigned c_options_mask;
- unsigned c_pixels_per_block;
- herr_t status;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_options_mask;
+ unsigned c_pixels_per_block;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_options_mask = (unsigned)*options_mask;
- c_pixels_per_block = (unsigned)*pixels_per_block;
-/*
- * Call H5Pset_szip function
- */
+ c_prp_id = (hid_t)*prp_id;
+ c_options_mask = (unsigned)*options_mask;
+ c_pixels_per_block = (unsigned)*pixels_per_block;
+ /*
+ * Call H5Pset_szip function
+ */
- status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pall_filters_avail_c
* NAME
@@ -4043,28 +4149,29 @@ nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status)
+nh5pall_filters_avail_c(hid_t_f *prp_id, int_f *status)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- htri_t c_status;
-
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ htri_t c_status;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pall_filters_avail function
- */
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pall_filters_avail function
+ */
- c_status = H5Pall_filters_avail(c_prp_id);
- if ( c_status < 0 ) return ret_value;
- *status = 0;
- if (c_status == 1) *status = 1;
- ret_value = 0;
- return ret_value;
+ c_status = H5Pall_filters_avail(c_prp_id);
+ if (c_status < 0)
+ return ret_value;
+ *status = 0;
+ if (c_status == 1)
+ *status = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_filter_by_id_c
@@ -4091,44 +4198,46 @@ nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name)
+nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values,
+ size_t_f *namelen, _fcd name)
/******/
{
- unsigned int c_flags;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- size_t c_cd_nelmts_in = (size_t)*cd_nelmts;
- unsigned int *c_cd_values = NULL;
- char *c_name = NULL;
- unsigned i;
- int_f ret_value = -1;
-
- if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
- goto DONE;
+ unsigned int c_flags;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ size_t c_cd_nelmts_in = (size_t)*cd_nelmts;
+ unsigned int *c_cd_values = NULL;
+ char * c_name = NULL;
+ unsigned i;
+ int_f ret_value = -1;
+
+ if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in)))
- goto DONE;
+ if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in)))
+ goto DONE;
- /*
- * Call H5Pget_filter_by_id2 function.
- */
- if(H5Pget_filter_by_id2((hid_t)*prp_id, (H5Z_filter_t)*filter_id, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL) < 0)
- goto DONE;
+ /*
+ * Call H5Pget_filter_by_id2 function.
+ */
+ if (H5Pget_filter_by_id2((hid_t)*prp_id, (H5Z_filter_t)*filter_id, &c_flags, &c_cd_nelmts, c_cd_values,
+ (size_t)*namelen, c_name, NULL) < 0)
+ goto DONE;
- *cd_nelmts = (size_t_f)c_cd_nelmts;
- *flags = (int_f)c_flags;
- HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name));
+ *cd_nelmts = (size_t_f)c_cd_nelmts;
+ *flags = (int_f)c_flags;
+ HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name));
- for(i = 0; i < c_cd_nelmts_in; i++)
- cd_values[i] = (int_f)c_cd_values[i];
+ for (i = 0; i < c_cd_nelmts_in; i++)
+ cd_values[i] = (int_f)c_cd_values[i];
- ret_value = 0;
+ ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_cd_values)
+ if (c_cd_values)
HDfree(c_cd_values);
return ret_value;
@@ -4154,36 +4263,38 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
+nh5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- herr_t ret;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- unsigned int c_flags = (unsigned)*flags;
- H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
- unsigned int * c_cd_values;
- unsigned i;
+ int_f ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ herr_t ret;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ unsigned int c_flags = (unsigned)*flags;
+ H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
+ unsigned int *c_cd_values;
+ unsigned i;
- c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
- if (!c_cd_values) return ret_value;
- for (i = 0; i < c_cd_nelmts; i++)
- c_cd_values[i] = (unsigned int)cd_values[i];
+ c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ if (!c_cd_values)
+ return ret_value;
+ for (i = 0; i < c_cd_nelmts; i++)
+ c_cd_values[i] = (unsigned int)cd_values[i];
- /*
- * Call H5Pmodify_filter function.
- */
- ret = H5Pmodify_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );
+ /*
+ * Call H5Pmodify_filter function.
+ */
+ ret = H5Pmodify_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts, c_cd_values);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_cd_values);
- return ret_value;
+ HDfree(c_cd_values);
+ return ret_value;
}
/****if* H5Pf/h5premove_filter_c
@@ -4202,26 +4313,27 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5premove_filter_c (hid_t_f *prp_id, int_f* filter)
+nh5premove_filter_c(hid_t_f *prp_id, int_f *filter)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5Z_filter_t c_filter;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5Z_filter_t c_filter;
- c_filter = (H5Z_filter_t)*filter;
- c_prp_id = (hid_t)*prp_id;
+ c_filter = (H5Z_filter_t)*filter;
+ c_prp_id = (hid_t)*prp_id;
- /*
- * Call H5Premove_filter function.
- */
- if(H5Premove_filter(c_prp_id, c_filter) < 0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Premove_filter function.
+ */
+ if (H5Premove_filter(c_prp_id, c_filter) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_attr_phase_change_c
@@ -4242,27 +4354,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- hid_t c_ocpl_id;
- unsigned c_max_compact;
- unsigned c_min_dense;
- herr_t ret;
- /*
- * Call H5Pget_attr_phase_change function.
- */
- c_ocpl_id = (hid_t)*ocpl_id;
- ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact,&c_min_dense);
- if (ret < 0) return ret_value;
-
- *max_compact = (int_f)c_max_compact;
- *min_dense = (int_f)c_min_dense;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_ocpl_id;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
+ /*
+ * Call H5Pget_attr_phase_change function.
+ */
+ c_ocpl_id = (hid_t)*ocpl_id;
+ ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact, &c_min_dense);
+ if (ret < 0)
+ return ret_value;
+
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_attr_creation_order_c
@@ -4282,24 +4395,25 @@ nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
+nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- unsigned c_crt_order_flags;
- herr_t ret;
- /*
- * Call h5pset_attr_creation_order function.
- */
- c_crt_order_flags = (unsigned)*crt_order_flags;
- ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ unsigned c_crt_order_flags;
+ herr_t ret;
+ /*
+ * Call h5pset_attr_creation_order function.
+ */
+ c_crt_order_flags = (unsigned)*crt_order_flags;
+ ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ *crt_order_flags = (int_f)c_crt_order_flags;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_shared_mesg_nindexes_c
@@ -4324,25 +4438,26 @@ nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
+nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes)
/******/
{
- int ret_value = -1;
- hid_t c_plist_id;
- unsigned c_nindexes;
- herr_t ret;
- /*
- * Call h5pset_shared_mesg_nindexes function.
- */
- c_plist_id = (hid_t)*plist_id;
- c_nindexes = (unsigned)*nindexes;
- ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes );
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ hid_t c_plist_id;
+ unsigned c_nindexes;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_nindexes function.
+ */
+ c_plist_id = (hid_t)*plist_id;
+ c_nindexes = (unsigned)*nindexes;
+ ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_shared_mesg_index_c
@@ -4368,21 +4483,23 @@ nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call h5pset_shared_mesg_index function.
- */
- ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id,(unsigned)*index_num, (unsigned)*mesg_type_flags, (unsigned)*min_mesg_size);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_index function.
+ */
+ ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id, (unsigned)*index_num, (unsigned)*mesg_type_flags,
+ (unsigned)*min_mesg_size);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_attr_creation_order_c
@@ -4406,26 +4523,27 @@ nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- unsigned c_crt_order_flags;
- /*
- * Call h5pget_attr_creation_order function.
- */
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_attr_creation_order function.
+ */
- ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
- if (ret < 0) return ret_value;
+ ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
+ *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_libver_bounds_c
* NAME
@@ -4449,22 +4567,23 @@ nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
+nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_libver_bounds function.
- */
- ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high );
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_libver_bounds function.
+ */
+ ret = H5Pset_libver_bounds((hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_link_creation_order_c
@@ -4486,21 +4605,22 @@ nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
+nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_link_creation_order function.
- */
- ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_link_creation_order function.
+ */
+ ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_link_phase_change_c
@@ -4521,26 +4641,27 @@ nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- unsigned c_max_compact;
- unsigned c_min_dense;
- herr_t ret;
+ int ret_value = -1;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
- /*
- * Call H5Pget_link_phase_change function.
- */
- ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact,&c_min_dense);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+ ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact, &c_min_dense);
+ if (ret < 0)
+ return ret_value;
- *max_compact = (int_f)c_max_compact;
- *min_dense = (int_f)c_min_dense;
- ret_value = 0;
- return ret_value;
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_obj_track_times_c
@@ -4562,27 +4683,29 @@ nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hbool_t c_track_times=0;
- herr_t ret;
+ int ret_value = -1;
+ hbool_t c_track_times = 0;
+ herr_t ret;
- /*
- * Call H5Pget_obj_track_times function.
- */
- ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);
+ /*
+ * Call H5Pget_obj_track_times function.
+ */
+ ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);
- if (ret < 0) return ret_value; /* error occurred */
+ if (ret < 0)
+ return ret_value; /* error occurred */
- *flag = 0;
- if(c_track_times > 0) *flag = 1;
- ret_value = 0;
- return ret_value;
+ *flag = 0;
+ if (c_track_times > 0)
+ *flag = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_obj_track_times_c
@@ -4602,27 +4725,27 @@ nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hbool_t c_track_times;
- herr_t ret;
-
+ int ret_value = -1;
+ hbool_t c_track_times;
+ herr_t ret;
- c_track_times = (hbool_t)*flag;
+ c_track_times = (hbool_t)*flag;
- /*
- * Call H5Pset_obj_track_times function.
- */
- ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);
+ /*
+ * Call H5Pset_obj_track_times function.
+ */
+ ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);
- if (ret < 0) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_create_inter_group_c
@@ -4645,23 +4768,24 @@ nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_create_intermediate_group function.
- */
- ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
+ /*
+ * Call H5Pset_create_intermediate_group function.
+ */
+ ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
- if (ret < 0) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_link_creation_order_c
@@ -4685,26 +4809,27 @@ nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- unsigned c_crt_order_flags;
- /*
- * Call h5pget_link_creation_order function.
- */
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_link_creation_order function.
+ */
- ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
- if (ret < 0) return ret_value;
+ ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
+ *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_char_encoding_c
@@ -4730,25 +4855,25 @@ nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_char_encoding function.
- */
- ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_char_encoding function.
+ */
+ ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_char_encoding_c
* NAME
* h5pget_char_encoding_c
@@ -4772,24 +4897,25 @@ nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
/******/
{
- int ret_value = -1;
- H5T_cset_t c_encoding;
- herr_t ret;
- /*
- * Call H5Pget_char_encoding function.
- */
- ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ H5T_cset_t c_encoding;
+ herr_t ret;
+ /*
+ * Call H5Pget_char_encoding function.
+ */
+ ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
+ if (ret < 0)
+ return ret_value;
- *encoding = (int_f)c_encoding;
+ *encoding = (int_f)c_encoding;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_copy_object_c
@@ -4815,21 +4941,22 @@ nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_copy_object function.
- */
- ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_copy_object function.
+ */
+ ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_copy_object_c
@@ -4854,24 +4981,25 @@ nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
/******/
{
- int ret_value = -1;
- unsigned c_copy_options;
- herr_t ret;
- /*
- * Call H5Pget_copy_object function.
- */
- ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ unsigned c_copy_options;
+ herr_t ret;
+ /*
+ * Call H5Pget_copy_object function.
+ */
+ ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
+ if (ret < 0)
+ return ret_value;
- *copy_options = (int_f)c_copy_options;
+ *copy_options = (int_f)c_copy_options;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_data_transform_c
@@ -4898,31 +5026,31 @@ nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size)
/******/
{
- char *c_expression = NULL; /* Buffer to hold C string */
- size_t c_expression_len = (size_t)*expression_len + 1;
+ char * c_expression = NULL; /* Buffer to hold C string */
+ size_t c_expression_len = (size_t)*expression_len + 1;
ssize_t ret;
- int_f ret_value = 0;
+ int_f ret_value = 0;
/*
* Allocate memory to store the expression.
*/
- if(c_expression_len) {
+ if (c_expression_len) {
c_expression = (char *)HDmalloc(c_expression_len);
- if(NULL == c_expression)
- HGOTO_DONE(FAIL)
+ if (NULL == c_expression)
+ HGOTO_DONE(FAIL)
} /* end if */
/*
* Call H5Pget_data_transform function.
*/
ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
- if(ret < 0)
- HGOTO_DONE(FAIL)
+ if (ret < 0)
+ HGOTO_DONE(FAIL)
/* or strlen ? */
HD5packFstring(c_expression, _fcdtocp(expression), (size_t)*expression_len);
@@ -4930,7 +5058,7 @@ nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_l
*size = (size_t_f)ret;
done:
- if(c_expression)
+ if (c_expression)
HDfree(c_expression);
return ret_value;
@@ -4960,31 +5088,31 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len)
/******/
{
- char* c_expression = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_expression = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Pset_data_transform function.
- */
- if(H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
+ /*
+ * Call H5Pset_data_transform function.
+ */
+ if (H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_expression)
+ if (c_expression)
HDfree(c_expression);
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_local_heap_size_hint_c
@@ -5009,23 +5137,24 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
/******/
{
- int_f ret_value = -1; /* Return value */
- size_t c_size_hint;
- herr_t ret;
- /*
- * Call H5Pget_local_heap_size_hint function.
- */
- ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ size_t c_size_hint;
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
+ if (ret < 0)
+ return ret_value;
- *size_hint = (size_t_f)c_size_hint;
- ret_value = 0;
- return ret_value;
+ *size_hint = (size_t_f)c_size_hint;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_est_link_info_c
@@ -5051,26 +5180,27 @@ nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
/******/
{
- int_f ret_value = -1; /* Return value */
- unsigned c_est_num_entries;
- unsigned c_est_name_len;
- herr_t ret;
- /*
- * Call h5pget_est_link_info function.
- */
- ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ unsigned c_est_num_entries;
+ unsigned c_est_name_len;
+ herr_t ret;
+ /*
+ * Call h5pget_est_link_info function.
+ */
+ ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
+ if (ret < 0)
+ return ret_value;
- *est_num_entries = (int_f)c_est_num_entries;
- *est_name_len = (int_f)c_est_name_len;
+ *est_num_entries = (int_f)c_est_num_entries;
+ *est_name_len = (int_f)c_est_name_len;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_local_heap_size_hint_c
@@ -5096,21 +5226,22 @@ nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t ret;
- /*
- * Call H5Pget_local_heap_size_hint function.
- */
- ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_est_link_info_c
@@ -5136,21 +5267,22 @@ nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t ret;
- /*
- * Call h5pset_est_link_info function.
- */
- ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call h5pset_est_link_info function.
+ */
+ ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_link_phase_change_c
@@ -5172,22 +5304,23 @@ nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_link_phase_change function.
- */
- ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+ ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact, (unsigned)*min_dense);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_direct_c
@@ -5211,25 +5344,27 @@ nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
+nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment,
+ size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
#ifdef H5_HAVE_DIRECT
- herr_t ret;
+ herr_t ret;
- /*
- * Call H5Pset_link_phase_change function.
- */
- ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size );
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+ ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
+ ret_value = 0;
#endif
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_direct_c
@@ -5254,31 +5389,33 @@ nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
+nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment,
+ size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
#ifdef H5_HAVE_DIRECT
- herr_t ret;
- size_t c_alignment;
- size_t c_block_size;
- size_t c_cbuf_size;
-
- /*
- * Call H5Pget_link_phase_change function.
- */
- ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size );
- if (ret < 0) return ret_value;
-
- *alignment = (size_t_f)c_alignment;
- *block_size = (size_t_f)c_block_size;
- *cbuf_size = (size_t_f)c_cbuf_size;
-
- ret_value = 0;
+ herr_t ret;
+ size_t c_alignment;
+ size_t c_block_size;
+ size_t c_cbuf_size;
+
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+ ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size);
+ if (ret < 0)
+ return ret_value;
+
+ *alignment = (size_t_f)c_alignment;
+ *block_size = (size_t_f)c_block_size;
+ *cbuf_size = (size_t_f)c_cbuf_size;
+
+ ret_value = 0;
#endif
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_attr_phase_change_c
@@ -5301,21 +5438,22 @@ nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_attr_phase_change function.
- */
- ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_attr_phase_change function.
+ */
+ ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact, (unsigned)*min_dense);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_nbit_c
@@ -5336,21 +5474,22 @@ nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5pset_nbit_c(hid_t_f *plist_id )
+nh5pset_nbit_c(hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_nbit_change function.
- */
- ret = H5Pset_nbit((hid_t)*plist_id);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nbit_change function.
+ */
+ ret = H5Pset_nbit((hid_t)*plist_id);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_scaleoffset_c
* NAME
@@ -5369,24 +5508,25 @@ nh5pset_nbit_c(hid_t_f *plist_id )
* M. Scot Breitenfeld
* March 21, 2008
* SOURCE
-*/
+ */
int_f
-nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor )
+nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor)
/******/
{
- int ret_value = -1;
- H5Z_SO_scale_type_t c_scale_type;
- herr_t ret;
- /*
- * Call H5Pset_scaleoffset_change function.
- */
- c_scale_type = (H5Z_SO_scale_type_t)*scale_type;
+ int ret_value = -1;
+ H5Z_SO_scale_type_t c_scale_type;
+ herr_t ret;
+ /*
+ * Call H5Pset_scaleoffset_change function.
+ */
+ c_scale_type = (H5Z_SO_scale_type_t)*scale_type;
- ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
- if (ret < 0) return ret_value;
+ ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_nlinks
@@ -5404,21 +5544,22 @@ nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor
* M. Scot Breitenfeld
* March 24, 2008
* SOURCE
-*/
+ */
int_f
nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_nlinks function.
- */
- ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nlinks function.
+ */
+ ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_nlinks
@@ -5443,23 +5584,24 @@ nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
/******/
{
- int ret_value = -1;
- herr_t ret;
- size_t c_nlinks;
- /*
- * Call H5Pget_nlinks function.
- */
- ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ size_t c_nlinks;
+ /*
+ * Call H5Pget_nlinks function.
+ */
+ ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
+ if (ret < 0)
+ return ret_value;
- *nlinks = (size_t_f)c_nlinks;
- ret_value = 0;
- return ret_value;
+ *nlinks = (size_t_f)c_nlinks;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_create_inter_group_c
@@ -5481,25 +5623,26 @@ nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
/******/
{
- int ret_value = -1;
- herr_t ret;
- unsigned c_crt_intermed_group;
+ int ret_value = -1;
+ herr_t ret;
+ unsigned c_crt_intermed_group;
- /*
- * Call H5Pget_create_intermediate_group function.
- */
- ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, &c_crt_intermed_group);
+ /*
+ * Call H5Pget_create_intermediate_group function.
+ */
+ ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, &c_crt_intermed_group);
- if (ret < 0) return ret_value; /* error occurred */
+ if (ret < 0)
+ return ret_value; /* error occurred */
- *crt_intermed_group = (int_f)c_crt_intermed_group;
- ret_value = 0;
- return ret_value;
+ *crt_intermed_group = (int_f)c_crt_intermed_group;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5520,16 +5663,17 @@ nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
int_f
nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call H5Pset_chunk_cache function.
- */
- if( (H5Pset_chunk_cache((hid_t)*dapl_id, (size_t)*rdcc_nslots, (size_t)*rdcc_nbytes, (double)*rdcc_w0)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pset_chunk_cache function.
+ */
+ if ((H5Pset_chunk_cache((hid_t)*dapl_id, (size_t)*rdcc_nslots, (size_t)*rdcc_nbytes, (double)*rdcc_w0)) <
+ 0)
+ return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5551,22 +5695,22 @@ nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb
int_f
nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
- int ret_value = -1;
- size_t c_rdcc_nslots;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- /*
- * Call H5Pget_chunk_cache function.
- */
- if( (H5Pget_chunk_cache((hid_t)*dapl_id, &c_rdcc_nslots, &c_rdcc_nbytes, &c_rdcc_w0)) <0 )
- return ret_value; /* error occurred */
+ int ret_value = -1;
+ size_t c_rdcc_nslots;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ /*
+ * Call H5Pget_chunk_cache function.
+ */
+ if ((H5Pget_chunk_cache((hid_t)*dapl_id, &c_rdcc_nslots, &c_rdcc_nbytes, &c_rdcc_w0)) < 0)
+ return ret_value; /* error occurred */
- *rdcc_nslots=(size_t_f)c_rdcc_nslots;
- *rdcc_nbytes=(size_t_f)c_rdcc_nbytes;
- *rdcc_w0=(real_f)c_rdcc_w0;
+ *rdcc_nslots = (size_t_f)c_rdcc_nslots;
+ *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
+ *rdcc_w0 = (real_f)c_rdcc_w0;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5575,7 +5719,7 @@ nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb
*
* Inputs:
* fapl_id - File access property list identifier
- * buf_ptr - Pointer to the initial file image,
+ * buf_ptr - Pointer to the initial file image,
* or NULL if no initial file image is desired
* buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired
*
@@ -5587,15 +5731,15 @@ nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb
int_f
h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
{
- int ret_value = -1;
- /*
- * Call H5Pset_file_image function.
- */
- if( (H5Pset_file_image((hid_t)*fapl_id, buf_ptr, (size_t)*buf_len)) <0 )
- return ret_value; /* error occurred */
+ int ret_value = -1;
+ /*
+ * Call H5Pset_file_image function.
+ */
+ if ((H5Pset_file_image((hid_t)*fapl_id, buf_ptr, (size_t)*buf_len)) < 0)
+ return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5605,7 +5749,7 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
* Inputs:
* fapl_id - File access property list identifier
* Outputs:
- * buf_ptr - Pointer to the initial file image,
+ * buf_ptr - Pointer to the initial file image,
* or NULL if no initial file image is desired
* buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired
*
@@ -5617,24 +5761,25 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
int_f
h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
{
- int ret_value = -1;
- size_t c_buf_len_ptr;
- void *c_buf_ptr = NULL;
+ int ret_value = -1;
+ size_t c_buf_len_ptr;
+ void * c_buf_ptr = NULL;
- c_buf_len_ptr = (size_t)*buf_len_ptr;
+ c_buf_len_ptr = (size_t)*buf_len_ptr;
- /*
- * Call H5Pget_file_image function.
- */
- if( (H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pget_file_image function.
+ */
+ if ((H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) < 0)
+ return ret_value; /* error occurred */
- HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
+ HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
- *buf_len_ptr=(size_t_f)c_buf_len_ptr;
+ *buf_len_ptr = (size_t_f)c_buf_len_ptr;
- ret_value = 0;
- if(c_buf_ptr) HDfree(c_buf_ptr);
+ ret_value = 0;
+ if (c_buf_ptr)
+ HDfree(c_buf_ptr);
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 609c376..2e0ab76 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -9,18 +9,18 @@
! are enabled or disabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90
index 6ca1f85..ee9221f 100644
--- a/fortran/src/H5Pff_F03.f90
+++ b/fortran/src/H5Pff_F03.f90
@@ -11,16 +11,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90
index 8475f37..1f5c6b2 100644
--- a/fortran/src/H5Pff_F90.f90
+++ b/fortran/src/H5Pff_F90.f90
@@ -12,16 +12,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index 20665ef..f20e033 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -39,34 +39,34 @@
* Elena Pourmal
* Wednesday, December 1, 1999
* SOURCE
-*/
+ */
int_f
nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
/******/
{
- char *c_name = NULL;
- hobj_ref_t ref_c;
- int_f ret_value = 0;
+ char * c_name = NULL;
+ hobj_ref_t ref_c;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
- /*
- * Call H5Rcreate function.
- */
- if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rcreate function.
+ */
+ if (H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the reference created */
- *ref = (haddr_t_f)ref_c;
+ /* Copy the reference created */
+ *ref = (haddr_t_f)ref_c;
done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
} /* nh5rcreate_object_c() */
/****if* H5Rf/h5rcreate_region_c
@@ -90,34 +90,34 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id)
/******/
{
- char *c_name = NULL;
- hdset_reg_ref_t ref_c;
- int_f ret_value = 0;
+ char * c_name = NULL;
+ hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
- /*
- * Call H5Rcreate function.
- */
- if(H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rcreate function.
+ */
+ if (H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the reference created */
- HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference created */
+ HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
} /* end nh5rcreate_region_c() */
/****if* H5Rf/h5rcreate_ptr_c
@@ -139,28 +139,29 @@ done:
* June 20, 2008
*
* SOURCE
-*/
+ */
int_f
-h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id)
+h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id)
/******/
{
- int ret_value = -1;
- char *c_name;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Rcreate function.
- */
- if(H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0)
- ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char *c_name;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Rcreate function.
+ */
+ if (H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Rf/h5rdereference_region_c
@@ -181,29 +182,29 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
/******/
{
- hdset_reg_ref_t ref_c;
- hid_t c_obj_id;
- int_f ret_value = 0;
+ hdset_reg_ref_t ref_c;
+ hid_t c_obj_id;
+ int_f ret_value = 0;
- /* Copy the reference to dereference */
- HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to dereference */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
- /*
- * Call H5Rdereference function.
- */
- if((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rdereference function.
+ */
+ if ((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the object's ID */
- *obj_id = (hid_t_f)c_obj_id;
+ /* Copy the object's ID */
+ *obj_id = (hid_t_f)c_obj_id;
done:
- return ret_value;
+ return ret_value;
} /* end nh5rdereference_region_c() */
/****if* H5Rf/h5rdereference_object_c
@@ -224,26 +225,26 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id)
/******/
{
- hid_t c_obj_id;
- hobj_ref_t ref_c = (hobj_ref_t)*ref;
- int_f ret_value = 0;
+ hid_t c_obj_id;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ int_f ret_value = 0;
- /*
- * Call H5Rdereference function.
- */
- if((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_OBJECT, &ref_c)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rdereference function.
+ */
+ if ((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_OBJECT, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the object's ID */
- *obj_id = (hid_t_f)c_obj_id;
+ /* Copy the object's ID */
+ *obj_id = (hid_t_f)c_obj_id;
done:
- return ret_value;
+ return ret_value;
} /* end nh5rdereference_object_c() */
/****if* H5Rf/h5rdereference_ptr_c
@@ -266,22 +267,23 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id)
+h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id)
/******/
{
- int ret_value = -1;
- hid_t c_ref_obj_id;
-
- /*
- * Call H5Rdereference function.
- */
- c_ref_obj_id = H5Rdereference((hid_t)*obj_id, (H5R_type_t)*ref_type, ref);
- if(c_ref_obj_id < 0) return ret_value;
- *ref_obj_id = (hid_t_f)c_ref_obj_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_ref_obj_id;
+
+ /*
+ * Call H5Rdereference function.
+ */
+ c_ref_obj_id = H5Rdereference((hid_t)*obj_id, (H5R_type_t)*ref_type, ref);
+ if (c_ref_obj_id < 0)
+ return ret_value;
+ *ref_obj_id = (hid_t_f)c_ref_obj_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Rf/h5rget_region_region_object_c
@@ -302,29 +304,29 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
/******/
{
- hid_t c_space_id;
- hdset_reg_ref_t ref_c;
- int_f ret_value = 0;
+ hid_t c_space_id;
+ hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
- /* Copy the reference to dereference */
- HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to dereference */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
- /*
- * Call H5Rget_region function.
- */
- if((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_region function.
+ */
+ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the dataspace ID */
- *space_id = (hid_t_f)c_space_id;
+ /* Copy the dataspace ID */
+ *space_id = (hid_t_f)c_space_id;
done:
- return ret_value;
+ return ret_value;
} /* end nh5rget_region_region_c() */
/****if* H5Rf/h5rget_region_ptr_c
@@ -345,28 +347,27 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id)
/******/
{
- hid_t c_space_id;
- int_f ret_value = 0;
+ hid_t c_space_id;
+ int_f ret_value = 0;
- /*
- * Call H5Rget_region function.
- */
- if((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_region function.
+ */
+ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the dataspace ID */
- *space_id = (hid_t_f)c_space_id;
+ /* Copy the dataspace ID */
+ *space_id = (hid_t_f)c_space_id;
done:
- return ret_value;
+ return ret_value;
} /* end nh5rget_region_ptr_c() */
-
/****if* H5Rf/h5rget_object_type_obj_c
* NAME
* h5rget_object_type_obj_c
@@ -386,26 +387,26 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
/******/
{
- H5O_type_t c_obj_type;
- hobj_ref_t ref_c = (hobj_ref_t)*ref;
- int_f ret_value = 0;
+ H5O_type_t c_obj_type;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ int_f ret_value = 0;
- /*
- * Call H5Rget_object_type function.
- */
- if(H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_object_type function.
+ */
+ if (H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the object type */
- *obj_type = (int_f)c_obj_type;
+ /* Copy the object type */
+ *obj_type = (int_f)c_obj_type;
done:
- return ret_value;
+ return ret_value;
} /* end nh5rget_object_type_obj_c() */
/****if* H5Rf/h5rget_name_object_c
@@ -430,40 +431,39 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
/******/
{
- hobj_ref_t ref_c = (hobj_ref_t)*ref;
- ssize_t c_size;
- size_t c_bufsize = (size_t)*name_len + 1;
- char *c_buf = NULL; /* Buffer to hold C string */
- int_f ret_value = 0;
-
-
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
- HGOTO_DONE(FAIL)
-
- /*
- * Call H5Rget_name function.
- */
- if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0)
- HGOTO_DONE(FAIL)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1);
- *size_default = (size_t_f)c_size;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ ssize_t c_size;
+ size_t c_bufsize = (size_t)*name_len + 1;
+ char * c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
+
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Call H5Rget_name function.
+ */
+ if ((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
+ *size_default = (size_t_f)c_size;
done:
- if(c_buf)
- HDfree(c_buf);
- return ret_value;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
} /* end nh5rget_name_object_c() */
/****if* H5Rf/h5rget_name_region_c
@@ -488,42 +488,42 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
/******/
{
- hdset_reg_ref_t ref_c;
- ssize_t c_size;
- size_t c_bufsize = (size_t)*name_len + 1;
- char *c_buf = NULL; /* Buffer to hold C string */
- int_f ret_value = 0;
-
- /* Copy the reference to query */
- HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
-
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
- HGOTO_DONE(FAIL)
-
- /*
- * Call H5Rget_name function.
- */
- if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0)
- HGOTO_DONE(FAIL)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
- *size_default = (size_t_f)c_size;
+ hdset_reg_ref_t ref_c;
+ ssize_t c_size;
+ size_t c_bufsize = (size_t)*name_len + 1;
+ char * c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
+
+ /* Copy the reference to query */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Call H5Rget_name function.
+ */
+ if ((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
+ *size_default = (size_t_f)c_size;
done:
- if(c_buf)
- HDfree(c_buf);
- return ret_value;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Rf/h5rget_name_ptr_c
@@ -549,40 +549,43 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
+h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default)
/******/
{
- int_f ret_value = -1;
- ssize_t c_size;
- size_t c_bufsize;
- char *c_buf= NULL; /* Buffer to hold C string */
-
- c_bufsize = (size_t)*name_len+1;
- /*
- * Allocate buffer to hold name of an attribute
- */
- if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
- return ret_value;
-
- /*
- * Call H5Rget_name function.
- */
- if((c_size=H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0){
- if(c_buf) HDfree(c_buf);
- return ret_value;
- }
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1);
-
- *size_default = (size_t_f)c_size;
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
-
- return ret_value;
+ int_f ret_value = -1;
+ ssize_t c_size;
+ size_t c_bufsize;
+ char * c_buf = NULL; /* Buffer to hold C string */
+
+ c_bufsize = (size_t)*name_len + 1;
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Rget_name function.
+ */
+ if ((c_size = H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0) {
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
+
+ *size_default = (size_t_f)c_size;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+
+ return ret_value;
}
/****if* H5Rf/h5rget_obj_type_c
@@ -599,7 +602,7 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_
* OUTPUTS
* obj_type - Type of referenced object. These are defined in H5Opublic.h,
* enum H5O_type_t
- *
+ *
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -607,22 +610,22 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_
* December 17, 2008
*
* SOURCE
-*/
+ */
int_f
-h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type)
+h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type)
/******/
{
- int_f ret_value = -1;
- H5O_type_t obj_type_c;
+ int_f ret_value = -1;
+ H5O_type_t obj_type_c;
- /*
- * Call H5Rget_obj_type function.
- */
- if((H5Rget_obj_type2((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, &obj_type_c)) < 0)
- return ret_value;
+ /*
+ * Call H5Rget_obj_type function.
+ */
+ if ((H5Rget_obj_type2((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, &obj_type_c)) < 0)
+ return ret_value;
- *obj_type = (int_f)obj_type_c;
+ *obj_type = (int_f)obj_type_c;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90
index 9405869..23e727e 100644
--- a/fortran/src/H5Rff.f90
+++ b/fortran/src/H5Rff.f90
@@ -13,18 +13,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90
index fc714f1..e8c19d8 100644
--- a/fortran/src/H5Rff_F03.f90
+++ b/fortran/src/H5Rff_F03.f90
@@ -20,10 +20,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90
index 77d34fa..54c51cb 100644
--- a/fortran/src/H5Rff_F90.f90
+++ b/fortran/src/H5Rff_F90.f90
@@ -20,10 +20,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 7fb7b0b..c08b5d7 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -44,25 +44,25 @@
*/
int_f
-nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id )
+nh5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id)
/******/
{
hsize_t c_dims[H5S_MAX_RANK];
hsize_t c_maxdims[H5S_MAX_RANK];
- hid_t c_space_id;
- int i;
- int_f ret_value = 0;
+ hid_t c_space_id;
+ int i;
+ int_f ret_value = 0;
/*
* Transpose dimension arrays because of C-FORTRAN storage order
*/
- for(i = 0; i < *rank ; i++) {
- c_dims[i] = dims[*rank - i - 1];
- c_maxdims[i] = maxdims[*rank - i - 1];
+ for (i = 0; i < *rank; i++) {
+ c_dims[i] = dims[*rank - i - 1];
+ c_maxdims[i] = maxdims[*rank - i - 1];
} /* end for */
c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims);
- if(c_space_id < 0)
+ if (c_space_id < 0)
HGOTO_DONE(FAIL)
*space_id = (hid_t_f)c_space_id;
@@ -86,18 +86,19 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sclose_c ( hid_t_f *space_id )
+nh5sclose_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sclose(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sclose(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5screate_c
@@ -117,21 +118,22 @@ nh5sclose_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5screate_c ( int_f *classtype, hid_t_f *space_id )
+nh5screate_c(int_f *classtype, hid_t_f *space_id)
/******/
{
- H5S_class_t c_classtype;
- int ret_value = 0;
- hid_t c_space_id;
- c_classtype = (H5S_class_t) *classtype;
- c_space_id = H5Screate(c_classtype);
-
- if ( c_space_id < 0 ) ret_value = -1;
- *space_id = (hid_t_f) c_space_id;
- return ret_value;
+ H5S_class_t c_classtype;
+ int ret_value = 0;
+ hid_t c_space_id;
+ c_classtype = (H5S_class_t)*classtype;
+ c_space_id = H5Screate(c_classtype);
+
+ if (c_space_id < 0)
+ ret_value = -1;
+ *space_id = (hid_t_f)c_space_id;
+ return ret_value;
}
/****if* H5Sf/h5scopy_c
@@ -151,22 +153,23 @@ nh5screate_c ( int_f *classtype, hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id)
+nh5scopy_c(hid_t_f *space_id, hid_t_f *new_space_id)
/******/
{
- int ret_value = 0;
- hid_t c_new_space_id;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_new_space_id;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- c_new_space_id = H5Scopy(c_space_id);
- if ( c_new_space_id < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_new_space_id = H5Scopy(c_space_id);
+ if (c_new_space_id < 0)
+ ret_value = -1;
- *new_space_id = (hid_t_f)c_new_space_id;
- return ret_value;
+ *new_space_id = (hid_t_f)c_new_space_id;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_hyper_nblocks_c
@@ -189,22 +192,23 @@ nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks)
+nh5sget_select_hyper_nblocks_c(hid_t_f *space_id, hssize_t_f *num_blocks)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_num_blocks;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_num_blocks;
- c_space_id = (hid_t)*space_id;
- c_num_blocks = H5Sget_select_hyper_nblocks(c_space_id);
- if ( c_num_blocks < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_num_blocks = H5Sget_select_hyper_nblocks(c_space_id);
+ if (c_num_blocks < 0)
+ ret_value = -1;
- *num_blocks = (hssize_t_f)c_num_blocks;
- return ret_value;
+ *num_blocks = (hssize_t_f)c_num_blocks;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_elem_npoints_c
@@ -227,22 +231,23 @@ nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points)
+nh5sget_select_elem_npoints_c(hid_t_f *space_id, hssize_t_f *num_points)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_num_points;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_num_points;
- c_space_id = (hid_t)*space_id;
- c_num_points = H5Sget_select_elem_npoints(c_space_id);
- if ( c_num_points < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_num_points = H5Sget_select_elem_npoints(c_space_id);
+ if (c_num_points < 0)
+ ret_value = -1;
- *num_points = (hssize_t_f)c_num_points;
- return ret_value;
+ *num_points = (hssize_t_f)c_num_points;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_hyper_blocklist_c
@@ -273,54 +278,56 @@ nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points)
* Transpose dimension arrays because of C-FORTRAN storage order
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock,
- hsize_t_f *num_blocks, hsize_t_f *buf)
+nh5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_t_f *num_blocks,
+ hsize_t_f *buf)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t c_num_blocks;
-
- hsize_t i;
- int j,k,m,n;
- int rank;
- hsize_t c_startblock, *c_buf;
-
- c_space_id = (hid_t)*space_id;
- c_num_blocks = (hsize_t)*num_blocks;
-
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0 ) return ret_value;
- c_startblock = (hsize_t)*startblock;
-
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*(hsize_t)rank));
- if (!c_buf) return ret_value;
-
- ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock,
- c_num_blocks, c_buf);
-
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order and add 1
- */
- n = 0;
- m = 0;
- for (i=0; i < c_num_blocks; i++) {
- for (j=0; j < rank; j++) {
- for (k=0; k < rank; k++) {
- int t= (m + rank - k - 1);
- buf[n] = (hsize_t_f)c_buf[t]+1;
- n = n + 1;
- }
- m = m + rank;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hsize_t c_num_blocks;
+
+ hsize_t i;
+ int j, k, m, n;
+ int rank;
+ hsize_t c_startblock, *c_buf;
+
+ c_space_id = (hid_t)*space_id;
+ c_num_blocks = (hsize_t)*num_blocks;
+
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
+ return ret_value;
+ c_startblock = (hsize_t)*startblock;
+
+ c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank));
+ if (!c_buf)
+ return ret_value;
+
+ ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock, c_num_blocks, c_buf);
+
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order and add 1
+ */
+ n = 0;
+ m = 0;
+ for (i = 0; i < c_num_blocks; i++) {
+ for (j = 0; j < rank; j++) {
+ for (k = 0; k < rank; k++) {
+ int t = (m + rank - k - 1);
+ buf[n] = (hsize_t_f)c_buf[t] + 1;
+ n = n + 1;
+ }
+ m = m + rank;
+ }
}
- }
- HDfree(c_buf);
- if (ret_value >= 0 ) ret_value = 0;
- return ret_value;
+ HDfree(c_buf);
+ if (ret_value >= 0)
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_bounds_c
@@ -346,29 +353,29 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock,
* matrix notation.
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end)
+nh5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end)
/******/
{
- hid_t c_space_id;
+ hid_t c_space_id;
hsize_t c_start[H5S_MAX_RANK];
hsize_t c_end[H5S_MAX_RANK];
- int i, rank;
- int_f ret_value = 0;
+ int i, rank;
+ int_f ret_value = 0;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0 )
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
HGOTO_DONE(FAIL)
- if(H5Sget_select_bounds(c_space_id, c_start, c_end) < 0)
+ if (H5Sget_select_bounds(c_space_id, c_start, c_end) < 0)
HGOTO_DONE(FAIL)
- for(i = 0; i < rank; i++) {
+ for (i = 0; i < rank; i++) {
start[i] = (hsize_t_f)(c_start[rank - i - 1] + 1);
- end[i] = (hsize_t_f)(c_end[rank - i - 1] + 1);
+ end[i] = (hsize_t_f)(c_end[rank - i - 1] + 1);
} /* end for */
done:
@@ -401,50 +408,52 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
- hsize_t_f * numpoints, hsize_t_f * buf)
+nh5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t_f *numpoints,
+ hsize_t_f *buf)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t c_num_points;
- hsize_t c_startpoint,* c_buf;
- hsize_t i, i1;
- int rank;
- int j,i2;
-
- c_space_id = (hid_t)*space_id;
- c_num_points = (hsize_t)* numpoints;
-
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0 ) return ret_value;
-
- c_startpoint = (hsize_t)*startpoint;
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*(hsize_t)rank));
- if (!c_buf) return ret_value;
- ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint,
- c_num_points, c_buf);
-
- /* re-arrange the return buffer to account for Fortran ordering of 2D arrays */
- /* and add 1 to account for array's starting at one in Fortran */
- i2 = 0;
- for( i = 0; i < c_num_points; i++) {
- i1 = (hsize_t)rank*(i+1);
- for(j = 0; j < rank; j++) {
- buf[i2] = (hsize_t_f)(c_buf[i1-1]+1);
- i2 = i2 + 1;
- i1 = i1 - 1;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hsize_t c_num_points;
+ hsize_t c_startpoint, *c_buf;
+ hsize_t i, i1;
+ int rank;
+ int j, i2;
+
+ c_space_id = (hid_t)*space_id;
+ c_num_points = (hsize_t)*numpoints;
+
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
+ return ret_value;
+
+ c_startpoint = (hsize_t)*startpoint;
+ c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank));
+ if (!c_buf)
+ return ret_value;
+ ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint, c_num_points, c_buf);
+
+ /* re-arrange the return buffer to account for Fortran ordering of 2D arrays */
+ /* and add 1 to account for array's starting at one in Fortran */
+ i2 = 0;
+ for (i = 0; i < c_num_points; i++) {
+ i1 = (hsize_t)rank * (i + 1);
+ for (j = 0; j < rank; j++) {
+ buf[i2] = (hsize_t_f)(c_buf[i1 - 1] + 1);
+ i2 = i2 + 1;
+ i1 = i1 - 1;
+ }
}
- }
- if (ret_value >= 0 ) ret_value = 0;
+ if (ret_value >= 0)
+ ret_value = 0;
- HDfree(c_buf);
+ HDfree(c_buf);
- return ret_value;
+ return ret_value;
}
/****if* H5Sf/h5sselect_all_c
@@ -462,18 +471,19 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_all_c ( hid_t_f *space_id )
+nh5sselect_all_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sselect_all(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sselect_all(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_none_c
@@ -491,18 +501,19 @@ nh5sselect_all_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_none_c ( hid_t_f *space_id )
+nh5sselect_none_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sselect_none(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sselect_none(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_valid_c
@@ -524,21 +535,22 @@ nh5sselect_none_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag )
+nh5sselect_valid_c(hid_t_f *space_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- htri_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sselect_valid(c_space_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ htri_t status;
+
+ c_space_id = (hid_t)*space_id;
+ status = H5Sselect_valid(c_space_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_npoints_c
@@ -559,21 +571,22 @@ nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints )
+nh5sget_simple_extent_npoints_c(hid_t_f *space_id, hsize_t_f *npoints)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_npoints;
-
- c_space_id = (hid_t)*space_id;
- c_npoints = H5Sget_simple_extent_npoints(c_space_id);
- if ( c_npoints == 0 ) ret_value = -1;
- *npoints = (hsize_t_f)c_npoints;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_npoints;
+
+ c_space_id = (hid_t)*space_id;
+ c_npoints = H5Sget_simple_extent_npoints(c_space_id);
+ if (c_npoints == 0)
+ ret_value = -1;
+ *npoints = (hsize_t_f)c_npoints;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_npoints_c
@@ -594,21 +607,22 @@ nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints )
+nh5sget_select_npoints_c(hid_t_f *space_id, hssize_t_f *npoints)
/******/
{
- int ret_value = 0;
- hssize_t c_npoints;
- hid_t c_space_id;
-
- c_space_id = (hid_t)*space_id;
- c_npoints = H5Sget_select_npoints(c_space_id);
- if ( c_npoints < 0 ) ret_value = -1;
- *npoints = (hssize_t_f)c_npoints;
- return ret_value;
+ int ret_value = 0;
+ hssize_t c_npoints;
+ hid_t c_space_id;
+
+ c_space_id = (hid_t)*space_id;
+ c_npoints = H5Sget_select_npoints(c_space_id);
+ if (c_npoints < 0)
+ ret_value = -1;
+ *npoints = (hssize_t_f)c_npoints;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_ndims_c
@@ -629,21 +643,22 @@ nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims )
+nh5sget_simple_extent_ndims_c(hid_t_f *space_id, int_f *ndims)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- int c_ndims;
-
- c_space_id = (hid_t)*space_id;
- c_ndims = H5Sget_simple_extent_ndims(c_space_id);
- if ( c_ndims < 0 ) ret_value = -1;
- *ndims = (int_f)c_ndims;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ int c_ndims;
+
+ c_space_id = (hid_t)*space_id;
+ c_ndims = H5Sget_simple_extent_ndims(c_space_id);
+ if (c_ndims < 0)
+ ret_value = -1;
+ *ndims = (int_f)c_ndims;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_type_c
@@ -665,26 +680,27 @@ nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype)
+nh5sget_simple_extent_type_c(hid_t_f *space_id, int_f *classtype)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- H5S_class_t c_classtype;
-
- c_space_id = (hid_t)*space_id;
- c_classtype = H5Sget_simple_extent_type(c_space_id);
- if ( c_classtype < 0 ) ret_value = -1;
- *classtype = c_classtype;
-/*
- if (c_classtype == H5S_SCALAR) *classtype = H5S_SCALAR_F;
- if (c_classtype == H5S_SIMPLE) *classtype = H5S_SIMPLE_F;
- if (c_classtype == H5S_NULL) *classtype = H5S_NULL_F;
-*/
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ H5S_class_t c_classtype;
+
+ c_space_id = (hid_t)*space_id;
+ c_classtype = H5Sget_simple_extent_type(c_space_id);
+ if (c_classtype < 0)
+ ret_value = -1;
+ *classtype = c_classtype;
+ /*
+ if (c_classtype == H5S_SCALAR) *classtype = H5S_SCALAR_F;
+ if (c_classtype == H5S_SIMPLE) *classtype = H5S_SIMPLE_F;
+ if (c_classtype == H5S_NULL) *classtype = H5S_NULL_F;
+ */
+ return ret_value;
}
/****if* H5Sf/h5soffset_simple_c
@@ -704,30 +720,30 @@ nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset)
+nh5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset)
/******/
{
- hid_t c_space_id;
- int rank;
+ hid_t c_space_id;
+ int rank;
hssize_t c_offset[H5S_MAX_RANK];
- int i;
- int_f ret_value = 0;
+ int i;
+ int_f ret_value = 0;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0)
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
HGOTO_DONE(FAIL)
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < rank; i++)
+ for (i = 0; i < rank; i++)
c_offset[i] = offset[rank - i - 1];
- if(H5Soffset_simple(c_space_id, c_offset) < 0)
+ if (H5Soffset_simple(c_space_id, c_offset) < 0)
HGOTO_DONE(FAIL)
done:
@@ -753,33 +769,32 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size)
+nh5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size)
/******/
{
hsize_t c_current_size[H5S_MAX_RANK];
hsize_t c_maximum_size[H5S_MAX_RANK];
- int i;
- int_f ret_value = 0;
+ int i;
+ int_f ret_value = 0;
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < *rank; i++) {
+ for (i = 0; i < *rank; i++) {
c_current_size[i] = (hsize_t)current_size[*rank - i - 1];
c_maximum_size[i] = (hsize_t)maximum_size[*rank - i - 1];
} /* end for */
- if(H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0)
+ if (H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0)
HGOTO_DONE(FAIL)
done:
return ret_value;
}
-
/****if* H5Sf/h5sget_simple_extent_dims_c
* NAME
* h5sget_simple_extent_dims_c
@@ -799,32 +814,32 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims)
+nh5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdims)
/******/
{
- hid_t c_space_id;
+ hid_t c_space_id;
hsize_t c_dims[H5S_MAX_RANK];
hsize_t c_maxdims[H5S_MAX_RANK];
- int rank;
- int i;
- int_f ret_value;
+ int rank;
+ int i;
+ int_f ret_value;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0)
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
HGOTO_DONE(FAIL)
- if(H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims) < 0)
+ if (H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims) < 0)
HGOTO_DONE(FAIL)
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < rank; i++) {
- dims[rank - i - 1] = (hsize_t_f)c_dims[i];
+ for (i = 0; i < rank; i++) {
+ dims[rank - i - 1] = (hsize_t_f)c_dims[i];
maxdims[rank - i - 1] = (hsize_t_f)c_maxdims[i];
} /* end for */
@@ -853,23 +868,23 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sis_simple_c ( hid_t_f *space_id , int_f *flag )
+nh5sis_simple_c(hid_t_f *space_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- htri_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sis_simple(c_space_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
-}
+ int ret_value = 0;
+ hid_t c_space_id;
+ htri_t status;
+ c_space_id = (hid_t)*space_id;
+ status = H5Sis_simple(c_space_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
+}
/****if* H5Sf/h5sextent_copy_c
* NAME
@@ -887,21 +902,22 @@ nh5sis_simple_c ( hid_t_f *space_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id)
+nh5sextent_copy_c(hid_t_f *dest_space_id, hid_t_f *source_space_id)
/******/
{
- int ret_value = 0;
- hid_t c_dest_space_id, c_source_space_id;
- herr_t status;
-
- c_dest_space_id = (hid_t)*dest_space_id;
- c_source_space_id = (hid_t)*source_space_id;
- status = H5Sextent_copy(c_dest_space_id, c_source_space_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_dest_space_id, c_source_space_id;
+ herr_t status;
+
+ c_dest_space_id = (hid_t)*dest_space_id;
+ c_source_space_id = (hid_t)*source_space_id;
+ status = H5Sextent_copy(c_dest_space_id, c_source_space_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sset_extent_none_c
@@ -919,20 +935,21 @@ nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sset_extent_none_c ( hid_t_f *space_id )
+nh5sset_extent_none_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- herr_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sset_extent_none(c_space_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ herr_t status;
+
+ c_space_id = (hid_t)*space_id;
+ status = H5Sset_extent_none(c_space_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_hyperslab_c
@@ -957,44 +974,44 @@ nh5sset_extent_none_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block)
+nh5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride,
+ hsize_t_f *block)
/******/
{
hsize_t c_start[H5S_MAX_RANK];
hsize_t c_count[H5S_MAX_RANK];
hsize_t c_stride[H5S_MAX_RANK];
hsize_t c_block[H5S_MAX_RANK];
- int rank;
- int i;
- int_f ret_value = 0;
+ int rank;
+ int i;
+ int_f ret_value = 0;
rank = H5Sget_simple_extent_ndims((hid_t)*space_id);
- if(rank < 0 )
+ if (rank < 0)
HGOTO_DONE(FAIL)
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < rank; i++) {
+ for (i = 0; i < rank; i++) {
int t = (rank - i) - 1;
- c_start[i] = (hsize_t)start[t];
- c_count[i] = (hsize_t)count[t];
+ c_start[i] = (hsize_t)start[t];
+ c_count[i] = (hsize_t)count[t];
c_stride[i] = (hsize_t)stride[t];
- c_block[i] = (hsize_t)block[t];
+ c_block[i] = (hsize_t)block[t];
} /* end for */
- if(H5Sselect_hyperslab((hid_t)*space_id, (H5S_seloper_t)*op, c_start, c_stride, c_count, c_block) < 0)
+ if (H5Sselect_hyperslab((hid_t)*space_id, (H5S_seloper_t)*op, c_start, c_stride, c_count, c_block) < 0)
HGOTO_DONE(FAIL)
done:
return ret_value;
}
-
#ifdef NEW_HYPERSLAB_API
/****if* H5Sf/h5scombine_hyperslab_c
* NAME
@@ -1018,65 +1035,75 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id)
+nh5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride,
+ hsize_t_f *block, hid_t_f *hyper_id)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hid_t c_hyper_id;
- hsize_t *c_start = NULL;
- hsize_t *c_count = NULL;
- hsize_t *c_stride = NULL;
- hsize_t *c_block = NULL;
-
- H5S_seloper_t c_op;
- herr_t status;
- int rank;
- int i;
-
- rank = H5Sget_simple_extent_ndims(*space_id);
- if (rank < 0 ) return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_start == NULL) goto DONE;
-
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_count == NULL) goto DONE;
-
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_stride == NULL) goto DONE;
-
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_block == NULL) goto DONE;
-
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
-
- for (i=0; i < rank; i++) {
- int t= (rank - i) - 1;
- c_start[i] = (hsize_t)start[t];
- c_count[i] = (hsize_t)count[t];
- c_stride[i] = (hsize_t)stride[t];
- c_block[i] = (hsize_t)block[t];
- }
-
- c_op = (H5S_seloper_t)*op;
-
- c_space_id = (hid_t)*space_id;
- c_hyper_id = H5Scombine_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
- if ( c_hyper_id < 0 ) goto DONE;
- *hyper_id = (hid_t_f)c_hyper_id;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hid_t c_hyper_id;
+ hsize_t *c_start = NULL;
+ hsize_t *c_count = NULL;
+ hsize_t *c_stride = NULL;
+ hsize_t *c_block = NULL;
+
+ H5S_seloper_t c_op;
+ herr_t status;
+ int rank;
+ int i;
+
+ rank = H5Sget_simple_extent_ndims(*space_id);
+ if (rank < 0)
+ return ret_value;
+ c_start = (hsize_t *)HDmalloc(sizeof(hsize_t) * rank);
+ if (c_start == NULL)
+ goto DONE;
+
+ c_count = (hsize_t *)HDmalloc(sizeof(hsize_t) * rank);
+ if (c_count == NULL)
+ goto DONE;
+
+ c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t) * rank);
+ if (c_stride == NULL)
+ goto DONE;
+
+ c_block = (hsize_t *)HDmalloc(sizeof(hsize_t) * rank);
+ if (c_block == NULL)
+ goto DONE;
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+
+ for (i = 0; i < rank; i++) {
+ int t = (rank - i) - 1;
+ c_start[i] = (hsize_t)start[t];
+ c_count[i] = (hsize_t)count[t];
+ c_stride[i] = (hsize_t)stride[t];
+ c_block[i] = (hsize_t)block[t];
+ }
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space_id = (hid_t)*space_id;
+ c_hyper_id = H5Scombine_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
+ if (c_hyper_id < 0)
+ goto DONE;
+ *hyper_id = (hid_t_f)c_hyper_id;
+ ret_value = 0;
DONE:
- if(c_start != NULL) HDfree(c_start);
- if(c_count != NULL) HDfree(c_count);
- if(c_stride!= NULL) HDfree(c_stride);
- if(c_block != NULL) HDfree(c_block);
- return ret_value;
+ if (c_start != NULL)
+ HDfree(c_start);
+ if (c_count != NULL)
+ HDfree(c_count);
+ if (c_stride != NULL)
+ HDfree(c_stride);
+ if (c_block != NULL)
+ HDfree(c_block);
+ return ret_value;
}
/****if* H5Sf/h5scombine_select_c
* NAME
@@ -1097,27 +1124,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id)
+nh5scombine_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id, hid_t_f *ds_id)
/******/
{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- hid_t c_ds_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- c_ds_id = H5Scombine_select(c_space1_id, c_op, c_space2_id);
- if ( c_ds_id < 0 ) return ret_value;
- *ds_id = (hid_t_f)c_ds_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space1_id;
+ hid_t c_space2_id;
+ hid_t c_ds_id;
+ H5S_seloper_t c_op;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space1_id = (hid_t)*space1_id;
+ c_space2_id = (hid_t)*space2_id;
+ c_ds_id = H5Scombine_select(c_space1_id, c_op, c_space2_id);
+ if (c_ds_id < 0)
+ return ret_value;
+ *ds_id = (hid_t_f)c_ds_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Sf/h5sselect_select_c
* NAME
@@ -1136,24 +1164,25 @@ nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
+nh5sselect_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id)
/******/
{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- if( H5Sselect_select(c_space1_id, c_op, c_space2_id)< 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space1_id;
+ hid_t c_space2_id;
+ H5S_seloper_t c_op;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space1_id = (hid_t)*space1_id;
+ c_space2_id = (hid_t)*space2_id;
+ if (H5Sselect_select(c_space1_id, c_op, c_space2_id) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NEW_HYPERSLAB_API*/
/****if* H5Sf/h5sget_select_type_c
@@ -1173,23 +1202,23 @@ nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sget_select_type_c ( hid_t_f *space_id , int_f *type)
+nh5sget_select_type_c(hid_t_f *space_id, int_f *type)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- H5S_sel_type c_type;
-
- c_space_id = (hid_t)*space_id;
- c_type = H5Sget_select_type(c_space_id);
- if(c_type < 0) return ret_value;
- *type = (int_f)c_type;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ hid_t c_space_id;
+ H5S_sel_type c_type;
+ c_space_id = (hid_t)*space_id;
+ c_type = H5Sget_select_type(c_space_id);
+ if (c_type < 0)
+ return ret_value;
+ *type = (int_f)c_type;
+ ret_value = 0;
+ return ret_value;
+}
/****if* H5Sf/h5sselect_elements_c
* NAME
@@ -1211,40 +1240,42 @@ nh5sget_select_type_c ( hid_t_f *space_id , int_f *type)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord)
+nh5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_f *coord)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- H5S_seloper_t c_op;
- herr_t status;
- int rank;
- size_t i;
- int j;
- hsize_t *c_coord;
- size_t c_nelements;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space_id = *space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
-
- c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*(size_t)rank*((size_t)*nelements));
- if(!c_coord) return ret_value;
- for (i=0; i< (size_t)*nelements; i++) {
- for (j = 0; j < rank; j++) {
- c_coord[(size_t)j+i*(size_t)rank] = (hsize_t)coord[(size_t)j + i*(size_t)rank];
- }
- }
-
- c_nelements = *nelements;
- status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord);
- if ( status >= 0 ) ret_value = 0;
- HDfree(c_coord);
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space_id;
+ H5S_seloper_t c_op;
+ herr_t status;
+ int rank;
+ size_t i;
+ int j;
+ hsize_t * c_coord;
+ size_t c_nelements;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space_id = *space_id;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+
+ c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements));
+ if (!c_coord)
+ return ret_value;
+ for (i = 0; i < (size_t)*nelements; i++) {
+ for (j = 0; j < rank; j++) {
+ c_coord[(size_t)j + i * (size_t)rank] = (hsize_t)coord[(size_t)j + i * (size_t)rank];
+ }
+ }
+
+ c_nelements = *nelements;
+ status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord);
+ if (status >= 0)
+ ret_value = 0;
+ HDfree(c_coord);
+ return ret_value;
}
/****if* H5Sf/h5sdecode_c
@@ -1267,30 +1298,30 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sdecode_c ( _fcd buf, hid_t_f *obj_id )
+nh5sdecode_c(_fcd buf, hid_t_f *obj_id)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- hid_t c_obj_id;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ hid_t c_obj_id;
- /*
- * Call H5Sdecode function.
- */
+ /*
+ * Call H5Sdecode function.
+ */
- c_buf = (unsigned char*)buf;
+ c_buf = (unsigned char *)buf;
- c_obj_id = H5Sdecode(c_buf);
- if(c_obj_id < 0)
- return ret_value;
+ c_obj_id = H5Sdecode(c_buf);
+ if (c_obj_id < 0)
+ return ret_value;
- *obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
+ *obj_id = (hid_t_f)c_obj_id;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Sf/h5sencode_c
@@ -1311,55 +1342,56 @@ nh5sdecode_c ( _fcd buf, hid_t_f *obj_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
+nh5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- size_t c_size;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ size_t c_size;
- /* return just the size of the allocated buffer;
- * equivalent to C routine for which 'name' is set equal to NULL
- */
+ /* return just the size of the allocated buffer;
+ * equivalent to C routine for which 'name' is set equal to NULL
+ */
- if (*nalloc == 0) {
+ if (*nalloc == 0) {
- if(H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0)
- return ret_value;
+ if (H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ return ret_value;
- *nalloc = (size_t_f)c_size;
+ *nalloc = (size_t_f)c_size;
- ret_value = 0;
- return ret_value;
- }
+ ret_value = 0;
+ return ret_value;
+ }
- c_size = (size_t)*nalloc;
- /*
- * Allocate buffer
- */
- if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
- return ret_value;
- /*
- * Call H5Sencode function.
- */
- if(H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0){
- return ret_value;
- }
+ c_size = (size_t)*nalloc;
+ /*
+ * Allocate buffer
+ */
+ if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ return ret_value;
+ /*
+ * Call H5Sencode function.
+ */
+ if (H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0) {
+ return ret_value;
+ }
- /* copy the C buffer to the FORTRAN buffer.
- * Can not use HD5packFstring because we don't want to
- * eliminate the NUL terminator or pad remaining space
- * with blanks.
- */
+ /* copy the C buffer to the FORTRAN buffer.
+ * Can not use HD5packFstring because we don't want to
+ * eliminate the NUL terminator or pad remaining space
+ * with blanks.
+ */
- HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size);
+ HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Sf/h5sextent_equal_c
@@ -1382,18 +1414,17 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal)
+nh5sextent_equal_c(hid_t_f *space1_id, hid_t_f *space2_id, hid_t_f *c_equal)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- if( (*c_equal = (hid_t_f)H5Sextent_equal((hid_t)*space1_id, (hid_t)*space2_id)) < 0)
- return ret_value;
+ if ((*c_equal = (hid_t_f)H5Sextent_equal((hid_t)*space1_id, (hid_t)*space2_id)) < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90
index 9b2065d..640f9c1 100644
--- a/fortran/src/H5Sff.f90
+++ b/fortran/src/H5Sff.f90
@@ -13,18 +13,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index ca9567c..c94a23b 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -11,17 +11,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
-
/****if* H5Tf/h5topen_c
* NAME
* h5topen_c
@@ -42,38 +41,37 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id)
+nh5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id)
/******/
{
char *c_name = NULL;
hid_t c_type_id;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto done;
/*
* Call H5Topen2 function.
*/
- if((c_type_id = H5Topen2((hid_t)*loc_id, c_name, (hid_t)*tapl_id)) < 0)
+ if ((c_type_id = H5Topen2((hid_t)*loc_id, c_name, (hid_t)*tapl_id)) < 0)
goto done;
*type_id = (hid_t_f)c_type_id;
ret_value = 0;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
-
/****if* H5Tf/h5tcommit_c
* NAME
* h5tcommit_c
@@ -97,27 +95,28 @@ done:
* - Added passing optional parameters for version 1.8
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id,
- hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id)
+nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id,
+ hid_t_f *tapl_id)
/******/
{
- char *c_name = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ int ret_value = -1;
/* Convert FORTRAN name to C name */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto done;
/* Call H5Tcommit2 function */
- if(H5Tcommit2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*lcpl_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
+ if (H5Tcommit2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*lcpl_id, (hid_t)*tcpl_id,
+ (hid_t)*tapl_id) < 0)
goto done;
ret_value = 0;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -137,21 +136,21 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tclose_c ( hid_t_f *type_id )
+nh5tclose_c(hid_t_f *type_id)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
+ int ret_value = 0;
+ hid_t c_type_id;
- c_type_id = *type_id;
- if ( H5Tclose(c_type_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_type_id = *type_id;
+ if (H5Tclose(c_type_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
-
/****if* H5Tf/h5tcopy_c
* NAME
* h5tcopy_c
@@ -169,21 +168,22 @@ nh5tclose_c ( hid_t_f *type_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id)
+nh5tcopy_c(hid_t_f *type_id, hid_t_f *new_type_id)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- hid_t c_new_type_id;
-
- c_type_id = *type_id;
- c_new_type_id = H5Tcopy(c_type_id);
- if ( c_new_type_id < 0 ) ret_value = -1;
- *new_type_id = (hid_t_f)c_new_type_id;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ hid_t c_new_type_id;
+
+ c_type_id = *type_id;
+ c_new_type_id = H5Tcopy(c_type_id);
+ if (c_new_type_id < 0)
+ ret_value = -1;
+ *new_type_id = (hid_t_f)c_new_type_id;
+ return ret_value;
}
/****if* H5Tf/h5tequal_c
@@ -204,23 +204,24 @@ nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag)
+nh5tequal_c(hid_t_f *type1_id, hid_t_f *type2_id, int_f *c_flag)
/******/
{
- int ret_value = -1;
- hid_t c_type1_id, c_type2_id;
- htri_t status;
-
- c_type1_id = *type1_id;
- c_type2_id = *type2_id;
- status = H5Tequal(c_type1_id, c_type2_id);
- if ( status < 0 ) return ret_value;
- *c_flag = (int_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type1_id, c_type2_id;
+ htri_t status;
+
+ c_type1_id = *type1_id;
+ c_type2_id = *type2_id;
+ status = H5Tequal(c_type1_id, c_type2_id);
+ if (status < 0)
+ return ret_value;
+ *c_flag = (int_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_class_c
@@ -252,37 +253,37 @@ nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_class_c ( hid_t_f *type_id , int_f *classtype)
+nh5tget_class_c(hid_t_f *type_id, int_f *classtype)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- H5T_class_t c_classtype;
-
- c_type_id = *type_id;
- c_classtype = H5Tget_class(c_type_id);
- if (c_classtype == H5T_NO_CLASS ) {
- /* *classtype = H5T_NO_CLASS_F; */
- *classtype = (int_f)H5T_NO_CLASS;
- ret_value = -1;
- return ret_value;
- }
- *classtype = c_classtype;
-/*
- if (c_classtype == H5T_INTEGER) *classtype = H5T_INTEGER_F;
- if (c_classtype == H5T_FLOAT) *classtype = H5T_FLOAT_F;
- if (c_classtype == H5T_TIME) *classtype = H5T_TIME_F;
- if (c_classtype == H5T_STRING) *classtype = H5T_STRING_F;
- if (c_classtype == H5T_BITFIELD) *classtype = H5T_BITFIELD_F;
- if (c_classtype == H5T_OPAQUE) *classtype = H5T_OPAQUE_F;
- if (c_classtype == H5T_COMPOUND) *classtype = H5T_COMPOUND_F;
- if (c_classtype == H5T_REFERENCE) *classtype = H5T_REFERENCE_F;
- if (c_classtype == H5T_ENUM) *classtype = H5T_ENUM_F;
-*/
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ H5T_class_t c_classtype;
+
+ c_type_id = *type_id;
+ c_classtype = H5Tget_class(c_type_id);
+ if (c_classtype == H5T_NO_CLASS) {
+ /* *classtype = H5T_NO_CLASS_F; */
+ *classtype = (int_f)H5T_NO_CLASS;
+ ret_value = -1;
+ return ret_value;
+ }
+ *classtype = c_classtype;
+ /*
+ if (c_classtype == H5T_INTEGER) *classtype = H5T_INTEGER_F;
+ if (c_classtype == H5T_FLOAT) *classtype = H5T_FLOAT_F;
+ if (c_classtype == H5T_TIME) *classtype = H5T_TIME_F;
+ if (c_classtype == H5T_STRING) *classtype = H5T_STRING_F;
+ if (c_classtype == H5T_BITFIELD) *classtype = H5T_BITFIELD_F;
+ if (c_classtype == H5T_OPAQUE) *classtype = H5T_OPAQUE_F;
+ if (c_classtype == H5T_COMPOUND) *classtype = H5T_COMPOUND_F;
+ if (c_classtype == H5T_REFERENCE) *classtype = H5T_REFERENCE_F;
+ if (c_classtype == H5T_ENUM) *classtype = H5T_ENUM_F;
+ */
+ return ret_value;
}
/****if* H5Tf/h5tget_order_c
@@ -305,29 +306,29 @@ nh5tget_class_c ( hid_t_f *type_id , int_f *classtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_order_c ( hid_t_f *type_id , int_f *order)
+nh5tget_order_c(hid_t_f *type_id, int_f *order)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_order_t c_order;
-
- c_type_id = *type_id;
- c_order = H5Tget_order(c_type_id);
- if ( c_order < 0 ) return ret_value;
- *order = (int_f)c_order;
- ret_value = 0;
-/*
- if ( c_order == H5T_ORDER_LE) *order = H5T_ORDER_LE_F;
- if ( c_order == H5T_ORDER_BE) *order = H5T_ORDER_BE_F;
- if ( c_order == H5T_ORDER_VAX) *order = H5T_ORDER_VAX_F;
-*/
- return ret_value;
-}
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_order_t c_order;
+ c_type_id = *type_id;
+ c_order = H5Tget_order(c_type_id);
+ if (c_order < 0)
+ return ret_value;
+ *order = (int_f)c_order;
+ ret_value = 0;
+ /*
+ if ( c_order == H5T_ORDER_LE) *order = H5T_ORDER_LE_F;
+ if ( c_order == H5T_ORDER_BE) *order = H5T_ORDER_BE_F;
+ if ( c_order == H5T_ORDER_VAX) *order = H5T_ORDER_VAX_F;
+ */
+ return ret_value;
+}
/****if* H5Tf/h5tset_order_c
* NAME
@@ -348,26 +349,27 @@ nh5tget_order_c ( hid_t_f *type_id , int_f *order)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_order_c ( hid_t_f *type_id , int_f *order)
+nh5tset_order_c(hid_t_f *type_id, int_f *order)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- H5T_order_t c_order;
- herr_t status;
- c_order = (H5T_order_t)*order;
-/*
- if ( *order == H5T_ORDER_LE_F) c_order = H5T_ORDER_LE;
- if ( *order == H5T_ORDER_BE_F) c_order = H5T_ORDER_BE;
- if ( *order == H5T_ORDER_VAX_F) c_order = H5T_ORDER_VAX;
-*/
- c_type_id = *type_id;
- status = H5Tset_order(c_type_id, c_order);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ H5T_order_t c_order;
+ herr_t status;
+ c_order = (H5T_order_t)*order;
+ /*
+ if ( *order == H5T_ORDER_LE_F) c_order = H5T_ORDER_LE;
+ if ( *order == H5T_ORDER_BE_F) c_order = H5T_ORDER_BE;
+ if ( *order == H5T_ORDER_VAX_F) c_order = H5T_ORDER_VAX;
+ */
+ c_type_id = *type_id;
+ status = H5Tset_order(c_type_id, c_order);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Tf/h5tget_size_c
@@ -387,22 +389,23 @@ nh5tset_order_c ( hid_t_f *type_id , int_f *order)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_size_c ( hid_t_f *type_id , size_t_f *size)
+nh5tget_size_c(hid_t_f *type_id, size_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_size;
-
- c_type_id = *type_id;
- c_size = H5Tget_size(c_type_id);
- if ( c_size == 0 ) return ret_value;
- *size = (size_t_f)c_size ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_size;
+
+ c_type_id = *type_id;
+ c_size = H5Tget_size(c_type_id);
+ if (c_size == 0)
+ return ret_value;
+ *size = (size_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_size_c
@@ -422,23 +425,24 @@ nh5tget_size_c ( hid_t_f *type_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_size_c ( hid_t_f *type_id , size_t_f *size)
+nh5tset_size_c(hid_t_f *type_id, size_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_size;
- herr_t status;
-
- c_size = (size_t)*size;
- c_type_id = *type_id;
- status = H5Tset_size(c_type_id, c_size);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_size;
+ herr_t status;
+
+ c_size = (size_t)*size;
+ c_type_id = *type_id;
+ status = H5Tset_size(c_type_id, c_size);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_precision_c
@@ -458,22 +462,23 @@ nh5tset_size_c ( hid_t_f *type_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision)
+nh5tget_precision_c(hid_t_f *type_id, size_t_f *precision)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_precision;
-
- c_type_id = *type_id;
- c_precision = H5Tget_precision(c_type_id);
- if ( c_precision == 0 ) return ret_value;
- *precision = (size_t_f)c_precision ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_precision;
+
+ c_type_id = *type_id;
+ c_precision = H5Tget_precision(c_type_id);
+ if (c_precision == 0)
+ return ret_value;
+ *precision = (size_t_f)c_precision;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_precision_c
@@ -492,23 +497,24 @@ nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision)
+nh5tset_precision_c(hid_t_f *type_id, size_t_f *precision)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_precision;
- herr_t status;
-
- c_type_id = *type_id;
- c_precision = (size_t)*precision;
- status = H5Tset_precision(c_type_id, c_precision);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_precision;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_precision = (size_t)*precision;
+ status = H5Tset_precision(c_type_id, c_precision);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_offset_c
@@ -529,23 +535,24 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
+nh5tget_offset_c(hid_t_f *type_id, size_t_f *offset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- int c_offset;
+ int ret_value = -1;
+ hid_t c_type_id;
+ int c_offset;
- c_type_id = *type_id;
- c_offset = H5Tget_offset(c_type_id);
- if ( c_offset < 0 ) return ret_value;
+ c_type_id = *type_id;
+ c_offset = H5Tget_offset(c_type_id);
+ if (c_offset < 0)
+ return ret_value;
- *offset = (size_t_f)c_offset ;
- ret_value = 0;
- return ret_value;
+ *offset = (size_t_f)c_offset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_offset_c
@@ -565,23 +572,24 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset)
+nh5tset_offset_c(hid_t_f *type_id, size_t_f *offset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_offset;
- herr_t status;
-
- c_offset = (size_t)*offset;
- c_type_id = *type_id;
- status = H5Tset_offset(c_type_id, c_offset);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_offset;
+ herr_t status;
+
+ c_offset = (size_t)*offset;
+ c_type_id = *type_id;
+ status = H5Tset_offset(c_type_id, c_offset);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_pad_c
@@ -604,25 +612,26 @@ nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad)
+nh5tget_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_lsb, c_msb;
-
- c_type_id = *type_id;
- status = H5Tget_pad(c_type_id, &c_lsb, &c_msb);
- if ( status < 0 ) return ret_value;
-
- *lsbpad = (int_f) c_lsb;
- *msbpad = (int_f) c_msb;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_lsb, c_msb;
+
+ c_type_id = *type_id;
+ status = H5Tget_pad(c_type_id, &c_lsb, &c_msb);
+ if (status < 0)
+ return ret_value;
+
+ *lsbpad = (int_f)c_lsb;
+ *msbpad = (int_f)c_msb;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_pad_c
@@ -646,24 +655,25 @@ nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad )
+nh5tset_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_lsb, c_msb;
-
- c_type_id = *type_id;
- c_lsb = (H5T_pad_t)*lsbpad;
- c_msb = (H5T_pad_t)*msbpad;
- status = H5Tset_pad(c_type_id, c_lsb, c_msb);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_lsb, c_msb;
+
+ c_type_id = *type_id;
+ c_lsb = (H5T_pad_t)*lsbpad;
+ c_msb = (H5T_pad_t)*msbpad;
+ status = H5Tset_pad(c_type_id, c_lsb, c_msb);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_sign_c
@@ -683,22 +693,23 @@ nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_sign_c ( hid_t_f *type_id , int_f *sign)
+nh5tget_sign_c(hid_t_f *type_id, int_f *sign)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_sign_t c_sign;
-
- c_type_id = *type_id;
- c_sign = H5Tget_sign(c_type_id);
- if ( c_sign == -1 ) return ret_value;
- *sign = (int_f)c_sign ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_sign_t c_sign;
+
+ c_type_id = *type_id;
+ c_sign = H5Tget_sign(c_type_id);
+ if (c_sign == -1)
+ return ret_value;
+ *sign = (int_f)c_sign;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_sign_c
@@ -717,24 +728,25 @@ nh5tget_sign_c ( hid_t_f *type_id , int_f *sign)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_sign_c ( hid_t_f *type_id , int_f* sign)
+nh5tset_sign_c(hid_t_f *type_id, int_f *sign)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_sign_t c_sign;
- herr_t status;
-
- c_type_id = *type_id;
- c_sign = (H5T_sign_t)*sign;
- status = H5Tset_sign(c_type_id, c_sign);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_sign_t c_sign;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_sign = (H5T_sign_t)*sign;
+ status = H5Tset_sign(c_type_id, c_sign);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_fields_c
@@ -758,27 +770,29 @@ nh5tset_sign_c ( hid_t_f *type_id , int_f* sign)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize)
+nh5tget_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize, size_t_f *mpos,
+ size_t_f *msize)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
-
- c_type_id = *type_id;
- status = H5Tget_fields(c_type_id, &c_spos, &c_epos, &c_esize, &c_mpos, &c_msize);
- if ( status < 0 ) return ret_value;
- *spos = (size_t_f) c_spos;
- *epos = (size_t_f) c_epos;
- *esize = (size_t_f) c_esize;
- *mpos = (size_t_f) c_mpos;
- *msize = (size_t_f) c_msize;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
+
+ c_type_id = *type_id;
+ status = H5Tget_fields(c_type_id, &c_spos, &c_epos, &c_esize, &c_mpos, &c_msize);
+ if (status < 0)
+ return ret_value;
+ *spos = (size_t_f)c_spos;
+ *epos = (size_t_f)c_epos;
+ *esize = (size_t_f)c_esize;
+ *mpos = (size_t_f)c_mpos;
+ *msize = (size_t_f)c_msize;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_fields_c
@@ -801,28 +815,30 @@ nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f*
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize)
+nh5tset_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize, size_t_f *mpos,
+ size_t_f *msize)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
-
- c_spos = (size_t)*spos;
- c_epos = (size_t)*epos;
- c_esize = (size_t)*esize;
- c_mpos = (size_t)*mpos;
- c_msize = (size_t)*msize;
- c_type_id = *type_id;
- status = H5Tset_fields(c_type_id, c_spos, c_epos, c_esize, c_mpos, c_msize);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
+
+ c_spos = (size_t)*spos;
+ c_epos = (size_t)*epos;
+ c_esize = (size_t)*esize;
+ c_mpos = (size_t)*mpos;
+ c_msize = (size_t)*msize;
+ c_type_id = *type_id;
+ status = H5Tset_fields(c_type_id, c_spos, c_epos, c_esize, c_mpos, c_msize);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_ebias_c
@@ -843,23 +859,24 @@ nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* e
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
+nh5tget_ebias_c(hid_t_f *type_id, size_t_f *ebias)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_ebias;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_ebias;
- c_type_id = *type_id;
- c_ebias = H5Tget_ebias(c_type_id);
- if ( c_ebias == 0 ) return ret_value;
+ c_type_id = *type_id;
+ c_ebias = H5Tget_ebias(c_type_id);
+ if (c_ebias == 0)
+ return ret_value;
- *ebias = (size_t_f)c_ebias;
- ret_value = 0;
- return ret_value;
+ *ebias = (size_t_f)c_ebias;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_ebias_c
@@ -879,24 +896,25 @@ nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
+nh5tset_ebias_c(hid_t_f *type_id, size_t_f *ebias)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_ebias;
- herr_t status;
-
- c_type_id = *type_id;
- c_ebias = (size_t)*ebias;
- status = H5Tset_ebias(c_type_id, c_ebias);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_ebias;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_ebias = (size_t)*ebias;
+ status = H5Tset_ebias(c_type_id, c_ebias);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_norm_c
@@ -917,23 +935,24 @@ nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_norm_c ( hid_t_f *type_id , int_f *norm)
+nh5tget_norm_c(hid_t_f *type_id, int_f *norm)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_norm_t c_norm;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_norm_t c_norm;
- c_type_id = *type_id;
- c_norm = H5Tget_norm(c_type_id);
- if ( c_norm == H5T_NORM_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_norm = H5Tget_norm(c_type_id);
+ if (c_norm == H5T_NORM_ERROR)
+ return ret_value;
- *norm = (int_f)c_norm;
- ret_value = 0;
- return ret_value;
+ *norm = (int_f)c_norm;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_norm_c
@@ -953,24 +972,25 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_norm_c ( hid_t_f *type_id , int_f *norm)
+nh5tset_norm_c(hid_t_f *type_id, int_f *norm)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_norm_t c_norm;
- herr_t status;
-
- c_type_id = *type_id;
- c_norm = (H5T_norm_t)*norm;
- status = H5Tset_norm(c_type_id, c_norm);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_norm_t c_norm;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_norm = (H5T_norm_t)*norm;
+ status = H5Tset_norm(c_type_id, c_norm);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_inpad_c
@@ -993,23 +1013,24 @@ nh5tset_norm_c ( hid_t_f *type_id , int_f *norm)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype)
+nh5tget_inpad_c(hid_t_f *type_id, int_f *padtype)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_pad_t c_padtype;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_pad_t c_padtype;
- c_type_id = *type_id;
- c_padtype = H5Tget_inpad(c_type_id);
- if ( c_padtype == H5T_PAD_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_padtype = H5Tget_inpad(c_type_id);
+ if (c_padtype == H5T_PAD_ERROR)
+ return ret_value;
- *padtype = (int_f) c_padtype;
- ret_value = 0;
- return ret_value;
+ *padtype = (int_f)c_padtype;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_inpad_c
@@ -1033,24 +1054,25 @@ nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype)
+nh5tset_inpad_c(hid_t_f *type_id, int_f *padtype)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_padtype;
-
- c_type_id = *type_id;
- c_padtype = (H5T_pad_t)*padtype;
- status = H5Tset_inpad(c_type_id, c_padtype);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_padtype;
+
+ c_type_id = *type_id;
+ c_padtype = (H5T_pad_t)*padtype;
+ status = H5Tset_inpad(c_type_id, c_padtype);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_cset_c
@@ -1072,23 +1094,24 @@ nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_cset_c ( hid_t_f *type_id , int_f * cset)
+nh5tget_cset_c(hid_t_f *type_id, int_f *cset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_cset_t c_cset;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_cset_t c_cset;
- c_type_id = *type_id;
- c_cset = H5Tget_cset(c_type_id);
- if ( c_cset == H5T_CSET_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_cset = H5Tget_cset(c_type_id);
+ if (c_cset == H5T_CSET_ERROR)
+ return ret_value;
- *cset = (int_f) c_cset;
- ret_value = 0;
- return ret_value;
+ *cset = (int_f)c_cset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_cset_c
@@ -1111,24 +1134,25 @@ nh5tget_cset_c ( hid_t_f *type_id , int_f * cset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_cset_c ( hid_t_f *type_id, int_f * cset)
+nh5tset_cset_c(hid_t_f *type_id, int_f *cset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_cset_t c_cset;
-
- c_type_id = *type_id;
- c_cset = (H5T_cset_t)*cset;
- status = H5Tset_cset(c_type_id, c_cset);
-
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_cset_t c_cset;
+
+ c_type_id = *type_id;
+ c_cset = (H5T_cset_t)*cset;
+ status = H5Tset_cset(c_type_id, c_cset);
+
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_strpad_c
@@ -1149,22 +1173,23 @@ nh5tset_cset_c ( hid_t_f *type_id, int_f * cset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad)
+nh5tget_strpad_c(hid_t_f *type_id, int_f *strpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_str_t c_strpad;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_str_t c_strpad;
- c_type_id = *type_id;
- c_strpad = H5Tget_strpad(c_type_id);
- if ( c_strpad == H5T_STR_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_strpad = H5Tget_strpad(c_type_id);
+ if (c_strpad == H5T_STR_ERROR)
+ return ret_value;
- *strpad = (int_f) c_strpad;
- ret_value = 0;
- return ret_value;
+ *strpad = (int_f)c_strpad;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_strpad_c
@@ -1187,24 +1212,25 @@ nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad)
+nh5tset_strpad_c(hid_t_f *type_id, int_f *strpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_str_t c_strpad;
-
- c_type_id = *type_id;
- c_strpad = (H5T_str_t)*strpad;
- status = H5Tset_strpad(c_type_id, c_strpad);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_str_t c_strpad;
+
+ c_type_id = *type_id;
+ c_strpad = (H5T_str_t)*strpad;
+ status = H5Tset_strpad(c_type_id, c_strpad);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_nmembers_c
@@ -1225,21 +1251,22 @@ nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
+nh5tget_nmembers_c(hid_t_f *type_id, int_f *num_members)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
+ int ret_value = -1;
+ hid_t c_type_id;
- c_type_id = *type_id;
- *num_members = (int_f)H5Tget_nmembers(c_type_id);
- if (*num_members < 0 ) return ret_value;
+ c_type_id = *type_id;
+ *num_members = (int_f)H5Tget_nmembers(c_type_id);
+ if (*num_members < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_name_c
@@ -1261,27 +1288,28 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
* Elena Pourmal
* Added namelen parameter to return length of the name to Fortran user
* SOURCE
-*/
+ */
int_f
-nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen)
+nh5tget_member_name_c(hid_t_f *type_id, int_f *idx, _fcd member_name, int_f *namelen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- unsigned c_index;
- char *c_name;
-
- c_type_id = *type_id;
- c_index = (unsigned)*idx;
- c_name = H5Tget_member_name(c_type_id, c_index);
- if (c_name == NULL ) return ret_value;
-
- HD5packFstring(c_name, _fcdtocp(member_name), strlen(c_name));
- *namelen = (int_f)strlen(c_name);
- H5free_memory(c_name);
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ unsigned c_index;
+ char * c_name;
+
+ c_type_id = *type_id;
+ c_index = (unsigned)*idx;
+ c_name = H5Tget_member_name(c_type_id, c_index);
+ if (c_name == NULL)
+ return ret_value;
+
+ HD5packFstring(c_name, _fcdtocp(member_name), strlen(c_name));
+ *namelen = (int_f)strlen(c_name);
+ H5free_memory(c_name);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_index_c
* NAME
@@ -1303,37 +1331,38 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
+nh5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
/******/
{
- int ret_value = -1;
- char *c_name;
- hid_t c_type_id;
- int c_index;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Tget_member_index function.
- */
- c_type_id = (hid_t)*type_id;
- c_index = H5Tget_member_index(c_type_id, c_name);
-
- if (c_index < 0) goto DONE;
- *idx = (int_f)c_index;
+ int ret_value = -1;
+ char *c_name;
+ hid_t c_type_id;
+ int c_index;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Tget_member_index function.
+ */
+ c_type_id = (hid_t)*type_id;
+ c_index = H5Tget_member_index(c_type_id, c_name);
+
+ if (c_index < 0)
+ goto DONE;
+ *idx = (int_f)c_index;
DONE:
- HDfree(c_name);
- ret_value = 0;
- return ret_value;
+ HDfree(c_name);
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tget_member_offset_c
* NAME
* h5tget_member_offset_c
@@ -1355,19 +1384,19 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
+nh5tget_member_offset_c(hid_t_f *type_id, int_f *member_no, size_t_f *offset)
/******/
{
- int ret_value = -1;
- size_t c_offset;
+ int ret_value = -1;
+ size_t c_offset;
- c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no);
- *offset = (size_t_f)c_offset;
- ret_value = 0;
- return ret_value;
+ c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no);
+ *offset = (size_t_f)c_offset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_array_dims_c
@@ -1388,23 +1417,23 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims)
+nh5tget_array_dims_c(hid_t_f *type_id, hsize_t_f *dims)
/******/
{
hsize_t c_dims[H5S_MAX_RANK];
- int rank, i;
- int ret_value = -1;
+ int rank, i;
+ int ret_value = -1;
- if((rank = H5Tget_array_ndims((hid_t)*type_id)) < 0)
+ if ((rank = H5Tget_array_ndims((hid_t)*type_id)) < 0)
goto DONE;
- if(H5Tget_array_dims2((hid_t)*type_id, c_dims) < 0)
+ if (H5Tget_array_dims2((hid_t)*type_id, c_dims) < 0)
goto DONE;
- for(i = 0; i < rank; i++)
+ for (i = 0; i < rank; i++)
dims[(rank - i) - 1] = (hsize_t_f)c_dims[i];
ret_value = 0;
@@ -1431,23 +1460,24 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims)
+nh5tget_array_ndims_c(hid_t_f *type_id, int_f *ndims)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- int c_ndims;
+ int ret_value = -1;
+ hid_t c_type_id;
+ int c_ndims;
- c_type_id = (hid_t)*type_id;
- c_ndims = H5Tget_array_ndims(c_type_id);
- if (c_ndims < 0) return ret_value;
+ c_type_id = (hid_t)*type_id;
+ c_ndims = H5Tget_array_ndims(c_type_id);
+ if (c_ndims < 0)
+ return ret_value;
- *ndims = (int_f)c_ndims;
- ret_value = 0;
- return ret_value;
+ *ndims = (int_f)c_ndims;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_super_c
@@ -1468,26 +1498,26 @@ nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
+nh5tget_super_c(hid_t_f *type_id, hid_t_f *base_type_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- hid_t c_base_type_id;
+ int ret_value = -1;
+ hid_t c_type_id;
+ hid_t c_base_type_id;
- c_type_id = (hid_t)*type_id;
- c_base_type_id = H5Tget_super(c_type_id);
- if (c_base_type_id < 0) return ret_value;
+ c_type_id = (hid_t)*type_id;
+ c_base_type_id = H5Tget_super(c_type_id);
+ if (c_base_type_id < 0)
+ return ret_value;
- *base_type_id = (hid_t_f)c_base_type_id;
- ret_value = 0;
- return ret_value;
+ *base_type_id = (hid_t_f)c_base_type_id;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tget_member_type_c
* NAME
* h5tget_member_type_c
@@ -1507,22 +1537,22 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
+nh5tget_member_type_c(hid_t_f *type_id, int_f *field_idx, hid_t_f *datatype)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx);
- if(*datatype < 0) return ret_value;
+ *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx);
+ if (*datatype < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tcreate_c
* NAME
* h5tcreate_c
@@ -1539,24 +1569,25 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- H5T_class_t c_class;
- size_t c_size;
+ int ret_value = -1;
+ H5T_class_t c_class;
+ size_t c_size;
- c_size =(size_t) *size;
- c_class = (H5T_class_t) *cls;
+ c_size = (size_t)*size;
+ c_class = (H5T_class_t)*cls;
- *type_id = (hid_t_f)H5Tcreate(c_class, c_size);
- if(*type_id < 0) return ret_value;
+ *type_id = (hid_t_f)H5Tcreate(c_class, c_size);
+ if (*type_id < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tinsert_c
@@ -1578,28 +1609,29 @@ nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id)
+nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t_f *field_id)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
- error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
+ error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
- HDfree(c_name);
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ HDfree(c_name);
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tpack_c
* NAME
* h5tpack_c
@@ -1617,22 +1649,23 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tpack_c(hid_t_f * type_id)
+nh5tpack_c(hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
- c_type_id = *type_id;
- status = H5Tpack(c_type_id);
- if (status < 0) return ret_value;
+ c_type_id = *type_id;
+ status = H5Tpack(c_type_id);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tarray_create_c
@@ -1653,34 +1686,32 @@ nh5tpack_c(hid_t_f * type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id)
+nh5tarray_create_c(hid_t_f *base_id, int_f *rank, hsize_t_f *dims, hid_t_f *type_id)
/******/
{
- hsize_t c_dims[H5S_MAX_RANK];
- hid_t c_type_id;
- unsigned u; /* Local index variable */
- int ret_value = -1;
-
+ hsize_t c_dims[H5S_MAX_RANK];
+ hid_t c_type_id;
+ unsigned u; /* Local index variable */
+ int ret_value = -1;
/*
* Transpose dimension arrays because of C-FORTRAN storage order
*/
- for(u = 0; u < (unsigned)*rank ; u++)
- c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1];
+ for (u = 0; u < (unsigned)*rank; u++)
+ c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1];
- if((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0)
+ if ((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0)
goto DONE;
- *type_id = (hid_t_f)c_type_id;
+ *type_id = (hid_t_f)c_type_id;
ret_value = 0;
DONE:
return ret_value;
}
-
/****if* H5Tf/h5tenum_create_c
* NAME
* h5tenum_create_c
@@ -1699,20 +1730,21 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id)
+nh5tenum_create_c(hid_t_f *parent_id, hid_t_f *new_type_id)
/******/
{
- int ret_value = 0;
- hid_t c_new_type_id;
+ int ret_value = 0;
+ hid_t c_new_type_id;
- c_new_type_id = H5Tenum_create((hid_t)*parent_id);
- if ( c_new_type_id < 0 ) ret_value = -1;
+ c_new_type_id = H5Tenum_create((hid_t)*parent_id);
+ if (c_new_type_id < 0)
+ ret_value = -1;
- *new_type_id = (hid_t_f)c_new_type_id;
- return ret_value;
+ *new_type_id = (hid_t_f)c_new_type_id;
+ return ret_value;
}
/****if* H5Tf/h5tenum_insert_c
@@ -1735,31 +1767,32 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id)
* it should not be cast to an int (which might be 4 bytes). Instead the value
* is written as the size of an int_f.
* SOURCE
-*/
+ */
int_f
-nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
+nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
- int_f c_value;
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
+ int_f c_value;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
- c_value = *value;
- error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value);
+ c_value = *value;
+ error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value);
- HDfree(c_name);
- if(error < 0) return ret_value;
+ HDfree(c_name);
+ if (error < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tenum_nameof_c
* NAME
* h5tenum_nameof_c
@@ -1779,29 +1812,30 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
+nh5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- char* c_name;
- size_t c_namelen;
- herr_t error;
- int_f c_value;
- c_value = *value;
- c_namelen = ((size_t)*namelen) +1;
- c_name = (char *)HDmalloc(sizeof(char)*c_namelen);
- c_type_id = (hid_t)*type_id;
- error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
- HDfree(c_name);
-
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ char * c_name;
+ size_t c_namelen;
+ herr_t error;
+ int_f c_value;
+ c_value = *value;
+ c_namelen = ((size_t)*namelen) + 1;
+ c_name = (char *)HDmalloc(sizeof(char) * c_namelen);
+ c_type_id = (hid_t)*type_id;
+ error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
+ HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HDfree(c_name);
+
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tenum_valueof_c
@@ -1823,26 +1857,27 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
+nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
- HDfree(c_name);
-
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+ error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
+ HDfree(c_name);
+
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
/****if* H5Tf/h5tget_member_value_c
* NAME
@@ -1862,22 +1897,23 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
+nh5tget_member_value_c(hid_t_f *type_id, int_f *member_no, int_f *value)
/******/
{
- int ret_value = -1;
- int c_value;
- herr_t error;
+ int ret_value = -1;
+ int c_value;
+ herr_t error;
- error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value);
- if(error < 0) return ret_value;
+ error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value);
+ if (error < 0)
+ return ret_value;
- *value = (int_f)c_value;
- ret_value = 0;
- return ret_value;
+ *value = (int_f)c_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_tag_c
@@ -1900,23 +1936,24 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
+nh5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen)
/******/
{
- int ret_value = -1;
- herr_t status;
- char* c_tag;
+ int ret_value = -1;
+ herr_t status;
+ char * c_tag;
- c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
+ c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
- status = H5Tset_tag((hid_t)*type_id, c_tag);
- HDfree(c_tag);
- if ( status < 0 ) return ret_value;
+ status = H5Tset_tag((hid_t)*type_id, c_tag);
+ HDfree(c_tag);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_tag_c
@@ -1938,24 +1975,25 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen)
+nh5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *taglen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- char *c_tag;
-
- c_type_id = *type_id;
- c_tag = H5Tget_tag(c_type_id);
- if (c_tag == NULL ) return ret_value;
-
- HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size);
- *taglen = (int_f)HDstrlen(c_tag);
- H5free_memory(c_tag);
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ char *c_tag;
+
+ c_type_id = *type_id;
+ c_tag = H5Tget_tag(c_type_id);
+ if (c_tag == NULL)
+ return ret_value;
+
+ HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size);
+ *taglen = (int_f)HDstrlen(c_tag);
+ H5free_memory(c_tag);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tvlen_create_c
* NAME
@@ -1974,21 +2012,22 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id)
+nh5tvlen_create_c(hid_t_f *type_id, hid_t_f *vltype_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- hid_t c_vltype_id;
-
- c_type_id = (hid_t)*type_id;
- c_vltype_id = H5Tvlen_create(c_type_id);
- if (c_vltype_id < 0 ) return ret_value;
- *vltype_id = (hid_t_f)c_vltype_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ hid_t c_vltype_id;
+
+ c_type_id = (hid_t)*type_id;
+ c_vltype_id = H5Tvlen_create(c_type_id);
+ if (c_vltype_id < 0)
+ return ret_value;
+ *vltype_id = (hid_t_f)c_vltype_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tis_variable_str_c
* NAME
@@ -2009,21 +2048,22 @@ nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
+nh5tis_variable_str_c(hid_t_f *type_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- htri_t status;
-
- c_type_id = (hid_t)*type_id;
- status = H5Tis_variable_str(c_type_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ htri_t status;
+
+ c_type_id = (hid_t)*type_id;
+ status = H5Tis_variable_str(c_type_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_class_c
* NAME
@@ -2045,24 +2085,25 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
+nh5tget_member_class_c(hid_t_f *type_id, int_f *member_no, int_f *cls)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- unsigned c_member_no;
- H5T_class_t c_class;
-
- c_type_id = (hid_t)*type_id;
- c_member_no = (unsigned)*member_no;
- c_class = H5Tget_member_class(c_type_id, c_member_no);
-
- if ( c_class == H5T_NO_CLASS ) ret_value = -1;
- *cls = (int_f)c_class;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ unsigned c_member_no;
+ H5T_class_t c_class;
+
+ c_type_id = (hid_t)*type_id;
+ c_member_no = (unsigned)*member_no;
+ c_class = H5Tget_member_class(c_type_id, c_member_no);
+
+ if (c_class == H5T_NO_CLASS)
+ ret_value = -1;
+ *cls = (int_f)c_class;
+ return ret_value;
}
/****if* H5Tf/h5tcommit_anon_c
@@ -2083,22 +2124,21 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id,
- hid_t_f *tcpl_id, hid_t_f *tapl_id)
+nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /* Call H5Tcommit_anon function */
- if(H5Tcommit_anon((hid_t)*loc_id, (hid_t)*dtype_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
- goto done;
+ /* Call H5Tcommit_anon function */
+ if (H5Tcommit_anon((hid_t)*loc_id, (hid_t)*dtype_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
+ goto done;
- ret_value = 0;
+ ret_value = 0;
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Tf/h5tcommitted_c
@@ -2117,19 +2157,18 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5tcommitted_c(hid_t_f *dtype_id)
/******/
{
- int_f ret_value;
+ int_f ret_value;
- /* Call H5Tcommitted function */
+ /* Call H5Tcommitted function */
- ret_value=(int_f)H5Tcommitted((hid_t)*dtype_id);
-
- return ret_value;
+ ret_value = (int_f)H5Tcommitted((hid_t)*dtype_id);
+ return ret_value;
}
/****if* H5Tf/h5tdecode_c
@@ -2152,30 +2191,30 @@ nh5tcommitted_c(hid_t_f *dtype_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tdecode_c ( _fcd buf, hid_t_f *obj_id )
+nh5tdecode_c(_fcd buf, hid_t_f *obj_id)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- hid_t c_obj_id;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ hid_t c_obj_id;
- /*
- * Call H5Tdecode function.
- */
+ /*
+ * Call H5Tdecode function.
+ */
- c_buf = (unsigned char*)buf;
+ c_buf = (unsigned char *)buf;
- c_obj_id = H5Tdecode(c_buf);
- if(c_obj_id < 0)
- return ret_value;
+ c_obj_id = H5Tdecode(c_buf);
+ if (c_obj_id < 0)
+ return ret_value;
- *obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
+ *obj_id = (hid_t_f)c_obj_id;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Tf/h5tencode_c
@@ -2196,56 +2235,56 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
+nh5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- size_t c_size;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ size_t c_size;
- /* return just the size of the allocated buffer;
- * equivalent to C routine for which 'name' is set equal to NULL
- */
+ /* return just the size of the allocated buffer;
+ * equivalent to C routine for which 'name' is set equal to NULL
+ */
- if (*nalloc == 0) {
+ if (*nalloc == 0) {
- if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
- return ret_value;
+ if (H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ return ret_value;
- *nalloc = (size_t_f)c_size;
+ *nalloc = (size_t_f)c_size;
- ret_value = 0;
- return ret_value;
- }
+ ret_value = 0;
+ return ret_value;
+ }
- /*
- * Allocate buffer
- */
- c_size = (size_t)*nalloc;
- if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
- return ret_value;
+ /*
+ * Allocate buffer
+ */
+ c_size = (size_t)*nalloc;
+ if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ return ret_value;
- /*
- * Call H5Tencode function.
- */
- if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
- return ret_value;
+ /*
+ * Call H5Tencode function.
+ */
+ if (H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ return ret_value;
- /* copy the C buffer to the FORTRAN buffer.
- * Can not use HD5packFstring because we don't want to
- * eliminate the NUL terminator or pad remaining space
- * with blanks.
- */
+ /* copy the C buffer to the FORTRAN buffer.
+ * Can not use HD5packFstring because we don't want to
+ * eliminate the NUL terminator or pad remaining space
+ * with blanks.
+ */
- HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size);
+ HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
- ret_value = 0;
- if(c_buf)
- HDfree(c_buf);
- return ret_value;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Tf/h5tget_create_plist_c
@@ -2265,13 +2304,13 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id)
+nh5tget_create_plist_c(hid_t_f *dtype_id, hid_t_f *dtpl_id)
/******/
{
- int_f ret_value=-1; /* Return value */
+ int_f ret_value = -1; /* Return value */
if ((*dtpl_id = (hid_t_f)H5Tget_create_plist((hid_t)*dtype_id)) < 0)
return ret_value;
@@ -2299,20 +2338,21 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
+nh5tcompiler_conv_c(hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
/******/
{
- int ret_value = -1;
- htri_t status;
-
- status = H5Tcompiler_conv( (hid_t)*src_id , (hid_t)*dst_id);
- if ( status < 0 ) return ret_value;
- *c_flag = (int_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ htri_t status;
+
+ status = H5Tcompiler_conv((hid_t)*src_id, (hid_t)*dst_id);
+ if (status < 0)
+ return ret_value;
+ *c_flag = (int_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_native_type_c
* NAME
@@ -2333,20 +2373,21 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id)
/******/
{
- int ret_value = -1;
- hid_t status;
-
- status = H5Tget_native_type( (hid_t)*dtype_id, (H5T_direction_t)*direction);
- if ( status < 0 ) return ret_value;
- *native_dtype_id = (hid_t_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t status;
+
+ status = H5Tget_native_type((hid_t)*dtype_id, (H5T_direction_t)*direction);
+ if (status < 0)
+ return ret_value;
+ *native_dtype_id = (hid_t_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tconvert_c
@@ -2373,18 +2414,20 @@ nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype
* December 8, 2008
*
* SOURCE
-*/
+ */
int_f
-h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id)
+h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background,
+ hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- hid_t status;
+ int ret_value = -1;
+ hid_t status;
- status = H5Tconvert( (hid_t)*src_id, (hid_t)*dst_id, (size_t)*nelmts, buf, background, (hid_t)*plist_id );
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ status = H5Tconvert((hid_t)*src_id, (hid_t)*dst_id, (size_t)*nelmts, buf, background, (hid_t)*plist_id);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tenum_insert_ptr_c
@@ -2406,25 +2449,25 @@ h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void
* February 6, 2015
*
* SOURCE
-*/
+ */
int_f
-h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value)
+h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value)
/******/
{
- int ret_value = -1;
- hid_t status;
- char *c_name;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- status = H5Tenum_insert( (hid_t)*type_id, c_name, value);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ hid_t status;
+ char *c_name;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+ status = H5Tenum_insert((hid_t)*type_id, c_name, value);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90
index 3d8a1df..fe4cffe 100644
--- a/fortran/src/H5Tff.f90
+++ b/fortran/src/H5Tff.f90
@@ -10,18 +10,18 @@
!
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90
index 23bf09c..fb6298e 100644
--- a/fortran/src/H5Tff_F03.f90
+++ b/fortran/src/H5Tff_F03.f90
@@ -10,18 +10,18 @@
! instead of H5Tff_F90.f90 if Fortran 2003 functions are enabled.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90
index 5b3290b..92c0535 100644
--- a/fortran/src/H5Tff_F90.f90
+++ b/fortran/src/H5Tff_F90.f90
@@ -13,18 +13,18 @@
! Currently contains no functions.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c
index ba3c05f..fd5e8bc 100644
--- a/fortran/src/H5Zf.c
+++ b/fortran/src/H5Zf.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -36,23 +36,24 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5zunregister_c (int_f *filter)
+nh5zunregister_c(int_f *filter)
/******/
{
- int ret_value = -1;
- herr_t status;
- H5Z_filter_t c_filter;
+ int ret_value = -1;
+ herr_t status;
+ H5Z_filter_t c_filter;
- /*
- * Call H5Zunregister function.
- */
- c_filter = (H5Z_filter_t)*filter;
- status = H5Zunregister(c_filter);
- if (status < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Zunregister function.
+ */
+ c_filter = (H5Z_filter_t)*filter;
+ status = H5Zunregister(c_filter);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Zf/h5zfiletr_avail_c
* NAME
@@ -71,21 +72,22 @@ nh5zunregister_c (int_f *filter)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5zfilter_avail_c ( int_f *filter , int_f *flag )
+nh5zfilter_avail_c(int_f *filter, int_f *flag)
/******/
{
- int ret_value = 0;
- H5Z_filter_t c_filter;
- htri_t status;
+ int ret_value = 0;
+ H5Z_filter_t c_filter;
+ htri_t status;
- c_filter = (H5Z_filter_t)*filter;
- status = H5Zfilter_avail(c_filter);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_filter = (H5Z_filter_t)*filter;
+ status = H5Zfilter_avail(c_filter);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Zf/h5zget_filter_info_c
@@ -106,19 +108,19 @@ nh5zfilter_avail_c ( int_f *filter , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-nh5zget_filter_info_c ( int_f *filter , int_f *flag )
+nh5zget_filter_info_c(int_f *filter, int_f *flag)
/******/
{
- int ret_value = 0;
- H5Z_filter_t c_filter;
- unsigned int c_flag;
+ int ret_value = 0;
+ H5Z_filter_t c_filter;
+ unsigned int c_flag;
- c_filter = (H5Z_filter_t)*filter;
- ret_value = H5Zget_filter_info(c_filter, &c_flag);
- *flag = (int_f)c_flag;
+ c_filter = (H5Z_filter_t)*filter;
+ ret_value = H5Zget_filter_info(c_filter, &c_flag);
+ *flag = (int_f)c_flag;
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90
index 1ba79dd..0916284 100644
--- a/fortran/src/H5Zff.f90
+++ b/fortran/src/H5Zff.f90
@@ -11,16 +11,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90
index b9ce0e2..ec4e690 100644
--- a/fortran/src/H5_DBLE_InterfaceExclude.f90
+++ b/fortran/src/H5_DBLE_InterfaceExclude.f90
@@ -13,18 +13,18 @@
! Empty module.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90
index f371c87..6e0093f 100644
--- a/fortran/src/H5_DBLE_InterfaceInclude.f90
+++ b/fortran/src/H5_DBLE_InterfaceInclude.f90
@@ -14,18 +14,18 @@
! from the HDF function catagory H5A, H5D and H5P.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 174676e..d7ea1b0 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -11,13 +11,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -45,219 +45,291 @@
* Elena Pourmal
* Tuesday, August 3, 1999
* SOURCE
-*/
+ */
int_f
-nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes )
+nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
+ int ret_value = -1;
+ hid_t c_type_id;
size_t tmp_val;
-/* Fortran INTEGER is may not be the same as C in; do all checking to find
- an appropriate size
-*/
+ /* Fortran INTEGER is may not be the same as C in; do all checking to find
+ an appropriate size
+ */
if (sizeof(int_f) == sizeof(int)) {
- if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_f) == sizeof(long)) {
- if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0) return ret_value;
+ if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0)
+ return ret_value;
} /*end if */
- else
- if (sizeof(int_f) == sizeof(long long)) {
- if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ else if (sizeof(int_f) == sizeof(long long)) {
+ if ((types[0] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/* Find appropriate size to store Fortran REAL */
- if(sizeof(real_f)==sizeof(float)) {
- if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if (sizeof(real_f) == sizeof(float)) {
+ if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /* end if */
- else if(sizeof(real_f)==sizeof(double)){
- if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ else if (sizeof(real_f) == sizeof(double)) {
+ if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /* end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_f) == sizeof(long double)) {
- if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[1] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /* end else */
#endif
/* Find appropriate size to store Fortran DOUBLE */
- if(sizeof(double_f)==sizeof(double)) {
- if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
- }/*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
- else if(sizeof(double_f)==sizeof(long double)) {
- if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
- }/*end else */
+ if (sizeof(double_f) == sizeof(double)) {
+ if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
+ } /*end if */
+#if H5_SIZEOF_LONG_DOUBLE != 0
+ else if (sizeof(double_f) == sizeof(long double)) {
+ if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
+ } /*end else */
#endif
-/*
- if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value;
-*/
- if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value;
+ /*
+ if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value;
+ */
+ if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ return ret_value;
tmp_val = 1;
- if(H5Tset_size(c_type_id, tmp_val) < 0) return ret_value;
- if(H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0) return ret_value;
+ if (H5Tset_size(c_type_id, tmp_val) < 0)
+ return ret_value;
+ if (H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0)
+ return ret_value;
types[3] = (hid_t_f)c_type_id;
-/*
- if ((types[3] = H5Tcopy(H5T_C_S1)) < 0) return ret_value;
- if(H5Tset_strpad(types[3],H5T_STR_NULLTERM) < 0) return ret_value;
- if(H5Tset_size(types[3],1) < 0) return ret_value;
-*/
-
+ /*
+ if ((types[3] = H5Tcopy(H5T_C_S1)) < 0) return ret_value;
+ if(H5Tset_strpad(types[3],H5T_STR_NULLTERM) < 0) return ret_value;
+ if(H5Tset_size(types[3],1) < 0) return ret_value;
+ */
-/* if ((types[3] = H5Tcopy(H5T_STD_I8BE)) < 0) return ret_value;
-*/
- if ((types[4] = (hid_t_f)H5Tcopy(H5T_STD_REF_OBJ)) < 0) return ret_value;
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_STD_REF_DSETREG)) < 0) return ret_value;
+ /* if ((types[3] = H5Tcopy(H5T_STD_I8BE)) < 0) return ret_value;
+ */
+ if ((types[4] = (hid_t_f)H5Tcopy(H5T_STD_REF_OBJ)) < 0)
+ return ret_value;
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_STD_REF_DSETREG)) < 0)
+ return ret_value;
/*
* FIND H5T_NATIVE_INTEGER_1
*/
if (sizeof(int_1_f) == sizeof(char)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_1_f) == sizeof(short)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_1_f) == sizeof(int)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_1_f) == sizeof(long long)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/*
* FIND H5T_NATIVE_INTEGER_2
*/
if (sizeof(int_2_f) == sizeof(char)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_2_f) == sizeof(short)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_2_f) == sizeof(int)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_2_f) == sizeof(long long)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/*
* FIND H5T_NATIVE_INTEGER_4
*/
if (sizeof(int_4_f) == sizeof(char)) {
- if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
+ if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_4_f) == sizeof(short)) {
- if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
+ if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_4_f) == sizeof(int)) {
- if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_4_f) == sizeof(long long)) {
- if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/*
* FIND H5T_NATIVE_INTEGER_8
*/
if (sizeof(int_8_f) == sizeof(char)) {
- if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
+ if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_8_f) == sizeof(short)) {
- if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
+ if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_8_f) == sizeof(int)) {
- if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_8_f) == sizeof(long long)) {
- if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/*
* FIND H5T_NATIVE_REAL_4
*/
if (sizeof(real_4_f) == sizeof(float)) {
- if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_4_f) == sizeof(double)) {
- if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_4_f) == sizeof(long double)) {
- if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /*end else */
#endif
/*
* FIND H5T_NATIVE_REAL_8
*/
if (sizeof(real_8_f) == sizeof(float)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_8_f) == sizeof(double)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_8_f) == sizeof(long double)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /*end else */
#endif
/*
* FIND H5T_NATIVE_REAL_16
*/
if (sizeof(real_16_f) == sizeof(float)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_16_f) == sizeof(double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_16_f) == sizeof(long double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /*end else */
#endif
/*
* FIND H5T_NATIVE_B_8
*/
- if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0) return ret_value;
- if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0) return ret_value;
- if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value;
- if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value;
-
- if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value;
- if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value;
- if ((floatingtypes[2] = (hid_t_f)H5Tcopy(H5T_IEEE_F64BE)) < 0) return ret_value;
- if ((floatingtypes[3] = (hid_t_f)H5Tcopy(H5T_IEEE_F64LE)) < 0) return ret_value;
-
- if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0) return ret_value;
- if ((integertypes[1] = (hid_t_f)H5Tcopy(H5T_STD_I8LE)) < 0) return ret_value;
- if ((integertypes[2] = (hid_t_f)H5Tcopy(H5T_STD_I16BE)) < 0) return ret_value;
- if ((integertypes[3] = (hid_t_f)H5Tcopy(H5T_STD_I16LE)) < 0) return ret_value;
- if ((integertypes[4] = (hid_t_f)H5Tcopy(H5T_STD_I32BE)) < 0) return ret_value;
- if ((integertypes[5] = (hid_t_f)H5Tcopy(H5T_STD_I32LE)) < 0) return ret_value;
- if ((integertypes[6] = (hid_t_f)H5Tcopy(H5T_STD_I64BE)) < 0) return ret_value;
- if ((integertypes[7] = (hid_t_f)H5Tcopy(H5T_STD_I64LE)) < 0) return ret_value;
- if ((integertypes[8] = (hid_t_f)H5Tcopy(H5T_STD_U8BE)) < 0) return ret_value;
- if ((integertypes[9] = (hid_t_f)H5Tcopy(H5T_STD_U8LE)) < 0) return ret_value;
- if ((integertypes[10] = (hid_t_f)H5Tcopy(H5T_STD_U16BE)) < 0) return ret_value;
- if ((integertypes[11] = (hid_t_f)H5Tcopy(H5T_STD_U16LE)) < 0) return ret_value;
- if ((integertypes[12] = (hid_t_f)H5Tcopy(H5T_STD_U32BE)) < 0) return ret_value;
- if ((integertypes[13] = (hid_t_f)H5Tcopy(H5T_STD_U32LE)) < 0) return ret_value;
- if ((integertypes[14] = (hid_t_f)H5Tcopy(H5T_STD_U64BE)) < 0) return ret_value;
- if ((integertypes[15] = (hid_t_f)H5Tcopy(H5T_STD_U64LE)) < 0) return ret_value;
- if ((integertypes[17] = (hid_t_f)H5Tcopy(H5T_STD_B8BE)) < 0) return ret_value;
- if ((integertypes[18] = (hid_t_f)H5Tcopy(H5T_STD_B8LE)) < 0) return ret_value;
- if ((integertypes[19] = (hid_t_f)H5Tcopy(H5T_STD_B16BE)) < 0) return ret_value;
- if ((integertypes[20] = (hid_t_f)H5Tcopy(H5T_STD_B16LE)) < 0) return ret_value;
- if ((integertypes[21] = (hid_t_f)H5Tcopy(H5T_STD_B32BE)) < 0) return ret_value;
- if ((integertypes[22] = (hid_t_f)H5Tcopy(H5T_STD_B32LE)) < 0) return ret_value;
- if ((integertypes[23] = (hid_t_f)H5Tcopy(H5T_STD_B64BE)) < 0) return ret_value;
- if ((integertypes[24] = (hid_t_f)H5Tcopy(H5T_STD_B64LE)) < 0) return ret_value;
- if ((integertypes[25] = (hid_t_f)H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value;
- if ((integertypes[26] = (hid_t_f)H5Tcopy(H5T_C_S1)) < 0) return ret_value;
-
-/*
- * Define Fortran H5T_STRING type to store non-fixed size strings
- */
- if ((c_type_id = H5Tcopy(H5T_C_S1)) < 0) return ret_value;
- if(H5Tset_size(c_type_id, H5T_VARIABLE) < 0) return ret_value;
+ if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0)
+ return ret_value;
+ if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0)
+ return ret_value;
+ if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0)
+ return ret_value;
+ if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0)
+ return ret_value;
+
+ if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0)
+ return ret_value;
+ if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0)
+ return ret_value;
+ if ((floatingtypes[2] = (hid_t_f)H5Tcopy(H5T_IEEE_F64BE)) < 0)
+ return ret_value;
+ if ((floatingtypes[3] = (hid_t_f)H5Tcopy(H5T_IEEE_F64LE)) < 0)
+ return ret_value;
+
+ if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0)
+ return ret_value;
+ if ((integertypes[1] = (hid_t_f)H5Tcopy(H5T_STD_I8LE)) < 0)
+ return ret_value;
+ if ((integertypes[2] = (hid_t_f)H5Tcopy(H5T_STD_I16BE)) < 0)
+ return ret_value;
+ if ((integertypes[3] = (hid_t_f)H5Tcopy(H5T_STD_I16LE)) < 0)
+ return ret_value;
+ if ((integertypes[4] = (hid_t_f)H5Tcopy(H5T_STD_I32BE)) < 0)
+ return ret_value;
+ if ((integertypes[5] = (hid_t_f)H5Tcopy(H5T_STD_I32LE)) < 0)
+ return ret_value;
+ if ((integertypes[6] = (hid_t_f)H5Tcopy(H5T_STD_I64BE)) < 0)
+ return ret_value;
+ if ((integertypes[7] = (hid_t_f)H5Tcopy(H5T_STD_I64LE)) < 0)
+ return ret_value;
+ if ((integertypes[8] = (hid_t_f)H5Tcopy(H5T_STD_U8BE)) < 0)
+ return ret_value;
+ if ((integertypes[9] = (hid_t_f)H5Tcopy(H5T_STD_U8LE)) < 0)
+ return ret_value;
+ if ((integertypes[10] = (hid_t_f)H5Tcopy(H5T_STD_U16BE)) < 0)
+ return ret_value;
+ if ((integertypes[11] = (hid_t_f)H5Tcopy(H5T_STD_U16LE)) < 0)
+ return ret_value;
+ if ((integertypes[12] = (hid_t_f)H5Tcopy(H5T_STD_U32BE)) < 0)
+ return ret_value;
+ if ((integertypes[13] = (hid_t_f)H5Tcopy(H5T_STD_U32LE)) < 0)
+ return ret_value;
+ if ((integertypes[14] = (hid_t_f)H5Tcopy(H5T_STD_U64BE)) < 0)
+ return ret_value;
+ if ((integertypes[15] = (hid_t_f)H5Tcopy(H5T_STD_U64LE)) < 0)
+ return ret_value;
+ if ((integertypes[17] = (hid_t_f)H5Tcopy(H5T_STD_B8BE)) < 0)
+ return ret_value;
+ if ((integertypes[18] = (hid_t_f)H5Tcopy(H5T_STD_B8LE)) < 0)
+ return ret_value;
+ if ((integertypes[19] = (hid_t_f)H5Tcopy(H5T_STD_B16BE)) < 0)
+ return ret_value;
+ if ((integertypes[20] = (hid_t_f)H5Tcopy(H5T_STD_B16LE)) < 0)
+ return ret_value;
+ if ((integertypes[21] = (hid_t_f)H5Tcopy(H5T_STD_B32BE)) < 0)
+ return ret_value;
+ if ((integertypes[22] = (hid_t_f)H5Tcopy(H5T_STD_B32LE)) < 0)
+ return ret_value;
+ if ((integertypes[23] = (hid_t_f)H5Tcopy(H5T_STD_B64BE)) < 0)
+ return ret_value;
+ if ((integertypes[24] = (hid_t_f)H5Tcopy(H5T_STD_B64LE)) < 0)
+ return ret_value;
+ if ((integertypes[25] = (hid_t_f)H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ return ret_value;
+ if ((integertypes[26] = (hid_t_f)H5Tcopy(H5T_C_S1)) < 0)
+ return ret_value;
+
+ /*
+ * Define Fortran H5T_STRING type to store non-fixed size strings
+ */
+ if ((c_type_id = H5Tcopy(H5T_C_S1)) < 0)
+ return ret_value;
+ if (H5Tset_size(c_type_id, H5T_VARIABLE) < 0)
+ return ret_value;
integertypes[16] = c_type_id;
ret_value = 0;
@@ -298,26 +370,28 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype
* SOURCE
*/
int_f
-nh5close_types_c( hid_t_f * types, int_f *lentypes,
- hid_t_f * floatingtypes, int_f* floatinglen,
- hid_t_f * integertypes, int_f * integerlen )
+nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen,
+ hid_t_f *integertypes, int_f *integerlen)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
hid_t c_type_id;
- int i;
+ int i;
for (i = 0; i < *lentypes; i++) {
c_type_id = types[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
for (i = 0; i < *floatinglen; i++) {
c_type_id = floatingtypes[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
for (i = 0; i < *integerlen; i++) {
c_type_id = integertypes[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
ret_value = 0;
return ret_value;
@@ -366,31 +440,30 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
* SOURCE
*/
int_f
-nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
- int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags)
+nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags,
+ int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags,
+ int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags,
+ int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, hsize_t_f *h5s_hsize_flags,
+ int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags)
/******/
{
int ret_value = -1;
-/*
- * H5D flags
- */
+ /*
+ * H5D flags
+ */
h5d_size_flags[0] = (size_t_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
h5d_size_flags[1] = (size_t_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT;
- h5d_flags[0] = (int_f)H5D_COMPACT;
- h5d_flags[1] = (int_f)H5D_CONTIGUOUS;
- h5d_flags[2] = (int_f)H5D_CHUNKED;
- h5d_flags[3] = (int_f)H5D_ALLOC_TIME_ERROR;
- h5d_flags[4] = (int_f)H5D_ALLOC_TIME_DEFAULT;
- h5d_flags[5] = (int_f)H5D_ALLOC_TIME_EARLY;
- h5d_flags[6] = (int_f)H5D_ALLOC_TIME_LATE;
- h5d_flags[7] = (int_f)H5D_ALLOC_TIME_INCR;
- h5d_flags[8] = (int_f)H5D_SPACE_STATUS_ERROR;
- h5d_flags[9] = (int_f)H5D_SPACE_STATUS_NOT_ALLOCATED;
+ h5d_flags[0] = (int_f)H5D_COMPACT;
+ h5d_flags[1] = (int_f)H5D_CONTIGUOUS;
+ h5d_flags[2] = (int_f)H5D_CHUNKED;
+ h5d_flags[3] = (int_f)H5D_ALLOC_TIME_ERROR;
+ h5d_flags[4] = (int_f)H5D_ALLOC_TIME_DEFAULT;
+ h5d_flags[5] = (int_f)H5D_ALLOC_TIME_EARLY;
+ h5d_flags[6] = (int_f)H5D_ALLOC_TIME_LATE;
+ h5d_flags[7] = (int_f)H5D_ALLOC_TIME_INCR;
+ h5d_flags[8] = (int_f)H5D_SPACE_STATUS_ERROR;
+ h5d_flags[9] = (int_f)H5D_SPACE_STATUS_NOT_ALLOCATED;
h5d_flags[10] = (int_f)H5D_SPACE_STATUS_PART_ALLOCATED;
h5d_flags[11] = (int_f)H5D_SPACE_STATUS_ALLOCATED;
h5d_flags[12] = (int_f)H5D_FILL_TIME_ERROR;
@@ -407,9 +480,9 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_MIXED;
h5d_flags[24] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE;
-/*
- * H5E flags
- */
+ /*
+ * H5E flags
+ */
h5e_hid_flags[0] = (hid_t_f)H5E_DEFAULT;
h5e_flags[0] = (int_f)H5E_MAJOR;
@@ -417,21 +490,21 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5e_flags[2] = (int_f)H5E_WALK_UPWARD;
h5e_flags[3] = (int_f)H5E_WALK_DOWNWARD;
-/*
- * H5F flags
- *
- * H5F_ACC_DEBUG has no effect as of HDF5 1.8.16.
- */
- h5f_flags[0] = (int_f)H5F_ACC_RDWR;
- h5f_flags[1] = (int_f)H5F_ACC_RDONLY;
- h5f_flags[2] = (int_f)H5F_ACC_TRUNC;
- h5f_flags[3] = (int_f)H5F_ACC_EXCL;
- h5f_flags[4] = (int_f)H5F_ACC_DEBUG; /* nonfunctional */
- h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL;
- h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL;
- h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT;
- h5f_flags[8] = (int_f)H5F_CLOSE_WEAK;
- h5f_flags[9] = (int_f)H5F_CLOSE_SEMI;
+ /*
+ * H5F flags
+ *
+ * H5F_ACC_DEBUG has no effect as of HDF5 1.8.16.
+ */
+ h5f_flags[0] = (int_f)H5F_ACC_RDWR;
+ h5f_flags[1] = (int_f)H5F_ACC_RDONLY;
+ h5f_flags[2] = (int_f)H5F_ACC_TRUNC;
+ h5f_flags[3] = (int_f)H5F_ACC_EXCL;
+ h5f_flags[4] = (int_f)H5F_ACC_DEBUG; /* nonfunctional */
+ h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL;
+ h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL;
+ h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT;
+ h5f_flags[8] = (int_f)H5F_CLOSE_WEAK;
+ h5f_flags[9] = (int_f)H5F_CLOSE_SEMI;
h5f_flags[10] = (int_f)H5F_CLOSE_STRONG;
h5f_flags[11] = (int_f)H5F_OBJ_FILE;
h5f_flags[12] = (int_f)H5F_OBJ_DATASET;
@@ -442,24 +515,24 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5f_flags[17] = (int_f)H5F_LIBVER_LATEST;
h5f_flags[18] = (int_f)H5F_UNLIMITED;
-/*
- * H5FD flags
- */
- h5fd_flags[0] = (int_f)H5FD_MPIO_INDEPENDENT;
- h5fd_flags[1] = (int_f)H5FD_MPIO_COLLECTIVE;
- h5fd_flags[2] = (int_f)H5FD_MEM_NOLIST;
- h5fd_flags[3] = (int_f)H5FD_MEM_DEFAULT;
- h5fd_flags[4] = (int_f)H5FD_MEM_SUPER;
- h5fd_flags[5] = (int_f)H5FD_MEM_BTREE;
- h5fd_flags[6] = (int_f)H5FD_MEM_DRAW;
- h5fd_flags[7] = (int_f)H5FD_MEM_GHEAP;
- h5fd_flags[8] = (int_f)H5FD_MEM_LHEAP;
- h5fd_flags[9] = (int_f)H5FD_MEM_OHDR;
+ /*
+ * H5FD flags
+ */
+ h5fd_flags[0] = (int_f)H5FD_MPIO_INDEPENDENT;
+ h5fd_flags[1] = (int_f)H5FD_MPIO_COLLECTIVE;
+ h5fd_flags[2] = (int_f)H5FD_MEM_NOLIST;
+ h5fd_flags[3] = (int_f)H5FD_MEM_DEFAULT;
+ h5fd_flags[4] = (int_f)H5FD_MEM_SUPER;
+ h5fd_flags[5] = (int_f)H5FD_MEM_BTREE;
+ h5fd_flags[6] = (int_f)H5FD_MEM_DRAW;
+ h5fd_flags[7] = (int_f)H5FD_MEM_GHEAP;
+ h5fd_flags[8] = (int_f)H5FD_MEM_LHEAP;
+ h5fd_flags[9] = (int_f)H5FD_MEM_OHDR;
h5fd_flags[10] = (int_f)H5FD_MEM_NTYPES;
-/*
- * H5FD flags of type hid_t
- */
+ /*
+ * H5FD flags of type hid_t
+ */
h5fd_hid_flags[0] = (hid_t_f)H5FD_CORE;
h5fd_hid_flags[1] = (hid_t_f)H5FD_FAMILY;
h5fd_hid_flags[2] = (hid_t_f)H5FD_LOG;
@@ -468,26 +541,26 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5fd_hid_flags[5] = (hid_t_f)H5FD_SEC2;
h5fd_hid_flags[6] = (hid_t_f)H5FD_STDIO;
-/*
- * H5G flags
- */
- h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */
- h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */
- h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */
+ /*
+ * H5G flags
+ */
+ h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */
+ h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */
+ h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */
h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* H5G_TYPE is deprecated */
h5g_flags[4] = (int_f)H5L_SAME_LOC;
h5g_flags[5] = (int_f)H5L_TYPE_ERROR;
h5g_flags[6] = (int_f)H5L_TYPE_HARD;
h5g_flags[7] = (int_f)H5L_TYPE_SOFT;
- h5g_flags[8] = (int_f)H5G_STORAGE_TYPE_UNKNOWN;
- h5g_flags[9] = (int_f)H5G_STORAGE_TYPE_SYMBOL_TABLE;
+ h5g_flags[8] = (int_f)H5G_STORAGE_TYPE_UNKNOWN;
+ h5g_flags[9] = (int_f)H5G_STORAGE_TYPE_SYMBOL_TABLE;
h5g_flags[10] = (int_f)H5G_STORAGE_TYPE_COMPACT;
h5g_flags[11] = (int_f)H5G_STORAGE_TYPE_DENSE;
-/*
- * H5I flags
- */
+ /*
+ * H5I flags
+ */
h5i_flags[0] = (int_f)H5I_FILE;
h5i_flags[1] = (int_f)H5I_GROUP;
h5i_flags[2] = (int_f)H5I_DATATYPE;
@@ -495,213 +568,213 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5i_flags[4] = (int_f)H5I_DATASET;
h5i_flags[5] = (int_f)H5I_ATTR;
h5i_flags[6] = (int_f)H5I_BADID;
-/*
- * H5L flags
- */
+ /*
+ * H5L flags
+ */
h5l_flags[0] = (int_f)H5L_TYPE_ERROR;
h5l_flags[1] = (int_f)H5L_TYPE_HARD;
h5l_flags[2] = (int_f)H5L_TYPE_SOFT;
h5l_flags[3] = (int_f)H5L_TYPE_EXTERNAL;
- h5l_flags[4] = (int_f)H5L_SAME_LOC; /* Macro to indicate operation occurs on same location */
+ h5l_flags[4] = (int_f)H5L_SAME_LOC; /* Macro to indicate operation occurs on same location */
h5l_flags[5] = (int_f)H5L_LINK_CLASS_T_VERS; /* Current version of the H5L_class_t struct */
-/*
- * H5O flags
- */
+ /*
+ * H5O flags
+ */
-/* Flags for object copy (H5Ocopy) */
+ /* Flags for object copy (H5Ocopy) */
h5o_flags[0] = (int_f)H5O_COPY_SHALLOW_HIERARCHY_FLAG; /* Copy only immediate members */
- h5o_flags[1] = (int_f)H5O_COPY_EXPAND_SOFT_LINK_FLAG; /* Expand soft links into new objects */
- h5o_flags[2] = (int_f)H5O_COPY_EXPAND_EXT_LINK_FLAG; /* Expand external links into new objects */
- h5o_flags[3] = (int_f)H5O_COPY_EXPAND_REFERENCE_FLAG; /* Copy objects that are pointed by references */
- h5o_flags[4] = (int_f)H5O_COPY_WITHOUT_ATTR_FLAG; /* Copy object without copying attributes */
- h5o_flags[5] = (int_f)H5O_COPY_PRESERVE_NULL_FLAG; /* Copy NULL messages (empty space) */
+ h5o_flags[1] = (int_f)H5O_COPY_EXPAND_SOFT_LINK_FLAG; /* Expand soft links into new objects */
+ h5o_flags[2] = (int_f)H5O_COPY_EXPAND_EXT_LINK_FLAG; /* Expand external links into new objects */
+ h5o_flags[3] = (int_f)H5O_COPY_EXPAND_REFERENCE_FLAG; /* Copy objects that are pointed by references */
+ h5o_flags[4] = (int_f)H5O_COPY_WITHOUT_ATTR_FLAG; /* Copy object without copying attributes */
+ h5o_flags[5] = (int_f)H5O_COPY_PRESERVE_NULL_FLAG; /* Copy NULL messages (empty space) */
h5o_flags[6] = (int_f)H5O_COPY_ALL; /* All object copying flags (for internal checking) */
-/* Flags for shared message indexes.
- * Pass these flags in using the mesg_type_flags parameter in
- * H5P_set_shared_mesg_index.
- * (Developers: These flags correspond to object header message type IDs,
- * but we need to assign each kind of message to a different bit so that
- * one index can hold multiple types.)
- */
- h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
- h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
- h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
- h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
- h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
- h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
- h5o_flags[13] = (int_f)H5O_SHMESG_ALL_FLAG;
-
-/* Object header status flag definitions */
- h5o_flags[14] = (int_f)H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
- h5o_flags[15] = (int_f)H5O_HDR_ATTR_CRT_ORDER_TRACKED; /* Attribute creation order is tracked */
- h5o_flags[16] = (int_f)H5O_HDR_ATTR_CRT_ORDER_INDEXED; /* Attribute creation order has index */
- h5o_flags[17] = (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
- h5o_flags[18] = (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
- h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS;
-
-/* Maximum shared message values. Number of indexes is 8 to allow room to add
- * new types of messages.
- */
- h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
- h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
-
-/* Types of objects in file */
- h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
- h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
- h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */
- h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */
- h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */
-/*
- * H5P flags
- */
- h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
- h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
- h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
- h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
- h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
- h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
- h5p_flags[6] = (hid_t_f)H5P_ROOT;
- h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
- h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
- h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
- h5p_flags[10] = (hid_t_f)H5P_GROUP_ACCESS;
- h5p_flags[11] = (hid_t_f)H5P_DATATYPE_CREATE;
- h5p_flags[12] = (hid_t_f)H5P_DATATYPE_ACCESS;
- h5p_flags[13] = (hid_t_f)H5P_STRING_CREATE;
- h5p_flags[14] = (hid_t_f)H5P_ATTRIBUTE_CREATE;
- h5p_flags[15] = (hid_t_f)H5P_OBJECT_COPY;
- h5p_flags[16] = (hid_t_f)H5P_LINK_CREATE;
- h5p_flags[17] = (hid_t_f)H5P_LINK_ACCESS;
-
-
-/*
- * H5P integer flags
- */
- h5p_flags_int[0] = (int_f)H5P_CRT_ORDER_INDEXED;
- h5p_flags_int[1] = (int_f)H5P_CRT_ORDER_TRACKED;
+ /* Flags for shared message indexes.
+ * Pass these flags in using the mesg_type_flags parameter in
+ * H5P_set_shared_mesg_index.
+ * (Developers: These flags correspond to object header message type IDs,
+ * but we need to assign each kind of message to a different bit so that
+ * one index can hold multiple types.)
+ */
+ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
+ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
+ h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
+ h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
+ h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
+ h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
+ h5o_flags[13] = (int_f)H5O_SHMESG_ALL_FLAG;
+
+ /* Object header status flag definitions */
+ h5o_flags[14] = (int_f)
+ H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
+ h5o_flags[15] = (int_f)H5O_HDR_ATTR_CRT_ORDER_TRACKED; /* Attribute creation order is tracked */
+ h5o_flags[16] = (int_f)H5O_HDR_ATTR_CRT_ORDER_INDEXED; /* Attribute creation order has index */
+ h5o_flags[17] =
+ (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
+ h5o_flags[18] =
+ (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
+ h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS;
+
+ /* Maximum shared message values. Number of indexes is 8 to allow room to add
+ * new types of messages.
+ */
+ h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
+ h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
+
+ /* Types of objects in file */
+ h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
+ h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
+ h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */
+ h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */
+ h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */
+ /*
+ * H5P flags
+ */
+ h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
+ h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
+ h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
+ h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
+ h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
+ h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
+ h5p_flags[6] = (hid_t_f)H5P_ROOT;
+ h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
+ h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
+ h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
+ h5p_flags[10] = (hid_t_f)H5P_GROUP_ACCESS;
+ h5p_flags[11] = (hid_t_f)H5P_DATATYPE_CREATE;
+ h5p_flags[12] = (hid_t_f)H5P_DATATYPE_ACCESS;
+ h5p_flags[13] = (hid_t_f)H5P_STRING_CREATE;
+ h5p_flags[14] = (hid_t_f)H5P_ATTRIBUTE_CREATE;
+ h5p_flags[15] = (hid_t_f)H5P_OBJECT_COPY;
+ h5p_flags[16] = (hid_t_f)H5P_LINK_CREATE;
+ h5p_flags[17] = (hid_t_f)H5P_LINK_ACCESS;
-/*
- * H5R flags
- */
+ /*
+ * H5P integer flags
+ */
+ h5p_flags_int[0] = (int_f)H5P_CRT_ORDER_INDEXED;
+ h5p_flags_int[1] = (int_f)H5P_CRT_ORDER_TRACKED;
- h5r_flags[0] = (int_f)H5R_OBJECT;
- h5r_flags[1] = (int_f)H5R_DATASET_REGION;
+ /*
+ * H5R flags
+ */
-/*
- * H5S flags
- */
- h5s_flags[0] = (int_f)H5S_SCALAR;
- h5s_flags[1] = (int_f)H5S_SIMPLE;
- h5s_flags[2] = (int_f)H5S_NULL;
- h5s_flags[3] = (int_f)H5S_SELECT_SET;
- h5s_flags[4] = (int_f)H5S_SELECT_OR;
- h5s_flags[5] = (int_f)H5S_ALL;
-
- h5s_flags[6] = (int_f)H5S_SELECT_NOOP;
- h5s_flags[7] = (int_f)H5S_SELECT_AND;
- h5s_flags[8] = (int_f)H5S_SELECT_XOR;
- h5s_flags[9] = (int_f)H5S_SELECT_NOTB;
- h5s_flags[10] = (int_f)H5S_SELECT_NOTA;
- h5s_flags[11] = (int_f)H5S_SELECT_APPEND;
- h5s_flags[12] = (int_f)H5S_SELECT_PREPEND;
- h5s_flags[13] = (int_f)H5S_SELECT_INVALID;
-
- h5s_flags[14] = (int_f)H5S_SEL_ERROR;
- h5s_flags[15] = (int_f)H5S_SEL_NONE;
- h5s_flags[16] = (int_f)H5S_SEL_POINTS;
- h5s_flags[17] = (int_f)H5S_SEL_HYPERSLABS;
- h5s_flags[18] = (int_f)H5S_SEL_ALL;
-
- h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED;
-
-/*
- * H5T flags
- */
- h5t_flags[0] = (int_f)H5T_NO_CLASS;
- h5t_flags[1] = (int_f)H5T_INTEGER;
- h5t_flags[2] = (int_f)H5T_FLOAT;
- h5t_flags[3] = (int_f)H5T_TIME;
- h5t_flags[4] = (int_f)H5T_STRING;
- h5t_flags[5] = (int_f)H5T_BITFIELD;
- h5t_flags[6] = (int_f)H5T_OPAQUE;
- h5t_flags[7] = (int_f)H5T_COMPOUND;
- h5t_flags[8] = (int_f)H5T_REFERENCE;
- h5t_flags[9] = (int_f)H5T_ENUM;
- h5t_flags[10] = (int_f)H5T_ORDER_LE;
- h5t_flags[11] = (int_f)H5T_ORDER_BE;
- h5t_flags[12] = (int_f)H5T_ORDER_MIXED;
- h5t_flags[13] = (int_f)H5T_ORDER_VAX;
- h5t_flags[14] = (int_f)H5T_ORDER_NONE;
- h5t_flags[15] = (int_f)H5T_PAD_ZERO;
- h5t_flags[16] = (int_f)H5T_PAD_ONE;
- h5t_flags[17] = (int_f)H5T_PAD_BACKGROUND;
- h5t_flags[18] = (int_f)H5T_PAD_ERROR;
- h5t_flags[19] = (int_f)H5T_SGN_NONE;
- h5t_flags[20] = (int_f)H5T_SGN_2;
- h5t_flags[21] = (int_f)H5T_SGN_ERROR;
- h5t_flags[22] = (int_f)H5T_NORM_IMPLIED;
- h5t_flags[23] = (int_f)H5T_NORM_MSBSET;
- h5t_flags[24] = (int_f)H5T_NORM_NONE;
- h5t_flags[25] = (int_f)H5T_CSET_ASCII;
- h5t_flags[26] = (int_f)H5T_CSET_UTF8;
- h5t_flags[27] = (int_f)H5T_STR_NULLTERM;
- h5t_flags[28] = (int_f)H5T_STR_NULLPAD;
- h5t_flags[29] = (int_f)H5T_STR_SPACEPAD;
- h5t_flags[30] = (int_f)H5T_STR_ERROR;
- h5t_flags[31] = (int_f)H5T_VLEN;
- h5t_flags[32] = (int_f)H5T_ARRAY;
- h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
- h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
-
-/*
- * H5Z flags
- */
- h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
- h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
- h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
- h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
- h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
- h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
- h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
- h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
- h5z_flags[8] = (int_f)H5Z_NO_EDC;
- h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
- h5z_flags[10] = (int_f)H5Z_FLAG_OPTIONAL;
- h5z_flags[11] = (int_f)H5Z_FILTER_CONFIG_ENCODE_ENABLED;
- h5z_flags[12] = (int_f)H5Z_FILTER_CONFIG_DECODE_ENABLED;
- h5z_flags[13] = (int_f)H5Z_FILTER_ALL;
- h5z_flags[14] = (int_f)H5Z_FILTER_NBIT;
- h5z_flags[15] = (int_f)H5Z_FILTER_SCALEOFFSET;
- h5z_flags[16] = (int_f)H5Z_SO_FLOAT_DSCALE;
- h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
- h5z_flags[18] = (int_f)H5Z_SO_INT;
- h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
-/*
- * H5A flags
- */
+ h5r_flags[0] = (int_f)H5R_OBJECT;
+ h5r_flags[1] = (int_f)H5R_DATASET_REGION;
+ /*
+ * H5S flags
+ */
+ h5s_flags[0] = (int_f)H5S_SCALAR;
+ h5s_flags[1] = (int_f)H5S_SIMPLE;
+ h5s_flags[2] = (int_f)H5S_NULL;
+ h5s_flags[3] = (int_f)H5S_SELECT_SET;
+ h5s_flags[4] = (int_f)H5S_SELECT_OR;
+ h5s_flags[5] = (int_f)H5S_ALL;
+
+ h5s_flags[6] = (int_f)H5S_SELECT_NOOP;
+ h5s_flags[7] = (int_f)H5S_SELECT_AND;
+ h5s_flags[8] = (int_f)H5S_SELECT_XOR;
+ h5s_flags[9] = (int_f)H5S_SELECT_NOTB;
+ h5s_flags[10] = (int_f)H5S_SELECT_NOTA;
+ h5s_flags[11] = (int_f)H5S_SELECT_APPEND;
+ h5s_flags[12] = (int_f)H5S_SELECT_PREPEND;
+ h5s_flags[13] = (int_f)H5S_SELECT_INVALID;
+
+ h5s_flags[14] = (int_f)H5S_SEL_ERROR;
+ h5s_flags[15] = (int_f)H5S_SEL_NONE;
+ h5s_flags[16] = (int_f)H5S_SEL_POINTS;
+ h5s_flags[17] = (int_f)H5S_SEL_HYPERSLABS;
+ h5s_flags[18] = (int_f)H5S_SEL_ALL;
+
+ h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED;
-/*
- * H5 Generic flags introduced in version 1.8 -MSB-
- */
+ /*
+ * H5T flags
+ */
+ h5t_flags[0] = (int_f)H5T_NO_CLASS;
+ h5t_flags[1] = (int_f)H5T_INTEGER;
+ h5t_flags[2] = (int_f)H5T_FLOAT;
+ h5t_flags[3] = (int_f)H5T_TIME;
+ h5t_flags[4] = (int_f)H5T_STRING;
+ h5t_flags[5] = (int_f)H5T_BITFIELD;
+ h5t_flags[6] = (int_f)H5T_OPAQUE;
+ h5t_flags[7] = (int_f)H5T_COMPOUND;
+ h5t_flags[8] = (int_f)H5T_REFERENCE;
+ h5t_flags[9] = (int_f)H5T_ENUM;
+ h5t_flags[10] = (int_f)H5T_ORDER_LE;
+ h5t_flags[11] = (int_f)H5T_ORDER_BE;
+ h5t_flags[12] = (int_f)H5T_ORDER_MIXED;
+ h5t_flags[13] = (int_f)H5T_ORDER_VAX;
+ h5t_flags[14] = (int_f)H5T_ORDER_NONE;
+ h5t_flags[15] = (int_f)H5T_PAD_ZERO;
+ h5t_flags[16] = (int_f)H5T_PAD_ONE;
+ h5t_flags[17] = (int_f)H5T_PAD_BACKGROUND;
+ h5t_flags[18] = (int_f)H5T_PAD_ERROR;
+ h5t_flags[19] = (int_f)H5T_SGN_NONE;
+ h5t_flags[20] = (int_f)H5T_SGN_2;
+ h5t_flags[21] = (int_f)H5T_SGN_ERROR;
+ h5t_flags[22] = (int_f)H5T_NORM_IMPLIED;
+ h5t_flags[23] = (int_f)H5T_NORM_MSBSET;
+ h5t_flags[24] = (int_f)H5T_NORM_NONE;
+ h5t_flags[25] = (int_f)H5T_CSET_ASCII;
+ h5t_flags[26] = (int_f)H5T_CSET_UTF8;
+ h5t_flags[27] = (int_f)H5T_STR_NULLTERM;
+ h5t_flags[28] = (int_f)H5T_STR_NULLPAD;
+ h5t_flags[29] = (int_f)H5T_STR_SPACEPAD;
+ h5t_flags[30] = (int_f)H5T_STR_ERROR;
+ h5t_flags[31] = (int_f)H5T_VLEN;
+ h5t_flags[32] = (int_f)H5T_ARRAY;
+ h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
+ h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
+
+ /*
+ * H5Z flags
+ */
+ h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
+ h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
+ h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
+ h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
+ h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
+ h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
+ h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
+ h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
+ h5z_flags[8] = (int_f)H5Z_NO_EDC;
+ h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
+ h5z_flags[10] = (int_f)H5Z_FLAG_OPTIONAL;
+ h5z_flags[11] = (int_f)H5Z_FILTER_CONFIG_ENCODE_ENABLED;
+ h5z_flags[12] = (int_f)H5Z_FILTER_CONFIG_DECODE_ENABLED;
+ h5z_flags[13] = (int_f)H5Z_FILTER_ALL;
+ h5z_flags[14] = (int_f)H5Z_FILTER_NBIT;
+ h5z_flags[15] = (int_f)H5Z_FILTER_SCALEOFFSET;
+ h5z_flags[16] = (int_f)H5Z_SO_FLOAT_DSCALE;
+ h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
+ h5z_flags[18] = (int_f)H5Z_SO_INT;
+ h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
+ /*
+ * H5A flags
+ */
- /* H5_index_t enum struct */
+ /*
+ * H5 Generic flags introduced in version 1.8 -MSB-
+ */
- h5_generic_flags[0] = (int_f)H5_INDEX_UNKNOWN; /* Unknown index type */
- h5_generic_flags[1] = (int_f)H5_INDEX_NAME; /* Index on names */
- h5_generic_flags[2] = (int_f)H5_INDEX_CRT_ORDER; /* Index on creation order */
- h5_generic_flags[3] = (int_f)H5_INDEX_N; /* Index on creation order */
+ /* H5_index_t enum struct */
+ h5_generic_flags[0] = (int_f)H5_INDEX_UNKNOWN; /* Unknown index type */
+ h5_generic_flags[1] = (int_f)H5_INDEX_NAME; /* Index on names */
+ h5_generic_flags[2] = (int_f)H5_INDEX_CRT_ORDER; /* Index on creation order */
+ h5_generic_flags[3] = (int_f)H5_INDEX_N; /* Index on creation order */
- /* H5_iter_order_t enum struct */
+ /* H5_iter_order_t enum struct */
- h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
- h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
- h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
- h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
- h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+ h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
+ h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
+ h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
+ h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
+ h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
ret_value = 0;
return ret_value;
@@ -711,12 +784,12 @@ int_f
nh5init1_flags_c(int_f *h5lib_flags)
/******/
{
- int ret_value = -1;
- unsigned prm_1 = H5_SZIP_EC_OPTION_MASK;
- unsigned prm_2 = H5_SZIP_NN_OPTION_MASK;
- h5lib_flags[0] = (int_f)prm_1;
- h5lib_flags[1] = (int_f)prm_2;
- ret_value = 0;
+ int ret_value = -1;
+ unsigned prm_1 = H5_SZIP_EC_OPTION_MASK;
+ unsigned prm_2 = H5_SZIP_NN_OPTION_MASK;
+ h5lib_flags[0] = (int_f)prm_1;
+ h5lib_flags[1] = (int_f)prm_2;
+ ret_value = 0;
return ret_value;
}
@@ -739,7 +812,8 @@ nh5open_c(void)
{
int ret_value = -1;
- if (H5open() < 0) return ret_value;
+ if (H5open() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -760,7 +834,8 @@ nh5close_c(void)
{
int ret_value = -1;
- if (H5close() < 0) return ret_value;
+ if (H5close() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -792,14 +867,15 @@ nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
unsigned c_majnum, c_minnum, c_relnum;
- if (H5get_libversion(&c_majnum, &c_minnum, &c_relnum) < 0) return ret_value;
+ if (H5get_libversion(&c_majnum, &c_minnum, &c_relnum) < 0)
+ return ret_value;
- *majnum = (int_f)c_majnum;
- *minnum = (int_f)c_minnum;
- *relnum = (int_f)c_relnum;
+ *majnum = (int_f)c_majnum;
+ *minnum = (int_f)c_minnum;
+ *relnum = (int_f)c_relnum;
ret_value = 0;
return ret_value;
}
@@ -829,12 +905,12 @@ int_f
nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
unsigned c_majnum, c_minnum, c_relnum;
- c_majnum = (unsigned) *majnum;
- c_minnum = (unsigned) *minnum;
- c_relnum = (unsigned) *relnum;
+ c_majnum = (unsigned)*majnum;
+ c_minnum = (unsigned)*minnum;
+ c_relnum = (unsigned)*relnum;
H5check_version(c_majnum, c_minnum, c_relnum);
@@ -860,7 +936,8 @@ nh5garbage_collect_c(void)
{
int ret_value = -1;
- if (H5garbage_collect() < 0) return ret_value;
+ if (H5garbage_collect() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -883,8 +960,8 @@ nh5dont_atexit_c(void)
{
int ret_value = -1;
- if (H5dont_atexit() < 0) return ret_value;
+ if (H5dont_atexit() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
-
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index e9d228c..0d2dd34 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -12,18 +12,18 @@
! H5_ff_F03.f90 is compiled, else H5_ff_F90.f90,
! which is just a place holder blank module, is compiled.
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! *** IMPORTANT ***
diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90
index a8ab400..6bdf0f7 100644
--- a/fortran/src/H5_ff_F03.f90
+++ b/fortran/src/H5_ff_F03.f90
@@ -10,16 +10,16 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5_ff_F90.f90 b/fortran/src/H5_ff_F90.f90
index d9ca92b..5a05e0c 100644
--- a/fortran/src/H5_ff_F90.f90
+++ b/fortran/src/H5_ff_F90.f90
@@ -11,18 +11,18 @@
! It is compiled in place of H5_ff_F03.f90 and is empty.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h
index 398c41a..aa576fe 100644
--- a/fortran/src/H5f90.h
+++ b/fortran/src/H5f90.h
@@ -6,12 +6,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90_H
#define _H5f90_H
@@ -21,9 +20,9 @@
#include "H5f90proto.h"
/* Constants used in H5Rff.f90 and H5Rf.c files */
-#define REF_REG_BUF_LEN_F 3
+#define REF_REG_BUF_LEN_F 3
/* Constants used in H5Gf.c files */
#define OBJECT_NAMELEN_DEFAULT_F -1
-#define H5_MAX(a,b) (((a)>(b)) ? (a) : (b))
+#define H5_MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif /* _H5f90_H */
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index d4e3f9a..bb76a42 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -21,18 +21,18 @@
! H5FORTRAN_TYPES - This module is generated at run time. See
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! AUTHOR
! Elena Pourmal
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index 7d066cd..57beaad 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -6,12 +6,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90i_H
#define _H5f90i_H
@@ -26,7 +25,7 @@
*/
#define _fcdtocp(desc) (desc)
-#if (defined (UNICOS) || defined (_UNICOS)) && !defined(__crayx1)
+#if (defined(UNICOS) || defined(_UNICOS)) && !defined(__crayx1)
#include <fortran.h>
@@ -34,7 +33,7 @@
#else
-typedef char *_fcd;
+typedef char *_fcd;
#endif
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index 74d5ffc..2a5006a 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -14,13 +14,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include <ctype.h>
#include <stddef.h>
@@ -45,17 +45,17 @@ char *
HD5f2cstring(_fcd fdesc, size_t len)
/******/
{
- char *cstr; /* C string to return */
- char *str; /* Pointer to FORTRAN string */
- int i; /* Local index variable */
+ char *cstr; /* C string to return */
+ char *str; /* Pointer to FORTRAN string */
+ int i; /* Local index variable */
/* Search for the end of the string */
str = _fcdtocp(fdesc);
- for(i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
+ for (i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
/*EMPTY*/;
/* Allocate C string */
- if(NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
+ if (NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
return NULL;
/* Copy text from FORTRAN to C string */
@@ -65,7 +65,7 @@ HD5f2cstring(_fcd fdesc, size_t len)
cstr[i + 1] = '\0';
return cstr;
-} /* HD5f2cstring */
+} /* HD5f2cstring */
/****if* H5f90kit/HD5packFstring
* NAME
@@ -91,15 +91,14 @@ void
HD5packFstring(char *src, char *dest, size_t dst_len)
/******/
{
- size_t src_len=HDstrlen(src);
+ size_t src_len = HDstrlen(src);
/* Copy over the string information, up to the length of the src */
/* (Don't copy the NUL terminator from the C string to the FORTRAN string */
- HDmemcpy(dest,src,MIN(src_len,dst_len));
+ HDmemcpy(dest, src, MIN(src_len, dst_len));
/* Pad out any remaining space in the FORTRAN string with ' 's */
- if(src_len<dst_len)
- HDmemset(&dest[src_len],' ',dst_len-src_len);
-
-} /* HD5packFstring */
+ if (src_len < dst_len)
+ HDmemset(&dest[src_len], ' ', dst_len - src_len);
+} /* HD5packFstring */
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 7aef67c..ed2b8c9 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -6,847 +6,956 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90proto_H
#define _H5f90proto_H
#include "H5public.h"
-H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len);
-H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
-
+H5_FCDLL char *HD5f2cstring(_fcd fdesc, size_t len);
+H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
/*
- * Storage info struct used by H5O_info_t and H5F_info_t
+ * Storage info struct used by H5O_info_t and H5F_info_t
* interoperable with Fortran.
*/
typedef struct H5_ih_info_t_f {
- hsize_t index_size; /* btree and/or list */
- hsize_t heap_size;
+ hsize_t index_size; /* btree and/or list */
+ hsize_t heap_size;
} H5_ih_info_t_f;
-/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
+/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
* interoperable with Fortran.
*/
typedef struct H5O_hdr_info_t_f {
- int_f version; /* Version number of header format in file */
- int_f nmesgs; /* Number of object header messages */
- int_f nchunks; /* Number of object header chunks */
- int_f flags; /* Object header status flags */
+ int_f version; /* Version number of header format in file */
+ int_f nmesgs; /* Number of object header messages */
+ int_f nchunks; /* Number of object header chunks */
+ int_f flags; /* Object header status flags */
struct {
- hsize_t total; /* Total space for storing object header in file */
- hsize_t meta; /* Space within header for object header metadata information */
- hsize_t mesg; /* Space within header for actual message information */
- hsize_t free; /* Free space within object header */
+ hsize_t total; /* Total space for storing object header in file */
+ hsize_t meta; /* Space within header for object header metadata information */
+ hsize_t mesg; /* Space within header for actual message information */
+ hsize_t free; /* Free space within object header */
} space;
struct {
- uint64_t present; /* Flags to indicate presence of message type in header */
- uint64_t shared; /* Flags to indicate message type is shared in header */
+ uint64_t present; /* Flags to indicate presence of message type in header */
+ uint64_t shared; /* Flags to indicate message type is shared in header */
} mesg;
} H5O_hdr_info_t_f;
-/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
+/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
* interoperable with Fortran.
*/
typedef struct H5O_info_t_f {
- unsigned long fileno; /* File number that object is located in */
- haddr_t_f addr; /* Object address in file */
- int type; /* Basic object type (group, dataset, etc.) */
- int_f rc; /* Reference count of object */
- int_f atime[8]; /* Access time */
- int_f mtime[8]; /* Modification time */
- int_f ctime[8]; /* Change time */
- int_f btime[8]; /* Birth time */
- hsize_t num_attrs; /* # of attributes attached to object */
- H5O_hdr_info_t_f hdr; /* Object header information */
+ unsigned long fileno; /* File number that object is located in */
+ haddr_t_f addr; /* Object address in file */
+ int type; /* Basic object type (group, dataset, etc.) */
+ int_f rc; /* Reference count of object */
+ int_f atime[8]; /* Access time */
+ int_f mtime[8]; /* Modification time */
+ int_f ctime[8]; /* Change time */
+ int_f btime[8]; /* Birth time */
+ hsize_t num_attrs; /* # of attributes attached to object */
+ H5O_hdr_info_t_f hdr; /* Object header information */
/* Extra metadata storage for obj & attributes */
struct {
- H5_ih_info_t_f obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- H5_ih_info_t_f attr; /* v2 B-tree & heap for attributes */
+ H5_ih_info_t_f obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ H5_ih_info_t_f attr; /* v2 B-tree & heap for attributes */
} meta_size;
} H5O_info_t_f;
-
/*
* Functions from H5Ff.c
*/
-#define nh5fcreate_c H5_FC_FUNC_(h5fcreate_c, H5FCREATE_C)
-#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C)
-#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C)
-#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C)
-#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C)
-#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C)
-#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C)
-#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C)
-#define nh5fget_create_plist_c H5_FC_FUNC_(h5fget_create_plist_c, H5FGET_CREATE_PLIST_C)
-#define nh5fget_access_plist_c H5_FC_FUNC_(h5fget_access_plist_c, H5FGET_ACCESS_PLIST_C)
-#define nh5fget_obj_count_c H5_FC_FUNC_(h5fget_obj_count_c, H5FGET_OBJ_COUNT_C)
-#define nh5fget_obj_ids_c H5_FC_FUNC_(h5fget_obj_ids_c, H5FGET_OBJ_IDS_C)
-#define nh5fget_freespace_c H5_FC_FUNC_(h5fget_freespace_c, H5FGET_FREESPACE_C)
-#define nh5fget_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C)
-#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C)
+#define nh5fcreate_c H5_FC_FUNC_(h5fcreate_c, H5FCREATE_C)
+#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C)
+#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C)
+#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C)
+#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C)
+#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C)
+#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C)
+#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C)
+#define nh5fget_create_plist_c H5_FC_FUNC_(h5fget_create_plist_c, H5FGET_CREATE_PLIST_C)
+#define nh5fget_access_plist_c H5_FC_FUNC_(h5fget_access_plist_c, H5FGET_ACCESS_PLIST_C)
+#define nh5fget_obj_count_c H5_FC_FUNC_(h5fget_obj_count_c, H5FGET_OBJ_COUNT_C)
+#define nh5fget_obj_ids_c H5_FC_FUNC_(h5fget_obj_ids_c, H5FGET_OBJ_IDS_C)
+#define nh5fget_freespace_c H5_FC_FUNC_(h5fget_freespace_c, H5FGET_FREESPACE_C)
+#define nh5fget_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C)
+#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C)
-H5_FCDLL int_f nh5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id);
-H5_FCDLL int_f nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id);
-H5_FCDLL int_f nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag);
-H5_FCDLL int_f nh5fclose_c (hid_t_f *file_id);
-H5_FCDLL int_f nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp);
-H5_FCDLL int_f nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen);
-H5_FCDLL int_f nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2);
-H5_FCDLL int_f nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id);
-H5_FCDLL int_f nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id);
-H5_FCDLL int_f nh5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count);
-H5_FCDLL int_f nh5fget_obj_ids_c (hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs);
-H5_FCDLL int_f nh5fget_freespace_c (hid_t_f *file_id, hssize_t_f *free_space);
+H5_FCDLL int_f nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp,
+ hid_t_f *acc_prp, hid_t_f *file_id);
+H5_FCDLL int_f nh5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id);
+H5_FCDLL int_f nh5fis_hdf5_c(_fcd name, int_f *namelen, int_f *flag);
+H5_FCDLL int_f nh5fclose_c(hid_t_f *file_id);
+H5_FCDLL int_f nh5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id,
+ hid_t_f *acc_prp);
+H5_FCDLL int_f nh5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen);
+H5_FCDLL int_f nh5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2);
+H5_FCDLL int_f nh5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id);
+H5_FCDLL int_f nh5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id);
+H5_FCDLL int_f nh5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count);
+H5_FCDLL int_f nh5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids,
+ size_t_f *num_objs);
+H5_FCDLL int_f nh5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space);
H5_FCDLL int_f h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req);
-H5_FCDLL int_f nh5fflush_c (hid_t_f *obj_id, int_f *scope);
+H5_FCDLL int_f nh5fflush_c(hid_t_f *obj_id, int_f *scope);
H5_FCDLL int_f nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen);
H5_FCDLL int_f nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size);
/*
* Functions from H5Sf.c
*/
-#define nh5screate_simple_c H5_FC_FUNC_(h5screate_simple_c, H5SCREATE_SIMPLE_C)
-#define nh5sclose_c H5_FC_FUNC_(h5sclose_c, H5SCLOSE_C)
-#define nh5screate_c H5_FC_FUNC_(h5screate_c, H5SCREATE_C)
-#define nh5scopy_c H5_FC_FUNC_(h5scopy_c, H5SCOPY_C)
-#define nh5sget_select_hyper_nblocks_c H5_FC_FUNC_(h5sget_select_hyper_nblocks_c, H5SGET_SELECT_HYPER_NBLOCKS_C)
-#define nh5sget_select_hyper_blocklist_c H5_FC_FUNC_(h5sget_select_hyper_blocklist_c, H5SGET_SELECT_HYPER_BLOCKLIST_C)
+#define nh5screate_simple_c H5_FC_FUNC_(h5screate_simple_c, H5SCREATE_SIMPLE_C)
+#define nh5sclose_c H5_FC_FUNC_(h5sclose_c, H5SCLOSE_C)
+#define nh5screate_c H5_FC_FUNC_(h5screate_c, H5SCREATE_C)
+#define nh5scopy_c H5_FC_FUNC_(h5scopy_c, H5SCOPY_C)
+#define nh5sget_select_hyper_nblocks_c \
+ H5_FC_FUNC_(h5sget_select_hyper_nblocks_c, H5SGET_SELECT_HYPER_NBLOCKS_C)
+#define nh5sget_select_hyper_blocklist_c \
+ H5_FC_FUNC_(h5sget_select_hyper_blocklist_c, H5SGET_SELECT_HYPER_BLOCKLIST_C)
#define nh5sget_select_elem_npoints_c H5_FC_FUNC_(h5sget_select_elem_npoints_c, H5SGET_SELECT_ELEM_NPOINTS_C)
-#define nh5sget_select_elem_pointlist_c H5_FC_FUNC_(h5sget_select_elem_pointlist_c, H5SGET_SELECT_ELEM_POINTLIST_C)
-#define nh5sget_select_bounds_c H5_FC_FUNC_(h5sget_select_bounds_c, H5SGET_SELECT_BOUNDS_C)
-#define nh5sselect_all_c H5_FC_FUNC_(h5sselect_all_c, H5SSELECT_ALL_C)
-#define nh5sselect_none_c H5_FC_FUNC_(h5sselect_none_c, H5SSELECT_NONE_C)
-#define nh5sselect_valid_c H5_FC_FUNC_(h5sselect_valid_c, H5SSELECT_VALID_C)
-#define nh5sget_simple_extent_npoints_c H5_FC_FUNC_(h5sget_simple_extent_npoints_c, H5SGET_SIMPLE_EXTENT_NPOINTS_C)
-#define nh5sget_select_npoints_c H5_FC_FUNC_(h5sget_select_npoints_c, H5SGET_SELECT_NPOINTS_C)
+#define nh5sget_select_elem_pointlist_c \
+ H5_FC_FUNC_(h5sget_select_elem_pointlist_c, H5SGET_SELECT_ELEM_POINTLIST_C)
+#define nh5sget_select_bounds_c H5_FC_FUNC_(h5sget_select_bounds_c, H5SGET_SELECT_BOUNDS_C)
+#define nh5sselect_all_c H5_FC_FUNC_(h5sselect_all_c, H5SSELECT_ALL_C)
+#define nh5sselect_none_c H5_FC_FUNC_(h5sselect_none_c, H5SSELECT_NONE_C)
+#define nh5sselect_valid_c H5_FC_FUNC_(h5sselect_valid_c, H5SSELECT_VALID_C)
+#define nh5sget_simple_extent_npoints_c \
+ H5_FC_FUNC_(h5sget_simple_extent_npoints_c, H5SGET_SIMPLE_EXTENT_NPOINTS_C)
+#define nh5sget_select_npoints_c H5_FC_FUNC_(h5sget_select_npoints_c, H5SGET_SELECT_NPOINTS_C)
#define nh5sget_simple_extent_ndims_c H5_FC_FUNC_(h5sget_simple_extent_ndims_c, H5SGET_SIMPLE_EXTENT_NDIMS_C)
#define nh5sget_simple_extent_type_c H5_FC_FUNC_(h5sget_simple_extent_type_c, H5SGET_SIMPLE_EXTENT_TYPE_C)
-#define nh5soffset_simple_c H5_FC_FUNC_(h5soffset_simple_c, H5SOFFSET_SIMPLE_C)
-#define nh5sset_extent_simple_c H5_FC_FUNC_(h5sset_extent_simple_c, H5SSET_EXTENT_SIMPLE_C)
-#define nh5sis_simple_c H5_FC_FUNC_(h5sis_simple_c, H5SIS_SIMPLE_C)
-#define nh5sextent_class_c H5_FC_FUNC_(h5sextent_class_c, H5SEXTENT_CLASS_C)
-#define nh5sget_simple_extent_dims_c H5_FC_FUNC_(h5sget_simple_extent_dims_c, H5SGET_SIMPLE_EXTENT_DIMS_C)
-#define nh5sextent_copy_c H5_FC_FUNC_(h5sextent_copy_c, H5SEXTENT_COPY_C)
-#define nh5sset_extent_none_c H5_FC_FUNC_(h5sset_extent_none_c, H5SSET_EXTENT_NONE_C)
-#define nh5sselect_hyperslab_c H5_FC_FUNC_(h5sselect_hyperslab_c, H5SSELECT_HYPERSLAB_C)
-#define nh5scombine_hyperslab_c H5_FC_FUNC_(h5scombine_hyperslab_c, H5SCOMBINE_HYPERSLAB_C)
-#define nh5scombine_select_c H5_FC_FUNC_(h5scombine_select_c, H5SCOMBINE_SELECT_C)
-#define nh5sselect_select_c H5_FC_FUNC_(h5sselect_select_c, H5SSELECT_SELECT_C)
-#define nh5sget_select_type_c H5_FC_FUNC_(h5sget_select_type_c, H5SGET_SELECT_TYPE_C)
-#define nh5sselect_elements_c H5_FC_FUNC_(h5sselect_elements_c, H5SSELECT_ELEMENTS_C)
-#define nh5sdecode_c H5_FC_FUNC_(h5sdecode_c, H5SDECODE_C)
-#define nh5sencode_c H5_FC_FUNC_(h5sencode_c, H5SENCODE_C)
-#define nh5sextent_equal_c H5_FC_FUNC_(h5sextent_equal_c, H5SEXTENT_EQUAL_C)
+#define nh5soffset_simple_c H5_FC_FUNC_(h5soffset_simple_c, H5SOFFSET_SIMPLE_C)
+#define nh5sset_extent_simple_c H5_FC_FUNC_(h5sset_extent_simple_c, H5SSET_EXTENT_SIMPLE_C)
+#define nh5sis_simple_c H5_FC_FUNC_(h5sis_simple_c, H5SIS_SIMPLE_C)
+#define nh5sextent_class_c H5_FC_FUNC_(h5sextent_class_c, H5SEXTENT_CLASS_C)
+#define nh5sget_simple_extent_dims_c H5_FC_FUNC_(h5sget_simple_extent_dims_c, H5SGET_SIMPLE_EXTENT_DIMS_C)
+#define nh5sextent_copy_c H5_FC_FUNC_(h5sextent_copy_c, H5SEXTENT_COPY_C)
+#define nh5sset_extent_none_c H5_FC_FUNC_(h5sset_extent_none_c, H5SSET_EXTENT_NONE_C)
+#define nh5sselect_hyperslab_c H5_FC_FUNC_(h5sselect_hyperslab_c, H5SSELECT_HYPERSLAB_C)
+#define nh5scombine_hyperslab_c H5_FC_FUNC_(h5scombine_hyperslab_c, H5SCOMBINE_HYPERSLAB_C)
+#define nh5scombine_select_c H5_FC_FUNC_(h5scombine_select_c, H5SCOMBINE_SELECT_C)
+#define nh5sselect_select_c H5_FC_FUNC_(h5sselect_select_c, H5SSELECT_SELECT_C)
+#define nh5sget_select_type_c H5_FC_FUNC_(h5sget_select_type_c, H5SGET_SELECT_TYPE_C)
+#define nh5sselect_elements_c H5_FC_FUNC_(h5sselect_elements_c, H5SSELECT_ELEMENTS_C)
+#define nh5sdecode_c H5_FC_FUNC_(h5sdecode_c, H5SDECODE_C)
+#define nh5sencode_c H5_FC_FUNC_(h5sencode_c, H5SENCODE_C)
+#define nh5sextent_equal_c H5_FC_FUNC_(h5sextent_equal_c, H5SEXTENT_EQUAL_C)
-H5_FCDLL int_f nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id );
-H5_FCDLL int_f nh5sclose_c ( hid_t_f *space_id );
-H5_FCDLL int_f nh5screate_c ( int_f *classtype, hid_t_f *space_id );
-H5_FCDLL int_f nh5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id);
-H5_FCDLL int_f nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks);
-H5_FCDLL int_f nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf);
-H5_FCDLL int_f nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end);
-H5_FCDLL int_f nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points);
-H5_FCDLL int_f nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf);
-H5_FCDLL int_f nh5sselect_all_c ( hid_t_f *space_id );
-H5_FCDLL int_f nh5sselect_none_c ( hid_t_f *space_id );
-H5_FCDLL int_f nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag );
-H5_FCDLL int_f nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints );
-H5_FCDLL int_f nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints );
-H5_FCDLL int_f nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims );
-H5_FCDLL int_f nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype);
-H5_FCDLL int_f nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset);
-H5_FCDLL int_f nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size);
-H5_FCDLL int_f nh5sis_simple_c ( hid_t_f *space_id , int_f *flag );
-H5_FCDLL int_f nh5sextent_class_c ( hid_t_f *space_id , int_f *classtype);
-H5_FCDLL int_f nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims);
-H5_FCDLL int_f nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id);
-H5_FCDLL int_f nh5sset_extent_none_c ( hid_t_f *space_id );
-H5_FCDLL int_f nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block);
-H5_FCDLL int_f nh5sget_select_type_c ( hid_t_f *space_id , int_f *op);
-H5_FCDLL int_f nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord);
-H5_FCDLL int_f nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id);
-H5_FCDLL int_f nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
-H5_FCDLL int_f nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id);
-H5_FCDLL int_f nh5sdecode_c ( _fcd buf, hid_t_f *obj_id );
-H5_FCDLL int_f nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
-H5_FCDLL int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
+H5_FCDLL int_f nh5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id);
+H5_FCDLL int_f nh5sclose_c(hid_t_f *space_id);
+H5_FCDLL int_f nh5screate_c(int_f *classtype, hid_t_f *space_id);
+H5_FCDLL int_f nh5scopy_c(hid_t_f *space_id, hid_t_f *new_space_id);
+H5_FCDLL int_f nh5sget_select_hyper_nblocks_c(hid_t_f *space_id, hssize_t_f *num_blocks);
+H5_FCDLL int_f nh5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock,
+ hsize_t_f *num_blocks, hsize_t_f *buf);
+H5_FCDLL int_f nh5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end);
+H5_FCDLL int_f nh5sget_select_elem_npoints_c(hid_t_f *space_id, hssize_t_f *num_points);
+H5_FCDLL int_f nh5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t_f *numpoints,
+ hsize_t_f *buf);
+H5_FCDLL int_f nh5sselect_all_c(hid_t_f *space_id);
+H5_FCDLL int_f nh5sselect_none_c(hid_t_f *space_id);
+H5_FCDLL int_f nh5sselect_valid_c(hid_t_f *space_id, int_f *flag);
+H5_FCDLL int_f nh5sget_simple_extent_npoints_c(hid_t_f *space_id, hsize_t_f *npoints);
+H5_FCDLL int_f nh5sget_select_npoints_c(hid_t_f *space_id, hssize_t_f *npoints);
+H5_FCDLL int_f nh5sget_simple_extent_ndims_c(hid_t_f *space_id, int_f *ndims);
+H5_FCDLL int_f nh5sget_simple_extent_type_c(hid_t_f *space_id, int_f *classtype);
+H5_FCDLL int_f nh5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset);
+H5_FCDLL int_f nh5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size,
+ hsize_t_f *maximum_size);
+H5_FCDLL int_f nh5sis_simple_c(hid_t_f *space_id, int_f *flag);
+H5_FCDLL int_f nh5sextent_class_c(hid_t_f *space_id, int_f *classtype);
+H5_FCDLL int_f nh5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdims);
+H5_FCDLL int_f nh5sextent_copy_c(hid_t_f *dest_space_id, hid_t_f *source_space_id);
+H5_FCDLL int_f nh5sset_extent_none_c(hid_t_f *space_id);
+H5_FCDLL int_f nh5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f *count,
+ hsize_t_f *stride, hsize_t_f *block);
+H5_FCDLL int_f nh5sget_select_type_c(hid_t_f *space_id, int_f *op);
+H5_FCDLL int_f nh5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_f *coord);
+H5_FCDLL int_f nh5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f *count,
+ hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id);
+H5_FCDLL int_f nh5scombine_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
+H5_FCDLL int_f nh5sselect_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id);
+H5_FCDLL int_f nh5sdecode_c(_fcd buf, hid_t_f *obj_id);
+H5_FCDLL int_f nh5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc);
+H5_FCDLL int_f nh5sextent_equal_c(hid_t_f *space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
/*
* Functions from H5Df.c
*/
-#define nh5dcreate_c H5_FC_FUNC_(h5dcreate_c, H5DCREATE_C)
-#define nh5dclose_c H5_FC_FUNC_(h5dclose_c, H5DCLOSE_C)
-#define nh5dopen_c H5_FC_FUNC_(h5dopen_c, H5DOPEN_C)
-#define nh5dwrite_c H5_FC_FUNC_(h5dwrite_c, H5DWRITE_C)
-#define nh5dwrite_integer_s_c H5_FC_FUNC_(h5dwrite_integer_s_c, H5DWRITE_INTEGER_S_C)
-#define nh5dwrite_integer_1_c H5_FC_FUNC_(h5dwrite_integer_1_c, H5DWRITE_INTEGER_1_C)
-#define nh5dwrite_integer_2_c H5_FC_FUNC_(h5dwrite_integer_2_c, H5DWRITE_INTEGER_2_C)
-#define nh5dwrite_integer_3_c H5_FC_FUNC_(h5dwrite_integer_3_c, H5DWRITE_INTEGER_3_C)
-#define nh5dwrite_integer_4_c H5_FC_FUNC_(h5dwrite_integer_4_c, H5DWRITE_INTEGER_4_C)
-#define nh5dwrite_integer_5_c H5_FC_FUNC_(h5dwrite_integer_5_c, H5DWRITE_INTEGER_5_C)
-#define nh5dwrite_integer_6_c H5_FC_FUNC_(h5dwrite_integer_6_c, H5DWRITE_INTEGER_6_C)
-#define nh5dwrite_integer_7_c H5_FC_FUNC_(h5dwrite_integer_7_c, H5DWRITE_INTEGER_7_C)
-#define nh5dwrite_real_s_c H5_FC_FUNC_(h5dwrite_real_s_c, H5DWRITE_REAL_S_C)
-#define nh5dwrite_real_1_c H5_FC_FUNC_(h5dwrite_real_1_c, H5DWRITE_REAL_1_C)
-#define nh5dwrite_real_2_c H5_FC_FUNC_(h5dwrite_real_2_c, H5DWRITE_REAL_2_C)
-#define nh5dwrite_real_3_c H5_FC_FUNC_(h5dwrite_real_3_c, H5DWRITE_REAL_3_C)
-#define nh5dwrite_real_4_c H5_FC_FUNC_(h5dwrite_real_4_c, H5DWRITE_REAL_4_C)
-#define nh5dwrite_real_5_c H5_FC_FUNC_(h5dwrite_real_5_c, H5DWRITE_REAL_5_C)
-#define nh5dwrite_real_6_c H5_FC_FUNC_(h5dwrite_real_6_c, H5DWRITE_REAL_6_C)
-#define nh5dwrite_real_7_c H5_FC_FUNC_(h5dwrite_real_7_c, H5DWRITE_REAL_7_C)
-#define nh5dwrite_double_s_c H5_FC_FUNC_(h5dwrite_double_s_c, H5DWRITE_DOUBLE_S_C)
-#define nh5dwrite_double_1_c H5_FC_FUNC_(h5dwrite_double_1_c, H5DWRITE_DOUBLE_1_C)
-#define nh5dwrite_double_2_c H5_FC_FUNC_(h5dwrite_double_2_c, H5DWRITE_DOUBLE_2_C)
-#define nh5dwrite_double_3_c H5_FC_FUNC_(h5dwrite_double_3_c, H5DWRITE_DOUBLE_3_C)
-#define nh5dwrite_double_4_c H5_FC_FUNC_(h5dwrite_double_4_c, H5DWRITE_DOUBLE_4_C)
-#define nh5dwrite_double_5_c H5_FC_FUNC_(h5dwrite_double_5_c, H5DWRITE_DOUBLE_5_C)
-#define nh5dwrite_double_6_c H5_FC_FUNC_(h5dwrite_double_6_c, H5DWRITE_DOUBLE_6_C)
-#define nh5dwrite_double_7_c H5_FC_FUNC_(h5dwrite_double_7_c, H5DWRITE_DOUBLE_7_C)
-#define nh5dwrite_ref_obj_c H5_FC_FUNC_(h5dwrite_ref_obj_c, H5DWRITE_REF_OBJ_C)
-#define nh5dwrite_ref_reg_c H5_FC_FUNC_(h5dwrite_ref_reg_c, H5DWRITE_REF_REG_C)
-#define nh5dwritec_c H5_FC_FUNC_(h5dwritec_c, H5DWRITEC_C)
-#define nh5dwritec_s_c H5_FC_FUNC_(h5dwritec_s_c, H5DWRITEC_S_C)
-#define nh5dwritec_1_c H5_FC_FUNC_(h5dwritec_1_c, H5DWRITEC_1_C)
-#define nh5dwritec_2_c H5_FC_FUNC_(h5dwritec_2_c, H5DWRITEC_2_C)
-#define nh5dwritec_3_c H5_FC_FUNC_(h5dwritec_3_c, H5DWRITEC_3_C)
-#define nh5dwritec_4_c H5_FC_FUNC_(h5dwritec_4_c, H5DWRITEC_4_C)
-#define nh5dwritec_5_c H5_FC_FUNC_(h5dwritec_5_c, H5DWRITEC_5_C)
-#define nh5dwritec_6_c H5_FC_FUNC_(h5dwritec_6_c, H5DWRITEC_6_C)
-#define nh5dwritec_7_c H5_FC_FUNC_(h5dwritec_7_c, H5DWRITEC_7_C)
-#define nh5dread_c H5_FC_FUNC_(h5dread_c, H5DREAD_C)
-#define nh5dread_integer_s_c H5_FC_FUNC_(h5dread_integer_s_c, H5DREAD_INTEGER_S_C)
-#define nh5dread_integer_1_c H5_FC_FUNC_(h5dread_integer_1_c, H5DREAD_INTEGER_1_C)
-#define nh5dread_integer_2_c H5_FC_FUNC_(h5dread_integer_2_c, H5DREAD_INTEGER_2_C)
-#define nh5dread_integer_3_c H5_FC_FUNC_(h5dread_integer_3_c, H5DREAD_INTEGER_3_C)
-#define nh5dread_integer_4_c H5_FC_FUNC_(h5dread_integer_4_c, H5DREAD_INTEGER_4_C)
-#define nh5dread_integer_5_c H5_FC_FUNC_(h5dread_integer_5_c, H5DREAD_INTEGER_5_C)
-#define nh5dread_integer_6_c H5_FC_FUNC_(h5dread_integer_6_c, H5DREAD_INTEGER_6_C)
-#define nh5dread_integer_7_c H5_FC_FUNC_(h5dread_integer_7_c, H5DREAD_INTEGER_7_C)
-#define nh5dread_real_s_c H5_FC_FUNC_(h5dread_real_s_c, H5DREAD_REAL_S_C)
-#define nh5dread_real_1_c H5_FC_FUNC_(h5dread_real_1_c, H5DREAD_REAL_1_C)
-#define nh5dread_real_2_c H5_FC_FUNC_(h5dread_real_2_c, H5DREAD_REAL_2_C)
-#define nh5dread_real_3_c H5_FC_FUNC_(h5dread_real_3_c, H5DREAD_REAL_3_C)
-#define nh5dread_real_4_c H5_FC_FUNC_(h5dread_real_4_c, H5DREAD_REAL_4_C)
-#define nh5dread_real_5_c H5_FC_FUNC_(h5dread_real_5_c, H5DREAD_REAL_5_C)
-#define nh5dread_real_6_c H5_FC_FUNC_(h5dread_real_6_c, H5DREAD_REAL_6_C)
-#define nh5dread_real_7_c H5_FC_FUNC_(h5dread_real_7_c, H5DREAD_REAL_7_C)
-#define nh5dread_double_s_c H5_FC_FUNC_(h5dread_double_s_c, H5DREAD_DOUBLE_S_C)
-#define nh5dread_double_1_c H5_FC_FUNC_(h5dread_double_1_c, H5DREAD_DOUBLE_1_C)
-#define nh5dread_double_2_c H5_FC_FUNC_(h5dread_double_2_c, H5DREAD_DOUBLE_2_C)
-#define nh5dread_double_3_c H5_FC_FUNC_(h5dread_double_3_c, H5DREAD_DOUBLE_3_C)
-#define nh5dread_double_4_c H5_FC_FUNC_(h5dread_double_4_c, H5DREAD_DOUBLE_4_C)
-#define nh5dread_double_5_c H5_FC_FUNC_(h5dread_double_5_c, H5DREAD_DOUBLE_5_C)
-#define nh5dread_double_6_c H5_FC_FUNC_(h5dread_double_6_c, H5DREAD_DOUBLE_6_C)
-#define nh5dread_double_7_c H5_FC_FUNC_(h5dread_double_7_c, H5DREAD_DOUBLE_7_C)
-#define nh5dread_c_b H5_FC_FUNC_(h5dread_c_b, H5DREAD_C_B)
-#define nh5dread_ref_reg_c H5_FC_FUNC_(h5dread_ref_reg_c, H5DREAD_REF_REG_C)
-#define nh5dread_ref_obj_c H5_FC_FUNC_(h5dread_ref_obj_c, H5DREAD_REF_OBJ_C)
-#define nh5dreadc_c H5_FC_FUNC_(h5dreadc_c, H5DREADC_C)
-#define nh5dreadc_s_c H5_FC_FUNC_(h5dreadc_s_c, H5DREADC_S_C)
-#define nh5dreadc_1_c H5_FC_FUNC_(h5dreadc_1_c, H5DREADC_1_C)
-#define nh5dreadc_2_c H5_FC_FUNC_(h5dreadc_2_c, H5DREADC_2_C)
-#define nh5dreadc_3_c H5_FC_FUNC_(h5dreadc_3_c, H5DREADC_3_C)
-#define nh5dreadc_4_c H5_FC_FUNC_(h5dreadc_4_c, H5DREADC_4_C)
-#define nh5dreadc_5_c H5_FC_FUNC_(h5dreadc_5_c, H5DREADC_5_C)
-#define nh5dreadc_6_c H5_FC_FUNC_(h5dreadc_6_c, H5DREADC_6_C)
-#define nh5dreadc_7_c H5_FC_FUNC_(h5dreadc_7_c, H5DREADC_7_C)
-#define nh5dreadc_c_b H5_FC_FUNC_(h5dreadc_c_b, H5DREADC_C_B)
-#define nh5dget_space_c H5_FC_FUNC_(h5dget_space_c, H5DGET_SPACE_C)
-#define nh5dget_type_c H5_FC_FUNC_(h5dget_type_c, H5DGET_TYPE_C)
-#define nh5dget_create_plist_c H5_FC_FUNC_(h5dget_create_plist_c, H5DGET_CREATE_PLIST_C)
-#define nh5dset_extent_c H5_FC_FUNC_(h5dset_extent_c, H5DSET_EXTENT_C)
-#define nh5dget_storage_size_c H5_FC_FUNC_(h5dget_storage_size_c, H5DGET_STORAGE_SIZE_C)
-#define nh5dvlen_get_max_len_c H5_FC_FUNC_(h5dvlen_get_max_len_c, H5DVLEN_GET_MAX_LEN_C)
-#define nh5dwrite_vl_integer_c H5_FC_FUNC_(h5dwrite_vl_integer_c, H5DWRITE_VL_INTEGER_C)
-#define nh5dread_vl_integer_c H5_FC_FUNC_(h5dread_vl_integer_c, H5DREAD_VL_INTEGER_C)
-#define nh5dwrite_vl_real_c H5_FC_FUNC_(h5dwrite_vl_real_c, H5DWRITE_VL_REAL_C)
-#define nh5dread_vl_real_c H5_FC_FUNC_(h5dread_vl_real_c, H5DREAD_VL_REAL_C)
-#define nh5dwrite_vl_string_c H5_FC_FUNC_(h5dwrite_vl_string_c, H5DWRITE_VL_STRING_C)
-#define nh5dread_vl_string_c H5_FC_FUNC_(h5dread_vl_string_c, H5DREAD_VL_STRING_C)
-#define nh5dfillc_c H5_FC_FUNC_(h5dfillc_c, H5DFILLC_C)
-#define nh5dfill_integer_c H5_FC_FUNC_(h5dfill_integer_c, H5DFILL_INTEGER_C)
-#define nh5dfill_real_c H5_FC_FUNC_(h5dfill_real_c, H5DFILL_REAL_C)
-#define nh5dfill_double_c H5_FC_FUNC_(h5dfill_double_c, H5DFILL_DOUBLE_C)
-#define nh5dget_space_status_c H5_FC_FUNC_(h5dget_space_status_c, H5DGET_SPACE_STATUS_C)
-#define nh5dcreate_anon_c H5_FC_FUNC_(h5dcreate_anon_c, H5DCREATE_ANON_C)
-#define nh5dget_access_plist_c H5_FC_FUNC_(h5dget_access_plist_c, H5DGET_ACCESS_PLIST_C)
-
+#define nh5dcreate_c H5_FC_FUNC_(h5dcreate_c, H5DCREATE_C)
+#define nh5dclose_c H5_FC_FUNC_(h5dclose_c, H5DCLOSE_C)
+#define nh5dopen_c H5_FC_FUNC_(h5dopen_c, H5DOPEN_C)
+#define nh5dwrite_c H5_FC_FUNC_(h5dwrite_c, H5DWRITE_C)
+#define nh5dwrite_integer_s_c H5_FC_FUNC_(h5dwrite_integer_s_c, H5DWRITE_INTEGER_S_C)
+#define nh5dwrite_integer_1_c H5_FC_FUNC_(h5dwrite_integer_1_c, H5DWRITE_INTEGER_1_C)
+#define nh5dwrite_integer_2_c H5_FC_FUNC_(h5dwrite_integer_2_c, H5DWRITE_INTEGER_2_C)
+#define nh5dwrite_integer_3_c H5_FC_FUNC_(h5dwrite_integer_3_c, H5DWRITE_INTEGER_3_C)
+#define nh5dwrite_integer_4_c H5_FC_FUNC_(h5dwrite_integer_4_c, H5DWRITE_INTEGER_4_C)
+#define nh5dwrite_integer_5_c H5_FC_FUNC_(h5dwrite_integer_5_c, H5DWRITE_INTEGER_5_C)
+#define nh5dwrite_integer_6_c H5_FC_FUNC_(h5dwrite_integer_6_c, H5DWRITE_INTEGER_6_C)
+#define nh5dwrite_integer_7_c H5_FC_FUNC_(h5dwrite_integer_7_c, H5DWRITE_INTEGER_7_C)
+#define nh5dwrite_real_s_c H5_FC_FUNC_(h5dwrite_real_s_c, H5DWRITE_REAL_S_C)
+#define nh5dwrite_real_1_c H5_FC_FUNC_(h5dwrite_real_1_c, H5DWRITE_REAL_1_C)
+#define nh5dwrite_real_2_c H5_FC_FUNC_(h5dwrite_real_2_c, H5DWRITE_REAL_2_C)
+#define nh5dwrite_real_3_c H5_FC_FUNC_(h5dwrite_real_3_c, H5DWRITE_REAL_3_C)
+#define nh5dwrite_real_4_c H5_FC_FUNC_(h5dwrite_real_4_c, H5DWRITE_REAL_4_C)
+#define nh5dwrite_real_5_c H5_FC_FUNC_(h5dwrite_real_5_c, H5DWRITE_REAL_5_C)
+#define nh5dwrite_real_6_c H5_FC_FUNC_(h5dwrite_real_6_c, H5DWRITE_REAL_6_C)
+#define nh5dwrite_real_7_c H5_FC_FUNC_(h5dwrite_real_7_c, H5DWRITE_REAL_7_C)
+#define nh5dwrite_double_s_c H5_FC_FUNC_(h5dwrite_double_s_c, H5DWRITE_DOUBLE_S_C)
+#define nh5dwrite_double_1_c H5_FC_FUNC_(h5dwrite_double_1_c, H5DWRITE_DOUBLE_1_C)
+#define nh5dwrite_double_2_c H5_FC_FUNC_(h5dwrite_double_2_c, H5DWRITE_DOUBLE_2_C)
+#define nh5dwrite_double_3_c H5_FC_FUNC_(h5dwrite_double_3_c, H5DWRITE_DOUBLE_3_C)
+#define nh5dwrite_double_4_c H5_FC_FUNC_(h5dwrite_double_4_c, H5DWRITE_DOUBLE_4_C)
+#define nh5dwrite_double_5_c H5_FC_FUNC_(h5dwrite_double_5_c, H5DWRITE_DOUBLE_5_C)
+#define nh5dwrite_double_6_c H5_FC_FUNC_(h5dwrite_double_6_c, H5DWRITE_DOUBLE_6_C)
+#define nh5dwrite_double_7_c H5_FC_FUNC_(h5dwrite_double_7_c, H5DWRITE_DOUBLE_7_C)
+#define nh5dwrite_ref_obj_c H5_FC_FUNC_(h5dwrite_ref_obj_c, H5DWRITE_REF_OBJ_C)
+#define nh5dwrite_ref_reg_c H5_FC_FUNC_(h5dwrite_ref_reg_c, H5DWRITE_REF_REG_C)
+#define nh5dwritec_c H5_FC_FUNC_(h5dwritec_c, H5DWRITEC_C)
+#define nh5dwritec_s_c H5_FC_FUNC_(h5dwritec_s_c, H5DWRITEC_S_C)
+#define nh5dwritec_1_c H5_FC_FUNC_(h5dwritec_1_c, H5DWRITEC_1_C)
+#define nh5dwritec_2_c H5_FC_FUNC_(h5dwritec_2_c, H5DWRITEC_2_C)
+#define nh5dwritec_3_c H5_FC_FUNC_(h5dwritec_3_c, H5DWRITEC_3_C)
+#define nh5dwritec_4_c H5_FC_FUNC_(h5dwritec_4_c, H5DWRITEC_4_C)
+#define nh5dwritec_5_c H5_FC_FUNC_(h5dwritec_5_c, H5DWRITEC_5_C)
+#define nh5dwritec_6_c H5_FC_FUNC_(h5dwritec_6_c, H5DWRITEC_6_C)
+#define nh5dwritec_7_c H5_FC_FUNC_(h5dwritec_7_c, H5DWRITEC_7_C)
+#define nh5dread_c H5_FC_FUNC_(h5dread_c, H5DREAD_C)
+#define nh5dread_integer_s_c H5_FC_FUNC_(h5dread_integer_s_c, H5DREAD_INTEGER_S_C)
+#define nh5dread_integer_1_c H5_FC_FUNC_(h5dread_integer_1_c, H5DREAD_INTEGER_1_C)
+#define nh5dread_integer_2_c H5_FC_FUNC_(h5dread_integer_2_c, H5DREAD_INTEGER_2_C)
+#define nh5dread_integer_3_c H5_FC_FUNC_(h5dread_integer_3_c, H5DREAD_INTEGER_3_C)
+#define nh5dread_integer_4_c H5_FC_FUNC_(h5dread_integer_4_c, H5DREAD_INTEGER_4_C)
+#define nh5dread_integer_5_c H5_FC_FUNC_(h5dread_integer_5_c, H5DREAD_INTEGER_5_C)
+#define nh5dread_integer_6_c H5_FC_FUNC_(h5dread_integer_6_c, H5DREAD_INTEGER_6_C)
+#define nh5dread_integer_7_c H5_FC_FUNC_(h5dread_integer_7_c, H5DREAD_INTEGER_7_C)
+#define nh5dread_real_s_c H5_FC_FUNC_(h5dread_real_s_c, H5DREAD_REAL_S_C)
+#define nh5dread_real_1_c H5_FC_FUNC_(h5dread_real_1_c, H5DREAD_REAL_1_C)
+#define nh5dread_real_2_c H5_FC_FUNC_(h5dread_real_2_c, H5DREAD_REAL_2_C)
+#define nh5dread_real_3_c H5_FC_FUNC_(h5dread_real_3_c, H5DREAD_REAL_3_C)
+#define nh5dread_real_4_c H5_FC_FUNC_(h5dread_real_4_c, H5DREAD_REAL_4_C)
+#define nh5dread_real_5_c H5_FC_FUNC_(h5dread_real_5_c, H5DREAD_REAL_5_C)
+#define nh5dread_real_6_c H5_FC_FUNC_(h5dread_real_6_c, H5DREAD_REAL_6_C)
+#define nh5dread_real_7_c H5_FC_FUNC_(h5dread_real_7_c, H5DREAD_REAL_7_C)
+#define nh5dread_double_s_c H5_FC_FUNC_(h5dread_double_s_c, H5DREAD_DOUBLE_S_C)
+#define nh5dread_double_1_c H5_FC_FUNC_(h5dread_double_1_c, H5DREAD_DOUBLE_1_C)
+#define nh5dread_double_2_c H5_FC_FUNC_(h5dread_double_2_c, H5DREAD_DOUBLE_2_C)
+#define nh5dread_double_3_c H5_FC_FUNC_(h5dread_double_3_c, H5DREAD_DOUBLE_3_C)
+#define nh5dread_double_4_c H5_FC_FUNC_(h5dread_double_4_c, H5DREAD_DOUBLE_4_C)
+#define nh5dread_double_5_c H5_FC_FUNC_(h5dread_double_5_c, H5DREAD_DOUBLE_5_C)
+#define nh5dread_double_6_c H5_FC_FUNC_(h5dread_double_6_c, H5DREAD_DOUBLE_6_C)
+#define nh5dread_double_7_c H5_FC_FUNC_(h5dread_double_7_c, H5DREAD_DOUBLE_7_C)
+#define nh5dread_c_b H5_FC_FUNC_(h5dread_c_b, H5DREAD_C_B)
+#define nh5dread_ref_reg_c H5_FC_FUNC_(h5dread_ref_reg_c, H5DREAD_REF_REG_C)
+#define nh5dread_ref_obj_c H5_FC_FUNC_(h5dread_ref_obj_c, H5DREAD_REF_OBJ_C)
+#define nh5dreadc_c H5_FC_FUNC_(h5dreadc_c, H5DREADC_C)
+#define nh5dreadc_s_c H5_FC_FUNC_(h5dreadc_s_c, H5DREADC_S_C)
+#define nh5dreadc_1_c H5_FC_FUNC_(h5dreadc_1_c, H5DREADC_1_C)
+#define nh5dreadc_2_c H5_FC_FUNC_(h5dreadc_2_c, H5DREADC_2_C)
+#define nh5dreadc_3_c H5_FC_FUNC_(h5dreadc_3_c, H5DREADC_3_C)
+#define nh5dreadc_4_c H5_FC_FUNC_(h5dreadc_4_c, H5DREADC_4_C)
+#define nh5dreadc_5_c H5_FC_FUNC_(h5dreadc_5_c, H5DREADC_5_C)
+#define nh5dreadc_6_c H5_FC_FUNC_(h5dreadc_6_c, H5DREADC_6_C)
+#define nh5dreadc_7_c H5_FC_FUNC_(h5dreadc_7_c, H5DREADC_7_C)
+#define nh5dreadc_c_b H5_FC_FUNC_(h5dreadc_c_b, H5DREADC_C_B)
+#define nh5dget_space_c H5_FC_FUNC_(h5dget_space_c, H5DGET_SPACE_C)
+#define nh5dget_type_c H5_FC_FUNC_(h5dget_type_c, H5DGET_TYPE_C)
+#define nh5dget_create_plist_c H5_FC_FUNC_(h5dget_create_plist_c, H5DGET_CREATE_PLIST_C)
+#define nh5dset_extent_c H5_FC_FUNC_(h5dset_extent_c, H5DSET_EXTENT_C)
+#define nh5dget_storage_size_c H5_FC_FUNC_(h5dget_storage_size_c, H5DGET_STORAGE_SIZE_C)
+#define nh5dvlen_get_max_len_c H5_FC_FUNC_(h5dvlen_get_max_len_c, H5DVLEN_GET_MAX_LEN_C)
+#define nh5dwrite_vl_integer_c H5_FC_FUNC_(h5dwrite_vl_integer_c, H5DWRITE_VL_INTEGER_C)
+#define nh5dread_vl_integer_c H5_FC_FUNC_(h5dread_vl_integer_c, H5DREAD_VL_INTEGER_C)
+#define nh5dwrite_vl_real_c H5_FC_FUNC_(h5dwrite_vl_real_c, H5DWRITE_VL_REAL_C)
+#define nh5dread_vl_real_c H5_FC_FUNC_(h5dread_vl_real_c, H5DREAD_VL_REAL_C)
+#define nh5dwrite_vl_string_c H5_FC_FUNC_(h5dwrite_vl_string_c, H5DWRITE_VL_STRING_C)
+#define nh5dread_vl_string_c H5_FC_FUNC_(h5dread_vl_string_c, H5DREAD_VL_STRING_C)
+#define nh5dfillc_c H5_FC_FUNC_(h5dfillc_c, H5DFILLC_C)
+#define nh5dfill_integer_c H5_FC_FUNC_(h5dfill_integer_c, H5DFILL_INTEGER_C)
+#define nh5dfill_real_c H5_FC_FUNC_(h5dfill_real_c, H5DFILL_REAL_C)
+#define nh5dfill_double_c H5_FC_FUNC_(h5dfill_double_c, H5DFILL_DOUBLE_C)
+#define nh5dget_space_status_c H5_FC_FUNC_(h5dget_space_status_c, H5DGET_SPACE_STATUS_C)
+#define nh5dcreate_anon_c H5_FC_FUNC_(h5dcreate_anon_c, H5DCREATE_ANON_C)
+#define nh5dget_access_plist_c H5_FC_FUNC_(h5dget_access_plist_c, H5DGET_ACCESS_PLIST_C)
-H5_FCDLL int_f nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
-H5_FCDLL int_f nh5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id);
-H5_FCDLL int_f nh5dclose_c ( hid_t_f *dset_id );
-H5_FCDLL int_f nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
+H5_FCDLL int_f nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id);
+H5_FCDLL int_f nh5dclose_c(hid_t_f *dset_id);
+H5_FCDLL int_f nh5dwrite_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_integer_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_real_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_double_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dwrite_ref_obj_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf,
+ hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwritec_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_integer_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_real_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_double_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f nh5dread_ref_obj_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
-H5_FCDLL int_f nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id);
+H5_FCDLL int_f nh5dreadc_s_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_1_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_2_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_3_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_4_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_5_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_6_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dreadc_7_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id);
-
-H5_FCDLL int_f nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id);
-H5_FCDLL int_f nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id);
-H5_FCDLL int_f nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id);
-H5_FCDLL int_f nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims);
-H5_FCDLL int_f nh5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len);
+H5_FCDLL int_f nh5dget_space_c(hid_t_f *dset_id, hid_t_f *space_id);
+H5_FCDLL int_f nh5dget_type_c(hid_t_f *dset_id, hid_t_f *type_id);
+H5_FCDLL int_f nh5dget_create_plist_c(hid_t_f *dset_id, hid_t_f *plist_id);
+H5_FCDLL int_f nh5dset_extent_c(hid_t_f *dset_id, hsize_t_f *dims);
+H5_FCDLL int_f nh5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id,
+ size_t_f *len);
H5_FCDLL int_f nh5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size);
-H5_FCDLL int_f nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f nh5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f nh5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f nh5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag);
-H5_FCDLL int_f nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
-H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
-H5_FCDLL int_f h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
-H5_FCDLL int_f h5dvlen_reclaim_c (hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf);
+H5_FCDLL int_f nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f h5dfill_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f nh5dfill_integer_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f nh5dfill_real_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f nh5dfill_double_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f nh5dget_space_status_c(hid_t_f *dset_id, int_f *flag);
+H5_FCDLL int_f nh5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id,
+ hid_t_f *dapl_id, hid_t_f *dset_id);
+H5_FCDLL int_f h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
+H5_FCDLL int_f h5dread_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
+H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id, hid_t_f *space_id, hid_t_f *plist_id, void *buf);
/*
* Functions from H5Gf.c
*/
-#define nh5gcreate_c H5_FC_FUNC_(h5gcreate_c, H5GCREATE_C)
-#define nh5gclose_c H5_FC_FUNC_(h5gclose_c, H5GCLOSE_C)
-#define nh5gopen_c H5_FC_FUNC_(h5gopen_c, H5GOPEN_C)
+#define nh5gcreate_c H5_FC_FUNC_(h5gcreate_c, H5GCREATE_C)
+#define nh5gclose_c H5_FC_FUNC_(h5gclose_c, H5GCLOSE_C)
+#define nh5gopen_c H5_FC_FUNC_(h5gopen_c, H5GOPEN_C)
#define nh5gget_obj_info_idx_c H5_FC_FUNC_(h5gget_obj_info_idx_c, H5GGET_OBJ_INFO_IDX_C)
-#define nh5gn_members_c H5_FC_FUNC_(h5gn_members_c, H5GN_MEMBERS_C)
-#define nh5glink_c H5_FC_FUNC_(h5glink_c, H5GLINK_C)
-#define nh5glink2_c H5_FC_FUNC_(h5glink2_c, H5GLINK2_C)
-#define nh5gunlink_c H5_FC_FUNC_(h5gunlink_c, H5GUNLINK_C)
-#define nh5gmove_c H5_FC_FUNC_(h5gmove_c, H5GMOVE_C)
-#define nh5gmove2_c H5_FC_FUNC_(h5gmove2_c, H5GMOVE2_C)
-#define nh5gget_linkval_c H5_FC_FUNC_(h5gget_linkval_c, H5GGET_LINKVAL_C)
-#define nh5gset_comment_c H5_FC_FUNC_(h5gset_comment_c, H5GSET_COMMENT_C)
-#define nh5gget_comment_c H5_FC_FUNC_(h5gget_comment_c, H5GGET_COMMENT_C)
+#define nh5gn_members_c H5_FC_FUNC_(h5gn_members_c, H5GN_MEMBERS_C)
+#define nh5glink_c H5_FC_FUNC_(h5glink_c, H5GLINK_C)
+#define nh5glink2_c H5_FC_FUNC_(h5glink2_c, H5GLINK2_C)
+#define nh5gunlink_c H5_FC_FUNC_(h5gunlink_c, H5GUNLINK_C)
+#define nh5gmove_c H5_FC_FUNC_(h5gmove_c, H5GMOVE_C)
+#define nh5gmove2_c H5_FC_FUNC_(h5gmove2_c, H5GMOVE2_C)
+#define nh5gget_linkval_c H5_FC_FUNC_(h5gget_linkval_c, H5GGET_LINKVAL_C)
+#define nh5gset_comment_c H5_FC_FUNC_(h5gset_comment_c, H5GSET_COMMENT_C)
+#define nh5gget_comment_c H5_FC_FUNC_(h5gget_comment_c, H5GGET_COMMENT_C)
#define nh5gcreate_anon_c H5_FC_FUNC_(h5gcreate_anon_c, H5GCREATE_ANON_C)
#define nh5gget_create_plist_c H5_FC_FUNC_(h5gget_create_plist_c, H5GGET_CREATE_PLIST_C)
-#define nh5gget_info_c H5_FC_FUNC_(h5gget_info_c, H5GGET_INFO_C)
+#define nh5gget_info_c H5_FC_FUNC_(h5gget_info_c, H5GGET_INFO_C)
#define nh5gget_info_by_idx_c H5_FC_FUNC_(h5gget_info_by_idx_c, H5GGET_INFO_BY_IDX_C)
-#define nh5gget_info_by_name_c H5_FC_FUNC_(h5gget_info_by_name_c, H5GGET_INFO_BY_NAME_C)
-
+#define nh5gget_info_by_name_c H5_FC_FUNC_(h5gget_info_by_name_c, H5GGET_INFO_BY_NAME_C)
-H5_FCDLL int_f nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
- hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id);
-H5_FCDLL int_f nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id);
-H5_FCDLL int_f nh5gclose_c ( hid_t_f *grp_id );
-H5_FCDLL int_f nh5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type);
-H5_FCDLL int_f nh5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers);
-H5_FCDLL int_f nh5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen);
-H5_FCDLL int_f nh5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen);
-H5_FCDLL int_f nh5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen);
-H5_FCDLL int_f nh5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen);
-H5_FCDLL int_f nh5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen);
-H5_FCDLL int_f nh5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value );
-H5_FCDLL int_f nh5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen);
-H5_FCDLL int_f nh5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment);
-H5_FCDLL int_f nh5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id);
-H5_FCDLL int_f nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id );
-H5_FCDLL int_f nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+H5_FCDLL int_f nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
+ hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id);
+H5_FCDLL int_f nh5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id);
+H5_FCDLL int_f nh5gclose_c(hid_t_f *grp_id);
+H5_FCDLL int_f nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name,
+ int_f *obj_namelen, int_f *obj_type);
+H5_FCDLL int_f nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers);
+H5_FCDLL int_f nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen,
+ _fcd new_name, int_f *new_namelen);
+H5_FCDLL int_f nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type,
+ hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen);
+H5_FCDLL int_f nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen);
+H5_FCDLL int_f nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name,
+ int_f *dst_namelen);
+H5_FCDLL int_f nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,
+ _fcd dst_name, int_f *dst_namelen);
+H5_FCDLL int_f nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value);
+H5_FCDLL int_f nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen);
+H5_FCDLL int_f nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment);
+H5_FCDLL int_f nh5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id);
+H5_FCDLL int_f nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id);
+H5_FCDLL int_f nh5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder,
+ int_f *mounted);
H5_FCDLL int_f nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
-H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+ int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
+ int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
+ hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder,
+ int_f *mounted);
/*
* Functions from H5Af.c
*/
-#define nh5acreate_c H5_FC_FUNC_(h5acreate_c, H5ACREATE_C)
-#define nh5aclose_c H5_FC_FUNC_(h5aclose_c, H5ACLOSE_C)
-#define nh5aopen_name_c H5_FC_FUNC_(h5aopen_name_c, H5AOPEN_NAME_C)
-#define nh5awrite_c H5_FC_FUNC_(h5awrite_c, H5AWRITE_C)
-#define nh5awrite_integer_s_c H5_FC_FUNC_(h5awrite_integer_s_c, H5AWRITE_INTEGER_S_C)
-#define nh5awrite_integer_1_c H5_FC_FUNC_(h5awrite_integer_1_c, H5AWRITE_INTEGER_1_C)
-#define nh5awrite_integer_2_c H5_FC_FUNC_(h5awrite_integer_2_c, H5AWRITE_INTEGER_2_C)
-#define nh5awrite_integer_3_c H5_FC_FUNC_(h5awrite_integer_3_c, H5AWRITE_INTEGER_3_C)
-#define nh5awrite_integer_4_c H5_FC_FUNC_(h5awrite_integer_4_c, H5AWRITE_INTEGER_4_C)
-#define nh5awrite_integer_5_c H5_FC_FUNC_(h5awrite_integer_5_c, H5AWRITE_INTEGER_5_C)
-#define nh5awrite_integer_6_c H5_FC_FUNC_(h5awrite_integer_6_c, H5AWRITE_INTEGER_6_C)
-#define nh5awrite_integer_7_c H5_FC_FUNC_(h5awrite_integer_7_c, H5AWRITE_INTEGER_7_C)
-#define nh5awrite_real_s_c H5_FC_FUNC_(h5awrite_real_s_c, H5AWRITE_REAL_S_C)
-#define nh5awrite_real_1_c H5_FC_FUNC_(h5awrite_real_1_c, H5AWRITE_REAL_1_C)
-#define nh5awrite_real_2_c H5_FC_FUNC_(h5awrite_real_2_c, H5AWRITE_REAL_2_C)
-#define nh5awrite_real_3_c H5_FC_FUNC_(h5awrite_real_3_c, H5AWRITE_REAL_3_C)
-#define nh5awrite_real_4_c H5_FC_FUNC_(h5awrite_real_4_c, H5AWRITE_REAL_4_C)
-#define nh5awrite_real_5_c H5_FC_FUNC_(h5awrite_real_5_c, H5AWRITE_REAL_5_C)
-#define nh5awrite_real_6_c H5_FC_FUNC_(h5awrite_real_6_c, H5AWRITE_REAL_6_C)
-#define nh5awrite_real_7_c H5_FC_FUNC_(h5awrite_real_7_c, H5AWRITE_REAL_7_C)
-#define nh5awrite_double_s_c H5_FC_FUNC_(h5awrite_double_s_c, H5AWRITE_DOUBLE_S_C)
-#define nh5awrite_double_1_c H5_FC_FUNC_(h5awrite_double_1_c, H5AWRITE_DOUBLE_1_C)
-#define nh5awrite_double_2_c H5_FC_FUNC_(h5awrite_double_2_c, H5AWRITE_DOUBLE_2_C)
-#define nh5awrite_double_3_c H5_FC_FUNC_(h5awrite_double_3_c, H5AWRITE_DOUBLE_3_C)
-#define nh5awrite_double_4_c H5_FC_FUNC_(h5awrite_double_4_c, H5AWRITE_DOUBLE_4_C)
-#define nh5awrite_double_5_c H5_FC_FUNC_(h5awrite_double_5_c, H5AWRITE_DOUBLE_5_C)
-#define nh5awrite_double_6_c H5_FC_FUNC_(h5awrite_double_6_c, H5AWRITE_DOUBLE_6_C)
-#define nh5awrite_double_7_c H5_FC_FUNC_(h5awrite_double_7_c, H5AWRITE_DOUBLE_7_C)
-#define nh5awritec_c H5_FC_FUNC_(h5awritec_c, H5AWRITEC_C)
-#define nh5awritec_s_c H5_FC_FUNC_(h5awritec_s_c, H5AWRITEC_S_C)
-#define nh5awritec_1_c H5_FC_FUNC_(h5awritec_1_c, H5AWRITEC_1_C)
-#define nh5awritec_2_c H5_FC_FUNC_(h5awritec_2_c, H5AWRITEC_2_C)
-#define nh5awritec_3_c H5_FC_FUNC_(h5awritec_3_c, H5AWRITEC_3_C)
-#define nh5awritec_4_c H5_FC_FUNC_(h5awritec_4_c, H5AWRITEC_4_C)
-#define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C)
-#define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C)
-#define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C)
-#define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C)
-#define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C)
-#define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C)
-#define nh5aread_integer_2_c H5_FC_FUNC_(h5aread_integer_2_c, H5AREAD_INTEGER_2_C)
-#define nh5aread_integer_3_c H5_FC_FUNC_(h5aread_integer_3_c, H5AREAD_INTEGER_3_C)
-#define nh5aread_integer_4_c H5_FC_FUNC_(h5aread_integer_4_c, H5AREAD_INTEGER_4_C)
-#define nh5aread_integer_5_c H5_FC_FUNC_(h5aread_integer_5_c, H5AREAD_INTEGER_5_C)
-#define nh5aread_integer_6_c H5_FC_FUNC_(h5aread_integer_6_c, H5AREAD_INTEGER_6_C)
-#define nh5aread_integer_7_c H5_FC_FUNC_(h5aread_integer_7_c, H5AREAD_INTEGER_7_C)
-#define nh5aread_real_s_c H5_FC_FUNC_(h5aread_real_s_c, H5AREAD_REAL_S_C)
-#define nh5aread_real_1_c H5_FC_FUNC_(h5aread_real_1_c, H5AREAD_REAL_1_C)
-#define nh5aread_real_2_c H5_FC_FUNC_(h5aread_real_2_c, H5AREAD_REAL_2_C)
-#define nh5aread_real_3_c H5_FC_FUNC_(h5aread_real_3_c, H5AREAD_REAL_3_C)
-#define nh5aread_real_4_c H5_FC_FUNC_(h5aread_real_4_c, H5AREAD_REAL_4_C)
-#define nh5aread_real_5_c H5_FC_FUNC_(h5aread_real_5_c, H5AREAD_REAL_5_C)
-#define nh5aread_real_6_c H5_FC_FUNC_(h5aread_real_6_c, H5AREAD_REAL_6_C)
-#define nh5aread_real_7_c H5_FC_FUNC_(h5aread_real_7_c, H5AREAD_REAL_7_C)
-#define nh5aread_double_s_c H5_FC_FUNC_(h5aread_double_s_c, H5AREAD_DOUBLE_S_C)
-#define nh5aread_double_1_c H5_FC_FUNC_(h5aread_double_1_c, H5AREAD_DOUBLE_1_C)
-#define nh5aread_double_2_c H5_FC_FUNC_(h5aread_double_2_c, H5AREAD_DOUBLE_2_C)
-#define nh5aread_double_3_c H5_FC_FUNC_(h5aread_double_3_c, H5AREAD_DOUBLE_3_C)
-#define nh5aread_double_4_c H5_FC_FUNC_(h5aread_double_4_c, H5AREAD_DOUBLE_4_C)
-#define nh5aread_double_5_c H5_FC_FUNC_(h5aread_double_5_c, H5AREAD_DOUBLE_5_C)
-#define nh5aread_double_6_c H5_FC_FUNC_(h5aread_double_6_c, H5AREAD_DOUBLE_6_C)
-#define nh5aread_double_7_c H5_FC_FUNC_(h5aread_double_7_c, H5AREAD_DOUBLE_7_C)
-#define nh5areadc_c H5_FC_FUNC_(h5areadc_c, H5AREADC_C)
-#define nh5areadc_s_c H5_FC_FUNC_(h5areadc_s_c, H5AREADC_S_C)
-#define nh5areadc_1_c H5_FC_FUNC_(h5areadc_1_c, H5AREADC_1_C)
-#define nh5areadc_2_c H5_FC_FUNC_(h5areadc_2_c, H5AREADC_2_C)
-#define nh5areadc_3_c H5_FC_FUNC_(h5areadc_3_c, H5AREADC_3_C)
-#define nh5areadc_4_c H5_FC_FUNC_(h5areadc_4_c, H5AREADC_4_C)
-#define nh5areadc_5_c H5_FC_FUNC_(h5areadc_5_c, H5AREADC_5_C)
-#define nh5areadc_6_c H5_FC_FUNC_(h5areadc_6_c, H5AREADC_6_C)
-#define nh5areadc_7_c H5_FC_FUNC_(h5areadc_7_c, H5AREADC_7_C)
-#define nh5aget_name_c H5_FC_FUNC_(h5aget_name_c, H5AGET_NAME_C)
-#define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C)
-#define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C)
-#define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C)
-#define nh5aget_num_attrs_c H5_FC_FUNC_(h5aget_num_attrs_c, H5AGET_NUM_ATTRS_C)
-#define nh5adelete_c H5_FC_FUNC_(h5adelete_c, H5ADELETE_C)
+#define nh5acreate_c H5_FC_FUNC_(h5acreate_c, H5ACREATE_C)
+#define nh5aclose_c H5_FC_FUNC_(h5aclose_c, H5ACLOSE_C)
+#define nh5aopen_name_c H5_FC_FUNC_(h5aopen_name_c, H5AOPEN_NAME_C)
+#define nh5awrite_c H5_FC_FUNC_(h5awrite_c, H5AWRITE_C)
+#define nh5awrite_integer_s_c H5_FC_FUNC_(h5awrite_integer_s_c, H5AWRITE_INTEGER_S_C)
+#define nh5awrite_integer_1_c H5_FC_FUNC_(h5awrite_integer_1_c, H5AWRITE_INTEGER_1_C)
+#define nh5awrite_integer_2_c H5_FC_FUNC_(h5awrite_integer_2_c, H5AWRITE_INTEGER_2_C)
+#define nh5awrite_integer_3_c H5_FC_FUNC_(h5awrite_integer_3_c, H5AWRITE_INTEGER_3_C)
+#define nh5awrite_integer_4_c H5_FC_FUNC_(h5awrite_integer_4_c, H5AWRITE_INTEGER_4_C)
+#define nh5awrite_integer_5_c H5_FC_FUNC_(h5awrite_integer_5_c, H5AWRITE_INTEGER_5_C)
+#define nh5awrite_integer_6_c H5_FC_FUNC_(h5awrite_integer_6_c, H5AWRITE_INTEGER_6_C)
+#define nh5awrite_integer_7_c H5_FC_FUNC_(h5awrite_integer_7_c, H5AWRITE_INTEGER_7_C)
+#define nh5awrite_real_s_c H5_FC_FUNC_(h5awrite_real_s_c, H5AWRITE_REAL_S_C)
+#define nh5awrite_real_1_c H5_FC_FUNC_(h5awrite_real_1_c, H5AWRITE_REAL_1_C)
+#define nh5awrite_real_2_c H5_FC_FUNC_(h5awrite_real_2_c, H5AWRITE_REAL_2_C)
+#define nh5awrite_real_3_c H5_FC_FUNC_(h5awrite_real_3_c, H5AWRITE_REAL_3_C)
+#define nh5awrite_real_4_c H5_FC_FUNC_(h5awrite_real_4_c, H5AWRITE_REAL_4_C)
+#define nh5awrite_real_5_c H5_FC_FUNC_(h5awrite_real_5_c, H5AWRITE_REAL_5_C)
+#define nh5awrite_real_6_c H5_FC_FUNC_(h5awrite_real_6_c, H5AWRITE_REAL_6_C)
+#define nh5awrite_real_7_c H5_FC_FUNC_(h5awrite_real_7_c, H5AWRITE_REAL_7_C)
+#define nh5awrite_double_s_c H5_FC_FUNC_(h5awrite_double_s_c, H5AWRITE_DOUBLE_S_C)
+#define nh5awrite_double_1_c H5_FC_FUNC_(h5awrite_double_1_c, H5AWRITE_DOUBLE_1_C)
+#define nh5awrite_double_2_c H5_FC_FUNC_(h5awrite_double_2_c, H5AWRITE_DOUBLE_2_C)
+#define nh5awrite_double_3_c H5_FC_FUNC_(h5awrite_double_3_c, H5AWRITE_DOUBLE_3_C)
+#define nh5awrite_double_4_c H5_FC_FUNC_(h5awrite_double_4_c, H5AWRITE_DOUBLE_4_C)
+#define nh5awrite_double_5_c H5_FC_FUNC_(h5awrite_double_5_c, H5AWRITE_DOUBLE_5_C)
+#define nh5awrite_double_6_c H5_FC_FUNC_(h5awrite_double_6_c, H5AWRITE_DOUBLE_6_C)
+#define nh5awrite_double_7_c H5_FC_FUNC_(h5awrite_double_7_c, H5AWRITE_DOUBLE_7_C)
+#define nh5awritec_c H5_FC_FUNC_(h5awritec_c, H5AWRITEC_C)
+#define nh5awritec_s_c H5_FC_FUNC_(h5awritec_s_c, H5AWRITEC_S_C)
+#define nh5awritec_1_c H5_FC_FUNC_(h5awritec_1_c, H5AWRITEC_1_C)
+#define nh5awritec_2_c H5_FC_FUNC_(h5awritec_2_c, H5AWRITEC_2_C)
+#define nh5awritec_3_c H5_FC_FUNC_(h5awritec_3_c, H5AWRITEC_3_C)
+#define nh5awritec_4_c H5_FC_FUNC_(h5awritec_4_c, H5AWRITEC_4_C)
+#define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C)
+#define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C)
+#define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C)
+#define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C)
+#define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C)
+#define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C)
+#define nh5aread_integer_2_c H5_FC_FUNC_(h5aread_integer_2_c, H5AREAD_INTEGER_2_C)
+#define nh5aread_integer_3_c H5_FC_FUNC_(h5aread_integer_3_c, H5AREAD_INTEGER_3_C)
+#define nh5aread_integer_4_c H5_FC_FUNC_(h5aread_integer_4_c, H5AREAD_INTEGER_4_C)
+#define nh5aread_integer_5_c H5_FC_FUNC_(h5aread_integer_5_c, H5AREAD_INTEGER_5_C)
+#define nh5aread_integer_6_c H5_FC_FUNC_(h5aread_integer_6_c, H5AREAD_INTEGER_6_C)
+#define nh5aread_integer_7_c H5_FC_FUNC_(h5aread_integer_7_c, H5AREAD_INTEGER_7_C)
+#define nh5aread_real_s_c H5_FC_FUNC_(h5aread_real_s_c, H5AREAD_REAL_S_C)
+#define nh5aread_real_1_c H5_FC_FUNC_(h5aread_real_1_c, H5AREAD_REAL_1_C)
+#define nh5aread_real_2_c H5_FC_FUNC_(h5aread_real_2_c, H5AREAD_REAL_2_C)
+#define nh5aread_real_3_c H5_FC_FUNC_(h5aread_real_3_c, H5AREAD_REAL_3_C)
+#define nh5aread_real_4_c H5_FC_FUNC_(h5aread_real_4_c, H5AREAD_REAL_4_C)
+#define nh5aread_real_5_c H5_FC_FUNC_(h5aread_real_5_c, H5AREAD_REAL_5_C)
+#define nh5aread_real_6_c H5_FC_FUNC_(h5aread_real_6_c, H5AREAD_REAL_6_C)
+#define nh5aread_real_7_c H5_FC_FUNC_(h5aread_real_7_c, H5AREAD_REAL_7_C)
+#define nh5aread_double_s_c H5_FC_FUNC_(h5aread_double_s_c, H5AREAD_DOUBLE_S_C)
+#define nh5aread_double_1_c H5_FC_FUNC_(h5aread_double_1_c, H5AREAD_DOUBLE_1_C)
+#define nh5aread_double_2_c H5_FC_FUNC_(h5aread_double_2_c, H5AREAD_DOUBLE_2_C)
+#define nh5aread_double_3_c H5_FC_FUNC_(h5aread_double_3_c, H5AREAD_DOUBLE_3_C)
+#define nh5aread_double_4_c H5_FC_FUNC_(h5aread_double_4_c, H5AREAD_DOUBLE_4_C)
+#define nh5aread_double_5_c H5_FC_FUNC_(h5aread_double_5_c, H5AREAD_DOUBLE_5_C)
+#define nh5aread_double_6_c H5_FC_FUNC_(h5aread_double_6_c, H5AREAD_DOUBLE_6_C)
+#define nh5aread_double_7_c H5_FC_FUNC_(h5aread_double_7_c, H5AREAD_DOUBLE_7_C)
+#define nh5areadc_c H5_FC_FUNC_(h5areadc_c, H5AREADC_C)
+#define nh5areadc_s_c H5_FC_FUNC_(h5areadc_s_c, H5AREADC_S_C)
+#define nh5areadc_1_c H5_FC_FUNC_(h5areadc_1_c, H5AREADC_1_C)
+#define nh5areadc_2_c H5_FC_FUNC_(h5areadc_2_c, H5AREADC_2_C)
+#define nh5areadc_3_c H5_FC_FUNC_(h5areadc_3_c, H5AREADC_3_C)
+#define nh5areadc_4_c H5_FC_FUNC_(h5areadc_4_c, H5AREADC_4_C)
+#define nh5areadc_5_c H5_FC_FUNC_(h5areadc_5_c, H5AREADC_5_C)
+#define nh5areadc_6_c H5_FC_FUNC_(h5areadc_6_c, H5AREADC_6_C)
+#define nh5areadc_7_c H5_FC_FUNC_(h5areadc_7_c, H5AREADC_7_C)
+#define nh5aget_name_c H5_FC_FUNC_(h5aget_name_c, H5AGET_NAME_C)
+#define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C)
+#define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C)
+#define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C)
+#define nh5aget_num_attrs_c H5_FC_FUNC_(h5aget_num_attrs_c, H5AGET_NUM_ATTRS_C)
+#define nh5adelete_c H5_FC_FUNC_(h5adelete_c, H5ADELETE_C)
#define nh5aget_storage_size_c H5_FC_FUNC_(h5aget_storage_size_c, H5AGET_STORAGE_SIZE_C)
-#define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C)
-#define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C)
-#define nh5adelete_by_name_c H5_FC_FUNC_(h5adelete_by_name_c,H5ADELETE_BY_NAME_C)
-#define nh5adelete_by_idx_c H5_FC_FUNC_(h5adelete_by_idx_c,H5ADELETE_BY_IDX_C)
-#define nh5aget_name_by_idx_c H5_FC_FUNC_(h5aget_name_by_idx_c,H5AGET_NAME_BY_IDX_C)
-#define nh5aget_create_plist_c H5_FC_FUNC_(h5aget_create_plist_c,H5AGET_CREATE_PLIST_C)
-#define nh5aopen_by_idx_c H5_FC_FUNC_(h5aopen_by_idx_c,H5AOPEN_BY_IDX_C)
-#define nh5aget_info_c H5_FC_FUNC_(h5aget_info_c,H5AGET_INFO_C)
-#define nh5aget_info_by_idx_c H5_FC_FUNC_(h5aget_info_by_idx_c,H5AGET_INFO_BY_IDX_C)
-#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C)
-#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C)
-#define nh5acreate_by_name_c H5_FC_FUNC_(h5acreate_by_name_c,H5ACREATE_BY_NAME_C)
-#define nh5aexists_c H5_FC_FUNC_(h5aexists_c,H5AEXISTS_C)
-#define nh5aexists_by_name_c H5_FC_FUNC_(h5aexists_by_name_c,H5AEXISTS_BY_NAME_C)
-#define nh5aopen_by_name_c H5_FC_FUNC_(h5aopen_by_name_c,H5AOPEN_BY_NAME_C)
-#define nh5arename_c H5_FC_FUNC_(h5arename_c,H5ARENAME_C)
+#define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C)
+#define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C)
+#define nh5adelete_by_name_c H5_FC_FUNC_(h5adelete_by_name_c, H5ADELETE_BY_NAME_C)
+#define nh5adelete_by_idx_c H5_FC_FUNC_(h5adelete_by_idx_c, H5ADELETE_BY_IDX_C)
+#define nh5aget_name_by_idx_c H5_FC_FUNC_(h5aget_name_by_idx_c, H5AGET_NAME_BY_IDX_C)
+#define nh5aget_create_plist_c H5_FC_FUNC_(h5aget_create_plist_c, H5AGET_CREATE_PLIST_C)
+#define nh5aopen_by_idx_c H5_FC_FUNC_(h5aopen_by_idx_c, H5AOPEN_BY_IDX_C)
+#define nh5aget_info_c H5_FC_FUNC_(h5aget_info_c, H5AGET_INFO_C)
+#define nh5aget_info_by_idx_c H5_FC_FUNC_(h5aget_info_by_idx_c, H5AGET_INFO_BY_IDX_C)
+#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c, H5AGET_INFO_BY_NAME_C)
+#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c, H5AGET_INFO_BY_NAME_C)
+#define nh5acreate_by_name_c H5_FC_FUNC_(h5acreate_by_name_c, H5ACREATE_BY_NAME_C)
+#define nh5aexists_c H5_FC_FUNC_(h5aexists_c, H5AEXISTS_C)
+#define nh5aexists_by_name_c H5_FC_FUNC_(h5aexists_by_name_c, H5AEXISTS_BY_NAME_C)
+#define nh5aopen_by_name_c H5_FC_FUNC_(h5aopen_by_name_c, H5AOPEN_BY_NAME_C)
+#define nh5arename_c H5_FC_FUNC_(h5arename_c, H5ARENAME_C)
-H5_FCDLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id);
-H5_FCDLL int_f nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id);
-H5_FCDLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
-H5_FCDLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
-H5_FCDLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
-H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
-H5_FCDLL int_f nh5aclose_c ( hid_t_f *attr_id );
-H5_FCDLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen);
-H5_FCDLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id);
-H5_FCDLL int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id);
-H5_FCDLL int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id);
-H5_FCDLL int_f nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num);
+H5_FCDLL int_f nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id,
+ hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id);
+H5_FCDLL int_f nh5aopen_name_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id);
+H5_FCDLL int_f nh5awritec_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awritec_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5awrite_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_integer_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_real_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5awrite_double_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
+H5_FCDLL int_f nh5areadc_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5areadc_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims);
+H5_FCDLL int_f nh5aread_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_integer_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_real_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_s_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_1_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_2_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_3_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_4_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_5_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_6_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f nh5aread_double_7_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims);
+H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
+H5_FCDLL int_f nh5aclose_c(hid_t_f *attr_id);
+H5_FCDLL int_f nh5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f nh5aopen_idx_c(hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id);
+H5_FCDLL int_f nh5aget_space_c(hid_t_f *attr_id, hid_t_f *space_id);
+H5_FCDLL int_f nh5aget_type_c(hid_t_f *attr_id, hid_t_f *type_id);
+H5_FCDLL int_f nh5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num);
H5_FCDLL int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf);
-H5_FCDLL int_f nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size );
-H5_FCDLL int_f nh5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen,
- hid_t_f *lapl_id );
-H5_FCDLL int_f nh5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *attr_id);
-H5_FCDLL int_f nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name,
- size_t_f *size, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id );
-H5_FCDLL int_f nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id);
-H5_FCDLL int_f nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id,
- hid_t_f *lapl_id, hid_t_f *attr_id );
-H5_FCDLL int_f nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists);
-H5_FCDLL int_f nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *lapl_id, int_f *attr_exists);
-H5_FCDLL int_f nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id);
-H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen);
+H5_FCDLL int_f nh5aget_storage_size_c(hid_t_f *attr_id, hsize_t_f *size);
+H5_FCDLL int_f nh5arename_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name,
+ size_t_f *old_attr_namelen, _fcd new_attr_name,
+ size_t_f *new_attr_namelen, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5aopen_c(hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id,
+ hid_t_f *attr_id);
+H5_FCDLL int_f nh5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type,
+ int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5aget_create_plist_c(hid_t_f *attr_id, hid_t_f *creation_prop_id);
+H5_FCDLL int_f nh5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type,
+ int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id,
+ hid_t_f *attr_id);
+H5_FCDLL int_f nh5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset,
+ hsize_t_f *data_size);
+H5_FCDLL int_f nh5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid,
+ int_f *corder, int_f *cset, hsize_t_f *data_size);
+H5_FCDLL int_f nh5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid,
+ int_f *corder, int_f *cset, hsize_t_f *data_size);
+H5_FCDLL int_f nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id);
+H5_FCDLL int_f nh5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists);
+H5_FCDLL int_f nh5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists);
+H5_FCDLL int_f nh5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id,
+ hid_t_f *attr_id);
+H5_FCDLL int_f nh5arename_c(hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen,
+ _fcd new_attr_name, size_t_f *new_attr_namelen);
/*
* Functions form H5Tf.c file
*/
-#define nh5topen_c H5_FC_FUNC_(h5topen_c, H5TOPEN_C)
-#define nh5tcommit_c H5_FC_FUNC_(h5tcommit_c, H5TCOMMIT_C)
-#define nh5tcommitted_c H5_FC_FUNC_(h5tcommitted_c, H5TCOMMITTED_C)
-#define nh5tclose_c H5_FC_FUNC_(h5tclose_c, H5TCLOSE_C)
-#define nh5tcopy_c H5_FC_FUNC_(h5tcopy_c, H5TCOPY_C)
-#define nh5tequal_c H5_FC_FUNC_(h5tequal_c, H5TEQUAL_C)
-#define nh5tget_class_c H5_FC_FUNC_(h5tget_class_c, H5TGET_CLASS_C)
-#define nh5tget_order_c H5_FC_FUNC_(h5tget_order_c, H5TGET_ORDER_C)
-#define nh5tset_order_c H5_FC_FUNC_(h5tset_order_c, H5TSET_ORDER_C)
-#define nh5tget_size_c H5_FC_FUNC_(h5tget_size_c, H5TGET_SIZE_C)
-#define nh5tset_size_c H5_FC_FUNC_(h5tset_size_c, H5TSET_SIZE_C)
+#define nh5topen_c H5_FC_FUNC_(h5topen_c, H5TOPEN_C)
+#define nh5tcommit_c H5_FC_FUNC_(h5tcommit_c, H5TCOMMIT_C)
+#define nh5tcommitted_c H5_FC_FUNC_(h5tcommitted_c, H5TCOMMITTED_C)
+#define nh5tclose_c H5_FC_FUNC_(h5tclose_c, H5TCLOSE_C)
+#define nh5tcopy_c H5_FC_FUNC_(h5tcopy_c, H5TCOPY_C)
+#define nh5tequal_c H5_FC_FUNC_(h5tequal_c, H5TEQUAL_C)
+#define nh5tget_class_c H5_FC_FUNC_(h5tget_class_c, H5TGET_CLASS_C)
+#define nh5tget_order_c H5_FC_FUNC_(h5tget_order_c, H5TGET_ORDER_C)
+#define nh5tset_order_c H5_FC_FUNC_(h5tset_order_c, H5TSET_ORDER_C)
+#define nh5tget_size_c H5_FC_FUNC_(h5tget_size_c, H5TGET_SIZE_C)
+#define nh5tset_size_c H5_FC_FUNC_(h5tset_size_c, H5TSET_SIZE_C)
#define nh5tget_precision_c H5_FC_FUNC_(h5tget_precision_c, H5TGET_PRECISION_C)
#define nh5tset_precision_c H5_FC_FUNC_(h5tset_precision_c, H5TSET_PRECISION_C)
#define nh5tget_offset_c H5_FC_FUNC_(h5tget_offset_c, H5TGET_OFFSET_C)
#define nh5tset_offset_c H5_FC_FUNC_(h5tset_offset_c, H5TSET_OFFSET_C)
-#define nh5tget_pad_c H5_FC_FUNC_(h5tget_pad_c, H5TGET_PAD_C)
-#define nh5tset_pad_c H5_FC_FUNC_(h5tset_pad_c, H5TSET_PAD_C)
-#define nh5tget_sign_c H5_FC_FUNC_(h5tget_sign_c, H5TGET_SIGN_C)
-#define nh5tset_sign_c H5_FC_FUNC_(h5tset_sign_c, H5TSET_SIGN_C)
-#define nh5tget_fields_c H5_FC_FUNC_(h5tget_fields_c, H5TGET_FIELDS_C)
-#define nh5tset_fields_c H5_FC_FUNC_(h5tset_fields_c, H5TSET_FIELDS_C)
-#define nh5tget_ebias_c H5_FC_FUNC_(h5tget_ebias_c, H5TGET_EBIAS_C)
-#define nh5tset_ebias_c H5_FC_FUNC_(h5tset_ebias_c, H5TSET_EBIAS_C)
-#define nh5tget_norm_c H5_FC_FUNC_(h5tget_norm_c, H5TGET_NORM_C)
-#define nh5tset_norm_c H5_FC_FUNC_(h5tset_norm_c, H5TSET_NORM_C)
-#define nh5tget_inpad_c H5_FC_FUNC_(h5tget_inpad_c, H5TGET_INPAD_C)
-#define nh5tset_inpad_c H5_FC_FUNC_(h5tset_inpad_c, H5TSET_INPAD_C)
-#define nh5tget_cset_c H5_FC_FUNC_(h5tget_cset_c, H5TGET_CSET_C)
-#define nh5tset_cset_c H5_FC_FUNC_(h5tset_cset_c, H5TSET_CSET_C)
+#define nh5tget_pad_c H5_FC_FUNC_(h5tget_pad_c, H5TGET_PAD_C)
+#define nh5tset_pad_c H5_FC_FUNC_(h5tset_pad_c, H5TSET_PAD_C)
+#define nh5tget_sign_c H5_FC_FUNC_(h5tget_sign_c, H5TGET_SIGN_C)
+#define nh5tset_sign_c H5_FC_FUNC_(h5tset_sign_c, H5TSET_SIGN_C)
+#define nh5tget_fields_c H5_FC_FUNC_(h5tget_fields_c, H5TGET_FIELDS_C)
+#define nh5tset_fields_c H5_FC_FUNC_(h5tset_fields_c, H5TSET_FIELDS_C)
+#define nh5tget_ebias_c H5_FC_FUNC_(h5tget_ebias_c, H5TGET_EBIAS_C)
+#define nh5tset_ebias_c H5_FC_FUNC_(h5tset_ebias_c, H5TSET_EBIAS_C)
+#define nh5tget_norm_c H5_FC_FUNC_(h5tget_norm_c, H5TGET_NORM_C)
+#define nh5tset_norm_c H5_FC_FUNC_(h5tset_norm_c, H5TSET_NORM_C)
+#define nh5tget_inpad_c H5_FC_FUNC_(h5tget_inpad_c, H5TGET_INPAD_C)
+#define nh5tset_inpad_c H5_FC_FUNC_(h5tset_inpad_c, H5TSET_INPAD_C)
+#define nh5tget_cset_c H5_FC_FUNC_(h5tget_cset_c, H5TGET_CSET_C)
+#define nh5tset_cset_c H5_FC_FUNC_(h5tset_cset_c, H5TSET_CSET_C)
#define nh5tget_strpad_c H5_FC_FUNC_(h5tget_strpad_c, H5TGET_STRPAD_C)
#define nh5tset_strpad_c H5_FC_FUNC_(h5tset_strpad_c, H5TSET_STRPAD_C)
-#define nh5tget_nmembers_c H5_FC_FUNC_(h5tget_nmembers_c, H5TGET_NMEMBERS_C)
-#define nh5tget_member_name_c H5_FC_FUNC_(h5tget_member_name_c, H5TGET_MEMBER_NAME_C)
-#define nh5tget_member_offset_c H5_FC_FUNC_(h5tget_member_offset_c, H5TGET_MEMBER_OFFSET_C)
-#define nh5tget_member_dims_c H5_FC_FUNC_(h5tget_member_dims_c, H5TGET_MEMBER_DIMS_C)
-#define nh5tget_member_type_c H5_FC_FUNC_(h5tget_member_type_c, H5TGET_MEMBER_TYPE_C)
-#define nh5tget_member_index_c H5_FC_FUNC_(h5tget_member_index_c, H5TGET_MEMBER_INDEX_C)
-#define nh5tinsert_c H5_FC_FUNC_(h5tinsert_c, H5TINSERT_C)
-#define nh5tcreate_c H5_FC_FUNC_(h5tcreate_c, H5TCREATE_C)
-#define nh5tpack_c H5_FC_FUNC_(h5tpack_c, H5TPACK_C)
-#define nh5tinsert_array_c H5_FC_FUNC_(h5tinsert_array_c, H5TINSERT_ARRAY_C)
-#define nh5tinsert_array_c2 H5_FC_FUNC_(h5tinsert_array_c2, H5TINSERT_ARRAY_C2)
-#define nh5tenum_create_c H5_FC_FUNC_(h5tenum_create_c, H5TENUM_CREATE_C)
-#define nh5tenum_insert_c H5_FC_FUNC_(h5tenum_insert_c, H5TENUM_INSERT_C)
-#define nh5tenum_nameof_c H5_FC_FUNC_(h5tenum_nameof_c, H5TENUM_NAMEOF_C)
-#define nh5tenum_valueof_c H5_FC_FUNC_(h5tenum_valueof_c, H5TENUM_VALUEOF_C)
-#define nh5tget_member_value_c H5_FC_FUNC_(h5tget_member_value_c, H5TGET_MEMBER_VALUE_C)
-#define nh5tset_tag_c H5_FC_FUNC_(h5tset_tag_c, H5TSET_TAG_C)
-#define nh5tget_tag_c H5_FC_FUNC_(h5tget_tag_c, H5TGET_TAG_C)
-#define nh5tarray_create_c H5_FC_FUNC_(h5tarray_create_c, H5TARRAY_CREATE_C)
-#define nh5tget_array_ndims_c H5_FC_FUNC_(h5tget_array_ndims_c, H5TGET_ARRAY_NDIMS_C)
-#define nh5tget_array_dims_c H5_FC_FUNC_(h5tget_array_dims_c, H5TGET_ARRAY_DIMS_C)
-#define nh5tget_super_c H5_FC_FUNC_(h5tget_super_c, H5TGET_SUPER_C)
-#define nh5tvlen_create_c H5_FC_FUNC_(h5tvlen_create_c, H5TVLEN_CREATE_C)
-#define nh5tis_variable_str_c H5_FC_FUNC_(h5tis_variable_str_c, H5TIS_VARIABLE_STR_C)
-#define nh5tget_member_class_c H5_FC_FUNC_(h5tget_member_class_c, H5TGET_MEMBER_CLASS_C)
+#define nh5tget_nmembers_c H5_FC_FUNC_(h5tget_nmembers_c, H5TGET_NMEMBERS_C)
+#define nh5tget_member_name_c H5_FC_FUNC_(h5tget_member_name_c, H5TGET_MEMBER_NAME_C)
+#define nh5tget_member_offset_c H5_FC_FUNC_(h5tget_member_offset_c, H5TGET_MEMBER_OFFSET_C)
+#define nh5tget_member_dims_c H5_FC_FUNC_(h5tget_member_dims_c, H5TGET_MEMBER_DIMS_C)
+#define nh5tget_member_type_c H5_FC_FUNC_(h5tget_member_type_c, H5TGET_MEMBER_TYPE_C)
+#define nh5tget_member_index_c H5_FC_FUNC_(h5tget_member_index_c, H5TGET_MEMBER_INDEX_C)
+#define nh5tinsert_c H5_FC_FUNC_(h5tinsert_c, H5TINSERT_C)
+#define nh5tcreate_c H5_FC_FUNC_(h5tcreate_c, H5TCREATE_C)
+#define nh5tpack_c H5_FC_FUNC_(h5tpack_c, H5TPACK_C)
+#define nh5tinsert_array_c H5_FC_FUNC_(h5tinsert_array_c, H5TINSERT_ARRAY_C)
+#define nh5tinsert_array_c2 H5_FC_FUNC_(h5tinsert_array_c2, H5TINSERT_ARRAY_C2)
+#define nh5tenum_create_c H5_FC_FUNC_(h5tenum_create_c, H5TENUM_CREATE_C)
+#define nh5tenum_insert_c H5_FC_FUNC_(h5tenum_insert_c, H5TENUM_INSERT_C)
+#define nh5tenum_nameof_c H5_FC_FUNC_(h5tenum_nameof_c, H5TENUM_NAMEOF_C)
+#define nh5tenum_valueof_c H5_FC_FUNC_(h5tenum_valueof_c, H5TENUM_VALUEOF_C)
+#define nh5tget_member_value_c H5_FC_FUNC_(h5tget_member_value_c, H5TGET_MEMBER_VALUE_C)
+#define nh5tset_tag_c H5_FC_FUNC_(h5tset_tag_c, H5TSET_TAG_C)
+#define nh5tget_tag_c H5_FC_FUNC_(h5tget_tag_c, H5TGET_TAG_C)
+#define nh5tarray_create_c H5_FC_FUNC_(h5tarray_create_c, H5TARRAY_CREATE_C)
+#define nh5tget_array_ndims_c H5_FC_FUNC_(h5tget_array_ndims_c, H5TGET_ARRAY_NDIMS_C)
+#define nh5tget_array_dims_c H5_FC_FUNC_(h5tget_array_dims_c, H5TGET_ARRAY_DIMS_C)
+#define nh5tget_super_c H5_FC_FUNC_(h5tget_super_c, H5TGET_SUPER_C)
+#define nh5tvlen_create_c H5_FC_FUNC_(h5tvlen_create_c, H5TVLEN_CREATE_C)
+#define nh5tis_variable_str_c H5_FC_FUNC_(h5tis_variable_str_c, H5TIS_VARIABLE_STR_C)
+#define nh5tget_member_class_c H5_FC_FUNC_(h5tget_member_class_c, H5TGET_MEMBER_CLASS_C)
#define nh5tcommit_anon_c H5_FC_FUNC_(h5tcommit_anon_c, H5TCOMMIT_ANON_C)
-#define nh5tdecode_c H5_FC_FUNC_(h5tdecode_c, H5TDECODE_C)
-#define nh5tencode_c H5_FC_FUNC_(h5tencode_c, H5TENCODE_C)
-#define nh5tget_create_plist_c H5_FC_FUNC_(h5tget_create_plist_c, H5TGET_CREATE_PLIST_C)
-#define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C)
-#define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C )
+#define nh5tdecode_c H5_FC_FUNC_(h5tdecode_c, H5TDECODE_C)
+#define nh5tencode_c H5_FC_FUNC_(h5tencode_c, H5TENCODE_C)
+#define nh5tget_create_plist_c H5_FC_FUNC_(h5tget_create_plist_c, H5TGET_CREATE_PLIST_C)
+#define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C)
+#define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C)
H5_FCDLL int_f nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id);
-H5_FCDLL int_f nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id );
-H5_FCDLL int_f nh5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
-H5_FCDLL int_f nh5tclose_c ( hid_t_f *type_id );
-H5_FCDLL int_f nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag);
-H5_FCDLL int_f nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id);
-H5_FCDLL int_f nh5tget_class_c ( hid_t_f *type_id , int_f *classtype);
-H5_FCDLL int_f nh5tget_order_c ( hid_t_f *type_id , int_f *order);
-H5_FCDLL int_f nh5tset_order_c ( hid_t_f *type_id , int_f *order);
-H5_FCDLL int_f nh5tget_size_c ( hid_t_f *type_id , size_t_f *size);
-H5_FCDLL int_f nh5tset_size_c ( hid_t_f *type_id , size_t_f *size);
-H5_FCDLL int_f nh5tcommitted_c (hid_t_f *dtype_id);
-H5_FCDLL int_f nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision);
-H5_FCDLL int_f nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision);
-H5_FCDLL int_f nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset);
-H5_FCDLL int_f nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset);
-H5_FCDLL int_f nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad);
-H5_FCDLL int_f nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad );
-H5_FCDLL int_f nh5tget_sign_c ( hid_t_f *type_id , int_f* sign);
-H5_FCDLL int_f nh5tset_sign_c ( hid_t_f *type_id , int_f *sign);
-H5_FCDLL int_f nh5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize);
-H5_FCDLL int_f nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize);
-H5_FCDLL int_f nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias);
-H5_FCDLL int_f nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias);
-H5_FCDLL int_f nh5tget_norm_c ( hid_t_f *type_id , int_f *norm);
-H5_FCDLL int_f nh5tset_norm_c ( hid_t_f *type_id , int_f *norm);
-H5_FCDLL int_f nh5tget_inpad_c ( hid_t_f *type_id, int_f * padtype);
-H5_FCDLL int_f nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype);
-H5_FCDLL int_f nh5tget_cset_c ( hid_t_f *type_id, int_f * cset);
-H5_FCDLL int_f nh5tset_cset_c ( hid_t_f *type_id, int_f * cset);
-H5_FCDLL int_f nh5tget_strpad_c ( hid_t_f *type_id, int_f * strpad);
-H5_FCDLL int_f nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad);
-H5_FCDLL int_f nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members);
-H5_FCDLL int_f nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen);
-H5_FCDLL int_f nh5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm );
-H5_FCDLL int_f nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset);
-H5_FCDLL int_f nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype);
-H5_FCDLL int_f nh5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx);
-H5_FCDLL int_f nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id);
-H5_FCDLL int_f nh5tpack_c(hid_t_f * type_id);
-H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm );
-H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id);
-H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id);
-H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value);
-H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value);
-H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value);
-H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value);
-H5_FCDLL int_f nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen);
-H5_FCDLL int_f nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen);
-H5_FCDLL int_f nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id);
-H5_FCDLL int_f nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims);
-H5_FCDLL int_f nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims);
-H5_FCDLL int_f nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id);
-H5_FCDLL int_f nh5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id);
-H5_FCDLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag );
-H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls );
+H5_FCDLL int_f nh5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id);
+H5_FCDLL int_f nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id,
+ hid_t_f *tcpl_id, hid_t_f *tapl_id);
+H5_FCDLL int_f nh5tclose_c(hid_t_f *type_id);
+H5_FCDLL int_f nh5tequal_c(hid_t_f *type1_id, hid_t_f *type2_id, int_f *c_flag);
+H5_FCDLL int_f nh5tcopy_c(hid_t_f *type_id, hid_t_f *new_type_id);
+H5_FCDLL int_f nh5tget_class_c(hid_t_f *type_id, int_f *classtype);
+H5_FCDLL int_f nh5tget_order_c(hid_t_f *type_id, int_f *order);
+H5_FCDLL int_f nh5tset_order_c(hid_t_f *type_id, int_f *order);
+H5_FCDLL int_f nh5tget_size_c(hid_t_f *type_id, size_t_f *size);
+H5_FCDLL int_f nh5tset_size_c(hid_t_f *type_id, size_t_f *size);
+H5_FCDLL int_f nh5tcommitted_c(hid_t_f *dtype_id);
+H5_FCDLL int_f nh5tget_precision_c(hid_t_f *type_id, size_t_f *precision);
+H5_FCDLL int_f nh5tset_precision_c(hid_t_f *type_id, size_t_f *precision);
+H5_FCDLL int_f nh5tget_offset_c(hid_t_f *type_id, size_t_f *offset);
+H5_FCDLL int_f nh5tset_offset_c(hid_t_f *type_id, size_t_f *offset);
+H5_FCDLL int_f nh5tget_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad);
+H5_FCDLL int_f nh5tset_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad);
+H5_FCDLL int_f nh5tget_sign_c(hid_t_f *type_id, int_f *sign);
+H5_FCDLL int_f nh5tset_sign_c(hid_t_f *type_id, int_f *sign);
+H5_FCDLL int_f nh5tget_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize,
+ size_t_f *mpos, size_t_f *msize);
+H5_FCDLL int_f nh5tset_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize,
+ size_t_f *mpos, size_t_f *msize);
+H5_FCDLL int_f nh5tget_ebias_c(hid_t_f *type_id, size_t_f *ebias);
+H5_FCDLL int_f nh5tset_ebias_c(hid_t_f *type_id, size_t_f *ebias);
+H5_FCDLL int_f nh5tget_norm_c(hid_t_f *type_id, int_f *norm);
+H5_FCDLL int_f nh5tset_norm_c(hid_t_f *type_id, int_f *norm);
+H5_FCDLL int_f nh5tget_inpad_c(hid_t_f *type_id, int_f *padtype);
+H5_FCDLL int_f nh5tset_inpad_c(hid_t_f *type_id, int_f *padtype);
+H5_FCDLL int_f nh5tget_cset_c(hid_t_f *type_id, int_f *cset);
+H5_FCDLL int_f nh5tset_cset_c(hid_t_f *type_id, int_f *cset);
+H5_FCDLL int_f nh5tget_strpad_c(hid_t_f *type_id, int_f *strpad);
+H5_FCDLL int_f nh5tset_strpad_c(hid_t_f *type_id, int_f *strpad);
+H5_FCDLL int_f nh5tget_nmembers_c(hid_t_f *type_id, int_f *num_members);
+H5_FCDLL int_f nh5tget_member_name_c(hid_t_f *type_id, int_f *idx, _fcd member_name, int_f *namelen);
+H5_FCDLL int_f nh5tget_member_dims_c(hid_t_f *type_id, int_f *field_idx, int_f *dims, size_t_f *field_dims,
+ int_f *perm);
+H5_FCDLL int_f nh5tget_member_offset_c(hid_t_f *type_id, int_f *member_no, size_t_f *offset);
+H5_FCDLL int_f nh5tget_member_type_c(hid_t_f *type_id, int_f *field_idx, hid_t_f *datatype);
+H5_FCDLL int_f nh5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx);
+H5_FCDLL int_f nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t_f *field_id);
+H5_FCDLL int_f nh5tpack_c(hid_t_f *type_id);
+H5_FCDLL int_f nh5tinsert_array_c(hid_t_f *parent_id, _fcd name, int_f *namelen, size_t_f *offset,
+ int_f *ndims, size_t_f *dims, hid_t_f *member_id, int_f *perm);
+H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f *parent_id, _fcd name, int_f *namelen, size_t_f *offset,
+ int_f *ndims, size_t_f *dims, hid_t_f *member_id);
+H5_FCDLL int_f nh5tenum_create_c(hid_t_f *parent_id, hid_t_f *new_type_id);
+H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value);
+H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value);
+H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value);
+H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f *member_no, int_f *value);
+H5_FCDLL int_f nh5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen);
+H5_FCDLL int_f nh5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *namelen);
+H5_FCDLL int_f nh5tarray_create_c(hid_t_f *base_id, int_f *rank, hsize_t_f *dims, hid_t_f *type_id);
+H5_FCDLL int_f nh5tget_array_dims_c(hid_t_f *type_id, hsize_t_f *dims);
+H5_FCDLL int_f nh5tget_array_ndims_c(hid_t_f *type_id, int_f *ndims);
+H5_FCDLL int_f nh5tget_super_c(hid_t_f *type_id, hid_t_f *base_type_id);
+H5_FCDLL int_f nh5tvlen_create_c(hid_t_f *type_id, hid_t_f *vltype_id);
+H5_FCDLL int_f nh5tis_variable_str_c(hid_t_f *type_id, int_f *flag);
+H5_FCDLL int_f nh5tget_member_class_c(hid_t_f *type_id, int_f *member_no, int_f *cls);
H5_FCDLL int_f nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
-H5_FCDLL int_f nh5tdecode_c ( _fcd buf, hid_t_f *obj_id );
-H5_FCDLL int_f nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
-H5_FCDLL int_f nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id);
-H5_FCDLL int_f nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag);
+H5_FCDLL int_f nh5tdecode_c(_fcd buf, hid_t_f *obj_id);
+H5_FCDLL int_f nh5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc);
+H5_FCDLL int_f nh5tget_create_plist_c(hid_t_f *dtype_id, hid_t_f *dtpl_id);
+H5_FCDLL int_f nh5tcompiler_conv_c(hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag);
H5_FCDLL int_f nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id);
-H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id);
-
+H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background,
+ hid_t_f *plist_id);
/*
* Functions from H5Of.c
*/
-#define nh5olink_c H5_FC_FUNC_(h5olink_c, H5OLINK_C)
-#define nh5oopen_c H5_FC_FUNC_(h5oopen_c, H5OOPEN_C)
-#define nh5oclose_c H5_FC_FUNC_(h5oclose_c, H5OCLOSE_C)
-#define nh5oopen_by_addr_c H5_FC_FUNC_(h5oopen_by_addr_c, H5OOPEN_BY_ADDR_C)
-#define nh5ocopy_c H5_FC_FUNC_(h5ocopy_c, H5OCOPY_C)
-#define nh5odecr_refcount_c H5_FC_FUNC_(h5odecr_refcount_c, H5ODECR_REFCOUNT_C)
-#define nh5oincr_refcount_c H5_FC_FUNC_(h5oincr_refcount_c, H5OINCR_REFCOUNT_C)
-#define nh5oexists_by_name_c H5_FC_FUNC_(h5oexists_by_name_c, H5OEXISTS_BY_NAME_C)
-#define nh5oset_comment_c H5_FC_FUNC_(h5oset_comment_c, H5OSET_COMMENT_C)
+#define nh5olink_c H5_FC_FUNC_(h5olink_c, H5OLINK_C)
+#define nh5oopen_c H5_FC_FUNC_(h5oopen_c, H5OOPEN_C)
+#define nh5oclose_c H5_FC_FUNC_(h5oclose_c, H5OCLOSE_C)
+#define nh5oopen_by_addr_c H5_FC_FUNC_(h5oopen_by_addr_c, H5OOPEN_BY_ADDR_C)
+#define nh5ocopy_c H5_FC_FUNC_(h5ocopy_c, H5OCOPY_C)
+#define nh5odecr_refcount_c H5_FC_FUNC_(h5odecr_refcount_c, H5ODECR_REFCOUNT_C)
+#define nh5oincr_refcount_c H5_FC_FUNC_(h5oincr_refcount_c, H5OINCR_REFCOUNT_C)
+#define nh5oexists_by_name_c H5_FC_FUNC_(h5oexists_by_name_c, H5OEXISTS_BY_NAME_C)
+#define nh5oset_comment_c H5_FC_FUNC_(h5oset_comment_c, H5OSET_COMMENT_C)
#define nh5oset_comment_by_name_c H5_FC_FUNC_(h5oset_comment_by_name_c, H5OSET_COMMENT_BY_NAME_C)
-#define nh5oopen_by_idx_c H5_FC_FUNC_(h5oopen_by_idx_c, H5OOPEN_BY_IDX_C)
-#define nh5oget_comment_c H5_FC_FUNC_(h5oget_comment_c, H5OGET_COMMENT_C)
+#define nh5oopen_by_idx_c H5_FC_FUNC_(h5oopen_by_idx_c, H5OOPEN_BY_IDX_C)
+#define nh5oget_comment_c H5_FC_FUNC_(h5oget_comment_c, H5OGET_COMMENT_C)
#define nh5oget_comment_by_name_c H5_FC_FUNC_(h5oget_comment_by_name_c, H5OGET_COMMENT_BY_NAME_C)
-H5_FCDLL int_f nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id);
-H5_FCDLL int_f nh5oclose_c (hid_t_f *object_id );
-H5_FCDLL int_f nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id);
-H5_FCDLL int_f nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id);
-H5_FCDLL int_f h5ovisit_c (hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data);
-H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
- H5O_iterate_t op, void *op_data, hid_t_f *lapl_id );
-H5_FCDLL int_f h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info);
-H5_FCDLL int_f h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info);
-H5_FCDLL int_f h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
- H5O_info_t_f *object_info);
-H5_FCDLL int_f nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
- hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
- hid_t_f *ocpypl_id, hid_t_f *lcpl_id );
-H5_FCDLL int_f nh5odecr_refcount_c (hid_t_f *object_id);
-H5_FCDLL int_f nh5oincr_refcount_c (hid_t_f *object_id);
-H5_FCDLL int_f nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen);
-H5_FCDLL int_f nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize);
-H5_FCDLL int_f nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
- _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id);
+H5_FCDLL int_f nh5oclose_c(hid_t_f *object_id);
+H5_FCDLL int_f nh5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id);
+H5_FCDLL int_f nh5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
+ hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
+ void *op_data);
+H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type,
+ int_f *order, H5O_iterate_t op, void *op_data, hid_t_f *lapl_id);
+H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info);
+H5_FCDLL int_f h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info);
+H5_FCDLL int_f h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
+ H5O_info_t_f *object_info);
+H5_FCDLL int_f nh5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id,
+ _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id);
+H5_FCDLL int_f nh5odecr_refcount_c(hid_t_f *object_id);
+H5_FCDLL int_f nh5oincr_refcount_c(hid_t_f *object_id);
+H5_FCDLL int_f nh5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen);
+H5_FCDLL int_f nh5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment,
+ size_t_f *commentlen, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type,
+ int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize,
+ hssize_t_f *bufsize);
+H5_FCDLL int_f nh5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment,
+ size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id);
/*
* Functions from H5Pf.c
*/
-#define nh5pcreate_c H5_FC_FUNC_(h5pcreate_c, H5PCREATE_C)
-#define nh5pclose_c H5_FC_FUNC_(h5pclose_c, H5PCLOSE_C)
-#define nh5pcopy_c H5_FC_FUNC_(h5pcopy_c, H5PCOPY_C)
-#define nh5pcreate_class_f90_c H5_FC_FUNC_(h5pcreate_class_f90_c, H5PCREATE_CLASS_F90_C)
-#define nh5pequal_c H5_FC_FUNC_(h5pequal_c, H5PEQUAL_C)
-#define nh5pget_class_c H5_FC_FUNC_(h5pget_class_c, H5PGET_CLASS_C)
-#define nh5pset_deflate_c H5_FC_FUNC_(h5pset_deflate_c, H5PSET_DEFLATE_C)
-#define nh5pset_preserve_c H5_FC_FUNC_(h5pset_preserve_c, H5PSET_PRESERVE_C)
-#define nh5pget_preserve_c H5_FC_FUNC_(h5pget_preserve_c, H5PGET_PRESERVE_C)
-#define nh5pset_chunk_c H5_FC_FUNC_(h5pset_chunk_c, H5PSET_CHUNK_C)
-#define nh5pget_chunk_c H5_FC_FUNC_(h5pget_chunk_c, H5PGET_CHUNK_C)
+#define nh5pcreate_c H5_FC_FUNC_(h5pcreate_c, H5PCREATE_C)
+#define nh5pclose_c H5_FC_FUNC_(h5pclose_c, H5PCLOSE_C)
+#define nh5pcopy_c H5_FC_FUNC_(h5pcopy_c, H5PCOPY_C)
+#define nh5pcreate_class_f90_c H5_FC_FUNC_(h5pcreate_class_f90_c, H5PCREATE_CLASS_F90_C)
+#define nh5pequal_c H5_FC_FUNC_(h5pequal_c, H5PEQUAL_C)
+#define nh5pget_class_c H5_FC_FUNC_(h5pget_class_c, H5PGET_CLASS_C)
+#define nh5pset_deflate_c H5_FC_FUNC_(h5pset_deflate_c, H5PSET_DEFLATE_C)
+#define nh5pset_preserve_c H5_FC_FUNC_(h5pset_preserve_c, H5PSET_PRESERVE_C)
+#define nh5pget_preserve_c H5_FC_FUNC_(h5pget_preserve_c, H5PGET_PRESERVE_C)
+#define nh5pset_chunk_c H5_FC_FUNC_(h5pset_chunk_c, H5PSET_CHUNK_C)
+#define nh5pget_chunk_c H5_FC_FUNC_(h5pget_chunk_c, H5PGET_CHUNK_C)
#define nh5pset_fill_valuec_c H5_FC_FUNC_(h5pset_fill_valuec_c, H5PSET_FILL_VALUEC_C)
#define nh5pset_fill_value_integer_c H5_FC_FUNC_(h5pset_fill_value_integer_c, H5PSET_FILL_VALUE_INTEGER_C)
#define nh5pset_fill_value_real_c H5_FC_FUNC_(h5pset_fill_value_real_c, H5PSET_FILL_VALUE_REAL_C)
@@ -855,202 +964,218 @@ H5_FCDLL int_f nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *
#define nh5pget_fill_value_integer_c H5_FC_FUNC_(h5pget_fill_value_integer_c, H5PGET_FILL_VALUE_INTEGER_C)
#define nh5pget_fill_value_real_c H5_FC_FUNC_(h5pget_fill_value_real_c, H5PGET_FILL_VALUE_REAL_C)
#define nh5pget_fill_value_double_c H5_FC_FUNC_(h5pget_fill_value_double_c, H5PGET_FILL_VALUE_DOUBLE_C)
-#define nh5pget_version_c H5_FC_FUNC_(h5pget_version_c, H5PGET_VERSION_C)
-#define nh5pget_userblock_c H5_FC_FUNC_(h5pget_userblock_c, H5PGET_USERBLOCK_C)
-#define nh5pset_userblock_c H5_FC_FUNC_(h5pset_userblock_c, H5PSET_USERBLOCK_C)
-#define nh5pset_sizes_c H5_FC_FUNC_(h5pset_sizes_c, H5PSET_SIZES_C)
-#define nh5pget_sizes_c H5_FC_FUNC_(h5pget_sizes_c, H5PGET_SIZES_C)
-#define nh5pget_sym_k_c H5_FC_FUNC_(h5pget_sym_k_c, H5PGET_SYM_K_C)
-#define nh5pset_sym_k_c H5_FC_FUNC_(h5pset_sym_k_c, H5PSET_SYM_K_C)
-#define nh5pget_istore_k_c H5_FC_FUNC_(h5pget_istore_k_c, H5PGET_ISTORE_K_C)
-#define nh5pset_istore_k_c H5_FC_FUNC_(h5pset_istore_k_c, H5PSET_ISTORE_K_C)
-#define nh5pget_driver_c H5_FC_FUNC_(h5pget_driver_c, H5PGET_DRIVER_C)
+#define nh5pget_version_c H5_FC_FUNC_(h5pget_version_c, H5PGET_VERSION_C)
+#define nh5pget_userblock_c H5_FC_FUNC_(h5pget_userblock_c, H5PGET_USERBLOCK_C)
+#define nh5pset_userblock_c H5_FC_FUNC_(h5pset_userblock_c, H5PSET_USERBLOCK_C)
+#define nh5pset_sizes_c H5_FC_FUNC_(h5pset_sizes_c, H5PSET_SIZES_C)
+#define nh5pget_sizes_c H5_FC_FUNC_(h5pget_sizes_c, H5PGET_SIZES_C)
+#define nh5pget_sym_k_c H5_FC_FUNC_(h5pget_sym_k_c, H5PGET_SYM_K_C)
+#define nh5pset_sym_k_c H5_FC_FUNC_(h5pset_sym_k_c, H5PSET_SYM_K_C)
+#define nh5pget_istore_k_c H5_FC_FUNC_(h5pget_istore_k_c, H5PGET_ISTORE_K_C)
+#define nh5pset_istore_k_c H5_FC_FUNC_(h5pset_istore_k_c, H5PSET_ISTORE_K_C)
+#define nh5pget_driver_c H5_FC_FUNC_(h5pget_driver_c, H5PGET_DRIVER_C)
#define nh5pset_fapl_stdio_c H5_FC_FUNC_(h5pset_fapl_stdio_c, H5PSET_FAPL_STDIO_C)
#define nh5pget_fapl_stdio_c H5_FC_FUNC_(h5pget_fapl_stdio_c, H5PGET_FAPL_STDIO_C)
-#define nh5pset_fapl_sec2_c H5_FC_FUNC_(h5pset_fapl_sec2_c, H5PSET_FAPL_SEC2_C)
-#define nh5pget_fapl_sec2_c H5_FC_FUNC_(h5pget_fapl_sec2_c, H5PGET_FAPL_SEC2_C)
-#define nh5pset_alignment_c H5_FC_FUNC_(h5pset_alignment_c, H5PSET_ALIGNMENT_C)
-#define nh5pget_alignment_c H5_FC_FUNC_(h5pget_alignment_c, H5PGET_ALIGNMENT_C)
-#define nh5pset_fapl_core_c H5_FC_FUNC_(h5pset_fapl_core_c, H5PSET_FAPL_CORE_C)
-#define nh5pget_fapl_core_c H5_FC_FUNC_(h5pget_fapl_core_c, H5PGET_FAPL_CORE_C)
-#define nh5pset_fapl_family_c H5_FC_FUNC_(h5pset_fapl_family_c, H5PSET_FAPL_FAMILY_C)
-#define nh5pget_fapl_family_c H5_FC_FUNC_(h5pget_fapl_family_c, H5PGET_FAPL_FAMILY_C)
-#define nh5pset_cache_c H5_FC_FUNC_(h5pset_cache_c, H5PSET_CACHE_C)
-#define nh5pget_cache_c H5_FC_FUNC_(h5pget_cache_c, H5PGET_CACHE_C)
+#define nh5pset_fapl_sec2_c H5_FC_FUNC_(h5pset_fapl_sec2_c, H5PSET_FAPL_SEC2_C)
+#define nh5pget_fapl_sec2_c H5_FC_FUNC_(h5pget_fapl_sec2_c, H5PGET_FAPL_SEC2_C)
+#define nh5pset_alignment_c H5_FC_FUNC_(h5pset_alignment_c, H5PSET_ALIGNMENT_C)
+#define nh5pget_alignment_c H5_FC_FUNC_(h5pget_alignment_c, H5PGET_ALIGNMENT_C)
+#define nh5pset_fapl_core_c H5_FC_FUNC_(h5pset_fapl_core_c, H5PSET_FAPL_CORE_C)
+#define nh5pget_fapl_core_c H5_FC_FUNC_(h5pget_fapl_core_c, H5PGET_FAPL_CORE_C)
+#define nh5pset_fapl_family_c H5_FC_FUNC_(h5pset_fapl_family_c, H5PSET_FAPL_FAMILY_C)
+#define nh5pget_fapl_family_c H5_FC_FUNC_(h5pget_fapl_family_c, H5PGET_FAPL_FAMILY_C)
+#define nh5pset_cache_c H5_FC_FUNC_(h5pset_cache_c, H5PSET_CACHE_C)
+#define nh5pget_cache_c H5_FC_FUNC_(h5pget_cache_c, H5PGET_CACHE_C)
#define nh5pset_fapl_split_c H5_FC_FUNC_(h5pset_fapl_split_c, H5PSET_FAPL_SPLIT_C)
#define nh5pget_fapl_split_c H5_FC_FUNC_(h5pget_fapl_split_c, H5PGET_FAPL_SPLIT_C)
-#define nh5pset_gc_references_c H5_FC_FUNC_(h5pset_gc_references_c, H5PSET_GC_REFERENCES_C)
-#define nh5pget_gc_references_c H5_FC_FUNC_(h5pget_gc_references_c, H5PGET_GC_REFERENCES_C)
-#define nh5pset_layout_c H5_FC_FUNC_(h5pset_layout_c, H5PSET_LAYOUT_C)
-#define nh5pget_layout_c H5_FC_FUNC_(h5pget_layout_c, H5PGET_LAYOUT_C)
-#define nh5pset_filter_c H5_FC_FUNC_(h5pset_filter_c, H5PSET_FILTER_C)
-#define nh5premove_filter_c H5_FC_FUNC_(h5premove_filter_c, H5PREMOVE_FILTER_C)
-#define nh5pmodify_filter_c H5_FC_FUNC_(h5pmodify_filter_c, H5PMODIFY_FILTER_C)
-#define nh5pget_nfilters_c H5_FC_FUNC_(h5pget_nfilters_c, H5PGET_NFILTERS_C)
-#define nh5pget_filter_c H5_FC_FUNC_(h5pget_filter_c, H5PGET_FILTER_C)
-#define nh5pget_filter_by_id_c H5_FC_FUNC_(h5pget_filter_by_id_c, H5PGET_FILTER_BY_ID_C)
-#define nh5pset_external_c H5_FC_FUNC_(h5pset_external_c, H5PSET_EXTERNAL_C)
-#define nh5pget_external_count_c H5_FC_FUNC_(h5pget_external_count_c, H5PGET_EXTERNAL_COUNT_C)
-#define nh5pget_external_c H5_FC_FUNC_(h5pget_external_c, H5PGET_EXTERNAL_C)
-#define nh5pget_btree_ratios_c H5_FC_FUNC_(h5pget_btree_ratios_c, H5PGET_BTREE_RATIOS_C)
-#define nh5pset_btree_ratios_c H5_FC_FUNC_(h5pset_btree_ratios_c, H5PSET_BTREE_RATIOS_C)
-#define nh5pset_fapl_mpio_c H5_FC_FUNC_(h5pset_fapl_mpio_c, H5PSET_FAPL_MPIO_C)
-#define nh5pget_fapl_mpio_c H5_FC_FUNC_(h5pget_fapl_mpio_c, H5PGET_FAPL_MPIO_C)
-#define nh5pset_dxpl_mpio_c H5_FC_FUNC_(h5pset_dxpl_mpio_c, H5PSET_DXPL_MPIO_C)
-#define nh5pget_dxpl_mpio_c H5_FC_FUNC_(h5pget_dxpl_mpio_c, H5PGET_DXPL_MPIO_C)
-#define nh5pget_fclose_degree_c H5_FC_FUNC_(h5pget_fclose_degree_c, H5PGET_FCLOSE_DEGREE_C)
-#define nh5pset_fclose_degree_c H5_FC_FUNC_(h5pset_fclose_degree_c, H5PSET_FCLOSE_DEGREE_C)
-#define nh5pset_buffer_c H5_FC_FUNC_(h5pset_buffer_c, H5PSET_BUFFER_C)
-#define nh5pget_buffer_c H5_FC_FUNC_(h5pget_buffer_c, H5PGET_BUFFER_C)
-#define nh5pfill_value_defined_c H5_FC_FUNC_(h5pfill_value_defined_c, H5PFILL_VALUE_DEFINED_C)
-#define nh5pset_alloc_time_c H5_FC_FUNC_(h5pset_alloc_time_c, H5PSET_ALLOC_TIME_C)
-#define nh5pget_alloc_time_c H5_FC_FUNC_(h5pget_alloc_time_c, H5PGET_ALLOC_TIME_C)
-#define nh5pset_fill_time_c H5_FC_FUNC_(h5pset_fill_time_c, H5PSET_FILL_TIME_C)
-#define nh5pget_fill_time_c H5_FC_FUNC_(h5pget_fill_time_c, H5PGET_FILL_TIME_C)
+#define nh5pset_gc_references_c H5_FC_FUNC_(h5pset_gc_references_c, H5PSET_GC_REFERENCES_C)
+#define nh5pget_gc_references_c H5_FC_FUNC_(h5pget_gc_references_c, H5PGET_GC_REFERENCES_C)
+#define nh5pset_layout_c H5_FC_FUNC_(h5pset_layout_c, H5PSET_LAYOUT_C)
+#define nh5pget_layout_c H5_FC_FUNC_(h5pget_layout_c, H5PGET_LAYOUT_C)
+#define nh5pset_filter_c H5_FC_FUNC_(h5pset_filter_c, H5PSET_FILTER_C)
+#define nh5premove_filter_c H5_FC_FUNC_(h5premove_filter_c, H5PREMOVE_FILTER_C)
+#define nh5pmodify_filter_c H5_FC_FUNC_(h5pmodify_filter_c, H5PMODIFY_FILTER_C)
+#define nh5pget_nfilters_c H5_FC_FUNC_(h5pget_nfilters_c, H5PGET_NFILTERS_C)
+#define nh5pget_filter_c H5_FC_FUNC_(h5pget_filter_c, H5PGET_FILTER_C)
+#define nh5pget_filter_by_id_c H5_FC_FUNC_(h5pget_filter_by_id_c, H5PGET_FILTER_BY_ID_C)
+#define nh5pset_external_c H5_FC_FUNC_(h5pset_external_c, H5PSET_EXTERNAL_C)
+#define nh5pget_external_count_c H5_FC_FUNC_(h5pget_external_count_c, H5PGET_EXTERNAL_COUNT_C)
+#define nh5pget_external_c H5_FC_FUNC_(h5pget_external_c, H5PGET_EXTERNAL_C)
+#define nh5pget_btree_ratios_c H5_FC_FUNC_(h5pget_btree_ratios_c, H5PGET_BTREE_RATIOS_C)
+#define nh5pset_btree_ratios_c H5_FC_FUNC_(h5pset_btree_ratios_c, H5PSET_BTREE_RATIOS_C)
+#define nh5pset_fapl_mpio_c H5_FC_FUNC_(h5pset_fapl_mpio_c, H5PSET_FAPL_MPIO_C)
+#define nh5pget_fapl_mpio_c H5_FC_FUNC_(h5pget_fapl_mpio_c, H5PGET_FAPL_MPIO_C)
+#define nh5pset_dxpl_mpio_c H5_FC_FUNC_(h5pset_dxpl_mpio_c, H5PSET_DXPL_MPIO_C)
+#define nh5pget_dxpl_mpio_c H5_FC_FUNC_(h5pget_dxpl_mpio_c, H5PGET_DXPL_MPIO_C)
+#define nh5pget_fclose_degree_c H5_FC_FUNC_(h5pget_fclose_degree_c, H5PGET_FCLOSE_DEGREE_C)
+#define nh5pset_fclose_degree_c H5_FC_FUNC_(h5pset_fclose_degree_c, H5PSET_FCLOSE_DEGREE_C)
+#define nh5pset_buffer_c H5_FC_FUNC_(h5pset_buffer_c, H5PSET_BUFFER_C)
+#define nh5pget_buffer_c H5_FC_FUNC_(h5pget_buffer_c, H5PGET_BUFFER_C)
+#define nh5pfill_value_defined_c H5_FC_FUNC_(h5pfill_value_defined_c, H5PFILL_VALUE_DEFINED_C)
+#define nh5pset_alloc_time_c H5_FC_FUNC_(h5pset_alloc_time_c, H5PSET_ALLOC_TIME_C)
+#define nh5pget_alloc_time_c H5_FC_FUNC_(h5pget_alloc_time_c, H5PGET_ALLOC_TIME_C)
+#define nh5pset_fill_time_c H5_FC_FUNC_(h5pset_fill_time_c, H5PSET_FILL_TIME_C)
+#define nh5pget_fill_time_c H5_FC_FUNC_(h5pget_fill_time_c, H5PGET_FILL_TIME_C)
#define nh5pset_meta_block_size_c H5_FC_FUNC_(h5pset_meta_block_size_c, H5PSET_META_BLOCK_SIZE_C)
#define nh5pget_meta_block_size_c H5_FC_FUNC_(h5pget_meta_block_size_c, H5PGET_META_BLOCK_SIZE_C)
-#define nh5pset_sieve_buf_size_c H5_FC_FUNC_(h5pset_sieve_buf_size_c, H5PSET_SIEVE_BUF_SIZE_C)
-#define nh5pget_sieve_buf_size_c H5_FC_FUNC_(h5pget_sieve_buf_size_c, H5PGET_SIEVE_BUF_SIZE_C)
-#define nh5pset_hyper_vector_size_c H5_FC_FUNC_(h5pset_hyper_vector_size_c, H5PSET_HYPER_VECTOR_SIZE_C)
-#define nh5pget_hyper_vector_size_c H5_FC_FUNC_(h5pget_hyper_vector_size_c, H5PGET_HYPER_VECTOR_SIZE_C)
-#define nh5pset_small_data_block_size_c H5_FC_FUNC_(h5pset_small_data_block_size_c, H5PSET_SMALL_DATA_BLOCK_SIZE_C)
-#define nh5pget_small_data_block_size_c H5_FC_FUNC_(h5pget_small_data_block_size_c, H5PGET_SMALL_DATA_BLOCK_SIZE_C)
-#define nh5pregister_integer_c H5_FC_FUNC_(h5pregister_integer_c, H5PREGISTER_INTEGER_C)
-#define nh5pregister_real_c H5_FC_FUNC_(h5pregister_real_c, H5PREGISTER_REAL_C)
-#define nh5pregister_double_c H5_FC_FUNC_(h5pregister_double_c, H5PREGISTER_DOUBLE_C)
-#define nh5pregisterc_c H5_FC_FUNC_(h5pregisterc_c, H5PREGISTERC_C)
-#define nh5pinsert_integer_c H5_FC_FUNC_(h5pinsert_integer_c, H5PINSERT_INTEGER_C)
-#define nh5pinsert_real_c H5_FC_FUNC_(h5pinsert_real_c, H5PINSERT_REAL_C)
-#define nh5pinsert_double_c H5_FC_FUNC_(h5pinsert_double_c, H5PINSERT_DOUBLE_C)
-#define nh5pinsertc_c H5_FC_FUNC_(h5pinsertc_c, H5PINSERTC_C)
-#define nh5pset_integer_c H5_FC_FUNC_(h5pset_integer_c, H5PSET_INTEGER_C)
-#define nh5pset_real_c H5_FC_FUNC_(h5pset_real_c, H5PSET_REAL_C)
-#define nh5pset_double_c H5_FC_FUNC_(h5pset_double_c, H5PSET_DOUBLE_C)
-#define nh5psetc_c H5_FC_FUNC_(h5psetc_c, H5PSETC_C)
-#define nh5pget_integer_c H5_FC_FUNC_(h5pget_integer_c, H5PGET_INTEGER_C)
-#define nh5pget_real_c H5_FC_FUNC_(h5pget_real_c, H5PGET_REAL_C)
-#define nh5pget_double_c H5_FC_FUNC_(h5pget_double_c, H5PGET_DOUBLE_C)
-#define nh5pgetc_c H5_FC_FUNC_(h5pgetc_c, H5PGETC_C)
-#define nh5pexist_c H5_FC_FUNC_(h5pexist_c, H5PEXIST_C)
-#define nh5pget_size_c H5_FC_FUNC_(h5pget_size_c, H5PGET_SIZE_C)
-#define nh5pget_nprops_c H5_FC_FUNC_(h5pget_nprops_c, H5PGET_NPROPS_C)
-#define nh5pget_class_parent_c H5_FC_FUNC_(h5pget_class_parent_c, H5PGET_CLASS_PARENT_C)
-#define nh5pisa_class_c H5_FC_FUNC_(h5pisa_class_c, H5PISA_CLASS_C)
-#define nh5pcopy_prop_c H5_FC_FUNC_(h5pcopy_prop_c, H5PCOPY_PROP_C)
-#define nh5premove_c H5_FC_FUNC_(h5premove_c, H5PREMOVE_C)
-#define nh5punregister_c H5_FC_FUNC_(h5punregister_c, H5PUNREGISTER_C)
-#define nh5pclose_class_c H5_FC_FUNC_(h5pclose_class_c, H5PCLOSE_CLASS_C)
-#define nh5pget_class_name_c H5_FC_FUNC_(h5pget_class_name_c, H5PGET_CLASS_NAME_C)
-#define nh5pset_shuffle_c H5_FC_FUNC_(h5pset_shuffle_c, H5PSET_SHUFFLE_C)
-#define nh5pset_fletcher32_c H5_FC_FUNC_(h5pset_fletcher32_c, H5PSET_FLETCHER32_C)
-#define nh5pset_edc_check_c H5_FC_FUNC_(h5pset_edc_check_c, H5PSET_EDC_CHECK_C)
-#define nh5pget_edc_check_c H5_FC_FUNC_(h5pget_edc_check_c, H5PGET_EDC_CHECK_C)
+#define nh5pset_sieve_buf_size_c H5_FC_FUNC_(h5pset_sieve_buf_size_c, H5PSET_SIEVE_BUF_SIZE_C)
+#define nh5pget_sieve_buf_size_c H5_FC_FUNC_(h5pget_sieve_buf_size_c, H5PGET_SIEVE_BUF_SIZE_C)
+#define nh5pset_hyper_vector_size_c H5_FC_FUNC_(h5pset_hyper_vector_size_c, H5PSET_HYPER_VECTOR_SIZE_C)
+#define nh5pget_hyper_vector_size_c H5_FC_FUNC_(h5pget_hyper_vector_size_c, H5PGET_HYPER_VECTOR_SIZE_C)
+#define nh5pset_small_data_block_size_c \
+ H5_FC_FUNC_(h5pset_small_data_block_size_c, H5PSET_SMALL_DATA_BLOCK_SIZE_C)
+#define nh5pget_small_data_block_size_c \
+ H5_FC_FUNC_(h5pget_small_data_block_size_c, H5PGET_SMALL_DATA_BLOCK_SIZE_C)
+#define nh5pregister_integer_c H5_FC_FUNC_(h5pregister_integer_c, H5PREGISTER_INTEGER_C)
+#define nh5pregister_real_c H5_FC_FUNC_(h5pregister_real_c, H5PREGISTER_REAL_C)
+#define nh5pregister_double_c H5_FC_FUNC_(h5pregister_double_c, H5PREGISTER_DOUBLE_C)
+#define nh5pregisterc_c H5_FC_FUNC_(h5pregisterc_c, H5PREGISTERC_C)
+#define nh5pinsert_integer_c H5_FC_FUNC_(h5pinsert_integer_c, H5PINSERT_INTEGER_C)
+#define nh5pinsert_real_c H5_FC_FUNC_(h5pinsert_real_c, H5PINSERT_REAL_C)
+#define nh5pinsert_double_c H5_FC_FUNC_(h5pinsert_double_c, H5PINSERT_DOUBLE_C)
+#define nh5pinsertc_c H5_FC_FUNC_(h5pinsertc_c, H5PINSERTC_C)
+#define nh5pset_integer_c H5_FC_FUNC_(h5pset_integer_c, H5PSET_INTEGER_C)
+#define nh5pset_real_c H5_FC_FUNC_(h5pset_real_c, H5PSET_REAL_C)
+#define nh5pset_double_c H5_FC_FUNC_(h5pset_double_c, H5PSET_DOUBLE_C)
+#define nh5psetc_c H5_FC_FUNC_(h5psetc_c, H5PSETC_C)
+#define nh5pget_integer_c H5_FC_FUNC_(h5pget_integer_c, H5PGET_INTEGER_C)
+#define nh5pget_real_c H5_FC_FUNC_(h5pget_real_c, H5PGET_REAL_C)
+#define nh5pget_double_c H5_FC_FUNC_(h5pget_double_c, H5PGET_DOUBLE_C)
+#define nh5pgetc_c H5_FC_FUNC_(h5pgetc_c, H5PGETC_C)
+#define nh5pexist_c H5_FC_FUNC_(h5pexist_c, H5PEXIST_C)
+#define nh5pget_size_c H5_FC_FUNC_(h5pget_size_c, H5PGET_SIZE_C)
+#define nh5pget_nprops_c H5_FC_FUNC_(h5pget_nprops_c, H5PGET_NPROPS_C)
+#define nh5pget_class_parent_c H5_FC_FUNC_(h5pget_class_parent_c, H5PGET_CLASS_PARENT_C)
+#define nh5pisa_class_c H5_FC_FUNC_(h5pisa_class_c, H5PISA_CLASS_C)
+#define nh5pcopy_prop_c H5_FC_FUNC_(h5pcopy_prop_c, H5PCOPY_PROP_C)
+#define nh5premove_c H5_FC_FUNC_(h5premove_c, H5PREMOVE_C)
+#define nh5punregister_c H5_FC_FUNC_(h5punregister_c, H5PUNREGISTER_C)
+#define nh5pclose_class_c H5_FC_FUNC_(h5pclose_class_c, H5PCLOSE_CLASS_C)
+#define nh5pget_class_name_c H5_FC_FUNC_(h5pget_class_name_c, H5PGET_CLASS_NAME_C)
+#define nh5pset_shuffle_c H5_FC_FUNC_(h5pset_shuffle_c, H5PSET_SHUFFLE_C)
+#define nh5pset_fletcher32_c H5_FC_FUNC_(h5pset_fletcher32_c, H5PSET_FLETCHER32_C)
+#define nh5pset_edc_check_c H5_FC_FUNC_(h5pset_edc_check_c, H5PSET_EDC_CHECK_C)
+#define nh5pget_edc_check_c H5_FC_FUNC_(h5pget_edc_check_c, H5PGET_EDC_CHECK_C)
#define nh5pset_family_offset_c H5_FC_FUNC_(h5pset_family_offset_c, H5PSET_FAMILY_OFFSET_C)
#define nh5pget_fapl_multi_c H5_FC_FUNC_(h5pget_fapl_multi_c, H5PGET_FAPL_MULTI_C)
#define nh5pset_fapl_multi_c H5_FC_FUNC_(h5pset_fapl_multi_c, H5PSET_FAPL_MULTI_C)
-#define nh5pset_fapl_multi_sc H5_FC_FUNC_(h5pset_fapl_multi_sc, H5PSET_FAPL_MULTI_SC)
-#define nh5pset_szip_c H5_FC_FUNC_(h5pset_szip_c, H5PSET_SZIP_C)
-#define nh5pall_filters_avail_c H5_FC_FUNC_(h5pall_filters_avail_c, H5PALL_FILTERS_AVAIL_C)
-#define nh5pget_attr_phase_change_c H5_FC_FUNC_(h5pget_attr_phase_change_c, H5PGET_ATTR_PHASE_CHANGE_C)
-#define nh5pset_attr_creation_order_c H5_FC_FUNC_(h5pset_attr_creation_order_c, H5PSET_ATTR_CREATION_ORDER_C)
-#define nh5pset_shared_mesg_nindexes_c H5_FC_FUNC_(h5pset_shared_mesg_nindexes_c, H5PSET_SHARED_MESG_NINDEXES_C)
-#define nh5pset_shared_mesg_index_c H5_FC_FUNC_(h5pset_shared_mesg_index_c,H5PSET_SHARED_MESG_INDEX_C)
-#define nh5pget_attr_creation_order_c H5_FC_FUNC_(h5pget_attr_creation_order_c,H5PGET_ATTR_CREATION_ORDER_C)
-#define nh5pset_libver_bounds_c H5_FC_FUNC_(h5pset_libver_bounds_c,H5PSET_LIBVER_BOUNDS_C)
+#define nh5pset_fapl_multi_sc H5_FC_FUNC_(h5pset_fapl_multi_sc, H5PSET_FAPL_MULTI_SC)
+#define nh5pset_szip_c H5_FC_FUNC_(h5pset_szip_c, H5PSET_SZIP_C)
+#define nh5pall_filters_avail_c H5_FC_FUNC_(h5pall_filters_avail_c, H5PALL_FILTERS_AVAIL_C)
+#define nh5pget_attr_phase_change_c H5_FC_FUNC_(h5pget_attr_phase_change_c, H5PGET_ATTR_PHASE_CHANGE_C)
+#define nh5pset_attr_creation_order_c H5_FC_FUNC_(h5pset_attr_creation_order_c, H5PSET_ATTR_CREATION_ORDER_C)
+#define nh5pset_shared_mesg_nindexes_c \
+ H5_FC_FUNC_(h5pset_shared_mesg_nindexes_c, H5PSET_SHARED_MESG_NINDEXES_C)
+#define nh5pset_shared_mesg_index_c H5_FC_FUNC_(h5pset_shared_mesg_index_c, H5PSET_SHARED_MESG_INDEX_C)
+#define nh5pget_attr_creation_order_c H5_FC_FUNC_(h5pget_attr_creation_order_c, H5PGET_ATTR_CREATION_ORDER_C)
+#define nh5pset_libver_bounds_c H5_FC_FUNC_(h5pset_libver_bounds_c, H5PSET_LIBVER_BOUNDS_C)
#define nh5pset_link_creation_order_c H5_FC_FUNC_(h5pset_link_creation_order_c, H5PSET_LINK_CREATION_ORDER_C)
-#define nh5pget_link_phase_change_c H5_FC_FUNC_(h5pget_link_phase_change_c, H5PGET_LINK_PHASE_CHANGE_C)
-#define nh5pget_obj_track_times_c H5_FC_FUNC_(h5pget_obj_track_times_c, H5PGET_OBJ_TRACK_TIMES_C)
-#define nh5pset_obj_track_times_c H5_FC_FUNC_(h5pset_obj_track_times_c, H5PSET_OBJ_TRACK_TIMES_C)
-#define nh5pset_create_inter_group_c H5_FC_FUNC_(h5pset_create_inter_group_c,H5PSET_CREATE_INTER_GROUP_C)
-#define nh5pget_create_inter_group_c H5_FC_FUNC_(h5pget_create_inter_group_c,H5PGET_CREATE_INTER_GROUP_C)
-#define nh5pget_link_creation_order_c H5_FC_FUNC_(h5pget_link_creation_order_c,H5PGET_LINK_CREATION_ORDER_C)
-#define nh5pset_char_encoding_c H5_FC_FUNC_(h5pset_char_encoding_c, H5PSET_CHAR_ENCODING_C)
-#define nh5pget_char_encoding_c H5_FC_FUNC_(h5pget_char_encoding_c, H5PGET_CHAR_ENCODING_C)
-#define nh5pset_copy_object_c H5_FC_FUNC_(h5pset_copy_object_c, H5PSET_COPY_OBJECT_C)
-#define nh5pget_copy_object_c H5_FC_FUNC_(h5pget_copy_object_c, H5PGET_COPY_OBJECT_C)
-#define nh5pget_data_transform_c H5_FC_FUNC_(h5pget_data_transform_c, H5PGET_DATA_TRANSFORM_C)
-#define nh5pset_data_transform_c H5_FC_FUNC_(h5pset_data_transform_c, H5PSET_DATA_TRANSFORM_C)
-#define nh5pget_local_heap_size_hint_c H5_FC_FUNC_(h5pget_local_heap_size_hint_c, H5PGET_LOCAL_HEAP_SIZE_HINT_C)
-#define nh5pget_est_link_info_c H5_FC_FUNC_(h5pget_est_link_info_c,H5PGET_EST_LINK_INFO_C)
-#define nh5pset_est_link_info_c H5_FC_FUNC_(h5pset_est_link_info_c,H5PSET_EST_LINK_INFO_C)
-#define nh5pset_local_heap_size_hint_c H5_FC_FUNC_(h5pset_local_heap_size_hint_c, H5PSET_LOCAL_HEAP_SIZE_HINT_C)
-#define nh5pset_link_phase_change_c H5_FC_FUNC_(h5pset_link_phase_change_c, H5PSET_LINK_PHASE_CHANGE_C)
-#define nh5pset_fapl_direct_c H5_FC_FUNC_(h5pset_fapl_direct_c, H5PSET_FAPL_DIRECT_C)
-#define nh5pget_fapl_direct_c H5_FC_FUNC_(h5pget_fapl_direct_c, H5PGET_FAPL_DIRECT_C)
-#define nh5pset_attr_phase_change_c H5_FC_FUNC_(h5pset_attr_phase_change_c, H5PSET_ATTR_PHASE_CHANGE_C)
-#define nh5pset_nbit_c H5_FC_FUNC_(h5pset_nbit_c, H5PSET_NBIT_C)
-#define nh5pset_scaleoffset_c H5_FC_FUNC_(h5pset_scaleoffset_c, H5PSET_SCALEOFFSET_C)
-#define nh5pset_nlinks_c H5_FC_FUNC_(h5pset_nlinks_c, H5PSET_NLINKS_C)
-#define nh5pget_nlinks_c H5_FC_FUNC_(h5pget_nlinks_c, H5PGET_NLINKS_C)
-#define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C)
-#define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C)
+#define nh5pget_link_phase_change_c H5_FC_FUNC_(h5pget_link_phase_change_c, H5PGET_LINK_PHASE_CHANGE_C)
+#define nh5pget_obj_track_times_c H5_FC_FUNC_(h5pget_obj_track_times_c, H5PGET_OBJ_TRACK_TIMES_C)
+#define nh5pset_obj_track_times_c H5_FC_FUNC_(h5pset_obj_track_times_c, H5PSET_OBJ_TRACK_TIMES_C)
+#define nh5pset_create_inter_group_c H5_FC_FUNC_(h5pset_create_inter_group_c, H5PSET_CREATE_INTER_GROUP_C)
+#define nh5pget_create_inter_group_c H5_FC_FUNC_(h5pget_create_inter_group_c, H5PGET_CREATE_INTER_GROUP_C)
+#define nh5pget_link_creation_order_c H5_FC_FUNC_(h5pget_link_creation_order_c, H5PGET_LINK_CREATION_ORDER_C)
+#define nh5pset_char_encoding_c H5_FC_FUNC_(h5pset_char_encoding_c, H5PSET_CHAR_ENCODING_C)
+#define nh5pget_char_encoding_c H5_FC_FUNC_(h5pget_char_encoding_c, H5PGET_CHAR_ENCODING_C)
+#define nh5pset_copy_object_c H5_FC_FUNC_(h5pset_copy_object_c, H5PSET_COPY_OBJECT_C)
+#define nh5pget_copy_object_c H5_FC_FUNC_(h5pget_copy_object_c, H5PGET_COPY_OBJECT_C)
+#define nh5pget_data_transform_c H5_FC_FUNC_(h5pget_data_transform_c, H5PGET_DATA_TRANSFORM_C)
+#define nh5pset_data_transform_c H5_FC_FUNC_(h5pset_data_transform_c, H5PSET_DATA_TRANSFORM_C)
+#define nh5pget_local_heap_size_hint_c \
+ H5_FC_FUNC_(h5pget_local_heap_size_hint_c, H5PGET_LOCAL_HEAP_SIZE_HINT_C)
+#define nh5pget_est_link_info_c H5_FC_FUNC_(h5pget_est_link_info_c, H5PGET_EST_LINK_INFO_C)
+#define nh5pset_est_link_info_c H5_FC_FUNC_(h5pset_est_link_info_c, H5PSET_EST_LINK_INFO_C)
+#define nh5pset_local_heap_size_hint_c \
+ H5_FC_FUNC_(h5pset_local_heap_size_hint_c, H5PSET_LOCAL_HEAP_SIZE_HINT_C)
+#define nh5pset_link_phase_change_c H5_FC_FUNC_(h5pset_link_phase_change_c, H5PSET_LINK_PHASE_CHANGE_C)
+#define nh5pset_fapl_direct_c H5_FC_FUNC_(h5pset_fapl_direct_c, H5PSET_FAPL_DIRECT_C)
+#define nh5pget_fapl_direct_c H5_FC_FUNC_(h5pget_fapl_direct_c, H5PGET_FAPL_DIRECT_C)
+#define nh5pset_attr_phase_change_c H5_FC_FUNC_(h5pset_attr_phase_change_c, H5PSET_ATTR_PHASE_CHANGE_C)
+#define nh5pset_nbit_c H5_FC_FUNC_(h5pset_nbit_c, H5PSET_NBIT_C)
+#define nh5pset_scaleoffset_c H5_FC_FUNC_(h5pset_scaleoffset_c, H5PSET_SCALEOFFSET_C)
+#define nh5pset_nlinks_c H5_FC_FUNC_(h5pset_nlinks_c, H5PSET_NLINKS_C)
+#define nh5pget_nlinks_c H5_FC_FUNC_(h5pget_nlinks_c, H5PGET_NLINKS_C)
+#define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C)
+#define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C)
#define nh5pget_mpio_actual_io_mode_c H5_FC_FUNC_(h5pget_mpio_actual_io_mode_c, H5PGET_MPIO_ACTUAL_IO_MODE_C)
-H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id );
-H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id );
-H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id);
-H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag);
-H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype);
-H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level);
-H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims );
-H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims );
-H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len);
-H5_FCDLL int_f nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue);
-H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len);
-H5_FCDLL int_f nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue);
-H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr);
-H5_FCDLL int_f nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size);
-H5_FCDLL int_f nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size);
-H5_FCDLL int_f nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size);
-H5_FCDLL int_f nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size);
-H5_FCDLL int_f nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk);
-H5_FCDLL int_f nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk);
-H5_FCDLL int_f nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik);
-H5_FCDLL int_f nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik);
-H5_FCDLL int_f nh5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver);
-H5_FCDLL int_f nh5pset_fapl_stdio_c (hid_t_f *prp_id);
-H5_FCDLL int_f nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io);
-H5_FCDLL int_f nh5pset_fapl_sec2_c (hid_t_f *prp_id);
-H5_FCDLL int_f nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2);
-H5_FCDLL int_f nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment);
-H5_FCDLL int_f nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment);
-H5_FCDLL int_f nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag);
-H5_FCDLL int_f nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag);
-H5_FCDLL int_f nh5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist );
-H5_FCDLL int_f nh5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist );
-H5_FCDLL int_f nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
-H5_FCDLL int_f nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
-H5_FCDLL int_f nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist);
-H5_FCDLL int_f nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist);
-H5_FCDLL int_f nh5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references);
-H5_FCDLL int_f nh5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references);
-H5_FCDLL int_f nh5pset_layout_c (hid_t_f *prp_id, int_f* layout);
-H5_FCDLL int_f nh5pget_layout_c (hid_t_f *prp_id, int_f* layout);
-H5_FCDLL int_f nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values );
-H5_FCDLL int_f nh5premove_filter_c (hid_t_f *prp_id, int_f* filter);
-H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values );
-H5_FCDLL int_f nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters);
-H5_FCDLL int_f nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id);
-H5_FCDLL int_f nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name);
-H5_FCDLL int_f nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes);
-H5_FCDLL int_f nh5pget_external_count_c (hid_t_f *prp_id, int_f* count);
-H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes);
-H5_FCDLL int_f nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
-H5_FCDLL int_f nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
-H5_FCDLL int_f nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
-H5_FCDLL int_f nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
-H5_FCDLL int_f nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode);
-H5_FCDLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode);
+H5_FCDLL int_f nh5pcreate_c(hid_t_f *cls, hid_t_f *prp_id);
+H5_FCDLL int_f nh5pclose_c(hid_t_f *prp_id);
+H5_FCDLL int_f nh5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id);
+H5_FCDLL int_f nh5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag);
+H5_FCDLL int_f nh5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype);
+H5_FCDLL int_f nh5pset_deflate_c(hid_t_f *prp_id, int_f *level);
+H5_FCDLL int_f nh5pset_chunk_c(hid_t_f *prp_id, int_f *rank, hsize_t_f *dims);
+H5_FCDLL int_f nh5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims);
+H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len);
+H5_FCDLL int_f nh5pset_fill_valuec_c(hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue);
+H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pset_fill_value_integer_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pset_fill_value_real_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pset_fill_value_double_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len);
+H5_FCDLL int_f nh5pget_fill_valuec_c(hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue);
+H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pget_fill_value_integer_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pget_fill_value_real_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pget_fill_value_double_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
+H5_FCDLL int_f nh5pset_preserve_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pget_preserve_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr);
+H5_FCDLL int_f nh5pset_userblock_c(hid_t_f *prp_id, hsize_t_f *size);
+H5_FCDLL int_f nh5pget_userblock_c(hid_t_f *prp_id, hsize_t_f *size);
+H5_FCDLL int_f nh5pget_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size);
+H5_FCDLL int_f nh5pset_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size);
+H5_FCDLL int_f nh5pset_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk);
+H5_FCDLL int_f nh5pget_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk);
+H5_FCDLL int_f nh5pset_istore_k_c(hid_t_f *prp_id, int_f *ik);
+H5_FCDLL int_f nh5pget_istore_k_c(hid_t_f *prp_id, int_f *ik);
+H5_FCDLL int_f nh5pget_driver_c(hid_t_f *prp_id, hid_t_f *driver);
+H5_FCDLL int_f nh5pset_fapl_stdio_c(hid_t_f *prp_id);
+H5_FCDLL int_f nh5pget_fapl_stdio_c(hid_t_f *prp_id, int_f *io);
+H5_FCDLL int_f nh5pset_fapl_sec2_c(hid_t_f *prp_id);
+H5_FCDLL int_f nh5pget_fapl_sec2_c(hid_t_f *prp_id, int_f *sec2);
+H5_FCDLL int_f nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment);
+H5_FCDLL int_f nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment);
+H5_FCDLL int_f nh5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag);
+H5_FCDLL int_f nh5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag);
+H5_FCDLL int_f nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist);
+H5_FCDLL int_f nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist);
+H5_FCDLL int_f nh5pset_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts,
+ size_t_f *rdcc_nbytes, real_f *rdcc_w0);
+H5_FCDLL int_f nh5pget_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts,
+ size_t_f *rdcc_nbytes, real_f *rdcc_w0);
+H5_FCDLL int_f nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext,
+ hid_t_f *meta_plist, size_t_f *raw_ext_size, _fcd raw_ext,
+ hid_t_f *raw_plist);
+H5_FCDLL int_f nh5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *meta_plist,
+ int_f *raw_len, _fcd raw_ext, hid_t_f *raw_plist);
+H5_FCDLL int_f nh5pset_gc_references_c(hid_t_f *prp_id, int_f *gc_references);
+H5_FCDLL int_f nh5pget_gc_references_c(hid_t_f *prp_id, int_f *gc_references);
+H5_FCDLL int_f nh5pset_layout_c(hid_t_f *prp_id, int_f *layout);
+H5_FCDLL int_f nh5pget_layout_c(hid_t_f *prp_id, int_f *layout);
+H5_FCDLL int_f nh5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values);
+H5_FCDLL int_f nh5premove_filter_c(hid_t_f *prp_id, int_f *filter);
+H5_FCDLL int_f nh5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values);
+H5_FCDLL int_f nh5pget_nfilters_c(hid_t_f *prp_id, int_f *nfilters);
+H5_FCDLL int_f nh5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values, size_t_f *namelen, _fcd name, int_f *filter_id);
+H5_FCDLL int_f nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values, size_t_f *namelen, _fcd name);
+H5_FCDLL int_f nh5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset,
+ hsize_t_f *bytes);
+H5_FCDLL int_f nh5pget_external_count_c(hid_t_f *prp_id, int_f *count);
+H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name,
+ off_t_f *offset, hsize_t_f *bytes);
+H5_FCDLL int_f nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right);
+H5_FCDLL int_f nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right);
+H5_FCDLL int_f nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
+H5_FCDLL int_f nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
+H5_FCDLL int_f nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
+H5_FCDLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
H5_FCDLL int_f nh5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree);
H5_FCDLL int_f nh5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree);
H5_FCDLL int_f nh5pget_buffer_c(hid_t_f *plist, hsize_t_f *size);
@@ -1068,20 +1193,21 @@ H5_FCDLL int_f nh5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f nh5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f nh5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data);
+ H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy,
+ void *copy_data, H5P_cls_close_func_t close, void *close_data);
H5_FCDLL int_f nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls);
-H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len);
-H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len);
+H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value,
+ int_f *value_len);
+H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value,
+ int_f *value_len);
H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
H5_FCDLL int_f nh5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
H5_FCDLL int_f nh5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
@@ -1100,27 +1226,31 @@ H5_FCDLL int_f nh5pisa_class_c(hid_t_f *plist, hid_t_f *pclass);
H5_FCDLL int_f nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len);
H5_FCDLL int_f nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len);
H5_FCDLL int_f nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len);
-H5_FCDLL int_f nh5pclose_class_c(hid_t_f * cls);
+H5_FCDLL int_f nh5pclose_class_c(hid_t_f *cls);
H5_FCDLL int_f nh5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len);
-H5_FCDLL int_f nh5pset_shuffle_c ( hid_t_f *prp_id);
-H5_FCDLL int_f nh5pset_fletcher32_c ( hid_t_f *prp_id );
-H5_FCDLL int_f nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag );
-H5_FCDLL int_f nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag );
-H5_FCDLL int_f nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset);
-H5_FCDLL int_f nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out);
-H5_FCDLL int_f nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag);
-H5_FCDLL int_f nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block);
-H5_FCDLL int_f nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status);
-H5_FCDLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f nh5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags );
-H5_FCDLL int_f nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes );
-H5_FCDLL int_f nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size);
+H5_FCDLL int_f nh5pset_shuffle_c(hid_t_f *prp_id);
+H5_FCDLL int_f nh5pset_fletcher32_c(hid_t_f *prp_id);
+H5_FCDLL int_f nh5pset_edc_check_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pget_edc_check_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pset_family_offset_c(hid_t_f *prp_id, hsize_t_f *offset);
+H5_FCDLL int_f nh5pget_fapl_multi_c(hid_t_f *prp_id, int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name,
+ int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag,
+ int_f *maxlen_out);
+H5_FCDLL int_f nh5pset_fapl_multi_c(hid_t_f *prp_id, int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name,
+ int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag);
+H5_FCDLL int_f nh5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pset_szip_c(hid_t_f *prp_id, int_f *options_mask, int_f *pixels_per_block);
+H5_FCDLL int_f nh5pall_filters_avail_c(hid_t_f *prp_id, int_f *status);
+H5_FCDLL int_f nh5pfill_value_defined_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
+H5_FCDLL int_f nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes);
+H5_FCDLL int_f nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags,
+ int_f *min_mesg_size);
H5_FCDLL int_f nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
H5_FCDLL int_f nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high);
H5_FCDLL int_f nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags);
-H5_FCDLL int_f nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
+H5_FCDLL int_f nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense);
H5_FCDLL int_f nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
H5_FCDLL int_f nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
H5_FCDLL int_f nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group);
@@ -1130,49 +1260,57 @@ H5_FCDLL int_f nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding);
H5_FCDLL int_f nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding);
H5_FCDLL int_f nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options);
H5_FCDLL int_f nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options);
-H5_FCDLL int_f nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size);
+H5_FCDLL int_f nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len,
+ size_t_f *size);
H5_FCDLL int_f nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len);
H5_FCDLL int_f nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint);
H5_FCDLL int_f nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len);
H5_FCDLL int_f nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint);
H5_FCDLL int_f nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len);
-H5_FCDLL int_f nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size );
-H5_FCDLL int_f nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size );
-H5_FCDLL int_f nh5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f nh5pset_nbit_c(hid_t_f *plist_id );
-H5_FCDLL int_f nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor );
+H5_FCDLL int_f nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size,
+ size_t_f *cbuf_size);
+H5_FCDLL int_f nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size,
+ size_t_f *cbuf_size);
+H5_FCDLL int_f nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f nh5pset_nbit_c(hid_t_f *plist_id);
+H5_FCDLL int_f nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor);
H5_FCDLL int_f nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks);
H5_FCDLL int_f nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks);
-H5_FCDLL int_f nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0);
-H5_FCDLL int_f nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0);
+H5_FCDLL int_f nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0);
+H5_FCDLL int_f nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0);
H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode);
/*
* Functions frome H5Rf.c
*/
-#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C)
-#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C)
-#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C)
-#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C)
-#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C)
+#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C)
+#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C)
+#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C)
+#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C)
+#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C)
#define nh5rget_object_type_obj_c H5_FC_FUNC_(h5rget_object_type_obj_c, H5RGET_OBJECT_TYPE_OBJ_C)
-#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C)
-#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C)
+#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C)
+#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C)
-
-H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen);
-H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id);
-H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id);
-H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id);
-H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id);
-H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id);
-H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id);
+H5_FCDLL int_f nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen);
+H5_FCDLL int_f nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id);
+H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type,
+ hid_t_f *space_id);
+H5_FCDLL int_f nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id);
+H5_FCDLL int_f nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id);
+H5_FCDLL int_f h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id);
+H5_FCDLL int_f nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id);
H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id);
-H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type);
-H5_FCDLL int_f nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default);
-H5_FCDLL int_f nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default);
-H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default);
-H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type);
+H5_FCDLL int_f nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type);
+H5_FCDLL int_f nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default);
+H5_FCDLL int_f nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default);
+H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default);
+H5_FCDLL int_f h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type);
/*
* Functions from H5If.c
*/
@@ -1201,17 +1339,16 @@ H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid);
#define nh5eget_major_c H5_FC_FUNC_(h5eget_major_c, H5EGET_MAJOR_C)
#define nh5eget_minor_c H5_FC_FUNC_(h5eget_minor_c, H5EGET_MINOR_C)
#define nh5eset_auto_c H5_FC_FUNC_(h5eset_auto_c, H5ESET_AUTO_C)
-#define nprocess_buffer H5_FC_FUNC_(process_buffer, PROCESS_BUFFER)
-
+#define nprocess_buffer H5_FC_FUNC_(process_buffer, PROCESS_BUFFER)
H5_FCDLL int_f nh5eclear_c(hid_t_f *estack_id);
-H5_FCDLL int_f nh5eprint_c1(_fcd name, int_f* namelen);
+H5_FCDLL int_f nh5eprint_c1(_fcd name, int_f *namelen);
H5_FCDLL int_f nh5eprint_c2(void);
-H5_FCDLL int_f nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f nh5eset_auto_c(int_f* printflag);
-H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data);
-H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer);
+H5_FCDLL int_f nh5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f nh5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f nh5eset_auto_c(int_f *printflag);
+H5_FCDLL int_f h5eset_auto2_c(int_f *printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data);
+H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id, void **buffer);
/*
* Functions from H5f.c
@@ -1227,16 +1364,17 @@ H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer);
#define nh5garbage_collect_c H5_FC_FUNC_(h5garbage_collect_c, H5GARBAGE_COLLECT_C)
#define nh5dont_atexit_c H5_FC_FUNC_(h5dont_atexit_c, H5DONT_ATEXIT_C)
-
H5_FCDLL int_f nh5open_c(void);
H5_FCDLL int_f nh5close_c(void);
H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
-H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
-H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags);
+H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen,
+ hid_t_f *integertypes, int_f *integerlen);
+H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags,
+ hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags,
+ hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags,
+ int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags,
+ int_f *h5s_flags, hsize_t_f *h5s_hsize_flags, int_f *h5t_flags,
+ int_f *h5z_flags, int_f *h5_generic_flags);
H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags);
H5_FCDLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
H5_FCDLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
@@ -1246,69 +1384,66 @@ H5_FCDLL int_f nh5dont_atexit_c(void);
/*
* Functions from H5Zf.c
*/
-#define nh5zunregister_c H5_FC_FUNC_(h5zunregister_c, H5ZUNREGISTER_C)
-#define nh5zfilter_avail_c H5_FC_FUNC_(h5zfilter_avail_c, H5ZFILTER_AVAIL_C)
+#define nh5zunregister_c H5_FC_FUNC_(h5zunregister_c, H5ZUNREGISTER_C)
+#define nh5zfilter_avail_c H5_FC_FUNC_(h5zfilter_avail_c, H5ZFILTER_AVAIL_C)
#define nh5zget_filter_info_c H5_FC_FUNC_(h5zget_filter_info_c, H5ZGET_FILTER_INFO_C)
-
-H5_FCDLL int_f nh5zunregister_c (int_f *filter);
-H5_FCDLL int_f nh5zfilter_avail_c (int_f *filter, int_f *flag);
-H5_FCDLL int_f nh5zget_filter_info_c (int_f *filter, int_f *flag);
-
+H5_FCDLL int_f nh5zunregister_c(int_f *filter);
+H5_FCDLL int_f nh5zfilter_avail_c(int_f *filter, int_f *flag);
+H5_FCDLL int_f nh5zget_filter_info_c(int_f *filter, int_f *flag);
/*
* Functions from H5Lf.c
*/
-#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C)
+#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C)
#define nh5lcreate_external_c H5_FC_FUNC_(h5lcreate_external_c, H5LCREATE_EXTERNAL_C)
-#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C)
-#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C)
-#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C)
-#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C)
-#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C)
-#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C)
+#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C)
+#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C)
+#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C)
+#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C)
+#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C)
+#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C)
#define nh5lget_info_by_idx_c H5_FC_FUNC_(h5lget_info_by_idx_c, H5LGET_INFO_BY_IDX_C)
-#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C)
-#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C)
+#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C)
+#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C)
#define nh5lget_name_by_idx_c H5_FC_FUNC_(h5lget_name_by_idx_c, H5LGET_NAME_BY_IDX_C)
-#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C)
+#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C)
H5_FCDLL int_f nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id);
+ _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name,
+ size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name,
+ size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
H5_FCDLL int_f nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id );
-H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_name_len,
- hid_t_f *lcpl_id, hid_t_f *lapl_id );
-H5_FCDLL int_f nh5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id );
-H5_FCDLL int_f nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
-H5_FCDLL int_f nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists);
-H5_FCDLL int_f nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- haddr_t_f *address, size_t_f *val_size,
- hid_t_f *lapl_id);
+ hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
+ hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id,
+ _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5ldelete_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
+ int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
+H5_FCDLL int_f nh5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
+ int_f *link_exists);
+H5_FCDLL int_f nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset,
+ int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address,
+ size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id);
+ int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type,
+ int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address,
+ size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f nh5lis_registered_c(int_f *link_cls_id);
H5_FCDLL int_f nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+ _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
H5_FCDLL int_f nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- size_t_f *size, _fcd name, hid_t_f *lapl_id);
+ int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size,
+ _fcd name, hid_t_f *lapl_id);
H5_FCDLL int_f nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size,
- void *linkval_buff, hid_t_f *lapl_id) ;
-
-H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data );
-H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id);
+ void *linkval_buff, hid_t_f *lapl_id);
+H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
+ H5L_iterate_t op, void *op_data);
+H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type,
+ int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data,
+ hid_t_f *lapl_id);
#endif /* _H5f90proto_H */
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index d36e52c..aa6c70e 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -20,13 +20,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include <stdio.h>
#include <assert.h>
@@ -39,22 +39,22 @@
#include "H5fort_type_defines.h"
/* File pointers for files */
-FILE * c_header;
-FILE * fort_header;
+FILE *c_header;
+FILE *fort_header;
#define CFILE "H5f90i_gen.h"
#define FFILE "H5fortran_types.f90"
/* Prototypes for the write routines */
-void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size);
-void writeTypedefDefault(const char* c_typedef, unsigned int size);
-void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind);
+void writeTypedef(const char *c_typedef, const char *c_type, unsigned int size);
+void writeTypedefDefault(const char *c_typedef, unsigned int size);
+void writeToFiles(const char *c_typedef, const char *fortran_type, const char *c_type, int size,
+ unsigned int kind);
static void
initCfile(void)
{
- fprintf(c_header,
- "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
+ fprintf(c_header, "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
* Copyright by The HDF Group. *\n\
* Copyright by the Board of Trustees of the University of Illinois. *\n\
* All rights reserved. *\n\
@@ -62,7 +62,7 @@ initCfile(void)
* This file is part of HDF5. The full HDF5 copyright notice, including *\n\
* terms governing use, modification, and redistribution, is contained in *\n\
* the COPYING file, which can be found at the root of the source code *\n\
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *\n\
* If you do not have access to either file, you may request a copy from *\n\
* help@hdfgroup.org. *\n\
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\
@@ -78,8 +78,7 @@ initCfile(void)
static void
initFfile(void)
{
- fprintf(fort_header,
- "! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n\
+ fprintf(fort_header, "! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n\
! Copyright by The HDF Group. *\n\
! Copyright by the Board of Trustees of the University of Illinois. *\n\
! All rights reserved. *\n\
@@ -87,7 +86,7 @@ initFfile(void)
! This file is part of HDF5. The full HDF5 copyright notice, including *\n\
! terms governing use, modification, and redistribution, is contained in *\n\
! the COPYING file, which can be found at the root of the source code *\n\
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\
+! distribution tree, or in https://www.hdfgroup.org/licenses. *\n\
! If you do not have access to either file, you may request a copy from *\n\
! help@hdfgroup.org. *\n\
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
@@ -97,276 +96,281 @@ initFfile(void)
!\n\
! HDF5 integers\n\
!\n");
-
}
static void
endCfile(void)
{
- fprintf(c_header, "\n#endif /* _H5f90i_gen_H */\n");
+ fprintf(c_header, "\n#endif /* _H5f90i_gen_H */\n");
}
static void
endFfile(void)
{
- fprintf(fort_header, "\n INTEGER(SIZE_T), PARAMETER :: OBJECT_NAMELEN_DEFAULT_F = -1\n\n");
- fprintf(fort_header, " END MODULE H5FORTRAN_TYPES\n");
+ fprintf(fort_header, "\n INTEGER(SIZE_T), PARAMETER :: OBJECT_NAMELEN_DEFAULT_F = -1\n\n");
+ fprintf(fort_header, " END MODULE H5FORTRAN_TYPES\n");
}
/* Define a c_int_x type in the C header */
-void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size)
+void
+writeTypedef(const char *c_typedef, const char *c_type, unsigned int size)
{
- fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
+ fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
}
/* Call this function if there is no matching C type for sizes > 1 */
-void writeTypedefDefault(const char* c_typedef, unsigned int size)
+void
+writeTypedefDefault(const char *c_typedef, unsigned int size)
{
- assert(size %2 == 0);
- fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size);
+ assert(size % 2 == 0);
+ fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef,
+ size / 2, c_typedef, size);
}
/* Create matching Fortran and C types by writing to both files */
-void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind)
+void
+writeToFiles(const char *c_typedef, const char *fortran_type, const char *c_type, int size, unsigned int kind)
{
- fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
- fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
+ fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
+ fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
}
-int main(void)
+int
+main(void)
{
- int FoundIntSize[4];
- unsigned FoundIntSizeKind[4];
- int FoundRealSize[3];
- unsigned FoundRealSizeKind[3];
- int i,j,flag;
- char chrA[20],chrB[20];
- int H5_C_HAS_REAL_NATIVE_16;
+ int FoundIntSize[4];
+ unsigned FoundIntSizeKind[4];
+ int FoundRealSize[3];
+ unsigned FoundRealSizeKind[3];
+ int i, j, flag;
+ char chrA[20], chrB[20];
+ int H5_C_HAS_REAL_NATIVE_16;
- /* Open target files */
- c_header = fopen(CFILE, "w");
- fort_header = fopen(FFILE, "w");
+ /* Open target files */
+ c_header = fopen(CFILE, "w");
+ fort_header = fopen(FFILE, "w");
- /* Default is C has 16 byte float */
- H5_C_HAS_REAL_NATIVE_16 = 1;
+ /* Default is C has 16 byte float */
+ H5_C_HAS_REAL_NATIVE_16 = 1;
- /* Write copyright, boilerplate to both files */
- initCfile();
- initFfile();
+ /* Write copyright, boilerplate to both files */
+ initCfile();
+ initFfile();
- /* First, define c_int_x */
+ /* First, define c_int_x */
#if defined H5_FORTRAN_HAS_INTEGER_1_KIND
- if(sizeof(long long) == 1)
- writeTypedef("int", "long long", 1);
- else if(sizeof(long) == 1)
- writeTypedef("int", "long", 1);
- else if(sizeof(int) == 1)
- writeTypedef("int", "int", 1);
- else if(sizeof(short) == 1)
- writeTypedef("int", "short", 1);
- else
- writeTypedef("int", "char", 1);
- /* Actually, char is not necessarily one byte.
- * But if char isn't, then nothing is, so this
- * is as close as we can get. */
- if(sizeof(size_t) == 1)
- writeTypedef("size_t", "size_t", 1);
- if(sizeof(hsize_t) == 1)
- writeTypedef("hsize_t", "hsize_t", 1);
+ if (sizeof(long long) == 1)
+ writeTypedef("int", "long long", 1);
+ else if (sizeof(long) == 1)
+ writeTypedef("int", "long", 1);
+ else if (sizeof(int) == 1)
+ writeTypedef("int", "int", 1);
+ else if (sizeof(short) == 1)
+ writeTypedef("int", "short", 1);
+ else
+ writeTypedef("int", "char", 1);
+ /* Actually, char is not necessarily one byte.
+ * But if char isn't, then nothing is, so this
+ * is as close as we can get. */
+ if (sizeof(size_t) == 1)
+ writeTypedef("size_t", "size_t", 1);
+ if (sizeof(hsize_t) == 1)
+ writeTypedef("hsize_t", "hsize_t", 1);
#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_2_KIND
- if(sizeof(long long) == 2)
- writeTypedef("int", "long long", 2);
- else if(sizeof(long) == 2)
- writeTypedef("int", "long", 2);
- else if(sizeof(int) == 2)
- writeTypedef("int", "int", 2);
- else if(sizeof(short) == 2)
- writeTypedef("int", "short", 2);
- else
- writeTypedefDefault("int",2);
-
- if(sizeof(size_t) == 2)
- writeTypedef("size_t", "size_t", 2);
- if(sizeof(hsize_t) == 2)
- writeTypedef("hsize_t", "hsize_t", 2);
+ if (sizeof(long long) == 2)
+ writeTypedef("int", "long long", 2);
+ else if (sizeof(long) == 2)
+ writeTypedef("int", "long", 2);
+ else if (sizeof(int) == 2)
+ writeTypedef("int", "int", 2);
+ else if (sizeof(short) == 2)
+ writeTypedef("int", "short", 2);
+ else
+ writeTypedefDefault("int", 2);
+
+ if (sizeof(size_t) == 2)
+ writeTypedef("size_t", "size_t", 2);
+ if (sizeof(hsize_t) == 2)
+ writeTypedef("hsize_t", "hsize_t", 2);
#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_4_KIND
- if(sizeof(long long) == 4)
- writeTypedef("int", "long long", 4);
- else if(sizeof(long) == 4)
- writeTypedef("int", "long", 4);
- else if(sizeof(int) == 4)
- writeTypedef("int", "int", 4);
- else if(sizeof(short) == 4)
- writeTypedef("int", "short", 4);
- else
- writeTypedefDefault("int",4);
-
- if(sizeof(size_t) == 4)
- writeTypedef("size_t", "size_t", 4);
- if(sizeof(hsize_t) == 4)
- writeTypedef("hsize_t", "hsize_t", 4);
-
+ if (sizeof(long long) == 4)
+ writeTypedef("int", "long long", 4);
+ else if (sizeof(long) == 4)
+ writeTypedef("int", "long", 4);
+ else if (sizeof(int) == 4)
+ writeTypedef("int", "int", 4);
+ else if (sizeof(short) == 4)
+ writeTypedef("int", "short", 4);
+ else
+ writeTypedefDefault("int", 4);
+
+ if (sizeof(size_t) == 4)
+ writeTypedef("size_t", "size_t", 4);
+ if (sizeof(hsize_t) == 4)
+ writeTypedef("hsize_t", "hsize_t", 4);
+
#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND
- if(sizeof(long long) == 8)
- writeTypedef("int", "long long", 8);
- else if(sizeof(long) == 8)
- writeTypedef("int", "long", 8);
- else if(sizeof(int) == 8)
- writeTypedef("int", "int", 8);
- else if(sizeof(short) == 8)
- writeTypedef("int", "short", 8);
- else
- writeTypedefDefault("int",8);
-
- if(sizeof(size_t) == 8)
- writeTypedef("size_t", "size_t", 8);
- if(sizeof(hsize_t) == 8)
- writeTypedef("hsize_t", "hsize_t", 8);
+ if (sizeof(long long) == 8)
+ writeTypedef("int", "long long", 8);
+ else if (sizeof(long) == 8)
+ writeTypedef("int", "long", 8);
+ else if (sizeof(int) == 8)
+ writeTypedef("int", "int", 8);
+ else if (sizeof(short) == 8)
+ writeTypedef("int", "short", 8);
+ else
+ writeTypedefDefault("int", 8);
+
+ if (sizeof(size_t) == 8)
+ writeTypedef("size_t", "size_t", 8);
+ if (sizeof(hsize_t) == 8)
+ writeTypedef("hsize_t", "hsize_t", 8);
#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/
- /* Define c_float_x */
+ /* Define c_float_x */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND
- if(sizeof(long double) == 4)
- writeTypedef("float", "long double", 4);
- else if(sizeof(double) == 4)
- writeTypedef("float", "double", 4);
- else if(sizeof(float) == 4)
- writeTypedef("float", "float", 4);
- else
- { printf("Fortran REAL is 4 bytes, no corresponding C floating type\n");
- printf("Quitting....\n");
- return -1;
- }
+ if (sizeof(long double) == 4)
+ writeTypedef("float", "long double", 4);
+ else if (sizeof(double) == 4)
+ writeTypedef("float", "double", 4);
+ else if (sizeof(float) == 4)
+ writeTypedef("float", "float", 4);
+ else {
+ printf("Fortran REAL is 4 bytes, no corresponding C floating type\n");
+ printf("Quitting....\n");
+ return -1;
+ }
#endif /*H5_FORTRAN_HAS_REAL_NATIVE_4_KIND*/
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND
- if(sizeof(long double) == 8)
- writeTypedef("float", "long double", 8);
- else if(sizeof(double) == 8)
- writeTypedef("float", "double", 8);
- else if(sizeof(float) == 8)
- writeTypedef("float", "float", 8);
- else
- { printf("Fortran REAL is 16 bytes, no corresponding C floating type\n");
- printf("Quitting....\n");
- return -1;
- }
+ if (sizeof(long double) == 8)
+ writeTypedef("float", "long double", 8);
+ else if (sizeof(double) == 8)
+ writeTypedef("float", "double", 8);
+ else if (sizeof(float) == 8)
+ writeTypedef("float", "float", 8);
+ else {
+ printf("Fortran REAL is 16 bytes, no corresponding C floating type\n");
+ printf("Quitting....\n");
+ return -1;
+ }
#endif /*H5_FORTRAN_HAS_REAL_NATIVE_8_KIND*/
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND
- if(sizeof(long double) == 16)
- writeTypedef("float", "long double", 16);
- else if(sizeof(double) == 16)
- writeTypedef("float", "double", 16);
- else if(sizeof(float) == 16)
- writeTypedef("float", "float", 16);
- else /*C has no 16 byte float so disable it in Fortran*/
- { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n");
- printf(" Disabling Fortran 16 byte REALs\n");
- H5_C_HAS_REAL_NATIVE_16 = 0;
- }
+ if (sizeof(long double) == 16)
+ writeTypedef("float", "long double", 16);
+ else if (sizeof(double) == 16)
+ writeTypedef("float", "double", 16);
+ else if (sizeof(float) == 16)
+ writeTypedef("float", "float", 16);
+ else /*C has no 16 byte float so disable it in Fortran*/
+ {
+ printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n");
+ printf(" Disabling Fortran 16 byte REALs\n");
+ H5_C_HAS_REAL_NATIVE_16 = 0;
+ }
#endif /*H5_FORTRAN_HAS_REAL_NATIVE_16_KIND*/
- /* Now begin defining fortran types. */
- fprintf(c_header, "\n");
- /* haddr_t */
+ /* Now begin defining fortran types. */
+ fprintf(c_header, "\n");
+ /* haddr_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8
- writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int", "HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4
- writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int", "HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2
- writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int", "HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1
- writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int", "HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for haddr_t */
return -1;
#endif
- /* hsize_t */
+ /* hsize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8
- writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("hsize_t", "HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4
- writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("hsize_t", "HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2
- writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("hsize_t", "HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1
- writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("hsize_t", "HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hsize_t */
return -1;
#endif
- /* hssize_t */
+ /* hssize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8
- writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int", "HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4
- writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int", "HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2
- writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int", "HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1
- writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int", "HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hssize_t */
return -1;
#endif
- /* off_t */
+ /* off_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8
- writeToFiles("int","OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int", "OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4
- writeToFiles("int","OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int", "OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2
- writeToFiles("int","OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int", "OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1
- writeToFiles("int","OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int", "OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for off_t */
return -1;
#endif
- /* size_t */
+ /* size_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8
- writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("size_t", "SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4
- writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("size_t", "SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2
- writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("size_t", "SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1
- writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("size_t", "SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for size_t */
return -1;
#endif
- /* int */
+ /* int */
#if defined H5_FORTRAN_HAS_NATIVE_8_KIND
- writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
+ writeToFiles("int", "Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND
- writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
+ writeToFiles("int", "Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND
- writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
+ writeToFiles("int", "Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND
- writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
+ writeToFiles("int", "Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
#else
/* Error: couldn't find a size for int */
return -1;
#endif
- /* int_1, int_2, int_4, int_8 */
+ /* int_1, int_2, int_4, int_8 */
-/* Defined different KINDs of integers: */
-/* if the integer kind is not available then we assign */
-/* it a value of the next larger one, but if the next */
-/* higher one is not available we assigned it the next lowest */
+ /* Defined different KINDs of integers: */
+ /* if the integer kind is not available then we assign */
+ /* it a value of the next larger one, but if the next */
+ /* higher one is not available we assigned it the next lowest */
FoundIntSize[0] = -1;
FoundIntSize[1] = -2;
@@ -374,159 +378,159 @@ int main(void)
FoundIntSize[3] = -8;
#if defined H5_FORTRAN_HAS_INTEGER_1_KIND
- FoundIntSize[0] = 1;
+ FoundIntSize[0] = 1;
FoundIntSizeKind[0] = H5_FORTRAN_HAS_INTEGER_1_KIND;
#endif
#if defined H5_FORTRAN_HAS_INTEGER_2_KIND
- FoundIntSize[1] = 2;
+ FoundIntSize[1] = 2;
FoundIntSizeKind[1] = H5_FORTRAN_HAS_INTEGER_2_KIND;
#endif
#if defined H5_FORTRAN_HAS_INTEGER_4_KIND
- FoundIntSize[2] = 4;
+ FoundIntSize[2] = 4;
FoundIntSizeKind[2] = H5_FORTRAN_HAS_INTEGER_4_KIND;
#endif
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND
- FoundIntSize[3] = 8;
- FoundIntSizeKind[3] = H5_FORTRAN_HAS_INTEGER_8_KIND ;
+ FoundIntSize[3] = 8;
+ FoundIntSizeKind[3] = H5_FORTRAN_HAS_INTEGER_8_KIND;
#endif
- for(i=0;i<4;i++) {
- if( FoundIntSize[i] > 0) /* Found the integer type */
- {
- sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]);
- sprintf(chrB, "int_%d_f", FoundIntSize[i]);
- writeToFiles("int",chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
- }
- else /* Did not find the integer type */
- {
- flag = 0; /* flag indicating if found the next highest */
- for(j=i+1;j<4;j++) /* search for next highest */
- {
- if( FoundIntSize[j] > 0) /* Found the next highest */
- {
- sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
- sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
- writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
- flag = 1;
- break;
- }
- }
- if(flag == 0) /* No higher one found, so find next lowest */
- {
- for(j=2;j>-1;j--) /* Search for next lowest */
- {
- if( FoundIntSize[j] > 0) /* Found the next lowest */
- {
- sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
- sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
- writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
- flag = 1;
- break;
- }
- }
- }
- if(flag == 0) /* No higher or lower one found, indicating an error */
- return -1;
- }
+ for (i = 0; i < 4; i++) {
+ if (FoundIntSize[i] > 0) /* Found the integer type */
+ {
+ sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]);
+ sprintf(chrB, "int_%d_f", FoundIntSize[i]);
+ writeToFiles("int", chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
+ }
+ else /* Did not find the integer type */
+ {
+ flag = 0; /* flag indicating if found the next highest */
+ for (j = i + 1; j < 4; j++) /* search for next highest */
+ {
+ if (FoundIntSize[j] > 0) /* Found the next highest */
+ {
+ sprintf(chrA, "Fortran_INTEGER_%d", (-1) * FoundIntSize[i]);
+ sprintf(chrB, "int_%d_f", (-1) * FoundIntSize[i]);
+ writeToFiles("int", chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
+ flag = 1;
+ break;
+ }
+ }
+ if (flag == 0) /* No higher one found, so find next lowest */
+ {
+ for (j = 2; j > -1; j--) /* Search for next lowest */
+ {
+ if (FoundIntSize[j] > 0) /* Found the next lowest */
+ {
+ sprintf(chrA, "Fortran_INTEGER_%d", (-1) * FoundIntSize[i]);
+ sprintf(chrB, "int_%d_f", (-1) * FoundIntSize[i]);
+ writeToFiles("int", chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
+ flag = 1;
+ break;
+ }
+ }
+ }
+ if (flag == 0) /* No higher or lower one found, indicating an error */
+ return -1;
+ }
}
- /* real_4, real_8, real_16 */
+ /* real_4, real_8, real_16 */
-/* Defined different KINDs of reals: */
-/* if the REAL kind is not available then we assign */
-/* it a value of the next larger one, but if the next */
-/* higher one is not available we assigned it the next lowest */
+ /* Defined different KINDs of reals: */
+ /* if the REAL kind is not available then we assign */
+ /* it a value of the next larger one, but if the next */
+ /* higher one is not available we assigned it the next lowest */
FoundRealSize[0] = -4;
FoundRealSize[1] = -8;
FoundRealSize[2] = -16;
#if defined H5_FORTRAN_HAS_REAL_4_KIND
- FoundRealSize[0] = 4;
+ FoundRealSize[0] = 4;
FoundRealSizeKind[0] = H5_FORTRAN_HAS_REAL_4_KIND;
#endif
#if defined H5_FORTRAN_HAS_REAL_8_KIND
- FoundRealSize[1] = 8;
+ FoundRealSize[1] = 8;
FoundRealSizeKind[1] = H5_FORTRAN_HAS_REAL_8_KIND;
#endif
#if defined H5_FORTRAN_HAS_REAL_16_KIND
- if(H5_C_HAS_REAL_NATIVE_16 != 0) {
- FoundRealSize[2] = 16;
- FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND;
+ if (H5_C_HAS_REAL_NATIVE_16 != 0) {
+ FoundRealSize[2] = 16;
+ FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND;
}
#endif
- for(i=0;i<3;i++) {
- if( FoundRealSize[i] > 0) /* Found the real type */
- {
- sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]);
- sprintf(chrB, "real_%d_f", FoundRealSize[i]);
- writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
- }
- else /* Did not find the real type */
- {
- flag = 0; /* flag indicating if found the next highest */
- for(j=i+1;j<3;j++) /* search for next highest */
- {
- if( FoundRealSize[j] > 0) /* Found the next highest */
- {
- sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
- sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
- if(FoundRealSize[j]>4) {
- writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
- flag = 1;
- }
- /* else { */
-/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
-/* } */
- flag = 1;
- break;
- }
- }
- if(flag == 0) /* No higher one found, so find next lowest */
- {
- for(j=1;j>-1;j--) /* Search for next lowest */
- {
- if( FoundRealSize[j] > 0) /* Found the next lowest */
- {
- sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
- sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
- if(FoundRealSize[j]>4)
- writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
- /* else { */
-/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
-/* } */
- flag = 1;
- break;
- }
- }
- }
- if(flag == 0) /* No higher or lower one found, indicating an error */
- return -1;
- }
+ for (i = 0; i < 3; i++) {
+ if (FoundRealSize[i] > 0) /* Found the real type */
+ {
+ sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]);
+ sprintf(chrB, "real_%d_f", FoundRealSize[i]);
+ writeToFiles("float", chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
+ }
+ else /* Did not find the real type */
+ {
+ flag = 0; /* flag indicating if found the next highest */
+ for (j = i + 1; j < 3; j++) /* search for next highest */
+ {
+ if (FoundRealSize[j] > 0) /* Found the next highest */
+ {
+ sprintf(chrA, "Fortran_REAL_%d", (-1) * FoundRealSize[i]);
+ sprintf(chrB, "real_%d_f", (-1) * FoundRealSize[i]);
+ if (FoundRealSize[j] > 4) {
+ writeToFiles("float", chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
+ flag = 1;
+ }
+ /* else { */
+ /* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
+ /* } */
+ flag = 1;
+ break;
+ }
+ }
+ if (flag == 0) /* No higher one found, so find next lowest */
+ {
+ for (j = 1; j > -1; j--) /* Search for next lowest */
+ {
+ if (FoundRealSize[j] > 0) /* Found the next lowest */
+ {
+ sprintf(chrA, "Fortran_REAL_%d", (-1) * FoundRealSize[i]);
+ sprintf(chrB, "real_%d_f", (-1) * FoundRealSize[i]);
+ if (FoundRealSize[j] > 4)
+ writeToFiles("float", chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
+ /* else { */
+ /* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
+ /* } */
+ flag = 1;
+ break;
+ }
+ }
+ }
+ if (flag == 0) /* No higher or lower one found, indicating an error */
+ return -1;
+ }
}
- /* hid_t */
+ /* hid_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8
- writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int", "HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4
- writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int", "HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2
- writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int", "HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1
- writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int", "HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4
- writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int", "HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#else
/* Error: couldn't find a size for hid_t */
return -1;
#endif
- /* real_f */
+ /* real_f */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND
- if(H5_C_HAS_REAL_NATIVE_16 != 0) {
- writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
+ if (H5_C_HAS_REAL_NATIVE_16 != 0) {
+ writeToFiles("float", "Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
}
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND
writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
@@ -537,20 +541,21 @@ int main(void)
return -1;
#endif
- /* double_f */
+ /* double_f */
#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND
- if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */
- writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
- } else {
+ if (H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
+ }
+ else {
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */
- writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
}
-#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */
- writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
+#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
}
#else
- /* Error: couldn't find a size for double_f when fortran has 16 byte reals */
- return -1;
+ /* Error: couldn't find a size for double_f when fortran has 16 byte reals */
+ return -1;
}
#endif
@@ -561,19 +566,18 @@ int main(void)
return -1;
#endif
- /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03'
- * in order to be interoperable with C's structure, the C buffer size
- * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4)
- */
-
- fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 );
+ /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03'
+ * in order to be interoperable with C's structure, the C buffer size
+ * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4)
+ */
+ fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n",
+ H5_SIZEOF_HADDR_T + 4);
- /* Close files */
- endCfile();
- endFfile();
- fclose(c_header);
- fclose(fort_header);
- return 0;
+ /* Close files */
+ endCfile();
+ endFfile();
+ fclose(c_header);
+ fclose(fort_header);
+ return 0;
}
-
diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90
index 3016c42..88d7c82 100644
--- a/fortran/src/H5test_kind.f90
+++ b/fortran/src/H5test_kind.f90
@@ -30,7 +30,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -99,7 +99,7 @@ WRITE(*,'(40(A,/))') &
'! This file is part of HDF5. The full HDF5 copyright notice, including *',&
'! terms governing use, modification, and redistribution, is contained in *',&
'! the COPYING file, which can be found at the root of the source code *',&
-'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',&
+'! distribution tree, or in https://www.hdfgroup.org/licenses. *',&
'! If you do not have access to either file, you may request a copy from *',&
'! help@hdfgroup.org. *',&
'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',&
diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90
index 137cc48..e8f1132 100644
--- a/fortran/src/H5test_kind_SIZEOF.f90
+++ b/fortran/src/H5test_kind_SIZEOF.f90
@@ -17,7 +17,7 @@
! function SIZEOF is available. It generates code that makes use of SIZEOF in
! H5fortran_detect.f90 which is a portable solution but is not standard
! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic
-! function instead, which is the preferred method.
+! function instead, which is the preferred method.
!
! The availability of SIZEOF is checked at configure time and the TRUE/FALSE
! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
@@ -31,7 +31,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -104,7 +104,7 @@ WRITE(*,'(40(A,/))') &
'! This file is part of HDF5. The full HDF5 copyright notice, including *',&
'! terms governing use, modification, and redistribution, is contained in *',&
'! the COPYING file, which can be found at the root of the source code *',&
-'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',&
+'! distribution tree, or in https://www.hdfgroup.org/licenses. *',&
'! If you do not have access to either file, you may request a copy from *',&
'! help@hdfgroup.org. *',&
'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',&
diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.f90 b/fortran/src/H5test_kind_STORAGE_SIZE.f90
index cf59cb9..8007d1f 100644
--- a/fortran/src/H5test_kind_STORAGE_SIZE.f90
+++ b/fortran/src/H5test_kind_STORAGE_SIZE.f90
@@ -32,10 +32,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! AUTHOR
@@ -106,7 +106,7 @@ WRITE(*,'(40(A,/))') &
'! This file is part of HDF5. The full HDF5 copyright notice, including *',&
'! terms governing use, modification, and redistribution, is contained in *',&
'! the COPYING file, which can be found at the root of the source code *',&
-'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',&
+'! distribution tree, or in https://www.hdfgroup.org/licenses. *',&
'! If you do not have access to either file, you may request a copy from *',&
'! help@hdfgroup.org. *',&
'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',&
diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90
index 67fbc61..50d1e4a 100644
--- a/fortran/src/HDF5.f90
+++ b/fortran/src/HDF5.f90
@@ -10,18 +10,18 @@
! This is the main module used for linking to the Fortran HDF library.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90
index ccc64b1..7d50683 100644
--- a/fortran/src/HDF5mpio.f90
+++ b/fortran/src/HDF5mpio.f90
@@ -15,10 +15,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index e0e6cbd..d360aea 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index d120957..9e42607 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -466,12 +466,12 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory in both Fortran and C flags (C compiler is used
# for linking).
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/fortran/src
@@ -487,6 +487,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -505,6 +506,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -532,6 +534,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -539,9 +543,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -557,6 +564,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -578,6 +586,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -590,8 +599,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -605,6 +616,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -646,6 +658,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -734,26 +747,26 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
AM_FCLIBS = $(LIBHDF5)
@@ -829,11 +842,11 @@ H5fortran_detect_SOURCES = H5fortran_detect.f90
# Mark this directory as part of the Fortran API
FORTRAN_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1485,6 +1498,7 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1520,7 +1534,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1681,7 +1695,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 29ef83f..959971c 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 48fb343..19e3a60 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -566,9 +566,3 @@ H5T_mp_H5TGET_NATIVE_TYPE_F
H5Z_mp_H5ZUNREGISTER_F
H5Z_mp_H5ZFILTER_AVAIL_F
H5Z_mp_H5ZGET_FILTER_INFO_F
-; Parallel
-@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 738891e..6a4bef1 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,119 +1,141 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
-# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
+else ()
+ file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
-add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
-set_source_files_properties (t.c PROPERTIES LANGUAGE C)
-target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
-TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
- ${HDF5_F90_C_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
-)
-H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
- FOLDER libraries/test/fortran
- LINKER_LANGUAGE C
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
- target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
- TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
+ add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h)
+ target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
+ TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
- ${HDF5_F90_C_LIBSH_TARGET}
- ${HDF5_TEST_LIBSH_TARGET}
+ PRIVATE ${HDF5_F90_C_LIBSH_TARGET}
+ PUBLIC ${HDF5_TEST_LIBSH_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE C
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
+else ()
+ add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h)
+ set_source_files_properties (t.c PROPERTIES LANGUAGE C)
+ target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
+ PRIVATE ${HDF5_F90_C_LIB_TARGET}
+ PUBLIC ${HDF5_TEST_LIB_TARGET}
+ )
+ H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
+ FOLDER libraries/test/fortran
+ LINKER_LANGUAGE C
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIB_TARGET})
+ else ()
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIBSH_TARGET})
+ endif ()
endif ()
# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then
# fall back to F2003. If F2003 not supported then use F90 for the tests.
set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran)
-if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
- add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90)
+if (H5_FORTRAN_HAVE_STORAGE_SIZE AND H5_FORTRAN_HAVE_C_SIZEOF)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F08.f90 tf.f90)
+ else ()
+ add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90)
endif ()
elseif (HDF5_ENABLE_F2003)
- add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F03.f90 tf.f90)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F03.f90 tf.f90)
+ else ()
+ add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F03.f90 tf.f90)
endif ()
else ()
- add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F90.f90 tf.f90)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F90.f90 tf.f90)
+ else ()
+ add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F90.f90 tf.f90)
endif ()
endif ()
-TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_C_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0)
-target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
- FOLDER libraries/test/fortran
- LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
-)
-if (WIN32)
- set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY
- COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
- )
-endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- set (SHARED_LINK_FLAGS " ")
- if (WIN32 AND MSVC)
- set (SHARED_LINK_FLAGS "/DLL")
- endif ()
- TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_F90_C_TEST_LIBSH_TARGET}
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET}
+ PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
)
- H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F")
- target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_compile_options(${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_F90_TEST_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">)
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL")
+ endif()
set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE Fortran
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32)
- set_property (TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY
- COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS"
- )
- endif ()
+ H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F")
+else ()
+ target_include_directories (${HDF5_F90_TEST_LIB_TARGET}
+ PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
+ )
+ target_compile_options(${HDF5_F90_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_F90_TEST_LIB_TARGET}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
+# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
+ FOLDER libraries/test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0)
endif ()
#-----------------------------------------------------------------------------
@@ -138,54 +160,34 @@ add_executable (testhdf5_fortran
tH5Z.f90
tHDF5.f90
)
-TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
-target_link_libraries (testhdf5_fortran
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-if (WIN32 AND MSVC)
- target_link_libraries (testhdf5_fortran "ws2_32.lib")
-endif ()
-target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (testhdf5_fortran PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+target_compile_options(testhdf5_fortran
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
+#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+if(MSVC)
+ set_property(TARGET testhdf5_fortran PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (testhdf5_fortran-shared
- fortranlib_test.f90
- tH5A.f90
- tH5D.f90
- tH5E.f90
- tH5F.f90
- tH5G.f90
- tH5I.f90
- tH5P.f90
- tH5R.f90
- tH5S.f90
- tH5Sselect.f90
- tH5T.f90
- tH5VL.f90
- tH5Z.f90
- tHDF5.f90
- )
- TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran-shared
- ${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (testhdf5_fortran PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32 AND MSVC)
- target_link_libraries (testhdf5_fortran-shared "ws2_32.lib")
- endif ()
- target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (testhdf5_fortran-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIBSH_TARGET})
+else ()
+ target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (testhdf5_fortran PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+ add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET})
endif ()
#-- Adding test for testhdf5_fortran_1_8
@@ -197,45 +199,34 @@ add_executable (testhdf5_fortran_1_8
tH5MISC_1_8.f90
tHDF5_1_8.f90
)
-TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
-target_link_libraries (testhdf5_fortran_1_8
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-if (WIN32 AND MSVC)
- target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib")
-endif ()
-target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (testhdf5_fortran_1_8 PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+target_compile_options(testhdf5_fortran_1_8
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
+#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+if(MSVC)
+ set_property(TARGET testhdf5_fortran_1_8 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (testhdf5_fortran_1_8-shared
- fortranlib_test_1_8.f90
- tH5O.f90
- tH5A_1_8.f90
- tH5G_1_8.f90
- tH5MISC_1_8.f90
- tHDF5_1_8.f90
- )
- TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran_1_8-shared
- ${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (testhdf5_fortran_1_8 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32 AND MSVC)
- target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib")
- endif ()
- target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIBSH_TARGET})
+else ()
+ target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (testhdf5_fortran_1_8 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+ add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET})
endif ()
#-- Adding test for fortranlib_test_F03
@@ -250,121 +241,101 @@ if (HDF5_ENABLE_F2003)
tH5T_F03.f90
tHDF5_F03.f90
)
- TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
- target_link_libraries (fortranlib_test_F03
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- )
- if (WIN32 AND MSVC)
- target_link_libraries (fortranlib_test_F03 "ws2_32.lib")
- endif ()
-
- target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_target_properties (fortranlib_test_F03 PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ target_compile_options(fortranlib_test_F03
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
+#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET fortranlib_test_F03 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (fortranlib_test_F03-shared
- fortranlib_test_F03.f90
- tH5E_F03.f90
- tH5F_F03.f90
- tH5L_F03.f90
- tH5O_F03.f90
- tH5P_F03.f90
- tH5T_F03.f90
- tHDF5_F03.f90
- )
- TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
- target_link_libraries (fortranlib_test_F03-shared
- ${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
- )
- if (WIN32 AND MSVC)
- target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib")
- endif ()
- target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (fortranlib_test_F03-shared PROPERTIES
+ target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
+ )
+ add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIBSH_TARGET})
+ else ()
+ target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fortranlib_test_F03 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET})
endif ()
endif ()
#-- Adding test for fflush1
add_executable (fflush1 fflush1.f90)
-TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
-target_link_libraries (fflush1
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-if (WIN32 AND MSVC)
- target_link_libraries (fflush1 "ws2_32.lib")
-endif ()
-target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (fflush1 PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+target_compile_options(fflush1
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
+#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+if(MSVC)
+ set_property(TARGET fflush1 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (fflush1-shared fflush1.f90)
- TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
- target_link_libraries (fflush1-shared
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fflush1 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32 AND MSVC)
- target_link_libraries (fflush1-shared "ws2_32.lib")
- endif ()
- target_include_directories (fflush1-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (fflush1-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ add_dependencies (fflush1 ${HDF5_F90_TEST_LIBSH_TARGET})
+else ()
+ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fflush1 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+ add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET})
endif ()
#-- Adding test for fflush2
add_executable (fflush2 fflush2.f90)
-TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
-target_link_libraries (fflush2
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-if (WIN32 AND MSVC)
- target_link_libraries (fflush2 "ws2_32.lib")
-endif ()
-target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (fflush2 PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+target_compile_options (fflush2
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
+#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+if(MSVC)
+ set_property(TARGET fflush2 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (fflush2-shared fflush2.f90)
- TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
- target_link_libraries (fflush2-shared
- ${HDF5_F90_TEST_LIBSH_TARGET}
- ${HDF5_F90_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
+ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fflush2 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32 AND MSVC)
- target_link_libraries (fflush2-shared "ws2_32.lib")
- endif ()
- target_include_directories (fflush2-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (fflush2-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ add_dependencies (fflush2 ${HDF5_F90_TEST_LIBSH_TARGET})
+else ()
+ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ set_target_properties (fflush2 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+ add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET})
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index e4d8cc1..8237d86 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,50 +16,140 @@
##############################################################################
##############################################################################
-add_test (NAME FORTRAN_testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
-set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+set (testhdf5_fortran_CLEANFILES
+ a.h5
+ b.h5
+ c.h5
+ d.h5
+ dsetf_F03.h5
+ enum1.h5
+ extern_1a.raw
+ extern_2a.raw
+ extern_3a.raw
+ extern_4a.raw
+ extren_raw.raw
+ get_info.h5
+ nbit.h5
+ t_array_F03.h5
+ t_bit_F03.h5
+ t_controlchar_F03.h5
+ t_enum_F03.h5
+ t_objref_F03.h5
+ t_opaque_F03.h5
+ t_regref_F03.h5
+ t_string_F03.h5
+ t_vlen_F03.h5
+ t_vlstring_F03.h5
+ t_vlstringrw_F03.h5
+ tarray1.h5
+ tarray2.h5
+ tarray3.h5
+ test_create.h5
+ tget_file_image.h5
+ th5o_ref.h5
+ titerate.h5
+ visit.h5
+)
+
+# Remove any output file left over from previous test run
+add_test (
+ NAME FORTRAN_testhdf5-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
+)
+set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5_fortran)
+
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
+else ()
+ add_test (NAME FORTRAN_testhdf5_fortran COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5_fortran>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_REGEX= 0 error.s."
+ -D "TEST_MATCH= 0 error(s)"
+ -D "TEST_OUTPUT=testhdf5_fortran.txt"
+ #-D "TEST_REFERENCE=testhdf5_fortran.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+endif ()
+#set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for testhdf5_fortran_1_8
-add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
-set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran_1_8>)
+else ()
+ add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5_fortran_1_8>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_REGEX= 0 error.s."
+ -D "TEST_MATCH= 0 error(s)"
+ -D "TEST_OUTPUT=testhdf5_fortran_1_8.txt"
+ #-D "TEST_REFERENCE=testhdf5_fortran_1_8.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+endif ()
+#set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+#set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
+set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES
+ DEPENDS FORTRAN_testhdf5_fortran
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
- add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
- set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
- set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fortranlib_test_F03>)
+ else ()
+ add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_REGEX= 0 error.s."
+ -D "TEST_MATCH= 0 error(s)"
+ -D "TEST_OUTPUT=fortranlib_test_F03.txt"
+ #-D "TEST_REFERENCE=fortranlib_test_F03.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+# set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+# set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
+ set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES
+ DEPENDS FORTRAN_testhdf5_fortran_1_8
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+ )
endif ()
#-- Adding test for fflush1
-add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
+add_test (
+ NAME FORTRAN_flush1-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove flush.h5
+)
+add_test (
+ NAME FORTRAN_fflush1
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush1>
+)
+set_tests_properties (FORTRAN_fflush1 PROPERTIES
+ DEPENDS FORTRAN_flush1-clear-objects
+)
#-- Adding test for fflush2
-add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
-set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
-
-if (BUILD_SHARED_LIBS AND TEST_SHARED_PROGRAMS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $<TARGET_FILE:testhdf5_fortran-shared>)
- set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
- set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
-
- #-- Adding test for testhdf5_fortran_1_8
- add_test (NAME FORTRAN_testhdf5_fortran_1_8-shared COMMAND $<TARGET_FILE:testhdf5_fortran_1_8-shared>)
- set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
- set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
-
- #-- Adding test for fortranlib_test_F03
- if (HDF5_ENABLE_F2003)
- add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>)
- set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
- set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03)
- endif ()
-
- #-- Adding test for fflush1
- add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>)
- set_tests_properties (FORTRAN_fflush1-shared PROPERTIES DEPENDS FORTRAN_fflush2)
-
- #-- Adding test for fflush2
- add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
- set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
-endif ()
+add_test (
+ NAME FORTRAN_fflush2
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush2>
+)
+set_tests_properties (FORTRAN_fflush2 PROPERTIES
+ DEPENDS FORTRAN_fflush1
+)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index b150426..619037d 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index b715720..68017e7 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -474,10 +474,10 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_builddir)/fortran/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
# Include files
@@ -495,6 +495,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -513,6 +514,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -540,6 +542,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -547,9 +551,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -565,6 +572,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -586,6 +594,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -598,8 +607,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -613,6 +624,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -654,6 +666,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -793,11 +806,11 @@ MOSTLYCLEANFILES = *.tmp
# from tests in conclude.am)
FORTRAN_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1428,7 +1441,7 @@ uninstall-am:
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -1461,6 +1474,7 @@ clean-local:
# fflush2 depends on files created by fflush1
fflush2.chkexe_: fflush1.chkexe_
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1496,7 +1510,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1657,7 +1671,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.f90
index bd1f551..c66f2dd 100644
--- a/fortran/test/fflush1.f90
+++ b/fortran/test/fflush1.f90
@@ -10,18 +10,18 @@
! the program using stop statement
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90
index d5b9b7c..303abdf 100644
--- a/fortran/test/fflush2.f90
+++ b/fortran/test/fflush2.f90
@@ -10,18 +10,18 @@
! file created by the first half.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 88fe9ff..1d058e7 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran API's functionality.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.f90
index 1306da5..e4adae1 100644
--- a/fortran/test/fortranlib_test_1_8.f90
+++ b/fortran/test/fortranlib_test_1_8.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran API's introduced in 1.8 release.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90
index 2c430e3..ac8ac4e 100644
--- a/fortran/test/fortranlib_test_F03.f90
+++ b/fortran/test/fortranlib_test_F03.f90
@@ -8,18 +8,18 @@
! compliance.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/t.c b/fortran/test/t.c
index 107e8d5..6dce111 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -15,13 +15,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "t.h"
#include "H5Eprivate.h"
@@ -40,34 +40,34 @@
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl, _fcd full_name, size_t_f *full_namelen)
+nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_name, size_t_f *full_namelen)
{
- char *c_base_name = NULL;
- char *c_full_name = NULL;
- int_f ret_value = 0;
+ char *c_base_name = NULL;
+ char *c_full_name = NULL;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen)))
- HGOTO_DONE(FAIL)
- if(NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1)))
- HGOTO_DONE(FAIL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen)))
+ HGOTO_DONE(FAIL)
+ if (NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1)))
+ HGOTO_DONE(FAIL)
- /*
- * Call h5_fixname function.
- */
- if(NULL == h5_fixname(c_base_name, (hid_t)*fapl, c_full_name, (size_t)*full_namelen + 1))
- HGOTO_DONE(FAIL)
- HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
+ /*
+ * Call h5_fixname function.
+ */
+ if (NULL == h5_fixname(c_base_name, (hid_t)*fapl, c_full_name, (size_t)*full_namelen + 1))
+ HGOTO_DONE(FAIL)
+ HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
done:
- if(c_base_name)
+ if (c_base_name)
HDfree(c_base_name);
- if(c_full_name)
+ if (c_full_name)
HDfree(c_full_name);
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -82,40 +82,41 @@ done:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl)
+nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl)
{
- char filename[1024];
- int ret_value = -1;
- char *c_base_name[1];
- hid_t c_fapl;
+ char filename[1024];
+ int ret_value = -1;
+ char *c_base_name[1];
+ hid_t c_fapl;
- /*
- * Define ifile access property list
- */
- c_fapl = (hid_t)*fapl;
- /*c_fapl = H5Pcreate(H5P_FILE_ACCESS);*/
- /*
- * Convert FORTRAN name to C name
- */
- c_base_name[0] = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
- if (c_base_name[0] == NULL) goto DONE;
+ /*
+ * Define ifile access property list
+ */
+ c_fapl = (hid_t)*fapl;
+ /*c_fapl = H5Pcreate(H5P_FILE_ACCESS);*/
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_base_name[0] = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
+ if (c_base_name[0] == NULL)
+ goto DONE;
- /*
- * Call h5_cleanup function.
- */
- /*if (h5_cleanup(c_base_name, c_fapl) != 0) {
- ret_value = 0;
- goto DONE;
- }
+ /*
+ * Call h5_cleanup function.
+ */
+ /*if (h5_cleanup(c_base_name, c_fapl) != 0) {
+ ret_value = 0;
+ goto DONE;
+ }
*/
- h5_fixname(c_base_name[0], c_fapl, filename, sizeof(filename));
- HDremove(filename);
- ret_value =0;
+ h5_fixname(c_base_name[0], c_fapl, filename, sizeof(filename));
+ HDremove(filename);
+ ret_value = 0;
DONE:
- if (NULL != c_base_name[0]) HDfree(c_base_name[0]);
- return ret_value;
-
+ if (NULL != c_base_name[0])
+ HDfree(c_base_name[0]);
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -134,7 +135,7 @@ void
nh5_exit_c(int_f *status)
{
HDexit((int)*status);
-} /* h5_exit_c */
+} /* h5_exit_c */
/*----------------------------------------------------------------------------
* Name: h5_env_nocleanup_c
@@ -150,8 +151,7 @@ nh5_exit_c(int_f *status)
void
nh5_env_nocleanup_c(int_f *status)
{
- *status = (int_f)0;
- if (HDgetenv("HDF5_NOCLEANUP"))
- *status = (int_f)1;
-} /* h5_env_nocleanup_c */
-
+ *status = (int_f)0;
+ if (HDgetenv("HDF5_NOCLEANUP"))
+ *status = (int_f)1;
+} /* h5_env_nocleanup_c */
diff --git a/fortran/test/t.h b/fortran/test/t.h
index 81d2b5d..2066552 100644
--- a/fortran/test/t.h
+++ b/fortran/test/t.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,20 +21,16 @@ char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
/*
* Functions from t.c
*/
-# define nh5_fixname_c H5_FC_FUNC_(h5_fixname_c, H5_FIXNAME_C)
-# define nh5_cleanup_c H5_FC_FUNC_(h5_cleanup_c, H5_CLEANUP_C)
-# define nh5_exit_c H5_FC_FUNC_(h5_exit_c, H5_EXIT_C)
-# define nh5_env_nocleanup_c H5_FC_FUNC_(h5_env_nocleanup_c, H5_ENV_NOCLEANUP_C)
+#define nh5_fixname_c H5_FC_FUNC_(h5_fixname_c, H5_FIXNAME_C)
+#define nh5_cleanup_c H5_FC_FUNC_(h5_cleanup_c, H5_CLEANUP_C)
+#define nh5_exit_c H5_FC_FUNC_(h5_exit_c, H5_EXIT_C)
+#define nh5_env_nocleanup_c H5_FC_FUNC_(h5_env_nocleanup_c, H5_ENV_NOCLEANUP_C)
-H5_FCTESTDLL int_f nh5_fixname_c
-(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_name, size_t_f *full_namelen);
+H5_FCTESTDLL int_f nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_name,
+ size_t_f *full_namelen);
-H5_FCTESTDLL int_f nh5_cleanup_c
-(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl);
+H5_FCTESTDLL int_f nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl);
-H5_FCTESTDLL H5_ATTR_NORETURN void nh5_exit_c
-(int_f *status);
-
-H5_FCTESTDLL void nh5_env_nocleanup_c
-(int_f *status);
+H5_FCTESTDLL H5_ATTR_NORETURN void nh5_exit_c(int_f *status);
+H5_FCTESTDLL void nh5_env_nocleanup_c(int_f *status);
diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90
index 61113e8..25c04c3 100644
--- a/fortran/test/tH5A.f90
+++ b/fortran/test/tH5A.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5A APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! attribute_test
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index f294a8b..93af53b 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5A APIs introduced in 1.8.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! attribute_test_1_8, test_attr_corder_create_compact, test_attr_null_space,
diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90
index 283251e..331f3ee 100644
--- a/fortran/test/tH5D.f90
+++ b/fortran/test/tH5D.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5D APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests the H5D APIs functionalities of:
diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.f90
index 3cda6e1..e4e8d95 100644
--- a/fortran/test/tH5E.f90
+++ b/fortran/test/tH5E.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5E APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests the H5D APIs functionalities of:
diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.f90
index 1790e20..8a5b36e 100644
--- a/fortran/test/tH5E_F03.f90
+++ b/fortran/test/tH5E_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! USES
! liter_cb_mod
diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90
index e2494c0..4e61140 100644
--- a/fortran/test/tH5F.f90
+++ b/fortran/test/tH5F.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5F APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! mountingtest, reopentest, plisttest, file_close, file_space
diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90
index 134e952..1e6d1bd 100644
--- a/fortran/test/tH5F_F03.f90
+++ b/fortran/test/tH5F_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests the H5F APIs functionalities of:
diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.f90
index 0b6cc1a..0e8c9af 100644
--- a/fortran/test/tH5G.f90
+++ b/fortran/test/tH5G.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5G APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! group_test
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index ab30116..85f8722 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5G APIs introduced in 1.8.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! group_test, group_info, timestamps, mklinks, test_move_preserves, lifecycle
diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90
index aa7a071..b7693ea 100644
--- a/fortran/test/tH5I.f90
+++ b/fortran/test/tH5I.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5I APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! identifier_test
diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90
index 43b2137..8d5b99d 100644
--- a/fortran/test/tH5L_F03.f90
+++ b/fortran/test/tH5L_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! USES
! liter_cb_mod
diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90
index 5a8d9c7..6e0a102 100644
--- a/fortran/test/tH5MISC_1_8.f90
+++ b/fortran/test/tH5MISC_1_8.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran API's introduced in 1.8 release.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
MODULE TH5MISC_1_8
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index 9877af8..02f0e14 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5O APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! test_h5o, test_h5o_link, test_h5o_plist
diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.f90
index be937cd..fcdbc91 100644
--- a/fortran/test/tH5O_F03.f90
+++ b/fortran/test/tH5O_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index aa43989..a23cf43 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5P APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! external_test, multi_file_test
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index 42e9c37..5545af9 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! USES
! test_genprop_cls_cb1_mod
diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90
index 25b3732..50b26d5 100644
--- a/fortran/test/tH5R.f90
+++ b/fortran/test/tH5R.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5R, Reference Interface, APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests h5rcreate_f, h5rdereference_f, h5rget_name_f
diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90
index ba258b9..b042bae 100644
--- a/fortran/test/tH5S.f90
+++ b/fortran/test/tH5S.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5S, Dataspace Interface, APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests the following functionalities:
diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90
index 8867bf6..92a6e18 100644
--- a/fortran/test/tH5Sselect.f90
+++ b/fortran/test/tH5Sselect.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5S, Selection-related Dataspace Interface, APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
! Tests the following functionalities:
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index 2ae1afc..c06a5a1 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5T APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! compoundtest, basic_data_type_test, enumtest, test_derived_flt
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index 99e478f..2799f84 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -8,18 +8,18 @@
! features.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! CONTAINS SUBROUTINES
@@ -1541,7 +1541,7 @@ SUBROUTINE t_bit(total_error)
INTEGER :: A, B, C, D
INTEGER :: Aw, Bw, Cw, Dw
INTEGER :: i, j
- INTEGER, PARAMETER :: hex = Z'00000003'
+ INTEGER, PARAMETER :: hex = INT(Z'00000003')
TYPE(C_PTR) :: f_ptr
INTEGER :: error ! Error flag
!
diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.f90
index fc29e06..c2c4454 100644
--- a/fortran/test/tH5VL.f90
+++ b/fortran/test/tH5VL.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran Variable_length datatypes APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! vl_test_integer, vl_test_real, vl_test_string
diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.f90
index 0fd7b1b..56f1b3f 100644
--- a/fortran/test/tH5Z.f90
+++ b/fortran/test/tH5Z.f90
@@ -7,18 +7,18 @@
! Basic testing of Fortran H5Z szip APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! filters_test, szip_test
diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.f90
index c642f40..fcc5df0 100644
--- a/fortran/test/tHDF5.f90
+++ b/fortran/test/tHDF5.f90
@@ -10,18 +10,18 @@
! This is the test module used for testing the Fortran90 HDF library APIs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/tHDF5_1_8.f90 b/fortran/test/tHDF5_1_8.f90
index 35e59e5..b2e4e85 100644
--- a/fortran/test/tHDF5_1_8.f90
+++ b/fortran/test/tHDF5_1_8.f90
@@ -11,18 +11,18 @@
! 1.8.* APIs
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/tHDF5_F03.f90 b/fortran/test/tHDF5_F03.f90
index 8bd626d..e7adf2b 100644
--- a/fortran/test/tHDF5_F03.f90
+++ b/fortran/test/tHDF5_F03.f90
@@ -11,18 +11,18 @@
! library APIS.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 32d03b9..083ed4d 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -7,18 +7,18 @@
! Contains subroutines which are needed in all the hdf5 fortran tests
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f,
diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90
index 43d07fd..533435e 100644
--- a/fortran/test/tf_F03.f90
+++ b/fortran/test/tf_F03.f90
@@ -8,18 +8,18 @@
! Needed by the hdf5 fortran tests.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! H5_SIZEOF
diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90
index d67e087..7c9a07b 100644
--- a/fortran/test/tf_F08.f90
+++ b/fortran/test/tf_F08.f90
@@ -8,18 +8,18 @@
! the hdf5 fortran tests.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! CONTAINS SUBROUTINES
! H5_SIZEOF
diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90
index 88362bc..e4cbffa 100644
--- a/fortran/test/tf_F90.f90
+++ b/fortran/test/tf_F90.f90
@@ -8,18 +8,18 @@
! Needed by tf.f90 for the test programs.
!
! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!*****
MODULE TH5_MISC_PROVISIONAL
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 979d305..e527f98 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,10 +1,15 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_FORTRAN_TESTPAR C Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${CMAKE_Fortran_MODULE_DIRECTORY}/static ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src))
+if (NOT ONLY_SHARED_LIBS)
+ set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+else ()
+ set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+endif ()
#-----------------------------------------------------------------------------
# Add Tests
@@ -16,18 +21,44 @@ add_executable (parallel_test
hyper.f90
mdset.f90
)
-TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ")
-target_link_libraries (parallel_test
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- ${LINK_Fortran_LIBS}
+target_include_directories (parallel_test
+ PRIVATE ${TESTPAR_INCLUDES}
+)
+target_compile_options(parallel_test
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-if (WIN32 AND MSVC)
- target_link_libraries (parallel_test "ws2_32.lib")
+if (NOT ONLY_SHARED_LIBS)
+ target_link_libraries (parallel_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (parallel_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+else ()
+ target_link_libraries (parallel_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (parallel_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
endif ()
-target_include_directories (parallel_test PRIVATE ${TESTPAR_INCLUDES})
-set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (parallel_test PROPERTIES FOLDER test/fortran)
-include (CMakeTests.cmake)
+#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+if(MSVC)
+ set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
+
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake
index d00a6fc..02eb897 100644
--- a/fortran/testpar/CMakeTests.cmake
+++ b/fortran/testpar/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -15,4 +15,4 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_test> ${MPIEXEC_POSTFLAGS})
+add_test (NAME MPI_TEST_FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_test> ${MPIEXEC_POSTFLAGS})
diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am
index 00bc3db..fcb0746 100644
--- a/fortran/testpar/Makefile.am
+++ b/fortran/testpar/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index ea20988..4dbe754 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -401,9 +401,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
# Include files
@@ -423,6 +423,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -441,6 +442,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -468,6 +470,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -475,9 +479,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -493,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,6 +522,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -526,8 +535,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -541,6 +552,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -582,6 +594,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -680,11 +693,11 @@ LDADD = $(LIBH5FTEST) $(LIBH5TEST) $(LIBH5F) $(LIBHDF5)
# Mark this directory as part of the Fortran API
FORTRAN_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1133,6 +1146,7 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1168,7 +1182,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1329,7 +1343,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/fortran/testpar/hyper.f90 b/fortran/testpar/hyper.f90
index 844ad56..9109254 100644
--- a/fortran/testpar/hyper.f90
+++ b/fortran/testpar/hyper.f90
@@ -6,7 +6,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -18,9 +18,10 @@
SUBROUTINE hyper(length,do_collective,do_chunk, mpi_size, mpi_rank, nerrors)
USE HDF5
+ USE MPI
USE TH5_MISC
+
IMPLICIT NONE
- INCLUDE 'mpif.h'
INTEGER, INTENT(in) :: length ! array length
LOGICAL, INTENT(in) :: do_collective ! use collective I/O
diff --git a/fortran/testpar/mdset.f90 b/fortran/testpar/mdset.f90
index 70d2939..22b7a6c 100644
--- a/fortran/testpar/mdset.f90
+++ b/fortran/testpar/mdset.f90
@@ -6,7 +6,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -18,9 +18,10 @@
SUBROUTINE multiple_dset_write(length, do_collective, do_chunk, mpi_size, mpi_rank, nerrors)
USE HDF5
+ USE MPI
USE TH5_MISC
+
IMPLICIT NONE
- INCLUDE 'mpif.h'
INTEGER, INTENT(in) :: length ! array length
LOGICAL, INTENT(in) :: do_collective ! use collective I/O
diff --git a/fortran/testpar/ptest.f90 b/fortran/testpar/ptest.f90
index 432b443..17dc586 100644
--- a/fortran/testpar/ptest.f90
+++ b/fortran/testpar/ptest.f90
@@ -6,7 +6,7 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -16,10 +16,11 @@
!//////////////////////////////////////////////////////////
PROGRAM parallel_test
- USE hdf5
+ USE HDF5
+ USE MPI
+ USE TH5_MISC
IMPLICIT NONE
- INCLUDE 'mpif.h'
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: hdferror ! HDF hdferror flag
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index 54d5976..083c60e 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,16 +1,9 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL C CXX)
-
-#-----------------------------------------------------------------------------
-# Apply Definitions to compiler in this directory and below
-#-----------------------------------------------------------------------------
-add_definitions (${HDF_EXTRA_C_FLAGS})
-
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL C)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src )
add_subdirectory (src)
@@ -25,8 +18,6 @@ if (HDF5_BUILD_EXAMPLES)
endif ()
#-- Build the Unit testing if requested
-if (NOT HDF5_EXTERNALLY_CONFIGURED)
- if (BUILD_TESTING)
- add_subdirectory (test)
- endif ()
+if (BUILD_TESTING AND HDF5_TEST_SERIAL)
+ add_subdirectory (test)
endif ()
diff --git a/hl/COPYING b/hl/COPYING
index 6497ace..97969da 100644
--- a/hl/COPYING
+++ b/hl/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/Makefile.am b/hl/Makefile.am
index aee1f86..4e57228 100644
--- a/hl/Makefile.am
+++ b/hl/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -32,10 +32,21 @@ if BUILD_CXX_CONDITIONAL
CXX_DIR = c++
endif
+if BUILD_TESTS_CONDITIONAL
+ TEST_DIR = test
+else
+ TEST_DIR =
+endif
+if BUILD_TOOLS_CONDITIONAL
+ TOOLS_DIR = tools
+else
+ TOOLS_DIR =
+endif
+
## Don't recurse into any subdirectories if HDF5 is not configured to
## use the HL library
if BUILD_HDF5_HL_CONDITIONAL
- SUBDIRS=src test tools $(CXX_DIR) $(FORTRAN_DIR)
+ SUBDIRS=src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR)
endif
DIST_SUBDIRS=src test tools c++ fortran examples
diff --git a/hl/Makefile.in b/hl/Makefile.in
index 59a622d..d286069 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -410,9 +410,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -427,6 +427,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -445,6 +446,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -472,6 +474,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -479,9 +483,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -497,6 +504,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -530,8 +539,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -545,6 +556,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -586,6 +598,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -671,14 +684,18 @@ TRACE = perl $(top_srcdir)/bin/trace
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
@BUILD_FORTRAN_CONDITIONAL_TRUE@FORTRAN_DIR = fortran
@BUILD_CXX_CONDITIONAL_TRUE@CXX_DIR = c++
-@BUILD_HDF5_HL_CONDITIONAL_TRUE@SUBDIRS = src test tools $(CXX_DIR) $(FORTRAN_DIR)
+@BUILD_TESTS_CONDITIONAL_FALSE@TEST_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TEST_DIR = test
+@BUILD_TOOLS_CONDITIONAL_FALSE@TOOLS_DIR =
+@BUILD_TOOLS_CONDITIONAL_TRUE@TOOLS_DIR = tools
+@BUILD_HDF5_HL_CONDITIONAL_TRUE@SUBDIRS = src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR)
DIST_SUBDIRS = src test tools c++ fortran examples
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1189,6 +1206,7 @@ check-clean ::
done
build-check-clean:
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1224,7 +1242,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1385,7 +1403,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt
index 71e5bb3..4e55078 100644
--- a/hl/c++/CMakeLists.txt
+++ b/hl/c++/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_CPP)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_CPP CXX)
#-----------------------------------------------------------------------------
# Main HL lib is in /src
diff --git a/hl/c++/COPYING b/hl/c++/COPYING
index 6497ace..97969da 100644
--- a/hl/c++/COPYING
+++ b/hl/c++/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/c++/Makefile.am b/hl/c++/Makefile.am
index 1968bf5..0c0f97e 100644
--- a/hl/c++/Makefile.am
+++ b/hl/c++/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -18,7 +18,13 @@
include $(top_srcdir)/config/commence.am
-SUBDIRS=src test
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+
+SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 4b9d254..d355ef4 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -406,9 +406,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -423,6 +423,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -441,6 +442,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -468,6 +470,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -475,9 +479,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -493,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,6 +522,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -526,8 +535,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -541,6 +552,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -582,6 +594,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -665,14 +678,16 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-SUBDIRS = src test
+@BUILD_TESTS_CONDITIONAL_FALSE@TESTSERIAL_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TESTSERIAL_DIR = test
+SUBDIRS = src $(TESTSERIAL_DIR)
DIST_SUBDIRS = src test examples
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1179,6 +1194,7 @@ check-clean ::
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1214,7 +1230,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1375,7 +1391,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 25158f2..bfad538 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,25 +1,35 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_CPP_EXAMPLES)
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
-TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
-target_link_libraries (
- ptExampleFL
- ${HDF5_HL_CPP_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
+target_include_directories (ptExampleFL PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (ptExampleFL STATIC)
+ target_link_libraries (ptExampleFL PRIVATE
+ ${HDF5_HL_CPP_LIB_TARGET}
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
+ )
+else ()
+ TARGET_C_PROPERTIES (ptExampleFL SHARED)
+ target_link_libraries (ptExampleFL PRIVATE
+ ${HDF5_HL_CPP_LIBSH_TARGET}
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ )
+endif ()
set_target_properties (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
-if (BUILD_TESTING)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_CPP_EXAMPLES_FORMAT ptExampleFL)
+endif ()
+
+if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake
index 103ec2b..82b32cf 100644
--- a/hl/c++/examples/CMakeTests.cmake
+++ b/hl/c++/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -21,12 +21,14 @@ add_test (
COMMAND ${CMAKE_COMMAND}
-E remove
PTcppexampleFL.h5
+ ptExampleFL.txt
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME HL_CPP_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
+ add_test (NAME HL_CPP_ex_ptExampleFL COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:ptExampleFL>)
else ()
add_test (NAME HL_CPP_ex_ptExampleFL COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:ptExampleFL>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am
index ce719f5..6b5d7d1 100644
--- a/hl/c++/examples/Makefile.am
+++ b/hl/c++/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -33,8 +33,8 @@ CXX_API=yes
# Where to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c++
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR=$(examplesdir)/hl/c++
+EXAMPLETOPDIR=$(examplesdir)/hl
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index f69cc76..62bb996 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -353,9 +353,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -370,6 +370,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -388,6 +389,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -415,6 +417,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -422,9 +426,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -440,6 +447,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,6 +469,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -473,8 +482,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -488,6 +499,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -529,6 +541,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -627,8 +640,8 @@ CXX_API = yes
# Where to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c++
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR = $(examplesdir)/hl/c++
+EXAMPLETOPDIR = $(examplesdir)/hl
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -638,11 +651,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1097,6 +1110,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1132,7 +1146,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1293,7 +1307,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/c++/examples/ptExampleFL.cpp b/hl/c++/examples/ptExampleFL.cpp
index 26cbf09..7b508b4 100644
--- a/hl/c++/examples/ptExampleFL.cpp
+++ b/hl/c++/examples/ptExampleFL.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,56 +22,55 @@
*-------------------------------------------------------------------------
*/
-const char* FILE_NAME("PTcppexampleFL.h5");
-const char* PT_NAME("/examplePacketTable");
+const char *FILE_NAME("PTcppexampleFL.h5");
+const char *PT_NAME("/examplePacketTable");
-int main(void)
+int
+main(void)
{
- herr_t err; /* Return value from function calls */
- hid_t fileID; /* HDF5 identifier for file */
- hid_t plistID; /* HDF5 identifier for property list to use compression */
- hsize_t count; /* Number of records in table */
- int x; /* Temporary counter variable */
+ herr_t err; /* Return value from function calls */
+ hid_t fileID; /* HDF5 identifier for file */
+ hid_t plistID; /* HDF5 identifier for property list to use compression */
+ hsize_t count; /* Number of records in table */
+ int x; /* Temporary counter variable */
/* Buffers to hold data */
int readBuffer[5];
int writeBuffer[5];
/* Initialize buffers */
- for(x=0; x<5; x++)
- {
- writeBuffer[x]=x;
- readBuffer[x] = -1;
+ for (x = 0; x < 5; x++) {
+ writeBuffer[x] = x;
+ readBuffer[x] = -1;
}
/* Create a new HDF5 file */
fileID = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if(fileID <0)
+ if (fileID < 0)
fprintf(stderr, "Couldn't create file.\n");
/* Prepare property list to set compression, randomly use deflate
with compression level 5. */
plistID = H5Pcreate(H5P_DATASET_CREATE);
- err = H5Pset_deflate(plistID, 5);
- if(err < 0)
+ err = H5Pset_deflate(plistID, 5);
+ if (err < 0)
fprintf(stderr, "Error setting compression level.");
/* Create a fixed-length packet table. */
FL_PacketTable ptable(fileID, plistID, PT_NAME, H5T_NATIVE_INT, 100);
- if(! ptable.IsValid())
+ if (!ptable.IsValid())
fprintf(stderr, "Unable to create packet table.");
/* Append five packets to the packet table, one at a time */
- for(x=0; x<5; x++)
- {
- err = ptable.AppendPacket( &(writeBuffer[x]) );
- if(err<0)
+ for (x = 0; x < 5; x++) {
+ err = ptable.AppendPacket(&(writeBuffer[x]));
+ if (err < 0)
fprintf(stderr, "Error adding record.");
}
/* Get the number of packets in the packet table. This should be five. */
count = ptable.GetPacketCount(err);
- if(err < 0)
+ if (err < 0)
fprintf(stderr, "Error getting packet count.");
printf("Number of packets in packet table after five appends: %d\n", count);
@@ -80,10 +79,9 @@ int main(void)
ptable.ResetIndex();
/* Iterate through packets, read each one back */
- for(x=0; x<5; x++)
- {
- err = ptable.GetNextPacket( &(readBuffer[x]) );
- if(err < 0)
+ for (x = 0; x < 5; x++) {
+ err = ptable.GetNextPacket(&(readBuffer[x]));
+ if (err < 0)
fprintf(stderr, "Error reading record.");
printf("Packet %d's value is %d.\n", x, readBuffer[x]);
@@ -93,9 +91,8 @@ int main(void)
/* out of scope. */
err = H5Fclose(fileID);
- if( err < 0 )
+ if (err < 0)
fprintf(stderr, "Failed to close file.\n");
return 0;
}
-
diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in
index 7443407..86bca01 100644
--- a/hl/c++/examples/run-hlc++-ex.sh.in
+++ b/hl/c++/examples/run-hlc++-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the c++ examples from source files #
-# installed in .../share/hdf5_examples/hl/c++ using h5c++. The #
+# installed in @examplesdir@/hl/c++ using h5c++. The #
# order for running programs with RunTest in the MAIN section below is taken #
# from the Makefile. The order is important since some of the test programs #
# use data files created by earlier test programs. Any future additions should #
@@ -29,9 +29,33 @@
# Initializations
EXIT_SUCCESS=0
EXIT_FAILURE=1
+
+#
+# Try to derive the path to the installation $prefix established
+# by ./configure relative to the examples directory established by
+# ./configure. If successful, set `prefix_relto_examplesdir` to the
+# relative path. Otherwise, set `prefix_relto_examplesdir` to the
+# absolute installation $prefix.
+#
+# This script uses the value of `prefix` in the user's environment, if
+# it is set, below. The content of $() is evaluated in a sub-shell, so
+# if `prefix` is set in the user's environment, the shell statements in
+# $() won't clobbered it.
+#
+prefix_relto_examplesdir=$(
+prefix=@prefix@
+examplesdir=@examplesdir@
+if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
+else
+ echo $prefix
+fi
+)
+
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../../}"
+prefix="${prefix:-../../${prefix_relto_examplesdir}}"
AR="@AR@"
RANLIB="@RANLIB@"
H5TOOL="h5c++" # The tool name
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 7949b73..0c9b04b 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -1,42 +1,56 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_CPP_SRC)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_CPP_SRC CXX)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR})
-set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
+set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
-add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SRCS})
-TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES} ${HDF5_HL_CPP_HDRS})
+ target_include_directories (${HDF5_HL_CPP_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+ TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
+ set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SRCS})
- TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
+ add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES})
+ target_include_directories (${HDF5_HL_CPP_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+ target_compile_definitions(${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
+ TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED "HL_CXX")
- set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES
- FOLDER libraries/hl
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
+ set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl)
set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
@@ -55,7 +69,9 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlcpplibraries)
+ endif ()
install (
TARGETS
@@ -82,13 +98,15 @@ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
set (_PKG_CONFIG_LIBS_PRIVATE)
-set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}")
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}")
+endif ()
if (BUILD_SHARED_LIBS)
set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}")
endif ()
-set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}")
-set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.pc.in
@@ -101,7 +119,7 @@ install (
COMPONENT hlcpplibraries
)
-if (NOT WIN32)
+if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
@@ -115,4 +133,3 @@ if (NOT WIN32)
COMPONENT hlcpplibraries
)
endif ()
-
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index 544df0b..eca3ed1 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,257 +24,265 @@
#include "H5PacketTable.h"
- /********************************/
- /* PacketTable superclass */
- /********************************/
-
- /* "Open" Constructor
- * Opens an existing packet table, which can contain either fixed-length or
- * variable-length packets.
- */
- PacketTable::PacketTable(hid_t fileID, const char* name)
- {
- table_id = H5PTopen( fileID, name);
- }
-
- /* "Open" Constructor - will be deprecated because of char* name */
- PacketTable::PacketTable(hid_t fileID, char* name)
- {
- table_id = H5PTopen( fileID, name);
- }
-
- /* Destructor
- * Cleans up the packet table
- */
- PacketTable::~PacketTable()
- {
- H5PTclose( table_id);
- }
-
- /* IsValid
- * Returns true if this packet table is valid, false otherwise.
- * Use this after the constructor to ensure HDF did not have
- * any trouble making or opening the packet table.
- */
- bool PacketTable::IsValid()
- {
- if (H5PTis_valid(table_id) == 0)
- return true;
- else
- return false;
- }
-
- /* IsVariableLength
- * Return 1 if this packet table uses variable-length datatype,
- * and 0, otherwise. Returns -1 if the table is invalid (not open).
- */
- int PacketTable::IsVariableLength()
- {
- return H5PTis_varlen(table_id);
- }
-
- /* ResetIndex
- * Sets the index to point to the first packet in the packet table
- */
- void PacketTable::ResetIndex()
- {
- H5PTcreate_index(table_id);
- }
-
- /* SetIndex
- * Sets the index to point to the packet specified by index.
- * Returns 0 on success, negative on failure (if index is out of bounds)
- */
- int PacketTable::SetIndex(hsize_t index)
- {
- return H5PTset_index(table_id, index);
- }
-
- /* SetIndex
- * Sets the index to point to the packet specified by index.
- * Returns 0 on success, negative on failure (if index is out of bounds)
- */
- hsize_t PacketTable::GetIndex(int &error)
- {
- hsize_t index;
-
- error = H5PTget_index(table_id, &index);
- if(error < 0)
- return 0;
- else
- return index;
- }
-
- /* GetPacketCount
- * Returns the number of packets in the packet table. Error
- * is set to 0 on success. On failure, returns 0 and
- * error is set to negative.
- */
- hsize_t PacketTable::GetPacketCount(int& error)
- {
- hsize_t npackets;
-
- error = H5PTget_num_packets(table_id, &npackets);
- return npackets;
- }
-
- /* GetTableId
- * Returns the identifier of the packet table
- */
- hid_t PacketTable::GetTableId()
- {
- return table_id;
- }
-
- /* GetDatatype
- * Returns the datatype identifier used by the packet table, on success,
- * or H5I_INVALID_HID, on failure.
- * Note: it is best to avoid using this identifier in applications, unless
- * the desired functionality cannot be performed via the packet table ID.
- */
- hid_t PacketTable::GetDatatype()
- {
- return H5PTget_type(table_id);
- }
-
- /* GetDataset
- * Returns the dataset identifier associated with the packet table, on
- * success, or H5I_INVALID_HID, on failure.
- * Note: it is best to avoid using this identifier in applications, unless
- * the desired functionality cannot be performed via the packet table ID.
- */
- hid_t PacketTable::GetDataset()
- {
- return H5PTget_dataset(table_id);
- }
-
- /* FreeBuff
- * Frees the buffers created when variable-length packets are read.
- * Takes the number of hvl_t structs to be freed and a pointer to their
- * location in memory.
- * Returns 0 on success, negative on error.
- */
- int PacketTable::FreeBuff(size_t numStructs, hvl_t * buffer)
- {
- return H5PTfree_vlen_buff( table_id, numStructs, buffer);
- }
-
-
- /********************************/
- /* Fixed-Length Packet Table */
- /********************************/
-
- /* Constructor
- * Creates a packet table to store either fixed- or variable-length packets.
- * Takes the ID of the file the packet table will be created in, the ID of
- * the property list to specify compression, the name of the packet table,
- * the ID of the datatype, and the size of a memory chunk used in chunking.
- */
- FL_PacketTable::FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize, hid_t plistID)
- {
- table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
- }
-
- /* Constructor - deprecated
- * Creates a packet table to store either fixed- or variable-length packets.
- * Takes the ID of the file the packet table will be created in, the ID of
- * the property list to specify compression, the name of the packet table,
- * the ID of the datatype, and the size of a memory chunk used in chunking.
- * Note: The above constructor has a better prototype, which allows default
- * values to be used. This constructor was only released in 1.10.0.
- */
- FL_PacketTable::FL_PacketTable(hid_t fileID, hid_t plistID, const char* name, hid_t dtypeID, hsize_t chunkSize)
- {
- table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
- }
-
- /* Constructor
- * Creates a packet table to store either fixed- or variable-length packets.
- * Takes the ID of the file the packet table will be created in, the name of
- * the packet table, the ID of the datatype of the set, and the size
- * of a memory chunk used in chunking.
- * Note: this overload will be deprecated in favor of the constructor above.
- */
- FL_PacketTable::FL_PacketTable(hid_t fileID, char* name, hid_t dtypeID, hsize_t chunkSize, int compression)
- {
- table_id = H5PTcreate_fl(fileID, name, dtypeID, chunkSize, compression);
- }
-
- /* "Open" Constructor
- * Opens an existing fixed-length packet table.
- * Fails if the packet table specified is variable-length.
- */
- FL_PacketTable::FL_PacketTable(hid_t fileID, const char* name) : PacketTable(fileID, name) {}
-
- /* "Open" Constructor - will be deprecated because of char* name */
- FL_PacketTable::FL_PacketTable(hid_t fileID, char* name) : PacketTable(fileID, name) {}
-
- /* AppendPacket
- * Adds a single packet to the packet table. Takes a pointer
- * to the location of the data in memory.
- * Returns 0 on success, negative on failure
- */
- int FL_PacketTable::AppendPacket(void * data)
- {
- return H5PTappend(table_id, 1, data);
- }
-
- /* AppendPackets (multiple packets)
- * Adds multiple packets to the packet table. Takes the number of packets
- * to be added and a pointer to their location in memory.
- * Returns 0 on success, -1 on failure.
- */
- int FL_PacketTable::AppendPackets(size_t numPackets, void * data)
- {
- return H5PTappend(table_id, numPackets, data);
- }
-
- /* GetPacket (indexed)
- * Gets a single packet from the packet table. Takes the index
- * of the packet (with 0 being the first packet) and a pointer
- * to memory where the data should be stored.
- * Returns 0 on success, negative on failure
- */
- int FL_PacketTable::GetPacket(hsize_t index, void * data)
- {
- return H5PTread_packets(table_id, index, 1, data);
- }
-
- /* GetPackets (multiple packets)
- * Gets multiple packets at once, all packets between
- * startIndex and endIndex inclusive. Also takes a pointer to
- * the memory where these packets should be stored.
- * Returns 0 on success, negative on failure.
- */
- int FL_PacketTable::GetPackets(hsize_t startIndex, hsize_t endIndex, void * data)
- {
- // Make sure the range of indexes is valid
- if (startIndex > endIndex)
- return -1;
-
- return H5PTread_packets(table_id, startIndex, (size_t)(endIndex-startIndex+1), data);
- }
-
- /* GetNextPacket (single packet)
- * Gets the next packet in the packet table. Takes a pointer to
- * memory where the packet should be stored.
- * Returns 0 on success, negative on failure. Index
- * is not advanced to the next packet on failure.
- */
- int FL_PacketTable::GetNextPacket(void * data)
- {
- return H5PTget_next(table_id, 1, data);
- }
-
- /* GetNextPackets (multiple packets)
- * Gets the next numPackets packets in the packet table. Takes a
- * pointer to memory where these packets should be stored.
- * Returns 0 on success, negative on failure. Index
- * is not advanced on failure.
- */
- int FL_PacketTable::GetNextPackets(size_t numPackets, void * data)
- {
- return H5PTget_next(table_id, numPackets, data);
- }
+/********************************/
+/* PacketTable superclass */
+/********************************/
+
+/* "Open" Constructor
+ * Opens an existing packet table, which can contain either fixed-length or
+ * variable-length packets.
+ */
+PacketTable::PacketTable(hid_t fileID, const char *name) { table_id = H5PTopen(fileID, name); }
+
+/* "Open" Constructor - will be deprecated because of char* name */
+PacketTable::PacketTable(hid_t fileID, char *name) { table_id = H5PTopen(fileID, name); }
+
+/* Destructor
+ * Cleans up the packet table
+ */
+PacketTable::~PacketTable() { H5PTclose(table_id); }
+
+/* IsValid
+ * Returns true if this packet table is valid, false otherwise.
+ * Use this after the constructor to ensure HDF did not have
+ * any trouble making or opening the packet table.
+ */
+bool
+PacketTable::IsValid()
+{
+ if (H5PTis_valid(table_id) == 0)
+ return true;
+ else
+ return false;
+}
+
+/* IsVariableLength
+ * Return 1 if this packet table uses variable-length datatype,
+ * and 0, otherwise. Returns -1 if the table is invalid (not open).
+ */
+int
+PacketTable::IsVariableLength()
+{
+ return H5PTis_varlen(table_id);
+}
+
+/* ResetIndex
+ * Sets the index to point to the first packet in the packet table
+ */
+void
+PacketTable::ResetIndex()
+{
+ H5PTcreate_index(table_id);
+}
+
+/* SetIndex
+ * Sets the index to point to the packet specified by index.
+ * Returns 0 on success, negative on failure (if index is out of bounds)
+ */
+int
+PacketTable::SetIndex(hsize_t index)
+{
+ return H5PTset_index(table_id, index);
+}
+
+/* SetIndex
+ * Sets the index to point to the packet specified by index.
+ * Returns 0 on success, negative on failure (if index is out of bounds)
+ */
+hsize_t
+PacketTable::GetIndex(int &error)
+{
+ hsize_t index;
+
+ error = H5PTget_index(table_id, &index);
+ if (error < 0)
+ return 0;
+ else
+ return index;
+}
+
+/* GetPacketCount
+ * Returns the number of packets in the packet table. Error
+ * is set to 0 on success. On failure, returns 0 and
+ * error is set to negative.
+ */
+hsize_t
+PacketTable::GetPacketCount(int &error)
+{
+ hsize_t npackets;
+
+ error = H5PTget_num_packets(table_id, &npackets);
+ return npackets;
+}
+
+/* GetTableId
+ * Returns the identifier of the packet table
+ */
+hid_t
+PacketTable::GetTableId()
+{
+ return table_id;
+}
+
+/* GetDatatype
+ * Returns the datatype identifier used by the packet table, on success,
+ * or H5I_INVALID_HID, on failure.
+ * Note: it is best to avoid using this identifier in applications, unless
+ * the desired functionality cannot be performed via the packet table ID.
+ */
+hid_t
+PacketTable::GetDatatype()
+{
+ return H5PTget_type(table_id);
+}
+
+/* GetDataset
+ * Returns the dataset identifier associated with the packet table, on
+ * success, or H5I_INVALID_HID, on failure.
+ * Note: it is best to avoid using this identifier in applications, unless
+ * the desired functionality cannot be performed via the packet table ID.
+ */
+hid_t
+PacketTable::GetDataset()
+{
+ return H5PTget_dataset(table_id);
+}
+
+/* FreeBuff
+ * Frees the buffers created when variable-length packets are read.
+ * Takes the number of hvl_t structs to be freed and a pointer to their
+ * location in memory.
+ * Returns 0 on success, negative on error.
+ */
+int
+PacketTable::FreeBuff(size_t numStructs, hvl_t *buffer)
+{
+ return H5PTfree_vlen_buff(table_id, numStructs, buffer);
+}
+
+/********************************/
+/* Fixed-Length Packet Table */
+/********************************/
+
+/* Constructor
+ * Creates a packet table to store either fixed- or variable-length packets.
+ * Takes the ID of the file the packet table will be created in, the ID of
+ * the property list to specify compression, the name of the packet table,
+ * the ID of the datatype, and the size of a memory chunk used in chunking.
+ */
+FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name, hid_t dtypeID, hsize_t chunkSize,
+ hid_t plistID)
+{
+ table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
+}
+
+/* Constructor - deprecated
+ * Creates a packet table to store either fixed- or variable-length packets.
+ * Takes the ID of the file the packet table will be created in, the ID of
+ * the property list to specify compression, the name of the packet table,
+ * the ID of the datatype, and the size of a memory chunk used in chunking.
+ * Note: The above constructor has a better prototype, which allows default
+ * values to be used. This constructor was only released in 1.10.0.
+ */
+FL_PacketTable::FL_PacketTable(hid_t fileID, hid_t plistID, const char *name, hid_t dtypeID,
+ hsize_t chunkSize)
+{
+ table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
+}
+
+/* Constructor
+ * Creates a packet table to store either fixed- or variable-length packets.
+ * Takes the ID of the file the packet table will be created in, the name of
+ * the packet table, the ID of the datatype of the set, and the size
+ * of a memory chunk used in chunking.
+ * Note: this overload will be deprecated in favor of the constructor above.
+ */
+FL_PacketTable::FL_PacketTable(hid_t fileID, char *name, hid_t dtypeID, hsize_t chunkSize, int compression)
+{
+ table_id = H5PTcreate_fl(fileID, name, dtypeID, chunkSize, compression);
+}
+
+/* "Open" Constructor
+ * Opens an existing fixed-length packet table.
+ * Fails if the packet table specified is variable-length.
+ */
+FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name) : PacketTable(fileID, name) {}
+
+/* "Open" Constructor - will be deprecated because of char* name */
+FL_PacketTable::FL_PacketTable(hid_t fileID, char *name) : PacketTable(fileID, name) {}
+
+/* AppendPacket
+ * Adds a single packet to the packet table. Takes a pointer
+ * to the location of the data in memory.
+ * Returns 0 on success, negative on failure
+ */
+int
+FL_PacketTable::AppendPacket(void *data)
+{
+ return H5PTappend(table_id, 1, data);
+}
+
+/* AppendPackets (multiple packets)
+ * Adds multiple packets to the packet table. Takes the number of packets
+ * to be added and a pointer to their location in memory.
+ * Returns 0 on success, -1 on failure.
+ */
+int
+FL_PacketTable::AppendPackets(size_t numPackets, void *data)
+{
+ return H5PTappend(table_id, numPackets, data);
+}
+
+/* GetPacket (indexed)
+ * Gets a single packet from the packet table. Takes the index
+ * of the packet (with 0 being the first packet) and a pointer
+ * to memory where the data should be stored.
+ * Returns 0 on success, negative on failure
+ */
+int
+FL_PacketTable::GetPacket(hsize_t index, void *data)
+{
+ return H5PTread_packets(table_id, index, 1, data);
+}
+
+/* GetPackets (multiple packets)
+ * Gets multiple packets at once, all packets between
+ * startIndex and endIndex inclusive. Also takes a pointer to
+ * the memory where these packets should be stored.
+ * Returns 0 on success, negative on failure.
+ */
+int
+FL_PacketTable::GetPackets(hsize_t startIndex, hsize_t endIndex, void *data)
+{
+ // Make sure the range of indexes is valid
+ if (startIndex > endIndex)
+ return -1;
+
+ return H5PTread_packets(table_id, startIndex, (size_t)(endIndex - startIndex + 1), data);
+}
+
+/* GetNextPacket (single packet)
+ * Gets the next packet in the packet table. Takes a pointer to
+ * memory where the packet should be stored.
+ * Returns 0 on success, negative on failure. Index
+ * is not advanced to the next packet on failure.
+ */
+int
+FL_PacketTable::GetNextPacket(void *data)
+{
+ return H5PTget_next(table_id, 1, data);
+}
+
+/* GetNextPackets (multiple packets)
+ * Gets the next numPackets packets in the packet table. Takes a
+ * pointer to memory where these packets should be stored.
+ * Returns 0 on success, negative on failure. Index
+ * is not advanced on failure.
+ */
+int
+FL_PacketTable::GetNextPackets(size_t numPackets, void *data)
+{
+ return H5PTget_next(table_id, numPackets, data);
+}
/* Removed "ifdef VLPT_REMOVED" block. 03/08/2016, -BMR */
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index 2665984..735901f 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,22 +28,21 @@
#include "H5PTpublic.h"
#include "H5api_adpt.h"
-class H5_HLCPPDLL PacketTable
-{
-public:
+class H5_HLCPPDLL PacketTable {
+ public:
/* Null constructor
* Sets table_id to "invalid"
*/
- PacketTable() {table_id = H5I_BADID;}
+ PacketTable() { table_id = H5I_BADID; }
/* "Open" Constructor
* Opens an existing packet table, which can contain either fixed-length or
* variable-length packets.
*/
- PacketTable(hid_t fileID, const char* name);
+ PacketTable(hid_t fileID, const char *name);
/* "Open" Constructor - will be deprecated because of char* name */
- PacketTable(hid_t fileID, char* name);
+ PacketTable(hid_t fileID, char *name);
/* Destructor
* Cleans up the packet table
@@ -80,16 +79,17 @@ public:
* Returns the position of the current packet.
* On failure, returns 0 and error is set to negative.
*/
- hsize_t GetIndex(int& error);
+ hsize_t GetIndex(int &error);
/* GetPacketCount
* Returns the number of packets in the packet table. Error
* is set to 0 on success. On failure, returns 0 and
* error is set to negative.
*/
- hsize_t GetPacketCount(int& error);
+ hsize_t GetPacketCount(int &error);
- hsize_t GetPacketCount()
+ hsize_t
+ GetPacketCount()
{
int ignoreError;
return GetPacketCount(ignoreError);
@@ -122,22 +122,22 @@ public:
* location in memory.
* Returns 0 on success, negative on error.
*/
- int FreeBuff(size_t numStructs, hvl_t * buffer);
+ int FreeBuff(size_t numStructs, hvl_t *buffer);
-protected:
+ protected:
hid_t table_id;
};
-class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable
-{
-public:
+class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable {
+ public:
/* Constructor
* Creates a packet table to store either fixed- or variable-length packets.
* Takes the ID of the file the packet table will be created in, the ID of
* the property list to specify compression, the name of the packet table,
* the ID of the datatype, and the size of a memory chunk used in chunking.
*/
- FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize = 0, hid_t plistID = H5P_DEFAULT);
+ FL_PacketTable(hid_t fileID, const char *name, hid_t dtypeID, hsize_t chunkSize = 0,
+ hid_t plistID = H5P_DEFAULT);
/* Constructors - deprecated
* Creates a packet table in which to store fixed length packets.
@@ -148,36 +148,36 @@ public:
* Note: these overloaded constructors will be deprecated in favor of the
* constructor above.
*/
- FL_PacketTable(hid_t fileID, hid_t plist_id, const char* name, hid_t dtypeID, hsize_t chunkSize);
- FL_PacketTable(hid_t fileID, char* name, hid_t dtypeID, hsize_t chunkSize, int compression = 0);
+ FL_PacketTable(hid_t fileID, hid_t plist_id, const char *name, hid_t dtypeID, hsize_t chunkSize);
+ FL_PacketTable(hid_t fileID, char *name, hid_t dtypeID, hsize_t chunkSize, int compression = 0);
/* "Open" Constructor
* Opens an existing fixed-length packet table.
* Fails if the packet table specified is variable-length.
*/
- FL_PacketTable(hid_t fileID, const char* name);
+ FL_PacketTable(hid_t fileID, const char *name);
/* "Open" Constructor - will be deprecated because of char* name */
- FL_PacketTable(hid_t fileID, char* name);
+ FL_PacketTable(hid_t fileID, char *name);
/* Destructor
* Cleans up the packet table
*/
- virtual ~FL_PacketTable() {};
+ virtual ~FL_PacketTable(){};
/* AppendPacket
* Adds a single packet to the packet table. Takes a pointer
* to the location of the data in memory.
* Returns 0 on success, negative on failure
*/
- int AppendPacket(void * data);
+ int AppendPacket(void *data);
/* AppendPackets (multiple packets)
* Adds multiple packets to the packet table. Takes the number of packets
* to be added and a pointer to their location in memory.
* Returns 0 on success, -1 on failure.
*/
- int AppendPackets(size_t numPackets, void * data);
+ int AppendPackets(size_t numPackets, void *data);
/* GetPacket (indexed)
* Gets a single packet from the packet table. Takes the index
@@ -185,7 +185,7 @@ public:
* to memory where the data should be stored.
* Returns 0 on success, negative on failure
*/
- int GetPacket(hsize_t index, void * data);
+ int GetPacket(hsize_t index, void *data);
/* GetPackets (multiple packets)
* Gets multiple packets at once, all packets between
@@ -193,7 +193,7 @@ public:
* the memory where these packets should be stored.
* Returns 0 on success, negative on failure.
*/
- int GetPackets(hsize_t startIndex, hsize_t endIndex, void * data);
+ int GetPackets(hsize_t startIndex, hsize_t endIndex, void *data);
/* GetNextPacket (single packet)
* Gets the next packet in the packet table. Takes a pointer to
@@ -201,7 +201,7 @@ public:
* Returns 0 on success, negative on failure. Index
* is not advanced to the next packet on failure.
*/
- int GetNextPacket(void * data);
+ int GetNextPacket(void *data);
/* GetNextPackets (multiple packets)
* Gets the next numPackets packets in the packet table. Takes a
@@ -209,7 +209,7 @@ public:
* Returns 0 on success, negative on failure. Index
* is not advanced on failure.
*/
- int GetNextPackets(size_t numPackets, void * data);
+ int GetNextPackets(size_t numPackets, void *data);
};
/* Removed "#ifdef VLPT_REMOVED" block. 03/08/2016, -BMR */
diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am
index 363ba3b..f10ee19 100644
--- a/hl/c++/src/Makefile.am
+++ b/hl/c++/src/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index ff20853..aea6f3f 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -406,12 +406,12 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/hl/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -426,6 +426,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -444,6 +445,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -471,6 +473,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -478,9 +482,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -496,6 +503,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -517,6 +525,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -529,8 +538,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -544,6 +555,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -585,6 +597,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -673,26 +686,26 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
# This is our main target
@@ -711,11 +724,11 @@ libhdf5_hl_cpp_la_LIBADD = $(LIBH5_HL) $(LIBH5CPP)
# Public headers
include_HEADERS = H5PacketTable.h
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1230,6 +1243,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1265,7 +1279,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1426,7 +1440,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index b48d147..9a1d6fd 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,30 +1,37 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_CPP_TEST)
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src)
-
-# --------------------------------------------------------------------
-# Add in the unit tests for the packet table c++ wrapper
-# --------------------------------------------------------------------
-
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
-INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
-TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
-target_link_libraries (
- hl_ptableTest
- ${HDF5_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
- ${HDF5_CPP_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_HL_CPP_LIB_TARGET}
-)
+target_compile_options(hl_ptableTest PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+target_include_directories (hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_ptableTest STATIC)
+ target_link_libraries (hl_ptableTest PRIVATE
+ ${HDF5_LIB_TARGET}
+ ${HDF5_TEST_LIB_TARGET}
+ ${HDF5_CPP_LIB_TARGET}
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_HL_CPP_LIB_TARGET}
+ )
+else ()
+ TARGET_C_PROPERTIES (hl_ptableTest SHARED)
+ target_link_libraries (hl_ptableTest PRIVATE
+ ${HDF5_LIBSH_TARGET}
+ ${HDF5_TEST_LIBSH_TARGET}
+ ${HDF5_CPP_LIBSH_TARGET}
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_HL_CPP_LIBSH_TARGET}
+ )
+endif ()
set_target_properties (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
-include (CMakeTests.cmake)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_CPP_TEST_FORMAT hl_ptableTest)
+endif ()
+
+if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
index 785abca..28ee5df 100644
--- a/hl/c++/test/CMakeTests.cmake
+++ b/hl/c++/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,10 +16,16 @@
##############################################################################
##############################################################################
+add_test (
+ NAME HL_CPP_ptableTest-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${example}.txt
+)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME HL_CPP_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
+ add_test (NAME HL_CPP_ptableTest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ptableTest>)
else ()
add_test (NAME HL_CPP_ptableTest COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:hl_ptableTest>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -30,3 +36,4 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
diff --git a/hl/c++/test/Makefile.am b/hl/c++/test/Makefile.am
index 7031c34..a6759f3 100644
--- a/hl/c++/test/Makefile.am
+++ b/hl/c++/test/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 388c00c..33c2829 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -401,14 +401,14 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/c++/src -I$(top_srcdir)/hl/src \
-I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test \
-I$(top_builddir)/hl/test -I$(top_srcdir)/hl/test
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -423,6 +423,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -441,6 +442,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -468,6 +470,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -475,9 +479,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -493,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,6 +522,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -526,8 +535,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -541,6 +552,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -582,6 +594,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -677,11 +690,11 @@ ptableTest_SOURCES = ptableTest.cpp
# Tell conclude.am that these are C++ tests.
CXX_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1153,6 +1166,7 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1188,7 +1202,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1349,7 +1363,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index 340912e..bf60402 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,41 +22,40 @@ using namespace std;
#define TEST_FILE "packettest.h5"
/* Main test function */
-int main(void)
+int
+main(void)
{
herr_t err;
herr_t num_errors = 0;
/* Create new HDF5 file */
fileID = H5Fcreate(TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if(fileID <0)
- {
+ if (fileID < 0) {
fprintf(stderr, "Couldn't create file.\n");
num_errors = 1;
}
else {
- num_errors += BasicTest();
+ num_errors += BasicTest();
- num_errors += TestCompoundDatatype();
+ num_errors += TestCompoundDatatype();
- num_errors += TestGetPacket();
+ num_errors += TestGetPacket();
- num_errors += TestGetNext();
+ num_errors += TestGetNext();
- num_errors += TestCompress();
+ num_errors += TestCompress();
- num_errors += TestErrors();
+ num_errors += TestErrors();
- num_errors += SystemTest();
+ num_errors += SystemTest();
- /* Test data corruption in packed structs */
- num_errors += TestHDFFV_9758();
+ /* Test data corruption in packed structs */
+ num_errors += TestHDFFV_9758();
/* Terminate access to the file. */
err = H5Fclose(fileID);
- if( err < 0 )
- {
+ if (err < 0) {
fprintf(stderr, "Failed to close file.\n");
num_errors++;
}
@@ -66,37 +65,39 @@ int main(void)
}
if (num_errors == 0)
- /* ALL TESTS PASSED */
- return 0;
+ /* ALL TESTS PASSED */
+ return 0;
else
- /* ERRORS */
- return -1;
+ /* ERRORS */
+ return -1;
}
-const char* BASICTEST_PT("/basicTest");
-int BasicTest()
+const char *BASICTEST_PT("/basicTest");
+int
+BasicTest()
{
- herr_t err;
- int myRecord;
+ herr_t err;
+ int myRecord;
hsize_t count;
- int error;
+ int error;
- TESTING("basic functionality")
+ printf("Testing %-62s", "basic functionality");
+ HDfflush(stdout);
FL_PacketTable wrapper(fileID, H5P_DEFAULT, BASICTEST_PT, H5T_NATIVE_INT, 1);
- if(! wrapper.IsValid())
- goto error;
+ if (!wrapper.IsValid())
+ goto error;
/* Ensure initial count is zero */
count = wrapper.GetPacketCount(error);
- if(count != 0 || error != 0)
- goto error;
+ if (count != 0 || error != 0)
+ goto error;
myRecord = 1;
/* add some records test */
err = wrapper.AppendPacket(&myRecord);
- if(err < 0)
+ if (err < 0)
goto error;
myRecord = 2;
@@ -105,22 +106,22 @@ int BasicTest()
/* get number of records test */
count = wrapper.GetPacketCount();
- if(count != 2)
- goto error;
+ if (count != 2)
+ goto error;
/* get records test */
err = wrapper.GetPacket(0, &myRecord);
- if(err < 0)
- goto error;
+ if (err < 0)
+ goto error;
- if(myRecord != 1)
- goto error;
+ if (myRecord != 1)
+ goto error;
err = wrapper.GetPacket(1, &myRecord);
- if(err < 0)
- goto error;
- if(myRecord != 2)
- goto error;
+ if (err < 0)
+ goto error;
+ if (myRecord != 2)
+ goto error;
PASSED();
return 0;
@@ -130,57 +131,58 @@ error:
return 1;
}
-const char* CMPDTEST_PT("/compoundTest");
-int TestCompoundDatatype()
+const char *CMPDTEST_PT("/compoundTest");
+int
+TestCompoundDatatype()
{
- hid_t dtypeID;
+ hid_t dtypeID;
hsize_t count;
- int error;
+ int error;
- TESTING("compound datatypes")
+ printf("Testing %-62s", "compound datatypes");
+ HDfflush(stdout);
/* Create compound datatype */
- typedef struct compoundType
- {
+ typedef struct {
short a, b, c;
- int e;
+ int e;
} compoundType;
- dtypeID = H5Tcreate( H5T_COMPOUND, sizeof(compoundType));
+ dtypeID = H5Tcreate(H5T_COMPOUND, sizeof(compoundType));
- H5Tinsert(dtypeID, "abbey", HOFFSET( compoundType, a ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID, "bert", HOFFSET( compoundType, b ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID, "charlie", HOFFSET( compoundType, c ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID, "ebert", HOFFSET( compoundType, e ), H5T_NATIVE_INT);
+ H5Tinsert(dtypeID, "abbey", HOFFSET(compoundType, a), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID, "bert", HOFFSET(compoundType, b), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID, "charlie", HOFFSET(compoundType, c), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID, "ebert", HOFFSET(compoundType, e), H5T_NATIVE_INT);
/* Create packet table using default property list. */
FL_PacketTable wrapper(fileID, H5P_DEFAULT, CMPDTEST_PT, dtypeID, 1);
- if(! wrapper.IsValid())
- goto error;
+ if (!wrapper.IsValid())
+ goto error;
compoundType first;
first.a = 1;
first.b = first.c = 3;
- first.e = 5;
+ first.e = 5;
/* Write packet */
wrapper.AppendPacket(&first);
count = wrapper.GetPacketCount(error);
- if(count != 1)
- goto error;
+ if (count != 1)
+ goto error;
first.a = first.b = first.c = 0;
- first.e = 0;
+ first.e = 0;
/* Read packet back */
wrapper.GetPacket(0, &first);
- if(first.a != 1)
- goto error;
- if(first.e != 5)
- goto error;
+ if (first.a != 1)
+ goto error;
+ if (first.e != 5)
+ goto error;
PASSED();
@@ -189,69 +191,71 @@ int TestCompoundDatatype()
error:
- H5E_BEGIN_TRY {
- H5Tclose(dtypeID);
- } H5E_END_TRY;
-
+ H5E_BEGIN_TRY { H5Tclose(dtypeID); }
+ H5E_END_TRY;
H5_FAILED();
return 1;
}
-const char* GETNEXT_PT("/TestGetNext");
-int TestGetNext()
+const char *GETNEXT_PT("/TestGetNext");
+int
+TestGetNext()
{
int error;
int record;
int records[2];
int i;
- TESTING("GetNextPacket")
+ printf("Testing %-62s", "GetNextPacket");
+ HDfflush(stdout);
/* Create a dataset */
FL_PacketTable wrapper(fileID, H5P_DEFAULT, GETNEXT_PT, H5T_NATIVE_INT, 500);
- if(! wrapper.IsValid())
- goto error;
+ if (!wrapper.IsValid())
+ goto error;
/* Append 5 records to the dataset */
- for(record = 1; record < 6; record++)
+ for (record = 1; record < 6; record++)
wrapper.AppendPacket(&record);
/* Ensure that we can interate through the records and get the right ones */
- for(i = 1; i < 6; i++)
- {
+ for (i = 1; i < 6; i++) {
wrapper.GetNextPacket(&record);
- if(record != i)
- goto error;
+ if (record != i)
+ goto error;
}
/* Reset the index and check that it worked */
wrapper.ResetIndex();
- if(wrapper.GetIndex(error) != 0) goto error;
- if(error < 0) goto error;
+ if (wrapper.GetIndex(error) != 0)
+ goto error;
+ if (error < 0)
+ goto error;
/* Ensure that we can interate through the records and get the right ones */
- for(i = 1; i < 6; i++)
- {
+ for (i = 1; i < 6; i++) {
error = wrapper.GetNextPacket(&record);
- if(record != i || error <0)
- goto error;
+ if (record != i || error < 0)
+ goto error;
}
wrapper.SetIndex(1);
- if(wrapper.GetIndex(error) != 1) goto error;
- if(error < 0) goto error;
+ if (wrapper.GetIndex(error) != 1)
+ goto error;
+ if (error < 0)
+ goto error;
/* Ensure we can get multiple records with our index pointer */
wrapper.GetNextPackets(2, records);
- if(records[0] != 2 || records[1] != 3)
- goto error;
+ if (records[0] != 2 || records[1] != 3)
+ goto error;
/* Ensure our pointer was updated correctly */
wrapper.GetNextPacket(&record);
- if(record != 4)
- goto error;
+ if (record != 4)
+ goto error;
PASSED();
return 0;
@@ -261,27 +265,29 @@ error:
return 1;
}
-const char* COMPRESS_PT("/compressTest");
-int TestCompress()
+const char *COMPRESS_PT("/compressTest");
+int
+TestCompress()
{
- unsigned int flags = 0;
- unsigned int config = 0;
- size_t cd_nelemts = 0;
-
- TESTING("compression")
#ifdef H5_HAVE_FILTER_DEFLATE
+ unsigned int flags = 0;
+ unsigned int config = 0;
+ size_t cd_nelemts = 0;
+
+ printf("Testing %-62s", "compression");
+ HDfflush(stdout);
try {
- /* Prepare property list to set compression, randomly use deflate */
- DSetCreatPropList dscreatplist;
- dscreatplist.setDeflate(6);
+ /* Prepare property list to set compression, randomly use deflate */
+ DSetCreatPropList dscreatplist;
+ dscreatplist.setDeflate(6);
/* Create packet table with compression. */
FL_PacketTable wrapper(fileID, COMPRESS_PT, H5T_NATIVE_CHAR, 100, dscreatplist.getId());
- /* Close the property list */
- dscreatplist.close();
+ /* Close the property list */
+ dscreatplist.close();
- /* Verify that the deflate filter is set */
+ /* Verify that the deflate filter is set */
/* Create an HDF5 C++ file object */
H5File file;
@@ -293,52 +299,54 @@ int TestCompress()
DSetCreatPropList dcpl = dset.getCreatePlist();
- char filter_name[8];
+ char filter_name[8];
dcpl.getFilterById(H5Z_FILTER_DEFLATE, flags, cd_nelemts, NULL, 8, filter_name, config);
- if (HDstrncmp(filter_name, "deflate", 7) != 0)
- H5_FAILED()
- } catch (Exception e) {
- H5_FAILED();
- return 1;
+ if (HDstrncmp(filter_name, "deflate", 7) != 0)
+ H5_FAILED()
+ }
+ catch (Exception e) {
+ H5_FAILED();
+ return 1;
}
PASSED();
#else
SKIPPED();
- puts(" deflate filter not enabled");
+ HDputs(" deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
}
-const char* PT_TESTGETPT = "/TestGetPacket";
-int TestGetPacket()
+const char *PT_TESTGETPT = "/TestGetPacket";
+int
+TestGetPacket()
{
int record;
int theRecs[3];
int i;
- TESTING("GetPacket")
+ printf("Testing %-62s", "GetPacket");
+ HDfflush(stdout);
/* Create a dataset. Does not need to specify property list because
there is no compression. */
FL_PacketTable wrapper(fileID, PT_TESTGETPT, H5T_NATIVE_INT, 1);
- if(! wrapper.IsValid())
- goto error;
+ if (!wrapper.IsValid())
+ goto error;
/* Append 5 records to the dataset */
- for(record = 1; record < 6; record++)
+ for (record = 1; record < 6; record++)
wrapper.AppendPacket(&record);
/* Ensure that the records were written properly */
wrapper.GetPacket(1, &record);
- if(record != 2)
- goto error;
+ if (record != 2)
+ goto error;
/* Ensure that we can retrieve multiple records */
wrapper.GetPackets(1, 3, theRecs);
- for(i = 0; i < 3; i++)
- {
- if(theRecs[i] != i+2)
- goto error;
+ for (i = 0; i < 3; i++) {
+ if (theRecs[i] != i + 2)
+ goto error;
}
PASSED();
@@ -349,108 +357,116 @@ error:
return 1;
}
-const char* PT_TESTERROR = "/TestErrors";
+const char *PT_TESTERROR = "/TestErrors";
-int TestErrors()
+int
+TestErrors()
{
- TESTING("error conditions")
+ printf("Testing %-62s", "error conditions");
+ HDfflush(stdout);
/* Create a dataset */
FL_PacketTable wrapper(fileID, PT_TESTERROR, H5T_NATIVE_INT, 1);
- if(! wrapper.IsValid())
- goto error;
+ if (!wrapper.IsValid())
+ goto error;
int record;
int records[3];
int error;
/* Append 4 records to the dataset */
- for(record = 1; record < 5; record++)
+ for (record = 1; record < 5; record++)
wrapper.AppendPacket(&record);
/* Try to confuse functions with bad indexes */
error = wrapper.GetPacket(static_cast<unsigned>(-1), &record);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPacket(4, &record);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPacket(static_cast<unsigned>(-250), &record);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPacket(3000, &record);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPacket(1, &record);
- if(error < 0)
- goto error;
+ if (error < 0)
+ goto error;
error = wrapper.GetPackets(static_cast<unsigned>(-1), 1, records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPackets(2, 4, records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPackets(static_cast<unsigned>(-60), static_cast<unsigned>(-62), records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPackets(10, 12, records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPackets(0, 2, records);
- if(error < 0)
- goto error;
+ if (error < 0)
+ goto error;
error = wrapper.GetPackets(2, 0, records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetPackets(1, 1, records);
- if(error < 0)
- goto error;
+ if (error < 0)
+ goto error;
error = wrapper.GetPackets(1, 3, records);
- if(error < 0)
- goto error;
+ if (error < 0)
+ goto error;
wrapper.ResetIndex();
error = wrapper.SetIndex(static_cast<unsigned>(-1));
- if(error >= 0)
- goto error;
- if(wrapper.GetIndex(error) != 0) goto error;
- if(error < 0) goto error;
+ if (error >= 0)
+ goto error;
+ if (wrapper.GetIndex(error) != 0)
+ goto error;
+ if (error < 0)
+ goto error;
error = wrapper.GetNextPacket(&record);
- if(error < 0)
- goto error;
- if(record != 1)
- goto error;
- if(wrapper.GetIndex(error) != 1) goto error;
- if(error < 0) goto error;
+ if (error < 0)
+ goto error;
+ if (record != 1)
+ goto error;
+ if (wrapper.GetIndex(error) != 1)
+ goto error;
+ if (error < 0)
+ goto error;
error = wrapper.SetIndex(20);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetNextPacket(&record);
- if(error < 0)
- goto error;
- if(record != 2)
- goto error;
+ if (error < 0)
+ goto error;
+ if (record != 2)
+ goto error;
wrapper.SetIndex(3);
error = wrapper.GetNextPacket(&record);
- if(error < 0)
- goto error;
- if(record != 4)
- goto error;
- if(wrapper.GetIndex(error) != 4) goto error;
- if(error < 0) goto error;
+ if (error < 0)
+ goto error;
+ if (record != 4)
+ goto error;
+ if (wrapper.GetIndex(error) != 4)
+ goto error;
+ if (error < 0)
+ goto error;
error = wrapper.GetNextPacket(&record);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
wrapper.ResetIndex();
error = wrapper.GetNextPackets(10, records);
- if(error >= 0)
- goto error;
+ if (error >= 0)
+ goto error;
error = wrapper.GetNextPackets(0, records);
- if(error < 0)
- goto error;
+ if (error < 0)
+ goto error;
PASSED();
return 0;
@@ -460,44 +476,44 @@ error:
return 1;
}
-const char* PT_SYSTEMTST1 = "/SystemTest1";
-const char* PT_SYSTEMTST2 = "/SystemTest2";
-int SystemTest()
+const char *PT_SYSTEMTST1 = "/SystemTest1";
+const char *PT_SYSTEMTST2 = "/SystemTest2";
+int
+SystemTest()
{
- TESTING("multiple datatypes")
+ printf("Testing %-62s", "multiple datatypes");
+ HDfflush(stdout);
- hid_t dtypeID1, dtypeID2;
+ hid_t dtypeID1, dtypeID2;
hsize_t count;
- int error;
+ int error;
/* Creating two inter-related datatypes. Create two datasets and put
* one datatype in each. */
- typedef struct compoundType
- {
+ typedef struct {
short a, b, c;
- int e;
+ int e;
} compoundType;
dtypeID1 = H5Tcreate(H5T_COMPOUND, sizeof(compoundType));
- H5Tinsert(dtypeID1, "abbey", HOFFSET( compoundType, a ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID1, "bert", HOFFSET( compoundType, b ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID1, "charlie", HOFFSET( compoundType, c ), H5T_NATIVE_SHORT);
- H5Tinsert(dtypeID1, "ebert", HOFFSET( compoundType, e ), H5T_NATIVE_INT);
+ H5Tinsert(dtypeID1, "abbey", HOFFSET(compoundType, a), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID1, "bert", HOFFSET(compoundType, b), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID1, "charlie", HOFFSET(compoundType, c), H5T_NATIVE_SHORT);
+ H5Tinsert(dtypeID1, "ebert", HOFFSET(compoundType, e), H5T_NATIVE_INT);
- typedef struct cType2
- {
- char f;
+ typedef struct {
+ char f;
compoundType g;
} cType2;
dtypeID2 = H5Tcreate(H5T_COMPOUND, sizeof(cType2));
- H5Tinsert(dtypeID2, "f", HOFFSET( cType2, f ), H5T_NATIVE_CHAR);
- H5Tinsert(dtypeID2, "g", HOFFSET( cType2, g ), dtypeID1);
+ H5Tinsert(dtypeID2, "f", HOFFSET(cType2, f), H5T_NATIVE_CHAR);
+ H5Tinsert(dtypeID2, "g", HOFFSET(cType2, g), dtypeID1);
cType2 ct2[10];
- ct2[0].f = 'h';
+ ct2[0].f = 'h';
ct2[0].g.a = 9;
ct2[0].g.b = -13;
ct2[0].g.c = 0;
@@ -507,17 +523,17 @@ int SystemTest()
FL_PacketTable wrapper1(fileID, PT_SYSTEMTST1, dtypeID1, 1);
FL_PacketTable wrapper2(fileID, H5P_DEFAULT, PT_SYSTEMTST2, dtypeID2, 1);
- if(! wrapper1.IsValid())
- goto error;
- if(! wrapper2.IsValid())
- goto error;
+ if (!wrapper1.IsValid())
+ goto error;
+ if (!wrapper2.IsValid())
+ goto error;
/* Write and read packets, ensure that nothing is unusual */
wrapper2.AppendPacket(ct2);
count = wrapper1.GetPacketCount();
- if(count != 0)
- goto error;
+ if (count != 0)
+ goto error;
compoundType ct1[10];
ct1[0].a = 31;
@@ -534,13 +550,17 @@ int SystemTest()
wrapper1.ResetIndex();
wrapper1.GetNextPacket(&ct1[1]);
wrapper2.GetPacket(1, &ct2[2]);
- if(wrapper1.GetIndex(error) != 1) goto error;
- if(error < 0) goto error;
- if(wrapper2.GetIndex(error) != 0) goto error;
- if(error < 0) goto error;
+ if (wrapper1.GetIndex(error) != 1)
+ goto error;
+ if (error < 0)
+ goto error;
+ if (wrapper2.GetIndex(error) != 0)
+ goto error;
+ if (error < 0)
+ goto error;
- if(ct1[1].b != ct2[2].g.b)
- goto error;
+ if (ct1[1].b != ct2[2].g.b)
+ goto error;
H5Tclose(dtypeID1);
H5Tclose(dtypeID2);
@@ -549,10 +569,12 @@ int SystemTest()
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Tclose(dtypeID1);
H5Tclose(dtypeID2);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -560,120 +582,117 @@ error:
/*-------------------------------------------------------------------------
* TestHDFFV_9758(): Test that a packet table with compound datatype which
- * contains string type can be created and written correctly. (HDFFV-9758)
+ * contains string type can be created and written correctly. (HDFFV-9758)
*
* Notes:
- * Previously, data of the field that follows the string was read back
- * as garbage when #pragma pack(1) is used.
+ * Previously, data of the field that follows the string was read back
+ * as garbage when #pragma pack(1) is used.
* 2016/10/20 -BMR
* Updated:
- * #pragma pack(1) caused failure on Emu because Sparc cannot
- * access misaligned data. Changed it to pack() to do the
- * default alignment.
+ * #pragma pack(1) caused failure on Emu because Sparc cannot
+ * access misaligned data. Changed it to pack() to do the
+ * default alignment.
* 2016/10/25 -BMR
*-------------------------------------------------------------------------
*/
-#pragma pack() // default alignment
-const char* ABHI_PT("/abhiTest");
-const hsize_t NUM_PACKETS = 5;
-const int STRING_LENGTH = 19; // including terminating NULL
-int TestHDFFV_9758()
+#pragma pack() // default alignment
+const char * ABHI_PT("/abhiTest");
+const hsize_t NUM_PACKETS = 5;
+const int STRING_LENGTH = 19; // including terminating NULL
+int
+TestHDFFV_9758()
{
- hid_t strtype;
- hid_t compound_type;
+ hid_t strtype;
+ hid_t compound_type;
herr_t err;
- struct s1_t
- {
- int a;
- float b;
+ struct s1_t {
+ int a;
+ float b;
double c;
- char d[STRING_LENGTH]; // null terminated string
- int e;
+ char d[STRING_LENGTH]; // null terminated string
+ int e;
};
s1_t s1[NUM_PACKETS];
-
- for (hsize_t i = 0; i < NUM_PACKETS; i++)
- {
+
+ for (hsize_t i = 0; i < NUM_PACKETS; i++) {
s1[i].a = i;
s1[i].b = 1.f * static_cast<float>(i * i);
s1[i].c = 1. / (i + 1);
- sprintf(s1[i].d, "string%d", (int)i);
- s1[i].e = 100+i;
+ HDsprintf(s1[i].d, "string%d", (int)i);
+ s1[i].e = 100 + i;
}
- TESTING("data corruption in packed structs (HDFFV-9758)")
+ printf("Testing %-62s", "data corruption in packed structs (HDFFV-9758)");
+ HDfflush(stdout);
// Build a compound datatype
compound_type = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
if (compound_type < 0)
- goto error;
-
+ goto error;
+
err = H5Tinsert(compound_type, "a_name", HOFFSET(s1_t, a), H5T_NATIVE_INT);
if (err < 0)
- goto error;
+ goto error;
err = H5Tinsert(compound_type, "b_name", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT);
if (err < 0)
- goto error;
+ goto error;
err = H5Tinsert(compound_type, "c_name", HOFFSET(s1_t, c), H5T_NATIVE_DOUBLE);
if (err < 0)
- goto error;
+ goto error;
- strtype = H5Tcopy (H5T_C_S1);
+ strtype = H5Tcopy(H5T_C_S1);
if (compound_type < 0)
- goto error;
- err = H5Tset_size (strtype, STRING_LENGTH); /* create string */
+ goto error;
+ err = H5Tset_size(strtype, STRING_LENGTH); /* create string */
if (err < 0)
- goto error;
+ goto error;
err = H5Tinsert(compound_type, "d_name", HOFFSET(s1_t, d), strtype);
if (err < 0)
- goto error;
+ goto error;
err = H5Tinsert(compound_type, "e_name", HOFFSET(s1_t, e), H5T_NATIVE_INT);
if (err < 0)
- goto error;
+ goto error;
{ // so ptable will go out of scope before PASSED
- // Create a packet table
- FL_PacketTable ptable(fileID, "/examplePacketTable", compound_type, 1);
- if (!ptable.IsValid())
- goto error;
+ // Create a packet table
+ FL_PacketTable ptable(fileID, "/examplePacketTable", compound_type, 1);
+ if (!ptable.IsValid())
+ goto error;
+
+ // Add packets to the table
+ for (size_t i = 0; i < NUM_PACKETS; i++) {
+ /* Appends one packet at the current position */
+ err = ptable.AppendPacket(s1 + i);
+ if (err < 0)
+ goto error;
+ }
- // Add packets to the table
- for (size_t i = 0; i < NUM_PACKETS; i++)
- {
- /* Appends one packet at the current position */
- err = ptable.AppendPacket(s1 + i);
- if (err < 0) goto error;
- }
+ // Check packet count
+ const hsize_t count = ptable.GetPacketCount(err);
+ if (err < 0)
+ goto error;
- // Check packet count
- const hsize_t count = ptable.GetPacketCount(err);
- if (err < 0)
- goto error;
-
- if (count != NUM_PACKETS)
- {
- std::cerr
- << "Number of packets in packet table should be " << NUM_PACKETS
- << " but is " << count << endl;
- }
+ if (count != NUM_PACKETS) {
+ std::cerr << "Number of packets in packet table should be " << NUM_PACKETS << " but is " << count
+ << endl;
+ }
- // Read and verify the data
- ptable.ResetIndex();
- for (size_t i = 0; i < NUM_PACKETS; i++)
- {
- s1_t s2;
- memset(&s2, 0, sizeof(s1_t));
- err = ptable.GetNextPacket(&s2);
- if (err < 0)
- goto error;
-
- if (s2.a != s1[i].a || s2.e != s1[i].e)
- goto error;
- else if (HDstrcmp(s2.d, s1[i].d))
- goto error;
- }
+ // Read and verify the data
+ ptable.ResetIndex();
+ for (size_t i = 0; i < NUM_PACKETS; i++) {
+ s1_t s2;
+ HDmemset(&s2, 0, sizeof(s1_t));
+ err = ptable.GetNextPacket(&s2);
+ if (err < 0)
+ goto error;
+
+ if (s2.a != s1[i].a || s2.e != s1[i].e)
+ goto error;
+ else if (HDstrcmp(s2.d, s1[i].d))
+ goto error;
+ }
} // end of ptable block
PASSED();
@@ -681,13 +700,14 @@ int TestHDFFV_9758()
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Tclose(strtype);
H5Tclose(compound_type);
H5Fclose(fileID);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
}
-
diff --git a/hl/c++/test/ptableTest.h b/hl/c++/test/ptableTest.h
index 8af7bff..7504eb2 100644
--- a/hl/c++/test/ptableTest.h
+++ b/hl/c++/test/ptableTest.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,9 +21,9 @@
#ifndef PTABLETEST
#define PTABLETEST
+#include "h5hltest.h"
#include "H5PacketTable.h"
#include "H5Cpp.h"
-#include "h5hltest.h"
static hid_t fileID;
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 79dfee1..93ae9e8 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_EXAMPLES )
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_EXAMPLES C)
#-----------------------------------------------------------------------------
# Define Sources
@@ -28,13 +28,24 @@ set (examples
foreach (example ${examples})
add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ")
- target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories (hl_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_ex_${example} STATIC)
+ target_link_libraries (hl_ex_${example} PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (hl_ex_${example} SHARED)
+ target_link_libraries (hl_ex_${example} PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ endif ()
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
-endforeach ()
-if (BUILD_TESTING)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_EXAMPLES_${example}_FORMAT hl_ex_${example})
+ endif ()
+endforeach ()
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
-
endif ()
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 166fa7c..b997096 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -26,41 +26,39 @@ foreach (h5_file ${HDF5_TEST_FILES})
endforeach ()
add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list})
- # Remove any output file left over from previous test run
- add_test (
- NAME HL_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ex_lite1.h5
- ex_lite2.h5
- ex_lite3.h5
- packet_table_FLexample.h5
- ex_image1.h5
- ex_image2.h5
- ex_table_01.h5
- ex_table_02.h5
- ex_table_03.h5
- ex_table_04.h5
- ex_table_05.h5
- ex_table_06.h5
- ex_table_07.h5
- ex_table_08.h5
- ex_table_09.h5
- ex_table_10.h5
- ex_table_11.h5
- ex_table_12.h5
- ex_ds1.h5
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "HL_ex-clear-objects")
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ex_lite1.h5
+ ex_lite2.h5
+ ex_lite3.h5
+ packet_table_FLexample.h5
+ ex_image1.h5
+ ex_image2.h5
+ ex_table_01.h5
+ ex_table_02.h5
+ ex_table_03.h5
+ ex_table_04.h5
+ ex_table_05.h5
+ ex_table_06.h5
+ ex_table_07.h5
+ ex_table_08.h5
+ ex_table_09.h5
+ ex_table_10.h5
+ ex_table_11.h5
+ ex_table_12.h5
+ ex_ds1.h5
+)
+set_tests_properties (HL_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ add_test (NAME HL_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ex_${example}>)
else ()
add_test (NAME HL_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:hl_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -71,8 +69,11 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
+ if (last_test)
+ set_tests_properties (HL_ex_${example} PROPERTIES
+ DEPENDS ${last_test}
+ FIXTURES_REQUIRED clear_HL_ex
+ )
endif ()
set (last_test "HL_ex_${example}")
endforeach ()
diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am
index 29e1a48..0f617bb 100644
--- a/hl/examples/Makefile.am
+++ b/hl/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -25,8 +25,8 @@ endif
# Example directory
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR=$(examplesdir)/hl/c
+EXAMPLETOPDIR=$(examplesdir)/hl
INSTALL_SCRIPT_FILES = run-hlc-ex.sh
INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 8e10146..cb2d0fc 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -353,9 +353,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -370,6 +370,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -388,6 +389,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -415,6 +417,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -422,9 +426,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -440,6 +447,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,6 +469,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -473,8 +482,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -488,6 +499,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -529,6 +541,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -616,8 +629,8 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5
# Example directory
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR = $(examplesdir)/hl/c
+EXAMPLETOPDIR = $(examplesdir)/hl
INSTALL_SCRIPT_FILES = run-hlc-ex.sh
INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
@@ -653,11 +666,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1136,6 +1149,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1171,7 +1185,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1332,7 +1346,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c
index 1e0c592..73578f1 100644
--- a/hl/examples/ex_ds1.c
+++ b/hl/examples/ex_ds1.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,99 +14,93 @@
#include "hdf5.h"
#include "hdf5_hl.h"
+#define RANK 2
+#define DIM_DATA 12
+#define DIM1_SIZE 3
+#define DIM2_SIZE 4
+#define DIM0 0
+#define DIM1 1
-#define RANK 2
-#define DIM_DATA 12
-#define DIM1_SIZE 3
-#define DIM2_SIZE 4
-#define DIM0 0
-#define DIM1 1
+#define DSET_NAME "Mydata"
+#define DS_1_NAME "Yaxis"
+#define DS_2_NAME "Xaxis"
-#define DSET_NAME "Mydata"
-#define DS_1_NAME "Yaxis"
-#define DS_2_NAME "Xaxis"
-
-int main(void)
+int
+main(void)
{
- hid_t fid; /* file ID */
- hid_t did; /* dataset ID */
- hid_t dsid; /* DS dataset ID */
- int rank = RANK; /* rank of data dataset */
- int rankds = 1; /* rank of DS dataset */
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */
- int buf[DIM_DATA] = {1,2,3,4,5,6,7,8,9,10,11,12}; /* data of data dataset */
- hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
- hsize_t s2_dim[1] = {DIM2_SIZE}; /* size of DS 2 dataset */
- float s1_wbuf[DIM1_SIZE] = {10,20,30}; /* data of DS 1 dataset */
- int s2_wbuf[DIM2_SIZE] = {10,20,50,100}; /* data of DS 2 dataset */
-
-
- /* create a file using default properties */
- if ((fid=H5Fcreate("ex_ds1.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
- goto out;
-
- /* make a dataset */
- if (H5LTmake_dataset_int(fid,DSET_NAME,rank,dims,buf)<0)
- goto out;
-
- /* make a DS dataset for the first dimension */
- if (H5LTmake_dataset_float(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf)<0)
- goto out;
-
- /* make a DS dataset for the second dimension */
- if (H5LTmake_dataset_int(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf)<0)
- goto out;
-
-
-/*-------------------------------------------------------------------------
- * attach the DS_1_NAME dimension scale to DSET_NAME at dimension 0
- *-------------------------------------------------------------------------
- */
-
- /* get the dataset id for DSET_NAME */
- if ((did = H5Dopen2(fid,DSET_NAME, H5P_DEFAULT))<0)
- goto out;
-
- /* get the DS dataset id */
- if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
- goto out;
-
- /* attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 0 */
- if (H5DSattach_scale(did,dsid,DIM0)<0)
- goto out;
-
- /* close DS id */
- if (H5Dclose(dsid)<0)
- goto out;
-
-/*-------------------------------------------------------------------------
- * attach the DS_2_NAME dimension scale to DSET_NAME
- *-------------------------------------------------------------------------
- */
-
- /* get the DS dataset id */
- if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
- goto out;
-
- /* attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 1) */
- if (H5DSattach_scale(did,dsid,DIM1)<0)
- goto out;
-
- /* close DS id */
- if (H5Dclose(dsid)<0)
- goto out;
-
- /* close file */
- H5Fclose(fid);
-
- return 0;
+ hid_t fid; /* file ID */
+ hid_t did; /* dataset ID */
+ hid_t dsid; /* DS dataset ID */
+ int rank = RANK; /* rank of data dataset */
+ int rankds = 1; /* rank of DS dataset */
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE}; /* size of data dataset */
+ int buf[DIM_DATA] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; /* data of data dataset */
+ hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
+ hsize_t s2_dim[1] = {DIM2_SIZE}; /* size of DS 2 dataset */
+ float s1_wbuf[DIM1_SIZE] = {10, 20, 30}; /* data of DS 1 dataset */
+ int s2_wbuf[DIM2_SIZE] = {10, 20, 50, 100}; /* data of DS 2 dataset */
+
+ /* create a file using default properties */
+ if ((fid = H5Fcreate("ex_ds1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* make a dataset */
+ if (H5LTmake_dataset_int(fid, DSET_NAME, rank, dims, buf) < 0)
+ goto out;
+
+ /* make a DS dataset for the first dimension */
+ if (H5LTmake_dataset_float(fid, DS_1_NAME, rankds, s1_dim, s1_wbuf) < 0)
+ goto out;
+
+ /* make a DS dataset for the second dimension */
+ if (H5LTmake_dataset_int(fid, DS_2_NAME, rankds, s2_dim, s2_wbuf) < 0)
+ goto out;
+
+ /*-------------------------------------------------------------------------
+ * attach the DS_1_NAME dimension scale to DSET_NAME at dimension 0
+ *-------------------------------------------------------------------------
+ */
+
+ /* get the dataset id for DSET_NAME */
+ if ((did = H5Dopen2(fid, DSET_NAME, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* get the DS dataset id */
+ if ((dsid = H5Dopen2(fid, DS_1_NAME, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 0 */
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
+ goto out;
+
+ /* close DS id */
+ if (H5Dclose(dsid) < 0)
+ goto out;
+
+ /*-------------------------------------------------------------------------
+ * attach the DS_2_NAME dimension scale to DSET_NAME
+ *-------------------------------------------------------------------------
+ */
+
+ /* get the DS dataset id */
+ if ((dsid = H5Dopen2(fid, DS_2_NAME, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 1) */
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
+ goto out;
+
+ /* close DS id */
+ if (H5Dclose(dsid) < 0)
+ goto out;
+
+ /* close file */
+ H5Fclose(fid);
+
+ return 0;
out:
- printf("Error on return function...Exiting\n");
- return 1;
-
+ printf("Error on return function...Exiting\n");
+ return 1;
}
-
-
-
diff --git a/hl/examples/ex_image1.c b/hl/examples/ex_image1.c
index 56a175d..ead1715 100644
--- a/hl/examples/ex_image1.c
+++ b/hl/examples/ex_image1.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,56 +14,55 @@
#include "hdf5.h"
#include "hdf5_hl.h"
-#define WIDTH 400
-#define HEIGHT 200
-#define PAL_ENTRIES 9
-unsigned char buf [ WIDTH*HEIGHT ];
+#define WIDTH 400
+#define HEIGHT 200
+#define PAL_ENTRIES 9
+unsigned char buf[WIDTH * HEIGHT];
-int main( void )
+int
+main(void)
{
- hid_t file_id;
- hsize_t pal_dims[] = {PAL_ENTRIES,3};
- size_t i, j;
- int n, space;
- unsigned char pal[PAL_ENTRIES*3] = { /* create a palette with 9 colors */
- 0,0,168, /* dark blue */
- 0,0,252, /* blue */
- 0,168,252, /* ocean blue */
- 84,252,252, /* light blue */
- 168,252,168, /* light green */
- 0,252,168, /* green */
- 252,252,84, /* yellow */
- 252,168,0, /* orange */
- 252,0,0}; /* red */
+ hid_t file_id;
+ hsize_t pal_dims[] = {PAL_ENTRIES, 3};
+ size_t i, j;
+ int n, space;
+ unsigned char pal[PAL_ENTRIES * 3] = { /* create a palette with 9 colors */
+ 0, 0, 168, /* dark blue */
+ 0, 0, 252, /* blue */
+ 0, 168, 252, /* ocean blue */
+ 84, 252, 252, /* light blue */
+ 168, 252, 168, /* light green */
+ 0, 252, 168, /* green */
+ 252, 252, 84, /* yellow */
+ 252, 168, 0, /* orange */
+ 252, 0, 0}; /* red */
- /* create an image of 9 values divided evenly by the array */
- space = WIDTH*HEIGHT / PAL_ENTRIES;
- for (i=0, j=0, n=0; i < WIDTH*HEIGHT; i++, j++ )
- {
- buf[i] = n;
- if ( j > space )
- {
- n++;
- j=0;
- }
- if (n>PAL_ENTRIES-1) n=0;
- }
+ /* create an image of 9 values divided evenly by the array */
+ space = WIDTH * HEIGHT / PAL_ENTRIES;
+ for (i = 0, j = 0, n = 0; i < WIDTH * HEIGHT; i++, j++) {
+ buf[i] = n;
+ if (j > space) {
+ n++;
+ j = 0;
+ }
+ if (n > PAL_ENTRIES - 1)
+ n = 0;
+ }
- /* create a new HDF5 file using default properties. */
- file_id = H5Fcreate( "ex_image1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
+ /* create a new HDF5 file using default properties. */
+ file_id = H5Fcreate("ex_image1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* make the image */
- H5IMmake_image_8bit( file_id, "image1", (hsize_t)WIDTH, (hsize_t)HEIGHT, buf );
+ /* make the image */
+ H5IMmake_image_8bit(file_id, "image1", (hsize_t)WIDTH, (hsize_t)HEIGHT, buf);
- /* make a palette */
- H5IMmake_palette( file_id, "pallete", pal_dims, pal );
+ /* make a palette */
+ H5IMmake_palette(file_id, "pallete", pal_dims, pal);
- /* attach the palette to the image */
- H5IMlink_palette( file_id, "image1", "pallete" );
+ /* attach the palette to the image */
+ H5IMlink_palette(file_id, "image1", "pallete");
- /* close the file. */
- H5Fclose( file_id );
-
- return 0;
+ /* close the file. */
+ H5Fclose(file_id);
+ return 0;
}
diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c
index 5abf723..be9fc4b 100644
--- a/hl/examples/ex_image2.c
+++ b/hl/examples/ex_image2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,90 +16,89 @@
#include <stdlib.h>
#include <string.h>
-#define DATA_FILE1 "image8.txt"
-#define DATA_FILE2 "image24pixel.txt"
-#define IMAGE1_NAME "image8bit"
-#define IMAGE2_NAME "image24bitpixel"
-#define PAL_NAME "palette"
-#define PAL_ENTRIES 256
+#define DATA_FILE1 "image8.txt"
+#define DATA_FILE2 "image24pixel.txt"
+#define IMAGE1_NAME "image8bit"
+#define IMAGE2_NAME "image24bitpixel"
+#define PAL_NAME "palette"
+#define PAL_ENTRIES 256
-static int read_data(const char* file_name, hsize_t *width, hsize_t *height );
-unsigned char *gbuf = NULL; /* global buffer for image data */
+static int read_data(const char *file_name, hsize_t *width, hsize_t *height);
+unsigned char *gbuf = NULL; /* global buffer for image data */
-int main( void )
+int
+main(void)
{
- hid_t file_id; /* HDF5 file identifier */
- hsize_t width; /* width of image */
- hsize_t height; /* height of image */
- unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
- hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
- herr_t i, n;
-
- /* create a new HDF5 file using default properties. */
- file_id = H5Fcreate( "ex_image2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* read first data file */
- if (read_data(DATA_FILE1,&width,&height)<0)
- goto out;
-
- /* make the image */
- H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf );
- if (gbuf) {
- free(gbuf);
- gbuf = NULL;
- }
-
-/*-------------------------------------------------------------------------
- * define a palette, blue to red tones
- *-------------------------------------------------------------------------
- */
- for ( i=0, n=0; i<PAL_ENTRIES*3; i+=3, n++)
- {
- pal[i] =n; /* red */
- pal[i+1]=0; /* green */
- pal[i+2]=255-n; /* blue */
- }
-
- /* make a palette */
- H5IMmake_palette( file_id, PAL_NAME, pal_dims, pal );
-
- /* attach the palette to the image */
- H5IMlink_palette( file_id, IMAGE1_NAME, PAL_NAME );
-
-/*-------------------------------------------------------------------------
- * True color image example with pixel interlace
- *-------------------------------------------------------------------------
- */
-
- /* read second data file */
- if (read_data(DATA_FILE2,&width,&height)<0)
- goto out;
-
- /* make dataset */
- H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf );
-
- /* close the file. */
- H5Fclose( file_id );
-
- if(gbuf) {
- free(gbuf);
- gbuf = NULL;
- }
-
- return 0;
+ hid_t file_id; /* HDF5 file identifier */
+ hsize_t width; /* width of image */
+ hsize_t height; /* height of image */
+ unsigned char pal[PAL_ENTRIES * 3]; /* palette array */
+ hsize_t pal_dims[2] = {PAL_ENTRIES, 3}; /* palette dimensions */
+ herr_t i, n;
+
+ /* create a new HDF5 file using default properties. */
+ file_id = H5Fcreate("ex_image2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* read first data file */
+ if (read_data(DATA_FILE1, &width, &height) < 0)
+ goto out;
+
+ /* make the image */
+ H5IMmake_image_8bit(file_id, IMAGE1_NAME, width, height, gbuf);
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
+
+ /*-------------------------------------------------------------------------
+ * define a palette, blue to red tones
+ *-------------------------------------------------------------------------
+ */
+ for (i = 0, n = 0; i < PAL_ENTRIES * 3; i += 3, n++) {
+ pal[i] = n; /* red */
+ pal[i + 1] = 0; /* green */
+ pal[i + 2] = 255 - n; /* blue */
+ }
+
+ /* make a palette */
+ H5IMmake_palette(file_id, PAL_NAME, pal_dims, pal);
+
+ /* attach the palette to the image */
+ H5IMlink_palette(file_id, IMAGE1_NAME, PAL_NAME);
+
+ /*-------------------------------------------------------------------------
+ * True color image example with pixel interlace
+ *-------------------------------------------------------------------------
+ */
+
+ /* read second data file */
+ if (read_data(DATA_FILE2, &width, &height) < 0)
+ goto out;
+
+ /* make dataset */
+ H5IMmake_image_24bit(file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf);
+
+ /* close the file. */
+ H5Fclose(file_id);
+
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
+
+ return 0;
out:
- printf("Error on return function...Exiting\n");
+ printf("Error on return function...Exiting\n");
- if(gbuf) {
- free(gbuf);
- gbuf = NULL;
- }
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
- return 1;
+ return 1;
}
-
/*-------------------------------------------------------------------------
* read_data
* utility function to read ASCII image data
@@ -117,68 +116,63 @@ out:
*-------------------------------------------------------------------------
*/
-static int read_data( const char* fname, /*IN*/
- hsize_t *width, /*OUT*/
- hsize_t *height /*OUT*/ )
+static int
+read_data(const char *fname, /*IN*/
+ hsize_t * width, /*OUT*/
+ hsize_t * height /*OUT*/)
{
- int i, n;
- int color_planes;
- char str[20];
- FILE *f;
- int w, h;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char data_file[512]=""; /* buffer to hold name of existing data file */
-
-/*-------------------------------------------------------------------------
- * compose the name of the file to open, using "srcdir", if appropriate
- *-------------------------------------------------------------------------
- */
- strcpy(data_file, "");
- if (srcdir)
- {
- strcpy(data_file, srcdir);
- strcat(data_file, "/");
- }
- strcat(data_file,fname);
-
-/*-------------------------------------------------------------------------
- * read
- *-------------------------------------------------------------------------
- */
-
- f = fopen(data_file, "r");
- if ( f == NULL )
- {
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
- return -1;
- }
-
- fscanf( f, "%s", str );
- fscanf( f, "%d", &color_planes );
- fscanf( f, "%s", str );
- fscanf( f, "%d", &h);
- fscanf( f, "%s", str );
- fscanf( f, "%d", &w);
-
- *width = (hsize_t)w;
- *height = (hsize_t)h;
-
- if ( gbuf )
- {
- free( gbuf );
- gbuf=NULL;
- }
-
- gbuf = (unsigned char*) malloc (w * h * color_planes * sizeof( unsigned char ));
-
- for (i = 0; i < h * w * color_planes ; i++)
- {
- fscanf( f, "%d",&n );
- gbuf[i] = (unsigned char)n;
- }
- fclose(f);
-
- return 1;
-
+ int i, n;
+ int color_planes;
+ char str[20];
+ FILE *f;
+ int w, h;
+ char *srcdir = getenv("srcdir"); /* the source directory */
+ char data_file[512] = ""; /* buffer to hold name of existing data file */
+
+ /*-------------------------------------------------------------------------
+ * compose the name of the file to open, using "srcdir", if appropriate
+ *-------------------------------------------------------------------------
+ */
+ strcpy(data_file, "");
+ if (srcdir) {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat(data_file, fname);
+
+ /*-------------------------------------------------------------------------
+ * read
+ *-------------------------------------------------------------------------
+ */
+
+ f = fopen(data_file, "r");
+ if (f == NULL) {
+ printf("Could not open file %s. Try set $srcdir \n", data_file);
+ return -1;
+ }
+
+ fscanf(f, "%s", str);
+ fscanf(f, "%d", &color_planes);
+ fscanf(f, "%s", str);
+ fscanf(f, "%d", &h);
+ fscanf(f, "%s", str);
+ fscanf(f, "%d", &w);
+
+ *width = (hsize_t)w;
+ *height = (hsize_t)h;
+
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
+
+ gbuf = (unsigned char *)malloc(w * h * color_planes * sizeof(unsigned char));
+
+ for (i = 0; i < h * w * color_planes; i++) {
+ fscanf(f, "%d", &n);
+ gbuf[i] = (unsigned char)n;
+ }
+ fclose(f);
+
+ return 1;
}
-
diff --git a/hl/examples/ex_lite1.c b/hl/examples/ex_lite1.c
index 89f60dc..b28be70 100644
--- a/hl/examples/ex_lite1.c
+++ b/hl/examples/ex_lite1.c
@@ -6,34 +6,31 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#include "hdf5.h"
#include "hdf5_hl.h"
#define RANK 2
-
-int main( void )
+int
+main(void)
{
- hid_t file_id;
- hsize_t dims[RANK]={2,3};
- int data[6]={1,2,3,4,5,6};
+ hid_t file_id;
+ hsize_t dims[RANK] = {2, 3};
+ int data[6] = {1, 2, 3, 4, 5, 6};
- /* create a HDF5 file */
- file_id = H5Fcreate ("ex_lite1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* create a HDF5 file */
+ file_id = H5Fcreate("ex_lite1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* create and write an integer type dataset named "dset" */
- H5LTmake_dataset(file_id,"/dset",RANK,dims,H5T_NATIVE_INT,data);
+ /* create and write an integer type dataset named "dset" */
+ H5LTmake_dataset(file_id, "/dset", RANK, dims, H5T_NATIVE_INT, data);
- /* close file */
- H5Fclose (file_id);
+ /* close file */
+ H5Fclose(file_id);
- return 0;
+ return 0;
}
-
-
diff --git a/hl/examples/ex_lite2.c b/hl/examples/ex_lite2.c
index 261fc73..a0c2a65 100644
--- a/hl/examples/ex_lite2.c
+++ b/hl/examples/ex_lite2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,38 +14,34 @@
#include "hdf5.h"
#include "hdf5_hl.h"
-int main( void )
+int
+main(void)
{
- hid_t file_id;
- int data[6];
- hsize_t dims[2];
- size_t i, j, nrow, n_values;
+ hid_t file_id;
+ int data[6];
+ hsize_t dims[2];
+ size_t i, j, nrow, n_values;
- /* open file from ex_lite1.c */
- file_id = H5Fopen ("ex_lite1.h5", H5F_ACC_RDONLY, H5P_DEFAULT);
+ /* open file from ex_lite1.c */
+ file_id = H5Fopen("ex_lite1.h5", H5F_ACC_RDONLY, H5P_DEFAULT);
- /* read dataset */
- H5LTread_dataset_int(file_id,"/dset",data);
+ /* read dataset */
+ H5LTread_dataset_int(file_id, "/dset", data);
- /* get the dimensions of the dataset */
- H5LTget_dataset_info(file_id,"/dset",dims,NULL,NULL);
+ /* get the dimensions of the dataset */
+ H5LTget_dataset_info(file_id, "/dset", dims, NULL, NULL);
- /* print it by rows */
- n_values = (size_t)(dims[0] * dims[1]);
- nrow = (size_t)dims[1];
- for (i=0; i<n_values/nrow; i++ )
- {
- for (j=0; j<nrow; j++)
- printf (" %d", data[i*nrow + j]);
- printf ("\n");
- }
-
- /* close file */
- H5Fclose (file_id);
-
- return 0;
+ /* print it by rows */
+ n_values = (size_t)(dims[0] * dims[1]);
+ nrow = (size_t)dims[1];
+ for (i = 0; i < n_values / nrow; i++) {
+ for (j = 0; j < nrow; j++)
+ printf(" %d", data[i * nrow + j]);
+ printf("\n");
+ }
+ /* close file */
+ H5Fclose(file_id);
+ return 0;
}
-
-
diff --git a/hl/examples/ex_lite3.c b/hl/examples/ex_lite3.c
index 420cbcb..43291b7 100644
--- a/hl/examples/ex_lite3.c
+++ b/hl/examples/ex_lite3.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,51 +17,51 @@
#define ATTR_SIZE 5
-int main( void )
+int
+main(void)
{
- hid_t file_id;
- hid_t dset_id;
- hid_t space_id;
- hsize_t dims[1] = { ATTR_SIZE };
- int data[ATTR_SIZE] = {1,2,3,4,5};
- int i;
+ hid_t file_id;
+ hid_t dset_id;
+ hid_t space_id;
+ hsize_t dims[1] = {ATTR_SIZE};
+ int data[ATTR_SIZE] = {1, 2, 3, 4, 5};
+ int i;
- /* create a file */
- file_id = H5Fcreate("ex_lite3.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* create a file */
+ file_id = H5Fcreate("ex_lite3.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- /* create a data space */
- space_id = H5Screate_simple(1, dims, NULL);
+ /* create a data space */
+ space_id = H5Screate_simple(1, dims, NULL);
- /* create a dataset named "dset" */
- dset_id = H5Dcreate2(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ /* create a dataset named "dset" */
+ dset_id = H5Dcreate2(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- /* close */
- H5Dclose(dset_id);
- H5Sclose(space_id);
+ /* close */
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
-/*-------------------------------------------------------------------------
- * example of H5LTset_attribute_int
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * example of H5LTset_attribute_int
+ *-------------------------------------------------------------------------
+ */
- /* create and write the attribute "attr1" on the dataset "dset" */
- H5LTset_attribute_int(file_id, "dset", "attr1", data, ATTR_SIZE);
+ /* create and write the attribute "attr1" on the dataset "dset" */
+ H5LTset_attribute_int(file_id, "dset", "attr1", data, ATTR_SIZE);
-/*-------------------------------------------------------------------------
- * example of H5LTget_attribute_int
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * example of H5LTget_attribute_int
+ *-------------------------------------------------------------------------
+ */
- /* get the attribute "attr1" from the dataset "dset" */
- H5LTget_attribute_int(file_id, "dset", "attr1", data);
+ /* get the attribute "attr1" from the dataset "dset" */
+ H5LTget_attribute_int(file_id, "dset", "attr1", data);
- for(i = 0; i < ATTR_SIZE; i++ )
- printf(" %d", data[i]);
- printf("\n");
+ for (i = 0; i < ATTR_SIZE; i++)
+ printf(" %d", data[i]);
+ printf("\n");
- /* close file */
- H5Fclose(file_id);
+ /* close file */
+ H5Fclose(file_id);
- return 0;
+ return 0;
}
-
diff --git a/hl/examples/ex_table_01.c b/hl/examples/ex_table_01.c
index f1d0266..8635acf 100644
--- a/hl/examples/ex_table_01.c
+++ b/hl/examples/ex_table_01.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,112 +24,91 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
#define TABLE_NAME "table"
-
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- Particle dst_buf[NRECORDS];
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- size_t dst_sizes[NFIELDS] = { sizeof( dst_buf[0].name),
- sizeof( dst_buf[0].lati),
- sizeof( dst_buf[0].longi),
- sizeof( dst_buf[0].pressure),
- sizeof( dst_buf[0].temperature)};
-
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int *fill_data = NULL;
- int compress = 0;
- int i;
-
- /* Initialize field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_01.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
-/*-------------------------------------------------------------------------
- * H5TBmake_table
- *-------------------------------------------------------------------------
- */
-
- H5TBmake_table( "Table Title", file_id, TABLE_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
-/*-------------------------------------------------------------------------
- * H5TBread_table
- *-------------------------------------------------------------------------
- */
-
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* print it by rows */
- for (i=0; i<NRECORDS; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
-/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ Particle dst_buf[NRECORDS];
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi),
+ sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)};
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int * fill_data = NULL;
+ int compress = 0;
+ int i;
+
+ /* Initialize field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_01.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*-------------------------------------------------------------------------
+ * H5TBmake_table
+ *-------------------------------------------------------------------------
+ */
+
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /*-------------------------------------------------------------------------
+ * H5TBread_table
+ *-------------------------------------------------------------------------
+ */
+
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* print it by rows */
+ for (i = 0; i < NRECORDS; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /*-------------------------------------------------------------------------
+ * end
+ *-------------------------------------------------------------------------
+ */
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_02.c b/hl/examples/ex_table_02.c
index 923f810..9c476b3 100644
--- a/hl/examples/ex_table_02.c
+++ b/hl/examples/ex_table_02.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,107 +23,85 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_ADD (hsize_t) 2
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_ADD (hsize_t)2
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- Particle dst_buf[NRECORDS+NRECORDS_ADD];
-
-/* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- size_t dst_sizes[NFIELDS] = { sizeof( p_data[0].name),
- sizeof( p_data[0].lati),
- sizeof( p_data[0].longi),
- sizeof( p_data[0].pressure),
- sizeof( p_data[0].temperature)};
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int *fill_data = NULL;
- int compress = 0;
- int i;
-
- /* Append particles */
- Particle particle_in[ NRECORDS_ADD ] =
- {{ "eight",80,80, 8.0f, 80.0},
- {"nine",90,90, 9.0f, 90.0} };
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_02.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* make a table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,
- dst_size, field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* append two records */
- H5TBappend_records(file_id, TABLE_NAME,NRECORDS_ADD, dst_size, dst_offset, dst_sizes,
- &particle_in );
-
- /* read the table */
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* print it by rows */
- for (i=0; i<NRECORDS+NRECORDS_ADD; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ Particle dst_buf[NRECORDS + NRECORDS_ADD];
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ size_t dst_sizes[NFIELDS] = {sizeof(p_data[0].name), sizeof(p_data[0].lati), sizeof(p_data[0].longi),
+ sizeof(p_data[0].pressure), sizeof(p_data[0].temperature)};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int * fill_data = NULL;
+ int compress = 0;
+ int i;
+
+ /* Append particles */
+ Particle particle_in[NRECORDS_ADD] = {{"eight", 80, 80, 8.0f, 80.0}, {"nine", 90, 90, 9.0f, 90.0}};
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_02.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* make a table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* append two records */
+ H5TBappend_records(file_id, TABLE_NAME, NRECORDS_ADD, dst_size, dst_offset, dst_sizes, &particle_in);
+
+ /* read the table */
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* print it by rows */
+ for (i = 0; i < NRECORDS + NRECORDS_ADD; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_03.c b/hl/examples/ex_table_03.c
index 76a9eae..31cf970 100644
--- a/hl/examples/ex_table_03.c
+++ b/hl/examples/ex_table_03.c
@@ -6,12 +6,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#include "hdf5.h"
#include "hdf5_hl.h"
#include <stdlib.h>
@@ -24,113 +23,85 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_WRITE (hsize_t) 2
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_WRITE (hsize_t)2
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- Particle dst_buf[NRECORDS];
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- Particle p = {"zero",0,0, 0.0f, 0.0};
- size_t dst_sizes[NFIELDS] = { sizeof( p.name),
- sizeof( p.lati),
- sizeof( p.longi),
- sizeof( p.pressure),
- sizeof( p.temperature)};
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- /* Fill value particle */
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- hsize_t start; /* Record to start reading/writing */
- hsize_t nrecords; /* Number of records to read/write */
- int i;
-
- /* Define 2 new particles to write */
- Particle particle_in[NRECORDS_WRITE] =
- { {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0} };
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
-/* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_03.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title",
- file_id,
- TABLE_NAME,
- NFIELDS,
- NRECORDS,
- dst_size,
- field_names,
- dst_offset,
- field_type,
- chunk_size,
- fill_data,
- 0, /* no compression */
- NULL ); /* no data written */
-
-
- /* Overwrite 2 records starting at record 0 */
- start = 0;
- nrecords = NRECORDS_WRITE;
- H5TBwrite_records( file_id, TABLE_NAME, start, nrecords, dst_size, dst_offset,
- dst_sizes, particle_in);
-
- /* read the table */
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* print it by rows */
- for (i=0; i<NRECORDS; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ Particle dst_buf[NRECORDS];
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ Particle p = {"zero", 0, 0, 0.0f, 0.0};
+ size_t dst_sizes[NFIELDS] = {sizeof(p.name), sizeof(p.lati), sizeof(p.longi), sizeof(p.pressure),
+ sizeof(p.temperature)};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ /* Fill value particle */
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ hsize_t start; /* Record to start reading/writing */
+ hsize_t nrecords; /* Number of records to read/write */
+ int i;
+
+ /* Define 2 new particles to write */
+ Particle particle_in[NRECORDS_WRITE] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0}};
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_03.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, 0, /* no compression */
+ NULL); /* no data written */
+
+ /* Overwrite 2 records starting at record 0 */
+ start = 0;
+ nrecords = NRECORDS_WRITE;
+ H5TBwrite_records(file_id, TABLE_NAME, start, nrecords, dst_size, dst_offset, dst_sizes, particle_in);
+
+ /* read the table */
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* print it by rows */
+ for (i = 0; i < NRECORDS; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_04.c b/hl/examples/ex_table_04.c
index 203114c..863fe15 100644
--- a/hl/examples/ex_table_04.c
+++ b/hl/examples/ex_table_04.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,141 +23,117 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_ADD (hsize_t) 3
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_ADD (hsize_t)3
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Define a subset of Particle, with latitude and longitude fields */
- typedef struct Position
- {
- int lati;
- int longi;
- } Position;
-
- /* Define a subset of Particle, with name and pressure fields */
- typedef struct NamePressure
- {
- char name[16];
- float pressure;
- } NamePressure;
-
- Particle dst_buf[NRECORDS];
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
- size_t dst_sizes[NFIELDS] = { sizeof( dst_buf[0].name),
- sizeof( dst_buf[0].lati),
- sizeof( dst_buf[0].longi),
- sizeof( dst_buf[0].pressure),
- sizeof( dst_buf[0].temperature)};
- size_t field_offset_pos[2] = { HOFFSET( Position, lati ),
- HOFFSET( Position, longi )};
- const char *field_names[NFIELDS] = /* Define field information */
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} }; /* Fill value particle */
- hsize_t start; /* Record to start reading/writing */
- hsize_t nrecords; /* Number of records to read/write */
- int compress = 0;
- int i;
- Particle *p_data = NULL; /* Initially no data */
- float pressure_in [NRECORDS_ADD] = /* Define new values for the field "Pressure" */
- { 0.0f,1.0f,2.0f};
- Position position_in[NRECORDS_ADD] = {/* Define new values for "Latitude,Longitude" */
- {0,0},
- {10,10},
- {20,20}};
- NamePressure namepre_in[NRECORDS_ADD] =/* Define new values for "Name,Pressure" */
- { {"zero",0.0f},
- {"one", 1.0f},
- {"two", 2.0f},
- };
- size_t field_sizes_pos[2]=
- {
- sizeof(position_in[0].longi),
- sizeof(position_in[0].lati)
- };
- size_t field_sizes_pre[1]=
- {
- sizeof(namepre_in[0].pressure)
- };
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_04.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Write the pressure field starting at record 2 */
- start = 2;
- nrecords = NRECORDS_ADD;
- H5TBwrite_fields_name( file_id, TABLE_NAME, "Pressure", start, nrecords,
- sizeof( float ), 0, field_sizes_pre, pressure_in );
-
- /* Write the new longitude and latitude information starting at record 2 */
- start = 2;
- nrecords = NRECORDS_ADD;
- H5TBwrite_fields_name( file_id, TABLE_NAME, "Latitude,Longitude", start, nrecords,
- sizeof( Position ), field_offset_pos, field_sizes_pos, position_in );
-
- /* read the table */
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* print it by rows */
- for (i=0; i<NRECORDS; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
-/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Define a subset of Particle, with latitude and longitude fields */
+ typedef struct Position {
+ int lati;
+ int longi;
+ } Position;
+
+ /* Define a subset of Particle, with name and pressure fields */
+ typedef struct NamePressure {
+ char name[16];
+ float pressure;
+ } NamePressure;
+
+ Particle dst_buf[NRECORDS];
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+ size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi),
+ sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)};
+ size_t field_offset_pos[2] = {HOFFSET(Position, lati), HOFFSET(Position, longi)};
+ const char *field_names[NFIELDS] = /* Define field information */
+ {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}}; /* Fill value particle */
+ hsize_t start; /* Record to start reading/writing */
+ hsize_t nrecords; /* Number of records to read/write */
+ int compress = 0;
+ int i;
+ Particle *p_data = NULL; /* Initially no data */
+ float pressure_in[NRECORDS_ADD] = /* Define new values for the field "Pressure" */
+ {0.0f, 1.0f, 2.0f};
+ Position position_in[NRECORDS_ADD] = {/* Define new values for "Latitude,Longitude" */
+ {0, 0},
+ {10, 10},
+ {20, 20}};
+ NamePressure namepre_in[NRECORDS_ADD] = /* Define new values for "Name,Pressure" */
+ {
+ {"zero", 0.0f},
+ {"one", 1.0f},
+ {"two", 2.0f},
+ };
+ size_t field_sizes_pos[2] = {sizeof(position_in[0].longi), sizeof(position_in[0].lati)};
+ size_t field_sizes_pre[1] = {sizeof(namepre_in[0].pressure)};
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_04.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Write the pressure field starting at record 2 */
+ start = 2;
+ nrecords = NRECORDS_ADD;
+ H5TBwrite_fields_name(file_id, TABLE_NAME, "Pressure", start, nrecords, sizeof(float), 0, field_sizes_pre,
+ pressure_in);
+
+ /* Write the new longitude and latitude information starting at record 2 */
+ start = 2;
+ nrecords = NRECORDS_ADD;
+ H5TBwrite_fields_name(file_id, TABLE_NAME, "Latitude,Longitude", start, nrecords, sizeof(Position),
+ field_offset_pos, field_sizes_pos, position_in);
+
+ /* read the table */
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* print it by rows */
+ for (i = 0; i < NRECORDS; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /*-------------------------------------------------------------------------
+ * end
+ *-------------------------------------------------------------------------
+ */
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_05.c b/hl/examples/ex_table_05.c
index b43d635..337bfb6 100644
--- a/hl/examples/ex_table_05.c
+++ b/hl/examples/ex_table_05.c
@@ -6,12 +6,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#include "hdf5.h"
#include "hdf5_hl.h"
#include <stdlib.h>
@@ -24,142 +23,111 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_ADD (hsize_t) 3
-#define TABLE_NAME "table"
-
-
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_ADD (hsize_t)3
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Define a subset of Particle, with latitude and longitude fields */
- typedef struct Position
- {
- int lati;
- int longi;
- } Position;
-
- /* Calculate the type_size and the offsets of our struct members */
- Particle dst_buf[NRECORDS];
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
- size_t dst_sizes[NFIELDS] = { sizeof( dst_buf[0].name),
- sizeof( dst_buf[0].lati),
- sizeof( dst_buf[0].longi),
- sizeof( dst_buf[0].pressure),
- sizeof( dst_buf[0].temperature)};
-
- size_t field_offset_pos[2] = { HOFFSET( Position, lati ),
- HOFFSET( Position, longi )};
-
- /* Initially no data */
- Particle *p_data = NULL;
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} }; /* Fill value particle */
- int compress = 0;
- hsize_t nfields;
- hsize_t start; /* Record to start reading/writing */
- hsize_t nrecords; /* Number of records to read/write */
- int i;
-
- /* Define new values for the field "Pressure" */
- float pressure_in [NRECORDS_ADD] =
- { 0.0f,1.0f,2.0f};
- int field_index_pre[1] = { 3 };
- int field_index_pos[2] = { 1,2 };
-
- /* Define new values for the fields "Latitude,Longitude" */
- Position position_in[NRECORDS_ADD] = { {0,0},
- {10,10},
- {20,20} };
-
- size_t field_sizes_pos[2]=
- {
- sizeof(position_in[0].longi),
- sizeof(position_in[0].lati)
- };
-
- size_t field_sizes_pre[1]=
- {
- sizeof(float)
- };
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_05.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title", file_id, TABLE_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Write the pressure field starting at record 2 */
- nfields = 1;
- start = 2;
- nrecords = NRECORDS_ADD;
- H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pre, start, nrecords,
- sizeof( float ), 0, field_sizes_pre, pressure_in );
-
-
- /* Write the new longitude and latitude information starting at record 2 */
- nfields = 2;
- start = 2;
- nrecords = NRECORDS_ADD;
- H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pos, start, nrecords,
- sizeof( Position ), field_offset_pos, field_sizes_pos, position_in );
-
-
- /* read the table */
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* print it by rows */
- for (i=0; i<NRECORDS; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Define a subset of Particle, with latitude and longitude fields */
+ typedef struct Position {
+ int lati;
+ int longi;
+ } Position;
+
+ /* Calculate the type_size and the offsets of our struct members */
+ Particle dst_buf[NRECORDS];
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+ size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi),
+ sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)};
+
+ size_t field_offset_pos[2] = {HOFFSET(Position, lati), HOFFSET(Position, longi)};
+
+ /* Initially no data */
+ Particle *p_data = NULL;
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}}; /* Fill value particle */
+ int compress = 0;
+ hsize_t nfields;
+ hsize_t start; /* Record to start reading/writing */
+ hsize_t nrecords; /* Number of records to read/write */
+ int i;
+
+ /* Define new values for the field "Pressure" */
+ float pressure_in[NRECORDS_ADD] = {0.0f, 1.0f, 2.0f};
+ int field_index_pre[1] = {3};
+ int field_index_pos[2] = {1, 2};
+
+ /* Define new values for the fields "Latitude,Longitude" */
+ Position position_in[NRECORDS_ADD] = {{0, 0}, {10, 10}, {20, 20}};
+
+ size_t field_sizes_pos[2] = {sizeof(position_in[0].longi), sizeof(position_in[0].lati)};
+
+ size_t field_sizes_pre[1] = {sizeof(float)};
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_05.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Write the pressure field starting at record 2 */
+ nfields = 1;
+ start = 2;
+ nrecords = NRECORDS_ADD;
+ H5TBwrite_fields_index(file_id, TABLE_NAME, nfields, field_index_pre, start, nrecords, sizeof(float), 0,
+ field_sizes_pre, pressure_in);
+
+ /* Write the new longitude and latitude information starting at record 2 */
+ nfields = 2;
+ start = 2;
+ nrecords = NRECORDS_ADD;
+ H5TBwrite_fields_index(file_id, TABLE_NAME, nfields, field_index_pos, start, nrecords, sizeof(Position),
+ field_offset_pos, field_sizes_pos, position_in);
+
+ /* read the table */
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* print it by rows */
+ for (i = 0; i < NRECORDS; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_06.c b/hl/examples/ex_table_06.c
index 0397e83..f6b67c8 100644
--- a/hl/examples/ex_table_06.c
+++ b/hl/examples/ex_table_06.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,73 +23,64 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} }; /* Fill value particle */
- int compress = 0;
- hsize_t nfields_out;
- hsize_t nrecords_out;
-
- /* Initialize field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_06.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make a table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,dst_size,
- field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, NULL);
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}}; /* Fill value particle */
+ int compress = 0;
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+
+ /* Initialize field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_06.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make a table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, NULL);
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_07.c b/hl/examples/ex_table_07.c
index d9ea444..ab36613 100644
--- a/hl/examples/ex_table_07.c
+++ b/hl/examples/ex_table_07.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,90 +23,77 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- const char *field_names[NFIELDS] = /* Define field information */
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} };
- hsize_t start; /* Record to start reading */
- hsize_t nrecords; /* Number of records to insert/delete */
- hsize_t nfields_out;
- hsize_t nrecords_out;
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_07.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Delete records */
- start = 3;
- nrecords = 3;
- H5TBdelete_record( file_id, TABLE_NAME, start, nrecords );
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ const char *field_names[NFIELDS] = /* Define field information */
+ {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}};
+ hsize_t start; /* Record to start reading */
+ hsize_t nrecords; /* Number of records to insert/delete */
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_07.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Delete records */
+ start = 3;
+ nrecords = 3;
+ H5TBdelete_record(file_id, TABLE_NAME, start, nrecords);
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_08.c b/hl/examples/ex_table_08.c
index a45520d..5d447dd 100644
--- a/hl/examples/ex_table_08.c
+++ b/hl/examples/ex_table_08.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,121 +22,96 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_INS (hsize_t) 2
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_INS (hsize_t)2
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- Particle dst_buf[ NRECORDS + NRECORDS_INS ];
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
- size_t dst_sizes[NFIELDS] = { sizeof( p_data[0].name),
- sizeof( p_data[0].lati),
- sizeof( p_data[0].longi),
- sizeof( p_data[0].pressure),
- sizeof( p_data[0].temperature)};
-
- /* Define an array of Particles to insert */
- Particle p_data_insert[NRECORDS_INS] =
- { {"new",30,30, 3.0f, 30.0},
- {"new",40,40, 4.0f, 40.0}
- };
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- int *fill_data = NULL;
- hsize_t start; /* Record to start reading */
- hsize_t nrecords; /* Number of records to insert/delete */
- hsize_t nfields_out;
- hsize_t nrecords_out;
- int i;
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_08.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Insert records */
- start = 3;
- nrecords = NRECORDS_INS;
- H5TBinsert_record( file_id, TABLE_NAME, start, nrecords, dst_size, dst_offset,
- dst_sizes, p_data_insert );
-
- /* read the table */
- H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* get table info */
- H5TBget_table_info(file_id,TABLE_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* print it by rows */
- for (i=0; i<nrecords_out; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ Particle dst_buf[NRECORDS + NRECORDS_INS];
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+ size_t dst_sizes[NFIELDS] = {sizeof(p_data[0].name), sizeof(p_data[0].lati), sizeof(p_data[0].longi),
+ sizeof(p_data[0].pressure), sizeof(p_data[0].temperature)};
+
+ /* Define an array of Particles to insert */
+ Particle p_data_insert[NRECORDS_INS] = {{"new", 30, 30, 3.0f, 30.0}, {"new", 40, 40, 4.0f, 40.0}};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ int * fill_data = NULL;
+ hsize_t start; /* Record to start reading */
+ hsize_t nrecords; /* Number of records to insert/delete */
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+ int i;
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_08.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Insert records */
+ start = 3;
+ nrecords = NRECORDS_INS;
+ H5TBinsert_record(file_id, TABLE_NAME, start, nrecords, dst_size, dst_offset, dst_sizes, p_data_insert);
+
+ /* read the table */
+ H5TBread_table(file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* get table info */
+ H5TBget_table_info(file_id, TABLE_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* print it by rows */
+ for (i = 0; i < nrecords_out; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_09.c b/hl/examples/ex_table_09.c
index a9f5f11..381925f 100644
--- a/hl/examples/ex_table_09.c
+++ b/hl/examples/ex_table_09.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,121 +22,99 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define NRECORDS_INS (hsize_t) 2
-#define TABLE1_NAME "table1"
-#define TABLE2_NAME "table2"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define NRECORDS_INS (hsize_t)2
+#define TABLE1_NAME "table1"
+#define TABLE2_NAME "table2"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- Particle dst_buf[ NRECORDS + NRECORDS_INS ];
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
- size_t dst_sizes[NFIELDS] = { sizeof( dst_buf[0].name),
- sizeof( dst_buf[0].lati),
- sizeof( dst_buf[0].longi),
- sizeof( dst_buf[0].pressure),
- sizeof( dst_buf[0].temperature)};
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} }; /* Fill value particle */
- hsize_t start1; /* Record to start reading from 1st table */
- hsize_t nrecords; /* Number of records to insert */
- hsize_t start2; /* Record to start writing in 2nd table */
- int i;
- hsize_t nfields_out;
- hsize_t nrecords_out;
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_09.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make 2 tables: TABLE2_NAME is empty */
- H5TBmake_table( "Table Title",file_id,TABLE1_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- H5TBmake_table( "Table Title",file_id,TABLE2_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, NULL );
-
-
- /* Add 2 records from TABLE1_NAME to TABLE2_NAME */
- start1 = 3;
- nrecords = NRECORDS_INS;
- start2 = 6;
- H5TBadd_records_from( file_id, TABLE1_NAME, start1, nrecords, TABLE2_NAME, start2 );
-
- /* read TABLE2_NAME: it should have 2 more records now */
- H5TBread_table( file_id, TABLE2_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE2_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* print it by rows */
- for (i=0; i<nrecords_out; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ Particle dst_buf[NRECORDS + NRECORDS_INS];
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+ size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi),
+ sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)};
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}}; /* Fill value particle */
+ hsize_t start1; /* Record to start reading from 1st table */
+ hsize_t nrecords; /* Number of records to insert */
+ hsize_t start2; /* Record to start writing in 2nd table */
+ int i;
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_09.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make 2 tables: TABLE2_NAME is empty */
+ H5TBmake_table("Table Title", file_id, TABLE1_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ H5TBmake_table("Table Title", file_id, TABLE2_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, NULL);
+
+ /* Add 2 records from TABLE1_NAME to TABLE2_NAME */
+ start1 = 3;
+ nrecords = NRECORDS_INS;
+ start2 = 6;
+ H5TBadd_records_from(file_id, TABLE1_NAME, start1, nrecords, TABLE2_NAME, start2);
+
+ /* read TABLE2_NAME: it should have 2 more records now */
+ H5TBread_table(file_id, TABLE2_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE2_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* print it by rows */
+ for (i = 0; i < nrecords_out; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_10.c b/hl/examples/ex_table_10.c
index 8c4d8ae..4ba5d64 100644
--- a/hl/examples/ex_table_10.c
+++ b/hl/examples/ex_table_10.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,114 +22,92 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define TABLE1_NAME "table1"
-#define TABLE2_NAME "table2"
-#define TABLE3_NAME "table3"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define TABLE1_NAME "table1"
+#define TABLE2_NAME "table2"
+#define TABLE3_NAME "table3"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- Particle dst_buf[ 2 * NRECORDS ];
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
- size_t dst_sizes[NFIELDS] = { sizeof( dst_buf[0].name),
- sizeof( dst_buf[0].lati),
- sizeof( dst_buf[0].longi),
- sizeof( dst_buf[0].pressure),
- sizeof( dst_buf[0].temperature)};
-
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- int *fill_data = NULL;
- hsize_t nfields_out;
- hsize_t nrecords_out;
- int i;
-
- /* Initialize the field field_type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_10.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make two tables */
- H5TBmake_table( "Table Title",file_id,TABLE1_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- H5TBmake_table( "Table Title",file_id,TABLE2_NAME,NFIELDS,NRECORDS,
- dst_size,field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Combine the two tables into a third in the same file */
- H5TBcombine_tables( file_id, TABLE1_NAME, file_id, TABLE2_NAME, TABLE3_NAME );
-
- /* read the combined table */
- H5TBread_table( file_id, TABLE3_NAME, dst_size, dst_offset, dst_sizes, dst_buf );
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE3_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* print it by rows */
- for (i=0; i<nrecords_out; i++) {
- printf ("%-5s %-5d %-5d %-5f %-5f",
- dst_buf[i].name,
- dst_buf[i].lati,
- dst_buf[i].longi,
- dst_buf[i].pressure,
- dst_buf[i].temperature);
- printf ("\n");
- }
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ Particle dst_buf[2 * NRECORDS];
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+ size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi),
+ sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ int * fill_data = NULL;
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+ int i;
+
+ /* Initialize the field field_type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_10.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make two tables */
+ H5TBmake_table("Table Title", file_id, TABLE1_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ H5TBmake_table("Table Title", file_id, TABLE2_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Combine the two tables into a third in the same file */
+ H5TBcombine_tables(file_id, TABLE1_NAME, file_id, TABLE2_NAME, TABLE3_NAME);
+
+ /* read the combined table */
+ H5TBread_table(file_id, TABLE3_NAME, dst_size, dst_offset, dst_sizes, dst_buf);
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE3_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* print it by rows */
+ for (i = 0; i < nrecords_out; i++) {
+ printf("%-5s %-5d %-5d %-5f %-5f", dst_buf[i].name, dst_buf[i].lati, dst_buf[i].longi,
+ dst_buf[i].pressure, dst_buf[i].temperature);
+ printf("\n");
+ }
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_11.c b/hl/examples/ex_table_11.c
index d6215cb..9bf3927 100644
--- a/hl/examples/ex_table_11.c
+++ b/hl/examples/ex_table_11.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,95 +22,81 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle1
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle1;
-
-/* Define an array of Particles */
- Particle1 p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size1 = sizeof( Particle1 );
- size_t dst_offset1[NFIELDS] = { HOFFSET( Particle1, name ),
- HOFFSET( Particle1, lati ),
- HOFFSET( Particle1, longi ),
- HOFFSET( Particle1, pressure ),
- HOFFSET( Particle1, temperature )};
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- Particle1 fill_data[1] = { {"no data",-1,-1, -99.0f, -99.0} };
- int fill_data_new[1] = { -100 };
- hsize_t position;
- hsize_t nfields_out;
- hsize_t nrecords_out;
-
- /* Define the inserted field information */
- hid_t field_type_new = H5T_NATIVE_INT;
- int data[NRECORDS] = { 0,1,2,3,4,5,6,7 };
-
- /* Initialize the field type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_11.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make the table */
- H5TBmake_table( "Table Title",file_id,TABLE_NAME,NFIELDS,NRECORDS,
- dst_size1,field_names, dst_offset1, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Insert the new field at the end of the field list */
- position = NFIELDS;
- H5TBinsert_field( file_id, TABLE_NAME, "New Field", field_type_new, position,
- fill_data_new, data );
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
-
+ typedef struct Particle1 {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle1;
+
+ /* Define an array of Particles */
+ Particle1 p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size1 = sizeof(Particle1);
+ size_t dst_offset1[NFIELDS] = {HOFFSET(Particle1, name), HOFFSET(Particle1, lati),
+ HOFFSET(Particle1, longi), HOFFSET(Particle1, pressure),
+ HOFFSET(Particle1, temperature)};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ Particle1 fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}};
+ int fill_data_new[1] = {-100};
+ hsize_t position;
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+
+ /* Define the inserted field information */
+ hid_t field_type_new = H5T_NATIVE_INT;
+ int data[NRECORDS] = {0, 1, 2, 3, 4, 5, 6, 7};
+
+ /* Initialize the field type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_11.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make the table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size1, field_names, dst_offset1,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Insert the new field at the end of the field list */
+ position = NFIELDS;
+ H5TBinsert_field(file_id, TABLE_NAME, "New Field", field_type_new, position, fill_data_new, data);
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/ex_table_12.c b/hl/examples/ex_table_12.c
index f287c29..3e7c27a 100644
--- a/hl/examples/ex_table_12.c
+++ b/hl/examples/ex_table_12.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,87 +23,73 @@
*-------------------------------------------------------------------------
*/
-#define NFIELDS (hsize_t) 5
-#define NRECORDS (hsize_t) 8
-#define TABLE_NAME "table"
+#define NFIELDS (hsize_t)5
+#define NRECORDS (hsize_t)8
+#define TABLE_NAME "table"
-int main( void )
+int
+main(void)
{
- typedef struct Particle
- {
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
- } Particle;
-
- /* Calculate the size and the offsets of our struct members in memory */
- size_t dst_size = sizeof( Particle );
- size_t dst_offset[NFIELDS] = { HOFFSET( Particle, name ),
- HOFFSET( Particle, lati ),
- HOFFSET( Particle, longi ),
- HOFFSET( Particle, pressure ),
- HOFFSET( Particle, temperature )};
-
- /* Define an array of Particles */
- Particle p_data[NRECORDS] = {
- {"zero",0,0, 0.0f, 0.0},
- {"one",10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
- };
-
- /* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hid_t file_id;
- hsize_t chunk_size = 10;
- int compress = 0;
- Particle fill_data[1] =
- { {"no data",-1,-1, -99.0f, -99.0} };
- hsize_t nfields_out;
- hsize_t nrecords_out;
-
- /* Initialize the field type */
- string_type = H5Tcopy( H5T_C_S1 );
- H5Tset_size( string_type, 16 );
- field_type[0] = string_type;
- field_type[1] = H5T_NATIVE_INT;
- field_type[2] = H5T_NATIVE_INT;
- field_type[3] = H5T_NATIVE_FLOAT;
- field_type[4] = H5T_NATIVE_DOUBLE;
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( "ex_table_12.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
- /* Make a table */
- H5TBmake_table( "Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size,
- field_names, dst_offset, field_type,
- chunk_size, fill_data, compress, p_data );
-
- /* Delete the field */
- H5TBdelete_field( file_id, TABLE_NAME, "Pressure" );
-
- /* Get table info */
- H5TBget_table_info (file_id,TABLE_NAME, &nfields_out, &nrecords_out );
-
- /* print */
- printf ("Table has %d fields and %d records\n",(int)nfields_out,(int)nrecords_out);
-
- /* close type */
- H5Tclose( string_type );
-
- /* close the file */
- H5Fclose( file_id );
-
- return 0;
-
+ typedef struct Particle {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
+ } Particle;
+
+ /* Calculate the size and the offsets of our struct members in memory */
+ size_t dst_size = sizeof(Particle);
+ size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi),
+ HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)};
+
+ /* Define an array of Particles */
+ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0}, {"one", 10, 10, 1.0f, 10.0},
+ {"two", 20, 20, 2.0f, 20.0}, {"three", 30, 30, 3.0f, 30.0},
+ {"four", 40, 40, 4.0f, 40.0}, {"five", 50, 50, 5.0f, 50.0},
+ {"six", 60, 60, 6.0f, 60.0}, {"seven", 70, 70, 7.0f, 70.0}};
+
+ /* Define field information */
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hid_t file_id;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ Particle fill_data[1] = {{"no data", -1, -1, -99.0f, -99.0}};
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+
+ /* Initialize the field type */
+ string_type = H5Tcopy(H5T_C_S1);
+ H5Tset_size(string_type, 16);
+ field_type[0] = string_type;
+ field_type[1] = H5T_NATIVE_INT;
+ field_type[2] = H5T_NATIVE_INT;
+ field_type[3] = H5T_NATIVE_FLOAT;
+ field_type[4] = H5T_NATIVE_DOUBLE;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate("ex_table_12.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Make a table */
+ H5TBmake_table("Table Title", file_id, TABLE_NAME, NFIELDS, NRECORDS, dst_size, field_names, dst_offset,
+ field_type, chunk_size, fill_data, compress, p_data);
+
+ /* Delete the field */
+ H5TBdelete_field(file_id, TABLE_NAME, "Pressure");
+
+ /* Get table info */
+ H5TBget_table_info(file_id, TABLE_NAME, &nfields_out, &nrecords_out);
+
+ /* print */
+ printf("Table has %d fields and %d records\n", (int)nfields_out, (int)nrecords_out);
+
+ /* close type */
+ H5Tclose(string_type);
+
+ /* close the file */
+ H5Fclose(file_id);
+
+ return 0;
}
-
diff --git a/hl/examples/pal_rgb.h b/hl/examples/pal_rgb.h
index f3905b3..a2b17e2 100644
--- a/hl/examples/pal_rgb.h
+++ b/hl/examples/pal_rgb.h
@@ -6,272 +6,268 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-const unsigned char pal_rgb[256*3] = {255,255,255,
-0,0,131,
-0,0,135,
-0,0,139,
-0,0,143,
-0,0,147,
-0,0,151,
-0,0,155,
-0,0,159,
-0,0,163,
-0,0,167,
-0,0,171,
-0,0,175,
-0,0,179,
-0,0,183,
-0,0,187,
-0,0,191,
-0,0,195,
-0,0,199,
-0,0,203,
-0,0,207,
-0,0,211,
-0,0,215,
-0,0,219,
-0,0,223,
-0,0,227,
-0,0,231,
-0,0,235,
-0,0,239,
-0,0,243,
-0,0,247,
-0,0,251,
-0,0,255,
-0,0,255,
-0,3,255,
-0,7,255,
-0,11,255,
-0,15,255,
-0,19,255,
-0,23,255,
-0,27,255,
-0,31,255,
-0,35,255,
-0,39,255,
-0,43,255,
-0,47,255,
-0,51,255,
-0,55,255,
-0,59,255,
-0,63,255,
-0,67,255,
-0,71,255,
-0,75,255,
-0,79,255,
-0,83,255,
-0,87,255,
-0,91,255,
-0,95,255,
-0,99,255,
-0,103,255,
-0,107,255,
-0,111,255,
-0,115,255,
-0,119,255,
-0,123,255,
-0,127,255,
-0,131,255,
-0,135,255,
-0,139,255,
-0,143,255,
-0,147,255,
-0,151,255,
-0,155,255,
-0,159,255,
-0,163,255,
-0,167,255,
-0,171,255,
-0,175,255,
-0,179,255,
-0,183,255,
-0,187,255,
-0,191,255,
-0,195,255,
-0,199,255,
-0,203,255,
-0,207,255,
-0,211,255,
-0,215,255,
-0,219,255,
-0,223,255,
-0,227,255,
-0,231,255,
-0,235,255,
-0,239,255,
-0,243,255,
-0,247,255,
-0,251,255,
-0,255,255,
-0,255,255,
-3,255,251,
-7,255,247,
-11,255,243,
-15,255,239,
-19,255,235,
-23,255,231,
-27,255,227,
-31,255,223,
-35,255,219,
-39,255,215,
-43,255,211,
-47,255,207,
-51,255,203,
-55,255,199,
-59,255,195,
-63,255,191,
-67,255,187,
-71,255,183,
-75,255,179,
-79,255,175,
-83,255,171,
-87,255,167,
-91,255,163,
-95,255,159,
-99,255,155,
-103,255,151,
-107,255,147,
-111,255,143,
-115,255,139,
-119,255,135,
-123,255,131,
-127,255,127,
-131,255,123,
-135,255,119,
-139,255,115,
-143,255,111,
-147,255,107,
-151,255,103,
-155,255,99,
-159,255,95,
-163,255,91,
-167,255,87,
-171,255,83,
-175,255,79,
-179,255,75,
-183,255,71,
-187,255,67,
-191,255,63,
-195,255,59,
-199,255,55,
-203,255,51,
-207,255,47,
-211,255,43,
-215,255,39,
-219,255,35,
-223,255,31,
-227,255,27,
-231,255,23,
-235,255,19,
-239,255,15,
-243,255,11,
-247,255,7,
-251,255,3,
-255,255,0,
-255,251,0,
-255,247,0,
-255,243,0,
-255,239,0,
-255,235,0,
-255,231,0,
-255,227,0,
-255,223,0,
-255,219,0,
-255,215,0,
-255,211,0,
-255,207,0,
-255,203,0,
-255,199,0,
-255,195,0,
-255,191,0,
-255,187,0,
-255,183,0,
-255,179,0,
-255,175,0,
-255,171,0,
-255,167,0,
-255,163,0,
-255,159,0,
-255,155,0,
-255,151,0,
-255,147,0,
-255,143,0,
-255,139,0,
-255,135,0,
-255,131,0,
-255,127,0,
-255,123,0,
-255,119,0,
-255,115,0,
-255,111,0,
-255,107,0,
-255,103,0,
-255,99,0,
-255,95,0,
-255,91,0,
-255,87,0,
-255,83,0,
-255,79,0,
-255,75,0,
-255,71,0,
-255,67,0,
-255,63,0,
-255,59,0,
-255,55,0,
-255,51,0,
-255,47,0,
-255,43,0,
-255,39,0,
-255,35,0,
-255,31,0,
-255,27,0,
-255,23,0,
-255,19,0,
-255,15,0,
-255,11,0,
-255,7,0,
-255,3,0,
-255,0,0,
-250,0,0,
-246,0,0,
-241,0,0,
-237,0,0,
-233,0,0,
-228,0,0,
-224,0,0,
-219,0,0,
-215,0,0,
-211,0,0,
-206,0,0,
-202,0,0,
-197,0,0,
-193,0,0,
-189,0,0,
-184,0,0,
-180,0,0,
-175,0,0,
-171,0,0,
-167,0,0,
-162,0,0,
-158,0,0,
-153,0,0,
-149,0,0,
-145,0,0,
-140,0,0,
-136,0,0,
-131,0,0,
-127,0,0
+/* clang-format off */
+const unsigned char pal_rgb[256*3] = {
+ 255,255,255,
+ 0,0,131,
+ 0,0,135,
+ 0,0,139,
+ 0,0,143,
+ 0,0,147,
+ 0,0,151,
+ 0,0,155,
+ 0,0,159,
+ 0,0,163,
+ 0,0,167,
+ 0,0,171,
+ 0,0,175,
+ 0,0,179,
+ 0,0,183,
+ 0,0,187,
+ 0,0,191,
+ 0,0,195,
+ 0,0,199,
+ 0,0,203,
+ 0,0,207,
+ 0,0,211,
+ 0,0,215,
+ 0,0,219,
+ 0,0,223,
+ 0,0,227,
+ 0,0,231,
+ 0,0,235,
+ 0,0,239,
+ 0,0,243,
+ 0,0,247,
+ 0,0,251,
+ 0,0,255,
+ 0,0,255,
+ 0,3,255,
+ 0,7,255,
+ 0,11,255,
+ 0,15,255,
+ 0,19,255,
+ 0,23,255,
+ 0,27,255,
+ 0,31,255,
+ 0,35,255,
+ 0,39,255,
+ 0,43,255,
+ 0,47,255,
+ 0,51,255,
+ 0,55,255,
+ 0,59,255,
+ 0,63,255,
+ 0,67,255,
+ 0,71,255,
+ 0,75,255,
+ 0,79,255,
+ 0,83,255,
+ 0,87,255,
+ 0,91,255,
+ 0,95,255,
+ 0,99,255,
+ 0,103,255,
+ 0,107,255,
+ 0,111,255,
+ 0,115,255,
+ 0,119,255,
+ 0,123,255,
+ 0,127,255,
+ 0,131,255,
+ 0,135,255,
+ 0,139,255,
+ 0,143,255,
+ 0,147,255,
+ 0,151,255,
+ 0,155,255,
+ 0,159,255,
+ 0,163,255,
+ 0,167,255,
+ 0,171,255,
+ 0,175,255,
+ 0,179,255,
+ 0,183,255,
+ 0,187,255,
+ 0,191,255,
+ 0,195,255,
+ 0,199,255,
+ 0,203,255,
+ 0,207,255,
+ 0,211,255,
+ 0,215,255,
+ 0,219,255,
+ 0,223,255,
+ 0,227,255,
+ 0,231,255,
+ 0,235,255,
+ 0,239,255,
+ 0,243,255,
+ 0,247,255,
+ 0,251,255,
+ 0,255,255,
+ 0,255,255,
+ 3,255,251,
+ 7,255,247,
+ 11,255,243,
+ 15,255,239,
+ 19,255,235,
+ 23,255,231,
+ 27,255,227,
+ 31,255,223,
+ 35,255,219,
+ 39,255,215,
+ 43,255,211,
+ 47,255,207,
+ 51,255,203,
+ 55,255,199,
+ 59,255,195,
+ 63,255,191,
+ 67,255,187,
+ 71,255,183,
+ 75,255,179,
+ 79,255,175,
+ 83,255,171,
+ 87,255,167,
+ 91,255,163,
+ 95,255,159,
+ 99,255,155,
+ 103,255,151,
+ 107,255,147,
+ 111,255,143,
+ 115,255,139,
+ 119,255,135,
+ 123,255,131,
+ 127,255,127,
+ 131,255,123,
+ 135,255,119,
+ 139,255,115,
+ 143,255,111,
+ 147,255,107,
+ 151,255,103,
+ 155,255,99,
+ 159,255,95,
+ 163,255,91,
+ 167,255,87,
+ 171,255,83,
+ 175,255,79,
+ 179,255,75,
+ 183,255,71,
+ 187,255,67,
+ 191,255,63,
+ 195,255,59,
+ 199,255,55,
+ 203,255,51,
+ 207,255,47,
+ 211,255,43,
+ 215,255,39,
+ 219,255,35,
+ 223,255,31,
+ 227,255,27,
+ 231,255,23,
+ 235,255,19,
+ 239,255,15,
+ 243,255,11,
+ 247,255,7,
+ 251,255,3,
+ 255,255,0,
+ 255,251,0,
+ 255,247,0,
+ 255,243,0,
+ 255,239,0,
+ 255,235,0,
+ 255,231,0,
+ 255,227,0,
+ 255,223,0,
+ 255,219,0,
+ 255,215,0,
+ 255,211,0,
+ 255,207,0,
+ 255,203,0,
+ 255,199,0,
+ 255,195,0,
+ 255,191,0,
+ 255,187,0,
+ 255,183,0,
+ 255,179,0,
+ 255,175,0,
+ 255,171,0,
+ 255,167,0,
+ 255,163,0,
+ 255,159,0,
+ 255,155,0,
+ 255,151,0,
+ 255,147,0,
+ 255,143,0,
+ 255,139,0,
+ 255,135,0,
+ 255,131,0,
+ 255,127,0,
+ 255,123,0,
+ 255,119,0,
+ 255,115,0,
+ 255,111,0,
+ 255,107,0,
+ 255,103,0,
+ 255,99,0,
+ 255,95,0,
+ 255,91,0,
+ 255,87,0,
+ 255,83,0,
+ 255,79,0,
+ 255,75,0,
+ 255,71,0,
+ 255,67,0,
+ 255,63,0,
+ 255,59,0,
+ 255,55,0,
+ 255,51,0,
+ 255,47,0,
+ 255,43,0,
+ 255,39,0,
+ 255,35,0,
+ 255,31,0,
+ 255,27,0,
+ 255,23,0,
+ 255,19,0,
+ 255,15,0,
+ 255,11,0,
+ 255,7,0,
+ 255,3,0,
+ 255,0,0,
+ 250,0,0,
+ 246,0,0,
+ 241,0,0,
+ 237,0,0,
+ 233,0,0,
+ 228,0,0,
+ 224,0,0,
+ 219,0,0,
+ 215,0,0,
+ 211,0,0,
+ 206,0,0,
+ 202,0,0,
+ 197,0,0,
+ 193,0,0,
+ 189,0,0,
+ 184,0,0,
+ 180,0,0,
+ 175,0,0,
+ 171,0,0,
+ 167,0,0,
+ 162,0,0,
+ 158,0,0,
+ 153,0,0,
+ 149,0,0,
+ 145,0,0,
+ 140,0,0,
+ 136,0,0,
+ 131,0,0,
+ 127,0,0
};
-
-
-
-
-
-
-
+/* clang-format on */
diff --git a/hl/examples/ptExampleFL.c b/hl/examples/ptExampleFL.c
index ba7a3a0..88ba8e5 100644
--- a/hl/examples/ptExampleFL.c
+++ b/hl/examples/ptExampleFL.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,82 +23,80 @@
*-------------------------------------------------------------------------
*/
-int main(void)
+int
+main(void)
{
- hid_t fid; /* File identifier */
- hid_t ptable; /* Packet table identifier */
+ hid_t fid; /* File identifier */
+ hid_t ptable; /* Packet table identifier */
- herr_t err; /* Function return status */
- hsize_t count; /* Number of records in the table */
+ herr_t err; /* Function return status */
+ hsize_t count; /* Number of records in the table */
- int x; /* Loop variable */
+ int x; /* Loop variable */
/* Buffers to hold data */
- int writeBuffer[5];
- int readBuffer[5];
+ int writeBuffer[5];
+ int readBuffer[5];
- /* Initialize buffers */
- for(x=0; x<5; x++)
- {
- writeBuffer[x]=x;
- readBuffer[x] = -1;
- }
+ /* Initialize buffers */
+ for (x = 0; x < 5; x++) {
+ writeBuffer[x] = x;
+ readBuffer[x] = -1;
+ }
/* Create a file using default properties */
- fid=H5Fcreate("packet_table_FLexample.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
+ fid = H5Fcreate("packet_table_FLexample.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create a fixed-length packet table within the file */
/* This table's "packets" will be simple integers and it will use compression
* level 5. */
- ptable = H5PTcreate_fl(fid, "Packet Test Dataset", H5T_NATIVE_INT, (hsize_t)100, 5);
- if(ptable == H5I_INVALID_HID)
- goto out;
+ ptable = H5PTcreate_fl(fid, "Packet Test Dataset", H5T_NATIVE_INT, (hsize_t)100, 5);
+ if (ptable == H5I_INVALID_HID)
+ goto out;
/* Write one packet to the packet table */
- err = H5PTappend(ptable, (hsize_t)1, &(writeBuffer[0]) );
- if(err < 0)
- goto out;
+ err = H5PTappend(ptable, (hsize_t)1, &(writeBuffer[0]));
+ if (err < 0)
+ goto out;
/* Write several packets to the packet table */
- err = H5PTappend(ptable, (hsize_t)4, &(writeBuffer[1]) );
- if(err < 0)
- goto out;
+ err = H5PTappend(ptable, (hsize_t)4, &(writeBuffer[1]));
+ if (err < 0)
+ goto out;
/* Get the number of packets in the packet table. This should be five. */
- err = H5PTget_num_packets(ptable, &count);
- if(err < 0)
- goto out;
+ err = H5PTget_num_packets(ptable, &count);
+ if (err < 0)
+ goto out;
- printf("Number of packets in packet table after five appends: %d\n", (int)count);
+ printf("Number of packets in packet table after five appends: %d\n", (int)count);
/* Initialize packet table's "current record" */
- err = H5PTcreate_index(ptable);
- if(err < 0)
- goto out;
+ err = H5PTcreate_index(ptable);
+ if (err < 0)
+ goto out;
/* Iterate through packets, read each one back */
- for(x=0; x<5; x++)
- {
- err = H5PTget_next(ptable, (hsize_t)1, &(readBuffer[x]) );
- if(err < 0)
- goto out;
+ for (x = 0; x < 5; x++) {
+ err = H5PTget_next(ptable, (hsize_t)1, &(readBuffer[x]));
+ if (err < 0)
+ goto out;
- printf("Packet %d's value is %d\n", x, readBuffer[x]);
- }
+ printf("Packet %d's value is %d\n", x, readBuffer[x]);
+ }
/* Close the packet table */
- err = H5PTclose(ptable);
- if(err < 0)
- goto out;
+ err = H5PTclose(ptable);
+ if (err < 0)
+ goto out;
/* Close the file */
- H5Fclose(fid);
+ H5Fclose(fid);
- return 0;
+ return 0;
- out: /* An error has occurred. Clean up and exit. */
+out: /* An error has occurred. Clean up and exit. */
H5PTclose(ptable);
H5Fclose(fid);
return -1;
}
-
diff --git a/hl/examples/run-hl-ex.sh b/hl/examples/run-hl-ex.sh
index 6f736cc..c31e0d4 100755
--- a/hl/examples/run-hl-ex.sh
+++ b/hl/examples/run-hl-ex.sh
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in
index 11560ff..18b86fa 100644
--- a/hl/examples/run-hlc-ex.sh.in
+++ b/hl/examples/run-hlc-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the c examples from source files installed #
-# in .../share/hdf5_examples/hl/c using h5cc or h5pc. The order for running #
+# in @examplesdir@/hl/c using h5cc or h5pc. The order for running #
# programs with RunTest in the MAIN section below is taken from the Makefile. #
# The order is important since some of the test programs use data files created #
# by earlier test programs. Any future additions should be placed accordingly. #
@@ -29,9 +29,32 @@
EXIT_SUCCESS=0
EXIT_FAILURE=1
+#
+# Try to derive the path to the installation $prefix established
+# by ./configure relative to the examples directory established by
+# ./configure. If successful, set `prefix_relto_examplesdir` to the
+# relative path. Otherwise, set `prefix_relto_examplesdir` to the
+# absolute installation $prefix.
+#
+# This script uses the value of `prefix` in the user's environment, if
+# it is set, below. The content of $() is evaluated in a sub-shell, so
+# if `prefix` is set in the user's environment, the shell statements in
+# $() won't clobbered it.
+#
+prefix_relto_examplesdir=$(
+prefix=@prefix@
+examplesdir=@examplesdir@
+if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
+else
+ echo $prefix
+fi
+)
+
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../../}"
+prefix="${prefix:-../../${prefix_relto_examplesdir}}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index 7955de2..70da026 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_F90 C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_F90 C Fortran)
#-----------------------------------------------------------------------------
# List Source files
diff --git a/hl/fortran/COPYING b/hl/fortran/COPYING
index 6497ace..97969da 100644
--- a/hl/fortran/COPYING
+++ b/hl/fortran/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am
index ad18a21..effed55 100644
--- a/hl/fortran/Makefile.am
+++ b/hl/fortran/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -23,7 +23,13 @@
include $(top_srcdir)/config/commence.am
-SUBDIRS=src test
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+
+SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 9afdbdc..0430998 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -410,9 +410,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -427,6 +427,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -445,6 +446,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -472,6 +474,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -479,9 +483,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -497,6 +504,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -530,8 +539,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -545,6 +556,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -586,6 +598,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -669,14 +682,16 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-SUBDIRS = src test
+@BUILD_TESTS_CONDITIONAL_FALSE@TESTSERIAL_DIR =
+@BUILD_TESTS_CONDITIONAL_TRUE@TESTSERIAL_DIR = test
+SUBDIRS = src $(TESTSERIAL_DIR)
DIST_SUBDIRS = src test examples
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1183,6 +1198,7 @@ check-clean ::
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1218,7 +1234,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1379,7 +1395,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 411ceea..75791d3 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -1,13 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (
- ${HDF5_F90_BINARY_DIR}
- ${HDF5_F90_SRC_DIR}/src
-)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_F90_EXAMPLES C Fortran)
set (examples
exlite
@@ -16,20 +8,34 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ")
- target_link_libraries (hl_f90_ex_${example}
- ${HDF5_HL_F90_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
+ target_compile_options(hl_f90_ex_${example}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
- target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
-
+# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET hl_f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ target_include_directories (hl_f90_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_link_libraries (hl_f90_ex_${example} PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (hl_f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+ else ()
+ target_include_directories (hl_f90_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_link_libraries (hl_f90_ex_${example} PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (hl_f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ endif ()
endforeach ()
-if (BUILD_TESTING)
-
+if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
-
endif ()
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 254c8fe..2e73ad9 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,6 +16,33 @@
##############################################################################
##############################################################################
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_FORTRAN_f90_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ex_ds1.h5
+ exlite.h5
+)
+set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_f90_ex)
+
foreach (example ${examples})
- add_test (NAME HL_FORTRAN_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME HL_FORTRAN_f90_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_f90_ex_${example}>)
+ else ()
+ add_test (NAME HL_FORTRAN_f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:hl_f90_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=hl_f90_ex_${example}.txt"
+ #-D "TEST_REFERENCE=hl_f90_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (HL_FORTRAN_f90_ex_${example} PROPERTIES
+ FIXTURES_REQUIRED clear_HL_FORTRAN_f90_ex
+ )
endforeach ()
diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am
index 71c2866..d4981c1 100644
--- a/hl/fortran/examples/Makefile.am
+++ b/hl/fortran/examples/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -51,8 +51,8 @@ endif
# Tell automake how to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/fortran
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR=$(examplesdir)/hl/fortran
+EXAMPLETOPDIR=$(examplesdir)/hl
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index 0ccde89..9140339 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -354,9 +354,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -371,6 +371,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -389,6 +390,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -416,6 +418,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -423,9 +427,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -441,6 +448,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -462,6 +470,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -474,8 +483,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -489,6 +500,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -530,6 +542,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -635,8 +648,8 @@ FORTRAN_API = yes
# Tell automake how to install examples
# Note: no '/' after DESTDIR. Explanation in commence.am
-EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/fortran
-EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
+EXAMPLEDIR = $(examplesdir)/hl/fortran
+EXAMPLETOPDIR = $(examplesdir)/hl
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -646,11 +659,11 @@ EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
MOSTLYCLEANFILES = *.raw *.meta *.o
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1101,6 +1114,7 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1136,7 +1150,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1297,7 +1311,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90
index 14e2b0c..840c432 100644
--- a/hl/fortran/examples/ex_ds1.f90
+++ b/hl/fortran/examples/ex_ds1.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! * Copyright by The HDF Group. *
-! * Copyright by the Board of Trustees of the University of Illinois. *
-! * All rights reserved. *
-! * *
-! * This file is part of HDF5. The full HDF5 copyright notice, including *
-! * terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROGRAM example_ds
USE HDF5
diff --git a/hl/fortran/examples/exlite.f90 b/hl/fortran/examples/exlite.f90
index 90a33fd..d4f69bd 100644
--- a/hl/fortran/examples/exlite.f90
+++ b/hl/fortran/examples/exlite.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! This file contains a FORTRAN90 example for the H5LT API
diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in
index 8e8663d..7a21563 100644
--- a/hl/fortran/examples/run-hlfortran-ex.sh.in
+++ b/hl/fortran/examples/run-hlfortran-ex.sh.in
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -18,7 +18,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the fortran examples from source files #
-# installed in .../share/hdf5_examples/hl/fortran using h5fc or h5pfc. The #
+# installed in @examplesdir@/hl/fortran using h5fc or h5pfc. The #
# order for running programs with RunTest in the MAIN section below is taken #
# from the Makefile. The order is important since some of the test programs #
# use data files created by earlier test programs. Any future additions should #
@@ -32,7 +32,7 @@ EXIT_FAILURE=1
# Where the tool is installed.
# default is relative path to installed location of the tools
-prefix="${prefix:-../../../../}"
+prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index bdc43d3..929d867 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -1,70 +1,77 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_F90_SRC C Fortran)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")
+ file (MAKE_DIRECTORY "${HDF5_HL_F90_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (
- ${HDF5_HL_SRC_DIR}/src
- ${HDF5_F90_SRC_DIR}/src
- ${HDF5_HL_F90_SRC_SOURCE_DIR}
- ${HDF5_F90_BINARY_DIR}
- ${CMAKE_Fortran_MODULE_DIRECTORY}
- ${MOD_BUILD_DIR}
-)
+if (NOT ONLY_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_HL_F90_BINARY_DIR}/static")
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
+endif ()
#-----------------------------------------------------------------------------
# hl_f90CStub lib
#-----------------------------------------------------------------------------
-set (HDF5_HL_F90_C_SRCS
+set (HDF5_HL_F90_C_SOURCES
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBfc.c
)
-set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
-
-set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
-
-add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
-target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
-TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl/fortran
- LINKER_LANGUAGE C
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
+set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C)
+
+set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.h)
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
+ target_include_directories (${HDF5_HL_F90_C_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_F90_C_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE C
+ )
+ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
- target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
- TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
+ add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
+ target_include_directories (${HDF5_HL_F90_C_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
+ TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED "HL_F")
set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE C
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_F90_C_SRC_FORMAT ${HDF5_HL_F90_C_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_F90_C_SRC_FORMAT ${HDF5_HL_F90_C_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
set (HDF5_HL_F90_F_SRCS
@@ -75,46 +82,63 @@ set (HDF5_HL_F90_F_SRCS
)
set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran)
-add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS})
-TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl/fortran
- LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
-)
-if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS})
+ target_include_directories (${HDF5_HL_F90_LIB_TARGET}
+ PRIVATE "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
+ )
+ target_compile_options(${HDF5_HL_F90_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_HL_F90_LIB_TARGET}
+ PUBLIC $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
+ PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0)
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
+ set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
endif ()
-set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
-
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS})
- set (SHARED_LINK_FLAGS " ")
- if (WIN32 AND MSVC)
- set (SHARED_LINK_FLAGS "/DLL")
- endif ()
- TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}")
- H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F")
+ target_include_directories (${HDF5_HL_F90_LIBSH_TARGET}
+ PRIVATE "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
+ )
+ target_compile_options(${HDF5_HL_F90_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
+ target_compile_definitions(${HDF5_HL_F90_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET}
+ PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}
+ PRIVATE ${LINK_Fortran_LIBS}
+ )
+# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">)
+# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def">)
+ if(MSVC)
+ set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL")
+ endif()
set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS"
- )
- endif ()
+ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F")
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}")
set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET})
endif ()
@@ -123,22 +147,32 @@ endif ()
#-----------------------------------------------------------------------------
-set (mod_files
- ${MOD_BUILD_DIR}/h5ds.mod
- ${MOD_BUILD_DIR}/h5tb.mod
- ${MOD_BUILD_DIR}/h5lt.mod
- ${MOD_BUILD_DIR}/h5im.mod
-)
-
-install (
- FILES
- ${mod_files}
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/static
- COMPONENT
- fortheaders
-)
-
+if (NOT ONLY_SHARED_LIBS)
+ set (mod_files
+ ${MOD_BUILD_DIR}/h5ds.mod
+ ${MOD_BUILD_DIR}/h5tb.mod
+ ${MOD_BUILD_DIR}/h5lt.mod
+ ${MOD_BUILD_DIR}/h5im.mod
+ )
+ install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}/static
+ COMPONENT
+ fortheaders
+ )
+ if (HDF5_INSTALL_MOD_FORTRAN MATCHES "STATIC")
+ install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+ endif ()
+endif ()
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (modsh_files
${MODSH_BUILD_DIR}/h5ds.mod
@@ -154,6 +188,16 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
COMPONENT
fortheaders
)
+ if (HDF5_INSTALL_MOD_FORTRAN MATCHES "SHARED")
+ install (
+ FILES
+ ${modsh_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+ )
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -164,8 +208,10 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
+ endif ()
install (
TARGETS
@@ -179,3 +225,51 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_HL_F90_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}")
+endif ()
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT hlfortlibraries
+)
+
+if (NOT WIN32 AND NOT MINGW)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT hlfortlibraries
+ )
+endif ()
diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c
index d6ec31d..fa94511 100644
--- a/hl/fortran/src/H5DSfc.c
+++ b/hl/fortran/src/H5DSfc.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This files contains C stubs for H5D Fortran APIs */
@@ -18,354 +18,352 @@
#include "H5Eprivate.h"
/*-------------------------------------------------------------------------
-* Function: h5dsset_scale_c
-*
-* Purpose: Calls H5DSset_scale
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 17, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5dsset_scale_c
+ *
+ * Purpose: Calls H5DSset_scale
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 17, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)
+nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)
{
- char *c_dimname = NULL;
- int_f ret_value = 0;
-
- /*
- * convert FORTRAN name to C name
- */
-
- if(*dimnamelen != 0)
- if(NULL == (c_dimname = (char *)HD5f2cstring(dimname, (size_t)*dimnamelen)))
- HGOTO_DONE(FAIL)
-
- /*
- * call H5DSset_scale function.
- */
-
- if(H5DSset_scale( (hid_t)*dsid, c_dimname) < 0)
- HGOTO_DONE(FAIL)
-
- done:
- if(c_dimname)
- HDfree(c_dimname);
-
- return ret_value;
+ char *c_dimname = NULL;
+ int_f ret_value = 0;
-} /* end nh5dsset_scale_c() */
+ /*
+ * convert FORTRAN name to C name
+ */
+
+ if (*dimnamelen != 0)
+ if (NULL == (c_dimname = (char *)HD5f2cstring(dimname, (size_t)*dimnamelen)))
+ HGOTO_DONE(FAIL)
+
+ /*
+ * call H5DSset_scale function.
+ */
+
+ if (H5DSset_scale((hid_t)*dsid, c_dimname) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ if (c_dimname)
+ HDfree(c_dimname);
+ return ret_value;
+
+} /* end nh5dsset_scale_c() */
/*-------------------------------------------------------------------------
-* Function: H5DSattach_scale_c
-*
-* Purpose: Calls H5DSattach_scale
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 17, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5DSattach_scale_c
+ *
+ * Purpose: Calls H5DSattach_scale
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 17, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx)
+nh5dsattach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx)
{
- int_f ret_value = 0;
-
- /*
- * call H5DSset_scale function.
- */
-
- if(H5DSattach_scale( (hid_t)*did, (hid_t)*dsid, (unsigned)*idx ) < 0)
- HGOTO_DONE(FAIL)
-
- done:
+ int_f ret_value = 0;
+
+ /*
+ * call H5DSset_scale function.
+ */
+
+ if (H5DSattach_scale((hid_t)*did, (hid_t)*dsid, (unsigned)*idx) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
return ret_value;
} /* end nh5dsattach_scale_c() */
-
/*-------------------------------------------------------------------------
-* Function: H5DSdetach_scale_c
-*
-* Purpose: Calls H5DSdetach_scale
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 17, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5DSdetach_scale_c
+ *
+ * Purpose: Calls H5DSdetach_scale
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 17, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx)
+nh5dsdetach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx)
{
- int_f ret_value = 0;
-
- /*
- * call H5DSset_scale function.
- */
-
- if(H5DSdetach_scale( (hid_t)*did, (hid_t)*dsid, (unsigned)*idx ) < 0)
- HGOTO_DONE(FAIL)
-
- done:
+ int_f ret_value = 0;
+
+ /*
+ * call H5DSset_scale function.
+ */
+
+ if (H5DSdetach_scale((hid_t)*did, (hid_t)*dsid, (unsigned)*idx) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
return ret_value;
} /* end nh5dsdetach_scale_c() */
-
/*-------------------------------------------------------------------------
-* Function: H5DSis_attached_c
-*
-* Purpose: Calls H5DSis_attached
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 17, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5DSis_attached_c
+ *
+ * Purpose: Calls H5DSis_attached
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 17, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached)
+nh5dsis_attached_c(hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached)
{
- int_f ret_value = 0;
- htri_t c_is_attached;
-
- /*
- * call H5DSis_attached function.
- */
+ int_f ret_value = 0;
+ htri_t c_is_attached;
+
+ /*
+ * call H5DSis_attached function.
+ */
+
+ if ((c_is_attached = H5DSis_attached((hid_t)*did, (hid_t)*dsid, (unsigned)*idx)) < 0)
+ HGOTO_DONE(FAIL)
- if((c_is_attached = H5DSis_attached( (hid_t)*did, (hid_t)*dsid, (unsigned)*idx )) < 0)
- HGOTO_DONE(FAIL)
+ *is_attached = (int_f)c_is_attached;
- *is_attached = (int_f)c_is_attached;
-
- done:
- return ret_value;
+done:
+ return ret_value;
} /* end nh5dsis_attached_c() */
/*-------------------------------------------------------------------------
-* Function: H5DSis_scale_c
-*
-* Purpose: Calls H5DSis_scale
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 18, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5DSis_scale_c
+ *
+ * Purpose: Calls H5DSis_scale
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 18, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsis_scale_c( hid_t_f *did, int_f *is_scale)
+nh5dsis_scale_c(hid_t_f *did, int_f *is_scale)
{
- int_f ret_value = 0;
- htri_t c_is_scale;
-
- /*
- * call H5DSis_scale function.
- */
-
- if((c_is_scale=H5DSis_scale( (hid_t)*did )) < 0)
- HGOTO_DONE(FAIL)
-
- *is_scale = (int_f)c_is_scale;
-
- done:
+ int_f ret_value = 0;
+ htri_t c_is_scale;
+
+ /*
+ * call H5DSis_scale function.
+ */
+
+ if ((c_is_scale = H5DSis_scale((hid_t)*did)) < 0)
+ HGOTO_DONE(FAIL)
+
+ *is_scale = (int_f)c_is_scale;
+
+done:
return ret_value;
} /* end nh5dsis_scale_c() */
-
/*-------------------------------------------------------------------------
-* Function: h5dsset_label_c
-*
-* Purpose: Calls H5DSset_label
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 18, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5dsset_label_c
+ *
+ * Purpose: Calls H5DSset_label
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 18, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)
+nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)
{
- char *c_label = NULL;
- int_f ret_value = 0;
-
- /*
- * convert FORTRAN name to C name
- */
-
- if(NULL == (c_label = (char *)HD5f2cstring(label, (size_t)*labellen)))
- HGOTO_DONE(FAIL)
+ char *c_label = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * convert FORTRAN name to C name
+ */
- /*
- * call H5DSset_label function.
- */
+ if (NULL == (c_label = (char *)HD5f2cstring(label, (size_t)*labellen)))
+ HGOTO_DONE(FAIL)
- if(H5DSset_label( (hid_t)*did, (unsigned)*idx, c_label) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * call H5DSset_label function.
+ */
- done:
- if(c_label)
- HDfree(c_label);
+ if (H5DSset_label((hid_t)*did, (unsigned)*idx, c_label) < 0)
+ HGOTO_DONE(FAIL)
- return ret_value;
+done:
+ if (c_label)
+ HDfree(c_label);
+
+ return ret_value;
} /* end nh5dsset_label_c() */
/*-------------------------------------------------------------------------
-* Function: h5dsget_label_c
-*
-* Purpose: Calls H5DSget_label
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 18, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5dsget_label_c
+ *
+ * Purpose: Calls H5DSget_label
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 18, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
+nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
{
- char *c_label = NULL;
- ssize_t size_c = -1;
- int_f ret_value = 0;
-
- /*
- * Allocate buffer to hold label
- */
- if ((c_label = (char *)HDmalloc((size_t)*size + 1)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * call H5DSget_label function.
- */
-
- if( (size_c = H5DSget_label( (hid_t)*did, (unsigned)*idx, c_label, (size_t)*size+1)) < 0)
- HGOTO_DONE(FAIL)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
-
- HD5packFstring(c_label, _fcdtocp(label), (size_t)*size);
+ char * c_label = NULL;
+ ssize_t size_c = -1;
+ int_f ret_value = 0;
+
+ /*
+ * Allocate buffer to hold label
+ */
+ if ((c_label = (char *)HDmalloc((size_t)*size + 1)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * call H5DSget_label function.
+ */
+
+ if ((size_c = H5DSget_label((hid_t)*did, (unsigned)*idx, c_label, (size_t)*size + 1)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+
+ HD5packFstring(c_label, _fcdtocp(label), (size_t)*size);
done:
- *size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the
- * trailing NULL in the length calculation, Ref. HDFFV-7596 */
- if(c_label) HDfree(c_label);
- return ret_value;
+ *size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the
+ * trailing NULL in the length calculation, Ref. HDFFV-7596 */
+ if (c_label)
+ HDfree(c_label);
+ return ret_value;
} /* end nh5dsget_label_c() */
/*-------------------------------------------------------------------------
-* Function: h5dsget_scale_name_c
-*
-* Purpose: Calls H5DSget_scale_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 18, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5dsget_scale_name_c
+ *
+ * Purpose: Calls H5DSget_scale_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 18, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
+nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
{
- char *c_scale_name = NULL;
- ssize_t size_c = -1;
- int_f ret_value = 0;
-
- /*
- * Allocate buffer to hold name
- */
- if ((c_scale_name = (char *)HDmalloc((size_t)*size + 1)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * call H5DSget_scale_name function.
- */
-
- if( (size_c = H5DSget_scale_name( (hid_t)*did, c_scale_name, (size_t)*size+1)) < 0)
- HGOTO_DONE(FAIL)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size);
- *size = (size_t_f)size_c;
+ char * c_scale_name = NULL;
+ ssize_t size_c = -1;
+ int_f ret_value = 0;
+
+ /*
+ * Allocate buffer to hold name
+ */
+ if ((c_scale_name = (char *)HDmalloc((size_t)*size + 1)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * call H5DSget_scale_name function.
+ */
+
+ if ((size_c = H5DSget_scale_name((hid_t)*did, c_scale_name, (size_t)*size + 1)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size);
+ *size = (size_t_f)size_c;
done:
- if(c_scale_name) HDfree(c_scale_name);
- return ret_value;
+ if (c_scale_name)
+ HDfree(c_scale_name);
+ return ret_value;
} /* end nh5dsget_scale_name_c() */
/*-------------------------------------------------------------------------
-* Function: H5DSget_num_scales_c
-*
-* Purpose: Calls H5DSget_num_scales
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: April 18, 2011
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5DSget_num_scales_c
+ *
+ * Purpose: Calls H5DSget_num_scales
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: April 18, 2011
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales)
+nh5dsget_num_scales_c(hid_t_f *did, int_f *idx, int_f *num_scales)
{
- int_f ret_value = 0;
-
- /*
- * call H5DSset_scale function.
- */
-
- if( (*num_scales = (int_f)H5DSget_num_scales( (hid_t)*did, (unsigned)*idx)) < 0)
- HGOTO_DONE(FAIL)
-
- done:
+ int_f ret_value = 0;
+
+ /*
+ * call H5DSset_scale function.
+ */
+
+ if ((*num_scales = (int_f)H5DSget_num_scales((hid_t)*did, (unsigned)*idx)) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
return ret_value;
} /* end nh5dsget_num_scales_c() */
diff --git a/hl/fortran/src/H5DSff.f90 b/hl/fortran/src/H5DSff.f90
index f6b6c42..64c5086 100644
--- a/hl/fortran/src/H5DSff.f90
+++ b/hl/fortran/src/H5DSff.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains FORTRAN90 interfaces for H5DS functions
diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c
index 639c27e..593a2da 100644
--- a/hl/fortran/src/H5IMcc.c
+++ b/hl/fortran/src/H5IMcc.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,16 +16,11 @@
#include <string.h>
#include <stdlib.h>
-
/*-------------------------------------------------------------------------
* private functions
*-------------------------------------------------------------------------
*/
-herr_t H5IM_get_palette(hid_t loc_id,
- const char *image_name,
- int pal_number,
- hid_t tid,
- void *pal_data);
+herr_t H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid, void *pal_data);
/*-------------------------------------------------------------------------
* Function: H5IMmake_image_8bitf
@@ -48,77 +43,76 @@ herr_t H5IM_get_palette(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-herr_t H5IMmake_image_8bitf(hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- int_f *buf)
+herr_t
+H5IMmake_image_8bitf(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, int_f *buf)
{
- hid_t did; /* dataset ID */
- hid_t sid; /* space ID */
- hsize_t dims[IMAGE8_RANK]; /* dimensions */
+ hid_t did; /* dataset ID */
+ hid_t sid; /* space ID */
+ hsize_t dims[IMAGE8_RANK]; /* dimensions */
- /* initialize the image dimensions */
- dims[0] = height;
- dims[1] = width;
+ /* initialize the image dimensions */
+ dims[0] = height;
+ dims[1] = width;
-/*-------------------------------------------------------------------------
- * create and write the dataset
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create and write the dataset
+ *-------------------------------------------------------------------------
+ */
- /* create the data space for the dataset. */
- if((sid = H5Screate_simple(IMAGE8_RANK, dims, NULL)) < 0)
- return -1;
-
- /* create the dataset as H5T_NATIVE_UCHAR */
- if((did = H5Dcreate2(loc_id, dset_name, H5T_NATIVE_UINT8, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
-
- /* write with memory type H5T_NATIVE_INT */
- /* Use long type if Fortran integer is 8 bytes and C long long is also 8 bytes*/
- /* Fail if otherwise */
- if(buf) {
- if(sizeof(int_f) == sizeof(int)) {
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long)) {
- if(H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long long)) {
- if(H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else
- return -1;
- }
-
- /* close */
- if(H5Dclose(did) < 0)
- return -1;
- if(H5Sclose(sid) < 0)
- return -1;
+ /* create the data space for the dataset. */
+ if ((sid = H5Screate_simple(IMAGE8_RANK, dims, NULL)) < 0)
+ return -1;
-/*-------------------------------------------------------------------------
- * attach the specification attributes
- *-------------------------------------------------------------------------
- */
+ /* create the dataset as H5T_NATIVE_UCHAR */
+ if ((did = H5Dcreate2(loc_id, dset_name, H5T_NATIVE_UINT8, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
+ 0)
+ return -1;
- /* attach the CLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
- return -1;
+ /* write with memory type H5T_NATIVE_INT */
+ /* Use long type if Fortran integer is 8 bytes and C long long is also 8 bytes*/
+ /* Fail if otherwise */
+ if (buf) {
+ if (sizeof(int_f) == sizeof(int)) {
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else
+ return -1;
+ }
- /* attach the VERSION attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
- return -1;
+ /* close */
+ if (H5Dclose(did) < 0)
+ return -1;
+ if (H5Sclose(sid) < 0)
+ return -1;
- /* attach the IMAGE_SUBCLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_INDEXED") < 0)
- return -1;
+ /*-------------------------------------------------------------------------
+ * attach the specification attributes
+ *-------------------------------------------------------------------------
+ */
- return 0;
-}
+ /* attach the CLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
+ return -1;
+ /* attach the VERSION attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
+ return -1;
+
+ /* attach the IMAGE_SUBCLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_INDEXED") < 0)
+ return -1;
+ return 0;
+}
/*-------------------------------------------------------------------------
* Function: H5IMmake_image_24bitf
@@ -146,96 +140,94 @@ herr_t H5IMmake_image_8bitf(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-herr_t H5IMmake_image_24bitf(hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const char *interlace,
- int_f *buf)
+herr_t
+H5IMmake_image_24bitf(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const char *interlace, int_f *buf)
{
- hid_t did; /* dataset ID */
- hid_t sid; /* space ID */
- hsize_t dims[IMAGE24_RANK]; /* dimensions */
+ hid_t did; /* dataset ID */
+ hid_t sid; /* space ID */
+ hsize_t dims[IMAGE24_RANK]; /* dimensions */
+
+ /*-------------------------------------------------------------------------
+ * attach the image dimensions according to the interlace mode
+ *-------------------------------------------------------------------------
+ */
+ if (strcmp(interlace, "INTERLACE_PIXEL") == 0) {
+ /* Number of color planes is defined as the third dimension */
+ dims[0] = height;
+ dims[1] = width;
+ dims[2] = IMAGE24_RANK;
+ }
+ else if (strcmp(interlace, "INTERLACE_PLANE") == 0) {
+ /* Number of color planes is defined as the first dimension */
+ dims[0] = IMAGE24_RANK;
+ dims[1] = height;
+ dims[2] = width;
+ }
+ else
+ return -1;
-/*-------------------------------------------------------------------------
- * attach the image dimensions according to the interlace mode
- *-------------------------------------------------------------------------
- */
- if(strcmp(interlace, "INTERLACE_PIXEL") == 0) {
- /* Number of color planes is defined as the third dimension */
- dims[0] = height;
- dims[1] = width;
- dims[2] = IMAGE24_RANK;
- }
- else
- if(strcmp(interlace, "INTERLACE_PLANE") == 0) {
- /* Number of color planes is defined as the first dimension */
- dims[0] = IMAGE24_RANK;
- dims[1] = height;
- dims[2] = width;
- }
- else
- return -1;
+ /*-------------------------------------------------------------------------
+ * create and write the dataset
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * create and write the dataset
- *-------------------------------------------------------------------------
- */
+ /* create the data space for the dataset. */
+ if ((sid = H5Screate_simple(IMAGE24_RANK, dims, NULL)) < 0)
+ return -1;
- /* create the data space for the dataset. */
- if((sid = H5Screate_simple(IMAGE24_RANK, dims, NULL)) < 0)
- return -1;
-
- /* create the dataset as H5T_NATIVE_UCHAR */
- if((did = H5Dcreate2(loc_id, dset_name, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
-
- /* write with memory type H5T_NATIVE_INT */
- if(buf) {
- if(sizeof(int_f) == sizeof(int)) {
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long)) {
- if(H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long long)) {
- if(H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- return -1;
- } else
- return -1;
- }
-
- /* close */
- if(H5Dclose(did) < 0)
- return -1;
- if(H5Sclose(sid) < 0)
- return -1;
+ /* create the dataset as H5T_NATIVE_UCHAR */
+ if ((did = H5Dcreate2(loc_id, dset_name, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
+ 0)
+ return -1;
-/*-------------------------------------------------------------------------
- * attach the specification attributes
- *-------------------------------------------------------------------------
- */
+ /* write with memory type H5T_NATIVE_INT */
+ if (buf) {
+ if (sizeof(int_f) == sizeof(int)) {
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ return -1;
+ }
+ else
+ return -1;
+ }
- /* Attach the CLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
- return -1;
+ /* close */
+ if (H5Dclose(did) < 0)
+ return -1;
+ if (H5Sclose(sid) < 0)
+ return -1;
- /* Attach the VERSION attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
- return -1;
+ /*-------------------------------------------------------------------------
+ * attach the specification attributes
+ *-------------------------------------------------------------------------
+ */
- /* Attach the IMAGE_SUBCLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_TRUECOLOR") < 0)
- return -1;
+ /* Attach the CLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
+ return -1;
- /* Attach the INTERLACE_MODE attribute. This attributes is only for true color images */
- if(H5LTset_attribute_string(loc_id, dset_name, "INTERLACE_MODE", interlace) < 0)
- return -1;
+ /* Attach the VERSION attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
+ return -1;
- return 0;
+ /* Attach the IMAGE_SUBCLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_TRUECOLOR") < 0)
+ return -1;
-}
+ /* Attach the INTERLACE_MODE attribute. This attributes is only for true color images */
+ if (H5LTset_attribute_string(loc_id, dset_name, "INTERLACE_MODE", interlace) < 0)
+ return -1;
+ return 0;
+}
/*-------------------------------------------------------------------------
* Function: H5IMread_imagef
@@ -258,33 +250,32 @@ herr_t H5IMmake_image_24bitf(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-herr_t H5IMread_imagef(hid_t loc_id,
- const char *dset_name,
- int_f *buf)
+herr_t
+H5IMread_imagef(hid_t loc_id, const char *dset_name, int_f *buf)
{
- hid_t did;
- hid_t tid;
+ hid_t did;
+ hid_t tid;
/* open the dataset */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* determine appropriate datatype to use */
- if(sizeof(int_f) == sizeof(int))
+ if (sizeof(int_f) == sizeof(int))
tid = H5T_NATIVE_INT;
- else if(sizeof(int_f) == sizeof(long))
+ else if (sizeof(int_f) == sizeof(long))
tid = H5T_NATIVE_LONG;
- else if(sizeof(int_f) == sizeof(long long))
+ else if (sizeof(int_f) == sizeof(long long))
tid = H5T_NATIVE_LLONG;
else
goto out;
/* read to memory */
- if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
/* close */
- if(H5Dclose(did))
+ if (H5Dclose(did))
return -1;
return 0;
@@ -294,7 +285,6 @@ out:
return -1;
}
-
/*-------------------------------------------------------------------------
* Function: H5IMmake_palettef
*
@@ -318,75 +308,75 @@ out:
*-------------------------------------------------------------------------
*/
-herr_t H5IMmake_palettef(hid_t loc_id,
- const char *pal_name,
- const hsize_t *pal_dims,
- int_f *pal_data)
+herr_t
+H5IMmake_palettef(hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, int_f *pal_data)
{
- hid_t did; /* dataset ID */
- hid_t sid; /* space ID */
- int has_pal;
+ hid_t did; /* dataset ID */
+ hid_t sid; /* space ID */
+ int has_pal;
- /* Check if the dataset already exists */
- has_pal = H5LTfind_dataset(loc_id, pal_name);
+ /* Check if the dataset already exists */
+ has_pal = H5LTfind_dataset(loc_id, pal_name);
- /* It exists. Return */
- if(has_pal == 1)
- return 0;
+ /* It exists. Return */
+ if (has_pal == 1)
+ return 0;
-/*-------------------------------------------------------------------------
- * create and write the dataset
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create and write the dataset
+ *-------------------------------------------------------------------------
+ */
- /* create the data space for the dataset. */
- if((sid = H5Screate_simple(2, pal_dims, NULL)) < 0)
- return -1;
-
- /* create the dataset as H5T_NATIVE_UCHAR */
- if((did = H5Dcreate2(loc_id, pal_name, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- return -1;
-
- /* write with memory type H5T_NATIVE_INT */
- if(pal_data) {
- if(sizeof(int_f) == sizeof(int)) {
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long)) {
- if(H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
- return -1;
- } else if(sizeof(int_f) == sizeof(long long)) {
- if(H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
- return -1;
- } else
- return -1;
- }
-
- /* close */
- if(H5Dclose(did) < 0)
- return -1;
- if(H5Sclose(sid) < 0)
- return -1;
+ /* create the data space for the dataset. */
+ if ((sid = H5Screate_simple(2, pal_dims, NULL)) < 0)
+ return -1;
-/*-------------------------------------------------------------------------
- * attach the specification attributes
- *-------------------------------------------------------------------------
- */
+ /* create the dataset as H5T_NATIVE_UCHAR */
+ if ((did = H5Dcreate2(loc_id, pal_name, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
+ 0)
+ return -1;
- /* Attach the attribute "CLASS" to the >>palette<< dataset*/
- if(H5LTset_attribute_string(loc_id, pal_name, "CLASS", PALETTE_CLASS) < 0)
- return -1;
+ /* write with memory type H5T_NATIVE_INT */
+ if (pal_data) {
+ if (sizeof(int_f) == sizeof(int)) {
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
+ return -1;
+ }
+ else if (sizeof(int_f) == sizeof(long long)) {
+ if (H5Dwrite(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
+ return -1;
+ }
+ else
+ return -1;
+ }
- /* Attach the attribute "PAL_VERSION" to the >>palette<< dataset*/
- if(H5LTset_attribute_string(loc_id, pal_name, "PAL_VERSION", "1.2") < 0)
- return -1;
+ /* close */
+ if (H5Dclose(did) < 0)
+ return -1;
+ if (H5Sclose(sid) < 0)
+ return -1;
- return 0;
+ /*-------------------------------------------------------------------------
+ * attach the specification attributes
+ *-------------------------------------------------------------------------
+ */
-}
+ /* Attach the attribute "CLASS" to the >>palette<< dataset*/
+ if (H5LTset_attribute_string(loc_id, pal_name, "CLASS", PALETTE_CLASS) < 0)
+ return -1;
+ /* Attach the attribute "PAL_VERSION" to the >>palette<< dataset*/
+ if (H5LTset_attribute_string(loc_id, pal_name, "PAL_VERSION", "1.2") < 0)
+ return -1;
+
+ return 0;
+}
/*-------------------------------------------------------------------------
* Function: H5IMget_palettef
@@ -411,20 +401,17 @@ herr_t H5IMmake_palettef(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-herr_t H5IMget_palettef(hid_t loc_id,
- const char *image_name,
- int pal_number,
- int_f *pal_data)
+herr_t
+H5IMget_palettef(hid_t loc_id, const char *image_name, int pal_number, int_f *pal_data)
{
- if(sizeof(int_f) == sizeof(int))
- return H5IM_get_palette(loc_id,image_name,pal_number,H5T_NATIVE_INT,pal_data);
- else if(sizeof(int_f) == sizeof(long))
- return H5IM_get_palette(loc_id,image_name,pal_number,H5T_NATIVE_LONG,pal_data);
- else if(sizeof(int_f) == sizeof(long long))
- return H5IM_get_palette(loc_id,image_name,pal_number,H5T_NATIVE_LLONG,pal_data);
- else
- return -1;
-
+ if (sizeof(int_f) == sizeof(int))
+ return H5IM_get_palette(loc_id, image_name, pal_number, H5T_NATIVE_INT, pal_data);
+ else if (sizeof(int_f) == sizeof(long))
+ return H5IM_get_palette(loc_id, image_name, pal_number, H5T_NATIVE_LONG, pal_data);
+ else if (sizeof(int_f) == sizeof(long long))
+ return H5IM_get_palette(loc_id, image_name, pal_number, H5T_NATIVE_LLONG, pal_data);
+ else
+ return -1;
}
/*-------------------------------------------------------------------------
@@ -452,96 +439,88 @@ herr_t H5IMget_palettef(hid_t loc_id,
*
*-------------------------------------------------------------------------
*/
-herr_t H5IM_get_palette(hid_t loc_id,
- const char *image_name,
- int pal_number,
- hid_t tid,
- void *pal_data)
+herr_t
+H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid, void *pal_data)
{
- hid_t image_id;
- int has_pal;
- hid_t attr_type;
- hid_t attr_id;
- hid_t attr_space_id;
- hid_t attr_class;
- hssize_t n_refs;
- size_t dim_ref;
- hobj_ref_t *refbuf; /* buffer to read references */
- hid_t pal_id;
-
- /* Open the dataset. */
- if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
- return -1;
-
- /* Try to find the attribute "PALETTE" on the >>image<< dataset */
- has_pal = H5IM_find_palette(image_id);
+ hid_t image_id;
+ int has_pal;
+ hid_t attr_type;
+ hid_t attr_id;
+ hid_t attr_space_id;
+ hid_t attr_class;
+ hssize_t n_refs;
+ size_t dim_ref;
+ hobj_ref_t *refbuf; /* buffer to read references */
+ hid_t pal_id;
+
+ /* Open the dataset. */
+ if ((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ return -1;
- if(has_pal == 1)
- {
+ /* Try to find the attribute "PALETTE" on the >>image<< dataset */
+ has_pal = H5IM_find_palette(image_id);
- if((attr_id = H5Aopen(image_id, "PALETTE", H5P_DEFAULT)) < 0)
- goto out;
+ if (has_pal == 1) {
- if((attr_type = H5Aget_type(attr_id)) < 0)
- goto out;
+ if ((attr_id = H5Aopen(image_id, "PALETTE", H5P_DEFAULT)) < 0)
+ goto out;
- if((attr_class = H5Tget_class(attr_type)) < 0)
- goto out;
+ if ((attr_type = H5Aget_type(attr_id)) < 0)
+ goto out;
- /* Check if it is really a reference */
- if(attr_class == H5T_REFERENCE)
- {
+ if ((attr_class = H5Tget_class(attr_type)) < 0)
+ goto out;
- /* Get the reference(s) */
- if((attr_space_id = H5Aget_space(attr_id)) < 0)
- goto out;
+ /* Check if it is really a reference */
+ if (attr_class == H5T_REFERENCE) {
- n_refs = H5Sget_simple_extent_npoints(attr_space_id);
+ /* Get the reference(s) */
+ if ((attr_space_id = H5Aget_space(attr_id)) < 0)
+ goto out;
- dim_ref = (size_t)n_refs;
+ n_refs = H5Sget_simple_extent_npoints(attr_space_id);
- refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * dim_ref);
+ dim_ref = (size_t)n_refs;
- if(H5Aread(attr_id, attr_type, refbuf) < 0)
- goto out;
+ refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * dim_ref);
- /* Get the palette id */
- if((pal_id = H5Rdereference(image_id, H5R_OBJECT, &refbuf[pal_number])) < 0)
- goto out;
+ if (H5Aread(attr_id, attr_type, refbuf) < 0)
+ goto out;
- /* Read the palette dataset using the memory type TID */
- if(H5Dread(pal_id, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
- goto out;
+ /* Get the palette id */
+ if ((pal_id = H5Rdereference(image_id, H5R_OBJECT, &refbuf[pal_number])) < 0)
+ goto out;
- if(H5Sclose(attr_space_id) < 0)
- goto out;
+ /* Read the palette dataset using the memory type TID */
+ if (H5Dread(pal_id, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
+ goto out;
- /* close the dereferenced dataset */
- if(H5Dclose(pal_id) < 0)
- goto out;
+ if (H5Sclose(attr_space_id) < 0)
+ goto out;
- free(refbuf);
+ /* close the dereferenced dataset */
+ if (H5Dclose(pal_id) < 0)
+ goto out;
- } /* H5T_REFERENCE */
+ free(refbuf);
- if(H5Tclose(attr_type) < 0)
- goto out;
+ } /* H5T_REFERENCE */
- /* Close the attribute. */
- if(H5Aclose(attr_id) < 0)
- goto out;
+ if (H5Tclose(attr_type) < 0)
+ goto out;
- }
+ /* Close the attribute. */
+ if (H5Aclose(attr_id) < 0)
+ goto out;
+ }
- /* Close the image dataset. */
- if(H5Dclose(image_id) < 0)
- return -1;
+ /* Close the image dataset. */
+ if (H5Dclose(image_id) < 0)
+ return -1;
- return 0;
+ return 0;
out:
- H5Dclose(image_id);
- return -1;
-
-
+ H5Dclose(image_id);
+ return -1;
}
diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h
index a65669d..0527a39 100644
--- a/hl/fortran/src/H5IMcc.h
+++ b/hl/fortran/src/H5IMcc.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,34 +22,16 @@
extern "C" {
#endif
+herr_t H5IMmake_image_8bitf(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, int_f *buf);
-herr_t H5IMmake_image_8bitf( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- int_f *buf );
+herr_t H5IMmake_image_24bitf(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const char *interlace, int_f *buf);
-herr_t H5IMmake_image_24bitf( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const char *interlace,
- int_f *buf);
+herr_t H5IMread_imagef(hid_t loc_id, const char *dset_name, int_f *buf);
-herr_t H5IMread_imagef( hid_t loc_id,
- const char *dset_name,
- int_f *buf );
-
-herr_t H5IMmake_palettef( hid_t loc_id,
- const char *pal_name,
- const hsize_t *pal_dims,
- int_f *pal_data );
-
-herr_t H5IMget_palettef( hid_t loc_id,
- const char *image_name,
- int pal_number,
- int_f *pal_data );
+herr_t H5IMmake_palettef(hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, int_f *pal_data);
+herr_t H5IMget_palettef(hid_t loc_id, const char *image_name, int pal_number, int_f *pal_data);
#ifdef __cplusplus
}
diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c
index 715fd36..931fa64 100644
--- a/hl/fortran/src/H5IMfc.c
+++ b/hl/fortran/src/H5IMfc.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This files contains C stubs for H5D Fortran APIs */
@@ -18,51 +18,47 @@
#include "H5Eprivate.h"
/*-------------------------------------------------------------------------
-* Function: h5immake_image_8bit_c
-*
-* Purpose: Call H5IMmake_image_8bit
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5immake_image_8bit_c
+ *
+ * Purpose: Call H5IMmake_image_8bit
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5immake_image_8bit_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *width,
- hsize_t_f *height,
- int_f *buf)
+nh5immake_image_8bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, hsize_t_f *height,
+ int_f *buf)
{
int ret_value = -1;
herr_t ret;
hid_t c_loc_id;
- char *c_name = NULL;
- hsize_t w = (hsize_t)*width;
- hsize_t h = (hsize_t)*height;
+ char * c_name = NULL;
+ hsize_t w = (hsize_t)*width;
+ hsize_t h = (hsize_t)*height;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5IMmake_image_8bitf function.
- */
+ * call H5IMmake_image_8bitf function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMmake_image_8bitf(c_loc_id,c_name,w,h,buf);
+ ret = H5IMmake_image_8bitf(c_loc_id, c_name, w, h, buf);
if (ret < 0)
goto done;
@@ -70,54 +66,49 @@ nh5immake_image_8bit_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
-
-
}
/*-------------------------------------------------------------------------
-* Function: h5imread_image_c
-*
-* Purpose: Call H5IMread_image
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imread_image_c
+ *
+ * Purpose: Call H5IMread_image
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imread_image_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *buf)
+nh5imread_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf)
{
- int ret_value = -1;
- herr_t ret;
- char *c_name = NULL;
+ int ret_value = -1;
+ herr_t ret;
+ char * c_name = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5IMread_image function.
- */
- ret = H5IMread_imagef((hid_t)*loc_id,c_name,buf);
+ * call H5IMread_image function.
+ */
+ ret = H5IMread_imagef((hid_t)*loc_id, c_name, buf);
if (ret < 0)
goto done;
@@ -125,52 +116,46 @@ nh5imread_image_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5immake_image_24bit_c
-*
-* Purpose: Call H5IMmake_image_24bit
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5immake_image_24bit_c
+ *
+ * Purpose: Call H5IMmake_image_24bit
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5immake_image_24bit_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd il,
- hsize_t_f *width,
- hsize_t_f *height,
- void *buf)
+nh5immake_image_24bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd il,
+ hsize_t_f *width, hsize_t_f *height, void *buf)
{
int ret_value = -1;
herr_t ret;
hid_t c_loc_id;
- char *c_name = NULL;
- char *c_il = NULL;
- hsize_t w = (hsize_t)*width;
- hsize_t h = (hsize_t)*height;
+ char * c_name = NULL;
+ char * c_il = NULL;
+ hsize_t w = (hsize_t)*width;
+ hsize_t h = (hsize_t)*height;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -180,11 +165,11 @@ nh5immake_image_24bit_c (hid_t_f *loc_id,
goto done;
/*
- * call H5IMmake_image_24bitf function.
- */
+ * call H5IMmake_image_24bitf function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMmake_image_24bitf(c_loc_id,c_name,w,h,c_il,(int_f *)buf);
+ ret = H5IMmake_image_24bitf(c_loc_id, c_name, w, h, c_il, (int_f *)buf);
if (ret < 0)
goto done;
@@ -192,238 +177,218 @@ nh5immake_image_24bit_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_il!=NULL)
+ if (c_il != NULL)
free(c_il);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5imget_image_info_c
-*
-* Purpose: Call H5IMget_image_info
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imget_image_info_c
+ *
+ * Purpose: Call H5IMget_image_info
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imget_image_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *width,
- hsize_t_f *height,
- hsize_t_f *planes,
- hsize_t_f *npals,
- size_t_f *ilen,
- _fcd interlace)
+nh5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, hsize_t_f *height,
+ hsize_t_f *planes, hsize_t_f *npals, size_t_f *ilen, _fcd interlace)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- hsize_t c_width;
- hsize_t c_height;
- hsize_t c_planes;
- hssize_t c_npals;
- char *c_buf=NULL; /* buffer to hold C string */
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ hsize_t c_width;
+ hsize_t c_height;
+ hsize_t c_planes;
+ hssize_t c_npals;
+ char * c_buf = NULL; /* buffer to hold C string */
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * allocate buffer to hold name of an attribute
- */
- if ((c_buf = (char *)HDmalloc((size_t)*ilen +1)) == NULL)
+ * allocate buffer to hold name of an attribute
+ */
+ if ((c_buf = (char *)HDmalloc((size_t)*ilen + 1)) == NULL)
goto done;
/*
- * call H5IMget_image_info function.
- */
+ * call H5IMget_image_info function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMget_image_info(c_loc_id,c_name,&c_width,&c_height,&c_planes,c_buf,&c_npals);
+ ret = H5IMget_image_info(c_loc_id, c_name, &c_width, &c_height, &c_planes, c_buf, &c_npals);
if (ret < 0)
goto done;
- *width = (hsize_t_f) c_width;
- *height = (hsize_t_f) c_height;
- *planes = (hsize_t_f) c_planes;
- *npals = (hsize_t_f) c_npals;
+ *width = (hsize_t_f)c_width;
+ *height = (hsize_t_f)c_height;
+ *planes = (hsize_t_f)c_planes;
+ *npals = (hsize_t_f)c_npals;
/*
- * convert C name to FORTRAN and place it in the given buffer
- */
+ * convert C name to FORTRAN and place it in the given buffer
+ */
HD5packFstring(c_buf, _fcdtocp(interlace), (size_t)*ilen);
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_buf!=NULL)
+ if (c_buf != NULL)
free(c_buf);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5imis_image_c
-*
-* Purpose: Call H5IMis_image
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imis_image_c
+ *
+ * Purpose: Call H5IMis_image
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imis_image_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name)
+nh5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
{
- hid_t c_loc_id;
- char *c_name = NULL;
- herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ herr_t ret;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return -1;
+ if (c_name == NULL)
+ return -1;
/*
- * call H5LTget_dataset_ndims function.
- */
+ * call H5LTget_dataset_ndims function.
+ */
c_loc_id = (hid_t)*loc_id;
ret = H5IMis_image(c_loc_id, c_name);
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret;
-
}
-
/*-------------------------------------------------------------------------
-* Function: h5immake_palette_c
-*
-* Purpose: Call H5IMmake_palette
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5immake_palette_c
+ *
+ * Purpose: Call H5IMmake_palette
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5immake_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *dims,
- void *buf)
+nh5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, void *buf)
{
- char *c_name = NULL;
+ char * c_name = NULL;
hsize_t c_dims[H5S_MAX_RANK];
int i;
- int rank=2;
+ int rank = 2;
int_f ret_value = 0;
/*
- * convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ * convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- for(i = 0; i < rank ; i++)
- c_dims[i] = (hsize_t)dims[i];
+ for (i = 0; i < rank; i++)
+ c_dims[i] = (hsize_t)dims[i];
/*
- * call H5IMmake_palette function.
- */
- if(H5IMmake_palettef((hid_t)*loc_id, c_name, c_dims, (int_f *)buf) < 0)
+ * call H5IMmake_palette function.
+ */
+ if (H5IMmake_palettef((hid_t)*loc_id, c_name, c_dims, (int_f *)buf) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5imlink_palette_c
-*
-* Purpose: Call H5IMlink_palette
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imlink_palette_c
+ *
+ * Purpose: Call H5IMlink_palette
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imlink_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd pal_name)
+nh5imlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd pal_name)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_namepal = NULL;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_namepal = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -433,11 +398,11 @@ nh5imlink_palette_c (hid_t_f *loc_id,
goto done;
/*
- * call H5IMlink_palette function.
- */
+ * call H5IMlink_palette function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMlink_palette(c_loc_id,c_name,c_namepal);
+ ret = H5IMlink_palette(c_loc_id, c_name, c_namepal);
if (ret < 0)
goto done;
@@ -445,50 +410,45 @@ nh5imlink_palette_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_namepal!=NULL)
+ if (c_namepal != NULL)
free(c_namepal);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5imunlink_palette_c
-*
-* Purpose: Call H5IMunlink_palette
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imunlink_palette_c
+ *
+ * Purpose: Call H5IMunlink_palette
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imunlink_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd pal_name)
+nh5imunlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd pal_name)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_namepal = NULL;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_namepal = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -498,11 +458,11 @@ nh5imunlink_palette_c (hid_t_f *loc_id,
goto done;
/*
- * call H5IMunlink_palette function.
- */
+ * call H5IMunlink_palette function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMunlink_palette(c_loc_id,c_name,c_namepal);
+ ret = H5IMunlink_palette(c_loc_id, c_name, c_namepal);
if (ret < 0)
goto done;
@@ -510,62 +470,57 @@ nh5imunlink_palette_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_namepal!=NULL)
+ if (c_namepal != NULL)
free(c_namepal);
return ret_value;
}
-
-
/*-------------------------------------------------------------------------
-* Function: h5imget_npalettes_c
-*
-* Purpose: Call H5IMget_npalettes
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imget_npalettes_c
+ *
+ * Purpose: Call H5IMget_npalettes
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imget_npalettes_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *npals)
+nh5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- hssize_t c_npals;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ hssize_t c_npals;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5IMget_image_info function.
- */
+ * call H5IMget_image_info function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMget_npalettes(c_loc_id,c_name,&c_npals);
+ ret = H5IMget_npalettes(c_loc_id, c_name, &c_npals);
- *npals = (hsize_t_f) c_npals;
+ *npals = (hsize_t_f)c_npals;
if (ret < 0)
goto done;
@@ -573,184 +528,166 @@ nh5imget_npalettes_c(hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
-
-
/*-------------------------------------------------------------------------
-* Function: h5imget_palette_info_c
-*
-* Purpose: Call H5IMget_palette_info
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: h5imget_palette_info_c
+ *
+ * Purpose: Call H5IMget_palette_info
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imget_palette_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *pal_number,
- hsize_t_f *dims)
+nh5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, hsize_t_f *dims)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- hsize_t c_dims[2];
- int i;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ hsize_t c_dims[2];
+ int i;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5IMget_image_info function.
- */
+ * call H5IMget_image_info function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMget_palette_info(c_loc_id,c_name,*pal_number,c_dims);
+ ret = H5IMget_palette_info(c_loc_id, c_name, *pal_number, c_dims);
if (ret < 0)
goto done;
- for (i = 0; i < 2 ; i++)
- {
- dims[i] = (hsize_t_f) c_dims[i];
+ for (i = 0; i < 2; i++) {
+ dims[i] = (hsize_t_f)c_dims[i];
}
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5imget_palette_c
-*
-* Purpose: Call H5IMget_palette
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: h5imget_palette_c
+ *
+ * Purpose: Call H5IMget_palette
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imget_palette_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *pal_number,
- void *buf)
+nh5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, void *buf)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
- goto done;
+ goto done;
/*
- * call H5IMget_image_info function.
- */
+ * call H5IMget_image_info function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5IMget_palettef(c_loc_id,c_name,*pal_number,(int_f *)buf);
+ ret = H5IMget_palettef(c_loc_id, c_name, *pal_number, (int_f *)buf);
if (ret < 0)
- goto done;
+ goto done;
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5imis_palette_c
-*
-* Purpose: Call H5IMis_palette
-*
-* Return: true, false, fail
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5imis_palette_c
+ *
+ * Purpose: Call H5IMis_palette
+ *
+ * Return: true, false, fail
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5imis_palette_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name)
+nh5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
{
- hid_t c_loc_id;
- char *c_name;
- herr_t ret;
+ hid_t c_loc_id;
+ char * c_name;
+ herr_t ret;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return -1;
+ if (c_name == NULL)
+ return -1;
/*
- * call H5IMis_palette function.
- */
+ * call H5IMis_palette function.
+ */
c_loc_id = (hid_t)*loc_id;
ret = H5IMis_palette(c_loc_id, c_name);
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret;
-
}
diff --git a/hl/fortran/src/H5IMff.f90 b/hl/fortran/src/H5IMff.f90
index 09939ae..0ecebe5 100644
--- a/hl/fortran/src/H5IMff.f90
+++ b/hl/fortran/src/H5IMff.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains FORTRAN90 interfaces for H5IM functions
diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h
index a48269b..229af14 100644
--- a/hl/fortran/src/H5LTf90proto.h
+++ b/hl/fortran/src/H5LTf90proto.h
@@ -1,16 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5LTf90proto_H
#define _H5LTf90proto_H
@@ -22,8 +21,8 @@
/* These definitions should match those in fortran/src/H5f90kit.c */
-H5_FCDLL char* HD5f2cstring (_fcd fdesc, size_t len);
-H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len);
+H5_FCDLL char *HD5f2cstring(_fcd fdesc, size_t len);
+H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
/*
* Functions from H5DSfc.c
@@ -36,101 +35,100 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len);
#define nh5dsis_scale_c H5_FC_FUNC_(h5dsis_scale_c, H5DSIS_SCALE_C)
#define nh5dsset_label_c H5_FC_FUNC_(h5dsset_label_c, H5DSSET_LABEL_C)
#define nh5dsget_label_c H5_FC_FUNC_(h5dsget_label_c, H5DSGET_LABEL_C)
-#define nh5dsget_scale_name_c H5_FC_FUNC_(h5dsget_scale_name_c,H5DSGET_SCALE_NAME_C)
-#define nh5dsget_num_scales_c H5_FC_FUNC_(h5dsget_num_scales_c,H5DSGET_NUM_SCALES_C)
-
+#define nh5dsget_scale_name_c H5_FC_FUNC_(h5dsget_scale_name_c, H5DSGET_SCALE_NAME_C)
+#define nh5dsget_num_scales_c H5_FC_FUNC_(h5dsget_num_scales_c, H5DSGET_NUM_SCALES_C)
/*
* Functions from H5LTfc.c
*/
-#define nh5ltmake_dataset_c H5_FC_FUNC_(h5ltmake_dataset_c, H5LTMAKE_DATASET_C)
-#define nh5ltmake_dataset_int1_c H5_FC_FUNC_(h5ltmake_dataset_int1_c, H5LTMAKE_DATASET_INT1_C)
-#define nh5ltmake_dataset_int2_c H5_FC_FUNC_(h5ltmake_dataset_int2_c, H5LTMAKE_DATASET_INT2_C)
-#define nh5ltmake_dataset_int3_c H5_FC_FUNC_(h5ltmake_dataset_int3_c, H5LTMAKE_DATASET_INT3_C)
-#define nh5ltmake_dataset_int4_c H5_FC_FUNC_(h5ltmake_dataset_int4_c, H5LTMAKE_DATASET_INT4_C)
-#define nh5ltmake_dataset_int5_c H5_FC_FUNC_(h5ltmake_dataset_int5_c, H5LTMAKE_DATASET_INT5_C)
-#define nh5ltmake_dataset_int6_c H5_FC_FUNC_(h5ltmake_dataset_int6_c, H5LTMAKE_DATASET_INT6_C)
-#define nh5ltmake_dataset_int7_c H5_FC_FUNC_(h5ltmake_dataset_int7_c, H5LTMAKE_DATASET_INT7_C)
-#define nh5ltmake_dataset_fl1_c H5_FC_FUNC_(h5ltmake_dataset_fl1_c, H5LTMAKE_DATASET_FL1_C)
-#define nh5ltmake_dataset_fl2_c H5_FC_FUNC_(h5ltmake_dataset_fl2_c, H5LTMAKE_DATASET_FL2_C)
-#define nh5ltmake_dataset_fl3_c H5_FC_FUNC_(h5ltmake_dataset_fl3_c, H5LTMAKE_DATASET_FL3_C)
-#define nh5ltmake_dataset_fl4_c H5_FC_FUNC_(h5ltmake_dataset_fl4_c, H5LTMAKE_DATASET_FL4_C)
-#define nh5ltmake_dataset_fl5_c H5_FC_FUNC_(h5ltmake_dataset_fl5_c, H5LTMAKE_DATASET_FL5_C)
-#define nh5ltmake_dataset_fl6_c H5_FC_FUNC_(h5ltmake_dataset_fl6_c, H5LTMAKE_DATASET_FL6_C)
-#define nh5ltmake_dataset_fl7_c H5_FC_FUNC_(h5ltmake_dataset_fl7_c, H5LTMAKE_DATASET_FL7_C)
-#define nh5ltmake_dataset_dl1_c H5_FC_FUNC_(h5ltmake_dataset_dl1_c, H5LTMAKE_DATASET_DL1_C)
-#define nh5ltmake_dataset_dl2_c H5_FC_FUNC_(h5ltmake_dataset_dl2_c, H5LTMAKE_DATASET_DL2_C)
-#define nh5ltmake_dataset_dl3_c H5_FC_FUNC_(h5ltmake_dataset_dl3_c, H5LTMAKE_DATASET_DL3_C)
-#define nh5ltmake_dataset_dl4_c H5_FC_FUNC_(h5ltmake_dataset_dl4_c, H5LTMAKE_DATASET_DL4_C)
-#define nh5ltmake_dataset_dl5_c H5_FC_FUNC_(h5ltmake_dataset_dl5_c, H5LTMAKE_DATASET_DL5_C)
-#define nh5ltmake_dataset_dl6_c H5_FC_FUNC_(h5ltmake_dataset_dl6_c, H5LTMAKE_DATASET_DL6_C)
-#define nh5ltmake_dataset_dl7_c H5_FC_FUNC_(h5ltmake_dataset_dl7_c, H5LTMAKE_DATASET_DL7_C)
-#define nh5ltmake_dataset_nint1_c H5_FC_FUNC_(h5ltmake_dataset_nint1_c, H5LTMAKE_DATASET_NINT1_C)
-#define nh5ltmake_dataset_nint2_c H5_FC_FUNC_(h5ltmake_dataset_nint2_c, H5LTMAKE_DATASET_NINT2_C)
-#define nh5ltmake_dataset_nint3_c H5_FC_FUNC_(h5ltmake_dataset_nint3_c, H5LTMAKE_DATASET_NINT3_C)
-#define nh5ltmake_dataset_nint4_c H5_FC_FUNC_(h5ltmake_dataset_nint4_c, H5LTMAKE_DATASET_NINT4_C)
-#define nh5ltmake_dataset_nint5_c H5_FC_FUNC_(h5ltmake_dataset_nint5_c, H5LTMAKE_DATASET_NINT5_C)
-#define nh5ltmake_dataset_nint6_c H5_FC_FUNC_(h5ltmake_dataset_nint6_c, H5LTMAKE_DATASET_NINT6_C)
-#define nh5ltmake_dataset_nint7_c H5_FC_FUNC_(h5ltmake_dataset_nint7_c, H5LTMAKE_DATASET_NINT7_C)
-#define nh5ltmake_dataset_nfl1_c H5_FC_FUNC_(h5ltmake_dataset_nfl1_c, H5LTMAKE_DATASET_NFL1_C)
-#define nh5ltmake_dataset_nfl2_c H5_FC_FUNC_(h5ltmake_dataset_nfl2_c, H5LTMAKE_DATASET_NFL2_C)
-#define nh5ltmake_dataset_nfl3_c H5_FC_FUNC_(h5ltmake_dataset_nfl3_c, H5LTMAKE_DATASET_NFL3_C)
-#define nh5ltmake_dataset_nfl4_c H5_FC_FUNC_(h5ltmake_dataset_nfl4_c, H5LTMAKE_DATASET_NFL4_C)
-#define nh5ltmake_dataset_nfl5_c H5_FC_FUNC_(h5ltmake_dataset_nfl5_c, H5LTMAKE_DATASET_NFL5_C)
-#define nh5ltmake_dataset_nfl6_c H5_FC_FUNC_(h5ltmake_dataset_nfl6_c, H5LTMAKE_DATASET_NFL6_C)
-#define nh5ltmake_dataset_nfl7_c H5_FC_FUNC_(h5ltmake_dataset_nfl7_c, H5LTMAKE_DATASET_NFL7_C)
-#define nh5ltmake_dataset_ndl1_c H5_FC_FUNC_(h5ltmake_dataset_ndl1_c, H5LTMAKE_DATASET_NDL1_C)
-#define nh5ltmake_dataset_ndl2_c H5_FC_FUNC_(h5ltmake_dataset_ndl2_c, H5LTMAKE_DATASET_NDL2_C)
-#define nh5ltmake_dataset_ndl3_c H5_FC_FUNC_(h5ltmake_dataset_ndl3_c, H5LTMAKE_DATASET_NDL3_C)
-#define nh5ltmake_dataset_ndl4_c H5_FC_FUNC_(h5ltmake_dataset_ndl4_c, H5LTMAKE_DATASET_NDL4_C)
-#define nh5ltmake_dataset_ndl5_c H5_FC_FUNC_(h5ltmake_dataset_ndl5_c, H5LTMAKE_DATASET_NDL5_C)
-#define nh5ltmake_dataset_ndl6_c H5_FC_FUNC_(h5ltmake_dataset_ndl6_c, H5LTMAKE_DATASET_NDL6_C)
-#define nh5ltmake_dataset_ndl7_c H5_FC_FUNC_(h5ltmake_dataset_ndl7_c, H5LTMAKE_DATASET_NDL7_C)
-#define nh5ltread_dataset_c H5_FC_FUNC_(h5ltread_dataset_c, H5LTREAD_DATASET_C)
-#define nh5ltread_dataset_int1_c H5_FC_FUNC_(h5ltread_dataset_int1_c, H5LTREAD_DATASET_INT1_C)
-#define nh5ltread_dataset_int2_c H5_FC_FUNC_(h5ltread_dataset_int2_c, H5LTREAD_DATASET_INT2_C)
-#define nh5ltread_dataset_int3_c H5_FC_FUNC_(h5ltread_dataset_int3_c, H5LTREAD_DATASET_INT3_C)
-#define nh5ltread_dataset_int4_c H5_FC_FUNC_(h5ltread_dataset_int4_c, H5LTREAD_DATASET_INT4_C)
-#define nh5ltread_dataset_int5_c H5_FC_FUNC_(h5ltread_dataset_int5_c, H5LTREAD_DATASET_INT5_C)
-#define nh5ltread_dataset_int6_c H5_FC_FUNC_(h5ltread_dataset_int6_c, H5LTREAD_DATASET_INT6_C)
-#define nh5ltread_dataset_int7_c H5_FC_FUNC_(h5ltread_dataset_int7_c, H5LTREAD_DATASET_INT7_C)
-#define nh5ltread_dataset_fl1_c H5_FC_FUNC_(h5ltread_dataset_fl1_c, H5LTREAD_DATASET_FL1_C)
-#define nh5ltread_dataset_fl2_c H5_FC_FUNC_(h5ltread_dataset_fl2_c, H5LTREAD_DATASET_FL2_C)
-#define nh5ltread_dataset_fl3_c H5_FC_FUNC_(h5ltread_dataset_fl3_c, H5LTREAD_DATASET_FL3_C)
-#define nh5ltread_dataset_fl4_c H5_FC_FUNC_(h5ltread_dataset_fl4_c, H5LTREAD_DATASET_FL4_C)
-#define nh5ltread_dataset_fl5_c H5_FC_FUNC_(h5ltread_dataset_fl5_c, H5LTREAD_DATASET_FL5_C)
-#define nh5ltread_dataset_fl6_c H5_FC_FUNC_(h5ltread_dataset_fl6_c, H5LTREAD_DATASET_FL6_C)
-#define nh5ltread_dataset_fl7_c H5_FC_FUNC_(h5ltread_dataset_fl7_c, H5LTREAD_DATASET_FL7_C)
-#define nh5ltread_dataset_dl1_c H5_FC_FUNC_(h5ltread_dataset_dl1_c, H5LTREAD_DATASET_DL1_C)
-#define nh5ltread_dataset_dl2_c H5_FC_FUNC_(h5ltread_dataset_dl2_c, H5LTREAD_DATASET_DL2_C)
-#define nh5ltread_dataset_dl3_c H5_FC_FUNC_(h5ltread_dataset_dl3_c, H5LTREAD_DATASET_DL3_C)
-#define nh5ltread_dataset_dl4_c H5_FC_FUNC_(h5ltread_dataset_dl4_c, H5LTREAD_DATASET_DL4_C)
-#define nh5ltread_dataset_dl5_c H5_FC_FUNC_(h5ltread_dataset_dl5_c, H5LTREAD_DATASET_DL5_C)
-#define nh5ltread_dataset_dl6_c H5_FC_FUNC_(h5ltread_dataset_dl6_c, H5LTREAD_DATASET_DL6_C)
-#define nh5ltread_dataset_dl7_c H5_FC_FUNC_(h5ltread_dataset_dl7_c, H5LTREAD_DATASET_DL7_C)
-#define nh5ltread_dataset_nint1_c H5_FC_FUNC_(h5ltread_dataset_nint1_c, H5LTREAD_DATASET_NINT1_C)
-#define nh5ltread_dataset_nint2_c H5_FC_FUNC_(h5ltread_dataset_nint2_c, H5LTREAD_DATASET_NINT2_C)
-#define nh5ltread_dataset_nint3_c H5_FC_FUNC_(h5ltread_dataset_nint3_c, H5LTREAD_DATASET_NINT3_C)
-#define nh5ltread_dataset_nint4_c H5_FC_FUNC_(h5ltread_dataset_nint4_c, H5LTREAD_DATASET_NINT4_C)
-#define nh5ltread_dataset_nint5_c H5_FC_FUNC_(h5ltread_dataset_nint5_c, H5LTREAD_DATASET_NINT5_C)
-#define nh5ltread_dataset_nint6_c H5_FC_FUNC_(h5ltread_dataset_nint6_c, H5LTREAD_DATASET_NINT6_C)
-#define nh5ltread_dataset_nint7_c H5_FC_FUNC_(h5ltread_dataset_nint7_c, H5LTREAD_DATASET_NINT7_C)
-#define nh5ltread_dataset_nfl1_c H5_FC_FUNC_(h5ltread_dataset_nfl1_c, H5LTREAD_DATASET_NFL1_C)
-#define nh5ltread_dataset_nfl2_c H5_FC_FUNC_(h5ltread_dataset_nfl2_c, H5LTREAD_DATASET_NFL2_C)
-#define nh5ltread_dataset_nfl3_c H5_FC_FUNC_(h5ltread_dataset_nfl3_c, H5LTREAD_DATASET_NFL3_C)
-#define nh5ltread_dataset_nfl4_c H5_FC_FUNC_(h5ltread_dataset_nfl4_c, H5LTREAD_DATASET_NFL4_C)
-#define nh5ltread_dataset_nfl5_c H5_FC_FUNC_(h5ltread_dataset_nfl5_c, H5LTREAD_DATASET_NFL5_C)
-#define nh5ltread_dataset_nfl6_c H5_FC_FUNC_(h5ltread_dataset_nfl6_c, H5LTREAD_DATASET_NFL6_C)
-#define nh5ltread_dataset_nfl7_c H5_FC_FUNC_(h5ltread_dataset_nfl7_c, H5LTREAD_DATASET_NFL7_C)
-#define nh5ltread_dataset_ndl1_c H5_FC_FUNC_(h5ltread_dataset_ndl1_c, H5LTREAD_DATASET_NDL1_C)
-#define nh5ltread_dataset_ndl2_c H5_FC_FUNC_(h5ltread_dataset_ndl2_c, H5LTREAD_DATASET_NDL2_C)
-#define nh5ltread_dataset_ndl3_c H5_FC_FUNC_(h5ltread_dataset_ndl3_c, H5LTREAD_DATASET_NDL3_C)
-#define nh5ltread_dataset_ndl4_c H5_FC_FUNC_(h5ltread_dataset_ndl4_c, H5LTREAD_DATASET_NDL4_C)
-#define nh5ltread_dataset_ndl5_c H5_FC_FUNC_(h5ltread_dataset_ndl5_c, H5LTREAD_DATASET_NDL5_C)
-#define nh5ltread_dataset_ndl6_c H5_FC_FUNC_(h5ltread_dataset_ndl6_c, H5LTREAD_DATASET_NDL6_C)
-#define nh5ltread_dataset_ndl7_c H5_FC_FUNC_(h5ltread_dataset_ndl7_c, H5LTREAD_DATASET_NDL7_C)
-#define nh5ltmake_dataset_string_c H5_FC_FUNC_(h5ltmake_dataset_string_c, H5LTMAKE_DATASET_STRING_C)
-#define nh5ltread_dataset_string_c H5_FC_FUNC_(h5ltread_dataset_string_c, H5LTREAD_DATASET_STRING_C)
+#define nh5ltmake_dataset_c H5_FC_FUNC_(h5ltmake_dataset_c, H5LTMAKE_DATASET_C)
+#define nh5ltmake_dataset_int1_c H5_FC_FUNC_(h5ltmake_dataset_int1_c, H5LTMAKE_DATASET_INT1_C)
+#define nh5ltmake_dataset_int2_c H5_FC_FUNC_(h5ltmake_dataset_int2_c, H5LTMAKE_DATASET_INT2_C)
+#define nh5ltmake_dataset_int3_c H5_FC_FUNC_(h5ltmake_dataset_int3_c, H5LTMAKE_DATASET_INT3_C)
+#define nh5ltmake_dataset_int4_c H5_FC_FUNC_(h5ltmake_dataset_int4_c, H5LTMAKE_DATASET_INT4_C)
+#define nh5ltmake_dataset_int5_c H5_FC_FUNC_(h5ltmake_dataset_int5_c, H5LTMAKE_DATASET_INT5_C)
+#define nh5ltmake_dataset_int6_c H5_FC_FUNC_(h5ltmake_dataset_int6_c, H5LTMAKE_DATASET_INT6_C)
+#define nh5ltmake_dataset_int7_c H5_FC_FUNC_(h5ltmake_dataset_int7_c, H5LTMAKE_DATASET_INT7_C)
+#define nh5ltmake_dataset_fl1_c H5_FC_FUNC_(h5ltmake_dataset_fl1_c, H5LTMAKE_DATASET_FL1_C)
+#define nh5ltmake_dataset_fl2_c H5_FC_FUNC_(h5ltmake_dataset_fl2_c, H5LTMAKE_DATASET_FL2_C)
+#define nh5ltmake_dataset_fl3_c H5_FC_FUNC_(h5ltmake_dataset_fl3_c, H5LTMAKE_DATASET_FL3_C)
+#define nh5ltmake_dataset_fl4_c H5_FC_FUNC_(h5ltmake_dataset_fl4_c, H5LTMAKE_DATASET_FL4_C)
+#define nh5ltmake_dataset_fl5_c H5_FC_FUNC_(h5ltmake_dataset_fl5_c, H5LTMAKE_DATASET_FL5_C)
+#define nh5ltmake_dataset_fl6_c H5_FC_FUNC_(h5ltmake_dataset_fl6_c, H5LTMAKE_DATASET_FL6_C)
+#define nh5ltmake_dataset_fl7_c H5_FC_FUNC_(h5ltmake_dataset_fl7_c, H5LTMAKE_DATASET_FL7_C)
+#define nh5ltmake_dataset_dl1_c H5_FC_FUNC_(h5ltmake_dataset_dl1_c, H5LTMAKE_DATASET_DL1_C)
+#define nh5ltmake_dataset_dl2_c H5_FC_FUNC_(h5ltmake_dataset_dl2_c, H5LTMAKE_DATASET_DL2_C)
+#define nh5ltmake_dataset_dl3_c H5_FC_FUNC_(h5ltmake_dataset_dl3_c, H5LTMAKE_DATASET_DL3_C)
+#define nh5ltmake_dataset_dl4_c H5_FC_FUNC_(h5ltmake_dataset_dl4_c, H5LTMAKE_DATASET_DL4_C)
+#define nh5ltmake_dataset_dl5_c H5_FC_FUNC_(h5ltmake_dataset_dl5_c, H5LTMAKE_DATASET_DL5_C)
+#define nh5ltmake_dataset_dl6_c H5_FC_FUNC_(h5ltmake_dataset_dl6_c, H5LTMAKE_DATASET_DL6_C)
+#define nh5ltmake_dataset_dl7_c H5_FC_FUNC_(h5ltmake_dataset_dl7_c, H5LTMAKE_DATASET_DL7_C)
+#define nh5ltmake_dataset_nint1_c H5_FC_FUNC_(h5ltmake_dataset_nint1_c, H5LTMAKE_DATASET_NINT1_C)
+#define nh5ltmake_dataset_nint2_c H5_FC_FUNC_(h5ltmake_dataset_nint2_c, H5LTMAKE_DATASET_NINT2_C)
+#define nh5ltmake_dataset_nint3_c H5_FC_FUNC_(h5ltmake_dataset_nint3_c, H5LTMAKE_DATASET_NINT3_C)
+#define nh5ltmake_dataset_nint4_c H5_FC_FUNC_(h5ltmake_dataset_nint4_c, H5LTMAKE_DATASET_NINT4_C)
+#define nh5ltmake_dataset_nint5_c H5_FC_FUNC_(h5ltmake_dataset_nint5_c, H5LTMAKE_DATASET_NINT5_C)
+#define nh5ltmake_dataset_nint6_c H5_FC_FUNC_(h5ltmake_dataset_nint6_c, H5LTMAKE_DATASET_NINT6_C)
+#define nh5ltmake_dataset_nint7_c H5_FC_FUNC_(h5ltmake_dataset_nint7_c, H5LTMAKE_DATASET_NINT7_C)
+#define nh5ltmake_dataset_nfl1_c H5_FC_FUNC_(h5ltmake_dataset_nfl1_c, H5LTMAKE_DATASET_NFL1_C)
+#define nh5ltmake_dataset_nfl2_c H5_FC_FUNC_(h5ltmake_dataset_nfl2_c, H5LTMAKE_DATASET_NFL2_C)
+#define nh5ltmake_dataset_nfl3_c H5_FC_FUNC_(h5ltmake_dataset_nfl3_c, H5LTMAKE_DATASET_NFL3_C)
+#define nh5ltmake_dataset_nfl4_c H5_FC_FUNC_(h5ltmake_dataset_nfl4_c, H5LTMAKE_DATASET_NFL4_C)
+#define nh5ltmake_dataset_nfl5_c H5_FC_FUNC_(h5ltmake_dataset_nfl5_c, H5LTMAKE_DATASET_NFL5_C)
+#define nh5ltmake_dataset_nfl6_c H5_FC_FUNC_(h5ltmake_dataset_nfl6_c, H5LTMAKE_DATASET_NFL6_C)
+#define nh5ltmake_dataset_nfl7_c H5_FC_FUNC_(h5ltmake_dataset_nfl7_c, H5LTMAKE_DATASET_NFL7_C)
+#define nh5ltmake_dataset_ndl1_c H5_FC_FUNC_(h5ltmake_dataset_ndl1_c, H5LTMAKE_DATASET_NDL1_C)
+#define nh5ltmake_dataset_ndl2_c H5_FC_FUNC_(h5ltmake_dataset_ndl2_c, H5LTMAKE_DATASET_NDL2_C)
+#define nh5ltmake_dataset_ndl3_c H5_FC_FUNC_(h5ltmake_dataset_ndl3_c, H5LTMAKE_DATASET_NDL3_C)
+#define nh5ltmake_dataset_ndl4_c H5_FC_FUNC_(h5ltmake_dataset_ndl4_c, H5LTMAKE_DATASET_NDL4_C)
+#define nh5ltmake_dataset_ndl5_c H5_FC_FUNC_(h5ltmake_dataset_ndl5_c, H5LTMAKE_DATASET_NDL5_C)
+#define nh5ltmake_dataset_ndl6_c H5_FC_FUNC_(h5ltmake_dataset_ndl6_c, H5LTMAKE_DATASET_NDL6_C)
+#define nh5ltmake_dataset_ndl7_c H5_FC_FUNC_(h5ltmake_dataset_ndl7_c, H5LTMAKE_DATASET_NDL7_C)
+#define nh5ltread_dataset_c H5_FC_FUNC_(h5ltread_dataset_c, H5LTREAD_DATASET_C)
+#define nh5ltread_dataset_int1_c H5_FC_FUNC_(h5ltread_dataset_int1_c, H5LTREAD_DATASET_INT1_C)
+#define nh5ltread_dataset_int2_c H5_FC_FUNC_(h5ltread_dataset_int2_c, H5LTREAD_DATASET_INT2_C)
+#define nh5ltread_dataset_int3_c H5_FC_FUNC_(h5ltread_dataset_int3_c, H5LTREAD_DATASET_INT3_C)
+#define nh5ltread_dataset_int4_c H5_FC_FUNC_(h5ltread_dataset_int4_c, H5LTREAD_DATASET_INT4_C)
+#define nh5ltread_dataset_int5_c H5_FC_FUNC_(h5ltread_dataset_int5_c, H5LTREAD_DATASET_INT5_C)
+#define nh5ltread_dataset_int6_c H5_FC_FUNC_(h5ltread_dataset_int6_c, H5LTREAD_DATASET_INT6_C)
+#define nh5ltread_dataset_int7_c H5_FC_FUNC_(h5ltread_dataset_int7_c, H5LTREAD_DATASET_INT7_C)
+#define nh5ltread_dataset_fl1_c H5_FC_FUNC_(h5ltread_dataset_fl1_c, H5LTREAD_DATASET_FL1_C)
+#define nh5ltread_dataset_fl2_c H5_FC_FUNC_(h5ltread_dataset_fl2_c, H5LTREAD_DATASET_FL2_C)
+#define nh5ltread_dataset_fl3_c H5_FC_FUNC_(h5ltread_dataset_fl3_c, H5LTREAD_DATASET_FL3_C)
+#define nh5ltread_dataset_fl4_c H5_FC_FUNC_(h5ltread_dataset_fl4_c, H5LTREAD_DATASET_FL4_C)
+#define nh5ltread_dataset_fl5_c H5_FC_FUNC_(h5ltread_dataset_fl5_c, H5LTREAD_DATASET_FL5_C)
+#define nh5ltread_dataset_fl6_c H5_FC_FUNC_(h5ltread_dataset_fl6_c, H5LTREAD_DATASET_FL6_C)
+#define nh5ltread_dataset_fl7_c H5_FC_FUNC_(h5ltread_dataset_fl7_c, H5LTREAD_DATASET_FL7_C)
+#define nh5ltread_dataset_dl1_c H5_FC_FUNC_(h5ltread_dataset_dl1_c, H5LTREAD_DATASET_DL1_C)
+#define nh5ltread_dataset_dl2_c H5_FC_FUNC_(h5ltread_dataset_dl2_c, H5LTREAD_DATASET_DL2_C)
+#define nh5ltread_dataset_dl3_c H5_FC_FUNC_(h5ltread_dataset_dl3_c, H5LTREAD_DATASET_DL3_C)
+#define nh5ltread_dataset_dl4_c H5_FC_FUNC_(h5ltread_dataset_dl4_c, H5LTREAD_DATASET_DL4_C)
+#define nh5ltread_dataset_dl5_c H5_FC_FUNC_(h5ltread_dataset_dl5_c, H5LTREAD_DATASET_DL5_C)
+#define nh5ltread_dataset_dl6_c H5_FC_FUNC_(h5ltread_dataset_dl6_c, H5LTREAD_DATASET_DL6_C)
+#define nh5ltread_dataset_dl7_c H5_FC_FUNC_(h5ltread_dataset_dl7_c, H5LTREAD_DATASET_DL7_C)
+#define nh5ltread_dataset_nint1_c H5_FC_FUNC_(h5ltread_dataset_nint1_c, H5LTREAD_DATASET_NINT1_C)
+#define nh5ltread_dataset_nint2_c H5_FC_FUNC_(h5ltread_dataset_nint2_c, H5LTREAD_DATASET_NINT2_C)
+#define nh5ltread_dataset_nint3_c H5_FC_FUNC_(h5ltread_dataset_nint3_c, H5LTREAD_DATASET_NINT3_C)
+#define nh5ltread_dataset_nint4_c H5_FC_FUNC_(h5ltread_dataset_nint4_c, H5LTREAD_DATASET_NINT4_C)
+#define nh5ltread_dataset_nint5_c H5_FC_FUNC_(h5ltread_dataset_nint5_c, H5LTREAD_DATASET_NINT5_C)
+#define nh5ltread_dataset_nint6_c H5_FC_FUNC_(h5ltread_dataset_nint6_c, H5LTREAD_DATASET_NINT6_C)
+#define nh5ltread_dataset_nint7_c H5_FC_FUNC_(h5ltread_dataset_nint7_c, H5LTREAD_DATASET_NINT7_C)
+#define nh5ltread_dataset_nfl1_c H5_FC_FUNC_(h5ltread_dataset_nfl1_c, H5LTREAD_DATASET_NFL1_C)
+#define nh5ltread_dataset_nfl2_c H5_FC_FUNC_(h5ltread_dataset_nfl2_c, H5LTREAD_DATASET_NFL2_C)
+#define nh5ltread_dataset_nfl3_c H5_FC_FUNC_(h5ltread_dataset_nfl3_c, H5LTREAD_DATASET_NFL3_C)
+#define nh5ltread_dataset_nfl4_c H5_FC_FUNC_(h5ltread_dataset_nfl4_c, H5LTREAD_DATASET_NFL4_C)
+#define nh5ltread_dataset_nfl5_c H5_FC_FUNC_(h5ltread_dataset_nfl5_c, H5LTREAD_DATASET_NFL5_C)
+#define nh5ltread_dataset_nfl6_c H5_FC_FUNC_(h5ltread_dataset_nfl6_c, H5LTREAD_DATASET_NFL6_C)
+#define nh5ltread_dataset_nfl7_c H5_FC_FUNC_(h5ltread_dataset_nfl7_c, H5LTREAD_DATASET_NFL7_C)
+#define nh5ltread_dataset_ndl1_c H5_FC_FUNC_(h5ltread_dataset_ndl1_c, H5LTREAD_DATASET_NDL1_C)
+#define nh5ltread_dataset_ndl2_c H5_FC_FUNC_(h5ltread_dataset_ndl2_c, H5LTREAD_DATASET_NDL2_C)
+#define nh5ltread_dataset_ndl3_c H5_FC_FUNC_(h5ltread_dataset_ndl3_c, H5LTREAD_DATASET_NDL3_C)
+#define nh5ltread_dataset_ndl4_c H5_FC_FUNC_(h5ltread_dataset_ndl4_c, H5LTREAD_DATASET_NDL4_C)
+#define nh5ltread_dataset_ndl5_c H5_FC_FUNC_(h5ltread_dataset_ndl5_c, H5LTREAD_DATASET_NDL5_C)
+#define nh5ltread_dataset_ndl6_c H5_FC_FUNC_(h5ltread_dataset_ndl6_c, H5LTREAD_DATASET_NDL6_C)
+#define nh5ltread_dataset_ndl7_c H5_FC_FUNC_(h5ltread_dataset_ndl7_c, H5LTREAD_DATASET_NDL7_C)
+#define nh5ltmake_dataset_string_c H5_FC_FUNC_(h5ltmake_dataset_string_c, H5LTMAKE_DATASET_STRING_C)
+#define nh5ltread_dataset_string_c H5_FC_FUNC_(h5ltread_dataset_string_c, H5LTREAD_DATASET_STRING_C)
#define nh5ltset_attribute_int_c H5_FC_FUNC_(h5ltset_attribute_int_c, H5LTSET_ATTRIBUTE_INT_C)
#define nh5ltset_attribute_float_c H5_FC_FUNC_(h5ltset_attribute_float_c, H5LTSET_ATTRIBUTE_FLOAT_C)
@@ -142,1504 +140,667 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len);
#define nh5ltget_attribute_double_c H5_FC_FUNC_(h5ltget_attribute_double_c, H5LTGET_ATTRIBUTE_DOUBLE_C)
#define nh5ltget_attribute_string_c H5_FC_FUNC_(h5ltget_attribute_string_c, H5LTGET_ATTRIBUTE_STRING_C)
-#define nh5ltget_dataset_ndims_c H5_FC_FUNC_(h5ltget_dataset_ndims_c, H5LTGET_DATASET_NDIMS_C)
-#define nh5ltfind_dataset_c H5_FC_FUNC_(h5ltfind_dataset_c, H5LTFIND_DATASET_C)
-#define nh5ltget_dataset_info_c H5_FC_FUNC_(h5ltget_dataset_info_c, H5LTGET_DATASET_INFO_C)
+#define nh5ltget_dataset_ndims_c H5_FC_FUNC_(h5ltget_dataset_ndims_c, H5LTGET_DATASET_NDIMS_C)
+#define nh5ltfind_dataset_c H5_FC_FUNC_(h5ltfind_dataset_c, H5LTFIND_DATASET_C)
+#define nh5ltget_dataset_info_c H5_FC_FUNC_(h5ltget_dataset_info_c, H5LTGET_DATASET_INFO_C)
-#define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C)
-#define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C)
-#define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C)
+#define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C)
+#define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C)
+#define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C)
/*-------------------------------------------------------------------------
-* Image
-*-------------------------------------------------------------------------
-*/
-#define nh5immake_image_8bit_c H5_FC_FUNC_(h5immake_image_8bit_c, H5IMMAKE_IMAGE_8BIT_C)
-#define nh5immake_image_24bit_c H5_FC_FUNC_(h5immake_image_24bit_c, H5IMMAKE_IMAGE_24BIT_C)
-#define nh5imread_image_c H5_FC_FUNC_(h5imread_image_c, H5IMREAD_IMAGE_C)
-#define nh5imget_image_info_c H5_FC_FUNC_(h5imget_image_info_c, H5IMGET_IMAGE_INFO_C)
-#define nh5imis_image_c H5_FC_FUNC_(h5imis_image_c, H5IMIS_IMAGE_C)
-#define nh5immake_palette_c H5_FC_FUNC_(h5immake_palette_c, H5IMMAKE_PALETTE_C)
-#define nh5imlink_palette_c H5_FC_FUNC_(h5imlink_palette_c, H5IMLINK_PALETTE_C)
-#define nh5imunlink_palette_c H5_FC_FUNC_(h5imunlink_palette_c, H5IMUNLINK_PALETTE_C)
-#define nh5imget_npalettes_c H5_FC_FUNC_(h5imget_npalettes_c, H5IMGET_NPALETTES_C)
-#define nh5imget_palette_info_c H5_FC_FUNC_(h5imget_palette_info_c, H5IMGET_PALETTE_INFO_C)
-#define nh5imget_palette_c H5_FC_FUNC_(h5imget_palette_c, H5IMGET_PALETTE_C)
-#define nh5imis_palette_c H5_FC_FUNC_(h5imis_palette_c, H5IMIS_PALETTE_C)
+ * Image
+ *-------------------------------------------------------------------------
+ */
+#define nh5immake_image_8bit_c H5_FC_FUNC_(h5immake_image_8bit_c, H5IMMAKE_IMAGE_8BIT_C)
+#define nh5immake_image_24bit_c H5_FC_FUNC_(h5immake_image_24bit_c, H5IMMAKE_IMAGE_24BIT_C)
+#define nh5imread_image_c H5_FC_FUNC_(h5imread_image_c, H5IMREAD_IMAGE_C)
+#define nh5imget_image_info_c H5_FC_FUNC_(h5imget_image_info_c, H5IMGET_IMAGE_INFO_C)
+#define nh5imis_image_c H5_FC_FUNC_(h5imis_image_c, H5IMIS_IMAGE_C)
+#define nh5immake_palette_c H5_FC_FUNC_(h5immake_palette_c, H5IMMAKE_PALETTE_C)
+#define nh5imlink_palette_c H5_FC_FUNC_(h5imlink_palette_c, H5IMLINK_PALETTE_C)
+#define nh5imunlink_palette_c H5_FC_FUNC_(h5imunlink_palette_c, H5IMUNLINK_PALETTE_C)
+#define nh5imget_npalettes_c H5_FC_FUNC_(h5imget_npalettes_c, H5IMGET_NPALETTES_C)
+#define nh5imget_palette_info_c H5_FC_FUNC_(h5imget_palette_info_c, H5IMGET_PALETTE_INFO_C)
+#define nh5imget_palette_c H5_FC_FUNC_(h5imget_palette_c, H5IMGET_PALETTE_C)
+#define nh5imis_palette_c H5_FC_FUNC_(h5imis_palette_c, H5IMIS_PALETTE_C)
/*-------------------------------------------------------------------------
-* Table
-*-------------------------------------------------------------------------
-*/
-#define nh5tbmake_table_c H5_FC_FUNC_(h5tbmake_table_c, H5TBMAKE_TABLE_C)
-#define nh5tbwrite_field_name_c H5_FC_FUNC_(h5tbwrite_field_name_c, H5TBWRITE_FIELD_NAME_C)
-#define nh5tbwrite_field_name_int_c H5_FC_FUNC_(h5tbwrite_field_name_int_c, H5TBWRITE_FIELD_NAME_INT_C)
-#define nh5tbwrite_field_name_fl_c H5_FC_FUNC_(h5tbwrite_field_name_fl_c, H5TBWRITE_FIELD_NAME_FL_C)
-#define nh5tbwrite_field_name_dl_c H5_FC_FUNC_(h5tbwrite_field_name_dl_c, H5TBWRITE_FIELD_NAME_DL_C)
-#define nh5tbwrite_field_name_st_c H5_FC_FUNC_(h5tbwrite_field_name_st_c, H5TBWRITE_FIELD_NAME_ST_C)
-#define nh5tbread_field_name_c H5_FC_FUNC_(h5tbread_field_name_c, H5TBREAD_FIELD_NAME_C)
-#define nh5tbread_field_name_int_c H5_FC_FUNC_(h5tbread_field_name_int_c, H5TBREAD_FIELD_NAME_INT_C)
-#define nh5tbread_field_name_fl_c H5_FC_FUNC_(h5tbread_field_name_fl_c, H5TBREAD_FIELD_NAME_FL_C)
-#define nh5tbread_field_name_dl_c H5_FC_FUNC_(h5tbread_field_name_dl_c, H5TBREAD_FIELD_NAME_DL_C)
-#define nh5tbread_field_name_st_c H5_FC_FUNC_(h5tbread_field_name_st_c, H5TBREAD_FIELD_NAME_ST_C)
-#define nh5tbwrite_field_index_c H5_FC_FUNC_(h5tbwrite_field_index_c, H5TBWRITE_FIELD_INDEX_C)
-#define nh5tbwrite_field_index_int_c H5_FC_FUNC_(h5tbwrite_field_index_int_c, H5TBWRITE_FIELD_INDEX_INT_C)
-#define nh5tbwrite_field_index_fl_c H5_FC_FUNC_(h5tbwrite_field_index_fl_c, H5TBWRITE_FIELD_INDEX_FL_C)
-#define nh5tbwrite_field_index_dl_c H5_FC_FUNC_(h5tbwrite_field_index_dl_c, H5TBWRITE_FIELD_INDEX_DL_C)
-#define nh5tbwrite_field_index_st_c H5_FC_FUNC_(h5tbwrite_field_index_st_c, H5TBWRITE_FIELD_INDEX_ST_C)
-#define nh5tbread_field_index_c H5_FC_FUNC_(h5tbread_field_index_c, H5TBREAD_FIELD_INDEX_C)
-#define nh5tbread_field_index_int_c H5_FC_FUNC_(h5tbread_field_index_int_c, H5TBREAD_FIELD_INDEX_INT_C)
-#define nh5tbread_field_index_fl_c H5_FC_FUNC_(h5tbread_field_index_fl_c, H5TBREAD_FIELD_INDEX_FL_C)
-#define nh5tbread_field_index_dl_c H5_FC_FUNC_(h5tbread_field_index_dl_c, H5TBREAD_FIELD_INDEX_DL_C)
-#define nh5tbread_field_index_st_c H5_FC_FUNC_(h5tbread_field_index_st_c, H5TBREAD_FIELD_INDEX_ST_C)
-#define nh5tbinsert_field_c H5_FC_FUNC_(h5tbinsert_field_c, H5TBINSERT_FIELD_C)
-#define nh5tbinsert_field_int_c H5_FC_FUNC_(h5tbinsert_field_int_c, H5TBINSERT_FIELD_INT_C)
-#define nh5tbinsert_field_fl_c H5_FC_FUNC_(h5tbinsert_field_fl_c, H5TBINSERT_FIELD_FL_C)
-#define nh5tbinsert_field_dl_c H5_FC_FUNC_(h5tbinsert_field_dl_c, H5TBINSERT_FIELD_DL_C)
-#define nh5tbinsert_field_st_c H5_FC_FUNC_(h5tbinsert_field_st_c, H5TBINSERT_FIELD_ST_C)
-#define nh5tbdelete_field_c H5_FC_FUNC_(h5tbdelete_field_c, H5TBDELETE_FIELD_C)
-#define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C)
-#define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C)
+ * Table
+ *-------------------------------------------------------------------------
+ */
+#define nh5tbmake_table_c H5_FC_FUNC_(h5tbmake_table_c, H5TBMAKE_TABLE_C)
+#define nh5tbwrite_field_name_c H5_FC_FUNC_(h5tbwrite_field_name_c, H5TBWRITE_FIELD_NAME_C)
+#define nh5tbwrite_field_name_int_c H5_FC_FUNC_(h5tbwrite_field_name_int_c, H5TBWRITE_FIELD_NAME_INT_C)
+#define nh5tbwrite_field_name_fl_c H5_FC_FUNC_(h5tbwrite_field_name_fl_c, H5TBWRITE_FIELD_NAME_FL_C)
+#define nh5tbwrite_field_name_dl_c H5_FC_FUNC_(h5tbwrite_field_name_dl_c, H5TBWRITE_FIELD_NAME_DL_C)
+#define nh5tbwrite_field_name_st_c H5_FC_FUNC_(h5tbwrite_field_name_st_c, H5TBWRITE_FIELD_NAME_ST_C)
+#define nh5tbread_field_name_c H5_FC_FUNC_(h5tbread_field_name_c, H5TBREAD_FIELD_NAME_C)
+#define nh5tbread_field_name_int_c H5_FC_FUNC_(h5tbread_field_name_int_c, H5TBREAD_FIELD_NAME_INT_C)
+#define nh5tbread_field_name_fl_c H5_FC_FUNC_(h5tbread_field_name_fl_c, H5TBREAD_FIELD_NAME_FL_C)
+#define nh5tbread_field_name_dl_c H5_FC_FUNC_(h5tbread_field_name_dl_c, H5TBREAD_FIELD_NAME_DL_C)
+#define nh5tbread_field_name_st_c H5_FC_FUNC_(h5tbread_field_name_st_c, H5TBREAD_FIELD_NAME_ST_C)
+#define nh5tbwrite_field_index_c H5_FC_FUNC_(h5tbwrite_field_index_c, H5TBWRITE_FIELD_INDEX_C)
+#define nh5tbwrite_field_index_int_c H5_FC_FUNC_(h5tbwrite_field_index_int_c, H5TBWRITE_FIELD_INDEX_INT_C)
+#define nh5tbwrite_field_index_fl_c H5_FC_FUNC_(h5tbwrite_field_index_fl_c, H5TBWRITE_FIELD_INDEX_FL_C)
+#define nh5tbwrite_field_index_dl_c H5_FC_FUNC_(h5tbwrite_field_index_dl_c, H5TBWRITE_FIELD_INDEX_DL_C)
+#define nh5tbwrite_field_index_st_c H5_FC_FUNC_(h5tbwrite_field_index_st_c, H5TBWRITE_FIELD_INDEX_ST_C)
+#define nh5tbread_field_index_c H5_FC_FUNC_(h5tbread_field_index_c, H5TBREAD_FIELD_INDEX_C)
+#define nh5tbread_field_index_int_c H5_FC_FUNC_(h5tbread_field_index_int_c, H5TBREAD_FIELD_INDEX_INT_C)
+#define nh5tbread_field_index_fl_c H5_FC_FUNC_(h5tbread_field_index_fl_c, H5TBREAD_FIELD_INDEX_FL_C)
+#define nh5tbread_field_index_dl_c H5_FC_FUNC_(h5tbread_field_index_dl_c, H5TBREAD_FIELD_INDEX_DL_C)
+#define nh5tbread_field_index_st_c H5_FC_FUNC_(h5tbread_field_index_st_c, H5TBREAD_FIELD_INDEX_ST_C)
+#define nh5tbinsert_field_c H5_FC_FUNC_(h5tbinsert_field_c, H5TBINSERT_FIELD_C)
+#define nh5tbinsert_field_int_c H5_FC_FUNC_(h5tbinsert_field_int_c, H5TBINSERT_FIELD_INT_C)
+#define nh5tbinsert_field_fl_c H5_FC_FUNC_(h5tbinsert_field_fl_c, H5TBINSERT_FIELD_FL_C)
+#define nh5tbinsert_field_dl_c H5_FC_FUNC_(h5tbinsert_field_dl_c, H5TBINSERT_FIELD_DL_C)
+#define nh5tbinsert_field_st_c H5_FC_FUNC_(h5tbinsert_field_st_c, H5TBINSERT_FIELD_ST_C)
+#define nh5tbdelete_field_c H5_FC_FUNC_(h5tbdelete_field_c, H5TBDELETE_FIELD_C)
+#define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C)
+#define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C)
HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx);
+int_f nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsis_scale_c(hid_t_f *did, int_f *is_scale);
+int_f nh5dsattach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size);
-
+int_f nh5dsdetach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx);
+
HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
+int_f nh5dsis_attached_c(hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
+int_f nh5dsis_scale_c(hid_t_f *did, int_f *is_scale);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
+int_f nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_int7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_fl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_dl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nint7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5dsget_num_scales_c(hid_t_f *did, int_f *idx, int_f *num_scales);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_int7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
+int_f nh5ltmake_dataset_int4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_fl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_dl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nint7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_int7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_nfl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_fl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_dl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_dl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims);
+int_f nh5ltmake_dataset_dl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_dl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_dl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_dl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_dl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nint7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_nfl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_ndl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
+int_f nh5ltmake_dataset_nfl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_ndl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltset_attribute_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltset_attribute_float_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltset_attribute_double_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltset_attribute_string_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *buflen,
- void *buf);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_float_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_double_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_string_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- _fcd buf,
- size_t_f *buf_size);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_dataset_ndims_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltfind_dataset_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_dataset_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *dims,
- int_f *type_class,
- size_t_f *type_size);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_ndims_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- int_f *rank);
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltget_attribute_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *attrnamelen,
- _fcd attrname,
- hsize_t_f *dims,
- int_f *type_class,
- size_t_f *type_size);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltmake_dataset_string_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *buflen,
- char *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltread_dataset_string_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- char *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5ltpath_valid_c(hid_t_f *loc_id,
- _fcd path,
- size_t_f *pathlen,
- int_f *check_object_valid_c);
+int_f nh5ltread_dataset_int1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
-/*-------------------------------------------------------------------------
-* Image
-*-------------------------------------------------------------------------
-*/
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_int7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5immake_image_8bit_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *width,
- hsize_t_f *height,
- int_f *buf);
+int_f nh5ltread_dataset_fl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_fl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_dl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_dl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imread_image_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *buf);
+int_f nh5ltread_dataset_dl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5immake_image_24bit_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd il,
- hsize_t_f *width,
- hsize_t_f *height,
- void *buf);
+int_f nh5ltread_dataset_dl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_dl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imget_image_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *width,
- hsize_t_f *height,
- hsize_t_f *planes,
- hsize_t_f *npals,
- size_t_f *ilen,
- _fcd interlace);
+int_f nh5ltread_dataset_dl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_dl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imis_image_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name);
+int_f nh5ltread_dataset_nint1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nint2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5immake_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *dims,
- void *buf);
+int_f nh5ltread_dataset_nint3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imlink_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd pal_name);
+int_f nh5ltread_dataset_nint4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imunlink_palette_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *ilen,
- _fcd pal_name);
+int_f nh5ltread_dataset_nint5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imget_npalettes_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *npals);
+int_f nh5ltread_dataset_nint6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nint7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imget_palette_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *pal_number,
- hsize_t_f *dims);
+int_f nh5ltread_dataset_nfl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imget_palette_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *pal_number,
- void *buf);
+int_f nh5ltread_dataset_nfl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5imis_palette_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name);
+int_f nh5ltread_dataset_nfl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nfl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nfl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nfl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_nfl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_ndl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltset_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltset_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltset_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltset_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *buflen, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, _fcd buf, size_t_f *buf_size);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims,
+ int_f *type_class, size_t_f *type_size);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, int_f *rank);
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen,
+ _fcd attrname, hsize_t_f *dims, int_f *type_class, size_t_f *type_size);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltmake_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, char *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltread_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c);
/*-------------------------------------------------------------------------
-* Table
-*-------------------------------------------------------------------------
-*/
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbmake_table_c(size_t_f *namelen1,
- _fcd name1,
- hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- size_t_f *field_offset,
- hid_t_f *field_types,
- hsize_t_f *chunk_size,
- int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
- size_t_f *max_char_size_field_names, /* char len of fields */
- _fcd buf); /* field_names */
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_name_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_name_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_name_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_name_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_name_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_name_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_name_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_name_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_name_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_name_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_index_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_index_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
+ * Image
+ *-------------------------------------------------------------------------
+ */
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5immake_image_8bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width,
+ hsize_t_f *height, int_f *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5imread_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5immake_image_24bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd il,
+ hsize_t_f *width, hsize_t_f *height, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width,
+ hsize_t_f *height, hsize_t_f *planes, hsize_t_f *npals, size_t_f *ilen,
+ _fcd interlace);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd pal_name);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imunlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, _fcd pal_name);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number,
+ hsize_t_f *dims);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name);
+
+/*-------------------------------------------------------------------------
+ * Table
+ *-------------------------------------------------------------------------
+ */
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, _fcd name,
+ hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset,
+ hid_t_f *field_types, hsize_t_f *chunk_size, int_f *compress,
+ size_t_f *char_len_field_names, /* field_names lenghts */
+ size_t_f *max_char_size_field_names, /* char len of fields */
+ _fcd buf); /* field_names */
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
void *buf);
HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_index_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_index_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbwrite_field_index_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_index_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_index_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_index_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_index_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbread_field_index_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbinsert_field_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbinsert_field_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf);
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbinsert_field_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf);
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbinsert_field_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf);
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbinsert_field_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf);
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbdelete_field_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name);
-
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbget_table_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- hsize_t_f *nrecords);
-
-HDF5_HL_F90CSTUBDLL
-int_f
-nh5tbget_field_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- size_t_f *field_sizes,
- size_t_f *field_offsets,
- size_t_f *type_size,
- size_t_f *namelen2,
- size_t_f *lenmax,
- _fcd field_names,
- size_t_f *maxlen_out);
+int_f nh5tbread_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
+ void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbwrite_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbread_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbinsert_field_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hid_t_f *field_type, int_f *position, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbinsert_field_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hid_t_f *field_type, int_f *position, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbinsert_field_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hid_t_f *field_type, int_f *position, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbinsert_field_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hid_t_f *field_type, int_f *position, void *buf);
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields,
+ hsize_t_f *nrecords);
+
+HDF5_HL_F90CSTUBDLL
+int_f nh5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields,
+ size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size,
+ size_t_f *namelen2, size_t_f *lenmax, _fcd field_names, size_t_f *maxlen_out);
#endif /* _H5LTf90proto_H */
diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c
index fd7092b..82686c1 100644
--- a/hl/fortran/src/H5LTfc.c
+++ b/hl/fortran/src/H5LTfc.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This files contains C stubs for H5D Fortran APIs */
@@ -18,584 +18,364 @@
#include "H5Eprivate.h"
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_c
-*
-* Purpose: Call H5LTmake_dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltmake_dataset_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- char *c_name = NULL;
+ * Function: H5LTmake_dataset_c
+ *
+ * Purpose: Call H5LTmake_dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ char * c_name = NULL;
hsize_t *c_dims = NULL;
- int i;
+ int i;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
- c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * ( (size_t)*rank ));
+ c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * ((size_t)*rank));
if (c_dims == NULL)
goto done;
/*
- * transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < *rank ; i++)
- {
- c_dims[i] = dims[*rank - i - 1];
+ * transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for (i = 0; i < *rank; i++) {
+ c_dims[i] = dims[*rank - i - 1];
}
/*
- * call H5LTmake_dataset function.
- */
+ * call H5LTmake_dataset function.
+ */
- ret = H5LTmake_dataset((hid_t)*loc_id, c_name, (int)*rank, c_dims, (hid_t)*type_id, buf );
+ ret = H5LTmake_dataset((hid_t)*loc_id, c_name, (int)*rank, c_dims, (hid_t)*type_id, buf);
if (ret < 0)
goto done;
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_dims!=NULL)
+ if (c_dims != NULL)
free(c_dims);
return ret_value;
}
int_f
-nh5ltmake_dataset_int1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_int7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_int7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_fl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_fl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_dl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_dl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nint7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nint7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_nfl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
int_f
-nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank,
- hsize_t_f *dims,
- hid_t_f *type_id,
- void *buf)
+nh5ltmake_dataset_ndl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, hsize_t_f *dims,
+ hid_t_f *type_id, void *buf)
{
- return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf);
+ return nh5ltmake_dataset_c(loc_id, namelen, name, rank, dims, type_id, buf);
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_c
-*
-* Purpose: Call H5LTmake_dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltread_dataset_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- hid_t c_type_id;
- char *c_name = NULL;
+ * Function: H5LTread_dataset_c
+ *
+ * Purpose: Call H5LTmake_dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltread_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ hid_t c_type_id;
+ char * c_name = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5LTread_dataset function.
- */
- c_loc_id = (hid_t)*loc_id;
+ * call H5LTread_dataset function.
+ */
+ c_loc_id = (hid_t)*loc_id;
c_type_id = (hid_t)*type_id;
- ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf );
+ ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf);
if (ret < 0)
goto done;
@@ -603,467 +383,295 @@ nh5ltread_dataset_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
int_f
-nh5ltread_dataset_int1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_int7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_int7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_fl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_fl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_dl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_dl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nint7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nint7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_nfl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_nfl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl1_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl1_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl2_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl2_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl3_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl3_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl4_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl4_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl5_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl5_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl6_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl6_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
int_f
-nh5ltread_dataset_ndl7_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hid_t_f *type_id,
- void *buf,
- hsize_t_f *dims)
+nh5ltread_dataset_ndl7_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf,
+ hsize_t_f *dims)
{
return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims);
}
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_string_c
-*
-* Purpose: Call H5LTmake_dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltmake_dataset_string_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *buflen,
- char *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_buf = NULL;
+ * Function: H5LTmake_dataset_string_c
+ *
+ * Purpose: Call H5LTmake_dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltmake_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, char *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_buf = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1073,11 +681,11 @@ nh5ltmake_dataset_string_c (hid_t_f *loc_id,
goto done;
/*
- * call H5LTmake_dataset_string function.
- */
+ * call H5LTmake_dataset_string function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTmake_dataset_string(c_loc_id,c_name,c_buf);
+ ret = H5LTmake_dataset_string(c_loc_id, c_name, c_buf);
if (ret < 0)
goto done;
@@ -1085,58 +693,54 @@ nh5ltmake_dataset_string_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_buf!=NULL)
+ if (c_buf != NULL)
free(c_buf);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_string_c
-*
-* Purpose: Call H5LTread_dataset_string
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltread_dataset_string_c (hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- char *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
+ * Function: H5LTread_dataset_string_c
+ *
+ * Purpose: Call H5LTread_dataset_string
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltread_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5LTread_dataset_string function.
- */
+ * call H5LTread_dataset_string function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTread_dataset_string(c_loc_id,c_name,buf);
+ ret = H5LTread_dataset_string(c_loc_id, c_name, buf);
if (ret < 0)
goto done;
@@ -1144,52 +748,45 @@ nh5ltread_dataset_string_c (hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_int_c
-*
-* Purpose: Call H5LTset_attribute_int
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltset_attribute_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- size_t c_size;
+ * Function: H5LTset_attribute_int_c
+ *
+ * Purpose: Call H5LTset_attribute_int
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltset_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ size_t c_size;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1199,17 +796,17 @@ nh5ltset_attribute_int_c(hid_t_f *loc_id,
goto done;
/*
- * call H5LTset_attribute_int function.
- */
+ * call H5LTset_attribute_int function.
+ */
c_loc_id = (hid_t)*loc_id;
c_size = (size_t)*size;
if (sizeof(int_f) == sizeof(int))
- ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size);
+ ret = H5LTset_attribute_int(c_loc_id, c_name, c_attrname, (const int *)buf, c_size);
else if (sizeof(int_f) == sizeof(long))
- ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size);
+ ret = H5LTset_attribute_long(c_loc_id, c_name, c_attrname, (const long *)buf, c_size);
else if (sizeof(int_f) == sizeof(long long))
- ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size);
+ ret = H5LTset_attribute_long_long(c_loc_id, c_name, c_attrname, (const long long *)buf, c_size);
else
goto done;
@@ -1219,121 +816,110 @@ nh5ltset_attribute_int_c(hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_float_c
-*
-* Purpose: Call H5LTset_attribute_float
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltset_attribute_float_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- size_t c_size;
+ * Function: H5LTset_attribute_float_c
+ *
+ * Purpose: Call H5LTset_attribute_float
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltset_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ size_t c_size;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
- goto done;
+ goto done;
c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen);
if (c_attrname == NULL)
- goto done;
+ goto done;
/*
- * Call H5LTset_attribute_float function.
- */
+ * Call H5LTset_attribute_float function.
+ */
c_loc_id = (hid_t)*loc_id;
c_size = (size_t)*size;
- ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname,(float *)buf,c_size);
+ ret = H5LTset_attribute_float(c_loc_id, c_name, c_attrname, (float *)buf, c_size);
if (ret < 0)
- goto done;
+ goto done;
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_double_c
-*
-* Purpose: Call H5LTset_attribute_double
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltset_attribute_double_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *size,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- size_t c_size;
+ * Function: H5LTset_attribute_double_c
+ *
+ * Purpose: Call H5LTset_attribute_double
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltset_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *size, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ size_t c_size;
/*
- * Convert FORTRAN name to C name
- */
+ * Convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1343,66 +929,60 @@ nh5ltset_attribute_double_c(hid_t_f *loc_id,
goto done;
/*
- * Call H5LTset_attribute_double function.
- */
+ * Call H5LTset_attribute_double function.
+ */
c_loc_id = (hid_t)*loc_id;
c_size = (size_t)*size;
- ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf,c_size);
+ ret = H5LTset_attribute_double(c_loc_id, c_name, c_attrname, (double *)buf, c_size);
if (ret < 0)
goto done;
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_string_c
-*
-* Purpose: Call H5LTset_attribute_string
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltset_attribute_string_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- size_t_f *buflen,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- char *c_buf = NULL;
+ * Function: H5LTset_attribute_string_c
+ *
+ * Purpose: Call H5LTset_attribute_string
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltset_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, size_t_f *buflen, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ char * c_buf = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1415,67 +995,61 @@ nh5ltset_attribute_string_c(hid_t_f *loc_id,
if (c_buf == NULL)
goto done;
-
/*
- * call H5LTset_attribute_string function.
- */
+ * call H5LTset_attribute_string function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf);
+ ret = H5LTset_attribute_string(c_loc_id, c_name, c_attrname, c_buf);
if (ret < 0)
goto done;
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
- if(c_buf!=NULL)
+ if (c_buf != NULL)
free(c_buf);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_int_c
-*
-* Purpose: Call H5LTget_attribute_int
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
+ * Function: H5LTget_attribute_int_c
+ *
+ * Purpose: Call H5LTget_attribute_int
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1485,16 +1059,16 @@ nh5ltget_attribute_int_c(hid_t_f *loc_id,
goto done;
/*
- * call H5LTget_attribute_int function.
- */
+ * call H5LTget_attribute_int function.
+ */
c_loc_id = (hid_t)*loc_id;
- if(sizeof(int_f) == sizeof(int))
- ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf);
+ if (sizeof(int_f) == sizeof(int))
+ ret = H5LTget_attribute_int(c_loc_id, c_name, c_attrname, (int *)buf);
else if (sizeof(int_f) == sizeof(long))
- ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf);
+ ret = H5LTget_attribute_long(c_loc_id, c_name, c_attrname, (long *)buf);
else if (sizeof(int_f) == sizeof(long long))
- ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf);
+ ret = H5LTget_attribute_long_long(c_loc_id, c_name, c_attrname, (long long *)buf);
else
goto done;
@@ -1504,52 +1078,46 @@ nh5ltget_attribute_int_c(hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
-
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_float_c
-*
-* Purpose: Call H5LTget_attribute_float
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_float_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
+ * Function: H5LTget_attribute_float_c
+ *
+ * Purpose: Call H5LTget_attribute_float
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1559,11 +1127,11 @@ nh5ltget_attribute_float_c(hid_t_f *loc_id,
goto done;
/*
- * call H5LTget_attribute_int function.
- */
+ * call H5LTget_attribute_int function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf);
+ ret = H5LTget_attribute_float(c_loc_id, c_name, c_attrname, (float *)buf);
if (ret < 0)
goto done;
@@ -1571,50 +1139,46 @@ nh5ltget_attribute_float_c(hid_t_f *loc_id,
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_double_c
-*
-* Purpose: Call H5LTget_attribute_double
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_double_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- void *buf)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
+ * Function: H5LTget_attribute_double_c
+ *
+ * Purpose: Call H5LTget_attribute_double
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, void *buf)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1624,63 +1188,58 @@ nh5ltget_attribute_double_c(hid_t_f *loc_id,
goto done;
/*
- * call H5LTget_attribute_int function.
- */
+ * call H5LTget_attribute_int function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf);
+ ret = H5LTget_attribute_double(c_loc_id, c_name, c_attrname, (double *)buf);
if (ret < 0)
goto done;
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_string_c
-*
-* Purpose: Call H5LTget_attribute_string
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_string_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- _fcd buf, size_t_f *buf_size)
-{
- int ret_value = -1;
- herr_t ret;
- char *c_name = NULL;
- char *c_attrname = NULL;
- char *c_buf = NULL;
+ * Function: H5LTget_attribute_string_c
+ *
+ * Purpose: Call H5LTget_attribute_string
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, _fcd buf, size_t_f *buf_size)
+{
+ int ret_value = -1;
+ herr_t ret;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ char * c_buf = NULL;
/*
- * Convert FORTRAN name to C name
- */
+ * Convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1692,75 +1251,71 @@ nh5ltget_attribute_string_c(hid_t_f *loc_id,
* Allocate buffer to hold C attribute string
*/
if ((c_buf = (char *)HDmalloc((size_t)*buf_size + 1)) == NULL)
- goto done;
+ goto done;
/*
* Call H5LTget_attribute_int function.
*/
- ret = H5LTget_attribute_string((hid_t)*loc_id,c_name,c_attrname,c_buf);
+ ret = H5LTget_attribute_string((hid_t)*loc_id, c_name, c_attrname, c_buf);
if (ret < 0)
goto done;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buf_size);
+ HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buf_size);
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
- if(c_buf!=NULL)
+ if (c_buf != NULL)
free(c_buf);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_dataset_ndims_c
-*
-* Purpose: Call H5LTget_dataset_ndims
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_dataset_ndims_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *rank)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- int c_rank;
+ * Function: H5LTget_dataset_ndims_c
+ *
+ * Purpose: Call H5LTget_dataset_ndims
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ int c_rank;
/*
- * Convert FORTRAN name to C name
- */
+ * Convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * Call H5LTget_dataset_ndims function.
- */
+ * Call H5LTget_dataset_ndims function.
+ */
c_loc_id = (hid_t)*loc_id;
ret = H5LTget_dataset_ndims(c_loc_id, c_name, &c_rank);
@@ -1768,113 +1323,105 @@ nh5ltget_dataset_ndims_c(hid_t_f *loc_id,
if (ret < 0)
goto done;
- *rank = (int_f)c_rank;
+ *rank = (int_f)c_rank;
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5ltfind_dataset_c
-*
-* Purpose: Call H5LTfind_dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltfind_dataset_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name)
-{
- hid_t c_loc_id;
- char *c_name = NULL;
- herr_t ret;
+ * Function: h5ltfind_dataset_c
+ *
+ * Purpose: Call H5LTfind_dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
+{
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ herr_t ret;
/*
- * Convert FORTRAN name to C name
- */
+ * Convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return -1;
+ if (c_name == NULL)
+ return -1;
/*
- * Call H5LTget_dataset_ndims function.
- */
+ * Call H5LTget_dataset_ndims function.
+ */
c_loc_id = (hid_t)*loc_id;
ret = H5LTfind_dataset(c_loc_id, c_name);
- if(c_name!=NULL)
- free(c_name);
+ if (c_name != NULL)
+ free(c_name);
return ret;
-
}
/*-------------------------------------------------------------------------
-* Function: h5ltget_dataset_info_c
-*
-* Purpose: Call H5LTget_dataset_info
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_dataset_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *dims,
- int_f *type_class,
+ * Function: h5ltget_dataset_info_c
+ *
+ * Purpose: Call H5LTget_dataset_info
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, int_f *type_class,
size_t_f *type_size)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- H5T_class_t c_classtype;
- size_t c_type_size;
- hsize_t c_dims[32];
- int i;
- int c_rank;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ H5T_class_t c_classtype;
+ size_t c_type_size;
+ hsize_t c_dims[32];
+ int i;
+ int c_rank;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
- * call H5LTget_dataset_ndims function.
- */
+ * call H5LTget_dataset_ndims function.
+ */
c_loc_id = (hid_t)*loc_id;
ret = H5LTget_dataset_info(c_loc_id, c_name, c_dims, &c_classtype, &c_type_size);
@@ -1882,68 +1429,62 @@ nh5ltget_dataset_info_c(hid_t_f *loc_id,
goto done;
*type_class = c_classtype;
- *type_size = (size_t_f)c_type_size;
+ *type_size = (size_t_f)c_type_size;
/*
- * transpose dimension arrays because of C-FORTRAN storage order
- */
+ * transpose dimension arrays because of C-FORTRAN storage order
+ */
ret = H5LTget_dataset_ndims(c_loc_id, c_name, &c_rank);
if (ret < 0)
goto done;
- for (i = 0; i < c_rank ; i++)
- {
- dims[i] = (hsize_t_f) c_dims[c_rank - i - 1];
+ for (i = 0; i < c_rank; i++) {
+ dims[i] = (hsize_t_f)c_dims[c_rank - i - 1];
}
-
ret_value = 0;
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5ltget_attribute_ndims_c
-*
-* Purpose: Call H5LTget_attribute_ndims
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_ndims_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd dsetname,
- size_t_f *attrnamelen,
- _fcd attrname,
- int_f *rank)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- int c_rank;
+ * Function: h5ltget_attribute_ndims_c
+ *
+ * Purpose: Call H5LTget_attribute_ndims
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen,
+ _fcd attrname, int_f *rank)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ int c_rank;
/*
- * Convert FORTRAN name to C name
- */
+ * Convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -1953,72 +1494,64 @@ nh5ltget_attribute_ndims_c(hid_t_f *loc_id,
goto done;
/*
- * Call H5LTset_attribute_ndims function.
- */
+ * Call H5LTset_attribute_ndims function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTget_attribute_ndims(c_loc_id,c_name,c_attrname,&c_rank);
+ ret = H5LTget_attribute_ndims(c_loc_id, c_name, c_attrname, &c_rank);
if (ret < 0)
goto done;
- *rank = (int_f)c_rank;
+ *rank = (int_f)c_rank;
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
return ret_value;
}
-
/*-------------------------------------------------------------------------
-* Function: h5ltget_attribute_info_c
-*
-* Purpose: Call H5LTget_attribute_info
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: September 09, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltget_attribute_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *attrnamelen,
- _fcd attrname,
- hsize_t_f *dims,
- int_f *type_class,
- size_t_f *type_size)
-{
- int ret_value = -1;
- herr_t ret;
- hid_t c_loc_id;
- char *c_name = NULL;
- char *c_attrname = NULL;
- H5T_class_t c_classtype;
- size_t c_type_size;
- hsize_t c_dims[32];
- int i;
- int c_rank;
+ * Function: h5ltget_attribute_info_c
+ *
+ * Purpose: Call H5LTget_attribute_info
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: September 09, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, _fcd attrname,
+ hsize_t_f *dims, int_f *type_class, size_t_f *type_size)
+{
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_loc_id;
+ char * c_name = NULL;
+ char * c_attrname = NULL;
+ H5T_class_t c_classtype;
+ size_t c_type_size;
+ hsize_t c_dims[32];
+ int i;
+ int c_rank;
/*
- * convert FORTRAN name to C name
- */
+ * convert FORTRAN name to C name
+ */
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@@ -2028,90 +1561,84 @@ nh5ltget_attribute_info_c(hid_t_f *loc_id,
goto done;
/*
- * call H5LTget_attribute_info function.
- */
+ * call H5LTget_attribute_info function.
+ */
c_loc_id = (hid_t)*loc_id;
- ret = H5LTget_attribute_info(c_loc_id,c_name,c_attrname,c_dims,&c_classtype,&c_type_size);
+ ret = H5LTget_attribute_info(c_loc_id, c_name, c_attrname, c_dims, &c_classtype, &c_type_size);
if (ret < 0)
goto done;
*type_class = c_classtype;
- *type_size = (size_t_f)c_type_size;
+ *type_size = (size_t_f)c_type_size;
/*
- * transpose dimension arrays because of C-FORTRAN storage order
- */
+ * transpose dimension arrays because of C-FORTRAN storage order
+ */
- ret = H5LTget_attribute_ndims(c_loc_id,c_name,c_attrname,&c_rank);
+ ret = H5LTget_attribute_ndims(c_loc_id, c_name, c_attrname, &c_rank);
if (ret < 0)
goto done;
- for (i = 0; i < c_rank ; i++)
- {
- dims[i] = (hsize_t_f) c_dims[c_rank - i - 1];
+ for (i = 0; i < c_rank; i++) {
+ dims[i] = (hsize_t_f)c_dims[c_rank - i - 1];
}
ret_value = 0;
-
done:
- if(c_name!=NULL)
+ if (c_name != NULL)
free(c_name);
- if(c_attrname!=NULL)
+ if (c_attrname != NULL)
free(c_attrname);
-
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5ltpath_valid_c
-*
-* Purpose: Calls h5ltpath_valid
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: M. Scot Breitenfeld
-*
-* Date: February 18, 2012
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
-int_f
-nh5ltpath_valid_c(hid_t_f *loc_id,
- _fcd path,
- size_t_f *pathlen,
- int_f *check_object_valid_c)
-{
- htri_t ret = -1;
- char *c_path = NULL;
+ * Function: h5ltpath_valid_c
+ *
+ * Purpose: Calls h5ltpath_valid
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: M. Scot Breitenfeld
+ *
+ * Date: February 18, 2012
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int_f
+nh5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c)
+{
+ htri_t ret = -1;
+ char * c_path = NULL;
hbool_t check_object_valid;
/*
* convert FORTRAN name to C name
*/
- if( NULL == (c_path = (char *)HD5f2cstring(path, (size_t)*pathlen)))
- goto done;
-
+ if (NULL == (c_path = (char *)HD5f2cstring(path, (size_t)*pathlen)))
+ goto done;
+
check_object_valid = FALSE;
- if(*check_object_valid_c == 1)
- check_object_valid = TRUE;
+ if (*check_object_valid_c == 1)
+ check_object_valid = TRUE;
/*
* call H5LTpath_valid function.
*/
- ret = H5LTpath_valid( (hid_t)*loc_id, c_path, check_object_valid );
+ ret = H5LTpath_valid((hid_t)*loc_id, c_path, check_object_valid);
done:
- if(c_path != NULL)
- free(c_path);
+ if (c_path != NULL)
+ free(c_path);
return (int_f)ret;
}
diff --git a/hl/fortran/src/H5LTff.f90 b/hl/fortran/src/H5LTff.f90
index 849d1b3..f3ce4be 100644
--- a/hl/fortran/src/H5LTff.f90
+++ b/hl/fortran/src/H5LTff.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains FORTRAN90 interfaces for H5LT functions
diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c
index 40ceed2..9fc36ba 100644
--- a/hl/fortran/src/H5TBfc.c
+++ b/hl/fortran/src/H5TBfc.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <math.h>
@@ -20,82 +20,74 @@
#include "H5Eprivate.h"
/*-------------------------------------------------------------------------
-* Function: h5tbmake_table_c
-*
-* Purpose: Call H5TBmake_table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 06, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbmake_table_c
+ *
+ * Purpose: Call H5TBmake_table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 06, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbmake_table_c(size_t_f *namelen1,
- _fcd name1,
- hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- size_t_f *field_offset,
- hid_t_f *field_types,
- hsize_t_f *chunk_size,
- int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
+nh5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, _fcd name,
+ hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset,
+ hid_t_f *field_types, hsize_t_f *chunk_size, int_f *compress,
+ size_t_f *char_len_field_names, /* field_names lenghts */
size_t_f *max_char_size_field_names, /* char len of fields */
- char *field_names) /* field_names */
+ char * field_names) /* field_names */
{
- char *c_name = NULL;
- char *c_name1 = NULL;
+ char * c_name = NULL;
+ char * c_name1 = NULL;
hsize_t num_elem;
hsize_t i;
- hsize_t c_nfields = (hsize_t)*nfields;
+ hsize_t c_nfields = (hsize_t)*nfields;
size_t *c_field_offset = NULL;
- hid_t *c_field_types = NULL;
- char **c_field_names = NULL;
- char *tmp = NULL, *tmp_p;
- int_f ret_value = 0;
+ hid_t * c_field_types = NULL;
+ char ** c_field_names = NULL;
+ char * tmp = NULL, *tmp_p;
+ int_f ret_value = 0;
num_elem = (hsize_t)*nfields;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
+ if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
- if(NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if(NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- for(i = 0; i < num_elem; i++) {
- c_field_offset[i] = (size_t)field_offset[i];
- c_field_types[i] = field_types[i];
+ for (i = 0; i < num_elem; i++) {
+ c_field_offset[i] = (size_t)field_offset[i];
+ c_field_types[i] = field_types[i];
} /* end for */
/*
* allocate array of character pointers
*/
- if(NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *))))
+ if (NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *))))
HGOTO_DONE(FAIL)
/* copy data to long C string */
- if(NULL == (tmp = (char *)HD5f2cstring(field_names, (size_t)*(max_char_size_field_names)*(size_t)num_elem)))
+ if (NULL ==
+ (tmp = (char *)HD5f2cstring(field_names, (size_t) * (max_char_size_field_names) * (size_t)num_elem)))
HGOTO_DONE(FAIL)
/*
* move data from temorary buffer
*/
tmp_p = tmp;
- for(i = 0; i < num_elem; i++) {
- if(NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1)))
+ for (i = 0; i < num_elem; i++) {
+ if (NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1)))
HGOTO_DONE(FAIL)
HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
@@ -106,657 +98,477 @@ nh5tbmake_table_c(size_t_f *namelen1,
/*
* call H5TBmake_table function.
*/
- if(H5TBmake_table(c_name1, (hid_t)*loc_id, c_name, c_nfields, (hsize_t)*nrecords,
- (size_t)*type_size, (const char **)c_field_names, c_field_offset, c_field_types,
- (hsize_t)*chunk_size, NULL, *compress, NULL) < 0)
+ if (H5TBmake_table(c_name1, (hid_t)*loc_id, c_name, c_nfields, (hsize_t)*nrecords, (size_t)*type_size,
+ (const char **)c_field_names, c_field_offset, c_field_types, (hsize_t)*chunk_size,
+ NULL, *compress, NULL) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_name1)
+ if (c_name1)
HDfree(c_name1);
- if(c_field_names) {
- for(i = 0; i < num_elem; i++) {
- if(c_field_names[i])
+ if (c_field_names) {
+ for (i = 0; i < num_elem; i++) {
+ if (c_field_names[i])
HDfree(c_field_names[i]);
} /* end for */
HDfree(c_field_names);
} /* end if */
- if(tmp)
+ if (tmp)
HDfree(tmp);
- if(c_field_offset)
+ if (c_field_offset)
HDfree(c_field_offset);
- if(c_field_types)
+ if (c_field_types)
HDfree(c_field_types);
return ret_value;
} /* end nh5tbmake_table_c() */
/*-------------------------------------------------------------------------
-* Function: h5tbwrite_field_name_c
-*
-* Purpose: Call H5TBwrite_fields_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 12, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbwrite_field_name_c
+ *
+ * Purpose: Call H5TBwrite_fields_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 12, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbwrite_field_name_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- char *c_name = NULL;
- char *c_name1 = NULL;
- size_t c_type_size[1] = {(size_t)*type_size};
- int_f ret_value = 0;
+ char * c_name = NULL;
+ char * c_name1 = NULL;
+ size_t c_type_size[1] = {(size_t)*type_size};
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
+ if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
/*
* call H5TBwrite_fields_name function.
*/
- if(H5TBwrite_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start,
- (hsize_t)*nrecords, c_type_size[0], 0, c_type_size, buf) < 0)
+ if (H5TBwrite_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start, (hsize_t)*nrecords,
+ c_type_size[0], 0, c_type_size, buf) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_name1)
+ if (c_name1)
HDfree(c_name1);
return ret_value;
}
int_f
-nh5tbwrite_field_name_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
+nh5tbwrite_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1,
+ _fcd field_name, hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size,
void *buf)
{
- return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbwrite_field_name_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbwrite_field_name_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbwrite_field_name_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
/*-------------------------------------------------------------------------
-* Function: h5tbread_field_name_c
-*
-* Purpose: Call H5TBread_fields_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 12, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbread_field_name_c
+ *
+ * Purpose: Call H5TBread_fields_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 12, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbread_field_name_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- char *c_name = NULL;
- char *c_name1 = NULL;
- size_t c_type_size[1] = {(size_t)*type_size};
- int_f ret_value = 0;
+ char * c_name = NULL;
+ char * c_name1 = NULL;
+ size_t c_type_size[1] = {(size_t)*type_size};
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
+ if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
/*
* call H5TBread_fields_name function.
*/
- if(H5TBread_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start,
- (hsize_t)*nrecords, c_type_size[0], 0, c_type_size, buf) < 0)
+ if (H5TBread_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start, (hsize_t)*nrecords,
+ c_type_size[0], 0, c_type_size, buf) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_name1)
+ if (c_name1)
HDfree(c_name1);
return ret_value;
}
int_f
-nh5tbread_field_name_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbread_field_name_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbread_field_name_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
int_f
-nh5tbread_field_name_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name,
- start, nrecords, type_size, buf);
+ return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size,
+ buf);
}
/*-------------------------------------------------------------------------
-* Function: h5tbwrite_field_index_c
-*
-* Purpose: Call H5TBwrite_fields_index
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 12, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbwrite_field_index_c
+ *
+ * Purpose: Call H5TBwrite_fields_index
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 12, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbwrite_field_index_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, hsize_t_f *start,
+ hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- char *c_name = NULL;
- size_t c_type_size = *type_size;
- int c_field_index = *field_index - 1; /* C zero based index */
- int_f ret_value = 0;
+ char * c_name = NULL;
+ size_t c_type_size = *type_size;
+ int c_field_index = *field_index - 1; /* C zero based index */
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
-
/*
* call H5TBwrite_fields_name function.
*/
- if(H5TBwrite_fields_index((hid_t)*loc_id, c_name, (hsize_t)1, &c_field_index,
- (hsize_t)*start, (hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
+ if (H5TBwrite_fields_index((hid_t)*loc_id, c_name, (hsize_t)1, &c_field_index, (hsize_t)*start,
+ (hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
int_f
-nh5tbwrite_field_index_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbwrite_field_index_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbwrite_field_index_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbwrite_field_index_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbwrite_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
/*-------------------------------------------------------------------------
-* Function: h5tbread_field_index_c
-*
-* Purpose: Call H5TBread_fields_index
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 12, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbread_field_index_c
+ *
+ * Purpose: Call H5TBread_fields_index
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 12, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbread_field_index_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, hsize_t_f *start,
+ hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- char *c_name = NULL;
- size_t c_type_size = *type_size;
- int c_field_index = *field_index - 1; /* C zero based index */
- int_f ret_value = 0;
+ char * c_name = NULL;
+ size_t c_type_size = *type_size;
+ int c_field_index = *field_index - 1; /* C zero based index */
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
/*
* call H5TBread_fields_index function.
*/
- if(H5TBread_fields_index((hid_t)*loc_id, c_name,(hsize_t)1, &c_field_index,
- (hsize_t)*start, (hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
+ if (H5TBread_fields_index((hid_t)*loc_id, c_name, (hsize_t)1, &c_field_index, (hsize_t)*start,
+ (hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
int_f
-nh5tbread_field_index_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbread_field_index_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbread_field_index_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
int_f
-nh5tbread_field_index_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- int_f *field_index,
- hsize_t_f *start,
- hsize_t_f *nrecords,
- size_t_f *type_size,
- void *buf)
+nh5tbread_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index,
+ hsize_t_f *start, hsize_t_f *nrecords, size_t_f *type_size, void *buf)
{
- return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start,
- nrecords, type_size, buf);
+ return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf);
}
/*-------------------------------------------------------------------------
-* Function: h5tbinsert_field_c
-*
-* Purpose: Call H5TBinsert_field
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 13, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbinsert_field_c
+ *
+ * Purpose: Call H5TBinsert_field
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 13, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbinsert_field_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf)
+nh5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf)
{
- char *c_name = NULL;
- char *c_name1 = NULL;
- int_f ret_value = 0;
+ char *c_name = NULL;
+ char *c_name1 = NULL;
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
+ if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
/*
* call H5TBinsert_field function.
*/
- if(H5TBinsert_field((hid_t)*loc_id, c_name, c_name1, (hid_t)*field_type,
- (hsize_t)*position, NULL, buf) < 0)
+ if (H5TBinsert_field((hid_t)*loc_id, c_name, c_name1, (hid_t)*field_type, (hsize_t)*position, NULL, buf) <
+ 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_name1)
+ if (c_name1)
HDfree(c_name1);
return ret_value;
}
int_f
-nh5tbinsert_field_int_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf)
+nh5tbinsert_field_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf)
{
- return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name,
- field_type, position, buf);
+ return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf);
}
int_f
-nh5tbinsert_field_fl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf)
+nh5tbinsert_field_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf)
{
- return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name,
- field_type, position, buf);
+ return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf);
}
int_f
-nh5tbinsert_field_dl_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf)
+nh5tbinsert_field_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf)
{
- return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name,
- field_type, position, buf);
+ return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf);
}
int_f
-nh5tbinsert_field_st_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name,
- hid_t_f *field_type,
- int_f *position,
- void *buf)
+nh5tbinsert_field_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name,
+ hid_t_f *field_type, int_f *position, void *buf)
{
- return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name,
- field_type, position, buf);
+ return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf);
}
/*-------------------------------------------------------------------------
-* Function: h5tbdelete_field_c
-*
-* Purpose: Call H5TBdelete_field
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 13, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbdelete_field_c
+ *
+ * Purpose: Call H5TBdelete_field
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 13, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbdelete_field_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- size_t_f *namelen1,
- _fcd field_name)
+nh5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, _fcd field_name)
{
- char *c_name = NULL;
- char *c_name1 = NULL;
- int_f ret_value = 0;
+ char *c_name = NULL;
+ char *c_name1 = NULL;
+ int_f ret_value = 0;
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
+ if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
HGOTO_DONE(FAIL)
/*
* call H5TBinsert_field function.
*/
- if(H5TBdelete_field((hid_t)*loc_id, c_name, c_name1) < 0)
+ if (H5TBdelete_field((hid_t)*loc_id, c_name, c_name1) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_name1)
+ if (c_name1)
HDfree(c_name1);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5tbget_table_info_c
-*
-* Purpose: Call H5TBread_fields_index
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 12, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbget_table_info_c
+ *
+ * Purpose: Call H5TBread_fields_index
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 12, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbget_table_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- hsize_t_f *nrecords)
+nh5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, hsize_t_f *nrecords)
{
- char *c_name = NULL;
+ char * c_name = NULL;
hsize_t c_nfields;
hsize_t c_nrecords;
int_f ret_value = 0;
@@ -764,67 +576,61 @@ nh5tbget_table_info_c(hid_t_f *loc_id,
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
-
/*
* call H5TBread_fields_index function.
*/
- if(H5TBget_table_info((hid_t)*loc_id, c_name, &c_nfields, &c_nrecords) < 0)
+ if (H5TBget_table_info((hid_t)*loc_id, c_name, &c_nfields, &c_nrecords) < 0)
HGOTO_DONE(FAIL)
- *nfields = (hsize_t_f) c_nfields;
- *nrecords = (hsize_t_f) c_nrecords;
+ *nfields = (hsize_t_f)c_nfields;
+ *nrecords = (hsize_t_f)c_nrecords;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
/*-------------------------------------------------------------------------
-* Function: h5tbget_field_info_c
-*
-* Purpose: Call H5TBget_field_info
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: October 13, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: h5tbget_field_info_c
+ *
+ * Purpose: Call H5TBget_field_info
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: October 13, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
int_f
-nh5tbget_field_info_c(hid_t_f *loc_id,
- size_t_f *namelen,
- _fcd name,
- hsize_t_f *nfields,
- size_t_f *field_sizes,
- size_t_f *field_offsets,
- size_t_f *type_size,
- size_t_f *namelen2, /* field_names lenghts */
- size_t_f *lenmax, /* character len max */
- _fcd field_names, /* field_names */
+nh5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields,
+ size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size,
+ size_t_f *namelen2, /* field_names lenghts */
+ size_t_f *lenmax, /* character len max */
+ _fcd field_names, /* field_names */
size_t_f *maxlen_out)
{
- char *c_name = NULL;
+ char * c_name = NULL;
hsize_t num_elem;
- hsize_t c_nfields = *nfields;
- size_t *c_field_sizes = NULL;
+ hsize_t c_nfields = *nfields;
+ size_t *c_field_sizes = NULL;
size_t *c_field_offsets = NULL;
size_t c_type_size;
- char **c_field_names = NULL;
- char *tmp = NULL, *tmp_p;
+ char ** c_field_names = NULL;
+ char * tmp = NULL, *tmp_p;
hsize_t i;
int_f ret_value = 0;
- size_t c_lenmax;
- size_t length = 0;
+ size_t c_lenmax;
+ size_t length = 0;
c_lenmax = (size_t)*lenmax;
@@ -833,69 +639,68 @@ nh5tbget_field_info_c(hid_t_f *loc_id,
/*
* convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (c_field_offsets = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_offsets = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if(NULL == (c_field_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
+ if (NULL == (c_field_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields)))
HGOTO_DONE(FAIL)
- if(NULL == (c_field_names = (char **)HDcalloc((size_t)c_nfields, sizeof(char *))))
+ if (NULL == (c_field_names = (char **)HDcalloc((size_t)c_nfields, sizeof(char *))))
HGOTO_DONE(FAIL)
- for(i = 0; i < c_nfields; i++)
- if(NULL == (c_field_names[i] = (char *)HDmalloc(sizeof(char) * HLTB_MAX_FIELD_LEN)))
+ for (i = 0; i < c_nfields; i++)
+ if (NULL == (c_field_names[i] = (char *)HDmalloc(sizeof(char) * HLTB_MAX_FIELD_LEN)))
HGOTO_DONE(FAIL)
/*
* call H5TBget_field_info function.
*/
- if(H5TBget_field_info((hid_t)*loc_id, c_name, c_field_names, c_field_sizes,
- c_field_offsets, &c_type_size) < 0)
+ if (H5TBget_field_info((hid_t)*loc_id, c_name, c_field_names, c_field_sizes, c_field_offsets,
+ &c_type_size) < 0)
HGOTO_DONE(FAIL)
-
+
/* return values */
/* names array */
- if(NULL == (tmp = (char *)HDmalloc((c_lenmax * (size_t)c_nfields) + 1)))
+ if (NULL == (tmp = (char *)HDmalloc((c_lenmax * (size_t)c_nfields) + 1)))
HGOTO_DONE(FAIL)
tmp_p = tmp;
HDmemset(tmp, ' ', c_lenmax * (size_t)c_nfields);
tmp[c_lenmax * c_nfields] = '\0';
- for(i = 0; i < c_nfields; i++) {
- size_t field_name_len = HDstrlen(c_field_names[i]);
+ for (i = 0; i < c_nfields; i++) {
+ size_t field_name_len = HDstrlen(c_field_names[i]);
- HDmemcpy(tmp_p, c_field_names[i], field_name_len);
- namelen2[i] = (size_t_f)field_name_len;
- length = MAX(length, strlen((c_field_names[i])));
- tmp_p = tmp_p + c_lenmax;
+ HDmemcpy(tmp_p, c_field_names[i], field_name_len);
+ namelen2[i] = (size_t_f)field_name_len;
+ length = MAX(length, strlen((c_field_names[i])));
+ tmp_p = tmp_p + c_lenmax;
} /* end for */
- HD5packFstring(tmp, _fcdtocp(field_names), (size_t)( c_lenmax* c_nfields));
+ HD5packFstring(tmp, _fcdtocp(field_names), (size_t)(c_lenmax * c_nfields));
*type_size = (size_t_f)c_type_size;
- for(i = 0; i < num_elem; i++) {
+ for (i = 0; i < num_elem; i++) {
field_sizes[i] = (size_t_f)c_field_sizes[i];
field_offsets[i] = (size_t_f)c_field_offsets[i];
} /* end for */
- *maxlen_out = (size_t_f)length;
+ *maxlen_out = (size_t_f)length;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_field_names) {
- for(i = 0; i < num_elem; i++)
- if(c_field_names[i])
+ if (c_field_names) {
+ for (i = 0; i < num_elem; i++)
+ if (c_field_names[i])
HDfree(c_field_names[i]);
HDfree(c_field_names);
} /* end if */
- if(tmp)
+ if (tmp)
HDfree(tmp);
- if(c_field_offsets)
+ if (c_field_offsets)
HDfree(c_field_offsets);
- if(c_field_sizes)
+ if (c_field_sizes)
HDfree(c_field_sizes);
return ret_value;
}
-
diff --git a/hl/fortran/src/H5TBff.f90 b/hl/fortran/src/H5TBff.f90
index f528731..012db76 100644
--- a/hl/fortran/src/H5TBff.f90
+++ b/hl/fortran/src/H5TBff.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains FORTRAN90 interfaces for H5TB functions
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index 3aef2c9..6d1b842 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -50,6 +50,21 @@ libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \
# HDF5 HL Fortran library depends on HDF5 Library.
libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F)
+# The name of the lib file doesn't follow the same pattern as the other hl lib
+# files, namely libhdf5_hl_*. Add a symlink with the compliant name to the
+# actual lib file.
+install-exec-hook:
+ cd $(DESTDIR)$(libdir) && \
+ if test -f libhdf5hl_fortran.a -a \
+ ! -f libhdf5_hl_fortran.a; then \
+ $(LN_S) libhdf5hl_fortran.a libhdf5_hl_fortran.a; \
+ fi; \
+ if test -f libhdf5hl_fortran.so -a \
+ ! -f libhdf5_hl_fortran.so; then \
+ $(LN_S) libhdf5hl_fortran.so libhdf5_hl_fortran.so; \
+ fi;
+
+
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
# for them explicitly rather than trying to teach automake about them.
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 1d8d3da..c02d331 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -424,11 +424,11 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \
-I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_builddir)/fortran/src \
$(F9XMODFLAG)$(top_builddir)/fortran/src
@@ -444,6 +444,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -462,6 +463,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -489,6 +491,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -496,9 +500,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -514,6 +521,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -535,6 +543,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -547,8 +556,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -562,6 +573,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -603,6 +615,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -691,26 +704,26 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
# Our main target, the high-level fortran library
@@ -732,11 +745,11 @@ libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \
# HDF5 HL Fortran library depends on HDF5 Library.
libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F)
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1171,7 +1184,8 @@ install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
-
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
@@ -1213,7 +1227,7 @@ ps-am:
uninstall-am: uninstall-libLTLIBRARIES uninstall-local
-.MAKE: check-am install-am install-strip
+.MAKE: check-am install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \
check-am clean clean-generic clean-libLTLIBRARIES \
@@ -1222,8 +1236,8 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local
distclean-libtool distclean-local distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
@@ -1247,6 +1261,20 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local
help:
@$(top_srcdir)/bin/makehelp
+# The name of the lib file doesn't follow the same pattern as the other hl lib
+# files, namely libhdf5_hl_*. Add a symlink with the compliant name to the
+# actual lib file.
+install-exec-hook:
+ cd $(DESTDIR)$(libdir) && \
+ if test -f libhdf5hl_fortran.a -a \
+ ! -f libhdf5_hl_fortran.a; then \
+ $(LN_S) libhdf5hl_fortran.a libhdf5_hl_fortran.a; \
+ fi; \
+ if test -f libhdf5hl_fortran.so -a \
+ ! -f libhdf5_hl_fortran.so; then \
+ $(LN_S) libhdf5hl_fortran.so libhdf5_hl_fortran.so; \
+ fi;
+
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
# for them explicitly rather than trying to teach automake about them.
@@ -1278,6 +1306,7 @@ H5DSff.lo: $(srcdir)/H5DSff.f90
H5LTff.lo: $(srcdir)/H5LTff.f90
H5IMff.lo: $(srcdir)/H5IMff.f90
H5TBff.lo: $(srcdir)/H5TBff.f90
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1313,7 +1342,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1474,7 +1503,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 9939fec..efae5e3 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -1,85 +1,51 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+set (H5_TESTS
+ tstds
+ tstlite
+ tstimage
+ tsttable
+)
-#-- Adding test for hl_f90_tstds
-add_executable (hl_f90_tstds tstds.f90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ")
-target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (hl_f90_tstds-shared tstds.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (hl_f90_tstds-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/hl/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+macro (ADD_H5_FORTRAN_EXE file)
+ add_executable (hl_f90_${file} ${file}.f90)
+ target_compile_options(hl_f90_${file}
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-endif ()
-
-#-- Adding test for hl_f90_tstlite
-add_executable (hl_f90_tstlite tstlite.f90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ")
-target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
-target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (hl_f90_tstlite-shared tstlite.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
- target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (hl_f90_tstlite-shared PROPERTIES
+# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+ if(MSVC)
+ set_property(TARGET hl_f90_${file} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ target_include_directories (hl_f90_${file} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_link_libraries (hl_f90_${file} PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
+ set_target_properties (hl_f90_${file} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
-endif ()
-
-#-- Adding test for hl_f90_tstimage
-add_executable (hl_f90_tstimage tstimage.f90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ")
-target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (hl_f90_tstimage-shared tstimage.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (hl_f90_tstimage-shared PROPERTIES
+ )
+ else ()
+ target_include_directories (hl_f90_${file} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_link_libraries (hl_f90_${file} PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
+ set_target_properties (hl_f90_${file} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
-endif ()
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ endif ()
+endmacro ()
-#-- Adding test for hl_f90_tsttable
-add_executable (hl_f90_tsttable tsttable.f90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ")
-target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
-target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_executable (hl_f90_tsttable-shared tsttable.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
- target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
- target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_target_properties (hl_f90_tsttable-shared PROPERTIES
- LINKER_LANGUAGE Fortran
- FOLDER test/hl/fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
-endif ()
+foreach (h5_test ${H5_TESTS})
+ ADD_H5_FORTRAN_EXE(${h5_test})
+endforeach ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index e516187..bceb6ee 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -16,38 +16,7 @@
##############################################################################
##############################################################################
-# Remove any output file left over from previous test run
-add_test (
- NAME HL_FORTRAN_test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- dsetf1.h5
- dsetf2.h5
- dsetf3.h5
- dsetf4.h5
- dsetf5.h5
- f1img.h5
- f1tab.h5
- tstds.h5
-)
-
-add_test (NAME HL_FORTRAN_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
-set_tests_properties (HL_FORTRAN_f90_tstds PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-
-add_test (NAME HL_FORTRAN_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
-set_tests_properties (HL_FORTRAN_f90_tstlite PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-
-add_test (NAME HL_FORTRAN_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
-set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-
-add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
-set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-
-if (BUILD_SHARED_LIBS AND TEST_SHARED_PROGRAMS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_test (
- NAME HL_FORTRAN_test-shared-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
+set (test_hl_fortran_CLEANFILES
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -55,21 +24,39 @@ if (BUILD_SHARED_LIBS AND TEST_SHARED_PROGRAMS AND NOT SKIP_HDF5_FORTRAN_SHARED)
dsetf5.h5
f1img.h5
f1tab.h5
+ f2tab.h5
tstds.h5
- )
- set_tests_properties (HL_FORTRAN_test-shared-clear-objects
- PROPERTIES DEPENDS "HL_FORTRAN_f90_tsttable;HL_FORTRAN_f90_tstimage;HL_FORTRAN_f90_tstlite;HL_FORTRAN_f90_tstds"
- )
-
- add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND $<TARGET_FILE:hl_f90_tstds-shared>)
- set_tests_properties (HL_FORTRAN_f90_tstds-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
-
- add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND $<TARGET_FILE:hl_f90_tstlite-shared>)
- set_tests_properties (HL_FORTRAN_f90_tstlite-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+)
- add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND $<TARGET_FILE:hl_f90_tstimage-shared>)
- set_tests_properties (HL_FORTRAN_f90_tstimage-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_FORTRAN_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${test_hl_fortran_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_test)
+
+macro (ADD_H5_FORTRAN_TEST file)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME HL_FORTRAN_f90_${file} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_f90_${file}>)
+ else ()
+ add_test (NAME HL_FORTRAN_f90_${file} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:hl_f90_${file}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=hl_f90_${file}.txt"
+ #-D "TEST_REFERENCE=hl_f90_${file}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES
+ FIXTURES_REQUIRED clear_HL_FORTRAN_test
+ )
+endmacro ()
- add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $<TARGET_FILE:hl_f90_tsttable-shared>)
- set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
-endif ()
+foreach (h5_test ${H5_TESTS})
+ ADD_H5_FORTRAN_TEST(${h5_test})
+endforeach ()
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index f97a281..f39cc65 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index df99dac..3d1c6ab 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -414,10 +414,10 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_builddir)/src -I$(top_srcdir)/hl/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_builddir)/fortran/src \
-I$(top_builddir)/hl/fortran/src \
@@ -435,6 +435,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -453,6 +454,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -480,6 +482,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -487,9 +491,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -505,6 +512,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -526,6 +534,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -538,8 +547,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -553,6 +564,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -594,6 +606,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -695,11 +708,11 @@ tsttable_SOURCES = tsttable.f90
# from tests in conclude.am)
FORTRAN_API = yes
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1188,6 +1201,7 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1223,7 +1237,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1384,7 +1398,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/fortran/test/tstds.f90 b/hl/fortran/test/tstds.f90
index 2a65821..f0e9e43 100644
--- a/hl/fortran/test/tstds.f90
+++ b/hl/fortran/test/tstds.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! * Copyright by The HDF Group. *
-! * Copyright by the Board of Trustees of the University of Illinois. *
-! * All rights reserved. *
-! * *
-! * This file is part of HDF5. The full HDF5 copyright notice, including *
-! * terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROGRAM test_ds
IMPLICIT NONE
diff --git a/hl/fortran/test/tstimage.f90 b/hl/fortran/test/tstimage.f90
index 151c3e1..c248ca4 100644
--- a/hl/fortran/test/tstimage.f90
+++ b/hl/fortran/test/tstimage.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains the FORTRAN90 tests for H5LT
diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90
index f8dcc26..96b9cd8 100644
--- a/hl/fortran/test/tstlite.f90
+++ b/hl/fortran/test/tstlite.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains the FORTRAN90 tests for H5LT
diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90
index 7365d84..d0987fa 100644
--- a/hl/fortran/test/tsttable.f90
+++ b/hl/fortran/test/tsttable.f90
@@ -1,15 +1,15 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains the FORTRAN90 tests for H5LT
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index d570265..bb10088 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_SRC)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_SRC C)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-set (HL_SRCS
+set (HL_SOURCES
${HDF5_HL_SRC_SOURCE_DIR}/H5DO.c
${HDF5_HL_SRC_SOURCE_DIR}/H5DS.c
${HDF5_HL_SRC_SOURCE_DIR}/H5IM.c
@@ -26,33 +26,59 @@ set (HL_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h
)
-add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+set (HL_PRIVATE_HEADERS
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5DSprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5IMprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5PTprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5HLprivate2.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5LTprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5TBprivate.h
)
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
-set (install_targets ${HDF5_HL_LIB_TARGET})
+
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS})
+ target_include_directories (${HDF5_HL_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
+ set (install_targets ${HDF5_HL_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS})
- TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ")
+ add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS})
+ target_include_directories (${HDF5_HL_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_options(${HDF5_HL_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_HL_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
+ TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL")
- set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES
- FOLDER libraries/hl
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
+ set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}")
set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_SRC_FORMAT ${HDF5_HL_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_SRC_FORMAT ${HDF5_HL_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
@@ -71,7 +97,9 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries)
+ endif ()
install (
TARGETS
@@ -98,13 +126,15 @@ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
set (_PKG_CONFIG_LIBS_PRIVATE)
-set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_LIB_CORENAME}")
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_LIB_CORENAME}")
+endif ()
if (BUILD_SHARED_LIBS)
set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_LIB_CORENAME}")
endif ()
-set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
-set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.pc.in
@@ -117,7 +147,7 @@ install (
COMPONENT hllibraries
)
-if (NOT WIN32)
+if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
diff --git a/hl/src/COPYING b/hl/src/COPYING
index 6497ace..97969da 100644
--- a/hl/src/COPYING
+++ b/hl/src/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
index f17e5d5..75c2f77 100644
--- a/hl/src/H5DO.c
+++ b/hl/src/H5DO.c
@@ -1,20 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* High-level library internal header file */
#include "H5HLprivate2.h"
@@ -22,79 +17,74 @@
/* public LT prototypes */
#include "H5DOpublic.h"
-
-
/*-------------------------------------------------------------------------
- * Function: H5DOwrite_chunk
+ * Function: H5DOwrite_chunk
*
* Purpose: Writes an entire chunk to the file directly.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Raymond Lu
- * 30 July 2012
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset,
- size_t data_size, const void *buf)
+H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, size_t data_size,
+ const void *buf)
{
- hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
- hbool_t do_direct_write = TRUE; /* Flag for direct writes */
- uint32_t data_size_32; /* Chunk data size (limited to 32-bits currently) */
- herr_t ret_value = FAIL; /* Return value */
+ hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
+ hbool_t do_direct_write = TRUE; /* Flag for direct writes */
+ uint32_t data_size_32; /* Chunk data size (limited to 32-bits currently) */
+ herr_t ret_value = FAIL; /* Return value */
/* Check arguments */
- if(dset_id < 0)
+ if (dset_id < 0)
goto done;
- if(!buf)
+ if (!buf)
goto done;
- if(!offset)
+ if (!offset)
goto done;
- if(!data_size)
+ if (!data_size)
goto done;
data_size_32 = (uint32_t)data_size;
- if(data_size != (size_t)data_size_32)
+ if (data_size != (size_t)data_size_32)
goto done;
/* If the user passed in a default DXPL, create one to pass to H5Dwrite() */
- if(H5P_DEFAULT == dxpl_id) {
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if (H5P_DEFAULT == dxpl_id) {
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto done;
created_dxpl = TRUE;
} /* end if */
/* Set direct write parameters */
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0)
goto done;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &filters) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &filters) < 0)
goto done;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &offset) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &offset) < 0)
goto done;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &data_size_32) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &data_size_32) < 0)
goto done;
/* Write chunk */
- if(H5Dwrite(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
+ if (H5Dwrite(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
goto done;
/* Indicate success */
ret_value = SUCCEED;
done:
- if(created_dxpl) {
- if(H5Pclose(dxpl_id) < 0)
+ if (created_dxpl) {
+ if (H5Pclose(dxpl_id) < 0)
ret_value = FAIL;
} /* end if */
else {
/* Reset the direct write flag on user DXPL */
do_direct_write = FALSE;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0)
ret_value = FAIL;
}
- return(ret_value);
+ return (ret_value);
} /* end H5DOwrite_chunk() */
/*-------------------------------------------------------------------------
@@ -104,63 +94,59 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Matthew Strong (GE Healthcare)
- * 14 February 2016
- *
- *------------ -------------------------------------------------------------
+ *---------------------------------------------------------------------------
*/
herr_t
-H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters,
- void *buf)
+H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, void *buf)
{
- hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
- hbool_t do_direct_read = TRUE; /* Flag for direct writes */
- herr_t ret_value = FAIL; /* Return value */
+ hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
+ hbool_t do_direct_read = TRUE; /* Flag for direct writes */
+ herr_t ret_value = FAIL; /* Return value */
/* Check arguments */
- if(dset_id < 0)
+ if (dset_id < 0)
goto done;
- if(!buf)
+ if (!buf)
goto done;
- if(!offset)
+ if (!offset)
goto done;
- if(!filters)
+ if (!filters)
goto done;
/* If the user passed in a default DXPL, create one to pass to H5Dwrite() */
- if(H5P_DEFAULT == dxpl_id) {
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if (H5P_DEFAULT == dxpl_id) {
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto done;
created_dxpl = TRUE;
} /* end if */
/* Set direct write parameters */
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0)
goto done;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &offset) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &offset) < 0)
goto done;
/* Read chunk */
- if(H5Dread(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
+ if (H5Dread(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0)
goto done;
/* Get the filter mask */
- if(H5Pget(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, filters) < 0)
+ if (H5Pget(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, filters) < 0)
goto done;
/* Indicate success */
ret_value = SUCCEED;
done:
- if(created_dxpl) {
- if(H5Pclose(dxpl_id) < 0)
+ if (created_dxpl) {
+ if (H5Pclose(dxpl_id) < 0)
ret_value = FAIL;
} /* end if */
else {
/* Reset the direct read flag on user DXPL */
do_direct_read = FALSE;
- if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0)
+ if (H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0)
ret_value = FAIL;
}
- return(ret_value);
+ return (ret_value);
} /* end H5DOread_chunk() */
diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h
index 413bc0c..8bb4547 100644
--- a/hl/src/H5DOpublic.h
+++ b/hl/src/H5DOpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,12 +25,8 @@ extern "C" {
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id,
- hid_t dxpl_id,
- uint32_t filters,
- const hsize_t *offset,
- size_t data_size,
- const void *buf);
+H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset,
+ size_t data_size, const void *buf);
/*-------------------------------------------------------------------------
*
@@ -39,15 +35,14 @@ H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5DOread_chunk(hid_t dset_id, /*in*/
- hid_t dxpl_id, /*in*/
- const hsize_t *offset, /*in*/
- uint32_t *filters, /*out*/
- void *buf); /*out*/
+H5_HLDLL herr_t H5DOread_chunk(hid_t dset_id, /*in*/
+ hid_t dxpl_id, /*in*/
+ const hsize_t *offset, /*in*/
+ uint32_t * filters, /*out*/
+ void * buf); /*out*/
#ifdef __cplusplus
}
#endif
#endif
-
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 0778d3d..7ade5d9 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <assert.h>
#include <stdlib.h>
@@ -19,156 +19,151 @@
#include "H5IMprivate.h"
#include "H5TBprivate.h"
-
/* Local routines */
static herr_t H5DS_is_reserved(hid_t did);
-static hid_t H5DS_get_REFLIST_type(void);
+static hid_t H5DS_get_REFLIST_type(void);
/*-------------------------------------------------------------------------
-* Function: H5DSset_scale
-*
-* Purpose: The dataset DSID is converted to a Dimension Scale dataset.
-* Creates the CLASS attribute, set to the value "DIMENSION_SCALE"
-* and an empty REFERENCE_LIST attribute.
-* If DIMNAME is specified, then an attribute called NAME is created,
-* with the value DIMNAME.
-*
-* Return: Success: SUCCEED, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSset_scale(hid_t dsid,
- const char *dimname)
+ * Function: H5DSset_scale
+ *
+ * Purpose: The dataset DSID is converted to a Dimension Scale dataset.
+ * Creates the CLASS attribute, set to the value "DIMENSION_SCALE"
+ * and an empty REFERENCE_LIST attribute.
+ * If DIMNAME is specified, then an attribute called NAME is created,
+ * with the value DIMNAME.
+ *
+ * Return: Success: SUCCEED, Failure: FAIL
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 04, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5DSset_scale(hid_t dsid, const char *dimname)
{
- int has_dimlist;
+ int has_dimlist;
H5I_type_t it;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it)
+ if (H5I_DATASET != it)
return FAIL;
/*-------------------------------------------------------------------------
- * check if the dataset is a dataset wich has references to dimension scales
- *-------------------------------------------------------------------------
- */
+ * check if the dataset is a dataset wich has references to dimension scales
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "DIMENSION_LIST" */
- if ((has_dimlist = H5LT_find_attribute(dsid,DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(dsid, DIMENSION_LIST)) < 0)
return FAIL;
if (has_dimlist == 1)
return FAIL;
/*-------------------------------------------------------------------------
- * write the standard attributes for a Dimension Scale dataset
- *-------------------------------------------------------------------------
- */
+ * write the standard attributes for a Dimension Scale dataset
+ *-------------------------------------------------------------------------
+ */
- if (H5LT_set_attribute_string(dsid,"CLASS",DIMENSION_SCALE_CLASS) < 0)
+ if (H5LT_set_attribute_string(dsid, "CLASS", DIMENSION_SCALE_CLASS) < 0)
return FAIL;
- if (dimname!=NULL)
- {
- if (H5LT_set_attribute_string(dsid,"NAME",dimname) < 0)
+ if (dimname != NULL) {
+ if (H5LT_set_attribute_string(dsid, "NAME", dimname) < 0)
return FAIL;
}
return SUCCEED;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5DSattach_scale
-*
-* Purpose: Define Dimension Scale DSID to be associated with dimension IDX
-* of Dataset DID. Entries are created in the DIMENSION_LIST and
-* REFERENCE_LIST attributes.
-*
-* Return:
-* Success: SUCCEED
-* Failure: FAIL
-*
-* Fails if: Bad arguments
-* If DSID is not a Dimension Scale
-* If DID is a Dimension Scale (A Dimension Scale cannot have scales)
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: December 20, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSattach_scale(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSattach_scale
+ *
+ * Purpose: Define Dimension Scale DSID to be associated with dimension IDX
+ * of Dataset DID. Entries are created in the DIMENSION_LIST and
+ * REFERENCE_LIST attributes.
+ *
+ * Return:
+ * Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Fails if: Bad arguments
+ * If DSID is not a Dimension Scale
+ * If DID is a Dimension Scale (A Dimension Scale cannot have scales)
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: December 20, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
int is_ds;
hssize_t nelmts;
hid_t sid; /* space ID */
- hid_t tid = -1; /* attribute type ID */
+ hid_t tid = -1; /* attribute type ID */
hid_t ntid = -1; /* attribute native type ID */
- hid_t aid = -1; /* attribute ID */
+ hid_t aid = -1; /* attribute ID */
int rank; /* rank of dataset */
hsize_t dims[1]; /* dimension of the "REFERENCE_LIST" array */
ds_list_t dsl; /* attribute data in the DS pointing to the dataset */
- ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
+ ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
hobj_ref_t ref_to_ds; /* reference to the DS */
hobj_ref_t ref_j; /* iterator reference */
- hvl_t *buf = NULL; /* VL buffer to store in the attribute */
+ hvl_t * buf = NULL; /* VL buffer to store in the attribute */
hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */
H5O_info_t oi1, oi2;
H5I_type_t it1, it2;
int i;
- size_t len;
- int found_ds=0;
+ size_t len;
+ int found_ds = 0;
htri_t is_scale;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
if ((is_scale = H5DSis_scale(did)) < 0)
return FAIL;
/* the dataset cannot be a DS dataset */
- if ( is_scale == 1)
+ if (is_scale == 1)
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &oi1) < 0)
+ if (H5Oget_info(did, &oi1) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &oi2) < 0)
+ if (H5Oget_info(dsid, &oi2) < 0)
return FAIL;
/* same object, not valid */
- if(oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
+ if (oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
return FAIL;
/* get ID type */
@@ -177,51 +172,50 @@ herr_t H5DSattach_scale(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/* the DS dataset cannot have dimension scales */
- if (H5LT_find_attribute(dsid,DIMENSION_LIST)==1)
+ if (H5LT_find_attribute(dsid, DIMENSION_LIST) == 1)
return FAIL;
/* check if the dataset is a "reserved" dataset (image, table) */
- if (H5DS_is_reserved(did)==1)
+ if (H5DS_is_reserved(did) == 1)
return FAIL;
-
/*-------------------------------------------------------------------------
- * The dataset may or may not have the associated DS attribute
- * First we try to open to see if it is already there; if not, it is created.
- * If it exists, the array of references is extended to hold the reference
- * to the new DS
- *-------------------------------------------------------------------------
- */
+ * The dataset may or may not have the associated DS attribute
+ * First we try to open to see if it is already there; if not, it is created.
+ * If it exists, the array of references is extended to hold the reference
+ * to the new DS
+ *-------------------------------------------------------------------------
+ */
/* get dataset space */
if ((sid = H5Dget_space(did)) < 0)
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* scalar rank */
- if (rank==0)
- rank=1;
+ if (rank == 0)
+ rank = 1;
/* close dataset space */
if (H5Sclose(sid) < 0)
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank - 1)
return FAIL;
/*-------------------------------------------------------------------------
- * two references are created: one to the DS, saved in "DIMENSION_LIST"
- * and one to the dataset, saved in "REFERENCE_LIST"
- *-------------------------------------------------------------------------
- */
+ * two references are created: one to the DS, saved in "DIMENSION_LIST"
+ * and one to the dataset, saved in "REFERENCE_LIST"
+ *-------------------------------------------------------------------------
+ */
/* create a reference for the >>DS<< dataset */
if (H5Rcreate(&ref_to_ds, dsid, ".", H5R_OBJECT, (hid_t)-1) < 0)
return FAIL;
@@ -231,57 +225,56 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did,DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
- * it does not exist. we create the attribute and its reference data
- *-------------------------------------------------------------------------
- */
- if (has_dimlist == 0)
- {
+ * it does not exist. we create the attribute and its reference data
+ *-------------------------------------------------------------------------
+ */
+ if (has_dimlist == 0) {
- dims[0] = (hsize_t)rank;
+ dims[0] = (hsize_t)rank;
/* space for the attribute */
- if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
return FAIL;
/* create the type for the attribute "DIMENSION_LIST" */
- if((tid = H5Tvlen_create(H5T_STD_REF_OBJ)) < 0)
+ if ((tid = H5Tvlen_create(H5T_STD_REF_OBJ)) < 0)
goto out;
/* create the attribute */
- if((aid = H5Acreate2(did, DIMENSION_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(did, DIMENSION_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* allocate and initialize the VL */
buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ if (buf == NULL)
goto out;
- for(i = 0; i < rank; i++) {
+ for (i = 0; i < rank; i++) {
buf[i].len = 0;
- buf[i].p = NULL;
+ buf[i].p = NULL;
}
/* store the REF information in the index of the dataset that has the DS */
- buf[idx].len = 1;
- buf[idx].p = HDmalloc( 1 * sizeof(hobj_ref_t));
+ buf[idx].len = 1;
+ buf[idx].p = HDmalloc(1 * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
/* write the attribute with the reference */
- if(H5Awrite(aid, tid, buf) < 0)
+ if (H5Awrite(aid, tid, buf) < 0)
goto out;
/* close */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
HDfree(buf);
@@ -289,212 +282,211 @@ herr_t H5DSattach_scale(hid_t did,
}
/*-------------------------------------------------------------------------
- * the attribute already exists, open it, extend the buffer,
- * and insert the new reference
- *-------------------------------------------------------------------------
- */
- else if(has_dimlist == 1)
- {
- if((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
+ * the attribute already exists, open it, extend the buffer,
+ * and insert the new reference
+ *-------------------------------------------------------------------------
+ */
+ else if (has_dimlist == 1) {
+ if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* allocate and initialize the VL */
buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ if (buf == NULL)
goto out;
/* read */
- if(H5Aread(aid, tid, buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* check to avoid inserting duplicates. it is not FAIL, just do nothing */
/* iterate all the REFs in this dimension IDX */
- for(i = 0; i < (int)buf[idx].len; i++) {
+ for (i = 0; i < (int)buf[idx].len; i++) {
/* get the reference */
ref_j = ((hobj_ref_t *)buf[idx].p)[i];
/* get the scale id for this REF */
- if((dsid_j = H5Rdereference(did,H5R_OBJECT,&ref_j)) < 0)
+ if ((dsid_j = H5Rdereference(did, H5R_OBJECT, &ref_j)) < 0)
goto out;
/* get info for DS in the parameter list */
- if(H5Oget_info(dsid, &oi1) < 0)
+ if (H5Oget_info(dsid, &oi1) < 0)
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &oi2) < 0)
+ if (H5Oget_info(dsid_j, &oi2) < 0)
goto out;
/* same object, so this DS scale is already in this DIM IDX */
- if(oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
+ if (oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
found_ds = 1;
/* close the dereferenced dataset */
- if(H5Dclose(dsid_j) < 0)
+ if (H5Dclose(dsid_j) < 0)
goto out;
} /* end for */
- if(found_ds == 0) {
+ if (found_ds == 0) {
/* we are adding one more DS to this dimension */
- if(buf[idx].len > 0) {
+ if (buf[idx].len > 0) {
buf[idx].len++;
- len = buf[idx].len;
- buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(hobj_ref_t));
+ len = buf[idx].len;
+ buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[len - 1] = ref_to_ds;
} /* end if */
else {
/* store the REF information in the index of the dataset that has the DS */
- buf[idx].len = 1;
- buf[idx].p = HDmalloc(sizeof(hobj_ref_t));
+ buf[idx].len = 1;
+ buf[idx].p = HDmalloc(sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
} /* end else */
- } /* end if */
+ } /* end if */
/* write the attribute with the new references */
- if(H5Awrite(aid, tid, buf) < 0)
+ if (H5Awrite(aid, tid, buf) < 0)
goto out;
/* close */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
HDfree(buf);
buf = NULL;
} /* has_dimlist */
/*-------------------------------------------------------------------------
- * save DS info on the >>DS<< dataset
- *-------------------------------------------------------------------------
- */
+ * save DS info on the >>DS<< dataset
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * it does not exist. we create the attribute and its reference data
- *-------------------------------------------------------------------------
- */
- if(has_reflist == 0) {
+ * it does not exist. we create the attribute and its reference data
+ *-------------------------------------------------------------------------
+ */
+ if (has_reflist == 0) {
dims[0] = 1;
/* space for the attribute */
- if((sid = H5Screate_simple(1,dims,NULL)) < 0)
+ if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
/* create the compound datatype for the attribute "REFERENCE_LIST" */
- if((tid = H5Tcreate(H5T_COMPOUND, sizeof(ds_list_t))) < 0)
+ if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(ds_list_t))) < 0)
goto out;
/* insert reference field */
- if(H5Tinsert(tid, "dataset", HOFFSET(ds_list_t,ref), H5T_STD_REF_OBJ) < 0)
+ if (H5Tinsert(tid, "dataset", HOFFSET(ds_list_t, ref), H5T_STD_REF_OBJ) < 0)
goto out;
/* insert dimension idx of the dataset field */
- if(H5Tinsert(tid, "dimension", HOFFSET(ds_list_t, dim_idx), H5T_NATIVE_INT) < 0)
+ if (H5Tinsert(tid, "dimension", HOFFSET(ds_list_t, dim_idx), H5T_NATIVE_INT) < 0)
goto out;
/* create the attribute */
- if((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* store the IDX information */
dsl.dim_idx = idx;
/* write the attribute with the reference */
- if(H5Awrite(aid, tid, &dsl) < 0)
+ if (H5Awrite(aid, tid, &dsl) < 0)
goto out;
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
} /* end if */
/*-------------------------------------------------------------------------
- * the "REFERENCE_LIST" array already exists, open it and extend it
- *-------------------------------------------------------------------------
- */
- else if(has_reflist == 1) {
- if((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
+ * the "REFERENCE_LIST" array already exists, open it and extend it
+ *-------------------------------------------------------------------------
+ */
+ else if (has_reflist == 1) {
+ if ((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* get native type to read attribute REFERENCE_LIST */
- if((ntid = H5DS_get_REFLIST_type()) < 0)
+ if ((ntid = H5DS_get_REFLIST_type()) < 0)
goto out;
/* get and save the old reference(s) */
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
- if((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
+ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
goto out;
nelmts++;
- dsbuf = (ds_list_t*) HDmalloc((size_t)nelmts * sizeof(ds_list_t));
- if(dsbuf == NULL)
+ dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ if (dsbuf == NULL)
goto out;
- if(H5Aread(aid, ntid, dsbuf) < 0)
+ if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a new attribute
- *-------------------------------------------------------------------------
- */
+ * create a new attribute
+ *-------------------------------------------------------------------------
+ */
/* the attribute must be deleted, in order to the new one can reflect the changes*/
- if(H5Adelete(dsid, REFERENCE_LIST) < 0)
+ if (H5Adelete(dsid, REFERENCE_LIST) < 0)
goto out;
/* store the IDX information (index of the dataset that has the DS) */
- dsl.dim_idx = idx;
+ dsl.dim_idx = idx;
dsbuf[nelmts - 1] = dsl;
/* create a new data space for the new references array */
dims[0] = (hsize_t)nelmts;
- if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
/* create the attribute again with the changes of space */
- if((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* write the attribute with the new references */
- if(H5Awrite(aid, ntid, dsbuf) < 0)
+ if (H5Awrite(aid, ntid, dsbuf) < 0)
goto out;
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
if (H5Tclose(ntid) < 0)
goto out;
@@ -504,15 +496,15 @@ herr_t H5DSattach_scale(hid_t did,
} /* has_reflist */
/*-------------------------------------------------------------------------
- * write the standard attributes for a Dimension Scale dataset
- *-------------------------------------------------------------------------
- */
+ * write the standard attributes for a Dimension Scale dataset
+ *-------------------------------------------------------------------------
+ */
- if((is_ds=H5DSis_scale(dsid)) < 0)
+ if ((is_ds = H5DSis_scale(dsid)) < 0)
return FAIL;
- if(is_ds == 0) {
- if (H5LT_set_attribute_string(dsid,"CLASS",DIMENSION_SCALE_CLASS) < 0)
+ if (is_ds == 0) {
+ if (H5LT_set_attribute_string(dsid, "CLASS", DIMENSION_SCALE_CLASS) < 0)
return FAIL;
}
@@ -520,54 +512,55 @@ herr_t H5DSattach_scale(hid_t did,
/* error zone */
out:
- if(buf)
+ if (buf)
HDfree(buf);
- if(dsbuf)
+ if (dsbuf)
HDfree(dsbuf);
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(ntid);
H5Tclose(tid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DSdetach_scale
-*
-* Purpose: If possible, deletes association of Dimension Scale DSID with
-* dimension IDX of Dataset DID. This deletes the entries in the
-* DIMENSION_LIST and REFERENCE_LIST attributes.
-*
-* Return:
-* Success: SUCCEED
-* Failure: FAIL
-*
-* Fails if: Bad arguments
-* The dataset DID or DSID do not exist.
-* The DSID is not a Dimension Scale
-* DSID is not attached to DID.
-* Note that a scale may be associated with more than dimension of the same dataset.
-* If so, the detach operation only deletes one of the associations, for DID.
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: December 20, 2004
-*
-* Comments:
-*
-* Modifications: Function didn't delete DIMENSION_LIST attribute, when
-* all dimension scales were detached from a dataset; added.
-* 2010/05/13 EIP
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSdetach_scale(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSdetach_scale
+ *
+ * Purpose: If possible, deletes association of Dimension Scale DSID with
+ * dimension IDX of Dataset DID. This deletes the entries in the
+ * DIMENSION_LIST and REFERENCE_LIST attributes.
+ *
+ * Return:
+ * Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Fails if: Bad arguments
+ * The dataset DID or DSID do not exist.
+ * The DSID is not a Dimension Scale
+ * DSID is not attached to DID.
+ * Note that a scale may be associated with more than dimension of the same dataset.
+ * If so, the detach operation only deletes one of the associations, for DID.
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: December 20, 2004
+ *
+ * Comments:
+ *
+ * Modifications: Function didn't delete DIMENSION_LIST attribute, when
+ * all dimension scales were detached from a dataset; added.
+ * 2010/05/13 EIP
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
@@ -575,14 +568,14 @@ herr_t H5DSdetach_scale(hid_t did,
hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */
hid_t did_i; /* dataset ID in REFERENCE_LIST */
hid_t sid; /* space ID */
- hid_t tid = -1; /* attribute type ID */
+ hid_t tid = -1; /* attribute type ID */
hid_t ntid = -1; /* attribute native type ID */
- hid_t aid = -1; /* attribute ID */
+ hid_t aid = -1; /* attribute ID */
int rank; /* rank of dataset */
- ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
+ ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
hsize_t dims[1]; /* dimension of the "REFERENCE_LIST" array */
hobj_ref_t ref; /* reference to the DS */
- hvl_t *buf = NULL; /* VL buffer to store in the attribute */
+ hvl_t * buf = NULL; /* VL buffer to store in the attribute */
int i;
size_t j;
hssize_t ii;
@@ -592,41 +585,40 @@ herr_t H5DSdetach_scale(hid_t did,
htri_t is_scale;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* check for valid types of identifiers */
- if(H5I_DATASET!=H5Iget_type(did) || H5I_DATASET!=H5Iget_type(dsid))
+ if (H5I_DATASET != H5Iget_type(did) || H5I_DATASET != H5Iget_type(dsid))
return FAIL;
- if((is_scale = H5DSis_scale(did)) < 0)
+ if ((is_scale = H5DSis_scale(did)) < 0)
return FAIL;
/* the dataset cannot be a DS dataset */
- if( is_scale == 1)
+ if (is_scale == 1)
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &did_oi) < 0)
+ if (H5Oget_info(did, &did_oi) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &dsid_oi) < 0)
+ if (H5Oget_info(dsid, &dsid_oi) < 0)
return FAIL;
/* same object, not valid */
- if(did_oi.fileno == dsid_oi.fileno && did_oi.addr == dsid_oi.addr)
+ if (did_oi.fileno == dsid_oi.fileno && did_oi.addr == dsid_oi.addr)
return FAIL;
-
/*-------------------------------------------------------------------------
- * Find "DIMENSION_LIST"
- *-------------------------------------------------------------------------
- */
+ * Find "DIMENSION_LIST"
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did,DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
if (has_dimlist == 0)
@@ -637,7 +629,7 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
@@ -645,58 +637,56 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank - 1)
return FAIL;
/*-------------------------------------------------------------------------
- * find "REFERENCE_LIST"
- *-------------------------------------------------------------------------
- */
+ * find "REFERENCE_LIST"
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
return FAIL;
- if(has_reflist == 0)
+ if (has_reflist == 0)
return FAIL;
/*-------------------------------------------------------------------------
- * open "DIMENSION_LIST", and delete the reference
- *-------------------------------------------------------------------------
- */
+ * open "DIMENSION_LIST", and delete the reference
+ *-------------------------------------------------------------------------
+ */
- if((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
return FAIL;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* allocate and initialize the VL */
buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ if (buf == NULL)
goto out;
/* read */
- if(H5Aread(aid, tid, buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* reset */
- if ( buf[idx].len > 0 )
- {
- for (j=0; j<buf[idx].len; j++)
- {
+ if (buf[idx].len > 0) {
+ for (j = 0; j < buf[idx].len; j++) {
/* get the reference */
ref = ((hobj_ref_t *)buf[idx].p)[j];
/* get the DS id */
- if ((dsid_j = H5Rdereference(did,H5R_OBJECT,&ref)) < 0)
+ if ((dsid_j = H5Rdereference(did, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &tmp_oi) < 0)
+ if (H5Oget_info(dsid_j, &tmp_oi) < 0)
goto out;
/* Close the dereferenced dataset */
@@ -704,125 +694,123 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/* same object, reset */
- if(dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr)
- {
- /* If there are more than one reference in the VL element
+ if (dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr) {
+ /* If there are more than one reference in the VL element
and the reference we found is not the last one,
copy the last one to replace the found one since the order
- of the references doesn't matter according to the spec;
- reduce the size of the VL element by 1;
- if the length of the element becomes 0, free the pointer
+ of the references doesn't matter according to the spec;
+ reduce the size of the VL element by 1;
+ if the length of the element becomes 0, free the pointer
and reset to NULL */
size_t len = buf[idx].len;
- if(j < len - 1)
- ((hobj_ref_t *)buf[idx].p)[j] = ((hobj_ref_t *)buf[idx].p)[len-1];
+ if (j < len - 1)
+ ((hobj_ref_t *)buf[idx].p)[j] = ((hobj_ref_t *)buf[idx].p)[len - 1];
len = --buf[idx].len;
- if(len == 0) {
- HDfree(buf[idx].p);
+ if (len == 0) {
+ HDfree(buf[idx].p);
buf[idx].p = NULL;
}
- /* Since a reference to a dim. scale can be inserted only once,
+ /* Since a reference to a dim. scale can be inserted only once,
we do not need to continue the search if it is found */
found_ds = 1;
break;
}
} /* j */
- } /* if */
+ } /* if */
/* the scale must be present to continue */
- if(found_ds == 0)
+ if (found_ds == 0)
goto out;
/* Write the attribute, but check first, if we have any scales left,
- because if not, we should delete the attribute according to the spec */
- for(i = 0; i < rank; i++) {
- if(buf[i].len > 0) {
+ because if not, we should delete the attribute according to the spec */
+ for (i = 0; i < rank; i++) {
+ if (buf[i].len > 0) {
have_ds = 1;
- break;
+ break;
}
}
- if(have_ds) {
- if(H5Awrite(aid, tid, buf) < 0)
- goto out;
+ if (have_ds) {
+ if (H5Awrite(aid, tid, buf) < 0)
+ goto out;
}
else {
- if(H5Adelete(did, DIMENSION_LIST) < 0)
+ if (H5Adelete(did, DIMENSION_LIST) < 0)
goto out;
}
/* close */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
HDfree(buf);
buf = NULL;
-
/*-------------------------------------------------------------------------
- * the "REFERENCE_LIST" array exists, update
- *-------------------------------------------------------------------------
- */
+ * the "REFERENCE_LIST" array exists, update
+ *-------------------------------------------------------------------------
+ */
- if((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* get native type to read attribute REFERENCE_LIST */
- if((ntid = H5DS_get_REFLIST_type()) < 0)
+ if ((ntid = H5DS_get_REFLIST_type()) < 0)
goto out;
/* get and save the old reference(s) */
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
- if((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
+ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
goto out;
- dsbuf = (ds_list_t*) HDmalloc((size_t)nelmts * sizeof(ds_list_t));
- if(dsbuf == NULL)
+ dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ if (dsbuf == NULL)
goto out;
- if(H5Aread(aid, ntid, dsbuf) < 0)
+ if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
- for(ii=0; ii<nelmts; ii++) {
+ for (ii = 0; ii < nelmts; ii++) {
/* First check if we have the same dimension index */
- if(idx == dsbuf[ii].dim_idx) {
+ if (idx == dsbuf[ii].dim_idx) {
/* get the reference to the dataset */
ref = dsbuf[ii].ref;
/* get the dataset id */
- if ((did_i = H5Rdereference(did,H5R_OBJECT,&ref)) < 0)
+ if ((did_i = H5Rdereference(did, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for this dataset */
- if(H5Oget_info(did_i, &tmp_oi) < 0)
+ if (H5Oget_info(did_i, &tmp_oi) < 0)
goto out;
/* close the dereferenced dataset */
- if(H5Dclose(did_i) < 0)
+ if (H5Dclose(did_i) < 0)
goto out;
/* same object, reset. we want to detach only for this DIM */
- if(did_oi.fileno == tmp_oi.fileno && did_oi.addr == tmp_oi.addr) {
+ if (did_oi.fileno == tmp_oi.fileno && did_oi.addr == tmp_oi.addr) {
/* copy the last one to replace the one which is found */
- dsbuf[ii] = dsbuf[nelmts-1];
+ dsbuf[ii] = dsbuf[nelmts - 1];
nelmts--;
- found_dset=1;
+ found_dset = 1;
break;
} /* if */
- } /* if we have the same dimension index */
- } /* ii */
+ } /* if we have the same dimension index */
+ } /* ii */
/* close space and attribute */
if (H5Sclose(sid) < 0)
@@ -831,44 +819,43 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/*-------------------------------------------------------------------------
- * check if we found the pointed dataset
- *-------------------------------------------------------------------------
- */
+ * check if we found the pointed dataset
+ *-------------------------------------------------------------------------
+ */
/* the pointed dataset must exist */
if (found_dset == 0)
goto out;
/*-------------------------------------------------------------------------
- * create a new attribute
- *-------------------------------------------------------------------------
- */
+ * create a new attribute
+ *-------------------------------------------------------------------------
+ */
/* the attribute must be deleted, in order to the new one can reflect the changes*/
if (H5Adelete(dsid, REFERENCE_LIST) < 0)
goto out;
/* don't do anything for an empty array */
- if(nelmts)
- {
+ if (nelmts) {
/* create a new data space for the new references array */
- dims[0] = (hsize_t)nelmts;
+ dims[0] = (hsize_t)nelmts;
- if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
/* create the attribute again with the changes of space */
- if((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(dsid, REFERENCE_LIST, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* write the new attribute with the new references */
- if(H5Awrite(aid, ntid, dsbuf) < 0)
+ if (H5Awrite(aid, ntid, dsbuf) < 0)
goto out;
/* close space and attribute */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
} /* nelmts */
@@ -885,103 +872,103 @@ herr_t H5DSdetach_scale(hid_t did,
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(ntid);
H5Tclose(tid);
- if(dsbuf) {
+ if (dsbuf) {
HDfree(dsbuf);
dsbuf = NULL;
}
- if(buf) {
+ if (buf) {
/* Failure occured before H5Dvlen_reclaim was called;
free the pointers allocated when we read data in */
- for(i = 0; i < rank; i++) {
- if(buf[i].p)
+ for (i = 0; i < rank; i++) {
+ if (buf[i].p)
HDfree(buf[i].p);
}
HDfree(buf);
buf = NULL;
}
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
-
}
/*-------------------------------------------------------------------------
-* Function: H5DSis_attached
-*
-* Purpose: Report if dimension scale DSID is currently attached to
-* dimension IDX of dataset DID by checking if DID has a pointer in the REFERENCE_LIST
-* attribute and DSID (scale ) has a pointer in the DIMENSION_LIST attribute
-*
-* Return:
-* 1: both the DS and the dataset pointers match
-* 0: one of them or both do not match
-* FAIL (-1): error
-*
-* Fails if: Bad arguments
-* If DSID is not a Dimension Scale
-* If DID is a Dimension Scale (A Dimension Scale cannot have scales)
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: February 18, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-htri_t H5DSis_attached(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSis_attached
+ *
+ * Purpose: Report if dimension scale DSID is currently attached to
+ * dimension IDX of dataset DID by checking if DID has a pointer in the REFERENCE_LIST
+ * attribute and DSID (scale ) has a pointer in the DIMENSION_LIST attribute
+ *
+ * Return:
+ * 1: both the DS and the dataset pointers match
+ * 0: one of them or both do not match
+ * FAIL (-1): error
+ *
+ * Fails if: Bad arguments
+ * If DSID is not a Dimension Scale
+ * If DID is a Dimension Scale (A Dimension Scale cannot have scales)
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: February 18, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+htri_t
+H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
hssize_t nelmts;
hid_t sid; /* space ID */
- hid_t tid = -1; /* attribute type ID */
+ hid_t tid = -1; /* attribute type ID */
hid_t ntid = -1; /* attribute native type ID */
- hid_t aid = -1; /* attribute ID */
+ hid_t aid = -1; /* attribute ID */
int rank; /* rank of dataset */
- ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
+ ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */
hobj_ref_t ref; /* reference to the DS */
- hvl_t *buf = NULL; /* VL buffer to store in the attribute */
+ hvl_t * buf = NULL; /* VL buffer to store in the attribute */
hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */
hid_t did_i; /* dataset ID in REFERENCE_LIST */
H5O_info_t oi1, oi2, oi3, oi4;
H5I_type_t it1, it2;
int i;
- int found_dset=0, found_ds=0;
+ int found_dset = 0, found_ds = 0;
htri_t is_scale;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
if ((is_scale = H5DSis_scale(did)) < 0)
return FAIL;
/* the dataset cannot be a DS dataset */
- if ( is_scale == 1)
+ if (is_scale == 1)
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &oi1) < 0)
+ if (H5Oget_info(did, &oi1) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &oi2) < 0)
+ if (H5Oget_info(dsid, &oi2) < 0)
return FAIL;
/* same object, not valid */
- if(oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
+ if (oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
return FAIL;
/* get ID type */
@@ -990,20 +977,20 @@ htri_t H5DSis_attached(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/*-------------------------------------------------------------------------
- * get space
- *-------------------------------------------------------------------------
- */
+ * get space
+ *-------------------------------------------------------------------------
+ */
/* get dataset space */
if ((sid = H5Dget_space(did)) < 0)
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
@@ -1011,69 +998,65 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* parameter range checking */
- if(idx > ((unsigned)rank - 1))
+ if (idx > ((unsigned)rank - 1))
return FAIL;
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
- * open "DIMENSION_LIST"
- *-------------------------------------------------------------------------
- */
+ * open "DIMENSION_LIST"
+ *-------------------------------------------------------------------------
+ */
- if(has_dimlist == 1)
- {
- if((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
+ if (has_dimlist == 1) {
+ if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t*)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ if (buf == NULL)
goto out;
/* read */
- if (H5Aread(aid,tid,buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* iterate all the REFs in this dimension IDX */
- for (i=0; i<(int)buf[idx].len; i++)
- {
+ for (i = 0; i < (int)buf[idx].len; i++) {
/* get the reference */
ref = ((hobj_ref_t *)buf[idx].p)[i];
/* get the scale id for this REF */
- if ((dsid_j = H5Rdereference(did,H5R_OBJECT,&ref)) < 0)
+ if ((dsid_j = H5Rdereference(did, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for DS in the parameter list */
- if(H5Oget_info(dsid, &oi1) < 0)
+ if (H5Oget_info(dsid, &oi1) < 0)
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &oi2) < 0)
+ if (H5Oget_info(dsid_j, &oi2) < 0)
goto out;
/* same object */
- if(oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
+ if (oi1.fileno == oi2.fileno && oi1.addr == oi2.addr)
found_ds = 1;
/* close the dereferenced dataset */
if (H5Dclose(dsid_j) < 0)
goto out;
-
}
-
/* close */
- if (H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
if (H5Sclose(sid) < 0)
goto out;
@@ -1086,81 +1069,77 @@ htri_t H5DSis_attached(hid_t did,
} /* has_dimlist */
/*-------------------------------------------------------------------------
- * info on the >>DS<< dataset
- *-------------------------------------------------------------------------
- */
+ * info on the >>DS<< dataset
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "REFERENCE_LIST" on the >>DS<< dataset */
- if((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
+ if ((has_reflist = H5LT_find_attribute(dsid, REFERENCE_LIST)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * open "REFERENCE_LIST"
- *-------------------------------------------------------------------------
- */
+ * open "REFERENCE_LIST"
+ *-------------------------------------------------------------------------
+ */
- if(has_reflist == 1)
- {
- if((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
+ if (has_reflist == 1) {
+ if ((aid = H5Aopen(dsid, REFERENCE_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* get native type to read REFERENCE_LIST attribute */
- if((ntid = H5DS_get_REFLIST_type()) < 0)
+ if ((ntid = H5DS_get_REFLIST_type()) < 0)
goto out;
/* get and save the old reference(s) */
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
- if((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
+ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
goto out;
- dsbuf = (ds_list_t*) HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
- if (H5Aread(aid,ntid,dsbuf) < 0)
+ if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * iterate
- *-------------------------------------------------------------------------
- */
+ * iterate
+ *-------------------------------------------------------------------------
+ */
- for(i=0; i<nelmts; i++)
- {
+ for (i = 0; i < nelmts; i++) {
/* get the reference */
ref = dsbuf[i].ref;
/* the reference was not deleted */
- if (ref)
- {
+ if (ref) {
/* get the dataset id */
- if ((did_i = H5Rdereference(did,H5R_OBJECT,&ref)) < 0)
+ if ((did_i = H5Rdereference(did, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for dataset in the parameter list */
- if(H5Oget_info(did, &oi3) < 0)
+ if (H5Oget_info(did, &oi3) < 0)
goto out;
/* get info for this dataset */
- if(H5Oget_info(did_i, &oi4) < 0)
+ if (H5Oget_info(did_i, &oi4) < 0)
goto out;
/* same object */
- if(oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && idx==dsbuf[i].dim_idx)
- found_dset=1;
+ if (oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && idx == dsbuf[i].dim_idx)
+ found_dset = 1;
/* close the dereferenced dataset */
if (H5Dclose(did_i) < 0)
goto out;
} /* if */
- } /* i */
-
+ } /* i */
/* close */
if (H5Sclose(sid) < 0)
@@ -1183,18 +1162,20 @@ htri_t H5DSis_attached(hid_t did,
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(tid);
H5Tclose(ntid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
if (buf) {
HDfree(buf);
buf = NULL;
}
- if(dsbuf) {
+ if (dsbuf) {
HDfree(dsbuf);
dsbuf = NULL;
}
@@ -1202,88 +1183,84 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSiterate_scales
-*
-* Purpose: H5DSiterate_scales iterates over the scales attached to dimension DIM
-* of dataset DID. For each scale in the list, the visitor_data and some
-* additional information, specified below, are passed to the visitor function.
-* The iteration begins with the IDX object in the group and the next element
-* to be processed by the operator is returned in IDX. If IDX is NULL, then the
-* iterator starts at zero.
-*
-* Parameters:
-*
-* hid_t DID; IN: the dataset
-* unsigned int DIM; IN: the dimension of the dataset
-* int *DS_IDX; IN/OUT: on input the dimension scale index to start iterating,
-* on output the next index to visit. If NULL, start at
-* the first position.
-* H5DS_iterate_t VISITOR; IN: the visitor function
-* void *VISITOR_DATA; IN: arbitrary data to pass to the visitor function.
-*
-* Iterate over all scales of DIM, calling an application callback
-* with the item, key and any operator data.
-*
-* The operator callback receives a pointer to the item ,
-* and the pointer to the operator data passed
-* in to H5SL_iterate ('op_data'). The return values from an operator are:
-* A. Zero causes the iterator to continue, returning zero when all
-* nodes of that type have been processed.
-* B. Positive causes the iterator to immediately return that positive
-* value, indicating short-circuit success.
-* C. Negative causes the iterator to immediately return that value,
-* indicating failure.
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 31, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSiterate_scales(hid_t did,
- unsigned int dim,
- int *ds_idx,
- H5DS_iterate_t visitor,
- void *visitor_data )
+ * Function: H5DSiterate_scales
+ *
+ * Purpose: H5DSiterate_scales iterates over the scales attached to dimension DIM
+ * of dataset DID. For each scale in the list, the visitor_data and some
+ * additional information, specified below, are passed to the visitor function.
+ * The iteration begins with the IDX object in the group and the next element
+ * to be processed by the operator is returned in IDX. If IDX is NULL, then the
+ * iterator starts at zero.
+ *
+ * Parameters:
+ *
+ * hid_t DID; IN: the dataset
+ * unsigned int DIM; IN: the dimension of the dataset
+ * int *DS_IDX; IN/OUT: on input the dimension scale index to start iterating,
+ * on output the next index to visit. If NULL, start at
+ * the first position.
+ * H5DS_iterate_t VISITOR; IN: the visitor function
+ * void *VISITOR_DATA; IN: arbitrary data to pass to the visitor function.
+ *
+ * Iterate over all scales of DIM, calling an application callback
+ * with the item, key and any operator data.
+ *
+ * The operator callback receives a pointer to the item ,
+ * and the pointer to the operator data passed
+ * in to H5SL_iterate ('op_data'). The return values from an operator are:
+ * A. Zero causes the iterator to continue, returning zero when all
+ * nodes of that type have been processed.
+ * B. Positive causes the iterator to immediately return that positive
+ * value, indicating short-circuit success.
+ * C. Negative causes the iterator to immediately return that value,
+ * indicating failure.
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 31, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visitor, void *visitor_data)
{
- hid_t scale_id;
- int rank;
- hobj_ref_t ref; /* reference to the DS */
- hid_t sid; /* space ID */
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- hvl_t *buf = NULL; /* VL buffer to store in the attribute */
- H5I_type_t it; /* ID type */
- herr_t ret_value=0;
- int j_idx;
- int nscales;
- int has_dimlist;
- int i;
+ hid_t scale_id;
+ int rank;
+ hobj_ref_t ref; /* reference to the DS */
+ hid_t sid; /* space ID */
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ hvl_t * buf = NULL; /* VL buffer to store in the attribute */
+ H5I_type_t it; /* ID type */
+ herr_t ret_value = 0;
+ int j_idx;
+ int nscales;
+ int has_dimlist;
+ int i;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
return FAIL;
- if (H5I_DATASET!=it)
+ if (H5I_DATASET != it)
return FAIL;
/* get the number of scales assotiated with this DIM */
- if ((nscales = H5DSget_num_scales(did,dim)) < 0)
+ if ((nscales = H5DSget_num_scales(did, dim)) < 0)
return FAIL;
/* parameter range checking */
- if (ds_idx!=NULL)
- {
- if (*ds_idx>=nscales)
+ if (ds_idx != NULL) {
+ if (*ds_idx >= nscales)
return FAIL;
}
@@ -1292,70 +1269,67 @@ herr_t H5DSiterate_scales(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if ( dim >= (unsigned)rank )
+ if (dim >= (unsigned)rank)
return FAIL;
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
- if(has_dimlist == 0)
+ if (has_dimlist == 0)
return SUCCEED;
- else if(has_dimlist == 1)
- {
- if((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
+ else if (has_dimlist == 1) {
+ if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t*)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ if (buf == NULL)
goto out;
/* read */
- if(H5Aread(aid, tid, buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
- if ( buf[dim].len > 0 )
- {
- if (ds_idx!=NULL)
+ if (buf[dim].len > 0) {
+ if (ds_idx != NULL)
j_idx = *ds_idx;
else
- j_idx=0;
+ j_idx = 0;
/* iterate */
- for(i=j_idx; i<nscales; i++)
- {
+ for (i = j_idx; i < nscales; i++) {
/* get the reference */
- ref = ((hobj_ref_t *)buf[dim].p)[ i ];
+ ref = ((hobj_ref_t *)buf[dim].p)[i];
/* disable error reporting, the ID might refer to a deleted dataset */
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
/* get the DS id */
- if ((scale_id = H5Rdereference(did,H5R_OBJECT,&ref)) < 0)
+ if ((scale_id = H5Rdereference(did, H5R_OBJECT, &ref)) < 0)
goto out;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* set the return IDX OUT value at current scale index */
- if (ds_idx!=NULL)
- {
+ if (ds_idx != NULL) {
*ds_idx = i;
}
- if((ret_value=(visitor)(did,dim,scale_id,visitor_data))!=0)
- {
+ if ((ret_value = (visitor)(did, dim, scale_id, visitor_data)) != 0) {
/* break */
/* close the DS id */
@@ -1370,10 +1344,10 @@ herr_t H5DSiterate_scales(hid_t did,
goto out;
} /* i */
- } /* if */
+ } /* if */
/* close */
- if (H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
if (H5Sclose(sid) < 0)
goto out;
@@ -1389,55 +1363,58 @@ herr_t H5DSiterate_scales(hid_t did,
return ret_value;
out:
- H5E_BEGIN_TRY {
- if(buf) {
- H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf);
+ H5E_BEGIN_TRY
+ {
+ if (buf) {
+ H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
HDfree(buf);
}
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(tid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DSset_label
-*
-* Purpose: Set label for the dimension IDX of dataset DID to the value LABEL
-*
-* Return: Success: SUCCEED, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 11, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
+ * Function: H5DSset_label
+ *
+ * Purpose: Set label for the dimension IDX of dataset DID to the value LABEL
+ *
+ * Return: Success: SUCCEED, Failure: FAIL
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 11, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5DSset_label(hid_t did, unsigned int idx, const char *label)
{
- int has_labels;
- hid_t sid = -1; /* space ID */
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- int rank; /* rank of dataset */
- hsize_t dims[1]; /* dimensions of dataset */
- H5I_type_t it; /* ID type */
- unsigned int i;
- union { /* union is needed to eliminate compiler warnings about */
- char ** buf; /* discarding the 'const' qualifier in the free */
- char const ** const_buf; /* buf calls */
+ int has_labels;
+ hid_t sid = -1; /* space ID */
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ int rank; /* rank of dataset */
+ hsize_t dims[1]; /* dimensions of dataset */
+ H5I_type_t it; /* ID type */
+ unsigned int i;
+ union { /* union is needed to eliminate compiler warnings about */
+ char ** buf; /* discarding the 'const' qualifier in the free */
+ char const **const_buf; /* buf calls */
} u;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
return FAIL;
@@ -1445,10 +1422,10 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5I_DATASET != it)
return FAIL;
- if (label == NULL)
+ if (label == NULL)
return FAIL;
- /* get dataset space */
+ /* get dataset space */
if ((sid = H5Dget_space(did)) < 0)
return FAIL;
@@ -1460,25 +1437,24 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5Sclose(sid) < 0)
goto out;
- if ( idx >= (unsigned)rank )
+ if (idx >= (unsigned)rank)
return FAIL;
/*-------------------------------------------------------------------------
- * attribute "DIMENSION_LABELS"
- *-------------------------------------------------------------------------
- */
+ * attribute "DIMENSION_LABELS"
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "DIMENSION_LABELS" on the >>data<< dataset */
if ((has_labels = H5LT_find_attribute(did, DIMENSION_LABELS)) < 0)
return FAIL;
/*-------------------------------------------------------------------------
- * make the attribute and insert label
- *-------------------------------------------------------------------------
- */
+ * make the attribute and insert label
+ *-------------------------------------------------------------------------
+ */
- if (has_labels == 0)
- {
+ if (has_labels == 0) {
dims[0] = (hsize_t)rank;
/* space for the attribute */
@@ -1496,13 +1472,13 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.const_buf = (char const **) HDmalloc((size_t) rank * sizeof(char *));
+ u.const_buf = (char const **)HDmalloc((size_t)rank * sizeof(char *));
if (u.const_buf == NULL)
goto out;
- for (i = 0; i < (unsigned int) rank; i++)
- u.const_buf[i] = NULL;
+ for (i = 0; i < (unsigned int)rank; i++)
+ u.const_buf[i] = NULL;
/* store the label information in the required index */
u.const_buf[idx] = label;
@@ -1518,21 +1494,19 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- if (u.const_buf)
- {
+ if (u.const_buf) {
HDfree(u.const_buf);
u.const_buf = NULL;
}
}
/*-------------------------------------------------------------------------
- * just insert label
- *-------------------------------------------------------------------------
- */
+ * just insert label
+ *-------------------------------------------------------------------------
+ */
+
+ else {
- else
- {
-
if ((aid = H5Aopen(did, DIMENSION_LABELS, H5P_DEFAULT)) < 0)
goto out;
@@ -1540,8 +1514,8 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.buf = (char **) HDmalloc((size_t) rank * sizeof(char *));
-
+ u.buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
+
if (u.buf == NULL)
goto out;
@@ -1564,8 +1538,7 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
u.buf[idx] = NULL;
/* free all the ptr's from the H5Aread() */
- for (i = 0; i < (unsigned int) rank; i++)
- {
+ for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
HDfree(u.buf[i]);
}
@@ -1575,8 +1548,7 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- if (u.buf)
- {
+ if (u.buf) {
HDfree(u.buf);
u.buf = NULL;
}
@@ -1587,13 +1559,11 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
/* error zone */
out:
- if (u.buf)
- {
- if (u.buf[idx]) /* check if we errored during H5Awrite */
+ if (u.buf) {
+ if (u.buf[idx]) /* check if we errored during H5Awrite */
u.buf[idx] = NULL; /* don't free label */
/* free all the ptr's from the H5Aread() */
- for (i = 0; i < (unsigned int) rank; i++)
- {
+ for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
HDfree(u.buf[i]);
}
@@ -1604,50 +1574,52 @@ out:
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(tid);
- }H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_label
-*
-* Purpose: Read the label LABEL for dimension IDX of dataset DID
-* Up to 'size' characters are stored in 'label' followed by a '\0' string
-* terminator. If the label is longer than 'size'-1,
-* the string terminator is stored in the last position of the buffer to
-* properly terminate the string.
-*
-* Return: 0 if no label found, size of label if found, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 11, 2005
-*
-* Comments:
-*
-* Modifications:
-* JIRA HDFFV-7673: Added a check to see if the label name exists,
-* if not then returns zero. July 30, 2011. MSB
-*
-*-------------------------------------------------------------------------
-*/
-ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
+ * Function: H5DSget_label
+ *
+ * Purpose: Read the label LABEL for dimension IDX of dataset DID
+ * Up to 'size' characters are stored in 'label' followed by a '\0' string
+ * terminator. If the label is longer than 'size'-1,
+ * the string terminator is stored in the last position of the buffer to
+ * properly terminate the string.
+ *
+ * Return: 0 if no label found, size of label if found, Failure: FAIL
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 11, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ * JIRA HDFFV-7673: Added a check to see if the label name exists,
+ * if not then returns zero. July 30, 2011. MSB
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
{
int has_labels;
- hid_t sid = -1; /* space ID */
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- int rank; /* rank of dataset */
- char **buf = NULL; /* buffer to store in the attribute */
- H5I_type_t it; /* ID type */
+ hid_t sid = -1; /* space ID */
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ int rank; /* rank of dataset */
+ char ** buf = NULL; /* buffer to store in the attribute */
+ H5I_type_t it; /* ID type */
size_t nbytes = 0;
size_t copy_len;
int i;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
return FAIL;
@@ -1655,7 +1627,7 @@ ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
if (H5I_DATASET != it)
return FAIL;
- /* get dataset space */
+ /* get dataset space */
if ((sid = H5Dget_space(did)) < 0)
return FAIL;
@@ -1667,41 +1639,39 @@ ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
if (H5Sclose(sid) < 0)
goto out;
- if ( idx >= (unsigned)rank )
+ if (idx >= (unsigned)rank)
return FAIL;
/*-------------------------------------------------------------------------
- * attribute "DIMENSION_LABELS"
- *-------------------------------------------------------------------------
- */
+ * attribute "DIMENSION_LABELS"
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "DIMENSION_LABELS" on the >>data<< dataset */
if ((has_labels = H5LT_find_attribute(did, DIMENSION_LABELS)) < 0)
return FAIL;
/* return 0 and NULL for label if no label found */
- if (has_labels == 0)
- {
+ if (has_labels == 0) {
if (label)
label[0] = 0;
return 0;
}
/*-------------------------------------------------------------------------
- * open the attribute and read label
- *-------------------------------------------------------------------------
- */
+ * open the attribute and read label
+ *-------------------------------------------------------------------------
+ */
- assert (has_labels == 1);
+ assert(has_labels == 1);
if ((aid = H5Aopen(did, DIMENSION_LABELS, H5P_DEFAULT)) < 0)
goto out;
-
if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* allocate and initialize */
- buf = (char **) HDmalloc((size_t) rank * sizeof(char *));
+ buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
if (buf == NULL)
goto out;
@@ -1711,29 +1681,25 @@ ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
goto out;
/* do only if the label name exists for the dimension */
- if (buf[idx] != NULL)
- {
+ if (buf[idx] != NULL) {
/* get the real string length */
- nbytes = strlen(buf[idx]);
+ nbytes = HDstrlen(buf[idx]);
- /* compute the string length which will fit into the user's buffer */
- copy_len = MIN(size-1, nbytes);
+ /* compute the string length which will fit into the user's buffer */
+ copy_len = MIN(size - 1, nbytes);
- /* copy all/some of the name */
- if (label)
- {
- memcpy(label, buf[idx], copy_len);
-
- /* terminate the string */
- label[copy_len] = '\0';
- }
+ /* copy all/some of the name */
+ if (label) {
+ HDmemcpy(label, buf[idx], copy_len);
+ /* terminate the string */
+ label[copy_len] = '\0';
+ }
}
/* free all the ptr's from the H5Aread() */
- for (i = 0; i < rank; i++)
- {
+ for (i = 0; i < rank; i++) {
if (buf[i])
- HDfree(buf[i]);
+ HDfree(buf[i]);
}
/* close */
@@ -1741,21 +1707,18 @@ ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- if (buf)
- {
+ if (buf) {
HDfree(buf);
buf = NULL;
}
- return (ssize_t) nbytes;
+ return (ssize_t)nbytes;
/* error zone */
out:
- if (buf)
- {
+ if (buf) {
/* free all the ptr's from the H5Aread() */
- for (i = 0; i < rank; i++)
- {
+ for (i = 0; i < rank; i++) {
if (buf[i])
HDfree(buf[i]);
}
@@ -1766,37 +1729,37 @@ out:
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(tid);
- }H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_scale_name
-*
-* Purpose: Read the name of dataset scale DID into buffer NAME
-* Up to 'size' characters are stored in 'name' followed by a '\0' string
-* terminator. If the name is longer than 'size'-1,
-* the string terminator is stored in the last position of the buffer to
-* properly terminate the string.
-*
-* Return: size of name if found, zero if not found, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-* The size of the name returned should not include the NULL termination
-* in its value so as to be consistent with other HDF5 APIs.
-*
-*-------------------------------------------------------------------------
-*/
-
-ssize_t H5DSget_scale_name(hid_t did,
- char *name,
- size_t size)
+ * Function: H5DSget_scale_name
+ *
+ * Purpose: Read the name of dataset scale DID into buffer NAME
+ * Up to 'size' characters are stored in 'name' followed by a '\0' string
+ * terminator. If the name is longer than 'size'-1,
+ * the string terminator is stored in the last position of the buffer to
+ * properly terminate the string.
+ *
+ * Return: size of name if found, zero if not found, Failure: FAIL
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 04, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ * The size of the name returned should not include the NULL termination
+ * in its value so as to be consistent with other HDF5 APIs.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+ssize_t
+H5DSget_scale_name(hid_t did, char *name, size_t size)
{
hid_t aid; /* attribute ID */
hid_t tid = -1; /* attribute type ID */
@@ -1805,26 +1768,26 @@ ssize_t H5DSget_scale_name(hid_t did,
size_t nbytes;
size_t copy_len;
int has_name;
- char *buf=NULL;
+ char * buf = NULL;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
return FAIL;
- if (H5I_DATASET!=it)
+ if (H5I_DATASET != it)
return FAIL;
- if ((H5DSis_scale(did))<=0)
+ if ((H5DSis_scale(did)) <= 0)
return FAIL;
/*-------------------------------------------------------------------------
- * check if the DS has a name
- *-------------------------------------------------------------------------
- */
+ * check if the DS has a name
+ *-------------------------------------------------------------------------
+ */
/* try to find the attribute "NAME" on the >>DS<< dataset */
if ((has_name = H5LT_find_attribute(did, "NAME")) < 0)
@@ -1834,43 +1797,43 @@ ssize_t H5DSget_scale_name(hid_t did,
return 0;
/*-------------------------------------------------------------------------
- * open the attribute
- *-------------------------------------------------------------------------
- */
+ * open the attribute
+ *-------------------------------------------------------------------------
+ */
- if((aid = H5Aopen(did, "NAME", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "NAME", H5P_DEFAULT)) < 0)
return FAIL;
/* get space */
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* get type */
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* get the size */
- if((nbytes = H5Tget_size(tid)) == 0)
+ if ((nbytes = H5Tget_size(tid)) == 0)
goto out;
/* allocate a temporary buffer */
- buf = (char*)HDmalloc(nbytes * sizeof(char));
+ buf = (char *)HDmalloc(nbytes * sizeof(char));
if (buf == NULL)
goto out;
/* read */
- if (H5Aread(aid,tid,buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* compute the string length which will fit into the user's buffer */
- copy_len = MIN(size-1, nbytes);
+ copy_len = MIN(size - 1, nbytes);
/* copy all/some of the name */
if (name) {
- memcpy(name, buf, copy_len);
+ HDmemcpy(name, buf, copy_len);
/* terminate the string */
- name[copy_len]='\0';
+ name[copy_len] = '\0';
}
/* close */
@@ -1883,225 +1846,226 @@ ssize_t H5DSget_scale_name(hid_t did,
if (buf)
HDfree(buf);
- return (ssize_t) MAX(0,nbytes-1);
+ return (ssize_t)(nbytes - 1);
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Aclose(aid);
H5Tclose(tid);
H5Sclose(sid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
if (buf)
HDfree(buf);
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DSis_scale
-*
-* Purpose: check if the dataset DID is a dimension scale
-*
-* Return: 1, is, 0, not, FAIL, error
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-htri_t H5DSis_scale(hid_t did)
+ * Function: H5DSis_scale
+ *
+ * Purpose: check if the dataset DID is a dimension scale
+ *
+ * Return: 1, is, 0, not, FAIL, error
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 04, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+htri_t
+H5DSis_scale(hid_t did)
{
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- herr_t has_class; /* has the "CLASS" attribute */
- htri_t is_ds; /* boolean return value */
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ herr_t has_class; /* has the "CLASS" attribute */
+ htri_t is_ds; /* boolean return value */
H5I_type_t it; /* ID type */
- char *buf; /* Name of attribute */
+ char * buf; /* Name of attribute */
hsize_t storage_size; /* Size of storage for attribute */
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
return FAIL;
- if(H5I_DATASET != it)
+ if (H5I_DATASET != it)
return FAIL;
/* try to find the attribute "CLASS" on the dataset */
- if((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
+ if ((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
return FAIL;
- if(has_class == 0)
+ if (has_class == 0)
is_ds = 0;
- else
- {
- if((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
+ else {
+ if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- /* check to make sure attribute is a string */
- if(H5T_STRING != H5Tget_class(tid))
- goto out;
+ /* check to make sure attribute is a string */
+ if (H5T_STRING != H5Tget_class(tid))
+ goto out;
- /* check to make sure string is null-terminated */
- if(H5T_STR_NULLTERM != H5Tget_strpad(tid))
- goto out;
+ /* check to make sure string is null-terminated */
+ if (H5T_STR_NULLTERM != H5Tget_strpad(tid))
+ goto out;
- /* allocate buffer large enough to hold string */
- if((storage_size = H5Aget_storage_size(aid)) == 0)
- goto out;
+ /* allocate buffer large enough to hold string */
+ if ((storage_size = H5Aget_storage_size(aid)) == 0)
+ goto out;
- buf = (char*)HDmalloc( (size_t)storage_size * sizeof(char) + 1);
- if(buf == NULL)
- goto out;
+ buf = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ if (buf == NULL)
+ goto out;
- /* Read the attribute */
- if(H5Aread(aid, tid, buf) < 0)
- goto out;
+ /* Read the attribute */
+ if (H5Aread(aid, tid, buf) < 0)
+ goto out;
- /* compare strings */
- if(HDstrncmp(buf, DIMENSION_SCALE_CLASS, MIN(HDstrlen(DIMENSION_SCALE_CLASS),HDstrlen(buf)))==0)
+ /* compare strings */
+ if (HDstrncmp(buf, DIMENSION_SCALE_CLASS, MIN(HDstrlen(DIMENSION_SCALE_CLASS), HDstrlen(buf))) == 0)
is_ds = 1;
else
is_ds = 0;
- HDfree(buf);
+ HDfree(buf);
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
if (H5Aclose(aid) < 0)
goto out;
-
-
}
return is_ds;
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Aclose(aid);
H5Tclose(tid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
-
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_num_scales
-*
-* Purpose: get the number of scales linked to the IDX dimension of dataset DID
-*
-* Return:
-* Success: number of scales
-* Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 13, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-int H5DSget_num_scales(hid_t did,
- unsigned int idx)
+ * Function: H5DSget_num_scales
+ *
+ * Purpose: get the number of scales linked to the IDX dimension of dataset DID
+ *
+ * Return:
+ * Success: number of scales
+ * Failure: FAIL
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: January 13, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int
+H5DSget_num_scales(hid_t did, unsigned int idx)
{
int has_dimlist;
- hid_t sid; /* space ID */
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- int rank; /* rank of dataset */
- hvl_t *buf = NULL; /* VL buffer to store in the attribute */
- H5I_type_t it; /* ID type */
+ hid_t sid; /* space ID */
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ int rank; /* rank of dataset */
+ hvl_t * buf = NULL; /* VL buffer to store in the attribute */
+ H5I_type_t it; /* ID type */
int nscales;
/*-------------------------------------------------------------------------
- * parameter checking
- *-------------------------------------------------------------------------
- */
+ * parameter checking
+ *-------------------------------------------------------------------------
+ */
/* get ID type */
- if((it = H5Iget_type(did)) < 0)
+ if ((it = H5Iget_type(did)) < 0)
return FAIL;
- if(H5I_DATASET != it)
+ if (H5I_DATASET != it)
return FAIL;
/*-------------------------------------------------------------------------
- * the attribute "DIMENSION_LIST" on the >>data<< dataset must exist
- *-------------------------------------------------------------------------
- */
+ * the attribute "DIMENSION_LIST" on the >>data<< dataset must exist
+ *-------------------------------------------------------------------------
+ */
/* get dataset space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
return FAIL;
/* get rank */
- if((rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/* dimemsion index IDX range checking */
- if(idx >= (unsigned int )rank)
+ if (idx >= (unsigned int)rank)
return FAIL;
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
/* it does not exist */
- if(has_dimlist == 0)
+ if (has_dimlist == 0)
return 0;
/*-------------------------------------------------------------------------
- * the attribute exists, open it
- *-------------------------------------------------------------------------
- */
+ * the attribute exists, open it
+ *-------------------------------------------------------------------------
+ */
else {
- if((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, DIMENSION_LIST, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
- if((sid = H5Aget_space(aid)) < 0)
+ if ((sid = H5Aget_space(aid)) < 0)
goto out;
/* allocate and initialize the VL */
buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
- if(buf == NULL)
+ if (buf == NULL)
goto out;
/* read */
- if(H5Aread(aid, tid, buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
nscales = (int)buf[idx].len;
/* close */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
HDfree(buf);
buf = NULL;
@@ -2111,84 +2075,85 @@ int H5DSget_num_scales(hid_t did,
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Sclose(sid);
H5Aclose(aid);
H5Tclose(tid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(buf)
+ if (buf)
HDfree(buf);
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DS_is_reserved
-*
-* Purpose: Verify that a dataset's CLASS is either an image, palette or table
-*
-* Return: true, false, fail
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: March 19, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-static
-herr_t H5DS_is_reserved(hid_t did)
+ * Function: H5DS_is_reserved
+ *
+ * Purpose: Verify that a dataset's CLASS is either an image, palette or table
+ *
+ * Return: true, false, fail
+ *
+ * Programmer: pvn@ncsa.uiuc.edu
+ *
+ * Date: March 19, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static herr_t
+H5DS_is_reserved(hid_t did)
{
- int has_class;
- hid_t tid = -1;
- hid_t aid = -1;
- char *buf; /* Name of attribute */
+ int has_class;
+ hid_t tid = -1;
+ hid_t aid = -1;
+ char * buf; /* Name of attribute */
hsize_t storage_size; /* Size of storage for attribute */
- herr_t ret;
+ herr_t ret;
/* try to find the attribute "CLASS" on the dataset */
- if((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
+ if ((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
return -1;
- if(has_class == 0)
+ if (has_class == 0)
return 0;
- assert(has_class == 1);
- if((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
+ assert(has_class == 1);
+ if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Aget_type(aid)) < 0)
+ if ((tid = H5Aget_type(aid)) < 0)
goto out;
/* check to make sure attribute is a string */
- if(H5T_STRING != H5Tget_class(tid))
- goto out;
+ if (H5T_STRING != H5Tget_class(tid))
+ goto out;
/* check to make sure string is null-terminated */
- if(H5T_STR_NULLTERM != H5Tget_strpad(tid))
- goto out;
+ if (H5T_STR_NULLTERM != H5Tget_strpad(tid))
+ goto out;
/* allocate buffer large enough to hold string */
- if((storage_size = H5Aget_storage_size(aid)) == 0)
- goto out;
+ if ((storage_size = H5Aget_storage_size(aid)) == 0)
+ goto out;
- buf = (char*)HDmalloc( (size_t)storage_size * sizeof(char) + 1);
- if(buf == NULL)
- goto out;
+ buf = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ if (buf == NULL)
+ goto out;
/* Read the attribute */
- if(H5Aread(aid, tid, buf) < 0)
- goto out;
-
+ if (H5Aread(aid, tid, buf) < 0)
+ goto out;
- if(HDstrncmp(buf, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS),HDstrlen(buf))) == 0 ||
- HDstrncmp(buf, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS),HDstrlen(buf))) == 0 ||
- HDstrncmp(buf, TABLE_CLASS, MIN(HDstrlen(TABLE_CLASS),HDstrlen(buf))) == 0 )
+ if (HDstrncmp(buf, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS), HDstrlen(buf))) == 0 ||
+ HDstrncmp(buf, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS), HDstrlen(buf))) == 0 ||
+ HDstrncmp(buf, TABLE_CLASS, MIN(HDstrlen(TABLE_CLASS), HDstrlen(buf))) == 0)
ret = 1;
else
ret = 0;
@@ -2201,7 +2166,6 @@ herr_t H5DS_is_reserved(hid_t did)
if (H5Aclose(aid) < 0)
goto out;
-
return ret;
/* error zone */
@@ -2210,52 +2174,51 @@ out:
{
H5Tclose(tid);
H5Aclose(aid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
/*-------------------------------------------------------------------------
-* Function: H5DS_get_REFLIST_type
-*
-* Purpose: This is a helper function to return a native type for
-* the REFERENCE_LIST attribute.
-*
-* Return: Type identifier on success and negative on failure
-*
-* Programmer: epourmal@hdfgroup.org
-*
-* Date: May 22, 2010
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-static
-hid_t H5DS_get_REFLIST_type(void)
+ * Function: H5DS_get_REFLIST_type
+ *
+ * Purpose: This is a helper function to return a native type for
+ * the REFERENCE_LIST attribute.
+ *
+ * Return: Type identifier on success and negative on failure
+ *
+ * Programmer: epourmal@hdfgroup.org
+ *
+ * Date: May 22, 2010
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static hid_t
+H5DS_get_REFLIST_type(void)
{
- hid_t ntid_t = -1;
-
+ hid_t ntid_t = -1;
+
/* Build native type that corresponds to compound datatype
used to store ds_list_t structure in the REFERENCE_LIST
attribute */
- if((ntid_t = H5Tcreate(H5T_COMPOUND, sizeof(ds_list_t))) < 0)
+ if ((ntid_t = H5Tcreate(H5T_COMPOUND, sizeof(ds_list_t))) < 0)
goto out;
- if(H5Tinsert(ntid_t, "dataset", HOFFSET(ds_list_t,ref), H5T_STD_REF_OBJ) < 0)
+ if (H5Tinsert(ntid_t, "dataset", HOFFSET(ds_list_t, ref), H5T_STD_REF_OBJ) < 0)
goto out;
- if(H5Tinsert(ntid_t, "dimension", HOFFSET(ds_list_t, dim_idx), H5T_NATIVE_INT) < 0)
+ if (H5Tinsert(ntid_t, "dimension", HOFFSET(ds_list_t, dim_idx), H5T_NATIVE_INT) < 0)
goto out;
return ntid_t;
out:
- H5E_BEGIN_TRY {
- H5Tclose(ntid_t);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Tclose(ntid_t); }
+ H5E_END_TRY;
return FAIL;
-}
-
+}
diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h
index 9d20d48..42dd6bf 100644
--- a/hl/src/H5DSprivate.h
+++ b/hl/src/H5DSprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,21 +20,15 @@
/* public LT prototypes */
#include "H5DSpublic.h"
-
-
-
/* attribute type of a DS dataset */
typedef struct ds_list_t {
- hobj_ref_t ref; /* object reference */
- unsigned int dim_idx; /* dimension index of the dataset */
+ hobj_ref_t ref; /* object reference */
+ unsigned int dim_idx; /* dimension index of the dataset */
} ds_list_t;
-
/*-------------------------------------------------------------------------
* private functions
*-------------------------------------------------------------------------
*/
-
#endif
-
diff --git a/hl/src/H5DSpublic.h b/hl/src/H5DSpublic.h
index 615122c..ca7ad3b 100644
--- a/hl/src/H5DSpublic.h
+++ b/hl/src/H5DSpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,61 +14,37 @@
#ifndef _H5DSpublic_H
#define _H5DSpublic_H
-
-
#define DIMENSION_SCALE_CLASS "DIMENSION_SCALE"
#define DIMENSION_LIST "DIMENSION_LIST"
#define REFERENCE_LIST "REFERENCE_LIST"
#define DIMENSION_LABELS "DIMENSION_LABELS"
-
-typedef herr_t (*H5DS_iterate_t)(hid_t dset, unsigned dim, hid_t scale, void *visitor_data);
-
+typedef herr_t (*H5DS_iterate_t)(hid_t dset, unsigned dim, hid_t scale, void *visitor_data);
#ifdef __cplusplus
extern "C" {
#endif
-H5_HLDLL herr_t H5DSattach_scale( hid_t did,
- hid_t dsid,
- unsigned int idx);
-
-H5_HLDLL herr_t H5DSdetach_scale( hid_t did,
- hid_t dsid,
- unsigned int idx);
-
-H5_HLDLL herr_t H5DSset_scale( hid_t dsid,
- const char *dimname);
+H5_HLDLL herr_t H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx);
-H5_HLDLL int H5DSget_num_scales( hid_t did,
- unsigned int dim);
+H5_HLDLL herr_t H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx);
-H5_HLDLL herr_t H5DSset_label( hid_t did,
- unsigned int idx,
- const char *label);
+H5_HLDLL herr_t H5DSset_scale(hid_t dsid, const char *dimname);
-H5_HLDLL ssize_t H5DSget_label( hid_t did,
- unsigned int idx,
- char *label,
- size_t size);
+H5_HLDLL int H5DSget_num_scales(hid_t did, unsigned int dim);
-H5_HLDLL ssize_t H5DSget_scale_name( hid_t did,
- char *name,
- size_t size);
+H5_HLDLL herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label);
-H5_HLDLL htri_t H5DSis_scale( hid_t did);
+H5_HLDLL ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size);
-H5_HLDLL herr_t H5DSiterate_scales( hid_t did,
- unsigned int dim,
- int *idx,
- H5DS_iterate_t visitor,
- void *visitor_data);
+H5_HLDLL ssize_t H5DSget_scale_name(hid_t did, char *name, size_t size);
-H5_HLDLL htri_t H5DSis_attached( hid_t did,
- hid_t dsid,
- unsigned int idx);
+H5_HLDLL htri_t H5DSis_scale(hid_t did);
+H5_HLDLL herr_t H5DSiterate_scales(hid_t did, unsigned int dim, int *idx, H5DS_iterate_t visitor,
+ void *visitor_data);
+H5_HLDLL htri_t H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx);
#ifdef __cplusplus
}
diff --git a/hl/src/H5HLprivate2.h b/hl/src/H5HLprivate2.h
index 45591e8..1202f00 100644
--- a/hl/src/H5HLprivate2.h
+++ b/hl/src/H5HLprivate2.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,4 +24,3 @@
#include "H5private.h"
#endif /* _H5HLprivate2_H */
-
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index f76f029..21fba50 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "H5IMprivate.h"
#include "H5LTprivate.h"
@@ -17,34 +17,32 @@
#include <stdlib.h>
/*-------------------------------------------------------------------------
-* Function: H5IMmake_image_8bit
-*
-* Purpose: Creates and writes an image an 8 bit image
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: June 13, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMmake_image_8bit( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const unsigned char *buf )
+ * Function: H5IMmake_image_8bit
+ *
+ * Purpose: Creates and writes an image an 8 bit image
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: June 13, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMmake_image_8bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const unsigned char *buf)
{
- hsize_t dims[IMAGE8_RANK];
+ hsize_t dims[IMAGE8_RANK];
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Initialize the image dimensions */
@@ -52,283 +50,267 @@ herr_t H5IMmake_image_8bit( hid_t loc_id,
dims[1] = width;
/* Make the dataset */
- if ( H5LTmake_dataset( loc_id, dset_name, IMAGE8_RANK, dims, H5T_NATIVE_UCHAR, buf ) < 0)
+ if (H5LTmake_dataset(loc_id, dset_name, IMAGE8_RANK, dims, H5T_NATIVE_UCHAR, buf) < 0)
return -1;
/* Attach the CLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", IMAGE_CLASS ) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
return -1;
/* Attach the VERSION attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION ) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
return -1;
/* Attach the IMAGE_SUBCLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_INDEXED" ) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_INDEXED") < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5IMmake_image_24bit
-*
-* Purpose:
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: June 13, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Interlace Mode Dimensions in the Dataspace
-* INTERLACE_PIXEL [height][width][pixel components]
-* INTERLACE_PLANE [pixel components][height][width]
-*
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMmake_image_24bit( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const char *interlace,
- const unsigned char *buf )
+ * Function: H5IMmake_image_24bit
+ *
+ * Purpose:
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: June 13, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Interlace Mode Dimensions in the Dataspace
+ * INTERLACE_PIXEL [height][width][pixel components]
+ * INTERLACE_PLANE [pixel components][height][width]
+ *
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const char *interlace, const unsigned char *buf)
{
- hsize_t dims[IMAGE24_RANK];
+ hsize_t dims[IMAGE24_RANK];
/* check the arguments */
- if (interlace == NULL)
+ if (interlace == NULL)
return -1;
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
-
/* Initialize the image dimensions */
- if ( HDstrncmp( interlace, "INTERLACE_PIXEL",15 ) == 0 )
- {
+ if (HDstrncmp(interlace, "INTERLACE_PIXEL", 15) == 0) {
/* Number of color planes is defined as the third dimension */
dims[0] = height;
dims[1] = width;
dims[2] = IMAGE24_RANK;
}
+ else if (HDstrncmp(interlace, "INTERLACE_PLANE", 15) == 0) {
+ /* Number of color planes is defined as the first dimension */
+ dims[0] = IMAGE24_RANK;
+ dims[1] = height;
+ dims[2] = width;
+ }
else
- if ( HDstrncmp( interlace, "INTERLACE_PLANE",15 ) == 0 )
- {
- /* Number of color planes is defined as the first dimension */
- dims[0] = IMAGE24_RANK;
- dims[1] = height;
- dims[2] = width;
- }
- else return -1;
-
- /* Make the dataset */
- if ( H5LTmake_dataset( loc_id, dset_name, IMAGE24_RANK, dims, H5T_NATIVE_UCHAR, buf ) < 0)
- return -1;
+ return -1;
- /* Attach the CLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "CLASS", IMAGE_CLASS ) < 0)
- return -1;
+ /* Make the dataset */
+ if (H5LTmake_dataset(loc_id, dset_name, IMAGE24_RANK, dims, H5T_NATIVE_UCHAR, buf) < 0)
+ return -1;
- /* Attach the VERSION attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION ) < 0)
- return -1;
+ /* Attach the CLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", IMAGE_CLASS) < 0)
+ return -1;
- /* Attach the IMAGE_SUBCLASS attribute */
- if ( H5LTset_attribute_string( loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_TRUECOLOR" ) < 0)
- return -1;
+ /* Attach the VERSION attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_VERSION", IMAGE_VERSION) < 0)
+ return -1;
- /* Attach the INTERLACE_MODE attribute. This attributes is only for true color images */
- if ( H5LTset_attribute_string( loc_id, dset_name, "INTERLACE_MODE", interlace ) < 0)
- return -1;
+ /* Attach the IMAGE_SUBCLASS attribute */
+ if (H5LTset_attribute_string(loc_id, dset_name, "IMAGE_SUBCLASS", "IMAGE_TRUECOLOR") < 0)
+ return -1;
- return 0;
+ /* Attach the INTERLACE_MODE attribute. This attributes is only for true color images */
+ if (H5LTset_attribute_string(loc_id, dset_name, "INTERLACE_MODE", interlace) < 0)
+ return -1;
+ return 0;
}
-
-
/*-------------------------------------------------------------------------
-* Function: find_palette
-*
-* Purpose: operator function used by H5LT_find_palette
-*
-* Return:
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: May 28, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-static herr_t find_palette(hid_t loc_id,
- const char *name,
- const H5A_info_t *ainfo,
- void *op_data)
+ * Function: find_palette
+ *
+ * Purpose: operator function used by H5LT_find_palette
+ *
+ * Return:
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: May 28, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data)
{
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return -1;
/* Shut compiler up */
- loc_id = loc_id; ainfo = ainfo; op_data = op_data;
+ loc_id = loc_id;
+ ainfo = ainfo;
+ op_data = op_data;
/* Define a positive value for return value if the attribute was found. This will
- * cause the iterator to immediately return that positive value,
- * indicating short-circuit success
- */
- if(HDstrncmp(name, "PALETTE",7) == 0)
+ * cause the iterator to immediately return that positive value,
+ * indicating short-circuit success
+ */
+ if (HDstrncmp(name, "PALETTE", 7) == 0)
ret = H5_ITER_STOP;
return ret;
}
-
/*-------------------------------------------------------------------------
-* Function: H5IM_find_palette
-*
-* Purpose: Private function. Find the attribute "PALETTE" in the image dataset
-*
-* Return: Success: 1, Failure: 0
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: May 11, 2001
-*
-* Comments:
-* The function uses H5Aiterate2 with the operator function find_palette
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IM_find_palette( hid_t loc_id )
+ * Function: H5IM_find_palette
+ *
+ * Purpose: Private function. Find the attribute "PALETTE" in the image dataset
+ *
+ * Return: Success: 1, Failure: 0
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: May 11, 2001
+ *
+ * Comments:
+ * The function uses H5Aiterate2 with the operator function find_palette
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IM_find_palette(hid_t loc_id)
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_palette, NULL);
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMget_image_info
-*
-* Purpose: Gets information about an image dataset (dimensions, interlace mode
-* and number of associated palettes).
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: July 25, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMget_image_info( hid_t loc_id,
- const char *dset_name,
- hsize_t *width,
- hsize_t *height,
- hsize_t *planes,
- char *interlace,
- hssize_t *npals )
+ * Function: H5IMget_image_info
+ *
+ * Purpose: Gets information about an image dataset (dimensions, interlace mode
+ * and number of associated palettes).
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: July 25, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes,
+ char *interlace, hssize_t *npals)
{
- hid_t did;
- hid_t sid;
+ hid_t did = -1;
+ hid_t sid = -1;
hsize_t dims[IMAGE24_RANK];
- hid_t aid;
- hid_t asid;
- hid_t atid;
+ hid_t aid = -1;
+ hid_t asid = -1;
+ hid_t atid = -1;
H5T_class_t aclass;
int has_pal;
int has_attr;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
- if (interlace == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
+ if (interlace == NULL)
+ return -1;
/*assume initially we have no palettes attached*/
*npals = 0;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "INTERLACE_MODE" on the >>image<< dataset */
- has_attr = H5LT_find_attribute(did, "INTERLACE_MODE");
+ if ((has_attr = H5LT_find_attribute(did, "INTERLACE_MODE")) < 0)
+ goto out;
/* It exists, get it */
- if(has_attr == 1)
- {
+ if (has_attr == 1) {
- if((aid = H5Aopen(did, "INTERLACE_MODE", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "INTERLACE_MODE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if(H5Aread(aid, atid, interlace) < 0)
+ if (H5Aread(aid, atid, interlace) < 0)
goto out;
- if(H5Tclose(atid) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
}
/* Get the dataspace handle */
- if ( (sid = H5Dget_space( did )) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* Get dimensions */
- if ( H5Sget_simple_extent_dims( sid, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* Initialize the image dimensions */
- if ( has_attr == 1 )
- /* This is a 24 bit image */
+ if (has_attr == 1)
+ /* This is a 24 bit image */
{
- if ( HDstrncmp( interlace, "INTERLACE_PIXEL", 15 ) == 0 )
- {
+ if (HDstrncmp(interlace, "INTERLACE_PIXEL", 15) == 0) {
/* Number of color planes is defined as the third dimension */
*height = dims[0];
*width = dims[1];
*planes = dims[2];
}
+ else if (HDstrncmp(interlace, "INTERLACE_PLANE", 15) == 0) {
+ /* Number of color planes is defined as the first dimension */
+ *planes = dims[0];
+ *height = dims[1];
+ *width = dims[2];
+ }
else
- if ( HDstrncmp( interlace, "INTERLACE_PLANE", 15 ) == 0 )
- {
- /* Number of color planes is defined as the first dimension */
- *planes = dims[0];
- *height = dims[1];
- *width = dims[2];
- }
- else return -1;
+ return -1;
}
else
- /* This is a 8 bit image */
+ /* This is a 8 bit image */
{
*height = dims[0];
*width = dims[1];
@@ -336,375 +318,357 @@ herr_t H5IMget_image_info( hid_t loc_id,
}
/* Close */
- if ( H5Sclose( sid ) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
-
/* Get number of palettes */
-
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
has_pal = H5IM_find_palette(did);
- if(has_pal == 1)
- {
+ if (has_pal == 1) {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if((aclass = H5Tget_class(atid)) < 0)
+ if ((aclass = H5Tget_class(atid)) < 0)
goto out;
/* Check if it is really a reference */
- if(aclass == H5T_REFERENCE)
- {
+ if (aclass == H5T_REFERENCE) {
/* Get the reference(s) */
- if ( (asid = H5Aget_space( aid )) < 0)
+ if ((asid = H5Aget_space(aid)) < 0)
goto out;
- *npals = H5Sget_simple_extent_npoints( asid );
+ *npals = H5Sget_simple_extent_npoints(asid);
- if ( H5Sclose( asid ) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
} /* H5T_REFERENCE */
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
/* Close the attribute. */
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
-
}
/* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
goto out;
return 0;
out:
- H5Dclose( did );
- H5Aclose( aid );
- H5Sclose( asid );
- H5Tclose( atid );
+ if (did > 0)
+ H5Dclose(did);
+ if (aid > 0)
+ H5Aclose(aid);
+ if (asid > 0)
+ H5Sclose(asid);
+ if (atid > 0)
+ H5Tclose(atid);
return -1;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMread_image
-*
-* Purpose: Reads image data from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: June 13, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMread_image( hid_t loc_id,
- const char *dset_name,
- unsigned char *buf )
+ * Function: H5IMread_image
+ *
+ * Purpose: Reads image data from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: June 13, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMread_image(hid_t loc_id, const char *dset_name, unsigned char *buf)
{
- hid_t did;
+ hid_t did;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Read */
- if ( H5Dread( did, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf ) < 0)
+ if (H5Dread(did, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
/* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
+ if (H5Dclose(did))
return -1;
return 0;
out:
- H5Dclose( did );
+ H5Dclose(did);
return -1;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMmake_palette
-*
-* Purpose: Creates and writes a palette.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: May 01, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMmake_palette( hid_t loc_id,
- const char *pal_name,
- const hsize_t *pal_dims,
- const unsigned char *pal_data )
+ * Function: H5IMmake_palette
+ *
+ * Purpose: Creates and writes a palette.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: May 01, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMmake_palette(hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data)
{
int has_pal;
/* check the arguments */
- if (pal_name == NULL)
- return -1;
+ if (pal_name == NULL)
+ return -1;
/* Check if the dataset already exists */
- has_pal = H5LTfind_dataset( loc_id, pal_name );
+ has_pal = H5LTfind_dataset(loc_id, pal_name);
/* It exists. Return */
- if ( has_pal == 1 )
+ if (has_pal == 1)
return 0;
/* Make the palette dataset. */
- if ( H5LTmake_dataset( loc_id, pal_name, 2, pal_dims, H5T_NATIVE_UCHAR, pal_data ) < 0 )
+ if (H5LTmake_dataset(loc_id, pal_name, 2, pal_dims, H5T_NATIVE_UCHAR, pal_data) < 0)
return -1;
/* Attach the attribute "CLASS" to the >>palette<< dataset*/
- if ( H5LTset_attribute_string( loc_id, pal_name, "CLASS", PALETTE_CLASS ) < 0)
+ if (H5LTset_attribute_string(loc_id, pal_name, "CLASS", PALETTE_CLASS) < 0)
return -1;
/* Attach the attribute "PAL_VERSION" to the >>palette<< dataset*/
- if ( H5LTset_attribute_string( loc_id, pal_name, "PAL_VERSION", "1.2" ) < 0)
+ if (H5LTset_attribute_string(loc_id, pal_name, "PAL_VERSION", "1.2") < 0)
return -1;
return 0;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMlink_palette
-*
-* Purpose: This function attaches a palette to an existing image dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: May 01, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* An image (dataset) within an HDF5 file may optionally specify an array of
-* palettes to be viewed with. The dataset will have an attribute
-* which contains an array of object reference pointers which refer to palettes in the file.
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMlink_palette( hid_t loc_id,
- const char *image_name,
- const char *pal_name )
+ * Function: H5IMlink_palette
+ *
+ * Purpose: This function attaches a palette to an existing image dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: May 01, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * An image (dataset) within an HDF5 file may optionally specify an array of
+ * palettes to be viewed with. The dataset will have an attribute
+ * which contains an array of object reference pointers which refer to palettes in the file.
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
{
hid_t did;
- hid_t atid=-1;
- hid_t aid=-1;
- hid_t asid=-1;
- hobj_ref_t ref; /* write a new reference */
- hobj_ref_t *refbuf; /* buffer to read references */
+ hid_t atid = -1;
+ hid_t aid = -1;
+ hid_t asid = -1;
+ hobj_ref_t ref; /* write a new reference */
+ hobj_ref_t *refbuf; /* buffer to read references */
hssize_t n_refs;
hsize_t dim_ref;
int ok_pal;
-
/* check the arguments */
- if (image_name == NULL)
- return -1;
- if (pal_name == NULL)
- return -1;
+ if (image_name == NULL)
+ return -1;
+ if (pal_name == NULL)
+ return -1;
/* The image dataset may or may not have the attribute "PALETTE"
- * First we try to open to see if it is already there; if not, it is created.
- * If it exists, the array of references is extended to hold the reference
- * to the new palette
- */
+ * First we try to open to see if it is already there; if not, it is created.
+ * If it exists, the array of references is extended to hold the reference
+ * to the new palette
+ */
/* First we get the image id */
- if((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
- ok_pal = H5LT_find_attribute( did, "PALETTE" );
+ ok_pal = H5LT_find_attribute(did, "PALETTE");
/*-------------------------------------------------------------------------
- * It does not exist. We create the attribute and one reference
- *-------------------------------------------------------------------------
- */
- if(ok_pal == 0 )
- {
- if((asid = H5Screate(H5S_SCALAR)) < 0)
+ * It does not exist. We create the attribute and one reference
+ *-------------------------------------------------------------------------
+ */
+ if (ok_pal == 0) {
+ if ((asid = H5Screate(H5S_SCALAR)) < 0)
goto out;
/* Create the attribute type for the reference */
- if((atid = H5Tcopy(H5T_STD_REF_OBJ)) < 0)
+ if ((atid = H5Tcopy(H5T_STD_REF_OBJ)) < 0)
goto out;
/* Create the attribute "PALETTE" to be attached to the image*/
- if((aid = H5Acreate2(did, "PALETTE", atid, asid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(did, "PALETTE", atid, asid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* Create a reference. The reference is created on the local id. */
- if(H5Rcreate(&ref, loc_id, pal_name, H5R_OBJECT, (hid_t)-1) < 0)
+ if (H5Rcreate(&ref, loc_id, pal_name, H5R_OBJECT, (hid_t)-1) < 0)
goto out;
/* Write the attribute with the reference */
- if(H5Awrite(aid, atid, &ref) < 0)
+ if (H5Awrite(aid, atid, &ref) < 0)
goto out;
/* close */
- if(H5Sclose(asid) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
- if(H5Tclose(atid) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
-
}
/*-------------------------------------------------------------------------
- * The attribute already exists, open it
- *-------------------------------------------------------------------------
- */
- else if(ok_pal == 1)
- {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ * The attribute already exists, open it
+ *-------------------------------------------------------------------------
+ */
+ else if (ok_pal == 1) {
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if(H5Tget_class(atid) < 0)
+ if (H5Tget_class(atid) < 0)
goto out;
/* Get and save the old reference(s) */
- if((asid = H5Aget_space(aid)) < 0)
+ if ((asid = H5Aget_space(aid)) < 0)
goto out;
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = (hsize_t)n_refs + 1;
- refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
+ refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
- if ( H5Aread( aid, atid, refbuf ) < 0)
+ if (H5Aread(aid, atid, refbuf) < 0)
goto out;
/* The attribute must be deleted, in order to the new one can reflect the changes*/
- if(H5Adelete(did, "PALETTE") < 0)
+ if (H5Adelete(did, "PALETTE") < 0)
goto out;
/* Create a new reference for this palette. */
- if ( H5Rcreate( &ref, loc_id, pal_name, H5R_OBJECT, (hid_t)-1 ) < 0)
+ if (H5Rcreate(&ref, loc_id, pal_name, H5R_OBJECT, (hid_t)-1) < 0)
goto out;
refbuf[n_refs] = ref;
/* Create the data space for the new references */
- if(H5Sclose(asid) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
- if((asid = H5Screate_simple(1, &dim_ref, NULL)) < 0)
+ if ((asid = H5Screate_simple(1, &dim_ref, NULL)) < 0)
goto out;
/* Create the attribute again with the changes of space */
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
- if((aid = H5Acreate2(did, "PALETTE", atid, asid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(did, "PALETTE", atid, asid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* Write the attribute with the new references */
- if(H5Awrite(aid, atid, refbuf) < 0)
+ if (H5Awrite(aid, atid, refbuf) < 0)
goto out;
/* close */
- if(H5Sclose(asid) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
- if(H5Tclose(atid) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
- HDfree( refbuf );
+ HDfree(refbuf);
} /* ok_pal == 1 */
/* Close the image dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return 0;
out:
- H5Dclose( did );
- H5Sclose( asid );
- H5Tclose( atid );
- H5Aclose( aid );
+ H5Dclose(did);
+ H5Sclose(asid);
+ H5Tclose(atid);
+ H5Aclose(aid);
return -1;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5IMunlink_palette
-*
-* Purpose: This function dettaches a palette from an existing image dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: September 10, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMunlink_palette( hid_t loc_id,
- const char *image_name,
- const char *pal_name )
+ * Function: H5IMunlink_palette
+ *
+ * Purpose: This function dettaches a palette from an existing image dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: September 10, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMunlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
{
hid_t did;
hid_t atid;
@@ -713,98 +677,94 @@ herr_t H5IMunlink_palette( hid_t loc_id,
int ok_pal, has_pal;
/* check the arguments */
- if(image_name == NULL)
- return -1;
- if(pal_name == NULL)
- return -1;
+ if (image_name == NULL)
+ return -1;
+ if (pal_name == NULL)
+ return -1;
/* Try to find the palette dataset */
- has_pal = H5LTfind_dataset( loc_id, pal_name );
+ has_pal = H5LTfind_dataset(loc_id, pal_name);
/* It does not exist. Return */
- if ( has_pal == 0 )
+ if (has_pal == 0)
return -1;
/* The image dataset may or not have the attribute "PALETTE"
- * First we try to open to see if it is already there; if not, it is created.
- * If it exists, the array of references is extended to hold the reference
- * to the new palette
- */
+ * First we try to open to see if it is already there; if not, it is created.
+ * If it exists, the array of references is extended to hold the reference
+ * to the new palette
+ */
/* First we get the image id */
- if((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
ok_pal = H5LT_find_attribute(did, "PALETTE");
/* It does not exist. Nothing to do */
- if(ok_pal == 0)
+ if (ok_pal == 0)
return -1;
/* The attribute exists, open it */
- else if(ok_pal == 1)
- {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ else if (ok_pal == 1) {
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if((aclass = H5Tget_class(atid)) < 0)
+ if ((aclass = H5Tget_class(atid)) < 0)
goto out;
/* Check if it is really a reference */
- if(aclass == H5T_REFERENCE)
- {
+ if (aclass == H5T_REFERENCE) {
/* Delete the attribute */
- if(H5Adelete(did, "PALETTE") < 0)
+ if (H5Adelete(did, "PALETTE") < 0)
goto out;
- } /* H5T_REFERENCE */
+ } /* H5T_REFERENCE */
- if(H5Tclose(atid) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
/* Close the attribute. */
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
} /* ok_pal */
/* Close the image dataset. */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return 0;
out:
- H5Dclose( did );
+ H5Dclose(did);
return -1;
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMget_npalettes
-*
-* Purpose: Gets the number of palettes associated to an image
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: July 22, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMget_npalettes( hid_t loc_id,
- const char *image_name,
- hssize_t *npals )
+ * Function: H5IMget_npalettes
+ *
+ * Purpose: Gets the number of palettes associated to an image
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: July 22, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMget_npalettes(hid_t loc_id, const char *image_name, hssize_t *npals)
{
hid_t did;
hid_t atid;
@@ -814,495 +774,469 @@ herr_t H5IMget_npalettes( hid_t loc_id,
int has_pal;
/* check the arguments */
- if(image_name == NULL)
- return -1;
+ if (image_name == NULL)
+ return -1;
/*assume initially we have no palettes attached*/
*npals = 0;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
has_pal = H5IM_find_palette(did);
- if(has_pal == 1 )
- {
+ if (has_pal == 1) {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if((aclass = H5Tget_class(atid)) < 0)
+ if ((aclass = H5Tget_class(atid)) < 0)
goto out;
/* Check if it is really a reference */
- if(aclass == H5T_REFERENCE)
- {
- if((asid = H5Aget_space(aid)) < 0)
+ if (aclass == H5T_REFERENCE) {
+ if ((asid = H5Aget_space(aid)) < 0)
goto out;
- *npals = H5Sget_simple_extent_npoints( asid );
+ *npals = H5Sget_simple_extent_npoints(asid);
- if ( H5Sclose( asid ) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
} /* H5T_REFERENCE */
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
/* Close the attribute. */
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
-
}
/* Close the image dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return 0;
out:
- H5Dclose( did );
+ H5Dclose(did);
return -1;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMget_palette_info
-*
-* Purpose: Get palette information
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: July 22, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMget_palette_info( hid_t loc_id,
- const char *image_name,
- int pal_number,
- hsize_t *pal_dims )
+ * Function: H5IMget_palette_info
+ *
+ * Purpose: Get palette information
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: July 22, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims)
{
- hid_t did;
- int has_pal;
- hid_t atid=-1;
- hid_t aid;
- hid_t asid=-1;
- hssize_t n_refs;
- hsize_t dim_ref;
- hobj_ref_t *refbuf; /* buffer to read references */
- hid_t pal_id;
- hid_t pal_space_id;
- hsize_t pal_maxdims[2];
+ hid_t did;
+ int has_pal;
+ hid_t atid = -1;
+ hid_t aid;
+ hid_t asid = -1;
+ hssize_t n_refs;
+ hsize_t dim_ref;
+ hobj_ref_t *refbuf; /* buffer to read references */
+ hid_t pal_id;
+ hid_t pal_space_id;
+ hsize_t pal_maxdims[2];
/* check the arguments */
- if (image_name == NULL)
- return -1;
+ if (image_name == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
has_pal = H5IM_find_palette(did);
- if(has_pal == 1)
- {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ if (has_pal == 1) {
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if(H5Tget_class(atid) < 0)
+ if (H5Tget_class(atid) < 0)
goto out;
/* Get the reference(s) */
- if((asid = H5Aget_space(aid)) < 0)
+ if ((asid = H5Aget_space(aid)) < 0)
goto out;
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = (hsize_t)n_refs;
- refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
+ refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
- if ( H5Aread( aid, atid, refbuf ) < 0)
+ if (H5Aread(aid, atid, refbuf) < 0)
goto out;
/* Get the actual palette */
- if ( (pal_id = H5Rdereference( did, H5R_OBJECT, &refbuf[pal_number] )) < 0)
+ if ((pal_id = H5Rdereference(did, H5R_OBJECT, &refbuf[pal_number])) < 0)
goto out;
- if ( (pal_space_id = H5Dget_space( pal_id )) < 0)
+ if ((pal_space_id = H5Dget_space(pal_id)) < 0)
goto out;
- if ( H5Sget_simple_extent_ndims( pal_space_id ) < 0)
+ if (H5Sget_simple_extent_ndims(pal_space_id) < 0)
goto out;
- if ( H5Sget_simple_extent_dims( pal_space_id, pal_dims, pal_maxdims ) < 0)
+ if (H5Sget_simple_extent_dims(pal_space_id, pal_dims, pal_maxdims) < 0)
goto out;
/* close */
- if (H5Dclose(pal_id)<0)
+ if (H5Dclose(pal_id) < 0)
goto out;
- if ( H5Sclose( pal_space_id ) < 0)
+ if (H5Sclose(pal_space_id) < 0)
goto out;
- if ( H5Sclose( asid ) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
- HDfree( refbuf );
-
-
+ HDfree(refbuf);
}
/* Close the image dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return 0;
out:
- H5Dclose( did );
- H5Sclose( asid );
- H5Tclose( atid );
- H5Aclose( aid );
+ H5Dclose(did);
+ H5Sclose(asid);
+ H5Tclose(atid);
+ H5Aclose(aid);
return -1;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5IMget_palette
-*
-* Purpose: Read palette
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: August 30, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMget_palette( hid_t loc_id,
- const char *image_name,
- int pal_number,
- unsigned char *pal_data )
+ * Function: H5IMget_palette
+ *
+ * Purpose: Read palette
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: August 30, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data)
{
- hid_t did;
- int has_pal;
- hid_t atid=-1;
- hid_t aid;
- hid_t asid=-1;
- hssize_t n_refs;
- hsize_t dim_ref;
- hobj_ref_t *refbuf; /* buffer to read references */
- hid_t pal_id;
+ hid_t did;
+ int has_pal;
+ hid_t atid = -1;
+ hid_t aid;
+ hid_t asid = -1;
+ hssize_t n_refs;
+ hsize_t dim_ref;
+ hobj_ref_t *refbuf; /* buffer to read references */
+ hid_t pal_id;
/* check the arguments */
- if (image_name == NULL)
- return -1;
- if (pal_data == NULL)
- return -1;
-
+ if (image_name == NULL)
+ return -1;
+ if (pal_data == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
has_pal = H5IM_find_palette(did);
- if(has_pal == 1 )
- {
- if((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
+ if (has_pal == 1) {
+ if ((aid = H5Aopen(did, "PALETTE", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- if(H5Tget_class(atid) < 0)
+ if (H5Tget_class(atid) < 0)
goto out;
/* Get the reference(s) */
- if((asid = H5Aget_space(aid)) < 0)
+ if ((asid = H5Aget_space(aid)) < 0)
goto out;
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = (hsize_t)n_refs;
- refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
+ refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
- if ( H5Aread( aid, atid, refbuf ) < 0)
+ if (H5Aread(aid, atid, refbuf) < 0)
goto out;
/* Get the palette id */
- if ( (pal_id = H5Rdereference( did, H5R_OBJECT, &refbuf[pal_number] )) < 0)
+ if ((pal_id = H5Rdereference(did, H5R_OBJECT, &refbuf[pal_number])) < 0)
goto out;
/* Read the palette dataset */
- if ( H5Dread( pal_id, H5Dget_type(pal_id), H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data ) < 0)
+ if (H5Dread(pal_id, H5Dget_type(pal_id), H5S_ALL, H5S_ALL, H5P_DEFAULT, pal_data) < 0)
goto out;
/* close */
- if (H5Dclose(pal_id)<0)
+ if (H5Dclose(pal_id) < 0)
goto out;
- if ( H5Sclose( asid ) < 0)
+ if (H5Sclose(asid) < 0)
goto out;
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
- HDfree( refbuf );
+ HDfree(refbuf);
}
/* Close the image dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return 0;
out:
- H5Dclose( did );
- H5Sclose( asid );
- H5Tclose( atid );
- H5Aclose( aid );
+ H5Dclose(did);
+ H5Sclose(asid);
+ H5Tclose(atid);
+ H5Aclose(aid);
return -1;
-
}
/*-------------------------------------------------------------------------
-* Function: H5IMis_image
-*
-* Purpose:
-*
-* Return: true, false, fail
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: August 30, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMis_image( hid_t loc_id,
- const char *dset_name )
+ * Function: H5IMis_image
+ *
+ * Purpose:
+ *
+ * Return: true, false, fail
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: August 30, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMis_image(hid_t loc_id, const char *dset_name)
{
- hid_t did;
- int has_class;
- hid_t atid;
- hid_t aid = -1;
- char* attr_data; /* Name of attribute */
- hsize_t storage_size; /* Size of storage for attribute */
- herr_t ret;
+ hid_t did;
+ int has_class;
+ hid_t atid;
+ hid_t aid = -1;
+ char * attr_data; /* Name of attribute */
+ hsize_t storage_size; /* Size of storage for attribute */
+ herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Assume initially fail condition */
ret = -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
has_class = H5LT_find_attribute(did, "CLASS");
- if(has_class == 0)
- {
+ if (has_class == 0) {
H5Dclose(did);
return 0;
}
- else if(has_class == 1)
- {
+ else if (has_class == 1) {
- if((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- /* check to make sure attribute is a string */
- if(H5T_STRING != H5Tget_class(atid))
- goto out;
+ /* check to make sure attribute is a string */
+ if (H5T_STRING != H5Tget_class(atid))
+ goto out;
- /* check to make sure string is null-terminated */
- if(H5T_STR_NULLTERM != H5Tget_strpad(atid))
- goto out;
+ /* check to make sure string is null-terminated */
+ if (H5T_STR_NULLTERM != H5Tget_strpad(atid))
+ goto out;
- /* allocate buffer large enough to hold string */
- if((storage_size = H5Aget_storage_size(aid)) == 0)
- goto out;
+ /* allocate buffer large enough to hold string */
+ if ((storage_size = H5Aget_storage_size(aid)) == 0)
+ goto out;
- attr_data = (char*)HDmalloc( (size_t)storage_size * sizeof(char) + 1);
- if(attr_data == NULL)
- goto out;
+ attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ if (attr_data == NULL)
+ goto out;
- if(H5Aread(aid, atid, attr_data) < 0)
+ if (H5Aread(aid, atid, attr_data) < 0)
goto out;
- if(HDstrncmp(attr_data, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS),HDstrlen(attr_data))) == 0)
+ if (HDstrncmp(attr_data, IMAGE_CLASS, MIN(HDstrlen(IMAGE_CLASS), HDstrlen(attr_data))) == 0)
ret = 1;
else
ret = 0;
- HDfree(attr_data);
+ HDfree(attr_data);
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
-
}
/* Close the dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return ret;
out:
- H5Dclose( did );
+ H5Dclose(did);
return -1;
-
}
/*-------------------------------------------------------------------------
-* Function: H5IMis_palette
-*
-* Purpose:
-*
-* Return: true, false, fail
-*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
-*
-* Date: August 30, 2001
-*
-* Comments:
-* based on HDF5 Image and Palette Specification
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5IMis_palette( hid_t loc_id,
- const char *dset_name )
+ * Function: H5IMis_palette
+ *
+ * Purpose:
+ *
+ * Return: true, false, fail
+ *
+ * Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+ *
+ * Date: August 30, 2001
+ *
+ * Comments:
+ * based on HDF5 Image and Palette Specification
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5IMis_palette(hid_t loc_id, const char *dset_name)
{
- hid_t did;
- int has_class;
- hid_t atid;
- hid_t aid = -1;
- char* attr_data; /* Name of attribute */
- hsize_t storage_size; /* Size of storage for attribute */
- herr_t ret;
+ hid_t did;
+ int has_class;
+ hid_t atid;
+ hid_t aid = -1;
+ char * attr_data; /* Name of attribute */
+ hsize_t storage_size; /* Size of storage for attribute */
+ herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Assume initially fail condition */
ret = -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
has_class = H5LT_find_attribute(did, "CLASS");
- if(has_class == 0)
- {
- H5Dclose( did );
+ if (has_class == 0) {
+ H5Dclose(did);
return 0;
}
- else if(has_class == 1)
- {
+ else if (has_class == 1) {
- if((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
+ if ((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
goto out;
- if((atid = H5Aget_type(aid)) < 0)
+ if ((atid = H5Aget_type(aid)) < 0)
goto out;
- /* check to make sure attribute is a string */
- if(H5T_STRING != H5Tget_class(atid))
- goto out;
+ /* check to make sure attribute is a string */
+ if (H5T_STRING != H5Tget_class(atid))
+ goto out;
- /* check to make sure string is null-terminated */
- if(H5T_STR_NULLTERM != H5Tget_strpad(atid))
- goto out;
+ /* check to make sure string is null-terminated */
+ if (H5T_STR_NULLTERM != H5Tget_strpad(atid))
+ goto out;
- /* allocate buffer large enough to hold string */
- if((storage_size = H5Aget_storage_size(aid)) == 0)
- goto out;
+ /* allocate buffer large enough to hold string */
+ if ((storage_size = H5Aget_storage_size(aid)) == 0)
+ goto out;
- attr_data = (char*)HDmalloc( (size_t)storage_size * sizeof(char) + 1);
- if(attr_data == NULL)
- goto out;
+ attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ if (attr_data == NULL)
+ goto out;
- if(H5Aread(aid, atid, attr_data) < 0)
+ if (H5Aread(aid, atid, attr_data) < 0)
goto out;
- if(HDstrncmp(attr_data, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS),HDstrlen(attr_data))) == 0)
+ if (HDstrncmp(attr_data, PALETTE_CLASS, MIN(HDstrlen(PALETTE_CLASS), HDstrlen(attr_data))) == 0)
ret = 1;
else
ret = 0;
- HDfree(attr_data);
+ HDfree(attr_data);
- if ( H5Tclose( atid ) < 0)
+ if (H5Tclose(atid) < 0)
goto out;
- if ( H5Aclose( aid ) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
-
}
/* Close the dataset. */
- if ( H5Dclose( did ) < 0)
+ if (H5Dclose(did) < 0)
return -1;
return ret;
out:
- H5Dclose( did );
+ H5Dclose(did);
return -1;
-
}
-
diff --git a/hl/src/H5IMprivate.h b/hl/src/H5IMprivate.h
index 6776c9d..8803a4c 100644
--- a/hl/src/H5IMprivate.h
+++ b/hl/src/H5IMprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,20 +20,16 @@
/* public IM prototypes */
#include "H5IMpublic.h"
-
#define IMAGE_CLASS "IMAGE"
#define PALETTE_CLASS "PALETTE"
#define IMAGE_VERSION "1.2"
-#define IMAGE8_RANK 2
-#define IMAGE24_RANK 3
-
+#define IMAGE8_RANK 2
+#define IMAGE24_RANK 3
/*-------------------------------------------------------------------------
* Private functions
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5IM_find_palette(hid_t loc_id );
-
+H5_HLDLL herr_t H5IM_find_palette(hid_t loc_id);
#endif
-
diff --git a/hl/src/H5IMpublic.h b/hl/src/H5IMpublic.h
index a95e439..fae4902 100644
--- a/hl/src/H5IMpublic.h
+++ b/hl/src/H5IMpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,69 +14,38 @@
#ifndef _H5IMpublic_H
#define _H5IMpublic_H
-
#ifdef __cplusplus
extern "C" {
#endif
+H5_HLDLL herr_t H5IMmake_image_8bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const unsigned char *buffer);
+
+H5_HLDLL herr_t H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height,
+ const char *interlace, const unsigned char *buffer);
+
+H5_HLDLL herr_t H5IMget_image_info(hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height,
+ hsize_t *planes, char *interlace, hssize_t *npals);
+
+H5_HLDLL herr_t H5IMread_image(hid_t loc_id, const char *dset_name, unsigned char *buffer);
+
+H5_HLDLL herr_t H5IMmake_palette(hid_t loc_id, const char *pal_name, const hsize_t *pal_dims,
+ const unsigned char *pal_data);
+
+H5_HLDLL herr_t H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name);
+
+H5_HLDLL herr_t H5IMunlink_palette(hid_t loc_id, const char *image_name, const char *pal_name);
+
+H5_HLDLL herr_t H5IMget_npalettes(hid_t loc_id, const char *image_name, hssize_t *npals);
+
+H5_HLDLL herr_t H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims);
+
+H5_HLDLL herr_t H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number,
+ unsigned char *pal_data);
+
+H5_HLDLL herr_t H5IMis_image(hid_t loc_id, const char *dset_name);
-H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const unsigned char *buffer );
-
-H5_HLDLL herr_t H5IMmake_image_24bit( hid_t loc_id,
- const char *dset_name,
- hsize_t width,
- hsize_t height,
- const char *interlace,
- const unsigned char *buffer );
-
-H5_HLDLL herr_t H5IMget_image_info( hid_t loc_id,
- const char *dset_name,
- hsize_t *width,
- hsize_t *height,
- hsize_t *planes,
- char *interlace,
- hssize_t *npals );
-
-H5_HLDLL herr_t H5IMread_image( hid_t loc_id,
- const char *dset_name,
- unsigned char *buffer );
-
-H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id,
- const char *pal_name,
- const hsize_t *pal_dims,
- const unsigned char *pal_data );
-
-H5_HLDLL herr_t H5IMlink_palette( hid_t loc_id,
- const char *image_name,
- const char *pal_name );
-
-H5_HLDLL herr_t H5IMunlink_palette( hid_t loc_id,
- const char *image_name,
- const char *pal_name );
-
-H5_HLDLL herr_t H5IMget_npalettes( hid_t loc_id,
- const char *image_name,
- hssize_t *npals );
-
-H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id,
- const char *image_name,
- int pal_number,
- hsize_t *pal_dims );
-
-H5_HLDLL herr_t H5IMget_palette( hid_t loc_id,
- const char *image_name,
- int pal_number,
- unsigned char *pal_data );
-
-H5_HLDLL herr_t H5IMis_image( hid_t loc_id,
- const char *dset_name );
-
-H5_HLDLL herr_t H5IMis_palette( hid_t loc_id,
- const char *dset_name );
+H5_HLDLL herr_t H5IMis_palette(hid_t loc_id, const char *dset_name);
#ifdef __cplusplus
}
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index a9db3b4..81c547e 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1,48 +1,41 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "H5LTprivate.h"
-#include "H5private.h"
/* For Lex and Yacc */
-#define COL 3
-#define LIMIT 512
-#define INCREMENT 1024
-#define TMP_LEN 256
-#define MAX(a,b) (((a)>(b)) ? (a) : (b))
-size_t input_len;
-char *myinput;
-size_t indent = 0;
-
-
-/* File Image operations
-
- A file image is a representation of an HDF5 file in a memory
- buffer. In order to perform operations on an image in a similar way
+#define COL 3
+#define LIMIT 512
+#define INCREMENT 1024
+#define TMP_LEN 256
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+size_t input_len;
+char * myinput;
+size_t indent = 0;
+
+/* File Image operations
+
+ A file image is a representation of an HDF5 file in a memory
+ buffer. In order to perform operations on an image in a similar way
to a file, the application buffer is copied to a FAPL buffer, which
- in turn is copied to a VFD buffer. Buffer copying can decrease
- performance, especially when using large file images. A solution to
- this issue is to simulate the copying of the application buffer,
- when actually the same buffer is used for the FAPL and the VFD.
- This is implemented by using callbacks that simulate the standard
- functions for memory management (additional callbacks are used for
- the management of associated data structures). From the application
- standpoint, a file handle can be obtained from a file image by using
+ in turn is copied to a VFD buffer. Buffer copying can decrease
+ performance, especially when using large file images. A solution to
+ this issue is to simulate the copying of the application buffer,
+ when actually the same buffer is used for the FAPL and the VFD.
+ This is implemented by using callbacks that simulate the standard
+ functions for memory management (additional callbacks are used for
+ the management of associated data structures). From the application
+ standpoint, a file handle can be obtained from a file image by using
the API routine H5LTopen_file_image(). This function takes a flag
argument that indicates the HDF5 library how to handle the given image;
several flag values can be combined by using the bitwise OR operator.
@@ -62,180 +55,178 @@ size_t indent = 0;
well. The application is responsible to release the image buffer.
*/
-/* Data structure to pass application data to callbacks. */
+/* Data structure to pass application data to callbacks. */
typedef struct {
- void *app_image_ptr; /* Pointer to application buffer */
- size_t app_image_size; /* Size of application buffer */
- void *fapl_image_ptr; /* Pointer to FAPL buffer */
- size_t fapl_image_size; /* Size of FAPL buffer */
- int fapl_ref_count; /* Reference counter for FAPL buffer */
- void *vfd_image_ptr; /* Pointer to VFD buffer */
- size_t vfd_image_size; /* Size of VFD buffer */
- int vfd_ref_count; /* Reference counter for VFD buffer */
- unsigned flags; /* Flags indicate how the file image will */
- /* be open */
- int ref_count; /* Reference counter on udata struct */
+ void * app_image_ptr; /* Pointer to application buffer */
+ size_t app_image_size; /* Size of application buffer */
+ void * fapl_image_ptr; /* Pointer to FAPL buffer */
+ size_t fapl_image_size; /* Size of FAPL buffer */
+ int fapl_ref_count; /* Reference counter for FAPL buffer */
+ void * vfd_image_ptr; /* Pointer to VFD buffer */
+ size_t vfd_image_size; /* Size of VFD buffer */
+ int vfd_ref_count; /* Reference counter for VFD buffer */
+ unsigned flags; /* Flags indicate how the file image will */
+ /* be open */
+ int ref_count; /* Reference counter on udata struct */
} H5LT_file_image_ud_t;
/* callbacks prototypes for file image ops */
-static void *image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *udata);
-static void *image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op, void *udata);
-static void *image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata);
+static void * image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *udata);
+static void * image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op,
+ void *udata);
+static void * image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata);
static herr_t image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *udata);
-static void *udata_copy(void *udata);
+static void * udata_copy(void *udata);
static herr_t udata_free(void *udata);
/* Definition of callbacks for file image operations. */
-
-/*-------------------------------------------------------------------------
-* Function: image_malloc
-*
-* Purpose: Simulates malloc() function to avoid copying file images.
-* The application buffer is set to the buffer on only one FAPL.
-* Then the FAPL buffer can be copied to other FAPL buffers or
-* to only one VFD buffer.
-*
-* Return: Address of "allocated" buffer, if successful. Otherwise, it returns
-* NULL.
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+/*-------------------------------------------------------------------------
+ * Function: image_malloc
+ *
+ * Purpose: Simulates malloc() function to avoid copying file images.
+ * The application buffer is set to the buffer on only one FAPL.
+ * Then the FAPL buffer can be copied to other FAPL buffers or
+ * to only one VFD buffer.
+ *
+ * Return: Address of "allocated" buffer, if successful. Otherwise, it returns
+ * NULL.
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static void *
image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
{
- H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
- void * return_value = NULL;
-
+ H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
+ void * return_value = NULL;
+
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- switch ( file_image_op ) {
+ switch (file_image_op) {
/* the app buffer is "copied" to only one FAPL. Afterwards, FAPLs can be "copied" */
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (udata->app_image_ptr == NULL)
+ if (udata->app_image_ptr == NULL)
goto out;
- if (udata->app_image_size != size)
+ if (udata->app_image_size != size)
goto out;
- if (udata->fapl_image_ptr != NULL)
+ if (udata->fapl_image_ptr != NULL)
goto out;
- if (udata->fapl_image_size != 0)
+ if (udata->fapl_image_size != 0)
goto out;
- if (udata->fapl_ref_count != 0)
+ if (udata->fapl_ref_count != 0)
goto out;
- udata->fapl_image_ptr = udata->app_image_ptr;
+ udata->fapl_image_ptr = udata->app_image_ptr;
udata->fapl_image_size = udata->app_image_size;
- return_value = udata->fapl_image_ptr;
+ return_value = udata->fapl_image_ptr;
udata->fapl_ref_count++;
- break;
+ break;
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (udata->fapl_image_ptr == NULL)
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
return_value = udata->fapl_image_ptr;
udata->fapl_ref_count++;
- break;
+ break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
goto out;
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
/* FAPL buffer is "copied" to only one VFD buffer */
- if (udata->vfd_image_ptr != NULL)
+ if (udata->vfd_image_ptr != NULL)
goto out;
- if (udata->vfd_image_size != 0)
+ if (udata->vfd_image_size != 0)
goto out;
- if (udata->vfd_ref_count != 0)
+ if (udata->vfd_ref_count != 0)
goto out;
- if (udata->fapl_image_ptr == NULL)
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
- udata->vfd_image_ptr = udata->fapl_image_ptr;
- udata->vfd_image_size = size;
+ udata->vfd_image_ptr = udata->fapl_image_ptr;
+ udata->vfd_image_size = size;
udata->vfd_ref_count++;
return_value = udata->vfd_image_ptr;
break;
- /* added unused labels to shut the compiler up */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
+ /* added unused labels to shut the compiler up */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
default:
goto out;
} /* end switch */
- return(return_value);
+ return (return_value);
out:
return NULL;
} /* end image_malloc() */
-
-/*-------------------------------------------------------------------------
-* Function: image_memcpy
-*
-* Purpose: Simulates memcpy() function to avoid copying file images.
-* The image buffer can be set to only one FAPL buffer, and
-* "copied" to only one VFD buffer. The FAPL buffer can be
-* "copied" to other FAPLs buffers.
-*
-* Return: The address of the destination buffer, if successful. Otherwise, it
-* returns NULL.
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+/*-------------------------------------------------------------------------
+ * Function: image_memcpy
+ *
+ * Purpose: Simulates memcpy() function to avoid copying file images.
+ * The image buffer can be set to only one FAPL buffer, and
+ * "copied" to only one VFD buffer. The FAPL buffer can be
+ * "copied" to other FAPLs buffers.
+ *
+ * Return: The address of the destination buffer, if successful. Otherwise, it
+ * returns NULL.
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static void *
-image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op,
- void *_udata)
+image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- switch(file_image_op) {
+ switch (file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->app_image_ptr)
+ if (src != udata->app_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (size != udata->app_image_size)
+ if (size != udata->app_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count < 2)
+ if (udata->fapl_ref_count < 2)
goto out;
break;
@@ -243,700 +234,659 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
goto out;
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
- if (dest != udata->vfd_image_ptr)
+ if (dest != udata->vfd_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->vfd_image_size)
+ if (size != udata->vfd_image_size)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
break;
- /* added unused labels to shut the compiler up */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
+ /* added unused labels to shut the compiler up */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
default:
goto out;
} /* end switch */
- return(dest);
+ return (dest);
out:
return NULL;
} /* end image_memcpy() */
-
-/*-------------------------------------------------------------------------
-* Function: image_realloc
-*
-* Purpose: Reallocates the shared application image buffer and updates data
-* structures that manage buffer "copying".
-*
-* Return: Address of reallocated buffer, if successful. Otherwise, it returns
-* NULL.
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+/*-------------------------------------------------------------------------
+ * Function: image_realloc
+ *
+ * Purpose: Reallocates the shared application image buffer and updates data
+ * structures that manage buffer "copying".
+ *
+ * Return: Address of reallocated buffer, if successful. Otherwise, it returns
+ * NULL.
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static void *
image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
{
- H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
- void * return_value = NULL;
+ H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
+ void * return_value = NULL;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- /* realloc() is not allowed when the HDF5 library won't release the image
+ /* realloc() is not allowed when the HDF5 library won't release the image
buffer because reallocation may change the address of the buffer. The
new address cannot be communicated to the application to release it. */
- if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
- goto out;
+ if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
+ goto out;
/* realloc() is not allowed if the image is open in read-only mode */
- if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
- goto out;
+ if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
+ goto out;
if (file_image_op == H5FD_FILE_IMAGE_OP_FILE_RESIZE) {
- if (udata->vfd_image_ptr != ptr)
- goto out;
+ if (udata->vfd_image_ptr != ptr)
+ goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
if (NULL == (udata->vfd_image_ptr = HDrealloc(ptr, size)))
- goto out;
-
+ goto out;
+
udata->vfd_image_size = size;
- return_value = udata->vfd_image_ptr;
+ return_value = udata->vfd_image_ptr;
} /* end if */
else
goto out;
- return(return_value);
+ return (return_value);
out:
return NULL;
} /* end image_realloc() */
-
/*-------------------------------------------------------------------------
-* Function: image_free
-*
-* Purpose: Simulates deallocation of FAPL and VFD buffers by decreasing
-* reference counters. Shared application buffer is actually
-* deallocated if there are no outstanding references.
-*
-* Return: SUCCEED or FAIL
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: image_free
+ *
+ * Purpose: Simulates deallocation of FAPL and VFD buffers by decreasing
+ * reference counters. Shared application buffer is actually
+ * deallocated if there are no outstanding references.
+ *
+ * Return: SUCCEED or FAIL
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- switch(file_image_op) {
+ switch (file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- if (udata->fapl_image_ptr != ptr)
+ if (udata->fapl_image_ptr != ptr)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
udata->fapl_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding
+ * references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
- !(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
+ !(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->fapl_image_ptr);
- udata->app_image_ptr = NULL;
+ udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
- udata->vfd_image_ptr = NULL;
+ udata->vfd_image_ptr = NULL;
} /* end if */
break;
case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
- if (udata->vfd_image_ptr != ptr)
+ if (udata->vfd_image_ptr != ptr)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
udata->vfd_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding
+ * references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
- !(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
+ !(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->vfd_image_ptr);
- udata->app_image_ptr = NULL;
+ udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
- udata->vfd_image_ptr = NULL;
+ udata->vfd_image_ptr = NULL;
} /* end if */
break;
- /* added unused labels to keep the compiler quite */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
- case H5FD_FILE_IMAGE_OP_FILE_OPEN:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- default:
+ /* added unused labels to keep the compiler quite */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
+ case H5FD_FILE_IMAGE_OP_FILE_OPEN:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ default:
goto out;
} /* end switch */
- return(SUCCEED);
+ return (SUCCEED);
out:
- return(FAIL);
+ return (FAIL);
} /* end image_free() */
-
-/*-------------------------------------------------------------------------
-* Function: udata_copy
-*
-* Purpose: Simulates the copying of the user data structure utilized in the
-* management of the "copying" of file images.
-*
-* Return: Address of "newly allocated" structure, if successful. Otherwise, it
-* returns NULL.
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+/*-------------------------------------------------------------------------
+ * Function: udata_copy
+ *
+ * Purpose: Simulates the copying of the user data structure utilized in the
+ * management of the "copying" of file images.
+ *
+ * Return: Address of "newly allocated" structure, if successful. Otherwise, it
+ * returns NULL.
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static void *
udata_copy(void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count++;
- return(udata);
+ return (udata);
out:
return NULL;
} /* end udata_copy */
-
/*-------------------------------------------------------------------------
-* Function: udata_free
-*
-* Purpose: Simulates deallocation of the user data structure utilized in the
-* management of the "copying" of file images. The data structure is
-* actually deallocated when there are no outstanding references.
-*
-* Return: SUCCEED or FAIL
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: udata_free
+ *
+ * Purpose: Simulates deallocation of the user data structure utilized in the
+ * management of the "copying" of file images. The data structure is
+ * actually deallocated when there are no outstanding references.
+ *
+ * Return: SUCCEED or FAIL
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
udata_free(void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count--;
/* checks that there are no references outstanding before deallocating udata */
- if (udata->ref_count == 0 && udata->fapl_ref_count == 0 &&
- udata->vfd_ref_count == 0)
+ if (udata->ref_count == 0 && udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0)
HDfree(udata);
- return(SUCCEED);
+ return (SUCCEED);
-out:
- return(FAIL);
+out:
+ return (FAIL);
} /* end udata_free */
/* End of callbacks definitions for file image operations */
/*-------------------------------------------------------------------------
-*
-* internal functions
-*
-*-------------------------------------------------------------------------
-*/
-static herr_t H5LT_get_attribute_mem(hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hid_t mem_type_id,
- void *data);
-
-/*-------------------------------------------------------------------------
-* Function: H5LT_make_dataset
-*
-* Purpose: Creates and writes a dataset of a type tid
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
-*
-* Date: October 10, 2007
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * internal functions
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t H5LT_get_attribute_mem(hid_t loc_id, const char *obj_name, const char *attr_name,
+ hid_t mem_type_id, void *data);
+
+/*-------------------------------------------------------------------------
+ * Function: H5LT_make_dataset
+ *
+ * Purpose: Creates and writes a dataset of a type tid
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Quincey Koziol
+ *
+ * Date: October 10, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
-H5LT_make_dataset_numerical( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- hid_t tid,
- const void *data )
+H5LT_make_dataset_numerical(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t tid,
+ const void *data)
{
- hid_t did = -1, sid = -1;
+ hid_t did = -1, sid = -1;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Create the data space for the dataset. */
- if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
return -1;
/* Create the dataset. */
- if((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* Write the dataset only if there is data to write */
- if(data)
- if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ if (data)
+ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
goto out;
/* End access to the dataset and release resources used by it. */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
return -1;
/* Terminate access to the data space. */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
return -1;
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Sclose(sid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return -1;
}
/*-------------------------------------------------------------------------
-*
-* Public functions
-*
-*-------------------------------------------------------------------------
-*/
-
-/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset
-*
-* Purpose: Creates and writes a dataset of a type tid
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 19, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Public functions
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*-------------------------------------------------------------------------
+ * Function: H5LTmake_dataset
+ *
+ * Purpose: Creates and writes a dataset of a type tid
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 19, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- hid_t tid,
- const void *data )
+herr_t
+H5LTmake_dataset(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t tid,
+ const void *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, tid, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, tid, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_char
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_CHAR type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTmake_dataset_char
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_CHAR type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset_char( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const char *data )
+herr_t
+H5LTmake_dataset_char(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const char *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_CHAR, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_CHAR, data));
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_short
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_SHORT type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTmake_dataset_short
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_SHORT type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-
-herr_t H5LTmake_dataset_short( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const short *data )
+herr_t
+H5LTmake_dataset_short(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const short *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_SHORT, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_SHORT, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_int
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_INT type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTmake_dataset_int
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_INT type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset_int( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const int *data )
+herr_t
+H5LTmake_dataset_int(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const int *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_INT, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_INT, data));
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_long
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_LONG type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTmake_dataset_long
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_LONG type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset_long( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const long *data )
+herr_t
+H5LTmake_dataset_long(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const long *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_LONG, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_LONG, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_float
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTmake_dataset_float
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-
-herr_t H5LTmake_dataset_float( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const float *data )
+herr_t
+H5LTmake_dataset_float(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const float *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_FLOAT, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_FLOAT, data));
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_double
-*
-* Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 14, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTmake_dataset_double
+ *
+ * Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 14, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset_double( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const double *data )
+herr_t
+H5LTmake_dataset_double(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const double *data)
{
- return(H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_DOUBLE, data));
+ return (H5LT_make_dataset_numerical(loc_id, dset_name, rank, dims, H5T_NATIVE_DOUBLE, data));
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTmake_dataset_string
-*
-* Purpose: Creates and writes a dataset of H5T_C_S1 type
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTmake_dataset_string
+ *
+ * Purpose: Creates and writes a dataset of H5T_C_S1 type
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: October 05, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTmake_dataset_string(hid_t loc_id,
- const char *dset_name,
- const char *buf )
+herr_t
+H5LTmake_dataset_string(hid_t loc_id, const char *dset_name, const char *buf)
{
- hid_t did = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- size_t size;
+ hid_t did = -1;
+ hid_t sid = -1;
+ hid_t tid = -1;
+ size_t size;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* create a string data type */
- if((tid = H5Tcopy(H5T_C_S1)) < 0 )
+ if ((tid = H5Tcopy(H5T_C_S1)) < 0)
goto out;
size = HDstrlen(buf) + 1; /* extra null term */
- if(H5Tset_size(tid, size) < 0)
+ if (H5Tset_size(tid, size) < 0)
goto out;
- if(H5Tset_strpad(tid, H5T_STR_NULLTERM) < 0)
+ if (H5Tset_strpad(tid, H5T_STR_NULLTERM) < 0)
goto out;
/* Create the data space for the dataset. */
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
/* Create the dataset. */
- if((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* Write the dataset only if there is data to write */
- if(buf)
- if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (buf)
+ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
/* close*/
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
return -1;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
return -1;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Tclose(tid);
H5Sclose(sid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return -1;
}
-
-/*-------------------------------------------------------------------------
-* Function: H5LTopen_file_image
-*
-* Purpose: Open a user supplied file image using the core file driver.
-*
-* Return: File identifier, Failure: -1
-*
-* Programmer: Christian Chilan
-*
-* Date: October 3, 2011
-*
-*-------------------------------------------------------------------------
-*/
-hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
-{
- hid_t fapl, file_id; /* HDF5 identifiers */
- unsigned file_open_flags;/* Flags for image open */
- char file_name[64]; /* Filename buffer */
- size_t alloc_incr; /* Buffer allocation increment */
- size_t min_incr = 65536; /* Minimum buffer increment */
- double buf_prcnt = 0.1f; /* Percentage of buffer size to set
- as increment */
- static long file_name_counter;
- H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy,
- &image_realloc, &image_free,
- &udata_copy, &udata_free,
- (void *)NULL};
+/*-------------------------------------------------------------------------
+ * Function: H5LTopen_file_image
+ *
+ * Purpose: Open a user supplied file image using the core file driver.
+ *
+ * Return: File identifier, Failure: -1
+ *
+ * Programmer: Christian Chilan
+ *
+ * Date: October 3, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
+{
+ hid_t fapl = -1, file_id = -1; /* HDF5 identifiers */
+ unsigned file_open_flags; /* Flags for image open */
+ char file_name[64]; /* Filename buffer */
+ size_t alloc_incr; /* Buffer allocation increment */
+ size_t min_incr = 65536; /* Minimum buffer increment */
+ double buf_prcnt = 0.1f; /* Percentage of buffer size to set
+ as increment */
+ static long file_name_counter;
+ H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy, &image_realloc, &image_free,
+ &udata_copy, &udata_free, (void *)NULL};
/* check arguments */
- if (buf_ptr == NULL)
+ if (buf_ptr == NULL)
goto out;
- if (buf_size == 0)
+ if (buf_size == 0)
goto out;
if (flags & (unsigned)~(H5LT_FILE_IMAGE_ALL))
goto out;
/* Create FAPL to transmit file image */
- if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto out;
/* set allocation increment to a percentage of the supplied buffer size, or
* a pre-defined minimum increment value, whichever is larger
*/
- if ((buf_prcnt * buf_size) > min_incr)
- alloc_incr = (size_t)(buf_prcnt * buf_size);
+ if ((size_t)(buf_prcnt * (double)buf_size) > min_incr)
+ alloc_incr = (size_t)(buf_prcnt * (double)buf_size);
else
alloc_incr = min_incr;
/* Configure FAPL to use the core file driver */
- if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
goto out;
/* Set callbacks for file image ops ONLY if the file image is NOT copied */
if (flags & H5LT_FILE_IMAGE_DONT_COPY) {
- H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
+ H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
/* Allocate buffer to communicate user data to callbacks */
if (NULL == (udata = (H5LT_file_image_ud_t *)HDmalloc(sizeof(H5LT_file_image_ud_t))))
goto out;
/* Initialize udata with info about app buffer containing file image and flags */
- udata->app_image_ptr = buf_ptr;
- udata->app_image_size = buf_size;
- udata->fapl_image_ptr = NULL;
+ udata->app_image_ptr = buf_ptr;
+ udata->app_image_size = buf_size;
+ udata->fapl_image_ptr = NULL;
udata->fapl_image_size = 0;
- udata->fapl_ref_count = 0;
- udata->vfd_image_ptr = NULL;
- udata->vfd_image_size = 0;
- udata->vfd_ref_count = 0;
- udata->flags = flags;
- udata->ref_count = 1; /* corresponding to the first FAPL */
+ udata->fapl_ref_count = 0;
+ udata->vfd_image_ptr = NULL;
+ udata->vfd_image_size = 0;
+ udata->vfd_ref_count = 0;
+ udata->flags = flags;
+ udata->ref_count = 1; /* corresponding to the first FAPL */
/* copy address of udata into callbacks */
callbacks.udata = (void *)udata;
/* Set file image callbacks */
- if (H5Pset_file_image_callbacks(fapl, &callbacks) < 0) {
+ if (H5Pset_file_image_callbacks(fapl, &callbacks) < 0) {
HDfree(udata);
goto out;
} /* end if */
- } /* end if */
+ } /* end if */
/* Assign file image in user buffer to FAPL */
- if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
+ if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
goto out;
- /* set file open flags */
+ /* set file open flags */
if (flags & H5LT_FILE_IMAGE_OPEN_RW)
file_open_flags = H5F_ACC_RDWR;
else
@@ -944,59 +894,57 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* define a unique file name */
HDsnprintf(file_name, (sizeof(file_name) - 1), "file_image_%ld", file_name_counter++);
-
- /* Assign file image in FAPL to the core file driver */
- if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
+
+ /* Assign file image in FAPL to the core file driver */
+ if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
goto out;
/* Close FAPL */
- if (H5Pclose(fapl) < 0)
+ if (H5Pclose(fapl) < 0)
goto out;
- /* Return file identifier */
- return file_id;
+ /* Return file identifier */
+ return file_id;
out:
- H5E_BEGIN_TRY {
- H5Pclose(fapl);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Pclose(fapl); }
+ H5E_END_TRY;
return -1;
} /* end H5LTopen_file_image() */
-
/*-------------------------------------------------------------------------
-* Function: H5LT_read_dataset
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
-*
-* Date: October 8, 2007
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LT_read_dataset
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Quincey Koziol
+ *
+ * Date: October 8, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
H5LT_read_dataset_numerical(hid_t loc_id, const char *dset_name, hid_t tid, void *data)
{
- hid_t did;
+ hid_t did;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Read */
- if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
goto out;
/* End access to the dataset and release resources used by it. */
- if(H5Dclose(did))
+ if (H5Dclose(did))
return -1;
return 0;
@@ -1007,508 +955,493 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: June 13, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: June 13, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset(hid_t loc_id,
- const char *dset_name,
- hid_t tid,
- void *data)
+herr_t
+H5LTread_dataset(hid_t loc_id, const char *dset_name, hid_t tid, void *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, tid, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, tid, data));
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_char
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_char
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_char( hid_t loc_id,
- const char *dset_name,
- char *data )
+herr_t
+H5LTread_dataset_char(hid_t loc_id, const char *dset_name, char *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_CHAR, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_CHAR, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_short
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_short
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_short( hid_t loc_id,
- const char *dset_name,
- short *data )
+herr_t
+H5LTread_dataset_short(hid_t loc_id, const char *dset_name, short *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_SHORT, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_SHORT, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_int
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_int
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_int( hid_t loc_id,
- const char *dset_name,
- int *data )
+herr_t
+H5LTread_dataset_int(hid_t loc_id, const char *dset_name, int *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_INT, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_INT, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_long
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_long
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_long( hid_t loc_id,
- const char *dset_name,
- long *data )
+herr_t
+H5LTread_dataset_long(hid_t loc_id, const char *dset_name, long *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_LONG, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_LONG, data));
}
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_float
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_float
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_float( hid_t loc_id,
- const char *dset_name,
- float *data )
+herr_t
+H5LTread_dataset_float(hid_t loc_id, const char *dset_name, float *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_FLOAT, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_FLOAT, data));
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_double
-*
-* Purpose: Reads a dataset from disk.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 5, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_double
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 5, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_double( hid_t loc_id,
- const char *dset_name,
- double *data )
+herr_t
+H5LTread_dataset_double(hid_t loc_id, const char *dset_name, double *data)
{
- return(H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_DOUBLE, data));
+ return (H5LT_read_dataset_numerical(loc_id, dset_name, H5T_NATIVE_DOUBLE, data));
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTread_dataset_string
-*
-* Purpose: Reads a dataset
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: October 05, 2004
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTread_dataset_string
+ *
+ * Purpose: Reads a dataset
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: October 05, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTread_dataset_string( hid_t loc_id,
- const char *dset_name,
- char *buf )
+herr_t
+H5LTread_dataset_string(hid_t loc_id, const char *dset_name, char *buf)
{
- hid_t did = -1;
- hid_t tid = -1;
+ hid_t did = -1;
+ hid_t tid = -1;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* Read */
- if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
/* close */
- if(H5Dclose(did))
+ if (H5Dclose(did))
goto out;
- if(H5Tclose(tid))
+ if (H5Tclose(tid))
return -1;
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Tclose(tid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return -1;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_dataset_ndims
-*
-* Purpose: Gets the dimensionality of a dataset.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 4, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTget_dataset_ndims
+ *
+ * Purpose: Gets the dimensionality of a dataset.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 4, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTget_dataset_ndims( hid_t loc_id,
- const char *dset_name,
- int *rank )
+herr_t
+H5LTget_dataset_ndims(hid_t loc_id, const char *dset_name, int *rank)
{
- hid_t did = -1;
- hid_t sid = -1;
+ hid_t did = -1;
+ hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* Open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* Get rank */
- if((*rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((*rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* Terminate access to the dataspace */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/* End access to the dataset */
- if(H5Dclose(did))
+ if (H5Dclose(did))
return -1;
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Sclose(sid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return -1;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_dataset_info
-*
-* Purpose: Gets information about a dataset.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 4, 2001
-* Modified: February 28, 2006: checked for NULL parameters
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTget_dataset_info
+ *
+ * Purpose: Gets information about a dataset.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 4, 2001
+ * Modified: February 28, 2006: checked for NULL parameters
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTget_dataset_info( hid_t loc_id,
- const char *dset_name,
- hsize_t *dims,
- H5T_class_t *type_class,
- size_t *type_size )
+herr_t
+H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_class_t *type_class,
+ size_t *type_size)
{
- hid_t did = -1;
- hid_t tid = -1;
- hid_t sid = -1;
+ hid_t did = -1;
+ hid_t tid = -1;
+ hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
- return -1;
+ if (dset_name == NULL)
+ return -1;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* get an identifier for the datatype. */
tid = H5Dget_type(did);
/* get the class. */
- if(type_class != NULL)
+ if (type_class != NULL)
*type_class = H5Tget_class(tid);
/* get the size. */
- if(type_size!=NULL)
+ if (type_size != NULL)
*type_size = H5Tget_size(tid);
- if(dims != NULL) {
+ if (dims != NULL) {
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimensions */
- if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* terminate access to the dataspace */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
} /* end if */
/* release the datatype. */
- if(H5Tclose(tid))
+ if (H5Tclose(tid))
return -1;
/* end access to the dataset */
- if(H5Dclose(did))
+ if (H5Dclose(did))
return -1;
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Tclose(tid);
H5Sclose(sid);
H5Dclose(did);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return -1;
-
}
/*-------------------------------------------------------------------------
-* Function: find_dataset
-*
-* Purpose: operator function used by H5LTfind_dataset
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: June 21, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: find_dataset
+ *
+ * Purpose: operator function used by H5LTfind_dataset
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: June 21, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_data)
{
/* Define a default zero value for return. This will cause the iterator to continue if
- * the dataset is not found yet.
- */
+ * the dataset is not found yet.
+ */
int ret = 0;
/* check the arguments */
- if (name == NULL)
- return ret;
-
+ if (name == NULL)
+ return ret;
+
/* Shut the compiler up */
loc_id = loc_id;
- linfo = linfo;
+ linfo = linfo;
/* Define a positive value for return value if the dataset was found. This will
- * cause the iterator to immediately return that positive value,
- * indicating short-circuit success
- */
- if(HDstrncmp(name, (char *)op_data, HDstrlen((char *)op_data)) == 0)
+ * cause the iterator to immediately return that positive value,
+ * indicating short-circuit success
+ */
+ if (HDstrncmp(name, (char *)op_data, HDstrlen((char *)op_data)) == 0)
ret = 1;
return ret;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTfind_dataset
-*
-* Purpose: Inquires if a dataset named dset_name exists attached
-* to the object loc_id.
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: July 15, 2001
-*
-* Return:
-* Success: The return value of the first operator that
-* returns non-zero, or zero if all members were
-* processed with no operator returning non-zero.
-*
-* Failure: Negative if something goes wrong within the
-* library, or the negative value returned by one
-* of the operators.
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTfind_dataset
+ *
+ * Purpose: Inquires if a dataset named dset_name exists attached
+ * to the object loc_id.
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: July 15, 2001
+ *
+ * Return:
+ * Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+H5_GCC_DIAG_OFF("cast-qual")
herr_t
-H5LTfind_dataset( hid_t loc_id, const char *dset_name )
+H5LTfind_dataset(hid_t loc_id, const char *dset_name)
{
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name);
}
+H5_GCC_DIAG_ON("cast-qual")
+
+/*-------------------------------------------------------------------------
+ *
+ * Set attribute functions
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*-------------------------------------------------------------------------
+ * Function: H5LTset_attribute_string
+ *
+ * Purpose: Creates and writes a string attribute named attr_name and attaches
+ * it to the object specified by the name obj_name.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: July 23, 2001
+ *
+ * Comments: If the attribute already exists, it is overwritten
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-
-/*-------------------------------------------------------------------------
-*
-* Set attribute functions
-*
-*-------------------------------------------------------------------------
-*/
-
-
-/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_string
-*
-* Purpose: Creates and writes a string attribute named attr_name and attaches
-* it to the object specified by the name obj_name.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: July 23, 2001
-*
-* Comments: If the attribute already exists, it is overwritten
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5LTset_attribute_string( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const char *attr_data )
+herr_t
+H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name, const char *attr_data)
{
- hid_t attr_type;
- hid_t attr_space_id;
- hid_t attr_id;
- hid_t obj_id;
- int has_attr;
- size_t attr_size;
+ hid_t attr_type;
+ hid_t attr_space_id;
+ hid_t attr_id;
+ hid_t obj_id;
+ int has_attr;
+ size_t attr_size;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
- if (attr_data == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
+ if (attr_data == NULL)
+ return -1;
/* Open the object */
if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
return -1;
/* Create the attribute */
- if ( (attr_type = H5Tcopy( H5T_C_S1 )) < 0 )
+ if ((attr_type = H5Tcopy(H5T_C_S1)) < 0)
goto out;
- attr_size = HDstrlen( attr_data ) + 1; /* extra null term */
+ attr_size = HDstrlen(attr_data) + 1; /* extra null term */
- if ( H5Tset_size( attr_type, (size_t)attr_size) < 0 )
+ if (H5Tset_size(attr_type, (size_t)attr_size) < 0)
goto out;
- if ( H5Tset_strpad( attr_type, H5T_STR_NULLTERM ) < 0 )
+ if (H5Tset_strpad(attr_type, H5T_STR_NULLTERM) < 0)
goto out;
- if ( (attr_space_id = H5Screate( H5S_SCALAR )) < 0 )
+ if ((attr_space_id = H5Screate(H5S_SCALAR)) < 0)
goto out;
/* Verify if the attribute already exists */
has_attr = H5LT_find_attribute(obj_id, attr_name);
/* The attribute already exists, delete it */
- if(has_attr == 1)
- if(H5Adelete(obj_id, attr_name) < 0)
+ if (has_attr == 1)
+ if (H5Adelete(obj_id, attr_name) < 0)
goto out;
/* Create and write the attribute */
- if((attr_id = H5Acreate2(obj_id, attr_name, attr_type, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(obj_id, attr_name, attr_type, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, attr_type, attr_data) < 0)
+ if (H5Awrite(attr_id, attr_type, attr_data) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
- if(H5Sclose(attr_space_id) < 0)
+ if (H5Sclose(attr_space_id) < 0)
goto out;
- if(H5Tclose(attr_type) < 0)
+ if (H5Tclose(attr_type) < 0)
goto out;
/* Close the object */
- if(H5Oclose(obj_id) < 0)
+ if (H5Oclose(obj_id) < 0)
return -1;
return 0;
@@ -1519,79 +1452,71 @@ out:
return -1;
}
-
-
-
-
/*-------------------------------------------------------------------------
-* Function: H5LT_set_attribute_numerical
-*
-* Purpose: Private function used by H5LTset_attribute_int and H5LTset_attribute_float
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: July 25, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LT_set_attribute_numerical
+ *
+ * Purpose: Private function used by H5LTset_attribute_int and H5LTset_attribute_float
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: July 25, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LT_set_attribute_numerical( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- size_t size,
- hid_t tid,
- const void *data )
+herr_t
+H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *attr_name, size_t size,
+ hid_t tid, const void *data)
{
- hid_t obj_id, sid, attr_id;
- hsize_t dim_size=size;
- int has_attr;
+ hid_t obj_id, sid, attr_id;
+ hsize_t dim_size = size;
+ int has_attr;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
/* Open the object */
if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
return -1;
/* Create the data space for the attribute. */
- if ( (sid = H5Screate_simple( 1, &dim_size, NULL )) < 0 )
+ if ((sid = H5Screate_simple(1, &dim_size, NULL)) < 0)
goto out;
/* Verify if the attribute already exists */
has_attr = H5LT_find_attribute(obj_id, attr_name);
/* The attribute already exists, delete it */
- if(has_attr == 1)
- if(H5Adelete(obj_id, attr_name) < 0)
+ if (has_attr == 1)
+ if (H5Adelete(obj_id, attr_name) < 0)
goto out;
/* Create the attribute. */
- if((attr_id = H5Acreate2(obj_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(obj_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* Write the attribute data. */
- if(H5Awrite(attr_id, tid, data) < 0)
+ if (H5Awrite(attr_id, tid, data) < 0)
goto out;
/* Close the attribute. */
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
/* Close the dataspace. */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/* Close the object */
- if(H5Oclose(obj_id) < 0)
+ if (H5Oclose(obj_id) < 0)
return -1;
return 0;
@@ -1601,557 +1526,495 @@ out:
return -1;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_char
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 7, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_char
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 7, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_char( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const char *data,
- size_t size )
+herr_t
+H5LTset_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, const char *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_CHAR, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_CHAR, data) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_uchar
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_uchar
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_uchar( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned char *data,
- size_t size )
+herr_t
+H5LTset_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned char *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_UCHAR, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_UCHAR, data) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_short
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 7, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_short
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 7, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_short( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const short *data,
- size_t size )
+herr_t
+H5LTset_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name, const short *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_SHORT, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_SHORT, data) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_ushort
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_ushort
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_ushort( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned short *data,
- size_t size )
+herr_t
+H5LTset_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const unsigned short *data, size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_USHORT, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_USHORT, data) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_int
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 7, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_int
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 7, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_int( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const int *data,
- size_t size )
+herr_t
+H5LTset_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, const int *data, size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_INT, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_INT, data) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_uint
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_uint
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_uint( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned int *data,
- size_t size )
+herr_t
+H5LTset_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned int *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_UINT, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_UINT, data) < 0)
return -1;
return 0;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_long
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 7, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_long
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 7, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const long *data,
- size_t size )
+herr_t
+H5LTset_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, const long *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_LONG, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_LONG, data) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_long_long
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
-*
-* Date: June 17, 2005
-*
-* Comments: This function was added to support attributes of type long long
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_long_long
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Elena Pourmal
+ *
+ * Date: June 17, 2005
+ *
+ * Comments: This function was added to support attributes of type long long
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_long_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const long long *data,
- size_t size )
+herr_t
+H5LTset_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name, const long long *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_LLONG, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_LLONG, data) < 0)
return -1;
return 0;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_ulong
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_ulong
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_ulong( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned long *data,
- size_t size )
+herr_t
+H5LTset_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned long *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_ULONG, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_ULONG, data) < 0)
return -1;
return 0;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_float
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: July 25, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTset_attribute_float
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: July 25, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_float( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const float *data,
- size_t size )
+herr_t
+H5LTset_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name, const float *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_FLOAT, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_FLOAT, data) < 0)
return -1;
return 0;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTset_attribute_double
-*
-* Purpose: Create and write an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 7, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTset_attribute_double
+ *
+ * Purpose: Create and write an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: November 7, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTset_attribute_double( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const double *data,
- size_t size )
+herr_t
+H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name, const double *data,
+ size_t size)
{
- if ( H5LT_set_attribute_numerical( loc_id, obj_name, attr_name, size,
- H5T_NATIVE_DOUBLE, data ) < 0 )
+ if (H5LT_set_attribute_numerical(loc_id, obj_name, attr_name, size, H5T_NATIVE_DOUBLE, data) < 0)
return -1;
return 0;
-
}
-
-
/*-------------------------------------------------------------------------
-* Function: find_attr
-*
-* Purpose: operator function used by H5LT_find_attribute
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: June 21, 2001
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: find_attr
+ *
+ * Purpose: operator function used by H5LT_find_attribute
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: June 21, 2001
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
-find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
- void *op_data)
+find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data)
{
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
- return H5_ITER_CONT;
+ if (name == NULL)
+ return H5_ITER_CONT;
/* Shut compiler up */
- loc_id = loc_id; ainfo = ainfo;
+ loc_id = loc_id;
+ ainfo = ainfo;
/* Define a positive value for return value if the attribute was found. This will
- * cause the iterator to immediately return that positive value,
- * indicating short-circuit success
- */
+ * cause the iterator to immediately return that positive value,
+ * indicating short-circuit success
+ */
- if(HDstrncmp(name, (char *)op_data, MAX(HDstrlen((char *)op_data),HDstrlen(name))) == 0)
+ if (HDstrncmp(name, (char *)op_data, MAX(HDstrlen((char *)op_data), HDstrlen(name))) == 0)
ret = H5_ITER_STOP;
return ret;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTfind_attribute
-*
-* Purpose: Inquires if an attribute named attr_name exists attached to
-* the object loc_id.
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: May 17, 2006
-*
-* Comments:
-* Calls the private version of the function
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTfind_attribute
+ *
+ * Purpose: Inquires if an attribute named attr_name exists attached to
+ * the object loc_id.
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: May 17, 2006
+ *
+ * Comments:
+ * Calls the private version of the function
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
+herr_t
+H5LTfind_attribute(hid_t loc_id, const char *attr_name)
{
- return H5LT_find_attribute(loc_id,attr_name);
+ return H5LT_find_attribute(loc_id, attr_name);
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LT_find_attribute
-*
-* Purpose: Inquires if an attribute named attr_name exists attached to the object loc_id.
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: June 21, 2001
-*
-* Comments:
-* The function uses H5Aiterate2 with the operator function find_attr
-*
-* Return:
-* Success: The return value of the first operator that
-* returns non-zero, or zero if all members were
-* processed with no operator returning non-zero.
-*
-* Failure: Negative if something goes wrong within the
-* library, or the negative value returned by one
-* of the operators.
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LT_find_attribute
+ *
+ * Purpose: Inquires if an attribute named attr_name exists attached to the object loc_id.
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: June 21, 2001
+ *
+ * Comments:
+ * The function uses H5Aiterate2 with the operator function find_attr
+ *
+ * Return:
+ * Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+H5_GCC_DIAG_OFF("cast-qual")
herr_t
-H5LT_find_attribute( hid_t loc_id, const char* attr_name )
+H5LT_find_attribute(hid_t loc_id, const char *attr_name)
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name);
}
+H5_GCC_DIAG_ON("cast-qual")
+
+/*-------------------------------------------------------------------------
+ * Function: H5LTget_attribute_ndims
+ *
+ * Purpose: Gets the dimensionality of an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 4, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-
-
-/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_ndims
-*
-* Purpose: Gets the dimensionality of an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 4, 2001
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5LTget_attribute_ndims( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- int *rank )
+herr_t
+H5LTget_attribute_ndims(hid_t loc_id, const char *obj_name, const char *attr_name, int *rank)
{
- hid_t attr_id;
- hid_t sid;
- hid_t obj_id;
+ hid_t attr_id;
+ hid_t sid;
+ hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
/* Open the object */
- if((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
+ if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
return -1;
/* Open the attribute. */
- if((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0)
- {
+ if ((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0) {
H5Oclose(obj_id);
return -1;
}
/* Get the dataspace handle */
- if((sid = H5Aget_space(attr_id)) < 0)
+ if ((sid = H5Aget_space(attr_id)) < 0)
goto out;
/* Get rank */
- if((*rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((*rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* Terminate access to the attribute */
- if ( H5Sclose( sid ) < 0 )
+ if (H5Sclose(sid) < 0)
goto out;
/* End access to the attribute */
- if ( H5Aclose( attr_id ) )
- goto out;;
+ if (H5Aclose(attr_id))
+ goto out;
+ ;
/* Close the object */
- if(H5Oclose(obj_id) < 0 )
+ if (H5Oclose(obj_id) < 0)
return -1;
return 0;
out:
- H5Aclose( attr_id );
+ H5Aclose(attr_id);
H5Oclose(obj_id);
return -1;
-
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_info
-*
-* Purpose: Gets information about an attribute.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 4, 2001
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTget_attribute_info
+ *
+ * Purpose: Gets information about an attribute.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 4, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTget_attribute_info( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hsize_t *dims,
- H5T_class_t *type_class,
- size_t *type_size )
+herr_t
+H5LTget_attribute_info(hid_t loc_id, const char *obj_name, const char *attr_name, hsize_t *dims,
+ H5T_class_t *type_class, size_t *type_size)
{
- hid_t attr_id;
- hid_t tid;
- hid_t sid;
- hid_t obj_id;
+ hid_t attr_id;
+ hid_t tid;
+ hid_t sid;
+ hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
/* Open the object */
- if((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
+ if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
return -1;
/* Open the attribute. */
- if((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0)
- {
+ if ((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0) {
H5Oclose(obj_id);
return -1;
}
@@ -2163,30 +2026,30 @@ herr_t H5LTget_attribute_info( hid_t loc_id,
*type_class = H5Tget_class(tid);
/* Get the size. */
- *type_size = H5Tget_size( tid );
+ *type_size = H5Tget_size(tid);
/* Get the dataspace handle */
- if ( (sid = H5Aget_space( attr_id )) < 0 )
+ if ((sid = H5Aget_space(attr_id)) < 0)
goto out;
/* Get dimensions */
- if ( H5Sget_simple_extent_dims( sid, dims, NULL) < 0 )
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* Terminate access to the dataspace */
- if ( H5Sclose( sid ) < 0 )
+ if (H5Sclose(sid) < 0)
goto out;
/* Release the datatype. */
- if ( H5Tclose( tid ) )
+ if (H5Tclose(tid))
goto out;
/* End access to the attribute */
- if ( H5Aclose( attr_id ) )
+ if (H5Aclose(attr_id))
goto out;
/* Close the object */
- if(H5Oclose(obj_id) < 0 )
+ if (H5Oclose(obj_id) < 0)
return -1;
return 0;
@@ -2196,46 +2059,46 @@ out:
H5Aclose(attr_id);
H5Oclose(obj_id);
return -1;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTtext_to_dtype
-*
-* Purpose: Convert DDL description to HDF5 data type.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
-*
-* Date: October 6, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
-{
- hid_t type_id;
+ * Function: H5LTtext_to_dtype
+ *
+ * Purpose: Convert DDL description to HDF5 data type.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Raymond Lu
+ *
+ * Date: October 6, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
+{
+ hid_t type_id;
/* check the arguments */
- if (text == NULL)
- return -1;
+ if (text == NULL)
+ return -1;
- if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
+ if (lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
goto out;
- if(lang_type != H5LT_DDL) {
+ if (lang_type != H5LT_DDL) {
HDfprintf(stderr, "only DDL is supported for now.\n");
goto out;
}
input_len = HDstrlen(text);
- myinput = HDstrdup(text);
+ myinput = HDstrdup(text);
- if((type_id = H5LTyyparse()) < 0) {
+ if ((type_id = H5LTyyparse()) < 0) {
HDfree(myinput);
goto out;
}
@@ -2250,57 +2113,60 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: realloc_and_append
-*
-* Purpose: Expand the buffer and append a string to it.
-*
-* Return: void
-*
-* Programmer: Raymond Lu, songyulu@hdfgroup.org
-*
-* Date: 29 September 2011
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-static char*
+ * Function: realloc_and_append
+ *
+ * Purpose: Expand the buffer and append a string to it.
+ *
+ * Return: void
+ *
+ * Programmer: Raymond Lu
+ *
+ * Date: 29 September 2011
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, char *str_to_add)
{
size_t size_str_to_add, size_str;
- if(_no_user_buf) {
+ if (_no_user_buf) {
/* If the buffer isn't big enough, reallocate it. Otherwise, go to do strcat. */
- if(str_to_add && ((ssize_t)(*len - (HDstrlen(buf) + HDstrlen(str_to_add) + 1)) < LIMIT)) {
+ if (str_to_add && ((ssize_t)(*len - (HDstrlen(buf) + HDstrlen(str_to_add) + 1)) < LIMIT)) {
*len += ((HDstrlen(buf) + HDstrlen(str_to_add) + 1) / INCREMENT + 1) * INCREMENT;
- buf = (char*)HDrealloc(buf, *len);
- } else if(!str_to_add && ((ssize_t)(*len - HDstrlen(buf) - 1) < LIMIT)) {
+ buf = (char *)HDrealloc(buf, *len);
+ }
+ else if (!str_to_add && ((ssize_t)(*len - HDstrlen(buf) - 1) < LIMIT)) {
*len += INCREMENT;
- buf = (char*)HDrealloc(buf, *len);
+ buf = (char *)HDrealloc(buf, *len);
}
}
- if(!buf)
- goto out;
-
- if(str_to_add) {
- /* find the size of the buffer to add */
- size_str_to_add = HDstrlen(str_to_add);
- /* find the size of the current buffer */
- size_str = HDstrlen(buf);
-
- /* Check to make sure the appended string does not
- * extend past the allocated buffer; if it does then truncate the string
- */
- if(size_str < *len - 1) {
- if( size_str + size_str_to_add < *len - 1) {
- HDstrncat(buf, str_to_add, size_str_to_add);
- } else {
- HDstrncat(buf, str_to_add, (*len - 1) - size_str);
- }
- } else {
- buf[*len-1] = '\0'; /* buffer is full, null terminate */
- }
+ if (!buf)
+ goto out;
+
+ if (str_to_add) {
+ /* find the size of the buffer to add */
+ size_str_to_add = HDstrlen(str_to_add);
+ /* find the size of the current buffer */
+ size_str = HDstrlen(buf);
+
+ /* Check to make sure the appended string does not
+ * extend past the allocated buffer; if it does then truncate the string
+ */
+ if (size_str < *len - 1) {
+ if (size_str + size_str_to_add < *len - 1) {
+ HDstrncat(buf, str_to_add, size_str_to_add);
+ }
+ else {
+ HDstrncat(buf, str_to_add, (*len - 1) - size_str);
+ }
+ }
+ else {
+ buf[*len - 1] = '\0'; /* buffer is full, null terminate */
+ }
}
return buf;
@@ -2310,32 +2176,33 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: indentation
-*
-* Purpose: Print spaces for indentation
-*
-* Return: void
-*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
-*
-* Date: December 6, 2005
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-static char*
-indentation(size_t x, char* str, hbool_t no_u_buf, size_t *s_len)
-{
- char tmp_str[TMP_LEN];
+ * Function: indentation
+ *
+ * Purpose: Print spaces for indentation
+ *
+ * Return: void
+ *
+ * Programmer: Raymond Lu
+ *
+ * Date: December 6, 2005
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+indentation(size_t x, char *str, hbool_t no_u_buf, size_t *s_len)
+{
+ char tmp_str[TMP_LEN];
if (x < 80) {
HDmemset(tmp_str, ' ', x);
- tmp_str[x]='\0';
- } else
+ tmp_str[x] = '\0';
+ }
+ else
HDsnprintf(tmp_str, TMP_LEN, "error: the indentation exceeds the number of cols.");
- if(!(str = realloc_and_append(no_u_buf, s_len, str, tmp_str)))
+ if (!(str = realloc_and_append(no_u_buf, s_len, str, tmp_str)))
goto out;
return str;
@@ -2345,101 +2212,102 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: print_enum
-*
-* Purpose: prints the enum data
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Raymond Lu
-*
-* Modifications:
-*
-*-----------------------------------------------------------------------*/
-static char*
-print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
+ * Function: print_enum
+ *
+ * Purpose: prints the enum data
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Raymond Lu
+ *
+ * Modifications:
+ *
+ *-----------------------------------------------------------------------*/
+static char *
+print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
{
- char **name = NULL; /*member names */
- unsigned char *value = NULL; /*value array */
- unsigned char *copy = NULL; /*a pointer to value array */
- int nmembs; /*number of members */
- char tmp_str[TMP_LEN];
- int nchars; /*number of output characters */
- hid_t super = -1; /*enum base integer type */
- hid_t native = -1; /*native integer data type */
- size_t super_size; /*enum base type size */
- size_t dst_size; /*destination value type size */
- int i;
+ char ** name = NULL; /*member names */
+ unsigned char *value = NULL; /*value array */
+ unsigned char *copy = NULL; /*a pointer to value array */
+ int nmembs; /*number of members */
+ char tmp_str[TMP_LEN];
+ int nchars; /*number of output characters */
+ hid_t super = -1; /*enum base integer type */
+ hid_t native = -1; /*native integer data type */
+ size_t super_size; /*enum base type size */
+ size_t dst_size; /*destination value type size */
+ int i;
- if((nmembs = H5Tget_nmembers(type))<=0)
+ if ((nmembs = H5Tget_nmembers(type)) <= 0)
goto out;
- if((super = H5Tget_super(type)) < 0)
+ if ((super = H5Tget_super(type)) < 0)
goto out;
/* Use buffer of INT or UNSIGNED INT to print enum values because
- * we don't expect these values to be so big that INT or UNSIGNED
- * INT can't hold.
- */
+ * we don't expect these values to be so big that INT or UNSIGNED
+ * INT can't hold.
+ */
if (H5T_SGN_NONE == H5Tget_sign(super)) {
native = H5T_NATIVE_UINT;
- } else {
+ }
+ else {
native = H5T_NATIVE_INT;
}
super_size = H5Tget_size(super);
- dst_size = H5Tget_size(native);
+ dst_size = H5Tget_size(native);
/* Get the names and raw values of all members */
- name = (char**)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char*)HDcalloc((size_t)nmembs, MAX(dst_size, super_size));
+ name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(dst_size, super_size));
for (i = 0; i < nmembs; i++) {
- if((name[i] = H5Tget_member_name(type, (unsigned)i))==NULL)
+ if ((name[i] = H5Tget_member_name(type, (unsigned)i)) == NULL)
goto out;
- if(H5Tget_member_value(type, (unsigned)i, value + (size_t)i * super_size) < 0)
+ if (H5Tget_member_value(type, (unsigned)i, value + (size_t)i * super_size) < 0)
goto out;
}
/* Convert values to native data type */
if (native > 0) {
- if(H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0)
+ if (H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0)
goto out;
}
/*
- * Sort members by increasing value
- * ***not implemented yet***
- */
+ * Sort members by increasing value
+ * ***not implemented yet***
+ */
/* Print members */
for (i = 0; i < nmembs; i++) {
- if(!(str = indentation(indt + COL, str, no_ubuf, str_len)))
+ if (!(str = indentation(indt + COL, str, no_ubuf, str_len)))
goto out;
nchars = HDsnprintf(tmp_str, TMP_LEN, "\"%s\"", name[i]);
- if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
+ if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
HDsnprintf(tmp_str, TMP_LEN, "%*s ", MAX(0, 16 - nchars), "");
- if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
+ if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
/*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
*strangely, unless use another pointer "copy".*/
copy = value + (size_t)i * dst_size;
if (H5T_SGN_NONE == H5Tget_sign(native))
- HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int*)((void *)copy)));
+ HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int *)((void *)copy)));
else
- HDsnprintf(tmp_str, TMP_LEN, "%d", *((int*)((void *)copy)));
- if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
+ HDsnprintf(tmp_str, TMP_LEN, "%d", *((int *)((void *)copy)));
+ if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
HDsnprintf(tmp_str, TMP_LEN, ";\n");
- if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
+ if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
}
/* Release resources */
- for(i = 0; i < nmembs; i++)
+ for (i = 0; i < nmembs; i++)
H5free_memory(name[i]);
HDfree(name);
@@ -2450,67 +2318,69 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
out:
- if(0 == nmembs) {
+ if (0 == nmembs) {
HDsnprintf(tmp_str, TMP_LEN, "\n%*s <empty>", (int)(indt + 4), "");
str = realloc_and_append(no_ubuf, str_len, str, tmp_str);
} /* end if */
/* Release resources */
- if(name) {
- for(i = 0; i < nmembs; i++)
- if(name[i])
+ if (name) {
+ for (i = 0; i < nmembs; i++)
+ if (name[i])
HDfree(name[i]);
HDfree(name);
} /* end if */
- if(value)
+ if (value)
HDfree(value);
- if(super >= 0)
+ if (super >= 0)
H5Tclose(super);
return NULL;
}
/*-------------------------------------------------------------------------
-* Function: H5LTdtype_to_text
-*
-* Purpose: Convert HDF5 data type to DDL description.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
-*
-* Date: December 6, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
+ * Function: H5LTdtype_to_text
+ *
+ * Purpose: Convert HDF5 data type to DDL description.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Raymond Lu
+ *
+ * Date: December 6, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
{
- size_t str_len = INCREMENT;
- char *text_str;
- herr_t ret = SUCCEED;
+ size_t str_len = INCREMENT;
+ char * text_str;
+ herr_t ret = SUCCEED;
- if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
+ if (lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
goto out;
- if(len && !str) {
- text_str = (char*)HDcalloc(str_len, sizeof(char));
- text_str[0]='\0';
- if(!(text_str = H5LT_dtype_to_text(dtype, text_str, lang_type, &str_len, 1)))
+ if (len && !str) {
+ text_str = (char *)HDcalloc(str_len, sizeof(char));
+ text_str[0] = '\0';
+ if (!(text_str = H5LT_dtype_to_text(dtype, text_str, lang_type, &str_len, 1)))
goto out;
*len = HDstrlen(text_str) + 1;
- if(text_str)
+ if (text_str)
HDfree(text_str);
text_str = NULL;
- } else if(len && str) {
- if(!(H5LT_dtype_to_text(dtype, str, lang_type, len, 0)))
+ }
+ else if (len && str) {
+ if (!(H5LT_dtype_to_text(dtype, str, lang_type, len, 0)))
goto out;
- str[*len-1] = '\0';
+ str[*len - 1] = '\0';
}
return ret;
@@ -2520,38 +2390,38 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5LT_dtype_to_text
-*
-* Purpose: Private function to convert HDF5 data type to DDL description.
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
-*
-* Date: December 20, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen,
- hbool_t no_user_buf)
+ * Function: H5LT_dtype_to_text
+ *
+ * Purpose: Private function to convert HDF5 data type to DDL description.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Raymond Lu
+ *
+ * Date: December 20, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, hbool_t no_user_buf)
{
H5T_class_t tcls;
char tmp_str[TMP_LEN];
int i;
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, NULL)))
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, NULL)))
goto out;
-
- if(lang != H5LT_DDL) {
+
+ if (lang != H5LT_DDL) {
HDsnprintf(dt_str, *slen, "only DDL is supported for now");
goto out;
}
- if((tcls = H5Tget_class(dtype)) < 0)
+ if ((tcls = H5Tget_class(dtype)) < 0)
goto out;
switch (tcls) {
@@ -2559,57 +2429,83 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl
case H5T_BITFIELD:
if (H5Tequal(dtype, H5T_STD_I8BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I8BE");
- } else if (H5Tequal(dtype, H5T_STD_I8LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I8LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I8LE");
- } else if (H5Tequal(dtype, H5T_STD_I16BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I16BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I16BE");
- } else if (H5Tequal(dtype, H5T_STD_I16LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I16LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I16LE");
- } else if (H5Tequal(dtype, H5T_STD_I32BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I32BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I32BE");
- } else if (H5Tequal(dtype, H5T_STD_I32LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I32LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I32LE");
- } else if (H5Tequal(dtype, H5T_STD_I64BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I64BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I64BE");
- } else if (H5Tequal(dtype, H5T_STD_I64LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_I64LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I64LE");
- } else if (H5Tequal(dtype, H5T_STD_U8BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U8BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U8BE");
- } else if (H5Tequal(dtype, H5T_STD_U8LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U8LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U8LE");
- } else if (H5Tequal(dtype, H5T_STD_U16BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U16BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U16BE");
- } else if (H5Tequal(dtype, H5T_STD_U16LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U16LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U16LE");
- } else if (H5Tequal(dtype, H5T_STD_U32BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U32BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U32BE");
- } else if (H5Tequal(dtype, H5T_STD_U32LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U32LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U32LE");
- } else if (H5Tequal(dtype, H5T_STD_U64BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U64BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U64BE");
- } else if (H5Tequal(dtype, H5T_STD_U64LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_STD_U64LE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_U64LE");
- } else if (H5Tequal(dtype, H5T_NATIVE_SCHAR)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_SCHAR)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_SCHAR");
- } else if (H5Tequal(dtype, H5T_NATIVE_UCHAR)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_UCHAR)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_UCHAR");
- } else if (H5Tequal(dtype, H5T_NATIVE_SHORT)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_SHORT)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_SHORT");
- } else if (H5Tequal(dtype, H5T_NATIVE_USHORT)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_USHORT)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_USHORT");
- } else if (H5Tequal(dtype, H5T_NATIVE_INT)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_INT)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_INT");
- } else if (H5Tequal(dtype, H5T_NATIVE_UINT)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_UINT)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_UINT");
- } else if (H5Tequal(dtype, H5T_NATIVE_LONG)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_LONG)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_LONG");
- } else if (H5Tequal(dtype, H5T_NATIVE_ULONG)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_ULONG)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_ULONG");
- } else if (H5Tequal(dtype, H5T_NATIVE_LLONG)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_LLONG)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_LLONG");
- } else if (H5Tequal(dtype, H5T_NATIVE_ULLONG)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_ULLONG)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_ULLONG");
- } else {
+ }
+ else {
HDsnprintf(dt_str, *slen, "undefined integer");
}
@@ -2617,439 +2513,445 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl
case H5T_FLOAT:
if (H5Tequal(dtype, H5T_IEEE_F32BE)) {
HDsnprintf(dt_str, *slen, "H5T_IEEE_F32BE");
- } else if (H5Tequal(dtype, H5T_IEEE_F32LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_IEEE_F32LE)) {
HDsnprintf(dt_str, *slen, "H5T_IEEE_F32LE");
- } else if (H5Tequal(dtype, H5T_IEEE_F64BE)) {
+ }
+ else if (H5Tequal(dtype, H5T_IEEE_F64BE)) {
HDsnprintf(dt_str, *slen, "H5T_IEEE_F64BE");
- } else if (H5Tequal(dtype, H5T_IEEE_F64LE)) {
+ }
+ else if (H5Tequal(dtype, H5T_IEEE_F64LE)) {
HDsnprintf(dt_str, *slen, "H5T_IEEE_F64LE");
- } else if (H5Tequal(dtype, H5T_NATIVE_FLOAT)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_FLOAT)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_FLOAT");
- } else if (H5Tequal(dtype, H5T_NATIVE_DOUBLE)) {
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_DOUBLE)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_DOUBLE");
-#if H5_SIZEOF_LONG_DOUBLE !=0
- } else if (H5Tequal(dtype, H5T_NATIVE_LDOUBLE)) {
+#if H5_SIZEOF_LONG_DOUBLE != 0
+ }
+ else if (H5Tequal(dtype, H5T_NATIVE_LDOUBLE)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_LDOUBLE");
#endif
- } else {
+ }
+ else {
HDsnprintf(dt_str, *slen, "undefined float");
}
break;
- case H5T_STRING:
- {
- /* Make a copy of type in memory in case when DTYPE is on disk, the size
- * will be bigger than in memory. This makes it easier to compare
- * types in memory. */
- hid_t str_type;
- H5T_order_t order;
- hid_t tmp_type;
- size_t size;
- H5T_str_t str_pad;
- H5T_cset_t cset;
- htri_t is_vlstr;
-
- if((tmp_type = H5Tcopy(dtype)) < 0)
- goto out;
- if((size = H5Tget_size(tmp_type))==0)
- goto out;
- if((str_pad = H5Tget_strpad(tmp_type)) < 0)
- goto out;
- if((cset = H5Tget_cset(tmp_type)) < 0)
- goto out;
- if((is_vlstr = H5Tis_variable_str(tmp_type)) < 0)
- goto out;
+ case H5T_STRING: {
+ /* Make a copy of type in memory in case when DTYPE is on disk, the size
+ * will be bigger than in memory. This makes it easier to compare
+ * types in memory. */
+ hid_t str_type;
+ H5T_order_t order;
+ hid_t tmp_type;
+ size_t size;
+ H5T_str_t str_pad;
+ H5T_cset_t cset;
+ htri_t is_vlstr;
+
+ if ((tmp_type = H5Tcopy(dtype)) < 0)
+ goto out;
+ if ((size = H5Tget_size(tmp_type)) == 0)
+ goto out;
+ if ((str_pad = H5Tget_strpad(tmp_type)) < 0)
+ goto out;
+ if ((cset = H5Tget_cset(tmp_type)) < 0)
+ goto out;
+ if ((is_vlstr = H5Tis_variable_str(tmp_type)) < 0)
+ goto out;
- /* Print lead-in */
- HDsnprintf(dt_str, *slen, "H5T_STRING {\n");
- indent += COL;
+ /* Print lead-in */
+ HDsnprintf(dt_str, *slen, "H5T_STRING {\n");
+ indent += COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- if(is_vlstr)
- HDsnprintf(tmp_str, TMP_LEN, "STRSIZE H5T_VARIABLE;\n");
- else
- HDsnprintf(tmp_str, TMP_LEN, "STRSIZE %d;\n", (int)size);
+ if (is_vlstr)
+ HDsnprintf(tmp_str, TMP_LEN, "STRSIZE H5T_VARIABLE;\n");
+ else
+ HDsnprintf(tmp_str, TMP_LEN, "STRSIZE %d;\n", (int)size);
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- if (str_pad == H5T_STR_NULLTERM)
- HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_NULLTERM;\n");
- else if (str_pad == H5T_STR_NULLPAD)
- HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_NULLPAD;\n");
- else if (str_pad == H5T_STR_SPACEPAD)
- HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_SPACEPAD;\n");
- else
- HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_ERROR;\n");
+ if (str_pad == H5T_STR_NULLTERM)
+ HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_NULLTERM;\n");
+ else if (str_pad == H5T_STR_NULLPAD)
+ HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_NULLPAD;\n");
+ else if (str_pad == H5T_STR_SPACEPAD)
+ HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_SPACEPAD;\n");
+ else
+ HDsnprintf(tmp_str, TMP_LEN, "STRPAD H5T_STR_ERROR;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- if (cset == H5T_CSET_ASCII)
- HDsnprintf(tmp_str, TMP_LEN, "CSET H5T_CSET_ASCII;\n");
- else if (cset == H5T_CSET_UTF8)
- HDsnprintf(tmp_str, TMP_LEN, "CSET H5T_CSET_UTF8;\n");
- else
- HDsnprintf(tmp_str, TMP_LEN, "CSET unknown;\n");
+ if (cset == H5T_CSET_ASCII)
+ HDsnprintf(tmp_str, TMP_LEN, "CSET H5T_CSET_ASCII;\n");
+ else if (cset == H5T_CSET_UTF8)
+ HDsnprintf(tmp_str, TMP_LEN, "CSET H5T_CSET_UTF8;\n");
+ else
+ HDsnprintf(tmp_str, TMP_LEN, "CSET unknown;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- /* Reproduce a C type string */
- if((str_type = H5Tcopy(H5T_C_S1)) < 0)
- goto out;
- if(is_vlstr) {
- if(H5Tset_size(str_type, H5T_VARIABLE) < 0)
- goto out;
- } else {
- if(H5Tset_size(str_type, size) < 0)
- goto out;
- }
- if(H5Tset_cset(str_type, cset) < 0)
+ /* Reproduce a C type string */
+ if ((str_type = H5Tcopy(H5T_C_S1)) < 0)
+ goto out;
+ if (is_vlstr) {
+ if (H5Tset_size(str_type, H5T_VARIABLE) < 0)
goto out;
- if(H5Tset_strpad(str_type, str_pad) < 0)
+ }
+ else {
+ if (H5Tset_size(str_type, size) < 0)
goto out;
+ }
+ if (H5Tset_cset(str_type, cset) < 0)
+ goto out;
+ if (H5Tset_strpad(str_type, str_pad) < 0)
+ goto out;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- /* Check C variable-length string first. Are the two types equal? */
- if (H5Tequal(tmp_type, str_type)) {
- HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_C_S1;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- goto next;
- }
+ /* Check C variable-length string first. Are the two types equal? */
+ if (H5Tequal(tmp_type, str_type)) {
+ HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_C_S1;\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+ goto next;
+ }
- /* Change the endianness and see if they're equal. */
- if((order = H5Tget_order(tmp_type)) < 0)
+ /* Change the endianness and see if they're equal. */
+ if ((order = H5Tget_order(tmp_type)) < 0)
+ goto out;
+ if (order == H5T_ORDER_LE) {
+ if (H5Tset_order(str_type, H5T_ORDER_LE) < 0)
goto out;
- if(order==H5T_ORDER_LE) {
- if(H5Tset_order(str_type, H5T_ORDER_LE) < 0)
- goto out;
- } else if(order==H5T_ORDER_BE) {
- if(H5Tset_order(str_type, H5T_ORDER_BE) < 0)
- goto out;
- }
-
- if (H5Tequal(tmp_type, str_type)) {
- HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_C_S1;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- goto next;
- }
-
- /* If not equal to C variable-length string, check Fortran type.
- * Actually H5Tequal can't tell difference between H5T_C_S1 and H5T_FORTRAN_S1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
- if(H5Tclose(str_type) < 0)
+ }
+ else if (order == H5T_ORDER_BE) {
+ if (H5Tset_order(str_type, H5T_ORDER_BE) < 0)
goto out;
- if((str_type = H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ }
+
+ if (H5Tequal(tmp_type, str_type)) {
+ HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_C_S1;\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
- if(H5Tset_cset(str_type, cset) < 0)
+ goto next;
+ }
+
+ /* If not equal to C variable-length string, check Fortran type.
+ * Actually H5Tequal can't tell difference between H5T_C_S1 and
+ * H5T_FORTRAN_S1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+ if (H5Tclose(str_type) < 0)
+ goto out;
+ if ((str_type = H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ goto out;
+ if (H5Tset_cset(str_type, cset) < 0)
+ goto out;
+ if (H5Tset_size(str_type, size) < 0)
+ goto out;
+ if (H5Tset_strpad(str_type, str_pad) < 0)
+ goto out;
+
+ /* Are the two types equal? */
+ if (H5Tequal(tmp_type, str_type)) {
+ HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_FORTRAN_S1;\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
- if(H5Tset_size(str_type, size) < 0)
+ goto next;
+ }
+
+ /* Change the endianness and see if they're equal. */
+ if ((order = H5Tget_order(tmp_type)) < 0)
+ goto out;
+ if (order == H5T_ORDER_LE) {
+ if (H5Tset_order(str_type, H5T_ORDER_LE) < 0)
goto out;
- if(H5Tset_strpad(str_type, str_pad) < 0)
+ }
+ else if (order == H5T_ORDER_BE) {
+ if (H5Tset_order(str_type, H5T_ORDER_BE) < 0)
goto out;
+ }
- /* Are the two types equal? */
- if (H5Tequal(tmp_type, str_type)) {
- HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_FORTRAN_S1;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- goto next;
- }
-
- /* Change the endianness and see if they're equal. */
- if((order = H5Tget_order(tmp_type)) < 0)
- goto out;
- if(order==H5T_ORDER_LE) {
- if(H5Tset_order(str_type, H5T_ORDER_LE) < 0)
- goto out;
- } else if(order==H5T_ORDER_BE) {
- if(H5Tset_order(str_type, H5T_ORDER_BE) < 0)
- goto out;
- }
-
- /* Are the two types equal? */
- if (H5Tequal(tmp_type, str_type)) {
- HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_FORTRAN_S1;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- goto next;
- }
-
- /* Type doesn't match any of above. */
- HDsnprintf(tmp_str, TMP_LEN, "CTYPE unknown_one_character_type;\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ /* Are the two types equal? */
+ if (H5Tequal(tmp_type, str_type)) {
+ HDsnprintf(tmp_str, TMP_LEN, "CTYPE H5T_FORTRAN_S1;\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
+ goto next;
+ }
+
+ /* Type doesn't match any of above. */
+ HDsnprintf(tmp_str, TMP_LEN, "CTYPE unknown_one_character_type;\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
next:
- H5Tclose(str_type);
- H5Tclose(tmp_type);
+ H5Tclose(str_type);
+ H5Tclose(tmp_type);
- /* Print closing */
- indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
- HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ /* Print closing */
+ indent -= COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+ HDsnprintf(tmp_str, TMP_LEN, "}");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- break;
- }
- case H5T_OPAQUE:
- {
+ break;
+ }
+ case H5T_OPAQUE: {
char *tag = NULL;
/* Print lead-in */
HDsnprintf(dt_str, *slen, "H5T_OPAQUE {\n");
indent += COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
goto out;
HDsnprintf(tmp_str, TMP_LEN, "OPQ_SIZE %lu;\n", (unsigned long)H5Tget_size(dtype));
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
goto out;
tag = H5Tget_tag(dtype);
- if(tag) {
+ if (tag) {
HDsnprintf(tmp_str, TMP_LEN, "OPQ_TAG \"%s\";\n", tag);
- if(tag)
+ if (tag)
H5free_memory(tag);
tag = NULL;
- } else
+ }
+ else
HDsnprintf(tmp_str, TMP_LEN, "OPQ_TAG \"\";\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
/* Print closing */
indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
goto out;
HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
break;
- }
- case H5T_ENUM:
- {
- hid_t super;
- size_t super_len;
- char* stmp = NULL;
-
- /* Print lead-in */
- HDsnprintf(dt_str, *slen, "H5T_ENUM {\n");
- indent += COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ }
+ case H5T_ENUM: {
+ hid_t super;
+ size_t super_len;
+ char * stmp = NULL;
- if((super = H5Tget_super(dtype)) < 0)
- goto out;
- if(H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
- goto out;
- stmp = (char*)HDcalloc(super_len, sizeof(char));
- if(H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
- goto out;
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
- goto out;
+ /* Print lead-in */
+ HDsnprintf(dt_str, *slen, "H5T_ENUM {\n");
+ indent += COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- if(stmp)
- HDfree(stmp);
- stmp = NULL;
+ if ((super = H5Tget_super(dtype)) < 0)
+ goto out;
+ if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
+ goto out;
+ stmp = (char *)HDcalloc(super_len, sizeof(char));
+ if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
+ goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
+ goto out;
- HDsnprintf(tmp_str, TMP_LEN, ";\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- H5Tclose(super);
+ if (stmp)
+ HDfree(stmp);
+ stmp = NULL;
- if(!(dt_str = print_enum(dtype, dt_str, slen, no_user_buf, indent)))
- goto out;
+ HDsnprintf(tmp_str, TMP_LEN, ";\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+ H5Tclose(super);
- /* Print closing */
- indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
- HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (!(dt_str = print_enum(dtype, dt_str, slen, no_user_buf, indent)))
+ goto out;
- break;
- }
- case H5T_VLEN:
- {
- hid_t super;
- size_t super_len;
- char* stmp = NULL;
-
- /* Print lead-in */
- HDsnprintf(dt_str, *slen, "H5T_VLEN {\n");
- indent += COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
+ /* Print closing */
+ indent -= COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+ HDsnprintf(tmp_str, TMP_LEN, "}");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- if((super = H5Tget_super(dtype)) < 0)
- goto out;
- if(H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
- goto out;
- stmp = (char*)HDcalloc(super_len, sizeof(char));
- if(H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
- goto out;
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
- goto out;
+ break;
+ }
+ case H5T_VLEN: {
+ hid_t super;
+ size_t super_len;
+ char * stmp = NULL;
- if(stmp)
- HDfree(stmp);
- stmp = NULL;
- HDsnprintf(tmp_str, TMP_LEN, "\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- H5Tclose(super);
+ /* Print lead-in */
+ HDsnprintf(dt_str, *slen, "H5T_VLEN {\n");
+ indent += COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
- /* Print closing */
- indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
- HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if ((super = H5Tget_super(dtype)) < 0)
+ goto out;
+ if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
+ goto out;
+ stmp = (char *)HDcalloc(super_len, sizeof(char));
+ if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
+ goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
+ goto out;
- break;
- }
- case H5T_ARRAY:
- {
- hid_t super;
- size_t super_len;
- char* stmp = NULL;
- hsize_t dims[H5S_MAX_RANK];
- int ndims;
-
- /* Print lead-in */
- HDsnprintf(dt_str, *slen, "H5T_ARRAY {\n");
- indent += COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ if (stmp)
+ HDfree(stmp);
+ stmp = NULL;
+ HDsnprintf(tmp_str, TMP_LEN, "\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+ H5Tclose(super);
+
+ /* Print closing */
+ indent -= COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+ HDsnprintf(tmp_str, TMP_LEN, "}");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+
+ break;
+ }
+ case H5T_ARRAY: {
+ hid_t super;
+ size_t super_len;
+ char * stmp = NULL;
+ hsize_t dims[H5S_MAX_RANK];
+ int ndims;
+
+ /* Print lead-in */
+ HDsnprintf(dt_str, *slen, "H5T_ARRAY {\n");
+ indent += COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+
+ /* Get array information */
+ if ((ndims = H5Tget_array_ndims(dtype)) < 0)
+ goto out;
+ if (H5Tget_array_dims2(dtype, dims) < 0)
+ goto out;
+
+ /* Print array dimensions */
+ for (i = 0; i < ndims; i++) {
+ HDsnprintf(tmp_str, TMP_LEN, "[%d]", (int)dims[i]);
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
+ }
+ HDsnprintf(tmp_str, TMP_LEN, " ");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
- /* Get array information */
- if((ndims = H5Tget_array_ndims(dtype)) < 0)
+ if ((super = H5Tget_super(dtype)) < 0)
+ goto out;
+ if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
+ goto out;
+ stmp = (char *)HDcalloc(super_len, sizeof(char));
+ if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
+ goto out;
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
+ goto out;
+ if (stmp)
+ HDfree(stmp);
+ stmp = NULL;
+ HDsnprintf(tmp_str, TMP_LEN, "\n");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+ H5Tclose(super);
+
+ /* Print closing */
+ indent -= COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+ HDsnprintf(tmp_str, TMP_LEN, "}");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+
+ break;
+ }
+ case H5T_COMPOUND: {
+ char * mname = NULL;
+ hid_t mtype;
+ size_t moffset;
+ H5T_class_t mclass;
+ size_t mlen;
+ char * mtmp = NULL;
+ int nmembs;
+
+ if ((nmembs = H5Tget_nmembers(dtype)) < 0)
+ goto out;
+
+ HDsnprintf(dt_str, *slen, "H5T_COMPOUND {\n");
+ indent += COL;
+
+ for (i = 0; i < nmembs; i++) {
+ if ((mname = H5Tget_member_name(dtype, (unsigned)i)) == NULL)
goto out;
- if(H5Tget_array_dims2(dtype, dims) < 0)
+ if ((mtype = H5Tget_member_type(dtype, (unsigned)i)) < 0)
+ goto out;
+ moffset = H5Tget_member_offset(dtype, (unsigned)i);
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
goto out;
- /* Print array dimensions */
- for (i = 0; i < ndims; i++) {
- HDsnprintf(tmp_str, TMP_LEN, "[%d]", (int) dims[i]);
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- }
- HDsnprintf(tmp_str, TMP_LEN, " ");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
-
- if((super = H5Tget_super(dtype)) < 0)
+ if ((mclass = H5Tget_class(mtype)) < 0)
goto out;
- if(H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
+ if (H5T_COMPOUND == mclass)
+ indent += COL;
+
+ if (H5LTdtype_to_text(mtype, NULL, lang, &mlen) < 0)
goto out;
- stmp = (char*)HDcalloc(super_len, sizeof(char));
- if(H5LTdtype_to_text(super, stmp, lang, &super_len) < 0)
+ mtmp = (char *)HDcalloc(mlen, sizeof(char));
+ if (H5LTdtype_to_text(mtype, mtmp, lang, &mlen) < 0)
goto out;
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp)))
- goto out;
- if(stmp)
- HDfree(stmp);
- stmp = NULL;
- HDsnprintf(tmp_str, TMP_LEN, "\n");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- H5Tclose(super);
-
- /* Print closing */
- indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, mtmp)))
goto out;
- HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (mtmp)
+ HDfree(mtmp);
+ mtmp = NULL;
- break;
- }
- case H5T_COMPOUND:
- {
- char *mname = NULL;
- hid_t mtype;
- size_t moffset;
- H5T_class_t mclass;
- size_t mlen;
- char* mtmp = NULL;
- int nmembs;
-
- if((nmembs = H5Tget_nmembers(dtype)) < 0)
- goto out;
+ if (H5T_COMPOUND == mclass)
+ indent -= COL;
- HDsnprintf(dt_str, *slen, "H5T_COMPOUND {\n");
- indent += COL;
-
- for (i = 0; i < nmembs; i++) {
- if((mname = H5Tget_member_name(dtype, (unsigned)i))==NULL)
- goto out;
- if((mtype = H5Tget_member_type(dtype, (unsigned)i)) < 0)
- goto out;
- moffset = H5Tget_member_offset(dtype, (unsigned)i);
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
- goto out;
-
- if((mclass = H5Tget_class(mtype)) < 0)
- goto out;
- if (H5T_COMPOUND == mclass)
- indent += COL;
-
- if(H5LTdtype_to_text(mtype, NULL, lang, &mlen) < 0)
- goto out;
- mtmp = (char*)HDcalloc(mlen, sizeof(char));
- if(H5LTdtype_to_text(mtype, mtmp, lang, &mlen) < 0)
- goto out;
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, mtmp)))
- goto out;
- if(mtmp)
- HDfree(mtmp);
- mtmp = NULL;
-
- if (H5T_COMPOUND == mclass)
- indent -= COL;
-
- HDsnprintf(tmp_str, TMP_LEN, " \"%s\"", mname);
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- if(mname)
- H5free_memory(mname);
- mname = NULL;
-
- HDsnprintf(tmp_str, TMP_LEN, " : %lu;\n", (unsigned long)moffset);
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
- }
-
- /* Print closing */
- indent -= COL;
- if(!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ HDsnprintf(tmp_str, TMP_LEN, " \"%s\"", mname);
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
goto out;
- HDsnprintf(tmp_str, TMP_LEN, "}");
- if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
- goto out;
+ if (mname)
+ H5free_memory(mname);
+ mname = NULL;
- break;
+ HDsnprintf(tmp_str, TMP_LEN, " : %lu;\n", (unsigned long)moffset);
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
}
+
+ /* Print closing */
+ indent -= COL;
+ if (!(dt_str = indentation(indent + COL, dt_str, no_user_buf, slen)))
+ goto out;
+ HDsnprintf(tmp_str, TMP_LEN, "}");
+ if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
+ goto out;
+
+ break;
+ }
case H5T_TIME:
HDsnprintf(dt_str, *slen, "H5T_TIME: not yet implemented");
break;
@@ -3057,15 +2959,15 @@ next:
HDsnprintf(dt_str, *slen, "H5T_NO_CLASS");
break;
case H5T_REFERENCE:
- if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) {
- HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }");
- }
- else {
- HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }");
- }
- break;
+ if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) {
+ HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }");
+ }
+ else {
+ HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }");
+ }
+ break;
case H5T_NCLASSES:
- break;
+ break;
default:
HDsnprintf(dt_str, *slen, "unknown data type");
}
@@ -3077,747 +2979,701 @@ out:
}
/*-------------------------------------------------------------------------
-*
-* Get attribute functions
-*
-*-------------------------------------------------------------------------
-*/
-
+ *
+ * Get attribute functions
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*-------------------------------------------------------------------------
+ * Function: H5LTget_attribute_string
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_string
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-
-herr_t H5LTget_attribute_string( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- char *data )
+herr_t
+H5LTget_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name, char *data)
{
/* identifiers */
- hid_t obj_id;
+ hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
/* Open the object */
- if ((obj_id = H5Oopen( loc_id, obj_name, H5P_DEFAULT)) < 0)
+ if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the attribute */
- if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
- {
- H5Oclose(obj_id);
- return -1;
+ if (H5LT_get_attribute_disk(obj_id, attr_name, data) < 0) {
+ H5Oclose(obj_id);
+ return -1;
}
/* Close the object */
- if(H5Oclose(obj_id) < 0)
+ if (H5Oclose(obj_id) < 0)
return -1;
return 0;
-
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_char
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_char( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- char *data )
+ * Function: H5LTget_attribute_char
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, char *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_CHAR, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_CHAR, data) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_uchar
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_uchar( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned char *data )
+ * Function: H5LTget_attribute_uchar
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned char *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_UCHAR, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_UCHAR, data) < 0)
return -1;
return 0;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_short
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_short( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- short *data )
+ * Function: H5LTget_attribute_short
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name, short *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_SHORT, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_SHORT, data) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_ushort
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_ushort( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned short *data )
+ * Function: H5LTget_attribute_ushort
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned short *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_USHORT, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_USHORT, data) < 0)
return -1;
return 0;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_int
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_int( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- int *data )
+ * Function: H5LTget_attribute_int
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, int *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_INT, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_INT, data) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_uint
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_uint( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned int *data )
+ * Function: H5LTget_attribute_uint
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned int *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_UINT, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_UINT, data) < 0)
return -1;
return 0;
}
-
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_long
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- long *data )
+ * Function: H5LTget_attribute_long
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, long *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_LONG, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_LONG, data) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_long_long
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
-*
-* Date: June 17, 2005
-*
-* Comments: This funstion was added to suuport INTEGER*8 Fortran types
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_long_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- long long *data )
+ * Function: H5LTget_attribute_long_long
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Elena Pourmal
+ *
+ * Date: June 17, 2005
+ *
+ * Comments: This function was added to support INTEGER*8 Fortran types
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name, long long *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_LLONG, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_LLONG, data) < 0)
return -1;
return 0;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_ulong
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LTget_attribute_ulong( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned long *data )
+ * Function: H5LTget_attribute_ulong
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 8, 2004
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LTget_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name, unsigned long *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_ULONG, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_ULONG, data) < 0)
return -1;
return 0;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_float
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTget_attribute_float
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTget_attribute_float( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- float *data )
+herr_t
+H5LTget_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name, float *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_FLOAT, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_FLOAT, data) < 0)
return -1;
return 0;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute_double
-*
-* Purpose: Reads an attribute named attr_name
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5LTget_attribute_double
+ *
+ * Purpose: Reads an attribute named attr_name
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LTget_attribute_double( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- double *data )
+herr_t
+H5LTget_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name, double *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_DOUBLE, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, H5T_NATIVE_DOUBLE, data) < 0)
return -1;
return 0;
}
-
/*-------------------------------------------------------------------------
-* Function: H5LTget_attribute
-*
-* Purpose: Reads an attribute named attr_name with the memory type mem_type_id
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments: Private function
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LTget_attribute
+ *
+ * Purpose: Reads an attribute named attr_name with the memory type mem_type_id
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments: Private function
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-
-herr_t H5LTget_attribute( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hid_t mem_type_id,
- void *data )
+herr_t
+H5LTget_attribute(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t mem_type_id, void *data)
{
/* Get the attribute */
- if(H5LT_get_attribute_mem(loc_id, obj_name, attr_name, mem_type_id, data) < 0)
+ if (H5LT_get_attribute_mem(loc_id, obj_name, attr_name, mem_type_id, data) < 0)
return -1;
return 0;
}
-
-/*-------------------------------------------------------------------------
-* private functions
-*-------------------------------------------------------------------------
-*/
-
-
/*-------------------------------------------------------------------------
-* Function: H5LT_get_attribute_mem
-*
-* Purpose: Reads an attribute named attr_name with the memory type mem_type_id
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments: Private function
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * private functions
+ *-------------------------------------------------------------------------
+ */
+
+/*-------------------------------------------------------------------------
+ * Function: H5LT_get_attribute_mem
+ *
+ * Purpose: Reads an attribute named attr_name with the memory type mem_type_id
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments: Private function
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-static herr_t H5LT_get_attribute_mem(hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hid_t mem_type_id,
- void *data)
+static herr_t
+H5LT_get_attribute_mem(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t mem_type_id,
+ void *data)
{
/* identifiers */
- hid_t obj_id = -1;
+ hid_t obj_id = -1;
hid_t attr_id = -1;
/* check the arguments */
- if (obj_name == NULL)
- return -1;
- if (attr_name == NULL)
- return -1;
+ if (obj_name == NULL)
+ return -1;
+ if (attr_name == NULL)
+ return -1;
/* Open the object */
- if((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
+ if ((obj_id = H5Oopen(loc_id, obj_name, H5P_DEFAULT)) < 0)
goto out;
- if((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Aopen(obj_id, attr_name, H5P_DEFAULT)) < 0)
goto out;
- if(H5Aread(attr_id, mem_type_id, data) < 0)
+ if (H5Aread(attr_id, mem_type_id, data) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = -1;
/* Close the object */
- if(H5Oclose(obj_id) < 0)
+ if (H5Oclose(obj_id) < 0)
goto out;
obj_id = -1;
return 0;
out:
- if(obj_id > 0)
+ if (obj_id > 0)
H5Oclose(obj_id);
- if(attr_id > 0)
+ if (attr_id > 0)
H5Aclose(attr_id);
return -1;
}
/*-------------------------------------------------------------------------
-* Function: H5LT_get_attribute_disk
-*
-* Purpose: Reads an attribute named attr_name with the datatype stored on disk
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: September 19, 2002
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5LT_get_attribute_disk
+ *
+ * Purpose: Reads an attribute named attr_name with the datatype stored on disk
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: September 19, 2002
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
-herr_t H5LT_get_attribute_disk( hid_t loc_id,
- const char *attr_name,
- void *attr_out )
+herr_t
+H5LT_get_attribute_disk(hid_t loc_id, const char *attr_name, void *attr_out)
{
/* identifiers */
hid_t attr_id;
hid_t attr_type;
- if(( attr_id = H5Aopen(loc_id, attr_name, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Aopen(loc_id, attr_name, H5P_DEFAULT)) < 0)
return -1;
- if((attr_type = H5Aget_type(attr_id)) < 0)
+ if ((attr_type = H5Aget_type(attr_id)) < 0)
goto out;
- if(H5Aread(attr_id, attr_type, attr_out) < 0)
+ if (H5Aread(attr_id, attr_type, attr_out) < 0)
goto out;
- if(H5Tclose(attr_type) < 0)
+ if (H5Tclose(attr_type) < 0)
goto out;
- if ( H5Aclose( attr_id ) < 0 )
- return -1;;
+ if (H5Aclose(attr_id) < 0)
+ return -1;
+ ;
return 0;
out:
- H5Tclose( attr_type );
- H5Aclose( attr_id );
+ H5Tclose(attr_type);
+ H5Aclose(attr_id);
return -1;
}
-
-/*-------------------------------------------------------------------------
-* Function: H5LT_set_attribute_string
-*
-* Purpose: creates and writes an attribute named NAME to the dataset DSET_ID
-*
-* Return: FAIL on error, SUCCESS on success
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5LT_set_attribute_string(hid_t dset_id,
- const char *name,
- const char *buf )
+/*-------------------------------------------------------------------------
+ * Function: H5LT_set_attribute_string
+ *
+ * Purpose: creates and writes an attribute named NAME to the dataset DSET_ID
+ *
+ * Return: FAIL on error, SUCCESS on success
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 04, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5LT_set_attribute_string(hid_t dset_id, const char *name, const char *buf)
{
- hid_t tid;
- hid_t sid = -1;
- hid_t aid = -1;
- int has_attr;
- size_t size;
+ hid_t tid;
+ hid_t sid = -1;
+ hid_t aid = -1;
+ int has_attr;
+ size_t size;
/* verify if the attribute already exists */
- has_attr = H5LT_find_attribute(dset_id,name);
+ has_attr = H5LT_find_attribute(dset_id, name);
/* the attribute already exists, delete it */
- if(has_attr == 1)
- if(H5Adelete(dset_id, name) < 0)
+ if (has_attr == 1)
+ if (H5Adelete(dset_id, name) < 0)
return FAIL;
/*-------------------------------------------------------------------------
- * create the attribute type
- *-------------------------------------------------------------------------
- */
- if((tid = H5Tcopy(H5T_C_S1)) < 0)
+ * create the attribute type
+ *-------------------------------------------------------------------------
+ */
+ if ((tid = H5Tcopy(H5T_C_S1)) < 0)
return FAIL;
size = HDstrlen(buf) + 1; /* extra null term */
- if(H5Tset_size(tid,(size_t)size) < 0)
+ if (H5Tset_size(tid, (size_t)size) < 0)
goto out;
- if(H5Tset_strpad(tid, H5T_STR_NULLTERM) < 0)
+ if (H5Tset_strpad(tid, H5T_STR_NULLTERM) < 0)
goto out;
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * create and write the attribute
- *-------------------------------------------------------------------------
- */
- if((aid = H5Acreate2(dset_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ * create and write the attribute
+ *-------------------------------------------------------------------------
+ */
+ if ((aid = H5Acreate2(dset_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(aid, tid, buf) < 0)
+ if (H5Awrite(aid, tid, buf) < 0)
goto out;
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
return SUCCEED;
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Aclose(aid);
H5Tclose(tid);
H5Sclose(sid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
-
}
htri_t
H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
- {
- char *tmp_path = NULL; /* Temporary copy of the path */
- char *curr_name; /* Pointer to current component of path name */
- char *delimit; /* Pointer to path delimiter during traversal */
- H5I_type_t obj_type;
- htri_t link_exists, obj_exists;
- size_t path_length;
- htri_t ret_value;
-
- /* Initialize */
- ret_value = FALSE;
-
- /* check the arguments */
- if (path == NULL) {
- ret_value = FAIL;
- goto done;
- }
-
- /* Find the type of loc_id */
- if((obj_type = H5Iget_type(loc_id)) == H5I_BADID) {
- ret_value = FAIL;
- goto done;
- }
-
- /* Find the length of the path */
- path_length = HDstrlen(path);
-
- /* Check if the identifier is the object itself, i.e. path is '.' */
- if(HDstrncmp(path, ".", path_length) == 0) {
- if(check_object_valid) {
- obj_exists = H5Oexists_by_name(loc_id, path, H5P_DEFAULT);
- ret_value = obj_exists;
- goto done;
- } else {
- ret_value = TRUE; /* Since the object is the identifier itself,
- * we can only check if loc_id is a valid type */
- goto done;
- }
- }
-
- /* Duplicate the path to use */
- if(NULL == (tmp_path = HDstrdup(path))) {
- ret_value = FAIL;
- goto done;
- }
-
- curr_name = tmp_path;
-
- /* check if absolute pathname */
- if(HDstrncmp(path, "/", 1) == 0) curr_name++;
-
- /* check if relative path name starts with "./" */
- if(HDstrncmp(path, "./", 2) == 0) curr_name += 2;
-
- while((delimit=HDstrchr(curr_name,'/'))!=NULL) {
- /* Change the delimiter to terminate the string */
- *delimit='\0';
-
- obj_exists = FALSE;
- if((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- goto done;
- }
-
- /* If target link does not exist then no reason to
- * continue checking the path */
- if(link_exists != TRUE) {
- ret_value = FALSE;
- goto done;
- }
-
- /* Determine if link resolves to an actual object */
- if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- goto done;
- }
-
- if(obj_exists != TRUE)
- break;
-
- /* Change the delimiter back to '/' */
- *delimit='/';
-
- /* Advance the pointer in the path to the start of the next component */
- curr_name = delimit + 1;
-
- } /* end while */
-
- /* Should be pointing to the last component in the path name now... */
-
- /* Check if link does not exist */
- if((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- } else {
- ret_value = link_exists;
- /* Determine if link resolves to an actual object for check_object_valid TRUE */
- if(check_object_valid == TRUE && link_exists == TRUE) {
- if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- } else {
- ret_value = obj_exists;
- }
- }
- }
+{
+ char * tmp_path = NULL; /* Temporary copy of the path */
+ char * curr_name; /* Pointer to current component of path name */
+ char * delimit; /* Pointer to path delimiter during traversal */
+ H5I_type_t obj_type;
+ htri_t link_exists, obj_exists;
+ size_t path_length;
+ htri_t ret_value;
+
+ /* Initialize */
+ ret_value = FALSE;
+
+ /* check the arguments */
+ if (path == NULL) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Find the type of loc_id */
+ if ((obj_type = H5Iget_type(loc_id)) == H5I_BADID) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Find the length of the path */
+ path_length = HDstrlen(path);
+
+ /* Check if the identifier is the object itself, i.e. path is '.' */
+ if (HDstrncmp(path, ".", path_length) == 0) {
+ if (check_object_valid) {
+ obj_exists = H5Oexists_by_name(loc_id, path, H5P_DEFAULT);
+ ret_value = obj_exists;
+ goto done;
+ }
+ else {
+ ret_value = TRUE; /* Since the object is the identifier itself,
+ * we can only check if loc_id is a valid type */
+ goto done;
+ }
+ }
+
+ /* Duplicate the path to use */
+ if (NULL == (tmp_path = HDstrdup(path))) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ curr_name = tmp_path;
+
+ /* check if absolute pathname */
+ if (HDstrncmp(path, "/", 1) == 0)
+ curr_name++;
+
+ /* check if relative path name starts with "./" */
+ if (HDstrncmp(path, "./", 2) == 0)
+ curr_name += 2;
+
+ while ((delimit = HDstrchr(curr_name, '/')) != NULL) {
+ /* Change the delimiter to terminate the string */
+ *delimit = '\0';
+
+ obj_exists = FALSE;
+ if ((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* If target link does not exist then no reason to
+ * continue checking the path */
+ if (link_exists != TRUE) {
+ ret_value = FALSE;
+ goto done;
+ }
+
+ /* Determine if link resolves to an actual object */
+ if ((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if (obj_exists != TRUE)
+ break;
+
+ /* Change the delimiter back to '/' */
+ *delimit = '/';
+
+ /* Advance the pointer in the path to the start of the next component */
+ curr_name = delimit + 1;
+
+ } /* end while */
+
+ /* Should be pointing to the last component in the path name now... */
+
+ /* Check if link does not exist */
+ if ((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
+ ret_value = FAIL;
+ }
+ else {
+ ret_value = link_exists;
+ /* Determine if link resolves to an actual object for check_object_valid TRUE */
+ if (check_object_valid == TRUE && link_exists == TRUE) {
+ if ((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
+ ret_value = FAIL;
+ }
+ else {
+ ret_value = obj_exists;
+ }
+ }
+ }
done:
- if(tmp_path != NULL)
- HDfree(tmp_path);
+ if (tmp_path != NULL)
+ HDfree(tmp_path);
- return ret_value;
- }
+ return ret_value;
+}
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index e49795a..e35f20b 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1,25 +1,34 @@
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#if defined (__GNUC__)
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wnested-externs"
#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-macros"
#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600
+#pragma GCC diagnostic ignored "-Wnull-dereference"
+#endif
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
-#line 2 "H5LTanalyze.c"
+#line 2 "hl/src/H5LTanalyze.c"
-#line 4 "H5LTanalyze.c"
+#line 4 "hl/src/H5LTanalyze.c"
#define YY_INT_ALIGNED short int
@@ -47,7 +56,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 37
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -85,6 +94,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -92,6 +102,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -122,8 +133,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -394,7 +403,7 @@ static void yy_fatal_error (yyconst char msg[] );
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- H5LTyyleng = (size_t) (yy_cp - yy_bp); \
+ H5LTyyleng = (yy_size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -863,7 +872,7 @@ goto find_rule; \
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *H5LTyytext;
-#line 1 "H5LTanalyze.l"
+#line 1 "hl/src/H5LTanalyze.l"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
@@ -872,11 +881,16 @@ char *H5LTyytext;
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#line 15 "H5LTanalyze.l"
+/* NOTE!
+ *
+ * If you make any changes to H5LTanalyze.l, please run bin/genparser to
+ * recreate the output files.
+ */
+#line 21 "hl/src/H5LTanalyze.l"
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
@@ -930,7 +944,7 @@ extern hbool_t is_opq_tag;
hbool_t first_quote = 1;
-#line 915 "H5LTanalyze.c"
+#line 920 "hl/src/H5LTanalyze.c"
#define INITIAL 0
#define TAG_STRING 1
@@ -1012,7 +1026,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( H5LTyytext, H5LTyyleng, 1, H5LTyyout )) {} } while (0)
+#define ECHO fwrite( H5LTyytext, H5LTyyleng, 1, H5LTyyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1023,7 +1037,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( H5LTyyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1105,10 +1119,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 71 "H5LTanalyze.l"
+#line 77 "hl/src/H5LTanalyze.l"
-#line 1093 "H5LTanalyze.c"
+#line 1098 "hl/src/H5LTanalyze.c"
if ( !(yy_init) )
{
@@ -1178,6 +1192,7 @@ yy_match:
yy_find_action:
yy_current_state = *--(yy_state_ptr);
(yy_lp) = yy_accept[yy_current_state];
+goto find_rule; /* Shut up GCC warning -Wall */
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
@@ -1202,293 +1217,293 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 73 "H5LTanalyze.l"
+#line 79 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8BE_TOKEN);}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 74 "H5LTanalyze.l"
+#line 80 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8LE_TOKEN);}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 75 "H5LTanalyze.l"
+#line 81 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16BE_TOKEN);}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 76 "H5LTanalyze.l"
+#line 82 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16LE_TOKEN);}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 77 "H5LTanalyze.l"
+#line 83 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32BE_TOKEN);}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 78 "H5LTanalyze.l"
+#line 84 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32LE_TOKEN);}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 79 "H5LTanalyze.l"
+#line 85 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64BE_TOKEN);}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 80 "H5LTanalyze.l"
+#line 86 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64LE_TOKEN);}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 82 "H5LTanalyze.l"
+#line 88 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8BE_TOKEN);}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 83 "H5LTanalyze.l"
+#line 89 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8LE_TOKEN);}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 84 "H5LTanalyze.l"
+#line 90 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16BE_TOKEN);}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 85 "H5LTanalyze.l"
+#line 91 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16LE_TOKEN);}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 86 "H5LTanalyze.l"
+#line 92 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32BE_TOKEN);}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 87 "H5LTanalyze.l"
+#line 93 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32LE_TOKEN);}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 88 "H5LTanalyze.l"
+#line 94 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64BE_TOKEN);}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 89 "H5LTanalyze.l"
+#line 95 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64LE_TOKEN);}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 91 "H5LTanalyze.l"
+#line 97 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_CHAR_TOKEN);}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 92 "H5LTanalyze.l"
+#line 98 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SCHAR_TOKEN);}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 93 "H5LTanalyze.l"
+#line 99 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UCHAR_TOKEN);}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 94 "H5LTanalyze.l"
+#line 100 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SHORT_TOKEN);}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 95 "H5LTanalyze.l"
+#line 101 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_USHORT_TOKEN);}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 96 "H5LTanalyze.l"
+#line 102 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_INT_TOKEN);}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 97 "H5LTanalyze.l"
+#line 103 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UINT_TOKEN);}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 98 "H5LTanalyze.l"
+#line 104 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LONG_TOKEN);}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 99 "H5LTanalyze.l"
+#line 105 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULONG_TOKEN);}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 100 "H5LTanalyze.l"
+#line 106 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LLONG_TOKEN);}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 101 "H5LTanalyze.l"
+#line 107 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULLONG_TOKEN);}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 103 "H5LTanalyze.l"
+#line 109 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32BE_TOKEN);}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 104 "H5LTanalyze.l"
+#line 110 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32LE_TOKEN);}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 105 "H5LTanalyze.l"
+#line 111 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64BE_TOKEN);}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 106 "H5LTanalyze.l"
+#line 112 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64LE_TOKEN);}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 107 "H5LTanalyze.l"
+#line 113 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 108 "H5LTanalyze.l"
+#line 114 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 109 "H5LTanalyze.l"
+#line 115 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 111 "H5LTanalyze.l"
+#line 117 "hl/src/H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 112 "H5LTanalyze.l"
+#line 118 "hl/src/H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 113 "H5LTanalyze.l"
+#line 119 "hl/src/H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 114 "H5LTanalyze.l"
+#line 120 "hl/src/H5LTanalyze.l"
{return token(CSET_TOKEN);}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 115 "H5LTanalyze.l"
+#line 121 "hl/src/H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 116 "H5LTanalyze.l"
-{return token(H5T_STR_NULLTERM_TOKEN);}
+#line 122 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 117 "H5LTanalyze.l"
-{return token(H5T_STR_NULLPAD_TOKEN);}
+#line 123 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 118 "H5LTanalyze.l"
-{return token(H5T_STR_SPACEPAD_TOKEN);}
+#line 124 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 119 "H5LTanalyze.l"
+#line 125 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 120 "H5LTanalyze.l"
+#line 126 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 121 "H5LTanalyze.l"
+#line 127 "hl/src/H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 122 "H5LTanalyze.l"
+#line 128 "hl/src/H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 123 "H5LTanalyze.l"
+#line 129 "hl/src/H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 125 "H5LTanalyze.l"
+#line 131 "hl/src/H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 126 "H5LTanalyze.l"
+#line 132 "hl/src/H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 127 "H5LTanalyze.l"
+#line 133 "hl/src/H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 128 "H5LTanalyze.l"
+#line 134 "hl/src/H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 130 "H5LTanalyze.l"
+#line 136 "hl/src/H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 131 "H5LTanalyze.l"
+#line 137 "hl/src/H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 132 "H5LTanalyze.l"
+#line 138 "hl/src/H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 134 "H5LTanalyze.l"
-{
- if( is_str_size || (is_enum && is_enum_memb) ||
+#line 140 "hl/src/H5LTanalyze.l"
+{
+ if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
H5LTyylval.ival = atoi(H5LTyytext);
- return NUMBER;
+ return NUMBER;
} else
REJECT;
}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 144 "H5LTanalyze.l"
+#line 150 "hl/src/H5LTanalyze.l"
{
/*if it's first quote, and is a compound field name or an enum symbol*/
- if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
+ if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
@@ -1500,7 +1515,7 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 154 "H5LTanalyze.l"
+#line 160 "hl/src/H5LTanalyze.l"
{
#ifdef H5_HAVE_WIN32_API
H5LTyylval.sval = _strdup(H5LTyytext);
@@ -1513,52 +1528,52 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 164 "H5LTanalyze.l"
+#line 170 "hl/src/H5LTanalyze.l"
{return token('{');}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 165 "H5LTanalyze.l"
+#line 171 "hl/src/H5LTanalyze.l"
{return token('}');}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 166 "H5LTanalyze.l"
+#line 172 "hl/src/H5LTanalyze.l"
{return token('[');}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 167 "H5LTanalyze.l"
+#line 173 "hl/src/H5LTanalyze.l"
{return token(']');}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 168 "H5LTanalyze.l"
+#line 174 "hl/src/H5LTanalyze.l"
{return token(':');}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 169 "H5LTanalyze.l"
+#line 175 "hl/src/H5LTanalyze.l"
{return token(';');}
YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 170 "H5LTanalyze.l"
+#line 176 "hl/src/H5LTanalyze.l"
;
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 171 "H5LTanalyze.l"
+#line 177 "hl/src/H5LTanalyze.l"
{ return 0; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 173 "H5LTanalyze.l"
+#line 179 "hl/src/H5LTanalyze.l"
ECHO;
YY_BREAK
-#line 1543 "H5LTanalyze.c"
+#line 1549 "hl/src/H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TAG_STRING):
yyterminate();
@@ -1851,7 +1866,7 @@ static int yy_get_next_buffer (void)
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
@@ -1939,7 +1954,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
if ( H5LTyywrap( ) )
- return EOF;
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -2075,6 +2090,10 @@ static void H5LTyy_load_buffer_state (void)
H5LTyyfree((void *) b );
}
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a H5LTyyrestart() or at EOF.
@@ -2279,8 +2298,8 @@ YY_BUFFER_STATE H5LTyy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to H5LTyylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2288,8 +2307,7 @@ YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2527,14 +2545,14 @@ void H5LTyyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 173 "H5LTanalyze.l"
+#line 179 "hl/src/H5LTanalyze.l"
int my_yyinput(char *buf, int max_size)
{
int ret;
-
- memcpy(buf, myinput, input_len);
+
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index 0470d9f..49fc039 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -6,11 +6,17 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* NOTE!
+ *
+ * If you make any changes to H5LTanalyze.l, please run bin/genparser to
+ * recreate the output files.
+ */
+
%{
#include <stdlib.h>
#include <string.h>
@@ -113,9 +119,9 @@ STRSIZE {return token(STRSIZE_TOKEN);}
STRPAD {return token(STRPAD_TOKEN);}
CSET {return token(CSET_TOKEN);}
CTYPE {return token(CTYPE_TOKEN);}
-H5T_STR_NULLTERM {return token(H5T_STR_NULLTERM_TOKEN);}
-H5T_STR_NULLPAD {return token(H5T_STR_NULLPAD_TOKEN);}
-H5T_STR_SPACEPAD {return token(H5T_STR_SPACEPAD_TOKEN);}
+H5T_STR_NULLTERM {return token(H5T_STR_NULLTERM_TOKEN);}
+H5T_STR_NULLPAD {return token(H5T_STR_NULLPAD_TOKEN);}
+H5T_STR_SPACEPAD {return token(H5T_STR_SPACEPAD_TOKEN);}
H5T_CSET_ASCII {return token(H5T_CSET_ASCII_TOKEN);}
H5T_CSET_UTF8 {return token(H5T_CSET_UTF8_TOKEN);}
H5T_C_S1 {return token(H5T_C_S1_TOKEN);}
@@ -131,19 +137,19 @@ H5T_OPAQUE {return token(H5T_OPAQUE_TOKEN);}
OPQ_SIZE {return token(OPQ_SIZE_TOKEN);}
OPQ_TAG {return token(OPQ_TAG_TOKEN);}
-[0-9]+ {
- if( is_str_size || (is_enum && is_enum_memb) ||
+[0-9]+ {
+ if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
H5LTyylval.ival = atoi(yytext);
- return NUMBER;
+ return NUMBER;
} else
REJECT;
}
"\"" {
/*if it's first quote, and is a compound field name or an enum symbol*/
- if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
+ if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
@@ -160,7 +166,7 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
BEGIN INITIAL;
return STRING;
}
-
+
"{" {return token('{');}
"}" {return token('}');}
"[" {return token('[');}
@@ -174,8 +180,8 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
int my_yyinput(char *buf, int max_size)
{
int ret;
-
- memcpy(buf, myinput, input_len);
+
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index 16a0bcf..80de0a2 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1,38 +1,48 @@
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#if defined (__GNUC__)
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
#pragma GCC diagnostic ignored "-Wlarger-than="
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wnested-externs"
#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-macros"
#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600
+#pragma GCC diagnostic ignored "-Wnull-dereference"
+#endif
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
-/* A Bison parser, made by GNU Bison 2.7. */
+/* A Bison parser, made by GNU Bison 3.7.2. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+ Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -45,13 +55,17 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
@@ -63,7 +77,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7"
+#define YYBISON_VERSION "3.7.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -82,14 +96,13 @@
#define yyparse H5LTyyparse
#define yylex H5LTyylex
#define yyerror H5LTyyerror
-#define yylval H5LTyylval
-#define yychar H5LTyychar
#define yydebug H5LTyydebug
#define yynerrs H5LTyynerrs
+#define yylval H5LTyylval
+#define yychar H5LTyychar
-/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 14 "H5LTparse.y"
+/* First part of user prologue. */
+#line 20 "hl/src/H5LTparse.y"
#include <stdio.h>
#include <string.h>
@@ -142,174 +155,225 @@ hbool_t is_opq_size = 0; /*flag to lexer for opaque type size*/
hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
-/* Line 371 of yacc.c */
-#line 128 "H5LTparse.c"
+#line 131 "hl/src/H5LTparse.c"
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
# else
-# define YY_NULL 0
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
# endif
# endif
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "H5LTparse.h". */
-#ifndef YY_H5LTYY_H5LTPARSE_H_INCLUDED
-# define YY_H5LTYY_H5LTPARSE_H_INCLUDED
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int H5LTyydebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- H5T_STD_I8BE_TOKEN = 258,
- H5T_STD_I8LE_TOKEN = 259,
- H5T_STD_I16BE_TOKEN = 260,
- H5T_STD_I16LE_TOKEN = 261,
- H5T_STD_I32BE_TOKEN = 262,
- H5T_STD_I32LE_TOKEN = 263,
- H5T_STD_I64BE_TOKEN = 264,
- H5T_STD_I64LE_TOKEN = 265,
- H5T_STD_U8BE_TOKEN = 266,
- H5T_STD_U8LE_TOKEN = 267,
- H5T_STD_U16BE_TOKEN = 268,
- H5T_STD_U16LE_TOKEN = 269,
- H5T_STD_U32BE_TOKEN = 270,
- H5T_STD_U32LE_TOKEN = 271,
- H5T_STD_U64BE_TOKEN = 272,
- H5T_STD_U64LE_TOKEN = 273,
- H5T_NATIVE_CHAR_TOKEN = 274,
- H5T_NATIVE_SCHAR_TOKEN = 275,
- H5T_NATIVE_UCHAR_TOKEN = 276,
- H5T_NATIVE_SHORT_TOKEN = 277,
- H5T_NATIVE_USHORT_TOKEN = 278,
- H5T_NATIVE_INT_TOKEN = 279,
- H5T_NATIVE_UINT_TOKEN = 280,
- H5T_NATIVE_LONG_TOKEN = 281,
- H5T_NATIVE_ULONG_TOKEN = 282,
- H5T_NATIVE_LLONG_TOKEN = 283,
- H5T_NATIVE_ULLONG_TOKEN = 284,
- H5T_IEEE_F32BE_TOKEN = 285,
- H5T_IEEE_F32LE_TOKEN = 286,
- H5T_IEEE_F64BE_TOKEN = 287,
- H5T_IEEE_F64LE_TOKEN = 288,
- H5T_NATIVE_FLOAT_TOKEN = 289,
- H5T_NATIVE_DOUBLE_TOKEN = 290,
- H5T_NATIVE_LDOUBLE_TOKEN = 291,
- H5T_STRING_TOKEN = 292,
- STRSIZE_TOKEN = 293,
- STRPAD_TOKEN = 294,
- CSET_TOKEN = 295,
- CTYPE_TOKEN = 296,
- H5T_VARIABLE_TOKEN = 297,
- H5T_STR_NULLTERM_TOKEN = 298,
- H5T_STR_NULLPAD_TOKEN = 299,
- H5T_STR_SPACEPAD_TOKEN = 300,
- H5T_CSET_ASCII_TOKEN = 301,
- H5T_CSET_UTF8_TOKEN = 302,
- H5T_C_S1_TOKEN = 303,
- H5T_FORTRAN_S1_TOKEN = 304,
- H5T_OPAQUE_TOKEN = 305,
- OPQ_SIZE_TOKEN = 306,
- OPQ_TAG_TOKEN = 307,
- H5T_COMPOUND_TOKEN = 308,
- H5T_ENUM_TOKEN = 309,
- H5T_ARRAY_TOKEN = 310,
- H5T_VLEN_TOKEN = 311,
- STRING = 312,
- NUMBER = 313
- };
-#endif
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+#include "H5LTparse.h"
+/* Symbol kind. */
+enum yysymbol_kind_t
{
-/* Line 387 of yacc.c */
-#line 66 "H5LTparse.y"
-
- int ival; /*for integer token*/
- char *sval; /*for name string*/
- hid_t hid; /*for hid_t token*/
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_H5T_STD_I8BE_TOKEN = 3, /* H5T_STD_I8BE_TOKEN */
+ YYSYMBOL_H5T_STD_I8LE_TOKEN = 4, /* H5T_STD_I8LE_TOKEN */
+ YYSYMBOL_H5T_STD_I16BE_TOKEN = 5, /* H5T_STD_I16BE_TOKEN */
+ YYSYMBOL_H5T_STD_I16LE_TOKEN = 6, /* H5T_STD_I16LE_TOKEN */
+ YYSYMBOL_H5T_STD_I32BE_TOKEN = 7, /* H5T_STD_I32BE_TOKEN */
+ YYSYMBOL_H5T_STD_I32LE_TOKEN = 8, /* H5T_STD_I32LE_TOKEN */
+ YYSYMBOL_H5T_STD_I64BE_TOKEN = 9, /* H5T_STD_I64BE_TOKEN */
+ YYSYMBOL_H5T_STD_I64LE_TOKEN = 10, /* H5T_STD_I64LE_TOKEN */
+ YYSYMBOL_H5T_STD_U8BE_TOKEN = 11, /* H5T_STD_U8BE_TOKEN */
+ YYSYMBOL_H5T_STD_U8LE_TOKEN = 12, /* H5T_STD_U8LE_TOKEN */
+ YYSYMBOL_H5T_STD_U16BE_TOKEN = 13, /* H5T_STD_U16BE_TOKEN */
+ YYSYMBOL_H5T_STD_U16LE_TOKEN = 14, /* H5T_STD_U16LE_TOKEN */
+ YYSYMBOL_H5T_STD_U32BE_TOKEN = 15, /* H5T_STD_U32BE_TOKEN */
+ YYSYMBOL_H5T_STD_U32LE_TOKEN = 16, /* H5T_STD_U32LE_TOKEN */
+ YYSYMBOL_H5T_STD_U64BE_TOKEN = 17, /* H5T_STD_U64BE_TOKEN */
+ YYSYMBOL_H5T_STD_U64LE_TOKEN = 18, /* H5T_STD_U64LE_TOKEN */
+ YYSYMBOL_H5T_NATIVE_CHAR_TOKEN = 19, /* H5T_NATIVE_CHAR_TOKEN */
+ YYSYMBOL_H5T_NATIVE_SCHAR_TOKEN = 20, /* H5T_NATIVE_SCHAR_TOKEN */
+ YYSYMBOL_H5T_NATIVE_UCHAR_TOKEN = 21, /* H5T_NATIVE_UCHAR_TOKEN */
+ YYSYMBOL_H5T_NATIVE_SHORT_TOKEN = 22, /* H5T_NATIVE_SHORT_TOKEN */
+ YYSYMBOL_H5T_NATIVE_USHORT_TOKEN = 23, /* H5T_NATIVE_USHORT_TOKEN */
+ YYSYMBOL_H5T_NATIVE_INT_TOKEN = 24, /* H5T_NATIVE_INT_TOKEN */
+ YYSYMBOL_H5T_NATIVE_UINT_TOKEN = 25, /* H5T_NATIVE_UINT_TOKEN */
+ YYSYMBOL_H5T_NATIVE_LONG_TOKEN = 26, /* H5T_NATIVE_LONG_TOKEN */
+ YYSYMBOL_H5T_NATIVE_ULONG_TOKEN = 27, /* H5T_NATIVE_ULONG_TOKEN */
+ YYSYMBOL_H5T_NATIVE_LLONG_TOKEN = 28, /* H5T_NATIVE_LLONG_TOKEN */
+ YYSYMBOL_H5T_NATIVE_ULLONG_TOKEN = 29, /* H5T_NATIVE_ULLONG_TOKEN */
+ YYSYMBOL_H5T_IEEE_F32BE_TOKEN = 30, /* H5T_IEEE_F32BE_TOKEN */
+ YYSYMBOL_H5T_IEEE_F32LE_TOKEN = 31, /* H5T_IEEE_F32LE_TOKEN */
+ YYSYMBOL_H5T_IEEE_F64BE_TOKEN = 32, /* H5T_IEEE_F64BE_TOKEN */
+ YYSYMBOL_H5T_IEEE_F64LE_TOKEN = 33, /* H5T_IEEE_F64LE_TOKEN */
+ YYSYMBOL_H5T_NATIVE_FLOAT_TOKEN = 34, /* H5T_NATIVE_FLOAT_TOKEN */
+ YYSYMBOL_H5T_NATIVE_DOUBLE_TOKEN = 35, /* H5T_NATIVE_DOUBLE_TOKEN */
+ YYSYMBOL_H5T_NATIVE_LDOUBLE_TOKEN = 36, /* H5T_NATIVE_LDOUBLE_TOKEN */
+ YYSYMBOL_H5T_STRING_TOKEN = 37, /* H5T_STRING_TOKEN */
+ YYSYMBOL_STRSIZE_TOKEN = 38, /* STRSIZE_TOKEN */
+ YYSYMBOL_STRPAD_TOKEN = 39, /* STRPAD_TOKEN */
+ YYSYMBOL_CSET_TOKEN = 40, /* CSET_TOKEN */
+ YYSYMBOL_CTYPE_TOKEN = 41, /* CTYPE_TOKEN */
+ YYSYMBOL_H5T_VARIABLE_TOKEN = 42, /* H5T_VARIABLE_TOKEN */
+ YYSYMBOL_H5T_STR_NULLTERM_TOKEN = 43, /* H5T_STR_NULLTERM_TOKEN */
+ YYSYMBOL_H5T_STR_NULLPAD_TOKEN = 44, /* H5T_STR_NULLPAD_TOKEN */
+ YYSYMBOL_H5T_STR_SPACEPAD_TOKEN = 45, /* H5T_STR_SPACEPAD_TOKEN */
+ YYSYMBOL_H5T_CSET_ASCII_TOKEN = 46, /* H5T_CSET_ASCII_TOKEN */
+ YYSYMBOL_H5T_CSET_UTF8_TOKEN = 47, /* H5T_CSET_UTF8_TOKEN */
+ YYSYMBOL_H5T_C_S1_TOKEN = 48, /* H5T_C_S1_TOKEN */
+ YYSYMBOL_H5T_FORTRAN_S1_TOKEN = 49, /* H5T_FORTRAN_S1_TOKEN */
+ YYSYMBOL_H5T_OPAQUE_TOKEN = 50, /* H5T_OPAQUE_TOKEN */
+ YYSYMBOL_OPQ_SIZE_TOKEN = 51, /* OPQ_SIZE_TOKEN */
+ YYSYMBOL_OPQ_TAG_TOKEN = 52, /* OPQ_TAG_TOKEN */
+ YYSYMBOL_H5T_COMPOUND_TOKEN = 53, /* H5T_COMPOUND_TOKEN */
+ YYSYMBOL_H5T_ENUM_TOKEN = 54, /* H5T_ENUM_TOKEN */
+ YYSYMBOL_H5T_ARRAY_TOKEN = 55, /* H5T_ARRAY_TOKEN */
+ YYSYMBOL_H5T_VLEN_TOKEN = 56, /* H5T_VLEN_TOKEN */
+ YYSYMBOL_STRING = 57, /* STRING */
+ YYSYMBOL_NUMBER = 58, /* NUMBER */
+ YYSYMBOL_59_ = 59, /* '{' */
+ YYSYMBOL_60_ = 60, /* '}' */
+ YYSYMBOL_61_ = 61, /* '[' */
+ YYSYMBOL_62_ = 62, /* ']' */
+ YYSYMBOL_63_ = 63, /* '"' */
+ YYSYMBOL_64_ = 64, /* ':' */
+ YYSYMBOL_65_ = 65, /* ';' */
+ YYSYMBOL_YYACCEPT = 66, /* $accept */
+ YYSYMBOL_start = 67, /* start */
+ YYSYMBOL_ddl_type = 68, /* ddl_type */
+ YYSYMBOL_atomic_type = 69, /* atomic_type */
+ YYSYMBOL_integer_type = 70, /* integer_type */
+ YYSYMBOL_fp_type = 71, /* fp_type */
+ YYSYMBOL_compound_type = 72, /* compound_type */
+ YYSYMBOL_73_1 = 73, /* $@1 */
+ YYSYMBOL_memb_list = 74, /* memb_list */
+ YYSYMBOL_memb_def = 75, /* memb_def */
+ YYSYMBOL_76_2 = 76, /* $@2 */
+ YYSYMBOL_field_name = 77, /* field_name */
+ YYSYMBOL_field_offset = 78, /* field_offset */
+ YYSYMBOL_offset = 79, /* offset */
+ YYSYMBOL_array_type = 80, /* array_type */
+ YYSYMBOL_81_3 = 81, /* $@3 */
+ YYSYMBOL_dim_list = 82, /* dim_list */
+ YYSYMBOL_dim = 83, /* dim */
+ YYSYMBOL_84_4 = 84, /* $@4 */
+ YYSYMBOL_85_5 = 85, /* $@5 */
+ YYSYMBOL_dimsize = 86, /* dimsize */
+ YYSYMBOL_vlen_type = 87, /* vlen_type */
+ YYSYMBOL_opaque_type = 88, /* opaque_type */
+ YYSYMBOL_89_6 = 89, /* $@6 */
+ YYSYMBOL_90_7 = 90, /* @7 */
+ YYSYMBOL_91_8 = 91, /* $@8 */
+ YYSYMBOL_92_9 = 92, /* $@9 */
+ YYSYMBOL_opaque_size = 93, /* opaque_size */
+ YYSYMBOL_opaque_tag = 94, /* opaque_tag */
+ YYSYMBOL_string_type = 95, /* string_type */
+ YYSYMBOL_96_10 = 96, /* $@10 */
+ YYSYMBOL_97_11 = 97, /* $@11 */
+ YYSYMBOL_98_12 = 98, /* $@12 */
+ YYSYMBOL_99_13 = 99, /* $@13 */
+ YYSYMBOL_100_14 = 100, /* @14 */
+ YYSYMBOL_strsize = 101, /* strsize */
+ YYSYMBOL_strpad = 102, /* strpad */
+ YYSYMBOL_cset = 103, /* cset */
+ YYSYMBOL_ctype = 104, /* ctype */
+ YYSYMBOL_enum_type = 105, /* enum_type */
+ YYSYMBOL_106_15 = 106, /* $@15 */
+ YYSYMBOL_enum_list = 107, /* enum_list */
+ YYSYMBOL_enum_def = 108, /* enum_def */
+ YYSYMBOL_109_16 = 109, /* $@16 */
+ YYSYMBOL_enum_symbol = 110, /* enum_symbol */
+ YYSYMBOL_enum_val = 111 /* enum_val */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
-/* Line 387 of yacc.c */
-#line 236 "H5LTparse.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-extern YYSTYPE H5LTyylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-hid_t H5LTyyparse (void *YYPARSE_PARAM);
-#else
-hid_t H5LTyyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-hid_t H5LTyyparse (void);
-#else
-hid_t H5LTyyparse ();
+#ifdef short
+# undef short
#endif
-#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_H5LTYY_H5LTPARSE_H_INCLUDED */
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
-/* Copy the second part of user declarations. */
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
+#endif
-/* Line 390 of yacc.c */
-#line 264 "H5LTparse.c"
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
-#ifdef short
-# undef short
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
+#else
+typedef signed char yytype_int8;
#endif
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
#else
-typedef unsigned char yytype_uint8;
+typedef short yytype_int16;
#endif
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
#else
-typedef short int yytype_int8;
+typedef short yytype_uint8;
#endif
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
#else
-typedef unsigned short int yytype_uint16;
+typedef int yytype_uint16;
#endif
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
#endif
#ifndef YYSIZE_T
@@ -317,16 +381,28 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T unsigned
# endif
#endif
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_uint8 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
@@ -340,6 +416,23 @@ typedef short int yytype_int16;
# endif
#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -347,25 +440,41 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
+
+#define YY_ASSERT(E) ((void) (0 && (E)))
-#if ! defined yyoverflow || YYERROR_VERBOSE
+#if !defined yyoverflow
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -382,8 +491,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -395,8 +503,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -412,7 +520,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -420,40 +528,37 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
+#endif /* !defined yyoverflow */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
+ yy_state_t yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
@@ -463,16 +568,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYPTRDIFF_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ } \
+ while (0)
#endif
@@ -482,16 +587,16 @@ union yyalloc
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
- YYSIZE_T yyi; \
+ YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -507,18 +612,23 @@ union yyalloc
#define YYNNTS 46
/* YYNRULES -- Number of rules. */
#define YYNRULES 95
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 143
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
+/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 313
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_int8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -555,73 +665,35 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_int16 yyrline[] =
{
- 0, 0, 3, 4, 6, 8, 10, 12, 14, 16,
- 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
- 38, 40, 42, 44, 46, 48, 50, 52, 54, 56,
- 58, 60, 62, 64, 66, 68, 70, 72, 74, 76,
- 78, 80, 82, 84, 86, 88, 90, 92, 93, 99,
- 100, 103, 104, 112, 114, 115, 118, 120, 121, 128,
- 129, 132, 133, 134, 140, 142, 147, 148, 149, 150,
- 151, 167, 169, 171, 172, 173, 174, 175, 176, 197,
- 199, 201, 203, 205, 207, 209, 211, 213, 215, 216,
- 224, 225, 228, 229, 236, 238
+ 0, 105, 105, 106, 108, 109, 110, 111, 113, 114,
+ 115, 116, 117, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 149, 150, 151, 152, 153, 154, 155, 159, 158, 167,
+ 168, 170, 170, 207, 215, 216, 219, 221, 221, 230,
+ 231, 233, 234, 233, 241, 244, 250, 251, 256, 257,
+ 248, 265, 267, 271, 272, 280, 289, 296, 269, 320,
+ 321, 323, 324, 325, 327, 328, 330, 331, 335, 334,
+ 339, 340, 342, 342, 396, 398
};
+#endif
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 67, 0, -1, -1, 68, -1, 69, -1, 72, -1,
- 80, -1, 87, -1, 70, -1, 71, -1, 95, -1,
- 105, -1, 88, -1, 3, -1, 4, -1, 5, -1,
- 6, -1, 7, -1, 8, -1, 9, -1, 10, -1,
- 11, -1, 12, -1, 13, -1, 14, -1, 15, -1,
- 16, -1, 17, -1, 18, -1, 19, -1, 20, -1,
- 21, -1, 22, -1, 23, -1, 24, -1, 25, -1,
- 26, -1, 27, -1, 28, -1, 29, -1, 30, -1,
- 31, -1, 32, -1, 33, -1, 34, -1, 35, -1,
- 36, -1, -1, 53, 73, 59, 74, 60, -1, -1,
- 74, 75, -1, -1, 68, 76, 63, 77, 63, 78,
- 65, -1, 57, -1, -1, 64, 79, -1, 58, -1,
- -1, 55, 81, 59, 82, 68, 60, -1, -1, 82,
- 83, -1, -1, -1, 61, 84, 86, 85, 62, -1,
- 58, -1, 56, 59, 68, 60, -1, -1, -1, -1,
- -1, 50, 59, 51, 89, 93, 65, 90, 52, 91,
- 63, 94, 63, 65, 92, 60, -1, 58, -1, 57,
- -1, -1, -1, -1, -1, -1, 37, 59, 38, 96,
- 101, 65, 97, 39, 102, 65, 98, 40, 103, 65,
- 99, 41, 104, 65, 100, 60, -1, 42, -1, 58,
- -1, 43, -1, 44, -1, 45, -1, 46, -1, 47,
- -1, 48, -1, 49, -1, -1, 54, 59, 70, 65,
- 106, 107, 60, -1, -1, 107, 108, -1, -1, 63,
- 110, 63, 109, 111, 65, -1, 57, -1, 58, -1
-};
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 99, 99, 100, 102, 103, 104, 105, 107, 108,
- 109, 110, 111, 114, 115, 116, 117, 118, 119, 120,
- 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
- 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
- 143, 144, 145, 146, 147, 148, 149, 153, 152, 161,
- 162, 164, 164, 198, 204, 205, 208, 210, 210, 219,
- 220, 222, 223, 222, 230, 233, 239, 240, 245, 246,
- 237, 252, 254, 258, 259, 267, 276, 283, 256, 307,
- 308, 310, 311, 312, 314, 315, 317, 318, 322, 321,
- 326, 327, 329, 329, 381, 383
-};
-#endif
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "H5T_STD_I8BE_TOKEN",
+ "\"end of file\"", "error", "\"invalid token\"", "H5T_STD_I8BE_TOKEN",
"H5T_STD_I8LE_TOKEN", "H5T_STD_I16BE_TOKEN", "H5T_STD_I16LE_TOKEN",
"H5T_STD_I32BE_TOKEN", "H5T_STD_I32LE_TOKEN", "H5T_STD_I64BE_TOKEN",
"H5T_STD_I64LE_TOKEN", "H5T_STD_U8BE_TOKEN", "H5T_STD_U8LE_TOKEN",
@@ -649,14 +721,20 @@ static const char *const yytname[] =
"$@5", "dimsize", "vlen_type", "opaque_type", "$@6", "@7", "$@8", "$@9",
"opaque_size", "opaque_tag", "string_type", "$@10", "$@11", "$@12",
"$@13", "@14", "strsize", "strpad", "cset", "ctype", "enum_type", "$@15",
- "enum_list", "enum_def", "$@16", "enum_symbol", "enum_val", YY_NULL
+ "enum_list", "enum_def", "$@16", "enum_symbol", "enum_val", YY_NULLPTR
};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
#endif
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
+#ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_int16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -666,73 +744,20 @@ static const yytype_uint16 yytoknum[] =
305, 306, 307, 308, 309, 310, 311, 312, 313, 123,
125, 91, 93, 34, 58, 59
};
-# endif
+#endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 66, 67, 67, 68, 68, 68, 68, 69, 69,
- 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 71, 71, 71, 71, 71, 71, 71, 73, 72, 74,
- 74, 76, 75, 77, 78, 78, 79, 81, 80, 82,
- 82, 84, 85, 83, 86, 87, 89, 90, 91, 92,
- 88, 93, 94, 96, 97, 98, 99, 100, 95, 101,
- 101, 102, 102, 102, 103, 103, 104, 104, 106, 105,
- 107, 107, 109, 108, 110, 111
-};
+#define YYPACT_NINF (-25)
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0, 5, 0,
- 2, 0, 7, 1, 0, 2, 1, 0, 6, 0,
- 2, 0, 0, 5, 1, 4, 0, 0, 0, 0,
- 15, 1, 1, 0, 0, 0, 0, 0, 20, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 7,
- 0, 2, 0, 6, 1, 1
-};
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 2, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 0, 0, 47, 0, 57,
- 0, 0, 3, 4, 8, 9, 5, 6, 7, 12,
- 10, 11, 0, 0, 0, 0, 0, 0, 1, 73,
- 66, 49, 0, 59, 0, 0, 0, 0, 88, 0,
- 65, 79, 80, 0, 71, 0, 48, 51, 50, 90,
- 61, 0, 60, 74, 67, 0, 0, 0, 58, 0,
- 0, 0, 89, 0, 91, 64, 62, 0, 68, 53,
- 0, 94, 0, 0, 81, 82, 83, 0, 0, 54,
- 92, 63, 75, 0, 0, 0, 0, 0, 72, 0,
- 56, 55, 52, 95, 0, 0, 0, 93, 84, 85,
- 0, 69, 76, 0, 0, 70, 0, 86, 87, 0,
- 77, 0, 78
-};
+#define YYTABLE_NINF (-1)
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 41, 42, 43, 44, 45, 46, 54, 67, 78,
- 85, 100, 115, 121, 47, 56, 69, 82, 87, 103,
- 96, 48, 49, 66, 90, 108, 133, 75, 119, 50,
- 65, 89, 117, 134, 141, 73, 107, 130, 139, 51,
- 79, 86, 94, 116, 102, 124
-};
+#define yytable_value_is_error(Yyn) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -25
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
114, -25, -25, -25, -25, -25, -25, -25, -25, -25,
@@ -752,7 +777,29 @@ static const yytype_int16 yypact[] =
-25, 143, -25
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_int8 yydefact[] =
+{
+ 2, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 0, 0, 47, 0, 57,
+ 0, 0, 3, 4, 8, 9, 5, 6, 7, 12,
+ 10, 11, 0, 0, 0, 0, 0, 0, 1, 73,
+ 66, 49, 0, 59, 0, 0, 0, 0, 88, 0,
+ 65, 79, 80, 0, 71, 0, 48, 51, 50, 90,
+ 61, 0, 60, 74, 67, 0, 0, 0, 58, 0,
+ 0, 0, 89, 0, 91, 64, 62, 0, 68, 53,
+ 0, 94, 0, 0, 81, 82, 83, 0, 0, 54,
+ 92, 63, 75, 0, 0, 0, 0, 0, 72, 0,
+ 56, 55, 52, 95, 0, 0, 0, 93, 84, 85,
+ 0, 69, 76, 0, 0, 70, 0, 86, 87, 0,
+ 77, 0, 78
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-25, -25, -21, -25, 108, -25, -25, -25, -25, -25,
@@ -762,10 +809,19 @@ static const yytype_int8 yypgoto[] =
-25, -25, -25, -25, -25, -25
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 41, 42, 43, 44, 45, 46, 54, 67, 78,
+ 85, 100, 115, 121, 47, 56, 69, 82, 87, 103,
+ 96, 48, 49, 66, 90, 108, 133, 75, 119, 50,
+ 65, 89, 117, 134, 141, 73, 107, 130, 139, 51,
+ 79, 86, 94, 116, 102, 124
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
@@ -791,13 +847,7 @@ static const yytype_uint8 yytable[] =
132, 136, 140, 142
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-25)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
-static const yytype_uint8 yycheck[] =
+static const yytype_int8 yycheck[] =
{
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
@@ -822,9 +872,9 @@ static const yytype_uint8 yycheck[] =
65, 41, 65, 60
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_int8 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
@@ -843,67 +893,70 @@ static const yytype_uint8 yystos[] =
65, 100, 60
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_int8 yyr1[] =
+{
+ 0, 66, 67, 67, 68, 68, 68, 68, 69, 69,
+ 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 71, 71, 71, 71, 71, 71, 71, 73, 72, 74,
+ 74, 76, 75, 77, 78, 78, 79, 81, 80, 82,
+ 82, 84, 85, 83, 86, 87, 89, 90, 91, 92,
+ 88, 93, 94, 96, 97, 98, 99, 100, 95, 101,
+ 101, 102, 102, 102, 103, 103, 104, 104, 106, 105,
+ 107, 107, 109, 108, 110, 111
+};
-#define YYRECOVERING() (!!yyerrstatus)
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_int8 yyr2[] =
+{
+ 0, 2, 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 5, 0,
+ 2, 0, 7, 1, 0, 2, 1, 0, 6, 0,
+ 2, 0, 0, 5, 1, 4, 0, 0, 0, 0,
+ 15, 1, 1, 0, 0, 0, 0, 0, 20, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 7,
+ 0, 2, 0, 6, 1, 1
+};
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+enum { YYENOMEM = -2 };
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -913,82 +966,65 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+# ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+
+
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Kind, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
if (!yyvaluep)
return;
# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
+ if (yykind < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
+ yy_symbol_value_print (yyo, yykind, yyvaluep);
+ YYFPRINTF (yyo, ")");
}
/*------------------------------------------------------------------.
@@ -996,16 +1032,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1016,63 +1044,56 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+ int yyrule)
{
+ int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)]);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1088,363 +1109,77 @@ int yydebug;
#endif
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
- if (! yyres)
- return yystrlen (yystr);
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- {
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
YYUSE (yyvaluep);
-
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
- switch (yytype)
- {
-
- default:
- break;
- }
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-
-
-/* The lookahead symbol. */
+/* Lookahead token kind. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
+
+
/*----------.
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-hid_t
-yyparse (void *YYPARSE_PARAM)
-#else
-hid_t
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
hid_t
yyparse (void)
-#else
-hid_t
-yyparse ()
-
-#endif
-#endif
{
- int yystate;
+ yy_state_fast_t yystate = 0;
/* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ int yyerrstatus = 0;
- Refer to the stacks through separate pointers, to allow yyoverflow
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
- YYSIZE_T yystacksize;
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
int yyn;
+ /* The return value of yyparse. */
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
@@ -1452,102 +1187,105 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yyssp = yyss = yyssa;
- yyvsp = yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
+
/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
+| yynewstate -- push a new state, which is found in yystate. |
`------------------------------------------------------------*/
- yynewstate:
+yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
- yysetstate:
- *yyssp = yystate;
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
{
/* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
-#ifdef yyoverflow
+# if defined yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ yy_state_t *yyss1 = yyss;
+ YYSTYPE *yyvs1 = yyvs;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
}
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
+# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yy_state_t *yyss1 = yyss;
+ union yyalloc *yyptr =
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
-#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
+
/*-----------.
| yybackup. |
`-----------*/
yybackup:
-
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
@@ -1558,18 +1296,29 @@ yybackup:
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ YYDPRINTF ((stderr, "Reading a token\n"));
+ yychar = yylex ();
}
if (yychar <= YYEOF)
{
- yychar = yytoken = YYEOF;
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ goto yyerrlab1;
+ }
else
{
yytoken = YYTRANSLATE (yychar);
@@ -1597,15 +1346,13 @@ yybackup:
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
goto yynewstate;
@@ -1620,14 +1367,14 @@ yydefault:
/*-----------------------------.
-| yyreduce -- Do a reduction. |
+| yyreduce -- do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1640,434 +1387,440 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2:
-/* Line 1792 of yacc.c */
-#line 99 "H5LTparse.y"
- { memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
+ case 2: /* start: %empty */
+#line 105 "hl/src/H5LTparse.y"
+ { memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
+#line 1366 "hl/src/H5LTparse.c"
break;
- case 3:
-/* Line 1792 of yacc.c */
-#line 100 "H5LTparse.y"
- { return (yyval.hid);}
+ case 3: /* start: ddl_type */
+#line 106 "hl/src/H5LTparse.y"
+ { return (yyval.hid);}
+#line 1372 "hl/src/H5LTparse.c"
break;
- case 13:
-/* Line 1792 of yacc.c */
-#line 114 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
+ case 13: /* integer_type: H5T_STD_I8BE_TOKEN */
+#line 120 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
+#line 1378 "hl/src/H5LTparse.c"
break;
- case 14:
-/* Line 1792 of yacc.c */
-#line 115 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
+ case 14: /* integer_type: H5T_STD_I8LE_TOKEN */
+#line 121 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
+#line 1384 "hl/src/H5LTparse.c"
break;
- case 15:
-/* Line 1792 of yacc.c */
-#line 116 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
+ case 15: /* integer_type: H5T_STD_I16BE_TOKEN */
+#line 122 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
+#line 1390 "hl/src/H5LTparse.c"
break;
- case 16:
-/* Line 1792 of yacc.c */
-#line 117 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
+ case 16: /* integer_type: H5T_STD_I16LE_TOKEN */
+#line 123 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
+#line 1396 "hl/src/H5LTparse.c"
break;
- case 17:
-/* Line 1792 of yacc.c */
-#line 118 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
+ case 17: /* integer_type: H5T_STD_I32BE_TOKEN */
+#line 124 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
+#line 1402 "hl/src/H5LTparse.c"
break;
- case 18:
-/* Line 1792 of yacc.c */
-#line 119 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
+ case 18: /* integer_type: H5T_STD_I32LE_TOKEN */
+#line 125 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
+#line 1408 "hl/src/H5LTparse.c"
break;
- case 19:
-/* Line 1792 of yacc.c */
-#line 120 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
+ case 19: /* integer_type: H5T_STD_I64BE_TOKEN */
+#line 126 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
+#line 1414 "hl/src/H5LTparse.c"
break;
- case 20:
-/* Line 1792 of yacc.c */
-#line 121 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
+ case 20: /* integer_type: H5T_STD_I64LE_TOKEN */
+#line 127 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
+#line 1420 "hl/src/H5LTparse.c"
break;
- case 21:
-/* Line 1792 of yacc.c */
-#line 122 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
+ case 21: /* integer_type: H5T_STD_U8BE_TOKEN */
+#line 128 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
+#line 1426 "hl/src/H5LTparse.c"
break;
- case 22:
-/* Line 1792 of yacc.c */
-#line 123 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
+ case 22: /* integer_type: H5T_STD_U8LE_TOKEN */
+#line 129 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
+#line 1432 "hl/src/H5LTparse.c"
break;
- case 23:
-/* Line 1792 of yacc.c */
-#line 124 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
+ case 23: /* integer_type: H5T_STD_U16BE_TOKEN */
+#line 130 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
+#line 1438 "hl/src/H5LTparse.c"
break;
- case 24:
-/* Line 1792 of yacc.c */
-#line 125 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
+ case 24: /* integer_type: H5T_STD_U16LE_TOKEN */
+#line 131 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
+#line 1444 "hl/src/H5LTparse.c"
break;
- case 25:
-/* Line 1792 of yacc.c */
-#line 126 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
+ case 25: /* integer_type: H5T_STD_U32BE_TOKEN */
+#line 132 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
+#line 1450 "hl/src/H5LTparse.c"
break;
- case 26:
-/* Line 1792 of yacc.c */
-#line 127 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
+ case 26: /* integer_type: H5T_STD_U32LE_TOKEN */
+#line 133 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
+#line 1456 "hl/src/H5LTparse.c"
break;
- case 27:
-/* Line 1792 of yacc.c */
-#line 128 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
+ case 27: /* integer_type: H5T_STD_U64BE_TOKEN */
+#line 134 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
+#line 1462 "hl/src/H5LTparse.c"
break;
- case 28:
-/* Line 1792 of yacc.c */
-#line 129 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
+ case 28: /* integer_type: H5T_STD_U64LE_TOKEN */
+#line 135 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
+#line 1468 "hl/src/H5LTparse.c"
break;
- case 29:
-/* Line 1792 of yacc.c */
-#line 130 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
+ case 29: /* integer_type: H5T_NATIVE_CHAR_TOKEN */
+#line 136 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
+#line 1474 "hl/src/H5LTparse.c"
break;
- case 30:
-/* Line 1792 of yacc.c */
-#line 131 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
+ case 30: /* integer_type: H5T_NATIVE_SCHAR_TOKEN */
+#line 137 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
+#line 1480 "hl/src/H5LTparse.c"
break;
- case 31:
-/* Line 1792 of yacc.c */
-#line 132 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
+ case 31: /* integer_type: H5T_NATIVE_UCHAR_TOKEN */
+#line 138 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
+#line 1486 "hl/src/H5LTparse.c"
break;
- case 32:
-/* Line 1792 of yacc.c */
-#line 133 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
+ case 32: /* integer_type: H5T_NATIVE_SHORT_TOKEN */
+#line 139 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
+#line 1492 "hl/src/H5LTparse.c"
break;
- case 33:
-/* Line 1792 of yacc.c */
-#line 134 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
+ case 33: /* integer_type: H5T_NATIVE_USHORT_TOKEN */
+#line 140 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
+#line 1498 "hl/src/H5LTparse.c"
break;
- case 34:
-/* Line 1792 of yacc.c */
-#line 135 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
+ case 34: /* integer_type: H5T_NATIVE_INT_TOKEN */
+#line 141 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
+#line 1504 "hl/src/H5LTparse.c"
break;
- case 35:
-/* Line 1792 of yacc.c */
-#line 136 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
+ case 35: /* integer_type: H5T_NATIVE_UINT_TOKEN */
+#line 142 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
+#line 1510 "hl/src/H5LTparse.c"
break;
- case 36:
-/* Line 1792 of yacc.c */
-#line 137 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
+ case 36: /* integer_type: H5T_NATIVE_LONG_TOKEN */
+#line 143 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
+#line 1516 "hl/src/H5LTparse.c"
break;
- case 37:
-/* Line 1792 of yacc.c */
-#line 138 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
+ case 37: /* integer_type: H5T_NATIVE_ULONG_TOKEN */
+#line 144 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
+#line 1522 "hl/src/H5LTparse.c"
break;
- case 38:
-/* Line 1792 of yacc.c */
-#line 139 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
+ case 38: /* integer_type: H5T_NATIVE_LLONG_TOKEN */
+#line 145 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
+#line 1528 "hl/src/H5LTparse.c"
break;
- case 39:
-/* Line 1792 of yacc.c */
-#line 140 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
+ case 39: /* integer_type: H5T_NATIVE_ULLONG_TOKEN */
+#line 146 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
+#line 1534 "hl/src/H5LTparse.c"
break;
- case 40:
-/* Line 1792 of yacc.c */
-#line 143 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
+ case 40: /* fp_type: H5T_IEEE_F32BE_TOKEN */
+#line 149 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
+#line 1540 "hl/src/H5LTparse.c"
break;
- case 41:
-/* Line 1792 of yacc.c */
-#line 144 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
+ case 41: /* fp_type: H5T_IEEE_F32LE_TOKEN */
+#line 150 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
+#line 1546 "hl/src/H5LTparse.c"
break;
- case 42:
-/* Line 1792 of yacc.c */
-#line 145 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
+ case 42: /* fp_type: H5T_IEEE_F64BE_TOKEN */
+#line 151 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
+#line 1552 "hl/src/H5LTparse.c"
break;
- case 43:
-/* Line 1792 of yacc.c */
-#line 146 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
+ case 43: /* fp_type: H5T_IEEE_F64LE_TOKEN */
+#line 152 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
+#line 1558 "hl/src/H5LTparse.c"
break;
- case 44:
-/* Line 1792 of yacc.c */
-#line 147 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
+ case 44: /* fp_type: H5T_NATIVE_FLOAT_TOKEN */
+#line 153 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
+#line 1564 "hl/src/H5LTparse.c"
break;
- case 45:
-/* Line 1792 of yacc.c */
-#line 148 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
+ case 45: /* fp_type: H5T_NATIVE_DOUBLE_TOKEN */
+#line 154 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
+#line 1570 "hl/src/H5LTparse.c"
break;
- case 46:
-/* Line 1792 of yacc.c */
-#line 149 "H5LTparse.y"
- { (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
+ case 46: /* fp_type: H5T_NATIVE_LDOUBLE_TOKEN */
+#line 155 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
+#line 1576 "hl/src/H5LTparse.c"
break;
- case 47:
-/* Line 1792 of yacc.c */
-#line 153 "H5LTparse.y"
- { csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
+ case 47: /* $@1: %empty */
+#line 159 "hl/src/H5LTparse.y"
+ { csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
+#line 1582 "hl/src/H5LTparse.c"
break;
- case 48:
-/* Line 1792 of yacc.c */
-#line 155 "H5LTparse.y"
- { (yyval.hid) = cmpd_stack[csindex].id;
+ case 48: /* compound_type: H5T_COMPOUND_TOKEN $@1 '{' memb_list '}' */
+#line 161 "hl/src/H5LTparse.y"
+ { (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
cmpd_stack[csindex].first_memb = 1;
csindex--;
}
+#line 1592 "hl/src/H5LTparse.c"
break;
- case 51:
-/* Line 1792 of yacc.c */
-#line 164 "H5LTparse.y"
- { cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
+ case 51: /* $@2: %empty */
+#line 170 "hl/src/H5LTparse.y"
+ { cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
+#line 1598 "hl/src/H5LTparse.c"
break;
- case 52:
-/* Line 1792 of yacc.c */
-#line 166 "H5LTparse.y"
- {
+ case 52: /* memb_def: ddl_type $@2 '"' field_name '"' field_offset ';' */
+#line 172 "hl/src/H5LTparse.y"
+ {
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
/*Adjust size and insert member, consider both member size and offset.*/
if(cmpd_stack[csindex].first_memb) { /*reclaim the size 1 temporarily set*/
- new_size = H5Tget_size((yyvsp[(1) - (7)].hid)) + (yyvsp[(6) - (7)].ival);
+ new_size = H5Tget_size((yyvsp[-6].hid)) + (yyvsp[-1].ival);
H5Tset_size(dtype_id, new_size);
/*member name is saved in yylval.sval by lexer*/
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].ival), (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), (yyvsp[-1].ival), (yyvsp[-6].hid));
cmpd_stack[csindex].first_memb = 0;
} else {
origin_size = H5Tget_size(dtype_id);
- if((yyvsp[(6) - (7)].ival) == 0) {
- new_size = origin_size + H5Tget_size((yyvsp[(1) - (7)].hid));
+ if((yyvsp[-1].ival) == 0) {
+ new_size = origin_size + H5Tget_size((yyvsp[-6].hid));
H5Tset_size(dtype_id, new_size);
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), origin_size, (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), origin_size, (yyvsp[-6].hid));
} else {
- new_size = (yyvsp[(6) - (7)].ival) + H5Tget_size((yyvsp[(1) - (7)].hid));
+ new_size = (yyvsp[-1].ival) + H5Tget_size((yyvsp[-6].hid));
H5Tset_size(dtype_id, new_size);
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].ival), (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), (yyvsp[-1].ival), (yyvsp[-6].hid));
}
}
-
+ if((yyvsp[-3].sval)) {
+ free((yyvsp[-3].sval));
+ (yyvsp[-3].sval) = NULL;
+ }
cmpd_stack[csindex].is_field = 0;
- H5Tclose((yyvsp[(1) - (7)].hid));
+ H5Tclose((yyvsp[-6].hid));
new_size = H5Tget_size(dtype_id);
}
+#line 1637 "hl/src/H5LTparse.c"
break;
- case 53:
-/* Line 1792 of yacc.c */
-#line 199 "H5LTparse.y"
- {
- (yyval.sval) = yylval.sval;
+ case 53: /* field_name: STRING */
+#line 208 "hl/src/H5LTparse.y"
+ {
+ (yyval.sval) = strdup(yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
}
+#line 1647 "hl/src/H5LTparse.c"
break;
- case 54:
-/* Line 1792 of yacc.c */
-#line 204 "H5LTparse.y"
- { (yyval.ival) = 0; }
+ case 54: /* field_offset: %empty */
+#line 215 "hl/src/H5LTparse.y"
+ { (yyval.ival) = 0; }
+#line 1653 "hl/src/H5LTparse.c"
break;
- case 55:
-/* Line 1792 of yacc.c */
-#line 206 "H5LTparse.y"
- { (yyval.ival) = yylval.ival; }
+ case 55: /* field_offset: ':' offset */
+#line 217 "hl/src/H5LTparse.y"
+ { (yyval.ival) = yylval.ival; }
+#line 1659 "hl/src/H5LTparse.c"
break;
- case 57:
-/* Line 1792 of yacc.c */
-#line 210 "H5LTparse.y"
- { asindex++; /*pushd onto the stack*/ }
+ case 57: /* $@3: %empty */
+#line 221 "hl/src/H5LTparse.y"
+ { asindex++; /*pushd onto the stack*/ }
+#line 1665 "hl/src/H5LTparse.c"
break;
- case 58:
-/* Line 1792 of yacc.c */
-#line 212 "H5LTparse.y"
- {
- (yyval.hid) = H5Tarray_create2((yyvsp[(5) - (6)].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
+ case 58: /* array_type: H5T_ARRAY_TOKEN $@3 '{' dim_list ddl_type '}' */
+#line 223 "hl/src/H5LTparse.y"
+ {
+ (yyval.hid) = H5Tarray_create2((yyvsp[-1].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
arr_stack[asindex].ndims = 0;
asindex--;
- H5Tclose((yyvsp[(5) - (6)].hid));
+ H5Tclose((yyvsp[-1].hid));
}
+#line 1676 "hl/src/H5LTparse.c"
break;
- case 61:
-/* Line 1792 of yacc.c */
-#line 222 "H5LTparse.y"
- { arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
+ case 61: /* $@4: %empty */
+#line 233 "hl/src/H5LTparse.y"
+ { arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
+#line 1682 "hl/src/H5LTparse.c"
break;
- case 62:
-/* Line 1792 of yacc.c */
-#line 223 "H5LTparse.y"
- { unsigned ndims = arr_stack[asindex].ndims;
+ case 62: /* $@5: %empty */
+#line 234 "hl/src/H5LTparse.y"
+ { unsigned ndims = arr_stack[asindex].ndims;
arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
arr_stack[asindex].ndims++;
arr_stack[asindex].is_dim = 0;
}
+#line 1692 "hl/src/H5LTparse.c"
break;
- case 65:
-/* Line 1792 of yacc.c */
-#line 234 "H5LTparse.y"
- { (yyval.hid) = H5Tvlen_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); }
+ case 65: /* vlen_type: H5T_VLEN_TOKEN '{' ddl_type '}' */
+#line 245 "hl/src/H5LTparse.y"
+ { (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
+#line 1698 "hl/src/H5LTparse.c"
break;
- case 66:
-/* Line 1792 of yacc.c */
-#line 239 "H5LTparse.y"
- { is_opq_size = 1; }
+ case 66: /* $@6: %empty */
+#line 250 "hl/src/H5LTparse.y"
+ { is_opq_size = 1; }
+#line 1704 "hl/src/H5LTparse.c"
break;
- case 67:
-/* Line 1792 of yacc.c */
-#line 240 "H5LTparse.y"
- {
+ case 67: /* @7: %empty */
+#line 251 "hl/src/H5LTparse.y"
+ {
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
is_opq_size = 0;
}
+#line 1714 "hl/src/H5LTparse.c"
break;
- case 68:
-/* Line 1792 of yacc.c */
-#line 245 "H5LTparse.y"
- { is_opq_tag = 1; }
+ case 68: /* $@8: %empty */
+#line 256 "hl/src/H5LTparse.y"
+ { is_opq_tag = 1; }
+#line 1720 "hl/src/H5LTparse.c"
break;
- case 69:
-/* Line 1792 of yacc.c */
-#line 246 "H5LTparse.y"
- {
- H5Tset_tag((yyvsp[(7) - (13)].hid), yylval.sval);
+ case 69: /* $@9: %empty */
+#line 257 "hl/src/H5LTparse.y"
+ {
+ H5Tset_tag((yyvsp[-6].hid), yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
is_opq_tag = 0;
}
+#line 1731 "hl/src/H5LTparse.c"
break;
- case 70:
-/* Line 1792 of yacc.c */
-#line 250 "H5LTparse.y"
- { (yyval.hid) = (yyvsp[(7) - (15)].hid); }
+ case 70: /* opaque_type: H5T_OPAQUE_TOKEN '{' OPQ_SIZE_TOKEN $@6 opaque_size ';' @7 OPQ_TAG_TOKEN $@8 '"' opaque_tag '"' ';' $@9 '}' */
+#line 263 "hl/src/H5LTparse.y"
+ { (yyval.hid) = (yyvsp[-8].hid); }
+#line 1737 "hl/src/H5LTparse.c"
break;
- case 73:
-/* Line 1792 of yacc.c */
-#line 258 "H5LTparse.y"
- { is_str_size = 1; }
+ case 73: /* $@10: %empty */
+#line 271 "hl/src/H5LTparse.y"
+ { is_str_size = 1; }
+#line 1743 "hl/src/H5LTparse.c"
break;
- case 74:
-/* Line 1792 of yacc.c */
-#line 259 "H5LTparse.y"
- {
- if((yyvsp[(5) - (6)].ival) == H5T_VARIABLE_TOKEN)
+ case 74: /* $@11: %empty */
+#line 272 "hl/src/H5LTparse.y"
+ {
+ if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
else
str_size = yylval.ival;
is_str_size = 0;
}
+#line 1755 "hl/src/H5LTparse.c"
break;
- case 75:
-/* Line 1792 of yacc.c */
-#line 267 "H5LTparse.y"
- {
- if((yyvsp[(9) - (10)].ival) == H5T_STR_NULLTERM_TOKEN)
+ case 75: /* $@12: %empty */
+#line 280 "hl/src/H5LTparse.y"
+ {
+ if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
- else if((yyvsp[(9) - (10)].ival) == H5T_STR_NULLPAD_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_STR_NULLPAD_TOKEN)
str_pad = H5T_STR_NULLPAD;
- else if((yyvsp[(9) - (10)].ival) == H5T_STR_SPACEPAD_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
+#line 1768 "hl/src/H5LTparse.c"
break;
- case 76:
-/* Line 1792 of yacc.c */
-#line 276 "H5LTparse.y"
- {
- if((yyvsp[(13) - (14)].ival) == H5T_CSET_ASCII_TOKEN)
+ case 76: /* $@13: %empty */
+#line 289 "hl/src/H5LTparse.y"
+ {
+ if((yyvsp[-1].ival) == H5T_CSET_ASCII_TOKEN)
str_cset = H5T_CSET_ASCII;
- else if((yyvsp[(13) - (14)].ival) == H5T_CSET_UTF8_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_CSET_UTF8_TOKEN)
str_cset = H5T_CSET_UTF8;
}
+#line 1779 "hl/src/H5LTparse.c"
break;
- case 77:
-/* Line 1792 of yacc.c */
-#line 283 "H5LTparse.y"
- {
- if((yyvsp[(17) - (18)].hid) == H5T_C_S1_TOKEN)
+ case 77: /* @14: %empty */
+#line 296 "hl/src/H5LTparse.y"
+ {
+ if((yyvsp[-1].hid) == H5T_C_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_C_S1);
- else if((yyvsp[(17) - (18)].hid) == H5T_FORTRAN_S1_TOKEN)
+ else if((yyvsp[-1].hid) == H5T_FORTRAN_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_FORTRAN_S1);
}
+#line 1790 "hl/src/H5LTparse.c"
break;
- case 78:
-/* Line 1792 of yacc.c */
-#line 290 "H5LTparse.y"
- {
- hid_t str_id = (yyvsp[(19) - (20)].hid);
+ case 78: /* string_type: H5T_STRING_TOKEN '{' STRSIZE_TOKEN $@10 strsize ';' $@11 STRPAD_TOKEN strpad ';' $@12 CSET_TOKEN cset ';' $@13 CTYPE_TOKEN ctype ';' @14 '}' */
+#line 303 "hl/src/H5LTparse.y"
+ {
+ hid_t str_id = (yyvsp[-1].hid);
/*set string size*/
if(is_variable) {
@@ -2082,85 +1835,87 @@ yyreduce:
(yyval.hid) = str_id;
}
+#line 1811 "hl/src/H5LTparse.c"
break;
- case 79:
-/* Line 1792 of yacc.c */
-#line 307 "H5LTparse.y"
- {(yyval.ival) = H5T_VARIABLE_TOKEN;}
+ case 79: /* strsize: H5T_VARIABLE_TOKEN */
+#line 320 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_VARIABLE_TOKEN;}
+#line 1817 "hl/src/H5LTparse.c"
break;
- case 81:
-/* Line 1792 of yacc.c */
-#line 310 "H5LTparse.y"
- {(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
+ case 81: /* strpad: H5T_STR_NULLTERM_TOKEN */
+#line 323 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
+#line 1823 "hl/src/H5LTparse.c"
break;
- case 82:
-/* Line 1792 of yacc.c */
-#line 311 "H5LTparse.y"
- {(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
+ case 82: /* strpad: H5T_STR_NULLPAD_TOKEN */
+#line 324 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
+#line 1829 "hl/src/H5LTparse.c"
break;
- case 83:
-/* Line 1792 of yacc.c */
-#line 312 "H5LTparse.y"
- {(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
+ case 83: /* strpad: H5T_STR_SPACEPAD_TOKEN */
+#line 325 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
+#line 1835 "hl/src/H5LTparse.c"
break;
- case 84:
-/* Line 1792 of yacc.c */
-#line 314 "H5LTparse.y"
- {(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
+ case 84: /* cset: H5T_CSET_ASCII_TOKEN */
+#line 327 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
+#line 1841 "hl/src/H5LTparse.c"
break;
- case 85:
-/* Line 1792 of yacc.c */
-#line 315 "H5LTparse.y"
- {(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
+ case 85: /* cset: H5T_CSET_UTF8_TOKEN */
+#line 328 "hl/src/H5LTparse.y"
+ {(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
+#line 1847 "hl/src/H5LTparse.c"
break;
- case 86:
-/* Line 1792 of yacc.c */
-#line 317 "H5LTparse.y"
- {(yyval.hid) = H5T_C_S1_TOKEN;}
+ case 86: /* ctype: H5T_C_S1_TOKEN */
+#line 330 "hl/src/H5LTparse.y"
+ {(yyval.hid) = H5T_C_S1_TOKEN;}
+#line 1853 "hl/src/H5LTparse.c"
break;
- case 87:
-/* Line 1792 of yacc.c */
-#line 318 "H5LTparse.y"
- {(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
+ case 87: /* ctype: H5T_FORTRAN_S1_TOKEN */
+#line 331 "hl/src/H5LTparse.y"
+ {(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
+#line 1859 "hl/src/H5LTparse.c"
break;
- case 88:
-/* Line 1792 of yacc.c */
-#line 322 "H5LTparse.y"
- { is_enum = 1; enum_id = H5Tenum_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); }
+ case 88: /* $@15: %empty */
+#line 335 "hl/src/H5LTparse.y"
+ { is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
+#line 1865 "hl/src/H5LTparse.c"
break;
- case 89:
-/* Line 1792 of yacc.c */
-#line 324 "H5LTparse.y"
- { is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
+ case 89: /* enum_type: H5T_ENUM_TOKEN '{' integer_type ';' $@15 enum_list '}' */
+#line 337 "hl/src/H5LTparse.y"
+ { is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
+#line 1871 "hl/src/H5LTparse.c"
break;
- case 92:
-/* Line 1792 of yacc.c */
-#line 329 "H5LTparse.y"
- {
+ case 92: /* $@16: %empty */
+#line 342 "hl/src/H5LTparse.y"
+ {
is_enum_memb = 1; /*indicate member of enum*/
#ifdef H5_HAVE_WIN32_API
enum_memb_symbol = _strdup(yylval.sval);
#else /* H5_HAVE_WIN32_API */
enum_memb_symbol = strdup(yylval.sval);
#endif /* H5_HAVE_WIN32_API */
+ free(yylval.sval);
+ yylval.sval = NULL;
}
+#line 1886 "hl/src/H5LTparse.c"
break;
- case 93:
-/* Line 1792 of yacc.c */
-#line 338 "H5LTparse.y"
- {
+ case 93: /* enum_def: '"' enum_symbol '"' $@16 enum_val ';' */
+#line 353 "hl/src/H5LTparse.y"
+ {
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
int int_val=(int)yylval.ival;
@@ -2202,11 +1957,12 @@ yyreduce:
H5Tclose(super);
H5Tclose(native);
}
+#line 1933 "hl/src/H5LTparse.c"
break;
-/* Line 1792 of yacc.c */
-#line 2191 "H5LTparse.c"
+#line 1937 "hl/src/H5LTparse.c"
+
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2220,96 +1976,58 @@ yyreduce:
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
-#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
}
-
-
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -2321,14 +2039,12 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -2341,29 +2057,30 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+ /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ YY_ACCESSING_SYMBOL (yystate), yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -2375,7 +2092,7 @@ yyerrlab1:
/* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -2388,6 +2105,7 @@ yyacceptlab:
yyresult = 0;
goto yyreturn;
+
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
@@ -2395,16 +2113,21 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined yyoverflow || YYERROR_VERBOSE
+
+#if !defined yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (YY_("memory exhausted"));
yyresult = 2;
- /* Fall through. */
+ goto yyreturn;
#endif
+
+/*-------------------------------------------------------.
+| yyreturn -- parsing is finished, clean up and return. |
+`-------------------------------------------------------*/
yyreturn:
if (yychar != YYEMPTY)
{
@@ -2414,26 +2137,21 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
+ return yyresult;
+}
diff --git a/hl/src/H5LTparse.h b/hl/src/H5LTparse.h
index 7481a45..abff969 100644
--- a/hl/src/H5LTparse.h
+++ b/hl/src/H5LTparse.h
@@ -1,19 +1,20 @@
-/* A Bison parser, made by GNU Bison 2.7. */
+/* A Bison parser, made by GNU Bison 3.7.2. */
/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+ Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,13 +27,17 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_H5LTYY_H5LTPARSE_H_INCLUDED
-# define YY_H5LTYY_H5LTPARSE_H_INCLUDED
-/* Enabling traces. */
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
+# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -40,105 +45,96 @@
extern int H5LTyydebug;
#endif
-/* Tokens. */
+/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- H5T_STD_I8BE_TOKEN = 258,
- H5T_STD_I8LE_TOKEN = 259,
- H5T_STD_I16BE_TOKEN = 260,
- H5T_STD_I16LE_TOKEN = 261,
- H5T_STD_I32BE_TOKEN = 262,
- H5T_STD_I32LE_TOKEN = 263,
- H5T_STD_I64BE_TOKEN = 264,
- H5T_STD_I64LE_TOKEN = 265,
- H5T_STD_U8BE_TOKEN = 266,
- H5T_STD_U8LE_TOKEN = 267,
- H5T_STD_U16BE_TOKEN = 268,
- H5T_STD_U16LE_TOKEN = 269,
- H5T_STD_U32BE_TOKEN = 270,
- H5T_STD_U32LE_TOKEN = 271,
- H5T_STD_U64BE_TOKEN = 272,
- H5T_STD_U64LE_TOKEN = 273,
- H5T_NATIVE_CHAR_TOKEN = 274,
- H5T_NATIVE_SCHAR_TOKEN = 275,
- H5T_NATIVE_UCHAR_TOKEN = 276,
- H5T_NATIVE_SHORT_TOKEN = 277,
- H5T_NATIVE_USHORT_TOKEN = 278,
- H5T_NATIVE_INT_TOKEN = 279,
- H5T_NATIVE_UINT_TOKEN = 280,
- H5T_NATIVE_LONG_TOKEN = 281,
- H5T_NATIVE_ULONG_TOKEN = 282,
- H5T_NATIVE_LLONG_TOKEN = 283,
- H5T_NATIVE_ULLONG_TOKEN = 284,
- H5T_IEEE_F32BE_TOKEN = 285,
- H5T_IEEE_F32LE_TOKEN = 286,
- H5T_IEEE_F64BE_TOKEN = 287,
- H5T_IEEE_F64LE_TOKEN = 288,
- H5T_NATIVE_FLOAT_TOKEN = 289,
- H5T_NATIVE_DOUBLE_TOKEN = 290,
- H5T_NATIVE_LDOUBLE_TOKEN = 291,
- H5T_STRING_TOKEN = 292,
- STRSIZE_TOKEN = 293,
- STRPAD_TOKEN = 294,
- CSET_TOKEN = 295,
- CTYPE_TOKEN = 296,
- H5T_VARIABLE_TOKEN = 297,
- H5T_STR_NULLTERM_TOKEN = 298,
- H5T_STR_NULLPAD_TOKEN = 299,
- H5T_STR_SPACEPAD_TOKEN = 300,
- H5T_CSET_ASCII_TOKEN = 301,
- H5T_CSET_UTF8_TOKEN = 302,
- H5T_C_S1_TOKEN = 303,
- H5T_FORTRAN_S1_TOKEN = 304,
- H5T_OPAQUE_TOKEN = 305,
- OPQ_SIZE_TOKEN = 306,
- OPQ_TAG_TOKEN = 307,
- H5T_COMPOUND_TOKEN = 308,
- H5T_ENUM_TOKEN = 309,
- H5T_ARRAY_TOKEN = 310,
- H5T_VLEN_TOKEN = 311,
- STRING = 312,
- NUMBER = 313
- };
+ enum yytokentype
+ {
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ H5T_STD_I8BE_TOKEN = 258, /* H5T_STD_I8BE_TOKEN */
+ H5T_STD_I8LE_TOKEN = 259, /* H5T_STD_I8LE_TOKEN */
+ H5T_STD_I16BE_TOKEN = 260, /* H5T_STD_I16BE_TOKEN */
+ H5T_STD_I16LE_TOKEN = 261, /* H5T_STD_I16LE_TOKEN */
+ H5T_STD_I32BE_TOKEN = 262, /* H5T_STD_I32BE_TOKEN */
+ H5T_STD_I32LE_TOKEN = 263, /* H5T_STD_I32LE_TOKEN */
+ H5T_STD_I64BE_TOKEN = 264, /* H5T_STD_I64BE_TOKEN */
+ H5T_STD_I64LE_TOKEN = 265, /* H5T_STD_I64LE_TOKEN */
+ H5T_STD_U8BE_TOKEN = 266, /* H5T_STD_U8BE_TOKEN */
+ H5T_STD_U8LE_TOKEN = 267, /* H5T_STD_U8LE_TOKEN */
+ H5T_STD_U16BE_TOKEN = 268, /* H5T_STD_U16BE_TOKEN */
+ H5T_STD_U16LE_TOKEN = 269, /* H5T_STD_U16LE_TOKEN */
+ H5T_STD_U32BE_TOKEN = 270, /* H5T_STD_U32BE_TOKEN */
+ H5T_STD_U32LE_TOKEN = 271, /* H5T_STD_U32LE_TOKEN */
+ H5T_STD_U64BE_TOKEN = 272, /* H5T_STD_U64BE_TOKEN */
+ H5T_STD_U64LE_TOKEN = 273, /* H5T_STD_U64LE_TOKEN */
+ H5T_NATIVE_CHAR_TOKEN = 274, /* H5T_NATIVE_CHAR_TOKEN */
+ H5T_NATIVE_SCHAR_TOKEN = 275, /* H5T_NATIVE_SCHAR_TOKEN */
+ H5T_NATIVE_UCHAR_TOKEN = 276, /* H5T_NATIVE_UCHAR_TOKEN */
+ H5T_NATIVE_SHORT_TOKEN = 277, /* H5T_NATIVE_SHORT_TOKEN */
+ H5T_NATIVE_USHORT_TOKEN = 278, /* H5T_NATIVE_USHORT_TOKEN */
+ H5T_NATIVE_INT_TOKEN = 279, /* H5T_NATIVE_INT_TOKEN */
+ H5T_NATIVE_UINT_TOKEN = 280, /* H5T_NATIVE_UINT_TOKEN */
+ H5T_NATIVE_LONG_TOKEN = 281, /* H5T_NATIVE_LONG_TOKEN */
+ H5T_NATIVE_ULONG_TOKEN = 282, /* H5T_NATIVE_ULONG_TOKEN */
+ H5T_NATIVE_LLONG_TOKEN = 283, /* H5T_NATIVE_LLONG_TOKEN */
+ H5T_NATIVE_ULLONG_TOKEN = 284, /* H5T_NATIVE_ULLONG_TOKEN */
+ H5T_IEEE_F32BE_TOKEN = 285, /* H5T_IEEE_F32BE_TOKEN */
+ H5T_IEEE_F32LE_TOKEN = 286, /* H5T_IEEE_F32LE_TOKEN */
+ H5T_IEEE_F64BE_TOKEN = 287, /* H5T_IEEE_F64BE_TOKEN */
+ H5T_IEEE_F64LE_TOKEN = 288, /* H5T_IEEE_F64LE_TOKEN */
+ H5T_NATIVE_FLOAT_TOKEN = 289, /* H5T_NATIVE_FLOAT_TOKEN */
+ H5T_NATIVE_DOUBLE_TOKEN = 290, /* H5T_NATIVE_DOUBLE_TOKEN */
+ H5T_NATIVE_LDOUBLE_TOKEN = 291, /* H5T_NATIVE_LDOUBLE_TOKEN */
+ H5T_STRING_TOKEN = 292, /* H5T_STRING_TOKEN */
+ STRSIZE_TOKEN = 293, /* STRSIZE_TOKEN */
+ STRPAD_TOKEN = 294, /* STRPAD_TOKEN */
+ CSET_TOKEN = 295, /* CSET_TOKEN */
+ CTYPE_TOKEN = 296, /* CTYPE_TOKEN */
+ H5T_VARIABLE_TOKEN = 297, /* H5T_VARIABLE_TOKEN */
+ H5T_STR_NULLTERM_TOKEN = 298, /* H5T_STR_NULLTERM_TOKEN */
+ H5T_STR_NULLPAD_TOKEN = 299, /* H5T_STR_NULLPAD_TOKEN */
+ H5T_STR_SPACEPAD_TOKEN = 300, /* H5T_STR_SPACEPAD_TOKEN */
+ H5T_CSET_ASCII_TOKEN = 301, /* H5T_CSET_ASCII_TOKEN */
+ H5T_CSET_UTF8_TOKEN = 302, /* H5T_CSET_UTF8_TOKEN */
+ H5T_C_S1_TOKEN = 303, /* H5T_C_S1_TOKEN */
+ H5T_FORTRAN_S1_TOKEN = 304, /* H5T_FORTRAN_S1_TOKEN */
+ H5T_OPAQUE_TOKEN = 305, /* H5T_OPAQUE_TOKEN */
+ OPQ_SIZE_TOKEN = 306, /* OPQ_SIZE_TOKEN */
+ OPQ_TAG_TOKEN = 307, /* OPQ_TAG_TOKEN */
+ H5T_COMPOUND_TOKEN = 308, /* H5T_COMPOUND_TOKEN */
+ H5T_ENUM_TOKEN = 309, /* H5T_ENUM_TOKEN */
+ H5T_ARRAY_TOKEN = 310, /* H5T_ARRAY_TOKEN */
+ H5T_VLEN_TOKEN = 311, /* H5T_VLEN_TOKEN */
+ STRING = 312, /* STRING */
+ NUMBER = 313 /* NUMBER */
+ };
+ typedef enum yytokentype yytoken_kind_t;
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+union YYSTYPE
{
-/* Line 2058 of yacc.c */
-#line 66 "H5LTparse.y"
+#line 72 "hl/src/H5LTparse.y"
int ival; /*for integer token*/
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
+#line 128 "hl/src/H5LTparse.h"
-/* Line 2058 of yacc.c */
-#line 122 "H5LTparse.h"
-} YYSTYPE;
+};
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE H5LTyylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int H5LTyyparse (void *YYPARSE_PARAM);
-#else
-int H5LTyyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int H5LTyyparse (void);
-#else
-int H5LTyyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
+hid_t H5LTyyparse (void);
-#endif /* !YY_H5LTYY_H5LTPARSE_H_INCLUDED */
+#endif /* !YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED */
diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y
index 0022174..306d8c9 100644
--- a/hl/src/H5LTparse.y
+++ b/hl/src/H5LTparse.y
@@ -6,11 +6,17 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* NOTE!
+ *
+ * If you make any changes to H5LTparse.y, please run bin/genparser to
+ * recreate the output files.
+ */
+
%{
#include <stdio.h>
#include <string.h>
@@ -188,7 +194,10 @@ memb_def : ddl_type { cmpd_stack[csindex].is_field = 1; /*notify le
H5Tinsert(dtype_id, $<sval>4, $<ival>6, $<hid>1);
}
}
-
+ if($<sval>4) {
+ free($<sval>4);
+ $<sval>4 = NULL;
+ }
cmpd_stack[csindex].is_field = 0;
H5Tclose($<hid>1);
@@ -197,7 +206,9 @@ memb_def : ddl_type { cmpd_stack[csindex].is_field = 1; /*notify le
;
field_name : STRING
{
- $<sval>$ = yylval.sval;
+ $<sval>$ = strdup(yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
}
;
field_offset : /*empty*/
@@ -245,6 +256,8 @@ opaque_type : H5T_OPAQUE_TOKEN
OPQ_TAG_TOKEN { is_opq_tag = 1; } '"' opaque_tag '"' ';'
{
H5Tset_tag($<hid>7, yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
is_opq_tag = 0;
}
'}' { $<hid>$ = $<hid>7; }
@@ -333,6 +346,8 @@ enum_def : '"' enum_symbol '"' {
#else /* H5_HAVE_WIN32_API */
enum_memb_symbol = strdup(yylval.sval);
#endif /* H5_HAVE_WIN32_API */
+ free(yylval.sval);
+ yylval.sval = NULL;
}
enum_val ';'
{
diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h
index 01c5ee6..ddcbbbf 100644
--- a/hl/src/H5LTprivate.h
+++ b/hl/src/H5LTprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,26 +25,17 @@
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5LT_get_attribute_disk( hid_t obj_id,
- const char *attr_name,
- void *data );
+H5_HLDLL herr_t H5LT_get_attribute_disk(hid_t obj_id, const char *attr_name, void *data);
-H5_HLDLL herr_t H5LT_set_attribute_numerical( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- size_t size,
- hid_t type_id,
- const void *data );
+H5_HLDLL herr_t H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *attr_name,
+ size_t size, hid_t type_id, const void *data);
-H5_HLDLL herr_t H5LT_set_attribute_string( hid_t dset_id,
- const char *name,
- const char *buf );
+H5_HLDLL herr_t H5LT_set_attribute_string(hid_t dset_id, const char *name, const char *buf);
-H5_HLDLL herr_t H5LT_find_attribute( hid_t loc_id, const char *name );
+H5_HLDLL herr_t H5LT_find_attribute(hid_t loc_id, const char *name);
-
-H5_HLDLL char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang,
- size_t *slen, hbool_t no_user_buf);
+H5_HLDLL char *H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen,
+ hbool_t no_user_buf);
H5_HLDLL hid_t H5LTyyparse(void);
diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h
index 47be98a..417fce8 100644
--- a/hl/src/H5LTpublic.h
+++ b/hl/src/H5LTpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,13 +15,13 @@
#define _H5LTpublic_H
/* Flag definitions for H5LTopen_file_image() */
-#define H5LT_FILE_IMAGE_OPEN_RW 0x0001 /* Open image for read-write */
-#define H5LT_FILE_IMAGE_DONT_COPY 0x0002 /* The HDF5 lib won't copy */
+#define H5LT_FILE_IMAGE_OPEN_RW 0x0001 /* Open image for read-write */
+#define H5LT_FILE_IMAGE_DONT_COPY 0x0002 /* The HDF5 lib won't copy */
/* user supplied image buffer. The same image is open with the core driver. */
#define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't */
/* deallocate user supplied image buffer. The user application is reponsible */
-/* for doing so. */
-#define H5LT_FILE_IMAGE_ALL 0x0007
+/* for doing so. */
+#define H5LT_FILE_IMAGE_ALL 0x0007
typedef enum H5LT_lang_t {
H5LT_LANG_ERR = -1, /*this is the first*/
@@ -42,53 +42,28 @@ extern "C" {
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5LTmake_dataset( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- hid_t type_id,
- const void *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_char( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const char *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_short( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const short *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_int( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const int *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_long( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const long *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_float( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const float *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_double( hid_t loc_id,
- const char *dset_name,
- int rank,
- const hsize_t *dims,
- const double *buffer );
-
-H5_HLDLL herr_t H5LTmake_dataset_string( hid_t loc_id,
- const char *dset_name,
- const char *buf );
+H5_HLDLL herr_t H5LTmake_dataset(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ hid_t type_id, const void *buffer);
+H5_HLDLL herr_t H5LTmake_dataset_char(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const char *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_short(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const short *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_int(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const int *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_long(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const long *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_float(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const float *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_double(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
+ const double *buffer);
+
+H5_HLDLL herr_t H5LTmake_dataset_string(hid_t loc_id, const char *dset_name, const char *buf);
/*-------------------------------------------------------------------------
*
@@ -97,38 +72,21 @@ H5_HLDLL herr_t H5LTmake_dataset_string( hid_t loc_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5LTread_dataset( hid_t loc_id,
- const char *dset_name,
- hid_t type_id,
- void *buffer );
+H5_HLDLL herr_t H5LTread_dataset(hid_t loc_id, const char *dset_name, hid_t type_id, void *buffer);
-H5_HLDLL herr_t H5LTread_dataset_char( hid_t loc_id,
- const char *dset_name,
- char *buffer );
+H5_HLDLL herr_t H5LTread_dataset_char(hid_t loc_id, const char *dset_name, char *buffer);
-H5_HLDLL herr_t H5LTread_dataset_short( hid_t loc_id,
- const char *dset_name,
- short *buffer );
+H5_HLDLL herr_t H5LTread_dataset_short(hid_t loc_id, const char *dset_name, short *buffer);
-H5_HLDLL herr_t H5LTread_dataset_int( hid_t loc_id,
- const char *dset_name,
- int *buffer );
+H5_HLDLL herr_t H5LTread_dataset_int(hid_t loc_id, const char *dset_name, int *buffer);
-H5_HLDLL herr_t H5LTread_dataset_long( hid_t loc_id,
- const char *dset_name,
- long *buffer );
+H5_HLDLL herr_t H5LTread_dataset_long(hid_t loc_id, const char *dset_name, long *buffer);
-H5_HLDLL herr_t H5LTread_dataset_float( hid_t loc_id,
- const char *dset_name,
- float *buffer );
+H5_HLDLL herr_t H5LTread_dataset_float(hid_t loc_id, const char *dset_name, float *buffer);
-H5_HLDLL herr_t H5LTread_dataset_double( hid_t loc_id,
- const char *dset_name,
- double *buffer );
+H5_HLDLL herr_t H5LTread_dataset_double(hid_t loc_id, const char *dset_name, double *buffer);
-H5_HLDLL herr_t H5LTread_dataset_string( hid_t loc_id,
- const char *dset_name,
- char *buf );
+H5_HLDLL herr_t H5LTread_dataset_string(hid_t loc_id, const char *dset_name, char *buf);
/*-------------------------------------------------------------------------
*
@@ -137,20 +95,12 @@ H5_HLDLL herr_t H5LTread_dataset_string( hid_t loc_id,
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5LTget_dataset_ndims(hid_t loc_id, const char *dset_name, int *rank);
-H5_HLDLL herr_t H5LTget_dataset_ndims( hid_t loc_id,
- const char *dset_name,
- int *rank );
-
-H5_HLDLL herr_t H5LTget_dataset_info( hid_t loc_id,
- const char *dset_name,
- hsize_t *dims,
- H5T_class_t *type_class,
- size_t *type_size );
-
-H5_HLDLL herr_t H5LTfind_dataset( hid_t loc_id, const char *name );
-
+H5_HLDLL herr_t H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims,
+ H5T_class_t *type_class, size_t *type_size);
+H5_HLDLL herr_t H5LTfind_dataset(hid_t loc_id, const char *name);
/*-------------------------------------------------------------------------
*
@@ -159,77 +109,41 @@ H5_HLDLL herr_t H5LTfind_dataset( hid_t loc_id, const char *name );
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const char *attr_data);
+
+H5_HLDLL herr_t H5LTset_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const char *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const unsigned char *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const short *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const unsigned short *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const int *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const unsigned int *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const long *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const long long *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const unsigned long *buffer, size_t size);
+
+H5_HLDLL herr_t H5LTset_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const float *buffer, size_t size);
-H5_HLDLL herr_t H5LTset_attribute_string( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const char *attr_data );
-
-H5_HLDLL herr_t H5LTset_attribute_char( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const char *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_uchar( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned char *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_short( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const short *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_ushort( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned short *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_int( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const int *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_uint( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned int *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const long *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_long_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const long long *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_ulong( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const unsigned long *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_float( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const float *buffer,
- size_t size );
-
-H5_HLDLL herr_t H5LTset_attribute_double( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- const double *buffer,
- size_t size );
+H5_HLDLL herr_t H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name,
+ const double *buffer, size_t size);
/*-------------------------------------------------------------------------
*
@@ -238,72 +152,41 @@ H5_HLDLL herr_t H5LTset_attribute_double( hid_t loc_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5LTget_attribute( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hid_t mem_type_id,
- void *data );
-
-H5_HLDLL herr_t H5LTget_attribute_string( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- char *data );
-
-H5_HLDLL herr_t H5LTget_attribute_char( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- char *data );
-
-H5_HLDLL herr_t H5LTget_attribute_uchar( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned char *data );
-
-H5_HLDLL herr_t H5LTget_attribute_short( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- short *data );
-
-H5_HLDLL herr_t H5LTget_attribute_ushort( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned short *data );
-
-H5_HLDLL herr_t H5LTget_attribute_int( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- int *data );
-
-H5_HLDLL herr_t H5LTget_attribute_uint( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned int *data );
-
-H5_HLDLL herr_t H5LTget_attribute_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- long *data );
-
-H5_HLDLL herr_t H5LTget_attribute_long_long( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- long long *data );
-
-H5_HLDLL herr_t H5LTget_attribute_ulong( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- unsigned long *data );
-
-H5_HLDLL herr_t H5LTget_attribute_float( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- float *data );
-
-H5_HLDLL herr_t H5LTget_attribute_double( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- double *data );
+H5_HLDLL herr_t H5LTget_attribute(hid_t loc_id, const char *obj_name, const char *attr_name,
+ hid_t mem_type_id, void *data);
+H5_HLDLL herr_t H5LTget_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name,
+ char *data);
+
+H5_HLDLL herr_t H5LTget_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, char *data);
+
+H5_HLDLL herr_t H5LTget_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name,
+ unsigned char *data);
+
+H5_HLDLL herr_t H5LTget_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name,
+ short *data);
+
+H5_HLDLL herr_t H5LTget_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name,
+ unsigned short *data);
+
+H5_HLDLL herr_t H5LTget_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, int *data);
+
+H5_HLDLL herr_t H5LTget_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name,
+ unsigned int *data);
+
+H5_HLDLL herr_t H5LTget_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, long *data);
+
+H5_HLDLL herr_t H5LTget_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name,
+ long long *data);
+
+H5_HLDLL herr_t H5LTget_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name,
+ unsigned long *data);
+
+H5_HLDLL herr_t H5LTget_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name,
+ float *data);
+
+H5_HLDLL herr_t H5LTget_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name,
+ double *data);
/*-------------------------------------------------------------------------
*
@@ -312,22 +195,10 @@ H5_HLDLL herr_t H5LTget_attribute_double( hid_t loc_id,
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5LTget_attribute_ndims(hid_t loc_id, const char *obj_name, const char *attr_name, int *rank);
-H5_HLDLL herr_t H5LTget_attribute_ndims( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- int *rank );
-
-H5_HLDLL herr_t H5LTget_attribute_info( hid_t loc_id,
- const char *obj_name,
- const char *attr_name,
- hsize_t *dims,
- H5T_class_t *type_class,
- size_t *type_size );
-
-
-
-
+H5_HLDLL herr_t H5LTget_attribute_info(hid_t loc_id, const char *obj_name, const char *attr_name,
+ hsize_t *dims, H5T_class_t *type_class, size_t *type_size);
/*-------------------------------------------------------------------------
*
@@ -336,10 +207,9 @@ H5_HLDLL herr_t H5LTget_attribute_info( hid_t loc_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type);
+H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type);
H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len);
-
/*-------------------------------------------------------------------------
*
* Utility functions
@@ -347,7 +217,7 @@ H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5LTfind_attribute( hid_t loc_id, const char *name );
+H5_HLDLL herr_t H5LTfind_attribute(hid_t loc_id, const char *name);
H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid);
@@ -365,4 +235,3 @@ H5_HLDLL hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flag
#endif
#endif
-
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 07d8bfb..058caff 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,22 +18,21 @@
/* Packet Table private data */
-typedef struct
-{
- hid_t dset_id; /* The ID of the dataset containing this table */
- hid_t type_id; /* The ID of the packet table's native datatype */
- hsize_t current_index; /* The index of the packet that get_next_packet will read next */
- hsize_t size; /* The number of packets currently contained in this table */
+typedef struct {
+ hid_t dset_id; /* The ID of the dataset containing this table */
+ hid_t type_id; /* The ID of the packet table's native datatype */
+ hsize_t current_index; /* The index of the packet that get_next_packet will read next */
+ hsize_t size; /* The number of packets currently contained in this table */
} htbl_t;
-static hsize_t H5PT_ptable_count = 0;
+static hsize_t H5PT_ptable_count = 0;
static H5I_type_t H5PT_ptable_id_type = H5I_UNINIT;
#define H5PT_HASH_TABLE_SIZE 64
/* Packet Table private functions */
static herr_t H5PT_free_id(void *id);
-static herr_t H5PT_close( htbl_t* table );
+static herr_t H5PT_close(htbl_t *table);
static herr_t H5PT_create_index(htbl_t *table_id);
static herr_t H5PT_set_index(htbl_t *table_id, hsize_t pt_index);
static herr_t H5PT_get_index(htbl_t *table_id, hsize_t *pt_index);
@@ -71,109 +70,105 @@ static herr_t H5PT_get_index(htbl_t *table_id, hsize_t *pt_index);
*
*-------------------------------------------------------------------------
*/
-hid_t H5PTcreate(hid_t loc_id,
- const char *dset_name,
- hid_t dtype_id,
- hsize_t chunk_size,
- hid_t plist_id)
+hid_t
+H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_size, hid_t plist_id)
{
- htbl_t * table = NULL;
- hid_t dset_id = H5I_INVALID_HID;
- hid_t space_id = H5I_INVALID_HID;
- hid_t plistcopy_id = H5I_INVALID_HID;
- hsize_t dims[1];
- hsize_t dims_chunk[1];
- hsize_t maxdims[1];
- hid_t ret_value = H5I_INVALID_HID;
-
- /* check the arguments */
- if (dset_name == NULL) {
- goto error;
- }
-
- /* Register the packet table ID type if this is the first table created */
- if(H5PT_ptable_id_type < 0)
- if((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
- goto error;
-
- /* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
- if ( table == NULL ) {
- goto error;
- }
- table->dset_id = H5I_INVALID_HID;
- table->type_id = H5I_INVALID_HID;
-
- /* Create a simple data space with unlimited size */
- dims[0] = 0;
- dims_chunk[0] = chunk_size;
- maxdims[0] = H5S_UNLIMITED;
- if((space_id = H5Screate_simple(1, dims, maxdims)) < 0)
- goto error;
-
- /* Modify dataset creation properties to enable chunking */
- if (plist_id == H5P_DEFAULT) {
- plistcopy_id = H5Pcreate(H5P_DATASET_CREATE);
- }
- else {
- plistcopy_id = H5Pcopy(plist_id);
- }
- if (chunk_size > 0)
- {
- if(H5Pset_chunk(plistcopy_id, 1, dims_chunk) < 0)
- goto error;
- }
-
- /* Create the dataset. */
- if((dset_id = H5Dcreate2(loc_id, dset_name, dtype_id, space_id, H5P_DEFAULT, plistcopy_id, H5P_DEFAULT)) < 0)
- goto error;
-
- /* Create the table identifier */
- table->dset_id = dset_id;
-
- /* Terminate access to the data space. */
- if(H5Sclose(space_id) < 0)
- goto error;
-
- /* End access to the property list */
- if(H5Pclose(plistcopy_id) < 0)
- goto error;
-
- /* Make a copy of caller's datatype and save it in the table structure.
- It will be closed when the table is closed */
- if((table->type_id = H5Tcopy(dtype_id)) < 0)
- goto error;
-
- H5PT_create_index(table);
- table->size = 0;
-
- /* Get an ID for this table */
- ret_value = H5Iregister(H5PT_ptable_id_type, table);
- if(ret_value != H5I_INVALID_HID)
- H5PT_ptable_count++;
- else
- H5PT_close(table);
-
- return ret_value;
+ htbl_t *table = NULL;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t plistcopy_id = H5I_INVALID_HID;
+ hsize_t dims[1];
+ hsize_t dims_chunk[1];
+ hsize_t maxdims[1];
+ hid_t ret_value = H5I_INVALID_HID;
+
+ /* check the arguments */
+ if (dset_name == NULL) {
+ goto error;
+ }
+
+ /* Register the packet table ID type if this is the first table created */
+ if (H5PT_ptable_id_type < 0)
+ if ((H5PT_ptable_id_type =
+ H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ goto error;
+
+ /* Get memory for the table identifier */
+ table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ if (table == NULL) {
+ goto error;
+ }
+ table->dset_id = H5I_INVALID_HID;
+ table->type_id = H5I_INVALID_HID;
+
+ /* Create a simple data space with unlimited size */
+ dims[0] = 0;
+ dims_chunk[0] = chunk_size;
+ maxdims[0] = H5S_UNLIMITED;
+ if ((space_id = H5Screate_simple(1, dims, maxdims)) < 0)
+ goto error;
+
+ /* Modify dataset creation properties to enable chunking */
+ if (plist_id == H5P_DEFAULT) {
+ plistcopy_id = H5Pcreate(H5P_DATASET_CREATE);
+ }
+ else {
+ plistcopy_id = H5Pcopy(plist_id);
+ }
+ if (chunk_size > 0) {
+ if (H5Pset_chunk(plistcopy_id, 1, dims_chunk) < 0)
+ goto error;
+ }
+
+ /* Create the dataset. */
+ if ((dset_id =
+ H5Dcreate2(loc_id, dset_name, dtype_id, space_id, H5P_DEFAULT, plistcopy_id, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create the table identifier */
+ table->dset_id = dset_id;
+
+ /* Terminate access to the data space. */
+ if (H5Sclose(space_id) < 0)
+ goto error;
+
+ /* End access to the property list */
+ if (H5Pclose(plistcopy_id) < 0)
+ goto error;
+
+ /* Make a copy of caller's datatype and save it in the table structure.
+ It will be closed when the table is closed */
+ if ((table->type_id = H5Tcopy(dtype_id)) < 0)
+ goto error;
+
+ H5PT_create_index(table);
+ table->size = 0;
+
+ /* Get an ID for this table */
+ ret_value = H5Iregister(H5PT_ptable_id_type, table);
+ if (ret_value != H5I_INVALID_HID)
+ H5PT_ptable_count++;
+ else
+ H5PT_close(table);
+
+ return ret_value;
error:
if (space_id != H5I_INVALID_HID)
- H5Sclose(space_id);
+ H5Sclose(space_id);
if (plistcopy_id != H5I_INVALID_HID)
- H5Pclose(plistcopy_id);
+ H5Pclose(plistcopy_id);
if (dset_id != H5I_INVALID_HID)
- H5Dclose(dset_id);
- if (table)
- {
+ H5Dclose(dset_id);
+ if (table) {
if (table->type_id != H5I_INVALID_HID)
- H5Tclose(table->type_id);
- HDfree(table);
+ H5Tclose(table->type_id);
+ HDfree(table);
}
return ret_value;
} /* H5PTcreate */
-
/*-------------------------------------------------------------------------
* Function: H5PTcreate_fl
*
@@ -196,98 +191,95 @@ error:
*-------------------------------------------------------------------------
*/
-hid_t H5PTcreate_fl ( hid_t loc_id,
- const char *dset_name,
- hid_t dtype_id,
- hsize_t chunk_size,
- int compression )
+hid_t
+H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_size, int compression)
{
- htbl_t * table = NULL;
- hid_t dset_id = H5I_INVALID_HID;
- hid_t space_id = H5I_INVALID_HID;
- hid_t plist_id = H5I_INVALID_HID;
- hsize_t dims[1];
- hsize_t dims_chunk[1];
- hsize_t maxdims[1];
- hid_t ret_value = H5I_INVALID_HID;
-
- /* check the arguments */
- if (dset_name == NULL) {
- goto error;
- }
-
- /* Register the packet table ID type if this is the first table created */
- if(H5PT_ptable_id_type < 0)
- if((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
- goto error;
-
- /* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
- if ( table == NULL ) {
- goto error;
- }
- table->dset_id = H5I_INVALID_HID;
- table->type_id = H5I_INVALID_HID;
-
- /* Create a simple data space with unlimited size */
- dims[0] = 0;
- dims_chunk[0] = chunk_size;
- maxdims[0] = H5S_UNLIMITED;
- if((space_id = H5Screate_simple(1, dims, maxdims)) < 0)
- goto error;
-
- /* Modify dataset creation properties to enable chunking */
- plist_id = H5Pcreate(H5P_DATASET_CREATE);
- if(H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
- goto error;
- if(compression >= 0 && compression <= 9)
- if(H5Pset_deflate(plist_id, (unsigned)compression) < 0)
+ htbl_t *table = NULL;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t plist_id = H5I_INVALID_HID;
+ hsize_t dims[1];
+ hsize_t dims_chunk[1];
+ hsize_t maxdims[1];
+ hid_t ret_value = H5I_INVALID_HID;
+
+ /* check the arguments */
+ if (dset_name == NULL) {
goto error;
+ }
- /* Create the dataset. */
- if((dset_id = H5Dcreate2(loc_id, dset_name, dtype_id, space_id, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
- goto error;
+ /* Register the packet table ID type if this is the first table created */
+ if (H5PT_ptable_id_type < 0)
+ if ((H5PT_ptable_id_type =
+ H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ goto error;
- /* Create the table identifier */
- table->dset_id = dset_id;
+ /* Get memory for the table identifier */
+ table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ if (table == NULL) {
+ goto error;
+ }
+ table->dset_id = H5I_INVALID_HID;
+ table->type_id = H5I_INVALID_HID;
+
+ /* Create a simple data space with unlimited size */
+ dims[0] = 0;
+ dims_chunk[0] = chunk_size;
+ maxdims[0] = H5S_UNLIMITED;
+ if ((space_id = H5Screate_simple(1, dims, maxdims)) < 0)
+ goto error;
- /* Terminate access to the data space. */
- if(H5Sclose(space_id) < 0)
- goto error;
+ /* Modify dataset creation properties to enable chunking */
+ plist_id = H5Pcreate(H5P_DATASET_CREATE);
+ if (H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
+ goto error;
+ if (compression >= 0 && compression <= 9)
+ if (H5Pset_deflate(plist_id, (unsigned)compression) < 0)
+ goto error;
- /* End access to the property list */
- if(H5Pclose(plist_id) < 0)
- goto error;
+ /* Create the dataset. */
+ if ((dset_id = H5Dcreate2(loc_id, dset_name, dtype_id, space_id, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
+ goto error;
- /* Make a copy of caller's datatype and save it in the table structure.
- It will be closed when the table is closed */
- if((table->type_id = H5Tcopy(dtype_id)) < 0)
- goto error;
+ /* Create the table identifier */
+ table->dset_id = dset_id;
- H5PT_create_index(table);
- table->size = 0;
+ /* Terminate access to the data space. */
+ if (H5Sclose(space_id) < 0)
+ goto error;
+
+ /* End access to the property list */
+ if (H5Pclose(plist_id) < 0)
+ goto error;
+
+ /* Make a copy of caller's datatype and save it in the table structure.
+ It will be closed when the table is closed */
+ if ((table->type_id = H5Tcopy(dtype_id)) < 0)
+ goto error;
+
+ H5PT_create_index(table);
+ table->size = 0;
- /* Get an ID for this table */
- ret_value = H5Iregister(H5PT_ptable_id_type, table);
- if(ret_value != H5I_INVALID_HID)
- H5PT_ptable_count++;
- else
- H5PT_close(table);
+ /* Get an ID for this table */
+ ret_value = H5Iregister(H5PT_ptable_id_type, table);
+ if (ret_value != H5I_INVALID_HID)
+ H5PT_ptable_count++;
+ else
+ H5PT_close(table);
- return ret_value;
+ return ret_value;
error:
if (space_id != H5I_INVALID_HID)
- H5Sclose(space_id);
+ H5Sclose(space_id);
if (plist_id != H5I_INVALID_HID)
- H5Pclose(plist_id);
+ H5Pclose(plist_id);
if (dset_id != H5I_INVALID_HID)
- H5Dclose(dset_id);
- if (table)
- {
+ H5Dclose(dset_id);
+ if (table) {
if (table->type_id != H5I_INVALID_HID)
- H5Tclose(table->type_id);
- HDfree(table);
+ H5Tclose(table->type_id);
+ HDfree(table);
}
return ret_value;
@@ -317,87 +309,87 @@ error:
*
*-------------------------------------------------------------------------
*/
-hid_t H5PTopen( hid_t loc_id,
- const char *dset_name )
+hid_t
+H5PTopen(hid_t loc_id, const char *dset_name)
{
- hid_t type_id=H5I_INVALID_HID;
- hid_t space_id=H5I_INVALID_HID;
- htbl_t * table = NULL;
- hsize_t dims[1];
- hid_t ret_value = H5I_INVALID_HID;
-
- /* check the arguments */
- if (dset_name == NULL) {
- goto error;
- }
-
- /* Register the packet table ID type if this is the first table created */
- if( H5PT_ptable_id_type < 0)
- if((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
- goto error;
-
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
- if ( table == NULL ) {
- goto error;
- }
- table->dset_id = H5I_INVALID_HID;
- table->type_id = H5I_INVALID_HID;
-
- /* Open the dataset */
- if((table->dset_id = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
- goto error;
-
- /* Get the dataset's disk datatype */
- if((type_id = H5Dget_type(table->dset_id)) < 0)
- goto error;
-
- /* Make a copy of the datatype obtained and save it in the table structure.
- It will be closed when the table is closed */
- if((table->type_id = H5Tcopy(type_id)) < 0)
- goto error;
-
- /* Close the disk datatype */
- if(H5Tclose(type_id) < 0)
- goto error;
- type_id = H5I_INVALID_HID;
-
- /* Initialize the current record pointer */
- if((H5PT_create_index(table)) < 0)
- goto error;
-
- /* Get number of records in table */
- if((space_id=H5Dget_space(table->dset_id)) < 0)
- goto error;
- if(H5Sget_simple_extent_dims(space_id, dims, NULL) < 0)
- goto error;
- if(H5Sclose(space_id) < 0)
- goto error;
- space_id = H5I_INVALID_HID;
-
- table->size = dims[0];
-
- /* Get an ID for this table */
- ret_value = H5Iregister(H5PT_ptable_id_type, table);
-
- if(ret_value != H5I_INVALID_HID)
- H5PT_ptable_count++;
- else
- H5PT_close(table);
-
- return ret_value;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ htbl_t *table = NULL;
+ hsize_t dims[1];
+ hid_t ret_value = H5I_INVALID_HID;
+
+ /* check the arguments */
+ if (dset_name == NULL) {
+ goto error;
+ }
+
+ /* Register the packet table ID type if this is the first table created */
+ if (H5PT_ptable_id_type < 0)
+ if ((H5PT_ptable_id_type =
+ H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ goto error;
+
+ table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ if (table == NULL) {
+ goto error;
+ }
+ table->dset_id = H5I_INVALID_HID;
+ table->type_id = H5I_INVALID_HID;
+
+ /* Open the dataset */
+ if ((table->dset_id = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Get the dataset's disk datatype */
+ if ((type_id = H5Dget_type(table->dset_id)) < 0)
+ goto error;
+
+ /* Make a copy of the datatype obtained and save it in the table structure.
+ It will be closed when the table is closed */
+ if ((table->type_id = H5Tcopy(type_id)) < 0)
+ goto error;
+
+ /* Close the disk datatype */
+ if (H5Tclose(type_id) < 0)
+ goto error;
+ type_id = H5I_INVALID_HID;
+
+ /* Initialize the current record pointer */
+ if ((H5PT_create_index(table)) < 0)
+ goto error;
+
+ /* Get number of records in table */
+ if ((space_id = H5Dget_space(table->dset_id)) < 0)
+ goto error;
+ if (H5Sget_simple_extent_dims(space_id, dims, NULL) < 0)
+ goto error;
+ if (H5Sclose(space_id) < 0)
+ goto error;
+ space_id = H5I_INVALID_HID;
+
+ table->size = dims[0];
+
+ /* Get an ID for this table */
+ ret_value = H5Iregister(H5PT_ptable_id_type, table);
+
+ if (ret_value != H5I_INVALID_HID)
+ H5PT_ptable_count++;
+ else
+ H5PT_close(table);
+
+ return ret_value;
error:
if (type_id != H5I_INVALID_HID)
- H5Dclose(type_id);
+ H5Dclose(type_id);
if (space_id != H5I_INVALID_HID)
- H5Sclose(space_id);
- if(table)
- {
+ H5Sclose(space_id);
+ if (table) {
if (table->type_id != H5I_INVALID_HID)
- H5Tclose(table->type_id);
- if (table->dset_id != H5I_INVALID_HID)
- H5Dclose(table->dset_id);
- HDfree(table);
+ H5Tclose(table->type_id);
+ if (table->dset_id != H5I_INVALID_HID)
+ H5Dclose(table->dset_id);
+ HDfree(table);
}
return ret_value;
@@ -438,33 +430,32 @@ H5PT_free_id(void *id)
*-------------------------------------------------------------------------
*/
static herr_t
-H5PT_close( htbl_t* table)
+H5PT_close(htbl_t *table)
{
- if(table == NULL)
- goto error;
+ if (table == NULL)
+ goto error;
- /* Close the dataset */
- if(H5Dclose(table->dset_id) < 0)
- goto error;
+ /* Close the dataset */
+ if (H5Dclose(table->dset_id) < 0)
+ goto error;
- /* Close the memory datatype */
- if(H5Tclose(table->type_id) < 0)
- goto error;
+ /* Close the memory datatype */
+ if (H5Tclose(table->type_id) < 0)
+ goto error;
- HDfree(table);
+ HDfree(table);
- return SUCCEED;
+ return SUCCEED;
error:
- if(table)
- {
- H5E_BEGIN_TRY
- H5Dclose(table->dset_id);
- H5Tclose(table->type_id);
- H5E_END_TRY
- HDfree(table);
- }
- return FAIL;
+ if (table) {
+ H5E_BEGIN_TRY
+ H5Dclose(table->dset_id);
+ H5Tclose(table->type_id);
+ H5E_END_TRY
+ HDfree(table);
+ }
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -486,36 +477,35 @@ error:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTclose( hid_t table_id )
+herr_t
+H5PTclose(hid_t table_id)
{
- htbl_t * table;
+ htbl_t *table;
- /* Remove the ID from the library */
- if((table = (htbl_t *)H5Iremove_verify(table_id, H5PT_ptable_id_type)) ==NULL)
- goto error;
+ /* Remove the ID from the library */
+ if ((table = (htbl_t *)H5Iremove_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- /* If the library found the table, remove it */
- if( H5PT_close(table) < 0)
- goto error;
+ /* If the library found the table, remove it */
+ if (H5PT_close(table) < 0)
+ goto error;
- /* One less packet table open */
- H5PT_ptable_count--;
+ /* One less packet table open */
+ H5PT_ptable_count--;
- /* Remove the packet table type ID if no more packet */
- /* tables are open */
- if(H5PT_ptable_count == 0)
- {
- H5Idestroy_type(H5PT_ptable_id_type);
- H5PT_ptable_id_type = H5I_UNINIT;
- }
+ /* Remove the packet table type ID if no more packet */
+ /* tables are open */
+ if (H5PT_ptable_count == 0) {
+ H5Idestroy_type(H5PT_ptable_id_type);
+ H5PT_ptable_id_type = H5I_UNINIT;
+ }
- return SUCCEED;
+ return SUCCEED;
error:
- return FAIL;
+ return FAIL;
}
-
/*-------------------------------------------------------------------------
*
* Write functions
@@ -541,30 +531,28 @@ error:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTappend( hid_t table_id,
- size_t nrecords,
- const void * data )
+herr_t
+H5PTappend(hid_t table_id, size_t nrecords, const void *data)
{
- htbl_t * table;
+ htbl_t *table;
- /* Find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* Find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- /* If we are asked to write 0 records, just do nothing */
- if(nrecords == 0)
- return SUCCEED;
+ /* If we are asked to write 0 records, just do nothing */
+ if (nrecords == 0)
+ return SUCCEED;
- if((H5TB_common_append_records(table->dset_id, table->type_id,
- nrecords, table->size, data)) < 0)
- goto error;
+ if ((H5TB_common_append_records(table->dset_id, table->type_id, nrecords, table->size, data)) < 0)
+ goto error;
- /* Update table size */
- table->size += nrecords;
- return SUCCEED;
+ /* Update table size */
+ table->size += nrecords;
+ return SUCCEED;
error:
- return FAIL;
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -574,7 +562,6 @@ error:
*-------------------------------------------------------------------------
*/
-
/*-------------------------------------------------------------------------
* Function: H5PTget_next
*
@@ -595,30 +582,29 @@ error:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTget_next( hid_t table_id,
- size_t nrecords,
- void * data)
+herr_t
+H5PTget_next(hid_t table_id, size_t nrecords, void *data)
{
- htbl_t * table;
+ htbl_t *table;
- /* Find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* Find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- /* If nrecords == 0, do nothing */
- if(nrecords == 0)
- return SUCCEED;
+ /* If nrecords == 0, do nothing */
+ if (nrecords == 0)
+ return SUCCEED;
- if((H5TB_common_read_records(table->dset_id, table->type_id,
- table->current_index, nrecords, table->size, data)) < 0)
- goto error;
+ if ((H5TB_common_read_records(table->dset_id, table->type_id, table->current_index, nrecords, table->size,
+ data)) < 0)
+ goto error;
- /* Update the current index */
- table->current_index += nrecords;
- return SUCCEED;
+ /* Update the current index */
+ table->current_index += nrecords;
+ return SUCCEED;
error:
- return FAIL;
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -640,30 +626,27 @@ error:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTread_packets( hid_t table_id,
- hsize_t start,
- size_t nrecords,
- void *data)
+herr_t
+H5PTread_packets(hid_t table_id, hsize_t start, size_t nrecords, void *data)
{
- htbl_t * table;
+ htbl_t *table;
- /* find the table struct from its ID */
- table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type);
- if(table == NULL)
- goto error;
+ /* find the table struct from its ID */
+ table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type);
+ if (table == NULL)
+ goto error;
- /* If nrecords == 0, do nothing */
- if(nrecords == 0)
- return SUCCEED;
+ /* If nrecords == 0, do nothing */
+ if (nrecords == 0)
+ return SUCCEED;
- if( H5TB_common_read_records(table->dset_id, table->type_id,
- start, nrecords, table->size, data) < 0)
- goto error;
+ if (H5TB_common_read_records(table->dset_id, table->type_id, start, nrecords, table->size, data) < 0)
+ goto error;
- return SUCCEED;
+ return SUCCEED;
error:
- return FAIL;
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -694,40 +677,36 @@ error:
static herr_t
H5PT_create_index(htbl_t *table)
{
- if( table != NULL)
- {
- table->current_index = 0;
- return SUCCEED;
- }
- return FAIL;
+ if (table != NULL) {
+ table->current_index = 0;
+ return SUCCEED;
+ }
+ return FAIL;
}
static herr_t
H5PT_set_index(htbl_t *table, hsize_t pt_index)
{
- /* Ensure index is valid */
- if( table != NULL )
- {
- if( pt_index < table->size )
- {
- table->current_index = pt_index;
- return SUCCEED;
+ /* Ensure index is valid */
+ if (table != NULL) {
+ if (pt_index < table->size) {
+ table->current_index = pt_index;
+ return SUCCEED;
+ }
}
- }
- return FAIL;
+ return FAIL;
}
static herr_t
H5PT_get_index(htbl_t *table, hsize_t *pt_index)
{
- /* Ensure index is valid */
- if( table != NULL )
- {
- if(pt_index)
- *pt_index = table->current_index;
- return SUCCEED;
- }
- return FAIL;
+ /* Ensure index is valid */
+ if (table != NULL) {
+ if (pt_index)
+ *pt_index = table->current_index;
+ return SUCCEED;
+ }
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -748,37 +727,40 @@ H5PT_get_index(htbl_t *table, hsize_t *pt_index)
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTcreate_index(hid_t table_id)
+herr_t
+H5PTcreate_index(hid_t table_id)
{
- htbl_t * table;
+ htbl_t *table;
- /* find the table struct from its ID */
- if((table = (htbl_t *) (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- return FAIL;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)(htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ return FAIL;
- return H5PT_create_index(table);
+ return H5PT_create_index(table);
}
-herr_t H5PTset_index(hid_t table_id, hsize_t pt_index)
+herr_t
+H5PTset_index(hid_t table_id, hsize_t pt_index)
{
- htbl_t * table;
+ htbl_t *table;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- return FAIL;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ return FAIL;
- return H5PT_set_index(table, pt_index);
+ return H5PT_set_index(table, pt_index);
}
-herr_t H5PTget_index(hid_t table_id, hsize_t *pt_index)
+herr_t
+H5PTget_index(hid_t table_id, hsize_t *pt_index)
{
- htbl_t * table;
+ htbl_t *table;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- return FAIL;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ return FAIL;
- return H5PT_get_index(table, pt_index);
+ return H5PT_get_index(table, pt_index);
}
/*-------------------------------------------------------------------------
@@ -807,24 +789,24 @@ herr_t H5PTget_index(hid_t table_id, hsize_t *pt_index)
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTget_num_packets( hid_t table_id, hsize_t *nrecords)
+herr_t
+H5PTget_num_packets(hid_t table_id, hsize_t *nrecords)
{
- htbl_t * table;
+ htbl_t *table;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- if(nrecords)
- *nrecords = table->size;
+ if (nrecords)
+ *nrecords = table->size;
- return SUCCEED;
+ return SUCCEED;
error:
- return FAIL;
+ return FAIL;
}
-
/*-------------------------------------------------------------------------
* Function: H5PTis_valid
*
@@ -844,13 +826,14 @@ error:
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTis_valid(hid_t table_id)
+herr_t
+H5PTis_valid(hid_t table_id)
{
- /* find the table struct from its ID */
- if(H5Iobject_verify(table_id, H5PT_ptable_id_type) ==NULL)
- return FAIL;
+ /* find the table struct from its ID */
+ if (H5Iobject_verify(table_id, H5PT_ptable_id_type) == NULL)
+ return FAIL;
- return SUCCEED;
+ return SUCCEED;
}
/*-------------------------------------------------------------------------
@@ -873,25 +856,26 @@ herr_t H5PTis_valid(hid_t table_id)
*
*-------------------------------------------------------------------------
*/
-herr_t H5PTis_varlen(hid_t table_id)
+herr_t
+H5PTis_varlen(hid_t table_id)
{
- H5T_class_t type;
- htbl_t * table;
+ H5T_class_t type;
+ htbl_t * table;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- if((type = H5Tget_class( table->type_id )) == H5T_NO_CLASS)
- goto error;
+ if ((type = H5Tget_class(table->type_id)) == H5T_NO_CLASS)
+ goto error;
- if( type == H5T_VLEN )
- return 1;
- else
- return 0;
+ if (type == H5T_VLEN)
+ return 1;
+ else
+ return 0;
error:
- return FAIL;
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -923,38 +907,37 @@ error:
*-------------------------------------------------------------------------
*/
-herr_t H5PTfree_vlen_buff( hid_t table_id,
- size_t _bufflen,
- void * buff )
+herr_t
+H5PTfree_vlen_buff(hid_t table_id, size_t _bufflen, void *buff)
{
- hid_t space_id = H5I_INVALID_HID;
- htbl_t * table;
- hsize_t bufflen = _bufflen;
- herr_t ret_value;
+ hid_t space_id = H5I_INVALID_HID;
+ htbl_t *table;
+ hsize_t bufflen = _bufflen;
+ herr_t ret_value;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- if((space_id = H5Screate_simple(1, &bufflen, NULL)) < 0)
- goto error;
+ if ((space_id = H5Screate_simple(1, &bufflen, NULL)) < 0)
+ goto error;
- /* Free the memory. If this succeeds, ret_value should be 0. */
- if((ret_value = H5Dvlen_reclaim(table->type_id, space_id, H5P_DEFAULT, buff)) < 0)
- goto error;
+ /* Free the memory. If this succeeds, ret_value should be 0. */
+ if ((ret_value = H5Dvlen_reclaim(table->type_id, space_id, H5P_DEFAULT, buff)) < 0)
+ goto error;
- /* If the dataspace cannot be closed, return -2 to indicate that memory */
- /* was freed successfully but an error still occurred. */
- if(H5Sclose(space_id) < 0)
- return -2;
+ /* If the dataspace cannot be closed, return -2 to indicate that memory */
+ /* was freed successfully but an error still occurred. */
+ if (H5Sclose(space_id) < 0)
+ return -2;
- return ret_value;
+ return ret_value;
error:
- H5E_BEGIN_TRY
+ H5E_BEGIN_TRY
H5Sclose(space_id);
- H5E_END_TRY
- return FAIL;
+ H5E_END_TRY
+ return FAIL;
} /* H5PTfree_vlen_buff */
/*-------------------------------------------------------------------------
@@ -981,20 +964,21 @@ error:
*
*-------------------------------------------------------------------------
*/
-hid_t H5PTget_dataset(hid_t table_id)
+hid_t
+H5PTget_dataset(hid_t table_id)
{
- htbl_t * table;
- hid_t ret_value = H5I_INVALID_HID;
+ htbl_t *table;
+ hid_t ret_value = H5I_INVALID_HID;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- ret_value = table->dset_id;
+ ret_value = table->dset_id;
error:
- return ret_value;
+ return ret_value;
}
/*-------------------------------------------------------------------------
@@ -1015,18 +999,19 @@ error:
*
*-------------------------------------------------------------------------
*/
-hid_t H5PTget_type( hid_t table_id)
+hid_t
+H5PTget_type(hid_t table_id)
{
- htbl_t * table;
- hid_t ret_value = H5I_INVALID_HID;
+ htbl_t *table;
+ hid_t ret_value = H5I_INVALID_HID;
- /* find the table struct from its ID */
- if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
- goto error;
+ /* find the table struct from its ID */
+ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL)
+ goto error;
- ret_value = table->type_id;
+ ret_value = table->type_id;
error:
- return ret_value;
+ return ret_value;
}
diff --git a/hl/src/H5PTprivate.h b/hl/src/H5PTprivate.h
index eec9df7..7277dd2 100644
--- a/hl/src/H5PTprivate.h
+++ b/hl/src/H5PTprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,4 +21,3 @@
#include "H5PTpublic.h"
#endif
-
diff --git a/hl/src/H5PTpublic.h b/hl/src/H5PTpublic.h
index 8a12c8c..ec744f8 100644
--- a/hl/src/H5PTpublic.h
+++ b/hl/src/H5PTpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,7 +14,6 @@
#ifndef _H5PTpublic_H
#define _H5PTpublic_H
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -25,17 +24,16 @@ extern "C" {
*/
/* NOTE: H5PTcreate is replacing H5PTcreate_fl for better name due to the
removal of H5PTcreate_vl. H5PTcreate_fl may be retired in 1.8.19. */
-H5_HLDLL hid_t H5PTcreate(hid_t loc_id, const char *dset_name,
- hid_t dtype_id, hsize_t chunk_size, hid_t plist_id);
+H5_HLDLL hid_t H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_size,
+ hid_t plist_id);
H5_HLDLL hid_t H5PTopen(hid_t loc_id, const char *dset_name);
H5_HLDLL herr_t H5PTclose(hid_t table_id);
/* This function may be removed from the packet table in release 1.8.19. */
-H5_HLDLL hid_t H5PTcreate_fl(hid_t loc_id, const char *dset_name,
- hid_t dtype_id, hsize_t chunk_size, int compression);
-
+H5_HLDLL hid_t H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_size,
+ int compression);
/*-------------------------------------------------------------------------
* Write functions
@@ -47,10 +45,9 @@ H5_HLDLL herr_t H5PTappend(hid_t table_id, size_t nrecords, const void *data);
* Read functions
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5PTget_next(hid_t table_id, size_t nrecords, void * data);
+H5_HLDLL herr_t H5PTget_next(hid_t table_id, size_t nrecords, void *data);
-H5_HLDLL herr_t H5PTread_packets(hid_t table_id, hsize_t start,
- size_t nrecords, void *data);
+H5_HLDLL herr_t H5PTread_packets(hid_t table_id, hsize_t start, size_t nrecords, void *data);
/*-------------------------------------------------------------------------
* Inquiry functions
@@ -80,13 +77,11 @@ H5_HLDLL hid_t H5PTget_type(hid_t table_id);
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5PTcreate_index( hid_t table_id );
+H5_HLDLL herr_t H5PTcreate_index(hid_t table_id);
-H5_HLDLL herr_t H5PTset_index( hid_t table_id,
- hsize_t pt_index );
+H5_HLDLL herr_t H5PTset_index(hid_t table_id, hsize_t pt_index);
-H5_HLDLL herr_t H5PTget_index( hid_t table_id,
- hsize_t *pt_index );
+H5_HLDLL herr_t H5PTget_index(hid_t table_id, hsize_t *pt_index);
/*-------------------------------------------------------------------------
*
@@ -95,13 +90,10 @@ H5_HLDLL herr_t H5PTget_index( hid_t table_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5PTfree_vlen_buff( hid_t table_id,
- size_t bufflen,
- void * buff );
+H5_HLDLL herr_t H5PTfree_vlen_buff(hid_t table_id, size_t bufflen, void *buff);
#ifdef __cplusplus
}
#endif
#endif
-
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index 682ba3f..7c6ba69 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
#include <string.h>
@@ -17,178 +17,160 @@
#include "H5LTprivate.h"
#include "H5TBprivate.h"
-
/*-------------------------------------------------------------------------
-*
-* internal functions
-*
-*-------------------------------------------------------------------------
-*/
-
-static hbool_t H5TB_find_field(const char *field,
- const char *field_list);
-
-static herr_t H5TB_attach_attributes(const char *table_title,
- hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- hid_t tid);
-
-static hid_t H5TB_create_type(hid_t loc_id,
- const char *dset_name,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- hid_t ftype_id);
+ *
+ * internal functions
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static hbool_t H5TB_find_field(const char *field, const char *field_list);
+
+static herr_t H5TB_attach_attributes(const char *table_title, hid_t loc_id, const char *dset_name,
+ hsize_t nfields, hid_t tid);
+
+static hid_t H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size,
+ const size_t *field_offset, const size_t *field_sizes, hid_t ftype_id);
/*-------------------------------------------------------------------------
-*
-* Create functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Create functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBmake_table
-*
-* Purpose: Make a table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-* Quincey Koziol
-*
-* Date: January 17, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBmake_table(const char *table_title,
- hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- hsize_t nrecords,
- size_t type_size,
- const char *field_names[],
- const size_t *field_offset,
- const hid_t *field_types,
- hsize_t chunk_size,
- void *fill_data,
- int compress,
- const void *buf)
+ * Function: H5TBmake_table
+ *
+ * Purpose: Make a table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Quincey Koziol
+ *
+ * Date: January 17, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsize_t nfields,
+ hsize_t nrecords, size_t type_size, const char *field_names[], const size_t *field_offset,
+ const hid_t *field_types, hsize_t chunk_size, void *fill_data, int compress, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t plist_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
- hsize_t dims[1];
- hsize_t dims_chunk[1];
- hsize_t maxdims[1] = {H5S_UNLIMITED};
- char attr_name[255];
- char *member_name = NULL;
- unsigned char *tmp_buf = NULL;
- hsize_t i;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t plist_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
+ hsize_t dims[1];
+ hsize_t dims_chunk[1];
+ hsize_t maxdims[1] = {H5S_UNLIMITED};
+ char attr_name[255];
+ char * member_name = NULL;
+ unsigned char *tmp_buf = NULL;
+ hsize_t i;
+ herr_t ret_val = -1;
/* check the arguments */
if (table_title == NULL) {
- goto out;
+ goto out;
}
if (dset_name == NULL) {
- goto out;
+ goto out;
}
if (field_names == NULL) {
- goto out;
+ goto out;
}
-
+
dims[0] = nrecords;
dims_chunk[0] = chunk_size;
/* create the memory data type. */
- if((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ if ((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* insert fields. */
- for(i = 0; i < nfields; i++)
- if(H5Tinsert(mem_type_id, field_names[i], field_offset[i], field_types[i] ) < 0)
+ for (i = 0; i < nfields; i++)
+ if (H5Tinsert(mem_type_id, field_names[i], field_offset[i], field_types[i]) < 0)
goto out;
/* create a simple data space with unlimited size */
- if((sid = H5Screate_simple(1, dims, maxdims)) < 0)
+ if ((sid = H5Screate_simple(1, dims, maxdims)) < 0)
goto out;
/* modify dataset creation properties, i.e. enable chunking */
- if((plist_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((plist_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if(H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
+ if (H5Pset_chunk(plist_id, 1, dims_chunk) < 0)
goto out;
/* set the fill value using a struct as the data type. */
- if(fill_data)
- if(H5Pset_fill_value(plist_id, mem_type_id, fill_data) < 0)
+ if (fill_data)
+ if (H5Pset_fill_value(plist_id, mem_type_id, fill_data) < 0)
goto out;
/*
dataset creation property list is modified to use
GZIP compression with the compression effort set to 6.
*/
- if(compress)
- if(H5Pset_deflate(plist_id, 6) < 0)
+ if (compress)
+ if (H5Pset_deflate(plist_id, 6) < 0)
goto out;
/* create the dataset. */
- if((did = H5Dcreate2(loc_id, dset_name, mem_type_id, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(loc_id, dset_name, mem_type_id, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT)) < 0)
goto out;
/* only write if there is something to write */
- if(buf)
- if(H5Dwrite(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (buf)
+ if (H5Dwrite(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
/* terminate access to the data space. */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
/* end access to the dataset */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
did = H5I_BADID;
/* end access to the property list */
- if(H5Pclose(plist_id) < 0)
+ if (H5Pclose(plist_id) < 0)
goto out;
plist_id = H5I_BADID;
/*-------------------------------------------------------------------------
- * set the conforming table attributes
- *-------------------------------------------------------------------------
- */
+ * set the conforming table attributes
+ *-------------------------------------------------------------------------
+ */
/* attach the CLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
goto out;
/* attach the VERSION attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
goto out;
/* attach the TITLE attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
goto out;
/* attach the FIELD_ name attribute */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(mem_type_id, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(mem_type_id, (unsigned)i)))
goto out;
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_NAME", (int)i);
/* attach the attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
goto out;
H5free_memory(member_name);
@@ -196,357 +178,343 @@ herr_t H5TBmake_table(const char *table_title,
} /* end for */
/* attach the FIELD_ fill value attribute */
- if(fill_data) {
+ if (fill_data) {
tmp_buf = (unsigned char *)fill_data;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if((attr_id = H5Acreate2(did, attr_name, field_types[i], sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(did, attr_name, field_types[i], sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, field_types[i], tmp_buf + field_offset[i]) < 0)
+ if (H5Awrite(attr_id, field_types[i], tmp_buf + field_offset[i]) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = H5I_BADID;
} /* end for */
/* terminate access to the data space. */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
/* end access to the dataset */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
did = H5I_BADID;
} /* end if */
/* release the datatype. */
- if(H5Tclose(mem_type_id) < 0)
+ if (H5Tclose(mem_type_id) < 0)
goto out;
mem_type_id = H5I_BADID;
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(attr_id > 0)
- if(H5Aclose(attr_id) < 0)
+ if (attr_id > 0)
+ if (H5Aclose(attr_id) < 0)
ret_val = -1;
- if(plist_id > 0)
- if(H5Pclose(plist_id) < 0)
+ if (plist_id > 0)
+ if (H5Pclose(plist_id) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBmake_table() */
/*-------------------------------------------------------------------------
-*
-* Write functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Write functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBappend_records
-*
-* Purpose: Appends records to a table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmers:
-* Pedro Vicente, pvn@ncsa.uiuc.edu
-* Quincey Koziol
-*
-* Date: November 19, 2001
-*
-* Comments: Uses memory offsets
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBappend_records(hid_t loc_id,
- const char *dset_name,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- const void *buf)
+ * Function: H5TBappend_records
+ *
+ * Purpose: Appends records to a table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmers:
+ * Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Quincey Koziol
+ *
+ * Date: November 19, 2001
+ *
+ * Comments: Uses memory offsets
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBappend_records(hid_t loc_id, const char *dset_name, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hsize_t nrecords_orig;
- hsize_t nfields;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hsize_t nrecords_orig;
+ hsize_t nfields;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the original number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatypes */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
- if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
/* append the records */
- if((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, buf)) < 0)
+ if ((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, buf)) < 0)
goto out;
ret_val = 0;
out:
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBappend_records() */
/*-------------------------------------------------------------------------
-* Function: H5TBwrite_records
-*
-* Purpose: Writes records
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments: Uses memory offsets
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBwrite_records(hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- const void *buf)
+ * Function: H5TBwrite_records
+ *
+ * Purpose: Writes records
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments: Uses memory offsets
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBwrite_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t dims[1];
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t dims[1];
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
- if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get records */
- if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
- if(start + nrecords > dims[0])
+ if (start + nrecords > dims[0])
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
ret_val = 0;
out:
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBwrite_records() */
/*-------------------------------------------------------------------------
-* Function: H5TBwrite_fields_name
-*
-* Purpose: Writes fields
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 21, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBwrite_fields_name(hid_t loc_id,
- const char *dset_name,
- const char *field_names,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- const void *buf)
+ * Function: H5TBwrite_fields_name
+ *
+ * Purpose: Writes fields
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 21, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBwrite_fields_name(hid_t loc_id, const char *dset_name, const char *field_names, hsize_t start,
+ hsize_t nrecords, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t file_space_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t file_space_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
hssize_t nfields;
hssize_t i, j;
hsize_t count[1];
hsize_t offset[1];
- char *member_name = NULL;
+ char * member_name = NULL;
size_t size_native;
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* create xfer properties to preserve initialized data */
- if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto out;
- if(H5Pset_preserve(preserve_id, 1) < 0)
+ if (H5Pset_preserve(preserve_id, 1) < 0)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* get the number of fields */
- if((nfields = H5Tget_nmembers(tid)) < 0)
+ if ((nfields = H5Tget_nmembers(tid)) < 0)
goto out;
/* create a write id */
- if((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ if ((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
j = 0;
/* iterate though the members */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
goto out;
- if(H5TB_find_field(member_name, field_names)) {
+ if (H5TB_find_field(member_name, field_names)) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid, (unsigned)i)) < 0)
goto out;
/* convert to native type */
- if((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
+ if ((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- if(0 == (size_native = H5Tget_size(nmtype_id)))
+ if (0 == (size_native = H5Tget_size(nmtype_id)))
goto out;
/* adjust, if necessary */
- if(field_sizes[j] != size_native)
- if(H5Tset_size(nmtype_id, field_sizes[j]) < 0)
+ if (field_sizes[j] != size_native)
+ if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
/* the field in the file is found by its name */
- if(field_offset) {
- if(H5Tinsert(write_type_id, member_name, field_offset[j], nmtype_id) < 0)
+ if (field_offset) {
+ if (H5Tinsert(write_type_id, member_name, field_offset[j], nmtype_id) < 0)
goto out;
} /* end if */
/* only one field */
else {
- if(H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
+ if (H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
} /* end else */
j++;
/* close */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
- if(H5Tclose(nmtype_id) < 0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
nmtype_id = H5I_BADID;
} /* end if */
@@ -556,156 +524,150 @@ herr_t H5TBwrite_fields_name(hid_t loc_id,
} /* end for */
/* get the dataspace handle */
- if((file_space_id = H5Dget_space(did)) < 0)
+ if ((file_space_id = H5Dget_space(did)) < 0)
goto out;
- if((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write */
- if(H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
+ if (H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
goto out;
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(preserve_id > 0)
- if(H5Pclose(preserve_id) < 0)
+ if (preserve_id > 0)
+ if (H5Pclose(preserve_id) < 0)
ret_val = -1;
- if(write_type_id > 0)
- if(H5Tclose(write_type_id) < 0)
+ if (write_type_id > 0)
+ if (H5Tclose(write_type_id) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(file_space_id > 0)
- if(H5Sclose(file_space_id) < 0)
+ if (file_space_id > 0)
+ if (H5Sclose(file_space_id) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBwrite_fields_name() */
/*-------------------------------------------------------------------------
-* Function: H5TBwrite_fields_index
-*
-* Purpose: Writes fields
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 21, 2001
-*
-* Comments: Uses memory offsets
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBwrite_fields_index(hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- const int *field_index,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- const void *buf)
+ * Function: H5TBwrite_fields_index
+ *
+ * Purpose: Writes fields
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 21, 2001
+ *
+ * Comments: Uses memory offsets
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBwrite_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, const int *field_index,
+ hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t file_space_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t i;
- size_t size_native;
- char *member_name = NULL;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t file_space_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t i;
+ size_t size_native;
+ char * member_name = NULL;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* create xfer properties to preserve initialized data */
- if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto out;
- if(H5Pset_preserve(preserve_id, 1) < 0)
+ if (H5Pset_preserve(preserve_id, 1) < 0)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* create a write id */
- if((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ if ((write_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate tru the members */
- for(i = 0; i < nfields; i++) {
- unsigned j;
+ for (i = 0; i < nfields; i++) {
+ unsigned j;
/* Range check value */
- if(field_index[i] < 0)
+ if (field_index[i] < 0)
goto out;
j = (unsigned)field_index[i];
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid, j)))
+ if (NULL == (member_name = H5Tget_member_name(tid, j)))
goto out;
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid, j)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid, j)) < 0)
goto out;
/* convert to native type */
- if((nmtype_id = H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
+ if ((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- if(0 == (size_native = H5Tget_size(nmtype_id)))
+ if (0 == (size_native = H5Tget_size(nmtype_id)))
goto out;
- if(field_sizes[i] != size_native)
- if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
+ if (field_sizes[i] != size_native)
+ if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
/* the field in the file is found by its name */
- if(field_offset) {
- if(H5Tinsert(write_type_id, member_name, field_offset[i], nmtype_id) < 0)
+ if (field_offset) {
+ if (H5Tinsert(write_type_id, member_name, field_offset[i], nmtype_id) < 0)
goto out;
} /* end if */
/* only one field */
else {
- if(H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
+ if (H5Tinsert(write_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
} /* end else */
/* close */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
- if(H5Tclose(nmtype_id) < 0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
nmtype_id = H5I_BADID;
@@ -714,309 +676,295 @@ herr_t H5TBwrite_fields_index(hid_t loc_id,
} /* end for */
/* get the dataspace handles */
- if((file_space_id = H5Dget_space(did)) < 0)
+ if ((file_space_id = H5Dget_space(did)) < 0)
goto out;
- if((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, &nrecords, NULL)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(file_space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write */
- if(H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
+ if (H5Dwrite(did, write_type_id, m_sid, file_space_id, preserve_id, buf) < 0)
goto out;
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(preserve_id > 0)
- if(H5Pclose(preserve_id) < 0)
+ if (preserve_id > 0)
+ if (H5Pclose(preserve_id) < 0)
ret_val = -1;
- if(write_type_id > 0)
- if(H5Tclose(write_type_id) < 0)
+ if (write_type_id > 0)
+ if (H5Tclose(write_type_id) < 0)
ret_val = -1;
- if(member_type_id > 0)
- if(H5Tclose(member_type_id) < 0)
+ if (member_type_id > 0)
+ if (H5Tclose(member_type_id) < 0)
ret_val = -1;
- if(nmtype_id > 0)
- if(H5Tclose(nmtype_id) < 0)
+ if (nmtype_id > 0)
+ if (H5Tclose(nmtype_id) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(file_space_id > 0)
- if(H5Sclose(file_space_id) < 0)
+ if (file_space_id > 0)
+ if (H5Sclose(file_space_id) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBwrite_fields_index() */
-
/*-------------------------------------------------------------------------
-*
-* Read functions
-*
-*-------------------------------------------------------------------------
-*/
-
+ *
+ * Read functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBread_table
-*
-* Purpose: Reads a table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 20, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBread_table(hid_t loc_id,
- const char *dset_name,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- void *dst_buf)
+ * Function: H5TBread_table
+ *
+ * Purpose: Reads a table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 20, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBread_table(hid_t loc_id, const char *dset_name, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, void *dst_buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hsize_t dims[1];
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hsize_t dims[1];
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimensions */
- if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* get the datatypes */
- if((ftype_id = H5Dget_type (did)) < 0)
+ if ((ftype_id = H5Dget_type(did)) < 0)
goto out;
- if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) < 0)
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) <
+ 0)
goto out;
/* read */
- if(H5Dread(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, dst_buf) < 0)
+ if (H5Dread(did, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, dst_buf) < 0)
goto out;
ret_val = 0;
out:
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(ftype_id > 0)
- if(H5Tclose(ftype_id) < 0)
+ if (ftype_id > 0)
+ if (H5Tclose(ftype_id) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBread_table() */
/*-------------------------------------------------------------------------
-* Function: H5TBread_records
-*
-* Purpose: Reads records
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBread_records(hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- void *buf)
+ * Function: H5TBread_records
+ *
+ * Purpose: Reads records
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBread_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hsize_t nrecords_orig;
- hsize_t nfields;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hsize_t nrecords_orig;
+ hsize_t nfields;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords_orig) < 0)
goto out;
/* open the dataset */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatypes */
- if((ftype_id = H5Dget_type(did)) < 0)
+ if ((ftype_id = H5Dget_type(did)) < 0)
goto out;
- if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) < 0)
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, ftype_id)) <
+ 0)
goto out;
/* read the records */
- if((H5TB_common_read_records(did, mem_type_id, start, (size_t)nrecords, nrecords_orig, buf)) < 0)
+ if ((H5TB_common_read_records(did, mem_type_id, start, (size_t)nrecords, nrecords_orig, buf)) < 0)
goto out;
ret_val = 0;
out:
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(ftype_id > 0)
- if(H5Tclose(ftype_id) < 0)
+ if (ftype_id > 0)
+ if (H5Tclose(ftype_id) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBread_records() */
/*-------------------------------------------------------------------------
-* Function: H5TBread_fields_name
-*
-* Purpose: Reads fields
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBread_fields_name(hid_t loc_id,
- const char *dset_name,
- const char *field_names,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- void *buf)
+ * Function: H5TBread_fields_name
+ *
+ * Purpose: Reads fields
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBread_fields_name(hid_t loc_id, const char *dset_name, const char *field_names, hsize_t start,
+ hsize_t nrecords, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
+ hid_t did = H5I_BADID;
+ hid_t ftype_id = H5I_BADID;
hid_t mem_type_id = H5I_BADID;
- hid_t mtype_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t mtype_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
hssize_t nfields;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
size_t size_native;
- char *member_name = NULL;
+ char * member_name = NULL;
hssize_t i, j;
herr_t ret_val = -1;
-
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* open the dataset */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((ftype_id = H5Dget_type(did)) < 0)
+ if ((ftype_id = H5Dget_type(did)) < 0)
goto out;
/* get the number of fields */
- if((nfields = H5Tget_nmembers(ftype_id)) < 0)
+ if ((nfields = H5Tget_nmembers(ftype_id)) < 0)
goto out;
/* create a memory read id */
- if((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ if ((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate through the members */
- for(i = 0, j = 0; i < nfields; i++) {
+ for (i = 0, j = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(ftype_id, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(ftype_id, (unsigned)i)))
goto out;
- if(H5TB_find_field(member_name, field_names)) {
+ if (H5TB_find_field(member_name, field_names)) {
/* get the member type */
- if((mtype_id = H5Tget_member_type(ftype_id, (unsigned)i)) < 0)
+ if ((mtype_id = H5Tget_member_type(ftype_id, (unsigned)i)) < 0)
goto out;
/* convert to native type */
- if((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
+ if ((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- if(0 == (size_native = H5Tget_size(nmtype_id)))
+ if (0 == (size_native = H5Tget_size(nmtype_id)))
goto out;
- if(field_sizes[j] != size_native)
- if(H5Tset_size(nmtype_id, field_sizes[j]) < 0)
+ if (field_sizes[j] != size_native)
+ if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
/* the field in the file is found by its name */
- if(field_offset) {
- if(H5Tinsert(mem_type_id, member_name, field_offset[j], nmtype_id) < 0)
+ if (field_offset) {
+ if (H5Tinsert(mem_type_id, member_name, field_offset[j], nmtype_id) < 0)
goto out;
} /* end if */
else {
- if(H5Tinsert(mem_type_id, member_name, (size_t)0, nmtype_id) < 0)
+ if (H5Tinsert(mem_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
} /* end else */
/* close */
- if(H5Tclose(mtype_id) < 0)
+ if (H5Tclose(mtype_id) < 0)
goto out;
mtype_id = H5I_BADID;
- if(H5Tclose(nmtype_id) < 0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
nmtype_id = H5I_BADID;
j++;
@@ -1027,159 +975,153 @@ herr_t H5TBread_fields_name(hid_t loc_id,
} /* end for */
/* check to make sure field was found, no reason to continue if it does not exist */
- if(j == 0)
- goto out;
-
+ if (j == 0)
+ goto out;
+
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* read */
- if(H5Dread(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dread(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(mtype_id > 0)
- if(H5Tclose(mtype_id) < 0)
+ if (mtype_id > 0)
+ if (H5Tclose(mtype_id) < 0)
ret_val = -1;
- if(nmtype_id > 0)
- if(H5Tclose(nmtype_id) < 0)
+ if (nmtype_id > 0)
+ if (H5Tclose(nmtype_id) < 0)
ret_val = -1;
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(ftype_id > 0)
- if(H5Tclose(ftype_id) < 0)
+ if (ftype_id > 0)
+ if (H5Tclose(ftype_id) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBread_fields_name() */
/*-------------------------------------------------------------------------
-* Function: H5TBread_fields_index
-*
-* Purpose: Reads fields
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBread_fields_index(hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- const int *field_index,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- void *buf)
+ * Function: H5TBread_fields_index
+ *
+ * Purpose: Reads fields
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBread_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, const int *field_index,
+ hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t read_type_id = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t i;
- size_t size_native;
- char *member_name = NULL;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t read_type_id = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t i;
+ size_t size_native;
+ char * member_name = NULL;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* create a read id */
- if((read_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ if ((read_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
/* iterate tru the members */
- for(i = 0; i < nfields; i++) {
- unsigned j;
+ for (i = 0; i < nfields; i++) {
+ unsigned j;
/* Range check */
- if(field_index[i] < 0)
+ if (field_index[i] < 0)
goto out;
j = (unsigned)field_index[i];
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)j)))
+ if (NULL == (member_name = H5Tget_member_name(tid, (unsigned)j)))
goto out;
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid, (unsigned)j)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid, (unsigned)j)) < 0)
goto out;
/* convert to native type */
- if((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
+ if ((nmtype_id = H5Tget_native_type(member_type_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- if(0 == (size_native = H5Tget_size(nmtype_id)))
+ if (0 == (size_native = H5Tget_size(nmtype_id)))
goto out;
- if(field_sizes[i] != size_native)
- if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
+ if (field_sizes[i] != size_native)
+ if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
/* the field in the file is found by its name */
- if(field_offset) {
- if(H5Tinsert(read_type_id, member_name, field_offset[i], nmtype_id) < 0)
+ if (field_offset) {
+ if (H5Tinsert(read_type_id, member_name, field_offset[i], nmtype_id) < 0)
goto out;
} /* end if */
else {
- if(H5Tinsert(read_type_id, member_name, (size_t)0, nmtype_id) < 0)
+ if (H5Tinsert(read_type_id, member_name, (size_t)0, nmtype_id) < 0)
goto out;
} /* end else */
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
- if(H5Tclose(nmtype_id) < 0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
nmtype_id = H5I_BADID;
@@ -1188,683 +1130,671 @@ herr_t H5TBread_fields_index(hid_t loc_id,
} /* end for */
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* read */
- if(H5Dread( did, read_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dread(did, read_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(read_type_id > 0)
- if(H5Tclose(read_type_id) < 0)
+ if (read_type_id > 0)
+ if (H5Tclose(read_type_id) < 0)
ret_val = -1;
- if(member_type_id > 0)
- if(H5Tclose(member_type_id) < 0)
+ if (member_type_id > 0)
+ if (H5Tclose(member_type_id) < 0)
ret_val = -1;
- if(nmtype_id > 0)
- if(H5Tclose(nmtype_id) < 0)
+ if (nmtype_id > 0)
+ if (H5Tclose(nmtype_id) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBread_fields_index() */
-
/*-------------------------------------------------------------------------
-*
-* Manipulation functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Manipulation functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBdelete_record
-*
-* Purpose: Delete records from middle of table ("pulling up" all the records after it)
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 26, 2001
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBdelete_record(hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords)
+ * Function: H5TBdelete_record
+ *
+ * Purpose: Delete records from middle of table ("pulling up" all the records after it)
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 26, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hsize_t nfields;
- hsize_t ntotal_records;
- hsize_t read_start;
- hsize_t read_nrecords;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t dims[1];
- size_t src_size;
- size_t *src_offset = NULL;
- size_t *src_sizes = NULL;
- unsigned char *tmp_buf = NULL;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hsize_t nfields;
+ hsize_t ntotal_records;
+ hsize_t read_start;
+ hsize_t read_nrecords;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t dims[1];
+ size_t src_size;
+ size_t * src_offset = NULL;
+ size_t * src_sizes = NULL;
+ unsigned char *tmp_buf = NULL;
+ herr_t ret_val = -1;
-
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
- * first we get information about type size and offsets on disk
- *-------------------------------------------------------------------------
- */
+ * first we get information about type size and offsets on disk
+ *-------------------------------------------------------------------------
+ */
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
goto out;
- if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
- if(NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
- if(H5TBget_field_info(loc_id, dset_name, NULL, src_sizes, src_offset, &src_size) < 0)
+ if (H5TBget_field_info(loc_id, dset_name, NULL, src_sizes, src_offset, &src_size) < 0)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * read the records after the deleted one(s)
- *-------------------------------------------------------------------------
- */
+ * read the records after the deleted one(s)
+ *-------------------------------------------------------------------------
+ */
- read_start = start + nrecords;
+ read_start = start + nrecords;
read_nrecords = ntotal_records - read_start;
- if(read_nrecords) {
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, src_size)))
+ if (read_nrecords) {
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, src_size)))
goto out;
/* read the records after the deleted one(s) */
- if(H5TBread_records(loc_id, dset_name, read_start, read_nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
+ if (H5TBread_records(loc_id, dset_name, read_start, read_nrecords, src_size, src_offset, src_sizes,
+ tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * write the records in another position
- *-------------------------------------------------------------------------
- */
+ * write the records in another position
+ *-------------------------------------------------------------------------
+ */
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
- /* create the memory data type. */
- if((mem_type_id = H5TB_create_type( loc_id, dset_name, src_size, src_offset, src_sizes, tid)) < 0)
- goto out;
+ /* create the memory data type. */
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, src_size, src_offset, src_sizes, tid)) < 0)
+ goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = read_nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/* close */
- if(H5Sclose(m_sid) < 0)
+ if (H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_BADID;
- if(H5Tclose(mem_type_id) < 0)
- goto out;
+ if (H5Tclose(mem_type_id) < 0)
+ goto out;
mem_type_id = H5I_BADID;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
tid = H5I_BADID;
} /* read_nrecords */
/*-------------------------------------------------------------------------
- * change the dataset dimension
- *-------------------------------------------------------------------------
- */
+ * change the dataset dimension
+ *-------------------------------------------------------------------------
+ */
dims[0] = ntotal_records - nrecords;
- if(H5Dset_extent(did, dims) < 0)
+ if (H5Dset_extent(did, dims) < 0)
goto out;
ret_val = 0;
out:
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(src_offset)
+ if (src_offset)
HDfree(src_offset);
- if(src_sizes)
+ if (src_sizes)
HDfree(src_sizes);
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBdelete_record() */
/*-------------------------------------------------------------------------
-* Function: H5TBinsert_record
-*
-* Purpose: Inserts records into middle of table ("pushing down" all the records after it)
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 26, 2001
-*
-* Comments: Uses memory offsets
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBinsert_record(hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- void *buf)
+ * Function: H5TBinsert_record
+ *
+ * Purpose: Inserts records into middle of table ("pushing down" all the records after it)
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 26, 2001
+ *
+ * Comments: Uses memory offsets
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hsize_t nfields;
- hsize_t ntotal_records;
- hsize_t read_nrecords;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t dims[1];
- hsize_t mem_dims[1];
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t mem_type_id = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hsize_t nfields;
+ hsize_t ntotal_records;
+ hsize_t read_nrecords;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t dims[1];
+ hsize_t mem_dims[1];
unsigned char *tmp_buf = NULL;
- herr_t ret_val = -1;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
- * read the records after the inserted one(s)
- *-------------------------------------------------------------------------
- */
+ * read the records after the inserted one(s)
+ *-------------------------------------------------------------------------
+ */
/* get the dimensions */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* create the memory data type. */
- if((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
+ if ((mem_type_id = H5TB_create_type(loc_id, dset_name, type_size, field_offset, field_sizes, tid)) < 0)
goto out;
read_nrecords = ntotal_records - start;
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t) read_nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, type_size)))
goto out;
/* read the records after the inserted one(s) */
- if(H5TBread_records(loc_id, dset_name, start, read_nrecords, type_size, field_offset, field_sizes, tmp_buf) < 0)
+ if (H5TBread_records(loc_id, dset_name, start, read_nrecords, type_size, field_offset, field_sizes,
+ tmp_buf) < 0)
goto out;
/* extend the dataset */
dims[0] = ntotal_records + nrecords;
- if(H5Dset_extent(did, dims) < 0)
+ if (H5Dset_extent(did, dims) < 0)
goto out;
/*-------------------------------------------------------------------------
- * write the inserted records
- *-------------------------------------------------------------------------
- */
+ * write the inserted records
+ *-------------------------------------------------------------------------
+ */
/* create a simple memory data space */
mem_dims[0] = nrecords;
- if((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
goto out;
/* get the file data space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset to write the new data */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
- if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
/* terminate access to the dataspace */
- if(H5Sclose(m_sid) < 0)
+ if (H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_BADID;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
/*-------------------------------------------------------------------------
- * write the "pushed down" records
- *-------------------------------------------------------------------------
- */
+ * write the "pushed down" records
+ *-------------------------------------------------------------------------
+ */
/* create a simple memory data space */
mem_dims[0] = read_nrecords;
- if((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
goto out;
/* get the file data space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* define a hyperslab in the dataset to write the new data */
offset[0] = start + nrecords;
count[0] = read_nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
- if(H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dwrite(did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
ret_val = 0;
out:
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(mem_type_id > 0)
- if(H5Tclose(mem_type_id) < 0)
+ if (mem_type_id > 0)
+ if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBinsert_record() */
/*-------------------------------------------------------------------------
-* Function: H5TBadd_records_from
-*
-* Purpose: Add records from first table to second table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: December 5, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBadd_records_from(hid_t loc_id,
- const char *dset_name1,
- hsize_t start1,
- hsize_t nrecords,
- const char *dset_name2,
- hsize_t start2)
+ * Function: H5TBadd_records_from
+ *
+ * Purpose: Add records from first table to second table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: December 5, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize_t nrecords,
+ const char *dset_name2, hsize_t start2)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t nfields;
- hsize_t ntotal_records;
- size_t type_size1;
- size_t src_size;
- size_t *src_offset = NULL;
- size_t *src_sizes = NULL;
- unsigned char *tmp_buf = NULL;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t nfields;
+ hsize_t ntotal_records;
+ size_t type_size1;
+ size_t src_size;
+ size_t * src_offset = NULL;
+ size_t * src_sizes = NULL;
+ unsigned char *tmp_buf = NULL;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
- goto out;
- if (dset_name2 == NULL)
- goto out;
+ if (dset_name1 == NULL)
+ goto out;
+ if (dset_name2 == NULL)
+ goto out;
/*-------------------------------------------------------------------------
- * first we get information about type size and offsets on disk
- *-------------------------------------------------------------------------
- */
+ * first we get information about type size and offsets on disk
+ *-------------------------------------------------------------------------
+ */
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name1, &nfields, &ntotal_records) < 0)
+ if (H5TBget_table_info(loc_id, dset_name1, &nfields, &ntotal_records) < 0)
goto out;
- if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
- if(NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
- if(H5TBget_field_info(loc_id, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0)
+ if (H5TBget_field_info(loc_id, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0)
goto out;
/*-------------------------------------------------------------------------
- * Get information about the first table and read it
- *-------------------------------------------------------------------------
- */
+ * Get information about the first table and read it
+ *-------------------------------------------------------------------------
+ */
/* open the 1st dataset. */
- if((did = H5Dopen2(loc_id, dset_name1, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name1, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get the size of the datatype */
- if(0 == (type_size1 = H5Tget_size(tid)))
+ if (0 == (type_size1 = H5Tget_size(tid)))
goto out;
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1)))
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start1;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dread(did, tid, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dread(did, tid, m_sid, sid, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * add to the second table
- *-------------------------------------------------------------------------
- */
- if(H5TBinsert_record(loc_id, dset_name2, start2, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
+ * add to the second table
+ *-------------------------------------------------------------------------
+ */
+ if (H5TBinsert_record(loc_id, dset_name2, start2, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
ret_val = 0;
out:
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(src_offset)
+ if (src_offset)
HDfree(src_offset);
- if(src_sizes)
+ if (src_sizes)
HDfree(src_sizes);
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBadd_records_from() */
/*-------------------------------------------------------------------------
-* Function: H5TBcombine_tables
-*
-* Purpose: Combine records from two tables into a third
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: December 10, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBcombine_tables(hid_t loc_id1,
- const char *dset_name1,
- hid_t loc_id2,
- const char *dset_name2,
- const char *dset_name3)
+ * Function: H5TBcombine_tables
+ *
+ * Purpose: Combine records from two tables into a third
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: December 10, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const char *dset_name2,
+ const char *dset_name3)
{
/* identifiers for the 1st dataset. */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
+ hid_t did_1 = H5I_BADID;
+ hid_t tid_1 = H5I_BADID;
+ hid_t sid_1 = H5I_BADID;
+ hid_t pid_1 = H5I_BADID;
/* identifiers for the 2nd dataset. */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
+ hid_t did_2 = H5I_BADID;
+ hid_t tid_2 = H5I_BADID;
+ hid_t sid_2 = H5I_BADID;
+ hid_t pid_2 = H5I_BADID;
/* identifiers for the 3rd dataset. */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t sid_3 = H5I_BADID;
- hid_t pid_3 = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t nfields;
- hsize_t nrecords;
- hsize_t dims[1];
- hsize_t maxdims[1] = {H5S_UNLIMITED};
- hsize_t i;
- size_t type_size;
- size_t member_offset;
- size_t src_size;
- size_t *src_offset = NULL;
- size_t *src_sizes = NULL;
- char attr_name[255];
- unsigned char *tmp_buf = NULL;
+ hid_t did_3 = H5I_BADID;
+ hid_t tid_3 = H5I_BADID;
+ hid_t sid_3 = H5I_BADID;
+ hid_t pid_3 = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t nfields;
+ hsize_t nrecords;
+ hsize_t dims[1];
+ hsize_t maxdims[1] = {H5S_UNLIMITED};
+ hsize_t i;
+ size_t type_size;
+ size_t member_offset;
+ size_t src_size;
+ size_t * src_offset = NULL;
+ size_t * src_sizes = NULL;
+ char attr_name[255];
+ unsigned char *tmp_buf = NULL;
unsigned char *tmp_fill_buf = NULL;
- htri_t has_fill;
- herr_t ret_val = -1;
+ htri_t has_fill;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
- goto out;
- if (dset_name2 == NULL)
- goto out;
- if (dset_name3 == NULL)
- goto out;
+ if (dset_name1 == NULL)
+ goto out;
+ if (dset_name2 == NULL)
+ goto out;
+ if (dset_name3 == NULL)
+ goto out;
/*-------------------------------------------------------------------------
- * first we get information about type size and offsets on disk
- *-------------------------------------------------------------------------
- */
+ * first we get information about type size and offsets on disk
+ *-------------------------------------------------------------------------
+ */
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
goto out;
- if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
- if(NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
- if(H5TBget_field_info(loc_id1, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0)
+ if (H5TBget_field_info(loc_id1, dset_name1, NULL, src_sizes, src_offset, &src_size) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get information about the first table
- *-------------------------------------------------------------------------
- */
+ * get information about the first table
+ *-------------------------------------------------------------------------
+ */
/* open the 1st dataset. */
- if((did_1 = H5Dopen2(loc_id1, dset_name1, H5P_DEFAULT)) < 0)
+ if ((did_1 = H5Dopen2(loc_id1, dset_name1, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid_1 = H5Dget_type(did_1)) < 0)
+ if ((tid_1 = H5Dget_type(did_1)) < 0)
goto out;
/* get the dataspace handle */
- if((sid_1 = H5Dget_space(did_1)) < 0)
+ if ((sid_1 = H5Dget_space(did_1)) < 0)
goto out;
/* get creation properties list */
- if((pid_1 = H5Dget_create_plist(did_1)) < 0)
+ if ((pid_1 = H5Dget_create_plist(did_1)) < 0)
goto out;
/* get the dimensions */
- if(H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
goto out;
/*-------------------------------------------------------------------------
- * make the merged table with no data originally
- *-------------------------------------------------------------------------
- */
+ * make the merged table with no data originally
+ *-------------------------------------------------------------------------
+ */
/* clone the property list */
- if((pid_3 = H5Pcopy(pid_1)) < 0)
+ if ((pid_3 = H5Pcopy(pid_1)) < 0)
goto out;
/* clone the type id */
- if((tid_3 = H5Tcopy(tid_1)) < 0)
+ if ((tid_3 = H5Tcopy(tid_1)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * here we do not clone the file space from the 1st dataset, because we want to create
- * an empty table. Instead we create a new dataspace with zero records and expandable.
- *-------------------------------------------------------------------------
- */
+ * here we do not clone the file space from the 1st dataset, because we want to create
+ * an empty table. Instead we create a new dataspace with zero records and expandable.
+ *-------------------------------------------------------------------------
+ */
dims[0] = 0;
/* create a simple data space with unlimited size */
- if((sid_3 = H5Screate_simple(1, dims, maxdims)) < 0)
+ if ((sid_3 = H5Screate_simple(1, dims, maxdims)) < 0)
goto out;
/* create the dataset */
- if((did_3 = H5Dcreate2(loc_id1, dset_name3, tid_3, sid_3, H5P_DEFAULT, pid_3, H5P_DEFAULT)) < 0)
+ if ((did_3 = H5Dcreate2(loc_id1, dset_name3, tid_3, sid_3, H5P_DEFAULT, pid_3, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the conforming table attributes
- *-------------------------------------------------------------------------
- */
- if(H5TB_attach_attributes("Merge table", loc_id1, dset_name3, nfields, tid_3) < 0)
+ * attach the conforming table attributes
+ *-------------------------------------------------------------------------
+ */
+ if (H5TB_attach_attributes("Merge table", loc_id1, dset_name3, nfields, tid_3) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get attributes
- *-------------------------------------------------------------------------
- */
- if(0 == (type_size = H5Tget_size(tid_3)))
+ * get attributes
+ *-------------------------------------------------------------------------
+ */
+ if (0 == (type_size = H5Tget_size(tid_3)))
goto out;
/* alloc fill value attribute buffer */
- if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size)))
goto out;
/* get the fill value attributes */
- if((has_fill = H5TBAget_fill(loc_id1, dset_name1, did_1, tmp_fill_buf)) < 0)
+ if ((has_fill = H5TBAget_fill(loc_id1, dset_name1, did_1, tmp_fill_buf)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the fill attributes from previous table
- *-------------------------------------------------------------------------
- */
- if(has_fill) {
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ * attach the fill attributes from previous table
+ *-------------------------------------------------------------------------
+ */
+ if (has_fill) {
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
goto out;
/* get the member offset */
@@ -1872,258 +1802,254 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
+ if (H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = H5I_BADID;
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end for */
/* close data space. */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
} /* end if */
/*-------------------------------------------------------------------------
- * read data from 1st table
- *-------------------------------------------------------------------------
- */
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ * read data from 1st table
+ *-------------------------------------------------------------------------
+ */
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = 0;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dread(did_1, tid_1, m_sid, sid_1, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dread(did_1, tid_1, m_sid, sid_1, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * save data from 1st table into new table
- *-------------------------------------------------------------------------
- */
+ * save data from 1st table into new table
+ *-------------------------------------------------------------------------
+ */
/* append the records to the new table */
- if(H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
+ if (H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * release temporary resources
- *-------------------------------------------------------------------------
- */
- if(H5Sclose(m_sid) < 0)
+ * release temporary resources
+ *-------------------------------------------------------------------------
+ */
+ if (H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_BADID;
HDfree(tmp_buf);
tmp_buf = NULL;
/*-------------------------------------------------------------------------
- * get information about the 2nd table
- *-------------------------------------------------------------------------
- */
+ * get information about the 2nd table
+ *-------------------------------------------------------------------------
+ */
/* open the dataset. */
- if((did_2 = H5Dopen2(loc_id2, dset_name2, H5P_DEFAULT)) < 0)
+ if ((did_2 = H5Dopen2(loc_id2, dset_name2, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid_2 = H5Dget_type(did_2)) < 0)
+ if ((tid_2 = H5Dget_type(did_2)) < 0)
goto out;
/* get the dataspace handle */
- if((sid_2 = H5Dget_space(did_2)) < 0)
+ if ((sid_2 = H5Dget_space(did_2)) < 0)
goto out;
/* get the property list handle */
- if((pid_2 = H5Dget_create_plist(did_2)) < 0)
+ if ((pid_2 = H5Dget_create_plist(did_2)) < 0)
goto out;
/* get the dimensions */
- if(H5TBget_table_info(loc_id2, dset_name2, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id2, dset_name2, &nfields, &nrecords) < 0)
goto out;
/*-------------------------------------------------------------------------
- * read data from 2nd table
- *-------------------------------------------------------------------------
- */
+ * read data from 2nd table
+ *-------------------------------------------------------------------------
+ */
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = 0;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid_2, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid_2, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dread(did_2, tid_2, m_sid, sid_2, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dread(did_2, tid_2, m_sid, sid_2, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * save data from 2nd table into new table
- *-------------------------------------------------------------------------
- */
+ * save data from 2nd table into new table
+ *-------------------------------------------------------------------------
+ */
/* append the records to the new table */
- if(H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
+ if (H5TBappend_records(loc_id1, dset_name3, nrecords, src_size, src_offset, src_sizes, tmp_buf) < 0)
goto out;
ret_val = 0;
out:
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(tmp_fill_buf)
+ if (tmp_fill_buf)
HDfree(tmp_fill_buf);
- if(src_offset)
+ if (src_offset)
HDfree(src_offset);
- if(src_sizes)
+ if (src_sizes)
HDfree(src_sizes);
- if(member_type_id > 0)
- if(H5Tclose(member_type_id) < 0)
+ if (member_type_id > 0)
+ if (H5Tclose(member_type_id) < 0)
ret_val = -1;
- if(attr_id > 0)
- if(H5Aclose(attr_id) < 0)
+ if (attr_id > 0)
+ if (H5Aclose(attr_id) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid_1 > 0)
- if(H5Sclose(sid_1) < 0)
+ if (sid_1 > 0)
+ if (H5Sclose(sid_1) < 0)
ret_val = -1;
- if(tid_1 > 0)
- if(H5Tclose(tid_1) < 0)
+ if (tid_1 > 0)
+ if (H5Tclose(tid_1) < 0)
ret_val = -1;
- if(pid_1 > 0)
- if(H5Pclose(pid_1) < 0)
+ if (pid_1 > 0)
+ if (H5Pclose(pid_1) < 0)
ret_val = -1;
- if(did_1 > 0)
- if(H5Dclose(did_1) < 0)
+ if (did_1 > 0)
+ if (H5Dclose(did_1) < 0)
ret_val = -1;
- if(sid_2 > 0)
- if(H5Sclose(sid_2) < 0)
+ if (sid_2 > 0)
+ if (H5Sclose(sid_2) < 0)
ret_val = -1;
- if(tid_2 > 0)
- if(H5Tclose(tid_2) < 0)
+ if (tid_2 > 0)
+ if (H5Tclose(tid_2) < 0)
ret_val = -1;
- if(pid_2 > 0)
- if(H5Pclose(pid_2) < 0)
+ if (pid_2 > 0)
+ if (H5Pclose(pid_2) < 0)
ret_val = -1;
- if(did_2 > 0)
- if(H5Dclose(did_2) < 0)
+ if (did_2 > 0)
+ if (H5Dclose(did_2) < 0)
ret_val = -1;
- if(sid_3 > 0)
- if(H5Sclose(sid_3) < 0)
+ if (sid_3 > 0)
+ if (H5Sclose(sid_3) < 0)
ret_val = -1;
- if(tid_3 > 0)
- if(H5Tclose(tid_3) < 0)
+ if (tid_3 > 0)
+ if (H5Tclose(tid_3) < 0)
ret_val = -1;
- if(pid_3 > 0)
- if(H5Pclose(pid_3) < 0)
+ if (pid_3 > 0)
+ if (H5Pclose(pid_3) < 0)
ret_val = -1;
- if(did_3 > 0)
- if(H5Dclose(did_3) < 0)
+ if (did_3 > 0)
+ if (H5Dclose(did_3) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBcombine_tables() */
/*-------------------------------------------------------------------------
-* Function: H5TBinsert_field
-*
-* Purpose: Inserts a field
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: January 30, 2002
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBinsert_field(hid_t loc_id,
- const char *dset_name,
- const char *field_name,
- hid_t field_type,
- hsize_t position,
- const void *fill_data,
- const void *buf)
+ * Function: H5TBinsert_field
+ *
+ * Purpose: Inserts a field
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: January 30, 2002
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hid_t field_type,
+ hsize_t position, const void *fill_data, const void *buf)
{
/* identifiers for the 1st, original dataset */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
- hid_t msid_1 = H5I_BADID;
+ hid_t did_1 = H5I_BADID;
+ hid_t tid_1 = H5I_BADID;
+ hid_t sid_1 = H5I_BADID;
+ hid_t pid_1 = H5I_BADID;
+ hid_t msid_1 = H5I_BADID;
/* identifiers for the 2nd, new dataset */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
- hid_t msid_2 = H5I_BADID;
+ hid_t did_2 = H5I_BADID;
+ hid_t tid_2 = H5I_BADID;
+ hid_t sid_2 = H5I_BADID;
+ hid_t pid_2 = H5I_BADID;
+ hid_t msid_2 = H5I_BADID;
/* identifiers for the 3rd, final dataset */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t sid_3 = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
- size_t member_size;
- size_t new_member_size = 0;
- size_t total_size;
- size_t curr_offset;
- hsize_t nfields;
- hsize_t nrecords;
- hsize_t dims_chunk[1];
- hsize_t dims[1];
- hsize_t maxdims[1] = { H5S_UNLIMITED };
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- hsize_t i;
- char table_title[255];
- char attr_name[255];
- char *member_name = NULL;
- unsigned char *tmp_buf = NULL;
+ hid_t did_3 = H5I_BADID;
+ hid_t tid_3 = H5I_BADID;
+ hid_t sid_3 = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
+ size_t member_size;
+ size_t new_member_size = 0;
+ size_t total_size;
+ size_t curr_offset;
+ hsize_t nfields;
+ hsize_t nrecords;
+ hsize_t dims_chunk[1];
+ hsize_t dims[1];
+ hsize_t maxdims[1] = {H5S_UNLIMITED};
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ hsize_t i;
+ char table_title[255];
+ char attr_name[255];
+ char * member_name = NULL;
+ unsigned char *tmp_buf = NULL;
unsigned char *tmp_fill_buf = NULL;
- hbool_t inserted;
- herr_t ret_val = -1;
+ hbool_t inserted;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2132,27 +2058,27 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* open the dataset. */
- if((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get creation properties list */
- if((pid_1 = H5Dget_create_plist(did_1)) < 0)
+ if ((pid_1 = H5Dget_create_plist(did_1)) < 0)
goto out;
/* get the datatype */
- if((tid_1 = H5Dget_type(did_1)) < 0)
+ if ((tid_1 = H5Dget_type(did_1)) < 0)
goto out;
/* get the size of the datatype */
- if(0 == (total_size = H5Tget_size(tid_1)))
+ if (0 == (total_size = H5Tget_size(tid_1)))
goto out;
/* get the dataspace handle */
- if((sid_1 = H5Dget_space(did_1)) < 0)
+ if ((sid_1 = H5Dget_space(did_1)) < 0)
goto out;
/* get dimension */
- if(H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2161,15 +2087,15 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* get the table title */
- if((H5TBAget_title(did_1, table_title)) < 0)
+ if ((H5TBAget_title(did_1, table_title)) < 0)
goto out;
/* alloc fill value attribute buffer */
- if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(total_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(total_size)))
goto out;
/* get the fill value attributes */
- if((H5TBAget_fill(loc_id, dset_name, did_1, tmp_fill_buf)) < 0)
+ if ((H5TBAget_fill(loc_id, dset_name, did_1, tmp_fill_buf)) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2178,31 +2104,31 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* get the new member size */
- if(0 == (member_size = H5Tget_size(field_type)))
+ if (0 == (member_size = H5Tget_size(field_type)))
goto out;
/* create the data type. */
- if((tid_2 = H5Tcreate(H5T_COMPOUND, (size_t)(total_size + member_size))) < 0)
+ if ((tid_2 = H5Tcreate(H5T_COMPOUND, (size_t)(total_size + member_size))) < 0)
goto out;
curr_offset = 0;
inserted = FALSE;
/* insert the old fields, counting with the new one */
- for(i = 0; i < nfields + 1; i++) {
- hsize_t idx;
+ for (i = 0; i < nfields + 1; i++) {
+ hsize_t idx;
idx = i;
- if(inserted)
+ if (inserted)
idx = i - 1;
- if(i == position) {
+ if (i == position) {
/* get the new member size */
- if(0 == (new_member_size = H5Tget_size(field_type)))
+ if (0 == (new_member_size = H5Tget_size(field_type)))
goto out;
/* insert the new field type */
- if(H5Tinsert(tid_2, field_name, curr_offset, field_type) < 0)
+ if (H5Tinsert(tid_2, field_name, curr_offset, field_type) < 0)
goto out;
curr_offset += new_member_size;
@@ -2211,19 +2137,19 @@ herr_t H5TBinsert_field(hid_t loc_id,
} /* end if */
else {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)idx)))
+ if (NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)idx)))
goto out;
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_1, (unsigned)idx)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)idx)) < 0)
goto out;
/* get the member size */
- if(0 == (member_size = H5Tget_size(member_type_id)))
+ if (0 == (member_size = H5Tget_size(member_type_id)))
goto out;
/* insert it into the new type */
- if(H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
+ if (H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
goto out;
curr_offset += member_size;
@@ -2232,11 +2158,11 @@ herr_t H5TBinsert_field(hid_t loc_id,
member_name = NULL;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end else */
- } /* end for */
+ } /* end for */
/*-------------------------------------------------------------------------
* create a new temporary dataset
@@ -2244,21 +2170,21 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* retrieve the size of chunk */
- if(H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
+ if (H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
goto out;
/* create a new simple data space with unlimited size, using the dimension */
- if((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
+ if ((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
goto out;
/* modify dataset creation properties, i.e. enable chunking */
- if((pid_2 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((pid_2 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if(H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
+ if (H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
goto out;
/* create the dataset. */
- if((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
+ if ((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2266,21 +2192,21 @@ herr_t H5TBinsert_field(hid_t loc_id,
*-------------------------------------------------------------------------
*/
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size)))
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = 0;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid_1, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((msid_1 = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((msid_1 = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if(H5Dread(did_1, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dread(did_1, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2289,7 +2215,7 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* write */
- if(H5Dwrite(did_2, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dwrite(did_2, tid_1, msid_1, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2298,27 +2224,27 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* create a write id */
- if((write_type_id = H5Tcreate(H5T_COMPOUND, (size_t)new_member_size)) < 0)
+ if ((write_type_id = H5Tcreate(H5T_COMPOUND, (size_t)new_member_size)) < 0)
goto out;
/* the field in the file is found by its name */
- if(H5Tinsert(write_type_id, field_name, (size_t)0, field_type) < 0)
+ if (H5Tinsert(write_type_id, field_name, (size_t)0, field_type) < 0)
goto out;
/* create xfer properties to preserve initialized data */
- if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto out;
- if(H5Pset_preserve(preserve_id, 1) < 0)
+ if (H5Pset_preserve(preserve_id, 1) < 0)
goto out;
/* only write if there is something to write */
- if(buf) {
+ if (buf) {
/* create a memory dataspace handle */
- if((msid_2 = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((msid_2 = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
/* write */
- if(H5Dwrite(did_2, write_type_id, msid_2, sid_2, preserve_id, buf) < 0)
+ if (H5Dwrite(did_2, write_type_id, msid_2, sid_2, preserve_id, buf) < 0)
goto out;
} /* end if */
@@ -2326,14 +2252,14 @@ herr_t H5TBinsert_field(hid_t loc_id,
* delete 1st table
*-------------------------------------------------------------------------
*/
- if(H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
+ if (H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
goto out;
/*-------------------------------------------------------------------------
* rename 2nd table
*-------------------------------------------------------------------------
*/
- if(H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2342,33 +2268,33 @@ herr_t H5TBinsert_field(hid_t loc_id,
*/
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
/* open the dataset. */
- if((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid_3 = H5Dget_type(did_3)) < 0)
+ if ((tid_3 = H5Dget_type(did_3)) < 0)
goto out;
/* set the attributes */
- if(H5TB_attach_attributes(table_title, loc_id, dset_name, (hsize_t)nfields, tid_3) < 0)
+ if (H5TB_attach_attributes(table_title, loc_id, dset_name, (hsize_t)nfields, tid_3) < 0)
goto out;
/*-------------------------------------------------------------------------
* attach the fill attributes from previous table
*-------------------------------------------------------------------------
*/
- if((sid_3 = H5Screate(H5S_SCALAR)) < 0)
+ if ((sid_3 = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for(i = 0; i < (nfields - 1); i++) {
- size_t member_offset;
+ for (i = 0; i < (nfields - 1); i++) {
+ size_t member_offset;
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
goto out;
/* get the member offset */
@@ -2376,18 +2302,18 @@ herr_t H5TBinsert_field(hid_t loc_id,
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
+ if (H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = H5I_BADID;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end for */
@@ -2396,24 +2322,24 @@ herr_t H5TBinsert_field(hid_t loc_id,
* attach the fill attribute from the new field, if present
*-------------------------------------------------------------------------
*/
- if(fill_data) {
+ if (fill_data) {
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)(nfields - 1));
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_3, (unsigned)nfields - 1)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_3, (unsigned)nfields - 1)) < 0)
goto out;
- if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_3, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, member_type_id, fill_data) < 0)
+ if (H5Awrite(attr_id, member_type_id, fill_data) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = H5I_BADID;
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end fill_data */
@@ -2421,178 +2347,176 @@ herr_t H5TBinsert_field(hid_t loc_id,
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(tmp_fill_buf)
+ if (tmp_fill_buf)
HDfree(tmp_fill_buf);
- if(preserve_id > 0)
- if(H5Pclose(preserve_id) < 0)
+ if (preserve_id > 0)
+ if (H5Pclose(preserve_id) < 0)
ret_val = -1;
- if(msid_1 > 0)
- if(H5Sclose(msid_1) < 0)
+ if (msid_1 > 0)
+ if (H5Sclose(msid_1) < 0)
ret_val = -1;
- if(tid_1 > 0)
- if(H5Tclose(tid_1) < 0)
+ if (tid_1 > 0)
+ if (H5Tclose(tid_1) < 0)
ret_val = -1;
- if(pid_1 > 0)
- if(H5Pclose(pid_1) < 0)
+ if (pid_1 > 0)
+ if (H5Pclose(pid_1) < 0)
ret_val = -1;
- if(sid_1 > 0)
- if(H5Sclose(sid_1) < 0)
+ if (sid_1 > 0)
+ if (H5Sclose(sid_1) < 0)
ret_val = -1;
- if(did_1 > 0)
- if(H5Dclose(did_1) < 0)
+ if (did_1 > 0)
+ if (H5Dclose(did_1) < 0)
ret_val = -1;
- if(msid_2 > 0)
- if(H5Sclose(msid_2) < 0)
+ if (msid_2 > 0)
+ if (H5Sclose(msid_2) < 0)
ret_val = -1;
- if(sid_2 > 0)
- if(H5Sclose(sid_2) < 0)
+ if (sid_2 > 0)
+ if (H5Sclose(sid_2) < 0)
ret_val = -1;
- if(tid_2 > 0)
- if(H5Tclose(tid_2) < 0)
+ if (tid_2 > 0)
+ if (H5Tclose(tid_2) < 0)
ret_val = -1;
- if(pid_2 > 0)
- if(H5Pclose(pid_2) < 0)
+ if (pid_2 > 0)
+ if (H5Pclose(pid_2) < 0)
ret_val = -1;
- if(did_2 > 0)
- if(H5Dclose(did_2) < 0)
+ if (did_2 > 0)
+ if (H5Dclose(did_2) < 0)
ret_val = -1;
- if(sid_3 > 0)
- if(H5Sclose(sid_3) < 0)
+ if (sid_3 > 0)
+ if (H5Sclose(sid_3) < 0)
ret_val = -1;
- if(tid_3 > 0)
- if(H5Tclose(tid_3) < 0)
+ if (tid_3 > 0)
+ if (H5Tclose(tid_3) < 0)
ret_val = -1;
- if(did_3 > 0)
- if(H5Dclose(did_3) < 0)
+ if (did_3 > 0)
+ if (H5Dclose(did_3) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBinsert_field() */
/*-------------------------------------------------------------------------
-* Function: H5TBdelete_field
-*
-* Purpose: Deletes a field
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: January 30, 2002
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBdelete_field(hid_t loc_id,
- const char *dset_name,
- const char *field_name)
+ * Function: H5TBdelete_field
+ *
+ * Purpose: Deletes a field
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: January 30, 2002
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
{
/* identifiers for the 1st original dataset */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
+ hid_t did_1 = H5I_BADID;
+ hid_t tid_1 = H5I_BADID;
+ hid_t sid_1 = H5I_BADID;
+ hid_t pid_1 = H5I_BADID;
/* identifiers for the 2nd new dataset */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
+ hid_t did_2 = H5I_BADID;
+ hid_t tid_2 = H5I_BADID;
+ hid_t sid_2 = H5I_BADID;
+ hid_t pid_2 = H5I_BADID;
/* identifiers for the 3rd final dataset */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
- hid_t read_type_id = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
- size_t member_size;
- size_t type_size1;
- size_t type_size2;
- size_t curr_offset;
- size_t delete_member_size = 0;
- size_t member_offset;
- hsize_t nfields;
- hsize_t nrecords;
- hsize_t dims_chunk[1];
- hsize_t dims[1];
- hsize_t maxdims[1] = { H5S_UNLIMITED };
- hsize_t i;
- char attr_name[255];
- char table_title[255];
- char *member_name = NULL;
- unsigned char *tmp_buf = NULL;
+ hid_t did_3 = H5I_BADID;
+ hid_t tid_3 = H5I_BADID;
+ hid_t member_type_id = H5I_BADID;
+ hid_t preserve_id = H5I_BADID;
+ hid_t read_type_id = H5I_BADID;
+ hid_t write_type_id = H5I_BADID;
+ hid_t attr_id = H5I_BADID;
+ size_t member_size;
+ size_t type_size1;
+ size_t type_size2;
+ size_t curr_offset;
+ size_t delete_member_size = 0;
+ size_t member_offset;
+ hsize_t nfields;
+ hsize_t nrecords;
+ hsize_t dims_chunk[1];
+ hsize_t dims[1];
+ hsize_t maxdims[1] = {H5S_UNLIMITED};
+ hsize_t i;
+ char attr_name[255];
+ char table_title[255];
+ char * member_name = NULL;
+ unsigned char *tmp_buf = NULL;
unsigned char *tmp_fill_buf = NULL;
- htri_t has_fill = FALSE;
- herr_t ret_val = -1;
-
+ htri_t has_fill = FALSE;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get information about the old data type
- *-------------------------------------------------------------------------
- */
+ * get information about the old data type
+ *-------------------------------------------------------------------------
+ */
/* open the dataset. */
- if((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did_1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get creation properties list */
- if((pid_1 = H5Dget_create_plist(did_1)) < 0)
+ if ((pid_1 = H5Dget_create_plist(did_1)) < 0)
goto out;
/* get the datatype */
- if((tid_1 = H5Dget_type(did_1)) < 0)
+ if ((tid_1 = H5Dget_type(did_1)) < 0)
goto out;
/* get the size of the datatype */
- if(0 == (type_size1 = H5Tget_size(tid_1)))
+ if (0 == (type_size1 = H5Tget_size(tid_1)))
goto out;
/* get the dataspace handle */
- if((sid_1 = H5Dget_space(did_1)) < 0)
+ if ((sid_1 = H5Dget_space(did_1)) < 0)
goto out;
/* get dimension */
- if(H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid_1, dims, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a new data type; first we find the size of the datatype to delete
- *-------------------------------------------------------------------------
- */
+ * create a new data type; first we find the size of the datatype to delete
+ *-------------------------------------------------------------------------
+ */
/* check out the field */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
goto out;
/* we want to find the field to delete */
- if(H5TB_find_field(member_name, field_name)) {
+ if (H5TB_find_field(member_name, field_name)) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
goto out;
/* get the member size */
- if(0 == (delete_member_size = H5Tget_size(member_type_id)))
+ if (0 == (delete_member_size = H5Tget_size(member_type_id)))
goto out;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
@@ -2607,75 +2531,75 @@ herr_t H5TBdelete_field(hid_t loc_id,
} /* end for */
/* no field to delete was found */
- if(delete_member_size == 0)
+ if (delete_member_size == 0)
goto out;
/*-------------------------------------------------------------------------
- * create a new data type; we now insert all the fields into the new type
- *-------------------------------------------------------------------------
- */
+ * create a new data type; we now insert all the fields into the new type
+ *-------------------------------------------------------------------------
+ */
type_size2 = type_size1 - delete_member_size;
/* create the data type. */
- if((tid_2 = H5Tcreate (H5T_COMPOUND, type_size2)) < 0)
+ if ((tid_2 = H5Tcreate(H5T_COMPOUND, type_size2)) < 0)
goto out;
curr_offset = 0;
/* alloc fill value attribute buffer */
- if(NULL == (tmp_fill_buf = (unsigned char *)HDmalloc((size_t)type_size2)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc((size_t)type_size2)))
goto out;
/*-------------------------------------------------------------------------
- * get attributes from previous table in the process
- *-------------------------------------------------------------------------
- */
+ * get attributes from previous table in the process
+ *-------------------------------------------------------------------------
+ */
/* get the table title */
- if((H5TBAget_title(did_1, table_title)) < 0)
+ if ((H5TBAget_title(did_1, table_title)) < 0)
goto out;
/* insert the old fields except the one to delete */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
goto out;
/* we want to skip the field to delete */
- if(!H5TB_find_field(member_name, field_name)) {
+ if (!H5TB_find_field(member_name, field_name)) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
goto out;
/* get the member size */
- if(0 == (member_size = H5Tget_size(member_type_id)))
+ if (0 == (member_size = H5Tget_size(member_type_id)))
goto out;
/* insert it into the new type */
- if(H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
+ if (H5Tinsert(tid_2, member_name, curr_offset, member_type_id) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get the fill value information
- *-------------------------------------------------------------------------
- */
+ * get the fill value information
+ *-------------------------------------------------------------------------
+ */
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
/* check if we have the _FILL attribute */
- if((has_fill = H5LT_find_attribute(did_1, attr_name)) < 0)
+ if ((has_fill = H5LT_find_attribute(did_1, attr_name)) < 0)
goto out;
/* get it */
- if(has_fill)
- if(H5LT_get_attribute_disk(did_1, attr_name, tmp_fill_buf + curr_offset) < 0)
+ if (has_fill)
+ if (H5LT_get_attribute_disk(did_1, attr_name, tmp_fill_buf + curr_offset) < 0)
goto out;
curr_offset += member_size;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end if */
@@ -2685,96 +2609,96 @@ herr_t H5TBdelete_field(hid_t loc_id,
} /* end for */
/*-------------------------------------------------------------------------
- * create a new temporary dataset
- *-------------------------------------------------------------------------
- */
+ * create a new temporary dataset
+ *-------------------------------------------------------------------------
+ */
/* retrieve the size of chunk */
- if(H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
+ if (H5Pget_chunk(pid_1, 1, dims_chunk) < 0)
goto out;
/* create a new simple data space with unlimited size, using the dimension */
- if((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
+ if ((sid_2 = H5Screate_simple(1, dims, maxdims)) < 0)
goto out;
/* modify dataset creation properties, i.e. enable chunking */
pid_2 = H5Pcreate(H5P_DATASET_CREATE);
- if(H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
+ if (H5Pset_chunk(pid_2, 1, dims_chunk) < 0)
goto out;
/* create the dataset. */
- if((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
+ if ((did_2 = H5Dcreate2(loc_id, "new", tid_2, sid_2, H5P_DEFAULT, pid_2, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * we have to read field by field of the old dataset and save it into the new one
- *-------------------------------------------------------------------------
- */
- for(i = 0; i < nfields; i++) {
+ * we have to read field by field of the old dataset and save it into the new one
+ *-------------------------------------------------------------------------
+ */
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid_1, (unsigned)i)))
goto out;
/* skip the field to delete */
- if(!H5TB_find_field(member_name, field_name)) {
+ if (!H5TB_find_field(member_name, field_name)) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_1, (unsigned)i)) < 0)
goto out;
/* get the member size */
- if(0 == (member_size = H5Tget_size(member_type_id)))
+ if (0 == (member_size = H5Tget_size(member_type_id)))
goto out;
/* create a read id */
- if((read_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
+ if ((read_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
goto out;
/* insert it into the new type */
- if(H5Tinsert(read_type_id, member_name, (size_t)0, member_type_id) < 0)
+ if (H5Tinsert(read_type_id, member_name, (size_t)0, member_type_id) < 0)
goto out;
- if(NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, member_size)))
+ if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, member_size)))
goto out;
/* read */
- if(H5Dread(did_1, read_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
+ if (H5Dread(did_1, read_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp_buf) < 0)
goto out;
/* create a write id */
- if((write_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
+ if ((write_type_id = H5Tcreate(H5T_COMPOUND, member_size)) < 0)
goto out;
/* the field in the file is found by its name */
- if(H5Tinsert(write_type_id, member_name, (size_t)0, member_type_id) < 0)
+ if (H5Tinsert(write_type_id, member_name, (size_t)0, member_type_id) < 0)
goto out;
/* create xfer properties to preserve initialized data */
- if((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((preserve_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto out;
- if(H5Pset_preserve(preserve_id, 1) < 0)
+ if (H5Pset_preserve(preserve_id, 1) < 0)
goto out;
/* write */
- if(H5Dwrite(did_2, write_type_id, H5S_ALL, H5S_ALL, preserve_id, tmp_buf) < 0)
+ if (H5Dwrite(did_2, write_type_id, H5S_ALL, H5S_ALL, preserve_id, tmp_buf) < 0)
goto out;
/* end access to the property list */
- if(H5Pclose(preserve_id) < 0)
+ if (H5Pclose(preserve_id) < 0)
goto out;
preserve_id = H5I_BADID;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
/* close the read type */
- if(H5Tclose(read_type_id) < 0)
+ if (H5Tclose(read_type_id) < 0)
goto out;
read_type_id = H5I_BADID;
/* close the write type */
- if(H5Tclose(write_type_id) < 0)
+ if (H5Tclose(write_type_id) < 0)
goto out;
write_type_id = H5I_BADID;
@@ -2788,51 +2712,51 @@ herr_t H5TBdelete_field(hid_t loc_id,
} /* end for */
/*-------------------------------------------------------------------------
- * delete 1st table
- *-------------------------------------------------------------------------
- */
- if(H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
+ * delete 1st table
+ *-------------------------------------------------------------------------
+ */
+ if (H5Ldelete(loc_id, dset_name, H5P_DEFAULT) < 0)
goto out;
/*-------------------------------------------------------------------------
- * rename 2nd table
- *-------------------------------------------------------------------------
- */
- if(H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ * rename 2nd table
+ *-------------------------------------------------------------------------
+ */
+ if (H5Lmove(loc_id, "new", H5L_SAME_LOC, dset_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the conforming table attributes
- *-------------------------------------------------------------------------
- */
+ * attach the conforming table attributes
+ *-------------------------------------------------------------------------
+ */
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
/* open the dataset. */
- if((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did_3 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid_3 = H5Dget_type(did_3)) < 0)
+ if ((tid_3 = H5Dget_type(did_3)) < 0)
goto out;
/* set the attributes */
- if(H5TB_attach_attributes(table_title, loc_id, dset_name, nfields, tid_3) < 0)
+ if (H5TB_attach_attributes(table_title, loc_id, dset_name, nfields, tid_3) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the fill attributes from previous table
- *-------------------------------------------------------------------------
- */
- if(has_fill) {
- if((sid_1 = H5Screate(H5S_SCALAR)) < 0)
+ * attach the fill attributes from previous table
+ *-------------------------------------------------------------------------
+ */
+ if (has_fill) {
+ if ((sid_1 = H5Screate(H5S_SCALAR)) < 0)
goto out;
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member type */
- if((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
+ if ((member_type_id = H5Tget_member_type(tid_3, (unsigned)i)) < 0)
goto out;
/* get the member offset */
@@ -2840,24 +2764,24 @@ herr_t H5TBdelete_field(hid_t loc_id,
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
- if((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id = H5Acreate2(did_3, attr_name, member_type_id, sid_1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
+ if (H5Awrite(attr_id, member_type_id, tmp_fill_buf + member_offset) < 0)
goto out;
- if(H5Aclose(attr_id) < 0)
+ if (H5Aclose(attr_id) < 0)
goto out;
attr_id = H5I_BADID;
/* close the member type */
- if(H5Tclose(member_type_id) < 0)
+ if (H5Tclose(member_type_id) < 0)
goto out;
member_type_id = H5I_BADID;
} /* end for */
/* close data space. */
- if(H5Sclose(sid_1) < 0)
+ if (H5Sclose(sid_1) < 0)
goto out;
sid_1 = H5I_BADID;
} /* end if */
@@ -2865,232 +2789,227 @@ herr_t H5TBdelete_field(hid_t loc_id,
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
- if(tmp_fill_buf)
+ if (tmp_fill_buf)
HDfree(tmp_fill_buf);
- if(tmp_buf)
+ if (tmp_buf)
HDfree(tmp_buf);
- if(attr_id > 0)
- if(H5Aclose(attr_id) < 0)
+ if (attr_id > 0)
+ if (H5Aclose(attr_id) < 0)
ret_val = -1;
- if(preserve_id > 0)
- if(H5Pclose(preserve_id) < 0)
+ if (preserve_id > 0)
+ if (H5Pclose(preserve_id) < 0)
ret_val = -1;
- if(member_type_id > 0)
- if(H5Tclose(member_type_id) < 0)
+ if (member_type_id > 0)
+ if (H5Tclose(member_type_id) < 0)
ret_val = -1;
- if(read_type_id > 0)
- if(H5Tclose(read_type_id) < 0)
+ if (read_type_id > 0)
+ if (H5Tclose(read_type_id) < 0)
ret_val = -1;
- if(write_type_id > 0)
- if(H5Tclose(write_type_id) < 0)
+ if (write_type_id > 0)
+ if (H5Tclose(write_type_id) < 0)
ret_val = -1;
- if(tid_1 > 0)
- if(H5Tclose(tid_1) < 0)
+ if (tid_1 > 0)
+ if (H5Tclose(tid_1) < 0)
ret_val = -1;
- if(pid_1 > 0)
- if(H5Pclose(pid_1) < 0)
+ if (pid_1 > 0)
+ if (H5Pclose(pid_1) < 0)
ret_val = -1;
- if(sid_1 > 0)
- if(H5Sclose(sid_1) < 0)
+ if (sid_1 > 0)
+ if (H5Sclose(sid_1) < 0)
ret_val = -1;
- if(did_1 > 0)
- if(H5Dclose(did_1) < 0)
+ if (did_1 > 0)
+ if (H5Dclose(did_1) < 0)
ret_val = -1;
- if(sid_2 > 0)
- if(H5Sclose(sid_2) < 0)
+ if (sid_2 > 0)
+ if (H5Sclose(sid_2) < 0)
ret_val = -1;
- if(tid_2 > 0)
- if(H5Tclose(tid_2) < 0)
+ if (tid_2 > 0)
+ if (H5Tclose(tid_2) < 0)
ret_val = -1;
- if(pid_2 > 0)
- if(H5Pclose(pid_2) < 0)
+ if (pid_2 > 0)
+ if (H5Pclose(pid_2) < 0)
ret_val = -1;
- if(did_2 > 0)
- if(H5Dclose(did_2) < 0)
+ if (did_2 > 0)
+ if (H5Dclose(did_2) < 0)
ret_val = -1;
- if(tid_3 > 0)
- if(H5Tclose(tid_3) < 0)
+ if (tid_3 > 0)
+ if (H5Tclose(tid_3) < 0)
ret_val = -1;
- if(did_3 > 0)
- if(H5Dclose(did_3) < 0)
+ if (did_3 > 0)
+ if (H5Dclose(did_3) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBdelete_field() */
/*-------------------------------------------------------------------------
-*
-* Table attribute functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Table attribute functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBAget_title
-*
-* Purpose: Read the table title
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: January 30, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBAget_title(hid_t loc_id,
- char *table_title)
+ * Function: H5TBAget_title
+ *
+ * Purpose: Read the table title
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: January 30, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBAget_title(hid_t loc_id, char *table_title)
{
/* Get the TITLE attribute */
- if(H5LT_get_attribute_disk(loc_id, "TITLE", table_title) < 0)
+ if (H5LT_get_attribute_disk(loc_id, "TITLE", table_title) < 0)
return -1;
return 0;
}
/*-------------------------------------------------------------------------
-* Function: H5TBAget_fill
-*
-* Purpose: Read the table attribute fill values
-*
-* Return: Success: TRUE/FALSE, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: January 30, 2002
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-htri_t H5TBAget_fill(hid_t loc_id,
- const char *dset_name,
- hid_t dset_id,
- unsigned char *dst_buf)
+ * Function: H5TBAget_fill
+ *
+ * Purpose: Read the table attribute fill values
+ *
+ * Return: Success: TRUE/FALSE, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: January 30, 2002
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char *dst_buf)
{
- hsize_t nfields;
- hsize_t nrecords;
- hsize_t i;
- size_t *src_offset = NULL;
- char attr_name[255];
- htri_t has_fill = FALSE;
- htri_t ret_val = -1;
+ hsize_t nfields;
+ hsize_t nrecords;
+ hsize_t i;
+ size_t *src_offset = NULL;
+ char attr_name[255];
+ htri_t has_fill = FALSE;
+ htri_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
- if(NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
- if(H5TBget_field_info(loc_id, dset_name, NULL, NULL, src_offset, NULL) < 0)
+ if (H5TBget_field_info(loc_id, dset_name, NULL, NULL, src_offset, NULL) < 0)
goto out;
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_FILL", (int)i);
/* check if we have the _FILL attribute */
- if((has_fill = H5LT_find_attribute(dset_id, attr_name)) < 0)
+ if ((has_fill = H5LT_find_attribute(dset_id, attr_name)) < 0)
goto out;
/* get it */
- if(has_fill)
- if(H5LT_get_attribute_disk(dset_id, attr_name, dst_buf + src_offset[i]) < 0)
+ if (has_fill)
+ if (H5LT_get_attribute_disk(dset_id, attr_name, dst_buf + src_offset[i]) < 0)
goto out;
} /* end for */
ret_val = has_fill;
out:
- if(src_offset)
+ if (src_offset)
HDfree(src_offset);
-
+
return ret_val;
} /* end H5TBAget_fill() */
-
/*-------------------------------------------------------------------------
-*
-* Inquiry functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Inquiry functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TBget_table_info
-*
-* Purpose: Gets the number of records and fields of a table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBget_table_info(hid_t loc_id,
- const char *dset_name,
- hsize_t *nfields,
- hsize_t *nrecords)
+ * Function: H5TBget_table_info
+ *
+ * Purpose: Gets the number of records and fields of a table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBget_table_info(hid_t loc_id, const char *dset_name, hsize_t *nfields, hsize_t *nrecords)
{
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t did = H5I_BADID;
- hsize_t dims[1];
- int num_members;
- herr_t ret_val = -1;
+ hid_t tid = H5I_BADID;
+ hid_t sid = H5I_BADID;
+ hid_t did = H5I_BADID;
+ hsize_t dims[1];
+ int num_members;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
/* get the number of members */
- if((num_members = H5Tget_nmembers(tid)) < 0)
+ if ((num_members = H5Tget_nmembers(tid)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get number of nfields
- *-------------------------------------------------------------------------
- */
- if(nfields)
+ * get number of nfields
+ *-------------------------------------------------------------------------
+ */
+ if (nfields)
*nfields = (hsize_t)num_members;
/*-------------------------------------------------------------------------
- * get number of records
- *-------------------------------------------------------------------------
- */
- if(nrecords) {
+ * get number of records
+ *-------------------------------------------------------------------------
+ */
+ if (nrecords) {
/* get the dataspace handle */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimension */
- if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* terminate access to the dataspace */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
sid = H5I_BADID;
@@ -3100,106 +3019,103 @@ herr_t H5TBget_table_info(hid_t loc_id,
ret_val = 0;
out:
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBget_table_info() */
/*-------------------------------------------------------------------------
-* Function: H5TBget_field_info
-*
-* Purpose: Get information about fields
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TBget_field_info(hid_t loc_id,
- const char *dset_name,
- char *field_names[],
- size_t *field_sizes,
- size_t *field_offsets,
- size_t *type_size)
+ * Function: H5TBget_field_info
+ *
+ * Purpose: Get information about fields
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TBget_field_info(hid_t loc_id, const char *dset_name, char *field_names[], size_t *field_sizes,
+ size_t *field_offsets, size_t *type_size)
{
- hid_t did = H5I_BADID; /* dataset ID */
- hid_t tid = H5I_BADID; /* file type ID */
- hid_t n_tid = H5I_BADID; /* native type ID */
- hid_t m_tid = H5I_BADID; /* member type ID */
- hid_t nm_tid = H5I_BADID; /* native member ID */
- hssize_t nfields;
- hssize_t i;
- herr_t ret_val = -1;
+ hid_t did = H5I_BADID; /* dataset ID */
+ hid_t tid = H5I_BADID; /* file type ID */
+ hid_t n_tid = H5I_BADID; /* native type ID */
+ hid_t m_tid = H5I_BADID; /* member type ID */
+ hid_t nm_tid = H5I_BADID; /* native member ID */
+ hssize_t nfields;
+ hssize_t i;
+ herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
- if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
- if((tid = H5Dget_type(did)) < 0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
- if((n_tid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0)
+ if ((n_tid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0)
goto out;
/* get the type size */
- if(type_size)
- if(0 == (*type_size = H5Tget_size(n_tid)))
+ if (type_size)
+ if (0 == (*type_size = H5Tget_size(n_tid)))
goto out;
/* get the number of members */
- if((nfields = H5Tget_nmembers(tid)) < 0)
+ if ((nfields = H5Tget_nmembers(tid)) < 0)
goto out;
/* iterate tru the members */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(field_names) {
- char *member_name;
+ if (field_names) {
+ char *member_name;
- if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
goto out;
strcpy(field_names[i], member_name);
H5free_memory(member_name);
} /* end if */
/* get the member type */
- if((m_tid = H5Tget_member_type(tid, (unsigned)i)) < 0)
+ if ((m_tid = H5Tget_member_type(tid, (unsigned)i)) < 0)
goto out;
- if((nm_tid = H5Tget_native_type(m_tid, H5T_DIR_DEFAULT)) < 0)
+ if ((nm_tid = H5Tget_native_type(m_tid, H5T_DIR_DEFAULT)) < 0)
goto out;
/* get the member size */
- if(field_sizes)
- if(0 == (field_sizes[i] = H5Tget_size(nm_tid)))
+ if (field_sizes)
+ if (0 == (field_sizes[i] = H5Tget_size(nm_tid)))
goto out;
/* get the member offset */
- if(field_offsets)
- field_offsets[i] = H5Tget_member_offset(n_tid, (unsigned) i);
+ if (field_offsets)
+ field_offsets[i] = H5Tget_member_offset(n_tid, (unsigned)i);
/* close the member types */
- if(H5Tclose(m_tid) < 0)
+ if (H5Tclose(m_tid) < 0)
goto out;
m_tid = H5I_BADID;
- if(H5Tclose(nm_tid) < 0)
+ if (H5Tclose(nm_tid) < 0)
goto out;
nm_tid = H5I_BADID;
} /* end for */
@@ -3207,122 +3123,119 @@ herr_t H5TBget_field_info(hid_t loc_id,
ret_val = 0;
out:
- if(tid > 0)
- if(H5Tclose(tid) < 0)
+ if (tid > 0)
+ if (H5Tclose(tid) < 0)
ret_val = -1;
- if(n_tid > 0)
- if(H5Tclose(n_tid) < 0)
+ if (n_tid > 0)
+ if (H5Tclose(n_tid) < 0)
ret_val = -1;
- if(m_tid > 0)
- if(H5Tclose(m_tid) < 0)
+ if (m_tid > 0)
+ if (H5Tclose(m_tid) < 0)
ret_val = -1;
- if(nm_tid > 0)
- if(H5Tclose(nm_tid) < 0)
+ if (nm_tid > 0)
+ if (H5Tclose(nm_tid) < 0)
ret_val = -1;
- if(did > 0)
- if(H5Dclose(did) < 0)
+ if (did > 0)
+ if (H5Dclose(did) < 0)
ret_val = -1;
return ret_val;
} /* end H5TBget_field_info() */
/*-------------------------------------------------------------------------
-*
-* internal functions
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * internal functions
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TB_find_field
-*
-* Purpose: Find a string field
-*
-* Return: Success: TRUE/FALSE, Failure: N/A
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: November 19, 2001
-*
-*-------------------------------------------------------------------------
-*/
-static
-hbool_t H5TB_find_field(const char *field, const char *field_list)
+ * Function: H5TB_find_field
+ *
+ * Purpose: Find a string field
+ *
+ * Return: Success: TRUE/FALSE, Failure: N/A
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: November 19, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
+static hbool_t
+H5TB_find_field(const char *field, const char *field_list)
{
const char *start = field_list;
const char *end;
/* check the arguments */
- if (field == NULL)
- return FALSE;
- if (field_list == NULL)
- return FALSE;
+ if (field == NULL)
+ return FALSE;
+ if (field_list == NULL)
+ return FALSE;
- while((end = HDstrstr(start, ",")) != 0) {
+ while ((end = HDstrstr(start, ",")) != 0) {
ptrdiff_t count = end - start;
- if(HDstrncmp(start, field, (size_t)count) == 0 && (size_t)count == HDstrlen(field))
+ if (HDstrncmp(start, field, (size_t)count) == 0 && (size_t)count == HDstrlen(field))
return TRUE;
start = end + 1;
} /* end while */
- if(HDstrncmp(start, field, HDstrlen(field)) == 0)
+ if (HDstrncmp(start, field, HDstrlen(field)) == 0)
return TRUE;
return FALSE;
} /* end H5TB_find_field() */
/*-------------------------------------------------------------------------
-* Function: H5TB_attach_attributes
-*
-* Purpose: Private function that creates the conforming table attributes;
-* Used by H5TBcombine_tables; not used by H5TBmake_table, which does not read
-* the fill value attributes from an existing table
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: December 6, 2001
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-static
-herr_t H5TB_attach_attributes(const char *table_title,
- hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- hid_t tid)
+ * Function: H5TB_attach_attributes
+ *
+ * Purpose: Private function that creates the conforming table attributes;
+ * Used by H5TBcombine_tables; not used by H5TBmake_table, which does not read
+ * the fill value attributes from an existing table
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: December 6, 2001
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5TB_attach_attributes(const char *table_title, hid_t loc_id, const char *dset_name, hsize_t nfields,
+ hid_t tid)
{
- char attr_name[255];
- char *member_name = NULL;
- hsize_t i;
- herr_t ret_val = -1;
+ char attr_name[255];
+ char * member_name = NULL;
+ hsize_t i;
+ herr_t ret_val = -1;
/* attach the CLASS attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "CLASS", TABLE_CLASS) < 0)
goto out;
/* attach the VERSION attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "VERSION", TABLE_VERSION) < 0)
goto out;
/* attach the TITLE attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, "TITLE", table_title) < 0)
goto out;
/* attach the FIELD_ name attribute */
- for(i = 0; i < nfields; i++) {
+ for (i = 0; i < nfields; i++) {
/* get the member name */
- if(NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
+ if (NULL == (member_name = H5Tget_member_name(tid, (unsigned)i)))
goto out;
HDsnprintf(attr_name, sizeof(attr_name), "FIELD_%d_NAME", (int)i);
/* attach the attribute */
- if(H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
+ if (H5LTset_attribute_string(loc_id, dset_name, attr_name, member_name) < 0)
goto out;
H5free_memory(member_name);
@@ -3332,57 +3245,53 @@ herr_t H5TB_attach_attributes(const char *table_title,
ret_val = 0;
out:
- if(member_name)
+ if (member_name)
H5free_memory(member_name);
return ret_val;
} /* end H5TB_attach_attributes() */
/*-------------------------------------------------------------------------
-* Function: H5TB_create_type
-*
-* Purpose: Private function that creates a memory type ID
-*
-* Return: Success: the memory type ID, Failure: -1
-*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
-*
-* Date: March 31, 2004
-*
-* Comments:
-*
-*-------------------------------------------------------------------------
-*/
-static
-hid_t H5TB_create_type(hid_t loc_id,
- const char *dset_name,
- size_t type_size,
- const size_t *field_offset,
- const size_t *field_sizes,
- hid_t ftype_id)
+ * Function: H5TB_create_type
+ *
+ * Purpose: Private function that creates a memory type ID
+ *
+ * Return: Success: the memory type ID, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: March 31, 2004
+ *
+ * Comments:
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const size_t *field_offset,
+ const size_t *field_sizes, hid_t ftype_id)
{
hid_t mem_type_id = H5I_BADID;
- hid_t mtype_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
+ hid_t mtype_id = H5I_BADID;
+ hid_t nmtype_id = H5I_BADID;
size_t size_native;
hsize_t nfields = 0;
- char **fnames = NULL;
+ char ** fnames = NULL;
unsigned i;
- hid_t ret_val = -1;
+ hid_t ret_val = -1;
/* get the number of fields */
- if(H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0)
+ if (H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0)
goto out;
- if(NULL == (fnames = (char**)HDcalloc(sizeof(char*), (size_t)nfields)))
+ if (NULL == (fnames = (char **)HDcalloc(sizeof(char *), (size_t)nfields)))
goto out;
- for(i = 0; i < nfields; i++)
- if(NULL == (fnames[i] = (char*)HDmalloc(HLTB_MAX_FIELD_LEN)))
+ for (i = 0; i < nfields; i++)
+ if (NULL == (fnames[i] = (char *)HDmalloc(HLTB_MAX_FIELD_LEN)))
goto out;
/* get field info */
- if(H5TBget_field_info(loc_id, dset_name, fnames, NULL, NULL, NULL) < 0)
+ if (H5TBget_field_info(loc_id, dset_name, fnames, NULL, NULL, NULL) < 0)
goto out;
/* create the memory data type */
@@ -3390,22 +3299,22 @@ hid_t H5TB_create_type(hid_t loc_id,
goto out;
/* get each field ID and adjust its size, if necessary */
- for(i = 0; i < nfields; i++) {
- if((mtype_id = H5Tget_member_type(ftype_id, i)) < 0)
+ for (i = 0; i < nfields; i++) {
+ if ((mtype_id = H5Tget_member_type(ftype_id, i)) < 0)
goto out;
- if((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
+ if ((nmtype_id = H5Tget_native_type(mtype_id, H5T_DIR_DEFAULT)) < 0)
goto out;
- if(0 == (size_native = H5Tget_size(nmtype_id)))
+ if (0 == (size_native = H5Tget_size(nmtype_id)))
goto out;
- if(field_sizes[i] != size_native)
- if(H5Tset_size(nmtype_id, field_sizes[i]) < 0)
+ if (field_sizes[i] != size_native)
+ if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
- if(H5Tinsert(mem_type_id, fnames[i], field_offset[i], nmtype_id) < 0)
+ if (H5Tinsert(mem_type_id, fnames[i], field_offset[i], nmtype_id) < 0)
goto out;
- if(H5Tclose(mtype_id) < 0)
+ if (H5Tclose(mtype_id) < 0)
goto out;
mtype_id = H5I_BADID;
- if(H5Tclose(nmtype_id) < 0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
nmtype_id = H5I_BADID;
} /* end for */
@@ -3413,159 +3322,153 @@ hid_t H5TB_create_type(hid_t loc_id,
ret_val = mem_type_id;
out:
- if(fnames) {
- for(i = 0; i < nfields; i++)
- if(fnames[i])
+ if (fnames) {
+ for (i = 0; i < nfields; i++)
+ if (fnames[i])
HDfree(fnames[i]);
HDfree(fnames);
} /* end if */
- if(mtype_id > 0)
- if(H5Tclose(mtype_id) < 0)
+ if (mtype_id > 0)
+ if (H5Tclose(mtype_id) < 0)
ret_val = -1;
- if(nmtype_id > 0)
- if(H5Tclose(nmtype_id) < 0)
+ if (nmtype_id > 0)
+ if (H5Tclose(nmtype_id) < 0)
ret_val = -1;
- if(ret_val < 0 && mem_type_id > 0)
+ if (ret_val < 0 && mem_type_id > 0)
H5Tclose(mem_type_id);
return ret_val;
} /* end H5TB_create_type() */
/*-------------------------------------------------------------------------
-*
-* Functions shared between H5TB and H5PT
-*
-*-------------------------------------------------------------------------
-*/
+ *
+ * Functions shared between H5TB and H5PT
+ *
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
-* Function: H5TB_common_append_records
-*
-* Purpose: Common code for reading records shared between H5PT and H5TB
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
-* James Laird, jlaird@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments: Called by H5TBappend_records and H5PTappend_records
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TB_common_append_records(hid_t dataset_id,
- hid_t mem_type_id,
- size_t nrecords,
- hsize_t orig_table_size,
- const void *buf)
+ * Function: H5TB_common_append_records
+ *
+ * Purpose: Common code for reading records shared between H5PT and H5TB
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
+ * James Laird, jlaird@ncsa.uiuc.edu
+ *
+ * Date: March 8, 2004
+ *
+ * Comments: Called by H5TBappend_records and H5PTappend_records
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TB_common_append_records(hid_t dataset_id, hid_t mem_type_id, size_t nrecords, hsize_t orig_table_size,
+ const void *buf)
{
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t dims[1];
- hsize_t mem_dims[1];
- herr_t ret_val = -1;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t dims[1];
+ hsize_t mem_dims[1];
+ herr_t ret_val = -1;
/* extend the dataset */
dims[0] = nrecords + orig_table_size;
- if(H5Dset_extent(dataset_id, dims) < 0)
+ if (H5Dset_extent(dataset_id, dims) < 0)
goto out;
/* create a simple memory data space */
mem_dims[0] = nrecords;
- if((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_dims, NULL)) < 0)
goto out;
/* get a copy of the new file data space for writing */
- if((sid = H5Dget_space(dataset_id)) < 0)
+ if ((sid = H5Dget_space(dataset_id)) < 0)
goto out;
/* define a hyperslab in the dataset */
offset[0] = orig_table_size;
- count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ count[0] = nrecords;
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* write the records */
- if(H5Dwrite(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf) < 0)
goto out;
ret_val = 0;
out:
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
return ret_val;
} /* end H5TB_common_append_records() */
/*-------------------------------------------------------------------------
-* Function: H5TB_common_read_records
-*
-* Purpose: Common code for reading records shared between H5PT and H5TB
-*
-* Return: Success: 0, Failure: -1
-*
-* Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
-* James Laird, jlaird@ncsa.uiuc.edu
-*
-* Date: March 8, 2004
-*
-* Comments: Called by H5TBread_records and H5PTread_records
-*
-*-------------------------------------------------------------------------
-*/
-herr_t H5TB_common_read_records(hid_t dataset_id,
- hid_t mem_type_id,
- hsize_t start,
- size_t nrecords,
- hsize_t table_size,
- void *buf)
+ * Function: H5TB_common_read_records
+ *
+ * Purpose: Common code for reading records shared between H5PT and H5TB
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
+ * James Laird, jlaird@ncsa.uiuc.edu
+ *
+ * Date: March 8, 2004
+ *
+ * Comments: Called by H5TBread_records and H5PTread_records
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5TB_common_read_records(hid_t dataset_id, hid_t mem_type_id, hsize_t start, size_t nrecords,
+ hsize_t table_size, void *buf)
{
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hsize_t count[1];
- hsize_t offset[1];
- hsize_t mem_size[1];
- herr_t ret_val = -1;
+ hid_t sid = H5I_BADID;
+ hid_t m_sid = H5I_BADID;
+ hsize_t count[1];
+ hsize_t offset[1];
+ hsize_t mem_size[1];
+ herr_t ret_val = -1;
/* make sure the read request is in bounds */
- if(start + nrecords > table_size)
+ if (start + nrecords > table_size)
goto out;
/* get the dataspace handle */
- if((sid = H5Dget_space(dataset_id)) < 0)
+ if ((sid = H5Dget_space(dataset_id)) < 0)
goto out;
/* define a hyperslab in the dataset of the size of the records */
offset[0] = start;
count[0] = nrecords;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* create a memory dataspace handle */
mem_size[0] = count[0];
- if((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
+ if ((m_sid = H5Screate_simple(1, mem_size, NULL)) < 0)
goto out;
- if((H5Dread(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf)) < 0)
+ if ((H5Dread(dataset_id, mem_type_id, m_sid, sid, H5P_DEFAULT, buf)) < 0)
goto out;
ret_val = 0;
out:
- if(m_sid > 0)
- if(H5Sclose(m_sid) < 0)
+ if (m_sid > 0)
+ if (H5Sclose(m_sid) < 0)
ret_val = -1;
- if(sid > 0)
- if(H5Sclose(sid) < 0)
+ if (sid > 0)
+ if (H5Sclose(sid) < 0)
ret_val = -1;
return ret_val;
} /* end H5TB_common_read_records() */
-
diff --git a/hl/src/H5TBprivate.h b/hl/src/H5TBprivate.h
index 17306fb..abe43c4 100644
--- a/hl/src/H5TBprivate.h
+++ b/hl/src/H5TBprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,10 +20,9 @@
/* public TB prototypes */
#include "H5TBpublic.h"
-
-#define TABLE_CLASS "TABLE"
-#define TABLE_VERSION "3.0"
-#define HLTB_MAX_FIELD_LEN 255
+#define TABLE_CLASS "TABLE"
+#define TABLE_VERSION "3.0"
+#define HLTB_MAX_FIELD_LEN 255
/*-------------------------------------------------------------------------
*
@@ -32,11 +31,8 @@
*-------------------------------------------------------------------------
*/
-herr_t H5TB_common_append_records( hid_t dataset_id,
- hid_t mem_type_id,
- size_t nrecords,
- hsize_t orig_table_size,
- const void * data);
+herr_t H5TB_common_append_records(hid_t dataset_id, hid_t mem_type_id, size_t nrecords,
+ hsize_t orig_table_size, const void *data);
/*-------------------------------------------------------------------------
*
@@ -45,16 +41,7 @@ herr_t H5TB_common_append_records( hid_t dataset_id,
*-------------------------------------------------------------------------
*/
-
-herr_t H5TB_common_read_records( hid_t dataset_id,
- hid_t mem_type_id,
- hsize_t start,
- size_t nrecords,
- hsize_t table_size,
- void *data);
-
-
-
+herr_t H5TB_common_read_records(hid_t dataset_id, hid_t mem_type_id, hsize_t start, size_t nrecords,
+ hsize_t table_size, void *data);
#endif
-
diff --git a/hl/src/H5TBpublic.h b/hl/src/H5TBpublic.h
index 56aa915..1324fbd 100644
--- a/hl/src/H5TBpublic.h
+++ b/hl/src/H5TBpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,12 +14,10 @@
#ifndef _H5TBpublic_H
#define _H5TBpublic_H
-
#ifdef __cplusplus
extern "C" {
#endif
-
/*-------------------------------------------------------------------------
*
* Create functions
@@ -27,20 +25,10 @@ extern "C" {
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5TBmake_table( const char *table_title,
- hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- hsize_t nrecords,
- size_t type_size,
- const char *field_names[],
- const size_t *field_offset,
- const hid_t *field_types,
- hsize_t chunk_size,
- void *fill_data,
- int compress,
- const void *buf );
-
+H5_HLDLL herr_t H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsize_t nfields,
+ hsize_t nrecords, size_t type_size, const char *field_names[],
+ const size_t *field_offset, const hid_t *field_types, hsize_t chunk_size,
+ void *fill_data, int compress, const void *buf);
/*-------------------------------------------------------------------------
*
@@ -49,45 +37,21 @@ H5_HLDLL herr_t H5TBmake_table( const char *table_title,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5TBappend_records( hid_t loc_id,
- const char *dset_name,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- const void *buf );
-
-H5_HLDLL herr_t H5TBwrite_records( hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- const void *buf );
-
-
-H5_HLDLL herr_t H5TBwrite_fields_name( hid_t loc_id,
- const char *dset_name,
- const char *field_names,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- const void *buf );
-
-H5_HLDLL herr_t H5TBwrite_fields_index( hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- const int *field_index,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- const void *buf );
+H5_HLDLL herr_t H5TBappend_records(hid_t loc_id, const char *dset_name, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *dst_sizes, const void *buf);
+
+H5_HLDLL herr_t H5TBwrite_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords,
+ size_t type_size, const size_t *field_offset, const size_t *dst_sizes,
+ const void *buf);
+H5_HLDLL herr_t H5TBwrite_fields_name(hid_t loc_id, const char *dset_name, const char *field_names,
+ hsize_t start, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *dst_sizes, const void *buf);
+
+H5_HLDLL herr_t H5TBwrite_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields,
+ const int *field_index, hsize_t start, hsize_t nrecords,
+ size_t type_size, const size_t *field_offset, const size_t *dst_sizes,
+ const void *buf);
/*-------------------------------------------------------------------------
*
@@ -96,46 +60,21 @@ H5_HLDLL herr_t H5TBwrite_fields_index( hid_t loc_id,
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5TBread_table(hid_t loc_id, const char *dset_name, size_t dst_size, const size_t *dst_offset,
+ const size_t *dst_sizes, void *dst_buf);
+
+H5_HLDLL herr_t H5TBread_fields_name(hid_t loc_id, const char *dset_name, const char *field_names,
+ hsize_t start, hsize_t nrecords, size_t type_size,
+ const size_t *field_offset, const size_t *dst_sizes, void *buf);
+H5_HLDLL herr_t H5TBread_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields,
+ const int *field_index, hsize_t start, hsize_t nrecords,
+ size_t type_size, const size_t *field_offset, const size_t *dst_sizes,
+ void *buf);
-H5_HLDLL herr_t H5TBread_table( hid_t loc_id,
- const char *dset_name,
- size_t dst_size,
- const size_t *dst_offset,
- const size_t *dst_sizes,
- void *dst_buf );
-
-
-H5_HLDLL herr_t H5TBread_fields_name( hid_t loc_id,
- const char *dset_name,
- const char *field_names,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- void *buf );
-
-H5_HLDLL herr_t H5TBread_fields_index( hid_t loc_id,
- const char *dset_name,
- hsize_t nfields,
- const int *field_index,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *field_offset,
- const size_t *dst_sizes,
- void *buf );
-
-
-H5_HLDLL herr_t H5TBread_records( hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t type_size,
- const size_t *dst_offset,
- const size_t *dst_sizes,
- void *buf );
+H5_HLDLL herr_t H5TBread_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords,
+ size_t type_size, const size_t *dst_offset, const size_t *dst_sizes,
+ void *buf);
/*-------------------------------------------------------------------------
*
@@ -144,19 +83,10 @@ H5_HLDLL herr_t H5TBread_records( hid_t loc_id,
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5TBget_table_info(hid_t loc_id, const char *dset_name, hsize_t *nfields, hsize_t *nrecords);
-H5_HLDLL herr_t H5TBget_table_info ( hid_t loc_id,
- const char *dset_name,
- hsize_t *nfields,
- hsize_t *nrecords );
-
-H5_HLDLL herr_t H5TBget_field_info( hid_t loc_id,
- const char *dset_name,
- char *field_names[],
- size_t *field_sizes,
- size_t *field_offsets,
- size_t *type_size );
-
+H5_HLDLL herr_t H5TBget_field_info(hid_t loc_id, const char *dset_name, char *field_names[],
+ size_t *field_sizes, size_t *field_offsets, size_t *type_size);
/*-------------------------------------------------------------------------
*
@@ -165,47 +95,22 @@ H5_HLDLL herr_t H5TBget_field_info( hid_t loc_id,
*-------------------------------------------------------------------------
*/
+H5_HLDLL herr_t H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords);
-H5_HLDLL herr_t H5TBdelete_record( hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords );
-
-
-H5_HLDLL herr_t H5TBinsert_record( hid_t loc_id,
- const char *dset_name,
- hsize_t start,
- hsize_t nrecords,
- size_t dst_size,
- const size_t *dst_offset,
- const size_t *dst_sizes,
- void *buf );
+H5_HLDLL herr_t H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords,
+ size_t dst_size, const size_t *dst_offset, const size_t *dst_sizes,
+ void *buf);
-H5_HLDLL herr_t H5TBadd_records_from( hid_t loc_id,
- const char *dset_name1,
- hsize_t start1,
- hsize_t nrecords,
- const char *dset_name2,
- hsize_t start2 );
+H5_HLDLL herr_t H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize_t nrecords,
+ const char *dset_name2, hsize_t start2);
-H5_HLDLL herr_t H5TBcombine_tables( hid_t loc_id1,
- const char *dset_name1,
- hid_t loc_id2,
- const char *dset_name2,
- const char *dset_name3 );
+H5_HLDLL herr_t H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2,
+ const char *dset_name2, const char *dset_name3);
-H5_HLDLL herr_t H5TBinsert_field( hid_t loc_id,
- const char *dset_name,
- const char *field_name,
- hid_t field_type,
- hsize_t position,
- const void *fill_data,
- const void *buf );
-
-H5_HLDLL herr_t H5TBdelete_field( hid_t loc_id,
- const char *dset_name,
- const char *field_name );
+H5_HLDLL herr_t H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name,
+ hid_t field_type, hsize_t position, const void *fill_data, const void *buf);
+H5_HLDLL herr_t H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name);
/*-------------------------------------------------------------------------
*
@@ -214,18 +119,12 @@ H5_HLDLL herr_t H5TBdelete_field( hid_t loc_id,
*-------------------------------------------------------------------------
*/
-H5_HLDLL herr_t H5TBAget_title( hid_t loc_id,
- char *table_title );
+H5_HLDLL herr_t H5TBAget_title(hid_t loc_id, char *table_title);
-H5_HLDLL htri_t H5TBAget_fill(hid_t loc_id,
- const char *dset_name,
- hid_t dset_id,
- unsigned char *dst_buf);
+H5_HLDLL htri_t H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char *dst_buf);
#ifdef __cplusplus
}
#endif
-
#endif
-
diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am
index ffbbe93..300b6af 100644
--- a/hl/src/Makefile.am
+++ b/hl/src/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index c072226..609b35f 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -406,11 +406,11 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Add include directories to the C preprocessor flags
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -425,6 +425,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -443,6 +444,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -470,6 +472,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -477,9 +481,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -495,6 +502,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -516,6 +524,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -528,8 +537,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -543,6 +554,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -584,6 +596,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -672,26 +685,26 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# See libtool versioning documentation online.
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
-LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 2
-LT_VERS_AGE = 3
+LT_VERS_INTERFACE = 14
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 4
LT_CXX_VERS_INTERFACE = 16
-LT_CXX_VERS_REVISION = 0
+LT_CXX_VERS_REVISION = 1
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 6
+LT_F_VERS_REVISION = 7
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 2
+LT_HL_VERS_REVISION = 3
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 2
+LT_HL_CXX_VERS_REVISION = 3
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 7
+LT_TOOLS_VERS_REVISION = 8
LT_TOOLS_VERS_AGE = 0
# This library is our main target.
@@ -709,11 +722,11 @@ libhdf5_hl_la_LIBADD = $(LIBHDF5)
# Public header files (to be installed)
include_HEADERS = hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1235,6 +1248,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1270,7 +1284,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1431,7 +1445,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/src/hdf5_hl.h b/hl/src/hdf5_hl.h
index ddf7ae8..bf92972 100644
--- a/hl/src/hdf5_hl.h
+++ b/hl/src/hdf5_hl.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,4 +28,3 @@
#include "H5PTpublic.h" /* table */
#endif /*H5_INCLUDE_HL*/
-
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 054b786..d005e67 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TEST)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_TEST C)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
# with "hl_". This allows for easier filtering of the test suite when
@@ -14,63 +14,127 @@ PROJECT (HDF5_HL_TEST)
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-include_directories (${CMAKE_CURRENT_BINARY_DIR})
-include_directories (${HDF5_TEST_SRC_DIR})
-
# --------------------------------------------------------------------
# Macro used to add a unit test
# --------------------------------------------------------------------
-MACRO (HL_ADD_EXE hl_name)
+macro (HL_ADD_EXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ")
- target_link_libraries (hl_${hl_name}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- )
+ target_compile_options(hl_${hl_name} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_${hl_name} STATIC)
+ target_link_libraries (hl_${hl_name} PRIVATE
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_TEST_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
+ )
+ else ()
+ TARGET_C_PROPERTIES (hl_${hl_name} SHARED)
+ target_link_libraries (hl_${hl_name} PRIVATE
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_TEST_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ )
+ endif ()
set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
-ENDMACRO ()
-MACRO (HL_ADD_SHEXE hl_name)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_${hl_name}_FORMAT hl_${hl_name})
+ endif ()
+endmacro ()
+
+macro (HL_ADD_ZEXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ")
- target_link_libraries (hl_${hl_name}
- ${HDF5_HL_LIBSH_TARGET}
- ${HDF5_TEST_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
- )
+ target_compile_options(hl_${hl_name} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_${hl_name} STATIC)
+ target_link_libraries (hl_${hl_name} PRIVATE
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_TEST_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
+ ${LINK_COMP_LIBS}
+ )
+ else ()
+ TARGET_C_PROPERTIES (hl_${hl_name} SHARED)
+ target_link_libraries (hl_${hl_name} PRIVATE
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_TEST_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ ${LINK_COMP_LIBS}
+ )
+ endif ()
set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
-ENDMACRO ()
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_${hl_name}_FORMAT hl_${hl_name})
+ endif ()
+endmacro ()
HL_ADD_EXE (test_ds)
-HL_ADD_EXE (test_dset_opt)
+HL_ADD_ZEXE (test_dset_opt)
HL_ADD_EXE (test_image)
HL_ADD_EXE (test_lite)
HL_ADD_EXE (test_table)
# test_packet has two source files
add_executable (hl_test_packet test_packet.c test_packet_vlen.c)
-TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ")
-target_link_libraries (hl_test_packet
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
+target_compile_options(hl_test_packet PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (hl_test_packet PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_test_packet STATIC)
+ target_link_libraries (hl_test_packet PRIVATE
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_TEST_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
+ )
+else ()
+ TARGET_C_PROPERTIES (hl_test_packet SHARED)
+ target_link_libraries (hl_test_packet PRIVATE
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_TEST_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ )
+endif ()
set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_hl_test_packet_FORMAT hl_test_packet)
+endif ()
+
# --------------------------------------------------------------------
# This executable is used to generate test files for the test_ds test.
# It should only be run during development when new test files are needed
# --------------------------------------------------------------------
-if (HDF5_BUILD_GENERATORS)
+if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
add_executable (hl_gen_test_ds gen_test_ds.c)
- TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ")
- target_link_libraries (hl_gen_test_ds
+ target_compile_options(hl_gen_test_ds PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (hl_gen_test_ds PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (hl_gen_test_ds STATIC)
+ target_link_libraries (hl_gen_test_ds PRIVATE
${HDF5_HL_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
)
set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_hl_gen_test_ds_FORMAT hl_gen_test_ds)
+ endif ()
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index c4b0814..ec45435 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -42,14 +42,48 @@ foreach (h5_file ${HL_REFERENCE_TEST_FILES})
endforeach ()
add_custom_target(hl_test_files ALL COMMENT "Copying files needed by hl_test tests" DEPENDS ${hl_test_files_list})
+# Remove any output file left over from previous test run
+set (test_hl_CLEANFILES
+ combine_tables1.h5
+ combine_tables2.h5
+ test_detach.h5
+ test_ds1.h5
+ test_ds2.h5
+ test_ds3.h5
+ test_ds4.h5
+ test_ds5.h5
+ test_ds6.h5
+ test_ds7.h5
+ test_ds8.h5
+ test_ds9.h5
+ test_ds10.h5
+ test_dectris.h5
+ test_image1.h5
+ test_image2.h5
+ test_image3.h5
+ test_lite1.h5
+ test_lite2.h5
+ test_lite3.h5
+ test_lite4.h5
+ test_packet_compress.h5
+ test_packet_table.h5
+ test_table.h5
+)
+add_test (
+ NAME HL_test-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_hl_CLEANFILES}
+)
+set_tests_properties (HL_test-clear-objects PROPERTIES FIXTURES_SETUP clear_test_hl)
+
# --------------------------------------------------------------------
# Macro used to add a unit test
# --------------------------------------------------------------------
macro (HL_ADD_TEST hl_name)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ add_test (NAME HL_${hl_name} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_${hl_name}>)
else ()
add_test (NAME HL_${hl_name} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:hl_${hl_name}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -60,49 +94,13 @@ macro (HL_ADD_TEST hl_name)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test}
+ set_tests_properties (HL_${hl_name} PROPERTIES
+ FIXTURES_REQUIRED clear_test_hl
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
- )
- endif ()
+ )
endmacro ()
-# Remove any output file left over from previous test run
-add_test (
- NAME HL_test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- combine_tables1.h5
- combine_tables2.h5
- test_detach.h5
- test_ds1.h5
- test_ds2.h5
- test_ds3.h5
- test_ds4.h5
- test_ds5.h5
- test_ds6.h5
- test_ds7.h5
- test_ds8.h5
- test_ds9.h5
- test_ds10.h5
- test_dectris.h5
- test_image1.h5
- test_image2.h5
- test_image3.h5
- test_lite1.h5
- test_lite2.h5
- test_lite3.h5
- test_lite4.h5
- test_packet_compress.h5
- test_packet_table.h5
- test_table.h5
-)
-if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (HL_test-clear-objects PROPERTIES DEPENDS ${last_test})
-endif ()
-set (last_test "HL_test-clear-objects")
-
HL_add_test (test_ds)
HL_add_test (test_dset_opt)
HL_add_test (test_image)
diff --git a/hl/test/COPYING b/hl/test/COPYING
index 6497ace..97969da 100644
--- a/hl/test/COPYING
+++ b/hl/test/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/test/H5srcdir_str.h.in b/hl/test/H5srcdir_str.h.in
index bab1df3..988c065 100644
--- a/hl/test/H5srcdir_str.h.in
+++ b/hl/test/H5srcdir_str.h.in
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am
index c176f2e..e634e76 100644
--- a/hl/test/Makefile.am
+++ b/hl/test/Makefile.am
@@ -1,4 +1,3 @@
-#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
@@ -6,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 4a8cc5a..3b60254 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -14,7 +14,6 @@
@SET_MAKE@
-#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
@@ -22,7 +21,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -440,14 +439,14 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Add include directories to C preprocessor flags
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I. -I$(srcdir) \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_builddir)/test -I$(top_srcdir)/test \
-I$(top_srcdir)/hl/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -462,6 +461,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -480,6 +480,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -507,6 +508,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -514,9 +517,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -532,6 +538,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -553,6 +560,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -565,8 +573,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -580,6 +590,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -621,6 +632,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -729,11 +741,11 @@ BUILD_ALL_PROGS = gen_test_ds
# Sources for test_packet executable
test_packet_SOURCES = test_packet.c test_packet_vlen.c
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1295,6 +1307,7 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1330,7 +1343,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1491,7 +1504,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/test/dectris_hl_perf.c b/hl/test/dectris_hl_perf.c
index befebf5..c9e1307 100644
--- a/hl/test/dectris_hl_perf.c
+++ b/hl/test/dectris_hl_perf.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,190 +27,203 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
-
-const char *FILENAME[] = {
- "dectris_perf",
- "unix.raw",
- NULL
-};
+
+const char *FILENAME[] = {"dectris_perf", "unix.raw", NULL};
/*
* Print the current location on the standard output stream.
*/
#define FUNC __func__
-#define AT() printf (" at %s:%d in %s()...\n", \
- __FILE__, __LINE__, FUNC);
-#define H5_FAILED() {puts("*FAILED*");fflush(stdout);}
-#define TEST_ERROR {H5_FAILED(); AT(); goto error;}
-#define TESTING(WHAT) {printf("Testing %-62s",WHAT); fflush(stdout);}
-#define PASSED() {puts(" PASSED");fflush(stdout);}
-
-#define DIRECT_UNCOMPRESSED_DSET "direct_uncompressed_dset"
-#define DIRECT_COMPRESSED_DSET "direct_compressed_dset"
-#define REG_COMPRESSED_DSET "reg_compressed_dset"
-#define REG_NO_COMPRESS_DSET "reg_no_compress_dset"
-#define RANK 3
-#define NX 100
-#define NY 1000
-#define NZ 250
-#define CHUNK_NX 1
-#define CHUNK_NY 1000
-#define CHUNK_NZ 250
-
-#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
-char filename[1024];
+#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
+#define H5_FAILED() \
+ { \
+ puts("*FAILED*"); \
+ fflush(stdout); \
+ }
+#define TEST_ERROR \
+ { \
+ H5_FAILED(); \
+ AT(); \
+ goto error; \
+ }
+#define TESTING(WHAT) \
+ { \
+ printf("Testing %-62s", WHAT); \
+ fflush(stdout); \
+ }
+#define PASSED() \
+ { \
+ puts(" PASSED"); \
+ fflush(stdout); \
+ }
+
+#define DIRECT_UNCOMPRESSED_DSET "direct_uncompressed_dset"
+#define DIRECT_COMPRESSED_DSET "direct_compressed_dset"
+#define REG_COMPRESSED_DSET "reg_compressed_dset"
+#define REG_NO_COMPRESS_DSET "reg_no_compress_dset"
+#define RANK 3
+#define NX 100
+#define NY 1000
+#define NZ 250
+#define CHUNK_NX 1
+#define CHUNK_NY 1000
+#define CHUNK_NZ 250
+
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12)
+char filename[1024];
unsigned int *outbuf[NX];
-size_t data_size[NX];
-double total_size = 0.0;
+size_t data_size[NX];
+double total_size = 0.0;
unsigned int *direct_buf[NX];
-double MB = 1048576.0;
+double MB = 1048576.0;
/*--------------------------------------------------
* Function to report IO rate
*--------------------------------------------------
*/
-void reportTime(struct timeval start, double mbytes)
+void
+reportTime(struct timeval start, double mbytes)
{
- struct timeval timeval_stop,timeval_diff;
+ struct timeval timeval_stop, timeval_diff;
/*end timing*/
- gettimeofday(&timeval_stop,NULL);
+ gettimeofday(&timeval_stop, NULL);
/* Calculate the elapsed gettimeofday time */
- timeval_diff.tv_usec=timeval_stop.tv_usec-start.tv_usec;
- timeval_diff.tv_sec=timeval_stop.tv_sec-start.tv_sec;
+ timeval_diff.tv_usec = timeval_stop.tv_usec - start.tv_usec;
+ timeval_diff.tv_sec = timeval_stop.tv_sec - start.tv_sec;
- if(timeval_diff.tv_usec<0) {
- timeval_diff.tv_usec+=1000000;
+ if (timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_usec += 1000000;
timeval_diff.tv_sec--;
} /* end if */
-/*printf("mbytes=%lf, sec=%lf, usec=%lf\n", mbytes, (double)timeval_diff.tv_sec, (double)timeval_diff.tv_usec);*/
- printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0)));
+ /*printf("mbytes=%lf, sec=%lf, usec=%lf\n", mbytes, (double)timeval_diff.tv_sec,
+ * (double)timeval_diff.tv_usec);*/
+ printf("MBytes/second: %lf\n", (double)mbytes / ((double)timeval_diff.tv_sec +
+ ((double)timeval_diff.tv_usec / (double)1000000.0)));
}
/*--------------------------------------------------
* Create file, datasets, and initialize data
*--------------------------------------------------
*/
-int create_file(hid_t fapl_id)
+int
+create_file(hid_t fapl_id)
{
- hid_t file; /* handles */
- hid_t fapl;
- hid_t cparms;
- hid_t dataspace, dataset;
- hsize_t dims[RANK] = {NX, NY, NZ};
- hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
- unsigned int aggression = 9; /* Compression aggression setting */
- int ret;
- int i, j, n;
+ hid_t file; /* handles */
+ hid_t fapl;
+ hid_t cparms;
+ hid_t dataspace, dataset;
+ hsize_t dims[RANK] = {NX, NY, NZ};
+ hsize_t chunk_dims[RANK] = {CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ unsigned int aggression = 9; /* Compression aggression setting */
+ int ret;
+ int i, j, n;
int flag;
int unix_file;
unsigned int *p;
- size_t buf_size = CHUNK_NY*CHUNK_NZ*sizeof(unsigned int);
+ size_t buf_size = CHUNK_NY * CHUNK_NZ * sizeof(unsigned int);
const Bytef *z_src;
- Bytef *z_dst; /*destination buffer */
- uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
- uLong z_src_nbytes = (uLong)buf_size;
+ Bytef * z_dst; /*destination buffer */
+ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ uLong z_src_nbytes = (uLong)buf_size;
TESTING("Create a file and dataset");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
TEST_ERROR;
/*
* Create a new file. If file exists its contents will be overwritten.
*/
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
/*
* Modify dataset creation properties, i.e. enable chunking and compression
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
- if(H5Pset_chunk( cparms, RANK, chunk_dims) < 0)
+ if (H5Pset_chunk(cparms, RANK, chunk_dims) < 0)
TEST_ERROR;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DIRECT_UNCOMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, DIRECT_UNCOMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
TEST_ERROR;
- if((dataset = H5Dcreate2(file, REG_NO_COMPRESS_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, REG_NO_COMPRESS_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
TEST_ERROR;
/* Set compression */
- if(H5Pset_deflate( cparms, aggression) < 0)
+ if (H5Pset_deflate(cparms, aggression) < 0)
TEST_ERROR;
- if((dataset = H5Dcreate2(file, DIRECT_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, DIRECT_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
TEST_ERROR;
-
- if((dataset = H5Dcreate2(file, REG_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, REG_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
TEST_ERROR;
- if(H5Fclose(file) < 0)
+ if (H5Fclose(file) < 0)
TEST_ERROR;
- if(H5Sclose(dataspace) < 0)
+ if (H5Sclose(dataspace) < 0)
TEST_ERROR;
- if(H5Pclose(cparms) < 0)
+ if (H5Pclose(cparms) < 0)
TEST_ERROR;
/* create a unix file*/
- flag = O_CREAT|O_TRUNC|O_WRONLY;
+ flag = O_CREAT | O_TRUNC | O_WRONLY;
- if ((unix_file=open(FILENAME[1],flag,S_IRWXU))== -1)
+ if ((unix_file = open(FILENAME[1], flag, S_IRWXU)) == -1)
TEST_ERROR;
- if (close(unix_file) < 0)
- {
+ if (close(unix_file) < 0) {
printf(" unable to close the file\n");
TEST_ERROR;
}
-
/* Initialize data for chunks */
- for(i = 0; i < NX; i++) {
- p = direct_buf[i] = (unsigned int*)malloc(CHUNK_NY*CHUNK_NZ*sizeof(unsigned int));
-
- for(j=0; j < CHUNK_NY*CHUNK_NZ; j++, p++)
+ for (i = 0; i < NX; i++) {
+ p = direct_buf[i] = (unsigned int *)malloc(CHUNK_NY * CHUNK_NZ * sizeof(unsigned int));
+
+ for (j = 0; j < CHUNK_NY * CHUNK_NZ; j++, p++)
*p = rand() % 65000;
- z_src = (const Bytef*)direct_buf[i];
+ z_src = (const Bytef *)direct_buf[i];
z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
/* Allocate output (compressed) buffer */
- outbuf[i] = (unsigned int*)malloc((size_t)z_dst_nbytes);
- z_dst = (Bytef *)outbuf[i];
+ outbuf[i] = (unsigned int *)malloc((size_t)z_dst_nbytes);
+ z_dst = (Bytef *)outbuf[i];
/* Perform compression from the source to the destination buffer */
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
@@ -219,70 +232,73 @@ int create_file(hid_t fapl_id)
total_size += data_size[i];
/* Check for various zlib errors */
- if(Z_BUF_ERROR == ret) {
+ if (Z_BUF_ERROR == ret) {
fprintf(stderr, "overflow");
TEST_ERROR;
- } else if(Z_MEM_ERROR == ret) {
- fprintf(stderr, "deflate memory error");
+ }
+ else if (Z_MEM_ERROR == ret) {
+ fprintf(stderr, "deflate memory error");
TEST_ERROR;
- } else if(Z_OK != ret) {
- fprintf(stderr, "other deflate error");
+ }
+ else if (Z_OK != ret) {
+ fprintf(stderr, "other deflate error");
TEST_ERROR;
}
}
-
PASSED();
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return 1;
}
/*--------------------------------------------------
- * Benchmark the performance of the new function
+ * Benchmark the performance of the new function
* with precompressed data.
*--------------------------------------------------
*/
int
test_direct_write_uncompressed_data(hid_t fapl_id)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t dxpl;
- herr_t status;
- int i;
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ unsigned filter_mask = 0;
+ hsize_t offset[RANK] = {0, 0, 0};
- unsigned filter_mask = 0;
- hsize_t offset[RANK] = {0, 0, 0};
+ struct timeval timeval_start;
- struct timeval timeval_start;
-
TESTING("H5DOwrite_chunk for uncompressed data");
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
/* Start the timer */
- gettimeofday(&timeval_start,NULL);
+ gettimeofday(&timeval_start, NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
- if((dataset = H5Dopen2(file, DIRECT_UNCOMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DIRECT_UNCOMPRESSED_DSET, H5P_DEFAULT)) < 0)
TEST_ERROR;
-
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
- for(i=0; i<NX; i++) {
- status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, CHUNK_NY*CHUNK_NZ*sizeof(unsigned int), direct_buf[i]);
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for (i = 0; i < NX; i++) {
+ status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset,
+ CHUNK_NY * CHUNK_NZ * sizeof(unsigned int), direct_buf[i]);
(offset[0])++;
}
@@ -293,60 +309,60 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
H5Pclose(dxpl);
H5Fclose(file);
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX * NY * NZ * sizeof(unsigned int) / MB));
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Pclose(dxpl);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return 1;
}
-
/*--------------------------------------------------
- * Benchmark the performance of the new function
+ * Benchmark the performance of the new function
* with precompressed data.
*--------------------------------------------------
*/
int
test_direct_write_compressed_data(hid_t fapl_id)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t dxpl;
- herr_t status;
- int i;
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ unsigned filter_mask = 0;
+ hsize_t offset[RANK] = {0, 0, 0};
- unsigned filter_mask = 0;
- hsize_t offset[RANK] = {0, 0, 0};
+ struct timeval timeval_start;
- struct timeval timeval_start;
-
TESTING("H5DOwrite_chunk for pre-compressed data");
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
/* Start the timer */
- gettimeofday(&timeval_start,NULL);
+ gettimeofday(&timeval_start, NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
- if((dataset = H5Dopen2(file, DIRECT_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DIRECT_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
TEST_ERROR;
-
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
- for(i=0; i<NX; i++) {
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for (i = 0; i < NX; i++) {
status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, data_size[i], outbuf[i]);
(offset[0])++;
}
@@ -357,19 +373,21 @@ test_direct_write_compressed_data(hid_t fapl_id)
H5Dclose(dataset);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(total_size/MB));
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size / MB));
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Pclose(dxpl);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return 1;
}
@@ -381,57 +399,59 @@ error:
int
test_compressed_write(hid_t fapl_id)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t mem_space;
- hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
- hid_t dxpl;
- herr_t status;
- int i;
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t mem_space;
+ hsize_t chunk_dims[RANK] = {CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ hid_t dxpl;
+ herr_t status;
+ int i;
hsize_t start[RANK]; /* Start of hyperslab */
hsize_t stride[RANK]; /* Stride of hyperslab */
hsize_t count[RANK]; /* Block count */
hsize_t block[RANK]; /* Block sizes */
- struct timeval timeval_start;
+ struct timeval timeval_start;
TESTING("H5Dwrite with compression enabled");
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
TEST_ERROR;
/* Start the timer */
- gettimeofday(&timeval_start,NULL);
+ gettimeofday(&timeval_start, NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
- if((dataset = H5Dopen2(file, REG_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, REG_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if((dataspace = H5Dget_space(dataset)) < 0)
+ if ((dataspace = H5Dget_space(dataset)) < 0)
TEST_ERROR;
- start[0] = start[1] = start[2] = 0;
+ start[0] = start[1] = start[2] = 0;
stride[0] = stride[1] = stride[2] = 1;
- count[0] = count[1] = count[2] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
-
- for(i=0; i<NX; i++) {
+ count[0] = count[1] = count[2] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ block[2] = CHUNK_NZ;
+
+ for (i = 0; i < NX; i++) {
/*
* Select hyperslab for one chunk in the file
*/
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
TEST_ERROR;
- (start[0])++;
+ (start[0])++;
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
- H5P_DEFAULT, direct_buf[i])) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, direct_buf[i])) <
+ 0)
TEST_ERROR;
}
@@ -443,21 +463,23 @@ test_compressed_write(hid_t fapl_id)
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
-
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX * NY * NZ * sizeof(unsigned int) / MB));
+
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(dataspace);
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return 1;
}
@@ -469,57 +491,59 @@ error:
int
test_no_compress_write(hid_t fapl_id)
{
- hid_t file; /* handles */
- hid_t dataspace, dataset;
- hid_t mem_space;
- hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
- hid_t dxpl;
- herr_t status;
- int i;
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t mem_space;
+ hsize_t chunk_dims[RANK] = {CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ hid_t dxpl;
+ herr_t status;
+ int i;
hsize_t start[RANK]; /* Start of hyperslab */
hsize_t stride[RANK]; /* Stride of hyperslab */
hsize_t count[RANK]; /* Block count */
hsize_t block[RANK]; /* Block sizes */
- struct timeval timeval_start;
+ struct timeval timeval_start;
TESTING("H5Dwrite without compression");
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
TEST_ERROR;
/* Start the timer */
- gettimeofday(&timeval_start,NULL);
+ gettimeofday(&timeval_start, NULL);
/* Reopen the file and dataset */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
- if((dataset = H5Dopen2(file, REG_NO_COMPRESS_DSET, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, REG_NO_COMPRESS_DSET, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if((dataspace = H5Dget_space(dataset)) < 0)
+ if ((dataspace = H5Dget_space(dataset)) < 0)
TEST_ERROR;
- start[0] = start[1] = start[2] = 0;
+ start[0] = start[1] = start[2] = 0;
stride[0] = stride[1] = stride[2] = 1;
- count[0] = count[1] = count[2] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
-
- for(i=0; i<NX; i++) {
+ count[0] = count[1] = count[2] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ block[2] = CHUNK_NZ;
+
+ for (i = 0; i < NX; i++) {
/*
* Select hyperslab for one chunk in the file
*/
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
TEST_ERROR;
- (start[0])++;
+ (start[0])++;
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
- H5P_DEFAULT, direct_buf[i])) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, direct_buf[i])) <
+ 0)
TEST_ERROR;
}
@@ -531,21 +555,23 @@ test_no_compress_write(hid_t fapl_id)
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
-
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX * NY * NZ * sizeof(unsigned int) / MB));
+
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(dataspace);
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return 1;
}
@@ -554,13 +580,13 @@ error:
* data to a Unix file
*--------------------------------------------------
*/
-int
+int
test_unix_write(void)
{
- int file, flag;
- ssize_t op_size;
- int i;
- struct timeval timeval_start;
+ int file, flag;
+ ssize_t op_size;
+ int i;
+ struct timeval timeval_start;
TESTING("Write compressed data to a Unix file");
@@ -568,41 +594,38 @@ test_unix_write(void)
flag = O_WRONLY;
/* Start the timer */
- gettimeofday(&timeval_start,NULL);
+ gettimeofday(&timeval_start, NULL);
- if ((file=open(FILENAME[1],flag))== -1)
+ if ((file = open(FILENAME[1], flag)) == -1)
TEST_ERROR;
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
- for(i=0; i<NX; i++) {
- op_size = write(file, outbuf[i],data_size[i]);
- if (op_size < 0)
- {
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for (i = 0; i < NX; i++) {
+ op_size = write(file, outbuf[i], data_size[i]);
+ if (op_size < 0) {
printf(" Error in writing data to file because %s \n", strerror(errno));
TEST_ERROR;
}
- else if (op_size == 0)
- {
+ else if (op_size == 0) {
printf(" unable to write sufficent data to file because %s \n", strerror(errno));
TEST_ERROR;
}
}
- if (close(file) < 0)
- {
+ if (close(file) < 0) {
printf(" unable to close the file\n");
TEST_ERROR;
}
- /* Report the performance */
- reportTime(timeval_start, (double)(total_size/MB));
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size / MB));
PASSED();
return 0;
error:
- return 1;
+ return 1;
}
/*--------------------------------------------------
@@ -610,16 +633,16 @@ error:
*--------------------------------------------------
*/
int
-main (void)
+main(void)
{
- hid_t fapl = H5P_DEFAULT;
- int i;
+ hid_t fapl = H5P_DEFAULT;
+ int i;
/* Testing setup */
-/* h5_reset();
- fapl = h5_fileaccess();
+ /* h5_reset();
+ fapl = h5_fileaccess();
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);*/
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);*/
sprintf(filename, "%s.h5", FILENAME[0]);
@@ -630,11 +653,11 @@ main (void)
test_compressed_write(fapl);
test_unix_write();
- for(i=0; i<NX; i++) {
+ for (i = 0; i < NX; i++) {
free(outbuf[i]);
free(direct_buf[i]);
}
-
-/* h5_cleanup(FILENAME, fapl);*/
+
+ /* h5_cleanup(FILENAME, fapl);*/
return 0;
}
diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c
index f8f1d39..c3fc7ff 100644
--- a/hl/test/gen_test_ds.c
+++ b/hl/test/gen_test_ds.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -31,9 +31,9 @@
/* prototypes */
static hid_t open_test_file(const char *fileext);
-herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx);
-herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
-herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
+herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx);
+herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
+herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx);
herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx);
@@ -43,48 +43,47 @@ static int test_long_scalenames(const char *filename);
static int test_samelong_scalenames(const char *filename);
static int test_foreign_scaleattached(const char *filename);
-
-#define DIM_DATA 12
-#define DIM1_SIZE 3
-#define DIM2_SIZE 4
-#define DIM3_SIZE 12
-#define DIM4_SIZE 2
-#define DIM0 0
-#define DIM1 1
-#define DIM2 2
-#define DIM3 3
-
-#define DATASET_NAME "dset_"
-#define DS_1_NAME "ds_1_"
-#define DS_2_NAME "ds_2_"
-#define DS_3_NAME "ds_3_"
-#define DS_4_NAME "ds_4_"
-
-#define SCALE_1_NAME "scalename_1_"
-#define SCALE_2_NAME "scalename_2_"
-#define SCALE_3_NAME "scalename_3_"
-#define SCALE_4_NAME "scalename_4_"
-
-#define FILENAME "test_ds_"
-#define FILEEXT ".h5"
+#define DIM_DATA 12
+#define DIM1_SIZE 3
+#define DIM2_SIZE 4
+#define DIM3_SIZE 12
+#define DIM4_SIZE 2
+#define DIM0 0
+#define DIM1 1
+#define DIM2 2
+#define DIM3 3
+
+#define DATASET_NAME "dset_"
+#define DS_1_NAME "ds_1_"
+#define DS_2_NAME "ds_2_"
+#define DS_3_NAME "ds_3_"
+#define DS_4_NAME "ds_4_"
+
+#define SCALE_1_NAME "scalename_1_"
+#define SCALE_2_NAME "scalename_2_"
+#define SCALE_3_NAME "scalename_3_"
+#define SCALE_4_NAME "scalename_4_"
+
+#define FILENAME "test_ds_"
+#define FILEEXT ".h5"
/*-------------------------------------------------------------------------
* the main program
*-------------------------------------------------------------------------
*/
-int main(int argc , char **argv)
+int
+main(int argc, char **argv)
{
- int nerrors=0;
+ int nerrors = 0;
char filename[65];
-
if (argc < 2) {
- printf("Usage: gen_test [le | be]\n");
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
- if ( argv[1] && (strcmp("le",argv[1])!=0) && (strcmp("be",argv[1])!=0) ) {
- printf("Usage: gen_test [le | be]\n");
+ if (argv[1] && (strcmp("le", argv[1]) != 0) && (strcmp("be", argv[1]) != 0)) {
+ HDprintf("Usage: gen_test [le | be]\n");
return 1;
}
@@ -92,26 +91,28 @@ int main(int argc , char **argv)
strcpy(filename, FILENAME);
strcat(filename, argv[1]);
strcat(filename, FILEEXT);
- if(H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT) < 0) {
+ if (H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT) < 0) {
nerrors = 1;
goto error;
}
- nerrors += test_long_attachscales(filename) < 0 ? 1 : 0;
- nerrors += test_duplicatelong_attachscales(filename) < 0 ? 1 : 0;
- nerrors += test_samelong_scalenames(filename) < 0 ? 1 : 0;
- nerrors += test_foreign_scaleattached(filename) < 0 ? 1 : 0;
- nerrors += test_long_scalenames(filename) < 0 ? 1 : 0;
-
- if(nerrors) goto error;
- printf("Dimension scales file generation passed.\n");
+ nerrors += test_long_attachscales(filename) < 0 ? 1 : 0;
+ nerrors += test_duplicatelong_attachscales(filename) < 0 ? 1 : 0;
+ nerrors += test_samelong_scalenames(filename) < 0 ? 1 : 0;
+ nerrors += test_foreign_scaleattached(filename) < 0 ? 1 : 0;
+ nerrors += test_long_scalenames(filename) < 0 ? 1 : 0;
+
+ if (nerrors)
+ goto error;
+ HDprintf("Dimension scales file generation passed.\n");
return 0;
error:
- printf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors);
+ HDprintf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n", nerrors);
return 1;
}
-static hid_t open_test_file(const char *fileext)
+static hid_t
+open_test_file(const char *fileext)
{
char filename[65];
@@ -127,191 +128,197 @@ static hid_t open_test_file(const char *fileext)
*-------------------------------------------------------------------------
*/
-herr_t create_long_dataset(hid_t fid, const char *name, const char *dsidx)
+herr_t
+create_long_dataset(hid_t fid, const char *name, const char *dsidx)
{
- int rank = 4;
- int rankds = 1;
- hsize_t dims[4] = {DIM1_SIZE,DIM2_SIZE,DIM3_SIZE,DIM4_SIZE};
- long buf[DIM_DATA*3*2] = {1,2,3,4,5,6,7,8,9,10,11,12,
- 1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,
- 1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,
- 1,2,3,4,5,6,7,8,9,10,11,12};
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- hsize_t s3_dim[1] = {DIM3_SIZE};
- hsize_t s4_dim[1] = {DIM4_SIZE};
- long s1_wbuf[DIM1_SIZE] = {10,20,30};
- long s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- long s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- long s4_wbuf[DIM4_SIZE] = {18,18};
+ int rank = 4;
+ int rankds = 1;
+ hsize_t dims[4] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE, DIM4_SIZE};
+ long buf[DIM_DATA * 3 * 2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ hsize_t s3_dim[1] = {DIM3_SIZE};
+ hsize_t s4_dim[1] = {DIM4_SIZE};
+ long s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ long s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ long s3_wbuf[DIM3_SIZE] = {10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40};
+ long s4_wbuf[DIM4_SIZE] = {18, 18};
/* make a dataset */
- if(H5LTmake_dataset_long(fid, name, rank, dims, buf) >= 0) {
+ if (H5LTmake_dataset_long(fid, name, rank, dims, buf) >= 0) {
/* make a DS dataset for the first dimension */
char dsname[32];
strcpy(dsname, DS_1_NAME);
strcat(dsname, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, dsname, rankds, s1_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, dsname, rankds, s1_dim, s1_wbuf) < 0)
return FAIL;
strcpy(dsname, DS_2_NAME);
strcat(dsname, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, dsname, rankds, s2_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, dsname, rankds, s2_dim, s2_wbuf) < 0)
return FAIL;
strcpy(dsname, DS_3_NAME);
strcat(dsname, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, dsname, rankds, s3_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, dsname, rankds, s3_dim, s3_wbuf) < 0)
return FAIL;
strcpy(dsname, DS_4_NAME);
strcat(dsname, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, dsname, rankds, s4_dim, s4_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, dsname, rankds, s4_dim, s4_wbuf) < 0)
return FAIL;
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
return SUCCEED;
}
-herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
+herr_t
+test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
-
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 0) {
- if(H5DSattach_scale(did, dsid, idx) >= 0) {
- if(H5DSis_attached(did, dsid, idx) > 0) {
- /* printf(" scale attached "); */
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
+
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 0) {
+ if (H5DSattach_scale(did, dsid, idx) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) > 0) {
+ /* HDprintf(" scale attached "); */
ret_value = SUCCEED;
}
- else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ else if (H5DSis_attached(did, dsid, idx) == 0) {
+ HDprintf(" scale not attached ");
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
+herr_t
+test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if(H5DSdetach_scale(did, dsid, idx) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 0) {
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if (H5DSdetach_scale(did, dsid, idx) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 0) {
ret_value = SUCCEED;
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
+herr_t
+test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if(H5DSset_scale(dsid, scalename) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- ret_value = SUCCEED;
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if (H5DSset_scale(dsid, scalename) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ ret_value = SUCCEED;
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
+herr_t
+test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
{
herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ hid_t dsid = -1;
ssize_t name_len;
- char *name_out=NULL;
-
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) > 0) {
- name_out = (char*)HDmalloc((size_t)name_len * sizeof (char));
- if(name_out != NULL) {
- if(H5DSget_scale_name(dsid, name_out, (size_t)name_len) >= 0) {
- if(strcmp(scalename,name_out)==0) {
+ char * name_out = NULL;
+
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) > 0) {
+ name_out = (char *)HDmalloc((size_t)name_len * sizeof(char));
+ if (name_out != NULL) {
+ if (H5DSget_scale_name(dsid, name_out, (size_t)name_len) >= 0) {
+ if (strcmp(scalename, name_out) == 0) {
ret_value = SUCCEED;
}
HDfree(name_out);
- name_out=NULL;
+ name_out = NULL;
}
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-static int test_long_attachscales(const char *filename)
+static int
+test_long_attachscales(const char *filename)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
strcpy(dsname, DATASET_NAME);
strcat(dsname, "al");
- TESTING2("test_long_attachscales");
+ HL_TESTING2("test_long_attachscales");
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto out;
/* make a dataset */
- if(create_long_dataset(fid, dsname, "al") < 0)
+ if (create_long_dataset(fid, dsname, "al") < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
strcpy(scalename, DS_1_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
strcpy(scalename, DS_2_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
strcpy(scalename, DS_3_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
strcpy(scalename, DS_4_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM3) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -323,56 +330,59 @@ static int test_long_attachscales(const char *filename)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_duplicatelong_attachscales(const char *filename)
+static int
+test_duplicatelong_attachscales(const char *filename)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
strcpy(dsname, DATASET_NAME);
strcat(dsname, "al2");
- TESTING2("test_duplicatelong_attachscales");
+ HL_TESTING2("test_duplicatelong_attachscales");
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto out;
/* make a dataset 2 */
- if(create_long_dataset(fid, dsname, "al2") < 0)
+ if (create_long_dataset(fid, dsname, "al2") < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
strcpy(scalename, DS_1_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
strcpy(scalename, DS_2_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
strcpy(scalename, DS_3_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
strcpy(scalename, DS_4_NAME);
strcat(scalename, "al");
- if(test_attach_scale(fid, did, scalename, DIM3) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -384,71 +394,75 @@ static int test_duplicatelong_attachscales(const char *filename)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_long_scalenames(const char *filename) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_long_scalenames(const char *filename)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
strcpy(dsname, DATASET_NAME);
strcat(dsname, "al");
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto out;
- TESTING2("set long scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set long scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
strcpy(scalename, DS_1_NAME);
strcat(scalename, "al");
strcpy(name, SCALE_1_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
strcpy(scalename, DS_2_NAME);
strcat(scalename, "al");
strcpy(name, SCALE_2_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
strcpy(scalename, DS_3_NAME);
strcat(scalename, "al");
strcpy(name, SCALE_3_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
strcpy(scalename, DS_4_NAME);
strcat(scalename, "al");
strcpy(name, SCALE_4_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -460,72 +474,76 @@ static int test_long_scalenames(const char *filename) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_samelong_scalenames(const char *filename) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_samelong_scalenames(const char *filename)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
strcpy(dsname, DATASET_NAME);
strcat(dsname, "al2");
- if((fid = open_test_file(filename)) < 0)
+ if ((fid = open_test_file(filename)) < 0)
goto out;
- TESTING2("set same long scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set same long scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
strcpy(scalename, DS_1_NAME);
strcat(scalename, "al");
strcpy(name, DS_1_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
strcpy(scalename, DS_2_NAME);
strcat(scalename, "al");
strcpy(name, DS_2_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
strcpy(scalename, DS_3_NAME);
strcat(scalename, "al");
strcpy(name, DS_3_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
strcpy(scalename, DS_4_NAME);
strcat(scalename, "al");
strcpy(name, DS_4_NAME);
strcat(name, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -537,43 +555,46 @@ static int test_samelong_scalenames(const char *filename) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_foreign_scaleattached(const char *filename)
+static int
+test_foreign_scaleattached(const char *filename)
{
- herr_t ret_value = FAIL;
- hid_t fid = -1;
- hid_t did = -1;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t fid = -1;
+ hid_t did = -1;
+ hid_t dsid = -1;
- TESTING2("test_foreign_scaleattached");
+ HL_TESTING2("test_foreign_scaleattached");
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
goto out;
- if((did = H5Dopen2(fid, "/dset_al", H5P_DEFAULT)) >= 0) {
- if((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, 3) == 1) {
+ if ((did = H5Dopen2(fid, "/dset_al", H5P_DEFAULT)) >= 0) {
+ if ((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, 3) == 1) {
ret_value = SUCCEED;
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
goto out;
- if(ret_value == FAIL)
+ if (ret_value == FAIL)
goto out;
PASSED();
@@ -582,10 +603,12 @@ static int test_foreign_scaleattached(const char *filename)
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h
index f368b8e..d286c00 100644
--- a/hl/test/h5hltest.h
+++ b/hl/test/h5hltest.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,13 +28,24 @@
#include "H5HLprivate2.h"
/* Macros used in HL tests */
-#define TESTING2(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
-#define TESTING3(WHAT) {printf("%-70s", "" WHAT); fflush(stdout);}
+#define HL_TESTING2(WHAT) \
+ { \
+ HDprintf("Testing %-62s", WHAT); \
+ HDfflush(stdout); \
+ }
+#define HL_TESTING3(WHAT) \
+ { \
+ HDprintf("Testing %-62s", WHAT); \
+ HDfflush(stdout); \
+ }
/* Implements verbose 'assert' with 'goto error' exit */
-#define VERIFY(condition, string) do { if (!(condition)) FAIL_PUTS_ERROR(string) } while(0)
+#define VERIFY(condition, string) \
+ do { \
+ if (!(condition)) \
+ FAIL_PUTS_ERROR(string) \
+ } while (0)
int test_packet_table_with_varlen(void);
#endif /* _H5HLTEST_H */
-
diff --git a/hl/test/pal_rgb.h b/hl/test/pal_rgb.h
index 4b22bea..a2b17e2 100644
--- a/hl/test/pal_rgb.h
+++ b/hl/test/pal_rgb.h
@@ -6,266 +6,268 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-const unsigned char pal_rgb[256*3] = {255,255,255,
-0,0,131,
-0,0,135,
-0,0,139,
-0,0,143,
-0,0,147,
-0,0,151,
-0,0,155,
-0,0,159,
-0,0,163,
-0,0,167,
-0,0,171,
-0,0,175,
-0,0,179,
-0,0,183,
-0,0,187,
-0,0,191,
-0,0,195,
-0,0,199,
-0,0,203,
-0,0,207,
-0,0,211,
-0,0,215,
-0,0,219,
-0,0,223,
-0,0,227,
-0,0,231,
-0,0,235,
-0,0,239,
-0,0,243,
-0,0,247,
-0,0,251,
-0,0,255,
-0,0,255,
-0,3,255,
-0,7,255,
-0,11,255,
-0,15,255,
-0,19,255,
-0,23,255,
-0,27,255,
-0,31,255,
-0,35,255,
-0,39,255,
-0,43,255,
-0,47,255,
-0,51,255,
-0,55,255,
-0,59,255,
-0,63,255,
-0,67,255,
-0,71,255,
-0,75,255,
-0,79,255,
-0,83,255,
-0,87,255,
-0,91,255,
-0,95,255,
-0,99,255,
-0,103,255,
-0,107,255,
-0,111,255,
-0,115,255,
-0,119,255,
-0,123,255,
-0,127,255,
-0,131,255,
-0,135,255,
-0,139,255,
-0,143,255,
-0,147,255,
-0,151,255,
-0,155,255,
-0,159,255,
-0,163,255,
-0,167,255,
-0,171,255,
-0,175,255,
-0,179,255,
-0,183,255,
-0,187,255,
-0,191,255,
-0,195,255,
-0,199,255,
-0,203,255,
-0,207,255,
-0,211,255,
-0,215,255,
-0,219,255,
-0,223,255,
-0,227,255,
-0,231,255,
-0,235,255,
-0,239,255,
-0,243,255,
-0,247,255,
-0,251,255,
-0,255,255,
-0,255,255,
-3,255,251,
-7,255,247,
-11,255,243,
-15,255,239,
-19,255,235,
-23,255,231,
-27,255,227,
-31,255,223,
-35,255,219,
-39,255,215,
-43,255,211,
-47,255,207,
-51,255,203,
-55,255,199,
-59,255,195,
-63,255,191,
-67,255,187,
-71,255,183,
-75,255,179,
-79,255,175,
-83,255,171,
-87,255,167,
-91,255,163,
-95,255,159,
-99,255,155,
-103,255,151,
-107,255,147,
-111,255,143,
-115,255,139,
-119,255,135,
-123,255,131,
-127,255,127,
-131,255,123,
-135,255,119,
-139,255,115,
-143,255,111,
-147,255,107,
-151,255,103,
-155,255,99,
-159,255,95,
-163,255,91,
-167,255,87,
-171,255,83,
-175,255,79,
-179,255,75,
-183,255,71,
-187,255,67,
-191,255,63,
-195,255,59,
-199,255,55,
-203,255,51,
-207,255,47,
-211,255,43,
-215,255,39,
-219,255,35,
-223,255,31,
-227,255,27,
-231,255,23,
-235,255,19,
-239,255,15,
-243,255,11,
-247,255,7,
-251,255,3,
-255,255,0,
-255,251,0,
-255,247,0,
-255,243,0,
-255,239,0,
-255,235,0,
-255,231,0,
-255,227,0,
-255,223,0,
-255,219,0,
-255,215,0,
-255,211,0,
-255,207,0,
-255,203,0,
-255,199,0,
-255,195,0,
-255,191,0,
-255,187,0,
-255,183,0,
-255,179,0,
-255,175,0,
-255,171,0,
-255,167,0,
-255,163,0,
-255,159,0,
-255,155,0,
-255,151,0,
-255,147,0,
-255,143,0,
-255,139,0,
-255,135,0,
-255,131,0,
-255,127,0,
-255,123,0,
-255,119,0,
-255,115,0,
-255,111,0,
-255,107,0,
-255,103,0,
-255,99,0,
-255,95,0,
-255,91,0,
-255,87,0,
-255,83,0,
-255,79,0,
-255,75,0,
-255,71,0,
-255,67,0,
-255,63,0,
-255,59,0,
-255,55,0,
-255,51,0,
-255,47,0,
-255,43,0,
-255,39,0,
-255,35,0,
-255,31,0,
-255,27,0,
-255,23,0,
-255,19,0,
-255,15,0,
-255,11,0,
-255,7,0,
-255,3,0,
-255,0,0,
-250,0,0,
-246,0,0,
-241,0,0,
-237,0,0,
-233,0,0,
-228,0,0,
-224,0,0,
-219,0,0,
-215,0,0,
-211,0,0,
-206,0,0,
-202,0,0,
-197,0,0,
-193,0,0,
-189,0,0,
-184,0,0,
-180,0,0,
-175,0,0,
-171,0,0,
-167,0,0,
-162,0,0,
-158,0,0,
-153,0,0,
-149,0,0,
-145,0,0,
-140,0,0,
-136,0,0,
-131,0,0,
-127,0,0
+/* clang-format off */
+const unsigned char pal_rgb[256*3] = {
+ 255,255,255,
+ 0,0,131,
+ 0,0,135,
+ 0,0,139,
+ 0,0,143,
+ 0,0,147,
+ 0,0,151,
+ 0,0,155,
+ 0,0,159,
+ 0,0,163,
+ 0,0,167,
+ 0,0,171,
+ 0,0,175,
+ 0,0,179,
+ 0,0,183,
+ 0,0,187,
+ 0,0,191,
+ 0,0,195,
+ 0,0,199,
+ 0,0,203,
+ 0,0,207,
+ 0,0,211,
+ 0,0,215,
+ 0,0,219,
+ 0,0,223,
+ 0,0,227,
+ 0,0,231,
+ 0,0,235,
+ 0,0,239,
+ 0,0,243,
+ 0,0,247,
+ 0,0,251,
+ 0,0,255,
+ 0,0,255,
+ 0,3,255,
+ 0,7,255,
+ 0,11,255,
+ 0,15,255,
+ 0,19,255,
+ 0,23,255,
+ 0,27,255,
+ 0,31,255,
+ 0,35,255,
+ 0,39,255,
+ 0,43,255,
+ 0,47,255,
+ 0,51,255,
+ 0,55,255,
+ 0,59,255,
+ 0,63,255,
+ 0,67,255,
+ 0,71,255,
+ 0,75,255,
+ 0,79,255,
+ 0,83,255,
+ 0,87,255,
+ 0,91,255,
+ 0,95,255,
+ 0,99,255,
+ 0,103,255,
+ 0,107,255,
+ 0,111,255,
+ 0,115,255,
+ 0,119,255,
+ 0,123,255,
+ 0,127,255,
+ 0,131,255,
+ 0,135,255,
+ 0,139,255,
+ 0,143,255,
+ 0,147,255,
+ 0,151,255,
+ 0,155,255,
+ 0,159,255,
+ 0,163,255,
+ 0,167,255,
+ 0,171,255,
+ 0,175,255,
+ 0,179,255,
+ 0,183,255,
+ 0,187,255,
+ 0,191,255,
+ 0,195,255,
+ 0,199,255,
+ 0,203,255,
+ 0,207,255,
+ 0,211,255,
+ 0,215,255,
+ 0,219,255,
+ 0,223,255,
+ 0,227,255,
+ 0,231,255,
+ 0,235,255,
+ 0,239,255,
+ 0,243,255,
+ 0,247,255,
+ 0,251,255,
+ 0,255,255,
+ 0,255,255,
+ 3,255,251,
+ 7,255,247,
+ 11,255,243,
+ 15,255,239,
+ 19,255,235,
+ 23,255,231,
+ 27,255,227,
+ 31,255,223,
+ 35,255,219,
+ 39,255,215,
+ 43,255,211,
+ 47,255,207,
+ 51,255,203,
+ 55,255,199,
+ 59,255,195,
+ 63,255,191,
+ 67,255,187,
+ 71,255,183,
+ 75,255,179,
+ 79,255,175,
+ 83,255,171,
+ 87,255,167,
+ 91,255,163,
+ 95,255,159,
+ 99,255,155,
+ 103,255,151,
+ 107,255,147,
+ 111,255,143,
+ 115,255,139,
+ 119,255,135,
+ 123,255,131,
+ 127,255,127,
+ 131,255,123,
+ 135,255,119,
+ 139,255,115,
+ 143,255,111,
+ 147,255,107,
+ 151,255,103,
+ 155,255,99,
+ 159,255,95,
+ 163,255,91,
+ 167,255,87,
+ 171,255,83,
+ 175,255,79,
+ 179,255,75,
+ 183,255,71,
+ 187,255,67,
+ 191,255,63,
+ 195,255,59,
+ 199,255,55,
+ 203,255,51,
+ 207,255,47,
+ 211,255,43,
+ 215,255,39,
+ 219,255,35,
+ 223,255,31,
+ 227,255,27,
+ 231,255,23,
+ 235,255,19,
+ 239,255,15,
+ 243,255,11,
+ 247,255,7,
+ 251,255,3,
+ 255,255,0,
+ 255,251,0,
+ 255,247,0,
+ 255,243,0,
+ 255,239,0,
+ 255,235,0,
+ 255,231,0,
+ 255,227,0,
+ 255,223,0,
+ 255,219,0,
+ 255,215,0,
+ 255,211,0,
+ 255,207,0,
+ 255,203,0,
+ 255,199,0,
+ 255,195,0,
+ 255,191,0,
+ 255,187,0,
+ 255,183,0,
+ 255,179,0,
+ 255,175,0,
+ 255,171,0,
+ 255,167,0,
+ 255,163,0,
+ 255,159,0,
+ 255,155,0,
+ 255,151,0,
+ 255,147,0,
+ 255,143,0,
+ 255,139,0,
+ 255,135,0,
+ 255,131,0,
+ 255,127,0,
+ 255,123,0,
+ 255,119,0,
+ 255,115,0,
+ 255,111,0,
+ 255,107,0,
+ 255,103,0,
+ 255,99,0,
+ 255,95,0,
+ 255,91,0,
+ 255,87,0,
+ 255,83,0,
+ 255,79,0,
+ 255,75,0,
+ 255,71,0,
+ 255,67,0,
+ 255,63,0,
+ 255,59,0,
+ 255,55,0,
+ 255,51,0,
+ 255,47,0,
+ 255,43,0,
+ 255,39,0,
+ 255,35,0,
+ 255,31,0,
+ 255,27,0,
+ 255,23,0,
+ 255,19,0,
+ 255,15,0,
+ 255,11,0,
+ 255,7,0,
+ 255,3,0,
+ 255,0,0,
+ 250,0,0,
+ 246,0,0,
+ 241,0,0,
+ 237,0,0,
+ 233,0,0,
+ 228,0,0,
+ 224,0,0,
+ 219,0,0,
+ 215,0,0,
+ 211,0,0,
+ 206,0,0,
+ 202,0,0,
+ 197,0,0,
+ 193,0,0,
+ 189,0,0,
+ 184,0,0,
+ 180,0,0,
+ 175,0,0,
+ 171,0,0,
+ 167,0,0,
+ 162,0,0,
+ 158,0,0,
+ 153,0,0,
+ 149,0,0,
+ 145,0,0,
+ 140,0,0,
+ 136,0,0,
+ 131,0,0,
+ 127,0,0
};
-
+/* clang-format on */
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 5560f03..a2568cd 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,27 +29,43 @@ static herr_t op_stop(hid_t did, unsigned dim, hid_t dsid, void *visitor_data);
/* prototypes */
static hid_t create_test_file(const char *fileext);
static hid_t open_test_file(const char *fileext);
-herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims);
-herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims);
-herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims);
-herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims);
-herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims);
-herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf);
-herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf);
-herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf);
-herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf);
-herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf);
-herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf);
-herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf);
-herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf);
-herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf);
-herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf);
-herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf);
-herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf);
-herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf);
-herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf);
-herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf);
-herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf);
+herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims);
+herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims);
+herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims);
+herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims);
+herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims);
+herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf);
+herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf, char *s2_wbuf);
+herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf, char *s2_wbuf, char *s3_wbuf);
+herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf);
+herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf, short *s2_wbuf);
+herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf, short *s2_wbuf, short *s3_wbuf);
+herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf,
+ int *s1_wbuf);
+herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf,
+ int *s1_wbuf, int *s2_wbuf);
+herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf,
+ int *s1_wbuf, int *s2_wbuf, int *s3_wbuf);
+herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf);
+herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf);
+herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf, long *s3_wbuf);
+herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf);
+herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf);
+herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf, float *s2_wbuf);
+herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf, float *s2_wbuf, float *s3_wbuf);
herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx);
herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx);
@@ -78,64 +94,64 @@ static int test_rank(void);
static int test_types(void);
static int test_iterators(void);
static int test_data(void);
-static int read_data( const char* fname, int ndims, hsize_t *dims, float **buf );
+static int read_data(const char *fname, int ndims, hsize_t *dims, float **buf);
static int test_attach_detach(void);
-#define RANK1 1
-#define RANK 2
-#define DIM_DATA 12
-#define DIM1_SIZE 3
-#define DIM2_SIZE 4
-#define DIM3_SIZE 12
-#define DIM4_SIZE 2
-#define DIM0 0
-#define DIM1 1
-#define DIM2 2
-#define DIM3 3
-
-#define DATASET_NAME "dset_"
-#define DS_1_NAME "ds_1_"
-#define DS_11_NAME "ds_11_"
-#define DS_2_NAME "ds_2_"
-#define DS_21_NAME "ds_21_"
-#define DS_22_NAME "ds_22_"
-#define DS_3_NAME "ds_3_"
-#define DS_31_NAME "ds_31_"
-#define DS_32_NAME "ds_32_"
-#define DS_33_NAME "ds_33_"
-#define DS_4_NAME "ds_4_"
-#define DS_41_NAME "ds_41_"
-#define DS_42_NAME "ds_42_"
-#define DS_43_NAME "ds_43_"
-#define DS_44_NAME "ds_44_"
-
-#define SCALE_1_NAME "scalename_1_"
-#define SCALE_11_NAME "scalename_11_"
-#define SCALE_2_NAME "scalename_2_"
-#define SCALE_21_NAME "scalename_21_"
-#define SCALE_22_NAME "scalename_22_"
-#define SCALE_3_NAME "scalename_3_"
-#define SCALE_31_NAME "scalename_31_"
-#define SCALE_32_NAME "scalename_32_"
-#define SCALE_33_NAME "scalename_33_"
-#define SCALE_4_NAME "scalename_4_"
-
-#define DIM0_LABEL "Latitude"
-#define DIM1_LABEL "Longitude"
-
-#define FOREIGN_FILE1 "test_ds_le.h5"
-#define FOREIGN_FILE2 "test_ds_be.h5"
-#define FILENAME "test_ds"
-#define FILEEXT ".h5"
-
-#define FILE1 "test_ds3.h5"
-#define FILE2 "test_ds4.h5"
-#define FILE3 "test_ds5.h5"
-#define FILE4 "test_ds6.h5"
-#define FILE5 "test_ds7.h5"
-#define FILE6 "test_ds8.h5"
-#define FILE7 "test_ds9.h5"
-#define FILE8 "test_ds10.h5"
+#define RANK1 1
+#define RANK 2
+#define DIM_DATA 12
+#define DIM1_SIZE 3
+#define DIM2_SIZE 4
+#define DIM3_SIZE 12
+#define DIM4_SIZE 2
+#define DIM0 0
+#define DIM1 1
+#define DIM2 2
+#define DIM3 3
+
+#define DATASET_NAME "dset_"
+#define DS_1_NAME "ds_1_"
+#define DS_11_NAME "ds_11_"
+#define DS_2_NAME "ds_2_"
+#define DS_21_NAME "ds_21_"
+#define DS_22_NAME "ds_22_"
+#define DS_3_NAME "ds_3_"
+#define DS_31_NAME "ds_31_"
+#define DS_32_NAME "ds_32_"
+#define DS_33_NAME "ds_33_"
+#define DS_4_NAME "ds_4_"
+#define DS_41_NAME "ds_41_"
+#define DS_42_NAME "ds_42_"
+#define DS_43_NAME "ds_43_"
+#define DS_44_NAME "ds_44_"
+
+#define SCALE_1_NAME "scalename_1_"
+#define SCALE_11_NAME "scalename_11_"
+#define SCALE_2_NAME "scalename_2_"
+#define SCALE_21_NAME "scalename_21_"
+#define SCALE_22_NAME "scalename_22_"
+#define SCALE_3_NAME "scalename_3_"
+#define SCALE_31_NAME "scalename_31_"
+#define SCALE_32_NAME "scalename_32_"
+#define SCALE_33_NAME "scalename_33_"
+#define SCALE_4_NAME "scalename_4_"
+
+#define DIM0_LABEL "Latitude"
+#define DIM1_LABEL "Longitude"
+
+#define FOREIGN_FILE1 "test_ds_le.h5"
+#define FOREIGN_FILE2 "test_ds_be.h5"
+#define FILENAME "test_ds"
+#define FILEEXT ".h5"
+
+#define FILE1 "test_ds3.h5"
+#define FILE2 "test_ds4.h5"
+#define FILE3 "test_ds5.h5"
+#define FILE4 "test_ds6.h5"
+#define FILE5 "test_ds7.h5"
+#define FILE6 "test_ds8.h5"
+#define FILE7 "test_ds9.h5"
+#define FILE8 "test_ds10.h5"
#define DIMENSION_LIST "DIMENSION_LIST"
#define REFERENCE_LIST "REFERENCE_LIST"
@@ -144,57 +160,57 @@ static int test_attach_detach(void);
* the main program
*-------------------------------------------------------------------------
*/
-int main(void)
+int
+main(void)
{
- int nerrors=0;
+ int nerrors = 0;
/* create file to be used in following tests */
- if(create_test_file("1") < 0) {
+ if (create_test_file("1") < 0) {
nerrors = 1;
goto error;
}
- nerrors += test_char_attachscales("1") < 0 ? 1 : 0;
- nerrors += test_short_attachscales("1") < 0 ? 1 : 0;
- nerrors += test_int_attachscales("1") < 0 ? 1 : 0;
- nerrors += test_long_attachscales("1") < 0 ? 1 : 0;
- nerrors += test_float_attachscales("1") < 0 ? 1 : 0;
- nerrors += test_char_scalenames("1") < 0 ? 1 : 0;
- nerrors += test_short_scalenames("1") < 0 ? 1 : 0;
- nerrors += test_int_scalenames("1") < 0 ? 1 : 0;
- nerrors += test_long_scalenames("1") < 0 ? 1 : 0;
- nerrors += test_float_scalenames("1") < 0 ? 1 : 0;
- nerrors += test_numberofscales("1") < 0 ? 1 : 0;
- if(create_test_file("2") < 0) {
+ nerrors += test_char_attachscales("1") < 0 ? 1 : 0;
+ nerrors += test_short_attachscales("1") < 0 ? 1 : 0;
+ nerrors += test_int_attachscales("1") < 0 ? 1 : 0;
+ nerrors += test_long_attachscales("1") < 0 ? 1 : 0;
+ nerrors += test_float_attachscales("1") < 0 ? 1 : 0;
+ nerrors += test_char_scalenames("1") < 0 ? 1 : 0;
+ nerrors += test_short_scalenames("1") < 0 ? 1 : 0;
+ nerrors += test_int_scalenames("1") < 0 ? 1 : 0;
+ nerrors += test_long_scalenames("1") < 0 ? 1 : 0;
+ nerrors += test_float_scalenames("1") < 0 ? 1 : 0;
+ nerrors += test_numberofscales("1") < 0 ? 1 : 0;
+ if (create_test_file("2") < 0) {
nerrors = 1;
goto error;
}
- nerrors += test_long_attachscales("2") < 0 ? 1 : 0;
- nerrors += test_duplicatelong_attachscales("2") < 0 ? 1 : 0;
- nerrors += test_samelong_scalenames("2") < 0 ? 1 : 0;
- nerrors += test_foreign_scaleattached(FOREIGN_FILE1) < 0 ? 1 : 0;
- nerrors += test_foreign_scaleattached(FOREIGN_FILE2) < 0 ? 1 : 0;
- nerrors += test_detachscales() < 0 ? 1 : 0;
- nerrors += test_attach_detach() < 0 ? 1 : 0;
-/* the following tests have not been rewritten to match those above */
- nerrors += test_simple() < 0 ?1:0;
- nerrors += test_errors() < 0 ?1:0;
- nerrors += test_errors2() < 0 ?1:0;
- nerrors += test_rank() < 0 ?1:0;
- nerrors += test_iterators() < 0 ?1:0;
- nerrors += test_types() < 0 ?1:0;
- nerrors += test_data() < 0 ?1:0;
-
-
- if(nerrors) goto error;
- printf("All dimension scales tests passed.\n");
+ nerrors += test_long_attachscales("2") < 0 ? 1 : 0;
+ nerrors += test_duplicatelong_attachscales("2") < 0 ? 1 : 0;
+ nerrors += test_samelong_scalenames("2") < 0 ? 1 : 0;
+ nerrors += test_foreign_scaleattached(FOREIGN_FILE1) < 0 ? 1 : 0;
+ nerrors += test_foreign_scaleattached(FOREIGN_FILE2) < 0 ? 1 : 0;
+ nerrors += test_detachscales() < 0 ? 1 : 0;
+ nerrors += test_attach_detach() < 0 ? 1 : 0;
+ /* the following tests have not been rewritten to match those above */
+ nerrors += test_simple() < 0 ? 1 : 0;
+ nerrors += test_errors() < 0 ? 1 : 0;
+ nerrors += test_errors2() < 0 ? 1 : 0;
+ nerrors += test_rank() < 0 ? 1 : 0;
+ nerrors += test_iterators() < 0 ? 1 : 0;
+ nerrors += test_types() < 0 ? 1 : 0;
+ nerrors += test_data() < 0 ? 1 : 0;
+
+ if (nerrors)
+ goto error;
+ HDprintf("All dimension scales tests passed.\n");
return 0;
error:
- printf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
-
/*-------------------------------------------------------------------------
* DS API test
*
@@ -213,7 +229,8 @@ error:
*-------------------------------------------------------------------------
*/
-static hid_t create_test_file(const char *fileext)
+static hid_t
+create_test_file(const char *fileext)
{
char filename[65];
@@ -222,7 +239,8 @@ static hid_t create_test_file(const char *fileext)
return H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
-static hid_t open_test_file(const char *fileext)
+static hid_t
+open_test_file(const char *fileext)
{
char filename[65];
@@ -235,254 +253,270 @@ static hid_t open_test_file(const char *fileext)
* create "data" dataset
*-------------------------------------------------------------------------
*/
-herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims)
+herr_t
+create_char_dataset(hid_t fid, const char *dsidx, int fulldims)
{
- int rank = 3;
- int rankds = 1;
- hsize_t dims[3] = {DIM1_SIZE,DIM2_SIZE,DIM3_SIZE};
- char buf[DIM1_SIZE*DIM2_SIZE*DIM3_SIZE];
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- hsize_t s3_dim[1] = {DIM3_SIZE};
- char s1_wbuf[DIM1_SIZE] = {1,2,3};
- char s11_wbuf[DIM1_SIZE] = {10,20,30};
- char s2_wbuf[DIM2_SIZE] = {10,20,30,40};
- char s21_wbuf[DIM2_SIZE] = {1,2,3,4};
- char s22_wbuf[DIM2_SIZE] = {5,10,50,100};
- char s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- char s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
- char s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
- char s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,120,120,120};
+ int rank = 3;
+ int rankds = 1;
+ hsize_t dims[3] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE};
+ char buf[DIM1_SIZE * DIM2_SIZE * DIM3_SIZE];
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ hsize_t s3_dim[1] = {DIM3_SIZE};
+ char s1_wbuf[DIM1_SIZE] = {1, 2, 3};
+ char s11_wbuf[DIM1_SIZE] = {10, 20, 30};
+ char s2_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ char s21_wbuf[DIM2_SIZE] = {1, 2, 3, 4};
+ char s22_wbuf[DIM2_SIZE] = {5, 10, 50, 100};
+ char s3_wbuf[DIM3_SIZE] = {10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40};
+ char s31_wbuf[DIM3_SIZE] = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4};
+ char s32_wbuf[DIM3_SIZE] = {5, 5, 5, 10, 10, 10, 50, 50, 50, 100, 100, 100};
+ char s33_wbuf[DIM3_SIZE] = {6, 6, 6, 12, 12, 12, 53, 53, 53, 120, 120, 120};
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
- if(H5LTmake_dataset_char(fid, name, rank, dims, buf) >= 0) {
- if(fulldims==0) {
+ if (H5LTmake_dataset_char(fid, name, rank, dims, buf) >= 0) {
+ if (fulldims == 0) {
/* make a DS dataset for the first dimension */
- if(create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
- return FAIL;
+ if (create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the second dimension */
- if(create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the third dimension */
- if(create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
+ return FAIL;
}
else {
- if(create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
- return FAIL;
+ if (create_DS1_char_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
+ return FAIL;
- if(create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
- return FAIL;
+ if (create_DS2_char_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
+ return FAIL;
- if(create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0)
- return FAIL;
+ if (create_DS3_char_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) <
+ 0)
+ return FAIL;
}
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
return SUCCEED;
}
-herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims)
+herr_t
+create_short_dataset(hid_t fid, const char *dsidx, int fulldims)
{
- int rank = 3;
- int rankds = 1;
- hsize_t dims[3] = {DIM1_SIZE,DIM2_SIZE,DIM3_SIZE};
- short buf[DIM1_SIZE*DIM2_SIZE*DIM3_SIZE];
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- hsize_t s3_dim[1] = {DIM3_SIZE};
- short s1_wbuf[DIM1_SIZE] = {10,20,30};
- short s11_wbuf[DIM1_SIZE] = {10,100,300};
- short s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- short s21_wbuf[DIM2_SIZE] = {10,20,30,40};
- short s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- short s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- short s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
- short s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
- short s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
+ int rank = 3;
+ int rankds = 1;
+ hsize_t dims[3] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE};
+ short buf[DIM1_SIZE * DIM2_SIZE * DIM3_SIZE];
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ hsize_t s3_dim[1] = {DIM3_SIZE};
+ short s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ short s11_wbuf[DIM1_SIZE] = {10, 100, 300};
+ short s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ short s21_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ short s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
+ short s3_wbuf[DIM3_SIZE] = {10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40};
+ short s31_wbuf[DIM3_SIZE] = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4};
+ short s32_wbuf[DIM3_SIZE] = {5, 5, 5, 10, 10, 10, 50, 50, 50, 100, 100, 100};
+ short s33_wbuf[DIM3_SIZE] = {6, 6, 6, 12, 12, 12, 53, 53, 53, 140, 140, 140};
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
- if(H5LTmake_dataset_short(fid, name, rank, dims, buf) >= 0) {
- if(fulldims==0) {
+ if (H5LTmake_dataset_short(fid, name, rank, dims, buf) >= 0) {
+ if (fulldims == 0) {
/* make a DS dataset for the first dimension */
- if(create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
- return FAIL;
+ if (create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the second dimension */
- if(create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the third dimension */
- if(create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
+ return FAIL;
}
else {
- if(create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
- return FAIL;
+ if (create_DS1_short_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
+ return FAIL;
- if(create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
- return FAIL;
+ if (create_DS2_short_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
+ return FAIL;
- if(create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0)
- return FAIL;
+ if (create_DS3_short_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) <
+ 0)
+ return FAIL;
}
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
return SUCCEED;
}
-herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims)
+herr_t
+create_int_dataset(hid_t fid, const char *dsidx, int fulldims)
{
- int rank = RANK;
- int rankds = 1;
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE};
- int buf[DIM1_SIZE*DIM2_SIZE];
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- int s1_wbuf[DIM1_SIZE] = {10,20,30};
- int s11_wbuf[DIM1_SIZE] = {10,100,300};
- int s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- int s21_wbuf[DIM2_SIZE] = {10,20,30,40};
- int s22_wbuf[DIM2_SIZE] = {5,10,50,300};
+ int rank = RANK;
+ int rankds = 1;
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE};
+ int buf[DIM1_SIZE * DIM2_SIZE];
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ int s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ int s11_wbuf[DIM1_SIZE] = {10, 100, 300};
+ int s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ int s21_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ int s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
- if(H5LTmake_dataset_int(fid, name, rank, dims, buf) >= 0) {
- if(fulldims==0) {
+ if (H5LTmake_dataset_int(fid, name, rank, dims, buf) >= 0) {
+ if (fulldims == 0) {
/* make a DS dataset for the first dimension */
- if(create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
- return FAIL;
+ if (create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the second dimension */
- if(create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
+ return FAIL;
}
else {
- if(create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
- return FAIL;
+ if (create_DS1_int_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
+ return FAIL;
- if(create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
- return FAIL;
+ if (create_DS2_int_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
+ return FAIL;
}
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
return SUCCEED;
}
-herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims)
+herr_t
+create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims)
{
- int rank = 4;
- int rankds = 1;
- hsize_t dims[4] = {DIM1_SIZE,DIM2_SIZE,DIM3_SIZE,DIM4_SIZE};
- long buf[DIM1_SIZE*DIM2_SIZE*DIM3_SIZE*DIM4_SIZE];
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- hsize_t s3_dim[1] = {DIM3_SIZE};
- hsize_t s4_dim[1] = {DIM4_SIZE};
- long s1_wbuf[DIM1_SIZE] = {10,20,30};
- long s11_wbuf[DIM1_SIZE] = {10,100,300};
- long s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- long s21_wbuf[DIM2_SIZE] = {10,20,30,40};
- long s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- long s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- long s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
- long s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
- long s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
- long s4_wbuf[DIM4_SIZE] = {18,18};
- long s41_wbuf[DIM4_SIZE] = {8,8};
- long s42_wbuf[DIM4_SIZE] = {80,80};
- long s43_wbuf[DIM4_SIZE] = {180,180};
- long s44_wbuf[DIM4_SIZE] = {280,280};
+ int rank = 4;
+ int rankds = 1;
+ hsize_t dims[4] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE, DIM4_SIZE};
+ long * buf;
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ hsize_t s3_dim[1] = {DIM3_SIZE};
+ hsize_t s4_dim[1] = {DIM4_SIZE};
+ long s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ long s11_wbuf[DIM1_SIZE] = {10, 100, 300};
+ long s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ long s21_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ long s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
+ long s3_wbuf[DIM3_SIZE] = {10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40};
+ long s31_wbuf[DIM3_SIZE] = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4};
+ long s32_wbuf[DIM3_SIZE] = {5, 5, 5, 10, 10, 10, 50, 50, 50, 100, 100, 100};
+ long s33_wbuf[DIM3_SIZE] = {6, 6, 6, 12, 12, 12, 53, 53, 53, 140, 140, 140};
+ long s4_wbuf[DIM4_SIZE] = {18, 18};
+ long s41_wbuf[DIM4_SIZE] = {8, 8};
+ long s42_wbuf[DIM4_SIZE] = {80, 80};
+ long s43_wbuf[DIM4_SIZE] = {180, 180};
+ long s44_wbuf[DIM4_SIZE] = {280, 280};
+
+ /* Allocate buffer */
+ if (NULL == (buf = (long *)HDmalloc(sizeof(long) * DIM1_SIZE * DIM2_SIZE * DIM3_SIZE * DIM4_SIZE)))
+ return FAIL;
/* make a dataset */
- if(H5LTmake_dataset_long(fid, dsname, rank, dims, buf) >= 0) {
- if(fulldims==0) {
+ if (H5LTmake_dataset_long(fid, dsname, rank, dims, buf) >= 0) {
+ if (fulldims == 0) {
/* make a DS dataset for the first dimension */
- if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
- return FAIL;
+ if (create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the second dimension */
- if(create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the third dimension */
- if(create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, NULL, NULL, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the fourth dimension */
- if(create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, NULL, NULL, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, NULL, NULL, NULL, NULL) < 0)
+ return FAIL;
}
else {
- if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
- return FAIL;
+ if (create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
+ return FAIL;
- if(create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
- return FAIL;
+ if (create_DS2_long_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
+ return FAIL;
- if(create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) < 0)
- return FAIL;
+ if (create_DS3_long_datasets(fid, dsidx, rankds, s3_dim, s3_wbuf, s31_wbuf, s32_wbuf, s33_wbuf) <
+ 0)
+ return FAIL;
- if(create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, s41_wbuf, s42_wbuf, s43_wbuf, s44_wbuf) < 0)
- return FAIL;
+ if (create_DS4_long_datasets(fid, dsidx, rankds, s4_dim, s4_wbuf, s41_wbuf, s42_wbuf, s43_wbuf,
+ s44_wbuf) < 0)
+ return FAIL;
}
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
+
+ HDfree(buf);
+
return SUCCEED;
}
-herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
+herr_t
+create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
{
- int rank = RANK;
- int rankds = 1;
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE};
- float buf[DIM1_SIZE*DIM2_SIZE];
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- float s1_wbuf[DIM1_SIZE] = {10,20,30};
- float s11_wbuf[DIM1_SIZE] = {10,100,300};
- float s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- float s21_wbuf[DIM2_SIZE] = {10,20,30,40};
- float s22_wbuf[DIM2_SIZE] = {5,10,50,300};
+ int rank = RANK;
+ int rankds = 1;
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE};
+ float buf[DIM1_SIZE * DIM2_SIZE];
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ float s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ float s11_wbuf[DIM1_SIZE] = {10, 100, 300};
+ float s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ float s21_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ float s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
- if(H5LTmake_dataset_float(fid, name, rank, dims, buf) >= 0) {
- if(fulldims==0) {
+ if (H5LTmake_dataset_float(fid, name, rank, dims, buf) >= 0) {
+ if (fulldims == 0) {
/* make a DS dataset for the first dimension */
- if(create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
- return FAIL;
+ if (create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
+ return FAIL;
/* make a DS dataset for the second dimension */
- if(create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
- return FAIL;
+ if (create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, NULL, NULL) < 0)
+ return FAIL;
}
else {
- if(create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
- return FAIL;
+ if (create_DS1_float_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, s11_wbuf) < 0)
+ return FAIL;
- if(create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
- return FAIL;
+ if (create_DS2_float_datasets(fid, dsidx, rankds, s2_dim, s2_wbuf, s21_wbuf, s22_wbuf) < 0)
+ return FAIL;
}
- }
- else
- return FAIL;
+ }
+ else
+ return FAIL;
return SUCCEED;
}
@@ -490,21 +524,23 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
* create 2 dimension scales datasets for first dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf)
+herr_t
+create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
@@ -515,29 +551,31 @@ herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 3 dimension scales datasets for second dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf)
+herr_t
+create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf, char *s2_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
@@ -548,37 +586,39 @@ herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 1 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf)
+herr_t
+create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf,
+ char *s1_wbuf, char *s2_wbuf, char *s3_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
@@ -589,21 +629,23 @@ herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 2 dimension scales datasets for first dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf)
+herr_t
+create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
@@ -614,29 +656,31 @@ herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
* create 3 dimension scales datasets for second dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf)
+herr_t
+create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf, short *s2_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
@@ -647,37 +691,39 @@ herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
* create 1 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf)
+herr_t
+create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf,
+ short *s1_wbuf, short *s2_wbuf, short *s3_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
@@ -688,21 +734,22 @@ herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
* create 2 dimension scales datasets for first dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf)
+herr_t
+create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
@@ -713,29 +760,31 @@ herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
* create 3 dimension scales datasets for second dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf)
+herr_t
+create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf,
+ int *s2_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
@@ -746,37 +795,39 @@ herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
* create 1 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf)
+herr_t
+create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf,
+ int *s2_wbuf, int *s3_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
@@ -787,21 +838,23 @@ herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
* create 2 dimension scales datasets for first dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf)
+herr_t
+create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
@@ -812,29 +865,31 @@ herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 3 dimension scales datasets for second dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf)
+herr_t
+create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
@@ -845,37 +900,39 @@ herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 3 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf)
+herr_t
+create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf, long *s3_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
@@ -886,45 +943,47 @@ herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 4 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf)
+herr_t
+create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf,
+ long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_41_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_42_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_43_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
- if(s4_wbuf != NULL) {
+ if (s4_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_44_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s4_wbuf) < 0)
+ if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s4_wbuf) < 0)
return FAIL;
}
@@ -935,21 +994,23 @@ herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
* create 2 dimension scales datasets for first dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf)
+herr_t
+create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
@@ -960,29 +1021,31 @@ herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
* create 3 dimension scales datasets for second dimension
*-------------------------------------------------------------------------
*/
-herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf)
+herr_t
+create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf, float *s2_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
@@ -993,145 +1056,152 @@ herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
* create 3 dimension scales datasets for third dimension of dataset
*-------------------------------------------------------------------------
*/
-herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf)
+herr_t
+create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf,
+ float *s1_wbuf, float *s2_wbuf, float *s3_wbuf)
{
char name[64];
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf != NULL) {
+ if (s1_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf != NULL) {
+ if (s2_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf != NULL) {
+ if (s3_wbuf != NULL) {
HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
- if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s3_wbuf) < 0)
+ if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
return SUCCEED;
}
-herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
+herr_t
+test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 0) {
- if(H5DSattach_scale(did, dsid, idx) >= 0) {
- if(H5DSis_attached(did, dsid, idx) > 0) {
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 0) {
+ if (H5DSattach_scale(did, dsid, idx) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) > 0) {
ret_value = SUCCEED;
}
- else if(H5DSis_attached(did, dsid, idx) == 0) {
- printf(" scale not attached ");
+ else if (H5DSis_attached(did, dsid, idx) == 0) {
+ HDprintf(" scale not attached ");
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
+herr_t
+test_detach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if(H5DSdetach_scale(did, dsid, idx) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 0) {
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if (H5DSdetach_scale(did, dsid, idx) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 0) {
ret_value = SUCCEED;
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
+herr_t
+test_set_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
{
- herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ herr_t ret_value = FAIL;
+ hid_t dsid = -1;
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if(H5DSset_scale(dsid, scalename) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- ret_value = SUCCEED;
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if (H5DSset_scale(dsid, scalename) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ ret_value = SUCCEED;
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
+herr_t
+test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename, unsigned int idx)
{
herr_t ret_value = FAIL;
- hid_t dsid = -1;
+ hid_t dsid = -1;
ssize_t name_len;
- char *name_out=NULL;
-
- if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, idx) == 1) {
- if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) > 0) {
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
- if(name_out != NULL) {
- if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) >= 0) {
- if(HDstrcmp(scalename,name_out)==0) {
+ char * name_out = NULL;
+
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, idx) == 1) {
+ if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) > 0) {
+ name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ if (name_out != NULL) {
+ if (H5DSget_scale_name(dsid, name_out, (size_t)name_len + 1) >= 0) {
+ if (HDstrncmp(scalename, name_out, (size_t)name_len) == 0) {
ret_value = SUCCEED;
}
HDfree(name_out);
- name_out=NULL;
+ name_out = NULL;
}
}
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
ret_value = FAIL;
}
return ret_value;
}
-static int test_detachscales(void)
+static int
+test_detachscales(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t dsid = -1;
- int rank1 = 1;
- int rank3 = 3;
- hsize_t dims[] = {1,2,3}; /*some bogus numbers, not important for the test*/
- int *buf = NULL;
- char dname[10];
+ hid_t fid = -1;
+ hid_t did = -1;
+ hid_t dsid = -1;
+ int rank1 = 1;
+ int rank3 = 3;
+ hsize_t dims[] = {1, 2, 3}; /*some bogus numbers, not important for the test*/
+ int * buf = NULL;
+ char dname[16];
int i;
/* This tests creates two three dimensional datasets; then it creates
@@ -1139,54 +1209,54 @@ static int test_detachscales(void)
and detach them to check that at the end there is no attributes
REFERENCE_LIST on a dimension scale and DIMENSION_LIST on a dataset */
- TESTING2("test_detachscales");
+ HL_TESTING2("test_detachscales");
- if((fid = H5Fcreate("test_detach.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate("test_detach.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* make datasets; they are three dimensional*/
- for (i=0; i < 2; i++) {
- sprintf(dname,"D%d", i);
- if(H5LTmake_dataset_int(fid, dname, rank3, dims, buf) < 0)
+ for (i = 0; i < 2; i++) {
+ HDsprintf(dname, "D%d", i);
+ if (H5LTmake_dataset_int(fid, dname, rank3, dims, buf) < 0)
goto out;
- }
+ }
/* create datasets and make them dim. scales */
- for (i=0; i < 4; i++) {
- sprintf(dname, "DS%d", i);
- if(H5LTmake_dataset_int(fid, dname, rank1, dims, buf) < 0)
+ for (i = 0; i < 4; i++) {
+ HDsprintf(dname, "DS%d", i);
+ if (H5LTmake_dataset_int(fid, dname, rank1, dims, buf) < 0)
goto out;
}
- /* attach scales to the first dataset; first dimension will have
+ /* attach scales to the first dataset; first dimension will have
two scales attached */
- if((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
- for (i=0; i<4; i++) {
- sprintf(dname, "DS%d", i);
- if((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
- goto out;
- if(H5DSattach_scale(did, dsid, (unsigned int) i%3) < 0)
- goto out;
- if(H5Dclose(dsid) < 0)
- goto out;
+ if ((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < 4; i++) {
+ HDsprintf(dname, "DS%d", i);
+ if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ goto out;
+ if (H5DSattach_scale(did, dsid, (unsigned int)i % 3) < 0)
+ goto out;
+ if (H5Dclose(dsid) < 0)
+ goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
goto out;
- /* attach scales to the second dataset */
- if((did = H5Dopen2(fid, "D1", H5P_DEFAULT)) >= 0) {
- for (i=0; i<3; i++) {
- sprintf(dname, "DS%d", i);
- if((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
- goto out;
- if(H5DSattach_scale(did, dsid, (unsigned int) i) < 0)
- goto out;
- if(H5Dclose(dsid) < 0)
- goto out;
+ /* attach scales to the second dataset */
+ if ((did = H5Dopen2(fid, "D1", H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < 3; i++) {
+ HDsprintf(dname, "DS%d", i);
+ if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ goto out;
+ if (H5DSattach_scale(did, dsid, (unsigned int)i) < 0)
+ goto out;
+ if (H5Dclose(dsid) < 0)
+ goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1195,107 +1265,109 @@ static int test_detachscales(void)
/* detach DS0 from first dimension of D0 and D1; then check
that DS0 doesn't have attribute REFERENCE _LIST */
- if((dsid = H5Dopen2(fid, "DS0", H5P_DEFAULT)) < 0)
- goto out;
+ if ((dsid = H5Dopen2(fid, "DS0", H5P_DEFAULT)) < 0)
+ goto out;
- for (i=0; i<2; i++) {
- sprintf(dname, "D%d", i);
- if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 2; i++) {
+ HDsprintf(dname, "D%d", i);
+ if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSdetach_scale(did, dsid, (unsigned int)0) < 0)
+ if (H5DSdetach_scale(did, dsid, (unsigned int)0) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- }
+ }
/* Check that attribute "REFERENCE_LIST" doesn't exist anymore */
- if(H5Aexists(dsid, REFERENCE_LIST)!= 0)
+ if (H5Aexists(dsid, REFERENCE_LIST) != 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- /* Check that DS3 is the only dim. scale attached to the first
+ /* Check that DS3 is the only dim. scale attached to the first
dimension of D0 */
- if((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid, "DS3", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "DS3", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSis_attached(did, dsid, (unsigned int) 0) <= 0)
+ if (H5DSis_attached(did, dsid, (unsigned int)0) <= 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- /* Detach the rest of the scales DS3, DS1, DS2 from D0 and make
+ /* Detach the rest of the scales DS3, DS1, DS2 from D0 and make
sure that attribute "DIMENSION_LIST" doesn't exist anymore */
- if((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
- for (i=1; i<4; i++) {
- sprintf(dname, "DS%d", i);
- if((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
- goto out;
- if(H5DSdetach_scale(did, dsid, (unsigned int) i%3) < 0)
- goto out;
- if(H5Dclose(dsid) < 0)
- goto out;
+ if ((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
+ for (i = 1; i < 4; i++) {
+ HDsprintf(dname, "DS%d", i);
+ if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ goto out;
+ if (H5DSdetach_scale(did, dsid, (unsigned int)i % 3) < 0)
+ goto out;
+ if (H5Dclose(dsid) < 0)
+ goto out;
}
/* Check that attribute "DIMENSION_LIST" doesn't exist anymore */
- if(H5Aexists(did, DIMENSION_LIST)!= 0)
+ if (H5Aexists(did, DIMENSION_LIST) != 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
goto out;
-
PASSED();
H5Fclose(fid);
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Dclose(dsid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_char_attachscales(const char *fileext)
+static int
+test_char_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
- TESTING2("test_char_attachscales");
+ HL_TESTING2("test_char_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset */
- if(create_char_dataset(fid, "ac", 0) < 0)
+ if (create_char_dataset(fid, "ac", 0) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1307,72 +1379,75 @@ static int test_char_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_short_attachscales(const char *fileext)
+static int
+test_short_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
- TESTING2("test_short_attachscales");
+ HL_TESTING2("test_short_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset */
- if(create_short_dataset(fid, "as", 1) < 0)
+ if (create_short_dataset(fid, "as", 1) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1384,56 +1459,59 @@ static int test_short_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_int_attachscales(const char *fileext)
+static int
+test_int_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
- TESTING2("test_int_attachscales");
+ HL_TESTING2("test_int_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset */
- if(create_int_dataset(fid, "a", 1) < 0)
+ if (create_int_dataset(fid, "a", 1) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1445,52 +1523,55 @@ static int test_int_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_long_attachscales(const char *fileext)
+static int
+test_long_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
- TESTING2("test_long_attachscales");
+ HL_TESTING2("test_long_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset */
- if(create_long_dataset(fid, dsname, "al", 0) < 0)
+ if (create_long_dataset(fid, dsname, "al", 0) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM3) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1502,52 +1583,55 @@ static int test_long_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_duplicatelong_attachscales(const char *fileext)
+static int
+test_duplicatelong_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
- TESTING2("test_duplicatelong_attachscales");
+ HL_TESTING2("test_duplicatelong_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset 2 */
- if(create_long_dataset(fid, dsname, "al2", 0) < 0)
+ if (create_long_dataset(fid, dsname, "al2", 0) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM2) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
- if(test_attach_scale(fid, did, scalename, DIM3) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1559,56 +1643,59 @@ static int test_duplicatelong_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_float_attachscales(const char *fileext)
+static int
+test_float_attachscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
- TESTING2("test_float_attachscales");
+ HL_TESTING2("test_float_attachscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
/* make a dataset */
- if(create_float_dataset(fid, "af", 1) < 0)
+ if (create_float_dataset(fid, "af", 1) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
- if(test_attach_scale(fid, did, scalename, DIM1) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1620,45 +1707,48 @@ static int test_float_attachscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_numberofscales(const char *fileext)
+static int
+test_numberofscales(const char *fileext)
{
- hid_t fid = -1;
- hid_t did = -1;
- int nscales; /* number of scales in DIM */
- char dsname[32];
- char scalename[32];
+ hid_t fid = -1;
+ hid_t did = -1;
+ int nscales; /* number of scales in DIM */
+ char dsname[32];
+ char scalename[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
- TESTING2("test_numberofscales");
+ HL_TESTING2("test_numberofscales");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- if((nscales = H5DSget_num_scales(did, 0)) < 0)
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((nscales = H5DSget_num_scales(did, 0)) < 0)
goto out;
- if(nscales != 2)
+ if (nscales != 2)
goto out;
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 3)
+ if (nscales != 3)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1667,28 +1757,28 @@ static int test_numberofscales(const char *fileext)
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "b");
/* make a dataset */
- if(create_int_dataset(fid, "b", 1) < 0)
+ if (create_int_dataset(fid, "b", 1) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "b");
- if(test_attach_scale(fid, did, scalename, DIM0) < 0)
+ if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- if((nscales = H5DSget_num_scales(did, 0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 0)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 0)
+ if (nscales != 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1700,55 +1790,59 @@ static int test_numberofscales(const char *fileext)
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_char_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_char_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set char scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set char scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "ac");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "ac");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "ac");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1760,103 +1854,107 @@ static int test_char_scalenames(const char *fileext) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_short_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_short_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set short scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set short scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_31_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_32_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_33_NAME, "as");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1868,71 +1966,75 @@ static int test_short_scalenames(const char *fileext) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_int_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_int_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set int scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set int scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "a");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "a");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "a");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "a");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "a");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -1944,63 +2046,67 @@ static int test_int_scalenames(const char *fileext) {
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_long_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_long_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set long scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set long scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_4_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -2012,63 +2118,67 @@ static int test_long_scalenames(const char *fileext) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_samelong_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_samelong_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set same long scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set same long scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, "al");
- if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -2080,71 +2190,75 @@ static int test_samelong_scalenames(const char *fileext) {
return SUCCEED;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_float_scalenames(const char *fileext) {
- hid_t fid = -1;
- hid_t did = -1;
- char dsname[32];
- char scalename[32];
- char name[32];
+static int
+test_float_scalenames(const char *fileext)
+{
+ hid_t fid = -1;
+ hid_t did = -1;
+ char dsname[32];
+ char scalename[32];
+ char name[32];
HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
- if((fid = open_test_file(fileext)) < 0)
+ if ((fid = open_test_file(fileext)) < 0)
goto out;
- TESTING2("set float scale/cmp scale name");
- if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
+ HL_TESTING2("set float scale/cmp scale name");
+ if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "af");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "af");
- if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "af");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "af");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "af");
- if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
+ if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
@@ -2156,52 +2270,47 @@ static int test_float_scalenames(const char *fileext) {
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_foreign_scaleattached(const char *fileforeign)
+static int
+test_foreign_scaleattached(const char *fileforeign)
{
- herr_t ret_value = FAIL;
- hid_t fid = -1;
- hid_t did = -1;
- hid_t dsid = -1;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char filename[512]=""; /* buffer to hold name of existing file */
-
- /* compose the name of the file to open, using the srcdir, if appropriate */
- if (srcdir) {
- HDstrcpy(filename,srcdir);
- HDstrcat(filename,"/");
- }
- HDstrcat(filename, fileforeign);
+ herr_t ret_value = FAIL;
+ hid_t fid = -1;
+ hid_t did = -1;
+ hid_t dsid = -1;
+ const char *filename = H5_get_srcdir_filename(fileforeign);
- TESTING2("test_foreign_scaleattached");
+ HL_TESTING2("test_foreign_scaleattached");
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
goto out;
- if((did = H5Dopen2(fid, "/dset_al", H5P_DEFAULT)) >= 0) {
- if((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) {
- if(H5DSis_attached(did, dsid, 3) == 1) {
+ if ((did = H5Dopen2(fid, "/dset_al", H5P_DEFAULT)) >= 0) {
+ if ((dsid = H5Dopen2(fid, "/ds_4_al", H5P_DEFAULT)) >= 0) {
+ if (H5DSis_attached(did, dsid, 3) == 1) {
ret_value = SUCCEED;
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
else
goto out;
- if(ret_value == FAIL)
+ if (ret_value == FAIL)
goto out;
PASSED();
@@ -2210,1225 +2319,1206 @@ static int test_foreign_scaleattached(const char *fileforeign)
return 0;
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-static int test_simple(void)
+static int
+test_simple(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t gid = -1;
- int rank = RANK;
- int rankds = 1;
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE};
- int buf[DIM_DATA] = {1,2,3,4,5,6,7,8,9,10,11,12};
- hsize_t s1_dim[1] = {DIM1_SIZE};
- hsize_t s2_dim[1] = {DIM2_SIZE};
- char sname[30];
- char dname[30];
- int s1_wbuf[DIM1_SIZE] = {10,20,30};
- int s11_wbuf[DIM1_SIZE] = {10,100,300};
- int s2_wbuf[DIM2_SIZE] = {100,200,300,400};
- int s21_wbuf[DIM2_SIZE] = {10,20,30,40};
- int s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- char dim0_label[16];
- char dim1_label[16];
- char *dim0_labeld;
- char *dim1_labeld;
- char dim0_labels[3];
- char dim1_labels[3];
- ssize_t dim0_label_size;
- ssize_t dim1_label_size;
+ hid_t fid = -1;
+ hid_t did = -1;
+ hid_t dsid = -1;
+ hid_t sid = -1;
+ hid_t gid = -1;
+ int rank = RANK;
+ int rankds = 1;
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE};
+ int buf[DIM_DATA] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+ hsize_t s1_dim[1] = {DIM1_SIZE};
+ hsize_t s2_dim[1] = {DIM2_SIZE};
+ char sname[30];
+ char dname[30];
+ int s1_wbuf[DIM1_SIZE] = {10, 20, 30};
+ int s11_wbuf[DIM1_SIZE] = {10, 100, 300};
+ int s2_wbuf[DIM2_SIZE] = {100, 200, 300, 400};
+ int s21_wbuf[DIM2_SIZE] = {10, 20, 30, 40};
+ int s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
+ char dim0_label[16];
+ char dim1_label[16];
+ char * dim0_labeld;
+ char * dim1_labeld;
+ char dim0_labels[3];
+ char dim1_labels[3];
+ ssize_t dim0_label_size;
+ ssize_t dim1_label_size;
unsigned int dim;
- int scale_idx;
- int nscales;
- ssize_t name_len;
- char *name_out=NULL;
- char snames[3];
- int i, j;
+ int scale_idx;
+ int nscales;
+ ssize_t name_len;
+ char * name_out = NULL;
+ char snames[3];
+ int i, j;
- printf("Testing API functions\n");
+ HDprintf("Testing API functions\n");
/*-------------------------------------------------------------------------
- * create a file for the test
- *-------------------------------------------------------------------------
- */
+ * create a file for the test
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid=H5Fcreate(FILE1,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create datasets: 1 "data" dataset and 4 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create datasets: 1 "data" dataset and 4 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_a",rank,dims,buf) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_a", rank, dims, buf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_int(fid,"ds_a_1",rankds,s1_dim,s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_1", rankds, s1_dim, s1_wbuf) < 0)
goto out;
/* make a DS dataset with an alternate scale for the 2nd dimension */
- if(H5LTmake_dataset_int(fid,"ds_a_11",rankds,s1_dim,s11_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_11", rankds, s1_dim, s11_wbuf) < 0)
goto out;
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_int(fid,"ds_a_2",rankds,s2_dim,s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_2", rankds, s2_dim, s2_wbuf) < 0)
goto out;
/* make a DS dataset with an alternate scale for the 2nd dimension */
- if(H5LTmake_dataset_int(fid,"ds_a_21",rankds,s2_dim,s21_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_21", rankds, s2_dim, s21_wbuf) < 0)
goto out;
/* make a DS dataset with an alternate scale for the 2nd dimension */
- if(H5LTmake_dataset_int(fid,"ds_a_22",rankds,s2_dim,s22_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_22", rankds, s2_dim, s22_wbuf) < 0)
goto out;
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the DS_1_NAME dimension scale to "dset_a"
- *-------------------------------------------------------------------------
- */
+ * attach the DS_1_NAME dimension scale to "dset_a"
+ *-------------------------------------------------------------------------
+ */
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_a_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_1", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_a" at dimension 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the DS_11_NAME dimension scale to "dset_a"
- *-------------------------------------------------------------------------
- */
+ * attach the DS_11_NAME dimension scale to "dset_a"
+ *-------------------------------------------------------------------------
+ */
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_a_11", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_11", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_11_NAME dimension scale to "dset_a" at dimension 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the DS_2_NAME dimension scale to "dset_a"
- *-------------------------------------------------------------------------
- */
+ * attach the DS_2_NAME dimension scale to "dset_a"
+ *-------------------------------------------------------------------------
+ */
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_a_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_2", H5P_DEFAULT)) < 0)
goto out;
/* attach the "ds2" dimension scale to "dset_a" as the 2nd dimension */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the DS_21_NAME dimension scale to "dset_a"
- *-------------------------------------------------------------------------
- */
+ * attach the DS_21_NAME dimension scale to "dset_a"
+ *-------------------------------------------------------------------------
+ */
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_a_21", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_21", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_21_NAME dimension scale to "dset_a" as the 2nd dimension */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the DS_22_NAME dimension scale to "dset_a"
- *-------------------------------------------------------------------------
- */
+ * attach the DS_22_NAME dimension scale to "dset_a"
+ *-------------------------------------------------------------------------
+ */
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_a_22", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_22", H5P_DEFAULT)) < 0)
goto out;
/* attach the "ds22" dimension scale to "dset_a" as the 2nd dimension */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_a" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create datasets: 1 "data" dataset and 1 dimension scale
- *-------------------------------------------------------------------------
- */
+ * create datasets: 1 "data" dataset and 1 dimension scale
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_b",rank,dims,buf) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_b", rank, dims, buf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_int(fid,"ds_b_1",rankds,s1_dim,s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_b_1", rankds, s1_dim, s1_wbuf) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach the scale to "dset_b"
- *-------------------------------------------------------------------------
- */
+ * attach the scale to "dset_b"
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_b", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_b", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_b_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_b" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
-
-
/*-------------------------------------------------------------------------
- * H5DSdetach_scale
- *-------------------------------------------------------------------------
- */
-
- TESTING2("detach scales ");
+ * H5DSdetach_scale
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("detach scales ");
/*-------------------------------------------------------------------------
- * create datasets: one "data" dataset and 4 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create datasets: one "data" dataset and 4 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid, "dset_c", rank, dims, buf) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_c", rank, dims, buf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_int(fid, "ds_c_1", rankds, s1_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_c_1", rankds, s1_dim, s1_wbuf) < 0)
goto out;
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_int(fid, "ds_c_2", rankds, s2_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_c_2", rankds, s2_dim, s2_wbuf) < 0)
goto out;
/* make a DS dataset with an alternate scale for the 2nd dimension */
- if(H5LTmake_dataset_int(fid, "ds_c_21", rankds, s2_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_c_21", rankds, s2_dim, s2_wbuf) < 0)
goto out;
/* make a DS dataset with an alternate scale for the 2nd dimension */
- if(H5LTmake_dataset_int(fid, "ds_c_22", rankds, s2_dim, s2_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_c_22", rankds, s2_dim, s2_wbuf) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * attach the scales to "dset_c"
- *-------------------------------------------------------------------------
- */
+ * attach the scales to "dset_c"
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_c_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_c_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_2", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 1) < 0)
+ if (H5DSattach_scale(did, dsid, 1) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_c_21", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_21", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 1) < 0)
+ if (H5DSattach_scale(did, dsid, 1) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_c_22", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_22", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 1) < 0)
+ if (H5DSattach_scale(did, dsid, 1) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * verify if "dset_c" has dimension scales
- *-------------------------------------------------------------------------
- */
+ * verify if "dset_c" has dimension scales
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 0 */
- if((nscales = H5DSget_num_scales(did, 0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 0)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
/* verify that "dset_c" has 3 dimension scales at DIM 1 */
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 3)
+ if (nscales != 3)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * detach the "ds_c_21" dimension scale to "dset_c"
- *-------------------------------------------------------------------------
- */
+ * detach the "ds_c_21" dimension scale to "dset_c"
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_c" */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_c_21", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_21", H5P_DEFAULT)) < 0)
goto out;
/* detach the "ds_c_21" dimension scale to "dset_c" in DIM 1 */
- if(H5DSdetach_scale(did, dsid, 1) < 0)
+ if (H5DSdetach_scale(did, dsid, 1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_c" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * "dset_c" must have now 2 dimension scales at DIM 1
- *-------------------------------------------------------------------------
- */
+ * "dset_c" must have now 2 dimension scales at DIM 1
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* verify that "dset_c" has 2 dimension scales at DIM 1 */
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 2)
+ if (nscales != 2)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * detach the "ds_c_22" dimension scale to "dset_c"
- *-------------------------------------------------------------------------
- */
+ * detach the "ds_c_22" dimension scale to "dset_c"
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_c" */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_c_22", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_22", H5P_DEFAULT)) < 0)
goto out;
/* detach the "ds_c_22" dimension scale to "dset_c" in DIM 1 */
- if(H5DSdetach_scale(did, dsid, 1) < 0)
+ if (H5DSdetach_scale(did, dsid, 1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_c" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * "dset_c" must have now 1 dimension scale at DIM 1
- *-------------------------------------------------------------------------
- */
+ * "dset_c" must have now 1 dimension scale at DIM 1
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 1 */
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * detach the "ds_c_2" dimension scale to "dset_c"
- *-------------------------------------------------------------------------
- */
+ * detach the "ds_c_2" dimension scale to "dset_c"
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_c" */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_c_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_c_2", H5P_DEFAULT)) < 0)
goto out;
/* detach the "ds_c_2" dimension scale to "dset_c" in DIM 1 */
- if(H5DSdetach_scale(did, dsid, 1) < 0)
+ if (H5DSdetach_scale(did, dsid, 1) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_c" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * "dset_c" must have now 0 dimension scales at DIM 1
- *-------------------------------------------------------------------------
- */
+ * "dset_c" must have now 0 dimension scales at DIM 1
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_c", H5P_DEFAULT)) < 0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 1 */
- if((nscales = H5DSget_num_scales(did, 1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 1)) < 0)
goto out;
- if(nscales != 0)
+ if (nscales != 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * create 3 datasets: 1 "data" dataset and 2 dimension scales
- *-------------------------------------------------------------------------
- */
- if(H5LTmake_dataset_int(fid,"dset_d",rank,dims,NULL) < 0)
+ * create 3 datasets: 1 "data" dataset and 2 dimension scales
+ *-------------------------------------------------------------------------
+ */
+ if (H5LTmake_dataset_int(fid, "dset_d", rank, dims, NULL) < 0)
goto out;
- if(H5LTmake_dataset_int(fid,"ds_d_1",rankds,s1_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_d_1", rankds, s1_dim, NULL) < 0)
goto out;
- if(H5LTmake_dataset_int(fid,"ds_d_2",rankds,s2_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_d_2", rankds, s2_dim, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach them
- *-------------------------------------------------------------------------
- */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ * attach them
+ *-------------------------------------------------------------------------
+ */
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_2", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 1) < 0)
+ if (H5DSattach_scale(did, dsid, 1) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * verify
- *-------------------------------------------------------------------------
- */
+ * verify
+ *-------------------------------------------------------------------------
+ */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSis_attached(did,dsid,DIM0)<=0)
+ if (H5DSis_attached(did, dsid, DIM0) <= 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_2", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSis_attached(did,dsid,DIM1)<=0)
+ if (H5DSis_attached(did, dsid, DIM1) <= 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * detach
- *-------------------------------------------------------------------------
- */
+ * detach
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_d" */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_1", H5P_DEFAULT)) < 0)
goto out;
/* detach the dimension scale to "dset_d" in DIM 0 */
- if(H5DSdetach_scale(did,dsid,DIM0) < 0)
+ if (H5DSdetach_scale(did, dsid, DIM0) < 0)
goto out;
/* verify attach, it must return 0 for no attach */
- if(H5DSis_attached(did,dsid,DIM0)!=0)
+ if (H5DSis_attached(did, dsid, DIM0) != 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_d" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach again
- *-------------------------------------------------------------------------
- */
+ * attach again
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_d" */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_1", H5P_DEFAULT)) < 0)
goto out;
/* attach "ds_d_1" again in DIM 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* verify attach, it must return 1 for attach */
- if(H5DSis_attached(did,dsid,DIM0)!=1)
+ if (H5DSis_attached(did, dsid, DIM0) != 1)
goto out;
/* verify that "ds_d_1" has only 1 scale at DIM0 */
- if((nscales = H5DSget_num_scales(did,DIM0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, DIM0)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_d" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * detach/detach
- *-------------------------------------------------------------------------
- */
+ * detach/detach
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_d" */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_2", H5P_DEFAULT)) < 0)
goto out;
/* detach the "ds_d_2" dimension scale to "dset_d" in DIM 1 */
- if(H5DSdetach_scale(did,dsid,DIM1) < 0)
+ if (H5DSdetach_scale(did, dsid, DIM1) < 0)
goto out;
/* detach again, it should fail */
- if(H5DSdetach_scale(did,dsid,DIM1)==SUCCEED)
+ if (H5DSdetach_scale(did, dsid, DIM1) == SUCCEED)
goto out;
/* verify attach, it must return 0 for no attach */
- if(H5DSis_attached(did,dsid,DIM1)!=0)
+ if (H5DSis_attached(did, dsid, DIM1) != 0)
goto out;
/* verify that "ds_d_1" has no scale at DIM1 */
- if((nscales = H5DSget_num_scales(did,DIM1)) < 0)
+ if ((nscales = H5DSget_num_scales(did, DIM1)) < 0)
goto out;
- if(nscales != 0)
+ if (nscales != 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_d" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach twice
- *-------------------------------------------------------------------------
- */
+ * attach twice
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_d" */
- if((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_d", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_d_2", H5P_DEFAULT)) < 0)
goto out;
/* attach "ds_d_2" in DIM 1 */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* verify attach, it must return 1 for attach */
- if(H5DSis_attached(did,dsid,DIM1)!=1)
+ if (H5DSis_attached(did, dsid, DIM1) != 1)
goto out;
/* verify that "ds_d_2" has only 1 scale at DIM1 */
- if((nscales = H5DSget_num_scales(did,DIM0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, DIM0)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
/* attach "ds_d_2" again in DIM 1 */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* verify attach, it must return 1 for attach */
- if(H5DSis_attached(did,dsid,DIM1)!=1)
+ if (H5DSis_attached(did, dsid, DIM1) != 1)
goto out;
/* verify that "ds_d_2" has only 1 scale at DIM1 */
- if((nscales = H5DSget_num_scales(did,DIM0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, DIM0)) < 0)
goto out;
- if(nscales != 1)
+ if (nscales != 1)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* close dataset ID of "dset_d" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create 10 datasets: 5 "data" dataset and 5 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create 10 datasets: 5 "data" dataset and 5 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* create a group */
- if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create the data space for the dataset */
- if((sid = H5Screate_simple(rank,dims,NULL)) < 0)
+ if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
goto out;
- for(i = 0; i < 5; i++) {
- sprintf(dname,"dset_%d",i);
- if((did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 5; i++) {
+ HDsprintf(dname, "dset_%d", i);
+ if ((did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- sprintf(sname,"ds_%d",i);
- if((dsid = H5Dcreate2(gid, sname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ HDsprintf(sname, "ds_%d", i);
+ if ((dsid = H5Dcreate2(gid, sname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"scale") < 0)
+ if (H5DSset_scale(dsid, "scale") < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
/*-------------------------------------------------------------------------
- * attach for DIM 0
- *-------------------------------------------------------------------------
- */
+ * attach for DIM 0
+ *-------------------------------------------------------------------------
+ */
- for(i = 0; i < 5; i++) {
- sprintf(dname, "dset_%d", i);
- if((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 5; i++) {
+ HDsprintf(dname, "dset_%d", i);
+ if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
- for(j = 0; j < 5; j++) {
- sprintf(sname, "ds_%d", j);
- if((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
+ for (j = 0; j < 5; j++) {
+ HDsprintf(sname, "ds_%d", j);
+ if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
/*-------------------------------------------------------------------------
- * dettach for DIM0
- *-------------------------------------------------------------------------
- */
+ * dettach for DIM0
+ *-------------------------------------------------------------------------
+ */
- for(i = 0; i < 5; i++) {
- sprintf(dname, "dset_%d", i);
- if((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 5; i++) {
+ HDsprintf(dname, "dset_%d", i);
+ if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
- for(j = 0; j < 5; j++) {
- sprintf(sname, "ds_%d", j);
- if((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
+ for (j = 0; j < 5; j++) {
+ HDsprintf(sname, "ds_%d", j);
+ if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSdetach_scale(did, dsid, DIM0) < 0)
+ if (H5DSdetach_scale(did, dsid, DIM0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
-
/*-------------------------------------------------------------------------
- * attach again for DIM0
- *-------------------------------------------------------------------------
- */
+ * attach again for DIM0
+ *-------------------------------------------------------------------------
+ */
- for(i=0; i<5; i++) {
- sprintf(dname,"dset_%d",i);
- if((did = H5Dopen2(gid,dname, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 5; i++) {
+ HDsprintf(dname, "dset_%d", i);
+ if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
- for(j=0; j<5; j++) {
- sprintf(sname,"ds_%d",j);
- if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT)) < 0)
+ for (j = 0; j < 5; j++) {
+ HDsprintf(sname, "ds_%d", j);
+ if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
}
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
-
-
/*-------------------------------------------------------------------------
- * create a dataset and attach only to 1 dimension
- *-------------------------------------------------------------------------
- */
+ * create a dataset and attach only to 1 dimension
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_e",rank,dims,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_e", rank, dims, NULL) < 0)
goto out;
/* make a scale */
- if(H5LTmake_dataset_int(fid,"ds_e_1",rankds,s1_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_e_1", rankds, s1_dim, NULL) < 0)
goto out;
/* attach the DS to dimension 1 */
- if((did = H5Dopen2(fid,"dset_e", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_e", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_e_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_e_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
- if(H5DSis_attached(did,dsid,DIM1)<=0)
+ if (H5DSis_attached(did, dsid, DIM1) <= 0)
goto out;
-
/* try to detach all dimensions. for dimensions 0 and 2, it is an error */
- for(i=0; i<rank; i++) {
- if( i==1 ) {
- if(H5DSdetach_scale(did,dsid,(unsigned)i) < 0)
+ for (i = 0; i < rank; i++) {
+ if (i == 1) {
+ if (H5DSdetach_scale(did, dsid, (unsigned)i) < 0)
goto out;
}
else {
- if(H5DSdetach_scale(did,dsid,(unsigned)i)!=FAIL)
+ if (H5DSdetach_scale(did, dsid, (unsigned)i) != FAIL)
goto out;
}
}
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
-
/*-------------------------------------------------------------------------
- * H5DSset_label, H5DSget_label
- *-------------------------------------------------------------------------
- */
+ * H5DSset_label, H5DSget_label
+ *-------------------------------------------------------------------------
+ */
- TESTING2("set/get label");
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ HL_TESTING2("set/get label");
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * set label
- *-------------------------------------------------------------------------
- */
+ * set label
+ *-------------------------------------------------------------------------
+ */
- if(H5DSset_label(did,DIM0,DIM0_LABEL) < 0)
+ if (H5DSset_label(did, DIM0, DIM0_LABEL) < 0)
goto out;
/* check getting a label which does not exist */
- if(H5DSget_label(did,DIM1,dim1_label,sizeof(dim1_label)) != 0)
+ if (H5DSget_label(did, DIM1, dim1_label, sizeof(dim1_label)) != 0)
goto out;
- if(H5DSset_label(did,DIM1,DIM1_LABEL) < 0)
+ if (H5DSset_label(did, DIM1, DIM1_LABEL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get the scale name using a static buffer
- *-------------------------------------------------------------------------
- */
+ * get the scale name using a static buffer
+ *-------------------------------------------------------------------------
+ */
- if(H5DSget_label(did,DIM0,dim0_label,sizeof(dim0_label)) < 0)
+ if (H5DSget_label(did, DIM0, dim0_label, sizeof(dim0_label)) < 0)
goto out;
- if(H5DSget_label(did,DIM1,dim1_label,sizeof(dim1_label)) < 0)
+ if (H5DSget_label(did, DIM1, dim1_label, sizeof(dim1_label)) < 0)
goto out;
- if(HDstrncmp(DIM0_LABEL,dim0_label,sizeof(dim0_label))!=0)
+ if (HDstrncmp(DIM0_LABEL, dim0_label, sizeof(dim0_label)) != 0)
goto out;
- if(HDstrncmp(DIM1_LABEL,dim1_label,sizeof(dim1_label))!=0)
+ if (HDstrncmp(DIM1_LABEL, dim1_label, sizeof(dim1_label)) != 0)
goto out;
/*-------------------------------------------------------------------------
- * get the scale name using a dynamic buffer
- *-------------------------------------------------------------------------
- */
+ * get the scale name using a dynamic buffer
+ *-------------------------------------------------------------------------
+ */
- if((dim0_label_size=H5DSget_label(did,DIM0,NULL,(size_t)0)) < 0)
+ if ((dim0_label_size = H5DSget_label(did, DIM0, NULL, (size_t)0)) < 0)
goto out;
- if((dim1_label_size=H5DSget_label(did,DIM1,NULL,(size_t)0)) < 0)
+ if ((dim1_label_size = H5DSget_label(did, DIM1, NULL, (size_t)0)) < 0)
goto out;
/* allocate */
- dim0_labeld = (char*)HDmalloc((size_t)dim0_label_size * sizeof (char));
- dim1_labeld = (char*)HDmalloc((size_t)dim1_label_size * sizeof (char));
- if( dim0_labeld==NULL || dim1_labeld==NULL)
+ dim0_labeld = (char *)HDmalloc((size_t)dim0_label_size * sizeof(char));
+ dim1_labeld = (char *)HDmalloc((size_t)dim1_label_size * sizeof(char));
+ if (dim0_labeld == NULL || dim1_labeld == NULL)
goto out;
- if(H5DSget_label(did,DIM0,dim0_labeld,(size_t)dim0_label_size) < 0)
+ if (H5DSget_label(did, DIM0, dim0_labeld, (size_t)dim0_label_size) < 0)
goto out;
- if(H5DSget_label(did,DIM1,dim1_labeld,(size_t)dim1_label_size) < 0)
+ if (H5DSget_label(did, DIM1, dim1_labeld, (size_t)dim1_label_size) < 0)
goto out;
- if(HDstrncmp(DIM0_LABEL,dim0_labeld,(size_t)(dim0_label_size-1))!=0)
+ if (HDstrncmp(DIM0_LABEL, dim0_labeld, (size_t)(dim0_label_size - 1)) != 0)
goto out;
- if(HDstrncmp(DIM1_LABEL,dim1_labeld,(size_t)(dim1_label_size-1))!=0)
+ if (HDstrncmp(DIM1_LABEL, dim1_labeld, (size_t)(dim1_label_size - 1)) != 0)
goto out;
- if(dim0_labeld) {
+ if (dim0_labeld) {
HDfree(dim0_labeld);
- dim0_labeld=NULL;
+ dim0_labeld = NULL;
}
- if(dim1_labeld) {
+ if (dim1_labeld) {
HDfree(dim1_labeld);
- dim1_labeld=NULL;
+ dim1_labeld = NULL;
}
-
/*-------------------------------------------------------------------------
- * get the label using a static buffer smaller than the string lenght
- *-------------------------------------------------------------------------
- */
+ * get the label using a static buffer smaller than the string length
+ *-------------------------------------------------------------------------
+ */
- if(H5DSget_label(did,DIM0,dim0_labels,sizeof(dim0_labels)) < 0)
+ if (H5DSget_label(did, DIM0, dim0_labels, sizeof(dim0_labels)) < 0)
goto out;
- if(H5DSget_label(did,DIM1,dim1_labels,sizeof(dim1_labels)) < 0)
+ if (H5DSget_label(did, DIM1, dim1_labels, sizeof(dim1_labels)) < 0)
goto out;
- if(HDstrncmp(DIM0_LABEL,dim0_labels,sizeof(dim0_labels)-1)!=0)
+ if (HDstrncmp(DIM0_LABEL, dim0_labels, sizeof(dim0_labels) - 1) != 0)
goto out;
- if(HDstrncmp(DIM1_LABEL,dim1_labels,sizeof(dim1_labels)-1)!=0)
+ if (HDstrncmp(DIM1_LABEL, dim1_labels, sizeof(dim1_labels) - 1) != 0)
goto out;
- if(H5Dclose(did))
+ if (H5Dclose(did))
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * H5DSget_scale_name, H5DSget_scale_name
- *-------------------------------------------------------------------------
- */
+ * H5DSget_scale_name, H5DSget_scale_name
+ *-------------------------------------------------------------------------
+ */
-
- TESTING2("set scale/get scale name");
- if((dsid = H5Dopen2(fid,"ds_a_1", H5P_DEFAULT)) < 0)
+ HL_TESTING2("set scale/get scale name");
+ if ((dsid = H5Dopen2(fid, "ds_a_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"Latitude set 0") < 0)
+ if (H5DSset_scale(dsid, "Latitude set 0") < 0)
goto out;
/* verify that DS_1_NAME is a dimension scale dataset */
- if((H5DSis_scale(dsid)) == 0)
+ if ((H5DSis_scale(dsid)) == 0)
goto out;
/*-------------------------------------------------------------------------
- * get the scale name using a dynamic buffer
- *-------------------------------------------------------------------------
- */
+ * get the scale name using a dynamic buffer
+ *-------------------------------------------------------------------------
+ */
- /* get the lenght of the scale name (pass NULL in name) */
- if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) < 0)
+ /* get the length of the scale name (pass NULL in name) */
+ if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) < 0)
goto out;
/* allocate a buffer */
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
- if(name_out == NULL)
+ name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ if (name_out == NULL)
goto out;
/* get the scale name using this buffer */
- if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0)
+ if (H5DSget_scale_name(dsid, name_out, (size_t)name_len + 1) < 0)
goto out;
- if(HDstrncmp("Latitude set 0",name_out, (size_t)name_len)!=0)
+ if (HDstrncmp("Latitude set 0", name_out, (size_t)name_len) != 0)
goto out;
- if(name_out) {
+ if (name_out) {
HDfree(name_out);
- name_out=NULL;
+ name_out = NULL;
}
/*-------------------------------------------------------------------------
- * get the scale name using a static buffer
- *-------------------------------------------------------------------------
- */
+ * get the scale name using a static buffer
+ *-------------------------------------------------------------------------
+ */
/* get the scale name using this buffer */
- if(H5DSget_scale_name(dsid, sname, sizeof(sname)) < 0)
+ if (H5DSget_scale_name(dsid, sname, sizeof(sname)) < 0)
goto out;
- if(HDstrncmp("Latitude set 0", sname, sizeof(sname))!=0)
+ if (HDstrncmp("Latitude set 0", sname, sizeof(sname)) != 0)
goto out;
/*-------------------------------------------------------------------------
- * get the scale name using a static buffer smaller than the string lenght
- *-------------------------------------------------------------------------
- */
+ * get the scale name using a static buffer smaller than the string length
+ *-------------------------------------------------------------------------
+ */
/* get the scale name using this buffer */
- if(H5DSget_scale_name(dsid, snames, sizeof (snames)) < 0)
+ if (H5DSget_scale_name(dsid, snames, sizeof(snames)) < 0)
goto out;
- if(HDstrncmp("Latitude set 0",snames,sizeof(snames)-1)!=0)
+ if (HDstrncmp("Latitude set 0", snames, sizeof(snames) - 1) != 0)
goto out;
- if(H5Dclose(dsid))
+ if (H5Dclose(dsid))
goto out;
/*-------------------------------------------------------------------------
- * add scale names
- *-------------------------------------------------------------------------
- */
+ * add scale names
+ *-------------------------------------------------------------------------
+ */
- if((dsid = H5Dopen2(fid,"ds_a_11", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_11", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"Latitude set 1") < 0)
+ if (H5DSset_scale(dsid, "Latitude set 1") < 0)
goto out;
- if(H5Dclose(dsid))
+ if (H5Dclose(dsid))
goto out;
- if((dsid = H5Dopen2(fid,"ds_a_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_2", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"Longitude set 0") < 0)
+ if (H5DSset_scale(dsid, "Longitude set 0") < 0)
goto out;
- if(H5Dclose(dsid))
+ if (H5Dclose(dsid))
goto out;
- if((dsid = H5Dopen2(fid,"ds_a_21", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_21", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"Longitude set 1") < 0)
+ if (H5DSset_scale(dsid, "Longitude set 1") < 0)
goto out;
- if(H5Dclose(dsid))
+ if (H5Dclose(dsid))
goto out;
- if((dsid = H5Dopen2(fid,"ds_a_22", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a_22", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,"Longitude set 2") < 0)
+ if (H5DSset_scale(dsid, "Longitude set 2") < 0)
goto out;
- if(H5Dclose(dsid))
+ if (H5Dclose(dsid))
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * H5DSiterate_scales
- *-------------------------------------------------------------------------
- */
-
-
- TESTING2("iterate scales");
+ * H5DSiterate_scales
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("iterate scales");
/*-------------------------------------------------------------------------
- * test 6: test iterate scales with a function verify_scale
- *-------------------------------------------------------------------------
- */
+ * test 6: test iterate scales with a function verify_scale
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
dim = 0;
/* iterate trough the 1st dimension of "dset_a" and verify that its DS is valid */
- if(H5DSiterate_scales(did,dim,NULL,verify_scale,NULL) < 0)
+ if (H5DSiterate_scales(did, dim, NULL, verify_scale, NULL) < 0)
goto out;
/* iterate trough the 2nd dimension of "dset_a" and verify that its DS is valid
start at DS index 2 */
- dim = 1;
+ dim = 1;
scale_idx = 2;
- if(H5DSiterate_scales(did,dim,&scale_idx,verify_scale,NULL) < 0)
+ if (H5DSiterate_scales(did, dim, &scale_idx, verify_scale, NULL) < 0)
goto out;
/* close dataset ID of "dset_a" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * test iterate scales with a function read_scale
- *-------------------------------------------------------------------------
- */
-
+ * test iterate scales with a function read_scale
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
dim = 0;
/* iterate trough the 1st dimension of "dset_a" and read the DS */
- if(H5DSiterate_scales(did,dim,NULL,read_scale,s1_wbuf) < 0)
+ if (H5DSiterate_scales(did, dim, NULL, read_scale, s1_wbuf) < 0)
goto out;
/* iterate trough the 2nd dimension of "dset_a" and read the DS
start at DS index 2 */
- dim = 1;
+ dim = 1;
scale_idx = 2;
- if(H5DSiterate_scales(did, dim, &scale_idx, read_scale, s22_wbuf) < 0)
+ if (H5DSiterate_scales(did, dim, &scale_idx, read_scale, s22_wbuf) < 0)
goto out;
/* close dataset ID of "dset_a" */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * test iterate scales with a function match_dim_scale
- *-------------------------------------------------------------------------
- */
+ * test iterate scales with a function match_dim_scale
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* get dataset space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get rank */
- if((rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* get dimensions of dataset */
- if(H5Sget_simple_extent_dims(sid,dims,NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
{
- int match_size; /* does this scale size matches the dataset DIM size */
- int idx = 0; /* scale index to start iterating, on return, index where iterator stoped */
+ int match_size; /* does this scale size matches the dataset DIM size */
+ int idx = 0; /* scale index to start iterating, on return, index where iterator stoped */
/* iterate trough all the dimensions */
- for(dim=0; dim<(unsigned)rank; dim++) {
- if((match_size=H5DSiterate_scales(did,dim,&idx,match_dim_scale,NULL)) < 0)
+ for (dim = 0; dim < (unsigned)rank; dim++) {
+ if ((match_size = H5DSiterate_scales(did, dim, &idx, match_dim_scale, NULL)) < 0)
goto out;
/* "dset_a" was defined with all dimension scales size matching the size of its dimensions */
- if(match_size==0)
+ if (match_size == 0)
goto out;
/* both DS_1_NAME and DS_2_NAME are the on the first index */
- if(idx!=0)
+ if (idx != 0)
goto out;
}
}
-
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * test iterate scales with a function match_dim_scale
- *-------------------------------------------------------------------------
- */
+ * test iterate scales with a function match_dim_scale
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
- * create 3 datasets: 1 "data" dataset and dimension scales (some are empty)
- *-------------------------------------------------------------------------
- */
- if(H5LTmake_dataset_int(fid, "dset_f", rank, dims, buf) < 0)
+ * create 3 datasets: 1 "data" dataset and dimension scales (some are empty)
+ *-------------------------------------------------------------------------
+ */
+ if (H5LTmake_dataset_int(fid, "dset_f", rank, dims, buf) < 0)
goto out;
- if(H5LTmake_dataset_int(fid,"ds_f_1",rankds,s1_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_f_1", rankds, s1_dim, NULL) < 0)
goto out;
- if(H5LTmake_dataset_int(fid, "ds_f_11", rankds, s1_dim, s1_wbuf) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_f_11", rankds, s1_dim, s1_wbuf) < 0)
goto out;
- if(H5LTmake_dataset_int(fid,"ds_f_2",rankds,s2_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_f_2", rankds, s2_dim, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach them
- *-------------------------------------------------------------------------
- */
- if((did = H5Dopen2(fid,"dset_f", H5P_DEFAULT)) < 0)
+ * attach them
+ *-------------------------------------------------------------------------
+ */
+ if ((did = H5Dopen2(fid, "dset_f", H5P_DEFAULT)) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_f_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_f_1", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_f_11", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_f_11", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if((dsid = H5Dopen2(fid,"ds_f_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_f_2", H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * verify match
- *-------------------------------------------------------------------------
- */
+ * verify match
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "dset_f" */
- if((did = H5Dopen2(fid,"dset_f", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_f", H5P_DEFAULT)) < 0)
goto out;
/* get dataset space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get rank */
- if((rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* get dimensions of dataset */
- if(H5Sget_simple_extent_dims(sid,dims,NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
{
int match_size; /* does this scale size matches the dataset DIM size */
int idx; /* scale index to start iterating, on return, index where iterator stoped */
/* iterate trough all the dimensions */
- for(dim=0; dim<(unsigned)rank; dim++) {
+ for (dim = 0; dim < (unsigned)rank; dim++) {
/* always start at 1st scale */
- idx=0;
+ idx = 0;
- if((match_size=H5DSiterate_scales(did,dim,&idx,match_dim_scale,NULL)) < 0)
+ if ((match_size = H5DSiterate_scales(did, dim, &idx, match_dim_scale, NULL)) < 0)
goto out;
/* "dset_e" was defined with :
dim 0: 2 scales, first is empty
dim 1: 1 scale, empty */
- switch(dim) {
- case 0: /* for DIM 0, we get a valid scale at IDX 1 */
- if(match_size!=1 && idx!=1)
- goto out;
- break;
- case 1: /* for DIM 1, we get no valid scales */
- if(match_size!=0 && idx!=0)
- goto out;
- break;
- default:
- HDassert(0);
- break;
- }/*switch*/
- }/*for*/
+ switch (dim) {
+ case 0: /* for DIM 0, we get a valid scale at IDX 1 */
+ if (match_size != 1 && idx != 1)
+ goto out;
+ break;
+ case 1: /* for DIM 1, we get no valid scales */
+ if (match_size != 0 && idx != 0)
+ goto out;
+ break;
+ default:
+ HDassert(0);
+ break;
+ } /*switch*/
+ } /*for*/
}
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
+ * end
+ *-------------------------------------------------------------------------
+ */
/* close */
H5Fclose(fid);
return 0;
- /* error zone */
- out:
+/* error zone */
+out:
H5E_BEGIN_TRY
{
H5Dclose(did);
@@ -3436,13 +3526,12 @@ static int test_simple(void)
H5Fclose(fid);
H5Sclose(sid);
H5Gclose(gid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
-
/*-------------------------------------------------------------------------
* Function: verify_scale
*
@@ -3460,29 +3549,29 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
-static herr_t verify_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
+static herr_t
+verify_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
{
/* define a default zero value for return. This will cause the iterator to continue */
int ret = 0;
/* unused */
- dset=dset;
- dim=dim;
- visitor_data=visitor_data;
+ dset = dset;
+ dim = dim;
+ visitor_data = visitor_data;
/* define a positive value for return value. This will cause the iterator to
immediately return that positive value, indicating short-circuit success
*/
/* the parameter DS dataset must be a valid DS dataset */
- if((H5DSis_scale(scale_id))==1) {
+ if ((H5DSis_scale(scale_id)) == 1) {
ret = 1;
}
return ret;
}
-
/*-------------------------------------------------------------------------
* Function: read_scale
*
@@ -3501,81 +3590,82 @@ static herr_t verify_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visit
*-------------------------------------------------------------------------
*/
-static herr_t read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
+static herr_t
+read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
{
- int ret = 0; /* define a default zero value for return. This will cause the iterator to continue */
- hid_t sid = -1; /* space ID */
- hid_t tid = -1; /* file type ID */
+ int ret = 0; /* define a default zero value for return. This will cause the iterator to continue */
+ hid_t sid = -1; /* space ID */
+ hid_t tid = -1; /* file type ID */
hid_t mtid = -1; /* memory type ID */
hssize_t nelmts; /* number of data elements */
- char *buf=NULL; /* data buffer */
+ char * buf = NULL; /* data buffer */
size_t size;
int i;
- char *data = (char*) visitor_data;
+ char * data = (char *)visitor_data;
/* unused */
- dset=dset;
- dim=dim;
+ dset = dset;
+ dim = dim;
/* get space */
- if((sid = H5Dget_space(scale_id)) < 0)
+ if ((sid = H5Dget_space(scale_id)) < 0)
goto out;
/* get type */
- if((tid = H5Dget_type(scale_id)) < 0)
+ if ((tid = H5Dget_type(scale_id)) < 0)
goto out;
/* get size of the DS array */
- if((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
+ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
goto out;
/* get type */
- if((mtid=H5Tget_native_type(tid,H5T_DIR_DEFAULT)) < 0)
+ if ((mtid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0)
goto out;
/* get type size */
- if((size=H5Tget_size(mtid))==0)
+ if ((size = H5Tget_size(mtid)) == 0)
goto out;
- if(nelmts) {
- buf=(char *)HDmalloc(((size_t)nelmts*size));
- if(buf==NULL)
+ if (nelmts) {
+ buf = (char *)HDmalloc(((size_t)nelmts * size));
+ if (buf == NULL)
goto out;
- if(H5Dread(scale_id,mtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
+ if (H5Dread(scale_id, mtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- for(i=0; i<nelmts; i++) {
- if(buf[i] != data[i]) {
- printf("read and write buffers differ\n");
+ for (i = 0; i < nelmts; i++) {
+ if (buf[i] != data[i]) {
+ HDprintf("read and write buffers differ\n");
goto out;
}
}
} /* if */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Tclose(tid) < 0)
+ if (H5Tclose(tid) < 0)
goto out;
- if(H5Tclose(mtid) < 0)
+ if (H5Tclose(mtid) < 0)
goto out;
- if(buf)
+ if (buf)
HDfree(buf);
-
return ret;
/* error zone */
out:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Sclose(sid);
H5Tclose(tid);
H5Tclose(mtid);
- if(buf) {
+ if (buf) {
HDfree(buf);
}
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
}
-
/*-------------------------------------------------------------------------
* Function: match_dim_scale
*
@@ -3593,71 +3683,70 @@ out:
*-------------------------------------------------------------------------
*/
-static herr_t match_dim_scale(hid_t did, unsigned dim, hid_t dsid, void *visitor_data)
+static herr_t
+match_dim_scale(hid_t did, unsigned dim, hid_t dsid, void *visitor_data)
{
- int ret = 0; /* define a default zero value for return. This will cause the iterator to continue */
- hid_t sid; /* space ID */
- hssize_t nelmts; /* size of a dimension scale array */
- hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
- hsize_t storage_size;
+ int ret = 0; /* define a default zero value for return. This will cause the iterator to continue */
+ hid_t sid; /* space ID */
+ hssize_t nelmts; /* size of a dimension scale array */
+ hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
+ hsize_t storage_size;
/* Stop compiler from whining about "unused parameters" */
visitor_data = visitor_data;
/*-------------------------------------------------------------------------
- * get DID (dataset) space info
- *-------------------------------------------------------------------------
- */
+ * get DID (dataset) space info
+ *-------------------------------------------------------------------------
+ */
/* get dataset space */
- if((sid = H5Dget_space(did)) < 0)
+ if ((sid = H5Dget_space(did)) < 0)
goto out;
/* get dimensions of dataset */
- if(H5Sget_simple_extent_dims(sid,dims,NULL) < 0)
+ if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
goto out;
/* close the dataspace id */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * get DSID (scale) space info
- *-------------------------------------------------------------------------
- */
+ * get DSID (scale) space info
+ *-------------------------------------------------------------------------
+ */
/* get the space for the scale */
- if((sid = H5Dget_space(dsid)) < 0)
+ if ((sid = H5Dget_space(dsid)) < 0)
goto out;
/* get size of the DS array */
- if((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
+ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0)
goto out;
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/* the size of the DS array must match the dimension of the dataset */
- if(nelmts == (hssize_t)dims[dim])
+ if (nelmts == (hssize_t)dims[dim])
ret = 1;
/* if the scale is empty assume it cannot be used */
- storage_size=H5Dget_storage_size(dsid);
+ storage_size = H5Dget_storage_size(dsid);
- if(storage_size==0)
+ if (storage_size == 0)
ret = 0;
return ret;
out:
- H5E_BEGIN_TRY {
- H5Sclose(sid);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Sclose(sid); }
+ H5E_END_TRY;
return FAIL;
}
-
/*-------------------------------------------------------------------------
* Function: op_continue
*
@@ -3675,14 +3764,15 @@ out:
*-------------------------------------------------------------------------
*/
-static herr_t op_continue(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
+static herr_t
+op_continue(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
{
/* Stop compiler from whining about "unused parameters" */
- dset = dset;
- dim = dim;
+ dset = dset;
+ dim = dim;
scale_id = scale_id;
- if ( visitor_data != NULL ) {
+ if (visitor_data != NULL) {
(*(int *)visitor_data)++;
}
@@ -3707,14 +3797,15 @@ static herr_t op_continue(hid_t dset, unsigned dim, hid_t scale_id, void *visito
*-------------------------------------------------------------------------
*/
-static herr_t op_stop(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
+static herr_t
+op_stop(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
{
/* Stop compiler from whining about "unused parameters" */
- dset = dset;
- dim = dim;
+ dset = dset;
+ dim = dim;
scale_id = scale_id;
- if ( visitor_data != NULL ) {
+ if (visitor_data != NULL) {
(*(int *)visitor_data)++;
}
@@ -3727,360 +3818,356 @@ static herr_t op_stop(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_da
*-------------------------------------------------------------------------
*/
-static int test_errors(void)
+static int
+test_errors(void)
{
- hid_t fid; /* file ID */
- int rank = RANK; /* rank of data dataset */
- int rankds = 1; /* rank of DS dataset */
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */
- hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* scale ID */
- hid_t gid = -1; /* group ID */
- hid_t sid = -1; /* space ID */
- hid_t sidds = -1; /* space ID */
- hsize_t pal_dims[] = {9,3};
-
- printf("Testing error conditions\n");
+ hid_t fid; /* file ID */
+ int rank = RANK; /* rank of data dataset */
+ int rankds = 1; /* rank of DS dataset */
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE}; /* size of data dataset */
+ hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* scale ID */
+ hid_t gid = -1; /* group ID */
+ hid_t sid = -1; /* space ID */
+ hid_t sidds = -1; /* space ID */
+ hsize_t pal_dims[] = {9, 3};
+
+ HDprintf("Testing error conditions\n");
/*-------------------------------------------------------------------------
- * create a file, spaces, dataset and group ids
- *-------------------------------------------------------------------------
- */
+ * create a file, spaces, dataset and group ids
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create a group */
- if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create the data space for the dataset */
- if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
goto out;
/* create the data space for the scale */
- if((sidds = H5Screate_simple(rankds, s1_dim, NULL)) < 0)
+ if ((sidds = H5Screate_simple(rankds, s1_dim, NULL)) < 0)
goto out;
/* create a dataset */
- if((did = H5Dcreate2(fid, "dset_a", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid, "dset_a", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create a dataset for the scale */
- if((dsid = H5Dcreate2(fid, "ds_a", H5T_NATIVE_INT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dcreate2(fid, "ds_a", H5T_NATIVE_INT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attempt to attach a dataset to itself, it should fail
- *-------------------------------------------------------------------------
- */
+ * attempt to attach a dataset to itself, it should fail
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach a dataset to itself");
+ HL_TESTING2("attach a dataset to itself");
- if(H5DSattach_scale(did, did, 0) == SUCCEED)
+ if (H5DSattach_scale(did, did, 0) == SUCCEED)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * attempt to attach a group with a dataset, it should fail
- *-------------------------------------------------------------------------
- */
- TESTING2("attach a group with a dataset");
+ * attempt to attach a group with a dataset, it should fail
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("attach a group with a dataset");
- if(H5DSattach_scale(gid,dsid,0)==SUCCEED)
+ if (H5DSattach_scale(gid, dsid, 0) == SUCCEED)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * attempt to attach a dataset with a group, it should fail
- *-------------------------------------------------------------------------
- */
- TESTING2("attach a dataset with a group");
+ * attempt to attach a dataset with a group, it should fail
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("attach a dataset with a group");
- if(H5DSattach_scale(did,gid,0)==SUCCEED)
+ if (H5DSattach_scale(did, gid, 0) == SUCCEED)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * attempt to set scale for a group, it should fail
- *-------------------------------------------------------------------------
- */
- TESTING2("set scale for a group");
+ * attempt to set scale for a group, it should fail
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("set scale for a group");
- if(H5DSset_scale(gid,"scale 1")==SUCCEED)
+ if (H5DSset_scale(gid, "scale 1") == SUCCEED)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * close IDs for this set
- *-------------------------------------------------------------------------
- */
+ * close IDs for this set
+ *-------------------------------------------------------------------------
+ */
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Sclose(sidds) < 0)
+ if (H5Sclose(sidds) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * try to attach a scale that has scales
- *-------------------------------------------------------------------------
- */
+ * try to attach a scale that has scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach a scale that has scales");
+ HL_TESTING2("attach a scale that has scales");
/* create the data space for the scale */
- if((sidds = H5Screate_simple(rankds, s1_dim, NULL)) < 0)
+ if ((sidds = H5Screate_simple(rankds, s1_dim, NULL)) < 0)
goto out;
/* create a dataset "ds_b" for the scale */
- if((dsid = H5Dcreate2(fid, "ds_b", H5T_NATIVE_INT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dcreate2(fid, "ds_b", H5T_NATIVE_INT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* open the previous written "ds_a" */
- if((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* attach "ds_b" to "ds_a", valid */
- if(H5DSattach_scale(did, dsid, 0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Sclose(sidds) < 0)
+ if (H5Sclose(sidds) < 0)
goto out;
/* open the previous written "dset_a" */
- if((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* open the previous written "ds_a" */
- if((dsid = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* try to attach "ds_a" to "dset_a", not valid */
- if(H5DSattach_scale(did,dsid,0)==SUCCEED)
+ if (H5DSattach_scale(did, dsid, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/* open the previous written "ds_a" */
- if((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* open the previous written "ds_b" */
- if((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b", H5P_DEFAULT)) < 0)
goto out;
/* detach "ds_b" to "ds_a" */
- if(H5DSdetach_scale(did,dsid,0) < 0)
+ if (H5DSdetach_scale(did, dsid, 0) < 0)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * try to attach a dataset that is a scale
- *-------------------------------------------------------------------------
- */
+ * try to attach a dataset that is a scale
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach to a dataset that is a scale");
+ HL_TESTING2("attach to a dataset that is a scale");
/* open the previous written "ds_b", that is a scale */
- if((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b", H5P_DEFAULT)) < 0)
goto out;
/* open the previous written "ds_a" */
- if((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* try to attach "ds_a" to "ds_b", not valid */
- if(H5DSattach_scale(dsid,did,0)==SUCCEED)
+ if (H5DSattach_scale(dsid, did, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * try to attach a scale to an image, pallete or table
- *-------------------------------------------------------------------------
- */
+ * try to attach a scale to an image, pallete or table
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach to a dataset that is a reserved class dataset");
+ HL_TESTING2("attach to a dataset that is a reserved class dataset");
/* make an image */
- if(H5IMmake_image_8bit(fid,"image",(hsize_t)100,(hsize_t)50,NULL) < 0)
+ if (H5IMmake_image_8bit(fid, "image", (hsize_t)100, (hsize_t)50, NULL) < 0)
goto out;
/* make a palette */
- if(H5IMmake_palette(fid,"pallete",pal_dims,NULL) < 0)
+ if (H5IMmake_palette(fid, "pallete", pal_dims, NULL) < 0)
goto out;
/* open the previous written "ds_b" */
- if((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b", H5P_DEFAULT)) < 0)
goto out;
/* open the image dataset */
- if((did = H5Dopen2(fid,"image", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "image", H5P_DEFAULT)) < 0)
goto out;
/* try to attach "ds_a" to the image, not valid */
- if(H5DSattach_scale(did,dsid,0)==SUCCEED)
+ if (H5DSattach_scale(did, dsid, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * is scale
- *-------------------------------------------------------------------------
- */
+ * is scale
+ *-------------------------------------------------------------------------
+ */
- TESTING2("is scale");
+ HL_TESTING2("is scale");
/* open a non scale dataset */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* verify that it is not a dimension scale dataset */
- if((H5DSis_scale(did))==1)
+ if ((H5DSis_scale(did)) == 1)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
/* open the group. */
- if((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
goto out;
/* verify that it is not a dimension scale dataset */
- if((H5DSis_scale(gid))==1)
+ if ((H5DSis_scale(gid)) == 1)
goto out;
/* close */
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * detach
- *-------------------------------------------------------------------------
- */
+ * detach
+ *-------------------------------------------------------------------------
+ */
- TESTING2("detach scale from dataset it is not attached to");
+ HL_TESTING2("detach scale from dataset it is not attached to");
/* open the previous written "ds_a" */
- if((dsid = H5Dopen2(fid,"ds_a", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* open the previous written "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* try to detach "ds_a" from "dset_a" */
- if(H5DSdetach_scale(did,dsid,0)==SUCCEED)
+ if (H5DSdetach_scale(did, dsid, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * detach
- *-------------------------------------------------------------------------
- */
+ * detach
+ *-------------------------------------------------------------------------
+ */
- TESTING2("detach scale from group");
+ HL_TESTING2("detach scale from group");
/* open the previous written "ds_a" */
- if((dsid = H5Dopen2(fid,"ds_a", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_a", H5P_DEFAULT)) < 0)
goto out;
/* open the group. */
- if((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
goto out;
/* try to detach "ds_a" from "grp" */
- if(H5DSdetach_scale(gid,dsid,0)==SUCCEED)
+ if (H5DSdetach_scale(gid, dsid, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * detach
- *-------------------------------------------------------------------------
- */
+ * detach
+ *-------------------------------------------------------------------------
+ */
- TESTING2("detach scale when scale is group");
+ HL_TESTING2("detach scale when scale is group");
/* open the previous written "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* open the group. */
- if((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
goto out;
/* try to detach "grp" from "dset_a" */
- if(H5DSdetach_scale(did,gid,0)==SUCCEED)
+ if (H5DSdetach_scale(did, gid, 0) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
PASSED();
-
/* close */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
goto out;
return 0;
@@ -4095,183 +4182,180 @@ out:
H5Dclose(dsid);
H5Gclose(gid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
-
/*-------------------------------------------------------------------------
* test iterators
*-------------------------------------------------------------------------
*/
-static int test_iterators(void)
+static int
+test_iterators(void)
{
- hid_t fid; /* file ID */
- int rank = RANK; /* rank of data dataset */
- int rankds = 1; /* rank of DS dataset */
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */
- hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
- hid_t gid = -1; /* group ID */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* scale ID */
- char dname[30]; /* dataset name */
+ hid_t fid; /* file ID */
+ int rank = RANK; /* rank of data dataset */
+ int rankds = 1; /* rank of DS dataset */
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE}; /* size of data dataset */
+ hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
+ hid_t gid = -1; /* group ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* scale ID */
+ char dname[30]; /* dataset name */
int i;
- printf("Testing iterators\n");
+ HDprintf("Testing iterators\n");
/*-------------------------------------------------------------------------
- * create a file, spaces, dataset and group ids
- *-------------------------------------------------------------------------
- */
+ * create a file, spaces, dataset and group ids
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create a group */
- if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* close */
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_a",rank,dims,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_a", rank, dims, NULL) < 0)
goto out;
/* make a DS dataset */
- if(H5LTmake_dataset_int(fid,"ds_a",rankds,s1_dim,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a", rankds, s1_dim, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * iterate when the dataset has no scales
- *-------------------------------------------------------------------------
- */
+ * iterate when the dataset has no scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("iterate when the dataset has no scales ");
+ HL_TESTING2("iterate when the dataset has no scales ");
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* try to iterate trough the 1st dimension of "dset_a", return error */
- if(H5DSiterate_scales(did,0,NULL,verify_scale,NULL) < 0)
+ if (H5DSiterate_scales(did, 0, NULL, verify_scale, NULL) < 0)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * iterate on dimension that is outside the rank
- *-------------------------------------------------------------------------
- */
+ * iterate on dimension that is outside the rank
+ *-------------------------------------------------------------------------
+ */
- TESTING2("iterate on dimension that is outside the rank ");
+ HL_TESTING2("iterate on dimension that is outside the rank ");
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* try to iterate trough the 3rd dimension of "dset_a", return error */
- if(H5DSiterate_scales(did,3,NULL,verify_scale,NULL)==SUCCEED)
+ if (H5DSiterate_scales(did, 3, NULL, verify_scale, NULL) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * iterate for dimension with many scales
- *-------------------------------------------------------------------------
- */
+ * iterate for dimension with many scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("iterate for dimension with many scales ");
+ HL_TESTING2("iterate for dimension with many scales ");
/* open the previously written "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- for(i=0; i<100; i++) {
+ for (i = 0; i < 100; i++) {
/* make a DS */
- sprintf(dname,"ds_%d",i);
- if(H5LTmake_dataset_int(fid,dname,rankds,s1_dim,NULL) < 0)
+ HDsprintf(dname, "ds_%d", i);
+ if (H5LTmake_dataset_int(fid, dname, rankds, s1_dim, NULL) < 0)
goto out;
/* open */
- if((dsid = H5Dopen2(fid,dname, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
/* attach */
- if(H5DSattach_scale(did,dsid,0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
/* close */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
/* iterate trough the 1st dimension of "dset_a" */
- if(H5DSiterate_scales(did,0,NULL,op_continue,NULL) < 0)
+ if (H5DSiterate_scales(did, 0, NULL, op_continue, NULL) < 0)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * iterate on group
- *-------------------------------------------------------------------------
- */
+ * iterate on group
+ *-------------------------------------------------------------------------
+ */
- TESTING2("iterate on group ");
+ HL_TESTING2("iterate on group ");
/* open */
- if((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "grp", H5P_DEFAULT)) < 0)
goto out;
/* try to iterate, return error */
- if(H5DSiterate_scales(gid,0,NULL,verify_scale,NULL)==SUCCEED)
+ if (H5DSiterate_scales(gid, 0, NULL, verify_scale, NULL) == SUCCEED)
goto out;
/* close */
- if(H5Gclose(gid) < 0)
+ if (H5Gclose(gid) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * iterate in deleted scales
- *-------------------------------------------------------------------------
- */
+ * iterate in deleted scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("iterate in deleted scales ");
+ HL_TESTING2("iterate in deleted scales ");
- if(H5Ldelete(fid, "ds_0", H5P_DEFAULT) < 0)
+ if (H5Ldelete(fid, "ds_0", H5P_DEFAULT) < 0)
goto out;
/* open the previously written "dset_a" */
- if((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* iterate */
- if(H5DSiterate_scales(did, 0, NULL, op_continue, NULL) == SUCCEED)
+ if (H5DSiterate_scales(did, 0, NULL, op_continue, NULL) == SUCCEED)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
/* close */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
goto out;
return 0;
@@ -4283,201 +4367,202 @@ out:
H5Gclose(gid);
H5Dclose(did);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
/*-------------------------------------------------------------------------
* test several ranks
*-------------------------------------------------------------------------
*/
-static int test_rank(void)
+static int
+test_rank(void)
{
- hid_t fid; /* file ID */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* scale ID */
- hid_t sid = -1; /* space ID */
- hid_t sidds = -1; /* space ID */
- hsize_t dims1[1] = {DIM1_SIZE}; /* size of data dataset */
- hsize_t dims2[2] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */
- hsize_t dims3[3] = {DIM1_SIZE,DIM2_SIZE,DIM3_SIZE}; /* size of data dataset */
- hsize_t dimss[2] = {1,1}; /* size of data dataset */
- char name[30]; /* dataset name buffer */
- char names[30]; /* dataset scale name buffer */
- char namel[30]; /* dataset label name buffer */
- int bufi[1]={2};
- float buff[1]={1};
+ hid_t fid; /* file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* scale ID */
+ hid_t sid = -1; /* space ID */
+ hid_t sidds = -1; /* space ID */
+ hsize_t dims1[1] = {DIM1_SIZE}; /* size of data dataset */
+ hsize_t dims2[2] = {DIM1_SIZE, DIM2_SIZE}; /* size of data dataset */
+ hsize_t dims3[3] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE}; /* size of data dataset */
+ hsize_t dimss[2] = {1, 1}; /* size of data dataset */
+ char name[30]; /* dataset name buffer */
+ char names[30]; /* dataset scale name buffer */
+ char namel[30]; /* dataset label name buffer */
+ int bufi[1] = {2};
+ float buff[1] = {1};
int i;
- printf("Testing ranks\n");
+ HDprintf("Testing ranks\n");
/*-------------------------------------------------------------------------
- * create a file, a dataset, scales
- *-------------------------------------------------------------------------
- */
+ * create a file, a dataset, scales
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid=H5Fcreate(FILE4,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* make a dataset a 3D data dataset */
- if(H5LTmake_dataset_int(fid,"dset_a",3,dims3,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_a", 3, dims3, NULL) < 0)
goto out;
/* make a 1D scale dataset */
- if(H5LTmake_dataset_int(fid,"ds_a_0",1,dims1,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_0", 1, dims1, NULL) < 0)
goto out;
/* make a 2D scale dataset */
- if(H5LTmake_dataset_int(fid,"ds_a_1",2,dims2,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_1", 2, dims2, NULL) < 0)
goto out;
/* make a 3D scale dataset */
- if(H5LTmake_dataset_int(fid,"ds_a_2",3,dims3,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds_a_2", 3, dims3, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach
- *-------------------------------------------------------------------------
- */
+ * attach
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach");
+ HL_TESTING2("attach");
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 3; i++) {
+ HDsprintf(name, "ds_a_%d", i);
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,(unsigned)i) < 0)
+ if (H5DSattach_scale(did, dsid, (unsigned)i) < 0)
goto out;
- if(H5DSis_attached(did,dsid,(unsigned)i)<=0)
+ if (H5DSis_attached(did, dsid, (unsigned)i) <= 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * detach
- *-------------------------------------------------------------------------
- */
+ * detach
+ *-------------------------------------------------------------------------
+ */
- TESTING2("detach");
+ HL_TESTING2("detach");
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 3; i++) {
+ HDsprintf(name, "ds_a_%d", i);
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSdetach_scale(did,dsid,(unsigned)i) < 0)
+ if (H5DSdetach_scale(did, dsid, (unsigned)i) < 0)
goto out;
- if(H5DSis_attached(did,dsid,(unsigned)i)!=0)
+ if (H5DSis_attached(did, dsid, (unsigned)i) != 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * attach, set, get names, labels
- *-------------------------------------------------------------------------
- */
+ * attach, set, get names, labels
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach, set, get names, labels");
+ HL_TESTING2("attach, set, get names, labels");
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- for(i=0; i<3; i++) {
- sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen2(fid,name, H5P_DEFAULT)) < 0)
+ for (i = 0; i < 3; i++) {
+ HDsprintf(name, "ds_a_%d", i);
+ if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
- if(H5DSset_scale(dsid,name) < 0)
+ if (H5DSset_scale(dsid, name) < 0)
goto out;
- if(H5DSattach_scale(did,dsid,(unsigned)i) < 0)
+ if (H5DSattach_scale(did, dsid, (unsigned)i) < 0)
goto out;
- if(H5DSis_attached(did,dsid,(unsigned)i)<=0)
+ if (H5DSis_attached(did, dsid, (unsigned)i) <= 0)
goto out;
- if(H5DSget_scale_name(dsid,names,sizeof(names)) < 0)
+ if (H5DSget_scale_name(dsid, names, sizeof(names)) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
- if(H5DSset_label(did,(unsigned)i,name) < 0)
+ if (H5DSset_label(did, (unsigned)i, name) < 0)
goto out;
- if(H5DSget_label(did,(unsigned)i,namel,sizeof(namel)) < 0)
+ if (H5DSget_label(did, (unsigned)i, namel, sizeof(namel)) < 0)
goto out;
- if(HDstrncmp(name, names, sizeof(names))!=0)
+ if (HDstrncmp(name, names, sizeof(names)) != 0)
goto out;
- if(HDstrncmp(name, namel, sizeof(namel))!=0)
+ if (HDstrncmp(name, namel, sizeof(namel)) != 0)
goto out;
}
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * attach a scalar scale
- *-------------------------------------------------------------------------
- */
+ * attach a scalar scale
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attach a scalar scale");
+ HL_TESTING2("attach a scalar scale");
/* create the data space for the dataset */
- if((sid = H5Screate_simple(2, dimss, NULL)) < 0)
+ if ((sid = H5Screate_simple(2, dimss, NULL)) < 0)
goto out;
/* create a dataset of rank 2 */
- if((did = H5Dcreate2(fid, "dset_b", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid, "dset_b", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create a scalar space */
- if((sidds = H5Screate(H5S_SCALAR)) < 0)
+ if ((sidds = H5Screate(H5S_SCALAR)) < 0)
goto out;
/* create a dataset of scalar rank for the scale */
- if((dsid = H5Dcreate2(fid, "ds_b_1", H5T_NATIVE_FLOAT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dcreate2(fid, "ds_b_1", H5T_NATIVE_FLOAT, sidds, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
+ 0)
goto out;
/* write */
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, bufi) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, bufi) < 0)
goto out;
- if(H5Dwrite(dsid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buff) < 0)
+ if (H5Dwrite(dsid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buff) < 0)
goto out;
/* attach */
- if(H5DSattach_scale(did, dsid, 0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
- if(H5DSattach_scale(did, dsid, 1) < 0)
+ if (H5DSattach_scale(did, dsid, 1) < 0)
goto out;
/* close */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
- if(H5Sclose(sidds) < 0)
+ if (H5Sclose(sidds) < 0)
goto out;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if(H5Fclose(fid) < 0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
return 0;
@@ -4491,173 +4576,174 @@ out:
H5Sclose(sidds);
H5Sclose(sid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
/*-------------------------------------------------------------------------
* attach scales with several datatypes
*-------------------------------------------------------------------------
*/
-static int test_types(void)
+static int
+test_types(void)
{
- hid_t fid; /* file ID */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* DS dataset ID */
- int rank = RANK; /* rank of data dataset */
- int rankds = 1; /* rank of DS dataset */
- hsize_t dims[RANK] = {DIM1_SIZE,DIM2_SIZE}; /* size of data dataset */
- int buf[DIM_DATA] = {1,2,3,4,5,6,7,8,9,10,11,12}; /* data of data dataset */
- hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
- hsize_t s2_dim[1] = {DIM2_SIZE}; /* size of DS 2 dataset */
- float s1_float[DIM1_SIZE] = {10,20,30}; /* data of DS 1 dataset */
- unsigned short s2_ushort[DIM2_SIZE] = {10,20,30,40}; /* data of DS 2 dataset */
- const char *s1_str = "ABC";
- const char *s2_str = "ABCD";
-
- printf("Testing scales with several datatypes\n");
+ hid_t fid; /* file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* DS dataset ID */
+ int rank = RANK; /* rank of data dataset */
+ int rankds = 1; /* rank of DS dataset */
+ hsize_t dims[RANK] = {DIM1_SIZE, DIM2_SIZE}; /* size of data dataset */
+ int buf[DIM_DATA] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; /* data of data dataset */
+ hsize_t s1_dim[1] = {DIM1_SIZE}; /* size of DS 1 dataset */
+ hsize_t s2_dim[1] = {DIM2_SIZE}; /* size of DS 2 dataset */
+ float s1_float[DIM1_SIZE] = {10, 20, 30}; /* data of DS 1 dataset */
+ unsigned short s2_ushort[DIM2_SIZE] = {10, 20, 30, 40}; /* data of DS 2 dataset */
+ const char * s1_str = "ABC";
+ const char * s2_str = "ABCD";
+
+ HDprintf("Testing scales with several datatypes\n");
/*-------------------------------------------------------------------------
- * create a file for the test
- *-------------------------------------------------------------------------
- */
+ * create a file for the test
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid=H5Fcreate(FILE5,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create datasets: 1 "data" dataset and 2 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create datasets: 1 "data" dataset and 2 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_a",rank,dims,buf) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_a", rank, dims, buf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_float(fid,DS_1_NAME,rankds,s1_dim,s1_float) < 0)
+ if (H5LTmake_dataset_float(fid, DS_1_NAME, rankds, s1_dim, s1_float) < 0)
goto out;
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset(fid,DS_2_NAME,rankds,s2_dim,H5T_NATIVE_USHORT,s2_ushort) < 0)
+ if (H5LTmake_dataset(fid, DS_2_NAME, rankds, s2_dim, H5T_NATIVE_USHORT, s2_ushort) < 0)
goto out;
/*-------------------------------------------------------------------------
- * floating point and short scales
- *-------------------------------------------------------------------------
- */
+ * floating point and short scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("floating point and short scales");
+ HL_TESTING2("floating point and short scales");
/* get the dataset id for "dset_a" */
- if((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, DS_1_NAME, H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_a" at dimension 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_1_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_1_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, DS_2_NAME, H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_2_NAME dimension scale to "dset_a" at dimension 1 */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_2_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_2_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* set a label */
- if(H5DSset_label(did,DIM0,DIM0_LABEL) < 0)
+ if (H5DSset_label(did, DIM0, DIM0_LABEL) < 0)
goto out;
- if(H5DSset_label(did,DIM1,DIM1_LABEL) < 0)
+ if (H5DSset_label(did, DIM1, DIM1_LABEL) < 0)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * create datasets: 1 "data" dataset and 2 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create datasets: 1 "data" dataset and 2 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* make a dataset */
- if(H5LTmake_dataset_int(fid,"dset_b",rank,dims,buf) < 0)
+ if (H5LTmake_dataset_int(fid, "dset_b", rank, dims, buf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_string(fid,"ds_b_1",s1_str) < 0)
+ if (H5LTmake_dataset_string(fid, "ds_b_1", s1_str) < 0)
goto out;
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_string(fid,"ds_b_2",s2_str) < 0)
+ if (H5LTmake_dataset_string(fid, "ds_b_2", s2_str) < 0)
goto out;
/*-------------------------------------------------------------------------
- * floating point and short scales
- *-------------------------------------------------------------------------
- */
+ * floating point and short scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("string scales");
+ HL_TESTING2("string scales");
/* get the dataset id for "dset_b" */
- if((did = H5Dopen2(fid,"dset_b", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset_b", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_b_1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b_1", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_b" at dimension 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_1_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_1_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"ds_b_2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds_b_2", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_2_NAME dimension scale to "dset_b" at dimension 1 */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_2_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_2_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* set a label */
- if(H5DSset_label(did,DIM0,DIM0_LABEL) < 0)
+ if (H5DSset_label(did, DIM0, DIM0_LABEL) < 0)
goto out;
- if(H5DSset_label(did,DIM1,DIM1_LABEL) < 0)
+ if (H5DSset_label(did, DIM1, DIM1_LABEL) < 0)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if(H5Fclose(fid) < 0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
return 0;
@@ -4669,7 +4755,8 @@ out:
H5Dclose(did);
H5Dclose(dsid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
@@ -4679,144 +4766,142 @@ out:
*-------------------------------------------------------------------------
*/
-static int test_data(void)
+static int
+test_data(void)
{
- hid_t fid; /* file ID */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* DS dataset ID */
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- float *vals=NULL; /* array to hold data values */
- float *latbuf=NULL; /* array to hold the latitude values */
- float *lonbuf=NULL; /* array to hold the longitude values */
- hsize_t dims[2]; /* array to hold dimensions */
- hsize_t latdims[1]; /* array to hold dimensions */
- hsize_t londims[1]; /* array to hold dimensions */
- float fill=-99; /* fill value */
-
-
- printf("Testing reading ASCII data and generate HDF5 data with scales\n");
+ hid_t fid; /* file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* DS dataset ID */
+ hid_t dcpl; /* dataset creation property list */
+ hid_t sid; /* dataspace ID */
+ float * vals = NULL; /* array to hold data values */
+ float * latbuf = NULL; /* array to hold the latitude values */
+ float * lonbuf = NULL; /* array to hold the longitude values */
+ hsize_t dims[2]; /* array to hold dimensions */
+ hsize_t latdims[1]; /* array to hold dimensions */
+ hsize_t londims[1]; /* array to hold dimensions */
+ float fill = -99; /* fill value */
+
+ HDprintf("Testing reading ASCII data and generate HDF5 data with scales\n");
/*-------------------------------------------------------------------------
- * create a file for the test
- *-------------------------------------------------------------------------
- */
+ * create a file for the test
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if((fid=H5Fcreate(FILE6,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * generating scales
- *-------------------------------------------------------------------------
- */
+ * generating scales
+ *-------------------------------------------------------------------------
+ */
- TESTING2("generating scales");
+ HL_TESTING2("generating scales");
/*-------------------------------------------------------------------------
- * create datasets: 1 "data" dataset and 2 dimension scales
- *-------------------------------------------------------------------------
- */
+ * create datasets: 1 "data" dataset and 2 dimension scales
+ *-------------------------------------------------------------------------
+ */
/* read the latitude */
- if(read_data("dslat.txt",1,latdims,&latbuf) < 0)
+ if (read_data("dslat.txt", 1, latdims, &latbuf) < 0)
goto out;
/* make a DS dataset for the first dimension */
- if(H5LTmake_dataset_float(fid, "lat", 1, latdims, latbuf) < 0)
+ if (H5LTmake_dataset_float(fid, "lat", 1, latdims, latbuf) < 0)
goto out;
- HDfree( latbuf );
+ HDfree(latbuf);
latbuf = NULL;
- /* read the longitude */
- if(read_data("dslon.txt",1,londims,&lonbuf) < 0)
+ /* read the longitude */
+ if (read_data("dslon.txt", 1, londims, &lonbuf) < 0)
goto out;
/* make a DS dataset for the second dimension */
- if(H5LTmake_dataset_float(fid, "lon", 1, londims, lonbuf) < 0)
+ if (H5LTmake_dataset_float(fid, "lon", 1, londims, lonbuf) < 0)
goto out;
- HDfree( lonbuf );
+ HDfree(lonbuf);
lonbuf = NULL;
/* make a dataset for the data. a fill value is set */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if(H5Pset_fill_value(dcpl, H5T_NATIVE_FLOAT, &fill) < 0)
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_FLOAT, &fill) < 0)
goto out;
/* read ASCII bathymetry data and dimensions to create dataset */
- if(read_data("dsdata.txt",2,dims,&vals) < 0)
+ if (read_data("dsdata.txt", 2, dims, &vals) < 0)
goto out;
- if((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
goto out;
- if((did = H5Dcreate2(fid, "data", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((did = H5Dcreate2(fid, "data", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto out;
- if(H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, vals) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, vals) < 0)
goto out;
- HDfree ( vals );
+ HDfree(vals);
vals = NULL;
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
- if(H5Pclose(dcpl) < 0)
+ if (H5Pclose(dcpl) < 0)
goto out;
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
goto out;
/*-------------------------------------------------------------------------
- * attach
- *-------------------------------------------------------------------------
- */
+ * attach
+ *-------------------------------------------------------------------------
+ */
/* get the dataset id for "data" */
- if((did = H5Dopen2(fid,"data", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "data", H5P_DEFAULT)) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"lat", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "lat", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_1_NAME dimension scale to "data" at dimension 0 */
- if(H5DSattach_scale(did,dsid,DIM0) < 0)
+ if (H5DSattach_scale(did, dsid, DIM0) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_1_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_1_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* get the DS dataset id */
- if((dsid = H5Dopen2(fid,"lon", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "lon", H5P_DEFAULT)) < 0)
goto out;
/* attach the DS_2_NAME dimension scale to "data" at dimension 1 */
- if(H5DSattach_scale(did,dsid,DIM1) < 0)
+ if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
/* set name */
- if(H5DSset_scale(dsid,SCALE_2_NAME) < 0)
+ if (H5DSset_scale(dsid, SCALE_2_NAME) < 0)
goto out;
/* close DS id */
- if(H5Dclose(dsid) < 0)
+ if (H5Dclose(dsid) < 0)
goto out;
/* set a label */
- if(H5DSset_label(did,DIM0,DIM0_LABEL) < 0)
+ if (H5DSset_label(did, DIM0, DIM0_LABEL) < 0)
goto out;
- if(H5DSset_label(did,DIM1,DIM1_LABEL) < 0)
+ if (H5DSset_label(did, DIM1, DIM1_LABEL) < 0)
goto out;
/* close */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
goto out;
PASSED();
-
-
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if(H5Fclose(fid) < 0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
return 0;
@@ -4828,20 +4913,19 @@ out:
H5Dclose(did);
H5Dclose(dsid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
if (latbuf)
- HDfree( latbuf );
+ HDfree(latbuf);
if (lonbuf)
- HDfree( lonbuf );
+ HDfree(lonbuf);
if (vals)
- HDfree( vals );
+ HDfree(vals);
return FAIL;
}
-
-
/*-------------------------------------------------------------------------
* read_data
* utility function to read ASCII data
@@ -4855,119 +4939,116 @@ out:
*-------------------------------------------------------------------------
*/
-static int read_data( const char* fname,
- int ndims,
- hsize_t *dims,
- float **buf )
+static int
+read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
{
- int i, n;
- unsigned j;
- char str[20];
- size_t nelms;
- FILE *f;
- float val;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char data_file[512]; /* buffer to hold name of existing data file */
-
- HDstrcpy(data_file, "");
- /* compose the name of the file to open, using the srcdir, if appropriate */
- if(srcdir)
- {
- HDstrcpy(data_file, srcdir);
- HDstrcat(data_file, "/");
- }
- /* read first data file */
- HDstrcat(data_file,fname);
+ int i, n;
+ unsigned j;
+ char str[20];
+ size_t nelms;
+ FILE * f;
+ float val;
+ const char *data_file = H5_get_srcdir_filename(fname);
+ /* read first data file */
f = HDfopen(data_file, "r");
- if( f == NULL ) {
- printf( "Could not open file %s\n", data_file );
+ if (f == NULL) {
+ HDprintf("Could not open file %s\n", data_file);
return -1;
}
- for(i=0, nelms=1; i < ndims; i++) {
- fscanf( f, "%s %u", str, &j);
- fscanf( f, "%d",&n );
+ for (i = 0, nelms = 1; i < ndims; i++) {
+ if (fscanf(f, "%s %u", str, &j) && HDferror(f)) {
+ HDprintf("fscanf error in file %s\n", data_file);
+ HDfclose(f);
+ return -1;
+ } /* end if */
+ if (fscanf(f, "%d", &n) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s\n", data_file);
+ HDfclose(f);
+ return -1;
+ } /* end if */
dims[i] = (hsize_t)n;
nelms *= (size_t)n;
}
- *buf = (float*) HDmalloc (nelms * sizeof( float ));
+ *buf = (float *)HDmalloc(nelms * sizeof(float));
- if ( *buf == NULL ) {
- printf( "memory allocation failed\n" );
+ if (*buf == NULL) {
+ HDprintf("memory allocation failed\n");
HDfclose(f);
return -1;
}
- for(j = 0; j < nelms; j++) {
- fscanf( f, "%f",&val );
+ for (j = 0; j < nelms; j++) {
+ if (fscanf(f, "%f", &val) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s\n", data_file);
+ HDfclose(f);
+ return -1;
+ } /* end if */
(*buf)[j] = val;
}
HDfclose(f);
return 1;
-
}
-
/*-------------------------------------------------------------------------
* test parameter errors
*-------------------------------------------------------------------------
*/
-static int test_errors2(void)
+static int
+test_errors2(void)
{
- hid_t fid; /* file ID */
- hid_t did = -1; /* dataset ID */
- hid_t dsid = -1; /* scale ID */
- hsize_t dimd[2] = {3,3}; /* size of data dataset */
- hsize_t dims[1] = {3}; /* size of scale dataset */
- char lbuf[255]; /* label buffer */
- ssize_t label_len; /* label lenght */
- int scale_idx; /* scale index */
- int nscales; /* number of scales in DIM */
- int count; /* visitor data */
-
- printf("Testing parameter errors\n");
+ hid_t fid; /* file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t dsid = -1; /* scale ID */
+ hsize_t dimd[2] = {3, 3}; /* size of data dataset */
+ hsize_t dims[1] = {3}; /* size of scale dataset */
+ char lbuf[255]; /* label buffer */
+ ssize_t label_len; /* label length */
+ int scale_idx; /* scale index */
+ int nscales; /* number of scales in DIM */
+ int count; /* visitor data */
+
+ HDprintf("Testing parameter errors\n");
/*-------------------------------------------------------------------------
- * create a file, a dataset, scales
- *-------------------------------------------------------------------------
- */
+ * create a file, a dataset, scales
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- if ((fid=H5Fcreate(FILE7,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if ((fid = H5Fcreate(FILE7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* make a dataset */
- if (H5LTmake_dataset_int(fid,"dset",2,dimd,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "dset", 2, dimd, NULL) < 0)
goto out;
/* make a scale dataset */
- if(H5LTmake_dataset_int(fid,"ds1",1,dims,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds1", 1, dims, NULL) < 0)
goto out;
/* make a scale dataset */
- if(H5LTmake_dataset_int(fid,"ds2",1,dims,NULL) < 0)
+ if (H5LTmake_dataset_int(fid, "ds2", 1, dims, NULL) < 0)
goto out;
-
- TESTING2("attach scales");
-
+ HL_TESTING2("attach scales");
/*-------------------------------------------------------------------------
- * attach with invalid indices
- *-------------------------------------------------------------------------
- */
+ * attach with invalid indices
+ *-------------------------------------------------------------------------
+ */
- if ((did = H5Dopen2(fid,"dset", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0)
goto out;
- if ((dsid = H5Dopen2(fid,"ds1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds1", H5P_DEFAULT)) < 0)
goto out;
- if (H5DSattach_scale(did,dsid,2) == SUCCEED)
+ if (H5DSattach_scale(did, dsid, 2) == SUCCEED)
goto out;
- if (H5DSattach_scale(did,dsid,0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
if (H5Dclose(dsid) < 0)
goto out;
@@ -4976,19 +5057,19 @@ static int test_errors2(void)
PASSED();
- TESTING2("detach scales");
+ HL_TESTING2("detach scales");
/*-------------------------------------------------------------------------
- * detach with invalid indices
- *-------------------------------------------------------------------------
- */
- if ((did = H5Dopen2(fid,"dset", H5P_DEFAULT)) < 0)
+ * detach with invalid indices
+ *-------------------------------------------------------------------------
+ */
+ if ((did = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0)
goto out;
- if ((dsid = H5Dopen2(fid,"ds1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds1", H5P_DEFAULT)) < 0)
goto out;
- if (H5DSdetach_scale(did,dsid,2) == SUCCEED)
+ if (H5DSdetach_scale(did, dsid, 2) == SUCCEED)
goto out;
- if (H5DSdetach_scale(did,dsid,0) < 0)
+ if (H5DSdetach_scale(did, dsid, 0) < 0)
goto out;
if (H5Dclose(dsid) < 0)
goto out;
@@ -4997,97 +5078,95 @@ static int test_errors2(void)
PASSED();
- TESTING2("set/get label");
+ HL_TESTING2("set/get label");
/*-------------------------------------------------------------------------
- * set/get label invalid indices
- *-------------------------------------------------------------------------
- */
- if ((did = H5Dopen2(fid,"dset", H5P_DEFAULT)) < 0)
+ * set/get label invalid indices
+ *-------------------------------------------------------------------------
+ */
+ if ((did = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0)
goto out;
- if (H5DSset_label(did,2,"label")== SUCCEED)
+ if (H5DSset_label(did, 2, "label") == SUCCEED)
goto out;
- if (H5DSset_label(did,0,"label") < 0)
+ if (H5DSset_label(did, 0, "label") < 0)
goto out;
- if (H5DSget_label(did,2,lbuf,sizeof(lbuf)) == SUCCEED)
+ if (H5DSget_label(did, 2, lbuf, sizeof(lbuf)) == SUCCEED)
goto out;
- if ((label_len=H5DSget_label(did,0,NULL,0)) < 0)
+ if ((label_len = H5DSget_label(did, 0, NULL, 0)) < 0)
goto out;
- if ( label_len != strlen("label") )
+ if (label_len != HDstrlen("label"))
goto out;
- if (H5DSget_label(did,0,lbuf,sizeof(lbuf)) < 0)
+ if (H5DSget_label(did, 0, lbuf, sizeof(lbuf)) < 0)
goto out;
if (H5Dclose(did) < 0)
goto out;
PASSED();
- TESTING2("iterate scales");
-
+ HL_TESTING2("iterate scales");
/*-------------------------------------------------------------------------
- * iterate_scales invalid indices and return DS_IDX and visitor data
- *-------------------------------------------------------------------------
- */
- if ((did = H5Dopen2(fid,"dset", H5P_DEFAULT)) < 0)
+ * iterate_scales invalid indices and return DS_IDX and visitor data
+ *-------------------------------------------------------------------------
+ */
+ if ((did = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0)
goto out;
- if ((dsid = H5Dopen2(fid,"ds1", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds1", H5P_DEFAULT)) < 0)
goto out;
- if (H5DSattach_scale(did,dsid,0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
if (H5Dclose(dsid) < 0)
goto out;
- if ((dsid = H5Dopen2(fid,"ds2", H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dopen2(fid, "ds2", H5P_DEFAULT)) < 0)
goto out;
- if (H5DSattach_scale(did,dsid,0) < 0)
+ if (H5DSattach_scale(did, dsid, 0) < 0)
goto out;
if (H5Dclose(dsid) < 0)
goto out;
- if((nscales = H5DSget_num_scales(did,0)) < 0)
+ if ((nscales = H5DSget_num_scales(did, 0)) < 0)
goto out;
- if(nscales!=2)
+ if (nscales != 2)
goto out;
/* invalid DIM */
- if (H5DSiterate_scales(did,2,NULL,op_continue,NULL)== SUCCEED)
+ if (H5DSiterate_scales(did, 2, NULL, op_continue, NULL) == SUCCEED)
goto out;
/* invalid DS_IDX */
scale_idx = 2;
- if (H5DSiterate_scales(did,0,&scale_idx,op_continue,NULL)== SUCCEED)
+ if (H5DSiterate_scales(did, 0, &scale_idx, op_continue, NULL) == SUCCEED)
goto out;
/* continue iteration */
scale_idx = 0;
- count = 0;
- if (H5DSiterate_scales(did,0,&scale_idx,op_continue,(void *)&count) < 0)
+ count = 0;
+ if (H5DSiterate_scales(did, 0, &scale_idx, op_continue, (void *)&count) < 0)
goto out;
- if ( scale_idx != 1 && count != nscales ) {
+ if (scale_idx != 1 && count != nscales) {
goto out;
}
/* stop iteration */
scale_idx = 0;
- count = 0;
- if (H5DSiterate_scales(did,0,&scale_idx,op_stop,(void *)&count) < 0)
+ count = 0;
+ if (H5DSiterate_scales(did, 0, &scale_idx, op_stop, (void *)&count) < 0)
goto out;
- if ( scale_idx != 0 && count != 1 ) {
+ if (scale_idx != 0 && count != 1) {
goto out;
}
-
if (H5Dclose(did) < 0)
goto out;
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if(H5Fclose(fid) < 0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
PASSED();
@@ -5101,7 +5180,8 @@ out:
H5Dclose(did);
H5Dclose(dsid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
@@ -5111,220 +5191,219 @@ out:
*-------------------------------------------------------------------------
*/
-static int test_attach_detach(void)
+static int
+test_attach_detach(void)
{
- hid_t fid; /* file ID */
- hid_t gid; /* group ID */
- hid_t sid; /* dataspace ID */
- hid_t dcpl_id; /* dataset creation property */
- hid_t dsid = -1; /* DS dataset ID */
- hid_t var1_id, var2_id, var3_id; /* DS component name */
- hsize_t dims[RANK1] = {DIM1};
+ hid_t fid; /* file ID */
+ hid_t gid; /* group ID */
+ hid_t sid; /* dataspace ID */
+ hid_t dcpl_id; /* dataset creation property */
+ hid_t dsid = -1; /* DS dataset ID */
+ hid_t var1_id, var2_id, var3_id; /* DS component name */
+ hsize_t dims[RANK1] = {DIM1};
- TESTING2("permutations of attaching and detaching");
+ HL_TESTING2("permutations of attaching and detaching");
- if((fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto out;
+ if ((fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
- goto out;
+ if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
+ goto out;
/* Create dimension scale. */
- if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
-
- if((sid = H5Screate_simple(1, dims, dims)) < 0)
- goto out;
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
- if((dsid = H5Dcreate2(gid, DS_3_NAME, H5T_IEEE_F32BE, sid,
- H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
- goto out;
+ if ((sid = H5Screate_simple(1, dims, dims)) < 0)
+ goto out;
+
+ if ((dsid = H5Dcreate2(gid, DS_3_NAME, H5T_IEEE_F32BE, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ goto out;
- if(H5Sclose(sid) < 0)
- goto out;
- if(H5Pclose(dcpl_id) < 0)
- goto out;
+ if (H5Sclose(sid) < 0)
+ goto out;
+ if (H5Pclose(dcpl_id) < 0)
+ goto out;
- if(H5DSset_scale(dsid, DS_3_NAME) < 0)
- goto out;
+ if (H5DSset_scale(dsid, DS_3_NAME) < 0)
+ goto out;
/* Create a variable that uses this dimension scale. */
- if((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
- goto out;
+ if ((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
+ goto out;
- if((var1_id = H5Dcreate2(gid, DS_31_NAME, H5T_NATIVE_FLOAT, sid,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto out;
+ if ((var1_id =
+ H5Dcreate2(gid, DS_31_NAME, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- if(H5Sclose(sid) < 0)
- goto out;
+ if (H5Sclose(sid) < 0)
+ goto out;
- if(H5DSattach_scale(var1_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var1_id, dsid, 0) < 0)
+ goto out;
/* Create another variable that uses this dimension scale. */
- if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
- if(H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0)
- goto out;
+ if (H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0)
+ goto out;
- if((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
- goto out;
+ if ((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
+ goto out;
- if((var2_id = H5Dcreate2(gid, DS_32_NAME, H5T_NATIVE_FLOAT, sid,
- H5P_DEFAULT, H5P_DEFAULT,H5P_DEFAULT)) < 0)
- goto out;
+ if ((var2_id =
+ H5Dcreate2(gid, DS_32_NAME, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- if(H5Pclose(dcpl_id) < 0)
- goto out;
+ if (H5Pclose(dcpl_id) < 0)
+ goto out;
- if(H5Sclose(sid) < 0)
- goto out;
+ if (H5Sclose(sid) < 0)
+ goto out;
/* Create 3rd variable that uses this dimension scale. */
- if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
- if(H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0)
- goto out;
+ if (H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0)
+ goto out;
- if((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
- goto out;
+ if ((sid = H5Screate_simple(DIM1, dims, dims)) < 0)
+ goto out;
- if((var3_id = H5Dcreate2(gid, DS_33_NAME, H5T_NATIVE_FLOAT, sid,
- H5P_DEFAULT, H5P_DEFAULT,H5P_DEFAULT)) < 0)
- goto out;
+ if ((var3_id =
+ H5Dcreate2(gid, DS_33_NAME, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+
+ if (H5Pclose(dcpl_id) < 0)
+ goto out;
- if(H5Pclose(dcpl_id) < 0)
- goto out;
+ if (H5Sclose(sid) < 0)
+ goto out;
- if(H5Sclose(sid) < 0)
- goto out;
-
/* Attached var2 scale */
- if(H5DSattach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var2_id, dsid, 0) < 0)
+ goto out;
/* Detach the var2 scale */
- if(H5DSdetach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var2_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
/* Detach the var1 scale */
- if(H5DSdetach_scale(var1_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var1_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
/* Attach the DS again and remove them in the opposite order */
- if(H5DSattach_scale(var1_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var1_id, dsid, 0) < 0)
+ goto out;
- if(H5DSattach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var2_id, dsid, 0) < 0)
+ goto out;
/* Detach the var1 scale */
- if(H5DSdetach_scale(var1_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var1_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) == 0) /* should still be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) == 0) /* should still be attached */
+ goto out;
/* Detach the var2 scale */
- if(H5DSdetach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var2_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
/***************************************************
* Attach Three DS and remove the middle one first
*****************************************************/
- if(H5DSattach_scale(var1_id, dsid, 0) < 0)
- goto out;
-
- if(H5DSattach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var1_id, dsid, 0) < 0)
+ goto out;
- if(H5DSattach_scale(var3_id, dsid, 0) < 0)
- goto out;
+ if (H5DSattach_scale(var2_id, dsid, 0) < 0)
+ goto out;
+ if (H5DSattach_scale(var3_id, dsid, 0) < 0)
+ goto out;
/* Detach the var2 scale */
- if(H5DSdetach_scale(var2_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var2_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var3_id, dsid, 0) == 0) /* should still be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var3_id, dsid, 0) == 0) /* should still be attached */
+ goto out;
/* Detach the var3 scale */
- if(H5DSdetach_scale(var3_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var3_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var3_id, dsid, 0) != 0) /* should not be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) == 0) /* should still be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var3_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
/* Detach the var1 scale */
- if(H5DSdetach_scale(var1_id, dsid, 0) < 0)
- goto out;
+ if (H5DSdetach_scale(var1_id, dsid, 0) < 0)
+ goto out;
/* Check if in correct state of detached and attached */
- if(H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
- goto out;
- if(H5DSis_attached(var3_id, dsid, 0) != 0) /* should not be attached */
- goto out;
+ if (H5DSis_attached(var1_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var2_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
+ if (H5DSis_attached(var3_id, dsid, 0) != 0) /* should not be attached */
+ goto out;
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ * close
+ *-------------------------------------------------------------------------
+ */
- if(H5Dclose(var1_id) < 0)
- goto out;
- if(H5Dclose(var2_id) < 0)
- goto out;
- if(H5Dclose(var3_id) < 0)
- goto out;
- if(H5Dclose(dsid) < 0)
- goto out;
- if(H5Gclose(gid) < 0)
- goto out;
- if(H5Fclose(fid) < 0)
- goto out;
+ if (H5Dclose(var1_id) < 0)
+ goto out;
+ if (H5Dclose(var2_id) < 0)
+ goto out;
+ if (H5Dclose(var3_id) < 0)
+ goto out;
+ if (H5Dclose(dsid) < 0)
+ goto out;
+ if (H5Gclose(gid) < 0)
+ goto out;
+ if (H5Fclose(fid) < 0)
+ goto out;
PASSED();
@@ -5334,13 +5413,14 @@ static int test_attach_detach(void)
out:
H5E_BEGIN_TRY
{
- H5Dclose(var1_id);
- H5Dclose(var2_id);
- H5Dclose(var3_id);
+ H5Dclose(var1_id);
+ H5Dclose(var2_id);
+ H5Dclose(var3_id);
H5Dclose(dsid);
H5Gclose(gid);
H5Fclose(fid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c
index 179e068..d6edbf2 100644
--- a/hl/test/test_dset_opt.c
+++ b/hl/test/test_dset_opt.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
#include <string.h>
@@ -19,76 +19,92 @@
#include <math.h>
#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER)
-# define H5_ZLIB_HEADER "zlib.h"
+#define H5_ZLIB_HEADER "zlib.h"
#endif
#if defined(H5_ZLIB_HEADER)
-# include H5_ZLIB_HEADER /* "zlib.h" */
+#include H5_ZLIB_HEADER /* "zlib.h" */
#endif
#define FILE_NAME "test_dectris.h5"
/* Datasets for Direct Write tests */
-#define DATASETNAME1 "direct_write"
-#define DATASETNAME2 "skip_one_filter"
-#define DATASETNAME3 "skip_two_filters"
-#define DATASETNAME4 "data_conv"
-#define DATASETNAME5 "contiguous_dset"
-#define DATASETNAME6 "invalid_argue"
-#define DATASETNAME7 "overwrite_chunk"
+#define DATASETNAME1 "direct_write"
+#define DATASETNAME2 "skip_one_filter"
+#define DATASETNAME3 "skip_two_filters"
+#define DATASETNAME4 "data_conv"
+#define DATASETNAME5 "contiguous_dset"
+#define DATASETNAME6 "invalid_argue"
+#define DATASETNAME7 "overwrite_chunk"
/* Datasets for Direct Read tests */
-#define DATASETNAME8 "disabled_chunk_cache"
-#define DATASETNAME9 "flush_chunk_cache"
-#define DATASETNAME10 "read_w_valid_cache"
-#define DATASETNAME11 "unallocated_chunk"
-#define DATASETNAME12 "unfiltered_data"
+#define DATASETNAME8 "disabled_chunk_cache"
+#define DATASETNAME9 "flush_chunk_cache"
+#define DATASETNAME10 "read_w_valid_cache"
+#define DATASETNAME11 "unallocated_chunk"
+#define DATASETNAME12 "unfiltered_data"
-#define RANK 2
-#define NX 16
-#define NY 16
-#define CHUNK_NX 4
-#define CHUNK_NY 4
+#define RANK 2
+#define NX 16
+#define NY 16
+#define CHUNK_NX 4
+#define CHUNK_NY 4
-#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12)
/* Temporary filter IDs used for testing */
-#define H5Z_FILTER_BOGUS1 305
-#define H5Z_FILTER_BOGUS2 306
+#define H5Z_FILTER_BOGUS1 305
+#define H5Z_FILTER_BOGUS2 306
#define ADD_ON 7
#define FACTOR 3
/* Constants for the overwrite test */
-#define OVERWRITE_NDIMS 3
-#define OVERWRITE_CHUNK_NX 3
-#define OVERWRITE_CHUNK_2NX 6
-#define OVERWRITE_CHUNK_NY 2
-#define OVERWRITE_VALUE 42
+#define OVERWRITE_NDIMS 3
+#define OVERWRITE_CHUNK_NX 3
+#define OVERWRITE_CHUNK_2NX 6
+#define OVERWRITE_CHUNK_NY 2
+#define OVERWRITE_VALUE 42
+
+/* Test configurations */
+#define CONFIG_LATEST 0x01
+#define CONFIG_REOPEN_FILE 0x02
+#define CONFIG_REOPEN_DSET 0x04
+#define CONFIG_DIRECT_WRITE 0x08
+#define CONFIG_DIRECT_READ 0x10
+#define CONFIG_END 0x20
+
+/* Defines used in test_single_chunk() */
+#define SINGLE_FILE "single.h5"
+#define DATASET "dataset"
+#define DIM0 4
+#define DIM1 32
+#define CHUNK0 DIM0
+#define CHUNK1 DIM1
/* Local prototypes for filter functions */
-static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
-static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
+ size_t nbytes, size_t *buf_size, void **buf);
+static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
+ size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_BOGUS1[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_BOGUS1, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "bogus1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- filter_bogus1, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_BOGUS1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "bogus1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_bogus1, /* The actual filter function */
}};
const H5Z_class2_t H5Z_BOGUS2[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_BOGUS2, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "bogus2", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- filter_bogus2, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_BOGUS2, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "bogus2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_bogus2, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
@@ -106,112 +122,113 @@ const H5Z_class2_t H5Z_BOGUS2[1] = {{
*/
#ifdef H5_HAVE_FILTER_DEFLATE
static int
-test_direct_chunk_write (hid_t file)
+test_direct_chunk_write(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int ret;
- int data[NX][NY];
- int i, j, n;
-
- unsigned filter_mask = 0;
- int direct_buf[CHUNK_NX][CHUNK_NY];
- int check_chunk[CHUNK_NX][CHUNK_NY];
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
-
- const Bytef *z_src = (const Bytef*)(direct_buf);
- Bytef *z_dst = NULL; /*destination buffer */
- uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
- uLong z_src_nbytes = (uLong)buf_size;
- int aggression = 9; /* Compression aggression setting */
- void *outbuf = NULL; /* Pointer to new buffer */
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int ret;
+ int data[NX][NY];
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+
+ const Bytef *z_src = (const Bytef *)(direct_buf);
+ Bytef * z_dst = NULL; /*destination buffer */
+ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ uLong z_src_nbytes = (uLong)buf_size;
+ int aggression = 9; /* Compression aggression setting */
+ void * outbuf = NULL; /* Pointer to new buffer */
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- TESTING("basic functionality of H5DOwrite_chunk");
+ HL_TESTING2("basic functionality of H5DOwrite_chunk");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/*
* Modify dataset creation properties, i.e. enable chunking and compression
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
- if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset =
+ H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
/* Initialize the dataset */
- for(i = n = 0; i < NX; i++)
- for(j = 0; j < NY; j++)
- data[i][j] = n++;
+ for (i = n = 0; i < NX; i++)
+ for (j = 0; j < NY; j++)
+ data[i][j] = n++;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/*
* Write the data for the dataset. It should stay in the chunk cache.
* It will be evicted from the cache by the H5DOwrite_chunk calls.
*/
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- dxpl, data)) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
goto error;
/* Initialize data for one chunk */
- for(i = n = 0; i < CHUNK_NX; i++)
- for(j = 0; j < CHUNK_NY; j++)
- direct_buf[i][j] = n++;
+ for (i = n = 0; i < CHUNK_NX; i++)
+ for (j = 0; j < CHUNK_NY; j++)
+ direct_buf[i][j] = n++;
/* Allocate output (compressed) buffer */
outbuf = HDmalloc(z_dst_nbytes);
- z_dst = (Bytef *)outbuf;
+ z_dst = (Bytef *)outbuf;
/* Perform compression from the source to the destination buffer */
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
/* Check for various zlib errors */
- if(Z_BUF_ERROR == ret) {
+ if (Z_BUF_ERROR == ret) {
HDfprintf(stderr, "overflow");
goto error;
- } else if(Z_MEM_ERROR == ret) {
+ }
+ else if (Z_MEM_ERROR == ret) {
HDfprintf(stderr, "deflate memory error");
goto error;
- } else if(Z_OK != ret) {
+ }
+ else if (Z_OK != ret) {
HDfprintf(stderr, "other deflate error");
goto error;
}
/* Write the compressed chunk data repeatedly to cover all the chunks in the
* dataset, using the direct writing function. */
- for(i=0; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 0; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
offset[1] += CHUNK_NY;
}
@@ -219,36 +236,40 @@ test_direct_chunk_write (hid_t file)
offset[1] = 0;
}
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
- if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
goto error;
/*
* Select hyperslab for one chunk in the file
*/
- start[0] = CHUNK_NX; start[1] = CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ start[0] = CHUNK_NX;
+ start[1] = CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(direct_buf[i][j] != check_chunk[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (direct_buf[i][j] != check_chunk[i][j]) {
HDprintf(" 1. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
@@ -258,25 +279,27 @@ test_direct_chunk_write (hid_t file)
}
/* Reinitialize different data for one chunk */
- for(i = 0; i < CHUNK_NX; i++)
- for(j = 0; j < CHUNK_NY; j++)
- direct_buf[i][j] = i + j;
+ for (i = 0; i < CHUNK_NX; i++)
+ for (j = 0; j < CHUNK_NY; j++)
+ direct_buf[i][j] = i + j;
/* Allocate output (compressed) buffer */
outbuf = HDmalloc(z_dst_nbytes);
- z_dst = (Bytef *)outbuf;
+ z_dst = (Bytef *)outbuf;
/* Perform compression from the source to the destination buffer */
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
/* Check for various zlib errors */
- if(Z_BUF_ERROR == ret) {
+ if (Z_BUF_ERROR == ret) {
HDfprintf(stderr, "overflow");
goto error;
- } else if(Z_MEM_ERROR == ret) {
+ }
+ else if (Z_MEM_ERROR == ret) {
HDfprintf(stderr, "deflate memory error");
goto error;
- } else if(Z_OK != ret) {
+ }
+ else if (Z_OK != ret) {
HDfprintf(stderr, "other deflate error");
goto error;
}
@@ -284,8 +307,8 @@ test_direct_chunk_write (hid_t file)
/* Rewrite the compressed chunk data repeatedly to cover all the chunks in the
* dataset, using the direct writing function. */
offset[0] = offset[1] = 0;
- for(i=0; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 0; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
offset[1] += CHUNK_NY;
}
@@ -293,26 +316,26 @@ test_direct_chunk_write (hid_t file)
offset[1] = 0;
}
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
- if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(direct_buf[i][j] != check_chunk[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (direct_buf[i][j] != check_chunk[i][j]) {
HDprintf(" 2. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
@@ -334,15 +357,17 @@ test_direct_chunk_write (hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
H5_FAILED();
@@ -366,24 +391,24 @@ error:
static int
test_direct_chunk_overwrite_data(hid_t fid)
{
- size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t);
- int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
- int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
- uint32_t filter_mask = 0;
- hid_t tid = H5T_NATIVE_UINT16;
- hid_t dcpl_id = -1;
- hid_t sid = -1;
- hid_t did = -1;
- uint16_t fill_value = 0;
- hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
- hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
- hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX};
- hsize_t offset[] = {0, 0, 0};
- hsize_t i, j;
- int16_t n;
- int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX];
-
- TESTING("overwriting existing data with H5DOwrite_chunk");
+ size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t);
+ int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
+ int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
+ uint32_t filter_mask = 0;
+ hid_t tid = H5T_NATIVE_UINT16;
+ hid_t dcpl_id = -1;
+ hid_t sid = -1;
+ hid_t did = -1;
+ uint16_t fill_value = 0;
+ hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
+ hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
+ hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX};
+ hsize_t offset[] = {0, 0, 0};
+ hsize_t i, j;
+ int16_t n;
+ int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX];
+
+ HL_TESTING2("overwriting existing data with H5DOwrite_chunk");
/* Create the dataset's data space */
if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0)
@@ -405,7 +430,7 @@ test_direct_chunk_overwrite_data(hid_t fid)
n = 0;
for (i = 0; i < OVERWRITE_CHUNK_NY; i++) {
for (j = 0; j < OVERWRITE_CHUNK_NX; j++) {
- data_buf[i][j] = n++;
+ data_buf[i][j] = n++;
overwrite_buf[i][j] = OVERWRITE_VALUE;
}
}
@@ -446,18 +471,20 @@ test_direct_chunk_overwrite_data(hid_t fid)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Pclose(dcpl_id);
H5Sclose(sid);
H5Dclose(did);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
} /* end test_direct_chunk_overwrite_data() */
/*-------------------------------------------------------------------------
- * Function: test_skip_compress_write1
+ * Function: test_skip_compress_write1
*
* Purpose: Test skipping compression filter when it is the only filter
* for the dataset
@@ -473,70 +500,70 @@ error:
static int
test_skip_compress_write1(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int i, j, n;
-
- unsigned filter_mask = 0;
- int direct_buf[CHUNK_NX][CHUNK_NY];
- int check_chunk[CHUNK_NX][CHUNK_NY];
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
- int aggression = 9; /* Compression aggression setting */
-
- unsigned read_filter_mask = 0; /* filter mask after direct read */
- int read_direct_buf[CHUNK_NX][CHUNK_NY];
- hsize_t read_buf_size = 0; /* buf size */
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
+
+ unsigned read_filter_mask = 0; /* filter mask after direct read */
+ int read_direct_buf[CHUNK_NX][CHUNK_NY];
+ hsize_t read_buf_size = 0; /* buf size */
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- TESTING("skipping compression filter for H5DOwrite_chunk/H5DOread_chunk");
+ HL_TESTING2("skipping compression filter for H5DOwrite_chunk/H5DOread_chunk");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/*
* Modify dataset creation properties, i.e. enable chunking and compression
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
- if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset =
+ H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Initialize data for one chunk */
- for(i = n = 0; i < CHUNK_NX; i++)
- for(j = 0; j < CHUNK_NY; j++) {
- direct_buf[i][j] = n++;
- }
+ for (i = n = 0; i < CHUNK_NX; i++)
+ for (j = 0; j < CHUNK_NY; j++) {
+ direct_buf[i][j] = n++;
+ }
/* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
* Indicate skipping the compression filter. */
@@ -545,36 +572,40 @@ test_skip_compress_write1(hid_t file)
filter_mask = 0x00000001;
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
goto error;
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
- if((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0)
goto error;
/*
* Select hyperslab for the chunk just written in the file
*/
- start[0] = CHUNK_NX; start[1] = CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ start[0] = CHUNK_NX;
+ start[1] = CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(direct_buf[i][j] != check_chunk[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (direct_buf[i][j] != check_chunk[i][j]) {
HDprintf(" 1. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
@@ -584,22 +615,22 @@ test_skip_compress_write1(hid_t file)
}
/* Query chunk storage size */
- if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
+ if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
goto error;
- if(read_buf_size != buf_size)
+ if (read_buf_size != buf_size)
goto error;
/* Read the raw chunk back */
HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
- if((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
+ if ((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
goto error;
- if(read_filter_mask != filter_mask)
+ if (read_filter_mask != filter_mask)
goto error;
/* Check that the direct chunk read is the same as the chunk written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(direct_buf[i][j] != read_direct_buf[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (direct_buf[i][j] != read_direct_buf[i][j]) {
HDprintf(" 1. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
@@ -621,13 +652,15 @@ test_skip_compress_write1(hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -647,26 +680,25 @@ error:
*/
static size_t
filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
- const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
+ const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf)
{
- int *int_ptr=(int *)*buf; /* Pointer to the data values */
- ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
+ int * int_ptr = (int *)*buf; /* Pointer to the data values */
+ ssize_t buf_left = (ssize_t)*buf_size; /* Amount of data buffer left to process */
- if(flags & H5Z_FLAG_REVERSE) { /* read */
+ if (flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
- while(buf_left>0) {
+ while (buf_left > 0) {
*int_ptr++ -= (int)ADD_ON;
buf_left -= (ssize_t)sizeof(int);
- } /* end while */
- } /* end if */
+ } /* end while */
+ } /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
- while(buf_left>0) {
+ while (buf_left > 0) {
*int_ptr++ += (int)ADD_ON;
buf_left -= (ssize_t)sizeof(int);
} /* end while */
- } /* end else */
+ } /* end else */
return nbytes;
} /* filter_bogus1() */
@@ -684,26 +716,25 @@ filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
*/
static size_t
filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
- const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
+ const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf)
{
- int *int_ptr=(int *)*buf; /* Pointer to the data values */
- ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
+ int * int_ptr = (int *)*buf; /* Pointer to the data values */
+ ssize_t buf_left = (ssize_t)*buf_size; /* Amount of data buffer left to process */
- if(flags & H5Z_FLAG_REVERSE) { /* read */
+ if (flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
- while(buf_left>0) {
+ while (buf_left > 0) {
*int_ptr++ /= (int)FACTOR;
buf_left -= (ssize_t)sizeof(int);
- } /* end while */
- } /* end if */
+ } /* end while */
+ } /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
- while(buf_left>0) {
+ while (buf_left > 0) {
*int_ptr++ *= (int)FACTOR;
buf_left -= (ssize_t)sizeof(int);
} /* end while */
- } /* end else */
+ } /* end else */
return nbytes;
} /* filter_bogus2() */
@@ -725,87 +756,87 @@ filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
static int
test_skip_compress_write2(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int i, j, n;
-
- unsigned filter_mask = 0; /* orig filter mask */
- int origin_direct_buf[CHUNK_NX][CHUNK_NY];
- int direct_buf[CHUNK_NX][CHUNK_NY];
- int check_chunk[CHUNK_NX][CHUNK_NY];
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
- int aggression = 9; /* Compression aggression setting */
-
- unsigned read_filter_mask = 0; /* filter mask after direct read */
- int read_direct_buf[CHUNK_NX][CHUNK_NY];
- hsize_t read_buf_size = 0; /* buf size */
-
- hsize_t start[2]; /* Start of hyperslab */
- hsize_t stride[2]; /* Stride of hyperslab */
- hsize_t count[2]; /* Block count */
- hsize_t block[2]; /* Block sizes */
-
- TESTING("skipping compression filters but keep two other filters");
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+
+ unsigned filter_mask = 0; /* orig filter mask */
+ int origin_direct_buf[CHUNK_NX][CHUNK_NY];
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
+
+ unsigned read_filter_mask = 0; /* filter mask after direct read */
+ int read_direct_buf[CHUNK_NX][CHUNK_NY];
+ hsize_t read_buf_size = 0; /* buf size */
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ HL_TESTING2("skipping compression filters but keep two other filters");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/*
* Modify dataset creation properties, i.e. enable chunking and compression.
* The order of filters is bogus 1 + deflate + bogus 2.
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
/* Register and enable first bogus filter */
- if(H5Zregister (H5Z_BOGUS1) < 0)
+ if (H5Zregister(H5Z_BOGUS1) < 0)
goto error;
- if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0)
+ if (H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0)
goto error;
/* Enable compression filter */
- if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
/* Register and enable second bogus filter */
- if(H5Zregister (H5Z_BOGUS2) < 0)
+ if (H5Zregister(H5Z_BOGUS2) < 0)
goto error;
- if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0)
+ if (H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0)
goto error;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset =
+ H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Initialize data for one chunk. Apply operations of two bogus filters to the chunk */
- for(i = n = 0; i < CHUNK_NX; i++)
- for(j = 0; j < CHUNK_NY; j++) {
+ for (i = n = 0; i < CHUNK_NX; i++)
+ for (j = 0; j < CHUNK_NY; j++) {
origin_direct_buf[i][j] = n++;
- direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR;
+ direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR;
}
/* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
@@ -816,61 +847,66 @@ test_skip_compress_write2(hid_t file)
/* compression filter is the middle one to be skipped */
filter_mask = 0x00000002;
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
goto error;
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
- if((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0)
goto error;
/*
* Select hyperslab for one chunk in the file
*/
- start[0] = CHUNK_NX; start[1] = CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ start[0] = CHUNK_NX;
+ start[1] = CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(origin_direct_buf[i][j] != check_chunk[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (origin_direct_buf[i][j] != check_chunk[i][j]) {
HDprintf(" 1. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j], check_chunk[i][j]);
+ HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j],
+ check_chunk[i][j]);
goto error;
}
}
}
/* Query chunk storage size */
- if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
+ if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
goto error;
- if(read_buf_size != buf_size)
+ if (read_buf_size != buf_size)
goto error;
/* Read the raw chunk back */
HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
- if((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
+ if ((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
goto error;
- if(read_filter_mask != filter_mask)
+ if (read_filter_mask != filter_mask)
goto error;
/* Check that the direct chunk read is the same as the chunk written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if(direct_buf[i][j] != read_direct_buf[i][j]) {
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if (direct_buf[i][j] != read_direct_buf[i][j]) {
HDprintf(" 1. Read different values than written.");
HDprintf(" At index %d,%d\n", i, j);
HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
@@ -892,13 +928,15 @@ test_skip_compress_write2(hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -924,99 +962,98 @@ test_data_conv(hid_t file)
int a, b, c[4], d, e;
} src_type_t;
typedef struct {
- int a, c[4], e;
+ int a, c[4], e;
} dst_type_t;
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int i, j, n;
- const hsize_t four = 4;
- hid_t st=-1, dt=-1;
- hid_t array_dt;
-
- unsigned filter_mask = 0;
- src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
- dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
- src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5DOread_chunk */
-
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(src_type_t);
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+ const hsize_t four = 4;
+ hid_t st = -1, dt = -1;
+ hid_t array_dt;
+
+ unsigned filter_mask = 0;
+ src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
+ dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
+ src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5DOread_chunk */
+
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(src_type_t);
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- TESTING("data conversion for H5DOwrite_chunk/H5DOread_chunk");
+ HL_TESTING2("data conversion for H5DOwrite_chunk/H5DOread_chunk");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/*
* Modify dataset creation properties, i.e. enable chunking
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
/* Build hdf5 datatypes */
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
- if((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 ||
- H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 ||
- H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 ||
- H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 ||
- H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 ||
- H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0)
+ if ((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 ||
+ H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 ||
+ H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0)
goto error;
- if(H5Tclose(array_dt) < 0)
+ if (H5Tclose(array_dt) < 0)
goto error;
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
- if((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 ||
- H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 ||
- H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 ||
- H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0)
+ if ((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 ||
+ H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 ||
+ H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0)
goto error;
- if(H5Tclose(array_dt) < 0)
+ if (H5Tclose(array_dt) < 0)
goto error;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Initialize data for one chunk */
- for(i = n = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- (direct_buf[i][j]).a = i*j+0;
- (direct_buf[i][j]).b = i*j+1;
- (direct_buf[i][j]).c[0] = i*j+2;
- (direct_buf[i][j]).c[1] = i*j+3;
- (direct_buf[i][j]).c[2] = i*j+4;
- (direct_buf[i][j]).c[3] = i*j+5;
- (direct_buf[i][j]).d = i*j+6;
- (direct_buf[i][j]).e = i*j+7;
+ for (i = n = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ (direct_buf[i][j]).a = i * j + 0;
+ (direct_buf[i][j]).b = i * j + 1;
+ (direct_buf[i][j]).c[0] = i * j + 2;
+ (direct_buf[i][j]).c[1] = i * j + 3;
+ (direct_buf[i][j]).c[2] = i * j + 4;
+ (direct_buf[i][j]).c[3] = i * j + 5;
+ (direct_buf[i][j]).d = i * j + 6;
+ (direct_buf[i][j]).e = i * j + 7;
}
}
@@ -1025,43 +1062,45 @@ test_data_conv(hid_t file)
offset[0] = CHUNK_NX;
offset[1] = CHUNK_NY;
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
goto error;
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
- if((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0)
goto error;
/* Use H5DOread_chunk() to read the uncompressed data */
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, read_chunk)) < 0)
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, read_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if ((direct_buf[i][j]).a != (read_chunk[i][j]).a ||
- (direct_buf[i][j]).b != (read_chunk[i][j]).b ||
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if ((direct_buf[i][j]).a != (read_chunk[i][j]).a ||
+ (direct_buf[i][j]).b != (read_chunk[i][j]).b ||
(direct_buf[i][j]).c[0] != (read_chunk[i][j]).c[0] ||
(direct_buf[i][j]).c[1] != (read_chunk[i][j]).c[1] ||
(direct_buf[i][j]).c[2] != (read_chunk[i][j]).c[2] ||
(direct_buf[i][j]).c[3] != (read_chunk[i][j]).c[3] ||
- (direct_buf[i][j]).d != (read_chunk[i][j]).d ||
- (direct_buf[i][j]).e != (read_chunk[i][j]).e) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
- (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- (read_chunk[i][j]).a, (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1],
- (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d, (read_chunk[i][j]).e);
-
- goto error;
+ (direct_buf[i][j]).d != (read_chunk[i][j]).d ||
+ (direct_buf[i][j]).e != (read_chunk[i][j]).e) {
+ HDprintf(" 1. Read different values than written.");
+ HDprintf(" At index %d,%d\n", i, j);
+ HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
+ (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
+ (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
+ (direct_buf[i][j]).e);
+ HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (read_chunk[i][j]).a,
+ (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1],
+ (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d,
+ (read_chunk[i][j]).e);
+
+ goto error;
}
}
}
@@ -1069,36 +1108,41 @@ test_data_conv(hid_t file)
/*
* Select hyperslab for the chunk just written in the file
*/
- start[0] = CHUNK_NX; start[1] = CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ start[0] = CHUNK_NX;
+ start[1] = CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back. Data should be converted */
- if((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
goto error;
/* Check that the values read are the same as the values written */
- for(i = 0; i < CHUNK_NX; i++) {
- for(j = 0; j < CHUNK_NY; j++) {
- if ((direct_buf[i][j]).a != (check_chunk[i][j]).a ||
+ for (i = 0; i < CHUNK_NX; i++) {
+ for (j = 0; j < CHUNK_NY; j++) {
+ if ((direct_buf[i][j]).a != (check_chunk[i][j]).a ||
(direct_buf[i][j]).c[0] != (check_chunk[i][j]).c[0] ||
(direct_buf[i][j]).c[1] != (check_chunk[i][j]).c[1] ||
(direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] ||
(direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] ||
- (direct_buf[i][j]).e != (check_chunk[i][j]).e) {
- HDprintf(" 1. Read different values than written.");
- HDprintf(" At index %d,%d\n", i, j);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
- (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e);
- HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n",
- (check_chunk[i][j]).a, (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
- (check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
-
- goto error;
+ (direct_buf[i][j]).e != (check_chunk[i][j]).e) {
+ HDprintf(" 1. Read different values than written.");
+ HDprintf(" At index %d,%d\n", i, j);
+ HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
+ (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
+ (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
+ (direct_buf[i][j]).e);
+ HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", (check_chunk[i][j]).a,
+ (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
+ (check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
+
+ goto error;
}
}
}
@@ -1114,12 +1158,12 @@ test_data_conv(hid_t file)
H5Tclose(st);
H5Tclose(dt);
-
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
@@ -1127,7 +1171,8 @@ error:
H5Pclose(dxpl);
H5Tclose(st);
H5Tclose(dt);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -1149,52 +1194,52 @@ error:
static int
test_invalid_parameters(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int i, j, n;
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
- unsigned filter_mask = 0;
- int direct_buf[CHUNK_NX][CHUNK_NY];
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
- int aggression = 9; /* Compression aggression setting */
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
- hsize_t chunk_nbytes; /* Chunk size */
+ hsize_t chunk_nbytes; /* Chunk size */
- TESTING("invalid parameters for H5DOwrite_chunk/H5DOread_chunk");
+ HL_TESTING2("invalid parameters for H5DOwrite_chunk/H5DOread_chunk");
/*
* Create the data space with unlimited dimensions.
*/
- if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/*
* Modify dataset creation properties
*/
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
/*
* Create a new contiguous dataset to verify H5DOwrite_chunk/H5DOread_chunk doesn't work
*/
- if((dataset = H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset =
+ H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Initialize data for one chunk */
- for(i = n = 0; i < CHUNK_NX; i++)
- for(j = 0; j < CHUNK_NY; j++) {
+ for (i = n = 0; i < CHUNK_NX; i++)
+ for (j = 0; j < CHUNK_NY; j++) {
direct_buf[i][j] = n++;
}
@@ -1202,123 +1247,154 @@ test_invalid_parameters(hid_t file)
offset[0] = CHUNK_NX;
offset[1] = CHUNK_NY;
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Try to get chunk size for a contiguous dataset. It should fail */
- H5E_BEGIN_TRY {
- if((status = H5Dget_chunk_storage_size(dataset, offset, &chunk_nbytes)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5Dget_chunk_storage_size(dataset, offset, &chunk_nbytes)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Try to H5DOread_chunk from the contiguous dataset. It should fail */
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
-
/* Create a chunked dataset with compression filter */
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
- if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
/*
* Create a new dataset within the file using cparms
* creation properties.
*/
- if((dataset = H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset =
+ H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
/* Check invalid dataset ID for H5DOwrite_chunk and H5DOread_chunk */
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check invalid DXPL ID for H5DOwrite_chunk and H5DOread_chunk */
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check invalid OFFSET for H5DOwrite_chunk and H5DOread_chunk */
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, dxpl, NULL, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, dxpl, NULL, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check when OFFSET is out of dataset range for H5DOwrite_chunk and H5DOread_chunk */
offset[0] = NX + 1;
offset[1] = NY;
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check when OFFSET is not on chunk boundary for H5DOwrite_chunk and H5DOread_chunk */
offset[0] = CHUNK_NX;
offset[1] = CHUNK_NY + 1;
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check invalid buffer size for H5DOwrite_chunk only */
offset[0] = CHUNK_NX;
offset[1] = CHUNK_NY;
- buf_size = 0;
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ buf_size = 0;
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
/* Check invalid data buffer for H5DOwrite_chunk and H5DOread_chunk */
- buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
- H5E_BEGIN_TRY {
- if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL)
+ buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- H5E_BEGIN_TRY {
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, NULL)) != FAIL)
+ H5E_BEGIN_TRY
+ {
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, NULL)) != FAIL)
goto error;
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
goto error;
/*
@@ -1333,13 +1409,15 @@ test_invalid_parameters(hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -1361,130 +1439,138 @@ error:
*/
#ifdef H5_HAVE_FILTER_DEFLATE
static int
-test_direct_chunk_read_no_cache (hid_t file)
+test_direct_chunk_read_no_cache(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1, dapl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
- herr_t status; /* status from H5 function calls */
- int ret; /* deflate return status */
- int data[NX][NY];
- int i, j, k, l, n; /* local index variables */
-
- unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
- int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
- int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
- hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
-
- Bytef *z_src = NULL; /* source buffer */
- uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
- Bytef *z_dst = (Bytef*)(direct_buf);
- uLong z_dst_nbytes = (uLong)buf_size;
- int aggression = 9; /* Compression aggression setting */
- void *outbuf = NULL; /* Pointer to new buffer */
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1, dapl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status; /* status from H5 function calls */
+ int ret; /* deflate return status */
+ int data[NX][NY];
+ int i, j, k, l, n; /* local index variables */
+
+ unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
+ int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
+ int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
+ hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+
+ Bytef *z_src = NULL; /* source buffer */
+ uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ Bytef *z_dst = (Bytef *)(direct_buf);
+ uLong z_dst_nbytes = (uLong)buf_size;
+ int aggression = 9; /* Compression aggression setting */
+ void * outbuf = NULL; /* Pointer to new buffer */
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- TESTING("basic functionality of H5DOread_chunk (chunk cache disabled)");
+ HL_TESTING2("basic functionality of H5DOread_chunk (chunk cache disabled)");
/* Create the data space with unlimited dimensions. */
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/* Modify dataset creation properties, i.e. enable chunking and compression */
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
- if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
- if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
goto error;
/* Disable chunk cache by setting number of slots to 0 */
- if((status = H5Pset_chunk_cache(dapl, 0, H5D_CHUNK_CACHE_NBYTES_DEFAULT, H5D_CHUNK_CACHE_W0_DEFAULT)) < 0)
+ if ((status = H5Pset_chunk_cache(dapl, 0, H5D_CHUNK_CACHE_NBYTES_DEFAULT, H5D_CHUNK_CACHE_W0_DEFAULT)) <
+ 0)
goto error;
/* Create a new dataset within the file using cparms creation properties. */
- if((dataset = H5Dcreate2(file, DATASETNAME8, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, dapl)) < 0)
+ if ((dataset = H5Dcreate2(file, DATASETNAME8, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, dapl)) < 0)
goto error;
/* Initialize the dataset */
- for(i = n = 0; i < NX; i++)
- for(j = 0; j < NY; j++)
+ for (i = n = 0; i < NX; i++)
+ for (j = 0; j < NY; j++)
data[i][j] = n++;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Write the data for the dataset.
* Data will skip chunk cache and go directly to disk. */
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- dxpl, data)) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
goto error;
/* Allocate output (compressed) buffer */
outbuf = HDmalloc(z_src_nbytes);
- z_src = (Bytef *)outbuf;
+ z_src = (Bytef *)outbuf;
/* For each chunk in the dataset, compare the result of H5Dread and H5DOread_chunk. */
- for(i=0; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 0; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
/* Select hyperslab for one chunk in the file */
- start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ start[0] = (hsize_t)i * CHUNK_NX;
+ start[1] = (hsize_t)j * CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
/* Hyperslab selection equals single chunk */
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
+ 0)
goto error;
- offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY;
+ offset[0] = (hsize_t)i * CHUNK_NX;
+ offset[1] = (hsize_t)j * CHUNK_NY;
/* Read the compressed chunk back using the direct read function. */
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
goto error;
/* Check filter mask return value */
- if(filter_mask != 0)
+ if (filter_mask != 0)
goto error;
/* Perform decompression from the source to the destination buffer */
ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes);
/* Check for various zlib errors */
- if(Z_BUF_ERROR == ret) {
+ if (Z_BUF_ERROR == ret) {
HDfprintf(stderr, "overflow\n");
goto error;
- } else if(Z_MEM_ERROR == ret) {
+ }
+ else if (Z_MEM_ERROR == ret) {
HDfprintf(stderr, "deflate memory error\n");
goto error;
- } else if(Z_DATA_ERROR == ret) {
+ }
+ else if (Z_DATA_ERROR == ret) {
HDfprintf(stderr, "corrupted data\n");
goto error;
- } else if(Z_OK != ret) {
+ }
+ else if (Z_OK != ret) {
HDfprintf(stderr, "other deflate error\n");
goto error;
}
/* Check that the decompressed values match those read from H5Dread */
- for(k = 0; k < CHUNK_NX; k++) {
- for(l = 0; l < CHUNK_NY; l++) {
- if(direct_buf[k][l] != check_chunk[k][l]) {
+ for (k = 0; k < CHUNK_NX; k++) {
+ for (l = 0; l < CHUNK_NY; l++) {
+ if (direct_buf[k][l] != check_chunk[k][l]) {
HDprintf("\n 1. Read different values than written.");
HDprintf(" At index %d,%d\n", k, l);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
@@ -1503,23 +1589,25 @@ test_direct_chunk_read_no_cache (hid_t file)
H5Pclose(dxpl);
H5Pclose(dapl);
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
H5Pclose(dapl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
H5_FAILED();
@@ -1529,142 +1617,151 @@ error:
#ifdef H5_HAVE_FILTER_DEFLATE
static int
-test_direct_chunk_read_cache (hid_t file, hbool_t flush)
+test_direct_chunk_read_cache(hid_t file, hbool_t flush)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
- herr_t status; /* status from H5 function calls */
- int ret; /* deflate return status */
- int data[NX][NY];
- int i, j, k, l, n; /* local index variables */
-
- unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
- int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
- int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
- hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
-
- Bytef *z_src = NULL; /* source buffer */
- uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
- Bytef *z_dst = (Bytef*)(direct_buf);
- uLong z_dst_nbytes = (uLong)buf_size;
- int aggression = 9; /* Compression aggression setting */
- void *outbuf = NULL; /* Pointer to new buffer */
- hsize_t read_buf_size = 0;
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status; /* status from H5 function calls */
+ int ret; /* deflate return status */
+ int data[NX][NY];
+ int i, j, k, l, n; /* local index variables */
+
+ unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
+ int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
+ int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
+ hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+
+ Bytef * z_src = NULL; /* source buffer */
+ uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ Bytef * z_dst = (Bytef *)(direct_buf);
+ uLong z_dst_nbytes = (uLong)buf_size;
+ int aggression = 9; /* Compression aggression setting */
+ void * outbuf = NULL; /* Pointer to new buffer */
+ hsize_t read_buf_size = 0;
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- if(flush) {
- TESTING("basic functionality of H5DOread_chunk (flush chunk cache)");
- } else {
- TESTING("basic functionality of H5DOread_chunk (does not flush chunk cache)");
+ if (flush) {
+ HL_TESTING2("basic functionality of H5DOread_chunk (flush chunk cache)");
+ }
+ else {
+ HL_TESTING2("basic functionality of H5DOread_chunk (does not flush chunk cache)");
}
/* Create the data space with unlimited dimensions. */
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/* Modify dataset creation properties, i.e. enable chunking and compression */
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
- if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
goto error;
/* Create a new dataset within the file using cparms creation properties. */
- if((dataset = H5Dcreate2(file, flush?DATASETNAME9:DATASETNAME10, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, flush ? DATASETNAME9 : DATASETNAME10, H5T_NATIVE_INT, dataspace,
+ H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
goto error;
/* Initialize the dataset */
- for(i = n = 0; i < NX; i++)
- for(j = 0; j < NY; j++)
+ for (i = n = 0; i < NX; i++)
+ for (j = 0; j < NY; j++)
data[i][j] = n++;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Write the data for the dataset.
* It should stay in the chunk cache. */
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- dxpl, data)) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
goto error;
- if(flush) {
+ if (flush) {
/* Flush the chunk cache to disk. Cache entry is not evicted. */
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
}
/* Allocate output (compressed) buffer */
outbuf = HDmalloc(z_src_nbytes);
- z_src = (Bytef *)outbuf;
+ z_src = (Bytef *)outbuf;
/* For each chunk in the dataset, compare the result of H5Dread and H5DOread_chunk. */
- for(i=0; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 0; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
/* Select hyperslab for one chunk in the file */
- start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ start[0] = (hsize_t)i * CHUNK_NX;
+ start[1] = (hsize_t)j * CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
/* Hyperslab selection equals single chunk */
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
+ 0)
goto error;
- offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY;
+ offset[0] = (hsize_t)i * CHUNK_NX;
+ offset[1] = (hsize_t)j * CHUNK_NY;
/* Query chunk storage size */
- if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
+ if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
goto error;
- if(read_buf_size == 0)
+ if (read_buf_size == 0)
goto error;
/* Read the compressed chunk back using the direct read function. */
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
goto error;
/* Check filter mask return value */
- if(filter_mask != 0)
+ if (filter_mask != 0)
goto error;
/* Perform decompression from the source to the destination buffer */
ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes);
/* Check for various zlib errors */
- if(Z_BUF_ERROR == ret) {
+ if (Z_BUF_ERROR == ret) {
HDfprintf(stderr, "overflow\n");
goto error;
- } else if(Z_MEM_ERROR == ret) {
+ }
+ else if (Z_MEM_ERROR == ret) {
HDfprintf(stderr, "deflate memory error\n");
goto error;
- } else if(Z_DATA_ERROR == ret) {
+ }
+ else if (Z_DATA_ERROR == ret) {
HDfprintf(stderr, "corrupted data\n");
goto error;
- } else if(Z_OK != ret) {
+ }
+ else if (Z_OK != ret) {
HDfprintf(stderr, "other deflate error\n");
goto error;
}
/* Check that the decompressed values match those read from H5Dread */
- for(k = 0; k < CHUNK_NX; k++) {
- for(l = 0; l < CHUNK_NY; l++) {
- if(direct_buf[k][l] != check_chunk[k][l]) {
+ for (k = 0; k < CHUNK_NX; k++) {
+ for (l = 0; l < CHUNK_NY; l++) {
+ if (direct_buf[k][l] != check_chunk[k][l]) {
HDprintf("\n 1. Read different values than written.");
HDprintf(" At index %d,%d\n", k, l);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
@@ -1682,22 +1779,24 @@ test_direct_chunk_read_cache (hid_t file, hbool_t flush)
H5Pclose(cparms);
H5Pclose(dxpl);
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
PASSED();
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- if(outbuf)
+ if (outbuf)
HDfree(outbuf);
H5_FAILED();
@@ -1722,104 +1821,109 @@ error:
static int
test_read_unfiltered_dset(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
- herr_t status;
- int data[NX][NY];
- int i, j, k, l, n;
-
- unsigned filter_mask = 0;
- int direct_buf[CHUNK_NX][CHUNK_NY];
- int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
- hsize_t offset[2] = {0, 0};
- size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
- hsize_t read_buf_size = 0;
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int data[NX][NY];
+ int i, j, k, l, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
+ hsize_t read_buf_size = 0;
hsize_t start[2]; /* Start of hyperslab */
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
- TESTING("basic functionality of H5DOread_chunk on unfiltered datasets");
+ HL_TESTING2("basic functionality of H5DOread_chunk on unfiltered datasets");
/* Create the data space with unlimited dimensions. */
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/* Modify dataset creation properties, i.e. enable chunking, no compression */
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
/* Create a new dataset within the file using cparms creation properties. */
- if((dataset = H5Dcreate2(file, DATASETNAME12, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, DATASETNAME12, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
goto error;
/* Initialize the dataset */
- for(i = n = 0; i < NX; i++)
- for(j = 0; j < NY; j++)
+ for (i = n = 0; i < NX; i++)
+ for (j = 0; j < NY; j++)
data[i][j] = n++;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Write the data for the dataset.
* It should stay in the chunk cache and will be evicted/flushed by
* the H5DOread_chunk function call. */
- if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- dxpl, data)) < 0)
+ if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
goto error;
- if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
goto error;
/* For each chunk in the dataset, compare the result of H5Dread and H5DOread_chunk. */
- for(i=0; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 0; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
/* Select hyperslab for one chunk in the file */
- start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ start[0] = (hsize_t)i * CHUNK_NX;
+ start[1] = (hsize_t)j * CHUNK_NY;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = CHUNK_NX;
+ block[1] = CHUNK_NY;
/* Hyperslab selection equals single chunk */
- if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
goto error;
/* Read the chunk back */
- if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
+ 0)
goto error;
/* Query chunk storage size */
- if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
+ if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
goto error;
- if(read_buf_size != buf_size )
+ if (read_buf_size != buf_size)
goto error;
- offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY;
+ offset[0] = (hsize_t)i * CHUNK_NX;
+ offset[1] = (hsize_t)j * CHUNK_NY;
/* Read the raw chunk back */
HDmemset(&direct_buf, 0, sizeof(direct_buf));
filter_mask = UINT_MAX;
- if((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0)
+ if ((status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0)
goto error;
/* Check filter mask return value */
- if(filter_mask != 0)
+ if (filter_mask != 0)
goto error;
/* Check that the decompressed values match those read from H5Dread */
- for(k = 0; k < CHUNK_NX; k++) {
- for(l = 0; l < CHUNK_NY; l++) {
- if(direct_buf[k][l] != check_chunk[k][l]) {
+ for (k = 0; k < CHUNK_NX; k++) {
+ for (l = 0; l < CHUNK_NY; l++) {
+ if (direct_buf[k][l] != check_chunk[k][l]) {
HDprintf("\n 1. Read different values than written.");
HDprintf(" At index %d,%d\n", k, l);
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
@@ -1841,13 +1945,15 @@ test_read_unfiltered_dset(hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
@@ -1869,82 +1975,80 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_read_unallocated_chunk (hid_t file)
+test_read_unallocated_chunk(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
- hsize_t dims[2] = {NX, NY};
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
- hsize_t chunk_nbytes = CHUNK_NX*CHUNK_NY*sizeof(int);
- hsize_t direct_chunk_nbytes = 0; /* size (bytes) of the on-disk chunk */
- herr_t status; /* status from H5 function calls */
- hsize_t i, j; /* local index variables */
-
- unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
- int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
- hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
-
- TESTING("H5DOread_chunk with unallocated chunks");
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
+ hsize_t chunk_nbytes = CHUNK_NX * CHUNK_NY * sizeof(int);
+ hsize_t direct_chunk_nbytes = 0; /* size (bytes) of the on-disk chunk */
+ herr_t status; /* status from H5 function calls */
+ hsize_t i, j; /* local index variables */
+
+ unsigned filter_mask = 0; /* filter mask returned from H5DOread_chunk */
+ int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5DOread and manually decompressed */
+ hsize_t offset[2]; /* chunk offset used for H5DOread_chunk */
+
+ HL_TESTING2("H5DOread_chunk with unallocated chunks");
/* Create the data space with unlimited dimensions. */
- if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
goto error;
- if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
goto error;
/* Modify dataset creation properties, i.e. enable chunking, no compression */
- if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
goto error;
/* Create a new dataset within the file using cparms creation properties. */
- if((dataset = H5Dcreate2(file, DATASETNAME11, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
- cparms, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dcreate2(file, DATASETNAME11, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
+ H5P_DEFAULT)) < 0)
goto error;
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
/* Write a single chunk to intialize the chunk storage */
HDmemset(&chunk_dims, 0, sizeof(chunk_dims));
- offset[0] = 0; offset[1] = 0;
+ offset[0] = 0;
+ offset[1] = 0;
- if(H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, &chunk_dims) < 0)
+ if (H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, &chunk_dims) < 0)
goto error;
/* Attempt to read each chunk in the dataset. Chunks are not allocated,
* therefore we expect the result of H5DOread_chunk to fail. Chunk idx starts
* at 1, since one chunk was written to init the chunk storage. */
- for(i=1; i<NX/CHUNK_NX; i++) {
- for(j=0; j<NY/CHUNK_NY; j++) {
+ for (i = 1; i < NX / CHUNK_NX; i++) {
+ for (j = 0; j < NY / CHUNK_NY; j++) {
offset[0] = i * CHUNK_NX;
offset[1] = j * CHUNK_NY;
/* Read a non-existant chunk using the direct read function. */
- H5E_BEGIN_TRY {
- status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, &direct_buf);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { status = H5DOread_chunk(dataset, dxpl, offset, &filter_mask, &direct_buf); }
+ H5E_END_TRY;
/* Check that the chunk read call does not succeed. */
- if(status != -1)
+ if (status != -1)
goto error;
/* Query the size of the non-existant chunk */
direct_chunk_nbytes = ULONG_MAX;
- H5E_BEGIN_TRY {
- status = H5Dget_chunk_storage_size(dataset, offset, &direct_chunk_nbytes);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { status = H5Dget_chunk_storage_size(dataset, offset, &direct_chunk_nbytes); }
+ H5E_END_TRY;
/* Check that the chunk storage size call does not succeed. */
- if(status != -1 )
+ if (status != -1)
goto error;
- if(direct_chunk_nbytes != 0 )
+ if (direct_chunk_nbytes != 0)
goto error;
-
}
}
@@ -1959,44 +2063,195 @@ test_read_unallocated_chunk (hid_t file)
return 0;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Dclose(dataset);
H5Sclose(mem_space);
H5Sclose(dataspace);
H5Pclose(cparms);
H5Pclose(dxpl);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
H5_FAILED();
return 1;
} /* test_read_unallocated_chunk() */
/*-------------------------------------------------------------------------
- * Function: Main function
+ * Function: test_single_chunk
*
- * Purpose: Test direct chunk write function H5DOwrite_chunk
+ * Purpose: Tests direct chunk I/O with a dataset containing a single
+ * chunk using different combinations of configuration
+ * parameters. Simple create-write-read-verify pattern.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: 1
+ *-------------------------------------------------------------------------
+ */
+static int
+test_single_chunk(unsigned config)
+{
+ hid_t fid; /* File ID */
+ hid_t fapl; /* File access property list ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t did; /* Dataset ID */
+ hid_t dcpl; /* Dataset creation property list */
+ hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */
+ hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */
+ hsize_t offset[2] = {0, 0}; /* Offset for writing */
+ uint32_t filters; /* Filter mask out */
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int i, j; /* Local index variable */
+
+ HL_TESTING2("Single chunk I/O");
+
+ /* Initialize data */
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++)
+ wdata[i][j] = j / CHUNK0;
+ }
+
+ /* Create a new file with the latest format */
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+ if (config & CONFIG_LATEST)
+ if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+ if ((fid = H5Fcreate(SINGLE_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Create dataspace */
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ /* Create the dataset creation property list and set the chunk size */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+ if (H5Pset_chunk(dcpl, 2, chunk) < 0)
+ goto error;
+
+ /* Create the dataset */
+ if ((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if (config & CONFIG_DIRECT_WRITE) {
+ /* Write the data directly to the dataset */
+ if (H5DOwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0 * CHUNK1 * 4, (void *)wdata) < 0)
+ goto error;
+ } /* end if */
+ else
+ /* Write the data to the dataset */
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)wdata) < 0)
+ goto error;
+
+ /*
+ * Close and release resources.
+ */
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+ if (config & CONFIG_REOPEN_DSET)
+ if (H5Dclose(did) < 0)
+ goto error;
+ if (H5Sclose(sid) < 0)
+ goto error;
+ if (H5Pclose(fapl) < 0)
+ goto error;
+ if (config & CONFIG_REOPEN_FILE)
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ /* Open the file and dataset with default properties */
+ if (config & CONFIG_REOPEN_FILE)
+ if ((fid = H5Fopen(SINGLE_FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ goto error;
+ if (config & CONFIG_REOPEN_DSET)
+ if ((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Retrieve dataset creation property list */
+ if ((dcpl = H5Dget_create_plist(did)) < 0)
+ goto error;
+
+ if (config & CONFIG_DIRECT_READ) {
+ /* Read the data directly */
+ if (H5DOread_chunk(did, H5P_DEFAULT, offset, &filters, rdata) < 0)
+ goto error;
+
+ /* Verify returned filter mask */
+ if (filters != 0)
+ goto error;
+ } /* end if */
+ else
+ /* Read the data */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
+ goto error;
+
+ /* Verify that the data read was correct. */
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
+ if (rdata[i][j] != wdata[i][j])
+ goto error;
+ }
+ }
+
+ /*
+ * Close and release resources
+ */
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+ if (H5Dclose(did) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ }
+ H5E_END_TRY;
+
+ H5_FAILED();
+ return 1;
+} /* test_single_chunk_latest() */
+
+/*-------------------------------------------------------------------------
+ * Function: Main function
+ *
+ * Purpose: Test direct chunk write function H5Dwrite_chunk and
+ * chunk direct read function H5Dread_chunk
+ *
+ * Return: Success: 0
+ * Failure: 1
*
* Programmer: Raymond Lu
* 30 November 2012
*
*-------------------------------------------------------------------------
*/
-int main( void )
+int
+main(void)
{
- hid_t file_id;
- int nerrors=0;
+ hid_t file_id;
+ unsigned config;
+ int nerrors = 0;
/*
* Create a new file. If file exists its contents will be overwritten.
*/
- if((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- /* Test direct chunk write and direct chunk read */
+ /* Test direct chunk write and direct chunk read */
#ifdef H5_HAVE_FILTER_DEFLATE
nerrors += test_direct_chunk_write(file_id);
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2006,7 +2261,6 @@ int main( void )
nerrors += test_data_conv(file_id);
nerrors += test_invalid_parameters(file_id);
-
/* Test direct chunk read */
#ifdef H5_HAVE_FILTER_DEFLATE
nerrors += test_direct_chunk_read_no_cache(file_id);
@@ -2016,7 +2270,55 @@ int main( void )
nerrors += test_read_unfiltered_dset(file_id);
nerrors += test_read_unallocated_chunk(file_id);
- if(H5Fclose(file_id) < 0)
+ /* Loop over test configurations */
+ for (config = 0; config < CONFIG_END; config++) {
+ hbool_t need_comma = FALSE;
+
+ /* Check for invalid combinations */
+ if ((config & CONFIG_REOPEN_FILE) && !(config & CONFIG_REOPEN_DSET))
+ continue;
+
+ /* Print configuration */
+ HDprintf("Configuration: ");
+ if (config == 0)
+ HDprintf("<empty>");
+ if (config & CONFIG_LATEST) {
+ if (need_comma)
+ HDprintf(", ");
+ HDprintf("latest format");
+ need_comma = TRUE;
+ } /* end if */
+ if (config & CONFIG_REOPEN_FILE) {
+ if (need_comma)
+ HDprintf(", ");
+ HDprintf("reopen file");
+ need_comma = TRUE;
+ } /* end if */
+ else if (config & CONFIG_REOPEN_DSET) {
+ if (need_comma)
+ HDprintf(", ");
+ HDprintf("reopen dataset");
+ need_comma = TRUE;
+ } /* end if */
+ if (config & CONFIG_DIRECT_WRITE) {
+ if (need_comma)
+ HDprintf(", ");
+ HDprintf("direct write");
+ need_comma = TRUE;
+ } /* end if */
+ if (config & CONFIG_DIRECT_READ) {
+ if (need_comma)
+ HDprintf(", ");
+ HDprintf("direct read");
+ need_comma = TRUE;
+ } /* end if */
+ HDprintf(":\n");
+ fflush(stdout);
+
+ nerrors += test_single_chunk(config);
+ } /* end for */
+
+ if (H5Fclose(file_id) < 0)
goto error;
/* check for errors */
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index 0f079ca..34d52a5 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5hltest.h"
#include "H5LTpublic.h"
@@ -38,35 +38,35 @@
extend the image, and then performs writes that extend the images. The fifth
loop reads the extended images and verify that the content are correct. The
sixth and final loop closes the file images and deallocates the image
- buffers if appropriate. */
+ buffers if appropriate. */
/*-------------------------------------------------------------------------
-* test file image operations
-*-------------------------------------------------------------------------
-*/
+ * test file image operations
+ *-------------------------------------------------------------------------
+ */
static int
test_file_image(size_t open_images, size_t nflags, unsigned *flags)
{
- hid_t *file_id, *dset_id, file_space, plist; /* HDF5 ids */
- hsize_t dims1[RANK] = {2,3}; /* original dimension of datasets */
- hsize_t max_dims[RANK] = {H5S_UNLIMITED, H5S_UNLIMITED};
- int data1[6] = {1,2,3,4,5,6}; /* original contents of dataset */
- int data2[6] = {7,8,9,10,11,12}; /* "wrong" contents of dataset */
- hsize_t dims3[RANK]; /* array to read dataset dimensions */
- int data3[15]; /* array to read dataset contents */
- hsize_t dims4[RANK] = {3,5}; /* extended dimensions of datasets */
- int data4[15] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
- /* extended contents of dataset */
- ssize_t *buf_size; /* pointer to array of buffer sizes */
- void **buf_ptr; /* pointer to array of pointers to image buffers */
- char **filename; /* pointer to array of pointers to filenames */
- unsigned *input_flags; /* pointer to array of flag combinations */
- size_t i, j, k, nrow, n_values;
- herr_t status1;
- void *handle_ptr = NULL; /* pointers to driver buffer */
- unsigned char **core_buf_ptr_ptr = NULL;
-
- VERIFY(open_images > 1 , "The number of open images must be greater than 1");
+ hid_t * file_id, *dset_id, file_space, plist; /* HDF5 ids */
+ hsize_t dims1[RANK] = {2, 3}; /* original dimension of datasets */
+ hsize_t max_dims[RANK] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ int data1[6] = {1, 2, 3, 4, 5, 6}; /* original contents of dataset */
+ int data2[6] = {7, 8, 9, 10, 11, 12}; /* "wrong" contents of dataset */
+ hsize_t dims3[RANK]; /* array to read dataset dimensions */
+ int data3[15]; /* array to read dataset contents */
+ hsize_t dims4[RANK] = {3, 5}; /* extended dimensions of datasets */
+ int data4[15] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+ /* extended contents of dataset */
+ ssize_t * buf_size; /* pointer to array of buffer sizes */
+ void ** buf_ptr; /* pointer to array of pointers to image buffers */
+ char ** filename; /* pointer to array of pointers to filenames */
+ unsigned * input_flags; /* pointer to array of flag combinations */
+ size_t i, j, k, nrow, n_values;
+ herr_t status1;
+ void * handle_ptr = NULL; /* pointers to driver buffer */
+ unsigned char **core_buf_ptr_ptr = NULL;
+
+ VERIFY(open_images > 1, "The number of open images must be greater than 1");
VERIFY(nflags > 0, "The number of flag combinations must be greater than 0");
@@ -94,7 +94,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
if (NULL == (dset_id = (hid_t *)HDmalloc(sizeof(hid_t) * open_images)))
FAIL_PUTS_ERROR("malloc() failed");
- TESTING("get file images");
+ HL_TESTING2("get file images");
/* create several file images */
for (i = 0; i < open_images; i++) {
@@ -106,17 +106,17 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
filename[i] = (char *)HDmalloc(sizeof(char) * 32);
/* create file name */
- sprintf(filename[i], "image_file%d.h5", (int)i);
+ HDsprintf(filename[i], "image_file%d.h5", (int)i);
/* create file */
if ((file_id[i] = H5Fcreate(filename[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_PUTS_ERROR("H5Fcreate() failed");
- /* define dataspace for the dataset */
- if ((file_space = H5Screate_simple(RANK, dims1, max_dims)) < 0)
+ /* define dataspace for the dataset */
+ if ((file_space = H5Screate_simple(RANK, dims1, max_dims)) < 0)
FAIL_PUTS_ERROR("H5Screate_simple() failed");
- /* create dataset property list */
+ /* create dataset property list */
if ((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_PUTS_ERROR("H5Pcreate() failed");
@@ -125,10 +125,11 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Pset_chunk() failed");
/* create and write an integer type dataset named "dset" */
- if ((dset_id[i] = H5Dcreate2(file_id[i], DSET_NAME, H5T_NATIVE_INT, file_space, H5P_DEFAULT, plist, H5P_DEFAULT)) < 0)
+ if ((dset_id[i] = H5Dcreate2(file_id[i], DSET_NAME, H5T_NATIVE_INT, file_space, H5P_DEFAULT, plist,
+ H5P_DEFAULT)) < 0)
FAIL_PUTS_ERROR("H5Dcreate() failed");
-
- /* dataset in open image 1 is written with "wrong" data */
+
+ /* dataset in open image 1 is written with "wrong" data */
if (i == 1) {
if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2) < 0)
FAIL_PUTS_ERROR("H5Dwrite() failed");
@@ -138,7 +139,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1) < 0)
FAIL_PUTS_ERROR("H5Dwrite() failed");
} /* end else */
-
+
/* flush into the file */
if (H5Fflush(file_id[i], H5F_SCOPE_LOCAL) < 0)
FAIL_PUTS_ERROR("H5Fflush() failed");
@@ -146,7 +147,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* close dataset property list */
if (H5Pclose(plist) < 0)
FAIL_PUTS_ERROR("H5Pclose() failed");
-
+
/* close dataspace */
if (H5Sclose(file_space) < 0)
FAIL_PUTS_ERROR("H5Sclose() failed");
@@ -156,7 +157,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Dclose() failed");
/* get size of the file image i */
- if ((buf_size[i] = H5Fget_file_image(file_id[i], NULL, 0)) < 0)
+ if ((buf_size[i] = H5Fget_file_image(file_id[i], NULL, (size_t)0)) < 0)
FAIL_PUTS_ERROR("H5Fget_file_image() failed");
/* allocate buffer for the file image i */
@@ -166,7 +167,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* buffer for file image 2 is filled with counter data (non-valid image) */
if (i == 2) {
for (j = 0; j < (size_t)buf_size[i]; j++)
- ((char*)(buf_ptr[i]))[j] = (char)j;
+ ((char *)(buf_ptr[i]))[j] = (char)j;
} /* end if */
/* buffers for the rest of the file images are filled with data from the respective files */
else {
@@ -175,40 +176,43 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
} /* end else */
/* file close */
- if (H5Fclose (file_id[i]) < 0)
+ if (H5Fclose(file_id[i]) < 0)
FAIL_PUTS_ERROR("H5Fclose() failed");
} /* end for */
PASSED();
- TESTING("open file images and check image copies");
-
- /* open the file images with the core driver for data access */
+ HL_TESTING2("open file images and check image copies");
+
+ /* open the file images with the core driver for data access */
for (i = 0; i < open_images; i++) {
/* open file image 2 filled with counter data (non-valid image) */
if (i == 2) {
- H5E_BEGIN_TRY {
- /* attempt to set file image in the core driver */
+ H5E_BEGIN_TRY
+ {
+ /* attempt to set file image in the core driver */
file_id[i] = H5LTopen_file_image(buf_ptr[i], (size_t)buf_size[i], input_flags[i]);
- } H5E_END_TRY
+ }
+ H5E_END_TRY
VERIFY(file_id[i] < 0, "H5LTopen_file_image() should have failed");
} /* end if */
/* open rest of valid file images */
else {
- /* set file image in the core driver */
+ /* set file image in the core driver */
if ((file_id[i] = H5LTopen_file_image(buf_ptr[i], (size_t)buf_size[i], input_flags[i])) < 0)
FAIL_PUTS_ERROR("H5LTopen_file_image() failed");
/* get pointer to the image buffer of the core driver */
if (H5Fget_vfd_handle(file_id[i], H5P_DEFAULT, &handle_ptr) < 0)
- FAIL_PUTS_ERROR("H5Fget_vfd_handle() failed");
+ FAIL_PUTS_ERROR("H5Fget_vfd_handle() failed");
core_buf_ptr_ptr = (unsigned char **)handle_ptr;
/* test whether the user buffer has been copied or not */
if (input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY)
- VERIFY(*core_buf_ptr_ptr == buf_ptr[i], "vfd buffer and user buffer should have been the same");
+ VERIFY(*core_buf_ptr_ptr == buf_ptr[i],
+ "vfd buffer and user buffer should have been the same");
else
VERIFY(*core_buf_ptr_ptr != buf_ptr[i], "vfd buffer and user buffer should be different");
@@ -217,11 +221,11 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
if (HDmemcmp(*core_buf_ptr_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
FAIL_PUTS_ERROR("comparison of vfd and user buffer failed");
} /* end else */
- } /* end for */
+ } /* end for */
PASSED();
- TESTING("read file images");
+ HL_TESTING2("read file images");
/* read open file images and verify data */
for (i = 0; i < open_images; i++) {
@@ -231,7 +235,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
continue;
} /* end if */
- /* open dataset in file image */
+ /* open dataset in file image */
if ((dset_id[i] = H5Dopen2(file_id[i], DSET_NAME, H5P_DEFAULT)) < 0)
FAIL_PUTS_ERROR("H5Dopen() failed");
@@ -244,10 +248,10 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Sget_simple_extent_dims() failed");
/* read dataset */
- if (H5Dread(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data3) < 0)
+ if (H5Dread(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data3) < 0)
FAIL_PUTS_ERROR("H5Dread() failed");
-
- /* compute number of elements in dataset */
+
+ /* compute number of elements in dataset */
n_values = (size_t)(dims3[0] * dims3[1]);
/* determine the number of rows in dataset */
@@ -258,7 +262,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* compare file image values with original data */
for (j = 0; j < n_values / nrow; j++)
for (k = 0; k < nrow; k++)
- if (data3[j * nrow + k ] == data1[j * nrow + k ])
+ if (data3[j * nrow + k] == data1[j * nrow + k])
FAIL_PUTS_ERROR("comparison of image values with original data should have failed");
} /* end if */
/* verify contents for the rest of the file images */
@@ -266,18 +270,18 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* compare file image values with original data */
for (j = 0; j < n_values / nrow; j++)
for (k = 0; k < nrow; k++)
- if (data3[j * nrow + k ] != data1[j * nrow + k ])
+ if (data3[j * nrow + k] != data1[j * nrow + k])
FAIL_PUTS_ERROR("comparison of image values with original data failed");
} /* end else */
-
- /* close dataspace */
- if (H5Sclose (file_space) < 0)
+
+ /* close dataspace */
+ if (H5Sclose(file_space) < 0)
FAIL_PUTS_ERROR("H5Sclose() failed");
} /* end for */
- PASSED();
+ PASSED();
- TESTING("write and extend file images");
+ HL_TESTING2("write and extend file images");
/* write open file images and verify data */
for (i = 0; i < open_images; i++) {
@@ -290,23 +294,26 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* test data write when file image access is read-only */
if (!(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW)) {
/* write dataset without extending it */
- H5E_BEGIN_TRY {
- status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY
+ {
+ status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1);
+ }
+ H5E_END_TRY;
VERIFY(status1 < 0, "H5Dwrite() should have failed");
/* extend dimensions of dataset */
- H5E_BEGIN_TRY {
- status1 = H5Dset_extent(dset_id[i], dims4);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { status1 = H5Dset_extent(dset_id[i], dims4); }
+ H5E_END_TRY;
VERIFY(status1 < 0, "H5Dset_extent() should have failed");
/* write extended dataset */
- H5E_BEGIN_TRY {
- status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data4);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY
+ {
+ status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data4);
+ }
+ H5E_END_TRY;
VERIFY(status1 < 0, "H5Dwrite() should have failed");
@@ -316,7 +323,8 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
} /* end if */
/* test data write where file image access is read-write */
else {
- if ((input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY) && (input_flags[i] & H5LT_FILE_IMAGE_DONT_RELEASE)) {
+ if ((input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY) &&
+ (input_flags[i] & H5LT_FILE_IMAGE_DONT_RELEASE)) {
/* This test is disabled currently, since the new attribute causes the file
* to increase in size, but the realloc call in H5FD_core_write() fails, causing
* the flush operation to fail and the file to fail to close, eventually
@@ -337,7 +345,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
hid_t attr_space_id = -1;
hid_t attr_id = -1;
herr_t status2;
- size_t l;
+ size_t l;
if ((attr_space_id = H5Screate_simple(attr_rank, attr_dims, attr_dims)) < 0)
FAIL_PUTS_ERROR("attr_space H5Screate_simple() failed");
@@ -372,7 +380,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
} /* end if */
else {
/* write dataset without extending it */
- if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1) < 0)
+ if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1) < 0)
FAIL_PUTS_ERROR("H5Dwrite() failed");
/* extend dimensions of dataset */
@@ -380,27 +388,27 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Dset_extent() failed");
/* write extended dataset */
- if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data4) < 0)
+ if (H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data4) < 0)
FAIL_PUTS_ERROR("H5Dwrite() failed");
/* close dataset */
if (H5Dclose(dset_id[i]) < 0)
FAIL_PUTS_ERROR("H5Dclose() failed");
} /* end else */
- } /* end else */
- } /* end for */
+ } /* end else */
+ } /* end for */
PASSED();
- TESTING("read extended file images");
+ HL_TESTING2("read extended file images");
/* read open file images and verify data */
for (i = 0; i < open_images; i++) {
/* if opening the file image failed, continue next iteration */
- if ((file_id[i] < 0) || (!(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW )))
+ if ((file_id[i] < 0) || (!(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW)))
continue;
- /* open dataset in file image */
+ /* open dataset in file image */
if ((dset_id[i] = H5Dopen2(file_id[i], DSET_NAME, H5P_DEFAULT)) < 0)
FAIL_PUTS_ERROR("H5Dopen() failed");
@@ -413,10 +421,10 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("H5Sget_simple_extent_dims() failed");
/* read dataset */
- if (H5Dread(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data3) < 0)
+ if (H5Dread(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data3) < 0)
FAIL_PUTS_ERROR("H5Dread() failed");
-
- /* compute number of elements in dataset */
+
+ /* compute number of elements in dataset */
n_values = (size_t)(dims3[0] * dims3[1]);
/* determine the number of rows in dataset */
@@ -425,11 +433,11 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
/* verify contents for the file images */
for (j = 0; j < n_values / nrow; j++)
for (k = 0; k < nrow; k++)
- if (data3[j * nrow + k ] != data4[j * nrow + k ])
+ if (data3[j * nrow + k] != data4[j * nrow + k])
FAIL_PUTS_ERROR("comparison of image values with original data failed");
-
- /* close dataspace */
- if (H5Sclose (file_space) < 0)
+
+ /* close dataspace */
+ if (H5Sclose(file_space) < 0)
FAIL_PUTS_ERROR("H5Sclose() failed");
/* close dataset */
@@ -439,7 +447,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
PASSED()
- TESTING("close file images");
+ HL_TESTING2("close file images");
/* close file images and release buffer if appropriate */
for (i = 0; i < open_images; i++) {
@@ -455,11 +463,12 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
FAIL_PUTS_ERROR("HDremove() failed");
/* free shared buffer if appropriate */
- if (!(input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY) || (input_flags[i] & H5LT_FILE_IMAGE_DONT_RELEASE)) {
+ if (!(input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY) ||
+ (input_flags[i] & H5LT_FILE_IMAGE_DONT_RELEASE)) {
VERIFY(buf_ptr[i] != NULL, "buffer pointer must be non NULL");
HDfree(buf_ptr[i]);
} /* end if */
-
+
} /* end for */
/* release temporary working buffers */
@@ -482,17 +491,18 @@ error:
}
/*-------------------------------------------------------------------------
-* the main program
-*-------------------------------------------------------------------------
-*/
-int main( void )
+ * the main program
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
{
- int nerrors = 0;
- size_t open_images = 10; /* number of open file images */
- size_t nflags = 8; /* number of flag combinations */
- unsigned flags[8]; /* array with flag combinations */
-
- /* set flag combinations for testing */
+ int nerrors = 0;
+ size_t open_images = 10; /* number of open file images */
+ size_t nflags = 8; /* number of flag combinations */
+ unsigned flags[8]; /* array with flag combinations */
+
+ /* set flag combinations for testing */
flags[0] = 0;
flags[1] = H5LT_FILE_IMAGE_DONT_RELEASE;
flags[2] = H5LT_FILE_IMAGE_DONT_COPY;
@@ -503,14 +513,14 @@ int main( void )
flags[7] = H5LT_FILE_IMAGE_OPEN_RW | H5LT_FILE_IMAGE_DONT_COPY | H5LT_FILE_IMAGE_DONT_RELEASE;
/* Test file image operations. The flag combinations are assigned to file images in round-robin fashion */
- nerrors += test_file_image(open_images, nflags, flags) < 0? 1 : 0;
+ nerrors += test_file_image(open_images, nflags, flags) < 0 ? 1 : 0;
- if (nerrors) goto error;
- printf("File image tests passed.\n");
+ if (nerrors)
+ goto error;
+ HDprintf("File image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
-
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index ac818d0..ff53d4f 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <limits.h>
#include <stdlib.h>
@@ -39,10 +39,9 @@
#define PAL3_NAME "earth"
#define PAL4_NAME "blue-red"
-
-#define WIDTH 400
-#define HEIGHT 200
-#define PAL_ENTRIES 256
+#define WIDTH 400
+#define HEIGHT 200
+#define PAL_ENTRIES 256
/* struct to store RGB values read from a .pal file */
typedef struct rgb_t {
@@ -55,54 +54,57 @@ typedef struct rgb_t {
static int test_simple(void);
static int test_data(void);
static int test_generate(void);
-static int read_data(const char* file_name, hsize_t *width, hsize_t *height );
-static int read_palette(const char* file_name, rgb_t *palette, size_t palette_size);
+static int read_data(const char *file_name, hsize_t *width, hsize_t *height);
+static int read_palette(const char *file_name, rgb_t *palette, size_t palette_size);
/* globals */
unsigned char *image_data = NULL;
/*-------------------------------------------------------------------------
-* the main program
-*-------------------------------------------------------------------------
-*/
+ * the main program
+ *-------------------------------------------------------------------------
+ */
-int main(void)
+int
+main(void)
{
- int nerrors=0;
+ int nerrors = 0;
- nerrors += test_simple()<0 ?1:0;
- nerrors += test_data()<0 ?1:0;
- nerrors += test_generate()<0 ?1:0;
+ nerrors += test_simple() < 0 ? 1 : 0;
+ nerrors += test_data() < 0 ? 1 : 0;
+ nerrors += test_generate() < 0 ? 1 : 0;
- if (nerrors) goto error;
- printf("All image tests passed.\n");
+ if (nerrors)
+ goto error;
+ HDprintf("All image tests passed.\n");
return 0;
error:
- printf("***** %d IMAGE TEST%s FAILED! *****\n",nerrors, 1 == nerrors ? "" : "S");
+ HDprintf("***** %d IMAGE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
/*-------------------------------------------------------------------------
-* a simple test that generates images and palettes
-*-------------------------------------------------------------------------
-*/
+ * a simple test that generates images and palettes
+ *-------------------------------------------------------------------------
+ */
-static int test_simple(void)
+static int
+test_simple(void)
{
- hsize_t width = WIDTH;
- hsize_t height = HEIGHT;
- hsize_t planes;
- hid_t fid;
- int i, j, n, space;
- hsize_t u;
- char interlace[20];
- hssize_t npals;
+ hsize_t width = WIDTH;
+ hsize_t height = HEIGHT;
+ hsize_t planes;
+ hid_t fid;
+ int i, j, n, space;
+ hsize_t u;
+ char interlace[20];
+ hssize_t npals;
/* 8-bit image */
unsigned char *buf1 = NULL;
- unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
- hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
+ unsigned char pal[PAL_ENTRIES * 3]; /* palette array */
+ hsize_t pal_dims[2] = {PAL_ENTRIES, 3}; /* palette dimensions */
/* 24-bit image */
unsigned char *buf2 = NULL;
@@ -110,395 +112,373 @@ static int test_simple(void)
/* read data */
unsigned char *buf1_out = NULL;
unsigned char *buf2_out = NULL;
- unsigned char pal_out[ PAL_ENTRIES * 3 ]; /* palette array */
- hsize_t pal_dims_out[2]; /* palette dimensions */
+ unsigned char pal_out[PAL_ENTRIES * 3]; /* palette array */
+ hsize_t pal_dims_out[2]; /* palette dimensions */
/* Allocate image buffers */
buf1 = (unsigned char *)HDmalloc(WIDTH * HEIGHT);
HDassert(buf1);
- buf2 = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
+ buf2 = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
HDassert(buf2);
buf1_out = (unsigned char *)HDmalloc(WIDTH * HEIGHT);
HDassert(buf1_out);
- buf2_out = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
+ buf2_out = (unsigned char *)HDmalloc(WIDTH * HEIGHT * 3);
HDassert(buf2_out);
/* create an image */
- space = WIDTH*HEIGHT / PAL_ENTRIES;
- for (i=0, j=0, n=0; i < WIDTH*HEIGHT; i++, j++ )
- {
+ space = WIDTH * HEIGHT / PAL_ENTRIES;
+ for (i = 0, j = 0, n = 0; i < WIDTH * HEIGHT; i++, j++) {
buf1[i] = (unsigned char)n;
- if ( j > space )
- {
+ if (j > space) {
n++;
- j=0;
+ j = 0;
}
-
}
/* create an image */
- space = WIDTH*HEIGHT / 256;
- for (i=0, j=0, n=0; i < WIDTH*HEIGHT*3; i+=3, j++ )
- {
- buf2[i] = (unsigned char)n;
- buf2[i+1] = 0;
- buf2[i+2] = (unsigned char)(255 - n);
- if ( j > space )
- {
+ space = WIDTH * HEIGHT / 256;
+ for (i = 0, j = 0, n = 0; i < WIDTH * HEIGHT * 3; i += 3, j++) {
+ buf2[i] = (unsigned char)n;
+ buf2[i + 1] = 0;
+ buf2[i + 2] = (unsigned char)(255 - n);
+ if (j > space) {
n++;
- j=0;
+ j = 0;
}
}
/*-------------------------------------------------------------------------
- * define a palette, blue to red tones
- *-------------------------------------------------------------------------
- */
- for ( i=0, n=0; i<PAL_ENTRIES*3; i+=3, n++)
- {
- pal[i] =(unsigned char)n; /* red */
- pal[i+1]=0; /* green */
- pal[i+2]=(unsigned char)(255 - n); /* blue */
+ * define a palette, blue to red tones
+ *-------------------------------------------------------------------------
+ */
+ for (i = 0, n = 0; i < PAL_ENTRIES * 3; i += 3, n++) {
+ pal[i] = (unsigned char)n; /* red */
+ pal[i + 1] = 0; /* green */
+ pal[i + 2] = (unsigned char)(255 - n); /* blue */
}
/* Create a new HDF5 file using default properties. */
- fid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
+ fid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * Indexed image test
- *-------------------------------------------------------------------------
- */
+ * Indexed image test
+ *-------------------------------------------------------------------------
+ */
- TESTING("indexed image");
+ HL_TESTING2("indexed image");
/* Write image */
- if ( H5IMmake_image_8bit( fid, IMAGE1_NAME, width, height, buf1 ) < 0 )
+ if (H5IMmake_image_8bit(fid, IMAGE1_NAME, width, height, buf1) < 0)
goto out;
/* Make a palette */
- if ( H5IMmake_palette( fid, PAL_NAME, pal_dims, pal ) < 0 )
+ if (H5IMmake_palette(fid, PAL_NAME, pal_dims, pal) < 0)
goto out;
/* Attach a palette to the image dataset */
- if ( H5IMlink_palette( fid, IMAGE1_NAME, PAL_NAME ) < 0 )
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL_NAME) < 0)
goto out;
/* Read image */
- if ( H5IMget_image_info( fid, IMAGE1_NAME, &width, &height, &planes, interlace, &npals ) < 0 )
+ if (H5IMget_image_info(fid, IMAGE1_NAME, &width, &height, &planes, interlace, &npals) < 0)
goto out;
- if ( H5IMread_image( fid, IMAGE1_NAME, buf1_out ) < 0 )
+ if (H5IMread_image(fid, IMAGE1_NAME, buf1_out) < 0)
goto out;
- for (u = 0; u < height*width*planes; u++)
- {
- if ( buf1[u] != buf1_out[u] )
+ for (u = 0; u < height * width * planes; u++) {
+ if (buf1[u] != buf1_out[u])
goto out;
-
}
-
PASSED();
/*-------------------------------------------------------------------------
- * True color image test
- *-------------------------------------------------------------------------
- */
+ * True color image test
+ *-------------------------------------------------------------------------
+ */
- TESTING("true color image");
+ HL_TESTING2("true color image");
/* Write image */
- if ( H5IMmake_image_24bit( fid, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", buf2 ) )
+ if (H5IMmake_image_24bit(fid, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", buf2))
goto out;
/* Read image */
- if ( H5IMget_image_info( fid, IMAGE2_NAME, &width, &height, &planes, interlace, &npals ) < 0 )
+ if (H5IMget_image_info(fid, IMAGE2_NAME, &width, &height, &planes, interlace, &npals) < 0)
goto out;
- if ( H5IMread_image( fid, IMAGE2_NAME, buf2_out ) < 0 )
+ if (H5IMread_image(fid, IMAGE2_NAME, buf2_out) < 0)
goto out;
- for (u = 0; u < height*width*planes; u++)
- {
- if ( buf2[u] != buf2_out[u] )
+ for (u = 0; u < height * width * planes; u++) {
+ if (buf2[u] != buf2_out[u])
goto out;
}
-
PASSED();
/*-------------------------------------------------------------------------
- * H5IMget_npalettes test
- *-------------------------------------------------------------------------
- */
+ * H5IMget_npalettes test
+ *-------------------------------------------------------------------------
+ */
- TESTING("pallete functions");
+ HL_TESTING2("pallete functions");
- if ( H5IMget_npalettes( fid, IMAGE1_NAME, &npals ) < 0 )
+ if (H5IMget_npalettes(fid, IMAGE1_NAME, &npals) < 0)
goto out;
/*-------------------------------------------------------------------------
- * H5IMget_palette_info test
- *-------------------------------------------------------------------------
- */
+ * H5IMget_palette_info test
+ *-------------------------------------------------------------------------
+ */
- if ( H5IMget_palette_info( fid, IMAGE1_NAME, 0, pal_dims_out ) < 0 )
+ if (H5IMget_palette_info(fid, IMAGE1_NAME, 0, pal_dims_out) < 0)
goto out;
- for (i = 0; i < 2; i++)
- {
- if ( pal_dims[i] != pal_dims_out[i] )
+ for (i = 0; i < 2; i++) {
+ if (pal_dims[i] != pal_dims_out[i])
goto out;
}
/*-------------------------------------------------------------------------
- * H5IMget_palette test
- *-------------------------------------------------------------------------
- */
+ * H5IMget_palette test
+ *-------------------------------------------------------------------------
+ */
- if ( H5IMget_palette( fid, IMAGE1_NAME, 0, pal_out ) < 0 )
+ if (H5IMget_palette(fid, IMAGE1_NAME, 0, pal_out) < 0)
goto out;
- for (i = 0; i < PAL_ENTRIES * 3; i++)
- {
- if ( pal[i] != pal_out[i] )
+ for (i = 0; i < PAL_ENTRIES * 3; i++) {
+ if (pal[i] != pal_out[i])
goto out;
}
/*-------------------------------------------------------------------------
- * H5IMis_image test
- *-------------------------------------------------------------------------
- */
+ * H5IMis_image test
+ *-------------------------------------------------------------------------
+ */
- if ( H5IMis_image( fid, IMAGE1_NAME ) < 0 )
+ if (H5IMis_image(fid, IMAGE1_NAME) < 0)
goto out;
- if ( H5IMis_image( fid, IMAGE2_NAME ) < 0 )
+ if (H5IMis_image(fid, IMAGE2_NAME) < 0)
goto out;
/*-------------------------------------------------------------------------
- * H5IMis_palette test
- *-------------------------------------------------------------------------
- */
+ * H5IMis_palette test
+ *-------------------------------------------------------------------------
+ */
- if ( H5IMis_palette( fid, PAL_NAME ) < 0 )
+ if (H5IMis_palette(fid, PAL_NAME) < 0)
goto out;
/*-------------------------------------------------------------------------
- * end tests
- *-------------------------------------------------------------------------
- */
+ * end tests
+ *-------------------------------------------------------------------------
+ */
- if(buf1)
+ if (buf1)
HDfree(buf1);
- if(buf2)
+ if (buf2)
HDfree(buf2);
- if(buf1_out)
+ if (buf1_out)
HDfree(buf1_out);
- if(buf2_out)
+ if (buf2_out)
HDfree(buf2_out);
/* Close the file. */
- if(H5Fclose( fid ) < 0)
+ if (H5Fclose(fid) < 0)
goto out;
-
PASSED();
return 0;
/* error zone, gracefully close */
out:
- if(buf1)
+ if (buf1)
HDfree(buf1);
- if(buf2)
+ if (buf2)
HDfree(buf2);
- if(buf1_out)
+ if (buf1_out)
HDfree(buf1_out);
- if(buf2_out)
+ if (buf2_out)
HDfree(buf2_out);
- H5E_BEGIN_TRY {
- H5Fclose(fid);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
/*-------------------------------------------------------------------------
-* read sample realistic image data from ASCII files
-*-------------------------------------------------------------------------
-*/
+ * read sample realistic image data from ASCII files
+ *-------------------------------------------------------------------------
+ */
-static int test_data(void)
+static int
+test_data(void)
{
- hid_t fid;
- hsize_t pal_dims[2];
- hsize_t width;
- hsize_t height;
- unsigned char pal[256*3]; /* buffer to hold an HDF5 palette */
- rgb_t rgb[256]; /* buffer to hold a .pal file palette */
- int i, n;
+ hid_t fid;
+ hsize_t pal_dims[2];
+ hsize_t width;
+ hsize_t height;
+ unsigned char pal[256 * 3]; /* buffer to hold an HDF5 palette */
+ rgb_t rgb[256]; /* buffer to hold a .pal file palette */
+ int i, n;
/* create a file using default properties */
- if ((fid=H5Fcreate(FILE2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if ((fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- printf("Testing read ascii image data and generate images\n");
+ HDprintf("Testing read ascii image data and generate images\n");
/*-------------------------------------------------------------------------
- * read 8bit image data
- *-------------------------------------------------------------------------
- */
+ * read 8bit image data
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make indexed image");
+ HL_TESTING2("make indexed image");
/* read first data file */
- if (read_data(DATA_FILE1,&width,&height)<0)
+ if (read_data(DATA_FILE1, &width, &height) < 0)
goto out;
/* make an image */
- if (H5IMmake_image_8bit(fid,IMAGE1_NAME,width,height,image_data)<0)
+ if (H5IMmake_image_8bit(fid, IMAGE1_NAME, width, height, image_data) < 0)
goto out;
PASSED();
-
- TESTING2("attaching palettes");
+ HL_TESTING2("attaching palettes");
/*-------------------------------------------------------------------------
- * palette #1. rainbow palette. data is contained in "pal_rgb.h"
- *-------------------------------------------------------------------------
- */
+ * palette #1. rainbow palette. data is contained in "pal_rgb.h"
+ *-------------------------------------------------------------------------
+ */
/* initialize the palette data */
pal_dims[0] = 256;
pal_dims[1] = 3;
/* make a palette */
- if (H5IMmake_palette(fid,PAL1_NAME,pal_dims,pal_rgb)<0)
+ if (H5IMmake_palette(fid, PAL1_NAME, pal_dims, pal_rgb) < 0)
goto out;
/* attach a palette to the image dataset */
- if (H5IMlink_palette(fid,IMAGE1_NAME,PAL1_NAME)<0)
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL1_NAME) < 0)
goto out;
/*-------------------------------------------------------------------------
- * palette #2. sepia palette.
- * read a PAL file and attach the palette to the HDF5 file
- *-------------------------------------------------------------------------
- */
+ * palette #2. sepia palette.
+ * read a PAL file and attach the palette to the HDF5 file
+ *-------------------------------------------------------------------------
+ */
/* read a PAL file */
if (read_palette(PAL2_FILE, rgb, (sizeof(rgb) / sizeof(rgb[0]))) < 0)
goto out;
/* transfer to the HDF5 buffer */
- for ( i=0, n=0; i<256*3; i+=3, n++)
- {
- pal[i] =rgb[n].r;
- pal[i+1]=rgb[n].g;
- pal[i+2]=rgb[n].b;
+ for (i = 0, n = 0; i < 256 * 3; i += 3, n++) {
+ pal[i] = rgb[n].r;
+ pal[i + 1] = rgb[n].g;
+ pal[i + 2] = rgb[n].b;
}
/* make a palette */
- if (H5IMmake_palette(fid,PAL2_NAME,pal_dims,pal)<0)
+ if (H5IMmake_palette(fid, PAL2_NAME, pal_dims, pal) < 0)
goto out;
/* attach the palette to the image dataset */
- if (H5IMlink_palette(fid,IMAGE1_NAME,PAL2_NAME)<0)
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL2_NAME) < 0)
goto out;
/*-------------------------------------------------------------------------
- * palette #3. earth palette.
- * read a PAL file and attach the palette to the HDF5 file
- *-------------------------------------------------------------------------
- */
+ * palette #3. earth palette.
+ * read a PAL file and attach the palette to the HDF5 file
+ *-------------------------------------------------------------------------
+ */
/* read a PAL file */
if (read_palette(PAL3_FILE, rgb, (sizeof(rgb) / sizeof(rgb[0]))) < 0)
goto out;
/* transfer to the HDF5 buffer */
- for ( i=0, n=0; i<256*3; i+=3, n++)
- {
- pal[i] =rgb[n].r;
- pal[i+1]=rgb[n].g;
- pal[i+2]=rgb[n].b;
+ for (i = 0, n = 0; i < 256 * 3; i += 3, n++) {
+ pal[i] = rgb[n].r;
+ pal[i + 1] = rgb[n].g;
+ pal[i + 2] = rgb[n].b;
}
/* make a palette */
- if (H5IMmake_palette(fid,PAL3_NAME,pal_dims,pal)<0)
+ if (H5IMmake_palette(fid, PAL3_NAME, pal_dims, pal) < 0)
goto out;
/* attach the palette to the image dataset */
- if (H5IMlink_palette(fid,IMAGE1_NAME,PAL3_NAME)<0)
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL3_NAME) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * palette #4. blue-red
- * make a palette whith blue to red colors
- *-------------------------------------------------------------------------
- */
- for ( i=0, n=0; i<256*3; i+=3, n++)
- {
- pal[i] =(unsigned char)n;
- pal[i+1]=0;
- pal[i+2]=(unsigned char)(255 - n);
+ * palette #4. blue-red
+ * make a palette whith blue to red colors
+ *-------------------------------------------------------------------------
+ */
+ for (i = 0, n = 0; i < 256 * 3; i += 3, n++) {
+ pal[i] = (unsigned char)n;
+ pal[i + 1] = 0;
+ pal[i + 2] = (unsigned char)(255 - n);
}
/* make a palette */
- if (H5IMmake_palette(fid,PAL4_NAME,pal_dims,pal)<0)
+ if (H5IMmake_palette(fid, PAL4_NAME, pal_dims, pal) < 0)
goto out;
/* attach the palette to the image dataset */
- if (H5IMlink_palette(fid,IMAGE1_NAME,PAL4_NAME)<0)
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL4_NAME) < 0)
goto out;
-
/*-------------------------------------------------------------------------
- * true color image example with pixel interlace
- *-------------------------------------------------------------------------
- */
+ * true color image example with pixel interlace
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make true color image with pixel interlace");
+ HL_TESTING2("make true color image with pixel interlace");
/* read second data file */
- if ((read_data(DATA_FILE2,&width,&height))<0)
+ if ((read_data(DATA_FILE2, &width, &height)) < 0)
goto out;
/* make image */
- if ((H5IMmake_image_24bit(fid,IMAGE2_NAME,width,height,"INTERLACE_PIXEL",image_data))<0)
+ if ((H5IMmake_image_24bit(fid, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", image_data)) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * True color image example with plane interlace
- *-------------------------------------------------------------------------
- */
+ * True color image example with plane interlace
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make true color image with plane interlace");
+ HL_TESTING2("make true color image with plane interlace");
/* read third data file */
- if ((read_data(DATA_FILE3,&width,&height))<0)
+ if ((read_data(DATA_FILE3, &width, &height)) < 0)
goto out;
/* make image */
- if ((H5IMmake_image_24bit(fid,IMAGE3_NAME,width,height,"INTERLACE_PLANE",image_data))<0)
+ if ((H5IMmake_image_24bit(fid, IMAGE3_NAME, width, height, "INTERLACE_PLANE", image_data)) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if (H5Fclose(fid)<0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
/* Release memory buffer */
@@ -509,18 +489,16 @@ static int test_data(void)
/* error zone, gracefully close */
out:
/* Release memory buffer */
- if(image_data)
+ if (image_data)
HDfree(image_data);
- H5E_BEGIN_TRY {
- H5Fclose(fid);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_END_TRY;
H5_FAILED();
return FAIL;
}
-
/*
The following test provides an examples of how to generate HDF5 image data from
floating point data. In the example we use real life topographic data
@@ -534,46 +512,34 @@ http://modb.oce.ulg.ac.be/
*/
-static int test_generate(void)
+static int
+test_generate(void)
{
- hid_t fid;
- hsize_t pal_dims[2] = { 256, 3 };
- float *data;
- int imax, jmax, kmax;
- int n_elements;
- float valex, xmin, xmax, value;
- FILE *f = NULL;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char data_file[512]=""; /* buffer to hold name of existing data file */
- int i;
- int retval = FAIL;
+ hid_t fid;
+ hsize_t pal_dims[2] = {256, 3};
+ float * data = NULL;
+ int imax, jmax, kmax;
+ int n_elements;
+ float valex, xmin, xmax, value;
+ FILE * f = NULL;
+ const char *data_file = H5_get_srcdir_filename(DATA_FILE4);
+ int i;
+ int retval = FAIL;
/* create a file using default properties */
- if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if ((fid = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- printf("Testing read and process data and make indexed images\n");
-
- /*-------------------------------------------------------------------------
- * compose the name of the file to open, using the srcdir, if appropriate
- *-------------------------------------------------------------------------
- */
- if ( srcdir )
- {
- HDstrcpy(data_file, srcdir);
- HDstrcat(data_file, "/");
- }
- HDstrcat(data_file,DATA_FILE4);
+ HDprintf("Testing read and process data and make indexed images\n");
/*-------------------------------------------------------------------------
- * read data; the file data format is described below
- *-------------------------------------------------------------------------
- */
+ * read data; the file data format is described below
+ *-------------------------------------------------------------------------
+ */
- f = HDfopen( data_file, "r" ) ;
- if ( f == NULL )
- {
- printf( "Could not find file %s. Try set $srcdir \n", data_file );
+ f = HDfopen(data_file, "r");
+ if (f == NULL) {
+ HDprintf("Could not find file %s. Try set $srcdir \n", data_file);
goto out;
}
@@ -612,131 +578,135 @@ static int test_generate(void)
!
*/
-
- fscanf( f, "%d %d %d", &imax, &jmax, &kmax );
- fscanf( f, "%f %f %f", &valex, &xmin, &xmax );
+ if (fscanf(f, "%d %d %d", &imax, &jmax, &kmax) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+ if (fscanf(f, "%f %f %f", &valex, &xmin, &xmax) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
/* Sanity check on scanned-in values */
- if(imax < 1 || jmax < 1 || kmax < 1)
+ if (imax < 1 || jmax < 1 || kmax < 1)
goto out;
/* Test product for integer overflow */
- if(imax > INT_MAX / jmax)
+ if (imax > INT_MAX / jmax)
goto out;
- if(imax * jmax > INT_MAX / kmax)
+ if (imax * jmax > INT_MAX / kmax)
goto out;
n_elements = imax * jmax * kmax;
/* Test buffer sizes for overflow */
- if(n_elements > INT_MAX / (int)sizeof(unsigned char))
+ if (n_elements > INT_MAX / (int)sizeof(unsigned char))
goto out;
- if(n_elements > INT_MAX / (int)sizeof(float))
+ if (n_elements > INT_MAX / (int)sizeof(float))
goto out;
-
+
data = (float *)HDmalloc((size_t)n_elements * sizeof(float));
- if(NULL == data)
+ if (NULL == data)
goto out;
image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char));
- if(NULL == image_data)
+ if (NULL == image_data)
goto out;
- for ( i = 0; i < n_elements; i++ )
- {
- fscanf( f, "%f ", &value );
+ for (i = 0; i < n_elements; i++) {
+ if (fscanf(f, "%f ", &value) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
data[i] = value;
}
HDfclose(f);
f = NULL;
/*-------------------------------------------------------------------------
- * transform the data from floating point to unsigned char
- * we are processing all the data here
- *-------------------------------------------------------------------------
- */
+ * transform the data from floating point to unsigned char
+ * we are processing all the data here
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make indexed image from all the data");
+ HL_TESTING2("make indexed image from all the data");
- for ( i = 0; i < n_elements; i++ )
- image_data[i] = (unsigned char)(( 255 * (data[i] - xmin ) ) / (xmax - xmin ));
+ for (i = 0; i < n_elements; i++)
+ image_data[i] = (unsigned char)((255 * (data[i] - xmin)) / (xmax - xmin));
/* Make the image */
- if ((H5IMmake_image_8bit(fid,"All data",(hsize_t)imax,(hsize_t)jmax,image_data))<0)
+ if ((H5IMmake_image_8bit(fid, "All data", (hsize_t)imax, (hsize_t)jmax, image_data)) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * transform the data from floating point to unsigned char
- * here we just process the land data
- *-------------------------------------------------------------------------
- */
+ * transform the data from floating point to unsigned char
+ * here we just process the land data
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make indexed image from land data");
+ HL_TESTING2("make indexed image from land data");
- for ( i = 0; i < n_elements; i++ )
- {
- if ( data[i] < 0 )
+ for (i = 0; i < n_elements; i++) {
+ if (data[i] < 0)
image_data[i] = 0;
else
- image_data[i] = (unsigned char)(( 255 * (data[i] ) ) / xmax );
+ image_data[i] = (unsigned char)((255 * (data[i])) / xmax);
}
/* make the image */
- if ((H5IMmake_image_8bit(fid,"Land data",(hsize_t)imax,(hsize_t)jmax,image_data))<0)
+ if ((H5IMmake_image_8bit(fid, "Land data", (hsize_t)imax, (hsize_t)jmax, image_data)) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * transform the data from floating point to unsigned char
- * here we just process the sea data
- *-------------------------------------------------------------------------
- */
+ * transform the data from floating point to unsigned char
+ * here we just process the sea data
+ *-------------------------------------------------------------------------
+ */
- TESTING2("make indexed image from sea data");
+ HL_TESTING2("make indexed image from sea data");
- for ( i = 0; i < n_elements; i++ )
- {
- if ( data[i] > 0 )
+ for (i = 0; i < n_elements; i++) {
+ if (data[i] > 0)
image_data[i] = 0;
else
- image_data[i] = (unsigned char)(( 255 * (data[i] - xmin ) ) / xmin );
+ image_data[i] = (unsigned char)((255 * (data[i] - xmin)) / xmin);
}
/* make the image */
- if ((H5IMmake_image_8bit(fid,"Sea data",(hsize_t)imax,(hsize_t)jmax,image_data))<0)
+ if ((H5IMmake_image_8bit(fid, "Sea data", (hsize_t)imax, (hsize_t)jmax, image_data)) < 0)
goto out;
PASSED();
/*-------------------------------------------------------------------------
- * make a palette and attach it to the datasets
- *-------------------------------------------------------------------------
- */
+ * make a palette and attach it to the datasets
+ *-------------------------------------------------------------------------
+ */
- TESTING2("attaching palettes");
+ HL_TESTING2("attaching palettes");
/* make a palette */
- if ((H5IMmake_palette(fid,PAL1_NAME,pal_dims,pal_rgb))<0)
+ if ((H5IMmake_palette(fid, PAL1_NAME, pal_dims, pal_rgb)) < 0)
goto out;
/* attach the palette to the image datasets */
- if ((H5IMlink_palette(fid,"All data",PAL1_NAME))<0)
+ if ((H5IMlink_palette(fid, "All data", PAL1_NAME)) < 0)
goto out;
- if ((H5IMlink_palette(fid,"Land data",PAL1_NAME))<0)
+ if ((H5IMlink_palette(fid, "Land data", PAL1_NAME)) < 0)
goto out;
- if ((H5IMlink_palette(fid,"Sea data",PAL1_NAME))<0)
+ if ((H5IMlink_palette(fid, "Sea data", PAL1_NAME)) < 0)
goto out;
PASSED();
-
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- if (H5Fclose(fid)<0)
+ * close
+ *-------------------------------------------------------------------------
+ */
+ if (H5Fclose(fid) < 0)
goto out;
/* Release memory buffers */
@@ -749,235 +719,232 @@ static int test_generate(void)
/* error zone, gracefully close */
out:
/* Release memory buffers */
- if(data)
+ if (data)
HDfree(data);
- if(image_data)
+ if (image_data)
HDfree(image_data);
- H5E_BEGIN_TRY {
- H5Fclose(fid);
- } H5E_END_TRY;
- if(f)
+ H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_END_TRY;
+ if (f)
HDfclose(f);
H5_FAILED();
return retval;
}
-
/*-------------------------------------------------------------------------
-* read_data
-* utility function to read ASCII image data
-* the files have a header of the type
-*
-* components
-* n
-* height
-* n
-* width
-* n
-*
-* followed by the image data
-*
-*-------------------------------------------------------------------------
-*/
-
-static int read_data(const char* fname, /*IN*/
- hsize_t *width, /*OUT*/
- hsize_t *height /*OUT*/)
+ * read_data
+ * utility function to read ASCII image data
+ * the files have a header of the type
+ *
+ * components
+ * n
+ * height
+ * n
+ * width
+ * n
+ *
+ * followed by the image data
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static int
+read_data(const char *fname, /*IN*/
+ hsize_t * width, /*OUT*/
+ hsize_t * height /*OUT*/)
{
- int i, n;
- int color_planes;
- char str[20];
- FILE *f = NULL;
- int w, h;
- int n_elements;
+ int i, n;
+ int color_planes;
+ char str[20];
+ FILE * f = NULL;
+ int w, h;
+ int n_elements;
const char *data_file = H5_get_srcdir_filename(fname);
- int ret_val = -1;
+ int ret_val = -1;
/*-------------------------------------------------------------------------
- * read
- *-------------------------------------------------------------------------
- */
+ * read
+ *-------------------------------------------------------------------------
+ */
- if(NULL == (f = HDfopen(data_file, "r"))) {
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ if (NULL == (f = HDfopen(data_file, "r"))) {
+ HDprintf("Could not open file %s. Try set $srcdir \n", data_file);
goto out;
}
- fscanf(f, "%s", str);
- fscanf(f, "%d", &color_planes);
- fscanf(f, "%s", str);
- fscanf(f, "%d", &h);
- fscanf(f, "%s", str);
- fscanf(f, "%d", &w);
+ if (fscanf(f, "%s", str) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+
+ if (fscanf(f, "%d", &color_planes) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+
+ if (fscanf(f, "%s", str) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+
+ if (fscanf(f, "%d", &h) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+
+ if (fscanf(f, "%s", str) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
+
+ if (fscanf(f, "%d", &w) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
/* Check product for overflow */
- if(w < 1 || h < 1 || color_planes < 1)
+ if (w < 1 || h < 1 || color_planes < 1)
goto out;
- if(w > INT_MAX / h)
+ if (w > INT_MAX / h)
goto out;
- if(w * h > INT_MAX / color_planes)
+ if (w * h > INT_MAX / color_planes)
goto out;
/* Compute buffer size */
n_elements = w * h * color_planes;
/* Check buffer size for overflow */
- if(n_elements > INT_MAX / (int)sizeof(unsigned char))
+ if (n_elements > INT_MAX / (int)sizeof(unsigned char))
goto out;
/* Release the buffer, if it was previously allocated */
- if(image_data)
+ if (image_data)
HDfree(image_data);
/* Allocate the image data buffer */
image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char));
- if(NULL == image_data)
+ if (NULL == image_data)
goto out;
- *width = (hsize_t)w;
+ *width = (hsize_t)w;
*height = (hsize_t)h;
/* Read data elements */
- for(i = 0; i < n_elements; i++) {
- fscanf(f, "%d",&n);
+ for (i = 0; i < n_elements; i++) {
+ if (fscanf(f, "%d", &n) < 0 && HDferror(f)) {
+ HDprintf("fscanf error in file %s.\n", data_file);
+ goto out;
+ } /* end if */
image_data[i] = (unsigned char)n;
} /* end for */
/* Indicate success */
ret_val = 1;
-out:
- if(f)
+out:
+ if (f)
HDfclose(f);
return ret_val;
} /* end read_data() */
-
/*-------------------------------------------------------------------------
-* read_palette
-* Read an ASCII palette file .PAL into an array
-* the files have a header of the type
-*
-* Parameters:
-* fname - name of file to read.
-* palette - array of rgb_t to store the read palette.
-* palette_size - number of elements in 'palette' array
-*
-*-------------------------------------------------------------------------
-*/
-
+ * read_palette
+ * Read an ASCII palette file .PAL into an array
+ * the files have a header of the type
+ *
+ * Parameters:
+ * fname - name of file to read.
+ * palette - array of rgb_t to store the read palette.
+ * palette_size - number of elements in 'palette' array
+ *
+ *-------------------------------------------------------------------------
+ */
#define STRING_JASC "JASC-PAL"
#define VERSION_JASC "0100"
#define STRING_CWPAL "CWPAL"
#define VERSION_CWPAL "100"
-static int read_palette(const char* fname,
- rgb_t *palette,
- size_t palette_size)
+static int
+read_palette(const char *fname, rgb_t *palette, size_t palette_size)
{
- FILE *file;
- char buffer[80];
- unsigned u;
- unsigned int red;
- unsigned int green;
- unsigned int blue;
- unsigned nentries;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char data_file[512]; /* buffer to hold name of existing data file */
-
- /*-------------------------------------------------------------------------
- * compose the name of the file to open, using "srcdir", if appropriate
- *-------------------------------------------------------------------------
- */
- HDstrcpy(data_file, "");
- if (srcdir)
- {
- HDstrcpy(data_file, srcdir);
- HDstrcat(data_file, "/");
- }
- HDstrcat(data_file,fname);
+ FILE * file;
+ char buffer[80];
+ unsigned u;
+ unsigned int red;
+ unsigned int green;
+ unsigned int blue;
+ unsigned nentries;
+ const char * data_file = H5_get_srcdir_filename(fname);
/* ensure the given palette is valid */
if (!palette)
return -1;
/* open the input file */
- if (!(file = HDfopen(data_file, "r")))
- {
- printf( "Could not open file %s. Try set $srcdir \n", data_file );
+ if (!(file = HDfopen(data_file, "r"))) {
+ HDprintf("Could not open file %s. Try set $srcdir \n", data_file);
return -1;
}
/* read the file ident string */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL)
- {
+ if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
HDfclose(file);
return -1;
}
/* ensure it matches the palette file ident string */
- if ( HDstrncmp(buffer, STRING_JASC, sizeof(STRING_JASC) - 1) != 0 &&
- HDstrncmp(buffer, STRING_CWPAL, sizeof(STRING_CWPAL) - 1) != 0 )
- {
+ if (HDstrncmp(buffer, STRING_JASC, sizeof(STRING_JASC) - 1) != 0 &&
+ HDstrncmp(buffer, STRING_CWPAL, sizeof(STRING_CWPAL) - 1) != 0) {
HDfclose(file);
return -1;
}
/* read the version string */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL)
- {
+ if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
HDfclose(file);
return -1;
}
/* ensure it matches the palette file version string */
- if ( HDstrncmp(buffer, VERSION_JASC, sizeof(VERSION_JASC) - 1) != 0 &&
- HDstrncmp(buffer, VERSION_CWPAL, sizeof(VERSION_CWPAL) - 1) != 0 )
- {
+ if (HDstrncmp(buffer, VERSION_JASC, sizeof(VERSION_JASC) - 1) != 0 &&
+ HDstrncmp(buffer, VERSION_CWPAL, sizeof(VERSION_CWPAL) - 1) != 0) {
HDfclose(file);
return -1;
}
/* read the number of colors */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL)
- {
+ if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
HDfclose(file);
return -1;
}
-
/* extract the number of colors.
check for missing version or number of colors
in this case it reads the first entry
*/
- if ( HDstrlen( buffer ) > 4 )
- {
+ if (HDstrlen(buffer) > 4) {
HDfclose(file);
return -1;
}
- if (sscanf(buffer, "%u", &nentries) != 1)
- {
+ if (sscanf(buffer, "%u", &nentries) != 1) {
HDfclose(file);
return -1;
}
/* ensure there are a sensible number of colors in the palette */
- if ((nentries > 256) || (nentries > palette_size))
- {
+ if ((nentries > 256) || (nentries > palette_size)) {
HDfclose(file);
- return(-1);
+ return (-1);
}
/* read the palette entries */
- for (u = 0; u < nentries; u++)
- {
+ for (u = 0; u < nentries; u++) {
/* extract the red, green and blue color components. */
- if (fscanf(file, "%u %u %u", &red, &green, &blue) != 3)
- {
+ if (fscanf(file, "%u %u %u", &red, &green, &blue) != 3) {
HDfclose(file);
return -1;
}
@@ -992,4 +959,3 @@ static int read_palette(const char* fname,
return (int)nentries;
}
-
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 8d3d0b9..69a1fe5 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
#include <string.h>
@@ -17,7 +17,7 @@
#include "H5srcdir.h"
#include "H5LTpublic.h"
-#define FILE_NAME "test_lite1.h5"
+#define FILE_NAME "test_lite1.h5"
#define FILE_NAME2 "test_lite2.h5"
#define FILE_NAME3 "test_lite3.h5"
#define FILE_NAME4 "test_lite4.h5"
@@ -35,78 +35,76 @@
#define DIM 6
#define ATTR_NAME_SUB "att"
-#define ATTR1_NAME "attr string"
-#define ATTR2_NAME "attr char"
-#define ATTR3_NAME "attr short"
-#define ATTR4_NAME "attr int"
+#define ATTR1_NAME "attr string"
+#define ATTR2_NAME "attr char"
+#define ATTR3_NAME "attr short"
+#define ATTR4_NAME "attr int"
#define ATTR_NAME_EXT "att int ext"
-#define ATTR5_NAME "attr long"
-#define ATTR6_NAME "attr uchar"
-#define ATTR7_NAME "attr ushort"
-#define ATTR8_NAME "attr uint"
-#define ATTR9_NAME "attr ulong"
-#define ATTR10_NAME "attr float"
-#define ATTR11_NAME "attr double"
-
-static herr_t make_attributes( hid_t loc_id, const char* obj_name );
+#define ATTR5_NAME "attr long"
+#define ATTR6_NAME "attr uchar"
+#define ATTR7_NAME "attr ushort"
+#define ATTR8_NAME "attr uint"
+#define ATTR9_NAME "attr ulong"
+#define ATTR10_NAME "attr float"
+#define ATTR11_NAME "attr double"
+static herr_t make_attributes(hid_t loc_id, const char *obj_name);
/*-------------------------------------------------------------------------
-* test dataset functions
-*-------------------------------------------------------------------------
-*/
+ * test dataset functions
+ *-------------------------------------------------------------------------
+ */
-static int test_dsets( void )
+static int
+test_dsets(void)
{
- int rank = 2;
- hsize_t dims[2] = {2,3};
- hid_t file_id;
- hid_t dataset_id;
- char data_char_in[DIM] = {1,2,3,4,5,6};
- char data_char_out[DIM];
- short data_short_in[DIM] = {1,2,3,4,5,6};
- short data_short_out[DIM];
- int data_int_in[DIM] = {1,2,3,4,5,6};
- int data_int_out[DIM];
- long data_long_in[DIM] = {1,2,3,4,5,6};
- long data_long_out[DIM];
- float data_float_in[DIM] = {1,2,3,4,5,6};
- float data_float_out[DIM];
- double data_double_in[DIM] = {1,2,3,4,5,6};
- double data_double_out[DIM];
- const char *data_string_in = "This is a string";
- char data_string_out[20];
- int i;
-
+ int rank = 2;
+ hsize_t dims[2] = {2, 3};
+ hid_t file_id;
+ hid_t dataset_id;
+ char data_char_in[DIM] = {1, 2, 3, 4, 5, 6};
+ char data_char_out[DIM];
+ short data_short_in[DIM] = {1, 2, 3, 4, 5, 6};
+ short data_short_out[DIM];
+ int data_int_in[DIM] = {1, 2, 3, 4, 5, 6};
+ int data_int_out[DIM];
+ long data_long_in[DIM] = {1, 2, 3, 4, 5, 6};
+ long data_long_out[DIM];
+ float data_float_in[DIM] = {1, 2, 3, 4, 5, 6};
+ float data_float_out[DIM];
+ double data_double_in[DIM] = {1, 2, 3, 4, 5, 6};
+ double data_double_out[DIM];
+ const char *data_string_in = "This is a string";
+ char data_string_out[20];
+ int i;
/* Create a new file using default properties. */
- file_id = H5Fcreate( FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
+ file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * H5LTmake_dataset test
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset");
+ HL_TESTING2("H5LTmake_dataset");
/* Make dataset */
- if ( H5LTmake_dataset( file_id, DSET0_NAME, rank, dims, H5T_NATIVE_INT, data_int_in ) < 0 )
+ if (H5LTmake_dataset(file_id, DSET0_NAME, rank, dims, H5T_NATIVE_INT, data_int_in) < 0)
goto out;
/* Read dataset using the basic HDF5 API */
- if ( ( dataset_id = H5Dopen2(file_id, DSET0_NAME, H5P_DEFAULT) ) < 0 )
+ if ((dataset_id = H5Dopen2(file_id, DSET0_NAME, H5P_DEFAULT)) < 0)
goto out;
- if ( H5Dread ( dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_int_out ) < 0 )
+ if (H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_int_out) < 0)
goto out;
- if ( H5Dclose( dataset_id ) < 0 )
+ if (H5Dclose(dataset_id) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_int_in[i] != data_int_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_int_in[i] != data_int_out[i]) {
goto out;
}
}
@@ -114,18 +112,17 @@ static int test_dsets( void )
PASSED();
/*-------------------------------------------------------------------------
- * read using the LT function H5LTread_dataset
- *-------------------------------------------------------------------------
- */
+ * read using the LT function H5LTread_dataset
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTread_dataset");
+ HL_TESTING2("H5LTread_dataset");
- if ( H5LTread_dataset( file_id, DSET0_NAME, H5T_NATIVE_INT, data_int_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET0_NAME, H5T_NATIVE_INT, data_int_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_int_in[i] != data_int_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_int_in[i] != data_int_out[i]) {
goto out;
}
}
@@ -133,76 +130,70 @@ static int test_dsets( void )
PASSED();
/*-------------------------------------------------------------------------
- * test the H5LTmake_dataset_ functions
- *-------------------------------------------------------------------------
- */
-
+ * test the H5LTmake_dataset_ functions
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_char
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_char
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_char");
+ HL_TESTING2("H5LTmake_dataset_char");
/* Make dataset char */
- if ( H5LTmake_dataset_char( file_id, DSET1_NAME, rank, dims, data_char_in ) < 0 )
+ if (H5LTmake_dataset_char(file_id, DSET1_NAME, rank, dims, data_char_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET1_NAME, H5T_NATIVE_CHAR, data_char_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET1_NAME, H5T_NATIVE_CHAR, data_char_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_char_in[i] != data_char_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_char_in[i] != data_char_out[i]) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_char( file_id, DSET1_NAME, data_char_out ) < 0 )
+ if (H5LTread_dataset_char(file_id, DSET1_NAME, data_char_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_char_in[i] != data_char_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_char_in[i] != data_char_out[i]) {
goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_short
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_short
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_short");
+ HL_TESTING2("H5LTmake_dataset_short");
/* Make dataset short */
- if ( H5LTmake_dataset_short( file_id, DSET2_NAME, rank, dims, data_short_in ) < 0 )
+ if (H5LTmake_dataset_short(file_id, DSET2_NAME, rank, dims, data_short_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET2_NAME, H5T_NATIVE_SHORT, data_short_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET2_NAME, H5T_NATIVE_SHORT, data_short_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_short_in[i] != data_short_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_short_in[i] != data_short_out[i]) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_short( file_id, DSET2_NAME, data_short_out ) < 0 )
+ if (H5LTread_dataset_short(file_id, DSET2_NAME, data_short_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_short_in[i] != data_short_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_short_in[i] != data_short_out[i]) {
goto out;
}
}
@@ -210,180 +201,165 @@ static int test_dsets( void )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_int
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_int
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_int");
+ HL_TESTING2("H5LTmake_dataset_int");
/* Make dataset int */
- if ( H5LTmake_dataset_int( file_id, DSET3_NAME, rank, dims, data_int_in ) < 0 )
+ if (H5LTmake_dataset_int(file_id, DSET3_NAME, rank, dims, data_int_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET3_NAME, H5T_NATIVE_INT, data_int_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET3_NAME, H5T_NATIVE_INT, data_int_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_int_in[i] != data_int_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_int_in[i] != data_int_out[i]) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_int( file_id, DSET3_NAME, data_int_out ) < 0 )
+ if (H5LTread_dataset_int(file_id, DSET3_NAME, data_int_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_int_in[i] != data_int_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_int_in[i] != data_int_out[i]) {
goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_long
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_long
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_long");
+ HL_TESTING2("H5LTmake_dataset_long");
/* Make dataset long */
- if ( H5LTmake_dataset_long( file_id, DSET4_NAME, rank, dims, data_long_in ) < 0 )
+ if (H5LTmake_dataset_long(file_id, DSET4_NAME, rank, dims, data_long_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET4_NAME, H5T_NATIVE_LONG, data_long_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET4_NAME, H5T_NATIVE_LONG, data_long_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_long_in[i] != data_long_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_long_in[i] != data_long_out[i]) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_long( file_id, DSET4_NAME, data_long_out ) < 0 )
+ if (H5LTread_dataset_long(file_id, DSET4_NAME, data_long_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if ( data_long_in[i] != data_long_out[i] ) {
+ for (i = 0; i < DIM; i++) {
+ if (data_long_in[i] != data_long_out[i]) {
goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_float
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_float
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_float");
+ HL_TESTING2("H5LTmake_dataset_float");
/* Make dataset float */
- if ( H5LTmake_dataset_float( file_id, DSET5_NAME, rank, dims, data_float_in ) < 0 )
+ if (H5LTmake_dataset_float(file_id, DSET5_NAME, rank, dims, data_float_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET5_NAME, H5T_NATIVE_FLOAT, data_float_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET5_NAME, H5T_NATIVE_FLOAT, data_float_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if(!FLT_ABS_EQUAL(data_float_in[i],data_float_out[i])) {
+ for (i = 0; i < DIM; i++) {
+ if (!H5_FLT_ABS_EQUAL(data_float_in[i], data_float_out[i])) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_float( file_id, DSET5_NAME, data_float_out ) < 0 )
+ if (H5LTread_dataset_float(file_id, DSET5_NAME, data_float_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if(!FLT_ABS_EQUAL(data_float_in[i],data_float_out[i])) {
+ for (i = 0; i < DIM; i++) {
+ if (!H5_FLT_ABS_EQUAL(data_float_in[i], data_float_out[i])) {
goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_double
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_double
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_double");
+ HL_TESTING2("H5LTmake_dataset_double");
/* Make dataset double */
- if ( H5LTmake_dataset_double( file_id, DSET6_NAME, rank, dims, data_double_in ) < 0 )
+ if (H5LTmake_dataset_double(file_id, DSET6_NAME, rank, dims, data_double_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset( file_id, DSET6_NAME, H5T_NATIVE_DOUBLE, data_double_out ) < 0 )
+ if (H5LTread_dataset(file_id, DSET6_NAME, H5T_NATIVE_DOUBLE, data_double_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if(!DBL_ABS_EQUAL(data_double_in[i],data_double_out[i])) {
+ for (i = 0; i < DIM; i++) {
+ if (!H5_DBL_ABS_EQUAL(data_double_in[i], data_double_out[i])) {
goto out;
}
}
/* Read dataset */
- if ( H5LTread_dataset_double( file_id, DSET6_NAME, data_double_out ) < 0 )
+ if (H5LTread_dataset_double(file_id, DSET6_NAME, data_double_out) < 0)
goto out;
- for (i = 0; i < DIM; i++)
- {
- if(!DBL_ABS_EQUAL(data_double_in[i],data_double_out[i])) {
+ for (i = 0; i < DIM; i++) {
+ if (!H5_DBL_ABS_EQUAL(data_double_in[i], data_double_out[i])) {
goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTmake_dataset_string
- *-------------------------------------------------------------------------
- */
+ * H5LTmake_dataset_string
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTmake_dataset_string");
+ HL_TESTING2("H5LTmake_dataset_string");
/* Make dataset string */
- if ( H5LTmake_dataset_string(file_id,DSET7_NAME,data_string_in) < 0 )
+ if (H5LTmake_dataset_string(file_id, DSET7_NAME, data_string_in) < 0)
goto out;
/* Read dataset */
- if ( H5LTread_dataset_string(file_id,DSET7_NAME,data_string_out) < 0 )
+ if (H5LTread_dataset_string(file_id, DSET7_NAME, data_string_out) < 0)
goto out;
- if ( HDstrcmp(data_string_in,data_string_out) != 0 )
+ if (HDstrcmp(data_string_in, data_string_out) != 0)
goto out;
-
-
/*-------------------------------------------------------------------------
- * end tests
- *-------------------------------------------------------------------------
- */
+ * end tests
+ *-------------------------------------------------------------------------
+ */
/* Close the file. */
- H5Fclose( file_id );
+ H5Fclose(file_id);
PASSED();
-
return 0;
out:
@@ -393,75 +369,83 @@ out:
}
/*-------------------------------------------------------------------------
-* test attribute functions
-*-------------------------------------------------------------------------
-*/
+ * test attribute functions
+ *-------------------------------------------------------------------------
+ */
-static int test_attr(void)
+static int
+test_attr(void)
{
hid_t file_id;
hid_t dataset_id;
hid_t group_id;
hid_t space_id;
- hsize_t dims[1] = { 5 };
+ hsize_t dims[1] = {5};
/* Create a new file using default properties. */
file_id = H5Fcreate(FILE_NAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * Create a dataset named "dset" on the root group
- *-------------------------------------------------------------------------
- */
+ * Create a dataset named "dset" on the root group
+ *-------------------------------------------------------------------------
+ */
/* Create the data space */
- if((space_id = H5Screate_simple(1, dims, NULL)) < 0) goto out;
+ if ((space_id = H5Screate_simple(1, dims, NULL)) < 0)
+ goto out;
/* Create the dataset */
- if((dataset_id = H5Dcreate2(file_id , "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out;
+ if ((dataset_id = H5Dcreate2(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ goto out;
/* Close */
H5Dclose(dataset_id);
/*-------------------------------------------------------------------------
- * Create a group named "grp" on the root group
- *-------------------------------------------------------------------------
- */
+ * Create a group named "grp" on the root group
+ *-------------------------------------------------------------------------
+ */
/* Create a group. */
- if((group_id = H5Gcreate2(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out;
+ if ((group_id = H5Gcreate2(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
/* Close */
H5Gclose(group_id);
/*-------------------------------------------------------------------------
- *
- * Create attributes in the root group
- * Note that we are calling the H5LTset_attribute functions with the name "."
- *
- *-------------------------------------------------------------------------
- */
- if(make_attributes(file_id, ".") < 0) goto out;
+ *
+ * Create attributes in the root group
+ * Note that we are calling the H5LTset_attribute functions with the name "."
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (make_attributes(file_id, ".") < 0)
+ goto out;
/*-------------------------------------------------------------------------
- *
- * Create attributes in the dataset "dset"
- *
- *-------------------------------------------------------------------------
- */
- if(make_attributes(file_id, "dset") < 0) goto out;
+ *
+ * Create attributes in the dataset "dset"
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (make_attributes(file_id, "dset") < 0)
+ goto out;
/*-------------------------------------------------------------------------
- *
- * Create attributes in the group "grp"
- *
- *-------------------------------------------------------------------------
- */
- if(make_attributes(file_id, "grp") < 0) goto out;
+ *
+ * Create attributes in the group "grp"
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (make_attributes(file_id, "grp") < 0)
+ goto out;
/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
+ * end
+ *-------------------------------------------------------------------------
+ */
/* Close the file. */
H5Fclose(file_id);
@@ -476,113 +460,109 @@ out:
}
/*-------------------------------------------------------------------------
-* make_attributes
-*-------------------------------------------------------------------------
-*/
+ * make_attributes
+ *-------------------------------------------------------------------------
+ */
-static herr_t make_attributes( hid_t loc_id, const char* obj_name )
+static herr_t
+make_attributes(hid_t loc_id, const char *obj_name)
{
int rank_out;
- hsize_t *dims_out = 0;
+ hsize_t * dims_out = 0;
H5T_class_t type_class;
size_t type_size;
int i;
- char attr_str_in[] = {"My attribute"};
- char attr_str_out[20];
- char attr_char_in[5] = {1,2,3,4,5};
- char attr_char_out[5];
- short attr_short_in[5] = {1,2,3,4,5};
- short attr_short_out[5];
- int attr_int_in[5] = {1,2,3,4,5};
- int attr_int_out[5];
- long attr_long_in[5] = {1,2,3,4,5};
- long attr_long_out[5];
- float attr_float_in[5] = {1,2,3,4,5};
- float attr_float_out[5];
- double attr_double_in[5] = {1,2,3,4,5};
- double attr_double_out[5];
- unsigned char attr_uchar_in[5] = {1,2,3,4,5};
- unsigned char attr_uchar_out[5];
- unsigned short attr_ushort_in[5] = {1,2,3,4,5};
- unsigned short attr_ushort_out[5];
- unsigned int attr_uint_in[5] = {1,2,3,4,5};
- unsigned int attr_uint_out[5];
- unsigned long attr_ulong_in[5] = {1,2,3,4,5};
- unsigned long attr_ulong_out[5];
+ char attr_str_in[] = {"My attribute"};
+ char attr_str_out[20];
+ char attr_char_in[5] = {1, 2, 3, 4, 5};
+ char attr_char_out[5];
+ short attr_short_in[5] = {1, 2, 3, 4, 5};
+ short attr_short_out[5];
+ int attr_int_in[5] = {1, 2, 3, 4, 5};
+ int attr_int_out[5];
+ long attr_long_in[5] = {1, 2, 3, 4, 5};
+ long attr_long_out[5];
+ float attr_float_in[5] = {1, 2, 3, 4, 5};
+ float attr_float_out[5];
+ double attr_double_in[5] = {1, 2, 3, 4, 5};
+ double attr_double_out[5];
+ unsigned char attr_uchar_in[5] = {1, 2, 3, 4, 5};
+ unsigned char attr_uchar_out[5];
+ unsigned short attr_ushort_in[5] = {1, 2, 3, 4, 5};
+ unsigned short attr_ushort_out[5];
+ unsigned int attr_uint_in[5] = {1, 2, 3, 4, 5};
+ unsigned int attr_uint_out[5];
+ unsigned long attr_ulong_in[5] = {1, 2, 3, 4, 5};
+ unsigned long attr_ulong_out[5];
/*-------------------------------------------------------------------------
- * H5LTset_attribute_string test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_string test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_string");
+ HL_TESTING2("H5LTset_attribute_string");
/* Set the attribute */
- if ( H5LTset_attribute_string( loc_id, obj_name, ATTR1_NAME, attr_str_in ) < 0 )
+ if (H5LTset_attribute_string(loc_id, obj_name, ATTR1_NAME, attr_str_in) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_string test
- *-------------------------------------------------------------------------
- */
-
- TESTING("H5LTget_attribute_string");
+ * H5LTset_attribute_string test
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("H5LTget_attribute_string");
/* Get the attribute */
- if ( H5LTget_attribute_string( loc_id, obj_name, ATTR1_NAME, attr_str_out ) < 0 )
+ if (H5LTget_attribute_string(loc_id, obj_name, ATTR1_NAME, attr_str_out) < 0)
return -1;
- if ( HDstrcmp( attr_str_in, attr_str_out ) != 0 )
- {
+ if (HDstrcmp(attr_str_in, attr_str_out) != 0) {
return -1;
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTset_attribute_char test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_char test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_char");
+ HL_TESTING2("H5LTset_attribute_char");
/* Set the attribute */
- if ( H5LTset_attribute_char( loc_id, obj_name, ATTR2_NAME, attr_char_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_char(loc_id, obj_name, ATTR2_NAME, attr_char_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_char test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_char test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_char");
+ HL_TESTING2("H5LTget_attribute_char");
/* Get the attribute */
- if ( H5LTget_attribute_char( loc_id, obj_name, ATTR2_NAME, attr_char_out ) < 0 )
+ if (H5LTget_attribute_char(loc_id, obj_name, ATTR2_NAME, attr_char_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_char_in[i] != attr_char_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_char_in[i] != attr_char_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR2_NAME, H5T_NATIVE_CHAR, attr_char_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR2_NAME, H5T_NATIVE_CHAR, attr_char_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_char_in[i] != attr_char_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_char_in[i] != attr_char_out[i]) {
return -1;
}
}
@@ -590,117 +570,109 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_short test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_short test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_short");
+ HL_TESTING2("H5LTset_attribute_short");
/* Set the attribute */
- if ( H5LTset_attribute_short( loc_id, obj_name, ATTR3_NAME, attr_short_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_short(loc_id, obj_name, ATTR3_NAME, attr_short_in, (size_t)5) < 0)
return -1;
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTget_attribute_short test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_short test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_short");
+ HL_TESTING2("H5LTget_attribute_short");
/* Get the attribute */
- if ( H5LTget_attribute_short( loc_id, obj_name, ATTR3_NAME, attr_short_out ) < 0 )
+ if (H5LTget_attribute_short(loc_id, obj_name, ATTR3_NAME, attr_short_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_short_in[i] != attr_short_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_short_in[i] != attr_short_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR3_NAME, H5T_NATIVE_SHORT, attr_short_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR3_NAME, H5T_NATIVE_SHORT, attr_short_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_short_in[i] != attr_short_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_short_in[i] != attr_short_out[i]) {
return -1;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTset_attribute_int test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_int test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_int");
+ HL_TESTING2("H5LTset_attribute_int");
/* Set the attribute */
- if ( H5LTset_attribute_int( loc_id, obj_name, ATTR4_NAME, attr_int_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_int(loc_id, obj_name, ATTR4_NAME, attr_int_in, (size_t)5) < 0)
return -1;
/* Set the attribute which is a substring of an existing attribute */
- if ( H5LTset_attribute_int( loc_id, obj_name, ATTR_NAME_SUB, attr_int_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_int(loc_id, obj_name, ATTR_NAME_SUB, attr_int_in, (size_t)5) < 0)
return -1;
/* Set the attribute which is an extension of an existing attribute */
- if ( H5LTset_attribute_int( loc_id, obj_name, ATTR_NAME_EXT, attr_int_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_int(loc_id, obj_name, ATTR_NAME_EXT, attr_int_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_int test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_int test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_int");
+ HL_TESTING2("H5LTget_attribute_int");
/* Get the attribute */
- if ( H5LTget_attribute_int( loc_id, obj_name, ATTR4_NAME, attr_int_out ) < 0 )
+ if (H5LTget_attribute_int(loc_id, obj_name, ATTR4_NAME, attr_int_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_int_in[i] != attr_int_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_int_in[i] != attr_int_out[i]) {
return -1;
}
}
- if ( H5LTget_attribute_int( loc_id, obj_name, ATTR_NAME_SUB, attr_int_out ) < 0 )
+ if (H5LTget_attribute_int(loc_id, obj_name, ATTR_NAME_SUB, attr_int_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_int_in[i] != attr_int_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_int_in[i] != attr_int_out[i]) {
return -1;
}
}
- if ( H5LTget_attribute_int( loc_id, obj_name, ATTR_NAME_EXT, attr_int_out ) < 0 )
+ if (H5LTget_attribute_int(loc_id, obj_name, ATTR_NAME_EXT, attr_int_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_int_in[i] != attr_int_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_int_in[i] != attr_int_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR4_NAME, H5T_NATIVE_INT, attr_int_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR4_NAME, H5T_NATIVE_INT, attr_int_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_int_in[i] != attr_int_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_int_in[i] != attr_int_out[i]) {
return -1;
}
}
@@ -708,43 +680,41 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_long test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_long test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_long");
+ HL_TESTING2("H5LTset_attribute_long");
/* Set the attribute */
- if ( H5LTset_attribute_long( loc_id, obj_name, ATTR5_NAME, attr_long_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_long(loc_id, obj_name, ATTR5_NAME, attr_long_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_long test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_long test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_long");
+ HL_TESTING2("H5LTget_attribute_long");
/* Get the attribute */
- if ( H5LTget_attribute_long( loc_id, obj_name, ATTR5_NAME, attr_long_out ) < 0 )
+ if (H5LTget_attribute_long(loc_id, obj_name, ATTR5_NAME, attr_long_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_long_in[i] != attr_long_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_long_in[i] != attr_long_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR5_NAME, H5T_NATIVE_LONG, attr_long_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR5_NAME, H5T_NATIVE_LONG, attr_long_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_long_in[i] != attr_long_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_long_in[i] != attr_long_out[i]) {
return -1;
}
}
@@ -752,43 +722,41 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_uchar test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_uchar test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_uchar");
+ HL_TESTING2("H5LTset_attribute_uchar");
/* Set the attribute */
- if ( H5LTset_attribute_uchar( loc_id, obj_name, ATTR6_NAME, attr_uchar_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_uchar(loc_id, obj_name, ATTR6_NAME, attr_uchar_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_uchar test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_uchar test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_uchar");
+ HL_TESTING2("H5LTget_attribute_uchar");
/* Get the attribute */
- if ( H5LTget_attribute_uchar( loc_id, obj_name, ATTR6_NAME, attr_uchar_out ) < 0 )
+ if (H5LTget_attribute_uchar(loc_id, obj_name, ATTR6_NAME, attr_uchar_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_uchar_in[i] != attr_uchar_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_uchar_in[i] != attr_uchar_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR6_NAME, H5T_NATIVE_UCHAR, attr_uchar_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR6_NAME, H5T_NATIVE_UCHAR, attr_uchar_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_uchar_in[i] != attr_uchar_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_uchar_in[i] != attr_uchar_out[i]) {
return -1;
}
}
@@ -796,89 +764,83 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_ushort test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_ushort test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_ushort");
+ HL_TESTING2("H5LTset_attribute_ushort");
/* Set the attribute */
- if ( H5LTset_attribute_ushort( loc_id, obj_name, ATTR7_NAME, attr_ushort_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_ushort(loc_id, obj_name, ATTR7_NAME, attr_ushort_in, (size_t)5) < 0)
return -1;
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTget_attribute_ushort test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_ushort test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_ushort");
+ HL_TESTING2("H5LTget_attribute_ushort");
/* Get the attribute */
- if ( H5LTget_attribute_ushort( loc_id, obj_name, ATTR7_NAME, attr_ushort_out ) < 0 )
+ if (H5LTget_attribute_ushort(loc_id, obj_name, ATTR7_NAME, attr_ushort_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_ushort_in[i] != attr_ushort_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_ushort_in[i] != attr_ushort_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR7_NAME, H5T_NATIVE_USHORT, attr_ushort_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR7_NAME, H5T_NATIVE_USHORT, attr_ushort_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_ushort_in[i] != attr_ushort_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_ushort_in[i] != attr_ushort_out[i]) {
return -1;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTset_attribute_int test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_int test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_uint");
+ HL_TESTING2("H5LTset_attribute_uint");
/* Set the attribute */
- if ( H5LTset_attribute_uint( loc_id, obj_name, ATTR8_NAME, attr_uint_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_uint(loc_id, obj_name, ATTR8_NAME, attr_uint_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_int test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_int test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_uint");
+ HL_TESTING2("H5LTget_attribute_uint");
/* Get the attribute */
- if ( H5LTget_attribute_uint( loc_id, obj_name, ATTR8_NAME, attr_uint_out ) < 0 )
+ if (H5LTget_attribute_uint(loc_id, obj_name, ATTR8_NAME, attr_uint_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_uint_in[i] != attr_uint_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_uint_in[i] != attr_uint_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR8_NAME, H5T_NATIVE_UINT, attr_uint_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR8_NAME, H5T_NATIVE_UINT, attr_uint_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_uint_in[i] != attr_uint_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_uint_in[i] != attr_uint_out[i]) {
return -1;
}
}
@@ -886,89 +848,83 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_ulong test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_ulong test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_ulong");
+ HL_TESTING2("H5LTset_attribute_ulong");
/* Set the attribute */
- if ( H5LTset_attribute_ulong( loc_id, obj_name, ATTR9_NAME, attr_ulong_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_ulong(loc_id, obj_name, ATTR9_NAME, attr_ulong_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_long test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_long test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_ulong");
+ HL_TESTING2("H5LTget_attribute_ulong");
/* Get the attribute */
- if ( H5LTget_attribute_ulong( loc_id, obj_name, ATTR9_NAME, attr_ulong_out ) < 0 )
+ if (H5LTget_attribute_ulong(loc_id, obj_name, ATTR9_NAME, attr_ulong_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_ulong_in[i] != attr_ulong_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_ulong_in[i] != attr_ulong_out[i]) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR9_NAME, H5T_NATIVE_ULONG, attr_ulong_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR9_NAME, H5T_NATIVE_ULONG, attr_ulong_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if ( attr_ulong_in[i] != attr_ulong_out[i] ) {
+ for (i = 0; i < 5; i++) {
+ if (attr_ulong_in[i] != attr_ulong_out[i]) {
return -1;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTset_attribute_float test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_float test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_float");
+ HL_TESTING2("H5LTset_attribute_float");
/* Set the attribute */
- if ( H5LTset_attribute_float( loc_id, obj_name, ATTR10_NAME, attr_float_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_float(loc_id, obj_name, ATTR10_NAME, attr_float_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_float test
- *-------------------------------------------------------------------------
- */
-
- TESTING("H5LTget_attribute_float");
+ * H5LTget_attribute_float test
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("H5LTget_attribute_float");
/* Get the attribute */
- if ( H5LTget_attribute_float( loc_id, obj_name, ATTR10_NAME, attr_float_out ) < 0 )
+ if (H5LTget_attribute_float(loc_id, obj_name, ATTR10_NAME, attr_float_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if(!FLT_ABS_EQUAL(attr_float_in[i],attr_float_out[i])) {
+ for (i = 0; i < 5; i++) {
+ if (!H5_FLT_ABS_EQUAL(attr_float_in[i], attr_float_out[i])) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR10_NAME, H5T_NATIVE_FLOAT, attr_float_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR10_NAME, H5T_NATIVE_FLOAT, attr_float_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if(!FLT_ABS_EQUAL(attr_float_in[i],attr_float_out[i])) {
+ for (i = 0; i < 5; i++) {
+ if (!H5_FLT_ABS_EQUAL(attr_float_in[i], attr_float_out[i])) {
return -1;
}
}
@@ -976,93 +932,90 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_double test
- *-------------------------------------------------------------------------
- */
+ * H5LTset_attribute_double test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTset_attribute_double");
+ HL_TESTING2("H5LTset_attribute_double");
/* Set the attribute */
- if ( H5LTset_attribute_double( loc_id, obj_name, ATTR11_NAME, attr_double_in, (size_t)5 ) < 0 )
+ if (H5LTset_attribute_double(loc_id, obj_name, ATTR11_NAME, attr_double_in, (size_t)5) < 0)
return -1;
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_double test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_double test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_double");
+ HL_TESTING2("H5LTget_attribute_double");
/* Get the attribute */
- if ( H5LTget_attribute_double( loc_id, obj_name, ATTR11_NAME, attr_double_out ) < 0 )
+ if (H5LTget_attribute_double(loc_id, obj_name, ATTR11_NAME, attr_double_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if(!DBL_ABS_EQUAL(attr_double_in[i],attr_double_out[i])) {
+ for (i = 0; i < 5; i++) {
+ if (!H5_DBL_ABS_EQUAL(attr_double_in[i], attr_double_out[i])) {
return -1;
}
}
/* Get the attribute */
- if ( H5LTget_attribute( loc_id, obj_name, ATTR11_NAME, H5T_NATIVE_DOUBLE, attr_double_out ) < 0 )
+ if (H5LTget_attribute(loc_id, obj_name, ATTR11_NAME, H5T_NATIVE_DOUBLE, attr_double_out) < 0)
return -1;
- for (i = 0; i < 5; i++)
- {
- if(!DBL_ABS_EQUAL(attr_double_in[i],attr_double_out[i])) {
+ for (i = 0; i < 5; i++) {
+ if (!H5_DBL_ABS_EQUAL(attr_double_in[i], attr_double_out[i])) {
return -1;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- * H5LTget_attribute_ndims test
- *-------------------------------------------------------------------------
- */
-
+ * H5LTget_attribute_ndims test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_ndims");
+ HL_TESTING2("H5LTget_attribute_ndims");
- if ( H5LTget_attribute_ndims( loc_id, obj_name, ATTR2_NAME, &rank_out ) < 0 )
+ if (H5LTget_attribute_ndims(loc_id, obj_name, ATTR2_NAME, &rank_out) < 0)
return -1;
- if ( rank_out != 1 ) {
+ if (rank_out != 1) {
return -1;
}
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_info test
- *-------------------------------------------------------------------------
- */
+ * H5LTget_attribute_info test
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5LTget_attribute_info");
+ HL_TESTING2("H5LTget_attribute_info");
- if(NULL==(dims_out = (hsize_t*) HDmalloc( sizeof(hsize_t) * (size_t)rank_out ))) return -1;
+ if (NULL == (dims_out = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank_out)))
+ return -1;
- if ( H5LTget_attribute_info( loc_id, obj_name, ATTR2_NAME, dims_out, &type_class, &type_size) < 0 ) {
- HDfree( dims_out );
+ if (H5LTget_attribute_info(loc_id, obj_name, ATTR2_NAME, dims_out, &type_class, &type_size) < 0) {
+ HDfree(dims_out);
return -1;
}
-
+
for (i = 0; i < rank_out; i++) {
- if ( dims_out[i] != 5 ) {
- HDfree( dims_out );
+ if (dims_out[i] != 5) {
+ HDfree(dims_out);
return -1;
}
}
- if ( type_class != H5T_INTEGER ) {
- HDfree( dims_out );
+ if (type_class != H5T_INTEGER) {
+ HDfree(dims_out);
return -1;
}
- HDfree( dims_out );
+ HDfree(dims_out);
PASSED();
@@ -1070,52 +1023,53 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_integers().
-*-------------------------------------------------------------------------
-*/
-static int test_integers(void)
+ * subroutine for test_text_dtype(): test_integers().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_integers(void)
{
- hid_t dtype;
- char* dt_str;
- size_t str_len;
+ hid_t dtype;
+ char * dt_str;
+ size_t str_len;
- TESTING3("\n text for integer types");
+ HL_TESTING3("\n text for integer types");
- if((dtype = H5LTtext_to_dtype("H5T_NATIVE_INT\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_NATIVE_INT\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_NATIVE_INT))
+ if (!H5Tequal(dtype, H5T_NATIVE_INT))
goto out;
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_STD_I8BE\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_STD_I8BE\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_STD_I8BE))
+ if (!H5Tequal(dtype, H5T_STD_I8BE))
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_STD_I8BE")) {
+ if (HDstrcmp(dt_str, "H5T_STD_I8BE")) {
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_STD_U16LE\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_STD_U16LE\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_STD_U16LE))
+ if (!H5Tequal(dtype, H5T_STD_U16LE))
goto out;
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1127,52 +1081,53 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_fps().
-*-------------------------------------------------------------------------
-*/
-static int test_fps(void)
+ * subroutine for test_text_dtype(): test_fps().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_fps(void)
{
- hid_t dtype;
- char* dt_str;
- size_t str_len;
+ hid_t dtype;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for floating-point types");
+ HL_TESTING3(" text for floating-point types");
- if((dtype = H5LTtext_to_dtype("H5T_NATIVE_LDOUBLE\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_NATIVE_LDOUBLE\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_NATIVE_LDOUBLE))
+ if (!H5Tequal(dtype, H5T_NATIVE_LDOUBLE))
goto out;
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_IEEE_F32BE\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_IEEE_F32BE\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_IEEE_F32BE))
+ if (!H5Tequal(dtype, H5T_IEEE_F32BE))
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
-
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_IEEE_F32BE")) {
+ if (HDstrcmp(dt_str, "H5T_IEEE_F32BE")) {
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_IEEE_F64LE\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_IEEE_F64LE\n", H5LT_DDL)) < 0)
goto out;
- if(!H5Tequal(dtype, H5T_IEEE_F64LE))
+ if (!H5Tequal(dtype, H5T_IEEE_F64LE))
goto out;
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1184,83 +1139,90 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_strings().
-*-------------------------------------------------------------------------
-*/
-static int test_strings(void)
+ * subroutine for test_text_dtype(): test_strings().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_strings(void)
{
- hid_t dtype;
- size_t str_size;
+ hid_t dtype;
+ size_t str_size;
H5T_str_t str_pad;
H5T_cset_t str_cset;
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str = NULL;
+ size_t str_len;
- TESTING3(" text for string types");
+ HL_TESTING3(" text for string types");
- if((dtype = H5LTtext_to_dtype("H5T_STRING { STRSIZE 13; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(
+ "H5T_STRING { STRSIZE 13; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }",
+ H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_STRING)
+ if (type_class != H5T_STRING)
goto out;
str_size = H5Tget_size(dtype);
- if(str_size != 13)
+ if (str_size != 13)
goto out;
str_pad = H5Tget_strpad(dtype);
- if(str_pad != H5T_STR_NULLTERM)
+ if (str_pad != H5T_STR_NULLTERM)
goto out;
str_cset = H5Tget_cset(dtype);
- if(str_cset != H5T_CSET_ASCII)
+ if (str_cset != H5T_CSET_ASCII)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET "
+ "H5T_CSET_ASCII; CTYPE H5T_C_S1; }",
+ H5LT_DDL)) < 0)
goto out;
- if(!H5Tis_variable_str(dtype))
+ if (!H5Tis_variable_str(dtype))
goto out;
str_pad = H5Tget_strpad(dtype);
- if(str_pad != H5T_STR_NULLPAD)
+ if (str_pad != H5T_STR_NULLPAD)
goto out;
str_cset = H5Tget_cset(dtype);
- if(str_cset != H5T_CSET_ASCII)
+ if (str_cset != H5T_CSET_ASCII)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
+ "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
@@ -1268,96 +1230,108 @@ static int test_strings(void)
/* Length of the character buffer is larger then needed */
str_len = str_len + 10;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
- goto out;
-
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
- HDfree(dt_str);
- goto out;
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ goto out;
+
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
+ HDfree(dt_str);
+ goto out;
}
- if(HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", str_len-1)) {
- printf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
- goto out;
+ if (HDstrncmp(dt_str,
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len - 1)) {
+ HDprintf("dt=\n%s\n", dt_str);
+ HDfree(dt_str);
+ goto out;
}
+ HDfree(dt_str);
/* Length of the character buffer is smaller then needed */
str_len = 21;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
- goto out;
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
+ goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
- HDfree(dt_str);
- goto out;
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
+ HDfree(dt_str);
+ goto out;
}
/* check the truncated string */
- if(strlen(dt_str) != str_len-1) goto out;
- str_len = strlen(dt_str);
- if(HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", str_len)) {
- printf("dt=\n%s\n", dt_str);
- HDfree(dt_str);
- goto out;
+ if (HDstrlen(dt_str) != str_len - 1)
+ goto out;
+ str_len = HDstrlen(dt_str);
+ if (HDstrncmp(dt_str,
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len)) {
+ HDprintf("dt=\n%s\n", dt_str);
+ HDfree(dt_str);
+ goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
return 0;
out:
- if(dt_str)
- HDfree(dt_str);
+ if (dt_str)
+ HDfree(dt_str);
H5_FAILED();
return -1;
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_opaques().
-*-------------------------------------------------------------------------
-*/
-static int test_opaques(void)
+ * subroutine for test_text_dtype(): test_opaques().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_opaques(void)
{
- hid_t dtype;
- size_t opq_size;
+ hid_t dtype;
+ size_t opq_size;
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for opaque types");
+ HL_TESTING3(" text for opaque types");
- if((dtype = H5LTtext_to_dtype("H5T_OPAQUE { OPQ_SIZE 19; OPQ_TAG \"This is a tag for opaque type\"; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_OPAQUE { OPQ_SIZE 19; OPQ_TAG \"This is a tag for opaque type\"; }",
+ H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_OPAQUE)
+ if (type_class != H5T_OPAQUE)
goto out;
- if((opq_size = H5Tget_size(dtype)) == 0)
+ if ((opq_size = H5Tget_size(dtype)) == 0)
goto out;
- if(opq_size != 19)
+ if (opq_size != 19)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(
+ dt_str,
+ "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1369,72 +1343,75 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_enums().
-*-------------------------------------------------------------------------
-*/
-static int test_enums(void)
+ * subroutine for test_text_dtype(): test_enums().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_enums(void)
{
- hid_t dtype;
- size_t size = 16;
- char name1[16];
- int value1 = 7;
- const char *name2 = "WHITE";
- int value2;
+ hid_t dtype;
+ size_t size = 16;
+ char name1[16];
+ int value1 = 7;
+ const char *name2 = "WHITE";
+ int value2;
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for enum types");
+ HL_TESTING3(" text for enum types");
- if((dtype = H5LTtext_to_dtype("H5T_ENUM { H5T_STD_I32LE; \"RED\" 5; \"GREEN\" 6; \"BLUE\" 7; \"WHITE\" 8; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(
+ "H5T_ENUM { H5T_STD_I32LE; \"RED\" 5; \"GREEN\" 6; \"BLUE\" 7; \"WHITE\" 8; }", H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_ENUM)
+ if (type_class != H5T_ENUM)
goto out;
/* Convert the variable before using it */
- if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) {
- if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value1, NULL, H5P_DEFAULT) < 0)
+ if (!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) {
+ if (H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value1, NULL, H5P_DEFAULT) < 0)
goto out;
}
- if(H5Tenum_nameof(dtype, &value1, name1, size)<0)
+ if (H5Tenum_nameof(dtype, &value1, name1, size) < 0)
goto out;
- if(HDstrcmp(name1, "BLUE"))
+ if (HDstrcmp(name1, "BLUE"))
goto out;
- if(H5Tenum_valueof(dtype, name2, &value2)<0)
+ if (H5Tenum_valueof(dtype, name2, &value2) < 0)
goto out;
/* Convert the variable before comparing it */
- if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) {
- if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value2, NULL, H5P_DEFAULT) < 0)
+ if (!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) {
+ if (H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value2, NULL, H5P_DEFAULT) < 0)
goto out;
}
- if(value2 != 8)
+ if (value2 != 8)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) {
+ if (HDstrcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
+ " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) {
- printf("dt=\n%s\n", dt_str);
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1446,56 +1423,57 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_variables().
-*-------------------------------------------------------------------------
-*/
-static int test_variables(void)
+ * subroutine for test_text_dtype(): test_variables().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_variables(void)
{
- hid_t dtype;
+ hid_t dtype;
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for variable types");
+ HL_TESTING3(" text for variable types");
- if((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_NATIVE_CHAR }\n", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_NATIVE_CHAR }\n", H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_VLEN)
+ if (type_class != H5T_VLEN)
goto out;
- if(H5Tis_variable_str(dtype))
+ if (H5Tis_variable_str(dtype))
goto out;
-
- if(H5Tclose(dtype)<0)
+
+ if (H5Tclose(dtype) < 0)
goto out;
-
- if((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_VLEN { H5T_STD_I32BE } }", H5LT_DDL))<0)
+
+ if ((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_VLEN { H5T_STD_I32BE } }", H5LT_DDL)) < 0)
goto out;
-
- if(H5Tis_variable_str(dtype))
+
+ if (H5Tis_variable_str(dtype))
goto out;
-
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
-
- if(H5Tclose(dtype)<0)
+
+ if (H5Tclose(dtype) < 0)
goto out;
-
+
PASSED();
return 0;
@@ -1505,55 +1483,60 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_arrays().
-*-------------------------------------------------------------------------
-*/
-static int test_arrays(void)
+ * subroutine for test_text_dtype(): test_arrays().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_arrays(void)
{
- hid_t dtype;
- int ndims;
- hsize_t dims[3];
+ hid_t dtype;
+ int ndims;
+ hsize_t dims[3];
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for array types");
+ HL_TESTING3(" text for array types");
- if((dtype = H5LTtext_to_dtype("H5T_ARRAY { [5][7][13] H5T_ARRAY { [17][19] H5T_COMPOUND { H5T_STD_I8BE \"arr_compound_1\"; H5T_STD_I32BE \"arr_compound_2\"; } } }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype("H5T_ARRAY { [5][7][13] H5T_ARRAY { [17][19] H5T_COMPOUND { H5T_STD_I8BE "
+ "\"arr_compound_1\"; H5T_STD_I32BE \"arr_compound_2\"; } } }",
+ H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_ARRAY)
+ if (type_class != H5T_ARRAY)
goto out;
- if((ndims = H5Tget_array_ndims(dtype))<0)
+ if ((ndims = H5Tget_array_ndims(dtype)) < 0)
goto out;
- if(ndims != 3)
+ if (ndims != 3)
goto out;
- if(H5Tget_array_dims2(dtype, dims) < 0)
+ if (H5Tget_array_dims2(dtype, dims) < 0)
goto out;
- if(dims[0] != 5 || dims[1] != 7 || dims[2] != 13)
+ if (dims[0] != 5 || dims[1] != 7 || dims[2] != 13)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE \"arr_compound_2\" : 1;\n }\n }\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
+ " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
+ "\"arr_compound_2\" : 1;\n }\n }\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1565,66 +1548,74 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_compounds().
-*-------------------------------------------------------------------------
-*/
-static int test_compounds(void)
+ * subroutine for test_text_dtype(): test_compounds().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_compounds(void)
{
- hid_t dtype;
- int nmembs;
- char *memb_name = NULL;
+ hid_t dtype;
+ int nmembs;
+ char * memb_name = NULL;
H5T_class_t memb_class;
H5T_class_t type_class;
- char* dt_str;
- size_t str_len;
+ char * dt_str;
+ size_t str_len;
- TESTING3(" text for compound types");
+ HL_TESTING3(" text for compound types");
- if((dtype = H5LTtext_to_dtype("H5T_COMPOUND { H5T_STD_I16BE \"one_field\" : 2; H5T_STD_U8LE \"two_field\" : 6; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(
+ "H5T_COMPOUND { H5T_STD_I16BE \"one_field\" : 2; H5T_STD_U8LE \"two_field\" : 6; }", H5LT_DDL)) <
+ 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_COMPOUND)
+ if (type_class != H5T_COMPOUND)
goto out;
- if((nmembs = H5Tget_nmembers(dtype))<0)
+ if ((nmembs = H5Tget_nmembers(dtype)) < 0)
goto out;
- if(nmembs != 2)
+ if (nmembs != 2)
goto out;
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
- if(HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE \"two_field\" : 6;\n }")) {
- printf("dt=\n%s\n", dt_str);
+ if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
+ "\"two_field\" : 6;\n }")) {
+ HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
- if((dtype = H5LTtext_to_dtype("H5T_COMPOUND { H5T_STD_I32BE \"i32_field\"; H5T_STD_I16BE \"i16_field\"; H5T_COMPOUND { H5T_STD_I16BE \"sec_field\"; H5T_COMPOUND { H5T_STD_I32BE \"thd_field\"; } \"grandchild\"; } \"child_compound\"; H5T_STD_I8BE \"i8_field\"; }", H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(
+ "H5T_COMPOUND { H5T_STD_I32BE \"i32_field\"; H5T_STD_I16BE \"i16_field\"; H5T_COMPOUND { "
+ "H5T_STD_I16BE \"sec_field\"; H5T_COMPOUND { H5T_STD_I32BE \"thd_field\"; } \"grandchild\"; } "
+ "\"child_compound\"; H5T_STD_I8BE \"i8_field\"; }",
+ H5LT_DDL)) < 0)
goto out;
- if((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
+ if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
- if(HDstrcmp(memb_name, "i16_field")) {
+ if (HDstrcmp(memb_name, "i16_field")) {
H5free_memory(memb_name);
goto out;
}
H5free_memory(memb_name);
- if((memb_class = H5Tget_member_class(dtype, 2))<0)
+ if ((memb_class = H5Tget_member_class(dtype, 2)) < 0)
goto out;
- if(memb_class != H5T_COMPOUND)
+ if (memb_class != H5T_COMPOUND)
goto out;
PASSED();
@@ -1636,110 +1627,120 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_compound_bug(). Test case for
-* issue 7701.
-*-------------------------------------------------------------------------
-*/
-static int test_compound_bug(void)
+ * subroutine for test_text_dtype(): test_compound_bug(). Test case for
+ * issue 7701.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_compound_bug(void)
{
hid_t dtype;
H5T_class_t type_class;
int nmembs;
- char* memb_name = NULL;
- char* dt_str;
+ char * memb_name = NULL;
+ char * dt_str;
size_t str_len;
- char text[] = "H5T_COMPOUND { H5T_STD_I32LE \"state_________________________________________________________________________________\"; H5T_STD_I32LE \"desc_________________________________________________________________________________________\"; H5T_VLEN { H5T_COMPOUND { H5T_ENUM { H5T_STD_I16LE; \"ZERO\" 0; \"ONE\" 1; \"TWO\" 2; \"THREE\" 3; } \"type____\"; H5T_STD_I32LE \"sub_______________________________________________________________________________________________________________\"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_SPACEPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } \"sub_desc\"; H5T_STD_I32LE \"final___________________________________________________________________________________________________\"; } } \"sub\"; }";
- char text2[] =
- "H5T_COMPOUND {\n"
- " H5T_STD_I16LE \"state___________________________"
- "__________________________________________________"
- "____\" : 0;\n"
- " H5T_STD_I16LE \"desc____________________________"
- "__________________________________________________"
- "___________\" : 2;\n"
- " H5T_VLEN { H5T_COMPOUND {\n"
- " H5T_ENUM { H5T_STD_I16LE; \"ZERO\" 0; \"ONE\" "
- "1; \"TWO\" 2; \"THREE\" 3; } \"type____\" : 0;\n"
- " H5T_STD_I32LE \"sub___________________________"
- "__________________________________________________"
- "__________________________________1\" : 4;\n"
- " H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_"
- "STR_SPACEPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1;"
- " } \"sub_desc\" : 8;\n"
- " H5T_STD_I32LE \"final_________________________"
- "__________________________________________________"
- "________________________\" : 16;\n"
- " } } \"sub\" : 8;\n"
- "}\n";
-
- TESTING3(" text for compound type of bug fix");
-
- if((dtype = H5LTtext_to_dtype(text, H5LT_DDL))<0)
- goto out;
-
- if((type_class = H5Tget_class(dtype))<0)
- goto out;
- if(type_class != H5T_COMPOUND)
- goto out;
-
- if((memb_name = H5Tget_member_name(dtype, 2)) == NULL)
- goto out;
- if(HDstrcmp(memb_name, "sub")) {
+ char text[] = "H5T_COMPOUND { H5T_STD_I32LE "
+ "\"state_________________________________________________________________________________"
+ "\"; H5T_STD_I32LE "
+ "\"desc____________________________________________________________________________________"
+ "_____\"; H5T_VLEN { H5T_COMPOUND { H5T_ENUM { H5T_STD_I16LE; \"ZERO\" 0; \"ONE\" 1; "
+ "\"TWO\" 2; \"THREE\" 3; } \"type____\"; H5T_STD_I32LE "
+ "\"sub_____________________________________________________________________________________"
+ "__________________________\"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_SPACEPAD; "
+ "CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } \"sub_desc\"; H5T_STD_I32LE "
+ "\"final___________________________________________________________________________________"
+ "________________\"; } } \"sub\"; }";
+ char text2[] = "H5T_COMPOUND {\n"
+ " H5T_STD_I16LE \"state___________________________"
+ "__________________________________________________"
+ "____\" : 0;\n"
+ " H5T_STD_I16LE \"desc____________________________"
+ "__________________________________________________"
+ "___________\" : 2;\n"
+ " H5T_VLEN { H5T_COMPOUND {\n"
+ " H5T_ENUM { H5T_STD_I16LE; \"ZERO\" 0; \"ONE\" "
+ "1; \"TWO\" 2; \"THREE\" 3; } \"type____\" : 0;\n"
+ " H5T_STD_I32LE \"sub___________________________"
+ "__________________________________________________"
+ "__________________________________1\" : 4;\n"
+ " H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_"
+ "STR_SPACEPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1;"
+ " } \"sub_desc\" : 8;\n"
+ " H5T_STD_I32LE \"final_________________________"
+ "__________________________________________________"
+ "________________________\" : 16;\n"
+ " } } \"sub\" : 8;\n"
+ "}\n";
+
+ HL_TESTING3(" text for compound type of bug fix");
+
+ if ((dtype = H5LTtext_to_dtype(text, H5LT_DDL)) < 0)
+ goto out;
+
+ if ((type_class = H5Tget_class(dtype)) < 0)
+ goto out;
+ if (type_class != H5T_COMPOUND)
+ goto out;
+
+ if ((memb_name = H5Tget_member_name(dtype, 2)) == NULL)
+ goto out;
+ if (HDstrcmp(memb_name, "sub")) {
H5free_memory(memb_name);
goto out;
}
H5free_memory(memb_name);
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
-
/* Test similar datatype in another format */
- if((dtype = H5LTtext_to_dtype(text2, H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(text2, H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_COMPOUND)
+ if (type_class != H5T_COMPOUND)
goto out;
- if((nmembs = H5Tget_nmembers(dtype))<0)
+ if ((nmembs = H5Tget_nmembers(dtype)) < 0)
goto out;
- if(nmembs != 3)
+ if (nmembs != 3)
goto out;
- if((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
+ if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
- if(HDstrcmp(memb_name, "desc_________________________________________________________________________________________")) {
+ if (HDstrcmp(memb_name, "desc____________________________________________________________________________"
+ "_____________")) {
H5free_memory(memb_name);
goto out;
}
H5free_memory(memb_name);
- if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
+ if (H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len) < 0)
goto out;
- if(NULL==(dt_str = (char*)HDcalloc(str_len, sizeof(char))))
+ if (NULL == (dt_str = (char *)HDcalloc(str_len, sizeof(char))))
goto out;
- if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) {
+ if (H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len) < 0) {
HDfree(dt_str);
goto out;
}
HDfree(dt_str);
- if(H5Tclose(dtype)<0)
+ if (H5Tclose(dtype) < 0)
goto out;
PASSED();
@@ -1751,74 +1752,67 @@ out:
}
/*-------------------------------------------------------------------------
-* subroutine for test_text_dtype(): test_complicated_compound().
-*-------------------------------------------------------------------------
-*/
-static int test_complicated_compound(void)
+ * subroutine for test_text_dtype(): test_complicated_compound().
+ *-------------------------------------------------------------------------
+ */
+static int
+test_complicated_compound(void)
{
- hid_t dtype;
- int nmembs;
+ hid_t dtype;
+ int nmembs;
H5T_class_t type_class;
- char *line = NULL;
- FILE *fp = NULL;
- size_t size = 1024;
- char *srcdir = getenv("srcdir"); /* the source directory */
- char filename[1024]="";
+ char * line = NULL;
+ FILE * fp = NULL;
+ size_t size = 1024;
+ const char *filename = H5_get_srcdir_filename(INPUT_FILE);
- TESTING3(" text for complicated compound types");
-
- /* compose the name of the file to open, using the srcdir, if appropriate */
- if(srcdir) {
- HDstrcpy(filename, srcdir);
- HDstrcat(filename, "/");
- }
- HDstrcat(filename, INPUT_FILE);
+ HL_TESTING3(" text for complicated compound types");
/* Open input file */
fp = HDfopen(filename, "r");
- if(fp == NULL) {
- printf( "Could not find file %s. Try set $srcdir \n", filename);
+ if (fp == NULL) {
+ HDprintf("Could not find file %s. Try set $srcdir \n", filename);
goto out;
}
/* This part reads in the input as a string in a slow manner. GNU C
- * Library has convenient function getline() but isn't available on
- * all machines.
- */
- if((line = (char*)HDcalloc(size, sizeof(char)))==NULL)
+ * Library has convenient function getline() but isn't available on
+ * all machines.
+ */
+ if ((line = (char *)HDcalloc(size, sizeof(char))) == NULL)
goto out;
- if(HDfgets(line, (int)size, fp)==NULL)
+ if (HDfgets(line, (int)size, fp) == NULL)
goto out;
- while(HDstrlen(line)==size-1) {
+ while (HDstrlen(line) == size - 1) {
size *= 2;
- if(line)
+ if (line)
HDfree(line);
- if((line = (char*)HDcalloc(size, sizeof(char)))==NULL)
+ if ((line = (char *)HDcalloc(size, sizeof(char))) == NULL)
goto out;
- if(HDfseek(fp, 0L, SEEK_SET)!=0)
+ if (HDfseek(fp, 0L, SEEK_SET) != 0)
goto out;
- if(HDfgets(line, (int)size, fp)==NULL)
+ if (HDfgets(line, (int)size, fp) == NULL)
goto out;
}
HDfclose(fp);
fp = NULL;
- if((dtype = H5LTtext_to_dtype(line, H5LT_DDL))<0)
+ if ((dtype = H5LTtext_to_dtype(line, H5LT_DDL)) < 0)
goto out;
- if((type_class = H5Tget_class(dtype))<0)
+ if ((type_class = H5Tget_class(dtype)) < 0)
goto out;
- if(type_class != H5T_COMPOUND)
+ if (type_class != H5T_COMPOUND)
goto out;
/* There should be 101 compound members */
- if((nmembs = H5Tget_nmembers(dtype))<0)
+ if ((nmembs = H5Tget_nmembers(dtype)) < 0)
goto out;
- if(nmembs != 101)
+ if (nmembs != 101)
goto out;
- if(line)
+ if (line)
HDfree(line);
PASSED();
@@ -1826,9 +1820,9 @@ static int test_complicated_compound(void)
out:
- if(line)
+ if (line)
HDfree(line);
- if(fp)
+ if (fp)
HDfclose(fp);
H5_FAILED();
@@ -1836,41 +1830,42 @@ out:
}
/*-------------------------------------------------------------------------
-* test H5LTtext_to_dtype function
-*-------------------------------------------------------------------------
-*/
-static int test_text_dtype(void)
+ * test H5LTtext_to_dtype function
+ *-------------------------------------------------------------------------
+ */
+static int
+test_text_dtype(void)
{
- TESTING("H5LTtext_to_dtype");
+ HL_TESTING2("H5LTtext_to_dtype");
- if(test_integers()<0)
+ if (test_integers() < 0)
goto out;
- if(test_fps()<0)
+ if (test_fps() < 0)
goto out;
- if(test_strings()<0)
+ if (test_strings() < 0)
goto out;
- if(test_opaques()<0)
+ if (test_opaques() < 0)
goto out;
- if(test_enums()<0)
+ if (test_enums() < 0)
goto out;
- if(test_variables()<0)
+ if (test_variables() < 0)
goto out;
- if(test_arrays()<0)
+ if (test_arrays() < 0)
goto out;
- if(test_compounds()<0)
+ if (test_compounds() < 0)
goto out;
- if(test_compound_bug()<0)
+ if (test_compound_bug() < 0)
goto out;
- if(test_complicated_compound()<0)
+ if (test_complicated_compound() < 0)
goto out;
return 0;
@@ -1883,362 +1878,364 @@ out:
* test H5LTpath_valid function
*-------------------------------------------------------------------------
*/
-static int test_valid_path(void)
+static int
+test_valid_path(void)
{
- hid_t file_id, group;
- htri_t path_valid;
- const char *data_string_in = "test";
-
- TESTING("H5LTpath_valid");
-
- /* Create a new file using default properties. */
-
- /**************************************************************
- * The file structure should look like this:
- *
- * +----------------------------------+
- * | / |
- * +----------------------------------+
- * / | \ \
- * / | \ \
- * / | \ \
- * / | \ G8 (dangled external link)
- * / DS \
- * / \
- * G1 G2
- * | --> DS1 |
- * / \--> DS3 / \
- * / / \
- * G2 DS4 G7
- * | (hard link (dangled soft link
- * | to /G1/DS3) to /G1/G20 )
- * |
- * |
- * | --- Gcyc (soft link to /G1)
- * / \
- * / \
- * G5 \
- * (soft link G6 (external link /G1 in FILENAME4)
- * to /G2)
- *
- ****************************************************************/
-
- file_id = H5Fcreate(FILE_NAME3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create dataset "/DS"
- */
- if(H5LTmake_dataset_string(file_id, "DS", data_string_in)<0)
- goto out;
-
- /*
- * Create an external dangled link
- */
- if(H5Lcreate_external("NonExistant_File.h5", "G8", file_id, "DangledExternalLink", H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
-
- /*
- * Create a group named "G2" in the file.
- */
- if((group = H5Gcreate2(file_id, "G2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT))<0)
- goto out;
-
- /*
- * Create a dataset named "G2/DS4" in the file.
- */
- if(H5LTmake_dataset_string(group, "/G2/DS4", data_string_in)<0)
- goto out;
-
- /*
- * Create a soft link
- */
- if(H5Lcreate_soft("/G1/G20", file_id, "/G2/G7", H5P_DEFAULT, H5P_DEFAULT) <0)
- goto out;
-
- if(H5Gclose(group)<0)
- goto out;
-
- /*
- * Create a group named "G1" in the file.
- */
- if((group = H5Gcreate2(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT))<0)
- goto out;
-
- /*
- * Create a group named "G1/DS1" in the file.
- */
- if(H5LTmake_dataset_string(group, "/G1/DS1", data_string_in)<0)
- goto out;
-
- if(H5Gclose(group)<0)
- goto out;
-
- /*
- * Create a hard link
- */
- if(H5Lcreate_hard(file_id, "/G2/DS4", file_id, "/G1/DS3",H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
- /*
- * Create a group named "/G1/G2" in the file.
- */
- if((group = H5Gcreate2(file_id, "/G1/G2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT))<0)
- goto out;
-
- /*
- * Create a soft link
- */
- if(H5Lcreate_soft("/G2", file_id, "/G1/G2/G5", H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
-
- /*
- * Create a cyclic soft link
- */
- if(H5Lcreate_soft("/G1", file_id, "/G1/G2/Gcyc", H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
-
- if(H5Gclose(group)<0)
- goto out;
-
- /*
- * Create a group named "/G1/G2/G6" in the file.
- */
- if((group = H5Gcreate2(file_id, "/G1/G2/G6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT))<0)
- goto out;
-
- /*
- * Create an external link
- */
- if(H5Lcreate_external( FILE_NAME4, "G1", group, "ExternalLink", H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
-
- if(H5Gclose(group)<0)
- goto out;
- /*
- * Close the file.
- */
- if(H5Fclose (file_id) < 0)
- goto out;
-
- /* Create another file for checking external links */
-
- /**************************************************************
- * The file structure should look like this:
- *
- * +----+
- * | / |
- * +----+
- * |
- * |
- * |
- * G1
- * / \
- * / \
- * DS1 G2
- * (dangled soft link to /G1/G20)
- *
- ****************************************************************/
-
- /* Make external link file */
- file_id = H5Fcreate(FILE_NAME4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /*
- * Create a group named "G1" in the file.
- */
- if((group = H5Gcreate2(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT))<0)
- goto out;
- /*
- * Create a dataset named "G1/DS1" in the file.
- */
- if(H5LTmake_dataset_string(group, "/G1/DS1", data_string_in)<0)
- goto out;
-
- /*
- * Create a dangling soft link
- */
-
- if(H5Lcreate_soft("/G1/G2", file_id, "/G1/G20", H5P_DEFAULT, H5P_DEFAULT)<0)
- goto out;
-
- if(H5Gclose(group)<0)
- goto out;
-
- H5Fclose(file_id);
-
- /* Open input file */
- if((file_id = H5Fopen(FILE_NAME3,H5F_ACC_RDONLY, H5P_DEFAULT))<0)
- goto out;
-
- /**************************************
- * CHECK ABSOLUTE PATHS
- **************************************/
-
- if( (path_valid = H5LTpath_valid(file_id, "/", TRUE)) != FALSE) {
- goto out;
- }
-
- if( (path_valid = H5LTpath_valid(file_id, "/", FALSE)) != FALSE) {
- goto out;
- }
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1", TRUE)) != TRUE) {
- goto out;
- }
-
- if((path_valid = H5LTpath_valid(file_id, "/G1/DS1", TRUE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1/DS3", TRUE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2", TRUE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G5", TRUE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", FALSE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", TRUE)) != TRUE)
- goto out;
-
- if( (path_valid = H5LTpath_valid(file_id, "/G2", TRUE)) != TRUE)
- goto out;
-
- /* check soft link points to a valid object*/
- if( (path_valid = H5LTpath_valid(file_id, "/G2/DS4", TRUE)) != TRUE)
- goto out;
-
- /* check if path exist, but not the object */
- if( (path_valid = H5LTpath_valid(file_id, "/G2/G7", FALSE)) != TRUE )
- goto out;
- /* check if path exist and if the object exists. It should fail
- * since it is a dangling soft link
- */
- if( (path_valid = H5LTpath_valid(file_id, "/G2/G7", TRUE)) == TRUE)
- goto out;
-
- /* check soft links */
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G5/DS4", TRUE)) != TRUE)
- goto out;
-
- /**************************************
- * CHECK RELATIVE PATHS
- ***************************************/
-
- if( (group = H5Gopen2(file_id, "/", H5P_DEFAULT)) < 0)
- goto out;
-
- if( (path_valid = H5LTpath_valid(group, "/", TRUE)) != FALSE) {
- goto out;
- }
+ hid_t file_id, group;
+ htri_t path_valid;
+ const char *data_string_in = "test";
- if( (path_valid = H5LTpath_valid(group, "/", FALSE)) != FALSE) {
- goto out;
- }
+ HL_TESTING2("H5LTpath_valid");
- if(H5Gclose(group)<0)
- goto out;
+ /* Create a new file using default properties. */
- if( (group = H5Gopen2(file_id, "/G1", H5P_DEFAULT)) < 0)
- goto out;
+ /**************************************************************
+ * The file structure should look like this:
+ *
+ * +----------------------------------+
+ * | / |
+ * +----------------------------------+
+ * / | \ \
+ * / | \ \
+ * / | \ \
+ * / | \ G8 (dangled external link)
+ * / DS \
+ * / \
+ * G1 G2
+ * | --> DS1 |
+ * / \--> DS3 / \
+ * / / \
+ * G2 DS4 G7
+ * | (hard link (dangled soft link
+ * | to /G1/DS3) to /G1/G20 )
+ * |
+ * |
+ * | --- Gcyc (soft link to /G1)
+ * / \
+ * / \
+ * G5 \
+ * (soft link G6 (external link /G1 in FILENAME4)
+ * to /G2)
+ *
+ ****************************************************************/
- /* The identifier (file id) is the object itself, i.e. "." */
+ file_id = H5Fcreate(FILE_NAME3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if((path_valid = H5LTpath_valid(file_id, ".", FALSE)) != TRUE)
- goto out;
+ /*
+ * Create dataset "/DS"
+ */
+ if (H5LTmake_dataset_string(file_id, "DS", data_string_in) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, ".", TRUE)) != TRUE)
- goto out;
+ /*
+ * Create an external dangled link
+ */
+ if (H5Lcreate_external("NonExistant_File.h5", "G8", file_id, "DangledExternalLink", H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ goto out;
- /* The identifier (group id) is the object itself, i.e. "." */
+ /*
+ * Create a group named "G2" in the file.
+ */
+ if ((group = H5Gcreate2(file_id, "G2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(group, ".", TRUE)) != TRUE)
- goto out;
+ /*
+ * Create a dataset named "G2/DS4" in the file.
+ */
+ if (H5LTmake_dataset_string(group, "/G2/DS4", data_string_in) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(group, "DS3", FALSE)) != TRUE)
- goto out;
+ /*
+ * Create a soft link
+ */
+ if (H5Lcreate_soft("/G1/G20", file_id, "/G2/G7", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(group, "DS3", TRUE)) != TRUE)
- goto out;
+ if (H5Gclose(group) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(group, "G2/G5", TRUE)) != TRUE)
- goto out;
+ /*
+ * Create a group named "G1" in the file.
+ */
+ if ((group = H5Gcreate2(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- /* Check the "./" case */
- if( (path_valid = H5LTpath_valid(group, "./DS3", TRUE)) != TRUE)
- goto out;
+ /*
+ * Create a group named "G1/DS1" in the file.
+ */
+ if (H5LTmake_dataset_string(group, "/G1/DS1", data_string_in) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(group, "./G2/G5", TRUE)) != TRUE)
- goto out;
+ if (H5Gclose(group) < 0)
+ goto out;
- /* Should fail, does not exist */
- if( (path_valid = H5LTpath_valid(group, "./G2/G20", FALSE)) == TRUE)
- goto out;
+ /*
+ * Create a hard link
+ */
+ if (H5Lcreate_hard(file_id, "/G2/DS4", file_id, "/G1/DS3", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
+ /*
+ * Create a group named "/G1/G2" in the file.
+ */
+ if ((group = H5Gcreate2(file_id, "/G1/G2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
- /* Should fail, does not exist */
- if( (path_valid = H5LTpath_valid(group, "./G2/G20", TRUE)) == TRUE)
- goto out;
+ /*
+ * Create a soft link
+ */
+ if (H5Lcreate_soft("/G2", file_id, "/G1/G2/G5", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
- if(H5Gclose(group)<0)
- goto out;
+ /*
+ * Create a cyclic soft link
+ */
+ if (H5Lcreate_soft("/G1", file_id, "/G1/G2/Gcyc", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
+
+ if (H5Gclose(group) < 0)
+ goto out;
+
+ /*
+ * Create a group named "/G1/G2/G6" in the file.
+ */
+ if ((group = H5Gcreate2(file_id, "/G1/G2/G6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /*
+ * Create an external link
+ */
+ if (H5Lcreate_external(FILE_NAME4, "G1", group, "ExternalLink", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
+
+ if (H5Gclose(group) < 0)
+ goto out;
+ /*
+ * Close the file.
+ */
+ if (H5Fclose(file_id) < 0)
+ goto out;
+
+ /* Create another file for checking external links */
+
+ /**************************************************************
+ * The file structure should look like this:
+ *
+ * +----+
+ * | / |
+ * +----+
+ * |
+ * |
+ * |
+ * G1
+ * / \
+ * / \
+ * DS1 G2
+ * (dangled soft link to /G1/G20)
+ *
+ ****************************************************************/
+
+ /* Make external link file */
+ file_id = H5Fcreate(FILE_NAME4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*
+ * Create a group named "G1" in the file.
+ */
+ if ((group = H5Gcreate2(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+ /*
+ * Create a dataset named "G1/DS1" in the file.
+ */
+ if (H5LTmake_dataset_string(group, "/G1/DS1", data_string_in) < 0)
+ goto out;
+
+ /*
+ * Create a dangling soft link
+ */
+
+ if (H5Lcreate_soft("/G1/G2", file_id, "/G1/G20", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto out;
+
+ if (H5Gclose(group) < 0)
+ goto out;
+
+ H5Fclose(file_id);
+
+ /* Open input file */
+ if ((file_id = H5Fopen(FILE_NAME3, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /**************************************
+ * CHECK ABSOLUTE PATHS
+ **************************************/
+
+ if ((path_valid = H5LTpath_valid(file_id, "/", TRUE)) != FALSE) {
+ goto out;
+ }
+
+ if ((path_valid = H5LTpath_valid(file_id, "/", FALSE)) != FALSE) {
+ goto out;
+ }
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1", TRUE)) != TRUE) {
+ goto out;
+ }
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/DS1", TRUE)) != TRUE)
+ goto out;
- /*****************************
- * Check external links
- *****************************/
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/DS3", TRUE)) != TRUE)
+ goto out;
- /* The dangled external link path is valid */
- if( (path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", FALSE)) != TRUE)
- goto out;
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5", TRUE)) != TRUE)
+ goto out;
- /* The file however does not exists, so the link dangles -> should return false */
- if( (path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", TRUE)) == TRUE)
- goto out;
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", FALSE)) != TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", FALSE)) != TRUE)
- goto out;
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/DS1", TRUE)) != TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", TRUE)) != TRUE)
- goto out;
+ if ((path_valid = H5LTpath_valid(file_id, "/G2", TRUE)) != TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
- goto out;
+ /* check soft link points to a valid object*/
+ if ((path_valid = H5LTpath_valid(file_id, "/G2/DS4", TRUE)) != TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
- goto out;
+ /* check if path exist, but not the object */
+ if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", FALSE)) != TRUE)
+ goto out;
+ /* check if path exist and if the object exists. It should fail
+ * since it is a dangling soft link
+ */
+ if ((path_valid = H5LTpath_valid(file_id, "/G2/G7", TRUE)) == TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
- goto out;
+ /* check soft links */
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G5/DS4", TRUE)) != TRUE)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
- goto out;
+ /**************************************
+ * CHECK RELATIVE PATHS
+ ***************************************/
- /* Should fail, does not exist */
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
- goto out;
+ if ((group = H5Gopen2(file_id, "/", H5P_DEFAULT)) < 0)
+ goto out;
- if( (path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
- goto out;
+ if ((path_valid = H5LTpath_valid(group, "/", TRUE)) != FALSE) {
+ goto out;
+ }
+ if ((path_valid = H5LTpath_valid(group, "/", FALSE)) != FALSE) {
+ goto out;
+ }
- if(H5Fclose(file_id)<0)
- goto out;
+ if (H5Gclose(group) < 0)
+ goto out;
- PASSED();
- return 0;
+ if ((group = H5Gopen2(file_id, "/G1", H5P_DEFAULT)) < 0)
+ goto out;
- out:
- H5_FAILED();
- return -1;
+ /* The identifier (file id) is the object itself, i.e. "." */
+
+ if ((path_valid = H5LTpath_valid(file_id, ".", FALSE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, ".", TRUE)) != TRUE)
+ goto out;
+
+ /* The identifier (group id) is the object itself, i.e. "." */
+
+ if ((path_valid = H5LTpath_valid(group, ".", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(group, "DS3", FALSE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(group, "DS3", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(group, "G2/G5", TRUE)) != TRUE)
+ goto out;
+
+ /* Check the "./" case */
+ if ((path_valid = H5LTpath_valid(group, "./DS3", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(group, "./G2/G5", TRUE)) != TRUE)
+ goto out;
+
+ /* Should fail, does not exist */
+ if ((path_valid = H5LTpath_valid(group, "./G2/G20", FALSE)) == TRUE)
+ goto out;
+
+ /* Should fail, does not exist */
+ if ((path_valid = H5LTpath_valid(group, "./G2/G20", TRUE)) == TRUE)
+ goto out;
+
+ if (H5Gclose(group) < 0)
+ goto out;
+
+ /*****************************
+ * Check external links
+ *****************************/
+
+ /* The dangled external link path is valid */
+ if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", FALSE)) != TRUE)
+ goto out;
+
+ /* The file however does not exists, so the link dangles -> should return false */
+ if ((path_valid = H5LTpath_valid(file_id, "/DangledExternalLink", TRUE)) == TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", FALSE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/DS1", TRUE)) != TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", FALSE)) != TRUE)
+ goto out;
+
+ /* Should fail, does not exist */
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
+ goto out;
+
+ if ((path_valid = H5LTpath_valid(file_id, "/G1/G2/Gcyc/G2/G6/ExternalLink/G20", TRUE)) == TRUE)
+ goto out;
+
+ if (H5Fclose(file_id) < 0)
+ goto out;
+
+ PASSED();
+ return 0;
+
+out:
+ H5_FAILED();
+ return -1;
}
/*-------------------------------------------------------------------------
-* the main program
-*-------------------------------------------------------------------------
-*/
-int main( void )
+ * the main program
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
{
- int nerrors=0;
+ int nerrors = 0;
/* test dataset functions */
nerrors += test_dsets();
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index 7003b26..6ff70dc 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -23,41 +23,34 @@
*-------------------------------------------------------------------------
*/
-#define NRECORDS 8
-#define BIG_TABLE_SIZE 8000
-#define NFIELDS 5
-#define TEST_FILE_NAME "test_packet_table.h5"
+#define NRECORDS 8
+#define BIG_TABLE_SIZE 8000
+#define NFIELDS 5
+#define TEST_FILE_NAME "test_packet_table.h5"
#define TEST_COMPRESS_FILE "test_packet_compress.h5"
-#define PT_NAME "Test Packet Table"
-#define H5TB_TABLE_NAME "Table1"
+#define PT_NAME "Test Packet Table"
+#define H5TB_TABLE_NAME "Table1"
/*-------------------------------------------------------------------------
* structure used for some tests, a particle
*-------------------------------------------------------------------------
*/
-typedef struct particle_t
-{
- char name[16];
- int lati;
- int longi;
- float pressure;
- double temperature;
+typedef struct particle_t {
+ char name[16];
+ int lati;
+ int longi;
+ float pressure;
+ double temperature;
} particle_t;
/*-------------------------------------------------------------------------
* a static array of particles for writing and checking reads
*-------------------------------------------------------------------------
*/
-static particle_t testPart[NRECORDS] = {
- {"zero", 0,0, 0.0f, 0.0f},
- {"one", 10,10, 1.0f, 10.0f},
- {"two", 20,20, 2.0f, 20.0f},
- {"three",30,30, 3.0f, 30.0f},
- {"four", 40,40, 4.0f, 40.0f},
- {"five", 50,50, 5.0f, 50.0f},
- {"six", 60,60, 6.0f, 60.0f},
- {"seven",70,70, 7.0f, 70.0f}
- };
+static particle_t testPart[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0f}, {"one", 10, 10, 1.0f, 10.0f},
+ {"two", 20, 20, 2.0f, 20.0f}, {"three", 30, 30, 3.0f, 30.0f},
+ {"four", 40, 40, 4.0f, 40.0f}, {"five", 50, 50, 5.0f, 50.0f},
+ {"six", 60, 60, 6.0f, 60.0f}, {"seven", 70, 70, 7.0f, 70.0f}};
/*-------------------------------------------------------------------------
* function that compares one particle
@@ -65,16 +58,15 @@ static particle_t testPart[NRECORDS] = {
* fields verbatim and not lose any bits. -JML
*-------------------------------------------------------------------------
*/
-static int cmp_par(size_t i, size_t j, particle_t *rbuf, particle_t *wbuf )
+static int
+cmp_par(size_t i, size_t j, particle_t *rbuf, particle_t *wbuf)
{
- if ( ( HDstrcmp( rbuf[i].name, wbuf[j].name ) != 0 ) ||
- rbuf[i].lati != wbuf[j].lati ||
- rbuf[i].longi != wbuf[j].longi ||
- !H5_FLT_ABS_EQUAL(rbuf[i].pressure,wbuf[j].pressure) ||
- !H5_DBL_ABS_EQUAL(rbuf[i].temperature,wbuf[j].temperature) ) {
- return FAIL;
- }
- return SUCCEED;
+ if ((HDstrcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
+ rbuf[i].longi != wbuf[j].longi || !H5_FLT_ABS_EQUAL(rbuf[i].pressure, wbuf[j].pressure) ||
+ !H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) {
+ return FAIL;
+ }
+ return SUCCEED;
}
/*-------------------------------------------------------------------------
@@ -84,53 +76,51 @@ static int cmp_par(size_t i, size_t j, particle_t *rbuf, particle_t *wbuf )
static hid_t
make_particle_type(void)
{
- hid_t type_id;
- hid_t string_type;
- size_t type_size = sizeof(particle_t);
-
- /* Create the memory data type. */
- if ((type_id = H5Tcreate (H5T_COMPOUND, type_size )) < 0 )
- return FAIL;
-
- /* Insert fields. */
- if ((string_type = H5Tcopy(H5T_C_S1)) < 0)
- return FAIL;
- if (H5Tset_size(string_type, (size_t)16) < 0)
- return FAIL;
-
- if ( H5Tinsert(type_id, "Name", HOFFSET(particle_t, name) , string_type ) < 0 )
- return FAIL;
- if ( H5Tinsert(type_id, "Lat", HOFFSET(particle_t, lati) , H5T_NATIVE_INT ) < 0 )
- return FAIL;
- if ( H5Tinsert(type_id, "Long", HOFFSET(particle_t, longi) , H5T_NATIVE_INT ) < 0 )
- return FAIL;
- if ( H5Tinsert(type_id, "Pressure", HOFFSET(particle_t, pressure) , H5T_NATIVE_FLOAT ) < 0 )
- return FAIL;
- if ( H5Tinsert(type_id, "Temperature", HOFFSET(particle_t, temperature) , H5T_NATIVE_DOUBLE ) < 0 )
- return FAIL;
-
- return type_id;
+ hid_t type_id;
+ hid_t string_type;
+ size_t type_size = sizeof(particle_t);
+
+ /* Create the memory data type. */
+ if ((type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
+ return FAIL;
+
+ /* Insert fields. */
+ if ((string_type = H5Tcopy(H5T_C_S1)) < 0)
+ return FAIL;
+ if (H5Tset_size(string_type, (size_t)16) < 0)
+ return FAIL;
+
+ if (H5Tinsert(type_id, "Name", HOFFSET(particle_t, name), string_type) < 0)
+ return FAIL;
+ if (H5Tinsert(type_id, "Lat", HOFFSET(particle_t, lati), H5T_NATIVE_INT) < 0)
+ return FAIL;
+ if (H5Tinsert(type_id, "Long", HOFFSET(particle_t, longi), H5T_NATIVE_INT) < 0)
+ return FAIL;
+ if (H5Tinsert(type_id, "Pressure", HOFFSET(particle_t, pressure), H5T_NATIVE_FLOAT) < 0)
+ return FAIL;
+ if (H5Tinsert(type_id, "Temperature", HOFFSET(particle_t, temperature), H5T_NATIVE_DOUBLE) < 0)
+ return FAIL;
+
+ return type_id;
}
- /* Create a normal HL table just like the HL examples do */
-static int create_hl_table(hid_t fid)
+/* Create a normal HL table just like the HL examples do */
+static int
+create_hl_table(hid_t fid)
{
- /* Calculate the offsets of the particle struct members in memory */
- size_t part_offset[NFIELDS] = { HOFFSET( particle_t, name ),
- HOFFSET( particle_t, lati ),
- HOFFSET( particle_t, longi ),
- HOFFSET( particle_t, pressure ),
- HOFFSET( particle_t, temperature )};
+ /* Calculate the offsets of the particle struct members in memory */
+ size_t part_offset[NFIELDS] = {HOFFSET(particle_t, name), HOFFSET(particle_t, lati),
+ HOFFSET(particle_t, longi), HOFFSET(particle_t, pressure),
+ HOFFSET(particle_t, temperature)};
/* Define field information */
- const char *field_names[NFIELDS] =
- { "Name","Latitude", "Longitude", "Pressure", "Temperature" };
- hid_t field_type[NFIELDS];
- hid_t string_type;
- hsize_t chunk_size = 10;
- int *fill_data = NULL;
- int compress = 0;
- herr_t status;
+ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type;
+ hsize_t chunk_size = 10;
+ int * fill_data = NULL;
+ int compress = 0;
+ herr_t status;
/* Initialize the field field_type */
if ((string_type = H5Tcopy(H5T_C_S1)) < 0)
@@ -143,27 +133,24 @@ static int create_hl_table(hid_t fid)
field_type[3] = H5T_NATIVE_FLOAT;
field_type[4] = H5T_NATIVE_DOUBLE;
+ /*------------------------------------------------------------------------
+ * H5TBmake_table
+ *-------------------------------------------------------------------------
+ */
- /*------------------------------------------------------------------------
- * H5TBmake_table
- *-------------------------------------------------------------------------
- */
-
- status=H5TBmake_table( "Table Title", fid, H5TB_TABLE_NAME, (hsize_t)NFIELDS,
- (hsize_t)NRECORDS, sizeof(particle_t),
- field_names, part_offset, field_type,
- chunk_size, fill_data, compress, testPart );
+ status = H5TBmake_table("Table Title", fid, H5TB_TABLE_NAME, (hsize_t)NFIELDS, (hsize_t)NRECORDS,
+ sizeof(particle_t), field_names, part_offset, field_type, chunk_size, fill_data,
+ compress, testPart);
- if (H5Tclose(string_type) < 0)
- return FAIL;
+ if (H5Tclose(string_type) < 0)
+ return FAIL;
- if(status<0)
- return FAIL;
- else
- return SUCCEED;
+ if (status < 0)
+ return FAIL;
+ else
+ return SUCCEED;
}
-
/*-------------------------------------------------------------------------
* test_create_close
*
@@ -172,13 +159,14 @@ static int create_hl_table(hid_t fid)
*-------------------------------------------------------------------------
*/
-static int test_create_close(hid_t fid)
+static int
+test_create_close(hid_t fid)
{
herr_t err;
- hid_t table;
- hid_t part_t;
+ hid_t table;
+ hid_t part_t;
- TESTING("H5PTcreate_fl and H5PTclose");
+ HL_TESTING2("H5PTcreate_fl and H5PTclose");
/* Create a datatype for the particle struct */
part_t = make_particle_type();
@@ -188,23 +176,23 @@ static int test_create_close(hid_t fid)
/* Create the table */
table = H5PTcreate_fl(fid, PT_NAME, part_t, (hsize_t)100, -1);
if (H5Tclose(part_t) < 0)
- goto error;
- if( H5PTis_valid(table) < 0)
- goto error;
- if( H5PTis_varlen(table) != 0)
- goto error;
+ goto error;
+ if (H5PTis_valid(table) < 0)
+ goto error;
+ if (H5PTis_varlen(table) != 0)
+ goto error;
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- H5_FAILED();
- return FAIL;
+ H5_FAILED();
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -214,32 +202,34 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_open(hid_t fid)
+static int
+test_open(hid_t fid)
{
herr_t err;
- hid_t table;
+ hid_t table;
- TESTING("H5PTopen");
+ HL_TESTING2("H5PTopen");
/* Open the table */
table = H5PTopen(fid, PT_NAME);
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
- if( H5PTis_varlen(table) != 0)
+ if (H5PTis_varlen(table) != 0)
goto error;
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- if (table > 0) H5PTclose(table);
- H5_FAILED();
- return FAIL;
+ if (table > 0)
+ H5PTclose(table);
+ H5_FAILED();
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -249,63 +239,64 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_append(hid_t fid)
+static int
+test_append(hid_t fid)
{
- herr_t err;
- hid_t table;
+ herr_t err;
+ hid_t table;
hsize_t count = 0;
- TESTING("H5PTappend");
+ HL_TESTING2("H5PTappend");
/* Open the table */
table = H5PTopen(fid, PT_NAME);
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
/* Count the number of packets in the table */
err = H5PTget_num_packets(table, &count);
- if( err < 0)
+ if (err < 0)
goto error;
/* There should be 0 records in the table */
- if( count != 0 )
+ if (count != 0)
goto error;
/* Append one particle */
err = H5PTappend(table, (size_t)1, &(testPart[0]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Append several particles */
err = H5PTappend(table, (size_t)6, &(testPart[1]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Append one more particle */
err = H5PTappend(table, (size_t)1, &(testPart[7]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Count the number of packets in the table */
err = H5PTget_num_packets(table, &count);
- if( err < 0)
+ if (err < 0)
goto error;
/* There should be 8 records in the table now */
- if( count != 8 )
+ if (count != 8)
goto error;
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(table) > 0)
- H5PTclose(table);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(table) > 0)
+ H5PTclose(table);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -315,45 +306,45 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_read(hid_t fid)
+static int
+test_read(hid_t fid)
{
- herr_t err;
- hid_t table;
+ herr_t err;
+ hid_t table;
particle_t readBuf[NRECORDS];
- size_t c;
+ size_t c;
- TESTING("H5PTread_packets");
+ HL_TESTING2("H5PTread_packets");
/* Open the table */
table = H5PTopen(fid, PT_NAME);
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
/* Read several particles */
err = H5PTread_packets(table, (hsize_t)0, 3, &(readBuf[0]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Read one particle */
err = H5PTread_packets(table, (hsize_t)3, 1, &(readBuf[3]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Read several particles */
- err = H5PTread_packets(table, (hsize_t)4, (NRECORDS - 4 ), &(readBuf[4]));
- if( err < 0)
+ err = H5PTread_packets(table, (hsize_t)4, (NRECORDS - 4), &(readBuf[4]));
+ if (err < 0)
goto error;
/* Ensure that particles were read correctly */
- for(c=0; c<NRECORDS; c++)
- {
- if( cmp_par(c%8, c, testPart, readBuf) != 0)
+ for (c = 0; c < NRECORDS; c++) {
+ if (cmp_par(c % 8, c, testPart, readBuf) != 0)
goto error;
}
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
@@ -361,10 +352,10 @@ static int test_read(hid_t fid)
return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(table) > 0)
- H5PTclose(table);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(table) > 0)
+ H5PTclose(table);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -375,66 +366,63 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_get_next(hid_t fid)
+static int
+test_get_next(hid_t fid)
{
- herr_t err;
- hid_t table;
+ herr_t err;
+ hid_t table;
particle_t readBuf[NRECORDS];
particle_t readBuf2[NRECORDS];
- size_t c;
+ size_t c;
- TESTING("H5PTget_next");
+ HL_TESTING2("H5PTget_next");
/* Open the table */
table = H5PTopen(fid, PT_NAME);
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
/* Read several particles consecutively */
- for(c=0; c < NRECORDS; c++)
- {
+ for (c = 0; c < NRECORDS; c++) {
err = H5PTget_next(table, (size_t)1, &readBuf[c]);
- if(err < 0)
+ if (err < 0)
goto error;
}
/* Ensure that particles were read correctly */
- for(c=0; c<NRECORDS; c++)
- {
- if( cmp_par(c, c, testPart, readBuf) != 0)
+ for (c = 0; c < NRECORDS; c++) {
+ if (cmp_par(c, c, testPart, readBuf) != 0)
goto error;
}
H5PTcreate_index(table);
/* Read particles two by two */
- for(c=0; c < NRECORDS / 2; c++)
- {
+ for (c = 0; c < NRECORDS / 2; c++) {
err = H5PTget_next(table, (size_t)2, &readBuf2[c * 2]);
- if(err < 0)
+ if (err < 0)
goto error;
}
/* Ensure that particles were read correctly */
- for(c=0; c<NRECORDS; c++)
- {
- if( cmp_par(c, c, testPart, readBuf2) != 0)
+ for (c = 0; c < NRECORDS; c++) {
+ if (cmp_par(c, c, testPart, readBuf2) != 0)
goto error;
}
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(table) > 0)
- H5PTclose(table);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(table) > 0)
+ H5PTclose(table);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -445,16 +433,17 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_big_table(hid_t fid)
+static int
+test_big_table(hid_t fid)
{
- herr_t err;
- hid_t table;
- hid_t part_t;
- size_t c;
+ herr_t err;
+ hid_t table;
+ hid_t part_t;
+ size_t c;
particle_t readPart;
- hsize_t count;
+ hsize_t count;
- TESTING("large packet table");
+ HL_TESTING2("large packet table");
/* Create a datatype for the particle struct */
part_t = make_particle_type();
@@ -465,52 +454,50 @@ static int test_big_table(hid_t fid)
table = H5PTcreate_fl(fid, "Packet Test Dataset2", part_t, (hsize_t)33, -1);
if (H5Tclose(part_t) < 0)
goto error;
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
- /* Add many particles */
- for(c = 0; c < BIG_TABLE_SIZE ; c+=8)
- {
+ /* Add many particles */
+ for (c = 0; c < BIG_TABLE_SIZE; c += 8) {
/* Append eight particles at once*/
err = H5PTappend(table, (size_t)8, &(testPart[0]));
- if( err < 0)
+ if (err < 0)
goto error;
}
/* Count the number of packets in the table */
err = H5PTget_num_packets(table, &count);
- if( err < 0)
+ if (err < 0)
goto error;
- if( count != BIG_TABLE_SIZE )
+ if (count != BIG_TABLE_SIZE)
goto error;
/* Read particles to ensure that all of them were written correctly */
/* Also, ensure that H5PTcreate_fl set the current packet to */
/* the first packet in the table */
- for(c = 0; c < BIG_TABLE_SIZE; c++)
- {
+ for (c = 0; c < BIG_TABLE_SIZE; c++) {
err = H5PTget_next(table, (size_t)1, &readPart);
- if(err < 0)
+ if (err < 0)
goto error;
/* Ensure that particles were read correctly */
- if( cmp_par(c % 8, 0, testPart, &readPart) != 0)
+ if (cmp_par(c % 8, 0, testPart, &readPart) != 0)
goto error;
}
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(table) > 0)
- H5PTclose(table);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(table) > 0)
+ H5PTclose(table);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -520,63 +507,63 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_opaque(hid_t fid)
+static int
+test_opaque(hid_t fid)
{
- herr_t err;
- hid_t table;
- hid_t part_t;
- size_t c;
+ herr_t err;
+ hid_t table;
+ hid_t part_t;
+ size_t c;
particle_t readBuf[NRECORDS];
- TESTING("opaque data");
+ HL_TESTING2("opaque data");
/* Create an opaque datatype for the particle struct */
- if ((part_t = H5Tcreate (H5T_OPAQUE, sizeof(particle_t) )) < 0 )
+ if ((part_t = H5Tcreate(H5T_OPAQUE, sizeof(particle_t))) < 0)
return FAIL;
HDassert(part_t != -1);
/* Tag the opaque datatype */
- if ( H5Tset_tag(part_t, "Opaque Particle" ) < 0)
+ if (H5Tset_tag(part_t, "Opaque Particle") < 0)
return FAIL;
/* Create a new table */
table = H5PTcreate_fl(fid, "Packet Test Dataset3", part_t, (hsize_t)100, -1);
- if( H5Tclose(part_t) < 0)
+ if (H5Tclose(part_t) < 0)
goto error;
- if( H5PTis_valid(table) < 0)
+ if (H5PTis_valid(table) < 0)
goto error;
/* Append several particles, starting at particle 1 */
err = H5PTappend(table, (size_t)(NRECORDS - 1), &(testPart[1]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Read the particles back */
err = H5PTread_packets(table, (hsize_t)0, 7, &(readBuf[0]));
- if( err < 0)
+ if (err < 0)
goto error;
/* Ensure that particles were read correctly */
- for(c=0; c<NRECORDS - 1; c++)
- {
- if( cmp_par(c+1, c, testPart, readBuf) != 0)
+ for (c = 0; c < NRECORDS - 1; c++) {
+ if (cmp_par(c + 1, c, testPart, readBuf) != 0)
goto error;
}
/* Close the table */
err = H5PTclose(table);
- if( err < 0)
+ if (err < 0)
goto error;
PASSED();
return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(table) > 0)
- H5PTclose(table);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(table) > 0)
+ H5PTclose(table);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -590,22 +577,23 @@ error:
static int
test_compress(void)
{
- hid_t fid1 = H5I_INVALID_HID;
- herr_t err;
- hid_t table = H5I_INVALID_HID;
- hid_t part_t = H5I_INVALID_HID;
- hid_t dset_id = H5I_INVALID_HID;
- hid_t plist_id = H5I_INVALID_HID;
- size_t c;
- size_t num_elems = 1;
- unsigned filter_vals[1];
+ hid_t fid1 = H5I_INVALID_HID;
+ herr_t err;
+ hid_t table = H5I_INVALID_HID;
+ hid_t part_t = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t plist_id = H5I_INVALID_HID;
+ size_t c;
+ size_t num_elems = 1;
+ unsigned filter_vals[1];
particle_t readPart[1];
- hsize_t count;
+ hsize_t count;
- TESTING("packet table compression");
+ HL_TESTING2("packet table compression");
/* Create a file. */
- if((fid1 = H5Fcreate(TEST_COMPRESS_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
+ if ((fid1 = H5Fcreate(TEST_COMPRESS_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
/* Create a datatype for the particle struct */
part_t = make_particle_type();
@@ -614,106 +602,129 @@ test_compress(void)
/* Create a new table with compression level 8 */
table = H5PTcreate_fl(fid1, "Compressed Test Dataset", part_t, (hsize_t)80, 8);
- if( H5PTis_valid(table) < 0) TEST_ERROR;
+ if (H5PTis_valid(table) < 0)
+ TEST_ERROR;
/* We can now use this table exactly the same way we use a normal uncompressed
* packet table, and it should pass the same tests. */
- /* Add many particles */
- for(c = 0; c < BIG_TABLE_SIZE ; c+=8)
- {
+ /* Add many particles */
+ for (c = 0; c < BIG_TABLE_SIZE; c += 8) {
/* Append eight particles at once*/
err = H5PTappend(table, (size_t)8, &(testPart[0]));
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
}
/* Count the number of packets in the table */
err = H5PTget_num_packets(table, &count);
- if( err < 0) TEST_ERROR;
- if( count != BIG_TABLE_SIZE ) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
+ if (count != BIG_TABLE_SIZE)
+ TEST_ERROR;
/* Read particles to ensure that all of them were written correctly */
HDmemset(readPart, 0, sizeof(readPart));
- for(c = 0; c < BIG_TABLE_SIZE; c++)
- {
+ for (c = 0; c < BIG_TABLE_SIZE; c++) {
err = H5PTget_next(table, (size_t)1, readPart);
- if(err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
/* Ensure that particles were read correctly */
- if( cmp_par(c % 8, 0, testPart, readPart) != 0) TEST_ERROR;
+ if (cmp_par(c % 8, 0, testPart, readPart) != 0)
+ TEST_ERROR;
}
/* Close the table */
err = H5PTclose(table);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
/* Open the packet table as a regular dataset and make sure that the
* compression filter is set.
*/
dset_id = H5Dopen2(fid1, "Compressed Test Dataset", H5P_DEFAULT);
- if( dset_id < 0) TEST_ERROR;
+ if (dset_id < 0)
+ TEST_ERROR;
plist_id = H5Dget_create_plist(dset_id);
- if( plist_id < 0) TEST_ERROR;
+ if (plist_id < 0)
+ TEST_ERROR;
- err = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &num_elems,
- filter_vals, 0, NULL, NULL);
- if( err < 0) TEST_ERROR;
+ err = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &num_elems, filter_vals, 0, NULL, NULL);
+ if (err < 0)
+ TEST_ERROR;
/* The compression level should be 8, the value we passed in */
- if(filter_vals[0] != 8) TEST_ERROR;
+ if (filter_vals[0] != 8)
+ TEST_ERROR;
/* Clean up */
err = H5Pclose(plist_id);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
err = H5Dclose(dset_id);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
/* Create a new table without compression. */
table = H5PTcreate_fl(fid1, "Uncompressed Dataset", part_t, (hsize_t)80, -1);
- if(table < 0) TEST_ERROR;
+ if (table < 0)
+ TEST_ERROR;
/* Close the packet table */
err = H5PTclose(table);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
/* Open the packet table as a regular dataset and make sure that the
* compression filter is not set.
*/
dset_id = H5Dopen2(fid1, "Uncompressed Dataset", H5P_DEFAULT);
- if( dset_id < 0) TEST_ERROR;
+ if (dset_id < 0)
+ TEST_ERROR;
plist_id = H5Dget_create_plist(dset_id);
- if( plist_id < 0) TEST_ERROR;
+ if (plist_id < 0)
+ TEST_ERROR;
- H5E_BEGIN_TRY {
- err = H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &num_elems,
- filter_vals, 0, NULL, NULL);
- if( err >= 0) TEST_ERROR;
- } H5E_END_TRY
+ H5E_BEGIN_TRY
+ {
+ err =
+ H5Pget_filter_by_id2(plist_id, H5Z_FILTER_DEFLATE, NULL, &num_elems, filter_vals, 0, NULL, NULL);
+ if (err >= 0)
+ TEST_ERROR;
+ }
+ H5E_END_TRY
/* Clean up */
err = H5Pclose(plist_id);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
err = H5Dclose(dset_id);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
/* Close the datatype and the file */
err = H5Tclose(part_t);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
err = H5Fclose(fid1);
- if( err < 0) TEST_ERROR;
+ if (err < 0)
+ TEST_ERROR;
PASSED();
return SUCCEED;
error:
- H5E_BEGIN_TRY {
- H5Pclose(plist_id);
- H5Dclose(dset_id);
- H5Tclose(part_t);
- H5PTclose(table);
- H5Fclose(fid1);
- } H5E_END_TRY
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(plist_id);
+ H5Dclose(dset_id);
+ H5Tclose(part_t);
+ H5PTclose(table);
+ H5Fclose(fid1);
+ }
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -726,83 +737,85 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_rw_nonnative_dt(hid_t fid)
+static int
+test_rw_nonnative_dt(hid_t fid)
{
- hid_t ptable; /* Packet table identifier */
+ hid_t ptable; /* Packet table identifier */
- herr_t err; /* Function return status */
- hsize_t count; /* Number of records in the table */
+ herr_t err; /* Function return status */
+ hsize_t count; /* Number of records in the table */
- int x; /* Loop variable */
+ int x; /* Loop variable */
- /* Buffers to hold data */
- int writeBuffer[5];
- int readBuffer[5];
+ /* Buffers to hold data */
+ int writeBuffer[5];
+ int readBuffer[5];
- TESTING("reading/writing non-native packet table");
+ HL_TESTING2("reading/writing non-native packet table");
- /* Initialize buffers */
- for(x=0; x<5; x++) {
- writeBuffer[x]=x;
- readBuffer[x] = -1;
- }
+ /* Initialize buffers */
+ for (x = 0; x < 5; x++) {
+ writeBuffer[x] = x;
+ readBuffer[x] = -1;
+ }
- /* Create a fixed-length packet table within the file */
- /* This table's "packets" will be simple integers and it will use no compression */
- if(H5Tget_order(H5T_NATIVE_INT) == H5T_ORDER_LE) {
- ptable = H5PTcreate(fid, "Packet Test Dataset, Non-native", H5T_STD_I32BE, (hsize_t)100, H5P_DEFAULT);
- } else {
- ptable = H5PTcreate(fid, "Packet Test Dataset, Non-native", H5T_STD_I32LE, (hsize_t)100, H5P_DEFAULT);
- }
- if(ptable == H5I_INVALID_HID)
+ /* Create a fixed-length packet table within the file */
+ /* This table's "packets" will be simple integers and it will use no compression */
+ if (H5Tget_order(H5T_NATIVE_INT) == H5T_ORDER_LE) {
+ ptable = H5PTcreate(fid, "Packet Test Dataset, Non-native", H5T_STD_I32BE, (hsize_t)100, H5P_DEFAULT);
+ }
+ else {
+ ptable = H5PTcreate(fid, "Packet Test Dataset, Non-native", H5T_STD_I32LE, (hsize_t)100, H5P_DEFAULT);
+ }
+ if (ptable == H5I_INVALID_HID)
goto error;
- /* Write one packet to the packet table */
- if( (err = H5PTappend(ptable, (size_t)1, &(writeBuffer[0]))) < 0 )
+ /* Write one packet to the packet table */
+ if ((err = H5PTappend(ptable, (size_t)1, &(writeBuffer[0]))) < 0)
goto error;
- /* Write several packets to the packet table */
- if( (err = H5PTappend(ptable, (size_t)4, &(writeBuffer[1]))) < 0)
+ /* Write several packets to the packet table */
+ if ((err = H5PTappend(ptable, (size_t)4, &(writeBuffer[1]))) < 0)
goto error;
- if( (err = H5PTclose(ptable)) < 0)
+ if ((err = H5PTclose(ptable)) < 0)
goto error;
- /* Open the Packet table */
- if( (ptable = H5PTopen(fid, "Packet Test Dataset, Non-native")) < 0)
+ /* Open the Packet table */
+ if ((ptable = H5PTopen(fid, "Packet Test Dataset, Non-native")) < 0)
goto error;
- /* Get the number of packets in the packet table. This should be five. */
- if( (err = H5PTget_num_packets(ptable, &count)) < 0)
+ /* Get the number of packets in the packet table. This should be five. */
+ if ((err = H5PTget_num_packets(ptable, &count)) < 0)
goto error;
- if( (int)count != 5 )
+ if ((int)count != 5)
goto error;
- /* Initialize packet table's "current record" */
- if( (err = H5PTcreate_index(ptable)) < 0)
+ /* Initialize packet table's "current record" */
+ if ((err = H5PTcreate_index(ptable)) < 0)
goto error;
- /* Iterate through packets, read each one back */
- for(x=0; x<5; x++) {
- if( (err = H5PTget_next(ptable, (size_t)1, &(readBuffer[x]))) < 0)
- goto error;
- if( x != readBuffer[x])
- goto error;
- }
+ /* Iterate through packets, read each one back */
+ for (x = 0; x < 5; x++) {
+ if ((err = H5PTget_next(ptable, (size_t)1, &(readBuffer[x]))) < 0)
+ goto error;
+ if (x != readBuffer[x])
+ goto error;
+ }
- /* Close the packet table */
- if( (err = H5PTclose(ptable)) < 0)
+ /* Close the packet table */
+ if ((err = H5PTclose(ptable)) < 0)
goto error;
-
- PASSED();
- return SUCCEED;
+
+ PASSED();
+ return SUCCEED;
error:
- H5_FAILED();
- if( H5PTis_valid(ptable) > 0)
- H5PTclose(ptable);
- return FAIL;
+ H5_FAILED();
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -813,109 +826,110 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_error(hid_t fid)
+static int
+test_error(hid_t fid)
{
- hid_t id = H5I_INVALID_HID;
- int id_open=0;
- particle_t readBuf[1];
+ hid_t id = H5I_INVALID_HID;
+ int id_open = 0;
+ particle_t readBuf[1];
- TESTING("error conditions");
+ HL_TESTING2("error conditions");
- /* Create a HL table */
- if(create_hl_table(fid) < 0)
+ /* Create a HL table */
+ if (create_hl_table(fid) < 0)
goto error;
- /* Try to open things that are not packet tables */
- H5E_BEGIN_TRY
- if(H5PTopen(fid, "Bogus_name") >= 0)
+ /* Try to open things that are not packet tables */
+ H5E_BEGIN_TRY
+ if (H5PTopen(fid, "Bogus_name") >= 0)
goto error;
- if(H5PTopen(fid, "group1") >= 0)
+ if (H5PTopen(fid, "group1") >= 0)
goto error;
- H5E_END_TRY
+ H5E_END_TRY
- /* Try to execute packet table commands on an invalid ID */
- H5E_BEGIN_TRY
- if(H5PTis_valid(id) >= 0)
+ /* Try to execute packet table commands on an invalid ID */
+ H5E_BEGIN_TRY
+ if (H5PTis_valid(id) >= 0)
goto error;
- if(H5PTis_varlen(id) >= 0)
+ if (H5PTis_varlen(id) >= 0)
goto error;
- if(H5PTclose(id) >= 0)
+ if (H5PTclose(id) >= 0)
goto error;
- if(H5PTappend(id, (size_t)1, testPart) >= 0)
+ if (H5PTappend(id, (size_t)1, testPart) >= 0)
goto error;
- if(H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
+ if (H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
goto error;
- if(H5PTcreate_index(id) >= 0)
+ if (H5PTcreate_index(id) >= 0)
goto error;
- if(H5PTset_index(id, (hsize_t)1) >= 0)
+ if (H5PTset_index(id, (hsize_t)1) >= 0)
goto error;
- if(H5PTget_index(id, NULL) >= 0)
+ if (H5PTget_index(id, NULL) >= 0)
goto error;
- H5E_END_TRY
+ H5E_END_TRY
- /* Open a high-level non-packet (H5TB) table and try to */
- /* execute commands on it. */
- if((id=H5Dopen2(fid, H5TB_TABLE_NAME, H5P_DEFAULT)) <0)
+ /* Open a high-level non-packet (H5TB) table and try to */
+ /* execute commands on it. */
+ if ((id = H5Dopen2(fid, H5TB_TABLE_NAME, H5P_DEFAULT)) < 0)
goto error;
- id_open = 1;
+ id_open = 1;
- H5E_BEGIN_TRY
- if(H5PTis_valid(id) >= 0)
+ H5E_BEGIN_TRY
+ if (H5PTis_valid(id) >= 0)
goto error;
- if(H5PTis_varlen(id) >= 0)
+ if (H5PTis_varlen(id) >= 0)
goto error;
- if(H5PTclose(id) >= 0)
+ if (H5PTclose(id) >= 0)
goto error;
- if(H5PTappend(id, (size_t)1, testPart) >= 0)
+ if (H5PTappend(id, (size_t)1, testPart) >= 0)
goto error;
- if(H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
+ if (H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
goto error;
- if(H5PTcreate_index(id) >= 0)
+ if (H5PTcreate_index(id) >= 0)
goto error;
- if(H5PTset_index(id, (hsize_t)1) >= 0)
+ if (H5PTset_index(id, (hsize_t)1) >= 0)
goto error;
- if(H5PTget_index(id, NULL) >= 0)
+ if (H5PTget_index(id, NULL) >= 0)
goto error;
- H5E_END_TRY
+ H5E_END_TRY
- id_open=0;
- if(H5Dclose(id) <0)
+ id_open = 0;
+ if (H5Dclose(id) < 0)
goto error;
- /* Open and close a packet table. Try to execute */
- /* commands on the closed ID. */
- if((id=H5PTopen(fid, PT_NAME))<0)
+ /* Open and close a packet table. Try to execute */
+ /* commands on the closed ID. */
+ if ((id = H5PTopen(fid, PT_NAME)) < 0)
goto error;
- if(H5PTclose(id) <0)
+ if (H5PTclose(id) < 0)
goto error;
- H5E_BEGIN_TRY
- if(H5PTis_valid(id) >= 0)
+ H5E_BEGIN_TRY
+ if (H5PTis_valid(id) >= 0)
goto error;
- if(H5PTis_varlen(id) >= 0)
+ if (H5PTis_varlen(id) >= 0)
goto error;
- if(H5PTclose(id) >= 0)
+ if (H5PTclose(id) >= 0)
goto error;
- if(H5PTappend(id, (size_t)1, testPart) >= 0)
+ if (H5PTappend(id, (size_t)1, testPart) >= 0)
goto error;
- if(H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
+ if (H5PTread_packets(id, (hsize_t)0, 1, readBuf) >= 0)
goto error;
- if(H5PTcreate_index(id) >= 0)
+ if (H5PTcreate_index(id) >= 0)
goto error;
- if(H5PTset_index(id, (hsize_t)1) >= 0)
+ if (H5PTset_index(id, (hsize_t)1) >= 0)
goto error;
- if(H5PTget_index(id, NULL) >= 0)
+ if (H5PTget_index(id, NULL) >= 0)
goto error;
- H5E_END_TRY
+ H5E_END_TRY
- PASSED();
- return SUCCEED;
+ PASSED();
+ return SUCCEED;
error:
- H5_FAILED();
- if(id_open)
- H5Dclose(id);
- return FAIL;
+ H5_FAILED();
+ if (id_open)
+ H5Dclose(id);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -925,18 +939,19 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_packet_table(hid_t fid)
+static int
+test_packet_table(hid_t fid)
{
- if( test_create_close(fid) < 0 )
+ if (test_create_close(fid) < 0)
return FAIL;
- if( test_open(fid) < 0 )
+ if (test_open(fid) < 0)
return FAIL;
/* test_append must be run before test_count and test_read, as it */
/* creates the packet table they use. */
- if( test_append(fid) < 0 )
+ if (test_append(fid) < 0)
return FAIL;
/* These tests will not necessarily cause failures in each other,
@@ -954,22 +969,23 @@ static int test_packet_table(hid_t fid)
/*
*
-*/
-int main(void)
+ */
+int
+main(void)
{
/* identifier for the file that is used in FL PT tests */
- hid_t fid;
- int status = 0;
+ hid_t fid;
+ int status = 0;
-/*-------------------------------------------------------------------------
- * Packet test: test each function of the packet table library
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Packet test: test each function of the packet table library
+ *-------------------------------------------------------------------------
+ */
- /* create a file using default properties */
- fid=H5Fcreate(TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* create a file using default properties */
+ fid = H5Fcreate(TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDputs("Testing packet table");
+ HDputs("Testing packet table");
/* Test packet table with fixed length */
if (test_packet_table(fid) < 0)
@@ -981,7 +997,7 @@ int main(void)
/* Close the file */
if (H5Fclose(fid) < 0)
- status = 1;
+ status = 1;
return status;
}
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index 35bd43a..c668a07 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -5,7 +5,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,17 +18,17 @@
*-------------------------------------------------------------------------
*/
-#define NRECORDS 5
-#define TEST_FILE_NAME "test_packet_table_vlen.h5"
+#define NRECORDS 5
+#define TEST_FILE_NAME "test_packet_table_vlen.h5"
#define TESTFL_FILE_NAME "testfl_packet_table_vlen.h5"
-#define PT_VLEN_ATOMIC "Dataset with VL of Atomic types"
-#define PT_VLEN_COMP "Dataset with VL of Compound Types"
-#define PT_COMP_VLEN "Dataset with Compound Type of VL types"
-#define PT_VLEN_VLEN "Dataset with VL of VL types"
-#define PT_FIXED_LEN "Fixed-length Packet Table"
-#define L1_INCM 16
-#define L2_INCM 8
-#define NAME_BUF_SIZE 80
+#define PT_VLEN_ATOMIC "Dataset with VL of Atomic types"
+#define PT_VLEN_COMP "Dataset with VL of Compound Types"
+#define PT_COMP_VLEN "Dataset with Compound Type of VL types"
+#define PT_VLEN_VLEN "Dataset with VL of VL types"
+#define PT_FIXED_LEN "Fixed-length Packet Table"
+#define L1_INCM 16
+#define L2_INCM 8
+#define NAME_BUF_SIZE 80
/*-------------------------------------------------------------------------
* Local functions
@@ -46,109 +46,112 @@ static int verify_attribute(hid_t fid, const char *table_name, const char *attr_
/*-------------------------------------------------------------------------
* test_VLof_atomic(): Test that a packet table with VL datatypes of atomic
- * datatypes can be created and written correctly. (HDFFV-442)
+ * datatypes can be created and written correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_VLof_atomic(void)
+static int
+test_VLof_atomic(void)
{
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
- hsize_t count; /* Number of records in the table */
- unsigned uu, vv; /* Loop variables */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with vlen of atomic");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vltype = H5I_INVALID_HID; /* Variable length datatype */
+ hsize_t count; /* Number of records in the table */
+ unsigned uu, vv; /* Loop variables */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with vlen of atomic");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++)
- ((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
+ ((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
} /* end for */
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a vlen type that uses an atomic datatype as its base type */
- vltype = H5Tvlen_create (H5T_NATIVE_UINT);
+ vltype = H5Tvlen_create(H5T_NATIVE_UINT);
if (vltype < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of an atomic type */
ptable = H5PTcreate(fid, PT_VLEN_ATOMIC, vltype, (hsize_t)1, H5P_DEFAULT);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Close the vlen datatype */
if (H5Tclose(vltype) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
for (uu = 0; uu < NRECORDS; uu++)
- for (vv = 0; vv < (uu + 1); vv++)
- {
- if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
- }
+ for (vv = 0; vv < (uu + 1); vv++) {
+ if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
+ HDprintf("Packet %u's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %u's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ }
}
/* Free the buffers */
- ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf );
+ ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vltype > 0) H5Tclose(vltype);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vltype > 0)
+ H5Tclose(vltype);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -157,139 +160,147 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* test_VLof_comptype(): Test that a packet table with VL datatypes of
- * compound datatypes can be created and written correctly. (HDFFV-442)
+ * compound datatypes can be created and written correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_VLof_comptype(void)
+static int
+test_VLof_comptype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
unsigned u;
- float f;
+ float f;
} VLcomp_t;
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
- hid_t cmptype=H5I_INVALID_HID; /* Compound datatype */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- hsize_t count; /* Number of records in the table */
- unsigned uu, vv; /* Loop variables */
- char msg[80]; /* For error message */
- herr_t ret;
-
- TESTING3(" with vlen of compound datatypes");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vltype = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t cmptype = H5I_INVALID_HID; /* Compound datatype */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ hsize_t count; /* Number of records in the table */
+ unsigned uu, vv; /* Loop variables */
+ char msg[80]; /* For error message */
+ herr_t ret;
+
+ HL_TESTING3(" with vlen of compound datatypes");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
- if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ if (writeBuf[uu].p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++) {
((VLcomp_t *)writeBuf[uu].p)[vv].u = uu + vv;
((VLcomp_t *)writeBuf[uu].p)[vv].f = (float)(uu + vv) / 3.0F;
- } /* end for */
- } /* end for */
+ } /* end for */
+ } /* end for */
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create the base compound type */
cmptype = H5Tcreate(H5T_COMPOUND, sizeof(VLcomp_t));
if (cmptype < 0)
- goto error;
+ goto error;
/* Insert fields */
ret = H5Tinsert(cmptype, "u", HOFFSET(VLcomp_t, u), H5T_NATIVE_UINT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(cmptype, "f", HOFFSET(VLcomp_t, f), H5T_NATIVE_FLOAT);
if (ret < 0)
- goto error;
+ goto error;
/* Create a variable length type that uses the VLcomp_t as its base type */
vltype = H5Tvlen_create(cmptype);
if (vltype < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of compound datatype */
ptable = H5PTcreate(fid, PT_VLEN_COMP, vltype, (hsize_t)1, H5P_DEFAULT);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release the datatypes */
if (H5Tclose(cmptype) < 0)
- goto error;
+ goto error;
if (H5Tclose(vltype) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)5, writeBuf );
+ ret = H5PTappend(ptable, (size_t)5, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n", __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
- continue;
- } /* write len != read len */
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n",
+ __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
+ continue;
+ } /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
- if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
+ if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
+ HDfprintf(
+ stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv,
+ (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
- } /* write value != read value */
- }
+ } /* write value != read value */
+ }
} /* end for */
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (cmptype > 0) H5Tclose(cmptype);
- if (vltype > 0) H5Tclose(vltype);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (cmptype > 0)
+ H5Tclose(cmptype);
+ if (vltype > 0)
+ H5Tclose(vltype);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -298,53 +309,53 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* test_compound_VL_VL(): Test that a packet table of compound datatypes
- * containing VL datatypes can be created and written
- * correctly. (HDFFV-442)
+ * containing VL datatypes can be created and written
+ * correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_compound_VL_VLtype(void)
+static int
+test_compound_VL_VLtype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
unsigned u;
- float f;
- hvl_t v;
+ float f;
+ hvl_t v;
} compVLVL_t;
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vlatomic=H5I_INVALID_HID; /* Variable length datatype */
- hid_t vlofvl=H5I_INVALID_HID; /* Variable length datatype */
- hid_t comp_vlvl=H5I_INVALID_HID; /* ID of a compound datatype containing
- a VL of VL of atomic datatype */
- hsize_t count; /* Number of records in the table */
- compVLVL_t writeBuf[NRECORDS];/* Buffer to hold data to be written */
- compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
- hvl_t *t1, *t2;
- unsigned uu, vv, ww; /* Loop variables */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with compound datatype containing vlen datatype");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vlatomic = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t vlofvl = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t comp_vlvl = H5I_INVALID_HID; /* ID of a compound datatype containing
+ a VL of VL of atomic datatype */
+ hsize_t count; /* Number of records in the table */
+ compVLVL_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ hvl_t * t1, *t2;
+ unsigned uu, vv, ww; /* Loop variables */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with compound datatype containing vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].u = uu * 10;
- writeBuf[uu].f = (float)(uu * 20) / 3.0F;
+ writeBuf[uu].u = uu * 10;
+ writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].v.len = uu + L1_INCM;
- for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++)
- {
+ for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++) {
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
- if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
- goto error;
- }
+ if (t1->p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ goto error;
+ }
t1->len = vv + L2_INCM;
for (ww = 0; ww < vv + L2_INCM; ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
@@ -354,123 +365,135 @@ static int test_compound_VL_VLtype(void)
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a VL datatype of an atomic type */
- vlatomic = H5Tvlen_create (H5T_NATIVE_UINT);
+ vlatomic = H5Tvlen_create(H5T_NATIVE_UINT);
if (vlatomic < 0)
- goto error;
+ goto error;
/* Create a VL datatype of the VL of atomic datatype */
- vlofvl = H5Tvlen_create (vlatomic);
+ vlofvl = H5Tvlen_create(vlatomic);
if (vlofvl < 0)
- goto error;
+ goto error;
/* Create the base compound type */
comp_vlvl = H5Tcreate(H5T_COMPOUND, sizeof(compVLVL_t));
if (comp_vlvl < 0)
- goto error;
+ goto error;
/* Insert fields: atomic, atomic, vlen */
ret = H5Tinsert(comp_vlvl, "u", HOFFSET(compVLVL_t, u), H5T_NATIVE_UINT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(comp_vlvl, "f", HOFFSET(compVLVL_t, f), H5T_NATIVE_FLOAT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(comp_vlvl, "v", HOFFSET(compVLVL_t, v), vlofvl);
if (ret < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a compound datatype of vlen datatype */
ptable = H5PTcreate(fid, PT_COMP_VLEN, comp_vlvl, (hsize_t)1, H5P_DEFAULT);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release datatypes */
if (H5Tclose(vlatomic) < 0)
- goto error;
+ goto error;
if (H5Tclose(vlofvl) < 0)
- goto error;
+ goto error;
if (H5Tclose(comp_vlvl) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf );
+ ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
- if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f,readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr,
+ "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
- for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
+ for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0;
+ (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
- if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
- } /* end for */
- } /* end for */
- } /* end for */
+ } /* end for */
+ } /* end for */
+ } /* end for */
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vlatomic > 0) H5Tclose(vlatomic);
- if (vlofvl > 0) H5Tclose(vlofvl);
- if (comp_vlvl > 0) H5Tclose(comp_vlvl);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vlatomic > 0)
+ H5Tclose(vlatomic);
+ if (vlofvl > 0)
+ H5Tclose(vlofvl);
+ if (comp_vlvl > 0)
+ H5Tclose(comp_vlvl);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -479,119 +502,123 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* test_VLof_VLtype(): Test that a packet table of VL datatype with VL
- * datatypes of atomic datatypes can be created and written
- * correctly. (HDFFV-442)
+ * datatypes of atomic datatypes can be created and written
+ * correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_VLof_VLtype(void)
+static int
+test_VLof_VLtype(void)
{
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vlatomic=H5I_INVALID_HID; /* Variable length datatype */
- hid_t vlofvl=H5I_INVALID_HID; /* VL datatype of VL datatypes */
- hsize_t count; /* Number of records in the table */
- hvl_t *t1; /* pointer to advance */
- unsigned uu, vv, ww; /* Loop variables */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with vlen datatype of vlen datatype");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vlatomic = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t vlofvl = H5I_INVALID_HID; /* VL datatype of VL datatypes */
+ hsize_t count; /* Number of records in the table */
+ hvl_t * t1; /* pointer to advance */
+ unsigned uu, vv, ww; /* Loop variables */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with vlen datatype of vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
- for (t1=(hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++)
- {
+ for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++) {
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
- if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
- goto error;
- }
+ if (t1->p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ goto error;
+ }
t1->len = vv * 1;
for (ww = 0; ww < (vv * 1); ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
} /* end for */
- } /* end for */
+ } /* end for */
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a VL datatype of an atomic type */
- vlatomic = H5Tvlen_create (H5T_NATIVE_UINT);
+ vlatomic = H5Tvlen_create(H5T_NATIVE_UINT);
if (vlatomic < 0)
- goto error;
+ goto error;
- vlofvl = H5Tvlen_create (vlatomic);
+ vlofvl = H5Tvlen_create(vlatomic);
if (vlofvl < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of vlen datatype */
ptable = H5PTcreate(fid, PT_VLEN_VLEN, vlofvl, (hsize_t)1, H5P_DEFAULT);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release datatypes */
if (H5Tclose(vlatomic) < 0)
- goto error;
+ goto error;
if (H5Tclose(vlofvl) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)5, writeBuf );
+ ret = H5PTappend(ptable, (size_t)5, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vlatomic > 0) H5Tclose(vlatomic);
- if (vlofvl > 0) H5Tclose(vlofvl);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vlatomic > 0)
+ H5Tclose(vlatomic);
+ if (vlofvl > 0)
+ H5Tclose(vlofvl);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -600,248 +627,259 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* verify_ptlengthtype() - helper function, verifies that the named packet
- * table is a fixed-length or variable-length as indicated by the last
- * argument.
+ * table is a fixed-length or variable-length as indicated by the last
+ * argument.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expected_value)
+static int
+verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expected_value)
{
- hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
- herr_t is_varlen = 0;
- herr_t ret = FAIL;
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ herr_t is_varlen = 0;
+ herr_t ret = FAIL;
/* Open the named packet table */
- if( (ptable = H5PTopen(fid, table_name)) < 0)
- goto error;
+ if ((ptable = H5PTopen(fid, table_name)) < 0)
+ goto error;
/* Verify the value returned from H5PTis_varlen is as expected */
is_varlen = H5PTis_varlen(ptable);
if (is_varlen == FAIL)
- goto error;
+ goto error;
else if (is_varlen == expected_value)
- ret = SUCCEED;
- else
- {
- char lenthtype[20];
- HDstrcpy(lenthtype, "fixed-length");
- if (expected_value == 1)
- HDstrcpy(lenthtype, "variable-length");
- fprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
- ret = FAIL;
+ ret = SUCCEED;
+ else {
+ char lenthtype[20];
+ HDstrcpy(lenthtype, "fixed-length");
+ if (expected_value == 1)
+ HDstrcpy(lenthtype, "variable-length");
+ HDfprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
+ ret = FAIL;
}
/* Close the packet table */
if (H5PTclose(ptable) < 0)
- goto error;
+ goto error;
return ret;
error: /* An error has occurred. Clean up and exit. */
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
return ret;
} /* verify_ptlengthtype */
/*-------------------------------------------------------------------------
* test_H5PTis_varlen(): Test that H5PTis_varlen works correctly on both
- * fixed- and variable-length packet tables.
+ * fixed- and variable-length packet tables.
*
* Description:
- * - Added a fixed-length packet table to the file for variety
- * - Use the helper funtion verify_ptlengthtype to test H5PTis_varlen
- * on each packet table.
+ * - Added a fixed-length packet table to the file for variety
+ * - Use the helper funtion verify_ptlengthtype to test H5PTis_varlen
+ * on each packet table.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_H5PTis_varlen(void)
+static int
+test_H5PTis_varlen(void)
{
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- herr_t ret; /* Returned status from a callee */
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ herr_t ret; /* Returned status from a callee */
- TESTING("H5PTis_varlen");
+ HL_TESTING2("H5PTis_varlen");
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a new table */
ptable = H5PTcreate(fid, PT_FIXED_LEN, H5T_STD_I32BE, (hsize_t)100, H5P_DEFAULT);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Open each packet table, and verify that H5PTis_varlen returns correct
type for each table */
ret = verify_ptlengthtype(fid, PT_VLEN_ATOMIC, 1); /* vlen of atomic */
if (ret < 0)
- goto error;
+ goto error;
ret = verify_ptlengthtype(fid, PT_VLEN_COMP, 1); /* vlen of compound */
if (ret < 0)
- goto error;
+ goto error;
ret = verify_ptlengthtype(fid, PT_COMP_VLEN, 0); /* compound of vlen, no vlen */
if (ret < 0)
- goto error;
+ goto error;
ret = verify_ptlengthtype(fid, PT_VLEN_VLEN, 1); /* vlen of vlen */
if (ret < 0)
- goto error;
+ goto error;
ret = verify_ptlengthtype(fid, PT_FIXED_LEN, 0); /* no vlen */
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (fid > 0) H5Fclose(fid);
+ if (fid > 0)
+ H5Fclose(fid);
H5_FAILED();
return FAIL;
} /* test_H5PTis_varlen */
/*-------------------------------------------------------------------------
* adding_attribute() - helper function, adds an attribute to the named
- * packet table.
+ * packet table.
* Note:
- * For simplicity, the attributes that are added to the packet tables
- * have the same characteristics except their names. They have the
- * same type, space, and values.
+ * For simplicity, the attributes that are added to the packet tables
+ * have the same characteristics except their names. They have the
+ * same type, space, and values.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-#define ATTR_RANK 1
-#define ATTR_DIM 3
-int attr_data[ATTR_DIM]={256,11945,-22107}; /* values to be written to attr */
+#define ATTR_RANK 1
+#define ATTR_DIM 3
+int attr_data[ATTR_DIM] = {256, 11945, -22107}; /* values to be written to attr */
-static int adding_attribute(hid_t fid, const char *table_name, const char *attr_name)
+static int
+adding_attribute(hid_t fid, const char *table_name, const char *attr_name)
{
- hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
- hid_t space_id = H5I_INVALID_HID; /* Dataspace for the attribute */
- hid_t attr_id = H5I_INVALID_HID; /* Attribute identifier */
- hid_t dset_id = H5I_INVALID_HID; /* Dataset identifier */
- hsize_t dims[] = {ATTR_DIM}; /* Dimension for dataspace */
- int ret = FAIL; /* Returned status from a callee */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t space_id = H5I_INVALID_HID; /* Dataspace for the attribute */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute identifier */
+ hid_t dset_id = H5I_INVALID_HID; /* Dataset identifier */
+ hsize_t dims[] = {ATTR_DIM}; /* Dimension for dataspace */
+ int ret = FAIL; /* Returned status from a callee */
/* Create dataspace for attribute */
space_id = H5Screate_simple(ATTR_RANK, dims, NULL);
if (space_id < 0)
- goto error;
+ goto error;
/* Open the named packet table */
- if( (ptable = H5PTopen(fid, table_name)) < 0)
- goto error;
+ if ((ptable = H5PTopen(fid, table_name)) < 0)
+ goto error;
dset_id = H5PTget_dataset(ptable);
if (dset_id < 0)
- goto error;
+ goto error;
/* Add the specified attribute to it */
attr_id = H5Acreate2(dset_id, attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT);
if (attr_id < 0)
- goto error;
+ goto error;
/* Write attribute values */
ret = H5Awrite(attr_id, H5T_NATIVE_INT, attr_data);
if (ret < 0)
- goto error;
+ goto error;
/* Close the attribute */
if (H5Aclose(attr_id) < 0)
- goto error;
+ goto error;
/* Close the dataspace */
if (H5Sclose(space_id) < 0)
- goto error;
+ goto error;
/* Close the packet table */
if (H5PTclose(ptable) < 0)
- goto error;
+ goto error;
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (attr_id > 0) H5Aclose(attr_id);
- if (space_id > 0) H5Sclose(space_id);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
+ if (attr_id > 0)
+ H5Aclose(attr_id);
+ if (space_id > 0)
+ H5Sclose(space_id);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
return ret;
} /* adding_attribute */
/*-------------------------------------------------------------------------
* verify_attribute() - helper function, verifies the named attribute can
- * be read correctly.
+ * be read correctly.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static herr_t verify_attribute(hid_t fid, const char *table_name, const char *attr_name)
+static herr_t
+verify_attribute(hid_t fid, const char *table_name, const char *attr_name)
{
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t attr_id=H5I_INVALID_HID; /* Attribute identifier */
- hid_t dset_id=H5I_INVALID_HID; /* Dataset associated with the pt */
- int read_data[ATTR_DIM]; /* Output buffer */
- int ii;
- herr_t ret = FAIL; /* Returned status from a callee */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute identifier */
+ hid_t dset_id = H5I_INVALID_HID; /* Dataset associated with the pt */
+ int read_data[ATTR_DIM]; /* Output buffer */
+ int ii;
+ herr_t ret = FAIL; /* Returned status from a callee */
/* Open the named packet table */
ptable = H5PTopen(fid, table_name);
if (ptable < 0)
- goto error;
+ goto error;
/* Get the dataset id of this packet table */
dset_id = H5PTget_dataset(ptable);
if (dset_id < 0)
- goto error;
+ goto error;
/* Open first attribute for the dataset */
attr_id = H5Aopen(dset_id, attr_name, H5P_DEFAULT);
if (attr_id < 0)
- goto error;
+ goto error;
/* Read attribute values */
ret = H5Aread(attr_id, H5T_NATIVE_INT, read_data);
if (ret < 0)
- goto error;
+ goto error;
/* Verify values read in */
for (ii = 0; ii < ATTR_DIM; ii++)
if (attr_data[ii] != read_data[ii])
- TestErrPrintf("%d: attribute data different: attr_data[%d]=%d, read_data[%d]=%d\n", __LINE__, ii, attr_data[ii], ii, read_data[ii]);
+ TestErrPrintf("%d: attribute data different: attr_data[%d]=%d, read_data[%d]=%d\n", __LINE__, ii,
+ attr_data[ii], ii, read_data[ii]);
/* Close the attribute */
if (H5Aclose(attr_id) < 0)
- goto error;
+ goto error;
/* Close the packet table */
if (H5PTclose(ptable) < 0)
- goto error;
+ goto error;
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (attr_id > 0) H5Aclose(attr_id);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
+ if (attr_id > 0)
+ H5Aclose(attr_id);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
return ret;
} /* verify_attribute */
@@ -849,143 +887,142 @@ error: /* An error has occurred. Clean up and exit. */
* test_attributes(): Test adding attributes to packet tables
*
* Description:
- * Added attributes to some random packet tables in the file.
+ * Added attributes to some random packet tables in the file.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_attributes(void)
+static int
+test_attributes(void)
{
- hid_t fid=H5I_INVALID_HID; /* File identifier */
- hid_t attr_id=H5I_INVALID_HID; /* Attribute identifier */
- herr_t ret = FAIL; /* Returned status from a callee */
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute identifier */
+ herr_t ret = FAIL; /* Returned status from a callee */
- TESTING("adding attributes to packet tables");
+ HL_TESTING2("adding attributes to packet tables");
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Add an arbitrary attribute to a few packet tables, using helper func */
attr_id = adding_attribute(fid, PT_VLEN_ATOMIC, "Attribute 1");
if (attr_id < 0)
- goto error;
+ goto error;
attr_id = adding_attribute(fid, PT_VLEN_COMP, "Attribute 2");
if (attr_id < 0)
- goto error;
+ goto error;
attr_id = adding_attribute(fid, PT_COMP_VLEN, "Attribute 3");
if (attr_id < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
/* Open the file again */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Read each attribute and verify the values, using helper function */
ret = verify_attribute(fid, PT_VLEN_ATOMIC, "Attribute 1");
if (ret < 0)
- goto error;
+ goto error;
ret = verify_attribute(fid, PT_VLEN_COMP, "Attribute 2");
if (ret < 0)
- goto error;
+ goto error;
ret = verify_attribute(fid, PT_COMP_VLEN, "Attribute 3");
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
- return(ret);
+ return (ret);
error: /* An error has occurred. Clean up and exit. */
- if (fid > 0) H5Fclose(fid);
+ if (fid > 0)
+ H5Fclose(fid);
H5_FAILED();
return FAIL;
} /* test_attributes */
/*-------------------------------------------------------------------------
* verify_accessors() - helper function, verifies that various info can be
- * retrieved correctly using the info returned by the accessor functions.
+ * retrieved correctly using the info returned by the accessor functions.
*
* Description:
- * Testing functions H5PTget_dataset and H5PTget_type
+ * Testing functions H5PTget_dataset and H5PTget_type
*
- * - Opens the named packet table
- * - Gets its associated dataset ID then calls a C function on that ID
- * to verify the dataset name
- * - Gets its associated datatype ID then calls a C function on that ID
- * to verify that the packet table is variable- or fixed-length as
- * indicated by the expected_value argument
+ * - Opens the named packet table
+ * - Gets its associated dataset ID then calls a C function on that ID
+ * to verify the dataset name
+ * - Gets its associated datatype ID then calls a C function on that ID
+ * to verify that the packet table is variable- or fixed-length as
+ * indicated by the expected_value argument
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static herr_t verify_accessors(hid_t fid, const char *table_name, herr_t expected_value)
+static herr_t
+verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type)
{
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t dset_id=H5I_INVALID_HID; /* Dataset associated with the pt */
- hid_t dtype_id=H5I_INVALID_HID; /* Dataset identifier */
- char buf[NAME_BUF_SIZE];
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t dset_id = H5I_INVALID_HID; /* Dataset associated with the pt */
+ hid_t dtype_id = H5I_INVALID_HID; /* Dataset identifier */
+ char buf[NAME_BUF_SIZE];
ssize_t name_size;
- herr_t is_varlen = 0;
- herr_t ret = FAIL; /* Returned status from a callee */
+ htri_t vlen_check_result = -1;
/* Open the named packet table. */
- ptable = H5PTopen(fid, table_name);
- if (ptable < 0)
- goto error;
+ if ((ptable = H5PTopen(fid, table_name)) < 0)
+ goto error;
/* Get the associated dataset ID. */
- dset_id = H5PTget_dataset(ptable);
- if (dset_id < 0)
- goto error;
+ if ((dset_id = H5PTget_dataset(ptable)) < 0)
+ goto error;
/* Check if the packet table's name matches its associated dataset's. */
*buf = '\0';
- name_size = H5Iget_name(dset_id, (char*)buf, NAME_BUF_SIZE);
- if (name_size < 0)
- goto error;
+ if ((name_size = H5Iget_name(dset_id, (char *)buf, NAME_BUF_SIZE)) < 0)
+ goto error;
VERIFY(HDstrcmp(buf, table_name), "Names of dataset and packet table don't match");
/* Get the packet table's datatype ID */
- dtype_id = H5PTget_type(ptable);
- if (dtype_id < 0)
- goto error;
+ if ((dtype_id = H5PTget_type(ptable)) < 0)
+ goto error;
/* Check if the type class matches that of the packet table. */
- is_varlen = H5Tdetect_class(dtype_id, H5T_VLEN);
- if (is_varlen == FAIL) /* failure occurred */
- goto error;
- else if (is_varlen == expected_value) /* length types match */
- ret = SUCCEED;
- else /* length types don't match */
- {
- /* Give lengthtype "fixed-length" or "variable-length" depending on the
- expected_value passed in, then print the error message. */
- char lenthtype[20];
- HDstrcpy(lenthtype, "fixed-length");
- if (expected_value == 1)
- HDstrcpy(lenthtype, "variable-length");
- fprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype);
- ret = FAIL;
+ if ((vlen_check_result = H5Tdetect_class(dtype_id, H5T_VLEN)) < 0)
+ goto error;
+
+ /* Check if length types match */
+ if (vlen_check_result != (htri_t)uses_vlen_type) {
+ /* Give lengthtype "fixed-length" or "variable-length" depending on the
+ * expected_value passed in, then print the error message.
+ */
+ char lenthtype[20];
+ if (uses_vlen_type == TRUE)
+ HDstrcpy(lenthtype, "variable-length");
+ else
+ HDstrcpy(lenthtype, "fixed-length");
+ HDfprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype);
+ goto error;
}
/* Close the packet table */
if (H5PTclose(ptable) < 0)
- goto error;
+ goto error;
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
H5_FAILED();
return FAIL;
} /* verify_accessors */
@@ -994,157 +1031,162 @@ error: /* An error has occurred. Clean up and exit. */
* test_accessors(): Test the accessor functions
*
* Description:
- * Retrieves the dataset and datatype IDs and verifies various info
- * to ensure these IDs are correct.
+ * Retrieves the dataset and datatype IDs and verifies various info
+ * to ensure these IDs are correct.
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int test_accessors(void)
+static int
+test_accessors(void)
{
- hid_t fid=H5I_INVALID_HID; /* File identifier */
- herr_t ret = FAIL; /* Returned status from a callee */
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ herr_t ret = FAIL; /* Returned status from a callee */
- TESTING("accessor functions");
+ HL_TESTING2("accessor functions");
/* Open the file */
fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
ret = verify_accessors(fid, PT_VLEN_ATOMIC, TRUE);
if (ret < 0)
- goto error;
+ goto error;
ret = verify_accessors(fid, PT_FIXED_LEN, FALSE);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (fid > 0) H5Fclose(fid);
+ if (fid > 0)
+ H5Fclose(fid);
H5_FAILED();
return FAIL;
} /* test_accessors */
/**************************************************************************
- Test set for deprecated function H5PTcreate_fl
- Each test in this set is the same as the corresponding one in the
- set for H5PTcreate, as of Mar 2016
+ Test set for deprecated function H5PTcreate_fl
+ Each test in this set is the same as the corresponding one in the
+ set for H5PTcreate, as of Mar 2016
**************************************************************************/
/*-------------------------------------------------------------------------
* testfl_VLof_atomic(): Test that a packet table with VL datatypes of atomic
- * datatypes can be created and written correctly. (HDFFV-442)
+ * datatypes can be created and written correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int testfl_VLof_atomic(void)
+static int
+testfl_VLof_atomic(void)
{
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
- hsize_t count; /* Number of records in the table */
- unsigned uu, vv; /* Loop variables */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with vlen of atomic");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vltype = H5I_INVALID_HID; /* Variable length datatype */
+ hsize_t count; /* Number of records in the table */
+ unsigned uu, vv; /* Loop variables */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with vlen of atomic");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(unsigned int));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++)
- ((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
+ ((unsigned int *)writeBuf[uu].p)[vv] = uu * 10 + vv;
} /* end for */
/* Open the file */
fid = H5Fopen(TESTFL_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a vlen type that uses an atomic datatype as its base type */
- vltype = H5Tvlen_create (H5T_NATIVE_UINT);
+ vltype = H5Tvlen_create(H5T_NATIVE_UINT);
if (vltype < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of an atomic type */
ptable = H5PTcreate_fl(fid, PT_VLEN_ATOMIC, vltype, (hsize_t)1, 0);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Close the vlen datatype */
if (H5Tclose(vltype) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
for (uu = 0; uu < NRECORDS; uu++)
- for (vv = 0; vv < (uu + 1); vv++)
- {
- if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
- printf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
- printf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
- }
+ for (vv = 0; vv < (uu + 1); vv++) {
+ if (((unsigned int *)readBuf[uu].p)[vv] != ((unsigned int *)writeBuf[uu].p)[vv]) {
+ HDprintf("Packet %d's value should be %d\n", uu, ((unsigned int *)writeBuf[uu].p)[vv]);
+ HDprintf("Packet %d's value in readBuf is %d\n", uu, ((unsigned int *)readBuf[uu].p)[vv]);
+ }
}
/* Free the buffers */
- ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf );
+ ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vltype > 0) H5Tclose(vltype);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vltype > 0)
+ H5Tclose(vltype);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -1153,139 +1195,147 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* testfl_VLof_comptype(): Test that a packet table with VL datatypes of
- * compound datatypes can be created and written correctly. (HDFFV-442)
+ * compound datatypes can be created and written correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int testfl_VLof_comptype(void)
+static int
+testfl_VLof_comptype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
unsigned u;
- float f;
+ float f;
} VLcomp_t;
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vltype=H5I_INVALID_HID; /* Variable length datatype */
- hid_t cmptype=H5I_INVALID_HID; /* Compound datatype */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- hsize_t count; /* Number of records in the table */
- unsigned uu, vv; /* Loop variables */
- char msg[80]; /* For error message */
- herr_t ret;
-
- TESTING3(" with vlen of compound datatypes");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vltype = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t cmptype = H5I_INVALID_HID; /* Compound datatype */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ hsize_t count; /* Number of records in the table */
+ unsigned uu, vv; /* Loop variables */
+ char msg[80]; /* For error message */
+ herr_t ret;
+
+ HL_TESTING3(" with vlen of compound datatypes");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(VLcomp_t));
- if(writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ if (writeBuf[uu].p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].len = uu + 1;
for (vv = 0; vv < (uu + 1); vv++) {
((VLcomp_t *)writeBuf[uu].p)[vv].u = uu + vv;
((VLcomp_t *)writeBuf[uu].p)[vv].f = (float)(uu + vv) / 3.0F;
- } /* end for */
- } /* end for */
+ } /* end for */
+ } /* end for */
/* Open the file */
fid = H5Fopen(TESTFL_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create the base compound type */
cmptype = H5Tcreate(H5T_COMPOUND, sizeof(VLcomp_t));
if (cmptype < 0)
- goto error;
+ goto error;
/* Insert fields */
ret = H5Tinsert(cmptype, "u", HOFFSET(VLcomp_t, u), H5T_NATIVE_UINT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(cmptype, "f", HOFFSET(VLcomp_t, f), H5T_NATIVE_FLOAT);
if (ret < 0)
- goto error;
+ goto error;
/* Create a variable length type that uses the VLcomp_t as its base type */
vltype = H5Tvlen_create(cmptype);
if (vltype < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of compound datatype */
ptable = H5PTcreate_fl(fid, PT_VLEN_COMP, vltype, (hsize_t)1, 0);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release the datatypes */
if (H5Tclose(cmptype) < 0)
- goto error;
+ goto error;
if (H5Tclose(vltype) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)5, writeBuf );
+ ret = H5PTappend(ptable, (size_t)5, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",__LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
- continue;
- } /* write len != read len */
+ HDfprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",
+ __LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
+ continue;
+ } /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
- if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv] ) {
- fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
+ if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
+ HDfprintf(stderr,
+ "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv,
+ ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
- } /* write value != read value */
- }
+ } /* write value != read value */
+ }
} /* end for */
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (cmptype > 0) H5Tclose(cmptype);
- if (vltype > 0) H5Tclose(vltype);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (cmptype > 0)
+ H5Tclose(cmptype);
+ if (vltype > 0)
+ H5Tclose(vltype);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -1294,179 +1344,191 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* testfl_compound_VL_VL(): Test that a packet table of compound datatypes
- * containing VL datatypes can be created and written
- * correctly. (HDFFV-442)
+ * containing VL datatypes can be created and written
+ * correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int testfl_compound_VL_VLtype(void)
+static int
+testfl_compound_VL_VLtype(void)
{
/* Struct that the VL sequences are composed of */
typedef struct {
unsigned u;
- float f;
- hvl_t v;
+ float f;
+ hvl_t v;
} compVLVL_t;
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vlatomic=H5I_INVALID_HID; /* Variable length datatype */
- hid_t vlofvl=H5I_INVALID_HID; /* Variable length datatype */
- hid_t comp_vlvl=H5I_INVALID_HID; /* ID of a compound datatype containing
- a VL of VL of atomic datatype */
- hsize_t count; /* Number of records in the table */
- compVLVL_t writeBuf[NRECORDS];/* Buffer to hold data to be written */
- compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
- hvl_t *t1, *t2;
- unsigned uu, vv, ww; /* Loop variables */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with compound datatype containing vlen datatype");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vlatomic = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t vlofvl = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t comp_vlvl = H5I_INVALID_HID; /* ID of a compound datatype containing
+ a VL of VL of atomic datatype */
+ hsize_t count; /* Number of records in the table */
+ compVLVL_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ compVLVL_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ hvl_t * t1, *t2;
+ unsigned uu, vv, ww; /* Loop variables */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with compound datatype containing vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
- writeBuf[uu].u = uu * 10;
- writeBuf[uu].f = (float)(uu * 20) / 3.0F;
+ writeBuf[uu].u = uu * 10;
+ writeBuf[uu].f = (float)(uu * 20) / 3.0F;
writeBuf[uu].v.p = HDmalloc((uu + L1_INCM) * sizeof(hvl_t));
if (writeBuf[uu].v.p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
- }
+ }
writeBuf[uu].v.len = uu + L1_INCM;
- for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++)
- {
+ for (t1 = (hvl_t *)((writeBuf[uu].v).p), vv = 0; vv < (uu + L1_INCM); vv++, t1++) {
t1->p = HDmalloc((vv + L2_INCM) * sizeof(unsigned int));
- if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
- goto error;
- }
+ if (t1->p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ goto error;
+ }
t1->len = vv + L2_INCM;
for (ww = 0; ww < vv + L2_INCM; ww++)
- ((unsigned int*)t1->p)[ww] = uu * 100 + vv * 10 + ww;
+ ((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
}
} /* end for */
/* Open the file */
fid = H5Fopen(TESTFL_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a VL datatype of an atomic type */
- vlatomic = H5Tvlen_create (H5T_NATIVE_UINT);
+ vlatomic = H5Tvlen_create(H5T_NATIVE_UINT);
if (vlatomic < 0)
- goto error;
+ goto error;
/* Create a VL datatype of the VL of atomic datatype */
- vlofvl = H5Tvlen_create (vlatomic);
+ vlofvl = H5Tvlen_create(vlatomic);
if (vlofvl < 0)
- goto error;
+ goto error;
/* Create the base compound type */
comp_vlvl = H5Tcreate(H5T_COMPOUND, sizeof(compVLVL_t));
if (comp_vlvl < 0)
- goto error;
+ goto error;
/* Insert fields: atomic, atomic, vlen */
ret = H5Tinsert(comp_vlvl, "u", HOFFSET(compVLVL_t, u), H5T_NATIVE_UINT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(comp_vlvl, "f", HOFFSET(compVLVL_t, f), H5T_NATIVE_FLOAT);
if (ret < 0)
- goto error;
+ goto error;
ret = H5Tinsert(comp_vlvl, "v", HOFFSET(compVLVL_t, v), vlofvl);
if (ret < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a compound datatype of vlen datatype */
ptable = H5PTcreate_fl(fid, PT_COMP_VLEN, comp_vlvl, (hsize_t)1, 0);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release datatypes */
if (H5Tclose(vlatomic) < 0)
- goto error;
+ goto error;
if (H5Tclose(vlofvl) < 0)
- goto error;
+ goto error;
if (H5Tclose(comp_vlvl) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf );
+ ret = H5PTappend(ptable, (size_t)NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)NRECORDS, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Compare data read in */
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
- fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu, writeBuf[uu].u, uu, readBuf[uu].u);
+ HDfprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
- fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu, (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ HDfprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
- fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n", __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ HDfprintf(stderr,
+ "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
- for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0; (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
+ for (t1 = (hvl_t *)(writeBuf[uu].v.p), t2 = (hvl_t *)(readBuf[uu].v.p), vv = 0;
+ (size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
- fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n", __LINE__, uu, vv, t1->len, t2->len);
+ HDfprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
- if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww] ) {
- fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww, ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
+ HDfprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
- } /* end for */
- } /* end for */
- } /* end for */
+ } /* end for */
+ } /* end for */
+ } /* end for */
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vlatomic > 0) H5Tclose(vlatomic);
- if (vlofvl > 0) H5Tclose(vlofvl);
- if (comp_vlvl > 0) H5Tclose(comp_vlvl);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vlatomic > 0)
+ H5Tclose(vlatomic);
+ if (vlofvl > 0)
+ H5Tclose(vlofvl);
+ if (comp_vlvl > 0)
+ H5Tclose(comp_vlvl);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -1475,119 +1537,123 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* testfl_VLof_VLtype(): Test that a packet table of VL datatype with VL
- * datatypes of atomic datatypes can be created and written
- * correctly. (HDFFV-442)
+ * datatypes of atomic datatypes can be created and written
+ * correctly. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-static int testfl_VLof_VLtype(void)
+static int
+testfl_VLof_VLtype(void)
{
- hid_t fid=H5I_INVALID_HID; /* Test file identifier */
- hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */
- hid_t vlatomic=H5I_INVALID_HID; /* Variable length datatype */
- hid_t vlofvl=H5I_INVALID_HID; /* VL datatype of VL datatypes */
- hsize_t count; /* Number of records in the table */
- hvl_t *t1; /* pointer to advance */
- unsigned uu, vv, ww; /* Loop variables */
- hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
- hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
- char msg[80]; /* For error message */
- herr_t ret; /* Returned status from a callee */
-
- TESTING3(" with vlen datatype of vlen datatype");
+ hid_t fid = H5I_INVALID_HID; /* Test file identifier */
+ hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
+ hid_t vlatomic = H5I_INVALID_HID; /* Variable length datatype */
+ hid_t vlofvl = H5I_INVALID_HID; /* VL datatype of VL datatypes */
+ hsize_t count; /* Number of records in the table */
+ hvl_t * t1; /* pointer to advance */
+ unsigned uu, vv, ww; /* Loop variables */
+ hvl_t writeBuf[NRECORDS]; /* Buffer to hold data to be written */
+ hvl_t readBuf[NRECORDS]; /* Buffer to hold read data */
+ char msg[80]; /* For error message */
+ herr_t ret; /* Returned status from a callee */
+
+ HL_TESTING3(" with vlen datatype of vlen datatype");
/* Allocate and initialize VL data to write (copied from C test) */
for (uu = 0; uu < NRECORDS; uu++) {
writeBuf[uu].p = HDmalloc((uu + 1) * sizeof(hvl_t));
if (writeBuf[uu].p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
goto error;
} /* end if */
writeBuf[uu].len = uu + 1;
- for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++)
- {
+ for (t1 = (hvl_t *)(writeBuf[uu].p), vv = 0; vv < (uu + 1); vv++, t1++) {
t1->p = HDmalloc((vv + 1) * sizeof(unsigned int));
- if (t1->p == NULL) {
- fprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
- goto error;
- }
+ if (t1->p == NULL) {
+ HDfprintf(stderr, "Cannot allocate memory for VL data! uu=%u\n", uu);
+ goto error;
+ }
t1->len = vv + 1;
for (ww = 0; ww < (vv + 1); ww++)
((unsigned int *)t1->p)[ww] = uu * 100 + vv * 10 + ww;
} /* end for */
- } /* end for */
+ } /* end for */
/* Open the file */
fid = H5Fopen(TESTFL_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid < 0)
- goto error;
+ goto error;
/* Create a VL datatype of an atomic type */
- vlatomic = H5Tvlen_create (H5T_NATIVE_UINT);
+ vlatomic = H5Tvlen_create(H5T_NATIVE_UINT);
if (vlatomic < 0)
- goto error;
+ goto error;
- vlofvl = H5Tvlen_create (vlatomic);
+ vlofvl = H5Tvlen_create(vlatomic);
if (vlofvl < 0)
- goto error;
+ goto error;
/* Create a packet table that uses a vlen datatype of vlen datatype */
ptable = H5PTcreate_fl(fid, PT_VLEN_VLEN, vlofvl, (hsize_t)1, 0);
/* Ensure that PT is created successfully */
if (ptable == H5I_INVALID_HID)
- goto error;
+ goto error;
/* Release datatypes */
if (H5Tclose(vlatomic) < 0)
- goto error;
+ goto error;
if (H5Tclose(vlofvl) < 0)
- goto error;
+ goto error;
/* Write the entire buffer to the packet table */
- ret = H5PTappend(ptable, (size_t)5, writeBuf );
+ ret = H5PTappend(ptable, (size_t)5, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Get the number of packets in the packet table, should be NRECORDS. */
ret = H5PTget_num_packets(ptable, &count);
if (ret < 0)
- goto error;
+ goto error;
- sprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
+ HDsprintf(msg, "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
- ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void*)readBuf );
+ ret = H5PTread_packets(ptable, (hsize_t)0, (size_t)5, (void *)readBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Free the buffers */
ret = H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
if (ret < 0)
- goto error;
+ goto error;
ret = H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
if (ret < 0)
- goto error;
+ goto error;
/* Close the packet table */
ret = H5PTclose(ptable);
if (ret < 0)
- goto error;
+ goto error;
/* Close the file */
if (H5Fclose(fid) < 0)
- goto error;
+ goto error;
PASSED();
return SUCCEED;
error: /* An error has occurred. Clean up and exit. */
- if (vlatomic > 0) H5Tclose(vlatomic);
- if (vlofvl > 0) H5Tclose(vlofvl);
- if (H5PTis_valid(ptable) > 0) H5PTclose(ptable);
- if (fid > 0) H5Fclose(fid);
+ if (vlatomic > 0)
+ H5Tclose(vlatomic);
+ if (vlofvl > 0)
+ H5Tclose(vlofvl);
+ if (H5PTis_valid(ptable) > 0)
+ H5PTclose(ptable);
+ if (fid > 0)
+ H5Fclose(fid);
H5PTfree_vlen_buff(ptable, NRECORDS, readBuf);
H5PTfree_vlen_buff(ptable, NRECORDS, writeBuf);
H5_FAILED();
@@ -1596,25 +1662,26 @@ error: /* An error has occurred. Clean up and exit. */
/*-------------------------------------------------------------------------
* test_packet_table_with_varlen(): Invokes individual tests to ensure that
- * packet tables with variable length are created and written correctly
- * without the specific VL PT functionality. (HDFFV-442)
+ * packet tables with variable length are created and written correctly
+ * without the specific VL PT functionality. (HDFFV-442)
*
* 2016/01/27 -BMR
*-------------------------------------------------------------------------
*/
-int test_packet_table_with_varlen(void)
+int
+test_packet_table_with_varlen(void)
{
- hid_t fid=H5I_INVALID_HID; /* File identifier */
- int status = SUCCEED;
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ int status = SUCCEED;
/* Create a file using default properties */
fid = H5Fcreate(TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0)
- return FAIL;
+ return FAIL;
/* Close the file. The file will be opened by each test function below */
if (H5Fclose(fid) < 0)
- return FAIL;
+ return FAIL;
HDputs("Testing packet table with various variable-length datatypes");
@@ -1623,46 +1690,46 @@ int test_packet_table_with_varlen(void)
/* Test variable length of a simple type */
if (test_VLof_atomic() < 0)
- status = FAIL;
+ status = FAIL;
/* Test variable length of a compound type */
if (test_VLof_comptype() < 0)
- status = FAIL;
+ status = FAIL;
/* Test compound type with variable length */
if (test_compound_VL_VLtype() < 0)
- status = FAIL;
+ status = FAIL;
/* Test variable length of a variable length */
if (test_VLof_VLtype() < 0)
- status = FAIL;
+ status = FAIL;
/* Test variable length of a variable length */
if (test_H5PTis_varlen() < 0)
- status = FAIL;
+ status = FAIL;
/* Test adding attributes to packet table */
if (test_attributes() < 0)
- status = FAIL;
+ status = FAIL;
/* Test accessor functions */
if (test_accessors() < 0)
- status = FAIL;
+ status = FAIL;
-/**************************************************************************
- Calling test functions for deprecated function H5PTcreate_fl
- Mar 2016, -BMR
+ /**************************************************************************
+ Calling test functions for deprecated function H5PTcreate_fl
+ Mar 2016, -BMR
-**************************************************************************/
+ **************************************************************************/
/* Create a file using default properties */
fid = H5Fcreate(TESTFL_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0)
- return FAIL;
+ return FAIL;
/* Close the file. The file will be opened by each test function below */
if (H5Fclose(fid) < 0)
- return FAIL;
+ return FAIL;
HDputs("Testing packet table with various variable-length datatypes - H5PTcreate_fl");
@@ -1671,19 +1738,19 @@ int test_packet_table_with_varlen(void)
/* Test variable length of a simple type */
if (testfl_VLof_atomic() < 0)
- status = FAIL;
+ status = FAIL;
/* Test variable length of a compound type */
if (testfl_VLof_comptype() < 0)
- status = FAIL;
+ status = FAIL;
/* Test compound type with variable length */
if (testfl_compound_VL_VLtype() < 0)
- status = FAIL;
+ status = FAIL;
/* Test variable length of a variable length */
if (testfl_VLof_VLtype() < 0)
- status = FAIL;
+ status = FAIL;
- return(status);
+ return (status);
}
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index ff9c0eb..b462ec1 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -1,15 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* Copyright by The HDF Group. *
-* Copyright by the Board of Trustees of the University of Illinois. *
-* All rights reserved. *
-* *
-* This file is part of HDF5. The full HDF5 copyright notice, including *
-* terms governing use, modification, and redistribution, is contained in *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
#include <string.h>
@@ -17,48 +17,44 @@
#include "H5srcdir.h"
#include "H5TBpublic.h"
-#define TEST_FILE_BE "test_table_be.h5"
-#define TEST_FILE_LE "test_table_le.h5"
+#define TEST_FILE_BE "test_table_be.h5"
+#define TEST_FILE_LE "test_table_le.h5"
#define TEST_FILE_CRAY "test_table_cray.h5"
-
/*-------------------------------------------------------------------------
-* Table API test
-*
-* Functions tested:
-*
-* H5TBmake_table
-* H5TBread_table
-* H5TBwrite_records
-* H5TBread_records
-* H5TBappend_records
-* H5TBinsert_record
-* H5TBdelete_record
-* H5TBcombine_tables
-* H5TBwrite_fields_name
-* H5TBread_fields_name
-* H5TBwrite_fields_index
-* H5TBinsert_field
-* H5TBdelete_field
-* H5TBget_table_info
-* H5TBget_field_info
-*
-*-------------------------------------------------------------------------
-*/
-
-#define TITLE "Title"
-#define NFIELDS 5
-#define NRECORDS 8
-#define NRECORDS_ADD 3
-
-#define TESTING2(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
+ * Table API test
+ *
+ * Functions tested:
+ *
+ * H5TBmake_table
+ * H5TBread_table
+ * H5TBwrite_records
+ * H5TBread_records
+ * H5TBappend_records
+ * H5TBinsert_record
+ * H5TBdelete_record
+ * H5TBcombine_tables
+ * H5TBwrite_fields_name
+ * H5TBread_fields_name
+ * H5TBwrite_fields_index
+ * H5TBinsert_field
+ * H5TBdelete_field
+ * H5TBget_table_info
+ * H5TBget_field_info
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#define TITLE "Title"
+#define NFIELDS 5
+#define NRECORDS 8
+#define NRECORDS_ADD 3
/*-------------------------------------------------------------------------
-* structure used for all tests, a particle with properties
-*-------------------------------------------------------------------------
-*/
-typedef struct particle_t
-{
+ * structure used for all tests, a particle with properties
+ *-------------------------------------------------------------------------
+ */
+typedef struct particle_t {
char name[16];
long longi;
float pressure;
@@ -67,31 +63,28 @@ typedef struct particle_t
} particle_t;
/*-------------------------------------------------------------------------
-* a subset of particle_t, with latitude and longitude fields
-*-------------------------------------------------------------------------
-*/
-typedef struct position_t
-{
- long longi;
- int lati;
+ * a subset of particle_t, with latitude and longitude fields
+ *-------------------------------------------------------------------------
+ */
+typedef struct position_t {
+ long longi;
+ int lati;
} position_t;
/*-------------------------------------------------------------------------
-* a subset of particle_t, with name and pressure fields
-*-------------------------------------------------------------------------
-*/
-typedef struct namepressure_t
-{
- char name[16];
- float pressure;
+ * a subset of particle_t, with name and pressure fields
+ *-------------------------------------------------------------------------
+ */
+typedef struct namepressure_t {
+ char name[16];
+ float pressure;
} namepressure_t;
/*-------------------------------------------------------------------------
-* an extended particle, used in the insert field test
-*-------------------------------------------------------------------------
-*/
-typedef struct particle2_t
-{
+ * an extended particle, used in the insert field test
+ *-------------------------------------------------------------------------
+ */
+typedef struct particle2_t {
char name[16];
long longi;
float pressure;
@@ -101,11 +94,10 @@ typedef struct particle2_t
} particle2_t;
/*-------------------------------------------------------------------------
-* a particle with one field less, used in the delete field test
-*-------------------------------------------------------------------------
-*/
-typedef struct particle3_t
-{
+ * a particle with one field less, used in the delete field test
+ *-------------------------------------------------------------------------
+ */
+typedef struct particle3_t {
char name[16];
long longi;
double temperature;
@@ -117,47 +109,37 @@ typedef struct particle3_t
*-------------------------------------------------------------------------
*/
-/* Push current alignment rule forcing 4-byte alignment boundary
+/* Push current alignment rule forcing 4-byte alignment boundary
* to the internal stack ...
*/
-#pragma pack(push,4)
- typedef struct particle4_t {
- uint32_t state;
- double posx;
- double posy;
- float atx[3];
- float aty[3];
- float rro[2];
- } particle4_t;
-/*
+#pragma pack(push, 4)
+typedef struct particle4_t {
+ uint32_t state;
+ double posx;
+ double posy;
+ float atx[3];
+ float aty[3];
+ float rro[2];
+} particle4_t;
+/*
* ... and restore original alignment rules from stack
*/
#pragma pack(pop)
-
/*-------------------------------------------------------------------------
-* function to open an HDF5 file and return its file identifier
-*-------------------------------------------------------------------------
-*/
-static hid_t h5file_open(const char *fname, unsigned flags)
+ * function to open an HDF5 file and return its file identifier
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+h5file_open(const char *fname, unsigned flags)
{
- hid_t fid; /* identifier for the file */
- char *srcdir = getenv("srcdir"); /* the source directory */
- char data_file[512]=""; /* buffer to hold name of existing file */
-
- /* compose the name of the file to open, using the srcdir, if appropriate */
- if (srcdir)
- {
- HDstrcpy(data_file,srcdir);
- HDstrcat(data_file,"/");
- }
- HDstrcat(data_file,fname);
+ hid_t fid; /* identifier for the file */
+ const char *data_file = H5_get_srcdir_filename(fname);
/* open */
- if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0)
- {
- HDfprintf(stderr,"Error: Cannot open file <%s>\n",data_file );
+ if ((fid = H5Fopen(data_file, flags, H5P_DEFAULT)) < 0) {
+ HDfprintf(stderr, "Error: Cannot open file <%s>\n", data_file);
HDexit(1);
}
@@ -165,74 +147,68 @@ static hid_t h5file_open(const char *fname, unsigned flags)
}
/*-------------------------------------------------------------------------
-* function that compares one particle
-*-------------------------------------------------------------------------
-*/
-static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf )
+ * function that compares one particle
+ *-------------------------------------------------------------------------
+ */
+static int
+cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf)
{
- if ( ( HDstrcmp( rbuf[i].name, wbuf[j].name ) != 0 ) ||
- rbuf[i].lati != wbuf[j].lati ||
- rbuf[i].longi != wbuf[j].longi ||
- !FLT_ABS_EQUAL(rbuf[i].pressure,wbuf[j].pressure) ||
- !DBL_ABS_EQUAL(rbuf[i].temperature,wbuf[j].temperature) )
- {
- HDfprintf(stderr,"read and write buffers have differences\n");
- HDfprintf(stderr,"%s %ld %f %f %d\n",
- rbuf[i].name,rbuf[i].longi,(double)rbuf[i].pressure,rbuf[i].temperature,rbuf[i].lati);
- HDfprintf(stderr,"%s %ld %f %f %d\n",
- wbuf[j].name,wbuf[j].longi,(double)wbuf[j].pressure,wbuf[j].temperature,wbuf[j].lati);
+ if ((HDstrcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
+ rbuf[i].longi != wbuf[j].longi || !H5_FLT_ABS_EQUAL(rbuf[i].pressure, wbuf[j].pressure) ||
+ !H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) {
+ HDfprintf(stderr, "read and write buffers have differences\n");
+ HDfprintf(stderr, "%s %ld %f %f %d\n", rbuf[i].name, rbuf[i].longi, (double)rbuf[i].pressure,
+ rbuf[i].temperature, rbuf[i].lati);
+ HDfprintf(stderr, "%s %ld %f %f %d\n", wbuf[j].name, wbuf[j].longi, (double)wbuf[j].pressure,
+ wbuf[j].temperature, wbuf[j].lati);
return -1;
}
return 0;
}
/*-------------------------------------------------------------------------
-* function to compare deleted records
-*-------------------------------------------------------------------------
-*/
-static int compare_deleted(hsize_t rrecords, hsize_t dstart, hsize_t drecords,
- particle_t *rbuf, particle_t *wbuf)
+ * function to compare deleted records
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_deleted(hsize_t rrecords, hsize_t dstart, hsize_t drecords, particle_t *rbuf, particle_t *wbuf)
{
- hsize_t i,j;
- for( i=0; i<rrecords; i++)
- {
- if (i<dstart)
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ hsize_t i, j;
+ for (i = 0; i < rrecords; i++) {
+ if (i < dstart) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
return -1;
}
- else
- {
- j=i+drecords;
- if (cmp_par(i,j,rbuf,wbuf)<0)
+ else {
+ j = i + drecords;
+ if (cmp_par(i, j, rbuf, wbuf) < 0)
return -1;
}
}
return 0;
}
-
-
/*-------------------------------------------------------------------------
-* the test program
-*-------------------------------------------------------------------------
-*/
+ * the test program
+ *-------------------------------------------------------------------------
+ */
-static int test_table(hid_t fid, int do_write)
+static int
+test_table(hid_t fid, int do_write)
{
- hid_t fid1;
- hid_t fid2;
- hsize_t chunk_size=10;
- int compress=0;
- int *fill=NULL;
- particle_t fill1[1] = { {"no data",-1, -99.0f, -99.0f, -1} };
- int fill1_new[1] = { -100 };
- hsize_t position;
- char tname[20];
- hsize_t i, j;
+ hid_t fid1;
+ hid_t fid2;
+ hsize_t chunk_size = 10;
+ int compress = 0;
+ int * fill = NULL;
+ particle_t fill1[1] = {{"no data", -1, -99.0f, -99.0f, -1}};
+ int fill1_new[1] = {-100};
+ hsize_t position;
+ char tname[20];
+ hsize_t i, j;
/* write, read, append, delete, insert some records and fields */
- hsize_t FIELDS = NFIELDS;
- hsize_t RECORDS = NRECORDS;
+ hsize_t FIELDS = NFIELDS;
+ hsize_t RECORDS = NRECORDS;
hsize_t start;
hsize_t wstart;
hsize_t rstart;
@@ -246,210 +222,157 @@ static int test_table(hid_t fid, int do_write)
hsize_t drecords;
hsize_t nfields;
hsize_t rfields;
- hsize_t start1; /* record to start reading from 1st table */
- hsize_t start2; /* record to start writing in 2nd table */
+ hsize_t start1; /* record to start reading from 1st table */
+ hsize_t start2; /* record to start writing in 2nd table */
/* read, write, insert, append buffers */
- particle_t rbuf[NRECORDS+4];
+ particle_t rbuf[NRECORDS + 4];
particle2_t rbuf2[NRECORDS];
particle3_t rbuf3[NRECORDS];
- particle_t rbufc[NRECORDS*2];
- particle_t abuf[2]={{"eight",80,8.0f,80.0f,80},{"nine",90,9.0f,90.0f,90}};
- particle_t ibuf[2]={{"zero", 0, 0.0f, 0.0f, 0},{"zero", 0, 0.0f, 0.0f, 0}};
+ particle_t rbufc[NRECORDS * 2];
+ particle_t abuf[2] = {{"eight", 80, 8.0f, 80.0f, 80}, {"nine", 90, 9.0f, 90.0f, 90}};
+ particle_t ibuf[2] = {{"zero", 0, 0.0f, 0.0f, 0}, {"zero", 0, 0.0f, 0.0f, 0}};
particle_t wbufd[NRECORDS];
- particle_t wbuf[NRECORDS] = {
- {"zero", 0, 0.0f, 0.0f, 0,},
- {"one", 10, 1.0f, 10.0f, 10},
- {"two", 20, 2.0f, 20.0f, 20},
- {"three",30, 3.0f, 30.0f, 30},
- {"four", 40, 4.0f, 40.0f, 40},
- {"five", 50, 5.0f, 50.0f, 50},
- {"six", 60, 6.0f, 60.0f, 60},
- {"seven",70, 7.0f, 70.0f, 70}
- };
+ particle_t wbuf[NRECORDS] = {{
+ "zero",
+ 0,
+ 0.0f,
+ 0.0f,
+ 0,
+ },
+ {"one", 10, 1.0f, 10.0f, 10},
+ {"two", 20, 2.0f, 20.0f, 20},
+ {"three", 30, 3.0f, 30.0f, 30},
+ {"four", 40, 4.0f, 40.0f, 40},
+ {"five", 50, 5.0f, 50.0f, 50},
+ {"six", 60, 6.0f, 60.0f, 60},
+ {"seven", 70, 7.0f, 70.0f, 70}};
/* buffers for the field "Pressure" and "New_field" */
- float pressure_in [NRECORDS] = { 0.0f,1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f };
- float pressure_out [NRECORDS];
- int buf_new[NRECORDS] = { 0,1,2,3,4,5,6,7 };
+ float pressure_in[NRECORDS] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f};
+ float pressure_out[NRECORDS];
+ int buf_new[NRECORDS] = {0, 1, 2, 3, 4, 5, 6, 7};
/* buffers for the fields "Latitude,Longitude" */
- position_t position_out[NRECORDS_ADD];
- position_t position_in[NRECORDS_ADD] = { {0,0},
- {10,10},
- {20,20}};
+ position_t position_out[NRECORDS_ADD];
+ position_t position_in[NRECORDS_ADD] = {{0, 0}, {10, 10}, {20, 20}};
/* buffers for the fields "Name,Pressure" */
- namepressure_t namepre_out[NRECORDS];
- namepressure_t namepre_in[NRECORDS] =
- { {"zero",0.0f},
- {"one", 1.0f},
- {"two", 2.0f},
- {"three", 3.0f},
- {"four", 4.0f},
- {"five", 5.0f},
- {"six", 6.0f},
- {"seven", 7.0f},
+ namepressure_t namepre_out[NRECORDS];
+ namepressure_t namepre_in[NRECORDS] = {
+ {"zero", 0.0f}, {"one", 1.0f}, {"two", 2.0f}, {"three", 3.0f},
+ {"four", 4.0f}, {"five", 5.0f}, {"six", 6.0f}, {"seven", 7.0f},
};
-
/*-------------------------------------------------------------------------
- * initialize table parameters
- * field offsets and sizes used in the fields functions
- *-------------------------------------------------------------------------
- */
-
- size_t field_offset_pos[2]=
- {
- HOFFSET( position_t, longi ),
- HOFFSET( position_t, lati )
- };
- size_t field_offset_namepre[2]=
- {
- HOFFSET( namepressure_t, name ),
- HOFFSET( namepressure_t, pressure )
- };
- size_t field_sizes_pos[2]=
- {
- sizeof(position_in[0].longi),
- sizeof(position_in[0].lati)
- };
- size_t field_sizes_namepre[2]=
- {
- sizeof(namepre_in[0].name),
- sizeof(namepre_in[0].pressure)
- };
- size_t field_sizes_pre[1]=
- {
- sizeof(namepre_in[0].pressure)
- };
+ * initialize table parameters
+ * field offsets and sizes used in the fields functions
+ *-------------------------------------------------------------------------
+ */
+
+ size_t field_offset_pos[2] = {HOFFSET(position_t, longi), HOFFSET(position_t, lati)};
+ size_t field_offset_namepre[2] = {HOFFSET(namepressure_t, name), HOFFSET(namepressure_t, pressure)};
+ size_t field_sizes_pos[2] = {sizeof(position_in[0].longi), sizeof(position_in[0].lati)};
+ size_t field_sizes_namepre[2] = {sizeof(namepre_in[0].name), sizeof(namepre_in[0].pressure)};
+ size_t field_sizes_pre[1] = {sizeof(namepre_in[0].pressure)};
/*-------------------------------------------------------------------------
- * query table test
- *-------------------------------------------------------------------------
- */
- char **names_out;
- size_t sizes_out[NFIELDS];
- size_t offset_out[NFIELDS];
- size_t size_out;
+ * query table test
+ *-------------------------------------------------------------------------
+ */
+ char **names_out;
+ size_t sizes_out[NFIELDS];
+ size_t offset_out[NFIELDS];
+ size_t size_out;
/*-------------------------------------------------------------------------
- * initialize table parameters
- * field indexes (zero based) used in the fields functions
- * "Name 0","Longitude 1","Pressure 2","Temperature 3","Latitude 4"
- *-------------------------------------------------------------------------
- */
- int field_index_pre[1] = { 2 };
- int field_index_pos[2] = { 1,4 };
- int field_index_namepre[2] = { 0,2 };
- int field_index[NFIELDS] = { 0,1,2,3,4 };
+ * initialize table parameters
+ * field indexes (zero based) used in the fields functions
+ * "Name 0","Longitude 1","Pressure 2","Temperature 3","Latitude 4"
+ *-------------------------------------------------------------------------
+ */
+ int field_index_pre[1] = {2};
+ int field_index_pos[2] = {1, 4};
+ int field_index_namepre[2] = {0, 2};
+ int field_index[NFIELDS] = {0, 1, 2, 3, 4};
/*-------------------------------------------------------------------------
- * initialize table parameters
- * size and the offsets of struct members in memory
- * define the inserted field HDF5 type and buffers
- * these are used for the insert field test
- *-------------------------------------------------------------------------
- */
- hid_t field_type_new = H5T_NATIVE_INT;
- size_t dst_size2 = sizeof( particle2_t );
- size_t dst_offset2[NFIELDS+1] = { HOFFSET( particle2_t, name ),
- HOFFSET( particle2_t, longi ),
- HOFFSET( particle2_t, pressure ),
- HOFFSET( particle2_t, temperature ),
- HOFFSET( particle2_t, lati ),
- HOFFSET( particle2_t, new_field )};
- size_t dst_sizes2[NFIELDS+1] = { sizeof( rbuf2[0].name),
- sizeof( rbuf2[0].longi),
- sizeof( rbuf2[0].pressure),
- sizeof( rbuf2[0].temperature),
- sizeof( rbuf2[0].lati),
- sizeof( rbuf2[0].new_field)};
+ * initialize table parameters
+ * size and the offsets of struct members in memory
+ * define the inserted field HDF5 type and buffers
+ * these are used for the insert field test
+ *-------------------------------------------------------------------------
+ */
+ hid_t field_type_new = H5T_NATIVE_INT;
+ size_t dst_size2 = sizeof(particle2_t);
+ size_t dst_offset2[NFIELDS + 1] = {HOFFSET(particle2_t, name), HOFFSET(particle2_t, longi),
+ HOFFSET(particle2_t, pressure), HOFFSET(particle2_t, temperature),
+ HOFFSET(particle2_t, lati), HOFFSET(particle2_t, new_field)};
+ size_t dst_sizes2[NFIELDS + 1] = {sizeof(rbuf2[0].name), sizeof(rbuf2[0].longi),
+ sizeof(rbuf2[0].pressure), sizeof(rbuf2[0].temperature),
+ sizeof(rbuf2[0].lati), sizeof(rbuf2[0].new_field)};
/*-------------------------------------------------------------------------
- * initialize table parameters
- * size and the offsets of struct members in memory
- * these are used for the delete field test
- *-------------------------------------------------------------------------
- */
- size_t dst_size3 = sizeof( particle3_t );
- size_t dst_offset3[NFIELDS-1] = { HOFFSET( particle3_t, name ),
- HOFFSET( particle3_t, longi ),
- HOFFSET( particle3_t, temperature ),
- HOFFSET( particle3_t, lati )};
-
- size_t dst_sizes3[NFIELDS-1] = { sizeof( rbuf3[0].name),
- sizeof( rbuf3[0].longi),
- sizeof( rbuf3[0].temperature),
- sizeof( rbuf3[0].lati)};
+ * initialize table parameters
+ * size and the offsets of struct members in memory
+ * these are used for the delete field test
+ *-------------------------------------------------------------------------
+ */
+ size_t dst_size3 = sizeof(particle3_t);
+ size_t dst_offset3[NFIELDS - 1] = {HOFFSET(particle3_t, name), HOFFSET(particle3_t, longi),
+ HOFFSET(particle3_t, temperature), HOFFSET(particle3_t, lati)};
+
+ size_t dst_sizes3[NFIELDS - 1] = {sizeof(rbuf3[0].name), sizeof(rbuf3[0].longi),
+ sizeof(rbuf3[0].temperature), sizeof(rbuf3[0].lati)};
/*-------------------------------------------------------------------------
- * initialize table parameters
- * size and the offsets of struct members in memory
- * these are used for the delete field test with differing memory layout
- *-------------------------------------------------------------------------
- */
+ * initialize table parameters
+ * size and the offsets of struct members in memory
+ * these are used for the delete field test with differing memory layout
+ *-------------------------------------------------------------------------
+ */
/* Calculate the size and the offsets of our struct members in memory */
- size_t tbl_size = sizeof(particle4_t);
- size_t tbl_offset[NFIELDS+1] = { HOFFSET(particle4_t, state),
- HOFFSET(particle4_t, posx),
- HOFFSET(particle4_t, posy),
- HOFFSET(particle4_t, atx),
- HOFFSET(particle4_t, aty),
- HOFFSET(particle4_t, rro)
- };
+ size_t tbl_size = sizeof(particle4_t);
+ size_t tbl_offset[NFIELDS + 1] = {HOFFSET(particle4_t, state), HOFFSET(particle4_t, posx),
+ HOFFSET(particle4_t, posy), HOFFSET(particle4_t, atx),
+ HOFFSET(particle4_t, aty), HOFFSET(particle4_t, rro)};
/* Define an array of Particles */
- particle4_t p_data[NRECORDS] = {
- {12112, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12113, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12114, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12115, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12116, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12117, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12118, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
- {12119, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}}
- };
+ particle4_t p_data[NRECORDS] = {{12112, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12113, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12114, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12115, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12116, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12117, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12118, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}},
+ {12119, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}};
/*-------------------------------------------------------------------------
- * initialize table parameters
- * 1) size and the offsets of struct members in memory
- * 2) field names
- * 3) define a HDF5 type for the fields
- *-------------------------------------------------------------------------
- */
-
- size_t type_size_mem = sizeof( particle_t );
- size_t field_offset[NFIELDS]=
- {
- HOFFSET( particle_t, name ),
- HOFFSET( particle_t, longi ),
- HOFFSET( particle_t, pressure ),
- HOFFSET( particle_t, temperature ),
- HOFFSET( particle_t, lati )
- };
- size_t field_size[NFIELDS] =
- {
- sizeof( rbuf[0].name),
- sizeof( rbuf[0].longi),
- sizeof( rbuf[0].pressure),
- sizeof( rbuf[0].temperature),
- sizeof( rbuf[0].lati)
- };
+ * initialize table parameters
+ * 1) size and the offsets of struct members in memory
+ * 2) field names
+ * 3) define a HDF5 type for the fields
+ *-------------------------------------------------------------------------
+ */
- const char *field_names4[NFIELDS+1] =
- { "F1", "F2", "F3", "F4", "F5", "F6"};
- hid_t field_type4[NFIELDS+1];
- particle4_t fill_data[1] = { {9999999, -9999999, 999999, {999,999,999},{999,999,999}, {999,999}} };
+ size_t type_size_mem = sizeof(particle_t);
+ size_t field_offset[NFIELDS] = {HOFFSET(particle_t, name), HOFFSET(particle_t, longi),
+ HOFFSET(particle_t, pressure), HOFFSET(particle_t, temperature),
+ HOFFSET(particle_t, lati)};
+ size_t field_size[NFIELDS] = {sizeof(rbuf[0].name), sizeof(rbuf[0].longi), sizeof(rbuf[0].pressure),
+ sizeof(rbuf[0].temperature), sizeof(rbuf[0].lati)};
- hsize_t nfields_out;
- hsize_t nrecords_out;
- hid_t arry3_32f;
- hid_t arry2_32f;
- hsize_t dims;
+ const char *field_names4[NFIELDS + 1] = {"F1", "F2", "F3", "F4", "F5", "F6"};
+ hid_t field_type4[NFIELDS + 1];
+ particle4_t fill_data[1] = {{9999999, -9999999, 999999, {999, 999, 999}, {999, 999, 999}, {999, 999}}};
- const char *field_names[NFIELDS] =
- { "Name","Longitude","Pressure","Temperature","Latitude" };
- hid_t field_type[NFIELDS];
- hid_t string_type = H5Tcopy( H5T_C_S1 );
+ hsize_t nfields_out;
+ hsize_t nrecords_out;
+ hid_t arry3_32f;
+ hid_t arry2_32f;
+ hsize_t dims;
- H5Tset_size( string_type, 16 );
+ const char *field_names[NFIELDS] = {"Name", "Longitude", "Pressure", "Temperature", "Latitude"};
+ hid_t field_type[NFIELDS];
+ hid_t string_type = H5Tcopy(H5T_C_S1);
+
+ H5Tset_size(string_type, 16);
field_type[0] = string_type;
field_type[1] = H5T_NATIVE_LONG;
field_type[2] = H5T_NATIVE_FLOAT;
@@ -457,83 +380,76 @@ static int test_table(hid_t fid, int do_write)
field_type[4] = H5T_NATIVE_INT;
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBmake_table
- * H5TBread_table
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("making table");
+ *
+ * Functions tested:
+ *
+ * H5TBmake_table
+ * H5TBread_table
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("making table");
- if (H5TBmake_table(TITLE,fid,"table1",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table1", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
PASSED();
}
- TESTING2("reading table");
+ HL_TESTING2("reading table");
/*-------------------------------------------------------------------------
- * read the table
- *-------------------------------------------------------------------------
- */
+ * read the table
+ *-------------------------------------------------------------------------
+ */
- if (H5TBread_table(fid,"table1",type_size_mem,field_offset,field_size,rbuf)<0)
+ if (H5TBread_table(fid, "table1", type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
/* compare the extracted table with the original array */
- for( i = 0; i < NRECORDS; i++ )
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ for (i = 0; i < NRECORDS; i++) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
PASSED();
-
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBwrite_records
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("writing records");
+ *
+ * Functions tested:
+ *
+ * H5TBwrite_records
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("writing records");
/* create an empty table */
- if (H5TBmake_table(TITLE,fid,"table2",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,0)<0)
+ if (H5TBmake_table(TITLE, fid, "table2", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, 0) < 0)
goto out;
/*-------------------------------------------------------------------------
- * write records, start at 0, write 8
- * pos = 0 1 2 3 4 5 6 7
- * data= 0 1 2 3 4 5 6 7
- *-------------------------------------------------------------------------
- */
- wstart=0;
- wrecords=8;
- if (H5TBwrite_records(fid,"table2",wstart,wrecords,type_size_mem,field_offset,
- field_size,wbuf)<0)
+ * write records, start at 0, write 8
+ * pos = 0 1 2 3 4 5 6 7
+ * data= 0 1 2 3 4 5 6 7
+ *-------------------------------------------------------------------------
+ */
+ wstart = 0;
+ wrecords = 8;
+ if (H5TBwrite_records(fid, "table2", wstart, wrecords, type_size_mem, field_offset, field_size,
+ wbuf) < 0)
goto out;
/* read it back */
- if (H5TBread_table(fid,"table2",type_size_mem,field_offset,field_size,rbuf)<0)
+ if (H5TBread_table(fid, "table2", type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
/* compare */
- for( i = 0; i < NRECORDS; i++ )
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ for (i = 0; i < NRECORDS; i++) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
@@ -541,147 +457,139 @@ static int test_table(hid_t fid, int do_write)
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBread_records
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBread_records
+ *
+ *-------------------------------------------------------------------------
+ */
- TESTING2("reading records");
+ HL_TESTING2("reading records");
/*-------------------------------------------------------------------------
- * read records, start at 0, read 8
- * pos = 0 1 2 3 4 5 6 7
- * data= 0 1 2 3 4 5 6 7
- *-------------------------------------------------------------------------
- */
+ * read records, start at 0, read 8
+ * pos = 0 1 2 3 4 5 6 7
+ * data= 0 1 2 3 4 5 6 7
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
- * for the read test we cannot use "table2" because it has been appended
- * we use the original "table1" instead
- *-------------------------------------------------------------------------
- */
- if(do_write)
- HDstrcpy(tname,"table2");
+ * for the read test we cannot use "table2" because it has been appended
+ * we use the original "table1" instead
+ *-------------------------------------------------------------------------
+ */
+ if (do_write)
+ HDstrcpy(tname, "table2");
else
- HDstrcpy(tname,"table1");
+ HDstrcpy(tname, "table1");
- rstart=0;
- rrecords=8;
- if (H5TBread_records(fid,tname,rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ rrecords = 8;
+ if (H5TBread_records(fid, tname, rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
/* compare */
- for( i = rstart; i < rrecords; i++)
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ for (i = rstart; i < rrecords; i++) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
PASSED();
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBappend_records
- * H5TBread_records
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("appending records");
+ *
+ * Functions tested:
+ *
+ * H5TBappend_records
+ * H5TBread_records
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("appending records");
/*-------------------------------------------------------------------------
- * append 2 records
- * pos = 0 1 2 3 4 5 6 7 8 9
- * data= 0 1 2 3 4 5 6 7 8 9
- *-------------------------------------------------------------------------
- */
- arecords=2;
- if (H5TBappend_records(fid,"table2",arecords,type_size_mem,field_offset,field_size,abuf)<0)
+ * append 2 records
+ * pos = 0 1 2 3 4 5 6 7 8 9
+ * data= 0 1 2 3 4 5 6 7 8 9
+ *-------------------------------------------------------------------------
+ */
+ arecords = 2;
+ if (H5TBappend_records(fid, "table2", arecords, type_size_mem, field_offset, field_size, abuf) < 0)
return 1;
- if (H5TBget_table_info(fid,"table2",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table2", &rfields, &rrecords) < 0)
return 1;
- rstart=0; rrecords=NRECORDS+arecords;
- if (H5TBread_records(fid,"table2",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ rrecords = NRECORDS + arecords;
+ if (H5TBread_records(fid, "table2", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
return 1;
/* compare */
- wrecords=8;
- for( i = rstart; i< wrecords; i++)
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ wrecords = 8;
+ for (i = rstart; i < wrecords; i++) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
- for( i = wrecords, j = 0; i < rrecords; i++,j++)
- {
- if (cmp_par(i,j,rbuf,abuf)<0)
+ for (i = wrecords, j = 0; i < rrecords; i++, j++) {
+ if (cmp_par(i, j, rbuf, abuf) < 0)
goto out;
}
PASSED();
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBinsert_record
- * H5TBread_records
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("inserting records");
+ *
+ * Functions tested:
+ *
+ * H5TBinsert_record
+ * H5TBread_records
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("inserting records");
/*-------------------------------------------------------------------------
- * insert 2 records
- * pos = 0 1 2 3 4 5 6 7 8 9 10 11
- * data= 0 0 0 1 2 3 4 5 6 7 8 9
- *-------------------------------------------------------------------------
- */
- istart=1; irecords=2;
- if (H5TBinsert_record(fid,"table2",istart,irecords,type_size_mem,field_offset,field_size,ibuf)<0)
+ * insert 2 records
+ * pos = 0 1 2 3 4 5 6 7 8 9 10 11
+ * data= 0 0 0 1 2 3 4 5 6 7 8 9
+ *-------------------------------------------------------------------------
+ */
+ istart = 1;
+ irecords = 2;
+ if (H5TBinsert_record(fid, "table2", istart, irecords, type_size_mem, field_offset, field_size,
+ ibuf) < 0)
return 1;
- if (H5TBget_table_info(fid,"table2",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table2", &rfields, &rrecords) < 0)
return 1;
- if (H5TBread_records(fid,"table2",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ if (H5TBread_records(fid, "table2", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
return 1;
/* compare */
- for( i = 0; i < 12; i++)
- {
- if (i < istart)
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ for (i = 0; i < 12; i++) {
+ if (i < istart) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
- else if (i >= istart && i < istart + irecords)
- {
+ else if (i >= istart && i < istart + irecords) {
j = i - istart;
- if (cmp_par(i,j,rbuf,ibuf)<0)
+ if (cmp_par(i, j, rbuf, ibuf) < 0)
goto out;
}
- else if ( i >= istart + irecords && i < 10 )
- {
+ else if (i >= istart + irecords && i < 10) {
j = i - irecords;
- if (cmp_par(i,j,rbuf,wbuf)<0)
+ if (cmp_par(i, j, rbuf, wbuf) < 0)
goto out;
}
- else
- {
+ else {
j = i - 10;
- if (cmp_par(i,j,rbuf,abuf)<0)
+ if (cmp_par(i, j, rbuf, abuf) < 0)
goto out;
}
}
@@ -689,198 +597,192 @@ static int test_table(hid_t fid, int do_write)
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBdelete_record
- * H5TBread_records
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("deleting records");
+ *
+ * Functions tested:
+ *
+ * H5TBdelete_record
+ * H5TBread_records
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("deleting records");
/*-------------------------------------------------------------------------
- * Create a table
- * pos = 0 1 2 3 4 5 6 7
- * data= 0 1 2 3 4 5 6 7
- *-------------------------------------------------------------------------
- */
-
- for( i=0; i<NRECORDS; i++)
- {
- wbufd[i].lati = wbuf[i].lati;
- wbufd[i].longi = wbuf[i].longi;
- wbufd[i].pressure = wbuf[i].pressure;
+ * Create a table
+ * pos = 0 1 2 3 4 5 6 7
+ * data= 0 1 2 3 4 5 6 7
+ *-------------------------------------------------------------------------
+ */
+
+ for (i = 0; i < NRECORDS; i++) {
+ wbufd[i].lati = wbuf[i].lati;
+ wbufd[i].longi = wbuf[i].longi;
+ wbufd[i].pressure = wbuf[i].pressure;
wbufd[i].temperature = wbuf[i].temperature;
- HDstrcpy(wbufd[i].name, wbuf[i].name );
-
+ HDstrcpy(wbufd[i].name, wbuf[i].name);
}
-
- if (H5TBmake_table(TITLE,fid,"table3",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbufd)<0)
+ if (H5TBmake_table(TITLE, fid, "table3", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbufd) < 0)
goto out;
/*-------------------------------------------------------------------------
- * Delete records, start at 2, delete 3
- * pos = 0 1 2 3 4
- * data= 0 1 5 6 7
- *-------------------------------------------------------------------------
- */
- dstart=2; drecords=3;
- if (H5TBdelete_record(fid,"table3",dstart,drecords)<0)
+ * Delete records, start at 2, delete 3
+ * pos = 0 1 2 3 4
+ * data= 0 1 5 6 7
+ *-------------------------------------------------------------------------
+ */
+ dstart = 2;
+ drecords = 3;
+ if (H5TBdelete_record(fid, "table3", dstart, drecords) < 0)
goto out;
- if (H5TBget_table_info(fid,"table3",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table3", &rfields, &rrecords) < 0)
goto out;
- rstart=0;
- if (H5TBread_records(fid,"table3",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ if (H5TBread_records(fid, "table3", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
goto out;
/* compare */
- nrecords=NRECORDS;
- assert(rrecords == nrecords-drecords);
- if (compare_deleted(rrecords,dstart,drecords,rbuf,wbufd)<0)
+ nrecords = NRECORDS;
+ assert(rrecords == nrecords - drecords);
+ if (compare_deleted(rrecords, dstart, drecords, rbuf, wbufd) < 0)
goto out;
/*-------------------------------------------------------------------------
- * reset compare buffer
- *-------------------------------------------------------------------------
- */
- nrecords=rrecords;
- for( i=0; i<nrecords; i++)
- {
+ * reset compare buffer
+ *-------------------------------------------------------------------------
+ */
+ nrecords = rrecords;
+ for (i = 0; i < nrecords; i++) {
wbufd[i] = rbuf[i];
}
/*-------------------------------------------------------------------------
- * Delete records, start at 0, delete 2
- * pos = 0 1 2
- * data= 5 6 7
- *-------------------------------------------------------------------------
- */
- dstart=0; drecords=2;
- if (H5TBdelete_record(fid,"table3",dstart,drecords)<0)
+ * Delete records, start at 0, delete 2
+ * pos = 0 1 2
+ * data= 5 6 7
+ *-------------------------------------------------------------------------
+ */
+ dstart = 0;
+ drecords = 2;
+ if (H5TBdelete_record(fid, "table3", dstart, drecords) < 0)
goto out;
- if (H5TBget_table_info(fid,"table3",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table3", &rfields, &rrecords) < 0)
goto out;
- rstart=0;
- if (H5TBread_records(fid,"table3",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ if (H5TBread_records(fid, "table3", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
goto out;
/* Compare */
- assert(rrecords == nrecords-drecords);
- if (compare_deleted(rrecords,dstart,drecords,rbuf,wbufd)<0)
+ assert(rrecords == nrecords - drecords);
+ if (compare_deleted(rrecords, dstart, drecords, rbuf, wbufd) < 0)
goto out;
/*-------------------------------------------------------------------------
- * reset compare buffer
- *-------------------------------------------------------------------------
- */
- nrecords=rrecords;
- for( i=0; i<nrecords; i++)
- {
+ * reset compare buffer
+ *-------------------------------------------------------------------------
+ */
+ nrecords = rrecords;
+ for (i = 0; i < nrecords; i++) {
wbufd[i] = rbuf[i];
}
/*-------------------------------------------------------------------------
- * Delete records, start at 1, delete 1
- * pos = 0 1
- * data= 5 7
- *-------------------------------------------------------------------------
- */
- dstart=1; drecords=1;
- if (H5TBdelete_record(fid,"table3",dstart,drecords)<0)
+ * Delete records, start at 1, delete 1
+ * pos = 0 1
+ * data= 5 7
+ *-------------------------------------------------------------------------
+ */
+ dstart = 1;
+ drecords = 1;
+ if (H5TBdelete_record(fid, "table3", dstart, drecords) < 0)
goto out;
- if (H5TBget_table_info(fid,"table3",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table3", &rfields, &rrecords) < 0)
goto out;
- rstart=0;
- if (H5TBread_records(fid,"table3",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ if (H5TBread_records(fid, "table3", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
goto out;
/* Compare */
- assert(rrecords == nrecords-drecords);
- if (compare_deleted(rrecords,dstart,drecords,rbuf,wbufd)<0)
+ assert(rrecords == nrecords - drecords);
+ if (compare_deleted(rrecords, dstart, drecords, rbuf, wbufd) < 0)
goto out;
/*-------------------------------------------------------------------------
- * reset compare buffer
- *-------------------------------------------------------------------------
- */
- nrecords=rrecords;
- for( i=0; i<nrecords; i++)
- {
+ * reset compare buffer
+ *-------------------------------------------------------------------------
+ */
+ nrecords = rrecords;
+ for (i = 0; i < nrecords; i++) {
wbufd[i] = rbuf[i];
}
/*-------------------------------------------------------------------------
- * Delete records, start at 0, delete 1
- * pos = 0
- * data= 7
- *-------------------------------------------------------------------------
- */
- dstart=0; drecords=1;
- if (H5TBdelete_record(fid,"table3",dstart,drecords)<0)
+ * Delete records, start at 0, delete 1
+ * pos = 0
+ * data= 7
+ *-------------------------------------------------------------------------
+ */
+ dstart = 0;
+ drecords = 1;
+ if (H5TBdelete_record(fid, "table3", dstart, drecords) < 0)
goto out;
- if (H5TBget_table_info(fid,"table3",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table3", &rfields, &rrecords) < 0)
goto out;
- rstart=0;
- if (H5TBread_records(fid,"table3",rstart,rrecords,type_size_mem,field_offset,
- field_size,rbuf)<0)
+ rstart = 0;
+ if (H5TBread_records(fid, "table3", rstart, rrecords, type_size_mem, field_offset, field_size, rbuf) <
+ 0)
goto out;
/* Compare */
- assert(rrecords == nrecords-drecords);
- if (compare_deleted(rrecords,dstart,drecords,rbuf,wbufd)<0)
+ assert(rrecords == nrecords - drecords);
+ if (compare_deleted(rrecords, dstart, drecords, rbuf, wbufd) < 0)
goto out;
/*-------------------------------------------------------------------------
- * reset compare buffer
- *-------------------------------------------------------------------------
- */
- nrecords=rrecords;
- for( i=0; i<nrecords; i++)
- {
+ * reset compare buffer
+ *-------------------------------------------------------------------------
+ */
+ nrecords = rrecords;
+ for (i = 0; i < nrecords; i++) {
wbufd[i] = rbuf[i];
}
/* Read complete table */
- if (H5TBread_table(fid,"table3",type_size_mem,field_offset,field_size,rbuf)<0)
+ if (H5TBread_table(fid, "table3", type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
/* Compare */
- for( i=0; i<rrecords; i++)
- {
- if (cmp_par(i,i,rbuf,wbufd)<0)
- {
+ for (i = 0; i < rrecords; i++) {
+ if (cmp_par(i, i, rbuf, wbufd) < 0) {
goto out;
}
}
/*-------------------------------------------------------------------------
- * Delete records, start at 0, delete 1
- * pos = 0
- * data= empty
- *-------------------------------------------------------------------------
- */
- dstart=0; drecords=1;
- if (H5TBdelete_record(fid,"table3",dstart,drecords)<0)
+ * Delete records, start at 0, delete 1
+ * pos = 0
+ * data= empty
+ *-------------------------------------------------------------------------
+ */
+ dstart = 0;
+ drecords = 1;
+ if (H5TBdelete_record(fid, "table3", dstart, drecords) < 0)
goto out;
- if (H5TBget_table_info(fid,"table3",&rfields,&rrecords)<0)
+ if (H5TBget_table_info(fid, "table3", &rfields, &rrecords) < 0)
goto out;
if (rrecords)
@@ -892,109 +794,102 @@ static int test_table(hid_t fid, int do_write)
/*------------------------------------------------------------------------
* Functions tested:
*
- * H5TBdelete_record -- With differing memory layout from machine memory
+ * H5TBdelete_record -- With differing memory layout from machine memory
* layout. HDFFV-8055
*
*-------------------------------------------------------------------------
*/
- if (do_write)
- {
- TESTING2("deleting records (differing memory layout)");
-
- dims = 3;
- arry3_32f = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, &dims);
-
- dims = 2;
- arry2_32f = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, &dims);
-
- /* Initialize the field field_type */
- field_type4[0] = H5T_NATIVE_UINT32;
- field_type4[1] = H5T_NATIVE_DOUBLE;
- field_type4[2] = H5T_NATIVE_DOUBLE;
- field_type4[3] = arry3_32f;
- field_type4[4] = arry3_32f;
- field_type4[5] = arry2_32f;
-
- /* Make the table */
- if (H5TBmake_table("Table Title",fid,"table",NFIELDS+1,(hsize_t)NRECORDS,
- tbl_size, field_names4, tbl_offset, field_type4,
- chunk_size, fill_data, compress, p_data)<0)
- goto out;
- /* Delete records */
- start = 3;
- nrecords = 3;
- if (H5TBdelete_record(fid, "table", start, nrecords)<0)
- goto out;;
- /* Get table info */
- if (H5TBget_table_info(fid,"table", &nfields_out, &nrecords_out)<0)
- goto out;
- /* check */
- if( (int)nfields_out != (int)NFIELDS+1)
- goto out;
-
- if( (int)nrecords_out != (int)NRECORDS-3)
- goto out;
-
- /* close type */
- H5Tclose(arry3_32f);
- H5Tclose(arry2_32f);
-
- PASSED();
+ if (do_write) {
+ HL_TESTING2("deleting records (differing memory layout)");
+
+ dims = 3;
+ arry3_32f = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, &dims);
+
+ dims = 2;
+ arry2_32f = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, &dims);
+
+ /* Initialize the field field_type */
+ field_type4[0] = H5T_NATIVE_UINT32;
+ field_type4[1] = H5T_NATIVE_DOUBLE;
+ field_type4[2] = H5T_NATIVE_DOUBLE;
+ field_type4[3] = arry3_32f;
+ field_type4[4] = arry3_32f;
+ field_type4[5] = arry2_32f;
+
+ /* Make the table */
+ if (H5TBmake_table("Table Title", fid, "table", NFIELDS + 1, (hsize_t)NRECORDS, tbl_size,
+ field_names4, tbl_offset, field_type4, chunk_size, fill_data, compress,
+ p_data) < 0)
+ goto out;
+ /* Delete records */
+ start = 3;
+ nrecords = 3;
+ if (H5TBdelete_record(fid, "table", start, nrecords) < 0)
+ goto out;
+ ;
+ /* Get table info */
+ if (H5TBget_table_info(fid, "table", &nfields_out, &nrecords_out) < 0)
+ goto out;
+ /* check */
+ if ((int)nfields_out != (int)NFIELDS + 1)
+ goto out;
+
+ if ((int)nrecords_out != (int)NRECORDS - 3)
+ goto out;
+
+ /* close type */
+ H5Tclose(arry3_32f);
+ H5Tclose(arry2_32f);
+
+ PASSED();
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBadd_records_from
- * H5TBread_records
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBadd_records_from
+ * H5TBread_records
+ *
+ *-------------------------------------------------------------------------
+ */
- if (do_write)
- {
- TESTING2("adding records");
+ if (do_write) {
+ HL_TESTING2("adding records");
/* create 2 tables */
- if (H5TBmake_table(TITLE,fid,"table4",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table4", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
- if (H5TBmake_table(TITLE,fid,"table5",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table5", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
/* add the records from "table4" to "table5" */
- start1 = 3;
- nrecords = 2;
- start2 = 6;
- if ( H5TBadd_records_from(fid,"table4",start1,nrecords,"table5",start2)<0)
+ start1 = 3;
+ nrecords = 2;
+ start2 = 6;
+ if (H5TBadd_records_from(fid, "table4", start1, nrecords, "table5", start2) < 0)
goto out;
/* read final table */
- if (H5TBread_table(fid,"table5",type_size_mem,field_offset,field_size,rbuf)<0)
+ if (H5TBread_table(fid, "table5", type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
/* compare */
- for( i = 0; i < NRECORDS+2; i++ )
- {
- if ( i < start2 )
- {
- if (cmp_par(i,i,rbuf,wbuf)<0)
+ for (i = 0; i < NRECORDS + 2; i++) {
+ if (i < start2) {
+ if (cmp_par(i, i, rbuf, wbuf) < 0)
goto out;
}
- else if ( i < start2 + nrecords )
- {
+ else if (i < start2 + nrecords) {
j = i - start1;
- if (cmp_par(i,j,rbuf,wbuf)<0)
+ if (cmp_par(i, j, rbuf, wbuf) < 0)
goto out;
}
- else
- {
+ else {
j = i - nrecords;
- if (cmp_par(i,j,rbuf,wbuf)<0)
+ if (cmp_par(i, j, rbuf, wbuf) < 0)
goto out;
}
}
@@ -1003,90 +898,79 @@ static int test_table(hid_t fid, int do_write)
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBcombine_tables
- * H5TBread_table
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBcombine_tables
+ * H5TBread_table
+ *
+ *-------------------------------------------------------------------------
+ */
- if (do_write)
- {
- TESTING2("combining tables");
+ if (do_write) {
+ HL_TESTING2("combining tables");
/* create 2 tables */
- if (H5TBmake_table(TITLE,fid,"table6",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table6", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
- if (H5TBmake_table(TITLE,fid,"table7",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table7", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
/* combine the two tables into a third */
- if ( H5TBcombine_tables(fid,"table6",fid,"table7","table8")<0)
+ if (H5TBcombine_tables(fid, "table6", fid, "table7", "table8") < 0)
goto out;
/* read merged table */
- if (H5TBread_table(fid,"table8",type_size_mem,field_offset,field_size,rbufc)<0)
+ if (H5TBread_table(fid, "table8", type_size_mem, field_offset, field_size, rbufc) < 0)
goto out;
/* compare */
- for( i = 0; i < NRECORDS*2; i++ )
- {
- if ( i < NRECORDS )
- {
- if (cmp_par(i,i,rbufc,wbuf)<0)
+ for (i = 0; i < NRECORDS * 2; i++) {
+ if (i < NRECORDS) {
+ if (cmp_par(i, i, rbufc, wbuf) < 0)
goto out;
}
- else
- {
- if (cmp_par(i,i-NRECORDS,rbufc,wbuf)<0)
+ else {
+ if (cmp_par(i, i - NRECORDS, rbufc, wbuf) < 0)
goto out;
}
}
/*-------------------------------------------------------------------------
- * multi file test
- *-------------------------------------------------------------------------
- */
+ * multi file test
+ *-------------------------------------------------------------------------
+ */
/* create 2 files using default properties. */
- fid1 = H5Fcreate("combine_tables1.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
- fid2 = H5Fcreate("combine_tables2.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
+ fid1 = H5Fcreate("combine_tables1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid2 = H5Fcreate("combine_tables2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* create 2 tables, one in each file */
- if (H5TBmake_table(TITLE,fid1,"table1",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid1, "table1", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
- if (H5TBmake_table(TITLE,fid2,"table2",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid2, "table2", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
/* combine the two tables into a third */
- if ( H5TBcombine_tables(fid1,"table1",fid2,"table2","table3")<0)
+ if (H5TBcombine_tables(fid1, "table1", fid2, "table2", "table3") < 0)
goto out;
/* read merged table */
- if (H5TBread_table(fid1,"table3",type_size_mem,field_offset,field_size,rbufc)<0)
+ if (H5TBread_table(fid1, "table3", type_size_mem, field_offset, field_size, rbufc) < 0)
goto out;
/* compare */
- for( i = 0; i < NRECORDS*2; i++ )
- {
- if ( i < NRECORDS )
- {
- if (cmp_par(i,i,rbufc,wbuf)<0)
+ for (i = 0; i < NRECORDS * 2; i++) {
+ if (i < NRECORDS) {
+ if (cmp_par(i, i, rbufc, wbuf) < 0)
goto out;
}
- else
- {
- if (cmp_par(i,i-NRECORDS,rbufc,wbuf)<0)
+ else {
+ if (cmp_par(i, i - NRECORDS, rbufc, wbuf) < 0)
goto out;
}
}
@@ -1098,98 +982,87 @@ static int test_table(hid_t fid, int do_write)
PASSED();
}
-
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBwrite_fields_name
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("writing fields by name");
+ *
+ * Functions tested:
+ *
+ * H5TBwrite_fields_name
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("writing fields by name");
/* make an empty table with fill values */
- if (H5TBmake_table(TITLE,fid,"table9",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill1,compress,0)<0)
+ if (H5TBmake_table(TITLE, fid, "table9", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill1, compress, 0) < 0)
goto out;
/* write the pressure field starting at record 2 */
start = 2;
nrecords = NRECORDS_ADD;
- if (H5TBwrite_fields_name(fid,"table9","Pressure",start,nrecords,sizeof(float),
- 0,field_sizes_pre,pressure_in)<0)
+ if (H5TBwrite_fields_name(fid, "table9", "Pressure", start, nrecords, sizeof(float), 0,
+ field_sizes_pre, pressure_in) < 0)
goto out;
/* write the new longitude and latitude information starting at record 2 */
start = 2;
nrecords = 3;
- if (H5TBwrite_fields_name(fid,"table9","Latitude,Longitude",start,nrecords,sizeof(position_t),
- field_offset_pos,field_sizes_pos,position_in)<0)
+ if (H5TBwrite_fields_name(fid, "table9", "Latitude,Longitude", start, nrecords, sizeof(position_t),
+ field_offset_pos, field_sizes_pos, position_in) < 0)
goto out;
/* read back the all table */
start = 0;
nrecords = NRECORDS;
- if (H5TBread_table(fid,"table9",type_size_mem,field_offset,field_size,rbuf)<0)
+ if (H5TBread_table(fid, "table9", type_size_mem, field_offset, field_size, rbuf) < 0)
goto out;
{
-
/* compare the read values with the initial values */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( i >= 2 && i <= 4 )
- {
- if ( rbuf[i].lati != position_in[i-NRECORDS_ADD+1].lati ||
- rbuf[i].longi != position_in[i-NRECORDS_ADD+1].longi ||
- !FLT_ABS_EQUAL(rbuf[i].pressure,pressure_in[i-NRECORDS_ADD+1]) )
- {
- HDfprintf(stderr,"%ld %f %d\n",
- rbuf[i].longi,(double)rbuf[i].pressure,rbuf[i].lati);
- HDfprintf(stderr,"%ld %f %d\n",
- position_in[i].longi,(double)pressure_in[i],position_in[i].lati);
+ for (i = 0; i < NRECORDS; i++) {
+ if (i >= 2 && i <= 4) {
+ if (rbuf[i].lati != position_in[i - NRECORDS_ADD + 1].lati ||
+ rbuf[i].longi != position_in[i - NRECORDS_ADD + 1].longi ||
+ !H5_FLT_ABS_EQUAL(rbuf[i].pressure, pressure_in[i - NRECORDS_ADD + 1])) {
+ HDfprintf(stderr, "%ld %f %d\n", rbuf[i].longi, (double)rbuf[i].pressure,
+ rbuf[i].lati);
+ HDfprintf(stderr, "%ld %f %d\n", position_in[i].longi, (double)pressure_in[i],
+ position_in[i].lati);
goto out;
}
}
}
}
-
-
PASSED();
} /*write*/
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBread_fields_name
- *
- *-------------------------------------------------------------------------
- */
- TESTING2("reading fields by name");
+ *
+ * Functions tested:
+ *
+ * H5TBread_fields_name
+ *
+ *-------------------------------------------------------------------------
+ */
+ HL_TESTING2("reading fields by name");
/*-------------------------------------------------------------------------
- * write and read the "Pressure" field
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- if (H5TBmake_table(TITLE,fid,"table10",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill1,compress,0)<0)
+ * write and read the "Pressure" field
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ if (H5TBmake_table(TITLE, fid, "table10", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill1, compress, 0) < 0)
goto out;
/* write the pressure field to all the records */
start = 0;
nrecords = NRECORDS;
- if ( H5TBwrite_fields_name(fid,"table10","Pressure",start,nrecords,
- sizeof( float ),0,field_sizes_pre,pressure_in)<0)
+ if (H5TBwrite_fields_name(fid, "table10", "Pressure", start, nrecords, sizeof(float), 0,
+ field_sizes_pre, pressure_in) < 0)
goto out;
}
@@ -1197,170 +1070,149 @@ static int test_table(hid_t fid, int do_write)
nrecords = NRECORDS;
/* read an invalid field, should fail */
- if ( H5TBread_fields_name(fid,"table10","DoesNotExist",start,nrecords,
- sizeof(float),0,field_sizes_pre,pressure_out) >=0)
- goto out;
-
+ if (H5TBread_fields_name(fid, "table10", "DoesNotExist", start, nrecords, sizeof(float), 0,
+ field_sizes_pre, pressure_out) >= 0)
+ goto out;
+
/* read the "Pressure" field */
- if ( H5TBread_fields_name(fid,"table10","Pressure",start,nrecords,
- sizeof(float),0,field_sizes_pre,pressure_out)<0)
+ if (H5TBread_fields_name(fid, "table10", "Pressure", start, nrecords, sizeof(float), 0, field_sizes_pre,
+ pressure_out) < 0)
goto out;
/* Compare the extracted table with the initial values */
- for ( i = 0; i < NRECORDS; i++ )
- {
- if ( !FLT_ABS_EQUAL(pressure_out[i], pressure_in[i]) ) {
+ for (i = 0; i < NRECORDS; i++) {
+ if (!H5_FLT_ABS_EQUAL(pressure_out[i], pressure_in[i])) {
goto out;
}
}
/*-------------------------------------------------------------------------
- * Write and read the "Latitude,Longitude" fields
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
+ * Write and read the "Latitude,Longitude" fields
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
/* Write the new longitude and latitude information to all the records */
start = 0;
nrecords = NRECORDS_ADD;
- if ( H5TBwrite_fields_name(fid,"table10", "Latitude,Longitude", start, nrecords,
- sizeof( position_t ), field_offset_pos, field_sizes_pos, position_in ) < 0 )
+ if (H5TBwrite_fields_name(fid, "table10", "Latitude,Longitude", start, nrecords, sizeof(position_t),
+ field_offset_pos, field_sizes_pos, position_in) < 0)
goto out;
- }/*write*/
+ } /*write*/
/* Read the "Latitude,Longitude" fields */
start = 0;
nrecords = NRECORDS_ADD;
- if ( H5TBread_fields_name( fid, "table10", "Latitude,Longitude",
- start, nrecords, sizeof(position_t), field_offset_pos, field_sizes_pos, position_out ) < 0 )
+ if (H5TBread_fields_name(fid, "table10", "Latitude,Longitude", start, nrecords, sizeof(position_t),
+ field_offset_pos, field_sizes_pos, position_out) < 0)
goto out;
-
/* Compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS_ADD; i++ )
- {
- if ( position_out[i].lati != position_in[i].lati ||
- position_out[i].longi != position_in[i].longi )
+ for (i = 0; i < NRECORDS_ADD; i++) {
+ if (position_out[i].lati != position_in[i].lati || position_out[i].longi != position_in[i].longi)
goto out;
}
-
/*-------------------------------------------------------------------------
- * Write and read the "Name,Pressure" fields
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
+ * Write and read the "Name,Pressure" fields
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
/* Write the new name and pressure information to all the records */
start = 0;
nrecords = NRECORDS;
- if ( H5TBwrite_fields_name( fid, "table10", "Name,Pressure", start, nrecords,
- sizeof( namepressure_t ), field_offset_namepre, field_sizes_namepre, namepre_in ) < 0 )
+ if (H5TBwrite_fields_name(fid, "table10", "Name,Pressure", start, nrecords, sizeof(namepressure_t),
+ field_offset_namepre, field_sizes_namepre, namepre_in) < 0)
goto out;
- }/*write*/
+ } /*write*/
/* Read the "Name,Pressure" fields */
start = 0;
nrecords = NRECORDS;
- if ( H5TBread_fields_name( fid, "table10", "Name,Pressure",
- start, nrecords, sizeof(namepressure_t), field_offset_namepre, field_sizes_namepre,
- namepre_out ) < 0 )
+ if (H5TBread_fields_name(fid, "table10", "Name,Pressure", start, nrecords, sizeof(namepressure_t),
+ field_offset_namepre, field_sizes_namepre, namepre_out) < 0)
goto out;
-
/* Compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( ( HDstrcmp( namepre_out[i].name, namepre_in[i].name ) != 0 ) ||
- !FLT_ABS_EQUAL(namepre_out[i].pressure,namepre_in[i].pressure) ) {
- goto out;
+ for (i = 0; i < NRECORDS; i++) {
+ if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
+ !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) {
+ goto out;
}
}
/* reset buffer */
- for( i = 0; i < NRECORDS; i++ )
- {
- HDstrcpy( namepre_out[i].name, "\0" );
+ for (i = 0; i < NRECORDS; i++) {
+ HDstrcpy(namepre_out[i].name, "\0");
namepre_out[i].pressure = -1;
}
/*-------------------------------------------------------------------------
- * read only 3 records of the "Name,Pressure" fields, starting at record 2
- *-------------------------------------------------------------------------
- */
+ * read only 3 records of the "Name,Pressure" fields, starting at record 2
+ *-------------------------------------------------------------------------
+ */
start = 2;
nrecords = 3;
- if ( H5TBread_fields_name( fid, "table10", "Name,Pressure",
- start, nrecords, sizeof(namepressure_t), field_offset_namepre,
- field_sizes_namepre, namepre_out ) < 0 )
+ if (H5TBread_fields_name(fid, "table10", "Name,Pressure", start, nrecords, sizeof(namepressure_t),
+ field_offset_namepre, field_sizes_namepre, namepre_out) < 0)
goto out;
-
/* Compare the extracted table with the initial values */
- for( i = 0; i < 3; i++ )
- {
+ for (i = 0; i < 3; i++) {
hsize_t iistart = start;
- if ( ( HDstrcmp( namepre_out[i].name, namepre_in[iistart+i].name ) != 0 ) ||
- !FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[iistart+i].pressure) ) {
- goto out;
+ if ((HDstrcmp(namepre_out[i].name, namepre_in[iistart + i].name) != 0) ||
+ !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[iistart + i].pressure)) {
+ goto out;
}
}
-
-
PASSED();
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBwrite_fields_index
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("writing fields by index");
+ *
+ * Functions tested:
+ *
+ * H5TBwrite_fields_index
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("writing fields by index");
/* make an empty table */
- if (H5TBmake_table(TITLE,fid,"table11",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,NULL)<0)
+ if (H5TBmake_table(TITLE, fid, "table11", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, NULL) < 0)
goto out;
/* write the pressure field starting at record 2 */
nfields = 1;
start = 2;
nrecords = NRECORDS_ADD;
- if ( H5TBwrite_fields_index(fid, "table11", nfields, field_index_pre, start, nrecords,
- sizeof( float ), 0, field_sizes_pre, pressure_in ) < 0 )
+ if (H5TBwrite_fields_index(fid, "table11", nfields, field_index_pre, start, nrecords, sizeof(float),
+ 0, field_sizes_pre, pressure_in) < 0)
goto out;
-
/* write the new longitude and latitude information starting at record 2 */
nfields = 2;
start = 2;
nrecords = NRECORDS_ADD;
- if ( H5TBwrite_fields_index(fid, "table11", nfields, field_index_pos, start, nrecords,
- sizeof( position_t ), field_offset_pos, field_sizes_pos, position_in ) < 0 )
+ if (H5TBwrite_fields_index(fid, "table11", nfields, field_index_pos, start, nrecords,
+ sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0)
goto out;
/* read back the all table */
nfields = 5;
start = 0;
nrecords = NRECORDS;
- if ( H5TBread_fields_index(fid, "table11", nfields, field_index,
- start, nrecords, type_size_mem, field_offset, field_size, rbuf ) < 0 )
+ if (H5TBread_fields_index(fid, "table11", nfields, field_index, start, nrecords, type_size_mem,
+ field_offset, field_size, rbuf) < 0)
goto out;
/* Compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( i >= 2 && i <= 4 )
- {
- if ( rbuf[i].lati != position_in[i-NRECORDS_ADD+1].lati ||
- rbuf[i].longi != position_in[i-NRECORDS_ADD+1].longi ||
- !FLT_ABS_EQUAL(rbuf[i].pressure,pressure_in[i-NRECORDS_ADD+1]) )
+ for (i = 0; i < NRECORDS; i++) {
+ if (i >= 2 && i <= 4) {
+ if (rbuf[i].lati != position_in[i - NRECORDS_ADD + 1].lati ||
+ rbuf[i].longi != position_in[i - NRECORDS_ADD + 1].longi ||
+ !H5_FLT_ABS_EQUAL(rbuf[i].pressure, pressure_in[i - NRECORDS_ADD + 1]))
goto out;
}
}
@@ -1368,37 +1220,34 @@ static int test_table(hid_t fid, int do_write)
PASSED();
}
-
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBread_fields_index
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBread_fields_index
+ *
+ *-------------------------------------------------------------------------
+ */
- TESTING2("reading fields by index");
+ HL_TESTING2("reading fields by index");
- if (do_write)
- {
+ if (do_write) {
/* make an empty table */
- if (H5TBmake_table(TITLE,fid,"table12",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,NULL)<0)
+ if (H5TBmake_table(TITLE, fid, "table12", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, NULL) < 0)
goto out;
/*-------------------------------------------------------------------------
- * write and read the "Pressure" field
- *-------------------------------------------------------------------------
- */
+ * write and read the "Pressure" field
+ *-------------------------------------------------------------------------
+ */
/* write the pressure field to all the records */
nfields = 1;
start = 0;
nrecords = NRECORDS;
- if ( H5TBwrite_fields_index(fid, "table12", nfields, field_index_pre, start, nrecords,
- sizeof( float ), 0, field_sizes_pre, pressure_in ) < 0 )
+ if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pre, start, nrecords, sizeof(float),
+ 0, field_sizes_pre, pressure_in) < 0)
goto out;
}
@@ -1406,196 +1255,178 @@ static int test_table(hid_t fid, int do_write)
nfields = 1;
start = 0;
nrecords = NRECORDS;
- if ( H5TBread_fields_index(fid, "table12", nfields, field_index_pre,
- start, nrecords, sizeof(float), 0, field_sizes_pre, pressure_out ) < 0 )
+ if (H5TBread_fields_index(fid, "table12", nfields, field_index_pre, start, nrecords, sizeof(float), 0,
+ field_sizes_pre, pressure_out) < 0)
goto out;
/* compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( !FLT_ABS_EQUAL(pressure_out[i], pressure_in[i]) ) {
+ for (i = 0; i < NRECORDS; i++) {
+ if (!H5_FLT_ABS_EQUAL(pressure_out[i], pressure_in[i])) {
goto out;
}
}
/*-------------------------------------------------------------------------
- * write and read the "Latitude,Longitude" fields
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
+ * write and read the "Latitude,Longitude" fields
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
/* write the new longitude and latitude information to all the records */
- nfields = 2;
+ nfields = 2;
start = 0;
nrecords = NRECORDS;
- if ( H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords,
- sizeof( position_t ), field_offset_pos, field_sizes_pos, position_in ) < 0 )
+ if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords,
+ sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0)
goto out;
} /*write*/
/* read the "Latitude,Longitude" fields */
- nfields = 2;
+ nfields = 2;
start = 0;
nrecords = NRECORDS_ADD;
- if ( H5TBread_fields_index(fid, "table12", nfields, field_index_pos,
- start, nrecords, sizeof(position_t), field_offset_pos, field_sizes_pos, position_out ) < 0 )
+ if (H5TBread_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords, sizeof(position_t),
+ field_offset_pos, field_sizes_pos, position_out) < 0)
goto out;
/* compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS_ADD; i++ )
- {
- if ( position_out[i].lati != position_in[i].lati ||
- position_out[i].longi != position_in[i].longi ) {
- goto out;
+ for (i = 0; i < NRECORDS_ADD; i++) {
+ if (position_out[i].lati != position_in[i].lati || position_out[i].longi != position_in[i].longi) {
+ goto out;
}
}
/*-------------------------------------------------------------------------
- * write and read the "Name,Pressure" fields
- *-------------------------------------------------------------------------
- */
+ * write and read the "Name,Pressure" fields
+ *-------------------------------------------------------------------------
+ */
- if (do_write)
- {
+ if (do_write) {
/* write the new name and pressure information to all the records */
- nfields = 2;
+ nfields = 2;
start = 0;
nrecords = NRECORDS;
- if ( H5TBwrite_fields_index(fid, "table12", nfields, field_index_namepre, start, nrecords,
- sizeof( namepressure_t ), field_offset_namepre, field_sizes_namepre, namepre_in ) < 0 )
+ if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_namepre, start, nrecords,
+ sizeof(namepressure_t), field_offset_namepre, field_sizes_namepre,
+ namepre_in) < 0)
goto out;
}
/* read the "Name,Pressure" fields */
- nfields = 2;
+ nfields = 2;
start = 0;
nrecords = NRECORDS;
- if ( H5TBread_fields_index(fid, "table12", nfields, field_index_namepre,
- start, nrecords, sizeof(namepressure_t), field_offset_namepre,
- field_sizes_namepre, namepre_out ) < 0 )
+ if (H5TBread_fields_index(fid, "table12", nfields, field_index_namepre, start, nrecords,
+ sizeof(namepressure_t), field_offset_namepre, field_sizes_namepre,
+ namepre_out) < 0)
goto out;
/* compare the extracted table with the initial values */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( ( HDstrcmp( namepre_out[i].name, namepre_in[i].name ) != 0 ) ||
- !FLT_ABS_EQUAL(namepre_out[i].pressure,namepre_in[i].pressure) ) {
- goto out;
- }
+ for (i = 0; i < NRECORDS; i++) {
+ if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
+ !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) {
+ goto out;
+ }
}
/* reset buffer */
- for( i = 0; i < NRECORDS; i++ )
- {
- HDstrcpy( namepre_out[i].name, "\0" );
+ for (i = 0; i < NRECORDS; i++) {
+ HDstrcpy(namepre_out[i].name, "\0");
namepre_out[i].pressure = -1;
}
/*-------------------------------------------------------------------------
- * read only 3 records of the "Name,Pressure" fields, starting at record 2
- *-------------------------------------------------------------------------
- */
+ * read only 3 records of the "Name,Pressure" fields, starting at record 2
+ *-------------------------------------------------------------------------
+ */
/* write the new name and pressure information to all the records */
nfields = 2;
start = 2;
nrecords = 3;
- if ( H5TBread_fields_index(fid, "table12", nfields, field_index_namepre,
- start, nrecords, sizeof(namepressure_t), field_offset_namepre,
- field_sizes_namepre, namepre_out ) < 0 )
+ if (H5TBread_fields_index(fid, "table12", nfields, field_index_namepre, start, nrecords,
+ sizeof(namepressure_t), field_offset_namepre, field_sizes_namepre,
+ namepre_out) < 0)
goto out;
/* compare the extracted table with the initial values */
- for( i = 0; i < 3; i++ )
- {
- int iistart = (int) start;
- if ( ( HDstrcmp( namepre_out[i].name, wbuf[iistart+(int)i].name ) != 0 ) ||
- !FLT_ABS_EQUAL(namepre_out[i].pressure, wbuf[iistart+(int)i].pressure) ) {
- goto out;
+ for (i = 0; i < 3; i++) {
+ int iistart = (int)start;
+ if ((HDstrcmp(namepre_out[i].name, wbuf[iistart + (int)i].name) != 0) ||
+ !H5_FLT_ABS_EQUAL(namepre_out[i].pressure, wbuf[iistart + (int)i].pressure)) {
+ goto out;
}
}
PASSED();
-
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBinsert_field
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBinsert_field
+ *
+ *-------------------------------------------------------------------------
+ */
- if (do_write)
- {
- TESTING2("inserting fields");
+ if (do_write) {
+ HL_TESTING2("inserting fields");
/* make a table */
- if (H5TBmake_table(TITLE,fid,"table13",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill1,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table13", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill1, compress, wbuf) < 0)
goto out;
/* insert the new field at the end of the field list */
position = NFIELDS;
- if ( H5TBinsert_field( fid, "table13", "New Field", field_type_new, position,
- fill1_new, buf_new ) < 0 )
+ if (H5TBinsert_field(fid, "table13", "New Field", field_type_new, position, fill1_new, buf_new) < 0)
goto out;
/* read the table */
- if ( H5TBread_table( fid, "table13", dst_size2, dst_offset2, dst_sizes2, rbuf2 ) < 0 )
+ if (H5TBread_table(fid, "table13", dst_size2, dst_offset2, dst_sizes2, rbuf2) < 0)
goto out;
/* compare the extracted table with the original array */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( ( HDstrcmp( rbuf2[i].name, wbuf[i].name ) != 0 ) ||
- rbuf2[i].lati != wbuf[i].lati ||
- rbuf2[i].longi != wbuf[i].longi ||
- !FLT_ABS_EQUAL(rbuf2[i].pressure,wbuf[i].pressure) ||
- !DBL_ABS_EQUAL(rbuf2[i].temperature,wbuf[i].temperature) ||
- rbuf2[i].new_field != buf_new[i] ) {
- goto out;
+ for (i = 0; i < NRECORDS; i++) {
+ if ((HDstrcmp(rbuf2[i].name, wbuf[i].name) != 0) || rbuf2[i].lati != wbuf[i].lati ||
+ rbuf2[i].longi != wbuf[i].longi || !H5_FLT_ABS_EQUAL(rbuf2[i].pressure, wbuf[i].pressure) ||
+ !H5_DBL_ABS_EQUAL(rbuf2[i].temperature, wbuf[i].temperature) ||
+ rbuf2[i].new_field != buf_new[i]) {
+ goto out;
}
}
PASSED();
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBdelete_field
- *
- *-------------------------------------------------------------------------
- */
- if (do_write)
- {
- TESTING2("deleting fields");
+ *
+ * Functions tested:
+ *
+ * H5TBdelete_field
+ *
+ *-------------------------------------------------------------------------
+ */
+ if (do_write) {
+ HL_TESTING2("deleting fields");
/* make a table */
- if (H5TBmake_table(TITLE,fid,"table14",FIELDS,RECORDS,type_size_mem,
- field_names,field_offset,field_type,
- chunk_size,fill,compress,wbuf)<0)
+ if (H5TBmake_table(TITLE, fid, "table14", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
+ field_type, chunk_size, fill, compress, wbuf) < 0)
goto out;
/* delete the field */
- if ( H5TBdelete_field(fid, "table14", "Pressure" ) < 0 )
+ if (H5TBdelete_field(fid, "table14", "Pressure") < 0)
goto out;
/* read the table */
- if ( H5TBread_table(fid, "table14", dst_size3, dst_offset3, dst_sizes3, rbuf3 ) < 0 )
+ if (H5TBread_table(fid, "table14", dst_size3, dst_offset3, dst_sizes3, rbuf3) < 0)
goto out;
/* compare the extracted table with the original array */
- for( i = 0; i < NRECORDS; i++ )
- {
- if ( ( HDstrcmp( rbuf3[i].name, wbuf[i].name ) != 0 ) ||
- rbuf3[i].lati != wbuf[i].lati ||
+ for (i = 0; i < NRECORDS; i++) {
+ if ((HDstrcmp(rbuf3[i].name, wbuf[i].name) != 0) || rbuf3[i].lati != wbuf[i].lati ||
rbuf3[i].longi != wbuf[i].longi ||
- !DBL_ABS_EQUAL(rbuf3[i].temperature,wbuf[i].temperature) ) {
- goto out;
+ !H5_DBL_ABS_EQUAL(rbuf3[i].temperature, wbuf[i].temperature)) {
+ goto out;
}
}
@@ -1603,143 +1434,140 @@ static int test_table(hid_t fid, int do_write)
}
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBget_table_info
- * H5TBget_field_info
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBget_table_info
+ * H5TBget_field_info
+ *
+ *-------------------------------------------------------------------------
+ */
- TESTING2("getting table info");
+ HL_TESTING2("getting table info");
/* get table info */
- if ( H5TBget_table_info (fid, "table1", &rfields, &rrecords ) < 0 )
+ if (H5TBget_table_info(fid, "table1", &rfields, &rrecords) < 0)
goto out;
- if ( NFIELDS != rfields || rrecords != NRECORDS ) {
+ if (NFIELDS != rfields || rrecords != NRECORDS) {
goto out;
}
PASSED();
/*-------------------------------------------------------------------------
- *
- * Functions tested:
- *
- * H5TBget_field_info
- *
- *-------------------------------------------------------------------------
- */
+ *
+ * Functions tested:
+ *
+ * H5TBget_field_info
+ *
+ *-------------------------------------------------------------------------
+ */
- TESTING2("getting field info");
+ HL_TESTING2("getting field info");
/* alocate */
- names_out = (char**) HDmalloc( sizeof(char*) * (size_t)NFIELDS );
- for ( i = 0; i < NFIELDS; i++)
- {
- names_out[i] = (char*) HDmalloc( sizeof(char) * 255 );
+ names_out = (char **)HDmalloc(sizeof(char *) * (size_t)NFIELDS);
+ for (i = 0; i < NFIELDS; i++) {
+ names_out[i] = (char *)HDmalloc(sizeof(char) * 255);
}
/* Get field info */
- if ( H5TBget_field_info(fid, "table1", names_out, sizes_out, offset_out, &size_out ) < 0 )
+ if (H5TBget_field_info(fid, "table1", names_out, sizes_out, offset_out, &size_out) < 0)
goto out;
- for ( i = 0; i < NFIELDS; i++)
- {
- if ( (HDstrcmp( field_names[i], names_out[i] ) != 0)) {
+ for (i = 0; i < NFIELDS; i++) {
+ if ((HDstrcmp(field_names[i], names_out[i]) != 0)) {
goto out;
}
}
/* release */
- for ( i = 0; i < NFIELDS; i++)
- {
- HDfree ( names_out[i] );
+ for (i = 0; i < NFIELDS; i++) {
+ HDfree(names_out[i]);
}
- HDfree ( names_out );
+ HDfree(names_out);
PASSED();
/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
+ * end
+ *-------------------------------------------------------------------------
+ */
return 0;
out:
H5_FAILED();
return -1;
}
-
/*-------------------------------------------------------------------------
-* the main program
-*-------------------------------------------------------------------------
-*/
+ * the main program
+ *-------------------------------------------------------------------------
+ */
-int main(void)
+int
+main(void)
{
- hid_t fid; /* identifier for the file */
- unsigned flags=H5F_ACC_RDONLY;
+ hid_t fid; /* identifier for the file */
+ unsigned flags = H5F_ACC_RDONLY;
/*-------------------------------------------------------------------------
- * test1: create a file for the write/read test
- *-------------------------------------------------------------------------
- */
+ * test1: create a file for the write/read test
+ *-------------------------------------------------------------------------
+ */
/* create a file using default properties */
- fid=H5Fcreate("test_table.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
+ fid = H5Fcreate("test_table.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
HDputs("Testing table with file creation mode (read/write in native architecture):");
/* test, do write */
- if (test_table(fid,1)<0)
+ if (test_table(fid, 1) < 0)
goto out;
/* close */
H5Fclose(fid);
/*-------------------------------------------------------------------------
- * test2: open a file written in test1 on a big-endian machine
- *-------------------------------------------------------------------------
- */
+ * test2: open a file written in test1 on a big-endian machine
+ *-------------------------------------------------------------------------
+ */
HDputs("Testing table with file open mode (read big-endian data):");
- fid=h5file_open(TEST_FILE_BE,flags);
+ fid = h5file_open(TEST_FILE_BE, flags);
/* test, do not write */
- if (test_table(fid,0)<0)
+ if (test_table(fid, 0) < 0)
goto out;
/* close */
H5Fclose(fid);
/*-------------------------------------------------------------------------
- * test3: open a file written in test1 on a little-endian machine
- *-------------------------------------------------------------------------
- */
+ * test3: open a file written in test1 on a little-endian machine
+ *-------------------------------------------------------------------------
+ */
HDputs("Testing table with file open mode (read little-endian data):");
- fid=h5file_open(TEST_FILE_LE,flags);
+ fid = h5file_open(TEST_FILE_LE, flags);
/* test, do not write */
- if (test_table(fid,0)<0)
+ if (test_table(fid, 0) < 0)
goto out;
/* close */
H5Fclose(fid);
/*-------------------------------------------------------------------------
- * test4: open a file written in test1 on the Cray T3 machine
- *-------------------------------------------------------------------------
- */
+ * test4: open a file written in test1 on the Cray T3 machine
+ *-------------------------------------------------------------------------
+ */
HDputs("Testing table with file open mode (read Cray data):");
- fid=h5file_open(TEST_FILE_CRAY,flags);
+ fid = h5file_open(TEST_FILE_CRAY, flags);
/* test, do not write */
- if (test_table(fid,0)<0)
+ if (test_table(fid, 0) < 0)
goto out;
/* close */
@@ -1750,5 +1578,3 @@ out:
H5Fclose(fid);
return 1;
}
-
-
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 407a0bb..1a5a7ee 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TOOLS C CXX)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_TOOLS C)
add_subdirectory (gif2h5)
diff --git a/hl/tools/COPYING b/hl/tools/COPYING
index 6497ace..97969da 100644
--- a/hl/tools/COPYING
+++ b/hl/tools/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am
index 00cfa82..2aba25e 100644
--- a/hl/tools/Makefile.am
+++ b/hl/tools/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index ba103e3..e0976b6 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -407,9 +407,9 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -424,6 +424,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -442,6 +443,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -469,6 +471,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -476,9 +480,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -494,6 +501,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -515,6 +523,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -527,8 +536,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -542,6 +553,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -583,6 +595,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -670,11 +683,11 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# All subdirectories
SUBDIRS = gif2h5
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1165,6 +1178,7 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1200,7 +1214,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1361,7 +1375,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 2697dfd..372fb60 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TOOLS_GIF2H5)
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_HL_TOOLS_GIF2H5 C)
#-----------------------------------------------------------------------------
# Define Sources
@@ -14,42 +14,111 @@ set (GIF2H5_SOURCES
)
#-- Add gif2hdf5 program
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
-INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR})
+if (NOT ONLY_SHARED_LIBS)
+ add_executable (gif2h5 ${GIF2H5_SOURCES})
+ target_compile_options(gif2h5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (gif2h5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (gif2h5 STATIC)
+ target_link_libraries (gif2h5 PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
+ set (H5_DEP_EXECUTABLES
+ gif2h5
+ )
+endif ()
-add_executable (gif2h5 ${GIF2H5_SOURCES})
-TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
-target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
-set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
+if (BUILD_SHARED_LIBS)
+ add_executable (gif2h5-shared ${GIF2H5_SOURCES})
+ target_compile_options(gif2h5-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (gif2h5-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (gif2h5-shared SHARED)
+ target_link_libraries (gif2h5-shared PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TOOLS_LIBSH_TARGET})
+ set_target_properties (gif2h5-shared PROPERTIES FOLDER tools/hl)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5-shared")
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ gif2h5-shared
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5)
+ else ()
+ clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5-shared)
+ endif ()
+endif ()
#-- Add h52gif program
set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
-add_executable (h52gif ${hdf2gif_SOURCES})
-TARGET_C_PROPERTIES (h52gif STATIC " " " ")
-target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
-set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
+if (NOT ONLY_SHARED_LIBS)
+ add_executable (h52gif ${hdf2gif_SOURCES})
+ target_compile_options(h52gif PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (h52gif PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (h52gif STATIC)
+ target_link_libraries (h52gif PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ h52gif
+ )
+endif ()
-if (BUILD_TESTING)
+if (BUILD_SHARED_LIBS)
+ add_executable (h52gif-shared ${hdf2gif_SOURCES})
+ target_compile_options(h52gif-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (h52gif-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (h52gif-shared SHARED)
+ target_link_libraries (h52gif-shared PRIVATE ${HDF5_HL_LIBSH_TARGET} PRIVATE ${HDF5_LIBSH_TARGET} ${HDF5_TOOLS_LIBSH_TARGET})
+ set_target_properties (h52gif-shared PROPERTIES FOLDER tools/hl)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif-shared")
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ h52gif-shared
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif)
+ else ()
+ clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif-shared)
+ endif ()
+endif ()
+
+if (BUILD_TESTING AND HDF5_TEST_SERIAL)
# --------------------------------------------------------------------
# This executable can generate the actual test files - Currently not
# used in the CMake Build system as we rely on the test files that are
# shipped with HDF5 source archives
# --------------------------------------------------------------------
- if (HDF5_BUILD_GENERATORS)
+ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
- TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ")
- target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories (hl_h52gifgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (hl_h52gifgentest STATIC)
+ target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
-# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_hl_h52gifgentest_FORMAT hl_h52gifgentest)
+ endif ()
+
+# add_test (NAME hl_h52gifgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_h52gifgentest>)
endif ()
- include (CMakeTests.cmake)
+ if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -58,8 +127,7 @@ endif ()
if (HDF5_EXPORTED_TARGETS)
install (
TARGETS
- gif2h5
- h52gif
+ ${H5_DEP_EXECUTABLES}
EXPORT
${HDF5_EXPORTED_TARGETS}
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
index 61c004e..36ea5f9 100644
--- a/hl/tools/gif2h5/CMakeTests.cmake
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -5,7 +5,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -37,20 +37,32 @@ add_test (
image.gif
image24.gif
)
+set_tests_properties (HL_TOOLS-clear-objects PROPERTIES FIXTURES_SETUP clear_tools_hl)
-add_test (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
-set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_file_ext}> testfiles/image1.gif image1.h5)
+set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES
+ FIXTURES_REQUIRED clear_tools_hl
+)
-add_test (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
-set_tests_properties (HL_TOOLS_h52gif PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+add_test (NAME HL_TOOLS_h52gif COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image1.gif -i image)
+set_tests_properties (HL_TOOLS_h52gif PROPERTIES
+ FIXTURES_REQUIRED clear_tools_hl
+)
-add_test (NAME HL_TOOLS_h52gif_none COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image.gif -i nosuch_image)
-set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES WILL_FAIL "true")
-set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+add_test (NAME HL_TOOLS_h52gif_none COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image.gif -i nosuch_image)
+set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES
+ WILL_FAIL "true"
+ FIXTURES_REQUIRED clear_tools_hl
+)
-#add_test (NAME HL_TOOLS_h52gifpal COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image.gif -i palette)
-#set_tests_properties (HL_TOOLS_h52gifpal PROPERTIES WILL_FAIL "true")
+#add_test (NAME HL_TOOLS_h52gifpal COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image.gif -i palette)
+#set_tests_properties (HL_TOOLS_h52gifpal PROPERTIES
+# WILL_FAIL "true"
+# FIXTURES_REQUIRED clear_tools_hl
+#)
-add_test (NAME HL_TOOLS_h52gif24bits COMMAND $<TARGET_FILE:h52gif> testfiles/ex_image2.h5 image24.gif -i image24bitpixel)
-set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES WILL_FAIL "true")
-set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+add_test (NAME HL_TOOLS_h52gif24bits COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/ex_image2.h5 image24.gif -i image24bitpixel)
+set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES
+ WILL_FAIL "true"
+ FIXTURES_REQUIRED clear_tools_hl
+)
diff --git a/hl/tools/gif2h5/Makefile.am b/hl/tools/gif2h5/Makefile.am
index d30d66a..57a9236 100644
--- a/hl/tools/gif2h5/Makefile.am
+++ b/hl/tools/gif2h5/Makefile.am
@@ -6,7 +6,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -23,11 +23,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/sr
# These are our main targets, the tools
-TEST_SCRIPT=h52giftest.sh
-check_SCRIPTS=$(TEST_SCRIPT)
-
bin_PROGRAMS=gif2h5 h52gif
-noinst_PROGRAMS=h52gifgentst
# Add h52gif and gif2h5 specific linker flags here
h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
@@ -37,12 +33,18 @@ gif2h5_SOURCES=gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
h52gif_SOURCES=hdf2gif.c hdfgifwr.c
-h52gifgentst_SOURCES=h52gifgentst.c
# Programs all depend on the hdf5 library, the tools library, and the HL
# library.
LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+if BUILD_TESTS_CONDITIONAL
+ TEST_SCRIPT=h52giftest.sh
+ check_SCRIPTS=$(TEST_SCRIPT)
+ noinst_PROGRAMS=h52gifgentst
+ h52gifgentst_SOURCES=h52gifgentst.c
+endif
+
CHECK_CLEANFILES+=*.h5
CHECK_CLEANFILES+=*.gif
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index 3898ea6..27fe474 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -22,7 +22,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -104,7 +104,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = gif2h5$(EXEEXT) h52gif$(EXEEXT)
-noinst_PROGRAMS = h52gifgentst$(EXEEXT)
+@BUILD_TESTS_CONDITIONAL_TRUE@noinst_PROGRAMS = h52gifgentst$(EXEEXT)
TESTS = $(TEST_SCRIPT)
subdir = hl/tools/gif2h5
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -138,7 +138,9 @@ h52gif_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
h52gif_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(h52gif_LDFLAGS) $(LDFLAGS) -o $@
-am_h52gifgentst_OBJECTS = h52gifgentst.$(OBJEXT)
+am__h52gifgentst_SOURCES_DIST = h52gifgentst.c
+@BUILD_TESTS_CONDITIONAL_TRUE@am_h52gifgentst_OBJECTS = \
+@BUILD_TESTS_CONDITIONAL_TRUE@ h52gifgentst.$(OBJEXT)
h52gifgentst_OBJECTS = $(am_h52gifgentst_OBJECTS)
h52gifgentst_LDADD = $(LDADD)
h52gifgentst_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
@@ -178,7 +180,7 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(gif2h5_SOURCES) $(h52gif_SOURCES) $(h52gifgentst_SOURCES)
DIST_SOURCES = $(gif2h5_SOURCES) $(h52gif_SOURCES) \
- $(h52gifgentst_SOURCES)
+ $(am__h52gifgentst_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -417,12 +419,12 @@ AMTAR = @AMTAR@
# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
@@ -437,6 +439,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
@@ -455,6 +458,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
@@ -482,6 +486,8 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -489,9 +495,12 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF5_TESTS = @HDF5_TESTS@
+HDF5_TOOLS = @HDF5_TOOLS@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
@@ -507,6 +516,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+JNI_LDFLAGS = @JNI_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -528,6 +538,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -540,8 +551,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
+ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
@@ -555,6 +568,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -596,6 +610,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -680,26 +695,24 @@ TRACE = perl $(top_srcdir)/bin/trace
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.gif
-# These are our main targets, the tools
-TEST_SCRIPT = h52giftest.sh
-check_SCRIPTS = $(TEST_SCRIPT)
-
# Add h52gif and gif2h5 specific linker flags here
h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
gif2h5_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
gif2h5_SOURCES = gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
h52gif_SOURCES = hdf2gif.c hdfgifwr.c
-h52gifgentst_SOURCES = h52gifgentst.c
# Programs all depend on the hdf5 library, the tools library, and the HL
# library.
LDADD = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+@BUILD_TESTS_CONDITIONAL_TRUE@TEST_SCRIPT = h52giftest.sh
+@BUILD_TESTS_CONDITIONAL_TRUE@check_SCRIPTS = $(TEST_SCRIPT)
+@BUILD_TESTS_CONDITIONAL_TRUE@h52gifgentst_SOURCES = h52gifgentst.c
-# Automake needs to be taught how to build lib, dyn, progs, and tests targets.
+# Automake needs to be taught how to build lib, progs and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
-# be built at certain times.
+# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
@@ -1235,6 +1248,7 @@ uninstall-am: uninstall-binPROGRAMS
help:
@$(top_srcdir)/bin/makehelp
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1270,7 +1284,7 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
-# is depreciated.
+# is deprecated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -1431,7 +1445,7 @@ build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
- echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
index 453db12..4f7c0ef 100644
--- a/hl/tools/gif2h5/decompress.c
+++ b/hl/tools/gif2h5/decompress.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,45 +15,43 @@
#include "gif.h"
-WORD iWIDE, iHIGH, eWIDE, eHIGH, expand, numcols, strip, nostrip;
-unsigned long cols[256];
-char *cmd;
+GIFWORD iWIDE, iHIGH, eWIDE, eHIGH, expand, numcols, strip, nostrip;
+unsigned long cols[256];
+char * cmd;
FILE *fp;
-static WORD
- XC = 0, YC = 0, /* Output X and Y coords of current pixel */
- InitCodeSize, /* Starting code size, used during Clear */
- CodeSize, /* Code size, read from GIF header */
- BytesPerScanline, /* Bytes per scanline in output raster */
- IWidth, IHeight; /* image dimensions */
-static int
- BitOffset = 0, /* Bit Offset of next code */
- Pass = 0, /* Used by output routine if WORDerlaced pic */
- OutCount = 0, /* Decompressor output 'stack count' */
- Code, /* Value returned by ReadCode */
- MaxCode, /* limiting value for current code size */
- ClearCode, /* GIF clear code */
- EOFCode, /* GIF end-of-information code */
- CurCode, OldCode, InCode, /* Decompressor variables */
- FirstFree, /* First free code, generated per GIF spec */
- FreeCode, /* Decompressor, next free slot in hash table */
- FinChar, /* Decompressor variable */
- DataMask, /* AND mask for data size */
- ReadMask; /* Code AND mask for current code size */
+static GIFWORD XC = 0, YC = 0, /* Output X and Y coords of current pixel */
+ InitCodeSize, /* Starting code size, used during Clear */
+ CodeSize, /* Code size, read from GIF header */
+ BytesPerScanline, /* Bytes per scanline in output raster */
+ IWidth, IHeight; /* image dimensions */
+static int BitOffset = 0, /* Bit Offset of next code */
+ Pass = 0, /* Used by output routine if GIFWORDerlaced pic */
+ OutCount = 0, /* Decompressor output 'stack count' */
+ Code, /* Value returned by ReadCode */
+ MaxCode, /* limiting value for current code size */
+ ClearCode, /* GIF clear code */
+ EOFCode, /* GIF end-of-information code */
+ CurCode, OldCode, InCode, /* Decompressor variables */
+ FirstFree, /* First free code, generated per GIF spec */
+ FreeCode, /* Decompressor, next free slot in hash table */
+ FinChar, /* Decompressor variable */
+ DataMask, /* AND mask for data size */
+ ReadMask; /* Code AND mask for current code size */
/*MODIFICATIONS*/
-BYTE tempbyte[10];
-BYTE * tempBYTEptr[10];
-WORD tempint[10];
-WORD ImageCount = 0;
+GIFBYTE tempbyte[10];
+GIFBYTE *tempGIFBYTEptr[10];
+GIFWORD tempint[10];
+GIFWORD ImageCount = 0;
/*END MODIFICATION*/
boolean Interlace, HasColormap;
-BYTE *Image; /* The result array */
-BYTE *RawGIF; /* The heap array to hold it, raw */
-BYTE *Raster; /* The raster data stream, unblocked */
+GIFBYTE *Image; /* The result array */
+GIFBYTE *RawGIF; /* The heap array to hold it, raw */
+GIFBYTE *Raster; /* The raster data stream, unblocked */
/* The hash table used by the decompressor */
@@ -66,14 +64,14 @@ int OutCode[1025];
/* The color map, read from the GIF header */
-int numused;
+int numused;
/*
* Fetch the next code from the raster data stream. The codes can be any
- * length from 3 to 12 bits, packed WORDo 8-bit BYTEs, so we have to maWORDain
- * our location in the Raster array as a BIT Offset. We compute the BYTE
- * Offset WORDo the raster array by dividing this by 8, pick up three BYTEs,
- * compute the bit Offset WORDo our 24-bit chunk, shift to bring the desired
+ * length from 3 to 12 bits, packed into 8-bit GIFBYTEs, so we have to maintain
+ * our location in the Raster array as a BIT Offset. We compute the GIFBYTE
+ * Offset into the raster array by dividing this by 8, pick up three GIFBYTEs,
+ * compute the bit Offset into our 24-bit chunk, shift to bring the desired
* code to the bottom, then mask it off and return it.
*/
static int
@@ -82,7 +80,7 @@ ReadCode(void)
int RawCode, ByteOffset;
ByteOffset = BitOffset / 8;
- RawCode = Raster[ByteOffset] + (0x100 * Raster[ByteOffset + 1]);
+ RawCode = Raster[ByteOffset] + (0x100 * Raster[ByteOffset + 1]);
if (CodeSize >= 8)
RawCode += (0x10000 * Raster[ByteOffset + 2]);
@@ -93,19 +91,17 @@ ReadCode(void)
}
static void
-AddToPixel(BYTE Index)
+AddToPixel(GIFBYTE Index)
{
- if (YC<IHeight)
- *(Image + YC * BytesPerScanline + XC) = Index;
-
-
+ if (YC < IHeight)
+ *(Image + YC * BytesPerScanline + XC) = Index;
/* Update the X-coordinate, and if it overflows, update the
* Y-coordinate */
if (++XC == IWidth) {
/*
- * If a non-WORDerlaced picture, just increment YC to the next scan
- * line. If it's WORDerlaced, deal with the WORDerlace as described
+ * If a non-interlaced picture, just increment YC to the next scan
+ * line. If it's interlaced, deal with the interlace as described
* in the GIF spec. Put the decoded scan line out to the screen if we
* haven't gone past the bottom of it.
*/
@@ -113,40 +109,41 @@ AddToPixel(BYTE Index)
if (!Interlace) {
YC++;
- } else {
+ }
+ else {
switch (Pass) {
- case 0:
- YC += 8;
-
- if (YC >= IHeight) {
- Pass++;
- YC = 4;
- }
-
- break;
- case 1:
- YC += 8;
-
- if (YC >= IHeight) {
- Pass++;
- YC = 2;
- }
-
- break;
- case 2:
- YC += 4;
-
- if (YC >= IHeight) {
- Pass++;
- YC = 1;
- }
-
- break;
- case 3:
- YC += 2;
- break;
- default:
- break;
+ case 0:
+ YC += 8;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 4;
+ }
+
+ break;
+ case 1:
+ YC += 8;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 2;
+ }
+
+ break;
+ case 2:
+ YC += 4;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 1;
+ }
+
+ break;
+ case 3:
+ YC += 2;
+ break;
+ default:
+ break;
}
}
}
@@ -154,26 +151,26 @@ AddToPixel(BYTE Index)
/* Main routine. Convert a GIF image to an HDF image */
-BYTE *
+GIFBYTE *
Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
{
int i;
- XC = 0;
- YC = 0;
- Pass = 0;
- OutCount = 0;
+ XC = 0;
+ YC = 0;
+ Pass = 0;
+ OutCount = 0;
BitOffset = 0;
- DataMask = (1 << ((GifHead->PackedField & 0x07) +1)) -1;
- Raster = GifImageDesc->GIFImage;
+ DataMask = (1 << ((GifHead->PackedField & 0x07) + 1)) - 1;
+ Raster = GifImageDesc->GIFImage;
/* Check for image seperator */
/* Now read in values from the image descriptor */
- IWidth = GifImageDesc->ImageWidth;
- IHeight = GifImageDesc->ImageHeight;
- Interlace = GifImageDesc->PackedField & 0x40;
+ IWidth = GifImageDesc->ImageWidth;
+ IHeight = GifImageDesc->ImageHeight;
+ Interlace = (uint8_t)(GifImageDesc->PackedField & 0x40);
/*
* Note that I ignore the possible existence of a local color map. I'm
@@ -183,13 +180,13 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
*/
/*
- * Start reading the raster data. First we get the WORDial code size and
+ * Start reading the raster data. First we get the intial code size and
* compute decompressor constant values, based on this code size.
*/
- CodeSize = GifImageDesc->CodeSize;
+ CodeSize = GifImageDesc->CodeSize;
ClearCode = (1 << CodeSize);
- EOFCode = ClearCode + 1;
+ EOFCode = ClearCode + 1;
FreeCode = FirstFree = ClearCode + 2;
/*
@@ -201,18 +198,18 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
CodeSize++;
InitCodeSize = CodeSize;
- MaxCode = (1 << CodeSize);
- ReadMask = MaxCode - 1;
+ MaxCode = (1 << CodeSize);
+ ReadMask = MaxCode - 1;
/*
* Read the raster data. Here we just transpose it from the GIF array to
- * the Raster array, turning it from a series of blocks WORDo one long
+ * the Raster array, turning it from a series of blocks into one long
* data stream, which makes life much easier for ReadCode().
*/
/* Allocate the Image */
- if (!(Image = (BYTE *)malloc((size_t)IWidth*(size_t)IHeight))) {
+ if (!(Image = (GIFBYTE *)malloc((size_t)IWidth * (size_t)IHeight))) {
printf("Out of memory");
exit(EXIT_FAILURE);
}
@@ -233,13 +230,14 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
*/
if (Code == ClearCode) {
CodeSize = InitCodeSize;
- MaxCode = (1 << CodeSize);
+ MaxCode = (1 << CodeSize);
ReadMask = MaxCode - 1;
FreeCode = FirstFree;
CurCode = OldCode = Code = ReadCode();
- FinChar = CurCode & DataMask;
- AddToPixel((BYTE)FinChar);
- } else {
+ FinChar = CurCode & DataMask;
+ AddToPixel((GIFBYTE)FinChar);
+ }
+ else {
/*
* If not a clear code, then must be data: save same as CurCode
* and InCode
@@ -251,26 +249,26 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
* repeat the last character decoded
*/
if (CurCode >= FreeCode) {
- CurCode = OldCode;
+ CurCode = OldCode;
OutCode[OutCount++] = FinChar;
}
/*
- * Unless this code is raw data, pursue the chain poWORDed to by
+ * Unless this code is raw data, pursue the chain pointed to by
* CurCode through the hash table to its end; each code in the
* chain puts its associated output code on the output queue.
*/
while (CurCode > DataMask) {
- if (OutCount > 1024) {
+ if (OutCount >= 1024) {
/*return error message*/
}
OutCode[OutCount++] = Suffix[CurCode];
- CurCode = Prefix[CurCode];
+ CurCode = Prefix[CurCode];
}
/* The last code in the chain is treated as raw data. */
- FinChar = CurCode & DataMask;
+ FinChar = CurCode & DataMask;
OutCode[OutCount++] = FinChar;
/*
@@ -278,7 +276,7 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
* stacked LIFO, so deal with it that way...
*/
for (i = OutCount - 1; i >= 0; i--)
- AddToPixel((BYTE)OutCode[i]);
+ AddToPixel((GIFBYTE)OutCode[i]);
OutCount = 0;
@@ -288,10 +286,10 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
*/
Prefix[FreeCode] = OldCode;
Suffix[FreeCode] = FinChar;
- OldCode = InCode;
+ OldCode = InCode;
/*
- * PoWORD to the next slot in the table. If we exceed the current
+ * Point to the next slot in the table. If we exceed the current
* MaxCode value, increment the code size unless it's already 12.
* If it is, do nothing: the next code decompressed better be
* CLEAR
diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h
index ed1cc81..2b4a344 100644
--- a/hl/tools/gif2h5/gif.h
+++ b/hl/tools/gif2h5/gif.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,7 +16,7 @@
* Purpose: GIF Header file
*/
#ifndef GIF_H_
-#define GIF_H_ 1
+#define GIF_H_ 1
#include <stdio.h>
#include <stdlib.h>
@@ -26,24 +26,31 @@
#define MAX_PAL 768
-/* typedef H5T_NATIVE_UINT8 BYTE; */
-typedef unsigned char BYTE;
+/* typedef H5T_NATIVE_UINT8 GIFBYTE; */
+typedef unsigned char GIFBYTE;
-/* typedef H5T_NATIVE_UINT16 WORD; */
-typedef unsigned long WORD;
+/* typedef H5T_NATIVE_UINT16 GIFWORD; */
+typedef unsigned long GIFWORD;
-typedef char CHAR;
+typedef char GIFCHAR;
+
+#ifndef boolean
typedef unsigned char boolean;
+#endif
-#define false 0
-#define true 1
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true 1
+#endif
/* Set the EndianOrder.
** The GIF Reader file should do this.
** Set EndianOrder = 0 if machine is little endian
** EndianOrder = 1 if machine is big endian.
*/
-extern int EndianOrder;
+extern int EndianOrder;
/*
** The GIF header format.
@@ -52,68 +59,66 @@ extern int EndianOrder;
** descriptor, and the global color table for the GIF image.
*/
typedef struct _GifHeader { /* Offset Description */
- BYTE PackedField; /* 0Ah Color Information */
- WORD TableSize;
- BYTE ImageCount; /* Keep a count of the number of images */
- BYTE CommentCount;
- BYTE ApplicationCount;
- BYTE PlainTextCount;
- BYTE HDFPalette[256][3];
- BYTE HeaderDump[6]; /* BYTE array to dump header contents */
- BYTE LSDDump[7]; /* Logical Screen Descriptor dump */
+ GIFBYTE PackedField; /* 0Ah Color Information */
+ GIFWORD TableSize;
+ GIFBYTE ImageCount; /* Keep a count of the number of images */
+ GIFBYTE CommentCount;
+ GIFBYTE ApplicationCount;
+ GIFBYTE PlainTextCount;
+ GIFBYTE HDFPalette[256][3];
+ GIFBYTE HeaderDump[6]; /* GIFBYTE array to dump header contents */
+ GIFBYTE LSDDump[7]; /* Logical Screen Descriptor dump */
} GIFHEAD;
-
/*
** The GIF Image Descriptor.
*/
typedef struct _GifImageDescriptor {
- WORD ImageWidth; /* Width of the image in pixels */
- WORD ImageHeight; /* Height of the image in pixels */
- BYTE PackedField; /* Image and Color Table Data Information */
- WORD TableSize;
- WORD CodeSize; /* Minimum LZW CodeSize for image data */
- BYTE HDFPalette[256][3];
- BYTE GIDDump[9]; /* GifImageDescriptor dump */
-
- BYTE *Image; /* Decompressed Raster Image */
- BYTE *GIFImage;
+ GIFWORD ImageWidth; /* Width of the image in pixels */
+ GIFWORD ImageHeight; /* Height of the image in pixels */
+ GIFBYTE PackedField; /* Image and Color Table Data Information */
+ GIFWORD TableSize;
+ GIFWORD CodeSize; /* Minimum LZW CodeSize for image data */
+ GIFBYTE HDFPalette[256][3];
+ GIFBYTE GIDDump[9]; /* GifImageDescriptor dump */
+
+ GIFBYTE *Image; /* Decompressed Raster Image */
+ GIFBYTE *GIFImage;
} GIFIMAGEDESC;
/*
** GIF 89a Graphic Control Extension Block
*/
typedef struct _GifGraphicControlExtension {
- BYTE GCEDump[5]; /* Graphic Control Extension Dump */
+ GIFBYTE GCEDump[5]; /* Graphic Control Extension Dump */
} GIFGRAPHICCONTROL;
/*
** GIF 89a Plain Text Extension Block
*/
typedef struct _GifPlainTextExtension {
- BYTE PTEDump[15]; /* Plain Text Extension Dump */
- BYTE *PlainTextData; /* Plain Text data sub-blocks */
- WORD DataSize;
+ GIFBYTE PTEDump[15]; /* Plain Text Extension Dump */
+ GIFBYTE *PlainTextData; /* Plain Text data sub-blocks */
+ GIFWORD DataSize;
} GIFPLAINTEXT;
-
/*
** GIF 89a Application Extension Block
*/
typedef struct _GifApplicationExtension {
- BYTE AEDump[14]; /* Application Extension Dump */
- BYTE *ApplicationData; /* Application data sub-blocks */
- WORD DataSize;
+ GIFBYTE AEDump[14]; /* Application Extension Dump */
+ GIFBYTE *ApplicationData; /* Application data sub-blocks */
+ GIFWORD DataSize;
} GIFAPPLICATION;
/*
** GIF 89a Comment Extension Block
*/
typedef struct _GifCommentExtension {
- BYTE CEDump[2]; /* Comment Extension Dump */
- BYTE *CommentData; /* Comment data sub-blocks */
- WORD DataSize;
- BYTE Terminator; /* Block Terminator (always 0) */
+ GIFBYTE CEDump[2]; /* Comment Extension Dump */
+ GIFBYTE *CommentData; /* Comment data sub-blocks */
+ GIFWORD DataSize;
+ GIFBYTE Terminator; /* Block Terminator (always 0) */
} GIFCOMMENT;
/*
@@ -128,12 +133,12 @@ typedef struct _GifCommentExtension {
** extension.
*/
typedef struct _GifToMem {
- GIFHEAD *GifHeader;
- GIFIMAGEDESC **GifImageDesc;
- GIFGRAPHICCONTROL **GifGraphicControlExtension;
- GIFPLAINTEXT **GifPlainTextExtension;
- GIFAPPLICATION **GifApplicationExtension;
- GIFCOMMENT **GifCommentExtension;
+ GIFHEAD * GifHeader;
+ GIFIMAGEDESC ** GifImageDesc;
+ GIFGRAPHICCONTROL **GifGraphicControlExtension;
+ GIFPLAINTEXT ** GifPlainTextExtension;
+ GIFAPPLICATION ** GifApplicationExtension;
+ GIFCOMMENT ** GifCommentExtension;
} GIFTOMEM;
/*
@@ -141,40 +146,39 @@ typedef struct _GifToMem {
*/
/* GIF2MEM.C */
-int Gif2Mem(BYTE *, GIFTOMEM *);
+int Gif2Mem(GIFBYTE *, GIFTOMEM *);
/* GIFREAD.C */
-int ReadGifHeader(GIFHEAD *, BYTE **);
-int ReadGifImageDesc(GIFIMAGEDESC *, BYTE **);
-int ReadGifGraphicControl(GIFGRAPHICCONTROL *, BYTE **);
-int ReadGifPlainText(GIFPLAINTEXT *, BYTE **);
-int ReadGifApplication(GIFAPPLICATION *, BYTE **);
-int ReadGifComment(GIFCOMMENT *, BYTE **);
+int ReadGifHeader(GIFHEAD *, GIFBYTE **);
+int ReadGifImageDesc(GIFIMAGEDESC *, GIFBYTE **);
+int ReadGifGraphicControl(GIFGRAPHICCONTROL *, GIFBYTE **);
+int ReadGifPlainText(GIFPLAINTEXT *, GIFBYTE **);
+int ReadGifApplication(GIFAPPLICATION *, GIFBYTE **);
+int ReadGifComment(GIFCOMMENT *, GIFBYTE **);
/* HDFGIFWR.C */
-int hdfWriteGIF(FILE *fp, BYTE *pic, int ptype, int w, int h, BYTE *rmap,
- BYTE *gmap, BYTE *bmap, BYTE *pc2ncmap, int numcols,
- int colorstyle, int BitsPerPixel);
+int hdfWriteGIF(FILE *fp, GIFBYTE *pic, int ptype, int w, int h, GIFBYTE *rmap, GIFBYTE *gmap, GIFBYTE *bmap,
+ GIFBYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel);
/* WRITEHDF.C */
-int WriteHDF(GIFTOMEM , CHAR * );
+int WriteHDF(GIFTOMEM, GIFCHAR *);
/* Function: ReadHDF
** Return: 0 on completion without error, -1 on error
-** Input: CHAR *h5_file - HDF file name
-** CHAR *dset_name - Name of the HDF Image dataset
-** CHAR *pal_name - Name of the HDF palette
-** Output: BYTE* data - the HDF Image to be converted
-** BYTE palette[256][3] - the corresponding palette
+** Input: GIFCHAR *h5_file - HDF file name
+** GIFCHAR *dset_name - Name of the HDF Image dataset
+** GIFCHAR *pal_name - Name of the HDF palette
+** Output: GIFBYTE* data - the HDF Image to be converted
+** GIFBYTE palette[256][3] - the corresponding palette
** hsize_t* image_size - the size of each dimension of the image
*/
-int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size,
- CHAR *h5_file, CHAR *dset_name, CHAR *pal_name);
+int ReadHDF(GIFBYTE **data, GIFBYTE palette[256][3], hsize_t *image_size, GIFCHAR *h5_file,
+ GIFCHAR *dset_name, GIFCHAR *pal_name);
-BYTE *Decompress(GIFIMAGEDESC *, GIFHEAD *);
-BYTE GetByte(BYTE *);
-WORD GetWord(BYTE *);
+GIFBYTE *Decompress(GIFIMAGEDESC *, GIFHEAD *);
+GIFBYTE GetByte(GIFBYTE *);
+GIFWORD GetWord(GIFBYTE *);
-void cleanup(BYTE*);
+void cleanup(GIFBYTE *);
-#endif /* GIF_H_ */
+#endif /* GIF_H_ */
diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c
index 2e06d34..8de6d9a 100644
--- a/hl/tools/gif2h5/gif2hdf.c
+++ b/hl/tools/gif2h5/gif2hdf.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,11 +18,10 @@
#include "h5tools.h"
#include "h5tools_utils.h"
-
int
-main(int argv , char *argc[])
+main(int argv, char *argc[])
{
- GIFTOMEM GifMemoryStruct;
+ GIFTOMEM GifMemoryStruct;
GIFIMAGEDESC gifImageDesc;
FILE *fpGif;
@@ -31,8 +30,8 @@ main(int argv , char *argc[])
long i, ImageCount;
long filesize;
- BYTE *MemGif;
- BYTE *StartPos;
+ GIFBYTE *MemGif;
+ GIFBYTE *StartPos;
char *GIFFileName;
char *HDFFileName;
@@ -51,11 +50,9 @@ main(int argv , char *argc[])
/* Initialize h5tools lib */
h5tools_init();
- if ( argc[1] && (strcmp("-V",argc[1])==0) )
- {
+ if (argc[1] && (strcmp("-V", argc[1]) == 0)) {
print_version("gif2h5");
exit(EXIT_SUCCESS);
-
}
if (argv < 3) {
@@ -68,30 +65,30 @@ main(int argv , char *argc[])
GIFFileName = argc[1];
HDFFileName = argc[2];
- if (!(fpGif = fopen(GIFFileName,"rb"))) {
+ if (!(fpGif = fopen(GIFFileName, "rb"))) {
printf("Unable to open GIF file for reading.\n");
exit(EXIT_FAILURE);
}
/* Get the whole file into memory. Mem's much faster than I/O */
- fseek(fpGif, 0L , 2);
+ fseek(fpGif, 0L, 2);
filesize = ftell(fpGif);
- fseek(fpGif, 0L , 0);
+ fseek(fpGif, 0L, 0);
if (filesize == 0)
printf("File Size Zero");
- if (!(MemGif = StartPos = (BYTE *)malloc((size_t)filesize))) {
+ if (!(MemGif = StartPos = (GIFBYTE *)malloc((size_t)filesize))) {
printf("Out of memory");
exit(EXIT_FAILURE);
}
- if (fread(MemGif,(size_t)filesize,1,fpGif) != 1) {
+ if (fread(MemGif, (size_t)filesize, 1, fpGif) != 1) {
printf("Corrupted Input File");
exit(EXIT_FAILURE);
}
- fseek(fpGif,0L,0);
+ fseek(fpGif, 0L, 0);
/*
* Call Gif2Mem and break the whole file into parts. Gif2Mem also calls
@@ -100,8 +97,8 @@ main(int argv , char *argc[])
Gif2Mem(MemGif, &GifMemoryStruct);
if (ferror(fpGif)) {
- printf("File Stream Error\n\n");
- exit(EXIT_FAILURE);
+ printf("File Stream Error\n\n");
+ exit(EXIT_FAILURE);
}
fclose(fpGif);
@@ -110,54 +107,47 @@ main(int argv , char *argc[])
* Call WriteHDF from here. Go ahead and change WriteHDF to write whatever
* format you want
*/
- if (WriteHDF(GifMemoryStruct , HDFFileName))
+ if (WriteHDF(GifMemoryStruct, HDFFileName))
printf("HDF Write Error\n\n");
/* Free all buffers */
/* replacing int32 with long */
ImageCount = (long)((GifMemoryStruct.GifHeader)->ImageCount);
- for(i = 0; i < ImageCount ; i++) {
+ for (i = 0; i < ImageCount; i++) {
gifImageDesc = *(GifMemoryStruct.GifImageDesc[i]);
if (gifImageDesc.Image != NULL)
free(gifImageDesc.Image);
- if (GifMemoryStruct.GifImageDesc[i] != NULL)
- {
+ if (GifMemoryStruct.GifImageDesc[i] != NULL) {
free(GifMemoryStruct.GifImageDesc[i]);
GifMemoryStruct.GifImageDesc[i] = NULL;
}
- if (GifMemoryStruct.GifGraphicControlExtension[i] != NULL)
- {
+ if (GifMemoryStruct.GifGraphicControlExtension[i] != NULL) {
free(GifMemoryStruct.GifGraphicControlExtension[i]);
GifMemoryStruct.GifGraphicControlExtension[i] = NULL;
}
}
free(StartPos);
- if (GifMemoryStruct.GifHeader != NULL)
- {
+ if (GifMemoryStruct.GifHeader != NULL) {
free(GifMemoryStruct.GifHeader);
GifMemoryStruct.GifHeader = NULL;
}
- if (GifMemoryStruct.GifApplicationExtension != NULL)
- {
+ if (GifMemoryStruct.GifApplicationExtension != NULL) {
free(GifMemoryStruct.GifApplicationExtension);
GifMemoryStruct.GifApplicationExtension = NULL;
}
- if (GifMemoryStruct.GifImageDesc != NULL)
- {
+ if (GifMemoryStruct.GifImageDesc != NULL) {
free(GifMemoryStruct.GifImageDesc);
GifMemoryStruct.GifImageDesc = NULL;
}
- if (GifMemoryStruct.GifGraphicControlExtension != NULL)
- {
+ if (GifMemoryStruct.GifGraphicControlExtension != NULL) {
free(GifMemoryStruct.GifGraphicControlExtension);
GifMemoryStruct.GifGraphicControlExtension = NULL;
}
-
return EXIT_SUCCESS;
}
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
index 40b5583..c66250b 100644
--- a/hl/tools/gif2h5/gif2mem.c
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -36,35 +36,35 @@
#include "gif.h"
int
-Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
+Gif2Mem(GIFBYTE *MemGif, GIFTOMEM *GifMemoryStruct)
{
/*
* The gif structure outline for passing data to memory is given in gif.h.
* These pointers are redunant, should take them out in ver. 2
*/
- GIFHEAD *gifHead; /* GIF Header structure */
- GIFIMAGEDESC **gifImageDesc; /* Logical Image Descriptor struct */
- GIFPLAINTEXT **gifPlainText; /* Plain Text Extension structure */
- GIFAPPLICATION **gifApplication; /* Application Extension structure */
- GIFCOMMENT **gifComment; /* Comment Extension structure */
+ GIFHEAD * gifHead; /* GIF Header structure */
+ GIFIMAGEDESC ** gifImageDesc; /* Logical Image Descriptor struct */
+ GIFPLAINTEXT ** gifPlainText; /* Plain Text Extension structure */
+ GIFAPPLICATION ** gifApplication; /* Application Extension structure */
+ GIFCOMMENT ** gifComment; /* Comment Extension structure */
GIFGRAPHICCONTROL **gifGraphicControl; /* Graphic Control Extension strct */
- register WORD i; /* Loop counter */
- BYTE Identifier; /* Extension block identifier holder */
- BYTE Label; /* Extension block label holder */
- BYTE ImageCount; /* Count of the number of images in the file */
- BYTE ImageArray; /* Keep the size of the array to store Images */
- BYTE CommentCount;
- BYTE CommentArray;
- BYTE ApplicationCount;
- BYTE ApplicationArray;
- BYTE PlainTextCount;
- BYTE PlainTextArray;
- BYTE GCEflag;
- BYTE aTemp;
- BYTE j;
- BYTE w; /* Two more variables needed only while testing */
- BYTE *b; /* Endian Ordering */
+ register GIFWORD i; /* Loop counter */
+ GIFBYTE Identifier; /* Extension block identifier holder */
+ GIFBYTE Label; /* Extension block label holder */
+ GIFBYTE ImageCount; /* Count of the number of images in the file */
+ GIFBYTE ImageArray; /* Keep the size of the array to store Images */
+ GIFBYTE CommentCount;
+ GIFBYTE CommentArray;
+ GIFBYTE ApplicationCount;
+ GIFBYTE ApplicationArray;
+ GIFBYTE PlainTextCount;
+ GIFBYTE PlainTextArray;
+ GIFBYTE GCEflag;
+ GIFBYTE aTemp;
+ GIFBYTE j;
+ GIFBYTE w; /* Two more variables needed only while testing */
+ GIFBYTE * b; /* Endian Ordering */
/* Allocate memory for the GIF structures */
/* Plug the structs into GifMemoryStruct at the end */
@@ -89,8 +89,8 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
/******************************/
/* Carry out Endian Testing and set Endian Order */
- w = 0x0001;
- b = (BYTE *) &w;
+ w = 0x0001;
+ b = (GIFBYTE *)&w;
EndianOrder = (b[0] ? 1 : 0);
/* Read the GIF image file header information */
@@ -103,22 +103,22 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
fputs("GIFHEAD: Error reading header information!\n", stderr);
exit(EXIT_FAILURE);
}
-#endif /* 0 */
+#endif /* 0 */
/*
* Identify, read, and display block information.
*/
- ImageCount = ImageArray = 0;
- CommentCount = CommentArray = 0;
+ ImageCount = ImageArray = 0;
+ CommentCount = CommentArray = 0;
ApplicationCount = ApplicationArray = 0;
- PlainTextCount = PlainTextArray = 0;
- GCEflag = 0;
+ PlainTextCount = PlainTextArray = 0;
+ GCEflag = 0;
for (;;) {
Identifier = *MemGif++;
switch (Identifier) {
- case 0x3B: /* Trailer */
+ case 0x3B: /* Trailer */
/*
* The counts are stored to make it easier while putting stuff
* into the HDF file and then deallocating space.
@@ -129,17 +129,17 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
gifHead->PlainTextCount = PlainTextCount;
/* putting stuff into the gif2mem structure */
- GifMemoryStruct->GifHeader = gifHead;
- GifMemoryStruct->GifImageDesc = gifImageDesc;
- GifMemoryStruct->GifPlainTextExtension = gifPlainText;
- GifMemoryStruct->GifApplicationExtension = gifApplication;
- GifMemoryStruct->GifCommentExtension = gifComment;
+ GifMemoryStruct->GifHeader = gifHead;
+ GifMemoryStruct->GifImageDesc = gifImageDesc;
+ GifMemoryStruct->GifPlainTextExtension = gifPlainText;
+ GifMemoryStruct->GifApplicationExtension = gifApplication;
+ GifMemoryStruct->GifCommentExtension = gifComment;
GifMemoryStruct->GifGraphicControlExtension = gifGraphicControl;
/* return the struct */
return 0;
- case 0x2C: /* Image Descriptor */
+ case 0x2C: /* Image Descriptor */
/*
* If there was no image descriptor before this increase image
* count. If an imagedescriptor was present, reset GCEflag
@@ -150,40 +150,37 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
GCEflag = 0;
if (ImageCount > ImageArray) {
- aTemp = ImageArray;
- ImageArray = (BYTE)((ImageArray << 1) + 1);
- if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc,
- sizeof(GIFIMAGEDESC *) * ImageArray))) {
+ aTemp = ImageArray;
+ ImageArray = (GIFBYTE)((ImageArray << 1) + 1);
+ if (!(gifImageDesc =
+ (GIFIMAGEDESC **)realloc(gifImageDesc, sizeof(GIFIMAGEDESC *) * ImageArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(
- gifGraphicControl,
- sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
+ gifGraphicControl, sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- for (j = aTemp ; j < ImageArray ; j++) {
+ for (j = aTemp; j < ImageArray; j++) {
gifGraphicControl[j] = NULL;
- gifImageDesc[j] = NULL;
+ gifImageDesc[j] = NULL;
}
}
- if(!(gifImageDesc[ImageCount-1] = (GIFIMAGEDESC*)malloc(sizeof(GIFIMAGEDESC)))) {
+ if (!(gifImageDesc[ImageCount - 1] = (GIFIMAGEDESC *)malloc(sizeof(GIFIMAGEDESC)))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
-
- if (ReadGifImageDesc(gifImageDesc[ImageCount-1], &MemGif) == -1)
+ if (ReadGifImageDesc(gifImageDesc[ImageCount - 1], &MemGif) == -1)
fputs("Error reading Image Descriptor information\n", stderr);
/* Decompress the Image */
- gifImageDesc[ImageCount-1]->Image = Decompress(gifImageDesc[ImageCount-1],
- gifHead);
- free(gifImageDesc[ImageCount-1]->GIFImage);
+ gifImageDesc[ImageCount - 1]->Image = Decompress(gifImageDesc[ImageCount - 1], gifHead);
+ free(gifImageDesc[ImageCount - 1]->GIFImage);
/*
* Convert the local palette into an HDF compatible palette In
@@ -191,149 +188,146 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
* the HDFPalette If it is absent the global table is written
* as the HDFPalette.
*/
- if (!((gifImageDesc[ImageCount-1]->PackedField) & 0x80)) {
+ if (!((gifImageDesc[ImageCount - 1]->PackedField) & 0x80)) {
/* Check to see if the global color table exists.... */
if (gifHead->PackedField & 0x80) {
- for (i=0 ; i<gifHead->TableSize ; i++) {
- gifImageDesc[ImageCount-1]->HDFPalette[i][0] =
- gifHead->HDFPalette[i][0];
- gifImageDesc[ImageCount-1]->HDFPalette[i][1] =
- gifHead->HDFPalette[i][1];
- gifImageDesc[ImageCount-1]->HDFPalette[i][2] =
- gifHead->HDFPalette[i][2];
+ for (i = 0; i < gifHead->TableSize; i++) {
+ gifImageDesc[ImageCount - 1]->HDFPalette[i][0] = gifHead->HDFPalette[i][0];
+ gifImageDesc[ImageCount - 1]->HDFPalette[i][1] = gifHead->HDFPalette[i][1];
+ gifImageDesc[ImageCount - 1]->HDFPalette[i][2] = gifHead->HDFPalette[i][2];
}
}
- gifImageDesc[ImageCount-1]->TableSize = gifHead->TableSize;
+ gifImageDesc[ImageCount - 1]->TableSize = gifHead->TableSize;
}
break;
- case 0x21: /* Extension Block */
- Label = *MemGif++;
+ case 0x21: /* Extension Block */
+ Label = *MemGif++;
- switch (Label) {
- case 0x01: /* Plain Text Extension */
+ switch (Label) {
+ case 0x01: /* Plain Text Extension */
puts("Plain Text Extension\n");
PlainTextCount++;
if (PlainTextCount > PlainTextArray)
- PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
+ PlainTextArray = (GIFBYTE)((PlainTextArray << 1) + 1);
- if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText , sizeof(GIFPLAINTEXT *) * PlainTextArray))) {
+ if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText, sizeof(GIFPLAINTEXT *) *
+ PlainTextArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- if(!(gifPlainText[PlainTextCount - 1] = (GIFPLAINTEXT*)malloc(sizeof(GIFPLAINTEXT)))) {
+ if (!(gifPlainText[PlainTextCount - 1] =
+ (GIFPLAINTEXT *)malloc(sizeof(GIFPLAINTEXT)))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
if (ReadGifPlainText(gifPlainText[PlainTextCount - 1], &MemGif))
- fprintf(stderr,
- "Error reading Plain Text Extension information.\n");
+ fprintf(stderr, "Error reading Plain Text Extension information.\n");
break;
- case 0xFE: /* Comment Extension */
+ case 0xFE: /* Comment Extension */
CommentCount++;
if (CommentCount > CommentArray)
- CommentArray = (BYTE)((CommentArray << 1) + 1);
+ CommentArray = (GIFBYTE)((CommentArray << 1) + 1);
- if (!(gifComment = (GIFCOMMENT **)realloc(gifComment , sizeof(GIFCOMMENT *) * CommentArray))) {
+ if (!(gifComment =
+ (GIFCOMMENT **)realloc(gifComment, sizeof(GIFCOMMENT *) * CommentArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- if(!(gifComment[CommentCount - 1] = (GIFCOMMENT *)malloc(sizeof(GIFCOMMENT)))) {
+ if (!(gifComment[CommentCount - 1] = (GIFCOMMENT *)malloc(sizeof(GIFCOMMENT)))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
-
if (ReadGifComment(gifComment[CommentCount - 1], &MemGif))
- fprintf(stderr,
- "Error reading Comment Extension information\n");
+ fprintf(stderr, "Error reading Comment Extension information\n");
break;
- case 0xF9: /* Graphic Control Extension */
- if (GCEflag == 0 )
+ case 0xF9: /* Graphic Control Extension */
+ if (GCEflag == 0)
ImageCount++;
GCEflag = 1;
if (ImageCount > ImageArray) {
- aTemp = ImageArray;
- ImageArray = (BYTE)((ImageArray << 1) + 1);
+ aTemp = ImageArray;
+ ImageArray = (GIFBYTE)((ImageArray << 1) + 1);
- if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(gifGraphicControl , sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
+ if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(
+ gifGraphicControl, sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc , sizeof(GIFIMAGEDESC *) * ImageArray))) {
+ if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(
+ gifImageDesc, sizeof(GIFIMAGEDESC *) * ImageArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- for (j = aTemp ; j < ImageArray ; j++) {
+ for (j = aTemp; j < ImageArray; j++) {
gifGraphicControl[j] = NULL;
gifImageDesc[j] = NULL;
}
}
- if(!(gifGraphicControl[ImageCount-1] = (GIFGRAPHICCONTROL*)malloc(sizeof(GIFGRAPHICCONTROL)))) {
+ if (!(gifGraphicControl[ImageCount - 1] =
+ (GIFGRAPHICCONTROL *)malloc(sizeof(GIFGRAPHICCONTROL)))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
+ if (ReadGifGraphicControl(gifGraphicControl[ImageCount - 1], &MemGif))
+ fprintf(stderr, "Error reading Graphic Control Extension information\n");
- if (ReadGifGraphicControl(gifGraphicControl[ImageCount-1], &MemGif))
- fprintf(stderr,
- "Error reading Graphic Control Extension information\n");
-
- if (!*MemGif++ == 0)
- fprintf(stderr,
- "Error reading Graphic Control Extension\n");
+ (*MemGif)++;
+ if ((!*MemGif) == 0)
+ fprintf(stderr, "Error reading Graphic Control Extension\n");
break;
- case 0xFF: /* Application Extension */
+ case 0xFF: /* Application Extension */
ApplicationCount++;
if (ApplicationCount > ApplicationArray)
- ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
+ ApplicationArray = (GIFBYTE)((ApplicationArray << 1) + 1);
- if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
+ if (!(gifApplication = (GIFAPPLICATION **)realloc(
+ gifApplication, sizeof(GIFAPPLICATION *) * ApplicationArray))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
- if(!(gifApplication[ApplicationCount - 1] = (GIFAPPLICATION *)malloc(sizeof(GIFAPPLICATION)))) {
+ if (!(gifApplication[ApplicationCount - 1] =
+ (GIFAPPLICATION *)malloc(sizeof(GIFAPPLICATION)))) {
printf("Out of memory!");
exit(EXIT_FAILURE);
}
-
if (ReadGifApplication(gifApplication[ApplicationCount - 1], &MemGif))
- fprintf(stderr,
- "Error reading Application Extension information\n");
+ fprintf(stderr, "Error reading Application Extension information\n");
break;
default:
- printf("Unknown Extension Label: 0x%02x\n", Label);
+ printf("Unknown Extension Label: %#02x\n", Label);
break;
- }
+ }
- break;
+ break;
default:
- fprintf(stderr,
- "Unknown Block Separator Character: 0x%02x\n", Identifier);
+ fprintf(stderr, "Unknown Block Separator Character: %#02x\n", Identifier);
}
}
}
diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c
index 948e112..b88264b 100644
--- a/hl/tools/gif2h5/gifread.c
+++ b/hl/tools/gif2h5/gifread.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,33 +17,31 @@
int EndianOrder;
-static BYTE *ReadDataSubBlocks(BYTE **MemGif2, WORD *DSize);
+static GIFBYTE *ReadDataSubBlocks(GIFBYTE **MemGif2, GIFWORD *DSize);
-WORD
-GetWord(BYTE *MemGif)
+GIFWORD
+GetWord(GIFBYTE *MemGif)
{
- WORD w;
+ GIFWORD w;
if (EndianOrder == 1) {
/* LittleEndian */
- w = (WORD) (*MemGif++ & 0xFF);
- w |= (WORD) ((*MemGif++ & 0xFF) << 0x08);
- } else {
- w = (WORD) (*MemGif++ & 0xFF);
- w = ((WORD) (*MemGif++ & 0xFF)) | (w << 0x08);
+ w = (GIFWORD)(*MemGif++ & 0xFF);
+ w |= (GIFWORD)((*MemGif++ & 0xFF) << 0x08);
+ }
+ else {
+ w = (GIFWORD)(*MemGif++ & 0xFF);
+ w = ((GIFWORD)(*MemGif++ & 0xFF)) | (w << 0x08);
}
return w;
}
-BYTE
-GetByte(BYTE *MemGif)
-{
- return *MemGif;
-}
+GIFBYTE
+GetByte(GIFBYTE *MemGif) { return *MemGif; }
/*
- * Read a GIF image BYTE Header.
+ * Read a GIF image GIFBYTE Header.
*
* This function reads the Header, Logical Screen Descriptor, and
* Global Color Table (if any) from a GIF image file. The information
@@ -53,23 +51,23 @@ GetByte(BYTE *MemGif)
* otherwise 0 if no error occured.
*/
int
-ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
- BYTE **MemGif2) /* GIF image file input FILE stream */
+ReadGifHeader(GIFHEAD * GifHead, /* Pointer to GIF header structure */
+ GIFBYTE **MemGif2) /* GIF image file input FILE stream */
{
- WORD i; /* Loop counter */
- WORD tableSize; /* Number of entires in the Global Color Table */
+ GIFWORD i; /* Loop counter */
+ GIFWORD tableSize; /* Number of entires in the Global Color Table */
GifHead->TableSize = 0;
- for (i = 0 ; i < 6 ; i++) {
+ for (i = 0; i < 6; i++) {
GifHead->HeaderDump[i] = *(*MemGif2)++;
}
- if (strncmp((const char *)GifHead->HeaderDump , "GIF" , (size_t)3)) {
+ if (strncmp((const char *)GifHead->HeaderDump, "GIF", (size_t)3)) {
printf("The file does not appear to be a valid GIF file.\n");
exit(EXIT_FAILURE);
}
- for (i = 0 ; i < 7 ; i++) {
+ for (i = 0; i < 7; i++) {
GifHead->LSDDump[i] = *(*MemGif2)++;
}
@@ -78,7 +76,7 @@ ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
/* Check if a Global Color Table is present */
if (GifHead->PackedField & 0x80) {
/* Read number of color table entries */
- tableSize = (WORD) (1L << ((GifHead->PackedField & 0x07) + 1));
+ tableSize = (GIFWORD)(1L << ((GifHead->PackedField & 0x07) + 1));
GifHead->TableSize = tableSize;
/* Read the Global Color Table */
@@ -100,12 +98,11 @@ ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
#if 0
if (ferror(FpGif))
return -1;
-#endif /* 0 */
+#endif /* 0 */
- return 0; /* No FILE stream error occured */
+ return 0; /* No FILE stream error occured */
}
-
/*
** Read a GIF Local Image Descriptor.
**
@@ -120,93 +117,85 @@ ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
** otherwise 0 if no error occured.
*/
int
-ReadGifImageDesc(
- GIFIMAGEDESC *GifImageDesc, /* Pointer to GIF image descriptor structure */
- BYTE **MemGif2 /* GIF image file input FILE stream */
- )
+ReadGifImageDesc(GIFIMAGEDESC *GifImageDesc, /* Pointer to GIF image descriptor structure */
+ GIFBYTE ** MemGif2 /* GIF image file input FILE stream */
+)
{
- WORD i; /* Loop counter */
- WORD tableSize; /* Number of entries in the Local Color Table */
- /* BYTE Interlace; */ /* PackedField & 0x20 gives information on interlacing */
- BYTE *TempPtr;
- int ch , ch1;
-
- GifImageDesc->TableSize = 0;
- for (i = 0 ; i < 9 ; i++) {
- GifImageDesc->GIDDump[i] = *(*MemGif2)++;
- }
-
- /*
- ** Get the relevant fields. I need ImageWidth and Height actively hence I have
- ** taken information from those fields. I intend to keep the GifImageDesc data
- ** structure as it is so that anyone needing the rest of the fields can do so
- ** quickly.
- */
-
- if (EndianOrder == 1) /* LittleEndian */
- {
- GifImageDesc->ImageWidth = (WORD) (GifImageDesc->GIDDump[4] & 0xFF);
- GifImageDesc->ImageWidth |= (WORD) ((GifImageDesc->GIDDump[5] & 0xFF) << 0x08);
-
- GifImageDesc->ImageHeight = (WORD) (GifImageDesc->GIDDump[6] & 0xFF);
- GifImageDesc->ImageHeight |= (WORD) ((GifImageDesc->GIDDump[7] & 0xFF) << 0x08);
-
- }
- else
- {
- GifImageDesc->ImageWidth = (WORD) (GifImageDesc->GIDDump[4] & 0xFF);
- GifImageDesc->ImageWidth = ((WORD) (GifImageDesc->GIDDump[5] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+ GIFWORD i; /* Loop counter */
+ GIFWORD tableSize; /* Number of entries in the Local Color Table */
+ /* GIFBYTE Interlace; */ /* PackedField & 0x20 gives information on interlacing */
+ GIFBYTE *TempPtr;
+ int ch, ch1;
+
+ GifImageDesc->TableSize = 0;
+ for (i = 0; i < 9; i++) {
+ GifImageDesc->GIDDump[i] = *(*MemGif2)++;
+ }
- GifImageDesc->ImageHeight = (WORD) (GifImageDesc->GIDDump[6] & 0xFF);
- GifImageDesc->ImageHeight = ((WORD) (GifImageDesc->GIDDump[7] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+ /*
+ ** Get the relevant fields. I need ImageWidth and Height actively hence I have
+ ** taken information from those fields. I intend to keep the GifImageDesc data
+ ** structure as it is so that anyone needing the rest of the fields can do so
+ ** quickly.
+ */
+ if (EndianOrder == 1) /* LittleEndian */
+ {
+ GifImageDesc->ImageWidth = (GIFWORD)(GifImageDesc->GIDDump[4] & 0xFF);
+ GifImageDesc->ImageWidth |= (GIFWORD)((GifImageDesc->GIDDump[5] & 0xFF) << 0x08);
- }
+ GifImageDesc->ImageHeight = (GIFWORD)(GifImageDesc->GIDDump[6] & 0xFF);
+ GifImageDesc->ImageHeight |= (GIFWORD)((GifImageDesc->GIDDump[7] & 0xFF) << 0x08);
+ }
+ else {
+ GifImageDesc->ImageWidth = (GIFWORD)(GifImageDesc->GIDDump[4] & 0xFF);
+ GifImageDesc->ImageWidth =
+ ((GIFWORD)(GifImageDesc->GIDDump[5] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+
+ GifImageDesc->ImageHeight = (GIFWORD)(GifImageDesc->GIDDump[6] & 0xFF);
+ GifImageDesc->ImageHeight =
+ ((GIFWORD)(GifImageDesc->GIDDump[7] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+ }
- GifImageDesc->PackedField = GifImageDesc->GIDDump[8];
+ GifImageDesc->PackedField = GifImageDesc->GIDDump[8];
- /* Interlace = GifImageDesc->PackedField & 0x20; */
+ /* Interlace = GifImageDesc->PackedField & 0x20; */
/* Check if a Local Color Table is present */
- if (GifImageDesc->PackedField & 0x80)
- {
+ if (GifImageDesc->PackedField & 0x80) {
/* Read number of color table entries */
- tableSize = (WORD) (1L << ((GifImageDesc->PackedField & 0x07) + 1));
- GifImageDesc->TableSize = tableSize;
+ tableSize = (GIFWORD)(1L << ((GifImageDesc->PackedField & 0x07) + 1));
+ GifImageDesc->TableSize = tableSize;
/* Read the Local Color Table */
- for (i = 0; i < tableSize; i++)
- {
+ for (i = 0; i < tableSize; i++) {
GifImageDesc->HDFPalette[i][0] = *(*MemGif2)++;
GifImageDesc->HDFPalette[i][1] = *(*MemGif2)++;
GifImageDesc->HDFPalette[i][2] = *(*MemGif2)++;
}
}
- /*
- ** Get LZW minimum Code Size
- */
- GifImageDesc->CodeSize = (WORD)*(*MemGif2)++;
-
- /*GifImageDesc->GIFImage = ReadDataSubBlocks(FpGif);*/
- if (!(GifImageDesc->GIFImage = (BYTE *)malloc((GifImageDesc->ImageWidth) * (GifImageDesc->ImageHeight)))) {
- printf("Out of memory");
- exit(EXIT_FAILURE);
- }
-
-
- TempPtr = GifImageDesc->GIFImage;
- do
- {
- ch = ch1 = (int)*(*MemGif2)++;
- while (ch--) *TempPtr++ = *(*MemGif2)++;
- }
- while (ch1);
+ /*
+ ** Get LZW minimum Code Size
+ */
+ GifImageDesc->CodeSize = (GIFWORD) * (*MemGif2)++;
+
+ /*GifImageDesc->GIFImage = ReadDataSubBlocks(FpGif);*/
+ if (!(GifImageDesc->GIFImage =
+ (GIFBYTE *)malloc((GifImageDesc->ImageWidth) * (GifImageDesc->ImageHeight)))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+ TempPtr = GifImageDesc->GIFImage;
+ do {
+ ch = ch1 = (int)*(*MemGif2)++;
+ while (ch--)
+ *TempPtr++ = *(*MemGif2)++;
+ } while (ch1);
- return(0); /* No FILE stream error occured */
+ return (0); /* No FILE stream error occured */
}
-
/*
** Read a GIF Graphic Control Extension block.
**
@@ -217,21 +206,19 @@ ReadGifImageDesc(
** otherwise 0 if no error occured.
*/
int
-ReadGifGraphicControl(
- GIFGRAPHICCONTROL *GifGraphicControl, /* Pointer to GC Extension structure */
- BYTE **MemGif2 /* GIF image file input FILE stream */
- )
+ReadGifGraphicControl(GIFGRAPHICCONTROL *GifGraphicControl, /* Pointer to GC Extension structure */
+ GIFBYTE ** MemGif2 /* GIF image file input FILE stream */
+)
{
int i;
- for (i = 0 ; i < 5 ; i++) {
- GifGraphicControl->GCEDump[i] = *(*MemGif2)++;
+ for (i = 0; i < 5; i++) {
+ GifGraphicControl->GCEDump[i] = *(*MemGif2)++;
}
- return(0); /* No FILE stream error occured */
+ return (0); /* No FILE stream error occured */
}
-
/*
** Read a GIF Plain Text Extension block.
**
@@ -242,35 +229,33 @@ ReadGifGraphicControl(
** otherwise 0 if no error occured.
*/
int
-ReadGifPlainText(
- GIFPLAINTEXT *GifPlainText, /* Pointer to Plain Text Extension structure */
- BYTE **MemGif2 /* GIF image file input FILE stream */
- )
+ReadGifPlainText(GIFPLAINTEXT *GifPlainText, /* Pointer to Plain Text Extension structure */
+ GIFBYTE ** MemGif2 /* GIF image file input FILE stream */
+)
{
int i;
- for (i = 0 ; i < 13 ; i++) {
- GifPlainText->PTEDump[i] = *(*MemGif2)++;
- }
+ for (i = 0; i < 13; i++) {
+ GifPlainText->PTEDump[i] = *(*MemGif2)++;
+ }
/* Read in the Plain Text data sub-blocks */
- if (!(GifPlainText->PlainTextData = ReadDataSubBlocks(MemGif2 , &(GifPlainText->DataSize))))
- return(1);
+ if (!(GifPlainText->PlainTextData = ReadDataSubBlocks(MemGif2, &(GifPlainText->DataSize))))
+ return (1);
/*
GifPlainText->Terminator = 0;
*/
/* Check for a FILE stream error */
- /*
- if (ferror(FpGif))
- return(-1);
- */
+ /*
+ if (ferror(FpGif))
+ return(-1);
+ */
- return(0); /* No FILE stream error occured */
+ return (0); /* No FILE stream error occured */
}
-
/*
** Read a GIF Application Extension block.
**
@@ -281,34 +266,32 @@ ReadGifPlainText(
** otherwise 0 if no error occured.
*/
int
-ReadGifApplication(
- GIFAPPLICATION *GifApplication, /* Pointer to Application Extension structure */
- BYTE **MemGif2 /* GIF image file input FILE stream */
- )
+ReadGifApplication(GIFAPPLICATION *GifApplication, /* Pointer to Application Extension structure */
+ GIFBYTE ** MemGif2 /* GIF image file input FILE stream */
+)
{
int i;
- for (i = 0 ; i < 12 ; i++) {
- GifApplication->AEDump[i] = *(*MemGif2)++;
- }
+ for (i = 0; i < 12; i++) {
+ GifApplication->AEDump[i] = *(*MemGif2)++;
+ }
/* Read in the Plain Text data sub-blocks */
- if (!(GifApplication->ApplicationData = ReadDataSubBlocks(MemGif2 , &(GifApplication->DataSize))))
- return(1);
- /*
- GifApplication->Terminator = 0;
- */
+ if (!(GifApplication->ApplicationData = ReadDataSubBlocks(MemGif2, &(GifApplication->DataSize))))
+ return (1);
+ /*
+ GifApplication->Terminator = 0;
+ */
- /* Check for a FILE stream error */
- /*
- if (ferror(FpGif))
- return(-1);
- */
+ /* Check for a FILE stream error */
+ /*
+ if (ferror(FpGif))
+ return(-1);
+ */
- return(0); /* No FILE stream error occured */
+ return (0); /* No FILE stream error occured */
}
-
/*
** Read a GIF Comment Extension block.
**
@@ -319,22 +302,20 @@ ReadGifApplication(
** otherwise 0 if no error occured.
*/
int
-ReadGifComment(
- GIFCOMMENT *GifComment, /* Pointer to GIF Comment Extension structure */
- BYTE **MemGif2 /* GIF image file input FILE stream */
- )
+ReadGifComment(GIFCOMMENT *GifComment, /* Pointer to GIF Comment Extension structure */
+ GIFBYTE ** MemGif2 /* GIF image file input FILE stream */
+)
{
/* Read in the Plain Text data sub-blocks */
- if (!(GifComment->CommentData = ReadDataSubBlocks(MemGif2 , &(GifComment->DataSize))))
- return(1);
+ if (!(GifComment->CommentData = ReadDataSubBlocks(MemGif2, &(GifComment->DataSize))))
+ return (1);
GifComment->Terminator = 0;
- return(0); /* No FILE stream error occured */
+ return (0); /* No FILE stream error occured */
}
-
/*
** Read one or more GIF data sub-blocks and write the information
** to a buffer.
@@ -345,57 +326,49 @@ ReadGifComment(
** Returns: A NULL pointer if a memory allocation error occured,
** otherwise a valid pointer if no error occured.
*/
-static BYTE *
-ReadDataSubBlocks(BYTE **MemGif2, /* GIF image file input FILE stream */
- WORD *DSize)
+static GIFBYTE *
+ReadDataSubBlocks(GIFBYTE **MemGif2, /* GIF image file input FILE stream */
+ GIFWORD * DSize)
{
- BYTE *ptr1; /* Pointer used to "walk the heap" */
- BYTE *ptr2; /* Pointer used to mark the top of the heap */
- BYTE dataSize; /* Size of the current data sub-block being read */
- WORD bufSize; /* Total size of the Plain Text data buffer */
- int tempcount = 0;
+ GIFBYTE *ptr1; /* Pointer used to "walk the heap" */
+ GIFBYTE *ptr2; /* Pointer used to mark the top of the heap */
+ GIFBYTE dataSize; /* Size of the current data sub-block being read */
+ GIFWORD bufSize; /* Total size of the Plain Text data buffer */
+ int tempcount = 0;
- bufSize = 0; /* The output buffer is empty */
+ bufSize = 0; /* The output buffer is empty */
- dataSize = *(*MemGif2)++; /* Get the size of the first sub-block */
+ dataSize = *(*MemGif2)++; /* Get the size of the first sub-block */
/* Allocate initial data buffer */
- if (!(ptr1 = ptr2 = (BYTE *) malloc((size_t)dataSize + 1))) {
- printf("Out of memory. Allocation of memory for data sub-blocks for\neither Comment, Plain Text or Application Extensions failed");
- return((BYTE *) NULL);
- }
- for (;;)
- {
- tempcount++;
- bufSize += (dataSize); /* Running total of the buffer size */
- *DSize = bufSize;
+ if (!(ptr1 = ptr2 = (GIFBYTE *)malloc((size_t)dataSize + 1))) {
+ printf("Out of memory. Allocation of memory for data sub-blocks for\neither Comment, Plain Text or "
+ "Application Extensions failed");
+ return ((GIFBYTE *)NULL);
+ }
+ for (;;) {
+ tempcount++;
+ bufSize += (dataSize); /* Running total of the buffer size */
+ *DSize = bufSize;
#ifdef COMMENTED_OUT
- *ptr1++ = dataSize; /* Write the data count */
-#endif /* COMMENTED_OUT */
- while (dataSize--) /* Read/write the Plain Text data */
- *ptr1++ = *(*MemGif2)++;
+ *ptr1++ = dataSize; /* Write the data count */
+#endif /* COMMENTED_OUT */
+ while (dataSize--) /* Read/write the Plain Text data */
+ *ptr1++ = *(*MemGif2)++;
/* Check if there is another data sub-block */
if ((dataSize = *(*MemGif2)++) == 0)
- break; /* Block Terminator encountered */
+ break; /* Block Terminator encountered */
/* Increase the buffer size to accomodate the next sub-block */
- if (!(ptr1 = ptr2 = (BYTE *) realloc(ptr2, bufSize + dataSize + 1)))
- return((BYTE *) NULL);
-
-
- ptr1 += bufSize; /* Move pointer to the end of the data */
-
+ if (!(ptr1 = ptr2 = (GIFBYTE *)realloc(ptr2, bufSize + dataSize + 1)))
+ return ((GIFBYTE *)NULL);
+ ptr1 += bufSize; /* Move pointer to the end of the data */
}
*ptr1++ = '\0';
- return(ptr2); /* Return a pointer to the sub-block data */
+ return (ptr2); /* Return a pointer to the sub-block data */
}
-
-
-
-
-
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
index b1efabf..62dbd71 100644
--- a/hl/tools/gif2h5/h52gifgentst.c
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -6,11 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "hdf5.h"
@@ -29,11 +30,11 @@
*/
#define FILENAME "h52giftst.h5"
-#define WIDTH 400
-#define HEIGHT 200
-#define PAL_ENTRIES 256
-#define IMAGE1_NAME "image"
-#define PAL_NAME "palette"
+#define WIDTH 400
+#define HEIGHT 200
+#define PAL_ENTRIES 256
+#define IMAGE1_NAME "image"
+#define PAL_NAME "palette"
/*-------------------------------------------------------------------------
* Function: main
@@ -43,60 +44,61 @@
*-------------------------------------------------------------------------
*/
-int main(void)
+int
+main(void)
{
- hid_t fid;
- int i, j, n, space;
- unsigned char buf [ WIDTH*HEIGHT ];
- unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
- hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
- hsize_t width = WIDTH;
- hsize_t height = HEIGHT;
-
+ hid_t fid;
+ int i, j, n, space;
+ unsigned char *buf;
+ unsigned char pal[PAL_ENTRIES * 3]; /* palette array */
+ hsize_t pal_dims[2] = {PAL_ENTRIES, 3}; /* palette dimensions */
+ hsize_t width = WIDTH;
+ hsize_t height = HEIGHT;
+
+ /* Allocate buffer */
+ if (NULL == (buf = (unsigned char *)malloc(WIDTH * HEIGHT)))
+ return EXIT_FAILURE;
/* create a file */
- if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return EXIT_FAILURE;
/* create an image */
- space = WIDTH*HEIGHT / PAL_ENTRIES;
- for (i=0, j=0, n=0; i < WIDTH*HEIGHT; i++, j++ )
- {
+ space = WIDTH * HEIGHT / PAL_ENTRIES;
+ for (i = 0, j = 0, n = 0; i < WIDTH * HEIGHT; i++, j++) {
buf[i] = (unsigned char)n;
- if ( j > space )
- {
+ if (j > space) {
n++;
- j=0;
+ j = 0;
}
-
}
/* make the image */
- if (H5IMmake_image_8bit( fid, IMAGE1_NAME, width, height, buf )<0)
+ if (H5IMmake_image_8bit(fid, IMAGE1_NAME, width, height, buf) < 0)
return EXIT_FAILURE;
- /*-------------------------------------------------------------------------
- * define a palette, blue to red tones
- *-------------------------------------------------------------------------
- */
- for ( i=0, n=0; i<PAL_ENTRIES*3; i+=3, n++)
- {
- pal[i] = (unsigned char)n; /* red */
- pal[i+1] = (unsigned char)0; /* green */
- pal[i+2] = (unsigned char)(255-n); /* blue */
+ /*-------------------------------------------------------------------------
+ * define a palette, blue to red tones
+ *-------------------------------------------------------------------------
+ */
+ for (i = 0, n = 0; i < PAL_ENTRIES * 3; i += 3, n++) {
+ pal[i] = (unsigned char)n; /* red */
+ pal[i + 1] = (unsigned char)0; /* green */
+ pal[i + 2] = (unsigned char)(255 - n); /* blue */
}
/* make a palette */
- if (H5IMmake_palette( fid, PAL_NAME, pal_dims, pal )<0)
+ if (H5IMmake_palette(fid, PAL_NAME, pal_dims, pal) < 0)
return EXIT_FAILURE;
/* attach the palette to the image */
- if (H5IMlink_palette( fid, IMAGE1_NAME, PAL_NAME )<0)
+ if (H5IMlink_palette(fid, IMAGE1_NAME, PAL_NAME) < 0)
return EXIT_FAILURE;
- if(H5Fclose(fid)<0)
+ if (H5Fclose(fid) < 0)
return EXIT_FAILURE;
+ free(buf);
+
return EXIT_SUCCESS;
}
-
diff --git a/hl/tools/gif2h5/h52giftest.sh.in b/hl/tools/gif2h5/h52giftest.sh.in
index 133f574..72d77e3 100644
--- a/hl/tools/gif2h5/h52giftest.sh.in
+++ b/hl/tools/gif2h5/h52giftest.sh.in
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -75,7 +75,7 @@ TOOLTEST ./h52gif $TESTFILE1 image1.gif -i image
echo ""
# Negative tests.
-echo "**verify the the h52gif tool handle error conditions correctly..."
+echo "**verify that the h52gif tool handles error conditions correctly..."
# nonexisting dataset name
TESTING "./h52gif h52giftst.h5 image.gif -i nosuch_image"
TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i nosuch_image"
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index ce9d878..9ebfd4f 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,9 +18,8 @@
#include "h5tools.h"
#include "h5tools_utils.h"
-#define IMAGE_WIDTH_MAX 65535 /* unsigned 16bits integer */
-#define IMAGE_HEIGHT_MAX 65535 /* unsigned 16bits integer */
-
+#define IMAGE_WIDTH_MAX 65535 /* unsigned 16bits integer */
+#define IMAGE_HEIGHT_MAX 65535 /* unsigned 16bits integer */
int EndianOrder;
@@ -28,8 +27,8 @@ static void
putword(int w, FILE *fp)
{
/* writes a 16-bit integer in GIF order (LSB first) */
- fputc(w &0xff, fp);
- fputc((w>>8)&0xff,fp);
+ fputc(w & 0xff, fp);
+ fputc((w >> 8) & 0xff, fp);
}
static void
@@ -39,51 +38,53 @@ usage(void)
fprintf(stdout, " h52gif -V \n");
fprintf(stdout, " Print HDF5 library version and exit\n");
printf("h52gif expects *at least* one h5_image.\n");
-
}
FILE *fpGif = NULL;
-int main(int argc , char **argv)
+int
+main(int argc, char **argv)
{
- BYTE *Image;
+ GIFBYTE * Image;
+ void * edata;
+ H5E_auto2_t func;
/* compression structs */
- CHAR *HDFName = NULL;
- CHAR *GIFName = NULL;
+ GIFCHAR *HDFName = NULL;
+ GIFCHAR *GIFName = NULL;
- BYTE* b;
+ GIFBYTE *b;
- BYTE GlobalPalette[256][3];
- BYTE Red[256];
- BYTE Green[256];
- BYTE Blue[256];
+ GIFBYTE GlobalPalette[256][3];
+ GIFBYTE Red[256];
+ GIFBYTE Green[256];
+ GIFBYTE Blue[256];
- int RWidth, RHeight;
- int ColorMapSize, InitCodeSize, Background, BitsPerPixel;
- int j,nc;
- int i;
- int numcols;
+ int RWidth, RHeight;
+ int ColorMapSize, InitCodeSize, Background, BitsPerPixel;
+ int j, nc;
+ int i;
+ int numcols = 0;
- BYTE pc2nc[256] , r1[256] , g1[256] , b1[256];
+ GIFBYTE pc2nc[256], r1[256], g1[256], b1[256];
- int arg_index = 2;
- int bool_is_image = 0; /* 0 = false , 1 = true */
- char *image_name = NULL;
- int idx;
+ int arg_index = 2;
+ int bool_is_image = 0; /* 0 = false , 1 = true */
+ char *image_name = NULL;
+ int idx;
+
+ /* Disable error reporting */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/* Initialize h5tools lib */
h5tools_init();
- if ( argv[1] && (strcmp("-V",argv[1])==0) )
- {
+ if (argv[1] && (strcmp("-V", argv[1]) == 0)) {
print_version("gif2h5");
exit(EXIT_SUCCESS);
-
}
-
- if (argc < 4)
- {
+ if (argc < 4) {
/* they didn't supply at least one image -- bail */
usage();
return EXIT_FAILURE;
@@ -93,19 +94,17 @@ int main(int argc , char **argv)
GIFName = argv[2];
/* get the options */
- while (arg_index++ < argc - 1)
- {
- if (!strcmp(argv[arg_index] , "-i")) {
+ while (arg_index++ < argc - 1) {
+ if (!strcmp(argv[arg_index], "-i")) {
bool_is_image = 1;
continue;
}
- if (bool_is_image)
- {
+ if (bool_is_image) {
/* allocate space to store the image name */
size_t len = strlen(argv[arg_index]);
- image_name = (CHAR*) malloc( len + 1);
- strcpy(image_name , argv[arg_index]);
+ image_name = (GIFCHAR *)malloc(len + 1);
+ strcpy(image_name, argv[arg_index]);
bool_is_image = 0;
continue;
@@ -117,69 +116,74 @@ int main(int argc , char **argv)
goto out;
}
- /* Do Endian Order testing and set Endian Order */
- idx = 0x0001;
- b = (BYTE *) &idx;
- EndianOrder = (b[0] ? 1:0);
+ /* Do Endian Order testing and set Endian Order */
+ idx = 0x0001;
+ b = (GIFBYTE *)&idx;
+ EndianOrder = (b[0] ? 1 : 0);
- if (!(fpGif = fopen(GIFName , "wb")))
- {
+ if (!(fpGif = fopen(GIFName, "wb"))) {
printf("Error opening gif file for output. Aborting.\n");
goto out;
}
Background = 0;
{
- hsize_t width, height, planes;
- hid_t fid;
- char interlace[20];
- hssize_t npals;
- hsize_t pal_dims[2];
+ hsize_t width, height, planes;
+ hid_t fid;
+ char interlace[20];
+ hssize_t npals;
+ hsize_t pal_dims[2];
unsigned char *pal;
- if ((fid = H5Fopen(HDFName , H5F_ACC_RDONLY , H5P_DEFAULT)) < 0)
- {
- fprintf(stderr , "Unable to open HDF file for input. Aborting.\n");
+ if ((fid = H5Fopen(HDFName, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
+ fprintf(stderr, "Unable to open HDF file for input. Aborting.\n");
goto out;
}
- /* read image */
- if ( H5IMget_image_info( fid, image_name, &width, &height, &planes, interlace, &npals ) < 0 )
+ /* get image's information */
+ if (H5IMget_image_info(fid, image_name, &width, &height, &planes, interlace, &npals) < 0) {
+ fprintf(stderr, "Unable to get information of the image. Aborting.\n");
goto out;
+ }
- if (width > IMAGE_WIDTH_MAX || height > IMAGE_HEIGHT_MAX){
- fprintf(stderr, "HDF5 image is too large. Limit is %d by %d.\n", IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX);
- goto out;
- }
+ if (width > IMAGE_WIDTH_MAX || height > IMAGE_HEIGHT_MAX) {
+ fprintf(stderr, "HDF5 image is too large. Limit is %d by %d.\n", IMAGE_WIDTH_MAX,
+ IMAGE_HEIGHT_MAX);
+ goto out;
+ }
- /* tool can handle single plane images only. */
- if (planes > 1){
- fprintf(stderr, "Cannot handle multiple planes image\n");
- goto out;
- }
+ /* tool can handle single plane images only. */
+ if (planes > 1) {
+ fprintf(stderr, "Cannot handle multiple planes image\n");
+ goto out;
+ }
- Image = (BYTE*) malloc( (size_t) width * (size_t) height );
+ Image = (GIFBYTE *)malloc((size_t)width * (size_t)height);
- if ( H5IMread_image( fid, image_name, Image ) < 0 )
+ if (H5IMread_image(fid, image_name, Image) < 0) {
+ fprintf(stderr, "Unable to read the image. Aborting.\n");
goto out;
+ }
- if (npals)
- {
- if ( H5IMget_palette_info( fid, image_name, 0, pal_dims ) < 0 )
+ if (npals) {
+ if (H5IMget_palette_info(fid, image_name, 0, pal_dims) < 0) {
+ fprintf(stderr, "Unable to get information of the palette. Aborting.\n");
goto out;
+ }
- pal = (BYTE*) malloc( (size_t) pal_dims[0] * (size_t) pal_dims[1] );
+ pal = (GIFBYTE *)malloc((size_t)pal_dims[0] * (size_t)pal_dims[1]);
- if ( H5IMget_palette( fid, image_name, 0, pal ) < 0 )
+ if (H5IMget_palette(fid, image_name, 0, pal) < 0) {
+ fprintf(stderr, "Unable to get the palette. Aborting.\n");
goto out;
+ }
- numcols = (int) pal_dims[0];
+ numcols = (int)pal_dims[0];
- for (i = 0, j = 0 ; i < numcols ; j+=3, i++)
- {
+ for (i = 0, j = 0; i < numcols; j += 3, i++) {
GlobalPalette[i][0] = pal[j];
- GlobalPalette[i][1] = pal[j+1];
- GlobalPalette[i][2] = pal[j+2];
+ GlobalPalette[i][1] = pal[j + 1];
+ GlobalPalette[i][2] = pal[j + 2];
}
free(pal);
@@ -190,7 +194,6 @@ int main(int argc , char **argv)
RWidth = (int)width;
RHeight = (int)height;
-
/*
* If the first image does not have a palette, I make my own global
* color table Obviously this is not the best thing to do, better
@@ -200,62 +203,52 @@ int main(int argc , char **argv)
* palette
* 2. Check for palettes in any of the other images.
*/
- if (!npals)
- {
+ if (!npals) {
numcols = 256;
- for (i = 0 ; i < numcols ; i++)
- {
- Red[i] = (BYTE)(255 - i);
- Green[i] = (BYTE)(255 - i);
- Blue[i] = (BYTE)(255 - i);
+ for (i = 0; i < numcols; i++) {
+ Red[i] = (GIFBYTE)(255 - i);
+ Green[i] = (GIFBYTE)(255 - i);
+ Blue[i] = (GIFBYTE)(255 - i);
}
}
- else
- {
- for (i = 0 ; i < numcols ; i++)
- {
- Red[i] = GlobalPalette[i][0];
+ else {
+ for (i = 0; i < numcols; i++) {
+ Red[i] = GlobalPalette[i][0];
Green[i] = GlobalPalette[i][1];
- Blue[i] = GlobalPalette[i][2];
+ Blue[i] = GlobalPalette[i][2];
}
}
- for (i = 0; i < numcols; i++)
- {
+ for (i = 0; i < numcols; i++) {
pc2nc[i] = r1[i] = g1[i] = b1[i] = 0;
}
/* compute number of unique colors */
nc = 0;
- for (i = 0; i < numcols; i++)
- {
+ for (i = 0; i < numcols; i++) {
/* see if color #i is already used */
- for (j = 0; j < i; j++)
- {
+ for (j = 0; j < i; j++) {
if (Red[i] == Red[j] && Green[i] == Green[j] && Blue[i] == Blue[j])
break;
}
- if (j==i)
- {
+ if (j == i) {
/* wasn't found */
- pc2nc[i] = (BYTE)nc;
- r1[nc] = Red[i];
- g1[nc] = Green[i];
- b1[nc] = Blue[i];
+ pc2nc[i] = (GIFBYTE)nc;
+ r1[nc] = Red[i];
+ g1[nc] = Green[i];
+ b1[nc] = Blue[i];
nc++;
}
- else
- {
+ else {
pc2nc[i] = pc2nc[j];
}
}
/* figure out 'BitsPerPixel' */
- for (i = 1; i < 8; i++)
- {
- if ((1<<i) >= nc)
+ for (i = 1; i < 8; i++) {
+ if ((1 << i) >= nc)
break;
}
@@ -267,59 +260,54 @@ int main(int argc , char **argv)
else
InitCodeSize = BitsPerPixel;
- if (!fpGif)
- {
- fprintf(stderr, "WriteGIF: file not open for writing\n" );
+ if (!fpGif) {
+ fprintf(stderr, "WriteGIF: file not open for writing\n");
goto out;
}
+ fwrite("GIF87a", sizeof(char), 6, fpGif); /* the GIF magic number */
- fwrite("GIF87a", sizeof( char ), 6, fpGif); /* the GIF magic number */
-
- putword(RWidth, fpGif); /* screen descriptor */
+ putword(RWidth, fpGif); /* screen descriptor */
putword(RHeight, fpGif);
- i = 0x00; /* No, there is no color map */
- i |= (8-1)<<4; /* OR in the color resolution (hardwired 8) */
- i |= (BitsPerPixel - 1); /* OR in the # of bits per pixel */
- fputc(i,fpGif);
-
- fputc(Background,fpGif); /* background color */
- fputc(0, fpGif); /* future expansion byte */
+ i = 0x00; /* No, there is no color map */
+ i |= (8 - 1) << 4; /* OR in the color resolution (hardwired 8) */
+ i |= (BitsPerPixel - 1); /* OR in the # of bits per pixel */
+ fputc(i, fpGif);
+ fputc(Background, fpGif); /* background color */
+ fputc(0, fpGif); /* future expansion byte */
/*
* Put Image Descriptor
* Hardwiring Left Offset and Top Offset to 0x00
*/
- fputc(0x2c , fpGif);
- putword(0x00 , fpGif);
- putword(0x00 , fpGif);
- putword(RWidth , fpGif);
- putword(RHeight , fpGif);
+ fputc(0x2c, fpGif);
+ putword(0x00, fpGif);
+ putword(0x00, fpGif);
+ putword(RWidth, fpGif);
+ putword(RHeight, fpGif);
/* since we always have a local color palette ... */
- fputc((0x80 | (BitsPerPixel - 1)) , fpGif);
+ fputc((0x80 | (BitsPerPixel - 1)), fpGif);
- for (i = 0; i < ColorMapSize; i++)
- {
+ for (i = 0; i < ColorMapSize; i++) {
/* write out Global colormap */
fputc(r1[i], fpGif);
fputc(g1[i], fpGif);
fputc(b1[i], fpGif);
}
- fputc(InitCodeSize , fpGif);
+ fputc(InitCodeSize, fpGif);
- i = hdfWriteGIF(fpGif , Image , 0 , RHeight , RWidth , r1, g1 , b1 , pc2nc , 256 , 8 , BitsPerPixel);
+ i = hdfWriteGIF(fpGif, Image, 0, RHeight, RWidth, r1, g1, b1, pc2nc, 256, 8, BitsPerPixel);
fputc(0x00, fpGif);
free(Image);
}
- if (fputc(';',fpGif) == EOF)
- {
+ if (fputc(';', fpGif) == EOF) {
/* Write GIF file terminator */
- fprintf(stderr , "Error!");
+ fprintf(stderr, "Error!");
goto out;
}
@@ -328,8 +316,9 @@ int main(int argc , char **argv)
if (image_name != NULL)
free(image_name);
- return EXIT_SUCCESS;
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+ return EXIT_SUCCESS;
out:
@@ -338,5 +327,7 @@ out:
if (image_name != NULL)
free(image_name);
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+
return EXIT_FAILURE;
}
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index 6f5ab58..c3c14e1 100644
--- a/hl/tools/gif2h5/hdfgifwr.c
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -44,14 +44,13 @@
* Joe Orost (decvax!vax135!petsd!joe)
*****************************************************************/
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gif.h"
-typedef BYTE byte;
+typedef GIFBYTE byte;
typedef long int count_int;
#ifdef __STDC__
@@ -65,29 +64,29 @@ static void flush_char(void);
#else
static void compress(), output(), cl_block(), cl_hash();
static void char_init(), char_out(), flush_char();
-#endif /* __STDC__ */
+#endif /* __STDC__ */
static byte pc2nc[256];
/*************************************************************/
-int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
- byte *gmap, byte *bmap, byte *pc2ncmap, int numcols,
- int colorstyle, int BitsPerPixel)
+int
+hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap, byte *bmap, byte *pc2ncmap,
+ int numcols, int colorstyle, int BitsPerPixel)
{
- int InitCodeSize;
- int i;
+ int InitCodeSize;
+ int i;
byte *pic8 = pic;
/* Shut compiler up... */
- ptype=ptype;
- rmap=rmap;
- gmap=gmap;
- bmap=bmap;
- numcols=numcols;
- colorstyle=colorstyle;
+ ptype = ptype;
+ rmap = rmap;
+ gmap = gmap;
+ bmap = bmap;
+ numcols = numcols;
+ colorstyle = colorstyle;
for (i = 0; i < 256; i++) {
- pc2nc[i] = pc2ncmap[i];
+ pc2nc[i] = pc2ncmap[i];
}
if (BitsPerPixel <= 1)
@@ -96,40 +95,40 @@ int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
InitCodeSize = BitsPerPixel;
if (!fp) {
- fprintf(stderr, "WriteGIF: file not open for writing\n" );
+ fprintf(stderr, "WriteGIF: file not open for writing\n");
return (1);
}
- compress(InitCodeSize+1, fp, pic8, w*h);
+ compress(InitCodeSize + 1, fp, pic8, w * h);
if (ferror(fp))
return -1;
- return 0 ;
+ return 0;
}
/***********************************************************************/
static unsigned long cur_accum = 0;
-static int cur_bits = 0;
+static int cur_bits = 0;
-#define MAXCODE(n_bits) ( (1 << (n_bits)) - 1)
-#define XV_BITS 12 /* BITS was already defined on some systems */
-#define HSIZE 5003 /* 80% occupancy */
+#define MAXCODE(n_bits) ((1 << (n_bits)) - 1)
+#define XV_BITS 12 /* BITS was already defined on some systems */
+#define HSIZE 5003 /* 80% occupancy */
-typedef unsigned char char_type;
+typedef unsigned char char_type;
static int n_bits; /* number of bits/code */
static int maxbits = XV_BITS; /* user settable max # bits/code */
static int maxcode; /* maximum code, given n_bits */
static int maxmaxcode = 1 << XV_BITS; /* NEVER generate this */
-static count_int htab [HSIZE];
-static unsigned short codetab [HSIZE];
+static count_int htab[HSIZE];
+static unsigned short codetab[HSIZE];
-#define HashTabOf(i) htab[i]
-#define CodeTabOf(i) codetab[i]
+#define HashTabOf(i) htab[i]
+#define CodeTabOf(i) codetab[i]
-static int hsize = HSIZE; /* for dynamic table sizing */
+static int hsize = HSIZE; /* for dynamic table sizing */
/*
* To save much memory, we overlay the table used by compress() with those
@@ -140,7 +139,7 @@ static int hsize = HSIZE; /* for dynamic table sizing */
* used to be 8000 characters).
*/
-static int free_ent = 0; /* first unused entry */
+static int free_ent = 0; /* first unused entry */
/*
* block compression parameters -- after all codes are used up,
@@ -148,8 +147,8 @@ static int free_ent = 0; /* first unused entry */
*/
static int clear_flg = 0;
-static long int in_count = 1; /* length of input */
-static long int out_count = 0; /* # of codes output (for debugging) */
+static long int in_count = 1; /* length of input */
+static long int out_count = 0; /* # of codes output (for debugging) */
/*
* compress stdin to stdout
@@ -167,22 +166,23 @@ static long int out_count = 0; /* # of codes output (for debugging) */
* about this implementation to ames!jaw.
*/
-static int g_init_bits;
+static int g_init_bits;
static FILE *g_outfile;
static int ClearCode;
static int EOFCode;
/********************************************************/
-static void compress(int init_bits, FILE *outfile, byte *data, int len)
+static void
+compress(int init_bits, FILE *outfile, byte *data, int len)
{
register long fcode;
- register int i = 0;
- register int c;
- register int ent;
- register int disp;
- register int hsize_reg;
- register int hshift;
+ register int i = 0;
+ register int c;
+ register int ent;
+ register int disp;
+ register int hsize_reg;
+ register int hshift;
/*
* Set up the globals: g_init_bits - initial number of bits g_outfile -
@@ -192,40 +192,40 @@ static void compress(int init_bits, FILE *outfile, byte *data, int len)
g_outfile = outfile;
/* initialize 'compress' globals */
- maxbits = XV_BITS;
- maxmaxcode = 1<<XV_BITS;
+ maxbits = XV_BITS;
+ maxmaxcode = 1 << XV_BITS;
memset(htab, 0, sizeof(htab));
memset(codetab, 0, sizeof(codetab));
- hsize = HSIZE;
- free_ent = 0;
+ hsize = HSIZE;
+ free_ent = 0;
clear_flg = 0;
- in_count = 1;
+ in_count = 1;
out_count = 0;
cur_accum = 0;
- cur_bits = 0;
+ cur_bits = 0;
/* Set up the necessary values */
out_count = 0;
clear_flg = 0;
- in_count = 1;
- maxcode = MAXCODE(n_bits = g_init_bits);
+ in_count = 1;
+ maxcode = MAXCODE(n_bits = g_init_bits);
ClearCode = (1 << (init_bits - 1));
- EOFCode = ClearCode + 1;
- free_ent = ClearCode + 2;
+ EOFCode = ClearCode + 1;
+ free_ent = ClearCode + 2;
char_init();
ent = pc2nc[*data++];
len--;
hshift = 0;
- for (fcode = (long)hsize; fcode < 65536L; fcode *= 2L )
+ for (fcode = (long)hsize; fcode < 65536L; fcode *= 2L)
hshift++;
hshift = 8 - hshift; /* set hash code range bound */
hsize_reg = hsize;
- cl_hash( (count_int) hsize_reg); /* clear hash table */
+ cl_hash((count_int)hsize_reg); /* clear hash table */
output(ClearCode);
@@ -234,32 +234,33 @@ static void compress(int init_bits, FILE *outfile, byte *data, int len)
len--;
in_count++;
- fcode = (long)(((long) c << maxbits) + ent);
- i = (((int) c << hshift) ^ ent); /* xor hashing */
+ fcode = (long)(((long)c << maxbits) + ent);
+ i = (((int)c << hshift) ^ ent); /* xor hashing */
- if ( HashTabOf (i) == fcode ) {
- ent = CodeTabOf (i);
+ if (HashTabOf(i) == fcode) {
+ ent = CodeTabOf(i);
continue;
- } else if ( (long)HashTabOf (i) < 0) {
+ }
+ else if ((long)HashTabOf(i) < 0) {
/* empty slot */
goto nomatch;
}
- disp = hsize_reg - i; /* secondary hash (after G. Knott) */
+ disp = hsize_reg - i; /* secondary hash (after G. Knott) */
- if ( i == 0 )
+ if (i == 0)
disp = 1;
probe:
if ((i -= disp) < 0)
i += hsize_reg;
- if (HashTabOf (i) == fcode) {
- ent = CodeTabOf (i);
+ if (HashTabOf(i) == fcode) {
+ ent = CodeTabOf(i);
continue;
}
- if ((long)HashTabOf (i) >= 0)
+ if ((long)HashTabOf(i) >= 0)
goto probe;
nomatch:
@@ -268,9 +269,10 @@ nomatch:
ent = c;
if (free_ent < maxmaxcode) {
- CodeTabOf (i) = (unsigned short)free_ent++; /* code -> hashtable */
- HashTabOf (i) = fcode;
- } else {
+ CodeTabOf(i) = (unsigned short)free_ent++; /* code -> hashtable */
+ HashTabOf(i) = fcode;
+ }
+ else {
cl_block();
}
}
@@ -281,7 +283,6 @@ nomatch:
output(EOFCode);
}
-
/*****************************************************************
* TAG( output )
*
@@ -299,11 +300,8 @@ nomatch:
* code in turn. When the buffer fills up empty it and start over.
*/
-static
-unsigned long masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
- 0x001F, 0x003F, 0x007F, 0x00FF,
- 0x01FF, 0x03FF, 0x07FF, 0x0FFF,
- 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
+static unsigned long masks[] = {0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF,
+ 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF};
static void
output(int code)
@@ -317,8 +315,8 @@ output(int code)
cur_bits += n_bits;
- while( cur_bits >= 8 ) {
- char_out( (int)((unsigned int) cur_accum & 0xff) );
+ while (cur_bits >= 8) {
+ char_out((int)((unsigned int)cur_accum & 0xff));
cur_accum >>= 8;
cur_bits -= 8;
}
@@ -329,12 +327,13 @@ output(int code)
*/
if (free_ent > maxcode || clear_flg) {
if (clear_flg) {
- maxcode = MAXCODE (n_bits = g_init_bits);
+ maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg = 0;
- } else {
+ }
+ else {
n_bits++;
- if ( n_bits == maxbits )
+ if (n_bits == maxbits)
maxcode = maxmaxcode;
else
maxcode = MAXCODE(n_bits);
@@ -343,17 +342,17 @@ output(int code)
if (code == EOFCode) {
/* At EOF, write the rest of the buffer */
- while( cur_bits > 0 ) {
- char_out( (int)((unsigned int)cur_accum & 0xff) );
+ while (cur_bits > 0) {
+ char_out((int)((unsigned int)cur_accum & 0xff));
cur_accum >>= 8;
cur_bits -= 8;
}
flush_char();
- fflush( g_outfile );
+ fflush(g_outfile);
#ifdef FOO
- if(ferror( g_outfile))
+ if (ferror(g_outfile))
FatalError("unable to write GIF file");
#endif
}
@@ -361,45 +360,45 @@ output(int code)
/********************************/
static void
-cl_block(void) /* table clear for block compress */
+cl_block(void) /* table clear for block compress */
{
/* Clear out the hash table */
- cl_hash((count_int) hsize);
- free_ent = ClearCode + 2;
+ cl_hash((count_int)hsize);
+ free_ent = ClearCode + 2;
clear_flg = 1;
output(ClearCode);
}
/********************************/
static void
-cl_hash(count_int hashsize) /* reset code table */
+cl_hash(count_int hashsize) /* reset code table */
{
- count_int *htab_p = htab+hashsize;
- long i, m1 = -1;
+ count_int *htab_p = htab + hashsize;
+ long i, m1 = -1;
i = hashsize - 16;
- do { /* might use Sys V memset(3) here */
- *(htab_p-16) = m1;
- *(htab_p-15) = m1;
- *(htab_p-14) = m1;
- *(htab_p-13) = m1;
- *(htab_p-12) = m1;
- *(htab_p-11) = m1;
- *(htab_p-10) = m1;
- *(htab_p-9) = m1;
- *(htab_p-8) = m1;
- *(htab_p-7) = m1;
- *(htab_p-6) = m1;
- *(htab_p-5) = m1;
- *(htab_p-4) = m1;
- *(htab_p-3) = m1;
- *(htab_p-2) = m1;
- *(htab_p-1) = m1;
+ do { /* might use Sys V memset(3) here */
+ *(htab_p - 16) = m1;
+ *(htab_p - 15) = m1;
+ *(htab_p - 14) = m1;
+ *(htab_p - 13) = m1;
+ *(htab_p - 12) = m1;
+ *(htab_p - 11) = m1;
+ *(htab_p - 10) = m1;
+ *(htab_p - 9) = m1;
+ *(htab_p - 8) = m1;
+ *(htab_p - 7) = m1;
+ *(htab_p - 6) = m1;
+ *(htab_p - 5) = m1;
+ *(htab_p - 4) = m1;
+ *(htab_p - 3) = m1;
+ *(htab_p - 2) = m1;
+ *(htab_p - 1) = m1;
htab_p -= 16;
} while ((i -= 16) >= 0);
- for ( i += 16; i > 0; i-- )
+ for (i += 16; i > 0; i--)
*--htab_p = m1;
}
@@ -426,7 +425,7 @@ char_init(void)
/*
* Define the storage for the packet accumulator
*/
-static char accum[ 256 ];
+static char accum[256];
/*
* Add a character to the end of the current packet, and if it is 254
@@ -435,7 +434,7 @@ static char accum[ 256 ];
static void
char_out(int c)
{
- accum[ a_count++ ] = (char)c;
+ accum[a_count++] = (char)c;
if (a_count >= 254)
flush_char();
@@ -448,8 +447,8 @@ static void
flush_char(void)
{
if (a_count > 0) {
- fputc( a_count, g_outfile );
- fwrite( accum, (size_t)1, (size_t)a_count, g_outfile);
+ fputc(a_count, g_outfile);
+ fwrite(accum, (size_t)1, (size_t)a_count, g_outfile);
a_count = 0;
}
}
diff --git a/hl/tools/gif2h5/testfiles/REAMDE b/hl/tools/gif2h5/testfiles/README
index a428d47..a428d47 100644
--- a/hl/tools/gif2h5/testfiles/REAMDE
+++ b/hl/tools/gif2h5/testfiles/README
diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c
index b656c36..6ec6af4 100644
--- a/hl/tools/gif2h5/writehdf.c
+++ b/hl/tools/gif2h5/writehdf.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -37,21 +37,21 @@
int
WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName)
{
- GIFHEAD gifHead; /* GIF Header structure */
- GIFIMAGEDESC *gifImageDesc; /* Logical Image Descriptor struct */
- int has_pal=0;
+ GIFHEAD gifHead; /* GIF Header structure */
+ GIFIMAGEDESC *gifImageDesc; /* Logical Image Descriptor struct */
+ int has_pal = 0;
- long ImageCount; /* number of images */
+ long ImageCount; /* number of images */
#ifdef UNUSED
- long CommentCount, /* number of comments */
- ApplicationCount, /* number of application extensions */
- PlainTextCount; /* number of plain text extensions */
-#endif /* UNUSED */
+ long CommentCount, /* number of comments */
+ ApplicationCount, /* number of application extensions */
+ PlainTextCount; /* number of plain text extensions */
+#endif /* UNUSED */
- char ImageName[256]; /* Image name for the Image */
+ char ImageName[256]; /* Image name for the Image */
/* H5 variables */
- hid_t file_id; /* H5 file id */
+ hid_t file_id; /* H5 file id */
/* temp counter */
int i;
@@ -62,35 +62,36 @@ WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName)
/* get some data from gifHead */
ImageCount = gifHead.ImageCount;
#ifdef UNUSED
- CommentCount = (WORD)gifHead.CommentCount;
- ApplicationCount = (WORD)gifHead.ApplicationCount;
- PlainTextCount = (WORD)gifHead.PlainTextCount;
+ CommentCount = (GIFWORD)gifHead.CommentCount;
+ ApplicationCount = (GIFWORD)gifHead.ApplicationCount;
+ PlainTextCount = (GIFWORD)gifHead.PlainTextCount;
#endif /* UNUSED */
- if ((file_id = H5Fcreate(HDFName , H5F_ACC_TRUNC , H5P_DEFAULT , H5P_DEFAULT)) < 0) {
+ if ((file_id = H5Fcreate(HDFName, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
/* error occured opening the HDF File for write */
- fprintf(stderr , "HDF file could not be opened for writing\n");
- fprintf(stderr , "NOTE: GIF file must be present in the same directory as the binary on UNIX systems.\n");
+ fprintf(stderr, "HDF file could not be opened for writing\n");
+ fprintf(stderr,
+ "NOTE: GIF file must be present in the same directory as the binary on UNIX systems.\n");
exit(1);
}
/* first create the global palette if there is one */
if (gifHead.PackedField & 0x80) { /* global palette exists */
- hsize_t dims[2]; /* specify the dimensions of the palette */
+ hsize_t dims[2]; /* specify the dimensions of the palette */
/* size of the palette is tablesize (rows) X 3 (columns) */
dims[0] = gifHead.TableSize;
dims[1] = 3;
/* make a palette */
- if (H5IMmake_palette(file_id,PAL_NAME,dims,(unsigned char *)gifHead.HDFPalette)<0)
- return -1;
+ if (H5IMmake_palette(file_id, PAL_NAME, dims, (unsigned char *)gifHead.HDFPalette) < 0)
+ return -1;
- has_pal=1;
+ has_pal = 1;
}
- for(i = 0; i < ImageCount; i++) {
- hsize_t dims[2]; /* dimensions for the dataset */
+ for (i = 0; i < ImageCount; i++) {
+ hsize_t dims[2]; /* dimensions for the dataset */
/* get the gifImageDesc */
gifImageDesc = GifMemoryStruct.GifImageDesc[i];
@@ -99,26 +100,24 @@ WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName)
dims[1] = gifImageDesc->ImageWidth;
/* create the image name */
- sprintf(ImageName , "Image%d" , i);
+ sprintf(ImageName, "Image%d", i);
/* write image */
- if (H5IMmake_image_8bit(file_id,ImageName,dims[1],dims[0],(gifImageDesc->Image))<0)
- return -1;
+ if (H5IMmake_image_8bit(file_id, ImageName, dims[1], dims[0], (gifImageDesc->Image)) < 0)
+ return -1;
/* attach the palette to the image dataset */
- if (has_pal)
- {
- if (H5IMlink_palette(file_id,ImageName,PAL_NAME)<0)
+ if (has_pal) {
+ if (H5IMlink_palette(file_id, ImageName, PAL_NAME) < 0)
return -1;
}
}
/* close the H5 file */
if (H5Fclose(file_id) < 0) {
- fprintf(stderr , "Could not close HDF5 file. Aborting...\n");
+ fprintf(stderr, "Could not close HDF5 file. Aborting...\n");
return -1;
}
return 0;
}
-
diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4
index 922320c..2779066 100644
--- a/m4/aclocal_cxx.m4
+++ b/m4/aclocal_cxx.m4
@@ -7,9 +7,9 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
-dnl dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-dnl dnl If you do not have access to either file, you may request a copy from
-dnl dnl help@hdfgroup.org
+dnl distribution tree, or in https://www.hdfgroup.org/licenses.
+dnl If you do not have access to either file, you may request a copy from
+dnl help@hdfgroup.org
dnl
dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
@@ -24,14 +24,11 @@ dnl we need as part of the C++ support. To distinquish these, they
dnl have a [PAC] prefix.
dnl Checking if C++ needs old style header files in includes
-
AC_DEFUN([PAC_PROG_CXX_HEADERS],[
AC_MSG_CHECKING([if $CXX needs old style header files in includes])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-#include <iostream>
+ TEST_SRC="`(echo \"#define OLD_HEADER_FILENAME 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-int main(void) { return 0; }
- ])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])
CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
@@ -39,80 +36,43 @@ int main(void) { return 0; }
])
dnl Checking if ++ can handle namespaces
-
AC_DEFUN([PAC_PROG_CXX_NAMESPACE],[
AC_MSG_CHECKING([if $CXX can handle namespaces])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-namespace H5 {
-int fnord;
-}
+ TEST_SRC="`(echo \"#define HDF_NO_NAMESPACE 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-int main(void) {
- using namespace H5;
- fnord = 37;
- return 0;
-}
- ])], [AC_MSG_RESULT([yes])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"])
+ CXXFLAGS="${CXXFLAGS} -DHDF_NO_NAMESPACE"
+ AM_CXXFLAGS="${AM_CXXFLAGS} -DHDF_NO_NAMESPACE"])
])
dnl Checking if C++ supports std
-
AC_DEFUN([PAC_PROG_CXX_STD],[
AC_MSG_CHECKING([if $CXX supports std])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-#include <string>
-
-using namespace std;
+ TEST_SRC="`(echo \"#define HDF_NO_STD 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-int main(void) {
- string myString("testing namespace std");
- return 0;
-}
- ])], [AC_MSG_RESULT([yes])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"])
])
dnl Checking if C++ has offsetof extension
-
AC_DEFUN([PAC_PROG_CXX_OFFSETOF],[
AC_MSG_CHECKING([if $CXX has offsetof extension])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
- #include <stdio.h>
- #include <stddef.h>
- ],[
- struct index_st
- {
- unsigned char type;
- unsigned char num;
- unsigned int len;
- };
- typedef struct index_st index_t;
- int x,y;
- x = offsetof(struct index_st, len);
- y = offsetof(index_t, num)
- ])],[AC_MSG_RESULT([yes])
+ TEST_SRC="`(echo \"#define CXX_HAVE_OFFSETOF 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
+
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],[AC_MSG_RESULT([yes])
AC_DEFINE([CXX_HAVE_OFFSETOF], [1], [Define if C++ compiler recognizes offsetof])],
AC_MSG_RESULT([no]))
])
dnl Checking if C++ can handle static cast
-
AC_DEFUN([PAC_PROG_CXX_STATIC_CAST],[
AC_MSG_CHECKING([if $CXX can handle static cast])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-int main(void) {
- float test_float;
- int test_int;
- test_float = 37.0;
- test_int = static_cast <int> (test_float);
- return 0;
-}
- ])], [AC_MSG_RESULT([yes])],
+ TEST_SRC="`(echo \"#define NO_STATIC_CAST 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
+
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"])
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
new file mode 100644
index 0000000..4308687
--- /dev/null
+++ b/m4/aclocal_fc.f90
@@ -0,0 +1,162 @@
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This file contains all the configure test programs
+! used by autotools and cmake. This avoids having to
+! duplicate code for both cmake and autotool tests.
+! For autotools, a program below is chosen via a
+! sed command in aclocal_fc.m4. For cmake, a program
+! below is chosen via the macro READ_SOURCE in
+! HDF5UseFortran.cmake
+!
+
+PROGRAM PROG_FC_ISO_FORTRAN_ENV
+ USE, INTRINSIC :: ISO_FORTRAN_ENV
+END PROGRAM PROG_FC_ISO_FORTRAN_ENV
+
+PROGRAM PROG_FC_SIZEOF
+ i = sizeof(x)
+END PROGRAM PROG_FC_SIZEOF
+
+PROGRAM PROG_FC_C_SIZEOF
+ USE ISO_C_BINDING
+ INTEGER(C_INT) :: a
+ INTEGER(C_SIZE_T) :: RESULT
+ RESULT = C_SIZEOF(a)
+END PROGRAM PROG_FC_C_SIZEOF
+
+PROGRAM PROG_FC_STORAGE_SIZE
+ INTEGER :: a
+ INTEGER :: RESULT
+ RESULT = STORAGE_SIZE(a)
+END PROGRAM PROG_FC_STORAGE_SIZE
+
+PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE
+ USE ISO_C_BINDING
+ REAL(KIND=C_LONG_DOUBLE) :: d
+END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE
+
+PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS
+ USE iso_c_binding
+ IMPLICIT NONE
+ TYPE(C_PTR) :: ptr
+ TYPE(C_FUNPTR) :: funptr
+ CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
+ ptr = C_LOC(ichr(1:1))
+END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS
+
+!---- START ----- Check to see C_LONG_DOUBLE is different from C_DOUBLE
+MODULE type_mod
+ USE ISO_C_BINDING
+ INTERFACE h5t
+ MODULE PROCEDURE h5t_c_double
+ MODULE PROCEDURE h5t_c_long_double
+ END INTERFACE
+CONTAINS
+ SUBROUTINE h5t_c_double(r)
+ REAL(KIND=C_DOUBLE) :: r
+ END SUBROUTINE h5t_c_double
+ SUBROUTINE h5t_c_long_double(d)
+ REAL(KIND=C_LONG_DOUBLE) :: d
+ END SUBROUTINE h5t_c_long_double
+END MODULE type_mod
+PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE
+ USE ISO_C_BINDING
+ USE type_mod
+ REAL(KIND=C_DOUBLE) :: r
+ REAL(KIND=C_LONG_DOUBLE) :: d
+ CALL h5t(r)
+ CALL h5t(d)
+END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE
+!---- END ------- Check to see C_LONG_DOUBLE is different from C_DOUBLE
+
+!---- START ----- Determine the available KINDs for REALs and INTEGERs
+PROGRAM FC_AVAIL_KINDS
+ IMPLICIT NONE
+ INTEGER :: ik, jk, k, kk, max_decimal_prec
+ INTEGER :: prev_rkind, num_rkinds = 1, num_ikinds = 1
+ INTEGER, DIMENSION(1:10) :: list_ikinds = -1
+ INTEGER, DIMENSION(1:10) :: list_rkinds = -1
+ LOGICAL :: new_kind
+
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+
+ ! Find integer KINDs
+ list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
+ DO ik = 2, 36
+ k = SELECTED_INT_KIND(ik)
+ IF(k.LT.0) EXIT
+ IF(k.GT.list_ikinds(num_ikinds))THEN
+ num_ikinds = num_ikinds + 1
+ list_ikinds(num_ikinds) = k
+ ENDIF
+ ENDDO
+
+ DO k = 1, num_ikinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
+ IF(k.NE.num_ikinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ ! Find real KINDs
+ list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
+ max_decimal_prec = 1
+ prev_rkind=list_rkinds(num_rkinds)
+
+ prec: DO ik = 2, 36
+ exp: DO jk = 1, 700
+ k = SELECTED_REAL_KIND(ik,jk)
+ IF(k.LT.0) EXIT exp
+ IF(k.NE.prev_rkind)THEN
+ ! Check if we aleady have that kind
+ new_kind = .TRUE.
+ DO kk = 1, num_rkinds
+ IF(k.EQ.list_rkinds(kk))THEN
+ new_kind=.FALSE.
+ EXIT
+ ENDIF
+ ENDDO
+ IF(new_kind)THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ prev_rkind=list_rkinds(num_rkinds)
+ ENDIF
+ ENDIF
+ max_decimal_prec = ik
+ ENDDO exp
+ ENDDO prec
+
+ DO k = 1, num_rkinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
+ IF(k.NE.num_rkinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ WRITE(8,'(I0)') max_decimal_prec
+ WRITE(8,'(I0)') num_ikinds
+ WRITE(8,'(I0)') num_rkinds
+END PROGRAM FC_AVAIL_KINDS
+!---- END ----- Determine the available KINDs for REALs and INTEGERs
+
+PROGRAM FC_MPI_CHECK
+ INCLUDE 'mpif.h'
+ INTEGER :: comm, amode, info, fh, ierror
+ CHARACTER(LEN=1) :: filename
+ CALL MPI_File_open( comm, filename, amode, info, fh, ierror)
+END PROGRAM FC_MPI_CHECK
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index 227e760..17f2329 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -7,9 +7,9 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
-dnl dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-dnl dnl If you do not have access to either file, you may request a copy from
-dnl dnl help@hdfgroup.org
+dnl distribution tree, or in https://www.hdfgroup.org/licenses.
+dnl If you do not have access to either file, you may request a copy from
+dnl help@hdfgroup.org
dnl
dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
@@ -61,16 +61,24 @@ dnl was required" problem when libtool is also used
dnl [1] MPICH.org
dnl
+dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV"
+
+AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[
+ HAVE_ISO_FORTRAN_ENV="no"
+ AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV])
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_ISO_FORTRAN_ENV/,/END PROGRAM PROG_FC_ISO_FORTRAN_ENV/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes])
+ HAVE_ISO_FORTRAN_ENV="yes"],
+ [AC_MSG_RESULT([no])])
+])
+
dnl See if the fortran compiler supports the intrinsic function "SIZEOF"
AC_DEFUN([PAC_PROG_FC_SIZEOF],[
HAVE_SIZEOF_FORTRAN="no"
AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
- PROGRAM main
- i = sizeof(x)
- END PROGRAM
- ])],[AC_MSG_RESULT([yes])
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_SIZEOF/,/END PROGRAM PROG_FC_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes])
HAVE_SIZEOF_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -80,14 +88,8 @@ dnl See if the fortran compiler supports the intrinsic function "C_SIZEOF"
AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[
HAVE_C_SIZEOF_FORTRAN="no"
AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
- PROGRAM main
- USE ISO_C_BINDING
- INTEGER(C_INT) :: a
- INTEGER(C_SIZE_T) :: result
- result = C_SIZEOF(a)
- END PROGRAM
- ])], [AC_MSG_RESULT([yes])
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_C_SIZEOF/,/END PROGRAM PROG_FC_C_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
HAVE_C_SIZEOF_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -97,28 +99,48 @@ dnl See if the fortran compiler supports the intrinsic function "STORAGE_SIZE"
AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[
HAVE_STORAGE_SIZE_FORTRAN="no"
AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
- PROGRAM main
- INTEGER :: a
- INTEGER :: result
- result = STORAGE_SIZE(a)
- END PROGRAM
- ])], [AC_MSG_RESULT([yes])
+ TEST_SRC="`sed -ne '/PROGRAM PROG_FC_STORAGE_SIZE/,/END PROGRAM PROG_FC_STORAGE_SIZE/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
HAVE_STORAGE_SIZE_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
+dnl Check to see C_LONG_DOUBLE is available
+
+AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[
+ HAVE_C_LONG_DOUBLE_FORTRAN="no"
+ AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_LONG_DOUBLE])
+ TEST_SRC=""
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/,/END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ HAVE_C_LONG_DOUBLE_FORTRAN="yes"],
+ [AC_MSG_RESULT([no])])
+])
+
+dnl Check if C_LONG_DOUBLE is different from C_DOUBLE
+
+if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then
+AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[
+ C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no"
+ AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE])
+ TEST_SRC="`sed -n '/MODULE type_mod/,/END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"],
+ [AC_MSG_RESULT([no])])
+])
+fi
+
dnl Check to see if -r8 was specified to determine if we need to
dnl compile the DOUBLE PRECISION interfaces.
AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[
- FORTRAN_DEFAULT_REALisDBLE="no"
+ FORTRAN_DEFAULT_REALisDBLE="no"
AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION])
-
+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
MODULE type_mod
- INTERFACE h5t
+ INTERFACE h5t
MODULE PROCEDURE h5t_real
MODULE PROCEDURE h5t_dble
END INTERFACE
@@ -137,7 +159,7 @@ AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[
CALL h5t(r)
CALL h5t(d)
END PROGRAM main
- ])], [AC_MSG_RESULT([no])],
+ ])], [AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])
FORTRAN_DEFAULT_REALisDBLE="yes"])
])
@@ -146,25 +168,12 @@ dnl Checking if the compiler supports the required Fortran 2003 features and
dnl disable Fortran 2003 if it does not.
AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[
+ HAVE_F2003_REQUIREMENTS="no"
AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF])
-dnl --------------------------------------------------------------------
-dnl Default for FORTRAN 2003 compliant compilers
-dnl
- HAVE_FORTRAN_2003="no"
- HAVE_F2003_REQUIREMENTS="no"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[
-
- USE iso_c_binding
- IMPLICIT NONE
- TYPE(C_PTR) :: ptr
- TYPE(C_FUNPTR) :: funptr
- CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
-
- ptr = C_LOC(ichr(1:1))
-
- ])],[AC_MSG_RESULT([yes])
- HAVE_F2003_REQUIREMENTS=[yes]],
- [AC_MSG_RESULT([no])])
+ TEST_SRC="`sed -n '/PROG_FC_HAVE_F2003_REQUIREMENTS/,/END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS/p' $srcdir/m4/aclocal_fc.f90`"
+ AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ HAVE_F2003_REQUIREMENTS="yes"],
+ [AC_MSG_RESULT([no])])
])
dnl -------------------------------------------------------------------------
@@ -261,16 +270,10 @@ AC_DEFUN([PAC_PROG_FC_MPI_CHECK],[
dnl Change to the Fortran 90 language
AC_LANG_PUSH(Fortran)
-
+ TEST_SRC="`sed -n '/PROGRAM FC_MPI_CHECK/,/END PROGRAM FC_MPI_CHECK/p' $srcdir/m4/aclocal_fc.f90`"
dnl Try link a simple MPI program.
AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked])
- AC_LINK_IFELSE([
- PROGRAM main
- USE mpi
- INTEGER :: comm, amode, info, fh, ierror
- CHARACTER(LEN=1) :: filename
- CALL MPI_File_open( comm, filename, amode, info, fh, ierror)
- END],
+ AC_LINK_IFELSE([$TEST_SRC],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])])
@@ -278,4 +281,231 @@ dnl Try link a simple MPI program.
dnl Change to the C language
AC_LANG_POP(Fortran)
])
+
+dnl ------------------------------------------------------
+dnl Determine the available KINDs for REALs and INTEGERs
+dnl ------------------------------------------------------
+dnl
+dnl This is a runtime test.
+dnl
+AC_DEFUN([PAC_FC_AVAIL_KINDS],[
+AC_LANG_PUSH([Fortran])
+rm -f pac_fconftest.out
+TEST_SRC="`sed -n '/PROGRAM FC_AVAIL_KINDS/,/END PROGRAM FC_AVAIL_KINDS/p' $srcdir/m4/aclocal_fc.f90`"
+AC_RUN_IFELSE([$TEST_SRC],
+ [
+ if test -s pac_fconftest.out ; then
+ dnl The output from the above program will be:
+ dnl -- LINE 1 -- valid integer kinds (comma seperated list)
+ dnl -- LINE 2 -- valid real kinds (comma seperated list)
+ dnl -- LINE 3 -- max decimal precision for reals
+ dnl -- LINE 4 -- number of valid integer kinds
+ dnl -- LINE 5 -- number of valid real kinds
+
+ pac_validIntKinds="`sed -n '1p' pac_fconftest.out`"
+ pac_validRealKinds="`sed -n '2p' pac_fconftest.out`"
+ PAC_FC_MAX_REAL_PRECISION="`sed -n '3p' pac_fconftest.out`"
+ AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision])
+
+ PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}"
+ PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}"
+
+ PAC_FORTRAN_NUM_INTEGER_KINDS="`sed -n '4p' pac_fconftest.out`"
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $PAC_FORTRAN_NUM_INTEGER_KINDS`"
+ H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)"
+ H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `sed -n '5p' pac_fconftest.out`"
+ H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)"
+
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs])
+
+ AC_MSG_CHECKING([for Number of Fortran INTEGER KINDs])
+ AC_MSG_RESULT([$PAC_FORTRAN_NUM_INTEGER_KINDS])
+ AC_MSG_CHECKING([for Fortran INTEGER KINDs])
+ AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS])
+ AC_MSG_CHECKING([for Fortran REAL KINDs])
+ AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])
+ AC_MSG_CHECKING([for Fortran REALs maximum decimal precision])
+ AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION])
+ else
+ AC_MSG_RESULT([Error])
+ AC_MSG_ERROR([No output from Fortran test program!])
+ fi
+ rm -f pac_fconftest.out
+],[
+ AC_MSG_RESULT([Error])
+ AC_MSG_ERROR([Failed to run Fortran program to determine available KINDs])
+],[])
+
+AC_LANG_POP([Fortran])
+])
+AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[
+AC_REQUIRE([PAC_FC_AVAIL_KINDS])
+AC_MSG_CHECKING([sizeof of available INTEGER KINDs])
+AC_LANG_PUSH([Fortran])
+pack_int_sizeof=""
+rm -f pac_fconftest.out
+
+for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER (KIND=$kind) a
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+ WRITE(8,'(I0)') $FC_SIZEOF_A
+ CLOSE(8)
+ END
+ ])
+ ])
+ AC_RUN_IFELSE([],[
+ if test -s pac_fconftest.out ; then
+ sizes="`cat pac_fconftest.out`"
+ pack_int_sizeof="$pack_int_sizeof $sizes,"
+ else
+ AC_MSG_ERROR([No output from Fortran test program!])
+ fi
+ rm -f pac_fconftest.out
+ ],[
+ AC_MSG_ERROR([Fortran program fails to build or run!])
+ ],[
+ pack_int_sizeof="$2"
+ ])
+done
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
+AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF])
+AC_LANG_POP([Fortran])
+])
+
+AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[
+AC_REQUIRE([PAC_FC_AVAIL_KINDS])
+AC_MSG_CHECKING([sizeof of available REAL KINDs])
+AC_LANG_PUSH([Fortran])
+pack_real_sizeof=""
+rm -f pac_fconftest.out
+for kind in `echo $pac_validRealKinds | sed -e 's/,/ /g'`; do
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ REAL (KIND=$kind) :: a
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+ WRITE(8,'(I0)') $FC_SIZEOF_A
+ CLOSE(8)
+ END
+ ])
+ ])
+ AC_RUN_IFELSE([],[
+ if test -s pac_fconftest.out ; then
+ sizes="`cat pac_fconftest.out`"
+ pack_real_sizeof="$pack_real_sizeof $sizes,"
+ else
+ AC_MSG_ERROR([No output from Fortran test program!])
+ fi
+ rm -f pac_fconftest.out
+ ],[
+ AC_MSG_ERROR([Fortran program fails to build or run!])
+ ],[
+ pack_real_sizeof="$2"
+ ])
+done
+PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
+AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF])
+AC_LANG_POP([Fortran])
+])
+
+AC_DEFUN([PAC_FC_NATIVE_INTEGER],[
+AC_REQUIRE([PAC_FC_AVAIL_KINDS])
+AC_MSG_CHECKING([sizeof of native KINDS])
+AC_LANG_PUSH([Fortran])
+pack_int_sizeof=""
+rm -f pac_fconftest.out
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER a
+ REAL b
+ DOUBLE PRECISION c
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+ WRITE(8,*) $FC_SIZEOF_A
+ WRITE(8,*) KIND(a)
+ WRITE(8,*) $FC_SIZEOF_B
+ WRITE(8,*) KIND(b)
+ WRITE(8,*) $FC_SIZEOF_C
+ WRITE(8,*) KIND(c)
+ CLOSE(8)
+ END
+ ])
+ ])
+ AC_RUN_IFELSE([],[
+ if test -s pac_fconftest.out ; then
+ PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '1p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '2p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '3p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '4p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '5p' pac_fconftest.out`"
+ PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '6p' pac_fconftest.out`"
+ else
+ AC_MSG_ERROR([No output from Fortran test program!])
+ fi
+ rm -f pac_fconftest.out
+ ],[
+ AC_MSG_ERROR([Fortran program fails to build or run!])
+ ],[
+ pack_int_sizeof="$2"
+ ])
+AC_MSG_RESULT([$pack_int_sizeof])
+AC_LANG_POP([Fortran])
+])
+
+AC_DEFUN([PAC_FC_LDBL_DIG],[
+AC_MSG_CHECKING([maximum decimal precision for C])
+rm -f pac_Cconftest.out
+ AC_LANG_CONFTEST([
+ AC_LANG_PROGRAM([
+ #include <float.h>
+ #include <stdio.h>
+ #define CHECK_FLOAT128 $ac_cv_sizeof___float128
+ #if CHECK_FLOAT128!=0
+ # if $HAVE_QUADMATH!=0
+ #include <quadmath.h>
+ # endif
+ # ifdef FLT128_DIG
+ #define C_FLT128_DIG FLT128_DIG
+ # else
+ #define C_FLT128_DIG 0
+ # endif
+ #else
+ #define C_FLT128_DIG 0
+ #endif
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define C_LDBL_DIG DECIMAL_DIG
+ #else
+ #define C_LDBL_DIG LDBL_DIG
+ #endif
+ ],[[
+ FILE * pFile;
+ pFile = fopen("pac_Cconftest.out","w");
+ fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG);
+ ]])
+ ])
+ AC_RUN_IFELSE([],[
+ if test -s pac_Cconftest.out ; then
+ LDBL_DIG="`sed -n '1p' pac_Cconftest.out`"
+ FLT128_DIG="`sed -n '2p' pac_Cconftest.out`"
+ else
+ AC_MSG_ERROR([No output from C decimal precision program!])
+ fi
+ rm -f pac_Cconftest.out
+ ],[
+ AC_MSG_ERROR([C program fails to build or run!])
+ ],[])
+])
+
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a3bc337..a644432 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2867,6 +2867,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Ideally, we could use ldconfig to report *all* directores which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
@@ -2875,7 +2878,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index a14cd24..48bc934 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,14 +1,3 @@
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
diff --git a/release_docs/COPYING b/release_docs/COPYING
index 6497ace..97969da 100644
--- a/release_docs/COPYING
+++ b/release_docs/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/release_docs/HISTORY-1_0-1_8_0_rc3.txt b/release_docs/HISTORY-1_0-1_8_0_rc3.txt
index f42bb00..f23a2c5 100644
--- a/release_docs/HISTORY-1_0-1_8_0_rc3.txt
+++ b/release_docs/HISTORY-1_0-1_8_0_rc3.txt
@@ -1,6 +1,8 @@
HDF5 HISTORY
============
-This file contains history of the HDF5 libraries releases
+This file contains history of the HDF5 libraries releases starting with
+HDF5-1.0.0 and ending with HDF5-1.8.0-rc3 (the state of the code before
+the HDF5 1.8.0 release).
CONTENTS
@@ -25,7 +27,7 @@ CONTENTS
4. Changes from Release 1.0.0 to Release 1.0.1
3. Changes from the Beta 1.0.0 Release to Release 1.0.0
2. Changes from the Second Alpha 1.0.0 Release to the Beta 1.0.0 Release
-1. Changes from the First Alpha 1.0.0 Release to the
+1. Changes from the First Alpha 1.0.0 Release to the
Second Alpha 1.0.0 Release
[Search on the string '%%%%' for per-release section breaks.]
@@ -33,15 +35,15 @@ CONTENTS
%%%%1.8.0-rc3%%%% Changes from 1.6.0 to 1.8.0-rc3
-HDF5 version 1.8.0-rc3
+HDF5 version 1.8.0-rc3
================================================================================
INTRODUCTION
This document describes the differences between HDF5-1.6.* and
-Hdf5 1.8.0 release candidate "HDF5-1.8.0-rc3", and contains information
-on the platforms tested and known problems in HDF5-1.8.0-rc3.
+Hdf5 1.8.0 release candidate "HDF5-1.8.0-rc3", and contains information
+on the platforms tested and known problems in HDF5-1.8.0-rc3.
For more details check the HISTORY.txt file in the HDF5 source.
@@ -49,7 +51,7 @@ Links to HDF5 1.8.0-rc3 source code, documentation, and additional materials
can be found on THG's development server (www.hdfgroup.uiuc.edu) at the
following location:
http://www.hdfgroup.uiuc.edu/HDF5/release/beta/obtain518.html
-User documentation for the beta can be accessed directly at this location:
+User documentation for the beta can be accessed directly at this location:
http://www.hdfgroup.uiuc.edu/HDF5/doc_1.8pre/doc/
New features of the upcoming 1.8.0 release are described in
@@ -64,7 +66,7 @@ and will be listed in the "HDF5 Software Changes" document:
For more information, see the HDF5 home page:
-
+
http://www.hdfgroup.org/HDF5/
If you have any questions or comments, please send them to the HDF Help Desk:
@@ -87,120 +89,120 @@ New Features
Configuration:
--------------
- Removed stream-vfd from the HDF5 library. - AKC 2007/11/19.
- - Updated versions of autotools. HDF5 now uses automake 1.10.0,
- autoconf 2.61, and libtool 1.5.22. MAM - 2007/7/25.
+ - Updated versions of autotools. HDF5 now uses automake 1.10.0,
+ autoconf 2.61, and libtool 1.5.22. MAM - 2007/7/25.
- Changed default fortran compiler to g95 when gcc is used. - AKC
- 2007/2/17.
+ 2007/2/17.
- 'make check-vfd' can now be run from the top level directory. Not all
- tests that 'make check' invokes work with certain Virtual File Drivers,
- so those tests have been skipped. - MAM 2006/7/17
+ tests that 'make check' invokes work with certain Virtual File Drivers,
+ so those tests have been skipped. - MAM 2006/7/17
- Added the variable HDF5TestExpress to control how long tests run.
- Setting it to a value between 0 and 3 controls how thoroughly the
- library is tested, with 0 being an "exhaustive run" and 3 being a
- very quick "smoke test." 1 (a "full run") is the default.
- -JML 2006/6/21
+ Setting it to a value between 0 and 3 controls how thoroughly the
+ library is tested, with 0 being an "exhaustive run" and 3 being a
+ very quick "smoke test." 1 (a "full run") is the default.
+ -JML 2006/6/21
- If both shared and static libraries are installed, now both will be
- tested during 'make install'. -MAM 2006/06/21
+ tested during 'make install'. -MAM 2006/06/21
- Added support to explicity enable stream_vfd or shared libraries
- when using parallel via the '--enable-stream_vfd' and
- '--enable-shared' options, respectively. If not explicity defined,
- These settings default to enabled when parallel is not used,
- and disabled when parallel is used. -MAM 2006/06/17
+ when using parallel via the '--enable-stream_vfd' and
+ '--enable-shared' options, respectively. If not explicity defined,
+ These settings default to enabled when parallel is not used,
+ and disabled when parallel is used. -MAM 2006/06/17
- Remove the flexible parallel code and the --enable-fphdf5
- configure option, it was never up to production standards
- anyway. -QAK 2006/4/20
+ configure option, it was never up to production standards
+ anyway. -QAK 2006/4/20
- Added a macro hdf5_mpi_special_collective_io_works to filter out
- some mpi-io packages that don't support collective IO for no IO
- contributions in some processes. -KY 2006/2/16
- - Added -shlib option to link against installed shared libraries to
- h5c++ and h5fc. -JML 2005/11/1
- - Added --enable-build-all option to configure, which only developers
- should need to use. -JML 2005/10/24
- - Configure uses the 'TR' variable to let the user override the path
- to the 'tr' utility. -JML 2005/10/17
- - Configure can recognize -lmpich as a form of MPI library. -AKC-
- 2005/9/28.
+ some mpi-io packages that don't support collective IO for no IO
+ contributions in some processes. -KY 2006/2/16
+ - Added -shlib option to link against installed shared libraries to
+ h5c++ and h5fc. -JML 2005/11/1
+ - Added --enable-build-all option to configure, which only developers
+ should need to use. -JML 2005/10/24
+ - Configure uses the 'TR' variable to let the user override the path
+ to the 'tr' utility. -JML 2005/10/17
+ - Configure can recognize -lmpich as a form of MPI library. -AKC-
+ 2005/9/28.
- MD5 checksumming has been added to snapshot releases. Release
- tarballs will be accompanied by .md5 checksum files, which can
- be verified using the md5sum utility. -JML 2005/9/6
+ tarballs will be accompanied by .md5 checksum files, which can
+ be verified using the md5sum utility. -JML 2005/9/6
- Some configure flags are incompatible (e.g., the C++ APIs cannot
- be built using the parallel version of HDF5). configure will now
- output errors when some common incompatible features are used
- together. -JML 2005/9/6
+ be built using the parallel version of HDF5). configure will now
+ output errors when some common incompatible features are used
+ together. -JML 2005/9/6
- A new API function, H5Tis_hard(), was added to the library. It
- checks if a conversion function is a compiler (hard) conversion.
- SLU - 2005/9/6
- - t_mpi will run the test_mpio_derived_dtype by default unless it is
- known not working (indicated by macro H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- not defined.) -AKC- 2005/8/23.
- - Test execution has changed in a number of ways:
- When make is invoked in parallel (using -j), sequential tests
- are now executed as parallel make targets. This should make them
- finish more quickly on machines with multiple processors.
- Since test output is garbled when they are executed by parallel make,
- tests now dump their output to foo.log files and foo.logsh files
- (for test scripts). These logs are printed to the screen only
- when a test fails or when all tests in the current directory have
- completed successfully.
- When tests pass, they will create a foo.chkexe file.
- This prevents the test from executing again until the test or
- main library changes.
- All files generated by tests (*.chkexe, *.log, and any *.h5 files
- created) can be removed by invoking 'make check-clean'.
- Sequential and parallel library tests can now be invoked separately.
- 'make check-s' will execute only sequential tests, and 'make check-p'
- will execute only parallel tests. 'make check' will still execute
- all tests.
- -JML 2005/08/03
+ checks if a conversion function is a compiler (hard) conversion.
+ SLU - 2005/9/6
+ - t_mpi will run the test_mpio_derived_dtype by default unless it is
+ known not working (indicated by macro H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
+ not defined.) -AKC- 2005/8/23.
+ - Test execution has changed in a number of ways:
+ When make is invoked in parallel (using -j), sequential tests
+ are now executed as parallel make targets. This should make them
+ finish more quickly on machines with multiple processors.
+ Since test output is garbled when they are executed by parallel make,
+ tests now dump their output to foo.log files and foo.logsh files
+ (for test scripts). These logs are printed to the screen only
+ when a test fails or when all tests in the current directory have
+ completed successfully.
+ When tests pass, they will create a foo.chkexe file.
+ This prevents the test from executing again until the test or
+ main library changes.
+ All files generated by tests (*.chkexe, *.log, and any *.h5 files
+ created) can be removed by invoking 'make check-clean'.
+ Sequential and parallel library tests can now be invoked separately.
+ 'make check-s' will execute only sequential tests, and 'make check-p'
+ will execute only parallel tests. 'make check' will still execute
+ all tests.
+ JML - 2005/08/03
- On windows, all.zip is deprecated. users should
read INSTALL_Windows.txt to know the details.
Reasons to deprecate all.zip:
- 1. Avoid confliction for windows programmers
+ 1. Avoid confliction for windows programmers
2. Decrease size of CVS tree by adding all.zip
- 3. Avoid using winzip as the intermediate step
+ 3. Avoid using winzip as the intermediate step
--KY 2005/04/22
- - When HDF5 is created as a shared library, it now uses libtool's
- shared library versioning scheme. -JML 2005/04/18
- - HDF5 now uses automake 1.9.5 to generate Makefiles.in.
- This has a number of effects on users:
- The Fortran compiler should be set using the environment
- variable $FC, not $F9X. F9X still works, but is depreciated.
- The output of make may be different. This should be only a
- cosmetic effect.
- make depened (or make dep) is no longer recognized, since automake
- handles dependency tracking.
- Some new configure options exist. --enable-dependency-tracking
- and --disable-dependency-tracking are used to control automake's
- dependency tracking. Dependencies are on by default *on most
- platforms and compilers*. If --enable-dependency-tracking is
- used, they will be enabled on any platform. However, this can
- slow down builds or even cause build errors in some cases.
- Likewise, --disable-dependency-tracking can speed up builds and
- avoid some build errors.
- Some make targets have alternate names. make check-install and
- make installcheck do the same thing, for instance.
- pmake on IRIX can be invoked from the root directory, but the
- -V flag must be used to invoke it in any subdirectory or it
- will give an error about undefined variables.
- JML 2005/01 - 2005/03
- - Hardware conversion between long double and integers is also added.
- SLU 2005/02/10
- - Started to support software conversion between long double and
- integers. Hardware conversion will come very soon. SLU - 2005/1/6
- - Intel v8.0 compiler would infinite loop when compiling some test
- code with -O3 option. Changed enable-production default compiler
- option to -O2. AKC - 2004/12/06
- - Long double is assumed to be a supported C data type. It is a
- stanadard C89 type. AKC - 2004/10/22
- - The IA64 will use ecc as the C++ compiler by default.
+ - When HDF5 is created as a shared library, it now uses libtool's
+ shared library versioning scheme. -JML 2005/04/18
+ - HDF5 now uses automake 1.9.5 to generate Makefiles.in.
+ This has a number of effects on users:
+ The Fortran compiler should be set using the environment
+ variable $FC, not $F9X. F9X still works, but is depreciated.
+ The output of make may be different. This should be only a
+ cosmetic effect.
+ make depened (or make dep) is no longer recognized, since automake
+ handles dependency tracking.
+ Some new configure options exist. --enable-dependency-tracking
+ and --disable-dependency-tracking are used to control automake's
+ dependency tracking. Dependencies are on by default *on most
+ platforms and compilers*. If --enable-dependency-tracking is
+ used, they will be enabled on any platform. However, this can
+ slow down builds or even cause build errors in some cases.
+ Likewise, --disable-dependency-tracking can speed up builds and
+ avoid some build errors.
+ Some make targets have alternate names. make check-install and
+ make installcheck do the same thing, for instance.
+ pmake on IRIX can be invoked from the root directory, but the
+ -V flag must be used to invoke it in any subdirectory or it
+ will give an error about undefined variables.
+ JML 2005/01 - 2005/03
+ - Hardware conversion between long double and integers is also added.
+ SLU 2005/02/10
+ - Started to support software conversion between long double and
+ integers. Hardware conversion will come very soon. SLU - 2005/1/6
+ - Intel v8.0 compiler would infinite loop when compiling some test
+ code with -O3 option. Changed enable-production default compiler
+ option to -O2. AKC - 2004/12/06
+ - Long double is assumed to be a supported C data type. It is a
+ stanadard C89 type. AKC - 2004/10/22
+ - The IA64 will use ecc as the C++ compiler by default.
- Added some initial support for making valgrind/Purify (or similar
memory checking products) happier by initializing buffers to zero
and disabling the internal free list code. To take advantage of
this, use the "--enable-using-memchecker" configure option when
building the library. QAK - 2004/07/23
- Fixed the long compile time of H5detect.c when v7.x Intel Compiler
- is used with optimization NOT off. AKC - 2004/05/20
- - Fixed configure setting of C++ for OSF1 platform. AKC - 2004/01/06
+ is used with optimization NOT off. AKC - 2004/05/20
+ - Fixed configure setting of C++ for OSF1 platform. AKC - 2004/01/06
- Prefix default is changed from /usr/local to `pwd`/hdf5.
AKC - 2003/07/09
@@ -212,8 +214,8 @@ New Features
be used as the "location ID". If a file ID is used, the attribute
operation will occur on the root group of the file.
- QAK - 2007/02/09
- - Enabled the CORE driver to read an existing file depending on
- the setting of the backing_store for H5Pset_fapl_core and file
+ - Enabled the CORE driver to read an existing file depending on
+ the setting of the backing_store for H5Pset_fapl_core and file
open flags. - SLU - 2006/11/30
- Added new H5Gget_info_by_idx() routine to query the information about
a group according to the order within an index.
@@ -271,7 +273,7 @@ New Features
- Added H5Fget_intent to get the "intent" of a file (whether it
was opened with read-write access or read-only.
-JML 2006/8/23
- - Added Link Access Property Lists. They currently contain two
+ - Added Link Access Property Lists. They currently contain two
properties, nlinks (H5Pget/set_nlinks) and elink_prefix
(H5Pget/set_elink_prefix). nlinks controls how many soft and
user-defined traversals are allowed before HDF5 assumes it has
@@ -279,47 +281,47 @@ New Features
The elink_prefix is a filesystem path that is prefixed to the
names of any external link files opened using this LAPL.
-JML 2006/8/23
- - Add H5L link APIs. Old APIs (H5Glink, H5Gmove, etc.) are still
- supported but deprecated.
- New APIs are:
- H5Llink - create a link to an object given its ID
- H5Lmove - just like H5Gmove2
- H5Lcopy - copy a link without copying the underlying object
- H5Lcreate_hard - like H5Glink2 for hard links
- H5Lcreate_soft - like H5Glink2 for soft links
- H5Ldelete - just like H5Gunlink
- H5Lget_val - just like H5Gget_linkval
- H5Lget_info - gets link-specific info (like H5Gget_objinfo)
-
- In addition, H5Gcreate_anon, H5Tcommit_anon, and H5Dcreate_anon
- no longer create links to objects; objects must be manually linked
- using H5Llink or they will be deleted when the ID is closed.
-
- Link Creation Property Lists can be used to pass character
- encoding (ASCII or UTF-8) for link names and to set the Intermediate
- Group Creation Flag:
- H5Pset_char_encoding, H5Pget_char_encoding
- H5Pset_copy_object, H5Pget_copy_object
- -JML 2006/7/5
- - Added managements of collective IO supports for chunking storage
- inside parallel HDF5
- 1) Implemented One IO with collective mode for all chunks in the
- application by building one MPI derived datatype accross all
- chunks.
- 2) Implemented the decision-making support to do collective IO inside
- MPI-IO per chunk.
- 3) Added the decision-making support to do one IO accross all chunks
- or to do multiple IOs with each IO per chunk.
- 4) Added the support to handle the case some processes won't do any IOs in
- collectively.
- 5) Some MPI-IO package(mpich 1.2.6 or lower, e.g.) cannot handle
- collective IO correctly for the case when some processes have no
- contributions to IOs, a special macro is added to change
- collective IO mode to independent IO mode inside HDF5 library.
-
- Currently we find that MPICH at Linux and vender MPI-IO package at NCSA
- Altix cannot handle this case.
-
+ - Add H5L link APIs. Old APIs (H5Glink, H5Gmove, etc.) are still
+ supported but deprecated.
+ New APIs are:
+ H5Llink - create a link to an object given its ID
+ H5Lmove - just like H5Gmove2
+ H5Lcopy - copy a link without copying the underlying object
+ H5Lcreate_hard - like H5Glink2 for hard links
+ H5Lcreate_soft - like H5Glink2 for soft links
+ H5Ldelete - just like H5Gunlink
+ H5Lget_val - just like H5Gget_linkval
+ H5Lget_info - gets link-specific info (like H5Gget_objinfo)
+
+ In addition, H5Gcreate_anon, H5Tcommit_anon, and H5Dcreate_anon
+ no longer create links to objects; objects must be manually linked
+ using H5Llink or they will be deleted when the ID is closed.
+
+ Link Creation Property Lists can be used to pass character
+ encoding (ASCII or UTF-8) for link names and to set the Intermediate
+ Group Creation Flag:
+ H5Pset_char_encoding, H5Pget_char_encoding
+ H5Pset_copy_object, H5Pget_copy_object
+ -JML 2006/7/5
+ - Added managements of collective IO supports for chunking storage
+ inside parallel HDF5
+ 1) Implemented One IO with collective mode for all chunks in the
+ application by building one MPI derived datatype accross all
+ chunks.
+ 2) Implemented the decision-making support to do collective IO inside
+ MPI-IO per chunk.
+ 3) Added the decision-making support to do one IO accross all chunks
+ or to do multiple IOs with each IO per chunk.
+ 4) Added the support to handle the case some processes won't do any IOs in
+ collectively.
+ 5) Some MPI-IO package(mpich 1.2.6 or lower, e.g.) cannot handle
+ collective IO correctly for the case when some processes have no
+ contributions to IOs, a special macro is added to change
+ collective IO mode to independent IO mode inside HDF5 library.
+
+ Currently we find that MPICH at Linux and vender MPI-IO package at NCSA
+ Altix cannot handle this case.
+
"hdf5_mpi_special_collective_io_works=${hdf5_mpi_special_collective_io_works='no'}"
has been added at the end of file <ia64-linux-gnui> and
<linux-gnulibc1>.
@@ -327,30 +329,30 @@ New Features
If MPI-IO packages at your Linux and Altix support this case,
please comment out the last line and report to us at
help@hdfgroup.org. We can tune in our configuration to
- support this.
-
+ support this.
+
KY - 2006/02/16
- - Added character encoding to attribute creation property lists.
+ - Added character encoding to attribute creation property lists.
JML - 2006/01/02
- - Added H5Gcopy() routine to copy objects between while keeping
- data in compressed form. QAK - 2005/11/06
- - Added H5Sextent_equal() routine. QAK - 2005/11/06
- - Added HSYS_ERROR which retrieves the system error message and pushes
- it to the error stack. This gives more information of the failed
- system call. AKC - 2005/08/04
- - Added H5F_OBJ_LOCAL flag to H5Fget_obj_count() & H5Fget_obj_ids(), to
- allow querying for objects in file that were opened with a particular
- file ID, instead of all objects opened in file with any file ID.
- QAK - 2005/06/01
- - Added H5T_CSET_UTF8 character set to mark datatypes that use the
- UTF-8 Unicode character encoding. Added tests to ensure that
- library handles UTF-8 object names, attributes, etc. -JL 2005/05/13
- - HDF5 supports collective MPI-IO for irregular selection with HDF5
- dataset. Irregular selection is when users use H5Sselect_hyperslab
- more than once for the same dataset.
- Currently, not all MPI-IO packages support complicated MPI derived
+ - Added H5Gcopy() routine to copy objects between while keeping
+ data in compressed form. QAK - 2005/11/06
+ - Added H5Sextent_equal() routine. QAK - 2005/11/06
+ - Added HSYS_ERROR which retrieves the system error message and pushes
+ it to the error stack. This gives more information of the failed
+ system call. AKC - 2005/08/04
+ - Added H5F_OBJ_LOCAL flag to H5Fget_obj_count() & H5Fget_obj_ids(), to
+ allow querying for objects in file that were opened with a particular
+ file ID, instead of all objects opened in file with any file ID.
+ QAK - 2005/06/01
+ - Added H5T_CSET_UTF8 character set to mark datatypes that use the
+ UTF-8 Unicode character encoding. Added tests to ensure that
+ library handles UTF-8 object names, attributes, etc. -JL 2005/05/13
+ - HDF5 supports collective MPI-IO for irregular selection with HDF5
+ dataset. Irregular selection is when users use H5Sselect_hyperslab
+ more than once for the same dataset.
+ Currently, not all MPI-IO packages support complicated MPI derived
datatype used in the implementation of irregular
- selection INSIDE HDF5.
+ selection INSIDE HDF5.
1) DEC 5.x is not supporting complicated derived datatype.
2) For AIX 5.1,
if your poe version number is 3.2.0.19 or lower,
@@ -360,57 +362,57 @@ New Features
and UNCOMMENT this line before the configure.
check poe version with the following command:
lpp -l all | grep ppe.poe
- 3) For Linux cluster,
+ 3) For Linux cluster,
if mpich version is 1.2.5 or lower, collective irregular selection
IO is not supported, internally independent IO is used.
4) For IRIX 6.5,
if C compiler version is 7.3 or lower, collective irregular selection
IO is not supported, internally independent IO is used.
5) For platforms which internally used mpich, if the
- mpich version is 1.2.5 or lower, please find the
+ mpich version is 1.2.5 or lower, please find the
corresponding config file and add
hdf5_mpi_complex_derived_datatype_works='no' at the
end of the configuration file. For example, at NCSA
- SGI Altix, the internal mpich library is 1.2.5. So
+ SGI Altix, the internal mpich library is 1.2.5. So
hdf5_mpi_complex_derived_datatype_works='no' should be
added at the end of the config file ia64-linux-gnu.
KY - 2005/09/12
- We also found not all MPI-IO packages support collective IO with one
+ We also found not all MPI-IO packages support collective IO with one
or more processes to have no contributions to IO.
- For mpich version 1.2.6 or lower and all IRIX machine,
+ For mpich version 1.2.6 or lower and all IRIX machine,
if the library checks that there are no IO contributions for some
processes, collective IO request is replaced with
independent inside HDF5.
KY - 2006/05/04
-
- - HDF5 N-bit filter
- HDF5 support N-bit filter from this version,
- The N-Bit filter is used effectively for compressing data of N-Bit
- datatype as well as compound and array datatype with N-Bit fields.
- KY - 2005/04/15
+
+ - HDF5 N-bit filter
+ HDF5 support N-bit filter from this version,
+ The N-Bit filter is used effectively for compressing data of N-Bit
+ datatype as well as compound and array datatype with N-Bit fields.
+ KY - 2005/04/15
- HDF5 scaleoffset filter
- HDF5 supports scaleoffset filter for users to do data
- compression through HDF5 library.
- Scale-Offset compression performs a scale and/or offset operation
- on each data value and truncates the resulting value to a minimum
- number of bits and then stores the data.
- Scaleoffset filter supports floating-point and integer datatype.
- Please check the HDF5 reference manual for this.
- KY - 2005/06/06
+ HDF5 supports scaleoffset filter for users to do data
+ compression through HDF5 library.
+ Scale-Offset compression performs a scale and/or offset operation
+ on each data value and truncates the resulting value to a minimum
+ number of bits and then stores the data.
+ Scaleoffset filter supports floating-point and integer datatype.
+ Please check the HDF5 reference manual for this.
+ KY - 2005/06/06
- Retired SRB vfd (--with-srb). Functions H5Pset_fapl_srb and
- H5Pget_fapl_srb were removed. EIP - 2005/04/07
- - Retired GASS vfd (--with-gass). Functions H5Pset_fapl_gass and
- H5Pget_fapl_gass are removed too. AKC - 2005/3/3
+ H5Pget_fapl_srb were removed. EIP - 2005/04/07
+ - Retired GASS vfd (--with-gass). Functions H5Pset_fapl_gass and
+ H5Pget_fapl_gass are removed too. AKC - 2005/3/3
- Pablo was removed from the source code EIP - 2005/01/21
- Modified registration of SZIP to dynamically detect the presence
or absence of the encoder. Changed configure and Makefiles,
and tests to dynamically detect encoder. BEM - 2004/11/02
- - Added function H5Pget_data_transform, together with the previously
- added H5Pset_data_transform, to support the data transform
- feature. AKC - 2004/10/26
- - Compound datatype has been enhanced with a new feature of size
+ - Added function H5Pget_data_transform, together with the previously
+ added H5Pset_data_transform, to support the data transform
+ feature. AKC - 2004/10/26
+ - Compound datatype has been enhanced with a new feature of size
adjustment. The size can be increased and decreased(without
- cutting the last member) as long as it doesn't go down to zero.
+ cutting the last member) as long as it doesn't go down to zero.
No API change is involved. SLU - 2004/10/1
- Put back 6 old error API functions to be backward compatible with
version 1.6. They are H5Epush, H5Eprint, H5Ewalk, H5Eclear,
@@ -419,14 +421,14 @@ New Features
H5Eclear_stack, H5Eset_auto_stack, H5Eget_auto_stack. SLU -
2004/9/2
- 4 new API functions, H5Tencode, H5Tdecode, H5Sencode, H5Sdecode were
- added to the library. Given object ID, these functions encode and
- decode HDF5 objects(data type and space) information into and from
+ added to the library. Given object ID, these functions encode and
+ decode HDF5 objects(data type and space) information into and from
binary buffer. SLU - 2004/07/21
- - Modified the way how HDF5 calculates 'pixels_per_scanline' parameter for
+ - Modified the way how HDF5 calculates 'pixels_per_scanline' parameter for
SZIP compression. Now there is no restriction on the size and shape of the
- chunk except that the total number of elements in the chunk cannot be
- bigger than 'pixels_per_block' parameter provided by the user.
- EIP - 2004/07/21
+ chunk except that the total number of elements in the chunk cannot be
+ bigger than 'pixels_per_block' parameter provided by the user.
+ EIP - 2004/07/21
- Added support for SZIP without encoder. Added H5Zget_filter_info
and changed H5Pget_filter and H5Pget_filter_by_id to support this
change. JL/NF - 2004/06/30
@@ -440,20 +442,20 @@ New Features
- Added support for user defined identifier types. NF/JL - 2004/06/29
- A new API function H5Fget_filesize was added. It returns the
actual file size of the opened file. SLU - 2004/06/24
- - New Feature of Data transformation is added. AKC - 2004/05/03.
- - New exception handler for datatype conversion is put in to
+ - New Feature of Data transformation is added. AKC - 2004/05/03.
+ - New exception handler for datatype conversion is put in to
replace the old overflow callback function. This exception
handler is set through H5Pset_type_conv_cb function.
SLU - 2004/4/27
- Added option that if $HDF5_DISABLE_VERSION_CHECK is set to 2,
- will suppress all library version mismatch warning messages.
- AKC - 2004/4/14
- - A new type of dataspace, null dataspace(dataspace without any
+ will suppress all library version mismatch warning messages.
+ AKC - 2004/4/14
+ - A new type of dataspace, null dataspace(dataspace without any
element) was added. SLU - 2004/3/24
- Data type conversion(software) from integer to float was added.
- SLU - 2004/3/13
+ SLU - 2004/3/13
- Data type conversion(software) from float to integer was added.
- Conversion from integer to float will be added later.
+ Conversion from integer to float will be added later.
SLU -2004/2/4
- Added new H5Premove_filter routine to remove I/O pipeline filters
from dataset creation property lists. PVN - 2004/01/26
@@ -467,7 +469,7 @@ New Features
object's object header. QAK 2003/10/06
- Added new H5Fget_freespace() routine to query the free space in a
given file. QAK 2003/10/06
- - Added backward compatability with v1.6 for new Error API. SLU -
+ - Added backward compatability with v1.6 for new Error API. SLU -
2003/09/24
- Changed 'objno' field in H5G_stat_t structure from 'unsigned long[2]'
to 'haddr_t'. QAK - 2003/08/08
@@ -482,13 +484,13 @@ New Features
Parallel Library:
-----------------
- - Added mpich2 as a testing "platform" informally. AKC - 2005/9/28.
- - A dataset created in serial mode with H5D_ALLOC_TIME_INCR allocation
- setting was not extendible, either explicitly by H5Dextend or
- implicitly by writing to unallocated chunks. Library now allocates
- more space when needed or directed if the file is opened by parallel
- mode, independent of what the dataset allocation mode is.
- CC/AKC - 2005/08/29.
+ - Added mpich2 as a testing "platform" informally. AKC - 2005/9/28.
+ - A dataset created in serial mode with H5D_ALLOC_TIME_INCR allocation
+ setting was not extendible, either explicitly by H5Dextend or
+ implicitly by writing to unallocated chunks. Library now allocates
+ more space when needed or directed if the file is opened by parallel
+ mode, independent of what the dataset allocation mode is.
+ CC/AKC - 2005/08/29.
- Allow compressed, chunked datasets to be read in parallel.
QAK - 2004/10/04
- Add options of using atomicity and file-sync to test_mpio_1wMr.
@@ -501,20 +503,20 @@ New Features
----------------
- added support for shared Fortran libraries. -JML 2005/09/20
- added missing h5tget_member_class_f function
- EIP 2005/04/06
- - added new functions h5fget_name_f and h5fget_filesize_f
+ EIP 2005/04/06
+ - added new functions h5fget_name_f and h5fget_filesize_f
EIP 2004/07/08
- h5dwrite/read_f and h5awrite/read_f functions only accept dims parameter
- of the type INTEGER(HSIZE_T).
+ of the type INTEGER(HSIZE_T).
- added support for native integers of 8 bytes (i.e. when special
- compiler flag is specified to set native fortran integers to 8 bytes,
- for example, -i8 flag for PGI and Absoft Fortran compilers,
- -qintsize=8 flag for IBM xlf compiler).
+ compiler flag is specified to set native fortran integers to 8 bytes,
+ for example, -i8 flag for PGI and Absoft Fortran compilers,
+ -qintsize=8 flag for IBM xlf compiler).
EIP 2005/06/20
- added support for "big" REAL and DOUBLE PRECISION types
- (usually the size is specified by compilers flags like
- -r8, -r16, etc.)
- Known problem: multi file test fails when REAL is 16 bytes.
+ (usually the size is specified by compilers flags like
+ -r8, -r16, etc.)
+ Known problem: multi file test fails when REAL is 16 bytes.
EIP 2005/09/8
C++ Library:
@@ -537,41 +539,41 @@ New Features
Tools:
------
- h5repack and h5diff changed command line parameter syntax to be
- similar to h5dump, adding also long switch names. PVN - 2008/1/16
- - h5repack now supports adding multiple filters to all objects.
- PVN - 2008/1/16
- - h5dump lists groups and attributes in requested orders (by name and
- creation order, both ascending and descending). PVN - 2007/10/5
+ similar to h5dump, adding also long switch names. PVN - 2008/1/16
+ - h5repack now supports adding multiple filters to all objects.
+ PVN - 2008/1/16
+ - h5dump lists groups and attributes in requested orders (by name and
+ creation order, both ascending and descending). PVN - 2007/10/5
- h5import imports string (text) data. PVN - 2007/10/5
- h52gif and gif2h5: Both these tools were revised to include the High
- Level Image API support, and tests were added to /hl/tools/gif2h5.
- PVN - 2007/04/13
+ Level Image API support, and tests were added to /hl/tools/gif2h5.
+ PVN - 2007/04/13
- h5dump: added support for double long type H5T_NATIVE_LDOUBLE. PVN
- 2007/03/13
+ 2007/03/13
- h5dump: added support for binary output, see usage. PVN 2007/03/13
- h5repack: added support for the new nbit and scaleoffset filters.
- PVN - 2007/05/07
+ PVN - 2007/05/07
- h5repack: now uses the API function H5Ocopy (of the tool h5copy) to
- recreate objects if there is not a user input for changes. PVN -
- 2007/05/07
+ recreate objects if there is not a user input for changes. PVN -
+ 2007/05/07
- h5repack: added support for reading and repacking by hyperslabs for
- large files. PVN - 2007/03/01
+ large files. PVN - 2007/03/01
- h5repack: a new option allows the copy using the file type (default)
- instead of the previous conversion to native type. PVN - 2007/03/01
+ instead of the previous conversion to native type. PVN - 2007/03/01
- h5repack: output the percentage of compression used. PVN - 2007/03/01
- h5diff: added support for -p option for unsigned long_long data. PVN
- - 2007/02/26
+ 2007/02/26
- h5diff: added support for comparing dataset regions. PVN - 2007/02/20
- h5diff: added support for reading and comparing by hyperslabs for large files.
- PVN - 2007/02/20
+ PVN - 2007/02/20
- h5diff: printing of dataset dimensions along with dataset name. PVN -2007/02/19
- h5dump now uses the new API function H5Rget_name to display the name
- of the dataset referenced instead of its ID. PVN - 2007/02/19
+ of the dataset referenced instead of its ID. PVN - 2007/02/19
- Added new tool, h5mkgrp. QAK - 2007/02/14
- Added new tool, h5copy. PVN - 2006/7/15
- - Removed obsolete pdb2hdf5 tool from tools/misc -JML 2005/10/24
- - Added build_h5perf_alone.sh that builds h5perf by standalone mode.
- AKC - 2005/09/18.
+ - Removed obsolete pdb2hdf5 tool from tools/misc -JML 2005/10/24
+ - Added build_h5perf_alone.sh that builds h5perf by standalone mode.
+ AKC - 2005/09/18.
- Sped up h5dump on files with large numbers of objects.
QAK - 2005/08/25
- Added a standalone mode for building h5perf. AKC - 2005/08/12
@@ -582,8 +584,8 @@ New Features
available for h5dump and h5ls. RPM & QAK - 2004/02/01
- Added option --vfd= to h5ls to allow a VFL driver to be selected
by a user. RPM & QAK - 2004/02/01
- - Added option -showconfig to compiler tools (h5cc,h5fc,h5c++).
- AKC - 2004/01/08
+ - Added option -showconfig to compiler tools (h5cc,h5fc,h5c++).
+ AKC - 2004/01/08
- Install the "h5cc" and "h5fc" tools as "h5pcc" and "h5pfc"
respectively if library is built in parallel mode.
WCW - 2003/11/04
@@ -599,25 +601,25 @@ New Features
------
- Fortran interfaces for the Image, Table and Lite APIs. PVN - 2007/5/1
- New HDF5 Dimension Scale API (H5DS) allows dimension scales to be
- created in an HDF5 file and associated with specific datasets. PVN - 2007/5/1
+ created in an HDF5 file and associated with specific datasets. PVN - 2007/5/1
- There are two new functions in the Lite library, H5LTtext_to_dtype
and H5LTdtype_to_text. H5LTtext_to_dtype creates a HDF5 data type
given a text description; H5LTdtype_to_text converts a data type
- to text description. Only DDL definition is supported as text
+ to text description. Only DDL definition is supported as text
desciption now. SLU - 2006/05/17
- Added Packet Table API for creating tables with less overhead than
H5TB API. Added C++ wrapper for Packet Tables. See documentation.
JML - 2004/03/28
-
- Documentation
- -------------
- - The documentation for this release is largely complete, but
- trails the source code. A few of the newer functions are
+
+ Documentation
+ -------------
+ - The documentation for this release is largely complete, but
+ trails the source code. A few of the newer functions are
not yet documented. FMB - 2007/04/18
- The user documents for this release can be accessed directly at
this location:
http://www.hdfgroup.uiuc.edu/HDF5/doc_1.8pre/doc/
- The most recent document versions (updated daily) in the
+ The most recent document versions (updated daily) in the
1.8 development branch can be accessed at this location:
http://www.hdfgroup.uiuc.edu/HDF5/doc_dev_snapshot/H5_dev/
FMB - 2007/04/18
@@ -626,19 +628,19 @@ New Features
Support for new platforms, languages and compilers.
=======================================
- Added support for Free-BSD on amd64 with GNU C and Fortran compilers
- 4.2.1
+ 4.2.1
EIP - 2007/06/25
- Added support for sequential and parallel libraries for Intel 64 Linux
- cluster (abe.ncsa.uiuc.edu). Among three MPICH packages available on
- this machine, only Open MPI works. The VMI has seg fault in hyperslab.c
- and bittests.c tests. The MVAPICH2 complained about mpd not running
- the parallel test. (see Known Problems section for more info)
+ cluster (abe.ncsa.uiuc.edu). Among three MPICH packages available on
+ this machine, only Open MPI works. The VMI has seg fault in hyperslab.c
+ and bittests.c tests. The MVAPICH2 complained about mpd not running
+ the parallel test. (see Known Problems section for more info)
EIP - 2007/06/25
- Added support for HPUX11.23 for both 32 and 64-bit; HDF5 C++
- Added support for 64-bit Windows with Visual Studio .NET and 2005.
SJW - 2007/06/25
- Added suport for HPUX11.23 for both 32 and 64-bit; HDF5 C++
- shared library is not supported with +DD64 flag.
+ shared library is not supported with +DD64 flag.
EIP - 2006/06/22
- Added support for VAX floating numbers for Alpha Open VMS 7.3.2
EIP - 2006/05/05
@@ -744,9 +746,9 @@ Bug Fixes since HDF5-1.6.0 release
- Fixed bug where unmounted files could cause the library to go into
an infinite loop when shutting down. QAK - 2005/06/30
- The library didn't save the information of family driver in file.
- The original file member size was lost after file was closed (see
- bug #213). This has been fixed by saving driver name and member
- file size in the superblock. SLU - 2005/6/24
+ The original file member size was lost after file was closed (see
+ bug #213). This has been fixed by saving driver name and member
+ file size in the superblock. SLU - 2005/6/24
- Fixed bug with hyperslab selections that use selection offsets and
operate on chunked datasets going into infinite loop or dumping
core. QAK - 2005/06/17
@@ -760,22 +762,22 @@ Bug Fixes since HDF5-1.6.0 release
particular file ID being closed, instead of operating on all open
file IDs for a given file. QAK - 2005/06/01
- For family driver, the library didn't save member size in file.
- When file is reopened, the size of 1st member file determine the
- member size. Now member size is saved in file and is used to
- define member file size. Wrong file access property of member size
- will result in a failure. Using any other driver except family
- will cause library to return error. So is multi driver. SLU -
- 2005/05/24
+ When file is reopened, the size of 1st member file determine the
+ member size. Now member size is saved in file and is used to
+ define member file size. Wrong file access property of member size
+ will result in a failure. Using any other driver except family
+ will cause library to return error. So is multi driver. SLU -
+ 2005/05/24
- Fixed error in opening object in group that was opened in mounted
- file which has been unmounted. QAK - 2005/03/17
+ file which has been unmounted. QAK - 2005/03/17
- Fixed a racing condition in MPIPOSIX virtual file drive close
- function. Now all processes must completed the close before any
- of them is returned. This prevents some "faster" processes start
- accessing the file for another purpose (e.g., open with truncate)
- while other "slower" processes have not closed the same file with
- the previous purpose. AKC - 2005/03/01
- - H5Tget_member_value calls for enum datatype didn't return correct
- value if H5Tenum_valueof was called first. It's fixed. SLU -
+ function. Now all processes must completed the close before any
+ of them is returned. This prevents some "faster" processes start
+ accessing the file for another purpose (e.g., open with truncate)
+ while other "slower" processes have not closed the same file with
+ the previous purpose. AKC - 2005/03/01
+ - H5Tget_member_value calls for enum datatype didn't return correct
+ value if H5Tenum_valueof was called first. It's fixed. SLU -
2005/02/08
- For variable-length string, H5Tget_class returned H5T_STRING as its
class. But H5Tdetect_class and H5Tget_member_class considered it
@@ -783,24 +785,24 @@ Bug Fixes since HDF5-1.6.0 release
as H5T_STRING. SLU - 2005/02/08
- The byte order of 1-byte integer types was fixed as little endian
even on a big-endian machine. This has been corrected. SLU -
- 2005/02/07
+ 2005/02/07
- Fix segmentation fault when calling H5Fflush with an attribute that
hasn't had a value written to it open. QAK - 2004/10/18
- - Back up supporting bitfield and time types in H5Tget_native_type.
- Leave it to future support. The function simply returns error
- message of "not support" for bitfield and time types.
+ - Back up supporting bitfield and time types in H5Tget_native_type.
+ Leave it to future support. The function simply returns error
+ message of "not support" for bitfield and time types.
SLU - 2004/10/5
- Fixed address check in Core VFL driver to avoid spurious address/size
overflows for odd valued addresses and/or sizes. QAK - 2004/09/27
- - Fixed parallel bug in which some processes attempted collective
- I/O while others did independent I/O. Bug appeared when some
- processes used point selections, and others didn't. JRM - 2004/9/15
+ - Fixed parallel bug in which some processes attempted collective
+ I/O while others did independent I/O. Bug appeared when some
+ processes used point selections, and others didn't. JRM - 2004/9/15
- Corrected error where dataset region references were written in an
incorrect way on Cray machines. PVN & QAK - 2004/09/13
- - The H5Tget_native_type now determines the native type for integers
- based on the precision. This is to avoid cases of wrongly converting
- an int to a short in machines that have a short of 8 bytes but with
- 32bit precision (e.g Cray SV1). PVN - 2004/09/07
+ - The H5Tget_native_type now determines the native type for integers
+ based on the precision. This is to avoid cases of wrongly converting
+ an int to a short in machines that have a short of 8 bytes but with
+ 32bit precision (e.g Cray SV1). PVN - 2004/09/07
- Changed H5Dread() to not overwrite data in an application's buffer
with garbage when accessing a chunked dataset with an undefined
fill value and an unwritten chunk is uncountered. QAK - 2004/08/25
@@ -842,18 +844,18 @@ Bug Fixes since HDF5-1.6.0 release
variable-length string as field. SLU - 2004/06/10
- Fixed potential file corruption bug when a block of metadata could
overlap the end of the internal metadata accumulator buffer and
- the buffer would be extended correctly, but would incorrectly
+ the buffer would be extended correctly, but would incorrectly
change it's starting address. QAK - 2004/06/09
- Opaque datatype with no tag failed for some operations. Fixed.
- SLU - 2004/6/3
+ SLU - 2004/6/3
- Fixed potential file corruption bug where dimensions that were
too large (a value greater than could be represented in 32-bits)
could cause the incorrect amount of space to be allocated in a
file for the raw data for the dataset. QAK - 2004/06/01
- - Fixed dtypes "sw long double -> double" failure in QSC class
+ - Fixed dtypes "sw long double -> double" failure in QSC class
machines. AKC - 2004/4/16
- Fixed problem with fletcher32 filter when converting data of different
- endianess. PVN - 2004/03/10
+ endianess. PVN - 2004/03/10
- Fixed problem with H5Tget_native_type() not handling opaque fields
correctly. QAK - 2004/01/31
- Fixed several errors in B-tree deletion code which could cause a
@@ -901,7 +903,7 @@ Bug Fixes since HDF5-1.6.0 release
but were interspersed with dimensions that could not be flattened
were not correctly handled, causing core dumps. QAK - 2003/10/25
- Fixed incorrect datatype of the third parameter to the Fortran90
- h5pset(get)_cache_f subroutine (INTEGER to INTEGER(SIZE_T))
+ h5pset(get)_cache_f subroutine (INTEGER to INTEGER(SIZE_T))
EIP - 2003/10/13
- Fixed problems with accessing variable-length data datatypes on
Crays. QAK - 2003/10/10
@@ -968,8 +970,8 @@ Bug Fixes since HDF5-1.6.0 release
Configuration
-------------
- - Configure can now use any tr command. No more need for
- defining variable TR nor is it supported. -AKC 2006/05/19
+ - Configure can now use any tr command. No more need for
+ defining variable TR nor is it supported. -AKC 2006/05/19
- Parallel I/O with the MPI-I/O driver will no longer work if the
filesystem is not POSIX compliant. The "HDF5_MPI_1_METAWRITE"
environment variable has been removed. QAK - 2004/01/30
@@ -989,27 +991,27 @@ Bug Fixes since HDF5-1.6.0 release
Tools
-----
- Fixed h5dump regarding the display of blocks in hyperslab
- selections. PVN 2008/01/16
+ selections. PVN 2008/01/16
- Fixed h5diff regarding the display of NaN (Not a Number)
- values. PVN 2008/01/16
- - Fixed h5dump regarding the parsing of binary output parameters.
- PVN 2008/01/16
- - Fixed memory problems in h52gif and gif2h5. PVN 2008/01/16
- - Fixed h5repack dealing with NULL references. PVN 2008/01/16
+ values. PVN 2008/01/16
+ - Fixed h5dump regarding the parsing of binary output parameters.
+ PVN 2008/01/16
+ - Fixed memory problems in h52gif and gif2h5. PVN 2008/01/16
+ - Fixed h5repack dealing with NULL references. PVN 2008/01/16
- Fixed h5dump & h5ls to display attributes in "name" order, rather
- than the order they are encountered in the object header.
- QAK - 2007/10/04
+ than the order they are encountered in the object header.
+ QAK - 2007/10/04
- Fixed h5dump regarding the display of named datatypes
- attributes. PVN 2007/03/13
+ attributes. PVN 2007/03/13
- Fixed h5dump regarding the display of group comments. PVN
- 2007/03/13
- - Fixed h5dump regarding the display of hardlinks pointing
- to the root group. PVN 2007/03/13
+ 2007/03/13
+ - Fixed h5dump regarding the display of hardlinks pointing
+ to the root group. PVN 2007/03/13
- Fixed h5diff percentage option -p. PVN 2007/03/05
- Fixed h5dump that caused array indices greater than 2 ^32-1
- not to be printed correctly - PVN 2007/2/19
+ not to be printed correctly - PVN 2007/2/19
- Fixed h5dump to print attributes data in ASCII if -r option is used.
- AKC - 2004/11/18
+ AKC - 2004/11/18
- Fixed space utilization reported in h5ls to correct error in formula
used. QAK - 2004/10/22
- Fixed h5redeploy which sometimes complain too many argument for the
@@ -1021,14 +1023,14 @@ Bug Fixes since HDF5-1.6.0 release
H5Tget_native_type() internally. QAK - 2003/08/25
- Documentation
- -------------
+ Documentation
+ -------------
F90 APIs
--------
- h5pget_driver_f was returning information that could not be
- interpreted by fortran application program; fixed. EIP - 2005/04/10
+ interpreted by fortran application program; fixed. EIP - 2005/04/10
Platforms Tested
@@ -1039,7 +1041,7 @@ Platforms marked with * were not tested for hdf5-1.8.0-rc* release
* AIX 5.2 (32/64 bit) xlc 8.0.0.11
xlC 8.0
- xlf 10.01.0000.0
+ xlf 10.01.0000.0
mpcc_r 6.0.0.8
mpxlf_r 8.1.1.7
* AIX 5.3 (32/64 bit) xlc 7.0.0.8
@@ -1063,9 +1065,9 @@ Platforms marked with * were not tested for hdf5-1.8.0-rc* release
HP F90 v2.9.2
HP aC++/ANSI C B3910B A.06.00
IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m
- F90 MIPSpro 7.4.4m
+ F90 MIPSpro 7.4.4m
C++ MIPSpro cc 7.4.4m
-
+
* Linux 2.6.9 (RHEL4) Intel 10.0 compilers
(abe.ncsa.uiuc.edu)
Linux 2.4.21-47 gcc 3.2.3 20030502
@@ -1075,10 +1077,10 @@ Platforms marked with * were not tested for hdf5-1.8.0-rc* release
Intel 9.1 (icc, ifort, icpc)
Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0, g95 (GCC 4.0.3)
(smirom) PGI 6.2-5 (pgcc, pgf90, pgCC)
- Intel 9.1 (icc, iort, icpc)
- Linux 2.6.5-7.252.1-rtgfx #1
+ Intel 9.1 (icc, iort, icpc)
+ Linux 2.6.5-7.252.1-rtgfx #1
SMP ia64 Intel(R) C++ Version 9.0
- (cobalt) Intel(R) Fortran Itanium(R) Version 9.0
+ (cobalt) Intel(R) Fortran Itanium(R) Version 9.0
SGI MPI
SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 95 6.2
@@ -1086,29 +1088,29 @@ Platforms marked with * were not tested for hdf5-1.8.0-rc* release
* SunOS 5.10 i86pc Sun C 5.7
Sun Fortran 95 8.1
Sun C++ 5.7
- SunOS 5.10 cc: Sun C 5.8
- (linew) f90: Sun Fortran 95 8.2
- CC: Sun C++ 5.8
+ SunOS 5.10 cc: Sun C 5.8
+ (linew) f90: Sun Fortran 95 8.2
+ CC: Sun C++ 5.8
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
- (tungsten) gcc 3.2.2 20030222
+ (tungsten) gcc 3.2.2 20030222
Intel(R) C++ Version 9.0
Intel(R) Fortran Compiler Version 9.0
IA-64 Linux 2.4.21.SuSE_292.til1 ia64
(NCSA tg-login) gcc 3.2.2
Intel(R) C++ Version 8.1
Intel(R) Fortran Compiler Version 8.1
- mpich-gm-1.2.5..10-intel-r2
- Windows XP
- Visual Studio .NET
+ mpich-gm-1.2.5..10-intel-r2
+ Windows XP
+ Visual Studio .NET
Visual Studio 2005 w/ Intel Fortran 9.1
Cygwin(native gcc compiler and g95)
- MinGW(native gcc compiler and g95)
- Windows XP x64
- Visual Studio 2005 w/ Intel Fortran 9.1
- Windows Vista
- Visual Studio 2005
+ MinGW(native gcc compiler and g95)
+ Windows XP x64
+ Visual Studio 2005 w/ Intel Fortran 9.1
+ Windows Vista
+ Visual Studio 2005
- MAC OS 10.4 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
+ MAC OS 10.4 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
G95 (GCC 4.0.3 (g95 0.91!) Nov 21 2006)
* Alpha Open VMS 7.3
@@ -1123,7 +1125,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -1147,57 +1149,57 @@ RedHat EL3 W PGI (3) n y n y y n
SuSe x86_64 gcc (3,12) y(1a) y(11) n y y y
SuSe x86_64 Int (3,12) n y(13) n y y n
SuSe x86_64 PGI (3,12) n y(8) n y y y
-Linux 2.4 Xeon C
+Linux 2.4 Xeon C
Lustre Intel (3,6) n y n y y n
-Linux 2.6 SuSE ia64 C
+Linux 2.6 SuSE ia64 C
Intel (3,7) y y y y y n
-Linux 2.6 SGI Altix
+Linux 2.6 SGI Altix
ia64 Intel (3) y y y y y y
Alpha OpenVMS 7.3.2 n y n y n n
-Platform Shared Shared Shared static- Thread-
- C libs F90 libs C++ libs exec safe
-Solaris2.8 64-bit y y y x y
-Solaris2.8 32-bit y y y x y
-Solaris2.10 64-bit y x y
-Solaris2.10 32-bit y x y
-IRIX64_6.5 64-bit y y n y y
-IRIX64_6.5 32-bit y dna y y y
-HPUX11.00 y n y x n
-HPUX11.23-32bit y n n y n
-HPUX11.23-64bit y dna n y n
-Cray XT3 (16) n n n n n
-AIX-5.2 & 5.3 32-bit n n n y n
-AIX-5.2 & 5.3 64-bit n n n y n
-Windows XP y y(15) y y y
-Windows XP x64 y y(15) y y y
-Windows Vista y n n y y
-Mac OS X 10.3 y y n
+Platform Shared Shared Shared static- Thread-
+ C libs F90 libs C++ libs exec safe
+Solaris2.8 64-bit y y y x y
+Solaris2.8 32-bit y y y x y
+Solaris2.10 64-bit y x y
+Solaris2.10 32-bit y x y
+IRIX64_6.5 64-bit y y n y y
+IRIX64_6.5 32-bit y dna y y y
+HPUX11.00 y n y x n
+HPUX11.23-32bit y n n y n
+HPUX11.23-64bit y dna n y n
+Cray XT3 (16) n n n n n
+AIX-5.2 & 5.3 32-bit n n n y n
+AIX-5.2 & 5.3 64-bit n n n y n
+Windows XP y y(15) y y y
+Windows XP x64 y y(15) y y y
+Windows Vista y n n y y
+Mac OS X 10.3 y y n
Mac OS X 10.4 PowerPC
-FreeBSD 4.11 y n y y y
-RedHat EL3 W (3) y y(10) y y y
-RedHat EL3 W Intel (3) y y y y n
-RedHat EL3 W PGI (3) y y y y n
-SuSe x86_64 W GNU (3,12) y y y y y
-SuSe x86_64 W Int (3,12) y y y y(14) n
-SuSe x86_64 W PGI (3,12) y y y y(14) n
-Linux 2.4 Xeon C
- Lustre Intel (6) y y y y n
-Linux 2.4 SuSE
- ia64 C Intel (7) y y y y n
-Linux 2.4 SGI Altix
- ia64 Intel y y n
-Alpha OpenVMS 7.3.2 n n n y n
+FreeBSD 4.11 y n y y y
+RedHat EL3 W (3) y y(10) y y y
+RedHat EL3 W Intel (3) y y y y n
+RedHat EL3 W PGI (3) y y y y n
+SuSe x86_64 W GNU (3,12) y y y y y
+SuSe x86_64 W Int (3,12) y y y y(14) n
+SuSe x86_64 W PGI (3,12) y y y y(14) n
+Linux 2.4 Xeon C
+ Lustre Intel (6) y y y y n
+Linux 2.4 SuSE
+ ia64 C Intel (7) y y y y n
+Linux 2.4 SGI Altix
+ ia64 Intel y y n
+Alpha OpenVMS 7.3.2 n n n y n
Notes: (1) Using mpich 1.2.6.
(1a) Using mpich2 1.0.6.
(2) Using mpt and mpich 1.2.6.
- (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
- (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
+ (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel compilers
(8) pgf90
@@ -1207,7 +1209,7 @@ Alpha OpenVMS 7.3.2 n n n y n
(12) AMD Opteron x86_64
(13) ifort
(14) Yes with C and Fortran, but not with C++
- (15) Using Visual Studio 2005 or Cygwin
+ (15) Using Visual Studio 2005 or Cygwin
(16) Not tested for this release.
Compiler versions for each platform are listed in the preceding
"Platforms Tested" table.
@@ -1216,14 +1218,14 @@ Alpha OpenVMS 7.3.2 n n n y n
Known Problems
==============
-* We discovered two problems when running collective IO parallel HDF5 tests
- with chunking storage on ChaMPIon MPI compiler on tungsten, a linux
+* We discovered two problems when running collective IO parallel HDF5 tests
+ with chunking storage on ChaMPIon MPI compiler on tungsten, a linux
cluster at NCSA.
- Under some complex selection cases,
+ Under some complex selection cases,
1) MPI_Get_element returns the wrong value.
2) MPI_Type_struct also generates wrong derived data type and corrupt data
may be generated.
- This only happens when turning on collective IO with chunking storage
+ This only happens when turning on collective IO with chunking storage
with some complex selections. We haven't found these problems on other
MPI-IO compilers. If you encounter these problems, you may use Independent IO
instead.
@@ -1239,22 +1241,22 @@ Known Problems
* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel
tests failed with MPI-IO file locking message. AKC - 2007/6/25.
* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers use
- -mp -O1 compilation flags to build the libraries. Higher level of optimization
- causes failures in several HDF5 library tests.
+ -mp -O1 compilation flags to build the libraries. Higher level of optimization
+ causes failures in several HDF5 library tests.
* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the
shared libraries (tested for 1.8.0-beta2)
* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass
and the parallel tests also pass with lots of non-fatal error messages.
* For LLNL, uP: both serial and parallel pass. Zeus: serial passes but
parallel fails with a known proglem in MPI. ubgl: serial passes but
- parallel fails.
-* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test
+ parallel fails.
+* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test
* configuring with --enable-debug=all produces compiler errors on most
platforms. Users who want to run HDF5 in debug mode should use
--enable-debug rather than --enable-debug=all to enable debugging
information on most modules.
* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long
- double to (unsigned) long long and from (unsigned)long long to long double.
+ double to (unsigned) long long and from (unsigned)long long to long double.
* On Altix SGI with Intel 9.0 testmeta.c would not compile with -O3
optimization flag.
* On VAX, Scaleoffset filter isn't supported. The filter cannot be applied to
@@ -1268,23 +1270,23 @@ Known Problems
that when using 4 processors, a simple collective write will be hung
sometimes. This can be verified with t_mpi test under testpar.
* On IRIX6.5, when C compiler version >7.4, the complicate MPI derived data type
- code will work. However, the user should be aware to enlarge MPI_TYPE_MAX environment
+ code will work. However, the user should be aware to enlarge MPI_TYPE_MAX environment
variable to some certian value in order to use collective irregular selection code.
- For example, the current parallel HDF5 test needs to enlarge MPI_TYPE_MAX to
+ For example, the current parallel HDF5 test needs to enlarge MPI_TYPE_MAX to
200,000 to make the test pass.
-* The dataset created or rewritten with the v1.6.3 library or after can't
- be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
- enabled. There was a bug in the calculating code of the Fletcher32
- checksum in the library before v1.6.3. The checksum value wasn't consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value is no
- longer the same as before on little-endian system. The library release
+* The dataset created or rewritten with the v1.6.3 library or after can't
+ be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
+ enabled. There was a bug in the calculating code of the Fletcher32
+ checksum in the library before v1.6.3. The checksum value wasn't consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value is no
+ longer the same as before on little-endian system. The library release
after 1.6.4 can still read the dataset created or rewritten with the library
of v1.6.2 or before. SLU - 2005/6/30
* For the version 6(6.02 and 6.04) of Portland Group compiler on AMD Opteron
processor, there's a bug in the compiler for optimization(-O2). The library
- failed in several tests but all related to multi driver. The problem has
- been reported to the vendor.
+ failed in several tests but all related to multi driver. The problem has
+ been reported to the vendor.
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
messages like "INFO: 0031-XXX ...". This is from the command poe.
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
@@ -1298,7 +1300,7 @@ Known Problems
to provide a mean to run poe without the debug socket.
* The C++ library's tests fails when compiling with PGI C++ compiler. The
- workaround until the problem is correctly handled is to use the
+ workaround until the problem is correctly handled is to use the
flag "--instantiate=local" prior to the configure and build steps, as:
setenv CXX "pgCC --instantiate=local" for pgCC 5.02 and higher
@@ -1316,7 +1318,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -1325,7 +1327,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
@@ -1345,7 +1347,7 @@ Known Problems
the different precision in the values displayed and h5ls appears to
be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from this site:
@@ -1360,7 +1362,7 @@ Known Problems
* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
* On IA32 and IA64 systems, if you use a compiler other than GCC (such as
@@ -1384,28 +1386,28 @@ Known Problems
INSTALL file sections 5.7 and 5.8
* On at least one system, (SDSC DataStar), the scheduler (in this case
- LoadLeveler) sends job status updates to standard error when you run
+ LoadLeveler) sends job status updates to standard error when you run
any executable that was compiled with the parallel compilers.
- This causes problems when running "make check" on parallel builds, as
+ This causes problems when running "make check" on parallel builds, as
many of the tool tests function by saving the output from test runs,
- and comparing it to an exemplar.
+ and comparing it to an exemplar.
The best solution is to reconfigure the target system so it no longer
inserts the extra text. However, this may not be practical.
- In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
- the configure and build. This will cause "make check" to continue after
+ In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
+ the configure and build. This will cause "make check" to continue after
detecting errors in the tool tests. However, in the case of SDSC DataStar,
it also leaves you with some 150 "failed" tests to examine by hand.
A second solution is to write a script to run serial tests and filter
out the text added by the scheduler. A sample script used on SDSC
- DataStar is given below, but you will probably have to customize it
- for your installation.
+ DataStar is given below, but you will probably have to customize it
+ for your installation.
- Observe that the basic idea is to insert the script as the first item
- on the command line which executes the the test. The script then
+ Observe that the basic idea is to insert the script as the first item
+ on the command line which executes the the test. The script then
executes the test and filters out the offending text before passing
it on.
@@ -1418,20 +1420,20 @@ Known Problems
($* > $STDOUT_FILE) >& $STDERR_FILE
- set RETURN_VALUE=$status
+ set RETURN_VALUE=$status
cat $STDOUT_FILE
tail +3 $STDERR_FILE
- exit $RETURN_VALUE
+ exit $RETURN_VALUE
You get the HDF make files and test scipts to execute your filter script
- by setting the environment variable "RUNSERIAL" to the full path of the
- script prior to running configure for parallel builds. Remember to
+ by setting the environment variable "RUNSERIAL" to the full path of the
+ script prior to running configure for parallel builds. Remember to
"unsetenv RUNSERIAL" before running configure for a serial build.
- Note that the RUNSERIAL environment variable exists so that we can
+ Note that the RUNSERIAL environment variable exists so that we can
can prefix serial runs as necessary on the target system. On DataStar,
no prefix is necessary. However on an MPICH system, the prefix might
have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to
@@ -1451,16 +1453,16 @@ HDF5 version 1.6.7 released on Thu Jan 31 21:09:10 CST 2008
INTRODUCTION
============
-This document describes the differences between HDF5-1.6.6 and HDF5-1.6.7
+This document describes the differences between HDF5-1.6.6 and HDF5-1.6.7
It contains information on the platforms tested and known problems in
HDF5-1.6.7. For more details, check the HISTORY.txt file in the HDF5 source.
HDF5 documentation can be found in the distributed release source code
-in the subdirectory doc/html/ or on the THG (The HDF Group) FTP server:
+in the subdirectory doc/html/ or on the THG (The HDF Group) FTP server:
ftp://ftp.hdfgroup.org/HDF5/docs/
-Documentation for the current release in the HDF5 Release 1.6.x series is
+Documentation for the current release in the HDF5 Release 1.6.x series is
also on the HDF web site:
http://hdfgroup.org/HDF5/doc1.6/
@@ -1490,7 +1492,7 @@ New Features
============
Configuration:
-------------------------
- '--enable-stream-vfd' and '--disable-stream-vfd' are no longer valid
+ '--enable-stream-vfd' and '--disable-stream-vfd' are no longer valid
configure options because the stream I/O driver has ben removed from
the distribution.
@@ -1500,12 +1502,12 @@ New Features
--------
The stream I/O driver is not included with the HDF5 Library in this
release. The source code files hdf5/src/H5FDstream.c and
- hdf5/src/H5FDstream.h and the driver ENUM value H5FD_STREAM have been
+ hdf5/src/H5FDstream.h and the driver ENUM value H5FD_STREAM have been
removed.
Parallel Library:
-----------------
- None
+ None
Tools:
------
@@ -1531,9 +1533,9 @@ Bug Fixes since HDF5-1.6.6 Release
Library
-------
- - H5Iget_name could not be used with an object identifier returned
- by H5Rdereference; the function would not be able to determine
- a valid object name. It has been fixed. SLU - 2008/1/30
+ - H5Iget_name could not be used with an object identifier returned
+ by H5Rdereference; the function would not be able to determine
+ a valid object name. It has been fixed. SLU - 2008/1/30
- Changed library's behavior for reading files that might have
corrupted object header information from a previous (buggy)
version of the library. By default, the library now rebuilds the
@@ -1555,15 +1557,15 @@ Bug Fixes since HDF5-1.6.6 Release
Performance
-------------
None
-
+
Tools
-----
None
- Documentation
- -------------
+ Documentation
+ -------------
None
@@ -1571,7 +1573,7 @@ Bug Fixes since HDF5-1.6.6 Release
-------
None
-
+
C++ API
-------
None
@@ -1579,13 +1581,13 @@ Bug Fixes since HDF5-1.6.6 Release
Documentation
=============
- HDF5 documentation can be found in the distributed release source
- code in the subdirectory doc/html/ (start with index.html) or on the
- THG (The HDF Group) FTP server:
+ HDF5 documentation can be found in the distributed release source
+ code in the subdirectory doc/html/ (start with index.html) or on the
+ THG (The HDF Group) FTP server:
ftp://ftp.hdfgroup.org/HDF5/docs/
- Online documentation for the current release in the HDF5 Release 1.6.x
+ Online documentation for the current release in the HDF5 Release 1.6.x
series can be found on the THG web site:
http://hdfgroup.org/HDF5/doc1.6/
@@ -1594,9 +1596,9 @@ Documentation
in the document "HDF5 Software Changes from Release to Release":
http://hdfgroup.org/HDF5/doc1.6/ADGuide/Changes.html
-
- Since the stream I/O driver is not included in this release, the
- functions H5Pset_fapl_stream and H5Pget_fapl_stream and the stream
+
+ Since the stream I/O driver is not included in this release, the
+ functions H5Pset_fapl_stream and H5Pget_fapl_stream and the stream
ENUM value H5FD_STREAM have been removed from the documentation.
@@ -1620,20 +1622,20 @@ Platforms Tested
Linux 2.6.9-42.0.10.ELsmp #1 gcc (GCC) 3.4.6
SMP i686 i386 G95 (GCC 4.0.3 (g95 0.91!) April 18 2007)
- (kagiso) PGI C, Fortran, C++ 7.0-7 32-bit
- Intel(R) C Compiler for 32-bit
- applications, Version 9.1
- Intel(R) C++ Compiler for 32-bit
+ (kagiso) PGI C, Fortran, C++ 7.0-7 32-bit
+ Intel(R) C Compiler for 32-bit
+ applications, Version 9.1
+ Intel(R) C++ Compiler for 32-bit
+ applications, Version 9.1
+ Intel(R) Fortran Compiler for 32-bit
applications, Version 9.1
- Intel(R) Fortran Compiler for 32-bit
- applications, Version 9.1
Absoft 32-bit Fortran 95 10.0.4
- MPICH mpich2-1.0.6p1 compiled with
- gcc 4.2.1 and G95 (GCC 4.0.3 (g95 0.91!)
+ MPICH mpich2-1.0.6p1 compiled with
+ gcc 4.2.1 and G95 (GCC 4.0.3 (g95 0.91!)
Linux 2.6.16.46-0.12-debug #1 Intel(R) C++ Version 10.0.025
SMP ia64 GNU/Linux Intel(R) Fortran Itanium(R) Version 10.0.025
- (ucar hir1)
+ (ucar hir1)
Linux 2.6.16.46-0.14-smp #1 Intel(R) C++ for Intel(R) EM64T Ver. 9.1.037
SMP x86_64 GNU/Linux Intel(R) Fortran Intel(R) EM64T Ver. 9.1.031
@@ -1652,7 +1654,7 @@ Platforms Tested
SunOS 5.10 32- and 64-bit Sun WorkShop 6 update 2 C 5.8
(linew) Sun WorkShop 6 update 2 Fortran 95 8.2
Sun WorkShop 6 update 2 C++ 5.8
- Patch 121019-06
+ Patch 121019-06
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
(tungsten) Intel(R) C++ Version 9.0
@@ -1722,34 +1724,34 @@ SuSE Linux 2.4 ia64 C y y y y y y
SuSe Linux 2.6.5 SGI Altix ia64 n y n y y y
-Platform Shared static- Thread-
- libraries(4) exec safe
-Solaris2.8 32- and 64-bit y n y
-Solaris2.10 32- and 64-bit y n y
-IRIX64_6.5 32-bit y n y
-IRIX64_6.5 64-bit y n y
-WinXP Visual Studio 6.0 y n n
-WinXP CYGWIN y n n
-WinXP 2005 y n n
-WinXP .Net y n n
-WinVista 2005 y n n
-Mac OS X 10.4.10 y n n
-AIX-5.2 & 5.3 32- and 64-bit n n n
-FreeBSD 6.2 32- and 64-bit y n n
-RedHat Linux 2.4.21 W y n n
-SuSE Linux 2.6.9-42 i686 GNU (1) W y n y
-SuSE Linux 2.6.9-42 i686 Intel W y n n
-SuSE Linux 2.6.9-42 i686 PGI W n n n
-SuSE Linux 2.6.16 x86_64 GNU (1) W y n y
-SuSE Linux 2.6.16 x86_64 Intel W y n n
-SuSE Linux 2.6.16 x86_64 PGI W n n n
-RHEL 4 Linux 2.6.9 Xeon Lustre C y n n
-RedHat Linux 2.4 Xeon Lustre C y n n
-SuSE Linux 2.4 ia64 C y n n
-SuSe Linux 2.6.5 SGI Altix ia64 n n n
-
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Platform Shared static- Thread-
+ libraries(4) exec safe
+Solaris2.8 32- and 64-bit y n y
+Solaris2.10 32- and 64-bit y n y
+IRIX64_6.5 32-bit y n y
+IRIX64_6.5 64-bit y n y
+WinXP Visual Studio 6.0 y n n
+WinXP CYGWIN y n n
+WinXP 2005 y n n
+WinXP .Net y n n
+WinVista 2005 y n n
+Mac OS X 10.4.10 y n n
+AIX-5.2 & 5.3 32- and 64-bit n n n
+FreeBSD 6.2 32- and 64-bit y n n
+RedHat Linux 2.4.21 W y n n
+SuSE Linux 2.6.9-42 i686 GNU (1) W y n y
+SuSE Linux 2.6.9-42 i686 Intel W y n n
+SuSE Linux 2.6.9-42 i686 PGI W n n n
+SuSE Linux 2.6.16 x86_64 GNU (1) W y n y
+SuSE Linux 2.6.16 x86_64 Intel W y n n
+SuSE Linux 2.6.16 x86_64 PGI W n n n
+RHEL 4 Linux 2.6.9 Xeon Lustre C y n n
+RedHat Linux 2.4 Xeon Lustre C y n n
+SuSE Linux 2.4 ia64 C y n n
+SuSe Linux 2.6.5 SGI Altix ia64 n n n
+
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes:
@@ -1761,13 +1763,13 @@ Known Problems
* We discovered two problems when running collective IO parallel HDF5 tests
with chunking storage with the ChaMPIon MPI compiler on tungsten, a Linux
cluster at NCSA.
- Under some complex selection cases,
+ Under some complex selection cases,
1) MPI_Get_element returns the wrong value.
- 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
+ 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
data may be generated.
This only happens when turning on collective IO with chunking storage
- with some complex selections. We haven't found these problems on other
- MPI-IO compilers. If you encounter these problems, you may use Independent
+ with some complex selections. We haven't found these problems on other
+ MPI-IO compilers. If you encounter these problems, you may use Independent
IO instead.
To avoid this problem, change the following line in your code:
@@ -1775,7 +1777,7 @@ Known Problems
to
H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT);
-
+
KY - 2007/08/24
* QSC (an HP alpha-based OSF1 cluster) does not create h5pfc correctly. It
@@ -1788,7 +1790,7 @@ Known Problems
"523648:lt-h5repacktst: rld: Fatal Error: Cannot Successfully map soname
'libh5test.so.1' under any of the filenames .......(bunch of directories)
"
- And the testing will fail.
+ And the testing will fail.
We believe this is a libtool problem. One way to get rid of this is to
add the paths of libh5test.so.1 and libh5.so.1 to the shared library path.
@@ -1802,15 +1804,15 @@ Known Problems
setenv LD_LIBRARY64_PATH ......(existing paths):[full path of HDF5
directory/test/.libs]:[full path of HDF5 directory/src/.libs]
- NOTE: This problem ONLY affects the testing of the HDF5 library when you
- build from source. It won't affect any applications that would like to link
- with the HDF5 shared library since the shared library path needs to be set
+ NOTE: This problem ONLY affects the testing of the HDF5 library when you
+ build from source. It won't affect any applications that would like to link
+ with the HDF5 shared library since the shared library path needs to be set
anyway. KY - 2007/8/2
* QSC (an HP alpha-based OSF1 cluster) failed the testpar/testphdf5 sub-test
- "calloc". All other tests passed. This indicates that a dataset using
- chunked storage created by serial HDF5 may not work properly with parallel
- HDF5. The calloc test can be skipped by running "prun ... testphdf5 -x
+ "calloc". All other tests passed. This indicates that a dataset using
+ chunked storage created by serial HDF5 may not work properly with parallel
+ HDF5. The calloc test can be skipped by running "prun ... testphdf5 -x
calloc". AKC - 2007/7/12.
* The Intel C Compiler for the Linux x86_64 platform (EM64T-based, v8.1) has
@@ -1819,30 +1821,30 @@ Known Problems
PROD_CFLAGS from -O3 to -O0. Then run configure. AKC - 2005/11/10.
* When testing parallel HDF5 with the C compiler version MIPSpro 7.4.3 on IRIX
- 6.5, set the environment variable MPI_TYPE_MAX to be a bigger number, for
- example 120000, in order to pass the complicated collective IO tests inside
- the parallel HDF5 library. This is not a problem inside the parallel HDF5
+ 6.5, set the environment variable MPI_TYPE_MAX to be a bigger number, for
+ example 120000, in order to pass the complicated collective IO tests inside
+ the parallel HDF5 library. This is not a problem inside the parallel HDF5
library. You can always set a bigger number on your system. KY - 2005/10/6
-* A contiguous or chunked dataset created by a sequential version of HDF5
- might not be able to be modified with a parallel version of the library.
- Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
+* A contiguous or chunked dataset created by a sequential version of HDF5
+ might not be able to be modified with a parallel version of the library.
+ Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
dataset creation property list to avoid the problem. EIP - 2005/09/09
-* A dataset created or rewritten with the v1.6.3 library or after can't
- be read with the v1.6.2 library or before when Fletcher32 EDC (a filter) is
- enabled. There was a bug in the calculating code of the Fletcher32
- checksum in the library before v1.6.3. The checksum value wasn't consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value is no
- longer the same as before on little-endian system. HDF5 library releases
- after 1.6.4 can still read datasets created or rewritten with an HDF5
+* A dataset created or rewritten with the v1.6.3 library or after can't
+ be read with the v1.6.2 library or before when Fletcher32 EDC (a filter) is
+ enabled. There was a bug in the calculating code of the Fletcher32
+ checksum in the library before v1.6.3. The checksum value wasn't consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value is no
+ longer the same as before on little-endian system. HDF5 library releases
+ after 1.6.4 can still read datasets created or rewritten with an HDF5
library of v1.6.2 or before. SLU - 2005/7/8
* For version 6 (6.02 and 6.04) of the Portland Group compiler on AMD Opteron
processor, there's a bug in the compiler for optimization(-O2). The library
- failed in several tests, all related to the multi driver. The problem has
- been reported to the vendor.
+ failed in several tests, all related to the multi driver. The problem has
+ been reported to the vendor.
* test/big fails sometimes with the message "Possible overlap with another
region." The test selects regions randomly, and this error occurs when
@@ -1850,7 +1852,7 @@ Known Problems
HDF5. Since the error is triggered by a random situation, it will
usually disappear if the test is re-run.
-* Newer SGI MIPSpro compilers (version 7.4.x) support C99 features but
+* Newer SGI MIPSpro compilers (version 7.4.x) support C99 features but
have a "guard" statement in stdint.h that will #error and skip the rest
of the header file if the C99 option is not used explicitly. Hardsetting
$CC to c99 will resolve the problem. AKC - 2004/12/13
@@ -1861,11 +1863,11 @@ Known Problems
and run the tests again.
The tests may also fail with messages like "The socket name is already
- in use". HDF5 does not use sockets. This is due to problems of the
- poe command trying to set up the debug socket. Check whether there are
- many old /tmp/s.pedb.* files staying around. These are sockets used by
- the poe command and left behind due to failed commands. Ask your system
- administrator to clean them out. Lastly, request IBM to provide a means
+ in use". HDF5 does not use sockets. This is due to problems of the
+ poe command trying to set up the debug socket. Check whether there are
+ many old /tmp/s.pedb.* files staying around. These are sockets used by
+ the poe command and left behind due to failed commands. Ask your system
+ administrator to clean them out. Lastly, request IBM to provide a means
to run poe without the debug socket.
* The h5dump tests may fail to match the expected output on some platforms
@@ -1883,7 +1885,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on the HPUX 11.00.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -1897,9 +1899,9 @@ Known Problems
long long (absolute values less than 1**-308) to double. This triggers
the test/dtypes to report failure in the following test:
Testing random sw long double -> double conversions
- If -ieee is used, the converted doubles spread over the range 0.0 to
- 10**-308. If -ieee is not used, the converted double values are mostly
- 0.0, but occasionally appear as 10**-308. This has been reported to the
+ If -ieee is used, the converted doubles spread over the range 0.0 to
+ 10**-308. If -ieee is not used, the converted double values are mostly
+ 0.0, but occasionally appear as 10**-308. This has been reported to the
system staff.
All other tests have passed.
@@ -1973,8 +1975,8 @@ HDF5-1.6.6 It contains information on the platforms tested and
known problems in HDF5-1.6.6. For more details, check the HISTORY.txt
file in the HDF5 source.
-HDF5 documentation can be found in the distributed release source
-code in the subdirectory doc/html/ or on the THG (The HDF Group)
+HDF5 documentation can be found in the distributed release source
+code in the subdirectory doc/html/ or on the THG (The HDF Group)
ftp server (ftp.hdfgroup.org) in the directory:
/HDF5/docs/
@@ -2018,28 +2020,28 @@ New Features
Parallel Library:
-----------------
- None
-
+
Tools:
------
- h52gif and gif2h5: Both these tools were revised to include High
Level Image API support. Tests were added to /hl/tools/gif2h5.
PVN - 2007/04/13
- - h5dump: Added support for double long type H5T_NATIVE_LDOUBLE.
+ - h5dump: Added support for double long type H5T_NATIVE_LDOUBLE.
PVN - 2007/03/13
- h5dump: Added support for binary output; see usage. PVN 2007/03/13
- h5repack: Added support for reading and writing by hyperslabs for
large files. PVN - 2007/03/01
- h5repack: A new option allows the copy to use the source file type
- (default) instead of the previous conversion to native type.
+ (default) instead of the previous conversion to native type.
PVN - 2007/03/01
- - h5repack: Added output of the percentage of compression achieved.
+ - h5repack: Added output of the percentage of compression achieved.
PVN - 2007/03/01
- h5diff: Added support for comparing dataset regions. PVN -
2007/02/20
- - h5diff: Added support for reading and comparing by hyperslabs for
+ - h5diff: Added support for reading and comparing by hyperslabs for
large files. PVN - 2007/02/20
- h5diff: Added printing of dataset dimensions along with dataset
- name.
+ name.
PVN - 2007/02/19
F90 API:
@@ -2055,7 +2057,7 @@ Support for New Platforms, Languages and Compilers
==================================================
- Added support for MAC Intel (Darwin 8.8.2) (gcc 4.0.1 and g95 0.91)
EIP - 2007/02/13
- - Added support for GNU C compiler version 4.2.1 for FreeBSD 6.2
+ - Added support for GNU C compiler version 4.2.1 for FreeBSD 6.2
(32- and 64-bit)
@@ -2066,10 +2068,10 @@ Bug Fixes since HDF5-1.6.5 Release
-------
- Fixed several bugs with writing fill values for datasets that have
a variable-length datatype or component datatype. QAK -
-2007/06/19
+ 2007/06/19
- STDIO driver didn't support files bigger than 2GB because the OFFSET
- parameter of fseek is of type LONG INT, not big enough for big
- files. Use fseeko instead for big files if it's available on the
+ parameter of fseek is of type LONG INT, not big enough for big
+ files. Use fseeko instead for big files if it's available on the
system. SLU - 2007/4/5
- Relaxed restrictions on attribute operations to allow a file ID to
be used as the "location ID". If a file ID is used, the attribute
@@ -2081,7 +2083,7 @@ Bug Fixes since HDF5-1.6.5 Release
- Fixed potential file corruption bug which could overwrite a portion
of an object's header when an attribute was renamed. If the new
name for the attribute was longer than the old name, it was
-possible
+ possible
that the attribute would grow enough to overwrite another message
in the object's header. QAK - 2007/01/02
- Fixed file corruption bug which could write an incorrect number of
@@ -2106,11 +2108,11 @@ possible
resembles the following, the object has been affected by this bug:
#007: ../../hdf5_v1.6/src/H5C.c line 3887 in H5C_load_entry():
-unable to load entry
+ unable to load entry
major(08): Meta data cache layer
minor(40): Unable to load metadata into cache
#008: ../../hdf5_v1.6/src/H5Ocache.c line 332 in H5O_load():
-corrupt object header - too few messages
+ corrupt object header - too few messages
major(12): Object header layer
minor(40): Unable to load metadata into cache
@@ -2127,12 +2129,12 @@ corrupt object header - too few messages
Configuration
-------------
- - Changed to default to --disable-shared if parallel is enabled.
+ - Changed to default to --disable-shared if parallel is enabled.
AKC - 2007/5/12
- Corrected a coding error in configure when it tries to locate the
- needed MPI and MPI-IO library for the fortran interface.
+ needed MPI and MPI-IO library for the fortran interface.
AKC - 007/5/9.
- - Changed default fortran compiler to g95 when gcc is used.
+ - Changed default fortran compiler to g95 when gcc is used.
AKC - 007/2/17.
- Configure can now use any tr command. No more need for
defining the variable TR, nor is it supported. AKC - 2006/05/20
@@ -2140,28 +2142,28 @@ corrupt object header - too few messages
Performance
-------------
- None
-
+
Tools
-----
- Fixed a bug in h5dump regarding the display of named datatypes
attributes. PVN - 2007/03/13
- - Fixed a bug in h5dump regarding the display of group comments.
+ - Fixed a bug in h5dump regarding the display of group comments.
PVN - 2007/03/13
- - Fixed a bug in h5dump regarding the display of hardlinks pointing
+ - Fixed a bug in h5dump regarding the display of hardlinks pointing
to the root group. PVN - 2007/03/13
- Fixed a bug in the h5diff percentage option -p. PVN - 2007/03/05
- Fixed a bug in h5dump that caused array indices greater than 2^32-1
not to be printed correctly. PVN - 2007/2/19
- Documentation
- -------------
- - Corrected errors and extended the descriptions in Reference Manual
- entries for several functions.
+ Documentation
+ -------------
+ - Corrected errors and extended the descriptions in Reference Manual
+ entries for several functions.
F90 API
-------
- None
-
+
C++ API
-------
- Changed
@@ -2173,8 +2175,7 @@ corrupt object header - too few messages
- Wrappers of H5Rcreate had incorrect prototypes. Added these
overloaded functions:
IdComponent::reference(void* ref, const char* name,
-DataSpace&
- dataspace, H5R_type_t ref_type = H5R_DATASET_REGION)
+ DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION)
IdComponent::void reference(void* ref, const char* name)
IdComponent::reference(void* ref, const H5std_string& name)
and will remove these incorrect member functions:
@@ -2191,13 +2192,13 @@ DataSpace&
Documentation
=============
- HDF5 documentation can be found in the distributed release source
- code in the subdirectory doc/html/ (start with index.html) or on the
+ HDF5 documentation can be found in the distributed release source
+ code in the subdirectory doc/html/ (start with index.html) or on the
THG (The HDF Group) ftp server (ftp.hdfgroup.org) in the directory:
/HDF5/docs/
- Online documentation for the current release can be found on the THG
+ Online documentation for the current release can be found on the THG
web site:
http://hdfgroup.org/HDF5/doc/
@@ -2233,17 +2234,17 @@ Platforms Tested
Linux 2.6.9-42.0.10.ELsmp #1 gcc (GCC) 3.4.6
SMP i686 i386 G95 (GCC 4.0.3 (g95 0.91!) Nov 21 2006)
- (kagiso) PGI C, Fortran, C++ 6.2-5 32-bit
- icc (ICC) 9.1
- Intel(R) C++ Compiler for 32-bit
+ (kagiso) PGI C, Fortran, C++ 6.2-5 32-bit
+ icc (ICC) 9.1
+ Intel(R) C++ Compiler for 32-bit
+ applications, Version 9.1
+ Intel(R) Fortran Compiler for 32-bit
applications, Version 9.1
- Intel(R) Fortran Compiler for 32-bit
- applications, Version 9.1
Absoft 32-bit Fortran 95 10.0.4
- MPICH mpich2-1.0.4p1 compiled with
- gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.91!)
+ MPICH mpich2-1.0.4p1 compiled with
+ gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.91!)
- Linux 2.6.16.46-0.12-debug #1
+ Linux 2.6.16.46-0.12-debug #1
SMP ia64 GNU/Linux Intel(R) C++ Version 10.0.025
(ucar hir1) Intel(R) Fortran Itanium(R) Version 10.0.025
@@ -2253,14 +2254,14 @@ Platforms Tested
for 64-bit target on x86-64
tested for both 32- and 64-bit binaries
- Linux 2.6.5-7.283-rtgfx Altix
+ Linux 2.6.5-7.283-rtgfx Altix
SMP ia64 Intel(R) C++ Version 9.0
(cobalt) Intel(R) Fortran Itanium(R) Version 9.0
SGI MPI
- OSF1 V5.1 (QSC) Compaq C V6.5-011
+ OSF1 V5.1 (QSC) Compaq C V6.5-011
(See "Known Problems.") HP Fortran V5.5A-3548
- Compaq C++ V6.5-036
+ Compaq C++ V6.5-036
MPIX200_64_r13.4
SunOS 5.8 32- and 64-bit Sun WorkShop 6 update 2 C 5.3
@@ -2270,7 +2271,7 @@ Platforms Tested
SunOS 5.10 32- and 64-bit Sun WorkShop 6 update 2 C 5.8
(linew) Sun WorkShop 6 update 2 Fortran 95 8.2
Sun WorkShop 6 update 2 C++ 5.8
- Patch 121019-06
+ Patch 121019-06
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
(tungsten) Intel(R) C++ Version 9.0
@@ -2369,13 +2370,13 @@ SuSe Linux 2.6.16 SGI Altix ia64 n n n y
SuSe Linux 2.6.5 SGI Altix ia64 n n n y
OSF1 v5.1 n n n y
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes:
(1) Fortran compiled with g95.
-(2) In most cases, shared libraries are provided only for the C library,
+(2) In most cases, shared libraries are provided only for the C library,
except on Windows where they are provided for C, C++, and Fortran.
(3) C++ works only with static libraries.
@@ -2392,7 +2393,7 @@ Known Problems
"523648:lt-h5repacktst: rld: Fatal Error: Cannot Successfully map soname
'libh5test.so.1' under any of the filenames .......(bunch of directories)
"
- And the testing will fail.
+ And the testing will fail.
We believe this is a libtool problem. One way to get rid of this is to
add the paths of libh5test.so.1 and libh5.so.1 to the shared library path.
@@ -2405,15 +2406,15 @@ Known Problems
setenv LD_LIBRARY64_PATH ......(existing pathes):[full path of HDF5
directory/test/.libs]:[full path of HDF5 directory/src/.libs]
- NOTE: This problem ONLY affects the testing of the HDF5 library when you
- build from source. It won't affect any applications that would like to link
- with the HDF5 shared library since the shared library path needs to be set
+ NOTE: This problem ONLY affects the testing of the HDF5 library when you
+ build from source. It won't affect any applications that would like to link
+ with the HDF5 shared library since the shared library path needs to be set
anyway. KY - 2007/8/2
* QSC (an HP alpha-based OSF1 cluster) failed the testpar/testphdf5 sub-test
- "calloc". All other tests passed. This indicates that a dataset using
- chunked storage created by serial HDF5 may not work properly with parallel
- HDF5. The calloc test can be skipped by running "prun ... testphdf5 -x
+ "calloc". All other tests passed. This indicates that a dataset using
+ chunked storage created by serial HDF5 may not work properly with parallel
+ HDF5. The calloc test can be skipped by running "prun ... testphdf5 -x
calloc". AKC - 2007/7/12.
* The Intel C Compiler for the Linux x86_64 platform (EM64T-based, v8.1) has
@@ -2422,30 +2423,30 @@ Known Problems
PROD_CFLAGS from -O3 to -O0. Then run configure. AKC - 2005/11/10.
* When testing parallel HDF5 with the C compiler version MIPSpro 7.4.3 on IRIX
- 6.5, set the environment variable MPI_TYPE_MAX to be a bigger number, for
- example 120000, in order to pass the complicated collective IO tests inside
- the parallel HDF5 library. This is not a problem inside the parallel HDF5
+ 6.5, set the environment variable MPI_TYPE_MAX to be a bigger number, for
+ example 120000, in order to pass the complicated collective IO tests inside
+ the parallel HDF5 library. This is not a problem inside the parallel HDF5
library. You can always set a bigger number on your system. KY - 2005/10/6
-* A contiguous or chunked dataset created by a sequential version of HDF5
- might not be able to be modified with a parallel version of the library.
- Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
+* A contiguous or chunked dataset created by a sequential version of HDF5
+ might not be able to be modified with a parallel version of the library.
+ Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
dataset creation property list to avoid the problem. EIP - 2005/09/09
-* The dataset created or rewritten with the v1.6.3 library or after can't
- be read with the v1.6.2 library or before when Fletcher32 EDC (a filter) is
- enabled. There was a bug in the calculating code of the Fletcher32
- checksum in the library before v1.6.3. The checksum value wasn't consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value is no
- longer the same as before on little-endian system. The library release
+* The dataset created or rewritten with the v1.6.3 library or after can't
+ be read with the v1.6.2 library or before when Fletcher32 EDC (a filter) is
+ enabled. There was a bug in the calculating code of the Fletcher32
+ checksum in the library before v1.6.3. The checksum value wasn't consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value is no
+ longer the same as before on little-endian system. The library release
after 1.6.4 can still read the dataset created or rewritten with the library
of v1.6.2 or before. SLU - 2005/7/8
* For version 6 (6.02 and 6.04) of the Portland Group compiler on AMD Opteron
processor, there's a bug in the compiler for optimization(-O2). The library
- failed in several tests, all related to the multi driver. The problem has
- been reported to the vendor.
+ failed in several tests, all related to the multi driver. The problem has
+ been reported to the vendor.
* test/big fails sometimes with the message "Possible overlap with another
region." The test selects regions randomly, and this error occurs when
@@ -2453,7 +2454,7 @@ Known Problems
HDF5. Since the error is triggered by a random situation, it will
usually disappear if the test is re-run.
-* Newer SGI MIPSpro compilers (version 7.4.x) support C99 features but
+* Newer SGI MIPSpro compilers (version 7.4.x) support C99 features but
have a "guard" statement in stdint.h that will #error and skip the rest
of the header file if the C99 option is not used explicitly. Hardsetting
$CC to c99 will resolve the problem. AKC - 2004/12/13
@@ -2466,7 +2467,7 @@ Known Problems
The tests may also fail with messages like "The socket name is already
in use". HDF5 does not use sockets (except for stream-VFD). This is
due to problems of the poe command trying to set up the debug socket.
- Check whether there are many old /tmp/s.pedb.* files staying around. These
+ Check whether there are many old /tmp/s.pedb.* files staying around. These
are sockets used by the poe command and left behind due to failed commands.
Ask your system administrator to clean them out. Lastly, request IBM
to provide a means to run poe without the debug socket.
@@ -2492,7 +2493,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on the HPUX 11.00.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -2508,9 +2509,9 @@ Known Problems
long long (absolute values less than 1**-308) to double. This triggers
the test/dtypes to report failure in the following test:
Testing random sw long double -> double conversions
- If -ieee is used, the converted doubles spread over the range 0.0 to
- 10**-308. If -ieee is not used, the converted double values are mostly
- 0.0, but occasionally appear as 10**-308. This has been reported to the
+ If -ieee is used, the converted doubles spread over the range 0.0 to
+ 10**-308. If -ieee is not used, the converted double values are mostly
+ 0.0, but occasionally appear as 10**-308. This has been reported to the
system staff.
All other tests have passed.
@@ -2619,62 +2620,62 @@ New Features
============
Configuration:
-------------------------
- - Added yodconfigure, a configure tool, that patches up the configure
- file to allow configure to launch executable via the proper
- launching command like "yod -sz 1". AKC - 2005/11/10
- - Configure now recognizes the TR variable as the location of the
- tr utility. JML 2005/10/20
+ - Added yodconfigure, a configure tool, that patches up the configure
+ file to allow configure to launch executable via the proper
+ launching command like "yod -sz 1". AKC - 2005/11/10
+ - Configure now recognizes the TR variable as the location of the
+ tr utility. JML 2005/10/20
Source code distribution:
-------------------------
- - Added g95 as a testing "platform" informally. AKC - 2005/10/04.
+ - Added g95 as a testing "platform" informally. AKC - 2005/10/04.
- Added MD5 checksumming to snapshot releases. Releases will now
- produce an .md5 file as well as a .tar archive. md5sum can be
- used to verify the arvhice with the .md5 checksum. -JL 2005/09/06
+ produce an .md5 file as well as a .tar archive. md5sum can be
+ used to verify the arvhice with the .md5 checksum. -JL 2005/09/06
Library:
--------
- Added HSYS_ERROR which retrieves the system error message and pushes
- it to the error stack. This provides more information regarding the
- failed system call. AKC - 2005/08/04
+ it to the error stack. This provides more information regarding the
+ failed system call. AKC - 2005/08/04
- Added H5F_OBJ_LOCAL flag to H5Fget_obj_count() & H5Fget_obj_ids(), to
- allow querying for objects in a file that was opened with a particular
- file ID, instead of all objects opened in the file with any file ID.
- QAK - 2005/06/01
+ allow querying for objects in a file that was opened with a particular
+ file ID, instead of all objects opened in the file with any file ID.
+ QAK - 2005/06/01
Parallel Library:
-----------------
- - Added mpich2 as a testing "platform" informally. AKC - 2005/10/04.
- - HDF5 supports collective MPI-IO for irregular selection with HDF5
- dataset. Irregular selection is when users use API H5Sselect_hyperslab
- more than once for the same dataset.
- Currently, not all MPI-IO packages support the complicated
- MPI derived datatypes used in the implementation of irregular
- selections INSIDE HDF5.
- 1) DEC 5.x wdoes not support complicated derived datatypes.
- 2) For AIX 5.1:
- If your poe version number is 3.2.0.20 or lower,
- please edit powerpc-ibm-aix5.x in the directory hdf5/config/.
- Find the line with
- << hdf5_mpi_complex_derived_datatype_works >>
- and UNCOMMENT this line before the configure.
- check poe version with the following command:
- lpp -l all | grep ppe.poe
- 3) For Linux cluster,:
- If mpich version is 1.2.5 or lower, collective irregular selection
- IO is not supported; internally independent IO is used.
- 4) For IRIX 6.5:
- if C compiler version is 7.3 or lower, collective irregular
- selection IO is not supported; internally independent IO is used.
- 5) For platforms which internally used mpich:
- If the mpich version is 1.2.5 or lower, please find the
- corresponding config (in hdf5/config) file and add
- hdf5_mpi_complex_derived_datatype_works='no'
- at the end of the configuration file. For example, on the
- NCSA SGI Altix, the internal mpich library is 1.2.5. So
- hdf5_mpi_complex_derived_datatype_works='no'
- should be added at the end of the config file ia64-linux-gnu.
- KY - 2005/09/12
+ - Added mpich2 as a testing "platform" informally. AKC - 2005/10/04.
+ - HDF5 supports collective MPI-IO for irregular selection with HDF5
+ dataset. Irregular selection is when users use API H5Sselect_hyperslab
+ more than once for the same dataset.
+ Currently, not all MPI-IO packages support the complicated
+ MPI derived datatypes used in the implementation of irregular
+ selections INSIDE HDF5.
+ 1) DEC 5.x wdoes not support complicated derived datatypes.
+ 2) For AIX 5.1:
+ If your poe version number is 3.2.0.20 or lower,
+ please edit powerpc-ibm-aix5.x in the directory hdf5/config/.
+ Find the line with
+ << hdf5_mpi_complex_derived_datatype_works >>
+ and UNCOMMENT this line before the configure.
+ check poe version with the following command:
+ lpp -l all | grep ppe.poe
+ 3) For Linux cluster,:
+ If mpich version is 1.2.5 or lower, collective irregular selection
+ IO is not supported; internally independent IO is used.
+ 4) For IRIX 6.5:
+ if C compiler version is 7.3 or lower, collective irregular
+ selection IO is not supported; internally independent IO is used.
+ 5) For platforms which internally used mpich:
+ If the mpich version is 1.2.5 or lower, please find the
+ corresponding config (in hdf5/config) file and add
+ hdf5_mpi_complex_derived_datatype_works='no'
+ at the end of the configuration file. For example, on the
+ NCSA SGI Altix, the internal mpich library is 1.2.5. So
+ hdf5_mpi_complex_derived_datatype_works='no'
+ should be added at the end of the config file ia64-linux-gnu.
+ KY - 2005/09/12
Tools:
------
@@ -2689,26 +2690,26 @@ New Features
C++ API:
--------
- Added missing member functions:
- H5::CompType::getMemberArrayType
- H5::CompType::getMemberVarLenType
- H5::AbstractDs::getArrayType
- H5::AbstractDs::getVarLenType
- H5::CommonFG::openArrayType
- H5::CommonFG::openVarLenType
- H5::PropList::copyProp -- this will replace the current
- H5::PropList::copyProp in later releases due
- to incorrect prototype.
- BMR - 2005/07/27
+ H5::CompType::getMemberArrayType
+ H5::CompType::getMemberVarLenType
+ H5::AbstractDs::getArrayType
+ H5::AbstractDs::getVarLenType
+ H5::CommonFG::openArrayType
+ H5::CommonFG::openVarLenType
+ H5::PropList::copyProp -- this will replace the current
+ H5::PropList::copyProp in later releases due
+ to incorrect prototype.
+ BMR - 2005/07/27
Support for New Platforms, Languages and Compilers
==================================================
- - Added support for RedStorm platform (serial only.) AKC 2005/11/10
- - Added support for BG/L platform (serial only.) LA 2005/11/10
- - Added support for HPUX 11.23 (IA64); only C and C++ are supported
- with the +DD64 flag
+ - Added support for RedStorm platform (serial only.) AKC 2005/11/10
+ - Added support for BG/L platform (serial only.) LA 2005/11/10
+ - Added support for HPUX 11.23 (IA64); only C and C++ are supported
+ with the +DD64 flag
EIP 2005/10/05
-
+
Configuration
-------------
@@ -2720,8 +2721,8 @@ Bug Fixes since HDF5-1.6.4 Release
Library
-------
- - Fixed collective IO in chunking-storage. HDF5 may have called the
- wrong routine when the shape of the dataspace in the file and in
+ - Fixed collective IO in chunking-storage. HDF5 may have called the
+ wrong routine when the shape of the dataspace in the file and in
the bufferred chunk were different. This bug was fixed to make sure
the correct routine is called. KY - 2005/10/19
- Fixed core dump when closing root groups opened through two different
@@ -2767,57 +2768,57 @@ Bug Fixes since HDF5-1.6.4 Release
Configuration
-------------
- - Configure can recognize -lmpich as a form of MPI library. -AKC-
- 2005/9/28.
- - Changed default C++ compiler for the IA64 platform from icc to
- icpc which is the preferred compiler for Intel Compiler version
- 8. AKC - 2005/09/02
+ - Configure can recognize -lmpich as a form of MPI library. -AKC-
+ 2005/9/28.
+ - Changed default C++ compiler for the IA64 platform from icc to
+ icpc which is the preferred compiler for Intel Compiler version
+ 8. AKC - 2005/09/02
Performance
-------------
- - Optimized I/O for enumerated datatypes that are a superset of a
+ - Optimized I/O for enumerated datatypes that are a superset of a
source enumerated datatype. QAK - 2005/03/19
-
+
Tools
-----
- Documentation
- -------------
+ Documentation
+ -------------
F90 API
-------
- h5pget_driver_f was returning information that could not be
interpreted by a Fortran application program; fixed. EIP - 2005/04/10
-
+
C++ API
-------
- - Several member functions' prototype changed due to the
- "int -> unsigned" change in the main library. They are:
- H5::CompType::getMemberDataType(unsigned member_num)
- H5::CompType::getMemberCompType(unsigned member_num)
- H5::CompType::getMemberEnumType(unsigned member_num)
- H5::CompType::getMemberIntType(unsigned member_num)
- H5::CompType::getMemberFloatType(unsigned member_num)
- H5::CompType::getMemberStrType(unsigned member_num)
- BMR - 2005/07/27
+ - Several member functions' prototype changed due to the
+ "int -> unsigned" change in the main library. They are:
+ H5::CompType::getMemberDataType(unsigned member_num)
+ H5::CompType::getMemberCompType(unsigned member_num)
+ H5::CompType::getMemberEnumType(unsigned member_num)
+ H5::CompType::getMemberIntType(unsigned member_num)
+ H5::CompType::getMemberFloatType(unsigned member_num)
+ H5::CompType::getMemberStrType(unsigned member_num)
+ BMR - 2005/07/27
+
-
Platforms Tested
================
AIX 5.1 (32 and 64-bit) xlc 6.0.0.6
xlf 8.1.1.3
- xlC 6.0.0.6
- mpcc_r 6.0.0.6
+ xlC 6.0.0.6
+ mpcc_r 6.0.0.6
mpxlf_r 8.1.1.3
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
AIX 5.2 (32/64 bit) xlc 6.0.0.8
xlC 6.0.0.9
xlf 8.1.1.7
@@ -2837,7 +2838,7 @@ Platforms Tested
FreeBSD 4.11 gcc 2.95.4
g++ 2.95.4
gcc 3.2.3, 3.3.6, 3.4.4, 4.0.0
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
HP-UX B.11.23 HP aC++/ANSI C B3910B A.06.00
@@ -2849,30 +2850,30 @@ Platforms Tested
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1.3m
F90 MIPSpro 7.3.1.3m (64 only)
C++ MIPSpro cc 7.3.1.3m
- mpt 1.6
+ mpt 1.6
Linux 2.4.20-28.7 gcc 2.96
(eirene, verbena) gcc 3.3.2
- PGI compilers (pgcc, pgf90, pgCC)
+ PGI compilers (pgcc, pgf90, pgCC)
version 5.2-1
Absoft Fortran compiler v9.0
- Intel(R) C++ 32-bit Version 8.1
- Intel(R) Fortran 32-bit Version 8.1
+ Intel(R) C++ 32-bit Version 8.1
+ Intel(R) Fortran 32-bit Version 8.1
MPIch 1.2.6
Linux 2.4.21-268-smp x86_64 gcc 3.3.1 (SuSE Linux, AMD)
- (mir) PGI 5.2-1 C and F90 (with k3-32)
- Intel(R) C++ 32-bit Version 8.1
- Intel(R) Fortran 32-bit Version 8.1
- Linux 2.4.21-sgi306rp21 Altix
+ (mir) PGI 5.2-1 C and F90 (with k3-32)
+ Intel(R) C++ 32-bit Version 8.1
+ Intel(R) Fortran 32-bit Version 8.1
+ Linux 2.4.21-sgi306rp21 Altix
SMP ia64 Intel(R) C++ Version 8.1
(cobalt) Intel(R) Fortran Itanium(R) Version 8.1
SGI MPI
- OSF1 V5.1 (QSC) Compaq C V6.5-011
+ OSF1 V5.1 (QSC) Compaq C V6.5-011
HP Fortran V5.5A-3548
- Compaq C++ V6.5-036
- MPIX200_64_r13.4
- OSF1 V5.1 (PSC) Compaq C V6.5-303
+ Compaq C++ V6.5-036
+ MPIX200_64_r13.4
+ OSF1 V5.1 (PSC) Compaq C V6.5-303
HP Fortran V5.5A-3548
- Compaq C++ V6.5-040
+ Compaq C++ V6.5-040
SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -2882,21 +2883,21 @@ Platforms Tested
SunOS 5.10 Sun WorkShop 6 update 2 C 5.3
Sun WorkShop 6 update 2 Fortran 95 6.2
Sun WorkShop 6 update 2 C++ 5.3
- Patch 111685-13
+ Patch 111685-13
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
- (tungsten) Intel(R) C++ Version 9.0
+ (tungsten) Intel(R) C++ Version 9.0
Intel(R) Fortran Compiler Version 9.0
IA-64 Linux 2.4.21.SuSE_292.til1 ia64
(NCSA tg-login) Intel(R) C++ Version 8.0
Intel(R) Fortran Compiler Version 8.0
- mpich-gm-1.2.5..10-intel-r2
+ mpich-gm-1.2.5..10-intel-r2
Windows XP MSVC++.NET
MSVC++ 6.0
Intel 8.1 C++
MAC OS X Darwin 7.5
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1175, based on gcc version 3.3.2
- IBM XL Fortran version 8.1
+ IBM XL Fortran version 8.1
Absoft Fortran compiler v8.2
@@ -2910,8 +2911,8 @@ Key: y = tested and supported
( ) = footnote appears below second table
Platform C F90 F90 C++ zlib SZIP
- parallel parallel
-IBM BG/L (16) n n n n y y
+ parallel parallel
+IBM BG/L (16) n n n n y y
Solaris2.8 64-bit y y y(1) y y y
Solaris2.8 32-bit y y y(1) y y y
Solaris2.9 64-bit y(1) y y(1) y y y
@@ -2934,7 +2935,7 @@ FreeBSD 4.11 n n n y y y
RedHat 7.3 W (3) y(1) y(11) n y y y
RedHat 7.3 W Intel (3) n y n y y y
RedHat 7.3 W PGI (3) n y n y y y
-RedStorm (16) n y n y y n
+RedStorm (16) n y n y y n
SuSe x86_64 gcc (3,13) n y(12) n y y y
SuSe x86_64 icc (3,13) n y(14) n y y y
Linux 2.4 Xeon C Lustre Intel (3,6) n y n y y y
@@ -2942,9 +2943,9 @@ Linux 2.4 SuSE ia64 C Intel (3,7) y y y y y y
Linux 2.4 SGI Altix ia64 Intel (3) y y y y y y
-Platform Shared static- Thread- STREAM-
- libraries(4) exec safe VFD
-IBM BG/L n y n n
+Platform Shared static- Thread- STREAM-
+ libraries(4) exec safe VFD
+IBM BG/L n y n n
Solaris2.8 64-bit y x y y
Solaris2.8 32-bit y x y y
Solaris2.9 64-bit y x y y
@@ -2966,7 +2967,7 @@ FreeBSD 4.11 y y y y
RedHat 7.3 W (3) y y y y
RedHat 7.3 W Intel (3) n y n y
RedHat 7.3 W PGI (3) n y n y
-RedStorm n y n y
+RedStorm n y n y
SuSe x86_64 gcc (3,13) n y n y
SuSe x86_64 icc (3,13) y y(15) n y
Linux 2.4 Xeon C Lustre Intel (3,6) y y n y
@@ -2974,28 +2975,28 @@ Linux 2.4 SuSE ia64 C Intel (3,7) y y n n
Linux 2.4 SGI Altix ia64 Intel (3) y y n y
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes: (1) Using mpich 1.2.6
(2) Using mpt and mpich 1.2.6.
- (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
- (4) Shared libraries are provided only for the C library,
+ (4) Shared libraries are provided only for the C library,
except on Windows where they are provided for C and C++.
(5) Using mpt.
- (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp-perfctr-lustre
+ (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp-perfctr-lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_292.til1. Ia64 cluster with Intel compilers
(8) Intel 8.1
(9) One test of this release failed with Compaq Visual Fortran 6.6c.
No binary fortran release will be provided. Users should build
- the library by themselves and use it at their own risk.
- We recommend that users use HDF5 1.7 instead
+ the library by themselves and use it at their own risk.
+ We recommend that users use HDF5 1.7 instead
or use Compaq Visual Fortran 6.0.
(10) IBM XLF and Absoft
- (11) PGI, Absoft. No shared libraries with Absoft;
+ (11) PGI, Absoft. No shared libraries with Absoft;
use '--disable-shared'.
(12) PGI and Intel compilers for both C and Fortran
(13) AMD Opteron x86_64
@@ -3012,43 +3013,43 @@ Known Problems
configure, edit the file config/intel-flags by changing the setting of
PROD_CFLAGS from -O3 to -O0, then run configure. AKC - 2005/11/10.
-* Fortran testing and compiling failures on windows XP
+* Fortran testing and compiling failures on windows XP
1. Compaq visual fortran 6.6c with VS 6.0
The Fortran tests failed for both release, release dll, debug and debug
dll. The failure is a random one. We won't provide fortran libraries. The
- same test passed with the 1.7.51 snapshot. You may find the 1.7.51
+ same test passed with the 1.7.51 snapshot. You may find the 1.7.51
snapshot under ftp://hdf.ncsa.uiuc.edu/pub/outgoing/hdf5/snapshots/.
2. Intel fortran 8.1 under .Net environment
The fortran library cannot even be compiled. Some users have pointed this
to intel forum.
* When testing parallel HDF5 with the C compiler version MIPSpro 7.4.3 at IRIX
- 6.5, set enviroment variable MPI_TYPE_MAX to be a bigger number, for example
- 120000, in order to pass the complicated collective IO tests inside parallel
- HDF5 library. This is not a problem inside parallel HDF5 library. You can
+ 6.5, set enviroment variable MPI_TYPE_MAX to be a bigger number, for example
+ 120000, in order to pass the complicated collective IO tests inside parallel
+ HDF5 library. This is not a problem inside parallel HDF5 library. You can
always set a bigger number in your system.
KY - 2005/10/6
* A contiguous or chunked dataset created by a sequential version may
- not be modified with a parallel version of the library.
- Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
+ not be modified with a parallel version of the library.
+ Use the H5Pset_alloc_time function with H5D_ALLOC_TIME_EARLY to set up the
dataset creation property list to avoid the problem.
EIP - 2005/09/09
-* The dataset created or rewritten with the v1.6.3 library or after can't
- be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
- enabled. There was a bug in the calculating code of the Fletcher32
- checksum in the library before v1.6.3. The checksum value wasn't consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value is no
- longer the same as before on little-endian system. The library release
+* The dataset created or rewritten with the v1.6.3 library or after can't
+ be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is
+ enabled. There was a bug in the calculating code of the Fletcher32
+ checksum in the library before v1.6.3. The checksum value wasn't consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value is no
+ longer the same as before on little-endian system. The library release
after 1.6.4 can still read the dataset created or rewritten with the library
of v1.6.2 or before. SLU - 2005/7/8
* For version 6 (6.02 and 6.04) of the Portland Group compiler on AMD Opteron
processor, there's a bug in the compiler for optimization(-O2). The library
- failed in several tests but all related to multi driver. The problem has
- been reported to the vendor.
+ failed in several tests but all related to multi driver. The problem has
+ been reported to the vendor.
* test/big fails sometimes with the message "Possible overlap with another
region." The test selects regions randomly, and this error occurs when
@@ -3073,9 +3074,9 @@ Known Problems
Ask your system administrator to clean them out. Lastly, request IBM
to provide a means to run poe without the debug socket.
-* Two h5dump xml tests(h5dump --xml thlink.h5 and h5dump --xml tmany.h5)
- failed on windows xp with .NET for debug and debug dll. Release and
- Release dll work fine.
+* Two h5dump xml tests(h5dump --xml thlink.h5 and h5dump --xml tmany.h5)
+ failed on windows xp with .NET for debug and debug dll. Release and
+ Release dll work fine.
* The h5dump tests may fail to match the expected output on some platforms
(e.g. parallel jobs, Windows) where the error messages directed to
@@ -3098,14 +3099,14 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on the HPUX 11.00.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
* The Stream VFD was not tested yet under Windows.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
@@ -3127,10 +3128,10 @@ Known Problems
All other tests have passed.
* Fortran release DLL randomly failed with Compaq Visual Fortran 6.6c on
- Windows.
+ Windows.
* Fortran DLL built with Intel 8.1 in .NET environment crushed the compiler,
- Building Fortran static library with Intel 8.1 in .NET environment
+ Building Fortran static library with Intel 8.1 in .NET environment
requires manually setting the project file.
Please contact to hdfhelp@ncsa.uiuc.edu if you need to build
Fortran static library with Intel 8.1 with .NET environment.
@@ -3211,7 +3212,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -3239,19 +3240,19 @@ New Features
For HL documentation, see
http://hdf.ncsa.uiuc.edu/HDF5/hdf5_hl/doc/RM_hdf5hl.html.
- The HL library, libhdf5_hl.a(so), is built and installed by default.
+ The HL library, libhdf5_hl.a(so), is built and installed by default.
Use --disable-hl configure flag to disable the HL library.
Library:
--------
- - We recommend you to use SZIP v2.0 with this release.
+ - We recommend you to use SZIP v2.0 with this release.
For more information see
- http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/
- - The compound datatype has been enhanced with a new feature of size
+ http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/
+ - The compound datatype has been enhanced with a new feature of size
adjustment. The size can be increased and decreased (without
- cutting the last member). No API change is involved. SLU -
+ cutting the last member). No API change is involved. SLU -
2004/10/1
- - Removed PABLO support. 2005/01/20 EIP
+ - Removed PABLO support. 2005/01/20 EIP
Parallel Library:
-----------------
@@ -3260,7 +3261,7 @@ New Features
Tools:
------
- - New tool, h5jam. See HDF5 Reference Manual. 2004/10/08
+ - New tool, h5jam. See HDF5 Reference Manual. 2004/10/08
F90 API:
--------
@@ -3268,9 +3269,9 @@ New Features
C++ API:
--------
- - Started using C library's reference counting in place of the class
- RefCounter, which existed before the C mechanism was available.
- As a result, RefCounter has been removed. 2005/03/12 BMR
+ - Started using C library's reference counting in place of the class
+ RefCounter, which existed before the C mechanism was available.
+ As a result, RefCounter has been removed. 2005/03/12 BMR
Support for new platforms, languages and compilers.
@@ -3278,7 +3279,7 @@ Support for new platforms, languages and compilers.
Configuration
-------------
- - Upgraded from GNU autoconf 2.53 to autoconf 2.59. JML - 2005/01/31
+ - Upgraded from GNU autoconf 2.53 to autoconf 2.59. JML - 2005/01/31
Bug Fixes since HDF5-1.6.3 release
@@ -3287,57 +3288,57 @@ Bug Fixes since HDF5-1.6.3 release
Library
-------
- Fixed a racing condition in MPIPOSIX virtual file drive close
- function. Now all processes must completed the close before any
- of them is returned. This prevents some "faster" processes start
- accessing the file for another purpose (e.g., open with truncate)
- while other "slower" processes have not closed the same file with
- the previous purpose. AKC - 2005/03/01
- - H5Tget_member_value calls for enum datatype didn't return correct
- value if H5Tenum_valueof was called first. It's fixed. SLU -
- 2005/02/08
+ function. Now all processes must completed the close before any
+ of them is returned. This prevents some "faster" processes start
+ accessing the file for another purpose (e.g., open with truncate)
+ while other "slower" processes have not closed the same file with
+ the previous purpose. AKC - 2005/03/01
+ - H5Tget_member_value calls for enum datatype didn't return correct
+ value if H5Tenum_valueof was called first. It's fixed. SLU -
+ 2005/02/08
- For variable-length string, H5Tget_class returned H5T_STRING as its
- class. But H5Tdetect_class and H5Tget_member_class considered it
- as H5T_VLEN. This is fixed to let all these 3 functions treat it
- as H5T_STRING. SLU - 2005/02/08
+ class. But H5Tdetect_class and H5Tget_member_class considered it
+ as H5T_VLEN. This is fixed to let all these 3 functions treat it
+ as H5T_STRING. SLU - 2005/02/08
- The byte order of all 1-byte integer types was fixed as
- little-endian even on a big-endian machine. It's corrected.
- SLU - 2005/02/07
+ little-endian even on a big-endian machine. It's corrected.
+ SLU - 2005/02/07
- Fixed segmentation fault when calling H5Fflush with an attribute that
- hasn't had a value written to it open. QAK - 2004/10/18
+ hasn't had a value written to it open. QAK - 2004/10/18
- Backed out support for bitfield and time types in H5Tget_native_type.
- Leave it to future support. The function simply returns error
- message of "not support" for bitfield and time types. SLU - 2004/10/5
+ Leave it to future support. The function simply returns error
+ message of "not support" for bitfield and time types. SLU - 2004/10/5
- Fixed address check in Core VFL driver to avoid spurious address/size
- overflows for odd valued addresses and/or sizes. QAK - 2004/09/27
+ overflows for odd valued addresses and/or sizes. QAK - 2004/09/27
- Fixed problem where chunked datasets were not able to be deleted
- from a file under certain circumstances. QAK - 2004/09/27/
+ from a file under certain circumstances. QAK - 2004/09/27/
Configuration
-------------
- - IRIX64 MIPSpro compiler of 7.4.x supports C99 features. Default
- to use the 'c99' compiler if available. AKC - 2004/12/13
- - Intel v8.0 compiler would infinite loop when compiling some test
- code with -O3 option. Changed enable-production default compiler
- option to -O2. AKC - 2004/12/06
- - Long double is assumed to be a supported C data type. It is a
- standard C89 type. AKC - 2004/10/22
+ - IRIX64 MIPSpro compiler of 7.4.x supports C99 features. Default
+ to use the 'c99' compiler if available. AKC - 2004/12/13
+ - Intel v8.0 compiler would infinite loop when compiling some test
+ code with -O3 option. Changed enable-production default compiler
+ option to -O2. AKC - 2004/12/06
+ - Long double is assumed to be a supported C data type. It is a
+ standard C89 type. AKC - 2004/10/22
Performance
-------------
- Many changes were made to the library to improve performance,
- especially for the variable-length datatypes and metadata cache.
-
+ Many changes were made to the library to improve performance,
+ especially for the variable-length datatypes and metadata cache.
+
Tools
-----
- h5fc and h5c++ work correctly when -c compiler flag
- is used. EIP - 2005/03/14
- - Fixed h5dump to print attributes data in ASCII if -r option is used.
- AKC - 2004/11/18
- - Fixed space utilization reported in h5ls to correct error
- in formula used. QAK - 2004/10/22
+ is used. EIP - 2005/03/14
+ - Fixed h5dump to print attributes data in ASCII if -r option is used.
+ AKC - 2004/11/18
+ - Fixed space utilization reported in h5ls to correct error
+ in formula used. QAK - 2004/10/22
- Documentation
- -------------
+ Documentation
+ -------------
F90 API
-------
@@ -3354,7 +3355,7 @@ Documentation
HDF5 Library documentation
--------------------------
- No substantive changes to the structure or types of content in the
+ No substantive changes to the structure or types of content in the
HDF5 Library documentation.
Windows installation documentation
@@ -3363,24 +3364,24 @@ Documentation
either http://www.zlib.net/zlib122-dll.zip or
ftp://hdf.ncsa.uiuc.edu/lib-external/zlib/bin/windows
- 2. Only DLLs of external libraries (zlib and szip) are linked with the
- HDF5 Library. We will no longer provide binary to link static library
+ 2. Only DLLs of external libraries (zlib and szip) are linked with the
+ HDF5 Library. We will no longer provide binary to link static library
with HDF5. For details, please check INSTALL_Windows in this directory.
-
+
Platforms Tested
================
AIX 5.1 (32 and 64-bit) xlc 6.0.0.6
xlf 8.1.1.3
- xlC 6.0.0.6
- mpcc_r 6.0.0.6
+ xlC 6.0.0.6
+ mpcc_r 6.0.0.6
mpxlf_r 8.1.1.3
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
AIX 5.2 (32/64 bit) xlc 6.0.0.8
xlC 6.0.0.9
xlf 8.1.1.7
@@ -3398,7 +3399,7 @@ Platforms Tested
FreeBSD 4.9 gcc 2.95.4
g++ 2.95.4
gcc 3.2.3, 3.3.6, 3.4.4, 4.0.0
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
MPIch 1.2.4
@@ -3408,32 +3409,32 @@ Platforms Tested
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1.3m
F90 MIPSpro 7.3.1.3m (64 only)
C++ MIPSpro cc 7.3.1.3m
- mpt 1.6
+ mpt 1.6
Linux 2.4.20-28.7 gcc 2.96
(eirene, verbena) gcc 3.3.2
- PGI compilers (pgcc, pgf90, pgCC)
+ PGI compilers (pgcc, pgf90, pgCC)
version 5.2-1
Absoft Fortran compiler v9.0
- Intel(R) C++ 32-bit Version 8.1
- Intel(R) Fortran 32-bit Version 8.1
+ Intel(R) C++ 32-bit Version 8.1
+ Intel(R) Fortran 32-bit Version 8.1
MPIch 1.2.6
Linux 2.4.21-268-smp x86_64 gcc 3.3.1 (SuSE Linux, AMD)
- (mir) PGI 5.2-1 C and F90 (with k3-32)
- Intel(R) C++ 32-bit Version 8.1
- Intel(R) Fortran 32-bit Version 8.1
- Linux 2.4.21-sgi303r2 Altix
+ (mir) PGI 5.2-1 C and F90 (with k3-32)
+ Intel(R) C++ 32-bit Version 8.1
+ Intel(R) Fortran 32-bit Version 8.1
+ Linux 2.4.21-sgi303r2 Altix
SMP ia64 Intel(R) C++ Version 8.1
(cobalt) Intel(R) Fortran Itanium(R) Version 8.1
SGI MPI
- OSF1 V5.1 (QSC) Compaq C V6.5-011
+ OSF1 V5.1 (QSC) Compaq C V6.5-011
HP Fortran V5.5A-3548
- Compaq C++ V6.5-036
- MPIX200_64_r13.4
- OSF1 V5.1 (PSC) Compaq C V6.5-303
+ Compaq C++ V6.5-036
+ MPIX200_64_r13.4
+ OSF1 V5.1 (PSC) Compaq C V6.5-303
HP Fortran V5.5A-3548
- Compaq C++ V6.5-040
- MPIX200_64_r13.4
- FORTRAN 90 2.0 Patch 107356-04
+ Compaq C++ V6.5-040
+ MPIX200_64_r13.4
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -3443,20 +3444,20 @@ Platforms Tested
TFLOPS r1.0.4 v4.5.2 i386 pgcc Rel 3.1-4i with mpich-1.2.4 with
local modifications
Xeon Linux 2.4.20-31.9smp_perfctr_lustre
- (tungsten) Intel(R) C++ Version 8.0
+ (tungsten) Intel(R) C++ Version 8.0
Intel(R) Fortran Compiler Version 8.0
IA-64 Linux 2.4.21.SuSE_128.bef1 ia64
(NCSA tg-login) Intel(R) C++ Version 8.0
Intel(R) Fortran Compiler Version 8.0
- mpich-gm-1.2.5..intel
+ mpich-gm-1.2.5..intel
Windows XP MSVC++.NET
MSVC++ 6.0
Compaq Visual Fortran 6.6C
Intel 8.1 C++
MAC OS X Darwin 7.5
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1175, based on gcc version 3.3.2
- IBM XL Fortran version 8.1
+ IBM XL Fortran version 8.1
Absoft Fortran compiler v8.2
@@ -3470,7 +3471,7 @@ Key: y = tested and supported
( ) = footnote appears below second table
Platform C F90 F90 C++ zlib SZIP
- parallel parallel
+ parallel parallel
Solaris2.8 64-bit y y y(1) y y y
Solaris2.8 32-bit y y y(1) y y y
Solaris2.9 64-bit y(1) y y(1) y y y
@@ -3498,8 +3499,8 @@ Linux 2.4 SuSE ia64 C Intel (3,7) y y y y y y
Linux 2.4 SGI Altix ia64 Intel (3) y y y y y y
-Platform Shared static- Thread- STREAM-
- libraries(4) exec safe VFD
+Platform Shared static- Thread- STREAM-
+ libraries(4) exec safe VFD
Solaris2.8 64-bit y x y y
Solaris2.8 32-bit y x y y
Solaris2.9 64-bit y x y y
@@ -3527,24 +3528,24 @@ Linux 2.4 SuSE ia64 C Intel (3,7) y y n n
Linux 2.4 SGI Altix ia64 Intel (3) y y n y
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes: (1) Using mpich 1.2.6
(2) Using mpt and mpich 1.2.6.
- (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
- (4) Shared libraries are provided only for the C library,
+ (4) Shared libraries are provided only for the C library,
except on Windows where they are provided for C and C++.
(5) Using mpt.
- (6) Linux 2.4.20-31.9. Xeon cluster with smp_perfctr_lustre
+ (6) Linux 2.4.20-31.9. Xeon cluster with smp_perfctr_lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_128.befl. Ia64 cluster with Intel compilers
(8) Intel 8.1
(9) Compaq Visual Fortran 6.6C
(10) IBM XLF and Absoft
- (11) PGI, Absoft. No shared libraries with Absoft;
+ (11) PGI, Absoft. No shared libraries with Absoft;
use '--disable-shared'.
(12) PGI and Intel compilers for both C and Fortran
(13) AMD Opteron x86_64
@@ -3581,12 +3582,12 @@ Known Problems
Ask your system administrator to clean them out. Lastly, request IBM
to provide a mean to run poe without the debug socket.
-* Fortran subroutine h5pget_driver_f doesn't return a correct driver
+* Fortran subroutine h5pget_driver_f doesn't return a correct driver
information.
-* There are two h5dump xml tests(h5dump --xml thlink.h5 and
- h5dump --xml tmany.h5) failed on windows xp with .NET for debug and
- debug dll. Release and Release dll work fine.
+* There are two h5dump xml tests(h5dump --xml thlink.h5 and
+ h5dump --xml tmany.h5) failed on windows xp with .NET for debug and
+ debug dll. Release and Release dll work fine.
* The h5dump tests may fail to match the expected output on some platforms
(e.g. parallel jobs, Windows) where the error messages directed to
@@ -3606,7 +3607,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -3625,15 +3626,15 @@ Known Problems
the different precision in the values displayed.
h5ls appears to be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/patches/
-* On some platforms that use Intel and Absoft compilers to build HDF5 fortran
- library, compilation may fail for fortranlib_test.f90, fflush1.f90 and
- fflush2.f90 complaining about exit subroutine. Comment out the line
+* On some platforms that use Intel and Absoft compilers to build HDF5 fortran
+ library, compilation may fail for fortranlib_test.f90, fflush1.f90 and
+ fflush2.f90 complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
* Use --disable-shared configure flag if building with Absoft Fortran
@@ -3658,10 +3659,10 @@ Known Problems
setenv CXX "pgCC -tlocal" for others
* Fortran release DLL randomly failed with compaq visual fortran 6.6c on
- windows.
+ windows.
* Fortran DLL built with Intel 8.1 in .NET environment crushed the compiler,
- To build Fortran Static library with Intel 8.1 in .NET environment
+ To build Fortran Static library with Intel 8.1 in .NET environment
needs manually setting the project file,
please contact to hdfhelp@ncsa.uiuc.edu if you need to build
fortran static library with Intel 8.1 with .NET environment.
@@ -3743,7 +3744,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -3774,74 +3775,74 @@ New Features
- WINDOWS building,testing and installing improvements
- - On Windows, FORTRAN,C++ and C projects are merged into one zip file,
- users can choose an option to build either FORTRAN or C++ or both
+ - On Windows, FORTRAN,C++ and C projects are merged into one zip file,
+ users can choose an option to build either FORTRAN or C++ or both
with basic C library.For detailed information,
please read INSTALL_Windows.txt.
- On Windows, szip compression library with or without encoder can be easily
turned off or on when building HDF5. For detailed information,
- please read INSTALL_Windows.txt, especially section V.
-
+ please read INSTALL_Windows.txt, especially section V.
+
- On Windows, an optional procedure for building,testing and installing
HDF5 from command line is provided. This procedure is supposed to be
- convenient for experienced users, please read
+ convenient for experienced users, please read
INSTALL_windows_From_Command_Line.txt for details.
- On Windows, an alternative short instruction document for building,
testing and installing HDF5 is provided. This instruction is supposed to
- be convenient for general users, please read
+ be convenient for general users, please read
INSTALL_Windows_Short.txt for details.
- On Windows, h5repack,h5diff,h5ls and h5import tool tests have been added.
- KY - 2004/9/16
-
+ KY - 2004/9/16
+
Library:
--------
- Modified the way how HDF5 calculates 'pixels_per_scanline' parameter for
- SZIP compression. Now there is no restriction on the size and shape of the
- chunk except that the total number of elements in the chunk cannot be
- bigger than 'pixels_per_block' parameter provided by the user.
- EIP - 2004/07/21
+ SZIP compression. Now there is no restriction on the size and shape of the
+ chunk except that the total number of elements in the chunk cannot be
+ bigger than 'pixels_per_block' parameter provided by the user.
+ EIP - 2004/07/21
- HDF5 can now link to SZIP with or without szip's encoder.
- The new API function H5Zget_filter_info can be used to check
- szip's status. Attempting to assign szip to a dataset property
- list or attempting to write with szip will generate an error if
- szip's encoder is disabled. JL/NF - 2004/6/30
+ The new API function H5Zget_filter_info can be used to check
+ szip's status. Attempting to assign szip to a dataset property
+ list or attempting to write with szip will generate an error if
+ szip's encoder is disabled. JL/NF - 2004/6/30
- SZIP always uses K13 compression. This flag no longer needs to
- be set when calling H5Pset_szip. If the flag for CHIP
- compression is set, it will be ignored (since the two are mutually
- exclusive). JL/NF - 2004/6/30
+ be set when calling H5Pset_szip. If the flag for CHIP
+ compression is set, it will be ignored (since the two are mutually
+ exclusive). JL/NF - 2004/6/30
- A new API function H5Fget_name was added. It returns the name
- of the file by object(file, group, data set, named data type,
- attribute) ID. SLU - 2004/06/29
+ of the file by object(file, group, data set, named data type,
+ attribute) ID. SLU - 2004/06/29
- A new API function H5Fget_filesize was added. It returns the
- actual file size of the opened file. SLU - 2004/06/24
- - Added option that if $HDF5_DISABLE_VERSION_CHECK is set to 2,
- will suppress all library version mismatch warning messages.
- AKC - 2004/4/14
+ actual file size of the opened file. SLU - 2004/06/24
+ - Added option that if $HDF5_DISABLE_VERSION_CHECK is set to 2,
+ will suppress all library version mismatch warning messages.
+ AKC - 2004/4/14
Parallel Library:
-----------------
Tools:
------
- - h5repack was added to the tools suite. h5repack regenerates an HDF5 file
- from another HDF5 file, optionally applying HDF5 filters (compression)
- and/or chunking to the copied file. The filters options are read from
- the command line. See /doc/html/Tools.html for more details.
- PVN - 2004/9/13
+ - h5repack was added to the tools suite. h5repack regenerates an HDF5 file
+ from another HDF5 file, optionally applying HDF5 filters (compression)
+ and/or chunking to the copied file. The filters options are read from
+ the command line. See /doc/html/Tools.html for more details.
+ PVN - 2004/9/13
- h5dump includes new features:
- 1) Printing of dataset filters, storage layout and fill value information.
- 2) Print a list of the file contents.
- 3) Escape non printing characters.
- 4) Print the content of the boot block.
- 5) Print array indices with the data (the default).
- These options are all switch controlled. See /doc/html/Tools.html for more details.
- PVN - 2004/9/13
-
+ 1) Printing of dataset filters, storage layout and fill value information.
+ 2) Print a list of the file contents.
+ 3) Escape non printing characters.
+ 4) Print the content of the boot block.
+ 5) Print array indices with the data (the default).
+ These options are all switch controlled. See /doc/html/Tools.html for more details.
+ PVN - 2004/9/13
+
F90 API:
--------
@@ -3851,18 +3852,18 @@ New Features
h5premove_filter_f
h5zget_filter_info_f
EIP 2004/9/21
-
+
- added new h5fget_name_f and h5fget_filesize_f subroutines
EIP 2004/07/08
C++ API:
--------
- - Added wrappers for array and variable length datatypes APIs
- - Added wrappers for newly added APIs from H5T, H5F, and H5I
- - Added many wrappers that were missing from the H5P API
- - Added the ability to reference HDF5 objects to these classes:
- DataSet, DataType, Group, and H5File (wrappers for H5R APIs)
- BMR 2004/08/04
+ - Added wrappers for array and variable length datatypes APIs
+ - Added wrappers for newly added APIs from H5T, H5F, and H5I
+ - Added many wrappers that were missing from the H5P API
+ - Added the ability to reference HDF5 objects to these classes:
+ DataSet, DataType, Group, and H5File (wrappers for H5R APIs)
+ BMR 2004/08/04
Support for new platforms, languages and compilers.
@@ -3870,14 +3871,14 @@ Support for new platforms, languages and compilers.
- Added PGI Fortran support for Linux64 (x86_64) systems
EIP - 2004/08/19
- Absoft compiler f95 v9.0 is supported on Linux 2.4 32bit
- EIP - 2004/07/29
+ EIP - 2004/07/29
- HDF5 Fortran APIs are supported on Mac OSX with IBM XL Fortran
- compiler version 8.1. This is a default compiler.
+ compiler version 8.1. This is a default compiler.
- HDF5 Fortran APIs are supported on MAC OSX with Absoft F95 compiler
- version 8.2; set F9X environment variable to f95, for example
- setenv F9X f95
- Use --disable-shared --enable-static configure flags when Absoft
- compiler is used.
+ version 8.2; set F9X environment variable to f95, for example
+ setenv F9X f95
+ Use --disable-shared --enable-static configure flags when Absoft
+ compiler is used.
EIP - 2004/07/27
Bug Fixes since HDF5-1.6.2 release
@@ -3885,72 +3886,72 @@ Bug Fixes since HDF5-1.6.2 release
Library
-------
- - Fixed parallel bug in which some processes attempted collective
- I/O while others did independent I/O. Bug appeared when some
- processes used point selections, and others didn't. JRM - 2004/9/15
+ - Fixed parallel bug in which some processes attempted collective
+ I/O while others did independent I/O. Bug appeared when some
+ processes used point selections, and others didn't. JRM - 2004/9/15
- Corrected error where dataset region references were written in an
- incorrect way on Cray machines. PVN & QAK - 2004/09/13
+ incorrect way on Cray machines. PVN & QAK - 2004/09/13
- The H5Tget_native_type now determines the native type for integers
- based on the precision. This is to avoid cases of wrongly converting
- an int to a short in machines that have a short of 8 bytes but with
- 32bit precision (e.g Cray SV1). PVN - 2004/09/07
+ based on the precision. This is to avoid cases of wrongly converting
+ an int to a short in machines that have a short of 8 bytes but with
+ 32bit precision (e.g Cray SV1). PVN - 2004/09/07
- Changed H5Dread() to not overwrite data in an application's buffer
- with garbage when accessing a chunked dataset with an undefined fill
- value and an unwritten chunk is uncountered. QAK - 2004/08/25
+ with garbage when accessing a chunked dataset with an undefined fill
+ value and an unwritten chunk is uncountered. QAK - 2004/08/25
- Fixed error which could cause a core dump when a type conversion
- routine was registered after a compound datatype had been
- converted and then an equivalent compound datatype was converted
- again. QAK - 2004/08/07
+ routine was registered after a compound datatype had been
+ converted and then an equivalent compound datatype was converted
+ again. QAK - 2004/08/07
- Fixed memory overwrite when encoding "multi" file driver information
- for file's superblock. QAK - 2004/08/05
+ for file's superblock. QAK - 2004/08/05
- Fixed obscure bug where a filter which failed during chunk allocation
- could allow library to write uncompressed data to disk but think
- the data was compressed. QAK - 2004/07/29
+ could allow library to write uncompressed data to disk but think
+ the data was compressed. QAK - 2004/07/29
- Fixed bug where I/O to an extendible chunked dataset with zero-sized
- dimensions would cause library to fail an assertion.
- QAK - 2004/07/27
+ dimensions would cause library to fail an assertion.
+ QAK - 2004/07/27
- Fixed bug where chunked datasets which have filters defined,
- allocation time set to "late" and whose chunks don't align with
- the dataspace bounds could have incorrect data stored when
- overwriting the entire dataset on the first write. QAK - 2004/07/27
+ allocation time set to "late" and whose chunks don't align with
+ the dataspace bounds could have incorrect data stored when
+ overwriting the entire dataset on the first write. QAK - 2004/07/27
- Added check to ensure that dataspaces have extents set. JML-2004/07/26
- Fixed bug on some Solaris systems where HDF5 would try to use
- gettimeofday() when that function didn't work properly.
- JML - 2004/07/23
+ gettimeofday() when that function didn't work properly.
+ JML - 2004/07/23
- Fixed bug in H5Sset_extent_simple where setting maximum size to
- non-zero, then to zero would cause an error. JML - 2004/07/20
+ non-zero, then to zero would cause an error. JML - 2004/07/20
- Allow NULL pointer for buffer parameter to H5Dread & H5Dwrite
- when not writing data ("none" selection or hyperslab or point
- selection with no elements defined). QAK - 2004/07/20
+ when not writing data ("none" selection or hyperslab or point
+ selection with no elements defined). QAK - 2004/07/20
- Calling H5Gcreate() on "/" or "." throws an error instead of
- failing quietly. JML - 2004/07/19
+ failing quietly. JML - 2004/07/19
- Fixed bug where setting file address size to be very small could
- trigger an assert if the file grew to more than 64 KB. Now throws
- an error and data can be recovered. JL/NF - 2004/07/14
+ trigger an assert if the file grew to more than 64 KB. Now throws
+ an error and data can be recovered. JL/NF - 2004/07/14
- Fixed bug where "resurrecting" a dataset was failing.
- QAK - 2004/07/14
+ QAK - 2004/07/14
- Fixed bug where incorrect data could be read from a chunked dataset
- after it was extended. QAK - 2004/07/12
+ after it was extended. QAK - 2004/07/12
- After compound datatype with variable-length string in the fields
- is committed to file, the size is messed up when it's read back.
- Fixed. SLU - 2004/06/11
+ is committed to file, the size is messed up when it's read back.
+ Fixed. SLU - 2004/06/11
- Fixed potential file corruption bug when a block of metadata could
- overlap the end of the internal metadata accumulator buffer and
- the buffer would be extended correctly, but would incorrectly
- change it's starting address. QAK - 2004/06/09
+ overlap the end of the internal metadata accumulator buffer and
+ the buffer would be extended correctly, but would incorrectly
+ change it's starting address. QAK - 2004/06/09
- Opaque datatype with no tag failed for some operations. Fixed.
- SLU - 2004/6/3
+ SLU - 2004/6/3
- Fixed potential file corruption bug where dimensions that were
- too large (a value greater than could be represented in 32-bits)
- could cause the incorrect amount of space to be allocated in a
- file for the raw data for the dataset. QAK - 2004/06/01
- - Fixed dtypes "sw long double -> double" failure in QSC class
- machines. AKC - 2004/4/16
+ too large (a value greater than could be represented in 32-bits)
+ could cause the incorrect amount of space to be allocated in a
+ file for the raw data for the dataset. QAK - 2004/06/01
+ - Fixed dtypes "sw long double -> double" failure in QSC class
+ machines. AKC - 2004/4/16
Configuration
-------------
- Fixed the long compile time of H5detect.c when v7.x Intel Compiler
- is used with optimization NOT off. AKC - 2004/05/20
+ is used with optimization NOT off. AKC - 2004/05/20
Performance
-------------
@@ -3958,83 +3959,82 @@ Bug Fixes since HDF5-1.6.2 release
Tools
-----
- On SGI h5dump displayed only part of the data due to the bug
- in the system printf; fixed.
- EIP - 2004/09/21
- Documentation
- -------------
- - Several descriptive errors have been fixed throughout the
- documentation, particularly in the reference manual (RM).
- A selection particularly worthy of note would be these:
+ in the system printf; fixed.
+ EIP - 2004/09/21
+ Documentation
+ -------------
+ - Several descriptive errors have been fixed throughout the
+ documentation, particularly in the reference manual (RM).
+ A selection particularly worthy of note would be these:
- The H5Pset_szip description in the RM has been expanded and
- corrected to facilitate use of SZIP compression.
+ corrected to facilitate use of SZIP compression.
- A note has been added to the H5Dcreate description that an
- unexplained failure is likely to be due to a property list error
- that is detected only at the time of dataset creation.
- -
- FMB - 2004/09/21
+ unexplained failure is likely to be due to a property list error
+ that is detected only at the time of dataset creation.
+ FMB - 2004/09/21
F90 API
-------
-
- Fortran functions h5dwrite/read_f and h5awrite/read_f do not
- accept dims parameter of INTEGER type anymore. Code was removed.
+ - Fortran functions h5dwrite/read_f and h5awrite/read_f do not
+ accept dims parameter of INTEGER type anymore. Code was removed.
2004/04/15
+
C++ API
-------
- - H5::Exception's and its subclasses' constructors that were
- overloaded to take char pointers are removed and constructors
- that passed in reference of 'string' are changed to pass
- by value. In addition, the default value of the data member
- H5::Exception::detailMessage is changed from 0/NULL to
- DEFAULT_MSG ("No detailed information provided".)
- - Prototype for DSetCreatPropList::setLayout is changed: 1st parameter
- is removed because it was there only by mistake.
- BMR 2004/08/04
+ - H5::Exception's and its subclasses' constructors that were
+ overloaded to take char pointers are removed and constructors
+ that passed in reference of 'string' are changed to pass
+ by value. In addition, the default value of the data member
+ H5::Exception::detailMessage is changed from 0/NULL to
+ DEFAULT_MSG ("No detailed information provided".)
+ - Prototype for DSetCreatPropList::setLayout is changed: 1st parameter
+ is removed because it was there only by mistake.
+ BMR 2004/08/04
Documentation
=============
HDF5 Library documentation
--------------------------
- HDF5 C++ API Reference Manual
- This document has been added to the HDF5 document set.
- The predecessor document, "HDF5 C++ Interfaces," has been removed.
+ This document has been added to the HDF5 document set.
+ The predecessor document, "HDF5 C++ Interfaces," has been removed.
- HDF5 C++ API Design Specification
- A first draft of this document has been added to the HDF5 document
- set. The draft has been posted on the HDF5 website and a link
- has been added to the HDF5 documents index (index.html at the top
- level of the document set).
+ A first draft of this document has been added to the HDF5 document
+ set. The draft has been posted on the HDF5 website and a link
+ has been added to the HDF5 documents index (index.html at the top
+ level of the document set).
- Parallel HDF5
- In prior releases, the HDF5 document set included two parallel
- HDF5 documents. Those documents have been deleted and the
- HDF5 documents index (index.html) now links to a "Parallel HDF5"
- page on the HDF5 website (http://hdf.ncsa.uiuc.edu/HDF5/PHDF5/).
+ In prior releases, the HDF5 document set included two parallel
+ HDF5 documents. Those documents have been deleted and the
+ HDF5 documents index (index.html) now links to a "Parallel HDF5"
+ page on the HDF5 website (http://hdf.ncsa.uiuc.edu/HDF5/PHDF5/).
- HDF5 High Level APIs
- Links to the HDF5 High Level APIs and to the HDF5 High Level
- Reference Manual have been added to the HDF5 documents index
- (index.html).
+ Links to the HDF5 High Level APIs and to the HDF5 High Level
+ Reference Manual have been added to the HDF5 documents index
+ (index.html).
- HDF5 Reference Manual
- Tools: h5repack -- A description of the new h5repack tool has been
+ Tools: h5repack -- A description of the new h5repack tool has been
added to the Tools page.
- Tools: h5dump -- Several new options have been added to h5dump.
- New functions -- All new functions have been added to the RM.
- API changes -- Relevant function descriptions have been updated in
- instances where programming interfaces have changed.
- FMB - 2004/09/21
+ Tools: h5dump -- Several new options have been added to h5dump.
+ New functions -- All new functions have been added to the RM.
+ API changes -- Relevant function descriptions have been updated in
+ instances where programming interfaces have changed.
+ FMB - 2004/09/21
Windows installation documentation
----------------------------------
- - INSTALL_Windows.txt has been enhanced to include instructions building
- HDF5 with FORTRAN and C++.
+ - INSTALL_Windows.txt has been enhanced to include instructions building
+ HDF5 with FORTRAN and C++.
- Two optional installation documents have been added. They are
- INSTALL_Windows_Short.txt and INSTALL_Windows_From_Command_Line.txt.
- INSTALL_Windows_Short.txt is supposed to help general users who
- only want to build,test and install HDF5 in a quick way.
- INSTALL_Windows_From_Command_Line.txt is supposed to help users who
- would like to compile,test and install HDF5 in command line environment.
+ INSTALL_Windows_Short.txt and INSTALL_Windows_From_Command_Line.txt.
+ INSTALL_Windows_Short.txt is supposed to help general users who
+ only want to build,test and install HDF5 in a quick way.
+ INSTALL_Windows_From_Command_Line.txt is supposed to help users who
+ would like to compile,test and install HDF5 in command line environment.
- INSTALL_Windows_withcpp.txt and INSTALL_Windows_withF90.txt became
- obsolete. Files are deleted from the release_docs directory.
- KY 2004/09/16, EIP 2004/9/21
-
+ obsolete. Files are deleted from the release_docs directory.
+ KY 2004/09/16, EIP 2004/9/21
+
Platforms Tested
@@ -4042,14 +4042,14 @@ Platforms Tested
AIX 5.1 (32 and 64-bit) xlc 6.0.0.6
xlf 8.1.1.3
- xlC 6.0.0.6
- mpcc_r 6.0.0.6
+ xlC 6.0.0.6
+ mpcc_r 6.0.0.6
mpxlf_r 8.1.1.3
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
AIX 5.2 xlc 6.0.0.8
xlC 6.0.0.8
xlf 8.1.1.6
@@ -4063,14 +4063,14 @@ Platforms Tested
Cray Fortran Version 3.6.0.3.1
FreeBSD 4.9 gcc 2.95.4
g++ 2.95.4
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
MPIch 1.2.4
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1.3m
F90 MIPSpro 7.3.1.3m (64 only)
C++ MIPSpro cc 7.3.1.3m
- mpt 1.6
+ mpt 1.6
Linux 2.4.18 gcc 2.96, 3.3.2
g++ 3.3.2
Intel(R) C++ Version 7.1
@@ -4083,27 +4083,27 @@ Platforms Tested
MPIch 1.2.4
Linux 2.4.21-2.9.5ws #3 gcc 3.2.3 (Red Hat Linux 3.2.3-16)
SMP x86_64 g++ 3.2.3
- Linux 2.4.21-4.ELsmp Intel(R) C++ 32-bit Version 8.0
- Intel(R) Fortran 32-bit Version 8.0
- gcc 3.4.0
- MPICH 1..5.2 Inmel 8.0
+ Linux 2.4.21-4.ELsmp Intel(R) C++ 32-bit Version 8.0
+ Intel(R) Fortran 32-bit Version 8.0
+ gcc 3.4.0
+ MPICH 1..5.2 Inmel 8.0
Linux 2.4.19-SMP x86_64 gcc (GCC) 3.2.2 (SuSE Linux)
g++ 3.2.2
Linux 2.6.4-52smp x86_64 gcc 3.3.3 (SuSE Linux 9.1 AMD64))
- PGI 5.2-1 C and F90
+ PGI 5.2-1 C and F90
- Linux 2.4.21-sgi Altix
+ Linux 2.4.21-sgi Altix
SMP ia64 Intel(R) C++ Version 8.0
Intel(R) Fortran Itanium(R) Version 8.0
SGI MPI
- OSF1 V5.1 Compaq C V6.5-303
+ OSF1 V5.1 Compaq C V6.5-303
HP Fortran V5.5A-3548
- Compaq C++ V6.5-040
- MPI_64bit_R13
+ Compaq C++ V6.5-040
+ MPI_64bit_R13
SunOS 5.7(32 and 64 bit) WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8(32 and 64 bit) Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -4114,9 +4114,9 @@ Platforms Tested
Intel(R) Fortran Compiler Version 7.0
Xeon Linux 2.4.20-31.9smp_perfctr_lustre
- Intel(R) C++ Version 8.0
+ Intel(R) C++ Version 8.0
Intel(R) Fortran Compiler Version 8.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 3.0.4
Intel(R) C++ Version 7.1
Intel(R) Fortran Compiler Version 7.1
@@ -4124,23 +4124,23 @@ Platforms Tested
IA-64 Linux 2.4.21.SuSE_128.bef1 ia64
Intel(R) C++ Version 8.0
Intel(R) Fortran Compiler Version 8.0
- mpich-gm-1.2.5..intel
+ mpich-gm-1.2.5..intel
Windows 2000 (NT5.0) MSVC++ 6.0
MSVC++ .NET
DEC Visual Fortran 6.0
Intel C and F90 compilers version 7.1
- Code Warrior 8.0
+ Code Warrior 8.0
Windows XP MSVC++.NET
MSVC++ 6.0
DEC Visual Fortran 6.0
MAC OS X Darwin 7.5
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1175, based on gcc version 3.3.2
- IBM XL Fortran version 8.1
+ IBM XL Fortran version 8.1
Absoft Fortran compiler v8.2
-
+
Supported Configuration Features Summary
@@ -4153,7 +4153,7 @@ Key: y = tested and supported
( ) = footnote appears below second table
Platform C F90 F90 C++ zlib SZIP
- parallel parallel
+ parallel parallel
Solaris2.7 64-bit y (1) y y (1) y y y
Solaris2.7 32-bit y (1) y y (1) y y y
Solaris2.8 64-bit y (1) y y (1) y y y
@@ -4185,8 +4185,8 @@ Linux 2.4 SuSE ia64 C Intel (3,8) y y y y y y
Linux 2.4 SGI Altix ia64 Intel (3) y y y y y y
-Platform Shared static- Thread- STREAM-
- libraries (4) exec safe VFD
+Platform Shared static- Thread- STREAM-
+ libraries (4) exec safe VFD
Solaris2.7 64-bit y x y y
Solaris2.7 32-bit y x y y
Solaris2.8 64-bit y x y y
@@ -4219,19 +4219,19 @@ Linux 2.4 SGI Altix ia64 Intel (3) y y n y
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes: (1) Using mpich 1.2.4
(2) Using mpt and mpich 1.2.4
- (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated
+ (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated
W or C indicates workstation or cluster, respectively
- (4) Shared libraries are provided only for the C library,
+ (4) Shared libraries are provided only for the C library,
except on Windows where they are provided for C and C++
(5) Using mpt
(6) Intel 7.1 compilers in Visual Studio 6.0 environment
- (7) Linux 2.4.20-31.9. Xeon cluster with smp_perfctr_lustre
+ (7) Linux 2.4.20-31.9. Xeon cluster with smp_perfctr_lustre
and Intel compilers
(8) Linux 2.4.21, SuSE_128.befl. Ia64 cluster with Intel compilers
(9) DEC Visual Fortran 6.0 and Intel 7.1
@@ -4247,14 +4247,14 @@ Known Problems
==============
* h5fc and h5c++ compilation scripts have a bug: object files (*.o) cannot be
created when source code is compiled using h5fc or h5c++. We will provide
- a fix. Please check ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/patches/
+ a fix. Please check ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/patches/
for the patches.
* Fortran subroutine h5pget_driver_f doesn't return a correct driver information.
* There are two h5dump xml tests(h5dump --xml thlink.h5 and h5dump --xml tmany.h5)
failed on windows xp with .NET for debug and debug dll. Release and Release
- dll work fine.
+ dll work fine.
* The h5dump tests may fail to match the expected output on some platforms
(e.g. parallel jobs, Windows) where the error messages directed to
@@ -4274,7 +4274,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -4293,7 +4293,7 @@ Known Problems
the different precision in the values displayed and h5ls appears to
be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
@@ -4301,7 +4301,7 @@ Known Problems
* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
* On IA32 and IA64 systems, if you use a compiler other than GCC (such as
@@ -4409,7 +4409,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -4433,31 +4433,31 @@ New Features
Configuration:
--------------
- Default of $prefix is changed to $PWD/hdf5 so that multiple
- builds using --srcdir is possible in the same machine.
- AKC - 2003/12/1
+ builds using --srcdir is possible in the same machine.
+ AKC - 2003/12/1
Library:
--------
- Added H5Iget_ref, H5Iinc_ref and H5Idec_ref routines to the C
- library and the FORTRAN wrapper. See the reference manual for a
- full description of these new routines. QAK - 2003/12/11
+ library and the FORTRAN wrapper. See the reference manual for a
+ full description of these new routines. QAK - 2003/12/11
Parallel Library:
-----------------
- - The parallel tests in testpar/ now provides different levels of
- verbosity via the '-v' option. The default is less verbose
- than before. AKC - 2004/01/23
+ - The parallel tests in testpar/ now provides different levels of
+ verbosity via the '-v' option. The default is less verbose
+ than before. AKC - 2004/01/23
- Added parallel test, test_mpio_1wMr, which tests if the
- underlaying parallel I/O system is conforming to the POSIX
- write/read requirement. This version includes options of using
- atomicity and file-sync. AKC - 2003/11/27
+ underlaying parallel I/O system is conforming to the POSIX
+ write/read requirement. This version includes options of using
+ atomicity and file-sync. AKC - 2003/11/27
Tools:
------
- Added option -showconfig to compiler tools (h5cc,h5fc,h5c++).
- AKC - 2004/01/08
- - Install the "h5cc" and "h5fc" tools as "h5pcc" and "h5pfc"
- respectively if library is built in parallel mode. AKC - 2004/01/07
+ AKC - 2004/01/08
+ - Install the "h5cc" and "h5fc" tools as "h5pcc" and "h5pfc"
+ respectively if library is built in parallel mode. AKC - 2004/01/07
- Added metadata benchmark (perform/perf_meta). SLU - 2003/10/03
C++ API:
@@ -4467,8 +4467,8 @@ New Features
Support for new platforms, languages and compilers.
=======================================
- HDF5 Fortran APIs are supported on MAC OSX with IBM XL Fortran compiler
- version 8.1 Beta
- Use --disbale-shared --enable-static flags with configure when
+ version 8.1 Beta
+ Use --disbale-shared --enable-static flags with configure when
building HDF5 Fortran Library on MAC OSX.
- C and C++ Libraries are available for Linux64 RH8
- C, C++ and Fortran sequential Libraries, and C and Fortran parallel
@@ -4545,12 +4545,12 @@ Bug Fixes since HDF5-1.6.1 release
Tools
-----
- - Fixed h5redeploy which sometimes complain too many argument for the
- test command. (The complain did not hinder the h5redploy to proceed
- correctly.) AKC - 2003/11/03
+ - Fixed h5redeploy which sometimes complain too many argument for the
+ test command. (The complain did not hinder the h5redploy to proceed
+ correctly.) AKC - 2003/11/03
- Documentation
- -------------
+ Documentation
+ -------------
Documentation
@@ -4563,12 +4563,12 @@ Platforms Tested
AIX 5.1 (32 and 64-bit) xlc 6.0.0.2
xlf 8.1.0.3
- xlC 6.0.0.4
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlC 6.0.0.4
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
poe 3.2.0.10
Cray T3E sn6606 2.0.6.08 Cray Standard C Version 6.6.0.2
Cray Fortran Version 3.6.0.2
@@ -4578,7 +4578,7 @@ Platforms Tested
Cray Fortran Version 3.4.0.0
FreeBSD 4.9 gcc 2.95.4
g++ 2.95.4
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
MPIch 1.2.4
@@ -4599,20 +4599,20 @@ Platforms Tested
Linux 2.4.19-SMP x86_64 gcc (GCC) 3.2.2 (SuSE Linux)
g++ 3.2.2
- Linux 2.4.21-sgi Altix
+ Linux 2.4.21-sgi Altix
SMP ia64 Intel(R) C++ Version 7.1
Intel(R) Fortran Itanium(R) Version 7.1
SGI MPI
OSF1 V5.1 Compaq C V6.4-014
- Compaq Fortran V5.5-2602
- Compaq Fortran V5.5-1877
- Compaq C++ V6.5-033
- Compaq C++ V6.5-030
- MPI_64bit_R13
+ Compaq Fortran V5.5-2602
+ Compaq Fortran V5.5-1877
+ Compaq C++ V6.5-033
+ Compaq C++ V6.5-030
+ MPI_64bit_R13
SunOS 5.7(32 and 64 bit) WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8(32 and 64 bit) Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -4621,7 +4621,7 @@ Platforms Tested
IA-32 Linux 2.4.18 gcc 2.96
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 3.0.4
Intel(R) C++ Version 7.1
Intel(R) Fortran Compiler Version 7.1
@@ -4629,18 +4629,18 @@ Platforms Tested
IA-64 Linux 2.4.21.SuSE_128.bef1 ia64
Intel(R) C++ Version 7.1
Intel(R) Fortran Compiler Version 7.1
- mpich-gm-1.2.5..intel
+ mpich-gm-1.2.5..intel
Windows 2000 (NT5.0) MSVC++ 6.0
DEC Visual Fortran 6.0
Intel C and F90 compilers version 7.1
- Code Warrior 8.0
+ Code Warrior 8.0
Windows XP MSVC++.NET
MAC OS X Darwin 7.2
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1175, based on gcc version 3.3.2
IBM XL Fortran version 8.1 Beta
-
+
Supported Configuration Features Summary
@@ -4684,10 +4684,10 @@ RedHat 7.1 ia64 C Intel (3) y n y n y n y
RedHat 8 & SuSe x86_64 y n n n y n y
gcc (3)
Linux 2.4 SGI Altix ia64 y n y n y y y
- Intel (3)
+ Intel (3)
-Platform static- Thread- SZIP GASS STREAM- High- H4/H5
+Platform static- Thread- SZIP GASS STREAM- High- H4/H5
exec safe VFD level tools
APIs (6)
Solaris2.7 64-bit x y y n y y n
@@ -4720,21 +4720,21 @@ RedHat 7.1 ia64 C Intel (3) y n y n y y y
RedHat 8 & SuSe x86_64 y n y n y y y
gcc (3)
Linux 2.4 SGI Altix ia64 y n y n y y y
- Intel (3)
+ Intel (3)
-Compiler versions for each platform are listed in the "Platforms Tested"
-table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
+Compiler versions for each platform are listed in the "Platforms Tested"
+table found elsewhere in this file (RELEASE.txt). Unless otherwise noted,
compilers used are the system compilers.
Footnotes: (1) Using mpich 1.2.4.
(2) Using mpt and mpich 1.2.4.
- (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.4 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
- (4) Shared libraries are provided only for the C library,
+ (4) Shared libraries are provided only for the C library,
except on Windows where they are provided for C and C++.
(5) Using mpt.
- (6) Includes the H4toH5 Library and the h4toh5 and h5toh4
+ (6) Includes the H4toH5 Library and the h4toh5 and h5toh4
utilities.
@@ -4744,7 +4744,7 @@ Known Problems
* There are two h5dump xml tests(h5dump --xml thlink.h5 and h5dump --xml tmany.h5)
failed on windows xp with .NET for debug and debug dll. Release and Release
- dll work fine.
+ dll work fine.
* The h5dump tests may fail to match the expected output on some platforms
(e.g. parallel jobs, Windows) where the error messages directed to
@@ -4764,7 +4764,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -4784,7 +4784,7 @@ Known Problems
the different precision in the values displayed and h5ls appears to
be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
@@ -4792,7 +4792,7 @@ Known Problems
* On some platforms that use Intel compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
* On IA32 and IA64 systems, if you use a compiler other than GCC (such as
@@ -4846,7 +4846,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -4919,7 +4919,7 @@ New Features
Support for new platforms, languages and compilers.
=======================================
- gcc 3.3.1 is supported on Linux.
-
+
Bug Fixes since HDF5-1.6.0 release
==================================
@@ -5001,25 +5001,25 @@ Bug Fixes since HDF5-1.6.0 release
Tools
-----
- - Fixed a segmentation fault of h5diff when percentage option is used.
+ - Fixed a segmentation fault of h5diff when percentage option is used.
AKC - 2003/08/27
- Switched away from tools using internal "fixtype" function(s) to use
H5Tget_native_type() internally. QAK - 2003/08/25
- Documentation
- -------------
- - Added two missing Fortran APIs (h5pget_fapl_mpiposix_f and
+ Documentation
+ -------------
+ - Added two missing Fortran APIs (h5pget_fapl_mpiposix_f and
h5pset_fapl_mpiposix_f) to the reference manual.
FMB - 2003/10/15
- - Corrected the reference manual descriptions of H5open/h5open_f and
- H5close/h5close_f to indicate that these calls are required in
+ - Corrected the reference manual descriptions of H5open/h5open_f and
+ H5close/h5close_f to indicate that these calls are required in
Fortran90 applications. FMB - 2003/10/15
Documentation
=============
- Fortran90 APIs are being integrated into the main body of the
+ Fortran90 APIs are being integrated into the main body of the
HDF5 Reference Manual (RM). This process is complete in all RM sections
except H5P.
@@ -5033,12 +5033,12 @@ Platforms Tested
AIX 5.1 (32 and 64-bit) xlc 6.0.0.2
xlf 8.1.0.3
- xlC 6.0.0.4
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlC 6.0.0.4
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
poe 3.2.0.10
Cray T3E sn6606 2.0.6.08 Cray Standard C Version 6.6.0.2
Cray Fortran Version 3.6.0.2
@@ -5048,7 +5048,7 @@ Platforms Tested
Cray Fortran Version 3.4.0.3
FreeBSD 4.9 gcc 2.95.4
g++ 2.95.4
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
HP MPI 01.07.00.00
@@ -5065,14 +5065,14 @@ Platforms Tested
Linux 2.4.20-8 gcc 3.2.2
OSF1 V5.1 Compaq C V6.4-014
Compaq C V6.3-027
- Compaq Fortran V5.5-2602
- Compaq C++ V6.5-030
- MPI_64bit_R5
+ Compaq Fortran V5.5-2602
+ Compaq C++ V6.5-030
+ MPI_64bit_R5
g++ version 3.0 for C++
SunOS 5.7(32 and 64 bit) WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8(32 and 64 bit) Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -5081,19 +5081,19 @@ Platforms Tested
IA-32 Linux 2.4.9 gcc 2.96
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 2.96 20000731
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
Windows 2000 (NT5.0) MSVC++ 6.0
DEC Visual Fortran 6.0
Intel C and F90 compilers version 7.1
- Code Warrior 8.0
+ Code Warrior 8.0
Windows XP MSVC++.NET
MAC OS X Darwin 6.8
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1175, based on gcc version 3.1
-
+
Supported Configuration Features Summary
@@ -5112,7 +5112,7 @@ Solaris2.7 64-bit y y (1) y y (1) y y y
Solaris2.7 32-bit y y (1) y y (1) y y y
Solaris2.8 64-bit y y (1) y y (1) y y y
Solaris2.8 32-bit y y y y (1) y y y
-IRIX6.5 y y (1) n n n y y
+IRIX6.5 y y (1) n n n y y
IRIX64_6.5 64-bit y y (2) y y y y y
IRIX64_6.5 32-bit y y (2) n n n y y
HPUX11.00 y y (1) y y y y y
@@ -5139,7 +5139,7 @@ Linux 2.4 IA64 Intel y n y n y n y
ASCII Table 2 -- for RELEASE.txt
-Platform static- Thread- SZIP GASS STREAM- High-level H4/H5
+Platform static- Thread- SZIP GASS STREAM- High-level H4/H5
exec safe VFD APIs tools (7)
Solaris2.7 64-bit x y y n y y n
Solaris2.7 32-bit x y y n y y y
@@ -5172,12 +5172,12 @@ Linux 2.4 IA64 Intel y n y n y y y
Notes: (1) Using mpich 1.2.4.
(2) Using mpt and mpich 1.2.4.
(3) Linux 2.4 with GNU, Intel, and PGI compilers, respectively.
- (4) Shared libraries are provided only for the C library, except
+ (4) Shared libraries are provided only for the C library, except
on Windows where they are provided for C and C++.
(5) Using mpt.
- (6) Binaries only; source code for this platform is not being
+ (6) Binaries only; source code for this platform is not being
released at this time.
- (7) Includes the H4toH5 Library and the h4toh5 and h5toh4
+ (7) Includes the H4toH5 Library and the h4toh5 and h5toh4
utilities.
Compiler versions for each platform are listed in the preceding
"Platforms Tested" table.
@@ -5187,10 +5187,10 @@ Linux 2.4 IA64 Intel y n y n y y y
Known Problems
==============
* Fortran subroutine h5pget_driver_f doesn't return a correct driver information.
- The fix willl be available in the 1.6.2 release.
+ The fix willl be available in the 1.6.2 release.
* There are two h5dump xml tests(h5dump --xml thlink.h5 and h5dump --xml tmany.h5)
failed on windows xp with .NET for debug and debug dll. Release and Release
- dll work fine.
+ dll work fine.
* The h5dump tests may fail to match the expected output on some platforms
(e.g. parallel jobs, Windows) where the error messages directed to
@@ -5210,7 +5210,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -5219,7 +5219,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
@@ -5239,14 +5239,14 @@ Known Problems
the different precision in the values displayed and h5ls appears to
be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
* On some platforms that use Intel compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
ftp://hdf.ncsa.uiuc.edu/pub/outgoing/hdf5/hdf5-1.6.0/F90_source_for_Crays
@@ -5270,6 +5270,8 @@ Known Problems
* Information about building with PGI and Intel compilers is available in
INSTALL file sections 5.7 and 5.8
+
+
%%%%1.6.0%%%% Release Information for hdf5-1.6.0 (03/July/03)
14. Release information for HDF5 version 1.6.0
@@ -5289,7 +5291,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -5334,8 +5336,8 @@ Library:
For more information see
http://hdf.ncsa.uiuc.edu/HDF5/doc_resource/SZIP/index.html
http://hdf.ncsa.uiuc.edu/HDF5/doc/ADGuide.html
- http://hdf.ncsa.uiuc.edu/HDF5/doc/ADGuide/Changes.html
-
+ http://hdf.ncsa.uiuc.edu/HDF5/doc/ADGuide/Changes.html
+
Complete list of changes:
* Changed dataset modification time to _not_ be updated when raw data is
@@ -5363,16 +5365,16 @@ Library:
I/O filters: H5Pmodify_filter, H5Pget_filter_by_id and
H5Pall_filters_avail. Also changed H5Zregister to use new method
of registering filters with library. QAK - 2003/04/08
- * The first version of szip compression support were implemented.
+ * The first version of szip compression support were implemented.
User should have static szlib library installed. Using function
H5Pset_szip to pass the szip parameters to the HDF5 library.
More detailed decription of the process will be followed.
KY-2003/04/01
- * Added Fletcher32 checksum as a filter in pipeline. It only works in
+ * Added Fletcher32 checksum as a filter in pipeline. It only works in
chunked dataset. SLU - 2003/2/11
* MPICH/MPE instrumentation feature added. Use --with-mpe[=DIR] to configure
it. AKC - 2003/1/3
- * New functions H5Gget_num_objs, H5Gget_objname_by_idx and H5Gget_objtype_by_idx
+ * New functions H5Gget_num_objs, H5Gget_objname_by_idx and H5Gget_objtype_by_idx
are added to the library. SLU - 2002/11/25
* H5Dget_offset is added to return the offset of a dataset's data relative
to the beginning of the file. SLU - 2002/11/7
@@ -5397,7 +5399,7 @@ Library:
H5D_SPACE_ALLOC_LATE for H5Dset_space_time(). This allows chunked
datasets to be incrementally allocated as in the 1.4.x branch.
QAK - 2002/08/27
- * Compact dataset is added to the library. The data will be stored in
+ * Compact dataset is added to the library. The data will be stored in
the header message of dataset layout. Space allocation time has to be
EARLY. No hyperslab is supported for parallel collective write. There
is no API changes except activating H5Pset_layout and H5Pget_layout for
@@ -5411,9 +5413,9 @@ Library:
This can improve parallel I/O performance for chunked
datasets. QAK - 2002/05/17
* New functions H5Glink2 and H5Gmove2 were added to allow link and move to
- be in different locations in the same file. The old functions H5Glink
- and H5Gmove remain valid. SLU - 2002/04/26
- * Fill-value's behaviors for contiguous dataset have been redefined.
+ be in different locations in the same file. The old functions H5Glink
+ and H5Gmove remain valid. SLU - 2002/04/26
+ * Fill-value's behaviors for contiguous dataset have been redefined.
Basicly, dataset won't allocate space until it's necessary. Full details
are available at http://hdf.ncsa.uiuc.edu/RFC/Fill_Value, at this moment.
SLU - 2002/04/11
@@ -5434,14 +5436,14 @@ Library:
in order to correctly handle dataset region references. Moved
H5Rget_object_type() to be only compiled into the library when v1.4
compatibility is enabled.
- * Added a new file access property, file close degree, to control file
+ * Added a new file access property, file close degree, to control file
close behavior. It has four values, H5F_CLOSE_WEAK, H5F_CLOSE_SEMI,
- H5F_CLOSE_STRONG, and H5F_CLOSE_DEFAULT. Two correspont functions
- H5Pset_fclose_degree and H5Pget_fclose_degree are also provided. Two
+ H5F_CLOSE_STRONG, and H5F_CLOSE_DEFAULT. Two correspont functions
+ H5Pset_fclose_degree and H5Pget_fclose_degree are also provided. Two
new functions H5Fget_obj_count and H5Fget_obj_ids are offerted to assist
- this new feature. For full details, please refer to the reference
- manual under the description of H5Fcreate, H5Fopen, H5Fclose and the
- functions mentioned above.
+ this new feature. For full details, please refer to the reference
+ manual under the description of H5Fcreate, H5Fopen, H5Fclose and the
+ functions mentioned above.
* Removed H5P(get|set)_hyper_cache API function, since the property is no
longer used.
* Improved performance of non-contiguous hyperslabs (built up with
@@ -5479,19 +5481,19 @@ Tools:
QAK - 2003/06/06
* h5diff to compare two HDF5 files was added
* h5import to import ascii and binary data to an HDF5 file was added.
- Old h5import tool in the tools/misc directory was renamed to
- h5createU8 to reflect its purpose. h5createU8 will be deleted in
- 1.6.1 release.
+ Old h5import tool in the tools/misc directory was renamed to
+ h5createU8 to reflect its purpose. h5createU8 will be deleted in
+ 1.6.1 release.
* Two new scripts h5fc and h5c++ were added to compile F90 and C++
HDF5 applications.
Support for new platforms, languages and compilers.
=======================================
* Added C++ API support on HPUX11.00. BMR - 2003/03/19
- * Absoft compiler is supported for Fortran HDF5 Library.
+ * Absoft compiler is supported for Fortran HDF5 Library.
When building with Absoft compiler, add -DH5_ABSOFT to
C compilation flags to get correct names of C functions
- called by Fortran APIs.
+ called by Fortran APIs.
Bug Fixes since HDF5-1.4.0 release
@@ -5525,7 +5527,7 @@ Library
for floating point data). This adds a new API function: H5Pset_shuffle.
KY - 2002/11/13
* Allow scalar dataspaces to be used for parallel I/O. QAK - 2002/11/05
- * New functions H5Gget_comment(modification), H5Aget_storage_size,
+ * New functions H5Gget_comment(modification), H5Aget_storage_size,
H5Arename. SLU - 2002/10/29
* Fixed an assertion of H5S_select_iterate that did not account for scalar
type that has no dimension sizes. AKC - 2002/10/15
@@ -5534,10 +5536,10 @@ Library
* Fixed data corruption problem which could occur when fill values were
written to a contiguously stored dataset in parallel. QAK - 2002/08/27
* Fixed VL memory leak when data is overwritten. The heap objects holding
- old data are freed. If the fill value writting time is set to
+ old data are freed. If the fill value writting time is set to
H5D_FILL_TIME_NEVER, the library prohibits user to create VL type dataset.
- The library free all the heap objects storing VL type if there is nested
- VL type(a VL type contains another VL type). SLU - 2002/07/10
+ The library free all the heap objects storing VL type if there is nested
+ VL type(a VL type contains another VL type). SLU - 2002/07/10
* Tweaked a few API functions to use 'size_t' instead of 'unsigned' or
'hsize_t', which may cause errors in some cases.
@@ -5561,17 +5563,17 @@ Performance
Tools
-----
- * Added a -force option to h5redeploy. AKC - 2003/03/04
+ * Added a -force option to h5redeploy. AKC - 2003/03/04
* The VL string bug(data and datatype cannot be shown) in h5dump is fixed.
-SLU - 2002/11/18
- * Fixed segfault if h5dump was invoked with some options but no file
+ * Fixed segfault if h5dump was invoked with some options but no file
(e.g., h5dump -H). -AKC, 2002/10/15
* Fixed so that the "-i" flag works correctly with the h5dumper.
* Fixed segfault when "-v" flag was used with the h5dumper.
-Documentation
--------------
+Documentation
+-------------
@@ -5583,12 +5585,12 @@ Platforms Tested
AIX 5.1 (32 and 64-bit) xlc 6.0.0.2
xlf 8.1.0.3
- xlC 6.0.0.4
- xlc 5.0.2.5
- xlf 7.1.1.2
- xlC 5.0.2.5
- mpcc_r 5.0.2.5
- mpxlf_r 7.1.1.2
+ xlC 6.0.0.4
+ xlc 5.0.2.5
+ xlf 7.1.1.2
+ xlC 5.0.2.5
+ mpcc_r 5.0.2.5
+ mpxlf_r 7.1.1.2
poe 3.2.0.10
Cray T3E sn6606 2.0.6.08 Cray Standard C Version 6.6.0.2
Cray Fortran Version 3.6.0.0.2
@@ -5601,7 +5603,7 @@ Platforms Tested
mpt 2.1.0.0
FreeBSD 4.7 gcc 2.95.4
g++ 2.95.5
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP ANSI C++ B3910B A.03.13
MPIch 1.2.4
@@ -5617,14 +5619,14 @@ Platforms Tested
MPIch 1.2.4
OSF1 V5.1 Compaq C V6.4-014
Compaq C V6.3-027
- Compaq Fortran V5.5-1877
- Compaq C++ V6.5-014
- MPI_64bit_R5
+ Compaq Fortran V5.5-1877
+ Compaq C++ V6.5-014
+ MPI_64bit_R5
g++ version 3.0 for C++
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8/32 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 90
Sun WorkShop 6 update 2 C++ 5.3
@@ -5636,19 +5638,19 @@ Platforms Tested
IA-32 Linux 2.4.9 gcc 2.96
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 2.96 20000731
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
Windows 2000 (NT5.0) MSVC++ 6.0
DEC Visual Fortran 6.0
Intel C and F90 compilers version 7.1
- Code Warrior 8.0
+ Code Warrior 8.0
Windows XP MSVC++.NET
MAC OS X Darwin 6.5
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1161, based on gcc version 3.1
-
+
Supported Configuration Features Summary
@@ -5667,7 +5669,7 @@ Solaris2.7 64-bit y y (1) y y (1) y y y
Solaris2.7 32-bit y y (1) y y (1) y y y
Solaris2.8 64-bit y y (1) y y (1) y y y
Solaris2.8 32-bit y y y y (1) y y y
-IRIX6.5 y y (1) n n n y y
+IRIX6.5 y y (1) n n n y y
IRIX64_6.5 64-bit y y (2) y y y y y
IRIX64_6.5 32-bit y y (2) n n n y y
HPUX11.00 y y (1) y y y y y
@@ -5694,7 +5696,7 @@ Linux 2.4 IA64 Intel y n y n y n y
ASCII Table 2 -- for RELEASE.txt
-Platform static- Thread- SZIP GASS STREAM- High-level H4/H5
+Platform static- Thread- SZIP GASS STREAM- High-level H4/H5
exec safe VFD APIs tools (7)
Solaris2.7 64-bit x y y n y y n
Solaris2.7 32-bit x y y n y y y
@@ -5727,12 +5729,12 @@ Linux 2.4 IA64 Intel y n y n y y y
Notes: (1) Using mpich 1.2.4.
(2) Using mpt and mpich 1.2.4.
(3) Linux 2.4 with GNU, Intel, and PGI compilers, respectively.
- (4) Shared libraries are provided only for the C library, except
+ (4) Shared libraries are provided only for the C library, except
on Windows where they are provided for C and C++.
(5) Using mpt.
- (6) Binaries only; source code for this platform is not being
+ (6) Binaries only; source code for this platform is not being
released at this time.
- (7) Includes the H4toH5 Library and the h4toh5 and h5toh4
+ (7) Includes the H4toH5 Library and the h4toh5 and h5toh4
utilities.
Compiler versions for each platform are listed in the preceding
"Platforms Tested" table.
@@ -5764,7 +5766,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -5773,7 +5775,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
@@ -5793,14 +5795,14 @@ Known Problems
the different precision in the values displayed and h5ls appears to
be dumping floating-point numbers correctly.
-* Before building HDF5 F90 Library from source on Crays
+* Before building HDF5 F90 Library from source on Crays
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
subdirectory in the top level directory with the Cray-specific files
from the site:
* On some platforms that use Intel compilers to build HDF5 fortran library,
compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90
- complaining about exit subroutine. Comment out the line
+ complaining about exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error)
ftp://hdf.ncsa.uiuc.edu/pub/outgoing/hdf5/hdf5-1.6.0/F90_source_for_Crays
@@ -5836,7 +5838,7 @@ INTRODUCTION
This document describes the differences between HDF5-1.4.4 and
HDF5-1.4.5, and contains information on the platforms tested and
-known problems in HDF5-1.4.5. For additional information check the
+known problems in HDF5-1.4.5. For additional information check the
HISTORY.txt file in the HDF5 source.
The HDF5 documentation can be found on the NCSA ftp server
@@ -5845,7 +5847,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information, see the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -5878,7 +5880,7 @@ New Features
o Library
=========
o General
- ---------
+ ---------
* Allow scalar dataspaces to be used for parallel I/O. QAK - 2002/11/05
* Added environment variable "HDF5_DISABLE_VERSION_CHECK", which disables
the version checking between the header files and the library linked
@@ -5891,8 +5893,8 @@ New Features
output format; function call and return event times can be logged;
total time spent in each function can be logged. The following
HDF5_DEBUG environment variable words affect tracing:
- trace -- turn on/off basic tracing
- ttimes -- turn on tracing and report event times and
+ trace -- turn on/off basic tracing
+ ttimes -- turn on tracing and report event times and
time spent in each API function.
ttop -- turn on tracing but display only top-level
API calls.
@@ -5901,7 +5903,7 @@ New Features
------
* Several missing fortran APIs have been added to the library:
- h5get_libversion_f h5tget_member_index_f h5dget_storage_size_f
+ h5get_libversion_f h5tget_member_index_f h5dget_storage_size_f
h5check_version_f h5tvlen_create_f h5dvlen_get_max_len_f
h5garbage_collect_f h5dwrite_vl_f
h5dont_atexit_f h5dread_vl_f
@@ -5935,11 +5937,11 @@ New Features
=========================================
* C++ API now works on the Origin2000 (IRIX6.5.14.) BMR - 2002/11/14
-
+
o Misc.
=========================================
- HDF5 1.4.5 works with Portland Group Compilers (pgcc, pgf90 and pgCC
- version 4.0-2) on Linux 2.4
+ HDF5 1.4.5 works with Portland Group Compilers (pgcc, pgf90 and pgCC
+ version 4.0-2) on Linux 2.4
Bug Fixes since HDF5-1.4.4 Release
@@ -5953,8 +5955,8 @@ Bug Fixes since HDF5-1.4.4 Release
QAK - 2003/01/21
* Added improved error assertion for nil VL strings. It return error
stack instead of a simple assertion. SLU - 2002/12/16
- * Fixed h5dump bug(cannot dump data and datatype) for VL string.
- SLU - 2002/11/18
+ * Fixed h5dump bug(cannot dump data and datatype) for VL string.
+ SLU - 2002/11/18
* Fixed error condition where "none" selections were not being handled
correctly in serial & parallel. QAK - 2002/10/29
* Fixed problem where optimized hyperslab routines were incorrectly
@@ -5978,15 +5980,15 @@ Platforms Tested
AIX 5.1 (32 and 64-bit) C for AIX Compiler, Version 6
xlf 8.1.0.2
poe 3.2.0.11
- Cray T3E sn6606 2.0.6.08 Cray Standard C Version 6.6.0.1.3
- Cray Fortran Version 3.6.0.0.12
+ Cray T3E sn6606 2.0.6.08 Cray Standard C Version 6.6.0.1.3
+ Cray Fortran Version 3.6.0.0.12
Cray SV1 10.0.1. 0 Cray Standard C Version 6.6.0.1.3
Cray Fortran Version 3.6.0.0.12
Cray T90IEEE 10.0.1.01u Cray Standard C Version 6.4.0.2.3
Cray Fortran Version 3.4.0.3
FreeBSD 4.7 gcc 2.95.4
g++ 2.95.5
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
IRIX 6.5 MIPSpro cc 7.30
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1.3m
@@ -6001,16 +6003,16 @@ Platforms Tested
Compaq Fortran X5.4A-1684
gcc version 3.0 for C++
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8/32 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
SunOS 5.8/64 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
@@ -6019,7 +6021,7 @@ Platforms Tested
IA-32 Linux 2.4.9 gcc 2.96
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 2.96 20000731
Intel(R) C++ Version 7.0
Intel(R) Fortran Compiler Version 7.0
@@ -6028,9 +6030,9 @@ Platforms Tested
Windows XP .NET
Windows NT4.0 Code Warrior 6.0
MAC OS X Darwin 6.2
- gcc and g++ Apple Computer, Inc. GCC
+ gcc and g++ Apple Computer, Inc. GCC
version 1161, based on gcc version 3.1
-
+
Supported Configuration Features Summary
@@ -6051,7 +6053,7 @@ Supported Configuration Features Summary
Solaris2.7 32-bit y y (1) y y (1) y y y
Solaris2.8 64-bit y n y y (1) y y y
Solaris2.8 32-bit y n y y (1) y y y
- IRIX6.5 y y (1) n n n y y
+ IRIX6.5 y y (1) n n n y y
IRIX64_6.5 64-bit y y (2) y y y y y
IRIX64_6.5 32-bit y y (2) n n n y y
HPUX11.00 y y (1) y n n y y
@@ -6073,7 +6075,7 @@ Supported Configuration Features Summary
Linux 2.4 PGI (3) y n y n y n y
Linux 2.4 IA32 y n y n n n y
Linux 2.4 IA64 y n y n n n y
-
+
Platform static- Thread- SRB GASS STREAM-
exec safe VFD
@@ -6109,23 +6111,23 @@ Supported Configuration Features Summary
(2) Using mpt and mpich 1.2.4.
(3) Linux 2.4 with GNU, Intel, and PGI compilers.
(4) No HDF4-related tools.
- (5) Shared libraries are provided only for the C library,
+ (5) Shared libraries are provided only for the C library,
except on Windows where they are provided for all languages.
(6) Debug mode only.
- (7) Binaries only; source code for this platform is not being
+ (7) Binaries only; source code for this platform is not being
released at this time.
Known Problems
==============
- * On Linux 2.4 IA64, Fortran test fails for h5dwrite_vl_f
+ * On Linux 2.4 IA64, Fortran test fails for h5dwrite_vl_f
for integer and real base datatypes.
* When fortran library is built with Intel compilers, compilation
- for fflush1.f90, fflush2.f90 and fortanlib_test.f90 will fail
+ for fflush1.f90, fflush2.f90 and fortanlib_test.f90 will fail
complaining about EXEC function. Comment the call to EXEC subroutine
- in each program, or get a patch for the HDF5 Fortran source code.
+ in each program, or get a patch for the HDF5 Fortran source code.
* Fortran external dataset test fails on Linux 2.4 with pgf90 compiler.
@@ -6135,11 +6137,11 @@ Known Problems
* Datasets or attributes which have a variable-length string datatype are
not printing correctly with h5dump and h5ls.
- * When a dataset with the variable-length datatype is overwritten,
- the library can develop memory leaks that cause the file to become
+ * When a dataset with the variable-length datatype is overwritten,
+ the library can develop memory leaks that cause the file to become
unnecessarily large. This is planned to be fixed in the next release.
- * On the SV1, the h5ls test fails due to a difference between the
+ * On the SV1, the h5ls test fails due to a difference between the
SV1 printf precision and the printf precision on other platforms.
* The h5dump tests may fail to match the expected output on some
@@ -6150,17 +6152,17 @@ Known Problems
* The --enable-static-exec configure flag fails to compile for HP-UX
11.00 platforms.
- * The executables are always dynamic on IRIX64 6.5(64 and n32) and
+ * The executables are always dynamic on IRIX64 6.5(64 and n32) and
IRIX 6.5 even if they are configured with --enable-static-exec.
* IRIX 6.5 fails to compile if configured with --enable-static-exec.
* The executables are always dynamic on Solaris 2.7 ans 2.8(64 and n32)
even if they are configured with --enable-static-exec.
-
+
* The HDF5_MPI_OPT_TYPES optimization code in the parallel HDF5 will cause
a hang in some cases when chunked storage is used. This is now set to
- be off by default. One may turn it on by setting the environment
+ be off by default. One may turn it on by setting the environment
variable HDF5_MPI_OPT_TYPES to a non-zero value such as 1.
* On OSF1 v5.1 and IA32 h5dumpgentst program that generates test files
@@ -6171,10 +6173,10 @@ Known Problems
* On Cray T3E (sn6606 2.0.6.08 unicosmk CRAY T3E) with Cray Standard C Version 6.6.0.1.3
compiler optimization causes errors in many HDF5 Library tests. Use -g -h zero flags
- to build HDF5 Library.
+ to build HDF5 Library.
* On Cray SV1 10.0.1. 0 datatype convertion test fails. Please check HDF FTP site
- if patch is available. We will try to provide one in the nearest future.
+ if patch is available. We will try to provide one in the nearest future.
* For configuration, building and testing with Intel and PGI compilers see
corresponding section in INSTALL file.
@@ -6198,7 +6200,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information, see the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -6221,32 +6223,32 @@ New Features
============
o Configuration
================
- * The H4 to H5 tools have been removed from the main source and placed
+ * The H4 to H5 tools have been removed from the main source and placed
in a separate package. You can get these tools from the HDF ftp site
- (ftp://hdf.ncsa.uiuc.edu/). The "--with-hdf4" command-line option
+ (ftp://hdf.ncsa.uiuc.edu/). The "--with-hdf4" command-line option
during configure is no longer valid. BW - 2002/06/25
o Library
=========
o General
- ---------
+ ---------
* Fill-value forward-compatibility with release 1.5 was added. SLU -
2002/04/11
* A new query function H5Tget_member_index has been added for compound
- and enumeration data types. This function retrieves a member's index
+ and enumeration data types. This function retrieves a member's index
by name. SLU - 2002/04/05
* Added serial multi-gigabyte file size test. "test/big -h" shows
the help page. AKC - 2002/03/29
-
+
o APIs
------
- * The F90 subroutines h5dwrite_f, h5dread_f, h5awrite_f, and h5aread_f
- were overloaded with a "dims" argument of type INTEGER(HSIZE_T) to
- specify the size of the array. We recommend using these subroutines
+ * The F90 subroutines h5dwrite_f, h5dread_f, h5awrite_f, and h5aread_f
+ were overloaded with a "dims" argument of type INTEGER(HSIZE_T) to
+ specify the size of the array. We recommend using these subroutines
with the new type; module subroutines that accept "dims" as an i
- INTEGER array of size 7 will be deprecated in release 1.6.
+ INTEGER array of size 7 will be deprecated in release 1.6.
EIP - 2002/05/06
-
+
o Performance
-------------
* Added internal "small data" aggregation, which can reduce the number of
@@ -6303,15 +6305,15 @@ New Features
* Intel C++ and F90 compilers Version 6.0 are supported on Linux 2.4.
* Intel C++ compilers Version 6.0 are supported on Windows 2000.
-
+
o Misc.
=========================================
* zlib has been moved out of the Windows source release. Users should go to
- the ZLIB homepage(http://www.zlib.org) to download the corresponding
+ the ZLIB homepage(http://www.zlib.org) to download the corresponding
zlib library.
- * The Windows binary release is built with the old version of the zlib
- library. We expect users to use zlib 1.1.4 to build with the source
- release.
+ * The Windows binary release is built with the old version of the zlib
+ library. We expect users to use zlib 1.1.4 to build with the source
+ release.
* In the Windows-specific install document, we specify how to test backward
compatibility. However, in this release, we are not testing the backward
compatibility of HDF5.
@@ -6335,7 +6337,7 @@ Bug Fixes since HDF5-1.4.3 Release
library to go into infinite loop. QAK - 2002/06/10
* Fixed bug (#699, fix provided by a user) where a scalar dataspace was
written to the file and then subsequently queried with the
- H5Sget_simple_extent_type function; type was reported as H5S_SIMPLE
+ H5Sget_simple_extent_type function; type was reported as H5S_SIMPLE
instead of H5S_SCALAR. EIP - 2002/06/04
* Clear symbol table node "dirty" flag when flushing symbol tables to
disk, to reduce I/O calls made & improve performance. QAK - 2002/06/03
@@ -6367,32 +6369,32 @@ Bug Fixes since HDF5-1.4.3 Release
Performance Improvements
========================
This release of the HDF5 library has been extensively tuned to improve
-performance, especially to improve parallel I/O performance.
+ performance, especially to improve parallel I/O performance.
Most of the specific information for particular performance improvements
-is mentioned in the "New Features" and "Bug Fixes since HDF5-1.4.3" sections
-of this document, but in general, the library should make fewer and larger
-I/O requests when accessing a file. Additionally, improvements to the parallel
-I/O portions of the library should have reduced the communications and barriers
-used in various internal algorithms, improving the performance of the library.
+ is mentioned in the "New Features" and "Bug Fixes since HDF5-1.4.3" sections
+ of this document, but in general, the library should make fewer and larger
+ I/O requests when accessing a file. Additionally, improvements to the parallel
+ I/O portions of the library should have reduced the communications and barriers
+ used in various internal algorithms, improving the performance of the library.
However, with the extensive changes to some portions of the library that
-were required for these improvements, some errors or unanticipated results may
-have been introduced also. Please report any problems encountered to our
-support team at hdfhelp@ncsa.uiuc.edu.
+ were required for these improvements, some errors or unanticipated results may
+ have been introduced also. Please report any problems encountered to our
+ support team at hdfhelp@ncsa.uiuc.edu.
Hopefully these improvements will benefit all HDF5 applications, but if
-there are particular I/O patterns that appear to be slower than necessary,
-please send e-mail to hdfhelp@ncsa.uiuc.edu with a sample program showing the
-problem behavior; we will look into the issue to see if it is possible to
-address it.
+ there are particular I/O patterns that appear to be slower than necessary,
+ please send e-mail to hdfhelp@ncsa.uiuc.edu with a sample program showing the
+ problem behavior; we will look into the issue to see if it is possible to
+ address it.
Documentation
=============
* Documentation was updated for the hdf5-1.4.4 release.
- * A new "HDF5 User's Guide" is under development. See
+ * A new "HDF5 User's Guide" is under development. See
http://hdf.ncsa.uiuc.edu/HDF5/doc_dev_snapshot/H5_NewUG/current/.
- * A "Parallel HDF5 Tutorial" is available at
+ * A "Parallel HDF5 Tutorial" is available at
http://hdf.ncsa.uiuc.edu/HDF5/doc/Tutor/.
- * The "HDF5 Tutorial" is not distributed with this release. It is
+ * The "HDF5 Tutorial" is not distributed with this release. It is
available at http://hdf.ncsa.uiuc.edu/HDF5/doc/Tutor/.
@@ -6406,20 +6408,20 @@ Platforms Tested
AIX 4.3 (IBM SP RS6000) C for AIX Compiler, Version 5.0.2.0
xlf 7.1.0.2
poe 3.1.0.12 (includes mpi)
- AIX 5.1 xlc 5.0.2.0
+ AIX 5.1 xlc 5.0.2.0
xlf 07.01.0000.0002
mpcc_r 5.0.2.0; mpxlf_r 07.01.0000.0002
Cray T3E sn6711 2.0.5.57 Cray Standard C Version 6.5.0.3
Cray Fortran Version 3.5.0.4
- Cray SV1 10.0.1.1 Cray Standard C Version 6.5.0.3
+ Cray SV1 10.0.1.1 Cray Standard C Version 6.5.0.3
Cray Fortran Version 3.5.0.4
FreeBSD 4.6 gcc 2.95.4
g++ 2.95.4
HP-UX B.10.20 HP C HP92453-01 A.10.32.30
HP F90 v2.3
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
- HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP MPI [not a product] (03/24/2000) B6060BA
IRIX 6.5 MIPSpro cc 7.30
@@ -6438,16 +6440,16 @@ Platforms Tested
Compaq Fortran V5.5-1877-48BBF
gcc version 3.0 for C++
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
- WorkShop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) WorkShop Compilers 5.0 98/12/15 C++ 5.0
+ WorkShop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8/32 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
SunOS 5.8/64 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
@@ -6457,7 +6459,7 @@ Platforms Tested
gcc 2.96
Intel(R) C++ Version 6.0
Intel(R) Fortran Compiler Version 6.0
-
+
IA-64 Linux 2.4.16 ia64 gcc version 2.96 20000731
Intel(R) C++ Version 6.0
Intel(R) Fortran Compiler Version 6.0
@@ -6538,10 +6540,10 @@ Supported Configuration Features Summary
Footnotes: (1) Using mpich.
(2) Using mpt and mpich.
- (3) When configured with static-exec enabled, tests fail in
+ (3) When configured with static-exec enabled, tests fail in
serial mode.
(4) No HDF4-related tools.
- (5) Shared libraries are provided only for the C library,
+ (5) Shared libraries are provided only for the C library,
except on Windows where they are provided for all languages.
(6) Linux 2.4 with Intel compilers.
@@ -6552,11 +6554,11 @@ Known Problems
* Datasets or attributes which have a variable-length string datatype are
not printing correctly with h5dump and h5ls.
- * When a dataset with the variable-length datatype is overwritten,
- the library can develop memory leaks that cause the file to become
+ * When a dataset with the variable-length datatype is overwritten,
+ the library can develop memory leaks that cause the file to become
unnecessarily large. This is planned to be fixed in the next release.
- * On the SV1, the h5ls test fails due to a difference between the
+ * On the SV1, the h5ls test fails due to a difference between the
SV1 printf precision and the printf precision on other platforms.
* The h5dump tests may fail to match the expected output on some
@@ -6567,14 +6569,14 @@ Known Problems
* The --enable-static-exec configure flag fails to compile for HP-UX
11.00 platforms.
- * The executables are always dynamic on IRIX64 6.5(64 and n32) and
+ * The executables are always dynamic on IRIX64 6.5(64 and n32) and
IRIX 6.5 even if they are configured with --enable-static-exec.
* IRIX 6.5 fails to compile if configured with --enable-static-exec.
-
+
* The HDF5_MPI_OPT_TYPES optimization code in the parallel HDF5 will cause
a hang in some cases when chunked storage is used. This is now set to
- be off by default. One may turn it on by setting the environment
+ be off by default. One may turn it on by setting the environment
variable HDF5_MPI_OPT_TYPES to a non-zero value such as 1.
* On IA32 and IA64 systems, if you use a compiler other than GCC (such as
@@ -6590,7 +6592,7 @@ Known Problems
# How to pass a linker flag through the compiler.
wl="-Wl,"
- * To build the Fortran library using Intel compilers, one has to
+ * To build the Fortran library using Intel compilers, one has to
x modify the source code in the fortran/src directory to remove the
!DEC and !MS compiler directives.
x The build will fail in the fortran/test directory and then in the
@@ -6598,7 +6600,7 @@ Known Problems
those directories to contain two lines
work.pc
- ../src/work.pc
+ ../src/work.pc
* To build the Fortran library on IA64 use
setenv CC "ecc -DIA64"
@@ -6625,7 +6627,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -6653,7 +6655,7 @@ New Features
o Library
=========
o General
- ---------
+ ---------
* Added a new test to verify the information provided by the configure
command.
* Changed internal error handling macros to reduce code size of library by
@@ -6754,7 +6756,7 @@ Bug Fixes since HDF5-1.4.2 Release
Documentation
=============
* Documentation was updated for the hdf5-1.4.3 release.
- * A new "HDF5 User's Guide" is under development. See
+ * A new "HDF5 User's Guide" is under development. See
http://hdf.ncsa.uiuc.edu/HDF5/doc_dev_snapshot/H5_NewUG/current/.
* Parallel Tutorial is available at http://hdf.ncsa.uiuc.edu/HDF5/doc/Tutor/
@@ -6771,15 +6773,15 @@ Platforms Tested
poe 3.1.0.12 (includes mpi)
Cray T3E sn6711 2.0.5.57 Cray Standard C Version 6.5.0.3
Cray Fortran Version 3.5.0.4
- Cray SV1 10.0.0.8 Cray Standard C Version 6.5.0.3
+ Cray SV1 10.0.0.8 Cray Standard C Version 6.5.0.3
Cray Fortran Version 3.5.0.4
FreeBSD 4.5 gcc 2.95.3
g++ 2.95.3
HP-UX B.10.20 HP C HP92453-01 A.10.32.30
HP F90 v2.3
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
- HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
HP F90 v2.4
HP MPI [not a product] (03/24/2000) B6060BA
IRIX 6.5 MIPSpro cc 7.30
@@ -6790,19 +6792,19 @@ Platforms Tested
gcc 2.95.2 with mpich 1.2.1
g++ 2.95.2
pgf90 3.2-4
- OSF1 V5.1 Compaq C V6.3-028
+ OSF1 V5.1 Compaq C V6.3-028
Compaq Fortran V5.4-1283
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) Workshop Compilers 5.0 98/12/15 C++ 5.0
- Workshop Compilers 5.0 98/10/25
- FORTRAN 90 2.0 Patch 107356-04
+ (Solaris 2.7) Workshop Compilers 5.0 98/12/15 C++ 5.0
+ Workshop Compilers 5.0 98/10/25
+ FORTRAN 90 2.0 Patch 107356-04
SunOS 5.8/32 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
SunOS 5.8/64 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
Patch 109503-07 2001/08/11
Sun WorkShop 6 update 1 C++ 5.2 Patch
109508-04 2001/07/11
@@ -6811,9 +6813,9 @@ Platforms Tested
IA-32 Linux 2.2.10smpx cc Intel 5.0.1
egcs-2.91.66
IA-64 Linux 2.4.16 ia64 gcc version 2.96 20000731
- Intel(R) C++ Itanium(TM) Compiler
+ Intel(R) C++ Itanium(TM) Compiler
for the Itanium(TM)-based applications,
- Version 6.0 Beta, Build 20010905
+ Version 6.0 Beta, Build 20010905
Windows 2000 (NT5.0) MSVC++ 6.0
DEC Visual Fortran 6.0
Windows NT4.0 MSVC++ 6.0
@@ -6839,7 +6841,7 @@ Supported Configuration Features Summary
Solaris2.7 y y (1) y n y y y y
Solaris2.8 64 y n y n y y y y
Solaris2.8 32 y n y n y y y y
- IA-64 y n n n n n y y
+ IA-64 y n n n n n y y
IRIX6.5 y y (1) n n n y y y
IRIX64_6.5 64 y y (2) y y n y y y
IRIX64_6.5 32 y y (2) n n n y y y
@@ -6861,12 +6863,12 @@ Supported Configuration Features Summary
Linux 2.4 y y (1) n n y y y y
- Platform 1.2 static- Thread- SRB GASS STREAM-
+ Platform 1.2 static- Thread- SRB GASS STREAM-
compatibility exec safe VFD
Solaris2.7 n x y n n y
Solaris2.8 64 n y n n n y
Solaris2.8 32 n x n n n y
- IA-64 n n n n n y
+ IA-64 n n n n n y
IRIX6.5 n x y n n y
IRIX64_6.5 64 n x y n y y
IRIX64_6.5 32 n x y n y y
@@ -6890,11 +6892,11 @@ Supported Configuration Features Summary
Footnotes: (1) Using mpich.
(2) Using mpt and mpich.
- (3) When configured with static-exec enabled, tests fail
+ (3) When configured with static-exec enabled, tests fail
in serial mode.
(4) No HDF4-related tools.
(5) Shared libraries are provided only for the C library.
- (6) Exception of (5): DLL is available for C++ API on Windows
+ (6) Exception of (5): DLL is available for C++ API on Windows
Known Problems
@@ -6903,11 +6905,11 @@ Known Problems
* Datasets or attributes which have a variable-length string datatype are
not printing correctly with h5dump and h5ls.
- * When a dataset with the variable-legth datatype is overwritten,
- the library can develop memory leaks that cause the file to become
+ * When a dataset with the variable-legth datatype is overwritten,
+ the library can develop memory leaks that cause the file to become
unnecessarily large. This is planned to be fixed in the next release.
- * On the SV1, the h5ls test fails due to a difference between the
+ * On the SV1, the h5ls test fails due to a difference between the
SV1 printf precision and the printf precision on other platforms.
@@ -6919,11 +6921,11 @@ Known Problems
* The --enable-static-exec configure flag fails to compile for HP-UX
11.00 platforms.
- * The executables are always dynamic on IRIX64 6.5(64 and n32) and
+ * The executables are always dynamic on IRIX64 6.5(64 and n32) and
IRIX 6.5 even if they are configured with --enable-static-exec.
* IRIX 6.5 fails to compile if configured with --enable-static-exec.
-
+
* The HDF5_MPI_OPT_TYPES optimization code in the parallel HDF5 will cause
a hang in some cases when chunked storage is used. This is now set to
be off by default. One may turn it on by setting environment variable
@@ -6931,12 +6933,12 @@ Known Problems
* On IA64 systems one has to use -DIA64 compilation flag to compile
h4toh5 and h5toh4 utilites. After configuration step manually modify
- Makefile in the tools/h4toh4 and tools/h5toh4 directories to add
+ Makefile in the tools/h4toh4 and tools/h5toh4 directories to add
-DIA64 to the compilation flags.
- * On IA32 ansd IA64 systems, if you use a compiler other than GCC
+ * On IA32 ansd IA64 systems, if you use a compiler other than GCC
(such as Intel's ecc compiler), you will need to modify the generated
- "libtool" program after configuration is finished. On or around line 102
+ "libtool" program after configuration is finished. On or around line 102
of the libtool file, there are lines which look like:
# How to pass a linker flag through the compiler.
@@ -6950,7 +6952,7 @@ Known Problems
%%%%1.4.2%%%% Release Information for hdf5-1.4.2 (31/July/01)
-10. Release Information for hdf5-1.4.2
+10. Release Information for hdf5-1.4.2
=================================================================
@@ -6966,7 +6968,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -6997,33 +6999,33 @@ New Features
* Parallel HDF5 now runs on the HP V2500 and HP N4000 machines.
* F90 API:
- Added aditional parameter "dims" to the h5dread_f/h5dwrite_f and
- h5aread_f/h5awrite_f subroutines. This parameter is a 1-D array
- of size 7 and contains the sizes of the data buffer dimensions.
+ h5aread_f/h5awrite_f subroutines. This parameter is a 1-D array
+ of size 7 and contains the sizes of the data buffer dimensions.
This change enables portability between Windows and UNIX platforms.
- In previous versions of the F90 APIs, the data buffer parameters of
- the above functions were declared as assumed-shape arrays, which
- were passed to the C functions by a descriptor. There is no
- portable means, however, of passing descriptors from F90 to C,
+ In previous versions of the F90 APIs, the data buffer parameters of
+ the above functions were declared as assumed-shape arrays, which
+ were passed to the C functions by a descriptor. There is no
+ portable means, however, of passing descriptors from F90 to C,
causing portability problems between Windows and UNIX and among
UNIX platforms. With this change, the data buffers are assumed-
size arrays, which can be portably passed to the C functions.
- * F90 static library is available on Windows platforms.
+ * F90 static library is available on Windows platforms.
See INSTALL_Windows_withF90.txt for details.
* F90 APIs are available on HPUX 11.00 and 10.20 and IBM SP platforms.
- * H5 <-> GIF convertor has been added. This is available under
+ * H5 <-> GIF convertor has been added. This is available under
tools/gifconv. The convertor supports the ability to create animated
gifs as well.
* Verified correct operation of library on Solaris 2.8 in both 64-bit and
32-bit compilation modes. See INSTALL document for instructions on
compiling the distribution with 64-bit support.
- * Added support for the Metrowerks Code Warrior compiler for Windows.
+ * Added support for the Metrowerks Code Warrior compiler for Windows.
* For H4->H5 converter utility, added a new option to choose not to convert
HDF4 specified attributes(reference number, class) into HDF5 attributes.
- * Added support chunking and compression in SDS and image in H4->H5 converter.
- Currently HDF5 only supports gzip compression, so by default an HDF4 file
- with any other compression method will be converted into an HDF5 file in
- gzip compression.
- * correct the order or reading HDF4 image array in H4->H5 conversion.
+ * Added support chunking and compression in SDS and image in H4->H5 converter.
+ Currently HDF5 only supports gzip compression, so by default an HDF4 file
+ with any other compression method will be converted into an HDF5 file in
+ gzip compression.
+ * correct the order or reading HDF4 image array in H4->H5 conversion.
* Added new parallel hdf5 tests in t_mpi. The new test checks if the
filesystem or the MPI-IO can really handle greater than 2GB files.
If it fails, it prints information message only without failing the
@@ -7038,8 +7040,8 @@ New Features
* Added new checking in H5check_version() to verify the five HDF5 version
information macros (H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
H5_VERS_SUBRELEASE and H5_VERS_INFO) are consistent.
-
-
+
+
Bug Fixes since HDF5-1.4.1 Release
==================================
@@ -7048,21 +7050,21 @@ Bug Fixes since HDF5-1.4.1 Release
* Fixed problems with Pablo build and linking with non-standard MPI I/O.
* Fixed build on Linux systems with --enable-static-exec flag. It now
works correctly.
- * IMPORTANT: Fixed file metadata corruption bug which could cause
+ * IMPORTANT: Fixed file metadata corruption bug which could cause
metadata data loss in certain situations.
* The allocation by alignment (H5Pset_alignment) feature code somehow
got dropped in some 1.3.x version. Re-implemented it with "new and
improved" algorithm. It keeps track of "wasted" file-fragment in
the free-list too.
* Removed limitation that the data transfer buffer size needed to be
- set for datasets whose dimensions were too large for the 'all'
- selection code to handle. Any size dimensioned datasets should be
+ set for datasets whose dimensions were too large for the 'all'
+ selection code to handle. Any size dimensioned datasets should be
handled correctly now.
* Changed behavior of H5Tget_member_type to correctly emulate HDF5 v1.2.x
when --enable-hdf5v1_2 configure flag is enabled.
- * Added --enable-linux-lfs flag to allow more control over whether to
+ * Added --enable-linux-lfs flag to allow more control over whether to
enable or disable large file support on Linux.
- * Fixed various bugs releated to SDS dimensional scale conversions in H4->H5
+ * Fixed various bugs releated to SDS dimensional scale conversions in H4->H5
converter.
* Fixed a bug to correctly convert HDF4 objects with fill value into HDF5.
* Fixed a bug of H5pubconf.h causing repeated definitions if it is included
@@ -7080,18 +7082,18 @@ Documentation
=============
* The H5T_conv_t and H5T_cdata_t structures are now properly defined
- in the H5Tregister entry in the "H5T" section of the "HDF5 Reference
- Manual" and described in detail in section 12, "Data Conversions," in
+ in the H5Tregister entry in the "H5T" section of the "HDF5 Reference
+ Manual" and described in detail in section 12, "Data Conversions," in
the "Datatypes" chapter of the "HDF5 User's Guide."
* The new tools h52gif and gif2h5 have been added to the "Tools" section
of the Reference Manual.
- * A "Freespace Management" section has been added to the "Performance"
+ * A "Freespace Management" section has been added to the "Performance"
chapter of the User's Guide.
* Several user-reported bugs have been fixed since Release 1.4.1.
* The "HDF5 Image and Palette Specification" (in the "HDF5 Application
- Developer's Guide") has been heavily revised. Based on extensive user
- feedback and input from visualization software developers, Version 1.2
- of the image specification is substantially different from prior
+ Developer's Guide") has been heavily revised. Based on extensive user
+ feedback and input from visualization software developers, Version 1.2
+ of the image specification is substantially different from prior
versions.
@@ -7106,15 +7108,15 @@ Platforms Tested
xlf 7.1.0.2
poe 2.4.0.14 (includes mpi)
Cray T3E sn6711 2.0.5.49a Cray Standard C Version 6.5.0.1
- Cray SV1 10.0.0.2 Cray Standard C Version 6.5.0.1
+ Cray SV1 10.0.0.2 Cray Standard C Version 6.5.0.1
Cray Fortran Version 3.5.0.1
FreeBSD 4.3 gcc 2.95.3
g++ 2.95.3
HP-UX B.10.20 HP C HP92453-01 A.10.32.30
HP F90 v2.3
- HP-UX B.11.00 HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 HP C HP92453-01 A.11.01.20
HP F90 v2.4
- HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
+ HP-UX B.11.00 SysV HP C HP92453-01 A.11.01.20
HP F90 v2.4
IRIX 6.5 MIPSpro cc 7.30
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1.2m
@@ -7126,19 +7128,19 @@ Platforms Tested
pgf90 3.2-4
OSF1 V4.0 DEC-V5.2-040 on Digital UNIX V4.0 (Rev 564)
Digital Fortran 90 V4.1-270
- SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.6) WorkShop Compilers 5.0 98/10/25 FORTRAN 90
+ SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
+ (Solaris 2.6) WorkShop Compilers 5.0 98/10/25 FORTRAN 90
2.0 Patch 107356-04
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.7) Workshop Compilers 5.0 98/12/15 C++ 5.0
+ (Solaris 2.7) Workshop Compilers 5.0 98/12/15 C++ 5.0
Workshop Compilers 5.0 98/10/25 FORTRAN 90
- 2.0 Patch 107356-04
+ 2.0 Patch 107356-04
SunOS 5.8/32 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
2000/09/11
Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
SunOS 5.8/64 Sun WorkShop 6 update 1 C 5.2 2000/09/11
- (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
+ (Solaris 2.8) Sun WorkShop 6 update 1 Fortran 95 6.1
2000/09/11
Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
TFLOPS r1.0.4 v4.0.7 i386 pgcc Rel 3.1-4i with mpich-1.2.1 with
@@ -7189,7 +7191,7 @@ Supported Configuration Features Summary
Linux 2.4 y y (1) n n y y y y
- Platform 1.2 static- Thread- SRB GASS STREAM-
+ Platform 1.2 static- Thread- SRB GASS STREAM-
compatibility exec safe VFD
Solaris2.6 y x n n n y
Solaris2.7 y x y n n y
@@ -7218,7 +7220,7 @@ Supported Configuration Features Summary
Footnotes: (1) Using mpich.
(2) Using mpt and mpich.
- (3) When configured with static-exec enabled, tests fail
+ (3) When configured with static-exec enabled, tests fail
in serial mode.
(4) No HDF4-related tools.
(5) Shared libraries are provided only for the C library.
@@ -7227,11 +7229,11 @@ Supported Configuration Features Summary
Known Problems
==============
- * When a dataset with the variable-legth datatype is overwritten,
- the library can develop memory leaks that cause the file to become
+ * When a dataset with the variable-legth datatype is overwritten,
+ the library can develop memory leaks that cause the file to become
unnecessarily large. This is planned to be fixed in the next release.
- * On the SV1, the h5ls test fails due to a difference between the
+ * On the SV1, the h5ls test fails due to a difference between the
SV1 printf precision and the printf precision on other platforms.
* The h5dump tests may fail to match the expected output in some
@@ -7242,13 +7244,13 @@ Known Problems
* The --enable-static-exec configure flag fails to compile for HP-UX
11.00 platforms.
- * The executables are always dynamic on IRIX64 6.5(64 and n32) and
+ * The executables are always dynamic on IRIX64 6.5(64 and n32) and
IRIX 6.5 even if they are configured with --enable-static-exec.
* IRIX 6.5 fails to compile if configured with --enable-static-exec.
-
+
* For 24-bit image conversion from H4->H5, the current conversion is
- not consistent with HDF5 image specification.
+ not consistent with HDF5 image specification.
* In some cases, and SDS with an UNLIMITED dimension that has not
been written (current size = 0) is not converted correctly.
@@ -7267,7 +7269,7 @@ Known Problems
=====================================================================
-
+
HDF5 Release 1.4.1
@@ -7283,7 +7285,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -7305,10 +7307,10 @@ New Features
============
* XML output option for h5dump utility.
-
+
A new option --xml to output data in XML format has been added. The
XML output contains a complete description of the file, marked up in
- XML.
+ XML.
The XML conforms to the HDF5 Document Type Definition (DTD), which
is available at:
@@ -7351,25 +7353,25 @@ Bug Fixes since HDF5-1.4.0 Release
Documentation
=============
- PDF and Postscript versions of the following documents are available
+ PDF and Postscript versions of the following documents are available
for this release:
Document Filename
-------- --------
Introduction to HDF5 H5-R141-Introduction.pdf
- HDF5 Reference Manual H5-R141-RefManual.pdf
+ HDF5 Reference Manual H5-R141-RefManual.pdf
C++ APIs to HDF5 documents H5-R141-Cplusplus.pdf
Fortran90 APIs to HDF5 documents H5-R141-Fortran90.pdf
PDF and Postscript files containing H5-R141-DocSet.pdf
all of the above H5-R141-DocSet.ps
- These files are not included in this distribution, but are available
+ These files are not included in this distribution, but are available
via the Web or FTP at the following locations:
http://hdf.ncsa.uiuc.edu/HDF5/doc/PSandPDF/
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/docs/
- While these documents are labeled Release 1.4.1, they describe
- Release 1.4.0 as well.
+ While these documents are labeled Release 1.4.1, they describe
+ Release 1.4.0 as well.
Platforms Tested
@@ -7390,8 +7392,8 @@ Due to the nature of this release only C, C++ libraries and tools were tested.
g++ 2.95.2
OSF1 V4.0 DEC-V5.2-040
Digital Fortran 90 V4.1-270
- SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
- (Solaris 2.6)
+ SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
+ (Solaris 2.6)
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
(Solaris 2.7) Workshop Compilers 5.0 98/12/15 C++ 5.0
@@ -7417,11 +7419,11 @@ Known Problems
* The --enable-static-exec configure flag fails to compile for HP-UX
11.00 platforms.
- * The executable are always dynamic on IRIX64 6.5(64 and n32) and
+ * The executable are always dynamic on IRIX64 6.5(64 and n32) and
IRIX 6.5 even if they are configured with --enable-static-exec.
* The shared library failed compilation on IRIX 6.5.
-
+
* After "make install" or "make install-doc" one may need to reload the source
from the tar file before doing another build.
@@ -7432,7 +7434,7 @@ Known Problems
8. Release Information for hdf5-1.4.0
===================================================================
-
+
HDF5 Release 1.4.0
@@ -7449,7 +7451,7 @@ The HDF5 documentation can be found on the NCSA ftp server
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -7460,11 +7462,11 @@ If you have any questions or comments, please send them to:
CONTENTS
- New Features
-- h4toh5 Utility
+- h4toh5 Utility
- F90 Support
- C++ Support
-- Pablo Support
-- Bug Fixes since HDF5-1.2.0
+- Pablo Support
+- Bug Fixes since HDF5-1.2.0
- Bug Fixes since HDF5-1.4.0-beta2
- Bug Fixes since HDF5-1.4.0
- Documentation
@@ -7493,15 +7495,15 @@ New Features
* Added new Virtual File Driver, Stream VFD, to send/receive entire
HDF5 files via socket connections.
* As parts of VFL, HDF-GASS and HDF-SRB are also added to this
- release. To find out details, please read INSTALL_VFL file.
+ release. To find out details, please read INSTALL_VFL file.
* Increased maximum number of dimensions for a dataset (H5S_MAX_RANK)
from 31 to 32 to align with HDF4 & netCDF.
* Added 'query' function to VFL drivers. Also added 'type' parameter to
VFL 'read' & 'write' calls, so they are aware of the type of data
being accessed in the file. Updated the VFL document also.
* A new h4toh5 utility, to convert HDF4 files to analogous HDF5 files.
- * Added a new array datatype to the datatypes which can be created.
- Removed "array fields" from compound datatypes (use an array datatype
+ * Added a new array datatype to the datatypes which can be created.
+ Removed "array fields" from compound datatypes (use an array datatype
instead).
* Parallel HDF5 works correctly with mpich-1.2.1 on Solaris, SGI, Linux.
* You can now install the HDF5 documentation using the
@@ -7512,26 +7514,26 @@ New Features
Check doc/html/TechNotes/openmp-hdf5.html for details.
-h4toh5 Utility
+h4toh5 Utility
==============
- The h4toh5 utility is a new utility that converts an HDF4 file to an
- HDF5 file. For details, see the document, "Mapping HDF4 Objects to
+ The h4toh5 utility is a new utility that converts an HDF4 file to an
+ HDF5 file. For details, see the document, "Mapping HDF4 Objects to
HDF5 Objects":
http://hdf.ncsa.uiuc.edu/HDF5/papers/H4-H5MappingGuidelines.pdf
Known Bugs:
The h4toh5 utility produces images that do not correctly conform
- to the HDF5 Image and Palette Specification.
+ to the HDF5 Image and Palette Specification.
http://hdf.ncsa.uiuc.edu/HDF5/doc/ImageSpec.html
- Several required HDF5 attributes are omitted, and the dataspace
- is reversed (i.e., the ht. and width of the image dataset is
+ Several required HDF5 attributes are omitted, and the dataspace
+ is reversed (i.e., the ht. and width of the image dataset is
incorrectly described.) For more information, please see:
http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.html
-
+
This bug has been fixed for the snapshot of hdf5 1.4 release. March 12th,2001
Known Limitations of the h4toh5 release
@@ -7553,7 +7555,7 @@ h4toh5 Utility
be an H5T_INTEGER type.
* For attributes of any HDF4 object, data of type 'DFNT_CHAR8'
will be converted to an HDF5 'H5T_STRING' type.
- * For an HDF4 Vdata, it is difficult to determine whether data
+ * For an HDF4 Vdata, it is difficult to determine whether data
of type 'DFNT_CHAR8' is intended to be bytes or characters. The
h4toh5 utility will consider them to be C characters, and will
convert them to an HDF5 'H5T_STRING' type.
@@ -7567,10 +7569,10 @@ h4toh5 Utility
with analogous chunked storage.
An HDF4 object that uses compression will be converted to an
- uncompressed HDF5 object.
+ uncompressed HDF5 object.
An HDF4 object that uses external storage will be converted to an
- HDF5 object without external storage.
+ HDF5 object without external storage.
4. Memory Use
@@ -7587,29 +7589,29 @@ h4toh5 Utility
The h4toh5 utility requires HDF5-1.4.0 and HDF4r1.4
- h4toh5 utility has been tested on all platforms listed below (see
+ h4toh5 utility has been tested on all platforms listed below (see
section "Platforms Tested") except TFLOPS.
-
+
F90 Support
===========
- This is the first release of the HDF5 Library with fully integrated
- F90 API support. The Fortran Library is created when the
+ This is the first release of the HDF5 Library with fully integrated
+ F90 API support. The Fortran Library is created when the
--enable-fortran flag is specified during configuration.
- Not all F90 subroutines are implemented. Please refer to the HDF5
+ Not all F90 subroutines are implemented. Please refer to the HDF5
Reference Manual for more details.
-
- F90 APIs are available for the Solaris 2.6 and 2.7, Linux, DEC UNIX,
- T3E, SV1 and O2K (64 bit option only) platforms. The Parallel version of
+
+ F90 APIs are available for the Solaris 2.6 and 2.7, Linux, DEC UNIX,
+ T3E, SV1 and O2K (64 bit option only) platforms. The Parallel version of
the HDF5 F90 Library is supported on the O2K and T3E platforms.
Changes since the last prototype release (July 2000)
----------------------------------------------------
- * h5open_f and h5close_f must be called instead of h5init_types and
+ * h5open_f and h5close_f must be called instead of h5init_types and
h5close_types.
- * The following subroutines are no longer available:
+ * The following subroutines are no longer available:
h5pset_xfer_f
h5pget_xfer_f
@@ -7623,45 +7625,45 @@ F90 Support
h5pget_core_f
h5pset_family_f
h5pget_family_f
-
+
* The following functions have been added:
h5pset_fapl_mpio_f
h5pget_fapl_mpio_f
h5pset_dxpl_mpio_f
h5pget_dxpl_mpio_f
-
- * In the previous HDF5 F90 releases, the implementation of object
- references and dataset region references was not portable. This
- release introduces a portable implementation, but it also introduces
- changes to the read/write APIs that handle references. If object or
- dataset region references are written or read to/from an HDF5 file,
- h5dwrite_f and h5dread_f must use the extra parameter, n, for the
+
+ * In the previous HDF5 F90 releases, the implementation of object
+ references and dataset region references was not portable. This
+ release introduces a portable implementation, but it also introduces
+ changes to the read/write APIs that handle references. If object or
+ dataset region references are written or read to/from an HDF5 file,
+ h5dwrite_f and h5dread_f must use the extra parameter, n, for the
buffer size:
h5dwrite(read)_f(dset_id, mem_type_id, buf, n, hdferr, &
- ^^^
+ ^^^
mem_space_id, file_space_id, xfer_prp)
- For other datatypes the APIs were not changed.
-
-
+ For other datatypes the APIs were not changed.
+
+
C++ Support
===========
- This is the first release of the HDF5 Library with fully integrated
+ This is the first release of the HDF5 Library with fully integrated
C++ API support. The HDF5 C++ library is built when the --enable-cxx
flag is specified during configuration.
Check the HDF5 Reference Manual for available C++ documentation.
- C++ APIs are available for Solaris 2.6 and 2.7, Linux, and FreeBSD.
+ C++ APIs are available for Solaris 2.6 and 2.7, Linux, and FreeBSD.
Pablo Support
=============
This version does not allow proper building of the Pablo-instrumented
version of the library. A version supporting the pablo build is
- available on the Pablo Website at
+ available on the Pablo Website at
www-pablo.cs.uiuc.edu/pub/Pablo.Release.5/HDFLibrary/hdf5_v1.4.tar.gz
@@ -7722,7 +7724,7 @@ Library
Configuration
-------------
* The hdf5.h include file was fixed to allow the HDF5 Library to be
- compiled with other libraries/applications that use GNU autoconf.
+ compiled with other libraries/applications that use GNU autoconf.
* Configuration for parallel HDF5 was improved. Configure now attempts
to link with libmpi.a and/or libmpio.a as the MPI libraries by
default. It also uses "mpirun" to launch MPI tests by default. It
@@ -7772,14 +7774,14 @@ Tools
* h5dump correctly displays the committed copy of predefined types
correctly.
* Added an option, -V, to show the version information of h5dump.
- * Fixed a core dumping bug of h5toh4 when executed on platforms like
+ * Fixed a core dumping bug of h5toh4 when executed on platforms like
TFLOPS.
* The test script for h5toh4 used to not able to detect the hdp
dumper command was not valid. It now detects and reports the
failure of hdp execution.
* Merged the tools with the 1.2.2 branch. Required adding new
macros, VERSION12 and VERSION13, used in conditional compilation.
- Updated the Windows project files for the tools.
+ Updated the Windows project files for the tools.
* h5dump displays opaque and bitfield data correctly.
* h5dump and h5ls can browse files created with the Stream VFD
(eg. "h5ls <hostname>:<port>").
@@ -7792,10 +7794,10 @@ Tools
Bug Fixes since HDF5-1.4.0-beta2
================================
- * Fixed a bug in the conversion from a little endian double to a big
+ * Fixed a bug in the conversion from a little endian double to a big
endian float in some special cases.
- * Corrected configuration error which was not including compression
- support correctly.
+ * Corrected configuration error which was not including compression
+ support correctly.
* Cleaned up lots of warnings.
* Changed a few h5dump command line switches and added long versions of
the switches.
@@ -7804,7 +7806,7 @@ Bug Fixes since HDF5-1.4.0-beta2
* Fixed fairly obscure bug in hyperslab I/O which could (in rare cases)
not copy all the data during a transfer.
* Removed ragged array code from library.
- * F90 library and module files are installed properly now on all supported
+ * F90 library and module files are installed properly now on all supported
platforms.
@@ -7820,26 +7822,26 @@ Bug Fixes since HDF5-1.4.0 Release
Documentation
=============
- * A new document summarizing the changes in the library leading up to
- the current release has been added:
+ * A new document summarizing the changes in the library leading up to
+ the current release has been added:
HDF5 Software Changes from Release to Release
- This document is in the Application Developer's Guide and is of
- particular interest to developers who must keep an application
+ This document is in the Application Developer's Guide and is of
+ particular interest to developers who must keep an application
synchronized with the library.
* The documentation for the Fortran90 and C++ APIs is linked to the
- opening page of the Reference Manual. Fortran90 functions are
+ opening page of the Reference Manual. Fortran90 functions are
individually referenced from the corresponding C functions through-
out the Reference Manual.
- * User's Guide and Reference Manual were updated to reflect changed
- function syntax and to fix reported bugs.
- * Functions that are new at this release were added to the Reference
- Manual.
- * Functions that have been removed from the library were removed from
+ * User's Guide and Reference Manual were updated to reflect changed
+ function syntax and to fix reported bugs.
+ * Functions that are new at this release were added to the Reference
+ Manual.
+ * Functions that have been removed from the library were removed from
the User's Guide and the Reference Manual.
- * PostScript and PDF versions of the Release 1.4 document set are
+ * PostScript and PDF versions of the Release 1.4 document set are
not available at the time of Release 1.4.0.
-
+
Platforms Tested
================
AIX 4.3.3.0 (IBM SP powerpc) xlc 3.6.6
@@ -7863,7 +7865,7 @@ Platforms Tested
mpich-1.2.1
OSF1 V4.0 DEC-V5.2-040
Digital Fortran 90 V4.1-270
- SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
+ SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
(Solaris 2.6) WorkShop Compilers 5.0 99/10/25 Fortran 90
2.0 Patch 107356-04
Workshop Compilers 5.0 98/12/15 C++ 5.0
@@ -7872,7 +7874,7 @@ Platforms Tested
2.0 Patch 107356-04
Workshop Compilers 5.0 98/12/15 C++ 5.0
mpich-1.2.1
- SunOS 5.5.1 gcc-2.7.2
+ SunOS 5.5.1 gcc-2.7.2
(Solaris 2.5.1 (x86))
TFLOPS r1.0.4 v4.0 mpich-1.2.1 with local changes
Windows NT4.0, 2000 (NT5.0) MSVC++ 6.0
@@ -7929,17 +7931,17 @@ Supported Configuration Features Summary
Footnotes: (1) Using mpich.
(2) Using mpt and mpich.
- (3) When configured with static-exec enabled, tests fail
+ (3) When configured with static-exec enabled, tests fail
in serial mode.
(4) No HDF4-related tools.
Known Problems
==============
- * The stream-vfd test uses ip port 10007 for testing. If another
- application is already using that port address, the test will hang
- indefinitely and has to be terminated by the kill command. To try the
- test again, change the port address in test/stream_test.c to one not
+ * The stream-vfd test uses ip port 10007 for testing. If another
+ application is already using that port address, the test will hang
+ indefinitely and has to be terminated by the kill command. To try the
+ test again, change the port address in test/stream_test.c to one not
being used in the host.
* The --enable-static-exec configure flag fails to compile for Solaris
@@ -7948,7 +7950,7 @@ Known Problems
The --enable-static-exec configure flag also fails to correctly compile
on Linux platforms using the gcc-2.95.2 compiler.
-
+
The --enable-static-exec configure flag also fails to correctly compile
on IBM SP2 platform for the serial mode. The parallel mode works fine
with this option.
@@ -7957,7 +7959,7 @@ Known Problems
The executable files in hdf5/bin are dynamic-linked for IRIX64 6.5(64 and
n32 modes) and IRIX 6.5, even though they are compiled with static library.
-
+
It is suggested that you don't use this option on these platforms
during configuration.
@@ -7969,10 +7971,10 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
- * SunOS 5.6 with C WorkShop Compilers 4.2: Hyperslab selections will
+ * SunOS 5.6 with C WorkShop Compilers 4.2: Hyperslab selections will
fail if library is compiled using optimization of any level.
* When building hdf5 tools and applications on windows platform, a linking
@@ -7980,8 +7982,8 @@ Known Problems
on debug version when running VC++6.0. This warning doesn't affect building
and testing hdf5 applications. We will continue investigating this.
- * h5toh4 converter fails two cases(tstr.h5 and tmany.h5) for release dll
- version on windows 2000 and NT. The reason is possibly due to Windows NT
+ * h5toh4 converter fails two cases(tstr.h5 and tmany.h5) for release dll
+ version on windows 2000 and NT. The reason is possibly due to Windows NT
DLL convention on freeing memory. It seems that memory cannot be freed
across library or DLL. It is still under investigation.
@@ -7989,7 +7991,7 @@ Known Problems
the configured with --with-gass.
* HDF-SRB testing got segmentation error on Solaris 2.7.
-
+
* The Stream VFD was not tested yet under Windows.
It is not supported in the TFLOPS machine.
@@ -8004,7 +8006,7 @@ Known Problems
* Certain platforms give false negatives when testing h5ls:
- Solaris x86 2.5.1, Cray T3E and Cray J90 give errors during testing
- when displaying object references in certain files. These are benign
+ when displaying object references in certain files. These are benign
differences due to the difference in sizes of the objects created on
those platforms. h5ls appears to be dumping object references
correctly.
@@ -8013,18 +8015,18 @@ Known Problems
different precision in the values displayed and h5ls appears to be
dumping floating-point numbers correctly.
- * Before building HDF5 F90 Library from source on Crays (T3E and SV1)
- replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
- subdirectory in the top level directory with the Cray-specific files from
+ * Before building HDF5 F90 Library from source on Crays (T3E and SV1)
+ replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src
+ subdirectory in the top level directory with the Cray-specific files from
the ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/hdf5-1.4.0/src/crayf90/ directory.
* The h4toh5 utility produces images that do not correctly conform
- to the HDF5 Image and Palette Specification.
+ to the HDF5 Image and Palette Specification.
http://hdf.ncsa.uiuc.edu/HDF5/doc/ImageSpec.html
- Several required HDF5 attributes are omitted, and the dataspace
- is reversed (i.e., the ht. and width of the image dataset is
+ Several required HDF5 attributes are omitted, and the dataspace
+ is reversed (i.e., the ht. and width of the image dataset is
incorrectly described.) For more information, please see:
http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.htm
@@ -8035,17 +8037,17 @@ Known Problems
=================================================================
INTRODUCTION
-This document describes the differences between HDF5-1.2.1 and
+This document describes the differences between HDF5-1.2.1 and
HDF5-1.2.2, and contains information on the platforms where HDF5-1.2.2
-was tested and known problems in HDF5-1.2.2.
+was tested and known problems in HDF5-1.2.2.
-The HDF5 documentation can be found on the NCSA ftp server
+The HDF5 documentation can be found on the NCSA ftp server
(ftp.ncsa.uiuc.edu) in the directory:
/HDF/HDF5/docs/
For more information look at the HDF5 home page at:
-
+
http://hdf.ncsa.uiuc.edu/HDF5/
If you have any questions or comments, please send them to:
@@ -8055,7 +8057,7 @@ If you have any questions or comments, please send them to:
CONTENTS
-- Features Added since HDF5-1.2.1
+- Features Added since HDF5-1.2.1
- Bug Fixes since HDF5-1.2.1
- Known Problems
- Platforms Tested
@@ -8106,10 +8108,10 @@ Bug Fixes since HDF5-1.2.1
Known Problems
==============
-o SunOS 5.6 with C WorkShop Compilers 4.2: hyperslab selections will
+o SunOS 5.6 with C WorkShop Compilers 4.2: hyperslab selections will
fail if library is compiled using optimization of any level.
o TFLOPS: dsets test fails if compiled with optimization turned on.
-o J90: tools fail to dispay data for the datasets with a compound datatype.
+o J90: tools fail to dispay data for the datasets with a compound datatype.
Platforms Tested
================
@@ -8123,13 +8125,13 @@ Platforms Tested
mpt.1.3
FreeBSD 4.0 gcc 2.95.2
HP-UX B.10.20 HP C HP92453-01 A.10.32
- HP-UX B.11.00 HP92453-01 A.11.00.13 HP C Compiler
- (static library only, h5toh4 tool is not available)
+ HP-UX B.11.00 HP92453-01 A.11.00.13 HP C Compiler
+ (static library only, h5toh4 tool is not available)
IRIX 6.5 MIPSpro cc 7.30
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1m
mpt.1.4
- Linux 2.2.10 SMP gcc 2.95.1
+ Linux 2.2.10 SMP gcc 2.95.1
mpicc(gcc-2.95.1)
gcc (egcs-2.91.66)
mpicc (egcs-2.91.66)
@@ -8160,7 +8162,7 @@ Configuration
-------------
* The hdf5.h include file was fixed to allow the HDF5 Library to be compiled
- with other libraries/applications that use GNU autoconf.
+ with other libraries/applications that use GNU autoconf.
* Configuration for parallel HDF5 was improved. Configure now attempts to
link with libmpi.a and/or libmpio.a as the MPI libraries by default.
It also uses "mpirun" to launch MPI tests by default. It tests to
@@ -8193,7 +8195,7 @@ Tools
------
* Added an option, -V, to show the version information of h5dump.
- * Fixed a core dumping bug of h5toh4 when executed on platforms like
+ * Fixed a core dumping bug of h5toh4 when executed on platforms like
TFLOPS.
* The test script for h5toh4 used to not able to detect the hdp
dumper command was not valid. It now detects and reports the
@@ -8202,10 +8204,10 @@ Tools
Documentation
-------------
- * User's Guide and Reference Manual were updated.
- See doc/html/PSandPDF/index.html for more details.
+ * User's Guide and Reference Manual were updated.
+ See doc/html/PSandPDF/index.html for more details.
+
-
Platforms Tested:
================
Note: Due to the nature of bug fixes, only static versions of the library and tools were tested.
@@ -8222,7 +8224,7 @@ Note: Due to the nature of bug fixes, only static versions of the library and to
Linux 2.2.10 SuSE egcs-2.91.66 configured with
(i686-pc-linux-gnu) --disable-hsizet
- mpich-1.2.0 egcs-2.91.66 19990314/Linux
+ mpich-1.2.0 egcs-2.91.66 19990314/Linux
OSF1 V4.0 DEC-V5.2-040
SunOS 5.6 cc WorkShop Compilers 4.2 no optimization
@@ -8234,13 +8236,13 @@ Note: Due to the nature of bug fixes, only static versions of the library and to
Known Problems:
==============
-o SunOS 5.6 with C WorkShop Compilers 4.2: Hyperslab selections will
+o SunOS 5.6 with C WorkShop Compilers 4.2: Hyperslab selections will
fail if library is compiled using optimization of any level.
%%%%1.2.0%%%% Release Information for hdf5-1.2.0
-
+
5. Release Information for hdf5-1.2.0
===================================================================
@@ -8252,13 +8254,13 @@ applicable, are systems that HDF5 1.2.0 was tested on.
Compiler & libraries
Platform Information Comment
- -------- ---------- --------
-
+ -------- ---------- --------
+
AIX 4.3.2 (IBM SP) 3.6.6
Cray J90 10.0.0.6 cc 6.3.0.0
- Cray T3E 2.0.4.61 cc 6.2.1.0
+ Cray T3E 2.0.4.61 cc 6.2.1.0
mpt.1.3
FreeBSD 3.2 gcc 2.95.1
@@ -8266,30 +8268,30 @@ applicable, are systems that HDF5 1.2.0 was tested on.
HP-UX B.10.20 HP C HP92453-01 A.10.32
gcc 2.8.1
- IRIX 6.5 MIPSpro cc 7.30
+ IRIX 6.5 MIPSpro cc 7.30
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1m
- mpt.1.3 (SGI MPI 3.2.0.0)
+ mpt.1.3 (SGI MPI 3.2.0.0)
Linux 2.2.10 egcs-2.91.66 configured with
- --disable-hsizet
+ --disable-hsizet
lbraries: glibc2
OSF1 V4.0 DEC-V5.2-040
- SunOS 5.6 cc WorkShop Compilers 4.2
+ SunOS 5.6 cc WorkShop Compilers 4.2
no optimization
- gcc 2.8.1
+ gcc 2.8.1
SunOS 5.7 cc WorkShop Compilers 5.0
gcc 2.8.1
-
+
TFLOPS 2.7.1 cicc (pgcc Rel 3.0-4i)
- mpich-1.1.2 with local changes
+ mpich-1.1.2 with local changes
Windows NT4.0 intel MSVC++ 5.0 and 6.0
- Windows NT alpha 4.0 MSVC++ 5.0
+ Windows NT alpha 4.0 MSVC++ 5.0
Windows 98 MSVC++ 5.0
@@ -8304,7 +8306,7 @@ B. Known Problems
Hyperslab selections will fail if library is compiled using optimization
of any level.
-
+
C. Changes Since Version 1.0.1
---------------------------
@@ -8318,7 +8320,7 @@ C. Changes Since Version 1.0.1
* Self-contained documentation for installations isolated from the
Internet.
-* HDF5 Tutorial was added to the documentation
+* HDF5 Tutorial was added to the documentation
2. Configuration
-------------
@@ -8350,7 +8352,7 @@ C. Changes Since Version 1.0.1
* Optimizations to compound datatype conversions and I/O operations.
-* Added nearly 100 optimized conversion functions for native datatypes
+* Added nearly 100 optimized conversion functions for native datatypes
including support for non-aligned data.
* Added support for bitfield, opaque, and enumeration types.
@@ -8402,23 +8404,23 @@ C. Changes Since Version 1.0.1
* Improved the algorithm that translates an HDF5 hyperslab selection
into an MPI type for better collective I/O performance.
-8. New API functions
+8. New API functions
-----------------
a. Property List Interface:
------------------------
- H5Pset_xfer - set data transfer properties
- H5Pset_preserve - set dataset transfer property list status
+ H5Pset_xfer - set data transfer properties
+ H5Pset_preserve - set dataset transfer property list status
H5Pget_preserve - get dataset transfer property list status
H5Pset_hyper_cache - indicates whether to cache hyperslab blocks during I/O
- H5Pget_hyper_cache - returns information regarding the caching of
+ H5Pget_hyper_cache - returns information regarding the caching of
hyperslab blocks during I/O
- H5Pget_btree_ratios - sets B-tree split ratios for a dataset
+ H5Pget_btree_ratios - sets B-tree split ratios for a dataset
transfer property list
H5Pset_btree_ratios - gets B-tree split ratios for a dataset
transfer property list
- H5Pset_vlen_mem_manager - sets the memory manager for variable-length
+ H5Pset_vlen_mem_manager - sets the memory manager for variable-length
datatype allocation
H5Pget_vlen_mem_manager - sets the memory manager for variable-length
datatype allocation
@@ -8433,26 +8435,26 @@ C. Changes Since Version 1.0.1
c. Dataspace Interface:
--------------------
H5Sget_select_hyper_nblocks - get number of hyperslab blocks
- H5Sget_select_hyper_blocklist - get the list of hyperslab blocks
+ H5Sget_select_hyper_blocklist - get the list of hyperslab blocks
currently selected
- H5Sget_select_elem_npoints - get the number of element points
+ H5Sget_select_elem_npoints - get the number of element points
in the current selection
- H5Sget_select_elem_pointlist - get the list of element points
+ H5Sget_select_elem_pointlist - get the list of element points
currently selected
- H5Sget_select_bounds - gets the bounding box containing
+ H5Sget_select_bounds - gets the bounding box containing
the current selection
d. Datatype Interface:
-------------------
- H5Tget_super - return the base datatype from which a
+ H5Tget_super - return the base datatype from which a
datatype is derived
H5Tvlen_create - creates a new variable-length dataype
H5Tenum_create - creates a new enumeration datatype
H5Tenum_insert - inserts a new enumeration datatype member
- H5Tenum_nameof - returns the symbol name corresponding to a
+ H5Tenum_nameof - returns the symbol name corresponding to a
+ specified member of an enumeration datatype
+ H5Tvalueof - return the value corresponding to a
specified member of an enumeration datatype
- H5Tvalueof - return the value corresponding to a
- specified member of an enumeration datatype
H5Tget_member_value - return the value of an enumeration datatype member
H5Tset_tag - tags an opaque datatype
H5Tget_tag - gets the tag associated with an opaque datatype
@@ -8466,16 +8468,16 @@ C. Changes Since Version 1.0.1
H5Rcreate - creates a reference
H5Rdereference - open the HDF5 object referenced
H5Rget_region - retrieve a dataspace with the specified region selected
- H5Rget_object_type - retrieve the type of object that an
+ H5Rget_object_type - retrieve the type of object that an
object reference points to
g. Ragged Arrays (alpha) (names of those API functions were changed):
------------------------------------------------------------------
- H5RAcreate - create a new ragged array (old name was H5Rcreate)
- H5RAopen - open an existing array (old name was H5Ropen)
- H5RAclose - close a ragged array (old name was H5Rclose)
- H5RAwrite - write to an array (old name was H5Rwrite)
- H5RAread - read from an array (old name was H5Rread)
+ H5RAcreate - create a new ragged array (old name was H5Rcreate)
+ H5RAopen - open an existing array (old name was H5Ropen)
+ H5RAclose - close a ragged array (old name was H5Rclose)
+ H5RAwrite - write to an array (old name was H5Rwrite)
+ H5RAread - read from an array (old name was H5Rread)
9. Tools
@@ -8484,7 +8486,7 @@ C. Changes Since Version 1.0.1
* Enhancements to the h5ls tool including the ability to list objects
from more than one file, to display raw hexadecimal data, to
show file addresses for raw data, to format output more reasonably,
- to show object attributes, and to perform a recursive listing,
+ to show object attributes, and to perform a recursive listing,
* Enhancements to h5dump: support new data types added since previous
versions.
@@ -8494,7 +8496,7 @@ C. Changes Since Version 1.0.1
%%%%1.0.1%%%% Release Information for hdf5-1.0.1
-
+
4. Changes from Release 1.0.0 to Release 1.0.1
=====================================================================
@@ -8504,7 +8506,7 @@ C. Changes Since Version 1.0.1
* [Bug-Fix]: Configure failed for all IRIX versions other than 6.3.
It now configures correctly for all IRIX 6.x version.
-* Released Parallel HDF5
+* Released Parallel HDF5
Supported Features:
------------------
@@ -8524,7 +8526,7 @@ C. Changes Since Version 1.0.1
IBM SP2
SGI Origin 2000
- Changes In This Release:
+ Changes In This Release:
-----------------------
o Support of Access to Extendable Dimension Datasets.
@@ -8568,7 +8570,7 @@ C. Changes Since Version 1.0.1
====================================================================
* Added fill values for datasets. For contiguous datasets fill value
- performance may be quite poor since the fill value is written to the
+ performance may be quite poor since the fill value is written to the
entire dataset when the dataset is created. This will be remedied
in a future version. Chunked datasets using fill values do not
incur any additional overhead. See H5Pset_fill_value().
@@ -8619,17 +8621,17 @@ C. Changes Since Version 1.0.1
%%%%1.0.0 Alpha 2%%%% Release Information for hdf5-1.0.0 Alpha 2
-1. Changes from the First Alpha 1.0.0 Release to
+1. Changes from the First Alpha 1.0.0 Release to
the Second Alpha 1.0.0 Release
=====================================================================
* Two of the packages have been renamed. The data space API has been
- renamed from `H5P' to `H5S' and the property list (template) API has
+ renamed from `H5P' to `H5S' and the property list (template) API has
been renamed from `H5C' to `H5P'.
-* The new attribute API `H5A' has been added. An attribute is a small
+* The new attribute API `H5A' has been added. An attribute is a small
dataset which can be attached to some other object (for instance, a
- 4x4 transformation matrix attached to a 3-dimensional dataset, or an
+ 4x4 transformation matrix attached to a 3-dimensional dataset, or an
English abstract attached to a group).
* The error handling API `H5E' has been completed. By default, when an
@@ -8641,7 +8643,7 @@ C. Changes Since Version 1.0.1
* Support for large files and datasets (>2GB) has been added. There
is an html document that describes how it works. Some of the types
for function arguments have changed to support this: all arguments
- pertaining to sizes of memory objects are `size_t' and all arguments
+ pertaining to sizes of memory objects are `size_t' and all arguments
pertaining to file sizes are `hsize_t'.
* More data type conversions have been added although none of them are
@@ -8667,7 +8669,7 @@ C. Changes Since Version 1.0.1
* Data types can be stored in the file as independent objects and
multiple datasets can share a data type.
-* The raw data I/O stream has been implemented and the application can
+* The raw data I/O stream has been implemented and the application can
control meta and raw data caches, so I/O performance should be
improved from the first alpha release.
@@ -8679,14 +8681,14 @@ C. Changes Since Version 1.0.1
applications or I/O libraries and described and accessed through
HDF5.
-* Hard and soft (symbolic) links are implemented which allow groups to
+* Hard and soft (symbolic) links are implemented which allow groups to
share objects. Dangling and recursive symbolic links are supported.
* User-defined data compression is implemented although we may
generalize the interface to allow arbitrary user-defined filters
which can be used for compression, checksums, encryption,
performance monitoring, etc. The publicly-available `deflate'
- method is predefined if the GNU libz.a can be found at configuration
+ method is predefined if the GNU libz.a can be found at configuration
time.
* The configuration scripts have been modified to make it easier to
@@ -8696,7 +8698,7 @@ C. Changes Since Version 1.0.1
with the correct version of header files.
- Parallel HDF5 Changes
+ Parallel HDF5 Changes
* Parallel support for fixed dimension datasets with contiguous or
chunked storages. Also, support unlimited dimension datasets which
@@ -8722,245 +8724,245 @@ C. Changes Since Version 1.0.1
sizes.
- LIST OF API FUNCTIONS
+ LIST OF API FUNCTIONS
The following functions are implemented. Errors are returned if an
attempt is made to use some feature which is not implemented and
printing the error stack will show `not implemented yet'.
Library
- H5check - check that lib version matches header version
- H5open - initialize library (happens automatically)
- H5close - shut down the library (happens automatically)
- H5dont_atexit - don't call H5close on exit
- H5get_libversion - retrieve library version info
- H5check_version - check for specific library version
+ H5check - check that lib version matches header version
+ H5open - initialize library (happens automatically)
+ H5close - shut down the library (happens automatically)
+ H5dont_atexit - don't call H5close on exit
+ H5get_libversion - retrieve library version info
+ H5check_version - check for specific library version
Property Lists
- H5Pclose - release template resources
- H5Pcopy - copy a template
- H5Pcreate - create a new template
- H5Pget_chunk - get chunked storage properties
- H5Pset_chunk - set chunked storage properties
- H5Pget_class - get template class
- H5Pget_istore_k - get chunked storage properties
- H5Pset_istore_k - set chunked storage properties
- H5Pget_layout - get raw data layout class
- H5Pset_layout - set raw data layout class
- H5Pget_sizes - get address and size sizes
- H5Pset_sizes - set address and size sizes
- H5Pget_sym_k - get symbol table storage properties
- H5Pset_sym_k - set symbol table storage properties
- H5Pget_userblock - get user-block size
- H5Pset_userblock - set user-block size
- H5Pget_version - get file version numbers
- H5Pget_alignment - get data alignment properties
- H5Pset_alignment - set data alignment properties
+ H5Pclose - release template resources
+ H5Pcopy - copy a template
+ H5Pcreate - create a new template
+ H5Pget_chunk - get chunked storage properties
+ H5Pset_chunk - set chunked storage properties
+ H5Pget_class - get template class
+ H5Pget_istore_k - get chunked storage properties
+ H5Pset_istore_k - set chunked storage properties
+ H5Pget_layout - get raw data layout class
+ H5Pset_layout - set raw data layout class
+ H5Pget_sizes - get address and size sizes
+ H5Pset_sizes - set address and size sizes
+ H5Pget_sym_k - get symbol table storage properties
+ H5Pset_sym_k - set symbol table storage properties
+ H5Pget_userblock - get user-block size
+ H5Pset_userblock - set user-block size
+ H5Pget_version - get file version numbers
+ H5Pget_alignment - get data alignment properties
+ H5Pset_alignment - set data alignment properties
H5Pget_external_count- get count of external data files
- H5Pget_external - get information about an external data file
- H5Pset_external - add a new external data file to the list
- H5Pget_driver - get low-level file driver class
- H5Pget_stdio - get properties for stdio low-level driver
- H5Pset_stdio - set properties for stdio low-level driver
- H5Pget_sec2 - get properties for sec2 low-level driver
- H5Pset_sec2 - set properties for sec2 low-level driver
- H5Pget_core - get properties for core low-level driver
- H5Pset_core - set properties for core low-level driver
- H5Pget_split - get properties for split low-level driver
- H5Pset_split - set properties for split low-level driver
- H5P_get_family - get properties for family low-level driver
- H5P_set_family - set properties for family low-level driver
- H5Pget_cache - get meta- and raw-data caching properties
- H5Pset_cache - set meta- and raw-data caching properties
- H5Pget_buffer - get raw-data I/O pipe buffer properties
- H5Pset_buffer - set raw-data I/O pipe buffer properties
- H5Pget_preserve - get type conversion preservation properties
- H5Pset_preserve - set type conversion preservation properties
- H5Pget_nfilters - get number of raw data filters
- H5Pget_filter - get raw data filter properties
- H5Pset_filter - set raw data filter properties
- H5Pset_deflate - set deflate compression filter properties
- H5Pget_mpi - get MPI-IO properties
- H5Pset_mpi - set MPI-IO properties
- H5Pget_xfer - get data transfer properties
- + H5Pset_xfer - set data transfer properties
- + H5Pset_preserve - set dataset transfer property list status
+ H5Pget_external - get information about an external data file
+ H5Pset_external - add a new external data file to the list
+ H5Pget_driver - get low-level file driver class
+ H5Pget_stdio - get properties for stdio low-level driver
+ H5Pset_stdio - set properties for stdio low-level driver
+ H5Pget_sec2 - get properties for sec2 low-level driver
+ H5Pset_sec2 - set properties for sec2 low-level driver
+ H5Pget_core - get properties for core low-level driver
+ H5Pset_core - set properties for core low-level driver
+ H5Pget_split - get properties for split low-level driver
+ H5Pset_split - set properties for split low-level driver
+ H5P_get_family - get properties for family low-level driver
+ H5P_set_family - set properties for family low-level driver
+ H5Pget_cache - get meta- and raw-data caching properties
+ H5Pset_cache - set meta- and raw-data caching properties
+ H5Pget_buffer - get raw-data I/O pipe buffer properties
+ H5Pset_buffer - set raw-data I/O pipe buffer properties
+ H5Pget_preserve - get type conversion preservation properties
+ H5Pset_preserve - set type conversion preservation properties
+ H5Pget_nfilters - get number of raw data filters
+ H5Pget_filter - get raw data filter properties
+ H5Pset_filter - set raw data filter properties
+ H5Pset_deflate - set deflate compression filter properties
+ H5Pget_mpi - get MPI-IO properties
+ H5Pset_mpi - set MPI-IO properties
+ H5Pget_xfer - get data transfer properties
+ + H5Pset_xfer - set data transfer properties
+ + H5Pset_preserve - set dataset transfer property list status
+ H5Pget_preserve - get dataset transfer property list status
+ H5Pset_hyper_cache - indicates whether to cache hyperslab blocks during I/O
- + H5Pget_hyper_cache - returns information regarding the caching of
+ + H5Pget_hyper_cache - returns information regarding the caching of
hyperslab blocks during I/O
- + H5Pget_btree_ratios - sets B-tree split ratios for a dataset
+ + H5Pget_btree_ratios - sets B-tree split ratios for a dataset
transfer property list
+ H5Pset_btree_ratios - gets B-tree split ratios for a dataset
transfer property list
- + H5Pset_vlen_mem_manager - sets the memory manager for variable-length
+ + H5Pset_vlen_mem_manager - sets the memory manager for variable-length
datatype allocation
+ H5Pget_vlen_mem_manager - sets the memory manager for variable-length
datatype allocation
Datasets
- H5Dclose - release dataset resources
- H5Dcreate - create a new dataset
- H5Dget_space - get data space
- H5Dget_type - get data type
- H5Dget_create_plist - get dataset creation properties
- H5Dopen - open an existing dataset
- H5Dread - read raw data
- H5Dwrite - write raw data
- H5Dextend - extend a dataset
+ H5Dclose - release dataset resources
+ H5Dcreate - create a new dataset
+ H5Dget_space - get data space
+ H5Dget_type - get data type
+ H5Dget_create_plist - get dataset creation properties
+ H5Dopen - open an existing dataset
+ H5Dread - read raw data
+ H5Dwrite - write raw data
+ H5Dextend - extend a dataset
+ H5Diterate - iterate over all selected elements in a dataspace
+ H5Dget_storage_size - return the amount of storage required for a dataset
+ H5Dvlen_reclaim - reclaim VL datatype memory buffers
Attributes
- H5Acreate - create a new attribute
- H5Aopen_name - open an attribute by name
- H5Aopen_idx - open an attribute by number
- H5Awrite - write values into an attribute
- H5Aread - read values from an attribute
- H5Aget_space - get attribute data space
- H5Aget_type - get attribute data type
- H5Aget_name - get attribute name
- H5Anum_attrs - return the number of attributes for an object
- H5Aiterate - iterate over an object's attributes
- H5Adelete - delete an attribute
- H5Aclose - close an attribute
+ H5Acreate - create a new attribute
+ H5Aopen_name - open an attribute by name
+ H5Aopen_idx - open an attribute by number
+ H5Awrite - write values into an attribute
+ H5Aread - read values from an attribute
+ H5Aget_space - get attribute data space
+ H5Aget_type - get attribute data type
+ H5Aget_name - get attribute name
+ H5Anum_attrs - return the number of attributes for an object
+ H5Aiterate - iterate over an object's attributes
+ H5Adelete - delete an attribute
+ H5Aclose - close an attribute
Errors
- H5Eclear - clear the error stack
- H5Eprint - print an error stack
- H5Eget_auto - get automatic error reporting settings
- H5Eset_auto - set automatic error reporting
- H5Ewalk - iterate over the error stack
- H5Ewalk_cb - the default error stack iterator function
- H5Eget_major - get the message for the major error number
- H5Eget_minor - get the message for the minor error number
+ H5Eclear - clear the error stack
+ H5Eprint - print an error stack
+ H5Eget_auto - get automatic error reporting settings
+ H5Eset_auto - set automatic error reporting
+ H5Ewalk - iterate over the error stack
+ H5Ewalk_cb - the default error stack iterator function
+ H5Eget_major - get the message for the major error number
+ H5Eget_minor - get the message for the minor error number
Files
- H5Fclose - close a file and release resources
- H5Fcreate - create a new file
- H5Fget_create_plist - get file creation property list
- H5Fget_access_plist - get file access property list
- H5Fis_hdf5 - determine if a file is an hdf5 file
- H5Fopen - open an existing file
+ H5Fclose - close a file and release resources
+ H5Fcreate - create a new file
+ H5Fget_create_plist - get file creation property list
+ H5Fget_access_plist - get file access property list
+ H5Fis_hdf5 - determine if a file is an hdf5 file
+ H5Fopen - open an existing file
H5Freopen - reopen an HDF5 file
H5Fmount - mount a file
H5Funmount - unmount a file
H5Fflush - flush all buffers associated with a file to disk
Groups
- H5Gclose - close a group and release resources
- H5Gcreate - create a new group
- H5Gopen - open an existing group
- H5Giterate - iterate over the contents of a group
- H5Gmove - change the name of some object
- H5Glink - create a hard or soft link to an object
- H5Gunlink - break the link between a name and an object
- H5Gget_objinfo - get information about a group entry
- H5Gget_linkval - get the value of a soft link
- H5Gget_comment - get the comment string for an object
- H5Gset_comment - set the comment string for an object
+ H5Gclose - close a group and release resources
+ H5Gcreate - create a new group
+ H5Gopen - open an existing group
+ H5Giterate - iterate over the contents of a group
+ H5Gmove - change the name of some object
+ H5Glink - create a hard or soft link to an object
+ H5Gunlink - break the link between a name and an object
+ H5Gget_objinfo - get information about a group entry
+ H5Gget_linkval - get the value of a soft link
+ H5Gget_comment - get the comment string for an object
+ H5Gset_comment - set the comment string for an object
Dataspaces
- H5Screate - create a new data space
- H5Scopy - copy a data space
- H5Sclose - release data space
- H5Screate_simple - create a new simple data space
- H5Sset_space - set simple data space extents
- H5Sis_simple - determine if data space is simple
- H5Sset_extent_simple - set simple data space dimensionality and size
- H5Sget_simple_extent_npoints - get number of points in simple extent
+ H5Screate - create a new data space
+ H5Scopy - copy a data space
+ H5Sclose - release data space
+ H5Screate_simple - create a new simple data space
+ H5Sset_space - set simple data space extents
+ H5Sis_simple - determine if data space is simple
+ H5Sset_extent_simple - set simple data space dimensionality and size
+ H5Sget_simple_extent_npoints - get number of points in simple extent
H5Sget_simple_extent_ndims - get simple data space dimensionality
H5Sget_simple_extent_dims - get simple data space size
H5Sget_simple_extent_type - get type of simple extent
- H5Sset_extent_none - reset extent to be empty
- H5Sextent_copy - copy the extent from one data space to another
+ H5Sset_extent_none - reset extent to be empty
+ H5Sextent_copy - copy the extent from one data space to another
H5Sget_select_npoints - get number of points selected for I/O
- H5Sselect_hyperslab - set hyperslab dataspace selection
+ H5Sselect_hyperslab - set hyperslab dataspace selection
H5Sselect_elements - set element sequence dataspace selection
- H5Sselect_all - select entire extent for I/O
- H5Sselect_none - deselect all elements of extent
- H5Soffset_simple - set selection offset
- H5Sselect_valid - determine if selection is valid for extent
+ H5Sselect_all - select entire extent for I/O
+ H5Sselect_none - deselect all elements of extent
+ H5Soffset_simple - set selection offset
+ H5Sselect_valid - determine if selection is valid for extent
+ H5Sget_select_hyper_nblocks - get number of hyperslab blocks
- + H5Sget_select_hyper_blocklist - get the list of hyperslab blocks
+ + H5Sget_select_hyper_blocklist - get the list of hyperslab blocks
currently selected
- + H5Sget_select_elem_npoints - get the number of element points
+ + H5Sget_select_elem_npoints - get the number of element points
in the current selection
- + H5Sget_select_elem_pointlist - get the list of element points
+ + H5Sget_select_elem_pointlist - get the list of element points
currently selected
- + H5Sget_select_bounds - gets the bounding box containing
+ + H5Sget_select_bounds - gets the bounding box containing
the current selection
Datatypes
- H5Tclose - release data type resources
- H5Topen - open a named data type
- H5Tcommit - name a data type
- H5Tcommitted - determine if a type is named
- H5Tcopy - copy a data type
- H5Tcreate - create a new data type
- H5Tequal - compare two data types
- H5Tlock - lock type to prevent changes
- H5Tfind - find a data type conversion function
- H5Tconvert - convert data from one type to another
- H5Tregister - register a conversion function
- H5Tunregister - remove a conversion function
- H5Tget_overflow - get function that handles overflow conv. cases
- H5Tset_overflow - set function to handle overflow conversion cases
- H5Tget_class - get data type class
- H5Tget_cset - get character set
- H5Tget_ebias - get exponent bias
- H5Tget_fields - get floating point fields
- H5Tget_inpad - get inter-field padding
- H5Tget_member_dims - get struct member dimensions
- H5Tget_member_name - get struct member name
- H5Tget_member_offset - get struct member byte offset
- H5Tget_member_type - get struct member type
- H5Tget_nmembers - get number of struct members
- H5Tget_norm - get floating point normalization
- H5Tget_offset - get bit offset within type
- H5Tget_order - get byte order
- H5Tget_pad - get padding type
- H5Tget_precision - get precision in bits
- H5Tget_sign - get integer sign type
- H5Tget_size - get size in bytes
- H5Tget_strpad - get string padding
- H5Tinsert - insert scalar struct member
- H5Tinsert_array - insert array struct member
- H5Tpack - pack struct members
- H5Tset_cset - set character set
- H5Tset_ebias - set exponent bias
- H5Tset_fields - set floating point fields
- H5Tset_inpad - set inter-field padding
- H5Tset_norm - set floating point normalization
- H5Tset_offset - set bit offset within type
- H5Tset_order - set byte order
- H5Tset_pad - set padding type
- H5Tset_precision - set precision in bits
- H5Tset_sign - set integer sign type
- H5Tset_size - set size in bytes
- H5Tset_strpad - set string padding
- + H5Tget_super - return the base datatype from which a
+ H5Tclose - release data type resources
+ H5Topen - open a named data type
+ H5Tcommit - name a data type
+ H5Tcommitted - determine if a type is named
+ H5Tcopy - copy a data type
+ H5Tcreate - create a new data type
+ H5Tequal - compare two data types
+ H5Tlock - lock type to prevent changes
+ H5Tfind - find a data type conversion function
+ H5Tconvert - convert data from one type to another
+ H5Tregister - register a conversion function
+ H5Tunregister - remove a conversion function
+ H5Tget_overflow - get function that handles overflow conv. cases
+ H5Tset_overflow - set function to handle overflow conversion cases
+ H5Tget_class - get data type class
+ H5Tget_cset - get character set
+ H5Tget_ebias - get exponent bias
+ H5Tget_fields - get floating point fields
+ H5Tget_inpad - get inter-field padding
+ H5Tget_member_dims - get struct member dimensions
+ H5Tget_member_name - get struct member name
+ H5Tget_member_offset - get struct member byte offset
+ H5Tget_member_type - get struct member type
+ H5Tget_nmembers - get number of struct members
+ H5Tget_norm - get floating point normalization
+ H5Tget_offset - get bit offset within type
+ H5Tget_order - get byte order
+ H5Tget_pad - get padding type
+ H5Tget_precision - get precision in bits
+ H5Tget_sign - get integer sign type
+ H5Tget_size - get size in bytes
+ H5Tget_strpad - get string padding
+ H5Tinsert - insert scalar struct member
+ H5Tinsert_array - insert array struct member
+ H5Tpack - pack struct members
+ H5Tset_cset - set character set
+ H5Tset_ebias - set exponent bias
+ H5Tset_fields - set floating point fields
+ H5Tset_inpad - set inter-field padding
+ H5Tset_norm - set floating point normalization
+ H5Tset_offset - set bit offset within type
+ H5Tset_order - set byte order
+ H5Tset_pad - set padding type
+ H5Tset_precision - set precision in bits
+ H5Tset_sign - set integer sign type
+ H5Tset_size - set size in bytes
+ H5Tset_strpad - set string padding
+ + H5Tget_super - return the base datatype from which a
datatype is derived
+ H5Tvlen_create - creates a new variable-length dataype
+ H5Tenum_create - creates a new enumeration datatype
+ H5Tenum_insert - inserts a new enumeration datatype member
- + H5Tenum_nameof - returns the symbol name corresponding to a
+ + H5Tenum_nameof - returns the symbol name corresponding to a
+ specified member of an enumeration datatype
+ + H5Tvalueof - return the value corresponding to a
specified member of an enumeration datatype
- + H5Tvalueof - return the value corresponding to a
- specified member of an enumeration datatype
+ H5Tget_member_value - return the value of an enumeration datatype member
+ H5Tset_tag - tags an opaque datatype
+ H5Tget_tag - gets the tag associated with an opaque datatype
- - H5Tregister_hard - register specific type conversion function
- - H5Tregister_soft - register general type conversion function
+ - H5Tregister_hard - register specific type conversion function
+ - H5Tregister_soft - register general type conversion function
Filters
- H5Tregister - register a conversion function
+ H5Tregister - register a conversion function
Compression
- H5Zregister - register new compression and uncompression
+ H5Zregister - register new compression and uncompression
functions for a method specified by a method number
Identifiers
@@ -8970,14 +8972,14 @@ References
+ H5Rcreate - creates a reference
+ H5Rdereference - open the HDF5 object referenced
+ H5Rget_region - retrieve a dataspace with the specified region selected
- + H5Rget_object_type - retrieve the type of object that an
+ + H5Rget_object_type - retrieve the type of object that an
object reference points to
Ragged Arrays (alpha)
- H5RAcreate - create a new ragged array
- H5RAopen - open an existing array
- H5RAclose - close a ragged array
- H5RAwrite - write to an array
- H5RAread - read from an array
+ H5RAcreate - create a new ragged array
+ H5RAopen - open an existing array
+ H5RAclose - close a ragged array
+ H5RAwrite - write to an array
+ H5RAread - read from an array
diff --git a/release_docs/HISTORY-1_8.txt b/release_docs/HISTORY-1_8.txt
index 2aa7bde..da3d849 100644
--- a/release_docs/HISTORY-1_8.txt
+++ b/release_docs/HISTORY-1_8.txt
@@ -3,6 +3,7 @@ HDF5 History
This file contains development history of HDF5 1.8 branch
+23. Release Information for hdf5-1.8.21
22. Release Information for hdf5-1.8.20
21. Release Information for hdf5-1.8.19
20. Release Information for hdf5-1.8.18
@@ -28,6 +29,611 @@ This file contains development history of HDF5 1.8 branch
[Search on the string '%%%%' for section breaks of each release.]
+%%%%1.8.21%%%%
+
+
+HDF5 version 1.8.21 released on 2018-06-04
+================================================================================
+
+INTRODUCTION
+============
+
+This document describes the differences between HDF5-1.8.20 and
+HDF5-1.8.21, and contains information on the platforms tested and
+known problems in HDF5-1.8.21.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
+
+Links to the HDF5 1.8.21 source code, documentation, and additional materials
+can be found on the HDF5 web page at:
+
+ https://support.hdfgroup.org/HDF5/
+
+The HDF5 1.8.21 release can be obtained from:
+
+ https://support.hdfgroup.org/HDF5/release/obtain518.html
+
+User documentation for 1.8.21 can be accessed directly at this location:
+
+ https://support.hdfgroup.org/HDF5/doc1.8/
+
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
+in 1.8.0?" document:
+
+ https://support.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
+
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.21 (current
+release) versus Release 1.8.20
+
+ https://support.hdfgroup.org/HDF5/doc1.8/ADGuide/Changes.html
+
+If you have any questions or comments, please send them to the HDF Help Desk:
+
+ help@hdfgroup.org
+
+
+CONTENTS
+========
+
+- New Features
+- Support for New Platforms, Languages, and Compilers
+- Bug Fixes since HDF5-1.8.20
+- Supported Platforms
+- Supported Configuration Features Summary
+- More Tested Platforms
+- Known Problems
+
+
+New Features
+============
+
+ Configuration
+ -------------
+ - CMake
+
+ Change minimum version to 3.10.
+
+ This change removes the need to support a copy of the FindMPI.cmake module,
+ which has been removed, along with its subfolder in the config/cmake_ext_mod
+ location.
+
+ (ADB - 2018/03/09)
+
+ - CMake
+
+ Add pkg-config file generation
+
+ Added pkg-config file generation for the C, C++, HL, and HL C++ libraries.
+ In addition, builds on linux will create h5cXXX scripts that use the pkg-config
+ files. This is a limited implementation of a script like autotools h5cc.
+
+ (ADB - 2018/03/08, HDFFV-4359)
+
+ - CMake
+
+ Refactor use of CMAKE_BUILD_TYPE for new variable, which understands
+ the type of generator in use.
+
+ Added new configuration macros to use new HDF_BUILD_TYPE variable. This
+ variable is set correctly for the type of generator being used for the build.
+
+ (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296)
+
+ C++ API
+ -------
+ - The following C++ API wrappers have been added to class H5Location
+ + H5Lcreate_soft:
+ // Creates a soft link from link_name to target_name.
+ void link(const char *target_name, const char *link_name,...)
+ void link(const H5std_string& target_name,...)
+
+ + H5Lcreate_hard:
+ // Creates a hard link from new_name to curr_name.
+ void link(const char *curr_name, const Group& new_loc,...)
+ void link(const H5std_string& curr_name, const Group& new_loc,...)
+
+ // Creates a hard link from new_name to curr_name in the same location.
+ void link(const char *curr_name, const hid_t same_loc,...)
+ void link(const H5std_string& curr_name, const hid_t same_loc,...)
+
+ Note: previous version CommonFG::link will be deprecated.
+
+ + H5Lcopy:
+ // Copy an object from a group of file to another.
+ void copyLink(const char *src_name, const Group& dst,...)
+ void copyLink(const H5std_string& src_name, const Group& dst,...)
+
+ // Copy an object from a group of file to the same location.
+ void copyLink(const char *src_name, const char *dst_name,...)
+ void copyLink(const H5std_string& src_name,...)
+
+ + H5Lmove:
+ // Rename an object in a group or file to a new location.
+ void moveLink(const char* src_name, const Group& dst,...)
+ void moveLink(const H5std_string& src_name, const Group& dst,...)
+
+ // Rename an object in a group or file to the same location.
+ void moveLink(const char* src_name, const char* dst_name,...)
+ void moveLink(const H5std_string& src_name,...)
+
+ Note: previous version CommonFG::move will be deprecated.
+
+ + H5Ldelete:
+ // Removes the specified link from this location.
+ void unlink(const char *link_name,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
+ void unlink(const H5std_string& link_name,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
+
+ Note: An additional parameter is added to CommonFG::unlink and it
+ is moved to H5Location.
+
+ (BMR - 2018/05/11 - HDFFV-10445)
+
+ - New property list subclasses
+
+ Property list subclasses StrCreatPropList, LinkCreatPropList, and
+ AttrCreatPropList are added for the C property list classes
+ H5P_STRING_CREATE, H5P_LINK_CREATE, and H5P_ATTRIBUTE_CREATE.
+
+ (BMR - 2018/05/11 - HDFFV-10445)
+
+ - Another argument, LinkCreatPropList& lcpl, is added to the following
+ functions for the use of link creation property list.
+ Group createGroup(const char* name, size_t size_hint = 0,
+ const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
+ Group createGroup(const H5std_string& name, size_t size_hint = 0,
+ const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
+
+ (BMR - 2018/05/11 - HDFFV-10445)
+
+
+
+Support for New Platforms, Languages, and Compilers
+===================================================
+
+ - Added support for Visual Studio 2017 w/ Intel Fortran 18 on Windows 10 x64.
+
+
+Bug Fixes since HDF5-1.8.20
+===========================
+
+ - If an HDF5 file contains a filter pipeline message with a 'number of
+ filters' field that exceeds the maximum number of allowed filters,
+ the error handling code will attempt to dereference a NULL pointer.
+
+ This issue was reported to The HDF Group as issue #CVE-2017-17505.
+
+ NOTE: The HDF5 C library cannot produce such a file. This condition
+ should only occur in a corrupt (or deliberately altered) file
+ or a file created by third-party software.
+
+ This problem arose because the error handling code assumed that
+ the 'number of filters' field implied that a dynamic array of that
+ size had already been created and that the cleanup code should
+ iterate over that array and clean up each element's resources. If
+ an error occurred before the array has been allocated, this will
+ not be true.
+
+ This has been changed so that the number of filters is set to
+ zero on errors. Additionally, the filter array traversal in the
+ error handling code now requires that the filter array not be NULL.
+
+ (DER - 2018/02/06, HDFFV-10354)
+
+ - If an HDF5 file contains a filter pipeline message which contains
+ a 'number of filters' field that exceeds the actual number of
+ filters in the message, the HDF5 C library will read off the end of
+ the read buffer.
+
+ This issue was reported to The HDF Group as issue #CVE-2017-17506.
+
+ NOTE: The HDF5 C library cannot produce such a file. This condition
+ should only occur in a corrupt (or deliberately altered) file
+ or a file created by third-party software.
+
+ The problem was fixed by passing the buffer size with the buffer
+ and ensuring that the pointer cannot be incremented off the end
+ of the buffer. A mismatch between the number of filters declared
+ and the actual number of filters will now invoke normal HDF5
+ error handling.
+
+ (DER - 2018/02/26, HDFFV-10355)
+
+ - If an HDF5 file contains a malformed compound datatype with a
+ suitably large offset, the type conversion code can run off
+ the end of the type conversion buffer, causing a segmentation
+ fault.
+
+ This issue was reported to The HDF Group as issue #CVE-2017-17507.
+
+ NOTE: The HDF5 C library cannot produce such a file. This condition
+ should only occur in a corrupt (or deliberately altered) file
+ or a file created by third-party software.
+
+ THE HDF GROUP WILL NOT FIX THIS BUG AT THIS TIME
+
+ Fixing this problem would involve updating the publicly visible
+ H5T_conv_t function pointer typedef and versioning the API calls
+ which use it. We normally only modify the public API during
+ major releases, so this bug will not be fixed at this time.
+
+ (DER - 2018/02/26, HDFFV-10356)
+
+ - If an HDF5 file contains a malformed compound type which contains
+ a member of size zero, a division by zero error will occur while
+ processing the type.
+
+ This issue was reported to The HDF Group as issue #CVE-2017-17508.
+
+ NOTE: The HDF5 C library cannot produce such a file. This condition
+ should only occur in a corrupt (or deliberately altered) file
+ or a file created by third-party software.
+
+ Checking for zero before dividing fixes the problem. Instead of the
+ division by zero, the normal HDF5 error handling is invoked.
+
+ (DER - 2018/02/26, HDFFV-10357)
+
+ - If an HDF5 file contains a malformed symbol table node that declares
+ it contains more symbols than it actually contains, the library
+ can run off the end of the metadata cache buffer while processing
+ the symbol table node.
+
+ This issue was reported to The HDF Group as issue #CVE-2017-17509.
+
+ NOTE: The HDF5 C library cannot produce such a file. This condition
+ should only occur in a corrupt (or deliberately altered) file
+ or a file created by third-party software.
+
+ Performing bounds checks on the buffer while processing fixes the
+ problem. Instead of the segmentation fault, the normal HDF5 error
+ handling is invoked.
+
+ (DER - 2018/03/12, HDFFV-10358)
+
+
+ Configuration
+ -------------
+ - Library
+
+ Moved the location of gcc attribute.
+
+ The gcc attribute(no_sanitize), named as the macro HDF_NO_UBSAN,
+ was located after the function name. Builds with GCC 7 did not
+ indicate any problem, but GCC 8 issued errors. Moved the
+ attribute before the function name, as required.
+
+ (ADB 2018/05/22, HDFFV-10473)
+
+ - CMake
+
+ Update CMake commands configuration.
+
+ A number of improvements were made to the CMake commands. Most
+ changes simplify usage or eliminate unused constructs. Also,
+ some changes support better cross-platform support.
+
+ (ADB - 2018/02/01, HDFFV-10398)
+
+ - CMake
+
+ Correct usage of CMAKE_BUILD_TYPE variable.
+
+ The use of the CMAKE_BUILD_TYPE is incorrect for multi-config
+ generators (Visual Studio and XCode) and is optional for single
+ config generators. Created a new macro to check
+ GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG
+ Created two new HDF variable, HDF_BUILD_TYPE and HDF_CFG_BUILD_TYPE.
+ Defaults for these variables is "Release".
+
+ (ADB - 2018/01/10, HDFFV-10385)
+
+ - CMake
+
+ Add replacement of fortran flags if using static CRT.
+
+ Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in
+ config/cmake_ext_mod folder.
+
+ (ADB - 2018/01/08, HDFFV-10334)
+
+
+ Library
+ -------
+ - Utility function can not handle lowercase Windows drive letters
+
+ Added call to toupper function for drive letter.
+
+ (ADB - 2017/12/18, HDFFV-10307)
+
+
+ Tools
+ -----
+ - h5repack
+
+ h5repack changes the chunk parameters when a change of layout is not
+ specified and a filter is applied.
+
+ HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code
+ in the tools library. The check for an existing layout was incorrectly
+ placed into an if block and not executed. The check was moved into
+ the normal path of the function.
+
+ (ADB - 2018/02/21, HDFFV-10412)
+
+ - h5dump
+
+ the tools library will hide the error stack during file open.
+
+ While this is preferable almost always, there are reasons to enable
+ display of the error stack when a tool will not open a file. Adding an
+ optional argument to the --enable-error-stack will provide this use case.
+ As an optional argument it will not affect the operation of the
+ --enable-error-stack. h5dump is the only tool to implement this change.
+
+ (ADB - 2018/02/15, HDFFV-10384)
+
+ - h5dump
+
+ h5dump would output an indented blank line in the filters section.
+
+ h5dump overused the h5tools_simple_prefix function, which is a
+ function intended to account for the data index (x,y,z) option.
+ Removed the function call for header information.
+
+ (ADB - 2018/01/25, HDFFV-10396)
+
+ - h5repack
+
+ h5repack incorrectly searched internal object table for name.
+
+ h5repack would search the table of objects for a name, if the
+ name did not match it tried to determine if the name without a
+ leading slash would match. The logic was flawed! The table
+ stored names(paths) without a leading slash and did a strstr
+ of the table path to the name.
+ The assumption was that if there was a difference of one then
+ it was a match, however "pressure" would match "/pressure" as
+ well as "/pressure1", "/pressure2", etc. Changed logic to remove
+ any leading slash and then do a full compare of the name.
+
+ (ADB - 2018/01/18, HDFFV-10393)
+
+ - h5repack
+
+ h5repack failed to handle command line parameters for customer filters.
+
+ User defined filter parameter conversions would fail when integers
+ were represented on the command line with character strings
+ larger than 9 characters. Increased local variable array for storing
+ the current command line parameter to prevent buffer overflows.
+
+ (ADB - 2018/01/17, HDFFV-10392)
+
+ - h5diff
+
+ h5diff seg faulted if comparing VL strings against fixed strings.
+
+ Reworked solution for HDFFV-8625 and HDFFV-8639. Implemented the check
+ for string objects of same type in the diff_can_type function by
+ adding an if(tclass1 == H5T_STRING) block. This "if block" moves the
+ same check that was added for attributes to this function, which is
+ used by all object types. This function handles complex type structures.
+ Also added a new test file in h5diffgentest for testing this issue
+ and removed the temporary files used in the test scripts.
+
+ (ADB - 2018/01/04, HDFFV-8745)
+
+
+ C++ API
+ -------
+ - Removal of memory leaks
+
+ A private function was inadvertently called, causing memory leaks. This
+ is now fixed.
+
+ (BMR - 2018/04/12 - User reported in email)
+
+ - Changes in exception classes
+
+ Some exception classes are reorganized to reflect the HDF5 object
+ hierarchy and allow customization.
+ DataSetIException -> LocationException -> Exception
+ DataTypeIException -> LocationException -> Exception
+ GroupIException -> LocationException -> Exception
+ AttributeIException -> LocationException -> Exception
+ FileIException -> GroupIException -> LocationException -> Exception
+ Member functions in H5Location and H5Object now throw specific exceptions
+ associated with the invoking objects.
+
+ (BMR - 2018/05/11)
+
+ - H5Location::closeObjId is made static
+ (BMR - 2018/05/11)
+
+ - H5A wrappers in H5Location are removed as they have been in H5Object.
+ (BMR - 2018/05/11)
+
+
+Supported Platforms
+===================
+The following platforms are supported and have been tested for this release.
+They are built with the configure process unless specified otherwise.
+
+ Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
+ #1 SMP x86_64 GNU/Linux compilers:
+ (platypus/mayll) Version 4.4.7 20120313
+ Versions 4.9.3, 5.3.0, 6.2.0
+ PGI C, Fortran, C++ for 64-bit target on
+ x86-64;
+ Version 17.10-0
+ Intel(R) C (icc), C++ (icpc), Fortran (icc)
+ compilers:
+ Version 17.0.4.196 Build 20160721
+ MPICH 3.1.4 compiled with GCC 4.9.3
+ OpenMPI 2.0.1 compiled with GCC 4.9.3
+
+ Linux 2.6.32-573.18.1.el6 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+ (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+ IBM XL C/C++ V13.1
+ IBM XL Fortran V15.1
+
+ Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++)
+ #1 SMP x86_64 GNU/Linux compilers:
+ (kituo/moohan/jelly Version 4.8.5 20150623 (Red Hat 4.8.5-4)
+ Versions 4.9.3, 5.3.0, 6.2.0
+ Intel(R) C (icc), C++ (icpc), Fortran (icc)
+ compilers:
+ Version 17.0.4.196 Build 20170411
+ MPICH 3.1.4 compiled with GCC 4.9.3
+ NAG Fortran Compiler Release 6.1(Tozai) Build 6116
+
+ SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc
+ (emu) Sun Fortran 95 8.6 SunOS_sparc
+ Sun C++ 5.12 SunOS_sparc
+
+ Windows 7 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+
+ Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+ Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+ Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+ Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake)
+ Visual Studio 2015 w/ MSMPI 8 (cmake)
+
+ Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+
+ Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+ Visual Studio 2017 w/ Intel Fortran 18 (cmake)
+
+ Mac OS X Mavericks 10.9.5 Apple LLVM version 6.0 (clang-600.0.57)
+ 64-bit gfortran GNU Fortran (GCC) 4.9.2
+ (wren/quail) Intel icc/icpc/ifort version 15.0.3
+
+ Mac OS X Yosemite 10.10.5 Apple LLVM version 6.1 (clang-602.0.53)
+ 64-bit gfortran GNU Fortran (GCC) 4.9.2
+ (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3
+
+ Mac OS X El Capitan 10.11.6 Apple LLVM version 7.3.0 (clang-703.0.29)
+ 64-bit gfortran GNU Fortran (GCC) 5.2.0
+ (VM osx1011dev/osx1011test) Intel icc/icpc/ifort version 16.0.2
+
+ Mac OS Sierra 10.12.6 Apple LLVM version 8.1 (clang-802.0.42)
+ 64-bit gfortran GNU Fortran (GCC) 7.1.0
+ (kite) Intel icc/icpc/ifort version 17.0.2
+
+
+Tested Configuration Features Summary
+=====================================
+
+ In the tables below
+ y = tested
+ n = not tested in this release
+ C = Cluster
+ W = Workstation
+ x = not working in this release
+ dna = does not apply
+ ( ) = footnote appears below second table
+ <blank> = testing incomplete on this feature or platform
+
+Platform C F90/ F90 C++ zlib SZIP
+ parallel F2003 parallel
+SunOS 5.11 32-bit n y/y n y y y
+SunOS 5.11 64-bit n y/y n y y y
+Windows 7 y y/y n y y y
+Windows 7 x64 y y/y n y y y
+Windows 7 Cygwin n y/n n y y y
+Windows 7 x64 Cygwin n y/n n y y y
+Windows 10 y y/y n y y y
+Windows 10 x64 y y/y n y y y
+Mac OS X Yosemite 10.10.5 64-bit n y/y n y y y
+Mac OS X El Capitan 10.11.6 64-bit n y/y n y y y
+Mac OS Sierra 10.12.6 64-bit n y/y n y y y
+AIX 6.1 32- and 64-bit n y/n n y y y
+CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y
+CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y
+CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y
+CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y
+CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y
+Linux 2.6.32-573.18.1.el6.ppc64 n y/n n y y y
+
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+SunOS 5.11 32-bit y y y y
+SunOS 5.11 64-bit y y y y
+Windows 7 y y y y
+Windows 7 x64 y y y y
+Windows 7 Cygwin n n n y
+Windows 7 x64 Cygwin n n n y
+Windows 10 y y y y
+Windows 10 x64 y y y y
+Mac OS X Yosemite 10.10.5 64-bit y n y y
+Mac OS X El Capitan 10.11.6 64-bit y n y y
+Mac OS Sierra 10.12.6 64-bit y n y y
+AIX 6.1 32- and 64-bit y n n y
+CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y
+CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y
+CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y
+CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y
+CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y
+Linux 2.6.32-573.18.1.el6.ppc64 y y y y
+
+Compiler versions for each platform are listed in the preceding
+"Supported Platforms" table.
+
+
+More Tested Platforms
+=====================
+The following platforms are not supported but have been tested for this release.
+
+ Linux 2.6.32-573.22.1.el6 g95 (GCC 4.0.3 (g95 0.94!)
+ #1 SMP x86_64 GNU/Linux
+ (mayll)
+
+ Debian8.4.0 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1 x86_64 GNU/Linux
+ gcc (Debian 4.9.2-10) 4.9.2
+ GNU Fortran (Debian 4.9.2-10) 4.9.2
+ (cmake and autotools)
+
+ Fedora24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
+ gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
+ GNU Fortran (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
+ (cmake and autotools)
+
+ CentOS 7.2 3.10.0-327.28.2.el7.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
+ gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
+ GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
+ (cmake and autotools)
+
+ Ubuntu 16.04 4.4.0-38-generic #62-Ubuntu SMP x86_64 GNU/Linux
+ gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0
+ GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0
+ (cmake and autotools)
+
+
+Known Problems
+==============
+
+ The dynamically loaded plugin test libraries require undefined references
+ to HDF5 functions to be resolved at runtime in order to function properly.
+ With autotools on CYGWIN this results in build errors, and we have not
+ found a solution that satisfies both. Therefore the dynamically loaded
+ plugin tests have been disabled on CYGWIN.
+
+ Mac OS X 10.13 added additional subdirectory structure in .libs for shared
+ libraries. Consequently "make check" will fail testing java and dynamically
+ loaded plugin test libraries attempting to copy files from the previous
+ locations in .libs directories. This will be addressed in the next release
+ when support for the Mac OS X 10.13 platform is added.
+
+ Known problems in previous releases can be found in the HISTORY*.txt files
+ in the HDF5 source. Please report any new problems found to
+ help@hdfgroup.org.
+
+
%%%%1.8.20%%%%
@@ -1579,17 +2185,17 @@ New Features
Configuration
-------------
- Cmakehdf5: Added Ability to Run Multiple Make Commands
-
+
Added option --njobs to specify up to how many jobs to launch during
build (cmake) and testing (ctest).
-
+
(AKC - 2015/12/13, HDFFV-9612)
- Cmakehdf5: Added Szip Support and Verbose Option
-
- Added --with-szlib to support the Szip library; and
+
+ Added --with-szlib to support the Szip library; and
--enable/disable-verbose to display all CMake process output.
-
+
(AKC - 2015/11/16, HDFFV-8932 and DAILYTEST-195)
- CMake minimum is now 3.1.0. (ADB - 2015/11/14)
@@ -1611,13 +2217,13 @@ New Features
Library
-------
- New API Calls for Searching for External Dataset Storage
-
+
API calls that determine the search path for dataset external
- storage were added. H5Pset/get_efile_prefix() API calls were added
- to the library. These functions give control over the search path
- for dataset external storage that has been configured with
+ storage were added. H5Pset/get_efile_prefix() API calls were added
+ to the library. These functions give control over the search path
+ for dataset external storage that has been configured with
H5Pset_external().
-
+
Additionally, the HDF5_EXTFILE_PREFIX environment variable can be
used to control the search path.
@@ -1649,7 +2255,7 @@ New Features
H5PTcreate has been added to replace H5PTcreate_fl. H5PTcreate
takes a property list identifier to provide flexibility on
creation properties. This also removes the following warning:
- "deprecated conversion from string constant to "char*"
+ "deprecated conversion from string constant to "char*"
[-Wwrite-strings]".
(BMR - 2016/04/25, HDFFV-9708, HDFFV-8615)
@@ -1690,7 +2296,7 @@ New Features
Two accessor wrappers were added to class PacketTable.
PacketTable::GetDataset() returns the identifier of the dataset
- associated with the packet table, and PacketTable::GetDatatype()
+ associated with the packet table, and PacketTable::GetDatatype()
returns the identifier of the datatype that the packet table uses.
(BMR - 2016/04/25, HDFFV-8623 patch 4)
@@ -1700,7 +2306,7 @@ New Features
Overloaded functions were added to provide the "const char*"
argument; the existing version will be deprecated in future
releases. This also removes the following warning:
- "deprecated conversion from string constant to "char*"
+ "deprecated conversion from string constant to "char*"
[-Wwrite-strings]".
(BMR - 2016/04/25, HDFFV-8623 patch 1, HDFFV-8615)
@@ -1736,9 +2342,9 @@ New Features
The two following functions were added:
ArrayType::getArrayNDims() const
ArrayType::getArrayDims() const
- to provide const version, and the non-const version was marked
- deprecated. In-memory array information, ArrayType::rank and
- ArrayType::dimensions, were removed. This is an implementation
+ to provide const version, and the non-const version was marked
+ deprecated. In-memory array information, ArrayType::rank and
+ ArrayType::dimensions, were removed. This is an implementation
detail and should not affect applications.
(BMR, 2016/04/25, HDFFV-9725)
@@ -1753,8 +2359,8 @@ New Features
Support for New Platforms, Languages, and Compilers
===================================================
- - Mac OS X El Capitan 10.11.4 with compilers Apple clang/clang++
- version 7.3.0 from Xcode 7.3, gfortran GNU Fortran (GCC) 5.2.0
+ - Mac OS X El Capitan 10.11.4 with compilers Apple clang/clang++
+ version 7.3.0 from Xcode 7.3, gfortran GNU Fortran (GCC) 5.2.0
and Intel icc/icpc/ifort version 16.0.2
@@ -1782,7 +2388,7 @@ Bug Fixes since HDF5-1.8.16
(DER - 2015/12/08, HDFFV-9627)
- - The --enable-clear-file-buffers configure Option was Non-functional
+ - The --enable-clear-file-buffers configure Option was Non-functional
so the Feature was Always Enabled (its default value).
Regardless of the configure flag, the setting was always enabled when
@@ -1800,7 +2406,7 @@ Bug Fixes since HDF5-1.8.16
(DER - 2016/02/03, HDFFV-9676)
- - Added a patch to remove '"'s from arguments for MPI compilers that
+ - Added a patch to remove '"'s from arguments for MPI compilers that
were causing errors compiling H5lib_settings.c with SGI MPT.
(LRK - 2016/04/20, HDFFV-9439)
@@ -1843,19 +2449,19 @@ Bug Fixes since HDF5-1.8.16
-----
- h5dump: Sub-setting Fixed for Dimensions Greater than Two
- When a dataset has more than two dimensions, sub-setting would
- incorrectly calculate the data that needed to be displayed.
- Added in block and stride calculations that account for dimensions
- greater than two. NOTE: lines that have line breaks inserted
- because of display length calculations may have index info that
+ When a dataset has more than two dimensions, sub-setting would
+ incorrectly calculate the data that needed to be displayed.
+ Added in block and stride calculations that account for dimensions
+ greater than two. NOTE: lines that have line breaks inserted
+ because of display length calculations may have index info that
is incorrect until the next dimension break.
(ADB - 2016/03/07, HDFFV-9698)
- h5dump: Issue with Argument Segmentation Fault
- When an argument with an optional value was at the end of the command
- line with a value, h5dump would crash. Reworked check for remaining
+ When an argument with an optional value was at the end of the command
+ line with a value, h5dump would crash. Reworked check for remaining
arguments.
(ADB - 2016/03/07, HDFFV-9570, HDFFV-9684)
@@ -1867,7 +2473,7 @@ Bug Fixes since HDF5-1.8.16
(ADB -, 2016/03/07, HDFFV-9241)
- h5dump: Clarified Help
-
+
Clarified usage of -O F option in h5dump utility help.
(ADB - 2016/03/07, HDFFV-9066)
@@ -1880,7 +2486,7 @@ Bug Fixes since HDF5-1.8.16
- VS2015 Release Changed how Timezone was Handled
- Created a function, HDget_timezone, in H5system.c. Replaced
+ Created a function, HDget_timezone, in H5system.c. Replaced
timezone variable usage with function call.
(ADB - 2015/11/02, HDFFV-9550)
@@ -1897,7 +2503,7 @@ Bug Fixes since HDF5-1.8.16
-------
- Removal of Obsolete Methods
- The overloaded methods which had parameters that should be const
+ The overloaded methods which had parameters that should be const
but were not have been removed.
(BMR - 2016/01/13, HDFFV-9789)
@@ -1908,7 +2514,7 @@ Bug Fixes since HDF5-1.8.16
---------------
- Fixed Memory Leak in Packet Table API
- Applied user's patch to fix memory leak in the creation of a
+ Applied user's patch to fix memory leak in the creation of a
packet table.
(BMR - 2016/04/25, HDFFV-9700)
@@ -2910,7 +3516,7 @@ Known Problems
(SLU - 2005/06/30)
-%%%%1.8.15%%%%
+%%%%1.8.15%%%%
HDF5 version 1.8.15 released on 2015-05-04
@@ -2919,9 +3525,9 @@ HDF5 version 1.8.15 released on 2015-05-04
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.14 and
-HDF5-1.8.15, and contains information on the platforms tested and
-known problems in HDF5-1.8.15.
+This document describes the differences between HDF5-1.8.14 and
+HDF5-1.8.15, and contains information on the platforms tested and
+known problems in HDF5-1.8.15.
Links to the HDF5 source code, documentation, and additional materials
can be found on the HDF5 web page at:
@@ -2932,11 +3538,11 @@ The HDF5 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for HDF5 can be accessed directly at this location:
+User documentation for HDF5 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
from Release to Release" document at this location:
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -2964,18 +3570,18 @@ New Features
Configuration
-------------
- CMake
-
+
Improvements made to the CMake build system.
-
+
The default options were changed to align with the Autotools configure
defaults. CMake configure files now support components when packaged
with CPack. Windows CPack supports WiX packaging, and will look for
- WiX and NSIS in the standard locations.
-
+ WiX and NSIS in the standard locations.
+
The CMake minimum has been changed to 3.1.
-
+
(ADB - 2015/04/01 HDFFV-8074, 8968, 9006)
-
+
- cmakehdf5 for Cmake building.
Added configure options to support the building of Fortran or CXX API,
to enable/disable testings. Use "cmakehdf5 --help" for details.
@@ -3005,10 +3611,10 @@ New Features
(MSC - 2015/02/19 HDFFV-9068)
- Large File Support Configuration Option
-
+
Removed the option to enable or disable large file support. It will
always be enabled.
-
+
(MSC - 2015/02/19 HDFFV-9097)
- Removed Configuration Feature
@@ -3065,11 +3671,11 @@ New Features
(DER - 2015-02-26, HDFFV-9057, 7567, 9088, 7566)
- - _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE No Longer Exported
+ - _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE No Longer Exported
to h5cc and Other Compiler Wrappers
- The _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE definitions are
- not required for using API functions and may conflict with user
+ The _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE definitions are
+ not required for using API functions and may conflict with user
code requirements.
(DER - 2015-03-08, HDFFV-9152)
@@ -3153,33 +3759,33 @@ New Features
separately from the library.
(DER - 2015-04-01, HDFFV-9100)
-
+
- H5Pset_istore_k and H5Pset_sym_k
- These two functions didn't check the value of the input parameter "ik".
- When 2*ik exceeded 2 bytes of storage, data was lost in the file;
- for example, some chunks would be overwritten.
+ These two functions didn't check the value of the input parameter "ik".
+ When 2*ik exceeded 2 bytes of storage, data was lost in the file;
+ for example, some chunks would be overwritten.
Added validation of "ik" to not exceed the max v1 btree entries (2 bytes)
to these two routines.
(VC - 2015-03-24, HDFFV-9173)
- - Added Functions to Control the Value of H5PL_no_plugin_g without
+ - Added Functions to Control the Value of H5PL_no_plugin_g without
Using an Environment Variable
-
- Sometimes it is necessary for an application to disable the use of
- dynamically loaded plugin libraries without requiring the library to
- be built with plugin support disabled or to set an environment
+
+ Sometimes it is necessary for an application to disable the use of
+ dynamically loaded plugin libraries without requiring the library to
+ be built with plugin support disabled or to set an environment
variable to disable plugin support globally.
-
+
Two new functions (H5PLset_loading_state() and H5PLget_loading_state())
- were added to the HDF5 C Library. These functions require a parameter
- that indicates which type of dynamically loaded plugin is enabled or
+ were added to the HDF5 C Library. These functions require a parameter
+ that indicates which type of dynamically loaded plugin is enabled or
disabled.
-
+
(ADB - 2015-03-17, HDFFV-8520)
-
+
Parallel Library
----------------
- MPI_Finalize and HDF5 Library Shutdown
@@ -3190,12 +3796,12 @@ New Features
Attached an attribute destroy callback to MPI_COMM_SELF that
shuts down the HDF5 library when MPI_COMM_SELF is destroyed,
- in other words, on MPI_Finalize. This should fix several issues
- that users see when they forget to close HDF5 objects before
- calling MPI_Finalize().
+ in other words, on MPI_Finalize. This should fix several issues
+ that users see when they forget to close HDF5 objects before
+ calling MPI_Finalize().
(MSC - 2015/02/25, HDFFV-883)
-
+
Tools
-----
- None
@@ -3206,19 +3812,19 @@ New Features
Fortran API
-----------
- - Added Global Variables
-
- These new global variables are equivalent to the C definitions
+ - Added Global Variables
+
+ These new global variables are equivalent to the C definitions
without the '_F':
-
- H5G_UDLINK_F
+
+ H5G_UDLINK_F
H5G_SAME_LOC_F
H5O_TYPE_UNKNOWN_F
H5O_TYPE_GROUP_F
H5O_TYPE_DATASET_F
H5O_NAMED_DATATYPE_F
H5O_TYPE_NTYPES_F
-
+
(MSB - 2015/02/03, HDFFV-9040)
@@ -3226,7 +3832,7 @@ New Features
-------
- New Wrappers for C Functions H5P[s/g]et_libver_bounds
- Wrappers were added to class H5::FileAccPropList for the
+ Wrappers were added to class H5::FileAccPropList for the
C Functions H5Pget_libver_bounds and H5Pset_libver_bounds.
(BMR, 2015/04/06, Part of HDFFV-9167)
@@ -3236,7 +3842,7 @@ New Features
The following wrappers are added to class H5::CommonFG
Returns the object header version of an object in a file or group,
given the object's name.
-
+
unsigned childObjVersion(const char* objname) const;
unsigned childObjVersion(const H5std_string& objname) const;
@@ -3245,7 +3851,7 @@ New Features
- New DataType Constructor
Added a DataType constructor that takes a PredType object, and this
- constructor will invoke H5Tcopy to generate another datatype id
+ constructor will invoke H5Tcopy to generate another datatype id
from a predefined datatype.
(BMR, 2015/04/06)
@@ -3253,7 +3859,7 @@ New Features
Support for New Platforms, Languages, and Compilers
===================================================
- - Support for Linux 3.10.0-123.20.1.el7 added (LK - 2015/04/01)
+ - Support for Linux 3.10.0-123.20.1.el7 added (LK - 2015/04/01)
- Support for Mac OS X Yosemite 10.10 added (AKC - 2015/03/04, HDFFV-9007)
- Support for AIX 6.1 added and AIX 5.3 is retired. (AKC - 2015/01/09)
@@ -3267,19 +3873,19 @@ Bug Fixes since HDF5-1.8.14
Fixed by assign it with the proper value.
- (AKC - 2015/04/29, HDFFV-9298)
+ (AKC - 2015/04/29, HDFFV-9298)
- Windows Installer Incorrect Display of PATH Environment Variable
-
+
In the Windows installer, the dialog box where the user can elect to
add the product's bin path to the %PATH% environment variable displayed
an incorrect path. This path was missing the C:\Program Files part
and used the POSIX file separator '/' before the bin (<path>/bin,
instead of <path>\bin).
-
+
The dialog box text was changed to simply say that the product's bin
path would be added instead of explicitly displaying the path.
- This is in line with most installers. The reason for not fixing the
+ This is in line with most installers. The reason for not fixing the
displayed path instead is that it is difficult to pass the correct
path from CPack to the NSIS installer for display.
@@ -3292,34 +3898,34 @@ Bug Fixes since HDF5-1.8.14
Library
-------
- Incorrect Usage of List in CMake COMPILE_DEFINITIONS set_property
-
+
The CMake command set_property with COMPILE_DEFINITIONS property
needs a quoted semi-colon separated list of values. CMake will
transform the list to a series of -D{value} for the compile.
-
+
(ADB - 2014/12/09, HDFV-9041)
-
+
- Fixed Compile Errors on Windows w/ Visual Studio and CMake When
UNICODE is Defined
-
+
The HDF5 Library could not be built on Windows with Visual Studio when
- UNICODE was defined. This was due to the incorrect use of the TEXT()
+ UNICODE was defined. This was due to the incorrect use of the TEXT()
macro and some Win32 API functions that take TCHAR parameters. The faulty
code was a part of the filter plugin functionality. This was a
compile-time error that only affected users who build HDF5 from source
and define UNICODE, usually when HDF5 is being built as a part of a
larger product. There were no run-time effects.
-
+
These errors caused no problems when UNICODE was not defined. HDF5 is
normally not built with UNICODE defined and the binaries were
unaffected.
-
+
The fix was to remove the TEXT() macro and explicitly use the
'A' form of the Win32 API calls, which expect char strings instead of
wchar_t strings.
-
+
Note that HDF5 currently does not support Unicode file paths on Windows.
-
+
(DER - 2015/02/22, HDFFV-8927)
- Addition of Error Tracing Functionality to Several C API Calls
@@ -3335,11 +3941,11 @@ Bug Fixes since HDF5-1.8.14
- H5Rdereference Now Checks for HADDR_UNDEF or Uninitialized References
- When passed HADDR_UNDEF or uninitialized references, the previous
- behavior of H5Rdereference was to continue to process the reference
- as a valid address.
-
- H5Rdereference was changed to return immediately (with an error
+ When passed HADDR_UNDEF or uninitialized references, the previous
+ behavior of H5Rdereference was to continue to process the reference
+ as a valid address.
+
+ H5Rdereference was changed to return immediately (with an error
message) if the references are HADDR_UNDEF or uninitialized.
(MSB - 2015/3/10, HDFFV-7959)
@@ -3357,19 +3963,19 @@ Bug Fixes since HDF5-1.8.14
Parallel Library
----------------
- Fixed a Potential Memory Error
-
- Fixed a potential memory error when performing parallel I/O on a
- dataset with a single chunk, and at least one process has nothing
+
+ Fixed a potential memory error when performing parallel I/O on a
+ dataset with a single chunk, and at least one process has nothing
to do.
-
+
(NAF - 2015/02/16)
- Parallel Test Problem Fixed
-
+
Fixed problem with parallel tests where they failed beyond a
certain number of ranks. All tests should work for any arbitrary
- number of ranks.
-
+ number of ranks.
+
(MSC - 2014/11/06, HDFFV-1027,8962,8963)
- MPE Support
@@ -3378,7 +3984,7 @@ Bug Fixes since HDF5-1.8.14
dropped at some point in time.
Fixed problem with enabling MPE. Users should use the community
- maintained MPE on github (http://git.mpich.org/mpe.git/).
+ maintained MPE on github (http://git.mpich.org/mpe.git/).
(MSC - 2015/02/20, HDFFV-9135)
@@ -3414,28 +4020,28 @@ Bug Fixes since HDF5-1.8.14
- Source perform/ directory moved to tools/perform.
The perform directory is moved to tools/perform for easier maintenance.
(AKC - 2014/12/17, HDFFV-9046)
-
+
Fortran API
------------
- Fortran Fails with --enable-fortran2003 and Intel 15.x Compilers
-
- Added BIND(C) to the offending APIs.
- The Fortran Library (--enable-fortran2003) now works using Intel 15.x
- without the need for any additional compilers flags.
-
+ Added BIND(C) to the offending APIs.
+
+ The Fortran Library (--enable-fortran2003) now works using Intel 15.x
+ without the need for any additional compilers flags.
+
(MSB - 2015/1/26, HDFFV-9049)
- - h5tenum_insert_f Does Not Work with Default 8 Byte Integers
+ - h5tenum_insert_f Does Not Work with Default 8 Byte Integers
(xlf compiler)
-
- In the Fortran 90 API, 'value' is no longer cast into the C int type.
- Therefore, if h5tenum_insert_f is passed an 8 byte integer (via -i8)
- then 'value' is written as the same type as the default Fortran
+
+ In the Fortran 90 API, 'value' is no longer cast into the C int type.
+ Therefore, if h5tenum_insert_f is passed an 8 byte integer (via -i8)
+ then 'value' is written as the same type as the default Fortran
integer type (which can be 8 bytes).
-
- A new Fortran 2003 API was added which is more in line with the C
- API and users are strongly encouraged to use the Fortran 2003 API
+
+ A new Fortran 2003 API was added which is more in line with the C
+ API and users are strongly encouraged to use the Fortran 2003 API
instead of the Fortran 90 API.
SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr)
@@ -3447,29 +4053,29 @@ Bug Fixes since HDF5-1.8.14
(MSB - 2015/2/19, HDFFV-8908)
- Some Fortran APIs Never Returned the Error State
-
- Some Fortran APIs never returned the error state: they
- would always return a positive number. The APIs include
+
+ Some Fortran APIs never returned the error state: they
+ would always return a positive number. The APIs include
the following:
-
+
h5fget_file_image_f
h5lget_name_by_idx_f
h5oget_comment_by_name_f
- They were corrected to return a negative number as described in
- the Reference Manual if an error occurred.
+ They were corrected to return a negative number as described in
+ the Reference Manual if an error occurred.
(MSB - 2015/3/19, HDF5-239)
- - Fixed h5pget_class_f
+ - Fixed h5pget_class_f
- h5pget_class_f never correlated the class identifier to the property
- list class name as indicated in the HDF5 Reference Manual; it instead
- returned a property list class identifier as an INTEGER. The INTEGER
+ h5pget_class_f never correlated the class identifier to the property
+ list class name as indicated in the HDF5 Reference Manual; it instead
+ returned a property list class identifier as an INTEGER. The INTEGER
needed to be of type INTEGER(HID_T) to be correct.
- The h5pget_class_f API was changed to return an INTEGER(HID_T)
- property list class identifier instead of an INTEGER. This mimics the
+ The h5pget_class_f API was changed to return an INTEGER(HID_T)
+ property list class identifier instead of an INTEGER. This mimics the
intended behavior of the C API.
(MSB - 2015/3/16, HDFFV5-9162)
@@ -3479,12 +4085,12 @@ Bug Fixes since HDF5-1.8.14
- Combined Two H5File::getObjCount Overloaded Methods
The following two methods
-
+
ssize_t getObjCount(unsigned types) const;
ssize_t getObjCount() const;
-
+
were combined into one:
-
+
ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const;
(BMR - 2015/04/06)
@@ -3492,7 +4098,7 @@ Bug Fixes since HDF5-1.8.14
- Many Warnings Were Removed
Many warnings such as conversion, unused variables, missing base
- class initialization, and initializing base classes in wrong order
+ class initialization, and initializing base classes in wrong order
were removed.
(BMR, 2015/04/06)
@@ -3503,10 +4109,10 @@ Bug Fixes since HDF5-1.8.14
H5Location, and H5Object are no longer appropriate after the data member
"id" had been moved from IdComponent to the sub-classes in previous
releases.
-
+
<Classname>(const hid_t h5_id);
<Classname>(const <Classname>& original);
-
+
The copy constructors were no-op and removed in 1.8.15. The other
constructors will be removed from 1.10 release, and then from 1.8.17
if their removal does not cause any problems.
@@ -3530,39 +4136,39 @@ Bug Fixes since HDF5-1.8.14
(MSB - 2015/2/14, HDFFV-8685)
-
+
- H5PTcreate_fl Does Not Convert to Memory Datatype
- H5PTcreate_fl now converts to the table's native memory datatype
+ H5PTcreate_fl now converts to the table's native memory datatype
to fix the problem of handling BE and LE packet tables.
(MSB - 2015/2/26 - HDFFV-9042)
- Fix for H5LT Attribute Functions
-
- H5LT attribute functions fail to create attributes whose name
+
+ H5LT attribute functions fail to create attributes whose name
is a substring of an existing attribute.
- H5LT attribute functions can now create attributes whose name
+ H5LT attribute functions can now create attributes whose name
is a substring of an existing attribute.
(MSB - 2015/2/24, HDFFV-9132)
-
+
Fortran High-Level APIs:
------------------------
- Internal Library Fix for Missing Argument Declaration
-
- In Interface block for h5tbmake_table_c, "max_char_size_field_names"
- is listed as an input, but in the argument definitions it is
- "INTEGER :: max_char_size". This caused no known problems with the
+
+ In Interface block for h5tbmake_table_c, "max_char_size_field_names"
+ is listed as an input, but in the argument definitions it is
+ "INTEGER :: max_char_size". This caused no known problems with the
Fortran HL API.
Fixed missing argument definition.
-
+
(MSB - 2015/2/18, HDFFV-8559)
-
+
Testing
-------
@@ -3593,17 +4199,17 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-55)
Version 4.8.4, 4.9.2
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 15.0.1.133 Build 20141023
Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(platypus) Version 4.4.7 20120313
Version 4.8.2, Version 4.9.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 14.10-0
+ Version 14.10-0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
Version 15.0.1.133 Build 20141023
@@ -3612,7 +4218,7 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers:
(moohan) Version 4.8.2 20140120 (Red Hat 4.8.2-16)
Intel(R) C Intel(R) 64 Compiler XE for
- applications running on Intel(R) 64,
+ applications running on Intel(R) 64,
Version 15.0.1.133 Build 20141023
Linux 2.6.32-431.29.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
@@ -3636,7 +4242,7 @@ They are built with the configure process unless specified otherwise.
Visual Studio 2010 w/ Intel Fortran 14 (cmake)
Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
-
+
Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
@@ -3644,15 +4250,15 @@ They are built with the configure process unless specified otherwise.
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(swallow/kite) Intel icc/icpc/ifort version 14.0.2
Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.1.1
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(wren/quail) Intel icc/icpc/ifort version 14.0.2
Mac OS X Yosemite 10.10.2 Apple clang/clang++ version 6.0 from Xcode 6.1.1
- 64-bit gfortran GNU Fortran (GCC) 4.9.2
+ 64-bit gfortran GNU Fortran (GCC) 4.9.2
(osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.1
@@ -3660,14 +4266,14 @@ Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -3675,7 +4281,7 @@ SunOS 5.11 32-bit n y/y n y y y
SunOS 5.11 64-bit n y/y n y y y
Windows 7 y y/y n y y y
Windows 7 x64 y y/y n y y y
-Windows 7 Cygwin n y/y n y y n
+Windows 7 Cygwin n y/y n y y n
Windows 8.1 n y/y n y y y
Windows 8.1 x64 n y/y n y y y
Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y
@@ -3694,30 +4300,30 @@ CentOS 7.0 Linux 3.10.0 x86_64 GNU y y/y y y y y
CentOS 7.0 Linux 3.10.0 x86_64 Intel n y/y n y y y
Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-SunOS 5.11 32-bit y y y y
-SunOS 5.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+SunOS 5.11 32-bit y y y y
+SunOS 5.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 8.1 y y y y
Windows 8.1 x64 y y y y
-Mac OS X Mountain Lion 10.8.5 64-bit y n y y
+Mac OS X Mountain Lion 10.8.5 64-bit y n y y
Mac OS X Mavericks 10.9.5 64-bit y n y y
Mac OS X Yosemeti 10.10.2 64-bit y n y y
-AIX 6.1 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+AIX 6.1 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
+CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
CentOS 7.0 Linux 3.10.0 x86_64 GNU y y y n
CentOS 7.0 Linux 3.10.0 x86_64 Intel y y y n
-Linux 2.6.32-431.11.2.el6.ppc64 y y y n
+Linux 2.6.32-431.11.2.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -3733,7 +4339,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.3 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.9.2 and gfortran 4.9.2
- (platypus) g95 (GCC 4.0.3 (g95 0.94!)
+ (platypus) g95 (GCC 4.0.3 (g95 0.94!)
FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526
(loyalty) gcc 4.6.1 20110527
@@ -3764,7 +4370,7 @@ The following platforms are not supported but have been tested for this release.
gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
(cmake and autotools)
-
+
hopper.nersc.gov PrgEnv-gnu/5.2.40
gcc (GCC) 4.9.2 20141030 (Cray Inc.)
GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.)
@@ -3774,7 +4380,7 @@ The following platforms are not supported but have been tested for this release.
Known Problems
==============
* On Windows platforms in debug configurations, the VFD flush1 tests will fail
- with the split and multi VFD drivers. These tests will display a modal debug
+ with the split and multi VFD drivers. These tests will display a modal debug
dialog which must be answered or wait for the test timeout to expire.
(ADB - 2014/06/23 - HDFFV-8851)
@@ -3798,7 +4404,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -3825,7 +4431,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -3833,15 +4439,15 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
* Shared Fortran libraries are not quite working on AIX. While they are
generated when --enable-shared is specified, the fortran and hl/fortran
- tests fail. the issue. HL and C++ shared libraries should now be
+ tests fail. the issue. HL and C++ shared libraries should now be
working as intended, however.
(MAM - 2011/04/20)
@@ -3863,32 +4469,32 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.14%%%%
+%%%%1.8.14%%%%
HDF5 version 1.8.14 released on 2014-11-12
@@ -3897,11 +4503,11 @@ HDF5 version 1.8.14 released on 2014-11-12
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.13 and
-HDF5-1.8.14, and contains information on the platforms tested and
-known problems in HDF5-1.8.14.
+This document describes the differences between HDF5-1.8.13 and
+HDF5-1.8.14, and contains information on the platforms tested and
+known problems in HDF5-1.8.14.
-All new and modified APIs are listed in the "HDF5 Software Changes
+All new and modified APIs are listed in the "HDF5 Software Changes
from Release to Release" document along with details about previous
releases at:
@@ -3916,7 +4522,7 @@ The HDF5 1.8.14 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.14 can be accessed directly at this location:
+User documentation for 1.8.14 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
@@ -3945,7 +4551,7 @@ New Features
- bin/cmakehdf5 configures, builds and installs C, C++, Fortran and High
level API's. (It used to build the C API only).
(AKC 2014/10/17 HDFFV-8932).
-
+
Library
-------
- None
@@ -3953,17 +4559,17 @@ New Features
Parallel Library
----------------
- Chunk Fill Writes Changed to Collective
-
- Slow performance in chunk fill writes. Chunk fills
- in the past were written independently by rank 0 one block
- at a time.
-
- Optimized the chunk fill write algorithm so that all
- chunk fill values will be written collectively in a single MPI-IO
- call. This should show a great performance improvement when
- creating chunked datasets in parallel when the chunk dimensions
+
+ Slow performance in chunk fill writes. Chunk fills
+ in the past were written independently by rank 0 one block
+ at a time.
+
+ Optimized the chunk fill write algorithm so that all
+ chunk fill values will be written collectively in a single MPI-IO
+ call. This should show a great performance improvement when
+ creating chunked datasets in parallel when the chunk dimensions
are fairly small.
-
+
(MSC - 2014/08/22, HDFFV-8878)
Tools
@@ -3985,7 +4591,7 @@ New Features
The data member "id" in classes that represent HDF5 objects were
initialized to 0, which caused problem for some users.
- Replaced 0 with H5I_INVALID_HID to initialize these "id"s. For the
+ Replaced 0 with H5I_INVALID_HID to initialize these "id"s. For the
PropList class, H5P_DEFAULT is used instead of H5I_INVALID_HID.
(BMR - 2014/09/30, HDFFV-4259)
@@ -3994,7 +4600,7 @@ New Features
Support for New Platforms, Languages, and Compilers
===================================================
- - None
+ - None
Bug Fixes since HDF5-1.8.13
===========================
@@ -4002,26 +4608,26 @@ Bug Fixes since HDF5-1.8.13
Configuration
-------------
- CMake and SVN URLs
-
+
The SVN URLs will be different when the HDF Group domain name changes.
-
+
Removed the SVN URL references in the cacheinit.cmake and release_docs files.
-
+
(ADB - 2014/10/27, HDFFV-8953)
- CMake Packaging
-
+
A Fortran module was not generated if the compiler was not F2003
compliant.
-
+
Removed the module name from the package list of Fortran modules because
that module was never generated. This was only an issue for Fortran
compliers that are not F2003 compatible.
-
+
(ADB - 2014/10/16, HDFFV-8932)
- Shared Library Interface Version Number (soname)
-
+
In order to increase the maintainability of HDF5, an architectural
change was made which required the renaming of several public symbols in
H5Ppublic.h.
@@ -4032,71 +4638,71 @@ Bug Fixes since HDF5-1.8.13
the 'HDF5 Software Changes from Release to Release' document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
-
+
(AKC - 2014/10/03, HDFFV-8937)
- - Configure Settings for Mac OSX Need Defaults for PROD_XXX, DEBUG_XXX,
+ - Configure Settings for Mac OSX Need Defaults for PROD_XXX, DEBUG_XXX,
and PROFILE_XXX
-
- The configure setting files for Mac OSX (config/apple) did not
- have the default settings of PROD_XXX, DEBUG_XXX, PROFILE_XXX.
-
- Added the default settings. Mac platforms now builds library with
- "-O3" optimization when the default clang compiler is used.
-
+
+ The configure setting files for Mac OSX (config/apple) did not
+ have the default settings of PROD_XXX, DEBUG_XXX, PROFILE_XXX.
+
+ Added the default settings. Mac platforms now builds library with
+ "-O3" optimization when the default clang compiler is used.
+
(AKC - 2014/10/01, HDFFV-8933)
- CMake ConfigureChecks
-
+
Two include files were missing from two C tests.
-
+
Propagated the configure test changes to H5_LDOUBLE_TO_INTEGER_WORKS_TEST
and H5_ULLONG_TO_LDOUBLE_PRECISION_TEST to ConfigureChecks.cmake (added
stdlib.h and string.h in the HDFTests.c file).
-
+
(ADB - 2014/09/02 HDFFV-8845)
-
+
- CMake Parallel Test Missing
-
- The source file was removed in the previous release but the parallel
+
+ The source file was removed in the previous release but the parallel
test t_posix_compliant was not.
-
- Removed the t_posix_compliant parallel test from the library.
-
+
+ Removed the t_posix_compliant parallel test from the library.
+
(ADB - 2014/8/14 HDFFV-8880)
- Autotools Reconfigure. Bison. Flex.
-
- The Bison and Flex files were out of date.
-
- Bison was upgraded to 2.7, and Flex was upgraded to 2.5.37. The
- bin/reconfigure script now will execute Bison and Flex and update
- the hl/src files.
-
+
+ The Bison and Flex files were out of date.
+
+ Bison was upgraded to 2.7, and Flex was upgraded to 2.5.37. The
+ bin/reconfigure script now will execute Bison and Flex and update
+ the hl/src files.
+
(ADB - 2014/06/16 HDFFV-8709)
- Autotools Reconfigure. m4.
The m4 macro processor was out of date.
-
- Reconfigured Autotools with m4 upgraded to 1.4.17.
-
+
+ Reconfigured Autotools with m4 upgraded to 1.4.17.
+
(ADB - 2014/06/12 HDFFV-8743)
-
- - Autotools: Modified configure to add an entry at the beginning of AM_LDFLAGS
- for the hdf5 install directory. Without this entry the relink commands
- invoked by "make install" to create libraries dependent on libhdf5.so added
- a dependency on the first libhdf5.so found in any directory in AM_LDFLAGS
+
+ - Autotools: Modified configure to add an entry at the beginning of AM_LDFLAGS
+ for the hdf5 install directory. Without this entry the relink commands
+ invoked by "make install" to create libraries dependent on libhdf5.so added
+ a dependency on the first libhdf5.so found in any directory in AM_LDFLAGS
regardless of its version. (LRK - 2014/10/17 HDFFV-8944)
- Changed Autotools Build Behavior. Fortran High-level Library.
- The Fortran high-level (HL) library did not compile if the default
- size of a REAL is DOUBLE PRECISION; the build would fail during
+ The Fortran high-level (HL) library did not compile if the default
+ size of a REAL is DOUBLE PRECISION; the build would fail during
compilation.
- Configure now checks to see if REAL is DOUBLE PRECISION, Fortran is
- enabled, and HL library is enabled. If this is true, then configure
+ Configure now checks to see if REAL is DOUBLE PRECISION, Fortran is
+ enabled, and HL library is enabled. If this is true, then configure
will stop with an error message.
(MSB - 2014/8/11, HDFFV-8883/HDFFV-889)
@@ -4106,36 +4712,36 @@ Bug Fixes since HDF5-1.8.13
Library
-------
- Fixed Identifier Management Code
-
- Opening an object returns an identifier; closing the object should
- free up the identifier. A problem was found where the identifiers
+
+ Opening an object returns an identifier; closing the object should
+ free up the identifier. A problem was found where the identifiers
were not being freed up correctly.
-
- Fixed the problem so that identifiers that have been used can be
+
+ Fixed the problem so that identifiers that have been used can be
used again after their object has been closed.
-
+
(QAK - 2014/10/16, HDFFV-8930)
- - Removal of DllMain() from Static Windows Builds
+ - Removal of DllMain() from Static Windows Builds
- A DllMain() function was added in HDF5 1.8.13 in order to handle
- win32 thread cleanup. The preprocessor #ifdefs around the DllMain
- function allowed it to be compiled when the static library is built,
- which is incorrect behavior that can cause linkage problems in
+ A DllMain() function was added in HDF5 1.8.13 in order to handle
+ win32 thread cleanup. The preprocessor #ifdefs around the DllMain
+ function allowed it to be compiled when the static library is built,
+ which is incorrect behavior that can cause linkage problems in
clients.
- The fix was to change the preprocessor #ifdefs to exclude compiling
- DllMain() in static builds. Our DllMain function is now only
+ The fix was to change the preprocessor #ifdefs to exclude compiling
+ DllMain() in static builds. Our DllMain function is now only
compiled when the shared, thread-safe library is built on Windows.
(DER - 2014/06/13, HDFFV-8837)
- Enforce Constraint on page_size Parameter in H5Pset_core_write_tracking()
- The reference manual states that the page_size parameter cannot be
+ The reference manual states that the page_size parameter cannot be
zero.
- This change checks the page_size parameter to see it is zero and
+ This change checks the page_size parameter to see it is zero and
returns an error code if it is.
(DER - 2014/08/11, HDFFV-8891)
@@ -4144,31 +4750,31 @@ Bug Fixes since HDF5-1.8.13
(MSC - 2014/07/31, HDFFV-8888)
- H5Ldelete_by_idx() Seg Fault on Non-existent Group Name
-
- If a non-existent group name was used by H5Ldelete_by_idx(), a
- segmentation fault would result.
-
+
+ If a non-existent group name was used by H5Ldelete_by_idx(), a
+ segmentation fault would result.
+
Bug was fixed.
-
+
(MSC - 2014/07/31, HDFFV-8888)
- Bug in Test When Building Parallel HDF5 on PVFS2
-
+
There was a bug in a test when building Parallel HDF5 on PVFS2.
-
+
The build now uses MPI_File_get_size() instead of stat().
-
+
(MSC - 2014/07/14, HDFFV-8856)
- MPI-IO Driver Tried to Allocate Space for Zero-length Dataset
-
+
MPI-IO driver tried to allocate space for zero-length dataset
- and asserts.
-
+ and asserts.
+
Fixed driver and added a regression test.
-
+
(MSC - 2014/07/03, HDFFV-8761)
-
+
Parallel Library
----------------
@@ -4184,48 +4790,48 @@ Bug Fixes since HDF5-1.8.13
Fortran API
-------
- - SIZEOF Replaced by C_SIZEOF and STORAGE_SIZE.
-
- The intrinsic function SIZEOF is non-standard and should be replaced with a
+ - SIZEOF Replaced by C_SIZEOF and STORAGE_SIZE.
+
+ The intrinsic function SIZEOF is non-standard and should be replaced with a
standard intrinsic function.
- If the F2008 intrinsic C_SIZEOF and STORAGE_SIZE are available, then they will
- be used instead of the non-standard SIZEOF intrinsic, even when the SIZEOF
+ If the F2008 intrinsic C_SIZEOF and STORAGE_SIZE are available, then they will
+ be used instead of the non-standard SIZEOF intrinsic, even when the SIZEOF
function is available.
(MSB - 2014/6/16, HDFFV-8653)
- Non-functional API: h5pget_fill_value_f
-
+
The Fortran wrapper h5pget_fill_value_f was calling the wrong C API.
- The correct C API, H5Pget_fill_value, is now called by the Fortran
+ The correct C API, H5Pget_fill_value, is now called by the Fortran
wrapper.
(MSB - 2014/9/25, HDFFV-8879)
- Interoperability with C HDF5: H5Literate and h5literate_f
- h5literate_f assumes the return value for the callback function to
- be of type int (or int_f in C). However, in the C wrapper the return
- value of H5Literate is type herr_t, and this could cause
+ h5literate_f assumes the return value for the callback function to
+ be of type int (or int_f in C). However, in the C wrapper the return
+ value of H5Literate is type herr_t, and this could cause
interoperability issues.
- The callback function should be declared INTEGER(C_INT) for
+ The callback function should be declared INTEGER(C_INT) for
portability. The tests were updated accordingly.
(MSB - 2014/9/26, HDFFV-8909)
- - Interoperability with C HDF5: Constant INTEGER Parameters with the
+ - Interoperability with C HDF5: Constant INTEGER Parameters with the
H5FD Interface
Wrong type cast of constant Fortran INTEGER parameters was used.
- The following parameter constant types were changed from INTEGER to
- INTEGER(HID_T) to match the C types: H5FD_CORE, H5FD_FAMILY, H5FD_LOG,
+ The following parameter constant types were changed from INTEGER to
+ INTEGER(HID_T) to match the C types: H5FD_CORE, H5FD_FAMILY, H5FD_LOG,
H5FD_MPIO, H5FD_MULTI, H5FD_SEC2, and H5FD_STDIO.
- Other internal 'int' types where changed to 'hid_t'; these are
+ Other internal 'int' types where changed to 'hid_t'; these are
transparent to the user.
(MSB - 2014/7/18, HDFFV-8748)
@@ -4242,7 +4848,7 @@ Bug Fixes since HDF5-1.8.13
(BMR - 2014/09/30, HDFFV-8928)
- Disallow H5F_ACC_CREAT
-
+
H5F_ACC_CREAT was included in the C++ API but the C library does not
allow it at this time.
@@ -4252,10 +4858,10 @@ Bug Fixes since HDF5-1.8.13
- Missing Flags in Documentation: H5F_ACC_RDONLY and H5F_ACC_RDWR
- The H5F_ACC_RDONLY and H5F_ACC_RDWR flags were missing from the
+ The H5F_ACC_RDONLY and H5F_ACC_RDWR flags were missing from the
documentation of the H5File constructors.
- These two flags are now included in the documentation for opening
+ These two flags are now included in the documentation for opening
files.
(BMR - 2014/09/29, HDFFV-8852)
@@ -4264,12 +4870,12 @@ Bug Fixes since HDF5-1.8.13
------
- Seg Faults in H5TBread_field_name and H5TBread_field_name_f
- When H5TBread_field_name or H5TBread_field_name_f were used to read a
- field and if the name of the field was wrong, a segmentation fault
+ When H5TBread_field_name or H5TBread_field_name_f were used to read a
+ field and if the name of the field was wrong, a segmentation fault
would result.
- Both C and Fortran APIs were fixed so they no longer seg fault if
- the name of the field is wrong, and both APIs return a negative
+ Both C and Fortran APIs were fixed so they no longer seg fault if
+ the name of the field is wrong, and both APIs return a negative
value if the name of the field is wrong.
(MSB - 2014/09/29, HDFFV-8912)
@@ -4277,25 +4883,25 @@ Bug Fixes since HDF5-1.8.13
- Possible Buffer Overflow in High-level (HL) APIs
Multiple HL APIs (H5DSis_scale is one example) had issues:
- (1) The datatype from the file was re-used as the memory datatype,
+ (1) The datatype from the file was re-used as the memory datatype,
and
- (2) No effort was made to ensure that strings were actually
+ (2) No effort was made to ensure that strings were actually
null-terminated.
-
- All of the HL routines now check for NULL pointers, for null-terminated
- strings, and to see if string buffers are short enough not to overflow
- the buffer. The minimum length of the buffers is now used in strncmp
+
+ All of the HL routines now check for NULL pointers, for null-terminated
+ strings, and to see if string buffers are short enough not to overflow
+ the buffer. The minimum length of the buffers is now used in strncmp
to avoid overflow.
(MSB - 2014/9/29, HDFFV-8670)
- Behavior Change of H5LTdtype_to_text
- If a user buffer was passed in to H5LTdtype_to_text along with the
- length, then the function would not truncate at the end of the
+ If a user buffer was passed in to H5LTdtype_to_text along with the
+ length, then the function would not truncate at the end of the
buffer, but would exceed the end of the user buffer.
- H5LTdtype_to_text was changed to truncate the string if the user
+ H5LTdtype_to_text was changed to truncate the string if the user
buffer is too small.
(MSB - 2014/9/29, HDFFV-8855)
@@ -4315,7 +4921,7 @@ Bug Fixes since HDF5-1.8.13
used by several test programs. (AKC - 2014/07/22 HDFFV-8881)
- Fixed Incorrect Exit Code Values in Testframe
- The testframe which is commonly used by several test programs
+ The testframe which is commonly used by several test programs
had some incorrect exit code values. Fixed the incorrect exit code
values. (AKC - 2014/07/22, HDFFV-8881)
@@ -4343,17 +4949,17 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54)
Version 4.8.2
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 14.0.2 (Build 20140120)
Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(platypus) Version 4.4.7 20120313
Version 4.8.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
+ Version 13.7-0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
Version 14.0.2 (Build 20140120)
@@ -4379,7 +4985,7 @@ They are built with the configure process unless specified otherwise.
Visual Studio 2010 w/ Intel Fortran 14 (cmake)
Visual Studio 2012 w/ Intel Fortran 14 (cmake)
Visual Studio 2013 w/ Intel Fortran 14 (cmake)
-
+
Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
Visual Studio 2013 w/ Intel Fortran 14 (cmake)
@@ -4391,11 +4997,11 @@ They are built with the configure process unless specified otherwise.
(duck) Intel icc/icpc/ifort version 13.0.3
Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(swallow/kite) Intel icc/icpc/ifort version 14.0.2
Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.0.1
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(wren) Intel icc/icpc/ifort version 14.0.2
@@ -4403,14 +5009,14 @@ Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -4418,7 +5024,7 @@ Solaris2.11 32-bit n y/y n y y y
Solaris2.11 64-bit n y/y n y y y
Windows 7 y y/y n y y y
Windows 7 x64 y y/y n y y y
-Windows 7 Cygwin n y/y n y y n
+Windows 7 Cygwin n y/y n y y n
Windows 8.1 n y/y n y y y
Windows 8.1 x64 n y/y n y y y
Mac OS X Lion 10.7.5 64-bit n y/y n y y y
@@ -4435,28 +5041,28 @@ CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y
CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y
Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.11 32-bit y y y y
-Solaris2.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 8.1 y y y y
Windows 8.1 x64 y y y y
-Mac OS X Lion 10.7.5 64-bit y n y y
-Mac OS X Mountain Lion 10.8.5 64-bit y n y y
+Mac OS X Lion 10.7.5 64-bit y n y y
+Mac OS X Mountain Lion 10.8.5 64-bit y n y y
Mac OS X Mavericks 10.9.5 64-bit y n y y
-AIX 5.3 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+AIX 5.3 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
-Linux 2.6.32-431.11.2.el6.ppc64 y y y n
+CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
+Linux 2.6.32-431.11.2.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -4472,7 +5078,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.2 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.9.1 and gfortran 4.9.1
- (platypus) g95 (GCC 4.0.3 (g95 0.94!)
+ (platypus) g95 (GCC 4.0.3 (g95 0.94!)
FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526
(loyalty) gcc 4.6.1 20110527
@@ -4503,7 +5109,7 @@ The following platforms are not supported but have been tested for this release.
gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
(cmake and autotools)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.2.34
hopper.nersc.gov pgcc 13.6-0 64-bit target on x86-64 Linux -tp istanbul
pgf90 13.6-0 64-bit target on x86-64 Linux -tp istanbul
@@ -4518,7 +5124,7 @@ Known Problems
(ADB - 2014/11/04 - HDFFV-8736)
* On windows platforms in debug configurations, the VFD flush1 tests will fail
- with the split and multi VFD drivers. These tests will display a modal debug
+ with the split and multi VFD drivers. These tests will display a modal debug
dialog which must be answered or wait for the test timeout to expire.
The flush1 and flush2 tests will be skipped under debug for this release.
(ADB - 2014/06/23 - HDFFV-8851)
@@ -4566,7 +5172,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -4574,8 +5180,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -4607,38 +5213,38 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.13%%%%
+%%%%1.8.13%%%%
HDF5 version 1.8.13 released on 2014-05-05
@@ -4647,10 +5253,10 @@ HDF5 version 1.8.13 released on 2014-05-05
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.12 and
-HDF5-1.8.13, and contains information on the platforms tested and
-known problems in HDF5-1.8.13.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.12 and
+HDF5-1.8.13, and contains information on the platforms tested and
+known problems in HDF5-1.8.13.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.13 source code, documentation, and additional materials
@@ -4662,18 +5268,18 @@ The HDF5 1.8.13 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.13 can be accessed directly at this location:
+User documentation for 1.8.13 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.13 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.13 (current
release) versus Release 1.8.12":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -4704,37 +5310,37 @@ New Features
- CMake: Moved minimum CMake version to 2.8.11 which enables better library
include processing. (ADB - 2014/03/26)
-
- - When configuring a thread-safe HDF5 Library it is no longer necessary
- to specify --enable-threadsafe with --with-pthreads if the Pthreads
+
+ - When configuring a thread-safe HDF5 Library it is no longer necessary
+ to specify --enable-threadsafe with --with-pthreads if the Pthreads
library is in a standard location. (DER - 2014/04/11 HDFFV-8693)
Library
-------
- - Added an H5free_memory API call. This should be used to free memory
- that has been allocated by HDF5 API calls. H5Tget_member_name and
- H5Pget_class_name are two examples. The main motivation for this call
- is Windows, where it is common for application code and the HDF5 Library
- to be using different C run-time libraries (CRT). Using the new call
- ensures that the same CRT handles both the allocation and free. This
- new function can also be useful in any case where the library uses a
- different memory manager than the application, such as when a debug
- memory manager is in use or when the HDF5 Library is wrapped for use
- in a managed language like Python or Java. Fixes HDFFV-7710, 8519,
+ - Added an H5free_memory API call. This should be used to free memory
+ that has been allocated by HDF5 API calls. H5Tget_member_name and
+ H5Pget_class_name are two examples. The main motivation for this call
+ is Windows, where it is common for application code and the HDF5 Library
+ to be using different C run-time libraries (CRT). Using the new call
+ ensures that the same CRT handles both the allocation and free. This
+ new function can also be useful in any case where the library uses a
+ different memory manager than the application, such as when a debug
+ memory manager is in use or when the HDF5 Library is wrapped for use
+ in a managed language like Python or Java. Fixes HDFFV-7710, 8519,
and 8851. (DER - 2014/04/11)
- - The Core VFD (aka Memory VFD) can now be configured to track dirty
- regions in the file and only write out the changed regions on
- flush/close. Additionally, a "page aggregation" size can be set that
- will aggregate small writes into larger writes. For example, setting
- a 1 MiB page aggregation size will logically partition the the
- in-memory file into 1 MiB pages that will be written out in their
- entirety if even a single byte is dirtied. The feature is controlled
- via the new H5Pset/get_core_write_tracking() API call. A new
- "core_paged" target has been added to the check-vfd target in
+ - The Core VFD (aka Memory VFD) can now be configured to track dirty
+ regions in the file and only write out the changed regions on
+ flush/close. Additionally, a "page aggregation" size can be set that
+ will aggregate small writes into larger writes. For example, setting
+ a 1 MiB page aggregation size will logically partition the the
+ in-memory file into 1 MiB pages that will be written out in their
+ entirety if even a single byte is dirtied. The feature is controlled
+ via the new H5Pset/get_core_write_tracking() API call. A new
+ "core_paged" target has been added to the check-vfd target in
test/Makefile.am that exercises the feature over all HDF5 VFD-aware
tests. (DER - 2014/04/12)
-
+
Parallel Library
----------------
- Removed MPI-POSIX VFD, as it wasn't helping anyone and was just
@@ -4744,7 +5350,7 @@ New Features
- Improved parallel I/O support to allow collective I/O on point
selections. (QAK - 2014/03/15)
-
+
Tools
-----
- None
@@ -4755,7 +5361,7 @@ New Features
Fortran API
-----------
- - Wrappers h5pset_file_image_f and h5pget_file_image_f were added to the
+ - Wrappers h5pset_file_image_f and h5pget_file_image_f were added to the
library. (MSB - 2014/1/2014)
C++ API
@@ -4772,7 +5378,7 @@ New Features
H5O_type_t childObjType(hsize_t index,
H5_index_t index_type=H5_INDEX_NAME,
H5_iter_order_t order=H5_ITER_INC, const char* objname=".")
- + Wrappers to class DSetMemXferPropList for setting/getting a transform
+ + Wrappers to class DSetMemXferPropList for setting/getting a transform
property list (HDFFV-7907).
DSetMemXferPropList(const char* expression);
void setDataTransform(const char* expression)
@@ -4781,7 +5387,7 @@ New Features
H5std_string getDataTransform()
+ Wrapper to CompType for setting size to compound datatype (HDFFV-8642).
void setSize(size_t size)
- + Overloaded functions to provide prototypes that declare constant
+ + Overloaded functions to provide prototypes that declare constant
arguments const (HDFFV-3384). These include:
DataSet::fillMemBuf
DataSet::getVlenBufSize
@@ -4796,11 +5402,11 @@ New Features
ssize_t getName(char* attr_name, size_t buf_size=0)
ssize_t getName(H5std_string& attr_name, size_t buf_size=0)
(BMR, 2014/04/15)
- + A static wrapper to Exception for printing the error stack without an
- instance of Exception
- static void printErrorStack(FILE* stream = stderr,
- hid_t err_stack = H5E_DEFAULT);
- (BMR, 2014/04/25)
+ + A static wrapper to Exception for printing the error stack without an
+ instance of Exception
+ static void printErrorStack(FILE* stream = stderr,
+ hid_t err_stack = H5E_DEFAULT);
+ (BMR, 2014/04/25)
Support for New Platforms, Languages, and Compilers
@@ -4810,7 +5416,7 @@ Support for New Platforms, Languages, and Compilers
supported platforms. (AKC - 2014/03/14 HDFFV-8704)
Mac OS X 10.9 Mavericks is supported. (AKC - 2014/03/04 HDFFV-8694)
-
+
Bug Fixes since HDF5-1.8.12
===========================
@@ -4820,42 +5426,42 @@ Bug Fixes since HDF5-1.8.12
- CMake: When CMake commands are executed individually on the command line
and the external filters are being built, the CMAKE_BUILD_TYPE define
must be set to the same value as the configuration
- (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed
+ (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed
by the the szip and zlib filter build commands. (ADB - HDFFV-8695)
- - CMake: Removed use of the XLATE_UTILITY program.
+ - CMake: Removed use of the XLATE_UTILITY program.
(ADB - 2014/03/28 HDFFV-8640)
- CMake: Added missing quotes in setting the CMAKE_EXE_LINKER_FLAGS for the
MPI option. (ADB - 2014/02/27 HDFFV-8674)
- - CMake: Configuration of the HDF5 C++ or Fortran libraries with the
+ - CMake: Configuration of the HDF5 C++ or Fortran libraries with the
thread-safety feature.
C++ and/or Fortran + thread-safe is enforced as a non-supported
configuration. This matches the autotools. (DER - 2014/04/11)
- CMake: Configuration of static HDF5 C library with the thread-safety
- feature.
+ feature.
Static + thread-safe + Win32 threads is not a supported configuration
- due to the inability to automatically clean up thread-local storage.
- This is expected to be fixed in a future release. In the meantime, a
- work-around that uses internal functionality may allow the combination
- to be used without resource leaks. Contact the help desk for more
+ due to the inability to automatically clean up thread-local storage.
+ This is expected to be fixed in a future release. In the meantime, a
+ work-around that uses internal functionality may allow the combination
+ to be used without resource leaks. Contact the help desk for more
information. (DER - 2014/04/11)
- - Autotools: Several changes were done to configure and installcheck.
+ - Autotools: Several changes were done to configure and installcheck.
An export of LD_LIBRARY_PATH=<szip library location> was
removed from configure; make installcheck was revised to run
- scripts installed in share/hdf5_examples to use the installed h5cc, etc.
- to compile and run example source files also installed there.
+ scripts installed in share/hdf5_examples to use the installed h5cc, etc.
+ to compile and run example source files also installed there.
- Make installcheck will now fail when a shared szip or other external lib
- file cannot be found in the same manner that executables compiled and
- linked with h5cc will fail to run when those lib files cannot be found
- after install. Make installcheck should pass after setting
+ Make installcheck will now fail when a shared szip or other external lib
+ file cannot be found in the same manner that executables compiled and
+ linked with h5cc will fail to run when those lib files cannot be found
+ after install. Make installcheck should pass after setting
LD_LIBRARY_PATH to the szip location. (LRK - 2014/04/16)
Library
@@ -4867,50 +5473,50 @@ Bug Fixes since HDF5-1.8.12
either do not use parallel make or install Gnu Make to build the library.
(AKC 2014/04/08 HDFFV-8738)
- - H5R.c: H5Rget_name gave an assertion failure if the "name" parameter
+ - H5R.c: H5Rget_name gave an assertion failure if the "name" parameter
was NULL.
Fixed H5Rget_name to return the size of the buffer needed to read a
- name of the referenced object in this case. The size doesn't include
- the NULL terminator. H5Rget_name returns negative on failure.
+ name of the referenced object in this case. The size doesn't include
+ the NULL terminator. H5Rget_name returns negative on failure.
(MSB - 2014/01/22 HDFFV-8620)
- H5Z.c: H5Zfilter_avail didn't check if a filter was available as a
dynamically loaded filter. The error manifested itself in the h5repack
tool when removing user-defined dynamically loaded filter.
- Added a code to find the filter among the dynamically loaded filters
- after the function fails to find it among the registered filters.
+ Added a code to find the filter among the dynamically loaded filters
+ after the function fails to find it among the registered filters.
(ADB - 2014/03/03 HDFFV-8629)
- - Memory leak: a memory leak was observed in conjunction to the
- H5TS_errstk_key_g thread-local variable allocated in the H5E_get_stack
- function in H5E.c.
+ - Memory leak: a memory leak was observed in conjunction to the
+ H5TS_errstk_key_g thread-local variable allocated in the H5E_get_stack
+ function in H5E.c.
- The shared HDF5 thread-safe library now no longer leaks thread-local
- storage resources on Windows with Win32 threads. Currently, there is
- no solution for this problem when HDF5 is statically built. We
- disabled the build of the static HDF5 thread-safe library with
+ The shared HDF5 thread-safe library now no longer leaks thread-local
+ storage resources on Windows with Win32 threads. Currently, there is
+ no solution for this problem when HDF5 is statically built. We
+ disabled the build of the static HDF5 thread-safe library with
Win32 threads. (DER - 2014/04/11 HDFFV-8518)
- - H5Dio.c: Improved handling of NULL pointers to H5Dread/H5Dwrite
+ - H5Dio.c: Improved handling of NULL pointers to H5Dread/H5Dwrite
calls. Credit to Jason Newton (nevion@gmail.com) for the original patch.
- H5Dwrite/read failed when a NULL pointer was passed for a data buffer
+ H5Dwrite/read failed when a NULL pointer was passed for a data buffer
and 0 elements were selected. Fixed. (QAK - 2014/04/16 HDFFV-8705)
- Deprecated API (1_6 API): Improved handling of closing the library and
re-accessing it with a deprecated routine.
- When a program used a deprecated API (for example, H5Gcreate1),
- closed the library, and reopened it again to access a group, dataset,
- datatype, dataspace, attribute, or property list, HDF5 failed to
+ When a program used a deprecated API (for example, H5Gcreate1),
+ closed the library, and reopened it again to access a group, dataset,
+ datatype, dataspace, attribute, or property list, HDF5 failed to
provide an identifier for the object. Fixed.
(NAF, QAK - 2014/04/16 HDFFV-8232)
Parallel Library
----------------
- - Fixed a missing H5F_Provisional module in HDF5mpio.f90
+ - Fixed a missing H5F_Provisional module in HDF5mpio.f90
(MSB - 2014/2/7 HDFFV-8651)
Performance
@@ -4926,11 +5532,11 @@ Bug Fixes since HDF5-1.8.12
- The h5dump and h5diff utilities occasionally produced different output
between Linux and Windows systems. This has been fixed.
-
- This happened to datasets that used chunked storage, with default fill
- values, and some of the chunks had not been written.
- When the dataset was read, the library failed to write the default fill
- values to parts of the use buffer that were associated with the unwritten
+
+ This happened to datasets that used chunked storage, with default fill
+ values, and some of the chunks had not been written.
+ When the dataset was read, the library failed to write the default fill
+ values to parts of the use buffer that were associated with the unwritten
chunks. (JP - 2014/05/01 HDFFV-8247)
- The compress option is retired from bin/release.
@@ -4939,8 +5545,8 @@ Bug Fixes since HDF5-1.8.12
- bin/release has a new option "zip" that produces a release zip file for
the Windows platform. (AKC - 2014/04/24 HDFFV-8433)
- - h5diff: Several failures relating to handling of strings attributes
- are fixed.
+ - h5diff: Several failures relating to handling of strings attributes
+ are fixed.
The tool crashed or gave an error message when one of the strings had
fixed size type and another variable-length size type. h5diff now flags such
@@ -4949,13 +5555,13 @@ Bug Fixes since HDF5-1.8.12
(AKC - 2014/04/18 HDFFV-8625, 8639, 8745)
- h5repack: h5repack would not remove user-defined filters.
- Fixed by modifying h5repack to check if the filter is registered or
+ Fixed by modifying h5repack to check if the filter is registered or
can be dynamically loaded. (ADB - 2014/03/03 HDFFV-8629)
F90 API
-------
- - H5D_CHUNK_CACHE_NSLOTS_DFLT_F and H5D_CHUNK_CACHE_NBYTES_DFLT_F were
- changed from the default KIND for INTEGER to INTEGER of KIND size_t.
+ - H5D_CHUNK_CACHE_NSLOTS_DFLT_F and H5D_CHUNK_CACHE_NBYTES_DFLT_F were
+ changed from the default KIND for INTEGER to INTEGER of KIND size_t.
(MSB - 2014/3/31 HDFFV-8689)
C++ API
@@ -4976,14 +5582,14 @@ Bug Fixes since HDF5-1.8.12
Testing
-------
- - testhdf5 now exits with EXIT_SUCCESS(0) if no errors, else
+ - testhdf5 now exits with EXIT_SUCCESS(0) if no errors, else
EXIT_FAILURE(1). (AKC - 2014/01/27 HDFFV-8572)
- The big test now pays attention to the HDF5_DRIVER environment variable.
Previously, it would run all tests with the family, stdio, and sec2
- virtual file drivers (VFDs) for each VFD in the check-vfd make target,
- regardless of the variable setting. It now checks the variable and
- either runs the appropriate VFD-specific tests or skips as needed.
+ virtual file drivers (VFDs) for each VFD in the check-vfd make target,
+ regardless of the variable setting. It now checks the variable and
+ either runs the appropriate VFD-specific tests or skips as needed.
This saves much testing time. Fixes HDFFV-8554. (DER - 2014/04/11)
Supported Platforms
@@ -4994,7 +5600,7 @@ They are built with the configure process unless specified otherwise.
AIX 5.3 xlc 10.1.0.5
(NASA G-ADA) xlC 10.1.0.5
xlf90 12.1.0.6
- gmake v3.82
+ gmake v3.82
Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP i686 i686 i386 compilers for 32-bit applications;
@@ -5011,20 +5617,20 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54)
Version 4.8.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Version 13.7-0
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 14.0.2 (Build 20140120)
Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(platypus) Version 4.4.7 20120313
Version 4.8.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
+ Version 13.7-0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
Version 14.0.2 (Build 20140120)
@@ -5048,7 +5654,7 @@ They are built with the configure process unless specified otherwise.
Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 14 (cmake)
Visual Studio 2010 w/ Intel Fortran 14 (cmake)
Visual Studio 2012 w/ Intel Fortran 14 (cmake)
-
+
Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
@@ -5058,11 +5664,11 @@ They are built with the configure process unless specified otherwise.
(duck) Intel icc/icpc/ifort version 13.0.3
Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.0 from Xcode 5.0.2
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(swallow/kite) Intel icc/icpc/ifort version 14.0.2
Mac OS X Mavericks 10.9.2 Apple clang/clang++ version 5.1 from Xcode 5.1
- 64-bit gfortran GNU Fortran (GCC) 4.8.2
+ 64-bit gfortran GNU Fortran (GCC) 4.8.2
(wren/quail) Intel icc/icpc/ifort version 14.0.2
@@ -5070,14 +5676,14 @@ Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -5103,28 +5709,28 @@ CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y
Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y
OpenVMS IA64 V8.4 n y/n n y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.11 32-bit y y y y
-Solaris2.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 8.1 y y y y
Windows 8.1 x64 y y y y
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
Mac OS X Mavericks 10.9.1 64-bit y n y y
-AIX 5.3 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+AIX 5.3 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
-Linux 2.6.32-431.11.2.el6.ppc64 y y y n
+CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n
+Linux 2.6.32-431.11.2.el6.ppc64 y y y n
OpenVMS IA64 V8.4 n n n n
Compiler versions for each platform are listed in the preceding
@@ -5141,7 +5747,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.8.2 and gfortran 4.8.2
- (platypus) g95 (GCC 4.0.3 (g95 0.94!)
+ (platypus) g95 (GCC 4.0.3 (g95 0.94!)
FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526
(loyalty) gcc 4.6.1 20110527
@@ -5172,7 +5778,7 @@ The following platforms are not supported but have been tested for this release.
gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
GNU Fortran (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
(cmake and autotools)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
@@ -5193,20 +5799,20 @@ Known Problems
(AKC 2014/05/02 HDFFV-8479)
* Due to an Intel compiler bug introduced in version 14.0.1, the HDF5 FORTRAN
- wrappers do not work with configure option --enable-fortran2003.
- However, the option --enable-fortran works with Intel 14.0.1. The compiler
- bug was fixed in Intel version 14.0.2 and resolved the issue.
+ wrappers do not work with configure option --enable-fortran2003.
+ However, the option --enable-fortran works with Intel 14.0.1. The compiler
+ bug was fixed in Intel version 14.0.2 and resolved the issue.
(MSB - 2014/4/15)
-* Due to a PGI compiler bug introduced in versions before 13.3 and versions
- after 14.2, the FORTRAN test 'Testing get file image' will fail.
+* Due to a PGI compiler bug introduced in versions before 13.3 and versions
+ after 14.2, the FORTRAN test 'Testing get file image' will fail.
(MSB - 2014/4/15)
-* On CYGWIN, when building the library dynamically, testing will fail on
- dynamically loaded filters. The test process will build dynamic filter
- libraries with the *.dll.a extension, and the HDF5 Library will be looking
+* On CYGWIN, when building the library dynamically, testing will fail on
+ dynamically loaded filters. The test process will build dynamic filter
+ libraries with the *.dll.a extension, and the HDF5 Library will be looking
for *.so libraries. Entered as issue HDFFV-8736. (ADB - 2014/04/14)
-
+
* A Gnu Make directive (.NOTPARALLEL) is added to fortran/test/Makefile.
AIX native make does not support this directive and would fail if
parallel make (e.g. make -j4) is used to build the library. AIX users
@@ -5231,7 +5837,7 @@ Known Problems
* On OpenVMS, ZLIB 1.2.8 library doesn't work properly. ZLIB 1.2.5 works
fine. So please use ZLIB 1.2.5 to build HDF5 library. (Issue VMS-5;
- SLU 2013/09/19)
+ SLU 2013/09/19)
* When building using the Cray compilers on Cray machines, HDF5
configure mistakenly thinks the compiler is an intel compiler and
@@ -5240,15 +5846,15 @@ Known Problems
INSTALL_parallel for building on Hopper.
(MSC - 2013/04/26 - HDFFV-8429)
-* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
+* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
complains with this message:
"/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined.
-
+
The reason is that __func__ is a predefined identifier in C99 standard. The
- HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
+ HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9
C++ compiler doesn't support __func__, thus fails to compile the C++ test.
- But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
+ But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
knows this identifier, try to compile the following simple C++ program:
#include<stdio.h>
@@ -5269,7 +5875,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -5280,21 +5886,21 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it's a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
This will overwrite the library's default optimization level.
(SLU - 2012/02/07 - HDFFV-7829)
- This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
+ This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
gcc 4.7.2.
* The STDIO VFD does not work on some architectures, possibly due to 32/64
@@ -5317,7 +5923,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -5325,8 +5931,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -5361,42 +5967,42 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.12%%%%
+%%%%1.8.12%%%%
HDF5 version 1.8.12 released on 2013-11-04
@@ -5405,10 +6011,10 @@ HDF5 version 1.8.12 released on 2013-11-04
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.11 and
-HDF5-1.8.12, and contains information on the platforms tested and
-known problems in HDF5-1.8.12.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.11 and
+HDF5-1.8.12, and contains information on the platforms tested and
+known problems in HDF5-1.8.12.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.12 source code, documentation, and additional materials
@@ -5420,18 +6026,18 @@ The HDF5 1.8.12 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.12 can be accessed directly at this location:
+User documentation for 1.8.12 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.12 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.12 (current
release) versus Release 1.8.11":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -5463,25 +6069,25 @@ New Features
The cmake option is -DH5_DEFAULT_PLUGINDIR:PATH=location.
HDFFV-8513. (ADB 2013/09/04)
- Renamed FFLAGS to FCFLAGS in configure. (ADB 2013/08/13)
- - CMake can now package a compressed examples file, the default for
+ - CMake can now package a compressed examples file, the default for
Windows binaries from HDF Group. (ADB - 2013/07/22)
-
+
Library
-------
- None
-
+
Parallel Library
----------------
- None
-
+
Tools
-----
- - h5repack: Added the ability to use plugin filters to read and write
- files. The option uses the filter number. HDFFV-8345
+ - h5repack: Added the ability to use plugin filters to read and write
+ files. The option uses the filter number. HDFFV-8345
(ADB - 2013/09/04).
- - h5dump: Added the option -N --any_path, which searches the file for
+ - h5dump: Added the option -N --any_path, which searches the file for
paths that match the search path. HDFFV-7989 (ADB - 2013/08/12).
- - h5dump: Added the optional arg 0 to -A, which excludes attributes
+ - h5dump: Added the optional arg 0 to -A, which excludes attributes
from display. HDFFV-8134 (ADB - 2013/08/01).
High-Level APIs
@@ -5504,11 +6110,11 @@ New Features
an attribute. (BMR - 2013/09/27)
- Added wrappers for H5Rget_obj_type2 to retrieve the type of the object
that an object reference points to. (BMR - 2013/09/27)
- H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type)
+ H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type)
- Added wrappers for H5Aexist to check whether an attribute exists given
a name. (BMR - 2013/09/27)
- bool H5::H5Location::attrExists(const char* name)
- bool H5::H5Location::attrExists(const H5std_string& name)
+ bool H5::H5Location::attrExists(const char* name)
+ bool H5::H5Location::attrExists(const H5std_string& name)
- Added a number of overloaded functions for convenience. (BMR - 2013/09/27)
@@ -5522,7 +6128,7 @@ Bug Fixes since HDF5-1.8.11
Configuration
-------------
- Modified H5detect.c to scan floating point types for padding bits before
- analyzing the type further. This should fix problems with gcc 4.8.
+ analyzing the type further. This should fix problems with gcc 4.8.
(NAF - 2013/09/19 - HDFFV-8523/HDFFV-8500)
- HDF5 rpaths are no longer encoded in the library files when configured
with --disable-sharedlib-rpath. (LRK-2013-09-23 - HDFFV-8276)
@@ -5532,7 +6138,7 @@ Bug Fixes since HDF5-1.8.11
- Added const qualifier to source buffer parameters in H5Dgather and
H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/09)
- - CMake now creates *.so.{lt_version} files with the same version as
+ - CMake now creates *.so.{lt_version} files with the same version as
configure. (ADB - 2013/06/05 HDFFV-8437)
Parallel Library
@@ -5545,14 +6151,14 @@ Bug Fixes since HDF5-1.8.11
Tools
-----
- - h5dump: Added the option -N --any_path, which searches the file for
+ - h5dump: Added the option -N --any_path, which searches the file for
paths that match the search path. HDFFV-7989 (ADB - 2013/08/12).
- - h5dump: Added the optional arg 0 to -A, which excludes attributes
+ - h5dump: Added the optional arg 0 to -A, which excludes attributes
from display. HDFFV-8134 (ADB - 2013/08/01).
- h5dump correctly exports subsetted data to a file, using the --output
option. (ADB - 2013/06/07 HDFFV-8447)
- h5cc and other compile scripts now default to linking shared libraries
- when HDF5 is configured with the --disable-static option.
+ when HDF5 is configured with the --disable-static option.
(LRK - 2013-09-23 - HDFFV-8141)
F90 API
@@ -5603,20 +6209,20 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54)
Version 4.8.1
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Version 13.7-0
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 13.1.3 (Build 20130607)
Linux 2.6.32-358.18.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(platypus) Version 4.4.7 20120313
Version 4.8.1
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 13.7-0
+ Version 13.7-0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
Version 13.1.3 (Build 20130607)
@@ -5659,22 +6265,22 @@ They are built with the configure process unless specified otherwise.
64-bit gfortran GNU Fortran (GCC) 4.6.2
(wren) Intel icc/icpc/ifort version 13.0.3
- OpenVMS IA64 V8.4 HP C V7.3-018
+ OpenVMS IA64 V8.4 HP C V7.3-018
HP Fortran V8.2-104939-50H96
- HP C++ V7.4-004
+ HP C++ V7.4-004
Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -5700,28 +6306,28 @@ CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y
Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y
OpenVMS IA64 V8.4 n y/n n y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.11 32-bit y y y y
-Solaris2.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 8.1 y y y y
Windows 8.1 x64 y y y y
-Mac OS X Snow Leopard 10.6.8 64-bit y n y n
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
-AIX 5.3 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n
+Mac OS X Snow Leopard 10.6.8 64-bit y n y n
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+AIX 5.3 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-Linux 2.6.32-358.2.1.el6.ppc64 y y y n
+Linux 2.6.32-358.2.1.el6.ppc64 y y y n
OpenVMS IA64 V8.4 n n n n
Compiler versions for each platform are listed in the preceding
@@ -5739,7 +6345,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-308.16.1.el5 MPICH mpich2-1.4.1p1 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.1.2 and gfortran 4.1.2
(koala) g95 (GCC 4.0.3 (g95 0.94!)
-
+
FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526
(loyalty) gcc 4.6.1 20110527
g++ 4.6.1 20110527
@@ -5762,14 +6368,14 @@ The following platforms are not supported but have been tested for this release.
SUSE 12.3 3.7.10-1.16-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
gcc (SUSE Linux) 4.7.2
- GNU Fortran (SUSE Linux) 4.7.2
+ GNU Fortran (SUSE Linux) 4.7.2
(cmake and autotools)
Ubuntu 13.04 3.8.0-30-generic #44-Ubuntu SMP x86_64 GNU/Linux
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
GNU Fortran (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
(cmake and autotools)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
@@ -5783,22 +6389,22 @@ Known Problems
is built in place. The issue will be addressed in the 1.8.13 release. We
recommend to use build directory to compile and test HDF5 as described
in the INSTALL file, section 4.2.
-
+
* Source directory names with spaces in them will cause failures in configure
- or make on Mac (HDFFV-8152), Linux, and probably all other platforms. If a
- configure command with a space is run from a build directory, it will exit
- with an error message: "checking whether build environment is sane...
- configure: error: unsafe srcdir value: '/scr/lrknox/hdf5 v1.8.12'". If
- configure is run inside or below the directory with the space in the name,
- libtool will get the directory path from the system, put the part of the
- path before the space in the libdir variable in .../src/libhdf5.la, and
- then fail to find the nonexistent directory. This is a known libtool issue
- and the suggested workaround is to rename the directory without spaces.
+ or make on Mac (HDFFV-8152), Linux, and probably all other platforms. If a
+ configure command with a space is run from a build directory, it will exit
+ with an error message: "checking whether build environment is sane...
+ configure: error: unsafe srcdir value: '/scr/lrknox/hdf5 v1.8.12'". If
+ configure is run inside or below the directory with the space in the name,
+ libtool will get the directory path from the system, put the part of the
+ path before the space in the libdir variable in .../src/libhdf5.la, and
+ then fail to find the nonexistent directory. This is a known libtool issue
+ and the suggested workaround is to rename the directory without spaces.
(LRK - 2013/10/22)
* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv
- catches some undefined behavior in the alignment algorithm of the macro
- DETECT_I in H5detect.c (HDFFV-8147). This issue will be addressed in the
+ catches some undefined behavior in the alignment algorithm of the macro
+ DETECT_I in H5detect.c (HDFFV-8147). This issue will be addressed in the
next release. (SLU - 2013/10/16)
* Running make check for the tools can fail in the tools tests if make was not
@@ -5816,7 +6422,7 @@ Known Problems
* On OpenVMS, ZLIB 1.2.8 library doesn't work properly. ZLIB 1.2.5 works
fine. So please use ZLIB 1.2.5 to build HDF5 library. (Issue VMS-5;
- SLU 2013/09/19)
+ SLU 2013/09/19)
* When building using the Cray compilers on Cray machines, HDF5
configure mistakenly thinks the compiler is an intel compiler and
@@ -5833,15 +6439,15 @@ Known Problems
spurious data values has only been encountered on Windows 32-bit systems.
(Issue HDFFV-8247; JP - 2013/03/27)
-* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
+* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
complains with this message:
"/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined.
-
+
The reason is that __func__ is a predefined identifier in C99 standard. The
- HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
+ HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9
C++ compiler doesn't support __func__, thus fails to compile the C++ test.
- But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
+ But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
knows this identifier, try to compile the following simple C++ program:
#include<stdio.h>
@@ -5862,7 +6468,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -5873,21 +6479,21 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it is a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernel
- (3.2.2 on Fedora) do not have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) do not have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
This will overwrite the library's default optimization level.
(SLU - 2012/02/07 - HDFFV-7829)
- This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
+ This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
gcc 4.7.2.
* The STDIO VFD does not work on some architectures, possibly due to 32/64
@@ -5910,7 +6516,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -5918,8 +6524,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -5954,42 +6560,42 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.11%%%%
+%%%%1.8.11%%%%
HDF5 version 1.8.11 released on 2013-05-08
@@ -5998,10 +6604,10 @@ HDF5 version 1.8.11 released on 2013-05-08
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.10 and
-HDF5-1.8.11-*, and contains information on the platforms tested and
-known problems in HDF5-1.8.11-*.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.10 and
+HDF5-1.8.11-*, and contains information on the platforms tested and
+known problems in HDF5-1.8.11-*.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.11 source code, documentation, and additional materials
@@ -6013,18 +6619,18 @@ The HDF5 1.8.11 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.11 can be accessed directly at this location:
+User documentation for 1.8.11 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.11 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.11 (current
release) versus Release 1.8.10":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -6059,11 +6665,11 @@ New Features
- A new tool, cmakehdf5, which is a build command script similar to
buildhdf5 is added and is available in the bin directory.
(AKC - 2013/01/16 HDFFV-8336)
-
+
Library
-------
- The library can load filter libraries dynamically during runtime. Users
- can set the search path through environment variable HDF5_PLUGIN_PATH
+ can set the search path through environment variable HDF5_PLUGIN_PATH
and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08)
- Added new API functions H5Dscatter and H5Dgather to scatter data to and
and gather data from a selection within a memory buffer.
@@ -6071,11 +6677,11 @@ New Features
- The library now supports the data conversion from enumeration to numeric
(integer and floating-point number) datatypes. See Issue HDFFV-8221.
(SLU - 2012/10/23)
-
+
Parallel Library
----------------
- None
-
+
Tools
-----
- h5dump: added new option -O or -ddl to output the ddl text to a file. This
@@ -6084,8 +6690,8 @@ New Features
High-Level APIs
---------------
- - A new API function, H5DOwrite_chunk. This function writes a data chunk
- directly into a file, bypassing hyperslab selection, data conversion,
+ - A new API function, H5DOwrite_chunk. This function writes a data chunk
+ directly into a file, bypassing hyperslab selection, data conversion,
and the filter pipeline. The user must be careful with the function and
clearly understand the I/O process of the library. (SLU - 2013/2/11)
@@ -6094,11 +6700,11 @@ New Features
- New API functions added (MSB - 2013/3/23):
h5odecr_refcount_f, h5oexists_by_name_f, h5oget_comment_f,
- h5oget_comment_by_name_f, h5oincr_refcount_f, h5oopen_by_idx_f,
+ h5oget_comment_by_name_f, h5oincr_refcount_f, h5oopen_by_idx_f,
h5oset_comment_f, h5oset_comment_by_name_f, h5oset_comment_by_name_f
F2003: h5oget_info_f, h5oget_info_by_idx_f, h5ovisit_by_name_f
-
+
C++ API
-------
@@ -6120,24 +6726,24 @@ Bug Fixes since HDF5-1.8.10
- Fixed Thread-safe configure failure for the AIX platform.
(AKC - 2013/04/19 HDFFV-8390)
- Configure will check the result of header searches before searching for
- the library.
+ the library.
Fixes HDFFV-8257 (ADB 2013/03/04)
- - HDF does not support building SHARED Fortran libraries on OSX. Added
- CMake code to check for this condition.
+ - HDF does not support building SHARED Fortran libraries on OSX. Added
+ CMake code to check for this condition.
Fixes HDFFV-8227 (ADB 2013/03/04)
- - CMake builds on Windows will no longer use legacy naming for libraries.
+ - CMake builds on Windows will no longer use legacy naming for libraries.
The "dll" tag will no longer be added to the name of *.lib and *.dll.
The option HDF_LEGACY_NAMING is now OFF by default.
Fixes HDFFV-8292 (ADB 2013/01/30)
Library
-------
- - The library now behaves correctly when performing large I/O operations
- on Mac OS-X. Previously, single I/O operations > 2 GB would fail
- since the Darwin read/write calls cannot handle the number of bytes
+ - The library now behaves correctly when performing large I/O operations
+ on Mac OS-X. Previously, single I/O operations > 2 GB would fail
+ since the Darwin read/write calls cannot handle the number of bytes
that their parameter types imply.
Fixes HDFFV-7975 and HDFFV-8240 (DER 2013/01/07)
- - Fixed a bug in the core VFD that causes failures when opening files
+ - Fixed a bug in the core VFD that causes failures when opening files
> 2 GB.
Fixes HDFFV-8124 and HDFFV-8158 (DER 2013/01/07)
- Fixed a bug where unintialized memory was read during variable-length
@@ -6145,9 +6751,9 @@ Bug Fixes since HDF5-1.8.10
(DER 2013/03/30)
- Removed the H5Pset/get_dxpl_multi functions from the library. The
intended functionality for them was never fully implemented, and they
- have always been fundamentally broken. NOTE: This does not affect
- setting the multi VFD or any expected VFD functionality. Multi VFD
- usage remains unchanged.
+ have always been fundamentally broken. NOTE: This does not affect
+ setting the multi VFD or any expected VFD functionality. Multi VFD
+ usage remains unchanged.
Fixes HDFFV-8296. (DER 2013/03/30)
Parallel Library
@@ -6161,22 +6767,22 @@ Bug Fixes since HDF5-1.8.10
Tools
-----
- h5redeploy is changed to do this by default:
- Installation directories:
- prefix architecture-independent files.
- exec_prefix architecture-dependent files, default is <prefix>.
- libdir libraries, default is <exec_prefix>/lib.
- includedir header files, default is <prefix/include>.
+ Installation directories:
+ prefix architecture-independent files.
+ exec_prefix architecture-dependent files, default is <prefix>.
+ libdir libraries, default is <exec_prefix>/lib.
+ includedir header files, default is <prefix/include>.
This allows users to just change the first line of prefix=<...> and the
effect will change libdir and includedir too. (AKC 2013/04/05 HDFFV-8358)
- - h5repack: Fixed failure to convert the layout of a small chunked
+ - h5repack: Fixed failure to convert the layout of a small chunked
dataset (size < 1K) to contiguous layout. HDFFV-8214 (JKM 2013/03/26)
- - h5dump: Fixed displaying compression ratio for unknown or user-defined
+ - h5dump: Fixed displaying compression ratio for unknown or user-defined
filters. HDFFV-8344 (XCAO 2013/03/19)
- - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined
+ - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined
filter. HDFFV-8346 (XCAO 2013/03/19)
- - h5diff: Fixed to return the correct exit code 1 when the program
- detects a unique extra attribute. Prior to this fix, h5diff returned
- exit code 0 indicating the two files are identical.
+ - h5diff: Fixed to return the correct exit code 1 when the program
+ detects a unique extra attribute. Prior to this fix, h5diff returned
+ exit code 0 indicating the two files are identical.
HDFFV-7643 (JKM 2013/02/15)
- h5dump: Fixed writing nulls to a binary file when exporting a dataset
with compound string datatype. HDFFV-8169 (ADB 2013/1/31)
@@ -6184,10 +6790,10 @@ Bug Fixes since HDF5-1.8.10
other machines that display extra output if an MPI task returns with a
non-zero code.)
Testing h5stat notexist.h5
- The test script was fixed to ignore the extra output. HDFFV-8233
+ The test script was fixed to ignore the extra output. HDFFV-8233
(AKC - 2012/11/30)
- h5diff: Improved speed when comparing HDF5 files with lots of
- attributes. Much slower performance was identified with release versions
+ attributes. Much slower performance was identified with release versions
from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
F90 API
@@ -6195,28 +6801,28 @@ Bug Fixes since HDF5-1.8.10
- The integer type of the 'offset' argument in h5pset_external_f and
h5pget_external_f was changed to INTEGER(KIND=OFF_T) to support 8-byte
integers, matching the C type definition of off_t. (MSB - 2013/3/23)
- - h5fc updated to recognize .f95, .f03 and .f08 file extensions.
+ - h5fc updated to recognize .f95, .f03 and .f08 file extensions.
C++ API
------
- - The C++ wrappers DSetMemXferPropList::setMulti/getMulti were removed
- because the C functions H5Pset/get_dxpl_multi functions are removed
+ - The C++ wrappers DSetMemXferPropList::setMulti/getMulti were removed
+ because the C functions H5Pset/get_dxpl_multi functions are removed
from the library. Fixes HDFFV-8296 by DER. (BMR 2013/03/30)
- An exception thrown by an internal function was not propagating to the
test program during stack unwinding, so it couldn't be caught by the
- test, and the program terminated "without an active exception." It
- seemed that the problem happened when c_str() was used to generate
- an equivalent const char* from a std::string and the resulting string
- was passed to the internal function. As a work-around, we added a
- try/catch around the the call to the internal function and when the
- exception is caught there, it is re-thrown. Fixes HDFFV-8067.
+ test, and the program terminated "without an active exception." It
+ seemed that the problem happened when c_str() was used to generate
+ an equivalent const char* from a std::string and the resulting string
+ was passed to the internal function. As a work-around, we added a
+ try/catch around the the call to the internal function and when the
+ exception is caught there, it is re-thrown. Fixes HDFFV-8067.
(BMR 2013/03/30)
High-Level APIs:
------
- - Fixed a problem with H5DSget_scale_name including the NULL terminator
- in the size calculation returned by the function. The API was changed
- to NOT include the NULL terminator in the size of name returned
+ - Fixed a problem with H5DSget_scale_name including the NULL terminator
+ in the size calculation returned by the function. The API was changed
+ to NOT include the NULL terminator in the size of name returned
(MSB- 2013/2/10)
Fortran High-Level APIs:
@@ -6262,12 +6868,12 @@ They are built with the configure process unless specified otherwise.
#1 SMP x86_64 GNU/Linux compilers for 64-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
Version 4.6.3
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 11.9-0
+ Version 11.9-0
Version 12.5-0
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 12.1 (Build 20110811)
Version 12.1 (Build 20120212)
@@ -6311,7 +6917,7 @@ They are built with the configure process unless specified otherwise.
(duck) Intel icc/icpc/ifort version 13.0
Mac OS X Mountain Lion 10.8.1 Apple clang/clang++ version 4.2 from Xcode 4.6.1
- 64-bit gfortran GNU Fortran (GCC) 4.6.2
+ 64-bit gfortran GNU Fortran (GCC) 4.6.2
(wren) Intel icc/icpc/ifort version 13.0.1.119
@@ -6319,14 +6925,14 @@ Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -6351,27 +6957,27 @@ CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y
Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.11 32-bit y y y y
-Solaris2.11 64-bit y y y y
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
Windows 7 Cygwin n n n y
Windows 7 x64 Cygwin n n n y
-Mac OS X Snow Leopard 10.6.8 64-bit y n y n
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
-AIX 5.3 32- and 64-bit y n n y
-CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
-CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n
+Mac OS X Snow Leopard 10.6.8 64-bit y n y n
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+AIX 5.3 32- and 64-bit y n n y
+CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n
+CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n
CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n
CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n
-Linux 2.6.32-358.2.1.el6.ppc64 y y y n
+Linux 2.6.32-358.2.1.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -6388,7 +6994,7 @@ The following platforms are not supported but have been tested for this release.
Linux 2.6.18-308.16.1.el5 MPICH mpich2-1.4.1p1 compiled with
#1 SMP x86_64 GNU/Linux gcc 4.1.2 and gfortran 4.1.2
(koala) g95 (GCC 4.0.3 (g95 0.94!)
-
+
FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719
(loyalty) gcc 4.6.1 20110422
g++ 4.6.1 20110422
@@ -6411,14 +7017,14 @@ The following platforms are not supported but have been tested for this release.
SUSE 12.3 3.7.10-1.1-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
gcc (SUSE Linux) 4.7.2
- GNU Fortran (SUSE Linux) 4.7.2
+ GNU Fortran (SUSE Linux) 4.7.2
(cmake and autotools)
Ubuntu 12.10 3.5.0-25-generic #39-Ubuntu SMP x86_64 GNU/Linux
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(cmake and autotools)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
@@ -6443,15 +7049,15 @@ Known Problems
spurious data values has only been encountered on Windows 32-bit systems.
(Issue HDFFV-8247; JP - 2013/03/27)
-* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
+* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
complains with this message:
"/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined.
-
+
The reason is that __func__ is a predefined identifier in C99 standard. The
- HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
+ HDF5 C library uses it in H5private.h. The test ttypes.cpp includes
H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9
C++ compiler doesn't support __func__, thus fails to compile the C++ test.
- But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
+ But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler
knows this identifier, try to compile the following simple C++ program:
#include<stdio.h>
@@ -6472,7 +7078,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -6483,21 +7089,21 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it's a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
This will overwrite the library's default optimization level.
(SLU - 2012/02/07 - HDFFV-7829)
- This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
+ This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with
gcc 4.7.2.
* The STDIO VFD does not work on some architectures, possibly due to 32/64
@@ -6520,7 +7126,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -6528,8 +7134,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -6560,7 +7166,7 @@ Known Problems
(NAF - 2011/01/19)
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem.
(SLU - 2010/05/05 - HDFFV-1264)
@@ -6570,42 +7176,42 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.10-patch1%%%%
+%%%%1.8.10-patch1%%%%
HDF5 version 1.8.10-patch1 released on 2013-01-22
@@ -6614,10 +7220,10 @@ HDF5 version 1.8.10-patch1 released on 2013-01-22
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.9 and
-HDF5 1.8.10, and contains information on the platforms tested and
-known problems in HDF5-1.8.10.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.9 and
+HDF5 1.8.10, and contains information on the platforms tested and
+known problems in HDF5-1.8.10.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.10 source code, documentation, and additional materials
@@ -6629,18 +7235,18 @@ The HDF5 1.8.10 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.10 can be accessed directly at this location:
+User documentation for 1.8.10 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.10 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.10 (current
release) versus Release 1.8.9":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -6683,25 +7289,25 @@ New Features
size. Now the library picks the smaller one between the dataset size
and the sieve buffer size from the file access property. See Issue 7934.
(SLU - 2012/4/11)
-
+
Parallel Library
----------------
- - Added the H5Pget_mpio_no_collective_cause() function that retrieves
- reasons why the collective I/O was broken during read/write IO access.
+ - Added the H5Pget_mpio_no_collective_cause() function that retrieves
+ reasons why the collective I/O was broken during read/write IO access.
(JKM - 2012/08/30 HDFFV-8143)
- Added H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27)
-
+
Tools
-----
- - h5import: Changed to allow the use of h5dump output as input files to
- h5import. h5dump must include the "-p" option to print the properties;
- configuration file is captured output of h5dump. The restrictions are
- that only one dataset with a simple datatype (integer, floating-point,
- or string) can be processed. Integers and floating-point imports from
- h5dump must use the "binary" option for the data file. The string version
- uses the h5dump "-y --width=1" options to disable the indexing printouts,
- print single columns, and obviously NOT use the "binary" option.
+ - h5import: Changed to allow the use of h5dump output as input files to
+ h5import. h5dump must include the "-p" option to print the properties;
+ configuration file is captured output of h5dump. The restrictions are
+ that only one dataset with a simple datatype (integer, floating-point,
+ or string) can be processed. Integers and floating-point imports from
+ h5dump must use the "binary" option for the data file. The string version
+ uses the h5dump "-y --width=1" options to disable the indexing printouts,
+ print single columns, and obviously NOT use the "binary" option.
(ADB - 2012/07/19 HDFFV-721)
High-Level APIs
@@ -6710,7 +7316,7 @@ New Features
Fortran API
-----------
- - Fixed a typo in return value of the nh5dread_f_c function (was 1
+ - Fixed a typo in return value of the nh5dread_f_c function (was 1
instead of 0 on success); fixed the return value to make it consistent
with other Fortran functions; cleaned debug statements from the code.
(EIP - 2012/06/23)
@@ -6744,9 +7350,9 @@ Bug Fixes since HDF5-1.8.10
Testing h5stat notexist.h5
The test script was fixed to ignore the extra output.
HDFFV-8233 (AKC - 2012/12/17)
- - h5diff: Fixed slowness when comparing HDF5 files with many attributes.
- Much slower performance was identified with later release version
- (from 1.8.7 to 1.8.10) compared to 1.8.6. The issue was introduced
+ - h5diff: Fixed slowness when comparing HDF5 files with many attributes.
+ Much slower performance was identified with later release version
+ (from 1.8.7 to 1.8.10) compared to 1.8.6. The issue was introduced
from fixing an attribute related bug for 1.8.7 release in the past.
HDFFV-8145 (JKM 2012/12/13)
@@ -6765,7 +7371,7 @@ Bug Fixes since HDF5-1.8.9
the hard conversion code in test/dt_arith.c to fail. HDFFV-8017.
(AKC - 2012/10/10)
- Fixed AIX Fortran compiler flags to use appropriate settings for
- debugging, profiling, and optimization situations. HDFFV-8069.
+ debugging, profiling, and optimization situations. HDFFV-8069.
(AKC 2012/09/27)
Library
@@ -6776,7 +7382,7 @@ Bug Fixes since HDF5-1.8.9
the core VFD" sub-test if the source directory is read-only as the test
fails to create its test files in the build directory. This has been
fixed. HDFFV-8009 (AKC - 2012/07/06)
-
+
Parallel Library
----------------
@@ -6795,27 +7401,27 @@ Bug Fixes since HDF5-1.8.9
Tools
-----
- h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if
- source file contains chunked dataset and a chunk dim is bigger than
+ source file contains chunked dataset and a chunk dim is bigger than
the dataset dim. Another issue is that the command changed max dims
- if chunk dim is smaller than the dataset dim. These issue occurred
+ if chunk dim is smaller than the dataset dim. These issue occurred
when dataset size is smaller than 64k (compact size limit) Fixed both.
HDFFV-8012 (JKM 2012/09/24)
- - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no
- longer add together the differences between datasets and the differences
- between attributes of those datasets. This change makes the output of
- verbose mode consistent for datasets, groups, and committed datatypes.
+ - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no
+ longer add together the differences between datasets and the differences
+ between attributes of those datasets. This change makes the output of
+ verbose mode consistent for datasets, groups, and committed datatypes.
HDFFV-5919 (JKM 2012/09/10)
- - h5diff: Fixed the incorrect result when comparing attribute data
+ - h5diff: Fixed the incorrect result when comparing attribute data
values and the data type has the same class but different sizes.
HDFFV-7942 (JKM 2012/08/15)
- h5dump: Replaced single element fwrite with block writes.
HDFFV-1208 (ADB 2012/08/13)
- - h5diff: Fixed test failure for "make check" due to failure of
+ - h5diff: Fixed test failure for "make check" due to failure of
copying test files when performed in HDF5 source tree. Also applied
to other tools. HDFFV-8107 (JKM 2012/08/01)
- - ph5diff: Fixed intermittent hang issue on a certain operation in
- parallel mode. It was detected by daily test for comparing
- non-comparable objects, but it could have occurred in other
+ - ph5diff: Fixed intermittent hang issue on a certain operation in
+ parallel mode. It was detected by daily test for comparing
+ non-comparable objects, but it could have occurred in other
operations depending on machine condition. HDFFV-8003 (JKM 2012/08/01)
- h5diff: Fixed the function COPY_TESTFILES_TO_TESTDIR() of testh5diff.sh
to better report when there is an error in the file copying.
@@ -6823,22 +7429,22 @@ Bug Fixes since HDF5-1.8.9
- h5dump: Fixed the sort by name display to maintain correct parent/child
relationships between ascending/descending order.
HDFFV-8095 (ADB 2012/07/12)
- - h5dump: Fixed the display by creation order when using option -n
+ - h5dump: Fixed the display by creation order when using option -n
(print contents).
HDFFV-5942 (ADB 2012/07/09)
- - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output.
- Used technique similar to what was done in h5ls (matches library
+ - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output.
+ Used technique similar to what was done in h5ls (matches library
options).
HDFFV-7999 (ADB 2012/05/23)
- - h5diff: Fixed the tool so that it will not check and display the status
- of dangling links without setting the --follow-symlinks option. This
- also improved performance when comparing lots of external links without
- the --follow-symlinks option.
+ - h5diff: Fixed the tool so that it will not check and display the status
+ of dangling links without setting the --follow-symlinks option. This
+ also improved performance when comparing lots of external links without
+ the --follow-symlinks option.
HDFFV-7998 (JKM 2012/04/26)
F90 API
-------
-
+
- Fixed a typo in return value of the nh5dread_f_c function (was 1
instead of 0 on success); fixed the return value to make it consistent
with other Fortran functions; cleaned debug statements from the code.
@@ -6861,15 +7467,15 @@ Bug Fixes since HDF5-1.8.9
High-Level APIs:
------
- - Fixed problem with H5TBdelete_record destroying all data following the
+ - Fixed problem with H5TBdelete_record destroying all data following the
deletion of a row. (MSB- 2012/7/26)
- - Fixed H5LTget_attribute_string not closing an object identifier when an
+ - Fixed H5LTget_attribute_string not closing an object identifier when an
error occurs. (MSB- 2012/7/21)
- - Corrected the return type of H5TBAget_fill from herr_t to htri_t to
- reflect that a return value of 1 indicates that a fill value is
- present, 0 indicates a fill value is not present, and <0 indicates an
+ - Corrected the return type of H5TBAget_fill from herr_t to htri_t to
+ reflect that a return value of 1 indicates that a fill value is
+ present, 0 indicates a fill value is not present, and <0 indicates an
error.
Fortran High-Level APIs:
@@ -6899,19 +7505,19 @@ Supported Platforms
#1 SMP x86_64 GNU/Linux compilers for 32-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
Version 4.6.3
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 11.9-0
+ Version 11.9-0
Version 12.5-0
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 12.1 (Build 20110811)
Version 12.1 (Build 20120212)
MPICH mpich2-1.4.1p1 compiled with
gcc 4.1.2 and gfortran 4.1.2
- Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
+ Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
(ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers
@@ -6961,23 +7567,23 @@ Supported Platforms
Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1
(owl) c++ Apple clang version 4.0 from Xcode 4.5.1
- gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- gfortran GNU Fortran (GCC) 4.6.2
+ gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ gfortran GNU Fortran (GCC) 4.6.2
Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -6985,7 +7591,7 @@ Solaris2.10 32-bit n y/y n y y y
Solaris2.10 64-bit n y/n n y y y
Windows 7 y y/n n y y y
Windows 7 x64 y y/n n y y y
-Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
+Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y
Mac OS X Lion 10.7.3 32-bit n y/y n y y n
Mac OS X Lion 10.7.3 64-bit n y/y n y y y
@@ -7000,25 +7606,25 @@ CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y
Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit n n n n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit n n n n
Windows 7 y y y y
Windows 7 x64 y y y y
-Mac OS X Snow Leopard 10.6.8 32-bit y n y n
-Mac OS X Snow Leopard 10.6.8 64-bit y n y n
-Mac OS X Lion 10.7.3 32-bit y n y y
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
-AIX 5.3 32- and 64-bit n n n y
-CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
-Linux 2.6.32-220.7.1.el6.ppc64 y y y n
+Mac OS X Snow Leopard 10.6.8 32-bit y n y n
+Mac OS X Snow Leopard 10.6.8 64-bit y n y n
+Mac OS X Lion 10.7.3 32-bit y n y y
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+AIX 5.3 32- and 64-bit n n n y
+CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
+Linux 2.6.32-220.7.1.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -7065,7 +7671,7 @@ The following platforms are not supported but have been tested for this release.
SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
gcc (SUSE Linux) 4.7.1
- GNU Fortran (SUSE Linux) 4.7.1
+ GNU Fortran (SUSE Linux) 4.7.1
(cmake and autotools)
Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux
@@ -7078,12 +7684,12 @@ The following platforms are not supported but have been tested for this release.
GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(cmake and autotools)
(Use optimization level -O1)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai
-
+
Known Problems
==============
@@ -7097,7 +7703,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -7108,14 +7714,14 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it's a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
@@ -7143,7 +7749,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -7151,8 +7757,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -7183,7 +7789,7 @@ Known Problems
(NAF - 2011/01/19)
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem.
(SLU - 2010/05/05 - HDFFV-1264)
@@ -7193,42 +7799,42 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.10%%%%
+%%%%1.8.10%%%%
HDF5 version 1.8.10 released on 2012-10-26
@@ -7237,10 +7843,10 @@ HDF5 version 1.8.10 released on 2012-10-26
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.9 and
-HDF5 1.8.10, and contains information on the platforms tested and
-known problems in HDF5-1.8.10.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.9 and
+HDF5 1.8.10, and contains information on the platforms tested and
+known problems in HDF5-1.8.10.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.10 source code, documentation, and additional materials
@@ -7252,18 +7858,18 @@ The HDF5 1.8.10 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.10 can be accessed directly at this location:
+User documentation for 1.8.10 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.10 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.10 (current
release) versus Release 1.8.9":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -7291,7 +7897,7 @@ New Features
Configuration
-------------
- None
-
+
Library
-------
- Updated to latest autotools and changed all hard *.sh scripts to
@@ -7303,25 +7909,25 @@ New Features
size. Now the library picks the smaller one between the dataset size
and the sieve buffer size from the file access property. See Issue 7934.
(SLU - 2012/4/11)
-
+
Parallel Library
----------------
- - Added the H5Pget_mpio_no_collective_cause() function that retrieves
- reasons why the collective I/O was broken during read/write IO access.
+ - Added the H5Pget_mpio_no_collective_cause() function that retrieves
+ reasons why the collective I/O was broken during read/write IO access.
(JKM - 2012/08/30 HDFFV-8143)
- Added H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27)
-
+
Tools
-----
- - h5import: Changed to allow the use of h5dump output as input files to
- h5import. h5dump must include the "-p" option to print the properties;
- configuration file is captured output of h5dump. The restrictions are
- that only one dataset with a simple datatype (integer, floating-point,
- or string) can be processed. Integers and floating-point imports from
- h5dump must use the "binary" option for the data file. The string version
- uses the h5dump "-y --width=1" options to disable the indexing printouts,
- print single columns, and obviously NOT use the "binary" option.
+ - h5import: Changed to allow the use of h5dump output as input files to
+ h5import. h5dump must include the "-p" option to print the properties;
+ configuration file is captured output of h5dump. The restrictions are
+ that only one dataset with a simple datatype (integer, floating-point,
+ or string) can be processed. Integers and floating-point imports from
+ h5dump must use the "binary" option for the data file. The string version
+ uses the h5dump "-y --width=1" options to disable the indexing printouts,
+ print single columns, and obviously NOT use the "binary" option.
(ADB - 2012/07/19 HDFFV-721)
High-Level APIs
@@ -7330,7 +7936,7 @@ New Features
Fortran API
-----------
- - Fixed a typo in return value of the nh5dread_f_c function (was 1
+ - Fixed a typo in return value of the nh5dread_f_c function (was 1
instead of 0 on success); fixed the return value to make it consistent
with other Fortran functions; cleaned debug statements from the code.
(EIP - 2012/06/23)
@@ -7355,7 +7961,7 @@ Bug Fixes since HDF5-1.8.9
the hard conversion code in test/dt_arith.c to fail. HDFFV-8017.
(AKC - 2012/10/10)
- Fixed AIX Fortran compiler flags to use appropriate settings for
- debugging, profiling, and optimization situations. HDFFV-8069.
+ debugging, profiling, and optimization situations. HDFFV-8069.
(AKC 2012/09/27)
Library
@@ -7366,7 +7972,7 @@ Bug Fixes since HDF5-1.8.9
the core VFD" sub-test if the source directory is read-only as the test
fails to create its test files in the build directory. This has been
fixed. HDFFV-8009 (AKC - 2012/07/06)
-
+
Parallel Library
----------------
@@ -7385,27 +7991,27 @@ Bug Fixes since HDF5-1.8.9
Tools
-----
- h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if
- source file contains chunked dataset and a chunk dim is bigger than
+ source file contains chunked dataset and a chunk dim is bigger than
the dataset dim. Another issue is that the command changed max dims
- if chunk dim is smaller than the dataset dim. These issue occurred
+ if chunk dim is smaller than the dataset dim. These issue occurred
when dataset size is smaller than 64k (compact size limit) Fixed both.
HDFFV-8012 (JKM 2012/09/24)
- - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no
- longer add together the differences between datasets and the differences
- between attributes of those datasets. This change makes the output of
- verbose mode consistent for datasets, groups, and committed datatypes.
+ - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no
+ longer add together the differences between datasets and the differences
+ between attributes of those datasets. This change makes the output of
+ verbose mode consistent for datasets, groups, and committed datatypes.
HDFFV-5919 (JKM 2012/09/10)
- - h5diff: Fixed the incorrect result when comparing attribute data
+ - h5diff: Fixed the incorrect result when comparing attribute data
values and the data type has the same class but different sizes.
HDFFV-7942 (JKM 2012/08/15)
- h5dump: Replaced single element fwrite with block writes.
HDFFV-1208 (ADB 2012/08/13)
- - h5diff: Fixed test failure for "make check" due to failure of
+ - h5diff: Fixed test failure for "make check" due to failure of
copying test files when performed in HDF5 source tree. Also applied
to other tools. HDFFV-8107 (JKM 2012/08/01)
- - ph5diff: Fixed intermittent hang issue on a certain operation in
- parallel mode. It was detected by daily test for comparing
- non-comparable objects, but it could have occurred in other
+ - ph5diff: Fixed intermittent hang issue on a certain operation in
+ parallel mode. It was detected by daily test for comparing
+ non-comparable objects, but it could have occurred in other
operations depending on machine condition. HDFFV-8003 (JKM 2012/08/01)
- h5diff: Fixed the function COPY_TESTFILES_TO_TESTDIR() of testh5diff.sh
to better report when there is an error in the file copying.
@@ -7413,22 +8019,22 @@ Bug Fixes since HDF5-1.8.9
- h5dump: Fixed the sort by name display to maintain correct parent/child
relationships between ascending/descending order.
HDFFV-8095 (ADB 2012/07/12)
- - h5dump: Fixed the display by creation order when using option -n
+ - h5dump: Fixed the display by creation order when using option -n
(print contents).
HDFFV-5942 (ADB 2012/07/09)
- - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output.
- Used technique similar to what was done in h5ls (matches library
+ - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output.
+ Used technique similar to what was done in h5ls (matches library
options).
HDFFV-7999 (ADB 2012/05/23)
- - h5diff: Fixed the tool so that it will not check and display the status
- of dangling links without setting the --follow-symlinks option. This
- also improved performance when comparing lots of external links without
- the --follow-symlinks option.
+ - h5diff: Fixed the tool so that it will not check and display the status
+ of dangling links without setting the --follow-symlinks option. This
+ also improved performance when comparing lots of external links without
+ the --follow-symlinks option.
HDFFV-7998 (JKM 2012/04/26)
F90 API
-------
-
+
- Fixed a typo in return value of the nh5dread_f_c function (was 1
instead of 0 on success); fixed the return value to make it consistent
with other Fortran functions; cleaned debug statements from the code.
@@ -7451,15 +8057,15 @@ Bug Fixes since HDF5-1.8.9
High-Level APIs:
------
- - Fixed problem with H5TBdelete_record destroying all data following the
+ - Fixed problem with H5TBdelete_record destroying all data following the
deletion of a row. (MSB- 2012/7/26)
- - Fixed H5LTget_attribute_string not closing an object identifier when an
+ - Fixed H5LTget_attribute_string not closing an object identifier when an
error occurs. (MSB- 2012/7/21)
- - Corrected the return type of H5TBAget_fill from herr_t to htri_t to
- reflect that a return value of 1 indicates that a fill value is
- present, 0 indicates a fill value is not present, and <0 indicates an
+ - Corrected the return type of H5TBAget_fill from herr_t to htri_t to
+ reflect that a return value of 1 indicates that a fill value is
+ present, 0 indicates a fill value is not present, and <0 indicates an
error.
Fortran High-Level APIs:
@@ -7489,19 +8095,19 @@ Supported Platforms
#1 SMP x86_64 GNU/Linux compilers for 32-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
Version 4.6.3
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
- Version 11.9-0
+ Version 11.9-0
Version 12.5-0
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 12.1 (Build 20110811)
Version 12.1 (Build 20120212)
MPICH mpich2-1.4.1p1 compiled with
gcc 4.1.2 and gfortran 4.1.2
- Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
+ Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
(ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers
@@ -7551,23 +8157,23 @@ Supported Platforms
Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1
(owl) c++ Apple clang version 4.0 from Xcode 4.5.1
- gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
- gfortran GNU Fortran (GCC) 4.6.2
+ gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1
+ gfortran GNU Fortran (GCC) 4.6.2
Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
@@ -7575,7 +8181,7 @@ Solaris2.10 32-bit n y/y n y y y
Solaris2.10 64-bit n y/n n y y y
Windows 7 y y/n n y y y
Windows 7 x64 y y/n n y y y
-Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
+Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y
Mac OS X Lion 10.7.3 32-bit n y/y n y y n
Mac OS X Lion 10.7.3 64-bit n y/y n y y y
@@ -7590,25 +8196,25 @@ CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y
Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit n n n n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit n n n n
Windows 7 y y y y
Windows 7 x64 y y y y
-Mac OS X Snow Leopard 10.6.8 32-bit y n y n
-Mac OS X Snow Leopard 10.6.8 64-bit y n y n
-Mac OS X Lion 10.7.3 32-bit y n y y
-Mac OS X Lion 10.7.3 64-bit y n y y
-Mac OS X Mountain Lion 10.8.1 64-bit y n y y
-AIX 5.3 32- and 64-bit n n n y
-CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y
-CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n
-CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
-CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
-Linux 2.6.32-220.7.1.el6.ppc64 y y y n
+Mac OS X Snow Leopard 10.6.8 32-bit y n y n
+Mac OS X Snow Leopard 10.6.8 64-bit y n y n
+Mac OS X Lion 10.7.3 32-bit y n y y
+Mac OS X Lion 10.7.3 64-bit y n y y
+Mac OS X Mountain Lion 10.8.1 64-bit y n y y
+AIX 5.3 32- and 64-bit n n n y
+CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y
+CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n
+CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
+CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
+Linux 2.6.32-220.7.1.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -7655,7 +8261,7 @@ The following platforms are not supported but have been tested for this release.
SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
gcc (SUSE Linux) 4.7.1
- GNU Fortran (SUSE Linux) 4.7.1
+ GNU Fortran (SUSE Linux) 4.7.1
(cmake and autotools)
Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux
@@ -7668,12 +8274,12 @@ The following platforms are not supported but have been tested for this release.
GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(cmake and autotools)
(Use optimization level -O1)
-
+
Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46
hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai
pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai
-
+
Known Problems
==============
@@ -7681,7 +8287,7 @@ Known Problems
machines that display extra output if an MPI task returns with a non-zero
code.)
Testing h5stat notexist.h5
-
+
The test actually runs and passes as expected. It is the extra output from
the MPI process that causes the test script to fail. This will be fixed
in the next release. (AKC - 2012/10/25 - HDFFV-8233)
@@ -7696,7 +8302,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -7707,14 +8313,14 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it's a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
@@ -7742,7 +8348,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -7750,8 +8356,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -7782,7 +8388,7 @@ Known Problems
(NAF - 2011/01/19)
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem.
(SLU - 2010/05/05 - HDFFV-1264)
@@ -7792,42 +8398,42 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO.
(CMC - 2009/04/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
-%%%%1.8.9%%%%
+%%%%1.8.9%%%%
HDF5 version 1.8.9 released on 2012-05-09
@@ -7836,11 +8442,11 @@ HDF5 version 1.8.9 released on 2012-05-09
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.8 and
-HDF5 1.8.9. It also contains information on the platforms tested and
-known problems in HDF5-1.8.9.
+This document describes the differences between HDF5-1.8.8 and
+HDF5 1.8.9. It also contains information on the platforms tested and
+known problems in HDF5-1.8.9.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.9 source code, documentation, and additional materials
@@ -7852,18 +8458,18 @@ The HDF5 1.8.9 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.9 can be accessed directly at this location:
+User documentation for 1.8.9 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.9 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.9 (current
release) versus Release 1.8.8":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -7890,7 +8496,7 @@ New Features
Configuration
-------------
- None
-
+
Library
-------
- Added new feature to merge committed datatypes when copying objects,
@@ -7898,12 +8504,12 @@ New Features
routines: H5Padd_merge_committed_dtype_path(),
H5Pfree_merge_committed_dtype_paths(), H5Pset_mcdt_search_cb() and
H5Pget_mcdt_search_cb(). (QAK - 2012/03/30)
- - Added new feature which allows working with files in memory in the
- same ways files are worked with on disk. New API routines include
- H5Pset_file_image, H5Pget_file_image, H5Pset_file_image_callbacks,
- H5Pget_file_image_callbacks, H5Fget_file_image, and
+ - Added new feature which allows working with files in memory in the
+ same ways files are worked with on disk. New API routines include
+ H5Pset_file_image, H5Pget_file_image, H5Pset_file_image_callbacks,
+ H5Pget_file_image_callbacks, H5Fget_file_image, and
H5LTopen_file_image. (QAK - 2012/04/17)
-
+
Parallel Library
----------------
- Corrected memory allocation error in MPI datatype construction code.
@@ -7912,7 +8518,7 @@ New Features
MPI library to perform atomic operations. Some file systems (for
example PVFS2) do not support atomic updates, so those routines
would not be supported. (MSC - 2012/03/27 - HDFFV-7961)
-
+
Tools
-----
- h5repack: Added ability to set the metadata block size of the output
@@ -7920,29 +8526,29 @@ New Features
(QAK - 2012/03/30)
- h5stat: Added ability to display a summary of the file space usage for a
file, with the '-S'/'--summary' command line parameter. (QAK - 2012/03/28)
- - h5dump: Added capability for "-a" option to show attributes containing "/"
- by using an escape character. For example, for a dataset "/dset"
- containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)"
+ - h5dump: Added capability for "-a" option to show attributes containing "/"
+ by using an escape character. For example, for a dataset "/dset"
+ containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)"
to show the content of the attribute. (PC - 2012/03/12 - HDFFV-7523)
- h5dump: Added ability to apply command options across multiple files using a
wildcard in the filename. Unix example; "h5dump -H -d Dataset1 tarr*.h5".
Cross platform example; "h5dump -H -d Dataset1 tarray1.h5 tarray2.h5 tarray3.h5".
(ADB - 2012/03/12 - HDFFV-7876).
- h5dump: Added new option --no-compact-subset. This option will not
- interpret the '[' character as starting the compact form of
- subsetting. This is useful when the "h5dump error: unable to
+ interpret the '[' character as starting the compact form of
+ subsetting. This is useful when the "h5dump error: unable to
open dataset "datset_name"" message is output because a dataset
name contains a '[' character. (ADB - 2012/03/05 - HDFFV-7689).
- h5repack: Improved performance for big chunked datasets (size > 128MB)
- when used with the layout (-l) or compression (-f) options.
- Before this change, repacking datasets with chunks with a large first
- dimension would take extremely long. For example, repacking a dataset
- with chunk dimensions of 1024x5x1 might take many hours to process
- while changing a dataset with chunk dimensions set to 1x5x1024
- might take under an hour. After this change, processing the dataset
- with chunk dimensions of 1024x5x1 takes about 15 minutes, and processing
+ when used with the layout (-l) or compression (-f) options.
+ Before this change, repacking datasets with chunks with a large first
+ dimension would take extremely long. For example, repacking a dataset
+ with chunk dimensions of 1024x5x1 might take many hours to process
+ while changing a dataset with chunk dimensions set to 1x5x1024
+ might take under an hour. After this change, processing the dataset
+ with chunk dimensions of 1024x5x1 takes about 15 minutes, and processing
a dataset with chunk dimensions of 1x5x1024 takes about 14 minutes.
- (JKM - 2012/03/01 - HDFFV-7862)
+ (JKM - 2012/03/01 - HDFFV-7862)
High-Level APIs
---------------
@@ -7972,7 +8578,7 @@ Bug Fixes since HDF5-1.8.8
-------------
- Fixed Makefile issue in which "-Wl," was not properly specified
prior to -rpath when building parallel Fortran libraries with
- an Intel compiler. (MAM - 2012/03/26)
+ an Intel compiler. (MAM - 2012/03/26)
- Makefiles generated by other packages using h5cc as the compiler
no longer error when 'make' is invoked more than once in order
to 'rebuild' after changes to source. (MAM - 2012/03/26)
@@ -8003,30 +8609,30 @@ Bug Fixes since HDF5-1.8.8
runs out of memory, the library had a segmentation fault. The fix is to
return the error stack with proper information.
(SLU - 2012/03/23 - HDFFV-7785)
- - H5Pset_data_transform had a segmentation fault in some cases like x*-100.
+ - H5Pset_data_transform had a segmentation fault in some cases like x*-100.
It works correctly now and handles other cases like 100-x or 2/x.
(SLU - 2012/03/15 - HDFFV-7922)
- Fixed rare corruption bugs that could occur when using the new object
header format. (NAF - 2012/03/15 - HDFFV-7879)
- - Fixed an error that occurred when creating a contiguous dataset with a
- zero-sized dataspace and space allocation time set to 'early'.
+ - Fixed an error that occurred when creating a contiguous dataset with a
+ zero-sized dataspace and space allocation time set to 'early'.
(QAK - 2012/03/12)
- Changed Windows thread creation to use _beginthread() instead of
CreateThread(). Threads created by the latter can be killed in
low-memory situations. (DER - 2012/02/10 - HDFFV-7780)
- - Creating a dataset in a read-only file caused a segmentation fault when
- the file is closed. It's fixed. The attempt to create a dataset will
+ - Creating a dataset in a read-only file caused a segmentation fault when
+ the file is closed. It's fixed. The attempt to create a dataset will
fail with an error indicating the file is read-only.
- (SLU - 2012/01/25 - HDFFV-7756)
- - Fixed a segmentation fault that could occur when shrinking a dataset
+ (SLU - 2012/01/25 - HDFFV-7756)
+ - Fixed a segmentation fault that could occur when shrinking a dataset
with chunks larger than 1 MB. (NAF - 2011/11/30 - HDFFV-7833)
- Fixed a bug that could cause H5Oget_info to return the wrong address
after copying a committed (named) datatype. (NAF - 2011/11/14)
- The library allowed the conversion of strings between ASCII and UTF8
We have corrected it to report an error under this situation.
(SLU - 2011/11/8 - HDFFV-7582)
- - Fixed a segmentation fault when the library tried to shrink the size
- of a compound datatype through H5Tset_size immediately after the
+ - Fixed a segmentation fault when the library tried to shrink the size
+ of a compound datatype through H5Tset_size immediately after the
datatype was created. (SLU - 2011/11/4 - HDFFV-7618)
Parallel Library
@@ -8035,43 +8641,43 @@ Bug Fixes since HDF5-1.8.8
Tools
-----
- - h5unjam: Fixed a segmentation fault that occurred when h5unjam was used
+ - h5unjam: Fixed a segmentation fault that occurred when h5unjam was used
with the -V (show version) option. (JKM - 2012/04/19 - HDFFV-8001)
- - h5repack: Fixed a failure that occurred when repacking the chunk size
- of a specified chunked dataset with unlimited max dims.
- (JKM - 2012/04/11 - HDFFV-7993)
- - h5diff: Fixed a failure when comparing groups. Before the fix, if an
- object in a group was compared with an object in another group where
+ - h5repack: Fixed a failure that occurred when repacking the chunk size
+ of a specified chunked dataset with unlimited max dims.
+ (JKM - 2012/04/11 - HDFFV-7993)
+ - h5diff: Fixed a failure when comparing groups. Before the fix, if an
+ object in a group was compared with an object in another group where
both had the same name but the object type was different, then h5diff
would fail. After the fix, h5diff detects such cases as non-comparable
- and displays appropriate error messages.
+ and displays appropriate error messages.
(JKM - 2012/03/28 - HDFFV-7644)
- - h5diff: If unique objects exist only in one file and if h5diff is set to
- exclude the unique objects with the --exclude-path option, then h5diff
- might miss excluding some objects. This was fixed to correctly exclude
+ - h5diff: If unique objects exist only in one file and if h5diff is set to
+ exclude the unique objects with the --exclude-path option, then h5diff
+ might miss excluding some objects. This was fixed to correctly exclude
objects. (JKM - 2012/03/20 - HDFFV-7837)
- - h5diff: When two symbolic dangling links are compared with the
- --follow-symlinks option, the result should be the same. This worked when
+ - h5diff: When two symbolic dangling links are compared with the
+ --follow-symlinks option, the result should be the same. This worked when
comparing two files, but didn't work when comparing two objects.
h5diff now works when comparing two objects.
(JKM - 2012/03/09 - HDFFV-7835)
- h5dump: Added the tools library error stack to properly catch error
information generated within the library. (ADB - 2012/03/12 - HDFFV-7958)
- - h5dump: Changed the process where an open link used to fail. Now dangling
+ - h5dump: Changed the process where an open link used to fail. Now dangling
links no longer throw error messages. (ADB - 2012/03/12 - HDFFV-7839)
- - h5dump: Refactored code to remove duplicated functions. Split XML
+ - h5dump: Refactored code to remove duplicated functions. Split XML
functions from DDL functions. Corrected indentation and formatting
errors. Also fixed subsetting counting overflow (HDFFV-5874). Verified
all tools call tools_init() in main. The USER_BLOCK data now correctly
displays within the SUPER_BLOCK info. NOTE: WHITESPACE IN THE OUTPUT
HAS CHANGED. (ADB - 2012/02/17 - HDFFV-7560)
- - h5diff: Fixed to prevent from displaying error stack message when
+ - h5diff: Fixed to prevent from displaying error stack message when
comparing two dangling symbolic links with the follow-symlinks option.
(JKM - 2012/01/13 - HDFFV-7836)
- - h5repack: Fixed a memory leak that occurred with the handling of
+ - h5repack: Fixed a memory leak that occurred with the handling of
variable length strings in attributes.
(JKM - 2012/01/10 - HDFFV-7840)
- - h5ls: Fixed a segmentation fault that occurred when accessing region
+ - h5ls: Fixed a segmentation fault that occurred when accessing region
reference data in an attribute. (JKM - 2012/01/06 - HDFFV-7838)
F90 API
@@ -8088,9 +8694,9 @@ Bug Fixes since HDF5-1.8.8
Fortran High-Level APIs:
------
- - h5ltget_attribute_string_f: The h5ltget_attribute_string_f used to return
- the C NULL character in the returned character buffer. The returned
- charactor buffer now does not return the C NULL character; the buffer
+ - h5ltget_attribute_string_f: The h5ltget_attribute_string_f used to return
+ the C NULL character in the returned character buffer. The returned
+ charactor buffer now does not return the C NULL character; the buffer
is blank-padded if needed. (MSB - 2012/03/23)
@@ -8133,19 +8739,19 @@ The following platforms and compilers have been tested for this release.
#1 SMP x86_64 GNU/Linux compilers for 32-bit applications;
(koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52)
Version 4.5.2
- PGI C, Fortran, C++ for 64-bit target on
+ PGI C, Fortran, C++ for 64-bit target on
x86-64;
Version 11.9-0 (64-bit)
Version 11.8-0 (32-bit)
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64;
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64;
Version 12.0
Version 12.1
MPICH mpich2-1.3.1 compiled with
gcc 4.1.2 and gfortran 4.1.2
- Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
+ Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731
(ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
Linux 2.6.18-108chaos Intel C, C++, Fortran Compilers Version 11.1
@@ -8166,7 +8772,7 @@ The following platforms and compilers have been tested for this release.
SGI Altix UV Intel(R) C, Fortran Compilers
SGI ProPack 7 Linux Version 11.1 20100806
2.6.32.24-0.2.1.2230.2.PTF- SGI MPT 2.02
- default #1 SMP
+ default #1 SMP
(NCSA ember)
Dell NVIDIA Cluster Intel(R) C, Fortran Compilers
@@ -8230,7 +8836,7 @@ The following platforms and compilers have been tested for this release.
SUSE 12.1 3.1.9-1.4-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
gcc (SUSE Linux) 4.6.2
- GNU Fortran (SUSE Linux) 4.6.2
+ GNU Fortran (SUSE Linux) 4.6.2
Ubuntu 11.10 3.0.0-16-generic #29-Ubuntu SMP i686 GNU/Linux
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
@@ -8244,20 +8850,20 @@ The following platforms and compilers have been tested for this release.
hopper.nersc.gov pgcc 11.9-0 64-bit target on x86-64 Linux -tp k8e
pgf90 11.9-0 64-bit target on x86-64 Linux -tp k8e
pgCC 11.9-0 64-bit target on x86-64 Linux -tp k8e
-
+
Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -8267,7 +8873,7 @@ Windows XP n y(4) n y y
Windows XP x64 n y(4) n y y y
Windows Vista n y(4) n y y y
Windows Vista x64 n y(4) n y y y
-Mac OS X Snow Leopard 10.6.8 32-bit n y n y y n
+Mac OS X Snow Leopard 10.6.8 32-bit n y n y y n
Mac OS X Snow Leopard 10.6.8 64-bit n y n y y y
Mac OS X Lion 10.7.3 32-bit n y n y y n
Mac OS X Lion 10.7.3 64-bit n y n y y y
@@ -8285,28 +8891,28 @@ Red Hat Enterprise Linux 6 y y y y y
CLE hopper.nersc.gov y y(3) y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit n n n n
-Windows XP y y(4) y n
-Windows XP x64 y y(4) y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit n n n n
+Windows XP y y(4) y n
+Windows XP x64 y y(4) y n
Windows Vista y y(4) y y
Windows Vista x64 y y(4) y y
-Mac OS X Snow Leopard 10.6.8 32-bit y n y n
-Mac OS X Snow Leopard 10.6.8 64-bit y n y n
-Mac OS X Lion 10.7.3 32-bit y n y y
-Mac OS X Lion 10.7.3 64-bit y n y y
-AIX 5.3 32- and 64-bit n n n y
-FreeBSD 8.2-STABLE 32&64 bit y x x y
-CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y
-CentOS 5.5 Linux 2.6.18-194 i686 Intel W y y y n
-CentOS 5.5 Linux 2.6.18-194 i686 PGI W y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 GNU (1) W y y y y
-CentOS 5.5 Linux 2.6.18 x86_64 Intel W y y y n
-CentOS 5.5 Linux 2.6.18 x86_64 PGI W y y y n
-Linux 2.6.32-220.7.1.el6.ppc64 y y y n
-SGI ProPack 7 Linux 2.6.32.24 y y y n
+Mac OS X Snow Leopard 10.6.8 32-bit y n y n
+Mac OS X Snow Leopard 10.6.8 64-bit y n y n
+Mac OS X Lion 10.7.3 32-bit y n y y
+Mac OS X Lion 10.7.3 64-bit y n y y
+AIX 5.3 32- and 64-bit n n n y
+FreeBSD 8.2-STABLE 32&64 bit y x x y
+CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y
+CentOS 5.5 Linux 2.6.18-194 i686 Intel W y y y n
+CentOS 5.5 Linux 2.6.18-194 i686 PGI W y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 GNU (1) W y y y y
+CentOS 5.5 Linux 2.6.18 x86_64 Intel W y y y n
+CentOS 5.5 Linux 2.6.18 x86_64 PGI W y y y n
+Linux 2.6.32-220.7.1.el6.ppc64 y y y n
+SGI ProPack 7 Linux 2.6.32.24 y y y n
Red Hat Enterprise Linux 6 y y y n
CLE hopper.nersc.gov n n n n
@@ -8339,7 +8945,7 @@ Known Problems
fails to create its test files in the build directory. This will be
resolved in a future release.
(AKC - 2012/05/05 - HDFFV-8009)
-
+
* The dt_arith test reports several errors involving "long double" on
Mac OS X 10.7 Lion when any level of optimization is enabled. The test does
not fail in debug mode. This will be addressed in a future release.
@@ -8350,7 +8956,7 @@ Known Problems
h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0"
tno-subset.h5
-
+
This is due to the embedded spaces in the dataset name being interpreted
by the command script launcher as meta-characters, thus passing three
arguments to h5dump's -d flag. The command passes if run by hand, just
@@ -8366,14 +8972,14 @@ Known Problems
to aprun -np X, because the H5lib_settings.c file was not generated
properly. Not setting those environment variables works, because
configure was able to automatically detect that it's a Cray system
- and used the proper launch commands when necessary.
+ and used the proper launch commands when necessary.
(MSC - 2012/04/18)
* The data conversion test dt_arith.c fails in "long double" to integer
conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library
is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal
- (3.2.2 on Fedora) doesn't have the problem. Users should lower the
- optimization level (-O1 or -O0) by defining CFLAGS in the command line of
+ (3.2.2 on Fedora) doesn't have the problem. Users should lower the
+ optimization level (-O1 or -O0) by defining CFLAGS in the command line of
"configure" like:
CFLAGS=-O1 ./configure
@@ -8401,7 +9007,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -8409,8 +9015,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value.
(AKC - 2011/05/07)
@@ -8441,7 +9047,7 @@ Known Problems
(NAF - 2011/01/19)
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem.
(SLU - 2010/05/05 - HDFFV-1264)
@@ -8451,8 +9057,8 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
@@ -8464,18 +9070,18 @@ Known Problems
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* The PathScale MPI implementation, accessing a Panasas file system, would
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not
exist. This is due to the MPI_File_open() call failing if the mode has
the MPI_MODE_EXCL bit set.
(AKC - 2009/08/11 - HDFFV-988)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
@@ -8511,30 +9117,30 @@ Known Problems
echo SKIP H5LSTEST $FILEOUT
==================================================
(AKC - 2008/11/10)
-
+
* For Red Storm, a Cray XT3 system, the yod command sometimes gives the
message, "yod allocation delayed for node recovery". This interferes with
test suites that do not expect to see this message. See the section of "Red
Storm" in file INSTALL_parallel for a way to deal with this problem.
(AKC - 2008/05/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -8542,17 +9148,17 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
(AKC - 2004/12/08)
-%%%%1.8.8%%%%
+%%%%1.8.8%%%%
HDF5 version 1.8.8 released on 2011-11-15
@@ -8561,10 +9167,10 @@ HDF5 version 1.8.8 released on 2011-11-15
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.7 and
-HDF5 1.8.8, and contains information on the platforms tested and
-known problems in HDF5-1.8.8.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.7 and
+HDF5 1.8.8, and contains information on the platforms tested and
+known problems in HDF5-1.8.8.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.8 source code, documentation, and additional materials
@@ -8576,18 +9182,18 @@ The HDF5 1.8.8 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.8 can be accessed directly at this location:
+User documentation for 1.8.8 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.8 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.8 (current
release) versus Release 1.8.7":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -8613,15 +9219,15 @@ New Features
Configuration
-------------
- - Added the --enable-fortran2003 flag to enable Fortran2003 support
+ - Added the --enable-fortran2003 flag to enable Fortran2003 support
in the HDF5 Fortran library. The flag should be used along with the
- --enable-fortran flag and takes affect only when the Fortran compiler
+ --enable-fortran flag and takes affect only when the Fortran compiler
is Fortran2003 compliant. (EIP - 2011/11/14)
- Added checks for clock_gettime and mach/mach_time.h to both configure and
CMake. This will support the move from gettimeofday to clock_gettime's
monotonic timer in the profiling code in a future release.
(DER - 2011/10/12)
-
+
Library
-------
- The Windows VFD code has been removed with the exception of the functions
@@ -8633,13 +9239,13 @@ New Features
(DER - 2011/10/12 - HDFFV-7740, HDFFV-7744)
- H5Tcreate now supports the string type (fixed-length and variable-
length). (SLU - 2011/05/20)
-
+
Parallel Library
----------------
- Added new H5Pget_mpio_actual_chunk_opt_mode and
H5Pget_mpio_actual_io_mode API routines for querying whether/how
a collective I/O operation completed. (QAK - 2011/10/12)
-
+
Tools
-----
- None
@@ -8676,8 +9282,8 @@ New Features
h5rderefrence_f
h5rget_name_f
h5rget_obj_type_f
- - Subroutines overloaded with the C_PTR derived type
- and simplified signatures:
+ - Subroutines overloaded with the C_PTR derived type
+ and simplified signatures:
h5aread_f
h5awrite_f
h5dread_f
@@ -8717,7 +9323,7 @@ Bug Fixes since HDF5-1.8.7
trace statement fixup. (DER - 2011/08/25)
- The --enable-h5dump-packed-bits configure option has been removed.
The h5dump code that this option conditionally enabled is now always
- compiled into h5dump. Please refer to the h5dump reference manual for
+ compiled into h5dump. Please refer to the h5dump reference manual for
usage of the packed bits feature. (MAM - 2011/06/23 - HDFFV-7592)
- Configure now uses the same flags and symbols in its tests that are
used to build the library. (DER - 2011/05/24)
@@ -8739,14 +9345,14 @@ Bug Fixes since HDF5-1.8.7
I/O sizes (and remove compiler warnings) between Windows and true POSIX
systems. (DER - 2011/10/12)
- Corrected some Windows behavior in the SEC2 and log VFDs. This mainly
- involved datatype correctness fixes, Windows API call error checks,
+ involved datatype correctness fixes, Windows API call error checks,
and adding the volume serial number to the VFD cmp functions.
(DER - 2011/10/12)
- - Converted post-checks for the appropriate POSIX I/O sizes to pre-checks
- in order to avoid platform-specific or undefined behavior.
+ - Converted post-checks for the appropriate POSIX I/O sizes to pre-checks
+ in order to avoid platform-specific or undefined behavior.
(DER - 2011/10/12)
- - #ifdef _WIN32 instances have been changed to #ifdef H5_HAVE_WIN32_API.
- H5_HAVE_VISUAL_STUDIO checks have been added where necessary. This is in
+ - #ifdef _WIN32 instances have been changed to #ifdef H5_HAVE_WIN32_API.
+ H5_HAVE_VISUAL_STUDIO checks have been added where necessary. This is in
CMake only as configure never sets _WIN32. (ADB - 2011/09/12)
- CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv
discovered 3 problems in tests and tools' library:
@@ -8754,7 +9360,7 @@ Bug Fixes since HDF5-1.8.7
caused undefined behavior.
2. In dt_arith.c, the INIT_INTEGER macro definition has an overflow
when the value is a negative minimal and is being subtracted from one.
- 3. In tools/lib/h5tools_str.c, right shifting an int value for 32 bits
+ 3. In tools/lib/h5tools_str.c, right shifting an int value for 32 bits
or more caused undefined behavior.
All the problems have been corrected. (SLU - 2011/09/02 - HDFFV-7674)
- H5Epush2() now has the correct trace functionality (this is related to the
@@ -8762,17 +9368,17 @@ Bug Fixes since HDF5-1.8.7
(DER - 2011/08/25)
- Corrected mismatched function name typo of h5pget_dxpl_mpio_c and
h5pfill_value_defined_c. (AKC - 2011/08/22 - HDFFV-7641)
- - Corrected an internal error in the library where objects that use committed
+ - Corrected an internal error in the library where objects that use committed
(named) datatypes and were accessed from two different file IDs could confuse
the two and cause erroneous failures. (QAK - 2011/07/18 - HDFFV-7638)
- - In v1.6 of the library, there was an EOA for the whole MULTI file saved in the
- super block. We took it out in v1.8 of the library because it's meaningless
- for the MULTI file. v1.8 of the library saves the EOA for the metadata file
+ - In v1.6 of the library, there was an EOA for the whole MULTI file saved in the
+ super block. We took it out in v1.8 of the library because it's meaningless
+ for the MULTI file. v1.8 of the library saves the EOA for the metadata file
instead, but this caused a backward compatibility problem.
A v1.8 library couldn't open the file created with the v1.6 library. We
fixed the problem by checking the EOA value to detect the file
- created with v1.6 library. (SLU - 2011/06/22)
- - When a dataset had filters and reading data failed, the error message
+ created with v1.6 library. (SLU - 2011/06/22)
+ - When a dataset had filters and reading data failed, the error message
didn't say which filter wasn't registered. It's fixed now. (SLU - 2011/06/03)
Parallel Library
@@ -8787,71 +9393,71 @@ Bug Fixes since HDF5-1.8.7
Tools
-----
- - h5diff: fixed segfault over non-comparable attribute with different
+ - h5diff: fixed segfault over non-comparable attribute with different
dimention or rank, along with '-c' option to display details.
(JKM - 2011/10/24 - HDFFV-7770)
- - Fixed h5diff to display all the comparable objects and attributes
+ - Fixed h5diff to display all the comparable objects and attributes
regardless of detecting non-comparables. (JKM - 2011/09/16 - HDFFV-7693)
- - Fixed h5repack to update the values of references(object and region) of
- attributes in h5repack for 1) references, 2) arrays of references,
- 3) variable-length references, and 4) compound references.
+ - Fixed h5repack to update the values of references(object and region) of
+ attributes in h5repack for 1) references, 2) arrays of references,
+ 3) variable-length references, and 4) compound references.
(PC - 2011/09/14 - HDFFV-5932)
- - h5diff: fixed a segfault over a dataset with container types
- array and variable-length (vlen) along with multiple nested compound types.
+ - h5diff: fixed a segfault over a dataset with container types
+ array and variable-length (vlen) along with multiple nested compound types.
Example: compound->array->compound, compound->vlen->compound.
(JKM - 2011/09/01 - HDFFV-7712)
- h5repack: added macro to handle a failure in H5Dread/write when memory
allocation failed inside the library. (PC - 2011/08/19)
- - Fixed h5jam to not to allow the specifying of an HDF5 formatted file as
- an input file for the -u (user block file) option. The original HDF5 file
- would not be accessible if this behavior was allowed.
+ - Fixed h5jam to not to allow the specifying of an HDF5 formatted file as
+ an input file for the -u (user block file) option. The original HDF5 file
+ would not be accessible if this behavior was allowed.
(JKM - 2011/08/19 - HDFFV-5941)
- Revised the command help pages of h5jam and h5unjam. The descriptions
- were not up to date and some were missing.
+ were not up to date and some were missing.
(JKM - 2011/08/15 - HDFFV-7515)
- - Fixed h5dump to correct the schema location:
- <hdf5:HDF5-File
- xmlns:hdf5="http://hdfgroup.org/HDF5/XML/schema/HDF5-File"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://hdfgroup.org/HDF5/XML/schema/HDF5-File
+ - Fixed h5dump to correct the schema location:
+ <hdf5:HDF5-File
+ xmlns:hdf5="http://hdfgroup.org/HDF5/XML/schema/HDF5-File"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://hdfgroup.org/HDF5/XML/schema/HDF5-File
http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd">
(ADB - 2011/08/10)
- - h5repack: h5repack failed to copy a dataset if the layout is changed
+ - h5repack: h5repack failed to copy a dataset if the layout is changed
from chunked with unlimited dimensions to contiguous.
(PC - 2011/07/15 - HDFFV-7649)
- - Fixed h5diff: the "--delta" option considers two NaN of the same type
- are different. This is wrong based on the h5diff description in the
+ - Fixed h5diff: the "--delta" option considers two NaN of the same type
+ are different. This is wrong based on the h5diff description in the
Reference Manual. (PC - 2011/07/15 - HDFFV-7656)
- Fixed h5diff to display an instructive error message and exit with
- an instructive error message when mutually exclusive options
- (-d, -p and --use-system-epsilon) are used together.
+ an instructive error message when mutually exclusive options
+ (-d, -p and --use-system-epsilon) are used together.
(JKM - 2011/07/07 - HDFFV-7600)
- Fixed h5dump so that it displays the first line of each element in correct
- position for multiple dimention array types. Before this fix,
+ position for multiple dimention array types. Before this fix,
the first line of each element in an array was
displayed after the last line of previous element without
moving to the next line (+indentation).
(JKM - 2011/06/15 - HDFFV-5878)
- - Fixed h5dump so that it will display the correct value for
- H5T_STD_I8LE datasets on the Blue-gene system (ppc64, linux, Big-Endian,
+ - Fixed h5dump so that it will display the correct value for
+ H5T_STD_I8LE datasets on the Blue-gene system (ppc64, linux, Big-Endian,
clustering). (AKC & JKM - 2011/05/12 - HDFFV-7594)
- Fixed h5diff to compare a file to itself correctly. Previously h5diff
- reported either the files were different or not compatible in certain
- cases even when comparing a file to itself. This fix also improves
- performance when comparing the same target objects through verifying
- the object and file addresses before comparing the details
- in the objects. Examples of details are datasets and attributes.
+ reported either the files were different or not compatible in certain
+ cases even when comparing a file to itself. This fix also improves
+ performance when comparing the same target objects through verifying
+ the object and file addresses before comparing the details
+ in the objects. Examples of details are datasets and attributes.
(XCAO & JKM - 2011/05/06 - HDFFV-5928)
F90 API
-------
- - Modified the h5open_f and h5close_f subroutines to not to call H5open
- and H5close correspondingly. While the H5open call just adds overhead,
- the H5close call called by a Fortran application shuts down the HDF5
- library. This makes the library inaccessible to the application.
+ - Modified the h5open_f and h5close_f subroutines to not to call H5open
+ and H5close correspondingly. While the H5open call just adds overhead,
+ the H5close call called by a Fortran application shuts down the HDF5
+ library. This makes the library inaccessible to the application.
(EIP & SB - 2011/10/13 - HDFFV-915)
- - Fixed h5tget_tag_f where the length of the C string was used to
- repack the C string into the Fortran string. This lead to memory
+ - Fixed h5tget_tag_f where the length of the C string was used to
+ repack the C string into the Fortran string. This lead to memory
corruption in the calling program. (SB - 2011/07/26)
- Added defined constants:
H5T_ORDER_MIXED_F (HDFFV-2767)
@@ -8871,13 +9477,13 @@ Bug Fixes since HDF5-1.8.7
High-Level APIs:
------
- - Fixed the H5LTdtype_to_text function. It had some memory problems when
+ - Fixed the H5LTdtype_to_text function. It had some memory problems when
dealing with some complicated data types. (SLU - 2011/10/19 - HDFFV-7701)
- - Fixed H5DSset_label seg faulting when retrieving the length of a
+ - Fixed H5DSset_label seg faulting when retrieving the length of a
dimension label that was not set. (SB - 2011/08/07 - HDFFV-7673)
- - Fixed a dimension scale bug where if you create a dimscale, attach two
- datasets to it, and then unattach them, you get an error if they are
- unattached in order, but no error if you unattach them in reverse order.
+ - Fixed a dimension scale bug where if you create a dimscale, attach two
+ datasets to it, and then unattach them, you get an error if they are
+ unattached in order, but no error if you unattach them in reverse order.
(SB - 2011/06/07 - HDFFV-7605)
Fortran High-Level APIs:
@@ -8911,7 +9517,7 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.16.60-0.54.5-smp Intel(R) C, C++, Fortran Compilers
x86_64 Version 11.1 20090630
- (INL Icestorm)
+ (INL Icestorm)
Linux 2.6.18-194.el5 x86_64 Intel(R) C, C++, Fortran Compilers
(INL Fission) Version 12.0.2 20110112
@@ -8921,11 +9527,11 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2
#1 SMP i686 i686 i386 GNU Fortran (GCC) 4.1.2 20080704
- (jam) (Red Hat 4.1.2-48) and 4.4.2
+ (jam) (Red Hat 4.1.2-48) and 4.4.2
PGI C, Fortran, C++ 10.4-0 32-bit
PGI C, Fortran, C++ 10.6-0 32-bit
Intel(R) C Compiler for 32-bit
- applications, Version 11.1
+ applications, Version 11.1
Intel(R) C++ Compiler for 32-bit
applications, Version 11.1
Intel(R) Fortran Compiler for 32-bit
@@ -8937,8 +9543,8 @@ The following platforms and compilers have been tested for this release.
#1 SMP x86_64 GNU/Linux GNU Fortran (GCC) 4.1.2 20080704
(koala) (Red Hat 4.1.2-46) and 4.4.2
tested for both 32- and 64-bit binaries
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Version 11.1.
PGI C, Fortran, C++ Version 9.0-4
for 64-bit target on x86-64
@@ -8948,7 +9554,7 @@ The following platforms and compilers have been tested for this release.
SGI Altix UV Intel(R) C, Fortran Compilers
SGI ProPack 7 Linux Version 11.1 20100806
2.6.32.24-0.2.1.2230.2.PTF- SGI MPT 2.02
- default #1 SMP
+ default #1 SMP
(NCSA ember)
Dell NVIDIA Cluster Intel(R) C, Fortran Compilers
@@ -9021,7 +9627,7 @@ The following platforms and compilers have been tested for this release.
Ubuntu 11.10 3.0.0-12-generic #20-Ubuntu SMP x86_64 GNU/Linux
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
GNU Fortran (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
-
+
OpenVMS Alpha 8.3 HP C V7.3-009
HP Fortran V8.2-104679-48H9K
HP C++ V7.3-009
@@ -9035,14 +9641,14 @@ Tested Configuration Features Summary
=====================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -9066,31 +9672,31 @@ CentOS 5.5 Linux 2.6.16 x86_64 PGI W n y n y y y
Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y y
SGI ProPack 7 Linux 2.6.32.24 y y y y y y
Red Hat Enterprise Linux 6 y y y y y y
-CLE hopper.nersc.gov y y(3) y y y n
-CLE franklin.nersc.gov y y(3) y y y n
+CLE hopper.nersc.gov y y(3) y y y n
+CLE franklin.nersc.gov y y(3) y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-Windows XP y y(4) y n
-Windows XP x64 y y(4) y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+Windows XP y y(4) y n
+Windows XP x64 y y(4) y n
Windows Vista y y(4) y y
Windows Vista x64 y y(4) y y
OpenVMS Alpha n n n n
-Mac OS X 10.8 Intel 32-bit y(5) n y n
-Mac OS X 10.8 Intel 64-bit y(5) n y n
-AIX 5.3 32- and 64-bit n n n y
-FreeBSD 8.2-STABLE 32&64 bit y x x y
-CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
-CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
-CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
-CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
-Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
-SGI ProPack 7 Linux 2.6.32.24 y y y n
+Mac OS X 10.8 Intel 32-bit y(5) n y n
+Mac OS X 10.8 Intel 64-bit y(5) n y n
+AIX 5.3 32- and 64-bit n n n y
+FreeBSD 8.2-STABLE 32&64 bit y x x y
+CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
+CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
+CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
+CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
+Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
+SGI ProPack 7 Linux 2.6.32.24 y y y n
Red Hat Enterprise Linux 6 y y y n
CLE hopper.nersc.gov n n n n
CLE franklin.nersc.gov n n n n
@@ -9127,7 +9733,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 - HDFFV-7583)
@@ -9135,8 +9741,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value. (AKC - 2011/05/07)
@@ -9164,7 +9770,7 @@ Known Problems
(NAF - 2011/01/19)
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem.
(SLU - 2010/05/05 - HDFFV-1264)
@@ -9174,8 +9780,8 @@ Known Problems
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
(SLU - 2010/02/02)
@@ -9186,17 +9792,17 @@ Known Problems
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
(MAM - 2009/11/04)
-
+
* The PathScale MPI implementation, accessing a Panasas file system, would
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not
exist. This is due to the MPI_File_open() call failing if the mode has
the MPI_MODE_EXCL bit set. (AKC - 2009/08/11 - HDFFV-988)
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
@@ -9231,30 +9837,30 @@ Known Problems
echo SKIP H5LSTEST $FILEOUT
==================================================
(AKC - 2008/11/10)
-
+
* For Red Storm, a Cray XT3 system, the yod command sometimes gives the
message, "yod allocation delayed for node recovery". This interferes with
test suites that do not expect to see this message. See the section of "Red
Storm" in file INSTALL_parallel for a way to deal with this problem.
(AKC - 2008/05/28)
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
(SLU - 2005/06/30)
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -9262,17 +9868,17 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
(AKC - 2004/12/08)
-%%%%1.8.7%%%%
+%%%%1.8.7%%%%
HDF5 version 1.8.7 released on Tue May 10 09:24:44 CDT 2011
@@ -9281,10 +9887,10 @@ HDF5 version 1.8.7 released on Tue May 10 09:24:44 CDT 2011
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.6 and
-HDF5 1.8.7, and contains information on the platforms tested and
-known problems in HDF5-1.8.7.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.6 and
+HDF5 1.8.7, and contains information on the platforms tested and
+known problems in HDF5-1.8.7.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.7 source code, documentation, and additional materials
@@ -9296,18 +9902,18 @@ The HDF5 1.8.7 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.7 can be accessed directly at this location:
+User documentation for 1.8.7 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.7 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.7 (current
release) versus Release 1.8.6":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -9345,50 +9951,50 @@ New Features
- Added a new configure option, "--enable-unsupported", which can
be used to stop configure from preventing the use of unsupported
configure option combinations, such as c++ in parallel or Fortran
- with threadsafe. Use at your own risk, as it may result in a
+ with threadsafe. Use at your own risk, as it may result in a
library that won't compile or run as expected!
(MAM - 2010/11/17 - Bug 2061)
Library
-------
- - The library allows the dimension size of a dataspace to be zero. In
- the past, the library would allow this only if the maximal dimension
- size was unlimited. Now there is no such restriction, but no data
+ - The library allows the dimension size of a dataspace to be zero. In
+ the past, the library would allow this only if the maximal dimension
+ size was unlimited. Now there is no such restriction, but no data
can be written to this kind of dataset. (SLU - 2011/4/20)
- We added two new macros, H5_VERSION_GE and H5_VERSION_LE, to let users
compare certain version numbers with the library being used. (SLU -
- 2011/4/20)
+ 2011/4/20)
- Added ability to cache files opened through external links. Added new
public functions H5Pset_elink_file_cache_size(),
H5Pget_elink_file_cache_size(), and H5Fclear_elink_file_cache().
(NAF - 2011/02/17)
- Finished implementing all options for 'log' VFD. (QAK - 2011/1/25)
- Removed all old code for Metrowerks compilers, bracketed by
- __MWERKS__). Metrowerks compiler is long gone. (AKC - 2010/11/17)
+ __MWERKS__). Metrowerks compiler is long gone. (AKC - 2010/11/17)
Parallel Library
----------------
- None
-
+
Tools
-----
- h5diff: Added new "verbose with levels" option, '-vN, --verbose=N'.
The old '-v, --verbose' option is deprecated but remains available;
it is exactly equivalent to '-v0, --verbose=0'.
- The new levels 1 ('-v1' or '--verbose=1') and 2 ('-v2' or
- '--verbose=2') can be specified to view more information regarding
+ The new levels 1 ('-v1' or '--verbose=1') and 2 ('-v2' or
+ '--verbose=2') can be specified to view more information regarding
attributes differences. Bug #2121 (JKM 2011/3/23)
- - h5dump: Added new option --enable-error-stack. This option will
- display error stack information in the output stream. This is
+ - h5dump: Added new option --enable-error-stack. This option will
+ display error stack information in the output stream. This is
useful when the "h5dump: Unable to print data" message is output.
(ADB - 2011/03/03)
High-Level APIs
---------------
- - Fortran LT make datasets routines (H5LTmake_dataset_f,
- h5ltmake_dataset_int_f, h5ltmake_dataset_float_f, h5ltmake_dataset_double_f)
+ - Fortran LT make datasets routines (H5LTmake_dataset_f,
+ h5ltmake_dataset_int_f, h5ltmake_dataset_float_f, h5ltmake_dataset_double_f)
and LT read datasets routines (h5ltread_dataset_f,h5ltread_dataset_int_f,
- h5ltread_dataset_float_f, 5ltread_dataset_double_f) can now handle
+ h5ltread_dataset_float_f, 5ltread_dataset_double_f) can now handle
4-dimensional to 7-dimensional rank datasets. HDFFV-1217 (MSB-2011/4/24/2011)
F90 API
@@ -9403,7 +10009,7 @@ New Features
Support for New Platforms, Languages, and Compilers
===================================================
- Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08)
-
+
Bug Fixes since HDF5-1.8.6
@@ -9412,7 +10018,7 @@ Bug Fixes since HDF5-1.8.6
Configuration
-------------
- Shared C++ and HL libraries on AIX should now be working correctly.
- Note that Fortran shared libraries are still not working on AIX.
+ Note that Fortran shared libraries are still not working on AIX.
(See the Known Problems section, below). (MAM - 2011/4/20)
- Removed config/ibm-aix6.x. All IBM-AIX settings are in one file,
ibm-aix. (AKC - 2011/4/14)
@@ -9420,7 +10026,7 @@ Bug Fixes since HDF5-1.8.6
is enabled. Shared Fortran libraries are still not supported on Mac,
so configure will disable them by default, but this is overrideable
with the new --enable-unsupported configure option. The configure
- summary has been updated to reflect the fact that the shared-ness of
+ summary has been updated to reflect the fact that the shared-ness of
the C++/Fortran wrapper libraries may not align with the C library.
(MAM - 2011/04/11 - HDFFV-4353).
@@ -9429,12 +10035,12 @@ Bug Fixes since HDF5-1.8.6
- Changed assertion failure when decoding a compound datatype with no
fields into a normal error failure. Also prohibit using this sort
of datatype for creating an attribute (as is already the case for
- datasets and committed (named) datatypes). (QAK - 2011/04/15, Jira
+ datasets and committed (named) datatypes). (QAK - 2011/04/15, Jira
issue #HDFFV-2766)
- Tell the VFL flush call that the file will be closing, allowing
the VFDs to avoid sync'ing the file (particularly valuable in parallel).
(QAK - 2011/03/09)
- - The datatype handler created with H5Tencode/decode used to have the
+ - The datatype handler created with H5Tencode/decode used to have the
reference count 0 (zero); it now has the reference count 1 (one).
(SLU - 2011/2/18)
- Fixed the definition of H5_HAVE_GETTIMEOFDAY on Windows so that
@@ -9449,20 +10055,20 @@ Bug Fixes since HDF5-1.8.6
Tools
-----
- - Updated h5dump test case script to prevent entire test failure when
+ - Updated h5dump test case script to prevent entire test failure when
source directory is read-only. Bug #HDFFV-4342 (JKM 2011/4/12)
- Fixed h5dump displaying incorrect values for H5T_STD_I8BE type data in
attribute on Big-Endian machine. H5T_STD_I8BE is unsigned 8bit type,
so h5dump is supposed to display -2 instead of 254. It worked correctly
on Little-Endian system , but not on Big-Endian system. Bug #HDFFV-4358
(JKM 04/08/2011)
- - Updated some HDF5 tools to standardize the option name as
- '--enable-error-stack' for printing HDF5 error stack messages. h5ls and
- h5dump have been updated. For h5ls, this replaces "-e/--errors" option,
- which is deprecated. For h5dump, this is a new option. Bug #2182
+ - Updated some HDF5 tools to standardize the option name as
+ '--enable-error-stack' for printing HDF5 error stack messages. h5ls and
+ h5dump have been updated. For h5ls, this replaces "-e/--errors" option,
+ which is deprecated. For h5dump, this is a new option. Bug #2182
(JKM 2011/3/30)
- - Fixed the h5diff --use-system-epsilon option. The formula used in the
- calculation was changed from ( |a - b| / b ) to ( |a - b| ).
+ - Fixed the h5diff --use-system-epsilon option. The formula used in the
+ calculation was changed from ( |a - b| / b ) to ( |a - b| ).
This was done to improve performance. Bug #2184 (JKM 2011/3/24)
- Fixed output for H5T_REFERENCE in h5dump. According to the BNF document
the output of a H5T_REFERENCE should be followed by the type;
@@ -9470,41 +10076,41 @@ Bug Fixes since HDF5-1.8.6
<ref_type> ::= H5T_STD_REF_OBJECT | H5T_STD_REF_DSETREG
Previously this was only displayed if the -R option was used.
Bug #1725 (ADB 2011/3/28)
- - Fixed two h5diff issues. 1) h5diff compared attributes correctly only
- when two objects had the same number of attributes and the attribute
- names were identical. 2) h5diff did not display useful information about
+ - Fixed two h5diff issues. 1) h5diff compared attributes correctly only
+ when two objects had the same number of attributes and the attribute
+ names were identical. 2) h5diff did not display useful information about
attribute differences. Bug #2121 (JKM 2011/3/17)
- - Fixed a memory leak in h5diff that occurred when accessing symbolic links
+ - Fixed a memory leak in h5diff that occurred when accessing symbolic links
with the --follow-symlink option. Bug #2214 (JKM 2011/3/18)
- - Fixed a memory leak in h5diff that occurred when accessing variable length
+ - Fixed a memory leak in h5diff that occurred when accessing variable length
string data. Bug #2216 (JKM 2011/3/18)
- - Fixed and improved the help page for h5ls -a, --address option.
+ - Fixed and improved the help page for h5ls -a, --address option.
Bug #1904 (JKM 2011/3/11)
- Fixed h5copy to enable copying an object into the same HDF5 file.
- Previously h5copy displayed an error message when the target file
+ Previously h5copy displayed an error message when the target file
was the same as the source file. (XCAO 2011/3/8)
- - Fixed an h5dump problem that caused the tool to skip some data elements
- in large datasets with a large array datatype on Windows. This issue
- arose only on Windows due to the different return behavior of the
+ - Fixed an h5dump problem that caused the tool to skip some data elements
+ in large datasets with a large array datatype on Windows. This issue
+ arose only on Windows due to the different return behavior of the
_vsnprintf() function. Bug #2161 (JKM 2011/3/3)
- - Fixed h5dump which was skipping some array indices in large datasets
+ - Fixed h5dump which was skipping some array indices in large datasets
with a relatively large array datatype. The interval of skipped indices
varied according to the size of the array. Bug #2092 (JKM 2011/2/15)
- Fixed h5diff which was segfaulting when comparing compound datasets
with a combination of fixed-length string datatypes and variable-length
string datatypes in certain orders. Bug #2089 (JKM 2010/12/28)
- - Improved h5diff performance. 1) Now use HDmemcmp() before comparing two
+ - Improved h5diff performance. 1) Now use HDmemcmp() before comparing two
elements. 2) Replace expensive H5Tequals() calls. 3) Retrieve datatype
- information at dataset level, not at each element level for compound
- datasets. HDFFV-7516 (JKM 2011/4/18)
- - Fixed h5ls to display nested compound types with curly brackets
- when -S (--simple) option is used with -l (--label), so it shows
- which members (in curly brackets) belong to which nested compound type,
+ information at dataset level, not at each element level for compound
+ datasets. HDFFV-7516 (JKM 2011/4/18)
+ - Fixed h5ls to display nested compound types with curly brackets
+ when -S (--simple) option is used with -l (--label), so it shows
+ which members (in curly brackets) belong to which nested compound type,
making the output clearer. Bug #1979 (JKM 2010/11/09)
- - Fixed h5diff to handle variable-length strings in a compound dataset
+ - Fixed h5diff to handle variable-length strings in a compound dataset
and variable-length string arrays in a compound dataset correctly.
- Garbage values were previously displayed when h5diff compared multiple
- variable-length strings in a compound type dataset.
+ Garbage values were previously displayed when h5diff compared multiple
+ variable-length strings in a compound type dataset.
Bug #1989 (JKM 2010/10/28)
- Fixed h5copy to fail gracefully when copying an object to a non-
existing group without the -p option. Bug #2040 (JKM 2010/10/18)
@@ -9523,10 +10129,10 @@ Bug Fixes since HDF5-1.8.6
Fortran High-Level APIs:
------
- - h5tbmake_table_f: Fixed error in passing an array of characters with different
+ - h5tbmake_table_f: Fixed error in passing an array of characters with different
length field names.
- - h5tget_field_info_f: Fixed error with packing the C strings into a Fortran
- array of strings. Added optional argument called 'maxlen_out' which returns
+ - h5tget_field_info_f: Fixed error with packing the C strings into a Fortran
+ array of strings. Added optional argument called 'maxlen_out' which returns
the maximum string character length in a field name element.
Bug HDFFV-1255 (MSB- 4/17/2011)
@@ -9557,12 +10163,12 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2
#1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010)
- (jam) GNU Fortran (GCC) 4.1.2 20080704
+ (jam) GNU Fortran (GCC) 4.1.2 20080704
(Red Hat 4.1.2-48) and 4.4.2
PGI C, Fortran, C++ 10.4-0 32-bit
PGI C, Fortran, C++ 10.6-0 32-bit
Intel(R) C Compiler for 32-bit
- applications, Version 11.1
+ applications, Version 11.1
Intel(R) C++ Compiler for 32-bit
applications, Version 11.1
Intel(R) Fortran Compiler for 32-bit
@@ -9576,8 +10182,8 @@ The following platforms and compilers have been tested for this release.
(amani) tested for both 32- and 64-bit binaries
GNU Fortran (GCC) 4.1.2 20080704
(Red Hat 4.1.2-46) and 4.4.2
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Version 11.1.
PGI C, Fortran, C++ Version 9.0-4
for 64-bit target on x86-64
@@ -9626,8 +10232,8 @@ The following platforms and compilers have been tested for this release.
Intel C, C++ and Fortran compilers 12.0.1.122 20101110
Mac OS X 10.7.0 (Intel 32-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
- Darwin Kernel Version 10.7.0 GNU Fortran (GCC) version 4.4.0 20090123 (experimental)
- [trunk revision 143587]
+ Darwin Kernel Version 10.7.0 GNU Fortran (GCC) version 4.4.0 20090123 (experimental)
+ [trunk revision 143587]
Fedora 12 2.6.32.16-150.fc12.ppc64 #1 SMP ppc64 GNU/Linux
gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
@@ -9664,7 +10270,7 @@ The following platforms and compilers have been tested for this release.
Ubuntu 10.10 2.6.35-28-generic #50-Ubuntu SMP x86_64 GNU/Linux
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
-
+
OpenVMS Alpha 8.3 HP C V7.3-009
HP Fortran V8.2-104679-48H9K
HP C++ V7.3-009
@@ -9673,14 +10279,14 @@ Tested Configuration Features Summary
========================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -9706,28 +10312,28 @@ Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y
SGI Linux 2.6.32.19 y y y y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-Windows XP y y(4) y n
-Windows XP x64 y y(4) y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+Windows XP y y(4) y n
+Windows XP x64 y y(4) y n
Windows Vista y y(4) y y
Windows Vista x64 y y(4) y y
OpenVMS Alpha n n n n
-Mac OS X 10.7 Intel 32-bit y(5) n y n
-Mac OS X 10.7 Intel 64-bit y(5) n y n
-AIX 6.1 32- and 64-bit n n n y
-FreeBSD 8.2-STABLE 32&64 bit y x x y
-CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
-CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
-CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
-CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
+Mac OS X 10.7 Intel 32-bit y(5) n y n
+Mac OS X 10.7 Intel 64-bit y(5) n y n
+AIX 6.1 32- and 64-bit n n n y
+FreeBSD 8.2-STABLE 32&64 bit y x x y
+CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
+CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
+CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
+CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
RedHat EL4 2.6.18 Xeon Lustre C y y y n
-Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
-SGI Linux 2.6.32.19 y y y y
+Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
+SGI Linux 2.6.32.19 y y y y
(1) Fortran compiled with gfortran.
(2) With PGI and Absoft compilers.
@@ -9744,7 +10350,7 @@ Known Problems
that "make prefix=XXX install" no longer works for shared libraries. It
still works correctly for static libraries. Therefore, if you want to
install the HDF5 shared libraries in a location such as /usr/local/hdf5,
- you need to specify the location via the --prefix option during configure
+ you need to specify the location via the --prefix option during configure
time. E.g, ./configure --prefix=/usr/local/hdf5 ...
(AKC - 2011/05/07 HDFFV-7583)
@@ -9752,8 +10358,8 @@ Known Problems
be terminated by the alarm signal. If that happens, one can increase the
alarm seconds (default is 1200 seconds = 20 minutes) by setting the
environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600
- (60 minutes). Note that the t_shapesame test may fail in some systems
- (see the "While working on the 1.8.6 release..." problem below). If
+ (60 minutes). Note that the t_shapesame test may fail in some systems
+ (see the "While working on the 1.8.6 release..." problem below). If
it does, it will waste more time if $HDF5_ALARM_SECONDS is set
to a larger value. (AKC - 2011/05/07)
@@ -9786,30 +10392,30 @@ Known Problems
http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/
* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
+ Cygwin when converting from unsigned long long to long double. The
library's own conversion works fine. We defined a macro for Cygwin to
skip this test until we can solve the problem. Please see bug #1813.
- SLU - 2010/5/5
+ SLU - 2010/5/5
* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the
structure H5FD_class_t changed in 1.8. There is new parameter added to
get_eoa and set_eoa callback functions. A new callback function
get_type_map was added in. The public function H5FDrealloc was taken
out in 1.8. The problem only happens when users define their own driver
- for 1.6 and try to plug in 1.8 library. Because there's only one user
- complaining about it, we (Elena, Quincey, and I) decided to leave it as
+ for 1.6 and try to plug in 1.8 library. Because there's only one user
+ complaining about it, we (Elena, Quincey, and I) decided to leave it as
it is (see bug report #1279). Quincey will make a plan for 1.10.
SLU - 2010/2/2
* MinGW has a missing libstdc++.dll.a library file and will not successfully link
C++ applications/tests. Do not use the enable-cxx configure option. Read all of
the INSTALL_MINGW.txt file for all restrictions. ADB - 2009/11/11
-
+
* The PathScale MPI implementation, accessing a Panasas file system, would
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not
exist. This is due to the MPI_File_open() call failing if the mode has
the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
@@ -9851,23 +10457,23 @@ Known Problems
Storm" in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -9875,23 +10481,23 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
-* There is also a configure error on Altix machines that incorrectly reports
+* There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
* On cobalt, an SGI Altix SMP ia64 system, Intel compiler version 10.1 (which
@@ -9907,7 +10513,7 @@ Known Problems
and it will be fixed in 1.8.8. DER - 2011/04/27
-%%%%1.8.6%%%%
+%%%%1.8.6%%%%
HDF5 version 1.8.6 released on Mon Feb 14 10:26:30 CST 2011
@@ -9916,10 +10522,10 @@ HDF5 version 1.8.6 released on Mon Feb 14 10:26:30 CST 2011
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.5 and
-HDF5 1.8.6, and contains information on the platforms tested and
-known problems in HDF5-1.8.6.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.5 and
+HDF5 1.8.6, and contains information on the platforms tested and
+known problems in HDF5-1.8.6.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.6 source code, documentation, and additional materials
@@ -9931,18 +10537,18 @@ The HDF5 1.8.6 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.6 can be accessed directly at this location:
+User documentation for 1.8.6 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.6 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.6 (current
release) versus Release 1.8.5":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -9970,43 +10576,43 @@ New Features
-------------
- CMake: Improved CPack packaging, added parallel commands, improved
configuration options (better similarity to configure), added more
- tests, better support for use in external cmake projects.
+ tests, better support for use in external cmake projects.
(ADB - 2010/10/07)
- - The default configuration setting for official releases is
- --enable-production. For unofficial releases, the default configuration
+ - The default configuration setting for official releases is
+ --enable-production. For unofficial releases, the default configuration
setting has been --disable-production. (AKC - 2010/05/28)
Library
-------
- - Added support for thread safety on Windows using the Windows threads
- library. Use the HDF5_ENABLE_THREADSAFE option in CMake on a Windows
- platform to enable this functionality. This is supported on Windows
+ - Added support for thread safety on Windows using the Windows threads
+ library. Use the HDF5_ENABLE_THREADSAFE option in CMake on a Windows
+ platform to enable this functionality. This is supported on Windows
Vista and newer Windows operating systems. (MAM - 2010/09/10)
- - H5Tset_order and H5Tget_order now support all datatypes. A new byte
- order, H5T_ORDER_MIXED, has been added specifically for a compound
- datatype and its derived type. (SLU - 2010/8/23)
- - Improved performance of metadata I/O by changing the default algorithm
- to perform I/O from all processes (instead of just process 0) when using
+ - H5Tset_order and H5Tget_order now support all datatypes. A new byte
+ order, H5T_ORDER_MIXED, has been added specifically for a compound
+ datatype and its derived type. (SLU - 2010/8/23)
+ - Improved performance of metadata I/O by changing the default algorithm
+ to perform I/O from all processes (instead of just process 0) when using
parallel I/O drivers. (QAK - 2010/07/19)
- - Improved performance of I/O on datasets with the same shape, but
+ - Improved performance of I/O on datasets with the same shape, but
different rank. (QAK - 2010/07/19)
- - Improved performance of the chunk cache by avoiding unnecessary b-tree
- lookups of chunks already in cache. (NAF - 2010/06/15)
-
+ - Improved performance of the chunk cache by avoiding unnecessary b-tree
+ lookups of chunks already in cache. (NAF - 2010/06/15)
+
Parallel Library
----------------
- None
-
+
Tools
-----
- - h5diff: Added a new flag: --exclude-path. The specified path to an
- object will be excluded when comparing two files or two groups. If a
- group is specified to be excluded, all member objects of that group
+ - h5diff: Added a new flag: --exclude-path. The specified path to an
+ object will be excluded when comparing two files or two groups. If a
+ group is specified to be excluded, all member objects of that group
will be excluded. (JKM - 2010/09/16).
- - h5ls: Added a new flag: --no-dangling-links. See --help output for
+ - h5ls: Added a new flag: --no-dangling-links. See --help output for
details. (JKM - 2010/06/15)
- - h5ls: Added a new flag --follow-symlinks. See --help output for
+ - h5ls: Added a new flag --follow-symlinks. See --help output for
details. (JKM - 2010/05/25)
-
+
High-Level APIs
---------------
- None
@@ -10031,9 +10637,9 @@ Bug Fixes since HDF5-1.8.5
Configuration
-------------
- - The default number of MPI processes for testing purposes has been
+ - The default number of MPI processes for testing purposes has been
changed from 3 to 6. (AKC - 2010/11/11)
- - Some tests in tools/h5repack may fail in AIX systems when -q32 mode is
+ - Some tests in tools/h5repack may fail in AIX systems when -q32 mode is
used. The error is caused by not requesting enough memory in default.
Added "env LDR_CNTRL=MAXDATA=0x20000000@DSA" into the $RUNSERIAL and
$RUNPARALLE in the AIX config file so that executables are tested with
@@ -10041,10 +10647,10 @@ Bug Fixes since HDF5-1.8.5
- Removed recognition of the parallel compilers of LAM(hcc) and
ChMPIon(cmpicc) since we have no access to these two MPI implementations
and cannot verify their correctness. (AKC - 2010/07/14 - Bug 1921)
- - PHDF5 was changed to use "mpiexec" instead of mpirun as the default
- MPI applications startup command as defined in the MPI-2 definition,
+ - PHDF5 was changed to use "mpiexec" instead of mpirun as the default
+ MPI applications startup command as defined in the MPI-2 definition,
section 4.1. (AKC - 2010/06/11 - Bug 1921)
-
+
Library
-------
- Fixed a bug that caused big endian machines to generate corrupt files
@@ -10052,15 +10658,15 @@ Bug Fixes since HDF5-1.8.5
values. Note that such datasets will no longer be readable by any
by any machine after this patch. (NAF - 2010/02/02 - Bug 2131)
- Retrieving a link's name by index in the case where the link is external
- and the file that the link refers to doesn't exist will now fail
+ and the file that the link refers to doesn't exist will now fail
gracefully rather than cause a segmentation fault. (MAM - 2010/11/17)
- - Modified metadata accumulator to better track accumulated dirty metadata
- in an effort to reduce unnecessary I/O in certain situations and to
+ - Modified metadata accumulator to better track accumulated dirty metadata
+ in an effort to reduce unnecessary I/O in certain situations and to
fix some other corner cases which were prone to error. (MAM - 2010/10/15)
- - Added a new set of unit tests that are run during 'make check' to verify
+ - Added a new set of unit tests that are run during 'make check' to verify
the behavior of the metadata accumulator. (MAM - 2010/10/15)
- Modified library to always cache symbol table information. Libraries
- from version 1.6.3 and earler have a bug which causes them to require
+ from version 1.6.3 and earler have a bug which causes them to require
this information for some operations. (NAF - 2010/09/21 - Bug 1864)
- Fixed a bug where the library could generate an assertion/core dump when
a file that had been created with H5Pset_libver_bounds(fapl,
@@ -10074,9 +10680,9 @@ Bug Fixes since HDF5-1.8.5
CMake to build the library. (ADB - 2010/09/13 - Bug 1938)
- When a mandatory filter failed to write data chunks, the dataset
couldn't close (bug 1260). The fix releases all resources and closes
- the dataset but returns a failure. (SLU - 2010/09/08)
- - H5Eset_current_stack now also closes the error stack set as the
- default. This is to avoid a potential problem.
+ the dataset but returns a failure. (SLU - 2010/09/08)
+ - H5Eset_current_stack now also closes the error stack set as the
+ default. This is to avoid a potential problem.
(SLU - 2010/09/07 - Bug 1799)
- Corrected situation where 1-D chunked dataset could get created by an
application without calling H5Pset_chunk(). H5Pset_chunk is now
@@ -10084,12 +10690,12 @@ Bug Fixes since HDF5-1.8.5
- Fixed many memory issues that valgrind exposed. (QAK - 2010/08/24)
- Fixed the bug in the filter's public CAN_APPLY function. The return
value should be htri_t not herr_t. (SLU - 2010/08/05 - Bug 1239)
- - Fixed the STDIO VFD to use fseeko64 instead of fseek64 for 64-bit I/O
+ - Fixed the STDIO VFD to use fseeko64 instead of fseek64 for 64-bit I/O
support. (AKC - 2010/7/30)
- Fixed a bug in the direct I/O driver that could render files with certain
kinds of unaligned data unreadable or corrupt them. (NAF - 2010/07/28)
- - valgrind reported an error of copying data to itself when a new attribute
- is written. Fixed by taking out the memcpy step in the attribute code.
+ - valgrind reported an error of copying data to itself when a new attribute
+ is written. Fixed by taking out the memcpy step in the attribute code.
(SLU - 2010/07/28 - Bug 1956)
- Corrected various issues in the MPI datatype creation code which could
cause resource leaks or incorrect behavior (and may improve the
@@ -10105,23 +10711,23 @@ Bug Fixes since HDF5-1.8.5
Tools
-----
- - Fixed h5diff to compare member objects and groups recursively when
+ - Fixed h5diff to compare member objects and groups recursively when
two files or groups are compared. (JKM - 2010/9/16 - Bug 1975)
- Fixed h5repack to be able to convert a dataset to COMPACT layout.
(JKM - 2010/09/15 - Bug 1896)
- Changed h5ls to not interpret special characters in object or attribute
names for output. (JKM - 2010/06/28 - Bug 1784)
- - Revised the order of arguments for h5cc, h5fc, h5c++, h5pcc and h5pfc.
- CPPFLAGS, CFLAGS, LDFLAGS, and LIBS have been duplicated with an H5BLD_
- prefix to put the flags and paths from the hdf5 build in the correct
- places and allow the script user to add entries in CPPFLAGS, CFLAGS,
- LDFLAGS, and LIBS that will take precedence over those from the hdf5
- build. The user can make these entries persistent by editing
- CFLAGSBASE, CPPFLAGSBASE, LDFLAGSBASE, and LIBSBASE near the top of
- the script or temporary by setting HDF5_CFLAGS, HDF5_CPPFLAGS,
- HDF5_LDFLAGS, or HDF5_LIBS in the environment. The new order of
- arguments in these scripts is $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS
- $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args
+ - Revised the order of arguments for h5cc, h5fc, h5c++, h5pcc and h5pfc.
+ CPPFLAGS, CFLAGS, LDFLAGS, and LIBS have been duplicated with an H5BLD_
+ prefix to put the flags and paths from the hdf5 build in the correct
+ places and allow the script user to add entries in CPPFLAGS, CFLAGS,
+ LDFLAGS, and LIBS that will take precedence over those from the hdf5
+ build. The user can make these entries persistent by editing
+ CFLAGSBASE, CPPFLAGSBASE, LDFLAGSBASE, and LIBSBASE near the top of
+ the script or temporary by setting HDF5_CFLAGS, HDF5_CPPFLAGS,
+ HDF5_LDFLAGS, or HDF5_LIBS in the environment. The new order of
+ arguments in these scripts is $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS
+ $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args
$shared_link. (LRK - 2010/10/25 - Bug 1973)
F90 API
@@ -10165,12 +10771,12 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2
#1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010)
- (jam) GNU Fortran (GCC) 4.1.2 20080704
+ (jam) GNU Fortran (GCC) 4.1.2 20080704
(Red Hat 4.1.2-48) and 4.4.2
PGI C, Fortran, C++ 10.4-0 32-bit
PGI C, Fortran, C++ 10.6-0 32-bit
Intel(R) C Compiler for 32-bit
- applications, Version 11.1
+ applications, Version 11.1
Intel(R) C++ Compiler for 32-bit
applications, Version 11.1
Intel(R) Fortran Compiler for 32-bit
@@ -10184,8 +10790,8 @@ The following platforms and compilers have been tested for this release.
(amani) tested for both 32- and 64-bit binaries
GNU Fortran (GCC) 4.1.2 20080704
(Red Hat 4.1.2-46) and 4.4.2
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Version 11.1.
PGI C, Fortran, C++ Version 9.0-4
for 64-bit target on x86-64
@@ -10232,7 +10838,7 @@ The following platforms and compilers have been tested for this release.
Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake)
Mac OS X 10.6.3 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
- Darwin Kernel Version 10.3.1 GNU Fortran (GCC) 4.5.0 20090910
+ Darwin Kernel Version 10.3.1 GNU Fortran (GCC) 4.5.0 20090910
Intel C, C++ and Fortran compilers 11.1 20100806
Mac OS X 10.6.4 (Intel 32-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
@@ -10240,7 +10846,7 @@ The following platforms and compilers have been tested for this release.
Intel C, C++ and Fortran compilers 12.0.0 20101110
Mac OS X 10.6.4 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)
- Darwin Kernel Version 10.6.0 GNU Fortran (GCC) 4.5.0 20090910
+ Darwin Kernel Version 10.6.0 GNU Fortran (GCC) 4.5.0 20090910
Intel C, C++ and Fortran compilers 11.1 20100806
Fedora 12 2.6.32.16-150.fc12.ppc64 #1 SMP ppc64 GNU/Linux
@@ -10278,7 +10884,7 @@ The following platforms and compilers have been tested for this release.
Ubuntu 10.10 2.6.35-25-generic #44-Ubuntu SMP x86_64 GNU/Linux
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
-
+
OpenVMS Alpha 8.3 HP C V7.3-009
HP Fortran V8.2-104679-48H9K
HP C++ V7.3-009
@@ -10287,14 +10893,14 @@ Tested Configuration Features Summary
========================================
In the tables below
- y = tested
+ y = tested
n = not tested in this release
C = Cluster
W = Workstation
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -10319,27 +10925,27 @@ Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y
SGI Linux 2.6.32.19 y y y y y y
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-Windows XP y y(4) y n
-Windows XP x64 y y(4) y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+Windows XP y y(4) y n
+Windows XP x64 y y(4) y n
Windows Vista y y(4) y y
Windows Vista x64 y y(4) y y
OpenVMS Alpha n n n n
-Mac OS X 10.6 y(5) n y n
-AIX 6.1 32- and 64-bit n n n y
-FreeBSD 6.3-STABLE 32&64 bit y n y y
-CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
-CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
-CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
-CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
-CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
+Mac OS X 10.6 y(5) n y n
+AIX 6.1 32- and 64-bit n n n y
+FreeBSD 6.3-STABLE 32&64 bit y n y y
+CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y
+CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n
+CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y
+CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n
+CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n
RedHat EL4 2.6.18 Xeon Lustre C y y y n
-Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
-SGI Linux 2.6.32.19 y y y y
+Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y
+SGI Linux 2.6.32.19 y y y y
(1) Fortran compiled with gfortran.
(2) With PGI and Absoft compilers.
@@ -10365,7 +10971,7 @@ Known Problems
library. We have fixed these failures. But it's too late to put the fixes
into this release. If you install the 1.8.6 library, it should still work
despite of these test failures. If you want the working copy without any
- test failure, you can request it from us. SLU - 2011/01/26
+ test failure, you can request it from us. SLU - 2011/01/26
* If parallel gmake (e.g., gmake -j 4) is used, the "gmake clean" command
sometimes fails in the perform directory due to the attempt to remove the
@@ -10385,41 +10991,41 @@ Known Problems
These programs can be found at:
http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/
-* The h5diff tool can display garbage values when variable-length strings in
- a compound type dataset are compared. This also occurs with variable-length
- string arrays in a compound type dataset. See bug #1989. This will be fixed
+* The h5diff tool can display garbage values when variable-length strings in
+ a compound type dataset are compared. This also occurs with variable-length
+ string arrays in a compound type dataset. See bug #1989. This will be fixed
in the next release. JKM - 2010/11/05
-* The AIX --enable-shared setting does not quite work. It can produce a shared
- library, but there cannot be more than one shared library that is
- interlinked. This means that the high level APIs will not work which is not
- very useful. We hope to have a solution in the next release.
+* The AIX --enable-shared setting does not quite work. It can produce a shared
+ library, but there cannot be more than one shared library that is
+ interlinked. This means that the high level APIs will not work which is not
+ very useful. We hope to have a solution in the next release.
(AKC - 2010/10/15)
-
+
* H5Eset_auto can cause a seg fault for a library API call if the application
- compiles with -DH5_USE_16_API (see bug 1707). It will be fixed in the
+ compiles with -DH5_USE_16_API (see bug 1707). It will be fixed in the
next release. SLU - 2010/10/5
-
-* The library's test dt_arith.c showed a compiler's rounding problem on
- Cygwin when converting an unsigned long long to a long double. The
- library's own conversion works fine. We defined a macro for Cygwin to
- skip this test until we can solve the problem. Please see bug #1813.
+
+* The library's test dt_arith.c showed a compiler's rounding problem on
+ Cygwin when converting an unsigned long long to a long double. The
+ library's own conversion works fine. We defined a macro for Cygwin to
+ skip this test until we can solve the problem. Please see bug #1813.
SLU - 2010/5/5
-
-* All the VFL drivers aren't backwardly compatible. In H5FDpublic.h, the
- structure H5FD_class_t changed in 1.8. A new parameter was added to the
- get_eoa and set_eoa callback functions, and a new callback function
- get_type_map was added. The public function H5FDrealloc was taken out in
- 1.8. The problem only happens when users define their own driver for 1.6
+
+* All the VFL drivers aren't backwardly compatible. In H5FDpublic.h, the
+ structure H5FD_class_t changed in 1.8. A new parameter was added to the
+ get_eoa and set_eoa callback functions, and a new callback function
+ get_type_map was added. The public function H5FDrealloc was taken out in
+ 1.8. The problem only happens when users define their own driver for 1.6
and try to plug in a 1.8 library. This will be fixed in 1.10. SLU - 2010/2/2
* MinGW has a missing libstdc++.dll.a library file and will not successfully link
C++ applications/tests. Do not use the enable-cxx configure option. Read all of
the INSTALL_MINGW.txt file for all restrictions. ADB - 2009/11/11
-
-* The PathScale MPI implementation, accessing a Panasas file system, would
- cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not
- exist. This is due to the MPI_File_open() call failing if the amode has
+
+* The PathScale MPI implementation, accessing a Panasas file system, would
+ cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not
+ exist. This is due to the MPI_File_open() call failing if the amode has
the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
@@ -10427,15 +11033,15 @@ Known Problems
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO. CMC - 2009/04/28
-* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and
- tools/h5copy/testh5copy.sh will fail some of their sub-tests. These
- sub-tests are expected to fail and should exit with a non-zero code but
- the yod command does not propagate the exit code of the executables. Yod
- always returns 0 if it can launch the executable. The test suite shell
- expects a non-zero for this particular test. Therefore, it concludes the
- test has failed when it receives 0 from yod. To skip all the "failing"
+* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and
+ tools/h5copy/testh5copy.sh will fail some of their sub-tests. These
+ sub-tests are expected to fail and should exit with a non-zero code but
+ the yod command does not propagate the exit code of the executables. Yod
+ always returns 0 if it can launch the executable. The test suite shell
+ expects a non-zero for this particular test. Therefore, it concludes the
+ test has failed when it receives 0 from yod. To skip all the "failing"
tests for now, change them as shown below.
-
+
======== Original tools/h5ls/testh5ls.sh =========
TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5
======== Change to ===============================
@@ -10457,71 +11063,71 @@ Known Problems
==================================================
AKC - 2008/11/10
-* For Red Storm, a Cray XT3 system, the yod command sometimes gives the
- message "yod allocation delayed for node recovery." This interferes
- with test suites that do not expect to see this message. See the "Red Storm"
- section in file INSTALL_parallel for a way to deal with this problem.
+* For Red Storm, a Cray XT3 system, the yod command sometimes gives the
+ message "yod allocation delayed for node recovery." This interferes
+ with test suites that do not expect to see this message. See the "Red Storm"
+ section in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-
-* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use the -mp -O1 compilation flags to build the libraries. A higher level
+
+* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use the -mp -O1 compilation flags to build the libraries. A higher level
of optimization causes failures in several HDF5 library tests.
-
-* On mpich 1.2.5 and 1.2.6 on a system using four processors, if more than
- two processes contribute no I/O and the application asks to do collective
- I/O, we have found that a simple collective write will sometimes hang. This
+
+* On mpich 1.2.5 and 1.2.6 on a system using four processors, if more than
+ two processes contribute no I/O and the application asks to do collective
+ I/O, we have found that a simple collective write will sometimes hang. This
can be verified with the t_mpi test under testpar.
-
-* A dataset created or rewritten with a v1.6.3 or later library cannot be
- read with the v1.6.2 or earlier library when the Fletcher32 EDC filter
- is enabled. There was a bug in the calculation of the Fletcher32 checksum
- in the library before v1.6.3; the checksum value was not consistent
- between big-endian and little-endian systems. This bug was fixed in
- Release 1.6.3. However, after fixing the bug, the checksum value was no
- longer the same as before on little-endian system. Library releases after
- 1.6.4 can still read datasets created or rewritten with an HDF5 library of
+
+* A dataset created or rewritten with a v1.6.3 or later library cannot be
+ read with the v1.6.2 or earlier library when the Fletcher32 EDC filter
+ is enabled. There was a bug in the calculation of the Fletcher32 checksum
+ in the library before v1.6.3; the checksum value was not consistent
+ between big-endian and little-endian systems. This bug was fixed in
+ Release 1.6.3. However, after fixing the bug, the checksum value was no
+ longer the same as before on little-endian system. Library releases after
+ 1.6.4 can still read datasets created or rewritten with an HDF5 library of
v1.6.2 or earlier. SLU - 2005/6/30
-
-* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
- messages like "INFO: 0031-XXX ...". This is from the command `poe'. To
- work around this, set the environment variable MP_INFOLEVEL to 0 to
- minimize the messages and run the tests again. The tests may fail with
- messages like "The socket name is already in use", but HDF5 does not use
- sockets. This failure is due to problems with the poe command trying to
- set up the debug socket. To resolve this problem, check to see whether
- there are any old /tmp/s.pedb.* files around. These are sockets used by
- the poe command and left behind if the command failed at some point. To
- resolve this, ask your system administrator to remove the
- old/tmp/s.pedb.* files, and then ask IBM to provide a means to run poe
+
+* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
+ messages like "INFO: 0031-XXX ...". This is from the command `poe'. To
+ work around this, set the environment variable MP_INFOLEVEL to 0 to
+ minimize the messages and run the tests again. The tests may fail with
+ messages like "The socket name is already in use", but HDF5 does not use
+ sockets. This failure is due to problems with the poe command trying to
+ set up the debug socket. To resolve this problem, check to see whether
+ there are any old /tmp/s.pedb.* files around. These are sockets used by
+ the poe command and left behind if the command failed at some point. To
+ resolve this, ask your system administrator to remove the
+ old/tmp/s.pedb.* files, and then ask IBM to provide a means to run poe
without the debug socket.
-* The --enable-static-exec configure flag will only statically link
- libraries if the static version of that library is present. If only the
- shared version of a library exists (i.e., most system libraries on
- Solaris, AIX, and Mac, for example, only have shared versions), the flag
- should still result in a successful compilation, but note that the
- installed executables will not be fully static. Thus, the only guarantee
- on these systems is that the executable is statically linked with just
+* The --enable-static-exec configure flag will only statically link
+ libraries if the static version of that library is present. If only the
+ shared version of a library exists (i.e., most system libraries on
+ Solaris, AIX, and Mac, for example, only have shared versions), the flag
+ should still result in a successful compilation, but note that the
+ installed executables will not be fully static. Thus, the only guarantee
+ on these systems is that the executable is statically linked with just
the HDF5 library.
-
-* On an SGI Altix SMP ia64 system, the Intel compiler version 10.1 (which
- is the default on that system) does not work properly and results in
- failures during the make check (in a static build) and the make
- installcheck (in a shared build). This appears to be a compiler
- optimization problem. Reducing the optimization by setting CFLAGS to
- -O1 or below resolves the issue. Using a newer version of the compiler
+
+* On an SGI Altix SMP ia64 system, the Intel compiler version 10.1 (which
+ is the default on that system) does not work properly and results in
+ failures during the make check (in a static build) and the make
+ installcheck (in a shared build). This appears to be a compiler
+ optimization problem. Reducing the optimization by setting CFLAGS to
+ -O1 or below resolves the issue. Using a newer version of the compiler
(11.0) avoids the issue. MAM - 2010/06/01
-
+
* On solaris systems, when running the examples with the scripts installed in
- .../share/hdf5_examples, two of the c tests, h5_extlink and h5_elink_unix2win
- may fail or generate HDF5 errors because the script commands in c/run-c-ex.sh
- fail to create test directories red, blue, and u2w. Moving the '!' in lines
- 67, 70, 73 of run-c-ex.sh will fix the problem. For example the script command
- "if ! test -d red; then" will work on solaris if changed to
+ .../share/hdf5_examples, two of the c tests, h5_extlink and h5_elink_unix2win
+ may fail or generate HDF5 errors because the script commands in c/run-c-ex.sh
+ fail to create test directories red, blue, and u2w. Moving the '!' in lines
+ 67, 70, 73 of run-c-ex.sh will fix the problem. For example the script command
+ "if ! test -d red; then" will work on solaris if changed to
"if test ! -d red; then".
-%%%%1.8.5%%%%
+%%%%1.8.5%%%%
HDF5 version 1.8.5 released on Fri Jun 4 13:27:31 CDT 2010
@@ -10531,8 +11137,8 @@ INTRODUCTION
============
This document describes the differences between HDF5-1.8.4 and HDF5 1.8.5, and
-contains information on the platforms tested and known problems in HDF5-1.8.5.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt
+contains information on the platforms tested and known problems in HDF5-1.8.5.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt
in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.5 source code, documentation, and additional materials
@@ -10544,18 +11150,18 @@ The HDF5 1.8.5 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.5 can be accessed directly at this location:
+User documentation for 1.8.5 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.5 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.5 (current
release) versus Release 1.8.4":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -10587,11 +11193,11 @@ New Features
2.8.1 of CMake is required.
- Configure now adds appropriate defines for supporting large (64-bit)
files on all systems, where supported, by default, instead of only Linux.
- This large file support is controllable with the --enable-largefile
- configure option. The Linux-specific --enable-linux-lfs option has been
+ This large file support is controllable with the --enable-largefile
+ configure option. The Linux-specific --enable-linux-lfs option has been
deprecated in favor of this new option. Please note that specifying
--disable-large does NOT attempt to "turn off" largefile support if it
- is natively supported by the compiler, but rather just disables
+ is natively supported by the compiler, but rather just disables
configure from actively trying to add any additional compiler flags.
(MAM - 2010/05/05 - Bug # 1772/1434)
- Fixed an signal handling mask error in H5detect that might result in
@@ -10601,7 +11207,7 @@ New Features
of compiler optimization (in particular, allowing '-O3' to work
with recent versions of GCC). (QAK - 2010/04/26)
- Upgraded versions of autotools used to generate configuration suite.
- We now use Automake 1.11.1, Autoconf 2.65, and Libtool 2.2.6b.
+ We now use Automake 1.11.1, Autoconf 2.65, and Libtool 2.2.6b.
(MAM - 2010/04/15)
- Added the xlc-* and mpcc_r-* BASENAME patterns to be recognized as IBM
compilers so that the IBM compiler options can be added properly. This
@@ -10610,7 +11216,7 @@ New Features
Library
-------
- - Performance is substantially improved when extending a dataset with early
+ - Performance is substantially improved when extending a dataset with early
allocation. (NAF - 2010/03/24 - Bug # 1637)
- Added support for filtering densely stored groups. Many of the API
functions related to filters have been extended to support dense groups
@@ -10620,18 +11226,18 @@ New Features
Parallel Library
----------------
- None
-
+
Tools
-----
- h5dump: Added the new packed bits feature which prints packed bits stored
- in an integer dataset. (AKC/ADB - 2010/5/7)
- - h5diff: Fixed incorrect behavior (hang) in parallel mode when specifying
+ in an integer dataset. (AKC/ADB - 2010/5/7)
+ - h5diff: Fixed incorrect behavior (hang) in parallel mode when specifying
invalid options (ex: -v and -q). (JKM - 2010/02/17)
- h5diff: Added new flag --no-dangling-links (see --help for details).
- (JKM - 2010/02/10)
+ (JKM - 2010/02/10)
- h5diff: Added new flag --follow-symlinks (see --help for details).
(JKM - 2010/01/25)
- - h5diff: Added a fix to correct the display of garbage values when
+ - h5diff: Added a fix to correct the display of garbage values when
displaying big-endian data on a little-endian machine. (JKM - 2009/11/20)
High-Level APIs
@@ -10672,12 +11278,12 @@ Bug Fixes since HDF5-1.8.4
dataset. (NAF - 2010/05/20)
- Fixed some memory leaks in VL datatype conversion when strings are
used as fill values. (MAM - 2010/05/12 - Bug # 1826)
- - Fixed an H5Rcreate failure when passing in a -1 for the dataspace
+ - Fixed an H5Rcreate failure when passing in a -1 for the dataspace
identifier. (ADB - 2010/4/28)
- Fixed a bug when copying objects with NULL references with the
H5O_COPY_EXPAND_REFERENCE_FLAG flag set. (NAF - 2010/04/08 - Bug # 1815)
- - Added a mechanism to the H5I interface to save returned object identifier
- structures for immediate re-use if needed. This addresses a potential
+ - Added a mechanism to the H5I interface to save returned object identifier
+ structures for immediate re-use if needed. This addresses a potential
performance issue by delaying the case when the next identifier to be
registered has grown so large that it wraps around and needs to be
checked to see whether it is available for distribution.
@@ -10689,18 +11295,18 @@ Bug Fixes since HDF5-1.8.4
(NAF - 2010/03/05 - Bug # 1733)
- Fixed a bug where the library, when traversing an external link, would
reopen the source file if nothing else worked. (NAF - 2010/03/05)
- - Fixed a bug where fractal heap identifiers for attributes and shared
- object header messages could be incorrectly encoded in the file for
- files created on big-endian platforms.
- Please see http://www.hdfgroup.org/HDF5/release/known_problems if you
- suspect you have a file with this problem.
+ - Fixed a bug where fractal heap identifiers for attributes and shared
+ object header messages could be incorrectly encoded in the file for
+ files created on big-endian platforms.
+ Please see http://www.hdfgroup.org/HDF5/release/known_problems if you
+ suspect you have a file with this problem.
(QAK - 2010/02/23 - Bug # 1755)
- Fixed an intermittent bug in the b-tree code which could be triggered
by expanding and shrinking chunked datasets in certain ways.
(NAF - 2010/02/16)
- H5Tdetect_class said a VL string is a string type. But when it's in
- a compound type, it said it's a VL type. THis has been fixed to be
- consistent; it now always returns a string type.
+ a compound type, it said it's a VL type. THis has been fixed to be
+ consistent; it now always returns a string type.
(SLU - 2009/12/10 - Bug # 1584)
- Allow "child" files from external links to be correctly located when
relative to a "parent" file that is opened through a symbolic link.
@@ -10716,23 +11322,23 @@ Bug Fixes since HDF5-1.8.4
-----
- Fixed h5ls to return exit code 1 (error) when a non-existent file is
specified. (JKM - 2010/04/27 - Bug # 1793)
- - Fixed h5copy failure when copying a dangling link that is specified
+ - Fixed h5copy failure when copying a dangling link that is specified
directly. (JKM - 2010/04/22 - Bug # 1817)
- - Fixed an h5repack failure that lost attributes from a dataset of
+ - Fixed an h5repack failure that lost attributes from a dataset of
reference type. (JKM - 2010/3/25 - Bug # 1726)
- Fixed h5repack error that set NULL for object reference values for
datasets, groups, or named datatypes. (JKM - 2010/03/19 - Bug # 1814)
F90 API
------
- - None
+ - None
C++ API
------
- The constructor PropList::PropList(id) was fixed to act properly
- according to the nature of 'id'. When 'id' is a property class
- identifier, a new property list will be created. When 'id' is a
- property list identifier, a copy of the property list will be made.
+ according to the nature of 'id'. When 'id' is a property class
+ identifier, a new property list will be created. When 'id' is a
+ property list identifier, a copy of the property list will be made.
(BMR - 2010/5/9)
- The parameters 'size' and 'bufsize' in CommonFG::getLinkval and
CommonFG::getComment, respectively, now have default values for the
@@ -10746,17 +11352,17 @@ Bug Fixes since HDF5-1.8.4
- Fixed a bug in H5DSattach_scale, H5DSis_attached, and H5DSdetach_scale
caused by using the H5Tget_native_type function to determine the native
type for reading the REFERENCE_LIST attribute. This bug was exposed
- on Mac PPC. (EIP - 2010/05/22 - Bug # 1851)
- - Fixed a bug in the H5DSdetach_scale function when 0 bytes were
- allocated after the last reference to a dimension scale was removed
- from the list of references in a VL element of the DIMENSION_LIST
- attribute. Modified the function to comply with the specification:
- the DIMENSION_LIST attribute is now deleted when no dimension scales
+ on Mac PPC. (EIP - 2010/05/22 - Bug # 1851)
+ - Fixed a bug in the H5DSdetach_scale function when 0 bytes were
+ allocated after the last reference to a dimension scale was removed
+ from the list of references in a VL element of the DIMENSION_LIST
+ attribute. Modified the function to comply with the specification:
+ the DIMENSION_LIST attribute is now deleted when no dimension scales
are left attached. (EIP - 2010/05/14 - Bug # 1822)
Fortran High-Level APIs:
------
- - None
+ - None
Platforms Tested
@@ -10800,12 +11406,12 @@ The following platforms and compilers have been tested for this release.
MPICH mpich2-1.0.8 compiled with
gcc 4.1.2 and GNU Fortran (GCC) 4.1.2
- Linux 2.6.18-164.el5 #1 SMP gcc 4.1.2 20080704 and gcc 4.4.2
+ Linux 2.6.18-164.el5 #1 SMP gcc 4.1.2 20080704 and gcc 4.4.2
x86_64 GNU/Linux GNU Fortran (GCC) 4.1.2 20080704 and 4.4.2
- (amani) g++ (GCC) 4.1.2 20080704 and 4.4.2
+ (amani) g++ (GCC) 4.1.2 20080704 and 4.4.2
G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010)
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Version 11.1 Build 20090827.
PGI C, Fortran, C++ Version 10.4-0
for 32 & 64-bit target on x86-64
@@ -10817,22 +11423,22 @@ The following platforms and compilers have been tested for this release.
(cobalt) SGI MPI 1.38
SunOS 5.10 32- and 64-bit Sun C 5.9 SunOS_sparc Patch 124867-14
- (linew) Sun Fortran 95 8.3 SunOS_sparc
- Patch 127000-13
+ (linew) Sun Fortran 95 8.3 SunOS_sparc
+ Patch 127000-13
Sun C++ 5.9 SunOS_sparc Patch 124863-23
-
+
Intel Xeon Linux 2.6.18- Intel(R) C++ Version 10.0.026
92.1.10.el5_lustre.1.6.6smp- Intel(R) Fortran Compiler Version 10.0.026
perfctr #7 SMP Open MPI 1.2.2
(abe) MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2
compiled with icc v10.0.026 and ifort 10.0.026
-
- Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
- SMP x86_64 GNU/Linux applications running on Intel(R) 64,
+
+ Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
+ SMP x86_64 GNU/Linux applications running on Intel(R) 64,
(SNL Glory) Versions 11.1.
-
+
Windows XP Visual Studio 2008 w/ Intel Fortran 10.1
- Cygwin(1.7.5 native gcc(4.3.4) compiler and
+ Cygwin(1.7.5 native gcc(4.3.4) compiler and
gfortran)
Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1
@@ -10841,11 +11447,11 @@ The following platforms and compilers have been tested for this release.
Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 10.1
- MAC OS 10.6.3 (Intel) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
+ MAC OS 10.6.3 (Intel) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
(pahra) GNU Fortran (GCC) 4.5.0 20090910
- i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1
+ i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1
Intel C, C++ and Fortran compilers 11.1
-
+
MAC OS 10.5.8 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1
(tejeda)
@@ -10854,7 +11460,7 @@ The following platforms and compilers have been tested for this release.
OpenVMS Alpha V8.3 HP C V7.3-009
HP C++ V7.3-009
- HP Fortran V8.0-1-104669-48GBT
+ HP Fortran V8.0-1-104669-48GBT
Supported Configuration Features Summary
========================================
@@ -10867,7 +11473,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -10877,7 +11483,7 @@ Windows XP n y(4) n(4) y y y
Windows XP x64 n y(4) n(4) y y y
Windows Vista n y(4) n(4) y y y
Windows Vista x64 n y(4) n(4) y y y
-Mac OS X 10.5 PPC n n n n y n
+Mac OS X 10.5 PPC n n n n y n
Mac OS X 10.5 Intel n y n y y y
Mac OS X 10.6 Intel n y n y y y
AIX 5.3 32- and 64-bit n y n y y n
@@ -10895,28 +11501,28 @@ RedHat EL4 2.6.18 Xeon Lustre C y y y y y n
Cray XT3 2.1.56 y y y y y n
OpenVMS Alpha V8.3 n y n y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-Windows XP y y(4) y n
-Windows XP x64 y y(4) y n
-Windows Vista y y(4) y n
-Windows Vista x64 y y(4) y n
-Mac OS X 10.5 PPC y n n n
-Mac OS X 10.5 (Intel) y(5) n y n
-Mac OS X 10.6 (Intel) y(5) n y n
-AIX 5.3 32- and 64-bit n n n n
-AIX 6.1 32- and 64-bit n n n n
-FreeBSD 6.3-STABLE 32&64 bit y n y y
-RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y
-RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y
-RedHat EL5 2.6.18-128 i686 Intel W y y y n
-RedHat EL5 2.6.18-128 i686 PGI W y y y n
-SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y
-SuSe Linux 2.6.16 x86_64 Intel W y y y n
-SuSe Linux 2.6.16 x86_64 PGI W y y y n
-SuSe Linux 2.6.16 SGI Altix ia64 C y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+Windows XP y y(4) y n
+Windows XP x64 y y(4) y n
+Windows Vista y y(4) y n
+Windows Vista x64 y y(4) y n
+Mac OS X 10.5 PPC y n n n
+Mac OS X 10.5 (Intel) y(5) n y n
+Mac OS X 10.6 (Intel) y(5) n y n
+AIX 5.3 32- and 64-bit n n n n
+AIX 6.1 32- and 64-bit n n n n
+FreeBSD 6.3-STABLE 32&64 bit y n y y
+RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y
+RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y
+RedHat EL5 2.6.18-128 i686 Intel W y y y n
+RedHat EL5 2.6.18-128 i686 PGI W y y y n
+SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y
+SuSe Linux 2.6.16 x86_64 Intel W y y y n
+SuSe Linux 2.6.16 x86_64 PGI W y y y n
+SuSe Linux 2.6.16 SGI Altix ia64 C y n
RedHat EL4 2.6.18 Xeon Lustre C y y y n
Cray XT3 2.1.56 n n n n
OpenVMS Alpha V8.3 n n n n
@@ -10924,7 +11530,7 @@ OpenVMS Alpha V8.3 n n n n
(1) Fortran compiled with g95.
(2) With PGI and Absoft compilers.
(3) With PGI compiler for Fortran.
- (4) Using Visual Studio 2008. (Cygwin shared libraries are not
+ (4) Using Visual Studio 2008. (Cygwin shared libraries are not
supported.)
(5) Shared C and C++ are disabled when Fortran is configured in.
Compiler versions for each platform are listed in the preceding
@@ -10934,10 +11540,10 @@ OpenVMS Alpha V8.3 n n n n
Known Problems
==============
* The library's test dt_arith.c exposed a compiler's rounding problem on
- Cygwin when converting from unsigned long long to long double. The
- library's own conversion works correctly. A macro is defined for Cygwin
+ Cygwin when converting from unsigned long long to long double. The
+ library's own conversion works correctly. A macro is defined for Cygwin
to skip this test until we can solve the problem. (Please see bug #1813.)
- SLU - 2010/5/5
+ SLU - 2010/5/5
* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the
structure H5FD_class_t changed in 1.8. There is a new parameter added to
@@ -10947,11 +11553,11 @@ Known Problems
for 1.6 and try to plug it into a 1.8 library. This affects a very small
number of users. (See bug report #1279.) SLU - 2010/2/2
-* MinGW has a missing libstdc++.dll.a library file and will not successfully
- link C++ applications/tests. Do not use the enable-cxx configure option.
- Read all of the INSTALL_MINGW.txt file for all restrictions.
+* MinGW has a missing libstdc++.dll.a library file and will not successfully
+ link C++ applications/tests. Do not use the enable-cxx configure option.
+ Read all of the INSTALL_MINGW.txt file for all restrictions.
ADB - 2009/11/11
-
+
* Some tests in tools/h5repack may fail in AIX systems when -q32 mode is used.
The error is due to insufficient memory requested. Request a large amount
of runtime memory by setting the following environment variable for more
@@ -10963,7 +11569,7 @@ Known Problems
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not
existing. This is due to the MPI_File_open() call failing if the amode has
the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
@@ -11012,23 +11618,23 @@ Known Problems
Storm" in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -11036,23 +11642,23 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use,"
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use,"
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
-* There is also a configure error on Altix machines that incorrectly reports
+* There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
* On FREE-BSD systems when shared libraries are disabled, make install fails
@@ -11071,7 +11677,7 @@ Known Problems
intended. MAM - 2010/06/01
-%%%%1.8.4%%%%
+%%%%1.8.4%%%%
HDF5 version 1.8.4 released on Tue Nov 10 15:33:14 CST 2009
@@ -11080,10 +11686,10 @@ HDF5 version 1.8.4 released on Tue Nov 10 15:33:14 CST 2009
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.3 and
-HDF5 1.8.4, and contains information on the platforms tested and
+This document describes the differences between HDF5-1.8.3 and
+HDF5 1.8.4, and contains information on the platforms tested and
known problems in HDF5-1.8.4
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.4 source code, documentation, and additional materials
@@ -11095,18 +11701,18 @@ The HDF5 1.8.4 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.4 can be accessed directly at this location:
+User documentation for 1.8.4 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.4 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.4 (current
release) versus Release 1.8.3":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -11135,7 +11741,7 @@ New Features
- Configuration suite now uses Automake 1.11 and Autoconf 2.64.
MAM 2009/08/31.
- Changed default Gnu fortran compiler from g95 to gfortran since
- gfortran is more likely installed with gcc now. -AKC 2009/07/19-
+ gfortran is more likely installed with gcc now. -AKC 2009/07/19-
Library
-------
@@ -11151,14 +11757,14 @@ New Features
Parallel Library
----------------
- None
-
+
Tools
-----
- h5diff: h5diff treats two INFINITY values different. Fixed by checking
- (value==expect) before call ABS(...) at h5diff_array.c. This will make
- that (INF==INF) is true (INF is treated as an number instead of NaN)
+ (value==expect) before call ABS(...) at h5diff_array.c. This will make
+ that (INF==INF) is true (INF is treated as an number instead of NaN)
(PC -- 2009/07/28)
- - h5diff: add option "--use-system-epsilon" to print difference if
+ - h5diff: add option "--use-system-epsilon" to print difference if
(|a-b| > EPSILON).
Change default to use strict equality (PC -- 2009/09/12)
@@ -11187,27 +11793,27 @@ Bug Fixes since HDF5-1.8.3
Configuration
-------------
- Removed the following config files, as we no longer support them:
- config/dec-osf*, config/hpux11.00, config/irix5.x,
+ config/dec-osf*, config/hpux11.00, config/irix5.x,
config/powerpc-ibm-aix4.x config/rs6000-ibm-aix5.x config/unicos*
MAM - 2009/10/08
- Modified configure and make process to properly preserve user's CFLAGS
(and company) environment variables. Build will now properly use
automake's AM_CFLAGS for any compiler flags set by the configure
- process. Configure will no longer modify CFLAGS directly, nor will
+ process. Configure will no longer modify CFLAGS directly, nor will
setting CFLAGS during make completely replace what configure has set up.
MAM - 2009/10/08
- Support for TFLOPS, config/intel-osf1, is removed since the TFLOPS
machine has long retired. AKC - 2009/10/06.
- Added $(EXEEXT) extension to H5detect when it's executed in the
- src/Makefile to generate H5Tinit.c so it works correctly on platforms
+ src/Makefile to generate H5Tinit.c so it works correctly on platforms
that require the full extension when running executables.
MAM - 2009/10/01 - BZ #1613
- Configure will now set FC and CXX to "no" when fortran and c++
are not being compiled, respectively, so configure will not run
- some of the compiler tests for these languages when they are not
+ some of the compiler tests for these languages when they are not
being used. MAM - 2009/10/01
- The --enable-static-exec flag will now properly place the -static flag
- on the link line of all installed executables. This will force the
+ on the link line of all installed executables. This will force the
executable to link with static libraries over shared libraries, provided
the static libraries are available. MAM - 2009/08/31 - BZ #1583
- The PathScale compiler (v3.2) was mistaken as gcc v4.2.0 but it fails to
@@ -11245,13 +11851,13 @@ Bug Fixes since HDF5-1.8.3
-----
- h5dump/h5ls display buffer resize fixed in tools library.
ADB - 2009/7/21 - 1520
- - perf_serial test added to Windows projects and check batch file.
+ - perf_serial test added to Windows projects and check batch file.
ADB - 2009/06/11 -1504
F90 API
------
- - Fixed bug in h5lget_info_by_idx_f by adding missing arguments,
+ - Fixed bug in h5lget_info_by_idx_f by adding missing arguments,
consequently changing the API. New API is:
SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
@@ -11259,7 +11865,7 @@ Bug Fixes since HDF5-1.8.3
MSB - 2009/9/17 - 1652
- - Corrected the values for the H5L_flags FORTRAN constants:
+ - Corrected the values for the H5L_flags FORTRAN constants:
H5L_LINK_ERROR_F, H5L_LINK_HARD_F, H5L_LINK_SOFT_F, H5L_LINK_EXTERNAL_F
MSB - 2009-09-17 - 1653
@@ -11279,7 +11885,7 @@ Bug Fixes since HDF5-1.8.3
Fortran High-Level APIs:
------
- - Lite: the h5ltread_dataset_string_f and h5ltget_attribute_string_f functions
+ - Lite: the h5ltread_dataset_string_f and h5ltget_attribute_string_f functions
had memory problems with the g95 fortran compiler. (PVN � 5/13/2009) 1522
@@ -11312,7 +11918,7 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.18-164.el5 gcc (GCC) 4.1.2 20080704
#1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009)
- (jam) GNU Fortran (GCC) 4.1.2 20080704
+ (jam) GNU Fortran (GCC) 4.1.2 20080704
(Red Hat 4.1.2-46)
PGI C, Fortran, C++ 8.0-5 32-bit
PGI C, Fortran, C++ 8.0-1 32-bit
@@ -11324,14 +11930,14 @@ The following platforms and compilers have been tested for this release.
applications, Version 11.0, 11.1
Absoft 32-bit Fortran 95 10.0.7
MPICH mpich2-1.0.8 compiled with
- gcc (GCC) 4.1.2 and G95
+ gcc (GCC) 4.1.2 and G95
(GCC 4.0.3 (g95 0.92!)
Linux 2.6.18-164.el5 #1 SMP gcc 4.1.2 20080704
x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009)
(amani) tested for both 32- and 64-bit binaries
- Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Versions 11.1.
PGI C, Fortran, C++ Version 9.0-4
for 64-bit target on x86-64
@@ -11347,10 +11953,10 @@ The following platforms and compilers have been tested for this release.
(cobalt) SGI MPI 1.38
SunOS 5.10 32- and 64-bit Sun C 5.9 SunOS_sparc Patch 124867-11 2009/04/30
- (linew) Sun Fortran 95 8.3 SunOS_sparc
+ (linew) Sun Fortran 95 8.3 SunOS_sparc
Patch 127000-11 2009/10/06
- Sun C++ 5.9 SunOS_sparc
- Patch 124863-16 2009/09/15
+ Sun C++ 5.9 SunOS_sparc
+ Patch 124863-16 2009/09/15
Intel Xeon Linux 2.6.18- Intel(R) C++ Version 10.0.026
92.1.10.el5_lustre.1.6.6smp- Intel(R) Fortran Compiler Version 10.0.026
@@ -11363,15 +11969,15 @@ The following platforms and compilers have been tested for this release.
(NCSA tg-login) Intel(R) Fortran Compiler Version 8.1.033
mpich-gm-1.2.7p1..16-intel-8.1.037-r1
- Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
- .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
+ Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
+ .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
SMP x86_64 GNU/Linux Versions 10.1.
- (SNL Thunderbird)
-
- Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
- SMP x86_64 GNU/Linux applications running on Intel(R) 64,
+ (SNL Thunderbird)
+
+ Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
+ SMP x86_64 GNU/Linux applications running on Intel(R) 64,
(SNL Glory) Versions 10.1.
-
+
Windows XP Visual Studio 2005 w/ Intel Fortran 9.1
Cygwin(native gcc compiler and g95)
@@ -11398,7 +12004,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -11422,25 +12028,25 @@ SuSe Linux 2.4.21 ia64 Intel C y y y y y n
Cray XT3 2.0.62 y y y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-Windows XP y y(4) y y
-Windows XP x64 y y(4) y y
-Windows Vista y n n y
-Mac OS X 10.5 y n y n
-AIX 5.3 32- and 64-bit n n n n
-FreeBSD 6.3-STABLE 32&64 bit y y y y
-RedHat EL5 2.6.18-164 i686 GNU (1)W y y(2) y y
-RedHat EL5 2.6.18-164 i686 Intel W y y y n
-RedHat EL5 2.6.18-164 i686 PGI W y y y n
-RedHat EL5 2.6.18-164 x86_64 GNU(1)W y y y y
-RedHat EL5 2.6.18-164 x86_64 IntelW y y y n
-RedHat EL5 2.6.18-164 x86_64 PGI W y y y n
-SuSe Linux 2.6.16 SGI Altix ia64 C y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+Windows XP y y(4) y y
+Windows XP x64 y y(4) y y
+Windows Vista y n n y
+Mac OS X 10.5 y n y n
+AIX 5.3 32- and 64-bit n n n n
+FreeBSD 6.3-STABLE 32&64 bit y y y y
+RedHat EL5 2.6.18-164 i686 GNU (1)W y y(2) y y
+RedHat EL5 2.6.18-164 i686 Intel W y y y n
+RedHat EL5 2.6.18-164 i686 PGI W y y y n
+RedHat EL5 2.6.18-164 x86_64 GNU(1)W y y y y
+RedHat EL5 2.6.18-164 x86_64 IntelW y y y n
+RedHat EL5 2.6.18-164 x86_64 PGI W y y y n
+SuSe Linux 2.6.16 SGI Altix ia64 C y n
RedHat EL4 2.6.18 Xeon Lustre C y y y n
-SuSe Linux 2.4.21 ia64 Intel C y y y n
+SuSe Linux 2.4.21 ia64 Intel C y y y n
Cray XT3 2.0.62 n n n n
(1) Fortran compiled with g95.
@@ -11468,15 +12074,15 @@ Known Problems
cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not
existing. This is due to the MPI_File_open() call failing if the amode has
the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11
-
+
* Parallel tests failed with 16 processes with data inconsistency at testphdf5
/ dataset_readAll. Parallel tests also failed with 32 and 64 processes with
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO. CMC - 2009/04/28
-* There is a known issue in which HDF5 will change the timestamp on a file
+* There is a known issue in which HDF5 will change the timestamp on a file
simply by opening it with read/write permissions, even if the file is not
- modified in any way. This is due to the way in which HDF5 manages the file
+ modified in any way. This is due to the way in which HDF5 manages the file
superblock. A fix is currently underway and should be included in the 1.8.4
release of HDF5. MAM - 2009/04/28
@@ -11523,23 +12129,23 @@ Known Problems
Storm" in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -11547,26 +12153,26 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag will only statically link libraries
if the static version of that library is present. If only the shared version
- of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
- for example, only have shared versions), the flag should still result in a
- successful compilation, but note that the installed executables will not be
- fully static. Thus, the only guarantee on these systems is that the
+ of a library exists (i.e., most system libraries on Solaris, AIX, and Mac,
+ for example, only have shared versions), the flag should still result in a
+ successful compilation, but note that the installed executables will not be
+ fully static. Thus, the only guarantee on these systems is that the
executable is statically linked with just the HDF5 library.
-* There is also a configure error on Altix machines that incorrectly reports
+* There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
-%%%%1.8.3%%%%
+%%%%1.8.3%%%%
HDF5 version 1.8.3 released on Mon May 4 09:21:00 CDT 2009
@@ -11575,10 +12181,10 @@ HDF5 version 1.8.3 released on Mon May 4 09:21:00 CDT 2009
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.2 and
-HDF5 1.8.3, and contains information on the platforms tested and
-known problems in HDF5-1.8.3.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.2 and
+HDF5 1.8.3, and contains information on the platforms tested and
+known problems in HDF5-1.8.3.
+For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.3 source code, documentation, and additional materials
@@ -11590,18 +12196,18 @@ The HDF5 1.8.3 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.3 can be accessed directly at this location:
+User documentation for 1.8.3 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.3 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.3 (current
release) versus Release 1.8.2":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -11627,7 +12233,7 @@ New Features
Configuration
-------------
- - Added libtool version numbers to generated c++, fortran, and
+ - Added libtool version numbers to generated c++, fortran, and
hl libraries. MAM 2009/04/19.
- Regenerated Makefile.ins using Automake 1.10.2. MAM 2009/04/19.
- Added a Make target of check-all-install to test the correctness of
@@ -11667,7 +12273,7 @@ New Features
(chunk allocation), and t_posix_compliant (posix compliance). The rest of
the parallel tests already use in the code the number of processes
available in the communicator. (CMC - 2009/04/28)
-
+
Tools
-----
- h5diff new flag, -c, --compare, list objects that are not comparable.
@@ -11675,16 +12281,16 @@ New Features
- h5diff new flag, -N, --nan, avoids NaNs detection. PVN - 2009/4/2
- h5dump correctly specifies XML dtd / schema urls ADB - 2009/4/3 - 1519
- h5repack now handles group creation order. PVN - 2009/4/2 - 1402
- - h5repack: When user doesn't specify a chunk size, h5repack now
- defines a default chunk size as the same size of the size of the
- hyperslab used to read the chunks. The size of the hyperslabs are
- defined as the size of each dimension or a predefined constant,
- whatever is smaller. This assures that the chunk read fits in the
+ - h5repack: When user doesn't specify a chunk size, h5repack now
+ defines a default chunk size as the same size of the size of the
+ hyperslab used to read the chunks. The size of the hyperslabs are
+ defined as the size of each dimension or a predefined constant,
+ whatever is smaller. This assures that the chunk read fits in the
chunk cache. PVN - 2008/11/21
High-Level APIs
---------------
- - Table: In version 3.0 of Table, the writing of the "NROWS" attribute
+ - Table: In version 3.0 of Table, the writing of the "NROWS" attribute
(used to store number of records) was deprecated. PVN - 2008/11/24
F90 API
@@ -11710,12 +12316,12 @@ Bug Fixes since HDF5-1.8.2
Configuration
-------------
- - The --includedir=DIR configuration option now works as intended, and
+ - The --includedir=DIR configuration option now works as intended, and
can be used to specify the location to install C header files. The
default location remains unchanged, residing at ${prefix}/include.
MAM - 2009/03/10 - BZ #1381
- Configure no longer removes the '-g' flag from CFLAGS when in production
- mode if it has been explicitly set in the CFLAGS environment variable
+ mode if it has been explicitly set in the CFLAGS environment variable
prior to configuration. MAM - 2009/03/09 - BZ #1401
Library
@@ -11724,7 +12330,7 @@ Bug Fixes since HDF5-1.8.2
API. NAF - 2009/04/20 - 1533
- Fixed a problem with using data transforms with non-native types in the
file. NAF - 2009/04/20 - 1548
- - Added direct.h include file to windows section of H5private.h
+ - Added direct.h include file to windows section of H5private.h
to fix _getcwd() warning. ADB - 2009/04/14 - 1536
- Fixed a bug that prevented external links from working after calling
H5close(). NAF - 2009/04/10 - 1539
@@ -11742,8 +12348,8 @@ Bug Fixes since HDF5-1.8.2
- Modified library to be able to open files with corrupt root group symbol
table messages, and correct these errors if they are found. Such files
can only be successfully opened with write access. NAF - 2009/03/23 - 1189
- - Removed the long_long #define and replaced all instances with
- "long long". This caused problems with third party products. All
+ - Removed the long_long #define and replaced all instances with
+ "long long". This caused problems with third party products. All
currently supported compliers support the type. ADB - 2009/03/05
- Fixed various bugs that could prevent the fill value from being written
in certain rare cases. NAF - 2009/02/26 - 1469
@@ -11763,12 +12369,12 @@ Bug Fixes since HDF5-1.8.2
- Fixed a bug where H5Tpack wouldn't remove trailing space from an otherwise
packed compound type. NAF - 2009/01/14
- Fixed up some old v2 btree assertions that get run in debug mode that
- were previously failing on compilation, and removed some of the
+ were previously failing on compilation, and removed some of the
more heavily outdated and non-rewritable ones. MAM - 2008/12/15
- Fixed a bug that could cause problems when "automatically" unmounting
multiple files. NAF - 2008/11/17
- - H5Dset_extent: when shrinking dimensions, some chunks were not deleted.
- PVN - 2009/01/8
+ - H5Dset_extent: when shrinking dimensions, some chunks were not deleted.
+ PVN - 2009/01/8
Parallel Library
----------------
@@ -11778,11 +12384,11 @@ Bug Fixes since HDF5-1.8.2
-----
- Fixed many problems that could occur when using h5repack with named
datatypes. NAF - 2009/4/20 - 1516/1466
- - h5dump, h5diff, h5repack were not reading (by hyperslabs) datasets
+ - h5dump, h5diff, h5repack were not reading (by hyperslabs) datasets
that have a datatype datum size greater than H5TOOLS_BUFSIZE, a constant
- defined as 1024Kb, such as array types with large dimensions.
+ defined as 1024Kb, such as array types with large dimensions.
PVN - 2009/4/1 - 1501
- - h5import: By selecting a compression type, a big endian byte order
+ - h5import: By selecting a compression type, a big endian byte order
was being selected. PVN - 2009/3/11 - 1462
- zip_perf.c had missing argument on one of the open() calls. Fixed.
AKC - 2008/12/9
@@ -11797,13 +12403,13 @@ Bug Fixes since HDF5-1.8.2
High-Level APIs:
------
- - Dimension scales: The scale index return value in H5DSiterate_scales
+ - Dimension scales: The scale index return value in H5DSiterate_scales
was not always incremented. PVN - 2009/4/8 - 1538
Fortran High-Level APIs:
------
- - Lite: The h5ltget_dataset_info_f function (gets information about
- a dataset) was not correctly returning the dimension array
+ - Lite: The h5ltget_dataset_info_f function (gets information about
+ a dataset) was not correctly returning the dimension array
PVN - 2009/3/23
@@ -11834,7 +12440,7 @@ The following platforms and compilers have been tested for this release.
gfortran 4.4.1 20090421
IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m
- F90 MIPSpro 7.4.4m
+ F90 MIPSpro 7.4.4m
C++ MIPSpro cc 7.4.4m
Linux 2.6.18-128.1.6.el5xen gcc (GCC) 4.1.2
@@ -11858,8 +12464,8 @@ The following platforms and compilers have been tested for this release.
Linux 2.6.16.60-0.37-smp #1 gcc 4.1.2
SMP x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.92!) Feb 4 2009)
- (smirom) Intel(R) C, C++, Fortran Compilers for
- applications running on Intel(R) 64,
+ (smirom) Intel(R) C, C++, Fortran Compilers for
+ applications running on Intel(R) 64,
Versions 10.1, 11.0.
PGI C, Fortran, C++ Version 7.2-1, 8.0-1
for 64-bit target on x86-64
@@ -11873,9 +12479,9 @@ The following platforms and compilers have been tested for this release.
(cobalt) SGI MPI 1.38
SunOS 5.10 32- and 64-bit Sun WorkShop 6 update 2 C 5.9 Patch 124867-09
- (linew) Sun WorkShop 6 update 2 Fortran 95 8.3
+ (linew) Sun WorkShop 6 update 2 Fortran 95 8.3
Patch 127000-07
- Sun WorkShop 6 update 2 C++ 5.8
+ Sun WorkShop 6 update 2 C++ 5.8
Patch 124863-11
Intel Xeon Linux 2.6.18- gcc 3.4.6 20060404
@@ -11890,24 +12496,24 @@ The following platforms and compilers have been tested for this release.
(NCSA tg-login) Intel(R) Fortran Compiler Version 8.1.033
mpich-gm-1.2.7p1..16-intel-8.1.037-r1
- Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
- .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
+ Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
+ .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
SMP x86_64 GNU/Linux Versions 9.1.
- (SNL Spirit)
-
- Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
- .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
+ (SNL Spirit)
+
+ Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for
+ .1.4.11.1smp #1 SMP applications running on Intel(R) 64,
SMP x86_64 GNU/Linux Versions 10.1.
- (SNL Thunderbird)
-
- Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
- SMP x86_64 GNU/Linux applications running on Intel(R) 64,
+ (SNL Thunderbird)
+
+ Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
+ SMP x86_64 GNU/Linux applications running on Intel(R) 64,
(SNL Glory) Versions 10.1.
-
- Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
- SMP x86_64 GNU/Linux applications running on Intel(R) 64,
+
+ Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for
+ SMP x86_64 GNU/Linux applications running on Intel(R) 64,
(LLNL Zeus) Versions 9.1.
- gcc/gfortran/g++ (GCC) 4.1.2.
+ gcc/gfortran/g++ (GCC) 4.1.2.
Windows XP Visual Studio .NET
Visual Studio 2005 w/ Intel Fortran 9.1
@@ -11934,7 +12540,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -11961,28 +12567,28 @@ SuSe Linux 2.4.21 ia64 Intel C y y y y y n
Cray XT3 2.0.41 y y y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-IRIX64_6.5 32-bit y dna y y
-IRIX64_6.5 64-bit y y n y
-Windows XP y y(4) y y
-Windows XP x64 y y(4) y y
-Windows Vista y n n y
-Mac OS X 10.5 y n y n
-AIX 5.3 32- and 64-bit n n n n
-FreeBSD 6.3-STABLE 32&64 bit y n y y
-RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y
-RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y
-RedHat EL5 2.6.18-128 i686 Intel W y y y n
-RedHat EL5 2.6.18-128 i686 PGI W y y y n
-SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y
-SuSe Linux 2.6.16 x86_64 Intel W y y y n
-SuSe Linux 2.6.16 x86_64 PGI W y y y n
-SuSe Linux 2.6.16 SGI Altix ia64 C y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+IRIX64_6.5 32-bit y dna y y
+IRIX64_6.5 64-bit y y n y
+Windows XP y y(4) y y
+Windows XP x64 y y(4) y y
+Windows Vista y n n y
+Mac OS X 10.5 y n y n
+AIX 5.3 32- and 64-bit n n n n
+FreeBSD 6.3-STABLE 32&64 bit y n y y
+RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y
+RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y
+RedHat EL5 2.6.18-128 i686 Intel W y y y n
+RedHat EL5 2.6.18-128 i686 PGI W y y y n
+SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y
+SuSe Linux 2.6.16 x86_64 Intel W y y y n
+SuSe Linux 2.6.16 x86_64 PGI W y y y n
+SuSe Linux 2.6.16 SGI Altix ia64 C y n
RedHat EL4 2.6.18 Xeon Lustre C y y y n
-SuSe Linux 2.4.21 ia64 Intel C y y y n
+SuSe Linux 2.4.21 ia64 Intel C y y y n
Cray XT3 2.0.41 n n n n
(1) Fortran compiled with g95.
@@ -12000,9 +12606,9 @@ Known Problems
collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks
with MPI IO. CMC - 2009/04/28
-* There is a known issue in which HDF5 will change the timestamp on a file
+* There is a known issue in which HDF5 will change the timestamp on a file
simply by opening it with read/write permissions, even if the file is not
- modified in any way. This is due to the way in which HDF5 manages the file
+ modified in any way. This is due to the way in which HDF5 manages the file
superblock. A fix is currently underway and should be included in the 1.8.4
release of HDF5. MAM - 2009/04/28
@@ -12049,17 +12655,17 @@ Known Problems
Storm" in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-* We have discovered two problems when running collective IO parallel HDF5
- tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
+* We have discovered two problems when running collective IO parallel HDF5
+ tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
Linux cluster at NCSA.
- Under some complex selection cases:
+ Under some complex selection cases:
1) MPI_Get_element returns the wrong value.
- 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
+ 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
data may be generated.
- These issues arise only when turning on collective IO with chunking storage
- with some complex selections. We have not found these problems on other
- MPI-IO compilers. If you encounter these problems, you may use independent
+ These issues arise only when turning on collective IO with chunking storage
+ with some complex selections. We have not found these problems on other
+ MPI-IO compilers. If you encounter these problems, you may use independent
IO instead.
To avoid this behavior, change the following line in your code
@@ -12068,33 +12674,33 @@ Known Problems
H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT);
KY - 2007/08/24
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* For LLNL, uP: both serial and parallel tests pass.
+* For LLNL, uP: both serial and parallel tests pass.
Zeus: Serial tests pass but parallel tests fail with a known problem in MPI.
- ubgl: Serial tests pass but parallel tests fail.
+ ubgl: Serial tests pass but parallel tests fail.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
* On IRIX6.5, when the C compiler version is greater than 7.4, complicated
MPI derived datatype code will work. However, the user should increase
- the value of the MPI_TYPE_MAX environment variable to some appropriate value
- to use collective irregular selection code. For example, the current
- parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
+ the value of the MPI_TYPE_MAX environment variable to some appropriate value
+ to use collective irregular selection code. For example, the current
+ parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -12102,34 +12708,34 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag fails to compile for Solaris
- platforms. This is due to the fact that not all of the system libraries on
+ platforms. This is due to the fact that not all of the system libraries on
Solaris are available in a static format.
The --enable-static-exec configure flag also fails to correctly compile
- on IBM SP2 platforms for serial mode. The parallel mode works fine with
+ on IBM SP2 platforms for serial mode. The parallel mode works fine with
this option.
-
+
It is suggested that you do not use this option on these platforms
during configuration.
-* There is also a configure error on Altix machines that incorrectly reports
+* There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
* Information about building with PGI and Intel compilers is available in
the INSTALL file sections 4.7 and 4.8.
-%%%%1.8.2%%%%
-
+%%%%1.8.2%%%%
+
HDF5 version 1.8.2 released on Mon Nov 10 15:43:09 CST 2008
================================================================================
@@ -12137,9 +12743,9 @@ HDF5 version 1.8.2 released on Mon Nov 10 15:43:09 CST 2008
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.1 and HDF5 1.8.2,
-and contains information on the platforms tested and known problems in
-HDF5-1.8.2. For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
+This document describes the differences between HDF5-1.8.1 and HDF5 1.8.2,
+and contains information on the platforms tested and known problems in
+HDF5-1.8.2. For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.2 source code, documentation, and additional materials
@@ -12151,18 +12757,18 @@ The HDF5 1.8.2 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.2 can be accessed directly at this location:
+User documentation for 1.8.2 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.2 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.2 (current
release) versus Release 1.8.1":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -12192,8 +12798,8 @@ New Features
Library
-------
- - Added two new public routines: H5Pget_elink_fapl() and
- H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13)
+ - Added two new public routines: H5Pget_elink_fapl() and
+ H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13)
- Improved free space tracking in file to be faster. (QAK - 2008/10/06)
- Added 'mounted' field to H5G_info_t struct. (QAK - 2008/07/15)
@@ -12203,41 +12809,41 @@ New Features
Tools
-----
- - h5repack: added new options -u and -b to add a userblock to an HDF5
+ - h5repack: added new options -u and -b to add a userblock to an HDF5
file during the repack. (PVN - 2008/08/26)
- - h5repack: added options -t and -a to call H5Pset_alignment while
+ - h5repack: added options -t and -a to call H5Pset_alignment while
creating a repacked file. (PVN - 2008/08/29)
- h5ls: added capability to traverse through external links when the -r
(recursive) flag is given. (NAF - 2008/09/16)
- - h5ls: added -E option to enable traversal of external links.
+ - h5ls: added -E option to enable traversal of external links.
h5ls will not traverse external links without this flag being set.
(NAF - 2008/10/06)
- - h5dump: when -b flag is used without a keyword after it, binary
- output defaults to NATIVE. MEMORY keyword was deprecated
+ - h5dump: when -b flag is used without a keyword after it, binary
+ output defaults to NATIVE. MEMORY keyword was deprecated
and replaced by NATIVE keyword. (PVN - 2008/10/30)
- - h5diff: returns 1 when file graphs differ by any object.
+ - h5diff: returns 1 when file graphs differ by any object.
Error return code was changed to 2 from -1. (PVN - 2008/10/30)
- - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP
+ - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP
instead (PVN - 2008/10/30)
F90 API
------
- - Added optional parameter 'mounted' to H5Gget_info_f,
- H5Gget_info_by_idx_f, H5Gget_info_by_name_f (MSB - 2008/09/24)
- - Added H5Tget_native_type_f (MSB - 2008/09/30)
-
-
+ - Added optional parameter 'mounted' to H5Gget_info_f,
+ H5Gget_info_by_idx_f, H5Gget_info_by_name_f (MSB - 2008/09/24)
+ - Added H5Tget_native_type_f (MSB - 2008/09/30)
+
+
C++ API
------
- These member functions were added as wrapper for H5Rdereference to
replace the incorrect IdComponent::dereference().
- void H5Object::dereference(H5Object& obj, void* ref,
+ void H5Object::dereference(H5Object& obj, void* ref,
H5R_type_t ref_type=H5R_OBJECT)
- void H5Object::dereference(H5File& h5file, void* ref,
+ void H5Object::dereference(H5File& h5file, void* ref,
H5R_type_t ref_type=H5R_OBJECT)
- void H5Object::dereference(Attribute& obj, void* ref,
+ void H5Object::dereference(Attribute& obj, void* ref,
H5R_type_t ref_type=H5R_OBJECT)
In addition, these constructors were added to create the associated
@@ -12262,13 +12868,13 @@ Support for New Platforms, Languages, and Compilers
disables the build of shared libraries (i.e., only
static C and C++ HDF5 libraries will be built
along with the static HDF5 Fortran library).
- Intel 10.1 C and C++ compilers require
+ Intel 10.1 C and C++ compilers require
"-no-multibyte-chars" compilation flag due to the known
bug in the compilers.
(EIP - 2008/10/30)
-Bug Fixes since HDF5-1.8.1
+Bug Fixes since HDF5-1.8.1
==========================
Configuration
@@ -12278,8 +12884,8 @@ Bug Fixes since HDF5-1.8.1
- When using shared szip, it is no longer necessary to specify
the path to the shared szip libraries in LD_LIBRARY_PATH.
(MAM - 2008/10/15).
- - The file libhdf5_fortran.settings is not installed since its content
- is included in libhdf5.settings now. (AKC - 2008/10/21)
+ - The file libhdf5_fortran.settings is not installed since its content
+ is included in libhdf5.settings now. (AKC - 2008/10/21)
- "make DESTDIR=xxx install" failed to install some tools and files
(e.g., h5cc and fortran modules). Fixed. (AKC - 2008/10/8).
@@ -12299,9 +12905,9 @@ Bug Fixes since HDF5-1.8.1
(NAF - 2008/10/06)
- Fixed potential memory leak during compound conversion.
(NAF - 2008/10/06)
- - Changed the return value of H5Fget_obj_count from INT to SSIZE_T.
- Also changed the return value of H5Fget_obj_ids from HERR_T to
- SSIZE_T and the type of the parameter MAX_OBJS from INT to SIZE_T.
+ - Changed the return value of H5Fget_obj_count from INT to SSIZE_T.
+ Also changed the return value of H5Fget_obj_ids from HERR_T to
+ SSIZE_T and the type of the parameter MAX_OBJS from INT to SIZE_T.
(SLU - 2008/09/26)
- Fixed an issue that could cause data to be improperly overwritten
during compound type conversion. (NAF - 2008/09/19)
@@ -12316,23 +12922,23 @@ Bug Fixes since HDF5-1.8.1
(NAF - 2008/08/08)
- Fixed an issue where mount point traversal would fail when using
multiple handles for the child. (NAF - 2008/08/07)
- - Fixed an issue where mount points were inaccessible when using
- multiple file handles for the parent. The mount table is now in
- the shared file structure (the parent pointer is still in the
+ - Fixed an issue where mount points were inaccessible when using
+ multiple file handles for the parent. The mount table is now in
+ the shared file structure (the parent pointer is still in the
top structure). (NAF - 2008/08/07)
- Fixed assertion failure caused by incorrect array datatype version.
(NAF - 2008/08/04)
- Fixed issue where a group could have a file mounted on it twice.
(QAK - 2008/07/15)
- - When an attribute was opened twice and data was written with
- one of the handles, the file didn't have the data. It happened
- because each handle had its own object structure, and the empty
- one overwrote the data with fill value. This is fixed by making
- some attribute information like the data be shared in the
+ - When an attribute was opened twice and data was written with
+ one of the handles, the file didn't have the data. It happened
+ because each handle had its own object structure, and the empty
+ one overwrote the data with fill value. This is fixed by making
+ some attribute information like the data be shared in the
attribute structure. (SLU - 2008/07/07)
- - Fixed a Windows-specific issue in the ohdr test which was causing
- users in some timezones to get false errors. This a deficiency in
- the Windows mktime() function, and has been handled properly.
+ - Fixed a Windows-specific issue in the ohdr test which was causing
+ users in some timezones to get false errors. This a deficiency in
+ the Windows mktime() function, and has been handled properly.
(SJW - 2008/06/19)
Parallel Library
@@ -12345,51 +12951,51 @@ Bug Fixes since HDF5-1.8.1
(NAF - 2008/10/15)
- Fixed unnecessary indentation of committed datatypes in h5dump.
(NAF - 2008/10/15)
- - Fixed bugs in h5stat: segmemtation fault when printing groups and
- print warning message when traversal of objects is unsuccessful.
- (see bug #1253) (VC- 2008/10/13)
+ - Fixed bugs in h5stat: segmemtation fault when printing groups and
+ print warning message when traversal of objects is unsuccessful.
+ (see bug #1253) (VC- 2008/10/13)
- Fixed bug in h5ls that prevented relative group listings (like
"h5ls foo.h5/bar") from working correctly (QAK - 2008/06/03)
- - h5dump: when doing binary output (-b), the stdout printing of
- attributes was done incorrectly. Removed printing of attributes
+ - h5dump: when doing binary output (-b), the stdout printing of
+ attributes was done incorrectly. Removed printing of attributes
when doing binary output. (PVN - 2008/06/05)
F90 API
------
- - h5sselect_elements_f: Added additional operators H5S_SELECT_APPEND
+ - h5sselect_elements_f: Added additional operators H5S_SELECT_APPEND
and H5S_SELECT_PREPEND (MSB - 2008/09/30)
- - h5sget_select_elem_pointlist: Fixed list of returned points by
- rearranging the point list correctly by accounting for C
+ - h5sget_select_elem_pointlist: Fixed list of returned points by
+ rearranging the point list correctly by accounting for C
conventions. (MSB - 2008/09/30)
- - h5sget_select_hyper_blocklist_f: Fixed error in transposed dimension
+ - h5sget_select_hyper_blocklist_f: Fixed error in transposed dimension
of arrays.(MSB - 2008/9/30)
- - h5sget_select_bounds_f: Swapped array bounds to account for C and
+ - h5sget_select_bounds_f: Swapped array bounds to account for C and
Fortran reversed array notation (MSB - 2008/9/30)
- - Changed to initializing string to a blank character instead of a
- null type in tH5P.f90 to fix compiling error using AIX 5.3.0
+ - Changed to initializing string to a blank character instead of a
+ null type in tH5P.f90 to fix compiling error using AIX 5.3.0
(MSB - 2008/7/29)
- - Fixed missing commas in H5test_kind.f90 detected by NAG compiler
+ - Fixed missing commas in H5test_kind.f90 detected by NAG compiler
(MSB - 2008/7/29)
- - Fixed passing and array to a scalar in tH5A_1_8.f90 detected by
+ - Fixed passing and array to a scalar in tH5A_1_8.f90 detected by
NAG compiler (MSB - 2008/7/29)
- - Added the ability of the test programs to use the status of
- HDF5_NOCLEANUP to determine if the *.h5 files should be removed
+ - Added the ability of the test programs to use the status of
+ HDF5_NOCLEANUP to determine if the *.h5 files should be removed
or not after the tests are completed (MSB - 2008/10/1)
- - In nh5tget_offset_c: (MSB 9/12/2008)
- If offset was equal to 0 it returned the error code of -1,
- this was changed to return an error code of -1 when the offset
+ - In nh5tget_offset_c: (MSB 9/12/2008)
+ If offset was equal to 0 it returned the error code of -1,
+ this was changed to return an error code of -1 when the offset
value is < 0.
- - Uses intrinsic Fortran function SIZEOF if available when detecting
+ - Uses intrinsic Fortran function SIZEOF if available when detecting
type of INTEGERs and REALs in H5test_kind.f90 (MSB - 2008/9/3)
- - Put the DOUBLE PRECISION interfaces in a separate module and
- added a USE statement for the module. The interfaces are
+ - Put the DOUBLE PRECISION interfaces in a separate module and
+ added a USE statement for the module. The interfaces are
included/excluded depending on the state of FORTRAN_DEFAULT_REAL
is DBLE_F which detects if the default REAL is DOUBLE PRECISION.
- This allows the library to be compiled with -r8 Fortran flag
- without the user needing to edit the source code.
+ This allows the library to be compiled with -r8 Fortran flag
+ without the user needing to edit the source code.
(MSB - 200/8/27)
- - Enable building shared library for fortran by adding the flag -fPIC
+ - Enable building shared library for fortran by adding the flag -fPIC
to the compile flags for versions of Intel Fortran compiler >=9
(MSB - 2008/8/26)
@@ -12412,15 +13018,15 @@ Platforms Tested
================
The following platforms and compilers have been tested for this release.
- AIX 5.3 xlc 7.0.0.8
- xlf 09.01.0000.0008
- xlC 7.0.0.8
- mpcc_r 7.0.0.8
- mpxlf_r 09.01.0000.0008
+ AIX 5.3 xlc 7.0.0.8
+ xlf 09.01.0000.0008
+ xlC 7.0.0.8
+ mpcc_r 7.0.0.8
+ mpxlf_r 09.01.0000.0008
Cray XT3 (2.0.41) cc (pgcc) 7.1-4
(red storm) ftn (pgf90) 7.1-4
- CC (pgCC) 7.1-4
+ CC (pgCC) 7.1-4
FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305
(duty) g++ 3.4.6 [FreeBSD] 20060305
@@ -12435,7 +13041,7 @@ The following platforms and compilers have been tested for this release.
gfortran 4.2.5 20080702
IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m
- F90 MIPSpro 7.4.4m
+ F90 MIPSpro 7.4.4m
C++ MIPSpro cc 7.4.4m
Linux 2.6.9-42.0.10.ELsmp #1 gcc (GCC) 3.4.6
@@ -12453,9 +13059,9 @@ The following platforms and compilers have been tested for this release.
MPICH mpich2-1.0.6p1 compiled with
gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.92!)
- Linux 2.6.16.46-0.14-smp #1 Intel(R) C++ for Intel(R) EM64T
+ Linux 2.6.16.46-0.14-smp #1 Intel(R) C++ for Intel(R) EM64T
SMP x86_64 GNU/Linux Ver. 10.1.013
- (smirom) Intel(R) Fortran Intel(R) EM64T
+ (smirom) Intel(R) Fortran Intel(R) EM64T
Ver. 10.1.013
PGI C, Fortran, C++ Version 7.2-1
for 64-bit target on x86-64
@@ -12479,7 +13085,7 @@ The following platforms and compilers have been tested for this release.
Intel(R) Fortran Compiler Version 10.0.026
Open MPI 1.2.2
MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2
- compiled with icc v10.0.026 and
+ compiled with icc v10.0.026 and
ifort 10.0.026
IA-64 Linux 2.4.21-309.tg1 #1 SMP
@@ -12506,7 +13112,7 @@ The following platforms and compilers have been tested for this release.
GNU Fortran (GCC) 4.3.0 20070810
G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008)
Intel C, C++ and Fortran compilers 10.1
-
+
Supported Configuration Features Summary
========================================
@@ -12517,7 +13123,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -12530,7 +13136,7 @@ Windows XP x64 n y(15) n(15) y y y
Windows Vista n n n y y y
Mac OS X 10.5 Intel n y n y y y
AIX 5.3 32- and 64-bit n y n y y n
-FreeBSD 6.3-STABLE
+FreeBSD 6.3-STABLE
32&64 bit n y n y y y
RedHat EL4 (3) W y(1) y(10) y(1) y y y
RedHat EL4 Intel (3) W n y n y y n
@@ -12538,49 +13144,49 @@ RedHat EL4 PGI (3) W n y n y y n
SuSe x86_64 gcc(3,12) W y(2) y(11) y(2) y y y
SuSe x86_64 Int(3,12) W n y(13) n y y n
SuSe x86_64 PGI(3,12) W n y(8) n y y y
-Linux 2.6 SuSE ia64 C
+Linux 2.6 SuSE ia64 C
Intel (3,7) y y y y y n
-Linux 2.6 SGI Altix
+Linux 2.6 SGI Altix
ia64 Intel (3) y y y y y y
Linux 2.6 RHEL C
Lustre Intel (5) y(4) y y(4) y y n
Cray XT3 2.0.41 y y y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit y y y y
-IRIX64_6.5 32-bit y dna y y
-IRIX64_6.5 64-bit y y n y
-Windows XP y y(15) y y
-Windows XP x64 y y(15) y y
-Windows Vista y n n y
-Mac OS X 10.5 y n y n
-AIX 5.3 32- and 64-bit n n n n
-FreeBSD 6.2 32&64 bit y n y y
-RedHat EL4 (3) W y y(10) y y
-RedHat EL4 Intel (3) W y y y n
-RedHat EL4 PGI (3) W y y y n
-SuSe x86_64 GNU(3,12) W y y y y
-SuSe x86_64 Int(3,12) W y y y n
-SuSe x86_64 PGI(3,12) W y y y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 32-bit y y y y
+Solaris2.10 64-bit y y y y
+IRIX64_6.5 32-bit y dna y y
+IRIX64_6.5 64-bit y y n y
+Windows XP y y(15) y y
+Windows XP x64 y y(15) y y
+Windows Vista y n n y
+Mac OS X 10.5 y n y n
+AIX 5.3 32- and 64-bit n n n n
+FreeBSD 6.2 32&64 bit y n y y
+RedHat EL4 (3) W y y(10) y y
+RedHat EL4 Intel (3) W y y y n
+RedHat EL4 PGI (3) W y y y n
+SuSe x86_64 GNU(3,12) W y y y y
+SuSe x86_64 Int(3,12) W y y y n
+SuSe x86_64 PGI(3,12) W y y y n
Linux 2.4 SuSE C
- ia64 C Intel (7) y y y n
+ ia64 C Intel (7) y y y n
Linux 2.4 SGI Altix C
- ia64 Intel y n
+ ia64 Intel y n
Linux 2.6 RHEL C
Lustre Intel (5) y y y n
Cray XT3 2.0.41 n n n n
Notes: (1) Using mpich2 1.0.6.
(2) Using mpich2 1.0.7.
- (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
(4) Using mvapich2 0.9.8.
- (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre
+ (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
- (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
+ (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel compilers
(8) pgf90
@@ -12634,17 +13240,17 @@ Known Problems
Storm" in file INSTALL_parallel for a way to deal with this problem.
AKC - 2008/05/28
-* We have discovered two problems when running collective IO parallel HDF5
- tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
+* We have discovered two problems when running collective IO parallel HDF5
+ tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
Linux cluster at NCSA.
- Under some complex selection cases:
+ Under some complex selection cases:
1) MPI_Get_element returns the wrong value.
- 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
+ 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
data may be generated.
- These issues arise only when turning on collective IO with chunking storage
- with some complex selections. We have not found these problems on other
- MPI-IO compilers. If you encounter these problems, you may use independent
+ These issues arise only when turning on collective IO with chunking storage
+ with some complex selections. We have not found these problems on other
+ MPI-IO compilers. If you encounter these problems, you may use independent
IO instead.
To avoid this behavior, change the following line in your code
@@ -12654,33 +13260,33 @@ Known Problems
KY - 2007/08/24
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* For LLNL, uP: both serial and parallel tests pass.
+* For LLNL, uP: both serial and parallel tests pass.
Zeus: Serial tests pass but parallel tests fail with a known problem in MPI.
- ubgl: Serial tests pass but parallel tests fail.
+ ubgl: Serial tests pass but parallel tests fail.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
* On IRIX6.5, when the C compiler version is greater than 7.4, complicated
MPI derived datatype code will work. However, the user should increase
- the value of the MPI_TYPE_MAX environment variable to some appropriate value
- to use collective irregular selection code. For example, the current
- parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
+ the value of the MPI_TYPE_MAX environment variable to some appropriate value
+ to use collective irregular selection code. For example, the current
+ parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
@@ -12688,26 +13294,26 @@ Known Problems
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag fails to compile for Solaris
- platforms. This is due to the fact that not all of the system libraries on
+ platforms. This is due to the fact that not all of the system libraries on
Solaris are available in a static format.
The --enable-static-exec configure flag also fails to correctly compile
- on IBM SP2 platforms for serial mode. The parallel mode works fine with
+ on IBM SP2 platforms for serial mode. The parallel mode works fine with
this option.
-
+
It is suggested that you do not use this option on these platforms
during configuration.
-* There is also a configure error on Altix machines that incorrectly reports
+* There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
* Information about building with PGI and Intel compilers is available in
@@ -12716,7 +13322,7 @@ Known Problems
-%%%%1.8.1%%%%
+%%%%1.8.1%%%%
HDF5 version 1.8.1 released on Thu May 29 15:28:55 CDT 2008
@@ -12725,10 +13331,10 @@ HDF5 version 1.8.1 released on Thu May 29 15:28:55 CDT 2008
INTRODUCTION
============
-This document describes the differences between the HDF5-1.8.1 release
-and HDF5 1.8.0, and contains information on the platforms tested and known
+This document describes the differences between the HDF5-1.8.1 release
+and HDF5 1.8.0, and contains information on the platforms tested and known
problems in HDF5-1.8.1. For more details, see the files
-HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt in the release_docs/ directory
+HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt in the release_docs/ directory
of the HDF5 source.
Links to the HDF5 1.8.1 source code, documentation, and additional materials
@@ -12740,18 +13346,18 @@ The HDF5 1.8.1 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.1 can be accessed directly at this location:
+User documentation for 1.8.1 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
+New features in the HDF5-1.8.x release series, including brief general
+descriptions of some new and modified APIs, are described in the "What's New
in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.1 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.1 (current
release) versus Release 1.8.0":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -12780,12 +13386,12 @@ New Features
- The lib/libhdf5.settings file contains much more configure
information. (AKC - 2008/05/18)
- - The new configure option "--disable-sharedlib-rpath" disables
- embedding the '-Wl,-rpath' information into executables when
- shared libraries are produced, and instead solely relies on the
+ - The new configure option "--disable-sharedlib-rpath" disables
+ embedding the '-Wl,-rpath' information into executables when
+ shared libraries are produced, and instead solely relies on the
information in LD_LIBRARY_PATH. (MAM - 2008/05/15)
- - Configuration suite now uses Autoconf 2.61, Automake 1.10.1, and
+ - Configuration suite now uses Autoconf 2.61, Automake 1.10.1, and
Libtool 2.2.2 (MAM - 2008/05/01)
Source code distribution
@@ -12801,25 +13407,25 @@ New Features
Tools
-----
- - h5repack: Reinstated the -i and -o command line flags to specify
+ - h5repack: Reinstated the -i and -o command line flags to specify
input and output files. h5repack now understands both the old
syntax (with -i and -o) and the new syntax introduced in Release
1.8.0. (PVN - 2008/05/23)
- - h5dump: Added support for external links, displaying the object that
+ - h5dump: Added support for external links, displaying the object that
an external link points to. (PVN - 2008/05/12)
- - h5dump: Added an option, -m, to allow user-defined formatting in the
+ - h5dump: Added an option, -m, to allow user-defined formatting in the
output of floating point numbers. (PVN - 2008/05/06)
- - h5dump, in output of the -p option: Added effective data compression
- ratio to the dataset storage layout output when a compression filter
+ - h5dump, in output of the -p option: Added effective data compression
+ ratio to the dataset storage layout output when a compression filter
has been applied to a dataset. (PVN - 2008/05/01)
F90 API
------
- New H5A, H5G, H5L, H5O, and H5P APIs to enable 1.8 features were
- added. See "Release 1.8.1 (current release) versus Release 1.8.0" in
- the document "HDF5 Software Changes from Release to Release"
- (http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html) for the
- complete list of the new APIs.
+ - New H5A, H5G, H5L, H5O, and H5P APIs to enable 1.8 features were
+ added. See "Release 1.8.1 (current release) versus Release 1.8.0" in
+ the document "HDF5 Software Changes from Release to Release"
+ (http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html) for the
+ complete list of the new APIs.
C++ API
------
@@ -12828,15 +13434,15 @@ New Features
Support for New Platforms, Languages, and Compilers
===================================================
- - Both serial and parallel HDF5 are supported for the Red Storm machine
+ - Both serial and parallel HDF5 are supported for the Red Storm machine
which is a Cray XT3 system.
- - The Fortran library will work correctly if compiled with the -i8
- flag. This has been tested with the g95, PGI and Intel Fortran
+ - The Fortran library will work correctly if compiled with the -i8
+ flag. This has been tested with the g95, PGI and Intel Fortran
compilers.
-Bug Fixes since HDF5-1.8.0
+Bug Fixes since HDF5-1.8.0
==========================
Configuration
@@ -12848,12 +13454,12 @@ Bug Fixes since HDF5-1.8.0
Library
-------
- - Chunking: Chunks greater than 4GB are disallowed.
+ - Chunking: Chunks greater than 4GB are disallowed.
(QAK - 2008/05/16)
- - Fixed the problem with searching for a target file when following
- an external link. The search pattern will depend on whether the
- target file's pathname is an absolute or a relative path.
- Please see the H5Lcreate_external description in the "HDF5
+ - Fixed the problem with searching for a target file when following
+ an external link. The search pattern will depend on whether the
+ target file's pathname is an absolute or a relative path.
+ Please see the H5Lcreate_external description in the "HDF5
Reference Manual" (http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html).
(VC - 2008/04/08)
- Fixed possible file corruption bug when encoding datatype
@@ -12861,7 +13467,7 @@ Bug Fixes since HDF5-1.8.0
256 and 511 bytes and the file was opened with the "use the
latest format" property enabled (with H5Pset_libver_bounds).
(QAK - 2008/03/13)
- - Fixed bug in H5Aget_num_attrs() routine to correctly handle an
+ - Fixed bug in H5Aget_num_attrs() routine to correctly handle an
invalid location identifier. (QAK - 2008/03/11)
Parallel Library
@@ -12873,13 +13479,13 @@ Bug Fixes since HDF5-1.8.0
- Fixed bug in h5diff that prevented datasets and attributes with
variable-length string elements from comparing correctly.
(QAK - 2008/02/28)
- - Fixed bug in h5dump that caused binary output to be made only for
+ - Fixed bug in h5dump that caused binary output to be made only for
the first dataset, when several datasets were requested.
(PVN - 2008/04/07)
F90 API
------
- - The h5tset(get)_fields subroutines were missing the parameter to
+ - The h5tset(get)_fields subroutines were missing the parameter to
specify a sign position; fixed. (EIP - 2008/05/23)
- Many APIs were fixed to work with the 8-byte integers in Fortran vs.
4-byte integers in C. This change is trasparent to user applications.
@@ -12894,12 +13500,12 @@ Bug Fixes since HDF5-1.8.0
In addition, data member IdComponent::id was moved into subclasses:
Attribute, DataSet, DataSpace, DataType, H5File, Group, and PropList.
(BMR - 2008/05/20)
- - IdComponent::dereference was incorrect; it was changed from:
- void IdComponent::dereference(IdComponent& obj, void* ref)
- to:
- void H5Object::dereference(H5File& h5file, void* ref)
- void H5Object::dereference(H5Object& obj, void* ref)
- (BMR - 2008/05/20)
+ - IdComponent::dereference was incorrect; it was changed from:
+ void IdComponent::dereference(IdComponent& obj, void* ref)
+ to:
+ void H5Object::dereference(H5File& h5file, void* ref)
+ void H5Object::dereference(H5Object& obj, void* ref)
+ (BMR - 2008/05/20)
- Revised Attribute::write and Attribute::read wrappers to handle
memory allocation/deallocation properly. (bugzilla 1045)
(BMR - 2008/05/20)
@@ -12911,7 +13517,7 @@ The following platforms and compilers have been tested for this release.
Cray XT3 (2.0.41) cc (pgcc) 7.1-4
(red storm) ftn (pgf90) 7.1-4
- CC (pgCC) 7.1-4
+ CC (pgCC) 7.1-4
mpicc 1.0.2
mpif90 1.0.2
@@ -12928,7 +13534,7 @@ The following platforms and compilers have been tested for this release.
gfortran 4.2.1 20080123
IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m
- F90 MIPSpro 7.4.4m
+ F90 MIPSpro 7.4.4m
C++ MIPSpro cc 7.4.4m
Linux 2.6.9 (RHEL4) Intel 10.0 compilers
@@ -12937,26 +13543,26 @@ The following platforms and compilers have been tested for this release.
Linux 2.4.21-47 gcc 3.2.3 20030502
(osage)
- Linux 2.6.9-42.0.10 gcc,g++ 3.4.6 20060404, G95 (GCC 4.0.3)
+ Linux 2.6.9-42.0.10 gcc,g++ 3.4.6 20060404, G95 (GCC 4.0.3)
(kagiso) PGI 7.1-6 (pgcc, pgf90, pgCC)
Intel 9.1 (icc, ifort, icpc)
- Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0,
+ Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0,
(smirom) g95 (GCC 4.0.3)
PGI 7.1-6 (pgcc, pgf90, pgCC)
Intel 9.1 (icc, ifort, icpc)
Linux 2.6.5-7.252.1-rtgfx #1 Intel(R) C++ Version 9.0
- SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0
+ SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0
(cobalt) SGI MPI
SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 95 6.2
Sun WorkShop 6 update 2 C++ 5.3
- SunOS 5.10 cc: Sun C 5.8
- (linew) f90: Sun Fortran 95 8.2
- CC: Sun C++ 5.8
+ SunOS 5.10 cc: Sun C 5.8
+ (linew) f90: Sun Fortran 95 8.2
+ CC: Sun C++ 5.8
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
(tungsten) gcc 3.2.2 20030222
@@ -12998,7 +13604,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -13017,52 +13623,52 @@ RedHat EL3 W PGI (3) n y n y y n
SuSe x86_64 gcc (3,12) y(2) y(11) y(2) y y y
SuSe x86_64 Int (3,12) n y(13) n y y n
SuSe x86_64 PGI (3,12) n y(8) n y y y
-Linux 2.4 Xeon C
+Linux 2.4 Xeon C
Lustre Intel (3,6) n y n y y n
-Linux 2.6 SuSE ia64 C
+Linux 2.6 SuSE ia64 C
Intel (3,7) y y y y y n
-Linux 2.6 SGI Altix
+Linux 2.6 SGI Altix
ia64 Intel (3) y y y y y y
Linux 2.6 RHEL C
Lustre Intel (5) y(4) y y(4) y y n
Cray XT3 2.0.41 y y y y y n
-Platform Shared Shared Shared Thread-
- C libs F90 libs C++ libs safe
-Solaris2.10 64-bit y y y y
-Solaris2.10 32-bit y y y y
-IRIX64_6.5 64-bit y y n y
-IRIX64_6.5 32-bit y dna y y
-Windows XP y y(15) y y
-Windows XP x64 y y(15) y y
-Windows Vista y n n y
-Mac OS X 10.3 y n
-FreeBSD 4.11 y n y y
-RedHat EL3 W (3) y y(10) y y
-RedHat EL3 W Intel (3) y y y n
-RedHat EL3 W PGI (3) y y y n
-SuSe x86_64 W GNU (3,12) y y y y
-SuSe x86_64 W Int (3,12) y y y n
-SuSe x86_64 W PGI (3,12) y y y n
-Linux 2.4 Xeon C
- Lustre Intel (6) y y y n
-Linux 2.4 SuSE
- ia64 C Intel (7) y y y n
-Linux 2.4 SGI Altix
- ia64 Intel y n
+Platform Shared Shared Shared Thread-
+ C libs F90 libs C++ libs safe
+Solaris2.10 64-bit y y y y
+Solaris2.10 32-bit y y y y
+IRIX64_6.5 64-bit y y n y
+IRIX64_6.5 32-bit y dna y y
+Windows XP y y(15) y y
+Windows XP x64 y y(15) y y
+Windows Vista y n n y
+Mac OS X 10.3 y n
+FreeBSD 4.11 y n y y
+RedHat EL3 W (3) y y(10) y y
+RedHat EL3 W Intel (3) y y y n
+RedHat EL3 W PGI (3) y y y n
+SuSe x86_64 W GNU (3,12) y y y y
+SuSe x86_64 W Int (3,12) y y y n
+SuSe x86_64 W PGI (3,12) y y y n
+Linux 2.4 Xeon C
+ Lustre Intel (6) y y y n
+Linux 2.4 SuSE
+ ia64 C Intel (7) y y y n
+Linux 2.4 SGI Altix
+ ia64 Intel y n
Linux 2.6 RHEL C
Lustre Intel (5) y y y n
Cray XT3 2.0.41 n n n n n
Notes: (1) Using mpich2 1.0.6.
(2) Using mpich2 1.0.7.
- (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
(4) Using mvapich2 0.9.8.
- (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre
+ (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
- (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
+ (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel compilers
(8) pgf90
@@ -13103,17 +13709,17 @@ Known Problems
======== end of bypass ========
AKC - 2008/05/28
-* We have discovered two problems when running collective IO parallel HDF5
- tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
+* We have discovered two problems when running collective IO parallel HDF5
+ tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
Linux cluster at NCSA.
- Under some complex selection cases:
+ Under some complex selection cases:
1) MPI_Get_element returns the wrong value.
- 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
+ 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
data may be generated.
- These issues arise only when turning on collective IO with chunking storage
- with some complex selections. We have not found these problems on other
- MPI-IO compilers. If you encounter these problems, you may use independent
+ These issues arise only when turning on collective IO with chunking storage
+ with some complex selections. We have not found these problems on other
+ MPI-IO compilers. If you encounter these problems, you may use independent
IO instead.
To avoid this behavior, change the following line in your code
@@ -13126,13 +13732,13 @@ Known Problems
* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel
tests failed with MPI-IO file locking message. AKC - 2007/6/25
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
-* For LLNL, uP: both serial and parallel tests pass.
+* For LLNL, uP: both serial and parallel tests pass.
Zeus: Serial tests pass but parallel tests fail with a known problem in MPI.
- ubgl: Serial tests pass but parallel tests fail.
+ ubgl: Serial tests pass but parallel tests fail.
* Configuring with --enable-debug=all produces compiler errors on most
platforms: Users who want to run HDF5 in debug mode should use
@@ -13140,66 +13746,66 @@ Known Problems
information on most modules.
* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long
- double to (unsigned) long long and from (unsigned) long long to long double.
+ double to (unsigned) long long and from (unsigned) long long to long double.
* On Altix SGI with Intel 9.0, testmeta.c would not compile with -O3
optimization flag.
-* On VAX, the Scaleoffset filter is not supported. The Scaleoffset filter
- supports only the IEEE standard for floating-point data; it cannot be applied
- to HDF5 data generated on VAX.
+* On VAX, the Scaleoffset filter is not supported. The Scaleoffset filter
+ supports only the IEEE standard for floating-point data; it cannot be applied
+ to HDF5 data generated on VAX.
* On Cray X1, a lone colon on the command line of h5dump --xml (as in
the testh5dumpxml.sh script) is misinterpereted by the operating system
and causes an error.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
* On IRIX6.5, when the C compiler version is greater than 7.4, complicated
MPI derived datatype code will work. However, the user should increase
- the value of the MPI_TYPE_MAX environment variable to some appropriate value
- to use collective irregular selection code. For example, the current
- parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
+ the value of the MPI_TYPE_MAX environment variable to some appropriate value
+ to use collective irregular selection code. For example, the current
+ parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculation of the Fletcher32 checksum in the
+ There was a bug in the calculation of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
-* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD
- Opteron processor, there is a bug in the compiler for optimization(-O2).
- The library failed in several tests, all related to the MULTI driver.
- The problem has been reported to the vendor.
+* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD
+ Opteron processor, there is a bug in the compiler for optimization(-O2).
+ The library failed in several tests, all related to the MULTI driver.
+ The problem has been reported to the vendor.
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
messages like "INFO: 0031-XXX ...". This is from the command `poe'.
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag fails to compile for Solaris
- platforms. This is due to the fact that not all of the system libraries on
+ platforms. This is due to the fact that not all of the system libraries on
Solaris are available in a static format.
The --enable-static-exec configure flag also fails to correctly compile
- on IBM SP2 platforms for serial mode. The parallel mode works fine with
+ on IBM SP2 platforms for serial mode. The parallel mode works fine with
this option.
-
+
It is suggested that you do not use this option on these platforms
during configuration.
@@ -13208,7 +13814,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
* The ./dsets tests fail on the TFLOPS machine if the test program,
@@ -13220,42 +13826,42 @@ Known Problems
* Not all platforms behave correctly with Szip's shared libraries. Szip is
disabled in these cases, and a message is relayed at configure time. Static
libraries should be working on all systems that support Szip and should be
- used when shared libraries are unavailable.
+ used when shared libraries are unavailable.
- There is also a configure error on Altix machines that incorrectly reports
+ There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
-* On some platforms that use Intel and Absoft compilers to build the HDF5
- Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90
- and fflush2.f90 complaining about the exit subroutine. Comment out the line
+* On some platforms that use Intel and Absoft compilers to build the HDF5
+ Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90
+ and fflush2.f90 complaining about the exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error).
* Information about building with PGI and Intel compilers is available in
the INSTALL file sections 4.7 and 4.8.
* On at least one system, SDSC DataStar, the scheduler (in this case
- LoadLeveler) sends job status updates to standard error when you run
+ LoadLeveler) sends job status updates to standard error when you run
any executable that was compiled with the parallel compilers.
- This causes problems when running "make check" on parallel builds, as
+ This causes problems when running "make check" on parallel builds, as
many of the tool tests function by saving the output from test runs,
- and comparing it to an exemplar.
+ and comparing it to an exemplar.
The best solution is to reconfigure the target system so it no longer
inserts the extra text. However, this may not be practical.
- In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
- the configure and build. This will cause "make check" to continue after
+ In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
+ the configure and build. This will cause "make check" to continue after
detecting errors in the tool tests. However, in the case of SDSC DataStar,
it also leaves you with some 150 "failed" tests to examine by hand.
A second solution is to write a script to run serial tests and filter
out the text added by the scheduler. A sample script used on SDSC
- DataStar is given below, but you will probably have to customize it
- for your installation.
+ DataStar is given below, but you will probably have to customize it
+ for your installation.
- Observe that the basic idea is to insert the script as the first item
- on the command line which executes the the test. The script then
+ Observe that the basic idea is to insert the script as the first item
+ on the command line which executes the the test. The script then
executes the test and filters out the offending text before passing
it on.
@@ -13277,11 +13883,11 @@ Known Problems
exit $RETURN_VALUE
You get the HDF5 make files and test scipts to execute your filter script
- by setting the environment variable "RUNSERIAL" to the full path of the
- script prior to running configure for parallel builds. Remember to
+ by setting the environment variable "RUNSERIAL" to the full path of the
+ script prior to running configure for parallel builds. Remember to
"unsetenv RUNSERIAL" before running configure for a serial build.
- Note that the RUNSERIAL environment variable exists so that we can
+ Note that the RUNSERIAL environment variable exists so that we can
prefix serial runs as necessary on the target system. On DataStar,
no prefix is necessary. However on an MPICH system, the prefix might
have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to
@@ -13300,7 +13906,7 @@ Known Problems
available.
-%%%%1.8.0%%%%
+%%%%1.8.0%%%%
HDF5 version 1.8.0 released on Tue Feb 12 20:41:19 CST 2008
@@ -13310,9 +13916,9 @@ INTRODUCTION
============
This document describes the differences between the HDF5-1.6.x release series
-and HDF5 1.8.0, and contains information on the platforms tested and known
+and HDF5 1.8.0, and contains information on the platforms tested and known
problems in HDF5-1.8.0. For more details, see the HISTORY-1_0-1_8_0_rc3.txt
-file in the
+file in the
release_docs/ directory of the HDF5 source.
Links to the HDF5 1.8.0 source code, documentation, and additional materials
@@ -13324,17 +13930,17 @@ The HDF5 1.8.0 release can be obtained from:
http://www.hdfgroup.org/HDF5/release/obtain5.html
-User documentation for 1.8.0 can be accessed directly at this location:
+User documentation for 1.8.0 can be accessed directly at this location:
http://www.hdfgroup.org/HDF5/doc/
-New features in 1.8.0, including brief general descriptions of some new
+New features in 1.8.0, including brief general descriptions of some new
and modified APIs, are described in the "What's New in 1.8.0?" document:
http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.0 (current
+All new and modified APIs are listed in detail in the "HDF5 Software Changes
+from Release to Release" document, in the section "Release 1.8.0 (current
release) versus Release 1.6.x":
http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
@@ -13361,7 +13967,7 @@ New Features
HDF5 Release 1.8.0 is a major release with many changes and new features.
- New format and interface features discussed in the "What's New in
+ New format and interface features discussed in the "What's New in
HDF5 1.8.0" document include the following:
Enhanced group object management
@@ -13373,7 +13979,7 @@ New Features
New I/O filters: n-bit and scale+offset compression
New link (H5L) and object (H5O) interfaces and features
External and user-defined links
- New high-level APIs:
+ New high-level APIs:
HDF5 Packet Table (H5PT) and HDF5 Dimension Scale (H5DS)
C++ and Fortran interfaces for older high-level APIs:
H5Lite (H5LT), H5Image (H5IM), and H5Table (H5TB)
@@ -13383,33 +13989,33 @@ New Features
http://hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
- New APIs associated with these features, other interface changes
+ New APIs associated with these features, other interface changes
(e.g., ENUM and struct definitions), and new library configuration flags
- are listed in the "Release 1.8.0 (current release) versus Release 1.6.x"
+ are listed in the "Release 1.8.0 (current release) versus Release 1.6.x"
section of "HDF5 Software Changes from Release to Release."
http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html
Compatibility
-------------
- Many HDF5 users and user communities have existing applications that
- they may wish to port to Release 1.8.0. Alternatively, some users may
+ Many HDF5 users and user communities have existing applications that
+ they may wish to port to Release 1.8.0. Alternatively, some users may
wish to take advantage of Release 1.8.0's improved performance without
having to port such applications. To facilitate managing application
- compatibility and porting applications from release to release, the HDF
+ compatibility and porting applications from release to release, the HDF
Team has implemented the following features:
- Individually-configurable macros that selectively map common
+ Individually-configurable macros that selectively map common
interface names to the old and new interfaces
Library configuration options to configure the macro mappings
Two related documents accompany this release:
- "API Compatibility Macros in HDF5" discusses the specifics of the
- new individually-configurable macros and library configuration
+ "API Compatibility Macros in HDF5" discusses the specifics of the
+ new individually-configurable macros and library configuration
options.
http://hdfgroup.org/HDF5/doc/RM/APICompatMacros.html
-
+
"New Features in HDF5 Release 1.8.0 and Backward/Forward Format
- Compatibility Issues" discusses each new feature with regard to
+ Compatibility Issues" discusses each new feature with regard to
its impact on format compatibility.
http://hdfgroup.org/HDF5/doc/ADGuide/CompatFormat180.html
@@ -13432,13 +14038,13 @@ Referenced documents
Removed Feature
===============
-The stream virtual file driver (H5FD_STREAM) have been removed in this
-release. This affects the functions H5Pset_fapl_stream and H5Pget_fapl_stream
+The stream virtual file driver (H5FD_STREAM) have been removed in this
+release. This affects the functions H5Pset_fapl_stream and H5Pget_fapl_stream
and the constant H5FD_STREAM.
-This virtual file driver will be available at
-http://hdf5-addons.origo.ethz.ch/. Note that at the time of this release,
-the transition is still in progress; the necessary integration tools may
+This virtual file driver will be available at
+http://hdf5-addons.origo.ethz.ch/. Note that at the time of this release,
+the transition is still in progress; the necessary integration tools may
not be available when HDF5 Release 1.8.0 first comes out.
@@ -13447,9 +14053,9 @@ Support for New Platforms, Languages, and Compilers
- Support for Open VMS 7.3 was added.
-Bug Fixes since HDF5-1.6.0
+Bug Fixes since HDF5-1.6.0
==========================
- This release contains numerous bug fixes. For details, see the
+ This release contains numerous bug fixes. For details, see the
"Changes from 1.6.0 to 1.8.0-rc3" section of the HISTORY.txt file for
this release.
@@ -13460,7 +14066,7 @@ The following platforms and compilers have been tested for for this release.
AIX 5.2 (32/64 bit) xlc 8.0.0.11
xlC 8.0
- xlf 10.01.0000.0
+ xlf 10.01.0000.0
mpcc_r 6.0.0.8
mpxlf_r 8.1.1.7
@@ -13477,7 +14083,7 @@ The following platforms and compilers have been tested for for this release.
gfortran 4.2.1 20080123
IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m
- F90 MIPSpro 7.4.4m
+ F90 MIPSpro 7.4.4m
C++ MIPSpro cc 7.4.4m
Linux 2.6.9 (RHEL4) Intel 10.0 compilers
@@ -13490,22 +14096,22 @@ The following platforms and compilers have been tested for for this release.
(kagiso) PGI 7.0-7 (pgcc, pgf90, pgCC)
Intel 9.1 (icc, ifort, icpc)
- Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0,
+ Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0,
(smirom) g95 (GCC 4.0.3)
PGI 6.2-5 (pgcc, pgf90, pgCC)
Intel 9.1 (icc, iort, icpc)
Linux 2.6.5-7.252.1-rtgfx #1 Intel(R) C++ Version 9.0
- SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0
+ SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0
(cobalt) SGI MPI
SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3
(Solaris 2.8) Sun WorkShop 6 update 2 Fortran 95 6.2
Sun WorkShop 6 update 2 C++ 5.3
- SunOS 5.10 cc: Sun C 5.8
- (linew) f90: Sun Fortran 95 8.2
- CC: Sun C++ 5.8
+ SunOS 5.10 cc: Sun C 5.8
+ (linew) f90: Sun Fortran 95 8.2
+ CC: Sun C++ 5.8
Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre
(tungsten) gcc 3.2.2 20030222
@@ -13527,7 +14133,7 @@ The following platforms and compilers have been tested for for this release.
Windows Vista Visual Studio 2005
- MAC OS 10.4 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
+ MAC OS 10.4 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
G95 (GCC 4.0.3 (g95 0.91!) Nov 21 2006)
Alpha Open VMS 7.3 Compaq C V6.5-001-48BCD
@@ -13544,7 +14150,7 @@ Supported Configuration Features Summary
x = not working in this release
dna = does not apply
( ) = footnote appears below second table
- <blank> = testing incomplete on this feature or platform
+ <blank> = testing incomplete on this feature or platform
Platform C F90 F90 C++ zlib SZIP
parallel parallel
@@ -13568,52 +14174,52 @@ RedHat EL3 W PGI (3) n y n y y n
SuSe x86_64 gcc (3,12) y(1a) y(11) n y y y
SuSe x86_64 Int (3,12) n y(13) n y y n
SuSe x86_64 PGI (3,12) n y(8) n y y y
-Linux 2.4 Xeon C
+Linux 2.4 Xeon C
Lustre Intel (3,6) n y n y y n
-Linux 2.6 SuSE ia64 C
+Linux 2.6 SuSE ia64 C
Intel (3,7) y y y y y n
-Linux 2.6 SGI Altix
+Linux 2.6 SGI Altix
ia64 Intel (3) y y y y y y
Alpha OpenVMS 7.3.2 n y n y n n
-Platform Shared Shared Shared static- Thread-
- C libs F90 libs C++ libs exec safe
-Solaris2.8 64-bit y y y x y
-Solaris2.8 32-bit y y y x y
-Solaris2.10 64-bit y x y
-Solaris2.10 32-bit y x y
-IRIX64_6.5 64-bit y y n y y
-IRIX64_6.5 32-bit y dna y y y
-AIX-5.2 & 5.3 32-bit n n n y n
-AIX-5.2 & 5.3 64-bit n n n y n
-Windows XP y y(15) y y y
-Windows XP x64 y y(15) y y y
-Windows Vista y n n y y
-Mac OS X 10.3 y y n
-FreeBSD 4.11 y n y y y
-RedHat EL3 W (3) y y(10) y y y
-RedHat EL3 W Intel (3) y y y y n
-RedHat EL3 W PGI (3) y y y y n
-SuSe x86_64 W GNU (3,12) y y y y y
-SuSe x86_64 W Int (3,12) y y y y(14) n
-SuSe x86_64 W PGI (3,12) y y y y(14) n
-Linux 2.4 Xeon C
- Lustre Intel (6) y y y y n
-Linux 2.4 SuSE
- ia64 C Intel (7) y y y y n
-Linux 2.4 SGI Altix
- ia64 Intel y y n
-Alpha OpenVMS 7.3.2 n n n y n
+Platform Shared Shared Shared static- Thread-
+ C libs F90 libs C++ libs exec safe
+Solaris2.8 64-bit y y y x y
+Solaris2.8 32-bit y y y x y
+Solaris2.10 64-bit y x y
+Solaris2.10 32-bit y x y
+IRIX64_6.5 64-bit y y n y y
+IRIX64_6.5 32-bit y dna y y y
+AIX-5.2 & 5.3 32-bit n n n y n
+AIX-5.2 & 5.3 64-bit n n n y n
+Windows XP y y(15) y y y
+Windows XP x64 y y(15) y y y
+Windows Vista y n n y y
+Mac OS X 10.3 y y n
+FreeBSD 4.11 y n y y y
+RedHat EL3 W (3) y y(10) y y y
+RedHat EL3 W Intel (3) y y y y n
+RedHat EL3 W PGI (3) y y y y n
+SuSe x86_64 W GNU (3,12) y y y y y
+SuSe x86_64 W Int (3,12) y y y y(14) n
+SuSe x86_64 W PGI (3,12) y y y y(14) n
+Linux 2.4 Xeon C
+ Lustre Intel (6) y y y y n
+Linux 2.4 SuSE
+ ia64 C Intel (7) y y y y n
+Linux 2.4 SGI Altix
+ ia64 Intel y y n
+Alpha OpenVMS 7.3.2 n n n y n
Notes: (1) Using mpich 1.2.6.
(1a) Using mpich2 1.0.6.
(2) Using mpt and mpich 1.2.6.
- (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
+ (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated.
W or C indicates workstation or cluster, respectively.
- (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
+ (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre
and Intel compilers
(7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel
compilers
@@ -13624,7 +14230,7 @@ compilers
(12) AMD Opteron x86_64
(13) ifort
(14) Yes with C and Fortran, but not with C++
- (15) Using Visual Studio 2005 or Cygwin
+ (15) Using Visual Studio 2005 or Cygwin
(16) Not tested for this release.
Compiler versions for each platform are listed in the preceding
"Platforms Tested" table.
@@ -13632,17 +14238,17 @@ compilers
Known Problems
==============
-* We have discovered two problems when running collective IO parallel HDF5
- tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
+* We have discovered two problems when running collective IO parallel HDF5
+ tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a
Linux cluster at NCSA.
- Under some complex selection cases:
+ Under some complex selection cases:
1) MPI_Get_element returns the wrong value.
- 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
+ 2) MPI_Type_struct also generates the wrong derived datatype and corrupt
data may be generated.
- These issues arise only when turning on collective IO with chunking storage
- with some complex selections. We have not found these problems on other
- MPI-IO compilers. If you encounter these problems, you may use independent
+ These issues arise only when turning on collective IO with chunking storage
+ with some complex selections. We have not found these problems on other
+ MPI-IO compilers. If you encounter these problems, you may use independent
IO instead.
To avoid this behavior, change the following line in your code
@@ -13656,20 +14262,20 @@ Known Problems
* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel
tests failed with MPI-IO file locking message. AKC - 2007/6/25
-* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
- use -mp -O1 compilation flags to build the libraries. A higher level of
- optimization causes failures in several HDF5 library tests.
+* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers,
+ use -mp -O1 compilation flags to build the libraries. A higher level of
+ optimization causes failures in several HDF5 library tests.
* For SNL, Red Storm: Only parallel HDF5 is supported. The serial tests pass
when run against the parallel library; the parallel tests also pass, but
with lots of non-fatal error messages.
-* For LLNL, uP: both serial and parallel tests pass.
+* For LLNL, uP: both serial and parallel tests pass.
Zeus: Serial tests pass but parallel tests fail with a known problem in MPI.
- ubgl: Serial tests pass but parallel tests fail.
+ ubgl: Serial tests pass but parallel tests fail.
-* On SUN 5.10 C++, testing fails in the "Testing Shared Datatypes with
- Attributes" test.
+* On SUN 5.10 C++, testing fails in the "Testing Shared Datatypes with
+ Attributes" test.
* Configuring with --enable-debug=all produces compiler errors on most
platforms: Users who want to run HDF5 in debug mode should use
@@ -13677,66 +14283,66 @@ Known Problems
information on most modules.
* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long
- double to (unsigned) long long and from (unsigned) long long to long double.
+ double to (unsigned) long long and from (unsigned) long long to long double.
* On Altix SGI with Intel 9.0, testmeta.c would not compile with -O3
optimization flag.
-* On VAX, the Scaleoffset filter is not supported. The filter cannot be
- applied to HDF5 data generated on VAX. The Scaleoffset filter only supports
+* On VAX, the Scaleoffset filter is not supported. The filter cannot be
+ applied to HDF5 data generated on VAX. The Scaleoffset filter only supports
the IEEE standard for floating-point data.
* On Cray X1, a lone colon on the command line of h5dump --xml (as in
the testh5dumpxml.sh script) is misinterpereted by the operating system
and causes an error.
-* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
- the application asks to do collective IO, we have found that when using 4
- processors, a simple collective write will sometimes be hung. This can be
+* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and
+ the application asks to do collective IO, we have found that when using 4
+ processors, a simple collective write will sometimes be hung. This can be
verified with t_mpi test under testpar.
* On IRIX6.5, when the C compiler version is greater than 7.4, complicated
MPI derived datatype code will work. However, the user should increase
- the value of the MPI_TYPE_MAX environment variable to some appropriate value
- to use collective irregular selection code. For example, the current
- parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
+ the value of the MPI_TYPE_MAX environment variable to some appropriate value
+ to use collective irregular selection code. For example, the current
+ parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test.
-* A dataset created or rewritten with a v1.6.3 library or after cannot be read
+* A dataset created or rewritten with a v1.6.3 library or after cannot be read
with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled.
- There was a bug in the calculating code of the Fletcher32 checksum in the
+ There was a bug in the calculating code of the Fletcher32 checksum in the
library before v1.6.3; the checksum value was not consistent between big-
- endian and little-endian systems. This bug was fixed in Release 1.6.3.
- However, after fixing the bug, the checksum value was no longer the same as
- before on little-endian system. Library releases after 1.6.4 can still read
- datasets created or rewritten with an HDF5 library of v1.6.2 or before.
+ endian and little-endian systems. This bug was fixed in Release 1.6.3.
+ However, after fixing the bug, the checksum value was no longer the same as
+ before on little-endian system. Library releases after 1.6.4 can still read
+ datasets created or rewritten with an HDF5 library of v1.6.2 or before.
SLU - 2005/6/30
-* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD
- Opteron processor, there is a bug in the compiler for optimization(-O2).
- The library failed in several tests, all related to the MULTI driver.
- The problem has been reported to the vendor.
+* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD
+ Opteron processor, there is a bug in the compiler for optimization(-O2).
+ The library failed in several tests, all related to the MULTI driver.
+ The problem has been reported to the vendor.
* On IBM AIX systems, parallel HDF5 mode will fail some tests with error
messages like "INFO: 0031-XXX ...". This is from the command `poe'.
Set the environment variable MP_INFOLEVEL to 0 to minimize the messages
and run the tests again.
- The tests may fail with messages like "The socket name is already in use",
- but HDF5 does not use sockets. This failure is due to problems with the
- poe command trying to set up the debug socket. To resolve this problem,
- check to see whether there are many old /tmp/s.pedb.* files staying around.
- These are sockets used by the poe command and left behind due to failed
- commands. First, ask your system administrator to clean them out.
+ The tests may fail with messages like "The socket name is already in use",
+ but HDF5 does not use sockets. This failure is due to problems with the
+ poe command trying to set up the debug socket. To resolve this problem,
+ check to see whether there are many old /tmp/s.pedb.* files staying around.
+ These are sockets used by the poe command and left behind due to failed
+ commands. First, ask your system administrator to clean them out.
Lastly, request IBM to provide a means to run poe without the debug socket.
* The --enable-static-exec configure flag fails to compile for Solaris
- platforms. This is due to the fact that not all of the system libraries on
+ platforms. This is due to the fact that not all of the system libraries on
Solaris are available in a static format.
The --enable-static-exec configure flag also fails to correctly compile
- on IBM SP2 platform for the serial mode. The parallel mode works fine with
+ on IBM SP2 platform for the serial mode. The parallel mode works fine with
this option.
-
+
It is suggested that you do not use this option on these platforms
during configuration.
@@ -13745,7 +14351,7 @@ Known Problems
able to handle the `long long' datatype with the warning:
warning: ANSI C does not support `long long'
-
+
This warning is innocuous and can be safely ignored.
* The ./dsets tests fail on the TFLOPS machine if the test program,
@@ -13757,42 +14363,42 @@ Known Problems
* Not all platforms behave correctly with Szip's shared libraries. Szip is
disabled in these cases, and a message is relayed at configure time. Static
libraries should be working on all systems that support Szip and should be
- used when shared libraries are unavailable.
+ used when shared libraries are unavailable.
- There is also a configure error on Altix machines that incorrectly reports
+ There is also a configure error on Altix machines that incorrectly reports
when a version of Szip without an encoder is being used.
-* On some platforms that use Intel and Absoft compilers to build the HDF5
- Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90
- and fflush2.f90 complaining about the exit subroutine. Comment out the line
+* On some platforms that use Intel and Absoft compilers to build the HDF5
+ Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90
+ and fflush2.f90 complaining about the exit subroutine. Comment out the line
IF (total_error .ne. 0) CALL exit (total_error).
* Information about building with PGI and Intel compilers is available in
the INSTALL file sections 4.7 and 4.8.
* On at least one system, SDSC DataStar, the scheduler (in this case
- LoadLeveler) sends job status updates to standard error when you run
+ LoadLeveler) sends job status updates to standard error when you run
any executable that was compiled with the parallel compilers.
- This causes problems when running "make check" on parallel builds, as
+ This causes problems when running "make check" on parallel builds, as
many of the tool tests function by saving the output from test runs,
- and comparing it to an exemplar.
+ and comparing it to an exemplar.
The best solution is to reconfigure the target system so it no longer
inserts the extra text. However, this may not be practical.
- In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
- the configure and build. This will cause "make check" to continue after
+ In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to
+ the configure and build. This will cause "make check" to continue after
detecting errors in the tool tests. However, in the case of SDSC DataStar,
it also leaves you with some 150 "failed" tests to examine by hand.
A second solution is to write a script to run serial tests and filter
out the text added by the scheduler. A sample script used on SDSC
- DataStar is given below, but you will probably have to customize it
- for your installation.
+ DataStar is given below, but you will probably have to customize it
+ for your installation.
- Observe that the basic idea is to insert the script as the first item
- on the command line which executes the the test. The script then
+ Observe that the basic idea is to insert the script as the first item
+ on the command line which executes the the test. The script then
executes the test and filters out the offending text before passing
it on.
@@ -13814,11 +14420,11 @@ Known Problems
exit $RETURN_VALUE
You get the HDF5 make files and test scipts to execute your filter script
- by setting the environment variable "RUNSERIAL" to the full path of the
- script prior to running configure for parallel builds. Remember to
+ by setting the environment variable "RUNSERIAL" to the full path of the
+ script prior to running configure for parallel builds. Remember to
"unsetenv RUNSERIAL" before running configure for a serial build.
- Note that the RUNSERIAL environment variable exists so that we can
+ Note that the RUNSERIAL environment variable exists so that we can
can prefix serial runs as necessary on the target system. On DataStar,
no prefix is necessary. However on an MPICH system, the prefix might
have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to
diff --git a/release_docs/INSTALL b/release_docs/INSTALL
index f84ddc2..9e2c5a7 100644
--- a/release_docs/INSTALL
+++ b/release_docs/INSTALL
@@ -14,6 +14,7 @@ CONTENTS
2. Quick installation
2.1. Windows and Cygwin
+ 2.2. RedStorm (Cray XT3)
3. HDF5 dependencies
3.1. Make
@@ -96,6 +97,13 @@ CONTENTS
Users of Microsoft Windows should see the INSTALL_Windows files for
detailed instructions. INSTALL_Cygwin also exists for those platforms.
+2.2. RedStorm (Cray XT3)
+ Users of the Red Storm machine, after reading this file, should read
+ the Red Storm section in the INSTALL_parallel file for specific
+ instructions for the Red Storm machine. The same instructions would
+ probably work for other Cray XT3 systems, but they have not been
+ verified.
+
3. HDF5 dependencies
3.1. Make
@@ -416,6 +424,12 @@ CONTENTS
parallelism on a distributed multi-processor system. Read the
file INSTALL_parallel for detailed information.
+ The threadsafe and C++ interfaces are not compatible
+ with the parallel option.
+ Unless --enable-unsupported has been specified on the configure line,
+ the following options must be disabled:
+ --enable-threadsafe, --enable-cxx
+
4.3.11. Threadsafe capability
The HDF5 Library can be configured to be thread-safe (on a very
large scale) with the `--enable-threadsafe' flag to the configure
@@ -425,6 +439,13 @@ CONTENTS
https://portal.hdfgroup.org/display/knowledge/Questions+about+thread-safety+and+concurrent+access
+ The high-level, C++ and Fortran interfaces are not compatible
+ with the thread-safety option because the lock is not hoisted
+ into the higher-level API calls.
+ Unless --enable-unsupported has been specified on the configure line,
+ the following options must be disabled:
+ --enable-hl, --enable-cxx, --enable-fortran
+
4.3.12. Backward compatibility
The 1.8 version of the HDF5 Library can be configured to operate
identically to the v1.6 library with the
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index e33615d..2df839b 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -12,7 +12,7 @@ Section IV: Further considerations
Section V: Options for building HDF5 Libraries with CMake command line
Section VI: CMake option defaults for HDF5
Section VII: User Defined Options for HDF5 Libraries with CMake
-Section VIII: Options for platform configuration files
+Section VIII: User Defined Compile Flags for HDF5 Libraries with CMake
************************************************************************
@@ -24,18 +24,20 @@ Obtaining HDF5 source code
1. Create a directory for your development; for example, "myhdfstuff".
2. Obtain compressed (*.tar or *.zip) HDF5 source from
- http://www.hdfgroup.org/ftp/HDF5/current/src/
+ https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
and put it in "myhdfstuff".
Uncompress the file. There should be a hdf5-1.8."X" folder.
CMake version
1. We suggest you obtain the latest CMake from the Kitware web site.
- The HDF5 1.8."X" product requires a minimum CMake version 3.2.2,
- where "X" is the current HDF5 release version.
+ The HDF5 1.8."X" product requires a minimum CMake version 3.12,
+ where "X" is the current HDF5 release version. If you are using
+ VS2019, the minimum version is 3.15.
Note:
To change the install prefix from the platform defaults initialize
- the CMake variable, CMAKE_INSTALL_PREFIX.
+ the CMake variable, CMAKE_INSTALL_PREFIX. Users of build scripts
+ will use the INSTALLDIR option.
========================================================================
@@ -48,51 +50,66 @@ the config/cmake/cacheinit.cmake file.
HDF Group recommends using the ctest script mode to build HDF5.
The following files referenced below are available at the HDF web site:
- http://www.hdfgroup.org/HDF5/release/cmakebuild.html
+ https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
Single compressed file with all the files needed, including source:
- hdf5-1.8.19-CMake.zip or hdf5-1.8.19-CMake.tar.gz
+ CMake-hdf5-1.8.X.zip or CMake-hdf5-1.8.X.tar.gz
-Individual files
+Individual files included in the above mentioned compressed files
-----------------------------------------------
CMake build script:
CTestScript.cmake
External compression szip and zlib libraries:
+ LIBAEC.tar.gz
SZip.tar.gz
ZLib.tar.gz
-Platform configuration files:
- HDF518config.cmake
+External compression plugin libraries:
+ hdf5_plugins.tar.gz
+
+Examples Source package:
+ HDF5Examples-1.10.x-Source.tar.gz
+
+Configuration files:
+ HDF5config.cmake
+ HDF5options.cmake
+
+Build scripts for windows or linux
-----------------------------------------------
To build HDF5 with the SZIP and ZLIB external libraries you will need to:
1. Change to the development directory "myhdfstuff".
- 2. Download the SZip.tar.gz and ZLib.tar.gz to "myhdfstuff".
- Do not uncompress the files.
+ 2. Download the CMake-hdf5-1.8.X.zip(.tar.gz) file to "myhdfstuff".
+ Uncompress the file.
- 3. Download the CTestScript.cmake file to "myhdfstuff".
+ 3. Change to the source directory "hdf5-1.8.x".
CTestScript.cmake file should not be modified.
- 4. Download the platform configuration file, HDF518config.cmake,
- to "myhdfstuff". Do not modify the file unless you want to change
- default build environment. (See http://www.hdfgroup.org/HDF5/release/chgcmkbuild.html)
+ 4. Edit the platform configuration file, HDF5options.cmake, if you want to change
+ the default build environment.
+ (See https://portal.hdfgroup.org/display/support/How+to+Change+HDF5+CMake+Build+Options)
5. From the "myhdfstuff" directory execute the CTest Script with the
following options:
- On 32-bit Windows with Visual Studio 2012, execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=VS2012 -C Release -VV -O hdf5.log
- On 64-bit Windows with Visual Studio 2012, execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log
- On 32-bit Windows with Visual Studio 2013, execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=VS2013 -C Release -VV -O hdf5.log
- On 64-bit Windows with Visual Studio 2013, execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201364 -C Release -VV -O hdf5.log
+ On 32-bit Windows with Visual Studio 2019, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2019 -C Release -VV -O hdf5.log
+ On 64-bit Windows with Visual Studio 2019, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201964 -C Release -VV -O hdf5.log
+ On 32-bit Windows with Visual Studio 2017, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -VV -O hdf5.log
+ On 64-bit Windows with Visual Studio 2017, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log
+ On 32-bit Windows with Visual Studio 2015, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -VV -O hdf5.log
+ On 64-bit Windows with Visual Studio 2015, execute:
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -VV -O hdf5.log
On Linux and Mac, execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
+ The supplied build scripts are versions of the above.
The command above will configure, build, test, and create an install
package in the myhdfstuff folder. It will have the format:
@@ -103,19 +120,20 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
installer on your system, you will also see a similar file that ends
in either .exe (NSIS) or .msi (WiX).
- The -S option uses the script version of ctest.
+ Notes on the command line options.
+ The -S option uses the script version of ctest.
- The value for the -C option (as shown above, "-C Release") must
- match the setting for CTEST_CONFIGURATION_TYPE in the platform
- configuration file.
+ The value for the -C option (as shown above, "-C Release") must
+ match the setting for CTEST_CONFIGURATION_TYPE in the platform
+ configuration file.
- The -VV option is for most verbose; use -V for less verbose.
+ The -VV option is for most verbose; use -V for less verbose.
- The "-O hdf5.log" option saves the output to a log file hdf5.log.
+ The "-O hdf5.log" option saves the output to a log file hdf5.log.
6. To install, "X" is the current release version
- On Windows, execute:
+ On Windows (with WiX installed), execute:
HDF5-1.8."X"-win32.msi or HDF5-1.8."X"-win64.msi
By default this program will install the hdf5 library into the
"C:\Program Files" directory and will create the following
@@ -159,14 +177,23 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
By default the installation will create the bin, include, lib and cmake
folders in the <install destination directory>/HDF_Group/HDF5/1.8."X"
+ The <install destination directory> depends on the build platform;
+ Windows will set the default to:
+ C:/Program Files/HDF_Group/HDF5/1.8."X"
+ Linux will set the default to:
+ "myhdfstuff/HDF_Group/HDF5/1.8."X"
+ The default can be changed by adding ",INSTALLDIR=<my new dir>" to the
+ "ctest -S HDF5config.cmake..." command. For example on linux:
+ ctest -S HDF5config.cmake,INSTALLDIR=/usr/local/myhdf5,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
========================================================================
III. Quick Step Building HDF5 C Static Libraries and Tools with CMake
========================================================================
Notes: This short set of instructions is written for users who want to
- quickly build the just the HDF5 C static library and tools from
+ quickly build just the HDF5 C static library and tools from
the HDF5 source code package using the CMake command line tools.
+ Avoid the use of drive letters in paths on Windows.
Go through these steps:
@@ -201,7 +228,7 @@ Notes: This short set of instructions is written for users who want to
cpack -C Release CPackConfig.cmake
9. To install
- On Windows, execute:
+ On Windows (with WiX installed), execute:
HDF5-1.8."X"-win32.msi or HDF5-1.8."X"-win64.msi
By default this program will install the hdf5 library into the
"C:\Program Files" directory and will create the following
@@ -249,7 +276,7 @@ IV. Further considerations
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8."X" product requires a minimum CMake version 3.2.2.
+ web site. The HDF5 1.8."X" product requires a minimum CMake version 3.12.
2. If you plan to use Zlib or Szip:
A. Download the binary packages and install them in a central location.
@@ -257,9 +284,14 @@ IV. Further considerations
packages there. Add the following CMake options:
-DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib
-DZLIB_INCLUDE_DIR:PATH=some_location/include
+ -DZLIB_USE_EXTERNAL:BOOL=OFF
-DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib
-DSZIP_INCLUDE_DIR:PATH=some_location/include
+ -DSZIP_USE_EXTERNAL:BOOL=OFF
where "some_location" is the full path to the extlibs folder.
+ Also the appropriate environment variable must be set;
+ set(ENV{ZLIB_ROOT} "some_location")
+ set(ENV{SZIP_ROOT} "some_location")
B. Use source packages from an GIT server by adding the following CMake
options:
@@ -277,9 +309,28 @@ IV. Further considerations
TGZPATH:STRING="some_location"
where "some_location" is the URL or full path to the compressed
file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
- to the configuration type during configuration
+ to the configuration type during configuration. See the settings in the
+ config/cmake/cacheinit.cmake file HDF uses for testing.
+
+ 3. If you plan to use compression plugins:
+ A. Use source packages from an GIT server by adding the following CMake
+ options:
+ HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT"
+ PLUGIN_GIT_URL:STRING="http://some_location/plugins"
+ where "some_location" is the URL to the GIT repository. Also set
+ CMAKE_BUILD_TYPE to the configuration type.
- 3. If you are building on Apple Darwin platforms, you should add the
+ B. Use source packages from a compressed file by adding the following
+ CMake options:
+ HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
+ PLUGIN_TGZ_NAME:STRING="plugin_src.ext"
+ TGZPATH:STRING="some_location"
+ where "some_location" is the URL or full path to the compressed
+ file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
+ to the configuration type during configuration. See the settings in the
+ config/cmake/cacheinit.cmake file HDF uses for testing.
+
+ 4. If you are building on Apple Darwin platforms, you should add the
following options:
Compiler choice - use xcode by setting the ENV variables of CC and CXX
Shared fortran is not supported, build static:
@@ -289,11 +340,11 @@ IV. Further considerations
CTEST_USE_LAUNCHERS:BOOL=ON
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
- 4. Windows developers should install NSIS or WiX to create an install image with CPack.
+ 5. Windows developers should install NSIS or WiX to create an install image with CPack.
Visual Studio Express users will not be able to package HDF5 into
an install image executable.
- 5. Developers can copy the config/cmake/cacheinit.cmake file and alter the
+ 6. Developers can copy the config/cmake/cacheinit.cmake file and alter the
the settings for the developers' environment. Then the only options needed
on the command line are those options that are different. Example using HDF
default cache file:
@@ -301,6 +352,34 @@ IV. Further considerations
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
+ 7. CMake uses a toolchain of utilities to compile, link libraries and
+ create archives, and other tasks to drive the build. The toolchain
+ utilities available are determined by the languages enabled. In normal
+ builds, CMake automatically determines the toolchain for host builds
+ based on system introspection and defaults. In cross-compiling
+ scenarios, a toolchain file may be specified with information about
+ compiler and utility paths.
+ Variables and Properties
+ Several variables relate to the language components of a toolchain which
+ are enabled. CMAKE_<LANG>_COMPILER is the full path to the compiler used
+ for <LANG>. CMAKE_<LANG>_COMPILER_ID is the identifier used by CMake for
+ the compiler and CMAKE_<LANG>_COMPILER_VERSION is the version of the compiler.
+
+ The CMAKE_<LANG>_FLAGS variables and the configuration-specific equivalents
+ contain flags that will be added to the compile command when compiling a
+ file of a particular language.
+
+ As the linker is invoked by the compiler driver, CMake needs a way to
+ determine which compiler to use to invoke the linker. This is calculated
+ by the LANGUAGE of source files in the target, and in the case of static
+ libraries, the language of the dependent libraries. The choice CMake makes
+ may be overridden with the LINKER_LANGUAGE target property.
+
+ See the CMake help for more information on using toolchain files.
+
+ To use a toolchain file with the supplied cmake scripts, see the
+ HDF5options.cmake file under the toolchain section.
+
Notes: CMake and HDF5
1. Using CMake for building and using HDF5 is under active development.
@@ -314,9 +393,21 @@ Notes: CMake and HDF5
how CMake support can be improved on any system. Visit the
KitWare site for more information about CMake.
- 3. Build and test results can be submitted to our CDash server,
- please read the HDF and CDash document at:
- www.hdfgroup.org/CDash/HowToSubmit.
+ 3. Build and test results can be submitted to our CDash server:
+ The CDash server for community submissions of hdf5 is at
+ https://cdash.hdfgroup.org.
+
+ Submitters are requested to register their name and contact info and
+ maintain their test sites. After your first submission, login and go
+ to your "My CDash" link and claim your site.
+
+ We ask that all submissions include the configuration information and
+ contact information in the CTest Notes Files upload step. See the
+ current reports on CDash for examples.
+
+ Please follow the convention that "NIGHTLY" submissions maintain the same
+ configuration every time. "EXPERIMENTAL" submissions can be expected to
+ be different for each submission.
4. See the appendix at the bottom of this file for examples of using
a ctest script for building and testing. Using a ctest script is
@@ -376,12 +467,11 @@ These five steps are described in detail below.
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
- * Visual Studio 11 2012
- * Visual Studio 11 2012 Win64
- * Visual Studio 12 2013
- * Visual Studio 12 2013 Win64
* Visual Studio 14 2015
* Visual Studio 14 2015 Win64
+ * Visual Studio 15 2017
+ * Visual Studio 15 2017 Win64
+ * Visual Studio 16 2019
<options> is:
* SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
@@ -408,14 +498,98 @@ These five steps are described in detail below.
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+ set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
+ set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+ set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+ #######################
+ # filter plugin options
+ #######################
+ set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+ set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
+ ############
+ # bitshuffle
+ ###########
+ set (BSHUF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
+ set (BSHUF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (BSHUF_TGZ_NAME "bitshuffle.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
+ set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
+ #######
+ # blosc
+ #######
+ set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github" FORCE)
+ set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
+ set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE)
+ set (ZLIB_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/zlib.git" CACHE STRING "Use ZLIB from HDF repo" FORCE)
+ set (ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+ #######
+ # bzip2
+ ######
+ #
+ set (BZ2_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bzip2.git" CACHE STRING "Use BZ2 from HDF repository" FORCE)
+ set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (BZ2_TGZ_NAME "BZ2.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
+ set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
+ #######
+ # fpzip
+ #######
+ set (FPZIP_GIT_URL "https://https://github.com/LLNL/fpzip" CACHE STRING "Use FPZIP from github repository" FORCE)
+ set (FPZIP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
+ set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
+ ######
+ # jpeg
+ ######
+ set (JPEG_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/jpeg.git" CACHE STRING "Use JPEG from HDF repository" FORCE)
+ set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE)
+ #set (JPEG_TGZ_NAME "JPEG9c.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+ set (JPEG_TGZ_NAME "JPEG.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+ set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
+ ######
+ # lz4
+ ######
+ set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE)
+ set (LZ4_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lz4.git" CACHE STRING "Use LZ4 from HDF repository" FORCE)
+ set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
+ set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
+ ######
+ # lzf
+ ######
+ set (LZF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lzf.git" CACHE STRING "Use LZF from HDF repository" FORCE)
+ set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
+ set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
+ ########
+ # mafisc
+ ########
+ #set (BUILD_MAFISC_LIBRARY_SOURCE OFF CACHE BOOL "build the mafisc library within the plugin" FORCE)
+ #set (MAFISC_PACKAGE_NAME "mafisc" CACHE STRING "Name of MAFISC package" FORCE)
+ ######
+ # szf
+ ######
+ set (SZF_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE)
+ set (SZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (SZF_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE)
+ set (SZF_PACKAGE_NAME "szf" CACHE STRING "Name of SZ package" FORCE)
+ ######
+ # zfp
+ ######
+ set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from Github" FORCE)
+ set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
+ set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
+
2. Configure the cache settings
2.1 Visual CMake users, click the Configure button. If this is the first time you are
running cmake-gui in this directory, you will be prompted for the
- generator you wish to use (for example on Windows, Visual Studio 11).
+ generator you wish to use (for example on Windows, Visual Studio 12).
CMake will read in the CMakeLists.txt files from the source directory and
display options for the HDF5 project. After the first configure you
can adjust the cache settings and/or specify the locations of other programs.
@@ -461,8 +635,8 @@ These five steps are described in detail below.
file in your build directory. Be sure to select either Debug or
Release and build the solution.
- 3.2.1 The external libraries (zlib and szip) can be configured
- to allow building the libraries by downloading from an GIT repository.
+ 3.2.1 The external libraries (zlib, szip and plugins) can be configured
+ to allow building the libraries by downloading from a GIT repository.
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following
configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT"
@@ -470,25 +644,32 @@ These five steps are described in detail below.
The options to control the GIT URL (config/cmake/cacheinit.cmake file) are:
ZLIB_GIT_URL:STRING="http://${git_url}/zlib"
SZIP_GIT_URL:STRING="http://${git_url}/szip"
+ PLUGIN_GIT_URL:STRING="http://${git_url}/plugin"
${git_url} should be changed to your location. Also define CMAKE_BUILD_TYPE
to be the configuration type.
- 3.2.2 Or the external libraries (zlib and szip) can be configured
+ 3.2.2 Or the external libraries (zlib, szip and plugins) can be configured
to allow building the libraries by using a compressed file.
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT' and is enabled by
adding the following configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
- The options to control the SVN URL (config/cmake/cacheinit.cmake
+ The options to control the TGZ URL (config/cmake/cacheinit.cmake
file) are:
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
+ LIBAEC_TGZ_NAME:STRING="libaec_src.ext"
+ PLUGIN_TGZ_NAME:STRING="plugin_src.ext"
TGZPATH:STRING="some_location"
where "some_location/xxxx_src.ext" is the URL or full path to
the compressed file and where ext is the type of the compression
file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
CMAKE_BUILD_TYPE to be the configuration type.
+ NOTE: the USE_LIBAEC option will use the file named by LIBAEC_TGZ_NAME
+ to build SZIP instead of the file named by SZIP_TGZ_NAME. This option
+ is also used to account for the different headers and library names.
+
4. Test HDF5
To test the build, navigate to your build directory and execute:
@@ -548,6 +729,7 @@ The config/cmake/cacheinit.cmake file can override the following values.
---------------- General Build Options ---------------------
BUILD_SHARED_LIBS "Build Shared Libraries" ON
+BUILD_STATIC_LIBS "Build Static Libraries" ON
BUILD_STATIC_EXECS "Build Static Executables" OFF
BUILD_TESTING "Build HDF5 Unit Testing" ON
@@ -561,7 +743,9 @@ if (HDF5_BUILD_FORTRAN)
HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON
---------------- HDF5 Advanced Options ---------------------
+ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF
ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF
+HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." ""
HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF
HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON
@@ -586,33 +770,66 @@ HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries"
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
-HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
+DEFAULT_API_VERSION "Enable default API (v16, v18)" "v18"
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF
+HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF
+HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF
if (APPLE)
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
if (CMAKE_BUILD_TYPE MATCHES Debug)
HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF
if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
+if (HDF5_BUILD_FORTRAN)
+ HDF5_INSTALL_MOD_FORTRAN "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" "XX"
+ if (BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) default HDF5_INSTALL_MOD_FORTRAN is SHARED
+ if (BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) default HDF5_INSTALL_MOD_FORTRAN is SHARED
+ if (NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) default HDF5_INSTALL_MOD_FORTRAN is STATIC
+ if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) default HDF5_INSTALL_MOD_FORTRAN is SHARED
+HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF
+HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF
+HDF5_ENABLE_FORMATTERS "format source files" OFF
---------------- External Library Options ---------------------
-HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO"
-HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
-HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
-ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
-SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
+HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO"
+HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF
+HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
+HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
+PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS" 0
+ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
+SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
if (HDF5_ENABLE_SZIP_SUPPORT)
- HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
+ HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
+ USE_LIBAEC "Use libaec szip replacement" OFF
if (WINDOWS)
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
else ()
H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
endif ()
+NOTE:
+ The BUILD_STATIC_EXECS ("Build Static Executables") option is only valid
+ on some unix operating systems. It adds the "-static" flag to cflags. This
+ flag is not available on windows and some modern linux systems will
+ ignore the flag.
+
+ ---------------- Unsupported Library Options ---------------------
+ The threadsafe and C++ interfaces are not compatible
+ with the HDF5_ENABLE_PARALLEL option.
+ Unless ALLOW_UNSUPPORTED has been specified,
+ the following options must be disabled:
+ HDF5_ENABLE_THREADSAFE, HDF5_BUILD_CPP_LIB
+
+ The high-level, C++ and Fortran interfaces are not compatible
+ with the HDF5_ENABLE_THREADSAFE option because the lock is not hoisted
+ into the higher-level API calls.
+ Unless ALLOW_UNSUPPORTED has been specified,
+ the following options must be disabled:
+ HDF5_BUILD_HL_LIB, HDF5_BUILD_CPP_LIB, HDF5_BUILD_FORTRAN
========================================================================
@@ -628,326 +845,29 @@ Copy the contents of the file, both macro and option, into the
UserMacros.cmake file. Then enable the option to the CMake configuration,
build and test process.
+
========================================================================
-VIII. Options for Platform Configuration Files
+VIII. User Defined Compile Flags for HDF5 Libraries with CMake
========================================================================
-Below is the HDF518config.cmake and HDF5options.cmake ctest scripts.
-Execute:
- ctest -S HDF518config.cmake,BUILD_GENERATOR=xxx -C Release -VV -O hdf518.log
-The same scripts can be used on Linux, Mac OSX or a Windows machine by
-adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
-
-
-#############################################################################################
-### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
-### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ###
-### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf518.log ###
-#############################################################################################
-
-cmake_minimum_required (VERSION 3.10)
-############################################################################
-# Usage:
-# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
-# where valid options for OPTION are:
-# BUILD_GENERATOR - The cmake build generator:
-# Unix * Unix Makefiles
-# VS2017 * Visual Studio 15 2017
-# VS201764 * Visual Studio 15 2017 Win64
-# VS2015 * Visual Studio 14 2015
-# VS201564 * Visual Studio 14 2015 Win64
-# VS2013 * Visual Studio 12 2013
-# VS201364 * Visual Studio 12 2013 Win64
-#
-# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
-# CTEST_SOURCE_NAME - source folder
-# STATIC_ONLY - Build/use static libraries
-# FORTRAN_LIBRARIES - Build/use fortran libraries
-# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
-##############################################################################
-
-set(CTEST_SOURCE_VERSION 1.8.19)
-set(CTEST_SOURCE_VERSEXT "")
-
-##############################################################################
-# handle input parameters to script.
-#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8
-#STATIC_ONLY - Default is YES
-#FORTRAN_LIBRARIES - Default is NO
-#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
-if (DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach (current_var ${script_args})
- if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif ()
- endforeach ()
-endif ()
-
-# build generator must be defined
-if (NOT DEFINED BUILD_GENERATOR)
- message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
-endif ()
-
-###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
-###################################################################
-
-if (NOT DEFINED INSTALLDIR)
- if (WIN32)
- set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- else ()
- set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- endif ()
-endif ()
-if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set (CTEST_CONFIGURATION_TYPE "Release")
-endif ()
-if (NOT DEFINED CTEST_SOURCE_NAME)
- set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
-endif ()
-if (NOT DEFINED STATIC_ONLY)
- set (STATICONLYLIBRARIES "YES")
-else ()
- set (STATICONLYLIBRARIES "NO")
-endif ()
-if (NOT DEFINED FORTRAN_LIBRARIES)
- set (FORTRANLIBRARIES "NO")
-else ()
- set(FORTRANLIBRARIES "YES")
-endif ()
-
-set (CTEST_BINARY_NAME "build")
-set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
-if (WIN32)
- set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else ()
- set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif ()
-
-###################################################################
-######### Following describes compiler ############
-if (WIN32)
- set (SITE_OS_NAME "Windows")
- set (SITE_OS_VERSION "WIN7")
- if (${BUILD_GENERATOR} STREQUAL "VS201764")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2017")
- set (SITE_COMPILER_VERSION "15")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2017")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2017")
- set (SITE_COMPILER_VERSION "15")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201564")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2015")
- set (SITE_COMPILER_VERSION "14")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2015")
- set (SITE_COMPILER_VERSION "14")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2013")
- set (SITE_COMPILER_VERSION "12")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2013")
- set (SITE_COMPILER_VERSION "12")
- elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
- set (SITE_OS_BITS "64")
- set (SITE_COMPILER_NAME "vs2012")
- set (SITE_COMPILER_VERSION "11")
- elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
- set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
- set (SITE_OS_BITS "32")
- set (SITE_COMPILER_NAME "vs2012")
- set (SITE_COMPILER_VERSION "11")
- else ()
- message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
- endif ()
-## Set the following to unique id your computer ##
- set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
-else ()
- set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
-## Set the following to unique id your computer ##
- if (APPLE)
- set (CTEST_SITE "MAC.XXXX")
- else ()
- set (CTEST_SITE "LINUX.XXXX")
- endif ()
- if (APPLE)
- execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set (ENV{CC} "${XCODE_CC}")
- set (ENV{CXX} "${XCODE_CXX}")
- set (CTEST_USE_LAUNCHERS 1)
- set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
- set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
- set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
- set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
- set (RR_FLAGS_C "${RR_FLAGS_COMMON}")
- set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
- set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
- set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
- endif ()
-endif ()
-###################################################################
-
-###################################################################
-######### Following is for submission to CDash ############
-###################################################################
-set (MODEL "Experimental")
-###################################################################
-
-###################################################################
-##### Following controls CDash submission #####
-#set (LOCAL_SUBMIT "TRUE")
-##### Following controls test process #####
-#set (LOCAL_SKIP_TEST "TRUE")
-#set (LOCAL_MEMCHECK_TEST "TRUE")
-#set (LOCAL_COVERAGE_TEST "TRUE")
-##### Following controls cpack command #####
-#set (LOCAL_NO_PACKAGE "TRUE")
-##### Following controls source update #####
-#set (LOCAL_UPDATE "TRUE")
-set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
-set (REPOSITORY_BRANCH "hdf5_1_8")
-
-#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set (CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
-###################################################################
-
-###################################################################
-if (${STATICONLYLIBRARIES})
- set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- ######### Following describes computer ############
- ## following is optional to describe build ##
- set (SITE_BUILDNAME_SUFFIX "STATIC")
-endif ()
-###################################################################
-#### fortran ####
-if (${FORTRANLIBRARIES})
- set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
- ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-else ()
- set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
-endif ()
-
-### change install prefix
-set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
-set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
-
-###################################################################
-
-if (WIN32)
- set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
- include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
- include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
- file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
-else ()
- set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
- include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
- include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
- if (APPLE)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- else ()
- if (CYGWIN)
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- else ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
- file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif ()
- endif ()
- endif ()
-endif ()
-
-HDF5options.cmake:
-#############################################################################################
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
-#############################################################################################
-
-### uncomment/comment and change the following lines for other configuration options
-
-#############################################################################################
-#### alternate toolsets ####
-#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
-
-#############################################################################################
-#### ext libraries ####
-
-### ext libs from tgz
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
-### ext libs from git
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
-### ext libs on system
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
-
-### disable ext zlib building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
-### disable ext szip building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
-
-#############################################################################################
-### disable test program builds
-
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+Custom compiler flags can be added by defining the CMAKE_C_FLAGS and
+CMAKE_CXX_FLAGS variables.
+Using a cmake script:
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
+Defined on the configure line:
+ cmake -G "Visual Studio 12 2013" -DCMAKE_C_FLAGS:STRING=-O2 ..
-#############################################################################################
-### disable packaging
+Debug symbols are enabled with configuration selections Debug or RelWithDebInfo.
+The difference between Debug and RelWithDebInfo configurations is that
+RelWithDebInfo optimizes the code similar to Release. It produces fully optimized
+code, but also creates the symbol table and the debug metadata to give the
+debugger input to map the execution back to the original code.
+RelwithDebInfo configuration should not affect the performance when the code
+is run without a debugger attached.
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
-### Create install package with external libraries (szip, zlib)
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+The HDF5_ENABLE_COVERAGE option will add "-g -O0 -fprofile-arcs -ftest-coverage"
+to CMAKE_C_FLAGS.
-#############################################################################################
========================================================================
For further assistance, send email to help@hdfgroup.org
diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt
index 5ebb503..41762ec 100644
--- a/release_docs/INSTALL_Cygwin.txt
+++ b/release_docs/INSTALL_Cygwin.txt
@@ -2,8 +2,8 @@
HDF5 Build and Install Instructions for Cygwin
************************************************************************
-This document is a instruction on how to build, test and install HDF5 libary on
-Cygwin. See detailed information in hdf5/INSTALL.
+This document is a instruction on how to build, test and install HDF5 libary on
+Cygwin. See detailed information in hdf5/INSTALL.
NOTE: hdf5 can be built with CMake, see the INSTALL_CMake.txt file for more guidance.
@@ -12,16 +12,16 @@ Preconditions:
1. Installed Cygwin 1.7.25 or higher
- To install the Cygwin net release, go to http://www.cygwin.com and
+ To install the Cygwin net release, go to http://www.cygwin.com and
click on "setup-x86.exe" (32-bit installation) under the heading
- "Current Cygwin DLL version". This will download a GUI
- installer called setup-x86.exe which can be run to download a complete
- Cygwin installation via the internet. Then follow the instructions
+ "Current Cygwin DLL version". This will download a GUI
+ installer called setup-x86.exe which can be run to download a complete
+ Cygwin installation via the internet. Then follow the instructions
on each screen to install Cygwin.
- Cygwin uses packages to manage installing various software. Users can
+ Cygwin uses packages to manage installing various software. Users can
choose to install or uninstall certain packages by running setup.exe.
- http://www.cygwin.com/packages/ provides detailed information about
+ http://www.cygwin.com/packages/ provides detailed information about
Cygwin packages.
Most required dependencies can be satisfied by installing all packages in
@@ -31,32 +31,32 @@ Preconditions:
2. Compilers, Libraries and Utilities Installed
2.1 Compilers Supported
-
+
The following compilers are supported by HDF5 and included in the Cygwin
package system:
gcc (4.7.3 and 4.9.2), which includes:
gcc4-core : C compiler
gcc4-g++ : C++ compiler
gcc4-fortran : fortran compiler
-
+
2.1.1 Using Compilers Not Supported
-
+
By default the current configuration uses vendor compilers; to use
another compiler run the following commands before running
- configure:
-
+ configure:
+
setenv CC "foo -flags"
setenv FC "fffoo -flags"
- For example, if users want to use pgf90 as fortran compiler, then
+ For example, if users want to use pgf90 as fortran compiler, then
setenv FC pgf90
See the configure help page (configure --help) for a list of
environment variables that have an affect on building the
library.
-
+
2.2 HDF5 External Library Dependencies
2.2.1 Zlib
@@ -66,38 +66,38 @@ Preconditions:
2.2.2 Szip
The HDF5 library has a predefined compression filter that uses
the extended-Rice lossless compression algorithm for chunked
- datatsets. For more information on Szip compression, license terms,
+ datatsets. For more information on Szip compression, license terms,
and obtaining the Szip source code, see:
https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products
-
-
+
+
2.3 Additional Utilities
-
+
The following standard utilities are also required to build and test HDF5:
-
+
bison : yacc implementation
flex : flex utility
make : make utility
-
+
2.4 Alternate Build Process
-
- Download the CMake package and follow the notes in the "INSTALL_CMake.txt"
+
+ Download the CMake package and follow the notes in the "INSTALL_CMake.txt"
file to build HDF5 with the CMake utilities.
-
-
-
+
+
+
Build, Test and Install HDF5 on Cygwin
--------------------------------------
1. Get HDF5 source code package
Users can download HDF5 source code package from HDF website
- (http://hdfgroup.org).
-
+ (http://hdfgroup.org).
+
2. Unpacking the distribution
The HDF5 source code is distributed in a variety of formats which
- can be unpacked with the following commands, each of which creates
+ can be unpacked with the following commands, each of which creates
an `hdf5-1.8.x' directory.
2.1 Non-compressed tar archive (*.tar)
@@ -110,118 +110,118 @@ Build, Test and Install HDF5 on Cygwin
2.3 Bzip'd tar archive (*.tar.bz2)
- $ bunzip2 < hdf5-1.8.x.tar.bz2 | tar xf -
+ $ bunzip2 < hdf5-1.8.x.tar.bz2 | tar xf -
2. Setup Environment
In Cygwin, most compilers and setting are automatically detected during
- the configure script. However, if you are building Fortran we recommend
- that you explicitly set the "FC" variable in your environment to use the
+ the configure script. However, if you are building Fortran we recommend
+ that you explicitly set the "FC" variable in your environment to use the
gfortran compiler. For example, issue the command:
-
+
$ export FC=gfortran
-
-4. Configuring
-
- Notes: See detailed information in hdf5/release_docs/INSTALL,
- part 5. Full installation instructions for source
+
+4. Configuring
+
+ Notes: See detailed information in hdf5/release_docs/INSTALL,
+ part 5. Full installation instructions for source
distributions
- The host configuration file for cygwin i686-pc-cygwin is located
- in the `config' directory and are based on architecture name,
- vendor name, and operating system which are displayed near the
+ The host configuration file for cygwin i686-pc-cygwin is located
+ in the `config' directory and are based on architecture name,
+ vendor name, and operating system which are displayed near the
beginning of the `configure' output. The host config file influences
- the behavior of configure by setting or augmenting shell variables.
-
+ the behavior of configure by setting or augmenting shell variables.
+
In short,
To configure HDF5 C Library, using
$ ./configure
-
+
To configure HDF5 C/C++ Library, using
$ ./configure --enable-cxx
-
+
To configure HDF5 C/Fortran Library, using
$ ./configure --enable-fortran
-
+
To configure HDF5 C with Szip library, using
$ ./configure --with-szlib="path to szlib"
-
- For example, if szip library was installed in the directory
+
+ For example, if szip library was installed in the directory
/cygdrive/c/szip, which is parent directory of "include" and
- "lib", then the following command will configure HDF5 C library
+ "lib", then the following command will configure HDF5 C library
with szip enabled:
-
+
$ ./configure --with-szlib=/cygdrive/c/szip
-
+
To configure HDF5 C without Zlib,
-
+
To disable zlib, using
$ ./configure --without-zlib
-
+
Two ways to configure HDF5 C with specified Zlib
-
+
Using
$ ./configure --with-zlib=INCDIR,LIBDIR
For example, if the zlib library is installed in
/cygdrive/c/usr, which is the parent directory of directories
- "include" and "lib",
+ "include" and "lib",
$ ./configure --with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
Through the CPPFLAGS and LDFLAGS Variables
-
- For example, if zlib was installed in the directory
- /cygdrive/c/usr then using the following command to configure
+
+ For example, if zlib was installed in the directory
+ /cygdrive/c/usr then using the following command to configure
HDF5 with zib
$ CPPFLAGS=-I/cygdrive/c/usr/include \
$ LDFLAGS=-L/cygdrive/c/usr/lib \
$ ./configure
- To specify the installation directories, using
+ To specify the installation directories, using
$ ./configure --prefix="path for installation"
-
- By default, HDF5 library, header files, examples, and
+
+ By default, HDF5 library, header files, examples, and
support programs will be installed in /usr/local/lib,
/usr/local/include, /usr/local/doc/hdf5/examples, and
- /usr/local/bin. To use a path other than /usr/local specify
+ /usr/local/bin. To use a path other than /usr/local specify
the path with the `--prefix=PATH' switch as in the above
command.
- Combination of Switches
+ Combination of Switches
- All of the above switches can be combined together. For
- example, if users want to configure HDF5 C/C++/Fortran
- library with szip library enabled, with zlib library at
- /cygdrive/c/usr/, and install HDF5 into directory
+ All of the above switches can be combined together. For
+ example, if users want to configure HDF5 C/C++/Fortran
+ library with szip library enabled, with zlib library at
+ /cygdrive/c/usr/, and install HDF5 into directory
/cygdrive/c/hdf5 using gcc/g++ as C/C++ compiler and gfortran
as fortran compiler
-
+
$ ./configure
--with-szlib=/cygdrive/c/szip
--with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib
--prefix=/cygdrive/c/hdf5
--enable-cxx
- --enable-fortran
+ --enable-fortran
<"If no more switches, then hit Enter">
Notes: The command format above is for readilibity. In practice,
please type in the command above with at least one
- space between each line, No "Enter" until users finish
- the switches and want to run the configure.
+ space between each line, No "Enter" until users finish
+ the switches and want to run the configure.
+
-
or do it through CPPFLAGS and LDFLAGS variables:
-
+
$ CPPFLAGS=-I/cygdrive/c/usr/include \
$ LDFLAGS=-L/cygdrive/c/usr/lib \
@@ -229,32 +229,32 @@ Build, Test and Install HDF5 on Cygwin
--with-szlib=/cygdrive/c/szip
--prefix=/cygdrive/c/hdf5
--enable-cxx
- --enable-fortran
+ --enable-fortran
<"If no more switches, then hit Enter">
-
+
5. Make and Make Check
After configuration is done successfully, run the following series of
commands to build, test and install HDF5
-
+
$ make > "output file name"
$ make check > "output file name"
-
+
Before run "make install", check output file for "make check", there
should be no failures at all.
6. Make Install
$ make install > "output file name"
-
-
+
+
7. Check installed HDF5 library
- After step 6, go to your installation directory, there should be
+ After step 6, go to your installation directory, there should be
three subdirectories: "bin" "include" and "lib".
-8. Known Problems
-
+8. Known Problems
+
dt_arith tests may fail due to the use of fork. This is a known issue
with cygwin on Windows.
diff --git a/release_docs/INSTALL_Warnings.txt b/release_docs/INSTALL_Warnings.txt
new file mode 100644
index 0000000..5fde45f
--- /dev/null
+++ b/release_docs/INSTALL_Warnings.txt
@@ -0,0 +1,474 @@
+***********************************************************************
+* COMPILER WARNINGS OPTIONS
+***********************************************************************
+
+ Table of Contents
+
+Section I: Managing Warnings
+Section II: Default Warnings
+Section III: All Warnings
+Section IV: Group 0 Warnings
+Section V: Group 1 Warnings
+Section VI: Group 2 Warnings
+Section VII: Group 3 Warnings
+Section VIII: Group 4 Warnings
+Section IX: Disable Warnings
+
+************************************************************************
+
+
+========================================================================
+I. Managing Warnings
+========================================================================
+Compiler warnings are managed by setting the compiler flags variables.
+
+Autotools uses the H5_CFLAGS and H5_CXXFLAGS, both variables set the flags nearly
+ identical, along with H5_FCFLAGS for Fortran. Autotools uses the type
+ and version of the compiler to determine which warning flags are used.
+ However, there is an option, enable-developer-warnings, to enable extra
+ flags for developers.
+
+CMake uses the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, both sets are nearly
+ identical, along with CMAKE_Fortran_FLAGS for Fortran. CMake has a
+ minimum set of flags for GNU type compilers and for MSVC compilers. In
+ addition, CMake breaks the list of flags into groups. The groups for
+ GNU are roughly associated with the version of the compiler, while
+ the MSVC groups are associated with the warning levels for the
+ Microsoft compilers. The CMake option for enabling extra developer
+ warnings is HDF5_ENABLE_DEV_WARNINGS.
+
+Custom settings can be used by setting;
+ Environment variables H5_CFLAGS and H5_CXXFLAGS for Autotools
+ CMake defines CMAKE_C_FLAGS and CMAKE_CXX_FLAGS for CMake
+
+
+========================================================================
+II. Default Warnings
+========================================================================
+
+--------------------------------------------------
+Autotools UNIX warnings added to H5_CFLAGS
+--------------------------------------------------
+ -std=c99
+
+ the following warning switches should not raise warnings by the current code
+ -pedantic
+ -Wall
+ -Wextra
+ -Wbad-function-cast
+ -Wc++-compat
+ -Wcast-align
+ -Wcast-qual
+ -Wconversion
+ -Wdeclaration-after-statement
+ -Wdisabled-optimization
+ -Wfloat-equal
+ -Wformat=2
+ -Winit-self
+ -Winvalid-pch
+ -Wmissing-declarations
+ -Wmissing-include-dirs
+ -Wmissing-prototypes
+ -Wnested-externs
+ -Wold-style-definition
+ -Wpacked
+ -Wpointer-arith
+ -Wredundant-decls
+ -Wshadow
+ -Wstrict-prototypes
+ -Wswitch-default
+ -Wswitch-enum
+ -Wundef
+ -Wunused-macros
+ -Wunsafe-loop-optimizations
+ -Wwrite-strings
+
+ enable-developer-warnings=ON
+ -Winline
+ -Waggregate-return
+ -Wmissing-format-attribute
+ -Wmissing-noreturn
+ enable-developer-warnings=OFF
+ -Wno-inline
+ -Wno-aggregate-return
+ -Wno-missing-format-attribute
+ -Wno-missing-noreturn
+
+IF GCC <= 4.3
+ -Wno-long-long
+ -Wvolatile-register-var
+ -Wstrict-overflow
+
+IF GCC <= 4.4
+ -Wno-long-long
+ -Wvolatile-register-var
+ -Wstrict-overflow
+ -Wlogical-op
+ -Wvla
+
+IF GCC <= 4.5
+ -Wno-long-long
+ -Wvolatile-register-var
+ -Wstrict-overflow
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+
+IF GCC <= 4.6
+ -Wno-long-long
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-aliasing
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+
+IF GCC <= 4.7
+ -Wno-long-long
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-aliasing
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+ -Wdouble-promotion
+ -Wtrampolines
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+
+IF GCC <= 4.8
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+ -Wdouble-promotion
+ -Wtrampolines
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+
+IF GCC <= 4.9
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wdouble-promotion
+ -Wtrampolines
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ -Wsuggest-attribute=format
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+ -Wno-suggest-attribute=format
+
+IF GCC < 5
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+ -Wdouble-promotion
+ -Wtrampolines
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ -Wdate-time
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ -Wsuggest-attribute=format
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+ -Wno-suggest-attribute=format
+
+IF GCC < 6
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+ -Wdouble-promotion
+ -Wtrampolines
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ -Wdate-time
+ -Warray-bounds=2
+ -Wc99-c11-compat
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ -Wsuggest-attribute=format
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+ -Wno-suggest-attribute=format
+
+IF GCC < 7
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+ -Wdouble-promotion
+ -Wtrampolines
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ -Wdate-time
+ -Warray-bounds=2
+ -Wc99-c11-compat
+ -Wnull-dereference
+ -Wunused-const-variable
+ -Wduplicated-cond -Whsa
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ -Wsuggest-attribute=format
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+ -Wno-suggest-attribute=format
+
+
+--------------------------------------------
+CMake warnings added to CMAKE_C_FLAGS
+--------------------------------------------
+
+IF GNU GCC
+ -pedantic
+ -Wall
+ -Wextra
+ -Wbad-function-cast
+ -Wc++-compat
+ -Wcast-align
+ -Wcast-qual
+ -Wconversion
+ -Wdeclaration-after-statement
+ -Wdisabled-optimization
+ -Wfloat-equal
+ -Wformat=2
+ -Winit-self
+ -Winvalid-pch
+ -Wmissing-declarations
+ -Wmissing-include-dirs
+ -Wmissing-prototypes
+ -Wnested-externs
+ -Wold-style-definition
+ -Wpacked
+ -Wpointer-arith
+ -Wredundant-decls
+ -Wshadow
+ -Wstrict-prototypes
+ -Wswitch-default
+ -Wswitch-enum
+ -Wundef
+ -Wunused-macros
+ -Wunsafe-loop-optimizations
+ -Wwrite-strings
+
+ -fmessage-length=0
+ HDF5_ENABLE_DEV_WARNINGS=ON
+ -Winline
+ -Waggregate-return
+ HDF5_ENABLE_DEV_WARNINGS=OFF
+ -Wno-unused-parameter
+ -Wno-inline
+ -Wno-aggregate-return
+
+
+========================================================================
+III. All Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_DEV_WARNINGS:BOOL=OFF
+ For Visual Studio:
+ /W3
+
+HDF5_ENABLE_ALL_WARNINGS:BOOL=ON
+ For Visual Studio:
+ /Wall
+ /wd4668
+
+ For GNU GCC
+ Group 0 flags
+ Group 1 flags
+ Group 2 flags
+
+
+========================================================================
+IV. Group 0 Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_GROUPZERO_WARNINGS:BOOL=OFF
+
+HDF5_ENABLE_GROUPZERO_WARNINGS:BOOL=ON
+ For Visual Studio
+ /W1
+
+ For GNU GCC
+ Default Warnings
+
+
+========================================================================
+V. Group 1 Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_GROUPONE_WARNINGS:BOOL=OFF
+
+HDF5_ENABLE_GROUPONE_WARNINGS:BOOL=ON
+ For Visual Studio
+ /W2
+
+ For GNU GCC
+ IF GCC >= 4.3
+ -Wlogical-op
+ -Wvla
+ -Wlarger-than=2048
+ IF GCC >= 4.4
+ -Wsync-nand
+ -Wframe-larger-than=16384
+ -Wpacked-bitfield-compat
+ IF GCC >= 4.5
+ -Wstrict-overflow=5
+ -Wjump-misses-init
+ -Wunsuffixed-float-constants
+
+
+========================================================================
+VI. Group 2 Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_GROUPTWO_WARNINGS:BOOL=OFF
+
+HDF5_ENABLE_GROUPTWO_WARNINGS:BOOL=ON
+ For Visual Studio
+ /W3
+
+ For GNU GCC
+ IF GCC >= 4.6
+ -Wdouble-promotion
+ -Wtrampolines
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=const
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=const
+ IF GCC >= 4.7
+ -Wstack-usage=8192
+ -Wvector-operation-performance
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=pure
+ -Wsuggest-attribute=noreturn
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=pure
+ -Wno-suggest-attribute=noreturn
+ IF GCC >= 4.8
+ enable-developer-warnings=ON:
+ -Wsuggest-attribute=format
+ enable-developer-warnings=OFF:
+ -Wno-suggest-attribute=format
+ IF GCC >= 4.8
+ -Wdate-time
+
+
+========================================================================
+VII. Group 3 Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_GROUPTHREE_WARNINGS:BOOL=OFF
+
+HDF5_ENABLE_GROUPTHREE_WARNINGS:BOOL=ON
+ For Visual Studio
+ /W4
+
+ For GNU GCC
+ IF GCC >= 5.1
+ -Warray-bounds=2
+ -Wc99-c11-compat
+
+
+========================================================================
+VIII. Group 4 Warnings in CMake
+========================================================================
+
+Default: HDF5_ENABLE_GROUPFOUR_WARNINGS:BOOL=OFF
+
+HDF5_ENABLE_GROUPFOUR_WARNINGS:BOOL=ON
+ For GNU GCC
+ IF GCC >= 6.0
+ -Wnull-dereference
+ -Wunused-const-variable
+ -Wduplicated-cond
+ -Whsa
+
+
+========================================================================
+IX. Disable Warnings in CMake
+========================================================================
+
+Default: HDF5_DISABLE_COMPILER_WARNINGS:BOOL=OFF
+
+HDF5_DISABLE_COMPILER_WARNINGS:BOOL=ON
+ For Visual Studio
+ HDF5_WARNINGS_BLOCKED:BOOL=ON
+ /W0
+
+ For GNU GCC
+ -w
+
+
+========================================================================
+For further assistance, send email to help@hdfgroup.org
+========================================================================
+
diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel
index 23dc2a0..d3d7830 100644
--- a/release_docs/INSTALL_parallel
+++ b/release_docs/INSTALL_parallel
@@ -4,7 +4,7 @@
0. Use Build Scripts
--------------------
The HDF Group is accumulating build scripts to handle building parallel HDF5
-on various platforms (Cray, IBM, SGI, etc...). These scripts are being
+on various platforms (Cray, IBM, SGI, etc...). These scripts are being
maintained and updated continuously for current and future systems. The reader
is strongly encouraged to consult the repository at,
@@ -82,22 +82,19 @@ This allows for >2GB sized files on Linux systems and is only available with
Linux kernels 2.4 and greater.
-2.3. Unix HPC Clusters (for v1.8 and later)
+2.3. Hopper (Cray XE6) (for v1.8 and later)
-------------------------
-The following steps are generic instructions for building HDF5 on
-several current HPC systems. The exact commands and scripts to use
-will vary according to the scheduling software on the individual
-system. Consult the system documentation to determine the details.
+The following steps are for building HDF5 for the Hopper compute
+nodes. They would probably work for other Cray systems but have
+not been verified.
Obtain the HDF5 source code:
https://portal.hdfgroup.org/display/support/Downloads
-In general HDF5 can be built on a login/front-end node provided it is
-installed on a file system accessible by all compute nodes. If parallel
-tests run by "make check" or "make check-p" will be run on compute
-nodes in a batch job, the HDF5 build directory should also exist on a
-file system accessible by all compute nodes.
+The entire build process should be done on a MOM node in an interactive allocation and on a file system accessible by all compute nodes.
+Request an interactive allocation with qsub:
+qsub -I -q debug -l mppwidth=8
- create a build directory build-hdf5:
mkdir build-hdf5; cd build-hdf5/
@@ -105,12 +102,12 @@ file system accessible by all compute nodes.
- configure HDF5:
RUNSERIAL="aprun -q -n 1" RUNPARALLEL="aprun -q -n 6" FC=ftn CC=cc /path/to/source/configure --enable-fortran --enable-parallel --disable-shared
- RUNSERIAL and RUNPARALLEL tells the library how it should launch programs that are part of the build procedure. Note that the command names and the specific options will vary according to the batch system.
+ RUNSERIAL and RUNPARALLEL tell the library how it should launch programs that are part of the build procedure.
- Compile HDF5:
gmake
-- Check HDF5: on most systems this should be run as a batch job on compute nodes.
+- Check HDF5
gmake check
- Install HDF5
@@ -120,8 +117,8 @@ The build will be in build-hdf5/hdf5/ (or whatever you specify in --prefix).
To compile other HDF5 applications use the wrappers created by the build (build-hdf5/hdf5/bin/h5pcc or h5fc)
-3. Detailed explanation
------------------------
+3. Detail explanation
+---------------------
3.1. Installation steps (Uni/Multiple processes modes)
-----------------------
@@ -158,12 +155,16 @@ to run a parallel application on one processor and on many processors. If the
compiler is `mpicc' and the user hasn't specified values for RUNSERIAL and
RUNPARALLEL then configure chooses `mpiexec' from the same directory as `mpicc':
- RUNSERIAL: /usr/local/mpi/bin/mpiexec -np 1
- RUNPARALLEL: /usr/local/mpi/bin/mpiexec -np $${NPROCS:=6}
+ RUNSERIAL: mpiexec -n 1
+ RUNPARALLEL: mpiexec -n $${NPROCS:=6}
The `$${NPROCS:=6}' will be substituted with the value of the NPROCS
environment variable at the time `make check' is run (or the value 6).
+Note that some MPI implementations (e.g. OpenMPI 4.0) disallow oversubscribing
+nodes by default so you'll have to either set NPROCS equal to the number of
+processors available (or fewer) or redefine RUNPARALLEL with appropriate
+flag(s) (--oversubscribe in OpenMPI).
4. Parallel test suite
----------------------
diff --git a/release_docs/README_HDF5_CMake b/release_docs/README_HDF5_CMake
new file mode 100644
index 0000000..fdfc998
--- /dev/null
+++ b/release_docs/README_HDF5_CMake
@@ -0,0 +1,24 @@
+This tar file contains
+
+ build-unix.sh script to build HDF5 with CMake on unix machines
+ build-unix-hpc.sh script to build HDF5 with CMake on unix machines and run
+ tests with batch scripts (sbatch).
+ CTestScript.cmake
+ HDF5config.cmake CMake scripts for building HDF5
+ HDF5options.cmake
+ hdf5-1.8.22 HDF5 1.8.22 source
+ LIBAEC.tar.gz source for building SZIP replacement
+ ZLib.tar.gz source for building ZLIB
+ hdf5_plugins.tar.gz source for building compression plugins
+
+For more information about building HDF5 with CMake, see USING_HDF5_CMake.txt in
+hdf5-1.8.22/release_docs, or
+https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake.
+
+For more information about building HDF5 with CMake on HPC machines, including
+cross compiling on Cray XC40, see README_HPC in hdf5-1.8.22/release_docs.
+
+
+
+
+
diff --git a/release_docs/README_HPC b/release_docs/README_HPC
new file mode 100644
index 0000000..bd16376
--- /dev/null
+++ b/release_docs/README_HPC
@@ -0,0 +1,206 @@
+************************************************************************
+* Using CMake to build and test HDF5 source on HPC machines *
+************************************************************************
+
+ Contents
+
+Section I: Prerequisites
+Section II: Obtain HDF5 source
+Section III: Using ctest command to build and test
+Section IV: Cross compiling
+Section V: Manual alternatives
+Section VI: Other cross compiling options
+
+************************************************************************
+
+========================================================================
+I. Prerequisites
+========================================================================
+ 1. Create a working directory that is accessible from the compute nodes for
+ running tests; the working directory should be in a scratch space or a
+ parallel file system space since testing will use this space. Building
+ from HDF5 source in a 'home' directory typically results in test
+ failures and should be avoided.
+
+ 2. Load modules for desired compilers, module for cmake version 3.12 or greater,
+ and set any needed environment variables for compilers (i.e., CC, FC, CXX).
+ Unload any problematic modules (i.e., craype-hugepages2M).
+
+========================================================================
+II. Obtain HDF5 source
+========================================================================
+Obtain HDF5 source code from the HDF5 repository using a git command or
+from a release tar file in a working directory:
+
+ git clone https://github.com/HDFGroup/hdf5.git
+ [-b branch] [source directory]
+
+If no branch is specified, then the 'develop' version will be checked out.
+If no source directory is specified, then the source will be located in the
+'hdf5' directory. The CMake scripts expect the source to be in a directory
+named hdf5-<version string>, where 'version string' uses the format '1.xx.xx'.
+For example, for the current 'develop' version, the "hdf5" directory should
+be renamed "hdf5-1.8.22", or for the first hdf5_1_8_22 pre-release version,
+it should be renamed "hdf5-1.8.22-pre1".
+
+If the version number is not known a priori, the version string
+can be obtained by running bin/h5vers in the top level directory of the source clone, and
+the source directory renamed 'hdf5-<version string>'.
+
+Release or snapshot tar files may also be extracted and used.
+
+========================================================================
+III. Using ctest command to build and test
+========================================================================
+
+The ctest command [1]:
+
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log
+
+will configure, build, test and package HDF5 from the downloaded source
+after the setup steps outlined below are followed.
+
+CMake option variables are available to allow running test programs in batch
+scripts on compute nodes and to cross-compile for compute node hardware using
+a cross-compiling emulator. The setup steps will make default settings for
+parallel or serial only builds available to the CMake command.
+
+ 1. For the current 'develop' version the "hdf5" directory should be renamed
+ "hdf5-1.8.22".
+
+ 2. Three cmake script files need to be copied to the working directory, or
+ have symbolic links to them, created in the working directory:
+
+ hdf5-1.8.22/config/cmake/scripts/HDF5config.cmake
+ hdf5-1.8.22/config/cmake/scripts/CTestScript.cmake
+ hdf5-1.8.22/config/cmake/scripts/HDF5options.cmake
+
+ should be copied to the working directory.
+
+ 3. The resulting contents of the working directory are then:
+
+ CTestScript.cmake
+ HDF5config.cmake
+ HDF5options.cmake
+ hdf5-1.8.22
+
+ Additionally, when the ctest command runs [1], it will add a build directory
+ in the working directory.
+
+ 4. The following options (among others) can be added to the ctest
+ command [1], following '-S HDF5config.cmake,' and separated by ',':
+
+ HPC=sbatch (or 'bsub' or 'raybsub') indicates which type of batch
+ files to use for running tests. If omitted, test
+ will run on the local machine or login node.
+
+ KNL=true to cross-compile for KNL compute nodes on CrayXC40
+ (see section IV)
+
+ MPI=true enables parallel, disables c++, java, and threadsafe
+
+ LOCAL_BATCH_SCRIPT_ARGS="--account=<account#>" to supply user account
+ information for batch jobs
+
+ The HPC options will add BUILD_GENERATOR=Unix for the three HPC options.
+ An example ctest command for a parallel build on a system using sbatch is
+
+ ctest -S HDF5config.cmake,HPC=sbatch,MPI=true -C Release -V -O hdf5.log
+
+ Adding the option 'KNL=true' to the above list will compile for KNL nodes,
+ for example, on 'mutrino' and other CrayXC40 machines.
+
+ Changing -V to -VV will produce more logging information in HDF5.log.
+
+ More detailed CMake information can be found in the HDF5 source in
+ release_docs/INSTALL_CMake.txt.
+
+========================================================================
+IV. Cross-compiling
+========================================================================
+For cross-compiling on Cray, set environment variables CC=cc, FC=ftn
+and CXX=CC (for c++) after all compiler modules are loaded since switching
+compiler modules may unset or reset these variables.
+
+CMake provides options for cross-compiling. To cross-compile for KNL hardware
+on mutrino and other CrayXC40 machines, add HPC=sbatch,KNL=true to the
+ctest command line. This will set the following options from the
+config/cmake/scripts/HPC/sbatch-HDF5options.cmake file:
+
+ set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
+ set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
+ set (LOCAL_BATCH_SCRIPT_NAME "knl_ctestS.sl")
+ set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "knl_ctestP.sl")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
+
+On the Cray XC40 the craype-haswell module is needed for configuring, and the
+craype-mic-knl module is needed for building to run on the KNL nodes. CMake
+with the above options will swap modules after configuring is complete,
+but before compiling programs for KNL.
+
+The sbatch script arguments for running jobs on KNL nodes may differ on CrayXC40
+machines other than mutrino. The batch scripts knl_ctestS.sl and knl_ctestP.sl
+have the correct arguments for mutrino: "#SBATCH -p knl -C quad,cache". For
+cori, another CrayXC40, that line is replaced by "#SBATCH -C knl,quad,cache".
+For cori (and other machines), the values in LOCAL_BATCH_SCRIPT_NAME and
+LOCAL_BATCH_SCRIPT_PARALLEL_NAME in the config/cmake/scripts/HPC/sbatch-HDF5options.cmake
+file can be replaced by cori_knl_ctestS.sl and cori_knl_ctestS.sl, or the lines
+can be edited in the batch files in hdf5-1.8.22/bin/batch.
+
+========================================================================
+V. Manual alternatives
+========================================================================
+If using ctest is undesirable, one can create a build directory and run the cmake
+configure command, for example
+
+"/projects/Mutrino/hpcsoft/cle6.0/common/cmake/3.12/bin/cmake"
+-C "<working directory>/hdf5-1.8.22/config/cmake/cacheinit.cmake"
+-DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_BUILD_FORTRAN:BOOL=ON
+-DHDF5_BUILD_JAVA:BOOL=OFF
+-DCMAKE_INSTALL_PREFIX:PATH=<working directory>/HDF_Group/HDF5/1.8.22
+-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
+-DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=OFF
+-DHDF5_ENABLE_THREADSAFE:BOOL=OFF
+-DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DLOCAL_BATCH_TEST:BOOL=ON
+-DMPIEXEC_EXECUTABLE:STRING=srun -DMPIEXEC_NUMPROC_FLAG:STRING=-n
+-DMPIEXEC_MAX_NUMPROCS:STRING=6
+-DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake
+-DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl
+-DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl -DSITE:STRING=mutrino
+-DBUILDNAME:STRING=par-knl_GCC493-SHARED-Linux-4.4.156-94.61.1.16335.0.PTF.1107299-default-x86_64
+"-GUnix Makefiles" "" "<working directory>/hdf5-1.8.22"
+
+followed by make and batch jobs to run tests.
+
+To cross-compile on CrayXC40, run the configure command with the craype-haswell
+module loaded, then switch to the craype-mic-knl module for the build process.
+
+Tests on machines using slurm can be run with
+
+"sbatch -p knl -C quad,cache ctestS.sl"
+
+or
+
+"sbatch -p knl -C quad,cache ctestP.sl"
+
+for parallel builds.
+
+Tests on machines using LSF will typically use "bsub ctestS.lsf", etc.
+
+========================================================================
+VI. Other cross compiling options
+========================================================================
+Settings for two other cross-compiling options are also in the config/toolchain
+files which do not seem to be necessary with the Cray PrgEnv-* modules
+
+1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake
+ variable would allow the use of an appropriate H5Tinit.c file with type
+ information generated on a compute node to be used when cross compiling
+ for those compute nodes. The use of the variables in lines 110 and 111
+ of HDF5options.cmake file seem to preclude needing this option with the
+ available Cray modules and CMake option.
+
+2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when
+ properly configured will run H5detect in a batch job on a compute node
+ at the beginning of the CMake build process. It was also found to be
+ unnecessary with the available Cray modules and CMake options.
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 2b54b44..e4889c2 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,39 +1,34 @@
-HDF5 version 1.8.21 released on 2018-06-04
+HDF5 version 1.8.22 released on 2021-02-05
================================================================================
+Notice: HDF5 1.8.22 will be followed later in 2021 by HDF5 1.8.23, the final
+release of HDF5 1.8. HDF5 1.10 and HDF5 1.12 are currently available.
+Detailed information about these releases can be found at:
+https://portal.hdfgroup.org/display/HDF5/Release+Specific+Information
+
INTRODUCTION
============
-This document describes the differences between HDF5-1.8.20 and
-HDF5-1.8.21, and contains information on the platforms tested and
-known problems in HDF5-1.8.21.
-For more details, see the files HISTORY-1_0-1_8_0_rc3.txt
-and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source.
-
-Links to the HDF5 1.8.21 source code, documentation, and additional materials
-can be found on the HDF5 web page at:
-
- https://support.hdfgroup.org/HDF5/
+This document describes the differences between this release and the previous
+HDF5 release. It contains information on the platforms tested and known
+problems in this release. For more details check the HISTORY*.txt files in the
+HDF5 source.
-The HDF5 1.8.21 release can be obtained from:
+Note that documentation in the links below will be updated at the time of each
+final release.
- https://support.hdfgroup.org/HDF5/release/obtain518.html
+Links to HDF5 documentation can be found on The HDF5 web page:
-User documentation for 1.8.21 can be accessed directly at this location:
+ https://portal.hdfgroup.org/display/HDF5/HDF5
- https://support.hdfgroup.org/HDF5/doc1.8/
+The official HDF5 releases can be obtained from:
-New features in the HDF5-1.8.x release series, including brief general
-descriptions of some new and modified APIs, are described in the "What's New
-in 1.8.0?" document:
+ https://portal.hdfgroup.org/display/support/HDF5+1.8.22
- https://support.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html
+Changes from Release to Release and New Features in the HDF5-1.8.x release series
+can be found at:
-All new and modified APIs are listed in detail in the "HDF5 Software Changes
-from Release to Release" document, in the section "Release 1.8.21 (current
-release) versus Release 1.8.20
-
- https://support.hdfgroup.org/HDF5/doc1.8/ADGuide/Changes.html
+ https://portal.hdfgroup.org/display/HDF5/HDF5+Application+Developer%27s+Guide
If you have any questions or comments, please send them to the HDF Help Desk:
@@ -45,451 +40,618 @@ CONTENTS
- New Features
- Support for New Platforms, Languages, and Compilers
-- Bug Fixes since HDF5-1.8.20
+- Bug Fixes since HDF5-1.8.21
- Supported Platforms
- Supported Configuration Features Summary
- More Tested Platforms
- Known Problems
+- CMake vs. Autotools installations
New Features
============
- Configuration
+ Configuration:
-------------
- - CMake
+ - CMake option to build the HDF filter plugins project as an external project
- Change minimum version to 3.10.
+ The HDF filter plugins project is a collection of registered compression
+ filters that can be dynamically loaded when needed to access data stored
+ in an hdf5 file. This CMake-only option allows the plugins to be built and
+ distributed with the hdf5 library and tools. Like the options for szip and
+ zlib, either a tgz file or a git repository can be specified for the source.
- This change removes the need to support a copy of the FindMPI.cmake module,
- which has been removed, along with its subfolder in the config/cmake_ext_mod
- location.
+ The option was refactored to use the CMake FetchContent process. This allows
+ more control over the filter targets, but required external project command
+ options to be moved to a CMake include file, HDF5PluginCache.cmake. It also
+ allows the filter examples to be used as tests for operation of the
+ filter plugins.
- (ADB - 2018/03/09)
+ (ADB - 2020/12/10, OESS-98)
- - CMake
+ - CMake option to use MSVC naming conventions with MinGW
- Add pkg-config file generation
+ HDF5_MSVC_NAMING_CONVENTION option enables using MSVC naming conventions
+ when using a MinGW toolchain
- Added pkg-config file generation for the C, C++, HL, and HL C++ libraries.
- In addition, builds on linux will create h5cXXX scripts that use the pkg-config
- files. This is a limited implementation of a script like autotools h5cc.
+ (xan - 2020/10/30)
- (ADB - 2018/03/08, HDFFV-4359)
+ - CMake option to statically link gcc libs with MinGW
- - CMake
+ HDF5_MINGW_STATIC_GCC_LIBS allows statically linking libg/libstdc++
+ with the MinGW toolchain
- Refactor use of CMAKE_BUILD_TYPE for new variable, which understands
- the type of generator in use.
+ (xan - 2020/10/30)
- Added new configuration macros to use new HDF_BUILD_TYPE variable. This
- variable is set correctly for the type of generator being used for the build.
+ - CMake option to build the HDF filter plugins project as an external project
- (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296)
+ The HDF filter plugins project is a collection of registered compression
+ filters that can be dynamically loaded when needed to access data stored
+ in an hdf5 file. This CMake-only option allows the plugins to be built and
+ distributed with the hdf5 library and tools. Like the options for szip and
+ zlib, either a tgz file or a git repository can be specified for the source.
- C++ API
- -------
- - The following C++ API wrappers have been added to class H5Location
- + H5Lcreate_soft:
- // Creates a soft link from link_name to target_name.
- void link(const char *target_name, const char *link_name,...)
- void link(const H5std_string& target_name,...)
+ The necessary options are (see the INSTALL_CMake.txt file):
+ HDF5_ENABLE_PLUGIN_SUPPORT
+ PLUGIN_TGZ_NAME or PLUGIN_GIT_URL
+ There are more options necessary for various filters and the plugin project
+ documents should be referenced.
- + H5Lcreate_hard:
- // Creates a hard link from new_name to curr_name.
- void link(const char *curr_name, const Group& new_loc,...)
- void link(const H5std_string& curr_name, const Group& new_loc,...)
+ (ADB - 2020/10/16, OESS-98)
- // Creates a hard link from new_name to curr_name in the same location.
- void link(const char *curr_name, const hid_t same_loc,...)
- void link(const H5std_string& curr_name, const hid_t same_loc,...)
+ - Added CMake option to format source files
- Note: previous version CommonFG::link will be deprecated.
+ HDF5_ENABLE_FORMATTERS option will enable creation of targets using the
+ pattern - HDF5_*_SRC_FORMAT - where * corresponds to the source folder
+ or tool folder. All sources can be formatted by executing the format target;
+ make format
- + H5Lcopy:
- // Copy an object from a group of file to another.
- void copyLink(const char *src_name, const Group& dst,...)
- void copyLink(const H5std_string& src_name, const Group& dst,...)
+ (ADB - 2020/09/24)
- // Copy an object from a group of file to the same location.
- void copyLink(const char *src_name, const char *dst_name,...)
- void copyLink(const H5std_string& src_name,...)
+ - CMake option to link the generated Fortran MOD files into the include
+ directory.
- + H5Lmove:
- // Rename an object in a group or file to a new location.
- void moveLink(const char* src_name, const Group& dst,...)
- void moveLink(const H5std_string& src_name, const Group& dst,...)
+ The Fortran generation of MOD files by a Fortran compile can produce
+ different binary files between SHARED and STATIC compiles with different
+ compilers and/or different platforms. Note that it has been found that
+ different versions of Fortran compilers will produce incompatible MOD
+ files. Currently, CMake will locate these MOD files in subfolders of
+ the include directory and add that path to the Fortran library target
+ in the CMake config file, which can be used by the CMake find library
+ process. For other build systems using the binary from a CMake install,
+ a new CMake configuration can be used to copy the pre-chosen version
+ of the Fortran MOD files into the install include directory.
- // Rename an object in a group or file to the same location.
- void moveLink(const char* src_name, const char* dst_name,...)
- void moveLink(const H5std_string& src_name,...)
+ The default will depend on the configuration of
+ BUILD_STATIC_LIBS and BUILD_SHARED_LIBS:
+ YES YES Default to SHARED
+ YES NO Default to STATIC
+ NO YES Default to SHARED
+ NO NO Default to SHARED
+ The defaults can be overriden by setting the config option
+ HDF5_INSTALL_MOD_FORTRAN to one of NO, SHARED, or STATIC
- Note: previous version CommonFG::move will be deprecated.
+ (ADB - 2020/07/9, HDFFV-11116)
- + H5Ldelete:
- // Removes the specified link from this location.
- void unlink(const char *link_name,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
- void unlink(const H5std_string& link_name,
- const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
+ - CMake option to use AEC (open source SZip) library instead of SZip
- Note: An additional parameter is added to CommonFG::unlink and it
- is moved to H5Location.
+ The open source AEC library is a replacement library for SZip. In
+ order to use it for hdf5 the libaec CMake source was changed to add
+ "-fPIC" and exclude test files. Autotools does not build the
+ compression libraries within hdf5 builds. CMake requires new option
+ USE_LIBAEC to compensate for the different files produced by AEC build.
- (BMR - 2018/05/11 - HDFFV-10445)
+ (ADB - 2020/04/22, OESS-65)
- - New property list subclasses
+ - CMake ConfigureChecks.cmake file now uses CHECK_STRUCT_HAS_MEMBER
- Property list subclasses StrCreatPropList, LinkCreatPropList, and
- AttrCreatPropList are added for the C property list classes
- H5P_STRING_CREATE, H5P_LINK_CREATE, and H5P_ATTRIBUTE_CREATE.
+ Some handcrafted tests in HDFTests.c has been removed and the CMake
+ CHECK_STRUCT_HAS_MEMBER module has been used.
- (BMR - 2018/05/11 - HDFFV-10445)
+ (ADB - 2020/03/24, TRILAB-24)
- - Another argument, LinkCreatPropList& lcpl, is added to the following
- functions for the use of link creation property list.
- Group createGroup(const char* name, size_t size_hint = 0,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
- Group createGroup(const H5std_string& name, size_t size_hint = 0,
- const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
+ - Both build systems use same set of warnings flags
- (BMR - 2018/05/11 - HDFFV-10445)
+ GNU C, C++ and gfortran warnings flags were moved to files in a config
+ sub-folder named gnu-warnings. Flags that only are available for a specific
+ version of the compiler are in files named with that version.
+ Clang C warnings flags were moved to files in a config sub-folder
+ named clang-warnings.
+ Intel C, Fortran warnings flags were moved to files in a config sub-folder
+ named intel-warnings.
+ There are flags in files named "error-xxx" with warnings that may
+ be promoted to errors. Some source files may still need fixes.
+ There are also pairs of files named "developer-xxx" and "no-developer-xxx"
+ that are chosen by the CMake option:HDF5_ENABLE_DEV_WARNINGS or the
+ configure option:--enable-developer-warnings.
-Support for New Platforms, Languages, and Compilers
-===================================================
+ In addition, CMake no longer applies these warnings for examples.
- - Added support for Visual Studio 2017 w/ Intel Fortran 18 on Windows 10 x64.
+ (ADB - 2020/03/24, TRILAB-192)
-
-Bug Fixes since HDF5-1.8.20
-===========================
+ - Update CMake minimum version to 3.12
- - If an HDF5 file contains a filter pipeline message with a 'number of
- filters' field that exceeds the maximum number of allowed filters,
- the error handling code will attempt to dereference a NULL pointer.
+ Updated CMake minimum version to 3.12 and added version checks
+ for Windows features.
- This issue was reported to The HDF Group as issue #CVE-2017-17505.
+ (ADB - 2020/02/05, TRILABS-142)
- NOTE: The HDF5 C library cannot produce such a file. This condition
- should only occur in a corrupt (or deliberately altered) file
- or a file created by third-party software.
+ - Fixed CMake include properties for Fortran libraries
- This problem arose because the error handling code assumed that
- the 'number of filters' field implied that a dynamic array of that
- size had already been created and that the cleanup code should
- iterate over that array and clean up each element's resources. If
- an error occurred before the array has been allocated, this will
- not be true.
+ Corrected the library properties for Fortran to use the
+ correct path for the Fortran module files.
- This has been changed so that the number of filters is set to
- zero on errors. Additionally, the filter array traversal in the
- error handling code now requires that the filter array not be NULL.
+ (ADB - 2020/02/04, HDFFV-11012)
- (DER - 2018/02/06, HDFFV-10354)
+ - Added common warnings files for gnu and intel
- - If an HDF5 file contains a filter pipeline message which contains
- a 'number of filters' field that exceeds the actual number of
- filters in the message, the HDF5 C library will read off the end of
- the read buffer.
+ Added warnings files to use one common set of flags
+ during configure for both autotools and CMake build
+ systems. The initial implementation only affects a
+ general set of flags for gnu and intel compilers.
- This issue was reported to The HDF Group as issue #CVE-2017-17506.
+ (ADB - 2020/01/17)
- NOTE: The HDF5 C library cannot produce such a file. This condition
- should only occur in a corrupt (or deliberately altered) file
- or a file created by third-party software.
+ - Added new options to CMake for control of testing
- The problem was fixed by passing the buffer size with the buffer
- and ensuring that the pointer cannot be incremented off the end
- of the buffer. A mismatch between the number of filters declared
- and the actual number of filters will now invoke normal HDF5
- error handling.
+ Added CMake options (default ON);
+ HDF5_TEST_SERIAL AND/OR HDF5_TEST_PARALLEL
+ combined with:
+ HDF5_TEST_TOOLS
+ HDF5_TEST_EXAMPLES
+ HDF5_TEST_FORTRAN
+ HDF5_TEST_CPP
- (DER - 2018/02/26, HDFFV-10355)
+ (ADB - 2020/01/15, HDFFV-11001)
- - If an HDF5 file contains a malformed compound datatype with a
- suitably large offset, the type conversion code can run off
- the end of the type conversion buffer, causing a segmentation
- fault.
+ - Added Clang sanitizers to CMake for analyzer support if compiler is clang.
- This issue was reported to The HDF Group as issue #CVE-2017-17507.
+ Added CMake code and files to execute the Clang sanitizers if
+ HDF5_ENABLE_SANITIZERS is enabled and the USE_SANITIZER option
+ is set to one of the following:
+ Address
+ Memory
+ MemoryWithOrigins
+ Undefined
+ Thread
+ Leak
+ 'Address;Undefined'
- NOTE: The HDF5 C library cannot produce such a file. This condition
- should only occur in a corrupt (or deliberately altered) file
- or a file created by third-party software.
+ (ADB - 2019/12/12, TRILAB-135)
- THE HDF GROUP WILL NOT FIX THIS BUG AT THIS TIME
+ - Update CMake for VS2019 support
- Fixing this problem would involve updating the publicly visible
- H5T_conv_t function pointer typedef and versioning the API calls
- which use it. We normally only modify the public API during
- major releases, so this bug will not be fixed at this time.
+ CMake added support for VS2019 in version 3.15. Changes to the CMake
+ generator setting required changes to scripts. Also updated version
+ references in CMake files as necessary.
- (DER - 2018/02/26, HDFFV-10356)
+ (ADB - 2019/11/18, HDFFV-10962)
- - If an HDF5 file contains a malformed compound type which contains
- a member of size zero, a division by zero error will occur while
- processing the type.
+ - Add options to enable or disable building tools and tests
- This issue was reported to The HDF Group as issue #CVE-2017-17508.
+ Configure options --enable-tests and --enable-tools were added for
+ autotools configure. These options are enabled by default, and can be
+ disabled with either --disable-tests (or tools) or --enable-tests=no
+ (or --enable-tools=no). Build time is reduced ~20% when tools are
+ disabled, 35% when tests are disabled, 45% when both are disabled.
+ Reenabling them after the initial build requires running configure
+ again with the option(s) enabled.
- NOTE: The HDF5 C library cannot produce such a file. This condition
- should only occur in a corrupt (or deliberately altered) file
- or a file created by third-party software.
+ (DAP - 2019/07/24, HDFFV-9976)
- Checking for zero before dividing fixes the problem. Instead of the
- division by zero, the normal HDF5 error handling is invoked.
+ - Update CMake tests to use FIXTURES
- (DER - 2018/02/26, HDFFV-10357)
+ CMake test fixtures allow setup/cleanup tests and other dependency
+ requirements as properties for tests. This is more flexible for
+ modern CMake code.
- - If an HDF5 file contains a malformed symbol table node that declares
- it contains more symbols than it actually contains, the library
- can run off the end of the metadata cache buffer while processing
- the symbol table node.
+ (ADB - 2019/07/23, HDFFV-10529)
- This issue was reported to The HDF Group as issue #CVE-2017-17509.
+ - Windows PDB files are always installed
- NOTE: The HDF5 C library cannot produce such a file. This condition
- should only occur in a corrupt (or deliberately altered) file
- or a file created by third-party software.
+ There are build configuration or flag settings for Windows that may not
+ generate PDB files. If those files are not generated then the install
+ utility will fail because those PDB files are not found. An optional
+ variable, DISABLE_PDB_FILES, was added to not install PDB files.
- Performing bounds checks on the buffer while processing fixes the
- problem. Instead of the segmentation fault, the normal HDF5 error
- handling is invoked.
+ (ADB - 2019/07/17, HDFFV-10424)
- (DER - 2018/03/12, HDFFV-10358)
+ - Add mingw CMake support with a toolchain file
+ There have been a number of mingw issues that have been linked under
+ HDFFV-10845. It has been decided to implement the CMake cross-compiling
+ technique of toolchain files. We will use a linux platform with the mingw
+ compiler stack for testing. Only the C language is fully supported, and
+ the error tests are skipped. The C++ language works for static but shared
+ builds have a shared library issue with the mingw Standard Exception Handling
+ library, which is not available on Windows. Fortran has a common cross-compile
+ problem with the fortran configure tests.
- Configuration
- -------------
- - Library
+ (ADB - 2019/07/12, HDFFV-10845, HDFFV-10595)
+
+ - Windows PDB files are installed incorrectly
- Moved the location of gcc attribute.
+ For static builds, the PDB files for windows should be installed next
+ to the static libraries in the lib folder. Also the debug versions of
+ libraries and PDB files are now correctly built using the default
+ CMAKE_DEBUG_POSTFIX setting.
- The gcc attribute(no_sanitize), named as the macro HDF_NO_UBSAN,
- was located after the function name. Builds with GCC 7 did not
- indicate any problem, but GCC 8 issued errors. Moved the
- attribute before the function name, as required.
+ (ADB - 2019/07/09, HDFFV-10581)
- (ADB 2018/05/22, HDFFV-10473)
+ - Add option to build only shared libs
- - CMake
+ A request was made to prevent building static libraries and only build
+ shared. A new option was added to CMake, ONLY_SHARED_LIBS, which will
+ skip building static libraries. Certain utility functions will build with
+ static libs but are not published. Tests are adjusted to use the correct
+ libraries depending on SHARED/STATIC settings.
- Update CMake commands configuration.
+ (ADB - 2019/06/12, HDFFV-10805)
- A number of improvements were made to the CMake commands. Most
- changes simplify usage or eliminate unused constructs. Also,
- some changes support better cross-platform support.
+ - Change tools tests to search the error stack
- (ADB - 2018/02/01, HDFFV-10398)
+ There are some use cases which can cause the error stack of tools to be
+ different then the expected output. These tests now use grepTest.cmake;
+ this was changed to allow the error file to be searched for an expected string.
- - CMake
+ (ADB - 2019/04/15, HDFFV-10741)
- Correct usage of CMAKE_BUILD_TYPE variable.
+ - Add toolchain and cross-compile support
- The use of the CMAKE_BUILD_TYPE is incorrect for multi-config
- generators (Visual Studio and XCode) and is optional for single
- config generators. Created a new macro to check
- GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG
- Created two new HDF variable, HDF_BUILD_TYPE and HDF_CFG_BUILD_TYPE.
- Defaults for these variables is "Release".
+ Added info on using a toolchain file to INSTALL_CMAKE.txt. A
+ toolchain file is also used in cross-compiling, which requires
+ CMAKE_CROSSCOMPILING_EMULATOR to be set. To help with cross-compiling
+ the fortran configure process, the HDF5UseFortran.cmake file macros
+ were improved. Fixed a Fortran configure file issue that incorrectly
+ used #cmakedefine instead of #define.
- (ADB - 2018/01/10, HDFFV-10385)
+ (ADB - 2018/10/04, HDFFV-10594)
- - CMake
+ - Add warnings flags for Intel compilers
- Add replacement of fortran flags if using static CRT.
+ Identified Intel compiler specific warnings flags that should be used
+ instead of GNU flags.
- Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in
- config/cmake_ext_mod folder.
+ (ADB - 2018/10/04, TRILABS-21)
- (ADB - 2018/01/08, HDFFV-10334)
+ - Add default rpath to targets
+
+ Default rpaths should be set in shared executables and
+ libraries to allow the use of loading dependent libraries
+ without requiring LD_LIBRARY_PATH to be set. The default
+ path should be relative using @rpath on osx and $ORIGIN
+ on linux. Windows is not affected.
+
+ (ADB - 2018/09/26, HDFFV-10594)
Library
-------
- - Utility function can not handle lowercase Windows drive letters
+ - Improved performance of H5Sget_select_elem_pointlist
+
+ Modified library to cache the point after the last block of points
+ retrieved by H5Sget_select_elem_pointlist, so a subsequent call to the
+ same function to retrieve the next block of points from the list can
+ proceed immediately without needing to iterate over the point list.
+
+ (NAF - 2021/01/19)
- Added call to toupper function for drive letter.
+ - Added S3 and HDFS Virtual File Drivers (VFDs) to HDF5
- (ADB - 2017/12/18, HDFFV-10307)
+ These new VFDs have been added in HDF5-1.8.22. Instructions to
+ enable them when configuring HDF5 on Linux and Mac may be found at
+ https://portal.hdfgroup.org/display/HDF5/Virtual+File+Drivers+-+S3+and+HDFS.
+
+ Installing on Windows requires CMake 3.13 and the following additional setup.
+ Install openssl library (with dev files);
+ from "Shining Light Productions". msi package preferred.
+
+ PATH should have been updated with the installation dir.
+ set ENV variable OPENSSL_ROOT_DIR to the installation dir.
+ set ENV variable OPENSSL_CONF to the cfg file, likely %OPENSSL_ROOT_DIR%\bin\openssl.cfg
+ Install libcurl library (with dev files);
+ download the latest released version using git: https://github.com/curl/curl.git
+
+ Open a Visual Studio Command prompt
+ change to the libcurl root folder
+ run the "buildconf.bat" batch file
+ change to the winbuild directory
+ nmake /f Makefile.vc mode=dll MACHINE=x64
+ copy libcurl-vc-x64-release-dll-ipv6-sspi-winssl dir to C:\curl (installation dir)
+ set ENV variable CURL_ROOT to C:\curl (installation dir)
+ update PATH ENV variable to %CURL_ROOT%\bin (installation bin dir).
+ the aws credentials file should be in %USERPROFILE%\.aws folder
+ set the ENV variable "HDF5_ROS3_TEST_BUCKET_URL=https://s3.us-east-2.amazonaws.com/hdf5ros3"
+
+ (ADB - 2019/09/12, HDFFV-10854)
+
+ - Allow pre-generated H5Tinit.c and H5make_libsettings.c to be used.
+
+ Rather than always running H5detect and generating H5Tinit.c and
+ H5make_libsettings.c, supply a location for those files with CMake variables
+ HDF5_USE_PREGEN and HDF5_USE_PREGEN_DIR. See release_docs/README_HPC
+ section VI "Other cross compiling options".
+
+ (ADB - 2018/09/18, HDFFV-10332)
+
+
+ Parallel Library
+ ----------------
+ - None
Tools
-----
- - h5repack
+ - None
+
+
+ High-Level APIs
+ ---------------
+ - None
+
+
+ Fortran API
+ -----------
+ - Corrected INTERFACE INTENT(IN) to INTENT(OUT) for buf_size in h5fget_file_image_f.
+
+ (MSB - 2020/2/18, HDFFV-11029)
+
+
+ C++ API
+ -------
+ - None
- h5repack changes the chunk parameters when a change of layout is not
- specified and a filter is applied.
+ High-Level APIs
+ ---------------
+ - None
- HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code
- in the tools library. The check for an existing layout was incorrectly
- placed into an if block and not executed. The check was moved into
- the normal path of the function.
- (ADB - 2018/02/21, HDFFV-10412)
+Support for New Platforms, Languages, and Compilers
+===================================================
- - h5dump
+ - Added support for macOS High Sierra 10.13.6 with Apple LLVM version 10.0.0
+ (clang-1000.10.44.4) and gfortran GNU Fortran (GCC) 6.3.0
+ - Added support for macOS Mojave 10.14.6 with Apple LLVM version 10.0.1
+ (clang-1001.0.46.4) and gfortran GNU Fortran (GCC) 6.3.0
+ - Added support for Intel icc/icpc/ifort version 19.0.4.233 20190416
+ - Added support for MPICH 3.3 compiled with GCC 7.2.0
+ - Added support for NAG Fortran Compiler Release 7.0(Yurakuchho) Build 7011
+ - Added support for OpenMPI 4.0.0 compiled with GCC 7.2.0
+ - Added support for Visual Studio 2019 w/ Intel Fortran 19 (cmake)
+ - Added support for Visual Studio 2019 w/ MSMPI 10.1 (cmake)
- the tools library will hide the error stack during file open.
- While this is preferable almost always, there are reasons to enable
- display of the error stack when a tool will not open a file. Adding an
- optional argument to the --enable-error-stack will provide this use case.
- As an optional argument it will not affect the operation of the
- --enable-error-stack. h5dump is the only tool to implement this change.
+Bug Fixes since HDF5-1.8.21
+===========================
- (ADB - 2018/02/15, HDFFV-10384)
+ Configuration
+ -------------
+ - Correct option for default API version
- - h5dump
+ CMake options for default API version are not mutually exclusive.
+ Change the multiple BOOL options to a single STRING option with the
+ strings; v16, v18.
- h5dump would output an indented blank line in the filters section.
+ (ADB - 2019/08/12, HDFFV-10879)
- h5dump overused the h5tools_simple_prefix function, which is a
- function intended to account for the data index (x,y,z) option.
- Removed the function call for header information.
+ - Fixes Autotools determination of the stat struct having an st_blocks field
- (ADB - 2018/01/25, HDFFV-10396)
+ A missing parenthesis in an autoconf macro prevented building the test
+ code used to determine if the stat struct contains the st_blocks field.
+ Now that the test functions correctly, the H5_HAVE_STAT_ST_BLOCKS #define
+ found in H5pubconf.h will be defined correctly on both the Autotools and
+ CMake. This #define is only used in the tests and does not affect the
+ HDF5 C library.
- - h5repack
+ (DER - 2021/07/01, HDFFV-11201)
- h5repack incorrectly searched internal object table for name.
- h5repack would search the table of objects for a name, if the
- name did not match it tried to determine if the name without a
- leading slash would match. The logic was flawed! The table
- stored names(paths) without a leading slash and did a strstr
- of the table path to the name.
- The assumption was that if there was a difference of one then
- it was a match, however "pressure" would match "/pressure" as
- well as "/pressure1", "/pressure2", etc. Changed logic to remove
- any leading slash and then do a full compare of the name.
+ Library
+ -------
+ - Fixed issues CVE-2018-14033 and CVE-2018-11206
- (ADB - 2018/01/18, HDFFV-10393)
+ h5dump aborted when buffer size was corrupted, causing buffer over-read.
- - h5repack
+ Checks for reading past the end of the buffer were added to prevent
+ the crashes and h5dump now simply fails with an error message when
+ this error condition occurs.
- h5repack failed to handle command line parameters for customer filters.
+ (BMR - 2020/12/16, HDFFV-10480 and HDFFV-11159)
- User defined filter parameter conversions would fail when integers
- were represented on the command line with character strings
- larger than 9 characters. Increased local variable array for storing
- the current command line parameter to prevent buffer overflows.
+ - Fixed a segmentation fault
- (ADB - 2018/01/17, HDFFV-10392)
+ A segmentation fault occurred with a Mathworks corrupted file.
- - h5diff
+ A detection of accessing a null pointer was added to prevent the problem.
- h5diff seg faulted if comparing VL strings against fixed strings.
+ (BMR - 2020/12/14, HDFFV-11150)
- Reworked solution for HDFFV-8625 and HDFFV-8639. Implemented the check
- for string objects of same type in the diff_can_type function by
- adding an if(tclass1 == H5T_STRING) block. This "if block" moves the
- same check that was added for attributes to this function, which is
- used by all object types. This function handles complex type structures.
- Also added a new test file in h5diffgentest for testing this issue
- and removed the temporary files used in the test scripts.
+ - Explicitly declared dlopen to use RTLD_LOCAL
- (ADB - 2018/01/04, HDFFV-8745)
+ dlopen documentation states that if neither RTLD_GLOBAL nor
+ RTLD_LOCAL are specified, then the default behavior is unspecified.
+ The default on linux is usually RTLD_LOCAL while macos will default
+ to RTLD_GLOBAL.
+ (ADB - 2020/08/12, HDFFV-11127)
- C++ API
- -------
- - Removal of memory leaks
+ - Fixed issues CVE-2018-13870 and CVE-2018-13869
+
+ When a buffer overflow occurred because a name length was corrupted
+ and became very large, h5dump crashed on memory access violation.
+
+ A check for reading past the end of the buffer was added to multiple
+ locations to prevent the crashes and h5dump now simply fails with an
+ error message when this error condition occurs.
+
+ (BMR - 2020/7/31, HDFFV-11120 and HDFFV-11121)
+
+ - Fixed the segmentation fault when reading attributes with multiple threads
+
+ It was reported that the reading of attributes with variable length string
+ datatype will crash with segmentation fault particularly when the number of
+ threads is high (>16 threads). The problem was due to the file pointer that
+ was set in the variable length string datatype for the attribute. That file
+ pointer was already closed when the attribute was accessed.
+
+ The problem was fixed by setting the file pointer to the current opened file pointer
+ when the attribute was accessed. Similar patch up was done before when reading
+ dataset with variable length string datatype.
+
+ (VC - 2020/07/13, HDFFV-11080)
+
+ - Fixed CVE-2018-17435
+
+ The tool h52gif produced a segfault when the size of an attribute
+ message was corrupted and caused a buffer overflow.
+
+ The problem was fixed by verifying the attribute message's size
+ against the buffer size before accessing the buffer. h52gif was
+ also fixed to display the failure instead of silently exiting
+ after the segfault was eliminated.
+
+ (BMR - 2020/6/19, HDFFV-10591)
+
+ - Fixed user-created data access properties not existing in the property list
+ returned by H5Dget_access_plist. Thanks to Steven Varga for submitting a
+ reproducer and a patch.
+
+ (CJH - 2019/12/09, HDFFV-10934)
+
+ - Fixed a bug that could cause an error or cause fill values to be
+ incorrectly read from a dataset that was written to using H5Dwrite_chunk
+ if the dataset was not closed after writing.
+
+ (NAF - 2019/03/06, HDFFV-10716)
+
+ - Fixed a potential invalid memory access and failure that could occur when
+ decoding an unknown object header message (from a future version of the
+ library).
+
+ (NAF - 2019/01/07)
+
+ - Allow H5detect and H5make_libsettings to take a file as an argument.
+
+ Rather than only writing to stdout, add a command argument to name
+ the file that H5detect and H5make_libsettings will use for output.
+ Without an argument, stdout is still used, so backwards compatibility
+ is maintained.
+
+ (ADB - 2018/09/05, HDFFV-9059)
+
+
+ - Inappropriate linking with deprecated MPI C++ libraries
+
+ HDF5 does not define *_SKIP_MPICXX in the public headers, so applications
+ can inadvertently wind up linking to the deprecated MPI C++ wrappers.
+
+ MPICH_SKIP_MPICXX and OMPI_SKIP_MPICXX have both been defined in H5public.h
+ so this should no longer be an issue. HDF5 makes no use of the deprecated
+ MPI C++ wrappers.
- A private function was inadvertently called, causing memory leaks. This
- is now fixed.
+ (DER - 2019/09/17, HDFFV-10893)
- (BMR - 2018/04/12 - User reported in email)
- - Changes in exception classes
+ Parallel Library
+ ----------------
+ - None
- Some exception classes are reorganized to reflect the HDF5 object
- hierarchy and allow customization.
- DataSetIException -> LocationException -> Exception
- DataTypeIException -> LocationException -> Exception
- GroupIException -> LocationException -> Exception
- AttributeIException -> LocationException -> Exception
- FileIException -> GroupIException -> LocationException -> Exception
- Member functions in H5Location and H5Object now throw specific exceptions
- associated with the invoking objects.
- (BMR - 2018/05/11)
+ Performance
+ -------------
+ - None
+
+
+ Tools
+ -----
+ - h5repack was fixed to repack the reference attributes properly.
+ The code line that checks if the update of reference inside a compound
+ datatype was misplaced outside the code block loop that carries out the
+ check. In consequence, the next attribute that is not the reference
+ type was repacked again as the reference type and caused the failure of
+ repacking. The fix is to move the corresponding code line to the correct
+ code block.
+
+ (KY -2020/02/05, HDFFV-11014)
+
+
+ - h5repack was fixed to repack datasets with external storage
+ to other types of storage.
+
+ New test added to repack files and verify the correct data using h5diff.
+
+ (JS - 2019/09/25, HDFFV-10408)
+ (ADB - 2019/10/02, HDFFV-10918)
+
+
+ Fortran API
+ -----------
+ - Added symbolic links libhdf5_hl_fortran.so to libhdf5hl_fortran.so and
+ libhdf5_hl_fortran.a to libhdf5hl_fortran.a in hdf5/lib directory for
+ autotools installs. These were added to match the name of the files
+ installed by CMmake and the general pattern of hl lib files. We will
+ change the names of the installed lib files to the matching name in
+ the next major release.
+
+ (LRK - 2019/05/09, HDFFV-10596)
+
+
+ C++ API
+ -------
+ - None
- - H5Location::closeObjId is made static
- (BMR - 2018/05/11)
- - H5A wrappers in H5Location are removed as they have been in H5Object.
- (BMR - 2018/05/11)
+ High-Level APIs:
+ ---------------
+ - None
+
+
+ Packet Table APIs:
+ ------------------
+ - None
Supported Platforms
===================
-The following platforms are supported and have been tested for this release.
-They are built with the configure process unless specified otherwise.
- Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
- #1 SMP x86_64 GNU/Linux compilers:
- (platypus/mayll) Version 4.4.7 20120313
- Versions 4.9.3, 5.3.0, 6.2.0
- PGI C, Fortran, C++ for 64-bit target on
- x86-64;
- Version 17.10-0
- Intel(R) C (icc), C++ (icpc), Fortran (icc)
- compilers:
- Version 17.0.4.196 Build 20160721
- MPICH 3.1.4 compiled with GCC 4.9.3
- OpenMPI 2.0.1 compiled with GCC 4.9.3
+ Linux 3.10.0-1127.10.1.el7 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
+ (echidna) GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
- Linux 2.6.32-573.18.1.el6 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
- (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
- IBM XL C/C++ V13.1
- IBM XL Fortran V15.1
+ Linux 2.6.32-573.18.1.el6 IBM XL C/C++ V13.1
+ #1 SMP ppc64 GNU/Linux IBM XL Fortran V15.1
+ (ostrich)
Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
- (kituo/moohan/jelly Version 4.8.5 20150623 (Red Hat 4.8.5-4)
- Versions 4.9.3, 5.3.0, 6.2.0
+ (jelly/kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-39)
+ Versions 4.9.3, 5.3.0, 6.3.0, 7.2.0
+ 8.3.0, 9.1.0, 10.1.0
Intel(R) C (icc), C++ (icpc), Fortran (icc)
compilers:
- Version 17.0.4.196 Build 20170411
- MPICH 3.1.4 compiled with GCC 4.9.3
- NAG Fortran Compiler Release 6.1(Tozai) Build 6116
-
- SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc
- (emu) Sun Fortran 95 8.6 SunOS_sparc
- Sun C++ 5.12 SunOS_sparc
+ Version 17.0.0.098 Build 20160721
+ MPICH 3.3 compiled with GCC 7.2.0
+ OpenMPI 4.0.0 compiled with GCC 7.2.0
+ NAG Fortran Compiler Release 7.0(Yurakuchho) Build 7011
- Windows 7 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+ SunOS 5.11 11.4.5.12.5.0 Sun C 5.15 SunOS_sparc 2017/05/30
+ 32- and 64-bit Studio 12.6 Fortran 95 8.8 SunOS_sparc 2017/05/30
+ (hedgehog) Sun C++ 5.15 SunOS_sparc 2017/05/30
- Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
- Visual Studio 2013 w/ Intel Fortran 15 (cmake)
- Visual Studio 2015 w/ Intel Fortran 16 (cmake)
- Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake)
- Visual Studio 2015 w/ MSMPI 8 (cmake)
+ Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 18 (cmake)
+ Visual Studio 2017 w/ Intel Fortran 19 (cmake)
+ Visual Studio 2019 w/ Intel Fortran 19 (cmake)
+ Visual Studio 2019 w/ MSMPI 10.1 (cmake)
- Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+ macOS High Sierra 10.13.6 Apple LLVM version 10.0.0 (clang-1000.10.44.4)
+ 64-bit gfortran GNU Fortran (GCC) 6.3.0
+ (bear) Intel icc/icpc/ifort version 19.0.4.233 20190416
- Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
- Visual Studio 2017 w/ Intel Fortran 18 (cmake)
-
- Mac OS X Mavericks 10.9.5 Apple LLVM version 6.0 (clang-600.0.57)
- 64-bit gfortran GNU Fortran (GCC) 4.9.2
- (wren/quail) Intel icc/icpc/ifort version 15.0.3
-
- Mac OS X Yosemite 10.10.5 Apple LLVM version 6.1 (clang-602.0.53)
- 64-bit gfortran GNU Fortran (GCC) 4.9.2
- (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3
-
- Mac OS X El Capitan 10.11.6 Apple LLVM version 7.3.0 (clang-703.0.29)
- 64-bit gfortran GNU Fortran (GCC) 5.2.0
- (VM osx1011dev/osx1011test) Intel icc/icpc/ifort version 16.0.2
-
- Mac OS Sierra 10.12.6 Apple LLVM version 8.1 (clang-802.0.42)
- 64-bit gfortran GNU Fortran (GCC) 7.1.0
- (kite) Intel icc/icpc/ifort version 17.0.2
+ macOS Mojave 10.14.6 Apple LLVM version 10.0.1 (clang-1001.0.46.4)
+ 64-bit gfortran GNU Fortran (GCC) 6.3.0
+ (bobcat) Intel icc/icpc/ifort version 19.0.4.233 20190416
Tested Configuration Features Summary
@@ -509,19 +671,13 @@ Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
SunOS 5.11 32-bit n y/y n y y y
SunOS 5.11 64-bit n y/y n y y y
-Windows 7 y y/y n y y y
-Windows 7 x64 y y/y n y y y
-Windows 7 Cygwin n y/n n y y y
-Windows 7 x64 Cygwin n y/n n y y y
Windows 10 y y/y n y y y
Windows 10 x64 y y/y n y y y
-Mac OS X Yosemite 10.10.5 64-bit n y/y n y y y
Mac OS X El Capitan 10.11.6 64-bit n y/y n y y y
Mac OS Sierra 10.12.6 64-bit n y/y n y y y
-AIX 6.1 32- and 64-bit n y/n n y y y
-CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y
-CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y
-CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y
+Mac OS X High Sierra 10.13.6 64-bit n y/y n y y y
+Mac OS X Mojave 10.14.6 64-bit n y/y n y y y
+CentOS 7.2 Linux 2.10.0 x86_64 PGI n y/y n y y y
CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y
CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y
Linux 2.6.32-573.18.1.el6.ppc64 n y/n n y y y
@@ -530,21 +686,15 @@ Platform Shared Shared Shared Thread-
C libs F90 libs C++ libs safe
SunOS 5.11 32-bit y y y y
SunOS 5.11 64-bit y y y y
-Windows 7 y y y y
-Windows 7 x64 y y y y
-Windows 7 Cygwin n n n y
-Windows 7 x64 Cygwin n n n y
Windows 10 y y y y
Windows 10 x64 y y y y
-Mac OS X Yosemite 10.10.5 64-bit y n y y
Mac OS X El Capitan 10.11.6 64-bit y n y y
Mac OS Sierra 10.12.6 64-bit y n y y
-AIX 6.1 32- and 64-bit y n n y
-CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y
-CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y
-CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y
-CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y
-CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y
+Mac OS X High Sierra 10.13.6 64-bit y n y y
+Mac OS X Mojave 10.14.6 64-bit y n y y
+CentOS 7.2 Linux 3.10.0 x86_64 PGI y y y y
+CentOS 7.2 Linux 3.10.0 x86_64 GNU y y y y
+CentOS 7.2 Linux 3.10.0 x86_64 Intel y y y y
Linux 2.6.32-573.18.1.el6.ppc64 y y y y
Compiler versions for each platform are listed in the preceding
@@ -555,33 +705,110 @@ More Tested Platforms
=====================
The following platforms are not supported but have been tested for this release.
- Linux 2.6.32-573.22.1.el6 g95 (GCC 4.0.3 (g95 0.94!)
+ Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
+ #1 SMP x86_64 GNU/Linux compilers:
+ (platypus) Version 4.4.7 20120313
+ Versions 4.9.3, 5.3.0, 6.2.0
+ PGI C, Fortran, C++ for 64-bit target on
+ x86-64;
+ Version 16.10-0
+ Intel(R) C (icc), C++ (icpc), Fortran (icc)
+ compilers:
+ Version 17.0.0.196 Build 20160721
+ MPICH 3.1.4 compiled with GCC 4.9.3
+ OpenMPI 2.0.1 compiled with GCC 4.9.3
+
+ Linux 2.6.32-573.18.1.el6 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+ (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+
+ Linux 3.10.0-327.18.2.el7 GNU C (gcc) and C++ (g++) compilers
+ #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4)
+ (jelly) with NAG Fortran Compiler Release 6.1(Tozai)
+ GCC Version 7.1.0
+ OpenMPI 2.1.6-GCC-7.2.0-2.29,
+ 3.1.3-GCC-7.2.0-2.29
+ Intel(R) C (icc) and C++ (icpc) compilers
+ Version 17.0.0.098 Build 20160721
+ with NAG Fortran Compiler Release 6.1(Tozai)
+
+ Linux 3.10.0-327.10.1.el7 MPICH 3.1.4 compiled with GCC 4.9.3
#1 SMP x86_64 GNU/Linux
- (mayll)
+ (moohan)
+
+ Linux-3.10.0-1127.0.0.1chaos openmpi-4.0.0
+ #1 SMP x86_64 GNU/Linux clang/3.9.0, 8.0.1
+ (quartz) gcc/7.3.0, 8.1.0
+ intel/16.0.4
+
+ Linux-4.14.0-115.10.1.1 spectrum-mpi/rolling-release
+ #1 SMP ppc64le GNU/Linux clang/coral-2018.08.08
+ (lassen) gcc/7.3.1
+ xl/2019.02.07
+
+ Linux-4.12.14-150.52-default cray-mpich/7.7.10
+ #1 SMP x86_64 GNU/Linux gcc/7.3.0, 8.2.0
+ (cori) intel/19.0.3
+
+ Linux-4.4.180-94.107-default cray-mpich/7.7.6
+ # 1SMP x86_64 GNU/Linux gcc/8.3.0, 9.3.0
+ (mutrino) intel/19.0.4
+
+ Fedora33 5.10.10-200.fc33.x86_64
+ #1 SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.1 20201125
+ (Red Hat 10.2.1-9)
+ GNU Fortran (GCC) 10.2.1 20201125
+ (Red Hat 10.2.1-9)
+ clang version 11.0.0 (Fedora 11.0.0-2.fc33)
+ (cmake and autotools)
+
+ Ubuntu20.10 5.8.0-41-generic-x86_64
+ #46-Ubuntu SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.0-13ubuntu1
+ GNU Fortran (GCC) 10.2.0-13ubuntu1
+ (cmake and autotools)
+
+ SUSE15sp2 5.3.18-22-default
+ #1 SMP x86_64 GNU/Linux GNU gcc (SUSE Linux) 7.5.0
+ GNU Fortran (SUSE Linux) 7.5.0
+ clang version 7.0.1
+ (tags/RELEASE_701/final 349238)
+ (cmake and autotools)
- Debian8.4.0 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1 x86_64 GNU/Linux
- gcc (Debian 4.9.2-10) 4.9.2
- GNU Fortran (Debian 4.9.2-10) 4.9.2
- (cmake and autotools)
+ Mac OS X El Capitan 10.11.6 Apple LLVM version 7.3.0 (clang-703.0.29)
+ 64-bit gfortran GNU Fortran (GCC) 5.2.0
+ (VM osx1011dev/osx1011test) Intel icc/icpc/ifort version 16.0.2
- Fedora24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
- gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
- GNU Fortran (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
- (cmake and autotools)
+ Mac OS Sierra 10.12.6 Apple LLVM version 8.1 (clang-802.0.42)
+ 64-bit gfortran GNU Fortran (GCC) 7.4.0
+ (kite) Intel icc/icpc/ifort version 17.0.2
+l
- CentOS 7.2 3.10.0-327.28.2.el7.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
- gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
- GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
- (cmake and autotools)
- Ubuntu 16.04 4.4.0-38-generic #62-Ubuntu SMP x86_64 GNU/Linux
- gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0
- GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0
- (cmake and autotools)
+ macOS Big Sur 11.1 Apple clang version 12.0.0 (clang-1200.0.32.28)
+ 64-bit gfortran GNU Fortran )Homebrew GCC 10.2.0) 10.2.0
+ (BIGSUR-1) Intel icc/icpc/ifort version 2021.1
+
+ SunOS 5.11 11.3 Sun C 5.15 SunOS_sparc
+ 32- and 64-bit Sun Fortran 95 8.8 SunOS_sparc
+ (emu)
Known Problems
==============
+ HDF5-1.8.22 binaries can replace the previous HDF5 version to run with
+ applications compiled and linked with HDF5-1.8.21 and possibly HDF5 versions
+ as early as 1.8.15. However, HDF5 checks versions in lib files against
+ versions in header files used to compile the application and will cause the
+ application to abort when they do not match. An environment variable
+ HDF5_DISABLE_VERSION_CHECK can be set to 2 to skip the check, to 1 to warn
+ but not abort, or to 0 for the default behavior, aborting when the HDF5
+ version in the lib files does not match the version in the header files.
+ LRK - 2020/02/02
+
+ CMake files do not behave correctly with paths containing spaces.
+ Do not use spaces in paths because the required escaping for handling spaces
+ results in very complex and fragile build files.
+ ADB - 2019/05/07
The dynamically loaded plugin test libraries require undefined references
to HDF5 functions to be resolved at runtime in order to function properly.
@@ -595,6 +822,50 @@ Known Problems
locations in .libs directories. This will be addressed in the next release
when support for the Mac OS X 10.13 platform is added.
+ CPP ptable test fails on both VS2017 and VS2019 with Intel compiler, JIRA
+ issue: HDFFV-10628. This test will pass with VS2015 with Intel compiler.
+
+ Various tests in dt_arith, fillval, and dtypes failed with core dump
+ during integer conversion on SunOS 5.11 with Sun C 5.15 SunOS_sparc in
+ 64-bit mode. It appears that these failures were caused by invalid
+ alignment, which is under investigation.
+
Known problems in previous releases can be found in the HISTORY*.txt files
in the HDF5 source. Please report any new problems found to
help@hdfgroup.org.
+
+
+CMake vs. Autotools installations
+=================================
+While both build systems produce similar results, there are differences.
+Each system produces the same set of folders on linux (only CMake works
+on standard Windows); bin, include, lib and share. Autotools places the
+COPYING and RELEASE.txt file in the root folder, CMake places them in
+the share folder.
+
+The bin folder contains the tools and the build scripts. Additionally, CMake
+creates dynamic versions of the tools with the suffix "-shared". Autotools
+installs one set of tools depending on the "--enable-shared" configuration
+option.
+ build scripts
+ -------------
+ Autotools: h5c++, h5cc, h5fc
+ CMake: h5c++, h5cc, h5hlc++, h5hlcc
+
+The include folder holds the header files and the fortran mod files. CMake
+places the fortran mod files into separate shared and static subfolders,
+while Autotools places one set of mod files into the include folder. Because
+CMake produces a tools library, the header files for tools will appear in
+the include folder.
+
+The lib folder contains the library files, and CMake adds the pkgconfig
+subfolder with the hdf5*.pc files used by the bin/build scripts created by
+the CMake build. CMake separates the C interface code from the fortran code by
+creating C-stub libraries for each Fortran library. In addition, only CMake
+installs the tools library. The names of the szip libraries are different
+between the build systems.
+
+The share folder will have the most differences because CMake builds include
+a number of CMake specific files for support of CMake's find_package and support
+for the HDF5 Examples CMake project.
+
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index 9773e0f..41bdc21 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -22,7 +22,7 @@ I. Preconditions
1. We suggest you obtain the latest CMake for windows from the Kitware
web site. The HDF5 1.8.x product requires a minimum CMake version
- of 3.2.2.
+ of 3.12. If you are using VS2019, the minimum version is 3.15.
2. You have installed the HDF5 library built with CMake, by executing
the HDF Install Utility (the *.msi file in the binary package for
@@ -38,22 +38,29 @@ II. Building HDF5 Examples with CMake
Files in the HDF5 install directory:
HDF5Examples folder
+ CTestScript.cmake
HDF518_Examples.cmake
+ HDF5_Examples_options.cmake
Default installation process:
Create a directory to run the examples, i.e. \test_hdf5.
Copy HDF5Examples folder to this directory.
- Copy HDF5_Examples.cmake to this directory.
+ Copy CTestScript.cmake to this directory.
+ Copy HDF518_Examples.cmake to this directory.
+ Copy HDF5_Examples_options.cmake to this directory.
The default source folder is defined as "HDF5Examples". It can be changed
with the CTEST_SOURCE_NAME script option.
- The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
+ The default installation folder is defined for the platform.
It can be changed with the INSTALLDIR script option.
+ (Note: Windows has issues with spaces and paths -The path will need to
+ be set correctly.)
The default ctest configuration is defined as "Release". It can be changed
with the CTEST_CONFIGURATION_TYPE script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
- Shared libraries can be used with the STATIC_ONLY script option set to "NO".
- Other options can be changed by editing the HDF518_Examples.cmake file.
+
+ Shared libraries and other options can be changed by editing the
+ HDF5_Examples_options.cmake file.
If the defaults are okay, execute from this directory:
ctest -S HDF518_Examples.cmake -C Release -V -O test.log
@@ -67,9 +74,15 @@ Default installation process:
========================================================================
-III. Other changes to the HDF518_Examples.cmake file
+III. Defaults in the HDF5_Examples_options.cmake file
========================================================================
-Line 45-48: uncomment to use a source tarball or zipfile;
- Add script option "TAR_SOURCE=MySource.tar".
+#### DEFAULT: ###
+#### BUILD_SHARED_LIBS:BOOL=OFF ###
+#### HDF_BUILD_C:BOOL=ON ###
+#### HDF_BUILD_CXX:BOOL=OFF ###
+#### HDF_BUILD_FORTRAN:BOOL=OFF ###
+#### BUILD_TESTING:BOOL=OFF ###
+#### HDF_ENABLE_PARALLEL:BOOL=OFF ###
+#### HDF_ENABLE_THREADSAFE:BOOL=OFF ###
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 0261cae..cf1ade1 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -37,7 +37,7 @@ I. Preconditions
1. We suggest you obtain the latest CMake for windows from the Kitware
web site. The HDF5 1.8.x product requires a minimum CMake version
- of 3.10.1.
+ of 3.12.
2. You have installed the HDF5 library built with CMake, by executing
the HDF Install Utility (the *.msi file in the binary package for
@@ -180,7 +180,7 @@ Given the preconditions in section I, create a CMakeLists.txt file at the
source root. Include the following text in the file:
##########################################################
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5MyApp C CXX)
set (LIB_TYPE STATIC) # or SHARED
@@ -188,13 +188,13 @@ string(TOLOWER ${LIB_TYPE} SEARCH_TYPE)
find_package (HDF5 NAMES hdf5 COMPONENTS C ${SEARCH_TYPE})
# find_package (HDF5) # Find non-cmake built HDF5
-INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
+set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIR}")
set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY})
set (example hdf_example)
add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
-TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ")
+TARGET_C_PROPERTIES (${example} PRIVATE ${LIB_TYPE})
target_link_libraries (${example} ${LINK_LIBS})
enable_testing ()
@@ -225,228 +225,6 @@ Also available at the HDF web site is a CMake application framework template.
You can quickly add files to the framework and execute the script to compile
your application with an installed HDF5 binary.
-========================================================================
-ctest use of HDF518_Examples.cmake and HDF5_Examples_options.cmake
-========================================================================
-
-cmake_minimum_required (VERSION 3.10)
-###############################################################################################################
-# This script will build and run the examples from a folder
-# Execute from a command line:
-# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -V -O test.log
-###############################################################################################################
-
-set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-if("@CMAKE_GENERATOR_TOOLSET@")
- set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
-endif()
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-
-# handle input parameters to script.
-#INSTALLDIR - HDF5 root folder
-#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5Examples
-if(DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach(current_var ${script_args})
- if("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif()
- endforeach()
-endif()
-
-###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
-if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set(CTEST_CONFIGURATION_TYPE "Release")
-endif()
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}")
-##################################################################
-
-if(NOT DEFINED INSTALLDIR)
- set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
-endif()
-
-if(NOT DEFINED CTEST_SOURCE_NAME)
- set(CTEST_SOURCE_NAME "HDF5Examples")
-endif()
-
-if(NOT DEFINED HDF_LOCAL)
- set(CDASH_LOCAL "NO")
-else()
- set(CDASH_LOCAL "YES")
-endif()
-if(NOT DEFINED CTEST_SITE)
- set(CTEST_SITE "local")
-endif()
-if(NOT DEFINED CTEST_BUILD_NAME)
- set(CTEST_BUILD_NAME "examples")
-endif()
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-
-#TAR_SOURCE - name of tarfile
-#if (NOT DEFINED TAR_SOURCE)
-# set (CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source")
-#endif ()
-
-###############################################################################################################
-if(WIN32)
- set(SITE_OS_NAME "Windows")
- set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
- set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else()
- set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
- set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
- set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif()
-if(${CDASH_LOCAL})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON")
-endif()
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
-
-###############################################################################################################
-# For any comments please contact help@hdfgroup.org
-#
-###############################################################################################################
-
-#############################################################################################
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-#### format for file: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
-#############################################################################################
-if(WIN32)
- include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake)
-else()
- include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake)
-endif()
-
-#-----------------------------------------------------------------------------
-set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-## --------------------------
-if (CTEST_USE_TAR_SOURCE)
- ## Uncompress source if tar or zip file provided
- ## --------------------------
- if (WIN32)
- message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else ()
- message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif ()
-
- if (NOT rv EQUAL 0)
- message (STATUS "extracting... [error-(${rv}) clean up]")
- file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message (FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
- endif ()
-endif ()
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
- ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
-else ()
- file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif ()
-
-# Use multiple CPU cores to build
-include (ProcessorCount)
-ProcessorCount (N)
-if (NOT N EQUAL 0)
- if (NOT WIN32)
- set (CTEST_BUILD_FLAGS -j${N})
- endif ()
- set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif ()
-set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
-)
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set ($ENV{LC_MESSAGES} "en_EN")
-
-#-----------------------------------------------------------------------------
-configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
-ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
-## NORMAL process
-## --------------------------
-ctest_start (Experimental)
-ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
-if (LOCAL_SUBMIT)
- ctest_submit (PARTS Configure Notes)
-endif ()
-ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
-if (LOCAL_SUBMIT)
- ctest_submit (PARTS Build)
-endif ()
-ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
-if (LOCAL_SUBMIT)
- ctest_submit (PARTS Test)
-endif ()
-if (res GREATER 0)
- message (FATAL_ERROR "tests FAILED")
-endif ()
-#-----------------------------------------------------------------------------
-##############################################################################################################
-
-##############################################################################################################
-#### HDF5_Examples_options.cmake ###
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-##############################################################################################################
-#############################################################################################
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
-#### DEFAULT: ###
-#### BUILD_SHARED_LIBS:BOOL=OFF ###
-#### HDF_BUILD_C:BOOL=ON ###
-#### HDF_BUILD_CXX:BOOL=OFF ###
-#### HDF_BUILD_FORTRAN:BOOL=OFF ###
-#### BUILD_TESTING:BOOL=OFF ###
-#### HDF_ENABLE_PARALLEL:BOOL=OFF ###
-#### HDF_ENABLE_THREADSAFE:BOOL=OFF ###
-#############################################################################################
-
-### uncomment/comment and change the following lines for other configuration options
-### build with shared libraries
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")
-
-#############################################################################################
-#### languages ####
-### disable C builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF")
-
-### enable C++ builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_CXX:BOOL=ON")
-
-### enable Fortran builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
-
-#############################################################################################
-### enable parallel program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON")
-
-#############################################################################################
-### enable threadsafe program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_THREADSAFE:BOOL=ON")
-
-#############################################################################################
-### enable test program builds, requires reference files in testfiles subdirectory
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON")
-
-#############################################################################################
-
-
========================================================================
For further assistance, send email to help@hdfgroup.org
diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt
index b098f12..3fd0453 100644
--- a/release_docs/USING_HDF5_VS.txt
+++ b/release_docs/USING_HDF5_VS.txt
@@ -12,34 +12,62 @@ be found in the USING_HDF5_CMake.txt file found in this folder.
NOTE: Building applications with the dynamic/shared hdf5 libraries requires
that the "H5_BUILT_AS_DYNAMIC_LIB" compile definition be used.
-The following two sections are helpful if you choose to not use CMake to build
+The following two sections are helpful if you do not use CMake to build
your applications. Consult the Microsoft documentation for your product
for more information.
-========================================================================
-Using Visual Studio with HDF5 Libraries
-========================================================================
+==============================================================================================
+Using Visual Studio 2010 and above with HDF5 Libraries built with Visual Studio 2010 and above
+==============================================================================================
+
+ 1. Set up path for external libraries and headers
+
+ The path settings will need to be in the project property sheets per project.
+ Go to "Project" and select "Properties", find "Configuration Properties",
+ and then "VC++ Directories".
- 1. The HDF5 binary must match with your Visual Studio version
+ 1.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
+
+ 1.2 Add the header path to the "Include Directories" setting.
+
+ 1.3 Add the library path to the "Library Directories" setting.
+
+ 1.4 Select Linker->Input and beginning with the
+ "Additional Dependencies" line, enter the library names. The
+ external libraries should be listed first, followed by the HDF5
+ library, and then optionally the HDF5 High Level, Fortran or C++
+ libraries. For example, to compile a C++ application, enter:
+
+ szip.lib zlib.lib hdf5.lib hdf5_cpp.lib
+
+
+==========================================================================
+Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
+==========================================================================
2. Set up the path for external libraries and headers
- Follow the Microsoft guidelines for adding third-party libraries.
+ Invoke Microsoft Visual Studio and go to "Tools" and select "Options",
+ find "Projects", and then "VC++ Directories".
- 2.1 If you are building on 64-bit Windows, be sure the binary is
- built for the your intended "Platform"; 64-bit or 32-bit.
+ 2.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
- 2.2 Add the header path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\include)
- to the included directories settings.
+ 2.2 Find the box "Show directories for", choose "Include files", add the
+ header path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\include)
+ to the included directories.
- 2.3 Add the library path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\lib)
+ 2.3 Find the box "Show directories for", choose "Library files", add the
+ library path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\lib)
to the library directories.
2.4 If using Fortran libraries, you will also need to setup the path
for the Intel Fortran compiler.
- 2.5 Enter the library names into the linker "Additional Dependencies" line.
- The external libraries should be listed first, followed by the HDF5
+ 2.5 Select Project->Properties->Linker->Input and beginning with the
+ "Additional Dependencies" line, enter the library names. The
+ external libraries should be listed first, followed by the HDF5
library, and then optionally the HDF5 High Level, Fortran or C++
libraries. For example, to compile a C++ application, enter:
@@ -52,13 +80,9 @@ Using Visual Studio with HDF5 Libraries
3.1 FAQ
Many other common questions and hints are located online and being updated
- in the HDF5 FAQ. For Windows-specific questions, please see:
-
- http://support.hdfgroup.org/HDF5/faq/windows.html
-
- For all other general questions, you can look in the general FAQ:
+ in the HDF Knowledge Base, please see:
- http://support.hdfgroup.org/HDF5/HDF5-FAQ.html
+ https://portal.hdfgroup.org/display/knowledge/HDF+Knowledge+Base
************************************************************************
Please send email to help@hdfgroup.org for further assistance.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d2f1bc..772fc6f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,15 +1,10 @@
-cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_SRC C CXX)
-
-#-----------------------------------------------------------------------------
-# Apply Definitions to compiler in this directory and below
-#-----------------------------------------------------------------------------
-add_definitions (${HDF_EXTRA_C_FLAGS})
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_SRC C)
#-----------------------------------------------------------------------------
# List Source Files
#-----------------------------------------------------------------------------
-set (H5_SRCS
+set (H5_SOURCES
${HDF5_SRC_DIR}/H5.c
${HDF5_SRC_DIR}/H5checksum.c
${HDF5_SRC_DIR}/H5dbg.c
@@ -22,12 +17,12 @@ set (H5_HDRS
${HDF5_SRC_DIR}/hdf5.h
${HDF5_SRC_DIR}/H5api_adpt.h
${HDF5_SRC_DIR}/H5public.h
- ${HDF5_SRC_DIR}/H5version.h
- ${HDF5_SRC_DIR}/H5overflow.h
+ #${HDF5_SRC_DIR}/H5version.h
+ #${HDF5_SRC_DIR}/H5overflow.h
)
-IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SOURCES}" )
-set (H5A_SRCS
+set (H5A_SOURCES
${HDF5_SRC_DIR}/H5A.c
${HDF5_SRC_DIR}/H5Abtree2.c
${HDF5_SRC_DIR}/H5Adense.c
@@ -37,23 +32,30 @@ set (H5A_SRCS
)
set (H5A_HDRS
- ${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Apublic.h
)
-IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SOURCES}" )
-set (H5AC_SRCS
+set (H5AC_SOURCES
${HDF5_SRC_DIR}/H5AC.c
)
set (H5AC_HDRS
- ${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SOURCES}" )
-set (H5B_SRCS
+set (H5B_SOURCES
${HDF5_SRC_DIR}/H5B.c
+ ${HDF5_SRC_DIR}/H5Bcache.c
+ ${HDF5_SRC_DIR}/H5Bdbg.c
+)
+set (H5B_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SOURCES}" )
+
+
+set (H5B2_SOURCES
${HDF5_SRC_DIR}/H5B2.c
${HDF5_SRC_DIR}/H5B2cache.c
${HDF5_SRC_DIR}/H5B2dbg.c
@@ -61,23 +63,34 @@ set (H5B_SRCS
${HDF5_SRC_DIR}/H5B2int.c
${HDF5_SRC_DIR}/H5B2stat.c
${HDF5_SRC_DIR}/H5B2test.c
- ${HDF5_SRC_DIR}/H5Bcache.c
- ${HDF5_SRC_DIR}/H5Bdbg.c
)
+set (H5B2_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SOURCES}" )
-set (H5B_HDRS
- ${HDF5_SRC_DIR}/H5B2pkg.h
- ${HDF5_SRC_DIR}/H5B2public.h
- ${HDF5_SRC_DIR}/H5Bpkg.h
- ${HDF5_SRC_DIR}/H5Bpublic.h
+
+set (H5C_SOURCES
+ ${HDF5_SRC_DIR}/H5C.c
+)
+set (H5C_HDRS
+ ${HDF5_SRC_DIR}/H5Cpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SOURCES}" )
+
+
+set (H5CS_SOURCES
+ ${HDF5_SRC_DIR}/H5CS.c
+)
+set (H5CS_HDRS
)
-IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5CS" "${H5CS_HDRS}" "${H5CS_SOURCES}" )
-set (H5D_SRCS
+
+set (H5D_SOURCES
${HDF5_SRC_DIR}/H5D.c
- ${HDF5_SRC_DIR}/H5Dcompact.c
${HDF5_SRC_DIR}/H5Dbtree.c
${HDF5_SRC_DIR}/H5Dchunk.c
+ ${HDF5_SRC_DIR}/H5Dcompact.c
${HDF5_SRC_DIR}/H5Dcontig.c
${HDF5_SRC_DIR}/H5Ddbg.c
${HDF5_SRC_DIR}/H5Ddeprec.c
@@ -94,35 +107,30 @@ set (H5D_SRCS
)
set (H5D_HDRS
- ${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SOURCES}" )
-set (H5E_SRCS
+set (H5E_SOURCES
${HDF5_SRC_DIR}/H5E.c
${HDF5_SRC_DIR}/H5Edeprec.c
${HDF5_SRC_DIR}/H5Eint.c
)
set (H5E_HDRS
- ${HDF5_SRC_DIR}/H5Edefin.h
- ${HDF5_SRC_DIR}/H5Einit.h
- ${HDF5_SRC_DIR}/H5Epkg.h
${HDF5_SRC_DIR}/H5Epubgen.h
${HDF5_SRC_DIR}/H5Epublic.h
- ${HDF5_SRC_DIR}/H5Eterm.h
)
-IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SOURCES}" )
-set (H5F_SRCS
+set (H5F_SOURCES
${HDF5_SRC_DIR}/H5F.c
- ${HDF5_SRC_DIR}/H5Fint.c
${HDF5_SRC_DIR}/H5Faccum.c
${HDF5_SRC_DIR}/H5Fcwfs.c
${HDF5_SRC_DIR}/H5Fdbg.c
${HDF5_SRC_DIR}/H5Fefc.c
${HDF5_SRC_DIR}/H5Ffake.c
+ ${HDF5_SRC_DIR}/H5Fint.c
${HDF5_SRC_DIR}/H5Fio.c
${HDF5_SRC_DIR}/H5Fmount.c
${HDF5_SRC_DIR}/H5Fmpi.c
@@ -134,42 +142,65 @@ set (H5F_SRCS
)
set (H5F_HDRS
- ${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SOURCES}" )
-set (H5FD_SRCS
+set (H5FD_SOURCES
${HDF5_SRC_DIR}/H5FD.c
${HDF5_SRC_DIR}/H5FDcore.c
${HDF5_SRC_DIR}/H5FDdirect.c
${HDF5_SRC_DIR}/H5FDfamily.c
+ ${HDF5_SRC_DIR}/H5FDhdfs.c
${HDF5_SRC_DIR}/H5FDint.c
${HDF5_SRC_DIR}/H5FDlog.c
${HDF5_SRC_DIR}/H5FDmpi.c
${HDF5_SRC_DIR}/H5FDmpio.c
${HDF5_SRC_DIR}/H5FDmulti.c
+ ${HDF5_SRC_DIR}/H5FDros3.c
+ ${HDF5_SRC_DIR}/H5FDs3comms.c
${HDF5_SRC_DIR}/H5FDsec2.c
${HDF5_SRC_DIR}/H5FDspace.c
${HDF5_SRC_DIR}/H5FDstdio.c
+ ${HDF5_SRC_DIR}/H5FDwindows.c
)
set (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDcore.h
${HDF5_SRC_DIR}/H5FDdirect.h
${HDF5_SRC_DIR}/H5FDfamily.h
+ ${HDF5_SRC_DIR}/H5FDhdfs.h
${HDF5_SRC_DIR}/H5FDlog.h
${HDF5_SRC_DIR}/H5FDmpi.h
${HDF5_SRC_DIR}/H5FDmpio.h
${HDF5_SRC_DIR}/H5FDmulti.h
- ${HDF5_SRC_DIR}/H5FDpkg.h
${HDF5_SRC_DIR}/H5FDpublic.h
+ ${HDF5_SRC_DIR}/H5FDros3.h
+ ${HDF5_SRC_DIR}/H5FDs3comms.h
${HDF5_SRC_DIR}/H5FDsec2.h
${HDF5_SRC_DIR}/H5FDstdio.h
+ ${HDF5_SRC_DIR}/H5FDwindows.h
)
-IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SOURCES}" )
-set (H5FS_SRCS
+
+set (H5FL_SOURCES
+ ${HDF5_SRC_DIR}/H5FL.c
+)
+set (H5FL_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5FL" "${H5FL_HDRS}" "${H5FL_SOURCES}" )
+
+
+set (H5FO_SOURCES
+ ${HDF5_SRC_DIR}/H5FO.c
+)
+set (H5FO_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5FO" "${H5FO_HDRS}" "${H5FO_SOURCES}" )
+
+
+set (H5FS_SOURCES
${HDF5_SRC_DIR}/H5FS.c
${HDF5_SRC_DIR}/H5FScache.c
${HDF5_SRC_DIR}/H5FSdbg.c
@@ -179,12 +210,10 @@ set (H5FS_SRCS
)
set (H5FS_HDRS
- ${HDF5_SRC_DIR}/H5FSpkg.h
- ${HDF5_SRC_DIR}/H5FSpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SOURCES}" )
-set (H5G_SRCS
+set (H5G_SOURCES
${HDF5_SRC_DIR}/H5G.c
${HDF5_SRC_DIR}/H5Gbtree2.c
${HDF5_SRC_DIR}/H5Gcache.c
@@ -206,12 +235,11 @@ set (H5G_SRCS
)
set (H5G_HDRS
- ${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SOURCES}" )
-set (H5HF_SRCS
+set (H5HF_SOURCES
${HDF5_SRC_DIR}/H5HF.c
${HDF5_SRC_DIR}/H5HFbtree2.c
${HDF5_SRC_DIR}/H5HFcache.c
@@ -231,12 +259,10 @@ set (H5HF_SRCS
)
set (H5HF_HDRS
- ${HDF5_SRC_DIR}/H5HFpkg.h
- ${HDF5_SRC_DIR}/H5HFpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SOURCES}" )
-set (H5HG_SRCS
+set (H5HG_SOURCES
${HDF5_SRC_DIR}/H5HG.c
${HDF5_SRC_DIR}/H5HGcache.c
${HDF5_SRC_DIR}/H5HGdbg.c
@@ -244,12 +270,10 @@ set (H5HG_SRCS
)
set (H5HG_HDRS
- ${HDF5_SRC_DIR}/H5HGpkg.h
- ${HDF5_SRC_DIR}/H5HGpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SOURCES}" )
-set (H5HL_SRCS
+set (H5HL_SOURCES
${HDF5_SRC_DIR}/H5HL.c
${HDF5_SRC_DIR}/H5HLcache.c
${HDF5_SRC_DIR}/H5HLdbg.c
@@ -257,12 +281,39 @@ set (H5HL_SRCS
)
set (H5HL_HDRS
- ${HDF5_SRC_DIR}/H5HLpkg.h
- ${HDF5_SRC_DIR}/H5HLpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SOURCES}" )
+
+
+set (H5HP_SOURCES
+ ${HDF5_SRC_DIR}/H5HP.c
+)
+set (H5HP_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5HP" "${H5HP_HDRS}" "${H5HP_SOURCES}" )
-set (H5MF_SRCS
+
+set (H5I_SOURCES
+ ${HDF5_SRC_DIR}/H5I.c
+ ${HDF5_SRC_DIR}/H5Itest.c
+)
+set (H5I_HDRS
+ ${HDF5_SRC_DIR}/H5Ipublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SOURCES}" )
+
+
+set (H5L_SOURCES
+ ${HDF5_SRC_DIR}/H5L.c
+ ${HDF5_SRC_DIR}/H5Lexternal.c
+)
+set (H5L_HDRS
+ ${HDF5_SRC_DIR}/H5Lpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SOURCES}" )
+
+
+set (H5MF_SOURCES
${HDF5_SRC_DIR}/H5MF.c
${HDF5_SRC_DIR}/H5MFaggr.c
${HDF5_SRC_DIR}/H5MFdbg.c
@@ -271,19 +322,28 @@ set (H5MF_SRCS
set (H5MF_HDRS
)
-IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SOURCES}" )
+
+
+set (H5MM_SOURCES
+ ${HDF5_SRC_DIR}/H5MM.c
+)
+set (H5MM_HDRS
+ ${HDF5_SRC_DIR}/H5MMpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5MM" "${H5MM_HDRS}" "${H5MM_SOURCES}" )
+
-set (H5MP_SRCS
+set (H5MP_SOURCES
${HDF5_SRC_DIR}/H5MP.c
${HDF5_SRC_DIR}/H5MPtest.c
)
set (H5MP_HDRS
- ${HDF5_SRC_DIR}/H5MPpkg.h
)
-IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" )
-set (H5O_SRCS
+set (H5O_SOURCES
${HDF5_SRC_DIR}/H5O.c
${HDF5_SRC_DIR}/H5Oainfo.c
${HDF5_SRC_DIR}/H5Oalloc.c
@@ -319,13 +379,11 @@ set (H5O_SRCS
)
set (H5O_HDRS
- ${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Opublic.h
- ${HDF5_SRC_DIR}/H5Oshared.h
)
-IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SOURCES}" )
-set (H5P_SRCS
+set (H5P_SOURCES
${HDF5_SRC_DIR}/H5P.c
${HDF5_SRC_DIR}/H5Pacpl.c
${HDF5_SRC_DIR}/H5Pdapl.c
@@ -346,50 +404,48 @@ set (H5P_SRCS
)
set (H5P_HDRS
- ${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Ppublic.h
)
-IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SOURCES}" )
-set (H5PL_SRCS
+set (H5PL_SOURCES
${HDF5_SRC_DIR}/H5PL.c
)
set (H5PL_HDRS
${HDF5_SRC_DIR}/H5PLextern.h
- ${HDF5_SRC_DIR}/H5PLpkg.h
${HDF5_SRC_DIR}/H5PLpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SOURCES}" )
-set (H5R_SRCS
+set (H5R_SOURCES
${HDF5_SRC_DIR}/H5R.c
${HDF5_SRC_DIR}/H5Rdeprec.c
)
set (H5R_HDRS
- ${HDF5_SRC_DIR}/H5Rpkg.h
${HDF5_SRC_DIR}/H5Rpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SOURCES}" )
-set (H5RC_SRCS
+set (H5RC_SOURCES
${HDF5_SRC_DIR}/H5RC.c
)
set (H5RC_HDRS
)
-IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SOURCES}" )
-set (H5RS_SRCS
+set (H5RS_SOURCES
${HDF5_SRC_DIR}/H5RS.c
)
set (H5RS_HDRS
)
-IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SOURCES}" )
+
-set (H5S_SRCS
+set (H5S_SOURCES
${HDF5_SRC_DIR}/H5S.c
${HDF5_SRC_DIR}/H5Sall.c
${HDF5_SRC_DIR}/H5Sdbg.c
@@ -402,12 +458,20 @@ set (H5S_SRCS
)
set (H5S_HDRS
- ${HDF5_SRC_DIR}/H5Spkg.h
${HDF5_SRC_DIR}/H5Spublic.h
)
-IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SOURCES}" )
+
-set (H5SM_SRCS
+set (H5SL_SOURCES
+ ${HDF5_SRC_DIR}/H5SL.c
+)
+set (H5SL_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5SL" "${H5SL_HDRS}" "${H5SL_SOURCES}" )
+
+
+set (H5SM_SOURCES
${HDF5_SRC_DIR}/H5SM.c
${HDF5_SRC_DIR}/H5SMbtree2.c
${HDF5_SRC_DIR}/H5SMcache.c
@@ -416,11 +480,19 @@ set (H5SM_SRCS
)
set (H5SM_HDRS
- ${HDF5_SRC_DIR}/H5SMpkg.h
)
-IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SOURCES}" )
+
-set (H5T_SRCS
+set (H5ST_SOURCES
+ ${HDF5_SRC_DIR}/H5ST.c
+)
+set (H5ST_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5ST" "${H5ST_HDRS}" "${H5ST_SOURCES}" )
+
+
+set (H5T_SOURCES
${HDF5_SRC_DIR}/H5T.c
${HDF5_SRC_DIR}/H5Tarray.c
${HDF5_SRC_DIR}/H5Tbit.c
@@ -447,12 +519,36 @@ set (H5T_SRCS
)
set (H5T_HDRS
- ${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SOURCES}" )
+
+
+set (H5TS_SOURCES
+ ${HDF5_SRC_DIR}/H5TS.c
+)
+set (H5TS_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5TS" "${H5TS_HDRS}" "${H5TS_SOURCES}" )
+
+
+set (H5VM_SOURCES
+ ${HDF5_SRC_DIR}/H5VM.c
+)
+set (H5VM_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5VM" "${H5VM_HDRS}" "${H5VM_SOURCES}" )
+
+
+set (H5WB_SOURCES
+ ${HDF5_SRC_DIR}/H5WB.c
+)
+set (H5WB_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5WB" "${H5WB_HDRS}" "${H5WB_SOURCES}" )
-set (H5Z_SRCS
+
+set (H5Z_SOURCES
${HDF5_SRC_DIR}/H5Z.c
${HDF5_SRC_DIR}/H5Zdeflate.c
${HDF5_SRC_DIR}/H5Zfletcher32.c
@@ -469,56 +565,50 @@ endif ()
set (H5Z_HDRS
- ${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SOURCES}" )
set (common_SRCS
- ${H5_SRCS}
- ${H5A_SRCS}
- ${H5AC_SRCS}
- ${H5B_SRCS}
- ${H5D_SRCS}
- ${H5E_SRCS}
- ${H5F_SRCS}
- ${H5FD_SRCS}
- ${H5FS_SRCS}
- ${H5G_SRCS}
- ${H5HF_SRCS}
- ${H5HG_SRCS}
- ${H5HL_SRCS}
- ${H5MF_SRCS}
- ${H5MP_SRCS}
- ${H5O_SRCS}
- ${H5P_SRCS}
- ${H5PL_SRCS}
- ${H5R_SRCS}
- ${H5RC_SRCS}
- ${H5RS_SRCS}
- ${H5S_SRCS}
- ${H5SM_SRCS}
- ${H5T_SRCS}
- ${H5Z_SRCS}
- ${HDF5_SRC_DIR}/H5C.c
- ${HDF5_SRC_DIR}/H5CS.c
- ${HDF5_SRC_DIR}/H5FL.c
- ${HDF5_SRC_DIR}/H5FO.c
- ${HDF5_SRC_DIR}/H5HP.c
- ${HDF5_SRC_DIR}/H5I.c
- ${HDF5_SRC_DIR}/H5Itest.c
- ${HDF5_SRC_DIR}/H5L.c
- ${HDF5_SRC_DIR}/H5Lexternal.c
- ${HDF5_SRC_DIR}/H5MM.c
- ${HDF5_SRC_DIR}/H5R.c
- ${HDF5_SRC_DIR}/H5RC.c
- ${HDF5_SRC_DIR}/H5Rdeprec.c
- ${HDF5_SRC_DIR}/H5RS.c
- ${HDF5_SRC_DIR}/H5SL.c
- ${HDF5_SRC_DIR}/H5ST.c
- ${HDF5_SRC_DIR}/H5TS.c
- ${HDF5_SRC_DIR}/H5VM.c
- ${HDF5_SRC_DIR}/H5WB.c
+ ${H5_SOURCES}
+ ${H5A_SOURCES}
+ ${H5AC_SOURCES}
+ ${H5B_SOURCES}
+ ${H5B2_SOURCES}
+ ${H5C_SOURCES}
+ ${H5CS_SOURCES}
+ ${H5D_SOURCES}
+ ${H5E_SOURCES}
+ ${H5F_SOURCES}
+ ${H5FD_SOURCES}
+ ${H5FL_SOURCES}
+ ${H5FO_SOURCES}
+ ${H5FS_SOURCES}
+ ${H5G_SOURCES}
+ ${H5HF_SOURCES}
+ ${H5HG_SOURCES}
+ ${H5HL_SOURCES}
+ ${H5HP_SOURCES}
+ ${H5I_SOURCES}
+ ${H5L_SOURCES}
+ ${H5MF_SOURCES}
+ ${H5MM_SOURCES}
+ ${H5MP_SOURCES}
+ ${H5O_SOURCES}
+ ${H5P_SOURCES}
+ ${H5PL_SOURCES}
+ ${H5R_SOURCES}
+ ${H5RC_SOURCES}
+ ${H5RS_SOURCES}
+ ${H5S_SOURCES}
+ ${H5SL_SOURCES}
+ ${H5SM_SOURCES}
+ ${H5ST_SOURCES}
+ ${H5T_SOURCES}
+ ${H5TS_SOURCES}
+ ${H5VM_SOURCES}
+ ${H5WB_SOURCES}
+ ${H5Z_SOURCES}
)
set (H5_PUBLIC_HEADERS
@@ -526,6 +616,8 @@ set (H5_PUBLIC_HEADERS
${H5A_HDRS}
${H5AC_HDRS}
${H5B_HDRS}
+ ${H5B2_HDRS}
+ ${H5C_HDRS}
${H5D_HDRS}
${H5E_HDRS}
${H5F_HDRS}
@@ -535,7 +627,10 @@ set (H5_PUBLIC_HEADERS
${H5HF_HDRS}
${H5HG_HDRS}
${H5HL_HDRS}
+ ${H5I_HDRS}
+ ${H5L_HDRS}
${H5MF_HDRS}
+ ${H5MM_HDRS}
${H5MP_HDRS}
${H5O_HDRS}
${H5P_HDRS}
@@ -545,218 +640,427 @@ set (H5_PUBLIC_HEADERS
${H5SM_HDRS}
${H5T_HDRS}
${H5Z_HDRS}
- ${HDF5_SRC_DIR}/H5Cpkg.h
- ${HDF5_SRC_DIR}/H5Cpublic.h
- ${HDF5_SRC_DIR}/H5Ipkg.h
- ${HDF5_SRC_DIR}/H5Ipublic.h
- ${HDF5_SRC_DIR}/H5Lpkg.h
- ${HDF5_SRC_DIR}/H5Lpublic.h
- ${HDF5_SRC_DIR}/H5MMpublic.h
- ${HDF5_SRC_DIR}/H5Rpkg.h
- ${HDF5_SRC_DIR}/H5Rpublic.h
)
-# --------------------------------------------------------------------
-# If we are compiling on Windows then add the windows specific files
-# --------------------------------------------------------------------
-if (WIN32)
- set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
- set (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
-endif ()
-
set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
+
+ ${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Aprivate.h
+
+ ${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACprivate.h
- ${HDF5_SRC_DIR}/H5B2private.h
+
+ ${HDF5_SRC_DIR}/H5Bpkg.h
${HDF5_SRC_DIR}/H5Bprivate.h
+
+ ${HDF5_SRC_DIR}/H5B2pkg.h
+ ${HDF5_SRC_DIR}/H5B2private.h
+
+ ${HDF5_SRC_DIR}/H5Cpkg.h
+ ${HDF5_SRC_DIR}/H5Cprivate.h
+
${HDF5_SRC_DIR}/H5CSprivate.h
+
+ ${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dprivate.h
+
+ ${HDF5_SRC_DIR}/H5Edefin.h
+ ${HDF5_SRC_DIR}/H5Einit.h
+ ${HDF5_SRC_DIR}/H5Epkg.h
${HDF5_SRC_DIR}/H5Eprivate.h
- ${HDF5_SRC_DIR}/H5FDprivate.h
+ ${HDF5_SRC_DIR}/H5Eterm.h
+
+ ${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fprivate.h
+
+ ${HDF5_SRC_DIR}/H5FDpkg.h
+ ${HDF5_SRC_DIR}/H5FDprivate.h
+
${HDF5_SRC_DIR}/H5FLprivate.h
+
${HDF5_SRC_DIR}/H5FOprivate.h
- ${HDF5_SRC_DIR}/H5MFprivate.h
- ${HDF5_SRC_DIR}/H5MMprivate.h
- ${HDF5_SRC_DIR}/H5Cprivate.h
+
+ ${HDF5_SRC_DIR}/H5FSpkg.h
${HDF5_SRC_DIR}/H5FSprivate.h
+
+ ${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gprivate.h
+
+ ${HDF5_SRC_DIR}/H5HFpkg.h
${HDF5_SRC_DIR}/H5HFprivate.h
+
+ ${HDF5_SRC_DIR}/H5HGpkg.h
${HDF5_SRC_DIR}/H5HGprivate.h
+
+ ${HDF5_SRC_DIR}/H5HLpkg.h
${HDF5_SRC_DIR}/H5HLprivate.h
+
${HDF5_SRC_DIR}/H5HPprivate.h
+
+ ${HDF5_SRC_DIR}/H5Ipkg.h
${HDF5_SRC_DIR}/H5Iprivate.h
+
+ ${HDF5_SRC_DIR}/H5Lpkg.h
${HDF5_SRC_DIR}/H5Lprivate.h
+
+ ${HDF5_SRC_DIR}/H5MFpkg.h
+ ${HDF5_SRC_DIR}/H5MFprivate.h
+
+ ${HDF5_SRC_DIR}/H5MMprivate.h
+
+ ${HDF5_SRC_DIR}/H5MPpkg.h
${HDF5_SRC_DIR}/H5MPprivate.h
+
+ ${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Oprivate.h
+ ${HDF5_SRC_DIR}/H5Oshared.h
+
+ ${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Pprivate.h
+
+ ${HDF5_SRC_DIR}/H5PLpkg.h
${HDF5_SRC_DIR}/H5PLprivate.h
+
${HDF5_SRC_DIR}/H5RCprivate.h
+
+ ${HDF5_SRC_DIR}/H5Rpkg.h
${HDF5_SRC_DIR}/H5Rprivate.h
+
${HDF5_SRC_DIR}/H5RSprivate.h
+
+ ${HDF5_SRC_DIR}/H5Spkg.h
+ ${HDF5_SRC_DIR}/H5Sprivate.h
+
${HDF5_SRC_DIR}/H5SLprivate.h
+
+ ${HDF5_SRC_DIR}/H5SMpkg.h
${HDF5_SRC_DIR}/H5SMprivate.h
- ${HDF5_SRC_DIR}/H5Sprivate.h
+
${HDF5_SRC_DIR}/H5STprivate.h
+
+ ${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tprivate.h
+
${HDF5_SRC_DIR}/H5TSprivate.h
+
${HDF5_SRC_DIR}/H5VMprivate.h
+
${HDF5_SRC_DIR}/H5WBprivate.h
+
+ ${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zprivate.h
+
${HDF5_SRC_DIR}/H5win32defs.h
)
+set (H5_GENERATED_HEADERS
+ ${HDF5_SRC_DIR}/H5Edefin.h
+ ${HDF5_SRC_DIR}/H5Einit.h
+ ${HDF5_SRC_DIR}/H5Epubgen.h
+ ${HDF5_SRC_DIR}/H5Eterm.h
+ ${HDF5_SRC_DIR}/H5version.h
+ ${HDF5_SRC_DIR}/H5overflow.h
+)
+
+set (H5_PUBLIC_GENERATED_HEADERS
+ ${HDF5_SRC_DIR}/H5Epubgen.h
+ ${HDF5_SRC_DIR}/H5version.h
+ ${HDF5_SRC_DIR}/H5overflow.h
+)
+
+option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF)
+if (HDF5_GENERATE_HEADERS)
+ set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE)
+ find_package (Perl)
+ if (PERL_FOUND)
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
+ )
+ message(STATUS ${SCRIPT_OUTPUT})
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SRC_DIR}/H5vers.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
+ )
+ message(STATUS ${SCRIPT_OUTPUT})
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SRC_DIR}/H5overflow.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
+ )
+ message(STATUS ${SCRIPT_OUTPUT})
+ else ()
+ message (STATUS "Cannot generate headers - perl not found")
+ endif ()
+endif ()
+
#-----------------------------------------------------------------------------
-# Setup the H5Detect utility which generates H5Tinit with platform
+# Setup the H5detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-TARGET_C_PROPERTIES (H5detect STATIC " " " ")
-if (MSVC OR MINGW)
- target_link_libraries (H5detect "ws2_32.lib")
-endif ()
-if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
- set_property(TARGET H5detect PROPERTY LINK_FLAGS "-O0")
+if (HDF5_USE_PREGEN)
+ set (HDF5_GENERATED_SOURCE_DIR ${HDF5_USE_PREGEN_DIR})
+else ()
+ set (HDF5_GENERATED_SOURCE_DIR ${HDF5_SRC_BINARY_DIR})
endif ()
-add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
- COMMAND $<TARGET_FILE:H5detect>
- ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
- DEPENDS H5detect
-)
-
-add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
-TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
-if (MSVC OR MINGW)
- target_link_libraries (H5make_libsettings "ws2_32.lib")
+if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_SRC_BINARY_DIR}/shared")
endif ()
-if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
- set_property(TARGET H5make_libsettings PROPERTY LINK_FLAGS "-O0")
+
+if (LOCAL_BATCH_TEST)
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
+ configure_file (
+ ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_COMMAND}
+ ${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_COMMAND} ESCAPE_QUOTES @ONLY
+ )
+ endif ()
+ if (LOCAL_BATCH_SCRIPT_NAME)
+ configure_file (
+ ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}.in.cmake
+ ${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_NAME} ESCAPE_QUOTES @ONLY
+ )
+ endif ()
+ if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME)
+ configure_file (
+ ${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}.in.cmake
+ ${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME} ESCAPE_QUOTES @ONLY
+ )
+ endif ()
endif ()
-add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
- COMMAND $<TARGET_FILE:H5make_libsettings>
- ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
- DEPENDS H5make_libsettings
- WORKING_DIRECTORY ${HDF5_BINARY_DIR}
-)
+if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
+ add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+ target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS})
+ TARGET_C_PROPERTIES (H5detect STATIC)
+ target_link_libraries (H5detect
+ PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
+ )
-if (GENERATE_ERROR_HEADERS)
- find_package (Perl)
- if (PERL_FOUND)
- add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5Edefin.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5err.txt
- COMMENT " Creating err header"
+ if (HDF5_BATCH_H5DETECT)
+ configure_file (
+ ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake
+ ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY
)
-
add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5version.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5vers.txt
- COMMENT " Creating API version macro"
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ COMMAND ${HDF5_BATCH_CMD}
+ ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E echo "Executed batch command to create H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ DEPENDS H5detect
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
-
+ add_custom_target (gen_H5Tinit
+ COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake
+ )
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit_created
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
+ else ()
add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5overflow.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
- DEPENDS ${HDF5_SOURCE_DIR}/src/H5overflow.txt
- COMMENT " Creating Assignment overflow macro"
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect>
+ ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ DEPENDS H5detect
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
-
- add_custom_target(run_perl_scripts ALL
- DEPENDS ${HDF5_BINARY_DIR}/H5Edefin.h ${HDF5_BINARY_DIR}/H5version.h ${HDF5_BINARY_DIR}/H5overflow.h
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
+ endif ()
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
+else ()
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
- else ()
- message (STATUS "Cannot generate headers - perl not found")
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
endif ()
#-----------------------------------------------------------------------------
-# Add H5Tinit source to build - generated by H5Detect/CMake at configure time
+# Add Target to clang-format
#-----------------------------------------------------------------------------
-set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5Tinit.c GENERATED)
-set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c GENERATED)
-set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Edefin.h)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5Edefin.h GENERATED)
-set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5version.h)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED)
-set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
-
-add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
-if (NOT WIN32)
- target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS})
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_SRC_DETECT_FORMAT ${HDF5_SRC_DIR}/H5detect.c)
endif ()
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
- FOLDER libraries
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+
+add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
+target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS})
+TARGET_C_PROPERTIES (H5make_libsettings STATIC)
+target_link_libraries (H5make_libsettings
+ PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
-option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
-if (HDF5_ENABLE_DEBUG_APIS)
- set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
- COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG"
- )
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings)
endif ()
-set (install_targets ${HDF5_LIB_TARGET})
+add_custom_command (
+ OUTPUT ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings>
+ ARGS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2
+ DEPENDS H5make_libsettings
+ WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
+)
+set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
- TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
+ add_custom_command (
+ OUTPUT ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c
+ ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_SRC_BINARY_DIR}/H5lib_settings.c" "${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2
+ DEPENDS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
+ )
+ set_source_files_properties (${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
+endif ()
+
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
+option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
+
+#-----------------------------------------------------------------------------
+# Add H5Tinit source to build - generated by H5detect/CMake at configure time
+#-----------------------------------------------------------------------------
+if (NOT ONLY_SHARED_LIBS)
+ set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c)
+ add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2)
+
+ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
+ target_include_directories (${HDF5_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_SRC_BINARY_DIR}>"
+ )
+ target_compile_options(${HDF5_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_LIB_TARGET}
+ PUBLIC
+ ${HDF_EXTRA_C_FLAGS}
+ ${HDF_EXTRA_FLAGS}
+ PRIVATE
+ $<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ )
+ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_LIB_TARGET}
+ PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>
+ )
if (NOT WIN32)
- target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${CMAKE_DL_LIBS})
+ target_link_libraries (${HDF5_LIB_TARGET}
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ )
endif ()
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
+ add_dependencies (${HDF5_LIB_TARGET} gen_${HDF5_LIB_TARGET})
+
+ set (install_targets ${HDF5_LIB_TARGET})
+endif ()
+
+if (BUILD_SHARED_LIBS)
+ set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c)
+ add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2)
+
+ add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
+ target_include_directories (${HDF5_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PUBLIC "$<$<BOOL:${HDF5_ENABLE_HDFS}>:${HDFS_INCLUDE_DIR}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_SRC_BINARY_DIR}>"
+ )
+ target_compile_options(${HDF5_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_LIBSH_TARGET}
+ PUBLIC
+ "H5_BUILT_AS_DYNAMIC_LIB"
+ ${HDF_EXTRA_C_FLAGS}
+ ${HDF_EXTRA_FLAGS}
+ PRIVATE
+ $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
+ $<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ )
+ TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
+ target_link_libraries (${HDF5_LIBSH_TARGET}
+ PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>
+ )
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB")
- set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES
- FOLDER libraries
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
- if (HDF5_ENABLE_THREADSAFE)
- set_property (TARGET ${HDF5_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS
- "H5_HAVE_THREADSAFE"
- )
- target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC Threads::Threads)
- endif ()
+ set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries)
+ add_dependencies (${HDF5_LIBSH_TARGET} gen_${HDF5_LIBSH_TARGET})
- if (HDF5_ENABLE_DEBUG_APIS)
- set_property (TARGET ${HDF5_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG"
- )
- endif ()
set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET})
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_SRC_FORMAT ${HDF5_LIB_TARGET})
+ else ()
+ clang_format (HDF5_SRC_FORMAT ${HDF5_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
install (
FILES
${H5_PUBLIC_HEADERS}
+ ${H5_PUBLIC_GENERATED_HEADERS}
+ ${HDF5_SRC_BINARY_DIR}/H5pubconf.h
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
@@ -771,7 +1075,9 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
+ endif ()
install (
TARGETS
@@ -800,7 +1106,9 @@ foreach (libs ${LINK_LIBS} ${LINK_COMP_LIBS})
set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}")
endforeach ()
-set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}")
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}")
+endif ()
if (BUILD_SHARED_LIBS)
set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_LIB_CORENAME}")
endif ()
diff --git a/src/COPYING b/src/COPYING
index 6497ace..97969da 100644
--- a/src/COPYING
+++ b/src/COPYING
@@ -7,7 +7,7 @@
The full HDF5 copyright notice, including terms governing use,
modification, and redistribution, is contained in the COPYING file
which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ or in https://www.hdfgroup.org/licenses. If you do
not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/src/H5.c b/src/H5.c
index 34e4613..cdc0ecd 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,40 +15,36 @@
/* Module Setup */
/****************/
-
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SLprivate.h" /* Skip lists */
-#include "H5Tprivate.h" /* Datatypes */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
+#include "H5Tprivate.h" /* Datatypes */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static void H5_debug_mask(const char*);
+static void H5_debug_mask(const char *);
#ifdef H5_HAVE_PARALLEL
static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
#endif /*H5_HAVE_PARALLEL*/
@@ -57,7 +53,6 @@ static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -67,23 +62,21 @@ static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag
#ifdef H5_HAVE_THREADSAFE
H5_api_t H5_g;
#else
-hbool_t H5_libinit_g = FALSE; /* Library hasn't been initialized */
+hbool_t H5_libinit_g = FALSE; /* Library hasn't been initialized */
#endif
#ifdef H5_HAVE_MPE
-hbool_t H5_MPEinit_g = FALSE; /* MPE Library hasn't been initialized */
+hbool_t H5_MPEinit_g = FALSE; /* MPE Library hasn't been initialized */
#endif
-char H5_lib_vers_info_g[] = H5_VERS_INFO;
-static hbool_t H5_dont_atexit_g = FALSE;
-H5_debug_t H5_debug_g; /*debugging info */
-
+char H5_lib_vers_info_g[] = H5_VERS_INFO;
+static hbool_t H5_dont_atexit_g = FALSE;
+H5_debug_t H5_debug_g; /* debugging info */
/*******************/
/* Local Variables */
/*******************/
-
/*--------------------------------------------------------------------------
* NAME
* H5_init_library -- Initialize library-global information
@@ -107,12 +100,12 @@ H5_init_library(void)
#ifdef H5_HAVE_PARALLEL
{
- int mpi_initialized;
- int mpi_finalized;
+ int mpi_initialized;
+ int mpi_finalized;
int mpi_code;
- MPI_Initialized(&mpi_initialized);
- MPI_Finalized(&mpi_finalized);
+ MPI_Initialized(&mpi_initialized);
+ MPI_Finalized(&mpi_finalized);
#ifdef H5_HAVE_MPE
/* Initialize MPE instrumentation library. */
@@ -120,7 +113,7 @@ H5_init_library(void)
int mpe_code;
if (mpi_initialized && !mpi_finalized) {
mpe_code = MPE_Init_log();
- HDassert(mpe_code >=0);
+ HDassert(mpe_code >= 0);
H5_MPEinit_g = TRUE;
}
}
@@ -131,15 +124,15 @@ H5_init_library(void)
if (mpi_initialized && !mpi_finalized) {
int key_val;
- if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN,
- (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
- &key_val, NULL)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(
+ MPI_COMM_NULL_COPY_FN, (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
+ &key_val, NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Comm_set_attr(MPI_COMM_SELF, key_val, NULL)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_set_attr(MPI_COMM_SELF, key_val, NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_set_attr failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Comm_free_keyval(&key_val)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_free_keyval(&key_val)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_free_keyval failed", mpi_code)
}
}
@@ -149,24 +142,24 @@ H5_init_library(void)
* Make sure the package information is updated.
*/
HDmemset(&H5_debug_g, 0, sizeof H5_debug_g);
- H5_debug_g.pkg[H5_PKG_A].name = "a";
+ H5_debug_g.pkg[H5_PKG_A].name = "a";
H5_debug_g.pkg[H5_PKG_AC].name = "ac";
- H5_debug_g.pkg[H5_PKG_B].name = "b";
- H5_debug_g.pkg[H5_PKG_D].name = "d";
- H5_debug_g.pkg[H5_PKG_E].name = "e";
- H5_debug_g.pkg[H5_PKG_F].name = "f";
- H5_debug_g.pkg[H5_PKG_G].name = "g";
+ H5_debug_g.pkg[H5_PKG_B].name = "b";
+ H5_debug_g.pkg[H5_PKG_D].name = "d";
+ H5_debug_g.pkg[H5_PKG_E].name = "e";
+ H5_debug_g.pkg[H5_PKG_F].name = "f";
+ H5_debug_g.pkg[H5_PKG_G].name = "g";
H5_debug_g.pkg[H5_PKG_HG].name = "hg";
H5_debug_g.pkg[H5_PKG_HL].name = "hl";
- H5_debug_g.pkg[H5_PKG_I].name = "i";
+ H5_debug_g.pkg[H5_PKG_I].name = "i";
H5_debug_g.pkg[H5_PKG_MF].name = "mf";
H5_debug_g.pkg[H5_PKG_MM].name = "mm";
- H5_debug_g.pkg[H5_PKG_O].name = "o";
- H5_debug_g.pkg[H5_PKG_P].name = "p";
- H5_debug_g.pkg[H5_PKG_S].name = "s";
- H5_debug_g.pkg[H5_PKG_T].name = "t";
- H5_debug_g.pkg[H5_PKG_V].name = "v";
- H5_debug_g.pkg[H5_PKG_Z].name = "z";
+ H5_debug_g.pkg[H5_PKG_O].name = "o";
+ H5_debug_g.pkg[H5_PKG_P].name = "p";
+ H5_debug_g.pkg[H5_PKG_S].name = "s";
+ H5_debug_g.pkg[H5_PKG_T].name = "t";
+ H5_debug_g.pkg[H5_PKG_V].name = "v";
+ H5_debug_g.pkg[H5_PKG_Z].name = "z";
/*
* Install atexit() library cleanup routines unless the H5dont_atexit()
@@ -181,7 +174,7 @@ H5_init_library(void)
* This must be entered before the library cleanup code so it's
* executed in LIFO order (i.e., last).
*/
- (void)HDatexit(H5TS_win32_process_exit);
+ (void)HDatexit(H5TS_win32_process_exit);
#endif /* H5_HAVE_THREADSAFE && H5_HAVE_WIN_THREADS */
/* Normal library termination code */
@@ -200,17 +193,17 @@ H5_init_library(void)
* The link interface needs to be initialized so that link property lists
* have their properties registered.
*/
- if(H5E_init() < 0)
+ if (H5E_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize error interface")
- if(H5P_init() < 0)
+ if (H5P_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize property list interface")
- if(H5T_init() < 0)
+ if (H5T_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize datatype interface")
- if(H5D_init() < 0)
+ if (H5D_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize dataset interface")
- if(H5AC_init() < 0)
+ if (H5AC_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface")
- if(H5L_init() < 0)
+ if (H5L_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize link interface")
/* Debugging? */
@@ -221,7 +214,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5_init_library() */
-
/*-------------------------------------------------------------------------
* Function: H5_term_library
*
@@ -231,19 +223,14 @@ done:
*
* Return: void
*
- * Programmer: Robb Matzke
- * Friday, November 20, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
H5_term_library(void)
{
- int pending, ntries = 0, n;
- size_t at = 0;
- char loop[1024];
+ int pending, ntries = 0, n;
+ size_t at = 0;
+ char loop[1024];
H5E_auto2_t func;
#ifdef H5_HAVE_THREADSAFE
@@ -253,8 +240,8 @@ H5_term_library(void)
#endif
/* Don't do anything if the library is already closed */
- if(!(H5_INIT_GLOBAL))
- goto done;
+ if (!(H5_INIT_GLOBAL))
+ goto done;
/* Check if we should display error output */
(void)H5Eget_auto2(H5E_DEFAULT, &func, NULL);
@@ -264,30 +251,27 @@ H5_term_library(void)
* value if they do something that might affect some other interface in a
* way that would necessitate some cleanup work in the other interface.
*/
-#define DOWN(F) \
- (((n = H5##F##_term_interface()) && (at + 8) < sizeof loop)? \
- (sprintf(loop + at, "%s%s", (at ? "," : ""), #F), \
- at += HDstrlen(loop + at), \
- n): \
- ((n > 0 && (at + 5) < sizeof loop) ? \
- (sprintf(loop + at, "..."), \
- at += HDstrlen(loop + at), \
- n) : n))
+#define DOWN(F) \
+ (((n = H5##F##_term_interface()) && (at + 8) < sizeof loop) \
+ ? (HDsprintf(loop + at, "%s%s", (at ? "," : ""), #F), at += HDstrlen(loop + at), n) \
+ : ((n > 0 && (at + 5) < sizeof loop) ? (HDsprintf(loop + at, "..."), at += HDstrlen(loop + at), n) \
+ : n))
do {
- pending = 0;
+ pending = 0;
+
/* Try to organize these so the "higher" level components get shut
* down before "lower" level components that they might rely on. -QAK
*/
- pending += DOWN(R);
- pending += DOWN(D);
- pending += DOWN(L);
- pending += DOWN(G);
- pending += DOWN(A);
- pending += DOWN(S);
- pending += DOWN(T);
+ pending += DOWN(R);
+ pending += DOWN(D);
+ pending += DOWN(L);
+ pending += DOWN(G);
+ pending += DOWN(A);
+ pending += DOWN(S);
+ pending += DOWN(T);
/* Don't shut down the file code until objects in files are shut down */
- if(pending == 0)
+ if (pending == 0)
pending += DOWN(F);
/* Don't shut down "low-level" components until "high-level" components
@@ -295,7 +279,7 @@ H5_term_library(void)
* from being closed "out from underneath" of the high-level objects
* that depend on them. -QAK
*/
- if(pending == 0) {
+ if (pending == 0) {
pending += DOWN(AC);
pending += DOWN(Z);
pending += DOWN(FD);
@@ -303,54 +287,54 @@ H5_term_library(void)
pending += DOWN(PL);
/* Don't shut down the error code until other APIs which use it are shut down */
- if(pending == 0)
+ if (pending == 0)
pending += DOWN(E);
/* Don't shut down the ID code until other APIs which use them are shut down */
- if(pending == 0)
+ if (pending == 0)
pending += DOWN(I);
/* Don't shut down the skip list code until everything that uses it is down */
- if(pending == 0)
+ if (pending == 0)
pending += DOWN(SL);
/* Don't shut down the free list code until _everything_ else is down */
- if(pending == 0)
+ if (pending == 0)
pending += DOWN(FL);
}
- } while(pending && ntries++ < 100);
+ } while (pending && ntries++ < 100);
- if(pending) {
+ if (pending) {
/* Only display the error message if the user is interested in them. */
- if(func) {
- fprintf(stderr, "HDF5: infinite loop closing library\n");
- fprintf(stderr, " %s\n", loop);
+ if (func) {
+ HDfprintf(stderr, "HDF5: infinite loop closing library\n");
+ HDfprintf(stderr, " %s\n", loop);
#ifndef NDEBUG
HDabort();
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end if */
- } /* end if */
+ } /* end if */
#ifdef H5_HAVE_MPE
/* Close MPE instrumentation library. May need to move this
* down if any of the below code involves using the instrumentation code.
*/
- if(H5_MPEinit_g) {
- int mpi_initialized;
- int mpi_finalized;
- int mpe_code;
+ if (H5_MPEinit_g) {
+ int mpi_initialized;
+ int mpi_finalized;
+ int mpe_code;
- MPI_Initialized(&mpi_initialized);
- MPI_Finalized(&mpi_finalized);
+ MPI_Initialized(&mpi_initialized);
+ MPI_Finalized(&mpi_finalized);
if (mpi_initialized && !mpi_finalized) {
- mpe_code = MPE_Finish_log("h5log");
- HDassert(mpe_code >=0);
- } /* end if */
- H5_MPEinit_g = FALSE; /* turn it off no matter what */
- } /* end if */
+ mpe_code = MPE_Finish_log("h5log");
+ HDassert(mpe_code >= 0);
+ } /* end if */
+ H5_MPEinit_g = FALSE; /* turn it off no matter what */
+ } /* end if */
#endif
/* Free open debugging streams */
- while(H5_debug_g.open_stream) {
- H5_debug_open_stream_t *tmp_open_stream;
+ while (H5_debug_g.open_stream) {
+ H5_debug_open_stream_t *tmp_open_stream;
tmp_open_stream = H5_debug_g.open_stream;
(void)HDfclose(H5_debug_g.open_stream->stream);
@@ -364,10 +348,10 @@ done:
#ifdef H5_HAVE_THREADSAFE
H5_API_UNLOCK
#endif /* H5_HAVE_THREADSAFE */
+
return;
} /* end H5_term_library() */
-
/*-------------------------------------------------------------------------
* Function: H5dont_atexit
*
@@ -386,22 +370,17 @@ done:
* Failure: negative if this function is called more than
* once or if it is called too late.
*
- * Programmer: Robb Matzke
- * Friday, November 20, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5dont_atexit(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT_NOERR_NOFS
- H5TRACE0("e","");
+ H5TRACE0("e", "");
- if(H5_dont_atexit_g)
+ if (H5_dont_atexit_g)
ret_value = FAIL;
else
H5_dont_atexit_g = TRUE;
@@ -409,7 +388,6 @@ H5dont_atexit(void)
FUNC_LEAVE_API_NOFS(ret_value)
} /* end H5dont_atexit() */
-
/*-------------------------------------------------------------------------
* Function: H5garbage_collect
*
@@ -425,30 +403,24 @@ H5dont_atexit(void)
*
* Failure: negative
*
- * Programmer: Quincey Koziol
- * Saturday, March 11, 2000
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5garbage_collect(void)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- H5TRACE0("e","");
+ H5TRACE0("e", "");
/* Call the garbage collection routines in the library */
- if(H5FL_garbage_coll()<0)
+ if (H5FL_garbage_coll() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect objects")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5garbage_collect() */
+} /* end H5garbage_collect() */
-
/*-------------------------------------------------------------------------
* Function: H5set_free_list_limits
*
@@ -474,157 +446,158 @@ done:
*
* Failure: negative
*
- * Programmer: Quincey Koziol
- * Wednesday, August 2, 2000
- *
- * Modifications: Neil Fortner
- * Wednesday, April 8, 2009
- * Added support for factory free lists
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
- int arr_list_lim, int blk_global_lim, int blk_list_lim)
+H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "IsIsIsIsIsIs", reg_global_lim, reg_list_lim, arr_global_lim,
- arr_list_lim, blk_global_lim, blk_list_lim);
+ H5TRACE6("e", "IsIsIsIsIsIs", reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim,
+ blk_list_lim);
/* Call the free list function to actually set the limits */
- if(H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim,
- blk_global_lim, blk_list_lim, blk_global_lim, blk_list_lim)<0)
+ if (H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim,
+ blk_list_lim, blk_global_lim, blk_list_lim) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "can't set garbage collection limits")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5set_free_list_limits() */
+} /* end H5set_free_list_limits() */
-
/*-------------------------------------------------------------------------
- * Function: H5_debug_mask
+ * Function: H5_debug_mask
*
- * Purpose: Set runtime debugging flags according to the string S. The
- * string should contain file numbers and package names
- * separated by other characters. A file number applies to all
- * following package names up to the next file number. The
- * initial file number is `2' (the standard error stream). Each
- * package name can be preceded by a `+' or `-' to add or remove
- * the package from the debugging list (`+' is the default). The
- * special name `all' means all packages.
+ * Purpose: Set runtime debugging flags according to the string S. The
+ * string should contain file numbers and package names
+ * separated by other characters. A file number applies to all
+ * following package names up to the next file number. The
+ * initial file number is `2' (the standard error stream). Each
+ * package name can be preceded by a `+' or `-' to add or remove
+ * the package from the debugging list (`+' is the default). The
+ * special name `all' means all packages.
*
- * The name `trace' indicates that API tracing is to be turned
- * on or off.
+ * The name `trace' indicates that API tracing is to be turned
+ * on or off.
*
- * Return: void
+ * The name 'ttop' indicates that only top-level API calls
+ * should be shown. This also turns on tracing as if the
+ * 'trace' word was shown.
*
- * Programmer: Robb Matzke
- * Wednesday, August 19, 1998
+ * Return: void
*
- * Modifications:
- * Robb Matzke, 2002-08-08
- * Accepts the `ttop' word. If enabled then show only the
- * top level API calls, otherwise show all API calls. Also
- * turns on tracing as if the `trace' word was present.
*-------------------------------------------------------------------------
*/
static void
H5_debug_mask(const char *s)
{
- FILE *stream = stderr;
- char pkg_name[32], *rest;
- size_t i;
- hbool_t clear;
+ FILE * stream = stderr;
+ char pkg_name[32], *rest;
+ size_t i;
+ hbool_t clear;
while (s && *s) {
- if (HDisalpha(*s) || '-'==*s || '+'==*s) {
- /* Enable or Disable debugging? */
- if ('-'==*s) {
- clear = TRUE;
- s++;
- } else if ('+'==*s) {
- clear = FALSE;
- s++;
- } else {
- clear = FALSE;
- }
-
- /* Get the name */
- for (i=0; HDisalpha(*s); i++, s++)
- if (i<sizeof pkg_name)
+
+ if (HDisalpha(*s) || '-' == *s || '+' == *s) {
+
+ /* Enable or Disable debugging? */
+ if ('-' == *s) {
+ clear = TRUE;
+ s++;
+ }
+ else if ('+' == *s) {
+ clear = FALSE;
+ s++;
+ }
+ else {
+ clear = FALSE;
+ } /* end if */
+
+ /* Get the name */
+ for (i = 0; HDisalpha(*s); i++, s++)
+ if (i < sizeof pkg_name)
pkg_name[i] = *s;
- pkg_name[MIN(sizeof(pkg_name)-1, i)] = '\0';
+ pkg_name[MIN(sizeof(pkg_name) - 1, i)] = '\0';
- /* Trace, all, or one? */
- if (!HDstrcmp(pkg_name, "trace")) {
- H5_debug_g.trace = clear ? NULL : stream;
- } else if (!HDstrcmp(pkg_name, "ttop")) {
- H5_debug_g.trace = stream;
- H5_debug_g.ttop = (hbool_t)!clear;
- } else if (!HDstrcmp(pkg_name, "ttimes")) {
+ /* Trace, all, or one? */
+ if (!HDstrcmp(pkg_name, "trace")) {
+ H5_debug_g.trace = clear ? NULL : stream;
+ }
+ else if (!HDstrcmp(pkg_name, "ttop")) {
H5_debug_g.trace = stream;
+ H5_debug_g.ttop = (hbool_t)!clear;
+ }
+ else if (!HDstrcmp(pkg_name, "ttimes")) {
+ H5_debug_g.trace = stream;
H5_debug_g.ttimes = (hbool_t)!clear;
- } else if (!HDstrcmp(pkg_name, "all")) {
- for (i=0; i<(size_t)H5_NPKGS; i++)
- H5_debug_g.pkg[i].stream = clear ? NULL : stream;
- } else {
- for (i=0; i<(size_t)H5_NPKGS; i++) {
- if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) {
- H5_debug_g.pkg[i].stream = clear ? NULL : stream;
- break;
- }
- }
- if (i>=(size_t)H5_NPKGS)
- fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
- }
-
- } else if (HDisdigit(*s)) {
- int fd = (int)HDstrtol(s, &rest, 0);
- H5_debug_open_stream_t *open_stream;
-
- if((stream = HDfdopen(fd, "w")) != NULL) {
- (void)HDsetvbuf(stream, NULL, _IOLBF, (size_t)0);
-
- if(NULL == (open_stream = (H5_debug_open_stream_t *)H5MM_malloc(sizeof(H5_debug_open_stream_t)))) {
+ }
+ else if (!HDstrcmp(pkg_name, "all")) {
+ for (i = 0; i < (size_t)H5_NPKGS; i++)
+ H5_debug_g.pkg[i].stream = clear ? NULL : stream;
+ }
+ else {
+ for (i = 0; i < (size_t)H5_NPKGS; i++) {
+ if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) {
+ H5_debug_g.pkg[i].stream = clear ? NULL : stream;
+ break;
+ } /* end if */
+ } /* end for */
+ if (i >= (size_t)H5_NPKGS)
+ HDfprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
+ } /* end if-else */
+ }
+ else if (HDisdigit(*s)) {
+ int fd = (int)HDstrtol(s, &rest, 0);
+ H5_debug_open_stream_t *open_stream;
+
+ if ((stream = HDfdopen(fd, "w")) != NULL) {
+ (void)HDsetvbuf(stream, NULL, _IOLBF, (size_t)0);
+
+ if (NULL ==
+ (open_stream = (H5_debug_open_stream_t *)H5MM_malloc(sizeof(H5_debug_open_stream_t)))) {
(void)HDfclose(stream);
return;
} /* end if */
- open_stream->stream = stream;
- open_stream->next = H5_debug_g.open_stream;
+ open_stream->stream = stream;
+ open_stream->next = H5_debug_g.open_stream;
H5_debug_g.open_stream = open_stream;
} /* end if */
- s = rest;
- } else {
- s++;
- }
- }
+
+ s = rest;
+ }
+ else {
+ s++;
+ } /* end if-else */
+ } /* end while */
+
+ return;
+
} /* end H5_debug_mask() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
* Function: H5_mpi_delete_cb
*
- * Purpose: Callback attribute on MPI_COMM_SELF to terminate the HDF5
+ * Purpose: Callback attribute on MPI_COMM_SELF to terminate the HDF5
* library when the communicator is destroyed, i.e. on MPI_Finalize.
*
* Return: MPI_SUCCESS
*
- * Programmer: Mohamad Chaarawi, February 2015
- *
*-------------------------------------------------------------------------
*/
-static int H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
+static int
+H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val,
+ int H5_ATTR_UNUSED *flag)
{
H5_term_library();
return MPI_SUCCESS;
}
#endif /*H5_HAVE_PARALLEL*/
-
/*-------------------------------------------------------------------------
* Function: H5get_libversion
*
@@ -639,33 +612,28 @@ static int H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED key
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Unknown
- *
- * Modifications:
- * Robb Matzke, 4 Mar 1998
- * Now use "normal" data types for the interface. Any of the arguments
- * may be null pointers
- *
*-------------------------------------------------------------------------
*/
herr_t
H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*Iu*Iu*Iu", majnum, minnum, relnum);
/* Set the version information */
- if (majnum) *majnum = H5_VERS_MAJOR;
- if (minnum) *minnum = H5_VERS_MINOR;
- if (relnum) *relnum = H5_VERS_RELEASE;
+ if (majnum)
+ *majnum = H5_VERS_MAJOR;
+ if (minnum)
+ *minnum = H5_VERS_MINOR;
+ if (relnum)
+ *relnum = H5_VERS_RELEASE;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5get_libversion() */
-
/*-------------------------------------------------------------------------
* Function: H5check_version
*
@@ -679,87 +647,78 @@ done:
*
* Failure: abort()
*
- * Programmer: Robb Matzke
- * Tuesday, April 21, 1998
- *
- * Modifications:
- * Albert Cheng, May 12, 2001
- * Added verification of H5_VERS_INFO.
- *
*-------------------------------------------------------------------------
*/
-#define VERSION_MISMATCH_WARNING \
- "Warning! ***HDF5 library version mismatched error***\n" \
- "The HDF5 header files used to compile this application do not match\n" \
- "the version used by the HDF5 library to which this application is linked.\n" \
- "Data corruption or segmentation faults may occur if the application continues.\n" \
- "This can happen when an application was compiled by one version of HDF5 but\n" \
- "linked with a different version of static or shared HDF5 library.\n" \
- "You should recompile the application or check your shared library related\n" \
+#define VERSION_MISMATCH_WARNING \
+ "Warning! ***HDF5 library version mismatched error***\n" \
+ "The HDF5 header files used to compile this application do not match\n" \
+ "the version used by the HDF5 library to which this application is linked.\n" \
+ "Data corruption or segmentation faults may occur if the application continues.\n" \
+ "This can happen when an application was compiled by one version of HDF5 but\n" \
+ "linked with a different version of static or shared HDF5 library.\n" \
+ "You should recompile the application or check your shared library related\n" \
"settings such as 'LD_LIBRARY_PATH'.\n"
herr_t
H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
{
- char lib_str[256];
- char substr[] = H5_VERS_SUBRELEASE;
- static int checked = 0; /* If we've already checked the version info */
- static unsigned int disable_version_check = 0; /* Set if the version check should be disabled */
- static const char *version_mismatch_warning = VERSION_MISMATCH_WARNING;
- herr_t ret_value = SUCCEED; /* Return value */
+ char lib_str[256];
+ char substr[] = H5_VERS_SUBRELEASE;
+ static int checked = 0; /* If we've already checked the version info */
+ static unsigned int disable_version_check = 0; /* Set if the version check should be disabled */
+ static const char * version_mismatch_warning = VERSION_MISMATCH_WARNING;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT_NOERR_NOFS
H5TRACE3("e", "IuIuIu", majnum, minnum, relnum);
/* Don't check again, if we already have */
if (checked)
- HGOTO_DONE(SUCCEED)
+ HGOTO_DONE(SUCCEED)
- { const char *s; /* Environment string for disabling version check */
+ {
+ const char *s; /* Environment string for disabling version check */
/* Allow different versions of the header files and library? */
- s = HDgetenv ("HDF5_DISABLE_VERSION_CHECK");
+ s = HDgetenv("HDF5_DISABLE_VERSION_CHECK");
if (s && HDisdigit(*s))
- disable_version_check = (unsigned int)HDstrtol (s, NULL, 0);
+ disable_version_check = (unsigned int)HDstrtol(s, NULL, 0);
}
- if (H5_VERS_MAJOR!=majnum || H5_VERS_MINOR!=minnum ||
- H5_VERS_RELEASE!=relnum) {
+ if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum || H5_VERS_RELEASE != relnum) {
switch (disable_version_check) {
- case 0:
- HDfprintf(stderr, "%s%s", version_mismatch_warning,
- "You can, at your own risk, disable this warning by setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 or higher will suppress the warning messages totally.\n");
- /* Mention the versions we are referring to */
- HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
- majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
- /* Show library settings if available */
- HDfprintf (stderr, "%s", H5libhdf5_settings);
-
- /* Bail out now. */
- HDfputs ("Bye...\n", stderr);
- HDabort ();
- case 1:
- /* continue with a warning */
- /* Note that the warning message is embedded in the format string.*/
- HDfprintf (stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- version_mismatch_warning, disable_version_check);
- /* Mention the versions we are referring to */
- HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
- majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
- /* Show library settings if available */
- HDfprintf (stderr, "%s", H5libhdf5_settings);
- break;
- default:
- /* 2 or higher: continue silently */
- break;
+ case 0:
+ HDfprintf(stderr, "%s%s", version_mismatch_warning,
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 or higher will suppress the warning messages totally.\n");
+ /* Mention the versions we are referring to */
+ HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ /* Show library settings if available */
+ HDfprintf(stderr, "%s", H5libhdf5_settings);
+
+ /* Bail out now. */
+ HDfputs("Bye...\n", stderr);
+ HDabort();
+ case 1:
+ /* continue with a warning */
+ /* Note that the warning message is embedded in the format string.*/
+ HDfprintf(stderr,
+ "%s'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n",
+ version_mismatch_warning, disable_version_check);
+ /* Mention the versions we are referring to */
+ HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ /* Show library settings if available */
+ HDfprintf(stderr, "%s", H5libhdf5_settings);
+ break;
+ default:
+ /* 2 or higher: continue silently */
+ break;
} /* end switch */
} /* end if */
@@ -767,39 +726,38 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
/* Indicate that the version check has been performed */
checked = 1;
- if (!disable_version_check){
- /*
- * Verify if H5_VERS_INFO is consistent with the other version information.
- * Check only the first sizeof(lib_str) char. Assume the information
- * will fit within this size or enough significance.
- */
- HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d",
- H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
- if(*substr) {
- HDstrncat(lib_str, "-", 1);
- HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1);
- } /* end if */
- if (HDstrcmp(lib_str, H5_lib_vers_info_g)){
- HDfputs ("Warning! Library version information error.\n"
- "The HDF5 library version information are not "
- "consistent in its source code.\nThis is NOT a fatal error "
- "but should be corrected. Setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
- "will suppress\nthis warning.\n",
- stderr);
- HDfprintf (stderr, "Library version information are:\n"
- "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
- "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
- H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
- H5_VERS_SUBRELEASE, H5_VERS_INFO);
- } /* end if */
+ if (!disable_version_check) {
+ /*
+ * Verify if H5_VERS_INFO is consistent with the other version information.
+ * Check only the first sizeof(lib_str) char. Assume the information
+ * will fit within this size or enough significance.
+ */
+ HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR,
+ H5_VERS_RELEASE);
+ if (*substr) {
+ HDstrncat(lib_str, "-", (size_t)1);
+ HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1);
+ } /* end if */
+ if (HDstrcmp(lib_str, H5_lib_vers_info_g)) {
+ HDfputs("Warning! Library version information error.\n"
+ "The HDF5 library version information are not "
+ "consistent in its source code.\nThis is NOT a fatal error "
+ "but should be corrected. Setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
+ "will suppress\nthis warning.\n",
+ stderr);
+ HDfprintf(stderr,
+ "Library version information are:\n"
+ "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
+ "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
+ H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO);
+ } /* end if */
}
done:
FUNC_LEAVE_API_NOFS(ret_value)
} /* end H5check_version() */
-
/*-------------------------------------------------------------------------
* Function: H5open
*
@@ -810,26 +768,21 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5open(void)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOCLEAR(FAIL)
- H5TRACE0("e","");
+ H5TRACE0("e", "");
/* all work is done by FUNC_ENTER() */
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5open() */
-
/*-------------------------------------------------------------------------
* Function: H5close
*
@@ -837,11 +790,6 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 30, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -853,14 +801,13 @@ H5close(void)
* this function for an uninitialized library.
*/
FUNC_ENTER_API_NOINIT_NOERR_NOFS
- H5TRACE0("e","");
+ H5TRACE0("e", "");
H5_term_library();
FUNC_LEAVE_API_NOFS(SUCCEED)
} /* end H5close() */
-
/*-------------------------------------------------------------------------
* Function: H5allocate_memory
*
@@ -880,7 +827,7 @@ H5close(void)
* Return:
*
* Success: A pointer to the allocated buffer.
- *
+ *
* Failure: NULL
*
*-------------------------------------------------------------------------
@@ -893,7 +840,7 @@ H5allocate_memory(size_t size, hbool_t clear)
FUNC_ENTER_API_NOINIT;
H5TRACE2("*x", "zb", size, clear);
- if(clear)
+ if (clear)
ret_value = H5MM_calloc(size);
else
ret_value = H5MM_malloc(size);
@@ -902,7 +849,6 @@ H5allocate_memory(size_t size, hbool_t clear)
} /* end H5allocate_memory() */
-
/*-------------------------------------------------------------------------
* Function: H5resize_memory
*
@@ -922,7 +868,7 @@ H5allocate_memory(size_t size, hbool_t clear)
* Return:
*
* Success: A pointer to the resized buffer.
- *
+ *
* Failure: NULL (the input buffer will be unchanged)
*
*-------------------------------------------------------------------------
@@ -941,7 +887,6 @@ H5resize_memory(void *mem, size_t size)
} /* end H5resize_memory() */
-
/*-------------------------------------------------------------------------
* Function: H5free_memory
*
@@ -967,7 +912,6 @@ H5free_memory(void *mem)
} /* end H5free_memory() */
-
/*-------------------------------------------------------------------------
* Function: H5is_library_threadsafe
*
@@ -987,19 +931,18 @@ H5is_library_threadsafe(hbool_t *is_ts)
H5TRACE1("e", "*b", is_ts);
HDassert(is_ts);
-
+
#ifdef H5_HAVE_THREADSAFE
*is_ts = TRUE;
-#else /* H5_HAVE_THREADSAFE */
+#else /* H5_HAVE_THREADSAFE */
*is_ts = FALSE;
#endif /* H5_HAVE_THREADSAFE */
FUNC_LEAVE_API(ret_value)
} /* end H5is_library_threadsafe() */
-
-#if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) \
- && defined(H5_HAVE_WIN32_API) && defined(H5_HAVE_WIN_THREADS)
+#if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) && defined(H5_HAVE_WIN32_API) && \
+ defined(H5_HAVE_WIN_THREADS)
/*-------------------------------------------------------------------------
* Function: DllMain
*
@@ -1008,6 +951,9 @@ H5is_library_threadsafe(hbool_t *is_ts)
* NOTE: The main purpose of this is for handling Win32 thread cleanup
* on thread/process detach.
*
+ * Only enabled when the shared Windows library is built with
+ * thread safety enabled.
+ *
* Return: TRUE on success, FALSE on failure
*
*-------------------------------------------------------------------------
@@ -1024,35 +970,33 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
BOOL fOkay = TRUE;
- switch(fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- break;
+ switch (fdwReason) {
+ case DLL_PROCESS_ATTACH:
+ break;
- case DLL_PROCESS_DETACH:
- break;
+ case DLL_PROCESS_DETACH:
+ break;
- case DLL_THREAD_ATTACH:
+ case DLL_THREAD_ATTACH:
#ifdef H5_HAVE_WIN_THREADS
- if(H5TS_win32_thread_enter() < 0)
- fOkay = FALSE;
+ if (H5TS_win32_thread_enter() < 0)
+ fOkay = FALSE;
#endif /* H5_HAVE_WIN_THREADS */
- break;
+ break;
- case DLL_THREAD_DETACH:
+ case DLL_THREAD_DETACH:
#ifdef H5_HAVE_WIN_THREADS
- if(H5TS_win32_thread_exit() < 0)
- fOkay = FALSE;
+ if (H5TS_win32_thread_exit() < 0)
+ fOkay = FALSE;
#endif /* H5_HAVE_WIN_THREADS */
- break;
+ break;
- default:
- /* Shouldn't get here */
- fOkay = FALSE;
- break;
+ default:
+ /* Shouldn't get here */
+ fOkay = FALSE;
+ break;
}
return fOkay;
}
#endif /* H5_HAVE_WIN32_API && H5_BUILT_AS_DYNAMIC_LIB && H5_HAVE_WIN_THREADS && H5_HAVE_THREADSAFE*/
-
diff --git a/src/H5A.c b/src/H5A.c
index 93f8a34..661c37d 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,31 +15,29 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5A_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5A_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspace functions */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspace functions */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -48,30 +46,25 @@
/* Data structure for callback for locating the index by name */
typedef struct H5A_iter_cb1 {
const char *name;
- int idx;
+ int idx;
} H5A_iter_cb1;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -87,14 +80,12 @@ H5FL_BLK_DEFINE(attr_buf);
/* Attribute ID class */
static const H5I_class_t H5I_ATTR_CLS[1] = {{
- H5I_ATTR, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5A_close /* Callback routine for closing objects of this class */
+ H5I_ATTR, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5A_close /* Callback routine for closing objects of this class */
}};
-
-
/*-------------------------------------------------------------------------
* Function: H5A_init
*
@@ -111,7 +102,7 @@ static const H5I_class_t H5I_ATTR_CLS[1] = {{
herr_t
H5A_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -120,7 +111,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_init() */
-
/*--------------------------------------------------------------------------
NAME
H5A_init_interface -- Initialize interface-specific information
@@ -136,21 +126,20 @@ DESCRIPTION
static herr_t
H5A_init_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/*
* Create attribute ID type.
*/
- if(H5I_register_type(H5I_ATTR_CLS) < 0)
+ if (H5I_register_type(H5I_ATTR_CLS) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to initialize interface")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_init_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5A_term_interface
@@ -170,105 +159,109 @@ done:
int
H5A_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
- if(H5I_nmembers(H5I_ATTR) > 0) {
- (void)H5I_clear_type(H5I_ATTR, FALSE, FALSE);
+ if (H5_interface_initialize_g) {
+ if (H5I_nmembers(H5I_ATTR) > 0) {
+ (void)H5I_clear_type(H5I_ATTR, FALSE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Close deprecated interface */
n += H5A__term_deprec_interface();
- /* Destroy the attribute object id group */
- (void)H5I_dec_type_ref(H5I_ATTR);
+ /* Destroy the attribute object id group */
+ (void)H5I_dec_type_ref(H5I_ATTR);
n++; /*H5I*/
- /* Mark closed */
- H5_interface_initialize_g = 0;
- } /* end else */
- } /* end if */
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* H5A_term_interface() */
-
/*--------------------------------------------------------------------------
NAME
- H5Acreate2
- PURPOSE
- Creates an attribute on an object
- USAGE
- hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
- aapl_id)
- hid_t loc_id; IN: Object (dataset or group) to be attached to
- const char *attr_name; IN: Name of attribute to locate and open
- hid_t type_id; IN: ID of datatype for attribute
- hid_t space_id; IN: ID of dataspace for attribute
- hid_t acpl_id; IN: ID of creation property list (currently not used)
- hid_t aapl_id; IN: Attribute access property list
- RETURNS
- Non-negative on success/Negative on failure
-
- DESCRIPTION
- This function creates an attribute which is attached to the object
- specified with 'loc_id'. The name specified with 'attr_name' for
- each attribute for an object must be unique for that object. The 'type_id'
- and 'space_id' are created with the H5T and H5S interfaces respectively.
- The 'aapl_id' property list is currently unused, but will be used in the
- future for optional attribute access properties. The attribute ID returned
- from this function must be released with H5Aclose or resource leaks will
- develop.
-
---------------------------------------------------------------------------*/
-/* ARGSUSED */
+ * Function: H5Acreate2
+ *
+ * Purpose: Creates an attribute on an object
+ *
+ * Usage:
+ * hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
+ * aapl_id)
+ *
+ * Description: This function creates an attribute which is attached to the
+ * object specified with 'loc_id'. The name specified with
+ * 'attr_name' for each attribute for an object must be unique
+ * for that object. The 'type_id' and 'space_id' are created
+ * with the H5T and H5S interfaces respectively. The 'aapl_id'
+ * property list is currently unused, but will be used in the
+ * future for optional attribute access properties. The
+ * attribute ID returned from this function must be released
+ * with H5Aclose or resource leaks will develop.
+ *
+ * Parameters:
+ * hid_t loc_id; IN: Object (dataset or group) to be attached to
+ * const char *attr_name; IN: Name of attribute to locate and open
+ * hid_t type_id; IN: ID of datatype for attribute
+ * hid_t space_id; IN: ID of dataspace for attribute
+ * hid_t acpl_id; IN: ID of creation property list (currently not used)
+ * hid_t aapl_id; IN: Attribute access property list
+ *
+ * Return: Success: An ID for the created attribute
+ *
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
hid_t
-H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
- hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id)
+H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id,
+ hid_t H5_ATTR_UNUSED aapl_id)
{
- H5A_t *attr = NULL; /* Attribute created */
- H5G_loc_t loc; /* Object location */
- H5T_t *type; /* Datatype to use for attribute */
- H5S_t *space; /* Dataspace to use for attribute */
- hid_t ret_value; /* Return value */
+ H5A_t * attr = NULL; /* Attribute created */
+ H5G_loc_t loc; /* Object location */
+ H5T_t * type; /* Datatype to use for attribute */
+ H5S_t * space; /* Dataspace to use for attribute */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE6("i", "i*siiii", loc_id, attr_name, type_id, space_id, acpl_id, aapl_id);
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, H5I_INVALID_HID, "no write intent on file")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no attribute name")
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a type")
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace")
/* Go do the real work for attaching the attribute to the dataset */
- if(NULL == (attr = H5A_create(&loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
+ if (NULL == (attr = H5A_create(&loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0 && attr && H5A_close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ if (H5I_INVALID_HID == ret_value)
+ if (attr && H5A_close(attr) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Acreate2() */
-
/*--------------------------------------------------------------------------
NAME
H5Acreate_by_name
@@ -286,7 +279,7 @@ done:
hid_t aapl_id; IN: Attribute access property list
hid_t lapl_id; IN: Link access property list
RETURNS
- Non-negative on success/Negative on failure
+ Non-negative on success/H5I_INVALID_HID on failure
DESCRIPTION
This function creates an attribute which is attached to the object
@@ -299,41 +292,38 @@ done:
develop.
--------------------------------------------------------------------------*/
-/* ARGSUSED */
hid_t
-H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id,
- hid_t lapl_id)
+H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, hid_t space_id,
+ hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
{
- H5A_t *attr = NULL; /* Attribute created */
- H5G_loc_t loc; /* Object location */
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- H5T_t *type; /* Datatype to use for attribute */
- H5S_t *space; /* Dataspace to use for attribute */
- hid_t ret_value; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
- acpl_id, aapl_id, lapl_id);
-
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ H5A_t * attr = NULL; /* Attribute created */
+ H5G_loc_t loc; /* Object location */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ H5T_t * type; /* Datatype to use for attribute */
+ H5S_t * space; /* Dataspace to use for attribute */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id);
+
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, H5I_INVALID_HID, "no write intent on file")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no object name")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no attribute name")
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a type")
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -341,28 +331,28 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, H5I_INVALID_HID, "object not found")
loc_found = TRUE;
/* Go do the real work for attaching the attribute to the dataset */
- if(NULL == (attr = H5A_create(&obj_loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
+ if (NULL == (attr = H5A_create(&obj_loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
- if(ret_value < 0 && attr && H5A_close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, H5I_INVALID_HID, "can't free location")
+ if (H5I_INVALID_HID == ret_value)
+ if (attr && H5A_close(attr) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Acreate_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Aopen
@@ -374,7 +364,7 @@ done:
const char *attr_name; IN: Name of attribute to locate and open
hid_t aapl_id; IN: Attribute access property list
RETURNS
- ID of attribute on success, negative on failure
+ ID of attribute on success, H5I_INVALID_HID on failure
DESCRIPTION
This function opens an existing attribute for access. The attribute
@@ -385,43 +375,45 @@ done:
hid_t
H5Aopen(hid_t loc_id, const char *attr_name, hid_t H5_ATTR_UNUSED aapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute opened */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute opened */
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, attr_name, aapl_id);
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL")
+ if (!*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
/* Read in attribute from object header */
- if(NULL == (attr = H5O_attr_open_by_name(loc.oloc, attr_name, H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to load attribute info from object header for attribute: '%s'", attr_name)
+ if (NULL == (attr = H5O_attr_open_by_name(loc.oloc, attr_name, H5AC_ind_dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID,
+ "unable to load attribute info from object header for attribute: '%s'", attr_name)
/* Finish initializing attribute */
- if(H5A_open_common(&loc, attr) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to initialize attribute")
+ if (H5A_open_common(&loc, attr) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to initialize attribute")
/* Register the attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
- if(attr && H5A_close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ if (H5I_INVALID_HID == ret_value)
+ if (attr && H5A_close(attr) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen() */
-
/*--------------------------------------------------------------------------
NAME
H5Aopen_by_name
@@ -444,49 +436,47 @@ done:
H5Aclose or resource leaks will develop.
--------------------------------------------------------------------------*/
hid_t
-H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
+H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t H5_ATTR_UNUSED aapl_id,
+ hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute opened */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute opened */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*s*sii", loc_id, obj_name, attr_name, aapl_id, lapl_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Register the attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Aopen_by_idx
@@ -512,52 +502,49 @@ done:
H5Aclose or resource leaks will develop.
--------------------------------------------------------------------------*/
hid_t
-H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
+H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
{
- H5A_t *attr = NULL; /* Attribute opened */
- H5G_loc_t loc; /* Object location */
- hid_t ret_value; /* Return value */
+ H5A_t * attr = NULL; /* Attribute opened */
+ H5G_loc_t loc; /* Object location */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("i", "i*sIiIohii", loc_id, obj_name, idx_type, order, n, aapl_id,
- lapl_id);
+ H5TRACE7("i", "i*sIiIohii", loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Open the attribute in the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open attribute")
/* Register the attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen_by_idx() */
-
/*--------------------------------------------------------------------------
NAME
H5Awrite
@@ -577,30 +564,29 @@ done:
herr_t
H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf)
{
- H5A_t *attr; /* Attribute object for ID */
- H5T_t *mem_type; /* Memory datatype */
- herr_t ret_value; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ H5T_t *mem_type; /* Memory datatype */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", attr_id, dtype_id, buf);
/* check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
+ if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- if(NULL == buf)
+ if (NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null attribute buffer")
/* Go write the actual data to the attribute */
- if((ret_value = H5A_write(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
+ if ((ret_value = H5A_write(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Awrite() */
-
/*--------------------------------------------------------------------------
NAME
H5Aread
@@ -620,30 +606,29 @@ done:
herr_t
H5Aread(hid_t attr_id, hid_t dtype_id, void *buf)
{
- H5A_t *attr; /* Attribute object for ID */
- H5T_t *mem_type; /* Memory datatype */
- herr_t ret_value; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ H5T_t *mem_type; /* Memory datatype */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", attr_id, dtype_id, buf);
/* check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
+ if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- if(NULL == buf)
+ if (NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null attribute buffer")
/* Go write the actual data to the attribute */
- if((ret_value = H5A_read(attr, mem_type, buf, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5A_read(attr, mem_type, buf, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aread() */
-
/*--------------------------------------------------------------------------
NAME
H5Aget_space
@@ -663,34 +648,33 @@ done:
hid_t
H5Aget_space(hid_t attr_id)
{
- H5A_t *attr; /* Attribute object for ID */
- H5S_t *ds = NULL;
- hid_t ret_value;
+ H5A_t *attr; /* Attribute object for ID */
+ H5S_t *ds = NULL;
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
/* check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (ds = H5A_get_space(attr)))
+ if (NULL == (ds = H5A_get_space(attr)))
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get space ID of attribute")
/* Atomize */
- if((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom")
done:
- if(ret_value < 0) {
- if(ds && (H5S_close(ds) < 0))
+ if (ret_value < 0) {
+ if (ds && (H5S_close(ds) < 0))
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
} /* end if */
FUNC_LEAVE_API(ret_value)
} /* H5Aget_space() */
-
/*--------------------------------------------------------------------------
NAME
H5Aget_type
@@ -710,34 +694,33 @@ done:
hid_t
H5Aget_type(hid_t attr_id)
{
- H5A_t *attr; /* Attribute object for ID */
- H5T_t *dt = NULL;
- hid_t ret_value; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ H5T_t *dt = NULL;
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
/* check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (dt = H5A_get_type(attr)))
+ if (NULL == (dt = H5A_get_type(attr)))
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get space ID of attribute")
/* Create an atom */
- if((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
done:
- if(ret_value < 0) {
- if(dt && (H5T_close(dt) < 0))
+ if (ret_value < 0) {
+ if (dt && (H5T_close(dt) < 0))
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype")
} /* end if */
FUNC_LEAVE_API(ret_value)
} /* H5Aget_type() */
-
/*--------------------------------------------------------------------------
NAME
H5Aget_create_plist
@@ -760,8 +743,8 @@ done:
hid_t
H5Aget_create_plist(hid_t attr_id)
{
- H5A_t *attr; /* Attribute object for ID */
- hid_t ret_value;
+ H5A_t *attr; /* Attribute object for ID */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
@@ -769,17 +752,16 @@ H5Aget_create_plist(hid_t attr_id)
HDassert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
/* Get attribute and default attribute creation property list*/
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if((ret_value = H5A_get_create_plist(attr)) < 0)
+ if ((ret_value = H5A_get_create_plist(attr)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get creation property list for attr")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_create_plist() */
-
/*--------------------------------------------------------------------------
NAME
H5Aget_name
@@ -804,27 +786,26 @@ done:
ssize_t
H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
{
- H5A_t *my_attr; /* Attribute object for ID */
- ssize_t ret_value;
+ H5A_t * my_attr; /* Attribute object for ID */
+ ssize_t ret_value = -1;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "iz*s", attr_id, buf_size, buf);
/* check arguments */
- if(NULL == (my_attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(!buf && buf_size)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer")
+ if (NULL == (my_attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an attribute")
+ if (!buf && buf_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "buf cannot be NULL if buf_size is non-zero")
- /* Call private function in turn */
- if(0 > (ret_value = H5A_get_name(my_attr, buf_size, buf)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get attribute name")
+ /* Get the attribute name */
+ if (0 > (ret_value = H5A_get_name(my_attr, buf_size, buf)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute name")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aget_name() */
-
/*-------------------------------------------------------------------------
* Function: H5Aget_name_by_idx
*
@@ -843,58 +824,54 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, char *name /*out*/, size_t size,
- hid_t lapl_id)
+H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ char *name /*out*/, size_t size, hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute object for name */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute object for name */
+ ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("Zs", "i*sIiIohxzi", loc_id, obj_name, idx_type, order, n, name, size,
- lapl_id);
+ H5TRACE8("Zs", "i*sIiIohxzi", loc_id, obj_name, idx_type, order, n, name, size, lapl_id);
/* Check args */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the length of the name */
ret_value = (ssize_t)HDstrlen(attr->shared->name);
/* Copy the name into the user's buffer, if given */
- if(name) {
+ if (name) {
HDstrncpy(name, attr->shared->name, MIN((size_t)(ret_value + 1), size));
- if((size_t)ret_value >= size)
- name[size - 1]='\0';
+ if ((size_t)ret_value >= size)
+ name[size - 1] = '\0';
} /* end if */
done:
/* Release resources */
- if(attr && H5A_close(attr) < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Aget_storage_size
*
@@ -915,14 +892,14 @@ done:
hsize_t
H5Aget_storage_size(hid_t attr_id)
{
- H5A_t *attr; /* Attribute object for ID */
- hsize_t ret_value; /* Return value */
+ H5A_t * attr; /* Attribute object for ID */
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_API(0)
H5TRACE1("h", "i", attr_id);
/* Check args */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an attribute")
/* Set return value */
@@ -932,7 +909,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_storage_size() */
-
/*-------------------------------------------------------------------------
* Function: H5Aget_info
*
@@ -949,25 +925,24 @@ done:
herr_t
H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
{
- H5A_t *attr; /* Attribute object for name */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr; /* Attribute object for name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", attr_id, ainfo);
/* Check args */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
/* Get the attribute information */
- if(H5A_get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ if (H5A_get_info(attr, ainfo) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_info() */
-
/*-------------------------------------------------------------------------
* Function: H5Aget_info_by_name
*
@@ -982,50 +957,48 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- H5A_info_t *ainfo, hid_t lapl_id)
+H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H5A_info_t *ainfo,
+ hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute object for name */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute object for name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*s*s*xi", loc_id, obj_name, attr_name, ainfo, lapl_id);
/* Check args */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(NULL == ainfo)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ if (NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the attribute information */
- if(H5A_get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ if (H5A_get_info(attr, ainfo) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
- /* Cleanup on failure */
- if(attr && H5A_close(attr) < 0)
+ /* Release resources */
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_info_by_name() */
-
/*-------------------------------------------------------------------------
* Function: H5Aget_info_by_idx
*
@@ -1041,60 +1014,57 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo, hid_t lapl_id)
+H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ H5A_info_t *ainfo, hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute object for name */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute object for name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIoh*xi", loc_id, obj_name, idx_type, order, n, ainfo,
- lapl_id);
+ H5TRACE7("e", "i*sIiIoh*xi", loc_id, obj_name, idx_type, order, n, ainfo, lapl_id);
/* Check args */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(NULL == ainfo)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the attribute information */
- if(H5A_get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ if (H5A_get_info(attr, ainfo) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
/* Release resources */
- if(attr && H5A_close(attr) < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* end H5Aget_info_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5Arename
+ * Function: H5Arename
*
* Purpose: Rename an attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Raymond Lu
* October 23, 2002
@@ -1104,26 +1074,26 @@ done:
herr_t
H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", loc_id, old_name, new_name);
- /* check arguments */
- if(!old_name || !new_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "name is nil")
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ /* Check arguments */
+ if (!old_name || !new_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "name is nil")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
/* Avoid thrashing things if the names are the same */
- if(HDstrcmp(old_name, new_name)) {
- H5G_loc_t loc; /* Object location */
-
- if(H5G_loc(loc_id, & loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (HDstrcmp(old_name, new_name)) {
+ H5G_loc_t loc; /* Object location */
+
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Call private attribute rename routine */
- if(H5O_attr_rename(loc.oloc, H5AC_dxpl_id, old_name, new_name) < 0)
+ if (H5O_attr_rename(loc.oloc, H5AC_dxpl_id, old_name, new_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
@@ -1131,14 +1101,13 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Arename() */
-
/*-------------------------------------------------------------------------
- * Function: H5Arename_by_name
+ * Function: H5Arename_by_name
*
* Purpose: Rename an attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* February 20, 2007
@@ -1146,39 +1115,37 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
- const char *new_attr_name, hid_t lapl_id)
+H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, const char *new_attr_name,
+ hid_t lapl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "i*s*s*si", loc_id, obj_name, old_attr_name, new_attr_name,
- lapl_id);
+ H5TRACE5("e", "i*s*s*si", loc_id, obj_name, old_attr_name, new_attr_name, lapl_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!old_attr_name || !*old_attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no old attribute name")
- if(!new_attr_name || !*new_attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (!old_attr_name || !*old_attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no old attribute name")
+ if (!new_attr_name || !*new_attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Avoid thrashing things if the names are the same */
- if(HDstrcmp(old_attr_name, new_attr_name)) {
- H5G_loc_t loc; /* Object location */
+ if (HDstrcmp(old_attr_name, new_attr_name)) {
+ H5G_loc_t loc; /* Object location */
- if(H5G_loc(loc_id, & loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- /* Call private attribute rename routine */
- if(H5A_rename_by_name(loc, obj_name, old_attr_name, new_attr_name, lapl_id, H5AC_dxpl_id) < 0)
+ /* Rename the attribute */
+ if (H5A_rename_by_name(loc, obj_name, old_attr_name, new_attr_name, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
@@ -1186,7 +1153,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Arename_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Aiterate2
@@ -1229,43 +1195,43 @@ done:
attribute.
--------------------------------------------------------------------------*/
herr_t
-H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t *idx, H5A_operator2_t op, void *op_data)
+H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op,
+ void *op_data)
{
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- hsize_t start_idx; /* Index of attribute to start iterating at */
- hsize_t last_attr; /* Index of last attribute examined */
- herr_t ret_value; /* Return value */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ hsize_t start_idx; /* Index of attribute to start iterating at */
+ hsize_t last_attr; /* Index of last attribute examined */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIiIo*hx*x", loc_id, idx_type, order, idx, op, op_data);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
/* Build attribute operator info */
- attr_op.op_type = H5A_ATTR_OP_APP2;
+ attr_op.op_type = H5A_ATTR_OP_APP2;
attr_op.u.app_op2 = op;
/* Call attribute iteration routine */
last_attr = start_idx = (idx ? *idx : 0);
- if((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if ((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr,
+ &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
- if(idx)
+ if (idx)
*idx = last_attr;
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aiterate2() */
-
/*--------------------------------------------------------------------------
NAME
H5Aiterate_by_name
@@ -1310,41 +1276,38 @@ done:
attribute.
--------------------------------------------------------------------------*/
herr_t
-H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
- hid_t lapl_id)
+H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t *idx, H5A_operator2_t op, void *op_data, hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- hid_t obj_loc_id = (-1); /* ID for object located */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- hsize_t start_idx; /* Index of attribute to start iterating at */
- hsize_t last_attr; /* Index of last attribute examined */
- herr_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ hid_t obj_loc_id = (-1); /* ID for object located */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ hsize_t start_idx; /* Index of attribute to start iterating at */
+ hsize_t last_attr; /* Index of last attribute examined */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op,
- op_data, lapl_id);
-
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op, op_data, lapl_id);
+
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1352,40 +1315,40 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Open the object */
- if((obj_loc_id = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ if ((obj_loc_id = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
/* Build attribute operator info */
- attr_op.op_type = H5A_ATTR_OP_APP2;
+ attr_op.op_type = H5A_ATTR_OP_APP2;
attr_op.u.app_op2 = op;
/* Call attribute iteration routine */
last_attr = start_idx = (idx ? *idx : 0);
- if((ret_value = H5O_attr_iterate(obj_loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if ((ret_value = H5O_attr_iterate(obj_loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr,
+ &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
- if(idx)
+ if (idx)
*idx = last_attr;
done:
/* Release resources */
- if(obj_loc_id > 0) {
- if(H5I_dec_app_ref(obj_loc_id) < 0)
+ if (obj_loc_id > 0) {
+ if (H5I_dec_app_ref(obj_loc_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to close temporary object")
} /* end if */
- else if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ else if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* H5Aiterate_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Adelete
@@ -1403,29 +1366,28 @@ done:
herr_t
H5Adelete(hid_t loc_id, const char *name)
{
- H5G_loc_t loc; /* Object location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Delete the attribute from the location */
- if(H5O_attr_remove(loc.oloc, name, H5AC_dxpl_id) < 0)
+ if (H5O_attr_remove(loc.oloc, name, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Adelete() */
-
/*--------------------------------------------------------------------------
NAME
H5Adelete_by_name
@@ -1443,33 +1405,31 @@ done:
This function removes the named attribute from an object.
--------------------------------------------------------------------------*/
herr_t
-H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t lapl_id)
+H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(H5P_DEFAULT == lapl_id)
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1477,23 +1437,22 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Delete the attribute from the location */
- if(H5O_attr_remove(obj_loc.oloc, attr_name, H5AC_dxpl_id) < 0)
+ if (H5O_attr_remove(obj_loc.oloc, attr_name, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* H5Adelete_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Adelete_by_idx
@@ -1519,35 +1478,34 @@ done:
object to operate on.
--------------------------------------------------------------------------*/
herr_t
-H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t lapl_id)
+H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*sIiIohi", loc_id, obj_name, idx_type, order, n, lapl_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1555,23 +1513,22 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Delete the attribute from the location */
- if(H5O_attr_remove_by_idx(obj_loc.oloc, idx_type, order, n, H5AC_dxpl_id) < 0)
+ if (H5O_attr_remove_by_idx(obj_loc.oloc, idx_type, order, n, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* H5Adelete_by_idx() */
-
/*--------------------------------------------------------------------------
NAME
H5Aclose
@@ -1590,24 +1547,23 @@ done:
herr_t
H5Aclose(hid_t attr_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", attr_id);
- /* check arguments */
- if(NULL == H5I_object_verify(attr_id, H5I_ATTR))
+ /* Check arguments */
+ if (NULL == H5I_object_verify(attr_id, H5I_ATTR))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
/* Decrement references to that atom (and close it) */
- if(H5I_dec_app_ref(attr_id) < 0)
+ if (H5I_dec_app_ref(attr_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "can't close attribute")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aclose() */
-
/*-------------------------------------------------------------------------
* Function: H5Aexists
*
@@ -1625,29 +1581,28 @@ done:
htri_t
H5Aexists(hid_t obj_id, const char *attr_name)
{
- H5G_loc_t loc; /* Object location */
- htri_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", obj_id, attr_name);
- /* check arguments */
- if(H5I_ATTR == H5I_get_type(obj_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ /* Check arguments */
+ if (H5I_ATTR == H5I_get_type(obj_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
/* Check if the attribute exists */
- if((ret_value = H5O_attr_exists(loc.oloc, attr_name, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5O_attr_exists(loc.oloc, attr_name, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aexists() */
-
/*-------------------------------------------------------------------------
* Function: H5Aexists_by_name
*
@@ -1662,34 +1617,31 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t lapl_id)
+H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- htri_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("t", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ if (!attr_name || !*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
- if((ret_value = H5A_exists_by_name(loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5A_exists_by_name(loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aexists_by_name() */
-
diff --git a/src/H5AC.c b/src/H5AC.c
index 32bacc5..fab2cf2 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5AC.c
* Jul 9 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Functions in this file implement a cache for
* things which exist on disk. All "things" associated
@@ -25,29 +25,28 @@
*-------------------------------------------------------------------------
*/
-#define H5AC_PACKAGE /*suppress error about including H5ACpkg */
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5AC_PACKAGE /*suppress error about including H5ACpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5AC_init_interface
+#define H5_INTERFACE_INIT_FUNC H5AC_init_interface
#ifdef H5_HAVE_PARALLEL
#include <mpi.h>
#endif /* H5_HAVE_PARALLEL */
-#include "H5private.h" /* Generic Functions */
-#include "H5ACpkg.h" /* Metadata cache */
-#include "H5Cpkg.h" /* Cache */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACpkg.h" /* Metadata cache */
+#include "H5Cpkg.h" /* Cache */
+#include "H5Dprivate.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_PARALLEL
@@ -68,25 +67,24 @@ H5FL_DEFINE_STATIC(H5AC_aux_t);
* that purpose. Its fields are as follows:
*
* magic: Unsigned 32 bit integer always set to
- * H5AC__H5AC_SLIST_ENTRY_T_MAGIC. This field is used to
- * validate pointers to instances of H5AC_slist_entry_t.
+ * H5AC__H5AC_SLIST_ENTRY_T_MAGIC. This field is used to
+ * validate pointers to instances of H5AC_slist_entry_t.
*
- * addr: file offset of a metadata entry. Entries are added to this
- * list (if they aren't there already) when they are marked
- * dirty in an unprotect, inserted, or moved. They are
- * removed when they appear in a clean entries broadcast.
+ * addr: file offset of a metadata entry. Entries are added to this
+ * list (if they aren't there already) when they are marked
+ * dirty in an unprotect, inserted, or moved. They are
+ * removed when they appear in a clean entries broadcast.
*
****************************************************************************/
#ifdef H5_HAVE_PARALLEL
-#define H5AC__H5AC_SLIST_ENTRY_T_MAGIC 0x00D0A02
+#define H5AC__H5AC_SLIST_ENTRY_T_MAGIC 0x00D0A02
-typedef struct H5AC_slist_entry_t
-{
- uint32_t magic;
+typedef struct H5AC_slist_entry_t {
+ uint32_t magic;
- haddr_t addr;
+ haddr_t addr;
} H5AC_slist_entry_t;
/* Declare a free list to manage the H5AC_slist_entry_t struct */
@@ -94,7 +92,6 @@ H5FL_DEFINE_STATIC(H5AC_slist_entry_t);
#endif /* H5_HAVE_PARALLEL */
-
/*
* Private file-scope variables.
*/
@@ -102,120 +99,83 @@ H5FL_DEFINE_STATIC(H5AC_slist_entry_t);
/* Default dataset transfer property list for metadata I/O calls */
/* (Collective set, "block before metadata write" set and "library internal" set) */
/* (Global variable definition, declaration is in H5ACprivate.h also) */
-hid_t H5AC_dxpl_id=(-1);
+hid_t H5AC_dxpl_id = (-1);
/* Dataset transfer property list for independent metadata I/O calls */
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable definition, declaration is in H5ACprivate.h also) */
-H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
-hid_t H5AC_ind_dxpl_id=(-1);
-
+H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
+hid_t H5AC_ind_dxpl_id = (-1);
/*
* Private file-scope function declarations:
*/
-static herr_t H5AC_check_if_write_permitted(const H5F_t *f,
- hid_t dxpl_id,
- hbool_t * write_permitted_ptr);
+static herr_t H5AC_check_if_write_permitted(const H5F_t *f, hid_t dxpl_id, hbool_t *write_permitted_ptr);
-static herr_t H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
- H5C_auto_size_ctl_t * int_conf_ptr);
+static herr_t H5AC_ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr,
+ H5C_auto_size_ctl_t *int_conf_ptr);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr);
+static herr_t H5AC_broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr,
+ haddr_t **haddr_buf_ptr_ptr);
-static herr_t H5AC_broadcast_clean_list(H5AC_t * cache_ptr);
+static herr_t H5AC_broadcast_clean_list(H5AC_t *cache_ptr);
-static herr_t H5AC_construct_candidate_list(H5AC_t * cache_ptr,
- H5AC_aux_t * aux_ptr,
- int sync_point_op);
+static herr_t H5AC_construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, int sync_point_op);
-static herr_t H5AC_copy_candidate_list_to_buffer(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr,
- size_t * MPI_Offset_buf_size_ptr,
- MPI_Offset ** MPI_Offset_buf_ptr_ptr);
+static herr_t H5AC_copy_candidate_list_to_buffer(H5AC_t *cache_ptr, int *num_entries_ptr,
+ haddr_t **haddr_buf_ptr_ptr, size_t *MPI_Offset_buf_size_ptr,
+ MPI_Offset **MPI_Offset_buf_ptr_ptr);
static herr_t H5AC_flush_entries(H5F_t *f);
-static herr_t H5AC_log_deleted_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr,
- haddr_t addr,
+static herr_t H5AC_log_deleted_entry(H5AC_t *cache_ptr, H5AC_info_t *entry_ptr, haddr_t addr,
unsigned int flags);
-static herr_t H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
- haddr_t addr);
+static herr_t H5AC_log_dirtied_entry(const H5AC_info_t *entry_ptr, haddr_t addr);
-static herr_t H5AC_log_flushed_entry(H5C_t * cache_ptr,
- haddr_t addr,
- hbool_t was_dirty,
- unsigned flags,
+static herr_t H5AC_log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags,
int type_id);
-static herr_t H5AC_log_moved_entry(const H5F_t * f,
- haddr_t old_addr,
- haddr_t new_addr);
+static herr_t H5AC_log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr);
-static herr_t H5AC_log_inserted_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr);
+static herr_t H5AC_log_inserted_entry(H5AC_t *cache_ptr, H5AC_info_t *entry_ptr);
-static herr_t H5AC_propagate_and_apply_candidate_list(H5F_t * f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+static herr_t H5AC_propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-static herr_t H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+static herr_t H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-static herr_t H5AC_receive_candidate_list(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr);
+static herr_t H5AC_receive_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr,
+ haddr_t **haddr_buf_ptr_ptr);
-static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5AC_t * cache_ptr);
+static herr_t H5AC_receive_and_apply_clean_list(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ H5AC_t *cache_ptr);
-static herr_t H5AC_tidy_cache_0_lists(H5AC_t * cache_ptr,
- int num_candidates,
- haddr_t * candidates_list_ptr);
+static herr_t H5AC_tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, haddr_t *candidates_list_ptr);
-herr_t H5AC_rsp__dist_md_write__flush(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+herr_t H5AC_rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-herr_t H5AC_rsp__dist_md_write__flush_to_min_clean(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+herr_t H5AC_rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-herr_t H5AC_rsp__p0_only__flush(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+herr_t H5AC_rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-herr_t H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr);
+herr_t H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr);
-static herr_t H5AC_run_sync_point(H5F_t *f,
- hid_t dxpl_id,
- int sync_point_op);
+static herr_t H5AC_run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op);
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
- * Function: H5AC_init
+ * Function: H5AC_init
*
- * Purpose: Initialize the interface from some other layer.
+ * Purpose: Initialize the interface from some other layer.
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 18, 2003
*
*-------------------------------------------------------------------------
@@ -223,7 +183,7 @@ static herr_t H5AC_run_sync_point(H5F_t *f,
herr_t
H5AC_init(void)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -232,15 +192,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5AC_init_interface
+ * Function: H5AC_init_interface
*
- * Purpose: Initialize interface-specific information
+ * Purpose: Initialize interface-specific information
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -249,10 +208,10 @@ static herr_t
H5AC_init_interface(void)
{
#ifdef H5_HAVE_PARALLEL
- H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
- unsigned coll_meta_write; /* "collective metadata write" property value */
-#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
+ unsigned coll_meta_write; /* "collective metadata write" property value */
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -261,7 +220,7 @@ H5AC_init_interface(void)
HDassert(H5P_CLS_DATASET_XFER_g != NULL);
/* Get an ID for the collective H5AC dxpl */
- if((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
+ if ((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
@@ -270,28 +229,28 @@ H5AC_init_interface(void)
/* Insert 'collective metadata write' property */
coll_meta_write = 1;
- if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ if (H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE,
+ &coll_meta_write, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
/* Get an ID for the independent H5AC dxpl */
- if((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
+ if ((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
+ if (NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'collective metadata write' property */
coll_meta_write = 0;
- if(H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ if (H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE,
+ &coll_meta_write, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
-#else /* H5_HAVE_PARALLEL */
+#else /* H5_HAVE_PARALLEL */
/* Sanity check */
- HDassert(H5P_LST_DATASET_XFER_ID_g!=(-1));
+ HDassert(H5P_LST_DATASET_XFER_ID_g != (-1));
- H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT;
/* Get the property list objects for the IDs */
@@ -303,18 +262,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5AC_term_interface
+ * Function: H5AC_term_interface
*
- * Purpose: Terminate this interface.
+ * Purpose: Terminate this interface.
*
- * Return: Success: Positive if anything was done that might
- * affect other interfaces; zero otherwise.
+ * Return: Success: Positive if anything was done that might
+ * affect other interfaces; zero otherwise.
*
- * Failure: Negative.
+ * Failure: Negative.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -322,34 +280,33 @@ done:
int
H5AC_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5_interface_initialize_g) {
#ifdef H5_HAVE_PARALLEL
- if(H5AC_dxpl_id > 0 || H5AC_ind_dxpl_id > 0) {
+ if (H5AC_dxpl_id > 0 || H5AC_ind_dxpl_id > 0) {
/* Indicate more work to do */
n = 1; /* H5I */
/* Close H5AC dxpl */
- if(H5I_dec_ref(H5AC_dxpl_id) < 0 ||
- H5I_dec_ref(H5AC_ind_dxpl_id) < 0)
+ if (H5I_dec_ref(H5AC_dxpl_id) < 0 || H5I_dec_ref(H5AC_ind_dxpl_id) < 0)
H5E_clear_stack(NULL); /*ignore error*/
else {
/* Reset static IDs */
- H5AC_dxpl_id = (-1);
+ H5AC_dxpl_id = (-1);
H5AC_ind_dxpl_id = (-1);
/* Reset interface initialization flag */
H5_interface_initialize_g = 0;
} /* end else */
- } /* end if */
+ } /* end if */
else
-#else /* H5_HAVE_PARALLEL */
- /* Reset static IDs */
- H5AC_dxpl_id=(-1);
- H5AC_ind_dxpl_id=(-1);
+#else /* H5_HAVE_PARALLEL */
+ /* Reset static IDs */
+ H5AC_dxpl_id = (-1);
+ H5AC_ind_dxpl_id = (-1);
#endif /* H5_HAVE_PARALLEL */
/* Reset interface initialization flag */
H5_interface_initialize_g = 0;
@@ -358,8 +315,7 @@ H5AC_term_interface(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5AC_term_interface() */
-static const char * H5AC_entry_type_names[H5AC_NTYPES] =
-{
+static const char *H5AC_entry_type_names[H5AC_NTYPES] = {
"B-tree nodes",
"symbol table nodes",
"local heap prefixes",
@@ -378,10 +334,9 @@ static const char * H5AC_entry_type_names[H5AC_NTYPES] =
"shared OH message master table",
"shared OH message index",
"superblock",
- "test entry" /* for testing only -- not used for actual files */
+ "test entry" /* for testing only -- not used for actual files */
};
-
/*-------------------------------------------------------------------------
* Function: H5AC_create
*
@@ -395,178 +350,158 @@ static const char * H5AC_entry_type_names[H5AC_NTYPES] =
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_create(const H5F_t *f,
- H5AC_cache_config_t *config_ptr)
+H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr)
{
#ifdef H5_HAVE_PARALLEL
- char prefix[H5C__PREFIX_LEN] = "";
- H5AC_aux_t * aux_ptr = NULL;
-#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value = SUCCEED; /* Return value */
+ char prefix[H5C__PREFIX_LEN] = "";
+ H5AC_aux_t *aux_ptr = NULL;
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
+ /* Check arguments */
HDassert(f);
HDassert(NULL == f->shared->cache);
- HDassert(config_ptr != NULL) ;
+ HDassert(config_ptr != NULL);
HDcompile_assert(NELMTS(H5AC_entry_type_names) == H5AC_NTYPES);
HDcompile_assert(H5C__MAX_NUM_TYPE_IDS == H5AC_NTYPES);
- if(H5AC_validate_config(config_ptr) < 0)
+ /* Validate configurations */
+ if (H5AC_validate_config(config_ptr) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad cache configuration")
#ifdef H5_HAVE_PARALLEL
- if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
- MPI_Comm mpi_comm;
- int mpi_rank;
- int mpi_size;
+ if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ MPI_Comm mpi_comm;
+ int mpi_rank;
+ int mpi_size;
- if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f)))
+ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator")
- if((mpi_rank = H5F_mpi_get_rank(f)) < 0)
+ if ((mpi_rank = H5F_mpi_get_rank(f)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi rank")
- if((mpi_size = H5F_mpi_get_size(f)) < 0)
+ if ((mpi_size = H5F_mpi_get_size(f)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi size")
- if(NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxiliary structure.")
+ if (NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxiliary structure")
- aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC;
- aux_ptr->mpi_comm = mpi_comm;
- aux_ptr->mpi_rank = mpi_rank;
- aux_ptr->mpi_size = mpi_size;
- aux_ptr->write_permitted = FALSE;
- aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
- aux_ptr->dirty_bytes = 0;
+ aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC;
+ aux_ptr->mpi_comm = mpi_comm;
+ aux_ptr->mpi_rank = mpi_rank;
+ aux_ptr->mpi_size = mpi_size;
+ aux_ptr->write_permitted = FALSE;
+ aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
+ aux_ptr->dirty_bytes = 0;
aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->dirty_bytes_propagations = 0;
- aux_ptr->unprotect_dirty_bytes = 0;
+ aux_ptr->dirty_bytes_propagations = 0;
+ aux_ptr->unprotect_dirty_bytes = 0;
aux_ptr->unprotect_dirty_bytes_updates = 0;
- aux_ptr->insert_dirty_bytes = 0;
- aux_ptr->insert_dirty_bytes_updates = 0;
- aux_ptr->move_dirty_bytes = 0;
- aux_ptr->move_dirty_bytes_updates = 0;
+ aux_ptr->insert_dirty_bytes = 0;
+ aux_ptr->insert_dirty_bytes_updates = 0;
+ aux_ptr->move_dirty_bytes = 0;
+ aux_ptr->move_dirty_bytes_updates = 0;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
- aux_ptr->d_slist_ptr = NULL;
- aux_ptr->d_slist_len = 0;
- aux_ptr->c_slist_ptr = NULL;
- aux_ptr->c_slist_len = 0;
+ aux_ptr->d_slist_ptr = NULL;
+ aux_ptr->d_slist_len = 0;
+ aux_ptr->c_slist_ptr = NULL;
+ aux_ptr->c_slist_len = 0;
aux_ptr->candidate_slist_ptr = NULL;
aux_ptr->candidate_slist_len = 0;
- aux_ptr->write_done = NULL;
- aux_ptr->sync_point_done = NULL;
+ aux_ptr->write_done = NULL;
+ aux_ptr->sync_point_done = NULL;
- sprintf(prefix, "%d:", mpi_rank);
+ HDsprintf(prefix, "%d:", mpi_rank);
- if(mpi_rank == 0) {
- if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.")
+ if (mpi_rank == 0) {
+ if (NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list")
- if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.")
+ if (NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list")
} /* end if */
/* construct the candidate slist for all processes.
* when the distributed strategy is selected as all processes
* will use it in the case of a flush.
*/
- if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.")
-
- if(aux_ptr != NULL) {
- if(aux_ptr->mpi_rank == 0) {
- f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- H5AC_check_if_write_permitted,
- TRUE,
- H5AC_log_flushed_entry,
- (void *)aux_ptr);
- } else {
- f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- H5AC_check_if_write_permitted,
- TRUE,
- NULL,
- (void *)aux_ptr);
+ if (NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list")
+
+ if (aux_ptr != NULL) {
+ if (aux_ptr->mpi_rank == 0) {
+ f->shared->cache =
+ H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1),
+ (const char **)H5AC_entry_type_names, H5AC_check_if_write_permitted, TRUE,
+ H5AC_log_flushed_entry, (void *)aux_ptr);
}
- } else {
- f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- H5AC_check_if_write_permitted,
- TRUE,
- NULL,
- NULL);
+ else {
+ f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE,
+ (H5AC_NTYPES - 1), (const char **)H5AC_entry_type_names,
+ H5AC_check_if_write_permitted, TRUE, NULL, (void *)aux_ptr);
+ }
+ }
+ else {
+ f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE,
+ (H5AC_NTYPES - 1), (const char **)H5AC_entry_type_names,
+ H5AC_check_if_write_permitted, TRUE, NULL, NULL);
}
- } else {
+ }
+ else {
#endif /* H5_HAVE_PARALLEL */
/* The default max cache size and min clean size will frequently be
* overwritten shortly by the subsequent set resize config call.
* -- JRM
*/
- f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- H5AC_check_if_write_permitted,
- TRUE,
- NULL,
- NULL);
+ f->shared->cache =
+ H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1),
+ (const char **)H5AC_entry_type_names, H5AC_check_if_write_permitted, TRUE, NULL, NULL);
#ifdef H5_HAVE_PARALLEL
}
#endif /* H5_HAVE_PARALLEL */
- if(NULL == f->shared->cache)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == f->shared->cache)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
#ifdef H5_HAVE_PARALLEL
- if(aux_ptr != NULL) {
- if(H5C_set_prefix(f->shared->cache, prefix) < 0)
+ if (aux_ptr != NULL) {
+ if (H5C_set_prefix(f->shared->cache, prefix) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "H5C_set_prefix() failed")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
- if(H5AC_set_cache_auto_resize_config(f->shared->cache, config_ptr) < 0)
+ if (H5AC_set_cache_auto_resize_config(f->shared->cache, config_ptr) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "auto resize configuration failed")
done:
#ifdef H5_HAVE_PARALLEL
/* if there is a failure, try to tidy up the auxiliary structure */
- if(ret_value < 0) {
- if(aux_ptr != NULL) {
- if(aux_ptr->d_slist_ptr != NULL)
+ if (ret_value < 0) {
+ if (aux_ptr != NULL) {
+ if (aux_ptr->d_slist_ptr != NULL)
H5SL_close(aux_ptr->d_slist_ptr);
-
- if(aux_ptr->c_slist_ptr != NULL)
+ if (aux_ptr->c_slist_ptr != NULL)
H5SL_close(aux_ptr->c_slist_ptr);
-
- if(aux_ptr->candidate_slist_ptr != NULL)
+ if (aux_ptr->candidate_slist_ptr != NULL)
H5SL_close(aux_ptr->candidate_slist_ptr);
-
aux_ptr->magic = 0;
- aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr);
+ aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr);
} /* end if */
- } /* end if */
-#endif /* H5_HAVE_PARALLEL */
+ } /* end if */
+#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_dest
*
@@ -577,7 +512,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -586,9 +520,9 @@ herr_t
H5AC_dest(H5F_t *f, hid_t dxpl_id)
{
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
-#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t *aux_ptr = NULL;
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -602,50 +536,50 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
#endif /* H5AC_DUMP_STATS_ON_CLOSE */
#if H5AC__TRACE_FILE_ENABLED
- if(H5AC_close_trace_file(f->shared->cache) < 0)
+ if (H5AC_close_trace_file(f->shared->cache) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_close_trace_file() failed.")
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
aux_ptr = (struct H5AC_aux_t *)(f->shared->cache->aux_ptr);
- if(aux_ptr)
+ if (aux_ptr)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */
- if(H5AC_flush_entries(f) < 0)
+ if (H5AC_flush_entries(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.")
#endif /* H5_HAVE_PARALLEL */
/* Destroy the cache */
- if(H5C_dest(f, dxpl_id, H5AC_dxpl_id) < 0)
+ if (H5C_dest(f, dxpl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache")
f->shared->cache = NULL;
#ifdef H5_HAVE_PARALLEL
- if(aux_ptr != NULL) {
- if(aux_ptr->d_slist_ptr != NULL)
+ if (aux_ptr != NULL) {
+ if (aux_ptr->d_slist_ptr != NULL)
H5SL_close(aux_ptr->d_slist_ptr);
- if(aux_ptr->c_slist_ptr != NULL)
+ if (aux_ptr->c_slist_ptr != NULL)
H5SL_close(aux_ptr->c_slist_ptr);
- if(aux_ptr->candidate_slist_ptr != NULL)
+ if (aux_ptr->candidate_slist_ptr != NULL)
H5SL_close(aux_ptr->candidate_slist_ptr);
aux_ptr->magic = 0;
- aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr);
- } /* end if */
+ aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr);
+
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_expunge_entry
*
- * Purpose: Expunge the target entry from the cache without writing it
- * to disk even if it is dirty. The entry must not be either
- * pinned or protected.
+ * Purpose: Expunge the target entry from the cache without writing it
+ * to disk even if it is dirty. The entry must not be either
+ * pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -655,18 +589,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_expunge_entry(H5F_t *f,
- hid_t dxpl_id,
- const H5AC_class_t *type,
- haddr_t addr,
- unsigned flags)
+H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsigned flags)
{
- herr_t result;
+ herr_t result;
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -679,43 +609,34 @@ H5AC_expunge_entry(H5F_t *f,
HDassert(H5F_addr_defined(addr));
#if H5AC__TRACE_FILE_ENABLED
-{
- H5AC_t * cache_ptr = f->shared->cache;
+ {
+ H5AC_t *cache_ptr = f->shared->cache;
- /* For the expunge entry call, only the addr, and type id are really
- * necessary in the trace file. Write the return value to catch occult
- * errors.
- */
- if ( ( cache_ptr != NULL ) &&
- ( H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
+ /* For the expunge entry call, only the addr, and type id are really
+ * necessary in the trace file. Write the return value to catch occult
+ * errors.
+ */
+ if ((cache_ptr != NULL) && (H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0) &&
+ (trace_file_ptr != NULL)) {
- sprintf(trace, "H5AC_expunge_entry 0x%lx %d",
- (unsigned long)addr,
- (int)(type->id));
+ HDsprintf(trace, "H5AC_expunge_entry 0x%lx %d", (unsigned long)addr, (int)(type->id));
+ }
}
-}
#endif /* H5AC__TRACE_FILE_ENABLED */
- result = H5C_expunge_entry(f,
- dxpl_id,
- H5AC_dxpl_id,
- type,
- addr,
- flags);
+ result = H5C_expunge_entry(f, dxpl_id, H5AC_dxpl_id, type, addr, flags);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \
- "H5C_expunge_entry() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed.")
}
done:
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
+ if (trace_file_ptr != NULL) {
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
}
#endif /* H5AC__TRACE_FILE_ENABLED */
@@ -723,23 +644,21 @@ done:
} /* H5AC_expunge_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_flush
*
- * Purpose: Flush (and possibly destroy) the metadata cache associated
- * with the specified file.
+ * Purpose: Flush (and possibly destroy) the metadata cache associated
+ * with the specified file.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
* Return: Non-negative on success/Negative on failure if there was a
* request to flush all items and something was protected.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -748,10 +667,10 @@ herr_t
H5AC_flush(H5F_t *f, hid_t dxpl_id)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -763,47 +682,43 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id)
/* For the flush, only the flags are really necessary in the trace file.
* Write the result to catch occult errors.
*/
- if((f != NULL) &&
- (f->shared != NULL) &&
- (f->shared->cache != NULL) &&
- (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
- (trace_file_ptr != NULL))
- sprintf(trace, "H5AC_flush");
+ if ((f != NULL) && (f->shared != NULL) && (f->shared->cache != NULL) &&
+ (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && (trace_file_ptr != NULL))
+ HDsprintf(trace, "H5AC_flush");
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
/* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */
- if(H5AC_flush_entries(f) < 0)
+ if (H5AC_flush_entries(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.")
#endif /* H5_HAVE_PARALLEL */
/* Flush the cache */
- if(H5C_flush_cache(f, dxpl_id, H5AC_dxpl_id, H5AC__NO_FLAGS_SET) < 0)
+ if (H5C_flush_cache(f, dxpl_id, H5AC_dxpl_id, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache.")
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr != NULL)
+ if (trace_file_ptr != NULL)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_get_entry_status
*
* Purpose: Given a file address, determine whether the metadata
- * cache contains an entry at that location. If it does,
- * also determine whether the entry is dirty, protected,
- * pinned, etc. and return that information to the caller
- * in *status_ptr.
+ * cache contains an entry at that location. If it does,
+ * also determine whether the entry is dirty, protected,
+ * pinned, etc. and return that information to the caller
+ * in *status.
*
- * If the specified entry doesn't exist, set *status_ptr
- * to zero.
+ * If the specified entry doesn't exist, set *status_ptr
+ * to zero.
*
- * On error, the value of *status_ptr is undefined.
+ * On error, the value of *status is undefined.
*
* Return: Non-negative on success/Negative on failure
*
@@ -813,35 +728,32 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_get_entry_status(const H5F_t *f,
- haddr_t addr,
- unsigned * status_ptr)
+H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status_ptr)
{
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- size_t entry_size;
- unsigned status = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t in_cache;
+ hbool_t is_dirty;
+ hbool_t is_protected;
+ hbool_t is_pinned;
+ size_t entry_size;
+ unsigned status = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if((f == NULL) || (!H5F_addr_defined(addr)) || (status_ptr == NULL))
+ if ((f == NULL) || (!H5F_addr_defined(addr)) || (status_ptr == NULL))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
- if(H5C_get_entry_status(f, addr, &entry_size, &in_cache, &is_dirty,
- &is_protected, &is_pinned) < 0)
+ if (H5C_get_entry_status(f, addr, &entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed.")
- if(in_cache) {
- status |= H5AC_ES__IN_CACHE;
- if(is_dirty)
- status |= H5AC_ES__IS_DIRTY;
- if(is_protected)
- status |= H5AC_ES__IS_PROTECTED;
- if(is_pinned)
- status |= H5AC_ES__IS_PINNED;
+ if (in_cache) {
+ status |= H5AC_ES__IN_CACHE;
+ if (is_dirty)
+ status |= H5AC_ES__IS_DIRTY;
+ if (is_protected)
+ status |= H5AC_ES__IS_PROTECTED;
+ if (is_pinned)
+ status |= H5AC_ES__IS_PINNED;
} /* end if */
*status_ptr = status;
@@ -850,7 +762,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_entry_status() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_insert_entry
*
@@ -861,20 +772,20 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags)
+H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing,
+ unsigned int flags)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- size_t trace_entry_size = 0;
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ size_t trace_entry_size = 0;
+ FILE * trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -888,8 +799,8 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
HDassert(thing);
/* Check for invalid access request */
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
#if H5AC__TRACE_FILE_ENABLED
/* For the insert, only the addr, size, type id and flags are really
@@ -899,65 +810,56 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
* Note that some data is not available right now -- put what we can
* in the trace buffer now, and fill in the rest at the end.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_insert_entry 0x%lx %d 0x%x",
- (unsigned long)addr,
- type->id,
- flags);
+ if ((f != NULL) && (f->shared != NULL) && (f->shared->cache != NULL) &&
+ (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && (trace_file_ptr != NULL)) {
+
+ HDsprintf(trace, "H5AC_insert_entry 0x%lx %d 0x%x", (unsigned long)addr, type->id, flags);
}
#endif /* H5AC__TRACE_FILE_ENABLED */
/* Insert entry into metadata cache */
- if(H5C_insert_entry(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0)
+ if (H5C_insert_entry(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C_insert_entry() failed")
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr != NULL) {
+ if (trace_file_ptr != NULL) {
/* make note of the entry size */
trace_entry_size = ((H5C_cache_entry_t *)thing)->size;
}
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
-{
- H5AC_aux_t *aux_ptr;
+ {
+ H5AC_aux_t *aux_ptr;
- if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
- /* Log the new entry */
- if(H5AC_log_inserted_entry(f->shared->cache, (H5AC_info_t *)thing) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC_log_inserted_entry() failed")
+ if (NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
+ /* Log the new entry */
+ if (H5AC_log_inserted_entry(f->shared->cache, (H5AC_info_t *)thing) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC_log_inserted_entry() failed")
- /* Check if we should try to flush */
- if(aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)
- if(H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
- } /* end if */
-}
+ /* Check if we should try to flush */
+ if (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)
+ if (H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
+ } /* end if */
+ }
#endif /* H5_HAVE_PARALLEL */
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr != NULL) {
- HDfprintf(trace_file_ptr, "%s %d %d\n", trace,
- (int)trace_entry_size,
- (int)ret_value);
+ if (trace_file_ptr != NULL) {
+ HDfprintf(trace_file_ptr, "%s %d %d\n", trace, (int)trace_entry_size, (int)ret_value);
}
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_insert_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_dirty
*
- * Purpose: Mark a pinned or protected entry as dirty. The target
- * entry MUST be either pinned, protected, or both.
+ * Purpose: Mark a pinned or protected entry as dirty. The target
+ * entry MUST be either pinned, protected, or both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -970,10 +872,10 @@ herr_t
H5AC_mark_entry_dirty(void *thing)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -985,41 +887,38 @@ H5AC_mark_entry_dirty(void *thing)
* is really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
+ if ((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && (NULL != trace_file_ptr))
+ HDsprintf(trace, "%s 0x%lx", FUNC, (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
-{
- H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
- H5C_t *cache_ptr = entry_ptr->cache_ptr;
+ {
+ H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
+ H5C_t * cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) &&
- (entry_ptr->is_pinned) && (NULL != cache_ptr->aux_ptr)) {
- if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
- } /* end if */
-}
+ if ((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) && (entry_ptr->is_pinned) &&
+ (NULL != cache_ptr->aux_ptr)) {
+ if (H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+ }
#endif /* H5_HAVE_PARALLEL */
- if(H5C_mark_entry_dirty(thing) < 0)
+ if (H5C_mark_entry_dirty(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty")
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ if (trace_file_ptr)
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_dirty() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_move_entry
*
@@ -1029,7 +928,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -1038,13 +936,13 @@ herr_t
H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_addr)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr;
-#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5AC_aux_t *aux_ptr;
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1060,52 +958,46 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
* necessary in the trace file. Include the type id so we don't have to
* look it up. Also write the result to catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_move_entry 0x%lx 0x%lx %d",
- (unsigned long)old_addr,
- (unsigned long)new_addr,
- (int)(type->id));
+ if ((f != NULL) && (f->shared != NULL) && (f->shared->cache != NULL) &&
+ (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && (trace_file_ptr != NULL)) {
+
+ HDsprintf(trace, "H5AC_move_entry 0x%lx 0x%lx %d", (unsigned long)old_addr, (unsigned long)new_addr,
+ (int)(type->id));
}
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
/* Log moving the entry */
- if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
- if(H5AC_log_moved_entry(f, old_addr, new_addr) < 0)
+ if (NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
+ if (H5AC_log_moved_entry(f, old_addr, new_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
- if(H5C_move_entry(f->shared->cache, type, old_addr, new_addr) < 0)
+ if (H5C_move_entry(f->shared->cache, type, old_addr, new_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "H5C_move_entry() failed.")
#ifdef H5_HAVE_PARALLEL
/* Check if we should try to flush */
- if(NULL != aux_ptr && aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold) {
- if(H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
+ if (NULL != aux_ptr && aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold) {
+ if (H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr != NULL)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ if (trace_file_ptr != NULL)
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_move_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_pin_protected_entry()
*
- * Purpose: Pin a protected cache entry. The entry must be protected
+ * Purpose: Pin a protected cache entry. The entry must be protected
* at the time of call, and must be unpinned.
*
* Return: Non-negative on success/Negative on failure
@@ -1119,10 +1011,10 @@ herr_t
H5AC_pin_protected_entry(void *thing)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1133,39 +1025,36 @@ H5AC_pin_protected_entry(void *thing)
/* For the pin protected entry call, only the addr is really necessary
* in the trace file. Also write the result to catch occult errors.
*/
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
+ if ((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && (NULL != trace_file_ptr))
+ HDsprintf(trace, "%s 0x%lx", FUNC, (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
- if(H5C_pin_protected_entry(thing) < 0)
+ if (H5C_pin_protected_entry(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry")
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ if (trace_file_ptr)
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_pin_protected_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_protect
*
* Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
*
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5AC_unprotect() when
- * finished with the entry.
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5AC_unprotect() when
+ * finished with the entry.
*
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5AC_protect. Any attempt to do so will result in a failure.
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5AC_protect. Any attempt to do so will result in a failure.
*
* Return: Success: Ptr to the object.
* Failure: NULL
@@ -1177,21 +1066,16 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5AC_protect(H5F_t *f,
- hid_t dxpl_id,
- const H5AC_class_t *type,
- haddr_t addr,
- void *udata,
- H5AC_protect_t rw)
+H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *udata, H5AC_protect_t rw)
{
- unsigned protect_flags = H5C__NO_FLAGS_SET;
- void * thing = (void *)NULL;
+ unsigned protect_flags = H5C__NO_FLAGS_SET;
+ void * thing = (void *)NULL;
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- size_t trace_entry_size = 0;
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- void * ret_value; /* Return value */
+ char trace[128] = "";
+ size_t trace_entry_size = 0;
+ FILE * trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1205,8 +1089,8 @@ H5AC_protect(H5F_t *f,
HDassert(H5F_addr_defined(addr));
/* Check for invalid access request */
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR) && rw == H5AC_WRITE)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR) && rw == H5AC_WRITE)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
#if H5AC__TRACE_FILE_ENABLED
/* For the protect call, only the addr and type id is really necessary
@@ -1214,54 +1098,42 @@ H5AC_protect(H5F_t *f,
* sanity check. Also indicate whether the call was successful to
* catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
- ( trace_file_ptr != NULL ) ) {
-
- const char * rw_string;
+ if ((f != NULL) && (f->shared != NULL) && (f->shared->cache != NULL) &&
+ (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && (trace_file_ptr != NULL)) {
- if ( rw == H5AC_WRITE ) {
+ const char *rw_string;
- rw_string = "H5AC_WRITE";
+ if (rw == H5AC_WRITE) {
- } else if ( rw == H5AC_READ ) {
-
- rw_string = "H5AC_READ";
+ rw_string = "H5AC_WRITE";
+ }
+ else if (rw == H5AC_READ) {
- } else {
+ rw_string = "H5AC_READ";
+ }
+ else {
- rw_string = "???";
- }
+ rw_string = "???";
+ }
- sprintf(trace, "H5AC_protect 0x%lx %d %s",
- (unsigned long)addr,
- (int)(type->id),
- rw_string);
+ HDsprintf(trace, "H5AC_protect 0x%lx %d %s", (unsigned long)addr, (int)(type->id), rw_string);
}
#endif /* H5AC__TRACE_FILE_ENABLED */
- if ( rw == H5AC_READ ) {
+ if (rw == H5AC_READ) {
- protect_flags |= H5C__READ_ONLY_FLAG;
+ protect_flags |= H5C__READ_ONLY_FLAG;
}
- thing = H5C_protect(f,
- dxpl_id,
- H5AC_dxpl_id,
- type,
- addr,
- udata,
- protect_flags);
+ thing = H5C_protect(f, dxpl_id, H5AC_dxpl_id, type, addr, udata, protect_flags);
- if ( thing == NULL ) {
+ if (thing == NULL) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_protect() failed.")
}
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
+ if (trace_file_ptr != NULL) {
/* make note of the entry size */
trace_entry_size = ((H5C_cache_entry_t *)thing)->size;
@@ -1274,11 +1146,9 @@ H5AC_protect(H5F_t *f,
done:
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
+ if (trace_file_ptr != NULL) {
- HDfprintf(trace_file_ptr, "%s %d %d\n", trace,
- (int)trace_entry_size,
- (int)(ret_value != NULL));
+ HDfprintf(trace_file_ptr, "%s %d %d\n", trace, (int)trace_entry_size, (int)(ret_value != NULL));
}
#endif /* H5AC__TRACE_FILE_ENABLED */
@@ -1286,11 +1156,10 @@ done:
} /* H5AC_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_resize_entry
*
- * Purpose: Resize a pinned or protected entry.
+ * Purpose: Resize a pinned or protected entry.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1303,10 +1172,10 @@ herr_t
H5AC_resize_entry(void *thing, size_t new_size)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1318,46 +1187,43 @@ H5AC_resize_entry(void *thing, size_t new_size)
* really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx %d", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr),
- (int)new_size);
+ if ((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && (NULL != trace_file_ptr))
+ HDsprintf(trace, "%s 0x%lx %d", FUNC, (unsigned long)(((H5C_cache_entry_t *)thing)->addr),
+ (int)new_size);
#endif /* H5AC__TRACE_FILE_ENABLED */
- if(H5C_resize_entry(thing, new_size) < 0)
+ if (H5C_resize_entry(thing, new_size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry")
#ifdef H5_HAVE_PARALLEL
-{
- H5AC_info_t * entry_ptr = (H5AC_info_t *)thing;
- H5C_t *cache_ptr = entry_ptr->cache_ptr;
+ {
+ H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
+ H5C_t * cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
- if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
- } /* end if */
-}
+ if ((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
+ if (H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+ }
#endif /* H5_HAVE_PARALLEL */
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ if (trace_file_ptr)
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_resize_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry must be unprotected at
- * the time of call, and must be pinned.
+ * Purpose: Unpin a cache entry. The entry must be unprotected at
+ * the time of call, and must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1370,10 +1236,10 @@ herr_t
H5AC_unpin_entry(void *thing)
{
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1384,49 +1250,46 @@ H5AC_unpin_entry(void *thing)
/* For the unpin entry call, only the addr is really necessary
* in the trace file. Also write the result to catch occult errors.
*/
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
+ if ((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && (NULL != trace_file_ptr))
+ HDsprintf(trace, "%s 0x%lx", FUNC, (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
- if(H5C_unpin_entry(thing) < 0)
+ if (H5C_unpin_entry(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry")
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
+ if (trace_file_ptr)
+ HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unpin_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_unprotect
*
- * Purpose: Undo an H5AC_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
+ * Purpose: Undo an H5AC_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
*
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5AC_protect() and the THING
- * argument must be the value returned by that call to
- * H5AC_protect().
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5AC_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5AC_protect().
*
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
*
- * This version of the function is a complete re-write to
- * use the new metadata cache. While there isn't all that
- * much difference between the old and new Purpose sections,
- * the original version is given below.
+ * This version of the function is a complete re-write to
+ * use the new metadata cache. While there isn't all that
+ * much difference between the old and new Purpose sections,
+ * the original version is given below.
*
- * Original purpose section:
+ * Original purpose section:
*
- * This function should be called to undo the effect of
+ * This function should be called to undo the effect of
* H5AC_protect(). The TYPE and ADDR arguments should be the
* same as the corresponding call to H5AC_protect() and the
* THING argument should be the value returned by H5AC_protect().
@@ -1436,25 +1299,23 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Sep 2 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
- void *thing, unsigned flags)
+H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned flags)
{
- hbool_t dirtied;
- hbool_t deleted;
+ hbool_t dirtied;
+ hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
+ H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value=SUCCEED; /* Return value */
+ char trace[128] = "";
+ FILE *trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1466,87 +1327,79 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
HDassert(type->flush);
HDassert(H5F_addr_defined(addr));
HDassert(thing);
- HDassert( ((H5AC_info_t *)thing)->addr == addr );
- HDassert( ((H5AC_info_t *)thing)->type == type );
+ HDassert(((H5AC_info_t *)thing)->addr == addr);
+ HDassert(((H5AC_info_t *)thing)->type == type);
#if H5AC__TRACE_FILE_ENABLED
/* For the unprotect call, only the addr, type id, flags, and possible
* new size are really necessary in the trace file. Write the return
* value to catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_unprotect 0x%lx %d",
- (unsigned long)addr,
- (int)(type->id));
+ if ((f != NULL) && (f->shared != NULL) && (f->shared->cache != NULL) &&
+ (H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && (trace_file_ptr != NULL)) {
+
+ HDsprintf(trace, "H5AC_unprotect 0x%lx %d", (unsigned long)addr, (int)(type->id));
}
#endif /* H5AC__TRACE_FILE_ENABLED */
- dirtied = (hbool_t)( ( (flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG ) ||
- ( ((H5AC_info_t *)thing)->dirtied ) );
- deleted = (hbool_t)( (flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG );
+ dirtied =
+ (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || (((H5AC_info_t *)thing)->dirtied));
+ deleted = (hbool_t)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG);
/* Check if the size changed out from underneath us, if we're not deleting
* the entry.
*/
- if(dirtied && !deleted) {
- size_t curr_size = 0;
+ if (dirtied && !deleted) {
+ size_t curr_size = 0;
- if((type->size)(f, thing, &curr_size) < 0)
+ if ((type->size)(f, thing, &curr_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
- if(((H5AC_info_t *)thing)->size != curr_size)
+ if (((H5AC_info_t *)thing)->size != curr_size)
HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, FAIL, "size of entry changed")
} /* end if */
#ifdef H5_HAVE_PARALLEL
- if((dirtied) && (((H5AC_info_t *)thing)->is_dirty == FALSE) &&
- (NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr))) {
- if(H5AC_log_dirtied_entry((H5AC_info_t *)thing, addr) < 0)
+ if ((dirtied) && (((H5AC_info_t *)thing)->is_dirty == FALSE) &&
+ (NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr))) {
+ if (H5AC_log_dirtied_entry((H5AC_info_t *)thing, addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry")
} /* end if */
- if((deleted) &&
- (NULL != (aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr))) &&
- (aux_ptr->mpi_rank == 0)) {
- if(H5AC_log_deleted_entry(f->shared->cache, (H5AC_info_t *)thing, addr, flags) < 0)
+ if ((deleted) && (NULL != (aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr))) &&
+ (aux_ptr->mpi_rank == 0)) {
+ if (H5AC_log_deleted_entry(f->shared->cache, (H5AC_info_t *)thing, addr, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC_log_deleted_entry() failed.")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
- if(H5C_unprotect(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0)
+ if (H5C_unprotect(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed.")
#ifdef H5_HAVE_PARALLEL
/* Check if we should try to flush */
- if((aux_ptr != NULL) && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) {
- if(H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
+ if ((aux_ptr != NULL) && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) {
+ if (H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
done:
#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr != NULL)
- HDfprintf(trace_file_ptr, "%s %x %d\n",
- trace, (unsigned)flags, (int)ret_value);
+ if (trace_file_ptr != NULL)
+ HDfprintf(trace_file_ptr, "%s %x %d\n", trace, (unsigned)flags, (int)ret_value);
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unprotect() */
-
/*-------------------------------------------------------------------------
* Function: HA5C_set_sync_point_done_callback
*
- * Purpose: Set the value of the sync_point_done callback. This
- * callback is used by the parallel test code to verify
- * that the expected writes and only the expected writes
- * take place during a sync point.
+ * Purpose: Set the value of the sync_point_done callback. This
+ * callback is used by the parallel test code to verify
+ * that the expected writes and only the expected writes
+ * take place during a sync point.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1557,10 +1410,10 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
- void (* sync_point_done)(int num_writes, haddr_t * written_entries_tbl))
+H5AC_set_sync_point_done_callback(H5C_t *cache_ptr,
+ void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl))
{
- H5AC_aux_t * aux_ptr;
+ H5AC_aux_t *aux_ptr;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1568,8 +1421,8 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->sync_point_done = sync_point_done;
@@ -1577,7 +1430,6 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
} /* H5AC_set_sync_point_done_callback() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: HA5C_set_write_done_callback
*
@@ -1594,10 +1446,9 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_set_write_done_callback(H5C_t * cache_ptr,
- void (* write_done)(void))
+H5AC_set_write_done_callback(H5C_t *cache_ptr, void (*write_done)(void))
{
- H5AC_aux_t * aux_ptr;
+ H5AC_aux_t *aux_ptr;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1605,8 +1456,8 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->write_done = write_done;
@@ -1614,7 +1465,6 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
} /* H5AC_set_write_done_callback() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_stats
*
@@ -1630,7 +1480,7 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
herr_t
H5AC_stats(const H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1645,7 +1495,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_stats() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_dump_cache
*
@@ -1662,7 +1511,7 @@ done:
herr_t
H5AC_dump_cache(const H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1670,7 +1519,7 @@ H5AC_dump_cache(const H5F_t *f)
HDassert(f->shared);
HDassert(f->shared->cache);
- if ( H5C_dump_cache(f->shared->cache, H5F_OPEN_NAME(f)) < 0 ) {
+ if (H5C_dump_cache(f->shared->cache, H5F_OPEN_NAME(f)) < 0) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_dump_cache() failed.")
}
@@ -1679,7 +1528,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_dump_cache() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_auto_resize_config
*
@@ -1693,57 +1541,41 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
- H5AC_cache_config_t *config_ptr)
+H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
- hbool_t evictions_enabled;
+ herr_t result;
+ herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t evictions_enabled;
H5C_auto_size_ctl_t internal_config;
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL )
- ||
+ if ((cache_ptr == NULL) ||
#ifdef H5_HAVE_PARALLEL
- ( ( cache_ptr->aux_ptr != NULL )
- &&
- ( ((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic
- !=
- H5AC__H5AC_AUX_T_MAGIC
- )
- )
- ||
+ ((cache_ptr->aux_ptr != NULL) &&
+ (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC)) ||
#endif /* H5_HAVE_PARALLEL */
- ( config_ptr == NULL )
- ||
- ( config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION )
- )
- {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Bad cache_ptr or config_ptr on entry.")
-
+ (config_ptr == NULL) || (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or config_ptr on entry.")
}
- result = H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr,
- &internal_config);
+ result = H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr, &internal_config);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_cache_auto_resize_config() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_auto_resize_config() failed.")
}
- if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
+ if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_resize_enabled() failed.")
- if ( internal_config.rpt_fcn == NULL ) {
+ if (internal_config.rpt_fcn == NULL) {
config_ptr->rpt_fcn_enabled = FALSE;
+ }
+ else {
- } else {
-
- config_ptr->rpt_fcn_enabled = TRUE;
+ config_ptr->rpt_fcn_enabled = TRUE;
}
config_ptr->open_trace_file = FALSE;
@@ -1769,38 +1601,30 @@ H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
config_ptr->decrement = internal_config.decrement;
config_ptr->apply_max_decrement = internal_config.apply_max_decrement;
config_ptr->max_decrement = internal_config.max_decrement;
- config_ptr->epochs_before_eviction =
- (int)(internal_config.epochs_before_eviction);
+ config_ptr->epochs_before_eviction = (int)(internal_config.epochs_before_eviction);
config_ptr->apply_empty_reserve = internal_config.apply_empty_reserve;
config_ptr->empty_reserve = internal_config.empty_reserve;
#ifdef H5_HAVE_PARALLEL
- if ( cache_ptr->aux_ptr != NULL ) {
-
- config_ptr->dirty_bytes_threshold =
- ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold;
- config_ptr->metadata_write_strategy =
- ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy;
+ if (cache_ptr->aux_ptr != NULL) {
- } else {
+ config_ptr->dirty_bytes_threshold = ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold;
+ config_ptr->metadata_write_strategy = ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy;
+ }
+ else {
#endif /* H5_HAVE_PARALLEL */
- config_ptr->dirty_bytes_threshold =
- H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
- config_ptr->metadata_write_strategy =
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
+ config_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
+ config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
#ifdef H5_HAVE_PARALLEL
}
#endif /* H5_HAVE_PARALLEL */
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_get_cache_auto_resize_config() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_size
*
@@ -1814,36 +1638,26 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_get_cache_size(H5AC_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr)
+H5AC_get_cache_size(H5AC_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr, size_t *cur_size_ptr,
+ int32_t *cur_num_entries_ptr)
{
herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- result = H5C_get_cache_size((H5C_t *)cache_ptr,
- max_size_ptr,
- min_clean_size_ptr,
- cur_size_ptr,
- cur_num_entries_ptr);
+ result = H5C_get_cache_size((H5C_t *)cache_ptr, max_size_ptr, min_clean_size_ptr, cur_size_ptr,
+ cur_num_entries_ptr);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_cache_size() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_size() failed.")
}
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_get_cache_size() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_hit_rate
*
@@ -1857,20 +1671,19 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_get_cache_hit_rate(H5AC_t * cache_ptr, double * hit_rate_ptr)
+H5AC_get_cache_hit_rate(H5AC_t *cache_ptr, double *hit_rate_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(H5C_get_cache_hit_rate((H5C_t *)cache_ptr, hit_rate_ptr) < 0)
+ if (H5C_get_cache_hit_rate((H5C_t *)cache_ptr, hit_rate_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_hit_rate() failed.")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_hit_rate() */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_reset_cache_hit_rate_stats()
@@ -1884,28 +1697,24 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr)
+H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr)
{
herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
result = H5C_reset_cache_hit_rate_stats((H5C_t *)cache_ptr);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_reset_cache_hit_rate_stats() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats() failed.")
}
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_reset_cache_hit_rate_stats() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_set_cache_auto_resize_config
*
@@ -1919,110 +1728,93 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
- H5AC_cache_config_t *config_ptr)
+H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
H5C_auto_size_ctl_t internal_config;
#if H5AC__TRACE_FILE_ENABLED
- H5AC_cache_config_t trace_config = H5AC__DEFAULT_CACHE_CONFIG;
+ H5AC_cache_config_t trace_config = H5AC__DEFAULT_CACHE_CONFIG;
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr );
+ HDassert(cache_ptr);
#if H5AC__TRACE_FILE_ENABLED
/* Make note of the new configuration. Don't look up the trace file
* pointer, as that may change before we use it.
*/
- if ( config_ptr != NULL ) {
+ if (config_ptr != NULL) {
trace_config = *config_ptr;
-
}
#endif /* H5AC__TRACE_FILE_ENABLED */
- if ( ( cache_ptr == NULL )
+ if ((cache_ptr == NULL)
#ifdef H5_HAVE_PARALLEL
- ||
- ( ( cache_ptr->aux_ptr != NULL )
- &&
- (
- ((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic
- !=
- H5AC__H5AC_AUX_T_MAGIC
- )
- )
+ || ((cache_ptr->aux_ptr != NULL) &&
+ (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC))
#endif /* H5_HAVE_PARALLEL */
- ) {
+ ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry.")
}
result = H5AC_validate_config(config_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad cache configuration");
}
- if ( config_ptr->open_trace_file ) {
+ if (config_ptr->open_trace_file) {
- FILE * file_ptr = NULL;
+ FILE *file_ptr = NULL;
- if ( H5C_get_trace_file_ptr(cache_ptr, &file_ptr) < 0 ) {
+ if (H5C_get_trace_file_ptr(cache_ptr, &file_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_trace_file_ptr() failed.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_trace_file_ptr() failed.")
+ }
- if ( ( ! ( config_ptr->close_trace_file ) ) &&
- ( file_ptr != NULL ) ) {
+ if ((!(config_ptr->close_trace_file)) && (file_ptr != NULL)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "Trace file already open.")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Trace file already open.")
}
}
- if ( config_ptr->close_trace_file ) {
+ if (config_ptr->close_trace_file) {
- if ( H5AC_close_trace_file(cache_ptr) < 0 ) {
+ if (H5AC_close_trace_file(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_close_trace_file() failed.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_close_trace_file() failed.")
+ }
}
- if ( config_ptr->open_trace_file ) {
+ if (config_ptr->open_trace_file) {
- if ( H5AC_open_trace_file(cache_ptr, config_ptr->trace_file_name) < 0 )
- {
+ if (H5AC_open_trace_file(cache_ptr, config_ptr->trace_file_name) < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "H5AC_open_trace_file() failed.")
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC_open_trace_file() failed.")
+ }
}
- if(H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
+ if (H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_ext_config_2_int_config() failed.")
- if(H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0)
+ if (H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed.")
- if(H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0)
+ if (H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed.")
#ifdef H5_HAVE_PARALLEL
- if ( cache_ptr->aux_ptr != NULL ) {
+ if (cache_ptr->aux_ptr != NULL) {
- ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold =
- config_ptr->dirty_bytes_threshold;
+ ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold = config_ptr->dirty_bytes_threshold;
- ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy =
- config_ptr->metadata_write_strategy;
+ ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy = config_ptr->metadata_write_strategy;
}
#endif /* H5_HAVE_PARALLEL */
@@ -2033,44 +1825,26 @@ done:
* of the config is necessary in the trace file. Write the return
* value to catch occult errors.
*/
- if ( ( cache_ptr != NULL ) &&
- ( H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- HDfprintf(trace_file_ptr,
- "%s %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %f %f %d %d %d %f %f %d %d %d %d %f %d %d %d\n",
- "H5AC_set_cache_auto_resize_config",
- trace_config.version,
- (int)(trace_config.rpt_fcn_enabled),
- (int)(trace_config.open_trace_file),
- (int)(trace_config.close_trace_file),
- trace_config.trace_file_name,
- (int)(trace_config.evictions_enabled),
- (int)(trace_config.set_initial_size),
- (int)(trace_config.initial_size),
- trace_config.min_clean_fraction,
- (int)(trace_config.max_size),
- (int)(trace_config.min_size),
- trace_config.epoch_length,
- (int)(trace_config.incr_mode),
- trace_config.lower_hr_threshold,
- trace_config.increment,
- (int)(trace_config.flash_incr_mode),
- trace_config.flash_multiple,
- trace_config.flash_threshold,
- (int)(trace_config.apply_max_increment),
- (int)(trace_config.max_increment),
- (int)(trace_config.decr_mode),
- trace_config.upper_hr_threshold,
- trace_config.decrement,
- (int)(trace_config.apply_max_decrement),
- (int)(trace_config.max_decrement),
- trace_config.epochs_before_eviction,
- (int)(trace_config.apply_empty_reserve),
- trace_config.empty_reserve,
- trace_config.dirty_bytes_threshold,
- trace_config.metadata_write_strategy,
- (int)ret_value);
+ if ((cache_ptr != NULL) && (H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0) &&
+ (trace_file_ptr != NULL)) {
+
+ HDfprintf(
+ trace_file_ptr,
+ "%s %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %f %f %d %d %d %f %f %d %d %d %d %f %d "
+ "%d %d\n",
+ "H5AC_set_cache_auto_resize_config", trace_config.version, (int)(trace_config.rpt_fcn_enabled),
+ (int)(trace_config.open_trace_file), (int)(trace_config.close_trace_file),
+ trace_config.trace_file_name, (int)(trace_config.evictions_enabled),
+ (int)(trace_config.set_initial_size), (int)(trace_config.initial_size),
+ trace_config.min_clean_fraction, (int)(trace_config.max_size), (int)(trace_config.min_size),
+ trace_config.epoch_length, (int)(trace_config.incr_mode), trace_config.lower_hr_threshold,
+ trace_config.increment, (int)(trace_config.flash_incr_mode), trace_config.flash_multiple,
+ trace_config.flash_threshold, (int)(trace_config.apply_max_increment),
+ (int)(trace_config.max_increment), (int)(trace_config.decr_mode), trace_config.upper_hr_threshold,
+ trace_config.decrement, (int)(trace_config.apply_max_decrement),
+ (int)(trace_config.max_decrement), trace_config.epochs_before_eviction,
+ (int)(trace_config.apply_empty_reserve), trace_config.empty_reserve,
+ trace_config.dirty_bytes_threshold, trace_config.metadata_write_strategy, (int)ret_value);
}
#endif /* H5AC__TRACE_FILE_ENABLED */
@@ -2078,21 +1852,20 @@ done:
} /* H5AC_set_cache_auto_resize_config() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_validate_config()
*
* Purpose: Run a sanity check on the contents of the supplied
- * instance of H5AC_cache_config_t.
+ * instance of H5AC_cache_config_t.
*
* Do nothing and return SUCCEED if no errors are detected,
* and flag an error and return FAIL otherwise.
*
- * At present, this function operates by packing the data
- * from the instance of H5AC_cache_config_t into an instance
- * of H5C_auto_size_ctl_t, and then calling
- * H5C_validate_resize_config(). As H5AC_cache_config_t and
- * H5C_auto_size_ctl_t diverge, we may have to change this.
+ * At present, this function operates by packing the data
+ * from the instance of H5AC_cache_config_t into an instance
+ * of H5C_auto_size_ctl_t, and then calling
+ * H5C_validate_resize_config(). As H5AC_cache_config_t and
+ * H5C_auto_size_ctl_t diverge, we may have to change this.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2102,82 +1875,81 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_validate_config(H5AC_cache_config_t * config_ptr)
+H5AC_validate_config(H5AC_cache_config_t *config_ptr)
{
H5C_auto_size_ctl_t internal_config;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(config_ptr == NULL)
+ if (config_ptr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config_ptr on entry.")
- if(config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)
+ if (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version.")
- if((config_ptr->rpt_fcn_enabled != TRUE) && (config_ptr->rpt_fcn_enabled != FALSE))
+ if ((config_ptr->rpt_fcn_enabled != TRUE) && (config_ptr->rpt_fcn_enabled != FALSE))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->rpt_fcn_enabled must be either TRUE or FALSE.")
- if((config_ptr->open_trace_file != TRUE) && (config_ptr->open_trace_file != FALSE))
+ if ((config_ptr->open_trace_file != TRUE) && (config_ptr->open_trace_file != FALSE))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->open_trace_file must be either TRUE or FALSE.")
- if((config_ptr->close_trace_file != TRUE) && (config_ptr->close_trace_file != FALSE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->close_trace_file must be either TRUE or FALSE.")
+ if ((config_ptr->close_trace_file != TRUE) && (config_ptr->close_trace_file != FALSE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "config_ptr->close_trace_file must be either TRUE or FALSE.")
/* don't bother to test trace_file_name unless open_trace_file is TRUE */
- if(config_ptr->open_trace_file) {
- size_t name_len;
+ if (config_ptr->open_trace_file) {
+ size_t name_len;
- /* Can't really test the trace_file_name field without trying to
- * open the file, so we will content ourselves with a couple of
- * sanity checks on the length of the file name.
- */
- name_len = HDstrlen(config_ptr->trace_file_name);
+ /* Can't really test the trace_file_name field without trying to
+ * open the file, so we will content ourselves with a couple of
+ * sanity checks on the length of the file name.
+ */
+ name_len = HDstrlen(config_ptr->trace_file_name);
- if(name_len == 0) {
+ if (name_len == 0) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name is empty.")
- } else if(name_len > H5AC__MAX_TRACE_FILE_NAME_LEN) {
+ }
+ else if (name_len > H5AC__MAX_TRACE_FILE_NAME_LEN) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name too long.")
- }
+ }
}
- if ( ( config_ptr->evictions_enabled != TRUE ) &&
- ( config_ptr->evictions_enabled != FALSE ) ) {
+ if ((config_ptr->evictions_enabled != TRUE) && (config_ptr->evictions_enabled != FALSE)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->evictions_enabled must be either TRUE or FALSE.")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "config_ptr->evictions_enabled must be either TRUE or FALSE.")
}
- if ( ( config_ptr->evictions_enabled == FALSE ) &&
- ( ( config_ptr->incr_mode != H5C_incr__off ) ||
- ( config_ptr->flash_incr_mode != H5C_flash_incr__off ) ||
- ( config_ptr->decr_mode != H5C_decr__off ) ) ) {
+ if ((config_ptr->evictions_enabled == FALSE) &&
+ ((config_ptr->incr_mode != H5C_incr__off) || (config_ptr->flash_incr_mode != H5C_flash_incr__off) ||
+ (config_ptr->decr_mode != H5C_decr__off))) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "Can't disable evictions while auto-resize is enabled.")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Can't disable evictions while auto-resize is enabled.")
}
- if(config_ptr->dirty_bytes_threshold < H5AC__MIN_DIRTY_BYTES_THRESHOLD) {
+ if (config_ptr->dirty_bytes_threshold < H5AC__MIN_DIRTY_BYTES_THRESHOLD) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too small.")
- } else if(config_ptr->dirty_bytes_threshold > H5AC__MAX_DIRTY_BYTES_THRESHOLD) {
+ }
+ else if (config_ptr->dirty_bytes_threshold > H5AC__MAX_DIRTY_BYTES_THRESHOLD) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too big.")
}
- if((config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY) &&
- (config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
+ if ((config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY) &&
+ (config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_ptr->metadata_write_strategy out of range.")
- if(H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
+ if (H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_ext_config_2_int_config() failed.")
- if(H5C_validate_resize_config(&internal_config, H5C_RESIZE_CFG__VALIDATE_ALL) < 0)
+ if (H5C_validate_resize_config(&internal_config, H5C_RESIZE_CFG__VALIDATE_ALL) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error(s) in new config.")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_validate_config() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_close_trace_file()
*
@@ -2195,37 +1967,34 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_close_trace_file(H5AC_t * cache_ptr)
+H5AC_close_trace_file(H5AC_t *cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- FILE * trace_file_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
+ FILE * trace_file_ptr = NULL;
FUNC_ENTER_NOAPI(FAIL)
- if ( cache_ptr == NULL ) {
+ if (cache_ptr == NULL) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL cache_ptr on entry.")
}
- if ( H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) < 0 ) {
+ if (H5C_get_trace_file_ptr(cache_ptr, &trace_file_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_trace_file_ptr() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_trace_file_ptr() failed.")
}
- if ( trace_file_ptr != NULL ) {
+ if (trace_file_ptr != NULL) {
- if ( H5C_set_trace_file_ptr(cache_ptr, NULL) < 0 ) {
+ if (H5C_set_trace_file_ptr(cache_ptr, NULL) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_trace_file_ptr() failed.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_trace_file_ptr() failed.")
+ }
- if ( HDfclose(trace_file_ptr) != 0 ) {
+ if (HDfclose(trace_file_ptr) != 0) {
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, \
- "can't close metadata cache trace file")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close metadata cache trace file")
}
}
@@ -2235,15 +2004,14 @@ done:
} /* H5AC_close_trace_file() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_open_trace_file()
*
* Purpose: Open a trace file, and start logging calls to the cache.
*
- * This logging is done at the H5C level, and will only take
- * place if H5C_TRACE_FILE_ENABLED (defined in H5Cprivate.h)
- * is TRUE.
+ * This logging is done at the H5C level, and will only take
+ * place if H5C_TRACE_FILE_ENABLED (defined in H5Cprivate.h)
+ * is TRUE.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2253,43 +2021,40 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_open_trace_file(H5AC_t * cache_ptr,
- const char * trace_file_name)
+H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
- char file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 2];
- FILE * file_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
+ char file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 2];
+ FILE * file_ptr = NULL;
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
+ H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
FUNC_ENTER_NOAPI(FAIL)
HDassert(cache_ptr);
- if ( cache_ptr == NULL ) {
+ if (cache_ptr == NULL) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cache_ptr NULL on entry.")
}
- if ( trace_file_name == NULL ) {
+ if (trace_file_name == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "NULL trace_file_name on entry.")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL trace_file_name on entry.")
}
- if ( HDstrlen(trace_file_name) > H5AC__MAX_TRACE_FILE_NAME_LEN ) {
+ if (HDstrlen(trace_file_name) > H5AC__MAX_TRACE_FILE_NAME_LEN) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trace file name too long.")
}
- if ( H5C_get_trace_file_ptr(cache_ptr, &file_ptr) < 0 ) {
+ if (H5C_get_trace_file_ptr(cache_ptr, &file_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_trace_file_ptr() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_trace_file_ptr() failed.")
}
- if ( file_ptr != NULL ) {
+ if (file_ptr != NULL) {
HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "trace file already open.")
}
@@ -2298,48 +2063,43 @@ H5AC_open_trace_file(H5AC_t * cache_ptr,
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- if ( cache_ptr->aux_ptr == NULL ) {
-
- sprintf(file_name, "%s", trace_file_name);
+ if (cache_ptr->aux_ptr == NULL) {
- } else {
+ HDsprintf(file_name, "%s", trace_file_name);
+ }
+ else {
- if ( aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC ) {
+ if (aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad aux_ptr->magic.")
- }
-
- sprintf(file_name, "%s.%d", trace_file_name, aux_ptr->mpi_rank);
+ }
+ HDsprintf(file_name, "%s.%d", trace_file_name, aux_ptr->mpi_rank);
}
- if ( HDstrlen(file_name) >
- H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1 ) {
+ if (HDstrlen(file_name) > H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "cooked trace file name too long.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cooked trace file name too long.")
}
#else /* H5_HAVE_PARALLEL */
- HDsnprintf(file_name,
- (size_t)(H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1),
- "%s", trace_file_name);
+ HDsnprintf(file_name, (size_t)(H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1), "%s",
+ trace_file_name);
#endif /* H5_HAVE_PARALLEL */
- if ( (file_ptr = HDfopen(file_name, "w")) == NULL ) {
+ if ((file_ptr = HDfopen(file_name, "w")) == NULL) {
- /* trace file open failed */
+ /* trace file open failed */
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "trace file open failed.")
}
HDfprintf(file_ptr, "### HDF5 metadata cache trace file ###\n");
- if ( H5C_set_trace_file_ptr(cache_ptr, file_ptr) < 0 ) {
+ if (H5C_set_trace_file_ptr(cache_ptr, file_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_trace_file_ptr() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_trace_file_ptr() failed.")
}
done:
@@ -2348,17 +2108,16 @@ done:
} /* H5AC_open_trace_file() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_add_candidate()
*
* Purpose: Add the supplied metadata entry address to the candidate
- * list. Verify that each entry added does not appear in
- * the list prior to its insertion.
+ * list. Verify that each entry added does not appear in
+ * the list prior to its insertion.
*
- * This function is intended for used in constructing list
- * of entried to be flushed during sync points. It shouldn't
- * be called anywhere else.
+ * This function is intended for used in constructing list
+ * of entried to be flushed during sync points. It shouldn't
+ * be called anywhere else.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2369,40 +2128,38 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_add_candidate(H5AC_t * cache_ptr,
- haddr_t addr)
+H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr)
{
- H5AC_aux_t * aux_ptr;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t * aux_ptr;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
- HDassert( aux_ptr->candidate_slist_ptr != NULL );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ HDassert(aux_ptr->candidate_slist_ptr != NULL);
/* If the supplied address appears in the candidate list, scream and die. */
- if(NULL != H5SL_search(aux_ptr->candidate_slist_ptr, (void *)(&addr)))
+ if (NULL != H5SL_search(aux_ptr->candidate_slist_ptr, (void *)(&addr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry already in candidate slist.")
/* otherwise, construct an entry for the supplied address, and insert
* it into the candidate slist.
*/
- if(NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)))
+ if (NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "Can't allocate candidate slist entry .")
slist_entry_ptr->magic = H5AC__H5AC_SLIST_ENTRY_T_MAGIC;
slist_entry_ptr->addr = addr;
- if(H5SL_insert(aux_ptr->candidate_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0)
+ if (H5SL_insert(aux_ptr->candidate_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.")
aux_ptr->candidate_slist_len += 1;
@@ -2412,7 +2169,6 @@ done:
} /* H5AC_add_candidate() */
#endif /* H5_HAVE_PARALLEL */
-
/*************************************************************************/
/**************************** Private Functions: *************************/
/*************************************************************************/
@@ -2422,18 +2178,18 @@ done:
* Function: H5AC_broadcast_candidate_list()
*
* Purpose: Broadcast the contents of the process 0 candidate entry
- * slist. In passing, also remove all entries from said
- * list. As the application of this will be handled by
- * the same functions on all processes, construct and
- * return a copy of the list in the same format as that
- * received by the other processes. Note that if this
- * copy is returned in *haddr_buf_ptr_ptr, the caller
- * must free it.
+ * slist. In passing, also remove all entries from said
+ * list. As the application of this will be handled by
+ * the same functions on all processes, construct and
+ * return a copy of the list in the same format as that
+ * received by the other processes. Note that if this
+ * copy is returned in *haddr_buf_ptr_ptr, the caller
+ * must free it.
*
- * This function must only be called by the process with
- * MPI_rank 0.
+ * This function must only be called by the process with
+ * MPI_rank 0.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2443,61 +2199,57 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr)
+H5AC_broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr)
{
- hbool_t success = FALSE;
- H5AC_aux_t * aux_ptr = NULL;
- haddr_t * haddr_buf_ptr = NULL;
- MPI_Offset * MPI_Offset_buf_ptr = NULL;
- size_t buf_size = 0;
- int mpi_result;
- int chk_num_entries = 0;
- int num_entries = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t success = FALSE;
+ H5AC_aux_t *aux_ptr = NULL;
+ haddr_t * haddr_buf_ptr = NULL;
+ MPI_Offset *MPI_Offset_buf_ptr = NULL;
+ size_t buf_size = 0;
+ int mpi_result;
+ int chk_num_entries = 0;
+ int num_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->mpi_rank == 0 );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
- HDassert( aux_ptr->candidate_slist_ptr != NULL );
- HDassert( H5SL_count(aux_ptr->candidate_slist_ptr) ==
- (size_t)(aux_ptr->candidate_slist_len) );
- HDassert( num_entries_ptr != NULL );
- HDassert( *num_entries_ptr == 0 );
- HDassert( haddr_buf_ptr_ptr != NULL );
- HDassert( *haddr_buf_ptr_ptr == NULL );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->mpi_rank == 0);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ HDassert(aux_ptr->candidate_slist_ptr != NULL);
+ HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == (size_t)(aux_ptr->candidate_slist_len));
+ HDassert(num_entries_ptr != NULL);
+ HDassert(*num_entries_ptr == 0);
+ HDassert(haddr_buf_ptr_ptr != NULL);
+ HDassert(*haddr_buf_ptr_ptr == NULL);
/* First broadcast the number of entries in the list so that the
* receivers can set up buffers to receive them. If there aren't
* any, we are done.
*/
num_entries = aux_ptr->candidate_slist_len;
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 1", mpi_result)
- if(num_entries > 0) {
+ if (num_entries > 0) {
/* convert the candidate list into the format we
- * are used to receiving from process 0, and also load it
+ * are used to receiving from process 0, and also load it
* into a buffer for transmission.
*/
- if(H5AC_copy_candidate_list_to_buffer(cache_ptr, &chk_num_entries,
- &haddr_buf_ptr, &buf_size, &MPI_Offset_buf_ptr) < 0)
+ if (H5AC_copy_candidate_list_to_buffer(cache_ptr, &chk_num_entries, &haddr_buf_ptr, &buf_size,
+ &MPI_Offset_buf_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.")
- HDassert( chk_num_entries == num_entries );
- HDassert( haddr_buf_ptr != NULL );
- HDassert( MPI_Offset_buf_ptr != NULL );
- HDassert( aux_ptr->candidate_slist_len == 0 );
+ HDassert(chk_num_entries == num_entries);
+ HDassert(haddr_buf_ptr != NULL);
+ HDassert(MPI_Offset_buf_ptr != NULL);
+ HDassert(aux_ptr->candidate_slist_len == 0);
/* Now broadcast the list of candidate entries -- if there is one.
*
@@ -2506,24 +2258,26 @@ H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
* Thus the element type is MPI_BYTE, with size equal to the
* buf_size computed above.
*/
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0,
+ aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 2", mpi_result)
} /* end if */
success = TRUE;
done:
- if(MPI_Offset_buf_ptr != NULL)
+ if (MPI_Offset_buf_ptr != NULL)
MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)MPI_Offset_buf_ptr);
- if(success) {
- /* Pass the number of entries and the buffer pointer
+ if (success) {
+ /* Pass the number of entries and the buffer pointer
* back to the caller. Do this so that we can use the same code
* to apply the candidate list to all the processes.
*/
- *num_entries_ptr = num_entries;
+ *num_entries_ptr = num_entries;
*haddr_buf_ptr_ptr = haddr_buf_ptr;
- } else if(haddr_buf_ptr != NULL) {
+ }
+ else if (haddr_buf_ptr != NULL) {
haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr);
}
@@ -2531,20 +2285,19 @@ done:
} /* H5AC_broadcast_candidate_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_broadcast_clean_list()
*
* Purpose: Broadcast the contents of the process 0 cleaned entry
- * slist. In passing, also remove all entries from said
- * list, and also remove any matching entries from the dirtied
- * slist.
+ * slist. In passing, also remove all entries from said
+ * list, and also remove any matching entries from the dirtied
+ * slist.
*
- * This function must only be called by the process with
- * MPI_rank 0.
+ * This function must only be called by the process with
+ * MPI_rank 0.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2554,34 +2307,32 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
+H5AC_broadcast_clean_list(H5AC_t *cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- haddr_t addr;
- haddr_t * addr_buf_ptr = NULL;
- H5AC_aux_t * aux_ptr = NULL;
- H5SL_node_t * slist_node_ptr = NULL;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
- MPI_Offset * buf_ptr = NULL;
- size_t buf_size;
- int i = 0;
- int mpi_result;
- int num_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t addr;
+ haddr_t * addr_buf_ptr = NULL;
+ H5AC_aux_t * aux_ptr = NULL;
+ H5SL_node_t * slist_node_ptr = NULL;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
+ MPI_Offset * buf_ptr = NULL;
+ size_t buf_size;
+ int i = 0;
+ int mpi_result;
+ int num_entries = 0;
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->mpi_rank == 0 );
- HDassert( aux_ptr->c_slist_ptr != NULL );
- HDassert( H5SL_count(aux_ptr->c_slist_ptr) ==
- (size_t)(aux_ptr->c_slist_len) );
-
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->mpi_rank == 0);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
+ HDassert(H5SL_count(aux_ptr->c_slist_ptr) == (size_t)(aux_ptr->c_slist_len));
/* First broadcast the number of entries in the list so that the
* receives can set up a buffer to receive them. If there aren't
@@ -2591,102 +2342,93 @@ H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm);
- if ( mpi_result != MPI_SUCCESS ) {
+ if (mpi_result != MPI_SUCCESS) {
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 1", mpi_result)
-
}
- if ( num_entries > 0 )
- {
+ if (num_entries > 0) {
/* allocate a buffer to store the list of entry base addresses in */
buf_size = sizeof(MPI_Offset) * (size_t)num_entries;
buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size);
- if ( buf_ptr == NULL ) {
+ if (buf_ptr == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed for clean entry buffer")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for clean entry buffer")
}
/* if the sync_point_done callback is defined, allocate the
* addr buffer as well.
*/
- if ( aux_ptr->sync_point_done != NULL ) {
+ if (aux_ptr->sync_point_done != NULL) {
addr_buf_ptr = (haddr_t *)H5MM_malloc((size_t)num_entries * sizeof(haddr_t));
- if ( addr_buf_ptr == NULL ) {
+ if (addr_buf_ptr == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed for addr buffer")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for addr buffer")
}
}
-
/* now load the entry base addresses into the buffer, emptying the
* cleaned entry list in passing
*/
- while ( NULL != (slist_node_ptr = H5SL_first(aux_ptr->c_slist_ptr) ) )
- {
+ while (NULL != (slist_node_ptr = H5SL_first(aux_ptr->c_slist_ptr))) {
slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_item(slist_node_ptr);
HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
- HDassert( i < num_entries );
+ HDassert(i < num_entries);
addr = slist_entry_ptr->addr;
- if ( addr_buf_ptr != NULL ) {
+ if (addr_buf_ptr != NULL) {
addr_buf_ptr[i] = addr;
}
- if ( H5FD_mpi_haddr_to_MPIOff(addr, &(buf_ptr[i])) < 0 ) {
+ if (H5FD_mpi_haddr_to_MPIOff(addr, &(buf_ptr[i])) < 0) {
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, \
- "can't convert from haddr to MPI off")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off")
}
i++;
/* now remove the entry from the cleaned entry list */
- if ( H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr))
- != slist_entry_ptr ) {
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, \
- "Can't delete entry from cleaned entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from cleaned entry slist.")
}
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
/* and also remove the matching entry from the dirtied list
* if it exists.
*/
- if((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) != NULL) {
- HDassert( slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC );
- HDassert( slist_entry_ptr->addr == addr );
+ if ((slist_entry_ptr =
+ (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) != NULL) {
+ HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
+ HDassert(slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from dirty entry slist.")
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->d_slist_len -= 1;
- HDassert( aux_ptr->d_slist_len >= 0 );
+ HDassert(aux_ptr->d_slist_len >= 0);
} /* end if */
- } /* while */
-
+ } /* while */
/* Now broadcast the list of cleaned entries -- if there is one.
*
@@ -2696,41 +2438,39 @@ H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
* buf_size computed above.
*/
- mpi_result = MPI_Bcast((void *)buf_ptr, (int)buf_size, MPI_BYTE, 0,
- aux_ptr->mpi_comm);
+ mpi_result = MPI_Bcast((void *)buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm);
- if ( mpi_result != MPI_SUCCESS ) {
+ if (mpi_result != MPI_SUCCESS) {
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 2", mpi_result)
}
}
- if(aux_ptr->sync_point_done != NULL)
+ if (aux_ptr->sync_point_done != NULL)
(aux_ptr->sync_point_done)(num_entries, addr_buf_ptr);
done:
- if(buf_ptr != NULL)
+ if (buf_ptr != NULL)
buf_ptr = (MPI_Offset *)H5MM_xfree((void *)buf_ptr);
- if(addr_buf_ptr != NULL)
+ if (addr_buf_ptr != NULL)
addr_buf_ptr = (haddr_t *)H5MM_xfree((void *)addr_buf_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_broadcast_clean_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_check_if_write_permitted
*
* Purpose: Determine if a write is permitted under the current
- * circumstances, and set *write_permitted_ptr accordingly.
- * As a general rule it is, but when we are running in parallel
- * mode with collective I/O, we must ensure that a read cannot
- * cause a write.
+ * circumstances, and set *write_permitted_ptr accordingly.
+ * As a general rule it is, but when we are running in parallel
+ * mode with collective I/O, we must ensure that a read cannot
+ * cause a write.
*
- * In the event of failure, the value of *write_permitted_ptr
- * is undefined.
+ * In the event of failure, the value of *write_permitted_ptr
+ * is undefined.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2740,46 +2480,41 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_check_if_write_permitted(const H5F_t *f,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t * write_permitted_ptr)
-#else /* H5_HAVE_PARALLEL */
+H5AC_check_if_write_permitted(const H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t *write_permitted_ptr)
+#else /* H5_HAVE_PARALLEL */
static herr_t
-H5AC_check_if_write_permitted(const H5F_t H5_ATTR_UNUSED * f,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t * write_permitted_ptr)
+H5AC_check_if_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
+ hbool_t *write_permitted_ptr)
#endif /* H5_HAVE_PARALLEL */
{
- hbool_t write_permitted = TRUE;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t write_permitted = TRUE;
+ herr_t ret_value = SUCCEED; /* Return value */
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
+ H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
-
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5_HAVE_PARALLEL
- HDassert( f != NULL );
- HDassert( f->shared != NULL );
- HDassert( f->shared->cache != NULL );
+ HDassert(f != NULL);
+ HDassert(f->shared != NULL);
+ HDassert(f->shared->cache != NULL);
aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr);
- if ( aux_ptr != NULL ) {
+ if (aux_ptr != NULL) {
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
-
- if ( ( aux_ptr->mpi_rank == 0 ) ||
- ( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED ) ) {
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- write_permitted = aux_ptr->write_permitted;
+ if ((aux_ptr->mpi_rank == 0) ||
+ (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)) {
- } else {
+ write_permitted = aux_ptr->write_permitted;
+ }
+ else {
- write_permitted = FALSE;
- }
+ write_permitted = FALSE;
+ }
}
#endif /* H5_HAVE_PARALLEL */
@@ -2791,18 +2526,17 @@ done:
} /* H5AC_check_if_write_permitted() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_construct_candidate_list()
*
- * Purpose: In the parallel case when the metadata_write_strategy is
- * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, process 0 uses
- * this function to construct the list of cache entries to
- * be flushed. This list is then propagated to the other
- * caches, and then flushed in a distributed fashion.
+ * Purpose: In the parallel case when the metadata_write_strategy is
+ * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, process 0 uses
+ * this function to construct the list of cache entries to
+ * be flushed. This list is then propagated to the other
+ * caches, and then flushed in a distributed fashion.
*
- * The sync_point_op parameter is used to determine the extent
- * of the flush.
+ * The sync_point_op parameter is used to determine the extent
+ * of the flush.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2813,44 +2547,41 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_construct_candidate_list(H5AC_t * cache_ptr,
- H5AC_aux_t * aux_ptr,
- int sync_point_op)
+H5AC_construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, int sync_point_op)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
- HDassert( ( sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE ) ||
- ( aux_ptr->mpi_rank == 0 ) );
- HDassert( aux_ptr->d_slist_ptr != NULL );
- HDassert( aux_ptr->c_slist_ptr != NULL );
- HDassert( aux_ptr->c_slist_len == 0 );
- HDassert( aux_ptr->candidate_slist_ptr != NULL );
- HDassert( aux_ptr->candidate_slist_len == 0 );
- HDassert( ( sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN ) ||
- ( sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE ) );
-
- switch(sync_point_op) {
- case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
- if(H5C_construct_candidate_list__min_clean((H5C_t *)cache_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed.")
- break;
-
- case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
- if(H5C_construct_candidate_list__clean_cache((H5C_t *)cache_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__clean_cache() failed.")
- break;
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0));
+ HDassert(aux_ptr->d_slist_ptr != NULL);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
+ HDassert(aux_ptr->c_slist_len == 0);
+ HDassert(aux_ptr->candidate_slist_ptr != NULL);
+ HDassert(aux_ptr->candidate_slist_len == 0);
+ HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE));
+
+ switch (sync_point_op) {
+ case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
+ if (H5C_construct_candidate_list__min_clean((H5C_t *)cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed.")
+ break;
+
+ case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
+ if (H5C_construct_candidate_list__clean_cache((H5C_t *)cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ "H5C_construct_candidate_list__clean_cache() failed.")
+ break;
default:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation.")
- break;
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation.")
+ break;
} /* end switch */
done:
@@ -2858,33 +2589,32 @@ done:
} /* H5AC_construct_candidate_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_copy_candidate_list_to_buffer
*
* Purpose: Allocate buffer(s) and copy the contents of the candidate
- * entry slist into it (them). In passing, remove all
- * entries from the candidate slist. Note that the
- * candidate slist must not be empty.
+ * entry slist into it (them). In passing, remove all
+ * entries from the candidate slist. Note that the
+ * candidate slist must not be empty.
*
- * If MPI_Offset_buf_ptr_ptr is not NULL, allocate a buffer
- * of MPI_Offset, copy the contents of the candidate
- * entry list into it with the appropriate conversions,
- * and return the base address of the buffer in
- * *MPI_Offset_buf_ptr. Note that this is the buffer
- * used by process 0 to transmit the list of entries to
- * be flushed to all other processes (in this file group).
+ * If MPI_Offset_buf_ptr_ptr is not NULL, allocate a buffer
+ * of MPI_Offset, copy the contents of the candidate
+ * entry list into it with the appropriate conversions,
+ * and return the base address of the buffer in
+ * *MPI_Offset_buf_ptr. Note that this is the buffer
+ * used by process 0 to transmit the list of entries to
+ * be flushed to all other processes (in this file group).
*
- * Similarly, allocate a buffer of haddr_t, load the contents
- * of the candidate list into this buffer, and return its
- * base address in *haddr_buf_ptr_ptr. Note that this
- * latter buffer is constructed unconditionally.
+ * Similarly, allocate a buffer of haddr_t, load the contents
+ * of the candidate list into this buffer, and return its
+ * base address in *haddr_buf_ptr_ptr. Note that this
+ * latter buffer is constructed unconditionally.
*
- * In passing, also remove all entries from the candidate
- * entry slist.
+ * In passing, also remove all entries from the candidate
+ * entry slist.
*
- * Return: Return SUCCEED on success, and FAIL on failure.
+ * Return: Return SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer, 4/19/10
*
@@ -2892,113 +2622,108 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_copy_candidate_list_to_buffer(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr,
- size_t * MPI_Offset_buf_size_ptr,
- MPI_Offset ** MPI_Offset_buf_ptr_ptr)
+H5AC_copy_candidate_list_to_buffer(H5AC_t *cache_ptr, int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr,
+ size_t *MPI_Offset_buf_size_ptr, MPI_Offset **MPI_Offset_buf_ptr_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- hbool_t success = FALSE;
- haddr_t addr;
- H5AC_aux_t * aux_ptr = NULL;
- H5SL_node_t * slist_node_ptr = NULL;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
- MPI_Offset * MPI_Offset_buf_ptr = NULL;
- haddr_t * haddr_buf_ptr = NULL;
- size_t buf_size;
- int i = 0;
- int num_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t success = FALSE;
+ haddr_t addr;
+ H5AC_aux_t * aux_ptr = NULL;
+ H5SL_node_t * slist_node_ptr = NULL;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
+ MPI_Offset * MPI_Offset_buf_ptr = NULL;
+ haddr_t * haddr_buf_ptr = NULL;
+ size_t buf_size;
+ int i = 0;
+ int num_entries = 0;
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
- HDassert( aux_ptr->candidate_slist_ptr != NULL );
- HDassert( H5SL_count(aux_ptr->candidate_slist_ptr) ==
- (size_t)(aux_ptr->candidate_slist_len) );
- HDassert( aux_ptr->candidate_slist_len > 0 );
- HDassert( num_entries_ptr != NULL );
- HDassert( *num_entries_ptr == 0 );
- HDassert( haddr_buf_ptr_ptr != NULL );
- HDassert( *haddr_buf_ptr_ptr == NULL );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ HDassert(aux_ptr->candidate_slist_ptr != NULL);
+ HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == (size_t)(aux_ptr->candidate_slist_len));
+ HDassert(aux_ptr->candidate_slist_len > 0);
+ HDassert(num_entries_ptr != NULL);
+ HDassert(*num_entries_ptr == 0);
+ HDassert(haddr_buf_ptr_ptr != NULL);
+ HDassert(*haddr_buf_ptr_ptr == NULL);
num_entries = aux_ptr->candidate_slist_len;
- /* allocate a buffer(s) to store the list of candidate entry
- * base addresses in
+ /* allocate a buffer(s) to store the list of candidate entry
+ * base addresses in
*/
- if(MPI_Offset_buf_ptr_ptr != NULL) {
- HDassert( MPI_Offset_buf_size_ptr != NULL );
+ if (MPI_Offset_buf_ptr_ptr != NULL) {
+ HDassert(MPI_Offset_buf_size_ptr != NULL);
/* allocate a buffer of MPI_Offset */
buf_size = sizeof(MPI_Offset) * (size_t)num_entries;
- if(NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
+ if (NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for MPI_Offset buffer")
} /* end if */
/* allocate a buffer of haddr_t */
- if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
+ if (NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for haddr buffer")
/* now load the entry base addresses into the buffer, emptying the
* candidate entry list in passing
*/
- while(NULL != (slist_node_ptr = H5SL_first(aux_ptr->candidate_slist_ptr))) {
+ while (NULL != (slist_node_ptr = H5SL_first(aux_ptr->candidate_slist_ptr))) {
slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_item(slist_node_ptr);
HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
- HDassert( i < num_entries );
+ HDassert(i < num_entries);
- addr = slist_entry_ptr->addr;
+ addr = slist_entry_ptr->addr;
haddr_buf_ptr[i] = addr;
- if(MPI_Offset_buf_ptr != NULL) {
- if(H5FD_mpi_haddr_to_MPIOff(addr, &(MPI_Offset_buf_ptr[i])) < 0)
+ if (MPI_Offset_buf_ptr != NULL) {
+ if (H5FD_mpi_haddr_to_MPIOff(addr, &(MPI_Offset_buf_ptr[i])) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off")
} /* end if */
i++;
/* now remove the entry from the cleaned entry list */
- if(H5SL_remove(aux_ptr->candidate_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->candidate_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from candidate entry slist.")
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->candidate_slist_len -= 1;
- HDassert( aux_ptr->candidate_slist_len >= 0 );
+ HDassert(aux_ptr->candidate_slist_len >= 0);
} /* while */
- HDassert( aux_ptr->candidate_slist_len == 0 );
+ HDassert(aux_ptr->candidate_slist_len == 0);
success = TRUE;
done:
- if(success) {
- /* Pass the number of entries and the buffer pointer
+ if (success) {
+ /* Pass the number of entries and the buffer pointer
* back to the caller.
*/
- *num_entries_ptr = num_entries;
+ *num_entries_ptr = num_entries;
*haddr_buf_ptr_ptr = haddr_buf_ptr;
- if(MPI_Offset_buf_ptr_ptr != NULL) {
- HDassert( MPI_Offset_buf_ptr != NULL);
- *MPI_Offset_buf_size_ptr = buf_size;
- *MPI_Offset_buf_ptr_ptr = MPI_Offset_buf_ptr;
+ if (MPI_Offset_buf_ptr_ptr != NULL) {
+ HDassert(MPI_Offset_buf_ptr != NULL);
+ *MPI_Offset_buf_size_ptr = buf_size;
+ *MPI_Offset_buf_ptr_ptr = MPI_Offset_buf_ptr;
} /* end if */
- } /* end if */
+ } /* end if */
else {
- if(MPI_Offset_buf_ptr != NULL)
+ if (MPI_Offset_buf_ptr != NULL)
MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)MPI_Offset_buf_ptr);
- if(haddr_buf_ptr != NULL)
+ if (haddr_buf_ptr != NULL)
haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr);
} /* end else */
@@ -3006,17 +2731,16 @@ done:
} /* H5AC_copy_candidate_list_to_buffer() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_ext_config_2_int_config()
*
* Purpose: Utility function to translate an instance of
- * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
+ * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
*
- * Places translation in *int_conf_ptr and returns SUCCEED
- * if successful. Returns FAIL on failure.
+ * Places translation in *int_conf_ptr and returns SUCCEED
+ * if successful. Returns FAIL on failure.
*
- * Does only minimal sanity checking.
+ * Does only minimal sanity checking.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3026,46 +2750,43 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
- H5C_auto_size_ctl_t * int_conf_ptr)
+H5AC_ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr, H5C_auto_size_ctl_t *int_conf_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( ext_conf_ptr == NULL ) ||
- ( ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION ) ||
- ( int_conf_ptr == NULL ) ) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Bad ext_conf_ptr or inf_conf_ptr on entry.")
+ if ((ext_conf_ptr == NULL) || (ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) ||
+ (int_conf_ptr == NULL)) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad ext_conf_ptr or inf_conf_ptr on entry.")
}
- int_conf_ptr->version = H5C__CURR_AUTO_SIZE_CTL_VER;
+ int_conf_ptr->version = H5C__CURR_AUTO_SIZE_CTL_VER;
- if ( ext_conf_ptr->rpt_fcn_enabled ) {
+ if (ext_conf_ptr->rpt_fcn_enabled) {
- int_conf_ptr->rpt_fcn = H5C_def_auto_resize_rpt_fcn;
-
- } else {
+ int_conf_ptr->rpt_fcn = H5C_def_auto_resize_rpt_fcn;
+ }
+ else {
- int_conf_ptr->rpt_fcn = NULL;
+ int_conf_ptr->rpt_fcn = NULL;
}
- int_conf_ptr->set_initial_size = ext_conf_ptr->set_initial_size;
- int_conf_ptr->initial_size = ext_conf_ptr->initial_size;
- int_conf_ptr->min_clean_fraction = ext_conf_ptr->min_clean_fraction;
- int_conf_ptr->max_size = ext_conf_ptr->max_size;
- int_conf_ptr->min_size = ext_conf_ptr->min_size;
- int_conf_ptr->epoch_length = (int64_t)(ext_conf_ptr->epoch_length);
-
- int_conf_ptr->incr_mode = ext_conf_ptr->incr_mode;
- int_conf_ptr->lower_hr_threshold = ext_conf_ptr->lower_hr_threshold;
- int_conf_ptr->increment = ext_conf_ptr->increment;
- int_conf_ptr->apply_max_increment = ext_conf_ptr->apply_max_increment;
- int_conf_ptr->max_increment = ext_conf_ptr->max_increment;
- int_conf_ptr->flash_incr_mode = ext_conf_ptr->flash_incr_mode;
- int_conf_ptr->flash_multiple = ext_conf_ptr->flash_multiple;
- int_conf_ptr->flash_threshold = ext_conf_ptr->flash_threshold;
+ int_conf_ptr->set_initial_size = ext_conf_ptr->set_initial_size;
+ int_conf_ptr->initial_size = ext_conf_ptr->initial_size;
+ int_conf_ptr->min_clean_fraction = ext_conf_ptr->min_clean_fraction;
+ int_conf_ptr->max_size = ext_conf_ptr->max_size;
+ int_conf_ptr->min_size = ext_conf_ptr->min_size;
+ int_conf_ptr->epoch_length = (int64_t)(ext_conf_ptr->epoch_length);
+
+ int_conf_ptr->incr_mode = ext_conf_ptr->incr_mode;
+ int_conf_ptr->lower_hr_threshold = ext_conf_ptr->lower_hr_threshold;
+ int_conf_ptr->increment = ext_conf_ptr->increment;
+ int_conf_ptr->apply_max_increment = ext_conf_ptr->apply_max_increment;
+ int_conf_ptr->max_increment = ext_conf_ptr->max_increment;
+ int_conf_ptr->flash_incr_mode = ext_conf_ptr->flash_incr_mode;
+ int_conf_ptr->flash_multiple = ext_conf_ptr->flash_multiple;
+ int_conf_ptr->flash_threshold = ext_conf_ptr->flash_threshold;
int_conf_ptr->decr_mode = ext_conf_ptr->decr_mode;
int_conf_ptr->upper_hr_threshold = ext_conf_ptr->upper_hr_threshold;
@@ -3080,18 +2801,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_ext_config_2_int_config() */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_log_deleted_entry()
*
* Purpose: Log an entry for which H5C__DELETED_FLAG has been set.
*
- * If mpi_rank is 0, we must make sure that the entry doesn't
- * appear in the cleaned or dirty entry lists. Otherwise,
- * we have nothing to do.
+ * If mpi_rank is 0, we must make sure that the entry doesn't
+ * appear in the cleaned or dirty entry lists. Otherwise,
+ * we have nothing to do.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -3101,89 +2821,87 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_deleted_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr,
- haddr_t addr,
- unsigned int flags)
+H5AC_log_deleted_entry(H5AC_t *cache_ptr, H5AC_info_t *entry_ptr, haddr_t addr, unsigned int flags)
{
- H5AC_aux_t * aux_ptr;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t * aux_ptr;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert( entry_ptr != NULL );
- HDassert( entry_ptr->addr == addr );
+ HDassert(entry_ptr != NULL);
+ HDassert(entry_ptr->addr == addr);
- HDassert( (flags & H5C__DELETED_FLAG) != 0 );
+ HDassert((flags & H5C__DELETED_FLAG) != 0);
- if(aux_ptr->mpi_rank == 0) {
- HDassert( aux_ptr->d_slist_ptr != NULL );
- HDassert( aux_ptr->c_slist_ptr != NULL );
+ if (aux_ptr->mpi_rank == 0) {
+ HDassert(aux_ptr->d_slist_ptr != NULL);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the dirtied entry slist, remove it. */
- if((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) != NULL) {
+ if ((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) !=
+ NULL) {
HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
HDassert(slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from dirty entry slist.")
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->d_slist_len -= 1;
- HDassert( aux_ptr->d_slist_len >= 0 );
+ HDassert(aux_ptr->d_slist_len >= 0);
} /* end if */
/* if the entry appears in the cleaned entry slist, remove it. */
- if((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) != NULL) {
+ if ((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) !=
+ NULL) {
HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
HDassert(slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from cleaned entry slist.")
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
} /* end if */
- } /* if */
+ } /* if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_log_deleted_entry() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_log_dirtied_entry()
*
* Purpose: Update the dirty_bytes count for a newly dirtied entry.
*
- * If mpi_rank isnt 0, this simply means adding the size
- * of the entries to the dirty_bytes count.
+ * If mpi_rank isnt 0, this simply means adding the size
+ * of the entries to the dirty_bytes count.
*
- * If mpi_rank is 0, we must first check to see if the entry
- * appears in the dirty entries slist. If it is, do nothing.
- * If it isn't, add the size to th dirty_bytes count, add the
- * entry to the dirty entries slist, and remove it from the
- * cleaned list (if it is present there).
+ * If mpi_rank is 0, we must first check to see if the entry
+ * appears in the dirty entries slist. If it is, do nothing.
+ * If it isn't, add the size to th dirty_bytes count, add the
+ * entry to the dirty entries slist, and remove it from the
+ * cleaned list (if it is present there).
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -3193,84 +2911,82 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
- haddr_t addr)
+H5AC_log_dirtied_entry(const H5AC_info_t *entry_ptr, haddr_t addr)
{
- H5AC_t * cache_ptr;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_t * cache_ptr;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( entry_ptr );
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->is_dirty == FALSE );
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->addr == addr);
+ HDassert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- if ( aux_ptr->mpi_rank == 0 ) {
- H5AC_slist_entry_t * slist_entry_ptr;
+ if (aux_ptr->mpi_rank == 0) {
+ H5AC_slist_entry_t *slist_entry_ptr;
- HDassert( aux_ptr->d_slist_ptr != NULL );
- HDassert( aux_ptr->c_slist_ptr != NULL );
+ HDassert(aux_ptr->d_slist_ptr != NULL);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
- if ( H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr)) == NULL ) {
+ if (H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr)) == NULL) {
/* insert the address of the entry in the dirty entry list, and
* add its size to the dirty_bytes count.
*/
- if ( NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)) ) {
+ if (NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t))) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "Can't allocate dirty slist entry .")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "Can't allocate dirty slist entry .")
}
slist_entry_ptr->magic = H5AC__H5AC_SLIST_ENTRY_T_MAGIC;
slist_entry_ptr->addr = addr;
- if ( H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr,
- &(slist_entry_ptr->addr)) < 0 ) {
+ if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, \
- "can't insert entry into dirty entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.")
}
aux_ptr->d_slist_len += 1;
aux_ptr->dirty_bytes += entry_ptr->size;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->unprotect_dirty_bytes += entry_ptr->size;
- aux_ptr->unprotect_dirty_bytes_updates += 1;
+ aux_ptr->unprotect_dirty_bytes += entry_ptr->size;
+ aux_ptr->unprotect_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
}
- if(H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr)) != NULL) {
+ if (H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr)) != NULL) {
/* the entry is dirty. If it exists on the cleaned entries list,
* remove it.
*/
- if((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) != NULL) {
+ if ((slist_entry_ptr =
+ (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) != NULL) {
HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
HDassert(slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from clean entry slist.")
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
} /* end if */
- } /* end if */
- } else {
+ } /* end if */
+ }
+ else {
aux_ptr->dirty_bytes += entry_ptr->size;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
@@ -3286,21 +3002,20 @@ done:
} /* H5AC_log_dirtied_entry() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_log_flushed_entry()
*
* Purpose: Update the clean entry slist for the flush of an entry --
- * specifically, if the entry has been cleared, remove it
- * from both the cleaned and dirtied lists if it is present.
- * Otherwise, if the entry was dirty, insert the indicated
- * entry address in the clean slist if it isn't there already.
+ * specifically, if the entry has been cleared, remove it
+ * from both the cleaned and dirtied lists if it is present.
+ * Otherwise, if the entry was dirty, insert the indicated
+ * entry address in the clean slist if it isn't there already.
*
- * This function is only used in PHDF5, and should only
- * be called for the process with mpi rank 0.
+ * This function is only used in PHDF5, and should only
+ * be called for the process with mpi rank 0.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -3310,100 +3025,89 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_flushed_entry(H5C_t * cache_ptr,
- haddr_t addr,
- hbool_t was_dirty,
- unsigned flags,
+H5AC_log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags,
int H5_ATTR_UNUSED type_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
- hbool_t cleared;
- H5AC_aux_t * aux_ptr;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
-
+ herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t cleared;
+ H5AC_aux_t * aux_ptr;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->mpi_rank == 0 );
- HDassert( aux_ptr->c_slist_ptr != NULL );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->mpi_rank == 0);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
- cleared = ( (flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0 );
+ cleared = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
- if ( cleared ) {
+ if (cleared) {
/* If the entry has been cleared, must remove it from both the
* cleaned list and the dirtied list.
*/
- if ( (slist_entry_ptr = (H5AC_slist_entry_t *)
- H5SL_search(aux_ptr->c_slist_ptr,
- (void *)(&addr))) != NULL ) {
+ if ((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) !=
+ NULL) {
- HDassert( slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
- HDassert( slist_entry_ptr->addr == addr );
+ HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
+ HDassert(slist_entry_ptr->addr == addr);
- if ( H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr))
- != slist_entry_ptr ) {
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != slist_entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, \
- "Can't delete entry from clean entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from clean entry slist.")
}
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
}
- if ( (slist_entry_ptr = (H5AC_slist_entry_t *)
- H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) != NULL ) {
+ if ((slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) !=
+ NULL) {
- HDassert( slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
- HDassert( slist_entry_ptr->addr == addr );
+ HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
+ HDassert(slist_entry_ptr->addr == addr);
- if ( H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr))
- != slist_entry_ptr ) {
+ if (H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != slist_entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, \
- "Can't delete entry from dirty entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from dirty entry slist.")
}
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->d_slist_len -= 1;
- HDassert( aux_ptr->d_slist_len >= 0 );
+ HDassert(aux_ptr->d_slist_len >= 0);
}
- } else if ( was_dirty ) {
+ }
+ else if (was_dirty) {
- if ( H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr)) == NULL ) {
+ if (H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr)) == NULL) {
/* insert the address of the entry in the clean entry list. */
- if ( NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)) ) {
+ if (NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t))) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "Can't allocate clean slist entry .")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "Can't allocate clean slist entry .")
}
slist_entry_ptr->magic = H5AC__H5AC_SLIST_ENTRY_T_MAGIC;
slist_entry_ptr->addr = addr;
- if ( H5SL_insert(aux_ptr->c_slist_ptr, slist_entry_ptr,
- &(slist_entry_ptr->addr)) < 0 ) {
+ if (H5SL_insert(aux_ptr->c_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, \
- "can't insert entry into clean entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into clean entry slist.")
}
aux_ptr->c_slist_len += 1;
@@ -3417,20 +3121,19 @@ done:
} /* H5AC_log_flushed_entry() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_log_inserted_entry()
*
* Purpose: Update the dirty_bytes count for a newly inserted entry.
*
- * If mpi_rank isnt 0, this simply means adding the size
- * of the entry to the dirty_bytes count.
+ * If mpi_rank isnt 0, this simply means adding the size
+ * of the entry to the dirty_bytes count.
*
- * If mpi_rank is 0, we must also add the entry to the
- * dirty entries slist.
+ * If mpi_rank is 0, we must also add the entry to the
+ * dirty entries slist.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -3440,11 +3143,10 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_inserted_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr)
+H5AC_log_inserted_entry(H5AC_t *cache_ptr, H5AC_info_t *entry_ptr)
{
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3456,32 +3158,32 @@ H5AC_log_inserted_entry(H5AC_t * cache_ptr,
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert( entry_ptr != NULL );
+ HDassert(entry_ptr != NULL);
- if(aux_ptr->mpi_rank == 0) {
- H5AC_slist_entry_t * slist_entry_ptr;
+ if (aux_ptr->mpi_rank == 0) {
+ H5AC_slist_entry_t *slist_entry_ptr;
HDassert(aux_ptr->d_slist_ptr != NULL);
HDassert(aux_ptr->c_slist_ptr != NULL);
- if(NULL != H5SL_search(aux_ptr->d_slist_ptr, (void *)(&entry_ptr->addr)))
+ if (NULL != H5SL_search(aux_ptr->d_slist_ptr, (void *)(&entry_ptr->addr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry already in dirty slist.")
/* insert the address of the entry in the dirty entry list, and
* add its size to the dirty_bytes count.
*/
- if(NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)))
+ if (NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "Can't allocate dirty slist entry .")
slist_entry_ptr->magic = H5AC__H5AC_SLIST_ENTRY_T_MAGIC;
slist_entry_ptr->addr = entry_ptr->addr;
- if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0 )
+ if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.")
aux_ptr->d_slist_len += 1;
- if(NULL != H5SL_search(aux_ptr->c_slist_ptr, (void *)(&entry_ptr->addr)))
+ if (NULL != H5SL_search(aux_ptr->c_slist_ptr, (void *)(&entry_ptr->addr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry in clean slist.")
} /* end if */
@@ -3497,46 +3199,45 @@ done:
} /* H5AC_log_inserted_entry() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_log_moved_entry()
*
* Purpose: Update the dirty_bytes count for a moved entry.
*
- * WARNING
+ * WARNING
*
- * At present, the way that the move call is used ensures
- * that the moved entry is present in all caches by
- * moving in a collective operation and immediately after
- * unprotecting the target entry.
+ * At present, the way that the move call is used ensures
+ * that the moved entry is present in all caches by
+ * moving in a collective operation and immediately after
+ * unprotecting the target entry.
*
- * This function uses this invarient, and will cause arcane
- * failures if it is not met. If maintaining this invarient
- * becomes impossible, we will have to rework this function
- * extensively, and likely include a bit of IPC for
- * synchronization. A better option might be to subsume
- * move in the unprotect operation.
+ * This function uses this invarient, and will cause arcane
+ * failures if it is not met. If maintaining this invarient
+ * becomes impossible, we will have to rework this function
+ * extensively, and likely include a bit of IPC for
+ * synchronization. A better option might be to subsume
+ * move in the unprotect operation.
*
- * Given that the target entry is in all caches, the function
- * proceeds as follows:
+ * Given that the target entry is in all caches, the function
+ * proceeds as follows:
*
- * For processes with mpi rank other 0, it simply checks to
- * see if the entry was dirty prior to the move, and adds
- * the entries size to the dirty bytes count.
+ * For processes with mpi rank other 0, it simply checks to
+ * see if the entry was dirty prior to the move, and adds
+ * the entries size to the dirty bytes count.
*
- * In the process with mpi rank 0, the function first checks
- * to see if the entry was dirty prior to the move. If it
- * was, and if the entry doesn't appear in the dirtied list
- * under its old address, it adds the entry's size to the
- * dirty bytes count.
+ * In the process with mpi rank 0, the function first checks
+ * to see if the entry was dirty prior to the move. If it
+ * was, and if the entry doesn't appear in the dirtied list
+ * under its old address, it adds the entry's size to the
+ * dirty bytes count.
*
- * The rank 0 process then removes any references to the
- * entry under its old address from the cleands and dirtied
- * lists, and inserts an entry in the dirtied list under the
- * new address.
+ * The rank 0 process then removes any references to the
+ * entry under its old address from the cleands and dirtied
+ * lists, and inserts an entry in the dirtied list under the
+ * new address.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -3546,114 +3247,104 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_moved_entry(const H5F_t *f,
- haddr_t old_addr,
- haddr_t new_addr)
+H5AC_log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
{
- H5AC_t * cache_ptr;
- hbool_t entry_in_cache;
- hbool_t entry_dirty;
- size_t entry_size;
- H5AC_aux_t * aux_ptr = NULL;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_t * cache_ptr;
+ hbool_t entry_in_cache;
+ hbool_t entry_dirty;
+ size_t entry_size;
+ H5AC_aux_t * aux_ptr = NULL;
+ H5AC_slist_entry_t *slist_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = (H5AC_t *)f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* get entry status, size, etc here */
- if ( H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache,
- &entry_dirty, NULL, NULL) < 0 ) {
+ if (H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache, &entry_dirty, NULL, NULL) < 0) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.")
+ }
+ else if (!entry_in_cache) {
- } else if ( ! entry_in_cache ) {
-
- HDassert( entry_in_cache );
+ HDassert(entry_in_cache);
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache.")
}
- if ( aux_ptr->mpi_rank == 0 ) {
+ if (aux_ptr->mpi_rank == 0) {
- HDassert( aux_ptr->d_slist_ptr != NULL );
- HDassert( aux_ptr->c_slist_ptr != NULL );
+ HDassert(aux_ptr->d_slist_ptr != NULL);
+ HDassert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the cleaned entry slist, under its old
* address, remove it.
*/
- if ( (slist_entry_ptr = (H5AC_slist_entry_t *)
- H5SL_search(aux_ptr->c_slist_ptr, (void *)(&old_addr))) != NULL ) {
+ if ((slist_entry_ptr =
+ (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)(&old_addr))) != NULL) {
- HDassert( slist_entry_ptr->magic ==
- H5AC__H5AC_SLIST_ENTRY_T_MAGIC );
- HDassert( slist_entry_ptr->addr == old_addr );
+ HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
+ HDassert(slist_entry_ptr->addr == old_addr);
- if ( H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&old_addr))
- != slist_entry_ptr ) {
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&old_addr)) != slist_entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, \
- "Can't delete entry from cleaned entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from cleaned entry slist.")
}
slist_entry_ptr->magic = 0;
- slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
+ slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
}
/* if the entry appears in the dirtied entry slist under its old
* address, remove it, but don't free it. Set addr to new_addr.
*/
- if ( (slist_entry_ptr = (H5AC_slist_entry_t *)
- H5SL_search(aux_ptr->d_slist_ptr, (void *)(&old_addr))) != NULL ) {
+ if ((slist_entry_ptr =
+ (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)(&old_addr))) != NULL) {
- HDassert( slist_entry_ptr->magic ==
- H5AC__H5AC_SLIST_ENTRY_T_MAGIC );
- HDassert( slist_entry_ptr->addr == old_addr );
+ HDassert(slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
+ HDassert(slist_entry_ptr->addr == old_addr);
- if ( H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&old_addr))
- != slist_entry_ptr ) {
+ if (H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&old_addr)) != slist_entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, \
- "Can't delete entry from dirty entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from dirty entry slist.")
}
slist_entry_ptr->addr = new_addr;
aux_ptr->d_slist_len -= 1;
- HDassert( aux_ptr->d_slist_len >= 0 );
-
- } else {
-
- /* otherwise, allocate a new entry that is ready
- * for insertion, and increment dirty_bytes.
- *
- * Note that the fact that the entry wasn't in the dirtied
- * list under its old address implies that it must have
- * been clean to start with.
- */
+ HDassert(aux_ptr->d_slist_len >= 0);
+ }
+ else {
+
+ /* otherwise, allocate a new entry that is ready
+ * for insertion, and increment dirty_bytes.
+ *
+ * Note that the fact that the entry wasn't in the dirtied
+ * list under its old address implies that it must have
+ * been clean to start with.
+ */
- HDassert( !entry_dirty );
+ HDassert(!entry_dirty);
- if ( NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t)) ) {
+ if (NULL == (slist_entry_ptr = H5FL_CALLOC(H5AC_slist_entry_t))) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "Can't allocate dirty slist entry .")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "Can't allocate dirty slist entry .")
}
slist_entry_ptr->magic = H5AC__H5AC_SLIST_ENTRY_T_MAGIC;
@@ -3668,23 +3359,20 @@ H5AC_log_moved_entry(const H5F_t *f,
}
/* verify that there is no entry at new_addr in the dirty slist */
- if ( H5SL_search(aux_ptr->d_slist_ptr, (void *)(&new_addr)) != NULL ) {
+ if (H5SL_search(aux_ptr->d_slist_ptr, (void *)(&new_addr)) != NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "dirty slist already contains entry at new_addr.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "dirty slist already contains entry at new_addr.")
}
/* insert / reinsert the entry in the dirty slist */
- if ( H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr,
- &(slist_entry_ptr->addr)) < 0 ) {
+ if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, \
- "can't insert entry into dirty entry slist.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.")
}
aux_ptr->d_slist_len += 1;
-
- } else if ( ! entry_dirty ) {
+ }
+ else if (!entry_dirty) {
aux_ptr->dirty_bytes += entry_size;
@@ -3699,92 +3387,91 @@ done:
} /* H5AC_log_moved_entry() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_propagate_and_apply_candidate_list
*
- * Purpose: Prior to the addition of support for multiple metadata
- * write strategies, in PHDF5, only the metadata cache with
- * mpi rank 0 was allowed to write to file. All other
- * metadata caches on processes with rank greater than 0
- * were required to retain dirty entries until they were
- * notified that the entry was clean.
- *
- * This constraint is relaxed with the distributed
- * metadata write strategy, in which a list of candidate
- * metadata cache entries is constructed by the process 0
- * cache and then distributed to the caches of all the other
- * processes. Once the listed is distributed, many (if not
- * all) processes writing writing a unique subset of the
- * entries, and marking the remainder clean. The subsets
- * are chosen so that each entry in the list of candidates
- * is written by exactly one cache, and all entries are
- * marked as being clean in all caches.
- *
- * While the list of candidate cache entries is prepared
- * elsewhere, this function is the main routine for distributing
- * and applying the list. It must be run simultaniously on
- * all processes that have the relevant file open. To ensure
- * proper synchronization, there is a barrier at the beginning
- * of this function.
- *
- * At present, this function is called under one of two
- * circumstances:
- *
- * 1) Dirty byte creation exceeds some user specified value.
- *
- * While metadata reads may occur independently, all
- * operations writing metadata must be collective. Thus
- * all metadata caches see the same sequence of operations,
+ * Purpose: Prior to the addition of support for multiple metadata
+ * write strategies, in PHDF5, only the metadata cache with
+ * mpi rank 0 was allowed to write to file. All other
+ * metadata caches on processes with rank greater than 0
+ * were required to retain dirty entries until they were
+ * notified that the entry was clean.
+ *
+ * This constraint is relaxed with the distributed
+ * metadata write strategy, in which a list of candidate
+ * metadata cache entries is constructed by the process 0
+ * cache and then distributed to the caches of all the other
+ * processes. Once the listed is distributed, many (if not
+ * all) processes writing writing a unique subset of the
+ * entries, and marking the remainder clean. The subsets
+ * are chosen so that each entry in the list of candidates
+ * is written by exactly one cache, and all entries are
+ * marked as being clean in all caches.
+ *
+ * While the list of candidate cache entries is prepared
+ * elsewhere, this function is the main routine for distributing
+ * and applying the list. It must be run simultaniously on
+ * all processes that have the relevant file open. To ensure
+ * proper synchronization, there is a barrier at the beginning
+ * of this function.
+ *
+ * At present, this function is called under one of two
+ * circumstances:
+ *
+ * 1) Dirty byte creation exceeds some user specified value.
+ *
+ * While metadata reads may occur independently, all
+ * operations writing metadata must be collective. Thus
+ * all metadata caches see the same sequence of operations,
* and therefore the same dirty data creation.
*
- * This fact is used to synchronize the caches for purposes
- * of propagating the list of candidate entries, by simply
- * calling this function from all caches whenever some user
- * specified threshold on dirty data is exceeded. (the
- * process 0 cache creates the candidate list just before
- * calling this function).
+ * This fact is used to synchronize the caches for purposes
+ * of propagating the list of candidate entries, by simply
+ * calling this function from all caches whenever some user
+ * specified threshold on dirty data is exceeded. (the
+ * process 0 cache creates the candidate list just before
+ * calling this function).
*
- * 2) Under direct user control -- this operation must be
- * collective.
+ * 2) Under direct user control -- this operation must be
+ * collective.
*
* The operations to be managed by this function are as
- * follows:
+ * follows:
*
- * All processes:
+ * All processes:
*
- * 1) Participate in an opening barrier.
+ * 1) Participate in an opening barrier.
*
- * For the process with mpi rank 0:
+ * For the process with mpi rank 0:
*
- * 1) Load the contents of the candidate list
- * (candidate_slist_ptr) into a buffer, and broadcast that
- * buffer to all the other caches. Clear the candidate
- * list in passing.
+ * 1) Load the contents of the candidate list
+ * (candidate_slist_ptr) into a buffer, and broadcast that
+ * buffer to all the other caches. Clear the candidate
+ * list in passing.
*
- * If there is a positive number of candidates, proceed with
- * the following:
+ * If there is a positive number of candidates, proceed with
+ * the following:
*
- * 2) Apply the candidate entry list.
+ * 2) Apply the candidate entry list.
*
- * 3) Particpate in a closing barrier.
+ * 3) Particpate in a closing barrier.
*
- * 4) Remove from the dirty list (d_slist_ptr) and from the
- * flushed and still clean entries list (c_slist_ptr),
+ * 4) Remove from the dirty list (d_slist_ptr) and from the
+ * flushed and still clean entries list (c_slist_ptr),
* all addresses that appeared in the candidate list, as
- * these entries are now clean.
+ * these entries are now clean.
*
*
- * For all processes with mpi rank greater than 0:
+ * For all processes with mpi rank greater than 0:
*
- * 1) Receive the candidate entry list broadcast
+ * 1) Receive the candidate entry list broadcast
*
- * If there is a positive number of candidates, proceed with
- * the following:
+ * If there is a positive number of candidates, proceed with
+ * the following:
*
- * 2) Apply the candidate entry list.
+ * 2) Apply the candidate entry list.
*
- * 3) Particpate in a closing barrier.
+ * 3) Particpate in a closing barrier.
*
* Return: Success: non-negative
*
@@ -3797,161 +3484,151 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_propagate_and_apply_candidate_list(H5F_t * f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- int mpi_code;
- int num_candidates = 0;
- haddr_t * candidates_list_ptr = NULL;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ int mpi_code;
+ int num_candidates = 0;
+ haddr_t * candidates_list_ptr = NULL;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* to prevent "messages from the future" we must synchronize all
* processes before we write any entries.
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed 1", mpi_code)
- if(aux_ptr->mpi_rank == 0) {
- if(H5AC_broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
+ if (aux_ptr->mpi_rank == 0) {
+ if (H5AC_broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist.")
- HDassert( aux_ptr->candidate_slist_len == 0 );
+ HDassert(aux_ptr->candidate_slist_len == 0);
} /* end if */
else {
- if(H5AC_receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
+ if (H5AC_receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive candidate broadcast.")
} /* end else */
- if(num_candidates > 0) {
- herr_t result;
+ if (num_candidates > 0) {
+ herr_t result;
- /* all processes apply the candidate list.
- * H5C_apply_candidate_list() handles the details of
+ /* all processes apply the candidate list.
+ * H5C_apply_candidate_list() handles the details of
* distributing the writes across the processes.
*/
aux_ptr->write_permitted = TRUE;
- result = H5C_apply_candidate_list(f,
- dxpl_id,
- dxpl_id,
- cache_ptr,
- num_candidates,
- candidates_list_ptr,
- aux_ptr->mpi_rank,
- aux_ptr->mpi_size);
+ result = H5C_apply_candidate_list(f, dxpl_id, dxpl_id, cache_ptr, num_candidates, candidates_list_ptr,
+ aux_ptr->mpi_rank, aux_ptr->mpi_size);
aux_ptr->write_permitted = FALSE;
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.")
- if(aux_ptr->write_done != NULL)
- (aux_ptr->write_done)();
+ if (aux_ptr->write_done != NULL)
+ (aux_ptr->write_done)();
/* to prevent "messages from the past" we must synchronize all
* processes again before we go on.
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed 2", mpi_code)
- if(aux_ptr->mpi_rank == 0) {
- if(H5AC_tidy_cache_0_lists(cache_ptr, num_candidates, candidates_list_ptr) < 0)
+ if (aux_ptr->mpi_rank == 0) {
+ if (H5AC_tidy_cache_0_lists(cache_ptr, num_candidates, candidates_list_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.")
} /* end if */
- } /* end if */
+ } /* end if */
/* if it is defined, call the sync point done callback. Note
* that this callback is defined purely for testing purposes,
* and should be undefined under normal operating circumstances.
*/
- if(aux_ptr->sync_point_done != NULL)
+ if (aux_ptr->sync_point_done != NULL)
(aux_ptr->sync_point_done)(num_candidates, candidates_list_ptr);
done:
- if(candidates_list_ptr != NULL)
+ if (candidates_list_ptr != NULL)
candidates_list_ptr = (haddr_t *)H5MM_xfree((void *)candidates_list_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_propagate_and_apply_candidate_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_propagate_flushed_and_still_clean_entries_list
*
* Purpose: In PHDF5, if the process 0 only metadata write strategy
- * is selected, only the metadata cache with mpi rank 0 is
- * allowed to write to file. All other metadata caches on
- * processes with rank greater than 0 must retain dirty
- * entries until they are notified that the entry is now
- * clean.
+ * is selected, only the metadata cache with mpi rank 0 is
+ * allowed to write to file. All other metadata caches on
+ * processes with rank greater than 0 must retain dirty
+ * entries until they are notified that the entry is now
+ * clean.
*
- * This function is the main routine for handling this
- * notification proceedure. It must be called
- * simultaniously on all processes that have the relevant
- * file open. To this end, it is called only during a
- * sync point, with a barrier prior to the call.
+ * This function is the main routine for handling this
+ * notification proceedure. It must be called
+ * simultaniously on all processes that have the relevant
+ * file open. To this end, it is called only during a
+ * sync point, with a barrier prior to the call.
*
- * Note that any metadata entry writes by process 0 will
- * occur after the barrier and just before this call.
+ * Note that any metadata entry writes by process 0 will
+ * occur after the barrier and just before this call.
*
- * Typicaly, calls to this function will be triggered in
- * one of two ways:
+ * Typicaly, calls to this function will be triggered in
+ * one of two ways:
*
- * 1) Dirty byte creation exceeds some user specified value.
+ * 1) Dirty byte creation exceeds some user specified value.
*
- * While metadata reads may occur independently, all
- * operations writing metadata must be collective. Thus
- * all metadata caches see the same sequence of operations,
+ * While metadata reads may occur independently, all
+ * operations writing metadata must be collective. Thus
+ * all metadata caches see the same sequence of operations,
* and therefore the same dirty data creation.
*
- * This fact is used to synchronize the caches for purposes
+ * This fact is used to synchronize the caches for purposes
* of propagating the list of flushed and still clean
- * entries, by simply calling this function from all
- * caches whenever some user specified threshold on dirty
- * data is exceeded.
+ * entries, by simply calling this function from all
+ * caches whenever some user specified threshold on dirty
+ * data is exceeded.
*
- * 2) Under direct user control -- this operation must be
- * collective.
+ * 2) Under direct user control -- this operation must be
+ * collective.
*
* The operations to be managed by this function are as
- * follows:
+ * follows:
*
- * For the process with mpi rank 0:
+ * For the process with mpi rank 0:
*
- * 1) Load the contents of the flushed and still clean entries
- * list (c_slist_ptr) into a buffer, and broadcast that
- * buffer to all the other caches.
+ * 1) Load the contents of the flushed and still clean entries
+ * list (c_slist_ptr) into a buffer, and broadcast that
+ * buffer to all the other caches.
*
- * 2) Clear the flushed and still clean entries list
+ * 2) Clear the flushed and still clean entries list
* (c_slist_ptr).
*
*
- * For all processes with mpi rank greater than 0:
+ * For all processes with mpi rank greater than 0:
*
- * 1) Receive the flushed and still clean entries list broadcast
+ * 1) Receive the flushed and still clean entries list broadcast
*
- * 2) Mark the specified entries as clean.
+ * 2) Mark the specified entries as clean.
*
*
- * For all processes:
+ * For all processes:
*
- * 1) Reset the dirtied bytes count to 0.
+ * 1) Reset the dirtied bytes count to 0.
*
* Return: Success: non-negative
*
@@ -3964,12 +3641,10 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3980,16 +3655,15 @@ H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
- if(aux_ptr->mpi_rank == 0) {
- if(H5AC_broadcast_clean_list(cache_ptr) < 0)
+ if (aux_ptr->mpi_rank == 0) {
+ if (H5AC_broadcast_clean_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist.")
- HDassert( aux_ptr->c_slist_len == 0 );
+ HDassert(aux_ptr->c_slist_len == 0);
} /* end if */
else {
- if(H5AC_receive_and_apply_clean_list(f, dxpl_id, H5AC_dxpl_id, cache_ptr) < 0)
+ if (H5AC_receive_and_apply_clean_list(f, dxpl_id, H5AC_dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.")
} /* end else */
@@ -3998,18 +3672,17 @@ done:
} /* H5AC_propagate_flushed_and_still_clean_entries_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_receive_and_apply_clean_list()
*
* Purpose: Receive the list of cleaned entries from process 0,
- * and mark the specified entries as clean.
+ * and mark the specified entries as clean.
*
- * This function must only be called by the process with
- * MPI_rank greater than 0.
+ * This function must only be called by the process with
+ * MPI_rank greater than 0.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -4019,48 +3692,45 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_receive_and_apply_clean_list(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_receive_and_apply_clean_list(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, H5AC_t *cache_ptr)
{
- H5AC_aux_t * aux_ptr;
- haddr_t * haddr_buf_ptr = NULL;
- MPI_Offset * MPI_Offset_buf_ptr = NULL;
- int mpi_result;
- int num_entries = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_aux_t *aux_ptr;
+ haddr_t * haddr_buf_ptr = NULL;
+ MPI_Offset *MPI_Offset_buf_ptr = NULL;
+ int mpi_result;
+ int num_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
- HDassert( f->shared->cache == cache_ptr );
+ HDassert(f != NULL);
+ HDassert(f->shared->cache == cache_ptr);
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->mpi_rank != 0 );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->mpi_rank != 0);
/* First receive the number of entries in the list so that we
* can set up a buffer to receive them. If there aren't
* any, we are done.
*/
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 1", mpi_result)
- if(num_entries > 0) {
+ if (num_entries > 0) {
size_t buf_size;
- int i;
+ int i;
/* allocate buffers to store the list of entry base addresses in */
buf_size = sizeof(MPI_Offset) * (size_t)num_entries;
- if(NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
+ if (NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for receive buffer")
- if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
+ if (NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for haddr buffer")
/* Now receive the list of cleaned entries
@@ -4070,23 +3740,24 @@ H5AC_receive_and_apply_clean_list(H5F_t * f,
* Thus the element type is MPI_BYTE, with size equal to the
* buf_size computed above.
*/
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0,
+ aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 2", mpi_result)
/* translate the MPI_Offsets to haddr_t */
i = 0;
- while(i < num_entries) {
+ while (i < num_entries) {
haddr_buf_ptr[i] = H5FD_mpi_MPIOff_to_haddr(MPI_Offset_buf_ptr[i]);
- if(haddr_buf_ptr[i] == HADDR_UNDEF)
+ if (haddr_buf_ptr[i] == HADDR_UNDEF)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert MPI off to haddr")
i++;
} /* end while */
/* mark the indicated entries as clean */
- if(H5C_mark_entries_as_clean(f, primary_dxpl_id, secondary_dxpl_id,
- (int32_t)num_entries, &(haddr_buf_ptr[0])) < 0)
+ if (H5C_mark_entries_as_clean(f, primary_dxpl_id, secondary_dxpl_id, (int32_t)num_entries,
+ &(haddr_buf_ptr[0])) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.")
} /* end if */
@@ -4094,33 +3765,32 @@ H5AC_receive_and_apply_clean_list(H5F_t * f,
* that this callback is defined purely for testing purposes,
* and should be undefined under normal operating circumstances.
*/
- if(aux_ptr->sync_point_done != NULL)
+ if (aux_ptr->sync_point_done != NULL)
(aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr);
done:
- if(MPI_Offset_buf_ptr != NULL)
+ if (MPI_Offset_buf_ptr != NULL)
MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)MPI_Offset_buf_ptr);
- if(haddr_buf_ptr != NULL)
+ if (haddr_buf_ptr != NULL)
haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_receive_and_apply_clean_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
*
* Function: H5AC_receive_candidate_list()
*
* Purpose: Receive the list of candidate entries from process 0,
- * and return it in a buffer pointed to by *haddr_buf_ptr_ptr.
- * Note that the caller must free this buffer if it is
- * returned.
+ * and return it in a buffer pointed to by *haddr_buf_ptr_ptr.
+ * Note that the caller must free this buffer if it is
+ * returned.
*
- * This function must only be called by the process with
- * MPI_rank greater than 0.
+ * This function must only be called by the process with
+ * MPI_rank greater than 0.
*
- * Return SUCCEED on success, and FAIL on failure.
+ * Return SUCCEED on success, and FAIL on failure.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -4130,55 +3800,51 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_receive_candidate_list(H5AC_t * cache_ptr,
- int * num_entries_ptr,
- haddr_t ** haddr_buf_ptr_ptr)
+H5AC_receive_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr)
{
- hbool_t success = FALSE;
- H5AC_aux_t * aux_ptr;
- haddr_t * haddr_buf_ptr = NULL;
- MPI_Offset * MPI_Offset_buf_ptr = NULL;
- int mpi_result;
- int num_entries;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t success = FALSE;
+ H5AC_aux_t *aux_ptr;
+ haddr_t * haddr_buf_ptr = NULL;
+ MPI_Offset *MPI_Offset_buf_ptr = NULL;
+ int mpi_result;
+ int num_entries;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->mpi_rank != 0 );
- HDassert( aux_ptr-> metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
-
- HDassert( num_entries_ptr != NULL );
- HDassert( *num_entries_ptr == 0 );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->mpi_rank != 0);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert( haddr_buf_ptr_ptr != NULL );
- HDassert( *haddr_buf_ptr_ptr == NULL );
+ HDassert(num_entries_ptr != NULL);
+ HDassert(*num_entries_ptr == 0);
+ HDassert(haddr_buf_ptr_ptr != NULL);
+ HDassert(*haddr_buf_ptr_ptr == NULL);
/* First receive the number of entries in the list so that we
* can set up a buffer to receive them. If there aren't
* any, we are done.
*/
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 1", mpi_result)
- if(num_entries > 0) {
+ if (num_entries > 0) {
size_t buf_size;
- int i;
+ int i;
/* allocate buffers to store the list of entry base addresses in */
buf_size = sizeof(MPI_Offset) * (size_t)num_entries;
- if(NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
+ if (NULL == (MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for receive buffer")
- if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
+ if (NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)num_entries)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for haddr buffer")
/* Now receive the list of candidate entries
@@ -4188,37 +3854,38 @@ H5AC_receive_candidate_list(H5AC_t * cache_ptr,
* Thus the element type is MPI_BYTE, with size equal to the
* buf_size computed above.
*/
- if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)MPI_Offset_buf_ptr, (int)buf_size, MPI_BYTE, 0,
+ aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed 2", mpi_result)
/* translate the MPI_Offsets to haddr_t */
i = 0;
- while(i < num_entries) {
+ while (i < num_entries) {
haddr_buf_ptr[i] = H5FD_mpi_MPIOff_to_haddr(MPI_Offset_buf_ptr[i]);
- if(haddr_buf_ptr[i] == HADDR_UNDEF)
+ if (haddr_buf_ptr[i] == HADDR_UNDEF)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert MPI off to haddr")
i++;
} /* end while */
- } /* end if */
+ } /* end if */
success = TRUE;
done:
- if(MPI_Offset_buf_ptr != NULL)
+ if (MPI_Offset_buf_ptr != NULL)
MPI_Offset_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)MPI_Offset_buf_ptr);
- if(success) {
- /* finally, pass the number of entries and the buffer pointer
+ if (success) {
+ /* finally, pass the number of entries and the buffer pointer
* back to the caller. Do this so that we can use the same code
* to apply the candidate list to all the processes.
*/
- *num_entries_ptr = num_entries;
+ *num_entries_ptr = num_entries;
*haddr_buf_ptr_ptr = haddr_buf_ptr;
} /* end if */
else {
- if(haddr_buf_ptr != NULL)
+ if (haddr_buf_ptr != NULL)
haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr);
} /* end else */
@@ -4226,46 +3893,45 @@ done:
} /* H5AC_receive_candidate_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_rsp__dist_md_write__flush
*
* Purpose: Routine for handling the details of running a sync point
- * that is triggered by a flush -- which in turn must have been
- * triggered by either a flush API call or a file close --
- * when the distributed metadata write strategy is selected.
- *
- * Upon entry, each process generates it own candidate list,
- * being a sorted list of all dirty metadata entries currently
- * in the metadata cache. Note that this list must be idendical
- * across all processes, as all processes see the same stream
- * of dirty metadata coming in, and use the same lists of
- * candidate entries at each sync point. (At first glance, this
- * argument sounds circular, but think of it in the sense of
- * a recursive proof).
- *
- * If this this list is empty, we are done, and the function
- * returns
- *
- * Otherwise, after the sorted list dirty metadata entries is
- * constructed, each process uses the same algorithm to assign
- * each entry on the candidate list to exactly one process for
- * flushing.
- *
- * At this point, all processes participate in a barrier to
- * avoid messages from the past/future bugs.
- *
- * Each process then flushes the entries assigned to it, and
- * marks all other entries on the candidate list as clean.
- *
- * Finally, all processes participate in a second barrier to
- * avoid messages from the past/future bugs.
- *
- * At the end of this process, process 0 and only process 0
- * must tidy up its lists of dirtied and cleaned entries.
- * These lists are not used in the distributed metadata write
- * strategy, but they must be maintained should we shift
- * to a strategy that uses them.
+ * that is triggered by a flush -- which in turn must have been
+ * triggered by either a flush API call or a file close --
+ * when the distributed metadata write strategy is selected.
+ *
+ * Upon entry, each process generates it own candidate list,
+ * being a sorted list of all dirty metadata entries currently
+ * in the metadata cache. Note that this list must be idendical
+ * across all processes, as all processes see the same stream
+ * of dirty metadata coming in, and use the same lists of
+ * candidate entries at each sync point. (At first glance, this
+ * argument sounds circular, but think of it in the sense of
+ * a recursive proof).
+ *
+ * If this this list is empty, we are done, and the function
+ * returns
+ *
+ * Otherwise, after the sorted list dirty metadata entries is
+ * constructed, each process uses the same algorithm to assign
+ * each entry on the candidate list to exactly one process for
+ * flushing.
+ *
+ * At this point, all processes participate in a barrier to
+ * avoid messages from the past/future bugs.
+ *
+ * Each process then flushes the entries assigned to it, and
+ * marks all other entries on the candidate list as clean.
+ *
+ * Finally, all processes participate in a second barrier to
+ * avoid messages from the past/future bugs.
+ *
+ * At the end of this process, process 0 and only process 0
+ * must tidy up its lists of dirtied and cleaned entries.
+ * These lists are not used in the distributed metadata write
+ * strategy, but they must be maintained should we shift
+ * to a strategy that uses them.
*
* Return: Success: non-negative
*
@@ -4278,147 +3944,137 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_rsp__dist_md_write__flush(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- int mpi_code;
- int num_entries = 0;
- haddr_t * haddr_buf_ptr = NULL;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ int mpi_code;
+ int num_entries = 0;
+ haddr_t * haddr_buf_ptr = NULL;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
- HDassert( f->shared->cache == cache_ptr );
+ HDassert(f != NULL);
+ HDassert(f->shared->cache == cache_ptr);
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- /* first construct the candidate list -- initially, this will be in the
+ /* first construct the candidate list -- initially, this will be in the
* form of a skip list. We will convert it later.
*/
- if(H5C_construct_candidate_list__clean_cache(cache_ptr) < 0)
+ if (H5C_construct_candidate_list__clean_cache(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.")
- if(aux_ptr->candidate_slist_len > 0) {
- herr_t result;
+ if (aux_ptr->candidate_slist_len > 0) {
+ herr_t result;
/* convert the candidate list into the format we
* are used to receiving from process 0.
*/
- if(H5AC_copy_candidate_list_to_buffer(cache_ptr, &num_entries, &haddr_buf_ptr, NULL, NULL) < 0)
+ if (H5AC_copy_candidate_list_to_buffer(cache_ptr, &num_entries, &haddr_buf_ptr, NULL, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.")
/* initial sync point barrier */
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed 1", mpi_code)
/* apply the candidate list */
aux_ptr->write_permitted = TRUE;
- result = H5C_apply_candidate_list(f,
- dxpl_id,
- dxpl_id,
- cache_ptr,
- num_entries,
- haddr_buf_ptr,
- aux_ptr->mpi_rank,
- aux_ptr->mpi_size);
+ result = H5C_apply_candidate_list(f, dxpl_id, dxpl_id, cache_ptr, num_entries, haddr_buf_ptr,
+ aux_ptr->mpi_rank, aux_ptr->mpi_size);
aux_ptr->write_permitted = FALSE;
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.")
/* this code exists primarily for the test bed -- it allows us to
- * enforce posix semantics on the server that pretends to be a
+ * enforce posix semantics on the server that pretends to be a
* file system in our parallel tests.
*/
- if(aux_ptr->write_done != NULL)
+ if (aux_ptr->write_done != NULL)
(aux_ptr->write_done)();
/* final sync point barrier */
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed 1", mpi_code)
- /* if this is process zero, tidy up the dirtied,
+ /* if this is process zero, tidy up the dirtied,
* and flushed and still clean lists.
*/
- if(aux_ptr->mpi_rank == 0) {
- if(H5AC_tidy_cache_0_lists(cache_ptr, num_entries, haddr_buf_ptr) < 0)
+ if (aux_ptr->mpi_rank == 0) {
+ if (H5AC_tidy_cache_0_lists(cache_ptr, num_entries, haddr_buf_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.")
} /* end if */
- } /* end if */
+ } /* end if */
/* if it is defined, call the sync point done callback. Note
* that this callback is defined purely for testing purposes,
* and should be undefined under normal operating circumstances.
*/
- if(aux_ptr->sync_point_done != NULL)
+ if (aux_ptr->sync_point_done != NULL)
(aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr);
done:
- if(haddr_buf_ptr != NULL)
+ if (haddr_buf_ptr != NULL)
haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_rsp__dist_md_write__flush() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_rsp__dist_md_write__flush_to_min_clean
*
* Purpose: Routine for handling the details of running a sync point
- * triggered by the accumulation of dirty metadata (as
- * opposed to a flush call to the API) when the distributed
- * metadata write strategy is selected.
+ * triggered by the accumulation of dirty metadata (as
+ * opposed to a flush call to the API) when the distributed
+ * metadata write strategy is selected.
*
- * After invocation and initial sanity checking this function
- * first checks to see if evictions are enabled -- if they
- * are not, the function does nothing and returns.
+ * After invocation and initial sanity checking this function
+ * first checks to see if evictions are enabled -- if they
+ * are not, the function does nothing and returns.
*
- * Otherwise, process zero constructs a list of entries to
- * be flushed in order to bring the process zero cache back
- * within its min clean requirement. Note that this list
- * (the candidate list) may be empty.
+ * Otherwise, process zero constructs a list of entries to
+ * be flushed in order to bring the process zero cache back
+ * within its min clean requirement. Note that this list
+ * (the candidate list) may be empty.
*
* Then, all processes participate in a barrier.
*
- * After the barrier, process 0 broadcasts the number of
- * entries in the candidate list prepared above, and all
- * other processes receive this number.
+ * After the barrier, process 0 broadcasts the number of
+ * entries in the candidate list prepared above, and all
+ * other processes receive this number.
*
- * If this number is zero, we are done, and the function
- * returns without further action.
+ * If this number is zero, we are done, and the function
+ * returns without further action.
*
- * Otherwise, process 0 broadcasts the sorted list of
- * candidate entries, and all other processes receive it.
+ * Otherwise, process 0 broadcasts the sorted list of
+ * candidate entries, and all other processes receive it.
*
- * Then, each process uses the same algorithm to assign
- * each entry on the candidate list to exactly one process
- * for flushing.
+ * Then, each process uses the same algorithm to assign
+ * each entry on the candidate list to exactly one process
+ * for flushing.
*
- * Each process then flushes the entries assigned to it, and
- * marks all other entries on the candidate list as clean.
+ * Each process then flushes the entries assigned to it, and
+ * marks all other entries on the candidate list as clean.
*
- * Finally, all processes participate in a second barrier to
- * avoid messages from the past/future bugs.
+ * Finally, all processes participate in a second barrier to
+ * avoid messages from the past/future bugs.
*
- * At the end of this process, process 0 and only process 0
- * must tidy up its lists of dirtied and cleaned entries.
- * These lists are not used in the distributed metadata write
- * strategy, but they must be maintained should we shift
- * to a strategy that uses them.
+ * At the end of this process, process 0 and only process 0
+ * must tidy up its lists of dirtied and cleaned entries.
+ * These lists are not used in the distributed metadata write
+ * strategy, but they must be maintained should we shift
+ * to a strategy that uses them.
*
* Return: Success: non-negative
*
@@ -4431,42 +4087,39 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_rsp__dist_md_write__flush_to_min_clean(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- hbool_t evictions_enabled;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t evictions_enabled;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
- HDassert( f->shared->cache == cache_ptr );
+ HDassert(f != NULL);
+ HDassert(f->shared->cache == cache_ptr);
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* Query if evictions are allowed */
- if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
+ if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.")
- if(evictions_enabled) {
+ if (evictions_enabled) {
/* construct candidate list -- process 0 only */
- if(aux_ptr->mpi_rank == 0) {
- if(H5AC_construct_candidate_list(cache_ptr, aux_ptr, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
+ if (aux_ptr->mpi_rank == 0) {
+ if (H5AC_construct_candidate_list(cache_ptr, aux_ptr, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.")
} /* mpi rank == 0 */
/* propagate and apply candidate list -- all processes */
- if(H5AC_propagate_and_apply_candidate_list(f, dxpl_id, cache_ptr) < 0)
+ if (H5AC_propagate_and_apply_candidate_list(f, dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list.")
} /* evictions enabled */
@@ -4475,33 +4128,32 @@ done:
} /* H5AC_rsp__dist_md_write__flush_to_min_clean() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_rsp__p0_only__flush
*
* Purpose: Routine for handling the details of running a sync point
- * that is triggered a flush -- which in turn must have been
- * triggered by either a flush API call or a file close --
- * when the process 0 only metadata write strategy is selected.
+ * that is triggered a flush -- which in turn must have been
+ * triggered by either a flush API call or a file close --
+ * when the process 0 only metadata write strategy is selected.
*
* First, all processes participate in a barrier.
*
- * Then process zero flushes all dirty entries, and broadcasts
- * they number of clean entries (if any) to all the other
- * caches.
+ * Then process zero flushes all dirty entries, and broadcasts
+ * they number of clean entries (if any) to all the other
+ * caches.
*
- * If this number is zero, we are done.
+ * If this number is zero, we are done.
*
- * Otherwise, process 0 broadcasts the list of cleaned
- * entries, and all other processes which are part of this
- * file group receive it, and mark the listed entries as
- * clean in their caches.
+ * Otherwise, process 0 broadcasts the list of cleaned
+ * entries, and all other processes which are part of this
+ * file group receive it, and mark the listed entries as
+ * clean in their caches.
*
- * Since all processes have the same set of dirty
- * entries at the beginning of the sync point, and all
- * entries that will be written are written before
- * process zero broadcasts the number of cleaned entries,
- * there is no need for a closing barrier.
+ * Since all processes have the same set of dirty
+ * entries at the beginning of the sync point, and all
+ * entries that will be written are written before
+ * process zero broadcasts the number of cleaned entries,
+ * there is no need for a closing barrier.
*
* Return: Success: non-negative
*
@@ -4514,40 +4166,36 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_rsp__p0_only__flush(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- int mpi_code;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ int mpi_code;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
- HDassert( f->shared->cache == cache_ptr );
+ HDassert(f != NULL);
+ HDassert(f->shared->cache == cache_ptr);
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY );
-
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
- /* to prevent "messages from the future" we must
- * synchronize all processes before we start the flush.
+ /* to prevent "messages from the future" we must
+ * synchronize all processes before we start the flush.
* Hence the following barrier.
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed 1", mpi_code)
/* Flush data to disk, from rank 0 process */
- if(aux_ptr->mpi_rank == 0) {
- herr_t result;
+ if (aux_ptr->mpi_rank == 0) {
+ herr_t result;
aux_ptr->write_permitted = TRUE;
@@ -4555,15 +4203,15 @@ H5AC_rsp__p0_only__flush(H5F_t *f,
aux_ptr->write_permitted = FALSE;
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.")
- if(aux_ptr->write_done != NULL)
+ if (aux_ptr->write_done != NULL)
(aux_ptr->write_done)();
} /* end if */
/* Propagate cleaned entries to other ranks. */
- if(H5AC_propagate_flushed_and_still_clean_entries_list(f, H5AC_dxpl_id, cache_ptr) < 0)
+ if (H5AC_propagate_flushed_and_still_clean_entries_list(f, H5AC_dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.")
done:
@@ -4571,39 +4219,38 @@ done:
} /* H5AC_rsp__p0_only__flush() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_rsp__p0_only__flush_to_min_clean
*
* Purpose: Routine for handling the details of running a sync point
- * triggered by the accumulation of dirty metadata (as
- * opposed to a flush call to the API) when the process 0
- * only metadata write strategy is selected.
+ * triggered by the accumulation of dirty metadata (as
+ * opposed to a flush call to the API) when the process 0
+ * only metadata write strategy is selected.
*
- * After invocation and initial sanity checking this function
- * first checks to see if evictions are enabled -- if they
- * are not, the function does nothing and returns.
+ * After invocation and initial sanity checking this function
+ * first checks to see if evictions are enabled -- if they
+ * are not, the function does nothing and returns.
*
* Otherwise, all processes participate in a barrier.
*
- * After the barrier, if this is process 0, the function
- * causes the cache to flush sufficient entries to get the
- * cache back within its minimum clean fraction, and broadcast
- * the number of entries which have been flushed since
- * the last sync point, and are still clean.
+ * After the barrier, if this is process 0, the function
+ * causes the cache to flush sufficient entries to get the
+ * cache back within its minimum clean fraction, and broadcast
+ * the number of entries which have been flushed since
+ * the last sync point, and are still clean.
*
- * If this number is zero, we are done.
+ * If this number is zero, we are done.
*
- * Otherwise, process 0 broadcasts the list of cleaned
- * entries, and all other processes which are part of this
- * file group receive it, and mark the listed entries as
- * clean in their caches.
+ * Otherwise, process 0 broadcasts the list of cleaned
+ * entries, and all other processes which are part of this
+ * file group receive it, and mark the listed entries as
+ * clean in their caches.
*
- * Since all processes have the same set of dirty
- * entries at the beginning of the sync point, and all
- * entries that will be written are written before
- * process zero broadcasts the number of cleaned entries,
- * there is no need for a closing barrier.
+ * Since all processes have the same set of dirty
+ * entries at the beginning of the sync point, and all
+ * entries that will be written are written before
+ * process zero broadcasts the number of cleaned entries,
+ * there is no need for a closing barrier.
*
* Return: Success: non-negative
*
@@ -4616,31 +4263,28 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id, H5AC_t *cache_ptr)
{
- hbool_t evictions_enabled;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t evictions_enabled;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
- HDassert( f->shared->cache == cache_ptr );
+ HDassert(f != NULL);
+ HDassert(f->shared->cache == cache_ptr);
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
/* Query if evictions are allowed */
- if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
+ if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.")
/* Flush if evictions are allowed -- following call
@@ -4650,22 +4294,22 @@ H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f,
*
* Otherwise, do nothing.
*/
- if(evictions_enabled) {
- int mpi_code;
+ if (evictions_enabled) {
+ int mpi_code;
/* to prevent "messages from the future" we must synchronize all
* processes before we start the flush. This synchronization may
* already be done -- hence the do_barrier parameter.
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code)
- if(0 == aux_ptr->mpi_rank) {
- herr_t result;
+ if (0 == aux_ptr->mpi_rank) {
+ herr_t result;
- /* here, process 0 flushes as many entries as necessary to
+ /* here, process 0 flushes as many entries as necessary to
* comply with the currently specified min clean size.
- * Note that it is quite possible that no entries will be
+ * Note that it is quite possible that no entries will be
* flushed.
*/
aux_ptr->write_permitted = TRUE;
@@ -4674,18 +4318,18 @@ H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f,
aux_ptr->write_permitted = FALSE;
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_to_min_clean() failed.")
/* this call exists primarily for the test code -- it is used
- * to enforce POSIX semantics on the process used to simulate
- * reads and writes in t_cache.c.
+ * to enforce POSIX semantics on the process used to simulate
+ * reads and writes in t_cache.c.
*/
- if(aux_ptr->write_done != NULL)
+ if (aux_ptr->write_done != NULL)
(aux_ptr->write_done)();
} /* end if */
- if(H5AC_propagate_flushed_and_still_clean_entries_list(f, dxpl_id, cache_ptr) < 0)
+ if (H5AC_propagate_flushed_and_still_clean_entries_list(f, dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.")
} /* end if */
@@ -4694,28 +4338,27 @@ done:
} /* H5AC_rsp__p0_only__flush_to_min_clean() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_run_sync_point
*
* Purpose: Top level routine for managing a sync point between all
- * meta data caches in the parallel case. Since all caches
- * see the same sequence of dirty metadata, we simply count
- * bytes of dirty metadata, and run a sync point whenever the
- * number of dirty bytes of metadata seen since the last
- * sync point exceeds a threshold that is common across all
- * processes. We also run sync points in response to
- * HDF5 API calls triggering either a flush or a file close.
- *
- * In earlier versions of PHDF5, only the metadata cache with
- * mpi rank 0 was allowed to write to file. All other
- * metadata caches on processes with rank greater than 0 were
- * required to retain dirty entries until they were notified
- * that the entry is was clean.
- *
- * This function was created to make it easier for us to
- * experiment with other options, as it is a single point
- * for the execution of sync points.
+ * meta data caches in the parallel case. Since all caches
+ * see the same sequence of dirty metadata, we simply count
+ * bytes of dirty metadata, and run a sync point whenever the
+ * number of dirty bytes of metadata seen since the last
+ * sync point exceeds a threshold that is common across all
+ * processes. We also run sync points in response to
+ * HDF5 API calls triggering either a flush or a file close.
+ *
+ * In earlier versions of PHDF5, only the metadata cache with
+ * mpi rank 0 was allowed to write to file. All other
+ * metadata caches on processes with rank greater than 0 were
+ * required to retain dirty entries until they were notified
+ * that the entry is was clean.
+ *
+ * This function was created to make it easier for us to
+ * experiment with other options, as it is a single point
+ * for the execution of sync points.
*
* Return: Success: non-negative
*
@@ -4728,91 +4371,85 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5AC_run_sync_point(H5F_t *f,
- hid_t dxpl_id,
- int sync_point_op)
+H5AC_run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op)
{
- H5AC_t * cache_ptr;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_t * cache_ptr;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f != NULL );
+ HDassert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert( ( sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN ) ||
- ( sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED ) );
+ HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- HDfprintf(stdout,
- "%d:H5AC_propagate...:%d: (u/uu/i/iu/r/ru) = %d/%d/%d/%d/%d/%d\n",
- (int)(aux_ptr->mpi_rank),
- (int)(aux_ptr->dirty_bytes_propagations),
- (int)(aux_ptr->unprotect_dirty_bytes),
- (int)(aux_ptr->unprotect_dirty_bytes_updates),
- (int)(aux_ptr->insert_dirty_bytes),
- (int)(aux_ptr->insert_dirty_bytes_updates),
- (int)(aux_ptr->rename_dirty_bytes),
- (int)(aux_ptr->rename_dirty_bytes_updates));
+ HDfprintf(stdout, "%d:H5AC_propagate...:%d: (u/uu/i/iu/r/ru) = %d/%d/%d/%d/%d/%d\n",
+ (int)(aux_ptr->mpi_rank), (int)(aux_ptr->dirty_bytes_propagations),
+ (int)(aux_ptr->unprotect_dirty_bytes), (int)(aux_ptr->unprotect_dirty_bytes_updates),
+ (int)(aux_ptr->insert_dirty_bytes), (int)(aux_ptr->insert_dirty_bytes_updates),
+ (int)(aux_ptr->rename_dirty_bytes), (int)(aux_ptr->rename_dirty_bytes_updates));
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
- switch(aux_ptr->metadata_write_strategy) {
+ switch (aux_ptr->metadata_write_strategy) {
case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
- switch(sync_point_op) {
+ switch (sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
- if(H5AC_rsp__p0_only__flush_to_min_clean(f, dxpl_id, cache_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC_rsp__p0_only__flush_to_min_clean() failed.")
- break;
+ if (H5AC_rsp__p0_only__flush_to_min_clean(f, dxpl_id, cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL,
+ "H5AC_rsp__p0_only__flush_to_min_clean() failed.")
+ break;
- case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
- if(H5AC_rsp__p0_only__flush(f, dxpl_id, cache_ptr) < 0)
+ case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
+ if (H5AC_rsp__p0_only__flush(f, dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC_rsp__p0_only__flush() failed.")
- break;
+ break;
- default:
+ default:
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op");
- break;
- } /* end switch */
- break;
+ break;
+ } /* end switch */
+ break;
- case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
- switch(sync_point_op) {
+ case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
+ switch (sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
- if(H5AC_rsp__dist_md_write__flush_to_min_clean(f, dxpl_id, cache_ptr) < 0)
+ if (H5AC_rsp__dist_md_write__flush_to_min_clean(f, dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC_rsp__dist_md_write__flush() failed.")
- break;
+ break;
- case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
- if(H5AC_rsp__dist_md_write__flush(f, dxpl_id, cache_ptr) < 0)
+ case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
+ if (H5AC_rsp__dist_md_write__flush(f, dxpl_id, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC_rsp__dist_md_write__flush() failed.")
- break;
+ break;
- default:
+ default:
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op");
- break;
- } /* end switch */
- break;
+ break;
+ } /* end switch */
+ break;
- default:
+ default:
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown metadata write strategy.")
- break;
+ break;
} /* end switch */
/* reset the dirty bytes count */
aux_ptr->dirty_bytes = 0;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->dirty_bytes_propagations += 1;
+ aux_ptr->dirty_bytes_propagations += 1;
aux_ptr->unprotect_dirty_bytes = 0;
aux_ptr->unprotect_dirty_bytes_updates = 0;
aux_ptr->insert_dirty_bytes = 0;
@@ -4826,32 +4463,31 @@ done:
} /* H5AC_run_sync_point() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_tidy_cache_0_lists()
*
* Purpose: In the distributed metadata write strategy, not all dirty
- * entries are written by process 0 -- thus we must tidy
- * up the dirtied, and flushed and still clean lists
- * maintained by process zero after each sync point.
+ * entries are written by process 0 -- thus we must tidy
+ * up the dirtied, and flushed and still clean lists
+ * maintained by process zero after each sync point.
*
- * This procedure exists to tend to this issue.
+ * This procedure exists to tend to this issue.
*
- * At this point, all entries that process 0 cleared should
- * have been removed from both the dirty and flushed and
- * still clean lists, and entries that process 0 has flushed
- * should have been removed from the dirtied list and added
- * to the flushed and still clean list.
+ * At this point, all entries that process 0 cleared should
+ * have been removed from both the dirty and flushed and
+ * still clean lists, and entries that process 0 has flushed
+ * should have been removed from the dirtied list and added
+ * to the flushed and still clean list.
*
- * However, since the distributed metadata write strategy
- * doesn't make use of these lists, the objective is simply
- * to maintain these lists in consistent state that allows
- * them to be used should the metadata write strategy change
- * to one that uses these lists.
+ * However, since the distributed metadata write strategy
+ * doesn't make use of these lists, the objective is simply
+ * to maintain these lists in consistent state that allows
+ * them to be used should the metadata write strategy change
+ * to one that uses these lists.
*
- * Thus for our purposes, all we need to do is remove from
- * the dirtied and flushed and still clean lists all
- * references to entries that appear in the candidate list.
+ * Thus for our purposes, all we need to do is remove from
+ * the dirtied and flushed and still clean lists all
+ * references to entries that appear in the candidate list.
*
* Return: Success: non-negative
*
@@ -4864,57 +4500,54 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_tidy_cache_0_lists(H5AC_t * cache_ptr,
- int num_candidates,
- haddr_t * candidates_list_ptr)
+H5AC_tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, haddr_t *candidates_list_ptr)
{
- int i;
- H5AC_aux_t * aux_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ int i;
+ H5AC_aux_t *aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr);
- HDassert( aux_ptr != NULL );
- HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( aux_ptr->metadata_write_strategy ==
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED );
- HDassert( aux_ptr->mpi_rank == 0 );
- HDassert( num_candidates > 0 );
- HDassert( candidates_list_ptr != NULL );
-
- /* clean up dirtied and flushed and still clean lists by removing
- * all entries on the candidate list. Cleared entries should
- * have been removed from both the dirty and cleaned lists at
- * this point, flushed entries should have been added to the
- * cleaned list. However, for this metadata write strategy,
+ HDassert(aux_ptr != NULL);
+ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ HDassert(aux_ptr->mpi_rank == 0);
+ HDassert(num_candidates > 0);
+ HDassert(candidates_list_ptr != NULL);
+
+ /* clean up dirtied and flushed and still clean lists by removing
+ * all entries on the candidate list. Cleared entries should
+ * have been removed from both the dirty and cleaned lists at
+ * this point, flushed entries should have been added to the
+ * cleaned list. However, for this metadata write strategy,
* we just want to remove all references to the candidate entries.
*/
- for(i = 0; i < num_candidates; i++) {
- H5AC_slist_entry_t * d_slist_entry_ptr;
- H5AC_slist_entry_t * c_slist_entry_ptr;
- haddr_t addr;
+ for (i = 0; i < num_candidates; i++) {
+ H5AC_slist_entry_t *d_slist_entry_ptr;
+ H5AC_slist_entry_t *c_slist_entry_ptr;
+ haddr_t addr;
addr = candidates_list_ptr[i];
- /* addr must be either on the dirtied list, or on the flushed
+ /* addr must be either on the dirtied list, or on the flushed
* and still clean list. Remove it.
*/
d_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->d_slist_ptr, (void *)&addr);
- if(d_slist_entry_ptr != NULL) {
+ if (d_slist_entry_ptr != NULL) {
HDassert(d_slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
HDassert(d_slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != d_slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)) != d_slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from dirty entry slist.")
d_slist_entry_ptr->magic = 0;
- d_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, d_slist_entry_ptr);
+ d_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, d_slist_entry_ptr);
aux_ptr->d_slist_len -= 1;
@@ -4922,28 +4555,27 @@ H5AC_tidy_cache_0_lists(H5AC_t * cache_ptr,
} /* end if */
c_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_search(aux_ptr->c_slist_ptr, (void *)&addr);
- if(c_slist_entry_ptr != NULL) {
+ if (c_slist_entry_ptr != NULL) {
HDassert(c_slist_entry_ptr->magic == H5AC__H5AC_SLIST_ENTRY_T_MAGIC);
HDassert(c_slist_entry_ptr->addr == addr);
- if(H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != c_slist_entry_ptr)
+ if (H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)) != c_slist_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDELETE, FAIL, "Can't delete entry from clean entry slist.")
c_slist_entry_ptr->magic = 0;
- c_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, c_slist_entry_ptr);
+ c_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, c_slist_entry_ptr);
aux_ptr->c_slist_len -= 1;
- HDassert( aux_ptr->c_slist_len >= 0 );
+ HDassert(aux_ptr->c_slist_len >= 0);
} /* end if */
- } /* end for */
+ } /* end for */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_tidy_cache_0_lists() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5AC_flush_entries
*
@@ -4964,7 +4596,7 @@ done:
herr_t
H5AC_flush_entries(H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -4972,8 +4604,8 @@ H5AC_flush_entries(H5F_t *f)
HDassert(f->shared->cache);
/* Check if we have >1 ranks */
- if(f->shared->cache->aux_ptr) {
- if(H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0)
+ if (f->shared->cache->aux_ptr) {
+ if (H5AC_run_sync_point(f, H5AC_dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
} /* end if */
@@ -4981,4 +4613,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush_entries() */
#endif /* H5_HAVE_PARALLEL */
-
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 42f0b18..688fa6d 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -34,15 +34,13 @@
#define _H5ACpkg_H
/* Get package's private header */
-#include "H5ACprivate.h" /* Metadata cache */
-
+#include "H5ACprivate.h" /* Metadata cache */
/* Get needed headers */
-#include "H5Cprivate.h" /* Cache */
-#include "H5SLprivate.h" /* Skip lists */
-
+#include "H5Cprivate.h" /* Cache */
+#include "H5SLprivate.h" /* Skip lists */
-#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
+#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
#ifdef H5_HAVE_PARALLEL
@@ -50,8 +48,8 @@
* at a sync point.
*/
-#define H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN 0
-#define H5AC_SYNC_POINT_OP__FLUSH_CACHE 1
+#define H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN 0
+#define H5AC_SYNC_POINT_OP__FLUSH_CACHE 1
#endif /* H5_HAVE_PARALLEL */
@@ -62,12 +60,9 @@
*-------------------------------------------------------------------------
*/
-#define H5AC__MIN_DIRTY_BYTES_THRESHOLD (int32_t) \
- (H5C__MIN_MAX_CACHE_SIZE / 2)
-#define H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD (256 * 1024)
-#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
- (H5C__MAX_MAX_CACHE_SIZE / 4)
-
+#define H5AC__MIN_DIRTY_BYTES_THRESHOLD (int32_t)(H5C__MIN_MAX_CACHE_SIZE / 2)
+#define H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD (256 * 1024)
+#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t)(H5C__MAX_MAX_CACHE_SIZE / 4)
/****************************************************************************
*
@@ -172,10 +167,10 @@
* broadcast. This field is reset to zero after each such
* broadcast.
*
- * metadata_write_strategy: Integer code indicating how we will be
- * writing the metadata. In the first incarnation of
+ * metadata_write_strategy: Integer code indicating how we will be
+ * writing the metadata. In the first incarnation of
* this code, all writes were done from process 0. This
- * field exists to facilitate experiments with other
+ * field exists to facilitate experiments with other
* strategies.
*
* dirty_bytes_propagations: This field only exists when the
@@ -229,7 +224,7 @@
*
* Things have changed a bit since the following four fields were defined.
* If metadata_write_strategy is H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY,
- * all comments hold as before -- with the caviate that pending further
+ * all comments hold as before -- with the caviate that pending further
* coding, the process 0 metadata cache is forbidden to flush entries outside
* of a sync point.
*
@@ -312,77 +307,74 @@
* needed.
*
* Note: This field has been extended for use by all processes
- * with the addition of support for the distributed
- * metadata write strategy.
+ * with the addition of support for the distributed
+ * metadata write strategy.
* JRM -- 5/9/10
*
* sync_point_done: In the parallel test bed, it is necessary to verify
* that the expected writes, and only the expected writes,
* have taken place at the end of each sync point.
*
- * The sync_point_done callback allows t_cache to perform
- * this verification. The field is set to NULL when the
+ * The sync_point_done callback allows t_cache to perform
+ * this verification. The field is set to NULL when the
* callback is not needed.
*
****************************************************************************/
#ifdef H5_HAVE_PARALLEL
-#define H5AC__H5AC_AUX_T_MAGIC (unsigned)0x00D0A01
+#define H5AC__H5AC_AUX_T_MAGIC (unsigned)0x00D0A01
-typedef struct H5AC_aux_t
-{
- uint32_t magic;
+typedef struct H5AC_aux_t {
+ uint32_t magic;
- MPI_Comm mpi_comm;
+ MPI_Comm mpi_comm;
- int mpi_rank;
+ int mpi_rank;
- int mpi_size;
+ int mpi_size;
- hbool_t write_permitted;
+ hbool_t write_permitted;
- int32_t dirty_bytes_threshold;
+ int32_t dirty_bytes_threshold;
- int32_t dirty_bytes;
+ int32_t dirty_bytes;
- int32_t metadata_write_strategy;
+ int32_t metadata_write_strategy;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- int32_t dirty_bytes_propagations;
+ int32_t dirty_bytes_propagations;
- int32_t unprotect_dirty_bytes;
- int32_t unprotect_dirty_bytes_updates;
+ int32_t unprotect_dirty_bytes;
+ int32_t unprotect_dirty_bytes_updates;
- int32_t insert_dirty_bytes;
- int32_t insert_dirty_bytes_updates;
+ int32_t insert_dirty_bytes;
+ int32_t insert_dirty_bytes_updates;
- int32_t move_dirty_bytes;
- int32_t move_dirty_bytes_updates;
+ int32_t move_dirty_bytes;
+ int32_t move_dirty_bytes_updates;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
- H5SL_t * d_slist_ptr;
+ H5SL_t *d_slist_ptr;
- int32_t d_slist_len;
+ int32_t d_slist_len;
- H5SL_t * c_slist_ptr;
+ H5SL_t *c_slist_ptr;
- int32_t c_slist_len;
+ int32_t c_slist_len;
- H5SL_t * candidate_slist_ptr;
+ H5SL_t *candidate_slist_ptr;
- int32_t candidate_slist_len;
+ int32_t candidate_slist_len;
- void (* write_done)(void);
+ void (*write_done)(void);
- void (* sync_point_done)(int num_writes,
- haddr_t * written_entries_tbl);
+ void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl);
} H5AC_aux_t; /* struct H5AC_aux_t */
#endif /* H5_HAVE_PARALLEL */
#endif /* _H5ACpkg_H */
-
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 08ce75a..7ca134b 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -6,19 +6,19 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5ACprivate.h
- * Jul 9 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5ACprivate.h
+ * Jul 9 1997
+ * Robb Matzke
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
*-------------------------------------------------------------------------
*/
@@ -26,42 +26,42 @@
#ifndef _H5ACprivate_H
#define _H5ACprivate_H
-#include "H5ACpublic.h" /*public prototypes */
+#include "H5ACpublic.h" /*public prototypes */
/* Pivate headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Cprivate.h" /* Cache */
-#include "H5Fprivate.h" /* File access */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Cprivate.h" /* Cache */
+#include "H5Fprivate.h" /* File access */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_METADATA_TRACE_FILE
-#define H5AC__TRACE_FILE_ENABLED 1
+#define H5AC__TRACE_FILE_ENABLED 1
#else /* H5_METADATA_TRACE_FILE */
-#define H5AC__TRACE_FILE_ENABLED 0
+#define H5AC__TRACE_FILE_ENABLED 0
#endif /* H5_METADATA_TRACE_FILE */
/* Types of metadata objects cached */
typedef enum {
- H5AC_BT_ID = 0, /*B-tree nodes */
- H5AC_SNODE_ID, /*symbol table nodes */
- H5AC_LHEAP_PRFX_ID, /*local heap prefix */
- H5AC_LHEAP_DBLK_ID, /*local heap data block */
- H5AC_GHEAP_ID, /*global heap */
- H5AC_OHDR_ID, /*object header */
- H5AC_OHDR_CHK_ID, /*object header chunk */
- H5AC_BT2_HDR_ID, /*v2 B-tree header */
- H5AC_BT2_INT_ID, /*v2 B-tree internal node */
- H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */
- H5AC_FHEAP_HDR_ID, /*fractal heap header */
- H5AC_FHEAP_DBLOCK_ID, /*fractal heap direct block */
- H5AC_FHEAP_IBLOCK_ID, /*fractal heap indirect block */
- H5AC_FSPACE_HDR_ID, /*free space header */
- H5AC_FSPACE_SINFO_ID,/*free space sections */
- H5AC_SOHM_TABLE_ID, /*shared object header message master table */
- H5AC_SOHM_LIST_ID, /*shared message index stored as a list */
- H5AC_SUPERBLOCK_ID, /* file superblock */
- H5AC_TEST_ID, /*test entry -- not used for actual files */
- H5AC_NTYPES /* Number of types, must be last */
+ H5AC_BT_ID = 0, /*B-tree nodes */
+ H5AC_SNODE_ID, /*symbol table nodes */
+ H5AC_LHEAP_PRFX_ID, /*local heap prefix */
+ H5AC_LHEAP_DBLK_ID, /*local heap data block */
+ H5AC_GHEAP_ID, /*global heap */
+ H5AC_OHDR_ID, /*object header */
+ H5AC_OHDR_CHK_ID, /*object header chunk */
+ H5AC_BT2_HDR_ID, /*v2 B-tree header */
+ H5AC_BT2_INT_ID, /*v2 B-tree internal node */
+ H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */
+ H5AC_FHEAP_HDR_ID, /*fractal heap header */
+ H5AC_FHEAP_DBLOCK_ID, /*fractal heap direct block */
+ H5AC_FHEAP_IBLOCK_ID, /*fractal heap indirect block */
+ H5AC_FSPACE_HDR_ID, /*free space header */
+ H5AC_FSPACE_SINFO_ID, /*free space sections */
+ H5AC_SOHM_TABLE_ID, /*shared object header message master table */
+ H5AC_SOHM_LIST_ID, /*shared message index stored as a list */
+ H5AC_SUPERBLOCK_ID, /* file superblock */
+ H5AC_TEST_ID, /*test entry -- not used for actual files */
+ H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
/* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when
@@ -75,11 +75,11 @@ typedef enum {
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#else /* H5C_COLLECT_CACHE_STATS */
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -87,53 +87,51 @@ typedef enum {
* At present, these are the same as those given in H5Cprivate.h.
*/
-#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
-#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
-
+#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
+#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
/*
- * Class methods pertaining to caching. Each type of cached object will
+ * Class methods pertaining to caching. Each type of cached object will
* have a constant variable with permanent life-span that describes how
- * to cache the object. That variable will be of type H5AC_class_t and
+ * to cache the object. That variable will be of type H5AC_class_t and
* have the following required fields...
*
- * LOAD: Loads an object from disk to memory. The function
- * should allocate some data structure and return it.
+ * LOAD: Loads an object from disk to memory. The function
+ * should allocate some data structure and return it.
*
- * FLUSH: Writes some data structure back to disk. It would be
- * wise for the data structure to include dirty flags to
- * indicate whether it really needs to be written. This
- * function is also responsible for freeing memory allocated
- * by the LOAD method if the DEST argument is non-zero (by
+ * FLUSH: Writes some data structure back to disk. It would be
+ * wise for the data structure to include dirty flags to
+ * indicate whether it really needs to be written. This
+ * function is also responsible for freeing memory allocated
+ * by the LOAD method if the DEST argument is non-zero (by
* calling the DEST method).
*
- * DEST: Just frees memory allocated by the LOAD method.
+ * DEST: Just frees memory allocated by the LOAD method.
*
- * CLEAR: Just marks object as non-dirty.
+ * CLEAR: Just marks object as non-dirty.
*
- * SIZE: Report the size (on disk) of the specified cache object.
- * Note that the space allocated on disk may not be contiguous.
+ * SIZE: Report the size (on disk) of the specified cache object.
+ * Note that the space allocated on disk may not be contiguous.
*/
-#define H5AC_CALLBACK__NO_FLAGS_SET H5C_CALLBACK__NO_FLAGS_SET
-#define H5AC_CALLBACK__SIZE_CHANGED_FLAG H5C_CALLBACK__SIZE_CHANGED_FLAG
-#define H5AC_CALLBACK__MOVED_FLAG H5C_CALLBACK__MOVED_FLAG
-
-typedef H5C_load_func_t H5AC_load_func_t;
-typedef H5C_flush_func_t H5AC_flush_func_t;
-typedef H5C_dest_func_t H5AC_dest_func_t;
-typedef H5C_clear_func_t H5AC_clear_func_t;
-typedef H5C_size_func_t H5AC_size_func_t;
+#define H5AC_CALLBACK__NO_FLAGS_SET H5C_CALLBACK__NO_FLAGS_SET
+#define H5AC_CALLBACK__SIZE_CHANGED_FLAG H5C_CALLBACK__SIZE_CHANGED_FLAG
+#define H5AC_CALLBACK__MOVED_FLAG H5C_CALLBACK__MOVED_FLAG
-typedef H5C_class_t H5AC_class_t;
+typedef H5C_load_func_t H5AC_load_func_t;
+typedef H5C_flush_func_t H5AC_flush_func_t;
+typedef H5C_dest_func_t H5AC_dest_func_t;
+typedef H5C_clear_func_t H5AC_clear_func_t;
+typedef H5C_size_func_t H5AC_size_func_t;
+typedef H5C_class_t H5AC_class_t;
/* The H5AC_NSLOTS #define is now obsolete, as the metadata cache no longer
* uses slots. However I am leaving it in for now to avoid modifying the
* interface between the metadata cache and the rest of HDF. It should
* be removed when we get to dealing with the size_hint parameter in
* H5AC_create().
- * JRM - 5/20/04
+ * JRM - 5/20/04
*
* Old comment on H5AC_NSLOTS follows:
*
@@ -141,11 +139,9 @@ typedef H5C_class_t H5AC_class_t;
* cache entry by hashing the object's file address. Each file has its
* own cache, an array of slots.
*/
-#define H5AC_NSLOTS 10330 /* The library "likes" this number... */
-
-
-typedef H5C_cache_entry_t H5AC_info_t;
+#define H5AC_NSLOTS 10330 /* The library "likes" this number... */
+typedef H5C_cache_entry_t H5AC_info_t;
/*===----------------------------------------------------------------------===
* Protect Types
@@ -157,21 +153,20 @@ typedef H5C_cache_entry_t H5AC_info_t;
*/
typedef enum H5AC_protect_t {
- H5AC_WRITE, /* Protect object for writing */
- H5AC_READ /* Protect object for reading */
+ H5AC_WRITE, /* Protect object for writing */
+ H5AC_READ /* Protect object for reading */
} H5AC_protect_t;
-
/* Typedef for metadata cache (defined in H5Cpkg.h) */
-typedef H5C_t H5AC_t;
+typedef H5C_t H5AC_t;
/* Metadata specific properties for FAPL */
/* (Only used for parallel I/O) */
#ifdef H5_HAVE_PARALLEL
/* Definitions for "collective metadata write" property */
-#define H5AC_COLLECTIVE_META_WRITE_NAME "H5AC_collective_metadata_write"
-#define H5AC_COLLECTIVE_META_WRITE_SIZE sizeof(unsigned)
-#define H5AC_COLLECTIVE_META_WRITE_DEF 0
+#define H5AC_COLLECTIVE_META_WRITE_NAME "H5AC_collective_metadata_write"
+#define H5AC_COLLECTIVE_META_WRITE_SIZE sizeof(unsigned)
+#define H5AC_COLLECTIVE_META_WRITE_DEF 0
#endif /* H5_HAVE_PARALLEL */
/* Dataset transfer property list for flush calls */
@@ -183,14 +178,13 @@ extern hid_t H5AC_dxpl_id;
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable declaration, definition is in H5AC.c) */
extern H5P_genplist_t *H5AC_ind_dxpl_g;
-extern hid_t H5AC_ind_dxpl_id;
-
+extern hid_t H5AC_ind_dxpl_id;
/* Default cache configuration. */
-#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
+#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
+/* clang-format off */
#ifdef H5_HAVE_PARALLEL
#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
@@ -202,30 +196,30 @@ extern hid_t H5AC_ind_dxpl_id;
/* hbool_t evictions_enabled = */ TRUE, \
/* hbool_t set_initial_size = */ TRUE, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
- /* double min_clean_fraction = */ 0.3, \
+ /* double min_clean_fraction = */ 0.3f, \
/* size_t max_size = */ (32 * 1024 * 1024), \
/* size_t min_size = */ (1 * 1024 * 1024), \
/* long int epoch_length = */ 50000, \
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
- /* double lower_hr_threshold = */ 0.9F, \
- /* double increment = */ 2.0F, \
+ /* double lower_hr_threshold = */ 0.9f, \
+ /* double increment = */ 2.0f, \
/* hbool_t apply_max_increment = */ TRUE, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
- /* double flash_multiple = */ 1.0F, \
- /* double flash_threshold = */ 0.25F, \
+ /* double flash_multiple = */ 1.0f, \
+ /* double flash_threshold = */ 0.25f, \
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, \
- /* double upper_hr_threshold = */ H5_DOUBLE(0.999), \
- /* double decrement = */ 0.9F, \
+ /* double upper_hr_threshold = */ 0.999f, \
+ /* double decrement = */ 0.9f, \
/* hbool_t apply_max_decrement = */ TRUE, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
- /* double empty_reserve = */ 0.1F, \
- /* int dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* double empty_reserve = */ 0.1f, \
+ /* int dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#else /* H5_HAVE_PARALLEL */
#define H5AC__DEFAULT_CACHE_CONFIG \
@@ -238,34 +232,33 @@ extern hid_t H5AC_ind_dxpl_id;
/* hbool_t evictions_enabled = */ TRUE, \
/* hbool_t set_initial_size = */ TRUE, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
- /* double min_clean_fraction = */ 0.01F, \
+ /* double min_clean_fraction = */ 0.01f, \
/* size_t max_size = */ (32 * 1024 * 1024), \
/* size_t min_size = */ ( 1 * 1024 * 1024), \
/* long int epoch_length = */ 50000, \
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
- /* double lower_hr_threshold = */ 0.9F, \
- /* double increment = */ 2.0F, \
+ /* double lower_hr_threshold = */ 0.9f, \
+ /* double increment = */ 2.0f, \
/* hbool_t apply_max_increment = */ TRUE, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
- /* double flash_multiple = */ 1.4F, \
- /* double flash_threshold = */ 0.25F, \
+ /* double flash_multiple = */ 1.4f, \
+ /* double flash_threshold = */ 0.25f, \
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,\
- /* double upper_hr_threshold = */ H5_DOUBLE(0.999), \
- /* double decrement = */ 0.9F, \
+ /* double upper_hr_threshold = */ 0.999f, \
+ /* double decrement = */ 0.9f, \
/* hbool_t apply_max_decrement = */ TRUE, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
- /* double empty_reserve = */ 0.1F, \
- /* int dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* double empty_reserve = */ 0.1f, \
+ /* int dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#endif /* H5_HAVE_PARALLEL */
-
-
+/* clang-format on */
/*
* Library prototypes.
*/
@@ -275,93 +268,74 @@ extern hid_t H5AC_ind_dxpl_id;
* the equivalent flags from H5Cprivate.h.
*/
-#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
-#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
-#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
-#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
-#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
-#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
-#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
-#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
+#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
+#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
+#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
+#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
+#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
+#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
+#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
+#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
#define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG
#define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG
-#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
+#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
#define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG
-
/* #defines of flags used to report entry status in the
* H5AC_get_entry_status() call.
*/
-#define H5AC_ES__IN_CACHE 0x0001
-#define H5AC_ES__IS_DIRTY 0x0002
-#define H5AC_ES__IS_PROTECTED 0x0004
-#define H5AC_ES__IS_PINNED 0x0008
-
+#define H5AC_ES__IN_CACHE 0x0001
+#define H5AC_ES__IS_DIRTY 0x0002
+#define H5AC_ES__IS_PROTECTED 0x0004
+#define H5AC_ES__IS_PINNED 0x0008
/* external function declarations: */
H5_DLL herr_t H5AC_init(void);
H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC_get_entry_status(const H5F_t *f, haddr_t addr,
- unsigned * status_ptr);
-H5_DLL herr_t H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
- haddr_t addr, void *thing, unsigned int flags);
+H5_DLL herr_t H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status_ptr);
+H5_DLL herr_t H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing,
+ unsigned int flags);
H5_DLL herr_t H5AC_pin_protected_entry(void *thing);
-H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
- haddr_t addr, void *udata, H5AC_protect_t rw);
+H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *udata,
+ H5AC_protect_t rw);
H5_DLL herr_t H5AC_resize_entry(void *thing, size_t new_size);
H5_DLL herr_t H5AC_unpin_entry(void *thing);
-H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
- const H5AC_class_t *type, haddr_t addr,
- void *thing, unsigned flags);
+H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing,
+ unsigned flags);
H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id);
H5_DLL herr_t H5AC_mark_entry_dirty(void *thing);
-H5_DLL herr_t H5AC_move_entry(H5F_t *f, const H5AC_class_t *type,
- haddr_t old_addr, haddr_t new_addr);
+H5_DLL herr_t H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_addr);
H5_DLL herr_t H5AC_dest(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id,
- const H5AC_class_t *type, haddr_t addr,
+H5_DLL herr_t H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
unsigned flags);
H5_DLL herr_t H5AC_set_sync_point_done_callback(H5C_t *cache_ptr,
- void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl));
+ void (*sync_point_done)(int num_writes,
+ haddr_t *written_entries_tbl));
-H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
- void (* write_done)(void));
+H5_DLL herr_t H5AC_set_write_done_callback(H5C_t *cache_ptr, void (*write_done)(void));
H5_DLL herr_t H5AC_stats(const H5F_t *f);
H5_DLL herr_t H5AC_dump_cache(const H5F_t *f);
-H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
- H5AC_cache_config_t *config_ptr);
-
-H5_DLL herr_t H5AC_get_cache_size(H5AC_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr);
-
-H5_DLL herr_t H5AC_get_cache_hit_rate(H5AC_t * cache_ptr,
- double * hit_rate_ptr);
+H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5AC_get_cache_size(H5AC_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr,
+ size_t *cur_size_ptr, int32_t *cur_num_entries_ptr);
+H5_DLL herr_t H5AC_get_cache_hit_rate(H5AC_t *cache_ptr, double *hit_rate_ptr);
+H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr);
+H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr);
+H5_DLL herr_t H5AC_close_trace_file(H5AC_t *cache_ptr);
-H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
- H5AC_cache_config_t *config_ptr);
-
-H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t * config_ptr);
-
-H5_DLL herr_t H5AC_close_trace_file( H5AC_t * cache_ptr);
-
-H5_DLL herr_t H5AC_open_trace_file(H5AC_t * cache_ptr,
- const char * trace_file_name);
+H5_DLL herr_t H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name);
#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr);
+H5_DLL herr_t H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr);
#endif /* H5_HAVE_PARALLEL */
#endif /* !_H5ACprivate_H */
-
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index ceb225d..cab29e1 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,12 +15,10 @@
*
* Created: H5ACpublic.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public include file for cache functions.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5ACpublic_H
@@ -68,59 +66,62 @@ extern "C" {
* version number, or an error will be flagged.
*
* rpt_fcn_enabled: Boolean field used to enable and disable the default
- * reporting function. This function is invoked every time the
- * automatic cache resize code is run, and reports on its activities.
+ * reporting function. This function is invoked every time the
+ * automatic cache resize code is run, and reports on its activities.
*
- * This is a debugging function, and should normally be turned off.
+ * This is a debugging function, and should normally be turned off.
*
* open_trace_file: Boolean field indicating whether the trace_file_name
- * field should be used to open a trace file for the cache.
+ * field should be used to open a trace file for the cache.
+ *
*
- * The trace file is a debugging feature that allow the capture of
- * top level metadata cache requests for purposes of debugging and/or
- * optimization. This field should normally be set to FALSE, as
- * trace file collection imposes considerable overhead.
+ * The trace file is a debuging feature that allow the capture of
+ * top level metadata cache requests for purposes of debugging and/or
+ * optimization. This field should normally be set to FALSE, as
+ * trace file collection imposes considerable overhead.
*
- * This field should only be set to TRUE when the trace_file_name
- * contains the full path of the desired trace file, and either
- * there is no open trace file on the cache, or the close_trace_file
- * field is also TRUE.
+ * This field should only be set to TRUE when the trace_file_name
+ * contains the full path of the desired trace file, and either
+ * there is no open trace file on the cache, or the close_trace_file
+ * field is also TRUE.
*
* close_trace_file: Boolean field indicating whether the current trace
- * file (if any) should be closed.
+ * file (if any) should be closed.
+ *
*
- * See the above comments on the open_trace_file field. This field
- * should be set to FALSE unless there is an open trace file on the
- * cache that you wish to close.
+ * See the above comments on the open_trace_file field. This field
+ * should be set to FALSE unless there is an open trace file on the
+ * cache that you wish to close.
*
* trace_file_name: Full path of the trace file to be opened if the
- * open_trace_file field is TRUE.
+ * open_trace_file field is TRUE.
*
- * In the parallel case, an ascii representation of the mpi rank of
- * the process will be appended to the file name to yield a unique
- * trace file name for each process.
*
- * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN
- * characters.
+ * In the parallel case, an ascii representation of the mpi rank of
+ * the process will be appended to the file name to yield a unique
+ * trace file name for each process.
+ *
+ * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN
+ * characters.
*
* evictions_enabled: Boolean field used to either report the current
- * evictions enabled status of the cache, or to set the cache's
- * evictions enabled status.
- *
- * In general, the metadata cache should always be allowed to
- * evict entries. However, in some cases it is advantageous to
- * disable evictions briefly, and thereby postpone metadata
- * writes. However, this must be done with care, as the cache
- * can grow quickly. If you do this, re-enable evictions as
- * soon as possible and monitor cache size.
- *
- * At present, evictions can only be disabled if automatic
- * cache resizing is also disabled (that is, ( incr_mode ==
- * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There
- * is no logical reason why this should be so, but it simplifies
- * implementation and testing, and I can't think of any reason
- * why it would be desireable. If you can think of one, I'll
- * revisit the issue.
+ * evictions enabled status of the cache, or to set the cache's
+ * evictions enabled status.
+ *
+ * In general, the metadata cache should always be allowed to
+ * evict entries. However, in some cases it is advantageous to
+ * disable evictions briefly, and thereby postpone metadata
+ * writes. However, this must be done with care, as the cache
+ * can grow quickly. If you do this, re-enable evictions as
+ * soon as possible and monitor cache size.
+ *
+ * At present, evictions can only be disabled if automatic
+ * cache resizing is also disabled (that is, ( incr_mode ==
+ * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There
+ * is no logical reason why this should be so, but it simplifies
+ * implementation and testing, and I can't think of any reason
+ * why it would be desireable. If you can think of one, I'll
+ * revisit the issue.
*
* set_initial_size: Boolean flag indicating whether the size of the
* initial size of the cache is to be set to the value given in
@@ -360,146 +361,141 @@ extern "C" {
*
* PHDF5 uses several strategies to prevent such inconsistencies in metadata,
* all of which use the fact that the same stream of dirty metadata is seen
- * by all processes for purposes of synchronization. This is done by
+ * by all processes for purposes of synchronization. This is done by
* having each process count the number of bytes of dirty metadata generated,
- * and then running a "sync point" whenever this count exceeds a user
+ * and then running a "sync point" whenever this count exceeds a user
* specified threshold (see dirty_bytes_threshold below).
*
- * The current metadata write strategy is indicated by the
+ * The current metadata write strategy is indicated by the
* metadata_write_strategy field. The possible values of this field, along
* with the associated metadata write strategies are discussed below.
*
* dirty_bytes_threshold: Threshold of dirty byte creation used to
- * synchronize updates between caches. (See above for outline and
- * motivation.)
+ * synchronize updates between caches. (See above for outline and
+ * motivation.)
*
- * This value MUST be consistant across all processes accessing the
- * file. This field is ignored unless HDF5 has been compiled for
- * parallel.
+ * This value MUST be consistent across all processes accessing the
+ * file. This field is ignored unless HDF5 has been compiled for
+ * parallel.
*
* metadata_write_strategy: Integer field containing a code indicating the
- * desired metadata write strategy. The valid values of this field
- * are enumerated and discussed below:
+ * desired metadata write strategy. The valid values of this field
+ * are enumerated and discussed below:
+ *
*
+ * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
*
- * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
+ * When metadata_write_strategy is set to this value, only process
+ * zero is allowed to write dirty metadata to disk. All other
+ * processes must retain dirty metadata until they are informed at
+ * a sync point that the dirty metadata in question has been written
+ * to disk.
*
- * When metadata_write_strategy is set to this value, only process
- * zero is allowed to write dirty metadata to disk. All other
- * processes must retain dirty metadata until they are informed at
- * a sync point that the dirty metadata in question has been written
- * to disk.
+ * When the sync point is reached (or when there is a user generated
+ * flush), process zero flushes sufficient entries to bring it into
+ * complience with its min clean size (or flushes all dirty entries in
+ * the case of a user generated flush), broad casts the list of
+ * entries just cleaned to all the other processes, and then exits
+ * the sync point.
*
- * When the sync point is reached (or when there is a user generated
- * flush), process zero flushes sufficient entries to bring it into
- * complience with its min clean size (or flushes all dirty entries in
- * the case of a user generated flush), broad casts the list of
- * entries just cleaned to all the other processes, and then exits
- * the sync point.
+ * Upon receipt of the broadcast, the other processes mark the indicated
+ * entries as clean, and leave the sync point as well.
*
- * Upon receipt of the broadcast, the other processes mark the indicated
- * entries as clean, and leave the sync point as well.
*
+ * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
*
- * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
+ * In the distributed metadata write strategy, process zero still makes
+ * the decisions as to what entries should be flushed, but the actual
+ * flushes are distributed across the processes in the computation to
+ * the extent possible.
*
- * In the distributed metadata write strategy, process zero still makes
- * the decisions as to what entries should be flushed, but the actual
- * flushes are distributed across the processes in the computation to
- * the extent possible.
+ * In this strategy, when a sync point is triggered (either by dirty
+ * metadata creation or manual flush), all processes enter a barrier.
*
- * In this strategy, when a sync point is triggered (either by dirty
- * metadata creation or manual flush), all processes enter a barrier.
+ * On the other side of the barrier, process 0 constructs an ordered
+ * list of the entries to be flushed, and then broadcasts this list
+ * to the caches in all the processes.
*
- * On the other side of the barrier, process 0 constructs an ordered
- * list of the entries to be flushed, and then broadcasts this list
- * to the caches in all the processes.
+ * All processes then scan the list of entries to be flushed, flushing
+ * some, and marking the rest as clean. The algorithm for this purpose
+ * ensures that each entry in the list is flushed exactly once, and
+ * all are marked clean in each cache.
*
- * All processes then scan the list of entries to be flushed, flushing
- * some, and marking the rest as clean. The algorithm for this purpose
- * ensures that each entry in the list is flushed exactly once, and
- * all are marked clean in each cache.
+ * Note that in the case of a flush of the cache, no message passing
+ * is necessary, as all processes have the same list of dirty entries,
+ * and all of these entries must be flushed. Thus in this case it is
+ * sufficient for each process to sort its list of dirty entries after
+ * leaving the initial barrier, and use this list as if it had been
+ * received from process zero.
*
- * Note that in the case of a flush of the cache, no message passing
- * is necessary, as all processes have the same list of dirty entries,
- * and all of these entries must be flushed. Thus in this case it is
- * sufficient for each process to sort its list of dirty entries after
- * leaving the initial barrier, and use this list as if it had been
- * received from process zero.
+ * To avoid possible messages from the past/future, all caches must
+ * wait until all caches are done before leaving the sync point.
*
- * To avoid possible messages from the past/future, all caches must
- * wait until all caches are done before leaving the sync point.
- *
****************************************************************************/
-#define H5AC__CURR_CACHE_CONFIG_VERSION 1
-#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024
+#define H5AC__CURR_CACHE_CONFIG_VERSION 1
+#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024
-#define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0
-#define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1
+#define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0
+#define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1
-typedef struct H5AC_cache_config_t
-{
+typedef struct H5AC_cache_config_t {
/* general configuration fields: */
- int version;
+ int version;
- hbool_t rpt_fcn_enabled;
+ hbool_t rpt_fcn_enabled;
- hbool_t open_trace_file;
- hbool_t close_trace_file;
- char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1];
+ hbool_t open_trace_file;
+ hbool_t close_trace_file;
+ char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1];
- hbool_t evictions_enabled;
+ hbool_t evictions_enabled;
- hbool_t set_initial_size;
- size_t initial_size;
+ hbool_t set_initial_size;
+ size_t initial_size;
- double min_clean_fraction;
+ double min_clean_fraction;
- size_t max_size;
- size_t min_size;
-
- long int epoch_length;
+ size_t max_size;
+ size_t min_size;
+ long int epoch_length;
/* size increase control fields: */
enum H5C_cache_incr_mode incr_mode;
- double lower_hr_threshold;
-
- double increment;
+ double lower_hr_threshold;
- hbool_t apply_max_increment;
- size_t max_increment;
+ double increment;
- enum H5C_cache_flash_incr_mode flash_incr_mode;
- double flash_multiple;
- double flash_threshold;
+ hbool_t apply_max_increment;
+ size_t max_increment;
+ enum H5C_cache_flash_incr_mode flash_incr_mode;
+ double flash_multiple;
+ double flash_threshold;
/* size decrease control fields: */
enum H5C_cache_decr_mode decr_mode;
- double upper_hr_threshold;
+ double upper_hr_threshold;
- double decrement;
+ double decrement;
- hbool_t apply_max_decrement;
- size_t max_decrement;
+ hbool_t apply_max_decrement;
+ size_t max_decrement;
- int epochs_before_eviction;
-
- hbool_t apply_empty_reserve;
- double empty_reserve;
+ int epochs_before_eviction;
+ hbool_t apply_empty_reserve;
+ double empty_reserve;
/* parallel configuration fields: */
- int dirty_bytes_threshold;
- int metadata_write_strategy;
+ int dirty_bytes_threshold;
+ int metadata_write_strategy;
} H5AC_cache_config_t;
-
#ifdef __cplusplus
}
#endif
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 318c60d..68ec524 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Abtree2.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing attributes on objects
*
@@ -26,23 +26,20 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5SMprivate.h" /* Shared object header messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -53,23 +50,21 @@
*/
typedef struct H5A_fh_ud_cmp_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- const char *name; /* Name of attribute to compare */
- const H5A_dense_bt2_name_rec_t *record; /* v2 B-tree record for attribute */
- H5A_bt2_found_t found_op; /* Callback when correct attribute is found */
- void *found_op_data; /* Callback data when correct attribute is found */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ const char * name; /* Name of attribute to compare */
+ const H5A_dense_bt2_name_rec_t *record; /* v2 B-tree record for attribute */
+ H5A_bt2_found_t found_op; /* Callback when correct attribute is found */
+ void * found_op_data; /* Callback data when correct attribute is found */
/* upward */
- int cmp; /* Comparison of two attribute names */
+ int cmp; /* Comparison of two attribute names */
} H5A_fh_ud_cmp_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -79,74 +74,67 @@ typedef struct H5A_fh_ud_cmp_t {
/* v2 B-tree driver callbacks for 'creation order' index */
static herr_t H5A_dense_btree2_corder_store(void *native, const void *udata);
static herr_t H5A_dense_btree2_corder_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5A_dense_btree2_corder_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5A_dense_btree2_corder_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5A_dense_btree2_corder_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5A_dense_btree2_corder_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent,
+ int fwidth, const void *record, const void *_udata);
/* v2 B-tree driver callbacks for 'name' index */
static herr_t H5A_dense_btree2_name_store(void *native, const void *udata);
static herr_t H5A_dense_btree2_name_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5A_dense_btree2_name_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5A_dense_btree2_name_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5A_dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5A_dense_btree2_name_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5A_dense_btree2_name_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5A_dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent, int fwidth,
+ const void *record, const void *_udata);
/* Fractal heap function callbacks */
static herr_t H5A_dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
-
/*********************/
/* Package Variables */
/*********************/
/* v2 B-tree class for indexing 'name' field of attributes */
-const H5B2_class_t H5A_BT2_NAME[1]={{ /* B-tree class information */
- H5B2_ATTR_DENSE_NAME_ID, /* Type of B-tree */
- "H5B2_ATTR_DENSE_NAME_ID", /* Name of B-tree class */
- sizeof(H5A_dense_bt2_name_rec_t), /* Size of native record */
- NULL, /* Create client callback context */
- NULL, /* Destroy client callback context */
- H5A_dense_btree2_name_store, /* Record storage callback */
- H5A_dense_btree2_name_compare, /* Record comparison callback */
- H5A_dense_btree2_name_encode, /* Record encoding callback */
- H5A_dense_btree2_name_decode, /* Record decoding callback */
- H5A_dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+const H5B2_class_t H5A_BT2_NAME[1] = {{
+ /* B-tree class information */
+ H5B2_ATTR_DENSE_NAME_ID, /* Type of B-tree */
+ "H5B2_ATTR_DENSE_NAME_ID", /* Name of B-tree class */
+ sizeof(H5A_dense_bt2_name_rec_t), /* Size of native record */
+ NULL, /* Create client callback context */
+ NULL, /* Destroy client callback context */
+ H5A_dense_btree2_name_store, /* Record storage callback */
+ H5A_dense_btree2_name_compare, /* Record comparison callback */
+ H5A_dense_btree2_name_encode, /* Record encoding callback */
+ H5A_dense_btree2_name_decode, /* Record decoding callback */
+ H5A_dense_btree2_name_debug, /* Record debugging callback */
+ NULL, /* Create debugging context */
+ NULL /* Destroy debugging context */
}};
/* v2 B-tree class for indexing 'creation order' field of attributes */
-const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
- H5B2_ATTR_DENSE_CORDER_ID, /* Type of B-tree */
- "H5B2_ATTR_DENSE_CORDER_ID", /* Name of B-tree class */
- sizeof(H5A_dense_bt2_corder_rec_t),/* Size of native record */
- NULL, /* Create client callback context */
- NULL, /* Destroy client callback context */
- H5A_dense_btree2_corder_store, /* Record storage callback */
- H5A_dense_btree2_corder_compare, /* Record comparison callback */
- H5A_dense_btree2_corder_encode, /* Record encoding callback */
- H5A_dense_btree2_corder_decode, /* Record decoding callback */
- H5A_dense_btree2_corder_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+const H5B2_class_t H5A_BT2_CORDER[1] = {{
+ /* B-tree class information */
+ H5B2_ATTR_DENSE_CORDER_ID, /* Type of B-tree */
+ "H5B2_ATTR_DENSE_CORDER_ID", /* Name of B-tree class */
+ sizeof(H5A_dense_bt2_corder_rec_t), /* Size of native record */
+ NULL, /* Create client callback context */
+ NULL, /* Destroy client callback context */
+ H5A_dense_btree2_corder_store, /* Record storage callback */
+ H5A_dense_btree2_corder_compare, /* Record comparison callback */
+ H5A_dense_btree2_corder_encode, /* Record encoding callback */
+ H5A_dense_btree2_corder_decode, /* Record decoding callback */
+ H5A_dense_btree2_corder_debug, /* Record debugging callback */
+ NULL, /* Create debugging context */
+ NULL /* Destroy debugging context */
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_fh_name_cmp
*
@@ -156,7 +144,6 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
@@ -164,43 +151,43 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
static herr_t
H5A_dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
{
- H5A_fh_ud_cmp_t *udata = (H5A_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
- H5A_t *attr = NULL; /* Pointer to attribute created from heap object */
- hbool_t took_ownership = FALSE; /* Whether the "found" operator took ownership of the attribute */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_fh_ud_cmp_t *udata = (H5A_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
+ H5A_t * attr = NULL; /* Pointer to attribute created from heap object */
+ hbool_t took_ownership = FALSE; /* Whether the "found" operator took ownership of the attribute */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode attribute information */
- if(NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't decode attribute")
/* Compare the string values */
udata->cmp = HDstrcmp(udata->name, attr->shared->name);
/* Check for correct attribute & callback to make */
- if(udata->cmp == 0 && udata->found_op) {
+ if (udata->cmp == 0 && udata->found_op) {
/* Check whether we should "reconstitute" the shared message info */
- if(udata->record->flags & H5O_MSG_FLAG_SHARED)
+ if (udata->record->flags & H5O_MSG_FLAG_SHARED)
H5SM_reconstitute(&(attr->sh_loc), udata->f, H5O_ATTR_ID, udata->record->id);
/* Set the creation order index for the attribute */
attr->shared->crt_idx = udata->record->corder;
/* Make callback */
- if((udata->found_op)(attr, &took_ownership, udata->found_op_data) < 0)
+ if ((udata->found_op)(attr, &took_ownership, udata->found_op_data) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPERATE, FAIL, "attribute found callback failed")
} /* end if */
done:
/* Release the space allocated for the attrbute */
- if(attr && !took_ownership)
+ if (attr && !took_ownership)
H5O_msg_free(H5O_ATTR_ID, attr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_fh_name_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_name_store
*
@@ -217,21 +204,20 @@ done:
static herr_t
H5A_dense_btree2_name_store(void *_nrecord, const void *_udata)
{
- const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata;
+ const H5A_bt2_ud_ins_t * udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Copy user information info native record */
- nrecord->id = udata->id;
- nrecord->flags = udata->common.flags;
+ nrecord->id = udata->id;
+ nrecord->flags = udata->common.flags;
nrecord->corder = udata->common.corder;
- nrecord->hash = udata->common.name_hash;
+ nrecord->hash = udata->common.name_hash;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_store() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_name_compare
*
@@ -249,9 +235,9 @@ H5A_dense_btree2_name_store(void *_nrecord, const void *_udata)
static herr_t
H5A_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
{
- const H5A_bt2_ud_common_t *bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata;
- const H5A_dense_bt2_name_rec_t *bt2_rec = (const H5A_dense_bt2_name_rec_t *)_bt2_rec;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5A_bt2_ud_common_t * bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata;
+ const H5A_dense_bt2_name_rec_t *bt2_rec = (const H5A_dense_bt2_name_rec_t *)_bt2_rec;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -260,38 +246,38 @@ H5A_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
HDassert(bt2_rec);
/* Check hash value */
- if(bt2_udata->name_hash < bt2_rec->hash)
+ if (bt2_udata->name_hash < bt2_rec->hash)
*result = (-1);
- else if(bt2_udata->name_hash > bt2_rec->hash)
+ else if (bt2_udata->name_hash > bt2_rec->hash)
*result = 1;
else {
- H5A_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
- H5HF_t *fheap; /* Fractal heap handle to use for finding object */
+ H5A_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5HF_t * fheap; /* Fractal heap handle to use for finding object */
/* Sanity check */
HDassert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
- fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.name = bt2_udata->name;
- fh_udata.record = bt2_rec;
- fh_udata.found_op = bt2_udata->found_op;
+ fh_udata.f = bt2_udata->f;
+ fh_udata.dxpl_id = bt2_udata->dxpl_id;
+ fh_udata.name = bt2_udata->name;
+ fh_udata.record = bt2_rec;
+ fh_udata.found_op = bt2_udata->found_op;
fh_udata.found_op_data = bt2_udata->found_op_data;
/* up */
fh_udata.cmp = 0;
/* Check for attribute in shared storage */
- if(bt2_rec->flags & H5O_MSG_FLAG_SHARED)
+ if (bt2_rec->flags & H5O_MSG_FLAG_SHARED)
fheap = bt2_udata->shared_fheap;
else
fheap = bt2_udata->fheap;
HDassert(fheap);
/* Check if the user's attribute and the B-tree's attribute have the same name */
- if(H5HF_op(fheap, bt2_udata->dxpl_id, &bt2_rec->id, H5A_dense_fh_name_cmp, &fh_udata) < 0)
+ if (H5HF_op(fheap, bt2_udata->dxpl_id, &bt2_rec->id, H5A_dense_fh_name_cmp, &fh_udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
/* Callback will set comparison value */
@@ -302,7 +288,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_dense_btree2_name_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_name_encode
*
@@ -333,7 +318,6 @@ H5A_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_name_decode
*
@@ -364,7 +348,6 @@ H5A_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_name_debug
*
@@ -380,20 +363,19 @@ H5A_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
*/
static herr_t
H5A_dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth,
- "Record:",
- (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder, (unsigned long)nrecord->hash);
+ "Record:", (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder,
+ (unsigned long)nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_corder_store
*
@@ -410,20 +392,19 @@ H5A_dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H
static herr_t
H5A_dense_btree2_corder_store(void *_nrecord, const void *_udata)
{
- const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata;
+ const H5A_bt2_ud_ins_t * udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Copy user information info native record */
- nrecord->id = udata->id;
- nrecord->flags = udata->common.flags;
+ nrecord->id = udata->id;
+ nrecord->flags = udata->common.flags;
nrecord->corder = udata->common.corder;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_corder_store() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_corder_compare
*
@@ -441,8 +422,8 @@ H5A_dense_btree2_corder_store(void *_nrecord, const void *_udata)
static herr_t
H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
{
- const H5A_bt2_ud_common_t *bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata;
- const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec;
+ const H5A_bt2_ud_common_t * bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata;
+ const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -451,9 +432,9 @@ H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, in
HDassert(bt2_rec);
/* Check creation order value */
- if(bt2_udata->corder < bt2_rec->corder)
+ if (bt2_udata->corder < bt2_rec->corder)
*result = -1;
- else if(bt2_udata->corder > bt2_rec->corder)
+ else if (bt2_udata->corder > bt2_rec->corder)
*result = 1;
else
*result = 0;
@@ -461,7 +442,6 @@ H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, in
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_corder_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_corder_encode
*
@@ -491,7 +471,6 @@ H5A_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_corder_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_corder_decode
*
@@ -521,7 +500,6 @@ H5A_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_corder_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_btree2_corder_debug
*
@@ -537,16 +515,14 @@ H5A_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
*/
static herr_t
H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth,
- "Record:",
- (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder);
+ HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth, "Record:", (hsize_t)nrecord->id.val,
+ (unsigned)nrecord->flags, (unsigned)nrecord->corder);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_corder_debug() */
-
diff --git a/src/H5Adense.c b/src/H5Adense.c
index ab159ff..3414921 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Adense.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for operating on "dense" attribute storage
* for an object.
@@ -27,39 +27,36 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared object header messages */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared object header messages */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* v2 B-tree creation macros for 'name' field index */
-#define H5A_NAME_BT2_NODE_SIZE 512
-#define H5A_NAME_BT2_MERGE_PERC 40
-#define H5A_NAME_BT2_SPLIT_PERC 100
+#define H5A_NAME_BT2_NODE_SIZE 512
+#define H5A_NAME_BT2_MERGE_PERC 40
+#define H5A_NAME_BT2_SPLIT_PERC 100
/* v2 B-tree creation macros for 'corder' field index */
-#define H5A_CORDER_BT2_NODE_SIZE 512
-#define H5A_CORDER_BT2_MERGE_PERC 40
-#define H5A_CORDER_BT2_SPLIT_PERC 100
+#define H5A_CORDER_BT2_NODE_SIZE 512
+#define H5A_CORDER_BT2_MERGE_PERC 40
+#define H5A_CORDER_BT2_SPLIT_PERC 100
/* Size of stack buffer for serialized attributes */
-#define H5A_ATTR_BUF_SIZE 128
-
+#define H5A_ATTR_BUF_SIZE 128
/******************/
/* Local Typedefs */
@@ -71,12 +68,12 @@
*/
typedef struct H5A_bt2_od_wrt_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle to operate on */
- H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
- H5A_t *attr; /* Attribute to write */
- haddr_t corder_bt2_addr; /* v2 B-tree address of creation order index */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t *fheap; /* Fractal heap handle to operate on */
+ H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
+ H5A_t * attr; /* Attribute to write */
+ haddr_t corder_bt2_addr; /* v2 B-tree address of creation order index */
} H5A_bt2_od_wrt_t;
/*
@@ -85,20 +82,20 @@ typedef struct H5A_bt2_od_wrt_t {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
- hsize_t count; /* # of attributes examined */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t *fheap; /* Fractal heap handle */
+ H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
+ hsize_t count; /* # of attributes examined */
/* downward (from application) */
- hid_t loc_id; /* Object ID for application callback */
- hsize_t skip; /* Number of attributes to skip */
- const H5A_attr_iter_op_t *attr_op; /* Callback for each attribute */
- void *op_data; /* Callback data for each attribute */
+ hid_t loc_id; /* Object ID for application callback */
+ hsize_t skip; /* Number of attributes to skip */
+ const H5A_attr_iter_op_t *attr_op; /* Callback for each attribute */
+ void * op_data; /* Callback data for each attribute */
/* upward */
- int op_ret; /* Return value from callback */
+ int op_ret; /* Return value from callback */
} H5A_bt2_ud_it_t;
/*
@@ -108,12 +105,12 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- const H5A_dense_bt2_name_rec_t *record; /* v2 B-tree record for attribute */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ const H5A_dense_bt2_name_rec_t *record; /* v2 B-tree record for attribute */
/* upward */
- H5A_t *attr; /* Copy of attribute */
+ H5A_t *attr; /* Copy of attribute */
} H5A_fh_ud_cp_t;
/*
@@ -122,8 +119,8 @@ typedef struct {
*/
typedef struct H5A_bt2_ud_rm_t {
/* downward */
- H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
- haddr_t corder_bt2_addr; /* v2 B-tree address of creation order index */
+ H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
+ haddr_t corder_bt2_addr; /* v2 B-tree address of creation order index */
} H5A_bt2_ud_rm_t;
/*
@@ -132,50 +129,42 @@ typedef struct H5A_bt2_ud_rm_t {
*/
typedef struct H5A_bt2_ud_rmbi_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
- H5_index_t idx_type; /* Index type for operation */
- haddr_t other_bt2_addr; /* v2 B-tree address of "other" index */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t * fheap; /* Fractal heap handle */
+ H5HF_t * shared_fheap; /* Fractal heap handle for shared messages */
+ H5_index_t idx_type; /* Index type for operation */
+ haddr_t other_bt2_addr; /* v2 B-tree address of "other" index */
} H5A_bt2_ud_rmbi_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_create
+ * Function: H5A_dense_create
*
- * Purpose: Creates dense attribute storage structures for an object
+ * Purpose: Creates dense attribute storage structures for an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
@@ -185,120 +174,104 @@ H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
{
H5HF_create_t fheap_cparam; /* Fractal heap creation parameters */
H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for names */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for names */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
/* Set fractal heap creation parameters */
-/* XXX: Give some control of these to applications? */
+ /* XXX: Give some control of these to applications? */
HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
- fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
+ fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
- fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
- fheap_cparam.managed.max_index = H5O_FHEAP_MAN_MAX_INDEX;
- fheap_cparam.managed.start_root_rows = H5O_FHEAP_MAN_START_ROOT_ROWS;
- fheap_cparam.checksum_dblocks = H5O_FHEAP_CHECKSUM_DBLOCKS;
- fheap_cparam.max_man_size = H5O_FHEAP_MAX_MAN_SIZE;
+ fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
+ fheap_cparam.managed.max_index = H5O_FHEAP_MAN_MAX_INDEX;
+ fheap_cparam.managed.start_root_rows = H5O_FHEAP_MAN_START_ROOT_ROWS;
+ fheap_cparam.checksum_dblocks = H5O_FHEAP_CHECKSUM_DBLOCKS;
+ fheap_cparam.max_man_size = H5O_FHEAP_MAX_MAN_SIZE;
/* Create fractal heap for storing attributes */
- if(NULL == (fheap = H5HF_create(f, dxpl_id, &fheap_cparam)))
+ if (NULL == (fheap = H5HF_create(f, dxpl_id, &fheap_cparam)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create fractal heap")
/* Retrieve the heap's address in the file */
- if(H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0)
+ if (H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
-#endif /* QAK */
#ifndef NDEBUG
-{
- size_t fheap_id_len; /* Fractal heap ID length */
-
- /* Retrieve the heap's ID length in the file */
- if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
-#ifdef QAK
-HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
-#endif /* QAK */
-}
+ {
+ size_t fheap_id_len; /* Fractal heap ID length */
+
+ /* Retrieve the heap's ID length in the file */
+ if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
+ HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
+ }
#endif /* NDEBUG */
/* Create the name index v2 B-tree */
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
- bt2_cparam.cls = H5A_BT2_NAME;
+ bt2_cparam.cls = H5A_BT2_NAME;
bt2_cparam.node_size = (size_t)H5A_NAME_BT2_NODE_SIZE;
- bt2_cparam.rrec_size = 4 + /* Name's hash value */
- 4 + /* Creation order index */
- 1 + /* Message flags */
- H5O_FHEAP_ID_LEN; /* Fractal heap ID */
+ bt2_cparam.rrec_size = 4 + /* Name's hash value */
+ 4 + /* Creation order index */
+ 1 + /* Message flags */
+ H5O_FHEAP_ID_LEN; /* Fractal heap ID */
bt2_cparam.split_percent = H5A_NAME_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5A_NAME_BT2_MERGE_PERC;
- if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
+ if (NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index")
/* Retrieve the v2 B-tree's address in the file */
- if(H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0)
+ if (H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr);
-#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
- if(ainfo->index_corder) {
+ if (ainfo->index_corder) {
/* Create the creation order index v2 B-tree */
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
- bt2_cparam.cls = H5A_BT2_CORDER;
+ bt2_cparam.cls = H5A_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5A_CORDER_BT2_NODE_SIZE;
- bt2_cparam.rrec_size = 4 + /* Creation order index */
- 1 + /* Message flags */
- H5O_FHEAP_ID_LEN; /* Fractal heap ID */
+ bt2_cparam.rrec_size = 4 + /* Creation order index */
+ 1 + /* Message flags */
+ H5O_FHEAP_ID_LEN; /* Fractal heap ID */
bt2_cparam.split_percent = H5A_CORDER_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5A_CORDER_BT2_MERGE_PERC;
- if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
+ if (NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index")
/* Retrieve the v2 B-tree's address in the file */
- if(H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0)
+ if (H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->corder_bt2_addr = %a\n", FUNC, ainfo->corder_bt2_addr);
-#endif /* QAK */
} /* end if */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_create() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_fnd_cb
+ * Function: H5A__dense_fnd_cb
*
- * Purpose: Callback when an attribute is located in an index
+ * Purpose: Callback when an attribute is located in an index
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -309,166 +282,156 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
FUNC_ENTER_STATIC_NOERR
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(attr);
HDassert(user_attr);
/* Take over attribute ownership */
- *user_attr = attr;
+ *user_attr = attr;
*took_ownership = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A__dense_fnd_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_open
+ * Function: H5A_dense_open
*
- * Purpose: Open an attribute in dense storage structures for an object
+ * Purpose: Open an attribute in dense storage structures for an object
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
H5A_t *
H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name)
{
- H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- htri_t attr_exists; /* Attribute exists in v2 B-tree */
- H5A_t *ret_value = NULL; /* Return value */
+ H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ htri_t attr_exists; /* Attribute exists in v2 B-tree */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(name);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap")
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record find */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = shared_fheap;
- udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.flags = 0;
- udata.corder = 0;
- udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = shared_fheap;
+ udata.name = name;
+ udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.flags = 0;
+ udata.corder = 0;
+ udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.found_op_data = &ret_value;
/* Find & copy the attribute in the 'name' index */
- if((attr_exists = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
+ if ((attr_exists = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't search for attribute in name index")
- else if(attr_exists == FALSE)
+ else if (attr_exists == FALSE)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute in name index")
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, NULL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, NULL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, NULL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_insert
+ * Function: H5A_dense_insert
*
- * Purpose: Insert an attribute into dense storage structures for an object
+ * Purpose: Insert an attribute into dense storage structures for an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 4 2006
+ * Programmer: Quincey Koziol
+ * Dec 4 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
{
- H5A_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */
- H5HF_t *fheap = NULL; /* Fractal heap handle for attributes */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
- uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing message */
- unsigned mesg_flags = 0; /* Flags for storing message */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */
+ H5HF_t * fheap = NULL; /* Fractal heap handle for attributes */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ H5WB_t * wb = NULL; /* Wrapped buffer for attribute data */
+ uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing message */
+ unsigned mesg_flags = 0; /* Flags for storing message */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(attr);
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
- htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
/* Check if message is already shared */
- if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) < 0)
+ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared")
- else if(shared_mesg > 0)
+ else if (shared_mesg > 0)
/* Mark the message as shared */
mesg_flags |= H5O_MSG_FLAG_SHARED;
else {
/* Should this attribute be written as a SOHM? */
- if(H5SM_try_share(f, dxpl_id, NULL, 0, H5O_ATTR_ID, attr, &mesg_flags) < 0)
+ if (H5SM_try_share(f, dxpl_id, NULL, 0, H5O_ATTR_ID, attr, &mesg_flags) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Attributes can't be "unique be shareable" yet */
@@ -476,23 +439,23 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
} /* end else */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Check for inserting shared attribute */
- if(mesg_flags & H5O_MSG_FLAG_SHARED) {
+ if (mesg_flags & H5O_MSG_FLAG_SHARED) {
/* Sanity check */
HDassert(attr_sharable);
@@ -500,91 +463,89 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
udata.id = attr->sh_loc.u.heap_id;
} /* end if */
else {
- void *attr_ptr; /* Pointer to serialized message */
- size_t attr_size; /* Size of serialized attribute in the heap */
+ void * attr_ptr; /* Pointer to serialized message */
+ size_t attr_size; /* Size of serialized attribute in the heap */
/* Find out the size of buffer needed for serialized message */
- if((attr_size = H5O_msg_raw_size(f, H5O_ATTR_ID, FALSE, attr)) == 0)
+ if ((attr_size = H5O_msg_raw_size(f, H5O_ATTR_ID, FALSE, attr)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get message size")
/* Wrap the local buffer for serialized attributes */
- if(NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf))))
+ if (NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf))))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for attribute */
- if(NULL == (attr_ptr = H5WB_actual(wb, attr_size)))
+ if (NULL == (attr_ptr = H5WB_actual(wb, attr_size)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Create serialized form of attribute or shared message */
- if(H5O_msg_encode(f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, attr) < 0)
+ if (H5O_msg_encode(f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute")
/* Insert the serialized attribute into the fractal heap */
/* (sets the heap ID in the user data) */
- if(H5HF_insert(fheap, dxpl_id, attr_size, attr_ptr, &udata.id) < 0)
+ if (H5HF_insert(fheap, dxpl_id, attr_size, attr_ptr, &udata.id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert attribute into fractal heap")
} /* end else */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the callback information for v2 B-tree record insertion */
- udata.common.f = f;
- udata.common.dxpl_id = dxpl_id;
- udata.common.fheap = fheap;
+ udata.common.f = f;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.fheap = fheap;
udata.common.shared_fheap = shared_fheap;
- udata.common.name = attr->shared->name;
- udata.common.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
+ udata.common.name = attr->shared->name;
+ udata.common.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
H5_CHECKED_ASSIGN(udata.common.flags, uint8_t, mesg_flags, unsigned);
- udata.common.corder = attr->shared->crt_idx;
- udata.common.found_op = NULL;
+ udata.common.corder = attr->shared->crt_idx;
+ udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
/* udata.id already set */
/* Insert attribute into 'name' tracking v2 B-tree */
- if(H5B2_insert(bt2_name, dxpl_id, &udata) < 0)
+ if (H5B2_insert(bt2_name, dxpl_id, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree")
/* Check if we should create a creation order index v2 B-tree record */
- if(ainfo->index_corder) {
+ if (ainfo->index_corder) {
/* Open the creation order index v2 B-tree */
HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo->corder_bt2_addr, NULL)))
+ if (NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Insert the record into the creation order index v2 B-tree */
- if(H5B2_insert(bt2_corder, dxpl_id, &udata) < 0)
+ if (H5B2_insert(bt2_corder, dxpl_id, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree")
} /* end if */
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_insert() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_write_bt2_cb2
+ * Function: H5A__dense_write_bt2_cb2
*
- * Purpose: v2 B-tree 'modify' callback to update the record for a creation
- * order index
+ * Purpose: v2 B-tree 'modify' callback to update the record for a creation
+ * order index
*
- * Return: Success: 0
- * Failure: 1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, February 20, 2007
*
*-------------------------------------------------------------------------
@@ -593,13 +554,11 @@ static herr_t
H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
{
H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */
- H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */
+ H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */
FUNC_ENTER_STATIC_NOERR
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(record);
HDassert(new_heap_id);
@@ -612,16 +571,14 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A__dense_write_bt2_cb2() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_write_bt2_cb
+ * Function: H5A__dense_write_bt2_cb
*
- * Purpose: v2 B-tree 'modify' callback to update the data for an attribute
+ * Purpose: v2 B-tree 'modify' callback to update the data for an attribute
*
- * Return: Success: 0
- * Failure: 1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 5, 2006
*
*-------------------------------------------------------------------------
@@ -629,52 +586,53 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
static herr_t
H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
{
- H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
- H5A_bt2_od_wrt_t *op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
- uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
+ H5A_bt2_od_wrt_t * op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ H5WB_t * wb = NULL; /* Wrapped buffer for attribute data */
+ uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(record);
HDassert(op_data);
/* Check for modifying shared attribute */
- if(record->flags & H5O_MSG_FLAG_SHARED) {
+ if (record->flags & H5O_MSG_FLAG_SHARED) {
/* Update the shared attribute in the SOHM info */
- if(H5O_attr_update_shared(op_data->f, op_data->dxpl_id, NULL, op_data->attr, NULL) < 0)
+ if (H5O_attr_update_shared(op_data->f, op_data->dxpl_id, NULL, op_data->attr, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in shared storage")
/* Update record's heap ID */
record->id = op_data->attr->sh_loc.u.heap_id;
/* Check if we need to modify the creation order index with new heap ID */
- if(H5F_addr_defined(op_data->corder_bt2_addr)) {
- H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
+ if (H5F_addr_defined(op_data->corder_bt2_addr)) {
+ H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(op_data->f, op_data->dxpl_id, op_data->corder_bt2_addr, NULL)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
+ if (NULL ==
+ (bt2_corder = H5B2_open(op_data->f, op_data->dxpl_id, op_data->corder_bt2_addr, NULL)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for creation order index")
/* Create the "udata" information for v2 B-tree record modify */
- udata.f = op_data->f;
- udata.dxpl_id = op_data->dxpl_id;
- udata.fheap = NULL;
- udata.shared_fheap = NULL;
- udata.name = NULL;
- udata.name_hash = 0;
- udata.flags = 0;
- udata.corder = op_data->attr->shared->crt_idx;
- udata.found_op = NULL;
+ udata.f = op_data->f;
+ udata.dxpl_id = op_data->dxpl_id;
+ udata.fheap = NULL;
+ udata.shared_fheap = NULL;
+ udata.name = NULL;
+ udata.name_hash = 0;
+ udata.flags = 0;
+ udata.corder = op_data->attr->shared->crt_idx;
+ udata.found_op = NULL;
udata.found_op_data = NULL;
/* Modify record for creation order index */
- if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0)
+ if (H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A__dense_write_bt2_cb2,
+ &op_data->attr->sh_loc.u.heap_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree")
} /* end if */
@@ -682,81 +640,77 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
*changed = TRUE;
} /* end if */
else {
- void *attr_ptr; /* Pointer to serialized message */
- size_t attr_size; /* Size of serialized attribute in the heap */
+ void * attr_ptr; /* Pointer to serialized message */
+ size_t attr_size; /* Size of serialized attribute in the heap */
/* Find out the size of buffer needed for serialized attribute */
- if((attr_size = H5O_msg_raw_size(op_data->f, H5O_ATTR_ID, FALSE, op_data->attr)) == 0)
+ if ((attr_size = H5O_msg_raw_size(op_data->f, H5O_ATTR_ID, FALSE, op_data->attr)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get attribute size")
/* Wrap the local buffer for serialized attributes */
- if(NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf))))
+ if (NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf))))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for attribute */
- if(NULL == (attr_ptr = H5WB_actual(wb, attr_size)))
+ if (NULL == (attr_ptr = H5WB_actual(wb, attr_size)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Create serialized form of attribute */
- if(H5O_msg_encode(op_data->f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, op_data->attr) < 0)
+ if (H5O_msg_encode(op_data->f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, op_data->attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute")
/* Sanity check */
#ifndef NDEBUG
-{
- size_t obj_len; /* Length of existing encoded attribute */
+ {
+ size_t obj_len; /* Length of existing encoded attribute */
- if(H5HF_get_obj_len(op_data->fheap, op_data->dxpl_id, &record->id, &obj_len) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get object size")
- HDassert(obj_len == attr_size);
-}
+ if (H5HF_get_obj_len(op_data->fheap, op_data->dxpl_id, &record->id, &obj_len) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get object size")
+ HDassert(obj_len == attr_size);
+ }
#endif /* NDEBUG */
/* Update existing attribute in heap */
/* (might be more efficient as fractal heap 'op' callback, but leave that for later -QAK) */
- if(H5HF_write(op_data->fheap, op_data->dxpl_id, &record->id, changed, attr_ptr) < 0)
+ if (H5HF_write(op_data->fheap, op_data->dxpl_id, &record->id, changed, attr_ptr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in heap")
} /* end else */
done:
/* Release resources */
- if(bt2_corder && H5B2_close(bt2_corder, op_data->dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, op_data->dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_write_bt2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_write
+ * Function: H5A_dense_write
*
- * Purpose: Modify an attribute in dense storage structures for an object
+ * Purpose: Modify an attribute in dense storage structures for an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 4 2006
+ * Programmer: Quincey Koziol
+ * Dec 4 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
{
- H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
- H5A_bt2_od_wrt_t op_data; /* "Op data" for v2 B-tree modify */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
+ H5A_bt2_od_wrt_t op_data; /* "Op data" for v2 B-tree modify */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(H5F_addr_defined(ainfo->fheap_addr));
@@ -764,89 +718,87 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
HDassert(attr);
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record modify */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = shared_fheap;
- udata.name = attr->shared->name;
- udata.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
- udata.flags = 0;
- udata.corder = 0;
- udata.found_op = NULL;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = shared_fheap;
+ udata.name = attr->shared->name;
+ udata.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
+ udata.flags = 0;
+ udata.corder = 0;
+ udata.found_op = NULL;
udata.found_op_data = NULL;
/* Create the "op_data" for the v2 B-tree record 'modify' callback */
- op_data.f = f;
- op_data.dxpl_id = dxpl_id;
- op_data.fheap = fheap;
- op_data.shared_fheap = shared_fheap;
- op_data.attr = attr;
+ op_data.f = f;
+ op_data.dxpl_id = dxpl_id;
+ op_data.fheap = fheap;
+ op_data.shared_fheap = shared_fheap;
+ op_data.attr = attr;
op_data.corder_bt2_addr = ainfo->corder_bt2_addr;
/* Modify attribute through 'name' tracking v2 B-tree */
- if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A__dense_write_bt2_cb, &op_data) < 0)
+ if (H5B2_modify(bt2_name, dxpl_id, &udata, H5A__dense_write_bt2_cb, &op_data) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree")
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_write() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_copy_fh_cb
+ * Function: H5A__dense_copy_fh_cb
*
- * Purpose: Callback for fractal heap operator, to make copy of attribute
+ * Purpose: Callback for fractal heap operator, to make copy of attribute
* for calling routine
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
H5A__dense_copy_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -857,109 +809,107 @@ H5A__dense_copy_fh_cb(const void *obj, size_t obj_len, void *_udata)
* HDF5 routine, it could attempt to re-protect that direct block for the
* heap, causing the HDF5 routine called to fail)
*/
- if(NULL == (udata->attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (udata->attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, FAIL, "can't decode attribute")
/* Set the creation order index for the attribute */
udata->attr->shared->crt_idx = udata->record->corder;
/* Check whether we should "reconstitute" the shared message info */
- if(udata->record->flags & H5O_MSG_FLAG_SHARED)
+ if (udata->record->flags & H5O_MSG_FLAG_SHARED)
H5SM_reconstitute(&(udata->attr->sh_loc), udata->f, H5O_ATTR_ID, udata->record->id);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_copy_fh_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_rename
+ * Function: H5A_dense_rename
*
- * Purpose: Rename an attribute in dense storage structures for an object
+ * Purpose: Rename an attribute in dense storage structures for an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jan 3 2007
+ * Programmer: Quincey Koziol
+ * Jan 3 2007
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *old_name,
- const char *new_name)
+ const char *new_name)
{
- H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5A_t *attr_copy = NULL; /* Copy of attribute to rename */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
- htri_t attr_exists; /* Attribute exists in v2 B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order ndex */
+ H5A_t * attr_copy = NULL; /* Copy of attribute to rename */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
+ htri_t attr_exists; /* Attribute exists in v2 B-tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(old_name);
HDassert(new_name);
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record modify */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = shared_fheap;
- udata.name = old_name;
- udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0);
- udata.flags = 0;
- udata.corder = 0;
- udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = shared_fheap;
+ udata.name = old_name;
+ udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0);
+ udata.flags = 0;
+ udata.corder = 0;
+ udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.found_op_data = &attr_copy;
/* Get copy of attribute through 'name' tracking v2 B-tree */
- if((attr_exists = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
+ if ((attr_exists = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index")
- else if(attr_exists == FALSE)
+ else if (attr_exists == FALSE)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute in name index")
HDassert(attr_copy);
/* Check if message is already shared */
- if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0)
+ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared")
- else if(shared_mesg > 0) {
+ else if (shared_mesg > 0) {
/* Reset shared status of copy */
/* (so it will get shared again if necessary) */
attr_copy->sh_loc.type = H5O_SHARE_TYPE_UNSHARED;
@@ -970,20 +920,48 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
attr_copy->shared->name = H5MM_xstrdup(new_name);
/* Recompute the version to encode the attribute with */
- if(H5A_set_version(f, attr_copy) < 0)
+ if (H5A_set_version(f, attr_copy) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "unable to update attribute version")
+ /* Need to remove the attribute from the creation order index v2 B-tree */
+ if (ainfo->index_corder) {
+ htri_t corder_attr_exists; /* Attribute exists in v2 B-tree */
+
+ /* Open the creation order index v2 B-tree */
+ HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
+ if (NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo->corder_bt2_addr, NULL)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation index")
+
+ /* Set up the creation order to search for */
+ udata.corder = attr_copy->shared->crt_idx;
+
+ if ((corder_attr_exists = H5B2_find(bt2_corder, dxpl_id, &udata, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index")
+
+ if (corder_attr_exists) {
+ H5A_bt2_ud_rm_t rm_udata;
+
+ /* Set up the creation order in user data for the v2 B-tree 'record remove' callback */
+ rm_udata.common.corder = attr_copy->shared->crt_idx;
+
+ /* Remove the record from the creation order index v2 B-tree */
+ if (H5B2_remove(bt2_corder, dxpl_id, &rm_udata, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL,
+ "unable to remove attribute from creation order index v2 B-tree")
+ }
+ }
+
/* Insert renamed attribute back into dense storage */
/* (Possibly making it shared) */
- if(H5A_dense_insert(f, dxpl_id, ainfo, attr_copy) < 0)
+ if (H5A_dense_insert(f, dxpl_id, ainfo, attr_copy) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage")
/* Was this attribute shared? */
- if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) > 0) {
- hsize_t attr_rc; /* Attribute's ref count in shared message storage */
+ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) > 0) {
+ hsize_t attr_rc; /* Attribute's ref count in shared message storage */
/* Retrieve ref count for shared attribute */
- if(H5SM_get_refcount(f, dxpl_id, H5O_ATTR_ID, &attr_copy->sh_loc, &attr_rc) < 0)
+ if (H5SM_get_refcount(f, dxpl_id, H5O_ATTR_ID, &attr_copy->sh_loc, &attr_rc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
/* If the newly shared attribute needs to share "ownership" of the shared
@@ -993,105 +971,107 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
*
* *ick* -QAK, 2007/01/08
*/
- if(attr_rc == 1) {
+ if (attr_rc == 1) {
/* Increment reference count on attribute components */
- if(H5O_attr_link(f, dxpl_id, NULL, attr_copy) < 0)
+ if (H5O_attr_link(f, dxpl_id, NULL, attr_copy) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count")
} /* end if */
- } /* end if */
- else if(shared_mesg == 0) {
+ } /* end if */
+ else if (shared_mesg == 0) {
/* Increment reference count on attribute components */
/* (so that they aren't deleted when the attribute is removed shortly) */
- if(H5O_attr_link(f, dxpl_id, NULL, attr_copy) < 0)
+ if (H5O_attr_link(f, dxpl_id, NULL, attr_copy) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count")
} /* end if */
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ else if (shared_mesg < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Delete old attribute from dense storage */
- if(H5A_dense_remove(f, dxpl_id, ainfo, old_name) < 0)
+ if (H5A_dense_remove(f, dxpl_id, ainfo, old_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(attr_copy)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
+ if (attr_copy)
H5O_msg_free(H5O_ATTR_ID, attr_copy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_rename() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_iterate_bt2_cb
+ * Function: H5A__dense_iterate_bt2_cb
*
- * Purpose: v2 B-tree callback for dense attribute storage iterator
+ * Purpose: v2 B-tree callback for dense attribute storage iterator
*
- * Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
+ * Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
- H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ const H5A_dense_bt2_name_rec_t *record =
+ (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
+ H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
/* Check for skipping attributes */
- if(bt2_udata->skip > 0)
+ if (bt2_udata->skip > 0)
--bt2_udata->skip;
else {
- H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
- H5HF_t *fheap; /* Fractal heap handle for attribute storage */
+ H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5HF_t * fheap; /* Fractal heap handle for attribute storage */
/* Check for iterating over shared attribute */
- if(record->flags & H5O_MSG_FLAG_SHARED)
+ if (record->flags & H5O_MSG_FLAG_SHARED)
fheap = bt2_udata->shared_fheap;
else
fheap = bt2_udata->fheap;
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.record = record;
- fh_udata.attr = NULL;
+ fh_udata.record = record;
+ fh_udata.attr = NULL;
/* Call fractal heap 'op' routine, to copy the attribute information */
- if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed")
/* Check which type of callback to make */
- switch(bt2_udata->attr_op->op_type) {
- case H5A_ATTR_OP_APP2:
- {
- H5A_info_t ainfo; /* Info for attribute */
+ switch (bt2_udata->attr_op->op_type) {
+ case H5A_ATTR_OP_APP2: {
+ H5A_info_t ainfo; /* Info for attribute */
/* Get the attribute information */
- if(H5A_get_info(fh_udata.attr, &ainfo) < 0)
+ if (H5A_get_info(fh_udata.attr, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info")
/* Make the application callback */
- ret_value = (bt2_udata->attr_op->u.app_op2)(bt2_udata->loc_id, fh_udata.attr->shared->name, &ainfo, bt2_udata->op_data);
+ ret_value = (bt2_udata->attr_op->u.app_op2)(bt2_udata->loc_id, fh_udata.attr->shared->name,
+ &ainfo, bt2_udata->op_data);
break;
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
case H5A_ATTR_OP_APP:
/* Make the application callback */
- ret_value = (bt2_udata->attr_op->u.app_op)(bt2_udata->loc_id, fh_udata.attr->shared->name, bt2_udata->op_data);
+ ret_value = (bt2_udata->attr_op->u.app_op)(bt2_udata->loc_id, fh_udata.attr->shared->name,
+ bt2_udata->op_data);
break;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1104,7 +1084,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
HDassert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end switch */
/* Release the space allocated for the attribute */
@@ -1116,44 +1096,40 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
bt2_udata->count++;
/* Check for callback failure and pass along return value */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_ATTR, H5E_CANTNEXT, "iteration operator failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_iterate_bt2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_iterate
+ * Function: H5A_dense_iterate
*
- * Purpose: Iterate over attributes in dense storage structures for an object
+ * Purpose: Iterate over attributes in dense storage structures for an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_attr,
- const H5A_attr_iter_op_t *attr_op, void *op_data)
+H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
+ void *op_data)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
- herr_t ret_value; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(H5F_addr_defined(ainfo->fheap_addr));
@@ -1161,12 +1137,12 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainf
HDassert(attr_op);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Check if "native" order is OK - since names are hashed, getting them
* in strictly increasing or decreasing order requires building a
* table and sorting it.
*/
- if(order == H5_ITER_NATIVE) {
+ if (order == H5_ITER_NATIVE) {
HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
bt2_addr = ainfo->name_bt2_addr;
} /* end if */
@@ -1184,94 +1160,92 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainf
} /* end else */
/* Check on iteration order */
- if(order == H5_ITER_NATIVE && H5F_addr_defined(bt2_addr)) {
- H5A_bt2_ud_it_t udata; /* User data for iterator callback */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ if (order == H5_ITER_NATIVE && H5F_addr_defined(bt2_addr)) {
+ H5A_bt2_ud_it_t udata; /* User data for iterator callback */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree iterator callback */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
udata.shared_fheap = shared_fheap;
- udata.loc_id = loc_id;
- udata.skip = skip;
- udata.count = 0;
- udata.attr_op = attr_op;
- udata.op_data = op_data;
+ udata.loc_id = loc_id;
+ udata.skip = skip;
+ udata.count = 0;
+ udata.attr_op = attr_op;
+ udata.op_data = op_data;
/* Iterate over the records in the v2 B-tree's "native" order */
/* (by hash of name) */
- if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A__dense_iterate_bt2_cb, &udata)) < 0)
+ if ((ret_value = H5B2_iterate(bt2, dxpl_id, H5A__dense_iterate_bt2_cb, &udata)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed");
/* Update the last attribute examined, if requested */
- if(last_attr)
+ if (last_attr)
*last_attr = udata.count;
} /* end if */
else {
/* Build the table of attributes for this object */
/* (build table using the name index, but sort according to idx_type) */
- if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
+ if (H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes")
/* Iterate over attributes in table */
- if((ret_value = H5A_attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0)
+ if ((ret_value = H5A_attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(atable.attrs && H5A_attr_release_table(&atable) < 0)
+ if (atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_iterate() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_remove_bt2_cb
+ * Function: H5A__dense_remove_bt2_cb
*
- * Purpose: v2 B-tree callback for dense attribute storage record removal
+ * Purpose: v2 B-tree callback for dense attribute storage record removal
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -1279,187 +1253,183 @@ static herr_t
H5A__dense_remove_bt2_cb(const void *_record, void *_udata)
{
const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record;
- H5A_bt2_ud_rm_t *udata = (H5A_bt2_ud_rm_t *)_udata; /* User data for callback */
- H5A_t *attr = *(H5A_t **)udata->common.found_op_data; /* Pointer to attribute to remove */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_rm_t * udata = (H5A_bt2_ud_rm_t *)_udata; /* User data for callback */
+ H5A_t * attr = *(H5A_t **)udata->common.found_op_data; /* Pointer to attribute to remove */
+ H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Check for removing the link from the creation order index */
- if(H5F_addr_defined(udata->corder_bt2_addr)) {
+ if (H5F_addr_defined(udata->corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(udata->common.f, udata->common.dxpl_id, udata->corder_bt2_addr, NULL)))
+ if (NULL ==
+ (bt2_corder = H5B2_open(udata->common.f, udata->common.dxpl_id, udata->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
udata->common.corder = attr->shared->crt_idx;
/* Remove the record from the creation order index v2 B-tree */
- if(H5B2_remove(bt2_corder, udata->common.dxpl_id, udata, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from creation order index v2 B-tree")
+ if (H5B2_remove(bt2_corder, udata->common.dxpl_id, udata, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL,
+ "unable to remove attribute from creation order index v2 B-tree")
} /* end if */
/* Check for removing shared attribute */
- if(record->flags & H5O_MSG_FLAG_SHARED) {
+ if (record->flags & H5O_MSG_FLAG_SHARED) {
/* Decrement the reference count on the shared attribute message */
- if(H5SM_delete(udata->common.f, udata->common.dxpl_id, NULL, &(attr->sh_loc)) < 0)
+ if (H5SM_delete(udata->common.f, udata->common.dxpl_id, NULL, &(attr->sh_loc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute")
} /* end if */
else {
/* Perform the deletion action on the attribute */
/* (takes care of shared & committed datatype/dataspace components) */
- if(H5O_attr_delete(udata->common.f, udata->common.dxpl_id, NULL, attr) < 0)
+ if (H5O_attr_delete(udata->common.f, udata->common.dxpl_id, NULL, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
/* Remove record from fractal heap */
- if(H5HF_remove(udata->common.fheap, udata->common.dxpl_id, &record->id) < 0)
+ if (H5HF_remove(udata->common.fheap, udata->common.dxpl_id, &record->id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap")
} /* end else */
done:
/* Release resources */
- if(bt2_corder && H5B2_close(bt2_corder, udata->common.dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, udata->common.dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_remove_bt2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_remove
+ * Function: H5A_dense_remove
*
- * Purpose: Remove an attribute from the dense storage of an object
+ * Purpose: Remove an attribute from the dense storage of an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name)
{
- H5A_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5A_t *attr_copy = NULL; /* Copy of attribute to remove */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5A_t * attr_copy = NULL; /* Copy of attribute to remove */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(name && *name);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- udata.common.f = f;
- udata.common.dxpl_id = dxpl_id;
- udata.common.fheap = fheap;
- udata.common.shared_fheap = shared_fheap;
- udata.common.name = name;
- udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
+ udata.common.f = f;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.fheap = fheap;
+ udata.common.shared_fheap = shared_fheap;
+ udata.common.name = name;
+ udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.common.found_op_data = &attr_copy;
- udata.corder_bt2_addr = ainfo->corder_bt2_addr;
+ udata.corder_bt2_addr = ainfo->corder_bt2_addr;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0)
+ if (H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree")
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(attr_copy)
+ if (attr_copy)
H5O_msg_free_real(H5O_MSG_ATTR, attr_copy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_remove() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_remove_by_idx_bt2_cb
+ * Function: H5A__dense_remove_by_idx_bt2_cb
*
- * Purpose: v2 B-tree callback for dense attribute storage record removal by index
+ * Purpose: v2 B-tree callback for dense attribute storage record removal by index
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 14 2007
+ * Programmer: Quincey Koziol
+ * Feb 14 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
- H5HF_t *fheap; /* Fractal heap handle */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
+ H5HF_t * fheap; /* Fractal heap handle */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* v2 B-tree record */
- H5A_bt2_ud_rmbi_t *bt2_udata = (H5A_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
- H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
- H5O_shared_t sh_loc; /* Shared message info for attribute */
- hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_rmbi_t * bt2_udata = (H5A_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
+ H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5O_shared_t sh_loc; /* Shared message info for attribute */
+ hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Set up the user data for fractal heap 'op' callback */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.record = record;
- fh_udata.attr = NULL;
+ fh_udata.record = record;
+ fh_udata.attr = NULL;
/* Get correct fractal heap handle to use for operations */
- if(record->flags & H5O_MSG_FLAG_SHARED)
+ if (record->flags & H5O_MSG_FLAG_SHARED)
fheap = bt2_udata->shared_fheap;
else
fheap = bt2_udata->fheap;
/* Check whether to make a copy of the attribute or just need the shared location info */
- if(H5F_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) {
+ if (H5F_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) {
/* Call fractal heap 'op' routine, to make copy of attribute to remove */
- if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed")
HDassert(fh_udata.attr);
@@ -1475,11 +1445,11 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
} /* end else */
/* Check for removing the link from the "other" index (creation order, when name used and vice versa) */
- if(H5F_addr_defined(bt2_udata->other_bt2_addr)) {
- H5A_bt2_ud_common_t other_bt2_udata; /* Info for B-tree callbacks */
+ if (H5F_addr_defined(bt2_udata->other_bt2_addr)) {
+ H5A_bt2_ud_common_t other_bt2_udata; /* Info for B-tree callbacks */
/* Determine the index being used */
- if(bt2_udata->idx_type == H5_INDEX_NAME) {
+ if (bt2_udata->idx_type == H5_INDEX_NAME) {
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.corder = fh_udata.attr->shared->crt_idx;
} /* end if */
@@ -1487,103 +1457,101 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
- other_bt2_udata.f = bt2_udata->f;
- other_bt2_udata.dxpl_id = bt2_udata->dxpl_id;
- other_bt2_udata.fheap = bt2_udata->fheap;
+ other_bt2_udata.f = bt2_udata->f;
+ other_bt2_udata.dxpl_id = bt2_udata->dxpl_id;
+ other_bt2_udata.fheap = bt2_udata->fheap;
other_bt2_udata.shared_fheap = bt2_udata->shared_fheap;
- other_bt2_udata.name = fh_udata.attr->shared->name;
- other_bt2_udata.name_hash = H5_checksum_lookup3(fh_udata.attr->shared->name, HDstrlen(fh_udata.attr->shared->name), 0);
- other_bt2_udata.found_op = NULL;
+ other_bt2_udata.name = fh_udata.attr->shared->name;
+ other_bt2_udata.name_hash =
+ H5_checksum_lookup3(fh_udata.attr->shared->name, HDstrlen(fh_udata.attr->shared->name), 0);
+ other_bt2_udata.found_op = NULL;
other_bt2_udata.found_op_data = NULL;
} /* end else */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set the common information for the v2 B-tree remove operation */
/* Remove the record from the "other" index v2 B-tree */
- if(H5B2_remove(bt2, bt2_udata->dxpl_id, &other_bt2_udata, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove record from 'other' index v2 B-tree")
+ if (H5B2_remove(bt2, bt2_udata->dxpl_id, &other_bt2_udata, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL,
+ "unable to remove record from 'other' index v2 B-tree")
} /* end if */
/* Check for removing shared attribute */
- if(record->flags & H5O_MSG_FLAG_SHARED) {
- H5O_shared_t *sh_loc_ptr; /* Pointer to shared message info for attribute */
+ if (record->flags & H5O_MSG_FLAG_SHARED) {
+ H5O_shared_t *sh_loc_ptr; /* Pointer to shared message info for attribute */
/* Set up pointer to correct shared location */
- if(use_sh_loc)
+ if (use_sh_loc)
sh_loc_ptr = &sh_loc;
else
sh_loc_ptr = &(fh_udata.attr->sh_loc);
/* Decrement the reference count on the shared attribute message */
- if(H5SM_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, sh_loc_ptr) < 0)
+ if (H5SM_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, sh_loc_ptr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute")
} /* end if */
else {
/* Perform the deletion action on the attribute */
/* (takes care of shared & committed datatype/dataspace components) */
- if(H5O_attr_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.attr) < 0)
+ if (H5O_attr_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
/* Remove record from fractal heap */
- if(H5HF_remove(fheap, bt2_udata->dxpl_id, &record->id) < 0)
+ if (H5HF_remove(fheap, bt2_udata->dxpl_id, &record->id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap")
} /* end else */
done:
/* Release resources */
- if(bt2 && H5B2_close(bt2, bt2_udata->dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, bt2_udata->dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(fh_udata.attr)
+ if (fh_udata.attr)
H5O_msg_free(H5O_ATTR_ID, fh_udata.attr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_remove_by_idx_bt2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_remove_by_idx
+ * Function: H5A_dense_remove_by_idx
*
- * Purpose: Remove an attribute from the dense storage of an object,
- * according to the order within an index
+ * Purpose: Remove an attribute from the dense storage of an object,
+ * according to the order within an index
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 14 2007
+ * Programmer: Quincey Koziol
+ * Feb 14 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n)
+H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Check if "native" order is OK - since names are hashed, getting them
* in strictly increasing or decreasing order requires building a
* table and sorting it.
*/
- if(order == H5_ITER_NATIVE) {
+ if (order == H5_ITER_NATIVE) {
bt2_addr = ainfo->name_bt2_addr;
HDassert(H5F_addr_defined(bt2_addr));
} /* end if */
@@ -1601,306 +1569,296 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
} /* end else */
/* If there is an index defined for the field, use it */
- if(H5F_addr_defined(bt2_addr)) {
- H5A_bt2_ud_rmbi_t udata; /* User data for v2 B-tree record removal */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ if (H5F_addr_defined(bt2_addr)) {
+ H5A_bt2_ud_rmbi_t udata; /* User data for v2 B-tree record removal */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = shared_fheap;
- udata.idx_type = idx_type;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = shared_fheap;
+ udata.idx_type = idx_type;
udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? ainfo->corder_bt2_addr : ainfo->name_bt2_addr;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0)
+ if (H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index")
} /* end if */
else {
/* Build the table of attributes for this object */
/* (build table using the name index, but sort according to idx_type) */
- if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
+ if (H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes")
/* Check for skipping too many attributes */
- if(n >= atable.nattrs)
+ if (n >= atable.nattrs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
/* Delete appropriate attribute from dense storage */
- if(H5A_dense_remove(f, dxpl_id, ainfo, ((atable.attrs[n])->shared)->name) < 0)
+ if (H5A_dense_remove(f, dxpl_id, ainfo, ((atable.attrs[n])->shared)->name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end else */
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(atable.attrs && H5A_attr_release_table(&atable) < 0)
+ if (atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_remove_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_exists
+ * Function: H5A_dense_exists
*
- * Purpose: Check if an attribute exists in dense storage structures for
+ * Purpose: Check if an attribute exists in dense storage structures for
* an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
htri_t
H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name)
{
- H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t attr_sharable; /* Flag indicating attributes are sharable */
- htri_t ret_value = TRUE; /* Return value */
+ H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5HF_t * shared_fheap = NULL; /* Fractal heap handle for shared header messages */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t attr_sharable; /* Flag indicating attributes are sharable */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI(NULL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
HDassert(name);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Check if attributes are shared in this file */
- if((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
+ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared")
/* Get handle for shared message heap, if attributes are sharable */
- if(attr_sharable) {
- haddr_t shared_fheap_addr; /* Address of fractal heap to use */
+ if (attr_sharable) {
+ haddr_t shared_fheap_addr; /* Address of fractal heap to use */
/* Retrieve the address of the shared message's fractal heap */
- if(H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, H5O_ATTR_ID, &shared_fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address")
/* Check if there are any shared messages currently */
- if(H5F_addr_defined(shared_fheap_addr)) {
+ if (H5F_addr_defined(shared_fheap_addr)) {
/* Open the fractal heap for shared header messages */
- if(NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
+ if (NULL == (shared_fheap = H5HF_open(f, dxpl_id, shared_fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record 'find' */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = shared_fheap;
- udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.flags = 0;
- udata.corder = 0;
- udata.found_op = NULL; /* v2 B-tree comparison callback */
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = shared_fheap;
+ udata.name = name;
+ udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.flags = 0;
+ udata.corder = 0;
+ udata.found_op = NULL; /* v2 B-tree comparison callback */
udata.found_op_data = NULL;
/* Find the attribute in the 'name' index */
- if((ret_value = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
+ if ((ret_value = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index")
done:
/* Release resources */
- if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
+ if (shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_exists() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__dense_delete_bt2_cb
+ * Function: H5A__dense_delete_bt2_cb
*
- * Purpose: v2 B-tree callback for dense attribute storage deletion
+ * Purpose: v2 B-tree callback for dense attribute storage deletion
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jan 3 2007
+ * Programmer: Quincey Koziol
+ * Jan 3 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
- H5A_bt2_ud_common_t *bt2_udata = (H5A_bt2_ud_common_t *)_bt2_udata; /* User data for callback */
- H5A_t *attr = NULL; /* Attribute being removed */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5A_dense_bt2_name_rec_t *record =
+ (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
+ H5A_bt2_ud_common_t *bt2_udata = (H5A_bt2_ud_common_t *)_bt2_udata; /* User data for callback */
+ H5A_t * attr = NULL; /* Attribute being removed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Check for shared attribute */
- if(record->flags & H5O_MSG_FLAG_SHARED) {
- H5O_shared_t sh_mesg; /* Temporary shared message info */
+ if (record->flags & H5O_MSG_FLAG_SHARED) {
+ H5O_shared_t sh_mesg; /* Temporary shared message info */
/* "reconstitute" the shared message info for the attribute */
H5SM_reconstitute(&sh_mesg, bt2_udata->f, H5O_ATTR_ID, record->id);
/* Decrement the reference count on the shared attribute message */
- if(H5SM_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, &sh_mesg) < 0)
+ if (H5SM_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, &sh_mesg) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute")
} /* end if */
else {
- H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.record = record;
+ fh_udata.record = record;
/* up */
fh_udata.attr = NULL;
/* Call fractal heap 'op' routine, to copy the attribute information */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed")
attr = fh_udata.attr;
/* Perform the deletion action on the attribute */
/* (takes care of shared/committed datatype & dataspace components) */
- if(H5O_attr_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.attr) < 0)
+ if (H5O_attr_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
} /* end else */
done:
/* Release resources */
- if(attr)
+ if (attr)
H5O_msg_free_real(H5O_MSG_ATTR, attr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_delete_bt2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_delete
+ * Function: H5A_dense_delete
*
- * Purpose: Delete all dense storage structures for attributes on an object
+ * Purpose: Delete all dense storage structures for attributes on an object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 6 2006
+ * Programmer: Quincey Koziol
+ * Dec 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
{
- H5A_bt2_ud_common_t udata; /* v2 B-tree user data for deleting attributes */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_bt2_ud_common_t udata; /* v2 B-tree user data for deleting attributes */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(ainfo);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Create the "udata" information for v2 B-tree 'delete' */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.shared_fheap = NULL;
- udata.name = NULL;
- udata.name_hash = 0;
- udata.flags = 0;
- udata.found_op = NULL; /* v2 B-tree comparison callback */
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.shared_fheap = NULL;
+ udata.name = NULL;
+ udata.name_hash = 0;
+ udata.flags = 0;
+ udata.found_op = NULL; /* v2 B-tree comparison callback */
udata.found_op_data = NULL;
/* Delete name index v2 B-tree */
- if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0)
+ if (H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
ainfo->name_bt2_addr = HADDR_UNDEF;
/* Release resources */
- if(H5HF_close(fheap, dxpl_id) < 0)
+ if (H5HF_close(fheap, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
fheap = NULL;
/* Check if we should delete the creation order index v2 B-tree */
- if(H5F_addr_defined(ainfo->corder_bt2_addr)) {
+ if (H5F_addr_defined(ainfo->corder_bt2_addr)) {
/* Delete the creation order index, without adjusting the ref. count on the attributes */
- if(H5B2_delete(f, dxpl_id, ainfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
+ if (H5B2_delete(f, dxpl_id, ainfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
ainfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
/* Delete fractal heap */
- if(H5HF_delete(f, dxpl_id, ainfo->fheap_addr) < 0)
+ if (H5HF_delete(f, dxpl_id, ainfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete fractal heap")
ainfo->fheap_addr = HADDR_UNDEF;
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_delete() */
-
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 3a0bc18..a70d94e 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Adeprec.c
* November 27 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5A interface. These
* functions are here for compatibility purposes and may be
@@ -29,60 +29,50 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5A__init_deprec_interface
-
+#define H5_INTERFACE_INIT_FUNC H5A__init_deprec_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Opkg.h" /* Object headers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5A__init_deprec_interface -- Initialize interface-specific information
@@ -103,7 +93,6 @@ H5A__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5A_init())
} /* H5A__init_deprec_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5A__term_deprec_interface -- Terminate interface
@@ -128,7 +117,7 @@ H5A__term_deprec_interface(void)
} /* H5A__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*--------------------------------------------------------------------------
NAME
H5Acreate1
@@ -157,45 +146,43 @@ H5A__term_deprec_interface(void)
--------------------------------------------------------------------------*/
hid_t
-H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
- hid_t plist_id)
+H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t plist_id)
{
- H5A_t *attr = NULL; /* Attribute created */
- H5G_loc_t loc; /* Object location */
- H5T_t *type; /* Datatype to use for attribute */
- H5S_t *space; /* Dataspace to use for attribute */
- hid_t ret_value; /* Return value */
+ H5A_t * attr = NULL; /* Attribute created */
+ H5G_loc_t loc; /* Object location */
+ H5T_t * type; /* Datatype to use for attribute */
+ H5S_t * space; /* Dataspace to use for attribute */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*siii", loc_id, name, type_id, space_id, plist_id);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Go do the real work for attaching the attribute to the dataset */
- if(NULL==(attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
+ if (NULL == (attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
/* Register the new attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Acreate1() */
-
/*--------------------------------------------------------------------------
NAME
H5Aopen_name
@@ -221,39 +208,38 @@ done:
hid_t
H5Aopen_name(hid_t loc_id, const char *name)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute opened */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute opened */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, ".", name, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_name(&loc, ".", name, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute: '%s'", name)
/* Register the attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Aopen_idx
@@ -279,37 +265,37 @@ done:
hid_t
H5Aopen_idx(hid_t loc_id, unsigned idx)
{
- H5G_loc_t loc; /* Object location */
- H5A_t *attr = NULL; /* Attribute opened */
- hid_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5A_t * attr = NULL; /* Attribute opened */
+ hid_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE2("i", "iIu", loc_id, idx);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Open the attribute in the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)idx, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
+ if (NULL == (attr = H5A_open_by_idx(&loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)idx,
+ H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open attribute")
/* Register the attribute and get an ID for it */
- if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value < 0)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen_idx() */
-
/*--------------------------------------------------------------------------
NAME
H5Aget_num_attrs
@@ -331,33 +317,33 @@ done:
int
H5Aget_num_attrs(hid_t loc_id)
{
- H5O_loc_t *loc; /* Object location for attribute */
- void *obj;
- int ret_value;
+ H5O_loc_t *loc; /* Object location for attribute */
+ void * obj;
+ int ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", loc_id);
/* check arguments */
- if(H5I_BADID == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad location ID")
- if(H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if(NULL == (obj = H5I_object(loc_id)))
+ if (H5I_BADID == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad location ID")
+ if (H5I_FILE == H5I_get_type(loc_id) || H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (NULL == (obj = H5I_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADATOM, FAIL, "illegal object atom")
- switch(H5I_get_type (loc_id)) {
+ switch (H5I_get_type(loc_id)) {
case H5I_DATASET:
- if(NULL == (loc = H5D_oloc((H5D_t*)obj)))
+ if (NULL == (loc = H5D_oloc((H5D_t *)obj)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get location for object")
break;
case H5I_DATATYPE:
- if(NULL == (loc = H5T_oloc((H5T_t*)obj)))
+ if (NULL == (loc = H5T_oloc((H5T_t *)obj)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "target datatype is not committed")
break;
case H5I_GROUP:
- if(NULL == (loc = H5G_oloc((H5G_t*)obj)))
+ if (NULL == (loc = H5G_oloc((H5G_t *)obj)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get location for object")
break;
@@ -379,14 +365,13 @@ H5Aget_num_attrs(hid_t loc_id)
} /*lint !e788 All appropriate cases are covered */
/* Look up the # of attributes for the object */
- if((ret_value = H5O_attr_count(loc, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5O_attr_count(loc, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "can't get attribute count for object")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aget_num_attrs() */
-
/*--------------------------------------------------------------------------
NAME
H5Aiterate1
@@ -427,33 +412,33 @@ done:
herr_t
H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
{
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- hsize_t start_idx; /* Index of attribute to start iterating at */
- hsize_t last_attr; /* Index of last attribute examined */
- herr_t ret_value; /* Return value */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ hsize_t start_idx; /* Index of attribute to start iterating at */
+ hsize_t last_attr; /* Index of last attribute examined */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*Iux*x", loc_id, attr_num, op, op_data);
/* check arguments */
- if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if (H5I_ATTR == H5I_get_type(loc_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
/* Build attribute operator info */
- attr_op.op_type = H5A_ATTR_OP_APP;
+ attr_op.op_type = H5A_ATTR_OP_APP;
attr_op.u.app_op = op;
/* Call attribute iteration routine */
last_attr = start_idx = (hsize_t)(attr_num ? *attr_num : 0);
- if((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if ((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, start_idx,
+ &last_attr, &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
- if(attr_num)
+ if (attr_num)
*attr_num = (unsigned)last_attr;
done:
FUNC_LEAVE_API(ret_value)
} /* H5Aiterate1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 894e356..4deb056 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5Aint.c
- * Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Aint.c
+ * Dec 18 2006
+ * Quincey Koziol
*
- * Purpose: Internal routines for managing attributes.
+ * Purpose: Internal routines for managing attributes.
*
*-------------------------------------------------------------------------
*/
@@ -26,96 +26,87 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Data exchange structure to use when building table of compact attributes for an object */
typedef struct {
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5A_attr_table_t *atable; /* Pointer to attribute table to build */
- size_t curr_attr; /* Current attribute to operate on */
- hbool_t bogus_crt_idx; /* Whether bogus creation index values need to be set */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5A_attr_table_t *atable; /* Pointer to attribute table to build */
+ size_t curr_attr; /* Current attribute to operate on */
+ hbool_t bogus_crt_idx; /* Whether bogus creation index values need to be set */
} H5A_compact_bt_ud_t;
/* Data exchange structure to use when building table of dense attributes for an object */
typedef struct {
- H5A_attr_table_t *atable; /* Pointer to attribute table to build */
- size_t curr_attr; /* Current attribute to operate on */
+ H5A_attr_table_t *atable; /* Pointer to attribute table to build */
+ size_t curr_attr; /* Current attribute to operate on */
} H5A_dense_bt_ud_t;
/* Data exchange structure to use when copying an attribute from _SRC to _DST */
typedef struct {
- const H5O_ainfo_t *ainfo; /* dense information */
- H5F_t *file; /* file */
- hbool_t *recompute_size; /* Flag to indicate if size changed */
- H5O_copy_t *cpy_info; /* Information on copying options */
- hid_t dxpl_id; /* DXPL for operation */
- const H5O_loc_t *oloc_src;
- H5O_loc_t *oloc_dst;
+ const H5O_ainfo_t *ainfo; /* dense information */
+ H5F_t * file; /* file */
+ hbool_t * recompute_size; /* Flag to indicate if size changed */
+ H5O_copy_t * cpy_info; /* Information on copying options */
+ hid_t dxpl_id; /* DXPL for operation */
+ const H5O_loc_t * oloc_src;
+ H5O_loc_t * oloc_dst;
} H5A_dense_file_cp_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5A__compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, unsigned *oh_flags_ptr, void *_udata/*in,out*/);
+static herr_t H5A__compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned *oh_flags_ptr, void *_udata /*in,out*/);
static herr_t H5A_dense_build_table_cb(const H5A_t *attr, void *_udata);
-static int H5A__attr_cmp_name_inc(const void *attr1, const void *attr2);
-static int H5A__attr_cmp_name_dec(const void *attr1, const void *attr2);
-static int H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2);
-static int H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2);
-static herr_t H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
- H5_iter_order_t order);
+static int H5A__attr_cmp_name_inc(const void *attr1, const void *attr2);
+static int H5A__attr_cmp_name_dec(const void *attr1, const void *attr2);
+static int H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2);
+static int H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2);
+static herr_t H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_order_t order);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-typedef H5A_t* H5A_t_ptr;
+typedef H5A_t *H5A_t_ptr;
H5FL_SEQ_DEFINE(H5A_t_ptr);
-
/*-------------------------------------------------------------------------
* Function: H5A_create
*
@@ -129,7 +120,7 @@ H5FL_SEQ_DEFINE(H5A_t_ptr);
* H5S_t *space; IN: Dataspace of attribute
* hid_t acpl_id IN: Attribute creation property list
*
- * Return: attribute structure on success, NULL on Failure.
+ * Return: Attribute structure on success, NULL on Failure.
*
* Programmer: Quincey Koziol
* April 2, 1998
@@ -137,18 +128,18 @@ H5FL_SEQ_DEFINE(H5A_t_ptr);
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
- const H5S_t *space, hid_t acpl_id, hid_t dxpl_id)
+H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type, const H5S_t *space, hid_t acpl_id,
+ hid_t dxpl_id)
{
- H5A_t *attr = NULL; /* Attribute created */
- hssize_t snelmts; /* elements in attribute */
- size_t nelmts; /* elements in attribute */
- htri_t tri_ret; /* htri_t return value */
- H5A_t *ret_value = NULL; /* Return value */
+ H5A_t * attr = NULL; /* Attribute created */
+ hssize_t snelmts; /* elements in attribute */
+ size_t nelmts; /* elements in attribute */
+ htri_t tri_ret; /* htri_t return value */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- /* check args */
+ /* Check args */
HDassert(loc);
HDassert(name);
HDassert(type);
@@ -159,37 +150,37 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
* name, but it's going to be hard to unwind all the special cases on
* failure, so just check first, for now - QAK)
*/
- if((tri_ret = H5O_attr_exists(loc->oloc, name, H5AC_ind_dxpl_id)) < 0)
+ if ((tri_ret = H5O_attr_exists(loc->oloc, name, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes")
- else if(tri_ret > 0)
+ else if (tri_ret > 0)
HGOTO_ERROR(H5E_ATTR, H5E_ALREADYEXISTS, NULL, "attribute already exists")
/* Check if the dataspace has an extent set (or is NULL) */
- if(!(H5S_has_extent(space)))
+ if (!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, NULL, "dataspace extent has not been set")
/* Check if the datatype is "sensible" for use in a dataset */
- if(H5T_is_sensible(type) != TRUE)
+ if (H5T_is_sensible(type) != TRUE)
HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, NULL, "datatype is not sensible")
/* Build the attribute information */
- if(NULL == (attr = H5FL_CALLOC(H5A_t)))
+ if (NULL == (attr = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed for attribute info")
- if(NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
+ if (NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "can't allocate shared attr structure")
/* If the creation property list is H5P_DEFAULT, use the default character encoding */
- if(acpl_id == H5P_DEFAULT)
+ if (acpl_id == H5P_DEFAULT)
attr->shared->encoding = H5F_DEFAULT_CSET;
else {
- H5P_genplist_t *ac_plist; /* ACPL Property list */
+ H5P_genplist_t *ac_plist; /* ACPL Property list */
/* Get a local copy of the attribute creation property list */
- if(NULL == (ac_plist = (H5P_genplist_t *)H5I_object(acpl_id)))
+ if (NULL == (ac_plist = (H5P_genplist_t *)H5I_object(acpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
- if(H5P_get(ac_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0)
+ if (H5P_get(ac_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get character encoding flag")
} /* end else */
@@ -197,56 +188,55 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
attr->shared->name = H5MM_xstrdup(name);
/* Copy datatype */
- if(NULL == (attr->shared->dt = H5T_copy(type, H5T_COPY_ALL)))
+ if (NULL == (attr->shared->dt = H5T_copy(type, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info")
/* Convert a datatype (if committed) to a transient type if the committed datatype's file
location is different from the file location where the attribute will be created */
- if(H5T_convert_committed_datatype(attr->shared->dt, loc->oloc->file) < 0)
+ if (H5T_convert_committed_datatype(attr->shared->dt, loc->oloc->file) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info")
/* Mark datatype as being on disk now */
- if(H5T_set_loc(attr->shared->dt, loc->oloc->file, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(attr->shared->dt, loc->oloc->file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location")
/* Set the latest format for datatype, if requested */
- if(H5F_USE_LATEST_FORMAT(loc->oloc->file))
- if(H5T_set_latest_version(attr->shared->dt) < 0)
+ if (H5F_USE_LATEST_FORMAT(loc->oloc->file))
+ if (H5T_set_latest_version(attr->shared->dt) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of datatype")
/* Copy the dataspace for the attribute */
attr->shared->ds = H5S_copy(space, FALSE, TRUE);
/* Set the latest format for dataspace, if requested */
- if(H5F_USE_LATEST_FORMAT(loc->oloc->file))
- if(H5S_set_latest_version(attr->shared->ds) < 0)
+ if (H5F_USE_LATEST_FORMAT(loc->oloc->file))
+ if (H5S_set_latest_version(attr->shared->ds) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of dataspace")
/* Copy the object header information */
- if(H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to copy entry")
/* Deep copy of the group hierarchy path */
- if(H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0)
+ if (H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path")
/* Check if any of the pieces should be (or are already) shared in the
* SOHM table
*/
- if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed")
- if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed")
+ if (H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed")
+ if (H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed")
/* Check whether datatype is committed & increment ref count
* (to maintain ref. count incr/decr similarity with "shared message"
* type of datatype sharing)
*/
- if(H5T_committed(attr->shared->dt)) {
+ if (H5T_committed(attr->shared->dt))
/* Increment the reference count on the shared datatype */
- if(H5T_link(attr->shared->dt, 1, dxpl_id) < 0)
+ if (H5T_link(attr->shared->dt, 1, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, NULL, "unable to adjust shared datatype link count")
- } /* end if */
/* Compute the size of pieces on disk. This is either the size of the
* datatype and dataspace messages themselves, or the size of the "shared"
@@ -256,7 +246,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
attr->shared->ds_size = H5O_msg_raw_size(attr->oloc.file, H5O_SDSPACE_ID, FALSE, attr->shared->ds);
/* Get # of elements for attribute's dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid")
H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t);
@@ -265,51 +255,50 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
attr->shared->data_size = nelmts * H5T_GET_SIZE(attr->shared->dt);
/* Hold the symbol table entry (and file) open */
- if(H5O_open(&(attr->oloc)) < 0)
+ if (H5O_open(&(attr->oloc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open")
attr->obj_opened = TRUE;
/* Set the version to encode the attribute with */
- if(H5A_set_version(attr->oloc.file, attr) < 0)
+ if (H5A_set_version(attr->oloc.file, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version")
/* Insert the attribute into the object header */
- if(H5O_attr_create(&(attr->oloc), dxpl_id, attr) < 0)
+ if (H5O_attr_create(&(attr->oloc), dxpl_id, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, NULL, "unable to create attribute in object header")
+ /* Set return value */
ret_value = attr;
done:
- if(NULL == ret_value && attr && H5A_close(attr))
+ if (NULL == ret_value && attr && H5A_close(attr))
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_create() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_open_common
+ * Function: H5A_open_common
*
- * Purpose:
- * Finishes initializing an attributes the open
+ * Purpose: Finishes initializing an attributes the open
*
* Usage:
* herr_t H5A_open_common(loc, name, dxpl_id)
* const H5G_loc_t *loc; IN: Pointer to group location for object
* H5A_t *attr; IN/OUT: Pointer to attribute to initialize
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * December 18, 2006
+ * Programmer: Quincey Koziol
+ * December 18, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_open_common(const H5G_loc_t *loc, H5A_t *attr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -319,24 +308,24 @@ H5A_open_common(const H5G_loc_t *loc, H5A_t *attr)
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
/* Clear object location */
- if(H5O_loc_reset(&(attr->oloc)) < 0)
+ if (H5O_loc_reset(&(attr->oloc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to reset location")
#endif /* H5_USING_MEMCHECKER */
/* Free any previous group hier. path */
- if(H5G_name_free(&(attr->path)) < 0)
+ if (H5G_name_free(&(attr->path)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path")
/* Deep copy of the symbol table entry */
- if(H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to copy entry")
/* Deep copy of the group hier. path */
- if(H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0)
+ if (H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy entry")
/* Hold the symbol table entry (and file) open */
- if(H5O_open(&(attr->oloc)) < 0)
+ if (H5O_open(&(attr->oloc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open")
attr->obj_opened = TRUE;
@@ -344,13 +333,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_open_common() */
-
/*-------------------------------------------------------------------------
* Function: H5A_open_by_idx
*
- * Purpose: Open an attribute according to its index order
+ * Purpose: Open an attribute according to its index order
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* April 2, 1998
@@ -358,15 +346,15 @@ done:
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t dxpl_id)
+H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- H5A_t *attr = NULL; /* Attribute from object header */
- H5A_t *ret_value; /* Return value */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ H5A_t * attr = NULL; /* Attribute from object header */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -380,16 +368,16 @@ H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found")
loc_found = TRUE;
/* Read in attribute from object header */
- if(NULL == (attr = H5O_attr_open_by_idx(obj_loc.oloc, idx_type, order, n, dxpl_id)))
+ if (NULL == (attr = H5O_attr_open_by_idx(obj_loc.oloc, idx_type, order, n, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to load attribute info from object header")
/* Finish initializing attribute */
- if(H5A_open_common(&obj_loc, attr) < 0)
+ if (H5A_open_common(&obj_loc, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute")
/* Set return value */
@@ -397,24 +385,23 @@ H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, NULL, "can't free location")
/* Cleanup on failure */
- if(ret_value == NULL)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value == NULL)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_open_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_open_by_name
+ * Function: H5A_open_by_name
*
- * Purpose: Open an attribute in an object header, according to it's name
+ * Purpose: Open an attribute in an object header, according to it's name
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* December 11, 2006
@@ -422,15 +409,15 @@ done:
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name,
- hid_t lapl_id, hid_t dxpl_id)
+H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name, hid_t lapl_id,
+ hid_t dxpl_id)
{
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- H5A_t *attr = NULL; /* Attribute from object header */
- H5A_t *ret_value; /* Return value */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ H5A_t * attr = NULL; /* Attribute from object header */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -445,16 +432,16 @@ H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_na
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found")
loc_found = TRUE;
/* Read in attribute from object header */
- if(NULL == (attr = H5O_attr_open_by_name(obj_loc.oloc, attr_name, dxpl_id)))
+ if (NULL == (attr = H5O_attr_open_by_name(obj_loc.oloc, attr_name, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to load attribute info from object header")
/* Finish initializing attribute */
- if(H5A_open_common(loc, attr) < 0)
+ if (H5A_open_common(loc, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute")
/* Set return value */
@@ -462,18 +449,17 @@ H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_na
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, NULL, "can't free location")
/* Cleanup on failure */
- if(ret_value == NULL)
- if(attr && H5A_close(attr) < 0)
+ if (ret_value == NULL)
+ if (attr && H5A_close(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_open_by_name() */
-
/*--------------------------------------------------------------------------
NAME
H5A_write
@@ -493,17 +479,17 @@ done:
herr_t
H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id)
{
- uint8_t *tconv_buf = NULL; /* datatype conv buffer */
- hbool_t tconv_owned = FALSE; /* Whether the datatype conv buffer is owned by attribute */
- uint8_t *bkg_buf = NULL; /* temp conversion buffer */
- hssize_t snelmts; /* elements in attribute */
- size_t nelmts; /* elements in attribute */
- H5T_path_t *tpath = NULL; /* conversion information*/
- hid_t src_id = -1, dst_id = -1;/* temporary type atoms */
- size_t src_type_size; /* size of source type */
- size_t dst_type_size; /* size of destination type*/
- size_t buf_size; /* desired buffer size */
- herr_t ret_value = SUCCEED;
+ uint8_t * tconv_buf = NULL; /* datatype conv buffer */
+ hbool_t tconv_owned = FALSE; /* Whether the datatype conv buffer is owned by attribute */
+ uint8_t * bkg_buf = NULL; /* temp conversion buffer */
+ hssize_t snelmts; /* elements in attribute */
+ size_t nelmts; /* elements in attribute */
+ H5T_path_t *tpath = NULL; /* conversion information*/
+ hid_t src_id = -1, dst_id = -1; /* temporary type atoms */
+ size_t src_type_size; /* size of source type */
+ size_t dst_type_size; /* size of destination type*/
+ size_t buf_size; /* desired buffer size */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -512,56 +498,57 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id)
HDassert(buf);
/* Get # of elements for attribute's dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid")
H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t);
/* If there's actually data elements for the attribute, make a copy of the data passed in */
- if(nelmts > 0) {
+ if (nelmts > 0) {
/* Get the memory and file datatype sizes */
src_type_size = H5T_GET_SIZE(mem_type);
dst_type_size = H5T_GET_SIZE(attr->shared->dt);
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(mem_type, attr->shared->dt, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath = H5T_path_find(mem_type, attr->shared->dt, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes")
/* Check for type conversion required */
- if(!H5T_path_noop(tpath)) {
- if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0)
+ if (!H5T_path_noop(tpath)) {
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0 ||
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
/* Get the maximum buffer size needed and allocate it */
buf_size = nelmts * MAX(src_type_size, dst_type_size);
- if(NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
+ if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
+ if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Copy the user's data into the buffer for conversion */
HDmemcpy(tconv_buf, buf, (src_type_size * nelmts));
/* Perform datatype conversion */
- if(H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed")
/* Free the previous attribute data buffer, if there is one */
- if(attr->shared->data)
+ if (attr->shared->data)
attr->shared->data = H5FL_BLK_FREE(attr_buf, attr->shared->data);
/* Set the pointer to the attribute data to the converted information */
attr->shared->data = tconv_buf;
- tconv_owned = TRUE;
+ tconv_owned = TRUE;
} /* end if */
/* No type conversion necessary */
else {
HDassert(dst_type_size == src_type_size);
/* Allocate the attribute buffer, if there isn't one */
- if(attr->shared->data == NULL)
- if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, dst_type_size * nelmts)))
+ if (attr->shared->data == NULL)
+ if (NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, dst_type_size * nelmts)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Copy the attribute data into the user's buffer */
@@ -569,25 +556,24 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id)
} /* end else */
/* Modify the attribute in the object header */
- if(H5O_attr_write(&(attr->oloc), dxpl_id, attr) < 0)
+ if (H5O_attr_write(&(attr->oloc), dxpl_id, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to modify attribute")
} /* end if */
done:
/* Release resources */
- if(src_id >= 0 && H5I_dec_ref(src_id) < 0)
+ if (src_id >= 0 && H5I_dec_ref(src_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
+ if (dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(tconv_buf && !tconv_owned)
+ if (tconv_buf && !tconv_owned)
tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf);
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_write() */
-
/*--------------------------------------------------------------------------
NAME
H5A_read
@@ -607,16 +593,16 @@ done:
herr_t
H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
{
- uint8_t *tconv_buf = NULL; /* datatype conv buffer*/
- uint8_t *bkg_buf = NULL; /* background buffer */
- hssize_t snelmts; /* elements in attribute */
- size_t nelmts; /* elements in attribute*/
- H5T_path_t *tpath = NULL; /* type conversion info */
- hid_t src_id = -1, dst_id = -1;/* temporary type atoms*/
- size_t src_type_size; /* size of source type */
- size_t dst_type_size; /* size of destination type */
- size_t buf_size; /* desired buffer size */
- herr_t ret_value = SUCCEED;
+ uint8_t * tconv_buf = NULL; /* datatype conv buffer*/
+ uint8_t * bkg_buf = NULL; /* background buffer */
+ hssize_t snelmts; /* elements in attribute */
+ size_t nelmts; /* elements in attribute*/
+ H5T_path_t *tpath = NULL; /* type conversion info */
+ hid_t src_id = -1, dst_id = -1; /* temporary type atoms*/
+ size_t src_type_size; /* size of source type */
+ size_t dst_type_size; /* size of destination type */
+ size_t buf_size; /* desired buffer size */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -624,43 +610,50 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
HDassert(mem_type);
HDassert(buf);
+ /* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
+ if (H5T_patch_vlen_file(attr->shared->dt, attr->oloc.file) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
+
/* Create buffer for data to store on disk */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid")
H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t);
- if(nelmts > 0) {
+ if (nelmts > 0) {
/* Get the memory and file datatype sizes */
src_type_size = H5T_GET_SIZE(attr->shared->dt);
dst_type_size = H5T_GET_SIZE(mem_type);
/* Check if the attribute has any data yet, if not, fill with zeroes */
- if(attr->obj_opened && !attr->shared->data)
+ if (attr->obj_opened && !attr->shared->data)
HDmemset(buf, 0, (dst_type_size * nelmts));
- else { /* Attribute exists and has a value */
+ else { /* Attribute exists and has a value */
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(attr->shared->dt, mem_type, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes")
+ if (NULL == (tpath = H5T_path_find(attr->shared->dt, mem_type, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL,
+ "unable to convert between src and dst datatypes")
/* Check for type conversion required */
- if(!H5T_path_noop(tpath)) {
- if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0)
+ if (!H5T_path_noop(tpath)) {
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) <
+ 0 ||
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
/* Get the maximum buffer size needed and allocate it */
buf_size = nelmts * MAX(src_type_size, dst_type_size);
- if(NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
+ if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
+ if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Copy the attribute data into the buffer for conversion */
HDmemcpy(tconv_buf, attr->shared->data, (src_type_size * nelmts));
/* Perform datatype conversion. */
- if(H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed")
/* Copy the converted data into the user's buffer */
@@ -673,35 +666,31 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
/* Copy the attribute data into the user's buffer */
HDmemcpy(buf, attr->shared->data, (dst_type_size * nelmts));
} /* end else */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
done:
/* Release resources */
- if(src_id >= 0 && H5I_dec_ref(src_id) < 0)
+ if (src_id >= 0 && H5I_dec_ref(src_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
+ if (dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(tconv_buf)
+ if (tconv_buf)
tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf);
- if(bkg_buf)
- bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
+ if (bkg_buf)
+ bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_get_space
+ * Function: H5A_get_space
*
- * Purpose: Returns dataspace of the attribute.
+ * Purpose: Returns dataspace of the attribute.
*
- * Return: Success: dataspace
- *
- * Failure: NULL
+ * Return: Success: A valid ID for the dataspace of an attribute
*
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Failure: H5I_INVALID_ID
*
*-------------------------------------------------------------------------
*/
@@ -715,32 +704,27 @@ H5A_get_space(H5A_t *attr)
HDassert(attr);
/* Copy the attribute's dataspace */
- if(NULL == (ret_value = H5S_copy(attr->shared->ds, FALSE, TRUE)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to copy dataspace")
+ if (NULL == (ret_value = H5S_copy(attr->shared->ds, FALSE, TRUE)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_get_space() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_get_type
+ * Function: H5A_get_type
*
- * Purpose: Returns datatype of the dataset.
+ * Purpose: Returns datatype of an attribute
*
- * Return: Success: datatype
- *
- * Failure: NULL
- *
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Return: Success: A datatype of an attribute
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
H5T_t *
H5A_get_type(H5A_t *attr)
{
- H5T_t *dt = NULL;
+ H5T_t *dt = NULL;
H5T_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
@@ -748,35 +732,33 @@ H5A_get_type(H5A_t *attr)
HDassert(attr);
/* Patch the datatype's "top level" file pointer */
- if(H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0)
+ if (H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to patch datatype's file pointer")
- /*
- * Copy the attribute's datatype. If the type is a named type then
+ /* Copy the attribute's datatype. If the type is a named type then
* reopen the type before returning it to the user. Make the type
* read-only.
*/
- if(NULL == (dt = H5T_copy(attr->shared->dt, H5T_COPY_REOPEN)))
+ if (NULL == (dt = H5T_copy(attr->shared->dt, H5T_COPY_REOPEN)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to copy datatype")
/* Mark any datatypes as being in memory now */
- if(H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0)
+ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location")
/* Lock copied type */
- if(H5T_lock(dt, FALSE) < 0)
+ if (H5T_lock(dt, FALSE) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to lock transient datatype")
ret_value = dt;
done:
- if(!ret_value && dt && (H5T_close(dt) < 0))
+ if (!ret_value && dt && (H5T_close(dt) < 0))
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release datatype")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_get_type() */
-
/*--------------------------------------------------------------------------
NAME
H5A_get_create_plist
@@ -794,25 +776,25 @@ done:
resource leaks will occur.
--------------------------------------------------------------------------*/
hid_t
-H5A_get_create_plist(H5A_t* attr)
+H5A_get_create_plist(H5A_t *attr)
{
- H5P_genplist_t *plist; /* Default property list */
- hid_t new_plist_id; /* ID of ACPL to return */
- H5P_genplist_t *new_plist; /* ACPL to return */
- hid_t ret_value;
+ H5P_genplist_t *plist; /* Default property list */
+ hid_t new_plist_id; /* ID of ACPL to return */
+ H5P_genplist_t *new_plist; /* ACPL to return */
+ hid_t ret_value;
FUNC_ENTER_NOAPI_NOINIT
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_ID_g)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_ID_g)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL")
/* Create the property list object to return */
- if((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id)))
+ if ((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties")
+ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
/* Set the character encoding on the new property list */
- if(H5P_set(new_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0)
+ if (H5P_set(new_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding")
ret_value = new_plist_id;
@@ -821,7 +803,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Aget_create_plist() */
-
/*--------------------------------------------------------------------------
NAME
H5A_get_name
@@ -841,8 +822,8 @@ done:
ssize_t
H5A_get_name(H5A_t *attr, size_t buf_size, char *buf)
{
- size_t copy_len, nbytes;
- ssize_t ret_value;
+ size_t copy_len, nbytes;
+ ssize_t ret_value;
FUNC_ENTER_NOAPI_NOERR
@@ -854,11 +835,11 @@ H5A_get_name(H5A_t *attr, size_t buf_size, char *buf)
copy_len = MIN(buf_size - 1, nbytes);
/* Copy all/some of the name */
- if(buf && copy_len > 0) {
+ if (buf && copy_len > 0) {
HDmemcpy(buf, attr->shared->name, copy_len);
/* Terminate the string */
- buf[copy_len]='\0';
+ buf[copy_len] = '\0';
} /* end if */
/* Set return value */
@@ -867,7 +848,6 @@ H5A_get_name(H5A_t *attr, size_t buf_size, char *buf)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_get_name() */
-
/*-------------------------------------------------------------------------
* Function: H5A_get_info
*
@@ -891,45 +871,39 @@ H5A_get_info(const H5A_t *attr, H5A_info_t *ainfo)
HDassert(ainfo);
/* Set info for attribute */
- ainfo->cset = attr->shared->encoding;
+ ainfo->cset = attr->shared->encoding;
ainfo->data_size = attr->shared->data_size;
- if(attr->shared->crt_idx == H5O_MAX_CRT_ORDER_IDX) {
+ if (attr->shared->crt_idx == H5O_MAX_CRT_ORDER_IDX) {
ainfo->corder_valid = FALSE;
- ainfo->corder = 0;
+ ainfo->corder = 0;
} /* end if */
else {
ainfo->corder_valid = TRUE;
- ainfo->corder = attr->shared->crt_idx;
+ ainfo->corder = attr->shared->crt_idx;
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A_get_info() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_copy
+ * Function: H5A_copy
*
- * Purpose: Copies attribute OLD_ATTR.
+ * Purpose: Copies attribute OLD_ATTR.
*
- * Return: Success: Pointer to a new copy of the OLD_ATTR argument.
- *
- * Failure: NULL
+ * Return: Success: Pointer to a new copy of the OLD_ATTR argument.
+ * Failure: NULL
*
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modification:Raymond Lu
- * 4 June 2008
- * Changed some attribute information to be shared.
- *
*-------------------------------------------------------------------------
*/
H5A_t *
H5A_copy(H5A_t *_new_attr, const H5A_t *old_attr)
{
- H5A_t *new_attr = NULL;
- hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */
- H5A_t *ret_value = NULL; /* Return value */
+ H5A_t * new_attr = NULL;
+ hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -937,8 +911,8 @@ H5A_copy(H5A_t *_new_attr, const H5A_t *old_attr)
HDassert(old_attr);
/* Allocate attribute structure */
- if(_new_attr == NULL) {
- if(NULL == (new_attr = H5FL_CALLOC(H5A_t)))
+ if (_new_attr == NULL) {
+ if (NULL == (new_attr = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
allocated_attr = TRUE;
} /* end if */
@@ -949,7 +923,7 @@ H5A_copy(H5A_t *_new_attr, const H5A_t *old_attr)
new_attr->sh_loc = old_attr->sh_loc;
/* Deep copy of the group hierarchy path */
- if(H5G_name_copy(&(new_attr->path), &(old_attr->path), H5_COPY_DEEP) < 0)
+ if (H5G_name_copy(&(new_attr->path), &(old_attr->path), H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path")
/* Share some attribute information */
@@ -965,81 +939,73 @@ H5A_copy(H5A_t *_new_attr, const H5A_t *old_attr)
ret_value = new_attr;
done:
- if(ret_value == NULL)
- if(allocated_attr && new_attr && H5A_close(new_attr) < 0)
+ if (ret_value == NULL)
+ if (allocated_attr && new_attr && H5A_close(new_attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_free
+ * Function: H5A_free
*
* Purpose: Frees all memory associated with an attribute, but does not
* free the H5A_t structure (which should be done in H5T_close).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, November 15, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5A_free(H5A_t *attr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(attr);
/* Free dynamically allocated items */
- if(attr->shared->name) {
+ if (attr->shared->name) {
H5MM_xfree(attr->shared->name);
attr->shared->name = NULL;
}
- if(attr->shared->dt) {
- if(H5T_close(attr->shared->dt) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release datatype info")
+ if (attr->shared->dt) {
+ if (H5T_close(attr->shared->dt) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release datatype info")
attr->shared->dt = NULL;
}
- if(attr->shared->ds) {
- if(H5S_close(attr->shared->ds) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release dataspace info")
+ if (attr->shared->ds) {
+ if (H5S_close(attr->shared->ds) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release dataspace info")
attr->shared->ds = NULL;
}
- if(attr->shared->data)
+ if (attr->shared->data)
attr->shared->data = H5FL_BLK_FREE(attr_buf, attr->shared->data);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_close
+ * Function: H5A_close
*
- * Purpose: Frees an attribute and all associated memory.
+ * Purpose: Frees an attribute and all associated memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- * Raymond Lu
- * 4 June 2008
- * Changed some attribute object information to be shared.
*-------------------------------------------------------------------------
*/
herr_t
H5A_close(H5A_t *attr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1047,13 +1013,13 @@ H5A_close(H5A_t *attr)
HDassert(attr->shared);
/* Close the object's symbol-table entry */
- if(attr->obj_opened && (H5O_close(&(attr->oloc)) < 0))
+ if (attr->obj_opened && (H5O_close(&(attr->oloc)) < 0))
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release object header info")
/* Reference count can be 0. It only happens when H5A_create fails. */
- if(attr->shared->nrefs <= 1) {
+ if (attr->shared->nrefs <= 1) {
/* Free dynamically allocated items */
- if(H5A_free(attr) < 0)
+ if (H5A_free(attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
/* Destroy shared attribute struct */
@@ -1066,19 +1032,18 @@ H5A_close(H5A_t *attr)
} /* end else */
/* Free group hierarchy path */
- if(H5G_name_free(&(attr->path)) < 0)
+ if (H5G_name_free(&(attr->path)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path")
attr->shared = NULL;
- attr = H5FL_FREE(H5A_t, attr);
+ attr = H5FL_FREE(H5A_t, attr);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_oloc
+ * Function: H5A_oloc
*
* Purpose: Return the object location for an attribute. It's the
* object location for the object to which the attribute
@@ -1095,7 +1060,7 @@ done:
H5O_loc_t *
H5A_oloc(H5A_t *attr)
{
- H5O_loc_t *ret_value; /* Return value */
+ H5O_loc_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1107,9 +1072,8 @@ H5A_oloc(H5A_t *attr)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_oloc() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_nameof
+ * Function: H5A_nameof
*
* Purpose: Return the group hier. path for an attribute. It's the
* group hier. path for the object to which the attribute
@@ -1126,19 +1090,18 @@ H5A_oloc(H5A_t *attr)
H5G_name_t *
H5A_nameof(H5A_t *attr)
{
- H5G_name_t *ret_value; /* Return value */
+ H5G_name_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOERR
HDassert(attr);
/* Set return value */
- ret_value=&(attr->path);
+ ret_value = &(attr->path);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_nameof() */
-
/*-------------------------------------------------------------------------
* Function: H5A_type
*
@@ -1155,7 +1118,7 @@ H5A_nameof(H5A_t *attr)
H5T_t *
H5A_type(const H5A_t *attr)
{
- H5T_t *ret_value; /* Return value */
+ H5T_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1167,14 +1130,12 @@ H5A_type(const H5A_t *attr)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_exists_by_name
+ * Function: H5A_exists_by_name
*
- * Purpose: Private version of H5Aexists_by_name
+ * Purpose: Private version of H5Aexists_by_name
*
- * Return: Success: TRUE/FALSE
- * Failure: Negative
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
* Thursday, November 1, 2007
@@ -1182,14 +1143,13 @@ H5A_type(const H5A_t *attr)
*-------------------------------------------------------------------------
*/
htri_t
-H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
- hid_t lapl_id, hid_t dxpl_id)
+H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- htri_t ret_value; /* Return value */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1199,23 +1159,22 @@ H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Check if the attribute exists */
- if((ret_value = H5O_attr_exists(obj_loc.oloc, attr_name, dxpl_id)) < 0)
+ if ((ret_value = H5O_attr_exists(obj_loc.oloc, attr_name, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_exists_by_name() */
-
/*-------------------------------------------------------------------------
* Function: H5A__compact_build_table_cb
*
@@ -1225,25 +1184,20 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
* Modification:Raymond Lu
* 24 June 2008
* Changed the table of attribute objects to be the table of
* pointers to attribute objects for the ease of operation.
- *
- * Vailin Choi; September 2011
- * Change "oh_modified" from boolean to unsigned
- * (See H5Oprivate.h for possible flags)
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, unsigned H5_ATTR_UNUSED *oh_modified, void *_udata/*in,out*/)
+H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
{
- H5A_compact_bt_ud_t *udata = (H5A_compact_bt_ud_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5A_compact_bt_ud_t *udata = (H5A_compact_bt_ud_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -1251,26 +1205,26 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/
HDassert(mesg);
/* Re-allocate the table if necessary */
- if(udata->curr_attr == udata->atable->nattrs) {
- H5A_t **new_table; /* New table for attributes */
- size_t new_table_size; /* Number of attributes in new table */
+ if (udata->curr_attr == udata->atable->nattrs) {
+ H5A_t **new_table; /* New table for attributes */
+ size_t new_table_size; /* Number of attributes in new table */
/* Allocate larger table */
new_table_size = MAX(1, 2 * udata->atable->nattrs);
- if(NULL == (new_table = (H5A_t **)H5FL_SEQ_REALLOC(H5A_t_ptr, udata->atable->attrs, new_table_size)))
+ if (NULL == (new_table = (H5A_t **)H5FL_SEQ_REALLOC(H5A_t_ptr, udata->atable->attrs, new_table_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "unable to extend attribute table")
/* Update table information in user data */
- udata->atable->attrs = new_table;
+ udata->atable->attrs = new_table;
udata->atable->nattrs = new_table_size;
} /* end if */
/* Copy attribute into table */
- if(NULL == (udata->atable->attrs[udata->curr_attr] = H5A_copy(NULL, (const H5A_t *)mesg->native)))
+ if (NULL == (udata->atable->attrs[udata->curr_attr] = H5A_copy(NULL, (const H5A_t *)mesg->native)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
/* Assign [somewhat arbitrary] creation order value, if requested */
- if(udata->bogus_crt_idx)
+ if (udata->bogus_crt_idx)
((udata->atable->attrs[udata->curr_attr])->shared)->crt_idx = sequence;
/* Increment current attribute */
@@ -1280,31 +1234,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__compact_build_table_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_compact_build_table
+ * Function: H5A_compact_build_table
*
* Purpose: Builds a table containing a sorted list of attributes for
* an object
*
- * Note: Used for building table of attributes in non-native iteration
+ * Note: Used for building table of attributes in non-native iteration
* order for an index
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 18, 2006
+ * Programmer: Quincey Koziol
+ * Dec 18, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type,
- H5_iter_order_t order, H5A_attr_table_t *atable)
+H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type, H5_iter_order_t order,
+ H5A_attr_table_t *atable)
{
- H5A_compact_bt_ud_t udata; /* User data for iteration callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_compact_bt_ud_t udata; /* User data for iteration callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1314,30 +1266,30 @@ H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type,
HDassert(atable);
/* Initialize table */
- atable->attrs = NULL;
+ atable->attrs = NULL;
atable->nattrs = 0;
/* Set up user data for iteration */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.atable = atable;
- udata.curr_attr = 0;
- udata.bogus_crt_idx = (hbool_t)((oh->version == H5O_VERSION_1 ||
- !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? TRUE : FALSE);
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.atable = atable;
+ udata.curr_attr = 0;
+ udata.bogus_crt_idx = (hbool_t)(
+ (oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? TRUE : FALSE);
/* Iterate over existing attributes, checking for attribute with same name */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5A__compact_build_table_cb;
- if(H5O_msg_iterate_real(f, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(f, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error building attribute table")
/* Correct # of attributes in table */
atable->nattrs = udata.curr_attr;
/* Don't sort an empty table. */
- if(atable->nattrs > 0) {
+ if (atable->nattrs > 0) {
/* Sort attribute table in correct iteration order */
- if(H5A__attr_sort_table(atable, idx_type, order) < 0)
+ if (H5A__attr_sort_table(atable, idx_type, order) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table")
} /* end if */
@@ -1345,18 +1297,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_compact_build_table() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_build_table_cb
*
* Purpose: Callback routine for building table of attributes from dense
* attribute storage.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1364,8 +1313,8 @@ done:
static herr_t
H5A_dense_build_table_cb(const H5A_t *attr, void *_udata)
{
- H5A_dense_bt_ud_t *udata = (H5A_dense_bt_ud_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5A_dense_bt_ud_t *udata = (H5A_dense_bt_ud_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1375,11 +1324,11 @@ H5A_dense_build_table_cb(const H5A_t *attr, void *_udata)
HDassert(udata->curr_attr < udata->atable->nattrs);
/* Allocate attribute for entry in the table */
- if(NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t)))
+ if (NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate attribute")
/* Copy attribute information. Share the attribute object in copying. */
- if(NULL == H5A_copy(udata->atable->attrs[udata->curr_attr], attr))
+ if (NULL == H5A_copy(udata->atable->attrs[udata->curr_attr], attr))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
/* Increment number of attributes stored */
@@ -1389,9 +1338,8 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_build_table_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_dense_build_table
+ * Function: H5A_dense_build_table
*
* Purpose: Builds a table containing a sorted list of attributes for
* an object
@@ -1400,8 +1348,7 @@ done:
* order for an index. Uses the "name" index to retrieve records,
* but the 'idx_type' index for sorting them.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Dec 11, 2006
@@ -1409,12 +1356,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable)
+H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
+ H5_iter_order_t order, H5A_attr_table_t *atable)
{
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- hsize_t nrec; /* # of records in v2 B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ hsize_t nrec; /* # of records in v2 B-tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1426,12 +1373,12 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
HDassert(atable);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
/* (should be same # of records in all indices) */
- if(H5B2_get_nrec(bt2_name, &nrec) < 0)
+ if (H5B2_get_nrec(bt2_name, &nrec) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index")
/* Set size of table */
@@ -1439,29 +1386,29 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
atable->nattrs = (size_t)nrec;
/* Allocate space for the table entries */
- if(atable->nattrs > 0) {
- H5A_dense_bt_ud_t udata; /* User data for iteration callback */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ if (atable->nattrs > 0) {
+ H5A_dense_bt_ud_t udata; /* User data for iteration callback */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
/* Allocate the table to store the attributes */
- if((atable->attrs = (H5A_t **)H5FL_SEQ_CALLOC(H5A_t_ptr, atable->nattrs)) == NULL)
+ if ((atable->attrs = (H5A_t **)H5FL_SEQ_CALLOC(H5A_t_ptr, atable->nattrs)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set up user data for iteration */
- udata.atable = atable;
+ udata.atable = atable;
udata.curr_attr = 0;
/* Build iterator operator */
- attr_op.op_type = H5A_ATTR_OP_LIB;
+ attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5A_dense_build_table_cb;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5A_dense_iterate(f, dxpl_id, (hid_t)0, ainfo, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
+ if (H5A_dense_iterate(f, dxpl_id, (hid_t)0, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL,
+ &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Sort attribute table in correct iteration order */
- if(H5A__attr_sort_table(atable, idx_type, order) < 0)
+ if (H5A__attr_sort_table(atable, idx_type, order) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table")
} /* end if */
else
@@ -1469,27 +1416,25 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_build_table() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__attr_cmp_name_inc
+ * Function: H5A__attr_cmp_name_inc
*
- * Purpose: Callback routine for comparing two attribute names, in
+ * Purpose: Callback routine for comparing two attribute names, in
* increasing alphabetic order
*
- * Return: An integer less than, equal to, or greater than zero if the
+ * Return: An integer less than, equal to, or greater than zero if the
* first argument is considered to be respectively less than,
* equal to, or greater than the second. If two members compare
* as equal, their order in the sorted array is undefined.
* (i.e. same as strcmp())
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1499,11 +1444,10 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
{
FUNC_ENTER_STATIC_NOERR
- FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr1)->shared->name,
- (*(const H5A_t * const *)attr2)->shared->name))
+ FUNC_LEAVE_NOAPI(
+ HDstrcmp((*(const H5A_t *const *)attr1)->shared->name, (*(const H5A_t *const *)attr2)->shared->name))
} /* end H5A__attr_cmp_name_inc() */
-
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_name_dec
*
@@ -1517,7 +1461,6 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
* (i.e. opposite of strcmp())
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 8 2007
*
*-------------------------------------------------------------------------
@@ -1527,11 +1470,10 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
{
FUNC_ENTER_STATIC_NOERR
- FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr2)->shared->name,
- (*(const H5A_t * const *)attr1)->shared->name))
+ FUNC_LEAVE_NOAPI(
+ HDstrcmp((*(const H5A_t *const *)attr2)->shared->name, (*(const H5A_t *const *)attr1)->shared->name))
} /* end H5A__attr_cmp_name_dec() */
-
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_corder_inc
*
@@ -1544,7 +1486,6 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 8 2007
*
*-------------------------------------------------------------------------
@@ -1552,13 +1493,14 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
static int
H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2)
{
- int ret_value; /* Return value */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
- if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx)
+ if ((*(const H5A_t *const *)attr1)->shared->crt_idx < (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = -1;
- else if((*(const H5A_t * const *)attr1)->shared->crt_idx > (*(const H5A_t * const *)attr2)->shared->crt_idx)
+ else if ((*(const H5A_t *const *)attr1)->shared->crt_idx >
+ (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = 1;
else
ret_value = 0;
@@ -1566,34 +1508,33 @@ H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_cmp_corder_inc() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__attr_cmp_corder_dec
+ * Function: H5A__attr_cmp_corder_dec
*
- * Purpose: Callback routine for comparing two attributes, in
+ * Purpose: Callback routine for comparing two attributes, in
* decreasing creation order
*
- * Return: An integer less than, equal to, or greater than zero if the
+ * Return: An integer less than, equal to, or greater than zero if the
* second argument is considered to be respectively less than,
* equal to, or greater than the first. If two members compare
* as equal, their order in the sorted array is undefined.
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 8 2007
+ * Programmer: Quincey Koziol
+ * Feb 8 2007
*
*-------------------------------------------------------------------------
*/
static int
H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2)
{
- int ret_value; /* Return value */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
- if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx)
+ if ((*(const H5A_t *const *)attr1)->shared->crt_idx < (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = 1;
- else if((*(const H5A_t * const *)attr1)->shared->crt_idx > (*(const H5A_t * const *)attr2)->shared->crt_idx)
+ else if ((*(const H5A_t *const *)attr1)->shared->crt_idx >
+ (*(const H5A_t *const *)attr2)->shared->crt_idx)
ret_value = -1;
else
ret_value = 0;
@@ -1601,23 +1542,20 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_cmp_corder_dec() */
-
/*-------------------------------------------------------------------------
- * Function: H5A__attr_sort_table
+ * Function: H5A__attr_sort_table
*
* Purpose: Sort table containing a list of attributes for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 11, 2006
+ * Programmer: Quincey Koziol
+ * Dec 11, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
- H5_iter_order_t order)
+H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_order_t order)
{
FUNC_ENTER_STATIC_NOERR
@@ -1625,20 +1563,20 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
HDassert(atable);
/* Pick appropriate comparison routine */
- if(idx_type == H5_INDEX_NAME) {
- if(order == H5_ITER_INC)
- HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_name_inc);
- else if(order == H5_ITER_DEC)
- HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_name_dec);
+ if (idx_type == H5_INDEX_NAME) {
+ if (order == H5_ITER_INC)
+ HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_name_inc);
+ else if (order == H5_ITER_DEC)
+ HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_name_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end if */
else {
HDassert(idx_type == H5_INDEX_CRT_ORDER);
- if(order == H5_ITER_INC)
- HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_corder_inc);
- else if(order == H5_ITER_DEC)
- HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t*), H5A__attr_cmp_corder_dec);
+ if (order == H5_ITER_INC)
+ HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_inc);
+ else if (order == H5_ITER_DEC)
+ HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end else */
@@ -1646,28 +1584,25 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A__attr_sort_table() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_attr_iterate_table
+ * Function: H5A_attr_iterate_table
*
* Purpose: Iterate over table containing a list of attributes for an object,
* making appropriate callbacks
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 18, 2006
+ * Programmer: Quincey Koziol
+ * Dec 18, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip,
- hsize_t *last_attr, hid_t loc_id, const H5A_attr_iter_op_t *attr_op,
- void *op_data)
+H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *last_attr, hid_t loc_id,
+ const H5A_attr_iter_op_t *attr_op, void *op_data)
{
- size_t u; /* Local index variable */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ size_t u; /* Local index variable */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1676,20 +1611,19 @@ H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip,
HDassert(attr_op);
/* Skip over attributes, if requested */
- if(last_attr)
+ if (last_attr)
*last_attr = skip;
/* Iterate over attribute messages */
H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t)
- for(; u < atable->nattrs && !ret_value; u++) {
+ for (; u < atable->nattrs && !ret_value; u++) {
/* Check which type of callback to make */
- switch(attr_op->op_type) {
- case H5A_ATTR_OP_APP2:
- {
- H5A_info_t ainfo; /* Info for attribute */
+ switch (attr_op->op_type) {
+ case H5A_ATTR_OP_APP2: {
+ H5A_info_t ainfo; /* Info for attribute */
/* Get the attribute information */
- if(H5A_get_info(atable->attrs[u], &ainfo) < 0)
+ if (H5A_get_info(atable->attrs[u], &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info")
/* Make the application callback */
@@ -1713,40 +1647,38 @@ H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip,
HDassert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end switch */
/* Increment the number of entries passed through */
- if(last_attr)
+ if (last_attr)
(*last_attr)++;
} /* end for */
/* Check for callback failure and pass along return value */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_ATTR, H5E_CANTNEXT, "iteration operator failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_attr_iterate_table() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_attr_release_table
+ * Function: H5A_attr_release_table
*
- * Purpose: Release table containing a list of attributes for an object
+ * Purpose: Release table containing a list of attributes for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 11, 2006
+ * Programmer: Quincey Koziol
+ * Dec 11, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5A_attr_release_table(H5A_attr_table_t *atable)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1754,12 +1686,12 @@ H5A_attr_release_table(H5A_attr_table_t *atable)
HDassert(atable);
/* Release attribute info, if any. */
- if(atable->nattrs > 0) {
- size_t u; /* Local index variable */
+ if (atable->nattrs > 0) {
+ size_t u; /* Local index variable */
/* Free attribute message information */
- for(u = 0; u < atable->nattrs; u++)
- if(atable->attrs[u] && H5A_close(atable->attrs[u]) < 0)
+ for (u = 0; u < atable->nattrs; u++)
+ if (atable->attrs[u] && H5A_close(atable->attrs[u]) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute")
} /* end if */
else
@@ -1771,18 +1703,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_attr_release_table() */
-
/*-------------------------------------------------------------------------
* Function: H5A_get_ainfo
*
* Purpose: Retrieves the "attribute info" message for an object. Also
* sets the number of attributes correctly, if it isn't set up yet.
*
- * Return: Success: TRUE/FALSE whether message was found & retrieved
- * Failure: FAIL if error occurred
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 11 2007
*
*-------------------------------------------------------------------------
@@ -1790,8 +1719,8 @@ done:
htri_t
H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
{
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t ret_value; /* Return value */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1801,41 +1730,40 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
HDassert(ainfo);
/* Check if the "attribute info" message exists */
- if((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header")
- if(ret_value > 0) {
+ if ((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header")
+ if (ret_value > 0) {
/* Retrieve the "attribute info" structure */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_AINFO_ID, ainfo))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message")
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_AINFO_ID, ainfo))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message")
/* Check if we don't know how many attributes there are */
- if(ainfo->nattrs == HSIZET_MAX) {
+ if (ainfo->nattrs == HSIZET_MAX) {
/* Check if we are using "dense" attribute storage */
- if(H5F_addr_defined(ainfo->fheap_addr)) {
+ if (H5F_addr_defined(ainfo->fheap_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
/* (should be same # of records in all indices) */
- if(H5B2_get_nrec(bt2_name, &ainfo->nattrs) < 0)
+ if (H5B2_get_nrec(bt2_name, &ainfo->nattrs) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index")
} /* end if */
else
/* Retrieve # of attributes from object header */
ainfo->nattrs = oh->attr_msgs_seen;
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_get_ainfo() */
-
/*-------------------------------------------------------------------------
* Function: H5A_set_version
*
@@ -1843,11 +1771,9 @@ done:
* Chooses the oldest version possible, unless the "use the
* latest format" flag is set.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2007
*
*-------------------------------------------------------------------------
@@ -1855,8 +1781,9 @@ done:
herr_t
H5A_set_version(const H5F_t *f, H5A_t *attr)
{
- hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ hbool_t type_shared,
+ space_shared; /* Flags to indicate that shared messages are used for this attribute */
+ hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
FUNC_ENTER_NOAPI_NOERR
@@ -1868,30 +1795,30 @@ H5A_set_version(const H5F_t *f, H5A_t *attr)
use_latest_format = H5F_USE_LATEST_FORMAT(f);
/* Check whether datatype and dataspace are shared */
- if(H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
+ if (H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
type_shared = TRUE;
else
type_shared = FALSE;
- if(H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds) > 0)
+ if (H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds) > 0)
space_shared = TRUE;
else
space_shared = FALSE;
/* Check which version to encode attribute with */
- if(use_latest_format)
- attr->shared->version = H5O_ATTR_VERSION_LATEST; /* Write out latest version of format */
- else if(attr->shared->encoding != H5T_CSET_ASCII)
- attr->shared->version = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */
- else if(type_shared || space_shared)
- attr->shared->version = H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */
+ if (use_latest_format)
+ attr->shared->version = H5O_ATTR_VERSION_LATEST; /* Write out latest version of format */
+ else if (attr->shared->encoding != H5T_CSET_ASCII)
+ attr->shared->version = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */
+ else if (type_shared || space_shared)
+ attr->shared->version =
+ H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */
else
- attr->shared->version = H5O_ATTR_VERSION_1; /* Write out basic version */
+ attr->shared->version = H5O_ATTR_VERSION_1; /* Write out basic version */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A_set_version() */
-
/*-------------------------------------------------------------------------
* Function: H5A_attr_copy_file
*
@@ -1913,21 +1840,21 @@ H5A_set_version(const H5F_t *f, H5A_t *attr)
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t *cpy_info, hid_t dxpl_id)
+H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info,
+ hid_t dxpl_id)
{
- H5A_t *attr_dst = NULL;
+ H5A_t *attr_dst = NULL;
/* for dataype conversion */
- hid_t tid_src = -1; /* Datatype ID for source datatype */
- hid_t tid_dst = -1; /* Datatype ID for destination datatype */
- hid_t tid_mem = -1; /* Datatype ID for memory datatype */
- void *buf = NULL; /* Buffer for copying data */
- void *reclaim_buf = NULL; /* Buffer for reclaiming data */
- void *bkg_buf = NULL; /* Background buffer */
- hid_t buf_sid = -1; /* ID for buffer dataspace */
+ hid_t tid_src = -1; /* Datatype ID for source datatype */
+ hid_t tid_dst = -1; /* Datatype ID for destination datatype */
+ hid_t tid_mem = -1; /* Datatype ID for memory datatype */
+ void *buf = NULL; /* Buffer for copying data */
+ void *reclaim_buf = NULL; /* Buffer for reclaiming data */
+ void *bkg_buf = NULL; /* Background buffer */
+ hid_t buf_sid = -1; /* ID for buffer dataspace */
- H5A_t *ret_value; /* Return value */
+ H5A_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1938,13 +1865,13 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
HDassert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
- if(NULL == (attr_dst = H5FL_CALLOC(H5A_t)))
+ if (NULL == (attr_dst = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the top level of the attribute */
*attr_dst = *attr_src;
- if(NULL == (attr_dst->shared = H5FL_CALLOC(H5A_shared_t)))
+ if (NULL == (attr_dst->shared = H5FL_CALLOC(H5A_shared_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure")
/* Don't have an opened group location for copy */
@@ -1963,21 +1890,21 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
/* Copy attribute's datatype */
/* If source is named, we will keep dst as named, but we will not actually
* copy the target and update the message until post copy */
- if(NULL == (attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL)))
+ if (NULL == (attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "cannot copy datatype")
/* Set the location of the destination datatype */
- if(H5T_set_loc(attr_dst->shared->dt, file_dst, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(attr_dst->shared->dt, file_dst, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "cannot mark datatype on disk")
- if(!H5T_committed(attr_src->shared->dt)) {
+ if (!H5T_committed(attr_src->shared->dt)) {
/* If the datatype is not named, it may have been shared in the
* source file's heap. Un-share it for now. We'll try to shared
* it in the destination file below.
*/
- if(H5O_msg_reset_share(H5O_DTYPE_ID, attr_dst->shared->dt) < 0)
+ if (H5O_msg_reset_share(H5O_DTYPE_ID, attr_dst->shared->dt) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing")
- } /* end if */
+ }
/* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied.
* Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */
@@ -1987,17 +1914,17 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
/* Reset the dataspace's sharing in the source file before trying to share
* it in the destination.
*/
- if(H5O_msg_reset_share(H5O_SDSPACE_ID, attr_dst->shared->ds) < 0)
+ if (H5O_msg_reset_share(H5O_SDSPACE_ID, attr_dst->shared->ds) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset dataspace sharing")
/* Simulate trying to share both the datatype and dataset, to determine the
* final size of the messages. This does nothing if the datatype is
* committed or sharing is disabled.
*/
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype")
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace")
+ if (H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype")
+ if (H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace")
/* Compute the sizes of the datatype and dataspace. This is their raw
* size unless they're shared.
@@ -2009,7 +1936,8 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
/* Check whether to recompute the size of the attribute */
/* (happens when the datatype or dataspace changes sharing status) */
- if(attr_dst->shared->dt_size != attr_src->shared->dt_size || attr_dst->shared->ds_size != attr_src->shared->ds_size)
+ if (attr_dst->shared->dt_size != attr_src->shared->dt_size ||
+ attr_dst->shared->ds_size != attr_src->shared->ds_size)
*recompute_size = TRUE;
/* Compute the size of the data */
@@ -2017,57 +1945,64 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
* expecting overflow here, we should implement testing similar to
* that described in CERT bulletins INT30-C and INT32-C.
*/
- H5_CHECKED_ASSIGN(attr_dst->shared->data_size, size_t, H5S_GET_EXTENT_NPOINTS(attr_dst->shared->ds) * H5T_get_size(attr_dst->shared->dt), hssize_t);
+ H5_CHECKED_ASSIGN(attr_dst->shared->data_size, size_t,
+ H5S_GET_EXTENT_NPOINTS(attr_dst->shared->ds) * H5T_get_size(attr_dst->shared->dt),
+ hssize_t);
/* Copy (& convert) the data, if necessary */
- if(attr_src->shared->data) {
- if(NULL == (attr_dst->shared->data = H5FL_BLK_MALLOC(attr_buf, attr_dst->shared->data_size)))
+ if (attr_src->shared->data) {
+ if (NULL == (attr_dst->shared->data = H5FL_BLK_MALLOC(attr_buf, attr_dst->shared->data_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Check if we need to convert data */
- if(H5T_detect_class(attr_src->shared->dt, H5T_VLEN, FALSE) > 0) {
- H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
- H5T_t *dt_mem; /* Memory datatype */
- size_t src_dt_size; /* Source datatype size */
- size_t tmp_dt_size; /* Temp. datatype size */
- size_t max_dt_size; /* Max atatype size */
- H5S_t *buf_space; /* Dataspace describing buffer */
- hsize_t buf_dim; /* Dimension for buffer */
- size_t nelmts; /* Number of elements in buffer */
- size_t buf_size; /* Size of copy buffer */
+ if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, FALSE) > 0) {
+ H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
+ H5T_t * dt_mem; /* Memory datatype */
+ size_t src_dt_size; /* Source datatype size */
+ size_t tmp_dt_size; /* Temp. datatype size */
+ size_t max_dt_size; /* Max atatype size */
+ H5S_t * buf_space; /* Dataspace describing buffer */
+ hsize_t buf_dim; /* Dimension for buffer */
+ size_t nelmts; /* Number of elements in buffer */
+ size_t buf_size; /* Size of copy buffer */
/* Create datatype ID for src datatype */
- if((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source file datatype")
/* create a memory copy of the variable-length datatype */
- if(NULL == (dt_mem = H5T_copy(attr_src->shared->dt, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_mem = H5T_copy(attr_src->shared->dt, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy")
- if((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0)
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register memory datatype")
/* create variable-length datatype at the destinaton file */
- if((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register destination file datatype")
+ if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, FALSE)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
+ "unable to register destination file datatype")
/* Set up the conversion functions */
- if(NULL == (tpath_src_mem = H5T_path_find(attr_src->shared->dt, dt_mem, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to convert between src and mem datatypes")
- if(NULL == (tpath_mem_dst = H5T_path_find(dt_mem, attr_dst->shared->dt, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to convert between mem and dst datatypes")
+ if (NULL ==
+ (tpath_src_mem = H5T_path_find(attr_src->shared->dt, dt_mem, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL,
+ "unable to convert between src and mem datatypes")
+ if (NULL ==
+ (tpath_mem_dst = H5T_path_find(dt_mem, attr_dst->shared->dt, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL,
+ "unable to convert between mem and dst datatypes")
/* Determine largest datatype size */
- if(0 == (src_dt_size = H5T_get_size(attr_src->shared->dt)))
+ if (0 == (src_dt_size = H5T_get_size(attr_src->shared->dt)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size")
- if(0 == (tmp_dt_size = H5T_get_size(dt_mem)))
+ if (0 == (tmp_dt_size = H5T_get_size(dt_mem)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size")
max_dt_size = MAX(src_dt_size, tmp_dt_size);
- if(0 == (tmp_dt_size = H5T_get_size(attr_dst->shared->dt)))
+ if (0 == (tmp_dt_size = H5T_get_size(attr_dst->shared->dt)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size")
max_dt_size = MAX(max_dt_size, tmp_dt_size);
/* Set number of whole elements that fit in buffer */
- if(0 == (nelmts = attr_src->shared->data_size / src_dt_size))
+ if (0 == (nelmts = attr_src->shared->data_size / src_dt_size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "element size too large")
/* Set up number of bytes to copy, and initial buffer size */
@@ -2077,100 +2012,101 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
buf_dim = nelmts;
/* Create the space and set the initial extent */
- if(NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
+ if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace")
/* Atomize */
- if((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, NULL, "unable to register dataspace ID")
} /* end if */
/* Allocate memory for recclaim buf */
- if(NULL == (reclaim_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
+ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk")
/* Allocate memory for copying the chunk */
- if(NULL == (buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
+ if (NULL == (buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk")
HDmemcpy(buf, attr_src->shared->data, attr_src->shared->data_size);
/* Allocate background memory */
- if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) {
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
+ if (H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) {
+ if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
}
/* Convert from source file to memory */
- if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed")
HDmemcpy(reclaim_buf, buf, buf_size);
/* Set background buffer to all zeros */
- if(bkg_buf)
+ if (bkg_buf)
HDmemset(bkg_buf, 0, buf_size);
/* Convert from memory to destination file */
- if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed")
HDmemcpy(attr_dst->shared->data, buf, attr_dst->shared->data_size);
- if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
+ if (H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data")
- } /* end if */
+ } /* end if */
else {
HDassert(attr_dst->shared->data_size == attr_src->shared->data_size);
HDmemcpy(attr_dst->shared->data, attr_src->shared->data, attr_src->shared->data_size);
} /* end else */
- } /* end if(attr_src->shared->data) */
+ } /* end if(attr_src->shared->data) */
/* Copy the creation order */
attr_dst->shared->crt_idx = attr_src->shared->crt_idx;
/* Recompute the version to encode the destination attribute */
- if(H5A_set_version(file_dst, attr_dst) < 0)
+ if (H5A_set_version(file_dst, attr_dst) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version")
/* Recompute the destination attribute's size, if it's a different version */
- if(attr_src->shared->version != attr_dst->shared->version)
+ if (attr_src->shared->version != attr_dst->shared->version)
*recompute_size = TRUE;
/* Set return value */
ret_value = attr_dst;
done:
- if(buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
+ if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "Can't decrement temporary dataspace ID")
- if(tid_src > 0)
+ if (tid_src > 0)
/* Don't decrement ID, we want to keep underlying datatype */
- if(NULL == H5I_remove(tid_src))
+ if (NULL == H5I_remove(tid_src))
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "Can't decrement temporary datatype ID")
- if(tid_dst > 0)
+ if (tid_dst > 0)
/* Don't decrement ID, we want to keep underlying datatype */
- if(NULL == H5I_remove(tid_dst))
+ if (NULL == H5I_remove(tid_dst))
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "Can't decrement temporary datatype ID")
- if(tid_mem > 0)
+ if (tid_mem > 0)
/* Decrement the memory datatype ID, it's transient */
- if(H5I_dec_ref(tid_mem) < 0)
+ if (H5I_dec_ref(tid_mem) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "Can't decrement temporary datatype ID")
- if(buf)
+ if (buf)
buf = H5FL_BLK_FREE(attr_buf, buf);
- if(reclaim_buf)
+ if (reclaim_buf)
reclaim_buf = H5FL_BLK_FREE(attr_buf, reclaim_buf);
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
/* Release destination attribute information on failure */
- if(!ret_value && attr_dst && H5A_close(attr_dst) < 0)
+ if (!ret_value && attr_dst && H5A_close(attr_dst) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_attr_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5A_attr_post_copy_file
*
@@ -2180,7 +2116,7 @@ done:
* an object may have a reference attribute that points to the
* object itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Peter Cao
* March 6, 2005
@@ -2188,11 +2124,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
- H5O_loc_t *dst_oloc, const H5A_t *attr_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_loc_t *dst_oloc,
+ const H5A_t *attr_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- H5F_t *file_src, *file_dst;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file_src, *file_dst;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2208,9 +2144,9 @@ H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
HDassert(file_src);
HDassert(file_dst);
- if(H5T_committed(attr_src->shared->dt)) {
- H5O_loc_t *src_oloc_dt; /* Pointer to source datatype's object location */
- H5O_loc_t *dst_oloc_dt; /* Pointer to dest. datatype's object location */
+ if (H5T_committed(attr_src->shared->dt)) {
+ H5O_loc_t *src_oloc_dt; /* Pointer to source datatype's object location */
+ H5O_loc_t *dst_oloc_dt; /* Pointer to dest. datatype's object location */
/* Get group entries for source & destination */
src_oloc_dt = H5T_oloc(attr_src->shared->dt);
@@ -2223,40 +2159,43 @@ H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
dst_oloc_dt->file = file_dst;
/* Copy the shared object from source to destination */
- if(H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, dxpl_id, cpy_info, FALSE, NULL, NULL) < 0)
+ if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, dxpl_id, cpy_info, FALSE, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Update shared message info from named datatype info */
H5T_update_shared(attr_dst->shared->dt);
- } /* end if */
+ }
/* Try to share both the datatype and dataset. This does nothing if the
* datatype is committed or sharing is disabled.
*/
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
+ if (H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) <
+ 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute datatype")
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
+ if (H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_SDSPACE_ID, attr_dst->shared->ds,
+ NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute dataspace")
/* Only need to fix reference attribute with real data being copied to
* another file.
*/
- if((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, FALSE) == H5T_REFERENCE) ) {
+ if ((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, FALSE) == H5T_REFERENCE)) {
/* copy object pointed by reference. The current implementation does not
* deal with nested reference such as reference in a compound structure
*/
/* Check for expanding references */
- if(cpy_info->expand_ref) {
+ if (cpy_info->expand_ref) {
size_t ref_count;
/* Determine # of reference elements to copy */
ref_count = attr_dst->shared->data_size / H5T_get_size(attr_dst->shared->dt);
/* Copy objects referenced in source buffer to destination file and set destination elements */
- if(H5O_copy_expand_ref(file_src, attr_dst->shared->data, dxpl_id,
- file_dst, attr_dst->shared->data, ref_count, H5T_get_ref_type(attr_dst->shared->dt), cpy_info) < 0)
+ if (H5O_copy_expand_ref(file_src, attr_dst->shared->data, dxpl_id, file_dst,
+ attr_dst->shared->data, ref_count, H5T_get_ref_type(attr_dst->shared->dt),
+ cpy_info) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
} /* end if */
else
@@ -2268,7 +2207,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A_attr_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_post_copy_file_cb
*
@@ -2278,7 +2216,6 @@ done:
* Failure: Negative
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* July 20, 2007
*
*-------------------------------------------------------------------------
@@ -2286,9 +2223,9 @@ done:
static herr_t
H5A_dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
{
- H5A_dense_file_cp_ud_t *udata = (H5A_dense_file_cp_ud_t *)_udata;
- H5A_t *attr_dst = NULL;
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5A_dense_file_cp_ud_t *udata = (H5A_dense_file_cp_ud_t *)_udata;
+ H5A_t * attr_dst = NULL;
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2299,30 +2236,29 @@ H5A_dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
HDassert(udata->file);
HDassert(udata->cpy_info);
- if(NULL == (attr_dst = H5A_attr_copy_file(attr_src, udata->file,
- udata->recompute_size, udata->cpy_info, udata->dxpl_id)))
+ if (NULL == (attr_dst = H5A_attr_copy_file(attr_src, udata->file, udata->recompute_size, udata->cpy_info,
+ udata->dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
- if(H5A_attr_post_copy_file(udata->oloc_src, attr_src, udata->oloc_dst, attr_dst,
- udata->dxpl_id, udata->cpy_info) < 0)
+ if (H5A_attr_post_copy_file(udata->oloc_src, attr_src, udata->oloc_dst, attr_dst, udata->dxpl_id,
+ udata->cpy_info) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
/* Reset shared location information */
- if(H5O_msg_reset_share(H5O_ATTR_ID, attr_dst) < 0)
+ if (H5O_msg_reset_share(H5O_ATTR_ID, attr_dst) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing")
/* Insert attribute into dense storage */
- if(H5A_dense_insert(udata->file, udata->dxpl_id, udata->ainfo, attr_dst) < 0)
+ if (H5A_dense_insert(udata->file, udata->dxpl_id, udata->ainfo, attr_dst) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to add to dense storage")
done:
- if(attr_dst && H5A_close(attr_dst) < 0)
+ if (attr_dst && H5A_close(attr_dst) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close destination attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_post_copy_file_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5A_dense_post_copy_file_all
*
@@ -2332,19 +2268,18 @@ done:
* Failure: Negative
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* July 20, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo_src,
- H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo_src, H5O_loc_t *dst_oloc,
+ H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- hbool_t recompute_size = FALSE; /* recompute the size */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ hbool_t recompute_size = FALSE; /* recompute the size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2352,72 +2287,69 @@ H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo
HDassert(ainfo_src);
HDassert(ainfo_dst);
- udata.ainfo = ainfo_dst; /* Destination dense information */
- udata.file = dst_oloc->file; /* Destination file */
- udata.recompute_size = &recompute_size; /* Flag to indicate if size changed */
- udata.cpy_info = cpy_info; /* Information on copying options */
- udata.dxpl_id = dxpl_id; /* DXPL for operation */
- udata.oloc_src = src_oloc;
- udata.oloc_dst = dst_oloc;
+ udata.ainfo = ainfo_dst; /* Destination dense information */
+ udata.file = dst_oloc->file; /* Destination file */
+ udata.recompute_size = &recompute_size; /* Flag to indicate if size changed */
+ udata.cpy_info = cpy_info; /* Information on copying options */
+ udata.dxpl_id = dxpl_id; /* DXPL for operation */
+ udata.oloc_src = src_oloc;
+ udata.oloc_dst = dst_oloc;
- attr_op.op_type = H5A_ATTR_OP_LIB;
+ attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5A_dense_post_copy_file_cb;
-
- if(H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
+ if (H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME, H5_ITER_NATIVE,
+ (hsize_t)0, NULL, &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_post_copy_file_all */
-
/*-------------------------------------------------------------------------
- * Function: H5A_rename_by_name
+ * Function: H5A_rename_by_name
*
* Purpose: Private version of H5Arename_by_name
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* February 20, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name,
- const char *new_attr_name, hid_t lapl_id, hid_t dxpl_id)
+H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name, const char *new_attr_name,
+ hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Avoid thrashing things if the names are the same */
- if(HDstrcmp(old_attr_name, new_attr_name)) {
+ if (HDstrcmp(old_attr_name, new_attr_name)) {
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
obj_loc.path = &obj_path;
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Call attribute rename routine */
- if(H5O_attr_rename(obj_loc.oloc, dxpl_id, old_attr_name, new_attr_name) < 0)
+ if (H5O_attr_rename(obj_loc.oloc, dxpl_id, old_attr_name, new_attr_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
done:
/* Release resources */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index 84b82fe..aa28562 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,72 +30,70 @@
* Define this to enable debugging.
*/
#ifdef NDEBUG
-# undef H5A_DEBUG
+#undef H5A_DEBUG
#endif
/* Get package's private header */
#include "H5Aprivate.h"
/* Other private headers needed by this file */
-#include "H5B2private.h" /* v2 B-trees */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HFprivate.h" /* Fractal heaps */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspace */
-#include "H5Tprivate.h" /* Datatype functions */
-
+#include "H5B2private.h" /* v2 B-trees */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFprivate.h" /* Fractal heaps */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspace */
+#include "H5Tprivate.h" /* Datatype functions */
/**************************/
/* Package Private Macros */
/**************************/
/* This is the initial version, which does not have support for shared datatypes */
-#define H5O_ATTR_VERSION_1 1
+#define H5O_ATTR_VERSION_1 1
/* This version allows support for shared datatypes & dataspaces by adding a
* 'flag' byte indicating when those components are shared. This version
* also dropped the alignment on all the components.
*/
-#define H5O_ATTR_VERSION_2 2
+#define H5O_ATTR_VERSION_2 2
/* Add support for different character encodings of attribute names */
-#define H5O_ATTR_VERSION_3 3
+#define H5O_ATTR_VERSION_3 3
/* The latest version of the format. Look through the 'encode', 'decode'
* and 'size' message callbacks for places to change when updating this.
*/
#define H5O_ATTR_VERSION_LATEST H5O_ATTR_VERSION_3
-
/****************************/
/* Package Private Typedefs */
/****************************/
/* Define the shared attribute structure */
typedef struct H5A_shared_t {
- uint8_t version; /* Version to encode attribute with */
+ uint8_t version; /* Version to encode attribute with */
- char *name; /* Attribute's name */
- H5T_cset_t encoding; /* Character encoding of attribute name */
+ char * name; /* Attribute's name */
+ H5T_cset_t encoding; /* Character encoding of attribute name */
- H5T_t *dt; /* Attribute's datatype */
- size_t dt_size; /* Size of datatype on disk */
+ H5T_t *dt; /* Attribute's datatype */
+ size_t dt_size; /* Size of datatype on disk */
- H5S_t *ds; /* Attribute's dataspace */
- size_t ds_size; /* Size of dataspace on disk */
+ H5S_t *ds; /* Attribute's dataspace */
+ size_t ds_size; /* Size of dataspace on disk */
- void *data; /* Attribute data (on a temporary basis) */
- size_t data_size; /* Size of data on disk */
- H5O_msg_crt_idx_t crt_idx; /* Attribute's creation index in the object header */
- unsigned nrefs; /* Ref count for times this object is referred */
+ void * data; /* Attribute data (on a temporary basis) */
+ size_t data_size; /* Size of data on disk */
+ H5O_msg_crt_idx_t crt_idx; /* Attribute's creation index in the object header */
+ unsigned nrefs; /* Ref count for times this object is referred */
} H5A_shared_t;
/* Define the main attribute structure */
struct H5A_t {
- H5O_shared_t sh_loc; /* Shared message info (must be first) */
- H5O_loc_t oloc; /* Object location for object attribute is on */
- hbool_t obj_opened; /* Object header entry opened? */
- H5G_name_t path; /* Group hierarchy path */
- H5A_shared_t *shared; /* Shared attribute information */
+ H5O_shared_t sh_loc; /* Shared message info (must be first) */
+ H5O_loc_t oloc; /* Object location for object attribute is on */
+ hbool_t obj_opened; /* Object header entry opened? */
+ H5G_name_t path; /* Group hierarchy path */
+ H5A_shared_t *shared; /* Shared attribute information */
};
/* Typedefs for "dense" attribute storage */
@@ -104,18 +102,18 @@ struct H5A_t {
/* Typedef for native 'name' field index records in the v2 B-tree */
/* (Keep 'id' field first so generic record handling in callbacks works) */
typedef struct H5A_dense_bt2_name_rec_t {
- H5O_fheap_id_t id; /* Heap ID for attribute */
- uint8_t flags; /* Object header message flags for attribute */
- H5O_msg_crt_idx_t corder; /* 'creation order' field value */
- uint32_t hash; /* Hash of 'name' field value */
+ H5O_fheap_id_t id; /* Heap ID for attribute */
+ uint8_t flags; /* Object header message flags for attribute */
+ H5O_msg_crt_idx_t corder; /* 'creation order' field value */
+ uint32_t hash; /* Hash of 'name' field value */
} H5A_dense_bt2_name_rec_t;
/* Typedef for native 'creation order' field index records in the v2 B-tree */
/* (Keep 'id' field first so generic record handling in callbacks works) */
typedef struct H5A_dense_bt2_corder_rec_t {
- H5O_fheap_id_t id; /* Heap ID for attribute */
- uint8_t flags; /* Object header message flags for attribute */
- H5O_msg_crt_idx_t corder; /* 'creation order' field value */
+ H5O_fheap_id_t id; /* Heap ID for attribute */
+ uint8_t flags; /* Object header message flags for attribute */
+ H5O_msg_crt_idx_t corder; /* 'creation order' field value */
} H5A_dense_bt2_corder_rec_t;
/* Define the 'found' callback function pointer for matching an attribute record in a v2 B-tree */
@@ -128,16 +126,16 @@ typedef herr_t (*H5A_bt2_found_t)(const H5A_t *attr, hbool_t *took_ownership, vo
*/
typedef struct H5A_bt2_ud_common_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
- const char *name; /* Name of attribute to compare */
- uint32_t name_hash; /* Hash of name of attribute to compare */
- uint8_t flags; /* Flags for attribute storage location */
- H5O_msg_crt_idx_t corder; /* Creation order value of attribute to compare */
- H5A_bt2_found_t found_op; /* Callback when correct attribute is found */
- void *found_op_data; /* Callback data when correct attribute is found */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t * fheap; /* Fractal heap handle */
+ H5HF_t * shared_fheap; /* Fractal heap handle for shared messages */
+ const char * name; /* Name of attribute to compare */
+ uint32_t name_hash; /* Hash of name of attribute to compare */
+ uint8_t flags; /* Flags for attribute storage location */
+ H5O_msg_crt_idx_t corder; /* Creation order value of attribute to compare */
+ H5A_bt2_found_t found_op; /* Callback when correct attribute is found */
+ void * found_op_data; /* Callback data when correct attribute is found */
} H5A_bt2_ud_common_t;
/*
@@ -146,17 +144,16 @@ typedef struct H5A_bt2_ud_common_t {
*/
typedef struct H5A_bt2_ud_ins_t {
/* downward */
- H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
- H5O_fheap_id_t id; /* Heap ID of attribute to insert */
+ H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
+ H5O_fheap_id_t id; /* Heap ID of attribute to insert */
} H5A_bt2_ud_ins_t;
/* Data structure to hold table of attributes for an object */
typedef struct {
- size_t nattrs; /* # of attributes in table */
- H5A_t **attrs; /* Pointer to array of attribute pointers */
+ size_t nattrs; /* # of attributes in table */
+ H5A_t **attrs; /* Pointer to array of attribute pointers */
} H5A_attr_table_t;
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -176,7 +173,6 @@ H5_DLLVAR const H5B2_class_t H5A_BT2_NAME[1];
/* The v2 B-tree class for indexing 'creation order' field on attributes */
H5_DLLVAR const H5B2_class_t H5A_BT2_CORDER[1];
-
/******************************/
/* Package Private Prototypes */
/******************************/
@@ -184,89 +180,76 @@ H5_DLLVAR const H5B2_class_t H5A_BT2_CORDER[1];
/* Function prototypes for H5A package scope */
H5_DLL herr_t H5A_init(void);
H5_DLL herr_t H5A__term_deprec_interface(void);
-H5_DLL H5A_t *H5A_create(const H5G_loc_t *loc, const char *name,
- const H5T_t *type, const H5S_t *space, hid_t acpl_id, hid_t dxpl_id);
-H5_DLL H5A_t *H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name,
- const char *attr_name, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL H5A_t *H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5A_open_common(const H5G_loc_t *loc, H5A_t *attr);
-H5_DLL herr_t H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id);
-H5_DLL herr_t H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id);
+H5_DLL H5A_t *H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type, const H5S_t *space,
+ hid_t acpl_id, hid_t dxpl_id);
+H5_DLL H5A_t *H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL H5A_t * H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5A_open_common(const H5G_loc_t *loc, H5A_t *attr);
+H5_DLL herr_t H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id);
+H5_DLL herr_t H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id);
H5_DLL ssize_t H5A_get_name(H5A_t *attr, size_t buf_size, char *buf);
H5_DLL H5A_t *H5A_copy(H5A_t *new_attr, const H5A_t *old_attr);
H5_DLL herr_t H5A_get_info(const H5A_t *attr, H5A_info_t *ainfo);
-H5_DLL hid_t H5A_get_create_plist(H5A_t* attr);
+H5_DLL hid_t H5A_get_create_plist(H5A_t *attr);
H5_DLL herr_t H5A_free(H5A_t *attr);
H5_DLL herr_t H5A_close(H5A_t *attr);
H5_DLL htri_t H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo);
H5_DLL herr_t H5A_set_version(const H5F_t *f, H5A_t *attr);
H5_DLL herr_t H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name,
- const char *new_attr_name, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL htri_t H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
- hid_t lapl_id, hid_t dxpl_id);
+ const char *new_attr_name, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL htri_t H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, hid_t lapl_id,
+ hid_t dxpl_id);
/* Attribute "dense" storage routines */
H5_DLL herr_t H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
-H5_DLL H5A_t *H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name);
-H5_DLL herr_t H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5A_t *attr);
-H5_DLL herr_t H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5A_t *attr);
-H5_DLL herr_t H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *old_name, const char *new_name);
-H5_DLL herr_t H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
- const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
- void *op_data);
-H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name);
-H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
-H5_DLL htri_t H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name);
+H5_DLL H5A_t *H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name);
+H5_DLL herr_t H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr);
+H5_DLL herr_t H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr);
+H5_DLL herr_t H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *old_name,
+ const char *new_name);
+H5_DLL herr_t H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainfo,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_attr,
+ const H5A_attr_iter_op_t *attr_op, void *op_data);
+H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name);
+H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n);
+H5_DLL htri_t H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name);
H5_DLL herr_t H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
-
/* Attribute table operations */
-H5_DLL herr_t H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable);
-H5_DLL herr_t H5A_dense_build_table(H5F_t *f, hid_t dxpl_id,
- const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- H5A_attr_table_t *atable);
-H5_DLL herr_t H5A_attr_iterate_table(const H5A_attr_table_t *atable,
- hsize_t skip, hsize_t *last_attr, hid_t loc_id,
- const H5A_attr_iter_op_t *attr_op, void *op_data);
+H5_DLL herr_t H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type,
+ H5_iter_order_t order, H5A_attr_table_t *atable);
+H5_DLL herr_t H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
+ H5_iter_order_t order, H5A_attr_table_t *atable);
+H5_DLL herr_t H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *last_attr,
+ hid_t loc_id, const H5A_attr_iter_op_t *attr_op, void *op_data);
H5_DLL herr_t H5A_attr_release_table(H5A_attr_table_t *atable);
/* Attribute operations */
H5_DLL herr_t H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr);
-H5_DLL H5A_t *H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name,
- hid_t dxpl_id);
-H5_DLL H5A_t *H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
-H5_DLL herr_t H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5A_t *attr, H5O_shared_t *sh_mesg);
-H5_DLL herr_t H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id,
- H5A_t *attr);
-H5_DLL herr_t H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id,
- const char *old_name, const char *new_name);
-H5_DLL herr_t H5O_attr_remove(const H5O_loc_t *loc, const char *name,
- hid_t dxpl_id);
-H5_DLL herr_t H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
+H5_DLL H5A_t *H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id);
+H5_DLL H5A_t *H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t dxpl_id);
+H5_DLL herr_t H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr, H5O_shared_t *sh_mesg);
+H5_DLL herr_t H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr);
+H5_DLL herr_t H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
+ const char *new_name);
+H5_DLL herr_t H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id);
+H5_DLL herr_t H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t dxpl_id);
H5_DLL htri_t H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id);
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL int H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
H5_DLL H5A_t *H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t *cpy_info, hid_t dxpl_id);
-H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,
- H5O_loc_t *dst_oloc, const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
- H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-
+ H5O_copy_t *cpy_info, hid_t dxpl_id);
+H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src, H5O_loc_t *dst_oloc,
+ const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
+H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo_src,
+ H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
/* Testing functions */
#ifdef H5A_TESTING
@@ -275,4 +258,3 @@ H5_DLL herr_t H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count);
#endif /* H5A_TESTING */
#endif /* _H5Apkg_H */
-
diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h
index b285920..f4ab31e 100644
--- a/src/H5Aprivate.h
+++ b/src/H5Aprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,17 +21,15 @@
#include "H5Apublic.h"
/* Private headers needed by this file */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspace */
-#include "H5Tprivate.h" /* Datatypes */
-
+#include "H5Gprivate.h" /* Groups */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspace */
+#include "H5Tprivate.h" /* Datatypes */
/**************************/
/* Library Private Macros */
/**************************/
-
/****************************/
/* Library Private Typedefs */
/****************************/
@@ -45,29 +43,27 @@ typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data);
/* Describe kind of callback to make for each attribute */
typedef enum H5A_attr_iter_op_type_t {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5A_ATTR_OP_APP, /* Application callback */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5A_ATTR_OP_APP2, /* Revised application callback */
- H5A_ATTR_OP_LIB /* Library internal callback */
+ H5A_ATTR_OP_APP, /* Application callback */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5A_ATTR_OP_APP2, /* Revised application callback */
+ H5A_ATTR_OP_LIB /* Library internal callback */
} H5A_attr_iter_op_type_t;
typedef struct H5A_attr_iter_op_t {
H5A_attr_iter_op_type_t op_type;
union {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5A_operator1_t app_op; /* Application callback for each attribute */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5A_operator2_t app_op2; /* Revised application callback for each attribute */
- H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */
+ H5A_operator1_t app_op; /* Application callback for each attribute */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5A_operator2_t app_op2; /* Revised application callback for each attribute */
+ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */
} u;
} H5A_attr_iter_op_t;
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
@@ -78,12 +74,10 @@ H5_DLL H5G_name_t *H5A_nameof(H5A_t *attr);
H5_DLL H5T_t *H5A_type(const H5A_t *attr);
H5_DLL H5T_t *H5A_get_type(H5A_t *attr);
H5_DLL H5S_t *H5A_get_space(H5A_t *attr);
-H5_DLL herr_t H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc,
- hid_t dxpl_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
- hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data);
-H5_DLL herr_t H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t skip, hsize_t *last_attr,
- const H5A_attr_iter_op_t *op, void *op_data);
+H5_DLL herr_t H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_attr,
+ const H5A_attr_iter_op_t *attr_op, void *op_data);
+H5_DLL herr_t H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *op, void *op_data);
#endif /* _H5Aprivate_H */
-
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 586940b..4e2f0d1 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,37 +18,42 @@
#define _H5Apublic_H
/* Public headers needed by this file */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Opublic.h" /* Object Headers */
-#include "H5Tpublic.h" /* Datatypes */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "H5Ipublic.h" /* IDs */
+#include "H5Opublic.h" /* Object Headers */
+#include "H5Tpublic.h" /* Datatypes */
/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
typedef struct {
- hbool_t corder_valid; /* Indicate if creation order is valid */
- H5O_msg_crt_idx_t corder; /* Creation order */
- H5T_cset_t cset; /* Character set of attribute name */
- hsize_t data_size; /* Size of raw data */
+ hbool_t corder_valid; /* Indicate if creation order is valid */
+ H5O_msg_crt_idx_t corder; /* Creation order */
+ H5T_cset_t cset; /* Character set of attribute name */
+ hsize_t data_size; /* Size of raw data */
} H5A_info_t;
/* Typedef for H5Aiterate2() callbacks */
-typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
- const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
+typedef herr_t (*H5A_operator2_t)(hid_t location_id /*in*/, const char *attr_name /*in*/,
+ const H5A_info_t *ainfo /*in*/, void *op_data /*in,out*/);
+
+/********************/
+/* Public Variables */
+/********************/
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+#ifdef __cplusplus
+extern "C" {
+#endif
-/* Public function prototypes */
-H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
- hid_t space_id, hid_t acpl_id, hid_t aapl_id);
-H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
+H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id,
+ hid_t aapl_id);
+H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id,
+ hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
-H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name,
- const char *attr_name, hid_t aapl_id, hid_t lapl_id);
-H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
- hid_t lapl_id);
+H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id,
+ hid_t lapl_id);
+H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t aapl_id, hid_t lapl_id);
H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf);
H5_DLL herr_t H5Aclose(hid_t attr_id);
@@ -56,32 +61,29 @@ H5_DLL hid_t H5Aget_space(hid_t attr_id);
H5_DLL hid_t H5Aget_type(hid_t attr_id);
H5_DLL hid_t H5Aget_create_plist(hid_t attr_id);
H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
-H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- char *name /*out*/, size_t size, hid_t lapl_id);
+H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, char *name /*out*/, size_t size,
+ hid_t lapl_id);
H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
-H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
- const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
-H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5A_info_t *ainfo /*out*/, hid_t lapl_id);
+H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
+ H5A_info_t *ainfo /*out*/, hid_t lapl_id);
+H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
-H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name,
- const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
-H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
+H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
+ const char *new_attr_name, hid_t lapl_id);
+H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,
+ H5A_operator2_t op, void *op_data);
H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
- hid_t lapd_id);
+ H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
+ hid_t lapd_id);
H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name);
-H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name,
- const char *attr_name, hid_t lapl_id);
-H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
+H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id);
+H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id);
H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
-H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
- const char *attr_name, hid_t lapl_id);
+H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *attr_name, hid_t lapl_id);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
@@ -91,22 +93,18 @@ H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
/* Macros */
-
/* Typedefs */
/* Typedef for H5Aiterate1() callbacks */
-typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
- const char *attr_name/*in*/, void *operator_data/*in,out*/);
-
+typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_name /*in*/,
+ void *operator_data /*in,out*/);
/* Function prototypes */
-H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
- hid_t space_id, hid_t acpl_id);
-H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name);
-H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
-H5_DLL int H5Aget_num_attrs(hid_t loc_id);
-H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
- void *op_data);
+H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id);
+H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name);
+H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
+H5_DLL int H5Aget_num_attrs(hid_t loc_id);
+H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -115,4 +113,3 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
#endif
#endif /* _H5Apublic_H */
-
diff --git a/src/H5Atest.c b/src/H5Atest.c
index a10f7ca..f0af88e 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -6,18 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5Atest.c
- * Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Atest.c
*
- * Purpose: Attribute testing routines.
+ * Purpose: Attribute testing routines.
*
*-------------------------------------------------------------------------
*/
@@ -26,63 +24,53 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5A_TESTING /*suppress warning about H5A testing funcs*/
-
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5A_TESTING /*suppress warning about H5A testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMprivate.h" /* Shared object header messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
- * Function: H5A_is_shared_test
+ * Function: H5A_is_shared_test
*
* Purpose: Check if an attribute is shared
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -92,13 +80,13 @@
htri_t
H5A_is_shared_test(hid_t attr_id)
{
- H5A_t *attr; /* Attribute object for ID */
- htri_t ret_value; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
/* Check if attribute is shared */
@@ -108,14 +96,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_is_shared_test() */
-
/*-------------------------------------------------------------------------
- * Function: H5A_get_shared_rc_test
+ * Function: H5A_get_shared_rc_test
*
* Purpose: Retrieve the refcount for a shared attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -125,24 +111,22 @@ done:
herr_t
H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
{
- H5A_t *attr; /* Attribute object for ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
+ if (NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
/* Sanity check */
HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
/* Retrieve ref count for shared or shareable attribute */
- if(H5SM_get_refcount(attr->oloc.file, H5AC_ind_dxpl_id, H5O_ATTR_ID,
- &attr->sh_loc, ref_count) < 0)
+ if (H5SM_get_refcount(attr->oloc.file, H5AC_ind_dxpl_id, H5O_ATTR_ID, &attr->sh_loc, ref_count) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_get_shared_rc_test() */
-
diff --git a/src/H5B.c b/src/H5B.c
index 5443155..4323861 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -6,86 +6,86 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5B.c
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5B.c
+ * Jul 10 1997
+ * Robb Matzke
*
- * Purpose: Implements balanced, sibling-linked, N-ary trees
- * capable of storing any type of data with unique key
- * values.
+ * Purpose: Implements balanced, sibling-linked, N-ary trees
+ * capable of storing any type of data with unique key
+ * values.
*
- * A B-link-tree is a balanced tree where each node has
- * a pointer to its left and right siblings. A
- * B-link-tree is a rooted tree having the following
- * properties:
+ * A B-link-tree is a balanced tree where each node has
+ * a pointer to its left and right siblings. A
+ * B-link-tree is a rooted tree having the following
+ * properties:
*
- * 1. Every node, x, has the following fields:
+ * 1. Every node, x, has the following fields:
*
- * a. level[x], the level in the tree at which node
- * x appears. Leaf nodes are at level zero.
+ * a. level[x], the level in the tree at which node
+ * x appears. Leaf nodes are at level zero.
*
- * b. n[x], the number of children pointed to by the
- * node. Internal nodes point to subtrees while
- * leaf nodes point to arbitrary data.
+ * b. n[x], the number of children pointed to by the
+ * node. Internal nodes point to subtrees while
+ * leaf nodes point to arbitrary data.
*
- * c. The child pointers themselves, child[x,i] such
- * that 0 <= i < n[x].
+ * c. The child pointers themselves, child[x,i] such
+ * that 0 <= i < n[x].
*
- * d. n[x]+1 key values stored in increasing
- * order:
+ * d. n[x]+1 key values stored in increasing
+ * order:
*
- * key[x,0] < key[x,1] < ... < key[x,n[x]].
+ * key[x,0] < key[x,1] < ... < key[x,n[x]].
*
- * e. left[x] is a pointer to the node's left sibling
- * or the null pointer if this is the left-most
- * node at this level in the tree.
+ * e. left[x] is a pointer to the node's left sibling
+ * or the null pointer if this is the left-most
+ * node at this level in the tree.
*
- * f. right[x] is a pointer to the node's right
- * sibling or the null pointer if this is the
- * right-most node at this level in the tree.
+ * f. right[x] is a pointer to the node's right
+ * sibling or the null pointer if this is the
+ * right-most node at this level in the tree.
*
- * 3. The keys key[x,i] partition the key spaces of the
- * children of x:
+ * 3. The keys key[x,i] partition the key spaces of the
+ * children of x:
*
- * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
+ * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
*
- * for any valid combination of i and j.
+ * for any valid combination of i and j.
*
- * 4. There are lower and upper bounds on the number of
- * child pointers a node can contain. These bounds
- * can be expressed in terms of a fixed integer k>=2
- * called the `minimum degree' of the B-tree.
+ * 4. There are lower and upper bounds on the number of
+ * child pointers a node can contain. These bounds
+ * can be expressed in terms of a fixed integer k>=2
+ * called the `minimum degree' of the B-tree.
*
- * a. Every node other than the root must have at least
- * k child pointers and k+1 keys. If the tree is
- * nonempty, the root must have at least one child
- * pointer and two keys.
+ * a. Every node other than the root must have at least
+ * k child pointers and k+1 keys. If the tree is
+ * nonempty, the root must have at least one child
+ * pointer and two keys.
*
- * b. Every node can contain at most 2k child pointers
- * and 2k+1 keys. A node is `full' if it contains
- * exactly 2k child pointers and 2k+1 keys.
+ * b. Every node can contain at most 2k child pointers
+ * and 2k+1 keys. A node is `full' if it contains
+ * exactly 2k child pointers and 2k+1 keys.
*
- * 5. When searching for a particular value, V, and
- * key[V] = key[x,i] for some node x and entry i,
- * then:
+ * 5. When searching for a particular value, V, and
+ * key[V] = key[x,i] for some node x and entry i,
+ * then:
*
- * a. If i=0 the child[0] is followed.
+ * a. If i=0 the child[0] is followed.
*
- * b. If i=n[x] the child[n[x]-1] is followed.
+ * b. If i=n[x] the child[n[x]-1] is followed.
*
- * c. Otherwise, the child that is followed
- * (either child[x,i-1] or child[x,i]) is
- * determined by the type of object to which the
- * leaf nodes of the tree point and is controlled
- * by the key comparison function registered for
- * that type of B-tree.
+ * c. Otherwise, the child that is followed
+ * (either child[x,i-1] or child[x,i]) is
+ * determined by the type of object to which the
+ * leaf nodes of the tree point and is controlled
+ * by the key comparison function registered for
+ * that type of B-tree.
*
*
*-------------------------------------------------------------------------
@@ -95,31 +95,32 @@
/* Module Setup */
/****************/
-#define H5B_PACKAGE /*suppress error about including H5Bpkg */
-
+#define H5B_PACKAGE /*suppress error about including H5Bpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Pprivate.h" /* Property lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-#define H5B_SIZEOF_HDR(F) \
- (H5_SIZEOF_MAGIC + /*magic number */ \
- 4 + /*type, level, num entries */ \
- 2*H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
+#define H5B_SIZEOF_HDR(F) \
+ (H5_SIZEOF_MAGIC + /*magic number */ \
+ 4 + /*type, level, num entries */ \
+ 2 * H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
/* Default initializer for H5B_ins_ud_t */
-#define H5B_INS_UD_T_NULL {NULL, HADDR_UNDEF, H5AC__NO_FLAGS_SET}
+#define H5B_INS_UD_T_NULL \
+ { \
+ NULL, HADDR_UNDEF, H5AC__NO_FLAGS_SET \
+ }
/******************/
/* Local Typedefs */
@@ -127,38 +128,30 @@
/* "user data" for iterating over B-tree (collects B-tree metadata size) */
typedef struct H5B_iter_ud_t {
- H5B_info_t *bt_info; /* Information about B-tree */
- void *udata; /* Node type's 'udata' for loading & iterator callback */
+ H5B_info_t *bt_info; /* Information about B-tree */
+ void * udata; /* Node type's 'udata' for loading & iterator callback */
} H5B_info_ud_t;
/* Convenience struct for the arguments needed to unprotect a b-tree after a
* call to H5B_iterate_helper() or H5B_split() */
typedef struct H5B_ins_ud_t {
- H5B_t *bt; /* B-tree */
- haddr_t addr; /* B-tree address */
- unsigned cache_flags; /* Cache flags for H5AC_unprotect() */
+ H5B_t * bt; /* B-tree */
+ haddr_t addr; /* B-tree address */
+ unsigned cache_flags; /* Cache flags for H5AC_unprotect() */
} H5B_ins_ud_t;
-
/********************/
/* Local Prototypes */
/********************/
-static H5B_ins_t H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
- const H5B_class_t *type,
- uint8_t *lt_key,
- hbool_t *lt_key_changed,
- uint8_t *md_key, void *udata,
- uint8_t *rt_key,
- hbool_t *rt_key_changed,
- H5B_ins_ud_t *split_bt_ud/*out*/);
-static herr_t H5B_insert_child(H5B_t *bt, unsigned *bt_flags,
- unsigned idx, haddr_t child,
- H5B_ins_t anchor, const void *md_key);
-static herr_t H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
- unsigned idx, void *udata,
- H5B_ins_ud_t *split_bt_ud/*out*/);
-static H5B_t * H5B_copy(const H5B_t *old_bt);
-
+static H5B_ins_t H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
+ uint8_t *lt_key, hbool_t *lt_key_changed, uint8_t *md_key, void *udata,
+ uint8_t *rt_key, hbool_t *rt_key_changed,
+ H5B_ins_ud_t *split_bt_ud /*out*/);
+static herr_t H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5B_ins_t anchor,
+ const void *md_key);
+static herr_t H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata,
+ H5B_ins_ud_t *split_bt_ud /*out*/);
+static H5B_t *H5B_copy(const H5B_t *old_bt);
/*********************/
/* Package Variables */
@@ -173,12 +166,10 @@ H5FL_BLK_DEFINE(native_block);
/* Declare a free list to manage the H5B_t struct */
H5FL_DEFINE(H5B_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -192,33 +183,29 @@ H5FL_BLK_DEFINE_STATIC(page);
/* Declare a free list to manage the native key offset sequence information */
H5FL_SEQ_DEFINE_STATIC(size_t);
-
-
/*-------------------------------------------------------------------------
- * Function: H5B_create
+ * Function: H5B_create
*
- * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
- * passed as an argument to the sizeof_rkey() method for the
- * B-tree.
+ * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
+ * passed as an argument to the sizeof_rkey() method for the
+ * B-tree.
*
- * Return: Success: Non-negative, and the address of new node is
- * returned through the ADDR_P argument.
+ * Return: Success: Non-negative, and the address of new node is
+ * returned through the ADDR_P argument.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
- haddr_t *addr_p/*out*/)
+H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out*/)
{
- H5B_t *bt = NULL;
- H5B_shared_t *shared=NULL; /* Pointer to shared B-tree info */
- herr_t ret_value = SUCCEED;
+ H5B_t * bt = NULL;
+ H5B_shared_t *shared = NULL; /* Pointer to shared B-tree info */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -232,82 +219,80 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
/*
* Allocate file and memory data structures.
*/
- if(NULL == (bt = H5FL_MALLOC(H5B_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ if (NULL == (bt = H5FL_MALLOC(H5B_t)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
- bt->level = 0;
- bt->left = HADDR_UNDEF;
- bt->right = HADDR_UNDEF;
+ bt->level = 0;
+ bt->left = HADDR_UNDEF;
+ bt->right = HADDR_UNDEF;
bt->nchildren = 0;
- if(NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
+ if (NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
H5RC_INC(bt->rc_shared);
- shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
+ shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
- if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
- NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node")
+ if (NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
+ NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ if (HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)shared->sizeof_rnode)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node")
/*
* Cache the new B-tree node.
*/
- if(H5AC_insert_entry(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
#ifdef H5B_DEBUG
H5B_assert(f, dxpl_id, *addr_p, shared->type, udata);
#endif
done:
- if(ret_value < 0) {
- if(shared && shared->sizeof_rnode>0) {
- H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
+ if (ret_value < 0) {
+ if (shared && shared->sizeof_rnode > 0) {
+ H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t);
(void)H5MF_xfree(f, H5FD_MEM_BTREE, dxpl_id, *addr_p, (hsize_t)shared->sizeof_rnode);
} /* end if */
- if(bt)
+ if (bt)
/* Destroy B-tree node */
- if(H5B_node_dest(bt) < 0)
+ if (H5B_node_dest(bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5B_create() */ /*lint !e818 Can't make udata a pointer to const */
+} /* end H5B_create() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
- * Function: H5B_find
+ * Function: H5B_find
*
- * Purpose: Locate the specified information in a B-tree and return
- * that information by filling in fields of the caller-supplied
- * UDATA pointer depending on the type of leaf node
- * requested. The UDATA can point to additional data passed
- * to the key comparison function.
+ * Purpose: Locate the specified information in a B-tree and return
+ * that information by filling in fields of the caller-supplied
+ * UDATA pointer depending on the type of leaf node
+ * requested. The UDATA can point to additional data passed
+ * to the key comparison function.
*
- * Note: This function does not follow the left/right sibling
- * pointers since it assumes that all nodes can be reached
- * from the parent node.
+ * Note: This function does not follow the left/right sibling
+ * pointers since it assumes that all nodes can be reached
+ * from the parent node.
*
- * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
+ * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
* through the UDATA argument). Negative on failure (if not found,
* UDATA is undefined).
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
htri_t
H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL;
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_t * bt = NULL;
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */
- int cmp = 1; /* Key comparison value */
- htri_t ret_value; /* Return value */
+ unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */
+ int cmp = 1; /* Key comparison value */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -322,8 +307,8 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u
HDassert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -331,79 +316,77 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u
* Perform a binary search to locate the child which contains
* the thing for which we're searching.
*/
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
rt = bt->nchildren;
- while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- /* compare */
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ while (lt < rt && cmp) {
+ idx = (lt + rt) / 2;
+ /* compare */
+ if ((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Check if not found */
- if(cmp)
- HGOTO_DONE(FALSE)
+ if (cmp)
+ HGOTO_DONE(FALSE)
/*
* Follow the link to the subtree or to the data node.
*/
HDassert(idx < bt->nchildren);
- if(bt->level > 0) {
- if((ret_value = H5B_find(f, dxpl_id, type, bt->child[idx], udata)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
+ if (bt->level > 0) {
+ if ((ret_value = H5B_find(f, dxpl_id, type, bt->child[idx], udata)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
} /* end if */
else {
- if((ret_value = (type->found)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
+ if ((ret_value = (type->found)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in leaf node")
} /* end else */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_find() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_split
+ * Function: H5B_split
*
- * Purpose: Split a single node into two nodes. The old node will
- * contain the left children and the new node will contain the
- * right children.
+ * Purpose: Split a single node into two nodes. The old node will
+ * contain the left children and the new node will contain the
+ * right children.
*
- * The UDATA pointer is passed to the sizeof_rkey() method but is
- * otherwise unused.
+ * The UDATA pointer is passed to the sizeof_rkey() method but is
+ * otherwise unused.
*
- * The BT_UD argument is a pointer to a protected B-tree
- * node.
+ * The BT_UD argument is a pointer to a protected B-tree
+ * node.
*
- * Return: Non-negative on success (The address of the new node is
+ * Return: Non-negative on success (The address of the new node is
* returned through the NEW_ADDR argument). Negative on failure.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 3 1997
+ * Programmer: Robb Matzke
+ * Jul 3 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
- void *udata, H5B_ins_ud_t *split_bt_ud/*out*/)
+H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata,
+ H5B_ins_ud_t *split_bt_ud /*out*/)
{
- H5P_genplist_t *dx_plist; /* Data transfer property list */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned nleft, nright; /* Number of keys in left & right halves */
- double split_ratios[3]; /* B-tree split ratios */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dx_plist; /* Data transfer property list */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ unsigned nleft, nright; /* Number of keys in left & right halves */
+ double split_ratios[3]; /* B-tree split ratios */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -425,27 +408,27 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
HDassert(bt_ud->bt->nchildren == shared->two_k);
/* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Get B-tree split ratios */
- if(H5P_get(dx_plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratios[0]) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratios[0]) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree split ratios")
#ifdef H5B_DEBUG
- if(H5DEBUG(B)) {
- const char *side;
-
- if(!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
- side = "ONLY";
- else if(!H5F_addr_defined(bt_ud->bt->right))
- side = "RIGHT";
- else if(!H5F_addr_defined(bt_ud->bt->left))
- side = "LEFT";
- else
- side = "MIDDLE";
- fprintf(H5DEBUG(B), "H5B_split: %3u {%5.3f,%5.3f,%5.3f} %6s",
- shared->two_k, split_ratios[0], split_ratios[1], split_ratios[2], side);
+ if (H5DEBUG(B)) {
+ const char *side;
+
+ if (!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
+ side = "ONLY";
+ else if (!H5F_addr_defined(bt_ud->bt->right))
+ side = "RIGHT";
+ else if (!H5F_addr_defined(bt_ud->bt->left))
+ side = "LEFT";
+ else
+ side = "MIDDLE";
+ HDfprintf(H5DEBUG(B), "H5B_split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0],
+ split_ratios[1], split_ratios[2], side);
}
#endif
@@ -453,38 +436,39 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
* Decide how to split the children of the old node among the old node
* and the new node.
*/
- if(!H5F_addr_defined(bt_ud->bt->right))
- nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
- else if(!H5F_addr_defined(bt_ud->bt->left))
- nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
+ if (!H5F_addr_defined(bt_ud->bt->right))
+ nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
+ else if (!H5F_addr_defined(bt_ud->bt->left))
+ nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
else
- nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
/*
* Keep the new child in the same node as the child that split. This can
* result in nodes that have an unused child when data is written
* sequentially, but it simplifies stuff below.
*/
- if(idx < nleft && nleft == shared->two_k)
- --nleft;
- else if(idx >= nleft && 0 == nleft)
- nleft++;
+ if (idx < nleft && nleft == shared->two_k)
+ --nleft;
+ else if (idx >= nleft && 0 == nleft)
+ nleft++;
nright = shared->two_k - nleft;
#ifdef H5B_DEBUG
- if(H5DEBUG(B))
- fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
+ if (H5DEBUG(B))
+ HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
#endif
/*
* Create the new B-tree node.
*/
- if(H5B_create(f, dxpl_id, shared->type, udata, &split_bt_ud->addr/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
- cache_udata.f = f;
- cache_udata.type = shared->type;
+ if (H5B_create(f, dxpl_id, shared->type, udata, &split_bt_ud->addr /*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
+ cache_udata.f = f;
+ cache_udata.type = shared->type;
cache_udata.rc_shared = bt_ud->bt->rc_shared;
- if(NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC_WRITE)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
+ if (NULL == (split_bt_ud->bt =
+ (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
split_bt_ud->bt->level = bt_ud->bt->level;
/*
@@ -492,12 +476,9 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
*/
split_bt_ud->cache_flags = H5AC__DIRTIED_FLAG;
- HDmemcpy(split_bt_ud->bt->native,
- bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
- (nright + 1) * shared->type->sizeof_nkey);
- HDmemcpy(split_bt_ud->bt->child,
- &bt_ud->bt->child[nleft],
- nright * sizeof(haddr_t));
+ HDmemcpy(split_bt_ud->bt->native, bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
+ (nright + 1) * shared->type->sizeof_nkey);
+ HDmemcpy(split_bt_ud->bt->child, &bt_ud->bt->child[nleft], nright * sizeof(haddr_t));
split_bt_ud->bt->nchildren = nright;
@@ -510,46 +491,46 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
/*
* Update other sibling pointers.
*/
- split_bt_ud->bt->left = bt_ud->addr;
+ split_bt_ud->bt->left = bt_ud->addr;
split_bt_ud->bt->right = bt_ud->bt->right;
- if(H5F_addr_defined(bt_ud->bt->right)) {
- H5B_t *tmp_bt;
+ if (H5F_addr_defined(bt_ud->bt->right)) {
+ H5B_t *tmp_bt;
- if(NULL == (tmp_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, &cache_udata, H5AC_WRITE)))
+ if (NULL ==
+ (tmp_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load right sibling")
tmp_bt->left = split_bt_ud->addr;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, tmp_bt, H5AC__DIRTIED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, tmp_bt, H5AC__DIRTIED_FLAG) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
} /* end if */
bt_ud->bt->right = split_bt_ud->addr;
done:
- if(ret_value < 0) {
- if(split_bt_ud->bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, split_bt_ud->bt, split_bt_ud->cache_flags) < 0)
+ if (ret_value < 0) {
+ if (split_bt_ud->bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, split_bt_ud->bt,
+ split_bt_ud->cache_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- split_bt_ud->bt = NULL;
- split_bt_ud->addr = HADDR_UNDEF;
+ split_bt_ud->bt = NULL;
+ split_bt_ud->addr = HADDR_UNDEF;
split_bt_ud->cache_flags = H5AC__NO_FLAGS_SET;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_split() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_insert
+ * Function: H5B_insert
*
- * Purpose: Adds a new item to the B-tree.
+ * Purpose: Adds a new item to the B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -559,22 +540,22 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
/*
* These are defined this way to satisfy alignment constraints.
*/
- uint64_t _lt_key[128], _md_key[128], _rt_key[128];
- uint8_t *lt_key=(uint8_t*)_lt_key;
- uint8_t *md_key=(uint8_t*)_md_key;
- uint8_t *rt_key=(uint8_t*)_rt_key;
-
- hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
- haddr_t old_root_addr = HADDR_UNDEF;
- unsigned level;
- H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
- H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */
- H5B_t *new_root_bt = NULL; /* New root node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- herr_t ret_value = SUCCEED;
+ uint64_t _lt_key[128], _md_key[128], _rt_key[128];
+ uint8_t *lt_key = (uint8_t *)_lt_key;
+ uint8_t *md_key = (uint8_t *)_md_key;
+ uint8_t *rt_key = (uint8_t *)_rt_key;
+
+ hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
+ haddr_t old_root_addr = HADDR_UNDEF;
+ unsigned level;
+ H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
+ H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */
+ H5B_t * new_root_bt = NULL; /* New root node */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -585,27 +566,26 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
HDassert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/* Protect the root node */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- bt_ud.addr = addr;
- if(NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
+ bt_ud.addr = addr;
+ if (NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to locate root of B-tree")
/* Insert the object */
- if((int)(my_ins = H5B_insert_helper(f, dxpl_id, &bt_ud, type, lt_key,
- &lt_key_changed, md_key, udata, rt_key, &rt_key_changed,
- &split_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
+ if ((int)(my_ins = H5B_insert_helper(f, dxpl_id, &bt_ud, type, lt_key, &lt_key_changed, md_key, udata,
+ rt_key, &rt_key_changed, &split_bt_ud /*out*/)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
/* Check if the root node split */
- if(H5B_INS_NOOP == my_ins) {
+ if (H5B_INS_NOOP == my_ins) {
HDassert(!split_bt_ud.bt);
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -617,37 +597,38 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
level = bt_ud.bt->level;
/* update left and right keys */
- if(!lt_key_changed)
- HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
- if(!rt_key_changed)
- HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
+ if (!lt_key_changed)
+ HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt, shared, 0), type->sizeof_nkey);
+ if (!rt_key_changed)
+ HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt, shared, split_bt_ud.bt->nchildren), type->sizeof_nkey);
/*
* Copy the old root node to some other file location and make the new root
* at the old root's previous address. This prevents the B-tree from
* "moving".
*/
- H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
- if(HADDR_UNDEF == (old_root_addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
+ H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t);
+ if (HADDR_UNDEF ==
+ (old_root_addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)shared->sizeof_rnode)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
/*
* Move the node to the new location
*/
/* Make a copy of the old root information */
- if(NULL == (new_root_bt = H5B_copy(bt_ud.bt)))
+ if (NULL == (new_root_bt = H5B_copy(bt_ud.bt)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to copy old root")
/* Unprotect the old root so we can move it. Also force it to be marked
* dirty so it is written to the new location. */
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud.addr, bt_ud.bt, H5AC__DIRTIED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud.addr, bt_ud.bt, H5AC__DIRTIED_FLAG) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root")
- bt_ud.bt = NULL; /* Make certain future references will be caught */
+ bt_ud.bt = NULL; /* Make certain future references will be caught */
/* Move the location of the old root on the disk */
- if(H5AC_move_entry(f, H5AC_BT, bt_ud.addr, old_root_addr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
+ if (H5AC_move_entry(f, H5AC_BT, bt_ud.addr, old_root_addr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
bt_ud.addr = old_root_addr;
/* Update the split b-tree's left pointer to point to the new location */
@@ -655,11 +636,11 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
split_bt_ud.cache_flags |= H5AC__DIRTIED_FLAG;
/* clear the old root info at the old address (we already copied it) */
- new_root_bt->left = HADDR_UNDEF;
+ new_root_bt->left = HADDR_UNDEF;
new_root_bt->right = HADDR_UNDEF;
/* Set the new information for the copy */
- new_root_bt->level = level + 1;
+ new_root_bt->level = level + 1;
new_root_bt->nchildren = 2;
new_root_bt->child[0] = bt_ud.addr;
@@ -670,52 +651,51 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
HDmemcpy(H5B_NKEY(new_root_bt, shared, 2), rt_key, shared->type->sizeof_nkey);
/* Insert the modified copy of the old root into the file again */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_BT, addr, new_root_bt, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_BT, addr, new_root_bt, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to add old B-tree root node to cache")
done:
- if(ret_value < 0)
- if(new_root_bt && H5B_node_dest(new_root_bt) < 0)
+ if (ret_value < 0)
+ if (new_root_bt && H5B_node_dest(new_root_bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to free B-tree root node");
- if(bt_ud.bt)
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud.addr, bt_ud.bt, bt_ud.cache_flags) < 0)
+ if (bt_ud.bt)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt_ud.addr, bt_ud.bt, bt_ud.cache_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to unprotect old root")
- if(split_bt_ud.bt)
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, split_bt_ud.addr, split_bt_ud.bt, split_bt_ud.cache_flags) < 0)
+ if (split_bt_ud.bt)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, split_bt_ud.addr, split_bt_ud.bt, split_bt_ud.cache_flags) <
+ 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to unprotect new child")
#ifdef H5B_DEBUG
- if(ret_value >= 0)
+ if (ret_value >= 0)
H5B_assert(f, dxpl_id, addr, type, udata);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_insert_child
+ * Function: H5B_insert_child
*
- * Purpose: Insert a child to the left or right of child[IDX] depending
- * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
- * argument is a pointer to a protected B-tree node.
+ * Purpose: Insert a child to the left or right of child[IDX] depending
+ * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
+ * argument is a pointer to a protected B-tree node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 8 1997
+ * Programmer: Robb Matzke
+ * Jul 8 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
- haddr_t child, H5B_ins_t anchor, const void *md_key)
+H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5B_ins_t anchor,
+ const void *md_key)
{
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- uint8_t *base; /* Base offset for move */
+ H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ uint8_t * base; /* Base offset for move */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -730,32 +710,30 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
* records to an unlimited dimension chunked dataset)
*/
base = H5B_NKEY(bt, shared, (idx + 1));
- if((idx + 1) == bt->nchildren) {
+ if ((idx + 1) == bt->nchildren) {
/* Make room for the new key */
HDmemcpy(base + shared->type->sizeof_nkey, base,
- shared->type->sizeof_nkey); /* No overlap possible - memcpy() OK */
+ shared->type->sizeof_nkey); /* No overlap possible - memcpy() OK */
HDmemcpy(base, md_key, shared->type->sizeof_nkey);
/* The MD_KEY is the left key of the new node */
- if(H5B_INS_RIGHT == anchor)
- idx++; /* Don't have to memmove() child addresses down, just add new child */
+ if (H5B_INS_RIGHT == anchor)
+ idx++; /* Don't have to memmove() child addresses down, just add new child */
else
/* Make room for the new child address */
bt->child[idx + 1] = bt->child[idx];
} /* end if */
else {
/* Make room for the new key */
- HDmemmove(base + shared->type->sizeof_nkey, base,
- (bt->nchildren - idx) * shared->type->sizeof_nkey);
+ HDmemmove(base + shared->type->sizeof_nkey, base, (bt->nchildren - idx) * shared->type->sizeof_nkey);
HDmemcpy(base, md_key, shared->type->sizeof_nkey);
/* The MD_KEY is the left key of the new node */
- if(H5B_INS_RIGHT == anchor)
+ if (H5B_INS_RIGHT == anchor)
idx++;
/* Make room for the new child address */
- HDmemmove(bt->child + idx + 1, bt->child + idx,
- (bt->nchildren - idx) * sizeof(haddr_t));
+ HDmemmove(bt->child + idx + 1, bt->child + idx, (bt->nchildren - idx) * sizeof(haddr_t));
} /* end if */
bt->child[idx] = child;
@@ -767,56 +745,51 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_insert_child() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_insert_helper
+ * Function: H5B_insert_helper
*
- * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
- * the specified type.
+ * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
+ * the specified type.
*
- * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
- * the new native left key. Similarly for RT_KEY_CHANGED
- * and RT_KEY.
+ * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
+ * the new native left key. Similarly for RT_KEY_CHANGED
+ * and RT_KEY.
*
- * If the node splits, then MD_KEY contains the key that
- * was split between the two nodes (that is, the key that
- * appears as the max key in the left node and the min key
- * in the right node).
+ * If the node splits, then MD_KEY contains the key that
+ * was split between the two nodes (that is, the key that
+ * appears as the max key in the left node and the min key
+ * in the right node).
*
- * Return: Success: A B-tree operation. The address of the new
- * node, if the node splits, is returned through
- * the NEW_NODE_P argument. The new node is always
- * to the right of the previous node. This
- * function is called recursively and the return
- * value influences the behavior of the caller.
- * See also, declaration of H5B_ins_t.
+ * Return: Success: A B-tree operation. The address of the new
+ * node, if the node splits, is returned through
+ * the NEW_NODE_P argument. The new node is always
+ * to the right of the previous node. This
+ * function is called recursively and the return
+ * value influences the behavior of the caller.
+ * See also, declaration of H5B_ins_t.
*
- * Failure: H5B_INS_ERROR
+ * Failure: H5B_INS_ERROR
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 9 1997
+ * Programmer: Robb Matzke
+ * Jul 9 1997
*
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
- const H5B_class_t *type,
- uint8_t *lt_key, hbool_t *lt_key_changed,
- uint8_t *md_key, void *udata,
- uint8_t *rt_key, hbool_t *rt_key_changed,
- H5B_ins_ud_t *split_bt_ud/*out*/)
+H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8_t *lt_key,
+ hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
+ hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/)
{
- H5B_t *bt; /* Convenience pointer to B-tree */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
- int cmp = -1; /* Key comparison value */
- H5B_ins_ud_t child_bt_ud = H5B_INS_UD_T_NULL; /* Child B-tree */
- H5B_ins_ud_t new_child_bt_ud = H5B_INS_UD_T_NULL; /* Newly split child B-tree */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
+ H5B_t * bt; /* Convenience pointer to B-tree */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
+ int cmp = -1; /* Key comparison value */
+ H5B_ins_ud_t child_bt_ud = H5B_INS_UD_T_NULL; /* Child B-tree */
+ H5B_ins_ud_t new_child_bt_ud = H5B_INS_UD_T_NULL; /* Newly split child B-tree */
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -846,8 +819,8 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
*rt_key_changed = FALSE;
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -858,75 +831,78 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
*/
rt = bt->nchildren;
- while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ while (lt < rt && cmp) {
+ idx = (lt + rt) / 2;
+ if ((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Set up user data for cache callbacks */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(0 == bt->nchildren) {
- /*
- * The value being inserted will be the only value in this tree. We
- * must necessarily be at level zero.
- */
- HDassert(0 == bt->level);
- if((type->new_node)(f, dxpl_id, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
- H5B_NKEY(bt, shared, 1), bt->child + 0/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
- bt->nchildren = 1;
+ if (0 == bt->nchildren) {
+ /*
+ * The value being inserted will be the only value in this tree. We
+ * must necessarily be at level zero.
+ */
+ HDassert(0 == bt->level);
+ if ((type->new_node)(f, dxpl_id, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
+ H5B_NKEY(bt, shared, 1), bt->child + 0 /*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
+ bt->nchildren = 1;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- idx = 0;
-
- if(type->follow_min) {
- if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
- lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
- rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
- } /* end if */
+ idx = 0;
+
+ if (type->follow_min) {
+ if ((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud.addr /*out*/)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
+ } /* end if */
else
- my_ins = H5B_INS_NOOP;
- } else if(cmp < 0 && idx == 0) {
- if(bt->level > 0) {
+ my_ins = H5B_INS_NOOP;
+ }
+ else if (cmp < 0 && idx == 0) {
+ if (bt->level > 0) {
/*
* The value being inserted is less than any value in this tree.
* Follow the minimum branch out of this node to a subtree.
*/
child_bt_ud.addr = bt->child[idx];
- if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE)))
+ if (NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr,
+ &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node")
- if((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type,
- H5B_NKEY(bt,shared,idx), lt_key_changed, md_key,
- udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed,
- &new_child_bt_ud/*out*/)) < 0)
+ if ((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type, H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum subtree")
- } else if(type->follow_min) {
+ }
+ else if (type->follow_min) {
/*
* The value being inserted is less than any leaf node out of this
* current node. Follow the minimum branch to a leaf node and let
* the subclass handle the problem.
*/
- if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
- lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
- rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
+ if ((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud.addr /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node")
- } else {
+ }
+ else {
/*
* The value being inserted is less than any leaf node out of the
* current node. Create a new minimum leaf node out of this B-tree
* node. This node is not empty (handled above).
*/
my_ins = H5B_INS_LEFT;
- HDmemcpy(md_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey);
- if((type->new_node)(f, dxpl_id, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata,
- md_key, &new_child_bt_ud.addr/*out*/) < 0)
+ HDmemcpy(md_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
+ if ((type->new_node)(f, dxpl_id, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, md_key,
+ &new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node")
*lt_key_changed = TRUE;
} /* end else */
@@ -934,47 +910,50 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
#ifdef H5_STRICT_FORMAT_CHECKS
/* Since we are to the left of the leftmost key there must not be a left
* sibling */
- if(H5F_addr_defined(bt->left))
+ if (H5F_addr_defined(bt->left))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values")
#endif /* H5_STRICT_FORMAT_CHECKS */
- } else if(cmp > 0 && idx + 1 >= bt->nchildren) {
+ }
+ else if (cmp > 0 && idx + 1 >= bt->nchildren) {
if (bt->level > 0) {
/*
- * The value being inserted is larger than any value in this tree.
- * Follow the maximum branch out of this node to a subtree.
- */
- idx = bt->nchildren - 1;
+ * The value being inserted is larger than any value in this tree.
+ * Follow the maximum branch out of this node to a subtree.
+ */
+ idx = bt->nchildren - 1;
child_bt_ud.addr = bt->child[idx];
- if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE)))
+ if (NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr,
+ &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node")
- if((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type,
- H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata,
- H5B_NKEY(bt, shared, idx + 1), rt_key_changed,
- &new_child_bt_ud/*out*/)) < 0)
+ if ((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type, H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum subtree")
- } else if(type->follow_max) {
+ }
+ else if (type->follow_max) {
/*
* The value being inserted is larger than any leaf node out of the
* current node. Follow the maximum branch to a leaf node and let
* the subclass handle the problem.
*/
idx = bt->nchildren - 1;
- if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
- lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
- rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
+ if ((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud.addr /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node")
- } else {
+ }
+ else {
/*
* The value being inserted is larger than any leaf node out of the
* current node. Create a new maximum leaf node out of this B-tree
* node.
*/
- idx = bt->nchildren - 1;
+ idx = bt->nchildren - 1;
my_ins = H5B_INS_RIGHT;
HDmemcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
- if((type->new_node)(f, dxpl_id, H5B_INS_RIGHT, md_key, udata,
- H5B_NKEY(bt, shared, idx + 1), &new_child_bt_ud.addr/*out*/) < 0)
+ if ((type->new_node)(f, dxpl_id, H5B_INS_RIGHT, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ &new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node")
*rt_key_changed = TRUE;
} /* end else */
@@ -982,49 +961,53 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
#ifdef H5_STRICT_FORMAT_CHECKS
/* Since we are to the right of the rightmost key there must not be a
* right sibling */
- if(H5F_addr_defined(bt->right))
+ if (H5F_addr_defined(bt->right))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values")
#endif /* H5_STRICT_FORMAT_CHECKS */
- } else if(cmp) {
- /*
- * We couldn't figure out which branch to follow out of this node. THIS
- * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
- */
- HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
+ }
+ else if (cmp) {
+ /*
+ * We couldn't figure out which branch to follow out of this node. THIS
+ * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
+ */
+ HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
#ifdef NDEBUG
- HDabort();
+ HDabort();
#endif /* NDEBUG */
- } else if(bt->level > 0) {
- /*
- * Follow a branch out of this node to another subtree.
- */
- HDassert(idx < bt->nchildren);
- child_bt_ud.addr = bt->child[idx];
- if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE)))
+ }
+ else if (bt->level > 0) {
+ /*
+ * Follow a branch out of this node to another subtree.
+ */
+ HDassert(idx < bt->nchildren);
+ child_bt_ud.addr = bt->child[idx];
+ if (NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr,
+ &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node")
- if((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type,
- H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata,
- H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
- } else {
- /*
- * Follow a branch out of this node to a leaf node of some other type.
- */
- HDassert(idx < bt->nchildren);
- if((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
- lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
- rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
+ if ((int)(my_ins = H5B_insert_helper(f, dxpl_id, &child_bt_ud, type, H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud /*out*/)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
+ }
+ else {
+ /*
+ * Follow a branch out of this node to a leaf node of some other type.
+ */
+ HDassert(idx < bt->nchildren);
+ if ((int)(my_ins = (type->insert)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
+ rt_key_changed, &new_child_bt_ud.addr /*out*/)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
}
HDassert((int)my_ins >= 0);
/*
* Update the left and right keys of the current node.
*/
- if(*lt_key_changed) {
+ if (*lt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- if(idx > 0) {
+ if (idx > 0) {
HDassert(type->critical_key == H5B_LEFT);
HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*lt_key_changed = FALSE;
@@ -1032,9 +1015,9 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
else
HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
- if(*rt_key_changed) {
+ if (*rt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- if(idx + 1 < bt->nchildren) {
+ if (idx + 1 < bt->nchildren) {
HDassert(type->critical_key == H5B_RIGHT);
HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*rt_key_changed = FALSE;
@@ -1046,100 +1029,101 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
/*
* Handle changes/additions to children
*/
- if(H5B_INS_CHANGE == my_ins) {
- /*
- * The insertion simply changed the address for the child.
- */
- HDassert(!child_bt_ud.bt);
- HDassert(bt->level == 0);
- bt->child[idx] = new_child_bt_ud.addr;
+ if (H5B_INS_CHANGE == my_ins) {
+ /*
+ * The insertion simply changed the address for the child.
+ */
+ HDassert(!child_bt_ud.bt);
+ HDassert(bt->level == 0);
+ bt->child[idx] = new_child_bt_ud.addr;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- } else if(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins) {
+ }
+ else if (H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins) {
hbool_t *tmp_bt_flags_ptr = NULL;
- H5B_t *tmp_bt;
-
- /*
- * If this node is full then split it before inserting the new child.
- */
- if(bt->nchildren == shared->two_k) {
- if(H5B_split(f, dxpl_id, bt_ud, idx, udata, split_bt_ud/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
- if(idx < bt->nchildren) {
- tmp_bt = bt;
+ H5B_t * tmp_bt;
+
+ /*
+ * If this node is full then split it before inserting the new child.
+ */
+ if (bt->nchildren == shared->two_k) {
+ if (H5B_split(f, dxpl_id, bt_ud, idx, udata, split_bt_ud /*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
+ if (idx < bt->nchildren) {
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } else {
- idx -= bt->nchildren;
- tmp_bt = split_bt_ud->bt;
+ }
+ else {
+ idx -= bt->nchildren;
+ tmp_bt = split_bt_ud->bt;
tmp_bt_flags_ptr = &split_bt_ud->cache_flags;
- }
- } /* end if */
+ }
+ } /* end if */
else {
- tmp_bt = bt;
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } /* end else */
+ } /* end else */
- /* Insert the child */
- if(H5B_insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
+ /* Insert the child */
+ if (H5B_insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
} /* end else-if */
/*
* If this node split, return the mid key (the one that is shared
* by the left and right node).
*/
- if(split_bt_ud->bt) {
- HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
- ret_value = H5B_INS_RIGHT;
+ if (split_bt_ud->bt) {
+ HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
+ ret_value = H5B_INS_RIGHT;
#ifdef H5B_DEBUG
- /*
- * The max key in the original left node must be equal to the min key
- * in the new node.
- */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
- H5B_NKEY(split_bt_ud->bt, shared, 0));
- HDassert(0 == cmp);
+ /*
+ * The max key in the original left node must be equal to the min key
+ * in the new node.
+ */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata, H5B_NKEY(split_bt_ud->bt, shared, 0));
+ HDassert(0 == cmp);
#endif
} /* end if */
else
- ret_value = H5B_INS_NOOP;
+ ret_value = H5B_INS_NOOP;
done:
- if(child_bt_ud.bt)
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, child_bt_ud.bt, child_bt_ud.cache_flags) < 0)
+ if (child_bt_ud.bt)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, child_bt_ud.bt, child_bt_ud.cache_flags) <
+ 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to unprotect child")
- if(new_child_bt_ud.bt)
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, new_child_bt_ud.addr, new_child_bt_ud.bt, new_child_bt_ud.cache_flags) < 0)
+ if (new_child_bt_ud.bt)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, new_child_bt_ud.addr, new_child_bt_ud.bt,
+ new_child_bt_ud.cache_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to unprotect new child")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert_helper() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_iterate_helper
+ * Function: H5B_iterate_helper
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the caller's UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the caller's UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
- H5B_operator_t op, void *udata)
+H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
+ void *udata)
{
- H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned u; /* Local index variable */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5B_t * bt = NULL; /* Pointer to current B-tree node */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1153,55 +1137,53 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add
HDassert(udata);
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/* Protect the initial/current node */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load B-tree node")
/* Iterate over node's children */
- for(u = 0; u < bt->nchildren && ret_value == H5_ITER_CONT; u++) {
- if(bt->level > 0)
+ for (u = 0; u < bt->nchildren && ret_value == H5_ITER_CONT; u++) {
+ if (bt->level > 0)
ret_value = H5B_iterate_helper(f, dxpl_id, type, bt->child[u], op, udata);
else
- ret_value = (*op)(f, dxpl_id, H5B_NKEY(bt, shared, u), bt->child[u], H5B_NKEY(bt, shared, u + 1), udata);
- if(ret_value < 0)
+ ret_value =
+ (*op)(f, dxpl_id, H5B_NKEY(bt, shared, u), bt->child[u], H5B_NKEY(bt, shared, u + 1), udata);
+ if (ret_value < 0)
HERROR(H5E_BTREE, H5E_BADITER, "B-tree iteration failed");
} /* end for */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_iterate_helper() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_iterate
+ * Function: H5B_iterate
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
- H5B_operator_t op, void *udata)
+H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, H5B_operator_t op, void *udata)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1215,51 +1197,49 @@ H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
HDassert(udata);
/* Iterate over the B-tree records */
- if((ret_value = H5B_iterate_helper(f, dxpl_id, type, addr, op, udata)) < 0)
+ if ((ret_value = H5B_iterate_helper(f, dxpl_id, type, addr, op, udata)) < 0)
HERROR(H5E_BTREE, H5E_BADITER, "B-tree iteration failed");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_iterate() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_remove_helper
+ * Function: H5B_remove_helper
*
- * Purpose: The recursive part of removing an item from a B-tree. The
- * sub B-tree that is being considered is located at ADDR and
- * the item to remove is described by UDATA. If the removed
- * item falls at the left or right end of the current level then
- * it might be necessary to adjust the left and/or right keys
- * (LT_KEY and/or RT_KEY) to to indicate that they changed by
- * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
+ * Purpose: The recursive part of removing an item from a B-tree. The
+ * sub B-tree that is being considered is located at ADDR and
+ * the item to remove is described by UDATA. If the removed
+ * item falls at the left or right end of the current level then
+ * it might be necessary to adjust the left and/or right keys
+ * (LT_KEY and/or RT_KEY) to to indicate that they changed by
+ * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
*
- * Return: Success: A B-tree operation, see comments for
- * H5B_ins_t declaration. This function is
- * called recursively and the return value
- * influences the actions of the caller. It is
- * also called by H5B_remove().
+ * Return: Success: A B-tree operation, see comments for
+ * H5B_ins_t declaration. This function is
+ * called recursively and the return value
+ * influences the actions of the caller. It is
+ * also called by H5B_remove().
*
- * Failure: H5B_INS_ERROR, a negative value.
+ * Failure: H5B_INS_ERROR, a negative value.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type,
- int level, uint8_t *lt_key/*out*/,
- hbool_t *lt_key_changed/*out*/, void *udata,
- uint8_t *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
+H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, int level,
+ uint8_t *lt_key /*out*/, hbool_t *lt_key_changed /*out*/, void *udata,
+ uint8_t *rt_key /*out*/, hbool_t *rt_key_changed /*out*/)
{
- H5B_t *bt = NULL, *sibling = NULL;
- unsigned bt_flags = H5AC__NO_FLAGS_SET;
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_t * bt = NULL, *sibling = NULL;
+ unsigned bt_flags = H5AC__NO_FLAGS_SET;
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */
- int cmp = 1; /* Key comparison value */
- H5B_ins_t ret_value = H5B_INS_ERROR;
+ unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */
+ int cmp = 1; /* Key comparison value */
+ H5B_ins_t ret_value = H5B_INS_ERROR;
FUNC_ENTER_NOAPI(H5B_INS_ERROR)
@@ -1273,8 +1253,8 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
HDassert(rt_key && rt_key_changed);
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1282,54 +1262,56 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* Perform a binary search to locate the child which contains the thing
* for which we're searching.
*/
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
rt = bt->nchildren;
- while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ while (lt < rt && cmp) {
+ idx = (lt + rt) / 2;
+ if ((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
- if(cmp)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
+ if (cmp)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
/*
* Follow the link to the subtree or to the data node. The return value
* will be one of H5B_INS_ERROR, H5B_INS_NOOP, or H5B_INS_REMOVE.
*/
HDassert(idx < bt->nchildren);
- if(bt->level > 0) {
- /* We're at an internal node -- call recursively */
- if((int)(ret_value = H5B_remove_helper(f, dxpl_id,
- bt->child[idx], type, level + 1, H5B_NKEY(bt, shared, idx)/*out*/,
- lt_key_changed/*out*/, udata, H5B_NKEY(bt, shared, idx + 1)/*out*/,
- rt_key_changed/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
- } else if(type->remove) {
- /*
- * We're at a leaf node but the leaf node points to an object that
- * has a removal method. Pass the removal request to the pointed-to
- * object and let it decide how to progress.
- */
- if((int)(ret_value = (type->remove)(f, dxpl_id,
- bt->child[idx], H5B_NKEY(bt, shared, idx), lt_key_changed, udata,
- H5B_NKEY(bt, shared, idx + 1), rt_key_changed)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
- } else {
- /*
- * We're at a leaf node which points to an object that has no removal
- * method. The best we can do is to leave the object alone but
- * remove the B-tree reference to the object.
- */
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
- ret_value = H5B_INS_REMOVE;
+ if (bt->level > 0) {
+ /* We're at an internal node -- call recursively */
+ if ((int)(ret_value =
+ H5B_remove_helper(f, dxpl_id, bt->child[idx], type, level + 1,
+ H5B_NKEY(bt, shared, idx) /*out*/, lt_key_changed /*out*/, udata,
+ H5B_NKEY(bt, shared, idx + 1) /*out*/, rt_key_changed /*out*/)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
+ }
+ else if (type->remove) {
+ /*
+ * We're at a leaf node but the leaf node points to an object that
+ * has a removal method. Pass the removal request to the pointed-to
+ * object and let it decide how to progress.
+ */
+ if ((int)(ret_value =
+ (type->remove)(f, dxpl_id, bt->child[idx], H5B_NKEY(bt, shared, idx), lt_key_changed,
+ udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
+ }
+ else {
+ /*
+ * We're at a leaf node which points to an object that has no removal
+ * method. The best we can do is to leave the object alone but
+ * remove the B-tree reference to the object.
+ */
+ *lt_key_changed = FALSE;
+ *rt_key_changed = FALSE;
+ ret_value = H5B_INS_REMOVE;
}
/*
@@ -1340,20 +1322,20 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* key changed and it's the right most key of this node we must update
* our right key and indicate that it changed.
*/
- if(*lt_key_changed) {
+ if (*lt_key_changed) {
HDassert(type->critical_key == H5B_LEFT);
bt_flags |= H5AC__DIRTIED_FLAG;
- if(idx > 0)
+ if (idx > 0)
/* Don't propagate change out of this B-tree node */
*lt_key_changed = FALSE;
else
HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
- if(*rt_key_changed) {
+ if (*rt_key_changed) {
HDassert(type->critical_key == H5B_RIGHT);
bt_flags |= H5AC__DIRTIED_FLAG;
- if(idx + 1 < bt->nchildren)
+ if (idx + 1 < bt->nchildren)
/* Don't propagate change out of this B-tree node */
*rt_key_changed = FALSE;
else
@@ -1364,14 +1346,14 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* If the subtree returned H5B_INS_REMOVE then we should remove the
* subtree entry from the current node. There are four cases:
*/
- if(H5B_INS_REMOVE == ret_value) {
+ if (H5B_INS_REMOVE == ret_value) {
/* Clients should not change keys when a node is removed. This function
* will handle it as appropriate, based on the value of bt->critical_key
*/
HDassert(!(*lt_key_changed));
HDassert(!(*rt_key_changed));
- if(1 == bt->nchildren) {
+ if (1 == bt->nchildren) {
/*
* The subtree is the only child of this node. Discard both
* keys and the subtree pointer. Free this node (unless it's the
@@ -1379,116 +1361,124 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
*/
/* Only delete the node if it is not the root node. Note that this
* "level" is the opposite of bt->level */
- if(level > 0) {
+ if (level > 0) {
/* Fix siblings, making sure that the keys remain consistent
* between siblings. Overwrite the key that that is not
* "critical" for any child in its node to maintain this
* consistency (and avoid breaking key/child consistency) */
- if(H5F_addr_defined(bt->left)) {
- if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC_WRITE)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node from tree")
+ if (H5F_addr_defined(bt->left)) {
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata,
+ H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR,
+ "unable to load node from tree")
/* Copy right-most key from deleted node to right-most key
* in its left neighbor, but only if it is not the critical
* key for the right-most child of the left neighbor */
- if(type->critical_key == H5B_LEFT)
- HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
- H5B_NKEY(bt, shared, 1), type->sizeof_nkey);
+ if (type->critical_key == H5B_LEFT)
+ HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren), H5B_NKEY(bt, shared, 1),
+ type->sizeof_nkey);
sibling->right = bt->right;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree")
- sibling = NULL; /* Make certain future references will be caught */
- } /* end if */
- if(H5F_addr_defined(bt->right)) {
- if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC_WRITE)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree")
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR,
+ "unable to release node from tree")
+ sibling = NULL; /* Make certain future references will be caught */
+ } /* end if */
+ if (H5F_addr_defined(bt->right)) {
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata,
+ H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR,
+ "unable to unlink node from tree")
/* Copy left-most key from deleted node to left-most key in
* its right neighbor, but only if it is not the critical
* key for the left-most child of the right neighbor */
- if(type->critical_key == H5B_RIGHT)
- HDmemcpy(H5B_NKEY(sibling, shared, 0),
- H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
+ if (type->critical_key == H5B_RIGHT)
+ HDmemcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
sibling->left = bt->left;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree")
- sibling = NULL; /* Make certain future references will be caught */
- } /* end if */
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR,
+ "unable to release node from tree")
+ sibling = NULL; /* Make certain future references will be caught */
+ } /* end if */
/* Update bt struct */
- bt->left = HADDR_UNDEF;
- bt->right = HADDR_UNDEF;
+ bt->left = HADDR_UNDEF;
+ bt->right = HADDR_UNDEF;
bt->nchildren = 0;
/* Delete the node from disk (via the metadata cache) */
bt_flags |= H5AC__DIRTIED_FLAG;
H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t);
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) {
- bt = NULL;
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt,
+ bt_flags | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) {
+ bt = NULL;
bt_flags = H5AC__NO_FLAGS_SET;
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to free B-tree node")
} /* end if */
- bt = NULL;
+ bt = NULL;
bt_flags = H5AC__NO_FLAGS_SET;
- } else {
+ }
+ else {
/* We removed the last child in the root node, set the level
* back to 0 (as well as nchildren) */
bt->nchildren = 0;
- bt->level = 0;
+ bt->level = 0;
bt_flags |= H5AC__DIRTIED_FLAG;
} /* end else */
- } else if(0 == idx) {
+ }
+ else if (0 == idx) {
/*
* The subtree is the left-most child of this node. We update the
* key and child arrays and lt_key as appropriate, depending on the
* status of bt->critical_key. Return H5B_INS_NOOP.
*/
- if(type->critical_key == H5B_LEFT) {
+ if (type->critical_key == H5B_LEFT) {
/* Slide all keys down 1, update lt_key */
HDmemmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1),
- bt->nchildren * type->sizeof_nkey);
+ bt->nchildren * type->sizeof_nkey);
HDmemcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
*lt_key_changed = TRUE;
- } else
+ }
+ else
/* Slide all but the leftmost 2 keys down, leaving the leftmost
* key intact (the right key of the leftmost child is
* overwritten) */
HDmemmove(H5B_NKEY(bt, shared, 1), H5B_NKEY(bt, shared, 2),
- (bt->nchildren - 1) * type->sizeof_nkey);
+ (bt->nchildren - 1) * type->sizeof_nkey);
- HDmemmove(bt->child,
- bt->child + 1,
- (bt->nchildren - 1) * sizeof(haddr_t));
+ HDmemmove(bt->child, bt->child + 1, (bt->nchildren - 1) * sizeof(haddr_t));
bt->nchildren -= 1;
bt_flags |= H5AC__DIRTIED_FLAG;
ret_value = H5B_INS_NOOP;
- } else if(idx + 1 == bt->nchildren) {
+ }
+ else if (idx + 1 == bt->nchildren) {
/*
* The subtree is the right-most child of this node. We update the
* key and child arrays and rt_key as appropriate, depending on the
* status of bt->critical_key. Return H5B_INS_NOOP.
*/
- if(type->critical_key == H5B_LEFT)
+ if (type->critical_key == H5B_LEFT)
/* Slide the rightmost key down one, overwriting the left key of
* the deleted (righmost) child */
- HDmemmove(H5B_NKEY(bt, shared, bt->nchildren - 1),
- H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey);
+ HDmemmove(H5B_NKEY(bt, shared, bt->nchildren - 1), H5B_NKEY(bt, shared, bt->nchildren),
+ type->sizeof_nkey);
else {
/* Just update rt_key */
- HDmemcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1),
- type->sizeof_nkey);
+ HDmemcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1), type->sizeof_nkey);
*rt_key_changed = TRUE;
} /* end else */
bt->nchildren -= 1;
bt_flags |= H5AC__DIRTIED_FLAG;
ret_value = H5B_INS_NOOP;
- } else {
+ }
+ else {
/*
* There are subtrees out of this node to both the left and right of
* the subtree being removed. The subtree and its critical key are
@@ -1496,78 +1486,74 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* shifted left by one place. The subtree has already been freed.
* Return H5B_INS_NOOP.
*/
- if(type->critical_key == H5B_LEFT)
- HDmemmove(H5B_NKEY(bt, shared, idx),
- H5B_NKEY(bt, shared, idx + 1),
- (bt->nchildren - idx) * type->sizeof_nkey);
+ if (type->critical_key == H5B_LEFT)
+ HDmemmove(H5B_NKEY(bt, shared, idx), H5B_NKEY(bt, shared, idx + 1),
+ (bt->nchildren - idx) * type->sizeof_nkey);
else
- HDmemmove(H5B_NKEY(bt, shared, idx + 1),
- H5B_NKEY(bt, shared, idx + 2),
- (bt->nchildren - 1 - idx) * type->sizeof_nkey);
+ HDmemmove(H5B_NKEY(bt, shared, idx + 1), H5B_NKEY(bt, shared, idx + 2),
+ (bt->nchildren - 1 - idx) * type->sizeof_nkey);
- HDmemmove(bt->child + idx,
- bt->child + idx + 1,
- (bt->nchildren - 1 - idx) * sizeof(haddr_t));
+ HDmemmove(bt->child + idx, bt->child + idx + 1, (bt->nchildren - 1 - idx) * sizeof(haddr_t));
bt->nchildren -= 1;
bt_flags |= H5AC__DIRTIED_FLAG;
ret_value = H5B_INS_NOOP;
} /* end else */
- } else /* H5B_INS_REMOVE != ret_value */
+ }
+ else /* H5B_INS_REMOVE != ret_value */
ret_value = H5B_INS_NOOP;
/* Patch keys in neighboring trees if necessary */
- if(*lt_key_changed && H5F_addr_defined(bt->left)) {
+ if (*lt_key_changed && H5F_addr_defined(bt->left)) {
HDassert(type->critical_key == H5B_LEFT);
HDassert(level > 0);
/* Update the rightmost key in the left sibling */
- if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC_WRITE)))
+ if (NULL ==
+ (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node")
- HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
- H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
+ HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren), H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree")
- sibling = NULL; /* Make certain future references will be caught */
- } /* end if */
- else if(*rt_key_changed && H5F_addr_defined(bt->right)) {
+ sibling = NULL; /* Make certain future references will be caught */
+ } /* end if */
+ else if (*rt_key_changed && H5F_addr_defined(bt->right)) {
HDassert(type->critical_key == H5B_RIGHT);
HDassert(level > 0);
/* Update the lefttmost key in the right sibling */
- if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC_WRITE)))
+ if (NULL ==
+ (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node")
- HDmemcpy(H5B_NKEY(sibling, shared, 0),
- H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey);
+ HDmemcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey);
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree")
- sibling = NULL; /* Make certain future references will be caught */
- } /* end else */
+ sibling = NULL; /* Make certain future references will be caught */
+ } /* end else */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, bt_flags) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_remove_helper() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_remove
+ * Function: H5B_remove
*
- * Purpose: Removes an item from a B-tree.
+ * Purpose: Removes an item from a B-tree.
*
- * Note: The current version does not attempt to rebalance the tree.
+ * Note: The current version does not attempt to rebalance the tree.
* (Read the paper Yao & Lehman paper for details on why)
*
- * Return: Non-negative on success/Negative on failure (failure includes
- * not being able to find the object which is to be removed).
+ * Return: Non-negative on success/Negative on failure (failure includes
+ * not being able to find the object which is to be removed).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
@@ -1576,12 +1562,12 @@ herr_t
H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata)
{
/* These are defined this way to satisfy alignment constraints */
- uint64_t _lt_key[128], _rt_key[128];
- uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
- uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
- hbool_t lt_key_changed = FALSE; /*left key changed?*/
- hbool_t rt_key_changed = FALSE; /*right key changed?*/
- herr_t ret_value = SUCCEED; /* Return value */
+ uint64_t _lt_key[128], _rt_key[128];
+ uint8_t *lt_key = (uint8_t *)_lt_key; /*left key*/
+ uint8_t *rt_key = (uint8_t *)_rt_key; /*right key*/
+ hbool_t lt_key_changed = FALSE; /*left key changed?*/
+ hbool_t rt_key_changed = FALSE; /*right key changed?*/
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1592,9 +1578,9 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
HDassert(H5F_addr_defined(addr));
/* The actual removal */
- if(H5B_remove_helper(f, dxpl_id, addr, type, 0, lt_key, &lt_key_changed,
- udata, rt_key, &rt_key_changed) == H5B_INS_ERROR)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
+ if (H5B_remove_helper(f, dxpl_id, addr, type, 0, lt_key, &lt_key_changed, udata, rt_key,
+ &rt_key_changed) == H5B_INS_ERROR)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
#ifdef H5B_DEBUG
H5B_assert(f, dxpl_id, addr, type, udata);
@@ -1603,16 +1589,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5B_delete
+ * Function: H5B_delete
*
- * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
+ * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
* callbacks for each node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
*-------------------------------------------------------------------------
@@ -1620,12 +1605,12 @@ done:
herr_t
H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL; /* B-tree node being operated on */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_t * bt = NULL; /* B-tree node being operated on */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1635,23 +1620,23 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
HDassert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/* Lock this B-tree node into memory for now */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/* Iterate over all children in tree, deleting them */
- if(bt->level > 0) {
+ if (bt->level > 0) {
/* Iterate over all children in node, deleting them */
- for(u = 0; u < bt->nchildren; u++)
- if(H5B_delete(f, dxpl_id, type, bt->child[u], udata) < 0)
+ for (u = 0; u < bt->nchildren; u++)
+ if (H5B_delete(f, dxpl_id, type, bt->child[u], udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to delete B-tree node")
} /* end if */
@@ -1659,46 +1644,44 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
hbool_t lt_key_changed, rt_key_changed; /* Whether key changed (unused here, just for callback) */
/* Check for removal callback */
- if(type->remove) {
+ if (type->remove) {
/* Iterate over all entries in node, calling callback */
- for(u = 0; u < bt->nchildren; u++) {
+ for (u = 0; u < bt->nchildren; u++) {
/* Call user's callback for each entry */
- if((type->remove)(f, dxpl_id,
- bt->child[u], H5B_NKEY(bt, shared, u), &lt_key_changed, udata,
- H5B_NKEY(bt, shared, u + 1), &rt_key_changed) < H5B_INS_NOOP)
+ if ((type->remove)(f, dxpl_id, bt->child[u], H5B_NKEY(bt, shared, u), &lt_key_changed, udata,
+ H5B_NKEY(bt, shared, u + 1), &rt_key_changed) < H5B_INS_NOOP)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't remove B-tree node")
} /* end for */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
+ if (bt &&
+ H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node in cache")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_delete() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_shared_new
+ * Function: H5B_shared_new
*
- * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
+ * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
*
- * Return: Success: non-NULL pointer to struct allocated
- * Failure: NULL
+ * Return: Success: non-NULL pointer to struct allocated
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * May 27 2008
+ * Programmer: Quincey Koziol
+ * May 27 2008
*
*-------------------------------------------------------------------------
*/
H5B_shared_t *
H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
{
- H5B_shared_t *shared = NULL; /* New shared B-tree struct */
- size_t u; /* Local index variable */
- H5B_shared_t *ret_value; /* Return value */
+ H5B_shared_t *shared = NULL; /* New shared B-tree struct */
+ size_t u; /* Local index variable */
+ H5B_shared_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1708,44 +1691,44 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
HDassert(type);
/* Allocate space for the shared structure */
- if(NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
+ if (NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
/* Set up the "global" information for this file's groups */
- shared->type = type;
- shared->two_k = 2 * H5F_KVALUE(f, type);
+ shared->type = type;
+ shared->two_k = 2 * H5F_KVALUE(f, type);
shared->sizeof_addr = H5F_SIZEOF_ADDR(f);
- shared->sizeof_len = H5F_SIZEOF_SIZE(f);
+ shared->sizeof_len = H5F_SIZEOF_SIZE(f);
shared->sizeof_rkey = sizeof_rkey;
HDassert(shared->sizeof_rkey);
- shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
- shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
- shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
- (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
+ shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
+ shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
+ shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
+ (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
HDassert(shared->sizeof_rnode);
/* Allocate shared buffers */
- if(NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
+ if (NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
#ifdef H5_CLEAR_MEMORY
-HDmemset(shared->page, 0, shared->sizeof_rnode);
+ HDmemset(shared->page, 0, shared->sizeof_rnode);
#endif /* H5_CLEAR_MEMORY */
- if(NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(2 * H5F_KVALUE(f, type) + 1))))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
+ if (NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(2 * H5F_KVALUE(f, type) + 1))))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
/* Initialize the offsets into the native key buffer */
- for(u = 0; u < (2 * H5F_KVALUE(f, type) + 1); u++)
+ for (u = 0; u < (2 * H5F_KVALUE(f, type) + 1); u++)
shared->nkey[u] = u * type->sizeof_nkey;
/* Set return value */
ret_value = shared;
done:
- if(NULL == ret_value)
- if(shared) {
- if(shared->page)
+ if (NULL == ret_value)
+ if (shared) {
+ if (shared->page)
shared->page = H5FL_BLK_FREE(page, shared->page);
- if(shared->nkey)
+ if (shared->nkey)
shared->nkey = H5FL_SEQ_FREE(size_t, shared->nkey);
shared = H5FL_FREE(H5B_shared_t, shared);
} /* end if */
@@ -1753,15 +1736,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_shared_new() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_shared_free
+ * Function: H5B_shared_free
*
- * Purpose: Free B-tree shared info
+ * Purpose: Free B-tree shared info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 27, 2008
*
*-------------------------------------------------------------------------
@@ -1785,28 +1767,26 @@ H5B_shared_free(void *_shared)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_shared_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_copy
+ * Function: H5B_copy
*
- * Purpose: Deep copies an existing H5B_t node.
+ * Purpose: Deep copies an existing H5B_t node.
*
- * Return: Success: Pointer to H5B_t object.
+ * Return: Success: Pointer to H5B_t object.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Apr 18 2000
+ * Programmer: Quincey Koziol
+ * Apr 18 2000
*
*-------------------------------------------------------------------------
*/
static H5B_t *
H5B_copy(const H5B_t *old_bt)
{
- H5B_t *new_node = NULL;
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_t *ret_value;
+ H5B_t * new_node = NULL;
+ H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1818,7 +1798,7 @@ H5B_copy(const H5B_t *old_bt)
HDassert(shared);
/* Allocate memory for the new H5B_t object */
- if(NULL == (new_node = H5FL_MALLOC(H5B_t)))
+ if (NULL == (new_node = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node")
/* Copy the main structure */
@@ -1827,8 +1807,8 @@ H5B_copy(const H5B_t *old_bt)
/* Reset cache info */
HDmemset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
- if(NULL == (new_node->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
- NULL == (new_node->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
+ if (NULL == (new_node->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
+ NULL == (new_node->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node")
/* Copy the other structures */
@@ -1842,44 +1822,42 @@ H5B_copy(const H5B_t *old_bt)
ret_value = new_node;
done:
- if(NULL == ret_value) {
- if(new_node) {
- new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
- new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
- new_node = H5FL_FREE(H5B_t, new_node);
+ if (NULL == ret_value) {
+ if (new_node) {
+ new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
+ new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
+ new_node = H5FL_FREE(H5B_t, new_node);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_get_info_helper
+ * Function: H5B_get_info_helper
*
- * Purpose: Walks the B-tree nodes, getting information for all of them.
+ * Purpose: Walks the B-tree nodes, getting information for all of them.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jun 3 2008
+ * Programmer: Quincey Koziol
+ * Jun 3 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
- const H5B_info_ud_t *info_udata)
+ const H5B_info_ud_t *info_udata)
{
- H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned level; /* Node level */
- size_t sizeof_rnode; /* Size of raw (disk) node */
- haddr_t next_addr; /* Address of next node to the right */
- haddr_t left_child; /* Address of left-most child in node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_t * bt = NULL; /* Pointer to current B-tree node */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ unsigned level; /* Node level */
+ size_t sizeof_rnode; /* Size of raw (disk) node */
+ haddr_t next_addr; /* Address of next node to the right */
+ haddr_t left_child; /* Address of left-most child in node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1894,8 +1872,8 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
HDassert(info_udata->udata);
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1903,23 +1881,23 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
sizeof_rnode = shared->sizeof_rnode;
/* Protect the initial/current node */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/* Cache information from this node */
left_child = bt->child[0];
- next_addr = bt->right;
- level = bt->level;
+ next_addr = bt->right;
+ level = bt->level;
/* Update B-tree info */
info_udata->bt_info->size += sizeof_rnode;
info_udata->bt_info->num_nodes++;
/* Release current node */
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
bt = NULL;
@@ -1927,10 +1905,10 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
* Follow the right-sibling pointer from node to node until we've
* processed all nodes.
*/
- while(H5F_addr_defined(next_addr)) {
+ while (H5F_addr_defined(next_addr)) {
/* Protect the next node to the right */
addr = next_addr;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "B-tree node")
/* Cache information from this node */
@@ -1941,26 +1919,25 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
info_udata->bt_info->num_nodes++;
/* Unprotect node */
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
bt = NULL;
} /* end while */
/* Check for another "row" of B-tree nodes to iterate over */
- if(level > 0) {
- /* Keep following the left-most child until we reach a leaf node. */
- if(H5B_get_info_helper(f, dxpl_id, type, left_child, info_udata) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
+ if (level > 0) {
+ /* Keep following the left-most child until we reach a leaf node. */
+ if (H5B_get_info_helper(f, dxpl_id, type, left_child, info_udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
} /* end if */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_get_info_helper() */
-
/*-------------------------------------------------------------------------
* Function: H5B_get_info
*
@@ -1974,11 +1951,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
- H5B_info_t *bt_info, H5B_operator_t op, void *udata)
+H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_info,
+ H5B_operator_t op, void *udata)
{
- H5B_info_ud_t info_udata; /* User-data for B-tree size iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_info_ud_t info_udata; /* User-data for B-tree size iteration */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1996,23 +1973,22 @@ H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
/* Set up internal user-data for the B-tree 'get info' helper routine */
info_udata.bt_info = bt_info;
- info_udata.udata = udata;
+ info_udata.udata = udata;
/* Iterate over the B-tree nodes */
- if(H5B_get_info_helper(f, dxpl_id, type, addr, &info_udata) < 0)
+ if (H5B_get_info_helper(f, dxpl_id, type, addr, &info_udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADITER, FAIL, "B-tree iteration failed")
/* Iterate over the B-tree records, making any "leaf" callbacks */
/* (Only if operator defined) */
- if(op)
- if((ret_value = H5B_iterate_helper(f, dxpl_id, type, addr, op, udata)) < 0)
+ if (op)
+ if ((ret_value = H5B_iterate_helper(f, dxpl_id, type, addr, op, udata)) < 0)
HERROR(H5E_BTREE, H5E_BADITER, "B-tree iteration failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_get_info() */
-
/*-------------------------------------------------------------------------
* Function: H5B_valid
*
@@ -2028,11 +2004,11 @@ done:
htri_t
H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr)
{
- H5B_t *bt = NULL; /* The B-tree */
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- htri_t ret_value = SUCCEED; /* Return value */
+ H5B_t * bt = NULL; /* The B-tree */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ htri_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2042,33 +2018,32 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr)
HDassert(f);
HDassert(type);
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "address is undefined")
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, NULL)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, NULL)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/*
* Load the tree node.
*/
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node")
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node")
done:
/* Release the node */
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_valid() */
-
/*-------------------------------------------------------------------------
* Function: H5B_node_dest
*
@@ -2078,7 +2053,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------
@@ -2092,11 +2066,10 @@ H5B_node_dest(H5B_t *bt)
HDassert(bt);
HDassert(bt->rc_shared);
- bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
+ bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
bt->native = H5FL_BLK_FREE(native_block, bt->native);
H5RC_DEC(bt->rc_shared);
bt = H5FL_FREE(H5B_t, bt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_node_dest() */
-
diff --git a/src/H5B2.c b/src/H5B2.c
index 5a588b4..d24d3ef 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2.c
* Jan 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements a B-tree, with several modifications from
* the "standard" methods.
@@ -31,36 +31,31 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -82,24 +77,22 @@ extern const H5B2_class_t H5A_BT2_NAME[1];
extern const H5B2_class_t H5A_BT2_CORDER[1];
const H5B2_class_t *const H5B2_client_class_g[] = {
- H5B2_TEST, /* 0 - H5B2_TEST_ID */
- H5HF_HUGE_BT2_INDIR, /* 1 - H5B2_FHEAP_HUGE_INDIR_ID */
- H5HF_HUGE_BT2_FILT_INDIR, /* 2 - H5B2_FHEAP_HUGE_FILT_INDIR_ID */
- H5HF_HUGE_BT2_DIR, /* 3 - H5B2_FHEAP_HUGE_DIR_ID */
- H5HF_HUGE_BT2_FILT_DIR, /* 4 - H5B2_FHEAP_HUGE_FILT_DIR_ID */
- H5G_BT2_NAME, /* 5 - H5B2_GRP_DENSE_NAME_ID */
- H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */
- H5SM_INDEX, /* 7 - H5B2_SOHM_INDEX_ID */
- H5A_BT2_NAME, /* 8 - H5B2_ATTR_DENSE_NAME_ID */
- H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */
+ H5B2_TEST, /* 0 - H5B2_TEST_ID */
+ H5HF_HUGE_BT2_INDIR, /* 1 - H5B2_FHEAP_HUGE_INDIR_ID */
+ H5HF_HUGE_BT2_FILT_INDIR, /* 2 - H5B2_FHEAP_HUGE_FILT_INDIR_ID */
+ H5HF_HUGE_BT2_DIR, /* 3 - H5B2_FHEAP_HUGE_DIR_ID */
+ H5HF_HUGE_BT2_FILT_DIR, /* 4 - H5B2_FHEAP_HUGE_FILT_DIR_ID */
+ H5G_BT2_NAME, /* 5 - H5B2_GRP_DENSE_NAME_ID */
+ H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */
+ H5SM_INDEX, /* 7 - H5B2_SOHM_INDEX_ID */
+ H5A_BT2_NAME, /* 8 - H5B2_ATTR_DENSE_NAME_ID */
+ H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */
};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -107,8 +100,6 @@ const H5B2_class_t *const H5B2_client_class_g[] = {
/* Declare a free list to manage the H5B2_t struct */
H5FL_DEFINE_STATIC(H5B2_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5B2_create
*
@@ -118,7 +109,6 @@ H5FL_DEFINE_STATIC(H5B2_t);
* filled in), negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 31 2005
*
*-------------------------------------------------------------------------
@@ -126,11 +116,11 @@ H5FL_DEFINE_STATIC(H5B2_t);
H5B2_t *
H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udata)
{
- H5B2_t *bt2 = NULL; /* Pointer to the B-tree */
- H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- haddr_t hdr_addr; /* B-tree header address */
- H5B2_t *ret_value; /* Return value */
+ H5B2_t * bt2 = NULL; /* Pointer to the B-tree */
+ H5B2_hdr_t * hdr = NULL; /* Pointer to the B-tree header */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ haddr_t hdr_addr; /* B-tree header address */
+ H5B2_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -144,27 +134,30 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udat
HDcompile_assert(H5B2_NUM_BTREE_ID == NELMTS(H5B2_client_class_g));
/* Create shared v2 B-tree header */
- if(HADDR_UNDEF == (hdr_addr = H5B2_hdr_create(f, dxpl_id, cparam, ctx_udata)))
+ if (HADDR_UNDEF == (hdr_addr = H5B2_hdr_create(f, dxpl_id, cparam, ctx_udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't create v2 B-tree header")
/* Create v2 B-tree wrapper */
- if(NULL == (bt2 = H5FL_MALLOC(H5B2_t)))
+ if (NULL == (bt2 = H5FL_MALLOC(H5B2_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info")
/* Look up the B-tree header */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = ctx_udata;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_WRITE)))
+ if (NULL ==
+ (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree header")
/* Point v2 B-tree wrapper at header and bump it's ref count */
bt2->hdr = hdr;
- if(H5B2_hdr_incr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment reference count on shared v2 B-tree header")
+ if (H5B2_hdr_incr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL,
+ "can't increment reference count on shared v2 B-tree header")
/* Increment # of files using this v2 B-tree header */
- if(H5B2_hdr_fuse_incr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment file reference count on shared v2 B-tree header")
+ if (H5B2_hdr_fuse_incr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL,
+ "can't increment file reference count on shared v2 B-tree header")
/* Set file pointer for this v2 B-tree open context */
bt2->f = f;
@@ -173,16 +166,15 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udat
ret_value = bt2;
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, NULL, "unable to release v2 B-tree header")
- if(!ret_value && bt2)
- if(H5B2_close(bt2, dxpl_id) < 0)
+ if (!ret_value && bt2)
+ if (H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTCLOSEOBJ, NULL, "unable to close v2 B-tree")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_create() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_open
*
@@ -192,7 +184,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
@@ -200,10 +191,10 @@ done:
H5B2_t *
H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata)
{
- H5B2_t *bt2 = NULL; /* Pointer to the B-tree */
- H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- H5B2_t *ret_value; /* Return value */
+ H5B2_t * bt2 = NULL; /* Pointer to the B-tree */
+ H5B2_hdr_t * hdr = NULL; /* Pointer to the B-tree header */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ H5B2_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -212,27 +203,29 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata)
HDassert(H5F_addr_defined(addr));
/* Look up the B-tree header */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = ctx_udata;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree header")
+ if (NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree header")
/* Check for pending heap deletion */
- if(hdr->pending_delete)
+ if (hdr->pending_delete)
HGOTO_ERROR(H5E_BTREE, H5E_CANTOPENOBJ, NULL, "can't open v2 B-tree pending deletion")
/* Create v2 B-tree info */
- if(NULL == (bt2 = H5FL_MALLOC(H5B2_t)))
+ if (NULL == (bt2 = H5FL_MALLOC(H5B2_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info")
/* Point v2 B-tree wrapper at header */
bt2->hdr = hdr;
- if(H5B2_hdr_incr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment reference count on shared v2 B-tree header")
+ if (H5B2_hdr_incr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL,
+ "can't increment reference count on shared v2 B-tree header")
/* Increment # of files using this v2 B-tree header */
- if(H5B2_hdr_fuse_incr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment file reference count on shared v2 B-tree header")
+ if (H5B2_hdr_fuse_incr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL,
+ "can't increment file reference count on shared v2 B-tree header")
/* Set file pointer for this v2 B-tree open context */
bt2->f = f;
@@ -241,16 +234,15 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata)
ret_value = bt2;
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, NULL, "unable to release v2 B-tree header")
- if(!ret_value && bt2)
- if(H5B2_close(bt2, dxpl_id) < 0)
+ if (!ret_value && bt2)
+ if (H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTCLOSEOBJ, NULL, "unable to close v2 B-tree")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_open() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_insert
*
@@ -259,7 +251,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -267,8 +258,8 @@ done:
herr_t
H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -283,37 +274,36 @@ H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata)
hdr = bt2->hdr;
/* Check if the root node is allocated yet */
- if(!H5F_addr_defined(hdr->root.addr)) {
+ if (!H5F_addr_defined(hdr->root.addr)) {
/* Create root node as leaf node in B-tree */
- if(H5B2_create_leaf(hdr, dxpl_id, &(hdr->root)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node")
+ if (H5B2_create_leaf(hdr, dxpl_id, &(hdr->root)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node")
} /* end if */
/* Check if we need to split the root node (equiv. to a 1->2 node split) */
- else if(hdr->root.node_nrec == hdr->node_info[hdr->depth].split_nrec) {
+ else if (hdr->root.node_nrec == hdr->node_info[hdr->depth].split_nrec) {
/* Split root node */
- if(H5B2_split_root(hdr, dxpl_id) < 0)
+ if (H5B2_split_root(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split root node")
} /* end if */
/* Attempt to insert record into B-tree */
- if(hdr->depth > 0) {
- if(H5B2_insert_internal(hdr, dxpl_id, hdr->depth, NULL, &hdr->root, H5B2_POS_ROOT, udata) < 0)
+ if (hdr->depth > 0) {
+ if (H5B2_insert_internal(hdr, dxpl_id, hdr->depth, NULL, &hdr->root, H5B2_POS_ROOT, udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node")
} /* end if */
else {
- if(H5B2_insert_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, udata) < 0)
+ if (H5B2_insert_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node")
} /* end else */
/* Mark B-tree header as dirty */
- if(H5B2_hdr_dirty(hdr) < 0)
+ if (H5B2_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_get_addr
*
@@ -322,7 +312,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 5 2009
*
*-------------------------------------------------------------------------
@@ -344,7 +333,6 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B2_get_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_iterate
*
@@ -357,7 +345,6 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
* Return: Value from callback: non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 11 2005
*
*-------------------------------------------------------------------------
@@ -365,8 +352,8 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
herr_t
H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -381,16 +368,14 @@ H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, void *op_data)
hdr = bt2->hdr;
/* Iterate through records */
- if(hdr->root.node_nrec > 0) {
+ if (hdr->root.node_nrec > 0)
/* Iterate through nodes */
- if((ret_value = H5B2_iterate_node(hdr, dxpl_id, hdr->depth, &hdr->root, op, op_data)) < 0)
+ if ((ret_value = H5B2_iterate_node(hdr, dxpl_id, hdr->depth, &hdr->root, op, op_data)) < 0)
HERROR(H5E_BTREE, H5E_CANTLIST, "node iteration failed");
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_find
*
@@ -409,22 +394,20 @@ H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, void *op_data)
* Return: Non-negative (TRUE/FALSE) on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 23 2005
*
*-------------------------------------------------------------------------
*/
htri_t
-H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
- void *op_data)
+H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
- unsigned depth; /* Current depth of the tree */
- int cmp; /* Comparison value of records */
- unsigned idx; /* Location of record which matches key */
- H5B2_nodepos_t curr_pos; /* Position of the current node */
- htri_t ret_value = TRUE; /* Return value */
+ H5B2_hdr_t * hdr; /* Pointer to the B-tree header */
+ H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
+ unsigned depth; /* Current depth of the tree */
+ int cmp; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ H5B2_nodepos_t curr_pos; /* Position of the current node */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -441,74 +424,76 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
curr_node_ptr = hdr->root;
/* Check for empty tree */
- if(curr_node_ptr.node_nrec == 0)
+ if (curr_node_ptr.node_nrec == 0)
HGOTO_DONE(FALSE)
/* Check record against min & max records in tree, to attempt to quickly
* find candidates or avoid further searching.
*/
- if(hdr->min_native_rec != NULL) {
- if((hdr->cls->compare)(udata, hdr->min_native_rec, &cmp) < 0)
+ if (hdr->min_native_rec != NULL) {
+ if ((hdr->cls->compare)(udata, hdr->min_native_rec, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp < 0)
- HGOTO_DONE(FALSE) /* Less than the least record--not found */
- else if(cmp == 0) { /* Record is found */
- if(op && (op)(hdr->min_native_rec, op_data) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
- HGOTO_DONE(TRUE)
- } /* end if */
- } /* end if */
- if(hdr->max_native_rec != NULL) {
- if((hdr->cls->compare)(udata, hdr->max_native_rec, &cmp) < 0)
+ if (cmp < 0)
+ HGOTO_DONE(FALSE) /* Less than the least record--not found */
+ else if (cmp == 0) { /* Record is found */
+ if (op && (op)(hdr->min_native_rec, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree find operation")
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end if */
+ if (hdr->max_native_rec != NULL) {
+ if ((hdr->cls->compare)(udata, hdr->max_native_rec, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp > 0)
- HGOTO_DONE(FALSE) /* Less than the least record--not found */
- else if(cmp == 0) { /* Record is found */
- if(op && (op)(hdr->max_native_rec, op_data) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
- HGOTO_DONE(TRUE)
- } /* end if */
- } /* end if */
+ if (cmp > 0)
+ HGOTO_DONE(FALSE) /* Less than the least record--not found */
+ else if (cmp == 0) { /* Record is found */
+ if (op && (op)(hdr->max_native_rec, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree find operation")
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end if */
/* Current depth of the tree */
depth = hdr->depth;
/* Walk down B-tree to find record or leaf node where record is located */
- cmp = -1;
+ cmp = -1;
curr_pos = H5B2_POS_ROOT;
- while(depth > 0) {
- H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
- H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
+ while (depth > 0) {
+ H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
+ H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr,
+ curr_node_ptr.node_nrec, depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0) {
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0) {
/* Unlock current node before failing */
H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET);
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
}
- if(cmp > 0)
+ if (cmp > 0)
idx++;
-
- if(cmp != 0) {
+ if (cmp != 0) {
/* Get node pointer for next node to search */
- next_node_ptr=internal->node_ptrs[idx];
+ next_node_ptr = internal->node_ptrs[idx];
/* Set the position of the next node */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
curr_pos = H5B2_POS_LEFT;
else
curr_pos = H5B2_POS_MIDDLE;
} /* end if */
- else if(idx == internal->nrec) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ else if (idx == internal->nrec) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
curr_pos = H5B2_POS_RIGHT;
else
curr_pos = H5B2_POS_MIDDLE;
@@ -518,7 +503,8 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
} /* end if */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Set pointer to next node to load */
@@ -526,16 +512,19 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
} /* end if */
else {
/* Make callback for current record */
- if(op && (op)(H5B2_INT_NREC(internal, hdr, idx), op_data) < 0) {
+ if (op && (op)(H5B2_INT_NREC(internal, hdr, idx), op_data) < 0) {
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree find operation")
} /* end if */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Indicate record found */
@@ -547,23 +536,25 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
} /* end while */
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Locate record */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native,
- udata, &idx, &cmp) < 0) {
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) <
+ 0) {
/* unlock current node before failing */
H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET);
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
}
- if(cmp != 0) {
+ if (cmp != 0) {
/* Unlock leaf node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Record not found */
@@ -571,38 +562,42 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
} /* end if */
else {
/* Make callback for current record */
- if(op && (op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
+ if (op && (op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree find operation")
} /* end if */
/* Check for record being the min or max for the tree */
/* (Don't use 'else' for the idx check, to allow for root leaf node) */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->min_native_rec == NULL)
+ if (NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- if(idx == (unsigned)(leaf->nrec - 1)) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
+ } /* end if */
+ if (idx == (unsigned)(leaf->nrec - 1)) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->max_native_rec == NULL)
+ if (NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end if */
+ } /* end else */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
} /* end block */
@@ -610,7 +605,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_find() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_index
*
@@ -624,19 +618,17 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 23 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
- H5B2_found_t op, void *op_data)
+H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
- unsigned depth; /* Current depth of the tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr; /* Pointer to the B-tree header */
+ H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
+ unsigned depth; /* Current depth of the tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -654,39 +646,41 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
curr_node_ptr = hdr->root;
/* Check for empty tree */
- if(curr_node_ptr.node_nrec == 0)
+ if (curr_node_ptr.node_nrec == 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records")
/* Check for index greater than the number of records in the tree */
- if(idx >= curr_node_ptr.all_nrec)
+ if (idx >= curr_node_ptr.all_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records")
/* Current depth of the tree */
depth = hdr->depth;
/* Check for reverse indexing and map requested index to appropriate forward index */
- if(order == H5_ITER_DEC)
+ if (order == H5_ITER_DEC)
idx = curr_node_ptr.all_nrec - (idx + 1);
/* Walk down B-tree to find record or leaf node where record is located */
- while(depth > 0) {
- H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
- H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
- unsigned u; /* Local index variable */
+ while (depth > 0) {
+ H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
+ H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
+ unsigned u; /* Local index variable */
/* Lock B-tree current node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr,
+ curr_node_ptr.node_nrec, depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Search for record with correct index */
- for(u = 0; u < internal->nrec; u++) {
+ for (u = 0; u < internal->nrec; u++) {
/* Check if record is in child node */
- if(internal->node_ptrs[u].all_nrec > idx) {
+ if (internal->node_ptrs[u].all_nrec > idx) {
/* Get node pointer for next node to search */
next_node_ptr = internal->node_ptrs[u];
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Set pointer to next node to load */
@@ -697,18 +691,21 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
} /* end if */
/* Check if record is in this node */
- if(internal->node_ptrs[u].all_nrec == idx) {
+ if (internal->node_ptrs[u].all_nrec == idx) {
/* Make callback for current record */
- if((op)(H5B2_INT_NREC(internal, hdr, u), op_data) < 0) {
+ if ((op)(H5B2_INT_NREC(internal, hdr, u), op_data) < 0) {
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree find operation")
} /* end if */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
HGOTO_DONE(SUCCEED);
@@ -721,14 +718,15 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
} /* end for */
/* Check last node pointer */
- if(u == internal->nrec) {
+ if (u == internal->nrec) {
/* Check if record is in child node */
- if(internal->node_ptrs[u].all_nrec > idx) {
+ if (internal->node_ptrs[u].all_nrec > idx) {
/* Get node pointer for next node to search */
next_node_ptr = internal->node_ptrs[u];
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Set pointer to next node to load */
@@ -736,7 +734,7 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
} /* end if */
else
/* Index that is greater than the number of records in the tree? */
- HDassert("Index off end of tree??" && 0);
+ HDassert(0 && "Index off end of tree??");
} /* end if */
/* Decrement depth we're at in B-tree */
@@ -744,26 +742,28 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
} /* end while */
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Sanity check index */
HDassert(idx < leaf->nrec);
/* Make callback for correct record */
- if((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
+ if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation")
} /* end if */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
} /* end block */
@@ -771,7 +771,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_index() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove
*
@@ -780,17 +779,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 25 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_remove_t op,
- void *op_data)
+H5B2_remove(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_remove_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -804,33 +801,35 @@ H5B2_remove(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_remove_t op,
hdr = bt2->hdr;
/* Check for empty B-tree */
- if(0 == hdr->root.all_nrec)
+ if (0 == hdr->root.all_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree")
/* Attempt to remove record from B-tree */
- if(hdr->depth > 0) {
- hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
+ if (hdr->depth > 0) {
+ hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
- if(H5B2_remove_internal(hdr, dxpl_id, &depth_decreased, NULL, hdr->depth,
- &(hdr->cache_info), NULL, H5B2_POS_ROOT, &hdr->root, udata, op, op_data) < 0)
+ if (H5B2_remove_internal(hdr, dxpl_id, &depth_decreased, NULL, hdr->depth, &(hdr->cache_info), NULL,
+ H5B2_POS_ROOT, &hdr->root, udata, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
/* Check for decreasing the depth of the B-tree */
- if(depth_decreased) {
+ if (depth_decreased) {
/* Destroy free list factories for previous depth */
- if(hdr->node_info[hdr->depth].nat_rec_fac)
- if(H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy node's native record block factory")
- if(hdr->node_info[hdr->depth].node_ptr_fac)
- if(H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy node's node pointer block factory")
+ if (hdr->node_info[hdr->depth].nat_rec_fac)
+ if (H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's native record block factory")
+ if (hdr->node_info[hdr->depth].node_ptr_fac)
+ if (H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's node pointer block factory")
HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
- } /* end if */
+ } /* end if */
else {
- if(H5B2_remove_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, udata, op, op_data) < 0)
+ if (H5B2_remove_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, udata, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node")
} /* end else */
@@ -838,14 +837,13 @@ H5B2_remove(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_remove_t op,
hdr->root.all_nrec--;
/* Mark B-tree header as dirty */
- if(H5B2_hdr_dirty(hdr) < 0)
+ if (H5B2_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove_by_idx
*
@@ -854,17 +852,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
- hsize_t idx, H5B2_remove_t op, void *op_data)
+H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx, H5B2_remove_t op,
+ void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -878,41 +875,43 @@ H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
hdr = bt2->hdr;
/* Check for empty B-tree */
- if(0 == hdr->root.all_nrec)
+ if (0 == hdr->root.all_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree")
/* Check for index greater than the number of records in the tree */
- if(idx >= hdr->root.all_nrec)
+ if (idx >= hdr->root.all_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records")
/* Check for reverse indexing and map requested index to appropriate forward index */
- if(H5_ITER_DEC == order)
+ if (H5_ITER_DEC == order)
idx = hdr->root.all_nrec - (idx + 1);
/* Attempt to remove record from B-tree */
- if(hdr->depth > 0) {
- hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
+ if (hdr->depth > 0) {
+ hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
- if(H5B2_remove_internal_by_idx(hdr, dxpl_id, &depth_decreased, NULL, hdr->depth,
- &(hdr->cache_info), NULL, &hdr->root, H5B2_POS_ROOT, idx, op, op_data) < 0)
+ if (H5B2_remove_internal_by_idx(hdr, dxpl_id, &depth_decreased, NULL, hdr->depth, &(hdr->cache_info),
+ NULL, &hdr->root, H5B2_POS_ROOT, idx, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
/* Check for decreasing the depth of the B-tree */
- if(depth_decreased) {
+ if (depth_decreased) {
/* Destroy free list factories for previous depth */
- if(hdr->node_info[hdr->depth].nat_rec_fac)
- if(H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy node's native record block factory")
- if(hdr->node_info[hdr->depth].node_ptr_fac)
- if(H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy node's node pointer block factory")
+ if (hdr->node_info[hdr->depth].nat_rec_fac)
+ if (H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's native record block factory")
+ if (hdr->node_info[hdr->depth].node_ptr_fac)
+ if (H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's node pointer block factory")
HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
- } /* end if */
+ } /* end if */
else {
- if(H5B2_remove_leaf_by_idx(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, (unsigned)idx, op, op_data) < 0)
+ if (H5B2_remove_leaf_by_idx(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, (unsigned)idx, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node")
} /* end else */
@@ -920,14 +919,13 @@ H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
hdr->root.all_nrec--;
/* Mark B-tree header as dirty */
- if(H5B2_hdr_dirty(hdr) < 0)
+ if (H5B2_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_get_nrec
*
@@ -936,7 +934,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 25 2005
*
*-------------------------------------------------------------------------
@@ -956,7 +953,6 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_get_nrec() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_neighbor
*
@@ -977,17 +973,15 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 8 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range, void *udata,
- H5B2_found_t op, void *op_data)
+H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range, void *udata, H5B2_found_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1002,16 +996,17 @@ H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range, void *udata,
hdr = bt2->hdr;
/* Check for empty tree */
- if(!H5F_addr_defined(hdr->root.addr))
+ if (!H5F_addr_defined(hdr->root.addr))
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records")
/* Attempt to find neighbor record in B-tree */
- if(hdr->depth > 0) {
- if(H5B2_neighbor_internal(hdr, dxpl_id, hdr->depth, &hdr->root, NULL, range, udata, op, op_data) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree internal node")
+ if (hdr->depth > 0) {
+ if (H5B2_neighbor_internal(hdr, dxpl_id, hdr->depth, &hdr->root, NULL, range, udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "unable to find neighbor record in B-tree internal node")
} /* end if */
else {
- if(H5B2_neighbor_leaf(hdr, dxpl_id, &hdr->root, NULL, range, udata, op, op_data) < 0)
+ if (H5B2_neighbor_leaf(hdr, dxpl_id, &hdr->root, NULL, range, udata, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node")
} /* end else */
@@ -1019,7 +1014,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_neighbor() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_modify
*
@@ -1035,22 +1029,20 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 10 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
- void *op_data)
+H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op, void *op_data)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
- H5B2_nodepos_t curr_pos; /* Position of current node */
- unsigned depth; /* Current depth of the tree */
- int cmp; /* Comparison value of records */
- unsigned idx; /* Location of record which matches key */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr; /* Pointer to the B-tree header */
+ H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
+ H5B2_nodepos_t curr_pos; /* Position of current node */
+ unsigned depth; /* Current depth of the tree */
+ int cmp; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1068,49 +1060,50 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
curr_node_ptr = hdr->root;
/* Check for empty tree */
- if(0 == curr_node_ptr.node_nrec)
+ if (0 == curr_node_ptr.node_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records")
/* Current depth of the tree */
depth = hdr->depth;
/* Walk down B-tree to find record or leaf node where record is located */
- cmp = -1;
+ cmp = -1;
curr_pos = H5B2_POS_ROOT;
- while(depth > 0) {
- unsigned internal_flags = H5AC__NO_FLAGS_SET;
- H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
- H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
+ while (depth > 0) {
+ unsigned internal_flags = H5AC__NO_FLAGS_SET;
+ H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
+ H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_WRITE)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr,
+ curr_node_ptr.node_nrec, depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0) {
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0) {
/* Unlock current node */
H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET);
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
}
- if(cmp > 0)
+ if (cmp > 0)
idx++;
- if(cmp != 0) {
+ if (cmp != 0) {
/* Get node pointer for next node to search */
next_node_ptr = internal->node_ptrs[idx];
/* Set the position of the next node */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
curr_pos = H5B2_POS_LEFT;
else
curr_pos = H5B2_POS_MIDDLE;
} /* end if */
- else if(idx == internal->nrec) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ else if (idx == internal->nrec) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
curr_pos = H5B2_POS_RIGHT;
else
curr_pos = H5B2_POS_MIDDLE;
@@ -1120,32 +1113,36 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
} /* end if */
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Set pointer to next node to load */
curr_node_ptr = next_node_ptr;
} /* end if */
else {
- hbool_t changed; /* Whether the 'modify' callback changed the record */
+ hbool_t changed; /* Whether the 'modify' callback changed the record */
/* Make callback for current record */
- if((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
+ if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
HDassert(changed == FALSE);
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, "'modify' callback failed for B-tree find operation")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
+ "'modify' callback failed for B-tree find operation")
} /* end if */
/* Mark the node as dirty if it changed */
internal_flags |= changed ? H5AC__DIRTIED_FLAG : 0;
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, internal_flags) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, internal_flags) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
HGOTO_DONE(SUCCEED);
@@ -1156,76 +1153,82 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
} /* end while */
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
- unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting the leaf node */
- hbool_t changed = FALSE;/* Whether the 'modify' callback changed the record */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
+ unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting the leaf node */
+ hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_WRITE)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Locate record */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native,
- udata, &idx, &cmp) < 0) {
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) <
+ 0) {
H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET);
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
}
- if(cmp != 0) {
+ if (cmp != 0) {
/* Unlock leaf node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- /* Note: don't push error on stack, leave that to next higher level,
- * since many times the B-tree is searched in order to determine
- * if an object exists in the B-tree or not. -QAK
- */
+ /* Note: don't push error on stack, leave that to next higher level,
+ * since many times the B-tree is searched in order to determine
+ * if an object exists in the B-tree or not. -QAK
+ */
#ifdef OLD_WAY
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node")
-#else /* OLD_WAY */
- HGOTO_DONE(FAIL)
-#endif /* OLD_WAY */
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node")
+#else /* OLD_WAY */
+ HGOTO_DONE(FAIL)
+#endif /* OLD_WAY */
} /* end if */
else {
/* Make callback for current record */
- if((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
+ if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
HDassert(changed == FALSE);
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
- HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, "'modify' callback failed for B-tree find operation")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
+ "'modify' callback failed for B-tree find operation")
} /* end if */
/* Check for modified record being the min or max for the tree */
/* (Don't use 'else' for the idx check, to allow for root leaf node) */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->min_native_rec == NULL)
+ if (NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- if(idx == (unsigned)(leaf->nrec - 1)) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
+ } /* end if */
+ if (idx == (unsigned)(leaf->nrec - 1)) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->max_native_rec == NULL)
+ if (NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end if */
+ } /* end else */
/* Mark the node as dirty if it changed */
leaf_flags |= (changed ? H5AC__DIRTIED_FLAG : 0);
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, leaf_flags) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, leaf_flags) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
}
@@ -1233,7 +1236,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_modify() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_close
*
@@ -1242,7 +1244,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
@@ -1250,9 +1251,9 @@ done:
herr_t
H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
{
- haddr_t bt2_addr = HADDR_UNDEF; /* Address of v2 B-tree (for deletion) */
- hbool_t pending_delete = FALSE; /* Whether the v2 B-tree is pending deletion */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t bt2_addr = HADDR_UNDEF; /* Address of v2 B-tree (for deletion) */
+ hbool_t pending_delete = FALSE; /* Whether the v2 B-tree is pending deletion */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1261,45 +1262,48 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
HDassert(bt2->f);
/* Decrement file reference & check if this is the last open v2 B-tree using the shared B-tree header */
- if(0 == H5B2_hdr_fuse_decr(bt2->hdr)) {
+ if (0 == H5B2_hdr_fuse_decr(bt2->hdr)) {
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
/* Check for pending B-tree deletion */
- if(bt2->hdr->pending_delete) {
+ if (bt2->hdr->pending_delete) {
/* Set local info, so B-tree deletion can occur after decrementing the
* header's ref count
*/
pending_delete = TRUE;
- bt2_addr = bt2->hdr->addr;
+ bt2_addr = bt2->hdr->addr;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check for pending v2 B-tree deletion */
- if(pending_delete) {
- H5B2_hdr_t *hdr; /* Another pointer to v2 B-tree header */
+ if (pending_delete) {
+ H5B2_hdr_t *hdr; /* Another pointer to v2 B-tree header */
/* Sanity check */
HDassert(H5F_addr_defined(bt2_addr));
#ifndef NDEBUG
-{
- unsigned hdr_status = 0; /* Header's status in the metadata cache */
-
- /* Check the header's status in the metadata cache */
- if(H5AC_get_entry_status(bt2->f, bt2_addr, &hdr_status) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to check metadata cache status for v2 B-tree header, address = %llu", (unsigned long long)bt2_addr)
-
- /* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
-}
+ {
+ unsigned hdr_status = 0; /* Header's status in the metadata cache */
+
+ /* Check the header's status in the metadata cache */
+ if (H5AC_get_entry_status(bt2->f, bt2_addr, &hdr_status) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for v2 B-tree header, address = %llu",
+ (unsigned long long)bt2_addr)
+
+ /* Sanity checks on header */
+ HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ HDassert(hdr_status & H5AC_ES__IS_PINNED);
+ HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ }
#endif /* NDEBUG */
/* Lock the v2 B-tree header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(bt2->f, dxpl_id, H5AC_BT2_HDR, bt2_addr, NULL, H5AC_WRITE)))
+ if (NULL ==
+ (hdr = (H5B2_hdr_t *)H5AC_protect(bt2->f, dxpl_id, H5AC_BT2_HDR, bt2_addr, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Set the shared v2 B-tree header's file context for this operation */
@@ -1309,11 +1313,12 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
/* (don't put in H5B2_hdr_fuse_decr() as the B-tree header may be evicted
* immediately -QAK)
*/
- if(H5B2_hdr_decr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement reference count on shared v2 B-tree header")
+ if (H5B2_hdr_decr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared v2 B-tree header")
/* Delete v2 B-tree, starting with header (unprotects header) */
- if(H5B2_hdr_delete(hdr, dxpl_id) < 0)
+ if (H5B2_hdr_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree")
} /* end if */
else {
@@ -1321,8 +1326,9 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
/* (don't put in H5B2_hdr_fuse_decr() as the B-tree header may be evicted
* immediately -QAK)
*/
- if(H5B2_hdr_decr(bt2->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement reference count on shared v2 B-tree header")
+ if (H5B2_hdr_decr(bt2->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared v2 B-tree header")
} /* end else */
@@ -1333,7 +1339,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_close() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_delete
*
@@ -1351,18 +1356,16 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
- H5B2_remove_t op, void *op_data)
+H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_data)
{
- H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr = NULL; /* Pointer to the B-tree header */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1372,35 +1375,34 @@ H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
/* Lock the v2 B-tree header into memory */
#ifdef QAK
-HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
+ HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
#endif /* QAK */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = ctx_udata;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_WRITE)))
+ if (NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Remember the callback & context for later */
- hdr->remove_op = op;
+ hdr->remove_op = op;
hdr->remove_op_data = op_data;
/* Check for files using shared v2 B-tree header */
- if(hdr->file_rc)
+ if (hdr->file_rc)
hdr->pending_delete = TRUE;
else {
/* Set the shared v2 B-tree header's file context for this operation */
hdr->f = f;
/* Delete v2 B-tree now, starting with header (unprotects header) */
- if(H5B2_hdr_delete(hdr, dxpl_id) < 0)
+ if (H5B2_hdr_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree")
hdr = NULL;
} /* end if */
done:
/* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release v2 B-tree header")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_delete() */
-
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 4bc2745..9d81161 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2cache.c
* Jan 31 2005
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement v2 B-tree metadata cache methods.
*
@@ -26,64 +26,61 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
-
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* B-tree format version #'s */
-#define H5B2_HDR_VERSION 0 /* Header */
-#define H5B2_INT_VERSION 0 /* Internal node */
-#define H5B2_LEAF_VERSION 0 /* Leaf node */
+#define H5B2_HDR_VERSION 0 /* Header */
+#define H5B2_INT_VERSION 0 /* Internal node */
+#define H5B2_LEAF_VERSION 0 /* Leaf node */
/* Size of stack buffer for serialized headers */
-#define H5B2_HDR_BUF_SIZE 128
-
+#define H5B2_HDR_BUF_SIZE 128
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache callbacks */
static H5B2_hdr_t *H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr);
+static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
static herr_t H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr);
static herr_t H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy);
static herr_t H5B2__cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr);
static H5B2_internal_t *H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal);
-static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy);
-static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr);
-static H5B2_leaf_t *H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned H5_ATTR_UNUSED * flags_ptr);
+static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
+ H5B2_internal_t *i, unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal);
+static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy);
+static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr);
+static H5B2_leaf_t * H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
static herr_t H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf);
static herr_t H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy);
static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr);
-
/*********************/
/* Package Variables */
/*********************/
@@ -118,18 +115,14 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{
(H5AC_size_func_t)H5B2__cache_leaf_size,
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_hdr_load
*
@@ -139,7 +132,6 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
@@ -147,18 +139,18 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{
static H5B2_hdr_t *
H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5B2_hdr_t *hdr = NULL; /* B-tree header */
+ H5B2_hdr_t * hdr = NULL; /* B-tree header */
H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata;
- H5B2_create_t cparam; /* B-tree creation parameters */
- H5B2_subid_t id; /* ID of B-tree class, as found in file */
- uint16_t depth; /* Depth of B-tree */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- H5WB_t *wb = NULL; /* Wrapped buffer for header data */
- uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */
- uint8_t *buf; /* Pointer to header buffer */
- const uint8_t *p; /* Pointer into raw data buffer */
- H5B2_hdr_t *ret_value; /* Return value */
+ H5B2_create_t cparam; /* B-tree creation parameters */
+ H5B2_subid_t id; /* ID of B-tree class, as found in file */
+ uint16_t depth; /* Depth of B-tree */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ H5WB_t * wb = NULL; /* Wrapped buffer for header data */
+ uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */
+ uint8_t * buf; /* Pointer to header buffer */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ H5B2_hdr_t * ret_value; /* Return value */
FUNC_ENTER_STATIC
@@ -168,36 +160,36 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate new B-tree header and reset cache info */
- if(NULL == (hdr = H5B2_hdr_alloc(udata->f)))
+ if (NULL == (hdr = H5B2_hdr_alloc(udata->f)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header")
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read header from disk */
- if(H5F_block_read(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0)
+ if (H5F_block_read(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree header")
/* Get temporary pointer to serialized header */
p = buf;
/* Magic number */
- if(HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature")
+ if (HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5B2_HDR_VERSION)
- HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version")
+ if (*p++ != H5B2_HDR_VERSION)
+ HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version")
/* B-tree class */
id = (H5B2_subid_t)*p++;
- if(id >= H5B2_NUM_BTREE_ID)
+ if (id >= H5B2_NUM_BTREE_ID)
HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type")
/* Node size (in bytes) */
@@ -228,12 +220,12 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
computed_chksum = H5_checksum_metadata(buf, (hdr->hdr_size - H5B2_SIZEOF_CHKSUM), 0);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
+ if (stored_chksum != computed_chksum)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 B-tree header")
/* Initialize B-tree header info */
cparam.cls = H5B2_client_class_g[id];
- if(H5B2_hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0)
+ if (H5B2_hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info")
/* Set the B-tree header's address */
@@ -244,16 +236,15 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
- if(!ret_value && hdr)
- if(H5B2_hdr_free(hdr) < 0)
+ if (!ret_value && hdr)
+ if (H5B2_hdr_free(hdr) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_hdr_flush
*
@@ -262,18 +253,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
- H5B2_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5WB_t *wb = NULL; /* Wrapped buffer for header data */
- uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t *wb = NULL; /* Wrapped buffer for header data */
+ uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -282,20 +272,20 @@ H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert(H5F_addr_defined(addr));
HDassert(hdr);
- if(hdr->cache_info.is_dirty) {
- uint8_t *buf; /* Pointer to header buffer */
- uint8_t *p; /* Pointer into raw data buffer */
+ if (hdr->cache_info.is_dirty) {
+ uint8_t *buf; /* Pointer to header buffer */
+ uint8_t *p; /* Pointer into raw data buffer */
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Set the B-tree header's file context for this operation */
hdr->f = f;
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to serialized header */
@@ -339,25 +329,24 @@ H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* Write the B-tree header. */
HDassert((size_t)(p - buf) == hdr->hdr_size);
- if(H5F_block_write(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0)
+ if (H5F_block_write(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree header to disk")
hdr->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5B2__cache_hdr_dest(f, hdr) < 0)
+ if (destroy)
+ if (H5B2__cache_hdr_dest(f, hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_hdr_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_hdr_dest
*
@@ -374,7 +363,7 @@ done:
static herr_t
H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -386,22 +375,21 @@ H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr)
HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr));
/* Check for freeing file space for B-tree header */
- if(hdr->cache_info.free_file_space_on_destroy) {
+ if (hdr->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->hdr_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->hdr_size) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header")
} /* end if */
/* Release B-tree header info */
- if(H5B2_hdr_free(hdr) < 0)
+ if (H5B2_hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_hdr_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_hdr_clear
*
@@ -418,7 +406,7 @@ done:
static herr_t
H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -430,15 +418,14 @@ H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy)
/* Reset the dirty flag. */
hdr->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5B2__cache_hdr_dest(f, hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header")
+ if (destroy)
+ if (H5B2__cache_hdr_dest(f, hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_hdr_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_hdr_size
*
@@ -470,7 +457,6 @@ H5B2__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_hdr_t *hdr, size_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__cache_hdr_size() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_internal_load
*
@@ -480,7 +466,6 @@ H5B2__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_hdr_t *hdr, size_
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -488,15 +473,15 @@ H5B2__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_hdr_t *hdr, size_
static H5B2_internal_t *
H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */
- H5B2_internal_t *internal = NULL; /* Internal node read */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native record info */
- H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- unsigned u; /* Local index variable */
- H5B2_internal_t *ret_value; /* Return value */
+ H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */
+ H5B2_internal_t * internal = NULL; /* Internal node read */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint8_t * native; /* Pointer to native record info */
+ H5B2_node_ptr_t * int_node_ptr; /* Pointer to node pointer info */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ unsigned u; /* Local index variable */
+ H5B2_internal_t * ret_value; /* Return value */
FUNC_ENTER_STATIC
@@ -506,56 +491,60 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate new internal node and reset cache info */
- if(NULL == (internal = H5FL_MALLOC(H5B2_internal_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (internal = H5FL_MALLOC(H5B2_internal_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&internal->cache_info, 0, sizeof(H5AC_info_t));
/* Set the B-tree header's file context for this operation */
udata->hdr->f = f;
/* Increment ref. count on B-tree header */
- if(H5B2_hdr_incr(udata->hdr) < 0)
+ if (H5B2_hdr_incr(udata->hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header")
/* Share B-tree information */
internal->hdr = udata->hdr;
/* Read header from disk */
- if(H5F_block_read(f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0)
+ if (H5F_block_read(f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree internal node")
p = udata->hdr->page;
/* Magic number */
- if(HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC))
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5B2_INT_VERSION)
- HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree internal node version")
+ if (*p++ != H5B2_INT_VERSION)
+ HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree internal node version")
/* B-tree type */
- if(*p++ != (uint8_t)udata->hdr->cls->id)
+ if (*p++ != (uint8_t)udata->hdr->cls->id)
HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type")
/* Allocate space for the native keys in memory */
- if(NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].nat_rec_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree internal native keys")
+ if (NULL ==
+ (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].nat_rec_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for B-tree internal native keys")
/* Allocate space for the node pointers in memory */
- if(NULL == (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].node_ptr_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree internal node pointers")
+ if (NULL == (internal->node_ptrs =
+ (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].node_ptr_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for B-tree internal node pointers")
/* Set the number of records in the leaf & it's depth */
- internal->nrec = udata->nrec;
+ internal->nrec = udata->nrec;
internal->depth = udata->depth;
/* Deserialize records for internal node */
native = internal->int_native;
- for(u = 0; u < internal->nrec; u++) {
+ for (u = 0; u < internal->nrec; u++) {
/* Decode record */
- if((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0)
+ if ((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode B-tree record")
/* Move to next record */
@@ -565,12 +554,13 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Deserialize node pointers for internal node */
int_node_ptr = internal->node_ptrs;
- for(u = 0; u < (unsigned)(internal->nrec + 1); u++) {
+ for (u = 0; u < (unsigned)(internal->nrec + 1); u++) {
/* Decode node pointer */
H5F_addr_decode(udata->f, (const uint8_t **)&p, &(int_node_ptr->addr));
UINT64DECODE_VAR(p, int_node_ptr->node_nrec, udata->hdr->max_nrec_size);
- if(udata->depth > 1)
- UINT64DECODE_VAR(p, int_node_ptr->all_nrec, udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size)
+ if (udata->depth > 1)
+ UINT64DECODE_VAR(p, int_node_ptr->all_nrec,
+ udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size)
else
int_node_ptr->all_nrec = int_node_ptr->node_nrec;
@@ -579,7 +569,8 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end for */
/* Compute checksum on internal node */
- computed_chksum = H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0);
+ computed_chksum =
+ H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0);
/* Metadata checksum */
UINT32DECODE(p, stored_chksum);
@@ -588,21 +579,20 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert((size_t)(p - (const uint8_t *)udata->hdr->page) <= udata->hdr->node_size);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
+ if (stored_chksum != computed_chksum)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 internal node")
/* Set return value */
ret_value = internal;
done:
- if(!ret_value && internal)
- if(H5B2_internal_free(internal) < 0)
+ if (!ret_value && internal)
+ if (H5B2_internal_free(internal) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_internal_flush
*
@@ -611,15 +601,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -629,12 +619,12 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add
HDassert(internal);
HDassert(internal->hdr);
- if(internal->cache_info.is_dirty) {
- uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native record info */
- H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */
- uint32_t metadata_chksum; /* Computed metadata checksum value */
- unsigned u; /* Local index variable */
+ if (internal->cache_info.is_dirty) {
+ uint8_t * p; /* Pointer into raw data buffer */
+ uint8_t * native; /* Pointer to native record info */
+ H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
+ unsigned u; /* Local index variable */
/* Set the B-tree header's file context for this operation */
internal->hdr->f = f;
@@ -654,9 +644,9 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add
/* Serialize records for internal node */
native = internal->int_native;
- for(u = 0; u < internal->nrec; u++) {
+ for (u = 0; u < internal->nrec; u++) {
/* Encode record */
- if((internal->hdr->cls->encode)(p, native, internal->hdr->cb_ctx) < 0)
+ if ((internal->hdr->cls->encode)(p, native, internal->hdr->cb_ctx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record")
/* Move to next record */
@@ -666,12 +656,13 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add
/* Serialize node pointers for internal node */
int_node_ptr = internal->node_ptrs;
- for(u = 0; u < (unsigned)(internal->nrec + 1); u++) {
+ for (u = 0; u < (unsigned)(internal->nrec + 1); u++) {
/* Encode node pointer */
H5F_addr_encode(f, &p, int_node_ptr->addr);
UINT64ENCODE_VAR(p, int_node_ptr->node_nrec, internal->hdr->max_nrec_size);
- if(internal->depth > 1)
- UINT64ENCODE_VAR(p, int_node_ptr->all_nrec, internal->hdr->node_info[internal->depth - 1].cum_max_nrec_size);
+ if (internal->depth > 1)
+ UINT64ENCODE_VAR(p, int_node_ptr->all_nrec,
+ internal->hdr->node_info[internal->depth - 1].cum_max_nrec_size);
/* Move to next node pointer */
int_node_ptr++;
@@ -683,23 +674,23 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
- /* Write the B-tree internal node */
+ /* Write the B-tree internal node */
HDassert((size_t)(p - internal->hdr->page) <= internal->hdr->node_size);
- if(H5F_block_write(f, H5FD_MEM_BTREE, addr, internal->hdr->node_size, dxpl_id, internal->hdr->page) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree internal node to disk")
+ if (H5F_block_write(f, H5FD_MEM_BTREE, addr, internal->hdr->node_size, dxpl_id, internal->hdr->page) <
+ 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree internal node to disk")
- internal->cache_info.is_dirty = FALSE;
+ internal->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5B2__cache_internal_dest(f, internal) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node")
+ if (destroy)
+ if (H5B2__cache_internal_dest(f, internal) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_internal_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_internal_dest
*
@@ -716,7 +707,7 @@ done:
static herr_t
H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -729,22 +720,22 @@ H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal)
HDassert(!internal->cache_info.free_file_space_on_destroy || H5F_addr_defined(internal->cache_info.addr));
/* Check for freeing file space for B-tree internal node */
- if(internal->cache_info.free_file_space_on_destroy) {
+ if (internal->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, internal->cache_info.addr, (hsize_t)internal->hdr->node_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, internal->cache_info.addr,
+ (hsize_t)internal->hdr->node_size) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree internal node")
} /* end if */
/* Release v2 b-tree internal node */
- if(H5B2_internal_free(internal) < 0)
+ if (H5B2_internal_free(internal) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_internal_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_internal_clear
*
@@ -765,23 +756,20 @@ H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy)
FUNC_ENTER_STATIC
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(internal);
/* Reset the dirty flag. */
internal->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5B2__cache_internal_dest(f, internal) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node")
+ if (destroy)
+ if (H5B2__cache_internal_dest(f, internal) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_internal_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_internal_size
*
@@ -813,7 +801,6 @@ H5B2__cache_internal_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_internal_t *
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__cache_internal_size() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_leaf_load
*
@@ -823,7 +810,6 @@ H5B2__cache_internal_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_internal_t *
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -832,13 +818,13 @@ static H5B2_leaf_t *
H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata;
- H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native keys */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- unsigned u; /* Local index variable */
- H5B2_leaf_t *ret_value; /* Return value */
+ H5B2_leaf_t * leaf = NULL; /* Pointer to lead node loaded */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint8_t * native; /* Pointer to native keys */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ unsigned u; /* Local index variable */
+ H5B2_leaf_t * ret_value; /* Return value */
FUNC_ENTER_STATIC
@@ -848,7 +834,7 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void
HDassert(udata);
/* Allocate new leaf node and reset cache info */
- if(NULL == (leaf = H5FL_MALLOC(H5B2_leaf_t)))
+ if (NULL == (leaf = H5FL_MALLOC(H5B2_leaf_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&leaf->cache_info, 0, sizeof(H5AC_info_t));
@@ -856,33 +842,33 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void
udata->hdr->f = udata->f;
/* Increment ref. count on B-tree header */
- if(H5B2_hdr_incr(udata->hdr) < 0)
+ if (H5B2_hdr_incr(udata->hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header")
/* Share B-tree header information */
leaf->hdr = udata->hdr;
/* Read header from disk */
- if(H5F_block_read(udata->f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0)
+ if (H5F_block_read(udata->f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree leaf node")
p = udata->hdr->page;
/* Magic number */
- if(HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree leaf node signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5B2_LEAF_VERSION)
+ if (*p++ != H5B2_LEAF_VERSION)
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree leaf node version")
/* B-tree type */
- if(*p++ != (uint8_t)udata->hdr->cls->id)
+ if (*p++ != (uint8_t)udata->hdr->cls->id)
HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type")
/* Allocate space for the native keys in memory */
- if(NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[0].nat_rec_fac)))
+ if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[0].nat_rec_fac)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree leaf native keys")
/* Set the number of records in the leaf */
@@ -890,9 +876,9 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void
/* Deserialize records for leaf node */
native = leaf->leaf_native;
- for(u = 0; u < leaf->nrec; u++) {
+ for (u = 0; u < leaf->nrec; u++) {
/* Decode record */
- if((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0)
+ if ((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, NULL, "unable to decode B-tree record")
/* Move to next record */
@@ -901,7 +887,8 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void
} /* end for */
/* Compute checksum on internal node */
- computed_chksum = H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0);
+ computed_chksum =
+ H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0);
/* Metadata checksum */
UINT32DECODE(p, stored_chksum);
@@ -910,21 +897,20 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void
HDassert((size_t)(p - (const uint8_t *)udata->hdr->page) <= udata->hdr->node_size);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 leaf node")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 leaf node")
/* Set return value */
ret_value = leaf;
done:
- if(!ret_value && leaf)
- if(H5B2_leaf_free(leaf) < 0)
+ if (!ret_value && leaf)
+ if (H5B2_leaf_free(leaf) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_leaf_flush
*
@@ -939,9 +925,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -951,11 +938,11 @@ H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
HDassert(leaf);
HDassert(leaf->hdr);
- if(leaf->cache_info.is_dirty) {
- uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native keys */
+ if (leaf->cache_info.is_dirty) {
+ uint8_t *p; /* Pointer into raw data buffer */
+ uint8_t *native; /* Pointer to native keys */
uint32_t metadata_chksum; /* Computed metadata checksum value */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
/* Set the B-tree header's file context for this operation */
leaf->hdr->f = f;
@@ -975,9 +962,9 @@ H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
/* Serialize records for leaf node */
native = leaf->leaf_native;
- for(u = 0; u < leaf->nrec; u++) {
+ for (u = 0; u < leaf->nrec; u++) {
/* Encode record */
- if((leaf->hdr->cls->encode)(p, native, leaf->hdr->cb_ctx) < 0)
+ if ((leaf->hdr->cls->encode)(p, native, leaf->hdr->cb_ctx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record")
/* Move to next record */
@@ -991,23 +978,22 @@ H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
- /* Write the B-tree leaf node */
+ /* Write the B-tree leaf node */
HDassert((size_t)(p - leaf->hdr->page) <= leaf->hdr->node_size);
- if(H5F_block_write(f, H5FD_MEM_BTREE, addr, leaf->hdr->node_size, dxpl_id, leaf->hdr->page) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree leaf node to disk")
+ if (H5F_block_write(f, H5FD_MEM_BTREE, addr, leaf->hdr->node_size, dxpl_id, leaf->hdr->page) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree leaf node to disk")
- leaf->cache_info.is_dirty = FALSE;
+ leaf->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5B2__cache_leaf_dest(f, leaf) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node")
+ if (destroy)
+ if (H5B2__cache_leaf_dest(f, leaf) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_leaf_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_leaf_dest
*
@@ -1016,7 +1002,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1024,7 +1009,7 @@ done:
static herr_t
H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1037,22 +1022,22 @@ H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf)
HDassert(!leaf->cache_info.free_file_space_on_destroy || H5F_addr_defined(leaf->cache_info.addr));
/* Check for freeing file space for B-tree leaf node */
- if(leaf->cache_info.free_file_space_on_destroy) {
+ if (leaf->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, leaf->cache_info.addr, (hsize_t)leaf->hdr->node_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, leaf->cache_info.addr,
+ (hsize_t)leaf->hdr->node_size) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree leaf node")
} /* end if */
/* Destroy v2 b-tree leaf node */
- if(H5B2_leaf_free(leaf) < 0)
+ if (H5B2_leaf_free(leaf) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_leaf_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_leaf_clear
*
@@ -1081,15 +1066,14 @@ H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy)
/* Reset the dirty flag. */
leaf->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5B2__cache_leaf_dest(f, leaf) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node")
+ if (destroy)
+ if (H5B2__cache_leaf_dest(f, leaf) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_leaf_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5B2__cache_leaf_size
*
@@ -1120,4 +1104,3 @@ H5B2__cache_leaf_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_leaf_t *leaf, si
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__cache_leaf_size() */
-
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 3c92390..c40885e 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2dbg.c
* Feb 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Dump debugging information about a v2 B-tree.
*
@@ -26,51 +26,44 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_debug
*
@@ -79,21 +72,20 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t obj_addr)
+ const H5B2_class_t *type, haddr_t obj_addr)
{
- H5B2_hdr_t *hdr = NULL; /* B-tree header info */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
- unsigned u; /* Local index variable */
- char temp_str[128]; /* Temporary string, for formatting */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr = NULL; /* B-tree header info */
+ void * dbg_ctx = NULL; /* v2 B-tree debugging context */
+ unsigned u; /* Local index variable */
+ char temp_str[128]; /* Temporary string, for formatting */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -108,22 +100,22 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(fwidth >= 0);
HDassert(type);
HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
+ (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
/* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
+ if (type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
+ if (NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
/*
* Load the B-tree header.
*/
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = dbg_ctx;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
+ if (NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Set file pointer for this B-tree operation */
hdr->f = f;
@@ -134,58 +126,40 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) record:",
- hdr->rrec_size);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of node:", hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of raw (disk) record:", hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- hdr->cache_info.is_dirty ? "True" : "False");
+ "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False");
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of records in tree:", hdr->root.all_nrec);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Depth:",
- hdr->depth);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of records in tree:",
- hdr->root.all_nrec);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of records in root node:",
- hdr->root.node_nrec);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of root node:",
- hdr->root.addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Split percent:",
- hdr->split_percent);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Merge percent:",
- hdr->merge_percent);
+ "Number of records in root node:", hdr->root.node_nrec);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of root node:", hdr->root.addr);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent);
/* Print relevant node info */
HDfprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
- for(u = 0; u < (unsigned)(hdr->depth + 1); u++) {
+ for (u = 0; u < (unsigned)(hdr->depth + 1); u++) {
HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
- HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str,
- hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
+ HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
+ hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
+ if (dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
- if(hdr) {
+ if (hdr) {
hdr->f = NULL;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_int_debug
*
@@ -194,22 +168,21 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 4 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr)
{
- H5B2_hdr_t *hdr = NULL; /* B-tree header */
- H5B2_internal_t *internal = NULL; /* B-tree internal node */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
- unsigned u; /* Local index variable */
- char temp_str[128]; /* Temporary string, for formatting */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr = NULL; /* B-tree header */
+ H5B2_internal_t * internal = NULL; /* B-tree internal node */
+ void * dbg_ctx = NULL; /* v2 B-tree debugging context */
+ unsigned u; /* Local index variable */
+ char temp_str[128]; /* Temporary string, for formatting */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -223,25 +196,26 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(fwidth >= 0);
HDassert(type);
HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
+ (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
/* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
+ if (type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
+ if (NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
/*
* Load the B-tree header.
*/
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = dbg_ctx;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
+ if (NULL ==
+ (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Set file pointer for this B-tree operation */
hdr->f = f;
@@ -249,11 +223,11 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree internal node
*/
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, addr, nrec, depth, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, addr, nrec, depth, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
/* Print opening message */
- if(internal->depth == 1)
+ if (internal->depth == 1)
HDfprintf(stream, "%*sv2 B-tree Internal 'Leaf' Node...\n", indent, "");
else
HDfprintf(stream, "%*sv2 B-tree Internal 'Branch' Node...\n", indent, "");
@@ -261,63 +235,49 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) record:",
- hdr->rrec_size);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of node:", hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of raw (disk) record:", hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- internal->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of records in node:",
- internal->nrec);
+ "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False");
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec);
/* Print all node pointers and records */
- for(u = 0; u < internal->nrec; u++) {
+ for (u = 0; u < internal->nrec; u++) {
/* Print node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str,
- internal->node_ptrs[u].all_nrec,
- internal->node_ptrs[u].node_nrec,
+ HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
+ internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
internal->node_ptrs[u].addr);
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str);
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
HDassert(H5B2_INT_NREC(internal, hdr, u));
- (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_INT_NREC(internal, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX(0, fwidth - 6),
+ H5B2_INT_NREC(internal, hdr, u), dbg_ctx);
} /* end for */
/* Print final node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str,
- internal->node_ptrs[u].all_nrec,
- internal->node_ptrs[u].node_nrec,
- internal->node_ptrs[u].addr);
+ HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
+ internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, internal->node_ptrs[u].addr);
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
+ if (dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
- if(hdr) {
+ if (hdr) {
hdr->f = NULL;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
} /* end if */
- if(internal && H5AC_unprotect(f, dxpl_id, H5AC_BT2_INT, addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (internal && H5AC_unprotect(f, dxpl_id, H5AC_BT2_INT, addr, internal, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree internal node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_int_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_leaf_debug
*
@@ -326,22 +286,21 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 7 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr)
{
- H5B2_hdr_t *hdr = NULL; /* B-tree header */
- H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
- H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
- unsigned u; /* Local index variable */
- char temp_str[128]; /* Temporary string, for formatting */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr = NULL; /* B-tree header */
+ H5B2_leaf_t * leaf = NULL; /* B-tree leaf node */
+ H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ void * dbg_ctx = NULL; /* v2 B-tree debugging context */
+ unsigned u; /* Local index variable */
+ char temp_str[128]; /* Temporary string, for formatting */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -355,25 +314,26 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(fwidth >= 0);
HDassert(type);
HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
+ (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
/* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
+ if (type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
+ if (NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
/*
* Load the B-tree header.
*/
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.ctx_udata = dbg_ctx;
- if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree header")
+ if (NULL ==
+ (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree header")
/* Set file pointer for this B-tree operation */
hdr->f = f;
@@ -381,8 +341,8 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree leaf node
*/
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, addr, nrec, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
+ if (NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, addr, nrec, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Print opening message */
HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
@@ -390,43 +350,34 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- hdr->node_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) record:",
- hdr->rrec_size);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of node:", hdr->node_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of raw (disk) record:", hdr->rrec_size);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- leaf->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of records in node:",
- leaf->nrec);
+ "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False");
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec);
/* Print all node pointers and records */
- for(u = 0; u < leaf->nrec; u++) {
+ for (u = 0; u < leaf->nrec; u++) {
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str);
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
- (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_LEAF_NREC(leaf, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX(0, fwidth - 6), H5B2_LEAF_NREC(leaf, hdr, u),
+ dbg_ctx);
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
+ if (dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
- if(hdr) {
+ if (hdr) {
hdr->f = NULL;
- if(H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
} /* end if */
- if(leaf && H5AC_unprotect(f, dxpl_id, H5AC_BT2_LEAF, addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (leaf && H5AC_unprotect(f, dxpl_id, H5AC_BT2_LEAF, addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree leaf node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_leaf_debug() */
-
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index d45c2cb..a63ae1e 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2int.c
* Feb 27 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Internal routines for managing v2 B-trees.
*
@@ -26,24 +26,23 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
/* Number of records that fit into leaf node */
-#define H5B2_NUM_LEAF_REC(n, r) \
- (((n) - H5B2_LEAF_PREFIX_SIZE) / (r))
+#define H5B2_NUM_LEAF_REC(n, r) (((n)-H5B2_LEAF_PREFIX_SIZE) / (r))
/* Uncomment this macro to enable extra sanity checking */
/* #define H5B2_DEBUG */
@@ -52,27 +51,22 @@
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -89,8 +83,6 @@ H5FL_SEQ_DEFINE_STATIC(size_t);
/* Declare a free list to manage the 'H5B2_node_info_t' sequence information */
H5FL_SEQ_DEFINE(H5B2_node_info_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_init
*
@@ -99,19 +91,17 @@ H5FL_SEQ_DEFINE(H5B2_node_info_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
- uint16_t depth)
+H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, uint16_t depth)
{
- size_t sz_max_nrec; /* Temporary variable for range checking */
- unsigned u_max_nrec_size; /* Temporary variable for range checking */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t sz_max_nrec; /* Temporary variable for range checking */
+ unsigned u_max_nrec_size; /* Temporary variable for range checking */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -122,7 +112,7 @@ H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
HDassert(cparam);
HDassert(cparam->cls);
HDassert((cparam->cls->crt_context && cparam->cls->dst_context) ||
- (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
+ (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
HDassert(cparam->node_size > 0);
HDassert(cparam->rrec_size > 0);
HDassert(cparam->merge_percent > 0 && cparam->merge_percent <= 100);
@@ -130,7 +120,7 @@ H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
HDassert(cparam->merge_percent < (cparam->split_percent / 2));
/* Initialize basic information */
- hdr->rc = 0;
+ hdr->rc = 0;
hdr->pending_delete = FALSE;
/* Assign dynamic information */
@@ -139,42 +129,43 @@ H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
/* Assign user's information */
hdr->split_percent = cparam->split_percent;
hdr->merge_percent = cparam->merge_percent;
- hdr->node_size = cparam->node_size;
- hdr->rrec_size = cparam->rrec_size;
+ hdr->node_size = cparam->node_size;
+ hdr->rrec_size = cparam->rrec_size;
/* Assign common type information */
hdr->cls = cparam->cls;
/* Allocate "page" for node I/O */
- if(NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
+ if (NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
#ifdef H5_CLEAR_MEMORY
-HDmemset(hdr->page, 0, hdr->node_size);
+ HDmemset(hdr->page, 0, hdr->node_size);
#endif /* H5_CLEAR_MEMORY */
/* Allocate array of node info structs */
- if(NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
+ if (NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize leaf node info */
sz_max_nrec = H5B2_NUM_LEAF_REC(hdr->node_size, hdr->rrec_size);
H5_CHECKED_ASSIGN(hdr->node_info[0].max_nrec, unsigned, sz_max_nrec, size_t)
- hdr->node_info[0].split_nrec = (hdr->node_info[0].max_nrec * hdr->split_percent) / 100;
- hdr->node_info[0].merge_nrec = (hdr->node_info[0].max_nrec * hdr->merge_percent) / 100;
- hdr->node_info[0].cum_max_nrec = hdr->node_info[0].max_nrec;
+ hdr->node_info[0].split_nrec = (hdr->node_info[0].max_nrec * hdr->split_percent) / 100;
+ hdr->node_info[0].merge_nrec = (hdr->node_info[0].max_nrec * hdr->merge_percent) / 100;
+ hdr->node_info[0].cum_max_nrec = hdr->node_info[0].max_nrec;
hdr->node_info[0].cum_max_nrec_size = 0;
- if(NULL == (hdr->node_info[0].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[0].max_nrec)))
+ if (NULL ==
+ (hdr->node_info[0].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[0].max_nrec)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
hdr->node_info[0].node_ptr_fac = NULL;
/* Allocate array of pointers to internal node native keys */
/* (uses leaf # of records because its the largest) */
- if(NULL == (hdr->nat_off = H5FL_SEQ_MALLOC(size_t, (size_t)hdr->node_info[0].max_nrec)))
+ if (NULL == (hdr->nat_off = H5FL_SEQ_MALLOC(size_t, (size_t)hdr->node_info[0].max_nrec)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize offsets in native key block */
/* (uses leaf # of records because its the largest) */
- for(u = 0; u < hdr->node_info[0].max_nrec; u++)
+ for (u = 0; u < hdr->node_info[0].max_nrec; u++)
hdr->nat_off[u] = hdr->cls->nrec_size * u;
/* Compute size to store # of records in each node */
@@ -184,8 +175,8 @@ HDmemset(hdr->page, 0, hdr->node_size);
HDassert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
/* Initialize internal node info */
- if(depth > 0) {
- for(u = 1; u < (unsigned)(depth + 1); u++) {
+ if (depth > 0) {
+ for (u = 1; u < (unsigned)(depth + 1); u++) {
sz_max_nrec = H5B2_NUM_INT_REC(hdr, u);
H5_CHECKED_ASSIGN(hdr->node_info[u].max_nrec, unsigned, sz_max_nrec, size_t)
HDassert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
@@ -193,33 +184,36 @@ HDmemset(hdr->page, 0, hdr->node_size);
hdr->node_info[u].split_nrec = (hdr->node_info[u].max_nrec * hdr->split_percent) / 100;
hdr->node_info[u].merge_nrec = (hdr->node_info[u].max_nrec * hdr->merge_percent) / 100;
- hdr->node_info[u].cum_max_nrec = ((hdr->node_info[u].max_nrec + 1) *
- hdr->node_info[u - 1].cum_max_nrec) + hdr->node_info[u].max_nrec;
+ hdr->node_info[u].cum_max_nrec =
+ ((hdr->node_info[u].max_nrec + 1) * hdr->node_info[u - 1].cum_max_nrec) +
+ hdr->node_info[u].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[u].cum_max_nrec);
H5_CHECKED_ASSIGN(hdr->node_info[u].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
- if(NULL == (hdr->node_info[u].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[u].max_nrec)))
+ if (NULL == (hdr->node_info[u].nat_rec_fac =
+ H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[u].max_nrec)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
- if(NULL == (hdr->node_info[u].node_ptr_fac = H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[u].max_nrec + 1))))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create internal 'branch' node node pointer block factory")
+ if (NULL == (hdr->node_info[u].node_ptr_fac =
+ H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[u].max_nrec + 1))))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL,
+ "can't create internal 'branch' node node pointer block factory")
} /* end for */
- } /* end if */
+ } /* end if */
/* Create the callback context, if the callback exists */
- if(hdr->cls->crt_context) {
- if(NULL == (hdr->cb_ctx = (*hdr->cls->crt_context)(ctx_udata)))
+ if (hdr->cls->crt_context) {
+ if (NULL == (hdr->cb_ctx = (*hdr->cls->crt_context)(ctx_udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, FAIL, "unable to create v2 B-tree client callback context")
} /* end if */
done:
- if(ret_value < 0)
- if(H5B2_hdr_free(hdr) < 0)
+ if (ret_value < 0)
+ if (H5B2_hdr_free(hdr) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free shared v2 B-tree info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_init() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_alloc
*
@@ -228,7 +222,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -236,8 +229,8 @@ done:
H5B2_hdr_t *
H5B2_hdr_alloc(H5F_t *f)
{
- H5B2_hdr_t *hdr = NULL; /* v2 B-tree header */
- H5B2_hdr_t *ret_value; /* Return value */
+ H5B2_hdr_t *hdr = NULL; /* v2 B-tree header */
+ H5B2_hdr_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -247,15 +240,15 @@ H5B2_hdr_alloc(H5F_t *f)
HDassert(f);
/* Allocate space for the shared information */
- if(NULL == (hdr = H5FL_CALLOC(H5B2_hdr_t)))
+ if (NULL == (hdr = H5FL_CALLOC(H5B2_hdr_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree header")
/* Assign non-zero information */
- hdr->f = f;
+ hdr->f = f;
hdr->sizeof_addr = H5F_SIZEOF_ADDR(f);
hdr->sizeof_size = H5F_SIZEOF_SIZE(f);
- hdr->hdr_size = H5B2_HEADER_SIZE(hdr);
- hdr->root.addr = HADDR_UNDEF;
+ hdr->hdr_size = H5B2_HEADER_SIZE(hdr);
+ hdr->root.addr = HADDR_UNDEF;
/* Set return value */
ret_value = hdr;
@@ -265,7 +258,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_create
*
@@ -274,17 +266,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
haddr_t
-H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
- void *ctx_udata)
+H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udata)
{
- H5B2_hdr_t *hdr = NULL; /* The new v2 B-tree header information */
- haddr_t ret_value; /* Return value */
+ H5B2_hdr_t *hdr = NULL; /* The new v2 B-tree header information */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -295,33 +285,32 @@ H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
HDassert(cparam);
/* Allocate v2 B-tree header */
- if(NULL == (hdr = H5B2_hdr_alloc(f)))
+ if (NULL == (hdr = H5B2_hdr_alloc(f)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed for B-tree header")
/* Initialize shared B-tree info */
- if(H5B2_hdr_init(hdr, cparam, ctx_udata, (uint16_t)0) < 0)
+ if (H5B2_hdr_init(hdr, cparam, ctx_udata, (uint16_t)0) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, HADDR_UNDEF, "can't create shared B-tree info")
/* Allocate space for the header on disk */
- if(HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->hdr_size)))
+ if (HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->hdr_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header")
/* Cache the new B-tree node */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache")
/* Set address of v2 B-tree header to return */
ret_value = hdr->addr;
done:
- if(!H5F_addr_defined(ret_value) && hdr)
- if(H5B2_hdr_free(hdr) < 0)
+ if (!H5F_addr_defined(ret_value) && hdr)
+ if (H5B2_hdr_free(hdr) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, HADDR_UNDEF, "unable to release v2 B-tree header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_create() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_incr
*
@@ -330,7 +319,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -338,7 +326,7 @@ done:
herr_t
H5B2_hdr_incr(H5B2_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -346,8 +334,8 @@ H5B2_hdr_incr(H5B2_hdr_t *hdr)
HDassert(hdr);
/* Mark header as un-evictable when a B-tree node is depending on it */
- if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr) < 0)
+ if (hdr->rc == 0)
+ if (H5AC_pin_protected_entry(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTPIN, FAIL, "unable to pin v2 B-tree header")
/* Increment reference count on B-tree header */
@@ -357,7 +345,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_incr_hdr() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_decr
*
@@ -366,7 +353,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -374,7 +360,7 @@ done:
herr_t
H5B2_hdr_decr(H5B2_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -386,15 +372,14 @@ H5B2_hdr_decr(H5B2_hdr_t *hdr)
hdr->rc--;
/* Mark header as evictable again when no nodes depend on it */
- if(hdr->rc == 0)
- if(H5AC_unpin_entry(hdr) < 0)
+ if (hdr->rc == 0)
+ if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin v2 B-tree header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_fuse_incr
*
@@ -403,7 +388,6 @@ done:
* Return: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -422,7 +406,6 @@ H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B2_hdr_fuse_incr() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_fuse_decr
*
@@ -431,7 +414,6 @@ H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr)
* Return: The file's reference count after the decrement. (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -451,7 +433,6 @@ H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr)
FUNC_LEAVE_NOAPI(hdr->file_rc)
} /* end H5B2_hdr_fuse_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_dirty
*
@@ -460,7 +441,6 @@ H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -468,7 +448,7 @@ H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr)
herr_t
H5B2_hdr_dirty(H5B2_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -476,14 +456,13 @@ H5B2_hdr_dirty(H5B2_hdr_t *hdr)
HDassert(hdr);
/* Mark B-tree header as dirty in cache */
- if(H5AC_mark_entry_dirty(hdr) < 0)
+ if (H5AC_mark_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark v2 B-tree header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_dirty() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_free
*
@@ -492,7 +471,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -500,7 +478,7 @@ done:
herr_t
H5B2_hdr_free(H5B2_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -508,32 +486,34 @@ H5B2_hdr_free(H5B2_hdr_t *hdr)
HDassert(hdr);
/* Destroy the callback context */
- if(hdr->cb_ctx) {
- if((*hdr->cls->dst_context)(hdr->cb_ctx) < 0)
+ if (hdr->cb_ctx) {
+ if ((*hdr->cls->dst_context)(hdr->cb_ctx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "can't destroy v2 B-tree client callback context")
hdr->cb_ctx = NULL;
} /* end if */
/* Free the B-tree node buffer */
- if(hdr->page)
+ if (hdr->page)
hdr->page = H5FL_BLK_FREE(node_page, hdr->page);
/* Free the array of offsets into the native key block */
- if(hdr->nat_off)
+ if (hdr->nat_off)
hdr->nat_off = H5FL_SEQ_FREE(size_t, hdr->nat_off);
/* Release the node info */
- if(hdr->node_info) {
- unsigned u; /* Local index variable */
+ if (hdr->node_info) {
+ unsigned u; /* Local index variable */
/* Destroy free list factories */
- for(u = 0; u < (unsigned)(hdr->depth + 1); u++) {
- if(hdr->node_info[u].nat_rec_fac)
- if(H5FL_fac_term(hdr->node_info[u].nat_rec_fac) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "can't destroy node's native record block factory")
- if(hdr->node_info[u].node_ptr_fac)
- if(H5FL_fac_term(hdr->node_info[u].node_ptr_fac) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "can't destroy node's node pointer block factory")
+ for (u = 0; u < (unsigned)(hdr->depth + 1); u++) {
+ if (hdr->node_info[u].nat_rec_fac)
+ if (H5FL_fac_term(hdr->node_info[u].nat_rec_fac) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's native record block factory")
+ if (hdr->node_info[u].node_ptr_fac)
+ if (H5FL_fac_term(hdr->node_info[u].node_ptr_fac) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL,
+ "can't destroy node's node pointer block factory")
} /* end for */
/* Free the array of node info structs */
@@ -541,13 +521,13 @@ H5B2_hdr_free(H5B2_hdr_t *hdr)
} /* end if */
/* Release the min & max record info, if set */
- if(hdr->min_native_rec) {
- HDfree(hdr->min_native_rec);
- hdr->min_native_rec = NULL;
+ if (hdr->min_native_rec) {
+ HDfree(hdr->min_native_rec);
+ hdr->min_native_rec = NULL;
} /* end if */
- if(hdr->max_native_rec) {
- HDfree(hdr->max_native_rec);
- hdr->max_native_rec = NULL;
+ if (hdr->max_native_rec) {
+ HDfree(hdr->max_native_rec);
+ hdr->max_native_rec = NULL;
} /* end if */
/* Free B-tree header info */
@@ -557,7 +537,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_free() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_delete
*
@@ -566,7 +545,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
@@ -574,8 +552,8 @@ done:
herr_t
H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id)
{
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting v2 B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting v2 B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -583,22 +561,23 @@ H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr);
#ifndef NDEBUG
-{
- unsigned hdr_status = 0; /* v2 B-tree header's status in the metadata cache */
-
- /* Check the v2 B-tree header's status in the metadata cache */
- if(H5AC_get_entry_status(hdr->f, hdr->addr, &hdr_status) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to check metadata cache status for v2 B-tree header")
-
- /* Sanity checks on v2 B-tree header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
-} /* end block */
+ {
+ unsigned hdr_status = 0; /* v2 B-tree header's status in the metadata cache */
+
+ /* Check the v2 B-tree header's status in the metadata cache */
+ if (H5AC_get_entry_status(hdr->f, hdr->addr, &hdr_status) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for v2 B-tree header")
+
+ /* Sanity checks on v2 B-tree header */
+ HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ } /* end block */
#endif /* NDEBUG */
/* Delete all nodes in B-tree */
- if(H5F_addr_defined(hdr->root.addr))
- if(H5B2_delete_node(hdr, dxpl_id, hdr->depth, &hdr->root, hdr->remove_op, hdr->remove_op_data) < 0)
+ if (H5F_addr_defined(hdr->root.addr))
+ if (H5B2_delete_node(hdr, dxpl_id, hdr->depth, &hdr->root, hdr->remove_op, hdr->remove_op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete B-tree nodes")
/* Indicate that the heap header should be deleted & file space freed */
@@ -606,9 +585,8 @@ H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id)
done:
/* Unprotect the header with appropriate flags */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_hdr_delete() */
-
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 93e737e..a8d475a 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2int.c
* Feb 27 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Internal routines for managing v2 B-trees.
*
@@ -26,16 +26,16 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
@@ -48,40 +48,38 @@
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Helper functions */
-static herr_t H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *node_ptr, unsigned depth);
-static herr_t H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx);
-static herr_t H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned idx);
-static herr_t H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx);
-static herr_t H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx);
-static herr_t H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx);
-static herr_t H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr,
- unsigned idx, void *swap_loc);
+static herr_t H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr, unsigned depth);
+static herr_t H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx);
+static herr_t H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal,
+ unsigned idx);
+static herr_t H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx);
+static herr_t H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx);
+static herr_t H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx);
+static herr_t H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx, void *swap_loc);
#ifdef H5B2_DEBUG
static herr_t H5B2_assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf);
static herr_t H5B2_assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_leaf_t *leaf2);
-static herr_t H5B2_assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal);
-static herr_t H5B2_assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2);
+static herr_t H5B2_assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr,
+ const H5B2_internal_t *internal);
+static herr_t H5B2_assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr,
+ const H5B2_internal_t *internal, const H5B2_internal_t *internal2);
#endif /* H5B2_DEBUG */
/*********************/
@@ -94,12 +92,10 @@ H5FL_DEFINE(H5B2_internal_t);
/* Declare a free list to manage the H5B2_leaf_t struct */
H5FL_DEFINE(H5B2_leaf_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -107,8 +103,6 @@ H5FL_DEFINE(H5B2_leaf_t);
/* Declare a free list to manage the 'H5B2_node_info_t' sequence information */
H5FL_SEQ_EXTERN(H5B2_node_info_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5B2_locate_record
*
@@ -125,32 +119,31 @@ H5FL_SEQ_EXTERN(H5B2_node_info_t);
* record to locate is greater than all records to search).
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off,
- const uint8_t *native, const void *udata, unsigned *idx, int *cmp)
+H5B2_locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off, const uint8_t *native,
+ const void *udata, unsigned *idx, int *cmp)
{
- unsigned lo = 0, hi; /* Low & high index values */
- unsigned my_idx = 0; /* Final index value */
- herr_t ret_value = SUCCEED;
+ unsigned lo = 0, hi; /* Low & high index values */
+ unsigned my_idx = 0; /* Final index value */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
*cmp = -1;
hi = nrec;
- while(lo < hi && *cmp) {
- my_idx = (lo + hi) / 2;
- if((type->compare)(udata, native + rec_off[my_idx], cmp) < 0)
+ while (lo < hi && *cmp) {
+ my_idx = (lo + hi) / 2;
+ if ((type->compare)(udata, native + rec_off[my_idx], cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(*cmp < 0)
- hi = my_idx;
- else
- lo = my_idx + 1;
+ if (*cmp < 0)
+ hi = my_idx;
+ else
+ lo = my_idx + 1;
}
*idx = my_idx;
@@ -159,7 +152,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_locate_record */
-
/*-------------------------------------------------------------------------
* Function: H5B2_split1
*
@@ -169,26 +161,27 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
+H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr,
+ unsigned idx)
{
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
- void *left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
- uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */
- uint8_t *left_native, *right_native;/* Pointers to childs' native records */
- H5B2_node_ptr_t *left_node_ptrs = NULL, *right_node_ptrs = NULL;/* Pointers to childs' node pointer info */
- uint16_t mid_record; /* Index of "middle" record in current node */
- uint16_t old_node_nrec; /* Number of records in internal node split */
- unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
+ void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
+ uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */
+ uint8_t * left_native, *right_native; /* Pointers to childs' native records */
+ H5B2_node_ptr_t * left_node_ptrs = NULL,
+ *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
+ uint16_t mid_record; /* Index of "middle" record in current node */
+ uint16_t old_node_nrec; /* Number of records in internal node split */
+ unsigned left_child_flags = H5AC__NO_FLAGS_SET,
+ right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -198,66 +191,74 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Slide records in parent node up one space, to make room for promoted record */
- if(idx < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx + 1), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size * (internal->nrec - idx));
- HDmemmove(&(internal->node_ptrs[idx + 2]), &(internal->node_ptrs[idx + 1]), sizeof(H5B2_node_ptr_t) * (internal->nrec - idx));
+ if (idx < internal->nrec) {
+ HDmemmove(H5B2_INT_NREC(internal, hdr, idx + 1), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size * (internal->nrec - idx));
+ HDmemmove(&(internal->node_ptrs[idx + 2]), &(internal->node_ptrs[idx + 1]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - idx));
} /* end if */
/* Check for the kind of B-tree node to split */
- if(depth > 1) {
- H5B2_internal_t *left_int = NULL, *right_int = NULL; /* Pointers to old & new internal nodes */
+ if (depth > 1) {
+ H5B2_internal_t *left_int = NULL, *right_int = NULL; /* Pointers to old & new internal nodes */
/* Create new internal node */
internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec = 0;
- if(H5B2_create_internal(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), (depth - 1)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node")
+ if (H5B2_create_internal(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), (depth - 1)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node")
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_INT;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Protect both leaves */
- if(NULL == (left_int = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL ==
+ (left_int = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (right_int = H5B2_protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (right_int = H5B2_protect_internal(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, (depth - 1),
+ H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* More setup for child nodes */
- left_child = left_int;
- right_child = right_int;
- left_nrec = &(left_int->nrec);
- right_nrec = &(right_int->nrec);
- left_native = left_int->int_native;
- right_native = right_int->int_native;
- left_node_ptrs = left_int->node_ptrs;
+ left_child = left_int;
+ right_child = right_int;
+ left_nrec = &(left_int->nrec);
+ right_nrec = &(right_int->nrec);
+ left_native = left_int->int_native;
+ right_native = right_int->int_native;
+ left_node_ptrs = left_int->node_ptrs;
right_node_ptrs = right_int->node_ptrs;
} /* end if */
else {
- H5B2_leaf_t *left_leaf = NULL, *right_leaf = NULL; /* Pointers to old & new leaf nodes */
+ H5B2_leaf_t *left_leaf = NULL, *right_leaf = NULL; /* Pointers to old & new leaf nodes */
/* Create new leaf node */
internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec = 0;
- if(H5B2_create_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1])) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new leaf node")
+ if (H5B2_create_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1])) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new leaf node")
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Protect both leaves */
- if(NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for child nodes */
- left_child = left_leaf;
- right_child = right_leaf;
- left_nrec = &(left_leaf->nrec);
- right_nrec = &(right_leaf->nrec);
- left_native = left_leaf->leaf_native;
+ left_child = left_leaf;
+ right_child = right_leaf;
+ left_nrec = &(left_leaf->nrec);
+ right_nrec = &(right_leaf->nrec);
+ left_native = left_leaf->leaf_native;
right_native = right_leaf->leaf_native;
} /* end if */
@@ -265,20 +266,20 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
old_node_nrec = internal->node_ptrs[idx].node_nrec;
/* Determine "middle" record to promote to internal node */
- mid_record = old_node_nrec / 2;
+ mid_record = (uint16_t)(old_node_nrec / 2);
/* Copy "upper half" of records to new child */
- HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
- H5B2_NAT_NREC(left_native, hdr, mid_record + (unsigned)1),
- hdr->cls->nrec_size * (old_node_nrec - (mid_record + (unsigned)1)));
+ HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, mid_record + (unsigned)1),
+ hdr->cls->nrec_size * (old_node_nrec - (mid_record + (unsigned)1)));
/* Copy "upper half" of node pointers, if the node is an internal node */
- if(depth > 1)
+ if (depth > 1)
HDmemcpy(&(right_node_ptrs[0]), &(left_node_ptrs[mid_record + (unsigned)1]),
- sizeof(H5B2_node_ptr_t) * (size_t)(old_node_nrec - mid_record));
+ sizeof(H5B2_node_ptr_t) * (size_t)(old_node_nrec - mid_record));
/* Copy "middle" record to internal node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, mid_record), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, mid_record),
+ hdr->cls->nrec_size);
/* Mark nodes as dirty */
left_child_flags |= H5AC__DIRTIED_FLAG;
@@ -289,25 +290,25 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
internal->node_ptrs[idx + 1].node_nrec = *right_nrec = (uint16_t)(old_node_nrec - (mid_record + 1));
/* Determine total number of records in new child nodes */
- if(depth > 1) {
- unsigned u; /* Local index variable */
- hsize_t new_left_all_nrec; /* New total number of records in left child */
- hsize_t new_right_all_nrec; /* New total number of records in right child */
+ if (depth > 1) {
+ unsigned u; /* Local index variable */
+ hsize_t new_left_all_nrec; /* New total number of records in left child */
+ hsize_t new_right_all_nrec; /* New total number of records in right child */
/* Compute total of all records in each child node */
new_left_all_nrec = internal->node_ptrs[idx].node_nrec;
- for(u = 0; u < (*left_nrec + (unsigned)1); u++)
+ for (u = 0; u < (*left_nrec + (unsigned)1); u++)
new_left_all_nrec += left_node_ptrs[u].all_nrec;
new_right_all_nrec = internal->node_ptrs[idx + 1].node_nrec;
- for(u = 0; u < (*right_nrec + (unsigned)1); u++)
+ for (u = 0; u < (*right_nrec + (unsigned)1); u++)
new_right_all_nrec += right_node_ptrs[u].all_nrec;
- internal->node_ptrs[idx].all_nrec = new_left_all_nrec;
+ internal->node_ptrs[idx].all_nrec = new_left_all_nrec;
internal->node_ptrs[idx + 1].all_nrec = new_right_all_nrec;
} /* end if */
else {
- internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
+ internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec;
} /* end else */
@@ -321,32 +322,35 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
curr_node_ptr->node_nrec++;
/* Mark grandparent as dirty, if given */
- if(parent_cache_info_flags_ptr)
+ if (parent_cache_info_flags_ptr)
*parent_cache_info_flags_ptr |= H5AC__DIRTIED_FLAG;
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1) {
- H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child, (H5B2_internal_t *)right_child);
- H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child, (H5B2_internal_t *)left_child);
+ if (depth > 1) {
+ H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child,
+ (H5B2_internal_t *)right_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child,
+ (H5B2_internal_t *)left_child);
} /* end if */
else {
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)left_child, (H5B2_leaf_t *)right_child);
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)right_child);
- } /* end else */
+ } /* end else */
#endif /* H5B2_DEBUG */
done:
/* Release child nodes (marked as dirty) */
- if(left_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
+ if (left_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree leaf node")
- if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
+ if (right_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree leaf node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_split1() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_split_root
*
@@ -356,7 +360,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@@ -364,12 +367,12 @@ done:
herr_t
H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id)
{
- H5B2_internal_t *new_root = NULL; /* Pointer to new root node */
- unsigned new_root_flags = H5AC__NO_FLAGS_SET; /* Cache flags for new root node */
- H5B2_node_ptr_t old_root_ptr; /* Old node pointer to root node in B-tree */
- size_t sz_max_nrec; /* Temporary variable for range checking */
- unsigned u_max_nrec_size; /* Temporary variable for range checking */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_internal_t *new_root = NULL; /* Pointer to new root node */
+ unsigned new_root_flags = H5AC__NO_FLAGS_SET; /* Cache flags for new root node */
+ H5B2_node_ptr_t old_root_ptr; /* Old node pointer to root node in B-tree */
+ size_t sz_max_nrec; /* Temporary variable for range checking */
+ unsigned u_max_nrec_size; /* Temporary variable for range checking */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -380,7 +383,8 @@ H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id)
hdr->depth++;
/* Re-allocate array of node info structs */
- if(NULL == (hdr->node_info = H5FL_SEQ_REALLOC(H5B2_node_info_t, hdr->node_info, (size_t)(hdr->depth + 1))))
+ if (NULL ==
+ (hdr->node_info = H5FL_SEQ_REALLOC(H5B2_node_info_t, hdr->node_info, (size_t)(hdr->depth + 1))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Update node info for new depth of tree */
@@ -388,43 +392,48 @@ H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id)
H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].max_nrec, unsigned, sz_max_nrec, size_t)
hdr->node_info[hdr->depth].split_nrec = (hdr->node_info[hdr->depth].max_nrec * hdr->split_percent) / 100;
hdr->node_info[hdr->depth].merge_nrec = (hdr->node_info[hdr->depth].max_nrec * hdr->merge_percent) / 100;
- hdr->node_info[hdr->depth].cum_max_nrec = ((hdr->node_info[hdr->depth].max_nrec + 1) *
- hdr->node_info[hdr->depth - 1].cum_max_nrec) + hdr->node_info[hdr->depth].max_nrec;
+ hdr->node_info[hdr->depth].cum_max_nrec =
+ ((hdr->node_info[hdr->depth].max_nrec + 1) * hdr->node_info[hdr->depth - 1].cum_max_nrec) +
+ hdr->node_info[hdr->depth].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[hdr->depth].cum_max_nrec);
H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
- if(NULL == (hdr->node_info[hdr->depth].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[hdr->depth].max_nrec)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
- if(NULL == (hdr->node_info[hdr->depth].node_ptr_fac = H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[hdr->depth].max_nrec + 1))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create internal 'branch' node node pointer block factory")
+ if (NULL == (hdr->node_info[hdr->depth].nat_rec_fac =
+ H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[hdr->depth].max_nrec)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
+ if (NULL == (hdr->node_info[hdr->depth].node_ptr_fac =
+ H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[hdr->depth].max_nrec + 1))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
+ "can't create internal 'branch' node node pointer block factory")
/* Keep old root node pointer info */
old_root_ptr = hdr->root;
/* Create new internal node to use as root */
hdr->root.node_nrec = 0;
- if(H5B2_create_internal(hdr, dxpl_id, &(hdr->root), hdr->depth) < 0)
+ if (H5B2_create_internal(hdr, dxpl_id, &(hdr->root), hdr->depth) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node")
/* Protect new root node */
- if(NULL == (new_root = H5B2_protect_internal(hdr, dxpl_id, hdr->root.addr, hdr->root.node_nrec, hdr->depth, H5AC_WRITE)))
+ if (NULL == (new_root = H5B2_protect_internal(hdr, dxpl_id, hdr->root.addr, hdr->root.node_nrec,
+ hdr->depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Set first node pointer in root node to old root node pointer info */
new_root->node_ptrs[0] = old_root_ptr;
/* Split original root node */
- if(H5B2_split1(hdr, dxpl_id, hdr->depth, &(hdr->root), NULL, new_root, &new_root_flags, 0) < 0)
+ if (H5B2_split1(hdr, dxpl_id, hdr->depth, &(hdr->root), NULL, new_root, &new_root_flags, 0) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split old root node")
done:
/* Release new root node (marked as dirty) */
- if(new_root && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, hdr->root.addr, new_root, new_root_flags) < 0)
+ if (new_root &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, hdr->root.addr, new_root, new_root_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree internal node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_split_root() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_redistribute2
*
@@ -434,24 +443,24 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned idx)
+H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal, unsigned idx)
{
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
- void *left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
- uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */
- uint8_t *left_native, *right_native; /* Pointers to childs' native records */
- H5B2_node_ptr_t *left_node_ptrs = NULL, *right_node_ptrs = NULL;/* Pointers to childs' node pointer info */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
+ void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
+ uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */
+ uint8_t * left_native, *right_native; /* Pointers to childs' native records */
+ H5B2_node_ptr_t * left_node_ptrs = NULL,
+ *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal redistrib */
- unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned left_child_flags = H5AC__NO_FLAGS_SET,
+ right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -460,108 +469,124 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(internal);
/* Check for the kind of B-tree node to redistribute */
- if(depth > 1) {
- H5B2_internal_t *left_internal; /* Pointer to left internal node */
- H5B2_internal_t *right_internal; /* Pointer to right internal node */
+ if (depth > 1) {
+ H5B2_internal_t *left_internal; /* Pointer to left internal node */
+ H5B2_internal_t *right_internal; /* Pointer to right internal node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_INT;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock left & right B-tree child nodes */
- if(NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (left_internal =
+ H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for child nodes */
- left_child = left_internal;
- right_child = right_internal;
- left_nrec = &(left_internal->nrec);
- right_nrec = &(right_internal->nrec);
- left_native = left_internal->int_native;
- right_native = right_internal->int_native;
- left_node_ptrs = left_internal->node_ptrs;
+ left_child = left_internal;
+ right_child = right_internal;
+ left_nrec = &(left_internal->nrec);
+ right_nrec = &(right_internal->nrec);
+ left_native = left_internal->int_native;
+ right_native = right_internal->int_native;
+ left_node_ptrs = left_internal->node_ptrs;
right_node_ptrs = right_internal->node_ptrs;
} /* end if */
else {
- H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
- H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
+ H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
+ H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock left & right B-tree child nodes */
- if(NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for child nodes */
- left_child = left_leaf;
- right_child = right_leaf;
- left_nrec = &(left_leaf->nrec);
- right_nrec = &(right_leaf->nrec);
- left_native = left_leaf->leaf_native;
+ left_child = left_leaf;
+ right_child = right_leaf;
+ left_nrec = &(left_leaf->nrec);
+ right_nrec = &(right_leaf->nrec);
+ left_native = left_leaf->leaf_native;
right_native = right_leaf->leaf_native;
} /* end else */
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1) {
- H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child, (H5B2_internal_t *)right_child);
- H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child, (H5B2_internal_t *)left_child);
+ if (depth > 1) {
+ H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child,
+ (H5B2_internal_t *)right_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child,
+ (H5B2_internal_t *)left_child);
} /* end if */
else {
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)left_child, (H5B2_leaf_t *)right_child);
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)right_child);
- } /* end else */
+ } /* end else */
#endif /* H5B2_DEBUG */
/* Determine whether to shuffle records left or right */
- if(*left_nrec < *right_nrec) {
+ if (*left_nrec < *right_nrec) {
/* Moving record from right node to left */
- uint16_t new_right_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for right child */
- uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
+ uint16_t new_right_nrec =
+ (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for right child */
+ uint16_t move_nrec =
+ (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
/* Copy record from parent node down into left child */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* See if we need to move records from right node */
- if(move_nrec > 1)
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, (*left_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
+ if (move_nrec > 1)
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, (*left_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (size_t)(move_nrec - 1));
/* Move record from right node into parent node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)),
+ hdr->cls->nrec_size);
/* Slide records in right node down */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, move_nrec), hdr->cls->nrec_size * new_right_nrec);
+ HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, move_nrec),
+ hdr->cls->nrec_size * new_right_nrec);
/* Handle node pointers, if we have an internal node */
- if(depth > 1) {
- hsize_t moved_nrec=move_nrec; /* Total number of records moved, for internal redistrib */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec = move_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
/* Count the number of records being moved */
- for(u=0; u<move_nrec; u++)
+ for (u = 0; u < move_nrec; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
H5_CHECKED_ASSIGN(left_moved_nrec, hssize_t, moved_nrec, hsize_t)
right_moved_nrec -= (hssize_t)moved_nrec;
/* Copy node pointers from right node to left */
- HDmemcpy(&(left_node_ptrs[*left_nrec+1]),&(right_node_ptrs[0]),sizeof(H5B2_node_ptr_t)*move_nrec);
+ HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * move_nrec);
/* Slide node pointers in right node down */
- HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[move_nrec]), sizeof(H5B2_node_ptr_t) * (new_right_nrec + (unsigned)1));
+ HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[move_nrec]),
+ sizeof(H5B2_node_ptr_t) * (new_right_nrec + (unsigned)1));
} /* end if */
/* Update number of records in child nodes */
- *left_nrec = (uint16_t)(*left_nrec + move_nrec);
+ *left_nrec = (uint16_t)(*left_nrec + move_nrec);
*right_nrec = new_right_nrec;
/* Mark nodes as dirty */
@@ -571,37 +596,44 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
else {
/* Moving record from left node to right */
- uint16_t new_left_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for left child */
- uint16_t move_nrec = (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
+ uint16_t new_left_nrec =
+ (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for left child */
+ uint16_t move_nrec =
+ (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
/* Slide records in right node up */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec),
- H5B2_NAT_NREC(right_native, hdr, 0),
- hdr->cls->nrec_size * (*right_nrec));
+ HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Copy record from parent node down into right child */
- HDmemcpy(H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* See if we need to move records from left node */
- if(move_nrec > 1)
- HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, ((*left_nrec - move_nrec) + 1)), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
+ if (move_nrec > 1)
+ HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
+ H5B2_NAT_NREC(left_native, hdr, ((*left_nrec - move_nrec) + 1)),
+ hdr->cls->nrec_size * (size_t)(move_nrec - 1));
/* Move record from left node into parent node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, (*left_nrec - move_nrec)), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, (*left_nrec - move_nrec)),
+ hdr->cls->nrec_size);
/* Handle node pointers, if we have an internal node */
- if(depth > 1) {
- hsize_t moved_nrec = move_nrec; /* Total number of records moved, for internal redistrib */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec = move_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
/* Slide node pointers in right node up */
- HDmemmove(&(right_node_ptrs[move_nrec]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ HDmemmove(&(right_node_ptrs[move_nrec]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Copy node pointers from left node to right */
- HDmemcpy(&(right_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * move_nrec);
+ HDmemcpy(&(right_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]),
+ sizeof(H5B2_node_ptr_t) * move_nrec);
/* Count the number of records being moved */
- for(u = 0; u < move_nrec; u++)
+ for (u = 0; u < move_nrec; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
left_moved_nrec -= (hssize_t)moved_nrec;
@@ -609,7 +641,7 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end if */
/* Update number of records in child nodes */
- *left_nrec = new_left_nrec;
+ *left_nrec = new_left_nrec;
*right_nrec = (uint16_t)(*right_nrec + move_nrec);
/* Mark nodes as dirty */
@@ -618,42 +650,47 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end else */
/* Update # of records in child nodes */
- internal->node_ptrs[idx].node_nrec = *left_nrec;
+ internal->node_ptrs[idx].node_nrec = *left_nrec;
internal->node_ptrs[idx + 1].node_nrec = *right_nrec;
/* Update total # of records in child B-trees */
- if(depth > 1) {
- internal->node_ptrs[idx].all_nrec = (hsize_t)((hssize_t)internal->node_ptrs[idx].all_nrec + left_moved_nrec);
- internal->node_ptrs[idx + 1].all_nrec = (hsize_t)((hssize_t)internal->node_ptrs[idx + 1].all_nrec + right_moved_nrec);
+ if (depth > 1) {
+ internal->node_ptrs[idx].all_nrec =
+ (hsize_t)((hssize_t)internal->node_ptrs[idx].all_nrec + left_moved_nrec);
+ internal->node_ptrs[idx + 1].all_nrec =
+ (hsize_t)((hssize_t)internal->node_ptrs[idx + 1].all_nrec + right_moved_nrec);
} /* end if */
else {
- internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
+ internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec;
} /* end else */
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1) {
- H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child, (H5B2_internal_t *)right_child);
- H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child, (H5B2_internal_t *)left_child);
+ if (depth > 1) {
+ H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child,
+ (H5B2_internal_t *)right_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child,
+ (H5B2_internal_t *)left_child);
} /* end if */
else {
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)left_child, (H5B2_leaf_t *)right_child);
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)right_child);
- } /* end else */
+ } /* end else */
#endif /* H5B2_DEBUG */
done:
/* Release child nodes (marked as dirty) */
- if(left_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
+ if (left_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
- if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
+ if (right_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_redistribute2() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_redistribute3
*
@@ -663,31 +700,32 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
+H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx)
{
- H5B2_node_ptr_t *left_node_ptrs = NULL, *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
- H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
- haddr_t middle_addr; /* Address of middle child node */
- void *left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
- void *middle_child = NULL; /* Pointers to middle child node */
- uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */
- uint16_t *middle_nrec; /* Pointers to middle child # of records */
- uint8_t *left_native, *right_native; /* Pointers to childs' native records */
- uint8_t *middle_native; /* Pointers to middle child's native records */
+ H5B2_node_ptr_t *left_node_ptrs = NULL,
+ *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
+ H5B2_node_ptr_t * middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
+ haddr_t middle_addr; /* Address of middle child node */
+ void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */
+ void * middle_child = NULL; /* Pointers to middle child node */
+ uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */
+ uint16_t * middle_nrec; /* Pointers to middle child # of records */
+ uint8_t * left_native, *right_native; /* Pointers to childs' native records */
+ uint8_t * middle_native; /* Pointers to middle child's native records */
hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal split */
- hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */
- unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- herr_t ret_value = SUCCEED; /* Return value */
+ hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */
+ unsigned left_child_flags = H5AC__NO_FLAGS_SET,
+ right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -697,77 +735,86 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Check for the kind of B-tree node to redistribute */
- if(depth > 1) {
- H5B2_internal_t *left_internal; /* Pointer to left internal node */
- H5B2_internal_t *middle_internal; /* Pointer to middle internal node */
- H5B2_internal_t *right_internal; /* Pointer to right internal node */
+ if (depth > 1) {
+ H5B2_internal_t *left_internal; /* Pointer to left internal node */
+ H5B2_internal_t *middle_internal; /* Pointer to middle internal node */
+ H5B2_internal_t *right_internal; /* Pointer to right internal node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_INT;
- left_addr = internal->node_ptrs[idx - 1].addr;
+ left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock B-tree child nodes */
- if(NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx - 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (middle_internal = H5B2_protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (middle_internal =
+ H5B2_protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* More setup for child nodes */
- left_child = left_internal;
- middle_child = middle_internal;
- right_child = right_internal;
- left_nrec = &(left_internal->nrec);
- middle_nrec = &(middle_internal->nrec);
- right_nrec = &(right_internal->nrec);
- left_native = left_internal->int_native;
- middle_native = middle_internal->int_native;
- right_native = right_internal->int_native;
- left_node_ptrs = left_internal->node_ptrs;
+ left_child = left_internal;
+ middle_child = middle_internal;
+ right_child = right_internal;
+ left_nrec = &(left_internal->nrec);
+ middle_nrec = &(middle_internal->nrec);
+ right_nrec = &(right_internal->nrec);
+ left_native = left_internal->int_native;
+ middle_native = middle_internal->int_native;
+ right_native = right_internal->int_native;
+ left_node_ptrs = left_internal->node_ptrs;
middle_node_ptrs = middle_internal->node_ptrs;
- right_node_ptrs = right_internal->node_ptrs;
+ right_node_ptrs = right_internal->node_ptrs;
} /* end if */
else {
- H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
- H5B2_leaf_t *middle_leaf; /* Pointer to middle leaf node */
- H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
+ H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
+ H5B2_leaf_t *middle_leaf; /* Pointer to middle leaf node */
+ H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- left_addr = internal->node_ptrs[idx - 1].addr;
+ left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock B-tree child nodes */
- if(NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (middle_leaf = H5B2_protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (middle_leaf = H5B2_protect_leaf(hdr, dxpl_id, middle_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for child nodes */
- left_child = left_leaf;
- middle_child = middle_leaf;
- right_child = right_leaf;
- left_nrec = &(left_leaf->nrec);
- middle_nrec = &(middle_leaf->nrec);
- right_nrec = &(right_leaf->nrec);
- left_native = left_leaf->leaf_native;
+ left_child = left_leaf;
+ middle_child = middle_leaf;
+ right_child = right_leaf;
+ left_nrec = &(left_leaf->nrec);
+ middle_nrec = &(middle_leaf->nrec);
+ right_nrec = &(right_leaf->nrec);
+ left_native = left_leaf->leaf_native;
middle_native = middle_leaf->leaf_native;
- right_native = right_leaf->leaf_native;
+ right_native = right_leaf->leaf_native;
} /* end else */
/* Redistribute records */
{
/* Compute new # of records in each node */
- unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
- uint16_t new_middle_nrec = (uint16_t)(total_nrec - 2) / 3;
- uint16_t new_left_nrec = (uint16_t)((total_nrec - 2) - new_middle_nrec) / 2;
- uint16_t new_right_nrec = (uint16_t)((total_nrec - 2) - (unsigned)(new_left_nrec + new_middle_nrec));
+ unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
+ uint16_t new_middle_nrec = (uint16_t)((total_nrec - 2) / 3);
+ uint16_t new_left_nrec = (uint16_t)(((total_nrec - 2) - new_middle_nrec) / 2);
+ uint16_t new_right_nrec = (uint16_t)((total_nrec - 2) - (unsigned)(new_left_nrec + new_middle_nrec));
uint16_t curr_middle_nrec = *middle_nrec;
/* Sanity check rounding */
@@ -775,43 +822,50 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(new_middle_nrec <= new_right_nrec);
/* Move records into left node */
- if(new_left_nrec > *left_nrec) {
- uint16_t moved_middle_nrec = 0; /* Number of records moved into left node */
+ if (new_left_nrec > *left_nrec) {
+ uint16_t moved_middle_nrec = 0; /* Number of records moved into left node */
/* Move left parent record down to left node */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1),
+ hdr->cls->nrec_size);
/* Move records from middle node into left node */
- if((new_left_nrec - 1) > *left_nrec) {
+ if ((new_left_nrec - 1) > *left_nrec) {
moved_middle_nrec = (uint16_t)(new_left_nrec - (*left_nrec + 1));
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * moved_middle_nrec);
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1),
+ H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * moved_middle_nrec);
} /* end if */
/* Move record from middle node up to parent node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1),
+ H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec), hdr->cls->nrec_size);
moved_middle_nrec++;
/* Slide records in middle node down */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec), hdr->cls->nrec_size * (size_t)(*middle_nrec - moved_middle_nrec));
+ HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0),
+ H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec),
+ hdr->cls->nrec_size * (size_t)(*middle_nrec - moved_middle_nrec));
/* Move node pointers also if this is an internal node */
- if(depth > 1) {
- hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
- unsigned move_nptrs; /* Number of node pointers to move */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned move_nptrs; /* Number of node pointers to move */
+ unsigned u; /* Local index variable */
/* Move middle node pointers into left node */
move_nptrs = (unsigned)(new_left_nrec - *left_nrec);
- HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t)*move_nptrs);
+ HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * move_nptrs);
/* Count the number of records being moved into the left node */
- for(u = 0, moved_nrec = 0; u < move_nptrs; u++)
+ for (u = 0, moved_nrec = 0; u < move_nptrs; u++)
moved_nrec += middle_node_ptrs[u].all_nrec;
left_moved_nrec = (hssize_t)(moved_nrec + move_nptrs);
middle_moved_nrec -= (hssize_t)(moved_nrec + move_nptrs);
/* Slide the node pointers in middle node down */
- HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[move_nptrs]), sizeof(H5B2_node_ptr_t) * ((*middle_nrec - move_nptrs) + 1));
+ HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[move_nptrs]),
+ sizeof(H5B2_node_ptr_t) * ((*middle_nrec - move_nptrs) + 1));
} /* end if */
/* Update the current number of records in middle node */
@@ -823,35 +877,44 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end if */
/* Move records into right node */
- if(new_right_nrec > *right_nrec) {
- unsigned right_nrec_move = (unsigned)(new_right_nrec - *right_nrec); /* Number of records to move out of right node */
+ if (new_right_nrec > *right_nrec) {
+ unsigned right_nrec_move =
+ (unsigned)(new_right_nrec - *right_nrec); /* Number of records to move out of right node */
/* Slide records in right node up */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, right_nrec_move), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
+ HDmemmove(H5B2_NAT_NREC(right_native, hdr, right_nrec_move), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Move right parent record down to right node */
- HDmemcpy(H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* Move records from middle node into right node */
- if(right_nrec_move > 1)
- HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, ((curr_middle_nrec - right_nrec_move) + 1)), hdr->cls->nrec_size * (right_nrec_move - 1));
+ if (right_nrec_move > 1)
+ HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
+ H5B2_NAT_NREC(middle_native, hdr, ((curr_middle_nrec - right_nrec_move) + 1)),
+ hdr->cls->nrec_size * (right_nrec_move - 1));
/* Move record from middle node up to parent node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec - right_nrec_move)), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx),
+ H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec - right_nrec_move)),
+ hdr->cls->nrec_size);
/* Move node pointers also if this is an internal node */
- if(depth > 1) {
- hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
/* Slide the node pointers in right node up */
- HDmemmove(&(right_node_ptrs[right_nrec_move]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ HDmemmove(&(right_node_ptrs[right_nrec_move]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Move middle node pointers into right node */
- HDmemcpy(&(right_node_ptrs[0]), &(middle_node_ptrs[(curr_middle_nrec - right_nrec_move) + 1]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
+ HDmemcpy(&(right_node_ptrs[0]), &(middle_node_ptrs[(curr_middle_nrec - right_nrec_move) + 1]),
+ sizeof(H5B2_node_ptr_t) * right_nrec_move);
/* Count the number of records being moved into the right node */
- for(u = 0, moved_nrec = 0; u < right_nrec_move; u++)
+ for (u = 0, moved_nrec = 0; u < right_nrec_move; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
right_moved_nrec = (hssize_t)(moved_nrec + right_nrec_move);
middle_moved_nrec -= (hssize_t)(moved_nrec + right_nrec_move);
@@ -866,35 +929,43 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end if */
/* Move records out of left node */
- if(new_left_nrec < *left_nrec) {
- unsigned left_nrec_move = (unsigned)(*left_nrec - new_left_nrec); /* Number of records to move out of left node */
+ if (new_left_nrec < *left_nrec) {
+ unsigned left_nrec_move =
+ (unsigned)(*left_nrec - new_left_nrec); /* Number of records to move out of left node */
/* Slide middle records up */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * curr_middle_nrec);
+ HDmemmove(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move), H5B2_NAT_NREC(middle_native, hdr, 0),
+ hdr->cls->nrec_size * curr_middle_nrec);
/* Move left parent record down to middle node */
- HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move - 1),
+ H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
/* Move left records to middle node */
- if(left_nrec_move > 1)
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, new_left_nrec + 1), hdr->cls->nrec_size * (left_nrec_move - 1));
+ if (left_nrec_move > 1)
+ HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0),
+ H5B2_NAT_NREC(left_native, hdr, new_left_nrec + 1),
+ hdr->cls->nrec_size * (left_nrec_move - 1));
/* Move left parent record up from left node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(left_native, hdr, new_left_nrec), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(left_native, hdr, new_left_nrec),
+ hdr->cls->nrec_size);
/* Move node pointers also if this is an internal node */
- if(depth > 1) {
- hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
/* Slide the node pointers in middle node up */
- HDmemmove(&(middle_node_ptrs[left_nrec_move]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(curr_middle_nrec + 1));
+ HDmemmove(&(middle_node_ptrs[left_nrec_move]), &(middle_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(curr_middle_nrec + 1));
/* Move left node pointers into middle node */
- HDmemcpy(&(middle_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * left_nrec_move);
+ HDmemcpy(&(middle_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]),
+ sizeof(H5B2_node_ptr_t) * left_nrec_move);
/* Count the number of records being moved into the left node */
- for(u = 0, moved_nrec = 0; u < left_nrec_move; u++)
+ for (u = 0, moved_nrec = 0; u < left_nrec_move; u++)
moved_nrec += middle_node_ptrs[u].all_nrec;
left_moved_nrec -= (hssize_t)(moved_nrec + left_nrec_move);
middle_moved_nrec += (hssize_t)(moved_nrec + left_nrec_move);
@@ -909,37 +980,44 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end if */
/* Move records out of right node */
- if(new_right_nrec < *right_nrec) {
- unsigned right_nrec_move = (unsigned)(*right_nrec - new_right_nrec); /* Number of records to move out of right node */
+ if (new_right_nrec < *right_nrec) {
+ unsigned right_nrec_move =
+ (unsigned)(*right_nrec - new_right_nrec); /* Number of records to move out of right node */
/* Move right parent record down to middle node */
- HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, curr_middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, curr_middle_nrec), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* Move right records to middle node */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (right_nrec_move - 1));
+ HDmemmove(H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec + 1)),
+ H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (right_nrec_move - 1));
/* Move right parent record up from right node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1),
+ hdr->cls->nrec_size);
/* Slide right records down */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, right_nrec_move), hdr->cls->nrec_size * new_right_nrec);
+ HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, right_nrec_move),
+ hdr->cls->nrec_size * new_right_nrec);
/* Move node pointers also if this is an internal node */
- if(depth > 1) {
- hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ hsize_t moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
/* Move right node pointers into middle node */
- HDmemcpy(&(middle_node_ptrs[curr_middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
+ HDmemcpy(&(middle_node_ptrs[curr_middle_nrec + 1]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * right_nrec_move);
/* Count the number of records being moved into the right node */
- for(u = 0, moved_nrec = 0; u < right_nrec_move; u++)
+ for (u = 0, moved_nrec = 0; u < right_nrec_move; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
right_moved_nrec -= (hssize_t)(moved_nrec + right_nrec_move);
middle_moved_nrec += (hssize_t)(moved_nrec + right_nrec_move);
/* Slide the node pointers in right node down */
- HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[right_nrec_move]), sizeof(H5B2_node_ptr_t) * (size_t)(new_right_nrec + 1));
+ HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[right_nrec_move]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(new_right_nrec + 1));
} /* end if */
/* Mark nodes as dirty */
@@ -948,99 +1026,68 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
} /* end if */
/* Update # of records in nodes */
- *left_nrec = new_left_nrec;
+ *left_nrec = new_left_nrec;
*middle_nrec = new_middle_nrec;
- *right_nrec = new_right_nrec;
+ *right_nrec = new_right_nrec;
} /* end block */
/* Update # of records in child nodes */
internal->node_ptrs[idx - 1].node_nrec = *left_nrec;
- internal->node_ptrs[idx].node_nrec = *middle_nrec;
+ internal->node_ptrs[idx].node_nrec = *middle_nrec;
internal->node_ptrs[idx + 1].node_nrec = *right_nrec;
/* Update total # of records in child B-trees */
- if(depth > 1) {
- internal->node_ptrs[idx - 1].all_nrec = (hsize_t)((hssize_t)internal->node_ptrs[idx - 1].all_nrec + left_moved_nrec);
- internal->node_ptrs[idx].all_nrec = (hsize_t)((hssize_t)internal->node_ptrs[idx].all_nrec + middle_moved_nrec);
- internal->node_ptrs[idx + 1].all_nrec = (hsize_t)((hssize_t)internal->node_ptrs[idx + 1].all_nrec + right_moved_nrec);
+ if (depth > 1) {
+ internal->node_ptrs[idx - 1].all_nrec =
+ (hsize_t)((hssize_t)internal->node_ptrs[idx - 1].all_nrec + left_moved_nrec);
+ internal->node_ptrs[idx].all_nrec =
+ (hsize_t)((hssize_t)internal->node_ptrs[idx].all_nrec + middle_moved_nrec);
+ internal->node_ptrs[idx + 1].all_nrec =
+ (hsize_t)((hssize_t)internal->node_ptrs[idx + 1].all_nrec + right_moved_nrec);
} /* end if */
else {
internal->node_ptrs[idx - 1].all_nrec = internal->node_ptrs[idx - 1].node_nrec;
- internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
+ internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec;
} /* end else */
/* Mark parent as dirty */
*internal_flags_ptr |= H5AC__DIRTIED_FLAG;
-#ifdef QAK
-{
- unsigned u;
-
- HDfprintf(stderr, "%s: Internal records:\n", FUNC);
- for(u = 0; u < internal->nrec; u++) {
- HDfprintf(stderr, "%s: u = %u\n", FUNC, u);
- (hdr->cls->debug)(stderr, hdr->f, dxpl_id, 3, 4, H5B2_INT_NREC(internal, hdr, u), NULL);
- } /* end for */
-
- HDfprintf(stderr, "%s: Left Child records:\n", FUNC);
- for(u = 0; u < *left_nrec; u++) {
- HDfprintf(stderr, "%s: u = %u\n", FUNC, u);
- (hdr->cls->debug)(stderr, hdr->f, dxpl_id, 3, 4, H5B2_NAT_NREC(left_native, hdr, u), NULL);
- } /* end for */
-
- HDfprintf(stderr, "%s: Middle Child records:\n", FUNC);
- for(u = 0; u < *middle_nrec; u++) {
- HDfprintf(stderr, "%s: u = %u\n", FUNC, u);
- (hdr->cls->debug)(stderr, hdr->f, dxpl_id, 3, 4, H5B2_NAT_NREC(middle_native, hdr, u), NULL);
- } /* end for */
-
- HDfprintf(stderr, "%s: Right Child records:\n", FUNC);
- for(u = 0; u < *right_nrec; u++) {
- HDfprintf(stderr, "%s: u = %u\n", FUNC, u);
- (hdr->cls->debug)(stderr, hdr->f, dxpl_id, 3, 4, H5B2_NAT_NREC(right_native, hdr, u), NULL);
- } /* end for */
-
- for(u = 0; u < internal->nrec + 1; u++)
- HDfprintf(stderr, "%s: internal->node_ptrs[%u] = (%Hu/%u/%a)\n", FUNC, u, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, internal->node_ptrs[u].addr);
- if(depth > 1) {
- for(u = 0; u < *left_nrec + 1; u++)
- HDfprintf(stderr, "%s: left_node_ptr[%u] = (%Hu/%u/%a)\n", FUNC, u, left_node_ptrs[u].all_nrec, left_node_ptrs[u].node_nrec, left_node_ptrs[u].addr);
- for(u = 0; u < *middle_nrec + 1; u++)
- HDfprintf(stderr, "%s: middle_node_ptr[%u] = (%Hu/%u/%a)\n", FUNC, u, middle_node_ptrs[u].all_nrec, middle_node_ptrs[u].node_nrec, middle_node_ptrs[u].addr);
- for(u = 0; u < *right_nrec + 1; u++)
- HDfprintf(stderr, "%s: right_node_ptr[%u] = (%Hu/%u/%a)\n", FUNC, u, right_node_ptrs[u].all_nrec, right_node_ptrs[u].node_nrec, right_node_ptrs[u].addr);
- } /* end if */
-}
-#endif /* QAK */
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1) {
- H5B2_assert_internal2(internal->node_ptrs[idx - 1].all_nrec, hdr, (H5B2_internal_t *)left_child, (H5B2_internal_t *)middle_child);
- H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)middle_child, (H5B2_internal_t *)left_child);
- H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)middle_child, (H5B2_internal_t *)right_child);
- H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child, (H5B2_internal_t *)middle_child);
+ if (depth > 1) {
+ H5B2_assert_internal2(internal->node_ptrs[idx - 1].all_nrec, hdr, (H5B2_internal_t *)left_child,
+ (H5B2_internal_t *)middle_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)middle_child,
+ (H5B2_internal_t *)left_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)middle_child,
+ (H5B2_internal_t *)right_child);
+ H5B2_assert_internal2(internal->node_ptrs[idx + 1].all_nrec, hdr, (H5B2_internal_t *)right_child,
+ (H5B2_internal_t *)middle_child);
} /* end if */
else {
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)left_child, (H5B2_leaf_t *)middle_child);
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)middle_child, (H5B2_leaf_t *)right_child);
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)right_child);
- } /* end else */
+ } /* end else */
#endif /* H5B2_DEBUG */
done:
/* Unlock child nodes (marked as dirty) */
- if(left_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
+ if (left_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
- if(middle_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, middle_addr, middle_child, middle_child_flags) < 0)
+ if (middle_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, middle_addr, middle_child, middle_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
- if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
+ if (right_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_redistribute3() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_merge2
*
@@ -1051,24 +1098,25 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
+H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr,
+ unsigned idx)
{
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
- void *left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */
- uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */
- uint8_t *left_native, *right_native; /* Pointers to left & right children's native records */
- H5B2_node_ptr_t *left_node_ptrs = NULL, *right_node_ptrs = NULL;/* Pointers to childs' node pointer info */
- unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
+ void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */
+ uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */
+ uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */
+ H5B2_node_ptr_t * left_node_ptrs = NULL,
+ *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
+ unsigned left_child_flags = H5AC__NO_FLAGS_SET,
+ right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1079,66 +1127,75 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
- if(depth > 1) {
- H5B2_internal_t *left_internal; /* Pointer to left internal node */
- H5B2_internal_t *right_internal; /* Pointer to right internal node */
+ if (depth > 1) {
+ H5B2_internal_t *left_internal; /* Pointer to left internal node */
+ H5B2_internal_t *right_internal; /* Pointer to right internal node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_INT;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock left & right B-tree child nodes */
- if(NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (left_internal =
+ H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* More setup for accessing child node information */
- left_child = left_internal;
- right_child = right_internal;
- left_nrec = &(left_internal->nrec);
- right_nrec = &(right_internal->nrec);
- left_native = left_internal->int_native;
- right_native = right_internal->int_native;
- left_node_ptrs = left_internal->node_ptrs;
+ left_child = left_internal;
+ right_child = right_internal;
+ left_nrec = &(left_internal->nrec);
+ right_nrec = &(right_internal->nrec);
+ left_native = left_internal->int_native;
+ right_native = right_internal->int_native;
+ left_node_ptrs = left_internal->node_ptrs;
right_node_ptrs = right_internal->node_ptrs;
} /* end if */
else {
- H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
- H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
+ H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
+ H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- left_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ left_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock left & right B-tree child nodes */
- if(NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for accessing child node information */
- left_child = left_leaf;
- right_child = right_leaf;
- left_nrec = &(left_leaf->nrec);
- right_nrec = &(right_leaf->nrec);
- left_native = left_leaf->leaf_native;
+ left_child = left_leaf;
+ right_child = right_leaf;
+ left_nrec = &(left_leaf->nrec);
+ right_nrec = &(right_leaf->nrec);
+ left_native = left_leaf->leaf_native;
right_native = right_leaf->leaf_native;
} /* end else */
/* Redistribute records into left node */
{
/* Copy record from parent node to proper location */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* Copy records from right node to left node */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Copy node pointers from right node into left node */
- if(depth > 1)
- HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ if (depth > 1)
+ HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Update # of records in left node */
*left_nrec = (uint16_t)(*left_nrec + *right_nrec + 1);
@@ -1155,9 +1212,11 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
internal->node_ptrs[idx].all_nrec += internal->node_ptrs[idx + 1].all_nrec + 1;
/* Slide records in parent node down, to eliminate demoted record */
- if((idx + 1) < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1), hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
- HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]), sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
+ if ((idx + 1) < internal->nrec) {
+ HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
+ hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
+ HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
} /* end if */
/* Update # of records in parent node */
@@ -1170,12 +1229,12 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
curr_node_ptr->node_nrec--;
/* Mark grandparent as dirty, if given */
- if(parent_cache_info_flags_ptr)
+ if (parent_cache_info_flags_ptr)
*parent_cache_info_flags_ptr |= H5AC__DIRTIED_FLAG;
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1)
+ if (depth > 1)
H5B2_assert_internal(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)left_child);
else
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)left_child);
@@ -1183,17 +1242,18 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
done:
/* Unlock left node (marked as dirty) */
- if(left_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
+ if (left_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
/* Delete right node & remove from cache (marked as dirty) */
- if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
+ if (right_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_merge2() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_merge3
*
@@ -1204,31 +1264,32 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
+H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr,
+ unsigned idx)
{
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
- haddr_t middle_addr; /* Address of middle child node */
- void *left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */
- void *middle_child = NULL; /* Pointer to middle child node */
- uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */
- uint16_t *middle_nrec; /* Pointer to middle child # of records */
- uint8_t *left_native, *right_native; /* Pointers to left & right children's native records */
- uint8_t *middle_native; /* Pointer to middle child's native records */
- H5B2_node_ptr_t *left_node_ptrs = NULL, *right_node_ptrs = NULL;/* Pointers to childs' node pointer info */
- H5B2_node_ptr_t *middle_node_ptrs = NULL;/* Pointer to child's node pointer info */
- hsize_t middle_moved_nrec; /* Number of records moved, for internal split */
- unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */
+ haddr_t middle_addr; /* Address of middle child node */
+ void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */
+ void * middle_child = NULL; /* Pointer to middle child node */
+ uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */
+ uint16_t * middle_nrec; /* Pointer to middle child # of records */
+ uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */
+ uint8_t * middle_native; /* Pointer to middle child's native records */
+ H5B2_node_ptr_t * left_node_ptrs = NULL,
+ *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */
+ H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointer to child's node pointer info */
+ hsize_t middle_moved_nrec; /* Number of records moved, for internal split */
+ unsigned left_child_flags = H5AC__NO_FLAGS_SET,
+ right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1239,107 +1300,122 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
- if(depth > 1) {
- H5B2_internal_t *left_internal; /* Pointer to left internal node */
- H5B2_internal_t *middle_internal; /* Pointer to middle internal node */
- H5B2_internal_t *right_internal; /* Pointer to right internal node */
+ if (depth > 1) {
+ H5B2_internal_t *left_internal; /* Pointer to left internal node */
+ H5B2_internal_t *middle_internal; /* Pointer to middle internal node */
+ H5B2_internal_t *right_internal; /* Pointer to right internal node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_INT;
- left_addr = internal->node_ptrs[idx - 1].addr;
+ left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock B-tree child nodes */
- if(NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (left_internal = H5B2_protect_internal(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx - 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (middle_internal = H5B2_protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (middle_internal =
+ H5B2_protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- if(NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (right_internal = H5B2_protect_internal(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* More setup for accessing child node information */
- left_child = left_internal;
- middle_child = middle_internal;
- right_child = right_internal;
- left_nrec = &(left_internal->nrec);
- middle_nrec = &(middle_internal->nrec);
- right_nrec = &(right_internal->nrec);
- left_native = left_internal->int_native;
- middle_native = middle_internal->int_native;
- right_native = right_internal->int_native;
- left_node_ptrs = left_internal->node_ptrs;
+ left_child = left_internal;
+ middle_child = middle_internal;
+ right_child = right_internal;
+ left_nrec = &(left_internal->nrec);
+ middle_nrec = &(middle_internal->nrec);
+ right_nrec = &(right_internal->nrec);
+ left_native = left_internal->int_native;
+ middle_native = middle_internal->int_native;
+ right_native = right_internal->int_native;
+ left_node_ptrs = left_internal->node_ptrs;
middle_node_ptrs = middle_internal->node_ptrs;
- right_node_ptrs = right_internal->node_ptrs;
+ right_node_ptrs = right_internal->node_ptrs;
} /* end if */
else {
- H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
- H5B2_leaf_t *middle_leaf; /* Pointer to middle leaf node */
- H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
+ H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
+ H5B2_leaf_t *middle_leaf; /* Pointer to middle leaf node */
+ H5B2_leaf_t *right_leaf; /* Pointer to right leaf node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- left_addr = internal->node_ptrs[idx - 1].addr;
+ left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
- right_addr = internal->node_ptrs[idx + 1].addr;
+ right_addr = internal->node_ptrs[idx + 1].addr;
/* Lock B-tree child nodes */
- if(NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (left_leaf = H5B2_protect_leaf(hdr, dxpl_id, left_addr,
+ internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (middle_leaf = H5B2_protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (middle_leaf = H5B2_protect_leaf(hdr, dxpl_id, middle_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- if(NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
+ if (NULL == (right_leaf = H5B2_protect_leaf(hdr, dxpl_id, right_addr,
+ internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for accessing child node information */
- left_child = left_leaf;
- middle_child = middle_leaf;
- right_child = right_leaf;
- left_nrec = &(left_leaf->nrec);
- middle_nrec = &(middle_leaf->nrec);
- right_nrec = &(right_leaf->nrec);
- left_native = left_leaf->leaf_native;
+ left_child = left_leaf;
+ middle_child = middle_leaf;
+ right_child = right_leaf;
+ left_nrec = &(left_leaf->nrec);
+ middle_nrec = &(middle_leaf->nrec);
+ right_nrec = &(right_leaf->nrec);
+ left_native = left_leaf->leaf_native;
middle_native = middle_leaf->leaf_native;
- right_native = right_leaf->leaf_native;
+ right_native = right_leaf->leaf_native;
} /* end else */
/* Redistribute records into left node */
{
- unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
+ unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
unsigned middle_nrec_move = ((total_nrec - 1) / 2) - *left_nrec;
/* Set the base number of records moved from middle node */
middle_moved_nrec = middle_nrec_move;
/* Copy record from parent node to proper location in left node */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1),
+ hdr->cls->nrec_size);
/* Copy records from middle node to left node */
- HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * (middle_nrec_move - 1));
+ HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0),
+ hdr->cls->nrec_size * (middle_nrec_move - 1));
/* Copy record from middle node to proper location in parent node */
- HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, (middle_nrec_move - 1)), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1),
+ H5B2_NAT_NREC(middle_native, hdr, (middle_nrec_move - 1)), hdr->cls->nrec_size);
/* Slide records in middle node down */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, middle_nrec_move), hdr->cls->nrec_size * (*middle_nrec - middle_nrec_move));
+ HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, middle_nrec_move),
+ hdr->cls->nrec_size * (*middle_nrec - middle_nrec_move));
/* Move node pointers also if this is an internal node */
- if(depth > 1) {
- unsigned u; /* Local index variable */
+ if (depth > 1) {
+ unsigned u; /* Local index variable */
/* Copy node pointers from middle node into left node */
- HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * middle_nrec_move);
+ HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * middle_nrec_move);
/* Count the number of records being moved into the left node */
- for(u = 0; u < middle_nrec_move; u++)
+ for (u = 0; u < middle_nrec_move; u++)
middle_moved_nrec += middle_node_ptrs[u].all_nrec;
/* Slide the node pointers in middle node down */
- HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[middle_nrec_move]), sizeof(H5B2_node_ptr_t) * (size_t)((unsigned)(*middle_nrec + 1) - middle_nrec_move));
+ HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[middle_nrec_move]),
+ sizeof(H5B2_node_ptr_t) * (size_t)((unsigned)(*middle_nrec + 1) - middle_nrec_move));
} /* end if */
/* Update # of records in left & middle nodes */
- *left_nrec = (uint16_t)(*left_nrec + middle_nrec_move);
+ *left_nrec = (uint16_t)(*left_nrec + middle_nrec_move);
*middle_nrec = (uint16_t)(*middle_nrec - middle_nrec_move);
/* Mark nodes as dirty */
@@ -1350,15 +1426,18 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
/* Redistribute records into middle node */
{
/* Copy record from parent node to proper location in middle node */
- HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
+ HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size);
/* Copy records from right node to middle node */
- HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
+ HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Move node pointers also if this is an internal node */
- if(depth > 1)
+ if (depth > 1)
/* Copy node pointers from right node into middle node */
- HDmemcpy(&(middle_node_ptrs[*middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ HDmemcpy(&(middle_node_ptrs[*middle_nrec + 1]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Update # of records in middle node */
*middle_nrec = (uint16_t)(*middle_nrec + (*right_nrec + 1));
@@ -1370,16 +1449,18 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
/* Update # of records in child nodes */
internal->node_ptrs[idx - 1].node_nrec = *left_nrec;
- internal->node_ptrs[idx].node_nrec = *middle_nrec;
+ internal->node_ptrs[idx].node_nrec = *middle_nrec;
/* Update total # of records in child B-trees */
internal->node_ptrs[idx - 1].all_nrec += middle_moved_nrec;
internal->node_ptrs[idx].all_nrec += (internal->node_ptrs[idx + 1].all_nrec + 1) - middle_moved_nrec;
/* Slide records in parent node down, to eliminate demoted record */
- if((idx + 1) < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1), hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
- HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]), sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
+ if ((idx + 1) < internal->nrec) {
+ HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
+ hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
+ HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
} /* end if */
/* Update # of records in parent node */
@@ -1392,36 +1473,39 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
curr_node_ptr->node_nrec--;
/* Mark grandparent as dirty, if given */
- if(parent_cache_info_flags_ptr)
+ if (parent_cache_info_flags_ptr)
*parent_cache_info_flags_ptr |= H5AC__DIRTIED_FLAG;
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1) {
- H5B2_assert_internal2(internal->node_ptrs[idx - 1].all_nrec, hdr, (H5B2_internal_t *)left_child, (H5B2_internal_t *)middle_child);
+ if (depth > 1) {
+ H5B2_assert_internal2(internal->node_ptrs[idx - 1].all_nrec, hdr, (H5B2_internal_t *)left_child,
+ (H5B2_internal_t *)middle_child);
H5B2_assert_internal(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)middle_child);
} /* end if */
else {
H5B2_assert_leaf2(hdr, (H5B2_leaf_t *)left_child, (H5B2_leaf_t *)middle_child);
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)middle_child);
- } /* end else */
+ } /* end else */
#endif /* H5B2_DEBUG */
done:
/* Unlock left & middle nodes (marked as dirty) */
- if(left_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
+ if (left_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, left_addr, left_child, left_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
- if(middle_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, middle_addr, middle_child, middle_child_flags) < 0)
+ if (middle_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, middle_addr, middle_child, middle_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
/* Delete right node & remove from cache (marked as dirty) */
- if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
+ if (right_child &&
+ H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_merge3() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_swap_leaf
*
@@ -1438,15 +1522,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_internal_t *internal, unsigned *internal_flags_ptr,
- unsigned idx, void *swap_loc)
+H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal,
+ unsigned *internal_flags_ptr, unsigned idx, void *swap_loc)
{
- const H5AC_class_t *child_class; /* Pointer to child node's class info */
- haddr_t child_addr; /* Address of child node */
- void *child = NULL; /* Pointer to child node */
- uint8_t *child_native; /* Pointer to child's native records */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5AC_class_t *child_class; /* Pointer to child node's class info */
+ haddr_t child_addr; /* Address of child node */
+ void * child = NULL; /* Pointer to child node */
+ uint8_t * child_native; /* Pointer to child's native records */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1457,34 +1540,37 @@ H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(idx <= internal->nrec);
/* Check for the kind of B-tree node to swap */
- if(depth > 1) {
- H5B2_internal_t *child_internal; /* Pointer to internal node */
+ if (depth > 1) {
+ H5B2_internal_t *child_internal; /* Pointer to internal node */
/* Setup information for unlocking child node */
child_class = H5AC_BT2_INT;
- child_addr = internal->node_ptrs[idx].addr;
+ child_addr = internal->node_ptrs[idx].addr;
/* Lock B-tree child nodes */
- if(NULL == (child_internal = H5B2_protect_internal(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, (depth - 1), H5AC_WRITE)))
+ if (NULL == (child_internal =
+ H5B2_protect_internal(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec,
+ (depth - 1), H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* More setup for accessing child node information */
- child = child_internal;
+ child = child_internal;
child_native = child_internal->int_native;
} /* end if */
else {
- H5B2_leaf_t *child_leaf; /* Pointer to leaf node */
+ H5B2_leaf_t *child_leaf; /* Pointer to leaf node */
/* Setup information for unlocking child nodes */
child_class = H5AC_BT2_LEAF;
- child_addr = internal->node_ptrs[idx].addr;
+ child_addr = internal->node_ptrs[idx].addr;
/* Lock B-tree child node */
- if(NULL == (child_leaf = H5B2_protect_leaf(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
+ if (NULL == (child_leaf = H5B2_protect_leaf(hdr, dxpl_id, child_addr,
+ internal->node_ptrs[idx].node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* More setup for accessing child node information */
- child = child_leaf;
+ child = child_leaf;
child_native = child_leaf->leaf_native;
} /* end else */
@@ -1498,7 +1584,7 @@ H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
#ifdef H5B2_DEBUG
H5B2_assert_internal((hsize_t)0, hdr, internal);
- if(depth > 1)
+ if (depth > 1)
H5B2_assert_internal(internal->node_ptrs[idx].all_nrec, hdr, (H5B2_internal_t *)child);
else
H5B2_assert_leaf(hdr, (H5B2_leaf_t *)child);
@@ -1506,13 +1592,12 @@ H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
done:
/* Unlock child node */
- if(child && H5AC_unprotect(hdr->f, dxpl_id, child_class, child_addr, child, H5AC__DIRTIED_FLAG) < 0)
+ if (child && H5AC_unprotect(hdr->f, dxpl_id, child_class, child_addr, child, H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_swap_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_insert_leaf
*
@@ -1527,13 +1612,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
- H5B2_nodepos_t curr_pos, void *udata)
+H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
+ void *udata)
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
- int cmp; /* Comparison value of records */
- unsigned idx; /* Location of record which matches key */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ int cmp; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1543,7 +1628,8 @@ H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
HDassert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Must have a leaf node with enough space to insert a record now */
@@ -1554,24 +1640,25 @@ H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
HDassert(leaf->nrec == curr_node_ptr->node_nrec);
/* Check for inserting into empty leaf */
- if(leaf->nrec == 0)
+ if (leaf->nrec == 0)
idx = 0;
else {
/* Find correct location to insert this record */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp == 0)
+ if (cmp == 0)
HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree")
- if(cmp > 0)
+ if (cmp > 0)
idx++;
/* Make room for new record */
- if(idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size * (leaf->nrec - idx));
+ if (idx < leaf->nrec)
+ HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
} /* end else */
/* Make callback to store record in native form */
- if((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
+ if ((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node")
/* Update record count for node pointer to current node */
@@ -1583,34 +1670,36 @@ H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
/* Check for new record being the min or max for the tree */
/* (Don't use 'else' for the idx check, to allow for root leaf node) */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->min_native_rec == NULL)
+ if (NULL == (hdr->min_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- if(idx == (unsigned)(leaf->nrec - 1)) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
+ } /* end if */
+ if (idx == (unsigned)(leaf->nrec - 1)) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->max_native_rec == NULL)
+ if (NULL == (hdr->max_native_rec = (uint8_t *)HDmalloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release the B-tree leaf node (marked as dirty) */
- if(leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, H5AC__DIRTIED_FLAG) < 0)
+ if (leaf &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_insert_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_insert_internal
*
@@ -1625,15 +1714,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
- H5B2_nodepos_t curr_pos, void *udata)
+H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, unsigned *parent_cache_info_flags_ptr,
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *udata)
{
- H5B2_internal_t *internal = NULL; /* Pointer to internal node */
- unsigned internal_flags = H5AC__NO_FLAGS_SET;
- unsigned idx; /* Location of record which matches key */
- H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_internal_t *internal = NULL; /* Pointer to internal node */
+ unsigned internal_flags = H5AC__NO_FLAGS_SET;
+ unsigned idx; /* Location of record which matches key */
+ H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1644,22 +1732,23 @@ H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec,
+ depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Split or redistribute child node pointers, if necessary */
{
- int cmp; /* Comparison value of records */
- unsigned retries; /* Number of times to attempt redistribution */
- size_t split_nrec; /* Number of records to split node at */
+ int cmp; /* Comparison value of records */
+ unsigned retries; /* Number of times to attempt redistribution */
+ size_t split_nrec; /* Number of records to split node at */
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp == 0)
+ if (cmp == 0)
HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree")
- if(cmp > 0)
+ if (cmp > 0)
idx++;
/* Set the number of redistribution retries */
@@ -1674,77 +1763,82 @@ H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
split_nrec = hdr->node_info[depth - 1].split_nrec;
/* Preemptively split/redistribute a node we will enter */
- while(internal->node_ptrs[idx].node_nrec == split_nrec) {
+ while (internal->node_ptrs[idx].node_nrec == split_nrec) {
/* Attempt to redistribute records among children */
- if(idx == 0) { /* Left-most child */
- if(retries > 0 && (internal->node_ptrs[idx + 1].node_nrec < split_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (idx == 0) { /* Left-most child */
+ if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec < split_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node")
- } /* end else */
- } /* end if */
- else if(idx == internal->nrec) { /* Right-most child */
- if(retries > 0 && (internal->node_ptrs[idx - 1].node_nrec < split_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ } /* end else */
+ } /* end if */
+ else if (idx == internal->nrec) { /* Right-most child */
+ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec < split_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node")
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else { /* Middle child */
- if(retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec < split_nrec) ||
- (internal->node_ptrs[idx - 1].node_nrec < split_nrec))) {
- if(H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec < split_nrec) ||
+ (internal->node_ptrs[idx - 1].node_nrec < split_nrec))) {
+ if (H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_split1(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node")
} /* end else */
- } /* end else */
+ } /* end else */
/* Locate node pointer for child (after split/redistribute) */
- /* Actually, this can be easily updated (for 2-node redistrib.) and shouldn't require re-searching */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0)
+ /* Actually, this can be easily updated (for 2-node redistrib.) and shouldn't require re-searching
+ */
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp == 0)
+ if (cmp == 0)
HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree")
- if(cmp > 0)
+ if (cmp > 0)
idx++;
/* Decrement the number of redistribution retries left */
retries--;
} /* end while */
- } /* end block */
+ } /* end block */
/* Check if this node is left/right-most */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_LEFT;
} /* end if */
- else if(idx == internal->nrec) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ else if (idx == internal->nrec) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_RIGHT;
} /* end else */
- } /* end if */
+ } /* end if */
/* Attempt to insert node */
- if(depth > 1) {
- if(H5B2_insert_internal(hdr, dxpl_id, (depth - 1), &internal_flags, &internal->node_ptrs[idx], next_pos, udata) < 0)
+ if (depth > 1) {
+ if (H5B2_insert_internal(hdr, dxpl_id, (depth - 1), &internal_flags, &internal->node_ptrs[idx],
+ next_pos, udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node")
} /* end if */
else {
- if(H5B2_insert_leaf(hdr, dxpl_id, &internal->node_ptrs[idx], next_pos, udata) < 0)
+ if (H5B2_insert_leaf(hdr, dxpl_id, &internal->node_ptrs[idx], next_pos, udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node")
} /* end else */
@@ -1756,13 +1850,13 @@ H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
done:
/* Release the B-tree internal node */
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
+ if (internal &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_insert_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_create_leaf
*
@@ -1780,8 +1874,8 @@ done:
herr_t
H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr)
{
- H5B2_leaf_t *leaf = NULL; /* Pointer to new leaf node created */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_leaf_t *leaf = NULL; /* Pointer to new leaf node created */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1790,48 +1884,48 @@ H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr)
HDassert(node_ptr);
/* Allocate memory for leaf information */
- if(NULL == (leaf = H5FL_MALLOC(H5B2_leaf_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf info")
+ if (NULL == (leaf = H5FL_MALLOC(H5B2_leaf_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf info")
/* Set metadata cache info */
HDmemset(&leaf->cache_info, 0, sizeof(H5AC_info_t));
/* Increment ref. count on B-tree header */
- if(H5B2_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
+ if (H5B2_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
/* Share B-tree header information */
leaf->hdr = hdr;
/* Allocate space for the native keys in memory */
- if(NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
+ if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
#ifdef H5_CLEAR_MEMORY
-HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
+ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
#endif /* H5_CLEAR_MEMORY */
/* Set number of records */
leaf->nrec = 0;
/* Allocate space on disk for the leaf */
- if(HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node")
+ if (HADDR_UNDEF ==
+ (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node")
/* Cache the new B-tree node */
- if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache")
+ if (H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache")
done:
- if(ret_value < 0) {
- if(leaf)
- if(H5B2_leaf_free(leaf) < 0)
+ if (ret_value < 0) {
+ if (leaf)
+ if (H5B2_leaf_free(leaf) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree leaf node")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_create_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_protect_leaf
*
@@ -1846,11 +1940,10 @@ done:
*-------------------------------------------------------------------------
*/
H5B2_leaf_t *
-H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec,
- H5AC_protect_t rw)
+H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec, H5AC_protect_t rw)
{
- H5B2_leaf_cache_ud_t udata; /* User-data for callback */
- H5B2_leaf_t *ret_value; /* Return value */
+ H5B2_leaf_cache_ud_t udata; /* User-data for callback */
+ H5B2_leaf_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1859,19 +1952,18 @@ H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec,
HDassert(H5F_addr_defined(addr));
/* Set up user data for callback */
- udata.f = hdr->f;
+ udata.f = hdr->f;
udata.hdr = hdr;
H5_CHECKED_ASSIGN(udata.nrec, uint16_t, nrec, unsigned)
/* Protect the leaf node */
- if(NULL == (ret_value = (H5B2_leaf_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_LEAF, addr, &udata, rw)))
+ if (NULL == (ret_value = (H5B2_leaf_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_LEAF, addr, &udata, rw)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree leaf node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_protect_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_create_internal
*
@@ -1887,11 +1979,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr,
- unsigned depth)
+H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr, unsigned depth)
{
- H5B2_internal_t *internal = NULL; /* Pointer to new internal node created */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_internal_t *internal = NULL; /* Pointer to new internal node created */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1901,56 +1992,59 @@ H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr,
HDassert(depth > 0);
/* Allocate memory for internal node information */
- if(NULL == (internal = H5FL_MALLOC(H5B2_internal_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal info")
+ if (NULL == (internal = H5FL_MALLOC(H5B2_internal_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal info")
/* Set metadata cache info */
HDmemset(&internal->cache_info, 0, sizeof(H5AC_info_t));
/* Increment ref. count on B-tree header */
- if(H5B2_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
+ if (H5B2_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
/* Share B-tree header information */
internal->hdr = hdr;
/* Allocate space for the native keys in memory */
- if(NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
+ if (NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for B-tree internal native keys")
#ifdef H5_CLEAR_MEMORY
-HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
+ HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
#endif /* H5_CLEAR_MEMORY */
/* Allocate space for the node pointers in memory */
- if(NULL == (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
+ if (NULL ==
+ (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for B-tree internal node pointers")
#ifdef H5_CLEAR_MEMORY
-HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
+ HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
#endif /* H5_CLEAR_MEMORY */
/* Set number of records & depth of the node */
- internal->nrec = 0;
+ internal->nrec = 0;
internal->depth = (uint16_t)depth;
/* Allocate space on disk for the internal node */
- if(HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node")
+ if (HADDR_UNDEF ==
+ (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node")
/* Cache the new B-tree node */
- if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache")
+ if (H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache")
done:
- if(ret_value < 0) {
- if(internal)
- if(H5B2_internal_free(internal) < 0)
+ if (ret_value < 0) {
+ if (internal)
+ if (H5B2_internal_free(internal) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_create_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_protect_internal
*
@@ -1965,11 +2059,11 @@ done:
*-------------------------------------------------------------------------
*/
H5B2_internal_t *
-H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
- unsigned nrec, unsigned depth, H5AC_protect_t rw)
+H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec, unsigned depth,
+ H5AC_protect_t rw)
{
H5B2_internal_cache_ud_t udata; /* User data to pass through to cache 'deserialize' callback */
- H5B2_internal_t *ret_value; /* Return value */
+ H5B2_internal_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1979,20 +2073,20 @@ H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
HDassert(depth > 0);
/* Set up user data for callback */
- udata.f = hdr->f;
+ udata.f = hdr->f;
udata.hdr = hdr;
H5_CHECKED_ASSIGN(udata.nrec, uint16_t, nrec, unsigned)
H5_CHECKED_ASSIGN(udata.depth, uint16_t, depth, unsigned)
/* Protect the internal node */
- if(NULL == (ret_value = (H5B2_internal_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_INT, addr, &udata, rw)))
+ if (NULL ==
+ (ret_value = (H5B2_internal_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_INT, addr, &udata, rw)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree internal node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_protect_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_iterate_node
*
@@ -2005,22 +2099,21 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 11 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- const H5B2_node_ptr_t *curr_node, H5B2_operator_t op, void *op_data)
+H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, const H5B2_node_ptr_t *curr_node,
+ H5B2_operator_t op, void *op_data)
{
- const H5AC_class_t *curr_node_class = NULL; /* Pointer to current node's class info */
- void *node = NULL; /* Pointers to current node */
- uint8_t *node_native; /* Pointers to node's native records */
- uint8_t *native = NULL; /* Pointers to copy of node's native records */
- H5B2_node_ptr_t *node_ptrs = NULL; /* Pointers to node's node pointers */
- unsigned u; /* Local index */
- herr_t ret_value = H5_ITER_CONT; /* Iterator return value */
+ const H5AC_class_t *curr_node_class = NULL; /* Pointer to current node's class info */
+ void * node = NULL; /* Pointers to current node */
+ uint8_t * node_native; /* Pointers to node's native records */
+ uint8_t * native = NULL; /* Pointers to copy of node's native records */
+ H5B2_node_ptr_t * node_ptrs = NULL; /* Pointers to node's node pointers */
+ unsigned u; /* Local index */
+ herr_t ret_value = H5_ITER_CONT; /* Iterator return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2030,82 +2123,86 @@ H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(op);
/* Protect current node & set up variables */
- if(depth > 0) {
- H5B2_internal_t *internal; /* Pointer to internal node */
+ if (depth > 0) {
+ H5B2_internal_t *internal; /* Pointer to internal node */
/* Lock the current B-tree node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec,
+ depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Set up information about current node */
curr_node_class = H5AC_BT2_INT;
- node = internal;
- node_native = internal->int_native;
+ node = internal;
+ node_native = internal->int_native;
/* Allocate space for the node pointers in memory */
- if(NULL == (node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
+ if (NULL == (node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for B-tree internal node pointers")
/* Copy the node pointers */
- HDmemcpy(node_ptrs, internal->node_ptrs, (sizeof(H5B2_node_ptr_t) * (size_t)(curr_node->node_nrec + 1)));
+ HDmemcpy(node_ptrs, internal->node_ptrs,
+ (sizeof(H5B2_node_ptr_t) * (size_t)(curr_node->node_nrec + 1)));
} /* end if */
else {
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
/* Lock the current B-tree node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_READ)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Set up information about current node */
curr_node_class = H5AC_BT2_LEAF;
- node = leaf;
- node_native = leaf->leaf_native;
+ node = leaf;
+ node_native = leaf->leaf_native;
} /* end else */
/* Allocate space for the native keys in memory */
- if(NULL == (native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
+ if (NULL == (native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for B-tree internal native keys")
/* Copy the native keys */
HDmemcpy(native, node_native, (hdr->cls->nrec_size * curr_node->node_nrec));
/* Unlock the node */
- if(H5AC_unprotect(hdr->f, dxpl_id, curr_node_class, curr_node->addr, node, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, curr_node_class, curr_node->addr, node, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
node = NULL;
/* Iterate through records, in order */
- for(u = 0; u < curr_node->node_nrec && !ret_value; u++) {
+ for (u = 0; u < curr_node->node_nrec && !ret_value; u++) {
/* Descend into child node, if current node is an internal node */
- if(depth > 0) {
- if((ret_value = H5B2_iterate_node(hdr, dxpl_id, (depth - 1), &(node_ptrs[u]), op, op_data)) < 0)
+ if (depth > 0) {
+ if ((ret_value = H5B2_iterate_node(hdr, dxpl_id, (depth - 1), &(node_ptrs[u]), op, op_data)) < 0)
HERROR(H5E_BTREE, H5E_CANTLIST, "node iteration failed");
} /* end if */
/* Make callback for current record */
- if(!ret_value) {
- if((ret_value = (op)(H5B2_NAT_NREC(native, hdr, u), op_data)) < 0)
+ if (!ret_value) {
+ if ((ret_value = (op)(H5B2_NAT_NREC(native, hdr, u), op_data)) < 0)
HERROR(H5E_BTREE, H5E_CANTLIST, "iterator function failed");
} /* end if */
- } /* end for */
+ } /* end for */
/* Descend into last child node, if current node is an internal node */
- if(!ret_value && depth > 0) {
- if((ret_value = H5B2_iterate_node(hdr, dxpl_id, (depth - 1), &(node_ptrs[u]), op, op_data)) < 0)
+ if (!ret_value && depth > 0) {
+ if ((ret_value = H5B2_iterate_node(hdr, dxpl_id, (depth - 1), &(node_ptrs[u]), op, op_data)) < 0)
HERROR(H5E_BTREE, H5E_CANTLIST, "node iteration failed");
} /* end if */
done:
/* Release the node pointers & native records, if they were copied */
- if(node_ptrs)
+ if (node_ptrs)
node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_FREE(hdr->node_info[depth].node_ptr_fac, node_ptrs);
- if(native)
+ if (native)
native = (uint8_t *)H5FL_FAC_FREE(hdr->node_info[depth].nat_rec_fac, native);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_iterate_node() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove_leaf
*
@@ -2120,15 +2217,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
- H5B2_nodepos_t curr_pos, void *udata, H5B2_remove_t op, void *op_data)
+H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
+ void *udata, H5B2_remove_t op, void *op_data)
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
- haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
- unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting leaf node */
- unsigned idx; /* Location of record which matches key */
- int cmp; /* Comparison value of records */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
+ unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting leaf node */
+ unsigned idx; /* Location of record which matches key */
+ int cmp; /* Comparison value of records */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2139,7 +2236,7 @@ H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
/* Lock current B-tree node */
leaf_addr = curr_node_ptr->addr;
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
+ if (NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Sanity check number of records */
@@ -2147,35 +2244,35 @@ H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
HDassert(leaf->nrec == curr_node_ptr->node_nrec);
/* Find correct location to remove this record */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp != 0)
+ if (cmp != 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree")
/* Check for invalidating the min/max record for the tree */
- if(H5B2_POS_MIDDLE != curr_pos) {
+ if (H5B2_POS_MIDDLE != curr_pos) {
/* (Don't use 'else' for the idx check, to allow for root leaf node) */
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->min_native_rec) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->min_native_rec) {
HDfree(hdr->min_native_rec);
hdr->min_native_rec = NULL;
} /* end if */
- } /* end if */
- } /* end if */
- if(idx == (unsigned)(leaf->nrec - 1)) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->max_native_rec) {
+ } /* end if */
+ } /* end if */
+ if (idx == (unsigned)(leaf->nrec - 1)) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->max_native_rec) {
HDfree(hdr->max_native_rec);
hdr->max_native_rec = NULL;
} /* end if */
- } /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
/* Make 'remove' callback if there is one */
- if(op)
- if((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0)
+ if (op)
+ if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node")
/* Update number of records in node */
@@ -2184,10 +2281,11 @@ H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
/* Mark leaf node as dirty also */
leaf_flags |= H5AC__DIRTIED_FLAG;
- if(leaf->nrec > 0) {
+ if (leaf->nrec > 0) {
/* Pack record out of leaf */
- if(idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)), hdr->cls->nrec_size * (leaf->nrec - idx));
+ if (idx < leaf->nrec)
+ HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
} /* end if */
else {
/* Let the cache know that the object is deleted */
@@ -2202,13 +2300,12 @@ H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
done:
/* Release the B-tree leaf node */
- if(leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, leaf, leaf_flags) < 0)
+ if (leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, leaf, leaf_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove_internal
*
@@ -2223,21 +2320,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
- void *swap_loc, unsigned depth, H5AC_info_t *parent_cache_info,
- unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos,
- H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op, void *op_data)
+H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, void *swap_loc, unsigned depth,
+ H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
+ H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op,
+ void *op_data)
{
- H5AC_info_t *new_cache_info; /* Pointer to new cache info */
- unsigned *new_cache_info_flags_ptr = NULL;
- H5B2_node_ptr_t *new_node_ptr; /* Pointer to new node pointer */
- H5B2_internal_t *internal; /* Pointer to internal node */
- H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of next node */
- unsigned internal_flags = H5AC__NO_FLAGS_SET;
- haddr_t internal_addr; /* Address of internal node */
- size_t merge_nrec; /* Number of records to merge node at */
- hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_info_t * new_cache_info; /* Pointer to new cache info */
+ unsigned * new_cache_info_flags_ptr = NULL;
+ H5B2_node_ptr_t *new_node_ptr; /* Pointer to new node pointer */
+ H5B2_internal_t *internal; /* Pointer to internal node */
+ H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of next node */
+ unsigned internal_flags = H5AC__NO_FLAGS_SET;
+ haddr_t internal_addr; /* Address of internal node */
+ size_t merge_nrec; /* Number of records to merge node at */
+ hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2250,7 +2347,8 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
/* Lock current B-tree node */
internal_addr = curr_node_ptr->addr;
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec,
+ depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Determine the correct number of records to merge at */
@@ -2258,28 +2356,28 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
/* Check for needing to collapse the root node */
/* (The root node is the only internal node allowed to have 1 record) */
- if(internal->nrec == 1 &&
- ((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
+ if (internal->nrec == 1 &&
+ ((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
/* Merge children of root node */
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, 0) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, 0) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
/* Let the cache know that the object is deleted */
internal_flags |= H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
/* Reset information in header's root node pointer */
- curr_node_ptr->addr = internal->node_ptrs[0].addr;
+ curr_node_ptr->addr = internal->node_ptrs[0].addr;
curr_node_ptr->node_nrec = internal->node_ptrs[0].node_nrec;
/* Indicate that the level of the B-tree decreased */
*depth_decreased = TRUE;
/* Set pointers for advancing to child node */
- new_cache_info = parent_cache_info;
+ new_cache_info = parent_cache_info;
new_cache_info_flags_ptr = parent_cache_info_flags_ptr;
- new_node_ptr = curr_node_ptr;
+ new_node_ptr = curr_node_ptr;
/* Set flag to indicate root was collapsed */
collapsed_root = TRUE;
@@ -2289,18 +2387,18 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
} /* end if */
/* Merge or redistribute child node pointers, if necessary */
else {
- unsigned idx; /* Location of record which matches key */
- int cmp = 0; /* Comparison value of records */
- unsigned retries; /* Number of times to attempt redistribution */
+ unsigned idx; /* Location of record which matches key */
+ int cmp = 0; /* Comparison value of records */
+ unsigned retries; /* Number of times to attempt redistribution */
/* Locate node pointer for child */
- if(swap_loc)
+ if (swap_loc)
idx = 0;
else {
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp >= 0)
+ if (cmp >= 0)
idx++;
} /* end else */
@@ -2313,7 +2411,7 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
retries = 2;
/* Preemptively merge/redistribute a node we will enter */
- while(internal->node_ptrs[idx].node_nrec == merge_nrec) {
+ while (internal->node_ptrs[idx].node_nrec == merge_nrec) {
/* Attempt to redistribute records among children */
/* (NOTE: These 2-node redistributions should actually get the
* record to promote from the node with more records. - QAK)
@@ -2321,49 +2419,54 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
/* (NOTE: This code is the same in both H5B2_remove_internal() and
* H5B2_remove_internal_by_idx(), fix bugs in both places! - QAK)
*/
- if(idx == 0) { /* Left-most child */
- if(retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (idx == 0) { /* Left-most child */
+ if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
- } /* end else */
- } /* end if */
- else if(idx == internal->nrec) { /* Right-most child */
- if(retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ } /* end else */
+ } /* end if */
+ else if (idx == internal->nrec) { /* Right-most child */
+ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, (idx - 1)) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, (idx - 1)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else { /* Middle child */
- if(retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec > merge_nrec) ||
- (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) {
- if(H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec > merge_nrec) ||
+ (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) {
+ if (H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge3(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_merge3(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
} /* end else */
- } /* end else */
+ } /* end else */
/* Locate node pointer for child (after merge/redistribute) */
- if(swap_loc)
+ if (swap_loc)
idx = 0;
else {
-/* Actually, this can be easily updated (for 2-node redistrib.) and shouldn't require re-searching */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0)
+ /* Actually, this can be easily updated (for 2-node redistrib.) and shouldn't require
+ * re-searching */
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata,
+ &idx, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp >= 0)
+ if (cmp >= 0)
idx++;
} /* end else */
@@ -2372,63 +2475,64 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
} /* end while */
/* Handle deleting a record from an internal node */
- if(!swap_loc && cmp == 0)
+ if (!swap_loc && cmp == 0)
swap_loc = H5B2_INT_NREC(internal, hdr, idx - 1);
/* Swap record to delete with record from leaf, if we are the last internal node */
- if(swap_loc && depth == 1)
- if(H5B2_swap_leaf(hdr, dxpl_id, depth, internal, &internal_flags, idx, swap_loc) < 0)
+ if (swap_loc && depth == 1)
+ if (H5B2_swap_leaf(hdr, dxpl_id, depth, internal, &internal_flags, idx, swap_loc) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "Can't swap records in B-tree")
/* Set pointers for advancing to child node */
new_cache_info_flags_ptr = &internal_flags;
- new_cache_info = &internal->cache_info;
- new_node_ptr = &internal->node_ptrs[idx];
+ new_cache_info = &internal->cache_info;
+ new_node_ptr = &internal->node_ptrs[idx];
/* Indicate position of next node */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_LEFT;
} /* end if */
- else if(idx == internal->nrec) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ else if (idx == internal->nrec) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_RIGHT;
} /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
/* Attempt to remove record from child node */
- if(depth > 1) {
- if(H5B2_remove_internal(hdr, dxpl_id, depth_decreased, swap_loc, depth - 1,
- new_cache_info, new_cache_info_flags_ptr, next_pos, new_node_ptr, udata, op, op_data) < 0)
+ if (depth > 1) {
+ if (H5B2_remove_internal(hdr, dxpl_id, depth_decreased, swap_loc, depth - 1, new_cache_info,
+ new_cache_info_flags_ptr, next_pos, new_node_ptr, udata, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
} /* end if */
else {
- if(H5B2_remove_leaf(hdr, dxpl_id, new_node_ptr, next_pos, udata, op, op_data) < 0)
+ if (H5B2_remove_leaf(hdr, dxpl_id, new_node_ptr, next_pos, udata, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node")
} /* end else */
/* Update record count for node pointer to current node */
- if(!collapsed_root)
+ if (!collapsed_root)
new_node_ptr->all_nrec--;
/* Mark node as dirty */
internal_flags |= H5AC__DIRTIED_FLAG;
#ifdef H5B2_DEBUG
- H5B2_assert_internal((!collapsed_root ? (curr_node_ptr->all_nrec - 1) : new_node_ptr->all_nrec), hdr, internal);
+ H5B2_assert_internal((!collapsed_root ? (curr_node_ptr->all_nrec - 1) : new_node_ptr->all_nrec), hdr,
+ internal);
#endif /* H5B2_DEBUG */
done:
/* Release the B-tree internal node */
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, internal_addr, internal, internal_flags) < 0)
+ if (internal &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, internal_addr, internal, internal_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove_leaf_by_idx
*
@@ -2444,14 +2548,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
- unsigned idx, H5B2_remove_t op, void *op_data)
+H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, unsigned idx, H5B2_remove_t op, void *op_data)
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
- haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
- unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting leaf node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
+ unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting leaf node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2462,7 +2565,7 @@ H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Lock B-tree leaf node */
leaf_addr = curr_node_ptr->addr;
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
+ if (NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Sanity check number of records */
@@ -2471,29 +2574,29 @@ H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
HDassert(idx < leaf->nrec);
/* Check for invalidating the min/max record for the tree */
- if(H5B2_POS_MIDDLE != curr_pos) {
+ if (H5B2_POS_MIDDLE != curr_pos) {
/* (Don't use 'else' for the idx check, to allow for root leaf node) */
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->min_native_rec) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->min_native_rec) {
HDfree(hdr->min_native_rec);
hdr->min_native_rec = NULL;
} /* end if */
- } /* end if */
- } /* end if */
- if(idx == (unsigned)(leaf->nrec - 1)) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
- if(hdr->max_native_rec) {
+ } /* end if */
+ } /* end if */
+ if (idx == (unsigned)(leaf->nrec - 1)) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if (hdr->max_native_rec) {
HDfree(hdr->max_native_rec);
hdr->max_native_rec = NULL;
} /* end if */
- } /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
/* Make 'remove' callback if there is one */
- if(op)
- if((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0)
+ if (op)
+ if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node")
/* Update number of records in node */
@@ -2502,10 +2605,11 @@ H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Mark leaf node as dirty also */
leaf_flags |= H5AC__DIRTIED_FLAG;
- if(leaf->nrec > 0) {
+ if (leaf->nrec > 0) {
/* Pack record out of leaf */
- if(idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)), hdr->cls->nrec_size * (leaf->nrec - idx));
+ if (idx < leaf->nrec)
+ HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
} /* end if */
else {
/* Let the cache know that the object is deleted */
@@ -2520,13 +2624,12 @@ H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
done:
/* Release the B-tree leaf node */
- if(leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, leaf, leaf_flags) < 0)
+ if (leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, leaf, leaf_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove_leaf_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_remove_internal_by_idx
*
@@ -2542,22 +2645,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
- hbool_t *depth_decreased, void *swap_loc, unsigned depth,
- H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
- H5B2_remove_t op, void *op_data)
+H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, void *swap_loc,
+ unsigned depth, H5AC_info_t *parent_cache_info,
+ unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, hsize_t n, H5B2_remove_t op, void *op_data)
{
- H5AC_info_t *new_cache_info; /* Pointer to new cache info */
- unsigned *new_cache_info_flags_ptr = NULL;
- H5B2_node_ptr_t *new_node_ptr; /* Pointer to new node pointer */
- H5B2_internal_t *internal; /* Pointer to internal node */
- H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of next node */
- unsigned internal_flags = H5AC__NO_FLAGS_SET;
- haddr_t internal_addr; /* Address of internal node */
- size_t merge_nrec; /* Number of records to merge node at */
- hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_info_t * new_cache_info; /* Pointer to new cache info */
+ unsigned * new_cache_info_flags_ptr = NULL;
+ H5B2_node_ptr_t *new_node_ptr; /* Pointer to new node pointer */
+ H5B2_internal_t *internal; /* Pointer to internal node */
+ H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of next node */
+ unsigned internal_flags = H5AC__NO_FLAGS_SET;
+ haddr_t internal_addr; /* Address of internal node */
+ size_t merge_nrec; /* Number of records to merge node at */
+ hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2570,7 +2672,8 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Lock current B-tree node */
internal_addr = curr_node_ptr->addr;
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec,
+ depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
HDassert(internal->nrec == curr_node_ptr->node_nrec);
HDassert(depth == hdr->depth || internal->nrec > 1);
@@ -2580,29 +2683,29 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Check for needing to collapse the root node */
/* (The root node is the only internal node allowed to have 1 record) */
- if(internal->nrec == 1 &&
- ((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
+ if (internal->nrec == 1 &&
+ ((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
HDassert(depth == hdr->depth);
/* Merge children of root node */
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, 0) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, 0) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
/* Let the cache know that the object is deleted */
internal_flags |= H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
/* Reset information in header's root node pointer */
- curr_node_ptr->addr = internal->node_ptrs[0].addr;
+ curr_node_ptr->addr = internal->node_ptrs[0].addr;
curr_node_ptr->node_nrec = internal->node_ptrs[0].node_nrec;
/* Indicate that the level of the B-tree decreased */
*depth_decreased = TRUE;
/* Set pointers for advancing to child node */
- new_cache_info = parent_cache_info;
+ new_cache_info = parent_cache_info;
new_cache_info_flags_ptr = parent_cache_info_flags_ptr;
- new_node_ptr = curr_node_ptr;
+ new_node_ptr = curr_node_ptr;
/* Set flag to indicate root was collapsed */
collapsed_root = TRUE;
@@ -2612,26 +2715,26 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
} /* end if */
/* Merge or redistribute child node pointers, if necessary */
else {
- hsize_t orig_n = n; /* Original index looked for */
+ hsize_t orig_n = n; /* Original index looked for */
unsigned idx; /* Location of record which matches key */
- hbool_t found = FALSE; /* Comparison value of records */
+ hbool_t found = FALSE; /* Comparison value of records */
unsigned retries; /* Number of times to attempt redistribution */
/* Locate node pointer for child */
- if(swap_loc)
+ if (swap_loc)
idx = 0;
else {
/* Search for record with correct index */
- for(idx = 0; idx < internal->nrec; idx++) {
+ for (idx = 0; idx < internal->nrec; idx++) {
/* Check which child node contains indexed record */
- if(internal->node_ptrs[idx].all_nrec >= n) {
+ if (internal->node_ptrs[idx].all_nrec >= n) {
/* Check if record is in this node */
- if(internal->node_ptrs[idx].all_nrec == n) {
+ if (internal->node_ptrs[idx].all_nrec == n) {
/* Indicate the record was found and that the index
* in child nodes is zero from now on
*/
found = TRUE;
- n = 0;
+ n = 0;
/* Increment to next record */
idx++;
@@ -2646,7 +2749,7 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
*/
n -= (internal->node_ptrs[idx].all_nrec + 1);
} /* end for */
- } /* end else */
+ } /* end else */
/* Set the number of redistribution retries */
/* This takes care of the case where a B-tree node needs to be
@@ -2657,7 +2760,7 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
retries = 2;
/* Preemptively merge/redistribute a node we will enter */
- while(internal->node_ptrs[idx].node_nrec == merge_nrec) {
+ while (internal->node_ptrs[idx].node_nrec == merge_nrec) {
/* Attempt to redistribute records among children */
/* (NOTE: These 2-node redistributions should actually get the
* record to promote from the node with more records. - QAK)
@@ -2665,43 +2768,46 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* (NOTE: This code is the same in both H5B2_remove_internal() and
* H5B2_remove_internal_by_idx(), fix bugs in both places! - QAK)
*/
- if(idx == 0) { /* Left-most child */
- if(retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (idx == 0) { /* Left-most child */
+ if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
- } /* end else */
- } /* end if */
- else if(idx == internal->nrec) { /* Right-most child */
- if(retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) {
- if(H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ } /* end else */
+ } /* end if */
+ else if (idx == internal->nrec) { /* Right-most child */
+ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) {
+ if (H5B2_redistribute2(hdr, dxpl_id, depth, internal, (idx - 1)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, (idx - 1)) < 0)
+ if (H5B2_merge2(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, (idx - 1)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else { /* Middle child */
- if(retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec > merge_nrec) ||
- (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) {
- if(H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, "unable to redistribute child node records")
+ if (retries > 0 && ((internal->node_ptrs[idx + 1].node_nrec > merge_nrec) ||
+ (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) {
+ if (H5B2_redistribute3(hdr, dxpl_id, depth, internal, &internal_flags, idx) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL,
+ "unable to redistribute child node records")
} /* end if */
else {
- if(H5B2_merge3(hdr, dxpl_id, depth, curr_node_ptr,
- parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0)
+ if (H5B2_merge3(hdr, dxpl_id, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal,
+ &internal_flags, idx) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node")
} /* end else */
- } /* end else */
+ } /* end else */
/* Locate node pointer for child (after merge/redistribute) */
- if(swap_loc)
+ if (swap_loc)
idx = 0;
else {
/* Count from the orginal index value again */
@@ -2713,16 +2819,16 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
found = FALSE;
/* Search for record with correct index */
- for(idx = 0; idx < internal->nrec; idx++) {
+ for (idx = 0; idx < internal->nrec; idx++) {
/* Check which child node contains indexed record */
- if(internal->node_ptrs[idx].all_nrec >= n) {
+ if (internal->node_ptrs[idx].all_nrec >= n) {
/* Check if record is in this node */
- if(internal->node_ptrs[idx].all_nrec == n) {
+ if (internal->node_ptrs[idx].all_nrec == n) {
/* Indicate the record was found and that the index
* in child nodes is zero from now on
*/
found = TRUE;
- n = 0;
+ n = 0;
/* Increment to next record */
idx++;
@@ -2737,70 +2843,71 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
*/
n -= (internal->node_ptrs[idx].all_nrec + 1);
} /* end for */
- } /* end else */
+ } /* end else */
/* Decrement the number of redistribution retries left */
retries--;
} /* end while */
/* Handle deleting a record from an internal node */
- if(!swap_loc && found)
+ if (!swap_loc && found)
swap_loc = H5B2_INT_NREC(internal, hdr, idx - 1);
/* Swap record to delete with record from leaf, if we are the last internal node */
- if(swap_loc && depth == 1)
- if(H5B2_swap_leaf(hdr, dxpl_id, depth, internal, &internal_flags, idx, swap_loc) < 0)
+ if (swap_loc && depth == 1)
+ if (H5B2_swap_leaf(hdr, dxpl_id, depth, internal, &internal_flags, idx, swap_loc) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "can't swap records in B-tree")
/* Set pointers for advancing to child node */
new_cache_info_flags_ptr = &internal_flags;
- new_cache_info = &internal->cache_info;
- new_node_ptr = &internal->node_ptrs[idx];
+ new_cache_info = &internal->cache_info;
+ new_node_ptr = &internal->node_ptrs[idx];
/* Indicate position of next node */
- if(H5B2_POS_MIDDLE != curr_pos) {
- if(idx == 0) {
- if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ if (H5B2_POS_MIDDLE != curr_pos) {
+ if (idx == 0) {
+ if (H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_LEFT;
} /* end if */
- else if(idx == internal->nrec) {
- if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ else if (idx == internal->nrec) {
+ if (H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
next_pos = H5B2_POS_RIGHT;
} /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
/* Attempt to remove record from child node */
- if(depth > 1) {
- if(H5B2_remove_internal_by_idx(hdr, dxpl_id, depth_decreased, swap_loc, depth - 1,
- new_cache_info, new_cache_info_flags_ptr, new_node_ptr, next_pos, n, op, op_data) < 0)
+ if (depth > 1) {
+ if (H5B2_remove_internal_by_idx(hdr, dxpl_id, depth_decreased, swap_loc, depth - 1, new_cache_info,
+ new_cache_info_flags_ptr, new_node_ptr, next_pos, n, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
} /* end if */
else {
- if(H5B2_remove_leaf_by_idx(hdr, dxpl_id, new_node_ptr, next_pos, (unsigned)n, op, op_data) < 0)
+ if (H5B2_remove_leaf_by_idx(hdr, dxpl_id, new_node_ptr, next_pos, (unsigned)n, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node")
} /* end else */
/* Update record count for node pointer to child node */
- if(!collapsed_root)
+ if (!collapsed_root)
new_node_ptr->all_nrec--;
/* Mark node as dirty */
internal_flags |= H5AC__DIRTIED_FLAG;
#ifdef H5B2_DEBUG
- H5B2_assert_internal((!collapsed_root ? (curr_node_ptr->all_nrec - 1) : new_node_ptr->all_nrec), hdr, internal);
+ H5B2_assert_internal((!collapsed_root ? (curr_node_ptr->all_nrec - 1) : new_node_ptr->all_nrec), hdr,
+ internal);
#endif /* H5B2_DEBUG */
done:
/* Release the B-tree internal node */
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, internal_addr, internal, internal_flags) < 0)
+ if (internal &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, internal_addr, internal, internal_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_remove_internal_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_neighbor_leaf
*
@@ -2828,14 +2935,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
- void *neighbor_loc, H5B2_compare_t comp, void *udata, H5B2_found_t op,
- void *op_data)
+H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc,
+ H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data)
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
- unsigned idx; /* Location of record which matches key */
- int cmp = 0; /* Comparison value of records */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ unsigned idx; /* Location of record which matches key */
+ int cmp = 0; /* Comparison value of records */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2846,48 +2952,49 @@ H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_pt
HDassert(op);
/* Lock current B-tree node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_READ)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp > 0)
+ if (cmp > 0)
+ idx++;
+ else if (cmp == 0 && comp == H5B2_COMPARE_GREATER)
idx++;
- else
- if(cmp == 0 && comp == H5B2_COMPARE_GREATER)
- idx++;
/* Set the neighbor location, if appropriate */
- if(comp == H5B2_COMPARE_LESS) {
- if(idx > 0)
+ if (comp == H5B2_COMPARE_LESS) {
+ if (idx > 0)
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx - 1);
} /* end if */
else {
HDassert(comp == H5B2_COMPARE_GREATER);
- if(idx < leaf->nrec)
+ if (idx < leaf->nrec)
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx);
} /* end else */
/* Make callback if neighbor record has been found */
- if(neighbor_loc) {
+ if (neighbor_loc) {
/* Make callback for current record */
- if((op)(neighbor_loc, op_data) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree neighbor operation")
+ if ((op)(neighbor_loc, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "'found' callback failed for B-tree neighbor operation")
} /* end if */
else
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree")
done:
/* Release the B-tree internal node */
- if(leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (leaf &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree leaf node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_neighbor_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_neighbor_internal
*
@@ -2915,14 +3022,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp,
- void *udata, H5B2_found_t op, void *op_data)
+H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_ptr,
+ void *neighbor_loc, H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data)
{
- H5B2_internal_t *internal; /* Pointer to internal node */
- unsigned idx; /* Location of record which matches key */
- int cmp = 0; /* Comparison value of records */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_internal_t *internal; /* Pointer to internal node */
+ unsigned idx; /* Location of record which matches key */
+ int cmp = 0; /* Comparison value of records */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2934,47 +3040,51 @@ H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(op);
/* Lock current B-tree node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec,
+ depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp > 0)
+ if (cmp > 0)
idx++;
/* Set the neighbor location, if appropriate */
- if(comp == H5B2_COMPARE_LESS) {
- if(idx > 0)
+ if (comp == H5B2_COMPARE_LESS) {
+ if (idx > 0)
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx - 1);
} /* end if */
else {
HDassert(comp == H5B2_COMPARE_GREATER);
- if(idx < internal->nrec)
+ if (idx < internal->nrec)
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx);
} /* end else */
/* Attempt to find neighboring record */
- if(depth > 1) {
- if(H5B2_neighbor_internal(hdr, dxpl_id, depth - 1, &internal->node_ptrs[idx], neighbor_loc, comp, udata, op, op_data) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree internal node")
+ if (depth > 1) {
+ if (H5B2_neighbor_internal(hdr, dxpl_id, depth - 1, &internal->node_ptrs[idx], neighbor_loc, comp,
+ udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
+ "unable to find neighbor record in B-tree internal node")
} /* end if */
else {
- if(H5B2_neighbor_leaf(hdr, dxpl_id, &internal->node_ptrs[idx], neighbor_loc, comp, udata, op, op_data) < 0)
+ if (H5B2_neighbor_leaf(hdr, dxpl_id, &internal->node_ptrs[idx], neighbor_loc, comp, udata, op,
+ op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node")
} /* end else */
done:
/* Release the B-tree internal node */
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (internal &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_neighbor_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_delete_node
*
@@ -2984,19 +3094,18 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- const H5B2_node_ptr_t *curr_node, H5B2_remove_t op, void *op_data)
+H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, const H5B2_node_ptr_t *curr_node,
+ H5B2_remove_t op, void *op_data)
{
const H5AC_class_t *curr_node_class = NULL; /* Pointer to current node's class info */
- void *node = NULL; /* Pointers to current node */
- uint8_t *native; /* Pointers to node's native records */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * node = NULL; /* Pointers to current node */
+ uint8_t * native; /* Pointers to node's native records */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3004,58 +3113,60 @@ H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(hdr);
HDassert(curr_node);
- if(depth > 0) {
- H5B2_internal_t *internal; /* Pointer to internal node */
- unsigned u; /* Local index */
+ if (depth > 0) {
+ H5B2_internal_t *internal; /* Pointer to internal node */
+ unsigned u; /* Local index */
/* Lock the current B-tree node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_WRITE)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec,
+ depth, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Set up information about current node */
curr_node_class = H5AC_BT2_INT;
- node = internal;
- native = internal->int_native;
+ node = internal;
+ native = internal->int_native;
/* Descend into children */
- for(u = 0; u < internal->nrec + (unsigned)1; u++)
- if(H5B2_delete_node(hdr, dxpl_id, (depth - 1), &(internal->node_ptrs[u]), op, op_data) < 0)
+ for (u = 0; u < internal->nrec + (unsigned)1; u++)
+ if (H5B2_delete_node(hdr, dxpl_id, (depth - 1), &(internal->node_ptrs[u]), op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node descent failed")
} /* end if */
else {
- H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
/* Lock the current B-tree node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_WRITE)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Set up information about current node */
curr_node_class = H5AC_BT2_LEAF;
- node = leaf;
- native = leaf->leaf_native;
+ node = leaf;
+ native = leaf->leaf_native;
} /* end else */
/* If there's a callback defined, iterate over the records in this node */
- if(op) {
- unsigned u; /* Local index */
+ if (op) {
+ unsigned u; /* Local index */
/* Iterate through records in this node */
- for(u = 0; u < curr_node->node_nrec; u++) {
+ for (u = 0; u < curr_node->node_nrec; u++) {
/* Make callback for each record */
- if((op)(H5B2_NAT_NREC(native, hdr, u), op_data) < 0)
+ if ((op)(H5B2_NAT_NREC(native, hdr, u), op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "iterator function failed")
} /* end for */
- } /* end if */
+ } /* end if */
done:
/* Unlock & delete current node */
- if(node && H5AC_unprotect(hdr->f, dxpl_id, curr_node_class, curr_node->addr, node, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
+ if (node && H5AC_unprotect(hdr->f, dxpl_id, curr_node_class, curr_node->addr, node,
+ H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_delete_node() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_node_size
*
@@ -3070,11 +3181,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- const H5B2_node_ptr_t *curr_node, hsize_t *btree_size)
+H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, const H5B2_node_ptr_t *curr_node,
+ hsize_t *btree_size)
{
- H5B2_internal_t *internal = NULL; /* Pointer to internal node */
- herr_t ret_value = SUCCEED; /* Iterator return value */
+ H5B2_internal_t *internal = NULL; /* Pointer to internal node */
+ herr_t ret_value = SUCCEED; /* Iterator return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3085,18 +3196,19 @@ H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
HDassert(depth > 0);
/* Lock the current B-tree node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth,
+ H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Recursively descend into child nodes, if we are above the "twig" level in the B-tree */
- if(depth > 1) {
- unsigned u; /* Local index */
+ if (depth > 1) {
+ unsigned u; /* Local index */
/* Descend into children */
- for(u = 0; u < internal->nrec + (unsigned)1; u++)
- if(H5B2_node_size(hdr, dxpl_id, (depth - 1), &(internal->node_ptrs[u]), btree_size) < 0)
+ for (u = 0; u < internal->nrec + (unsigned)1; u++)
+ if (H5B2_node_size(hdr, dxpl_id, (depth - 1), &(internal->node_ptrs[u]), btree_size) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed")
- } /* end if */
+ } /* end if */
else /* depth is 1: count all the leaf nodes from this node */
*btree_size += (hsize_t)(internal->nrec + 1) * hdr->node_size;
@@ -3104,13 +3216,13 @@ H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
*btree_size += hdr->node_size;
done:
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node->addr, internal, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
+ if (internal &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node->addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_node_size() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_internal_free
*
@@ -3127,7 +3239,7 @@ done:
herr_t
H5B2_internal_free(H5B2_internal_t *internal)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3137,16 +3249,18 @@ H5B2_internal_free(H5B2_internal_t *internal)
HDassert(internal);
/* Release internal node's native key buffer */
- if(internal->int_native)
- internal->int_native = (uint8_t *)H5FL_FAC_FREE(internal->hdr->node_info[internal->depth].nat_rec_fac, internal->int_native);
+ if (internal->int_native)
+ internal->int_native = (uint8_t *)H5FL_FAC_FREE(internal->hdr->node_info[internal->depth].nat_rec_fac,
+ internal->int_native);
/* Release internal node's node pointer buffer */
- if(internal->node_ptrs)
- internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_FREE(internal->hdr->node_info[internal->depth].node_ptr_fac, internal->node_ptrs);
+ if (internal->node_ptrs)
+ internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_FREE(
+ internal->hdr->node_info[internal->depth].node_ptr_fac, internal->node_ptrs);
/* Decrement ref. count on B-tree header */
- if(H5B2_hdr_decr(internal->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
+ if (H5B2_hdr_decr(internal->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Free B-tree internal node info */
internal = H5FL_FREE(H5B2_internal_t, internal);
@@ -3155,7 +3269,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2_internal_free() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_leaf_free
*
@@ -3172,7 +3285,7 @@ done:
herr_t
H5B2_leaf_free(H5B2_leaf_t *leaf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3182,12 +3295,12 @@ H5B2_leaf_free(H5B2_leaf_t *leaf)
HDassert(leaf);
/* Release leaf's native key buffer */
- if(leaf->leaf_native)
+ if (leaf->leaf_native)
leaf->leaf_native = (uint8_t *)H5FL_FAC_FREE(leaf->hdr->node_info[0].nat_rec_fac, leaf->leaf_native);
/* Decrement ref. count on B-tree header */
- if(H5B2_hdr_decr(leaf->hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
+ if (H5B2_hdr_decr(leaf->hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Free B-tree leaf node info */
leaf = H5FL_FREE(H5B2_leaf_t, leaf);
@@ -3197,7 +3310,7 @@ done:
} /* end H5B2_leaf_free() */
#ifdef H5B2_DEBUG
-
+
/*-------------------------------------------------------------------------
* Function: H5B2_assert_leaf
*
@@ -3217,10 +3330,9 @@ H5B2_assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf)
/* General sanity checking on node */
HDassert(leaf->nrec <= hdr->node_info->split_nrec);
- return(0);
+ return (0);
} /* end H5B2_assert_leaf() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_assert_leaf2
*
@@ -3240,10 +3352,9 @@ H5B2_assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_lea
/* General sanity checking on node */
HDassert(leaf->nrec <= hdr->node_info->split_nrec);
- return(0);
+ return (0);
} /* end H5B2_assert_leaf2() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_assert_internal
*
@@ -3260,31 +3371,30 @@ H5B2_assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_lea
static herr_t
H5B2_assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal)
{
- hsize_t tot_all_nrec; /* Total number of records at or below this node */
- uint16_t u, v; /* Local index variables */
+ hsize_t tot_all_nrec; /* Total number of records at or below this node */
+ uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
HDassert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
tot_all_nrec = internal->nrec;
- for(u = 0; u < internal->nrec + 1; u++) {
+ for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
HDassert(internal->node_ptrs[u].addr > 0);
- for(v = 0; v < u; v++)
+ for (v = 0; v < u; v++)
HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
- if(parent_all_nrec > 0)
+ if (parent_all_nrec > 0)
HDassert(tot_all_nrec == parent_all_nrec);
- return(0);
+ return (0);
} /* end H5B2_assert_internal() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_assert_internal2
*
@@ -3299,32 +3409,32 @@ H5B2_assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
+H5B2_assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal,
+ const H5B2_internal_t *internal2)
{
- hsize_t tot_all_nrec; /* Total number of records at or below this node */
- uint16_t u, v; /* Local index variables */
+ hsize_t tot_all_nrec; /* Total number of records at or below this node */
+ uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
HDassert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
- tot_all_nrec =internal->nrec;
- for(u =0; u < internal->nrec + 1; u++) {
+ tot_all_nrec = internal->nrec;
+ for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
HDassert(internal->node_ptrs[u].addr > 0);
- for(v = 0; v < u; v++)
+ for (v = 0; v < u; v++)
HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
- for(v = 0; v < internal2->nrec + 1; v++)
+ for (v = 0; v < internal2->nrec + 1; v++)
HDassert(internal->node_ptrs[u].addr != internal2->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
- if(parent_all_nrec > 0)
+ if (parent_all_nrec > 0)
HDassert(tot_all_nrec == parent_all_nrec);
- return(0);
+ return (0);
} /* end H5B2_assert_internal2() */
#endif /* H5B2_DEBUG */
-
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index d82077f..0fa9b42 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, January 31, 2005
*
* Purpose: This file contains declarations which are visible only within
@@ -30,89 +30,82 @@
#include "H5B2private.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
-
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
/* Package Private Macros */
/**************************/
/* Size of storage for number of records per node (on disk) */
-#define H5B2_SIZEOF_RECORDS_PER_NODE (unsigned)2
+#define H5B2_SIZEOF_RECORDS_PER_NODE (unsigned)2
/* Size of a "tree pointer" (on disk) */
/* (essentially, the largest internal pointer allowed) */
-#define H5B2_TREE_POINTER_SIZE(h) ( \
- (h)->sizeof_addr + \
- H5B2_SIZEOF_RECORDS_PER_NODE + \
- (h)->sizeof_size \
- )
+#define H5B2_TREE_POINTER_SIZE(h) ((h)->sizeof_addr + H5B2_SIZEOF_RECORDS_PER_NODE + (h)->sizeof_size)
/* Size of a internal node pointer (on disk) */
-#define H5B2_INT_POINTER_SIZE(h, d) ( \
- (unsigned)(h)->sizeof_addr /* Address of child node */ \
- + (h)->max_nrec_size /* # of records in child node */ \
- + (h)->node_info[(d) - 1].cum_max_nrec_size /* Total # of records in child & below */ \
+#define H5B2_INT_POINTER_SIZE(h, d) \
+ ((unsigned)(h)->sizeof_addr /* Address of child node */ \
+ + (h)->max_nrec_size /* # of records in child node */ \
+ + (h)->node_info[(d)-1].cum_max_nrec_size /* Total # of records in child & below */ \
)
/* Size of checksum information (on disk) */
-#define H5B2_SIZEOF_CHKSUM 4
+#define H5B2_SIZEOF_CHKSUM 4
/* Format overhead for all v2 B-tree metadata in the file */
-#define H5B2_METADATA_PREFIX_SIZE ( \
- (unsigned)H5_SIZEOF_MAGIC /* Signature */ \
- + (unsigned)1 /* Version */ \
- + (unsigned)1 /* Tree type */ \
- + (unsigned)H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \
+#define H5B2_METADATA_PREFIX_SIZE \
+ ((unsigned)H5_SIZEOF_MAGIC /* Signature */ \
+ + (unsigned)1 /* Version */ \
+ + (unsigned)1 /* Tree type */ \
+ + (unsigned)H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \
)
/* Size of the v2 B-tree header on disk */
-#define H5B2_HEADER_SIZE(h) ( \
- /* General metadata fields */ \
- H5B2_METADATA_PREFIX_SIZE \
- \
- /* Header specific fields */ \
- + (unsigned)4 /* Node size, in bytes */ \
- + (unsigned)2 /* Record size, in bytes */ \
- + (unsigned)2 /* Depth of tree */ \
- + (unsigned)1 /* Split % of full (as integer, ie. "98" means 98%) */ \
- + (unsigned)1 /* Merge % of full (as integer, ie. "98" means 98%) */ \
- + H5B2_TREE_POINTER_SIZE(h) /* Node pointer to root node in tree */ \
+#define H5B2_HEADER_SIZE(h) \
+ (/* General metadata fields */ \
+ H5B2_METADATA_PREFIX_SIZE \
+ \
+ /* Header specific fields */ \
+ + (unsigned)4 /* Node size, in bytes */ \
+ + (unsigned)2 /* Record size, in bytes */ \
+ + (unsigned)2 /* Depth of tree */ \
+ + (unsigned)1 /* Split % of full (as integer, ie. "98" means 98%) */ \
+ + (unsigned)1 /* Merge % of full (as integer, ie. "98" means 98%) */ \
+ + H5B2_TREE_POINTER_SIZE(h) /* Node pointer to root node in tree */ \
)
/* Size of the v2 B-tree internal node prefix */
-#define H5B2_INT_PREFIX_SIZE ( \
- /* General metadata fields */ \
- H5B2_METADATA_PREFIX_SIZE \
- \
- /* Header specific fields */ \
- /* <none> */ \
+#define H5B2_INT_PREFIX_SIZE \
+ (/* General metadata fields */ \
+ H5B2_METADATA_PREFIX_SIZE \
+ \
+ /* Header specific fields */ /* <none> */ \
)
/* Size of the v2 B-tree leaf node prefix */
-#define H5B2_LEAF_PREFIX_SIZE ( \
- /* General metadata fields */ \
- H5B2_METADATA_PREFIX_SIZE \
- \
- /* Header specific fields */ \
- /* <none> */ \
+#define H5B2_LEAF_PREFIX_SIZE \
+ (/* General metadata fields */ \
+ H5B2_METADATA_PREFIX_SIZE \
+ \
+ /* Header specific fields */ /* <none> */ \
)
/* Macro to retrieve pointer to i'th native record for native record buffer */
-#define H5B2_NAT_NREC(b, hdr, idx) ((b) + (hdr)->nat_off[(idx)])
+#define H5B2_NAT_NREC(b, hdr, idx) ((b) + (hdr)->nat_off[(idx)])
/* Macro to retrieve pointer to i'th native record for internal node */
-#define H5B2_INT_NREC(i, hdr, idx) H5B2_NAT_NREC((i)->int_native, (hdr), (idx))
+#define H5B2_INT_NREC(i, hdr, idx) H5B2_NAT_NREC((i)->int_native, (hdr), (idx))
/* Macro to retrieve pointer to i'th native record for leaf node */
-#define H5B2_LEAF_NREC(l, hdr, idx) H5B2_NAT_NREC((l)->leaf_native, (hdr), (idx))
+#define H5B2_LEAF_NREC(l, hdr, idx) H5B2_NAT_NREC((l)->leaf_native, (hdr), (idx))
/* Number of records that fit into internal node */
/* (accounts for extra node pointer by counting it in with the prefix bytes) */
-#define H5B2_NUM_INT_REC(h, d) \
- (((h)->node_size - (H5B2_INT_PREFIX_SIZE + H5B2_INT_POINTER_SIZE(h, d))) / ((h)->rrec_size + H5B2_INT_POINTER_SIZE(h, d)))
-
+#define H5B2_NUM_INT_REC(h, d) \
+ (((h)->node_size - (H5B2_INT_PREFIX_SIZE + H5B2_INT_POINTER_SIZE(h, d))) / \
+ ((h)->rrec_size + H5B2_INT_POINTER_SIZE(h, d)))
/****************************/
/* Package Private Typedefs */
@@ -120,20 +113,20 @@
/* A "node pointer" to another B-tree node */
typedef struct {
- haddr_t addr; /* Address of other node */
- uint16_t node_nrec; /* Number of records used in node pointed to */
- hsize_t all_nrec; /* Number of records in node pointed to and all it's children */
+ haddr_t addr; /* Address of other node */
+ uint16_t node_nrec; /* Number of records used in node pointed to */
+ hsize_t all_nrec; /* Number of records in node pointed to and all it's children */
} H5B2_node_ptr_t;
/* Information about a node at a given depth */
typedef struct {
- unsigned max_nrec; /* Max. number of records in node */
- unsigned split_nrec; /* Number of records to split node at */
- unsigned merge_nrec; /* Number of records to merge node at */
- hsize_t cum_max_nrec; /* Cumulative max. # of records below this node's depth */
- uint8_t cum_max_nrec_size; /* Size to store cumulative max. # of records for this node (in bytes) */
- H5FL_fac_head_t *nat_rec_fac; /* Factory for native record blocks */
- H5FL_fac_head_t *node_ptr_fac; /* Factory for node pointer blocks */
+ unsigned max_nrec; /* Max. number of records in node */
+ unsigned split_nrec; /* Number of records to split node at */
+ unsigned merge_nrec; /* Number of records to merge node at */
+ hsize_t cum_max_nrec; /* Cumulative max. # of records below this node's depth */
+ uint8_t cum_max_nrec_size; /* Size to store cumulative max. # of records for this node (in bytes) */
+ H5FL_fac_head_t *nat_rec_fac; /* Factory for native record blocks */
+ H5FL_fac_head_t *node_ptr_fac; /* Factory for node pointer blocks */
} H5B2_node_info_t;
/* The B-tree header information */
@@ -142,40 +135,40 @@ typedef struct H5B2_hdr_t {
H5AC_info_t cache_info;
/* Internal B-tree information (stored) */
- H5B2_node_ptr_t root; /* Node pointer to root node in B-tree */
+ H5B2_node_ptr_t root; /* Node pointer to root node in B-tree */
/* Information set by user (stored) */
- uint8_t split_percent; /* Percent full at which to split the node, when inserting */
- uint8_t merge_percent; /* Percent full at which to merge the node, when deleting */
- uint32_t node_size; /* Size of B-tree nodes, in bytes */
- uint32_t rrec_size; /* Size of "raw" (on disk) record, in bytes */
+ uint8_t split_percent; /* Percent full at which to split the node, when inserting */
+ uint8_t merge_percent; /* Percent full at which to merge the node, when deleting */
+ uint32_t node_size; /* Size of B-tree nodes, in bytes */
+ uint32_t rrec_size; /* Size of "raw" (on disk) record, in bytes */
/* Dynamic information (stored) */
- uint16_t depth; /* B-tree's overall depth */
+ uint16_t depth; /* B-tree's overall depth */
/* Derived information from user's information (not stored) */
- uint8_t max_nrec_size; /* Size to store max. # of records in any node (in bytes) */
+ uint8_t max_nrec_size; /* Size to store max. # of records in any node (in bytes) */
/* Shared internal data structures (not stored) */
- H5F_t *f; /* Pointer to the file that the B-tree is in */
- haddr_t addr; /* Address of B-tree header in the file */
- size_t hdr_size; /* Size of the B-tree header on disk */
- size_t rc; /* Reference count of nodes using this header */
- size_t file_rc; /* Reference count of files using this header */
- hbool_t pending_delete; /* B-tree is pending deletion */
- uint8_t sizeof_size; /* Size of file sizes */
- uint8_t sizeof_addr; /* Size of file addresses */
- H5B2_remove_t remove_op; /* Callback operator for deleting B-tree */
- void *remove_op_data;/* B-tree deletion callback's context */
- uint8_t *page; /* Common disk page for I/O */
- size_t *nat_off; /* Array of offsets of native records */
- H5B2_node_info_t *node_info; /* Table of node info structs for current depth of B-tree */
- uint8_t *min_native_rec; /* Pointer to minimum native record */
- uint8_t *max_native_rec; /* Pointer to maximum native record */
+ H5F_t * f; /* Pointer to the file that the B-tree is in */
+ haddr_t addr; /* Address of B-tree header in the file */
+ size_t hdr_size; /* Size of the B-tree header on disk */
+ size_t rc; /* Reference count of nodes using this header */
+ size_t file_rc; /* Reference count of files using this header */
+ hbool_t pending_delete; /* B-tree is pending deletion */
+ uint8_t sizeof_size; /* Size of file sizes */
+ uint8_t sizeof_addr; /* Size of file addresses */
+ H5B2_remove_t remove_op; /* Callback operator for deleting B-tree */
+ void * remove_op_data; /* B-tree deletion callback's context */
+ uint8_t * page; /* Common disk page for I/O */
+ size_t * nat_off; /* Array of offsets of native records */
+ H5B2_node_info_t *node_info; /* Table of node info structs for current depth of B-tree */
+ uint8_t * min_native_rec; /* Pointer to minimum native record */
+ uint8_t * max_native_rec; /* Pointer to maximum native record */
/* Client information (not stored) */
- const H5B2_class_t *cls; /* Class of B-tree client */
- void *cb_ctx; /* Client callback context */
+ const H5B2_class_t *cls; /* Class of B-tree client */
+ void * cb_ctx; /* Client callback context */
} H5B2_hdr_t;
/* B-tree leaf node information */
@@ -184,9 +177,9 @@ typedef struct H5B2_leaf_t {
H5AC_info_t cache_info;
/* Internal B-tree information */
- H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
- uint8_t *leaf_native; /* Pointer to native records */
- uint16_t nrec; /* Number of records in node */
+ H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
+ uint8_t * leaf_native; /* Pointer to native records */
+ uint16_t nrec; /* Number of records in node */
} H5B2_leaf_t;
/* B-tree internal node information */
@@ -195,57 +188,56 @@ typedef struct H5B2_internal_t {
H5AC_info_t cache_info;
/* Internal B-tree information */
- H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
- uint8_t *int_native; /* Pointer to native records */
- H5B2_node_ptr_t *node_ptrs; /* Pointer to node pointers */
- uint16_t nrec; /* Number of records in node */
- uint16_t depth; /* Depth of this node in the B-tree */
+ H5B2_hdr_t * hdr; /* Pointer to the [pinned] v2 B-tree header */
+ uint8_t * int_native; /* Pointer to native records */
+ H5B2_node_ptr_t *node_ptrs; /* Pointer to node pointers */
+ uint16_t nrec; /* Number of records in node */
+ uint16_t depth; /* Depth of this node in the B-tree */
} H5B2_internal_t;
/* v2 B-tree */
struct H5B2_t {
- H5B2_hdr_t *hdr; /* Pointer to internal v2 B-tree header info */
- H5F_t *f; /* Pointer to file for v2 B-tree */
+ H5B2_hdr_t *hdr; /* Pointer to internal v2 B-tree header info */
+ H5F_t * f; /* Pointer to file for v2 B-tree */
};
/* Node position, for min/max determination */
typedef enum H5B2_nodepos_t {
- H5B2_POS_ROOT, /* Node is root (i.e. both right & left-most in tree) */
- H5B2_POS_RIGHT, /* Node is right-most in tree, at a given depth */
- H5B2_POS_LEFT, /* Node is left-most in tree, at a given depth */
- H5B2_POS_MIDDLE /* Node is neither right or left-most in tree */
+ H5B2_POS_ROOT, /* Node is root (i.e. both right & left-most in tree) */
+ H5B2_POS_RIGHT, /* Node is right-most in tree, at a given depth */
+ H5B2_POS_LEFT, /* Node is left-most in tree, at a given depth */
+ H5B2_POS_MIDDLE /* Node is neither right or left-most in tree */
} H5B2_nodepos_t;
/* Callback info for loading a free space header into the cache */
typedef struct H5B2_hdr_cache_ud_t {
- H5F_t *f; /* File that v2 b-tree header is within */
- void *ctx_udata; /* User-data for protecting */
+ H5F_t *f; /* File that v2 b-tree header is within */
+ void * ctx_udata; /* User-data for protecting */
} H5B2_hdr_cache_ud_t;
/* Callback info for loading a free space internal node into the cache */
typedef struct H5B2_internal_cache_ud_t {
- H5F_t *f; /* File that v2 b-tree header is within */
- H5B2_hdr_t *hdr; /* v2 B-tree header */
- unsigned nrec; /* Number of records in node to load */
- unsigned depth; /* Depth of node to load */
+ H5F_t * f; /* File that v2 b-tree header is within */
+ H5B2_hdr_t *hdr; /* v2 B-tree header */
+ unsigned nrec; /* Number of records in node to load */
+ unsigned depth; /* Depth of node to load */
} H5B2_internal_cache_ud_t;
/* Callback info for loading a free space leaf node into the cache */
typedef struct H5B2_leaf_cache_ud_t {
- H5F_t *f; /* File that v2 b-tree header is within */
- H5B2_hdr_t *hdr; /* v2 B-tree header */
- unsigned nrec; /* Number of records in node to load */
+ H5F_t * f; /* File that v2 b-tree header is within */
+ H5B2_hdr_t *hdr; /* v2 B-tree header */
+ unsigned nrec; /* Number of records in node to load */
} H5B2_leaf_cache_ud_t;
#ifdef H5B2_TESTING
/* Node information for testing */
typedef struct {
- unsigned depth; /* Depth of node */
- unsigned nrec; /* Number of records in node */
+ unsigned depth; /* Depth of node */
+ unsigned nrec; /* Number of records in node */
} H5B2_node_info_test_t;
#endif /* H5B2_TESTING */
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -273,17 +265,14 @@ H5_DLLVAR const H5B2_class_t H5B2_TEST[1];
/* Array of v2 B-tree client ID -> client class mappings */
extern const H5B2_class_t *const H5B2_client_class_g[H5B2_NUM_BTREE_ID];
-
/******************************/
/* Package Private Prototypes */
/******************************/
/* Routines for managing B-tree header info */
H5_DLL H5B2_hdr_t *H5B2_hdr_alloc(H5F_t *f);
-H5_DLL haddr_t H5B2_hdr_create(H5F_t *f, hid_t dxpl_id,
- const H5B2_create_t *cparam, void *ctx_udata);
-H5_DLL herr_t H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam,
- void *ctx_udata, uint16_t depth);
+H5_DLL haddr_t H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udata);
+H5_DLL herr_t H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, uint16_t depth);
H5_DLL herr_t H5B2_hdr_incr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2_hdr_decr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr);
@@ -292,17 +281,16 @@ H5_DLL herr_t H5B2_hdr_dirty(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id);
/* Routines for operating on leaf nodes */
-H5B2_leaf_t *H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
- unsigned nrec, H5AC_protect_t rw);
+H5B2_leaf_t *H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec,
+ H5AC_protect_t rw);
/* Routines for operating on internal nodes */
-H5_DLL H5B2_internal_t *H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- haddr_t addr, unsigned nrec, unsigned depth, H5AC_protect_t rw);
+H5_DLL H5B2_internal_t *H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec,
+ unsigned depth, H5AC_protect_t rw);
/* Routines for allocating nodes */
H5_DLL herr_t H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id);
-H5_DLL herr_t H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *node_ptr);
+H5_DLL herr_t H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr);
/* Routines for releasing structures */
H5_DLL herr_t H5B2_hdr_free(H5B2_hdr_t *hdr);
@@ -310,67 +298,62 @@ H5_DLL herr_t H5B2_leaf_free(H5B2_leaf_t *l);
H5_DLL herr_t H5B2_internal_free(H5B2_internal_t *i);
/* Routines for inserting records */
-H5_DLL herr_t H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- unsigned depth, unsigned *parent_cache_info_flags_ptr,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *udata);
-H5_DLL herr_t H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *udata);
+H5_DLL herr_t H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
+ unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, void *udata);
+H5_DLL herr_t H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, void *udata);
/* Routines for iterating over nodes/records */
H5_DLL herr_t H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- const H5B2_node_ptr_t *curr_node, H5B2_operator_t op, void *op_data);
-H5_DLL herr_t H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id,
- unsigned depth, const H5B2_node_ptr_t *curr_node, hsize_t *op_data);
+ const H5B2_node_ptr_t *curr_node, H5B2_operator_t op, void *op_data);
+H5_DLL herr_t H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, const H5B2_node_ptr_t *curr_node,
+ hsize_t *op_data);
/* Routines for locating records */
-H5_DLL int H5B2_locate_record(const H5B2_class_t *type, unsigned nrec,
- size_t *rec_off, const uint8_t *native, const void *udata, unsigned *idx, int *result);
-H5_DLL herr_t H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- unsigned depth, H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc,
- H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data);
-H5_DLL herr_t H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc,
- H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data);
+H5_DLL int H5B2_locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off, const uint8_t *native,
+ const void *udata, unsigned *idx, int *result);
+H5_DLL herr_t H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
+ H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp,
+ void *udata, H5B2_found_t op, void *op_data);
+H5_DLL herr_t H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ void *neighbor_loc, H5B2_compare_t comp, void *udata, H5B2_found_t op,
+ void *op_data);
/* Routines for removing records */
-H5_DLL herr_t H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- hbool_t *depth_decreased, void *swap_loc, unsigned depth,
- H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
- H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata,
- H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
- void *udata, H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
- hbool_t *depth_decreased, void *swap_loc, unsigned depth,
- H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
- H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
- unsigned idx, H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, void *swap_loc,
+ unsigned depth, H5AC_info_t *parent_cache_info,
+ unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos,
+ H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op,
+ void *op_data);
+H5_DLL herr_t H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, void *udata, H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
+ void *swap_loc, unsigned depth, H5AC_info_t *parent_cache_info,
+ unsigned * parent_cache_info_flags_ptr,
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
+ H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_nodepos_t curr_pos, unsigned idx, H5B2_remove_t op, void *op_data);
/* Routines for deleting nodes */
H5_DLL herr_t H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
- const H5B2_node_ptr_t *curr_node, H5B2_remove_t op, void *op_data);
+ const H5B2_node_ptr_t *curr_node, H5B2_remove_t op, void *op_data);
/* Debugging routines for dumping file structures */
-H5_DLL herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t obj_addr);
-H5_DLL herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
- haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr);
-H5_DLL herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
- haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr);
+H5_DLL herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ const H5B2_class_t *type, haddr_t obj_addr);
+H5_DLL herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth,
+ haddr_t obj_addr);
+H5_DLL herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr);
/* Testing routines */
#ifdef H5B2_TESTING
H5_DLL herr_t H5B2_get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr);
-H5_DLL int H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata);
-H5_DLL herr_t H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id,
- void *udata, H5B2_node_info_test_t *ninfo);
+H5_DLL int H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata);
+H5_DLL herr_t H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_node_info_test_t *ninfo);
#endif /* H5B2_TESTING */
#endif /* _H5B2pkg_H */
-
diff --git a/src/H5B2private.h b/src/H5B2private.h
index ea6814a..f5a0aae 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5B2private.h
* Jan 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible B-tree routines.
*
@@ -29,30 +29,34 @@
#include "H5B2public.h"
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
/**************************/
/* Library Private Macros */
/**************************/
-
/****************************/
/* Library Private Typedefs */
/****************************/
/* B-tree IDs for various internal things. */
typedef enum H5B2_subid_t {
- H5B2_TEST_ID = 0, /* B-tree is for testing (do not use for actual data) */
- H5B2_FHEAP_HUGE_INDIR_ID, /* B-tree is for fractal heap indirectly accessed, non-filtered 'huge' objects */
- H5B2_FHEAP_HUGE_FILT_INDIR_ID, /* B-tree is for fractal heap indirectly accessed, filtered 'huge' objects */
- H5B2_FHEAP_HUGE_DIR_ID, /* B-tree is for fractal heap directly accessed, non-filtered 'huge' objects */
+ H5B2_TEST_ID = 0, /* B-tree is for testing (do not use for actual data) */
+ H5B2_FHEAP_HUGE_INDIR_ID, /* B-tree is for fractal heap indirectly accessed, non-filtered 'huge' objects
+ */
+ H5B2_FHEAP_HUGE_FILT_INDIR_ID, /* B-tree is for fractal heap indirectly accessed, filtered 'huge' objects
+ */
+ H5B2_FHEAP_HUGE_DIR_ID, /* B-tree is for fractal heap directly accessed, non-filtered 'huge' objects */
H5B2_FHEAP_HUGE_FILT_DIR_ID, /* B-tree is for fractal heap directly accessed, filtered 'huge' objects */
- H5B2_GRP_DENSE_NAME_ID, /* B-tree is for indexing 'name' field for "dense" link storage in groups */
- H5B2_GRP_DENSE_CORDER_ID, /* B-tree is for indexing 'creation order' field for "dense" link storage in groups */
- H5B2_SOHM_INDEX_ID, /* B-tree is an index for shared object header messages */
- H5B2_ATTR_DENSE_NAME_ID, /* B-tree is for indexing 'name' field for "dense" attribute storage on objects */
- H5B2_ATTR_DENSE_CORDER_ID, /* B-tree is for indexing 'creation order' field for "dense" attribute storage on objects */
- H5B2_NUM_BTREE_ID /* Number of B-tree IDs (must be last) */
+ H5B2_GRP_DENSE_NAME_ID, /* B-tree is for indexing 'name' field for "dense" link storage in groups */
+ H5B2_GRP_DENSE_CORDER_ID, /* B-tree is for indexing 'creation order' field for "dense" link storage in
+ groups */
+ H5B2_SOHM_INDEX_ID, /* B-tree is an index for shared object header messages */
+ H5B2_ATTR_DENSE_NAME_ID, /* B-tree is for indexing 'name' field for "dense" attribute storage on objects
+ */
+ H5B2_ATTR_DENSE_CORDER_ID, /* B-tree is for indexing 'creation order' field for "dense" attribute storage
+ on objects */
+ H5B2_NUM_BTREE_ID /* Number of B-tree IDs (must be last) */
} H5B2_subid_t;
/* Define the operator callback function pointer for H5B2_iterate() */
@@ -69,8 +73,8 @@ typedef herr_t (*H5B2_remove_t)(const void *record, void *op_data);
/* Comparisons for H5B2_neighbor() call */
typedef enum H5B2_compare_t {
- H5B2_COMPARE_LESS, /* Records with keys less than query value */
- H5B2_COMPARE_GREATER /* Records with keys greater than query value */
+ H5B2_COMPARE_LESS, /* Records with keys less than query value */
+ H5B2_COMPARE_GREATER /* Records with keys greater than query value */
} H5B2_compare_t;
/*
@@ -79,78 +83,71 @@ typedef enum H5B2_compare_t {
*/
typedef struct H5B2_class_t H5B2_class_t;
struct H5B2_class_t {
- H5B2_subid_t id; /* ID of B-tree class, as found in file */
- const char *name; /* Name of B-tree class, for debugging */
- size_t nrec_size; /* Size of native (memory) record */
+ H5B2_subid_t id; /* ID of B-tree class, as found in file */
+ const char * name; /* Name of B-tree class, for debugging */
+ size_t nrec_size; /* Size of native (memory) record */
/* Extensible array client callback methods */
- void *(*crt_context)(void *udata); /* Create context for other client callbacks */
- herr_t (*dst_context)(void *ctx); /* Destroy client callback context */
- herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */
+ void *(*crt_context)(void *udata); /* Create context for other client callbacks */
+ herr_t (*dst_context)(void *ctx); /* Destroy client callback context */
+ herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */
herr_t (*compare)(const void *rec1, const void *rec2, int *result); /* Compare two native records */
- herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */
- herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
- herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
- int indent, int fwidth, const void *record, const void *ctx);
- void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
- herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
+ herr_t (*encode)(uint8_t *raw, const void *record,
+ void *ctx); /* Encode record from native form to disk storage form */
+ herr_t (*decode)(const uint8_t *raw, void *record,
+ void *ctx); /* Decode record from disk storage form to native form */
+ herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
+ int indent, int fwidth, const void *record, const void *ctx);
+ void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
+ herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
};
/* v2 B-tree creation parameters */
typedef struct H5B2_create_t {
- const H5B2_class_t *cls; /* v2 B-tree client class */
- uint32_t node_size; /* Size of each node (in bytes) */
- uint32_t rrec_size; /* Size of raw record (in bytes) */
- uint8_t split_percent; /* % full to split nodes */
- uint8_t merge_percent; /* % full to merge nodes */
+ const H5B2_class_t *cls; /* v2 B-tree client class */
+ uint32_t node_size; /* Size of each node (in bytes) */
+ uint32_t rrec_size; /* Size of raw record (in bytes) */
+ uint8_t split_percent; /* % full to split nodes */
+ uint8_t merge_percent; /* % full to merge nodes */
} H5B2_create_t;
/* v2 B-tree metadata statistics info */
typedef struct H5B2_stat_t {
- unsigned depth; /* Depth of B-tree */
- hsize_t nrecords; /* Number of records */
+ unsigned depth; /* Depth of B-tree */
+ hsize_t nrecords; /* Number of records */
} H5B2_stat_t;
/* v2 B-tree info (forward decl - defined in H5B2pkg.h) */
typedef struct H5B2_t H5B2_t;
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-H5_DLL H5B2_t *H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
- void *ctx_udata);
+H5_DLL H5B2_t *H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udata);
H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata);
-H5_DLL herr_t H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr/*out*/);
-H5_DLL herr_t H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata);
-H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op,
- void *op_data);
-H5_DLL htri_t H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata,
- H5B2_found_t op, void *op_data);
-H5_DLL herr_t H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
- hsize_t idx, H5B2_found_t op, void *op_data);
-H5_DLL herr_t H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range,
- void *udata, H5B2_found_t op, void *op_data);
-H5_DLL herr_t H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata,
- H5B2_modify_t op, void *op_data);
-H5_DLL herr_t H5B2_remove(H5B2_t *b2, hid_t dxpl_id, void *udata,
- H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id,
- H5_iter_order_t order, hsize_t idx, H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec);
-H5_DLL herr_t H5B2_size(H5B2_t *bt2, hid_t dxpl_id,
- hsize_t *btree_size);
-H5_DLL herr_t H5B2_close(H5B2_t *bt2, hid_t dxpl_id);
-H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- void *ctx_udata, H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr /*out*/);
+H5_DLL herr_t H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata);
+H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, void *op_data);
+H5_DLL htri_t H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op, void *op_data);
+H5_DLL herr_t H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx, H5B2_found_t op,
+ void *op_data);
+H5_DLL herr_t H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range, void *udata, H5B2_found_t op,
+ void *op_data);
+H5_DLL herr_t H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op, void *op_data);
+H5_DLL herr_t H5B2_remove(H5B2_t *b2, hid_t dxpl_id, void *udata, H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
+ H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec);
+H5_DLL herr_t H5B2_size(H5B2_t *bt2, hid_t dxpl_id, hsize_t *btree_size);
+H5_DLL herr_t H5B2_close(H5B2_t *bt2, hid_t dxpl_id);
+H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, H5B2_remove_t op,
+ void *op_data);
/* Statistics routines */
H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info);
#endif /* _H5B2private_H */
-
diff --git a/src/H5B2public.h b/src/H5B2public.h
index 6e0b964..7686b33 100644
--- a/src/H5B2public.h
+++ b/src/H5B2public.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -49,4 +49,3 @@ extern "C" {
#endif
#endif /* _H5B2public_H */
-
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index e30d162..df7303e 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: v2 B-tree metadata statistics functions.
@@ -22,52 +22,43 @@
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /* Suppress error about including H5B2pkg */
-
+#define H5B2_PACKAGE /* Suppress error about including H5B2pkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5B2_stat_info
*
@@ -89,13 +80,12 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
HDassert(info);
/* Get information about the B-tree */
- info->depth = bt2->hdr->depth;
+ info->depth = bt2->hdr->depth;
info->nrecords = bt2->hdr->root.all_nrec;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_stat_info() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_size
*
@@ -112,8 +102,8 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
herr_t
H5B2_size(H5B2_t *bt2, hid_t dxpl_id, hsize_t *btree_size)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -131,17 +121,16 @@ H5B2_size(H5B2_t *bt2, hid_t dxpl_id, hsize_t *btree_size)
*btree_size += hdr->hdr_size;
/* Iterate through records */
- if(hdr->root.node_nrec > 0) {
+ if (hdr->root.node_nrec > 0) {
/* Check for root node being a leaf */
- if(hdr->depth == 0)
+ if (hdr->depth == 0)
*btree_size += hdr->node_size;
else
/* Iterate through nodes */
- if(H5B2_node_size(hdr, dxpl_id, hdr->depth, &hdr->root, btree_size) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed")
+ if (H5B2_node_size(hdr, dxpl_id, hdr->depth, &hdr->root, btree_size) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_size() */
-
diff --git a/src/H5B2test.c b/src/H5B2test.c
index b7fab99..50e2c02 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -6,104 +6,94 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, February 3, 2005
*
* Purpose: v2 B-tree testing functions.
*
*/
-
/****************/
/* Module Setup */
/****************/
-#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
-#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
-
+#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
+#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5B2pkg.h" /* v2 B-trees */
+#include "H5Eprivate.h" /* Error handling */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* v2 B-tree client callback context */
typedef struct H5B2_test_ctx_t {
- uint8_t sizeof_size; /* Size of file sizes */
+ uint8_t sizeof_size; /* Size of file sizes */
} H5B2_test_ctx_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static void *H5B2_test_crt_context(void *udata);
+static void * H5B2_test_crt_context(void *udata);
static herr_t H5B2_test_dst_context(void *ctx);
static herr_t H5B2_test_store(void *nrecord, const void *udata);
static herr_t H5B2_test_compare(const void *rec1, const void *rec2, int *result);
static herr_t H5B2_test_encode(uint8_t *raw, const void *nrecord, void *ctx);
static herr_t H5B2_test_decode(const uint8_t *raw, void *nrecord, void *ctx);
-static herr_t H5B2_test_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
-static void *H5B2_test_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
-
+static herr_t H5B2_test_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent, int fwidth,
+ const void *record, const void *_udata);
+static void * H5B2_test_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
/*********************/
/* Package Variables */
/*********************/
-const H5B2_class_t H5B2_TEST[1]={{ /* B-tree class information */
- H5B2_TEST_ID, /* Type of B-tree */
- "H5B2_TEST_ID", /* Name of B-tree class */
- sizeof(hsize_t), /* Size of native record */
- H5B2_test_crt_context, /* Create client callback context */
- H5B2_test_dst_context, /* Destroy client callback context */
- H5B2_test_store, /* Record storage callback */
- H5B2_test_compare, /* Record comparison callback */
- H5B2_test_encode, /* Record encoding callback */
- H5B2_test_decode, /* Record decoding callback */
- H5B2_test_debug, /* Record debugging callback */
- H5B2_test_crt_dbg_context, /* Create debugging context */
- H5B2_test_dst_context /* Destroy debugging context */
+const H5B2_class_t H5B2_TEST[1] = {{
+ /* B-tree class information */
+ H5B2_TEST_ID, /* Type of B-tree */
+ "H5B2_TEST_ID", /* Name of B-tree class */
+ sizeof(hsize_t), /* Size of native record */
+ H5B2_test_crt_context, /* Create client callback context */
+ H5B2_test_dst_context, /* Destroy client callback context */
+ H5B2_test_store, /* Record storage callback */
+ H5B2_test_compare, /* Record comparison callback */
+ H5B2_test_encode, /* Record encoding callback */
+ H5B2_test_decode, /* Record decoding callback */
+ H5B2_test_debug, /* Record debugging callback */
+ H5B2_test_crt_dbg_context, /* Create debugging context */
+ H5B2_test_dst_context /* Destroy debugging context */
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/* Declare a free list to manage the H5B2_test_ctx_t struct */
H5FL_DEFINE_STATIC(H5B2_test_ctx_t);
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_crt_context
*
@@ -120,9 +110,9 @@ H5FL_DEFINE_STATIC(H5B2_test_ctx_t);
static void *
H5B2_test_crt_context(void *_f)
{
- H5F_t *f = (H5F_t *)_f; /* User data for building callback context */
- H5B2_test_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
+ H5F_t * f = (H5F_t *)_f; /* User data for building callback context */
+ H5B2_test_ctx_t *ctx; /* Callback context structure */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -130,7 +120,7 @@ H5B2_test_crt_context(void *_f)
HDassert(f);
/* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
+ if (NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context")
/* Determine the size of lengths in the file */
@@ -143,7 +133,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_test_crt_context() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_dst_context
*
@@ -160,7 +149,7 @@ done:
static herr_t
H5B2_test_dst_context(void *_ctx)
{
- H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
+ H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -173,7 +162,6 @@ H5B2_test_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_dst_context() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_store
*
@@ -197,7 +185,6 @@ H5B2_test_store(void *nrecord, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_store() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_compare
*
@@ -222,7 +209,6 @@ H5B2_test_compare(const void *rec1, const void *rec2, int *result)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_encode
*
@@ -239,7 +225,7 @@ H5B2_test_compare(const void *rec1, const void *rec2, int *result)
static herr_t
H5B2_test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
{
- H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
+ H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -251,7 +237,6 @@ H5B2_test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_decode
*
@@ -268,7 +253,7 @@ H5B2_test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
static herr_t
H5B2_test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
{
- H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
+ H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -280,7 +265,6 @@ H5B2_test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_debug
*
@@ -295,21 +279,18 @@ H5B2_test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2_test_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *record,
- const void H5_ATTR_UNUSED *_udata)
+H5B2_test_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, int indent,
+ int fwidth, const void *record, const void H5_ATTR_UNUSED *_udata)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert (record);
+ HDassert(record);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Record:",
- *(const hsize_t *)record);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Record:", *(const hsize_t *)record);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_test_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_test_crt_dbg_context
*
@@ -327,7 +308,7 @@ static void *
H5B2_test_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
{
H5B2_test_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -335,7 +316,7 @@ H5B2_test_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATT
HDassert(f);
/* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
+ if (NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context")
/* Determine the size of addresses & lengths in the file */
@@ -348,7 +329,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_test_crt_dbg_context() */
-
/*-------------------------------------------------------------------------
* Function: H5B2_get_root_addr_test
*
@@ -377,14 +357,12 @@ H5B2_get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2_get_root_addr_test() */
-
/*-------------------------------------------------------------------------
- * Function: H5B2_get_node_info_test
+ * Function: H5B2_get_node_info_test
*
- * Purpose: Determine information about a node holding a record in the B-tree
+ * Purpose: Determine information about a node holding a record in the B-tree
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Thursday, August 31, 2006
@@ -392,15 +370,14 @@ H5B2_get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata,
- H5B2_node_info_test_t *ninfo)
+H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_node_info_test_t *ninfo)
{
- H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
- H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
- unsigned depth; /* Current depth of the tree */
- int cmp; /* Comparison value of records */
- unsigned idx; /* Location of record which matches key */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_hdr_t * hdr; /* Pointer to the B-tree header */
+ H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
+ unsigned depth; /* Current depth of the tree */
+ int cmp; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -420,33 +397,35 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata,
depth = hdr->depth;
/* Check for empty tree */
- if(0 == curr_node_ptr.node_nrec)
+ if (0 == curr_node_ptr.node_nrec)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records")
/* Walk down B-tree to find record or leaf node where record is located */
cmp = -1;
- while(depth > 0 && cmp != 0) {
- H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
- H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
+ while (depth > 0 && cmp != 0) {
+ H5B2_internal_t *internal; /* Pointer to internal node in B-tree */
+ H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if(NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ)))
+ if (NULL == (internal = H5B2_protect_internal(hdr, dxpl_id, curr_node_ptr.addr,
+ curr_node_ptr.node_nrec, depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate node pointer for child */
- if(H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native,
- udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx,
+ &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(cmp > 0)
+ if (cmp > 0)
idx++;
- if(cmp != 0) {
+ if (cmp != 0) {
/* Get node pointer for next node to search */
next_node_ptr = internal->node_ptrs[idx];
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Set pointer to next node to load */
@@ -454,12 +433,13 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata,
} /* end if */
else {
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Fill in information about the node */
ninfo->depth = depth;
- ninfo->nrec = curr_node_ptr.node_nrec;
+ ninfo->nrec = curr_node_ptr.node_nrec;
/* Indicate success */
HGOTO_DONE(SUCCEED)
@@ -470,45 +450,45 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata,
} /* end while */
{
- H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
+ H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
+ if (NULL ==
+ (leaf = H5B2_protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Locate record */
- if(H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native,
- udata, &idx, &cmp) < 0)
+ if (H5B2_locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
/* Unlock current node */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
/* Indicate the depth that the record was found */
- if(cmp != 0)
+ if (cmp != 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record not in B-tree")
} /* end block */
/* Fill in information about the leaf node */
ninfo->depth = depth;
- ninfo->nrec = curr_node_ptr.node_nrec;
+ ninfo->nrec = curr_node_ptr.node_nrec;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_get_node_info_test() */
-
/*-------------------------------------------------------------------------
- * Function: H5B2_get_node_depth_test
+ * Function: H5B2_get_node_depth_test
*
- * Purpose: Determine the depth of a node holding a record in the B-tree
+ * Purpose: Determine the depth of a node holding a record in the B-tree
*
- * Note: Just a simple wrapper around the H5B2_get_node_info_test() routine
+ * Note: Just a simple wrapper around the H5B2_get_node_info_test() routine
*
- * Return: Success: non-negative depth of the node where the record
- * was found
- * Failure: negative
+ * Return: Success: Non-negative depth of the node where the record
+ * was found
+ *
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Saturday, August 26, 2006
@@ -518,17 +498,17 @@ done:
int
H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata)
{
- H5B2_node_info_test_t ninfo; /* Node information */
- int ret_value; /* Return information */
+ H5B2_node_info_test_t ninfo; /* Node information */
+ int ret_value = -1; /* Return information */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Check arguments. */
HDassert(bt2);
/* Get information abou the node */
- if(H5B2_get_node_info_test(bt2, dxpl_id, udata, &ninfo) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "error looking up node info")
+ if (H5B2_get_node_info_test(bt2, dxpl_id, udata, &ninfo) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, (-1), "error looking up node info")
/* Set return value */
ret_value = ninfo.depth;
@@ -536,4 +516,3 @@ H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2_get_node_depth_test() */
-
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index b710f57..b1af62d 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Bcache.c
* Oct 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implement B-tree metadata cache methods.
*
@@ -26,40 +26,36 @@
/* Module Setup */
/****************/
-#define H5B_PACKAGE /*suppress error about including H5Bpkg */
-
+#define H5B_PACKAGE /*suppress error about including H5Bpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MFprivate.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache callbacks */
static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned H5_ATTR_UNUSED * flags_ptr);
+static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
static herr_t H5B__dest(H5F_t *f, H5B_t *bt);
static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy);
static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr);
-
/*********************/
/* Package Variables */
/*********************/
@@ -78,8 +74,6 @@ const H5AC_class_t H5AC_BT[1] = {{
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5B__load
*
@@ -97,13 +91,13 @@ const H5AC_class_t H5AC_BT[1] = {{
static H5B_t *
H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */
- H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native keys */
- unsigned u; /* Local index variable */
- H5B_t *ret_value; /* Return value */
+ H5B_t * bt = NULL; /* Pointer to the deserialized B-tree node */
+ H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint8_t * native; /* Pointer to native keys */
+ unsigned u; /* Local index variable */
+ H5B_t * ret_value; /* Return value */
FUNC_ENTER_STATIC
@@ -112,8 +106,8 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(H5F_addr_defined(addr));
HDassert(udata);
- if(NULL == (bt = H5FL_MALLOC(H5B_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
+ if (NULL == (bt = H5FL_MALLOC(H5B_t)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
/* Set & increment the ref-counted "shared" B-tree information for the node */
@@ -125,32 +119,32 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(shared);
/* Allocate space for the native keys and child addresses */
- if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for native keys")
- if(NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for child addresses")
+ if (NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for native keys")
+ if (NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for child addresses")
- if(H5F_block_read(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree node")
+ if (H5F_block_read(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree node")
/* Set the pointer into the raw data buffer */
p = shared->page;
/* magic number */
- if(HDmemcmp(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree signature")
+ if (HDmemcmp(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree signature")
p += 4;
/* node type and level */
- if(*p++ != (uint8_t)udata->type->id)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type")
+ if (*p++ != (uint8_t)udata->type->id)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type")
bt->level = *p++;
/* entries used */
UINT16DECODE(p, bt->nchildren);
/* Check if bt->nchildren is greater than two_k */
- if(bt->nchildren > shared->two_k)
+ if (bt->nchildren > shared->two_k)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum")
/* sibling pointers */
@@ -159,9 +153,9 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* the child/key pairs */
native = bt->native;
- for(u = 0; u < bt->nchildren; u++) {
+ for (u = 0; u < bt->nchildren; u++) {
/* Decode native key value */
- if((udata->type->decode)(shared, p, native) < 0)
+ if ((udata->type->decode)(shared, p, native) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key")
p += shared->sizeof_rkey;
native += udata->type->sizeof_nkey;
@@ -171,9 +165,9 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end for */
/* Decode final key */
- if(bt->nchildren > 0) {
+ if (bt->nchildren > 0) {
/* Decode native key value */
- if((udata->type->decode)(shared, p, native) < 0)
+ if ((udata->type->decode)(shared, p, native) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key")
} /* end if */
@@ -181,14 +175,13 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
ret_value = bt;
done:
- if(!ret_value && bt)
- if(H5B_node_dest(bt) < 0)
+ if (!ret_value && bt)
+ if (H5B_node_dest(bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */
+} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5B__flush
*
@@ -203,10 +196,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -219,10 +213,10 @@ H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, un
HDassert(shared->type);
HDassert(shared->type->encode);
- if(bt->cache_info.is_dirty) {
- uint8_t *p; /* Pointer into raw data buffer */
- uint8_t *native; /* Pointer to native keys */
- unsigned u; /* Local index variable */
+ if (bt->cache_info.is_dirty) {
+ uint8_t *p; /* Pointer into raw data buffer */
+ uint8_t *native; /* Pointer to native keys */
+ unsigned u; /* Local index variable */
p = shared->page;
@@ -244,9 +238,9 @@ H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, un
/* child keys and pointers */
native = bt->native;
- for(u = 0; u < bt->nchildren; ++u) {
+ for (u = 0; u < bt->nchildren; ++u) {
/* encode the key */
- if(shared->type->encode(shared, p, native) < 0)
+ if (shared->type->encode(shared, p, native) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key")
p += shared->sizeof_rkey;
native += shared->type->sizeof_nkey;
@@ -254,32 +248,31 @@ H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, un
/* encode the child address */
H5F_addr_encode(f, &p, bt->child[u]);
} /* end for */
- if(bt->nchildren > 0) {
+ if (bt->nchildren > 0) {
/* Encode the final key */
- if(shared->type->encode(shared, p, native) < 0)
+ if (shared->type->encode(shared, p, native) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key")
} /* end if */
- /*
+ /*
* Write the disk page. We always write the header, but we don't
* bother writing data for the child entries that don't exist or
* for the final unchanged children.
- */
- if(H5F_block_write(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree node to disk")
+ */
+ if (H5F_block_write(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree node to disk")
- bt->cache_info.is_dirty = FALSE;
+ bt->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5B__dest(f, bt) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
+ if (destroy)
+ if (H5B__dest(f, bt) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__flush() */
-
/*-------------------------------------------------------------------------
* Function: H5B__dest
*
@@ -296,7 +289,7 @@ done:
static herr_t
H5B__dest(H5F_t *f, H5B_t *bt)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -311,8 +304,8 @@ H5B__dest(H5F_t *f, H5B_t *bt)
HDassert(!bt->cache_info.free_file_space_on_destroy || H5F_addr_defined(bt->cache_info.addr));
/* Check for freeing file space for B-tree node */
- if(bt->cache_info.free_file_space_on_destroy) {
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ if (bt->cache_info.free_file_space_on_destroy) {
+ H5B_shared_t *shared; /* Pointer to shared B-tree info */
/* Get the pointer to the shared B-tree info */
shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
@@ -320,19 +313,19 @@ H5B__dest(H5F_t *f, H5B_t *bt)
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, bt->cache_info.addr, (hsize_t)shared->sizeof_rnode) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, bt->cache_info.addr, (hsize_t)shared->sizeof_rnode) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free B-tree node")
} /* end if */
/* Destroy B-tree node */
- if(H5B_node_dest(bt) < 0)
+ if (H5B_node_dest(bt) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__dest() */
-
/*-------------------------------------------------------------------------
* Function: H5B__clear
*
@@ -361,15 +354,14 @@ H5B__clear(H5F_t *f, H5B_t *bt, hbool_t destroy)
/* Reset the dirty flag. */
bt->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5B__dest(f, bt) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
+ if (destroy)
+ if (H5B__dest(f, bt) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__clear() */
-
/*-------------------------------------------------------------------------
* Function: H5B__compute_size
*
@@ -387,7 +379,7 @@ done:
static herr_t
H5B__compute_size(const H5F_t H5_ATTR_UNUSED *f, const H5B_t *bt, size_t *size_ptr)
{
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_shared_t *shared; /* Pointer to shared B-tree info */
FUNC_ENTER_STATIC_NOERR
@@ -405,4 +397,3 @@ H5B__compute_size(const H5F_t H5_ATTR_UNUSED *f, const H5B_t *bt, size_t *size_p
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B__compute_size() */
-
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index f3a0f5c..6002109 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5Bdbg.c
- * Dec 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Bdbg.c
+ * Dec 11 2008
+ * Quincey Koziol
*
- * Purpose: Debugging routines for B-link tree package.
+ * Purpose: Debugging routines for B-link tree package.
*
*-------------------------------------------------------------------------
*/
@@ -26,42 +26,38 @@
/* Module Setup */
/****************/
-#define H5B_PACKAGE /*suppress error about including H5Bpkg */
-
+#define H5B_PACKAGE /*suppress error about including H5Bpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
-
/*-------------------------------------------------------------------------
- * Function: H5B_debug
+ * Function: H5B_debug
*
- * Purpose: Prints debugging info about a B-tree.
+ * Purpose: Prints debugging info about a B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 4 1997
+ * Programmer: Robb Matzke
+ * Aug 4 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B_class_t *type, void *udata)
+ const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_t * bt = NULL;
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -76,94 +72,77 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
HDassert(type);
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/*
* Load the tree node.
*/
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/*
* Print the values.
*/
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:",
+ ((shared->type->id) == H5B_SNODE_ID
+ ? "H5B_SNODE_ID"
+ : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Tree type ID:",
- ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
- ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- shared->sizeof_rnode);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) key:",
- shared->sizeof_rkey);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- bt->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Level:",
- bt->level);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of left sibling:",
- bt->left);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of right sibling:",
- bt->right);
- HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth,
- "Number of children (max):",
- bt->nchildren, shared->two_k);
+ "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False");
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of left sibling:", bt->left);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of right sibling:", bt->right);
+ HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren,
+ shared->two_k);
/*
* Print the child addresses
*/
- for(u = 0; u < bt->nchildren; u++) {
- HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", bt->child[u]);
+ for (u = 0; u < bt->nchildren; u++) {
+ HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
+ HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
- if(type->debug_key) {
+ if (type->debug_key) {
/* Decode the 'left' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- "Left Key:");
- HDassert(H5B_NKEY(bt,shared,u));
- (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6),
- H5B_NKEY(bt, shared, u), udata);
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Left Key:");
+ HDassert(H5B_NKEY(bt, shared, u));
+ (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6), H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- "Right Key:");
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Right Key:");
HDassert(H5B_NKEY(bt, shared, u + 1));
- (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6),
- H5B_NKEY(bt, shared, u + 1), udata);
- } /* end if */
- } /* end for */
+ (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6), H5B_NKEY(bt, shared, u + 1),
+ udata);
+ } /* end if */
+ } /* end for */
done:
- if(bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (bt && H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_debug() */
-
/*-------------------------------------------------------------------------
- * Function: H5B_assert
+ * Function: H5B_assert
*
- * Purpose: Verifies that the tree is structured correctly.
+ * Purpose: Verifies that the tree is structured correctly.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: aborts if something is wrong.
+ * Failure: aborts if something is wrong.
*
- * Programmer: Robb Matzke
- * Tuesday, November 4, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, November 4, 1997
*
*-------------------------------------------------------------------------
*/
@@ -171,52 +150,52 @@ done:
herr_t
H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5RC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- int ncell, cmp;
- static int ncalls = 0;
- herr_t status;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_t * bt = NULL;
+ H5RC_t * rc_shared; /* Ref-counted shared info */
+ H5B_shared_t * shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ int ncell, cmp;
+ static int ncalls = 0;
+ herr_t status;
+ herr_t ret_value = SUCCEED; /* Return value */
/* A queue of child data */
struct child_t {
- haddr_t addr;
- unsigned level;
- struct child_t *next;
+ haddr_t addr;
+ unsigned level;
+ struct child_t *next;
} *head = NULL, *tail = NULL, *prev = NULL, *cur = NULL, *tmp = NULL;
FUNC_ENTER_NOAPI_NOINIT
- if(0 == ncalls++) {
- if(H5DEBUG(B))
- fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
+ if (0 == ncalls++) {
+ if (H5DEBUG(B))
+ HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
/* Get shared info for B-tree */
- if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ if (NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
HDassert(shared);
/* Initialize the queue */
- cache_udata.f = f;
- cache_udata.type = type;
+ cache_udata.f = f;
+ cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
- bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ);
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ);
HDassert(bt);
shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
HDassert(cur);
- cur->addr = addr;
+ cur->addr = addr;
cur->level = bt->level;
head = tail = cur;
status = H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET);
HDassert(status >= 0);
- bt = NULL; /* Make certain future references will be caught */
+ bt = NULL; /* Make certain future references will be caught */
/*
* Do a breadth-first search of the tree. New nodes are added to the end
@@ -224,65 +203,64 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
* remove any nodes from the queue because we need them in the uniqueness
* test.
*/
- for(ncell = 0; cur; ncell++) {
- bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, &cache_udata, H5AC_READ);
- HDassert(bt);
-
- /* Check node header */
- HDassert(bt->level == cur->level);
- if(cur->next && cur->next->level == bt->level)
- HDassert(H5F_addr_eq(bt->right, cur->next->addr));
- else
- HDassert(!H5F_addr_defined(bt->right));
- if(prev && prev->level == bt->level)
- HDassert(H5F_addr_eq(bt->left, prev->addr));
- else
- HDassert(!H5F_addr_defined(bt->left));
-
- if(cur->level > 0) {
+ for (ncell = 0; cur; ncell++) {
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, &cache_udata, H5AC_READ);
+ HDassert(bt);
+
+ /* Check node header */
+ HDassert(bt->level == cur->level);
+ if (cur->next && cur->next->level == bt->level)
+ HDassert(H5F_addr_eq(bt->right, cur->next->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->right));
+ if (prev && prev->level == bt->level)
+ HDassert(H5F_addr_eq(bt->left, prev->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->left));
+
+ if (cur->level > 0) {
unsigned u;
- for(u = 0; u < bt->nchildren; u++) {
- /*
- * Check that child nodes haven't already been seen. If they
- * have then the tree has a cycle.
- */
- for(tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
-
- /* Add the child node to the end of the queue */
- tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(tmp);
- tmp->addr = bt->child[u];
- tmp->level = bt->level - 1;
- tail->next = tmp;
- tail = tmp;
-
- /* Check that the keys are monotonically increasing */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
- HDassert(cmp < 0);
- } /* end for */
- } /* end if */
-
- /* Release node */
- status = H5AC_unprotect(f, dxpl_id, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
- bt = NULL; /* Make certain future references will be caught */
-
- /* Advance current location in queue */
- prev = cur;
- cur = cur->next;
+ for (u = 0; u < bt->nchildren; u++) {
+ /*
+ * Check that child nodes haven't already been seen. If they
+ * have then the tree has a cycle.
+ */
+ for (tmp = head; tmp; tmp = tmp->next)
+ HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
+
+ /* Add the child node to the end of the queue */
+ tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
+ HDassert(tmp);
+ tmp->addr = bt->child[u];
+ tmp->level = bt->level - 1;
+ tail->next = tmp;
+ tail = tmp;
+
+ /* Check that the keys are monotonically increasing */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
+ HDassert(cmp < 0);
+ } /* end for */
+ } /* end if */
+
+ /* Release node */
+ status = H5AC_unprotect(f, dxpl_id, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
+ HDassert(status >= 0);
+ bt = NULL; /* Make certain future references will be caught */
+
+ /* Advance current location in queue */
+ prev = cur;
+ cur = cur->next;
} /* end for */
/* Free all entries from queue */
- while(head) {
- tmp = head->next;
- H5MM_xfree(head);
- head = tmp;
+ while (head) {
+ tmp = head->next;
+ H5MM_xfree(head);
+ head = tmp;
} /* end while */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_assert() */
#endif /* H5B_DEBUG */
-
diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h
index 4acd607..51b1310 100644
--- a/src/H5Bpkg.h
+++ b/src/H5Bpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 15, 2003
*
* Purpose: This file contains declarations which are visible only within
@@ -30,17 +30,15 @@
#include "H5Bprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
-
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
/* Package Private Macros */
/**************************/
/* Get the native key at a given index */
-#define H5B_NKEY(b, shared, idx) ((b)->native + (shared)->nkey[(idx)])
-
+#define H5B_NKEY(b, shared, idx) ((b)->native + (shared)->nkey[(idx)])
/****************************/
/* Package Private Typedefs */
@@ -48,22 +46,22 @@
/* The B-tree node as stored in memory... */
typedef struct H5B_t {
- H5AC_info_t cache_info; /* Information for H5AC cache functions */
- /* _must_ be first field in structure */
- H5RC_t *rc_shared; /*ref-counted shared info */
- unsigned level; /*node level */
- unsigned nchildren; /*number of child pointers */
- haddr_t left; /*address of left sibling */
- haddr_t right; /*address of right sibling */
- uint8_t *native; /*array of keys in native format */
- haddr_t *child; /*2k child pointers */
+ H5AC_info_t cache_info; /* Information for H5AC cache functions */
+ /* _must_ be first field in structure */
+ H5RC_t * rc_shared; /*ref-counted shared info */
+ unsigned level; /*node level */
+ unsigned nchildren; /*number of child pointers */
+ haddr_t left; /*address of left sibling */
+ haddr_t right; /*address of right sibling */
+ uint8_t *native; /*array of keys in native format */
+ haddr_t *child; /*2k child pointers */
} H5B_t;
/* Callback info for loading a B-tree node into the cache */
typedef struct H5B_cache_ud_t {
- H5F_t *f; /* File that B-tree node is within */
- const struct H5B_class_t *type; /* Type of tree */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5F_t * f; /* File that B-tree node is within */
+ const struct H5B_class_t *type; /* Type of tree */
+ H5RC_t * rc_shared; /* Ref-counted shared info */
} H5B_cache_ud_t;
/*****************************/
@@ -82,15 +80,12 @@ H5FL_BLK_EXTERN(native_block);
/* Declare a free list to manage the H5B_t struct */
H5FL_EXTERN(H5B_t);
-
/******************************/
/* Package Private Prototypes */
/******************************/
H5_DLL herr_t H5B_node_dest(H5B_t *bt);
#ifdef H5B_DEBUG
-herr_t H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type,
- void *udata);
+herr_t H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void *udata);
#endif
#endif /*_H5Bpkg_H*/
-
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index 9b565ab..660b219 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,24 +15,22 @@
*
* Created: H5Bprivate.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5Bprivate_H
#define _H5Bprivate_H
-#include "H5Bpublic.h" /*API prototypes */
+#include "H5Bpublic.h" /*API prototypes */
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
-#include "H5RCprivate.h" /* Reference counted object functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
+#include "H5RCprivate.h" /* Reference counted object functions */
/**************************/
/* Library Private Macros */
@@ -45,10 +43,9 @@
* being enabled.
*/
#ifdef NDEBUG
-# undef H5B_DEBUG
+#undef H5B_DEBUG
#endif
-
/****************************/
/* Library Private Typedefs */
/****************************/
@@ -58,46 +55,46 @@
* nodes) they use will need to be stored in the file somewhere. -QAK
*/
typedef enum H5B_subid_t {
- H5B_SNODE_ID = 0, /*B-tree is for symbol table nodes */
- H5B_CHUNK_ID = 1, /*B-tree is for chunked dataset storage */
- H5B_NUM_BTREE_ID /* Number of B-tree key IDs (must be last) */
+ H5B_SNODE_ID = 0, /*B-tree is for symbol table nodes */
+ H5B_CHUNK_ID = 1, /*B-tree is for chunked dataset storage */
+ H5B_NUM_BTREE_ID /* Number of B-tree key IDs (must be last) */
} H5B_subid_t;
/* Define return values from B-tree insertion callbacks */
typedef enum H5B_ins_t {
- H5B_INS_ERROR = -1, /*error return value */
- H5B_INS_NOOP = 0, /*insert made no changes */
- H5B_INS_LEFT = 1, /*insert new node to left of cur node */
- H5B_INS_RIGHT = 2, /*insert new node to right of cur node */
- H5B_INS_CHANGE = 3, /*change child address for cur node */
- H5B_INS_FIRST = 4, /*insert first node in (sub)tree */
- H5B_INS_REMOVE = 5 /*remove current node */
+ H5B_INS_ERROR = -1, /*error return value */
+ H5B_INS_NOOP = 0, /*insert made no changes */
+ H5B_INS_LEFT = 1, /*insert new node to left of cur node */
+ H5B_INS_RIGHT = 2, /*insert new node to right of cur node */
+ H5B_INS_CHANGE = 3, /*change child address for cur node */
+ H5B_INS_FIRST = 4, /*insert first node in (sub)tree */
+ H5B_INS_REMOVE = 5 /*remove current node */
} H5B_ins_t;
/* Enum for specifying the direction of the critical key in relation to the
* child */
typedef enum H5B_dir_t {
- H5B_LEFT = 0, /* Critical key is to the left */
- H5B_RIGHT = 1 /* Critical key is to the right */
+ H5B_LEFT = 0, /* Critical key is to the left */
+ H5B_RIGHT = 1 /* Critical key is to the right */
} H5B_dir_t;
/* Define the operator callback function pointer for H5B_iterate() */
-typedef int (*H5B_operator_t)(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
+typedef int (*H5B_operator_t)(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key,
+ void *_udata);
/* Each B-tree has certain information that can be shared across all
* the instances of nodes in that B-tree.
*/
typedef struct H5B_shared_t {
- const struct H5B_class_t *type; /* Type of tree */
- unsigned two_k; /* 2*"K" value for tree's nodes */
- size_t sizeof_rkey; /* Size of raw (disk) key */
- size_t sizeof_rnode; /* Size of raw (disk) node */
- size_t sizeof_keys; /* Size of native (memory) key node */
- size_t sizeof_addr; /* Size of file address (in bytes) */
- size_t sizeof_len; /* Size of file lengths (in bytes) */
- uint8_t *page; /* Disk page */
- size_t *nkey; /* Offsets of each native key in native key buffer */
+ const struct H5B_class_t *type; /* Type of tree */
+ unsigned two_k; /* 2*"K" value for tree's nodes */
+ size_t sizeof_rkey; /* Size of raw (disk) key */
+ size_t sizeof_rnode; /* Size of raw (disk) node */
+ size_t sizeof_keys; /* Size of native (memory) key node */
+ size_t sizeof_addr; /* Size of file address (in bytes) */
+ size_t sizeof_len; /* Size of file lengths (in bytes) */
+ uint8_t * page; /* Disk page */
+ size_t * nkey; /* Offsets of each native key in native key buffer */
} H5B_shared_t;
/*
@@ -109,71 +106,60 @@ typedef struct H5B_shared_t {
*/
typedef struct H5B_class_t {
- H5B_subid_t id; /*id as found in file*/
- size_t sizeof_nkey; /*size of native (memory) key*/
- H5RC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */
- herr_t (*new_node)(H5F_t*, hid_t, H5B_ins_t, void*, void*, void*, haddr_t*);
- int (*cmp2)(void*, void*, void*); /*compare 2 keys */
- int (*cmp3)(void*, void*, void*); /*compare 3 keys */
- htri_t (*found)(H5F_t*, hid_t, haddr_t, const void*, void*);
+ H5B_subid_t id; /*id as found in file*/
+ size_t sizeof_nkey; /*size of native (memory) key*/
+ H5RC_t *(*get_shared)(const H5F_t *, const void *); /*shared info for node */
+ herr_t (*new_node)(H5F_t *, hid_t, H5B_ins_t, void *, void *, void *, haddr_t *);
+ int (*cmp2)(void *, void *, void *); /*compare 2 keys */
+ int (*cmp3)(void *, void *, void *); /*compare 3 keys */
+ htri_t (*found)(H5F_t *, hid_t, haddr_t, const void *, void *);
/* insert new data */
- H5B_ins_t (*insert)(H5F_t*, hid_t, haddr_t, void*, hbool_t*, void*, void*,
- void*, hbool_t*, haddr_t*);
+ H5B_ins_t (*insert)(H5F_t *, hid_t, haddr_t, void *, hbool_t *, void *, void *, void *, hbool_t *,
+ haddr_t *);
/* min insert uses min leaf, not new(), similarly for max insert */
- hbool_t follow_min;
- hbool_t follow_max;
+ hbool_t follow_min;
+ hbool_t follow_max;
/* The direction of the key that is intrinsically associated with each node */
- H5B_dir_t critical_key;
+ H5B_dir_t critical_key;
/* remove existing data */
- H5B_ins_t (*remove)(H5F_t*, hid_t, haddr_t, void*, hbool_t*, void*, void*,
- hbool_t*);
+ H5B_ins_t (*remove)(H5F_t *, hid_t, haddr_t, void *, hbool_t *, void *, void *, hbool_t *);
/* encode, decode, debug key values */
- herr_t (*decode)(const H5B_shared_t*, const uint8_t*, void*);
- herr_t (*encode)(const H5B_shared_t*, uint8_t*, const void*);
- herr_t (*debug_key)(FILE*, int, int, const void*, const void*);
+ herr_t (*decode)(const H5B_shared_t *, const uint8_t *, void *);
+ herr_t (*encode)(const H5B_shared_t *, uint8_t *, const void *);
+ herr_t (*debug_key)(FILE *, int, int, const void *, const void *);
} H5B_class_t;
/* Information about B-tree */
typedef struct H5B_info_t {
- hsize_t size; /* Size of B-tree nodes */
- hsize_t num_nodes; /* Number of B-tree nodes */
+ hsize_t size; /* Size of B-tree nodes */
+ hsize_t num_nodes; /* Number of B-tree nodes */
} H5B_info_t;
-
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-H5_DLL herr_t H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- void *udata, haddr_t *addr_p/*out*/);
-H5_DLL herr_t H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
-H5_DLL herr_t H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
-H5_DLL herr_t H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, H5B_operator_t op, void *udata);
-H5_DLL herr_t H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, H5B_info_t *bt_info, H5B_operator_t op, void *udata);
-H5_DLL herr_t H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
-H5_DLL herr_t H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr, void *udata);
-H5_DLL H5B_shared_t *H5B_shared_new(const H5F_t *f, const H5B_class_t *type,
- size_t sizeof_rkey);
-H5_DLL herr_t H5B_shared_free(void *_shared);
-H5_DLL herr_t H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
- int indent, int fwidth, const H5B_class_t *type, void *udata);
-H5_DLL htri_t H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type,
- haddr_t addr);
+H5_DLL herr_t H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
+ haddr_t *addr_p /*out*/);
+H5_DLL herr_t H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata);
+H5_DLL herr_t H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata);
+H5_DLL herr_t H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
+ void *udata);
+H5_DLL herr_t H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
+ H5B_info_t *bt_info, H5B_operator_t op, void *udata);
+H5_DLL herr_t H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata);
+H5_DLL herr_t H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata);
+H5_DLL H5B_shared_t *H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey);
+H5_DLL herr_t H5B_shared_free(void *_shared);
+H5_DLL herr_t H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ const H5B_class_t *type, void *udata);
+H5_DLL htri_t H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr);
#endif /* _H5Bprivate_H */
-
diff --git a/src/H5Bpublic.h b/src/H5Bpublic.h
index 1764f61..688b824 100644
--- a/src/H5Bpublic.h
+++ b/src/H5Bpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/src/H5C.c b/src/H5C.c
index b3f76dc..4471891 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,74 +19,72 @@
*
* Purpose: Functions in this file implement a generic cache for
* things which exist on disk, and which may be
- * unambiguously referenced by their disk addresses.
+ * unambiguously referenced by their disk addresses.
*
* The code in this module was initially written in
- * support of a complete re-write of the metadata cache
- * in H5AC.c However, other uses for the cache code
- * suggested themselves, and thus this file was created
- * in an attempt to support re-use.
+ * support of a complete re-write of the metadata cache
+ * in H5AC.c However, other uses for the cache code
+ * suggested themselves, and thus this file was created
+ * in an attempt to support re-use.
*
- * For a detailed overview of the cache, please see the
- * header comment for H5C_t in H5Cpkg.h.
+ * For a detailed overview of the cache, please see the
+ * header comment for H5C_t in H5Cpkg.h.
*
*-------------------------------------------------------------------------
*/
/**************************************************************************
*
- * To Do:
+ * To Do:
*
- * Code Changes:
+ * Code Changes:
*
- * - Remove extra functionality in H5C_flush_single_entry()?
+ * - Remove extra functionality in H5C_flush_single_entry()?
*
- * - Change protect/unprotect to lock/unlock.
+ * - Change protect/unprotect to lock/unlock.
*
- * - Flush entries in increasing address order in
- * H5C_make_space_in_cache().
+ * - Flush entries in increasing address order in
+ * H5C_make_space_in_cache().
*
- * - Also in H5C_make_space_in_cache(), use high and low water marks
- * to reduce the number of I/O calls.
+ * - Also in H5C_make_space_in_cache(), use high and low water marks
+ * to reduce the number of I/O calls.
*
- * - When flushing, attempt to combine contiguous entries to reduce
- * I/O overhead. Can't do this just yet as some entries are not
- * contiguous. Do this in parallel only or in serial as well?
+ * - When flushing, attempt to combine contiguous entries to reduce
+ * I/O overhead. Can't do this just yet as some entries are not
+ * contiguous. Do this in parallel only or in serial as well?
*
- * - Create MPI type for dirty objects when flushing in parallel.
+ * - Create MPI type for dirty objects when flushing in parallel.
*
- * - Now that TBBT routines aren't used, fix nodes in memory to
+ * - Now that TBBT routines aren't used, fix nodes in memory to
* point directly to the skip list node from the LRU list, eliminating
* skip list lookups when evicting objects from the cache.
*
- * Tests:
+ * Tests:
*
- * - Trim execution time. (This is no longer a major issue with the
- * shift from the TBBT to a hash table for indexing.)
+ * - Trim execution time. (This is no longer a major issue with the
+ * shift from the TBBT to a hash table for indexing.)
*
- * - Add random tests.
+ * - Add random tests.
*
**************************************************************************/
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#ifdef H5_HAVE_PARALLEL
-#include "H5ACprivate.h" /* Metadata cache */
-#endif /* H5_HAVE_PARALLEL */
-#include "H5Cpkg.h" /* Cache */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SLprivate.h" /* Skip lists */
-
+#include "H5ACprivate.h" /* Metadata cache */
+#endif /* H5_HAVE_PARALLEL */
+#include "H5Cpkg.h" /* Cache */
+#include "H5Dprivate.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
/*
* Private file-scope variables.
@@ -95,77 +93,49 @@
/* Declare a free list to manage the H5C_t struct */
H5FL_DEFINE_STATIC(H5C_t);
-
/*
* Private file-scope function declarations:
*/
-static herr_t H5C__auto_adjust_cache_size(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr);
-
-static herr_t H5C__autoadjust__ageout(H5F_t * f,
- double hit_rate,
- enum H5C_resize_status * status_ptr,
- size_t * new_max_cache_size_ptr,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr);
-
-static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr);
-
-static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr);
-
-static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr);
-
-static herr_t H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr);
-
-static herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr);
-
-static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr,
- size_t old_entry_size,
- size_t new_entry_size);
-
-static herr_t H5C_flush_single_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type_ptr,
- haddr_t addr,
- unsigned flags,
- hbool_t * first_flush_ptr,
- hbool_t del_entry_from_slist_on_destroy);
-
-static herr_t H5C_flush_invalidate_cache(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- unsigned flags);
-
-static void * H5C_load_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * udata);
-
-static herr_t H5C_make_space_in_cache(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- size_t space_needed,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr);
+static herr_t H5C__auto_adjust_cache_size(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ hbool_t write_permitted, hbool_t *first_flush_ptr);
+
+static herr_t H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *status_ptr,
+ size_t *new_max_cache_size_ptr, hid_t primary_dxpl_id,
+ hid_t secondary_dxpl_id, hbool_t write_permitted,
+ hbool_t *first_flush_ptr);
+
+static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr);
+
+static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hid_t primary_dxpl_id,
+ hid_t secondary_dxpl_id,
+ hbool_t write_permitted,
+ hbool_t *first_flush_ptr);
+
+static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr);
+
+static herr_t H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr);
+
+static herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr);
+
+static herr_t H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t new_entry_size);
+
+static herr_t H5C_flush_single_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ const H5C_class_t *type_ptr, haddr_t addr, unsigned flags,
+ hbool_t *first_flush_ptr, hbool_t del_entry_from_slist_on_destroy);
+
+static herr_t H5C_flush_invalidate_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ unsigned flags);
+
+static void *H5C_load_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, haddr_t addr, void *udata);
+
+static herr_t H5C_make_space_in_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ size_t space_needed, hbool_t write_permitted, hbool_t *first_flush_ptr);
#if H5C_DO_EXTREME_SANITY_CHECKS
-static herr_t H5C_validate_lru_list(H5C_t * cache_ptr);
-static herr_t H5C_verify_not_in_index(H5C_t * cache_ptr,
- H5C_cache_entry_t * entry_ptr);
+static herr_t H5C_validate_lru_list(H5C_t *cache_ptr);
+static herr_t H5C_verify_not_in_index(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr);
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
/****************************************************************************
*
* #defines and declarations for epoch marker cache entries.
@@ -181,27 +151,23 @@ static herr_t H5C_verify_not_in_index(H5C_t * cache_ptr,
* it is needed to dimension arrays in H5C_t.
*/
-#define H5C__EPOCH_MARKER_TYPE H5C__MAX_NUM_TYPE_IDS
+#define H5C__EPOCH_MARKER_TYPE H5C__MAX_NUM_TYPE_IDS
-static void *H5C_epoch_marker_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- void *udata);
-static herr_t H5C_epoch_marker_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
- haddr_t addr, void *thing,
- unsigned *flags_ptr);
+static void * H5C_epoch_marker_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+static herr_t H5C_epoch_marker_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing,
+ unsigned *flags_ptr);
static herr_t H5C_epoch_marker_dest(H5F_t *f, void *thing);
static herr_t H5C_epoch_marker_clear(H5F_t *f, void *thing, hbool_t dest);
static herr_t H5C_epoch_marker_notify(H5C_notify_action_t action, void *thing);
static herr_t H5C_epoch_marker_size(const H5F_t *f, const void *thing, size_t *size_ptr);
-const H5C_class_t epoch_marker_class =
-{
+const H5C_class_t epoch_marker_class = {
/* id = */ H5C__EPOCH_MARKER_TYPE,
/* load = */ &H5C_epoch_marker_load,
/* flush = */ &H5C_epoch_marker_flush,
/* dest = */ &H5C_epoch_marker_dest,
/* clear = */ &H5C_epoch_marker_clear,
- /* size = */ &H5C_epoch_marker_size
-};
+ /* size = */ &H5C_epoch_marker_size};
/***************************************************************************
* Class functions for H5C__EPOCH_MAKER_TYPE:
@@ -213,12 +179,10 @@ const H5C_class_t epoch_marker_class =
***************************************************************************/
static void *
-H5C_epoch_marker_load(H5F_t H5_ATTR_UNUSED * f,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t H5_ATTR_UNUSED addr,
- void H5_ATTR_UNUSED * udata)
+H5C_epoch_marker_load(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr,
+ void H5_ATTR_UNUSED *udata)
{
- void * ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -230,14 +194,11 @@ done:
}
static herr_t
-H5C_epoch_marker_flush(H5F_t H5_ATTR_UNUSED *f,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED dest,
- haddr_t H5_ATTR_UNUSED addr,
- void H5_ATTR_UNUSED *thing,
- unsigned H5_ATTR_UNUSED * flags_ptr)
+H5C_epoch_marker_flush(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED dest,
+ haddr_t H5_ATTR_UNUSED addr, void H5_ATTR_UNUSED *thing,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = FAIL; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -249,10 +210,9 @@ done:
}
static herr_t
-H5C_epoch_marker_dest(H5F_t H5_ATTR_UNUSED * f,
- void H5_ATTR_UNUSED * thing)
+H5C_epoch_marker_dest(H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *thing)
{
- herr_t ret_value = FAIL; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -264,11 +224,9 @@ done:
}
static herr_t
-H5C_epoch_marker_clear(H5F_t H5_ATTR_UNUSED * f,
- void H5_ATTR_UNUSED * thing,
- hbool_t H5_ATTR_UNUSED dest)
+H5C_epoch_marker_clear(H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *thing, hbool_t H5_ATTR_UNUSED dest)
{
- herr_t ret_value = FAIL; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -280,10 +238,9 @@ done:
}
static herr_t
-H5C_epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action,
- void H5_ATTR_UNUSED * thing)
+H5C_epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, void H5_ATTR_UNUSED *thing)
{
- herr_t ret_value = FAIL; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -294,11 +251,10 @@ done:
}
static herr_t
-H5C_epoch_marker_size(const H5F_t H5_ATTR_UNUSED * f,
- const void H5_ATTR_UNUSED * thing,
- size_t H5_ATTR_UNUSED * size_ptr)
+H5C_epoch_marker_size(const H5F_t H5_ATTR_UNUSED *f, const void H5_ATTR_UNUSED *thing,
+ size_t H5_ATTR_UNUSED *size_ptr)
{
- herr_t ret_value = FAIL; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -309,80 +265,79 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5C_apply_candidate_list
*
* Purpose: Apply the supplied candidate list.
*
- * We used to do this by simply having each process write
- * every mpi_size-th entry in the candidate list, starting
- * at index mpi_rank, and mark all the others clean.
+ * We used to do this by simply having each process write
+ * every mpi_size-th entry in the candidate list, starting
+ * at index mpi_rank, and mark all the others clean.
+ *
+ * However, this can cause unnecessary contention in a file
+ * system by increasing the number of processes writing to
+ * adjacent locations in the HDF5 file.
*
- * However, this can cause unnecessary contention in a file
- * system by increasing the number of processes writing to
- * adjacent locations in the HDF5 file.
+ * To attempt to minimize this, we now arange matters such
+ * that each process writes n adjacent entries in the
+ * candidate list, and marks all others clean. We must do
+ * this in such a fashion as to guarantee that each entry
+ * on the candidate list is written by exactly one process,
+ * and marked clean by all others.
*
- * To attempt to minimize this, we now arange matters such
- * that each process writes n adjacent entries in the
- * candidate list, and marks all others clean. We must do
- * this in such a fashion as to guarantee that each entry
- * on the candidate list is written by exactly one process,
- * and marked clean by all others.
+ * To do this, first construct a table mapping mpi_rank
+ * to the index of the first entry in the candidate list to
+ * be written by the process of that mpi_rank, and then use
+ * the table to control which entries are written and which
+ * are marked as clean as a function of the mpi_rank.
*
- * To do this, first construct a table mapping mpi_rank
- * to the index of the first entry in the candidate list to
- * be written by the process of that mpi_rank, and then use
- * the table to control which entries are written and which
- * are marked as clean as a function of the mpi_rank.
+ * Note that the table must be identical on all processes, as
+ * all see the same candidate list, mpi_size, and mpi_rank --
+ * the inputs used to construct the table.
*
- * Note that the table must be identical on all processes, as
- * all see the same candidate list, mpi_size, and mpi_rank --
- * the inputs used to construct the table.
+ * We construct the table as follows. Let:
*
- * We construct the table as follows. Let:
+ * n = num_candidates / mpi_size;
*
- * n = num_candidates / mpi_size;
+ * m = num_candidates % mpi_size;
*
- * m = num_candidates % mpi_size;
+ * Now allocate an array of integers of length mpi_size + 1,
+ * and call this array candidate_assignment_table.
*
- * Now allocate an array of integers of length mpi_size + 1,
- * and call this array candidate_assignment_table.
+ * Conceptually, if the number of candidates is a multiple
+ * of the mpi_size, we simply pass through the candidate list
+ * and assign n entries to each process to flush, with the
+ * index of the first entry to flush in the location in
+ * the candidate_assignment_table indicated by the mpi_rank
+ * of the process.
*
- * Conceptually, if the number of candidates is a multiple
- * of the mpi_size, we simply pass through the candidate list
- * and assign n entries to each process to flush, with the
- * index of the first entry to flush in the location in
- * the candidate_assignment_table indicated by the mpi_rank
- * of the process.
+ * In the more common case in which the candidate list isn't
+ * isn't a multiple of the mpi_size, we pretend it is, and
+ * give num_candidates % mpi_size processes one extra entry
+ * each to make things work out.
*
- * In the more common case in which the candidate list isn't
- * isn't a multiple of the mpi_size, we pretend it is, and
- * give num_candidates % mpi_size processes one extra entry
- * each to make things work out.
+ * Once the table is constructed, we determine the first and
+ * last entry this process is to flush as follows:
*
- * Once the table is constructed, we determine the first and
- * last entry this process is to flush as follows:
+ * first_entry_to_flush = candidate_assignment_table[mpi_rank]
*
- * first_entry_to_flush = candidate_assignment_table[mpi_rank]
+ * last_entry_to_flush =
+ * candidate_assignment_table[mpi_rank + 1] - 1;
*
- * last_entry_to_flush =
- * candidate_assignment_table[mpi_rank + 1] - 1;
- *
- * With these values determined, we simply scan through the
- * candidate list, marking all entries in the range
- * [first_entry_to_flush, last_entry_to_flush] for flush,
- * and all others to be cleaned.
+ * With these values determined, we simply scan through the
+ * candidate list, marking all entries in the range
+ * [first_entry_to_flush, last_entry_to_flush] for flush,
+ * and all others to be cleaned.
*
- * Finally, we scan the LRU from tail to head, flushing
- * or marking clean the candidate entries as indicated.
- * If necessary, we scan the pinned list as well.
+ * Finally, we scan the LRU from tail to head, flushing
+ * or marking clean the candidate entries as indicated.
+ * If necessary, we scan the pinned list as well.
*
- * Note that this function will fail if any protected or
- * clean entries appear on the candidate list.
+ * Note that this function will fail if any protected or
+ * clean entries appear on the candidate list.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -393,68 +348,60 @@ done:
*
* Modifications:
*
- * Heavily reworked to have each process flush a group of
- * adjacent entries.
- * JRM -- 4/15/10
+ * Heavily reworked to have each process flush a group of
+ * adjacent entries.
+ * JRM -- 4/15/10
*
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_PARALLEL
#define H5C_APPLY_CANDIDATE_LIST__DEBUG 0
herr_t
-H5C_apply_candidate_list(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
- int num_candidates,
- haddr_t * candidates_list_ptr,
- int mpi_rank,
- int mpi_size)
+H5C_apply_candidate_list(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, H5C_t *cache_ptr,
+ int num_candidates, haddr_t *candidates_list_ptr, int mpi_rank, int mpi_size)
{
- hbool_t first_flush = FALSE;
- int i;
- int m;
- int n;
- int first_entry_to_flush;
- int last_entry_to_flush;
- int entries_to_clear = 0;
- int entries_to_flush = 0;
- int entries_cleared = 0;
- int entries_flushed = 0;
- int entries_examined = 0;
- int initial_list_len;
- int * candidate_assignment_table = NULL;
- haddr_t addr;
- H5C_cache_entry_t * clear_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * flush_ptr = NULL;
+ hbool_t first_flush = FALSE;
+ int i;
+ int m;
+ int n;
+ int first_entry_to_flush;
+ int last_entry_to_flush;
+ int entries_to_clear = 0;
+ int entries_to_flush = 0;
+ int entries_cleared = 0;
+ int entries_flushed = 0;
+ int entries_examined = 0;
+ int initial_list_len;
+ int * candidate_assignment_table = NULL;
+ haddr_t addr;
+ H5C_cache_entry_t *clear_ptr = NULL;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ H5C_cache_entry_t *flush_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- haddr_t last_addr;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- char tbl_buf[1024];
-#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- herr_t ret_value = SUCCEED; /* Return value */
+ char tbl_buf[1024];
+#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( num_candidates > 0 );
- HDassert( num_candidates <= cache_ptr->slist_len );
- HDassert( candidates_list_ptr != NULL );
- HDassert( 0 <= mpi_rank );
- HDassert( mpi_rank < mpi_size );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(num_candidates > 0);
+ HDassert(num_candidates <= cache_ptr->slist_len);
+ HDassert(candidates_list_ptr != NULL);
+ HDassert(0 <= mpi_rank);
+ HDassert(mpi_rank < mpi_size);
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n",
- FUNC, mpi_rank);
- for ( i = 0; i < 1024; i++ ) tbl_buf[i] = '\0';
+ HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", FUNC, mpi_rank);
+ for (i = 0; i < 1024; i++)
+ tbl_buf[i] = '\0';
sprintf(&(tbl_buf[0]), "candidate list = ");
- for ( i = 0; i < num_candidates; i++ )
- {
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx",
- (long long)(*(candidates_list_ptr + i)));
+ for (i = 0; i < num_candidates; i++) {
+ sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + i)));
}
sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
@@ -464,74 +411,75 @@ H5C_apply_candidate_list(H5F_t * f,
m = num_candidates % mpi_size;
HDassert(n >= 0);
- if(NULL == (candidate_assignment_table = (int *)H5MM_malloc(sizeof(int) * (size_t)(mpi_size + 1))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for candidate assignment table")
+ if (NULL == (candidate_assignment_table = (int *)H5MM_malloc(sizeof(int) * (size_t)(mpi_size + 1))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for candidate assignment table")
- candidate_assignment_table[0] = 0;
+ candidate_assignment_table[0] = 0;
candidate_assignment_table[mpi_size] = num_candidates;
- if(m == 0) { /* mpi_size is an even divisor of num_candidates */
+ if (m == 0) { /* mpi_size is an even divisor of num_candidates */
HDassert(n > 0);
- for(i = 1; i < mpi_size; i++)
+ for (i = 1; i < mpi_size; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n;
} /* end if */
- else {
- for(i = 1; i <= m; i++)
+ else {
+ for (i = 1; i <= m; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n + 1;
- if(num_candidates < mpi_size) {
- for(i = m + 1; i < mpi_size; i++)
+ if (num_candidates < mpi_size) {
+ for (i = m + 1; i < mpi_size; i++)
candidate_assignment_table[i] = num_candidates;
} /* end if */
else {
- for(i = m + 1; i < mpi_size; i++)
+ for (i = m + 1; i < mpi_size; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n;
} /* end else */
- } /* end else */
+ } /* end else */
HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
#if H5C_DO_SANITY_CHECKS
/* verify that the candidate assignment table has the expected form */
- for ( i = 1; i < mpi_size - 1; i++ )
- {
+ for (i = 1; i < mpi_size - 1; i++) {
int a, b;
a = candidate_assignment_table[i] - candidate_assignment_table[i - 1];
b = candidate_assignment_table[i + 1] - candidate_assignment_table[i];
- HDassert( n + 1 >= a );
- HDassert( a >= b );
- HDassert( b >= n );
+ HDassert(n + 1 >= a);
+ HDassert(a >= b);
+ HDassert(b >= n);
}
#endif /* H5C_DO_SANITY_CHECKS */
first_entry_to_flush = candidate_assignment_table[mpi_rank];
- last_entry_to_flush = candidate_assignment_table[mpi_rank + 1] - 1;
+ last_entry_to_flush = candidate_assignment_table[mpi_rank + 1] - 1;
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- for ( i = 0; i < 1024; i++ )
+ for (i = 0; i < 1024; i++)
tbl_buf[i] = '\0';
sprintf(&(tbl_buf[0]), "candidate assignment table = ");
- for(i = 0; i <= mpi_size; i++)
+ for (i = 0; i <= mpi_size; i++)
sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]);
sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%d, %d].\n",
- FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush);
+ HDfprintf(stdout, "%s:%d: flush entries [%d, %d].\n", FUNC, mpi_rank, first_entry_to_flush,
+ last_entry_to_flush);
HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- for(i = 0; i < num_candidates; i++) {
+ for (i = 0; i < num_candidates; i++) {
addr = candidates_list_ptr[i];
- HDassert( H5F_addr_defined(addr) );
+ HDassert(H5F_addr_defined(addr));
#if H5C_DO_SANITY_CHECKS
- if ( i > 0 ) {
- if ( last_addr == addr ) {
+ if (i > 0) {
+ if (last_addr == addr) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list.\n")
- } else if ( last_addr > addr ) {
+ }
+ else if (last_addr > addr) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "candidate list not sorted.\n")
}
}
@@ -540,23 +488,26 @@ H5C_apply_candidate_list(H5F_t * f,
#endif /* H5C_DO_SANITY_CHECKS */
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
- if(entry_ptr == NULL) {
+ if (entry_ptr == NULL) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed candidate entry not in cache?!?!?.")
- } else if(!entry_ptr->is_dirty) {
+ }
+ else if (!entry_ptr->is_dirty) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?.")
- } else if ( entry_ptr->is_protected ) {
+ }
+ else if (entry_ptr->is_protected) {
/* For now at least, we can't deal with protected entries.
* If we encounter one, scream and die. If it becomes an
- * issue, we should be able to work around this.
+ * issue, we should be able to work around this.
*/
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?.")
- } else {
+ }
+ else {
/* determine whether the entry is to be cleared or flushed,
- * and mark it accordingly. We will scan the protected and
+ * and mark it accordingly. We will scan the protected and
* pinned list shortly, and clear or flush according to these
- * markings.
+ * markings.
*/
- if((i >= first_entry_to_flush) && (i <= last_entry_to_flush)) {
+ if ((i >= first_entry_to_flush) && (i <= last_entry_to_flush)) {
entries_to_flush++;
entry_ptr->flush_immediately = TRUE;
} /* end if */
@@ -564,17 +515,15 @@ H5C_apply_candidate_list(H5F_t * f,
entries_to_clear++;
entry_ptr->clear_on_unprotect = TRUE;
} /* end else */
- } /* end else */
- } /* end for */
+ } /* end else */
+ } /* end for */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %d/%d/%d.\n",
- FUNC, mpi_rank, (int)num_candidates, (int)entries_to_clear,
- (int)entries_to_flush);
+ HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %d/%d/%d.\n", FUNC, mpi_rank,
+ (int)num_candidates, (int)entries_to_clear, (int)entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
-
- /* We have now marked all the entries on the candidate list for
+ /* We have now marked all the entries on the candidate list for
* either flush or clear -- now scan the LRU and the pinned list
* for these entries and do the deed.
*
@@ -591,51 +540,39 @@ H5C_apply_candidate_list(H5F_t * f,
entries_examined = 0;
initial_list_len = cache_ptr->LRU_list_len;
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ entry_ptr = cache_ptr->LRU_tail_ptr;
- while((entry_ptr != NULL) && (entries_examined <= initial_list_len) &&
- ((entries_cleared + entries_flushed) < num_candidates)) {
- if(entry_ptr->clear_on_unprotect) {
+ while ((entry_ptr != NULL) && (entries_examined <= initial_list_len) &&
+ ((entries_cleared + entries_flushed) < num_candidates)) {
+ if (entry_ptr->clear_on_unprotect) {
entry_ptr->clear_on_unprotect = FALSE;
- clear_ptr = entry_ptr;
- entry_ptr = entry_ptr->prev;
+ clear_ptr = entry_ptr;
+ entry_ptr = entry_ptr->prev;
entries_cleared++;
-#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
- HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank,
- (long long)clear_ptr->addr);
+#if (H5C_APPLY_CANDIDATE_LIST__DEBUG > 1)
+ HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, (long long)clear_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- if(H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- &first_flush,
- TRUE) < 0)
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, clear_ptr->type,
+ clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, &first_flush, TRUE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
- } else if(entry_ptr->flush_immediately) {
+ }
+ else if (entry_ptr->flush_immediately) {
entry_ptr->flush_immediately = FALSE;
- flush_ptr = entry_ptr;
- entry_ptr = entry_ptr->prev;
+ flush_ptr = entry_ptr;
+ entry_ptr = entry_ptr->prev;
entries_flushed++;
-#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
- HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank,
- (long long)flush_ptr->addr);
+#if (H5C_APPLY_CANDIDATE_LIST__DEBUG > 1)
+ HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, (long long)flush_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- if(H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- flush_ptr->type,
- flush_ptr->addr,
- H5C__NO_FLAGS_SET,
- &first_flush,
- TRUE) < 0)
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, flush_ptr->type,
+ flush_ptr->addr, H5C__NO_FLAGS_SET, &first_flush, TRUE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
- } else {
+ }
+ else {
entry_ptr = entry_ptr->prev;
}
@@ -643,9 +580,8 @@ H5C_apply_candidate_list(H5F_t * f,
} /* end while */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %d/%d/%d.\n",
- FUNC, mpi_rank, entries_examined,
- entries_cleared, entries_flushed);
+ HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %d/%d/%d.\n", FUNC, mpi_rank,
+ entries_examined, entries_cleared, entries_flushed);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
/* It is also possible that some of the cleared entries are on the
@@ -653,88 +589,72 @@ H5C_apply_candidate_list(H5F_t * f,
*/
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: scanning pinned entry list. len = %d\n",
- FUNC, mpi_rank, (int)(cache_ptr->pel_len));
+ HDfprintf(stdout, "%s:%d: scanning pinned entry list. len = %d\n", FUNC, mpi_rank,
+ (int)(cache_ptr->pel_len));
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
entry_ptr = cache_ptr->pel_head_ptr;
- while((entry_ptr != NULL) &&
- ((entries_cleared + entries_flushed) < num_candidates)) {
- if(entry_ptr->clear_on_unprotect) {
+ while ((entry_ptr != NULL) && ((entries_cleared + entries_flushed) < num_candidates)) {
+ if (entry_ptr->clear_on_unprotect) {
entry_ptr->clear_on_unprotect = FALSE;
- clear_ptr = entry_ptr;
- entry_ptr = entry_ptr->next;
+ clear_ptr = entry_ptr;
+ entry_ptr = entry_ptr->next;
entries_cleared++;
-#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
- HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank,
- (long long)clear_ptr->addr);
+#if (H5C_APPLY_CANDIDATE_LIST__DEBUG > 1)
+ HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, (long long)clear_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- if(H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- &first_flush,
- TRUE) < 0)
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, clear_ptr->type,
+ clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, &first_flush, TRUE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
- } else if(entry_ptr->flush_immediately) {
+ }
+ else if (entry_ptr->flush_immediately) {
entry_ptr->flush_immediately = FALSE;
- flush_ptr = entry_ptr;
- entry_ptr = entry_ptr->next;
+ flush_ptr = entry_ptr;
+ entry_ptr = entry_ptr->next;
entries_flushed++;
-#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
- HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank,
- (long long)flush_ptr->addr);
+#if (H5C_APPLY_CANDIDATE_LIST__DEBUG > 1)
+ HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, (long long)flush_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- if(H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- flush_ptr->type,
- flush_ptr->addr,
- H5C__NO_FLAGS_SET,
- &first_flush,
- TRUE) < 0)
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, flush_ptr->type,
+ flush_ptr->addr, H5C__NO_FLAGS_SET, &first_flush, TRUE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
- } else {
+ }
+ else {
entry_ptr = entry_ptr->next;
}
} /* end while */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout,
- "%s:%d: pel entries examined/cleared/flushed = %d/%d/%d.\n",
- FUNC, mpi_rank, entries_examined,
- entries_cleared, entries_flushed);
+ HDfprintf(stdout, "%s:%d: pel entries examined/cleared/flushed = %d/%d/%d.\n", FUNC, mpi_rank,
+ entries_examined, entries_cleared, entries_flushed);
HDfprintf(stdout, "%s:%d: done.\n", FUNC, mpi_rank);
HDfsync(stdout);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- if((entries_flushed != entries_to_flush) || (entries_cleared != entries_to_clear))
+ if ((entries_flushed != entries_to_flush) || (entries_cleared != entries_to_clear))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry count mismatch.")
done:
- if(candidate_assignment_table != NULL)
+ if (candidate_assignment_table != NULL)
candidate_assignment_table = (int *)H5MM_xfree((void *)candidate_assignment_table);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_apply_candidate_list() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__clean_cache
*
- * Purpose: Construct the list of entries that should be flushed to
- * clean all entries in the cache.
+ * Purpose: Construct the list of entries that should be flushed to
+ * clean all entries in the cache.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -747,15 +667,15 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
+H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
{
- size_t space_needed;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t space_needed;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* As a sanity check, set space needed to the size of the skip list.
* This should be the sum total of the sizes of all the dirty entries
@@ -767,58 +687,54 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
* point, it is possible that some dirty entries may reside on the
* pinned list at this point.
*/
- HDassert( cache_ptr->slist_size <=
- (cache_ptr->dLRU_list_size + cache_ptr->pel_size) );
- HDassert( cache_ptr->slist_len <=
- (cache_ptr->dLRU_list_len + cache_ptr->pel_len) );
+ HDassert(cache_ptr->slist_size <= (cache_ptr->dLRU_list_size + cache_ptr->pel_size));
+ HDassert(cache_ptr->slist_len <= (cache_ptr->dLRU_list_len + cache_ptr->pel_len));
- if(space_needed > 0) { /* we have work to do */
+ if (space_needed > 0) { /* we have work to do */
H5C_cache_entry_t *entry_ptr;
- int nominated_entries_count = 0;
- size_t nominated_entries_size = 0;
- haddr_t nominated_addr;
+ int nominated_entries_count = 0;
+ size_t nominated_entries_size = 0;
+ haddr_t nominated_addr;
- HDassert( cache_ptr->slist_len > 0 );
+ HDassert(cache_ptr->slist_len > 0);
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
- while((nominated_entries_size < space_needed) &&
- (nominated_entries_count < cache_ptr->slist_len) &&
- (entry_ptr != NULL)) {
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( entry_ptr->ro_ref_count == 0 );
- HDassert( entry_ptr->is_dirty );
- HDassert( entry_ptr->in_slist );
+ while ((nominated_entries_size < space_needed) && (nominated_entries_count < cache_ptr->slist_len) &&
+ (entry_ptr != NULL)) {
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert(entry_ptr->ro_ref_count == 0);
+ HDassert(entry_ptr->is_dirty);
+ HDassert(entry_ptr->in_slist);
nominated_addr = entry_ptr->addr;
- if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
+ if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(1).")
nominated_entries_size += entry_ptr->size;
nominated_entries_count++;
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert( entry_ptr == NULL );
+ HDassert(entry_ptr == NULL);
- /* it is possible that there are some dirty entries on the
+ /* it is possible that there are some dirty entries on the
* protected entry list as well -- scan it too if necessary
*/
entry_ptr = cache_ptr->pel_head_ptr;
- while((nominated_entries_size < space_needed) &&
- (nominated_entries_count < cache_ptr->slist_len) &&
- (entry_ptr != NULL)) {
- if(entry_ptr->is_dirty) {
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( entry_ptr->ro_ref_count == 0 );
- HDassert( entry_ptr->is_dirty );
- HDassert( entry_ptr->in_slist );
+ while ((nominated_entries_size < space_needed) && (nominated_entries_count < cache_ptr->slist_len) &&
+ (entry_ptr != NULL)) {
+ if (entry_ptr->is_dirty) {
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert(entry_ptr->ro_ref_count == 0);
+ HDassert(entry_ptr->is_dirty);
+ HDassert(entry_ptr->in_slist);
nominated_addr = entry_ptr->addr;
- if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
+ if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(2).")
nominated_entries_size += entry_ptr->size;
@@ -828,8 +744,8 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
entry_ptr = entry_ptr->next;
} /* end while */
- HDassert( nominated_entries_count == cache_ptr->slist_len );
- HDassert( nominated_entries_size == space_needed );
+ HDassert(nominated_entries_count == cache_ptr->slist_len);
+ HDassert(nominated_entries_size == space_needed);
} /* end if */
done:
@@ -837,15 +753,14 @@ done:
} /* H5C_construct_candidate_list__clean_cache() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__min_clean
*
- * Purpose: Construct the list of entries that should be flushed to
- * get the cache back within its min clean constraints.
+ * Purpose: Construct the list of entries that should be flushed to
+ * get the cache back within its min clean constraints.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -858,68 +773,65 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
+H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
{
- size_t space_needed = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t space_needed = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- /* compute the number of bytes (if any) that must be flushed to get the
+ /* compute the number of bytes (if any) that must be flushed to get the
* cache back within its min clean constraints.
*/
- if(cache_ptr->max_cache_size > cache_ptr->index_size) {
- if(((cache_ptr->max_cache_size - cache_ptr->index_size) +
- cache_ptr->cLRU_list_size) >= cache_ptr->min_clean_size)
+ if (cache_ptr->max_cache_size > cache_ptr->index_size) {
+ if (((cache_ptr->max_cache_size - cache_ptr->index_size) + cache_ptr->cLRU_list_size) >=
+ cache_ptr->min_clean_size)
space_needed = 0;
else
space_needed = cache_ptr->min_clean_size -
- ((cache_ptr->max_cache_size - cache_ptr->index_size) +
- cache_ptr->cLRU_list_size);
+ ((cache_ptr->max_cache_size - cache_ptr->index_size) + cache_ptr->cLRU_list_size);
} /* end if */
else {
- if(cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size)
- space_needed = 0;
+ if (cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size)
+ space_needed = 0;
else
- space_needed = cache_ptr->min_clean_size -
- cache_ptr->cLRU_list_size;
+ space_needed = cache_ptr->min_clean_size - cache_ptr->cLRU_list_size;
} /* end else */
- if(space_needed > 0) { /* we have work to do */
+ if (space_needed > 0) { /* we have work to do */
H5C_cache_entry_t *entry_ptr;
- int nominated_entries_count = 0;
- size_t nominated_entries_size = 0;
+ int nominated_entries_count = 0;
+ size_t nominated_entries_size = 0;
- HDassert( cache_ptr->slist_len > 0 );
+ HDassert(cache_ptr->slist_len > 0);
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
- while((nominated_entries_size < space_needed) &&
- (nominated_entries_count < cache_ptr->slist_len) &&
- (entry_ptr != NULL)) {
- haddr_t nominated_addr;
+ while ((nominated_entries_size < space_needed) && (nominated_entries_count < cache_ptr->slist_len) &&
+ (entry_ptr != NULL)) {
+ haddr_t nominated_addr;
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( entry_ptr->ro_ref_count == 0 );
- HDassert( entry_ptr->is_dirty );
- HDassert( entry_ptr->in_slist );
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert(entry_ptr->ro_ref_count == 0);
+ HDassert(entry_ptr->is_dirty);
+ HDassert(entry_ptr->in_slist);
nominated_addr = entry_ptr->addr;
- if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
+ if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed.")
nominated_entries_size += entry_ptr->size;
nominated_entries_count++;
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert( nominated_entries_count <= cache_ptr->slist_len );
- HDassert( nominated_entries_size >= space_needed );
+ HDassert(nominated_entries_count <= cache_ptr->slist_len);
+ HDassert(nominated_entries_size >= space_needed);
} /* end if */
done:
@@ -927,21 +839,20 @@ done:
} /* H5C_construct_candidate_list__min_clean() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5C_create
*
* Purpose: Allocate, initialize, and return the address of a new
- * instance of H5C_t.
+ * instance of H5C_t.
*
- * In general, the max_cache_size parameter must be positive,
- * and the min_clean_size parameter must lie in the closed
- * interval [0, max_cache_size].
+ * In general, the max_cache_size parameter must be positive,
+ * and the min_clean_size parameter must lie in the closed
+ * interval [0, max_cache_size].
*
- * The check_write_permitted parameter must either be NULL,
- * or point to a function of type H5C_write_permitted_func_t.
- * If it is NULL, the cache will use the write_permitted
- * flag to determine whether writes are permitted.
+ * The check_write_permitted parameter must either be NULL,
+ * or point to a function of type H5C_write_permitted_func_t.
+ * If it is NULL, the cache will use the write_permitted
+ * flag to determine whether writes are permitted.
*
* Return: Success: Pointer to the new instance.
*
@@ -953,44 +864,38 @@ done:
*-------------------------------------------------------------------------
*/
H5C_t *
-H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
- const char * (* type_name_table_ptr),
- H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
- H5C_log_flush_func_t log_flush,
- void * aux_ptr)
+H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id, const char *(*type_name_table_ptr),
+ H5C_write_permitted_func_t check_write_permitted, hbool_t write_permitted,
+ H5C_log_flush_func_t log_flush, void *aux_ptr)
{
- int i;
- H5C_t * cache_ptr = NULL;
- H5C_t * ret_value = NULL; /* Return value */
+ int i;
+ H5C_t *cache_ptr = NULL;
+ H5C_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
- HDassert( max_cache_size >= H5C__MIN_MAX_CACHE_SIZE );
- HDassert( max_cache_size <= H5C__MAX_MAX_CACHE_SIZE );
- HDassert( min_clean_size <= max_cache_size );
+ HDassert(max_cache_size >= H5C__MIN_MAX_CACHE_SIZE);
+ HDassert(max_cache_size <= H5C__MAX_MAX_CACHE_SIZE);
+ HDassert(min_clean_size <= max_cache_size);
- HDassert( max_type_id >= 0 );
- HDassert( max_type_id < H5C__MAX_NUM_TYPE_IDS );
- HDassert( type_name_table_ptr );
+ HDassert(max_type_id >= 0);
+ HDassert(max_type_id < H5C__MAX_NUM_TYPE_IDS);
+ HDassert(type_name_table_ptr);
- HDassert( ( write_permitted == TRUE ) || ( write_permitted == FALSE ) );
+ HDassert((write_permitted == TRUE) || (write_permitted == FALSE));
- for ( i = 0; i <= max_type_id; i++ ) {
+ for (i = 0; i <= max_type_id; i++) {
- HDassert( (type_name_table_ptr)[i] );
- HDassert( HDstrlen(( type_name_table_ptr)[i]) > 0 );
+ HDassert((type_name_table_ptr)[i]);
+ HDassert(HDstrlen((type_name_table_ptr)[i]) > 0);
}
- if ( NULL == (cache_ptr = H5FL_CALLOC(H5C_t)) ) {
+ if (NULL == (cache_ptr = H5FL_CALLOC(H5C_t))) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, \
- "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
}
- if ( (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL ) {
+ if ((cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list.")
}
@@ -999,170 +904,166 @@ H5C_create(size_t max_cache_size,
* the fields.
*/
- cache_ptr->magic = H5C__H5C_T_MAGIC;
+ cache_ptr->magic = H5C__H5C_T_MAGIC;
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = FALSE;
- cache_ptr->trace_file_ptr = NULL;
+ cache_ptr->trace_file_ptr = NULL;
- cache_ptr->aux_ptr = aux_ptr;
+ cache_ptr->aux_ptr = aux_ptr;
- cache_ptr->max_type_id = max_type_id;
+ cache_ptr->max_type_id = max_type_id;
- cache_ptr->type_name_table_ptr = type_name_table_ptr;
+ cache_ptr->type_name_table_ptr = type_name_table_ptr;
- cache_ptr->max_cache_size = max_cache_size;
- cache_ptr->min_clean_size = min_clean_size;
+ cache_ptr->max_cache_size = max_cache_size;
+ cache_ptr->min_clean_size = min_clean_size;
- cache_ptr->check_write_permitted = check_write_permitted;
- cache_ptr->write_permitted = write_permitted;
+ cache_ptr->check_write_permitted = check_write_permitted;
+ cache_ptr->write_permitted = write_permitted;
- cache_ptr->log_flush = log_flush;
+ cache_ptr->log_flush = log_flush;
- cache_ptr->evictions_enabled = TRUE;
+ cache_ptr->evictions_enabled = TRUE;
- cache_ptr->index_len = 0;
- cache_ptr->index_size = (size_t)0;
- cache_ptr->clean_index_size = (size_t)0;
- cache_ptr->dirty_index_size = (size_t)0;
+ cache_ptr->index_len = 0;
+ cache_ptr->index_size = (size_t)0;
+ cache_ptr->clean_index_size = (size_t)0;
+ cache_ptr->dirty_index_size = (size_t)0;
- cache_ptr->slist_len = 0;
- cache_ptr->slist_size = (size_t)0;
+ cache_ptr->slist_len = 0;
+ cache_ptr->slist_size = (size_t)0;
#if H5C_DO_SANITY_CHECKS
- cache_ptr->slist_len_increase = 0;
- cache_ptr->slist_size_increase = 0;
+ cache_ptr->slist_len_increase = 0;
+ cache_ptr->slist_size_increase = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- for ( i = 0; i < H5C__HASH_TABLE_LEN; i++ )
- {
+ for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
(cache_ptr->index)[i] = NULL;
}
- cache_ptr->pl_len = 0;
- cache_ptr->pl_size = (size_t)0;
- cache_ptr->pl_head_ptr = NULL;
- cache_ptr->pl_tail_ptr = NULL;
-
- cache_ptr->pel_len = 0;
- cache_ptr->pel_size = (size_t)0;
- cache_ptr->pel_head_ptr = NULL;
- cache_ptr->pel_tail_ptr = NULL;
-
- cache_ptr->LRU_list_len = 0;
- cache_ptr->LRU_list_size = (size_t)0;
- cache_ptr->LRU_head_ptr = NULL;
- cache_ptr->LRU_tail_ptr = NULL;
-
- cache_ptr->cLRU_list_len = 0;
- cache_ptr->cLRU_list_size = (size_t)0;
- cache_ptr->cLRU_head_ptr = NULL;
- cache_ptr->cLRU_tail_ptr = NULL;
-
- cache_ptr->dLRU_list_len = 0;
- cache_ptr->dLRU_list_size = (size_t)0;
- cache_ptr->dLRU_head_ptr = NULL;
- cache_ptr->dLRU_tail_ptr = NULL;
-
- cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_threshold = 0;
- cache_ptr->size_decrease_possible = FALSE;
- cache_ptr->resize_enabled = FALSE;
- cache_ptr->cache_full = FALSE;
- cache_ptr->size_decreased = FALSE;
-
- (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
- (cache_ptr->resize_ctl).rpt_fcn = NULL;
- (cache_ptr->resize_ctl).set_initial_size = FALSE;
- (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
- (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
- (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
- (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
- (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
-
- (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
- (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
- (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
- (cache_ptr->resize_ctl).apply_max_increment = TRUE;
- (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
-
- (cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
- (cache_ptr->resize_ctl).flash_multiple = 1.0f;
- (cache_ptr->resize_ctl).flash_threshold = 0.25f;
-
- (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
- (cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
- (cache_ptr->resize_ctl).decrement = H5C__DEF_AR_DECREMENT;
- (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
- (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
+ cache_ptr->pl_len = 0;
+ cache_ptr->pl_size = (size_t)0;
+ cache_ptr->pl_head_ptr = NULL;
+ cache_ptr->pl_tail_ptr = NULL;
+
+ cache_ptr->pel_len = 0;
+ cache_ptr->pel_size = (size_t)0;
+ cache_ptr->pel_head_ptr = NULL;
+ cache_ptr->pel_tail_ptr = NULL;
+
+ cache_ptr->LRU_list_len = 0;
+ cache_ptr->LRU_list_size = (size_t)0;
+ cache_ptr->LRU_head_ptr = NULL;
+ cache_ptr->LRU_tail_ptr = NULL;
+
+ cache_ptr->cLRU_list_len = 0;
+ cache_ptr->cLRU_list_size = (size_t)0;
+ cache_ptr->cLRU_head_ptr = NULL;
+ cache_ptr->cLRU_tail_ptr = NULL;
+
+ cache_ptr->dLRU_list_len = 0;
+ cache_ptr->dLRU_list_size = (size_t)0;
+ cache_ptr->dLRU_head_ptr = NULL;
+ cache_ptr->dLRU_tail_ptr = NULL;
+
+ cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_threshold = 0;
+ cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->resize_enabled = FALSE;
+ cache_ptr->cache_full = FALSE;
+ cache_ptr->size_decreased = FALSE;
+
+ (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
+ (cache_ptr->resize_ctl).rpt_fcn = NULL;
+ (cache_ptr->resize_ctl).set_initial_size = FALSE;
+ (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
+ (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
+ (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
+ (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
+ (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
+
+ (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
+ (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
+ (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
+ (cache_ptr->resize_ctl).apply_max_increment = TRUE;
+ (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
+
+ (cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
+ (cache_ptr->resize_ctl).flash_multiple = 1.0f;
+ (cache_ptr->resize_ctl).flash_threshold = 0.25f;
+
+ (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
+ (cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
+ (cache_ptr->resize_ctl).decrement = H5C__DEF_AR_DECREMENT;
+ (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
+ (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
(cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
- (cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
- (cache_ptr->resize_ctl).empty_reserve = H5C__DEF_AR_EMPTY_RESERVE;
+ (cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
+ (cache_ptr->resize_ctl).empty_reserve = H5C__DEF_AR_EMPTY_RESERVE;
- cache_ptr->epoch_markers_active = 0;
+ cache_ptr->epoch_markers_active = 0;
/* no need to initialize the ring buffer itself */
- cache_ptr->epoch_marker_ringbuf_first = 1;
- cache_ptr->epoch_marker_ringbuf_last = 0;
- cache_ptr->epoch_marker_ringbuf_size = 0;
+ cache_ptr->epoch_marker_ringbuf_first = 1;
+ cache_ptr->epoch_marker_ringbuf_last = 0;
+ cache_ptr->epoch_marker_ringbuf_size = 0;
- for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ )
- {
- (cache_ptr->epoch_marker_active)[i] = FALSE;
+ for (i = 0; i < H5C__MAX_EPOCH_MARKERS; i++) {
+ (cache_ptr->epoch_marker_active)[i] = FALSE;
#ifndef NDEBUG
- ((cache_ptr->epoch_markers)[i]).magic =
- H5C__H5C_CACHE_ENTRY_T_MAGIC;
+ ((cache_ptr->epoch_markers)[i]).magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
- ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
- ((cache_ptr->epoch_markers)[i]).size = (size_t)0;
- ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class;
- ((cache_ptr->epoch_markers)[i]).is_dirty = FALSE;
- ((cache_ptr->epoch_markers)[i]).dirtied = FALSE;
- ((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
- ((cache_ptr->epoch_markers)[i]).is_read_only = FALSE;
- ((cache_ptr->epoch_markers)[i]).ro_ref_count = 0;
- ((cache_ptr->epoch_markers)[i]).is_pinned = FALSE;
- ((cache_ptr->epoch_markers)[i]).in_slist = FALSE;
- ((cache_ptr->epoch_markers)[i]).ht_next = NULL;
- ((cache_ptr->epoch_markers)[i]).ht_prev = NULL;
- ((cache_ptr->epoch_markers)[i]).next = NULL;
- ((cache_ptr->epoch_markers)[i]).prev = NULL;
- ((cache_ptr->epoch_markers)[i]).aux_next = NULL;
- ((cache_ptr->epoch_markers)[i]).aux_prev = NULL;
+ ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
+ ((cache_ptr->epoch_markers)[i]).size = (size_t)0;
+ ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class;
+ ((cache_ptr->epoch_markers)[i]).is_dirty = FALSE;
+ ((cache_ptr->epoch_markers)[i]).dirtied = FALSE;
+ ((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
+ ((cache_ptr->epoch_markers)[i]).is_read_only = FALSE;
+ ((cache_ptr->epoch_markers)[i]).ro_ref_count = 0;
+ ((cache_ptr->epoch_markers)[i]).is_pinned = FALSE;
+ ((cache_ptr->epoch_markers)[i]).in_slist = FALSE;
+ ((cache_ptr->epoch_markers)[i]).ht_next = NULL;
+ ((cache_ptr->epoch_markers)[i]).ht_prev = NULL;
+ ((cache_ptr->epoch_markers)[i]).next = NULL;
+ ((cache_ptr->epoch_markers)[i]).prev = NULL;
+ ((cache_ptr->epoch_markers)[i]).aux_next = NULL;
+ ((cache_ptr->epoch_markers)[i]).aux_prev = NULL;
#if H5C_COLLECT_CACHE_ENTRY_STATS
- ((cache_ptr->epoch_markers)[i]).accesses = 0;
- ((cache_ptr->epoch_markers)[i]).clears = 0;
- ((cache_ptr->epoch_markers)[i]).flushes = 0;
- ((cache_ptr->epoch_markers)[i]).pins = 0;
+ ((cache_ptr->epoch_markers)[i]).accesses = 0;
+ ((cache_ptr->epoch_markers)[i]).clears = 0;
+ ((cache_ptr->epoch_markers)[i]).flushes = 0;
+ ((cache_ptr->epoch_markers)[i]).pins = 0;
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
}
- if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
+ if (H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED) {
/* this should be impossible... */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, \
- "H5C_reset_cache_hit_rate_stats failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "H5C_reset_cache_hit_rate_stats failed.")
}
H5C_stats__reset(cache_ptr);
- cache_ptr->prefix[0] = '\0'; /* empty string */
+ cache_ptr->prefix[0] = '\0'; /* empty string */
/* Set return value */
ret_value = cache_ptr;
done:
- if ( ret_value == 0 ) {
+ if (ret_value == 0) {
- if ( cache_ptr != NULL ) {
+ if (cache_ptr != NULL) {
- if ( cache_ptr->slist_ptr != NULL )
+ if (cache_ptr->slist_ptr != NULL)
H5SL_close(cache_ptr->slist_ptr);
cache_ptr->magic = 0;
- cache_ptr = H5FL_FREE(H5C_t, cache_ptr);
+ cache_ptr = H5FL_FREE(H5C_t, cache_ptr);
} /* end if */
@@ -1172,185 +1073,136 @@ done:
} /* H5C_create() */
-
/*-------------------------------------------------------------------------
* Function: H5C_def_auto_resize_rpt_fcn
*
* Purpose: Print results of a automatic cache resize.
*
- * This function should only be used where HDprintf() behaves
- * well -- i.e. not on Windows.
+ * This function should only be used where HDprintf() behaves
+ * well -- i.e. not on Windows.
*
* Return: void
*
* Programmer: John Mainzer
- * 10/27/04
+ * 10/27/04
*
*-------------------------------------------------------------------------
*/
void
-H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
+H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr,
#ifndef NDEBUG
int32_t version,
-#else /* NDEBUG */
+#else /* NDEBUG */
int32_t H5_ATTR_UNUSED version,
#endif /* NDEBUG */
- double hit_rate,
- enum H5C_resize_status status,
- size_t old_max_cache_size,
- size_t new_max_cache_size,
- size_t old_min_clean_size,
- size_t new_min_clean_size)
+ double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size,
+ size_t new_max_cache_size, size_t old_min_clean_size, size_t new_min_clean_size)
{
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER);
- switch ( status )
- {
+ switch (status) {
case in_spec:
- HDfprintf(stdout,
- "%sAuto cache resize -- no change. (hit rate = %lf)\n",
- cache_ptr->prefix, hit_rate);
+ HDfprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix,
+ hit_rate);
break;
case increase:
- HDassert( hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold );
- HDassert( old_max_cache_size < new_max_cache_size );
-
- HDfprintf(stdout,
- "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate,
- (cache_ptr->resize_ctl).lower_hr_threshold);
-
- HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
- cache_ptr->prefix,
- old_max_cache_size,
- old_min_clean_size,
- new_max_cache_size,
- new_min_clean_size);
+ HDassert(hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold);
+ HDassert(old_max_cache_size < new_max_cache_size);
+
+ HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold);
+
+ HDfprintf(stdout, "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case flash_increase:
- HDassert( old_max_cache_size < new_max_cache_size );
-
- HDfprintf(stdout,
- "%sflash cache resize(%d) -- size threshold = %Zu.\n",
- cache_ptr->prefix,
- (int)((cache_ptr->resize_ctl).flash_incr_mode),
- cache_ptr->flash_size_increase_threshold);
-
- HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
- cache_ptr->prefix,
- old_max_cache_size,
- old_min_clean_size,
- new_max_cache_size,
- new_min_clean_size);
- break;
+ HDassert(old_max_cache_size < new_max_cache_size);
+
+ HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %Zu.\n", cache_ptr->prefix,
+ (int)((cache_ptr->resize_ctl).flash_incr_mode),
+ cache_ptr->flash_size_increase_threshold);
+
+ HDfprintf(stdout, "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ break;
case decrease:
- HDassert( old_max_cache_size > new_max_cache_size );
+ HDassert(old_max_cache_size > new_max_cache_size);
- switch ( (cache_ptr->resize_ctl).decr_mode )
- {
+ switch ((cache_ptr->resize_ctl).decr_mode) {
case H5C_decr__off:
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease off. HR = %lf\n",
- cache_ptr->prefix, hit_rate);
+ HDfprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix,
+ hit_rate);
break;
case H5C_decr__threshold:
- HDassert( hit_rate >
- (cache_ptr->resize_ctl).upper_hr_threshold );
+ HDassert(hit_rate > (cache_ptr->resize_ctl).upper_hr_threshold);
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate,
- (cache_ptr->resize_ctl).upper_hr_threshold);
+ HDfprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
+ cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).upper_hr_threshold);
- HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n",
- cache_ptr->prefix,
+ HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix,
(cache_ptr->resize_ctl).upper_hr_threshold);
break;
case H5C_decr__age_out:
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
+ HDfprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
cache_ptr->prefix, hit_rate);
break;
case H5C_decr__age_out_with_threshold:
- HDassert( hit_rate >
- (cache_ptr->resize_ctl).upper_hr_threshold );
+ HDassert(hit_rate > (cache_ptr->resize_ctl).upper_hr_threshold);
HDfprintf(stdout,
"%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate,
- (cache_ptr->resize_ctl).upper_hr_threshold);
+ cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).upper_hr_threshold);
break;
default:
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
+ HDfprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
cache_ptr->prefix, hit_rate);
}
- HDfprintf(stdout,
- "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
- cache_ptr->prefix,
- old_max_cache_size,
- old_min_clean_size,
- new_max_cache_size,
- new_min_clean_size);
+ HDfprintf(stdout, "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case at_max_size:
- HDfprintf(stdout,
- "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate,
- (cache_ptr->resize_ctl).lower_hr_threshold);
- HDfprintf(stdout,
- "%s cache already at maximum size so no change.\n",
- cache_ptr->prefix);
+ HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold);
+ HDfprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix);
break;
case at_min_size:
- HDfprintf(stdout,
- "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n",
- cache_ptr->prefix, hit_rate);
- HDfprintf(stdout, "%s cache already at minimum size.\n",
- cache_ptr->prefix);
+ HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix,
+ hit_rate);
+ HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix);
break;
case increase_disabled:
- HDfprintf(stdout,
- "%sAuto cache resize -- increase disabled -- HR = %lf.",
- cache_ptr->prefix, hit_rate);
+ HDfprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix,
+ hit_rate);
break;
case decrease_disabled:
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease disabled -- HR = %lf.\n",
- cache_ptr->prefix, hit_rate);
+ HDfprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix,
+ hit_rate);
break;
case not_full:
- HDassert( hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold );
-
- HDfprintf(stdout,
- "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate,
- (cache_ptr->resize_ctl).lower_hr_threshold);
- HDfprintf(stdout,
- "%s cache not full so no increase in size.\n",
- cache_ptr->prefix);
+ HDassert(hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold);
+
+ HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold);
+ HDfprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix);
break;
default:
- HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n",
- cache_ptr->prefix);
+ HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix);
break;
}
@@ -1358,7 +1210,6 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
} /* H5C_def_auto_resize_rpt_fcn() */
-
/*-------------------------------------------------------------------------
* Function: H5C_dest
*
@@ -1367,29 +1218,27 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
* This function fails if any object are protected since the
* resulting file might not be consistent.
*
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the destroy (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). This is useful in the metadata
- * cache, but may not be needed elsewhere. If so, just use the
- * same dxpl_id for both parameters.
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the destroy (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). This is useful in the metadata
+ * cache, but may not be needed elsewhere. If so, just use the
+ * same dxpl_id for both parameters.
*
- * Note that *cache_ptr has been freed upon successful return.
+ * Note that *cache_ptr has been freed upon successful return.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_dest(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id)
+H5C_dest(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id)
{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t *cache_ptr = f->shared->cache;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1398,11 +1247,10 @@ H5C_dest(H5F_t * f,
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Flush and invalidate all cache entries */
- if(H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id,
- H5C__NO_FLAGS_SET) < 0 )
+ if (H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id, H5C__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
- if(cache_ptr->slist_ptr != NULL) {
+ if (cache_ptr->slist_ptr != NULL) {
H5SL_close(cache_ptr->slist_ptr);
cache_ptr->slist_ptr = NULL;
} /* end if */
@@ -1415,14 +1263,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_dest() */
-
/*-------------------------------------------------------------------------
*
* Function: H5C_expunge_entry
*
* Purpose: Use this function to tell the cache to expunge an entry
- * from the cache without writing it to disk even if it is
- * dirty. The entry may not be either pinned or protected.
+ * from the cache without writing it to disk even if it is
+ * dirty. The entry may not be either pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1432,313 +1279,283 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_expunge_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- unsigned flags)
+H5C_expunge_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, unsigned flags)
{
- H5C_t * cache_ptr;
- herr_t result;
- hbool_t first_flush = TRUE;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr;
+ herr_t result;
+ hbool_t first_flush = TRUE;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( type->clear );
- HDassert( type->dest );
- HDassert( H5F_addr_defined(addr) );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(type->clear);
+ HDassert(type->dest);
+ HDassert(H5F_addr_defined(addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
+ }
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
- if ( ( entry_ptr == NULL ) || ( entry_ptr->type != type ) ) {
+ if ((entry_ptr == NULL) || (entry_ptr->type != type)) {
/* the target doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
}
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->type == type );
+ HDassert(entry_ptr->addr == addr);
+ HDassert(entry_ptr->type == type);
- if ( entry_ptr->is_protected ) {
+ if (entry_ptr->is_protected) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \
- "Target entry is protected.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is protected.")
}
- if ( entry_ptr->is_pinned ) {
+ if (entry_ptr->is_pinned) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \
- "Target entry is pinned.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is pinned.")
}
/* Pass along 'free file space' flag to cache client */
- entry_ptr->free_file_space_on_destroy = ( (flags & H5C__FREE_FILE_SPACE_FLAG) != 0 );
+ entry_ptr->free_file_space_on_destroy = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0);
/* If we get this far, call H5C_flush_single_entry() with the
* H5C__FLUSH_INVALIDATE_FLAG and the H5C__FLUSH_CLEAR_ONLY_FLAG.
* This will clear the entry, and then delete it from the cache.
*/
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- &first_flush,
- TRUE);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \
- "H5C_flush_single_entry() failed.")
+ result =
+ H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, entry_ptr->type, entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, &first_flush, TRUE);
+
+ if (result < 0) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_flush_single_entry() failed.")
}
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
+ }
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_expunge_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5C_flush_cache
*
- * Purpose: Flush (and possibly destroy) the entries contained in the
- * specified cache.
+ * Purpose: Flush (and possibly destroy) the entries contained in the
+ * specified cache.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the flush (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). This is useful in the metadata
- * cache, but may not be needed elsewhere. If so, just use the
- * same dxpl_id for both parameters.
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the flush (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). This is useful in the metadata
+ * cache, but may not be needed elsewhere. If so, just use the
+ * same dxpl_id for both parameters.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsigned flags)
{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t status;
- herr_t ret_value = SUCCEED;
- hbool_t destroy;
- hbool_t flushed_entries_last_pass;
- hbool_t flush_marked_entries;
- hbool_t first_flush = TRUE;
- hbool_t ignore_protected;
- hbool_t tried_to_flush_protected_entry = FALSE;
- int32_t passes = 0;
- int32_t protected_entries = 0;
- H5SL_node_t * node_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * next_entry_ptr = NULL;
+ H5C_t * cache_ptr = f->shared->cache;
+ herr_t status;
+ herr_t ret_value = SUCCEED;
+ hbool_t destroy;
+ hbool_t flushed_entries_last_pass;
+ hbool_t flush_marked_entries;
+ hbool_t first_flush = TRUE;
+ hbool_t ignore_protected;
+ hbool_t tried_to_flush_protected_entry = FALSE;
+ int32_t passes = 0;
+ int32_t protected_entries = 0;
+ H5SL_node_t * node_ptr = NULL;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ H5C_cache_entry_t *next_entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- int64_t flushed_entries_count;
- size_t flushed_entries_size;
- int64_t initial_slist_len;
- size_t initial_slist_size;
+ int64_t flushed_entries_count;
+ size_t flushed_entries_size;
+ int64_t initial_slist_len;
+ size_t initial_slist_size;
#endif /* H5C_DO_SANITY_CHECKS */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->slist_ptr );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr->slist_ptr);
- ignore_protected = ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 );
+ ignore_protected = ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0);
- destroy = ( (flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 );
+ destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
/* note that flush_marked_entries is set to FALSE if destroy is TRUE */
- flush_marked_entries = ( ( (flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0 )
- &&
- ( ! destroy )
- );
+ flush_marked_entries = (((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0) && (!destroy));
- HDassert( ! ( destroy && ignore_protected ) );
+ HDassert(!(destroy && ignore_protected));
- HDassert( ! ( cache_ptr->flush_in_progress ) );
+ HDassert(!(cache_ptr->flush_in_progress));
cache_ptr->flush_in_progress = TRUE;
- if ( destroy ) {
+ if (destroy) {
- status = H5C_flush_invalidate_cache(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- flags);
+ status = H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id, flags);
- if ( status < 0 ) {
+ if (status < 0) {
/* This shouldn't happen -- if it does, we are toast so
* just scream and die.
*/
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "flush invalidate failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed.")
}
- } else {
- /* When we are only flushing marked entries, the slist will usually
- * still contain entries when we have flushed everything we should.
- * Thus we track whether we have flushed any entries in the last
- * pass, and terminate if we haven't.
- */
+ }
+ else {
+ /* When we are only flushing marked entries, the slist will usually
+ * still contain entries when we have flushed everything we should.
+ * Thus we track whether we have flushed any entries in the last
+ * pass, and terminate if we haven't.
+ */
- flushed_entries_last_pass = TRUE;
+ flushed_entries_last_pass = TRUE;
- while ( ( passes < H5C__MAX_PASSES_ON_FLUSH ) &&
- ( cache_ptr->slist_len != 0 ) &&
- ( protected_entries == 0 ) &&
- ( flushed_entries_last_pass ) )
- {
- flushed_entries_last_pass = FALSE;
- node_ptr = H5SL_first(cache_ptr->slist_ptr);
+ while ((passes < H5C__MAX_PASSES_ON_FLUSH) && (cache_ptr->slist_len != 0) &&
+ (protected_entries == 0) && (flushed_entries_last_pass)) {
+ flushed_entries_last_pass = FALSE;
+ node_ptr = H5SL_first(cache_ptr->slist_ptr);
- if ( node_ptr != NULL ) {
+ if (node_ptr != NULL) {
next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- if ( next_entry_ptr == NULL ) {
+ if (next_entry_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "next_entry_ptr == NULL 1 ?!?!");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL 1 ?!?!");
}
#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
+ HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
#endif /* NDEBUG */
- HDassert( next_entry_ptr->is_dirty );
- HDassert( next_entry_ptr->in_slist );
-
- } else {
+ HDassert(next_entry_ptr->is_dirty);
+ HDassert(next_entry_ptr->in_slist);
+ }
+ else {
next_entry_ptr = NULL;
-
}
- HDassert( node_ptr != NULL );
+ HDassert(node_ptr != NULL);
#if H5C_DO_SANITY_CHECKS
- /* For sanity checking, try to verify that the skip list has
- * the expected size and number of entries at the end of each
- * internal while loop (see below).
- *
- * Doing this get a bit tricky, as depending on flags, we may
- * or may not flush all the entries in the slist.
- *
- * To make things more entertaining, with the advent of the
- * fractal heap, the entry flush callback can cause entries
- * to be dirtied, resized, and/or moved.
- *
- * To deal with this, we first make note of the initial
- * skip list length and size:
- */
- initial_slist_len = cache_ptr->slist_len;
+ /* For sanity checking, try to verify that the skip list has
+ * the expected size and number of entries at the end of each
+ * internal while loop (see below).
+ *
+ * Doing this get a bit tricky, as depending on flags, we may
+ * or may not flush all the entries in the slist.
+ *
+ * To make things more entertaining, with the advent of the
+ * fractal heap, the entry flush callback can cause entries
+ * to be dirtied, resized, and/or moved.
+ *
+ * To deal with this, we first make note of the initial
+ * skip list length and size:
+ */
+ initial_slist_len = cache_ptr->slist_len;
initial_slist_size = cache_ptr->slist_size;
- /* We then zero counters that we use to track the number
- * and total size of entries flushed:
- */
+ /* We then zero counters that we use to track the number
+ * and total size of entries flushed:
+ */
flushed_entries_count = 0;
- flushed_entries_size = 0;
-
- /* As mentioned above, there is the possibility that
- * entries will be dirtied, resized, and/or flushed during
- * our pass through the skip list. To capture the number
- * of entries added, and the skip list size delta,
- * zero the slist_len_increase and slist_size_increase of
- * the cache's instance of H5C_t. These fields will be
- * updated elsewhere to account for slist insertions and/or
- * dirty entry size changes.
- */
- cache_ptr->slist_len_increase = 0;
- cache_ptr->slist_size_increase = 0;
-
- /* at the end of the loop, use these values to compute the
- * expected slist length and size and compare this with the
- * value recorded in the cache's instance of H5C_t.
- */
+ flushed_entries_size = 0;
+
+ /* As mentioned above, there is the possibility that
+ * entries will be dirtied, resized, and/or flushed during
+ * our pass through the skip list. To capture the number
+ * of entries added, and the skip list size delta,
+ * zero the slist_len_increase and slist_size_increase of
+ * the cache's instance of H5C_t. These fields will be
+ * updated elsewhere to account for slist insertions and/or
+ * dirty entry size changes.
+ */
+ cache_ptr->slist_len_increase = 0;
+ cache_ptr->slist_size_increase = 0;
+
+ /* at the end of the loop, use these values to compute the
+ * expected slist length and size and compare this with the
+ * value recorded in the cache's instance of H5C_t.
+ */
#endif /* H5C_DO_SANITY_CHECKS */
- while ( node_ptr != NULL )
- {
+ while (node_ptr != NULL) {
entry_ptr = next_entry_ptr;
/* With the advent of the fractal heap, it is possible
- * that the flush callback will dirty and/or resize
- * other entries in the cache. In particular, while
- * Quincey has promised me that this will never happen,
- * it is possible that the flush callback for an
- * entry may protect an entry that is not in the cache,
- * perhaps causing the cache to flush and possibly
- * evict the entry associated with node_ptr to make
- * space for the new entry.
- *
- * Thus we do a bit of extra sanity checking on entry_ptr,
- * and break out of this scan of the skip list if we
- * detect minor problems. We have a bit of leaway on the
- * number of passes though the skip list, so this shouldn't
- * be an issue in the flush in and of itself, as it should
- * be all but impossible for this to happen more than once
- * in any flush.
- *
- * Observe that that breaking out of the scan early
- * shouldn't break the sanity checks just after the end
- * of this while loop.
- *
- * If an entry has merely been marked clean and removed from
- * the s-list, we simply break out of the scan.
- *
- * If the entry has been evicted, we flag an error and
- * exit.
- */
+ * that the flush callback will dirty and/or resize
+ * other entries in the cache. In particular, while
+ * Quincey has promised me that this will never happen,
+ * it is possible that the flush callback for an
+ * entry may protect an entry that is not in the cache,
+ * perhaps causing the cache to flush and possibly
+ * evict the entry associated with node_ptr to make
+ * space for the new entry.
+ *
+ * Thus we do a bit of extra sanity checking on entry_ptr,
+ * and break out of this scan of the skip list if we
+ * detect minor problems. We have a bit of leaway on the
+ * number of passes though the skip list, so this shouldn't
+ * be an issue in the flush in and of itself, as it should
+ * be all but impossible for this to happen more than once
+ * in any flush.
+ *
+ * Observe that that breaking out of the scan early
+ * shouldn't break the sanity checks just after the end
+ * of this while loop.
+ *
+ * If an entry has merely been marked clean and removed from
+ * the s-list, we simply break out of the scan.
+ *
+ * If the entry has been evicted, we flag an error and
+ * exit.
+ */
#ifndef NDEBUG
- if ( entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) {
+ if (entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "entry_ptr->magic invalid ?!?!");
-
- } else
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry_ptr->magic invalid ?!?!");
+ }
+ else
#endif /* NDEBUG */
- if ( ( ! entry_ptr->is_dirty ) ||
- ( ! entry_ptr->in_slist ) ) {
+ if ((!entry_ptr->is_dirty) || (!entry_ptr->in_slist)) {
/* the s-list has been modified out from under us.
* set node_ptr to NULL and break out of the loop.
@@ -1752,93 +1569,79 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign
*/
node_ptr = H5SL_next(node_ptr);
- if ( node_ptr != NULL ) {
+ if (node_ptr != NULL) {
next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- if ( next_entry_ptr == NULL ) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "next_entry_ptr == NULL 2 ?!?!");
- }
+ if (next_entry_ptr == NULL) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL 2 ?!?!");
+ }
#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
+ HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
#endif /* NDEBUG */
- HDassert( next_entry_ptr->is_dirty );
- HDassert( next_entry_ptr->in_slist );
- } else {
+ HDassert(next_entry_ptr->is_dirty);
+ HDassert(next_entry_ptr->in_slist);
+ }
+ else {
next_entry_ptr = NULL;
}
- HDassert( entry_ptr != NULL );
- HDassert( entry_ptr->in_slist );
+ HDassert(entry_ptr != NULL);
+ HDassert(entry_ptr->in_slist);
- if ( ( ! flush_marked_entries ) ||
- ( entry_ptr->flush_marker ) ) {
+ if ((!flush_marked_entries) || (entry_ptr->flush_marker)) {
- if ( entry_ptr->is_protected ) {
+ if (entry_ptr->is_protected) {
/* we probably have major problems -- but lets flush
* everything we can before we decide whether to flag
* an error.
*/
tried_to_flush_protected_entry = TRUE;
- protected_entries++;
-
- } else if ( entry_ptr->is_pinned ) {
- /* Test to see if we are can flush the entry now.
- * If we can, go ahead and flush. Note that we
- * aren't trying to do a destroy here, so that
- * is not an issue.
- */
- if ( TRUE ) { /* When we get to multithreaded cache,
- * we will need either locking code,
- * and/or a test to see if the entry
- * is in flushable condition here.
- */
+ protected_entries++;
+ }
+ else if (entry_ptr->is_pinned) {
+ /* Test to see if we are can flush the entry now.
+ * If we can, go ahead and flush. Note that we
+ * aren't trying to do a destroy here, so that
+ * is not an issue.
+ */
+ if (TRUE) { /* When we get to multithreaded cache,
+ * we will need either locking code,
+ * and/or a test to see if the entry
+ * is in flushable condition here.
+ */
#if H5C_DO_SANITY_CHECKS
flushed_entries_count++;
flushed_entries_size += entry_ptr->size;
#endif /* H5C_DO_SANITY_CHECKS */
- status = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- NULL,
- entry_ptr->addr,
- flags,
- &first_flush,
- FALSE);
- if ( status < 0 ) {
+ status = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, NULL,
+ entry_ptr->addr, flags, &first_flush, FALSE);
+ if (status < 0) {
/* This shouldn't happen -- if it does, we are
- * toast so just scream and die.
+ * toast so just scream and die.
*/
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
"dirty pinned entry flush failed.")
}
- flushed_entries_last_pass = TRUE;
- }
- } else {
+ flushed_entries_last_pass = TRUE;
+ }
+ }
+ else {
#if H5C_DO_SANITY_CHECKS
flushed_entries_count++;
- flushed_entries_size += entry_ptr->size;
+ flushed_entries_size += entry_ptr->size;
#endif /* H5C_DO_SANITY_CHECKS */
- status = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- NULL,
- entry_ptr->addr,
- flags,
- &first_flush,
- FALSE);
- if ( status < 0 ) {
+ status = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, NULL,
+ entry_ptr->addr, flags, &first_flush, FALSE);
+ if (status < 0) {
/* This shouldn't happen -- if it does, we are
- * toast so just scream and die.
+ * toast so just scream and die.
*/
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Can't flush entry.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry.")
}
- flushed_entries_last_pass = TRUE;
+ flushed_entries_last_pass = TRUE;
}
}
} /* while ( node_ptr != NULL ) */
@@ -1846,41 +1649,35 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign
#if H5C_DO_SANITY_CHECKS
/* Verify that the slist size and length are as expected. */
- HDassert( (initial_slist_len + cache_ptr->slist_len_increase -
- flushed_entries_count) == cache_ptr->slist_len );
- HDassert( (initial_slist_size + cache_ptr->slist_size_increase -
- flushed_entries_size) == cache_ptr->slist_size );
+ HDassert((initial_slist_len + cache_ptr->slist_len_increase - flushed_entries_count) ==
+ cache_ptr->slist_len);
+ HDassert((initial_slist_size + cache_ptr->slist_size_increase - flushed_entries_size) ==
+ cache_ptr->slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
- passes++;
+ passes++;
- } /* while */
+ } /* while */
- HDassert( protected_entries <= cache_ptr->pl_len );
+ HDassert(protected_entries <= cache_ptr->pl_len);
- if ( ( ( cache_ptr->pl_len > 0 ) && ( !ignore_protected ) )
- ||
- ( tried_to_flush_protected_entry ) ) {
+ if (((cache_ptr->pl_len > 0) && (!ignore_protected)) || (tried_to_flush_protected_entry)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "cache has protected items")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items")
}
- if ( ( cache_ptr->slist_len != 0 ) &&
- ( passes >= H5C__MAX_PASSES_ON_FLUSH ) ) {
+ if ((cache_ptr->slist_len != 0) && (passes >= H5C__MAX_PASSES_ON_FLUSH)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "flush pass limit exceeded.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush pass limit exceeded.")
+ }
#if H5C_DO_SANITY_CHECKS
- if ( ! flush_marked_entries ) {
+ if (!flush_marked_entries) {
- HDassert( cache_ptr->slist_len == 0 );
- HDassert( cache_ptr->slist_size == 0 );
+ HDassert(cache_ptr->slist_len == 0);
+ HDassert(cache_ptr->slist_size == 0);
}
#endif /* H5C_DO_SANITY_CHECKS */
-
}
done:
@@ -1891,136 +1688,122 @@ done:
} /* H5C_flush_cache() */
-
/*-------------------------------------------------------------------------
* Function: H5C_flush_to_min_clean
*
- * Purpose: Flush dirty entries until the caches min clean size is
- * attained.
+ * Purpose: Flush dirty entries until the caches min clean size is
+ * attained.
*
- * This function is used in the implementation of the
- * metadata cache in PHDF5. To avoid "messages from the
- * future", the cache on process 0 can't be allowed to
- * flush entries until the other processes have reached
- * the same point in the calculation. If this constraint
- * is not met, it is possible that the other processes will
- * read metadata generated at a future point in the
- * computation.
+ * This function is used in the implementation of the
+ * metadata cache in PHDF5. To avoid "messages from the
+ * future", the cache on process 0 can't be allowed to
+ * flush entries until the other processes have reached
+ * the same point in the calculation. If this constraint
+ * is not met, it is possible that the other processes will
+ * read metadata generated at a future point in the
+ * computation.
*
*
* Return: Non-negative on success/Negative on failure or if
- * write is not permitted.
+ * write is not permitted.
*
* Programmer: John Mainzer
- * 9/16/05
+ * 9/16/05
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_flush_to_min_clean(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id)
+H5C_flush_to_min_clean(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id)
{
- H5C_t * cache_ptr;
- herr_t result;
- hbool_t first_flush = TRUE;
- hbool_t write_permitted;
-#if 0 /* modified code -- commented out for now */
- int i;
- int flushed_entries_count = 0;
- size_t flushed_entries_size = 0;
- size_t space_needed = 0;
- haddr_t * flushed_entries_list = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_t * cache_ptr;
+ herr_t result;
+ hbool_t first_flush = TRUE;
+ hbool_t write_permitted;
+#if 0 /* modified code -- commented out for now */
+ int i;
+ int flushed_entries_count = 0;
+ size_t flushed_entries_size = 0;
+ size_t space_needed = 0;
+ haddr_t * flushed_entries_list = NULL;
+ H5C_cache_entry_t * entry_ptr = NULL;
#endif /* JRM */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( cache_ptr->check_write_permitted != NULL ) {
+ if (cache_ptr->check_write_permitted != NULL) {
- result = (cache_ptr->check_write_permitted)(f,
- primary_dxpl_id,
- &write_permitted);
+ result = (cache_ptr->check_write_permitted)(f, primary_dxpl_id, &write_permitted);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Can't get write_permitted")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get write_permitted")
}
- } else {
+ }
+ else {
write_permitted = cache_ptr->write_permitted;
}
- if ( ! write_permitted ) {
+ if (!write_permitted) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "cache write is not permitted!?!\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache write is not permitted!?!\n");
}
#if 1 /* original code */
- result = H5C_make_space_in_cache(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- (size_t)0,
- write_permitted,
+ result = H5C_make_space_in_cache(f, primary_dxpl_id, secondary_dxpl_id, (size_t)0, write_permitted,
&first_flush);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_make_space_in_cache failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_make_space_in_cache failed.")
}
-#else /* modified code -- commented out for now */
- if ( cache_ptr->max_cache_size > cache_ptr->index_size ) {
+#else /* modified code -- commented out for now */
+ if (cache_ptr->max_cache_size > cache_ptr->index_size) {
- if ( ((cache_ptr->max_cache_size - cache_ptr->index_size) +
- cache_ptr->cLRU_list_size) >= cache_ptr->min_clean_size ) {
+ if (((cache_ptr->max_cache_size - cache_ptr->index_size) + cache_ptr->cLRU_list_size) >=
+ cache_ptr->min_clean_size) {
space_needed = 0;
-
- } else {
+ }
+ else {
space_needed = cache_ptr->min_clean_size -
- ((cache_ptr->max_cache_size - cache_ptr->index_size) +
- cache_ptr->cLRU_list_size);
+ ((cache_ptr->max_cache_size - cache_ptr->index_size) + cache_ptr->cLRU_list_size);
}
- } else {
-
- if ( cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size ) {
+ }
+ else {
- space_needed = 0;
+ if (cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size) {
- } else {
+ space_needed = 0;
+ }
+ else {
- space_needed = cache_ptr->min_clean_size -
- cache_ptr->cLRU_list_size;
+ space_needed = cache_ptr->min_clean_size - cache_ptr->cLRU_list_size;
}
}
- if ( space_needed > 0 ) { /* we have work to do */
+ if (space_needed > 0) { /* we have work to do */
- HDassert( cache_ptr->slist_len > 0 );
+ HDassert(cache_ptr->slist_len > 0);
/* allocate an array to keep a list of the entries that we
* mark for flush. We need this list to touch up the LRU
* list after the flush.
*/
- flushed_entries_list = (haddr_t *)H5MM_malloc(sizeof(haddr_t) *
- (size_t)(cache_ptr->slist_len));
+ flushed_entries_list = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * (size_t)(cache_ptr->slist_len));
- if ( flushed_entries_list == NULL ) {
+ if (flushed_entries_list == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed for flushed entries list")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for flushed entries list")
}
/* Scan the dirty LRU list from tail forward and mark sufficient
@@ -2029,15 +1812,13 @@ H5C_flush_to_min_clean(H5F_t * f,
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
- while ( ( flushed_entries_size < space_needed ) &&
- ( flushed_entries_count < cache_ptr->slist_len ) &&
- ( entry_ptr != NULL ) )
- {
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( entry_ptr->ro_ref_count == 0 );
- HDassert( entry_ptr->is_dirty );
- HDassert( entry_ptr->in_slist );
+ while ((flushed_entries_size < space_needed) && (flushed_entries_count < cache_ptr->slist_len) &&
+ (entry_ptr != NULL)) {
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert(entry_ptr->ro_ref_count == 0);
+ HDassert(entry_ptr->is_dirty);
+ HDassert(entry_ptr->in_slist);
entry_ptr->flush_marker = TRUE;
flushed_entries_size += entry_ptr->size;
@@ -2046,15 +1827,14 @@ H5C_flush_to_min_clean(H5F_t * f,
entry_ptr = entry_ptr->aux_prev;
}
- HDassert( flushed_entries_count <= cache_ptr->slist_len );
- HDassert( flushed_entries_size >= space_needed );
-
+ HDassert(flushed_entries_count <= cache_ptr->slist_len);
+ HDassert(flushed_entries_size >= space_needed);
/* Flush the marked entries */
- result = H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
+ result = H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG);
- if ( result < 0 ) {
+ if (result < 0) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_cache failed.")
}
@@ -2065,16 +1845,14 @@ H5C_flush_to_min_clean(H5F_t * f,
*/
i = 0;
- while ( i < flushed_entries_count )
- {
- H5C__SEARCH_INDEX_NO_STATS(cache_ptr, flushed_entries_list[i], \
- entry_ptr, FAIL)
+ while (i < flushed_entries_count) {
+ H5C__SEARCH_INDEX_NO_STATS(cache_ptr, flushed_entries_list[i], entry_ptr, FAIL)
- /* At present, the above search must always succeed. However,
+ /* At present, the above search must always succeed. However,
* that may change. Write the code so we need only remove the
* following assert in that event.
*/
- HDassert( entry_ptr != NULL );
+ HDassert(entry_ptr != NULL);
H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, FAIL)
i++;
}
@@ -2085,35 +1863,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_to_min_clean() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_cache_auto_resize_config
*
- * Purpose: Copy the current configuration of the cache automatic
- * re-sizing function into the instance of H5C_auto_size_ctl_t
- * pointed to by config_ptr.
+ * Purpose: Copy the current configuration of the cache automatic
+ * re-sizing function into the instance of H5C_auto_size_ctl_t
+ * pointed to by config_ptr.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 10/8/04
+ * 10/8/04
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
- H5C_auto_size_ctl_t *config_ptr)
+H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
- if ( config_ptr == NULL ) {
+ if (config_ptr == NULL) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad config_ptr on entry.")
}
@@ -2121,7 +1897,7 @@ H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
*config_ptr = cache_ptr->resize_ctl;
config_ptr->set_initial_size = FALSE;
- config_ptr->initial_size = cache_ptr->max_cache_size;
+ config_ptr->initial_size = cache_ptr->max_cache_size;
done:
@@ -2129,55 +1905,51 @@ done:
} /* H5C_get_cache_auto_resize_config() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_cache_size
*
- * Purpose: Return the cache maximum size, the minimum clean size, the
- * current size, and the current number of entries in
+ * Purpose: Return the cache maximum size, the minimum clean size, the
+ * current size, and the current number of entries in
* *max_size_ptr, *min_clean_size_ptr, *cur_size_ptr, and
- * *cur_num_entries_ptr respectively. If any of these
- * parameters are NULL, skip that value.
+ * *cur_num_entries_ptr respectively. If any of these
+ * parameters are NULL, skip that value.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 10/8/04
+ * 10/8/04
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_cache_size(H5C_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr)
+H5C_get_cache_size(H5C_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr, size_t *cur_size_ptr,
+ int32_t *cur_num_entries_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
- if ( max_size_ptr != NULL ) {
+ if (max_size_ptr != NULL) {
*max_size_ptr = cache_ptr->max_cache_size;
}
- if ( min_clean_size_ptr != NULL ) {
+ if (min_clean_size_ptr != NULL) {
*min_clean_size_ptr = cache_ptr->min_clean_size;
}
- if ( cur_size_ptr != NULL ) {
+ if (cur_size_ptr != NULL) {
*cur_size_ptr = cache_ptr->index_size;
}
- if ( cur_num_entries_ptr != NULL ) {
+ if (cur_num_entries_ptr != NULL) {
*cur_num_entries_ptr = cache_ptr->index_len;
}
@@ -2188,51 +1960,48 @@ done:
} /* H5C_get_cache_size() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_cache_hit_rate
*
- * Purpose: Compute and return the current cache hit rate in
+ * Purpose: Compute and return the current cache hit rate in
* *hit_rate_ptr. If there have been no accesses since the
* last time the cache hit rate stats were reset, set
- * *hit_rate_ptr to 0.0. On error, *hit_rate_ptr is
- * undefined.
+ * *hit_rate_ptr to 0.0. On error, *hit_rate_ptr is
+ * undefined.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 10/7/04
+ * 10/7/04
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_cache_hit_rate(H5C_t * cache_ptr,
- double * hit_rate_ptr)
+H5C_get_cache_hit_rate(H5C_t *cache_ptr, double *hit_rate_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
- if ( hit_rate_ptr == NULL ) {
+ if (hit_rate_ptr == NULL) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry.")
}
- HDassert( cache_ptr->cache_hits >= 0 );
- HDassert( cache_ptr->cache_accesses >= cache_ptr->cache_hits );
+ HDassert(cache_ptr->cache_hits >= 0);
+ HDassert(cache_ptr->cache_accesses >= cache_ptr->cache_hits);
- if ( cache_ptr->cache_accesses > 0 ) {
+ if (cache_ptr->cache_accesses > 0) {
- *hit_rate_ptr = ((double)(cache_ptr->cache_hits)) /
- ((double)(cache_ptr->cache_accesses));
-
- } else {
+ *hit_rate_ptr = ((double)(cache_ptr->cache_hits)) / ((double)(cache_ptr->cache_accesses));
+ }
+ else {
*hit_rate_ptr = 0.0f;
}
@@ -2243,21 +2012,20 @@ done:
} /* H5C_get_cache_hit_rate() */
-
/*-------------------------------------------------------------------------
*
* Function: H5C_get_entry_status
*
* Purpose: This function is used to determine whether the cache
- * contains an entry with the specified base address. If
- * the entry exists, it also reports some status information
- * on the entry.
+ * contains an entry with the specified base address. If
+ * the entry exists, it also reports some status information
+ * on the entry.
*
- * Status information is reported in the locations pointed
- * to by the size_ptr, in_cache_ptr, is_dirty_ptr, and
- * is_protected_ptr. While in_cache_ptr must be defined,
- * the remaining pointers may be NULL, in which case the
- * associated data is not reported.
+ * Status information is reported in the locations pointed
+ * to by the size_ptr, in_cache_ptr, is_dirty_ptr, and
+ * is_protected_ptr. While in_cache_ptr must be defined,
+ * the remaining pointers may be NULL, in which case the
+ * associated data is not reported.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2267,67 +2035,62 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_entry_status(const H5F_t *f,
- haddr_t addr,
- size_t * size_ptr,
- hbool_t * in_cache_ptr,
- hbool_t * is_dirty_ptr,
- hbool_t * is_protected_ptr,
- hbool_t * is_pinned_ptr)
+H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in_cache_ptr,
+ hbool_t *is_dirty_ptr, hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr)
{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( H5F_addr_defined(addr) );
- HDassert( in_cache_ptr != NULL );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(H5F_addr_defined(addr));
+ HDassert(in_cache_ptr != NULL);
/* this test duplicates two of the above asserts, but we need an
* invocation of HGOTO_ERROR to keep the compiler happy.
*/
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
- if ( entry_ptr == NULL ) {
+ if (entry_ptr == NULL) {
/* the entry doesn't exist in the cache -- report this
* and quit.
*/
*in_cache_ptr = FALSE;
-
- } else {
+ }
+ else {
*in_cache_ptr = TRUE;
- if ( size_ptr != NULL ) {
+ if (size_ptr != NULL) {
*size_ptr = entry_ptr->size;
}
- if ( is_dirty_ptr != NULL ) {
+ if (is_dirty_ptr != NULL) {
*is_dirty_ptr = entry_ptr->is_dirty;
}
- if ( is_protected_ptr != NULL ) {
+ if (is_protected_ptr != NULL) {
*is_protected_ptr = entry_ptr->is_protected;
}
- if ( is_pinned_ptr != NULL ) {
+ if (is_pinned_ptr != NULL) {
*is_pinned_ptr = entry_ptr->is_pinned;
}
@@ -2339,7 +2102,6 @@ done:
} /* H5C_get_entry_status() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_evictions_enabled()
*
@@ -2354,22 +2116,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_evictions_enabled(const H5C_t *cache_ptr,
- hbool_t * evictions_enabled_ptr)
+H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
- if ( evictions_enabled_ptr == NULL ) {
+ if (evictions_enabled_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Bad evictions_enabled_ptr on entry.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad evictions_enabled_ptr on entry.")
}
*evictions_enabled_ptr = cache_ptr->evictions_enabled;
@@ -2380,7 +2140,6 @@ done:
} /* H5C_get_evictions_enabled() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_trace_file_ptr
*
@@ -2411,7 +2170,6 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_get_trace_file_ptr() */
-
/*-------------------------------------------------------------------------
* Function: H5C_get_trace_file_ptr_from_entry
*
@@ -2429,8 +2187,7 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
- FILE **trace_file_ptr_ptr)
+H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr, FILE **trace_file_ptr_ptr)
{
FUNC_ENTER_NOAPI_NOERR
@@ -2443,7 +2200,6 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_get_trace_file_ptr_from_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5C_insert_entry
*
@@ -2451,78 +2207,72 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
* exist on disk yet, but it must have an address and disk
* space reserved.
*
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the insertion (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). This is useful in the
- * metadata cache, but may not be needed elsewhere. If so,
- * just use the same dxpl_id for both parameters.
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the insertion (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). This is useful in the
+ * metadata cache, but may not be needed elsewhere. If so,
+ * just use the same dxpl_id for both parameters.
*
- * The primary_dxpl_id is the dxpl_id passed to the
- * check_write_permitted function if such a function has been
- * provided.
+ * The primary_dxpl_id is the dxpl_id passed to the
+ * check_write_permitted function if such a function has been
+ * provided.
*
- * Observe that this function cannot occasion a read.
+ * Observe that this function cannot occasion a read.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_insert_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags)
+H5C_insert_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, void *thing, unsigned int flags)
{
- H5C_t * cache_ptr;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
- hbool_t first_flush = TRUE;
- hbool_t insert_pinned;
- hbool_t set_flush_marker;
- hbool_t write_permitted = TRUE;
- size_t empty_space;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * test_entry_ptr;
+ H5C_t * cache_ptr;
+ herr_t result;
+ herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t first_flush = TRUE;
+ hbool_t insert_pinned;
+ hbool_t set_flush_marker;
+ hbool_t write_permitted = TRUE;
+ size_t empty_space;
+ H5C_cache_entry_t *entry_ptr;
+ H5C_cache_entry_t *test_entry_ptr;
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( type->flush );
- HDassert( type->size );
- HDassert( H5F_addr_defined(addr) );
- HDassert( thing );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(type->flush);
+ HDassert(type->size);
+ HDassert(H5F_addr_defined(addr));
+ HDassert(thing);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_verify_not_in_index(cache_ptr, (H5C_cache_entry_t *)thing) < 0 ) {
+ if (H5C_verify_not_in_index(cache_ptr, (H5C_cache_entry_t *)thing) < 0) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "thing already in index.\n");
}
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- set_flush_marker = ( (flags & H5C__SET_FLUSH_MARKER_FLAG) != 0 );
- insert_pinned = ( (flags & H5C__PIN_ENTRY_FLAG) != 0 );
+ set_flush_marker = ((flags & H5C__SET_FLUSH_MARKER_FLAG) != 0);
+ insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0);
entry_ptr = (H5C_cache_entry_t *)thing;
@@ -2532,17 +2282,15 @@ H5C_insert_entry(H5F_t * f,
H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
- if ( test_entry_ptr != NULL ) {
+ if (test_entry_ptr != NULL) {
- if ( test_entry_ptr == entry_ptr ) {
+ if (test_entry_ptr == entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, \
- "entry already in cache.")
-
- } else {
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "entry already in cache.")
+ }
+ else {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, \
- "duplicate entry in cache.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "duplicate entry in cache.")
}
}
@@ -2550,8 +2298,8 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
entry_ptr->cache_ptr = cache_ptr;
- entry_ptr->addr = addr;
- entry_ptr->type = type;
+ entry_ptr->addr = addr;
+ entry_ptr->type = type;
entry_ptr->is_protected = FALSE;
entry_ptr->is_read_only = FALSE;
@@ -2563,22 +2311,22 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->is_dirty = TRUE;
/* not protected, so can't be dirtied */
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = FALSE;
/* Retrieve the size of the thing */
- if((type->size)(f, thing, &(entry_ptr->size)) < 0)
+ if ((type->size)(f, thing, &(entry_ptr->size)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
- HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
entry_ptr->in_slist = FALSE;
#ifdef H5_HAVE_PARALLEL
entry_ptr->clear_on_unprotect = FALSE;
- entry_ptr->flush_immediately = FALSE;
+ entry_ptr->flush_immediately = FALSE;
#endif /* H5_HAVE_PARALLEL */
- entry_ptr->flush_in_progress = FALSE;
- entry_ptr->destroy_in_progress = FALSE;
+ entry_ptr->flush_in_progress = FALSE;
+ entry_ptr->destroy_in_progress = FALSE;
entry_ptr->free_file_space_on_destroy = FALSE;
entry_ptr->ht_next = NULL;
@@ -2592,69 +2340,56 @@ H5C_insert_entry(H5F_t * f,
H5C__RESET_CACHE_ENTRY_STATS(entry_ptr)
- if ( ( cache_ptr->flash_size_increase_possible ) &&
- ( entry_ptr->size > cache_ptr->flash_size_increase_threshold ) ) {
+ if ((cache_ptr->flash_size_increase_possible) &&
+ (entry_ptr->size > cache_ptr->flash_size_increase_threshold)) {
result = H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, \
- "H5C__flash_increase_cache_size failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__flash_increase_cache_size failed.")
}
}
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
-
- empty_space = 0;
-
- } else {
+ if (cache_ptr->index_size >= cache_ptr->max_cache_size) {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = 0;
+ }
+ else {
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
}
- if ( ( cache_ptr->evictions_enabled )
- &&
- ( ( (cache_ptr->index_size + entry_ptr->size) >
- cache_ptr->max_cache_size
- )
- ||
- (
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size )
- )
- )
- ) {
+ if ((cache_ptr->evictions_enabled) &&
+ (((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size) ||
+ (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
size_t space_needed;
- if ( empty_space <= entry_ptr->size ) {
+ if (empty_space <= entry_ptr->size) {
cache_ptr->cache_full = TRUE;
- }
+ }
- if ( cache_ptr->check_write_permitted != NULL ) {
+ if (cache_ptr->check_write_permitted != NULL) {
- result = (cache_ptr->check_write_permitted)(f,
- primary_dxpl_id,
- &write_permitted);
+ result = (cache_ptr->check_write_permitted)(f, primary_dxpl_id, &write_permitted);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, \
- "Can't get write_permitted")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "Can't get write_permitted")
}
- } else {
+ }
+ else {
write_permitted = cache_ptr->write_permitted;
}
- HDassert( entry_ptr->size <= H5C_MAX_ENTRY_SIZE );
+ HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
space_needed = entry_ptr->size;
- if ( space_needed > cache_ptr->max_cache_size ) {
+ if (space_needed > cache_ptr->max_cache_size) {
space_needed = cache_ptr->max_cache_size;
}
@@ -2684,17 +2419,12 @@ H5C_insert_entry(H5F_t * f,
* no point in worrying about the third.
*/
- result = H5C_make_space_in_cache(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- space_needed,
- write_permitted,
+ result = H5C_make_space_in_cache(f, primary_dxpl_id, secondary_dxpl_id, space_needed, write_permitted,
&first_flush);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, \
- "H5C_make_space_in_cache failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C_make_space_in_cache failed.")
}
}
@@ -2704,12 +2434,12 @@ H5C_insert_entry(H5F_t * f,
* unnecessary. Rework it once the rest of the code changes are
* in and tested. -- JRM
*/
- if ( entry_ptr->is_dirty ) {
+ if (entry_ptr->is_dirty) {
entry_ptr->flush_marker = set_flush_marker;
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
-
- } else {
+ }
+ else {
entry_ptr->flush_marker = FALSE;
}
@@ -2717,10 +2447,9 @@ H5C_insert_entry(H5F_t * f,
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2729,10 +2458,9 @@ H5C_insert_entry(H5F_t * f,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2740,30 +2468,29 @@ done:
} /* H5C_insert_entry() */
-
/*-------------------------------------------------------------------------
*
* Function: H5C_mark_entries_as_clean
*
* Purpose: When the H5C code is used to implement the metadata caches
- * in PHDF5, only the cache with MPI_rank 0 is allowed to
- * actually write entries to disk -- all other caches must
- * retain dirty entries until they are advised that the
- * entries are clean.
+ * in PHDF5, only the cache with MPI_rank 0 is allowed to
+ * actually write entries to disk -- all other caches must
+ * retain dirty entries until they are advised that the
+ * entries are clean.
*
- * This function exists to allow the H5C code to receive these
- * notifications.
+ * This function exists to allow the H5C code to receive these
+ * notifications.
*
- * The function receives a list of entry base addresses
- * which must refer to dirty entries in the cache. If any
- * of the entries are either clean or don't exist, the
- * function flags an error.
+ * The function receives a list of entry base addresses
+ * which must refer to dirty entries in the cache. If any
+ * of the entries are either clean or don't exist, the
+ * function flags an error.
*
- * The function scans the list of entries and flushes all
- * those that are currently unprotected with the
- * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
- * protected are flagged for clearing when they are
- * unprotected.
+ * The function scans the list of entries and flushes all
+ * those that are currently unprotected with the
+ * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
+ * protected are flagged for clearing when they are
+ * unprotected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2774,105 +2501,91 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
herr_t
-H5C_mark_entries_as_clean(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- int32_t ce_array_len,
- haddr_t * ce_array_ptr)
+H5C_mark_entries_as_clean(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, int32_t ce_array_len,
+ haddr_t *ce_array_ptr)
{
- H5C_t * cache_ptr;
- hbool_t first_flush = TRUE;
- int entries_cleared;
- int entries_examined;
- int i;
- int initial_list_len;
- haddr_t addr;
+ H5C_t * cache_ptr;
+ hbool_t first_flush = TRUE;
+ int entries_cleared;
+ int entries_examined;
+ int i;
+ int initial_list_len;
+ haddr_t addr;
#if H5C_DO_SANITY_CHECKS
- int pinned_entries_marked = 0;
- int protected_entries_marked = 0;
- int other_entries_marked = 0;
- haddr_t last_addr;
+ int pinned_entries_marked = 0;
+ int protected_entries_marked = 0;
+ int other_entries_marked = 0;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_cache_entry_t * clear_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t *clear_ptr = NULL;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( f->shared );
+ HDassert(f);
+ HDassert(f->shared);
cache_ptr = f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert( ce_array_len > 0 );
- HDassert( ce_array_ptr != NULL );
+ HDassert(ce_array_len > 0);
+ HDassert(ce_array_ptr != NULL);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HDassert(0);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
- }
+ HDassert(0);
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
+ }
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- for ( i = 0; i < ce_array_len; i++ )
- {
+ for (i = 0; i < ce_array_len; i++) {
addr = ce_array_ptr[i];
#if H5C_DO_SANITY_CHECKS
- if ( i == 0 ) {
+ if (i == 0) {
last_addr = addr;
+ }
+ else {
- } else {
-
- if ( last_addr == addr ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Duplicate entry in cleaned list.\n");
+ if (last_addr == addr) {
- } else if ( last_addr > addr ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list.\n");
+ }
+ else if (last_addr > addr) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "cleaned list not sorted.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cleaned list not sorted.\n");
}
}
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HDassert(0);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HDassert(0);
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert( H5F_addr_defined(addr) );
+ HDassert(H5F_addr_defined(addr));
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
- if ( entry_ptr == NULL ) {
+ if (entry_ptr == NULL) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
- "H5C_mark_entries_as_clean: entry[%d] = %ld not in cache.\n",
- (int)i,
+ HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%d] = %ld not in cache.\n", (int)i,
(long)addr);
#endif /* H5C_DO_SANITY_CHECKS */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Listed entry not in cache?!?!?.")
-
- } else if ( ! entry_ptr->is_dirty ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?.")
+ }
+ else if (!entry_ptr->is_dirty) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
- "H5C_mark_entries_as_clean: entry %ld is not dirty!?!\n",
- (long)addr);
+ HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %ld is not dirty!?!\n", (long)addr);
#endif /* H5C_DO_SANITY_CHECKS */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Listed entry not dirty?!?!?.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?.")
#if 0 /* original code */
} else if ( entry_ptr->is_protected ) {
@@ -2893,5492 +2606,4858 @@ H5C_mark_entries_as_clean(H5F_t * f,
}
}
#else /* modified code */
- } else {
+ }
+ else {
/* Mark the entry to be cleared on unprotect. We will
* scan the LRU list shortly, and clear all those entries
* not currently protected.
*/
entry_ptr->clear_on_unprotect = TRUE;
#if H5C_DO_SANITY_CHECKS
- if ( entry_ptr->is_protected ) {
-
- protected_entries_marked++;
-
- } else if ( entry_ptr->is_pinned ) {
+ if (entry_ptr->is_protected) {
- pinned_entries_marked++;
+ protected_entries_marked++;
+ }
+ else if (entry_ptr->is_pinned) {
- } else {
+ pinned_entries_marked++;
+ }
+ else {
- other_entries_marked++;
- }
+ other_entries_marked++;
+ }
#endif /* H5C_DO_SANITY_CHECKS */
}
#endif /* end modified code */
- }
+ }
#if 1 /* modified code */
- /* Scan through the LRU list from back to front, and flush the
- * entries whose clear_on_unprotect flags are set. Observe that
- * any protected entries will not be on the LRU, and therefore
- * will not be flushed at this time.
- */
+ /* Scan through the LRU list from back to front, and flush the
+ * entries whose clear_on_unprotect flags are set. Observe that
+ * any protected entries will not be on the LRU, and therefore
+ * will not be flushed at this time.
+ */
- entries_cleared = 0;
- entries_examined = 0;
- initial_list_len = cache_ptr->LRU_list_len;
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ entries_cleared = 0;
+ entries_examined = 0;
+ initial_list_len = cache_ptr->LRU_list_len;
+ entry_ptr = cache_ptr->LRU_tail_ptr;
- while ( ( entry_ptr != NULL ) &&
- ( entries_examined <= initial_list_len ) &&
- ( entries_cleared < ce_array_len ) )
- {
- if ( entry_ptr->clear_on_unprotect ) {
+ while ((entry_ptr != NULL) && (entries_examined <= initial_list_len) &&
+ (entries_cleared < ce_array_len)) {
+ if (entry_ptr->clear_on_unprotect) {
- entry_ptr->clear_on_unprotect = FALSE;
- clear_ptr = entry_ptr;
- entry_ptr = entry_ptr->prev;
- entries_cleared++;
+ entry_ptr->clear_on_unprotect = FALSE;
+ clear_ptr = entry_ptr;
+ entry_ptr = entry_ptr->prev;
+ entries_cleared++;
- if ( H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- &first_flush,
- TRUE) < 0 ) {
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, clear_ptr->type,
+ clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, &first_flush,
+ TRUE) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
+ }
}
- } else {
+ else {
- entry_ptr = entry_ptr->prev;
+ entry_ptr = entry_ptr->prev;
+ }
+ entries_examined++;
}
- entries_examined++;
- }
#if H5C_DO_SANITY_CHECKS
- HDassert( entries_cleared == other_entries_marked );
+ HDassert(entries_cleared == other_entries_marked);
#endif /* H5C_DO_SANITY_CHECKS */
- /* It is also possible that some of the cleared entries are on the
- * pinned list. Must scan that also.
- */
+ /* It is also possible that some of the cleared entries are on the
+ * pinned list. Must scan that also.
+ */
- entry_ptr = cache_ptr->pel_head_ptr;
+ entry_ptr = cache_ptr->pel_head_ptr;
- while ( entry_ptr != NULL )
- {
- if ( entry_ptr->clear_on_unprotect ) {
+ while (entry_ptr != NULL) {
+ if (entry_ptr->clear_on_unprotect) {
- entry_ptr->clear_on_unprotect = FALSE;
- clear_ptr = entry_ptr;
- entry_ptr = entry_ptr->next;
- entries_cleared++;
+ entry_ptr->clear_on_unprotect = FALSE;
+ clear_ptr = entry_ptr;
+ entry_ptr = entry_ptr->next;
+ entries_cleared++;
- if ( H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- &first_flush,
- TRUE) < 0 ) {
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, clear_ptr->type,
+ clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, &first_flush,
+ TRUE) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
+ }
}
- } else {
+ else {
- entry_ptr = entry_ptr->next;
+ entry_ptr = entry_ptr->next;
+ }
}
- }
#if H5C_DO_SANITY_CHECKS
- HDassert( entries_cleared == pinned_entries_marked + other_entries_marked );
- HDassert( entries_cleared + protected_entries_marked == ce_array_len );
+ HDassert(entries_cleared == pinned_entries_marked + other_entries_marked);
+ HDassert(entries_cleared + protected_entries_marked == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert( ( entries_cleared == ce_array_len ) ||
- ( (ce_array_len - entries_cleared) <= cache_ptr->pl_len ) );
+ HDassert((entries_cleared == ce_array_len) ||
+ ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
#if H5C_DO_SANITY_CHECKS
- i = 0;
- entry_ptr = cache_ptr->pl_head_ptr;
- while ( entry_ptr != NULL )
- {
- if ( entry_ptr->clear_on_unprotect ) {
+ i = 0;
+ entry_ptr = cache_ptr->pl_head_ptr;
+ while (entry_ptr != NULL) {
+ if (entry_ptr->clear_on_unprotect) {
- i++;
+ i++;
+ }
+ entry_ptr = entry_ptr->next;
}
- entry_ptr = entry_ptr->next;
- }
- HDassert( (entries_cleared + i) == ce_array_len );
+ HDassert((entries_cleared + i) == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
#endif /* modified code */
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HDassert(0);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HDassert(0);
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_mark_entries_as_clean() */
+ } /* H5C_mark_entries_as_clean() */
#endif /* H5_HAVE_PARALLEL */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_mark_entry_dirty
- *
- * Purpose: Mark a pinned or protected entry as dirty. The target entry
- * MUST be either pinned or protected, and MAY be both.
- *
- * In the protected case, this call is the functional
- * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
- * call.
- *
- * In the pinned but not protected case, if the entry is not
- * already dirty, the function places function marks the entry
- * dirty and places it on the skip list.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 5/15/06
- *
- * JRM -- 11/5/08
- * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
- * update the new clean_index_size and dirty_index_size
- * fields of H5C_t in the case that the entry was clean
- * prior to this call, and is pinned and not protected.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_mark_entry_dirty(void *thing)
-{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_mark_entry_dirty
+ *
+ * Purpose: Mark a pinned or protected entry as dirty. The target entry
+ * MUST be either pinned or protected, and MAY be both.
+ *
+ * In the protected case, this call is the functional
+ * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
+ * call.
+ *
+ * In the pinned but not protected case, if the entry is not
+ * already dirty, the function places function marks the entry
+ * dirty and places it on the skip list.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 5/15/06
+ *
+ * JRM -- 11/5/08
+ * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
+ * update the new clean_index_size and dirty_index_size
+ * fields of H5C_t in the case that the entry was clean
+ * prior to this call, and is pinned and not protected.
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_mark_entry_dirty(void *thing)
+ {
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)thing;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
- cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( entry_ptr->is_protected ) {
- HDassert( ! ((entry_ptr)->is_read_only) );
+ if (entry_ptr->is_protected) {
+ HDassert(!((entry_ptr)->is_read_only));
- /* set the dirtied flag */
- entry_ptr->dirtied = TRUE;
+ /* set the dirtied flag */
+ entry_ptr->dirtied = TRUE;
+ }
+ else if (entry_ptr->is_pinned) {
+ hbool_t was_pinned_unprotected_and_clean;
- } else if ( entry_ptr->is_pinned ) {
- hbool_t was_pinned_unprotected_and_clean;
+ was_pinned_unprotected_and_clean = !(entry_ptr->is_dirty);
- was_pinned_unprotected_and_clean = ! ( entry_ptr->is_dirty );
+ /* mark the entry as dirty if it isn't already */
+ entry_ptr->is_dirty = TRUE;
- /* mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ if (was_pinned_unprotected_and_clean) {
- if ( was_pinned_unprotected_and_clean ) {
+ H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr);
+ }
- H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr);
- }
+ if (!(entry_ptr->in_slist)) {
- if ( ! (entry_ptr->in_slist) ) {
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ }
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
}
+ else {
- H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
-
- } else {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry is neither pinned nor protected??")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is neither pinned nor protected??")
+ }
done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_mark_entry_dirty() */
+ FUNC_LEAVE_NOAPI(ret_value)
+ } /* H5C_mark_entry_dirty() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_move_entry
- *
- * Purpose: Use this function to notify the cache that an entry's
- * file address changed.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 6/2/04
- *
- * JRM -- 11/5/08
- * On review this function looks like no change is needed to
- * support the new clean_index_size and dirty_index_size
- * fields of H5C_t.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_move_entry(H5C_t * cache_ptr,
- const H5C_class_t * type,
- haddr_t old_addr,
- haddr_t new_addr)
-{
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C_move_entry
+ *
+ * Purpose: Use this function to notify the cache that an entry's
+ * file address changed.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 6/2/04
+ *
+ * JRM -- 11/5/08
+ * On review this function looks like no change is needed to
+ * support the new clean_index_size and dirty_index_size
+ * fields of H5C_t.
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_move_entry(H5C_t * cache_ptr, const H5C_class_t *type, haddr_t old_addr, haddr_t new_addr)
+ {
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- hbool_t was_dirty;
+ hbool_t was_dirty;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * test_entry_ptr = NULL;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ H5C_cache_entry_t *test_entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- hbool_t removed_entry_from_slist = FALSE;
-#endif /* H5C_DO_SANITY_CHECKS */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t removed_entry_from_slist = FALSE;
+#endif /* H5C_DO_SANITY_CHECKS */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( H5F_addr_defined(old_addr) );
- HDassert( H5F_addr_defined(new_addr) );
- HDassert( H5F_addr_ne(old_addr, new_addr) );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(H5F_addr_defined(old_addr));
+ HDassert(H5F_addr_defined(new_addr));
+ HDassert(H5F_addr_ne(old_addr, new_addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- H5C__SEARCH_INDEX(cache_ptr, old_addr, entry_ptr, FAIL)
-
- if ( ( entry_ptr == NULL ) || ( entry_ptr->type != type ) ) {
-
- /* the old item doesn't exist in the cache, so we are done. */
- HGOTO_DONE(SUCCEED)
- }
+ H5C__SEARCH_INDEX(cache_ptr, old_addr, entry_ptr, FAIL)
- HDassert( entry_ptr->addr == old_addr );
- HDassert( entry_ptr->type == type );
+ if ((entry_ptr == NULL) || (entry_ptr->type != type)) {
- if ( entry_ptr->is_protected ) {
+ /* the old item doesn't exist in the cache, so we are done. */
+ HGOTO_DONE(SUCCEED)
+ }
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "Target entry is protected.")
- }
+ HDassert(entry_ptr->addr == old_addr);
+ HDassert(entry_ptr->type == type);
- H5C__SEARCH_INDEX(cache_ptr, new_addr, test_entry_ptr, FAIL)
+ if (entry_ptr->is_protected) {
- if ( test_entry_ptr != NULL ) { /* we are hosed */
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "Target entry is protected.")
+ }
- if ( test_entry_ptr->type == type ) {
+ H5C__SEARCH_INDEX(cache_ptr, new_addr, test_entry_ptr, FAIL)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "Target already moved & reinserted???.")
+ if (test_entry_ptr != NULL) { /* we are hosed */
- } else {
+ if (test_entry_ptr->type == type) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "New address already in use?.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "Target already moved & reinserted???.")
+ }
+ else {
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "New address already in use?.")
+ }
}
- }
- /* If we get this far we have work to do. Remove *entry_ptr from
- * the hash table (and skip list if necessary), change its address to the
- * new address, mark it as dirty (if it isn't already) and then re-insert.
- *
- * Update the replacement policy for a hit to avoid an eviction before
- * the moved entry is touched. Update stats for a move.
- *
- * Note that we do not check the size of the cache, or evict anything.
- * Since this is a simple re-name, cache size should be unaffected.
- *
- * Check to see if the target entry is in the process of being destroyed
- * before we delete from the index, etc. If it is, all we do is
- * change the addr. If the entry is only in the process of being flushed,
- * don't mark it as dirty either, lest we confuse the flush call back.
- */
+ /* If we get this far we have work to do. Remove *entry_ptr from
+ * the hash table (and skip list if necessary), change its address to the
+ * new address, mark it as dirty (if it isn't already) and then re-insert.
+ *
+ * Update the replacement policy for a hit to avoid an eviction before
+ * the moved entry is touched. Update stats for a move.
+ *
+ * Note that we do not check the size of the cache, or evict anything.
+ * Since this is a simple re-name, cache size should be unaffected.
+ *
+ * Check to see if the target entry is in the process of being destroyed
+ * before we delete from the index, etc. If it is, all we do is
+ * change the addr. If the entry is only in the process of being flushed,
+ * don't mark it as dirty either, lest we confuse the flush call back.
+ */
- if ( ! ( entry_ptr->destroy_in_progress ) ) {
+ if (!(entry_ptr->destroy_in_progress)) {
- H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr)
+ H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr)
- if ( entry_ptr->in_slist ) {
+ if (entry_ptr->in_slist) {
- HDassert( cache_ptr->slist_ptr );
+ HDassert(cache_ptr->slist_ptr);
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
#if H5C_DO_SANITY_CHECKS
- removed_entry_from_slist = TRUE;
+ removed_entry_from_slist = TRUE;
#endif /* H5C_DO_SANITY_CHECKS */
+ }
}
- }
- entry_ptr->addr = new_addr;
+ entry_ptr->addr = new_addr;
- if ( ! ( entry_ptr->destroy_in_progress ) ) {
+ if (!(entry_ptr->destroy_in_progress)) {
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- was_dirty = entry_ptr->is_dirty;
+ was_dirty = entry_ptr->is_dirty;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- if ( ! ( entry_ptr->flush_in_progress ) ) {
+ if (!(entry_ptr->flush_in_progress)) {
- entry_ptr->is_dirty = TRUE;
- }
+ entry_ptr->is_dirty = TRUE;
+ }
- H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
- if ( ! ( entry_ptr->flush_in_progress ) ) {
+ if (!(entry_ptr->flush_in_progress)) {
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
#if H5C_DO_SANITY_CHECKS
- if ( removed_entry_from_slist ) {
+ if (removed_entry_from_slist) {
- /* we just removed the entry from the slist. Thus we
- * must touch up cache_ptr->slist_len_increase and
- * cache_ptr->slist_size_increase to keep from skewing
- * the sanity checks.
- */
- HDassert( cache_ptr->slist_len_increase > 1 );
- HDassert( cache_ptr->slist_size_increase > entry_ptr->size );
+ /* we just removed the entry from the slist. Thus we
+ * must touch up cache_ptr->slist_len_increase and
+ * cache_ptr->slist_size_increase to keep from skewing
+ * the sanity checks.
+ */
+ HDassert(cache_ptr->slist_len_increase > 1);
+ HDassert(cache_ptr->slist_size_increase > entry_ptr->size);
- cache_ptr->slist_len_increase -= 1;
- cache_ptr->slist_size_increase -= entry_ptr->size;
- }
+ cache_ptr->slist_len_increase -= 1;
+ cache_ptr->slist_size_increase -= entry_ptr->size;
+ }
#endif /* H5C_DO_SANITY_CHECKS */
- H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
- }
- }
+ H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
+ }
+ }
- H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr)
+ H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_move_entry() */
+ } /* H5C_move_entry() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_resize_entry
- *
- * Purpose: Resize a pinned or protected entry.
- *
- * Resizing an entry dirties it, so if the entry is not
- * already dirty, the function places the entry on the
- * skip list.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 7/5/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_resize_entry(void *thing, size_t new_size)
-{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_resize_entry
+ *
+ * Purpose: Resize a pinned or protected entry.
+ *
+ * Resizing an entry dirties it, so if the entry is not
+ * already dirty, the function places the entry on the
+ * skip list.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 7/5/06
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_resize_entry(void *thing, size_t new_size)
+ {
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)thing;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
- cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- /* Check for usage errors */
- if(new_size <= 0)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "New size is non-positive.")
- if(!(entry_ptr->is_pinned || entry_ptr->is_protected))
- HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??")
+ /* Check for usage errors */
+ if (new_size <= 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "New size is non-positive.")
+ if (!(entry_ptr->is_pinned || entry_ptr->is_protected))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??")
- /* update for change in entry size if necessary */
- if ( entry_ptr->size != new_size ) {
- hbool_t was_clean;
+ /* update for change in entry size if necessary */
+ if (entry_ptr->size != new_size) {
+ hbool_t was_clean;
- /* make note of whether the entry was clean to begin with */
- was_clean = ! ( entry_ptr->is_dirty );
+ /* make note of whether the entry was clean to begin with */
+ was_clean = !(entry_ptr->is_dirty);
- /* mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ /* mark the entry as dirty if it isn't already */
+ entry_ptr->is_dirty = TRUE;
- /* do a flash cache size increase if appropriate */
- if ( cache_ptr->flash_size_increase_possible ) {
+ /* do a flash cache size increase if appropriate */
+ if (cache_ptr->flash_size_increase_possible) {
- if ( new_size > entry_ptr->size ) {
- size_t size_increase;
+ if (new_size > entry_ptr->size) {
+ size_t size_increase;
- size_increase = new_size - entry_ptr->size;
+ size_increase = new_size - entry_ptr->size;
- if(size_increase >= cache_ptr->flash_size_increase_threshold) {
- if(H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "flash cache increase failed")
+ if (size_increase >= cache_ptr->flash_size_increase_threshold) {
+ if (H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "flash cache increase failed")
+ }
}
}
- }
- /* update the pinned and/or protected entry list */
- if(entry_ptr->is_pinned) {
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pel_len), \
- (cache_ptr->pel_size), \
- (entry_ptr->size), (new_size))
- } /* end if */
- if(entry_ptr->is_protected) {
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pl_len), \
- (cache_ptr->pl_size), \
- (entry_ptr->size), (new_size))
- } /* end if */
+ /* update the pinned and/or protected entry list */
+ if (entry_ptr->is_pinned) {
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pel_len), (cache_ptr->pel_size),
+ (entry_ptr->size), (new_size))
+ } /* end if */
+ if (entry_ptr->is_protected) {
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pl_len), (cache_ptr->pl_size), (entry_ptr->size),
+ (new_size))
+ } /* end if */
- /* update the hash table */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
- (new_size), (entry_ptr), (was_clean));
+ /* update the hash table */
+ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size), (new_size), (entry_ptr),
+ (was_clean));
- /* if the entry is in the skip list, update that too */
- if ( entry_ptr->in_slist ) {
- H5C__UPDATE_SLIST_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
- (new_size));
- } /* end if */
+ /* if the entry is in the skip list, update that too */
+ if (entry_ptr->in_slist) {
+ H5C__UPDATE_SLIST_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size), (new_size));
+ } /* end if */
- /* update statistics just before changing the entry size */
- H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), \
- (new_size));
+ /* update statistics just before changing the entry size */
+ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), (new_size));
- /* finally, update the entry size proper */
- entry_ptr->size = new_size;
+ /* finally, update the entry size proper */
+ entry_ptr->size = new_size;
- if(!entry_ptr->in_slist) {
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
- } /* end if */
+ if (!entry_ptr->in_slist) {
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ } /* end if */
- if(entry_ptr->is_pinned) {
- H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
- } /* end if */
- } /* end if */
+ if (entry_ptr->is_pinned) {
+ H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
+ } /* end if */
+ } /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_resize_entry() */
+ FUNC_LEAVE_NOAPI(ret_value)
+ } /* H5C_resize_entry() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_pin_protected_entry()
- *
- * Purpose: Pin a protected cache entry. The entry must be protected
- * at the time of call, and must be unpinned.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 4/26/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_pin_protected_entry(void *thing)
-{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing; /* Pointer to entry to pin */
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_pin_protected_entry()
+ *
+ * Purpose: Pin a protected cache entry. The entry must be protected
+ * at the time of call, and must be unpinned.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 4/26/06
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_pin_protected_entry(void *thing)
+ {
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)thing; /* Pointer to entry to pin */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
- cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( ! ( entry_ptr->is_protected ) ) {
+ if (!(entry_ptr->is_protected)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry isn't protected")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry isn't protected")
+ }
- if ( entry_ptr->is_pinned ) {
+ if (entry_ptr->is_pinned) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry is already pinned")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry is already pinned")
+ }
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = TRUE;
- H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
+ H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_pin_protected_entry() */
+ } /* H5C_pin_protected_entry() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_protect
- *
- * Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
- *
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5C_unprotect() when
- * finished with the entry.
- *
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5C_protect. Any attempt to do so will result in a failure.
- *
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the insertion (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). This is useful in the
- * metadata cache, but may not be needed elsewhere. If so,
- * just use the same dxpl_id for both parameters.
- *
- * All reads are performed with the primary_dxpl_id.
- *
- * Similarly, the primary_dxpl_id is passed to the
- * check_write_permitted function if it is called.
- *
- * Return: Success: Ptr to the desired entry
- * Failure: NULL
- *
- * Programmer: John Mainzer - 6/2/04
- *
- * JRM -- 11/13/08
- * Modified function to call H5C_make_space_in_cache() when
- * the min_clean_size is violated, not just when there isn't
- * enough space for and entry that has just been loaded.
- *
- * The purpose of this modification is to avoid "metadata
- * blizzards" in the write only case. In such instances,
- * the cache was allowed to fill with dirty metadata. When
- * we finally needed to evict an entry to make space, we had
- * to flush out a whole cache full of metadata -- which has
- * interesting performance effects. We hope to avoid (or
- * perhaps more accurately hide) this effect by maintaining
- * the min_clean_size, which should force us to start flushing
- * entries long before we actually have to evict something
- * to make space.
- *
- *-------------------------------------------------------------------------
- */
-void *
-H5C_protect(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * udata,
- unsigned flags)
-{
- H5C_t * cache_ptr;
- hbool_t hit;
- hbool_t first_flush;
- hbool_t have_write_permitted = FALSE;
- hbool_t read_only = FALSE;
- hbool_t write_permitted;
- herr_t result;
- size_t empty_space;
- void * thing;
- H5C_cache_entry_t * entry_ptr;
- void * ret_value; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_protect
+ *
+ * Purpose: If the target entry is not in the cache, load it. If
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
+ *
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5C_unprotect() when
+ * finished with the entry.
+ *
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5C_protect. Any attempt to do so will result in a failure.
+ *
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the insertion (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). This is useful in the
+ * metadata cache, but may not be needed elsewhere. If so,
+ * just use the same dxpl_id for both parameters.
+ *
+ * All reads are performed with the primary_dxpl_id.
+ *
+ * Similarly, the primary_dxpl_id is passed to the
+ * check_write_permitted function if it is called.
+ *
+ * Return: Success: Ptr to the desired entry
+ * Failure: NULL
+ *
+ * Programmer: John Mainzer - 6/2/04
+ *
+ * JRM -- 11/13/08
+ * Modified function to call H5C_make_space_in_cache() when
+ * the min_clean_size is violated, not just when there isn't
+ * enough space for and entry that has just been loaded.
+ *
+ * The purpose of this modification is to avoid "metadata
+ * blizzards" in the write only case. In such instances,
+ * the cache was allowed to fill with dirty metadata. When
+ * we finally needed to evict an entry to make space, we had
+ * to flush out a whole cache full of metadata -- which has
+ * interesting performance effects. We hope to avoid (or
+ * perhaps more accurately hide) this effect by maintaining
+ * the min_clean_size, which should force us to start flushing
+ * entries long before we actually have to evict something
+ * to make space.
+ *
+ *-------------------------------------------------------------------------
+ */
+ void *H5C_protect(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, void *udata, unsigned flags)
+ {
+ H5C_t * cache_ptr;
+ hbool_t hit;
+ hbool_t first_flush;
+ hbool_t have_write_permitted = FALSE;
+ hbool_t read_only = FALSE;
+ hbool_t write_permitted;
+ herr_t result;
+ size_t empty_space;
+ void * thing;
+ H5C_cache_entry_t *entry_ptr;
+ void * ret_value; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_NOAPI(NULL)
- /* check args */
- HDassert( f );
- HDassert( f->shared );
+ /* check args */
+ HDassert(f);
+ HDassert(f->shared);
- cache_ptr = f->shared->cache;
+ cache_ptr = f->shared->cache;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( type->flush );
- HDassert( type->load );
- HDassert( H5F_addr_defined(addr) );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(type->flush);
+ HDassert(type->load);
+ HDassert(H5F_addr_defined(addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HDassert(0);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, \
- "LRU sanity check failed.\n");
- }
+ HDassert(0);
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "LRU sanity check failed.\n");
+ }
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- if ( (flags & H5C__READ_ONLY_FLAG) != 0 )
- {
- read_only = TRUE;
- }
-
- /* first check to see if the target is in cache */
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, NULL)
-
- if ( entry_ptr != NULL ) {
+ if ((flags & H5C__READ_ONLY_FLAG) != 0) {
+ read_only = TRUE;
+ }
- /* Check for trying to load the wrong type of entry from an address */
- if(entry_ptr->type != type)
- HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type")
+ /* first check to see if the target is in cache */
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, NULL)
- hit = TRUE;
- thing = (void *)entry_ptr;
+ if (entry_ptr != NULL) {
- } else {
+ /* Check for trying to load the wrong type of entry from an address */
+ if (entry_ptr->type != type)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type")
- /* must try to load the entry from disk. */
+ hit = TRUE;
+ thing = (void *)entry_ptr;
+ }
+ else {
- hit = FALSE;
+ /* must try to load the entry from disk. */
- thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata);
+ hit = FALSE;
- if ( thing == NULL ) {
+ thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry")
- }
+ if (thing == NULL) {
- entry_ptr = (H5C_cache_entry_t *)thing;
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry")
+ }
- /* If the entry is very large, and we are configured to allow it,
- * we may wish to perform a flash cache size increase.
- */
- if ( ( cache_ptr->flash_size_increase_possible ) &&
- ( entry_ptr->size > cache_ptr->flash_size_increase_threshold ) ) {
+ entry_ptr = (H5C_cache_entry_t *)thing;
- result = H5C__flash_increase_cache_size(cache_ptr, 0,
- entry_ptr->size);
+ /* If the entry is very large, and we are configured to allow it,
+ * we may wish to perform a flash cache size increase.
+ */
+ if ((cache_ptr->flash_size_increase_possible) &&
+ (entry_ptr->size > cache_ptr->flash_size_increase_threshold)) {
- if ( result < 0 ) {
+ result = H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "H5C__flash_increase_cache_size failed.")
- }
- }
+ if (result < 0) {
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__flash_increase_cache_size failed.")
+ }
+ }
- empty_space = 0;
+ if (cache_ptr->index_size >= cache_ptr->max_cache_size) {
- } else {
+ empty_space = 0;
+ }
+ else {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ }
- }
+ /* try to free up if necceary and if evictions are permitted. Note
+ * that if evictions are enabled, we will call H5C_make_space_in_cache()
+ * regardless if the min_free_space requirement is not met.
+ */
- /* try to free up if necceary and if evictions are permitted. Note
- * that if evictions are enabled, we will call H5C_make_space_in_cache()
- * regardless if the min_free_space requirement is not met.
- */
+ if ((cache_ptr->evictions_enabled) &&
+ (((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size) ||
+ ((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size))) {
- if ( ( cache_ptr->evictions_enabled ) &&
- ( ( (cache_ptr->index_size + entry_ptr->size) >
- cache_ptr->max_cache_size)
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size )
- )
- ) {
+ size_t space_needed;
- size_t space_needed;
+ if (empty_space <= entry_ptr->size) {
- if ( empty_space <= entry_ptr->size ) {
+ cache_ptr->cache_full = TRUE;
+ }
- cache_ptr->cache_full = TRUE;
+ if (cache_ptr->check_write_permitted != NULL) {
- }
+ result = (cache_ptr->check_write_permitted)(f, primary_dxpl_id, &write_permitted);
- if ( cache_ptr->check_write_permitted != NULL ) {
+ if (result < 0) {
- result = (cache_ptr->check_write_permitted)(f,
- primary_dxpl_id,
- &write_permitted);
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted 1")
+ }
+ else {
- if ( result < 0 ) {
+ have_write_permitted = TRUE;
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "Can't get write_permitted 1")
+ first_flush = TRUE;
+ }
+ }
+ else {
- } else {
+ write_permitted = cache_ptr->write_permitted;
have_write_permitted = TRUE;
first_flush = TRUE;
}
- } else {
- write_permitted = cache_ptr->write_permitted;
+ HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
- have_write_permitted = TRUE;
+ space_needed = entry_ptr->size;
- first_flush = TRUE;
- }
+ if (space_needed > cache_ptr->max_cache_size) {
+
+ space_needed = cache_ptr->max_cache_size;
+ }
- HDassert( entry_ptr->size <= H5C_MAX_ENTRY_SIZE );
+ /* Note that space_needed is just the amount of space that
+ * needed to insert the new entry without exceeding the cache
+ * size limit. The subsequent call to H5C_make_space_in_cache()
+ * may evict the entries required to free more or less space
+ * depending on conditions. It MAY be less if the cache is
+ * currently undersized, or more if the cache is oversized.
+ *
+ * The cache can exceed its maximum size limit via the following
+ * mechanisms:
+ *
+ * First, it is possible for the cache to grow without
+ * bound as long as entries are protected and not unprotected.
+ *
+ * Second, when writes are not permitted it is also possible
+ * for the cache to grow without bound.
+ *
+ * Third, the user may choose to disable evictions -- causing
+ * the cache to grow without bound until evictions are
+ * re-enabled.
+ *
+ * Finally, we usually don't check to see if the cache is
+ * oversized at the end of an unprotect. As a result, it is
+ * possible to have a vastly oversized cache with no protected
+ * entries as long as all the protects preceed the unprotects.
+ *
+ * Since items 1, 2, and 3 are not changing any time soon, I
+ * see no point in worrying about the fourth.
+ */
- space_needed = entry_ptr->size;
+ result = H5C_make_space_in_cache(f, primary_dxpl_id, secondary_dxpl_id, space_needed,
+ write_permitted, &first_flush);
- if ( space_needed > cache_ptr->max_cache_size ) {
+ if (result < 0) {
- space_needed = cache_ptr->max_cache_size;
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_make_space_in_cache failed 1.")
+ }
}
- /* Note that space_needed is just the amount of space that
- * needed to insert the new entry without exceeding the cache
- * size limit. The subsequent call to H5C_make_space_in_cache()
- * may evict the entries required to free more or less space
- * depending on conditions. It MAY be less if the cache is
- * currently undersized, or more if the cache is oversized.
- *
- * The cache can exceed its maximum size limit via the following
- * mechanisms:
- *
- * First, it is possible for the cache to grow without
- * bound as long as entries are protected and not unprotected.
- *
- * Second, when writes are not permitted it is also possible
- * for the cache to grow without bound.
- *
- * Third, the user may choose to disable evictions -- causing
- * the cache to grow without bound until evictions are
- * re-enabled.
+ /* Insert the entry in the hash table. It can't be dirty yet, so
+ * we don't even check to see if it should go in the skip list.
*
- * Finally, we usually don't check to see if the cache is
- * oversized at the end of an unprotect. As a result, it is
- * possible to have a vastly oversized cache with no protected
- * entries as long as all the protects preceed the unprotects.
- *
- * Since items 1, 2, and 3 are not changing any time soon, I
- * see no point in worrying about the fourth.
+ * This is no longer true -- due to a bug fix, we may modify
+ * data on load to repair a file.
*/
+ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL)
- result = H5C_make_space_in_cache(f, primary_dxpl_id,
- secondary_dxpl_id,
- space_needed, write_permitted,
- &first_flush);
-
- if ( result < 0 ) {
+ if ((entry_ptr->is_dirty) && (!(entry_ptr->in_slist))) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "H5C_make_space_in_cache failed 1.")
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, NULL)
}
- }
-
- /* Insert the entry in the hash table. It can't be dirty yet, so
- * we don't even check to see if it should go in the skip list.
- *
- * This is no longer true -- due to a bug fix, we may modify
- * data on load to repair a file.
- */
- H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL)
- if ( ( entry_ptr->is_dirty ) && ( ! (entry_ptr->in_slist) ) ) {
-
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, NULL)
+ /* insert the entry in the data structures used by the replacement
+ * policy. We are just going to take it out again when we update
+ * the replacement policy for a protect, but this simplifies the
+ * code. If we do this often enough, we may want to optimize this.
+ */
+ H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, NULL)
}
- /* insert the entry in the data structures used by the replacement
- * policy. We are just going to take it out again when we update
- * the replacement policy for a protect, but this simplifies the
- * code. If we do this often enough, we may want to optimize this.
- */
- H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, NULL)
- }
+ HDassert(entry_ptr->addr == addr);
+ HDassert(entry_ptr->type == type);
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->type == type );
+ if (entry_ptr->is_protected) {
- if ( entry_ptr->is_protected ) {
+ if ((read_only) && (entry_ptr->is_read_only)) {
- if ( ( read_only ) && ( entry_ptr->is_read_only ) ) {
+ HDassert(entry_ptr->ro_ref_count > 0);
- HDassert( entry_ptr->ro_ref_count > 0 );
+ (entry_ptr->ro_ref_count)++;
+ }
+ else {
- (entry_ptr->ro_ref_count)++;
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?.")
+ }
+ }
+ else {
- } else {
+ H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "Target already protected & not read only?!?.")
- }
- } else {
+ entry_ptr->is_protected = TRUE;
- H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
+ if (read_only) {
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_read_only = TRUE;
+ entry_ptr->ro_ref_count = 1;
+ }
- if ( read_only ) {
+ entry_ptr->dirtied = FALSE;
+ }
- entry_ptr->is_read_only = TRUE;
- entry_ptr->ro_ref_count = 1;
- }
+ H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit)
- entry_ptr->dirtied = FALSE;
- }
+ H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit)
- H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit)
+ ret_value = thing;
- H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit)
+ if ((cache_ptr->evictions_enabled) &&
+ ((cache_ptr->size_decreased) ||
+ ((cache_ptr->resize_enabled) &&
+ (cache_ptr->cache_accesses >= (cache_ptr->resize_ctl).epoch_length)))) {
- ret_value = thing;
+ if (!have_write_permitted) {
- if ( ( cache_ptr->evictions_enabled ) &&
- ( ( cache_ptr->size_decreased ) ||
- ( ( cache_ptr->resize_enabled ) &&
- ( cache_ptr->cache_accesses >=
- (cache_ptr->resize_ctl).epoch_length ) ) ) ) {
+ if (cache_ptr->check_write_permitted != NULL) {
- if ( ! have_write_permitted ) {
+ result = (cache_ptr->check_write_permitted)(f, primary_dxpl_id, &write_permitted);
- if ( cache_ptr->check_write_permitted != NULL ) {
+ if (result < 0) {
- result = (cache_ptr->check_write_permitted)(f,
- primary_dxpl_id,
- &write_permitted);
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted 2")
+ }
+ else {
- if ( result < 0 ) {
+ have_write_permitted = TRUE;
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "Can't get write_permitted 2")
+ first_flush = TRUE;
+ }
+ }
+ else {
- } else {
+ write_permitted = cache_ptr->write_permitted;
have_write_permitted = TRUE;
first_flush = TRUE;
}
- } else {
-
- write_permitted = cache_ptr->write_permitted;
-
- have_write_permitted = TRUE;
-
- first_flush = TRUE;
}
- }
- if ( ( cache_ptr->resize_enabled ) &&
- ( cache_ptr->cache_accesses >=
- (cache_ptr->resize_ctl).epoch_length ) ) {
+ if ((cache_ptr->resize_enabled) &&
+ (cache_ptr->cache_accesses >= (cache_ptr->resize_ctl).epoch_length)) {
- result = H5C__auto_adjust_cache_size(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- write_permitted,
- &first_flush);
- if ( result != SUCCEED ) {
+ result = H5C__auto_adjust_cache_size(f, primary_dxpl_id, secondary_dxpl_id, write_permitted,
+ &first_flush);
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "Cache auto-resize failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Cache auto-resize failed.")
+ }
}
- }
-
- if ( cache_ptr->size_decreased ) {
-
- cache_ptr->size_decreased = FALSE;
- /* check to see if the cache is now oversized due to the cache
- * size reduction. If it is, try to evict enough entries to
- * bring the cache size down to the current maximum cache size.
- *
- * Also, if the min_clean_size requirement is not met, we
- * should also call H5C_make_space_in_cache() to bring us
- * into complience.
- */
+ if (cache_ptr->size_decreased) {
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ cache_ptr->size_decreased = FALSE;
- empty_space = 0;
+ /* check to see if the cache is now oversized due to the cache
+ * size reduction. If it is, try to evict enough entries to
+ * bring the cache size down to the current maximum cache size.
+ *
+ * Also, if the min_clean_size requirement is not met, we
+ * should also call H5C_make_space_in_cache() to bring us
+ * into complience.
+ */
- } else {
+ if (cache_ptr->index_size >= cache_ptr->max_cache_size) {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = 0;
+ }
+ else {
- }
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ }
- if ( ( cache_ptr->index_size > cache_ptr->max_cache_size )
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size) ) {
+ if ((cache_ptr->index_size > cache_ptr->max_cache_size) ||
+ ((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)) {
- if ( cache_ptr->index_size > cache_ptr->max_cache_size ) {
+ if (cache_ptr->index_size > cache_ptr->max_cache_size) {
- cache_ptr->cache_full = TRUE;
- }
+ cache_ptr->cache_full = TRUE;
+ }
- result = H5C_make_space_in_cache(f, primary_dxpl_id,
- secondary_dxpl_id,
- (size_t)0, write_permitted,
- &first_flush);
+ result = H5C_make_space_in_cache(f, primary_dxpl_id, secondary_dxpl_id, (size_t)0,
+ write_permitted, &first_flush);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
- "H5C_make_space_in_cache failed 2.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_make_space_in_cache failed 2.")
+ }
}
}
}
- }
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_protect() */
+ } /* H5C_protect() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_reset_cache_hit_rate_stats()
- *
- * Purpose: Reset the cache hit rate computation fields.
- *
- * Return: SUCCEED on success, and FAIL on failure.
- *
- * Programmer: John Mainzer, 10/5/04
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C_reset_cache_hit_rate_stats()
+ *
+ * Purpose: Reset the cache hit rate computation fields.
+ *
+ * Return: SUCCEED on success, and FAIL on failure.
+ *
+ * Programmer: John Mainzer, 10/5/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
+ }
- cache_ptr->cache_hits = 0;
- cache_ptr->cache_accesses = 0;
+ cache_ptr->cache_hits = 0;
+ cache_ptr->cache_accesses = 0;
done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_reset_cache_hit_rate_stats() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5C_set_cache_auto_resize_config
- *
- * Purpose: Set the cache automatic resize configuration to the
- * provided values if they are in range, and fail if they
- * are not.
- *
- * If the new configuration enables automatic cache resizing,
- * coerce the cache max size and min clean size into agreement
- * with the new policy and re-set the full cache hit rate
- * stats.
- *
- * Return: SUCCEED on success, and FAIL on failure.
- *
- * Programmer: John Mainzer
- * 10/8/04
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
- H5C_auto_size_ctl_t *config_ptr)
-{
- herr_t result;
- size_t new_max_cache_size;
- size_t new_min_clean_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_LEAVE_NOAPI(ret_value)
- FUNC_ENTER_NOAPI(FAIL)
+ } /* H5C_reset_cache_hit_rate_stats() */
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ /*-------------------------------------------------------------------------
+ * Function: H5C_set_cache_auto_resize_config
+ *
+ * Purpose: Set the cache automatic resize configuration to the
+ * provided values if they are in range, and fail if they
+ * are not.
+ *
+ * If the new configuration enables automatic cache resizing,
+ * coerce the cache max size and min clean size into agreement
+ * with the new policy and re-set the full cache hit rate
+ * stats.
+ *
+ * Return: SUCCEED on success, and FAIL on failure.
+ *
+ * Programmer: John Mainzer
+ * 10/8/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_set_cache_auto_resize_config(H5C_t * cache_ptr, H5C_auto_size_ctl_t * config_ptr)
+ {
+ herr_t result;
+ size_t new_max_cache_size;
+ size_t new_min_clean_size;
+ herr_t ret_value = SUCCEED; /* Return value */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
+ FUNC_ENTER_NOAPI(FAIL)
- if ( config_ptr == NULL ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
+ }
- if ( config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER ) {
+ if (config_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry.")
+ }
- /* check general configuration section of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_GENERAL) ) {
+ if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in general configuration fields of new config.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version.")
+ }
- /* check size increase control fields of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_INCREMENT) ) {
+ /* check general configuration section of the config: */
+ if (SUCCEED != H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_GENERAL)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in the size increase control fields of new config.")
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in general configuration fields of new config.")
+ }
- /* check size decrease control fields of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_DECREMENT) ) {
+ /* check size increase control fields of the config: */
+ if (SUCCEED != H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INCREMENT)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in the size decrease control fields of new config.")
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "error in the size increase control fields of new config.")
+ }
- /* check for conflicts between size increase and size decrease controls: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) ) {
+ /* check size decrease control fields of the config: */
+ if (SUCCEED != H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_DECREMENT)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "conflicting threshold fields in new config.")
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "error in the size decrease control fields of new config.")
+ }
- /* will set the increase possible fields to FALSE later if needed */
- cache_ptr->size_increase_possible = TRUE;
- cache_ptr->flash_size_increase_possible = TRUE;
- cache_ptr->size_decrease_possible = TRUE;
+ /* check for conflicts between size increase and size decrease controls: */
+ if (SUCCEED != H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INTERACTIONS)) {
- switch ( config_ptr->incr_mode )
- {
- case H5C_incr__off:
- cache_ptr->size_increase_possible = FALSE;
- break;
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "conflicting threshold fields in new config.")
+ }
- case H5C_incr__threshold:
- if ( ( config_ptr->lower_hr_threshold <= (double)0.0f ) ||
- ( config_ptr->increment <= (double)1.0f ) ||
- ( ( config_ptr->apply_max_increment ) &&
- ( config_ptr->max_increment <= 0 ) ) ) {
+ /* will set the increase possible fields to FALSE later if needed */
+ cache_ptr->size_increase_possible = TRUE;
+ cache_ptr->flash_size_increase_possible = TRUE;
+ cache_ptr->size_decrease_possible = TRUE;
- cache_ptr->size_increase_possible = FALSE;
- }
- break;
+ switch (config_ptr->incr_mode) {
+ case H5C_incr__off:
+ cache_ptr->size_increase_possible = FALSE;
+ break;
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown incr_mode?!?!?.")
- }
+ case H5C_incr__threshold:
+ if ((config_ptr->lower_hr_threshold <= (double)0.0f) ||
+ (config_ptr->increment <= (double)1.0f) ||
+ ((config_ptr->apply_max_increment) && (config_ptr->max_increment <= 0))) {
- /* logically, this is were configuration for flash cache size increases
- * should go. However, this configuration depends on max_cache_size, so
- * we wait until the end of the function, when this field is set.
- */
+ cache_ptr->size_increase_possible = FALSE;
+ }
+ break;
- switch ( config_ptr->decr_mode )
- {
- case H5C_decr__off:
- cache_ptr->size_decrease_possible = FALSE;
- break;
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown incr_mode?!?!?.")
+ }
- case H5C_decr__threshold:
- if ( ( config_ptr->upper_hr_threshold >= (double)1.0f ) ||
- ( config_ptr->decrement >= (double)1.0f ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ) {
+ /* logically, this is were configuration for flash cache size increases
+ * should go. However, this configuration depends on max_cache_size, so
+ * we wait until the end of the function, when this field is set.
+ */
+ switch (config_ptr->decr_mode) {
+ case H5C_decr__off:
cache_ptr->size_decrease_possible = FALSE;
- }
- break;
+ break;
- case H5C_decr__age_out:
- if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ) {
+ case H5C_decr__threshold:
+ if ((config_ptr->upper_hr_threshold >= (double)1.0f) ||
+ (config_ptr->decrement >= (double)1.0f) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0))) {
- cache_ptr->size_decrease_possible = FALSE;
- }
- break;
+ cache_ptr->size_decrease_possible = FALSE;
+ }
+ break;
- case H5C_decr__age_out_with_threshold:
- if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ||
- ( config_ptr->upper_hr_threshold >= (double)1.0f ) ) {
+ case H5C_decr__age_out:
+ if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0))) {
- cache_ptr->size_decrease_possible = FALSE;
- }
- break;
+ cache_ptr->size_decrease_possible = FALSE;
+ }
+ break;
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown decr_mode?!?!?.")
- }
+ case H5C_decr__age_out_with_threshold:
+ if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)) ||
+ (config_ptr->upper_hr_threshold >= (double)1.0f)) {
- if ( config_ptr->max_size == config_ptr->min_size ) {
+ cache_ptr->size_decrease_possible = FALSE;
+ }
+ break;
- cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
- cache_ptr->size_decrease_possible = FALSE;
- }
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown decr_mode?!?!?.")
+ }
- /* flash_size_increase_possible is intentionally omitted from the
- * following:
- */
- cache_ptr->resize_enabled = cache_ptr->size_increase_possible ||
- cache_ptr->size_decrease_possible;
+ if (config_ptr->max_size == config_ptr->min_size) {
- cache_ptr->resize_ctl = *config_ptr;
+ cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->size_decrease_possible = FALSE;
+ }
- /* Resize the cache to the supplied initial value if requested, or as
- * necessary to force it within the bounds of the current automatic
- * cache resizing configuration.
- *
- * Note that the min_clean_fraction may have changed, so we
- * go through the exercise even if the current size is within
- * range and an initial size has not been provided.
- */
- if ( (cache_ptr->resize_ctl).set_initial_size ) {
+ /* flash_size_increase_possible is intentionally omitted from the
+ * following:
+ */
+ cache_ptr->resize_enabled = cache_ptr->size_increase_possible || cache_ptr->size_decrease_possible;
- new_max_cache_size = (cache_ptr->resize_ctl).initial_size;
- }
- else if ( cache_ptr->max_cache_size > (cache_ptr->resize_ctl).max_size ) {
+ cache_ptr->resize_ctl = *config_ptr;
- new_max_cache_size = (cache_ptr->resize_ctl).max_size;
- }
- else if ( cache_ptr->max_cache_size < (cache_ptr->resize_ctl).min_size ) {
+ /* Resize the cache to the supplied initial value if requested, or as
+ * necessary to force it within the bounds of the current automatic
+ * cache resizing configuration.
+ *
+ * Note that the min_clean_fraction may have changed, so we
+ * go through the exercise even if the current size is within
+ * range and an initial size has not been provided.
+ */
+ if ((cache_ptr->resize_ctl).set_initial_size) {
- new_max_cache_size = (cache_ptr->resize_ctl).min_size;
+ new_max_cache_size = (cache_ptr->resize_ctl).initial_size;
+ }
+ else if (cache_ptr->max_cache_size > (cache_ptr->resize_ctl).max_size) {
- } else {
+ new_max_cache_size = (cache_ptr->resize_ctl).max_size;
+ }
+ else if (cache_ptr->max_cache_size < (cache_ptr->resize_ctl).min_size) {
- new_max_cache_size = cache_ptr->max_cache_size;
- }
+ new_max_cache_size = (cache_ptr->resize_ctl).min_size;
+ }
+ else {
- new_min_clean_size = (size_t)
- ((double)new_max_cache_size *
- ((cache_ptr->resize_ctl).min_clean_fraction));
+ new_max_cache_size = cache_ptr->max_cache_size;
+ }
+ new_min_clean_size =
+ (size_t)((double)new_max_cache_size * ((cache_ptr->resize_ctl).min_clean_fraction));
- /* since new_min_clean_size is of type size_t, we have
- *
- * ( 0 <= new_min_clean_size )
- *
- * by definition.
- */
- HDassert( new_min_clean_size <= new_max_cache_size );
- HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size );
- HDassert( new_max_cache_size <= (cache_ptr->resize_ctl).max_size );
+ /* since new_min_clean_size is of type size_t, we have
+ *
+ * ( 0 <= new_min_clean_size )
+ *
+ * by definition.
+ */
+ HDassert(new_min_clean_size <= new_max_cache_size);
+ HDassert((cache_ptr->resize_ctl).min_size <= new_max_cache_size);
+ HDassert(new_max_cache_size <= (cache_ptr->resize_ctl).max_size);
- if ( new_max_cache_size < cache_ptr->max_cache_size ) {
+ if (new_max_cache_size < cache_ptr->max_cache_size) {
- cache_ptr->size_decreased = TRUE;
- }
+ cache_ptr->size_decreased = TRUE;
+ }
- cache_ptr->max_cache_size = new_max_cache_size;
- cache_ptr->min_clean_size = new_min_clean_size;
+ cache_ptr->max_cache_size = new_max_cache_size;
+ cache_ptr->min_clean_size = new_min_clean_size;
- if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
+ if (H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED) {
- /* this should be impossible... */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_reset_cache_hit_rate_stats failed.")
- }
+ /* this should be impossible... */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed.")
+ }
- /* remove excess epoch markers if any */
- if ( ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold ) ||
- ( config_ptr->decr_mode == H5C_decr__age_out ) ) {
+ /* remove excess epoch markers if any */
+ if ((config_ptr->decr_mode == H5C_decr__age_out_with_threshold) ||
+ (config_ptr->decr_mode == H5C_decr__age_out)) {
- if ( cache_ptr->epoch_markers_active >
- (cache_ptr->resize_ctl).epochs_before_eviction ) {
+ if (cache_ptr->epoch_markers_active > (cache_ptr->resize_ctl).epochs_before_eviction) {
- result =
- H5C__autoadjust__ageout__remove_excess_markers(cache_ptr);
+ result = H5C__autoadjust__ageout__remove_excess_markers(cache_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "can't remove excess epoch markers.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers.")
+ }
}
}
- } else if ( cache_ptr->epoch_markers_active > 0 ) {
+ else if (cache_ptr->epoch_markers_active > 0) {
- result = H5C__autoadjust__ageout__remove_all_markers(cache_ptr);
+ result = H5C__autoadjust__ageout__remove_all_markers(cache_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "error removing all epoch markers.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers.")
+ }
}
- }
- /* configure flash size increase facility. We wait until the
- * end of the function, as we need the max_cache_size set before
- * we start to keep things simple.
- *
- * If we haven't already ruled out flash cache size increases above,
- * go ahead and configure it.
- */
+ /* configure flash size increase facility. We wait until the
+ * end of the function, as we need the max_cache_size set before
+ * we start to keep things simple.
+ *
+ * If we haven't already ruled out flash cache size increases above,
+ * go ahead and configure it.
+ */
- if ( cache_ptr->flash_size_increase_possible ) {
+ if (cache_ptr->flash_size_increase_possible) {
- switch ( config_ptr->flash_incr_mode )
- {
- case H5C_flash_incr__off:
- cache_ptr->flash_size_increase_possible = FALSE;
- break;
+ switch (config_ptr->flash_incr_mode) {
+ case H5C_flash_incr__off:
+ cache_ptr->flash_size_increase_possible = FALSE;
+ break;
- case H5C_flash_incr__add_space:
- cache_ptr->flash_size_increase_possible = TRUE;
- cache_ptr->flash_size_increase_threshold =
- (size_t)
- (((double)(cache_ptr->max_cache_size)) *
- ((cache_ptr->resize_ctl).flash_threshold));
- break;
+ case H5C_flash_incr__add_space:
+ cache_ptr->flash_size_increase_possible = TRUE;
+ cache_ptr->flash_size_increase_threshold = (size_t)(
+ ((double)(cache_ptr->max_cache_size)) * ((cache_ptr->resize_ctl).flash_threshold));
+ break;
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Unknown flash_incr_mode?!?!?.")
- break;
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?.")
+ break;
+ }
}
- }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_set_cache_auto_resize_config() */
+ } /* H5C_set_cache_auto_resize_config() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_set_evictions_enabled()
- *
- * Purpose: Set cache_ptr->evictions_enabled to the value of the
- * evictions enabled parameter.
- *
- * Return: SUCCEED on success, and FAIL on failure.
- *
- * Programmer: John Mainzer
- * 7/27/07
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_set_evictions_enabled(H5C_t *cache_ptr,
- hbool_t evictions_enabled)
-{
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_set_evictions_enabled()
+ *
+ * Purpose: Set cache_ptr->evictions_enabled to the value of the
+ * evictions enabled parameter.
+ *
+ * Return: SUCCEED on success, and FAIL on failure.
+ *
+ * Programmer: John Mainzer
+ * 7/27/07
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_set_evictions_enabled(H5C_t * cache_ptr, hbool_t evictions_enabled)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
+ }
- if ( ( evictions_enabled != TRUE ) && ( evictions_enabled != FALSE ) ) {
+ if ((evictions_enabled != TRUE) && (evictions_enabled != FALSE)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Bad evictions_enabled on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad evictions_enabled on entry.")
+ }
- /* There is no fundamental reason why we should not permit
- * evictions to be disabled while automatic resize is enabled.
- * However, I can't think of any good reason why one would
- * want to, and allowing it would greatly complicate testing
- * the feature. Hence the following:
- */
- if ( ( evictions_enabled != TRUE ) &&
- ( ( cache_ptr->resize_ctl.incr_mode != H5C_incr__off ) ||
- ( cache_ptr->resize_ctl.decr_mode != H5C_decr__off ) ) ) {
+ /* There is no fundamental reason why we should not permit
+ * evictions to be disabled while automatic resize is enabled.
+ * However, I can't think of any good reason why one would
+ * want to, and allowing it would greatly complicate testing
+ * the feature. Hence the following:
+ */
+ if ((evictions_enabled != TRUE) && ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off))) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Can't disable evictions when auto resize enabled.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled.")
+ }
- cache_ptr->evictions_enabled = evictions_enabled;
+ cache_ptr->evictions_enabled = evictions_enabled;
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_set_evictions_enabled() */
+ } /* H5C_set_evictions_enabled() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_set_prefix
- *
- * Purpose: Set the values of the prefix field of H5C_t. This
- * filed is used to label some debugging output.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 1/20/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_set_prefix(H5C_t * cache_ptr, char * prefix)
-{
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_set_prefix
+ *
+ * Purpose: Set the values of the prefix field of H5C_t. This
+ * filed is used to label some debugging output.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 1/20/06
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_set_prefix(H5C_t * cache_ptr, char *prefix)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) ||
- ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ||
- ( prefix == NULL ) ||
- ( HDstrlen(prefix) >= H5C__PREFIX_LEN ) ) {
+ if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC) || (prefix == NULL) ||
+ (HDstrlen(prefix) >= H5C__PREFIX_LEN)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
+ }
- HDstrncpy(&(cache_ptr->prefix[0]), prefix, (size_t)(H5C__PREFIX_LEN));
+ HDstrncpy(&(cache_ptr->prefix[0]), prefix, (size_t)(H5C__PREFIX_LEN));
- cache_ptr->prefix[H5C__PREFIX_LEN - 1] = '\0';
+ cache_ptr->prefix[H5C__PREFIX_LEN - 1] = '\0';
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_set_prefix() */
+ } /* H5C_set_prefix() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_set_trace_file_ptr
- *
- * Purpose: Set the trace_file_ptr field for the cache.
- *
- * This field must either be NULL (which turns of trace
- * file logging), or be a pointer to an open file to which
- * trace file data is to be written.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 1/20/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_set_trace_file_ptr(H5C_t * cache_ptr,
- FILE * trace_file_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_set_trace_file_ptr
+ *
+ * Purpose: Set the trace_file_ptr field for the cache.
+ *
+ * This field must either be NULL (which turns of trace
+ * file logging), or be a pointer to an open file to which
+ * trace file data is to be written.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 1/20/06
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_set_trace_file_ptr(H5C_t * cache_ptr, FILE * trace_file_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* This would normally be an assert, but we need to use an HGOTO_ERROR
- * call to shut up the compiler.
- */
- if ( ( ! cache_ptr ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ /* This would normally be an assert, but we need to use an HGOTO_ERROR
+ * call to shut up the compiler.
+ */
+ if ((!cache_ptr) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr")
+ }
- cache_ptr->trace_file_ptr = trace_file_ptr;
+ cache_ptr->trace_file_ptr = trace_file_ptr;
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_set_trace_file_ptr() */
+ } /* H5C_set_trace_file_ptr() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_stats
- *
- * Purpose: Prints statistics about the cache.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 6/2/04
- *
- * JRM -- 11/13/08
- * Added code displaying the max_clean_index_size and
- * max_dirty_index_size.
- *
- * MAM -- 01/06/09
- * Added code displaying the calls_to_msic,
- * total_entries_skipped_in_msic, total_entries_scanned_in_msic,
- * and max_entries_skipped_in_msic fields.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_stats(H5C_t * cache_ptr,
- const char * cache_name,
- hbool_t
+ /*-------------------------------------------------------------------------
+ * Function: H5C_stats
+ *
+ * Purpose: Prints statistics about the cache.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 6/2/04
+ *
+ * JRM -- 11/13/08
+ * Added code displaying the max_clean_index_size and
+ * max_dirty_index_size.
+ *
+ * MAM -- 01/06/09
+ * Added code displaying the calls_to_msic,
+ * total_entries_skipped_in_msic, total_entries_scanned_in_msic,
+ * and max_entries_skipped_in_msic fields.
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_stats(H5C_t * cache_ptr, const char *cache_name,
+ hbool_t
#if !H5C_COLLECT_CACHE_STATS
- H5_ATTR_UNUSED
+ H5_ATTR_UNUSED
#endif /* H5C_COLLECT_CACHE_STATS */
- display_detailed_stats)
-{
- herr_t ret_value = SUCCEED; /* Return value */
+ display_detailed_stats)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
#if H5C_COLLECT_CACHE_STATS
- int i;
- int64_t total_hits = 0;
- int64_t total_misses = 0;
- int64_t total_write_protects = 0;
- int64_t total_read_protects = 0;
- int64_t max_read_protects = 0;
- int64_t total_insertions = 0;
- int64_t total_pinned_insertions = 0;
- int64_t total_clears = 0;
- int64_t total_flushes = 0;
- int64_t total_evictions = 0;
- int64_t total_moves = 0;
- int64_t total_entry_flush_moves = 0;
- int64_t total_cache_flush_moves = 0;
- int64_t total_size_increases = 0;
- int64_t total_size_decreases = 0;
- int64_t total_entry_flush_size_changes = 0;
- int64_t total_cache_flush_size_changes = 0;
- int64_t total_pins = 0;
- int64_t total_unpins = 0;
- int64_t total_dirty_pins = 0;
- int64_t total_pinned_flushes = 0;
- int64_t total_pinned_clears = 0;
- int32_t aggregate_max_accesses = 0;
- int32_t aggregate_min_accesses = 1000000;
- int32_t aggregate_max_clears = 0;
- int32_t aggregate_max_flushes = 0;
- size_t aggregate_max_size = 0;
- int32_t aggregate_max_pins = 0;
- double hit_rate;
- double average_successful_search_depth = 0.0;
- double average_failed_search_depth = 0.0;
- double average_entries_skipped_per_calls_to_msic = 0.0;
- double average_entries_scanned_per_calls_to_msic = 0.0;
+ int i;
+ int64_t total_hits = 0;
+ int64_t total_misses = 0;
+ int64_t total_write_protects = 0;
+ int64_t total_read_protects = 0;
+ int64_t max_read_protects = 0;
+ int64_t total_insertions = 0;
+ int64_t total_pinned_insertions = 0;
+ int64_t total_clears = 0;
+ int64_t total_flushes = 0;
+ int64_t total_evictions = 0;
+ int64_t total_moves = 0;
+ int64_t total_entry_flush_moves = 0;
+ int64_t total_cache_flush_moves = 0;
+ int64_t total_size_increases = 0;
+ int64_t total_size_decreases = 0;
+ int64_t total_entry_flush_size_changes = 0;
+ int64_t total_cache_flush_size_changes = 0;
+ int64_t total_pins = 0;
+ int64_t total_unpins = 0;
+ int64_t total_dirty_pins = 0;
+ int64_t total_pinned_flushes = 0;
+ int64_t total_pinned_clears = 0;
+ int32_t aggregate_max_accesses = 0;
+ int32_t aggregate_min_accesses = 1000000;
+ int32_t aggregate_max_clears = 0;
+ int32_t aggregate_max_flushes = 0;
+ size_t aggregate_max_size = 0;
+ int32_t aggregate_max_pins = 0;
+ double hit_rate;
+ double average_successful_search_depth = 0.0;
+ double average_failed_search_depth = 0.0;
+ double average_entries_skipped_per_calls_to_msic = 0.0;
+ double average_entries_scanned_per_calls_to_msic = 0.0;
#endif /* H5C_COLLECT_CACHE_STATS */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* This would normally be an assert, but we need to use an HGOTO_ERROR
- * call to shut up the compiler.
- */
- if ( ( ! cache_ptr ) ||
- ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ||
- ( !cache_name ) ) {
+ /* This would normally be an assert, but we need to use an HGOTO_ERROR
+ * call to shut up the compiler.
+ */
+ if ((!cache_ptr) || (cache_ptr->magic != H5C__H5C_T_MAGIC) || (!cache_name)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or cache_name")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or cache_name")
+ }
#if H5C_COLLECT_CACHE_STATS
- for ( i = 0; i <= cache_ptr->max_type_id; i++ ) {
-
- total_hits += cache_ptr->hits[i];
- total_misses += cache_ptr->misses[i];
- total_write_protects += cache_ptr->write_protects[i];
- total_read_protects += cache_ptr->read_protects[i];
- if ( max_read_protects < cache_ptr->max_read_protects[i] ) {
- max_read_protects = cache_ptr->max_read_protects[i];
- }
- total_insertions += cache_ptr->insertions[i];
- total_pinned_insertions += cache_ptr->pinned_insertions[i];
- total_clears += cache_ptr->clears[i];
- total_flushes += cache_ptr->flushes[i];
- total_evictions += cache_ptr->evictions[i];
- total_moves += cache_ptr->moves[i];
- total_entry_flush_moves
- += cache_ptr->entry_flush_moves[i];
- total_cache_flush_moves
- += cache_ptr->cache_flush_moves[i];
- total_size_increases += cache_ptr->size_increases[i];
- total_size_decreases += cache_ptr->size_decreases[i];
- total_entry_flush_size_changes
- += cache_ptr->entry_flush_size_changes[i];
- total_cache_flush_size_changes
- += cache_ptr->cache_flush_size_changes[i];
- total_pins += cache_ptr->pins[i];
- total_unpins += cache_ptr->unpins[i];
- total_dirty_pins += cache_ptr->dirty_pins[i];
- total_pinned_flushes += cache_ptr->pinned_flushes[i];
- total_pinned_clears += cache_ptr->pinned_clears[i];
+ for (i = 0; i <= cache_ptr->max_type_id; i++) {
+
+ total_hits += cache_ptr->hits[i];
+ total_misses += cache_ptr->misses[i];
+ total_write_protects += cache_ptr->write_protects[i];
+ total_read_protects += cache_ptr->read_protects[i];
+ if (max_read_protects < cache_ptr->max_read_protects[i]) {
+ max_read_protects = cache_ptr->max_read_protects[i];
+ }
+ total_insertions += cache_ptr->insertions[i];
+ total_pinned_insertions += cache_ptr->pinned_insertions[i];
+ total_clears += cache_ptr->clears[i];
+ total_flushes += cache_ptr->flushes[i];
+ total_evictions += cache_ptr->evictions[i];
+ total_moves += cache_ptr->moves[i];
+ total_entry_flush_moves += cache_ptr->entry_flush_moves[i];
+ total_cache_flush_moves += cache_ptr->cache_flush_moves[i];
+ total_size_increases += cache_ptr->size_increases[i];
+ total_size_decreases += cache_ptr->size_decreases[i];
+ total_entry_flush_size_changes += cache_ptr->entry_flush_size_changes[i];
+ total_cache_flush_size_changes += cache_ptr->cache_flush_size_changes[i];
+ total_pins += cache_ptr->pins[i];
+ total_unpins += cache_ptr->unpins[i];
+ total_dirty_pins += cache_ptr->dirty_pins[i];
+ total_pinned_flushes += cache_ptr->pinned_flushes[i];
+ total_pinned_clears += cache_ptr->pinned_clears[i];
#if H5C_COLLECT_CACHE_ENTRY_STATS
- if ( aggregate_max_accesses < cache_ptr->max_accesses[i] )
- aggregate_max_accesses = cache_ptr->max_accesses[i];
- if ( aggregate_min_accesses > aggregate_max_accesses )
- aggregate_min_accesses = aggregate_max_accesses;
- if ( aggregate_min_accesses > cache_ptr->min_accesses[i] )
- aggregate_min_accesses = cache_ptr->min_accesses[i];
- if ( aggregate_max_clears < cache_ptr->max_clears[i] )
- aggregate_max_clears = cache_ptr->max_clears[i];
- if ( aggregate_max_flushes < cache_ptr->max_flushes[i] )
- aggregate_max_flushes = cache_ptr->max_flushes[i];
- if ( aggregate_max_size < cache_ptr->max_size[i] )
- aggregate_max_size = cache_ptr->max_size[i];
- if ( aggregate_max_pins < cache_ptr->max_pins[i] )
- aggregate_max_pins = cache_ptr->max_pins[i];
+ if (aggregate_max_accesses < cache_ptr->max_accesses[i])
+ aggregate_max_accesses = cache_ptr->max_accesses[i];
+ if (aggregate_min_accesses > aggregate_max_accesses)
+ aggregate_min_accesses = aggregate_max_accesses;
+ if (aggregate_min_accesses > cache_ptr->min_accesses[i])
+ aggregate_min_accesses = cache_ptr->min_accesses[i];
+ if (aggregate_max_clears < cache_ptr->max_clears[i])
+ aggregate_max_clears = cache_ptr->max_clears[i];
+ if (aggregate_max_flushes < cache_ptr->max_flushes[i])
+ aggregate_max_flushes = cache_ptr->max_flushes[i];
+ if (aggregate_max_size < cache_ptr->max_size[i])
+ aggregate_max_size = cache_ptr->max_size[i];
+ if (aggregate_max_pins < cache_ptr->max_pins[i])
+ aggregate_max_pins = cache_ptr->max_pins[i];
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- }
+ }
- if ( ( total_hits > 0 ) || ( total_misses > 0 ) ) {
+ if ((total_hits > 0) || (total_misses > 0)) {
- hit_rate = 100.0 * ((double)(total_hits)) /
- ((double)(total_hits + total_misses));
- } else {
- hit_rate = 0.0;
- }
+ hit_rate = 100.0 * ((double)(total_hits)) / ((double)(total_hits + total_misses));
+ }
+ else {
+ hit_rate = 0.0;
+ }
- if ( cache_ptr->successful_ht_searches > 0 ) {
+ if (cache_ptr->successful_ht_searches > 0) {
- average_successful_search_depth =
- ((double)(cache_ptr->total_successful_ht_search_depth)) /
- ((double)(cache_ptr->successful_ht_searches));
- }
+ average_successful_search_depth = ((double)(cache_ptr->total_successful_ht_search_depth)) /
+ ((double)(cache_ptr->successful_ht_searches));
+ }
- if ( cache_ptr->failed_ht_searches > 0 ) {
+ if (cache_ptr->failed_ht_searches > 0) {
- average_failed_search_depth =
- ((double)(cache_ptr->total_failed_ht_search_depth)) /
- ((double)(cache_ptr->failed_ht_searches));
- }
+ average_failed_search_depth = ((double)(cache_ptr->total_failed_ht_search_depth)) /
+ ((double)(cache_ptr->failed_ht_searches));
+ }
+ HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name);
- HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n",
- cache_ptr->prefix, cache_name);
-
- HDfprintf(stdout, "\n");
-
- HDfprintf(stdout,
- "%s hash table insertion / deletions = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->total_ht_insertions),
- (long)(cache_ptr->total_ht_deletions));
-
- HDfprintf(stdout,
- "%s HT successful / failed searches = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->successful_ht_searches),
- (long)(cache_ptr->failed_ht_searches));
-
- HDfprintf(stdout,
- "%s Av. HT suc / failed search depth = %f / %f\n",
- cache_ptr->prefix,
- average_successful_search_depth,
- average_failed_search_depth);
-
- HDfprintf(stdout,
- "%s current (max) index size / length = %ld (%ld) / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->index_size),
- (long)(cache_ptr->max_index_size),
- (long)(cache_ptr->index_len),
- (long)(cache_ptr->max_index_len));
-
- HDfprintf(stdout,
- "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->clean_index_size),
- (long)(cache_ptr->max_clean_index_size),
- (long)(cache_ptr->dirty_index_size),
- (long)(cache_ptr->max_dirty_index_size));
-
- HDfprintf(stdout,
- "%s current (max) slist size / length = %ld (%ld) / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->slist_size),
- (long)(cache_ptr->max_slist_size),
- (long)(cache_ptr->slist_len),
- (long)(cache_ptr->max_slist_len));
-
- HDfprintf(stdout,
- "%s current (max) PL size / length = %ld (%ld) / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->pl_size),
- (long)(cache_ptr->max_pl_size),
- (long)(cache_ptr->pl_len),
- (long)(cache_ptr->max_pl_len));
-
- HDfprintf(stdout,
- "%s current (max) PEL size / length = %ld (%ld) / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->pel_size),
- (long)(cache_ptr->max_pel_size),
- (long)(cache_ptr->pel_len),
- (long)(cache_ptr->max_pel_len));
-
- HDfprintf(stdout,
- "%s current LRU list size / length = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->LRU_list_size),
- (long)(cache_ptr->LRU_list_len));
-
- HDfprintf(stdout,
- "%s current clean LRU size / length = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->cLRU_list_size),
- (long)(cache_ptr->cLRU_list_len));
-
- HDfprintf(stdout,
- "%s current dirty LRU size / length = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->dLRU_list_size),
- (long)(cache_ptr->dLRU_list_len));
-
- HDfprintf(stdout,
- "%s Total hits / misses / hit_rate = %ld / %ld / %f\n",
- cache_ptr->prefix,
- (long)total_hits,
- (long)total_misses,
- hit_rate);
-
- HDfprintf(stdout,
- "%s Total write / read (max) protects = %ld / %ld (%ld)\n",
- cache_ptr->prefix,
- (long)total_write_protects,
- (long)total_read_protects,
- (long)max_read_protects);
-
- HDfprintf(stdout,
- "%s Total clears / flushes / evictions = %ld / %ld / %ld\n",
- cache_ptr->prefix,
- (long)total_clears,
- (long)total_flushes,
- (long)total_evictions);
-
- HDfprintf(stdout,
- "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n",
- cache_ptr->prefix,
- (long)total_insertions,
- (long)total_pinned_insertions,
- (long)total_moves);
-
- HDfprintf(stdout,
- "%s Total entry / cache flush moves = %ld / %ld\n",
- cache_ptr->prefix,
- (long)total_entry_flush_moves,
- (long)total_cache_flush_moves);
-
- HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n",
- cache_ptr->prefix,
- (long)total_size_increases,
- (long)total_size_decreases);
-
- HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n",
- cache_ptr->prefix,
- (long)total_entry_flush_size_changes,
- (long)total_cache_flush_size_changes);
-
- HDfprintf(stdout,
- "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n",
- cache_ptr->prefix,
- (long)total_pins,
- (long)total_dirty_pins,
- (long)total_unpins);
-
- HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n",
- cache_ptr->prefix,
- (long)total_pinned_flushes,
- (long)total_pinned_clears);
-
- HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n",
- cache_ptr->prefix,
- (long long)(cache_ptr->calls_to_msic));
-
- if (cache_ptr->calls_to_msic > 0) {
- average_entries_skipped_per_calls_to_msic =
- (((double)(cache_ptr->total_entries_skipped_in_msic)) /
- ((double)(cache_ptr->calls_to_msic)));
- }
+ HDfprintf(stdout, "\n");
- HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n",
- cache_ptr->prefix,
- (float)average_entries_skipped_per_calls_to_msic,
- (long)(cache_ptr->max_entries_skipped_in_msic));
+ HDfprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions));
- if (cache_ptr->calls_to_msic > 0) {
- average_entries_scanned_per_calls_to_msic =
- (((double)(cache_ptr->total_entries_scanned_in_msic)) /
- ((double)(cache_ptr->calls_to_msic)));
- }
+ HDfprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches));
+
+ HDfprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix,
+ average_successful_search_depth, average_failed_search_depth);
- HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n",
- cache_ptr->prefix,
- (float)average_entries_scanned_per_calls_to_msic,
- (long)(cache_ptr->max_entries_scanned_in_msic));
+ HDfprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %ld (%ld)\n",
+ cache_ptr->prefix, (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size),
+ (long)(cache_ptr->index_len), (long)(cache_ptr->max_index_len));
- HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n",
- cache_ptr->prefix,
- (long long)(cache_ptr->entries_scanned_to_make_space));
+ HDfprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n",
+ cache_ptr->prefix, (long)(cache_ptr->clean_index_size),
+ (long)(cache_ptr->max_clean_index_size), (long)(cache_ptr->dirty_index_size),
+ (long)(cache_ptr->max_dirty_index_size));
- HDfprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n",
- cache_ptr->prefix,
- (long long)(cache_ptr->total_entries_scanned_in_msic -
- cache_ptr->entries_scanned_to_make_space));
+ HDfprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %ld (%ld)\n",
+ cache_ptr->prefix, (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size),
+ (long)(cache_ptr->slist_len), (long)(cache_ptr->max_slist_len));
+
+ HDfprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %ld (%ld)\n",
+ cache_ptr->prefix, (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size),
+ (long)(cache_ptr->pl_len), (long)(cache_ptr->max_pl_len));
+
+ HDfprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %ld (%ld)\n",
+ cache_ptr->prefix, (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size),
+ (long)(cache_ptr->pel_len), (long)(cache_ptr->max_pel_len));
+
+ HDfprintf(stdout, "%s current LRU list size / length = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->LRU_list_size), (long)(cache_ptr->LRU_list_len));
+
+ HDfprintf(stdout, "%s current clean LRU size / length = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->cLRU_list_size), (long)(cache_ptr->cLRU_list_len));
+
+ HDfprintf(stdout, "%s current dirty LRU size / length = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->dLRU_list_size), (long)(cache_ptr->dLRU_list_len));
+
+ HDfprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
+ (long)total_hits, (long)total_misses, hit_rate);
+
+ HDfprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix,
+ (long)total_write_protects, (long)total_read_protects, (long)max_read_protects);
+
+ HDfprintf(stdout, "%s Total clears / flushes / evictions = %ld / %ld / %ld\n", cache_ptr->prefix,
+ (long)total_clears, (long)total_flushes, (long)total_evictions);
+
+ HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_insertions, (long)total_pinned_insertions, (long)total_moves);
+
+ HDfprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_moves, (long)total_cache_flush_moves);
+
+ HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_size_increases, (long)total_size_decreases);
+
+ HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes);
+
+ HDfprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_pins, (long)total_dirty_pins, (long)total_unpins);
+
+ HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_pinned_flushes, (long)total_pinned_clears);
+
+ HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->calls_to_msic));
+
+ if (cache_ptr->calls_to_msic > 0) {
+ average_entries_skipped_per_calls_to_msic =
+ (((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
+ }
+
+ HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix,
+ (float)average_entries_skipped_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_skipped_in_msic));
+
+ if (cache_ptr->calls_to_msic > 0) {
+ average_entries_scanned_per_calls_to_msic =
+ (((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
+ }
+
+ HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix,
+ (float)average_entries_scanned_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_scanned_in_msic));
+
+ HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->entries_scanned_to_make_space));
+
+ HDfprintf(
+ stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space));
#if H5C_COLLECT_CACHE_ENTRY_STATS
- HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n",
- cache_ptr->prefix,
- (int)aggregate_max_accesses,
- (int)aggregate_min_accesses);
+ HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_accesses, (int)aggregate_min_accesses);
- HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n",
- cache_ptr->prefix,
- (int)aggregate_max_clears,
- (int)aggregate_max_flushes);
+ HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_clears, (int)aggregate_max_flushes);
- HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n",
- cache_ptr->prefix,
- (int)aggregate_max_size,
- (int)aggregate_max_pins);
+ HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_size, (int)aggregate_max_pins);
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- if ( display_detailed_stats )
- {
+ if (display_detailed_stats) {
- for ( i = 0; i <= cache_ptr->max_type_id; i++ ) {
+ for (i = 0; i <= cache_ptr->max_type_id; i++) {
- HDfprintf(stdout, "\n");
+ HDfprintf(stdout, "\n");
- HDfprintf(stdout, "%s Stats on %s:\n",
- cache_ptr->prefix,
- ((cache_ptr->type_name_table_ptr))[i]);
+ HDfprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix,
+ ((cache_ptr->type_name_table_ptr))[i]);
- if ( ( cache_ptr->hits[i] > 0 ) || ( cache_ptr->misses[i] > 0 ) ) {
+ if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0)) {
- hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) /
- ((double)(cache_ptr->hits[i] + cache_ptr->misses[i]));
- } else {
- hit_rate = 0.0;
- }
+ hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) /
+ ((double)(cache_ptr->hits[i] + cache_ptr->misses[i]));
+ }
+ else {
+ hit_rate = 0.0;
+ }
- HDfprintf(stdout,
- "%s hits / misses / hit_rate = %ld / %ld / %f\n",
- cache_ptr->prefix,
- (long)(cache_ptr->hits[i]),
- (long)(cache_ptr->misses[i]),
- hit_rate);
+ HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n",
+ cache_ptr->prefix, (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]),
+ hit_rate);
- HDfprintf(stdout,
- "%s write / read (max) protects = %ld / %ld (%d)\n",
- cache_ptr->prefix,
- (long)(cache_ptr->write_protects[i]),
- (long)(cache_ptr->read_protects[i]),
- (int)(cache_ptr->max_read_protects[i]));
-
- HDfprintf(stdout,
- "%s clears / flushes / evictions = %ld / %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->clears[i]),
- (long)(cache_ptr->flushes[i]),
- (long)(cache_ptr->evictions[i]));
-
- HDfprintf(stdout,
- "%s insertions(pinned) / moves = %ld(%ld) / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->insertions[i]),
- (long)(cache_ptr->pinned_insertions[i]),
- (long)(cache_ptr->moves[i]));
-
- HDfprintf(stdout,
- "%s entry / cache flush moves = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_moves[i]),
- (long)(cache_ptr->cache_flush_moves[i]));
-
- HDfprintf(stdout,
- "%s size increases / decreases = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->size_increases[i]),
- (long)(cache_ptr->size_decreases[i]));
-
- HDfprintf(stdout,
- "%s entry/cache flush size changes = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_size_changes[i]),
- (long)(cache_ptr->cache_flush_size_changes[i]));
-
-
- HDfprintf(stdout,
- "%s entry pins / unpins = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->pins[i]),
- (long)(cache_ptr->unpins[i]));
-
- HDfprintf(stdout,
- "%s entry dirty pins/pin'd flushes = %ld / %ld\n",
- cache_ptr->prefix,
- (long)(cache_ptr->dirty_pins[i]),
- (long)(cache_ptr->pinned_flushes[i]));
+ HDfprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n",
+ cache_ptr->prefix, (long)(cache_ptr->write_protects[i]),
+ (long)(cache_ptr->read_protects[i]), (int)(cache_ptr->max_read_protects[i]));
-#if H5C_COLLECT_CACHE_ENTRY_STATS
+ HDfprintf(stdout, "%s clears / flushes / evictions = %ld / %ld / %ld\n",
+ cache_ptr->prefix, (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i]),
+ (long)(cache_ptr->evictions[i]));
- HDfprintf(stdout,
- "%s entry max / min accesses = %d / %d\n",
- cache_ptr->prefix,
- cache_ptr->max_accesses[i],
- cache_ptr->min_accesses[i]);
+ HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]),
+ (long)(cache_ptr->moves[i]));
- HDfprintf(stdout,
- "%s entry max_clears / max_flushes = %d / %d\n",
- cache_ptr->prefix,
- cache_ptr->max_clears[i],
- cache_ptr->max_flushes[i]);
+ HDfprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i]));
- HDfprintf(stdout,
- "%s entry max_size / max_pins = %d / %d\n",
- cache_ptr->prefix,
- (int)(cache_ptr->max_size[i]),
- (int)(cache_ptr->max_pins[i]));
+ HDfprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i]));
+ HDfprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_size_changes[i]),
+ (long)(cache_ptr->cache_flush_size_changes[i]));
-#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
+ HDfprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i]));
+ HDfprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i]));
+
+#if H5C_COLLECT_CACHE_ENTRY_STATS
+
+ HDfprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]);
+
+ HDfprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_clears[i], cache_ptr->max_flushes[i]);
+
+ HDfprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i]));
+
+#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
+ }
}
- }
- HDfprintf(stdout, "\n");
+ HDfprintf(stdout, "\n");
#endif /* H5C_COLLECT_CACHE_STATS */
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_stats() */
+ } /* H5C_stats() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_stats__reset
- *
- * Purpose: Reset the stats fields to their initial values.
- *
- * Return: void
- *
- * Programmer: John Mainzer, 4/28/04
- *
- * JRM 11/13/08
- * Added initialization for the new max_clean_index_size and
- * max_dirty_index_size fields.
- *
- * MAM -- 01/06/09
- * Added code to initalize the calls_to_msic,
- * total_entries_skipped_in_msic, total_entries_scanned_in_msic,
- * and max_entries_skipped_in_msic fields.
- *
- *-------------------------------------------------------------------------
- */
-void
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C_stats__reset
+ *
+ * Purpose: Reset the stats fields to their initial values.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer, 4/28/04
+ *
+ * JRM 11/13/08
+ * Added initialization for the new max_clean_index_size and
+ * max_dirty_index_size fields.
+ *
+ * MAM -- 01/06/09
+ * Added code to initalize the calls_to_msic,
+ * total_entries_skipped_in_msic, total_entries_scanned_in_msic,
+ * and max_entries_skipped_in_msic fields.
+ *
+ *-------------------------------------------------------------------------
+ */
+ void
#ifndef NDEBUG
-H5C_stats__reset(H5C_t * cache_ptr)
+ H5C_stats__reset(H5C_t * cache_ptr)
#else /* NDEBUG */
#if H5C_COLLECT_CACHE_STATS
-H5C_stats__reset(H5C_t * cache_ptr)
-#else /* H5C_COLLECT_CACHE_STATS */
-H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr)
+H5C_stats__reset(H5C_t *cache_ptr)
+#else /* H5C_COLLECT_CACHE_STATS */
+H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr)
#endif /* H5C_COLLECT_CACHE_STATS */
#endif /* NDEBUG */
-{
+ {
#if H5C_COLLECT_CACHE_STATS
- int i;
+ int i;
#endif /* H5C_COLLECT_CACHE_STATS */
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#if H5C_COLLECT_CACHE_STATS
- for ( i = 0; i <= cache_ptr->max_type_id; i++ )
- {
- cache_ptr->hits[i] = 0;
- cache_ptr->misses[i] = 0;
- cache_ptr->write_protects[i] = 0;
- cache_ptr->read_protects[i] = 0;
- cache_ptr->max_read_protects[i] = 0;
- cache_ptr->insertions[i] = 0;
- cache_ptr->pinned_insertions[i] = 0;
- cache_ptr->clears[i] = 0;
- cache_ptr->flushes[i] = 0;
- cache_ptr->evictions[i] = 0;
- cache_ptr->moves[i] = 0;
- cache_ptr->entry_flush_moves[i] = 0;
- cache_ptr->cache_flush_moves[i] = 0;
- cache_ptr->pins[i] = 0;
- cache_ptr->unpins[i] = 0;
- cache_ptr->dirty_pins[i] = 0;
- cache_ptr->pinned_flushes[i] = 0;
- cache_ptr->pinned_clears[i] = 0;
- cache_ptr->size_increases[i] = 0;
- cache_ptr->size_decreases[i] = 0;
- cache_ptr->entry_flush_size_changes[i] = 0;
- cache_ptr->cache_flush_size_changes[i] = 0;
- }
+ for (i = 0; i <= cache_ptr->max_type_id; i++) {
+ cache_ptr->hits[i] = 0;
+ cache_ptr->misses[i] = 0;
+ cache_ptr->write_protects[i] = 0;
+ cache_ptr->read_protects[i] = 0;
+ cache_ptr->max_read_protects[i] = 0;
+ cache_ptr->insertions[i] = 0;
+ cache_ptr->pinned_insertions[i] = 0;
+ cache_ptr->clears[i] = 0;
+ cache_ptr->flushes[i] = 0;
+ cache_ptr->evictions[i] = 0;
+ cache_ptr->moves[i] = 0;
+ cache_ptr->entry_flush_moves[i] = 0;
+ cache_ptr->cache_flush_moves[i] = 0;
+ cache_ptr->pins[i] = 0;
+ cache_ptr->unpins[i] = 0;
+ cache_ptr->dirty_pins[i] = 0;
+ cache_ptr->pinned_flushes[i] = 0;
+ cache_ptr->pinned_clears[i] = 0;
+ cache_ptr->size_increases[i] = 0;
+ cache_ptr->size_decreases[i] = 0;
+ cache_ptr->entry_flush_size_changes[i] = 0;
+ cache_ptr->cache_flush_size_changes[i] = 0;
+ }
- cache_ptr->total_ht_insertions = 0;
- cache_ptr->total_ht_deletions = 0;
- cache_ptr->successful_ht_searches = 0;
- cache_ptr->total_successful_ht_search_depth = 0;
- cache_ptr->failed_ht_searches = 0;
- cache_ptr->total_failed_ht_search_depth = 0;
+ cache_ptr->total_ht_insertions = 0;
+ cache_ptr->total_ht_deletions = 0;
+ cache_ptr->successful_ht_searches = 0;
+ cache_ptr->total_successful_ht_search_depth = 0;
+ cache_ptr->failed_ht_searches = 0;
+ cache_ptr->total_failed_ht_search_depth = 0;
- cache_ptr->max_index_len = 0;
- cache_ptr->max_index_size = (size_t)0;
- cache_ptr->max_clean_index_size = (size_t)0;
- cache_ptr->max_dirty_index_size = (size_t)0;
+ cache_ptr->max_index_len = 0;
+ cache_ptr->max_index_size = (size_t)0;
+ cache_ptr->max_clean_index_size = (size_t)0;
+ cache_ptr->max_dirty_index_size = (size_t)0;
- cache_ptr->max_slist_len = 0;
- cache_ptr->max_slist_size = (size_t)0;
+ cache_ptr->max_slist_len = 0;
+ cache_ptr->max_slist_size = (size_t)0;
- cache_ptr->max_pl_len = 0;
- cache_ptr->max_pl_size = (size_t)0;
+ cache_ptr->max_pl_len = 0;
+ cache_ptr->max_pl_size = (size_t)0;
- cache_ptr->max_pel_len = 0;
- cache_ptr->max_pel_size = (size_t)0;
+ cache_ptr->max_pel_len = 0;
+ cache_ptr->max_pel_size = (size_t)0;
- cache_ptr->calls_to_msic = 0;
- cache_ptr->total_entries_skipped_in_msic = 0;
- cache_ptr->total_entries_scanned_in_msic = 0;
- cache_ptr->max_entries_skipped_in_msic = 0;
- cache_ptr->max_entries_scanned_in_msic = 0;
- cache_ptr->entries_scanned_to_make_space = 0;
+ cache_ptr->calls_to_msic = 0;
+ cache_ptr->total_entries_skipped_in_msic = 0;
+ cache_ptr->total_entries_scanned_in_msic = 0;
+ cache_ptr->max_entries_skipped_in_msic = 0;
+ cache_ptr->max_entries_scanned_in_msic = 0;
+ cache_ptr->entries_scanned_to_make_space = 0;
#if H5C_COLLECT_CACHE_ENTRY_STATS
- for ( i = 0; i <= cache_ptr->max_type_id; i++ )
- {
- cache_ptr->max_accesses[i] = 0;
- cache_ptr->min_accesses[i] = 1000000;
- cache_ptr->max_clears[i] = 0;
- cache_ptr->max_flushes[i] = 0;
- cache_ptr->max_size[i] = (size_t)0;
- cache_ptr->max_pins[i] = 0;
- }
+ for (i = 0; i <= cache_ptr->max_type_id; i++) {
+ cache_ptr->max_accesses[i] = 0;
+ cache_ptr->min_accesses[i] = 1000000;
+ cache_ptr->max_clears[i] = 0;
+ cache_ptr->max_flushes[i] = 0;
+ cache_ptr->max_size[i] = (size_t)0;
+ cache_ptr->max_pins[i] = 0;
+ }
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
#endif /* H5C_COLLECT_CACHE_STATS */
- return;
+ return;
-} /* H5C_stats__reset() */
+ } /* H5C_stats__reset() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_dump_cache
- *
- * Purpose: Print a summary of the contents of the metadata cache for
- * debugging purposes.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 10/10/10
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_dump_cache(H5C_t * cache_ptr,
- const char * cache_name)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5SL_t * slist_ptr = NULL;
- H5SL_node_t * node_ptr = NULL;
+ /*-------------------------------------------------------------------------
+ * Function: H5C_dump_cache
+ *
+ * Purpose: Print a summary of the contents of the metadata cache for
+ * debugging purposes.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 10/10/10
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_dump_cache(H5C_t * cache_ptr, const char *cache_name)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int i;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ H5SL_t * slist_ptr = NULL;
+ H5SL_node_t * node_ptr = NULL;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_name != NULL );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_name != NULL);
- /* First, create a skip list */
- slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL);
+ /* First, create a skip list */
+ slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL);
- if ( slist_ptr == NULL ) {
+ if (slist_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list.")
+ }
- /* Next, scan the index, and insert all entries in the skip list.
- * Do this, as we want to display cache entries in increasing address
- * order.
- */
- for ( i = 0; i < H5C__HASH_TABLE_LEN; i++ ) {
+ /* Next, scan the index, and insert all entries in the skip list.
+ * Do this, as we want to display cache entries in increasing address
+ * order.
+ */
+ for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
- entry_ptr = cache_ptr->index[i];
+ entry_ptr = cache_ptr->index[i];
- while ( entry_ptr != NULL ) {
+ while (entry_ptr != NULL) {
- HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- if ( H5SL_insert(slist_ptr, entry_ptr, &(entry_ptr->addr)) < 0 ) {
+ if (H5SL_insert(slist_ptr, entry_ptr, &(entry_ptr->addr)) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
- "Can't insert entry in skip list")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Can't insert entry in skip list")
+ }
- entry_ptr = entry_ptr->ht_next;
+ entry_ptr = entry_ptr->ht_next;
+ }
}
- }
-
- /* If we get this far, all entries in the cache are listed in the
- * skip list -- scan the skip list generating the desired output.
- */
- HDfprintf(stdout, "\n\nDump of metadata cache \"%s\".\n", cache_name);
- HDfprintf(stdout,
- "Num: Addr: Len: Type: Prot: Pinned: Dirty:\n");
+ /* If we get this far, all entries in the cache are listed in the
+ * skip list -- scan the skip list generating the desired output.
+ */
- i = 0;
+ HDfprintf(stdout, "\n\nDump of metadata cache \"%s\".\n", cache_name);
+ HDfprintf(stdout, "Num: Addr: Len: Type: Prot: Pinned: Dirty:\n");
- node_ptr = H5SL_first(slist_ptr);
+ i = 0;
- if ( node_ptr != NULL ) {
+ node_ptr = H5SL_first(slist_ptr);
- entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
+ if (node_ptr != NULL) {
- } else {
+ entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
+ }
+ else {
- entry_ptr = NULL;
- }
+ entry_ptr = NULL;
+ }
- while ( entry_ptr != NULL ) {
+ while (entry_ptr != NULL) {
- HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDfprintf(stdout,
- "%s%d 0x%08llx 0x%3llx %2d %d %d %d\n",
- cache_ptr->prefix, i,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->size),
- (int)(entry_ptr->type->id),
- (int)(entry_ptr->is_protected),
- (int)(entry_ptr->is_pinned),
- (int)(entry_ptr->is_dirty));
+ HDfprintf(stdout, "%s%d 0x%08llx 0x%3llx %2d %d %d %d\n",
+ cache_ptr->prefix, i, (long long)(entry_ptr->addr), (long long)(entry_ptr->size),
+ (int)(entry_ptr->type->id), (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned),
+ (int)(entry_ptr->is_dirty));
- /* increment node_ptr before we delete its target */
- node_ptr = H5SL_next(node_ptr);
+ /* increment node_ptr before we delete its target */
+ node_ptr = H5SL_next(node_ptr);
- /* remove the first item in the skip list */
- if ( H5SL_remove(slist_ptr, &(entry_ptr->addr)) != entry_ptr ) {
+ /* remove the first item in the skip list */
+ if (H5SL_remove(slist_ptr, &(entry_ptr->addr)) != entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
- "Can't delete entry from skip list.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Can't delete entry from skip list.")
+ }
- if ( node_ptr != NULL ) {
+ if (node_ptr != NULL) {
- entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
+ entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
+ }
+ else {
- } else {
+ entry_ptr = NULL;
+ }
- entry_ptr = NULL;
+ i++;
}
- i++;
- }
-
- HDfprintf(stdout, "\n\n");
+ HDfprintf(stdout, "\n\n");
- /* Finally, discard the skip list */
+ /* Finally, discard the skip list */
- HDassert( H5SL_count(slist_ptr) == 0 );
+ HDassert(H5SL_count(slist_ptr) == 0);
- H5SL_close(slist_ptr);
+ H5SL_close(slist_ptr);
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_dump_cache() */
+ } /* H5C_dump_cache() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_unpin_entry()
- *
- * Purpose: Unpin a cache entry. The entry must be unprotected at
- * the time of call, and must be pinned.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 3/22/06
- *
- * Modifications:
- *
- * JRM -- 4/26/06
- * Modified routine to allow it to operate on protected
- * entries.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_unpin_entry(void *_entry_ptr)
-{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)_entry_ptr; /* Pointer to entry to unpin */
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ * Function: H5C_unpin_entry()
+ *
+ * Purpose: Unpin a cache entry. The entry must be unprotected at
+ * the time of call, and must be pinned.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 3/22/06
+ *
+ * Modifications:
+ *
+ * JRM -- 4/26/06
+ * Modified routine to allow it to operate on protected
+ * entries.
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_unpin_entry(void *_entry_ptr)
+ {
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)_entry_ptr; /* Pointer to entry to unpin */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- /* Sanity check */
- HDassert(entry_ptr);
- cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Sanity check */
+ HDassert(entry_ptr);
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( ! ( entry_ptr->is_pinned ) ) {
+ if (!(entry_ptr->is_pinned)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry isn't pinned")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry isn't pinned")
+ }
- if ( ! ( entry_ptr->is_protected ) ) {
+ if (!(entry_ptr->is_protected)) {
- H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL)
- }
+ H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL)
+ }
- entry_ptr->is_pinned = FALSE;
+ entry_ptr->is_pinned = FALSE;
- H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
+ H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_unpin_entry() */
+ } /* H5C_unpin_entry() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_unprotect
- *
- * Purpose: Undo an H5C_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
- *
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5C_protect() and the THING
- * argument must be the value returned by that call to
- * H5C_protect().
- *
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the unprotect (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). Since an uprotect cannot
- * occasion a write at present, all this is moot for now.
- * However, things change, and in any case,
- * H5C_flush_single_entry() needs primary_dxpl_id and
- * secondary_dxpl_id in its parameter list.
- *
- * The function can't cause a read either, so the dxpl_id
- * parameters are moot in this case as well.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 6/2/04
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_unprotect(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags)
-{
- H5C_t * cache_ptr;
- hbool_t deleted;
- hbool_t dirtied;
- hbool_t set_flush_marker;
- hbool_t pin_entry;
- hbool_t unpin_entry;
- hbool_t free_file_space;
- hbool_t take_ownership;
- hbool_t was_clean;
+ /*-------------------------------------------------------------------------
+ * Function: H5C_unprotect
+ *
+ * Purpose: Undo an H5C_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
+ *
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5C_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5C_protect().
+ *
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the unprotect (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). Since an uprotect cannot
+ * occasion a write at present, all this is moot for now.
+ * However, things change, and in any case,
+ * H5C_flush_single_entry() needs primary_dxpl_id and
+ * secondary_dxpl_id in its parameter list.
+ *
+ * The function can't cause a read either, so the dxpl_id
+ * parameters are moot in this case as well.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 6/2/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_unprotect(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, void *thing, unsigned int flags)
+ {
+ H5C_t * cache_ptr;
+ hbool_t deleted;
+ hbool_t dirtied;
+ hbool_t set_flush_marker;
+ hbool_t pin_entry;
+ hbool_t unpin_entry;
+ hbool_t free_file_space;
+ hbool_t take_ownership;
+ hbool_t was_clean;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_entry = FALSE;
+ hbool_t clear_entry = FALSE;
#endif /* H5_HAVE_PARALLEL */
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * test_entry_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- deleted = ( (flags & H5C__DELETED_FLAG) != 0 );
- dirtied = ( (flags & H5C__DIRTIED_FLAG) != 0 );
- set_flush_marker = ( (flags & H5C__SET_FLUSH_MARKER_FLAG) != 0 );
- pin_entry = ( (flags & H5C__PIN_ENTRY_FLAG) != 0 );
- unpin_entry = ( (flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
- free_file_space = ( (flags & H5C__FREE_FILE_SPACE_FLAG) != 0 );
- take_ownership = ( (flags & H5C__TAKE_OWNERSHIP_FLAG) != 0 );
-
- HDassert( f );
- HDassert( f->shared );
-
- cache_ptr = f->shared->cache;
-
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( type->clear );
- HDassert( type->flush );
- HDassert( H5F_addr_defined(addr) );
- HDassert( thing );
- HDassert( ! ( pin_entry && unpin_entry ) );
- HDassert( ( ! free_file_space ) || ( deleted ) ); /* deleted flag must accompany free_file_space */
- HDassert( ( ! take_ownership ) || ( deleted ) ); /* deleted flag must accompany take_ownership */
- HDassert( ! ( free_file_space && take_ownership ) ); /* can't have both free_file_space & take_ownership */
+ H5C_cache_entry_t *entry_ptr;
+ H5C_cache_entry_t *test_entry_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ deleted = ((flags & H5C__DELETED_FLAG) != 0);
+ dirtied = ((flags & H5C__DIRTIED_FLAG) != 0);
+ set_flush_marker = ((flags & H5C__SET_FLUSH_MARKER_FLAG) != 0);
+ pin_entry = ((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ unpin_entry = ((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
+ free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0);
+ take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ cache_ptr = f->shared->cache;
+
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(type->clear);
+ HDassert(type->flush);
+ HDassert(H5F_addr_defined(addr));
+ HDassert(thing);
+ HDassert(!(pin_entry && unpin_entry));
+ HDassert((!free_file_space) || (deleted)); /* deleted flag must accompany free_file_space */
+ HDassert((!take_ownership) || (deleted)); /* deleted flag must accompany take_ownership */
+ HDassert(!(free_file_space && take_ownership)); /* can't have both free_file_space & take_ownership */
- entry_ptr = (H5C_cache_entry_t *)thing;
+ entry_ptr = (H5C_cache_entry_t *)thing;
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->type == type );
+ HDassert(entry_ptr->addr == addr);
+ HDassert(entry_ptr->type == type);
- /* also set the dirtied variable if the dirtied field is set in
- * the entry.
- */
- dirtied |= entry_ptr->dirtied;
- was_clean = ! ( entry_ptr->is_dirty );
+ /* also set the dirtied variable if the dirtied field is set in
+ * the entry.
+ */
+ dirtied |= entry_ptr->dirtied;
+ was_clean = !(entry_ptr->is_dirty);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
+ /* if the entry has multiple read only protects, just decrement
+ * the ro_ref_counter. Don't actually unprotect until the ref count
+ * drops to zero.
+ */
+ if (entry_ptr->ro_ref_count > 1) {
- /* if the entry has multiple read only protects, just decrement
- * the ro_ref_counter. Don't actually unprotect until the ref count
- * drops to zero.
- */
- if ( entry_ptr->ro_ref_count > 1 ) {
-
- HDassert( entry_ptr->is_protected );
- HDassert( entry_ptr->is_read_only );
+ HDassert(entry_ptr->is_protected);
+ HDassert(entry_ptr->is_read_only);
- if ( dirtied ) {
+ if (dirtied) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "Read only entry modified(1)??")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified(1)??")
+ }
- (entry_ptr->ro_ref_count)--;
+ (entry_ptr->ro_ref_count)--;
- /* Pin or unpin the entry as requested. */
- if ( pin_entry ) {
+ /* Pin or unpin the entry as requested. */
+ if (pin_entry) {
- if ( entry_ptr->is_pinned ) {
+ if (entry_ptr->is_pinned) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, \
- "Entry already pinned???")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry already pinned???")
+ }
+ entry_ptr->is_pinned = TRUE;
+ H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
}
- entry_ptr->is_pinned = TRUE;
- H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
+ else if (unpin_entry) {
- } else if ( unpin_entry ) {
+ if (!(entry_ptr->is_pinned)) {
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, \
- "Entry already unpinned???")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry already unpinned???")
+ }
+ entry_ptr->is_pinned = FALSE;
+ H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
}
- entry_ptr->is_pinned = FALSE;
- H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
-
}
+ else {
- } else {
-
- if ( entry_ptr->is_read_only ) {
+ if (entry_ptr->is_read_only) {
- HDassert( entry_ptr->ro_ref_count == 1 );
+ HDassert(entry_ptr->ro_ref_count == 1);
- if ( dirtied ) {
+ if (dirtied) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "Read only entry modified(2)??")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified(2)??")
+ }
- entry_ptr->is_read_only = FALSE;
- entry_ptr->ro_ref_count = 0;
- }
+ entry_ptr->is_read_only = FALSE;
+ entry_ptr->ro_ref_count = 0;
+ }
#ifdef H5_HAVE_PARALLEL
- /* When the H5C code is used to implement the metadata cache in the
- * PHDF5 case, only the cache on process 0 is allowed to write to file.
- * All the other metadata caches must hold dirty entries until they
- * are told that the entries are clean.
- *
- * The clear_on_unprotect flag in the H5C_cache_entry_t structure
- * exists to deal with the case in which an entry is protected when
- * its cache receives word that the entry is now clean. In this case,
- * the clear_on_unprotect flag is set, and the entry is flushed with
- * the H5C__FLUSH_CLEAR_ONLY_FLAG.
- *
- * All this is a bit awkward, but until the metadata cache entries
- * are contiguous, with only one dirty flag, we have to let the supplied
- * functions deal with the resetting the is_dirty flag.
- */
- if ( entry_ptr->clear_on_unprotect ) {
+ /* When the H5C code is used to implement the metadata cache in the
+ * PHDF5 case, only the cache on process 0 is allowed to write to file.
+ * All the other metadata caches must hold dirty entries until they
+ * are told that the entries are clean.
+ *
+ * The clear_on_unprotect flag in the H5C_cache_entry_t structure
+ * exists to deal with the case in which an entry is protected when
+ * its cache receives word that the entry is now clean. In this case,
+ * the clear_on_unprotect flag is set, and the entry is flushed with
+ * the H5C__FLUSH_CLEAR_ONLY_FLAG.
+ *
+ * All this is a bit awkward, but until the metadata cache entries
+ * are contiguous, with only one dirty flag, we have to let the supplied
+ * functions deal with the resetting the is_dirty flag.
+ */
+ if (entry_ptr->clear_on_unprotect) {
- HDassert( entry_ptr->is_dirty );
+ HDassert(entry_ptr->is_dirty);
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = FALSE;
- if ( ! dirtied ) {
+ if (!dirtied) {
- clear_entry = TRUE;
+ clear_entry = TRUE;
+ }
}
- }
#endif /* H5_HAVE_PARALLEL */
- if ( ! (entry_ptr->is_protected) ) {
+ if (!(entry_ptr->is_protected)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "Entry already unprotected??")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Entry already unprotected??")
+ }
- /* mark the entry as dirty if appropriate */
- entry_ptr->is_dirty = ( (entry_ptr->is_dirty) || dirtied );
+ /* mark the entry as dirty if appropriate */
+ entry_ptr->is_dirty = ((entry_ptr->is_dirty) || dirtied);
- if ( ( was_clean ) && ( entry_ptr->is_dirty ) ) {
+ if ((was_clean) && (entry_ptr->is_dirty)) {
- H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr)
- }
+ H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr)
+ }
- /* Pin or unpin the entry as requested. */
- if ( pin_entry ) {
+ /* Pin or unpin the entry as requested. */
+ if (pin_entry) {
- if ( entry_ptr->is_pinned ) {
+ if (entry_ptr->is_pinned) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, \
- "Entry already pinned???")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry already pinned???")
+ }
+ entry_ptr->is_pinned = TRUE;
+ H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
}
- entry_ptr->is_pinned = TRUE;
- H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
+ else if (unpin_entry) {
- } else if ( unpin_entry ) {
+ if (!(entry_ptr->is_pinned)) {
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, \
- "Entry already unpinned???")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry already unpinned???")
+ }
+ entry_ptr->is_pinned = FALSE;
+ H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
}
- entry_ptr->is_pinned = FALSE;
- H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
- }
-
- /* H5C__UPDATE_RP_FOR_UNPROTECT will place the unprotected entry on
- * the pinned entry list if entry_ptr->is_pinned is TRUE.
- */
- H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, FAIL)
+ /* H5C__UPDATE_RP_FOR_UNPROTECT will place the unprotected entry on
+ * the pinned entry list if entry_ptr->is_pinned is TRUE.
+ */
+ H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, FAIL)
- entry_ptr->is_protected = FALSE;
+ entry_ptr->is_protected = FALSE;
- /* if the entry is dirty, 'or' its flush_marker with the set flush flag,
- * and then add it to the skip list if it isn't there already.
- */
+ /* if the entry is dirty, 'or' its flush_marker with the set flush flag,
+ * and then add it to the skip list if it isn't there already.
+ */
- if ( entry_ptr->is_dirty ) {
+ if (entry_ptr->is_dirty) {
- entry_ptr->flush_marker |= set_flush_marker;
+ entry_ptr->flush_marker |= set_flush_marker;
- if ( ! (entry_ptr->in_slist) ) {
+ if (!(entry_ptr->in_slist)) {
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ }
}
- }
- /* this implementation of the "deleted" option is a bit inefficient, as
- * we re-insert the entry to be deleted into the replacement policy
- * data structures, only to remove them again. Depending on how often
- * we do this, we may want to optimize a bit.
- *
- * On the other hand, this implementation is reasonably clean, and
- * makes good use of existing code.
- * JRM - 5/19/04
- */
- if ( deleted ) {
-
- /* the following first flush flag will never be used as we are
- * calling H5C_flush_single_entry with both the
- * H5C__FLUSH_CLEAR_ONLY_FLAG and H5C__FLUSH_INVALIDATE_FLAG flags.
- * However, it is needed for the function call.
+ /* this implementation of the "deleted" option is a bit inefficient, as
+ * we re-insert the entry to be deleted into the replacement policy
+ * data structures, only to remove them again. Depending on how often
+ * we do this, we may want to optimize a bit.
+ *
+ * On the other hand, this implementation is reasonably clean, and
+ * makes good use of existing code.
+ * JRM - 5/19/04
*/
- hbool_t dummy_first_flush = TRUE;
- unsigned flush_flags = (H5C__FLUSH_CLEAR_ONLY_FLAG |
- H5C__FLUSH_INVALIDATE_FLAG);
+ if (deleted) {
- /* we can't delete a pinned entry */
- HDassert ( ! (entry_ptr->is_pinned ) );
+ /* the following first flush flag will never be used as we are
+ * calling H5C_flush_single_entry with both the
+ * H5C__FLUSH_CLEAR_ONLY_FLAG and H5C__FLUSH_INVALIDATE_FLAG flags.
+ * However, it is needed for the function call.
+ */
+ hbool_t dummy_first_flush = TRUE;
+ unsigned flush_flags = (H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_INVALIDATE_FLAG);
- /* verify that the target entry is in the cache. */
+ /* we can't delete a pinned entry */
+ HDassert(!(entry_ptr->is_pinned));
- H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
+ /* verify that the target entry is in the cache. */
- if ( test_entry_ptr == NULL ) {
+ H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "entry not in hash table?!?.")
- }
- else if ( test_entry_ptr != entry_ptr ) {
+ if (test_entry_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "hash table contains multiple entries for addr?!?.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?.")
+ }
+ else if (test_entry_ptr != entry_ptr) {
- /* Pass along 'free file space' flag to cache client */
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL,
+ "hash table contains multiple entries for addr?!?.")
+ }
- entry_ptr->free_file_space_on_destroy = free_file_space;
+ /* Pass along 'free file space' flag to cache client */
- /* Set the "take ownership" flag for the flush, if needed */
- if ( take_ownership) {
+ entry_ptr->free_file_space_on_destroy = free_file_space;
- flush_flags |= H5C__TAKE_OWNERSHIP_FLAG;
- }
+ /* Set the "take ownership" flag for the flush, if needed */
+ if (take_ownership) {
- if ( H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- type,
- addr,
- flush_flags,
- &dummy_first_flush,
- TRUE) < 0 ) {
+ flush_flags |= H5C__TAKE_OWNERSHIP_FLAG;
+ }
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush.")
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, type, addr, flush_flags,
+ &dummy_first_flush, TRUE) < 0) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush.")
+ }
}
- }
#ifdef H5_HAVE_PARALLEL
- else if ( clear_entry ) {
+ else if (clear_entry) {
- /* the following first flush flag will never be used as we are
- * calling H5C_flush_single_entry with the
- * H5C__FLUSH_CLEAR_ONLY_FLAG flag. However, it is needed for
- * the function call.
- */
- hbool_t dummy_first_flush = TRUE;
+ /* the following first flush flag will never be used as we are
+ * calling H5C_flush_single_entry with the
+ * H5C__FLUSH_CLEAR_ONLY_FLAG flag. However, it is needed for
+ * the function call.
+ */
+ hbool_t dummy_first_flush = TRUE;
- /* verify that the target entry is in the cache. */
+ /* verify that the target entry is in the cache. */
- H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
- if ( test_entry_ptr == NULL ) {
+ if (test_entry_ptr == NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "entry not in hash table?!?.")
- }
- else if ( test_entry_ptr != entry_ptr ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?.")
+ }
+ else if (test_entry_ptr != entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "hash table contains multiple entries for addr?!?.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL,
+ "hash table contains multiple entries for addr?!?.")
+ }
- if ( H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- type,
- addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- &dummy_first_flush,
- TRUE) < 0 ) {
+ if (H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, type, addr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG, &dummy_first_flush, TRUE) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear.")
+ }
}
- }
#endif /* H5_HAVE_PARALLEL */
- }
+ }
- H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr)
+ H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
+ if (H5C_validate_lru_list(cache_ptr) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU sanity check failed.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU sanity check failed.\n");
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_unprotect() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5C_validate_resize_config()
- *
- * Purpose: Run a sanity check on the specified sections of the
- * provided instance of struct H5C_auto_size_ctl_t.
- *
- * Do nothing and return SUCCEED if no errors are detected,
- * and flag an error and return FAIL otherwise.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 3/23/05
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
- unsigned int tests)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- if ( config_ptr == NULL ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry.")
- }
-
- if ( config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version.")
- }
-
-
- if ( (tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0 ) {
+ FUNC_LEAVE_NOAPI(ret_value)
- if ( ( config_ptr->set_initial_size != TRUE ) &&
- ( config_ptr->set_initial_size != FALSE ) ) {
+ } /* H5C_unprotect() */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "set_initial_size must be either TRUE or FALSE");
- }
-
- if ( config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE ) {
+ /*-------------------------------------------------------------------------
+ * Function: H5C_validate_resize_config()
+ *
+ * Purpose: Run a sanity check on the specified sections of the
+ * provided instance of struct H5C_auto_size_ctl_t.
+ *
+ * Do nothing and return SUCCEED if no errors are detected,
+ * and flag an error and return FAIL otherwise.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 3/23/05
+ *
+ *-------------------------------------------------------------------------
+ */
+ herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr, unsigned int tests)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big");
- }
+ FUNC_ENTER_NOAPI(FAIL)
- if ( config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE ) {
+ if (config_ptr == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry.")
}
- if ( config_ptr->min_size > config_ptr->max_size ) {
+ if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version.")
}
- if ( ( config_ptr->set_initial_size ) &&
- ( ( config_ptr->initial_size < config_ptr->min_size ) ||
- ( config_ptr->initial_size > config_ptr->max_size ) ) ) {
+ if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "initial_size must be in the interval [min_size, max_size]");
- }
+ if ((config_ptr->set_initial_size != TRUE) && (config_ptr->set_initial_size != FALSE)) {
- if ( ( config_ptr->min_clean_fraction < (double)0.0f ) ||
- ( config_ptr->min_clean_fraction > (double)1.0f ) ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "set_initial_size must be either TRUE or FALSE");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "min_clean_fraction must be in the interval [0.0, 1.0]");
- }
+ if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) {
- if ( config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small");
- }
+ if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) {
- if ( config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big");
- }
- } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */
+ if (config_ptr->min_size > config_ptr->max_size) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size");
+ }
- if ( (tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0 ) {
+ if ((config_ptr->set_initial_size) && ((config_ptr->initial_size < config_ptr->min_size) ||
+ (config_ptr->initial_size > config_ptr->max_size))) {
- if ( ( config_ptr->incr_mode != H5C_incr__off ) &&
- ( config_ptr->incr_mode != H5C_incr__threshold ) ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "initial_size must be in the interval [min_size, max_size]");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode");
- }
+ if ((config_ptr->min_clean_fraction < (double)0.0f) ||
+ (config_ptr->min_clean_fraction > (double)1.0f)) {
- if ( config_ptr->incr_mode == H5C_incr__threshold ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "min_clean_fraction must be in the interval [0.0, 1.0]");
+ }
- if ( ( config_ptr->lower_hr_threshold < (double)0.0f ) ||
- ( config_ptr->lower_hr_threshold > (double)1.0f ) ) {
+ if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "lower_hr_threshold must be in the range [0.0, 1.0]");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small");
}
- if ( config_ptr->increment < (double)1.0f ) {
+ if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "increment must be greater than or equal to 1.0");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big");
}
+ } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */
- if ( ( config_ptr->apply_max_increment != TRUE ) &&
- ( config_ptr->apply_max_increment != FALSE ) ) {
+ if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "apply_max_increment must be either TRUE or FALSE");
- }
+ if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) {
- /* no need to check max_increment, as it is a size_t,
- * and thus must be non-negative.
- */
- } /* H5C_incr__threshold */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode");
+ }
- switch ( config_ptr->flash_incr_mode )
- {
- case H5C_flash_incr__off:
- /* nothing to do here */
- break;
+ if (config_ptr->incr_mode == H5C_incr__threshold) {
- case H5C_flash_incr__add_space:
- if ( ( config_ptr->flash_multiple < (double)0.1f ) ||
- ( config_ptr->flash_multiple > (double)10.0f ) ) {
+ if ((config_ptr->lower_hr_threshold < (double)0.0f) ||
+ (config_ptr->lower_hr_threshold > (double)1.0f)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "flash_multiple must be in the range [0.1, 10.0]");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "lower_hr_threshold must be in the range [0.0, 1.0]");
}
- if ( ( config_ptr->flash_threshold < (double)0.1f ) ||
- ( config_ptr->flash_threshold > (double)1.0f ) ) {
+ if (config_ptr->increment < (double)1.0f) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "flash_threshold must be in the range [0.1, 1.0]");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "increment must be greater than or equal to 1.0");
}
- break;
-
- default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "Invalid flash_incr_mode");
- break;
- }
- } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */
+ if ((config_ptr->apply_max_increment != TRUE) && (config_ptr->apply_max_increment != FALSE)) {
- if ( (tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0 ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "apply_max_increment must be either TRUE or FALSE");
+ }
- if ( ( config_ptr->decr_mode != H5C_decr__off ) &&
- ( config_ptr->decr_mode != H5C_decr__threshold ) &&
- ( config_ptr->decr_mode != H5C_decr__age_out ) &&
- ( config_ptr->decr_mode != H5C_decr__age_out_with_threshold )
- ) {
+ /* no need to check max_increment, as it is a size_t,
+ * and thus must be non-negative.
+ */
+ } /* H5C_incr__threshold */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode");
- }
+ switch (config_ptr->flash_incr_mode) {
+ case H5C_flash_incr__off:
+ /* nothing to do here */
+ break;
- if ( config_ptr->decr_mode == H5C_decr__threshold ) {
+ case H5C_flash_incr__add_space:
+ if ((config_ptr->flash_multiple < (double)0.1f) ||
+ (config_ptr->flash_multiple > (double)10.0f)) {
- if ( config_ptr->upper_hr_threshold > (double)1.0f ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "flash_multiple must be in the range [0.1, 10.0]");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "upper_hr_threshold must be <= 1.0");
- }
+ if ((config_ptr->flash_threshold < (double)0.1f) ||
+ (config_ptr->flash_threshold > (double)1.0f)) {
- if ( ( config_ptr->decrement > (double)1.0f ) ||
- ( config_ptr->decrement < (double)0.0f ) ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "flash_threshold must be in the range [0.1, 1.0]");
+ }
+ break;
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "decrement must be in the interval [0.0, 1.0]");
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode");
+ break;
}
+ } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */
- /* no need to check max_decrement as it is a size_t
- * and thus must be non-negative.
- */
- } /* H5C_decr__threshold */
-
- if ( ( config_ptr->decr_mode == H5C_decr__age_out ) ||
- ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold )
- ) {
+ if ((tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0) {
- if ( config_ptr->epochs_before_eviction < 1 ) {
+ if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) &&
+ (config_ptr->decr_mode != H5C_decr__age_out) &&
+ (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "epochs_before_eviction must be positive");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode");
}
- if ( config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS ) {
+ if (config_ptr->decr_mode == H5C_decr__threshold) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "epochs_before_eviction too big");
- }
-
- if ( ( config_ptr->apply_empty_reserve != TRUE ) &&
- ( config_ptr->apply_empty_reserve != FALSE ) ) {
+ if (config_ptr->upper_hr_threshold > (double)1.0f) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "apply_empty_reserve must be either TRUE or FALSE");
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0");
+ }
- if ( ( config_ptr->apply_empty_reserve ) &&
- ( ( config_ptr->empty_reserve > (double)1.0f ) ||
- ( config_ptr->empty_reserve < (double)0.0f ) ) ) {
+ if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "empty_reserve must be in the interval [0.0, 1.0]");
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]");
+ }
- /* no need to check max_decrement as it is a size_t
- * and thus must be non-negative.
- */
- } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */
+ /* no need to check max_decrement as it is a size_t
+ * and thus must be non-negative.
+ */
+ } /* H5C_decr__threshold */
- if ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold ) {
+ if ((config_ptr->decr_mode == H5C_decr__age_out) ||
+ (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) {
- if ( ( config_ptr->upper_hr_threshold > (double)1.0f ) ||
- ( config_ptr->upper_hr_threshold < (double)0.0f ) ) {
+ if (config_ptr->epochs_before_eviction < 1) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "upper_hr_threshold must be in the interval [0.0, 1.0]");
- }
- } /* H5C_decr__age_out_with_threshold */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive");
+ }
- } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */
+ if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big");
+ }
- if ( (tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0 ) {
+ if ((config_ptr->apply_empty_reserve != TRUE) && (config_ptr->apply_empty_reserve != FALSE)) {
- if ( ( config_ptr->incr_mode == H5C_incr__threshold )
- &&
- ( ( config_ptr->decr_mode == H5C_decr__threshold )
- ||
- ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold )
- )
- &&
- ( config_ptr->lower_hr_threshold
- >=
- config_ptr->upper_hr_threshold
- )
- ) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "apply_empty_reserve must be either TRUE or FALSE");
+ }
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "conflicting threshold fields in config.")
- }
- } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */
+ if ((config_ptr->apply_empty_reserve) && ((config_ptr->empty_reserve > (double)1.0f) ||
+ (config_ptr->empty_reserve < (double)0.0f))) {
-done:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "empty_reserve must be in the interval [0.0, 1.0]");
+ }
- FUNC_LEAVE_NOAPI(ret_value)
+ /* no need to check max_decrement as it is a size_t
+ * and thus must be non-negative.
+ */
+ } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */
-} /* H5C_validate_resize_config() */
+ if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) {
-
-/*************************************************************************/
-/**************************** Private Functions: *************************/
-/*************************************************************************/
+ if ((config_ptr->upper_hr_threshold > (double)1.0f) ||
+ (config_ptr->upper_hr_threshold < (double)0.0f)) {
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__auto_adjust_cache_size
- *
- * Purpose: Obtain the current full cache hit rate, and compare it
- * with the hit rate thresholds for modifying cache size.
- * If one of the thresholds has been crossed, adjusts the
- * size of the cache accordingly.
- *
- * The function then resets the full cache hit rate
- * statistics, and exits.
- *
- * Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
- *
- *
- * Programmer: John Mainzer, 10/7/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__auto_adjust_cache_size(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr)
-{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t result;
- hbool_t inserted_epoch_marker = FALSE;
- size_t new_max_cache_size = 0;
- size_t old_max_cache_size = 0;
- size_t new_min_clean_size = 0;
- size_t old_min_clean_size = 0;
- double hit_rate;
- enum H5C_resize_status status = in_spec; /* will change if needed */
- herr_t ret_value = SUCCEED; /* Return value */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "upper_hr_threshold must be in the interval [0.0, 1.0]");
+ }
+ } /* H5C_decr__age_out_with_threshold */
- FUNC_ENTER_NOAPI_NOINIT
+ } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->cache_accesses >=
- (cache_ptr->resize_ctl).epoch_length );
- HDassert( (double)0.0f <= (cache_ptr->resize_ctl).min_clean_fraction );
- HDassert( (cache_ptr->resize_ctl).min_clean_fraction <= (double)100.0f );
+ if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) {
- if ( !cache_ptr->resize_enabled ) {
+ if ((config_ptr->incr_mode == H5C_incr__threshold) &&
+ ((config_ptr->decr_mode == H5C_decr__threshold) ||
+ (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) &&
+ (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled.")
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config.")
+ }
+ } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */
- HDassert( ( (cache_ptr->resize_ctl).incr_mode != H5C_incr__off ) || \
- ( (cache_ptr->resize_ctl).decr_mode != H5C_decr__off ) );
+done:
- if ( H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED ) {
+ FUNC_LEAVE_NOAPI(ret_value)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
- }
+ } /* H5C_validate_resize_config() */
- HDassert( ( (double)0.0f <= hit_rate ) && ( hit_rate <= (double)1.0f ) );
+ /*************************************************************************/
+ /**************************** Private Functions: *************************/
+ /*************************************************************************/
- switch ( (cache_ptr->resize_ctl).incr_mode )
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__auto_adjust_cache_size
+ *
+ * Purpose: Obtain the current full cache hit rate, and compare it
+ * with the hit rate thresholds for modifying cache size.
+ * If one of the thresholds has been crossed, adjusts the
+ * size of the cache accordingly.
+ *
+ * The function then resets the full cache hit rate
+ * statistics, and exits.
+ *
+ * Return: Non-negative on success/Negative on failure or if there was
+ * an attempt to flush a protected item.
+ *
+ *
+ * Programmer: John Mainzer, 10/7/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__auto_adjust_cache_size(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ hbool_t write_permitted, hbool_t * first_flush_ptr)
{
- case H5C_incr__off:
- if ( cache_ptr->size_increase_possible ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "size_increase_possible but H5C_incr__off?!?!?")
- }
- break;
+ H5C_t * cache_ptr = f->shared->cache;
+ herr_t result;
+ hbool_t inserted_epoch_marker = FALSE;
+ size_t new_max_cache_size = 0;
+ size_t old_max_cache_size = 0;
+ size_t new_min_clean_size = 0;
+ size_t old_min_clean_size = 0;
+ double hit_rate;
+ enum H5C_resize_status status = in_spec; /* will change if needed */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr->cache_accesses >= (cache_ptr->resize_ctl).epoch_length);
+ HDassert((double)0.0f <= (cache_ptr->resize_ctl).min_clean_fraction);
+ HDassert((cache_ptr->resize_ctl).min_clean_fraction <= (double)100.0f);
+
+ if (!cache_ptr->resize_enabled) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled.")
+ }
- case H5C_incr__threshold:
- if ( hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold ) {
+ HDassert(((cache_ptr->resize_ctl).incr_mode != H5C_incr__off) ||
+ ((cache_ptr->resize_ctl).decr_mode != H5C_decr__off));
- if ( ! cache_ptr->size_increase_possible ) {
+ if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED) {
- status = increase_disabled;
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
+ }
- } else if ( cache_ptr->max_cache_size >=
- (cache_ptr->resize_ctl).max_size ) {
+ HDassert(((double)0.0f <= hit_rate) && (hit_rate <= (double)1.0f));
- HDassert( cache_ptr->max_cache_size == \
- (cache_ptr->resize_ctl).max_size );
- status = at_max_size;
+ switch ((cache_ptr->resize_ctl).incr_mode) {
+ case H5C_incr__off:
+ if (cache_ptr->size_increase_possible) {
- } else if ( ! cache_ptr->cache_full ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "size_increase_possible but H5C_incr__off?!?!?")
+ }
+ break;
- status = not_full;
+ case H5C_incr__threshold:
+ if (hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold) {
- } else {
+ if (!cache_ptr->size_increase_possible) {
- new_max_cache_size = (size_t)
- (((double)(cache_ptr->max_cache_size)) *
- (cache_ptr->resize_ctl).increment);
+ status = increase_disabled;
+ }
+ else if (cache_ptr->max_cache_size >= (cache_ptr->resize_ctl).max_size) {
- /* clip to max size if necessary */
- if ( new_max_cache_size >
- (cache_ptr->resize_ctl).max_size ) {
+ HDassert(cache_ptr->max_cache_size == (cache_ptr->resize_ctl).max_size);
+ status = at_max_size;
+ }
+ else if (!cache_ptr->cache_full) {
- new_max_cache_size = (cache_ptr->resize_ctl).max_size;
+ status = not_full;
}
+ else {
- /* clip to max increment if necessary */
- if ( ( (cache_ptr->resize_ctl).apply_max_increment ) &&
- ( (cache_ptr->max_cache_size +
- (cache_ptr->resize_ctl).max_increment) <
- new_max_cache_size ) ) {
+ new_max_cache_size = (size_t)(((double)(cache_ptr->max_cache_size)) *
+ (cache_ptr->resize_ctl).increment);
- new_max_cache_size = cache_ptr->max_cache_size +
- (cache_ptr->resize_ctl).max_increment;
- }
+ /* clip to max size if necessary */
+ if (new_max_cache_size > (cache_ptr->resize_ctl).max_size) {
- status = increase;
- }
- }
- break;
+ new_max_cache_size = (cache_ptr->resize_ctl).max_size;
+ }
- default:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode.")
- }
+ /* clip to max increment if necessary */
+ if (((cache_ptr->resize_ctl).apply_max_increment) &&
+ ((cache_ptr->max_cache_size + (cache_ptr->resize_ctl).max_increment) <
+ new_max_cache_size)) {
- /* If the decr_mode is either age out or age out with threshold, we
- * must run the marker maintenance code, whether we run the size
- * reduction code or not. We do this in two places -- here we
- * insert a new marker if the number of active epoch markers is
- * is less than the the current epochs before eviction, and after
- * the ageout call, we cycle the markers.
- *
- * However, we can't call the ageout code or cycle the markers
- * unless there was a full complement of markers in place on
- * entry. The inserted_epoch_marker flag is used to track this.
- */
+ new_max_cache_size =
+ cache_ptr->max_cache_size + (cache_ptr->resize_ctl).max_increment;
+ }
- if ( ( ( (cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out )
- ||
- ( (cache_ptr->resize_ctl).decr_mode ==
- H5C_decr__age_out_with_threshold
- )
- )
- &&
- ( cache_ptr->epoch_markers_active <
- (cache_ptr->resize_ctl).epochs_before_eviction
- )
- ) {
+ status = increase;
+ }
+ }
+ break;
- result = H5C__autoadjust__ageout__insert_new_marker(cache_ptr);
+ default:
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode.")
+ }
- if ( result != SUCCEED ) {
+ /* If the decr_mode is either age out or age out with threshold, we
+ * must run the marker maintenance code, whether we run the size
+ * reduction code or not. We do this in two places -- here we
+ * insert a new marker if the number of active epoch markers is
+ * is less than the the current epochs before eviction, and after
+ * the ageout call, we cycle the markers.
+ *
+ * However, we can't call the ageout code or cycle the markers
+ * unless there was a full complement of markers in place on
+ * entry. The inserted_epoch_marker flag is used to track this.
+ */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "can't insert new epoch marker.")
+ if ((((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out) ||
+ ((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out_with_threshold)) &&
+ (cache_ptr->epoch_markers_active < (cache_ptr->resize_ctl).epochs_before_eviction)) {
- } else {
+ result = H5C__autoadjust__ageout__insert_new_marker(cache_ptr);
- inserted_epoch_marker = TRUE;
- }
- }
+ if (result != SUCCEED) {
- /* don't run the cache size decrease code unless the cache size
- * increase code is disabled, or the size increase code sees no need
- * for action. In either case, status == in_spec at this point.
- */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't insert new epoch marker.")
+ }
+ else {
- if ( status == in_spec ) {
+ inserted_epoch_marker = TRUE;
+ }
+ }
- switch ( (cache_ptr->resize_ctl).decr_mode )
- {
- case H5C_decr__off:
- break;
+ /* don't run the cache size decrease code unless the cache size
+ * increase code is disabled, or the size increase code sees no need
+ * for action. In either case, status == in_spec at this point.
+ */
- case H5C_decr__threshold:
- if ( hit_rate > (cache_ptr->resize_ctl).upper_hr_threshold ) {
+ if (status == in_spec) {
- if ( ! cache_ptr->size_decrease_possible ) {
+ switch ((cache_ptr->resize_ctl).decr_mode) {
+ case H5C_decr__off:
+ break;
- status = decrease_disabled;
+ case H5C_decr__threshold:
+ if (hit_rate > (cache_ptr->resize_ctl).upper_hr_threshold) {
- } else if ( cache_ptr->max_cache_size <=
- (cache_ptr->resize_ctl).min_size ) {
+ if (!cache_ptr->size_decrease_possible) {
- HDassert( cache_ptr->max_cache_size ==
- (cache_ptr->resize_ctl).min_size );
- status = at_min_size;
+ status = decrease_disabled;
+ }
+ else if (cache_ptr->max_cache_size <= (cache_ptr->resize_ctl).min_size) {
- } else {
+ HDassert(cache_ptr->max_cache_size == (cache_ptr->resize_ctl).min_size);
+ status = at_min_size;
+ }
+ else {
- new_max_cache_size = (size_t)
- (((double)(cache_ptr->max_cache_size)) *
- (cache_ptr->resize_ctl).decrement);
+ new_max_cache_size = (size_t)(((double)(cache_ptr->max_cache_size)) *
+ (cache_ptr->resize_ctl).decrement);
- /* clip to min size if necessary */
- if ( new_max_cache_size <
- (cache_ptr->resize_ctl).min_size ) {
+ /* clip to min size if necessary */
+ if (new_max_cache_size < (cache_ptr->resize_ctl).min_size) {
- new_max_cache_size =
- (cache_ptr->resize_ctl).min_size;
- }
+ new_max_cache_size = (cache_ptr->resize_ctl).min_size;
+ }
- /* clip to max decrement if necessary */
- if ( ( (cache_ptr->resize_ctl).apply_max_decrement ) &&
- ( ((cache_ptr->resize_ctl).max_decrement +
- new_max_cache_size) <
- cache_ptr->max_cache_size ) ) {
+ /* clip to max decrement if necessary */
+ if (((cache_ptr->resize_ctl).apply_max_decrement) &&
+ (((cache_ptr->resize_ctl).max_decrement + new_max_cache_size) <
+ cache_ptr->max_cache_size)) {
- new_max_cache_size = cache_ptr->max_cache_size -
- (cache_ptr->resize_ctl).max_decrement;
- }
+ new_max_cache_size =
+ cache_ptr->max_cache_size - (cache_ptr->resize_ctl).max_decrement;
+ }
- status = decrease;
+ status = decrease;
+ }
}
- }
- break;
-
- case H5C_decr__age_out_with_threshold:
- case H5C_decr__age_out:
- if ( ! inserted_epoch_marker ) {
+ break;
- if ( ! cache_ptr->size_decrease_possible ) {
+ case H5C_decr__age_out_with_threshold:
+ case H5C_decr__age_out:
+ if (!inserted_epoch_marker) {
- status = decrease_disabled;
+ if (!cache_ptr->size_decrease_possible) {
- } else {
+ status = decrease_disabled;
+ }
+ else {
- result = H5C__autoadjust__ageout(f,
- hit_rate,
- &status,
- &new_max_cache_size,
- primary_dxpl_id,
- secondary_dxpl_id,
- write_permitted,
- first_flush_ptr);
+ result = H5C__autoadjust__ageout(f, hit_rate, &status, &new_max_cache_size,
+ primary_dxpl_id, secondary_dxpl_id,
+ write_permitted, first_flush_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "ageout code failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ageout code failed.")
+ }
}
}
- }
- break;
+ break;
- default:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode.")
+ default:
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode.")
+ }
}
- }
- /* cycle the epoch markers here if appropriate */
- if ( ( ( (cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out )
- ||
- ( (cache_ptr->resize_ctl).decr_mode ==
- H5C_decr__age_out_with_threshold
- )
- )
- &&
- ( ! inserted_epoch_marker )
- ) {
+ /* cycle the epoch markers here if appropriate */
+ if ((((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out) ||
+ ((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out_with_threshold)) &&
+ (!inserted_epoch_marker)) {
- /* move last epoch marker to the head of the LRU list */
- result = H5C__autoadjust__ageout__cycle_epoch_marker(cache_ptr);
+ /* move last epoch marker to the head of the LRU list */
+ result = H5C__autoadjust__ageout__cycle_epoch_marker(cache_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "error cycling epoch marker.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error cycling epoch marker.")
+ }
}
- }
-
- if ( ( status == increase ) || ( status == decrease ) ) {
- old_max_cache_size = cache_ptr->max_cache_size;
- old_min_clean_size = cache_ptr->min_clean_size;
+ if ((status == increase) || (status == decrease)) {
- new_min_clean_size = (size_t)
- ((double)new_max_cache_size *
- ((cache_ptr->resize_ctl).min_clean_fraction));
+ old_max_cache_size = cache_ptr->max_cache_size;
+ old_min_clean_size = cache_ptr->min_clean_size;
- /* new_min_clean_size is of size_t, and thus must be non-negative.
- * Hence we have
- *
- * ( 0 <= new_min_clean_size ).
- *
- * by definition.
- */
- HDassert( new_min_clean_size <= new_max_cache_size );
- HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size );
- HDassert( new_max_cache_size <= (cache_ptr->resize_ctl).max_size );
+ new_min_clean_size =
+ (size_t)((double)new_max_cache_size * ((cache_ptr->resize_ctl).min_clean_fraction));
- cache_ptr->max_cache_size = new_max_cache_size;
- cache_ptr->min_clean_size = new_min_clean_size;
+ /* new_min_clean_size is of size_t, and thus must be non-negative.
+ * Hence we have
+ *
+ * ( 0 <= new_min_clean_size ).
+ *
+ * by definition.
+ */
+ HDassert(new_min_clean_size <= new_max_cache_size);
+ HDassert((cache_ptr->resize_ctl).min_size <= new_max_cache_size);
+ HDassert(new_max_cache_size <= (cache_ptr->resize_ctl).max_size);
- if ( status == increase ) {
+ cache_ptr->max_cache_size = new_max_cache_size;
+ cache_ptr->min_clean_size = new_min_clean_size;
- cache_ptr->cache_full = FALSE;
+ if (status == increase) {
- } else if ( status == decrease ) {
+ cache_ptr->cache_full = FALSE;
+ }
+ else if (status == decrease) {
- cache_ptr->size_decreased = TRUE;
- }
+ cache_ptr->size_decreased = TRUE;
+ }
- /* update flash cache size increase fields as appropriate */
- if ( cache_ptr->flash_size_increase_possible ) {
+ /* update flash cache size increase fields as appropriate */
+ if (cache_ptr->flash_size_increase_possible) {
- switch ( (cache_ptr->resize_ctl).flash_incr_mode )
- {
- case H5C_flash_incr__off:
+ switch ((cache_ptr->resize_ctl).flash_incr_mode) {
+ case H5C_flash_incr__off:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "flash_size_increase_possible but H5C_flash_incr__off?!")
- break;
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ "flash_size_increase_possible but H5C_flash_incr__off?!")
+ break;
- case H5C_flash_incr__add_space:
- cache_ptr->flash_size_increase_threshold =
- (size_t)
- (((double)(cache_ptr->max_cache_size)) *
- ((cache_ptr->resize_ctl).flash_threshold));
- break;
+ case H5C_flash_incr__add_space:
+ cache_ptr->flash_size_increase_threshold =
+ (size_t)(((double)(cache_ptr->max_cache_size)) *
+ ((cache_ptr->resize_ctl).flash_threshold));
+ break;
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Unknown flash_incr_mode?!?!?.")
- break;
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?.")
+ break;
+ }
}
}
- }
- if ( (cache_ptr->resize_ctl).rpt_fcn != NULL ) {
-
- (*((cache_ptr->resize_ctl).rpt_fcn))
- (cache_ptr,
- H5C__CURR_AUTO_RESIZE_RPT_FCN_VER,
- hit_rate,
- status,
- old_max_cache_size,
- new_max_cache_size,
- old_min_clean_size,
- new_min_clean_size);
- }
+ if ((cache_ptr->resize_ctl).rpt_fcn != NULL) {
+
+ (*((cache_ptr->resize_ctl).rpt_fcn))(cache_ptr, H5C__CURR_AUTO_RESIZE_RPT_FCN_VER, hit_rate,
+ status, old_max_cache_size, new_max_cache_size,
+ old_min_clean_size, new_min_clean_size);
+ }
- if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
+ if (H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED) {
- /* this should be impossible... */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_reset_cache_hit_rate_stats failed.")
- }
+ /* this should be impossible... */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed.")
+ }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__auto_adjust_cache_size() */
+ } /* H5C__auto_adjust_cache_size() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout
- *
- * Purpose: Implement the ageout automatic cache size decrement
- * algorithm. Note that while this code evicts aged out
- * entries, the code does not change the maximum cache size.
- * Instead, the function simply computes the new value (if
- * any change is indicated) and reports this value in
- * *new_max_cache_size_ptr.
- *
- * Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
- *
- *
- * Programmer: John Mainzer, 11/18/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout(H5F_t * f,
- double hit_rate,
- enum H5C_resize_status * status_ptr,
- size_t * new_max_cache_size_ptr,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr)
-{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t result;
- size_t test_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout
+ *
+ * Purpose: Implement the ageout automatic cache size decrement
+ * algorithm. Note that while this code evicts aged out
+ * entries, the code does not change the maximum cache size.
+ * Instead, the function simply computes the new value (if
+ * any change is indicated) and reports this value in
+ * *new_max_cache_size_ptr.
+ *
+ * Return: Non-negative on success/Negative on failure or if there was
+ * an attempt to flush a protected item.
+ *
+ *
+ * Programmer: John Mainzer, 11/18/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout(
+ H5F_t * f, double hit_rate, enum H5C_resize_status *status_ptr, size_t *new_max_cache_size_ptr,
+ hid_t primary_dxpl_id, hid_t secondary_dxpl_id, hbool_t write_permitted, hbool_t *first_flush_ptr)
+ {
+ H5C_t *cache_ptr = f->shared->cache;
+ herr_t result;
+ size_t test_size;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( ( status_ptr ) && ( *status_ptr == in_spec ) );
- HDassert( ( new_max_cache_size_ptr ) && ( *new_max_cache_size_ptr == 0 ) );
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert((status_ptr) && (*status_ptr == in_spec));
+ HDassert((new_max_cache_size_ptr) && (*new_max_cache_size_ptr == 0));
- /* remove excess epoch markers if any */
- if ( cache_ptr->epoch_markers_active >
- (cache_ptr->resize_ctl).epochs_before_eviction ) {
+ /* remove excess epoch markers if any */
+ if (cache_ptr->epoch_markers_active > (cache_ptr->resize_ctl).epochs_before_eviction) {
- result = H5C__autoadjust__ageout__remove_excess_markers(cache_ptr);
+ result = H5C__autoadjust__ageout__remove_excess_markers(cache_ptr);
- if ( result != SUCCEED ) {
+ if (result != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "can't remove excess epoch markers.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers.")
+ }
}
- }
- if ( ( (cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out )
- ||
- ( ( (cache_ptr->resize_ctl).decr_mode ==
- H5C_decr__age_out_with_threshold
- )
- &&
- ( hit_rate >= (cache_ptr->resize_ctl).upper_hr_threshold )
- )
- ) {
+ if (((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out) ||
+ (((cache_ptr->resize_ctl).decr_mode == H5C_decr__age_out_with_threshold) &&
+ (hit_rate >= (cache_ptr->resize_ctl).upper_hr_threshold))) {
- if ( cache_ptr->max_cache_size > (cache_ptr->resize_ctl).min_size ){
+ if (cache_ptr->max_cache_size > (cache_ptr->resize_ctl).min_size) {
- /* evict aged out cache entries if appropriate... */
- if(H5C__autoadjust__ageout__evict_aged_out_entries(f, primary_dxpl_id,
- secondary_dxpl_id, write_permitted, first_flush_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries.")
+ /* evict aged out cache entries if appropriate... */
+ if (H5C__autoadjust__ageout__evict_aged_out_entries(f, primary_dxpl_id, secondary_dxpl_id,
+ write_permitted, first_flush_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries.")
- /* ... and then reduce cache size if appropriate */
- if ( cache_ptr->index_size < cache_ptr->max_cache_size ) {
+ /* ... and then reduce cache size if appropriate */
+ if (cache_ptr->index_size < cache_ptr->max_cache_size) {
- if ( (cache_ptr->resize_ctl).apply_empty_reserve ) {
+ if ((cache_ptr->resize_ctl).apply_empty_reserve) {
- test_size = (size_t)(((double)cache_ptr->index_size) /
- (1 - (cache_ptr->resize_ctl).empty_reserve));
+ test_size = (size_t)(((double)cache_ptr->index_size) /
+ (1 - (cache_ptr->resize_ctl).empty_reserve));
- if ( test_size < cache_ptr->max_cache_size ) {
+ if (test_size < cache_ptr->max_cache_size) {
- *status_ptr = decrease;
- *new_max_cache_size_ptr = test_size;
+ *status_ptr = decrease;
+ *new_max_cache_size_ptr = test_size;
+ }
}
- } else {
+ else {
- *status_ptr = decrease;
- *new_max_cache_size_ptr = cache_ptr->index_size;
- }
+ *status_ptr = decrease;
+ *new_max_cache_size_ptr = cache_ptr->index_size;
+ }
- if ( *status_ptr == decrease ) {
+ if (*status_ptr == decrease) {
- /* clip to min size if necessary */
- if ( *new_max_cache_size_ptr <
- (cache_ptr->resize_ctl).min_size ) {
+ /* clip to min size if necessary */
+ if (*new_max_cache_size_ptr < (cache_ptr->resize_ctl).min_size) {
- *new_max_cache_size_ptr =
- (cache_ptr->resize_ctl).min_size;
- }
+ *new_max_cache_size_ptr = (cache_ptr->resize_ctl).min_size;
+ }
- /* clip to max decrement if necessary */
- if ( ( (cache_ptr->resize_ctl).apply_max_decrement ) &&
- ( ((cache_ptr->resize_ctl).max_decrement +
- *new_max_cache_size_ptr) <
- cache_ptr->max_cache_size ) ) {
+ /* clip to max decrement if necessary */
+ if (((cache_ptr->resize_ctl).apply_max_decrement) &&
+ (((cache_ptr->resize_ctl).max_decrement + *new_max_cache_size_ptr) <
+ cache_ptr->max_cache_size)) {
- *new_max_cache_size_ptr = cache_ptr->max_cache_size -
- (cache_ptr->resize_ctl).max_decrement;
+ *new_max_cache_size_ptr =
+ cache_ptr->max_cache_size - (cache_ptr->resize_ctl).max_decrement;
+ }
}
}
}
- } else {
+ else {
- *status_ptr = at_min_size;
+ *status_ptr = at_min_size;
+ }
}
- }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout() */
+ } /* H5C__autoadjust__ageout() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout__cycle_epoch_marker
- *
- * Purpose: Remove the oldest epoch marker from the LRU list,
- * and reinsert it at the head of the LRU list. Also
- * remove the epoch marker's index from the head of the
- * ring buffer, and re-insert it at the tail of the ring
- * buffer.
- *
- * Return: SUCCEED on success/FAIL on failure.
- *
- * Programmer: John Mainzer, 11/22/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout__cycle_epoch_marker
+ *
+ * Purpose: Remove the oldest epoch marker from the LRU list,
+ * and reinsert it at the head of the LRU list. Also
+ * remove the epoch marker's index from the head of the
+ * ring buffer, and re-insert it at the tail of the ring
+ * buffer.
+ *
+ * Return: SUCCEED on success/FAIL on failure.
+ *
+ * Programmer: John Mainzer, 11/22/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int i;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( cache_ptr->epoch_markers_active <= 0 ) {
+ if (cache_ptr->epoch_markers_active <= 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "No active epoch markers on entry?!?!?.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "No active epoch markers on entry?!?!?.")
+ }
- /* remove the last marker from both the ring buffer and the LRU list */
+ /* remove the last marker from both the ring buffer and the LRU list */
- i = cache_ptr->epoch_marker_ringbuf[cache_ptr->epoch_marker_ringbuf_first];
+ i = cache_ptr->epoch_marker_ringbuf[cache_ptr->epoch_marker_ringbuf_first];
- cache_ptr->epoch_marker_ringbuf_first =
- (cache_ptr->epoch_marker_ringbuf_first + 1) %
- (H5C__MAX_EPOCH_MARKERS + 1);
+ cache_ptr->epoch_marker_ringbuf_first =
+ (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
- cache_ptr->epoch_marker_ringbuf_size -= 1;
+ cache_ptr->epoch_marker_ringbuf_size -= 1;
- if ( cache_ptr->epoch_marker_ringbuf_size < 0 ) {
+ if (cache_ptr->epoch_marker_ringbuf_size < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
+ }
- if ( (cache_ptr->epoch_marker_active)[i] != TRUE ) {
+ if ((cache_ptr->epoch_marker_active)[i] != TRUE) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
+ }
- H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), \
- (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (FAIL))
+ H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr,
+ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size,
+ (FAIL))
- /* now, re-insert it at the head of the LRU list, and at the tail of
- * the ring buffer.
- */
+ /* now, re-insert it at the head of the LRU list, and at the tail of
+ * the ring buffer.
+ */
- HDassert( ((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i );
- HDassert( ((cache_ptr->epoch_markers)[i]).next == NULL );
- HDassert( ((cache_ptr->epoch_markers)[i]).prev == NULL );
+ HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
- cache_ptr->epoch_marker_ringbuf_last =
- (cache_ptr->epoch_marker_ringbuf_last + 1) %
- (H5C__MAX_EPOCH_MARKERS + 1);
+ cache_ptr->epoch_marker_ringbuf_last =
+ (cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
- (cache_ptr->epoch_marker_ringbuf)[cache_ptr->epoch_marker_ringbuf_last] = i;
+ (cache_ptr->epoch_marker_ringbuf)[cache_ptr->epoch_marker_ringbuf_last] = i;
- cache_ptr->epoch_marker_ringbuf_size += 1;
+ cache_ptr->epoch_marker_ringbuf_size += 1;
- if ( cache_ptr->epoch_marker_ringbuf_size > H5C__MAX_EPOCH_MARKERS ) {
+ if (cache_ptr->epoch_marker_ringbuf_size > H5C__MAX_EPOCH_MARKERS) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow.")
+ }
- H5C__DLL_PREPEND((&((cache_ptr->epoch_markers)[i])), \
- (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (FAIL))
+ H5C__DLL_PREPEND((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr,
+ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size,
+ (FAIL))
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout__cycle_epoch_marker() */
+ } /* H5C__autoadjust__ageout__cycle_epoch_marker() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout__evict_aged_out_entries
- *
- * Purpose: Evict clean entries in the cache that haven't
- * been accessed for at least
- * (cache_ptr->resize_ctl).epochs_before_eviction epochs,
- * and flush dirty entries that haven't been accessed for
- * that amount of time.
- *
- * Depending on configuration, the function will either
- * flush or evict all such entries, or all such entries it
- * encounters until it has freed the maximum amount of space
- * allowed under the maximum decrement.
- *
- * If we are running in parallel mode, writes may not be
- * permitted. If so, the function simply skips any dirty
- * entries it may encounter.
- *
- * The function makes no attempt to maintain the minimum
- * clean size, as there is no guarantee that the cache size
- * will be changed.
- *
- * If there is no cache size change, the minimum clean size
- * constraint will be met through a combination of clean
- * entries and free space in the cache.
- *
- * If there is a cache size reduction, the minimum clean size
- * will be re-calculated, and will be enforced the next time
- * we have to make space in the cache.
- *
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used depending on the value of
- * *first_flush_ptr. The idea is to use the primary_dxpl_id
- * on the first write in a sequence of writes, and to use
- * the secondary_dxpl_id on all subsequent writes.
- *
- * This is useful in the metadata cache, but may not be
- * needed elsewhere. If so, just use the same dxpl_id for
- * both parameters.
- *
- * Observe that this function cannot occasion a read.
- *
- * Return: Non-negative on success/Negative on failure.
- *
- * Programmer: John Mainzer, 11/22/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr)
-{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t result;
- size_t eviction_size_limit;
- size_t bytes_evicted = 0;
- hbool_t prev_is_dirty = FALSE;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * next_ptr;
- H5C_cache_entry_t * prev_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout__evict_aged_out_entries
+ *
+ * Purpose: Evict clean entries in the cache that haven't
+ * been accessed for at least
+ * (cache_ptr->resize_ctl).epochs_before_eviction epochs,
+ * and flush dirty entries that haven't been accessed for
+ * that amount of time.
+ *
+ * Depending on configuration, the function will either
+ * flush or evict all such entries, or all such entries it
+ * encounters until it has freed the maximum amount of space
+ * allowed under the maximum decrement.
+ *
+ * If we are running in parallel mode, writes may not be
+ * permitted. If so, the function simply skips any dirty
+ * entries it may encounter.
+ *
+ * The function makes no attempt to maintain the minimum
+ * clean size, as there is no guarantee that the cache size
+ * will be changed.
+ *
+ * If there is no cache size change, the minimum clean size
+ * constraint will be met through a combination of clean
+ * entries and free space in the cache.
+ *
+ * If there is a cache size reduction, the minimum clean size
+ * will be re-calculated, and will be enforced the next time
+ * we have to make space in the cache.
+ *
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used depending on the value of
+ * *first_flush_ptr. The idea is to use the primary_dxpl_id
+ * on the first write in a sequence of writes, and to use
+ * the secondary_dxpl_id on all subsequent writes.
+ *
+ * This is useful in the metadata cache, but may not be
+ * needed elsewhere. If so, just use the same dxpl_id for
+ * both parameters.
+ *
+ * Observe that this function cannot occasion a read.
+ *
+ * Return: Non-negative on success/Negative on failure.
+ *
+ * Programmer: John Mainzer, 11/22/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(
+ H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, hbool_t write_permitted,
+ hbool_t * first_flush_ptr)
+ {
+ H5C_t * cache_ptr = f->shared->cache;
+ herr_t result;
+ size_t eviction_size_limit;
+ size_t bytes_evicted = 0;
+ hbool_t prev_is_dirty = FALSE;
+ H5C_cache_entry_t *entry_ptr;
+ H5C_cache_entry_t *next_ptr;
+ H5C_cache_entry_t *prev_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- /* if there is a limit on the amount that the cache size can be decrease
- * in any one round of the cache size reduction algorithm, load that
- * limit into eviction_size_limit. Otherwise, set eviction_size_limit
- * to the equivalent of infinity. The current size of the index will
- * do nicely.
- */
- if ( (cache_ptr->resize_ctl).apply_max_decrement ) {
+ /* if there is a limit on the amount that the cache size can be decrease
+ * in any one round of the cache size reduction algorithm, load that
+ * limit into eviction_size_limit. Otherwise, set eviction_size_limit
+ * to the equivalent of infinity. The current size of the index will
+ * do nicely.
+ */
+ if ((cache_ptr->resize_ctl).apply_max_decrement) {
- eviction_size_limit = (cache_ptr->resize_ctl).max_decrement;
+ eviction_size_limit = (cache_ptr->resize_ctl).max_decrement;
+ }
+ else {
- } else {
+ eviction_size_limit = cache_ptr->index_size; /* i.e. infinity */
+ }
- eviction_size_limit = cache_ptr->index_size; /* i.e. infinity */
- }
+ if (write_permitted) {
- if ( write_permitted ) {
+ entry_ptr = cache_ptr->LRU_tail_ptr;
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ while ((entry_ptr != NULL) && ((entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE) &&
+ (bytes_evicted < eviction_size_limit)) {
+ HDassert(!(entry_ptr->is_protected));
- while ( ( entry_ptr != NULL ) &&
- ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) &&
- ( bytes_evicted < eviction_size_limit ) )
- {
- HDassert( ! (entry_ptr->is_protected) );
+ next_ptr = entry_ptr->next;
+ prev_ptr = entry_ptr->prev;
- next_ptr = entry_ptr->next;
- prev_ptr = entry_ptr->prev;
+ if (prev_ptr != NULL) {
- if ( prev_ptr != NULL ) {
+ prev_is_dirty = prev_ptr->is_dirty;
+ }
- prev_is_dirty = prev_ptr->is_dirty;
- }
+ if (entry_ptr->is_dirty) {
- if ( entry_ptr->is_dirty ) {
-
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- first_flush_ptr,
- FALSE);
- } else {
-
- bytes_evicted += entry_ptr->size;
-
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- first_flush_ptr,
- TRUE);
- }
+ result =
+ H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, entry_ptr->type,
+ entry_ptr->addr, H5C__NO_FLAGS_SET, first_flush_ptr, FALSE);
+ }
+ else {
- if ( result < 0 ) {
+ bytes_evicted += entry_ptr->size;
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "unable to flush entry")
- }
+ result = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, entry_ptr->type,
+ entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG,
+ first_flush_ptr, TRUE);
+ }
- if ( prev_ptr != NULL ) {
-#ifndef NDEBUG
- if ( prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) {
+ if (result < 0) {
- /* something horrible has happened to *prev_ptr --
- * scream and die.
- */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "*prev_ptr corrupt")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
+ }
- } else
-#endif /* NDEBUG */
- if ( ( prev_ptr->is_dirty != prev_is_dirty )
- ||
- ( prev_ptr->next != next_ptr )
- ||
- ( prev_ptr->is_protected )
- ||
- ( prev_ptr->is_pinned ) ) {
-
- /* something has happened to the LRU -- start over
- * from the tail.
- */
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ if (prev_ptr != NULL) {
+#ifndef NDEBUG
+ if (prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC) {
- } else {
+ /* something horrible has happened to *prev_ptr --
+ * scream and die.
+ */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "*prev_ptr corrupt")
+ }
+ else
+#endif /* NDEBUG */
+ if ((prev_ptr->is_dirty != prev_is_dirty) || (prev_ptr->next != next_ptr) ||
+ (prev_ptr->is_protected) || (prev_ptr->is_pinned)) {
- entry_ptr = prev_ptr;
+ /* something has happened to the LRU -- start over
+ * from the tail.
+ */
+ entry_ptr = cache_ptr->LRU_tail_ptr;
+ }
+ else {
+ entry_ptr = prev_ptr;
+ }
}
- } else {
-
- entry_ptr = NULL;
+ else {
- }
- } /* end while */
-
- /* for now at least, don't bother to maintain the minimum clean size,
- * as the cache should now be less than its maximum size. Due to
- * the vaguries of the cache size reduction algorthim, we may not
- * reduce the size of the cache.
- *
- * If we do, we will calculate a new minimum clean size, which will
- * be enforced the next time we try to make space in the cache.
- *
- * If we don't, no action is necessary, as we have just evicted and/or
- * or flushed a bunch of entries and therefore the sum of the clean
- * and free space in the cache must be greater than or equal to the
- * min clean space requirement (assuming that requirement was met on
- * entry).
- */
+ entry_ptr = NULL;
+ }
+ } /* end while */
- } else /* ! write_permitted */ {
+ /* for now at least, don't bother to maintain the minimum clean size,
+ * as the cache should now be less than its maximum size. Due to
+ * the vaguries of the cache size reduction algorthim, we may not
+ * reduce the size of the cache.
+ *
+ * If we do, we will calculate a new minimum clean size, which will
+ * be enforced the next time we try to make space in the cache.
+ *
+ * If we don't, no action is necessary, as we have just evicted and/or
+ * or flushed a bunch of entries and therefore the sum of the clean
+ * and free space in the cache must be greater than or equal to the
+ * min clean space requirement (assuming that requirement was met on
+ * entry).
+ */
+ }
+ else /* ! write_permitted */ {
- /* since we are not allowed to write, all we can do is evict
- * any clean entries that we may encounter before we either
- * hit the eviction size limit, or encounter the epoch marker.
- *
- * If we are operating read only, this isn't an issue, as there
- * will not be any dirty entries.
- *
- * If we are operating in R/W mode, all the dirty entries we
- * skip will be flushed the next time we attempt to make space
- * when writes are permitted. This may have some local
- * performance implications, but it shouldn't cause any net
- * slowdown.
- */
+ /* since we are not allowed to write, all we can do is evict
+ * any clean entries that we may encounter before we either
+ * hit the eviction size limit, or encounter the epoch marker.
+ *
+ * If we are operating read only, this isn't an issue, as there
+ * will not be any dirty entries.
+ *
+ * If we are operating in R/W mode, all the dirty entries we
+ * skip will be flushed the next time we attempt to make space
+ * when writes are permitted. This may have some local
+ * performance implications, but it shouldn't cause any net
+ * slowdown.
+ */
- HDassert( H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS );
+ HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ entry_ptr = cache_ptr->LRU_tail_ptr;
- while ( ( entry_ptr != NULL ) &&
- ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) &&
- ( bytes_evicted < eviction_size_limit ) )
- {
- HDassert( ! (entry_ptr->is_protected) );
+ while ((entry_ptr != NULL) && ((entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE) &&
+ (bytes_evicted < eviction_size_limit)) {
+ HDassert(!(entry_ptr->is_protected));
- prev_ptr = entry_ptr->prev;
+ prev_ptr = entry_ptr->prev;
- if ( ! (entry_ptr->is_dirty) ) {
+ if (!(entry_ptr->is_dirty)) {
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- first_flush_ptr,
- TRUE);
+ result = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, entry_ptr->type,
+ entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG,
+ first_flush_ptr, TRUE);
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "unable to flush clean entry")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry")
+ }
}
- }
- /* just skip the entry if it is dirty, as we can't do
- * anything with it now since we can't write.
- */
+ /* just skip the entry if it is dirty, as we can't do
+ * anything with it now since we can't write.
+ */
- entry_ptr = prev_ptr;
+ entry_ptr = prev_ptr;
- } /* end while */
- }
+ } /* end while */
+ }
- if ( cache_ptr->index_size < cache_ptr->max_cache_size ) {
+ if (cache_ptr->index_size < cache_ptr->max_cache_size) {
- cache_ptr->cache_full = FALSE;
- }
+ cache_ptr->cache_full = FALSE;
+ }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout__evict_aged_out_entries() */
+ } /* H5C__autoadjust__ageout__evict_aged_out_entries() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout__insert_new_marker
- *
- * Purpose: Find an unused marker cache entry, mark it as used, and
- * insert it at the head of the LRU list. Also add the
- * marker's index in the epoch_markers array.
- *
- * Return: SUCCEED on success/FAIL on failure.
- *
- * Programmer: John Mainzer, 11/19/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout__insert_new_marker
+ *
+ * Purpose: Find an unused marker cache entry, mark it as used, and
+ * insert it at the head of the LRU list. Also add the
+ * marker's index in the epoch_markers array.
+ *
+ * Return: SUCCEED on success/FAIL on failure.
+ *
+ * Programmer: John Mainzer, 11/19/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int i;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( cache_ptr->epoch_markers_active >=
- (cache_ptr->resize_ctl).epochs_before_eviction ) {
+ if (cache_ptr->epoch_markers_active >= (cache_ptr->resize_ctl).epochs_before_eviction) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Already have a full complement of markers.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Already have a full complement of markers.")
+ }
- /* find an unused marker */
- i = 0;
- while ( ( (cache_ptr->epoch_marker_active)[i] ) &&
- ( i < H5C__MAX_EPOCH_MARKERS ) )
- {
- i++;
- }
+ /* find an unused marker */
+ i = 0;
+ while (((cache_ptr->epoch_marker_active)[i]) && (i < H5C__MAX_EPOCH_MARKERS)) {
+ i++;
+ }
- if(i >= H5C__MAX_EPOCH_MARKERS)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker.")
+ if (i >= H5C__MAX_EPOCH_MARKERS)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker.")
- HDassert( ((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i );
- HDassert( ((cache_ptr->epoch_markers)[i]).next == NULL );
- HDassert( ((cache_ptr->epoch_markers)[i]).prev == NULL );
+ HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
- (cache_ptr->epoch_marker_active)[i] = TRUE;
+ (cache_ptr->epoch_marker_active)[i] = TRUE;
- cache_ptr->epoch_marker_ringbuf_last =
- (cache_ptr->epoch_marker_ringbuf_last + 1) %
- (H5C__MAX_EPOCH_MARKERS + 1);
+ cache_ptr->epoch_marker_ringbuf_last =
+ (cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
- (cache_ptr->epoch_marker_ringbuf)[cache_ptr->epoch_marker_ringbuf_last] = i;
+ (cache_ptr->epoch_marker_ringbuf)[cache_ptr->epoch_marker_ringbuf_last] = i;
- cache_ptr->epoch_marker_ringbuf_size += 1;
+ cache_ptr->epoch_marker_ringbuf_size += 1;
- if ( cache_ptr->epoch_marker_ringbuf_size > H5C__MAX_EPOCH_MARKERS ) {
+ if (cache_ptr->epoch_marker_ringbuf_size > H5C__MAX_EPOCH_MARKERS) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow.")
+ }
- H5C__DLL_PREPEND((&((cache_ptr->epoch_markers)[i])), \
- (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (FAIL))
+ H5C__DLL_PREPEND((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr,
+ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size,
+ (FAIL))
- cache_ptr->epoch_markers_active += 1;
+ cache_ptr->epoch_markers_active += 1;
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout__insert_new_marker() */
+ } /* H5C__autoadjust__ageout__insert_new_marker() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout__remove_all_markers
- *
- * Purpose: Remove all epoch markers from the LRU list and mark them
- * as inactive.
- *
- * Return: SUCCEED on success/FAIL on failure.
- *
- * Programmer: John Mainzer, 11/22/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
- int ring_buf_index;
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout__remove_all_markers
+ *
+ * Purpose: Remove all epoch markers from the LRU list and mark them
+ * as inactive.
+ *
+ * Return: SUCCEED on success/FAIL on failure.
+ *
+ * Programmer: John Mainzer, 11/22/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int i;
+ int ring_buf_index;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- while ( cache_ptr->epoch_markers_active > 0 )
- {
- /* get the index of the last epoch marker in the LRU list
- * and remove it from the ring buffer.
- */
+ while (cache_ptr->epoch_markers_active > 0) {
+ /* get the index of the last epoch marker in the LRU list
+ * and remove it from the ring buffer.
+ */
- ring_buf_index = cache_ptr->epoch_marker_ringbuf_first;
- i = (cache_ptr->epoch_marker_ringbuf)[ring_buf_index];
+ ring_buf_index = cache_ptr->epoch_marker_ringbuf_first;
+ i = (cache_ptr->epoch_marker_ringbuf)[ring_buf_index];
- cache_ptr->epoch_marker_ringbuf_first =
- (cache_ptr->epoch_marker_ringbuf_first + 1) %
- (H5C__MAX_EPOCH_MARKERS + 1);
+ cache_ptr->epoch_marker_ringbuf_first =
+ (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
- cache_ptr->epoch_marker_ringbuf_size -= 1;
+ cache_ptr->epoch_marker_ringbuf_size -= 1;
- if ( cache_ptr->epoch_marker_ringbuf_size < 0 ) {
+ if (cache_ptr->epoch_marker_ringbuf_size < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
+ }
- if ( (cache_ptr->epoch_marker_active)[i] != TRUE ) {
+ if ((cache_ptr->epoch_marker_active)[i] != TRUE) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
+ }
- /* remove the epoch marker from the LRU list */
- H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), \
- (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (FAIL))
+ /* remove the epoch marker from the LRU list */
+ H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr,
+ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size,
+ (FAIL))
- /* mark the epoch marker as unused. */
- (cache_ptr->epoch_marker_active)[i] = FALSE;
+ /* mark the epoch marker as unused. */
+ (cache_ptr->epoch_marker_active)[i] = FALSE;
- HDassert( ((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i );
- HDassert( ((cache_ptr->epoch_markers)[i]).next == NULL );
- HDassert( ((cache_ptr->epoch_markers)[i]).prev == NULL );
+ HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
- /* decrement the number of active epoch markers */
- cache_ptr->epoch_markers_active -= 1;
+ /* decrement the number of active epoch markers */
+ cache_ptr->epoch_markers_active -= 1;
- HDassert( cache_ptr->epoch_markers_active == \
- cache_ptr->epoch_marker_ringbuf_size );
- }
+ HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout__remove_all_markers() */
+ } /* H5C__autoadjust__ageout__remove_all_markers() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__autoadjust__ageout__remove_excess_markers
- *
- * Purpose: Remove epoch markers from the end of the LRU list and
- * mark them as inactive until the number of active markers
- * equals the the current value of
- * (cache_ptr->resize_ctl).epochs_before_eviction.
- *
- * Return: SUCCEED on success/FAIL on failure.
- *
- * Programmer: John Mainzer, 11/19/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
- int ring_buf_index;
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__autoadjust__ageout__remove_excess_markers
+ *
+ * Purpose: Remove epoch markers from the end of the LRU list and
+ * mark them as inactive until the number of active markers
+ * equals the the current value of
+ * (cache_ptr->resize_ctl).epochs_before_eviction.
+ *
+ * Return: SUCCEED on success/FAIL on failure.
+ *
+ * Programmer: John Mainzer, 11/19/04
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int i;
+ int ring_buf_index;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( cache_ptr->epoch_markers_active <=
- (cache_ptr->resize_ctl).epochs_before_eviction ) {
+ if (cache_ptr->epoch_markers_active <= (cache_ptr->resize_ctl).epochs_before_eviction) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "no excess markers on entry.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "no excess markers on entry.")
+ }
- while ( cache_ptr->epoch_markers_active >
- (cache_ptr->resize_ctl).epochs_before_eviction )
- {
- /* get the index of the last epoch marker in the LRU list
- * and remove it from the ring buffer.
- */
+ while (cache_ptr->epoch_markers_active > (cache_ptr->resize_ctl).epochs_before_eviction) {
+ /* get the index of the last epoch marker in the LRU list
+ * and remove it from the ring buffer.
+ */
- ring_buf_index = cache_ptr->epoch_marker_ringbuf_first;
- i = (cache_ptr->epoch_marker_ringbuf)[ring_buf_index];
+ ring_buf_index = cache_ptr->epoch_marker_ringbuf_first;
+ i = (cache_ptr->epoch_marker_ringbuf)[ring_buf_index];
- cache_ptr->epoch_marker_ringbuf_first =
- (cache_ptr->epoch_marker_ringbuf_first + 1) %
- (H5C__MAX_EPOCH_MARKERS + 1);
+ cache_ptr->epoch_marker_ringbuf_first =
+ (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
- cache_ptr->epoch_marker_ringbuf_size -= 1;
+ cache_ptr->epoch_marker_ringbuf_size -= 1;
- if ( cache_ptr->epoch_marker_ringbuf_size < 0 ) {
+ if (cache_ptr->epoch_marker_ringbuf_size < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow.")
+ }
- if ( (cache_ptr->epoch_marker_active)[i] != TRUE ) {
+ if ((cache_ptr->epoch_marker_active)[i] != TRUE) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?")
+ }
- /* remove the epoch marker from the LRU list */
- H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), \
- (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (FAIL))
+ /* remove the epoch marker from the LRU list */
+ H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr,
+ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size,
+ (FAIL))
- /* mark the epoch marker as unused. */
- (cache_ptr->epoch_marker_active)[i] = FALSE;
+ /* mark the epoch marker as unused. */
+ (cache_ptr->epoch_marker_active)[i] = FALSE;
- HDassert( ((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i );
- HDassert( ((cache_ptr->epoch_markers)[i]).next == NULL );
- HDassert( ((cache_ptr->epoch_markers)[i]).prev == NULL );
+ HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
- /* decrement the number of active epoch markers */
- cache_ptr->epoch_markers_active -= 1;
+ /* decrement the number of active epoch markers */
+ cache_ptr->epoch_markers_active -= 1;
- HDassert( cache_ptr->epoch_markers_active == \
- cache_ptr->epoch_marker_ringbuf_size );
- }
+ HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__autoadjust__ageout__remove_excess_markers() */
+ } /* H5C__autoadjust__ageout__remove_excess_markers() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C__flash_increase_cache_size
- *
- * Purpose: If there is not at least new_entry_size - old_entry_size
- * bytes of free space in the cache and the current
- * max_cache_size is less than (cache_ptr->resize_ctl).max_size,
- * perform a flash increase in the cache size and then reset
- * the full cache hit rate statistics, and exit.
- *
- * Return: Non-negative on success/Negative on failure.
- *
- * Programmer: John Mainzer, 12/31/07
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C__flash_increase_cache_size(H5C_t * cache_ptr,
- size_t old_entry_size,
- size_t new_entry_size)
-{
- size_t new_max_cache_size = 0;
- size_t old_max_cache_size = 0;
- size_t new_min_clean_size = 0;
- size_t old_min_clean_size = 0;
- size_t space_needed;
- enum H5C_resize_status status = flash_increase; /* may change */
- double hit_rate;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->flash_size_increase_possible );
- HDassert( new_entry_size > cache_ptr->flash_size_increase_threshold );
- HDassert( old_entry_size < new_entry_size );
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C__flash_increase_cache_size
+ *
+ * Purpose: If there is not at least new_entry_size - old_entry_size
+ * bytes of free space in the cache and the current
+ * max_cache_size is less than (cache_ptr->resize_ctl).max_size,
+ * perform a flash increase in the cache size and then reset
+ * the full cache hit rate statistics, and exit.
+ *
+ * Return: Non-negative on success/Negative on failure.
+ *
+ * Programmer: John Mainzer, 12/31/07
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr, size_t old_entry_size,
+ size_t new_entry_size)
+ {
+ size_t new_max_cache_size = 0;
+ size_t old_max_cache_size = 0;
+ size_t new_min_clean_size = 0;
+ size_t old_min_clean_size = 0;
+ size_t space_needed;
+ enum H5C_resize_status status = flash_increase; /* may change */
+ double hit_rate;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr->flash_size_increase_possible);
+ HDassert(new_entry_size > cache_ptr->flash_size_increase_threshold);
+ HDassert(old_entry_size < new_entry_size);
+
+ if (old_entry_size >= new_entry_size) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "old_entry_size >= new_entry_size")
+ }
- if ( old_entry_size >= new_entry_size ) {
+ space_needed = new_entry_size - old_entry_size;
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "old_entry_size >= new_entry_size")
- }
+ if (((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) &&
+ (cache_ptr->max_cache_size < (cache_ptr->resize_ctl).max_size)) {
- space_needed = new_entry_size - old_entry_size;
+ /* we have work to do */
- if ( ( (cache_ptr->index_size + space_needed) >
- cache_ptr->max_cache_size ) &&
- ( cache_ptr->max_cache_size < (cache_ptr->resize_ctl).max_size ) ) {
+ switch ((cache_ptr->resize_ctl).flash_incr_mode) {
+ case H5C_flash_incr__off:
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ "flash_size_increase_possible but H5C_flash_incr__off?!")
+ break;
- /* we have work to do */
+ case H5C_flash_incr__add_space:
+ if (cache_ptr->index_size < cache_ptr->max_cache_size) {
- switch ( (cache_ptr->resize_ctl).flash_incr_mode )
- {
- case H5C_flash_incr__off:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "flash_size_increase_possible but H5C_flash_incr__off?!")
- break;
+ HDassert((cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed);
+ space_needed -= cache_ptr->max_cache_size - cache_ptr->index_size;
+ }
+ space_needed = (size_t)(((double)space_needed) * (cache_ptr->resize_ctl).flash_multiple);
- case H5C_flash_incr__add_space:
- if ( cache_ptr->index_size < cache_ptr->max_cache_size ) {
+ new_max_cache_size = cache_ptr->max_cache_size + space_needed;
- HDassert( (cache_ptr->max_cache_size - cache_ptr->index_size)
- < space_needed );
- space_needed -= cache_ptr->max_cache_size -
- cache_ptr->index_size;
- }
- space_needed =
- (size_t)(((double)space_needed) *
- (cache_ptr->resize_ctl).flash_multiple);
+ break;
- new_max_cache_size = cache_ptr->max_cache_size + space_needed;
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?.")
+ break;
+ }
- break;
+ if (new_max_cache_size > (cache_ptr->resize_ctl).max_size) {
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Unknown flash_incr_mode?!?!?.")
- break;
- }
-
- if ( new_max_cache_size > (cache_ptr->resize_ctl).max_size ) {
+ new_max_cache_size = (cache_ptr->resize_ctl).max_size;
+ }
- new_max_cache_size = (cache_ptr->resize_ctl).max_size;
- }
+ HDassert(new_max_cache_size > cache_ptr->max_cache_size);
- HDassert( new_max_cache_size > cache_ptr->max_cache_size );
+ new_min_clean_size =
+ (size_t)((double)new_max_cache_size * ((cache_ptr->resize_ctl).min_clean_fraction));
- new_min_clean_size = (size_t)
- ((double)new_max_cache_size *
- ((cache_ptr->resize_ctl).min_clean_fraction));
+ HDassert(new_min_clean_size <= new_max_cache_size);
- HDassert( new_min_clean_size <= new_max_cache_size );
+ old_max_cache_size = cache_ptr->max_cache_size;
+ old_min_clean_size = cache_ptr->min_clean_size;
- old_max_cache_size = cache_ptr->max_cache_size;
- old_min_clean_size = cache_ptr->min_clean_size;
+ cache_ptr->max_cache_size = new_max_cache_size;
+ cache_ptr->min_clean_size = new_min_clean_size;
- cache_ptr->max_cache_size = new_max_cache_size;
- cache_ptr->min_clean_size = new_min_clean_size;
+ /* update flash cache size increase fields as appropriate */
+ HDassert(cache_ptr->flash_size_increase_possible);
- /* update flash cache size increase fields as appropriate */
- HDassert ( cache_ptr->flash_size_increase_possible );
+ switch ((cache_ptr->resize_ctl).flash_incr_mode) {
+ case H5C_flash_incr__off:
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ "flash_size_increase_possible but H5C_flash_incr__off?!")
+ break;
- switch ( (cache_ptr->resize_ctl).flash_incr_mode )
- {
- case H5C_flash_incr__off:
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "flash_size_increase_possible but H5C_flash_incr__off?!")
- break;
+ case H5C_flash_incr__add_space:
+ cache_ptr->flash_size_increase_threshold = (size_t)(
+ ((double)(cache_ptr->max_cache_size)) * ((cache_ptr->resize_ctl).flash_threshold));
+ break;
- case H5C_flash_incr__add_space:
- cache_ptr->flash_size_increase_threshold =
- (size_t)
- (((double)(cache_ptr->max_cache_size)) *
- ((cache_ptr->resize_ctl).flash_threshold));
- break;
+ default: /* should be unreachable */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?.")
+ break;
+ }
- default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Unknown flash_incr_mode?!?!?.")
- break;
- }
+ /* note that we don't cycle the epoch markers. We can
+ * argue either way as to whether we should, but for now
+ * we don't.
+ */
- /* note that we don't cycle the epoch markers. We can
- * argue either way as to whether we should, but for now
- * we don't.
- */
+ if ((cache_ptr->resize_ctl).rpt_fcn != NULL) {
- if ( (cache_ptr->resize_ctl).rpt_fcn != NULL ) {
+ /* get the hit rate for the reporting function. Should still
+ * be good as we haven't reset the hit rate statistics.
+ */
+ if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED) {
- /* get the hit rate for the reporting function. Should still
- * be good as we haven't reset the hit rate statistics.
- */
- if ( H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
+ }
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
+ (*((cache_ptr->resize_ctl).rpt_fcn))(cache_ptr, H5C__CURR_AUTO_RESIZE_RPT_FCN_VER, hit_rate,
+ status, old_max_cache_size, new_max_cache_size,
+ old_min_clean_size, new_min_clean_size);
}
- (*((cache_ptr->resize_ctl).rpt_fcn))
- (cache_ptr,
- H5C__CURR_AUTO_RESIZE_RPT_FCN_VER,
- hit_rate,
- status,
- old_max_cache_size,
- new_max_cache_size,
- old_min_clean_size,
- new_min_clean_size);
- }
-
- if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
+ if (H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED) {
- /* this should be impossible... */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_reset_cache_hit_rate_stats failed.")
+ /* this should be impossible... */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed.")
+ }
}
- }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C__flash_increase_cache_size() */
+ } /* H5C__flash_increase_cache_size() */
-
-/*-------------------------------------------------------------------------
- * Function: H5C_flush_invalidate_cache
- *
- * Purpose: Flush and destroy the entries contained in the target
- * cache.
- *
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be either flushed or
- * destroyed. However all unprotected entries should be
- * flushed and destroyed before the function returns failure.
- *
- * While pinned entries can usually be flushed, they cannot
- * be destroyed. However, they should be unpinned when all
- * the entries that reference them have been destroyed (thus
- * reduding the pinned entry's reference count to 0, allowing
- * it to be unpinned).
- *
- * If pinned entries are present, the function makes repeated
- * passes through the cache, flushing all dirty entries
- * (including the pinned dirty entries where permitted) and
- * destroying all unpinned entries. This process is repeated
- * until either the cache is empty, or the number of pinned
- * entries stops decreasing on each pass.
- *
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the flush (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id).
- *
- * Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
- *
- * Programmer: John Mainzer
- * 3/24/065
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C_flush_invalidate_cache(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- unsigned flags)
-{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t status;
- hbool_t first_flush = TRUE;
- int32_t protected_entries = 0;
- int32_t i;
- int32_t cur_pel_len;
- int32_t old_pel_len;
- int32_t passes = 0;
- unsigned cooked_flags;
- H5SL_node_t * node_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * next_entry_ptr = NULL;
+ /*-------------------------------------------------------------------------
+ * Function: H5C_flush_invalidate_cache
+ *
+ * Purpose: Flush and destroy the entries contained in the target
+ * cache.
+ *
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be either flushed or
+ * destroyed. However all unprotected entries should be
+ * flushed and destroyed before the function returns failure.
+ *
+ * While pinned entries can usually be flushed, they cannot
+ * be destroyed. However, they should be unpinned when all
+ * the entries that reference them have been destroyed (thus
+ * reduding the pinned entry's reference count to 0, allowing
+ * it to be unpinned).
+ *
+ * If pinned entries are present, the function makes repeated
+ * passes through the cache, flushing all dirty entries
+ * (including the pinned dirty entries where permitted) and
+ * destroying all unpinned entries. This process is repeated
+ * until either the cache is empty, or the number of pinned
+ * entries stops decreasing on each pass.
+ *
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the flush (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id).
+ *
+ * Return: Non-negative on success/Negative on failure or if there was
+ * a request to flush all items and something was protected.
+ *
+ * Programmer: John Mainzer
+ * 3/24/065
+ *
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C_flush_invalidate_cache(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ unsigned flags)
+ {
+ H5C_t * cache_ptr = f->shared->cache;
+ herr_t status;
+ hbool_t first_flush = TRUE;
+ int32_t protected_entries = 0;
+ int32_t i;
+ int32_t cur_pel_len;
+ int32_t old_pel_len;
+ int32_t passes = 0;
+ unsigned cooked_flags;
+ H5SL_node_t * node_ptr = NULL;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ H5C_cache_entry_t *next_entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- int64_t actual_slist_len = 0;
- int64_t initial_slist_len = 0;
- size_t actual_slist_size = 0;
- size_t initial_slist_size = 0;
+ int64_t actual_slist_len = 0;
+ int64_t initial_slist_len = 0;
+ size_t actual_slist_size = 0;
+ size_t initial_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->slist_ptr );
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr->slist_ptr);
- /* Filter out the flags that are not relevant to the flush/invalidate.
- * At present, only the H5C__FLUSH_CLEAR_ONLY_FLAG is kept.
- */
- cooked_flags = flags & H5C__FLUSH_CLEAR_ONLY_FLAG;
+ /* Filter out the flags that are not relevant to the flush/invalidate.
+ * At present, only the H5C__FLUSH_CLEAR_ONLY_FLAG is kept.
+ */
+ cooked_flags = flags & H5C__FLUSH_CLEAR_ONLY_FLAG;
- /* remove ageout markers if present */
- if ( cache_ptr->epoch_markers_active > 0 ) {
+ /* remove ageout markers if present */
+ if (cache_ptr->epoch_markers_active > 0) {
- status = H5C__autoadjust__ageout__remove_all_markers(cache_ptr);
+ status = H5C__autoadjust__ageout__remove_all_markers(cache_ptr);
- if ( status != SUCCEED ) {
+ if (status != SUCCEED) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "error removing all epoch markers.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers.")
+ }
}
- }
-
- /* The flush procedure here is a bit strange.
- *
- * In the outer while loop we make at least one pass through the
- * cache, and then repeat until either all the pinned entries
- * unpin themselves, or until the number of pinned entries stops
- * declining. In this later case, we scream and die.
- *
- * Since the fractal heap can dirty, resize, and/or move entries
- * in is flush callback, it is possible that the cache will still
- * contain dirty entries at this point. If so, we must make up to
- * H5C__MAX_PASSES_ON_FLUSH more passes through the skip list
- * to allow it to empty. If is is not empty at this point, we again
- * scream and die.
- *
- * Further, since clean entries can be dirtied, resized, and/or moved
- * as the result of a flush call back (either the entries own, or that
- * for some other cache entry), we can no longer promise to flush
- * the cache entries in increasing address order.
- *
- * Instead, we just do the best we can -- making a pass through
- * the skip list, and then a pass through the "clean" entries, and
- * then repeating as needed. Thus it is quite possible that an
- * entry will be evicted from the cache only to be re-loaded later
- * in the flush process (From what Quincey tells me, the pin
- * mechanism makes this impossible, but even it it is true now,
- * we shouldn't count on it in the future.)
- *
- * The bottom line is that entries will probably be flushed in close
- * to increasing address order, but there are no guarantees.
- */
- cur_pel_len = cache_ptr->pel_len;
- old_pel_len = cache_ptr->pel_len;
-
- while ( cache_ptr->index_len > 0 )
- {
- /* first, try to flush-destroy any dirty entries. Do this by
- * making a scan through the slist. Note that new dirty entries
- * may be created by the flush call backs. Thus it is possible
- * that the slist will not be empty after we finish the scan.
- */
-
- if ( cache_ptr->slist_len == 0 ) {
+ /* The flush procedure here is a bit strange.
+ *
+ * In the outer while loop we make at least one pass through the
+ * cache, and then repeat until either all the pinned entries
+ * unpin themselves, or until the number of pinned entries stops
+ * declining. In this later case, we scream and die.
+ *
+ * Since the fractal heap can dirty, resize, and/or move entries
+ * in is flush callback, it is possible that the cache will still
+ * contain dirty entries at this point. If so, we must make up to
+ * H5C__MAX_PASSES_ON_FLUSH more passes through the skip list
+ * to allow it to empty. If is is not empty at this point, we again
+ * scream and die.
+ *
+ * Further, since clean entries can be dirtied, resized, and/or moved
+ * as the result of a flush call back (either the entries own, or that
+ * for some other cache entry), we can no longer promise to flush
+ * the cache entries in increasing address order.
+ *
+ * Instead, we just do the best we can -- making a pass through
+ * the skip list, and then a pass through the "clean" entries, and
+ * then repeating as needed. Thus it is quite possible that an
+ * entry will be evicted from the cache only to be re-loaded later
+ * in the flush process (From what Quincey tells me, the pin
+ * mechanism makes this impossible, but even it it is true now,
+ * we shouldn't count on it in the future.)
+ *
+ * The bottom line is that entries will probably be flushed in close
+ * to increasing address order, but there are no guarantees.
+ */
- node_ptr = NULL;
- HDassert( cache_ptr->slist_size == 0 );
+ cur_pel_len = cache_ptr->pel_len;
+ old_pel_len = cache_ptr->pel_len;
- } else {
+ while (cache_ptr->index_len > 0) {
+ /* first, try to flush-destroy any dirty entries. Do this by
+ * making a scan through the slist. Note that new dirty entries
+ * may be created by the flush call backs. Thus it is possible
+ * that the slist will not be empty after we finish the scan.
+ */
- node_ptr = H5SL_first(cache_ptr->slist_ptr);
+ if (cache_ptr->slist_len == 0) {
- if ( node_ptr == NULL ) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "slist_len != 0 && node_ptr == NULL");
+ node_ptr = NULL;
+ HDassert(cache_ptr->slist_size == 0);
}
+ else {
- next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
-
- if ( next_entry_ptr == NULL ) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "next_entry_ptr == NULL 1 ?!?!");
- }
-#ifndef NDEBUG
- HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
- HDassert( next_entry_ptr->is_dirty );
- HDassert( next_entry_ptr->in_slist );
+ node_ptr = H5SL_first(cache_ptr->slist_ptr);
- }
+ if (node_ptr == NULL) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist_len != 0 && node_ptr == NULL");
+ }
-#if H5C_DO_SANITY_CHECKS
- /* Depending on circumstances, H5C_flush_single_entry() will
- * remove dirty entries from the slist as it flushes them.
- * Thus for sanity checks we must make note of the initial
- * slist length and size before we do any flushes.
- */
- initial_slist_len = cache_ptr->slist_len;
- initial_slist_size = cache_ptr->slist_size;
-
- /* There is also the possibility that entries will be
- * dirtied, resized, and/or moved as the result of
- * calls to the flush callbacks. We use the slist_len_increase
- * and slist_size_increase increase fields in struct H5C_t
- * to track these changes for purpose of sanity checking.
- * To this end, we must zero these fields before we start
- * the pass through the slist.
- */
- cache_ptr->slist_len_increase = 0;
- cache_ptr->slist_size_increase = 0;
-
- /* Finally, reset the actual_slist_len and actual_slist_size
- * fields to zero, as these fields are used to accumulate
- * the slist lenght and size that we see as we scan through
- * the slist.
- */
- actual_slist_len = 0;
- actual_slist_size = 0;
-#endif /* H5C_DO_SANITY_CHECKS */
+ next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- while ( node_ptr != NULL )
- {
- entry_ptr = next_entry_ptr;
-
- /* With the advent of the fractal heap, it is possible
- * that the flush callback will dirty and/or resize
- * other entries in the cache. In particular, while
- * Quincey has promised me that this will never happen,
- * it is possible that the flush callback for an
- * entry may protect an entry that is not in the cache,
- * perhaps causing the cache to flush and possibly
- * evict the entry associated with node_ptr to make
- * space for the new entry.
- *
- * Thus we do a bit of extra sanity checking on entry_ptr,
- * and break out of this scan of the skip list if we
- * detect major problems. We have a bit of leaway on the
- * number of passes though the skip list, so this shouldn't
- * be an issue in the flush in and of itself, as it should
- * be all but impossible for this to happen more than once
- * in any flush.
- *
- * Observe that that breaking out of the scan early
- * shouldn't break the sanity checks just after the end
- * of this while loop.
- *
- * If an entry has merely been marked clean and removed from
- * the s-list, we simply break out of the scan.
- *
- * If the entry has been evicted, we flag an error and
- * exit.
- */
+ if (next_entry_ptr == NULL) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL 1 ?!?!");
+ }
#ifndef NDEBUG
- if ( entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "entry_ptr->magic is invalid ?!?!");
-
- } else
+ HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
#endif /* NDEBUG */
- if ( ( ! entry_ptr->is_dirty ) ||
- ( ! entry_ptr->in_slist ) ) {
-
- /* the s-list has been modified out from under us.
- * break out of the loop.
- */
- break;
+ HDassert(next_entry_ptr->is_dirty);
+ HDassert(next_entry_ptr->in_slist);
}
- /* increment node pointer now, before we delete its target
- * from the slist.
+#if H5C_DO_SANITY_CHECKS
+ /* Depending on circumstances, H5C_flush_single_entry() will
+ * remove dirty entries from the slist as it flushes them.
+ * Thus for sanity checks we must make note of the initial
+ * slist length and size before we do any flushes.
*/
- node_ptr = H5SL_next(node_ptr);
- if ( node_ptr != NULL ) {
-
- next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- if ( next_entry_ptr == NULL ) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "next_entry_ptr == NULL 2 ?!?!");
- }
-#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
- HDassert( next_entry_ptr->is_dirty );
- HDassert( next_entry_ptr->in_slist );
-
- } else {
+ initial_slist_len = cache_ptr->slist_len;
+ initial_slist_size = cache_ptr->slist_size;
- next_entry_ptr = NULL;
- }
+ /* There is also the possibility that entries will be
+ * dirtied, resized, and/or moved as the result of
+ * calls to the flush callbacks. We use the slist_len_increase
+ * and slist_size_increase increase fields in struct H5C_t
+ * to track these changes for purpose of sanity checking.
+ * To this end, we must zero these fields before we start
+ * the pass through the slist.
+ */
+ cache_ptr->slist_len_increase = 0;
+ cache_ptr->slist_size_increase = 0;
- /* Note that we now remove nodes from the slist as we flush
- * the associated entries, instead of leaving them there
- * until we are done, and then destroying all nodes in
+ /* Finally, reset the actual_slist_len and actual_slist_size
+ * fields to zero, as these fields are used to accumulate
+ * the slist lenght and size that we see as we scan through
* the slist.
- *
- * While this optimization used to be easy, with the possibility
- * of new entries being added to the slist in the midst of the
- * flush, we must keep the slist in canonical form at all
- * times.
*/
-
- HDassert( entry_ptr != NULL );
- HDassert( entry_ptr->in_slist );
-
-#if H5C_DO_SANITY_CHECKS
- /* update actual_slist_len & actual_slist_size before
- * the flush. Note that the entry will be removed
- * from the slist after the flush, and thus may be
- * resized by the flush callback. This is OK, as
- * we will catch the size delta in
- * cache_ptr->slist_size_increase.
- *
- * Note that we include pinned entries in this count, even
- * though we will not actually flush them.
- */
- actual_slist_len++;
- actual_slist_size += entry_ptr->size;
+ actual_slist_len = 0;
+ actual_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- if ( entry_ptr->is_protected ) {
+ while (node_ptr != NULL) {
+ entry_ptr = next_entry_ptr;
- /* we have major problems -- but lets flush
- * everything we can before we flag an error.
+ /* With the advent of the fractal heap, it is possible
+ * that the flush callback will dirty and/or resize
+ * other entries in the cache. In particular, while
+ * Quincey has promised me that this will never happen,
+ * it is possible that the flush callback for an
+ * entry may protect an entry that is not in the cache,
+ * perhaps causing the cache to flush and possibly
+ * evict the entry associated with node_ptr to make
+ * space for the new entry.
+ *
+ * Thus we do a bit of extra sanity checking on entry_ptr,
+ * and break out of this scan of the skip list if we
+ * detect major problems. We have a bit of leaway on the
+ * number of passes though the skip list, so this shouldn't
+ * be an issue in the flush in and of itself, as it should
+ * be all but impossible for this to happen more than once
+ * in any flush.
+ *
+ * Observe that that breaking out of the scan early
+ * shouldn't break the sanity checks just after the end
+ * of this while loop.
+ *
+ * If an entry has merely been marked clean and removed from
+ * the s-list, we simply break out of the scan.
+ *
+ * If the entry has been evicted, we flag an error and
+ * exit.
*/
- protected_entries++;
+#ifndef NDEBUG
+ if (entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry_ptr->magic is invalid ?!?!");
+ }
+ else
+#endif /* NDEBUG */
+ if ((!entry_ptr->is_dirty) || (!entry_ptr->in_slist)) {
- } else if ( entry_ptr->is_pinned ) {
+ /* the s-list has been modified out from under us.
+ * break out of the loop.
+ */
+ break;
+ }
- /* Test to see if we are can flush the entry now.
- * If we can, go ahead and flush, but don't tell
- * H5C_flush_single_entry() to destroy the entry
- * as pinned entries can't be evicted.
+ /* increment node pointer now, before we delete its target
+ * from the slist.
*/
- if ( TRUE ) { /* When we get to multithreaded cache,
- * we will need either locking code, and/or
- * a test to see if the entry is in flushable
- * condition here.
- */
-
- status = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- NULL,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- &first_flush,
- FALSE);
- if ( status < 0 ) {
-
- /* This shouldn't happen -- if it does, we are toast
- * so just scream and die.
- */
+ node_ptr = H5SL_next(node_ptr);
+ if (node_ptr != NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "dirty pinned entry flush failed.")
+ next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
+ if (next_entry_ptr == NULL) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL 2 ?!?!");
}
+#ifndef NDEBUG
+ HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+#endif /* NDEBUG */
+ HDassert(next_entry_ptr->is_dirty);
+ HDassert(next_entry_ptr->in_slist);
}
- } else {
-
- status = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- NULL,
- entry_ptr->addr,
- (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG),
- &first_flush,
- TRUE);
- if ( status < 0 ) {
+ else {
- /* This shouldn't happen -- if it does, we are toast so
- * just scream and die.
- */
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "dirty entry flush destroy failed.")
+ next_entry_ptr = NULL;
}
- }
- } /* end while loop scanning skip list */
-#if H5C_DO_SANITY_CHECKS
- /* It is possible that entries were added to the slist during
- * the scan, either before or after scan pointer. The following
- * asserts take this into account.
- *
- * Don't bother with the sanity checks if node_ptr != NULL, as
- * in this case we broke out of the loop because it got changed
- * out from under us.
- */
+ /* Note that we now remove nodes from the slist as we flush
+ * the associated entries, instead of leaving them there
+ * until we are done, and then destroying all nodes in
+ * the slist.
+ *
+ * While this optimization used to be easy, with the possibility
+ * of new entries being added to the slist in the midst of the
+ * flush, we must keep the slist in canonical form at all
+ * times.
+ */
- if ( node_ptr == NULL ) {
+ HDassert(entry_ptr != NULL);
+ HDassert(entry_ptr->in_slist);
- HDassert( (actual_slist_len + cache_ptr->slist_len) ==
- (initial_slist_len + cache_ptr->slist_len_increase) );
- HDassert( (actual_slist_size + cache_ptr->slist_size) ==
- (initial_slist_size + cache_ptr->slist_size_increase) );
- }
+#if H5C_DO_SANITY_CHECKS
+ /* update actual_slist_len & actual_slist_size before
+ * the flush. Note that the entry will be removed
+ * from the slist after the flush, and thus may be
+ * resized by the flush callback. This is OK, as
+ * we will catch the size delta in
+ * cache_ptr->slist_size_increase.
+ *
+ * Note that we include pinned entries in this count, even
+ * though we will not actually flush them.
+ */
+ actual_slist_len++;
+ actual_slist_size += entry_ptr->size;
#endif /* H5C_DO_SANITY_CHECKS */
- /* Since we are doing a destroy, we must make a pass through
- * the hash table and try to flush - destroy all entries that
- * remain.
- *
- * It used to be that all entries remaining in the cache at
- * this point had to be clean, but with the fractal heap mods
- * this may not be the case. If so, we will flush entries out
- * of increasing address order.
- *
- * Writes to disk are possible here.
- */
- for ( i = 0; i < H5C__HASH_TABLE_LEN; i++ )
- {
- next_entry_ptr = cache_ptr->index[i];
-
- while ( next_entry_ptr != NULL )
- {
- entry_ptr = next_entry_ptr;
-
- next_entry_ptr = entry_ptr->ht_next;
-#ifndef NDEBUG
- HDassert ( ( next_entry_ptr == NULL ) ||
- ( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC ) );
-#endif /* NDEBUG */
- if ( entry_ptr->is_protected ) {
-#ifndef NDEBUG
- HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
+ if (entry_ptr->is_protected) {
- /* we have major problems -- but lets flush and destroy
+ /* we have major problems -- but lets flush
* everything we can before we flag an error.
*/
- protected_entries++;
+ protected_entries++;
+ }
+ else if (entry_ptr->is_pinned) {
+
+ /* Test to see if we are can flush the entry now.
+ * If we can, go ahead and flush, but don't tell
+ * H5C_flush_single_entry() to destroy the entry
+ * as pinned entries can't be evicted.
+ */
+ if (TRUE) { /* When we get to multithreaded cache,
+ * we will need either locking code, and/or
+ * a test to see if the entry is in flushable
+ * condition here.
+ */
- if ( ! entry_ptr->in_slist ) {
+ status =
+ H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, NULL,
+ entry_ptr->addr, H5C__NO_FLAGS_SET, &first_flush, FALSE);
+ if (status < 0) {
- HDassert( !(entry_ptr->is_dirty) );
+ /* This shouldn't happen -- if it does, we are toast
+ * so just scream and die.
+ */
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty pinned entry flush failed.")
+ }
}
- } else if ( ! ( entry_ptr->is_pinned ) ) {
-
- status = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- NULL,
- entry_ptr->addr,
- (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG),
- &first_flush,
- TRUE);
- if ( status < 0 ) {
+ }
+ else {
+
+ status = H5C_flush_single_entry(
+ f, primary_dxpl_id, secondary_dxpl_id, NULL, entry_ptr->addr,
+ (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), &first_flush, TRUE);
+ if (status < 0) {
/* This shouldn't happen -- if it does, we are toast so
* just scream and die.
*/
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Entry flush destroy failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry flush destroy failed.")
}
}
- /* We can't do anything if the entry is pinned. The
- * hope is that the entry will be unpinned as the
- * result of destroys of entries that reference it.
- *
- * We detect this by noting the change in the number
- * of pinned entries from pass to pass. If it stops
- * shrinking before it hits zero, we scream and die.
- */
- /* if the flush function on the entry we last evicted
- * loaded an entry into cache (as Quincey has promised me
- * it never will), and if the cache was full, it is
- * possible that *next_entry_ptr was flushed or evicted.
- *
- * Test to see if this happened here. Note that if this
- * test is triggred, we are accessing a deallocated piece
- * of dynamically allocated memory, so we just scream and
- * die.
- */
-#ifndef NDEBUG
- if ( ( next_entry_ptr != NULL ) &&
- ( next_entry_ptr->magic !=
- H5C__H5C_CACHE_ENTRY_T_MAGIC ) ) {
+ } /* end while loop scanning skip list */
- /* Something horrible has happened to
- * *next_entry_ptr -- scream and die.
- */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "next_entry_ptr->magic is invalid?!?!?.")
- }
-#endif /* NDEBUG */
- } /* end while loop scanning hash table bin */
- } /* end for loop scanning hash table */
+#if H5C_DO_SANITY_CHECKS
+ /* It is possible that entries were added to the slist during
+ * the scan, either before or after scan pointer. The following
+ * asserts take this into account.
+ *
+ * Don't bother with the sanity checks if node_ptr != NULL, as
+ * in this case we broke out of the loop because it got changed
+ * out from under us.
+ */
- old_pel_len = cur_pel_len;
- cur_pel_len = cache_ptr->pel_len;
+ if (node_ptr == NULL) {
- if ( ( cur_pel_len > 0 ) && ( cur_pel_len >= old_pel_len ) ) {
+ HDassert((actual_slist_len + cache_ptr->slist_len) ==
+ (initial_slist_len + cache_ptr->slist_len_increase));
+ HDassert((actual_slist_size + cache_ptr->slist_size) ==
+ (initial_slist_size + cache_ptr->slist_size_increase));
+ }
+#endif /* H5C_DO_SANITY_CHECKS */
- /* The number of pinned entries is positive, and it is not
- * declining. Scream and die.
- */
+ /* Since we are doing a destroy, we must make a pass through
+ * the hash table and try to flush - destroy all entries that
+ * remain.
+ *
+ * It used to be that all entries remaining in the cache at
+ * this point had to be clean, but with the fractal heap mods
+ * this may not be the case. If so, we will flush entries out
+ * of increasing address order.
+ *
+ * Writes to disk are possible here.
+ */
+ for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ next_entry_ptr = cache_ptr->index[i];
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Pinned entry count not decreasing, cur_pel_len = %d, old_pel_len = %d", (int)cur_pel_len, (int)old_pel_len)
+ while (next_entry_ptr != NULL) {
+ entry_ptr = next_entry_ptr;
- } else if ( ( cur_pel_len == 0 ) && ( old_pel_len == 0 ) ) {
+ next_entry_ptr = entry_ptr->ht_next;
+#ifndef NDEBUG
+ HDassert((next_entry_ptr == NULL) ||
+ (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
+#endif /* NDEBUG */
+ if (entry_ptr->is_protected) {
+#ifndef NDEBUG
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+#endif /* NDEBUG */
- /* increment the pass count */
- passes++;
- }
+ /* we have major problems -- but lets flush and destroy
+ * everything we can before we flag an error.
+ */
+ protected_entries++;
- if ( passes >= H5C__MAX_PASSES_ON_FLUSH ) {
+ if (!entry_ptr->in_slist) {
- /* we have exceeded the maximum number of passes through the
- * cache to flush and destroy all entries. Scream and die.
- */
+ HDassert(!(entry_ptr->is_dirty));
+ }
+ }
+ else if (!(entry_ptr->is_pinned)) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Maximum passes on flush exceeded.")
- }
- } /* main while loop */
+ status = H5C_flush_single_entry(
+ f, primary_dxpl_id, secondary_dxpl_id, NULL, entry_ptr->addr,
+ (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), &first_flush, TRUE);
+ if (status < 0) {
- /* Invariants, after destroying all entries in the hash table */
- HDassert( cache_ptr->index_size == 0 );
- HDassert( cache_ptr->clean_index_size == 0 );
- HDassert( cache_ptr->dirty_index_size == 0 );
- HDassert( cache_ptr->slist_len == 0 );
- HDassert( cache_ptr->slist_size == 0 );
- HDassert( cache_ptr->pel_len == 0 );
- HDassert( cache_ptr->pel_size == 0 );
- HDassert( cache_ptr->pl_len == 0 );
- HDassert( cache_ptr->pl_size == 0 );
- HDassert( cache_ptr->LRU_list_len == 0 );
- HDassert( cache_ptr->LRU_list_size == 0 );
+ /* This shouldn't happen -- if it does, we are toast so
+ * just scream and die.
+ */
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Entry flush destroy failed.")
+ }
+ }
+ /* We can't do anything if the entry is pinned. The
+ * hope is that the entry will be unpinned as the
+ * result of destroys of entries that reference it.
+ *
+ * We detect this by noting the change in the number
+ * of pinned entries from pass to pass. If it stops
+ * shrinking before it hits zero, we scream and die.
+ */
+ /* if the flush function on the entry we last evicted
+ * loaded an entry into cache (as Quincey has promised me
+ * it never will), and if the cache was full, it is
+ * possible that *next_entry_ptr was flushed or evicted.
+ *
+ * Test to see if this happened here. Note that if this
+ * test is triggred, we are accessing a deallocated piece
+ * of dynamically allocated memory, so we just scream and
+ * die.
+ */
+#ifndef NDEBUG
+ if ((next_entry_ptr != NULL) && (next_entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC)) {
- HDassert( protected_entries <= cache_ptr->pl_len );
+ /* Something horrible has happened to
+ * *next_entry_ptr -- scream and die.
+ */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr->magic is invalid?!?!?.")
+ }
+#endif /* NDEBUG */
+ } /* end while loop scanning hash table bin */
+ } /* end for loop scanning hash table */
- if ( protected_entries > 0 ) {
+ old_pel_len = cur_pel_len;
+ cur_pel_len = cache_ptr->pel_len;
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Cache has protected entries.")
+ if ((cur_pel_len > 0) && (cur_pel_len >= old_pel_len)) {
- } else if ( cur_pel_len > 0 ) {
+ /* The number of pinned entries is positive, and it is not
+ * declining. Scream and die.
+ */
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "Can't unpin all pinned entries.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
+ "Pinned entry count not decreasing, cur_pel_len = %d, old_pel_len = %d",
+ (int)cur_pel_len, (int)old_pel_len)
+ }
+ else if ((cur_pel_len == 0) && (old_pel_len == 0)) {
- }
+ /* increment the pass count */
+ passes++;
+ }
-done:
+ if (passes >= H5C__MAX_PASSES_ON_FLUSH) {
- FUNC_LEAVE_NOAPI(ret_value)
+ /* we have exceeded the maximum number of passes through the
+ * cache to flush and destroy all entries. Scream and die.
+ */
-} /* H5C_flush_invalidate_cache() */
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Maximum passes on flush exceeded.")
+ }
+ } /* main while loop */
+
+ /* Invariants, after destroying all entries in the hash table */
+ HDassert(cache_ptr->index_size == 0);
+ HDassert(cache_ptr->clean_index_size == 0);
+ HDassert(cache_ptr->dirty_index_size == 0);
+ HDassert(cache_ptr->slist_len == 0);
+ HDassert(cache_ptr->slist_size == 0);
+ HDassert(cache_ptr->pel_len == 0);
+ HDassert(cache_ptr->pel_size == 0);
+ HDassert(cache_ptr->pl_len == 0);
+ HDassert(cache_ptr->pl_size == 0);
+ HDassert(cache_ptr->LRU_list_len == 0);
+ HDassert(cache_ptr->LRU_list_size == 0);
+
+ HDassert(protected_entries <= cache_ptr->pl_len);
+
+ if (protected_entries > 0) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cache has protected entries.")
+ }
+ else if (cur_pel_len > 0) {
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_flush_single_entry
- *
- * Purpose: Flush or clear (and evict if requested) the cache entry
- * with the specified address and type. If the type is NULL,
- * any unprotected entry at the specified address will be
- * flushed (and possibly evicted).
- *
- * Attempts to flush a protected entry will result in an
- * error.
- *
- * *first_flush_ptr should be true if only one
- * flush is contemplated before the next load, or if this
- * is the first of a sequence of flushes that will be
- * completed before the next load. *first_flush_ptr is set
- * to false if a flush actually takes place, and should be
- * left false until the end of the sequence.
- *
- * The primary_dxpl_id is used if *first_flush_ptr is TRUE
- * on entry, and a flush actually takes place. The
- * secondary_dxpl_id is used in any subsequent flush where
- * *first_flush_ptr is FALSE on entry.
- *
- * If the H5C__FLUSH_INVALIDATE_FLAG flag is set, the entry will
- * be cleared and not flushed -- in the case *first_flush_ptr,
- * primary_dxpl_id, and secondary_dxpl_id are all irrelevent,
- * and the call can't be part of a sequence of flushes.
- *
- * If the caller knows the address of the TBBT node at
- * which the target entry resides, it can avoid a lookup
- * by supplying that address in the tgt_node_ptr parameter.
- * If this parameter is NULL, the function will do a TBBT
- * search for the entry instead.
- *
- * The function does nothing silently if there is no entry
- * at the supplied address, or if the entry found has the
- * wrong type.
- *
- * Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
- *
- * Programmer: John Mainzer, 5/5/04
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C_flush_single_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type_ptr,
- haddr_t addr,
- unsigned flags,
- hbool_t * first_flush_ptr,
- hbool_t del_entry_from_slist_on_destroy)
-{
- H5C_t * cache_ptr = f->shared->cache;
- hbool_t destroy;
- hbool_t clear_only;
- hbool_t take_ownership;
- hbool_t was_dirty;
- hbool_t destroy_entry;
- herr_t status;
- int type_id;
- unsigned flush_flags = H5C_CALLBACK__NO_FLAGS_SET;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't unpin all pinned entries.")
+ }
- FUNC_ENTER_NOAPI_NOINIT
+done:
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( H5F_addr_defined(addr) );
- HDassert( first_flush_ptr );
+ FUNC_LEAVE_NOAPI(ret_value)
- destroy = ( (flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 );
- clear_only = ( (flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
- take_ownership = ( (flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
+ } /* H5C_flush_invalidate_cache() */
- /* Set the flag for destroying the entry, based on the 'take ownership'
- * and 'destroy' flags
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C_flush_single_entry
+ *
+ * Purpose: Flush or clear (and evict if requested) the cache entry
+ * with the specified address and type. If the type is NULL,
+ * any unprotected entry at the specified address will be
+ * flushed (and possibly evicted).
+ *
+ * Attempts to flush a protected entry will result in an
+ * error.
+ *
+ * *first_flush_ptr should be true if only one
+ * flush is contemplated before the next load, or if this
+ * is the first of a sequence of flushes that will be
+ * completed before the next load. *first_flush_ptr is set
+ * to false if a flush actually takes place, and should be
+ * left false until the end of the sequence.
+ *
+ * The primary_dxpl_id is used if *first_flush_ptr is TRUE
+ * on entry, and a flush actually takes place. The
+ * secondary_dxpl_id is used in any subsequent flush where
+ * *first_flush_ptr is FALSE on entry.
+ *
+ * If the H5C__FLUSH_INVALIDATE_FLAG flag is set, the entry will
+ * be cleared and not flushed -- in the case *first_flush_ptr,
+ * primary_dxpl_id, and secondary_dxpl_id are all irrelevent,
+ * and the call can't be part of a sequence of flushes.
+ *
+ * If the caller knows the address of the TBBT node at
+ * which the target entry resides, it can avoid a lookup
+ * by supplying that address in the tgt_node_ptr parameter.
+ * If this parameter is NULL, the function will do a TBBT
+ * search for the entry instead.
+ *
+ * The function does nothing silently if there is no entry
+ * at the supplied address, or if the entry found has the
+ * wrong type.
+ *
+ * Return: Non-negative on success/Negative on failure or if there was
+ * an attempt to flush a protected item.
+ *
+ * Programmer: John Mainzer, 5/5/04
+ *
+ *-------------------------------------------------------------------------
*/
- if(take_ownership)
- destroy_entry = FALSE;
- else
- destroy_entry = destroy;
+ static herr_t H5C_flush_single_entry(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ const H5C_class_t *type_ptr, haddr_t addr, unsigned flags,
+ hbool_t *first_flush_ptr, hbool_t del_entry_from_slist_on_destroy)
+ {
+ H5C_t * cache_ptr = f->shared->cache;
+ hbool_t destroy;
+ hbool_t clear_only;
+ hbool_t take_ownership;
+ hbool_t was_dirty;
+ hbool_t destroy_entry;
+ herr_t status;
+ int type_id;
+ unsigned flush_flags = H5C_CALLBACK__NO_FLAGS_SET;
+ H5C_cache_entry_t *entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(H5F_addr_defined(addr));
+ HDassert(first_flush_ptr);
+
+ destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
+ clear_only = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
+ take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
+
+ /* Set the flag for destroying the entry, based on the 'take ownership'
+ * and 'destroy' flags
+ */
+ if (take_ownership)
+ destroy_entry = FALSE;
+ else
+ destroy_entry = destroy;
- /* attempt to find the target entry in the hash table */
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ /* attempt to find the target entry in the hash table */
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
#if H5C_DO_SANITY_CHECKS
- if ( entry_ptr != NULL ) {
+ if (entry_ptr != NULL) {
- HDassert( ! ( ( destroy ) && ( entry_ptr->is_pinned ) ) );
+ HDassert(!((destroy) && (entry_ptr->is_pinned)));
- if ( entry_ptr->in_slist ) {
+ if (entry_ptr->in_slist) {
- if ( ( ( entry_ptr->flush_marker ) && ( ! entry_ptr->is_dirty ) ) ||
- ( entry_ptr->addr != addr ) ) {
+ if (((entry_ptr->flush_marker) && (!entry_ptr->is_dirty)) || (entry_ptr->addr != addr)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "entry in slist failed sanity checks.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks.")
+ }
}
- } else {
+ else {
- if ( ( entry_ptr->is_dirty ) ||
- ( entry_ptr->flush_marker ) ||
- ( entry_ptr->addr != addr ) ) {
+ if ((entry_ptr->is_dirty) || (entry_ptr->flush_marker) || (entry_ptr->addr != addr)) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "entry failed sanity checks.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks.")
+ }
}
}
- }
#endif /* H5C_DO_SANITY_CHECKS */
- if ( ( entry_ptr != NULL ) && ( entry_ptr->is_protected ) )
- {
+ if ((entry_ptr != NULL) && (entry_ptr->is_protected)) {
- /* Attempt to flush a protected entry -- scream and die. */
- HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, \
- "Attempt to flush a protected entry.")
- }
+ /* Attempt to flush a protected entry -- scream and die. */
+ HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry.")
+ }
- if ( ( entry_ptr != NULL ) &&
- ( ( type_ptr == NULL ) || ( type_ptr->id == entry_ptr->type->id ) ) )
- {
- /* we have work to do */
+ if ((entry_ptr != NULL) && ((type_ptr == NULL) || (type_ptr->id == entry_ptr->type->id))) {
+ /* we have work to do */
- /* We will set flush_in_progress back to FALSE at the end if the
- * entry still exists at that point.
- */
- entry_ptr->flush_in_progress = TRUE;
+ /* We will set flush_in_progress back to FALSE at the end if the
+ * entry still exists at that point.
+ */
+ entry_ptr->flush_in_progress = TRUE;
#ifdef H5_HAVE_PARALLEL
#ifndef NDEBUG
- /* If MPI based VFD is used, do special parallel I/O sanity checks.
- * Note that we only do these sanity checks when the clear_only flag
- * is not set, and the entry to be flushed is dirty. Don't bother
- * otherwise as no file I/O can result.
- */
- if(!clear_only && entry_ptr->is_dirty &&
- H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
- H5P_genplist_t *dxpl; /* Dataset transfer property list */
- unsigned coll_meta; /* Collective metadata write flag */
+ /* If MPI based VFD is used, do special parallel I/O sanity checks.
+ * Note that we only do these sanity checks when the clear_only flag
+ * is not set, and the entry to be flushed is dirty. Don't bother
+ * otherwise as no file I/O can result.
+ */
+ if (!clear_only && entry_ptr->is_dirty && H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ H5P_genplist_t *dxpl; /* Dataset transfer property list */
+ unsigned coll_meta; /* Collective metadata write flag */
- /* Get the dataset transfer property list */
- if(NULL == (dxpl = H5I_object(primary_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
+ /* Get the dataset transfer property list */
+ if (NULL == (dxpl = H5I_object(primary_dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
- /* Get the collective metadata write property */
- if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode")
+ /* Get the collective metadata write property */
+ if (H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode")
- /* Sanity check collective metadata write flag */
- HDassert(coll_meta);
- } /* end if */
-#endif /* NDEBUG */
-#endif /* H5_HAVE_PARALLEL */
+ /* Sanity check collective metadata write flag */
+ HDassert(coll_meta);
+ } /* end if */
+#endif /* NDEBUG */
+#endif /* H5_HAVE_PARALLEL */
- was_dirty = entry_ptr->is_dirty;
- type_id = entry_ptr->type->id;
+ was_dirty = entry_ptr->is_dirty;
+ type_id = entry_ptr->type->id;
- entry_ptr->flush_marker = FALSE;
+ entry_ptr->flush_marker = FALSE;
- if ( clear_only ) {
- H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr)
- } else {
- H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
- }
+ if (clear_only) {
+ H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr)
+ }
+ else {
+ H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
+ }
- if ( destroy ) {
- H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr)
- }
+ if (destroy) {
+ H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr)
+ }
- /* Always remove the entry from the hash table on a destroy. On a
- * flush with destroy, it is cheaper to discard the skip list all at
- * once rather than remove the entries one by one, so we only delete
- * from the slist only if requested.
- *
- * We must do deletions now as the callback routines will free the
- * entry if destroy is true.
- *
- * Note that it is possible that the entry will be moved during
- * its call to flush. This will upset H5C_move_entry() if we
- * don't tell it that it doesn't have to worry about updating the
- * index and SLIST. Use the destroy_in_progress field for this
- * purpose.
- */
- if ( destroy ) {
+ /* Always remove the entry from the hash table on a destroy. On a
+ * flush with destroy, it is cheaper to discard the skip list all at
+ * once rather than remove the entries one by one, so we only delete
+ * from the slist only if requested.
+ *
+ * We must do deletions now as the callback routines will free the
+ * entry if destroy is true.
+ *
+ * Note that it is possible that the entry will be moved during
+ * its call to flush. This will upset H5C_move_entry() if we
+ * don't tell it that it doesn't have to worry about updating the
+ * index and SLIST. Use the destroy_in_progress field for this
+ * purpose.
+ */
+ if (destroy) {
- entry_ptr->destroy_in_progress = TRUE;
+ entry_ptr->destroy_in_progress = TRUE;
- H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr)
+ H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr)
- if ( ( entry_ptr->in_slist ) &&
- ( del_entry_from_slist_on_destroy ) ) {
+ if ((entry_ptr->in_slist) && (del_entry_from_slist_on_destroy)) {
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
+ }
}
- }
- /* Update the replacement policy for the flush or eviction.
- * Again, do this now so we don't have to reference freed
- * memory in the destroy case.
- */
- if ( destroy ) { /* AKA eviction */
-
- H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL)
+ /* Update the replacement policy for the flush or eviction.
+ * Again, do this now so we don't have to reference freed
+ * memory in the destroy case.
+ */
+ if (destroy) { /* AKA eviction */
- } else {
+ H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL)
+ }
+ else {
- H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL)
- }
+ H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL)
+ }
- /* Clear the dirty flag only, if requested */
- if ( clear_only ) {
+ /* Clear the dirty flag only, if requested */
+ if (clear_only) {
- if ( destroy ) {
+ if (destroy) {
#ifndef NDEBUG
- /* we are about to call the clear callback with the
- * destroy flag set -- this will result in *entry_ptr
- * being freed. Set the magic field to bad magic
- * so we can detect a freed cache entry if we see
- * one.
- */
- entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
+ /* we are about to call the clear callback with the
+ * destroy flag set -- this will result in *entry_ptr
+ * being freed. Set the magic field to bad magic
+ * so we can detect a freed cache entry if we see
+ * one.
+ */
+ entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
#endif /* NDEBUG */
- entry_ptr->cache_ptr = NULL;
- }
- /* Call the callback routine to clear all dirty flags for object */
- if ( (entry_ptr->type->clear)(f, entry_ptr, destroy_entry) < 0 ) {
+ entry_ptr->cache_ptr = NULL;
+ }
+ /* Call the callback routine to clear all dirty flags for object */
+ if ((entry_ptr->type->clear)(f, entry_ptr, destroy_entry) < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry")
+ }
}
- } else {
+ else {
#if H5C_DO_SANITY_CHECKS
- if ( ( entry_ptr->is_dirty ) &&
- ( cache_ptr->check_write_permitted == NULL ) &&
- ( ! (cache_ptr->write_permitted) ) ) {
+ if ((entry_ptr->is_dirty) && (cache_ptr->check_write_permitted == NULL) &&
+ (!(cache_ptr->write_permitted))) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Write when writes are always forbidden!?!?!")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Write when writes are always forbidden!?!?!")
+ }
#endif /* H5C_DO_SANITY_CHECKS */
- if ( destroy ) {
+ if (destroy) {
#ifndef NDEBUG
- /* we are about to call the flush callback with the
- * destroy flag set -- this will result in *entry_ptr
- * being freed. Set the magic field to bad magic
- * so we can detect a freed cache entry if we see
- * one.
- */
- entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
+ /* we are about to call the flush callback with the
+ * destroy flag set -- this will result in *entry_ptr
+ * being freed. Set the magic field to bad magic
+ * so we can detect a freed cache entry if we see
+ * one.
+ */
+ entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
#endif /* NDEBUG */
- entry_ptr->cache_ptr = NULL;
- }
-
- /* Only block for all the processes on the first piece of metadata
- */
+ entry_ptr->cache_ptr = NULL;
+ }
- if ( *first_flush_ptr && entry_ptr->is_dirty ) {
+ /* Only block for all the processes on the first piece of metadata
+ */
- status = (entry_ptr->type->flush)(f, primary_dxpl_id, destroy_entry,
- entry_ptr->addr, entry_ptr,
- &flush_flags);
- *first_flush_ptr = FALSE;
+ if (*first_flush_ptr && entry_ptr->is_dirty) {
- } else {
+ status = (entry_ptr->type->flush)(f, primary_dxpl_id, destroy_entry, entry_ptr->addr,
+ entry_ptr, &flush_flags);
+ *first_flush_ptr = FALSE;
+ }
+ else {
- status = (entry_ptr->type->flush)(f, secondary_dxpl_id,
- destroy_entry, entry_ptr->addr,
- entry_ptr, &flush_flags);
- }
+ status = (entry_ptr->type->flush)(f, secondary_dxpl_id, destroy_entry, entry_ptr->addr,
+ entry_ptr, &flush_flags);
+ }
- if ( status < 0 ) {
+ if (status < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "unable to flush entry")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
+ }
#ifdef H5_HAVE_PARALLEL
- if ( flush_flags != H5C_CALLBACK__NO_FLAGS_SET ) {
-
- /* In the parallel case, flush operations can
- * cause problems. If they occur, scream and
- * die.
- *
- * At present, in the parallel case, the aux_ptr
- * will only be set if there is more than one
- * process. Thus we can use this to detect
- * the parallel case.
- *
- * This works for now, but if we start using the
- * aux_ptr for other purposes, we will have to
- * change this test accordingly.
- *
- * NB: While this test detects entryies that attempt
- * to resize or move themselves during a flush
- * in the parallel case, it will not detect an
- * entry that dirties, resizes, and/or moves
- * other entries during its flush.
- *
- * From what Quincey tells me, this test is
- * sufficient for now, as any flush routine that
- * does the latter will also do the former.
- *
- * If that ceases to be the case, further
- * tests will be necessary.
- */
- if ( cache_ptr->aux_ptr != NULL ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "resize/move in serialize occurred in parallel case.")
-
- }
- }
-#endif /* H5_HAVE_PARALLEL */
- }
-
- if ( ( ! destroy ) && ( entry_ptr->in_slist ) ) {
-
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
+ if (flush_flags != H5C_CALLBACK__NO_FLAGS_SET) {
+
+ /* In the parallel case, flush operations can
+ * cause problems. If they occur, scream and
+ * die.
+ *
+ * At present, in the parallel case, the aux_ptr
+ * will only be set if there is more than one
+ * process. Thus we can use this to detect
+ * the parallel case.
+ *
+ * This works for now, but if we start using the
+ * aux_ptr for other purposes, we will have to
+ * change this test accordingly.
+ *
+ * NB: While this test detects entryies that attempt
+ * to resize or move themselves during a flush
+ * in the parallel case, it will not detect an
+ * entry that dirties, resizes, and/or moves
+ * other entries during its flush.
+ *
+ * From what Quincey tells me, this test is
+ * sufficient for now, as any flush routine that
+ * does the latter will also do the former.
+ *
+ * If that ceases to be the case, further
+ * tests will be necessary.
+ */
+ if (cache_ptr->aux_ptr != NULL) {
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ "resize/move in serialize occurred in parallel case.")
+ }
+ }
+#endif /* H5_HAVE_PARALLEL */
+ }
- if ( ( ! destroy ) && ( was_dirty ) ) {
+ if ((!destroy) && (entry_ptr->in_slist)) {
- H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr);
- }
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
+ }
- if ( ! destroy ) { /* i.e. if the entry still exists */
+ if ((!destroy) && (was_dirty)) {
- HDassert( !(entry_ptr->is_dirty) );
- HDassert( !(entry_ptr->flush_marker) );
- HDassert( !(entry_ptr->in_slist) );
- HDassert( !(entry_ptr->is_protected) );
- HDassert( !(entry_ptr->is_read_only) );
- HDassert( (entry_ptr->ro_ref_count) == 0 );
+ H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr);
+ }
- if ( (flush_flags & H5C_CALLBACK__SIZE_CHANGED_FLAG) != 0 ) {
+ if (!destroy) { /* i.e. if the entry still exists */
- /* The entry size changed as a result of the flush.
- *
- * Most likely, the entry was compressed, and the
- * new version is of a different size than the old.
- *
- * In any case, we must update entry and cache size
- * accordingly.
- */
- size_t new_size;
+ HDassert(!(entry_ptr->is_dirty));
+ HDassert(!(entry_ptr->flush_marker));
+ HDassert(!(entry_ptr->in_slist));
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert((entry_ptr->ro_ref_count) == 0);
- if ( (entry_ptr->type->size)(f, (void *)entry_ptr, &new_size)
- < 0 ) {
+ if ((flush_flags & H5C_CALLBACK__SIZE_CHANGED_FLAG) != 0) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, \
- "Can't get entry size after flush")
- }
+ /* The entry size changed as a result of the flush.
+ *
+ * Most likely, the entry was compressed, and the
+ * new version is of a different size than the old.
+ *
+ * In any case, we must update entry and cache size
+ * accordingly.
+ */
+ size_t new_size;
- if ( new_size != entry_ptr->size ) {
+ if ((entry_ptr->type->size)(f, (void *)entry_ptr, &new_size) < 0) {
- HDassert( entry_ptr->size < H5C_MAX_ENTRY_SIZE );
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, "Can't get entry size after flush")
+ }
- /* update the hash table for the size change
- * We pass TRUE as the was_clean parameter, as we
- * have already updated the clean and dirty index
- * size fields for the fact that the entry has
- * been flushed. (See above call to
- * H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN()).
- */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), \
- (entry_ptr->size), \
- (new_size), \
- (entry_ptr), \
- (TRUE))
+ if (new_size != entry_ptr->size) {
- /* The entry can't be protected since we just flushed it.
- * Thus we must update the replacement policy data
- * structures for the size change. The macro deals
- * with the pinned case.
- */
- H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, \
- new_size)
+ HDassert(entry_ptr->size < H5C_MAX_ENTRY_SIZE);
- /* The entry can't be in the slist, so no need to update
- * the slist for the size change.
- */
+ /* update the hash table for the size change
+ * We pass TRUE as the was_clean parameter, as we
+ * have already updated the clean and dirty index
+ * size fields for the fact that the entry has
+ * been flushed. (See above call to
+ * H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN()).
+ */
+ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size), (new_size),
+ (entry_ptr), (TRUE))
- /* update stats for the size change */
- H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, \
- entry_ptr, \
- new_size)
+ /* The entry can't be protected since we just flushed it.
+ * Thus we must update the replacement policy data
+ * structures for the size change. The macro deals
+ * with the pinned case.
+ */
+ H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)
- /* finally, update the entry size proper */
- entry_ptr->size = new_size;
- }
- }
+ /* The entry can't be in the slist, so no need to update
+ * the slist for the size change.
+ */
- if ( (flush_flags & H5C_CALLBACK__MOVED_FLAG) != 0 ) {
+ /* update stats for the size change */
+ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)
- /* The entry was moved as the result of the flush.
- *
- * Most likely, the entry was compressed, and the
- * new version is larger than the old and thus had
- * to be relocated.
- *
- * At preset, all processing for this case is
- * handled elsewhere. But lets keep the if statement
- * around just in case.
- */
+ /* finally, update the entry size proper */
+ entry_ptr->size = new_size;
+ }
+ }
- }
+ if ((flush_flags & H5C_CALLBACK__MOVED_FLAG) != 0) {
+
+ /* The entry was moved as the result of the flush.
+ *
+ * Most likely, the entry was compressed, and the
+ * new version is larger than the old and thus had
+ * to be relocated.
+ *
+ * At preset, all processing for this case is
+ * handled elsewhere. But lets keep the if statement
+ * around just in case.
+ */
+ }
- entry_ptr->flush_in_progress = FALSE;
- }
+ entry_ptr->flush_in_progress = FALSE;
+ }
- if ( cache_ptr->log_flush ) {
+ if (cache_ptr->log_flush) {
- status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty,
- flags, type_id);
+ status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, flags, type_id);
- if ( status < 0 ) {
+ if (status < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "log_flush callback failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed.")
+ }
}
}
- }
done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_flush_single_entry() */
-
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_load_entry
- *
- * Purpose: Attempt to load the entry at the specified disk address
- * and with the specified type into memory. If successful.
- * return the in memory address of the entry. Return NULL
- * on failure.
- *
- * Note that this function simply loads the entry into
- * core. It does not insert it into the cache.
- *
- * Return: Non-NULL on success / NULL on failure.
- *
- * Programmer: John Mainzer, 5/18/04
- *
- * QAK -- 1/31/08
- * Added initialization for the new free_file_space_on_destroy
- * field.
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5C_load_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * udata)
-{
- void * thing = NULL; /* Pointer to thing loaded */
- H5C_cache_entry_t * entry; /* Alias for thing loaded, as cache entry */
- void * ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->load);
- HDassert(type->size);
- HDassert(H5F_addr_defined(addr));
-
- if(NULL == (thing = (type->load)(f, dxpl_id, addr, udata)))
+ FUNC_LEAVE_NOAPI(ret_value)
+ } /* H5C_flush_single_entry() */
- HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "unable to load entry")
-
-
- entry = (H5C_cache_entry_t *)thing;
-
- /* In general, an entry should be clean just after it is loaded.
+ /*-------------------------------------------------------------------------
*
- * However, when this code is used in the metadata cache, it is
- * possible that object headers will be dirty at this point, as
- * the load function will alter object headers if necessary to
- * fix an old bug.
+ * Function: H5C_load_entry
*
- * To support this bug fix, I have replace the old assert:
+ * Purpose: Attempt to load the entry at the specified disk address
+ * and with the specified type into memory. If successful.
+ * return the in memory address of the entry. Return NULL
+ * on failure.
*
- * HDassert( entry->is_dirty == FALSE );
+ * Note that this function simply loads the entry into
+ * core. It does not insert it into the cache.
*
- * with:
+ * Return: Non-NULL on success / NULL on failure.
*
- * HDassert( ( entry->is_dirty == FALSE ) || ( type->id == 5 ) );
+ * Programmer: John Mainzer, 5/18/04
*
- * Note that type id 5 is associated with object headers in the metadata
- * cache.
+ * QAK -- 1/31/08
+ * Added initialization for the new free_file_space_on_destroy
+ * field.
*
- * When we get to using H5C for other purposes, we may wish to
- * tighten up the assert so that the loophole only applies to the
- * metadata cache.
+ *-------------------------------------------------------------------------
*/
+ static void *H5C_load_entry(H5F_t * f, hid_t dxpl_id, const H5C_class_t *type, haddr_t addr, void *udata)
+ {
+ void * thing = NULL; /* Pointer to thing loaded */
+ H5C_cache_entry_t *entry; /* Alias for thing loaded, as cache entry */
+ void * ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->cache);
+ HDassert(type);
+ HDassert(type->load);
+ HDassert(type->size);
+ HDassert(H5F_addr_defined(addr));
+
+ if (NULL == (thing = (type->load)(f, dxpl_id, addr, udata)))
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "unable to load entry")
+
+ entry = (H5C_cache_entry_t *)thing;
+
+ /* In general, an entry should be clean just after it is loaded.
+ *
+ * However, when this code is used in the metadata cache, it is
+ * possible that object headers will be dirty at this point, as
+ * the load function will alter object headers if necessary to
+ * fix an old bug.
+ *
+ * To support this bug fix, I have replace the old assert:
+ *
+ * HDassert( entry->is_dirty == FALSE );
+ *
+ * with:
+ *
+ * HDassert( ( entry->is_dirty == FALSE ) || ( type->id == 5 ) );
+ *
+ * Note that type id 5 is associated with object headers in the metadata
+ * cache.
+ *
+ * When we get to using H5C for other purposes, we may wish to
+ * tighten up the assert so that the loophole only applies to the
+ * metadata cache.
+ */
- HDassert( ( entry->is_dirty == FALSE ) || ( type->id == 5 ) );
+ HDassert((entry->is_dirty == FALSE) || (type->id == 5));
#ifndef NDEBUG
- entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
+ entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
- entry->cache_ptr = f->shared->cache;
- entry->addr = addr;
- entry->type = type;
- entry->is_protected = FALSE;
- entry->is_read_only = FALSE;
- entry->ro_ref_count = 0;
- entry->in_slist = FALSE;
- entry->flush_marker = FALSE;
+ entry->cache_ptr = f->shared->cache;
+ entry->addr = addr;
+ entry->type = type;
+ entry->is_protected = FALSE;
+ entry->is_read_only = FALSE;
+ entry->ro_ref_count = 0;
+ entry->in_slist = FALSE;
+ entry->flush_marker = FALSE;
#ifdef H5_HAVE_PARALLEL
- entry->clear_on_unprotect = FALSE;
- entry->flush_immediately = FALSE;
+ entry->clear_on_unprotect = FALSE;
+ entry->flush_immediately = FALSE;
#endif /* H5_HAVE_PARALLEL */
- entry->flush_in_progress = FALSE;
- entry->destroy_in_progress = FALSE;
- entry->free_file_space_on_destroy = FALSE;
+ entry->flush_in_progress = FALSE;
+ entry->destroy_in_progress = FALSE;
+ entry->free_file_space_on_destroy = FALSE;
- if((type->size)(f, thing, &(entry->size)) < 0)
+ if ((type->size)(f, thing, &(entry->size)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, NULL, "Can't get size of thing")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, NULL, "Can't get size of thing")
- HDassert( entry->size < H5C_MAX_ENTRY_SIZE );
+ HDassert(entry->size < H5C_MAX_ENTRY_SIZE);
- entry->next = NULL;
- entry->prev = NULL;
+ entry->next = NULL;
+ entry->prev = NULL;
- entry->aux_next = NULL;
- entry->aux_prev = NULL;
+ entry->aux_next = NULL;
+ entry->aux_prev = NULL;
- H5C__RESET_CACHE_ENTRY_STATS(entry);
+ H5C__RESET_CACHE_ENTRY_STATS(entry);
- ret_value = thing;
+ ret_value = thing;
done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_load_entry() */
+ FUNC_LEAVE_NOAPI(ret_value)
+ } /* H5C_load_entry() */
-
-/*-------------------------------------------------------------------------
- *
- * Function: H5C_make_space_in_cache
- *
- * Purpose: Attempt to evict cache entries until the index_size
- * is at least needed_space below max_cache_size.
- *
- * In passing, also attempt to bring cLRU_list_size to a
- * value greater than min_clean_size.
- *
- * Depending on circumstances, both of these goals may
- * be impossible, as in parallel mode, we must avoid generating
- * a write as part of a read (to avoid deadlock in collective
- * I/O), and in all cases, it is possible (though hopefully
- * highly unlikely) that the protected list may exceed the
- * maximum size of the cache.
- *
- * Thus the function simply does its best, returning success
- * unless an error is encountered.
- *
- * The primary_dxpl_id and secondary_dxpl_id parameters
- * specify the dxpl_ids used on the first write occasioned
- * by the call (primary_dxpl_id), and on all subsequent
- * writes (secondary_dxpl_id). This is useful in the metadata
- * cache, but may not be needed elsewhere. If so, just use the
- * same dxpl_id for both parameters.
- *
- * Observe that this function cannot occasion a read.
- *
- * Return: Non-negative on success/Negative on failure.
- *
- * Programmer: John Mainzer, 5/14/04
- *
- * JRM -- 11/13/08
- * Modified function to always observe the min_clean_size
- * whether we are maintaining the clean and dirt LRU lists
- * or not. To do this, we had to add the new clean_index_size
- * and dirty_index_size fields to H5C_t, and supporting code
- * as needed throughout the cache.
- *
- * The purpose of this modification is to avoid "metadata
- * blizzards" in the write only case. In such instances,
- * the cache was allowed to fill with dirty metadata. When
- * we finally needed to evict an entry to make space, we had
- * to flush out a whole cache full of metadata -- which has
- * interesting performance effects. We hope to avoid (or
- * perhaps more accurately hide) this effect by maintaining
- * the min_clean_size, which should force us to start flushing
- * entries long before we actually have to evict something
- * to make space.
- *
- * MAM -- 01/06/09
- * Added code to maintain clean_entries_skipped and total_entries
- * scanned statistics.
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5C_make_space_in_cache(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- size_t space_needed,
- hbool_t write_permitted,
- hbool_t * first_flush_ptr)
-{
- H5C_t * cache_ptr = f->shared->cache;
- herr_t result;
+ /*-------------------------------------------------------------------------
+ *
+ * Function: H5C_make_space_in_cache
+ *
+ * Purpose: Attempt to evict cache entries until the index_size
+ * is at least needed_space below max_cache_size.
+ *
+ * In passing, also attempt to bring cLRU_list_size to a
+ * value greater than min_clean_size.
+ *
+ * Depending on circumstances, both of these goals may
+ * be impossible, as in parallel mode, we must avoid generating
+ * a write as part of a read (to avoid deadlock in collective
+ * I/O), and in all cases, it is possible (though hopefully
+ * highly unlikely) that the protected list may exceed the
+ * maximum size of the cache.
+ *
+ * Thus the function simply does its best, returning success
+ * unless an error is encountered.
+ *
+ * The primary_dxpl_id and secondary_dxpl_id parameters
+ * specify the dxpl_ids used on the first write occasioned
+ * by the call (primary_dxpl_id), and on all subsequent
+ * writes (secondary_dxpl_id). This is useful in the metadata
+ * cache, but may not be needed elsewhere. If so, just use the
+ * same dxpl_id for both parameters.
+ *
+ * Observe that this function cannot occasion a read.
+ *
+ * Return: Non-negative on success/Negative on failure.
+ *
+ * Programmer: John Mainzer, 5/14/04
+ *
+ * JRM -- 11/13/08
+ * Modified function to always observe the min_clean_size
+ * whether we are maintaining the clean and dirt LRU lists
+ * or not. To do this, we had to add the new clean_index_size
+ * and dirty_index_size fields to H5C_t, and supporting code
+ * as needed throughout the cache.
+ *
+ * The purpose of this modification is to avoid "metadata
+ * blizzards" in the write only case. In such instances,
+ * the cache was allowed to fill with dirty metadata. When
+ * we finally needed to evict an entry to make space, we had
+ * to flush out a whole cache full of metadata -- which has
+ * interesting performance effects. We hope to avoid (or
+ * perhaps more accurately hide) this effect by maintaining
+ * the min_clean_size, which should force us to start flushing
+ * entries long before we actually have to evict something
+ * to make space.
+ *
+ * MAM -- 01/06/09
+ * Added code to maintain clean_entries_skipped and total_entries
+ * scanned statistics.
+ *-------------------------------------------------------------------------
+ */
+ static herr_t H5C_make_space_in_cache(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ size_t space_needed, hbool_t write_permitted,
+ hbool_t * first_flush_ptr)
+ {
+ H5C_t *cache_ptr = f->shared->cache;
+ herr_t result;
#if H5C_COLLECT_CACHE_STATS
- int32_t clean_entries_skipped = 0;
- int32_t total_entries_scanned = 0;
+ int32_t clean_entries_skipped = 0;
+ int32_t total_entries_scanned = 0;
#endif /* H5C_COLLECT_CACHE_STATS */
- int32_t entries_examined = 0;
- int32_t initial_list_len;
- size_t empty_space;
- hbool_t prev_is_dirty = FALSE;
- hbool_t didnt_flush_entry = FALSE;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * prev_ptr;
- H5C_cache_entry_t * next_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert( f );
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( first_flush_ptr != NULL );
- HDassert( ( *first_flush_ptr == TRUE ) || ( *first_flush_ptr == FALSE ) );
- HDassert( cache_ptr->index_size ==
- (cache_ptr->clean_index_size + cache_ptr->dirty_index_size) );
+ int32_t entries_examined = 0;
+ int32_t initial_list_len;
+ size_t empty_space;
+ hbool_t prev_is_dirty = FALSE;
+ hbool_t didnt_flush_entry = FALSE;
+ H5C_cache_entry_t *entry_ptr;
+ H5C_cache_entry_t *prev_ptr;
+ H5C_cache_entry_t *next_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
- if ( write_permitted ) {
+ FUNC_ENTER_NOAPI_NOINIT
- initial_list_len = cache_ptr->LRU_list_len;
+ HDassert(f);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(first_flush_ptr != NULL);
+ HDassert((*first_flush_ptr == TRUE) || (*first_flush_ptr == FALSE));
+ HDassert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ if (write_permitted) {
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ initial_list_len = cache_ptr->LRU_list_len;
- empty_space = 0;
+ entry_ptr = cache_ptr->LRU_tail_ptr;
- } else {
+ if (cache_ptr->index_size >= cache_ptr->max_cache_size) {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = 0;
+ }
+ else {
- }
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ }
- while ( ( ( (cache_ptr->index_size + space_needed)
- >
- cache_ptr->max_cache_size
- )
- ||
- (
- ( empty_space + cache_ptr->clean_index_size )
- <
- ( cache_ptr->min_clean_size )
- )
- )
- &&
- ( entries_examined <= (2 * initial_list_len) )
- &&
- ( entry_ptr != NULL )
- )
- {
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( (entry_ptr->ro_ref_count) == 0 );
+ while ((((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) ||
+ ((empty_space + cache_ptr->clean_index_size) < (cache_ptr->min_clean_size))) &&
+ (entries_examined <= (2 * initial_list_len)) && (entry_ptr != NULL)) {
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert((entry_ptr->ro_ref_count) == 0);
- next_ptr = entry_ptr->next;
- prev_ptr = entry_ptr->prev;
+ next_ptr = entry_ptr->next;
+ prev_ptr = entry_ptr->prev;
- if ( prev_ptr != NULL ) {
+ if (prev_ptr != NULL) {
- prev_is_dirty = prev_ptr->is_dirty;
- }
+ prev_is_dirty = prev_ptr->is_dirty;
+ }
- if ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) {
+ if ((entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE) {
- didnt_flush_entry = FALSE;
+ didnt_flush_entry = FALSE;
- if ( entry_ptr->is_dirty ) {
+ if (entry_ptr->is_dirty) {
#if H5C_COLLECT_CACHE_STATS
- if ( (cache_ptr->index_size + space_needed)
- >
- cache_ptr->max_cache_size ) {
+ if ((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) {
- cache_ptr->entries_scanned_to_make_space++;
- }
+ cache_ptr->entries_scanned_to_make_space++;
+ }
#endif /* H5C_COLLECT_CACHE_STATS */
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- first_flush_ptr,
- FALSE);
- } else if ( (cache_ptr->index_size + space_needed)
- >
- cache_ptr->max_cache_size ) {
+ result = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id,
+ entry_ptr->type, entry_ptr->addr, H5C__NO_FLAGS_SET,
+ first_flush_ptr, FALSE);
+ }
+ else if ((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) {
#if H5C_COLLECT_CACHE_STATS
- cache_ptr->entries_scanned_to_make_space++;
+ cache_ptr->entries_scanned_to_make_space++;
#endif /* H5C_COLLECT_CACHE_STATS */
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- first_flush_ptr,
- TRUE);
- } else {
-
- /* We have enough space so don't flush clean entry.
- * Set result to SUCCEED to avoid triggering the error
- * code below.
- */
+ result = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id,
+ entry_ptr->type, entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG, first_flush_ptr, TRUE);
+ }
+ else {
+
+ /* We have enough space so don't flush clean entry.
+ * Set result to SUCCEED to avoid triggering the error
+ * code below.
+ */
#if H5C_COLLECT_CACHE_STATS
- clean_entries_skipped++;
+ clean_entries_skipped++;
#endif /* H5C_COLLECT_CACHE_STATS */
- didnt_flush_entry = TRUE;
- result = SUCCEED;
-
- }
+ didnt_flush_entry = TRUE;
+ result = SUCCEED;
+ }
#if H5C_COLLECT_CACHE_STATS
- total_entries_scanned++;
+ total_entries_scanned++;
#endif /* H5C_COLLECT_CACHE_STATS */
+ }
+ else {
+ /* Skip epoch markers. Set result to SUCCEED to avoid
+ * triggering the error code below.
+ */
+ didnt_flush_entry = TRUE;
+ result = SUCCEED;
+ }
- } else {
-
- /* Skip epoch markers. Set result to SUCCEED to avoid
- * triggering the error code below.
- */
- didnt_flush_entry = TRUE;
- result = SUCCEED;
- }
-
- if ( result < 0 ) {
+ if (result < 0) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "unable to flush entry")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
+ }
- if ( prev_ptr != NULL ) {
+ if (prev_ptr != NULL) {
#ifndef NDEBUG
- if ( prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) {
-
- /* something horrible has happened to *prev_ptr --
- * scream and die.
- */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "*prev_ptr corrupt 1")
+ if (prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC) {
- }
+ /* something horrible has happened to *prev_ptr --
+ * scream and die.
+ */
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "*prev_ptr corrupt 1")
+ }
#endif /* NDEBUG */
- if ( didnt_flush_entry ) {
-
- /* epoch markers don't get flushed, so the sanity checks
- * on normal entries will fail -- thus just set entry_ptr
- * to prev_ptr and go on.
- */
- entry_ptr = prev_ptr;
+ if (didnt_flush_entry) {
- } else if ( ( prev_ptr->is_dirty != prev_is_dirty )
- ||
- ( prev_ptr->next != next_ptr )
- ||
- ( prev_ptr->is_protected )
- ||
- ( prev_ptr->is_pinned ) ) {
+ /* epoch markers don't get flushed, so the sanity checks
+ * on normal entries will fail -- thus just set entry_ptr
+ * to prev_ptr and go on.
+ */
+ entry_ptr = prev_ptr;
+ }
+ else if ((prev_ptr->is_dirty != prev_is_dirty) || (prev_ptr->next != next_ptr) ||
+ (prev_ptr->is_protected) || (prev_ptr->is_pinned)) {
- /* something has happened to the LRU -- start over
- * from the tail.
- */
- entry_ptr = cache_ptr->LRU_tail_ptr;
+ /* something has happened to the LRU -- start over
+ * from the tail.
+ */
+ entry_ptr = cache_ptr->LRU_tail_ptr;
+ }
+ else {
- } else {
+ entry_ptr = prev_ptr;
+ }
+ }
+ else {
- entry_ptr = prev_ptr;
+ entry_ptr = NULL;
+ }
- }
- } else {
+ entries_examined++;
- entry_ptr = NULL;
+ if (cache_ptr->index_size >= cache_ptr->max_cache_size) {
- }
+ empty_space = 0;
+ }
+ else {
- entries_examined++;
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ }
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ HDassert(cache_ptr->index_size ==
+ (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
+ }
- empty_space = 0;
+#if H5C_COLLECT_CACHE_STATS
+ cache_ptr->calls_to_msic++;
- } else {
+ cache_ptr->total_entries_skipped_in_msic += clean_entries_skipped;
+ cache_ptr->total_entries_scanned_in_msic += total_entries_scanned;
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ if (clean_entries_skipped > cache_ptr->max_entries_skipped_in_msic) {
- }
+ cache_ptr->max_entries_skipped_in_msic = clean_entries_skipped;
+ }
- HDassert( cache_ptr->index_size ==
- (cache_ptr->clean_index_size +
- cache_ptr->dirty_index_size) );
+ if (total_entries_scanned > cache_ptr->max_entries_scanned_in_msic) {
- }
+ cache_ptr->max_entries_scanned_in_msic = total_entries_scanned;
+ }
+#endif /* H5C_COLLECT_CACHE_STATS */
-#if H5C_COLLECT_CACHE_STATS
- cache_ptr->calls_to_msic++;
+ HDassert((entries_examined > (2 * initial_list_len)) ||
+ ((cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
+ cache_ptr->max_cache_size) ||
+ ((cache_ptr->clean_index_size + empty_space) >= cache_ptr->min_clean_size));
- cache_ptr->total_entries_skipped_in_msic += clean_entries_skipped;
- cache_ptr->total_entries_scanned_in_msic += total_entries_scanned;
+#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- if ( clean_entries_skipped > cache_ptr->max_entries_skipped_in_msic ) {
+ HDassert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size));
+ HDassert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size));
- cache_ptr->max_entries_skipped_in_msic = clean_entries_skipped;
+#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
}
+ else {
- if ( total_entries_scanned > cache_ptr->max_entries_scanned_in_msic ) {
+ HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
- cache_ptr->max_entries_scanned_in_msic = total_entries_scanned;
- }
-#endif /* H5C_COLLECT_CACHE_STATS */
+ initial_list_len = cache_ptr->cLRU_list_len;
+ entry_ptr = cache_ptr->cLRU_tail_ptr;
- HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
- cache_ptr->max_cache_size ) ||
- ( ( cache_ptr->clean_index_size + empty_space )
- >= cache_ptr->min_clean_size ) );
+ while (((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) &&
+ (entries_examined <= initial_list_len) && (entry_ptr != NULL)) {
+ HDassert(!(entry_ptr->is_protected));
+ HDassert(!(entry_ptr->is_read_only));
+ HDassert((entry_ptr->ro_ref_count) == 0);
+ HDassert(!(entry_ptr->is_dirty));
-#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
+ prev_ptr = entry_ptr->aux_prev;
- HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) );
- HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) );
+ result = H5C_flush_single_entry(f, primary_dxpl_id, secondary_dxpl_id, entry_ptr->type,
+ entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, first_flush_ptr,
+ TRUE);
-#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
+ if (result < 0) {
- } else {
-
- HDassert( H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS );
-
- initial_list_len = cache_ptr->cLRU_list_len;
- entry_ptr = cache_ptr->cLRU_tail_ptr;
-
- while ( ( (cache_ptr->index_size + space_needed)
- >
- cache_ptr->max_cache_size
- )
- &&
- ( entries_examined <= initial_list_len )
- &&
- ( entry_ptr != NULL )
- )
- {
- HDassert( ! (entry_ptr->is_protected) );
- HDassert( ! (entry_ptr->is_read_only) );
- HDassert( (entry_ptr->ro_ref_count) == 0 );
- HDassert( ! (entry_ptr->is_dirty) );
-
- prev_ptr = entry_ptr->aux_prev;
-
- result = H5C_flush_single_entry(f,
- primary_dxpl_id,
- secondary_dxpl_id,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- first_flush_ptr,
- TRUE);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
- "unable to flush entry")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
+ }
- entry_ptr = prev_ptr;
- entries_examined++;
+ entry_ptr = prev_ptr;
+ entries_examined++;
+ }
}
- }
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_make_space_in_cache() */
+ } /* H5C_make_space_in_cache() */
-
/*-------------------------------------------------------------------------
*
* Function: H5C_validate_lru_list
*
* Purpose: Debugging function that scans the LRU list for errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -8388,117 +7467,92 @@ done:
*/
#if H5C_DO_EXTREME_SANITY_CHECKS
-static herr_t
-H5C_validate_lru_list(H5C_t * cache_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int32_t len = 0;
- size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
-
- FUNC_ENTER_NOAPI_NOINIT
+ static herr_t H5C_validate_lru_list(H5C_t * cache_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int32_t len = 0;
+ size_t size = 0;
+ H5C_cache_entry_t *entry_ptr = NULL;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ FUNC_ENTER_NOAPI_NOINIT
- if ( ( ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_tail_ptr == NULL )
- )
- &&
- ( cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr )
- ) {
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 1 failed")
- }
+ if (((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_tail_ptr == NULL)) &&
+ (cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr)) {
- if ( ( cache_ptr->LRU_list_len < 0 ) || ( cache_ptr->LRU_list_size < 0 ) ) {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 1 failed")
+ }
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 2 failed")
- }
+ if ((cache_ptr->LRU_list_len < 0) || (cache_ptr->LRU_list_size < 0)) {
- if ( ( cache_ptr->LRU_list_len == 1 )
- &&
- ( ( cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr )
- ||
- ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_head_ptr->size != cache_ptr->LRU_list_size )
- )
- ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 3 failed")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 2 failed")
+ }
- if ( ( cache_ptr->LRU_list_len >= 1 )
- &&
- ( ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_head_ptr->prev != NULL )
- ||
- ( cache_ptr->LRU_tail_ptr == NULL )
- ||
- ( cache_ptr->LRU_tail_ptr->next != NULL )
- )
- ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 4 failed")
- }
+ if ((cache_ptr->LRU_list_len == 1) &&
+ ((cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr) || (cache_ptr->LRU_head_ptr == NULL) ||
+ (cache_ptr->LRU_head_ptr->size != cache_ptr->LRU_list_size))) {
- entry_ptr = cache_ptr->LRU_head_ptr;
- while ( entry_ptr != NULL )
- {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 3 failed")
+ }
- if ( ( entry_ptr != cache_ptr->LRU_head_ptr ) &&
- ( ( entry_ptr->prev == NULL ) ||
- ( entry_ptr->prev->next != entry_ptr ) ) ) {
+ if ((cache_ptr->LRU_list_len >= 1) &&
+ ((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_head_ptr->prev != NULL) ||
+ (cache_ptr->LRU_tail_ptr == NULL) || (cache_ptr->LRU_tail_ptr->next != NULL))) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 5 failed")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 4 failed")
}
- if ( ( entry_ptr != cache_ptr->LRU_tail_ptr ) &&
- ( ( entry_ptr->next == NULL ) ||
- ( entry_ptr->next->prev != entry_ptr ) ) ) {
+ entry_ptr = cache_ptr->LRU_head_ptr;
+ while (entry_ptr != NULL) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 6 failed")
- }
+ if ((entry_ptr != cache_ptr->LRU_head_ptr) &&
+ ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr))) {
- len++;
- size += entry_ptr->size;
- entry_ptr = entry_ptr->next;
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 5 failed")
+ }
- if ( ( cache_ptr->LRU_list_len != len ) ||
- ( cache_ptr->LRU_list_size != size ) ) {
+ if ((entry_ptr != cache_ptr->LRU_tail_ptr) &&
+ ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr))) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 7 failed")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 6 failed")
+ }
+
+ len++;
+ size += entry_ptr->size;
+ entry_ptr = entry_ptr->next;
+ }
+
+ if ((cache_ptr->LRU_list_len != len) || (cache_ptr->LRU_list_size != size)) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 7 failed")
+ }
done:
- if ( ret_value != SUCCEED ) {
+ if (ret_value != SUCCEED) {
- HDassert(0);
- }
+ HDassert(0);
+ }
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_validate_lru_list() */
+ } /* H5C_validate_lru_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
/*-------------------------------------------------------------------------
*
* Function: H5C_verify_not_in_index
*
* Purpose: Debugging function that scans the hash table to verify
- * that the specified instance of H5C_cache_entry_t is not
- * present.
+ * that the specified instance of H5C_cache_entry_t is not
+ * present.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -8508,48 +7562,42 @@ done:
*/
#if H5C_DO_EXTREME_SANITY_CHECKS
-static herr_t
-H5C_verify_not_in_index(H5C_t * cache_ptr,
- H5C_cache_entry_t * entry_ptr)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int32_t i;
- int32_t depth;
- H5C_cache_entry_t * scan_ptr = NULL;
+ static herr_t H5C_verify_not_in_index(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr)
+ {
+ herr_t ret_value = SUCCEED; /* Return value */
+ int32_t i;
+ int32_t depth;
+ H5C_cache_entry_t *scan_ptr = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT
- HDassert( cache_ptr != NULL );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( entry_ptr != NULL );
+ HDassert(cache_ptr != NULL);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(entry_ptr != NULL);
- for ( i = 0; i < H5C__HASH_TABLE_LEN; i++ )
- {
- depth = 0;
- scan_ptr = cache_ptr->index[i];
+ for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ depth = 0;
+ scan_ptr = cache_ptr->index[i];
- while ( scan_ptr != NULL )
- {
- if ( scan_ptr == entry_ptr ) {
+ while (scan_ptr != NULL) {
+ if (scan_ptr == entry_ptr) {
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Entry already in index.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Entry already in index.")
+ }
+ depth++;
+ scan_ptr = scan_ptr->ht_next;
}
- depth++;
- scan_ptr = scan_ptr->ht_next;
}
- }
done:
- if ( ret_value != SUCCEED ) {
+ if (ret_value != SUCCEED) {
- HDassert(0);
- }
+ HDassert(0);
+ }
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_verify_not_in_index() */
+ } /* H5C_verify_not_in_index() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
diff --git a/src/H5CS.c b/src/H5CS.c
index a173c0b..cb7e362 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,10 +25,9 @@
*
*/
-
-#include "H5private.h" /* Generic Functions */
-#include "H5CSprivate.h" /* Function stack */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5CSprivate.h" /* Function stack */
+#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_CODESTACK
@@ -43,17 +42,16 @@
* by "H5CS_t *fstack =".
*/
static H5CS_t *H5CS_get_stack(void);
-#define H5CS_get_my_stack() H5CS_get_stack()
+#define H5CS_get_my_stack() H5CS_get_stack()
#else /* H5_HAVE_THREADSAFE */
/*
* The function stack. Eventually we'll have some sort of global table so each
* thread has it's own stack. The stacks will be created on demand when the
* thread first calls H5CS_push(). */
-H5CS_t H5CS_stack_g[1];
-#define H5CS_get_my_stack() (H5CS_stack_g+0)
+H5CS_t H5CS_stack_g[1];
+#define H5CS_get_my_stack() (H5CS_stack_g + 0)
#endif /* H5_HAVE_THREADSAFE */
-
#ifdef H5_HAVE_THREADSAFE
/*-------------------------------------------------------------------------
* Function: H5CS_get_stack
@@ -68,8 +66,6 @@ H5CS_t H5CS_stack_g[1];
* Programmer: Quincey Koziol
* February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5CS_t *
@@ -83,14 +79,16 @@ H5CS_get_stack(void)
if (!fstack) {
/* No associated value with current thread - create one */
#ifdef H5_HAVE_WIN_THREADS
- fstack = (H5CS_t *)LocalAlloc(LPTR, sizeof(H5CS_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
+ fstack = (H5CS_t *)LocalAlloc(
+ LPTR, sizeof(H5CS_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
#else
- fstack = (H5CS_t *)HDmalloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
+ fstack = (H5CS_t *)HDmalloc(
+ sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
#endif /* H5_HAVE_WIN_THREADS */
HDassert(fstack);
/* Set the thread-specific info */
- fstack->nused=0;
+ fstack->nused = 0;
/* (It's not necessary to release this in this API, it is
* released by the "key destructor" set up in the H5TS
@@ -101,9 +99,8 @@ H5CS_get_stack(void)
FUNC_LEAVE_NOAPI_NOFS(fstack);
} /* end H5CS_get_stack() */
-#endif /* H5_HAVE_THREADSAFE */
+#endif /* H5_HAVE_THREADSAFE */
-
/*-------------------------------------------------------------------------
* Function: H5CS_print_stack
*
@@ -114,15 +111,13 @@ H5CS_get_stack(void)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
{
- const int indent = 2; /* Indention level */
- int i; /* Local index ariable */
+ const int indent = 2; /* Indention level */
+ int i; /* Local index ariable */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
@@ -134,24 +129,19 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
if (!stream)
stream = stderr;
- HDfprintf (stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
+ HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
/* try show the process or thread id in multiple processes cases*/
-#ifdef H5_HAVE_THREADSAFE
- HDfprintf (stream, "thread %lu.", HDpthread_self_ulong());
-#else /* H5_HAVE_THREADSAFE */
- HDfprintf (stream, "thread 0.");
-#endif /* H5_HAVE_THREADSAFE */
- if (fstack && fstack->nused>0)
- HDfprintf (stream, " Back trace follows.");
- HDfputc ('\n', stream);
-
- for (i=fstack->nused-1; i>=0; --i)
+ HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
+ if (fstack && fstack->nused > 0)
+ HDfprintf(stream, " Back trace follows.");
+ HDfputc('\n', stream);
+
+ for (i = fstack->nused - 1; i >= 0; --i)
HDfprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->slot[i]);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_print_stack() */
-
/*-------------------------------------------------------------------------
* Function: H5CS_print
*
@@ -169,7 +159,7 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
herr_t
H5CS_print(FILE *stream)
{
- H5CS_t *fstack = H5CS_get_my_stack (); /* Get the correct function stack */
+ H5CS_t *fstack = H5CS_get_my_stack(); /* Get the correct function stack */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
@@ -182,7 +172,6 @@ H5CS_print(FILE *stream)
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_print() */
-
/*-------------------------------------------------------------------------
* Function: H5CS_push
*
@@ -194,14 +183,12 @@ H5CS_print(FILE *stream)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5CS_push(const char *func_name)
{
- H5CS_t *fstack = H5CS_get_my_stack ();
+ H5CS_t *fstack = H5CS_get_my_stack(); /* Current function stack for library */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
@@ -213,14 +200,13 @@ H5CS_push(const char *func_name)
/*
* Push the function if there's room. Otherwise just increment count
*/
- if (fstack->nused<H5CS_NSLOTS)
- fstack->slot[fstack->nused] = func_name;
+ if (fstack->nused < H5CS_NSLOTS)
+ fstack->slot[fstack->nused] = func_name;
fstack->nused++;
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_push() */
-
/*-------------------------------------------------------------------------
* Function: H5CS_pop
*
@@ -231,21 +217,19 @@ H5CS_push(const char *func_name)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5CS_pop(void)
{
- H5CS_t *fstack = H5CS_get_my_stack ();
+ H5CS_t *fstack = H5CS_get_my_stack();
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
HDassert(fstack);
- HDassert(fstack->nused>0);
+ HDassert(fstack->nused > 0);
/* Pop the function. */
fstack->nused--;
@@ -253,7 +237,6 @@ H5CS_pop(void)
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_pop() */
-
/*-------------------------------------------------------------------------
* Function: H5CS_copy_stack
*
@@ -264,15 +247,13 @@ H5CS_pop(void)
* Programmer: Quincey Koziol
* Tuesday, August 9, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5CS_copy_stack(H5CS_t *new_stack)
{
- H5CS_t *old_stack = H5CS_get_my_stack ();
- unsigned u; /* Local index variable */
+ H5CS_t * old_stack = H5CS_get_my_stack();
+ unsigned u; /* Local index variable */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
@@ -281,14 +262,13 @@ H5CS_copy_stack(H5CS_t *new_stack)
HDassert(old_stack);
/* Copy old stack to new one, duplicating the strings */
- for(u = 0; u < old_stack->nused; u++)
+ for (u = 0; u < old_stack->nused; u++)
new_stack->slot[u] = H5MM_strdup(old_stack->slot[u]);
new_stack->nused = old_stack->nused;
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_copy_stack() */
-
/*-------------------------------------------------------------------------
* Function: H5CS_close_stack
*
@@ -299,14 +279,12 @@ H5CS_copy_stack(H5CS_t *new_stack)
* Programmer: Quincey Koziol
* Tuesday, August 9, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5CS_close_stack(H5CS_t *stack)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
@@ -315,11 +293,10 @@ H5CS_close_stack(H5CS_t *stack)
HDassert(stack);
/* Free strings on stack */
- for(u = 0; u < stack->nused; u++)
+ for (u = 0; u < stack->nused; u++)
stack->slot[u] = H5MM_xfree((void *)stack->slot[u]);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
} /* end H5CS_close_stack() */
#endif /* H5_HAVE_CODESTACK */
-
diff --git a/src/H5CSprivate.h b/src/H5CSprivate.h
index 0746a6d..ea02d1e 100644
--- a/src/H5CSprivate.h
+++ b/src/H5CSprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,19 +24,19 @@
/* Private headers needed by this file */
#include "H5private.h"
-#define H5CS_NSLOTS 48 /*number of slots in an function stack */
+#define H5CS_NSLOTS 48 /*number of slots in an function stack */
/* A function stack */
typedef struct H5CS_t {
- unsigned nused; /*num slots currently used in stack */
- const char *slot[H5CS_NSLOTS]; /*array of function records */
+ unsigned nused; /*num slots currently used in stack */
+ const char *slot[H5CS_NSLOTS]; /*array of function records */
} H5CS_t;
-H5_DLL herr_t H5CS_push (const char *func_name);
-H5_DLL herr_t H5CS_pop (void);
-H5_DLL herr_t H5CS_print (FILE *stream);
-H5_DLL herr_t H5CS_print_stack (const H5CS_t *stack, FILE *stream);
-H5_DLL herr_t H5CS_copy_stack (H5CS_t *stack);
-H5_DLL herr_t H5CS_close_stack (H5CS_t *stack);
+H5_DLL herr_t H5CS_push(const char *func_name);
+H5_DLL herr_t H5CS_pop(void);
+H5_DLL herr_t H5CS_print(FILE *stream);
+H5_DLL herr_t H5CS_print_stack(const H5CS_t *stack, FILE *stream);
+H5_DLL herr_t H5CS_copy_stack(H5CS_t *stack);
+H5_DLL herr_t H5CS_close_stack(H5CS_t *stack);
#endif /* _H5CSprivate_H */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 3041ce1..98d52b5 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,15 +17,18 @@
* Purpose: This file contains declarations which are normally visible
* only within the H5C package.
*
- * Source files outside the H5C package should include
- * H5Cprivate.h instead.
+ * Source files outside the H5C package should include
+ * H5Cprivate.h instead.
*
- * The one exception to this rule is test/cache.c. The test
- * code is easier to write if it can look at the cache's
- * internal data structures. Indeed, this is the main
- * reason why this file was created.
+ * The one exception to this rule is test/cache.c. The test
+ * code is easier to write if it can look at the cache's
+ * internal data structures. Indeed, this is the main
+ * reason why this file was created.
*/
+/* clang-format off */
+/* Maintain current format by disabling format for this file */
+
#ifndef H5C_PACKAGE
#error "Do not include this file outside the H5C package!"
#endif
@@ -49,10 +52,10 @@
* The current value was obtained via personal communication with
* Quincey. I have applied a fudge factor of 2.
*
- * -- JRM
+ * -- JRM
*/
-#define H5C__MAX_PASSES_ON_FLUSH 4
+#define H5C__MAX_PASSES_ON_FLUSH 4
@@ -87,19 +90,19 @@
* Note that index_size and index_len now refer to the total size of
* and number of entries in the hash table.
*
- * JRM - 7/19/04
+ * JRM - 7/19/04
*
* The TBBT has since been replaced with a skip list. This change
* greatly predates this note.
*
- * JRM - 9/26/05
+ * JRM - 9/26/05
*
- * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
- * This field is used to validate pointers to instances of
- * H5C_t.
+ * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
+ * This field is used to validate pointers to instances of
+ * H5C_t.
*
* flush_in_progress: Boolean flag indicating whether a flush is in
- * progress.
+ * progress.
*
* trace_file_ptr: File pointer pointing to the trace file, which is used
* to record cache operations for use in simulations and design
@@ -113,15 +116,15 @@
* When we get to using H5C in other places, we may add
* code to write trace file data at the H5C level as well.
*
- * aux_ptr: Pointer to void used to allow wrapper code to associate
- * its data with an instance of H5C_t. The H5C cache code
- * sets this field to NULL, and otherwise leaves it alone.
+ * aux_ptr: Pointer to void used to allow wrapper code to associate
+ * its data with an instance of H5C_t. The H5C cache code
+ * sets this field to NULL, and otherwise leaves it alone.
*
- * max_type_id: Integer field containing the maximum type id number assigned
- * to a type of entry in the cache. All type ids from 0 to
- * max_type_id inclusive must be defined. The names of the
- * types are stored in the type_name_table discussed below, and
- * indexed by the ids.
+ * max_type_id: Integer field containing the maximum type id number assigned
+ * to a type of entry in the cache. All type ids from 0 to
+ * max_type_id inclusive must be defined. The names of the
+ * types are stored in the type_name_table discussed below, and
+ * indexed by the ids.
*
* type_name_table_ptr: Pointer to an array of pointer to char of length
* max_type_id + 1. The strings pointed to by the entries
@@ -139,15 +142,15 @@
* to reduce its size as entries are unprotected.
*
* b) When running in parallel mode, the cache may not be
- * permitted to flush a dirty entry in response to a read.
- * If there are no clean entries available to evict, the
- * cache will exceed its maximum size. Again the cache
+ * permitted to flush a dirty entry in response to a read.
+ * If there are no clean entries available to evict, the
+ * cache will exceed its maximum size. Again the cache
* will attempt to reduce its size to the max_cache_size
* limit on the next cache write.
*
- * c) When an entry increases in size, the cache may exceed
- * the max_cache_size limit until the next time the cache
- * attempts to load or insert an entry.
+ * c) When an entry increases in size, the cache may exceed
+ * the max_cache_size limit until the next time the cache
+ * attempts to load or insert an entry.
*
* min_clean_size: Nominal minimum number of clean bytes in the cache.
* The cache attempts to maintain this number of bytes of
@@ -160,19 +163,19 @@
* the cache as a whole:
*
* check_write_permitted: In certain applications, the cache may not
- * be allowed to write to disk at certain time. If specified,
- * the check_write_permitted function is used to determine if
- * a write is permissible at any given point in time.
+ * be allowed to write to disk at certain time. If specified,
+ * the check_write_permitted function is used to determine if
+ * a write is permissible at any given point in time.
*
- * If no such function is specified (i.e. this field is NULL),
- * the cache uses the following write_permitted field to
- * determine whether writes are permitted.
+ * If no such function is specified (i.e. this field is NULL),
+ * the cache uses the following write_permitted field to
+ * determine whether writes are permitted.
*
* write_permitted: If check_write_permitted is NULL, this boolean flag
- * indicates whether writes are permitted.
+ * indicates whether writes are permitted.
*
- * log_flush: If provided, this function is called whenever a dirty
- * entry is flushed to disk.
+ * log_flush: If provided, this function is called whenever a dirty
+ * entry is flushed to disk.
*
*
* In cases where memory is plentiful, and performance is an issue, it
@@ -180,18 +183,18 @@
* writes. The following field is used to implement this.
*
* evictions_enabled: Boolean flag that is initialized to TRUE. When
- * this flag is set to FALSE, the metadata cache will not
- * attempt to evict entries to make space for newly protected
- * entries, and instead the will grow without limit.
- *
- * Needless to say, this feature must be used with care.
+ * this flag is set to FALSE, the metadata cache will not
+ * attempt to evict entries to make space for newly protected
+ * entries, and instead the will grow without limit.
+ *
+ * Needless to say, this feature must be used with care.
*
*
* The cache requires an index to facilitate searching for entries. The
* following fields support that index.
*
* index_len: Number of entries currently in the hash table used to index
- * the cache.
+ * the cache.
*
* index_size: Number of bytes of cache entries currently stored in the
* hash table used to index the cache.
@@ -203,51 +206,51 @@
* of the cache's memory footprint.
*
* clean_index_size: Number of bytes of clean entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invarient that clean_index_size +
- * dirty_index_size == index_size.
- *
- * WARNING:
- *
- * 1) The clean_index_size field is not maintained by the
- * index macros, as the hash table doesn't care whether
- * the entry is clean or dirty. Instead the field is
- * maintained in the H5C__UPDATE_RP macros.
- *
- * 2) The value of the clean_index_size must not be mistaken
- * for the current clean size of the cache. Rather, the
- * clean size of the cache is the current value of
- * clean_index_size plus the amount of empty space (if any)
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invarient that clean_index_size +
+ * dirty_index_size == index_size.
+ *
+ * WARNING:
+ *
+ * 1) The clean_index_size field is not maintained by the
+ * index macros, as the hash table doesn't care whether
+ * the entry is clean or dirty. Instead the field is
+ * maintained in the H5C__UPDATE_RP macros.
+ *
+ * 2) The value of the clean_index_size must not be mistaken
+ * for the current clean size of the cache. Rather, the
+ * clean size of the cache is the current value of
+ * clean_index_size plus the amount of empty space (if any)
* in the cache.
*
* dirty_index_size: Number of bytes of dirty entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invarient that clean_index_size +
- * dirty_index_size == index_size.
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invarient that clean_index_size +
+ * dirty_index_size == index_size.
*
- * WARNING:
+ * WARNING:
*
- * 1) The dirty_index_size field is not maintained by the
- * index macros, as the hash table doesn't care whether
- * the entry is clean or dirty. Instead the field is
- * maintained in the H5C__UPDATE_RP macros.
+ * 1) The dirty_index_size field is not maintained by the
+ * index macros, as the hash table doesn't care whether
+ * the entry is clean or dirty. Instead the field is
+ * maintained in the H5C__UPDATE_RP macros.
*
- * index: Array of pointer to H5C_cache_entry_t of size
- * H5C__HASH_TABLE_LEN. At present, this value is a power
- * of two, not the usual prime number.
+ * index: Array of pointer to H5C_cache_entry_t of size
+ * H5C__HASH_TABLE_LEN. At present, this value is a power
+ * of two, not the usual prime number.
*
- * I hope that the variable size of cache elements, the large
- * hash table size, and the way in which HDF5 allocates space
- * will combine to avoid problems with periodicity. If so, we
- * can use a trivial hash function (a bit-and and a 3 bit left
- * shift) with some small savings.
+ * I hope that the variable size of cache elements, the large
+ * hash table size, and the way in which HDF5 allocates space
+ * will combine to avoid problems with periodicity. If so, we
+ * can use a trivial hash function (a bit-and and a 3 bit left
+ * shift) with some small savings.
*
- * If not, it will become evident in the statistics. Changing
- * to the usual prime number length hash table will require
- * changing the H5C__HASH_FCN macro and the deletion of the
- * H5C__HASH_MASK #define. No other changes should be required.
+ * If not, it will become evident in the statistics. Changing
+ * to the usual prime number length hash table will require
+ * changing the H5C__HASH_FCN macro and the deletion of the
+ * H5C__HASH_MASK #define. No other changes should be required.
*
*
* When we flush the cache, we need to write entries out in increasing
@@ -287,11 +290,11 @@
* H5C_DO_SANITY_CHECKS is TRUE.
*
* slist_len_increase: Number of entries that have been added to the
- * slist since the last time this field was set to zero.
+ * slist since the last time this field was set to zero.
*
* slist_size_increase: Total size of all entries that have been added
- * to the slist since the last time this field was set to
- * zero.
+ * to the slist since the last time this field was set to
+ * zero.
*
*
* When a cache entry is protected, it must be removed from the LRU
@@ -324,7 +327,7 @@
*
* Pinning an entry has the following implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
+ * 1) A pinned entry cannot be evicted. Thus unprotected
* pinned entries reside in the pinned entry list, instead
* of the LRU list(s) (or other lists maintained by the current
* replacement policy code).
@@ -346,21 +349,21 @@
*
* Maintaining the pinned entry list requires the following fields:
*
- * pel_len: Number of entries currently residing on the pinned
- * entry list.
+ * pel_len: Number of entries currently residing on the pinned
+ * entry list.
*
- * pel_size: Number of bytes of cache entries currently residing on
- * the pinned entry list.
+ * pel_size: Number of bytes of cache entries currently residing on
+ * the pinned entry list.
*
* pel_head_ptr: Pointer to the head of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
* pel_tail_ptr: Pointer to the tail of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
@@ -491,10 +494,10 @@
* the structure described below:
*
* size_increase_possible: Depending on the configuration data given
- * in the resize_ctl field, it may or may not be possible
- * to increase the size of the cache. Rather than test for
- * all the ways this can happen, we simply set this flag when
- * we receive a new configuration.
+ * in the resize_ctl field, it may or may not be possible
+ * to increase the size of the cache. Rather than test for
+ * all the ways this can happen, we simply set this flag when
+ * we receive a new configuration.
*
* flash_size_increase_possible: Depending on the configuration data given
* in the resize_ctl field, it may or may not be possible
@@ -514,80 +517,80 @@
* all the ways this can happen, we simply set this flag when
* we receive a new configuration.
*
- * cache_full: Boolean flag used to keep track of whether the cache is
- * full, so we can refrain from increasing the size of a
- * cache which hasn't used up the space alotted to it.
+ * cache_full: Boolean flag used to keep track of whether the cache is
+ * full, so we can refrain from increasing the size of a
+ * cache which hasn't used up the space alotted to it.
*
- * The field is initialized to FALSE, and then set to TRUE
- * whenever we attempt to make space in the cache.
+ * The field is initialized to FALSE, and then set to TRUE
+ * whenever we attempt to make space in the cache.
*
* resize_enabled: This is another convenience flag which is set whenever
- * a new set of values for resize_ctl are provided. Very
- * simply,
+ * a new set of values for resize_ctl are provided. Very
+ * simply,
*
- * resize_enabled = size_increase_possible ||
+ * resize_enabled = size_increase_possible ||
* size_decrease_possible;
*
* size_decreased: Boolean flag set to TRUE whenever the maximun cache
- * size is decreased. The flag triggers a call to
- * H5C_make_space_in_cache() on the next call to H5C_protect().
+ * size is decreased. The flag triggers a call to
+ * H5C_make_space_in_cache() on the next call to H5C_protect().
*
- * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
- * data for automatic cache resizing.
+ * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
+ * data for automatic cache resizing.
*
* epoch_markers_active: Integer field containing the number of epoch
- * markers currently in use in the LRU list. This value
- * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
+ * markers currently in use in the LRU list. This value
+ * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
*
* epoch_marker_active: Array of boolean of length H5C__MAX_EPOCH_MARKERS.
- * This array is used to track which epoch markers are currently
- * in use.
+ * This array is used to track which epoch markers are currently
+ * in use.
*
* epoch_marker_ringbuf: Array of int of length H5C__MAX_EPOCH_MARKERS + 1.
*
- * To manage the epoch marker cache entries, it is necessary
- * to track their order in the LRU list. This is done with
- * epoch_marker_ringbuf. When markers are inserted at the
- * head of the LRU list, the index of the marker in the
- * epoch_markers array is inserted at the tail of the ring
- * buffer. When it becomes the epoch_marker_active'th marker
- * in the LRU list, it will have worked its way to the head
- * of the ring buffer as well. This allows us to remove it
- * without scanning the LRU list if such is required.
+ * To manage the epoch marker cache entries, it is necessary
+ * to track their order in the LRU list. This is done with
+ * epoch_marker_ringbuf. When markers are inserted at the
+ * head of the LRU list, the index of the marker in the
+ * epoch_markers array is inserted at the tail of the ring
+ * buffer. When it becomes the epoch_marker_active'th marker
+ * in the LRU list, it will have worked its way to the head
+ * of the ring buffer as well. This allows us to remove it
+ * without scanning the LRU list if such is required.
*
* epoch_marker_ringbuf_first: Integer field containing the index of the
- * first entry in the ring buffer.
+ * first entry in the ring buffer.
*
* epoch_marker_ringbuf_last: Integer field containing the index of the
- * last entry in the ring buffer.
+ * last entry in the ring buffer.
*
* epoch_marker_ringbuf_size: Integer field containing the number of entries
- * in the ring buffer.
+ * in the ring buffer.
*
* epoch_markers: Array of instances of H5C_cache_entry_t of length
- * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
- * in the LRU list to identify cache entries that haven't
- * been accessed for some (small) specified number of
- * epochs. These entries (if any) can then be evicted and
- * the cache size reduced -- ideally without evicting any
- * of the current working set. Needless to say, the epoch
- * length and the number of epochs before an unused entry
- * must be chosen so that all, or almost all, the working
- * set will be accessed before the limit.
- *
- * Epoch markers only appear in the LRU list, never in
- * the index or slist. While they are of type
- * H5C__EPOCH_MARKER_TYPE, and have associated class
- * functions, these functions should never be called.
- *
- * The addr fields of these instances of H5C_cache_entry_t
- * are set to the index of the instance in the epoch_markers
- * array, the size is set to 0, and the type field points
- * to the constant structure epoch_marker_class defined
- * in H5C.c. The next and prev fields are used as usual
- * to link the entry into the LRU list.
- *
- * All other fields are unused.
+ * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
+ * in the LRU list to identify cache entries that haven't
+ * been accessed for some (small) specified number of
+ * epochs. These entries (if any) can then be evicted and
+ * the cache size reduced -- ideally without evicting any
+ * of the current working set. Needless to say, the epoch
+ * length and the number of epochs before an unused entry
+ * must be chosen so that all, or almost all, the working
+ * set will be accessed before the limit.
+ *
+ * Epoch markers only appear in the LRU list, never in
+ * the index or slist. While they are of type
+ * H5C__EPOCH_MARKER_TYPE, and have associated class
+ * functions, these functions should never be called.
+ *
+ * The addr fields of these instances of H5C_cache_entry_t
+ * are set to the index of the instance in the epoch_markers
+ * array, the size is set to 0, and the type field points
+ * to the constant structure epoch_marker_class defined
+ * in H5C.c. The next and prev fields are used as usual
+ * to link the entry into the LRU list.
+ *
+ * All other fields are unused.
*
*
* Cache hit rate collection fields:
@@ -597,14 +600,14 @@
* collection is enabled. The following fields support this capability.
*
* cache_hits: Number of cache hits since the last time the cache hit
- * rate statistics were reset. Note that when automatic cache
- * re-sizing is enabled, this field will be reset every automatic
- * resize epoch.
+ * rate statistics were reset. Note that when automatic cache
+ * re-sizing is enabled, this field will be reset every automatic
+ * resize epoch.
*
* cache_accesses: Number of times the cache has been accessed while
- * since the last since the last time the cache hit rate statistics
- * were reset. Note that when automatic cache re-sizing is enabled,
- * this field will be reset every automatic resize epoch.
+ * since the last since the last time the cache hit rate statistics
+ * were reset. Note that when automatic cache re-sizing is enabled,
+ * this field will be reset every automatic resize epoch.
*
*
* Statistics collection fields:
@@ -614,138 +617,138 @@
* is true.
*
* hits: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been in cache when requested in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been in cache when requested in
+ * the current epoch.
*
* misses: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has not been in cache when
- * requested in the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has not been in cache when
+ * requested in the current epoch.
*
* write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been write protected
- * in the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been write protected
+ * in the current epoch.
*
- * Observe that (hits + misses) = (write_protects + read_protects).
+ * Observe that (hits + misses) = (write_protects + read_protects).
*
* read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been read protected in
- * the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been read protected in
+ * the current epoch.
*
* Observe that (hits + misses) = (write_protects + read_protects).
*
* max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to maximum number of simultaneous read
- * protects on any entry with type id equal to the array index
- * in the current epoch.
+ * The cells are used to maximum number of simultaneous read
+ * protects on any entry with type id equal to the array index
+ * in the current epoch.
*
* insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been inserted into the
- * cache in the current epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been inserted into the
+ * cache in the current epoch.
*
- * pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been inserted
- * pinned into the cache in the current epoch.
+ * pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been inserted
+ * pinned into the cache in the current epoch.
*
* clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been cleared in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been cleared in the current
+ * epoch.
*
* flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been written to disk in the
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been written to disk in the
* current epoch.
*
* evictions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been evicted from the cache in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been evicted from the cache in
+ * the current epoch.
*
* moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been moved in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been moved in the current
+ * epoch.
*
- * entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during its flush callback in the current epoch.
+ * entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during its flush callback in the current epoch.
*
- * cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during a cache flush in the current epoch.
+ * cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during a cache flush in the current epoch.
*
* pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been pinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been pinned in the current
+ * epoch.
*
* unpins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been unpinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been unpinned in the current
+ * epoch.
*
- * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been marked dirty while pinned
- * in the current epoch.
+ * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been marked dirty while pinned
+ * in the current epoch.
*
* pinned_flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been flushed while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been flushed while
+ * pinned in the current epoch.
*
* pinned_cleared: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been cleared while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been cleared while
+ * pinned in the current epoch.
*
* size_increases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has increased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has increased in
+ * size in the current epoch.
*
* size_decreases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has decreased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has decreased in
+ * size in the current epoch.
*
* entry_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size while in its flush callback.
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size while in its flush callback.
*
* cache_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size during a cache flush
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size during a cache flush
*
* total_ht_insertions: Number of times entries have been inserted into the
- * hash table in the current epoch.
+ * hash table in the current epoch.
*
* total_ht_deletions: Number of times entries have been deleted from the
* hash table in the current epoch.
*
* successful_ht_searches: int64 containing the total number of successful
- * searches of the hash table in the current epoch.
+ * searches of the hash table in the current epoch.
*
* total_successful_ht_search_depth: int64 containing the total number of
- * entries other than the targets examined in successful
- * searches of the hash table in the current epoch.
+ * entries other than the targets examined in successful
+ * searches of the hash table in the current epoch.
*
* failed_ht_searches: int64 containing the total number of unsuccessful
* searches of the hash table in the current epoch.
*
* total_failed_ht_search_depth: int64 containing the total number of
* entries examined in unsuccessful searches of the hash
- * table in the current epoch.
+ * table in the current epoch.
*
* max_index_len: Largest value attained by the index_len field in the
* current epoch.
@@ -754,10 +757,10 @@
* current epoch.
*
* max_clean_index_size: Largest value attained by the clean_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_dirty_index_size: Largest value attained by the dirty_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_slist_len: Largest value attained by the slist_len field in the
* current epoch.
@@ -798,31 +801,31 @@
* and H5C_COLLECT_CACHE_ENTRY_STATS are true.
*
* max_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* min_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the minimum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the minimum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* max_clears: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been cleared
- * in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been cleared
+ * in the current epoch.
*
* max_flushes: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * flushed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * flushed in the current epoch.
*
- * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum size of any single entry
- * with type id equal to the array index that has resided in
- * the cache in the current epoch.
+ * with type id equal to the array index that has resided in
+ * the cache in the current epoch.
*
- * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum number of times that any single
* entry with type id equal to the array index that has been
* marked as pinned in the cache in the current epoch.
@@ -830,100 +833,100 @@
*
* Fields supporting testing:
*
- * prefix Array of char used to prefix debugging output. The
- * field is intended to allow marking of output of with
- * the processes mpi rank.
+ * prefix Array of char used to prefix debugging output. The
+ * field is intended to allow marking of output of with
+ * the processes mpi rank.
*
****************************************************************************/
#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */
-#define H5C__H5C_T_MAGIC 0x005CAC0E
-#define H5C__MAX_NUM_TYPE_IDS 19
-#define H5C__PREFIX_LEN 32
+#define H5C__H5C_T_MAGIC 0x005CAC0E
+#define H5C__MAX_NUM_TYPE_IDS 19
+#define H5C__PREFIX_LEN 32
struct H5C_t
{
- uint32_t magic;
+ uint32_t magic;
- hbool_t flush_in_progress;
+ hbool_t flush_in_progress;
- FILE * trace_file_ptr;
+ FILE * trace_file_ptr;
- void * aux_ptr;
+ void * aux_ptr;
- int32_t max_type_id;
+ int32_t max_type_id;
const char * (* type_name_table_ptr);
size_t max_cache_size;
size_t min_clean_size;
- H5C_write_permitted_func_t check_write_permitted;
- hbool_t write_permitted;
+ H5C_write_permitted_func_t check_write_permitted;
+ hbool_t write_permitted;
- H5C_log_flush_func_t log_flush;
+ H5C_log_flush_func_t log_flush;
- hbool_t evictions_enabled;
+ hbool_t evictions_enabled;
int32_t index_len;
size_t index_size;
- size_t clean_index_size;
- size_t dirty_index_size;
- H5C_cache_entry_t * (index[H5C__HASH_TABLE_LEN]);
+ size_t clean_index_size;
+ size_t dirty_index_size;
+ H5C_cache_entry_t * (index[H5C__HASH_TABLE_LEN]);
int32_t slist_len;
size_t slist_size;
H5SL_t * slist_ptr;
#if H5C_DO_SANITY_CHECKS
- int64_t slist_len_increase;
- int64_t slist_size_increase;
+ int64_t slist_len_increase;
+ int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
int32_t pl_len;
size_t pl_size;
- H5C_cache_entry_t * pl_head_ptr;
- H5C_cache_entry_t * pl_tail_ptr;
+ H5C_cache_entry_t * pl_head_ptr;
+ H5C_cache_entry_t * pl_tail_ptr;
int32_t pel_len;
size_t pel_size;
- H5C_cache_entry_t * pel_head_ptr;
- H5C_cache_entry_t * pel_tail_ptr;
+ H5C_cache_entry_t * pel_head_ptr;
+ H5C_cache_entry_t * pel_tail_ptr;
int32_t LRU_list_len;
size_t LRU_list_size;
- H5C_cache_entry_t * LRU_head_ptr;
- H5C_cache_entry_t * LRU_tail_ptr;
+ H5C_cache_entry_t * LRU_head_ptr;
+ H5C_cache_entry_t * LRU_tail_ptr;
int32_t cLRU_list_len;
size_t cLRU_list_size;
- H5C_cache_entry_t * cLRU_head_ptr;
- H5C_cache_entry_t * cLRU_tail_ptr;
+ H5C_cache_entry_t * cLRU_head_ptr;
+ H5C_cache_entry_t * cLRU_tail_ptr;
int32_t dLRU_list_len;
size_t dLRU_list_size;
- H5C_cache_entry_t * dLRU_head_ptr;
- H5C_cache_entry_t * dLRU_tail_ptr;
-
- hbool_t size_increase_possible;
- hbool_t flash_size_increase_possible;
- size_t flash_size_increase_threshold;
- hbool_t size_decrease_possible;
- hbool_t resize_enabled;
- hbool_t cache_full;
- hbool_t size_decreased;
- H5C_auto_size_ctl_t resize_ctl;
-
- int32_t epoch_markers_active;
- hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
- int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
- int32_t epoch_marker_ringbuf_first;
- int32_t epoch_marker_ringbuf_last;
- int32_t epoch_marker_ringbuf_size;
- H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
-
- int64_t cache_hits;
- int64_t cache_accesses;
+ H5C_cache_entry_t * dLRU_head_ptr;
+ H5C_cache_entry_t * dLRU_tail_ptr;
+
+ hbool_t size_increase_possible;
+ hbool_t flash_size_increase_possible;
+ size_t flash_size_increase_threshold;
+ hbool_t size_decrease_possible;
+ hbool_t resize_enabled;
+ hbool_t cache_full;
+ hbool_t size_decreased;
+ H5C_auto_size_ctl_t resize_ctl;
+
+ int32_t epoch_markers_active;
+ hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
+ int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
+ int32_t epoch_marker_ringbuf_first;
+ int32_t epoch_marker_ringbuf_last;
+ int32_t epoch_marker_ringbuf_size;
+ H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
+
+ int64_t cache_hits;
+ int64_t cache_accesses;
#if H5C_COLLECT_CACHE_STATS
@@ -951,12 +954,12 @@ struct H5C_t
int64_t entry_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
int64_t cache_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
- int64_t total_ht_insertions;
- int64_t total_ht_deletions;
- int64_t successful_ht_searches;
- int64_t total_successful_ht_search_depth;
- int64_t failed_ht_searches;
- int64_t total_failed_ht_search_depth;
+ int64_t total_ht_insertions;
+ int64_t total_ht_deletions;
+ int64_t successful_ht_searches;
+ int64_t total_successful_ht_search_depth;
+ int64_t failed_ht_searches;
+ int64_t total_failed_ht_search_depth;
int32_t max_index_len;
size_t max_index_size;
@@ -992,10 +995,10 @@ struct H5C_t
#endif /* H5C_COLLECT_CACHE_STATS */
- char prefix[H5C__PREFIX_LEN];
+ char prefix[H5C__PREFIX_LEN];
};
-
+
/****************************************************************************/
/***************************** Macro Definitions ****************************/
/****************************************************************************/
@@ -1018,7 +1021,7 @@ struct H5C_t
* to the HGOTO_ERROR macro, which may not be appropriate in all cases.
* If so, we will need versions of the insertion and deletion macros which
* do not reference the sanity checking macros.
- * JRM - 5/5/04
+ * JRM - 5/5/04
*
* Changes:
*
@@ -1093,7 +1096,7 @@ struct H5C_t
* sanity checking macros. These macro are used to update the size of
* a DLL when one of its entries changes size.
*
- * JRM - 9/8/05
+ * JRM - 9/8/05
*
****************************************************************************/
@@ -1259,8 +1262,8 @@ if ( ( (new_size) > (dll_size) ) || \
#define H5C__DLL_UPDATE_FOR_SIZE_CHANGE(dll_len, dll_size, old_size, new_size) \
H5C__DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \
- (dll_size) -= (old_size); \
- (dll_size) += (new_size); \
+ (dll_size) -= (old_size); \
+ (dll_size) += (new_size); \
H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size)
#if H5C_DO_SANITY_CHECKS
@@ -1405,7 +1408,7 @@ if ( ( (entry_ptr) == NULL ) || \
(Size) -= entry_ptr->size; \
}
-
+
/***********************************************************************
*
* Stats collection macros
@@ -1419,15 +1422,15 @@ if ( ( (entry_ptr) == NULL ) || \
*
* Changes:
*
- * JRM -- 3/21/06
- * Added / updated macros for pinned entry related stats.
+ * JRM -- 3/21/06
+ * Added / updated macros for pinned entry related stats.
*
- * JRM -- 8/9/06
- * More pinned entry stats related updates.
+ * JRM -- 8/9/06
+ * More pinned entry stats related updates.
*
- * JRM -- 3/31/07
- * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on
- * read and write protects.
+ * JRM -- 3/31/07
+ * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on
+ * read and write protects.
*
* MAM -- 1/15/09
* Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain
@@ -1457,62 +1460,62 @@ if ( ( (entry_ptr) == NULL ) || \
(cache_ptr)->dirty_index_size;
#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \
- (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
+ (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \
if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \
- (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
+ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) \
- if ( cache_ptr->flush_in_progress ) { \
+ if ( cache_ptr->flush_in_progress ) { \
((cache_ptr)->cache_flush_moves[(entry_ptr)->type->id])++; \
- } \
+ } \
if ( entry_ptr->flush_in_progress ) { \
((cache_ptr)->entry_flush_moves[(entry_ptr)->type->id])++; \
- } \
- (((cache_ptr)->moves)[(entry_ptr)->type->id])++;
+ } \
+ (((cache_ptr)->moves)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\
- if ( cache_ptr->flush_in_progress ) { \
+ if ( cache_ptr->flush_in_progress ) { \
((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
+ } \
if ( entry_ptr->flush_in_progress ) { \
((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
- if ( (entry_ptr)->size < (new_size) ) { \
- ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
+ } \
+ if ( (entry_ptr)->size < (new_size) ) { \
+ ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
(cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
- } else if ( (entry_ptr)->size > (new_size) ) { \
- ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
- }
+ } else if ( (entry_ptr)->size > (new_size) ) { \
+ ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
+ }
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
- (cache_ptr)->total_ht_insertions++;
+ (cache_ptr)->total_ht_insertions++;
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
- (cache_ptr)->total_ht_deletions++;
+ (cache_ptr)->total_ht_deletions++;
#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \
- if ( success ) { \
- (cache_ptr)->successful_ht_searches++; \
- (cache_ptr)->total_successful_ht_search_depth += depth; \
- } else { \
- (cache_ptr)->failed_ht_searches++; \
- (cache_ptr)->total_failed_ht_search_depth += depth; \
- }
+ if ( success ) { \
+ (cache_ptr)->successful_ht_searches++; \
+ (cache_ptr)->total_successful_ht_search_depth += depth; \
+ } else { \
+ (cache_ptr)->failed_ht_searches++; \
+ (cache_ptr)->total_failed_ht_search_depth += depth; \
+ }
#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \
- ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
+ ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
#if H5C_COLLECT_CACHE_ENTRY_STATS
@@ -1520,24 +1523,24 @@ if ( ( (entry_ptr) == NULL ) || \
(entry_ptr)->accesses = 0; \
(entry_ptr)->clears = 0; \
(entry_ptr)->flushes = 0; \
- (entry_ptr)->pins = 0;
+ (entry_ptr)->pins = 0;
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
- (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
- } \
+ (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
+ } \
((entry_ptr)->clears)++;
#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
- (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
- } \
+ (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
+ } \
((entry_ptr)->flushes)++;
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \
- (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->accesses > \
((cache_ptr)->max_accesses)[(entry_ptr)->type->id] ) { \
((cache_ptr)->max_accesses)[(entry_ptr)->type->id] \
@@ -1570,23 +1573,23 @@ if ( ( (entry_ptr) == NULL ) || \
}
#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
- (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
- if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
- ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
+ (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
+ if ( (entry_ptr)->is_pinned ) { \
+ (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
+ ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
(entry_ptr)->pins++; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \
- } \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \
+ } \
if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \
- (cache_ptr)->max_index_len = (cache_ptr)->index_len; \
+ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \
- (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
+ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
if ( (entry_ptr)->size > \
((cache_ptr)->max_size)[(entry_ptr)->type->id] ) { \
((cache_ptr)->max_size)[(entry_ptr)->type->id] \
@@ -1594,20 +1597,20 @@ if ( ( (entry_ptr) == NULL ) || \
}
#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
- if ( hit ) \
+ if ( hit ) \
((cache_ptr)->hits)[(entry_ptr)->type->id]++; \
- else \
+ else \
((cache_ptr)->misses)[(entry_ptr)->type->id]++; \
if ( ! ((entry_ptr)->is_read_only) ) { \
- ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \
- } else { \
- ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \
- if ( ((entry_ptr)->ro_ref_count) > \
- ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \
- ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \
- ((entry_ptr)->ro_ref_count); \
- } \
- } \
+ ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \
+ } else { \
+ ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \
+ if ( ((entry_ptr)->ro_ref_count) > \
+ ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \
+ ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \
+ ((entry_ptr)->ro_ref_count); \
+ } \
+ } \
if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \
(cache_ptr)->max_index_len = (cache_ptr)->index_len; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
@@ -1623,12 +1626,12 @@ if ( ( (entry_ptr) == NULL ) || \
((entry_ptr)->accesses)++;
#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
- ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
+ ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
(entry_ptr)->pins++; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#else /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -1636,52 +1639,52 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
- } \
- (((cache_ptr)->clears)[(entry_ptr)->type->id])++;
+ (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
+ } \
+ (((cache_ptr)->clears)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
- (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
- }
+ (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
+ }
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \
- (((cache_ptr)->evictions)[(entry_ptr)->type->id])++;
+ (((cache_ptr)->evictions)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
- (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
- if ( (entry_ptr)->is_pinned ) { \
- (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
- ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \
- } \
+ (((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
+ if ( (entry_ptr)->is_pinned ) { \
+ (((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
+ ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; \
+ } \
if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \
- (cache_ptr)->max_index_len = (cache_ptr)->index_len; \
+ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \
- (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
+ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size;
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size;
#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
- if ( hit ) \
+ if ( hit ) \
((cache_ptr)->hits)[(entry_ptr)->type->id]++; \
- else \
+ else \
((cache_ptr)->misses)[(entry_ptr)->type->id]++; \
if ( ! ((entry_ptr)->is_read_only) ) { \
- ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \
- } else { \
- ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \
- if ( ((entry_ptr)->ro_ref_count) > \
- ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \
- ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \
- ((entry_ptr)->ro_ref_count); \
- } \
- } \
+ ((cache_ptr)->write_protects)[(entry_ptr)->type->id]++; \
+ } else { \
+ ((cache_ptr)->read_protects)[(entry_ptr)->type->id]++; \
+ if ( ((entry_ptr)->ro_ref_count) > \
+ ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] ) { \
+ ((cache_ptr)->max_read_protects)[(entry_ptr)->type->id] = \
+ ((entry_ptr)->ro_ref_count); \
+ } \
+ } \
if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \
(cache_ptr)->max_index_len = (cache_ptr)->index_len; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
@@ -1691,11 +1694,11 @@ if ( ( (entry_ptr) == NULL ) || \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size;
#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
- ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
+ ((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -1719,7 +1722,7 @@ if ( ( (entry_ptr) == NULL ) || \
#endif /* H5C_COLLECT_CACHE_STATS */
-
+
/***********************************************************************
*
* Hash table access and manipulation macros:
@@ -1736,15 +1739,15 @@ if ( ( (entry_ptr) == NULL ) || \
* the clean_index_size and dirty_index_size fields of H5C_t. Also
* added macros to allow us to track entry cleans and dirties.
*
- * JRM -- 11/5/08
+ * JRM -- 11/5/08
*
***********************************************************************/
/* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */
-#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
+#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
-#define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3)
+#define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3)
#if H5C_DO_SANITY_CHECKS
@@ -1760,7 +1763,7 @@ if ( ( (cache_ptr) == NULL ) || \
( k >= H5C__HASH_TABLE_LEN ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) ) { \
+ (cache_ptr)->dirty_index_size) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
"Pre HT insert SC failed") \
}
@@ -1785,7 +1788,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (entry_ptr)->ht_prev != NULL ) ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) ) { \
+ (cache_ptr)->dirty_index_size) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \
}
@@ -1835,7 +1838,7 @@ if ( ( (cache_ptr) == NULL ) || \
}
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
@@ -1849,27 +1852,27 @@ if ( ( (cache_ptr) == NULL ) || \
(cache_ptr)->dirty_index_size) ) || \
( (entry_ptr == NULL) ) || \
( ( !( was_clean ) || \
- ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
- ( ( (was_clean) ) || \
- ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
+ ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
+ ( ( (was_clean) ) || \
+ ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
( (entry_ptr) == NULL ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"Pre HT entry size change SC failed") \
}
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr) \
+ entry_ptr) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
( (new_size) > (cache_ptr)->index_size ) || \
( (cache_ptr)->index_size != \
- ((cache_ptr)->clean_index_size + \
+ ((cache_ptr)->clean_index_size + \
(cache_ptr)->dirty_index_size) ) || \
( ( !((entry_ptr)->is_dirty ) || \
- ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
- ( ( ((entry_ptr)->is_dirty) ) || \
- ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
+ ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
+ ( ( ((entry_ptr)->is_dirty) ) || \
+ ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
( ( (cache_ptr)->index_len == 1 ) && \
( (cache_ptr)->index_size != (new_size) ) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
@@ -1930,9 +1933,9 @@ if ( (cache_ptr)->index_size != \
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean)
+ entry_ptr, was_clean)
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr)
+ entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
@@ -1959,7 +1962,7 @@ if ( (cache_ptr)->index_size != \
if ( (entry_ptr)->is_dirty ) { \
(cache_ptr)->dirty_index_size += (entry_ptr)->size; \
} else { \
- (cache_ptr)->clean_index_size += (entry_ptr)->size; \
+ (cache_ptr)->clean_index_size += (entry_ptr)->size; \
} \
H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
}
@@ -1988,7 +1991,7 @@ if ( (cache_ptr)->index_size != \
if ( (entry_ptr)->is_dirty ) { \
(cache_ptr)->dirty_index_size -= (entry_ptr)->size; \
} else { \
- (cache_ptr)->clean_index_size -= (entry_ptr)->size; \
+ (cache_ptr)->clean_index_size -= (entry_ptr)->size; \
} \
H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
}
@@ -2075,27 +2078,27 @@ if ( (cache_ptr)->index_size != \
}
#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
{ \
H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
(cache_ptr)->index_size -= (old_size); \
(cache_ptr)->index_size += (new_size); \
if ( was_clean ) { \
(cache_ptr)->clean_index_size -= (old_size); \
} else { \
- (cache_ptr)->dirty_index_size -= (old_size); \
+ (cache_ptr)->dirty_index_size -= (old_size); \
} \
if ( (entry_ptr)->is_dirty ) { \
(cache_ptr)->dirty_index_size += (new_size); \
} else { \
- (cache_ptr)->clean_index_size += (new_size); \
+ (cache_ptr)->clean_index_size += (new_size); \
} \
H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
entry_ptr) \
}
-
+
/**************************************************************************
*
* Skip list insertion and deletion macros:
@@ -2107,11 +2110,11 @@ if ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__INSERT_ENTRY_IN_SLIST
+ * Macro: H5C__INSERT_ENTRY_IN_SLIST
*
* Purpose: Insert the specified instance of H5C_cache_entry_t into
- * the skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * the skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -2119,39 +2122,39 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 7/21/04
- * Updated function to set the in_tree flag when inserting
- * an entry into the tree. Also modified the function to
- * update the tree size and len fields instead of the similar
- * index fields.
+ * JRM -- 7/21/04
+ * Updated function to set the in_tree flag when inserting
+ * an entry into the tree. Also modified the function to
+ * update the tree size and len fields instead of the similar
+ * index fields.
*
- * All of this is part of the modifications to support the
- * hash table.
+ * All of this is part of the modifications to support the
+ * hash table.
*
- * JRM -- 7/27/04
- * Converted the function H5C_insert_entry_in_tree() into
- * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
- * wringing a little more speed out of the cache.
+ * JRM -- 7/27/04
+ * Converted the function H5C_insert_entry_in_tree() into
+ * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
+ * wringing a little more speed out of the cache.
*
- * Note that we don't bother to check if the entry is already
- * in the tree -- if it is, H5SL_insert() will fail.
+ * Note that we don't bother to check if the entry is already
+ * in the tree -- if it is, H5SL_insert() will fail.
*
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
+ * QAK -- 11/27/04
+ * Switched over to using skip list routines.
*
- * JRM -- 6/27/06
- * Added fail_val parameter.
+ * JRM -- 6/27/06
+ * Added fail_val parameter.
*
- * JRM -- 8/25/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/25/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_len_increase and
- * slist_size_increase fields that are used in sanity
- * checks in the flush routines.
+ * This version maintains the slist_len_increase and
+ * slist_size_increase fields that are used in sanity
+ * checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
*-------------------------------------------------------------------------
*/
@@ -2210,14 +2213,14 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__REMOVE_ENTRY_FROM_SLIST
*
* Purpose: Remove the specified instance of H5C_cache_entry_t from the
- * index skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * index skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -2225,20 +2228,20 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 7/21/04
- * Updated function for the addition of the hash table.
+ * JRM -- 7/21/04
+ * Updated function for the addition of the hash table.
*
- * JRM - 7/27/04
- * Converted from the function H5C_remove_entry_from_tree()
- * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of
- * wringing a little more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted from the function H5C_remove_entry_from_tree()
+ * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of
+ * wringing a little more performance out of the cache.
*
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
+ * QAK -- 11/27/04
+ * Switched over to using skip list routines.
*
- * JRM -- 3/28/07
- * Updated sanity checks for the new is_read_only and
- * ro_ref_count fields in H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Updated sanity checks for the new is_read_only and
+ * ro_ref_count fields in H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2268,13 +2271,13 @@ if ( (cache_ptr)->index_size != \
(entry_ptr)->in_slist = FALSE; \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE
*
* Purpose: Update cache_ptr->slist_size for a change in the size of
- * and entry in the slist.
+ * and entry in the slist.
*
* Return: N/A
*
@@ -2282,15 +2285,15 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 8/27/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/27/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_size_increase field
- * that are used in sanity checks in the flush routines.
+ * This version maintains the slist_size_increase field
+ * that are used in sanity checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
*-------------------------------------------------------------------------
*/
@@ -2342,7 +2345,7 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/**************************************************************************
*
* Replacement policy update macros:
@@ -2354,18 +2357,18 @@ if ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
+ * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
*
* Purpose: For efficiency, we sometimes change the order of flushes --
- * but doing so can confuse the replacement policy. This
- * macro exists to allow us to specify an entry as the
- * most recently touched so we can repair any such
- * confusion.
+ * but doing so can confuse the replacement policy. This
+ * macro exists to allow us to specify an entry as the
+ * most recently touched so we can repair any such
+ * confusion.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2373,15 +2376,15 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/20/06
- * Modified macro to ignore pinned entries. Pinned entries
- * do not appear in the data structures maintained by the
- * replacement policy code, and thus this macro has nothing
- * to do if called for such an entry.
+ * JRM -- 3/20/06
+ * Modified macro to ignore pinned entries. Pinned entries
+ * do not appear in the data structures maintained by the
+ * replacement policy code, and thus this macro has nothing
+ * to do if called for such an entry.
*
- * JRM -- 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2403,16 +2406,16 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head.\
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Use the dirty flag to infer whether the entry is on the clean or \
@@ -2466,16 +2469,16 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2484,18 +2487,18 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_EVICTION
+ * Macro: H5C__UPDATE_RP_FOR_EVICTION
*
* Purpose: Update the replacement policy data structures for an
- * eviction of the specified cache entry.
+ * eviction of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2503,27 +2506,27 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_eviction() to the
- * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_eviction() to the
+ * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * the pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * the pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * Pinned entries can't be evicted, so this entry should never
- * be called on a pinned entry. Added assert to verify this.
+ * JRM - 3/20/06
+ * Pinned entries can't be evicted, so this entry should never
+ * be called on a pinned entry. Added assert to verify this.
*
- * JRM -- 3/28/07
- * Added sanity checks for the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks for the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2595,18 +2598,18 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_FLUSH
+ * Macro: H5C__UPDATE_RP_FOR_FLUSH
*
* Purpose: Update the replacement policy data structures for a flush
- * of the specified cache entry.
+ * of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2614,29 +2617,29 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_flush() to the
- * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_flush() to the
+ * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two versions, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two versions, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * While pinned entries can be flushed, they don't reside in
- * the replacement policy data structures when unprotected.
- * Thus I modified this macro to do nothing if the entry is
- * pinned.
+ * JRM - 3/20/06
+ * While pinned entries can be flushed, they don't reside in
+ * the replacement policy data structures when unprotected.
+ * Thus I modified this macro to do nothing if the entry is
+ * pinned.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2658,28 +2661,28 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* since the entry is being flushed or cleared, one would think \
- * that it must be dirty -- but that need not be the case. Use the \
- * dirty flag to infer whether the entry is on the clean or dirty \
- * LRU list, and remove it. Then insert it at the head of the \
- * clean LRU list. \
+ * that it must be dirty -- but that need not be the case. Use the \
+ * dirty flag to infer whether the entry is on the clean or dirty \
+ * LRU list, and remove it. Then insert it at the head of the \
+ * clean LRU list. \
* \
* The function presumes that a dirty entry will be either cleared \
- * or flushed shortly, so it is OK if we put a dirty entry on the \
- * clean LRU list. \
+ * or flushed shortly, so it is OK if we put a dirty entry on the \
+ * clean LRU list. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
@@ -2720,17 +2723,17 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2739,18 +2742,18 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_INSERTION
+ * Macro: H5C__UPDATE_RP_FOR_INSERTION
*
* Purpose: Update the replacement policy data structures for an
- * insertion of the specified cache entry.
+ * insertion of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2758,31 +2761,31 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_insertion() to the
- * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_insertion() to the
+ * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/10/06
- * This macro should never be called on a pinned entry.
- * Inserted an assert to verify this.
+ * JRM - 3/10/06
+ * This macro should never be called on a pinned entry.
+ * Inserted an assert to verify this.
*
- * JRM - 8/9/06
- * Not any more. We must now allow insertion of pinned
- * entries. Updated macro to support this.
+ * JRM - 8/9/06
+ * Not any more. We must now allow insertion of pinned
+ * entries. Updated macro to support this.
*
- * JRM - 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2814,7 +2817,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the head of the clean or dirty LRU list as \
@@ -2855,7 +2858,7 @@ if ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2864,7 +2867,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2873,22 +2876,22 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_PROTECT
+ * Macro: H5C__UPDATE_RP_FOR_PROTECT
*
* Purpose: Update the replacement policy data structures for a
- * protect of the specified cache entry.
+ * protect of the specified cache entry.
*
- * To do this, unlink the specified entry from any data
- * structures used by the replacement policy, and add the
- * entry to the protected list.
+ * To do this, unlink the specified entry from any data
+ * structures used by the replacement policy, and add the
+ * entry to the protected list.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2896,28 +2899,28 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_protect() to the
- * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_protect() to the
+ * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to attempt to remove pinned entriese from
- * the pinned entry list instead of from the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to attempt to remove pinned entriese from
+ * the pinned entry list instead of from the data structures
+ * maintained by the replacement policy.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2933,12 +2936,12 @@ if ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
HDassert( (cache_ptr)->pel_len >= 0 ); \
\
@@ -2950,7 +2953,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Similarly, remove the entry from the clean or dirty LRU list \
@@ -2996,12 +2999,12 @@ if ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
HDassert( (cache_ptr)->pel_len >= 0 ); \
\
@@ -3013,7 +3016,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -3031,18 +3034,18 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_MOVE
+ * Macro: H5C__UPDATE_RP_FOR_MOVE
*
* Purpose: Update the replacement policy data structures for a
- * move of the specified cache entry.
+ * move of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3064,20 +3067,20 @@ if ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* remove the entry from either the clean or dirty LUR list as \
@@ -3086,43 +3089,43 @@ if ( (cache_ptr)->index_size != \
if ( was_dirty ) { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* insert the entry at the head of either the clean or dirty \
- * LRU list as appropriate. \
+ * LRU list as appropriate. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -3142,20 +3145,20 @@ if ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -3164,25 +3167,25 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
+ * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
*
* Purpose: Update the replacement policy data structures for a
- * size change of the specified cache entry.
+ * size change of the specified cache entry.
*
- * To do this, determine if the entry is pinned. If it is,
- * update the size of the pinned entry list.
+ * To do this, determine if the entry is pinned. If it is,
+ * update the size of the pinned entry list.
*
- * If it isn't pinned, the entry must handled by the
- * replacement policy. Update the appropriate replacement
- * policy data structures.
+ * If it isn't pinned, the entry must handled by the
+ * replacement policy. Update the appropriate replacement
+ * policy data structures.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3190,9 +3193,9 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -3209,43 +3212,43 @@ if ( (cache_ptr)->index_size != \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( new_size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* Similarly, update the size of the clean or dirty LRU list as \
- * appropriate. At present, the entry must be clean, but that \
- * could change. \
+ * appropriate. At present, the entry must be clean, but that \
+ * could change. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
} \
\
/* End modified LRU specific code. */ \
@@ -3265,24 +3268,24 @@ if ( (cache_ptr)->index_size != \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( new_size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* End modified LRU specific code. */ \
} \
@@ -3291,22 +3294,22 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPIN
+ * Macro: H5C__UPDATE_RP_FOR_UNPIN
*
* Purpose: Update the replacement policy data structures for an
- * unpin of the specified cache entry.
+ * unpin of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * entry list, and re-insert it in the data structures used
- * by the current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * entry list, and re-insert it in the data structures used
+ * by the current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3314,9 +3317,9 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -3358,20 +3361,20 @@ if ( (cache_ptr)->index_size != \
if ( (entry_ptr)->is_dirty ) { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -3414,22 +3417,22 @@ if ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
+ * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
*
* Purpose: Update the replacement policy data structures for an
- * unprotect of the specified cache entry.
+ * unprotect of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * list, and re-insert it in the data structures used by the
- * current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * list, and re-insert it in the data structures used by the
+ * current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3437,24 +3440,24 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_unprotect() to
- * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
- * squeeze a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_unprotect() to
+ * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
+ * squeeze a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to put pinned entries on the pinned entry
- * list instead of inserting them in the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to put pinned entries on the pinned entry
+ * list instead of inserting them in the data structures
+ * maintained by the replacement policy.
*
*-------------------------------------------------------------------------
*/
@@ -3561,4 +3564,4 @@ if ( (cache_ptr)->index_size != \
#endif /* _H5Cpkg_H */
-
+/* clang-format on */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index efddb3c..2a76bd8 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -6,19 +6,19 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5Cprivate.h
- * 6/3/04
- * John Mainzer
+ * Created: H5Cprivate.h
+ * 6/3/04
+ * John Mainzer
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
* Modifications:
*
@@ -28,28 +28,27 @@
#ifndef _H5Cprivate_H
#define _H5Cprivate_H
-#include "H5Cpublic.h" /* public prototypes */
+#include "H5Cpublic.h" /* public prototypes */
/* Pivate headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
-
-#define H5C_DO_SANITY_CHECKS 0
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
+#define H5C_DO_SANITY_CHECKS 0
+#define H5C_DO_EXTREME_SANITY_CHECKS 0
/* This sanity checking constant was picked out of the air. Increase
* or decrease it if appropriate. Its purposes is to detect corrupt
* object sizes, so it probably doesn't matter if it is a bit big.
*
- * JRM - 5/17/04
+ * JRM - 5/17/04
*/
-#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
+#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics
* on cache activity. In general, this #define should be set to 0.
*/
-#define H5C_COLLECT_CACHE_STATS 0
+#define H5C_COLLECT_CACHE_STATS 0
/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics
* in individual cache entries.
@@ -59,21 +58,20 @@
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5C_COLLECT_CACHE_ENTRY_STATS 1
+#define H5C_COLLECT_CACHE_ENTRY_STATS 1
#else
-#define H5C_COLLECT_CACHE_ENTRY_STATS 0
+#define H5C_COLLECT_CACHE_ENTRY_STATS 0
#endif /* H5C_COLLECT_CACHE_STATS */
-
#ifdef H5_HAVE_PARALLEL
/* we must maintain the clean and dirty LRU lists when we are compiled
* with parallel support.
*/
-#define H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS 1
+#define H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS 1
#else /* H5_HAVE_PARALLEL */
@@ -81,95 +79,74 @@
* want them on for testing on occasion, but in general they should be
* off.
*/
-#define H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS 0
+#define H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS 0
#endif /* H5_HAVE_PARALLEL */
-
/* Typedef for the main structure for the cache (defined in H5Cpkg.h) */
typedef struct H5C_t H5C_t;
-
/*
- * Class methods pertaining to caching. Each type of cached object will
+ * Class methods pertaining to caching. Each type of cached object will
* have a constant variable with permanent life-span that describes how
- * to cache the object. That variable will be of type H5C_class_t and
+ * to cache the object. That variable will be of type H5C_class_t and
* have the following required fields...
*
- * LOAD: Loads an object from disk to memory. The function
- * should allocate some data structure and return it.
+ * LOAD: Loads an object from disk to memory. The function
+ * should allocate some data structure and return it.
*
- * FLUSH: Writes some data structure back to disk. It would be
- * wise for the data structure to include dirty flags to
- * indicate whether it really needs to be written. This
- * function is also responsible for freeing memory allocated
- * by the LOAD method if the DEST argument is non-zero (by
+ * FLUSH: Writes some data structure back to disk. It would be
+ * wise for the data structure to include dirty flags to
+ * indicate whether it really needs to be written. This
+ * function is also responsible for freeing memory allocated
+ * by the LOAD method if the DEST argument is non-zero (by
* calling the DEST method).
*
- * DEST: Just frees memory allocated by the LOAD method.
+ * DEST: Just frees memory allocated by the LOAD method.
*
- * CLEAR: Just marks object as non-dirty.
+ * CLEAR: Just marks object as non-dirty.
*
- * SIZE: Report the size (on disk) of the specified cache object.
- * Note that the space allocated on disk may not be contiguous.
+ * SIZE: Report the size (on disk) of the specified cache object.
+ * Note that the space allocated on disk may not be contiguous.
*/
-#define H5C_CALLBACK__NO_FLAGS_SET 0x0
-#define H5C_CALLBACK__SIZE_CHANGED_FLAG 0x1
-#define H5C_CALLBACK__MOVED_FLAG 0x2
+#define H5C_CALLBACK__NO_FLAGS_SET 0x0
+#define H5C_CALLBACK__SIZE_CHANGED_FLAG 0x1
+#define H5C_CALLBACK__MOVED_FLAG 0x2
/* Actions that can be reported to 'notify' client callback */
typedef enum H5C_notify_action_t {
- H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache */
- /* (could be loaded from file with
- * 'protect' call, or inserted
- * with 'set' call)
- */
- H5C_NOTIFY_ACTION_BEFORE_EVICT /* Entry is about to be evicted from cache */
+ H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache */
+ /* (could be loaded from file with
+ * 'protect' call, or inserted
+ * with 'set' call)
+ */
+ H5C_NOTIFY_ACTION_BEFORE_EVICT /* Entry is about to be evicted from cache */
} H5C_notify_action_t;
-typedef void *(*H5C_load_func_t)(H5F_t *f,
- hid_t dxpl_id,
- haddr_t addr,
- void *udata);
-typedef herr_t (*H5C_flush_func_t)(H5F_t *f,
- hid_t dxpl_id,
- hbool_t dest,
- haddr_t addr,
- void *thing,
- unsigned * flags_ptr);
-typedef herr_t (*H5C_dest_func_t)(H5F_t *f,
- void *thing);
-typedef herr_t (*H5C_clear_func_t)(H5F_t *f,
- void *thing,
- hbool_t dest);
-typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action,
- void *thing);
-typedef herr_t (*H5C_size_func_t)(const H5F_t *f,
- const void *thing,
- size_t *size_ptr);
+typedef void *(*H5C_load_func_t)(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+typedef herr_t (*H5C_flush_func_t)(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing,
+ unsigned *flags_ptr);
+typedef herr_t (*H5C_dest_func_t)(H5F_t *f, void *thing);
+typedef herr_t (*H5C_clear_func_t)(H5F_t *f, void *thing, hbool_t dest);
+typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, void *thing);
+typedef herr_t (*H5C_size_func_t)(const H5F_t *f, const void *thing, size_t *size_ptr);
typedef struct H5C_class_t {
- int id;
- H5C_load_func_t load;
- H5C_flush_func_t flush;
- H5C_dest_func_t dest;
- H5C_clear_func_t clear;
- H5C_size_func_t size;
+ int id;
+ H5C_load_func_t load;
+ H5C_flush_func_t flush;
+ H5C_dest_func_t dest;
+ H5C_clear_func_t clear;
+ H5C_size_func_t size;
} H5C_class_t;
-
/* Type definitions of call back functions used by the cache as a whole */
-typedef herr_t (*H5C_write_permitted_func_t)(const H5F_t *f,
- hid_t dxpl_id,
- hbool_t * write_permitted_ptr);
+typedef herr_t (*H5C_write_permitted_func_t)(const H5F_t *f, hid_t dxpl_id, hbool_t *write_permitted_ptr);
-typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
- haddr_t addr,
- hbool_t was_dirty,
- unsigned flags,
+typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags,
int type_id);
/* Upper and lower limits on cache size. These limits are picked
@@ -181,17 +158,15 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* size.
*/
-#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
-#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
-
+#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
+#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
/* Default max cache size and min clean size are give here to make
* them generally accessible.
*/
-#define H5C__DEFAULT_MAX_CACHE_SIZE ((size_t)(4 * 1024 * 1024))
-#define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024))
-
+#define H5C__DEFAULT_MAX_CACHE_SIZE ((size_t)(4 * 1024 * 1024))
+#define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024))
/****************************************************************************
*
@@ -209,9 +184,9 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
*
* The fields of this structure are discussed individually below:
*
- * JRM - 4/26/04
+ * JRM - 4/26/04
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C__H5C_CACHE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
@@ -232,157 +207,157 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
*
* This field is only compiled in debug mode.
*
- * addr: Base address of the cache entry on disk.
+ * addr: Base address of the cache entry on disk.
*
- * size: Length of the cache entry on disk. Note that unlike normal
- * caches, the entries in this cache are of variable length.
- * The entries should never overlap, and when we do writebacks,
- * we will want to writeback adjacent entries where possible.
+ * size: Length of the cache entry on disk. Note that unlike normal
+ * caches, the entries in this cache are of variable length.
+ * The entries should never overlap, and when we do writebacks,
+ * we will want to writeback adjacent entries where possible.
*
- * NB: At present, entries need not be contiguous on disk. Until
- * we fix this, we can't do much with writing back adjacent
- * entries.
+ * NB: At present, entries need not be contiguous on disk. Until
+ * we fix this, we can't do much with writing back adjacent
+ * entries.
*
- * type: Pointer to the instance of H5C_class_t containing pointers
- * to the methods for cache entries of the current type. This
- * field should be NULL when the instance of H5C_cache_entry_t
- * is not in use.
+ * type: Pointer to the instance of H5C_class_t containing pointers
+ * to the methods for cache entries of the current type. This
+ * field should be NULL when the instance of H5C_cache_entry_t
+ * is not in use.
*
- * The name is not particularly descriptive, but is retained
- * to avoid changes in existing code.
+ * The name is not particularly descriptive, but is retained
+ * to avoid changes in existing code.
*
- * is_dirty: Boolean flag indicating whether the contents of the cache
- * entry has been modified since the last time it was written
- * to disk.
+ * is_dirty: Boolean flag indicating whether the contents of the cache
+ * entry has been modified since the last time it was written
+ * to disk.
*
- * NOTE: For historical reasons, this field is not maintained
- * by the cache. Instead, the module using the cache
- * sets this flag when it modifies the entry, and the
- * flush and clear functions supplied by that module
- * reset the dirty when appropriate.
+ * NOTE: For historical reasons, this field is not maintained
+ * by the cache. Instead, the module using the cache
+ * sets this flag when it modifies the entry, and the
+ * flush and clear functions supplied by that module
+ * reset the dirty when appropriate.
*
- * This is a bit quirky, so we may want to change this
- * someday. However it will require a change in the
- * cache interface.
+ * This is a bit quirky, so we may want to change this
+ * someday. However it will require a change in the
+ * cache interface.
*
- * Update: Management of the is_dirty field has been largely
- * moved into the cache. The only remaining exceptions
- * are the flush and clear functions supplied by the
- * modules using the cache. These still clear the
- * is_dirty field as before. -- JRM 7/5/05
+ * Update: Management of the is_dirty field has been largely
+ * moved into the cache. The only remaining exceptions
+ * are the flush and clear functions supplied by the
+ * modules using the cache. These still clear the
+ * is_dirty field as before. -- JRM 7/5/05
*
- * dirtied: Boolean flag used to indicate that the entry has been
- * dirtied while protected.
+ * dirtied: Boolean flag used to indicate that the entry has been
+ * dirtied while protected.
*
- * This field is set to FALSE in the protect call, and may
- * be set to TRUE by the
- * H5C_mark_entry_dirty()
- * call at an time prior to the unprotect call.
+ * This field is set to FALSE in the protect call, and may
+ * be set to TRUE by the
+ * H5C_mark_entry_dirty()
+ * call at an time prior to the unprotect call.
*
- * The H5C_mark_entry_dirty() call exists
- * as a convenience function for the fractal heap code which
- * may not know if an entry is protected or pinned, but knows
- * that is either protected or pinned. The dirtied field was
- * added as in the parallel case, it is necessary to know
- * whether a protected entry was dirty prior to the protect call.
+ * The H5C_mark_entry_dirty() call exists
+ * as a convenience function for the fractal heap code which
+ * may not know if an entry is protected or pinned, but knows
+ * that is either protected or pinned. The dirtied field was
+ * added as in the parallel case, it is necessary to know
+ * whether a protected entry was dirty prior to the protect call.
*
* is_protected: Boolean flag indicating whether this entry is protected
- * (or locked, to use more conventional terms). When it is
- * protected, the entry cannot be flushed or accessed until
- * it is unprotected (or unlocked -- again to use more
- * conventional terms).
+ * (or locked, to use more conventional terms). When it is
+ * protected, the entry cannot be flushed or accessed until
+ * it is unprotected (or unlocked -- again to use more
+ * conventional terms).
*
- * Note that protected entries are removed from the LRU lists
- * and inserted on the protected list.
+ * Note that protected entries are removed from the LRU lists
+ * and inserted on the protected list.
*
* is_read_only: Boolean flag that is only meaningful if is_protected is
- * TRUE. In this circumstance, it indicates whether the
- * entry has been protected read only, or read/write.
+ * TRUE. In this circumstance, it indicates whether the
+ * entry has been protected read only, or read/write.
*
- * If the entry has been protected read only (i.e. is_protected
- * and is_read_only are both TRUE), we allow the entry to be
- * protected more than once.
+ * If the entry has been protected read only (i.e. is_protected
+ * and is_read_only are both TRUE), we allow the entry to be
+ * protected more than once.
*
- * In this case, the number of readers is maintained in the
- * ro_ref_count field (see below), and unprotect calls simply
- * decrement that field until it drops to zero, at which point
- * the entry is actually unprotected.
+ * In this case, the number of readers is maintained in the
+ * ro_ref_count field (see below), and unprotect calls simply
+ * decrement that field until it drops to zero, at which point
+ * the entry is actually unprotected.
*
* ro_ref_count: Integer field used to maintain a count of the number of
- * outstanding read only protects on this entry. This field
- * must be zero whenever either is_protected or is_read_only
- * are TRUE.
+ * outstanding read only protects on this entry. This field
+ * must be zero whenever either is_protected or is_read_only
+ * are TRUE.
*
- * is_pinned: Boolean flag indicating whether the entry has been pinned
- * in the cache.
+ * is_pinned: Boolean flag indicating whether the entry has been pinned
+ * in the cache.
*
- * For very hot entries, the protect / unprotect overhead
- * can become excessive. Thus the cache has been extended
- * to allow an entry to be "pinned" in the cache.
+ * For very hot entries, the protect / unprotect overhead
+ * can become excessive. Thus the cache has been extended
+ * to allow an entry to be "pinned" in the cache.
*
- * Pinning an entry in the cache has several implications:
+ * Pinning an entry in the cache has several implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
- * pinned entries must be stored in the pinned entry
- * list, instead of being managed by the replacement
- * policy code (LRU at present).
+ * 1) A pinned entry cannot be evicted. Thus unprotected
+ * pinned entries must be stored in the pinned entry
+ * list, instead of being managed by the replacement
+ * policy code (LRU at present).
*
- * 2) A pinned entry can be accessed or modified at any time.
- * Therefore, the cache must check with the entry owner
- * before flushing it. If permission is denied, the
- * cache does not flush the entry.
+ * 2) A pinned entry can be accessed or modified at any time.
+ * Therefore, the cache must check with the entry owner
+ * before flushing it. If permission is denied, the
+ * cache does not flush the entry.
*
- * 3) A pinned entry can be marked as dirty (and possibly
- * change size) while it is unprotected.
+ * 3) A pinned entry can be marked as dirty (and possibly
+ * change size) while it is unprotected.
*
- * 4) The flush-destroy code must allow pinned entries to
- * be unpinned (and possibly unprotected) during the
- * flush.
+ * 4) The flush-destroy code must allow pinned entries to
+ * be unpinned (and possibly unprotected) during the
+ * flush.
*
- * JRM -- 3/16/06
+ * JRM -- 3/16/06
*
- * in_slist: Boolean flag indicating whether the entry is in the skip list
- * As a general rule, entries are placed in the list when they
+ * in_slist: Boolean flag indicating whether the entry is in the skip list
+ * As a general rule, entries are placed in the list when they
* are marked dirty. However they may remain in the list after
* being flushed.
*
* Update: Dirty entries are now removed from the skip list
- * when they are flushed.
+ * when they are flushed.
*
* flush_marker: Boolean flag indicating that the entry is to be flushed
- * the next time H5C_flush_cache() is called with the
- * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
- * the entry is flushed for whatever reason.
+ * the next time H5C_flush_cache() is called with the
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
+ * the entry is flushed for whatever reason.
*
* clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used
- * to implement the metadata cache In the parallel case, only
- * the cache with mpi rank 0 is allowed to actually write to
- * file -- all other caches must retain dirty entries until they
- * are advised that the entry is clean.
+ * to implement the metadata cache In the parallel case, only
+ * the cache with mpi rank 0 is allowed to actually write to
+ * file -- all other caches must retain dirty entries until they
+ * are advised that the entry is clean.
*
- * This flag is used in the case that such an advisory is
- * received when the entry is protected. If it is set when an
- * entry is unprotected, and the dirtied flag is not set in
- * the unprotect, the entry's is_dirty flag is reset by flushing
- * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
+ * This flag is used in the case that such an advisory is
+ * received when the entry is protected. If it is set when an
+ * entry is unprotected, and the dirtied flag is not set in
+ * the unprotect, the entry's is_dirty flag is reset by flushing
+ * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
*
- * flush_immediately: Boolean flag used only in Phdf5 -- and then only
- * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
+ * flush_immediately: Boolean flag used only in Phdf5 -- and then only
+ * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
*
- * When a distributed metadata write is triggered at a
- * sync point, this field is used to mark entries that
- * must be flushed before leaving the sync point. At all
- * other times, this field should be set to FALSE.
+ * When a distributed metadata write is triggered at a
+ * sync point, this field is used to mark entries that
+ * must be flushed before leaving the sync point. At all
+ * other times, this field should be set to FALSE.
*
* flush_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed. This allows the cache
- * to detect when a call is the result of a flush callback.
+ * is in the process of being flushed. This allows the cache
+ * to detect when a call is the result of a flush callback.
*
* destroy_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed and destroyed.
+ * is in the process of being flushed and destroyed.
*
* free_file_space_on_destroy: Boolean flag that is set to true iff the entry
- * is in the process of being flushed and destroyed and the file
+ * is in the process of being flushed and destroyed and the file
* space used by the object should be freed by the cache client's
* 'dest' callback routine.
*
@@ -393,15 +368,15 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* If there are multiple entries in any hash bin, they are stored in a doubly
* linked list.
*
- * ht_next: Next pointer used by the hash table to store multiple
- * entries in a single hash bin. This field points to the
- * next entry in the doubly linked list of entries in the
- * hash bin, or NULL if there is no next entry.
+ * ht_next: Next pointer used by the hash table to store multiple
+ * entries in a single hash bin. This field points to the
+ * next entry in the doubly linked list of entries in the
+ * hash bin, or NULL if there is no next entry.
*
* ht_prev: Prev pointer used by the hash table to store multiple
* entries in a single hash bin. This field points to the
* previous entry in the doubly linked list of entries in
- * the hash bin, or NULL if there is no previuos entry.
+ * the hash bin, or NULL if there is no previuos entry.
*
*
* Fields supporting replacement policies:
@@ -438,62 +413,62 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* The use of the replacement policy fields under the Modified LRU policy
* is discussed below:
*
- * next: Next pointer in either the LRU or the protected list,
- * depending on the current value of protected. If there
- * is no next entry on the list, this field should be set
- * to NULL.
- *
- * prev: Prev pointer in either the LRU or the protected list,
- * depending on the current value of protected. If there
- * is no previous entry on the list, this field should be
- * set to NULL.
- *
- * aux_next: Next pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when protected is true. When
- * protected is false, and dirty is true, it should point
- * to the next item on the dirty LRU list. When protected
- * is false, and dirty is false, it should point to the
- * next item on the clean LRU list. In either case, when
- * there is no next item, it should be NULL.
- *
- * aux_prev: Previous pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when protected is true. When
- * protected is false, and dirty is true, it should point
- * to the previous item on the dirty LRU list. When protected
- * is false, and dirty is false, it should point to the
- * previous item on the clean LRU list. In either case, when
- * there is no previous item, it should be NULL.
+ * next: Next pointer in either the LRU or the protected list,
+ * depending on the current value of protected. If there
+ * is no next entry on the list, this field should be set
+ * to NULL.
+ *
+ * prev: Prev pointer in either the LRU or the protected list,
+ * depending on the current value of protected. If there
+ * is no previous entry on the list, this field should be
+ * set to NULL.
+ *
+ * aux_next: Next pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when protected is true. When
+ * protected is false, and dirty is true, it should point
+ * to the next item on the dirty LRU list. When protected
+ * is false, and dirty is false, it should point to the
+ * next item on the clean LRU list. In either case, when
+ * there is no next item, it should be NULL.
+ *
+ * aux_prev: Previous pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when protected is true. When
+ * protected is false, and dirty is true, it should point
+ * to the previous item on the dirty LRU list. When protected
+ * is false, and dirty is false, it should point to the
+ * previous item on the clean LRU list. In either case, when
+ * there is no previous item, it should be NULL.
*
*
* Fields supporting metadata journaling:
*
- * last_trans: unit64_t containing the ID of the last transaction in
- * which this entry was dirtied. If journaling is disabled,
- * or if the entry has never been dirtied in a transaction,
- * this field should be set to zero. Once we notice that
- * the specified transaction has made it to disk, we will
- * reset this field to zero as well.
+ * last_trans: unit64_t containing the ID of the last transaction in
+ * which this entry was dirtied. If journaling is disabled,
+ * or if the entry has never been dirtied in a transaction,
+ * this field should be set to zero. Once we notice that
+ * the specified transaction has made it to disk, we will
+ * reset this field to zero as well.
*
- * We must maintain this field, as to avoid messages from
- * the future, we must not flush a dirty entry to disk
- * until the last transaction in which it was dirtied
- * has made it to disk in the journal file.
+ * We must maintain this field, as to avoid messages from
+ * the future, we must not flush a dirty entry to disk
+ * until the last transaction in which it was dirtied
+ * has made it to disk in the journal file.
*
* trans_next: Next pointer in the entries modified in the current
- * transaction list. This field should always be null
- * unless journaling is enabled, the entry is dirty,
- * and last_trans field contains the current transaction
- * number. Even if all these conditions are fulfilled,
- * the field will still be NULL if this is the last
- * entry on the list.
+ * transaction list. This field should always be null
+ * unless journaling is enabled, the entry is dirty,
+ * and last_trans field contains the current transaction
+ * number. Even if all these conditions are fulfilled,
+ * the field will still be NULL if this is the last
+ * entry on the list.
*
* trans_prev: Previous pointer in the entries modified in the current
- * transaction list. This field should always be null
- * unless journaling is enabled, the entry is dirty,
- * and last_trans field contains the current transaction
- * number. Even if all these conditions are fulfilled,
- * the field will still be NULL if this is the first
- * entry on the list.
+ * transaction list. This field should always be null
+ * unless journaling is enabled, the entry is dirty,
+ * and last_trans field contains the current transaction
+ * number. Even if all these conditions are fulfilled,
+ * the field will still be NULL if this is the first
+ * entry on the list.
*
*
* Cache entry stats collection fields:
@@ -502,76 +477,74 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* and H5C_COLLECT_CACHE_ENTRY_STATS are true. When present, they allow
* collection of statistics on individual cache entries.
*
- * accesses: int32_t containing the number of times this cache entry has
- * been referenced in its lifetime.
+ * accesses: int32_t containing the number of times this cache entry has
+ * been referenced in its lifetime.
*
- * clears: int32_t containing the number of times this cache entry has
+ * clears: int32_t containing the number of times this cache entry has
* been cleared in its life time.
*
- * flushes: int32_t containing the number of times this cache entry has
+ * flushes: int32_t containing the number of times this cache entry has
* been flushed to file in its life time.
*
- * pins: int32_t containing the number of times this cache entry has
- * been pinned in cache in its life time.
+ * pins: int32_t containing the number of times this cache entry has
+ * been pinned in cache in its life time.
*
****************************************************************************/
#ifndef NDEBUG
-#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
-#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
+#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
+#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
#endif /* NDEBUG */
-typedef struct H5C_cache_entry_t
-{
+typedef struct H5C_cache_entry_t {
#ifndef NDEBUG
- uint32_t magic;
+ uint32_t magic;
#endif /* NDEBUG */
- H5C_t * cache_ptr;
- haddr_t addr;
- size_t size;
- const H5C_class_t * type;
- hbool_t is_dirty;
- hbool_t dirtied;
- hbool_t is_protected;
- hbool_t is_read_only;
- int ro_ref_count;
- hbool_t is_pinned;
- hbool_t in_slist;
- hbool_t flush_marker;
+ H5C_t * cache_ptr;
+ haddr_t addr;
+ size_t size;
+ const H5C_class_t *type;
+ hbool_t is_dirty;
+ hbool_t dirtied;
+ hbool_t is_protected;
+ hbool_t is_read_only;
+ int ro_ref_count;
+ hbool_t is_pinned;
+ hbool_t in_slist;
+ hbool_t flush_marker;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_on_unprotect;
- hbool_t flush_immediately;
+ hbool_t clear_on_unprotect;
+ hbool_t flush_immediately;
#endif /* H5_HAVE_PARALLEL */
- hbool_t flush_in_progress;
- hbool_t destroy_in_progress;
- hbool_t free_file_space_on_destroy;
+ hbool_t flush_in_progress;
+ hbool_t destroy_in_progress;
+ hbool_t free_file_space_on_destroy;
/* fields supporting the hash table: */
- struct H5C_cache_entry_t * ht_next;
- struct H5C_cache_entry_t * ht_prev;
+ struct H5C_cache_entry_t *ht_next;
+ struct H5C_cache_entry_t *ht_prev;
/* fields supporting replacement policies: */
- struct H5C_cache_entry_t * next;
- struct H5C_cache_entry_t * prev;
- struct H5C_cache_entry_t * aux_next;
- struct H5C_cache_entry_t * aux_prev;
+ struct H5C_cache_entry_t *next;
+ struct H5C_cache_entry_t *prev;
+ struct H5C_cache_entry_t *aux_next;
+ struct H5C_cache_entry_t *aux_prev;
#if H5C_COLLECT_CACHE_ENTRY_STATS
/* cache entry stats fields */
- int32_t accesses;
- int32_t clears;
- int32_t flushes;
- int32_t pins;
+ int32_t accesses;
+ int32_t clears;
+ int32_t flushes;
+ int32_t pins;
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
} H5C_cache_entry_t;
-
/****************************************************************************
*
* structure H5C_auto_size_ctl_t
@@ -582,95 +555,95 @@ typedef struct H5C_cache_entry_t
* The fields of the structure are discussed individually below:
*
* version: Integer field containing the version number of this version
- * of the H5C_auto_size_ctl_t structure. Any instance of
- * H5C_auto_size_ctl_t passed to the cache must have a known
- * version number, or an error will be flagged.
+ * of the H5C_auto_size_ctl_t structure. Any instance of
+ * H5C_auto_size_ctl_t passed to the cache must have a known
+ * version number, or an error will be flagged.
*
* report_fcn: Pointer to the function that is to be called to report
* activities each time the auto cache resize code is executed. If the
- * field is NULL, no call is made.
+ * field is NULL, no call is made.
*
- * If the field is not NULL, it must contain the address of a function
- * of type H5C_auto_resize_report_fcn.
+ * If the field is not NULL, it must contain the address of a function
+ * of type H5C_auto_resize_report_fcn.
*
* set_initial_size: Boolean flag indicating whether the size of the
- * initial size of the cache is to be set to the value given in
- * the initial_size field. If set_initial_size is FALSE, the
- * initial_size field is ignored.
+ * initial size of the cache is to be set to the value given in
+ * the initial_size field. If set_initial_size is FALSE, the
+ * initial_size field is ignored.
*
* initial_size: If enabled, this field contain the size the cache is
- * to be set to upon receipt of this structure. Needless to say,
- * initial_size must lie in the closed interval [min_size, max_size].
+ * to be set to upon receipt of this structure. Needless to say,
+ * initial_size must lie in the closed interval [min_size, max_size].
*
* min_clean_fraction: double in the range 0 to 1 indicating the fraction
- * of the cache that is to be kept clean. This field is only used
- * in parallel mode. Typical values are 0.1 to 0.5.
+ * of the cache that is to be kept clean. This field is only used
+ * in parallel mode. Typical values are 0.1 to 0.5.
*
* max_size: Maximum size to which the cache can be adjusted. The
- * supplied value must fall in the closed interval
- * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
- * be greater than or equal to min_size.
+ * supplied value must fall in the closed interval
+ * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
+ * be greater than or equal to min_size.
*
* min_size: Minimum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, min_size must
- * be less than or equal to max_size.
+ * be less than or equal to max_size.
*
* epoch_length: Number of accesses on the cache over which to collect
- * hit rate stats before running the automatic cache resize code,
+ * hit rate stats before running the automatic cache resize code,
* if it is enabled.
*
- * At the end of an epoch, we discard prior hit rate data and start
- * collecting afresh. The epoch_length must lie in the closed
- * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
+ * At the end of an epoch, we discard prior hit rate data and start
+ * collecting afresh. The epoch_length must lie in the closed
+ * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
*
*
* Cache size increase control fields:
*
* incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * increased. At present there are two possible values:
+ * value indicates how we determine whether the cache size should be
+ * increased. At present there are two possible values:
*
- * H5C_incr__off: Don't attempt to increase the size of the cache
- * automatically.
+ * H5C_incr__off: Don't attempt to increase the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size increase section ar ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size increase section ar ignored.
*
- * H5C_incr__threshold: Attempt to increase the size of the cache
- * whenever the average hit rate over the last epoch drops
- * below the value supplied in the lower_hr_threshold
- * field.
+ * H5C_incr__threshold: Attempt to increase the size of the cache
+ * whenever the average hit rate over the last epoch drops
+ * below the value supplied in the lower_hr_threshold
+ * field.
*
- * Note that this attempt will fail if the cache is already
- * at its maximum size, or if the cache is not already using
- * all available space.
+ * Note that this attempt will fail if the cache is already
+ * at its maximum size, or if the cache is not already using
+ * all available space.
*
* lower_hr_threshold: Lower hit rate threshold. If the increment mode
- * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
- * value supplied in this field in an epoch, increment the cache size by
- * size_increment. Note that cache size may not be incremented above
- * max_size, and that the increment may be further restricted by the
- * max_increment field if it is enabled.
+ * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
+ * value supplied in this field in an epoch, increment the cache size by
+ * size_increment. Note that cache size may not be incremented above
+ * max_size, and that the increment may be further restricted by the
+ * max_increment field if it is enabled.
*
- * When enabled, this field must contain a value in the range [0.0, 1.0].
- * Depending on the incr_mode selected, it may also have to be less than
- * upper_hr_threshold.
+ * When enabled, this field must contain a value in the range [0.0, 1.0].
+ * Depending on the incr_mode selected, it may also have to be less than
+ * upper_hr_threshold.
*
* increment: Double containing the multiplier used to derive the new
- * cache size from the old if a cache size increment is triggered.
+ * cache size from the old if a cache size increment is triggered.
* The increment must be greater than 1.0, and should not exceed 2.0.
*
- * The new cache size is obtained by multiplying the current max cache
- * size by the increment, and then clamping to max_size and to stay
- * within the max_increment as necessary.
+ * The new cache size is obtained by multiplying the current max cache
+ * size by the increment, and then clamping to max_size and to stay
+ * within the max_increment as necessary.
*
* apply_max_increment: Boolean flag indicating whether the max_increment
- * field should be used to limit the maximum cache size increment.
+ * field should be used to limit the maximum cache size increment.
*
* max_increment: If enabled by the apply_max_increment field described
- * above, this field contains the maximum number of bytes by which the
- * cache size can be increased in a single re-size.
+ * above, this field contains the maximum number of bytes by which the
+ * cache size can be increased in a single re-size.
*
* flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by what algorithm we should
@@ -719,103 +692,104 @@ typedef struct H5C_cache_entry_t
* is H5C_flash_incr__add_space.
*
* flash_threshold: Double containing the factor by which current max cache
- * size is multiplied to obtain the size threshold for the add_space
- * flash increment algorithm. The field is ignored unless
- * flash_incr_mode is H5C_flash_incr__add_space.
+ * size is multiplied to obtain the size threshold for the add_space
+ * flash increment algorithm. The field is ignored unless
+ * flash_incr_mode is H5C_flash_incr__add_space.
*
*
* Cache size decrease control fields:
*
* decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * decreased. At present there are four possibilities.
+ * value indicates how we determine whether the cache size should be
+ * decreased. At present there are four possibilities.
*
- * H5C_decr__off: Don't attempt to decrease the size of the cache
- * automatically.
+ * H5C_decr__off: Don't attempt to decrease the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size decrease section are ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size decrease section are ignored.
*
- * H5C_decr__threshold: Attempt to decrease the size of the cache
- * whenever the average hit rate over the last epoch rises
- * above the value supplied in the upper_hr_threshold
- * field.
+ * H5C_decr__threshold: Attempt to decrease the size of the cache
+ * whenever the average hit rate over the last epoch rises
+ * above the value supplied in the upper_hr_threshold
+ * field.
*
- * H5C_decr__age_out: At the end of each epoch, search the cache for
- * entries that have not been accessed for at least the number
- * of epochs specified in the epochs_before_eviction field, and
- * evict these entries. Conceptually, the maximum cache size
- * is then decreased to match the new actual cache size. However,
- * this reduction may be modified by the min_size, the
- * max_decrement, and/or the empty_reserve.
+ * H5C_decr__age_out: At the end of each epoch, search the cache for
+ * entries that have not been accessed for at least the number
+ * of epochs specified in the epochs_before_eviction field, and
+ * evict these entries. Conceptually, the maximum cache size
+ * is then decreased to match the new actual cache size. However,
+ * this reduction may be modified by the min_size, the
+ * max_decrement, and/or the empty_reserve.
*
- * H5C_decr__age_out_with_threshold: Same as age_out, but we only
- * attempt to reduce the cache size when the hit rate observed
- * over the last epoch exceeds the value provided in the
- * upper_hr_threshold field.
+ * H5C_decr__age_out_with_threshold: Same as age_out, but we only
+ * attempt to reduce the cache size when the hit rate observed
+ * over the last epoch exceeds the value provided in the
+ * upper_hr_threshold field.
*
* upper_hr_threshold: Upper hit rate threshold. The use of this field
- * varies according to the current decr_mode:
+ * varies according to the current decr_mode:
*
- * H5C_decr__off or H5C_decr__age_out: The value of this field is
- * ignored.
+ * H5C_decr__off or H5C_decr__age_out: The value of this field is
+ * ignored.
*
- * H5C_decr__threshold: If the hit rate exceeds this threshold in any
- * epoch, attempt to decrement the cache size by size_decrement.
+ * H5C_decr__threshold: If the hit rate exceeds this threshold in any
+ * epoch, attempt to decrement the cache size by size_decrement.
*
- * Note that cache size may not be decremented below min_size.
+ * Note that cache size may not be decremented below min_size.
*
- * Note also that if the upper_threshold is 1.0, the cache size
- * will never be reduced.
+ * Note also that if the upper_threshold is 1.0, the cache size
+ * will never be reduced.
*
- * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
- * threshold in any epoch, attempt to reduce the cache size
- * by evicting entries that have not been accessed for more
- * than the specified number of epochs.
+ * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
+ * threshold in any epoch, attempt to reduce the cache size
+ * by evicting entries that have not been accessed for more
+ * than the specified number of epochs.
*
* decrement: This field is only used when the decr_mode is
- * H5C_decr__threshold.
+ * H5C_decr__threshold.
*
- * The field is a double containing the multiplier used to derive the
- * new cache size from the old if a cache size decrement is triggered.
- * The decrement must be in the range 0.0 (in which case the cache will
+ * The field is a double containing the multiplier used to derive the
+ * new cache size from the old if a cache size decrement is triggered.
+ * The decrement must be in the range 0.0 (in which case the cache will
* try to contract to its minimum size) to 1.0 (in which case the
* cache will never shrink).
*
* apply_max_decrement: Boolean flag used to determine whether decrements
- * in cache size are to be limited by the max_decrement field.
+ * in cache size are to be limited by the max_decrement field.
*
* max_decrement: Maximum number of bytes by which the cache size can be
- * decreased in a single re-size. Note that decrements may also be
- * restricted by the min_size of the cache, and (in age out modes) by
- * the empty_reserve field.
+ * decreased in a single re-size. Note that decrements may also be
+ * restricted by the min_size of the cache, and (in age out modes) by
+ * the empty_reserve field.
*
* epochs_before_eviction: Integer field used in H5C_decr__age_out and
- * H5C_decr__age_out_with_threshold decrement modes.
+ * H5C_decr__age_out_with_threshold decrement modes.
*
- * This field contains the number of epochs an entry must remain
- * unaccessed before it is evicted in an attempt to reduce the
- * cache size. If applicable, this field must lie in the range
- * [1, H5C__MAX_EPOCH_MARKERS].
+ * This field contains the number of epochs an entry must remain
+ * unaccessed before it is evicted in an attempt to reduce the
+ * cache size. If applicable, this field must lie in the range
+ * [1, H5C__MAX_EPOCH_MARKERS].
*
* apply_empty_reserve: Boolean field controlling whether the empty_reserve
- * field is to be used in computing the new cache size when the
- * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
+ * field is to be used in computing the new cache size when the
+ * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
*
* empty_reserve: To avoid a constant racheting down of cache size by small
- * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
- * modes, this field allows one to require that any cache size
- * reductions leave the specified fraction of unused space in the cache.
+ * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
+ * modes, this field allows one to require that any cache size
+ * reductions leave the specified fraction of unused space in the cache.
*
- * The value of this field must be in the range [0.0, 1.0]. I would
- * expect typical values to be in the range of 0.01 to 0.1.
+ * The value of this field must be in the range [0.0, 1.0]. I would
+ * expect typical values to be in the range of 0.01 to 0.1.
*
****************************************************************************/
-#define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1
-#define H5C_RESIZE_CFG__VALIDATE_INCREMENT 0x2
-#define H5C_RESIZE_CFG__VALIDATE_DECREMENT 0x4
-#define H5C_RESIZE_CFG__VALIDATE_INTERACTIONS 0x8
+#define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1
+#define H5C_RESIZE_CFG__VALIDATE_INCREMENT 0x2
+#define H5C_RESIZE_CFG__VALIDATE_DECREMENT 0x4
+#define H5C_RESIZE_CFG__VALIDATE_INTERACTIONS 0x8
+/* clang-format off */
#define H5C_RESIZE_CFG__VALIDATE_ALL \
( \
H5C_RESIZE_CFG__VALIDATE_GENERAL | \
@@ -824,31 +798,32 @@ typedef struct H5C_cache_entry_t
H5C_RESIZE_CFG__VALIDATE_INTERACTIONS \
)
-#define H5C__CURR_AUTO_SIZE_CTL_VER 1
-#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
-
-#define H5C__MAX_EPOCH_MARKERS 10
-
-#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
-#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
-#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
-#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
-#define H5C__DEF_AR_INCREMENT 2.0f
-#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
-#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
-#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
-#define H5C__DEF_AR_DECREMENT 0.9f
-#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_EPCHS_B4_EVICT 3
-#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
-#define H5C__MIN_AR_EPOCH_LENGTH 100
-#define H5C__DEF_AR_EPOCH_LENGTH 50000
-#define H5C__MAX_AR_EPOCH_LENGTH 1000000
-
-enum H5C_resize_status
-{
+/* clang-format on */
+
+#define H5C__CURR_AUTO_SIZE_CTL_VER 1
+#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
+
+#define H5C__MAX_EPOCH_MARKERS 10
+
+#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
+#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
+#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
+#define H5C__DEF_AR_INIT_SIZE ((size_t)(1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_SIZE ((size_t)(1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
+#define H5C__DEF_AR_INCREMENT 2.0f
+#define H5C__DEF_AR_MAX_INCREMENT ((size_t)(2 * 1024 * 1024))
+#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
+#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
+#define H5C__DEF_AR_DECREMENT 0.9f
+#define H5C__DEF_AR_MAX_DECREMENT ((size_t)(1 * 1024 * 1024))
+#define H5C__DEF_AR_EPCHS_B4_EVICT 3
+#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
+#define H5C__MIN_AR_EPOCH_LENGTH 100
+#define H5C__DEF_AR_EPOCH_LENGTH 50000
+#define H5C__MAX_AR_EPOCH_LENGTH 1000000
+
+enum H5C_resize_status {
in_spec,
increase,
flash_increase,
@@ -860,65 +835,57 @@ enum H5C_resize_status
not_full
}; /* enum H5C_resize_conditions */
-typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t * cache_ptr,
- int32_t version,
- double hit_rate,
- enum H5C_resize_status status,
- size_t old_max_cache_size,
- size_t new_max_cache_size,
- size_t old_min_clean_size,
+typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t *cache_ptr, int32_t version, double hit_rate,
+ enum H5C_resize_status status, size_t old_max_cache_size,
+ size_t new_max_cache_size, size_t old_min_clean_size,
size_t new_min_clean_size);
-typedef struct H5C_auto_size_ctl_t
-{
+typedef struct H5C_auto_size_ctl_t {
/* general configuration fields: */
- int32_t version;
- H5C_auto_resize_rpt_fcn rpt_fcn;
-
- hbool_t set_initial_size;
- size_t initial_size;
+ int32_t version;
+ H5C_auto_resize_rpt_fcn rpt_fcn;
- double min_clean_fraction;
+ hbool_t set_initial_size;
+ size_t initial_size;
- size_t max_size;
- size_t min_size;
+ double min_clean_fraction;
- int64_t epoch_length;
+ size_t max_size;
+ size_t min_size;
+ int64_t epoch_length;
/* size increase control fields: */
- enum H5C_cache_incr_mode incr_mode;
-
- double lower_hr_threshold;
+ enum H5C_cache_incr_mode incr_mode;
- double increment;
+ double lower_hr_threshold;
- hbool_t apply_max_increment;
- size_t max_increment;
+ double increment;
- enum H5C_cache_flash_incr_mode flash_incr_mode;
- double flash_multiple;
- double flash_threshold;
+ hbool_t apply_max_increment;
+ size_t max_increment;
+ enum H5C_cache_flash_incr_mode flash_incr_mode;
+ double flash_multiple;
+ double flash_threshold;
/* size decrease control fields: */
- enum H5C_cache_decr_mode decr_mode;
+ enum H5C_cache_decr_mode decr_mode;
- double upper_hr_threshold;
+ double upper_hr_threshold;
- double decrement;
+ double decrement;
- hbool_t apply_max_decrement;
- size_t max_decrement;
+ hbool_t apply_max_decrement;
+ size_t max_decrement;
- int32_t epochs_before_eviction;
+ int32_t epochs_before_eviction;
- hbool_t apply_empty_reserve;
- double empty_reserve;
+ hbool_t apply_empty_reserve;
+ double empty_reserve;
} H5C_auto_size_ctl_t;
-
/*
* Library prototypes.
*/
@@ -930,210 +897,144 @@ typedef struct H5C_auto_size_ctl_t
*
* These flags apply to all function calls:
*
- * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
+ * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
*
*
* These flags apply to H5C_insert_entry():
*
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__PIN_ENTRY_FLAG
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__PIN_ENTRY_FLAG
*
* These flags apply to H5C_protect()
*
- * H5C__READ_ONLY_FLAG
+ * H5C__READ_ONLY_FLAG
*
* These flags apply to H5C_unprotect():
*
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__DELETED_FLAG
- * H5C__DIRTIED_FLAG
- * H5C__PIN_ENTRY_FLAG
- * H5C__UNPIN_ENTRY_FLAG
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__DELETED_FLAG
+ * H5C__DIRTIED_FLAG
+ * H5C__PIN_ENTRY_FLAG
+ * H5C__UNPIN_ENTRY_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
*
* These flags apply to H5C_expunge_entry():
*
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
*
* These flags apply to H5C_flush_cache():
*
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
- * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
- * with H5C__FLUSH_INVALIDATE_FLAG)
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
+ * with H5C__FLUSH_INVALIDATE_FLAG)
*
* These flags apply to H5C_flush_single_entry():
*
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
*/
-#define H5C__NO_FLAGS_SET 0x0000
-#define H5C__SET_FLUSH_MARKER_FLAG 0x0001
-#define H5C__DELETED_FLAG 0x0002
-#define H5C__DIRTIED_FLAG 0x0004
-#define H5C__PIN_ENTRY_FLAG 0x0008
-#define H5C__UNPIN_ENTRY_FLAG 0x0010
-#define H5C__FLUSH_INVALIDATE_FLAG 0x0020
-#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x0040
-#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x0080
-#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x0100
-#define H5C__READ_ONLY_FLAG 0x0200
-#define H5C__FREE_FILE_SPACE_FLAG 0x0800
-#define H5C__TAKE_OWNERSHIP_FLAG 0x1000
+#define H5C__NO_FLAGS_SET 0x0000
+#define H5C__SET_FLUSH_MARKER_FLAG 0x0001
+#define H5C__DELETED_FLAG 0x0002
+#define H5C__DIRTIED_FLAG 0x0004
+#define H5C__PIN_ENTRY_FLAG 0x0008
+#define H5C__UNPIN_ENTRY_FLAG 0x0010
+#define H5C__FLUSH_INVALIDATE_FLAG 0x0020
+#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x0040
+#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x0080
+#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x0100
+#define H5C__READ_ONLY_FLAG 0x0200
+#define H5C__FREE_FILE_SPACE_FLAG 0x0800
+#define H5C__TAKE_OWNERSHIP_FLAG 0x1000
#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5C_apply_candidate_list(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
- int num_candidates,
- haddr_t * candidates_list_ptr,
- int mpi_rank,
- int mpi_size);
-
-H5_DLL herr_t H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr);
-
-H5_DLL herr_t H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr);
+H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ H5C_t *cache_ptr, int num_candidates, haddr_t *candidates_list_ptr,
+ int mpi_rank, int mpi_size);
+
+H5_DLL herr_t H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr);
+
+H5_DLL herr_t H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr);
#endif /* H5_HAVE_PARALLEL */
-H5_DLL H5C_t * H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
- const char * (* type_name_table_ptr),
- H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
- H5C_log_flush_func_t log_flush,
- void * aux_ptr);
-
-H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
- int32_t version,
- double hit_rate,
- enum H5C_resize_status status,
- size_t old_max_cache_size,
- size_t new_max_cache_size,
- size_t old_min_clean_size,
+H5_DLL H5C_t *H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
+ const char *(*type_name_table_ptr), H5C_write_permitted_func_t check_write_permitted,
+ hbool_t write_permitted, H5C_log_flush_func_t log_flush, void *aux_ptr);
+
+H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, int32_t version, double hit_rate,
+ enum H5C_resize_status status, size_t old_max_cache_size,
+ size_t new_max_cache_size, size_t old_min_clean_size,
size_t new_min_clean_size);
-H5_DLL herr_t H5C_dest(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id);
-
-H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- unsigned flags);
-
-H5_DLL herr_t H5C_flush_cache(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- unsigned flags);
-
-H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id);
-
-H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
- H5C_auto_size_ctl_t *config_ptr);
-
-H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr);
-
-H5_DLL herr_t H5C_get_cache_hit_rate(H5C_t * cache_ptr,
- double * hit_rate_ptr);
-
-H5_DLL herr_t H5C_get_entry_status(const H5F_t *f,
- haddr_t addr,
- size_t * size_ptr,
- hbool_t * in_cache_ptr,
- hbool_t * is_dirty_ptr,
- hbool_t * is_protected_ptr,
- hbool_t * is_pinned_ptr);
-
-H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t * cache_ptr,
- hbool_t * evictions_enabled_ptr);
-
-H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr,
- FILE **trace_file_ptr_ptr);
+H5_DLL herr_t H5C_dest(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id);
+
+H5_DLL herr_t H5C_expunge_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ const H5C_class_t *type, haddr_t addr, unsigned flags);
+
+H5_DLL herr_t H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsigned flags);
+
+H5_DLL herr_t H5C_flush_to_min_clean(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id);
+
+H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr);
+
+H5_DLL herr_t H5C_get_cache_size(H5C_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr,
+ size_t *cur_size_ptr, int32_t *cur_num_entries_ptr);
+
+H5_DLL herr_t H5C_get_cache_hit_rate(H5C_t *cache_ptr, double *hit_rate_ptr);
+
+H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in_cache_ptr,
+ hbool_t *is_dirty_ptr, hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr);
+
+H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr);
+
+H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr);
H5_DLL herr_t H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
- FILE **trace_file_ptr_ptr);
-
-H5_DLL herr_t H5C_insert_entry(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags);
-
-H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- int32_t ce_array_len,
- haddr_t *ce_array_ptr);
+ FILE ** trace_file_ptr_ptr);
+
+H5_DLL herr_t H5C_insert_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ const H5C_class_t *type, haddr_t addr, void *thing, unsigned int flags);
+
+H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id,
+ int32_t ce_array_len, haddr_t *ce_array_ptr);
H5_DLL herr_t H5C_mark_entry_dirty(void *thing);
-H5_DLL herr_t H5C_move_entry(H5C_t * cache_ptr,
- const H5C_class_t * type,
- haddr_t old_addr,
- haddr_t new_addr);
+H5_DLL herr_t H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, haddr_t new_addr);
H5_DLL herr_t H5C_pin_protected_entry(void *thing);
-H5_DLL void * H5C_protect(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * udata,
- unsigned flags);
+H5_DLL void *H5C_protect(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, void *udata, unsigned flags);
-H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr);
+H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t *cache_ptr);
H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size);
-H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
- H5C_auto_size_ctl_t *config_ptr);
+H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
- hbool_t evictions_enabled);
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled);
-H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix);
+H5_DLL herr_t H5C_set_prefix(H5C_t *cache_ptr, char *prefix);
-H5_DLL herr_t H5C_set_trace_file_ptr(H5C_t * cache_ptr,
- FILE * trace_file_ptr);
+H5_DLL herr_t H5C_set_trace_file_ptr(H5C_t *cache_ptr, FILE *trace_file_ptr);
-H5_DLL herr_t H5C_stats(H5C_t * cache_ptr,
- const char * cache_name,
- hbool_t display_detailed_stats);
+H5_DLL herr_t H5C_stats(H5C_t *cache_ptr, const char *cache_name, hbool_t display_detailed_stats);
-H5_DLL void H5C_stats__reset(H5C_t * cache_ptr);
+H5_DLL void H5C_stats__reset(H5C_t *cache_ptr);
-H5_DLL herr_t H5C_dump_cache(H5C_t * cache_ptr,
- const char * cache_name);
+H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
H5_DLL herr_t H5C_unpin_entry(void *thing);
-H5_DLL herr_t H5C_unprotect(H5F_t * f,
- hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags);
+H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, const H5C_class_t *type,
+ haddr_t addr, void *thing, unsigned int flags);
-H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
- unsigned int tests);
+H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests);
#endif /* !_H5Cprivate_H */
-
diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h
index 62107d9..56bfdb2 100644
--- a/src/H5Cpublic.h
+++ b/src/H5Cpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -33,20 +33,11 @@
extern "C" {
#endif
-enum H5C_cache_incr_mode
-{
- H5C_incr__off,
- H5C_incr__threshold
-};
+enum H5C_cache_incr_mode { H5C_incr__off, H5C_incr__threshold };
-enum H5C_cache_flash_incr_mode
-{
- H5C_flash_incr__off,
- H5C_flash_incr__add_space
-};
+enum H5C_cache_flash_incr_mode { H5C_flash_incr__off, H5C_flash_incr__add_space };
-enum H5C_cache_decr_mode
-{
+enum H5C_cache_decr_mode {
H5C_decr__off,
H5C_decr__threshold,
H5C_decr__age_out,
diff --git a/src/H5D.c b/src/H5D.c
index 4a6c0ee..5f6b77b 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,37 +15,32 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5D__init_pub_interface
-
+#define H5_INTERFACE_INIT_FUNC H5D__init_pub_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -56,7 +51,6 @@ H5FL_BLK_EXTERN(vlen_vl_buf);
/* Declare extern the free list to manage other blocks of VL data */
H5FL_BLK_EXTERN(vlen_fl_buf);
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -64,13 +58,10 @@ H5FL_BLK_EXTERN(vlen_fl_buf);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5D__init_pub_interface -- Initialize interface-specific information
@@ -91,7 +82,6 @@ H5D__init_pub_interface(void)
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D__init_pub_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5D__term_pub_interface -- Terminate interface
@@ -115,236 +105,222 @@ H5D__term_pub_interface(void)
FUNC_LEAVE_NOAPI(0)
} /* H5D__term_pub_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dcreate2
- *
- * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
- * dataset for access, and associates with that dataset constant
- * and initial persistent properties including the type of each
- * datapoint as stored in the file (TYPE_ID), the size of the
- * dataset (SPACE_ID), and other initial miscellaneous
- * properties (DCPL_ID).
+ * Function: H5Dcreate2
*
- * All arguments are copied into the dataset, so the caller is
- * allowed to derive new types, dataspaces, and creation
- * parameters from the old ones and reuse them in calls to
- * create other datasets.
+ * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
+ * dataset for access, and associates with that dataset constant
+ * and initial persistent properties including the type of each
+ * datapoint as stored in the file (TYPE_ID), the size of the
+ * dataset (SPACE_ID), and other initial miscellaneous
+ * properties (DCPL_ID).
*
- * Return: Success: The object ID of the new dataset. At this
- * point, the dataset is ready to receive its
- * raw data. Attempting to read raw data from
- * the dataset will probably return the fill
- * value. The dataset should be closed when the
- * caller is no longer interested in it.
+ * All arguments are copied into the dataset, so the caller is
+ * allowed to derive new types, dataspaces, and creation
+ * parameters from the old ones and reuse them in calls to
+ * create other datasets.
*
- * Failure: FAIL
+ * Return: Success: The object ID of the new dataset. At this
+ * point, the dataset is ready to receive its
+ * raw data. Attempting to read raw data from
+ * the dataset will probably return the fill
+ * value. The dataset should be closed when the
+ * caller is no longer interested in it.
*
- * Programmer: Quincey Koziol
- * Thursday, April 5, 2007
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
- hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id)
+H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id,
+ hid_t dapl_id)
{
- H5G_loc_t loc; /* Object location to insert dataset into */
- H5D_t *dset = NULL; /* New dataset's info */
- const H5S_t *space; /* Dataspace for dataset */
- hid_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location to insert dataset into */
+ H5D_t * dset = NULL; /* New dataset's info */
+ const H5S_t *space; /* Dataspace for dataset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE7("i", "i*siiiii", loc_id, name, type_id, space_id, lcpl_id, dcpl_id,
- dapl_id);
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "i*siiiii", loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5I_DATATYPE != H5I_get_type(type_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype ID")
- if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace ID")
-
- /* Get correct property list */
- if(H5P_DEFAULT == lcpl_id)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location ID")
+ if (H5I_DATATYPE != H5I_get_type(type_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype ID")
+ if (NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace ID")
+
+ /* Get link creation property list */
+ if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
+ else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list")
- /* Get correct property list */
- if(H5P_DEFAULT == dcpl_id)
+ /* Get dataset creation property list */
+ if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
+ else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID,
+ "dcpl_id is not a dataset create property list ID")
/* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
+ if (H5P_DEFAULT == dapl_id)
dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ else if (TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list")
/* Create the new dataset & get its ID */
- if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
+ if (NULL ==
+ (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
+
+ /* Get an ID for the dataset */
+ if ((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset")
done:
- if(ret_value < 0)
- if(dset && H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (H5I_INVALID_HID == ret_value)
+ if (dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Dcreate2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dcreate_anon
+ * Function: H5Dcreate_anon
*
- * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
- * dataset for access, and associates with that dataset constant
- * and initial persistent properties including the type of each
- * datapoint as stored in the file (TYPE_ID), the size of the
- * dataset (SPACE_ID), and other initial miscellaneous
- * properties (DCPL_ID).
+ * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
+ * dataset for access, and associates with that dataset constant
+ * and initial persistent properties including the type of each
+ * datapoint as stored in the file (TYPE_ID), the size of the
+ * dataset (SPACE_ID), and other initial miscellaneous
+ * properties (DCPL_ID).
*
- * All arguments are copied into the dataset, so the caller is
- * allowed to derive new types, dataspaces, and creation
- * parameters from the old ones and reuse them in calls to
- * create other datasets.
+ * All arguments are copied into the dataset, so the caller is
+ * allowed to derive new types, dataspaces, and creation
+ * parameters from the old ones and reuse them in calls to
+ * create other datasets.
*
* The resulting ID should be linked into the file with
* H5Olink or it will be deleted when closed.
*
- * Return: Success: The object ID of the new dataset. At this
- * point, the dataset is ready to receive its
- * raw data. Attempting to read raw data from
- * the dataset will probably return the fill
- * value. The dataset should be linked into
- * the group hierarchy before being closed or
- * it will be deleted. The dataset should be
- * closed when the caller is no longer interested
- * in it.
- *
- * Failure: FAIL
+ * Return: Success: The object ID of the new dataset. At this
+ * point, the dataset is ready to receive its
+ * raw data. Attempting to read raw data from
+ * the dataset will probably return the fill
+ * value. The dataset should be linked into
+ * the group hierarchy before being closed or
+ * it will be deleted. The dataset should be
+ * closed when the caller is no longer interested
+ * in it.
*
- * Programmer: James Laird
- * Tuesday, January 24, 2006
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
- hid_t dapl_id)
+H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id)
{
- H5G_loc_t loc; /* Object location to insert dataset into */
- H5D_t *dset = NULL; /* New dataset's info */
- const H5S_t *space; /* Dataspace for dataset */
- hid_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location to insert dataset into */
+ H5D_t * dset = NULL; /* New dataset's info */
+ const H5S_t *space; /* Dataspace for dataset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE5("i", "iiiii", loc_id, type_id, space_id, dcpl_id, dapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5I_DATATYPE != H5I_get_type(type_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype ID")
- if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace ID")
- if(H5P_DEFAULT == dcpl_id)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location ID")
+ if (H5I_DATATYPE != H5I_get_type(type_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype ID")
+ if (NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace ID")
+ if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
+ else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID")
/* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
+ if (H5P_DEFAULT == dapl_id)
dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ else if (TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list")
/* build and open the new dataset */
- if(NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
+ if (NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
/* Register the new dataset to get an ID for it */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
+ if ((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset")
done:
/* Release the dataset's object header, if it was created */
- if(dset) {
- H5O_loc_t *oloc; /* Object location for dataset */
+ if (dset) {
+ H5O_loc_t *oloc; /* Object location for dataset */
/* Get the new dataset's object location */
- if(NULL == (oloc = H5D_oloc(dset)))
- HDONE_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get object location of dataset")
+ if (NULL == (oloc = H5D_oloc(dset)))
+ HDONE_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get object location of dataset")
/* Decrement refcount on dataset's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
- } /* end if */
+ if (H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID,
+ "unable to decrement refcount on newly created object")
+ }
/* Cleanup on failure */
- if(ret_value < 0)
- if(dset && H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (H5I_INVALID_HID == ret_value)
+ if (dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Dcreate_anon() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dopen2
+ * Function: H5Dopen2
*
- * Purpose: Finds a dataset named NAME at LOC_ID, opens it, and returns
- * its ID. The dataset should be close when the caller is no
- * longer interested in it.
+ * Purpose: Finds a dataset named NAME at LOC_ID, opens it, and returns
+ * its ID. The dataset should be close when the caller is no
+ * longer interested in it.
*
* Takes a dataset access property list
*
- * Return: Success: A new dataset ID
- * Failure: FAIL
+ * Return: Success: Object ID of the dataset
*
- * Programmer: James Laird
- * Thursday, July 27, 2006
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
{
- H5D_t *dset = NULL;
- H5G_loc_t loc; /* Object location of group */
- H5G_loc_t dset_loc; /* Object location of dataset */
- H5G_name_t path; /* Dataset group hier. path */
- H5O_loc_t oloc; /* Dataset object location */
- H5O_type_t obj_type; /* Type of object at location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
- hid_t ret_value;
-
- FUNC_ENTER_API(FAIL)
+ H5D_t * dset = NULL;
+ H5G_loc_t loc; /* Object location of group */
+ H5G_loc_t dset_loc; /* Object location of dataset */
+ H5G_name_t path; /* Dataset group hier. path */
+ H5O_loc_t oloc; /* Dataset object location */
+ H5O_type_t obj_type; /* Type of object at location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, name, dapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
/* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
+ if (H5P_DEFAULT == dapl_id)
dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ else if (TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list")
/* Set up dataset location to fill in */
dset_loc.oloc = &oloc;
@@ -352,363 +328,334 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
H5G_loc_reset(&dset_loc);
/* Find the dataset object */
- if(H5G_loc_find(&loc, name, &dset_loc, dapl_id, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
+ if (H5G_loc_find(&loc, name, &dset_loc, dapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, H5I_INVALID_HID, "not found")
loc_found = TRUE;
/* Check that the object found is the correct type */
- if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_DATASET)
- HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
+ if (H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "can't get object type")
+ if (obj_type != H5O_TYPE_DATASET)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, H5I_INVALID_HID, "not a dataset")
/* Open the dataset */
- if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset")
+ if (NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "can't open dataset")
/* Register an atom for the dataset */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom")
+ if ((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset atom")
done:
- if(ret_value < 0) {
- if(dset) {
- if(H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (H5I_INVALID_HID == ret_value) {
+ if (dset) {
+ if (H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release dataset")
} /* end if */
else {
- if(loc_found && H5G_loc_free(&dset_loc) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't free location")
+ if (loc_found && H5G_loc_free(&dset_loc) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, H5I_INVALID_HID, "can't free location")
} /* end else */
- } /* end if */
+ }
FUNC_LEAVE_API(ret_value)
} /* end H5Dopen2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dclose
- *
- * Purpose: Closes access to a dataset (DATASET_ID) and releases
- * resources used by it. It is illegal to subsequently use that
- * same dataset ID in calls to other dataset functions.
+ * Function: H5Dclose
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Closes access to a dataset and releases resources used by
+ * it. It is illegal to subsequently use that same dataset
+ * ID in calls to other dataset functions.
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5Dclose(hid_t dset_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
- if(NULL == H5I_object_verify(dset_id, H5I_DATASET))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == H5I_object_verify(dset_id, H5I_DATASET))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- /*
- * Decrement the counter on the dataset. It will be freed if the count
+ /* Decrement the counter on the dataset. It will be freed if the count
* reaches zero.
*
* Pass in TRUE for the 3rd parameter to tell the function to remove
* dataset's ID even though the freeing function might fail. Please
* see the comments in H5I_dec_ref for details. (SLU - 2010/9/7)
*/
- if(H5I_dec_app_ref_always_close(dset_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID")
+ if (H5I_dec_app_ref_always_close(dset_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dclose() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_space
- *
- * Purpose: Returns a copy of the file dataspace for a dataset.
+ * Function: H5Dget_space
*
- * Return: Success: ID for a copy of the dataspace. The data
- * space should be released by calling
- * H5Sclose().
+ * Purpose: Returns a copy of the file dataspace for a dataset.
*
- * Failure: FAIL
+ * Return: Success: ID for a copy of the dataspace. The data
+ * space should be released by calling
+ * H5Sclose().
*
- * Programmer: Robb Matzke
- * Wednesday, January 28, 1998
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Dget_space(hid_t dset_id)
{
- H5D_t *dset = NULL;
- hid_t ret_value;
+ H5D_t *dset = NULL;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier")
- if((ret_value = H5D_get_space(dset)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace")
+ if ((ret_value = H5D_get_space(dset)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to get dataspace")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Dget_space() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_space_status
- *
- * Purpose: Returns the status of dataspace allocation.
+ * Function: H5Dget_space_status
*
- * Return:
- * Success: Non-negative
+ * Purpose: Returns the status of dataspace allocation.
*
- * Failture: Negative
- *
- * Programmer: Raymond Lu
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
{
- H5D_t *dset = NULL;
- herr_t ret_value = SUCCEED;
+ H5D_t *dset = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Ds", dset_id, allocation);
- /* Check arguments */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ /* Check args */
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier")
/* Read dataspace address and return */
- if(H5D__get_space_status(dset, allocation, H5AC_ind_dxpl_id) < 0)
+ if (H5D__get_space_status(dset, allocation, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get space status")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* H5Dget_space_status() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_type
- *
- * Purpose: Returns a copy of the file datatype for a dataset.
+ * Function: H5Dget_type
*
- * Return: Success: ID for a copy of the datatype. The data
- * type should be released by calling
- * H5Tclose().
+ * Purpose: Returns a copy of the file datatype for a dataset.
*
- * Failure: FAIL
+ * Return: Success: ID for a copy of the datatype. The data
+ * type should be released by calling
+ * H5Tclose().
*
- * Programmer: Robb Matzke
- * Tuesday, February 3, 1998
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Dget_type(hid_t dset_id)
{
+ H5D_t *dset; /* Dataset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- H5D_t *dset; /* Dataset */
- hid_t ret_value; /* Return value */
-
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier")
- if((ret_value = H5D_get_type(dset)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace")
+ if ((ret_value = H5D_get_type(dset)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to get dataspace")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dget_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_create_plist
+ * Function: H5Dget_create_plist
*
- * Purpose: Returns a copy of the dataset creation property list.
+ * Purpose: Returns a copy of the dataset creation property list.
*
- * Return: Success: ID for a copy of the dataset creation
- * property list. The template should be
- * released by calling H5P_close().
+ * Return: Success: ID for a copy of the dataset creation
+ * property list. The template should be
+ * released by calling H5P_close().
*
- * Failure: FAIL
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Robb Matzke
- * Tuesday, February 3, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, February 3, 1998
*
*-------------------------------------------------------------------------
*/
hid_t
H5Dget_create_plist(hid_t dset_id)
{
- H5D_t *dataset; /* Dataset structure */
- hid_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dataset; /* Dataset structure */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL == (dataset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == (dataset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier")
- if((ret_value = H5D_get_create_plist(dataset)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't get creation plist")
+ /* Get the dataset creation property list */
+ if ((ret_value = H5D_get_create_plist(dataset)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset creation properties")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dget_create_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_access_plist
+ * Function: H5Dget_access_plist
*
- * Purpose: Returns a copy of the dataset creation property list.
+ * Purpose: Returns a copy of the dataset access property list.
*
* Description: H5Dget_access_plist returns the dataset access property
- * list identifier of the specified dataset.
+ * list identifier of the specified dataset.
*
- * The chunk cache parameters in the returned property lists will be
- * those used by the dataset. If the properties in the file access
- * property list were used to determine the dataset’s chunk cache
- * configuration, then those properties will be present in the
- * returned dataset access property list. If the dataset does not
- * use a chunked layout, then the chunk cache properties will be set
- * to the default. The chunk cache properties in the returned list
- * are considered to be “setâ€, and any use of this list will override
- * the corresponding properties in the file’s file access property
- * list.
+ * The chunk cache parameters in the returned property lists will be
+ * those used by the dataset. If the properties in the file access
+ * property list were used to determine the dataset’s chunk cache
+ * configuration, then those properties will be present in the
+ * returned dataset access property list. If the dataset does not
+ * use a chunked layout, then the chunk cache properties will be set
+ * to the default. The chunk cache properties in the returned list
+ * are considered to be “setâ€, and any use of this list will override
+ * the corresponding properties in the file’s file access property
+ * list.
*
- * All link access properties in the returned list will be set to the
- * default values.
+ * All link access properties in the returned list will be set to the
+ * default values.
*
- * Return: Success: ID for a copy of the dataset access
- * property list. The template should be
- * released by calling H5Pclose().
+ * Return: Success: ID for a copy of the dataset access
+ * property list. The template should be
+ * released by calling H5Pclose().
*
- * Failure: FAIL
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Neil Fortner
- * Wednesday, October 29, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 29, 2008
*
*-------------------------------------------------------------------------
*/
hid_t
H5Dget_access_plist(hid_t dset_id)
{
- H5D_t *dset; /* Dataset structure */
- hid_t ret_value; /* Return value */
+ H5D_t *dset; /* Dataset structure */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", dset_id);
/* Check args */
if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier")
- if((ret_value = H5D_get_access_plist(dset)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't get access plist")
+ /* Get the dataset access property list */
+ if ((ret_value = H5D_get_access_plist(dset)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset access properties")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dget_access_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_storage_size
- *
- * Purpose: Returns the amount of storage that is required for the
- * dataset. For chunked datasets this is the number of allocated
- * chunks times the chunk size.
+ * Function: H5Dget_storage_size
*
- * Return: Success: The amount of storage space allocated for the
- * dataset, not counting meta data. The return
- * value may be zero if no data has been stored.
+ * Purpose: Returns the amount of storage that is required for the
+ * dataset. For chunked datasets this is the number of allocated
+ * chunks times the chunk size.
*
- * Failure: Zero
+ * Return: Success: The amount of storage space allocated for the
+ * dataset, not counting meta data. The return
+ * value may be zero if no data has been stored.
*
- * Programmer: Robb Matzke
- * Wednesday, April 21, 1999
+ * Failure: Zero
*
*-------------------------------------------------------------------------
*/
hsize_t
H5Dget_storage_size(hid_t dset_id)
{
- H5D_t *dset; /* Dataset to query */
- hsize_t ret_value; /* Return value */
+ H5D_t * dset; /* Dataset to query */
+ hsize_t ret_value = 0; /* Return value */
FUNC_ENTER_API(0)
H5TRACE1("h", "i", dset_id);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid dataset identifier")
- /* Set return value */
- if(H5D__get_storage_size(dset, H5AC_ind_dxpl_id, &ret_value) < 0)
+ /* Get the storage size */
+ if (H5D__get_storage_size(dset, H5AC_ind_dxpl_id, &ret_value) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of dataset's storage")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dget_storage_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dget_offset
- *
- * Purpose: Returns the address of dataset in file.
+ * Function: H5Dget_offset
*
- * Return: Success: the address of dataset
+ * Purpose: Returns the address of dataset in file.
*
- * Failure: HADDR_UNDEF
+ * Return: Success: The address of dataset
*
- * Programmer: Raymond Lu
- * November 6, 2002
+ * Failure: HADDR_UNDEF (can also be a valid return value!)
*
*-------------------------------------------------------------------------
*/
haddr_t
H5Dget_offset(hid_t dset_id)
{
- H5D_t *dset; /* Dataset to query */
- haddr_t ret_value; /* Return value */
+ H5D_t * dset; /* Dataset to query */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE1("a", "i", dset_id);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a dataset")
- /* Set return value */
+ /* Get the offset */
ret_value = H5D__get_offset(dset);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dget_offset() */
-
/*-------------------------------------------------------------------------
- * Function: H5Diterate
+ * Function: H5Diterate
*
- * Purpose: This routine iterates over all the elements selected in a memory
+ * Purpose: This routine iterates over all the elements selected in a memory
* buffer. The callback function is called once for each element selected
* in the dataspace. The selection in the dataspace is modified so
* that any elements already iterated over are removed from the selection
@@ -755,52 +702,50 @@ done:
* indicating failure. The iterator can be restarted at the next
* element.
*
- * Return: Returns the return value of the last operator if it was non-zero,
+ * Return: Returns the return value of the last operator if it was non-zero,
* or zero if all elements were processed. Otherwise returns a
* negative value.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, June 11, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op,
- void *operator_data)
+H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *operator_data)
{
- H5T_t *type; /* Datatype */
- H5S_t *space; /* Dataspace for iteration */
- H5S_sel_iter_op_t dset_op; /* Operator for iteration */
- herr_t ret_value; /* Return value */
+ H5T_t * type; /* Datatype */
+ H5S_t * space; /* Dataspace for iteration */
+ H5S_sel_iter_op_t dset_op; /* Operator for iteration */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xiix*x", buf, type_id, space_id, op, operator_data);
/* Check args */
- if(NULL == op)
+ if (NULL == op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid operator")
- if(NULL == buf)
+ if (NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer")
- if(H5I_DATATYPE != H5I_get_type(type_id))
+ if (H5I_DATATYPE != H5I_get_type(type_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
- if(!(H5S_has_extent(space)))
+ if (!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
- dset_op.op_type = H5S_SEL_ITER_OP_APP;
- dset_op.u.app_op.op = op;
+ dset_op.op_type = H5S_SEL_ITER_OP_APP;
+ dset_op.u.app_op.op = op;
dset_op.u.app_op.type_id = type_id;
ret_value = H5S_select_iterate(buf, type, space, &dset_op, operator_data);
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Diterate() */
+} /* end H5Diterate() */
-
/*-------------------------------------------------------------------------
* Function: H5Dvlen_reclaim
*
@@ -819,39 +764,37 @@ done:
herr_t
H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf)
{
- H5S_t *space; /* Dataspace for iteration */
- herr_t ret_value; /* Return value */
+ H5S_t *space; /* Dataspace for iteration */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iii*x", type_id, space_id, plist_id, buf);
/* Check args */
- if(H5I_DATATYPE != H5I_get_type(type_id) || buf == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (H5I_DATATYPE != H5I_get_type(type_id) || buf == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
- if(!(H5S_has_extent(space)))
+ if (!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
/* Get the default dataset transfer property list if the user didn't provide one */
- if(H5P_DEFAULT == plist_id)
+ if (H5P_DEFAULT == plist_id)
plist_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
+ else if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
/* Call internal routine */
ret_value = H5D_vlen_reclaim(type_id, space, plist_id, buf);
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Dvlen_reclaim() */
+} /* end H5Dvlen_reclaim() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dvlen_get_buf_size
+ * Function: H5Dvlen_get_buf_size
*
- * Purpose: This routine checks the number of bytes required to store the VL
+ * Purpose: This routine checks the number of bytes required to store the VL
* data from the dataset, using the space_id for the selection in the
* dataset on disk and the type_id for the memory representation of the
* VL data, in memory. The *size value is modified according to how many
@@ -865,116 +808,110 @@ done:
* Kinda kludgy, but easier than the other method of trying to figure out
* the sizes without actually reading the data in... - QAK
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, August 11, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
- hsize_t *size)
+H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size)
{
H5D_vlen_bufsize_t vlen_bufsize = {0, 0, 0, 0, 0, 0, 0};
- H5D_t *dset; /* Dataset for operation */
- H5S_t *fspace = NULL; /* Dataset's dataspace */
- H5S_t *mspace = NULL; /* Memory dataspace */
- char bogus; /* bogus value to pass to H5Diterate() */
- H5S_t *space; /* Dataspace for iteration */
- H5P_genplist_t *plist; /* Property list */
- H5T_t *type; /* Datatype */
- H5S_sel_iter_op_t dset_op; /* Operator for iteration */
- herr_t ret_value; /* Return value */
+ H5D_t * dset; /* Dataset for operation */
+ H5S_t * fspace = NULL; /* Dataset's dataspace */
+ H5S_t * mspace = NULL; /* Memory dataspace */
+ char bogus; /* bogus value to pass to H5Diterate() */
+ H5S_t * space; /* Dataspace for iteration */
+ H5P_genplist_t * plist; /* Property list */
+ H5T_t * type; /* Datatype */
+ H5S_sel_iter_op_t dset_op; /* Operator for iteration */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iii*h", dataset_id, type_id, space_id, size);
/* Check args */
- if(H5I_DATASET != H5I_get_type(dataset_id) ||
- H5I_DATATYPE != H5I_get_type(type_id) || size == NULL)
+ if (H5I_DATASET != H5I_get_type(dataset_id) || H5I_DATATYPE != H5I_get_type(type_id) || size == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(NULL == (dset = (H5D_t *)H5I_object(dataset_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (dset = (H5D_t *)H5I_object(dataset_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
- if(!(H5S_has_extent(space)))
+ if (!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
/* Save the dataset */
vlen_bufsize.dset = dset;
/* Get a copy of the dataset's dataspace */
- if(NULL == (fspace = H5S_copy(dset->shared->space, FALSE, TRUE)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to get dataspace")
+ if (NULL == (fspace = H5S_copy(dset->shared->space, FALSE, TRUE)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to get dataspace")
vlen_bufsize.fspace = fspace;
/* Create a scalar for the memory dataspace */
- if(NULL == (mspace = H5S_create(H5S_SCALAR)))
+ if (NULL == (mspace = H5S_create(H5S_SCALAR)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace")
vlen_bufsize.mspace = mspace;
/* Grab the temporary buffers required */
- if(NULL == (vlen_bufsize.fl_tbuf = H5FL_BLK_MALLOC(vlen_fl_buf, (size_t)1)))
+ if (NULL == (vlen_bufsize.fl_tbuf = H5FL_BLK_MALLOC(vlen_fl_buf, (size_t)1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available")
- if(NULL == (vlen_bufsize.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1)))
+ if (NULL == (vlen_bufsize.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available")
/* Change to the custom memory allocation routines for reading VL data */
- if((vlen_bufsize.xfer_pid = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
+ if ((vlen_bufsize.xfer_pid = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "no dataset xfer plists available")
/* Get the property list struct */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(vlen_bufsize.xfer_pid)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(vlen_bufsize.xfer_pid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Set the memory manager to the special allocation routine */
- if(H5P_set_vlen_mem_manager(plist, H5D__vlen_get_buf_size_alloc, &vlen_bufsize, NULL, NULL) < 0)
+ if (H5P_set_vlen_mem_manager(plist, H5D__vlen_get_buf_size_alloc, &vlen_bufsize, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set VL data allocation routine")
/* Set the initial number of bytes required */
vlen_bufsize.size = 0;
/* Call H5S_select_iterate with args, etc. */
- dset_op.op_type = H5S_SEL_ITER_OP_APP;
- dset_op.u.app_op.op = H5D__vlen_get_buf_size;
+ dset_op.op_type = H5S_SEL_ITER_OP_APP;
+ dset_op.u.app_op.op = H5D__vlen_get_buf_size;
dset_op.u.app_op.type_id = type_id;
ret_value = H5S_select_iterate(&bogus, type, space, &dset_op, &vlen_bufsize);
/* Get the size if we succeeded */
- if(ret_value >= 0)
+ if (ret_value >= 0)
*size = vlen_bufsize.size;
done:
- if(fspace && H5S_close(fspace) < 0)
+ if (fspace && H5S_close(fspace) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
- if(mspace && H5S_close(mspace) < 0)
+ if (mspace && H5S_close(mspace) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
- if(vlen_bufsize.fl_tbuf != NULL)
+ if (vlen_bufsize.fl_tbuf != NULL)
vlen_bufsize.fl_tbuf = H5FL_BLK_FREE(vlen_fl_buf, vlen_bufsize.fl_tbuf);
- if(vlen_bufsize.vl_tbuf != NULL)
+ if (vlen_bufsize.vl_tbuf != NULL)
vlen_bufsize.vl_tbuf = H5FL_BLK_FREE(vlen_vl_buf, vlen_bufsize.vl_tbuf);
- if(vlen_bufsize.xfer_pid > 0 && H5I_dec_ref(vlen_bufsize.xfer_pid) < 0)
+ if (vlen_bufsize.xfer_pid > 0 && H5I_dec_ref(vlen_bufsize.xfer_pid) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref count on property list")
FUNC_LEAVE_API(ret_value)
-} /* end H5Dvlen_get_buf_size() */
+} /* end H5Dvlen_get_buf_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dset_extent
+ * Function: H5Dset_extent
*
- * Purpose: Modifies the dimensions of a dataset.
- * Can change to a smaller dimension.
+ * Purpose: Modifies the dimensions of a dataset.
+ * Can change to a smaller dimension.
*
* Return: Non-negative on success, negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * April 9, 2002
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -987,24 +924,23 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[])
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(!size)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (!size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
/* Private function */
- if(H5D__set_extent(dset, size, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extend dataset")
+ if (H5D__set_extent(dset, size, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extend dataset")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dset_extent() */
-
/*-------------------------------------------------------------------------
* Function: H5Dget_chunk_storage_size
*
- * Purpose: Returns the size of an allocated of chunk.
+ * Purpose: Returns the size of an allocated chunk.
*
* Return: Non-negative on success, negative on failure
*
@@ -1016,28 +952,27 @@ done:
herr_t
H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_nbytes)
{
- H5D_t *dset = NULL;
- herr_t ret_value = SUCCEED;
+ H5D_t *dset = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*h*h", dset_id, offset, chunk_nbytes);
/* Check arguments */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if( NULL == offset )
+ if (NULL == offset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)")
- if( NULL == chunk_nbytes )
+ if (NULL == chunk_nbytes)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)")
- if(H5D_CHUNKED != dset->shared->layout.type)
+ if (H5D_CHUNKED != dset->shared->layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
- /* Call private function */
- if(H5D__get_chunk_storage_size(dset, H5AC_ind_dxpl_id, offset, chunk_nbytes) < 0)
+ /* Get the dataset creation property list */
+ if (H5D__get_chunk_storage_size(dset, H5AC_ind_dxpl_id, offset, chunk_nbytes) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk")
done:
FUNC_LEAVE_API(ret_value);
}
-
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 5e9ffbc..c345d2c 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
* Purpose: v1 B-tree indexed (chunked) I/O functions. The chunks are
@@ -24,24 +24,23 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bprivate.h" /* B-link trees */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File space management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspaces */
-#include "H5VMprivate.h" /* Vector and array functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Bprivate.h" /* B-link trees */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File space management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspaces */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
/* Local Macros */
@@ -51,7 +50,7 @@
* Given a B-tree node return the dimensionality of the chunks pointed to by
* that node.
*/
-#define H5D_BTREE_NDIMS(X) (((X)->sizeof_rkey-8)/8)
+#define H5D_BTREE_NDIMS(X) (((X)->sizeof_rkey - 8) / 8)
/******************/
/* Local Typedefs */
@@ -72,106 +71,81 @@
* The chunk's file address is part of the B-tree and not part of the key.
*/
typedef struct H5D_btree_key_t {
- uint32_t nbytes; /*size of stored data */
- hsize_t offset[H5O_LAYOUT_NDIMS]; /*logical offset to start*/
- unsigned filter_mask; /*excluded filters */
+ uint32_t nbytes; /*size of stored data */
+ hsize_t offset[H5O_LAYOUT_NDIMS]; /*logical offset to start*/
+ unsigned filter_mask; /*excluded filters */
} H5D_btree_key_t;
/* B-tree callback info for iteration over chunks */
typedef struct H5D_btree_it_ud_t {
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
- H5D_chunk_cb_func_t cb; /* Chunk callback routine */
- void *udata; /* User data for chunk callback routine */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ H5D_chunk_cb_func_t cb; /* Chunk callback routine */
+ void * udata; /* User data for chunk callback routine */
} H5D_btree_it_ud_t;
/* B-tree callback info for debugging */
typedef struct H5D_btree_dbg_t {
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
- unsigned ndims; /* Number of dimensions */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ unsigned ndims; /* Number of dimensions */
} H5D_btree_dbg_t;
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
- unsigned ndims);
+static herr_t H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims);
/* B-tree iterator callbacks */
-static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key,
- haddr_t addr, const void *right_key, void *_udata);
+static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key, haddr_t addr,
+ const void *right_key, void *_udata);
/* B-tree callbacks */
-static H5RC_t *H5D__btree_get_shared(const H5F_t *f, const void *_udata);
-static herr_t H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key,
- void *_udata, void *_rt_key, haddr_t *addr_p /*out*/);
-static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
-static int H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static htri_t H5D__btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *_lt_key, void *_udata);
-static H5B_ins_t H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- void *_lt_key, hbool_t *lt_key_changed, void *_md_key, void *_udata,
- void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node/*out*/);
-static H5B_ins_t H5D__btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
- void *_lt_key, hbool_t *lt_key_changed, void *_udata, void *_rt_key,
- hbool_t *rt_key_changed);
-static herr_t H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
- void *_key);
-static herr_t H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
- const void *_key);
-static herr_t H5D__btree_debug_key(FILE *stream, int indent, int fwidth,
- const void *key, const void *udata);
+static H5RC_t * H5D__btree_get_shared(const H5F_t *f, const void *_udata);
+static herr_t H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key, void *_udata,
+ void *_rt_key, haddr_t *addr_p /*out*/);
+static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
+static int H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
+static htri_t H5D__btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, void *_udata);
+static H5B_ins_t H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
+ hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
+ hbool_t *rt_key_changed, haddr_t *new_node /*out*/);
+static H5B_ins_t H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
+ hbool_t *lt_key_changed, void *_udata, void *_rt_key,
+ hbool_t *rt_key_changed);
+static herr_t H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
+static herr_t H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
+static herr_t H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *key, const void *udata);
/* Chunked layout indexing callbacks */
-static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info,
- const H5S_t *space, haddr_t dset_ohdr_addr);
-static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
static hbool_t H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata);
-static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata);
-static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_cb_func_t chunk_cb, void *chunk_udata);
-static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_common_ud_t *udata);
-static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst, hid_t dxpl_id);
-static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info,
- hsize_t *size);
+static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst,
+ hid_t dxpl_id);
+static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
static herr_t H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage,
- FILE *stream);
+static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
-
/*********************/
/* Package Variables */
/*********************/
/* v1 B-tree indexed chunk I/O ops */
-const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
- H5D__btree_idx_init,
- H5D__btree_idx_create,
- H5D__btree_idx_is_space_alloc,
- H5D__btree_idx_insert,
- H5D__btree_idx_get_addr,
- NULL,
- H5D__btree_idx_iterate,
- H5D__btree_idx_remove,
- H5D__btree_idx_delete,
- H5D__btree_idx_copy_setup,
- H5D__btree_idx_copy_shutdown,
- H5D__btree_idx_size,
- H5D__btree_idx_reset,
- H5D__btree_idx_dump,
- H5D__btree_idx_dest
-}};
-
+const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {
+ {H5D__btree_idx_init, H5D__btree_idx_create, H5D__btree_idx_is_space_alloc, H5D__btree_idx_insert,
+ H5D__btree_idx_get_addr, NULL, H5D__btree_idx_iterate, H5D__btree_idx_remove, H5D__btree_idx_delete,
+ H5D__btree_idx_copy_setup, H5D__btree_idx_copy_shutdown, H5D__btree_idx_size, H5D__btree_idx_reset,
+ H5D__btree_idx_dump, H5D__btree_idx_dest}};
/*****************************/
/* Library Private Variables */
@@ -179,29 +153,27 @@ const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
/* inherits B-tree like properties from H5B */
H5B_class_t H5B_BTREE[1] = {{
- H5B_CHUNK_ID, /*id */
- sizeof(H5D_btree_key_t), /*sizeof_nkey */
- H5D__btree_get_shared, /*get_shared */
- H5D__btree_new_node, /*new */
- H5D__btree_cmp2, /*cmp2 */
- H5D__btree_cmp3, /*cmp3 */
- H5D__btree_found, /*found */
- H5D__btree_insert, /*insert */
- FALSE, /*follow min branch? */
- FALSE, /*follow max branch? */
- H5B_LEFT, /*critical key */
- H5D__btree_remove, /*remove */
- H5D__btree_decode_key, /*decode */
- H5D__btree_encode_key, /*encode */
- H5D__btree_debug_key /*debug */
+ H5B_CHUNK_ID, /*id */
+ sizeof(H5D_btree_key_t), /*sizeof_nkey */
+ H5D__btree_get_shared, /*get_shared */
+ H5D__btree_new_node, /*new */
+ H5D__btree_cmp2, /*cmp2 */
+ H5D__btree_cmp3, /*cmp3 */
+ H5D__btree_found, /*found */
+ H5D__btree_insert, /*insert */
+ FALSE, /*follow min branch? */
+ FALSE, /*follow max branch? */
+ H5B_LEFT, /*critical key */
+ H5D__btree_remove, /*remove */
+ H5D__btree_decode_key, /*decode */
+ H5D__btree_encode_key, /*encode */
+ H5D__btree_debug_key /*debug */
}};
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_get_shared
*
@@ -220,7 +192,7 @@ H5B_class_t H5B_BTREE[1] = {{
static H5RC_t *
H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
{
- const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *) _udata;
+ const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *)_udata;
FUNC_ENTER_STATIC_NOERR
@@ -233,7 +205,6 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared)
} /* end H5D__btree_get_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_new_node
*
@@ -253,15 +224,14 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
- void *_lt_key, void *_udata, void *_rt_key,
- haddr_t *addr_p/*out*/)
+H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key,
+ haddr_t *addr_p /*out*/)
{
- H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
- H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
- H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *) _udata;
- unsigned u;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
+ H5D_btree_key_t *rt_key = (H5D_btree_key_t *)_rt_key;
+ H5D_chunk_ud_t * udata = (H5D_chunk_ud_t *)_udata;
+ unsigned u;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -276,7 +246,7 @@ H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
/* Allocate new storage */
HDassert(udata->nbytes > 0);
H5_CHECK_OVERFLOW(udata->nbytes, uint32_t, hsize_t);
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
+ if (HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "couldn't allocate new file storage")
udata->addr = *addr_p;
@@ -284,30 +254,28 @@ H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
* The left key describes the storage of the UDATA chunk being
* inserted into the tree.
*/
- lt_key->nbytes = udata->nbytes;
+ lt_key->nbytes = udata->nbytes;
lt_key->filter_mask = udata->filter_mask;
- for(u = 0; u < udata->common.layout->ndims; u++)
+ for (u = 0; u < udata->common.layout->ndims; u++)
lt_key->offset[u] = udata->common.offset[u];
/*
* The right key might already be present. If not, then add a zero-width
* chunk.
*/
- if(H5B_INS_LEFT != op) {
- rt_key->nbytes = 0;
+ if (H5B_INS_LEFT != op) {
+ rt_key->nbytes = 0;
rt_key->filter_mask = 0;
- for(u = 0; u < udata->common.layout->ndims; u++) {
- HDassert(udata->common.offset[u] + udata->common.layout->dim[u] >
- udata->common.offset[u]);
+ for (u = 0; u < udata->common.layout->ndims; u++) {
+ HDassert(udata->common.offset[u] + udata->common.layout->dim[u] > udata->common.offset[u]);
rt_key->offset[u] = udata->common.offset[u] + udata->common.layout->dim[u];
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_new_node() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_cmp2
*
@@ -330,10 +298,10 @@ done:
static int
H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
{
- H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
- H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
- H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
- int ret_value;
+ H5D_btree_key_t * lt_key = (H5D_btree_key_t *)_lt_key;
+ H5D_btree_key_t * rt_key = (H5D_btree_key_t *)_rt_key;
+ H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *)_udata;
+ int ret_value = -1; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -348,7 +316,6 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_cmp2() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_cmp3
*
@@ -379,10 +346,10 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
static int
H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
{
- H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
- H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
- H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
- int ret_value = 0;
+ H5D_btree_key_t * lt_key = (H5D_btree_key_t *)_lt_key;
+ H5D_btree_key_t * rt_key = (H5D_btree_key_t *)_rt_key;
+ H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *)_udata;
+ int ret_value = 0;
FUNC_ENTER_STATIC_NOERR
@@ -397,26 +364,24 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
/* slightly odd way the library initializes the right-most node in the */
/* indexed storage B-tree... */
/* (Dump the B-tree with h5debug to look at it) -QAK */
- if(udata->layout->ndims == 2) {
- if(udata->offset[0] > rt_key->offset[0])
+ if (udata->layout->ndims == 2) {
+ if (udata->offset[0] > rt_key->offset[0])
ret_value = 1;
- else if(udata->offset[0] == rt_key->offset[0] &&
- udata->offset[1] >= rt_key->offset[1])
+ else if (udata->offset[0] == rt_key->offset[0] && udata->offset[1] >= rt_key->offset[1])
ret_value = 1;
- else if(udata->offset[0] < lt_key->offset[0])
+ else if (udata->offset[0] < lt_key->offset[0])
ret_value = (-1);
} /* end if */
else {
- if(H5VM_vector_ge_u(udata->layout->ndims, udata->offset, rt_key->offset))
+ if (H5VM_vector_ge_u(udata->layout->ndims, udata->offset, rt_key->offset))
ret_value = 1;
- else if(H5VM_vector_lt_u(udata->layout->ndims, udata->offset, lt_key->offset))
+ else if (H5VM_vector_lt_u(udata->layout->ndims, udata->offset, lt_key->offset))
ret_value = (-1);
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_cmp3() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_found
*
@@ -441,15 +406,14 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static htri_t
H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, const void *_lt_key,
- void *_udata)
+ void *_udata)
{
- H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *) _udata;
- const H5D_btree_key_t *lt_key = (const H5D_btree_key_t *) _lt_key;
- unsigned u;
- htri_t ret_value = TRUE; /* Return value */
+ H5D_chunk_ud_t * udata = (H5D_chunk_ud_t *)_udata;
+ const H5D_btree_key_t *lt_key = (const H5D_btree_key_t *)_lt_key;
+ unsigned u;
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -460,21 +424,20 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t
HDassert(lt_key);
/* Is this *really* the requested chunk? */
- for(u = 0; u < udata->common.layout->ndims; u++)
- if(udata->common.offset[u] >= lt_key->offset[u] + udata->common.layout->dim[u])
+ for (u = 0; u < udata->common.layout->ndims; u++)
+ if (udata->common.offset[u] >= lt_key->offset[u] + udata->common.layout->dim[u])
HGOTO_DONE(FALSE)
/* Initialize return values */
HDassert(lt_key->nbytes > 0);
- udata->addr = addr;
- udata->nbytes = lt_key->nbytes;
+ udata->addr = addr;
+ udata->nbytes = lt_key->nbytes;
udata->filter_mask = lt_key->filter_mask;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_found() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_insert
*
@@ -503,21 +466,18 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static H5B_ins_t
-H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
- hbool_t *lt_key_changed,
- void *_md_key, void *_udata, void *_rt_key,
- hbool_t H5_ATTR_UNUSED *rt_key_changed,
- haddr_t *new_node_p/*out*/)
+H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed,
+ void *_md_key, void *_udata, void *_rt_key, hbool_t H5_ATTR_UNUSED *rt_key_changed,
+ haddr_t *new_node_p /*out*/)
{
- H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
- H5D_btree_key_t *md_key = (H5D_btree_key_t *) _md_key;
- H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
- H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *) _udata;
- int cmp;
- unsigned u;
- H5B_ins_t ret_value;
+ H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
+ H5D_btree_key_t *md_key = (H5D_btree_key_t *)_md_key;
+ H5D_btree_key_t *rt_key = (H5D_btree_key_t *)_rt_key;
+ H5D_chunk_ud_t * udata = (H5D_chunk_ud_t *)_udata;
+ int cmp;
+ unsigned u;
+ H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
FUNC_ENTER_STATIC
@@ -534,18 +494,17 @@ H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
cmp = H5D__btree_cmp3(lt_key, udata, rt_key);
HDassert(cmp <= 0);
- if(cmp < 0) {
+ if (cmp < 0) {
/* Negative indices not supported yet */
HGOTO_ERROR(H5E_STORAGE, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error")
-
- } else if(H5VM_vector_eq_u(udata->common.layout->ndims,
- udata->common.offset, lt_key->offset) &&
- lt_key->nbytes > 0) {
+ }
+ else if (H5VM_vector_eq_u(udata->common.layout->ndims, udata->common.offset, lt_key->offset) &&
+ lt_key->nbytes > 0) {
/*
* Already exists. If the new size is not the same as the old size
* then we should reallocate storage.
*/
- if(lt_key->nbytes != udata->nbytes) {
+ if (lt_key->nbytes != udata->nbytes) {
/* Currently, the old chunk data is "thrown away" after the space is reallocated,
* so avoid data copy in H5MF_realloc() call by just free'ing the space and
* allocating new space.
@@ -556,40 +515,39 @@ H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
* QAK - 11/19/2002
*/
#ifdef OLD_WAY
- if(HADDR_UNDEF == (*new_node_p = H5MF_realloc(f, H5FD_MEM_DRAW, addr,
- (hsize_t)lt_key->nbytes, (hsize_t)udata->nbytes)))
+ if (HADDR_UNDEF == (*new_node_p = H5MF_realloc(f, H5FD_MEM_DRAW, addr, (hsize_t)lt_key->nbytes,
+ (hsize_t)udata->nbytes)))
HGOTO_ERROR(H5E_STORAGE, H5E_NOSPACE, H5B_INS_ERROR, "unable to reallocate chunk storage")
-#else /* OLD_WAY */
+#else /* OLD_WAY */
H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes) < 0)
HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk")
H5_CHECK_OVERFLOW(udata->nbytes, uint32_t, hsize_t);
- if(HADDR_UNDEF == (*new_node_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
+ if (HADDR_UNDEF == (*new_node_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
HGOTO_ERROR(H5E_STORAGE, H5E_NOSPACE, H5B_INS_ERROR, "unable to reallocate chunk")
#endif /* OLD_WAY */
- lt_key->nbytes = udata->nbytes;
+ lt_key->nbytes = udata->nbytes;
lt_key->filter_mask = udata->filter_mask;
- *lt_key_changed = TRUE;
- udata->addr = *new_node_p;
- ret_value = H5B_INS_CHANGE;
- } else {
+ *lt_key_changed = TRUE;
+ udata->addr = *new_node_p;
+ ret_value = H5B_INS_CHANGE;
+ }
+ else {
udata->addr = addr;
- ret_value = H5B_INS_NOOP;
+ ret_value = H5B_INS_NOOP;
}
-
- } else if (H5VM_hyper_disjointp(udata->common.layout->ndims,
- lt_key->offset, udata->common.layout->dim,
- udata->common.offset, udata->common.layout->dim)) {
- HDassert(H5VM_hyper_disjointp(udata->common.layout->ndims,
- rt_key->offset, udata->common.layout->dim,
- udata->common.offset, udata->common.layout->dim));
+ }
+ else if (H5VM_hyper_disjointp(udata->common.layout->ndims, lt_key->offset, udata->common.layout->dim,
+ udata->common.offset, udata->common.layout->dim)) {
+ HDassert(H5VM_hyper_disjointp(udata->common.layout->ndims, rt_key->offset, udata->common.layout->dim,
+ udata->common.offset, udata->common.layout->dim));
/*
* Split this node, inserting the new new node to the right of the
* current node. The MD_KEY is where the split occurs.
*/
- md_key->nbytes = udata->nbytes;
+ md_key->nbytes = udata->nbytes;
md_key->filter_mask = udata->filter_mask;
- for(u = 0; u < udata->common.layout->ndims; u++) {
+ for (u = 0; u < udata->common.layout->ndims; u++) {
HDassert(0 == udata->common.offset[u] % udata->common.layout->dim[u]);
md_key->offset[u] = udata->common.offset[u];
} /* end for */
@@ -598,12 +556,12 @@ H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
* Allocate storage for the new chunk
*/
H5_CHECK_OVERFLOW(udata->nbytes, uint32_t, hsize_t);
- if(HADDR_UNDEF == (*new_node_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
+ if (HADDR_UNDEF == (*new_node_p = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, (hsize_t)udata->nbytes)))
HGOTO_ERROR(H5E_STORAGE, H5E_NOSPACE, H5B_INS_ERROR, "file allocation failed")
udata->addr = *new_node_p;
- ret_value = H5B_INS_RIGHT;
-
- } else {
+ ret_value = H5B_INS_RIGHT;
+ }
+ else {
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error")
}
@@ -611,7 +569,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_remove
*
@@ -619,28 +576,24 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* March 28, 2002
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static H5B_ins_t
-H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */ ,
- hbool_t *lt_key_changed /*out */ ,
- void H5_ATTR_UNUSED * _udata /*in,out */ ,
- void H5_ATTR_UNUSED * _rt_key /*in,out */ ,
- hbool_t *rt_key_changed /*out */ )
+H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */,
+ hbool_t *lt_key_changed /*out */, void H5_ATTR_UNUSED *_udata /*in,out */,
+ void H5_ATTR_UNUSED *_rt_key /*in,out */, hbool_t *rt_key_changed /*out */)
{
- H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
- H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
+ H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
+ H5B_ins_t ret_value = H5B_INS_REMOVE; /* Return value */
FUNC_ENTER_STATIC
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes) < 0)
HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk")
/* Mark keys as unchanged */
@@ -651,7 +604,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_decode_key
*
@@ -667,9 +619,9 @@ done:
static herr_t
H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
- H5D_btree_key_t *key = (H5D_btree_key_t *) _key;
- size_t ndims;
- unsigned u;
+ H5D_btree_key_t *key = (H5D_btree_key_t *)_key;
+ size_t ndims;
+ unsigned u;
FUNC_ENTER_STATIC_NOERR
@@ -683,13 +635,12 @@ H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key
/* decode */
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
- for(u = 0; u < ndims; u++)
- UINT64DECODE(raw, key->offset[u]);
+ for (u = 0; u < ndims; u++)
+ UINT64DECODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_decode_key() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_encode_key
*
@@ -706,8 +657,8 @@ static herr_t
H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
- size_t ndims;
- unsigned u;
+ size_t ndims;
+ unsigned u;
FUNC_ENTER_STATIC_NOERR
@@ -721,13 +672,12 @@ H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key
/* encode */
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
- for(u = 0; u < ndims; u++)
- UINT64ENCODE(raw, key->offset[u]);
+ for (u = 0; u < ndims; u++)
+ UINT64ENCODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_encode_key() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_debug_key
*
@@ -740,14 +690,12 @@ H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
-H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
- const void *_udata)
+H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, const void *_udata)
{
- const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
- const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
- unsigned u;
+ const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
+ const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
+ unsigned u;
FUNC_ENTER_STATIC_NOERR
@@ -756,14 +704,13 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes);
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
- for(u = 0; u < udata->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", key->offset[u]);
+ for (u = 0; u < udata->ndims; u++)
+ HDfprintf(stream, "%s%Hd", u ? ", " : "", key->offset[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_debug_key() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_shared_create
*
@@ -779,33 +726,32 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
static herr_t
H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims)
{
- H5B_shared_t *shared; /* Shared B-tree node info */
- size_t sizeof_rkey; /* Size of raw (disk) key */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_shared_t *shared; /* Shared B-tree node info */
+ size_t sizeof_rkey; /* Size of raw (disk) key */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Set the raw key size */
- sizeof_rkey = 4 + /*storage size */
- 4 + /*filter mask */
- ndims * 8; /*dimension indices */
+ sizeof_rkey = 4 + /*storage size */
+ 4 + /*filter mask */
+ ndims * 8; /*dimension indices */
/* Allocate & initialize global info for the shared structure */
- if(NULL == (shared = H5B_shared_new(f, H5B_BTREE, sizeof_rkey)))
- HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info")
+ if (NULL == (shared = H5B_shared_new(f, H5B_BTREE, sizeof_rkey)))
+ HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info")
/* Set up the "local" information for this dataset's chunks */
- /* <none> */
+ /* <none> */
/* Make shared B-tree info reference counted */
- if(NULL == (store->u.btree.shared = H5RC_create(shared, H5B_shared_free)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info")
+ if (NULL == (store->u.btree.shared = H5RC_create(shared, H5B_shared_free)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_shared_create() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_init
*
@@ -820,9 +766,9 @@ done:
*/
static herr_t
H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUSED *space,
- haddr_t dset_ohdr_addr)
+ haddr_t dset_ohdr_addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -837,14 +783,13 @@ H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUS
idx_info->storage->u.btree.dset_ohdr_addr = dset_ohdr_addr;
/* Allocate the shared structure */
- if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
+ if (H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_create
*
@@ -866,8 +811,8 @@ done:
static herr_t
H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
{
- H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -880,18 +825,18 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize "user" data for B-tree callbacks, etc. */
- udata.layout = idx_info->layout;
+ udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
/* Create the v1 B-tree for the chunk index */
- if(H5B_create(idx_info->f, idx_info->dxpl_id, H5B_BTREE, &udata, &(idx_info->storage->idx_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create B-tree")
+ if (H5B_create(idx_info->f, idx_info->dxpl_id, H5B_BTREE, &udata,
+ &(idx_info->storage->idx_addr) /*out*/) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create B-tree")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_create() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_is_space_alloc
*
@@ -907,7 +852,7 @@ done:
static hbool_t
H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- hbool_t ret_value; /* Return value */
+ hbool_t ret_value; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -920,12 +865,10 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_is_space_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_insert
*
- * Purpose: Create the chunk it if it doesn't exist, or reallocate the
- * chunk if its size changed.
+ * Purpose: Insert chunk entry into the indexing structure.
*
* Return: Non-negative on success/Negative on failure
*
@@ -937,7 +880,7 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
static herr_t
H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -953,14 +896,13 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
* Create the chunk it if it doesn't exist, or reallocate the chunk if
* its size changed.
*/
- if(H5B_insert(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
+ if (H5B_insert(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to allocate chunk")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__btree_idx_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_get_addr
*
@@ -978,7 +920,7 @@ done:
static herr_t
H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -992,14 +934,13 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
HDassert(udata);
/* Go get the chunk information from the B-tree */
- if(H5B_find(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
+ if (H5B_find(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__btree_idx_get_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_iterate_cb
*
@@ -1015,16 +956,14 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static int
-H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- const void *_lt_key, haddr_t addr, const void H5_ATTR_UNUSED *_rt_key,
- void *_udata)
+H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_lt_key,
+ haddr_t addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- H5D_btree_it_ud_t *udata = (H5D_btree_it_ud_t *)_udata; /* User data */
- const H5D_btree_key_t *lt_key = (const H5D_btree_key_t *)_lt_key; /* B-tree key for chunk */
- H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
- int ret_value; /* Return value */
+ H5D_btree_it_ud_t * udata = (H5D_btree_it_ud_t *)_udata; /* User data */
+ const H5D_btree_key_t *lt_key = (const H5D_btree_key_t *)_lt_key; /* B-tree key for chunk */
+ H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1041,13 +980,12 @@ H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
chunk_rec.chunk_addr = addr;
/* Make "generic chunk" callback */
- if((ret_value = (udata->cb)(&chunk_rec, udata->udata)) < 0)
+ if ((ret_value = (udata->cb)(&chunk_rec, udata->udata)) < 0)
HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__btree_idx_iterate_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_iterate
*
@@ -1062,11 +1000,10 @@ H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
*-------------------------------------------------------------------------
*/
static int
-H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_cb_func_t chunk_cb, void *chunk_udata)
+H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, void *chunk_udata)
{
- H5D_btree_it_ud_t udata; /* User data for B-tree iterator callback */
- int ret_value; /* Return value */
+ H5D_btree_it_ud_t udata; /* User data for B-tree iterator callback */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1081,19 +1018,19 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
/* Initialize userdata */
HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = idx_info->layout;
+ udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- udata.cb = chunk_cb;
- udata.udata = chunk_udata;
+ udata.cb = chunk_cb;
+ udata.udata = chunk_udata;
/* Iterate over existing chunks */
- if((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, H5D__btree_idx_iterate_cb, &udata)) < 0)
+ if ((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr,
+ H5D__btree_idx_iterate_cb, &udata)) < 0)
HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over chunk B-tree");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_remove
*
@@ -1109,7 +1046,7 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
static herr_t
H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1124,14 +1061,13 @@ H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
/* Remove the chunk from the v1 B-tree index and release the space for the
* chunk (in the B-tree callback).
*/
- if(H5B_remove(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
+ if (H5B_remove(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__btree_idx_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_delete
*
@@ -1149,7 +1085,7 @@ done:
static herr_t
H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1161,30 +1097,30 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
HDassert(idx_info->storage);
/* Check if the index data structure has been allocated */
- if(H5F_addr_defined(idx_info->storage->idx_addr)) {
- H5O_storage_chunk_t tmp_storage; /* Local copy of storage info */
- H5D_chunk_common_ud_t udata; /* User data for B-tree operations */
+ if (H5F_addr_defined(idx_info->storage->idx_addr)) {
+ H5O_storage_chunk_t tmp_storage; /* Local copy of storage info */
+ H5D_chunk_common_ud_t udata; /* User data for B-tree operations */
/* Set up temporary chunked storage info */
tmp_storage = *idx_info->storage;
/* Set up the shared structure */
- if(H5D__btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
+ if (H5D__btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
/* Set up B-tree user data */
HDmemset(&udata, 0, sizeof udata);
- udata.layout = idx_info->layout;
+ udata.layout = idx_info->layout;
udata.storage = &tmp_storage;
/* Delete entire B-tree */
- if(H5B_delete(idx_info->f, idx_info->dxpl_id, H5B_BTREE, tmp_storage.idx_addr, &udata) < 0)
+ if (H5B_delete(idx_info->f, idx_info->dxpl_id, H5B_BTREE, tmp_storage.idx_addr, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk B-tree")
/* Release the shared B-tree page */
- if(NULL == tmp_storage.u.btree.shared)
+ if (NULL == tmp_storage.u.btree.shared)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "ref-counted page nil")
- if(H5RC_DEC(tmp_storage.u.btree.shared) < 0)
+ if (H5RC_DEC(tmp_storage.u.btree.shared) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
} /* end if */
@@ -1192,7 +1128,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_copy_setup
*
@@ -1206,10 +1141,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst)
+H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_idx_info_t *idx_info_dst)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1226,13 +1160,14 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Create shared B-tree info for each file */
- if(H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
+ if (H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for source shared B-tree info")
- if(H5D__btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for destination shared B-tree info")
+ if (H5D__btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
+ "can't create wrapper for destination shared B-tree info")
/* Create the root of the B-tree that describes chunked storage in the dest. file */
- if(H5D__btree_idx_create(idx_info_dst) < 0)
+ if (H5D__btree_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
@@ -1240,7 +1175,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_copy_setup() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_copy_shutdown
*
@@ -1254,11 +1188,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst,
- hid_t H5_ATTR_UNUSED dxpl_id)
+H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1266,16 +1199,15 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
HDassert(storage_dst);
/* Decrement refcount on shared B-tree info */
- if(H5RC_DEC(storage_src->u.btree.shared) < 0)
+ if (H5RC_DEC(storage_src->u.btree.shared) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page")
- if(H5RC_DEC(storage_dst->u.btree.shared) < 0)
+ if (H5RC_DEC(storage_dst->u.btree.shared) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_copy_shutdown() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_size
*
@@ -1292,10 +1224,10 @@ done:
static herr_t
H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
{
- H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */
- H5B_info_t bt_info; /* B-tree info */
- hbool_t shared_init = FALSE; /* Whether shared B-tree info is initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */
+ H5B_info_t bt_info; /* B-tree info */
+ hbool_t shared_init = FALSE; /* Whether shared B-tree info is initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1308,34 +1240,34 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
HDassert(index_size);
/* Initialize the shared info for the B-tree traversal */
- if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
+ if (H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
shared_init = TRUE;
/* Initialize B-tree node user-data */
HDmemset(&udata, 0, sizeof udata);
- udata.layout = idx_info->layout;
+ udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
/* Get metadata information for B-tree */
- if(H5B_get_info(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, &bt_info, NULL, &udata) < 0)
+ if (H5B_get_info(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, &bt_info, NULL,
+ &udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to iterate over chunk B-tree")
/* Set the size of the B-tree */
*index_size = bt_info.size;
done:
- if(shared_init) {
- if(NULL == idx_info->storage->u.btree.shared)
+ if (shared_init) {
+ if (NULL == idx_info->storage->u.btree.shared)
HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil")
- if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0)
+ if (H5RC_DEC(idx_info->storage->u.btree.shared) < 0)
HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_size() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_reset
*
@@ -1356,14 +1288,13 @@ H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
HDassert(storage);
/* Reset index info */
- if(reset_addr)
- storage->idx_addr = HADDR_UNDEF;
+ if (reset_addr)
+ storage->idx_addr = HADDR_UNDEF;
storage->u.btree.shared = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_idx_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_dump
*
@@ -1389,7 +1320,6 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_idx_dump() */
-
/*-------------------------------------------------------------------------
* Function: H5D__btree_idx_dest
*
@@ -1405,7 +1335,7 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
static herr_t
H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1416,16 +1346,15 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
HDassert(idx_info->storage);
/* Free the raw B-tree node buffer */
- if(NULL == idx_info->storage->u.btree.shared)
+ if (NULL == idx_info->storage->u.btree.shared)
HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil")
- if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
+ if (H5RC_DEC(idx_info->storage->u.btree.shared) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_idx_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5D_btree_debug
*
@@ -1439,13 +1368,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
- int fwidth, unsigned ndims)
+H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, unsigned ndims)
{
- H5D_btree_dbg_t udata; /* User data for B-tree callback */
- H5O_storage_chunk_t storage; /* Storage information for B-tree callback */
- hbool_t shared_init = FALSE; /* Whether B-tree shared info is initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_btree_dbg_t udata; /* User data for B-tree callback */
+ H5O_storage_chunk_t storage; /* Storage information for B-tree callback */
+ hbool_t shared_init = FALSE; /* Whether B-tree shared info is initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1454,29 +1382,27 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent
storage.idx_type = H5D_CHUNK_BTREE;
/* Allocate the shared structure */
- if(H5D__btree_shared_create(f, &storage, ndims) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
+ if (H5D__btree_shared_create(f, &storage, ndims) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
shared_init = TRUE;
/* Set up user data for callback */
- udata.common.layout = NULL;
+ udata.common.layout = NULL;
udata.common.storage = &storage;
- udata.common.offset = NULL;
- udata.ndims = ndims;
+ udata.common.offset = NULL;
+ udata.ndims = ndims;
/* Dump the records for the B-tree */
(void)H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_BTREE, &udata);
done:
- if(shared_init) {
+ if (shared_init) {
/* Free the raw B-tree node buffer */
- if(NULL == storage.u.btree.shared)
+ if (NULL == storage.u.btree.shared)
HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil")
- else
- if(H5RC_DEC(storage.u.btree.shared) < 0)
- HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
+ else if (H5RC_DEC(storage.u.btree.shared) < 0)
+ HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_btree_debug() */
-
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 4cabd72..be02c09 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -6,16 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, April 24, 2008
*
* Purpose: Abstract indexed (chunked) I/O functions. The logical
- * multi-dimensional data space is regularly partitioned into
+ * multi-dimensional dataspace is regularly partitioned into
* same-sized "chunks", the first of which is aligned with the
* logical origin. The chunks are indexed by different methods,
* that map a chunk index to disk address. Each chunk can be
@@ -42,23 +42,21 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#ifdef H5_HAVE_PARALLEL
-#include "H5ACprivate.h" /* Metadata cache */
-#endif /* H5_HAVE_PARALLEL */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vector and array functions */
-
+#include "H5ACprivate.h" /* Metadata cache */
+#endif /* H5_HAVE_PARALLEL */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
/* Local Macros */
@@ -66,8 +64,9 @@
/* Macros for iterating over chunks to operate on */
#define H5D_CHUNK_GET_FIRST_NODE(map) (map->use_single ? (H5SL_node_t *)(1) : H5SL_first(map->sel_chunks))
-#define H5D_CHUNK_GET_NODE_INFO(map, node) (map->use_single ? map->single_chunk_info : (H5D_chunk_info_t *)H5SL_item(node))
-#define H5D_CHUNK_GET_NEXT_NODE(map, node) (map->use_single ? (H5SL_node_t *)NULL : H5SL_next(node))
+#define H5D_CHUNK_GET_NODE_INFO(map, node) \
+ (map->use_single ? map->single_chunk_info : (H5D_chunk_info_t *)H5SL_item(node))
+#define H5D_CHUNK_GET_NEXT_NODE(map, node) (map->use_single ? (H5SL_node_t *)NULL : H5SL_next(node))
/*
* Feature: If this constant is defined then every cache preemption and load
@@ -95,94 +94,94 @@
/*#define H5D_CHUNK_DEBUG */
-
/******************/
/* Local Typedefs */
/******************/
/* Callback info for iteration to prune chunks */
typedef struct H5D_chunk_it_ud1_t {
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
- const H5D_chk_idx_info_t *idx_info; /* Chunked index info */
- const H5D_io_info_t *io_info; /* I/O info for dataset operation */
- const hsize_t *space_dim; /* New dataset dimensions */
- const hbool_t *shrunk_dim; /* Dimensions which have been shrunk */
- H5S_t *chunk_space; /* Dataspace for a chunk */
- uint32_t elmts_per_chunk;/* Elements in chunk */
- hsize_t *hyper_start; /* Starting location of hyperslab */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init; /* Whether the fill value buffer has been initialized */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ const H5D_chk_idx_info_t *idx_info; /* Chunked index info */
+ const H5D_io_info_t * io_info; /* I/O info for dataset operation */
+ const hsize_t * space_dim; /* New dataset dimensions */
+ const hbool_t * shrunk_dim; /* Dimensions which have been shrunk */
+ H5S_t * chunk_space; /* Dataspace for a chunk */
+ uint32_t elmts_per_chunk; /* Elements in chunk */
+ hsize_t * hyper_start; /* Starting location of hyperslab */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init; /* Whether the fill value buffer has been initialized */
} H5D_chunk_it_ud1_t;
-/* Callback info for iteration to obtain chunk address and the index of the chunk for all chunks in the B-tree. */
+/* Callback info for iteration to obtain chunk address and the index of the chunk for all chunks in the
+ * B-tree. */
typedef struct H5D_chunk_it_ud2_t {
/* down */
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
/* up */
- haddr_t *chunk_addr; /* Array of chunk addresses to fill in */
+ haddr_t *chunk_addr; /* Array of chunk addresses to fill in */
} H5D_chunk_it_ud2_t;
/* Callback info for iteration to copy data */
typedef struct H5D_chunk_it_ud3_t {
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
- H5F_t *file_src; /* Source file for copy */
- H5D_chk_idx_info_t *idx_info_dst; /* Dest. chunk index info object */
- void *buf; /* Buffer to hold chunk data for read/write */
- void *bkg; /* Buffer for background information during type conversion */
- size_t buf_size; /* Buffer size */
- hbool_t do_convert; /* Whether to perform type conversions */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ H5F_t * file_src; /* Source file for copy */
+ H5D_chk_idx_info_t * idx_info_dst; /* Dest. chunk index info object */
+ void * buf; /* Buffer to hold chunk data for read/write */
+ void * bkg; /* Buffer for background information during type conversion */
+ size_t buf_size; /* Buffer size */
+ hbool_t do_convert; /* Whether to perform type conversions */
/* needed for converting variable-length data */
- hid_t tid_src; /* Datatype ID for source datatype */
- hid_t tid_dst; /* Datatype ID for destination datatype */
- hid_t tid_mem; /* Datatype ID for memory datatype */
- const H5T_t *dt_src; /* Source datatype */
- H5T_path_t *tpath_src_mem; /* Datatype conversion path from source file to memory */
- H5T_path_t *tpath_mem_dst; /* Datatype conversion path from memory to dest. file */
- void *reclaim_buf; /* Buffer for reclaiming data */
- size_t reclaim_buf_size; /* Reclaim buffer size */
- uint32_t nelmts; /* Number of elements in buffer */
- H5S_t *buf_space; /* Dataspace describing buffer */
+ hid_t tid_src; /* Datatype ID for source datatype */
+ hid_t tid_dst; /* Datatype ID for destination datatype */
+ hid_t tid_mem; /* Datatype ID for memory datatype */
+ const H5T_t *dt_src; /* Source datatype */
+ H5T_path_t * tpath_src_mem; /* Datatype conversion path from source file to memory */
+ H5T_path_t * tpath_mem_dst; /* Datatype conversion path from memory to dest. file */
+ void * reclaim_buf; /* Buffer for reclaiming data */
+ size_t reclaim_buf_size; /* Reclaim buffer size */
+ uint32_t nelmts; /* Number of elements in buffer */
+ H5S_t * buf_space; /* Dataspace describing buffer */
/* needed for compressed variable-length data */
- const H5O_pline_t *pline; /* Filter pipeline */
+ const H5O_pline_t *pline; /* Filter pipeline */
/* needed for copy object pointed by refs */
- H5O_copy_t *cpy_info; /* Copy options */
+ H5O_copy_t *cpy_info; /* Copy options */
/* needed for getting raw data from chunk cache */
- hbool_t chunk_in_cache;
- uint8_t *chunk; /* the unfiltered chunk data */
+ hbool_t chunk_in_cache;
+ uint8_t *chunk; /* the unfiltered chunk data */
} H5D_chunk_it_ud3_t;
/* Callback info for iteration to dump index */
typedef struct H5D_chunk_it_ud4_t {
- FILE *stream; /* Output stream */
- hbool_t header_displayed; /* Node's header is displayed? */
- unsigned ndims; /* Number of dimensions for chunk/dataset */
+ FILE * stream; /* Output stream */
+ hbool_t header_displayed; /* Node's header is displayed? */
+ unsigned ndims; /* Number of dimensions for chunk/dataset */
} H5D_chunk_it_ud4_t;
/* Callback info for nonexistent readvv operation */
typedef struct H5D_chunk_readvv_ud_t {
- unsigned char *rbuf; /* Read buffer to initialize */
- const H5D_t *dset; /* Dataset to operate on */
- hid_t dxpl_id; /* DXPL for operation */
+ unsigned char *rbuf; /* Read buffer to initialize */
+ const H5D_t * dset; /* Dataset to operate on */
+ hid_t dxpl_id; /* DXPL for operation */
} H5D_chunk_readvv_ud_t;
/* Callback info for file selection iteration */
typedef struct H5D_chunk_file_iter_ud_t {
- H5D_chunk_map_t *fm; /* File->memory chunk mapping info */
+ H5D_chunk_map_t *fm; /* File->memory chunk mapping info */
#ifdef H5_HAVE_PARALLEL
- const H5D_io_info_t *io_info; /* I/O info for operation */
-#endif /* H5_HAVE_PARALLEL */
+ const H5D_io_info_t *io_info; /* I/O info for operation */
+#endif /* H5_HAVE_PARALLEL */
} H5D_chunk_file_iter_ud_t;
#ifdef H5_HAVE_PARALLEL
/* information to construct a collective I/O operation for filling chunks */
typedef struct H5D_chunk_coll_info_t {
- size_t num_io; /* Number of write operations */
- haddr_t *addr; /* array of the file addresses of the write operation */
+ size_t num_io; /* Number of write operations */
+ haddr_t *addr; /* array of the file addresses of the write operation */
} H5D_chunk_coll_info_t;
#endif /* H5_HAVE_PARALLEL */
@@ -192,105 +191,75 @@ typedef struct H5D_chunk_coll_info_t {
/* Chunked layout operation callbacks */
static herr_t H5D__chunk_construct(H5F_t *f, H5D_t *dset);
-static herr_t H5D__chunk_io_init(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, H5D_chunk_map_t *fm);
-static herr_t H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm);
-static herr_t H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm);
+static herr_t H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *fm);
+static herr_t H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+static herr_t H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__chunk_flush(H5D_t *dset, hid_t dxpl_id);
static herr_t H5D__chunk_io_term(const H5D_chunk_map_t *fm);
static herr_t H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last);
/* "Nonexistent" layout operation callback */
-static ssize_t
-H5D__nonexistent_readvv(const H5D_io_info_t *io_info,
- size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static ssize_t H5D__nonexistent_readvv(const H5D_io_info_t *io_info, size_t chunk_max_nseq,
+ size_t *chunk_curr_seq, size_t chunk_len_arr[],
+ hsize_t chunk_offset_arr[], size_t mem_max_nseq, size_t *mem_curr_seq,
+ size_t mem_len_arr[], hsize_t mem_offset_arr[]);
/* Helper routines */
-static herr_t H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims,
- const hsize_t *curr_dims);
-static void *H5D__chunk_alloc(size_t size, const H5O_pline_t *pline);
-static void *H5D__chunk_xfree(void *chk, const H5O_pline_t *pline);
-static void *H5D__chunk_realloc(void *chk, size_t size,
- const H5O_pline_t *pline);
-static herr_t H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last,
- const H5D_chunk_ud_t *udata);
-static hbool_t H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last,
- H5D_chunk_ud_t *udata);
-static herr_t H5D__free_chunk_info(void *item, void *key, void *opdata);
-static herr_t H5D__create_chunk_map_single(H5D_chunk_map_t *fm,
- const H5D_io_info_t *io_info);
-static herr_t H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm,
- const H5D_io_info_t *io_info);
-static herr_t H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm);
-static herr_t H5D__chunk_file_cb(void *elem, const H5T_t *type, unsigned ndims,
- const hsize_t *coords, void *fm);
-static herr_t H5D__chunk_mem_cb(void *elem, const H5T_t *type, unsigned ndims,
- const hsize_t *coords, void *fm);
-static herr_t H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id,
- const H5D_dxpl_cache_t *dxpl_cache, H5D_rdcc_ent_t *ent, hbool_t reset);
-static herr_t H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id,
- const H5D_dxpl_cache_t *dxpl_cache, H5D_rdcc_ent_t *ent, hbool_t flush);
-static herr_t H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id,
- const H5D_dxpl_cache_t *dxpl_cache, size_t size);
-static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata);
+static herr_t H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize_t *curr_dims);
+static void * H5D__chunk_alloc(size_t size, const H5O_pline_t *pline);
+static void * H5D__chunk_xfree(void *chk, const H5O_pline_t *pline);
+static void * H5D__chunk_realloc(void *chk, size_t size, const H5O_pline_t *pline);
+static herr_t H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *udata);
+static hbool_t H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udata);
+static herr_t H5D__free_chunk_info(void *item, void *key, void *opdata);
+static herr_t H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t *io_info);
+static herr_t H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t *io_info);
+static herr_t H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm);
+static herr_t H5D__chunk_file_cb(void *elem, const H5T_t *type, unsigned ndims, const hsize_t *coords,
+ void *fm);
+static herr_t H5D__chunk_mem_cb(void *elem, const H5T_t *type, unsigned ndims, const hsize_t *coords,
+ void *fm);
+static herr_t H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache,
+ H5D_rdcc_ent_t *ent, hbool_t reset);
+static herr_t H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache,
+ H5D_rdcc_ent_t *ent, hbool_t flush);
+static herr_t H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache,
+ size_t size);
+static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id,
- H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf);
+static herr_t H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id, H5D_chunk_coll_info_t *chunk_info,
+ size_t chunk_size, const void *fill_buf);
#endif /* H5_HAVE_PARALLEL */
-static int
-H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
+static int H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/*********************/
/* Package Variables */
/*********************/
/* Chunked storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {{
- H5D__chunk_construct,
- H5D__chunk_init,
- H5D__chunk_is_space_alloc,
- H5D__chunk_io_init,
- H5D__chunk_read,
- H5D__chunk_write,
+const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {{H5D__chunk_construct, H5D__chunk_init, H5D__chunk_is_space_alloc,
+ H5D__chunk_is_data_cached, H5D__chunk_io_init, H5D__chunk_read,
+ H5D__chunk_write,
#ifdef H5_HAVE_PARALLEL
- H5D__chunk_collective_read,
- H5D__chunk_collective_write,
+ H5D__chunk_collective_read, H5D__chunk_collective_write,
#endif /* H5_HAVE_PARALLEL */
- NULL,
- NULL,
- H5D__chunk_flush,
- H5D__chunk_io_term
-}};
-
+ NULL, NULL, H5D__chunk_flush, H5D__chunk_io_term}};
/*******************/
/* Local Variables */
/*******************/
/* "nonexistent" storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_NONEXISTENT[1] = {{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+const H5D_layout_ops_t H5D_LOPS_NONEXISTENT[1] = {{NULL, NULL, NULL, NULL, NULL, NULL, NULL,
#ifdef H5_HAVE_PARALLEL
- NULL,
- NULL,
+ NULL, NULL,
#endif /* H5_HAVE_PARALLEL */
- H5D__nonexistent_readvv,
- NULL,
- NULL,
- NULL
-}};
+ H5D__nonexistent_readvv, NULL, NULL, NULL}};
/* Declare a free list to manage the H5F_rdcc_ent_ptr_t sequence information */
H5FL_SEQ_DEFINE_STATIC(H5D_rdcc_ent_ptr_t);
@@ -304,7 +273,6 @@ H5FL_DEFINE(H5D_chunk_info_t);
/* Declare a free list to manage the chunk sequence information */
H5FL_BLK_DEFINE_STATIC(chunk);
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_direct_write
*
@@ -319,35 +287,38 @@ H5FL_BLK_DEFINE_STATIC(chunk);
*/
herr_t
H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsize_t *offset,
- uint32_t data_size, const void *buf)
+ uint32_t data_size, const void *buf)
{
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
- hsize_t chunk_idx; /* Index of chunk cache entry */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- unsigned space_ndims; /* Dataset's space rank */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ hsize_t chunk_idx; /* Index of chunk cache entry */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ const H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ unsigned space_ndims; /* Dataset's space rank */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
+ /* Sanity checks */
+ HDassert(layout->type == H5D_CHUNKED);
+
/* Allocate data space and initialize it if it hasn't been. */
- if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
+ if (!H5D__chunk_is_space_alloc(&dset->shared->layout.storage))
/* Allocate storage */
- if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_WRITE, FALSE, NULL) < 0)
+ if (H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_WRITE, FALSE, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
/* Retrieve the dataset dimensions */
space_ndims = dset->shared->layout.u.chunk.ndims - 1;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(space_ndims, offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) < 0)
+ if (H5VM_chunk_index(space_ndims, offset, layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) <
+ 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
/* Find out the file address of the chunk */
- if(H5D__chunk_lookup(dset, dxpl_id, offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
udata.filter_mask = filters;
@@ -356,13 +327,13 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz
* the 'insert' operation could resize it)
*/
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &(dset->shared->dcpl_cache.pline);
- idx_info.layout = &(dset->shared->layout.u.chunk);
+ idx_info.pline = &(dset->shared->dcpl_cache.pline);
+ idx_info.layout = &(dset->shared->layout.u.chunk);
idx_info.storage = &(dset->shared->layout.storage.u.chunk);
/* Set up the size of chunk for user data */
@@ -371,26 +342,29 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz
/* Create the chunk it if it doesn't exist, or reallocate the chunk
* if its size changed.
*/
- if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
+ if ((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk")
+ /* Cache the new chunk information */
+ H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, &udata);
+
/* Make sure the address of the chunk is returned. */
- if(!H5F_addr_defined(udata.addr))
+ if (!H5F_addr_defined(udata.addr))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined")
- }
+ }
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Evict the entry from the cache if present, but do not flush
* it to disk */
- if(UINT_MAX != udata.idx_hint)
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], FALSE) < 0)
+ if (UINT_MAX != udata.idx_hint)
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
/* Write the data to the file */
- if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0)
+ if (H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
done:
@@ -400,9 +374,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__chunk_direct_read
*
- * Purpose: Internal routine to read a chunk directly from the file.
+ * Purpose: Internal routine to read a chunk directly from the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Matthew Strong (GE Healthcare)
* 14 February 2016
@@ -410,18 +384,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset,
- uint32_t* filters, void *buf)
+H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset, uint32_t *filters, void *buf)
{
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
- unsigned space_ndims; /* Dataset's space rank */
- hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Dataset's chunk offset */
- hsize_t chunk_idx; /* Index of chunk cache entry */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ const H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ unsigned space_ndims; /* Dataset's space rank */
+ hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Dataset's chunk offset */
+ hsize_t chunk_idx; /* Index of chunk cache entry */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -437,7 +410,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset,
space_ndims = dset->shared->layout.u.chunk.ndims - 1;
/* Check if chunk storage is allocated for dataset */
- if(H5D__chunk_is_space_alloc(&(layout->storage)) == FALSE)
+ if ((H5D__chunk_is_space_alloc(&(layout->storage)) == FALSE) && !H5D__chunk_is_data_cached(dset->shared))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "storage is not initialized")
/* Initialize the chunk offset */
@@ -445,24 +418,24 @@ H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset,
chunk_offset[space_ndims] = (hsize_t)0;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(space_ndims, chunk_offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) < 0)
+ if (H5VM_chunk_index(space_ndims, chunk_offset, layout->u.chunk.dim, layout->u.chunk.down_chunks,
+ &chunk_idx) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
/* Reset fields about the chunk we are looking for */
- udata.nbytes = 0;
+ udata.nbytes = 0;
udata.filter_mask = 0;
- udata.addr = HADDR_UNDEF;
- udata.idx_hint = UINT_MAX;
+ udata.addr = HADDR_UNDEF;
+ udata.idx_hint = UINT_MAX;
/* Find out the file address of the chunk */
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Check if the requested chunk exists in the chunk cache */
- if(UINT_MAX != udata.idx_hint) {
+ if (UINT_MAX != udata.idx_hint) {
H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint];
- hbool_t flush;
+ hbool_t flush;
/* Sanity checks */
HDassert(udata.idx_hint < rdcc->nslots);
@@ -471,30 +444,30 @@ H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset,
flush = (ent->dirty == TRUE) ? TRUE : FALSE;
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Flush the chunk to disk and clear the cache entry */
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], flush) < 0)
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], flush) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
/* Reset fields about the chunk we are looking for */
- udata.nbytes = 0;
+ udata.nbytes = 0;
udata.filter_mask = 0;
- udata.addr = HADDR_UNDEF;
- udata.idx_hint = UINT_MAX;
+ udata.addr = HADDR_UNDEF;
+ udata.idx_hint = UINT_MAX;
/* Get the new file address / chunk size after flushing */
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
}
/* Make sure the address of the chunk is returned. */
- if(!H5F_addr_defined(udata.addr))
+ if (!H5F_addr_defined(udata.addr))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined")
/* Read the chunk data into the supplied buffer */
- if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, udata.nbytes, dxpl_id, buf) < 0)
+ if (H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, udata.nbytes, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
/* Return the filter mask */
@@ -507,9 +480,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_storage_size
*
- * Purpose: Internal routine to read the storage size of a chunk on disk.
+ * Purpose: Internal routine to read the storage size of a chunk on disk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Matthew Strong (GE Healthcare)
* 20 October 2016
@@ -519,16 +492,16 @@ done:
herr_t
H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, hsize_t *storage_size)
{
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
- unsigned space_ndims; /* Dataset's space rank */
- hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Dataset's chunk offset */
- hsize_t chunk_idx; /* Index of chunk cache entry */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- hbool_t flush; /* Flush cache or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ const H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ unsigned space_ndims; /* Dataset's space rank */
+ hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Dataset's chunk offset */
+ hsize_t chunk_idx; /* Index of chunk cache entry */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ hbool_t flush; /* Flush cache or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -542,7 +515,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h
/* Retrieve the dataset dimensions */
space_ndims = dset->shared->layout.u.chunk.ndims - 1;
- if(H5D__chunk_is_space_alloc(&(layout->storage)) == FALSE)
+ if (H5D__chunk_is_space_alloc(&(layout->storage)) == FALSE)
HGOTO_DONE(SUCCEED)
/* Initialize the chunk offset */
@@ -550,27 +523,27 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h
chunk_offset[space_ndims] = (hsize_t)0;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(space_ndims, chunk_offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) < 0)
+ if (H5VM_chunk_index(space_ndims, chunk_offset, layout->u.chunk.dim, layout->u.chunk.down_chunks,
+ &chunk_idx) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
/* Reset fields about the chunk we are looking for */
- udata.nbytes = 0;
- udata.addr = HADDR_UNDEF;
+ udata.nbytes = 0;
+ udata.addr = HADDR_UNDEF;
udata.idx_hint = UINT_MAX;
/* Find out the file address of the chunk */
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* The requested chunk is not in cache or on disk */
- if(!H5F_addr_defined(udata.addr) && UINT_MAX == udata.idx_hint)
+ if (!H5F_addr_defined(udata.addr) && UINT_MAX == udata.idx_hint)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk storage is not allocated")
/* Check if there are filters registered to the dataset */
- if( dset->shared->dcpl_cache.pline.nused > 0 ) {
+ if (dset->shared->dcpl_cache.pline.nused > 0) {
/* Check if the requested chunk exists in the chunk cache */
- if(UINT_MAX != udata.idx_hint) {
+ if (UINT_MAX != udata.idx_hint) {
H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint];
/* Sanity checks */
@@ -580,25 +553,25 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h
flush = (ent->dirty == TRUE) ? TRUE : FALSE;
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Flush the chunk to disk and clear the cache entry */
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], flush) < 0)
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], flush) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
/* Reset fields about the chunk we are looking for */
- udata.nbytes = 0;
- udata.addr = HADDR_UNDEF;
+ udata.nbytes = 0;
+ udata.addr = HADDR_UNDEF;
udata.idx_hint = UINT_MAX;
/* Get the new file address / chunk size after flushing */
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
}
/* Make sure the address of the chunk is returned. */
- if(!H5F_addr_defined(udata.addr))
+ if (!H5F_addr_defined(udata.addr))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined")
/* Return the chunk size on disk */
@@ -612,8 +585,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_chunk_storage_size */
-
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_set_info_real
*
@@ -629,8 +600,8 @@ done:
static herr_t
H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize_t *curr_dims)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -640,23 +611,22 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize
HDassert(curr_dims);
/* Compute the # of chunks in dataset dimensions */
- for(u = 0, layout->nchunks = 1; u < ndims; u++) {
+ for (u = 0, layout->nchunks = 1; u < ndims; u++) {
/* Round up to the next integer # of chunks, to accommodate partial chunks */
- layout->chunks[u] = ((curr_dims[u] + layout->dim[u]) - 1) / layout->dim[u];
+ layout->chunks[u] = ((curr_dims[u] + layout->dim[u]) - 1) / layout->dim[u];
/* Accumulate the # of chunks */
- layout->nchunks *= layout->chunks[u];
+ layout->nchunks *= layout->chunks[u];
} /* end for */
/* Get the "down" sizes for each dimension */
- if(H5VM_array_down(ndims, layout->chunks, layout->down_chunks) < 0)
+ if (H5VM_array_down(ndims, layout->chunks, layout->down_chunks) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info_real() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_set_info
*
@@ -672,10 +642,10 @@ done:
herr_t
H5D__chunk_set_info(const H5D_t *dset)
{
- hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Curr. size of dataset dimensions */
- int sndims; /* Rank of dataspace */
- unsigned ndims; /* Rank of dataspace */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Curr. size of dataset dimensions */
+ int sndims; /* Rank of dataspace */
+ unsigned ndims; /* Rank of dataspace */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -683,23 +653,23 @@ H5D__chunk_set_info(const H5D_t *dset)
HDassert(dset);
/* Get the dim info for dataset */
- if((sndims = H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
+ if ((sndims = H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int);
/* Set the base layout information */
- if(H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, ndims, curr_dims) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
+ if (H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, ndims, curr_dims) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
/* Call the index's "resize" callback */
- if(dset->shared->layout.storage.u.chunk.ops->resize && (dset->shared->layout.storage.u.chunk.ops->resize)(&dset->shared->layout.u.chunk) < 0)
+ if (dset->shared->layout.storage.u.chunk.ops->resize &&
+ (dset->shared->layout.storage.u.chunk.ops->resize)(&dset->shared->layout.u.chunk) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to resize chunk index information")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_construct
*
@@ -715,13 +685,13 @@ done:
static herr_t
H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
{
- const H5T_t *type = dset->shared->type; /* Convenience pointer to dataset's datatype */
- hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
- hsize_t dims[H5O_LAYOUT_NDIMS]; /* Dimension size of data in elements */
- uint64_t chunk_size; /* Size of chunk in bytes */
- int ndims; /* Rank of dataspace */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5T_t *type = dset->shared->type; /* Convenience pointer to dataset's datatype */
+ hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
+ hsize_t dims[H5O_LAYOUT_NDIMS]; /* Dimension size of data in elements */
+ uint64_t chunk_size; /* Size of chunk in bytes */
+ int ndims; /* Rank of dataspace */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -730,13 +700,13 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
HDassert(dset);
/* Check for invalid chunk dimension rank */
- if(0 == dset->shared->layout.u.chunk.ndims)
+ if (0 == dset->shared->layout.u.chunk.ndims)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "no chunk information set?")
/* Set up layout information */
- if((ndims = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
+ if ((ndims = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get rank")
- if(dset->shared->layout.u.chunk.ndims != (unsigned)ndims)
+ if (dset->shared->layout.u.chunk.ndims != (unsigned)ndims)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimensionality of chunks doesn't match the dataspace")
/* Increment # of chunk dimensions, to account for datatype size as last element */
@@ -744,20 +714,20 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
HDassert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
/* Chunked storage is not compatible with external storage (currently) */
- if(dset->shared->dcpl_cache.efl.nused > 0)
+ if (dset->shared->dcpl_cache.efl.nused > 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "external storage not supported with chunked layout")
/* Set the last dimension of the chunk size to the size of the datatype */
dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = (uint32_t)H5T_GET_SIZE(type);
/* Get local copy of dataset dimensions (for sanity checking) */
- if(H5S_get_simple_extent_dims(dset->shared->space, dims, max_dims) < 0)
+ if (H5S_get_simple_extent_dims(dset->shared->space, dims, max_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to query maximum dimensions")
/* Sanity check dimensions */
- for(u = 0; u < dset->shared->layout.u.chunk.ndims - 1; u++) {
+ for (u = 0; u < dset->shared->layout.u.chunk.ndims - 1; u++) {
/* Don't allow zero-sized chunk dimensions */
- if(0 == dset->shared->layout.u.chunk.dim[u])
+ if (0 == dset->shared->layout.u.chunk.dim[u])
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be > 0, dim = %u ", u)
/*
@@ -765,32 +735,33 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
* the maximum dimension size. If any dimension size is zero, there
* will be no such restriction.
*/
- if(dims[u] && max_dims[u] != H5S_UNLIMITED && max_dims[u] < dset->shared->layout.u.chunk.dim[u])
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be <= maximum dimension size for fixed-sized dimensions")
+ if (dims[u] && max_dims[u] != H5S_UNLIMITED && max_dims[u] < dset->shared->layout.u.chunk.dim[u])
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "chunk size must be <= maximum dimension size for fixed-sized dimensions")
} /* end for */
/* Compute the total size of a chunk */
/* (Use 64-bit value to ensure that we can detect >4GB chunks) */
- for(u = 1, chunk_size = (uint64_t)dset->shared->layout.u.chunk.dim[0]; u < dset->shared->layout.u.chunk.ndims; u++)
+ for (u = 1, chunk_size = (uint64_t)dset->shared->layout.u.chunk.dim[0];
+ u < dset->shared->layout.u.chunk.ndims; u++)
chunk_size *= (uint64_t)dset->shared->layout.u.chunk.dim[u];
/* Check for chunk larger than can be represented in 32-bits */
/* (Chunk size is encoded in 32-bit value in v1 B-tree records) */
- if(chunk_size > (uint64_t)0xffffffff)
+ if (chunk_size > (uint64_t)0xffffffff)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be < 4GB")
/* Retain computed chunk size */
H5_CHECKED_ASSIGN(dset->shared->layout.u.chunk.size, uint32_t, chunk_size, uint64_t);
/* Reset address and pointer of the array struct for the chunked storage index */
- if(H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, TRUE) < 0)
+ if (H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_construct() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_init
*
@@ -807,10 +778,10 @@ done:
herr_t
H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
- H5P_genplist_t *dapl; /* Data access property list object pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
+ H5P_genplist_t * dapl; /* Data access property list object pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -818,31 +789,31 @@ H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
HDassert(f);
HDassert(dset);
- if(NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id)))
+ if (NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for fapl ID");
/* Use the properties in dapl_id if they have been set, otherwise use the properties from the file */
- if(H5P_get(dapl, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc->nslots) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots");
- if(rdcc->nslots == H5D_CHUNK_CACHE_NSLOTS_DEFAULT)
+ if (H5P_get(dapl, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc->nslots) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache number of slots");
+ if (rdcc->nslots == H5D_CHUNK_CACHE_NSLOTS_DEFAULT)
rdcc->nslots = H5F_RDCC_NSLOTS(f);
- if(H5P_get(dapl, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc->nbytes_max) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache byte size");
- if(rdcc->nbytes_max == H5D_CHUNK_CACHE_NBYTES_DEFAULT)
+ if (H5P_get(dapl, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc->nbytes_max) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache byte size");
+ if (rdcc->nbytes_max == H5D_CHUNK_CACHE_NBYTES_DEFAULT)
rdcc->nbytes_max = H5F_RDCC_NBYTES(f);
- if(H5P_get(dapl, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc->w0) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks");
- if(rdcc->w0 < 0)
+ if (H5P_get(dapl, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc->w0) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get preempt read chunks");
+ if (rdcc->w0 < 0)
rdcc->w0 = H5F_RDCC_W0(f);
/* If nbytes_max or nslots is 0, set them both to 0 and avoid allocating space */
- if(!rdcc->nbytes_max || !rdcc->nslots)
+ if (!rdcc->nbytes_max || !rdcc->nslots)
rdcc->nbytes_max = rdcc->nslots = 0;
else {
rdcc->slot = H5FL_SEQ_CALLOC(H5D_rdcc_ent_ptr_t, rdcc->nslots);
- if(NULL == rdcc->slot)
+ if (NULL == rdcc->slot)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Reset any cached chunk info for this dataset */
@@ -850,25 +821,25 @@ H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
} /* end else */
/* Compose chunked index info struct */
- idx_info.f = f;
+ idx_info.f = f;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Allocate any indexing structures */
- if(dset->shared->layout.storage.u.chunk.ops->init && (dset->shared->layout.storage.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ if (dset->shared->layout.storage.u.chunk.ops->init &&
+ (dset->shared->layout.storage.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
/* Set the number of chunks in dataset, etc. */
- if(H5D__chunk_set_info(dset) < 0)
+ if (H5D__chunk_set_info(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set # of chunks for dataset")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_is_space_alloc
*
@@ -884,7 +855,7 @@ done:
hbool_t
H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
{
- hbool_t ret_value; /* Return value */
+ hbool_t ret_value; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -897,7 +868,29 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_is_space_alloc() */
-
+/*-------------------------------------------------------------------------
+ * Function: H5D__chunk_is_data_cached
+ *
+ * Purpose: Query if raw data is cached for dataset
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Neil Fortner
+ * Wednessday, March 6, 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Sanity checks */
+ HDassert(shared_dset);
+
+ FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
+} /* end H5D__chunk_is_data_cached() */
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_io_init
*
@@ -911,24 +904,23 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm)
+H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm)
{
- const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
- const H5T_t *mem_type = type_info->mem_type; /* Local pointer to memory datatype */
- H5S_t *tmp_mspace = NULL; /* Temporary memory dataspace */
- hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */
- htri_t file_space_normalized = FALSE; /* File dataspace was normalized */
- H5T_t *file_type = NULL; /* Temporary copy of file datatype for iteration */
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
- unsigned f_ndims; /* The number of dimensions of the file's dataspace */
- int sm_ndims; /* The number of dimensions of the memory buffer's dataspace (signed) */
- H5SL_node_t *curr_node; /* Current node in skip list */
- H5S_sel_type fsel_type; /* Selection type on disk */
- char bogus; /* "bogus" buffer to pass to selection iterator */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
+ const H5T_t *mem_type = type_info->mem_type; /* Local pointer to memory datatype */
+ H5S_t * tmp_mspace = NULL; /* Temporary memory dataspace */
+ hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */
+ htri_t file_space_normalized = FALSE; /* File dataspace was normalized */
+ H5T_t * file_type = NULL; /* Temporary copy of file datatype for iteration */
+ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ unsigned f_ndims; /* The number of dimensions of the file's dataspace */
+ int sm_ndims; /* The number of dimensions of the memory buffer's dataspace (signed) */
+ H5SL_node_t *curr_node; /* Current node in skip list */
+ H5S_sel_type fsel_type; /* Selection type on disk */
+ char bogus; /* "bogus" buffer to pass to selection iterator */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -937,14 +929,14 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
fm->nelmts = nelmts;
/* Check if the memory space is scalar & make equivalent memory space */
- if((sm_ndims = H5S_GET_EXTENT_NDIMS(mem_space)) < 0)
+ if ((sm_ndims = H5S_GET_EXTENT_NDIMS(mem_space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number")
/* Set the number of dimensions for the memory dataspace */
H5_CHECKED_ASSIGN(fm->m_ndims, unsigned, sm_ndims, int);
/* Get dim number and dimensionality for each dataspace */
fm->f_ndims = f_ndims = dataset->shared->layout.u.chunk.ndims - 1;
- if(H5S_get_simple_extent_dims(file_space, fm->f_dims, NULL) < 0)
+ if (H5S_get_simple_extent_dims(file_space, fm->f_dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality")
/* Normalize hyperslab selections by adjusting them by the offset */
@@ -953,69 +945,66 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
* speed up hyperslab calculations by removing the extra checks and/or
* additions involving the offset and the hyperslab selection -QAK)
*/
- if((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0)
+ if ((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset")
- /* Decide the number of chunks in each dimension*/
- for(u = 0; u < f_ndims; u++) {
+ /* Decide the number of chunks in each dimension */
+ for (u = 0; u < f_ndims; u++)
/* Keep the size of the chunk dimensions as hsize_t for various routines */
fm->chunk_dim[u] = fm->layout->u.chunk.dim[u];
- } /* end for */
#ifdef H5_HAVE_PARALLEL
/* Calculate total chunk in file map*/
fm->select_chunk = NULL;
- if(io_info->using_mpi_vfd) {
+ if (io_info->using_mpi_vfd) {
H5_CHECK_OVERFLOW(fm->layout->u.chunk.nchunks, hsize_t, size_t);
- if(fm->layout->u.chunk.nchunks) {
- if(NULL == (fm->select_chunk = (H5D_chunk_info_t **)H5MM_calloc((size_t)fm->layout->u.chunk.nchunks * sizeof(H5D_chunk_info_t *))))
+ if (fm->layout->u.chunk.nchunks)
+ if (NULL == (fm->select_chunk = (H5D_chunk_info_t **)H5MM_calloc(
+ (size_t)fm->layout->u.chunk.nchunks * sizeof(H5D_chunk_info_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
- }
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
-
/* Initialize "last chunk" information */
- fm->last_index = (hsize_t)-1;
+ fm->last_index = (hsize_t)-1;
fm->last_chunk_info = NULL;
/* Point at the dataspaces */
fm->file_space = file_space;
- fm->mem_space = mem_space;
+ fm->mem_space = mem_space;
/* Special case for only one element in selection */
/* (usually appending a record) */
- if(nelmts == 1
+ if (nelmts == 1
#ifdef H5_HAVE_PARALLEL
- && !(io_info->using_mpi_vfd)
+ && !(io_info->using_mpi_vfd)
#endif /* H5_HAVE_PARALLEL */
- && H5S_SEL_ALL != H5S_GET_SELECT_TYPE(file_space)) {
+ && H5S_SEL_ALL != H5S_GET_SELECT_TYPE(file_space)) {
/* Initialize skip list for chunk selections */
fm->sel_chunks = NULL;
fm->use_single = TRUE;
/* Initialize single chunk dataspace */
- if(NULL == dataset->shared->cache.chunk.single_space) {
+ if (NULL == dataset->shared->cache.chunk.single_space) {
/* Make a copy of the dataspace for the dataset */
- if((dataset->shared->cache.chunk.single_space = H5S_copy(file_space, TRUE, FALSE)) == NULL)
+ if ((dataset->shared->cache.chunk.single_space = H5S_copy(file_space, TRUE, FALSE)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file space")
/* Resize chunk's dataspace dimensions to size of chunk */
- if(H5S_set_extent_real(dataset->shared->cache.chunk.single_space, fm->chunk_dim) < 0)
+ if (H5S_set_extent_real(dataset->shared->cache.chunk.single_space, fm->chunk_dim) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust chunk dimensions")
/* Set the single chunk dataspace to 'all' selection */
- if(H5S_select_all(dataset->shared->cache.chunk.single_space, TRUE) < 0)
+ if (H5S_select_all(dataset->shared->cache.chunk.single_space, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection")
} /* end if */
fm->single_space = dataset->shared->cache.chunk.single_space;
HDassert(fm->single_space);
/* Allocate the single chunk information */
- if(NULL == dataset->shared->cache.chunk.single_chunk_info) {
- if(NULL == (dataset->shared->cache.chunk.single_chunk_info = H5FL_MALLOC(H5D_chunk_info_t)))
+ if (NULL == dataset->shared->cache.chunk.single_chunk_info)
+ if (NULL == (dataset->shared->cache.chunk.single_chunk_info = H5FL_MALLOC(H5D_chunk_info_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
- } /* end if */
fm->single_chunk_info = dataset->shared->cache.chunk.single_chunk_info;
HDassert(fm->single_chunk_info);
@@ -1023,17 +1012,17 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
fm->mchunk_tmpl = NULL;
/* Set up chunk mapping for single element */
- if(H5D__create_chunk_map_single(fm, io_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create chunk selections for single element")
+ if (H5D__create_chunk_map_single(fm, io_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to create chunk selections for single element")
} /* end if */
else {
- hbool_t sel_hyper_flag; /* Whether file selection is a hyperslab */
+ hbool_t sel_hyper_flag; /* Whether file selection is a hyperslab */
/* Initialize skip list for chunk selections */
- if(NULL == dataset->shared->cache.chunk.sel_chunks) {
- if(NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
+ if (NULL == dataset->shared->cache.chunk.sel_chunks)
+ if (NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create skip list for chunk selections")
- } /* end if */
fm->sel_chunks = dataset->shared->cache.chunk.sel_chunks;
HDassert(fm->sel_chunks);
@@ -1041,46 +1030,46 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
fm->use_single = FALSE;
/* Get type of selection on disk & in memory */
- if((fsel_type = H5S_GET_SELECT_TYPE(file_space)) < H5S_SEL_NONE)
+ if ((fsel_type = H5S_GET_SELECT_TYPE(file_space)) < H5S_SEL_NONE)
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection")
- if((fm->msel_type = H5S_GET_SELECT_TYPE(mem_space)) < H5S_SEL_NONE)
+ if ((fm->msel_type = H5S_GET_SELECT_TYPE(mem_space)) < H5S_SEL_NONE)
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection")
/* If the selection is NONE or POINTS, set the flag to FALSE */
- if(fsel_type == H5S_SEL_POINTS || fsel_type == H5S_SEL_NONE)
+ if (fsel_type == H5S_SEL_POINTS || fsel_type == H5S_SEL_NONE)
sel_hyper_flag = FALSE;
else
sel_hyper_flag = TRUE;
/* Check if file selection is a not a hyperslab selection */
- if(sel_hyper_flag) {
+ if (sel_hyper_flag) {
/* Build the file selection for each chunk */
- if(H5D__create_chunk_file_map_hyper(fm, io_info) < 0)
+ if (H5D__create_chunk_file_map_hyper(fm, io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections")
/* Clean file chunks' hyperslab span "scratch" information */
curr_node = H5SL_first(fm->sel_chunks);
- while(curr_node) {
- H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
+ while (curr_node) {
+ H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
/* Get pointer to chunk's information */
chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
HDassert(chunk_info);
/* Clean hyperslab span's "scratch" information */
- if(H5S_hyper_reset_scratch(chunk_info->fspace) < 0)
+ if (H5S_hyper_reset_scratch(chunk_info->fspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset span scratch info")
/* Get the next chunk node in the skip list */
curr_node = H5SL_next(curr_node);
} /* end while */
- } /* end if */
+ } /* end if */
else {
- H5S_sel_iter_op_t iter_op; /* Operator for iteration */
- H5D_chunk_file_iter_ud_t udata; /* User data for iteration */
+ H5S_sel_iter_op_t iter_op; /* Operator for iteration */
+ H5D_chunk_file_iter_ud_t udata; /* User data for iteration */
/* Create temporary datatypes for selection iteration */
- if(NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL)))
+ if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype")
/* Initialize the user data */
@@ -1089,116 +1078,113 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
udata.io_info = io_info;
#endif /* H5_HAVE_PARALLEL */
- iter_op.op_type = H5S_SEL_ITER_OP_LIB;
+ iter_op.op_type = H5S_SEL_ITER_OP_LIB;
iter_op.u.lib_op = H5D__chunk_file_cb;
/* Spaces might not be the same shape, iterate over the file selection directly */
- if(H5S_select_iterate(&bogus, file_type, file_space, &iter_op, &udata) < 0)
+ if (H5S_select_iterate(&bogus, file_type, file_space, &iter_op, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections")
/* Reset "last chunk" info */
- fm->last_index = (hsize_t)-1;
+ fm->last_index = (hsize_t)-1;
fm->last_chunk_info = NULL;
} /* end else */
/* Build the memory selection for each chunk */
- if(sel_hyper_flag && H5S_select_shape_same(file_space, mem_space) == TRUE) {
+ if (sel_hyper_flag && H5S_select_shape_same(file_space, mem_space) == TRUE) {
/* Reset chunk template information */
fm->mchunk_tmpl = NULL;
/* If the selections are the same shape, use the file chunk information
* to generate the memory chunk information quickly.
*/
- if(H5D__create_chunk_mem_map_hyper(fm) < 0)
+ if (H5D__create_chunk_mem_map_hyper(fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections")
} /* end if */
else {
- H5S_sel_iter_op_t iter_op; /* Operator for iteration */
- size_t elmt_size; /* Memory datatype size */
+ H5S_sel_iter_op_t iter_op; /* Operator for iteration */
+ size_t elmt_size; /* Memory datatype size */
/* Make a copy of equivalent memory space */
- if((tmp_mspace = H5S_copy(mem_space, TRUE, FALSE)) == NULL)
+ if ((tmp_mspace = H5S_copy(mem_space, TRUE, FALSE)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space")
/* De-select the mem space copy */
- if(H5S_select_none(tmp_mspace) < 0)
+ if (H5S_select_none(tmp_mspace) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select memory space")
/* Save chunk template information */
fm->mchunk_tmpl = tmp_mspace;
/* Create temporary datatypes for selection iteration */
- if(!file_type) {
- if(NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL)))
+ if (!file_type)
+ if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype")
- } /* end if */
/* Create selection iterator for memory selection */
- if(0 == (elmt_size = H5T_get_size(mem_type)))
+ if (0 == (elmt_size = H5T_get_size(mem_type)))
HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid")
- if(H5S_select_iter_init(&(fm->mem_iter), mem_space, elmt_size) < 0)
+ if (H5S_select_iter_init(&(fm->mem_iter), mem_space, elmt_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = TRUE; /* Selection iteration info has been initialized */
- iter_op.op_type = H5S_SEL_ITER_OP_LIB;
+ iter_op.op_type = H5S_SEL_ITER_OP_LIB;
iter_op.u.lib_op = H5D__chunk_mem_cb;
/* Spaces aren't the same shape, iterate over the memory selection directly */
- if(H5S_select_iterate(&bogus, file_type, file_space, &iter_op, fm) < 0)
+ if (H5S_select_iterate(&bogus, file_type, file_space, &iter_op, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections")
/* Clean up hyperslab stuff, if necessary */
- if(fm->msel_type != H5S_SEL_POINTS) {
+ if (fm->msel_type != H5S_SEL_POINTS) {
/* Clean memory chunks' hyperslab span "scratch" information */
curr_node = H5SL_first(fm->sel_chunks);
- while(curr_node) {
- H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
+ while (curr_node) {
+ H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
/* Get pointer to chunk's information */
chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
HDassert(chunk_info);
/* Clean hyperslab span's "scratch" information */
- if(H5S_hyper_reset_scratch(chunk_info->mspace) < 0)
+ if (H5S_hyper_reset_scratch(chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset span scratch info")
/* Get the next chunk node in the skip list */
curr_node = H5SL_next(curr_node);
} /* end while */
- } /* end if */
- } /* end else */
- } /* end else */
+ } /* end if */
+ } /* end else */
+ } /* end else */
done:
/* Release the [potentially partially built] chunk mapping information if an error occurs */
- if(ret_value < 0) {
- if(tmp_mspace && !fm->mchunk_tmpl) {
- if(H5S_close(tmp_mspace) < 0)
- HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "can't release memory chunk dataspace template")
- } /* end if */
-
- if(H5D__chunk_io_term(fm) < 0)
+ if (ret_value < 0) {
+ if (tmp_mspace && !fm->mchunk_tmpl)
+ if (H5S_close(tmp_mspace) < 0)
+ HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL,
+ "can't release memory chunk dataspace template")
+ if (H5D__chunk_io_term(fm) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release chunk mapping")
} /* end if */
/* Reset the global dataspace info */
fm->file_space = NULL;
- fm->mem_space = NULL;
+ fm->mem_space = NULL;
- if(iter_init && H5S_SELECT_ITER_RELEASE(&(fm->mem_iter)) < 0)
+ if (iter_init && H5S_SELECT_ITER_RELEASE(&(fm->mem_iter)) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
- if(file_type && (H5T_close(file_type) < 0))
+ if (file_type && (H5T_close(file_type) < 0))
HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Can't free temporary datatype")
- if(file_space_normalized) {
+ if (file_space_normalized) {
/* (Casting away const OK -QAK) */
- if(H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) < 0)
+ if (H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_alloc
*
@@ -1216,14 +1202,14 @@ done:
static void *
H5D__chunk_alloc(size_t size, const H5O_pline_t *pline)
{
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
HDassert(size);
HDassert(pline);
- if(pline->nused > 0)
+ if (pline->nused > 0)
ret_value = H5MM_malloc(size);
else
ret_value = H5FL_BLK_MALLOC(chunk, size);
@@ -1231,7 +1217,6 @@ H5D__chunk_alloc(size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_xfree
*
@@ -1253,8 +1238,8 @@ H5D__chunk_xfree(void *chk, const H5O_pline_t *pline)
HDassert(pline);
- if(chk) {
- if(pline->nused > 0)
+ if (chk) {
+ if (pline->nused > 0)
H5MM_xfree(chk);
else
chk = H5FL_BLK_FREE(chunk, chk);
@@ -1263,7 +1248,6 @@ H5D__chunk_xfree(void *chk, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(NULL)
} /* H5D__chunk_xfree() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_realloc
*
@@ -1281,14 +1265,14 @@ H5D__chunk_xfree(void *chk, const H5O_pline_t *pline)
static void *
H5D__chunk_realloc(void *chk, size_t size, const H5O_pline_t *pline)
{
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
HDassert(size);
HDassert(pline);
- if(pline->nused > 0)
+ if (pline->nused > 0)
ret_value = H5MM_realloc(chk, size);
else
ret_value = H5FL_BLK_REALLOC(chunk, chk, size);
@@ -1296,7 +1280,6 @@ H5D__chunk_realloc(void *chk, size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_realloc() */
-
/*--------------------------------------------------------------------------
NAME
H5D__free_chunk_info
@@ -1324,22 +1307,21 @@ H5D__free_chunk_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
HDassert(chunk_info);
/* Close the chunk's file dataspace, if it's not shared */
- if(!chunk_info->fspace_shared)
+ if (!chunk_info->fspace_shared)
(void)H5S_close(chunk_info->fspace);
else
H5S_select_all(chunk_info->fspace, TRUE);
/* Close the chunk's memory dataspace, if it's not shared */
- if(!chunk_info->mspace_shared && chunk_info->mspace)
+ if (!chunk_info->mspace_shared && chunk_info->mspace)
(void)H5S_close(chunk_info->mspace);
/* Free the actual chunk info */
chunk_info = H5FL_FREE(H5D_chunk_info_t, chunk_info);
FUNC_LEAVE_NOAPI(0)
-} /* H5D__free_chunk_info() */
+} /* H5D__free_chunk_info() */
-
/*-------------------------------------------------------------------------
* Function: H5D__create_chunk_map_single
*
@@ -1355,15 +1337,15 @@ H5D__free_chunk_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
static herr_t
H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
#ifndef H5_HAVE_PARALLEL
- H5_ATTR_UNUSED
+ H5_ATTR_UNUSED
#endif /* H5_HAVE_PARALLEL */
- *io_info)
+ *io_info)
{
- H5D_chunk_info_t *chunk_info; /* Chunk information to insert into skip list */
- hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
- hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_info_t *chunk_info; /* Chunk information to insert into skip list */
+ hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
+ hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1371,35 +1353,36 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
HDassert(fm->f_ndims > 0);
/* Get coordinate for selection */
- if(H5S_SELECT_BOUNDS(fm->file_space, sel_start, sel_end) < 0)
+ if (H5S_SELECT_BOUNDS(fm->file_space, sel_start, sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Initialize the 'single chunk' file & memory chunk information */
- chunk_info = fm->single_chunk_info;
+ chunk_info = fm->single_chunk_info;
chunk_info->chunk_points = 1;
/* Set chunk location & hyperslab size */
- for(u = 0; u < fm->f_ndims; u++) {
+ for (u = 0; u < fm->f_ndims; u++) {
HDassert(sel_start[u] == sel_end[u]);
chunk_info->coords[u] = (sel_start[u] / fm->layout->u.chunk.dim[u]) * fm->layout->u.chunk.dim[u];
} /* end for */
chunk_info->coords[fm->f_ndims] = 0;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(fm->f_ndims, chunk_info->coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_info->index) < 0)
+ if (H5VM_chunk_index(fm->f_ndims, chunk_info->coords, fm->layout->u.chunk.dim,
+ fm->layout->u.chunk.down_chunks, &chunk_info->index) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Copy selection for file's dataspace into chunk dataspace */
- if(H5S_select_copy(fm->single_space, fm->file_space, FALSE) < 0)
+ if (H5S_select_copy(fm->single_space, fm->file_space, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection")
/* Move selection back to have correct offset in chunk */
- if(H5S_SELECT_ADJUST_U(fm->single_space, chunk_info->coords) < 0)
+ if (H5S_SELECT_ADJUST_U(fm->single_space, chunk_info->coords) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
#ifdef H5_HAVE_PARALLEL
/* store chunk selection information */
- if(io_info->using_mpi_vfd)
+ if (io_info->using_mpi_vfd)
fm->select_chunk[chunk_info->index] = chunk_info;
#endif /* H5_HAVE_PARALLEL */
@@ -1420,7 +1403,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_map_single() */
-
/*-------------------------------------------------------------------------
* Function: H5D__create_chunk_file_map_hyper
*
@@ -1436,77 +1418,78 @@ done:
static herr_t
H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
#ifndef H5_HAVE_PARALLEL
- H5_ATTR_UNUSED
+ H5_ATTR_UNUSED
#endif /* H5_HAVE_PARALLEL */
- *io_info)
+ *io_info)
{
- hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
- hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
- hsize_t sel_points; /* Number of elements in file selection */
- hsize_t start_coords[H5O_LAYOUT_NDIMS]; /* Starting coordinates of selection */
- hsize_t coords[H5O_LAYOUT_NDIMS]; /* Current coordinates of chunk */
- hsize_t end[H5O_LAYOUT_NDIMS]; /* Current coordinates of chunk */
- hsize_t chunk_index; /* Index of chunk */
- int curr_dim; /* Current dimension to increment */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
+ hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
+ hsize_t sel_points; /* Number of elements in file selection */
+ hsize_t start_coords[H5O_LAYOUT_NDIMS]; /* Starting coordinates of selection */
+ hsize_t coords[H5O_LAYOUT_NDIMS]; /* Current coordinates of chunk */
+ hsize_t end[H5O_LAYOUT_NDIMS]; /* Final coordinates of chunk */
+ hsize_t chunk_index; /* Index of chunk */
+ int curr_dim; /* Current dimension to increment */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Sanity check */
- HDassert(fm->f_ndims>0);
+ HDassert(fm->f_ndims > 0);
/* Get number of elements selected in file */
sel_points = fm->nelmts;
/* Get bounding box for selection (to reduce the number of chunks to iterate over) */
- if(H5S_SELECT_BOUNDS(fm->file_space, sel_start, sel_end) < 0)
+ if (H5S_SELECT_BOUNDS(fm->file_space, sel_start, sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Set initial chunk location & hyperslab size */
- for(u = 0; u < fm->f_ndims; u++) {
+ for (u = 0; u < fm->f_ndims; u++) {
start_coords[u] = (sel_start[u] / fm->layout->u.chunk.dim[u]) * fm->layout->u.chunk.dim[u];
- coords[u] = start_coords[u];
- end[u] = (coords[u] + fm->chunk_dim[u]) - 1;
+ coords[u] = start_coords[u];
+ end[u] = (coords[u] + fm->chunk_dim[u]) - 1;
} /* end for */
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(fm->f_ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
+ if (H5VM_chunk_index(fm->f_ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks,
+ &chunk_index) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Iterate through each chunk in the dataset */
- while(sel_points) {
+ while (sel_points) {
/* Check for intersection of temporary chunk and file selection */
/* (Casting away const OK - QAK) */
- if(TRUE == H5S_hyper_intersect_block((H5S_t *)fm->file_space, coords, end)) {
- H5S_t *tmp_fchunk; /* Temporary file dataspace */
- H5D_chunk_info_t *new_chunk_info; /* chunk information to insert into skip list */
- hssize_t schunk_points; /* Number of elements in chunk selection */
+ if (TRUE == H5S_hyper_intersect_block((H5S_t *)fm->file_space, coords, end)) {
+ H5S_t * tmp_fchunk; /* Temporary file dataspace */
+ H5D_chunk_info_t *new_chunk_info; /* chunk information to insert into skip list */
+ hssize_t schunk_points; /* Number of elements in chunk selection */
/* Create "temporary" chunk for selection operations (copy file space) */
- if(NULL == (tmp_fchunk = H5S_copy(fm->file_space, TRUE, FALSE)))
+ if (NULL == (tmp_fchunk = H5S_copy(fm->file_space, TRUE, FALSE)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space")
/* Make certain selections are stored in span tree form (not "optimized hyperslab" or "all") */
- if(H5S_hyper_convert(tmp_fchunk) < 0) {
+ if (H5S_hyper_convert(tmp_fchunk) < 0) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to convert selection to span trees")
} /* end if */
/* "AND" temporary chunk and current chunk */
- if(H5S_select_hyperslab(tmp_fchunk,H5S_SELECT_AND,coords,NULL,fm->chunk_dim,NULL) < 0) {
+ if (H5S_select_hyperslab(tmp_fchunk, H5S_SELECT_AND, coords, NULL, fm->chunk_dim, NULL) < 0) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't create chunk selection")
} /* end if */
/* Resize chunk's dataspace dimensions to size of chunk */
- if(H5S_set_extent_real(tmp_fchunk,fm->chunk_dim) < 0) {
+ if (H5S_set_extent_real(tmp_fchunk, fm->chunk_dim) < 0) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk dimensions")
} /* end if */
/* Move selection back to have correct offset in chunk */
- if(H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) {
+ if (H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
} /* end if */
@@ -1514,7 +1497,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
/* Add temporary chunk to the list of chunks */
/* Allocate the file & memory chunk information */
- if (NULL==(new_chunk_info = H5FL_MALLOC(H5D_chunk_info_t))) {
+ if (NULL == (new_chunk_info = H5FL_MALLOC(H5D_chunk_info_t))) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
} /* end if */
@@ -1522,20 +1505,20 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
/* Initialize the chunk information */
/* Set the chunk index */
- new_chunk_info->index=chunk_index;
+ new_chunk_info->index = chunk_index;
#ifdef H5_HAVE_PARALLEL
/* Store chunk selection information, for multi-chunk I/O */
- if(io_info->using_mpi_vfd)
+ if (io_info->using_mpi_vfd)
fm->select_chunk[chunk_index] = new_chunk_info;
#endif /* H5_HAVE_PARALLEL */
/* Set the file chunk dataspace */
- new_chunk_info->fspace = tmp_fchunk;
+ new_chunk_info->fspace = tmp_fchunk;
new_chunk_info->fspace_shared = FALSE;
/* Set the memory chunk dataspace */
- new_chunk_info->mspace=NULL;
+ new_chunk_info->mspace = NULL;
new_chunk_info->mspace_shared = FALSE;
/* Copy the chunk's coordinates */
@@ -1543,13 +1526,13 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
new_chunk_info->coords[fm->f_ndims] = 0;
/* Insert the new chunk into the skip list */
- if(H5SL_insert(fm->sel_chunks, new_chunk_info, &new_chunk_info->index) < 0) {
+ if (H5SL_insert(fm->sel_chunks, new_chunk_info, &new_chunk_info->index) < 0) {
H5D__free_chunk_info(new_chunk_info, NULL, NULL);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into skip list")
} /* end if */
/* Get number of elements selected in chunk */
- if((schunk_points = H5S_GET_SELECT_NPOINTS(tmp_fchunk)) < 0)
+ if ((schunk_points = H5S_GET_SELECT_NPOINTS(tmp_fchunk)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection # of elements")
H5_CHECKED_ASSIGN(new_chunk_info->chunk_points, uint32_t, schunk_points, hssize_t);
@@ -1557,7 +1540,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
sel_points -= (hsize_t)schunk_points;
/* Leave if we are done */
- if(sel_points == 0)
+ if (sel_points == 0)
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -1565,18 +1548,19 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
chunk_index++;
/* Set current increment dimension */
- curr_dim=(int)fm->f_ndims-1;
+ curr_dim = (int)fm->f_ndims - 1;
/* Increment chunk location in fastest changing dimension */
- H5_CHECK_OVERFLOW(fm->chunk_dim[curr_dim],hsize_t,hssize_t);
- coords[curr_dim]+=fm->chunk_dim[curr_dim];
- end[curr_dim]+=fm->chunk_dim[curr_dim];
+ H5_CHECK_OVERFLOW(fm->chunk_dim[curr_dim], hsize_t, hssize_t);
+ coords[curr_dim] += fm->chunk_dim[curr_dim];
+ end[curr_dim] += fm->chunk_dim[curr_dim];
/* Bring chunk location back into bounds, if necessary */
- if(coords[curr_dim] > sel_end[curr_dim]) {
+ if (coords[curr_dim] > sel_end[curr_dim]) {
do {
/* Reset current dimension's location to 0 */
- coords[curr_dim] = start_coords[curr_dim]; /*lint !e771 The start_coords will always be initialized */
+ coords[curr_dim] =
+ start_coords[curr_dim]; /*lint !e771 The start_coords will always be initialized */
end[curr_dim] = (coords[curr_dim] + fm->chunk_dim[curr_dim]) - 1;
/* Decrement current dimension */
@@ -1585,19 +1569,19 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
/* Increment chunk location in current dimension */
coords[curr_dim] += fm->chunk_dim[curr_dim];
end[curr_dim] = (coords[curr_dim] + fm->chunk_dim[curr_dim]) - 1;
- } while(coords[curr_dim] > sel_end[curr_dim]);
+ } while (coords[curr_dim] > sel_end[curr_dim]);
/* Re-calculate the index of this chunk */
- if(H5VM_chunk_index(fm->f_ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
+ if (H5VM_chunk_index(fm->f_ndims, coords, fm->layout->u.chunk.dim,
+ fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
} /* end if */
- } /* end while */
+ } /* end while */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_file_map_hyper() */
-
/*-------------------------------------------------------------------------
* Function: H5D__create_chunk_mem_map_hyper
*
@@ -1617,27 +1601,27 @@ done:
static herr_t
H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
{
- H5SL_node_t *curr_node; /* Current node in skip list */
- hsize_t file_sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
- hsize_t file_sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
- hsize_t mem_sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
- hsize_t mem_sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
- hssize_t adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to all file chunks */
- hssize_t chunk_adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to a particular chunk */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5SL_node_t *curr_node; /* Current node in skip list */
+ hsize_t file_sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
+ hsize_t file_sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
+ hsize_t mem_sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
+ hsize_t mem_sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
+ hssize_t adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to all file chunks */
+ hssize_t chunk_adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to a particular chunk */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Sanity check */
- HDassert(fm->f_ndims>0);
+ HDassert(fm->f_ndims > 0);
/* Check for all I/O going to a single chunk */
- if(H5SL_count(fm->sel_chunks)==1) {
- H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */
+ if (H5SL_count(fm->sel_chunks) == 1) {
+ H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */
/* Get the node */
- curr_node=H5SL_first(fm->sel_chunks);
+ curr_node = H5SL_first(fm->sel_chunks);
/* Get pointer to chunk's information */
chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
@@ -1652,25 +1636,25 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
} /* end if */
else {
/* Get bounding box for file selection */
- if(H5S_SELECT_BOUNDS(fm->file_space, file_sel_start, file_sel_end) < 0)
+ if (H5S_SELECT_BOUNDS(fm->file_space, file_sel_start, file_sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Get bounding box for memory selection */
- if(H5S_SELECT_BOUNDS(fm->mem_space, mem_sel_start, mem_sel_end) < 0)
+ if (H5S_SELECT_BOUNDS(fm->mem_space, mem_sel_start, mem_sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Calculate the adjustment for memory selection from file selection */
- HDassert(fm->m_ndims==fm->f_ndims);
- for(u=0; u<fm->f_ndims; u++) {
- H5_CHECK_OVERFLOW(file_sel_start[u],hsize_t,hssize_t);
- H5_CHECK_OVERFLOW(mem_sel_start[u],hsize_t,hssize_t);
- adjust[u]=(hssize_t)file_sel_start[u]-(hssize_t)mem_sel_start[u];
+ HDassert(fm->m_ndims == fm->f_ndims);
+ for (u = 0; u < fm->f_ndims; u++) {
+ H5_CHECK_OVERFLOW(file_sel_start[u], hsize_t, hssize_t);
+ H5_CHECK_OVERFLOW(mem_sel_start[u], hsize_t, hssize_t);
+ adjust[u] = (hssize_t)file_sel_start[u] - (hssize_t)mem_sel_start[u];
} /* end for */
/* Iterate over each chunk in the chunk list */
- curr_node=H5SL_first(fm->sel_chunks);
- while(curr_node) {
- H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */
+ curr_node = H5SL_first(fm->sel_chunks);
+ while (curr_node) {
+ H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */
/* Get pointer to chunk's information */
chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
@@ -1679,37 +1663,40 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
/* Copy the information */
/* Copy the memory dataspace */
- if((chunk_info->mspace = H5S_copy(fm->mem_space, TRUE, FALSE)) == NULL)
+ if ((chunk_info->mspace = H5S_copy(fm->mem_space, TRUE, FALSE)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space")
/* Release the current selection */
- if(H5S_SELECT_RELEASE(chunk_info->mspace) < 0)
+ if (H5S_SELECT_RELEASE(chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection")
/* Copy the file chunk's selection */
- if(H5S_select_copy(chunk_info->mspace,chunk_info->fspace,FALSE) < 0)
+ if (H5S_select_copy(chunk_info->mspace, chunk_info->fspace, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy selection")
/* Compensate for the chunk offset */
- for(u=0; u<fm->f_ndims; u++) {
- H5_CHECK_OVERFLOW(chunk_info->coords[u],hsize_t,hssize_t);
- chunk_adjust[u]=adjust[u]-(hssize_t)chunk_info->coords[u]; /*lint !e771 The adjust array will always be initialized */
- } /* end for */
+ for (u = 0; u < fm->f_ndims; u++) {
+ H5_CHECK_OVERFLOW(chunk_info->coords[u], hsize_t, hssize_t);
+ chunk_adjust[u] =
+ adjust[u] -
+ (hssize_t)
+ chunk_info->coords[u]; /*lint !e771 The adjust array will always be initialized */
+ } /* end for */
/* Adjust the selection */
- if(H5S_hyper_adjust_s(chunk_info->mspace,chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */
+ if (H5S_hyper_adjust_s(chunk_info->mspace, chunk_adjust) <
+ 0) /*lint !e772 The chunk_adjust array will always be initialized */
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
/* Get the next chunk node in the skip list */
- curr_node=H5SL_next(curr_node);
+ curr_node = H5SL_next(curr_node);
} /* end while */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_mem_map_hyper() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_file_cb
*
@@ -1724,24 +1711,26 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims, const hsize_t *coords, void *_udata)
+H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims,
+ const hsize_t *coords, void *_udata)
{
- H5D_chunk_file_iter_ud_t *udata = (H5D_chunk_file_iter_ud_t *)_udata; /* User data for operation */
- H5D_chunk_map_t *fm = udata->fm; /* File<->memory chunk mapping info */
- H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
- hsize_t coords_in_chunk[H5O_LAYOUT_NDIMS]; /* Coordinates of element in chunk */
- hsize_t chunk_index; /* Chunk index */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_file_iter_ud_t *udata = (H5D_chunk_file_iter_ud_t *)_udata; /* User data for operation */
+ H5D_chunk_map_t * fm = udata->fm; /* File<->memory chunk mapping info */
+ H5D_chunk_info_t * chunk_info; /* Chunk information for current chunk */
+ hsize_t coords_in_chunk[H5O_LAYOUT_NDIMS]; /* Coordinates of element in chunk */
+ hsize_t chunk_index; /* Chunk index */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
+ if (H5VM_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks,
+ &chunk_index) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Find correct chunk in file & memory skip list */
- if(chunk_index==fm->last_index) {
+ if (chunk_index == fm->last_index) {
/* If the chunk index is the same as the last chunk index we used,
* get the cached info to operate on.
*/
@@ -1752,73 +1741,74 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
* find the chunk in the skip list.
*/
/* Get the chunk node from the skip list */
- if(NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->sel_chunks, &chunk_index))) {
- H5S_t *fspace; /* Memory chunk's dataspace */
+ if (NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->sel_chunks, &chunk_index))) {
+ H5S_t *fspace; /* Memory chunk's dataspace */
/* Allocate the file & memory chunk information */
- if (NULL==(chunk_info = H5FL_MALLOC (H5D_chunk_info_t)))
+ if (NULL == (chunk_info = H5FL_MALLOC(H5D_chunk_info_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
/* Initialize the chunk information */
/* Set the chunk index */
- chunk_info->index=chunk_index;
+ chunk_info->index = chunk_index;
/* Create a dataspace for the chunk */
- if((fspace = H5S_create_simple(fm->f_ndims,fm->chunk_dim,NULL))==NULL) {
+ if ((fspace = H5S_create_simple(fm->f_ndims, fm->chunk_dim, NULL)) == NULL) {
chunk_info = H5FL_FREE(H5D_chunk_info_t, chunk_info);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk")
} /* end if */
/* De-select the chunk space */
- if(H5S_select_none(fspace) < 0) {
+ if (H5S_select_none(fspace) < 0) {
(void)H5S_close(fspace);
chunk_info = H5FL_FREE(H5D_chunk_info_t, chunk_info);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select dataspace")
} /* end if */
/* Set the file chunk dataspace */
- chunk_info->fspace = fspace;
+ chunk_info->fspace = fspace;
chunk_info->fspace_shared = FALSE;
/* Set the memory chunk dataspace */
- chunk_info->mspace = NULL;
+ chunk_info->mspace = NULL;
chunk_info->mspace_shared = FALSE;
/* Set the number of selected elements in chunk to zero */
chunk_info->chunk_points = 0;
/* Compute the chunk's coordinates */
- for(u = 0; u < fm->f_ndims; u++) {
+ for (u = 0; u < fm->f_ndims; u++) {
H5_CHECK_OVERFLOW(fm->layout->u.chunk.dim[u], hsize_t, hssize_t);
- chunk_info->coords[u] = (coords[u] / (hssize_t)fm->layout->u.chunk.dim[u]) * (hssize_t)fm->layout->u.chunk.dim[u];
+ chunk_info->coords[u] =
+ (coords[u] / (hssize_t)fm->layout->u.chunk.dim[u]) * (hssize_t)fm->layout->u.chunk.dim[u];
} /* end for */
chunk_info->coords[fm->f_ndims] = 0;
/* Insert the new chunk into the skip list */
- if(H5SL_insert(fm->sel_chunks,chunk_info,&chunk_info->index) < 0) {
- H5D__free_chunk_info(chunk_info,NULL,NULL);
- HGOTO_ERROR(H5E_DATASPACE,H5E_CANTINSERT,FAIL,"can't insert chunk into skip list")
+ if (H5SL_insert(fm->sel_chunks, chunk_info, &chunk_info->index) < 0) {
+ H5D__free_chunk_info(chunk_info, NULL, NULL);
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into skip list")
} /* end if */
- } /* end if */
+ } /* end if */
#ifdef H5_HAVE_PARALLEL
/* Store chunk selection information, for collective multi-chunk I/O */
- if(udata->io_info->using_mpi_vfd)
+ if (udata->io_info->using_mpi_vfd)
fm->select_chunk[chunk_index] = chunk_info;
#endif /* H5_HAVE_PARALLEL */
/* Update the "last chunk seen" information */
- fm->last_index = chunk_index;
+ fm->last_index = chunk_index;
fm->last_chunk_info = chunk_info;
} /* end else */
/* Get the offset of the element within the chunk */
- for(u = 0; u < fm->f_ndims; u++)
+ for (u = 0; u < fm->f_ndims; u++)
coords_in_chunk[u] = coords[u] - chunk_info->coords[u];
/* Add point to file selection for chunk */
- if(H5S_select_elements(chunk_info->fspace, H5S_SELECT_APPEND, (size_t)1, coords_in_chunk) < 0)
+ if (H5S_select_elements(chunk_info->fspace, H5S_SELECT_APPEND, (size_t)1, coords_in_chunk) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element")
/* Increment the number of elemented selected in chunk */
@@ -1828,7 +1818,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_file_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_mem_cb
*
@@ -1842,24 +1831,25 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
-H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims, const hsize_t *coords, void *_fm)
+H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims,
+ const hsize_t *coords, void *_fm)
{
- H5D_chunk_map_t *fm = (H5D_chunk_map_t *)_fm; /* File<->memory chunk mapping info */
- H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
- hsize_t coords_in_mem[H5O_LAYOUT_NDIMS]; /* Coordinates of element in memory */
- hsize_t chunk_index; /* Chunk index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_map_t * fm = (H5D_chunk_map_t *)_fm; /* File<->memory chunk mapping info */
+ H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
+ hsize_t coords_in_mem[H5O_LAYOUT_NDIMS]; /* Coordinates of element in memory */
+ hsize_t chunk_index; /* Chunk index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
+ if (H5VM_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks,
+ &chunk_index) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Find correct chunk in file & memory skip list */
- if(chunk_index == fm->last_index) {
+ if (chunk_index == fm->last_index) {
/* If the chunk index is the same as the last chunk index we used,
* get the cached spaces to operate on.
*/
@@ -1870,44 +1860,42 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
* find the chunk in the skip list.
*/
/* Get the chunk node from the skip list */
- if(NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->sel_chunks, &chunk_index)))
+ if (NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->sel_chunks, &chunk_index)))
HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, FAIL, "can't locate chunk in skip list")
/* Check if the chunk already has a memory space */
- if(NULL == chunk_info->mspace) {
+ if (NULL == chunk_info->mspace)
/* Copy the template memory chunk dataspace */
- if(NULL == (chunk_info->mspace = H5S_copy(fm->mchunk_tmpl, FALSE, FALSE)))
+ if (NULL == (chunk_info->mspace = H5S_copy(fm->mchunk_tmpl, FALSE, FALSE)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file space")
- } /* end else */
/* Update the "last chunk seen" information */
- fm->last_index = chunk_index;
+ fm->last_index = chunk_index;
fm->last_chunk_info = chunk_info;
} /* end else */
/* Get coordinates of selection iterator for memory */
- if(H5S_SELECT_ITER_COORDS(&fm->mem_iter, coords_in_mem) < 0)
+ if (H5S_SELECT_ITER_COORDS(&fm->mem_iter, coords_in_mem) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get iterator coordinates")
/* Add point to memory selection for chunk */
- if(fm->msel_type == H5S_SEL_POINTS) {
- if(H5S_select_elements(chunk_info->mspace, H5S_SELECT_APPEND, (size_t)1, coords_in_mem) < 0)
+ if (fm->msel_type == H5S_SEL_POINTS) {
+ if (H5S_select_elements(chunk_info->mspace, H5S_SELECT_APPEND, (size_t)1, coords_in_mem) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element")
} /* end if */
else {
- if(H5S_hyper_add_span_element(chunk_info->mspace, fm->m_ndims, coords_in_mem) < 0)
+ if (H5S_hyper_add_span_element(chunk_info->mspace, fm->m_ndims, coords_in_mem) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element")
} /* end else */
/* Move memory selection iterator to next element in selection */
- if(H5S_SELECT_ITER_NEXT(&fm->mem_iter, (size_t)1) < 0)
+ if (H5S_SELECT_ITER_NEXT(&fm->mem_iter, (size_t)1) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to move to next iterator location")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_mem_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cacheable
*
@@ -1924,8 +1912,8 @@ done:
htri_t
H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_op)
{
- const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
- htri_t ret_value = FAIL; /* Return value */
+ const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1933,16 +1921,16 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_
HDassert(dataset);
/* Must bring the whole chunk in if there are any filters */
- if(dataset->shared->dcpl_cache.pline.nused > 0)
+ if (dataset->shared->dcpl_cache.pline.nused > 0)
ret_value = TRUE;
else {
#ifdef H5_HAVE_PARALLEL
- /* If MPI based VFD is used and the file is opened for write access, must
- * bypass the chunk-cache scheme because other MPI processes could
- * be writing to other elements in the same chunk. Do a direct
- * write-through of only the elements requested.
- */
- if(io_info->using_mpi_vfd && (H5F_ACC_RDWR & H5F_INTENT(dataset->oloc.file)))
+ /* If MPI based VFD is used and the file is opened for write access, must
+ * bypass the chunk-cache scheme because other MPI processes could
+ * be writing to other elements in the same chunk. Do a direct
+ * write-through of only the elements requested.
+ */
+ if (io_info->using_mpi_vfd && (H5F_ACC_RDWR & H5F_INTENT(dataset->oloc.file)))
ret_value = FALSE;
else {
#endif /* H5_HAVE_PARALLEL */
@@ -1951,38 +1939,39 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_
* cache, just write the data to it directly.
*/
H5_CHECK_OVERFLOW(dataset->shared->layout.u.chunk.size, uint32_t, size_t);
- if((size_t)dataset->shared->layout.u.chunk.size > dataset->shared->cache.chunk.nbytes_max) {
- if(write_op && !H5F_addr_defined(caddr)) {
+ if ((size_t)dataset->shared->layout.u.chunk.size > dataset->shared->cache.chunk.nbytes_max) {
+ if (write_op && !H5F_addr_defined(caddr)) {
const H5O_fill_t *fill = &(dataset->shared->dcpl_cache.fill); /* Fill value info */
- H5D_fill_value_t fill_status; /* Fill value status */
+ H5D_fill_value_t fill_status; /* Fill value status */
/* Revtrieve the fill value status */
- if(H5P_is_fill_value_defined(fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* If the fill value needs to be written then we will need
* to use the cache to write the fill value */
- if(fill->fill_time == H5D_FILL_TIME_ALLOC ||
- (fill->fill_time == H5D_FILL_TIME_IFSET &&
- (fill_status == H5D_FILL_VALUE_USER_DEFINED ||
- fill_status == H5D_FILL_VALUE_DEFAULT)))
+ if (fill->fill_time == H5D_FILL_TIME_ALLOC ||
+ (fill->fill_time == H5D_FILL_TIME_IFSET &&
+ (fill_status == H5D_FILL_VALUE_USER_DEFINED ||
+ fill_status == H5D_FILL_VALUE_DEFAULT)))
ret_value = TRUE;
else
ret_value = FALSE;
- } else
+ }
+ else
ret_value = FALSE;
- } else
+ }
+ else
ret_value = TRUE;
#ifdef H5_HAVE_PARALLEL
} /* end else */
-#endif /* H5_HAVE_PARALLEL */
- } /* end else */
+#endif /* H5_HAVE_PARALLEL */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cacheable() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_read
*
@@ -1996,20 +1985,20 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t H5_ATTR_UNUSED nelmts,
+ const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
+ H5D_chunk_map_t *fm)
{
- H5SL_node_t *chunk_node; /* Current node in chunk skip list */
- H5D_io_info_t nonexistent_io_info; /* "nonexistent" I/O info object */
- H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
- H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
- H5D_io_info_t cpt_io_info; /* Compact I/O info object */
- H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
- hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
- uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */
- hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
- herr_t ret_value = SUCCEED; /*return value */
+ H5SL_node_t * chunk_node; /* Current node in chunk skip list */
+ H5D_io_info_t nonexistent_io_info; /* "nonexistent" I/O info object */
+ H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
+ H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
+ H5D_io_info_t cpt_io_info; /* Compact I/O info object */
+ H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
+ hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
+ uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */
+ hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -2025,71 +2014,71 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Set up contiguous I/O info object */
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- ctg_io_info.store = &ctg_store;
+ ctg_io_info.store = &ctg_store;
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
/* Initialize temporary contiguous storage info */
- H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size, uint32_t);
+ H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size,
+ uint32_t);
/* Set up compact I/O info object */
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- cpt_io_info.store = &cpt_store;
+ cpt_io_info.store = &cpt_store;
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
/* Initialize temporary compact storage info */
cpt_store.compact.dirty = &cpt_dirty;
{
- const H5O_fill_t *fill = &(io_info->dset->shared->dcpl_cache.fill); /* Fill value info */
- H5D_fill_value_t fill_status; /* Fill value status */
+ const H5O_fill_t *fill = &(io_info->dset->shared->dcpl_cache.fill); /* Fill value info */
+ H5D_fill_value_t fill_status; /* Fill value status */
/* Check the fill value status */
- if(H5P_is_fill_value_defined(fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* If we are never to return fill values, or if we would return them
* but they aren't set, set the flag to skip missing chunks.
*/
- if(fill->fill_time == H5D_FILL_TIME_NEVER ||
- (fill->fill_time == H5D_FILL_TIME_IFSET &&
- fill_status != H5D_FILL_VALUE_USER_DEFINED &&
- fill_status != H5D_FILL_VALUE_DEFAULT))
+ if (fill->fill_time == H5D_FILL_TIME_NEVER ||
+ (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status != H5D_FILL_VALUE_USER_DEFINED &&
+ fill_status != H5D_FILL_VALUE_DEFAULT))
skip_missing_chunks = TRUE;
}
/* Iterate through nodes in chunk skip list */
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
- while(chunk_node) {
- H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
- void *chunk; /* Pointer to locked chunk buffer */
- H5D_chunk_ud_t udata; /* B-tree pass-through */
- htri_t cacheable; /* Whether the chunk is cacheable */
+ while (chunk_node) {
+ H5D_chunk_info_t *chunk_info; /* Chunk information */
+ H5D_io_info_t * chk_io_info; /* Pointer to I/O info object for this chunk */
+ void * chunk; /* Pointer to locked chunk buffer */
+ H5D_chunk_ud_t udata; /* B-tree pass-through */
+ htri_t cacheable; /* Whether the chunk is cacheable */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(fm, chunk_node);
/* Get the info for the chunk in the file */
- if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index, &udata) < 0)
+ if (H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index,
+ &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Check for non-existant chunk & skip it if appropriate */
- if(H5F_addr_defined(udata.addr) || UINT_MAX != udata.idx_hint
- || !skip_missing_chunks) {
+ if (H5F_addr_defined(udata.addr) || UINT_MAX != udata.idx_hint || !skip_missing_chunks) {
/* Load the chunk into cache and lock it. */
- if((cacheable = H5D__chunk_cacheable(io_info, udata.addr, FALSE)) < 0)
+ if ((cacheable = H5D__chunk_cacheable(io_info, udata.addr, FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
- if(cacheable) {
+ if (cacheable) {
/* Pass in chunk's coordinates in a union. */
io_info->store->chunk.offset = chunk_info->coords;
- io_info->store->chunk.index = chunk_info->index;
+ io_info->store->chunk.index = chunk_info->index;
/* Compute # of bytes accessed in chunk */
H5_CHECK_OVERFLOW(type_info->src_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
src_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->src_type_size;
/* Lock the chunk into the cache */
- if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE)))
+ if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE)))
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
/* Set up the storage buffer information for this chunk */
@@ -2098,7 +2087,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Point I/O info at contiguous I/O info for this chunk */
chk_io_info = &cpt_io_info;
} /* end if */
- else if(H5F_addr_defined(udata.addr)) {
+ else if (H5F_addr_defined(udata.addr)) {
/* Set up the storage address information for this chunk */
ctg_store.contig.dset_addr = udata.addr;
@@ -2117,12 +2106,12 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
} /* end else */
/* Perform the actual read operation */
- if((io_info->io_ops.single_read)(chk_io_info, type_info,
- (hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
+ if ((io_info->io_ops.single_read)(chk_io_info, type_info, (hsize_t)chunk_info->chunk_points,
+ chunk_info->fspace, chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked read failed")
/* Release the cache lock on the chunk. */
- if(chunk && H5D__chunk_unlock(io_info, &udata, FALSE, chunk, src_accessed_bytes) < 0)
+ if (chunk && H5D__chunk_unlock(io_info, &udata, FALSE, chunk, src_accessed_bytes) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
} /* end if */
@@ -2134,7 +2123,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_write
*
@@ -2148,18 +2136,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t H5_ATTR_UNUSED nelmts,
+ const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
+ H5D_chunk_map_t *fm)
{
- H5SL_node_t *chunk_node; /* Current node in chunk skip list */
- H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
- H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
- H5D_io_info_t cpt_io_info; /* Compact I/O info object */
- H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
- hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
- uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5SL_node_t * chunk_node; /* Current node in chunk skip list */
+ H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
+ H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
+ H5D_io_info_t cpt_io_info; /* Compact I/O info object */
+ H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
+ hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
+ uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2171,15 +2159,16 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Set up contiguous I/O info object */
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- ctg_io_info.store = &ctg_store;
+ ctg_io_info.store = &ctg_store;
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
/* Initialize temporary contiguous storage info */
- H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size, uint32_t);
+ H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size,
+ uint32_t);
/* Set up compact I/O info object */
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- cpt_io_info.store = &cpt_store;
+ cpt_io_info.store = &cpt_store;
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
/* Initialize temporary compact storage info */
@@ -2187,40 +2176,41 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Iterate through nodes in chunk skip list */
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
- while(chunk_node) {
- H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
- void *chunk; /* Pointer to locked chunk buffer */
- H5D_chunk_ud_t udata; /* Index pass-through */
- htri_t cacheable; /* Whether the chunk is cacheable */
+ while (chunk_node) {
+ H5D_chunk_info_t *chunk_info; /* Chunk information */
+ H5D_io_info_t * chk_io_info; /* Pointer to I/O info object for this chunk */
+ void * chunk; /* Pointer to locked chunk buffer */
+ H5D_chunk_ud_t udata; /* Index pass-through */
+ htri_t cacheable; /* Whether the chunk is cacheable */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(fm, chunk_node);
/* Load the chunk into cache. But if the whole chunk is written,
* simply allocate space instead of load the chunk. */
- if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index, &udata) < 0)
+ if (H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index,
+ &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
- if((cacheable = H5D__chunk_cacheable(io_info, udata.addr, TRUE)) < 0)
+ if ((cacheable = H5D__chunk_cacheable(io_info, udata.addr, TRUE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
- if(cacheable) {
- hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
+ if (cacheable) {
+ hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
/* Pass in chunk's coordinates in a union. */
io_info->store->chunk.offset = chunk_info->coords;
- io_info->store->chunk.index = chunk_info->index;
+ io_info->store->chunk.index = chunk_info->index;
/* Compute # of bytes accessed in chunk */
H5_CHECK_OVERFLOW(type_info->dst_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
dst_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->dst_type_size;
/* Determine if we will access all the data in the chunk */
- if(dst_accessed_bytes != ctg_store.contig.dset_size ||
- (chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size)
+ if (dst_accessed_bytes != ctg_store.contig.dset_size ||
+ (chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size)
entire_chunk = FALSE;
/* Lock the chunk into the cache */
- if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk)))
+ if (NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk)))
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
/* Set up the storage buffer information for this chunk */
@@ -2231,25 +2221,25 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
} /* end if */
else {
/* If the chunk hasn't been allocated on disk, do so now. */
- if(!H5F_addr_defined(udata.addr)) {
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ if (!H5F_addr_defined(udata.addr)) {
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
/* Compose chunked index info struct */
- idx_info.f = io_info->dset->oloc.file;
+ idx_info.f = io_info->dset->oloc.file;
idx_info.dxpl_id = io_info->dxpl_id;
- idx_info.pline = &(io_info->dset->shared->dcpl_cache.pline);
- idx_info.layout = &(io_info->dset->shared->layout.u.chunk);
+ idx_info.pline = &(io_info->dset->shared->dcpl_cache.pline);
+ idx_info.layout = &(io_info->dset->shared->layout.u.chunk);
idx_info.storage = &(io_info->dset->shared->layout.storage.u.chunk);
/* Set up the size of chunk for user data */
udata.nbytes = io_info->dset->shared->layout.u.chunk.size;
/* Create the chunk */
- if((io_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
+ if ((io_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk")
/* Make sure the address of the chunk is returned. */
- if(!H5F_addr_defined(udata.addr))
+ if (!H5F_addr_defined(udata.addr))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined")
/* Cache the new chunk information */
@@ -2267,12 +2257,12 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
} /* end else */
/* Perform the actual write operation */
- if((io_info->io_ops.single_write)(chk_io_info, type_info,
- (hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
+ if ((io_info->io_ops.single_write)(chk_io_info, type_info, (hsize_t)chunk_info->chunk_points,
+ chunk_info->fspace, chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed")
/* Release the cache lock on the chunk. */
- if(chunk && H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
+ if (chunk && H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
/* Advance to next chunk in list */
@@ -2283,7 +2273,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_flush
*
@@ -2300,12 +2289,12 @@ done:
static herr_t
H5D__chunk_flush(H5D_t *dset, hid_t dxpl_id)
{
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- H5D_rdcc_ent_t *ent, *next;
- unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk);
+ H5D_rdcc_ent_t * ent, *next;
+ unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2313,27 +2302,26 @@ H5D__chunk_flush(H5D_t *dset, hid_t dxpl_id)
HDassert(dset);
/* Flush any data caught in sieve buffer */
- if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
+ if (H5D__flush_sieve_buf(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Loop over all entries in the chunk cache */
- for(ent = rdcc->head; ent; ent = next) {
- next = ent->next;
- if(H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, FALSE) < 0)
+ for (ent = rdcc->head; ent; ent = next) {
+ next = ent->next;
+ if (H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, FALSE) < 0)
nerrors++;
} /* end for */
- if(nerrors)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ if (nerrors)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_io_term
*
@@ -2349,12 +2337,12 @@ done:
static herr_t
H5D__chunk_io_term(const H5D_chunk_map_t *fm)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
/* Single element I/O vs. multiple element I/O cleanup */
- if(fm->use_single) {
+ if (fm->use_single) {
/* Sanity checks */
HDassert(fm->sel_chunks == NULL);
HDassert(fm->single_chunk_info);
@@ -2366,17 +2354,17 @@ H5D__chunk_io_term(const H5D_chunk_map_t *fm)
} /* end if */
else {
/* Release the nodes on the list of selected chunks */
- if(fm->sel_chunks)
- if(H5SL_free(fm->sel_chunks, H5D__free_chunk_info, NULL) < 0)
+ if (fm->sel_chunks)
+ if (H5SL_free(fm->sel_chunks, H5D__free_chunk_info, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTNEXT, FAIL, "can't iterate over chunks")
} /* end else */
/* Free the memory chunk dataspace template */
- if(fm->mchunk_tmpl)
- if(H5S_close(fm->mchunk_tmpl) < 0)
+ if (fm->mchunk_tmpl)
+ if (H5S_close(fm->mchunk_tmpl) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "can't release memory chunk dataspace template")
#ifdef H5_HAVE_PARALLEL
- if(fm->select_chunk)
+ if (fm->select_chunk)
H5MM_xfree(fm->select_chunk);
#endif /* H5_HAVE_PARALLEL */
@@ -2384,7 +2372,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_term() */
-
/*-------------------------------------------------------------------------
* Function: H5D_chunk_idx_reset
*
@@ -2400,7 +2387,7 @@ done:
herr_t
H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2409,14 +2396,13 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
HDassert(storage->ops);
/* Reset index structures */
- if((storage->ops->reset)(storage, reset_addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
+ if ((storage->ops->reset)(storage, reset_addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_chunk_idx_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cinfo_cache_reset
*
@@ -2443,7 +2429,6 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cinfo_cache_update
*
@@ -2470,9 +2455,9 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
/* Stored the information to cache */
HDmemcpy(last->offset, udata->common.offset, sizeof(hsize_t) * udata->common.layout->ndims);
- last->nbytes = udata->nbytes;
+ last->nbytes = udata->nbytes;
last->filter_mask = udata->filter_mask;
- last->addr = udata->addr;
+ last->addr = udata->addr;
/* Indicate that the cached info is valid */
last->valid = TRUE;
@@ -2480,7 +2465,6 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_update() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cinfo_cache_found
*
@@ -2496,7 +2480,7 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
static hbool_t
H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udata)
{
- hbool_t ret_value = FALSE; /* Return value */
+ hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -2508,18 +2492,18 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
HDassert(udata->common.offset);
/* Check if the cached information is what is desired */
- if(last->valid) {
- unsigned u; /* Local index variable */
+ if (last->valid) {
+ unsigned u; /* Local index variable */
/* Check that the offset is the same */
- for(u = 0; u < udata->common.layout->ndims; u++)
- if(last->offset[u] != udata->common.offset[u])
+ for (u = 0; u < udata->common.layout->ndims; u++)
+ if (last->offset[u] != udata->common.offset[u])
HGOTO_DONE(FALSE)
/* Retrieve the information from the cache */
- udata->nbytes = last->nbytes;
+ udata->nbytes = last->nbytes;
udata->filter_mask = last->filter_mask;
- udata->addr = last->addr;
+ udata->addr = last->addr;
/* Indicate that the data was found */
HGOTO_DONE(TRUE)
@@ -2529,7 +2513,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_cinfo_cache_found() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_create
*
@@ -2548,40 +2531,40 @@ done:
herr_t
H5D__chunk_create(const H5D_t *dset /*in,out*/, hid_t dxpl_id)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dset);
HDassert(H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
+ dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
#ifndef NDEBUG
-{
- unsigned u; /* Local index variable */
+ {
+ unsigned u; /* Local index variable */
- for(u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
- HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
-}
+ for (u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
+ HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
+ }
#endif
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Create the index for the chunks */
- if((dset->shared->layout.storage.u.chunk.ops->create)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
+ if ((dset->shared->layout.storage.u.chunk.ops->create)(&idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_create() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_lookup
*
@@ -2596,13 +2579,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *chunk_offset,
- hsize_t chunk_idx, H5D_chunk_ud_t *udata)
+H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *chunk_offset, hsize_t chunk_idx,
+ H5D_chunk_ud_t *udata)
{
- H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
- hbool_t found = FALSE; /* In cache? */
- unsigned u; /* Counter */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
+ hbool_t found = FALSE; /* In cache? */
+ unsigned u; /* Counter */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2612,62 +2595,60 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *chunk_offset,
HDassert(udata);
/* Initialize the query information about the chunk we are looking for */
- udata->common.layout = &(dset->shared->layout.u.chunk);
+ udata->common.layout = &(dset->shared->layout.u.chunk);
udata->common.storage = &(dset->shared->layout.storage.u.chunk);
- udata->common.offset = chunk_offset;
- udata->common.rdcc = &(dset->shared->cache.chunk);
+ udata->common.offset = chunk_offset;
+ udata->common.rdcc = &(dset->shared->cache.chunk);
/* Reset information about the chunk we are looking for */
- udata->nbytes = 0;
+ udata->nbytes = 0;
udata->filter_mask = 0;
- udata->addr = HADDR_UNDEF;
+ udata->addr = HADDR_UNDEF;
/* Check for chunk in cache */
- if(dset->shared->cache.chunk.nslots > 0) {
+ if (dset->shared->cache.chunk.nslots > 0) {
udata->idx_hint = H5D_CHUNK_HASH(dset->shared, chunk_idx);
- ent = dset->shared->cache.chunk.slot[udata->idx_hint];
+ ent = dset->shared->cache.chunk.slot[udata->idx_hint];
- if(ent)
- for(u = 0, found = TRUE; u < dset->shared->layout.u.chunk.ndims - 1;
- u++)
- if(chunk_offset[u] != ent->offset[u]) {
+ if (ent)
+ for (u = 0, found = TRUE; u < dset->shared->layout.u.chunk.ndims - 1; u++)
+ if (chunk_offset[u] != ent->offset[u]) {
found = FALSE;
break;
} /* end if */
- } /* end if */
+ } /* end if */
/* Find chunk addr */
- if(found)
+ if (found)
udata->addr = ent->chunk_addr;
else {
/* Invalidate idx_hint, to signal that the chunk is not in cache */
udata->idx_hint = UINT_MAX;
/* Check for cached information */
- if(!H5D__chunk_cinfo_cache_found(&dset->shared->cache.chunk.last, udata)) {
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ if (!H5D__chunk_cinfo_cache_found(&dset->shared->cache.chunk.last, udata)) {
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Go get the chunk information */
- if((dset->shared->layout.storage.u.chunk.ops->get_addr)(&idx_info, udata) < 0)
+ if ((dset->shared->layout.storage.u.chunk.ops->get_addr)(&idx_info, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address")
/* Cache the information retrieved */
H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, udata);
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_flush_entry
*
@@ -2685,11 +2666,11 @@ done:
*/
static herr_t
H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache,
- H5D_rdcc_ent_t *ent, hbool_t reset)
+ H5D_rdcc_ent_t *ent, hbool_t reset)
{
- void *buf = NULL; /* Temporary buffer */
- hbool_t point_of_no_return = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ void * buf = NULL; /* Temporary buffer */
+ hbool_t point_of_no_return = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2700,32 +2681,32 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
HDassert(!ent->locked);
buf = ent->chunk;
- if(ent->dirty && !ent->deleted) {
- H5D_chunk_ud_t udata; /* pass through B-tree */
- hbool_t must_insert = FALSE; /* Whether the chunk must go through the "insert" method */
+ if (ent->dirty && !ent->deleted) {
+ H5D_chunk_ud_t udata; /* pass through B-tree */
+ hbool_t must_insert = FALSE; /* Whether the chunk must go through the "insert" method */
/* Set up user data for index callbacks */
- udata.common.layout = &dset->shared->layout.u.chunk;
+ udata.common.layout = &dset->shared->layout.u.chunk;
udata.common.storage = &dset->shared->layout.storage.u.chunk;
- udata.common.offset = ent->offset;
- udata.common.rdcc = &(dset->shared->cache.chunk);
- udata.filter_mask = 0;
- udata.nbytes = dset->shared->layout.u.chunk.size;
- udata.addr = ent->chunk_addr;
+ udata.common.offset = ent->offset;
+ udata.common.rdcc = &(dset->shared->cache.chunk);
+ udata.filter_mask = 0;
+ udata.nbytes = dset->shared->layout.u.chunk.size;
+ udata.addr = ent->chunk_addr;
/* Should the chunk be filtered before writing it to disk? */
- if(dset->shared->dcpl_cache.pline.nused) {
- size_t alloc = udata.nbytes; /* Bytes allocated for BUF */
- size_t nbytes; /* Chunk size (in bytes) */
+ if (dset->shared->dcpl_cache.pline.nused) {
+ size_t alloc = udata.nbytes; /* Bytes allocated for BUF */
+ size_t nbytes; /* Chunk size (in bytes) */
- if(!reset) {
+ if (!reset) {
/*
* Copy the chunk to a new buffer before running it through
* the pipeline because we'll want to save the original buffer
* for later.
*/
H5_CHECKED_ASSIGN(alloc, size_t, udata.nbytes, uint32_t);
- if(NULL == (buf = H5MM_malloc(alloc)))
+ if (NULL == (buf = H5MM_malloc(alloc)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline")
HDmemcpy(buf, ent->chunk, udata.nbytes);
} /* end if */
@@ -2738,15 +2719,15 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
* even if we can't write the data to disk.
*/
point_of_no_return = TRUE;
- ent->chunk = NULL;
+ ent->chunk = NULL;
} /* end else */
H5_CHECKED_ASSIGN(nbytes, size_t, udata.nbytes, uint32_t);
- if(H5Z_pipeline(&(dset->shared->dcpl_cache.pline), 0, &(udata.filter_mask), dxpl_cache->err_detect,
- dxpl_cache->filter_cb, &nbytes, &alloc, &buf) < 0)
+ if (H5Z_pipeline(&(dset->shared->dcpl_cache.pline), 0, &(udata.filter_mask),
+ dxpl_cache->err_detect, dxpl_cache->filter_cb, &nbytes, &alloc, &buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed")
#if H5_SIZEOF_SIZE_T > 4
/* Check for the chunk expanding too much to encode in a 32-bit value */
- if(nbytes > ((size_t)0xffffffff))
+ if (nbytes > ((size_t)0xffffffff))
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length")
#endif /* H5_SIZEOF_SIZE_T > 4 */
H5_CHECKED_ASSIGN(udata.nbytes, uint32_t, nbytes, size_t);
@@ -2754,27 +2735,27 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
/* Indicate that the chunk must go through 'insert' method */
must_insert = TRUE;
} /* end if */
- else if(!H5F_addr_defined(udata.addr))
+ else if (!H5F_addr_defined(udata.addr))
/* Indicate that the chunk must go through 'insert' method */
must_insert = TRUE;
/* Check if the chunk needs to be 'inserted' (could exist already and
* the 'insert' operation could resize it)
*/
- if(must_insert) {
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ if (must_insert) {
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Create the chunk it if it doesn't exist, or reallocate the chunk
* if its size changed.
*/
- if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
+ if ((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk")
/* Update the chunk entry's address, in case it was allocated or relocated */
@@ -2783,7 +2764,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
/* Write the data to the file */
HDassert(H5F_addr_defined(udata.addr));
- if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, udata.nbytes, dxpl_id, buf) < 0)
+ if (H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, udata.nbytes, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
/* Cache the chunk's info, in case it's accessed again shortly */
@@ -2797,17 +2778,17 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
} /* end if */
/* Reset, but do not free or removed from list */
- if(reset) {
+ if (reset) {
point_of_no_return = FALSE;
- if(buf == ent->chunk)
+ if (buf == ent->chunk)
buf = NULL;
- if(ent->chunk != NULL)
+ if (ent->chunk != NULL)
ent->chunk = (uint8_t *)H5D__chunk_xfree(ent->chunk, &(dset->shared->dcpl_cache.pline));
} /* end if */
done:
/* Free the temp buffer only if it's different than the entry chunk */
- if(buf != ent->chunk)
+ if (buf != ent->chunk)
H5MM_xfree(buf);
/*
@@ -2816,15 +2797,14 @@ done:
* output pipeline failed. Do not free the entry or remove it from the
* list.
*/
- if(ret_value < 0 && point_of_no_return) {
- if(ent->chunk)
+ if (ret_value < 0 && point_of_no_return) {
+ if (ent->chunk)
ent->chunk = (uint8_t *)H5D__chunk_xfree(ent->chunk, &(dset->shared->dcpl_cache.pline));
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_flush_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cache_evict
*
@@ -2840,10 +2820,10 @@ done:
*/
static herr_t
H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache,
- H5D_rdcc_ent_t *ent, hbool_t flush)
+ H5D_rdcc_ent_t *ent, hbool_t flush)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2853,23 +2833,23 @@ H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
HDassert(!ent->locked);
HDassert(ent->idx < rdcc->nslots);
- if(flush) {
+ if (flush) {
/* Flush */
- if(H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
+ if (H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
} /* end if */
else {
/* Don't flush, just free chunk */
- if(ent->chunk != NULL)
+ if (ent->chunk != NULL)
ent->chunk = (uint8_t *)H5D__chunk_xfree(ent->chunk, &(dset->shared->dcpl_cache.pline));
} /* end else */
/* Unlink from list */
- if(ent->prev)
+ if (ent->prev)
ent->prev->next = ent->next;
else
rdcc->head = ent->next;
- if(ent->next)
+ if (ent->next)
ent->next->prev = ent->prev;
else
rdcc->tail = ent->prev;
@@ -2877,7 +2857,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
/* Remove from cache */
rdcc->slot[ent->idx] = NULL;
- ent->idx = UINT_MAX;
+ ent->idx = UINT_MAX;
rdcc->nbytes_used -= dset->shared->layout.u.chunk.size;
--rdcc->nused;
@@ -2887,7 +2867,6 @@ H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_evict() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cache_prune
*
@@ -2903,17 +2882,16 @@ H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id,
- const H5D_dxpl_cache_t *dxpl_cache, size_t size)
+H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *dxpl_cache, size_t size)
{
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- size_t total = rdcc->nbytes_max;
- const int nmeth = 2; /*number of methods */
- int w[1]; /*weighting as an interval */
- H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
- H5D_rdcc_ent_t *n[2]; /*list next pointers */
- int nerrors = 0; /* Accumulated error count during preemptions */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ size_t total = rdcc->nbytes_max;
+ const int nmeth = 2; /* Number of methods */
+ int w[1]; /* Weighting as an interval */
+ H5D_rdcc_ent_t * p[2], *cur; /* List pointers */
+ H5D_rdcc_ent_t * n[2]; /* List next pointers */
+ int nerrors = 0; /* Accumulated error count during preemptions */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2931,71 +2909,72 @@ H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id,
p[0] = rdcc->head;
p[1] = NULL;
- while((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
- int i; /* Local index variable */
+ while ((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
+ int i; /* Local index variable */
- /* Introduce new pointers */
- for(i = 0; i < nmeth - 1; i++)
- if(0 == w[i])
+ /* Introduce new pointers */
+ for (i = 0; i < nmeth - 1; i++)
+ if (0 == w[i])
p[i + 1] = rdcc->head;
- /* Compute next value for each pointer */
- for(i = 0; i < nmeth; i++)
+ /* Compute next value for each pointer */
+ for (i = 0; i < nmeth; i++)
n[i] = p[i] ? p[i]->next : NULL;
- /* Give each method a chance */
- for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
- if(0 == i && p[0] && !p[0]->locked &&
- ((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
- (0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
- (dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
- /*
- * Method 0: Preempt entries that have been completely written
- * and/or completely read but not entries that are partially
- * written or partially read.
- */
- cur = p[0];
- } else if(1 == i && p[1] && !p[1]->locked) {
- /*
- * Method 1: Preempt the entry without regard to
- * considerations other than being locked. This is the last
- * resort preemption.
- */
- cur = p[1];
- } else {
- /* Nothing to preempt at this point */
- cur = NULL;
- }
+ /* Give each method a chance */
+ for (i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
+ if (0 == i && p[0] && !p[0]->locked &&
+ ((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
+ (0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
+ (dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
+ /*
+ * Method 0: Preempt entries that have been completely written
+ * and/or completely read but not entries that are partially
+ * written or partially read.
+ */
+ cur = p[0];
+ }
+ else if (1 == i && p[1] && !p[1]->locked) {
+ /*
+ * Method 1: Preempt the entry without regard to
+ * considerations other than being locked. This is the last
+ * resort preemption.
+ */
+ cur = p[1];
+ }
+ else {
+ /* Nothing to preempt at this point */
+ cur = NULL;
+ }
- if(cur) {
- int j; /* Local index variable */
+ if (cur) {
+ int j; /* Local index variable */
- for(j = 0; j < nmeth; j++) {
- if(p[j] == cur)
+ for (j = 0; j < nmeth; j++) {
+ if (p[j] == cur)
p[j] = NULL;
- if(n[j] == cur)
+ if (n[j] == cur)
n[j] = cur->next;
- } /* end for */
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, cur, TRUE) < 0)
+ } /* end for */
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, cur, TRUE) < 0)
nerrors++;
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
- /* Advance pointers */
- for(i = 0; i < nmeth; i++)
+ /* Advance pointers */
+ for (i = 0; i < nmeth; i++)
p[i] = n[i];
- for(i = 0; i < nmeth - 1; i++)
+ for (i = 0; i < nmeth - 1; i++)
w[i] -= 1;
} /* end while */
- if(nerrors)
- HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
+ if (nerrors)
+ HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_prune() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_lock
*
@@ -3024,24 +3003,26 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
- hbool_t relax)
+H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax)
{
- const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
- const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info - always equal to the pline passed to H5D__chunk_alloc */
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
- H5D_rdcc_ent_t *ent = NULL; /*cache entry */
- haddr_t chunk_addr = HADDR_UNDEF; /* Address of chunk on disk */
- size_t chunk_size; /*size of a chunk */
- void *chunk = NULL; /*the file chunk */
- void *ret_value; /*return value */
+ const H5D_t * dset = io_info->dset; /* Local pointer to the dataset info */
+ const H5O_pline_t *pline =
+ &(dset->shared->dcpl_cache
+ .pline); /* I/O pipeline info - always equal to the pline passed to H5D__chunk_alloc */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ const H5O_fill_t * fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
+ H5D_rdcc_ent_t * ent = NULL; /*cache entry */
+ haddr_t chunk_addr = HADDR_UNDEF; /* Address of chunk on disk */
+ size_t chunk_size; /*size of a chunk */
+ void * chunk = NULL; /*the file chunk */
+ void * ret_value; /*return value */
FUNC_ENTER_PACKAGE
+ /* Sanity checks */
HDassert(io_info);
HDassert(io_info->dxpl_cache);
HDassert(io_info->store);
@@ -3054,7 +3035,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Check if the chunk is in the cache */
- if(UINT_MAX != udata->idx_hint) {
+ if (UINT_MAX != udata->idx_hint) {
/* Sanity check */
HDassert(udata->idx_hint < rdcc->nslots);
HDassert(rdcc->slot[udata->idx_hint]);
@@ -3063,13 +3044,13 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
ent = rdcc->slot[udata->idx_hint];
#ifndef NDEBUG
-{
- unsigned u; /*counters */
+ {
+ unsigned u; /*counters */
- /* Make sure this is the right chunk */
- for(u = 0; u < layout->u.chunk.ndims; u++)
- HDassert(io_info->store->chunk.offset[u] == ent->offset[u]);
-}
+ /* Make sure this is the right chunk */
+ for (u = 0; u < layout->u.chunk.ndims; u++)
+ HDassert(io_info->store->chunk.offset[u] == ent->offset[u]);
+ }
#endif /* NDEBUG */
/*
@@ -3077,7 +3058,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
*/
rdcc->stats.nhits++;
} /* end if */
- else if(relax) {
+ else if (relax) {
/*
* Not in the cache, but we're about to overwrite the whole thing
* anyway, so just allocate a buffer for it but don't initialize that
@@ -3089,7 +3070,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Still save the chunk address so the cache stays consistent */
chunk_addr = udata->addr;
- if(NULL == (chunk = H5D__chunk_alloc(chunk_size, pline)))
+ if (NULL == (chunk = H5D__chunk_alloc(chunk_size, pline)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
/* In the case that some dataset functions look through this data,
@@ -3106,20 +3087,22 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
chunk_addr = udata->addr;
/* Check if the chunk exists on disk */
- if(H5F_addr_defined(chunk_addr)) {
- size_t chunk_alloc = 0; /*allocated chunk size */
+ if (H5F_addr_defined(chunk_addr)) {
+ size_t chunk_alloc = 0; /*allocated chunk size */
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
H5_CHECKED_ASSIGN(chunk_alloc, size_t, udata->nbytes, uint32_t);
- if(NULL == (chunk = H5D__chunk_alloc(chunk_alloc, pline)))
+ if (NULL == (chunk = H5D__chunk_alloc(chunk_alloc, pline)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
- if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, chunk_addr, chunk_alloc, io_info->dxpl_id, chunk) < 0)
+ if (H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, chunk_addr, chunk_alloc, io_info->dxpl_id,
+ chunk) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk")
- if(pline->nused) {
- if(H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &(udata->filter_mask), io_info->dxpl_cache->err_detect,
- io_info->dxpl_cache->filter_cb, &chunk_alloc, &chunk_alloc, &chunk) < 0)
+ if (pline->nused) {
+ if (H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &(udata->filter_mask),
+ io_info->dxpl_cache->err_detect, io_info->dxpl_cache->filter_cb,
+ &chunk_alloc, &chunk_alloc, &chunk) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, NULL, "data pipeline read failed")
H5_CHECKED_ASSIGN(udata->nbytes, uint32_t, chunk_alloc, size_t);
} /* end if */
@@ -3128,23 +3111,22 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
rdcc->stats.nmisses++;
} /* end if */
else {
- H5D_fill_value_t fill_status;
+ H5D_fill_value_t fill_status;
/* Sanity check */
HDassert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
- if(NULL == (chunk = H5D__chunk_alloc(chunk_size, pline)))
+ if (NULL == (chunk = H5D__chunk_alloc(chunk_size, pline)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
- if(H5P_is_fill_value_defined(fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined")
- if(fill->fill_time == H5D_FILL_TIME_ALLOC ||
- (fill->fill_time == H5D_FILL_TIME_IFSET &&
- (fill_status == H5D_FILL_VALUE_USER_DEFINED ||
- fill_status == H5D_FILL_VALUE_DEFAULT))) {
+ if (fill->fill_time == H5D_FILL_TIME_ALLOC ||
+ (fill->fill_time == H5D_FILL_TIME_IFSET &&
+ (fill_status == H5D_FILL_VALUE_USER_DEFINED || fill_status == H5D_FILL_VALUE_DEFAULT))) {
/*
* The chunk doesn't exist in the file. Replicate the fill
* value throughout the chunk, if the fill value is defined.
@@ -3152,16 +3134,16 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
- if(H5D__fill_init(&fb_info, chunk, NULL, NULL, NULL, NULL,
- &dset->shared->dcpl_cache.fill, dset->shared->type,
- dset->shared->type_id, (size_t)0, chunk_size, io_info->dxpl_id) < 0)
+ if (H5D__fill_init(&fb_info, chunk, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill,
+ dset->shared->type, dset->shared->type_id, (size_t)0, chunk_size,
+ io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't initialize fill buffer info")
fb_info_init = TRUE;
/* Check for VL datatype & non-default fill value */
- if(fb_info.has_vlen_fill_type)
+ if (fb_info.has_vlen_fill_type)
/* Fill the buffer with VL datatype fill values */
- if(H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, io_info->dxpl_id) < 0)
+ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer")
} /* end if */
else
@@ -3170,48 +3152,49 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Increment # of creations */
rdcc->stats.ninits++;
} /* end else */
- } /* end else */
+ } /* end else */
HDassert(chunk_size > 0);
- if(ent) {
+ if (ent) {
/*
- * The chunk is not at the beginning of the cache; move it backward
+ * If the chunk is not at the beginning of the cache; move it backward
* by one slot. This is how we implement the LRU preemption
* algorithm.
*/
HDassert(ent);
- if(ent->next) {
- if(ent->next->next)
+ if (ent->next) {
+ if (ent->next->next)
ent->next->next->prev = ent;
else
rdcc->tail = ent;
ent->next->prev = ent->prev;
- if(ent->prev)
+ if (ent->prev)
ent->prev->next = ent->next;
else
rdcc->head = ent->next;
- ent->prev = ent->next;
- ent->next = ent->next->next;
+ ent->prev = ent->next;
+ ent->next = ent->next->next;
ent->prev->next = ent;
} /* end if */
- } /* end if */
- else if(rdcc->nslots > 0 && chunk_size <= rdcc->nbytes_max) {
+ } /* end if */
+ else if (rdcc->nslots > 0 && chunk_size <= rdcc->nbytes_max) {
/* Calculate the index */
udata->idx_hint = H5D_CHUNK_HASH(dset->shared, io_info->store->chunk.index);
/* Add the chunk to the cache only if the slot is not already locked */
ent = rdcc->slot[udata->idx_hint];
- if(!ent || !ent->locked) {
+ if (!ent || !ent->locked) {
/* Preempt enough things from the cache to make room */
- if(ent) {
- if(H5D__chunk_cache_evict(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, ent, TRUE) < 0)
+ if (ent) {
+ if (H5D__chunk_cache_evict(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, ent, TRUE) <
+ 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk from cache")
} /* end if */
- if(H5D__chunk_cache_prune(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, chunk_size) < 0)
+ if (H5D__chunk_cache_prune(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, chunk_size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache")
/* Create a new entry */
- if(NULL == (ent = H5FL_CALLOC(H5D_rdcc_ent_t)))
+ if (NULL == (ent = H5FL_CALLOC(H5D_rdcc_ent_t)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry")
/* Initialize the new entry */
@@ -3224,15 +3207,15 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Add it to the cache */
HDassert(NULL == rdcc->slot[udata->idx_hint]);
rdcc->slot[udata->idx_hint] = ent;
- ent->idx = udata->idx_hint;
+ ent->idx = udata->idx_hint;
rdcc->nbytes_used += chunk_size;
rdcc->nused++;
/* Add it to the linked list */
- if(rdcc->tail) {
+ if (rdcc->tail) {
rdcc->tail->next = ent;
- ent->prev = rdcc->tail;
- rdcc->tail = ent;
+ ent->prev = rdcc->tail;
+ rdcc->tail = ent;
} /* end if */
else
rdcc->head = rdcc->tail = ent;
@@ -3242,7 +3225,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
ent = NULL;
} /* end else */
- if(!ent)
+ if (!ent)
/*
* The chunk cannot be placed in cache so we don't cache it. This is the
* reason all those arguments have to be repeated for the unlock
@@ -3251,10 +3234,10 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
udata->idx_hint = UINT_MAX;
/* Lock the chunk into the cache */
- if(ent) {
+ if (ent) {
HDassert(!ent->locked);
ent->locked = TRUE;
- chunk = ent->chunk;
+ chunk = ent->chunk;
} /* end if */
/* Set return value */
@@ -3262,18 +3245,17 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D__fill_term(&fb_info) < 0)
+ if (fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, NULL, "Can't release fill buffer info")
/* Release the chunk allocated, on error */
- if(!ret_value)
- if(chunk)
+ if (!ret_value)
+ if (chunk)
chunk = H5D__chunk_xfree(chunk, pline);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_lock() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_unlock
*
@@ -3297,57 +3279,60 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
- hbool_t dirty, void *chunk, uint32_t naccessed)
+H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk,
+ uint32_t naccessed)
{
- const H5O_layout_t *layout = &(io_info->dset->shared->layout); /* Dataset layout */
- const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_layout_t *layout = &(io_info->dset->shared->layout); /* Dataset layout */
+ const H5D_rdcc_t * rdcc = &(io_info->dset->shared->cache.chunk);
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
+ /* Sanity check */
HDassert(io_info);
HDassert(udata);
- if(UINT_MAX == udata->idx_hint) {
+ if (UINT_MAX == udata->idx_hint) {
/*
* It's not in the cache, probably because it's too big. If it's
* dirty then flush it to disk. In any case, free the chunk.
* Note: we have to copy the layout and filter messages so we
* don't discard the `const' qualifier.
*/
- if(dirty) {
- H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
+ if (dirty) {
+ H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
HDmemset(&fake_ent, 0, sizeof(fake_ent));
fake_ent.dirty = TRUE;
- HDmemcpy(fake_ent.offset, io_info->store->chunk.offset, layout->u.chunk.ndims * sizeof(fake_ent.offset[0]));
+ HDmemcpy(fake_ent.offset, io_info->store->chunk.offset,
+ layout->u.chunk.ndims * sizeof(fake_ent.offset[0]));
HDassert(layout->u.chunk.size > 0);
fake_ent.chunk_addr = udata->addr;
- fake_ent.chunk = (uint8_t *)chunk;
+ fake_ent.chunk = (uint8_t *)chunk;
- if(H5D__chunk_flush_entry(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, &fake_ent, TRUE) < 0)
+ if (H5D__chunk_flush_entry(io_info->dset, io_info->dxpl_id, io_info->dxpl_cache, &fake_ent,
+ TRUE) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
} /* end if */
else {
- if(chunk)
+ if (chunk)
chunk = H5D__chunk_xfree(chunk, &(io_info->dset->shared->dcpl_cache.pline));
} /* end else */
- } /* end if */
+ } /* end if */
else {
- H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
+ H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
- HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
+ HDassert(udata->idx_hint < rdcc->nslots);
+ HDassert(rdcc->slot[udata->idx_hint]);
+ HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
/*
* It's in the cache so unlock it.
*/
ent = rdcc->slot[udata->idx_hint];
HDassert(ent->locked);
- if(dirty) {
+ if (dirty) {
ent->dirty = TRUE;
ent->wr_count -= MIN(ent->wr_count, naccessed);
} /* end if */
@@ -3360,7 +3345,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_unlock() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_allocated_cb
*
@@ -3374,7 +3358,6 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static int
H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
@@ -3387,7 +3370,6 @@ H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_allocated_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_allocated
*
@@ -3405,13 +3387,13 @@ H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
herr_t
H5D__chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
- H5D_rdcc_ent_t *ent; /* Cache entry */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- hsize_t chunk_bytes = 0; /* Number of bytes allocated for chunks */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ const H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
+ H5D_rdcc_ent_t * ent; /* Cache entry */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ hsize_t chunk_bytes = 0; /* Number of bytes allocated for chunks */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3419,26 +3401,27 @@ H5D__chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes)
HDassert(dset->shared);
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Search for cached chunks that haven't been written out */
- for(ent = rdcc->head; ent; ent = ent->next) {
+ for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if(H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, FALSE) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
- } /* end for */
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Iterate over the chunks */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_allocated_cb, &chunk_bytes) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve allocated chunk information from index")
+ if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_allocated_cb,
+ &chunk_bytes) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
+ "unable to retrieve allocated chunk information from index")
/* Set number of bytes for caller */
*nbytes = chunk_bytes;
@@ -3447,7 +3430,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_allocated() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_allocate
*
@@ -3463,37 +3445,37 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
- hsize_t old_dim[])
+H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, hsize_t old_dim[])
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */
- hsize_t min_unalloc[H5O_LAYOUT_NDIMS]; /* First chunk in each dimension that is unallocated */
- hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated */
- hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
- size_t orig_chunk_size; /* Original size of chunk in bytes */
- size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
- unsigned filter_mask = 0; /* Filter mask for chunks that have them */
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
- const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
- H5D_fill_value_t fill_status; /* The fill value status */
- hbool_t should_fill = FALSE; /* Whether fill values should be written */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */
+ hsize_t min_unalloc[H5O_LAYOUT_NDIMS]; /* First chunk in each dimension that is unallocated */
+ hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated */
+ hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
+ size_t orig_chunk_size; /* Original size of chunk in bytes */
+ size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
+ unsigned filter_mask = 0; /* Filter mask for chunks that have them */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ const H5O_pline_t * pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
+ const H5O_fill_t * fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
+ H5D_fill_value_t fill_status; /* The fill value status */
+ hbool_t should_fill = FALSE; /* Whether fill values should be written */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
#ifdef H5_HAVE_PARALLEL
- hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
- hbool_t using_mpi = FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
+ hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
+ hbool_t using_mpi =
+ FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
H5D_chunk_coll_info_t chunk_info; /* chunk address information for doing I/O */
-#endif /* H5_HAVE_PARALLEL */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
- int space_ndims; /* Dataset's space rank */
- hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */
- const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
- int op_dim; /* Current operationg dimension */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+#endif /* H5_HAVE_PARALLEL */
+ hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ int space_ndims; /* Dataset's space rank */
+ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */
+ const uint32_t * chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
+ int op_dim; /* Current operationg dimension */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3503,8 +3485,8 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
/* Retrieve the dataset dimensions */
- if((space_ndims = H5S_get_simple_extent_dims(dset->shared->space, space_dim, NULL)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get simple dataspace info")
+ if ((space_ndims = H5S_get_simple_extent_dims(dset->shared->space, space_dim, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get simple dataspace info")
space_dim[space_ndims] = layout->u.chunk.dim[space_ndims];
/* The last dimension in chunk_offset is always 0 */
@@ -3512,8 +3494,8 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
/* Check if any space dimensions are 0, if so we do not have to do anything
*/
- for(op_dim=0; op_dim<space_ndims; op_dim++)
- if(space_dim[op_dim] == 0) {
+ for (op_dim = 0; op_dim < space_ndims; op_dim++)
+ if (space_dim[op_dim] == 0) {
/* Reset any cached chunk info for this dataset */
H5D__chunk_cinfo_cache_reset(&dset->shared->cache.chunk.last);
HGOTO_DONE(SUCCEED)
@@ -3521,25 +3503,25 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
- if(H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
+ if (H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* Set the MPI-capable file driver flag */
using_mpi = TRUE;
/* init chunk info stuff for collective I/O */
chunk_info.num_io = 0;
- chunk_info.addr = NULL;
- } /* end if */
-#endif /* H5_HAVE_PARALLEL */
+ chunk_info.addr = NULL;
+ } /* end if */
+#endif /* H5_HAVE_PARALLEL */
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Get original chunk size */
H5_CHECKED_ASSIGN(orig_chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Check the dataset's fill-value status */
- if(H5P_is_fill_value_defined(fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* If we are filling the dataset on allocation or "if set" and
@@ -3547,22 +3529,22 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
* or if there are any pipeline filters defined,
* set the "should fill" flag
*/
- if((!full_overwrite && (fill->fill_time == H5D_FILL_TIME_ALLOC ||
- (fill->fill_time == H5D_FILL_TIME_IFSET &&
- (fill_status == H5D_FILL_VALUE_USER_DEFINED ||
- fill_status == H5D_FILL_VALUE_DEFAULT))))
- || pline->nused > 0)
+ if ((!full_overwrite &&
+ (fill->fill_time == H5D_FILL_TIME_ALLOC ||
+ (fill->fill_time == H5D_FILL_TIME_IFSET &&
+ (fill_status == H5D_FILL_VALUE_USER_DEFINED || fill_status == H5D_FILL_VALUE_DEFAULT)))) ||
+ pline->nused > 0)
should_fill = TRUE;
/* Check if fill values should be written to chunks */
- if(should_fill) {
+ if (should_fill) {
/* Initialize the fill value buffer */
/* (delay allocating fill buffer for VL datatypes until refilling) */
/* (casting away const OK - QAK) */
- if(H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_alloc,
- (void *)pline, (H5MM_free_t)H5D__chunk_xfree, (void *)pline,
- &dset->shared->dcpl_cache.fill, dset->shared->type,
- dset->shared->type_id, (size_t)0, orig_chunk_size, dxpl_id) < 0)
+ if (H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_alloc, (void *)pline,
+ (H5MM_free_t)H5D__chunk_xfree, (void *)pline, &dset->shared->dcpl_cache.fill,
+ dset->shared->type, dset->shared->type_id, (size_t)0, orig_chunk_size,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
@@ -3570,35 +3552,35 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
/* (only do this in advance when the chunk info can be re-used (i.e.
* it doesn't contain any non-default VL datatype fill values)
*/
- if(!fb_info.has_vlen_fill_type && pline->nused > 0) {
+ if (!fb_info.has_vlen_fill_type && pline->nused > 0) {
size_t buf_size = orig_chunk_size;
/* Push the chunk through the filters */
- if(H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb, &orig_chunk_size, &buf_size, &fb_info.fill_buf) < 0)
+ if (H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb,
+ &orig_chunk_size, &buf_size, &fb_info.fill_buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed")
#if H5_SIZEOF_SIZE_T > 4
/* Check for the chunk expanding too much to encode in a 32-bit value */
- if(orig_chunk_size > ((size_t)0xffffffff))
+ if (orig_chunk_size > ((size_t)0xffffffff))
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length")
-#endif /* H5_SIZEOF_SIZE_T > 4 */
+#endif /* H5_SIZEOF_SIZE_T > 4 */
} /* end if */
- } /* end if */
+ } /* end if */
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Calculate the minimum and maximum chunk offsets in each dimension. Note
* that we assume here that all elements of space_dim are > 0. This is
* checked at the top of this function */
- for(op_dim=0; op_dim<space_ndims; op_dim++) {
- min_unalloc[op_dim] = ((old_dim[op_dim] + chunk_dim[op_dim] - 1)
- / chunk_dim[op_dim]) * chunk_dim[op_dim];
- max_unalloc[op_dim] = ((space_dim[op_dim] - 1) / chunk_dim[op_dim])
- * chunk_dim[op_dim];
+ for (op_dim = 0; op_dim < space_ndims; op_dim++) {
+ min_unalloc[op_dim] =
+ ((old_dim[op_dim] + chunk_dim[op_dim] - 1) / chunk_dim[op_dim]) * chunk_dim[op_dim];
+ max_unalloc[op_dim] = ((space_dim[op_dim] - 1) / chunk_dim[op_dim]) * chunk_dim[op_dim];
} /* end for */
/* Loop over all chunks */
@@ -3619,12 +3601,12 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
* certain dimension, max_unalloc is updated in order to avoid allocating
* those chunks again.
*/
- for(op_dim=0; op_dim<space_ndims; op_dim++) {
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
- int i; /* Local index variable */
+ for (op_dim = 0; op_dim < space_ndims; op_dim++) {
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ int i; /* Local index variable */
/* Check if allocation along this dimension is really necessary */
- if(min_unalloc[op_dim] > max_unalloc[op_dim])
+ if (min_unalloc[op_dim] > max_unalloc[op_dim])
continue;
else {
/* Reset the chunk offset indices */
@@ -3634,7 +3616,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
carry = FALSE;
} /* end else */
- while(!carry) {
+ while (!carry) {
/* Reset size of chunk in bytes, in case filtered size changes */
chunk_size = orig_chunk_size;
@@ -3644,12 +3626,11 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
hsize_t chunk_idx;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index((unsigned)space_ndims, chunk_offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks,
- &chunk_idx) < 0)
+ if (H5VM_chunk_index((unsigned)space_ndims, chunk_offset, layout->u.chunk.dim,
+ layout->u.chunk.down_chunks, &chunk_idx) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chunk_idx, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
HDassert(!H5F_addr_defined(udata.addr));
@@ -3658,89 +3639,93 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
{
- unsigned u; /* Local index variable */
- hbool_t outside_orig = FALSE;
+ unsigned u; /* Local index variable */
+ hbool_t outside_orig = FALSE;
- for(u = 0; u < (unsigned)space_ndims; u++) {
+ for (u = 0; u < (unsigned)space_ndims; u++) {
HDassert(chunk_offset[u] < space_dim[u]);
- if(chunk_offset[u] >= old_dim[u])
+ if (chunk_offset[u] >= old_dim[u])
outside_orig = TRUE;
} /* end for */
HDassert(outside_orig);
} /* end block */
-#endif /* NDEBUG */
+#endif /* NDEBUG */
/* Check for VL datatype & non-default fill value */
- if(fb_info_init && fb_info.has_vlen_fill_type) {
+ if (fb_info_init && fb_info.has_vlen_fill_type) {
/* Sanity check */
HDassert(should_fill);
#ifdef H5_HAVE_PARALLEL
- HDassert(!using_mpi); /* Can't write VL datatypes in parallel currently */
+ HDassert(!using_mpi); /* Can't write VL datatypes in parallel currently */
#endif
/* Check to make sure the buffer is large enough. It is
* possible (though ill-advised) for the filter to shrink the
- * buffer. */
- if(fb_info.fill_buf_size < orig_chunk_size) {
- if(NULL == (fb_info.fill_buf = H5D__chunk_realloc(
- fb_info.fill_buf, orig_chunk_size, pline)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory reallocation failed for raw data chunk")
+ * buffer.
+ */
+ if (fb_info.fill_buf_size < orig_chunk_size) {
+ if (NULL ==
+ (fb_info.fill_buf = H5D__chunk_realloc(fb_info.fill_buf, orig_chunk_size, pline)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory reallocation failed for raw data chunk")
fb_info.fill_buf_size = orig_chunk_size;
} /* end if */
/* Fill the buffer with VL datatype fill values */
- if(H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
+ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
/* Check if there are filters which need to be applied to the chunk */
- if(pline->nused > 0) {
+ if (pline->nused > 0) {
size_t nbytes = orig_chunk_size;
/* Push the chunk through the filters */
- if(H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb, &nbytes, &fb_info.fill_buf_size, &fb_info.fill_buf) < 0)
+ if (H5Z_pipeline(pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb,
+ &nbytes, &fb_info.fill_buf_size, &fb_info.fill_buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed")
#if H5_SIZEOF_SIZE_T > 4
/* Check for the chunk expanding too much to encode in a 32-bit value */
- if(nbytes > ((size_t)0xffffffff))
+ if (nbytes > ((size_t)0xffffffff))
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length")
#endif /* H5_SIZEOF_SIZE_T > 4 */
/* Keep the number of bytes the chunk turned in to */
chunk_size = nbytes;
} /* end if */
- } /* end if */
+ } /* end if */
/* Initialize the chunk information */
- udata.common.layout = &layout->u.chunk;
+ udata.common.layout = &layout->u.chunk;
udata.common.storage = &layout->storage.u.chunk;
- udata.common.offset = chunk_offset;
- udata.common.rdcc = NULL;
+ udata.common.offset = chunk_offset;
+ udata.common.rdcc = NULL;
H5_CHECKED_ASSIGN(udata.nbytes, uint32_t, chunk_size, size_t);
udata.filter_mask = filter_mask;
- udata.addr = HADDR_UNDEF;
+ udata.addr = HADDR_UNDEF;
/* Allocate the chunk with all processes */
- if((ops->insert)(&idx_info, &udata) < 0)
+ if ((ops->insert)(&idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert record into chunk index")
HDassert(H5F_addr_defined(udata.addr));
/* Check if fill values should be written to chunks */
- if(should_fill) {
+ if (should_fill) {
/* Sanity check */
HDassert(fb_info_init);
HDassert(udata.nbytes == chunk_size);
#ifdef H5_HAVE_PARALLEL
/* Check if this file is accessed with an MPI-capable file driver */
- if(using_mpi) {
+ if (using_mpi) {
/* collect all chunk addresses to be written to
write collectively at the end */
/* allocate/resize address array if no more space left */
- if(0 == chunk_info.num_io % 1024) {
- if(NULL == (chunk_info.addr = (haddr_t *)HDrealloc
- (chunk_info.addr, (chunk_info.num_io + 1024) * sizeof(haddr_t))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for chunk addresses");
+ if (0 == chunk_info.num_io % 1024) {
+ if (NULL == (chunk_info.addr = (haddr_t *)HDrealloc(
+ chunk_info.addr, (chunk_info.num_io + 1024) * sizeof(haddr_t))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for chunk addresses");
} /* end if */
/* Store the chunk's address for later */
@@ -3752,35 +3737,35 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
- if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, chunk_size,
- dxpl_id, fb_info.fill_buf) < 0)
+ if (H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, chunk_size, dxpl_id,
+ fb_info.fill_buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
#ifdef H5_HAVE_PARALLEL
} /* end else */
-#endif /* H5_HAVE_PARALLEL */
- } /* end if */
+#endif /* H5_HAVE_PARALLEL */
+ } /* end if */
/* Increment indices */
carry = TRUE;
- for(i = ((int)space_ndims - 1); i >= 0; --i) {
+ for (i = ((int)space_ndims - 1); i >= 0; --i) {
chunk_offset[i] += chunk_dim[i];
- if(chunk_offset[i] > max_unalloc[i]) {
- if(i == op_dim)
+ if (chunk_offset[i] > max_unalloc[i]) {
+ if (i == op_dim)
chunk_offset[i] = min_unalloc[i];
else
chunk_offset[i] = 0;
- } /* end if */
+ } /* end if */
else {
carry = FALSE;
break;
} /* end else */
- } /* end for */
- } /* end while(!carry) */
+ } /* end for */
+ } /* end while(!carry) */
/* Adjust max_unalloc so we don't allocate the same chunk twice. Also
* check if this dimension started from 0 (and hence allocated all of
* the chunks. */
- if(min_unalloc[op_dim] == 0)
+ if (min_unalloc[op_dim] == 0)
break;
else
max_unalloc[op_dim] = min_unalloc[op_dim] - chunk_dim[op_dim];
@@ -3788,10 +3773,10 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
#ifdef H5_HAVE_PARALLEL
/* do final collective I/O */
- if(using_mpi && blocks_written) {
- if(H5D__chunk_collective_fill(dset, dxpl_id, &chunk_info, chunk_size, fb_info.fill_buf) < 0)
+ if (using_mpi && blocks_written) {
+ if (H5D__chunk_collective_fill(dset, dxpl_id, &chunk_info, chunk_size, fb_info.fill_buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
/* Reset any cached chunk info for this dataset */
@@ -3799,12 +3784,12 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D__fill_term(&fb_info) < 0)
+ if (fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
#ifdef H5_HAVE_PARALLEL
- if(using_mpi) {
- if(chunk_info.addr)
+ if (using_mpi) {
+ if (chunk_info.addr)
HDfree(chunk_info.addr);
} /* end if */
#endif
@@ -3813,7 +3798,7 @@ done:
} /* end H5D__chunk_allocate() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_collective_fill
*
@@ -3829,39 +3814,39 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id,
- H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf)
+H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id, H5D_chunk_coll_info_t *chunk_info,
+ size_t chunk_size, const void *fill_buf)
{
- MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
- int mpi_rank = (-1); /* This process's rank */
- int mpi_size = (-1); /* MPI Comm size */
- int mpi_code; /* MPI return code */
- size_t num_blocks; /* Number of blocks between processes. */
- size_t leftover_blocks; /* Number of leftover blocks to handle */
- int blocks, leftover, block_len; /* converted to int for MPI */
- MPI_Aint *chunk_disp_array = NULL;
- int *block_lens = NULL;
+ MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
+ int mpi_rank = (-1); /* This process's rank */
+ int mpi_size = (-1); /* MPI Comm size */
+ int mpi_code; /* MPI return code */
+ size_t num_blocks; /* Number of blocks between processes. */
+ size_t leftover_blocks; /* Number of leftover blocks to handle */
+ int blocks, leftover, block_len; /* converted to int for MPI */
+ MPI_Aint * chunk_disp_array = NULL;
+ int * block_lens = NULL;
MPI_Datatype mem_type, file_type;
- hid_t data_dxpl_id = -1; /* DXPL ID to use for raw data I/O operations */
- int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hid_t data_dxpl_id = -1; /* DXPL ID to use for raw data I/O operations */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Get the MPI communicator */
- if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
+ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator")
/* Get the MPI rank */
- if((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0)
+ if ((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank")
/* Get the MPI size */
- if((mpi_size = H5F_mpi_get_size(dset->oloc.file)) < 0)
+ if ((mpi_size = H5F_mpi_get_size(dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size")
/* Get a copy of the DXPL, to modify */
- if((data_dxpl_id = H5P_copy_plist((H5P_genplist_t *)H5I_object(dxpl_id), TRUE)) < 0)
+ if ((data_dxpl_id = H5P_copy_plist((H5P_genplist_t *)H5I_object(dxpl_id), TRUE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property list")
/* Distribute evenly the number of blocks between processes. */
@@ -3875,34 +3860,34 @@ H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id,
/* Cast values to types needed by MPI */
H5_CHECKED_ASSIGN(blocks, int, num_blocks, size_t);
H5_CHECKED_ASSIGN(leftover, int, leftover_blocks, size_t);
- H5_CHECKED_ASSIGN(block_len, int, chunk_size, size_t);
+ H5_CHECKED_ASSIGN(block_len, int, chunk_size, size_t);
/* Allocate buffers */
/* (MSC - should not need block_lens if MPI_type_create_hindexed_block is working) */
- if(NULL == (block_lens = (int *)H5MM_malloc((blocks + 1) * sizeof(int))))
+ if (NULL == (block_lens = (int *)H5MM_malloc((blocks + 1) * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk lengths buffer")
- if(NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc((blocks + 1) * sizeof(MPI_Aint))))
+ if (NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc((blocks + 1) * sizeof(MPI_Aint))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file displacement buffer")
- for(i = 0 ; i < blocks ; i++) {
+ for (i = 0; i < blocks; i++) {
/* store the chunk address as an MPI_Aint */
- chunk_disp_array[i] = (MPI_Aint)(chunk_info->addr[i + mpi_rank*blocks]);
+ chunk_disp_array[i] = (MPI_Aint)(chunk_info->addr[i + mpi_rank * blocks]);
/* MSC - should not need this if MPI_type_create_hindexed_block is working */
block_lens[i] = block_len;
/* make sure that the addresses in the datatype are
monotonically non decreasing */
- if(i)
+ if (i)
HDassert(chunk_disp_array[i] > chunk_disp_array[i - 1]);
} /* end if */
/* calculate if there are any leftover blocks after evenly
distributing. If there are, then round robin the distribution
to processes 0 -> leftover. */
- if(leftover && leftover > mpi_rank) {
- chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
- block_lens[blocks] = block_len;
+ if (leftover && leftover > mpi_rank) {
+ chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks * mpi_size + mpi_rank];
+ block_lens[blocks] = block_len;
blocks++;
}
@@ -3910,70 +3895,70 @@ H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id,
* should not have a special case for blocks == 0, but ompi (as of 1.8.1) has a bug
* in file_set_view when a zero size datatype is create with hindexed or hvector.
*/
- if(0 == blocks) {
+ if (0 == blocks) {
mpi_code = MPI_Type_contiguous(0, MPI_BYTE, &file_type);
- if(mpi_code != MPI_SUCCESS)
+ if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
mpi_code = MPI_Type_contiguous(0, MPI_BYTE, &mem_type);
- if(mpi_code != MPI_SUCCESS)
+ if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
}
else {
/* MSC
* should use this if MPI_type_create_hindexed block is working
- * mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type);
+ * mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE,
+ * &file_type);
*/
- mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array,
- MPI_BYTE, &file_type);
- if(mpi_code != MPI_SUCCESS)
+ mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
+ if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
mpi_code = MPI_Type_create_hvector(blocks, block_len, 0, MPI_BYTE, &mem_type);
- if(mpi_code != MPI_SUCCESS)
+ if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
- if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&file_type)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&file_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&mem_type)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&mem_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
/* set MPI-IO VFD properties */
{
H5FD_mpio_xfer_t xfer_mode = H5FD_MPIO_COLLECTIVE;
- H5P_genplist_t *plist; /* Property list pointer */
+ H5P_genplist_t * plist; /* Property list pointer */
- if(NULL == (plist = H5P_object_verify(data_dxpl_id, H5P_DATASET_XFER)))
+ if (NULL == (plist = H5P_object_verify(data_dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list")
/* Set buffer MPI type */
- if(H5P_set(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &mem_type) < 0)
+ if (H5P_set(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &mem_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O property")
/* Set File MPI type */
- if(H5P_set(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type) < 0)
+ if (H5P_set(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O property")
/* set transfer mode */
- if(H5P_set(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
+ if (H5P_set(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set transfer mode")
}
/* low level write */
- if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, (haddr_t)0, (blocks) ? (size_t)1 : (size_t)0,
- data_dxpl_id, fill_buf) < 0)
+ if (H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, (haddr_t)0, (blocks) ? (size_t)1 : (size_t)0,
+ data_dxpl_id, fill_buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
/* Barrier so processes don't race ahead */
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code)
done:
- if(data_dxpl_id > 0 && H5I_dec_ref(data_dxpl_id) < 0)
+ if (data_dxpl_id > 0 && H5I_dec_ref(data_dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't free property list")
/* free things */
- if(MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
H5MM_xfree(chunk_disp_array);
H5MM_xfree(block_lens);
@@ -3982,7 +3967,6 @@ done:
} /* end H5D__chunk_collective_fill() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_prune_fill
*
@@ -3991,29 +3975,29 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * March 26, 2002
+ * Programmer: Pedro Vicente
+ * March 26, 2002
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata)
{
- const H5D_io_info_t *io_info = udata->io_info; /* Local pointer to I/O info */
- const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
- unsigned rank = udata->common.layout->ndims - 1; /* Dataset rank */
- const hsize_t *chunk_offset = io_info->store->chunk.offset; /* Chunk offset */
- H5S_sel_iter_t chunk_iter; /* Memory selection iteration info */
- hssize_t sel_nelmts; /* Number of elements in selection */
- hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
- size_t chunk_size; /*size of a chunk */
- void *chunk; /* The file chunk */
- H5D_chunk_ud_t chk_udata; /* User data for locking chunk */
- uint32_t bytes_accessed; /* Bytes accessed in chunk */
- hbool_t chunk_iter_init = FALSE; /* Whether the chunk iterator has been initialized */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_io_info_t *io_info = udata->io_info; /* Local pointer to I/O info */
+ const H5D_t * dset = io_info->dset; /* Local pointer to the dataset info */
+ const H5O_layout_t * layout = &(dset->shared->layout); /* Dataset's layout */
+ unsigned rank = udata->common.layout->ndims - 1; /* Dataset rank */
+ const hsize_t * chunk_offset = io_info->store->chunk.offset; /* Chunk offset */
+ H5S_sel_iter_t chunk_iter; /* Memory selection iteration info */
+ hssize_t sel_nelmts; /* Number of elements in selection */
+ hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
+ size_t chunk_size; /*size of a chunk */
+ void * chunk; /* The file chunk */
+ H5D_chunk_ud_t chk_udata; /* User data for locking chunk */
+ uint32_t bytes_accessed; /* Bytes accessed in chunk */
+ hbool_t chunk_iter_init = FALSE; /* Whether the chunk iterator has been initialized */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4022,45 +4006,42 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata)
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Get the info for the chunk in the file */
- if(H5D__chunk_lookup(dset, io_info->dxpl_id, chunk_offset, io_info->store->chunk.index, &chk_udata) < 0)
+ if (H5D__chunk_lookup(dset, io_info->dxpl_id, chunk_offset, io_info->store->chunk.index, &chk_udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* If this chunk does not exist in cache or on disk, no need to do anything
*/
- if(!H5F_addr_defined(chk_udata.addr) && UINT_MAX == chk_udata.idx_hint)
+ if (!H5F_addr_defined(chk_udata.addr) && UINT_MAX == chk_udata.idx_hint)
HGOTO_DONE(SUCCEED)
/* Initialize the fill value buffer, if necessary */
- if(!udata->fb_info_init) {
+ if (!udata->fb_info_init) {
H5_CHECK_OVERFLOW(udata->elmts_per_chunk, uint32_t, size_t);
- if(H5D__fill_init(&udata->fb_info, NULL, NULL, NULL, NULL, NULL,
- &dset->shared->dcpl_cache.fill,
- dset->shared->type, dset->shared->type_id, (size_t)udata->elmts_per_chunk,
- chunk_size, io_info->dxpl_id) < 0)
+ if (H5D__fill_init(&udata->fb_info, NULL, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill,
+ dset->shared->type, dset->shared->type_id, (size_t)udata->elmts_per_chunk,
+ chunk_size, io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
udata->fb_info_init = TRUE;
} /* end if */
/* Compute the # of elements to leave with existing value, in each dimension */
- for(u = 0; u < rank; u++) {
- count[u] = MIN(layout->u.chunk.dim[u], (udata->space_dim[u]
- - chunk_offset[u]));
+ for (u = 0; u < rank; u++) {
+ count[u] = MIN(layout->u.chunk.dim[u], (udata->space_dim[u] - chunk_offset[u]));
HDassert(count[u] > 0);
} /* end for */
/* Select all elements in chunk, to begin with */
- if(H5S_select_all(udata->chunk_space, TRUE) < 0)
+ if (H5S_select_all(udata->chunk_space, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select space")
/* "Subtract out" the elements to keep */
- if(H5S_select_hyperslab(udata->chunk_space, H5S_SELECT_NOTB, udata->hyper_start, NULL, count, NULL) < 0)
+ if (H5S_select_hyperslab(udata->chunk_space, H5S_SELECT_NOTB, udata->hyper_start, NULL, count, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select hyperslab")
/* Lock the chunk into the cache, to get a pointer to the chunk buffer */
- if(NULL == (chunk = (void *)H5D__chunk_lock(io_info, &chk_udata, FALSE)))
+ if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, &chk_udata, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk")
-
/* Fill the selection in the memory buffer */
/* Use the size of the elements in the chunk directly instead of */
/* relying on the fill.size, which might be set to 0 if there is */
@@ -4072,39 +4053,38 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata)
H5_CHECK_OVERFLOW(sel_nelmts, hssize_t, size_t);
/* Check for VL datatype & non-default fill value */
- if(udata->fb_info.has_vlen_fill_type)
+ if (udata->fb_info.has_vlen_fill_type)
/* Re-fill the buffer to use for this I/O operation */
- if(H5D__fill_refill_vl(&udata->fb_info, (size_t)sel_nelmts, io_info->dxpl_id) < 0)
+ if (H5D__fill_refill_vl(&udata->fb_info, (size_t)sel_nelmts, io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
/* Create a selection iterator for scattering the elements to memory buffer */
- if(H5S_select_iter_init(&chunk_iter, udata->chunk_space, layout->u.chunk.dim[rank]) < 0)
+ if (H5S_select_iter_init(&chunk_iter, udata->chunk_space, layout->u.chunk.dim[rank]) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunk selection information")
chunk_iter_init = TRUE;
/* Scatter the data into memory */
- if(H5D__scatter_mem(udata->fb_info.fill_buf, udata->chunk_space, &chunk_iter, (size_t)sel_nelmts, io_info->dxpl_cache, chunk/*out*/) < 0)
+ if (H5D__scatter_mem(udata->fb_info.fill_buf, udata->chunk_space, &chunk_iter, (size_t)sel_nelmts,
+ io_info->dxpl_cache, chunk /*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed")
-
/* The number of bytes accessed in the chunk */
/* (i.e. the bytes replaced with fill values) */
H5_CHECK_OVERFLOW(sel_nelmts, hssize_t, uint32_t);
bytes_accessed = (uint32_t)sel_nelmts * layout->u.chunk.dim[rank];
/* Release lock on chunk */
- if(H5D__chunk_unlock(io_info, &chk_udata, TRUE, chunk, bytes_accessed) < 0)
+ if (H5D__chunk_unlock(io_info, &chk_udata, TRUE, chunk, bytes_accessed) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk")
done:
/* Release the selection iterator */
- if(chunk_iter_init && H5S_SELECT_ITER_RELEASE(&chunk_iter) < 0)
+ if (chunk_iter_init && H5S_SELECT_ITER_RELEASE(&chunk_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_prune_fill */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_prune_by_extent
*
@@ -4113,7 +4093,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* Algorithm: Robb Matzke
* March 27, 2002
*
@@ -4207,37 +4187,39 @@ done:
herr_t
H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
{
- hsize_t min_mod_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of first chunk to modify in each dimension */
- hsize_t max_mod_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of last chunk to modify in each dimension */
- hssize_t max_fill_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of last chunk that might be filled in each dimension */
- hbool_t fill_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension needs to be filled */
- hbool_t dims_outside_fill[H5O_LAYOUT_NDIMS]; /* Dimensions in chunk offset outside fill dimensions */
- int ndims_outside_fill = 0; /* Number of dimensions in chunk offset outside fill dimensions */
- hbool_t has_fill = FALSE; /* Whether there are chunks that must be filled */
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_io_info_t chk_io_info; /* Chunked I/O info object */
- H5D_storage_t chk_store; /* Chunk storage information */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
- int space_ndims; /* Dataset's space rank */
- hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Current dataspace dimensions */
- int op_dim; /* Current operationg dimension */
- hbool_t shrunk_dim[H5O_LAYOUT_NDIMS]; /* Dimensions which have shrunk */
- H5D_chunk_it_ud1_t udata; /* Chunk index iterator user data */
- hbool_t udata_init = FALSE; /* Whether the chunk index iterator user data has been initialized */
- H5D_chunk_common_ud_t idx_udata; /* User data for index removal routine */
- H5D_chunk_ud_t chk_udata; /* User data for getting chunk info */
- H5S_t *chunk_space = NULL; /* Dataspace for a chunk */
- hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Chunk dimensions */
- hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
- hsize_t hyper_start[H5O_LAYOUT_NDIMS]; /* Starting location of hyperslab */
- uint32_t elmts_per_chunk; /* Elements in chunk */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t min_mod_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of first chunk to modify in each dimension */
+ hsize_t max_mod_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of last chunk to modify in each dimension */
+ hssize_t max_fill_chunk_off[H5O_LAYOUT_NDIMS]; /* Offset of last chunk that might be filled in each
+ dimension */
+ hbool_t fill_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension needs to be
+ filled */
+ hbool_t dims_outside_fill[H5O_LAYOUT_NDIMS]; /* Dimensions in chunk offset outside fill dimensions */
+ int ndims_outside_fill = 0; /* Number of dimensions in chunk offset outside fill dimensions */
+ hbool_t has_fill = FALSE; /* Whether there are chunks that must be filled */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_io_info_t chk_io_info; /* Chunked I/O info object */
+ H5D_storage_t chk_store; /* Chunk storage information */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
+ const H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ H5D_rdcc_ent_t * ent = NULL; /* Cache entry */
+ int space_ndims; /* Dataset's space rank */
+ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Current dataspace dimensions */
+ int op_dim; /* Current operationg dimension */
+ hbool_t shrunk_dim[H5O_LAYOUT_NDIMS]; /* Dimensions which have shrunk */
+ H5D_chunk_it_ud1_t udata; /* Chunk index iterator user data */
+ hbool_t udata_init = FALSE; /* Whether the chunk index iterator user data has been initialized */
+ H5D_chunk_common_ud_t idx_udata; /* User data for index removal routine */
+ H5D_chunk_ud_t chk_udata; /* User data for getting chunk info */
+ H5S_t * chunk_space = NULL; /* Dataspace for a chunk */
+ hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Chunk dimensions */
+ hsize_t chunk_offset[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
+ hsize_t hyper_start[H5O_LAYOUT_NDIMS]; /* Starting location of hyperslab */
+ uint32_t elmts_per_chunk; /* Elements in chunk */
+ hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4247,21 +4229,20 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
HDassert(dxpl_cache);
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Go get the rank & dimensions (including the element size) */
- if((space_ndims = H5S_get_simple_extent_dims(dset->shared->space, space_dim,
- NULL)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions")
+ if ((space_ndims = H5S_get_simple_extent_dims(dset->shared->space, space_dim, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions")
space_dim[space_ndims] = layout->u.chunk.dim[space_ndims];
/* The last dimension in chunk_offset is always 0 */
chunk_offset[space_ndims] = (hsize_t)0;
/* Check if any old dimensions are 0, if so we do not have to do anything */
- for(op_dim=0; op_dim<space_ndims; op_dim++)
- if(old_dim[op_dim] == 0) {
+ for (op_dim = 0; op_dim < space_ndims; op_dim++)
+ if (old_dim[op_dim] == 0) {
/* Reset any cached chunk info for this dataset */
H5D__chunk_cinfo_cache_reset(&dset->shared->cache.chunk.last);
HGOTO_DONE(SUCCEED)
@@ -4273,15 +4254,15 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* (also copy the chunk dimensions into 'hsize_t' array for creating dataspace) */
/* (also compute the dimensions which have been shrunk) */
elmts_per_chunk = 1;
- for(u = 0; u < (unsigned)space_ndims; u++) {
+ for (u = 0; u < (unsigned)space_ndims; u++) {
elmts_per_chunk *= layout->u.chunk.dim[u];
- chunk_dim[u] = layout->u.chunk.dim[u];
- shrunk_dim[u] = space_dim[u] < old_dim[u];
+ chunk_dim[u] = layout->u.chunk.dim[u];
+ shrunk_dim[u] = space_dim[u] < old_dim[u];
} /* end for */
/* Create a dataspace for a chunk & set the extent */
- if(NULL == (chunk_space = H5S_create_simple((unsigned)space_ndims, chunk_dim, NULL)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
+ if (NULL == (chunk_space = H5S_create_simple((unsigned)space_ndims, chunk_dim, NULL)))
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
@@ -4294,28 +4275,28 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
H5D_BUILD_IO_INFO_RD(&chk_io_info, dset, dxpl_cache, dxpl_id, &chk_store, NULL);
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Initialize the user data for the iteration */
HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = &layout->u.chunk;
- udata.common.storage = &layout->storage.u.chunk;
- udata.common.rdcc = rdcc;
- udata.io_info = &chk_io_info;
- udata.idx_info = &idx_info;
- udata.space_dim = space_dim;
- udata.shrunk_dim = shrunk_dim;
+ udata.common.layout = &layout->u.chunk;
+ udata.common.storage = &layout->storage.u.chunk;
+ udata.common.rdcc = rdcc;
+ udata.io_info = &chk_io_info;
+ udata.idx_info = &idx_info;
+ udata.space_dim = space_dim;
+ udata.shrunk_dim = shrunk_dim;
udata.elmts_per_chunk = elmts_per_chunk;
- udata.chunk_space = chunk_space;
- udata.hyper_start = hyper_start;
- udata_init = TRUE;
+ udata.chunk_space = chunk_space;
+ udata.hyper_start = hyper_start;
+ udata_init = TRUE;
/* Initialize user data for removal */
- idx_udata.layout = &layout->u.chunk;
+ idx_udata.layout = &layout->u.chunk;
idx_udata.storage = &layout->storage.u.chunk;
/*
@@ -4323,33 +4304,30 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
*/
HDmemset(min_mod_chunk_off, 0, sizeof(min_mod_chunk_off));
HDmemset(max_mod_chunk_off, 0, sizeof(max_mod_chunk_off));
- for(op_dim = 0; op_dim < space_ndims; op_dim++) {
+ for (op_dim = 0; op_dim < space_ndims; op_dim++) {
/* Calculate the largest offset of chunks that might need to be
* modified in this dimension */
- max_mod_chunk_off[op_dim] = chunk_dim[op_dim] * ((old_dim[op_dim] - 1)
- / chunk_dim[op_dim]);
+ max_mod_chunk_off[op_dim] = chunk_dim[op_dim] * ((old_dim[op_dim] - 1) / chunk_dim[op_dim]);
/* Calculate the largest offset of chunks that might need to be
* filled in this dimension */
- if(0 == space_dim[op_dim])
+ if (0 == space_dim[op_dim])
max_fill_chunk_off[op_dim] = -1;
else
- max_fill_chunk_off[op_dim] = (hssize_t)(chunk_dim[op_dim]
- * ((MIN(space_dim[op_dim], old_dim[op_dim]) - 1)
- / chunk_dim[op_dim]));
+ max_fill_chunk_off[op_dim] = (hssize_t)(
+ chunk_dim[op_dim] * ((MIN(space_dim[op_dim], old_dim[op_dim]) - 1) / chunk_dim[op_dim]));
- if(shrunk_dim[op_dim]) {
+ if (shrunk_dim[op_dim]) {
/* Calculate the smallest offset of chunks that might need to be
* modified in this dimension. Note that this array contains
* garbage for all dimensions which are not shrunk. These locations
* must not be read from! */
- min_mod_chunk_off[op_dim] = chunk_dim[op_dim] * (space_dim[op_dim]
- / chunk_dim[op_dim]);
+ min_mod_chunk_off[op_dim] = chunk_dim[op_dim] * (space_dim[op_dim] / chunk_dim[op_dim]);
/* Determine if we need to fill chunks in this dimension */
- if((hssize_t)min_mod_chunk_off[op_dim] == max_fill_chunk_off[op_dim]) {
+ if ((hssize_t)min_mod_chunk_off[op_dim] == max_fill_chunk_off[op_dim]) {
fill_dim[op_dim] = TRUE;
- has_fill = TRUE;
+ has_fill = TRUE;
} /* end if */
else
fill_dim[op_dim] = FALSE;
@@ -4361,23 +4339,23 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* Check the cache for any entries that are outside the bounds. Mark these
* entries as deleted so they are not flushed to disk accidentally. This is
* only necessary if there are chunks that need to be filled. */
- if(has_fill)
- for(ent = rdcc->head; ent; ent = ent->next)
+ if (has_fill)
+ for (ent = rdcc->head; ent; ent = ent->next)
/* Check for chunk offset outside of new dimensions */
- for(u = 0; u < (unsigned)space_ndims; u++)
- if((hsize_t)ent->offset[u] >= space_dim[u]) {
+ for (u = 0; u < (unsigned)space_ndims; u++)
+ if ((hsize_t)ent->offset[u] >= space_dim[u]) {
/* Mark the entry as "deleted" */
ent->deleted = TRUE;
break;
} /* end if */
/* Main loop: fill or remove chunks */
- for(op_dim=0; op_dim<space_ndims; op_dim++) {
+ for (op_dim = 0; op_dim < space_ndims; op_dim++) {
/* Check if modification along this dimension is really necessary */
- if(!shrunk_dim[op_dim])
+ if (!shrunk_dim[op_dim])
continue;
else {
- HDassert((hsize_t) max_mod_chunk_off[op_dim] >= min_mod_chunk_off[op_dim]);
+ HDassert((hsize_t)max_mod_chunk_off[op_dim] >= min_mod_chunk_off[op_dim]);
/* Reset the chunk offset indices */
HDmemset(chunk_offset, 0, ((unsigned)space_ndims * sizeof(chunk_offset[0])));
@@ -4385,8 +4363,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* Initialize "dims_outside_fill" array */
ndims_outside_fill = 0;
- for(u = 0; u < (unsigned)space_ndims; u++)
- if((hssize_t)chunk_offset[u] > max_fill_chunk_off[u]) {
+ for (u = 0; u < (unsigned)space_ndims; u++)
+ if ((hssize_t)chunk_offset[u] > max_fill_chunk_off[u]) {
dims_outside_fill[u] = TRUE;
ndims_outside_fill++;
} /* end if */
@@ -4396,21 +4374,20 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
carry = FALSE;
} /* end if */
- while(!carry) {
- int i; /* Local index variable */
+ while (!carry) {
+ int i; /* Local index variable */
/* Calculate the index of this chunk */
- if(H5VM_chunk_index((unsigned)space_ndims, chunk_offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks,
- &(chk_io_info.store->chunk.index)) < 0)
+ if (H5VM_chunk_index((unsigned)space_ndims, chunk_offset, layout->u.chunk.dim,
+ layout->u.chunk.down_chunks, &(chk_io_info.store->chunk.index)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
- if(0 == ndims_outside_fill) {
+ if (0 == ndims_outside_fill) {
HDassert(fill_dim[op_dim]);
HDassert(chunk_offset[op_dim] == min_mod_chunk_off[op_dim]);
/* Fill the unused parts of the chunk */
- if(H5D__chunk_prune_fill(&udata) < 0)
+ if (H5D__chunk_prune_fill(&udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write fill value")
} /* end if */
else {
@@ -4419,61 +4396,64 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
{
hbool_t outside_dim = FALSE;
- for(u = 0; u < (unsigned)space_ndims; u++)
- if(chunk_offset[u] >= space_dim[u]) {
+ for (u = 0; u < (unsigned)space_ndims; u++)
+ if (chunk_offset[u] >= space_dim[u]) {
outside_dim = TRUE;
break;
} /* end if */
HDassert(outside_dim);
} /* end block */
-#endif /* NDEBUG */
+#endif /* NDEBUG */
/* Check if the chunk exists in cache or on disk */
- if(H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chk_io_info.store->chunk.index, &chk_udata) < 0)
+ if (H5D__chunk_lookup(dset, dxpl_id, chunk_offset, chk_io_info.store->chunk.index,
+ &chk_udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk")
/* Evict the entry from the cache if present, but do not flush
* it to disk */
- if(UINT_MAX != chk_udata.idx_hint)
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[chk_udata.idx_hint], FALSE) < 0)
+ if (UINT_MAX != chk_udata.idx_hint)
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[chk_udata.idx_hint],
+ FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
/* Remove the chunk from disk, if present */
- if(H5F_addr_defined(chk_udata.addr)) {
+ if (H5F_addr_defined(chk_udata.addr)) {
/* Update the offset in idx_udata */
idx_udata.offset = chunk_offset;
/* Remove the chunk from disk */
- if((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry from index")
+ if ((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL,
+ "unable to remove chunk entry from index")
} /* end if */
- } /* end else */
+ } /* end else */
/* Increment indices */
carry = TRUE;
- for(i = (int)(space_ndims - 1); i >= 0; --i) {
+ for (i = (int)(space_ndims - 1); i >= 0; --i) {
chunk_offset[i] += chunk_dim[i];
- if(chunk_offset[i] > (hsize_t) max_mod_chunk_off[i]) {
+ if (chunk_offset[i] > (hsize_t)max_mod_chunk_off[i]) {
/* Left maximum dimensions, "wrap around" and check if this
* dimension is no longer outside the fill dimension */
- if(i == op_dim) {
+ if (i == op_dim) {
chunk_offset[i] = min_mod_chunk_off[i];
- if(dims_outside_fill[i] && fill_dim[i]) {
+ if (dims_outside_fill[i] && fill_dim[i]) {
dims_outside_fill[i] = FALSE;
ndims_outside_fill--;
} /* end if */
- } /* end if */
+ } /* end if */
else {
chunk_offset[i] = 0;
- if(dims_outside_fill[i] && max_fill_chunk_off[i] >= 0) {
+ if (dims_outside_fill[i] && max_fill_chunk_off[i] >= 0) {
dims_outside_fill[i] = FALSE;
ndims_outside_fill--;
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
/* Check if we just went outside the fill dimension */
- if(!dims_outside_fill[i] && (hssize_t)chunk_offset[i] > max_fill_chunk_off[i]) {
+ if (!dims_outside_fill[i] && (hssize_t)chunk_offset[i] > max_fill_chunk_off[i]) {
dims_outside_fill[i] = TRUE;
ndims_outside_fill++;
} /* end if */
@@ -4482,13 +4462,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
carry = FALSE;
break;
} /* end else */
- } /* end for */
- } /* end while(!carry) */
+ } /* end for */
+ } /* end while(!carry) */
/* Adjust max_mod_chunk_off so we don't modify the same chunk twice.
* Also check if this dimension started from 0 (and hence removed all
* of the chunks). */
- if(min_mod_chunk_off[op_dim] == 0)
+ if (min_mod_chunk_off[op_dim] == 0)
break;
else
max_mod_chunk_off[op_dim] = min_mod_chunk_off[op_dim] - chunk_dim[op_dim];
@@ -4499,17 +4479,17 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
done:
/* Release resources */
- if(chunk_space && H5S_close(chunk_space) < 0)
+ if (chunk_space && H5S_close(chunk_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
- if(udata_init)
- if(udata.fb_info_init && H5D__fill_term(&udata.fb_info) < 0)
+ if (udata_init)
+ if (udata.fb_info_init && H5D__fill_term(&udata.fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_prune_by_extent() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_addrmap_cb
*
@@ -4526,16 +4506,17 @@ done:
static int
H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
- unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
- hsize_t chunk_index;
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
+ unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
+ hsize_t chunk_index;
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
/* Compute the index for this chunk */
- if(H5VM_chunk_index(rank, chunk_rec->offset, udata->common.layout->dim, udata->common.layout->down_chunks, &chunk_index) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, H5_ITER_ERROR, "can't get chunk index")
+ if (H5VM_chunk_index(rank, chunk_rec->offset, udata->common.layout->dim,
+ udata->common.layout->down_chunks, &chunk_index) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, H5_ITER_ERROR, "can't get chunk index")
/* Set it in the userdata to return */
udata->chunk_addr[chunk_index] = chunk_rec->chunk_addr;
@@ -4544,7 +4525,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_addrmap_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_addrmap
*
@@ -4561,10 +4541,10 @@ done:
herr_t
H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- const H5D_t *dset = io_info->dset; /* Local pointer to dataset info */
- H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ const H5D_t * dset = io_info->dset; /* Local pointer to dataset info */
+ H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4574,20 +4554,20 @@ H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
/* Set up user data for B-tree callback */
HDmemset(&udata, 0, sizeof(udata));
- udata.common.layout = &dset->shared->layout.u.chunk;
+ udata.common.layout = &dset->shared->layout.u.chunk;
udata.common.storage = &dset->shared->layout.storage.u.chunk;
- udata.common.rdcc = &(dset->shared->cache.chunk);
- udata.chunk_addr = chunk_addr;
+ udata.common.rdcc = &(dset->shared->cache.chunk);
+ udata.chunk_addr = chunk_addr;
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = io_info->dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Iterate over chunks to build mapping of chunk addresses */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_addrmap_cb, &udata) < 0)
+ if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_addrmap_cb, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to iterate over chunk index to build address map")
done:
@@ -4595,7 +4575,6 @@ done:
} /* end H5D__chunk_addrmap() */
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_delete
*
@@ -4612,13 +4591,13 @@ done:
herr_t
H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5O_layout_t layout; /* Dataset layout message */
- hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
- H5O_pline_t pline; /* I/O pipeline message */
- hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
- htri_t exists; /* Flag if header message of interest exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5O_layout_t layout; /* Dataset layout message */
+ hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
+ H5O_pline_t pline; /* I/O pipeline message */
+ hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
+ htri_t exists; /* Flag if header message of interest exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4628,10 +4607,10 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
HDassert(storage);
/* Check for I/O pipeline message */
- if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message")
- else if(exists) {
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
+ else if (exists) {
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O pipeline message")
pline_read = TRUE;
} /* end else if */
@@ -4639,10 +4618,10 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
HDmemset(&pline, 0, sizeof(pline));
/* Retrieve dataset layout message */
- if((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message")
- else if(exists) {
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
+ else if (exists) {
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message")
layout_read = TRUE;
} /* end else if */
@@ -4650,29 +4629,28 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "can't find layout message")
/* Compose chunked index info struct */
- idx_info.f = f;
+ idx_info.f = f;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &pline;
- idx_info.layout = &layout.u.chunk;
+ idx_info.pline = &pline;
+ idx_info.layout = &layout.u.chunk;
idx_info.storage = &storage->u.chunk;
/* Delete the chunked storage information in the file */
- if((storage->u.chunk.ops->idx_delete)(&idx_info) < 0)
+ if ((storage->u.chunk.ops->idx_delete)(&idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk index")
done:
/* Clean up any messages read in */
- if(pline_read)
- if(H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
+ if (pline_read)
+ if (H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
- if(layout_read)
- if(H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
+ if (layout_read)
+ if (H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout message")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_update_cache
*
@@ -4690,60 +4668,62 @@ done:
herr_t
H5D__chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- H5D_rdcc_ent_t *ent, *next; /*cache entry */
- H5D_rdcc_ent_t *old_ent; /* Old cache entry */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- unsigned rank; /* Current # of dimensions */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ H5D_rdcc_ent_t * ent, *next; /*cache entry */
+ H5D_rdcc_ent_t * old_ent; /* Old cache entry */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ unsigned rank; /* Current # of dimensions */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dset && H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
+ dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
/* Get the rank */
- rank = dset->shared->layout.u.chunk.ndims-1;
+ rank = dset->shared->layout.u.chunk.ndims - 1;
HDassert(rank > 0);
/* 1-D dataset's chunks can't have their index change */
- if(rank == 1)
+ if (rank == 1)
HGOTO_DONE(SUCCEED)
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Recompute the index for each cached chunk that is in a dataset */
- for(ent = rdcc->head; ent; ent = next) {
- hsize_t idx; /* Chunk index */
- unsigned old_idx; /* Previous index number */
+ for (ent = rdcc->head; ent; ent = next) {
+ hsize_t idx; /* Chunk index */
+ unsigned old_idx; /* Previous index number */
/* Get the pointer to the next cache entry */
next = ent->next;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(rank, ent->offset, dset->shared->layout.u.chunk.dim, dset->shared->layout.u.chunk.down_chunks, &idx) < 0)
+ if (H5VM_chunk_index(rank, ent->offset, dset->shared->layout.u.chunk.dim,
+ dset->shared->layout.u.chunk.down_chunks, &idx) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Compute the index for the chunk entry */
- old_idx = ent->idx; /* Save for later */
+ old_idx = ent->idx; /* Save for later */
ent->idx = H5D_CHUNK_HASH(dset->shared, idx);
- if(old_idx != ent->idx) {
+ if (old_idx != ent->idx) {
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
- if(old_ent != NULL) {
+ if (old_ent != NULL) {
HDassert(old_ent->locked == 0);
/* Check if we are removing the entry we would walk to next */
- if(old_ent == next)
+ if (old_ent == next)
next = old_ent->next;
/* Remove the old entry from the cache */
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, old_ent, TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, old_ent, TRUE) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
} /* end if */
@@ -4753,13 +4733,12 @@ H5D__chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
/* Null out previous location */
rdcc->slot[old_idx] = NULL;
} /* end if */
- } /* end for */
+ } /* end for */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_update_cache() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_copy_cb
*
@@ -4776,23 +4755,23 @@ done:
static int
H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud3_t *udata = (H5D_chunk_it_ud3_t *)_udata; /* User data for callback */
- H5D_chunk_ud_t udata_dst; /* User data about new destination chunk */
- hbool_t is_vlen = FALSE; /* Whether datatype is variable-length */
- hbool_t fix_ref = FALSE; /* Whether to fix up references in the dest. file */
+ H5D_chunk_it_ud3_t *udata = (H5D_chunk_it_ud3_t *)_udata; /* User data for callback */
+ H5D_chunk_ud_t udata_dst; /* User data about new destination chunk */
+ hbool_t is_vlen = FALSE; /* Whether datatype is variable-length */
+ hbool_t fix_ref = FALSE; /* Whether to fix up references in the dest. file */
/* General information about chunk copy */
- void *bkg = udata->bkg; /* Background buffer for datatype conversion */
- void *buf = udata->buf; /* Chunk buffer for I/O & datatype conversions */
- size_t buf_size = udata->buf_size; /* Size of chunk buffer */
- const H5O_pline_t *pline = udata->pline; /* I/O pipeline for applying filters */
+ void * bkg = udata->bkg; /* Background buffer for datatype conversion */
+ void * buf = udata->buf; /* Chunk buffer for I/O & datatype conversions */
+ size_t buf_size = udata->buf_size; /* Size of chunk buffer */
+ const H5O_pline_t *pline = udata->pline; /* I/O pipeline for applying filters */
/* needed for commpressed variable length data */
- hbool_t has_filters = FALSE; /* Whether chunk has filters */
- size_t nbytes; /* Size of chunk in file (in bytes) */
- H5Z_cb_t cb_struct; /* Filter failure callback struct */
+ hbool_t has_filters = FALSE; /* Whether chunk has filters */
+ size_t nbytes; /* Size of chunk in file (in bytes) */
+ H5Z_cb_t cb_struct; /* Filter failure callback struct */
- int ret_value = H5_ITER_CONT; /* Return value */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -4800,114 +4779,122 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5_CHECKED_ASSIGN(nbytes, size_t, chunk_rec->nbytes, uint32_t);
/* Check parameter for type conversion */
- if(udata->do_convert) {
- if(H5T_detect_class(udata->dt_src, H5T_VLEN, FALSE) > 0)
+ if (udata->do_convert) {
+ if (H5T_detect_class(udata->dt_src, H5T_VLEN, FALSE) > 0)
is_vlen = TRUE;
- else if((H5T_get_class(udata->dt_src, FALSE) == H5T_REFERENCE) && (udata->file_src != udata->idx_info_dst->f))
+ else if ((H5T_get_class(udata->dt_src, FALSE) == H5T_REFERENCE) &&
+ (udata->file_src != udata->idx_info_dst->f))
fix_ref = TRUE;
else
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements")
} /* end if */
/* Check for filtered chunks */
- if(pline && pline->nused) {
- has_filters = TRUE;
+ if (pline && pline->nused) {
+ has_filters = TRUE;
cb_struct.func = NULL; /* no callback function when failed */
- } /* end if */
+ } /* end if */
/* Resize the buf if it is too small to hold the data */
- if(nbytes > buf_size) {
- void *new_buf; /* New buffer for data */
+ if (nbytes > buf_size) {
+ void *new_buf; /* New buffer for data */
/* Re-allocate memory for copying the chunk */
- if(NULL == (new_buf = H5MM_realloc(udata->buf, nbytes)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed for raw data chunk")
+ if (NULL == (new_buf = H5MM_realloc(udata->buf, nbytes)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR,
+ "memory allocation failed for raw data chunk")
udata->buf = new_buf;
- if(udata->bkg) {
- if(NULL == (new_buf = H5MM_realloc(udata->bkg, nbytes)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed for raw data chunk")
+ if (udata->bkg) {
+ if (NULL == (new_buf = H5MM_realloc(udata->bkg, nbytes)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR,
+ "memory allocation failed for raw data chunk")
udata->bkg = new_buf;
- if(!udata->cpy_info->expand_ref)
+ if (!udata->cpy_info->expand_ref)
HDmemset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
bkg = udata->bkg;
} /* end if */
- buf = udata->buf;
+ buf = udata->buf;
udata->buf_size = buf_size = nbytes;
} /* end if */
- if(udata->chunk_in_cache && udata->chunk) {
+ if (udata->chunk_in_cache && udata->chunk) {
HDassert(!H5F_addr_defined(chunk_rec->chunk_addr));
HDmemcpy(buf, udata->chunk, nbytes);
udata->chunk = NULL;
- } else {
- H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
- unsigned idx; /* Index of chunk in cache, if present */
- unsigned u; /* Counter */
- H5D_shared_t *shared_fo = udata->cpy_info->shared_fo;
+ }
+ else {
+ H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
+ unsigned idx; /* Index of chunk in cache, if present */
+ unsigned u; /* Counter */
+ H5D_shared_t * shared_fo = udata->cpy_info->shared_fo;
/* See if the written chunk is in the chunk cache */
- if(shared_fo && shared_fo->cache.chunk.nslots > 0) {
- hsize_t chunk_idx; /* Index of chunk cache entry */
- H5O_layout_t *layout = &shared_fo->layout;
+ if (shared_fo && shared_fo->cache.chunk.nslots > 0) {
+ hsize_t chunk_idx; /* Index of chunk cache entry */
+ H5O_layout_t *layout = &shared_fo->layout;
/* Calculate the index of this chunk */
- if(H5VM_chunk_index(layout->u.chunk.ndims - 1, chunk_rec->offset,
- layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) < 0)
+ if (H5VM_chunk_index(layout->u.chunk.ndims - 1, chunk_rec->offset, layout->u.chunk.dim,
+ layout->u.chunk.down_chunks, &chunk_idx) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
idx = H5D_CHUNK_HASH(shared_fo, chunk_idx);
/* Get the chunk cache entry for that location */
ent = shared_fo->cache.chunk.slot[idx];
- if(ent) {
+ if (ent) {
/* Speculatively set the 'found' flag */
udata->chunk_in_cache = TRUE;
/* Verify that the cache entry is the correct chunk */
- for(u = 0; u < (layout->u.chunk.ndims -1); u++)
- if(chunk_rec->offset[u] != ent->offset[u]) {
+ for (u = 0; u < (layout->u.chunk.ndims - 1); u++)
+ if (chunk_rec->offset[u] != ent->offset[u]) {
udata->chunk_in_cache = FALSE;
break;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
- if(udata->chunk_in_cache) {
+ if (udata->chunk_in_cache) {
HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
HDassert(H5F_addr_defined(ent->chunk_addr));
H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
HDmemcpy(buf, ent->chunk, nbytes);
- } else {
+ }
+ else {
/* read chunk data from the source file */
- if(H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes, udata->idx_info_dst->dxpl_id, buf) < 0)
+ if (H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes,
+ udata->idx_info_dst->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk")
}
}
/* Need to uncompress variable-length & reference data elements */
- if(has_filters && (is_vlen || fix_ref) && !udata->chunk_in_cache) {
+ if (has_filters && (is_vlen || fix_ref) && !udata->chunk_in_cache) {
unsigned filter_mask = chunk_rec->filter_mask;
- if(H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, cb_struct, &nbytes, &buf_size, &buf) < 0)
+ if (H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, cb_struct, &nbytes, &buf_size,
+ &buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "data pipeline read failed")
} /* end if */
/* Perform datatype conversion, if necessary */
- if(is_vlen) {
- H5T_path_t *tpath_src_mem = udata->tpath_src_mem;
- H5T_path_t *tpath_mem_dst = udata->tpath_mem_dst;
- H5S_t *buf_space = udata->buf_space;
- hid_t tid_src = udata->tid_src;
- hid_t tid_dst = udata->tid_dst;
- hid_t tid_mem = udata->tid_mem;
- void *reclaim_buf = udata->reclaim_buf;
- size_t reclaim_buf_size = udata->reclaim_buf_size;
+ if (is_vlen) {
+ H5T_path_t *tpath_src_mem = udata->tpath_src_mem;
+ H5T_path_t *tpath_mem_dst = udata->tpath_mem_dst;
+ H5S_t * buf_space = udata->buf_space;
+ hid_t tid_src = udata->tid_src;
+ hid_t tid_dst = udata->tid_dst;
+ hid_t tid_mem = udata->tid_mem;
+ void * reclaim_buf = udata->reclaim_buf;
+ size_t reclaim_buf_size = udata->reclaim_buf_size;
/* Convert from source file to memory */
H5_CHECK_OVERFLOW(udata->nelmts, uint32_t, size_t);
- if(H5T_convert(tpath_src_mem, tid_src, tid_mem, (size_t)udata->nelmts, (size_t)0, (size_t)0, buf, bkg, udata->idx_info_dst->dxpl_id) < 0)
+ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, (size_t)udata->nelmts, (size_t)0, (size_t)0, buf,
+ bkg, udata->idx_info_dst->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed")
/* Copy into another buffer, to reclaim memory later */
@@ -4917,24 +4904,27 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HDmemset(bkg, 0, buf_size);
/* Convert from memory to destination file */
- if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, udata->nelmts, (size_t)0, (size_t)0, buf, bkg, udata->idx_info_dst->dxpl_id) < 0)
+ if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, udata->nelmts, (size_t)0, (size_t)0, buf, bkg,
+ udata->idx_info_dst->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed")
/* Reclaim space from variable length data */
- if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
+ if (H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, H5_ITER_ERROR, "unable to reclaim variable-length data")
} /* end if */
- else if(fix_ref) {
+ else if (fix_ref) {
/* Check for expanding references */
/* (background buffer has already been zeroed out, if not expanding) */
- if(udata->cpy_info->expand_ref) {
+ if (udata->cpy_info->expand_ref) {
size_t ref_count;
/* Determine # of reference elements to copy */
ref_count = nbytes / H5T_get_size(udata->dt_src);
/* Copy the reference elements */
- if(H5O_copy_expand_ref(udata->file_src, buf, udata->idx_info_dst->dxpl_id, udata->idx_info_dst->f, bkg, ref_count, H5T_get_ref_type(udata->dt_src), udata->cpy_info) < 0)
+ if (H5O_copy_expand_ref(udata->file_src, buf, udata->idx_info_dst->dxpl_id,
+ udata->idx_info_dst->f, bkg, ref_count, H5T_get_ref_type(udata->dt_src),
+ udata->cpy_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy reference attribute")
} /* end if */
@@ -4943,42 +4933,43 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
} /* end if */
/* Set up destination chunk callback information for insertion */
- udata_dst.common.layout = udata->idx_info_dst->layout;
+ udata_dst.common.layout = udata->idx_info_dst->layout;
udata_dst.common.storage = udata->idx_info_dst->storage;
- udata_dst.common.offset = chunk_rec->offset;
- udata_dst.common.rdcc = NULL;
- udata_dst.nbytes = chunk_rec->nbytes;
- udata_dst.filter_mask = chunk_rec->filter_mask;
- udata_dst.addr = HADDR_UNDEF;
+ udata_dst.common.offset = chunk_rec->offset;
+ udata_dst.common.rdcc = NULL;
+ udata_dst.nbytes = chunk_rec->nbytes;
+ udata_dst.filter_mask = chunk_rec->filter_mask;
+ udata_dst.addr = HADDR_UNDEF;
/* Need to compress variable-length & reference data elements before writing to file */
- if(has_filters && (is_vlen || fix_ref || udata->chunk_in_cache) ) {
- if(H5Z_pipeline(pline, 0, &(udata_dst.filter_mask), H5Z_NO_EDC, cb_struct, &nbytes, &buf_size, &buf) < 0)
+ if (has_filters && (is_vlen || fix_ref || udata->chunk_in_cache)) {
+ if (H5Z_pipeline(pline, 0, &(udata_dst.filter_mask), H5Z_NO_EDC, cb_struct, &nbytes, &buf_size,
+ &buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed")
#if H5_SIZEOF_SIZE_T > 4
/* Check for the chunk expanding too much to encode in a 32-bit value */
- if(nbytes > ((size_t)0xffffffff))
+ if (nbytes > ((size_t)0xffffffff))
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length")
#endif /* H5_SIZEOF_SIZE_T > 4 */
H5_CHECKED_ASSIGN(udata_dst.nbytes, uint32_t, nbytes, size_t);
- udata->buf = buf;
- udata->buf_size = buf_size;
+ udata->buf = buf;
+ udata->buf_size = buf_size;
} /* end if */
/* Insert chunk into the destination index */
- if((udata->idx_info_dst->storage->ops->insert)(udata->idx_info_dst, &udata_dst) < 0)
+ if ((udata->idx_info_dst->storage->ops->insert)(udata->idx_info_dst, &udata_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert chunk into index")
/* Write chunk data to destination file */
HDassert(H5F_addr_defined(udata_dst.addr));
- if(H5F_block_write(udata->idx_info_dst->f, H5FD_MEM_DRAW, udata_dst.addr, nbytes, udata->idx_info_dst->dxpl_id, buf) < 0)
+ if (H5F_block_write(udata->idx_info_dst->f, H5FD_MEM_DRAW, udata_dst.addr, nbytes,
+ udata->idx_info_dst->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_copy
*
@@ -4993,32 +4984,31 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
- H5O_layout_chunk_t *layout_src, H5F_t *f_dst, H5O_storage_chunk_t *storage_dst,
- const H5S_extent_t *ds_extent_src, const H5T_t *dt_src,
- const H5O_pline_t *pline_src, H5O_copy_t *cpy_info, hid_t dxpl_id)
+H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk_t *layout_src, H5F_t *f_dst,
+ H5O_storage_chunk_t *storage_dst, const H5S_extent_t *ds_extent_src, const H5T_t *dt_src,
+ const H5O_pline_t *pline_src, H5O_copy_t *cpy_info, hid_t dxpl_id)
{
- H5D_chunk_it_ud3_t udata; /* User data for iteration callback */
- H5D_chk_idx_info_t idx_info_dst; /* Dest. chunked index info */
- H5D_chk_idx_info_t idx_info_src; /* Source chunked index info */
- H5O_pline_t _pline; /* Temporary pipeline info */
- const H5O_pline_t *pline; /* Pointer to pipeline info to use */
- H5T_path_t *tpath_src_mem = NULL, *tpath_mem_dst = NULL; /* Datatype conversion paths */
- hid_t tid_src = -1; /* Datatype ID for source datatype */
- hid_t tid_dst = -1; /* Datatype ID for destination datatype */
- hid_t tid_mem = -1; /* Datatype ID for memory datatype */
- size_t buf_size; /* Size of copy buffer */
- size_t reclaim_buf_size; /* Size of reclaim buffer */
- void *buf = NULL; /* Buffer for copying data */
- void *bkg = NULL; /* Buffer for background during type conversion */
- void *reclaim_buf = NULL; /* Buffer for reclaiming data */
- H5S_t *buf_space = NULL; /* Dataspace describing buffer */
- hid_t sid_buf = -1; /* ID for buffer dataspace */
- uint32_t nelmts = 0; /* Number of elements in buffer */
- hbool_t do_convert = FALSE; /* Indicate that type conversions should be performed */
- hbool_t copy_setup_done = FALSE; /* Indicate that 'copy setup' is done */
- H5D_shared_t *shared_fo = (H5D_shared_t *)cpy_info->shared_fo;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chunk_it_ud3_t udata; /* User data for iteration callback */
+ H5D_chk_idx_info_t idx_info_dst; /* Dest. chunked index info */
+ H5D_chk_idx_info_t idx_info_src; /* Source chunked index info */
+ H5O_pline_t _pline; /* Temporary pipeline info */
+ const H5O_pline_t *pline; /* Pointer to pipeline info to use */
+ H5T_path_t * tpath_src_mem = NULL, *tpath_mem_dst = NULL; /* Datatype conversion paths */
+ hid_t tid_src = -1; /* Datatype ID for source datatype */
+ hid_t tid_dst = -1; /* Datatype ID for destination datatype */
+ hid_t tid_mem = -1; /* Datatype ID for memory datatype */
+ size_t buf_size; /* Size of copy buffer */
+ size_t reclaim_buf_size; /* Size of reclaim buffer */
+ void * buf = NULL; /* Buffer for copying data */
+ void * bkg = NULL; /* Buffer for background during type conversion */
+ void * reclaim_buf = NULL; /* Buffer for reclaiming data */
+ H5S_t * buf_space = NULL; /* Dataspace describing buffer */
+ hid_t sid_buf = -1; /* ID for buffer dataspace */
+ uint32_t nelmts = 0; /* Number of elements in buffer */
+ hbool_t do_convert = FALSE; /* Indicate that type conversions should be performed */
+ hbool_t copy_setup_done = FALSE; /* Indicate that 'copy setup' is done */
+ H5D_shared_t * shared_fo = (H5D_shared_t *)cpy_info->shared_fo;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5032,7 +5022,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
HDassert(dt_src);
/* Initialize the temporary pipeline info */
- if(NULL == pline_src) {
+ if (NULL == pline_src) {
HDmemset(&_pline, 0, sizeof(_pline));
pline = &_pline;
} /* end if */
@@ -5040,122 +5030,123 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
pline = pline_src;
/* Layout is not created in the destination file, reset index address */
- if(H5D_chunk_idx_reset(storage_dst, TRUE) < 0)
+ if (H5D_chunk_idx_reset(storage_dst, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index in dest")
/* Initialize layout information */
{
- hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Curr. size of dataset dimensions */
- int sndims; /* Rank of dataspace */
- unsigned ndims; /* Rank of dataspace */
+ hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Curr. size of dataset dimensions */
+ int sndims; /* Rank of dataspace */
+ unsigned ndims; /* Rank of dataspace */
/* Get the dim info for dataset */
- if((sndims = H5S_extent_get_dims(ds_extent_src, curr_dims, NULL)) < 0)
+ if ((sndims = H5S_extent_get_dims(ds_extent_src, curr_dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int);
/* Set the source layout chunk information */
- if(H5D__chunk_set_info_real(layout_src, ndims, curr_dims) < 0)
+ if (H5D__chunk_set_info_real(layout_src, ndims, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
} /* end block */
/* Compose source & dest chunked index info structs */
- idx_info_src.f = f_src;
+ idx_info_src.f = f_src;
idx_info_src.dxpl_id = dxpl_id;
- idx_info_src.pline = pline;
- idx_info_src.layout = layout_src;
+ idx_info_src.pline = pline;
+ idx_info_src.layout = layout_src;
idx_info_src.storage = storage_src;
- idx_info_dst.f = f_dst;
+ idx_info_dst.f = f_dst;
idx_info_dst.dxpl_id = dxpl_id;
- idx_info_dst.pline = pline; /* Use same I/O filter pipeline for dest. */
- idx_info_dst.layout = layout_src /* Use same layout for dest. */;
+ idx_info_dst.pline = pline; /* Use same I/O filter pipeline for dest. */
+ idx_info_dst.layout = layout_src /* Use same layout for dest. */;
idx_info_dst.storage = storage_dst;
/* Call the index-specific "copy setup" routine */
- if((storage_src->ops->copy_setup)(&idx_info_src, &idx_info_dst) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up index-specific chunk copying information")
+ if ((storage_src->ops->copy_setup)(&idx_info_src, &idx_info_dst) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to set up index-specific chunk copying information")
copy_setup_done = TRUE;
/* Create datatype ID for src datatype */
- if((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype")
/* If there's a VLEN source datatype, set up type conversion information */
- if(H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
- H5T_t *dt_dst; /* Destination datatype */
- H5T_t *dt_mem; /* Memory datatype */
- size_t mem_dt_size; /* Memory datatype size */
- size_t tmp_dt_size; /* Temp. datatype size */
- size_t max_dt_size; /* Max atatype size */
- hsize_t buf_dim; /* Dimension for buffer */
+ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ H5T_t * dt_dst; /* Destination datatype */
+ H5T_t * dt_mem; /* Memory datatype */
+ size_t mem_dt_size; /* Memory datatype size */
+ size_t tmp_dt_size; /* Temp. datatype size */
+ size_t max_dt_size; /* Max atatype size */
+ hsize_t buf_dim; /* Dimension for buffer */
unsigned u;
/* create a memory copy of the variable-length datatype */
- if(NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
- if((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
(void)H5T_close(dt_mem);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype")
} /* end if */
/* create variable-length datatype at the destinaton file */
- if(NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
- if(H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
+ if (H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
(void)H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk")
} /* end if */
- if((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
(void)H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype")
} /* end if */
/* Set up the conversion functions */
- if(NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes")
- if(NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes")
/* Determine largest datatype size */
- if(0 == (max_dt_size = H5T_get_size(dt_src)))
+ if (0 == (max_dt_size = H5T_get_size(dt_src)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
- if(0 == (mem_dt_size = H5T_get_size(dt_mem)))
+ if (0 == (mem_dt_size = H5T_get_size(dt_mem)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(max_dt_size, mem_dt_size);
- if(0 == (tmp_dt_size = H5T_get_size(dt_dst)))
+ if (0 == (tmp_dt_size = H5T_get_size(dt_dst)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(max_dt_size, tmp_dt_size);
/* Compute the number of elements per chunk */
nelmts = 1;
- for(u = 0; u < (layout_src->ndims - 1); u++)
+ for (u = 0; u < (layout_src->ndims - 1); u++)
nelmts *= layout_src->dim[u];
/* Create the space and set the initial extent */
buf_dim = nelmts;
- if(NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
+ if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Atomize */
- if((sid_buf = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((sid_buf = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
(void)H5S_close(buf_space);
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID")
} /* end if */
/* Set initial buffer sizes */
- buf_size = nelmts * max_dt_size;
+ buf_size = nelmts * max_dt_size;
reclaim_buf_size = nelmts * mem_dt_size;
/* Allocate memory for reclaim buf */
- if(NULL == (reclaim_buf = H5MM_malloc(reclaim_buf_size)))
+ if (NULL == (reclaim_buf = H5MM_malloc(reclaim_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Indicate that type conversion should be performed */
do_convert = TRUE;
} /* end if */
else {
- if(H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
/* Indicate that type conversion should be performed */
do_convert = TRUE;
} /* end if */
@@ -5165,72 +5156,71 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
} /* end else */
/* Set up conversion buffer, if appropriate */
- if(do_convert) {
+ if (do_convert) {
/* Allocate background memory for converting the chunk */
- if(NULL == (bkg = H5MM_malloc(buf_size)))
+ if (NULL == (bkg = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Check for reference datatype and no expanding references & clear background buffer */
- if(!cpy_info->expand_ref &&
- ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
+ if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
/* Reset value to zero */
HDmemset(bkg, 0, buf_size);
} /* end if */
/* Allocate memory for copying the chunk */
- if(NULL == (buf = H5MM_malloc(buf_size)))
+ if (NULL == (buf = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Initialize the callback structure for the source */
HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = layout_src;
- udata.common.storage = storage_src;
- udata.common.rdcc = NULL;
- udata.file_src = f_src;
- udata.idx_info_dst = &idx_info_dst;
- udata.buf = buf;
- udata.bkg = bkg;
- udata.buf_size = buf_size;
- udata.tid_src = tid_src;
- udata.tid_mem = tid_mem;
- udata.tid_dst = tid_dst;
- udata.dt_src = dt_src;
- udata.do_convert = do_convert;
- udata.tpath_src_mem = tpath_src_mem;
- udata.tpath_mem_dst = tpath_mem_dst;
- udata.reclaim_buf = reclaim_buf;
+ udata.common.layout = layout_src;
+ udata.common.storage = storage_src;
+ udata.common.rdcc = NULL;
+ udata.file_src = f_src;
+ udata.idx_info_dst = &idx_info_dst;
+ udata.buf = buf;
+ udata.bkg = bkg;
+ udata.buf_size = buf_size;
+ udata.tid_src = tid_src;
+ udata.tid_mem = tid_mem;
+ udata.tid_dst = tid_dst;
+ udata.dt_src = dt_src;
+ udata.do_convert = do_convert;
+ udata.tpath_src_mem = tpath_src_mem;
+ udata.tpath_mem_dst = tpath_mem_dst;
+ udata.reclaim_buf = reclaim_buf;
udata.reclaim_buf_size = reclaim_buf_size;
- udata.buf_space = buf_space;
- udata.nelmts = nelmts;
- udata.pline = pline;
- udata.cpy_info = cpy_info;
- udata.chunk_in_cache = FALSE;
- udata.chunk = NULL;
-
- if(!H5F_addr_defined(idx_info_src.storage->idx_addr))
+ udata.buf_space = buf_space;
+ udata.nelmts = nelmts;
+ udata.pline = pline;
+ udata.cpy_info = cpy_info;
+ udata.chunk_in_cache = FALSE;
+ udata.chunk = NULL;
+
+ if (!H5F_addr_defined(idx_info_src.storage->idx_addr))
idx_info_src.storage = &shared_fo->layout.storage.u.chunk;
HDassert(H5F_addr_defined(idx_info_src.storage->idx_addr));
/* Iterate over chunks to copy data */
- if((storage_src->ops->iterate)(&idx_info_src, H5D__chunk_copy_cb, &udata) < 0)
+ if ((storage_src->ops->iterate)(&idx_info_src, H5D__chunk_copy_cb, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to copy data")
- /* Iterate over the chunk cache to copy data for chunks with undefined address */
- if(shared_fo) {
- H5D_rdcc_ent_t *ent, *next;
+ /* Iterate over the chunk cache to copy data for chunks with undefined address */
+ if (shared_fo) {
+ H5D_rdcc_ent_t *ent, *next;
H5D_chunk_rec_t chunk_rec;
- chunk_rec.nbytes = layout_src->size;
+ chunk_rec.nbytes = layout_src->size;
chunk_rec.filter_mask = 0;
- chunk_rec.chunk_addr = HADDR_UNDEF;
+ chunk_rec.chunk_addr = HADDR_UNDEF;
- for(ent = shared_fo->cache.chunk.head; ent; ent = next) {
- if(!H5F_addr_defined(ent->chunk_addr)) {
+ for (ent = shared_fo->cache.chunk.head; ent; ent = next) {
+ if (!H5F_addr_defined(ent->chunk_addr)) {
HDmemcpy(chunk_rec.offset, ent->offset, sizeof(chunk_rec.offset));
- udata.chunk = ent->chunk;
+ udata.chunk = ent->chunk;
udata.chunk_in_cache = TRUE;
- if(H5D__chunk_copy_cb(&chunk_rec, &udata) < 0)
+ if (H5D__chunk_copy_cb(&chunk_rec, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy chunk data in cache")
}
next = ent->next;
@@ -5242,30 +5232,29 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
bkg = udata.bkg;
done:
- if(sid_buf > 0 && H5I_dec_ref(sid_buf) < 0)
+ if (sid_buf > 0 && H5I_dec_ref(sid_buf) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID")
- if(tid_src > 0 && H5I_dec_ref(tid_src) < 0)
+ if (tid_src > 0 && H5I_dec_ref(tid_src) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
+ if (tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
+ if (tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(buf)
+ if (buf)
H5MM_xfree(buf);
- if(bkg)
+ if (bkg)
H5MM_xfree(bkg);
- if(reclaim_buf)
+ if (reclaim_buf)
H5MM_xfree(reclaim_buf);
/* Clean up any index information */
- if(copy_setup_done)
- if((storage_src->ops->copy_shutdown)(storage_src, storage_dst, dxpl_id) < 0)
+ if (copy_setup_done)
+ if ((storage_src->ops->copy_shutdown)(storage_src, storage_dst, dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to shut down index copying info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_bh_info
*
@@ -5280,11 +5269,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
- const H5O_pline_t *pline, hsize_t *index_size)
+H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout, const H5O_pline_t *pline,
+ hsize_t *index_size)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5295,21 +5284,20 @@ H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
HDassert(index_size);
/* Compose chunked index info struct */
- idx_info.f = f;
+ idx_info.f = f;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = pline;
- idx_info.layout = &layout->u.chunk;
+ idx_info.pline = pline;
+ idx_info.layout = &layout->u.chunk;
idx_info.storage = &layout->storage.u.chunk;
/* Get size of index structure */
- if((layout->storage.u.chunk.ops->size)(&idx_info, index_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
+ if ((layout->storage.u.chunk.ops->size)(&idx_info, index_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_bh_info() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_dump_index_cb
*
@@ -5325,29 +5313,30 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static int
H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
+ H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
FUNC_ENTER_STATIC_NOERR
- if(udata->stream) {
- unsigned u; /* Local index variable */
+ if (udata->stream) {
+ unsigned u; /* Local index variable */
/* Print header if not already displayed */
- if(!udata->header_displayed) {
+ if (!udata->header_displayed) {
HDfprintf(udata->stream, " Flags Bytes Address Logical Offset\n");
- HDfprintf(udata->stream, " ========== ======== ========== ==============================\n");
+ HDfprintf(udata->stream,
+ " ========== ======== ========== ==============================\n");
/* Set flag that the headers has been printed */
udata->header_displayed = TRUE;
} /* end if */
/* Print information about this chunk */
- HDfprintf(udata->stream, " 0x%08x %8Zu %10a [", chunk_rec->filter_mask, chunk_rec->nbytes, chunk_rec->chunk_addr);
- for(u = 0; u < udata->ndims; u++)
+ HDfprintf(udata->stream, " 0x%08x %8Zu %10a [", chunk_rec->filter_mask, chunk_rec->nbytes,
+ chunk_rec->chunk_addr);
+ for (u = 0; u < udata->ndims; u++)
HDfprintf(udata->stream, "%s%Hd", (u ? ", " : ""), chunk_rec->offset[u]);
HDfputs("]\n", udata->stream);
} /* end if */
@@ -5355,7 +5344,6 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_dump_index_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_dump_index
*
@@ -5373,7 +5361,7 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
herr_t
H5D__chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5381,36 +5369,38 @@ H5D__chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream)
HDassert(dset);
/* Only display info if stream is defined */
- if(stream) {
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_chunk_it_ud4_t udata; /* User data for callback */
+ if (stream) {
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_chunk_it_ud4_t udata; /* User data for callback */
/* Display info for index */
- if((dset->shared->layout.storage.u.chunk.ops->dump)(&dset->shared->layout.storage.u.chunk, stream) < 0)
+ if ((dset->shared->layout.storage.u.chunk.ops->dump)(&dset->shared->layout.storage.u.chunk, stream) <
+ 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to dump chunk index info")
/* Compose chunked index info struct */
- idx_info.f = dset->oloc.file;
+ idx_info.f = dset->oloc.file;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Set up user data for callback */
- udata.stream = stream;
+ udata.stream = stream;
udata.header_displayed = FALSE;
- udata.ndims = dset->shared->layout.u.chunk.ndims;
+ udata.ndims = dset->shared->layout.u.chunk.ndims;
/* Iterate over index and dump chunk info */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_dump_index_cb, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to dump chunk info")
+ if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_dump_index_cb, &udata) <
+ 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL,
+ "unable to iterate over chunk index to dump chunk info")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_dump_index() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_dest
*
@@ -5427,13 +5417,13 @@ done:
herr_t
H5D__chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset)
{
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
- H5D_rdcc_ent_t *ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
- int nerrors = 0; /* Accumulated count of errors */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t * dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ H5D_rdcc_t * rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
+ H5D_rdcc_ent_t * ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
+ int nerrors = 0; /* Accumulated count of errors */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5441,43 +5431,43 @@ H5D__chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset)
HDassert(dset);
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Flush all the cached chunks */
- for(ent = rdcc->head; ent; ent = next) {
- next = ent->next;
- if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
- nerrors++;
+ for (ent = rdcc->head; ent; ent = next) {
+ next = ent->next;
+ if (H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
+ nerrors++;
} /* end for */
/* Continue even if there are failures. */
- if(nerrors)
- HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ if (nerrors)
+ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
/* Release cache structures */
- if(rdcc->slot)
+ if (rdcc->slot)
rdcc->slot = H5FL_SEQ_FREE(H5D_rdcc_ent_ptr_t, rdcc->slot);
HDmemset(rdcc, 0, sizeof(H5D_rdcc_t));
/* Compose chunked index info struct */
- idx_info.f = f;
+ idx_info.f = f;
idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dset->shared->dcpl_cache.pline;
- idx_info.layout = &dset->shared->layout.u.chunk;
+ idx_info.pline = &dset->shared->dcpl_cache.pline;
+ idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Free any index structures */
- if(dset->shared->layout.storage.u.chunk.ops->dest &&
- (dset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ if (dset->shared->layout.storage.u.chunk.ops->dest &&
+ (dset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_dest() */
#ifdef H5D_CHUNK_DEBUG
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_stats
*
@@ -5495,10 +5485,10 @@ done:
herr_t
H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- double miss_rate;
- char ascii[32];
- herr_t ret_value=SUCCEED; /* Return value */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ double miss_rate;
+ char ascii[32];
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5506,33 +5496,34 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HGOTO_DONE(SUCCEED)
if (headers) {
- fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n",
- "Layer", "Hits", "Misses", "MissRate", "Inits", "Flushes");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n",
- "-----", "----", "------", "--------", "-----", "-------");
+ HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate",
+ "Inits", "Flushes");
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------",
+ "-----", "-------");
}
#ifdef H5AC_DEBUG
- if (H5DEBUG(AC)) headers = TRUE;
+ if (H5DEBUG(AC))
+ headers = TRUE;
#endif
if (headers) {
- if (rdcc->nhits>0 || rdcc->nmisses>0) {
- miss_rate = 100.0 * rdcc->nmisses /
- (rdcc->nhits + rdcc->nmisses);
- } else {
+ if (rdcc->nhits > 0 || rdcc->nmisses > 0) {
+ miss_rate = 100.0 * rdcc->nmisses / (rdcc->nhits + rdcc->nmisses);
+ }
+ else {
miss_rate = 0.0;
}
if (miss_rate > 100) {
- sprintf(ascii, "%7d%%", (int) (miss_rate + 0.5));
- } else {
- sprintf(ascii, "%7.2f%%", miss_rate);
+ HDsprintf(ascii, "%7d%%", (int)(miss_rate + 0.5));
+ }
+ else {
+ HDsprintf(ascii, "%7.2f%%", miss_rate);
}
- fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n",
- "raw data chunks", rdcc->nhits, rdcc->nmisses, ascii,
- rdcc->ninits, (long)(rdcc->nflushes)-(long)(rdcc->ninits));
+ HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->nhits,
+ rdcc->nmisses, ascii, rdcc->ninits, (long)(rdcc->nflushes) - (long)(rdcc->ninits));
}
done:
@@ -5540,7 +5531,6 @@ done:
} /* end H5D__chunk_stats() */
#endif /* H5D_CHUNK_DEBUG */
-
/*-------------------------------------------------------------------------
* Function: H5D__nonexistent_readvv_cb
*
@@ -5560,36 +5550,35 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size_t len,
- void *_udata)
+H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size_t len, void *_udata)
{
H5D_chunk_readvv_ud_t *udata = (H5D_chunk_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Initialize the fill value buffer */
- if(H5D__fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL,
- &udata->dset->shared->dcpl_cache.fill, udata->dset->shared->type,
- udata->dset->shared->type_id, (size_t)0, len, udata->dxpl_id) < 0)
+ if (H5D__fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL,
+ &udata->dset->shared->dcpl_cache.fill, udata->dset->shared->type,
+ udata->dset->shared->type_id, (size_t)0, len, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
/* Check for VL datatype & fill the buffer with VL datatype fill values */
- if(fb_info.has_vlen_fill_type && H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, udata->dxpl_id) < 0)
+ if (fb_info.has_vlen_fill_type &&
+ H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D__fill_term(&fb_info) < 0)
+ if (fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__nonexistent_readvv_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__nonexistent_readvv
*
@@ -5611,12 +5600,12 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__nonexistent_readvv(const H5D_io_info_t *io_info,
- size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_off_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+H5D__nonexistent_readvv(const H5D_io_info_t *io_info, size_t chunk_max_nseq, size_t *chunk_curr_seq,
+ size_t chunk_len_arr[], hsize_t chunk_off_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- H5D_chunk_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
- ssize_t ret_value; /* Return value */
+ H5D_chunk_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
@@ -5630,14 +5619,14 @@ H5D__nonexistent_readvv(const H5D_io_info_t *io_info,
HDassert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
- udata.rbuf = (unsigned char *)io_info->u.rbuf;
- udata.dset = io_info->dset;
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dset = io_info->dset;
udata.dxpl_id = io_info->dxpl_id;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__nonexistent_readvv_cb, &udata)) < 0)
+ if ((ret_value = H5VM_opvv(chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__nonexistent_readvv_cb, &udata)) <
+ 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized fill value init")
done:
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 4b61442..3f89adb 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* August 5, 2002
*
* Purpose: Compact dataset I/O functions. These routines are similar
@@ -23,75 +23,60 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5VMprivate.h" /* Vector and array functions */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
/* Layout operation callbacks */
-static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
static hbool_t H5D__compact_is_space_alloc(const H5O_storage_t *storage);
-static herr_t H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
-static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
-static ssize_t H5D__compact_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
-static herr_t H5D__compact_flush(H5D_t *dset, hid_t dxpl_id);
-
+static herr_t H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *cm);
+static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_size_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
+static ssize_t H5D__compact_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_size_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
+static herr_t H5D__compact_flush(H5D_t *dset, hid_t dxpl_id);
/*********************/
/* Package Variables */
/*********************/
/* Compact storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
- H5D__compact_construct,
- NULL,
- H5D__compact_is_space_alloc,
- H5D__compact_io_init,
- H5D__contig_read,
- H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {
+ {H5D__compact_construct, NULL, H5D__compact_is_space_alloc, NULL, H5D__compact_io_init, H5D__contig_read,
+ H5D__contig_write,
#ifdef H5_HAVE_PARALLEL
- NULL,
- NULL,
+ NULL, NULL,
#endif /* H5_HAVE_PARALLEL */
- H5D__compact_readvv,
- H5D__compact_writevv,
- H5D__compact_flush,
- NULL
-}};
-
+ H5D__compact_readvv, H5D__compact_writevv, H5D__compact_flush, NULL}};
/*******************/
/* Local Variables */
@@ -100,8 +85,6 @@ const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_fill
*
@@ -117,9 +100,9 @@ H5FL_BLK_EXTERN(type_conv);
herr_t
H5D__compact_fill(const H5D_t *dset, hid_t dxpl_id)
{
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -132,28 +115,26 @@ H5D__compact_fill(const H5D_t *dset, hid_t dxpl_id)
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
- if(H5D__fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf,
- NULL, NULL, NULL, NULL,
- &dset->shared->dcpl_cache.fill, dset->shared->type,
- dset->shared->type_id, (size_t)0, dset->shared->layout.storage.u.compact.size, dxpl_id) < 0)
+ if (H5D__fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf, NULL, NULL, NULL, NULL,
+ &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)0,
+ dset->shared->layout.storage.u.compact.size, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
/* Check for VL datatype & non-default fill value */
- if(fb_info.has_vlen_fill_type)
+ if (fb_info.has_vlen_fill_type)
/* Fill the buffer with VL datatype fill values */
- if(H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
+ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D__fill_term(&fb_info) < 0)
+ if (fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__compact_fill() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_construct
*
@@ -169,14 +150,14 @@ done:
static herr_t
H5D__compact_construct(H5F_t *f, H5D_t *dset)
{
- hssize_t stmp_size; /* Temporary holder for raw data size */
- hsize_t tmp_size; /* Temporary holder for raw data size */
- hsize_t max_comp_data_size; /* Max. allowed size of compact data */
- hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
- hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
- int ndims; /* Rank of dataspace */
- int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hssize_t stmp_size; /* Temporary holder for raw data size */
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ hsize_t max_comp_data_size; /* Max. allowed size of compact data */
+ hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
+ hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
+ int ndims; /* Rank of dataspace */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -185,10 +166,10 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
HDassert(dset);
/* Check for invalid dataset dimensions */
- if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
+ if ((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
- for(i = 0; i < ndims; i++)
- if(max_dim[i] > dim[i])
+ for (i = 0; i < ndims; i++)
+ if (max_dim[i] > dim[i])
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "extendible compact dataset")
/*
@@ -206,14 +187,14 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
* (64KB) minus other layout message fields.
*/
max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), FALSE);
- if(dset->shared->layout.storage.u.compact.size > max_comp_data_size)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "compact dataset size is bigger than header message maximum size")
+ if (dset->shared->layout.storage.u.compact.size > max_comp_data_size)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "compact dataset size is bigger than header message maximum size")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__compact_construct() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_is_space_alloc
*
@@ -238,7 +219,6 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5D__compact_is_space_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_io_init
*
@@ -253,18 +233,17 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
*/
static herr_t
H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
- io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
+ io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__compact_io_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_readvv
*
@@ -284,25 +263,26 @@ H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__compact_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
+H5D__compact_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_size_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
{
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
HDassert(io_info);
/* Use the vectorized memory copy routine to do actual work */
- if((ret_value = H5VM_memcpyvv(io_info->u.rbuf, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr, io_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr)) < 0)
+ if ((ret_value = H5VM_memcpyvv(io_info->u.rbuf, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr,
+ io_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr,
+ dset_offset_arr)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__compact_readvv() */
+} /* end H5D__compact_readvv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_writevv
*
@@ -325,18 +305,20 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__compact_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
+H5D__compact_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_size_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
{
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
HDassert(io_info);
/* Use the vectorized memory copy routine to do actual work */
- if((ret_value = H5VM_memcpyvv(io_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr, io_info->u.wbuf, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr)) < 0)
+ if ((ret_value = H5VM_memcpyvv(io_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr,
+ dset_offset_arr, io_info->u.wbuf, mem_max_nseq, mem_curr_seq, mem_size_arr,
+ mem_offset_arr)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
/* Mark the compact dataset's buffer as dirty */
@@ -344,9 +326,8 @@ H5D__compact_writevv(const H5D_io_info_t *io_info,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__compact_writevv() */
+} /* end H5D__compact_writevv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_flush
*
@@ -362,7 +343,7 @@ done:
static herr_t
H5D__compact_flush(H5D_t *dset, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -370,9 +351,10 @@ H5D__compact_flush(H5D_t *dset, hid_t dxpl_id)
HDassert(dset);
/* Check if the buffered compact information is dirty */
- if(dset->shared->layout.storage.u.compact.dirty) {
+ if (dset->shared->layout.storage.u.compact.dirty) {
dset->shared->layout.storage.u.compact.dirty = FALSE;
- if(H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout), dxpl_id) < 0) {
+ if (H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout),
+ dxpl_id) < 0) {
dset->shared->layout.storage.u.compact.dirty = TRUE;
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message")
}
@@ -382,7 +364,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__compact_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compact_copy
*
@@ -397,19 +378,18 @@ done:
*/
herr_t
H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_dst,
- H5O_storage_compact_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info,
- hid_t dxpl_id)
+ H5O_storage_compact_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, hid_t dxpl_id)
{
- hid_t tid_src = -1; /* Datatype ID for source datatype */
- hid_t tid_dst = -1; /* Datatype ID for destination datatype */
- hid_t tid_mem = -1; /* Datatype ID for memory datatype */
- void *buf = NULL; /* Buffer for copying data */
- void *bkg = NULL; /* Temporary buffer for copying data */
- void *reclaim_buf = NULL; /* Buffer for reclaiming data */
- hid_t buf_sid = -1; /* ID for buffer dataspace */
- H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */
- H5O_storage_compact_t *storage_src = _storage_src; /* Pointer to storage_src */
- herr_t ret_value = SUCCEED; /* Return value */
+ hid_t tid_src = -1; /* Datatype ID for source datatype */
+ hid_t tid_dst = -1; /* Datatype ID for destination datatype */
+ hid_t tid_mem = -1; /* Datatype ID for memory datatype */
+ void * buf = NULL; /* Buffer for copying data */
+ void * bkg = NULL; /* Temporary buffer for copying data */
+ void * reclaim_buf = NULL; /* Buffer for reclaiming data */
+ hid_t buf_sid = -1; /* ID for buffer dataspace */
+ H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */
+ H5O_storage_compact_t *storage_src = _storage_src; /* Pointer to storage_src */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -421,68 +401,68 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
HDassert(dt_src);
/* If the dataset is open in the file, point to "layout" in the shared struct */
- if(shared_fo != NULL)
+ if (shared_fo != NULL)
storage_src = &(shared_fo->layout.storage.u.compact);
/* Allocate space for destination data */
- if(NULL == (storage_dst->buf = H5MM_malloc(storage_src->size)))
+ if (NULL == (storage_dst->buf = H5MM_malloc(storage_src->size)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate memory for compact dataset")
/* Create datatype ID for src datatype, so it gets freed */
- if((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype")
/* If there's a VLEN source datatype, do type conversion information */
- if(H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
- H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
- H5T_t *dt_dst; /* Destination datatype */
- H5T_t *dt_mem; /* Memory datatype */
- H5S_t *buf_space; /* Dataspace describing buffer */
- size_t buf_size; /* Size of copy buffer */
- size_t nelmts; /* Number of elements in buffer */
- size_t src_dt_size; /* Source datatype size */
- size_t tmp_dt_size; /* Temporary datatype size */
- size_t max_dt_size; /* Max atatype size */
- hsize_t buf_dim; /* Dimension for buffer */
+ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
+ H5T_t * dt_dst; /* Destination datatype */
+ H5T_t * dt_mem; /* Memory datatype */
+ H5S_t * buf_space; /* Dataspace describing buffer */
+ size_t buf_size; /* Size of copy buffer */
+ size_t nelmts; /* Number of elements in buffer */
+ size_t src_dt_size; /* Source datatype size */
+ size_t tmp_dt_size; /* Temporary datatype size */
+ size_t max_dt_size; /* Max atatype size */
+ hsize_t buf_dim; /* Dimension for buffer */
/* create a memory copy of the variable-length datatype */
- if(NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
- if((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
H5T_close(dt_mem);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype")
} /* end if */
/* create variable-length datatype at the destinaton file */
- if(NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
- if(H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
+ if (H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk")
} /* end if */
- if((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype")
} /* end if */
/* Set up the conversion functions */
- if(NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes")
- if(NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes")
/* Determine largest datatype size */
- if(0 == (src_dt_size = H5T_get_size(dt_src)))
+ if (0 == (src_dt_size = H5T_get_size(dt_src)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
- if(0 == (tmp_dt_size = H5T_get_size(dt_mem)))
+ if (0 == (tmp_dt_size = H5T_get_size(dt_mem)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(src_dt_size, tmp_dt_size);
- if(0 == (tmp_dt_size = H5T_get_size(dt_dst)))
+ if (0 == (tmp_dt_size = H5T_get_size(dt_dst)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(max_dt_size, tmp_dt_size);
/* Set number of whole elements that fit in buffer */
- if(0 == (nelmts = storage_src->size / src_dt_size))
+ if (0 == (nelmts = storage_src->size / src_dt_size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large")
/* Set up number of bytes to copy, and initial buffer size */
@@ -492,31 +472,31 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
buf_dim = nelmts;
/* Create the space and set the initial extent */
- if(NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
+ if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Atomize */
- if((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID")
} /* end if */
/* Allocate memory for recclaim buf */
- if(NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Allocate memory for copying the chunk */
- if(NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
HDmemcpy(buf, storage_src->buf, storage_src->size);
/* allocate temporary bkg buff for data conversion */
- if(NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Convert from source file to memory */
- if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Copy into another buffer, to reclaim memory later */
@@ -526,26 +506,27 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
HDmemset(bkg, 0, buf_size);
/* Convert from memory to destination file */
- if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
HDmemcpy(storage_dst->buf, buf, storage_dst->size);
- if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
+ if (H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data")
} /* end if */
- else if(H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
- if(f_src != f_dst) {
+ else if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ if (f_src != f_dst) {
/* Check for expanding references */
- if(cpy_info->expand_ref) {
+ if (cpy_info->expand_ref) {
size_t ref_count;
/* Determine # of reference elements to copy */
ref_count = storage_src->size / H5T_get_size(dt_src);
- /* Copy objects referenced in source buffer to destination file and set destination elements */
- if(H5O_copy_expand_ref(f_src, storage_src->buf, dxpl_id, f_dst,
- storage_dst->buf, ref_count, H5T_get_ref_type(dt_src), cpy_info) < 0)
+ /* Copy objects referenced in source buffer to destination file and set destination elements
+ */
+ if (H5O_copy_expand_ref(f_src, storage_src->buf, dxpl_id, f_dst, storage_dst->buf, ref_count,
+ H5T_get_ref_type(dt_src), cpy_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
} /* end if */
else
@@ -564,21 +545,20 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
storage_dst->dirty = TRUE;
done:
- if(buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
+ if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID")
- if(tid_src > 0 && H5I_dec_ref(tid_src) < 0)
+ if (tid_src > 0 && H5I_dec_ref(tid_src) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
+ if (tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
+ if (tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(buf)
+ if (buf)
buf = H5FL_BLK_FREE(type_conv, buf);
- if(reclaim_buf)
+ if (reclaim_buf)
reclaim_buf = H5FL_BLK_FREE(type_conv, reclaim_buf);
- if(bkg)
+ if (bkg)
bkg = H5FL_BLK_FREE(type_conv, bkg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__compact_copy() */
-
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 9516d53..915b6cc 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose:
@@ -25,113 +25,97 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5VMprivate.h" /* Vector and array functions */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Callback info for sieve buffer readvv operation */
typedef struct H5D_contig_readvv_sieve_ud_t {
- H5F_t *file; /* File for dataset */
- H5D_rdcdc_t *dset_contig; /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
- unsigned char *rbuf; /* Pointer to buffer to fill */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t * file; /* File for dataset */
+ H5D_rdcdc_t * dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
+ unsigned char * rbuf; /* Pointer to buffer to fill */
+ hid_t dxpl_id; /* DXPL for operation */
} H5D_contig_readvv_sieve_ud_t;
/* Callback info for [plain] readvv operation */
typedef struct H5D_contig_readvv_ud_t {
- H5F_t *file; /* File for dataset */
- haddr_t dset_addr; /* Address of dataset */
- unsigned char *rbuf; /* Pointer to buffer to fill */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t * file; /* File for dataset */
+ haddr_t dset_addr; /* Address of dataset */
+ unsigned char *rbuf; /* Pointer to buffer to fill */
+ hid_t dxpl_id; /* DXPL for operation */
} H5D_contig_readvv_ud_t;
/* Callback info for sieve buffer writevv operation */
typedef struct H5D_contig_writevv_sieve_ud_t {
- H5F_t *file; /* File for dataset */
- H5D_rdcdc_t *dset_contig; /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
- const unsigned char *wbuf; /* Pointer to buffer to write */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t * file; /* File for dataset */
+ H5D_rdcdc_t * dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
+ const unsigned char * wbuf; /* Pointer to buffer to write */
+ hid_t dxpl_id; /* DXPL for operation */
} H5D_contig_writevv_sieve_ud_t;
/* Callback info for [plain] writevv operation */
typedef struct H5D_contig_writevv_ud_t {
- H5F_t *file; /* File for dataset */
- haddr_t dset_addr; /* Address of dataset */
- const unsigned char *wbuf; /* Pointer to buffer to write */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t * file; /* File for dataset */
+ haddr_t dset_addr; /* Address of dataset */
+ const unsigned char *wbuf; /* Pointer to buffer to write */
+ hid_t dxpl_id; /* DXPL for operation */
} H5D_contig_writevv_ud_t;
-
/********************/
/* Local Prototypes */
/********************/
/* Layout operation callbacks */
-static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
-static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
-static ssize_t H5D__contig_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-static ssize_t H5D__contig_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-static herr_t H5D__contig_flush(H5D_t *dset, hid_t dxpl_id);
+static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *cm);
+static ssize_t H5D__contig_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static ssize_t H5D__contig_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static herr_t H5D__contig_flush(H5D_t *dset, hid_t dxpl_id);
/* Helper routines */
-static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
- size_t size);
-
+static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size);
/*********************/
/* Package Variables */
/*********************/
/* Contiguous storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
- H5D__contig_construct,
- NULL,
- H5D__contig_is_space_alloc,
- H5D__contig_io_init,
- H5D__contig_read,
- H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {
+ {H5D__contig_construct, NULL, H5D__contig_is_space_alloc, H5D__contig_is_data_cached, H5D__contig_io_init,
+ H5D__contig_read, H5D__contig_write,
#ifdef H5_HAVE_PARALLEL
- H5D__contig_collective_read,
- H5D__contig_collective_write,
+ H5D__contig_collective_read, H5D__contig_collective_write,
#endif /* H5_HAVE_PARALLEL */
- H5D__contig_readvv,
- H5D__contig_writevv,
- H5D__contig_flush,
- NULL
-}};
-
+ H5D__contig_readvv, H5D__contig_writevv, H5D__contig_flush, NULL}};
/*******************/
/* Local Variables */
@@ -143,8 +127,6 @@ H5FL_BLK_DEFINE(sieve_buf);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_alloc
*
@@ -158,9 +140,9 @@ H5FL_BLK_EXTERN(type_conv);
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */ )
+H5D__contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -169,14 +151,13 @@ H5D__contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out *
HDassert(storage);
/* Allocate space for the contiguous data */
- if(HADDR_UNDEF == (storage->addr = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, storage->size)))
+ if (HADDR_UNDEF == (storage->addr = H5MF_alloc(f, H5FD_MEM_DRAW, dxpl_id, storage->size)))
HGOTO_ERROR(H5E_IO, H5E_NOSPACE, FAIL, "unable to reserve file space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_alloc */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_fill
*
@@ -192,24 +173,25 @@ done:
herr_t
H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
{
- H5D_io_info_t ioinfo; /* Dataset I/O info */
- H5D_storage_t store; /* Union of storage info for dataset */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- hssize_t snpoints; /* Number of points in space (for error checking) */
- size_t npoints; /* Number of points in space */
- hsize_t offset; /* Offset of dataset */
+ H5D_io_info_t ioinfo; /* Dataset I/O info */
+ H5D_storage_t store; /* Union of storage info for dataset */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ hssize_t snpoints; /* Number of points in space (for error checking) */
+ size_t npoints; /* Number of points in space */
+ hsize_t offset; /* Offset of dataset */
#ifdef H5_HAVE_PARALLEL
- MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
- int mpi_rank = (-1); /* This process's rank */
- int mpi_code; /* MPI return code */
- hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
- hbool_t using_mpi = FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
-#endif /* H5_HAVE_PARALLEL */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- hid_t my_dxpl_id; /* DXPL ID to use for this operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
+ int mpi_rank = (-1); /* This process's rank */
+ int mpi_code; /* MPI return code */
+ hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
+ hbool_t using_mpi =
+ FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
+#endif /* H5_HAVE_PARALLEL */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ hid_t my_dxpl_id; /* DXPL ID to use for this operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -223,13 +205,13 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
- if(H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
+ if (H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* Get the MPI communicator */
- if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
+ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator")
/* Get the MPI rank */
- if((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0)
+ if ((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank")
/* Set the MPI-capable file driver flag */
@@ -239,15 +221,15 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
my_dxpl_id = H5AC_ind_dxpl_id;
} /* end if */
else {
-#endif /* H5_HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
/* Use the DXPL we were given */
my_dxpl_id = dxpl_id;
#ifdef H5_HAVE_PARALLEL
- } /* end else */
-#endif /* H5_HAVE_PARALLEL */
+ } /* end else */
+#endif /* H5_HAVE_PARALLEL */
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(my_dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(my_dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Initialize storage info for this dataset */
@@ -255,15 +237,14 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
store.contig.dset_size = dset->shared->layout.storage.u.contig.size;
/* Get the number of elements in the dataset's dataspace */
- if((snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
+ if ((snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "dataset has negative number of elements")
H5_CHECKED_ASSIGN(npoints, size_t, snpoints, hssize_t);
/* Initialize the fill value buffer */
- if(H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL,
- &dset->shared->dcpl_cache.fill,
- dset->shared->type, dset->shared->type_id, npoints,
- dxpl_cache->max_temp_buf, my_dxpl_id) < 0)
+ if (H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill,
+ dset->shared->type, dset->shared->type_id, npoints, dxpl_cache->max_temp_buf,
+ my_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
@@ -280,67 +261,66 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
*/
/* Loop through writing the fill value to the dataset */
- while(npoints > 0) {
- size_t curr_points; /* Number of elements to write on this iteration of the loop */
- size_t size; /* Size of buffer to write */
+ while (npoints > 0) {
+ size_t curr_points; /* Number of elements to write on this iteration of the loop */
+ size_t size; /* Size of buffer to write */
/* Compute # of elements and buffer size to write for this iteration */
curr_points = MIN(fb_info.elmts_per_buf, npoints);
- size = curr_points * fb_info.file_elmt_size;
+ size = curr_points * fb_info.file_elmt_size;
/* Check for VL datatype & non-default fill value */
- if(fb_info.has_vlen_fill_type)
+ if (fb_info.has_vlen_fill_type)
/* Re-fill the buffer to use for this I/O operation */
- if(H5D__fill_refill_vl(&fb_info, curr_points, my_dxpl_id) < 0)
+ if (H5D__fill_refill_vl(&fb_info, curr_points, my_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
#ifdef H5_HAVE_PARALLEL
- /* Check if this file is accessed with an MPI-capable file driver */
- if(using_mpi) {
- /* Write the chunks out from only one process */
- /* !! Use the internal "independent" DXPL!! -QAK */
- if(H5_PAR_META_WRITE == mpi_rank)
- if(H5D__contig_write_one(&ioinfo, offset, size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset")
-
- /* Indicate that blocks are being written */
- blocks_written = TRUE;
- } /* end if */
- else {
-#endif /* H5_HAVE_PARALLEL */
- H5_CHECK_OVERFLOW(size, size_t, hsize_t);
- if(H5D__contig_write_one(&ioinfo, offset, size) < 0)
+ /* Check if this file is accessed with an MPI-capable file driver */
+ if (using_mpi) {
+ /* Write the chunks out from only one process */
+ /* !! Use the internal "independent" DXPL!! -QAK */
+ if (H5_PAR_META_WRITE == mpi_rank)
+ if (H5D__contig_write_one(&ioinfo, offset, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset")
-#ifdef H5_HAVE_PARALLEL
- } /* end else */
+
+ /* Indicate that blocks are being written */
+ blocks_written = TRUE;
+ } /* end if */
+ else {
#endif /* H5_HAVE_PARALLEL */
+ H5_CHECK_OVERFLOW(size, size_t, hsize_t);
+ if (H5D__contig_write_one(&ioinfo, offset, size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset")
+#ifdef H5_HAVE_PARALLEL
+ } /* end else */
+#endif /* H5_HAVE_PARALLEL */
- npoints -= curr_points;
- offset += size;
- } /* end while */
+ npoints -= curr_points;
+ offset += size;
+ } /* end while */
#ifdef H5_HAVE_PARALLEL
/* Only need to block at the barrier if we actually wrote fill values */
/* And if we are using an MPI-capable file driver */
- if(using_mpi && blocks_written) {
+ if (using_mpi && blocks_written) {
/* Wait at barrier to avoid race conditions where some processes are
* still writing out fill values and other processes race ahead to data
* in, getting bogus data.
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code)
- } /* end if */
+ } /* end if */
#endif /* H5_HAVE_PARALLEL */
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D__fill_term(&fb_info) < 0)
+ if (fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_fill() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_delete
*
@@ -356,7 +336,7 @@ done:
herr_t
H5D__contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -365,14 +345,13 @@ H5D__contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
HDassert(storage);
/* Free the file space for the chunk */
- if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, storage->u.contig.addr, storage->u.contig.size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, storage->u.contig.addr, storage->u.contig.size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free contiguous storage space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_delete */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_construct
*
@@ -385,20 +364,19 @@ done:
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5D__contig_construct(H5F_t *f, H5D_t *dset)
{
hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
- hsize_t nelmts; /* Number of elements in dataspace */
- size_t dt_size; /* Size of datatype */
- hsize_t tmp_size; /* Temporary holder for raw data size */
- size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
- hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
- hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
- int ndims; /* Rank of dataspace */
- int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t nelmts; /* Number of elements in dataspace */
+ size_t dt_size; /* Size of datatype */
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
+ hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
+ hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
+ int ndims; /* Rank of dataspace */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -408,31 +386,31 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
/*
* The maximum size of the dataset cannot exceed the storage size.
- * Also, only the slowest varying dimension of a simple data space
+ * Also, only the slowest varying dimension of a simple dataspace
* can be extendible (currently only for external data storage).
*/
/* Check for invalid dataset dimensions */
- if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
+ if ((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
- for(i = 0; i < ndims; i++)
- if(max_dim[i] > dim[i])
+ for (i = 0; i < ndims; i++)
+ if (max_dim[i] > dim[i])
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "extendible contiguous non-external dataset")
/* Retrieve the number of elements in the dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
nelmts = (hsize_t)snelmts;
/* Get the datatype's size */
- if(0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
+ if (0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
/* Compute the size of the dataset's contiguous storage */
tmp_size = nelmts * dt_size;
/* Check for overflow during multiplication */
- if(nelmts != (tmp_size / dt_size))
+ if (nelmts != (tmp_size / dt_size))
HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
/* Assign the dataset's contiguous storage size */
@@ -443,7 +421,7 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
/* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
* from the file access property. (SLU - 2012/3/30) */
- if(tmp_size < tmp_sieve_buf_size)
+ if (tmp_size < tmp_sieve_buf_size)
dset->shared->cache.contig.sieve_buf_size = tmp_size;
else
dset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
@@ -452,7 +430,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_construct() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_is_space_alloc
*
@@ -468,7 +445,7 @@ done:
hbool_t
H5D__contig_is_space_alloc(const H5O_storage_t *storage)
{
- hbool_t ret_value; /* Return value */
+ hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -481,7 +458,29 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_is_space_alloc() */
-
+/*-------------------------------------------------------------------------
+ * Function: H5D__contig_is_data_cached
+ *
+ * Purpose: Query if raw data is cached for dataset
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Neil Fortner
+ * Wednessday, March 6, 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Sanity checks */
+ HDassert(shared_dset);
+
+ FUNC_LEAVE_NOAPI(shared_dset->cache.contig.sieve_size > 0)
+} /* end H5D__contig_is_data_cached() */
+
/*-------------------------------------------------------------------------
* Function: H5D__contig_io_init
*
@@ -496,8 +495,8 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
*/
static herr_t
H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
@@ -507,7 +506,6 @@ H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__contig_io_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_read
*
@@ -521,11 +519,10 @@ H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_PACKAGE
@@ -537,14 +534,13 @@ H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HDassert(file_space);
/* Read data */
- if((io_info->io_ops.single_read)(io_info, type_info, nelmts, file_space, mem_space) < 0)
+ if ((io_info->io_ops.single_read)(io_info, type_info, nelmts, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "contiguous read failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_write
*
@@ -558,11 +554,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_PACKAGE
@@ -574,14 +569,13 @@ H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HDassert(file_space);
/* Write data */
- if((io_info->io_ops.single_write)(io_info, type_info, nelmts, file_space, mem_space) < 0)
+ if ((io_info->io_ops.single_write)(io_info, type_info, nelmts, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "contiguous write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_write_one
*
@@ -599,27 +593,26 @@ done:
static herr_t
H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
{
- hsize_t dset_off = offset; /* Offset in dataset */
- size_t dset_len = size; /* Length in dataset */
- size_t dset_curr_seq = 0; /* "Current sequence" in dataset */
- hsize_t mem_off = 0; /* Offset in memory */
- size_t mem_len = size; /* Length in memory */
- size_t mem_curr_seq = 0; /* "Current sequence" in memory */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t dset_off = offset; /* Offset in dataset */
+ size_t dset_len = size; /* Length in dataset */
+ size_t dset_curr_seq = 0; /* "Current sequence" in dataset */
+ hsize_t mem_off = 0; /* Offset in memory */
+ size_t mem_len = size; /* Length in memory */
+ size_t mem_curr_seq = 0; /* "Current sequence" in memory */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
HDassert(io_info);
- if(H5D__contig_writevv(io_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off,
- (size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0)
+ if (H5D__contig_writevv(io_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off, (size_t)1,
+ &mem_curr_seq, &mem_len, &mem_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_write_one() */
+} /* end H5D__contig_write_one() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_readvv_sieve_cb
*
@@ -633,30 +626,31 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
- void *_udata)
+H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
- H5D_contig_readvv_sieve_ud_t *udata = (H5D_contig_readvv_sieve_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- H5F_t *file = udata->file; /* File for dataset */
+ H5D_contig_readvv_sieve_ud_t *udata =
+ (H5D_contig_readvv_sieve_ud_t *)_udata; /* User data for H5VM_opvv() operator */
+ H5F_t * file = udata->file; /* File for dataset */
H5D_rdcdc_t *dset_contig = udata->dset_contig; /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig = udata->store_contig; /* Contiguous storage info for this I/O operation */
- unsigned char *buf; /* Pointer to buffer to fill */
- haddr_t addr; /* Actual address to read */
- haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
- haddr_t contig_end; /* End locations of block to write */
- size_t sieve_size = (size_t)-1; /* Size of sieve buffer */
- haddr_t rel_eoa; /* Relative end of file address */
- hsize_t max_data; /* Actual maximum size of data to cache */
- hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_contig_storage_t *store_contig =
+ udata->store_contig; /* Contiguous storage info for this I/O operation */
+ unsigned char *buf; /* Pointer to buffer to fill */
+ haddr_t addr; /* Actual address to read */
+ haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
+ haddr_t contig_end; /* End locations of block to write */
+ size_t sieve_size = (size_t)-1; /* Size of sieve buffer */
+ haddr_t rel_eoa; /* Relative end of file address */
+ hsize_t max_data; /* Actual maximum size of data to cache */
+ hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Stash local copies of these value */
- if(dset_contig->sieve_buf != NULL) {
+ if (dset_contig->sieve_buf != NULL) {
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end if */
/* Compute offset on disk */
@@ -666,22 +660,22 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
buf = udata->rbuf + src_off;
/* Check if the sieve buffer is allocated yet */
- if(NULL == dset_contig->sieve_buf) {
+ if (NULL == dset_contig->sieve_buf) {
/* Check if we can actually hold the I/O request in the sieve buffer */
- if(len > dset_contig->sieve_buf_size) {
- if(H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ if (len > dset_contig->sieve_buf_size) {
+ if (H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
else {
/* Allocate room for the data sieve buffer */
- if(NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size)))
+ if (NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
/* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ if (HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
/* Set up the buffer parameters */
@@ -692,7 +686,8 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
H5_CHECKED_ASSIGN(dset_contig->sieve_size, size_t, min, hsize_t);
/* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size,
+ udata->dxpl_id, dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
@@ -703,16 +698,16 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
/* Stash local copies of these value */
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start+sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Compute end of sequence to retrieve */
contig_end = addr + len - 1;
/* If entire read is within the sieve buffer, read it from the buffer */
- if(addr >= sieve_start && contig_end < sieve_end) {
+ if (addr >= sieve_start && contig_end < sieve_end) {
unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
/* Grab the data out of the buffer */
@@ -721,31 +716,33 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
/* Entire request is not within this data sieve buffer */
else {
/* Check if we can actually hold the I/O request in the sieve buffer */
- if(len > dset_contig->sieve_buf_size) {
+ if (len > dset_contig->sieve_buf_size) {
/* Check for any overlap with the current sieve buffer */
- if((sieve_start >= addr && sieve_start < (contig_end + 1))
- || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
+ if ((sieve_start >= addr && sieve_start < (contig_end + 1)) ||
+ ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
/* Flush the sieve buffer, if it's dirty */
- if(dset_contig->sieve_dirty) {
+ if (dset_contig->sieve_dirty) {
/* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id,
+ dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
/* Reset sieve buffer dirty flag */
dset_contig->sieve_dirty = FALSE;
} /* end if */
- } /* end if */
+ } /* end if */
/* Read directly into the user's buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ if (H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
/* Element size fits within the buffer size */
else {
/* Flush the sieve buffer if it's dirty */
- if(dset_contig->sieve_dirty) {
+ if (dset_contig->sieve_dirty) {
/* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id,
+ dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
/* Reset sieve buffer dirty flag */
@@ -756,7 +753,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
dset_contig->sieve_loc = addr;
/* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ if (HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
/* Only need this when resizing sieve buffer */
@@ -767,16 +764,17 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
* the end of the data element, and don't read more than
* the buffer size.
*/
- min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
+ min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
H5_CHECKED_ASSIGN(dset_contig->sieve_size, size_t, min, hsize_t);
/* Update local copies of sieve information */
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
/* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size,
+ udata->dxpl_id, dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
@@ -785,14 +783,13 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
/* Reset sieve buffer dirty flag */
dset_contig->sieve_dirty = FALSE;
} /* end else */
- } /* end else */
- } /* end else */
+ } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_readvv_sieve_cb() */
+} /* end H5D__contig_readvv_sieve_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_readvv_cb
*
@@ -809,20 +806,19 @@ static herr_t
H5D__contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
H5D_contig_readvv_ud_t *udata = (H5D_contig_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Write data */
- if(H5F_block_read(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off),
- len, udata->dxpl_id, (udata->rbuf + src_off)) < 0)
+ if (H5F_block_read(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id,
+ (udata->rbuf + src_off)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_readvv_cb() */
+} /* end H5D__contig_readvv_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_readvv
*
@@ -842,11 +838,11 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__contig_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+H5D__contig_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq,
+ size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
@@ -860,43 +856,42 @@ H5D__contig_readvv(const H5D_io_info_t *io_info,
HDassert(mem_off_arr);
/* Check if data sieving is enabled */
- if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
- H5D_contig_readvv_sieve_ud_t udata; /* User data for H5VM_opvv() operator */
+ if (H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
+ H5D_contig_readvv_sieve_ud_t udata; /* User data for H5VM_opvv() operator */
/* Set up user data for H5VM_opvv() */
- udata.file = io_info->dset->oloc.file;
- udata.dset_contig = &(io_info->dset->shared->cache.contig);
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_contig = &(io_info->dset->shared->cache.contig);
udata.store_contig = &(io_info->store->contig);
- udata.rbuf = (unsigned char *)io_info->u.rbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dxpl_id = io_info->dxpl_id;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__contig_readvv_sieve_cb, &udata)) < 0)
+ if ((ret_value =
+ H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_readvv_sieve_cb, &udata)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer read")
} /* end if */
else {
- H5D_contig_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
+ H5D_contig_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
/* Set up user data for H5VM_opvv() */
- udata.file = io_info->dset->oloc.file;
+ udata.file = io_info->dset->oloc.file;
udata.dset_addr = io_info->store->contig.dset_addr;
- udata.rbuf = (unsigned char *)io_info->u.rbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dxpl_id = io_info->dxpl_id;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__contig_readvv_cb, &udata)) < 0)
+ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_readvv_cb, &udata)) <
+ 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_readvv() */
+} /* end H5D__contig_readvv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_writevv_sieve_cb
*
@@ -910,30 +905,31 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
- void *_udata)
+H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
- H5D_contig_writevv_sieve_ud_t *udata = (H5D_contig_writevv_sieve_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- H5F_t *file = udata->file; /* File for dataset */
+ H5D_contig_writevv_sieve_ud_t *udata =
+ (H5D_contig_writevv_sieve_ud_t *)_udata; /* User data for H5VM_opvv() operator */
+ H5F_t * file = udata->file; /* File for dataset */
H5D_rdcdc_t *dset_contig = udata->dset_contig; /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig = udata->store_contig; /* Contiguous storage info for this I/O operation */
- const unsigned char *buf; /* Pointer to buffer to fill */
- haddr_t addr; /* Actual address to read */
- haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
- haddr_t contig_end; /* End locations of block to write */
- size_t sieve_size = (size_t)-1; /* size of sieve buffer */
- haddr_t rel_eoa; /* Relative end of file address */
- hsize_t max_data; /* Actual maximum size of data to cache */
- hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_contig_storage_t *store_contig =
+ udata->store_contig; /* Contiguous storage info for this I/O operation */
+ const unsigned char *buf; /* Pointer to buffer to fill */
+ haddr_t addr; /* Actual address to read */
+ haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
+ haddr_t contig_end; /* End locations of block to write */
+ size_t sieve_size = (size_t)-1; /* size of sieve buffer */
+ haddr_t rel_eoa; /* Relative end of file address */
+ hsize_t max_data; /* Actual maximum size of data to cache */
+ hsize_t min; /* temporary minimum value (avoids some ugly macro nesting) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Stash local copies of these values */
- if(dset_contig->sieve_buf != NULL) {
+ if (dset_contig->sieve_buf != NULL) {
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end if */
/* Compute offset on disk */
@@ -943,40 +939,41 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
buf = udata->wbuf + src_off;
/* No data sieve buffer yet, go allocate one */
- if(NULL == dset_contig->sieve_buf) {
+ if (NULL == dset_contig->sieve_buf) {
/* Check if we can actually hold the I/O request in the sieve buffer */
- if(len > dset_contig->sieve_buf_size) {
- if(H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ if (len > dset_contig->sieve_buf_size) {
+ if (H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
} /* end if */
else {
/* Allocate room for the data sieve buffer */
- if(NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size)))
+ if (NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed")
#ifdef H5_CLEAR_MEMORY
-if(dset_contig->sieve_size > len)
- HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
+ if (dset_contig->sieve_size > len)
+ HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
#endif /* H5_CLEAR_MEMORY */
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
/* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ if (HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
/* Set up the buffer parameters */
max_data = store_contig->dset_size - dst_off;
/* Compute the size of the sieve buffer */
- min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
+ min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
H5_CHECKED_ASSIGN(dset_contig->sieve_size, size_t, min, hsize_t);
/* Check if there is any point in reading the data from the file */
- if(dset_contig->sieve_size > len) {
+ if (dset_contig->sieve_size > len) {
/* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size,
+ udata->dxpl_id, dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
@@ -988,16 +985,16 @@ if(dset_contig->sieve_size > len)
/* Stash local copies of these values */
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Compute end of sequence to retrieve */
contig_end = addr + len - 1;
/* If entire write is within the sieve buffer, write it to the buffer */
- if(addr >= sieve_start && contig_end < sieve_end) {
+ if (addr >= sieve_start && contig_end < sieve_end) {
unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
/* Put the data into the sieve buffer */
@@ -1009,14 +1006,15 @@ if(dset_contig->sieve_size > len)
/* Entire request is not within this data sieve buffer */
else {
/* Check if we can actually hold the I/O request in the sieve buffer */
- if(len > dset_contig->sieve_buf_size) {
+ if (len > dset_contig->sieve_buf_size) {
/* Check for any overlap with the current sieve buffer */
- if((sieve_start >= addr && sieve_start < (contig_end + 1))
- || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
+ if ((sieve_start >= addr && sieve_start < (contig_end + 1)) ||
+ ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
/* Flush the sieve buffer, if it's dirty */
- if(dset_contig->sieve_dirty) {
+ if (dset_contig->sieve_dirty) {
/* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id,
+ dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
/* Reset sieve buffer dirty flag */
@@ -1024,24 +1022,24 @@ if(dset_contig->sieve_size > len)
} /* end if */
/* Force the sieve buffer to be re-read the next time */
- dset_contig->sieve_loc = HADDR_UNDEF;
+ dset_contig->sieve_loc = HADDR_UNDEF;
dset_contig->sieve_size = 0;
} /* end if */
/* Write directly from the user's buffer */
- if(H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ if (H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
} /* end if */
/* Element size fits within the buffer size */
else {
/* Check if it is possible to (exactly) prepend or append to existing (dirty) sieve buffer */
- if(((addr + len) == sieve_start || addr == sieve_end) &&
- (len + sieve_size) <= dset_contig->sieve_buf_size &&
- dset_contig->sieve_dirty) {
+ if (((addr + len) == sieve_start || addr == sieve_end) &&
+ (len + sieve_size) <= dset_contig->sieve_buf_size && dset_contig->sieve_dirty) {
/* Prepend to existing sieve buffer */
- if((addr + len) == sieve_start) {
+ if ((addr + len) == sieve_start) {
/* Move existing sieve information to correct location */
- HDmemmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf, dset_contig->sieve_size);
+ HDmemmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf,
+ dset_contig->sieve_size);
/* Copy in new information (must be first in sieve buffer) */
HDmemcpy(dset_contig->sieve_buf, buf, len);
@@ -1061,15 +1059,16 @@ if(dset_contig->sieve_size > len)
/* Update local copies of sieve information */
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end if */
/* Can't add the new data onto the existing sieve buffer */
else {
/* Flush the sieve buffer if it's dirty */
- if(dset_contig->sieve_dirty) {
+ if (dset_contig->sieve_dirty) {
/* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id,
+ dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
/* Reset sieve buffer dirty flag */
@@ -1080,7 +1079,7 @@ if(dset_contig->sieve_size > len)
dset_contig->sieve_loc = addr;
/* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ if (HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
/* Only need this when resizing sieve buffer */
@@ -1091,18 +1090,20 @@ if(dset_contig->sieve_size > len)
* the end of the data element, and don't read more than
* the buffer size.
*/
- min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
+ min = MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size);
H5_CHECKED_ASSIGN(dset_contig->sieve_size, size_t, min, hsize_t);
/* Update local copies of sieve information */
sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
/* Check if there is any point in reading the data from the file */
- if(dset_contig->sieve_size > len) {
+ if (dset_contig->sieve_size > len) {
/* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ if (H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc,
+ dset_contig->sieve_size, udata->dxpl_id,
+ dset_contig->sieve_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
@@ -1112,15 +1113,14 @@ if(dset_contig->sieve_size > len)
/* Set sieve buffer dirty flag */
dset_contig->sieve_dirty = TRUE;
} /* end else */
- } /* end else */
- } /* end else */
- } /* end else */
+ } /* end else */
+ } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_writevv_sieve_cb() */
+} /* end H5D__contig_writevv_sieve_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_writevv_cb
*
@@ -1136,20 +1136,21 @@ done:
static herr_t
H5D__contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
- H5D_contig_writevv_ud_t *udata = (H5D_contig_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_contig_writevv_ud_t *udata =
+ (H5D_contig_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Write data */
- if(H5F_block_write(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id, (udata->wbuf + src_off)) < 0)
+ if (H5F_block_write(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id,
+ (udata->wbuf + src_off)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_writevv_cb() */
+} /* end H5D__contig_writevv_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_writevv
*
@@ -1169,11 +1170,11 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__contig_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+H5D__contig_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq,
+ size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- ssize_t ret_value; /* Return value (Size of sequence in bytes) */
+ ssize_t ret_value = -1; /* Return value (Size of sequence in bytes) */
FUNC_ENTER_STATIC
@@ -1187,43 +1188,42 @@ H5D__contig_writevv(const H5D_io_info_t *io_info,
HDassert(mem_off_arr);
/* Check if data sieving is enabled */
- if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
- H5D_contig_writevv_sieve_ud_t udata; /* User data for H5VM_opvv() operator */
+ if (H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
+ H5D_contig_writevv_sieve_ud_t udata; /* User data for H5VM_opvv() operator */
/* Set up user data for H5VM_opvv() */
- udata.file = io_info->dset->oloc.file;
- udata.dset_contig = &(io_info->dset->shared->cache.contig);
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_contig = &(io_info->dset->shared->cache.contig);
udata.store_contig = &(io_info->store->contig);
- udata.wbuf = (const unsigned char *)io_info->u.wbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.wbuf = (const unsigned char *)io_info->u.wbuf;
+ udata.dxpl_id = io_info->dxpl_id;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__contig_writevv_sieve_cb, &udata)) < 0)
+ if ((ret_value =
+ H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_writevv_sieve_cb, &udata)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer write")
} /* end if */
else {
- H5D_contig_writevv_ud_t udata; /* User data for H5VM_opvv() operator */
+ H5D_contig_writevv_ud_t udata; /* User data for H5VM_opvv() operator */
/* Set up user data for H5VM_opvv() */
- udata.file = io_info->dset->oloc.file;
+ udata.file = io_info->dset->oloc.file;
udata.dset_addr = io_info->store->contig.dset_addr;
- udata.wbuf = (const unsigned char *)io_info->u.wbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.wbuf = (const unsigned char *)io_info->u.wbuf;
+ udata.dxpl_id = io_info->dxpl_id;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__contig_writevv_cb, &udata)) < 0)
+ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_writevv_cb, &udata)) <
+ 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__contig_writevv() */
+} /* end H5D__contig_writevv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_flush
*
@@ -1239,7 +1239,7 @@ done:
static herr_t
H5D__contig_flush(H5D_t *dset, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1247,14 +1247,13 @@ H5D__contig_flush(H5D_t *dset, hid_t dxpl_id)
HDassert(dset);
/* Flush any data in sieve buffer */
- if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
+ if (H5D__flush_sieve_buf(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_copy
*
@@ -1268,41 +1267,40 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
- H5F_t *f_dst, H5O_storage_contig_t *storage_dst, H5T_t *dt_src,
- H5O_copy_t *cpy_info, hid_t dxpl_id)
+H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f_dst,
+ H5O_storage_contig_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, hid_t dxpl_id)
{
- haddr_t addr_src; /* File offset in source dataset */
- haddr_t addr_dst; /* File offset in destination dataset */
- H5T_path_t *tpath_src_mem = NULL, *tpath_mem_dst = NULL; /* Datatype conversion paths */
- H5T_t *dt_dst = NULL; /* Destination datatype */
- H5T_t *dt_mem = NULL; /* Memory datatype */
- hid_t tid_src = -1; /* Datatype ID for source datatype */
- hid_t tid_dst = -1; /* Datatype ID for destination datatype */
- hid_t tid_mem = -1; /* Datatype ID for memory datatype */
- size_t src_dt_size = 0; /* Source datatype size */
- size_t mem_dt_size = 0; /* Memory datatype size */
- size_t dst_dt_size = 0; /* Destination datatype size */
- size_t max_dt_size; /* Max. datatype size */
- size_t nelmts = 0; /* Number of elements in buffer */
- size_t src_nbytes; /* Number of bytes to read from source */
- size_t mem_nbytes; /* Number of bytes to convert in memory */
- size_t dst_nbytes; /* Number of bytes to write to destination */
- hsize_t total_src_nbytes; /* Total number of bytes to copy */
- size_t buf_size; /* Size of copy buffer */
- void *buf = NULL; /* Buffer for copying data */
- void *bkg = NULL; /* Temporary buffer for copying data */
- void *reclaim_buf = NULL; /* Buffer for reclaiming data */
- H5S_t *buf_space = NULL; /* Dataspace describing buffer */
- hid_t buf_sid = -1; /* ID for buffer dataspace */
- hsize_t buf_dim[1] = {0}; /* Dimension for buffer */
- hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */
- hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */
- H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */
- hbool_t try_sieve = FALSE; /* Try to get data from the sieve buffer */
- haddr_t sieve_start = HADDR_UNDEF; /* Start location of sieve buffer */
- haddr_t sieve_end = HADDR_UNDEF; /* End locations of sieve buffer */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t addr_src; /* File offset in source dataset */
+ haddr_t addr_dst; /* File offset in destination dataset */
+ H5T_path_t * tpath_src_mem = NULL, *tpath_mem_dst = NULL; /* Datatype conversion paths */
+ H5T_t * dt_dst = NULL; /* Destination datatype */
+ H5T_t * dt_mem = NULL; /* Memory datatype */
+ hid_t tid_src = -1; /* Datatype ID for source datatype */
+ hid_t tid_dst = -1; /* Datatype ID for destination datatype */
+ hid_t tid_mem = -1; /* Datatype ID for memory datatype */
+ size_t src_dt_size = 0; /* Source datatype size */
+ size_t mem_dt_size = 0; /* Memory datatype size */
+ size_t dst_dt_size = 0; /* Destination datatype size */
+ size_t max_dt_size; /* Max. datatype size */
+ size_t nelmts = 0; /* Number of elements in buffer */
+ size_t src_nbytes; /* Number of bytes to read from source */
+ size_t mem_nbytes; /* Number of bytes to convert in memory */
+ size_t dst_nbytes; /* Number of bytes to write to destination */
+ hsize_t total_src_nbytes; /* Total number of bytes to copy */
+ size_t buf_size; /* Size of copy buffer */
+ void * buf = NULL; /* Buffer for copying data */
+ void * bkg = NULL; /* Temporary buffer for copying data */
+ void * reclaim_buf = NULL; /* Buffer for reclaiming data */
+ H5S_t * buf_space = NULL; /* Dataspace describing buffer */
+ hid_t buf_sid = -1; /* ID for buffer dataspace */
+ hsize_t buf_dim[1] = {0}; /* Dimension for buffer */
+ hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */
+ hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */
+ H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */
+ hbool_t try_sieve = FALSE; /* Try to get data from the sieve buffer */
+ haddr_t sieve_start = HADDR_UNDEF; /* Start location of sieve buffer */
+ haddr_t sieve_end = HADDR_UNDEF; /* End locations of sieve buffer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1314,7 +1312,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
HDassert(dt_src);
/* Allocate space for destination raw data */
- if(H5D__contig_alloc(f_dst, dxpl_id, storage_dst) < 0)
+ if (H5D__contig_alloc(f_dst, dxpl_id, storage_dst) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to allocate contiguous storage")
/* Set up number of bytes to copy, and initial buffer size */
@@ -1326,49 +1324,49 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
/* Create datatype ID for src datatype. We may or may not use this ID,
* but this ensures that the src datatype will be freed.
*/
- if((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype")
/* If there's a VLEN source datatype, set up type conversion information */
- if(H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
/* create a memory copy of the variable-length datatype */
- if(NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
- if((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
H5T_close(dt_mem);
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register memory datatype")
} /* end if */
/* create variable-length datatype at the destinaton file */
- if(NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy")
- if(H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
+ if (H5T_set_loc(dt_dst, f_dst, H5T_LOC_DISK) < 0) {
H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "cannot mark datatype on disk")
} /* end if */
- if((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
H5T_close(dt_dst);
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype")
} /* end if */
/* Set up the conversion functions */
- if(NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes")
- if(NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes")
/* Determine largest datatype size */
- if(0 == (src_dt_size = H5T_get_size(dt_src)))
+ if (0 == (src_dt_size = H5T_get_size(dt_src)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size")
- if(0 == (mem_dt_size = H5T_get_size(dt_mem)))
+ if (0 == (mem_dt_size = H5T_get_size(dt_mem)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(src_dt_size, mem_dt_size);
- if(0 == (dst_dt_size = H5T_get_size(dt_dst)))
+ if (0 == (dst_dt_size = H5T_get_size(dt_dst)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size")
max_dt_size = MAX(max_dt_size, dst_dt_size);
/* Set maximum number of whole elements that fit in buffer */
- if(0 == (nelmts = buf_size / max_dt_size))
+ if (0 == (nelmts = buf_size / max_dt_size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large")
/* Set the number of bytes to transfer */
@@ -1383,11 +1381,11 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
buf_dim[0] = nelmts;
/* Create the space and set the initial extent */
- if(NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL)))
+ if (NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Atomize */
- if((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID")
} /* end if */
@@ -1397,9 +1395,9 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
} /* end if */
else {
/* Check for reference datatype */
- if(H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
/* Need to fix values of references when copying across files */
- if(f_src != f_dst)
+ if (f_src != f_dst)
fix_ref = TRUE;
} /* end if */
@@ -1409,55 +1407,55 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
/* Allocate space for copy buffer */
HDassert(buf_size);
- if(NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer")
/* Need extra buffer for datatype conversions, to prevent stranding/leaking memory */
- if(is_vlen || fix_ref) {
- if(NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (is_vlen || fix_ref) {
+ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer")
/* allocate temporary bkg buff for data conversion */
- if(NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size)))
+ if (NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer")
} /* end if */
+ /* Loop over copying data */
addr_src = storage_src->addr;
addr_dst = storage_dst->addr;
/* If data sieving is enabled and the dataset is open in the file,
set up to copy data out of the sieve buffer if deemed possible later */
- if(H5F_HAS_FEATURE(f_src, H5FD_FEAT_DATA_SIEVE) &&
- shared_fo && shared_fo->cache.contig.sieve_buf) {
- try_sieve = TRUE;
+ if (H5F_HAS_FEATURE(f_src, H5FD_FEAT_DATA_SIEVE) && shared_fo && shared_fo->cache.contig.sieve_buf) {
+ try_sieve = TRUE;
sieve_start = shared_fo->cache.contig.sieve_loc;
- sieve_end = sieve_start + shared_fo->cache.contig.sieve_size;
- /*
+ sieve_end = sieve_start + shared_fo->cache.contig.sieve_size;
+ /*
* It is possble for addr_src to be undefined when:
* (a) The dataset is created and data is written to it.
* (b) The dataset is then copied via H5Ocopy().
- * H5D_mark() in H5Dint.c is different between
+ * H5D_mark() in H5Dint.c is different between
* 1.8 and develop branches:
- * 1.8--it just sets dataset->shared->layout_dirty as TRUE
+ * 1.8--it just sets dataset->shared->layout_dirty as TRUE
* to be flushed later.
* develop--it will flush the layout message if it has been changed.
*/
- if(!H5F_addr_defined(addr_src))
+ if (!H5F_addr_defined(addr_src))
addr_src = sieve_start;
}
HDassert(H5F_addr_defined(addr_src));
/* Loop over copying data */
- while(total_src_nbytes > 0) {
+ while (total_src_nbytes > 0) {
/* Check if we should reduce the number of bytes to transfer */
- if(total_src_nbytes < src_nbytes) {
+ if (total_src_nbytes < src_nbytes) {
/* Adjust bytes to transfer */
src_nbytes = (size_t)total_src_nbytes;
/* Adjust dataspace describing buffer */
- if(is_vlen) {
+ if (is_vlen) {
/* Adjust destination & memory bytes to transfer */
- nelmts = src_nbytes / src_dt_size;
+ nelmts = src_nbytes / src_dt_size;
dst_nbytes = nelmts * dst_dt_size;
mem_nbytes = nelmts * mem_dt_size;
@@ -1465,7 +1463,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
buf_dim[0] = nelmts;
/* Adjust size of buffer's dataspace */
- if(H5S_set_extent_real(buf_space, buf_dim) < 0)
+ if (H5S_set_extent_real(buf_space, buf_dim) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to change buffer dataspace size")
} /* end if */
else
@@ -1473,20 +1471,22 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
dst_nbytes = mem_nbytes = src_nbytes;
} /* end if */
- /* If the entire copy is within the sieve buffer, copy data from the sieve buffer */
- if(try_sieve && (addr_src >= sieve_start) && ((addr_src + src_nbytes -1) < sieve_end)) {
+ /* If the entire copy is within the sieve buffer, copy data from the sieve buffer */
+ if (try_sieve && (addr_src >= sieve_start) && ((addr_src + src_nbytes - 1) < sieve_end)) {
unsigned char *base_sieve_buf = shared_fo->cache.contig.sieve_buf + (addr_src - sieve_start);
HDmemcpy(buf, base_sieve_buf, src_nbytes);
- } else
+ }
+ else
/* Read raw data from source file */
- if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data")
+ if (H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data")
/* Perform datatype conversion, if necessary */
- if(is_vlen) {
+ if (is_vlen) {
/* Convert from source file to memory */
- if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Copy into another buffer, to reclaim memory later */
@@ -1496,27 +1496,29 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
HDmemset(bkg, 0, buf_size);
/* Convert from memory to destination file */
- if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Reclaim space from variable length data */
- if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
+ if (H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data")
} /* end if */
- else if(fix_ref) {
+ else if (fix_ref) {
/* Check for expanding references */
- if(cpy_info->expand_ref) {
+ if (cpy_info->expand_ref) {
size_t ref_count;
/* Determine # of reference elements to copy */
ref_count = src_nbytes / H5T_get_size(dt_src);
/* Copy the reference elements */
- if(H5O_copy_expand_ref(f_src, buf, dxpl_id, f_dst, bkg, ref_count, H5T_get_ref_type(dt_src), cpy_info) < 0)
+ if (H5O_copy_expand_ref(f_src, buf, dxpl_id, f_dst, bkg, ref_count, H5T_get_ref_type(dt_src),
+ cpy_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
/* After fix ref, copy the new reference elements to the buffer to write out */
- HDmemcpy(buf, bkg, buf_size);
+ HDmemcpy(buf, bkg, buf_size);
} /* end if */
else
/* Reset value to zero */
@@ -1524,7 +1526,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
} /* end if */
/* Write raw data to destination file */
- if(H5F_block_write(f_dst, H5FD_MEM_DRAW, addr_dst, dst_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
+ if (H5F_block_write(f_dst, H5FD_MEM_DRAW, addr_dst, dst_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data")
/* Adjust loop variables */
@@ -1534,21 +1536,20 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
} /* end while */
done:
- if(buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
+ if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID")
- if(tid_src > 0 && H5I_dec_ref(tid_src) < 0)
+ if (tid_src > 0 && H5I_dec_ref(tid_src) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
+ if (tid_dst > 0 && H5I_dec_ref(tid_dst) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
+ if (tid_mem > 0 && H5I_dec_ref(tid_mem) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(buf)
+ if (buf)
buf = H5FL_BLK_FREE(type_conv, buf);
- if(reclaim_buf)
+ if (reclaim_buf)
reclaim_buf = H5FL_BLK_FREE(type_conv, reclaim_buf);
- if(bkg)
+ if (bkg)
bkg = H5FL_BLK_FREE(type_conv, bkg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_copy() */
-
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index f955986..66c9237 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,51 +15,43 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5D__init_dbg_interface
-
+#define H5_INTERFACE_INIT_FUNC H5D__init_dbg_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*--------------------------------------------------------------------------
NAME
H5D__init_dbg_interface -- Initialize interface-specific information
@@ -80,42 +72,35 @@ H5D__init_dbg_interface(void)
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D__init_dbg_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ddebug
- *
- * Purpose: Prints various information about a dataset. This function is
- * not to be documented in the API at this time.
+ * Function: H5Ddebug
*
- * Return: Success: Non-negative
+ * Purpose: Prints various information about a dataset. This function is
+ * not to be documented in the API at this time.
*
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Wednesday, April 28, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Ddebug(hid_t dset_id)
{
- H5D_t *dset; /* Dataset to debug */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dset; /* Dataset to debug */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Print B-tree information */
- if(H5D_CHUNKED == dset->shared->layout.type)
- (void)H5D__chunk_dump_index(dset, H5AC_ind_dxpl_id, stdout);
- else if(H5D_CONTIGUOUS == dset->shared->layout.type)
- HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
+ if (H5D_CHUNKED == dset->shared->layout.type)
+ (void)H5D__chunk_dump_index(dset, H5AC_ind_dxpl_id, stdout);
+ else if (H5D_CONTIGUOUS == dset->shared->layout.type)
+ HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ddebug() */
-
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 3532db7..5297cc0 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ddeprec.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5D interface. These
* functions are here for compatibility purposes and may be
@@ -29,36 +29,31 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5D__init_deprec_interface
-
+#define H5_INTERFACE_INIT_FUNC H5D__init_deprec_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -67,23 +62,18 @@
static herr_t H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5D__init_deprec_interface -- Initialize interface-specific information
@@ -104,7 +94,6 @@ H5D__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D__init_deprec_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5D__term_deprec_interface -- Terminate interface
@@ -129,30 +118,30 @@ H5D__term_deprec_interface(void)
} /* H5D__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
- * Function: H5Dcreate1
+ * Function: H5Dcreate1
*
- * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
- * dataset for access, and associates with that dataset constant
- * and initial persistent properties including the type of each
- * datapoint as stored in the file (TYPE_ID), the size of the
- * dataset (SPACE_ID), and other initial miscellaneous
- * properties (DCPL_ID).
+ * Purpose: Creates a new dataset named NAME at LOC_ID, opens the
+ * dataset for access, and associates with that dataset constant
+ * and initial persistent properties including the type of each
+ * datapoint as stored in the file (TYPE_ID), the size of the
+ * dataset (SPACE_ID), and other initial miscellaneous
+ * properties (DCPL_ID).
*
- * All arguments are copied into the dataset, so the caller is
- * allowed to derive new types, data spaces, and creation
- * parameters from the old ones and reuse them in calls to
- * create other datasets.
+ * All arguments are copied into the dataset, so the caller is
+ * allowed to derive new types, data spaces, and creation
+ * parameters from the old ones and reuse them in calls to
+ * create other datasets.
*
- * Return: Success: The object ID of the new dataset. At this
- * point, the dataset is ready to receive its
- * raw data. Attempting to read raw data from
- * the dataset will probably return the fill
- * value. The dataset should be closed when
- * the caller is no longer interested in it.
+ * Return: Success: The object ID of the new dataset. At this
+ * point, the dataset is ready to receive its
+ * raw data. Attempting to read raw data from
+ * the dataset will probably return the fill
+ * value. The dataset should be closed when
+ * the caller is no longer interested in it.
*
- * Failure: FAIL
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Wednesday, December 3, 1997
@@ -160,60 +149,58 @@ H5D__term_deprec_interface(void)
*-------------------------------------------------------------------------
*/
hid_t
-H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
- hid_t dcpl_id)
+H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id)
{
- H5G_loc_t loc; /* Object location to insert dataset into */
- H5D_t *dset = NULL; /* New dataset's info */
- const H5S_t *space; /* Dataspace for dataset */
- hid_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location to insert dataset into */
+ H5D_t * dset = NULL; /* New dataset's info */
+ const H5S_t *space; /* Dataspace for dataset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE5("i", "i*siii", loc_id, name, type_id, space_id, dcpl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5I_DATATYPE != H5I_get_type(type_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype ID")
- if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id,H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace ID")
- if(H5P_DEFAULT == dcpl_id)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location ID")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
+ if (H5I_DATATYPE != H5I_get_type(type_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype ID")
+ if (NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace ID")
+ if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
+ else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID")
/* Build and open the new dataset */
- if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, H5P_LINK_CREATE_DEFAULT, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
+ if (NULL == (dset = H5D__create_named(&loc, name, type_id, space, H5P_LINK_CREATE_DEFAULT, dcpl_id,
+ H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
/* Register the new dataset to get an ID for it */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
+ if ((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset")
done:
- if(ret_value < 0)
- if(dset && H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (H5I_INVALID_HID == ret_value)
+ if (dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release dataset")
FUNC_LEAVE_API(ret_value)
} /* end H5Dcreate1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dopen1
+ * Function: H5Dopen1
*
- * Purpose: Finds a dataset named NAME at LOC_ID, opens it, and returns
- * its ID. The dataset should be close when the caller is no
- * longer interested in it.
+ * Purpose: Finds a dataset named NAME at LOC_ID, opens it, and returns
+ * its ID. The dataset should be close when the caller is no
+ * longer interested in it.
*
- * Note: Deprecated in favor of H5Dopen2
+ * Note: Deprecated in favor of H5Dopen2
*
- * Return: Success: A new dataset ID
- * Failure: FAIL
+ * Return: Success: A new dataset ID
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, December 4, 1997
@@ -223,25 +210,25 @@ done:
hid_t
H5Dopen1(hid_t loc_id, const char *name)
{
- H5D_t *dset = NULL;
- H5G_loc_t loc; /* Object location of group */
- H5G_loc_t dset_loc; /* Object location of dataset */
- H5G_name_t path; /* Dataset group hier. path */
- H5O_loc_t oloc; /* Dataset object location */
- H5O_type_t obj_type; /* Type of object at location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
- hid_t ret_value;
-
- FUNC_ENTER_API(FAIL)
+ H5D_t * dset = NULL;
+ H5G_loc_t loc; /* Object location of group */
+ H5G_loc_t dset_loc; /* Object location of dataset */
+ H5G_name_t path; /* Dataset group hier. path */
+ H5O_loc_t oloc; /* Dataset object location */
+ H5O_type_t obj_type; /* Type of object at location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
/* Set up dataset location to fill in */
dset_loc.oloc = &oloc;
@@ -249,50 +236,49 @@ H5Dopen1(hid_t loc_id, const char *name)
H5G_loc_reset(&dset_loc);
/* Find the dataset object */
- if(H5G_loc_find(&loc, name, &dset_loc, H5P_DEFAULT, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
+ if (H5G_loc_find(&loc, name, &dset_loc, H5P_DEFAULT, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, H5I_INVALID_HID, "not found")
loc_found = TRUE;
/* Check that the object found is the correct type */
- if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_DATASET)
- HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
+ if (H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "can't get object type")
+ if (obj_type != H5O_TYPE_DATASET)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, H5I_INVALID_HID, "not a dataset")
/* Open the dataset */
- if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset")
+ if (NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "can't open dataset")
/* Register an atom for the dataset */
- if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom")
+ if ((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset atom")
done:
- if(ret_value < 0) {
- if(dset != NULL) {
- if(H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (ret_value < 0) {
+ if (dset != NULL) {
+ if (H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release dataset")
} /* end if */
else {
- if(loc_found && H5G_loc_free(&dset_loc) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
+ if (loc_found && H5G_loc_free(&dset_loc) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5I_INVALID_HID, "can't free location")
} /* end else */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_API(ret_value)
} /* end H5Dopen1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dextend
+ * Function: H5Dextend
*
- * Purpose: This function makes sure that the dataset is at least of size
- * SIZE. The dimensionality of SIZE is the same as the data
- * space of the dataset being changed.
+ * Purpose: This function makes sure that the dataset is at least of size
+ * SIZE. The dimensionality of SIZE is the same as the data
+ * space of the dataset being changed.
*
- * Note: Deprecated in favor of H5Dset_extent
+ * Note: Deprecated in favor of H5Dset_extent
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Friday, January 30, 1998
@@ -302,27 +288,26 @@ done:
herr_t
H5Dextend(hid_t dset_id, const hsize_t size[])
{
- H5D_t *dset;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dset;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(!size)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier")
+ if (!size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
/* Increase size */
- if(H5D__extend(dset, size, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset")
+ if (H5D__extend(dset, size, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dextend() */
-
/*-------------------------------------------------------------------------
* Function: H5D__extend
*
@@ -338,12 +323,12 @@ done:
static herr_t
H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
{
- htri_t changed; /* Flag to indicate that the dataspace was successfully extended */
- H5S_t *space; /* Dataset's dataspace */
- int rank; /* Dataspace # of dimensions */
- hsize_t curr_dims[H5O_LAYOUT_NDIMS];/* Current dimension sizes */
- H5O_fill_t *fill; /* Dataset's fill value */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t changed; /* Flag to indicate that the dataspace was successfully extended */
+ H5S_t * space; /* Dataset's dataspace */
+ int rank; /* Dataspace # of dimensions */
+ hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
+ H5O_fill_t *fill; /* Dataset's fill value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -352,7 +337,7 @@ H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
HDassert(size);
/* Check if the filters in the DCPL will need to encode, and if so, can they? */
- if(H5D__check_filters(dataset) < 0)
+ if (H5D__check_filters(dataset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters")
/*
@@ -363,32 +348,31 @@ H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
/* Retrieve the current dimensions */
space = dataset->shared->space;
- if((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0)
+ if ((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions")
/* Increase the size of the data space */
- if((changed = H5S_extend(space, size)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to increase size of data space")
+ if ((changed = H5S_extend(space, size)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to increase size of data space")
/* Updated the dataset's info if the dataspace was successfully extended */
- if(changed) {
+ if (changed) {
/* Update the index values for the cached chunks for this dataset */
- if(H5D_CHUNKED == dataset->shared->layout.type) {
- if(H5D__chunk_set_info(dataset) < 0)
+ if (H5D_CHUNKED == dataset->shared->layout.type) {
+ if (H5D__chunk_set_info(dataset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks")
- if(H5D__chunk_update_cache(dataset, dxpl_id) < 0)
+ if (H5D__chunk_update_cache(dataset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices")
} /* end if */
- /* Allocate space for the new parts of the dataset, if appropriate */
+ /* Allocate space for the new parts of the dataset, if appropriate */
fill = &dataset->shared->dcpl_cache.fill;
- if(fill->alloc_time == H5D_ALLOC_TIME_EARLY)
- if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE,
- curr_dims) < 0)
+ if (fill->alloc_time == H5D_ALLOC_TIME_EARLY)
+ if (H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
/* Mark the dataspace as dirty, for later writing to the file */
- if(H5D__mark(dataset, dxpl_id, H5D_MARK_SPACE) < 0)
+ if (H5D__mark(dataset, dxpl_id, H5D_MARK_SPACE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
} /* end if */
@@ -396,4 +380,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__extend() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 3ebcefb..9f484a5 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 30, 2004
*/
@@ -20,97 +20,77 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vector and array functions */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Callback info for readvv operation */
typedef struct H5D_efl_readvv_ud_t {
- const H5O_efl_t *efl; /* Pointer to efl info */
- const H5D_t *dset; /* The dataset */
- unsigned char *rbuf; /* Read buffer */
+ const H5O_efl_t *efl; /* Pointer to efl info */
+ const H5D_t * dset; /* The dataset */
+ unsigned char * rbuf; /* Read buffer */
} H5D_efl_readvv_ud_t;
/* Callback info for writevv operation */
typedef struct H5D_efl_writevv_ud_t {
- const H5O_efl_t *efl; /* Pointer to efl info */
- const H5D_t *dset; /* The dataset */
- const unsigned char *wbuf; /* Write buffer */
+ const H5O_efl_t * efl; /* Pointer to efl info */
+ const H5D_t * dset; /* The dataset */
+ const unsigned char *wbuf; /* Write buffer */
} H5D_efl_writevv_ud_t;
-
/********************/
/* Local Prototypes */
/********************/
/* Layout operation callbacks */
static herr_t H5D__efl_construct(H5F_t *f, H5D_t *dset);
-static herr_t H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
-static ssize_t H5D__efl_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-static ssize_t H5D__efl_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static herr_t H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *cm);
+static ssize_t H5D__efl_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static ssize_t H5D__efl_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
/* Helper routines */
-static herr_t H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size,
- uint8_t *buf);
+static herr_t H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size, uint8_t *buf);
static herr_t H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size,
- const uint8_t *buf);
-
+ const uint8_t *buf);
/*********************/
/* Package Variables */
/*********************/
/* External File List (EFL) storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
- H5D__efl_construct,
- NULL,
- H5D__efl_is_space_alloc,
- H5D__efl_io_init,
- H5D__contig_read,
- H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{H5D__efl_construct, NULL, H5D__efl_is_space_alloc, NULL,
+ H5D__efl_io_init, H5D__contig_read, H5D__contig_write,
#ifdef H5_HAVE_PARALLEL
- NULL,
- NULL,
+ NULL, NULL,
#endif /* H5_HAVE_PARALLEL */
- H5D__efl_readvv,
- H5D__efl_writevv,
- NULL,
- NULL
-}};
-
+ H5D__efl_readvv, H5D__efl_writevv, NULL, NULL}};
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_construct
*
@@ -126,16 +106,16 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
static herr_t
H5D__efl_construct(H5F_t *f, H5D_t *dset)
{
- size_t dt_size; /* Size of datatype */
- hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
- hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
+ size_t dt_size; /* Size of datatype */
+ hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
+ hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */
hssize_t stmp_size; /* Temporary holder for raw data size */
- hsize_t tmp_size; /* Temporary holder for raw data size */
- hsize_t max_points; /* Maximum elements */
- hsize_t max_storage; /* Maximum storage size */
- int ndims; /* Rank of dataspace */
- int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ hsize_t max_points; /* Maximum elements */
+ hsize_t max_storage; /* Maximum storage size */
+ int ndims; /* Rank of dataspace */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -145,31 +125,31 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
/*
* The maximum size of the dataset cannot exceed the storage size.
- * Also, only the slowest varying dimension of a simple data space
+ * Also, only the slowest varying dimension of a simple dataspace
* can be extendible (currently only for external data storage).
*/
/* Check for invalid dataset dimensions */
- if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
+ if ((ndims = H5S_get_simple_extent_dims(dset->shared->space, dim, max_dim)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
- for(i = 1; i < ndims; i++)
- if(max_dim[i] > dim[i])
+ for (i = 1; i < ndims; i++)
+ if (max_dim[i] > dim[i])
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "only the first dimension can be extendible")
/* Retrieve the size of the dataset's datatype */
- if(0 == (dt_size = H5T_get_size(dset->shared->type)))
+ if (0 == (dt_size = H5T_get_size(dset->shared->type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size")
/* Check for storage overflows */
- max_points = H5S_get_npoints_max(dset->shared->space);
+ max_points = H5S_get_npoints_max(dset->shared->space);
max_storage = H5O_efl_total_size(&dset->shared->dcpl_cache.efl);
- if(H5S_UNLIMITED == max_points) {
- if(H5O_EFL_UNLIMITED != max_storage)
+ if (H5S_UNLIMITED == max_points) {
+ if (H5O_EFL_UNLIMITED != max_storage)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unlimited dataspace but finite storage")
} /* end if */
- else if((max_points * dt_size) < max_points)
+ else if ((max_points * dt_size) < max_points)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace * type size overflowed")
- else if((max_points * dt_size) > max_storage)
+ else if ((max_points * dt_size) > max_storage)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace size exceeds external storage size")
/* Compute the total size of dataset */
@@ -185,7 +165,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_construct() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_is_space_alloc
*
@@ -210,7 +189,6 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5D__efl_is_space_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_io_init
*
@@ -225,8 +203,8 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
*/
static herr_t
H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
@@ -235,7 +213,6 @@ H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNU
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__efl_io_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_read
*
@@ -254,17 +231,17 @@ H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNU
static herr_t
H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size, uint8_t *buf)
{
- int fd = -1;
- size_t to_read;
+ int fd = -1;
+ size_t to_read;
#ifndef NDEBUG
- hsize_t tempto_read;
+ hsize_t tempto_read;
#endif /* NDEBUG */
- hsize_t skip = 0;
- haddr_t cur;
- ssize_t n;
- size_t u; /* Local index variable */
- char *full_name = NULL; /* File name with prefix */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t skip = 0;
+ haddr_t cur;
+ ssize_t n;
+ size_t u; /* Local index variable */
+ char * full_name = NULL; /* File name with prefix */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -275,8 +252,8 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
HDassert(buf || 0 == size);
/* Find the first efl member from which to read */
- for (u=0, cur=0; u<efl->nused; u++) {
- if(H5O_EFL_UNLIMITED == efl->slot[u].size || addr < cur + efl->slot[u].size) {
+ for (u = 0, cur = 0; u < efl->nused; u++) {
+ if (H5O_EFL_UNLIMITED == efl->slot[u].size || addr < cur + efl->slot[u].size) {
skip = addr - cur;
break;
} /* end if */
@@ -284,28 +261,28 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
} /* end for */
/* Read the data */
- while(size) {
+ while (size) {
HDassert(buf);
- if(u >= efl->nused)
+ if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
- if(H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
+ if (H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
- if(H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0)
+ if (H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0)
HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name")
- if((fd = HDopen(full_name, O_RDONLY, 0)) < 0)
+ if ((fd = HDopen(full_name, O_RDONLY, 0)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
- if(HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
+ if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
#ifndef NDEBUG
- tempto_read = MIN((size_t)(efl->slot[u].size-skip), (hsize_t)size);
+ tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size);
H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t);
to_read = (size_t)tempto_read;
-#else /* NDEBUG */
- to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size);
+#else /* NDEBUG */
+ to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size);
#endif /* NDEBUG */
- if((n = HDread(fd, buf, to_read)) < 0)
+ if ((n = HDread(fd, buf, to_read)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file")
- else if((size_t)n < to_read)
+ else if ((size_t)n < to_read)
HDmemset(buf + n, 0, to_read - (size_t)n);
full_name = (char *)H5MM_xfree(full_name);
HDclose(fd);
@@ -317,15 +294,14 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
} /* end while */
done:
- if(full_name)
+ if (full_name)
full_name = (char *)H5MM_xfree(full_name);
- if(fd >= 0)
+ if (fd >= 0)
HDclose(fd);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_write
*
@@ -339,24 +315,21 @@ done:
* Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
static herr_t
H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size, const uint8_t *buf)
{
- int fd = -1;
- size_t to_write;
+ int fd = -1;
+ size_t to_write;
#ifndef NDEBUG
- hsize_t tempto_write;
+ hsize_t tempto_write;
#endif /* NDEBUG */
- haddr_t cur;
- hsize_t skip = 0;
- size_t u; /* Local index variable */
- char *full_name = NULL; /* File name with prefix */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t cur;
+ hsize_t skip = 0;
+ size_t u; /* Local index variable */
+ char * full_name = NULL; /* File name with prefix */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -367,8 +340,8 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
HDassert(buf || 0 == size);
/* Find the first efl member in which to write */
- for(u = 0, cur = 0; u < efl->nused; u++) {
- if(H5O_EFL_UNLIMITED == efl->slot[u].size || addr < cur + efl->slot[u].size) {
+ for (u = 0, cur = 0; u < efl->nused; u++) {
+ if (H5O_EFL_UNLIMITED == efl->slot[u].size || addr < cur + efl->slot[u].size) {
skip = addr - cur;
break;
} /* end if */
@@ -376,33 +349,33 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
} /* end for */
/* Write the data */
- while(size) {
+ while (size) {
HDassert(buf);
- if(u >= efl->nused)
+ if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file")
- if(H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
+ if (H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
- if(H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0)
+ if (H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0)
HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name")
- if((fd = HDopen(full_name, O_CREAT | O_RDWR, 0666)) < 0) {
- if(HDaccess(full_name, F_OK) < 0)
+ if ((fd = HDopen(full_name, O_CREAT | O_RDWR, 0666)) < 0) {
+ if (HDaccess(full_name, F_OK) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "external raw data file does not exist")
else
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
- } /* end if */
- if(HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
+ } /* end if */
+ if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
#ifndef NDEBUG
tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size);
H5_CHECK_OVERFLOW(tempto_write, hsize_t, size_t);
to_write = (size_t)tempto_write;
-#else /* NDEBUG */
+#else /* NDEBUG */
to_write = MIN((size_t)(efl->slot[u].size - skip), size);
#endif /* NDEBUG */
- if((size_t)HDwrite(fd, buf, to_write) != to_write)
+ if ((size_t)HDwrite(fd, buf, to_write) != to_write)
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file")
full_name = (char *)H5MM_xfree(full_name);
- HDclose (fd);
+ HDclose(fd);
fd = -1;
size -= to_write;
buf += to_write;
@@ -411,15 +384,14 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
} /* end while */
done:
- if(full_name)
+ if (full_name)
full_name = (char *)H5MM_xfree(full_name);
- if(fd >= 0)
+ if (fd >= 0)
HDclose(fd);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_readvv_cb
*
@@ -435,20 +407,19 @@ done:
static herr_t
H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
- H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Read data */
- if(H5D__efl_read(udata->efl, udata->dset, dst_off, len, (udata->rbuf + src_off)) < 0)
+ if (H5D__efl_read(udata->efl, udata->dset, dst_off, len, (udata->rbuf + src_off)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "EFL read failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_readvv_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_readvv
*
@@ -465,12 +436,12 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__efl_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+H5D__efl_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq,
+ size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- H5D_efl_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
- ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
+ H5D_efl_readvv_ud_t udata; /* User data for H5VM_opvv() operator */
+ ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */
FUNC_ENTER_STATIC
@@ -489,21 +460,19 @@ H5D__efl_readvv(const H5D_io_info_t *io_info,
HDassert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
- udata.efl = &(io_info->store->efl);
+ udata.efl = &(io_info->store->efl);
udata.dset = io_info->dset;
udata.rbuf = (unsigned char *)io_info->u.rbuf;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__efl_readvv_cb, &udata)) < 0)
+ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__efl_readvv_cb, &udata)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL read")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_readvv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_writevv_cb
*
@@ -519,20 +488,19 @@ done:
static herr_t
H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
{
- H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Write data */
- if(H5D__efl_write(udata->efl, udata->dset, dst_off, len, (udata->wbuf + src_off)) < 0)
+ if (H5D__efl_write(udata->efl, udata->dset, dst_off, len, (udata->wbuf + src_off)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "EFL write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_writevv_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_writevv
*
@@ -549,12 +517,12 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D__efl_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+H5D__efl_writevv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
+ size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq,
+ size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- H5D_efl_writevv_ud_t udata; /* User data for H5VM_opvv() operator */
- ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
+ H5D_efl_writevv_ud_t udata; /* User data for H5VM_opvv() operator */
+ ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */
FUNC_ENTER_STATIC
@@ -573,20 +541,18 @@ H5D__efl_writevv(const H5D_io_info_t *io_info,
HDassert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
- udata.efl = &(io_info->store->efl);
+ udata.efl = &(io_info->store->efl);
udata.dset = io_info->dset;
udata.wbuf = (const unsigned char *)io_info->u.wbuf;
/* Call generic sequence operation routine */
- if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
- mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
- H5D__efl_writevv_cb, &udata)) < 0)
+ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq,
+ mem_curr_seq, mem_len_arr, mem_off_arr, H5D__efl_writevv_cb, &udata)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL write")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__efl_writevv() */
-
/*-------------------------------------------------------------------------
* Function: H5D__efl_bh_info
*
@@ -603,7 +569,7 @@ done:
herr_t
H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -614,7 +580,7 @@ H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
HDassert(heap_size);
/* Get the size of the local heap for EFL's file list */
- if(H5HL_heapsize(f, dxpl_id, efl->heap_addr, heap_size) < 0)
+ if (H5HL_heapsize(f, dxpl_id, efl->heap_addr, heap_size) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, FAIL, "unable to retrieve local heap info")
done:
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index e0dde69..4221173 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Dfill.c
* Jun 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Fill value operations for datasets
*
@@ -26,42 +26,37 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5VMprivate.h" /* Vector and array functions */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5VMprivate.h" /* Vector and array functions */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5D__fill_release(H5D_fill_buf_info_t *fb_info);
-
/*********************/
/* Package Variables */
/*********************/
@@ -69,12 +64,10 @@ static herr_t H5D__fill_release(H5D_fill_buf_info_t *fb_info);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -85,7 +78,6 @@ H5FL_BLK_DEFINE_STATIC(non_zero_fill);
/* Declare the free list to manage blocks of zero fill-value data */
H5FL_BLK_DEFINE_STATIC(zero_fill);
-
/*--------------------------------------------------------------------------
NAME
H5Dfill
@@ -121,24 +113,23 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_
H5TRACE5("e", "*xi*xii", fill, fill_type_id, buf, buf_type_id, space_id);
/* Check args */
- if(buf == NULL)
+ if (buf == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer")
- if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataspace")
- if(NULL == (fill_type = (H5T_t *)H5I_object_verify(fill_type_id, H5I_DATATYPE)))
+ if (NULL == (fill_type = (H5T_t *)H5I_object_verify(fill_type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
- if(NULL == (buf_type = (H5T_t *)H5I_object_verify(buf_type_id, H5I_DATATYPE)))
+ if (NULL == (buf_type = (H5T_t *)H5I_object_verify(buf_type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
/* Fill the selection in the memory buffer */
- if(H5D__fill(fill, fill_type, buf, buf_type, space, H5AC_ind_dxpl_id) < 0)
+ if (H5D__fill(fill, fill_type, buf, buf_type, space, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed")
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Dfill() */
+} /* H5Dfill() */
-
/*--------------------------------------------------------------------------
NAME
H5D__fill
@@ -168,18 +159,18 @@ done:
on each element so that each of them has a copy of the VL data.
--------------------------------------------------------------------------*/
herr_t
-H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
- const H5T_t *buf_type, const H5S_t *space, hid_t dxpl_id)
+H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type, const H5S_t *space,
+ hid_t dxpl_id)
{
- H5WB_t *elem_wb = NULL; /* Wrapped buffer for element data */
- uint8_t elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for element data */
- H5WB_t *bkg_elem_wb = NULL; /* Wrapped buffer for background data */
- uint8_t bkg_elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for background data */
- uint8_t *bkg_buf = NULL; /* Background conversion buffer */
- uint8_t *tmp_buf = NULL; /* Temp conversion buffer */
- hid_t src_id = -1, dst_id = -1; /* Temporary type IDs */
- size_t dst_type_size; /* Size of destination type*/
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t * elem_wb = NULL; /* Wrapped buffer for element data */
+ uint8_t elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for element data */
+ H5WB_t * bkg_elem_wb = NULL; /* Wrapped buffer for background data */
+ uint8_t bkg_elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for background data */
+ uint8_t *bkg_buf = NULL; /* Background conversion buffer */
+ uint8_t *tmp_buf = NULL; /* Temp conversion buffer */
+ hid_t src_id = -1, dst_id = -1; /* Temporary type IDs */
+ size_t dst_type_size; /* Size of destination type*/
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -190,32 +181,32 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
HDassert(space);
/* Make sure the dataspace has an extent set (or is NULL) */
- if(!(H5S_has_extent(space)))
+ if (!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace extent has not been set")
/* Get the memory datatype size */
dst_type_size = H5T_get_size(buf_type);
/* If there's no fill value, just use zeros */
- if(fill == NULL) {
- void *elem_ptr; /* Pointer to element to use for fill value */
+ if (fill == NULL) {
+ void *elem_ptr; /* Pointer to element to use for fill value */
/* Wrap the local buffer for elements */
- if(NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf))))
+ if (NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for element */
- if(NULL == (elem_ptr = H5WB_actual_clear(elem_wb, dst_type_size)))
+ if (NULL == (elem_ptr = H5WB_actual_clear(elem_wb, dst_type_size)))
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Fill the selection in the memory buffer */
- if(H5S_select_fill(elem_ptr, dst_type_size, space, buf) < 0)
+ if (H5S_select_fill(elem_ptr, dst_type_size, space, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed")
} /* end if */
else {
- H5T_path_t *tpath; /* Conversion path information */
- size_t src_type_size; /* Size of source type */
- size_t buf_size; /* Desired buffer size */
+ H5T_path_t *tpath; /* Conversion path information */
+ size_t src_type_size; /* Size of source type */
+ size_t buf_size; /* Desired buffer size */
/* Get the file datatype size */
src_type_size = H5T_get_size(fill_type);
@@ -224,15 +215,15 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
buf_size = MAX(src_type_size, dst_type_size);
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(fill_type, buf_type, NULL, NULL, dxpl_id, FALSE)))
+ if (NULL == (tpath = H5T_path_find(fill_type, buf_type, NULL, NULL, dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
/* Construct source & destination datatype IDs, if we will need them */
- if(!H5T_path_noop(tpath)) {
- if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill_type, H5T_COPY_ALL), FALSE)) < 0)
+ if (!H5T_path_noop(tpath)) {
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill_type, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
- if((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(buf_type, H5T_COPY_ALL), FALSE)) < 0)
+ if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(buf_type, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
} /* end if */
@@ -240,11 +231,11 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
* then do conversion on each element so that each of them has a copy
* of the VL data.
*/
- if(TRUE == H5T_detect_class(fill_type, H5T_VLEN, FALSE)) {
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- H5S_sel_iter_t mem_iter; /* Memory selection iteration info */
- hssize_t nelmts; /* Number of data elements */
+ if (TRUE == H5T_detect_class(fill_type, H5T_VLEN, FALSE)) {
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ H5S_sel_iter_t mem_iter; /* Memory selection iteration info */
+ hssize_t nelmts; /* Number of data elements */
/* Get the number of elements in the selection */
nelmts = H5S_GET_SELECT_NPOINTS(space);
@@ -252,52 +243,55 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
H5_CHECK_OVERFLOW(nelmts, hssize_t, size_t);
/* Allocate a temporary buffer */
- if(NULL == (tmp_buf = H5FL_BLK_MALLOC(type_conv, (size_t)nelmts * buf_size)))
+ if (NULL == (tmp_buf = H5FL_BLK_MALLOC(type_conv, (size_t)nelmts * buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Allocate a background buffer, if necessary */
- if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)nelmts * buf_size)))
+ if (H5T_path_bkg(tpath) &&
+ NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)nelmts * buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Replicate the file's fill value into the temporary buffer */
H5VM_array_fill(tmp_buf, fill, src_type_size, (size_t)nelmts);
/* Convert from file's fill value into memory form */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(tpath, src_id, dst_id, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, bkg_buf,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed")
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Create a selection iterator for scattering the elements to memory buffer */
- if(H5S_select_iter_init(&mem_iter, space, dst_type_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information")
+ if (H5S_select_iter_init(&mem_iter, space, dst_type_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to initialize memory selection information")
/* Scatter the data into memory */
- if(H5D__scatter_mem(tmp_buf, space, &mem_iter, (size_t)nelmts, dxpl_cache, buf/*out*/) < 0) {
+ if (H5D__scatter_mem(tmp_buf, space, &mem_iter, (size_t)nelmts, dxpl_cache, buf /*out*/) < 0) {
H5S_SELECT_ITER_RELEASE(&mem_iter);
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed")
} /* end if */
/* Release the selection iterator */
- if(H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
+ if (H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
else {
- const uint8_t *fill_buf; /* Buffer to use for writing fill values */
+ const uint8_t *fill_buf; /* Buffer to use for writing fill values */
/* Convert disk buffer into memory buffer */
- if(!H5T_path_noop(tpath)) {
- void *elem_ptr; /* Pointer to element to use for fill value */
- void *bkg_ptr = NULL; /* Pointer to background element to use for fill value */
+ if (!H5T_path_noop(tpath)) {
+ void *elem_ptr; /* Pointer to element to use for fill value */
+ void *bkg_ptr = NULL; /* Pointer to background element to use for fill value */
/* Wrap the local buffer for elements */
- if(NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf))))
+ if (NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for element */
- if(NULL == (elem_ptr = H5WB_actual(elem_wb, buf_size)))
+ if (NULL == (elem_ptr = H5WB_actual(elem_wb, buf_size)))
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Copy the user's data into the buffer for conversion */
@@ -305,18 +299,19 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
/* If there's no VL type of data, do conversion first then fill the data into
* the memory buffer. */
- if(H5T_path_bkg(tpath)) {
+ if (H5T_path_bkg(tpath)) {
/* Wrap the local buffer for background elements */
- if(NULL == (bkg_elem_wb = H5WB_wrap(bkg_elem_buf, sizeof(bkg_elem_buf))))
+ if (NULL == (bkg_elem_wb = H5WB_wrap(bkg_elem_buf, sizeof(bkg_elem_buf))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for element */
- if(NULL == (bkg_ptr = H5WB_actual_clear(bkg_elem_wb, buf_size)))
+ if (NULL == (bkg_ptr = H5WB_actual_clear(bkg_elem_wb, buf_size)))
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer")
} /* end if */
/* Perform datatype conversion */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, elem_ptr, bkg_ptr, dxpl_id) < 0)
+ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, elem_ptr, bkg_ptr,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed")
/* Point at element buffer */
@@ -326,29 +321,28 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
fill_buf = (const uint8_t *)fill;
/* Fill the selection in the memory buffer */
- if(H5S_select_fill(fill_buf, dst_type_size, space, buf) < 0)
+ if (H5S_select_fill(fill_buf, dst_type_size, space, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed")
} /* end else */
- } /* end else */
+ } /* end else */
done:
- if(src_id != (-1) && H5I_dec_ref(src_id) < 0)
+ if (src_id != (-1) && H5I_dec_ref(src_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(dst_id != (-1) && H5I_dec_ref(dst_id) < 0)
+ if (dst_id != (-1) && H5I_dec_ref(dst_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
- if(tmp_buf)
+ if (tmp_buf)
tmp_buf = H5FL_BLK_FREE(type_conv, tmp_buf);
- if(elem_wb && H5WB_unwrap(elem_wb) < 0)
+ if (elem_wb && H5WB_unwrap(elem_wb) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
- if(bkg_elem_wb && H5WB_unwrap(bkg_elem_wb) < 0)
+ if (bkg_elem_wb && H5WB_unwrap(bkg_elem_wb) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__fill() */
-
/*-------------------------------------------------------------------------
* Function: H5D__fill_init
*
@@ -362,13 +356,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
- H5MM_allocate_t alloc_func, void *alloc_info,
- H5MM_free_t free_func, void *free_info,
- const H5O_fill_t *fill, const H5T_t *dset_type, hid_t dset_type_id,
- size_t total_nelmts, size_t max_buf_size, hid_t dxpl_id)
+H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocate_t alloc_func,
+ void *alloc_info, H5MM_free_t free_func, void *free_info, const H5O_fill_t *fill,
+ const H5T_t *dset_type, hid_t dset_type_id, size_t total_nelmts, size_t max_buf_size,
+ hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -382,29 +375,29 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
HDmemset(fb_info, 0, sizeof(*fb_info));
/* Cache constant information from the dataset */
- fb_info->fill = fill;
- fb_info->file_type = dset_type;
- fb_info->file_tid = dset_type_id;
+ fb_info->fill = fill;
+ fb_info->file_type = dset_type;
+ fb_info->file_tid = dset_type_id;
fb_info->fill_alloc_func = alloc_func;
fb_info->fill_alloc_info = alloc_info;
- fb_info->fill_free_func = free_func;
- fb_info->fill_free_info = free_info;
+ fb_info->fill_free_func = free_func;
+ fb_info->fill_free_info = free_info;
/* Fill the buffer with the user's fill value */
- if(fill->buf) {
- htri_t has_vlen_type; /* Whether the datatype has a VL component */
+ if (fill->buf) {
+ htri_t has_vlen_type; /* Whether the datatype has a VL component */
/* Detect whether the datatype has a VL component */
- if((has_vlen_type = H5T_detect_class(dset_type, H5T_VLEN, FALSE)) < 0)
+ if ((has_vlen_type = H5T_detect_class(dset_type, H5T_VLEN, FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to detect vlen datatypes?")
fb_info->has_vlen_fill_type = (hbool_t)has_vlen_type;
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
- if(fb_info->has_vlen_fill_type) {
+ if (fb_info->has_vlen_fill_type) {
/* Create temporary datatype for conversion operation */
- if(NULL == (fb_info->mem_type = H5T_copy(dset_type, H5T_COPY_REOPEN)))
+ if (NULL == (fb_info->mem_type = H5T_copy(dset_type, H5T_COPY_REOPEN)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy file datatype")
- if((fb_info->mem_tid = H5I_register(H5I_DATATYPE, fb_info->mem_type, FALSE)) < 0)
+ if ((fb_info->mem_tid = H5I_register(H5I_DATATYPE, fb_info->mem_type, FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype")
/* Retrieve sizes of memory & file datatypes */
@@ -417,7 +410,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->max_elmt_size = MAX(fb_info->mem_elmt_size, fb_info->file_elmt_size);
/* Compute the number of elements that fit within a buffer to write */
- if(total_nelmts > 0)
+ if (total_nelmts > 0)
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
@@ -427,48 +420,52 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
/* Allocate fill buffer */
- if(caller_fill_buf) {
- fb_info->fill_buf = caller_fill_buf;
+ if (caller_fill_buf) {
+ fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
} /* end if */
else {
- if(alloc_func)
+ if (alloc_func)
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
else
fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
- if(NULL == fb_info->fill_buf)
+ if (NULL == fb_info->fill_buf)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
} /* end else */
/* Get the datatype conversion path for this operation */
- if(NULL == (fb_info->fill_to_mem_tpath = H5T_path_find(dset_type, fb_info->mem_type, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
+ if (NULL == (fb_info->fill_to_mem_tpath =
+ H5T_path_find(dset_type, fb_info->mem_type, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to convert between src and dst datatypes")
/* Get the inverse datatype conversion path for this operation */
- if(NULL == (fb_info->mem_to_dset_tpath = H5T_path_find(fb_info->mem_type, dset_type, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
+ if (NULL == (fb_info->mem_to_dset_tpath =
+ H5T_path_find(fb_info->mem_type, dset_type, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to convert between src and dst datatypes")
/* Check if we need to allocate a background buffer */
- if(H5T_path_bkg(fb_info->fill_to_mem_tpath) || H5T_path_bkg(fb_info->mem_to_dset_tpath)) {
+ if (H5T_path_bkg(fb_info->fill_to_mem_tpath) || H5T_path_bkg(fb_info->mem_to_dset_tpath)) {
/* Check for inverse datatype conversion needing a background buffer */
/* (do this first, since it needs a larger buffer) */
- if(H5T_path_bkg(fb_info->mem_to_dset_tpath))
+ if (H5T_path_bkg(fb_info->mem_to_dset_tpath))
fb_info->bkg_buf_size = fb_info->elmts_per_buf * fb_info->max_elmt_size;
else
fb_info->bkg_buf_size = fb_info->max_elmt_size;
/* Allocate the background buffer */
- if(NULL == (fb_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, fb_info->bkg_buf_size)))
+ if (NULL == (fb_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, fb_info->bkg_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* If fill value is not library default, use it to set the element size */
HDassert(fill->size >= 0);
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = (size_t)fill->size;
/* Compute the number of elements that fit within a buffer to write */
- if(total_nelmts > 0)
+ if (total_nelmts > 0)
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
@@ -478,30 +475,30 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->fill_buf_size = MIN(max_buf_size, fb_info->elmts_per_buf * fb_info->max_elmt_size);
/* Allocate temporary buffer */
- if(caller_fill_buf) {
- fb_info->fill_buf = caller_fill_buf;
+ if (caller_fill_buf) {
+ fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
} /* end if */
else {
- if(alloc_func)
+ if (alloc_func)
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
else
fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
- if(NULL == fb_info->fill_buf)
+ if (NULL == fb_info->fill_buf)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
} /* end else */
/* Replicate the fill value into the cached buffer */
H5VM_array_fill(fb_info->fill_buf, fill->buf, fb_info->max_elmt_size, fb_info->elmts_per_buf);
- } /* end else */
- } /* end if */
- else { /* Fill the buffer with the default fill value */
+ } /* end else */
+ } /* end if */
+ else { /* Fill the buffer with the default fill value */
/* Retrieve size of elements */
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = H5T_get_size(dset_type);
HDassert(fb_info->max_elmt_size > 0);
/* Compute the number of elements that fit within a buffer to write */
- if(total_nelmts > 0)
+ if (total_nelmts > 0)
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
@@ -511,43 +508,44 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
/* Use (and zero) caller's buffer, if provided */
- if(caller_fill_buf) {
- fb_info->fill_buf = caller_fill_buf;
+ if (caller_fill_buf) {
+ fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
- if(alloc_func) {
+ if (alloc_func) {
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
- htri_t buf_avail = H5FL_BLK_AVAIL(zero_fill, fb_info->fill_buf_size); /* Check if there is an already zeroed out buffer available */
+ htri_t buf_avail = H5FL_BLK_AVAIL(
+ zero_fill,
+ fb_info->fill_buf_size); /* Check if there is an already zeroed out buffer available */
HDassert(buf_avail != FAIL);
/* Allocate temporary buffer (zeroing it if no buffer is available) */
- if(!buf_avail)
+ if (!buf_avail)
fb_info->fill_buf = H5FL_BLK_CALLOC(zero_fill, fb_info->fill_buf_size);
else
fb_info->fill_buf = H5FL_BLK_MALLOC(zero_fill, fb_info->fill_buf_size);
} /* end else */
- if(fb_info->fill_buf == NULL)
+ if (fb_info->fill_buf == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
} /* end else */
- } /* end else */
+ } /* end else */
done:
/* Cleanup on error */
- if(ret_value < 0)
- if(H5D__fill_term(fb_info) < 0)
+ if (ret_value < 0)
+ if (H5D__fill_term(fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__fill_init() */
-
/*-------------------------------------------------------------------------
* Function: H5D__fill_refill_vl
*
@@ -563,8 +561,8 @@ done:
herr_t
H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
- void * buf = NULL; /* Temporary fill buffer */
+ herr_t ret_value = SUCCEED; /* Return value */
+ void * buf = NULL; /* Temporary fill buffer */
FUNC_ENTER_PACKAGE
@@ -577,49 +575,52 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
HDmemcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
/* Reset first element of background buffer, if necessary */
- if(H5T_path_bkg(fb_info->fill_to_mem_tpath))
+ if (H5T_path_bkg(fb_info->fill_to_mem_tpath))
HDmemset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
/* Type convert the dataset buffer, to copy any VL components */
- if(H5T_convert(fb_info->fill_to_mem_tpath, fb_info->file_tid, fb_info->mem_tid, (size_t)1, (size_t)0, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(fb_info->fill_to_mem_tpath, fb_info->file_tid, fb_info->mem_tid, (size_t)1, (size_t)0,
+ (size_t)0, fb_info->fill_buf, fb_info->bkg_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed")
/* Replicate the fill value into the cached buffer */
- if(nelmts > 1)
- H5VM_array_fill((void *)((unsigned char *)fb_info->fill_buf + fb_info->mem_elmt_size), fb_info->fill_buf, fb_info->mem_elmt_size, (nelmts - 1));
+ if (nelmts > 1)
+ H5VM_array_fill((void *)((unsigned char *)fb_info->fill_buf + fb_info->mem_elmt_size),
+ fb_info->fill_buf, fb_info->mem_elmt_size, (nelmts - 1));
/* Reset the entire background buffer, if necessary */
- if(H5T_path_bkg(fb_info->mem_to_dset_tpath))
+ if (H5T_path_bkg(fb_info->mem_to_dset_tpath))
HDmemset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
/* Make a copy of the fill buffer so we can free dynamic elements after conversion */
- if(fb_info->fill_alloc_func)
+ if (fb_info->fill_alloc_func)
buf = fb_info->fill_alloc_func(fb_info->fill_buf_size, fb_info->fill_alloc_info);
else
buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
- if(!buf)
+ if (!buf)
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer")
HDmemcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
/* Type convert the dataset buffer, to copy any VL components */
- if(H5T_convert(fb_info->mem_to_dset_tpath, fb_info->mem_tid, fb_info->file_tid, nelmts, (size_t)0, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf, dxpl_id) < 0)
+ if (H5T_convert(fb_info->mem_to_dset_tpath, fb_info->mem_tid, fb_info->file_tid, nelmts, (size_t)0,
+ (size_t)0, fb_info->fill_buf, fb_info->bkg_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed")
done:
- if(buf) {
+ if (buf) {
/* Free dynamically allocated VL elements in fill buffer */
- if(fb_info->fill->type) {
- if(H5T_vlen_reclaim_elmt(buf, fb_info->fill->type, dxpl_id) < 0)
+ if (fb_info->fill->type) {
+ if (H5T_vlen_reclaim_elmt(buf, fb_info->fill->type, dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't reclaim vlen element")
} /* end if */
else {
- if(H5T_vlen_reclaim_elmt(buf, fb_info->mem_type, dxpl_id) < 0)
+ if (H5T_vlen_reclaim_elmt(buf, fb_info->mem_type, dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't reclaim vlen element")
} /* end else */
/* Free temporary fill buffer */
- if(fb_info->fill_free_func)
+ if (fb_info->fill_free_func)
fb_info->fill_free_func(buf, fb_info->fill_free_info);
else
buf = H5FL_BLK_FREE(non_zero_fill, buf);
@@ -628,7 +629,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__fill_refill_vl() */
-
/*-------------------------------------------------------------------------
* Function: H5D__fill_release
*
@@ -651,11 +651,11 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info)
HDassert(fb_info->fill);
/* Free the buffer for fill values */
- if(!fb_info->use_caller_fill_buf && fb_info->fill_buf) {
- if(fb_info->fill_free_func)
+ if (!fb_info->use_caller_fill_buf && fb_info->fill_buf) {
+ if (fb_info->fill_free_func)
fb_info->fill_free_func(fb_info->fill_buf, fb_info->fill_free_info);
else {
- if(fb_info->fill->buf)
+ if (fb_info->fill->buf)
fb_info->fill_buf = H5FL_BLK_FREE(non_zero_fill, fb_info->fill_buf);
else
fb_info->fill_buf = H5FL_BLK_FREE(zero_fill, fb_info->fill_buf);
@@ -666,7 +666,6 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__fill_release() */
-
/*-------------------------------------------------------------------------
* Function: H5D__fill_term
*
@@ -691,15 +690,14 @@ H5D__fill_term(H5D_fill_buf_info_t *fb_info)
H5D__fill_release(fb_info);
/* Free other resources for vlen fill values */
- if(fb_info->has_vlen_fill_type) {
- if(fb_info->mem_tid > 0)
+ if (fb_info->has_vlen_fill_type) {
+ if (fb_info->mem_tid > 0)
H5I_dec_ref(fb_info->mem_tid);
- else if(fb_info->mem_type)
+ else if (fb_info->mem_type)
H5T_close(fb_info->mem_type);
- if(fb_info->bkg_buf)
+ if (fb_info->bkg_buf)
fb_info->bkg_buf = H5FL_BLK_FREE(type_conv, fb_info->bkg_buf);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__fill_term() */
-
diff --git a/src/H5Dint.c b/src/H5Dint.c
index c34c9a9..82fca79 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,60 +15,51 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5D__init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5D__init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Struct for holding callback info during H5D_flush operation */
typedef struct {
- const H5F_t *f; /* Pointer to file being flushed */
- hid_t dxpl_id; /* DXPL for I/O operations */
+ const H5F_t *f; /* Pointer to file being flushed */
+ hid_t dxpl_id; /* DXPL for I/O operations */
} H5D_flush_ud_t;
-
/********************/
/* Local Prototypes */
/********************/
/* General stuff */
-static herr_t H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache);
-static H5D_shared_t *H5D__new(hid_t dcpl_id, hbool_t creating,
- hbool_t vl_type);
-static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id,
- const H5T_t *type);
-static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
-static herr_t H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset,
- hid_t dapl_id);
-static herr_t H5D_build_extfile_prefix(const H5D_t *dset, hid_t dapl_id,
- char **extfile_prefix);
-static herr_t H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id);
-static herr_t H5D__init_storage(const H5D_t *dataset, hbool_t full_overwrite,
- hsize_t old_dim[], hid_t dxpl_id);
-
+static herr_t H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache);
+static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type);
+static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type);
+static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
+static herr_t H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id);
+static herr_t H5D_build_extfile_prefix(const H5D_t *dset, hid_t dapl_id, char **extfile_prefix);
+static herr_t H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id);
+static herr_t H5D__init_storage(const H5D_t *dataset, hbool_t full_overwrite, hsize_t old_dim[],
+ hid_t dxpl_id);
/*********************/
/* Package Variables */
@@ -83,12 +74,10 @@ H5FL_BLK_DEFINE(vlen_vl_buf);
/* Declare a free list to manage other blocks of VL data */
H5FL_BLK_DEFINE(vlen_fl_buf);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -106,37 +95,34 @@ H5FL_EXTERN(H5D_chunk_info_t);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
+/* Disable warning for intentional identical branches here -QAK */
+H5_GCC_DIAG_OFF("larger-than=")
/* Define a static "default" dataset structure to use to initialize new datasets */
static H5D_shared_t H5D_def_dset;
+H5_GCC_DIAG_ON("larger-than=")
/* Dataset ID class */
static const H5I_class_t H5I_DATASET_CLS[1] = {{
- H5I_DATASET, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5D_close /* Callback routine for closing objects of this class */
+ H5I_DATASET, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5D_close /* Callback routine for closing objects of this class */
}};
-
-
/*-------------------------------------------------------------------------
- * Function: H5D_init
- *
- * Purpose: Initialize the interface from some other layer.
+ * Function: H5D_init
*
- * Return: Success: non-negative
+ * Purpose: Initialize the interface from some other layer.
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
- * Saturday, March 4, 2000
+ * Return: Success: non-negative
*
+ * Failure: negative
*-------------------------------------------------------------------------
*/
herr_t
H5D_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -145,10 +131,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_init() */
-
/*--------------------------------------------------------------------------
NAME
- H5D__init_interface -- Initialize interface-specific information
+ H5D__init_interface -- Initialize interface-specific information
USAGE
herr_t H5D__init_interface()
@@ -164,13 +149,13 @@ NOTES
static herr_t
H5D__init_interface(void)
{
- H5P_genplist_t *def_dcpl; /* Default Dataset Creation Property list */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *def_dcpl; /* Default Dataset Creation Property list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Initialize the atom group for the dataset IDs */
- if(H5I_register_type(H5I_DATASET_CLS) < 0)
+ if (H5I_register_type(H5I_DATASET_CLS) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the "default dataset" information */
@@ -179,57 +164,51 @@ H5D__init_interface(void)
/* Get the default dataset creation property list values and initialize the
* default dataset with them.
*/
- if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_ID_g)))
+ if (NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_ID_g)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list")
/* Get the default data storage layout */
- if(H5P_get(def_dcpl, H5D_CRT_LAYOUT_NAME, &H5D_def_dset.layout) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout")
+ if (H5P_get(def_dcpl, H5D_CRT_LAYOUT_NAME, &H5D_def_dset.layout) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout")
/* Get the default dataset creation properties */
- if(H5P_get(def_dcpl, H5D_CRT_EXT_FILE_LIST_NAME, &H5D_def_dset.dcpl_cache.efl) < 0)
+ if (H5P_get(def_dcpl, H5D_CRT_EXT_FILE_LIST_NAME, &H5D_def_dset.dcpl_cache.efl) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve external file list")
- if(H5P_get(def_dcpl, H5D_CRT_FILL_VALUE_NAME, &H5D_def_dset.dcpl_cache.fill) < 0)
+ if (H5P_get(def_dcpl, H5D_CRT_FILL_VALUE_NAME, &H5D_def_dset.dcpl_cache.fill) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve fill value")
- if(H5P_get(def_dcpl, H5O_CRT_PIPELINE_NAME, &H5D_def_dset.dcpl_cache.pline) < 0)
+ if (H5P_get(def_dcpl, H5O_CRT_PIPELINE_NAME, &H5D_def_dset.dcpl_cache.pline) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter")
/* Reset the "default DXPL cache" information */
HDmemset(&H5D_def_dxpl_cache, 0, sizeof(H5D_dxpl_cache_t));
/* Get the default DXPL cache information */
- if(H5D__get_dxpl_cache_real(H5P_DATASET_XFER_DEFAULT, &H5D_def_dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache_real(H5P_DATASET_XFER_DEFAULT, &H5D_def_dxpl_cache) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve default DXPL info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_term_interface
- *
- * Purpose: Terminate this interface.
- *
- * Return: Success: Positive if anything was done that might
- * affect other interfaces; zero otherwise.
- *
- * Failure: Negative.
+ * Function: H5D_term_interface
*
- * Programmer: Robb Matzke
- * Friday, November 20, 1998
+ * Purpose: Terminate this interface.
*
+ * Return: Success: Positive if anything was done that might
+ * affect other interfaces; zero otherwise.
+ * Failure: Negative.
*-------------------------------------------------------------------------
*/
int
H5D_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
- if(H5I_nmembers(H5I_DATASET) > 0) {
+ if (H5_interface_initialize_g) {
+ if (H5I_nmembers(H5I_DATASET) > 0) {
/* The dataset API uses the "force" flag set to true because it
* is using the "file objects" (H5FO) API functions to track open
* objects in the file. Using the H5FO code means that dataset
@@ -252,9 +231,9 @@ H5D_term_interface(void)
*
* QAK - 5/13/03
*/
- (void)H5I_clear_type(H5I_DATASET, TRUE, FALSE);
+ (void)H5I_clear_type(H5I_DATASET, TRUE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Close public interface */
n += H5D__term_pub_interface();
@@ -262,19 +241,18 @@ H5D_term_interface(void)
/* Close deprecated interface */
n += H5D__term_deprec_interface();
- /* Destroy the dataset object id group */
- (void)H5I_dec_type_ref(H5I_DATASET);
+ /* Destroy the dataset object id group */
+ (void)H5I_dec_type_ref(H5I_DATASET);
n++; /*H5I*/
- /* Mark closed */
- H5_interface_initialize_g = 0;
- } /* end else */
- } /* end if */
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* end H5D_term_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5D__get_dxpl_cache_real
@@ -297,8 +275,8 @@ H5D_term_interface(void)
static herr_t
H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
{
- H5P_genplist_t *dx_plist; /* Data transfer property list */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dx_plist; /* Data transfer property list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -306,58 +284,57 @@ H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
HDassert(cache);
/* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Get maximum temporary buffer size */
- if(H5P_get(dx_plist, H5D_XFER_MAX_TEMP_BUF_NAME, &cache->max_temp_buf) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_MAX_TEMP_BUF_NAME, &cache->max_temp_buf) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve maximum temporary buffer size")
/* Get temporary buffer pointer */
- if(H5P_get(dx_plist, H5D_XFER_TCONV_BUF_NAME, &cache->tconv_buf) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_TCONV_BUF_NAME, &cache->tconv_buf) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve temporary buffer pointer")
/* Get background buffer pointer */
- if(H5P_get(dx_plist, H5D_XFER_BKGR_BUF_NAME, &cache->bkgr_buf) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_BKGR_BUF_NAME, &cache->bkgr_buf) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve background buffer pointer")
/* Get background buffer type */
- if(H5P_get(dx_plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &cache->bkgr_buf_type) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &cache->bkgr_buf_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve background buffer type")
/* Get B-tree split ratios */
- if(H5P_get(dx_plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &cache->btree_split_ratio) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &cache->btree_split_ratio) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve B-tree split ratios")
/* Get I/O vector size */
- if(H5P_get(dx_plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &cache->vec_size) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &cache->vec_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve I/O vector size")
#ifdef H5_HAVE_PARALLEL
/* Collect Parallel I/O information for possible later use */
- if(H5P_get(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &cache->xfer_mode) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &cache->xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve parallel transfer method")
- if(H5P_get(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &cache->coll_opt_mode) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &cache->coll_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve collective transfer option")
#endif /* H5_HAVE_PARALLEL */
/* Get error detection properties */
- if(H5P_get(dx_plist, H5D_XFER_EDC_NAME, &cache->err_detect) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_EDC_NAME, &cache->err_detect) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve error detection info")
/* Get filter callback function */
- if(H5P_get(dx_plist, H5D_XFER_FILTER_CB_NAME, &cache->filter_cb) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_FILTER_CB_NAME, &cache->filter_cb) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve filter callback function")
/* Get the data transform property */
- if(H5P_get(dx_plist, H5D_XFER_XFORM_NAME, &cache->data_xform_prop) < 0)
+ if (H5P_get(dx_plist, H5D_XFER_XFORM_NAME, &cache->data_xform_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve data transform info")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__get_dxpl_cache_real() */
+} /* end H5D__get_dxpl_cache_real() */
-
/*--------------------------------------------------------------------------
NAME
H5D__get_dxpl_cache
@@ -383,7 +360,7 @@ done:
herr_t
H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -391,39 +368,32 @@ H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
HDassert(cache);
/* Check for the default DXPL */
- if(dxpl_id==H5P_DATASET_XFER_DEFAULT)
- *cache=&H5D_def_dxpl_cache;
- else
- if(H5D__get_dxpl_cache_real(dxpl_id,*cache) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't retrieve DXPL values")
+ if (dxpl_id == H5P_DATASET_XFER_DEFAULT)
+ *cache = &H5D_def_dxpl_cache;
+ else if (H5D__get_dxpl_cache_real(dxpl_id, *cache) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't retrieve DXPL values")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__get_dxpl_cache() */
+} /* H5D__get_dxpl_cache() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__create_named
- *
- * Purpose: Internal routine to create a new dataset.
- *
- * Return: Success: Non-NULL, pointer to new dataset object.
+ * Function: H5D__create_named
*
- * Failure: NULL
+ * Purpose: Internal routine to create a new dataset.
*
- * Programmer: Quincey Koziol
- * Thursday, April 5, 2007
+ * Return: Success: Non-NULL, pointer to new dataset object.
*
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5D_t *
-H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
- const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id,
- hid_t dxpl_id)
+H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H5S_t *space, hid_t lcpl_id,
+ hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id)
{
- H5O_obj_create_t ocrt_info; /* Information for object creation */
- H5D_obj_create_t dcrt_info; /* Information for dataset creation */
- H5D_t *ret_value; /* Return value */
+ H5O_obj_create_t ocrt_info; /* Information for object creation */
+ H5D_obj_create_t dcrt_info; /* Information for dataset creation */
+ H5D_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -439,17 +409,17 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
/* Set up dataset creation info */
dcrt_info.type_id = type_id;
- dcrt_info.space = space;
+ dcrt_info.space = space;
dcrt_info.dcpl_id = dcpl_id;
dcrt_info.dapl_id = dapl_id;
/* Set up object creation information */
ocrt_info.obj_type = H5O_TYPE_DATASET;
ocrt_info.crt_info = &dcrt_info;
- ocrt_info.new_obj = NULL;
+ ocrt_info.new_obj = NULL;
/* Create the new dataset and link it to its parent group */
- if(H5L_link_object(loc, name, &ocrt_info, lcpl_id, dapl_id, dxpl_id) < 0)
+ if (H5L_link_object(loc, name, &ocrt_info, lcpl_id, dapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create and link to dataset")
HDassert(ocrt_info.new_obj);
@@ -460,7 +430,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_named() */
-
/*-------------------------------------------------------------------------
* Function: H5D__get_space_status
*
@@ -468,22 +437,18 @@ done:
*
* Return:
* Success: Non-negative
- *
* Failture: Negative
- *
- * Programmer: Raymond Lu
- *
*-------------------------------------------------------------------------
*/
herr_t
H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
{
- hsize_t space_allocated; /* The number of bytes allocated for chunks */
- hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
- hsize_t nelmts; /* Number of elements in dataspace */
- size_t dt_size; /* Size of datatype */
- hsize_t full_size; /* The number of bytes in the dataset when fully populated */
- herr_t ret_value = SUCCEED;
+ hsize_t space_allocated; /* The number of bytes allocated for chunks */
+ hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
+ hsize_t nelmts; /* Number of elements in dataspace */
+ size_t dt_size; /* Size of datatype */
+ hsize_t full_size; /* The number of bytes in the dataset when fully populated */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -493,29 +458,29 @@ H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id
HDassert(dset->shared->space);
/* Get the total number of elements in dataset's dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
nelmts = (hsize_t)snelmts;
/* Get the size of the dataset's datatype */
- if(0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
+ if (0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
/* Compute the maximum size of the dataset in bytes */
full_size = nelmts * dt_size;
/* Check for overflow during multiplication */
- if(nelmts != (full_size / dt_size))
+ if (nelmts != (full_size / dt_size))
HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
/* Difficult to error check, since the error value is 0 and 0 is a valid value... :-/ */
- if(H5D__get_storage_size(dset, dxpl_id, &space_allocated) < 0)
+ if (H5D__get_storage_size(dset, dxpl_id, &space_allocated) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage")
/* Decide on how much of the space is allocated */
- if(space_allocated == 0)
+ if (space_allocated == 0)
*allocation = H5D_SPACE_STATUS_NOT_ALLOCATED;
- else if(space_allocated == full_size)
+ else if (space_allocated == full_size)
*allocation = H5D_SPACE_STATUS_ALLOCATED;
else {
/* Should only happen for chunked datasets currently */
@@ -528,32 +493,26 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_space_status() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__new
- *
- * Purpose: Creates a new, empty dataset structure
- *
- * Return: Success: Pointer to a new dataset descriptor.
- *
- * Failure: NULL
+ * Function: H5D__new
*
- * Programmer: Quincey Koziol
- * Monday, October 12, 1998
+ * Purpose: Creates a new, empty dataset structure
*
+ * Return: Success: Pointer to a new dataset descriptor.
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
static H5D_shared_t *
-H5D__new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
+H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
{
- H5D_shared_t *new_dset = NULL; /* New dataset object */
- H5P_genplist_t *plist; /* Property list created */
- H5D_shared_t *ret_value; /* Return value */
+ H5D_shared_t * new_dset = NULL; /* New dataset object */
+ H5P_genplist_t *plist; /* Property list created */
+ H5D_shared_t * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
/* Allocate new shared dataset structure */
- if(NULL == (new_dset = H5FL_MALLOC(H5D_shared_t)))
+ if (NULL == (new_dset = H5FL_MALLOC(H5D_shared_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the default dataset information */
@@ -562,26 +521,41 @@ H5D__new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
/* If we are using the default dataset creation property list, during creation
* don't bother to copy it, just increment the reference count
*/
- if(!vl_type && creating && dcpl_id == H5P_DATASET_CREATE_DEFAULT) {
- if(H5I_inc_ref(dcpl_id, FALSE) < 0)
+ if (!vl_type && creating && dcpl_id == H5P_DATASET_CREATE_DEFAULT) {
+ if (H5I_inc_ref(dcpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DCPL ID")
new_dset->dcpl_id = dcpl_id;
} /* end if */
else {
/* Get the property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
new_dset->dcpl_id = H5P_copy_plist(plist, FALSE);
} /* end else */
+ if (!vl_type && creating && dapl_id == H5P_DATASET_ACCESS_DEFAULT) {
+ if (H5I_inc_ref(dapl_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DAPL ID")
+ new_dset->dapl_id = dapl_id;
+ } /* end if */
+ else {
+ /* Get the property list */
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dapl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
+
+ new_dset->dapl_id = H5P_copy_plist(plist, FALSE);
+ } /* end else */
+
/* Set return value */
ret_value = new_dset;
done:
- if(ret_value == NULL)
- if(new_dset != NULL) {
- if(new_dset->dcpl_id != 0 && H5I_dec_ref(new_dset->dcpl_id) < 0)
+ if (ret_value == NULL)
+ if (new_dset != NULL) {
+ if (new_dset->dcpl_id != 0 && H5I_dec_ref(new_dset->dcpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "can't decrement temporary datatype ID")
+ if (new_dset->dapl_id != 0 && H5I_dec_ref(new_dset->dapl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "can't decrement temporary datatype ID")
new_dset = H5FL_FREE(H5D_shared_t, new_dset);
} /* end if */
@@ -589,28 +563,23 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__new() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__init_type
+ * Function: H5D__init_type
*
- * Purpose: Copy a datatype for a dataset's use, performing all the
+ * Purpose: Copy a datatype for a dataset's use, performing all the
* necessary adjustments, etc.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Thursday, June 24, 2004
- *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
static herr_t
H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
{
- htri_t relocatable; /* Flag whether the type is relocatable */
- htri_t immutable; /* Flag whether the type is immutable */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t relocatable; /* Flag whether the type is relocatable */
+ htri_t immutable; /* Flag whether the type is immutable */
+ hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -620,74 +589,70 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
HDassert(type);
/* Check whether the datatype is relocatable */
- if((relocatable = H5T_is_relocatable(type)) < 0)
+ if ((relocatable = H5T_is_relocatable(type)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?")
/* Check whether the datatype is immutable */
- if((immutable = H5T_is_immutable(type)) < 0)
+ if ((immutable = H5T_is_immutable(type)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?")
/* Get the file's 'use the latest version of the format' flag */
use_latest_format = H5F_USE_LATEST_FORMAT(file);
/* Copy the datatype if it's a custom datatype or if it'll change when it's location is changed */
- if(!immutable || relocatable || use_latest_format) {
+ if (!immutable || relocatable || use_latest_format) {
/* Copy datatype for dataset */
- if((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL)
+ if ((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy datatype")
- /* Convert a datatype (if committed) to a transient type if the committed datatype's file
- location is different from the file location where the dataset will be created */
- if(H5T_convert_committed_datatype(dset->shared->type, file) < 0)
+ /* Convert a datatype (if committed) to a transient type if the committed datatype's file
+ * location is different from the file location where the dataset will be created.
+ */
+ if (H5T_convert_committed_datatype(dset->shared->type, file) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get shared datatype info")
/* Mark any datatypes as being on disk now */
- if(H5T_set_loc(dset->shared->type, file, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(dset->shared->type, file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't set datatype location")
/* Set the latest format, if requested */
- if(use_latest_format)
- if(H5T_set_latest_version(dset->shared->type) < 0)
+ if (use_latest_format)
+ if (H5T_set_latest_version(dset->shared->type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype")
/* Get a datatype ID for the dataset's datatype */
- if((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type")
+ if ((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type")
} /* end if */
/* Not a custom datatype, just use it directly */
else {
- if(H5I_inc_ref(type_id, FALSE) < 0)
+ if (H5I_inc_ref(type_id, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "Can't increment datatype ID")
/* Use existing datatype */
dset->shared->type_id = type_id;
- dset->shared->type = (H5T_t *)type; /* (Cast away const OK - QAK) */
- } /* end else */
+ dset->shared->type = (H5T_t *)type; /* (Cast away const OK - QAK) */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__init_space
+ * Function: H5D__init_space
*
- * Purpose: Copy a dataspace for a dataset's use, performing all the
+ * Purpose: Copy a dataspace for a dataset's use, performing all the
* necessary adjustments, etc.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Tuesday, July 24, 2007
- *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
static herr_t
H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
{
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -700,50 +665,45 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
use_latest_format = H5F_USE_LATEST_FORMAT(file);
/* Copy dataspace for dataset */
- if(NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
+ if (NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataspace")
/* Set the latest format, if requested */
- if(use_latest_format)
- if(H5S_set_latest_version(dset->shared->space) < 0)
+ if (use_latest_format)
+ if (H5S_set_latest_version(dset->shared->space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype")
/* Set the dataset's dataspace to 'all' selection */
- if(H5S_select_all(dset->shared->space, TRUE) < 0)
+ if (H5S_select_all(dset->shared->space, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set all selection")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_space() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__update_oh_info
+ * Function: H5D__update_oh_info
*
- * Purpose: Create and fill object header for dataset
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Bill Wendling
- * Thursday, October 31, 2002
+ * Purpose: Create and fill object header for dataset
*
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
static herr_t
H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
{
- H5O_t *oh = NULL; /* Pointer to dataset's object header */
- size_t ohdr_size = H5D_MINHDR_SIZE; /* Size of dataset's object header */
- H5O_loc_t *oloc = NULL; /* Dataset's object location */
- H5O_layout_t *layout; /* Dataset's layout information */
- H5T_t *type; /* Dataset's datatype */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
- H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
- H5D_fill_value_t fill_status; /* Fill value status */
- hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to dataset's object header */
+ size_t ohdr_size = H5D_MINHDR_SIZE; /* Size of dataset's object header */
+ H5O_loc_t * oloc = NULL; /* Dataset's object location */
+ H5O_layout_t * layout; /* Dataset's layout information */
+ H5T_t * type; /* Dataset's datatype */
+ hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ H5O_fill_t * fill_prop; /* Pointer to dataset's fill value information */
+ H5D_fill_value_t fill_status; /* Fill value status */
+ hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */
+ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -752,22 +712,22 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
HDassert(dset);
/* Set some local variables, for convenience */
- oloc = &dset->oloc;
- layout = &dset->shared->layout;
- type = dset->shared->type;
+ oloc = &dset->oloc;
+ layout = &dset->shared->layout;
+ type = dset->shared->type;
fill_prop = &dset->shared->dcpl_cache.fill;
/* Get the file's 'use the latest version of the format' flag */
use_latest_format = H5F_USE_LATEST_FORMAT(file);
/* Retrieve "defined" status of fill value */
- if(H5P_is_fill_value_defined(fill_prop, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill_prop, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* Special case handling for variable-length types */
- if(H5T_detect_class(type, H5T_VLEN, FALSE)) {
+ if (H5T_detect_class(type, H5T_VLEN, FALSE)) {
/* If the default fill value is chosen for variable-length types, always write it */
- if(fill_prop->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_DEFAULT) {
+ if (fill_prop->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_DEFAULT) {
/* Update dataset creation property */
fill_prop->fill_time = H5D_FILL_TIME_ALLOC;
@@ -776,69 +736,73 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
} /* end if */
/* Don't allow never writing fill values with variable-length types */
- if(fill_prop->fill_time == H5D_FILL_TIME_NEVER)
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "Dataset doesn't support VL datatype when fill value is not defined")
+ if (fill_prop->fill_time == H5D_FILL_TIME_NEVER)
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL,
+ "Dataset doesn't support VL datatype when fill value is not defined")
} /* end if */
/* Determine whether fill value is defined or not */
- if(fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) {
+ if (fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) {
/* Convert fill value buffer to dataset's datatype */
- if(fill_prop->buf && fill_prop->size > 0 && H5O_fill_convert(fill_prop, type, &fill_changed, dxpl_id) < 0)
+ if (fill_prop->buf && fill_prop->size > 0 &&
+ H5O_fill_convert(fill_prop, type, &fill_changed, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert fill value to dataset type")
- fill_prop->fill_defined = TRUE;
- } else if(fill_status == H5D_FILL_VALUE_UNDEFINED) {
- fill_prop->fill_defined = FALSE;
- } else
+ fill_prop->fill_defined = TRUE;
+ }
+ else if (fill_status == H5D_FILL_VALUE_UNDEFINED)
+ fill_prop->fill_defined = FALSE;
+ else
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine if fill value is defined")
/* Check for invalid fill & allocation time setting */
- if(fill_prop->fill_defined == FALSE && fill_prop->fill_time == H5D_FILL_TIME_ALLOC)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "fill value writing on allocation set, but no fill value defined")
+ if (fill_prop->fill_defined == FALSE && fill_prop->fill_time == H5D_FILL_TIME_ALLOC)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "fill value writing on allocation set, but no fill value defined")
/* Check if the fill value info changed */
- if(fill_changed) {
- H5P_genplist_t *dc_plist; /* Dataset's creation property list */
+ if (fill_changed) {
+ H5P_genplist_t *dc_plist; /* Dataset's creation property list */
/* Get dataset's property list object */
HDassert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
- if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
+ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Update dataset creation property */
- if(H5P_set(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0)
+ if (H5P_set(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info")
} /* end if */
/* Add the dataset's raw data size to the size of the header, if the raw data will be stored as compact */
- if(layout->type == H5D_COMPACT)
+ if (layout->type == H5D_COMPACT)
ohdr_size += layout->storage.u.compact.size;
/* Create an object header for the dataset */
- if(H5O_create(file, dxpl_id, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc/*out*/) < 0)
+ if (H5O_create(file, dxpl_id, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc /*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header")
HDassert(file == dset->oloc.file);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(oloc, dxpl_id)))
+ if (NULL == (oh = H5O_pin(oloc, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
/* Write the dataspace header message */
- if(H5S_append(file, dxpl_id, oh, dset->shared->space) < 0)
+ if (H5S_append(file, dxpl_id, oh, dset->shared->space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update dataspace header message")
/* Write the datatype header message */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT, 0, type) < 0)
+ if (H5O_msg_append_oh(file, dxpl_id, oh, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT, 0, type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update datatype header message")
/* Write new fill value message */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, fill_prop) < 0)
+ if (H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, fill_prop) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message")
/* If there is valid information for the old fill value struct, add it */
/* (only if we aren't trying to write the latest version of the file format) */
- if(fill_prop->buf && !use_latest_format) {
- H5O_fill_t old_fill_prop; /* Copy of fill value property, for writing as "old" fill value */
+ if (fill_prop->buf && !use_latest_format) {
+ H5O_fill_t old_fill_prop; /* Copy of fill value property, for writing as "old" fill value */
/* Shallow copy the fill value property */
/* (we only want to make certain that the shared component isnt' modified) */
@@ -848,72 +812,71 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
H5O_msg_reset_share(H5O_FILL_ID, &old_fill_prop);
/* Write old fill value */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_ID, H5O_MSG_FLAG_CONSTANT, 0, &old_fill_prop) < 0)
+ if (H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_ID, H5O_MSG_FLAG_CONSTANT, 0, &old_fill_prop) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message")
} /* end if */
/* Update/create the layout (and I/O pipeline & EFL) messages */
- if(H5D__layout_oh_create(file, dxpl_id, oh, dset, dapl_id) < 0)
+ if (H5D__layout_oh_create(file, dxpl_id, oh, dset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message")
/* Indicate that the layout information was initialized */
layout_init = TRUE;
#ifdef H5O_ENABLE_BOGUS
-{
- H5P_genplist_t *dc_plist; /* Dataset's creation property list */
+ {
+ H5P_genplist_t *dc_plist; /* Dataset's creation property list */
- /* Get dataset's property list object */
- if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
+ /* Get dataset's property list object */
+ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
- /* Check whether to add a "bogus" message */
- if( (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) &&
- (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_ID_NAME) > 0) ) {
+ /* Check whether to add a "bogus" message */
+ if ((H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) &&
+ (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_ID_NAME) > 0)) {
- uint8_t bogus_flags = 0; /* Flags for creating "bogus" message */
- unsigned bogus_id; /* "bogus" ID */
+ uint8_t bogus_flags = 0; /* Flags for creating "bogus" message */
+ unsigned bogus_id; /* "bogus" ID */
- /* Retrieve "bogus" message ID */
- if(H5P_get(dc_plist, H5O_BOGUS_MSG_ID_NAME, &bogus_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options")
- /* Retrieve "bogus" message flags */
- if(H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options")
+ /* Retrieve "bogus" message ID */
+ if (H5P_get(dc_plist, H5O_BOGUS_MSG_ID_NAME, &bogus_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options")
+ /* Retrieve "bogus" message flags */
+ if (H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options")
- /* Add a "bogus" message (for error testing). */
- if(H5O_bogus_oh(file, dxpl_id, oh, bogus_id, (unsigned)bogus_flags) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message")
- } /* end if */
-}
+ /* Add a "bogus" message (for error testing). */
+ if (H5O_bogus_oh(file, dxpl_id, oh, bogus_id, (unsigned)bogus_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message")
+ } /* end if */
+ }
#endif /* H5O_ENABLE_BOGUS */
/* Add a modification time message, if using older format. */
/* (If using the latest format, the modification time is part of the object
* header and doesn't use a separate message -QAK)
*/
- if(!use_latest_format)
- if(H5O_touch_oh(file, dxpl_id, oh, TRUE) < 0)
+ if (!use_latest_format)
+ if (H5O_touch_oh(file, dxpl_id, oh, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message")
done:
/* Release pointer to object header itself */
- if(oh != NULL)
- if(H5O_unpin(oh) < 0)
+ if (oh != NULL)
+ if (H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
/* Error cleanup */
- if(ret_value < 0) {
- if(dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D__chunk_dest(file, dxpl_id, dset) < 0)
+ if (ret_value < 0) {
+ if (dset->shared->layout.type == H5D_CHUNKED && layout_init) {
+ if (H5D__chunk_dest(file, dxpl_id, dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__update_oh_info() */
-
/*--------------------------------------------------------------------------
* Function: H5D_build_extfile_prefix
*
@@ -922,26 +885,23 @@ done:
* should be used.
*
* Return: SUCCEED/FAIL
- *
- * Programmer: Steffen Kiess
- * October 16, 2015
*--------------------------------------------------------------------------
*/
static herr_t
H5D_build_extfile_prefix(const H5D_t *dset, hid_t dapl_id, char **extfile_prefix /*out*/)
{
- char *prefix = NULL; /* prefix used to look for the file */
- char *extpath = NULL; /* absolute path of directory the HDF5 file is in */
- size_t extpath_len; /* length of extpath */
- size_t prefix_len; /* length of prefix */
- size_t extfile_prefix_len; /* length of expanded prefix */
- hbool_t free_prefix = FALSE; /* Did the library allocate memory for prefix? */
- H5P_genplist_t *plist = NULL; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
-
+ char * prefix = NULL; /* prefix used to look for the file */
+ char * extpath = NULL; /* absolute path of directory the HDF5 file is in */
+ size_t extpath_len; /* length of extpath */
+ size_t prefix_len; /* length of prefix */
+ size_t extfile_prefix_len; /* length of expanded prefix */
+ hbool_t free_prefix = FALSE; /* Did the library allocate memory for prefix? */
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
+ /* Sanity checks */
HDassert(dset);
HDassert(dset->oloc.file);
@@ -953,80 +913,73 @@ H5D_build_extfile_prefix(const H5D_t *dset, hid_t dapl_id, char **extfile_prefix
*/
prefix = HDgetenv("HDF5_EXTFILE_PREFIX");
- if(prefix == NULL || *prefix == '\0') {
+ if (prefix == NULL || *prefix == '\0') {
/* Set prefix to value of H5D_ACS_EFILE_PREFIX_NAME property */
- if(NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* No error checking possible here */
- prefix = (char *)H5P_peek_voidp(plist, H5D_ACS_EFILE_PREFIX_NAME);
+ prefix = (char *)H5P_peek_voidp(plist, H5D_ACS_EFILE_PREFIX_NAME);
free_prefix = TRUE;
} /* end if */
/* Prefix has to be checked for NULL / empty string again because the
* code above might have updated it.
*/
- if(prefix == NULL || *prefix == '\0' || HDstrcmp(prefix, ".") == 0) {
+ if (prefix == NULL || *prefix == '\0' || HDstrcmp(prefix, ".") == 0) {
/* filename is interpreted as relative to the current directory,
* does not need to be expanded
*/
- if(NULL == (*extfile_prefix = (char *)H5MM_strdup("")))
+ if (NULL == (*extfile_prefix = (char *)H5MM_strdup("")))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end if */
else {
if (HDstrncmp(prefix, "${ORIGIN}", HDstrlen("${ORIGIN}")) == 0) {
/* Replace ${ORIGIN} at beginning of prefix by directory of HDF5 file */
- extpath_len = HDstrlen(extpath);
- prefix_len = HDstrlen(prefix);
+ extpath_len = HDstrlen(extpath);
+ prefix_len = HDstrlen(prefix);
extfile_prefix_len = extpath_len + prefix_len - HDstrlen("${ORIGIN}") + 1;
-
- if(NULL == (*extfile_prefix = (char *)H5MM_malloc(extfile_prefix_len)))
+
+ if (NULL == (*extfile_prefix = (char *)H5MM_malloc(extfile_prefix_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer")
HDsnprintf(*extfile_prefix, extfile_prefix_len, "%s%s", extpath, prefix + HDstrlen("${ORIGIN}"));
} /* end if */
else {
- if(NULL == (*extfile_prefix = (char *)H5MM_strdup(prefix)))
+ if (NULL == (*extfile_prefix = (char *)H5MM_strdup(prefix)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end else */
- } /* end else */
+ } /* end else */
done:
- if(free_prefix && prefix)
+ if (free_prefix && prefix)
H5MM_xfree(prefix);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D_build_extfile_prefix() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__create
- *
- * Purpose: Creates a new dataset with name NAME in file F and associates
- * with it a datatype TYPE for each element as stored in the
- * file, dimensionality information or dataspace SPACE, and
- * other miscellaneous properties CREATE_PARMS. All arguments
- * are deep-copied before being associated with the new dataset,
- * so the caller is free to subsequently modify them without
- * affecting the dataset.
- *
- * Return: Success: Pointer to a new dataset
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
- *
+ * Function: H5D__create
+ *
+ * Purpose: Creates a new dataset with name NAME in file F and associates
+ * with it a datatype TYPE for each element as stored in the
+ * file, dimensionality information or dataspace SPACE, and
+ * other miscellaneous properties CREATE_PARMS. All arguments
+ * are deep-copied before being associated with the new dataset,
+ * so the caller is free to subsequently modify them without
+ * affecting the dataset.
+ *
+ * Return: Success: Pointer to a new dataset
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5D_t *
-H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
- hid_t dapl_id, hid_t dxpl_id)
+H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id)
{
- const H5T_t *type; /* Datatype for dataset */
- H5D_t *new_dset = NULL;
- H5P_genplist_t *dc_plist = NULL; /* New Property list */
- hbool_t has_vl_type = FALSE; /* Flag to indicate a VL-type for dataset */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- H5G_loc_t dset_loc; /* Dataset location */
- H5D_t *ret_value; /* Return value */
+ const H5T_t * type; /* Datatype for dataset */
+ H5D_t * new_dset = NULL;
+ H5P_genplist_t *dc_plist = NULL; /* New Property list */
+ hbool_t has_vl_type = FALSE; /* Flag to indicate a VL-type for dataset */
+ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
+ H5G_loc_t dset_loc; /* Dataset location */
+ H5D_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1038,23 +991,23 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
/* Get the dataset's datatype */
- if(NULL == (type = (const H5T_t *)H5I_object(type_id)))
+ if (NULL == (type = (const H5T_t *)H5I_object(type_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype")
/* Check if the datatype is "sensible" for use in a dataset */
- if(H5T_is_sensible(type) != TRUE)
+ if (H5T_is_sensible(type) != TRUE)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible")
/* Check if the datatype is/contains a VL-type */
- if(H5T_detect_class(type, H5T_VLEN, FALSE))
+ if (H5T_detect_class(type, H5T_VLEN, FALSE))
has_vl_type = TRUE;
/* Check if the dataspace has an extent set (or is NULL) */
- if(!H5S_has_extent(space))
+ if (!H5S_has_extent(space))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "dataspace extent has not been set.")
/* Initialize the dataset object */
- if(NULL == (new_dset = H5FL_CALLOC(H5D_t)))
+ if (NULL == (new_dset = H5FL_CALLOC(H5D_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set up & reset dataset location */
@@ -1063,106 +1016,106 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
H5G_loc_reset(&dset_loc);
/* Initialize the shared dataset space */
- if(NULL == (new_dset->shared = H5D__new(dcpl_id, TRUE, has_vl_type)))
+ if (NULL == (new_dset->shared = H5D__new(dcpl_id, dapl_id, TRUE, has_vl_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy & initialize datatype for dataset */
- if(H5D__init_type(file, new_dset, type_id, type) < 0)
+ if (H5D__init_type(file, new_dset, type_id, type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy datatype")
/* Copy & initialize dataspace for dataset */
- if(H5D__init_space(file, new_dset, space) < 0)
+ if (H5D__init_space(file, new_dset, space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy dataspace")
/* Set the dataset's checked_filters flag to enable writing */
new_dset->shared->checked_filters = TRUE;
/* Check if the dataset has a non-default DCPL & get important values, if so */
- if(new_dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
- H5O_layout_t *layout; /* Dataset's layout information */
- H5O_pline_t *pline; /* Dataset's I/O pipeline information */
- H5O_fill_t *fill; /* Dataset's fill value info */
+ if (new_dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
+ H5O_layout_t *layout; /* Dataset's layout information */
+ H5O_pline_t * pline; /* Dataset's I/O pipeline information */
+ H5O_fill_t * fill; /* Dataset's fill value info */
/* Check if the filters in the DCPL can be applied to this dataset */
- if(H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ if (H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset")
/* Make the "set local" filter callbacks for this dataset */
- if(H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ if (H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters")
/* Get new dataset's property list object */
- if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id)))
+ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get dataset creation property list")
/* Retrieve the properties we need */
pline = &new_dset->shared->dcpl_cache.pline;
- if(H5P_get(dc_plist, H5O_CRT_PIPELINE_NAME, pline) < 0)
+ if (H5P_get(dc_plist, H5O_CRT_PIPELINE_NAME, pline) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve pipeline filter")
layout = &new_dset->shared->layout;
- if(H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0)
+ if (H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve layout")
- if(pline->nused > 0 && H5D_CHUNKED != layout->type)
+ if (pline->nused > 0 && H5D_CHUNKED != layout->type)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
fill = &new_dset->shared->dcpl_cache.fill;
- if(H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0)
+ if (H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve fill value info")
/* Check if the alloc_time is the default and error out */
- if(fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)
+ if (fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "invalid space allocation state")
/* Don't allow compact datasets to allocate space later */
- if(layout->type == H5D_COMPACT && fill->alloc_time != H5D_ALLOC_TIME_EARLY)
+ if (layout->type == H5D_COMPACT && fill->alloc_time != H5D_ALLOC_TIME_EARLY)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "compact dataset must have early space allocation")
/* If MPI VFD is used, no filter support yet. */
- if(H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI) && pline->nused > 0)
+ if (H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI) && pline->nused > 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, NULL, "Parallel I/O does not support filters yet")
/* Get the dataset's external file list information */
- if(H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &new_dset->shared->dcpl_cache.efl) < 0)
+ if (H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &new_dset->shared->dcpl_cache.efl) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve external file list")
} /* end if */
/* Set the latest version of the layout, pline & fill messages, if requested */
- if(H5F_USE_LATEST_FORMAT(file)) {
+ if (H5F_USE_LATEST_FORMAT(file)) {
/* Set the latest version for the I/O pipeline message */
- if(H5O_pline_set_latest_version(&new_dset->shared->dcpl_cache.pline) < 0)
+ if (H5O_pline_set_latest_version(&new_dset->shared->dcpl_cache.pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline")
/* Set the latest version for the fill value message */
- if(H5O_fill_set_latest_version(&new_dset->shared->dcpl_cache.fill) < 0)
+ if (H5O_fill_set_latest_version(&new_dset->shared->dcpl_cache.fill) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value")
} /* end if */
/* Check if this dataset is going into a parallel file and set space allocation time */
- if(H5F_HAS_FEATURE(file, H5FD_FEAT_ALLOCATE_EARLY))
+ if (H5F_HAS_FEATURE(file, H5FD_FEAT_ALLOCATE_EARLY))
new_dset->shared->dcpl_cache.fill.alloc_time = H5D_ALLOC_TIME_EARLY;
/* Set the dataset's I/O operations */
- if(H5D__layout_set_io_ops(new_dset) < 0)
+ if (H5D__layout_set_io_ops(new_dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations")
/* Create the layout information for the new dataset */
- if((new_dset->shared->layout.ops->construct)(file, new_dset) < 0)
+ if ((new_dset->shared->layout.ops->construct)(file, new_dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information")
/* Update the dataset's object header info. */
- if(H5D__update_oh_info(file, dxpl_id, new_dset, dapl_id) < 0)
+ if (H5D__update_oh_info(file, dxpl_id, new_dset, new_dset->shared->dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update the metadata cache")
/* Indicate that the layout information was initialized */
layout_init = TRUE;
/* Set the external file prefix */
- if(H5D_build_extfile_prefix(new_dset, dapl_id, &new_dset->shared->extfile_prefix) < 0)
+ if (H5D_build_extfile_prefix(new_dset, dapl_id, &new_dset->shared->extfile_prefix) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix")
/* Add the dataset to the list of opened objects in the file */
- if(H5FO_top_incr(new_dset->oloc.file, new_dset->oloc.addr) < 0)
+ if (H5FO_top_incr(new_dset->oloc.file, new_dset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't incr object ref. count")
- if(H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, TRUE) < 0)
+ if (H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects")
new_dset->shared->fo_count = 1;
@@ -1170,61 +1123,67 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
ret_value = new_dset;
done:
- if(!ret_value && new_dset && new_dset->shared) {
- if(new_dset->shared) {
- if(new_dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D__chunk_dest(file, dxpl_id, new_dset) < 0)
+ if (!ret_value && new_dset) {
+ if (new_dset->shared) {
+ if (new_dset->shared->layout.type == H5D_CHUNKED && layout_init) {
+ if (H5D__chunk_dest(file, dxpl_id, new_dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "unable to destroy chunk cache")
} /* end if */
- if(new_dset->shared->space && H5S_close(new_dset->shared->space) < 0)
+ if (new_dset->shared->space && H5S_close(new_dset->shared->space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release dataspace")
- if(new_dset->shared->type && H5I_dec_ref(new_dset->shared->type_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release datatype")
- if(H5F_addr_defined(new_dset->oloc.addr)) {
- if(H5O_dec_rc_by_loc(&(new_dset->oloc), dxpl_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object")
- if(H5O_close(&(new_dset->oloc)) < 0)
+ if (new_dset->shared->type) {
+ if (new_dset->shared->type_id > 0) {
+ if (H5I_dec_ref(new_dset->shared->type_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release datatype")
+ } /* end if */
+ else {
+ if (H5T_close(new_dset->shared->type) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release datatype")
+ } /* end else */
+ } /* end if */
+ if (H5F_addr_defined(new_dset->oloc.addr)) {
+ if (H5O_dec_rc_by_loc(&(new_dset->oloc), dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL,
+ "unable to decrement refcount on newly created object")
+ if (H5O_close(&(new_dset->oloc)) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release object header")
- if(file) {
- if(H5O_delete(file, dxpl_id, new_dset->oloc.addr) < 0)
+ if (file) {
+ if (H5O_delete(file, dxpl_id, new_dset->oloc.addr) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDELETE, NULL, "unable to delete object header")
} /* end if */
- } /* end if */
- if(new_dset->shared->dcpl_id != 0 && H5I_dec_ref(new_dset->shared->dcpl_id) < 0)
+ } /* end if */
+ if (new_dset->shared->dcpl_id != 0 && H5I_dec_ref(new_dset->shared->dcpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "unable to decrement ref count on property list")
+ if (new_dset->shared->dapl_id != 0 && H5I_dec_ref(new_dset->shared->dapl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "unable to decrement ref count on property list")
new_dset->shared->extfile_prefix = (char *)H5MM_xfree(new_dset->shared->extfile_prefix);
- new_dset->shared = H5FL_FREE(H5D_shared_t, new_dset->shared);
+ new_dset->shared = H5FL_FREE(H5D_shared_t, new_dset->shared);
} /* end if */
new_dset->oloc.file = NULL;
- new_dset = H5FL_FREE(H5D_t, new_dset);
+ new_dset = H5FL_FREE(H5D_t, new_dset);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create() */
-
/*
*-------------------------------------------------------------------------
- * Function: H5D_open
+ * Function: H5D_open
*
- * Purpose: Checks if dataset is already open, or opens a dataset for
+ * Purpose: Checks if dataset is already open, or opens a dataset for
* access.
*
- * Return: Success: Dataset ID
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Friday, December 20, 2002
- *
+ * Return: Success: Dataset ID
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
H5D_t *
H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
{
- H5D_shared_t *shared_fo = NULL;
- H5D_t *dataset = NULL;
- char *extfile_prefix = NULL; /* Expanded external file prefix */
- H5D_t *ret_value = NULL; /* Return value */
+ H5D_shared_t *shared_fo = NULL;
+ H5D_t * dataset = NULL;
+ char * extfile_prefix = NULL; /* Expanded external file prefix */
+ H5D_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1232,36 +1191,36 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
HDassert(loc);
/* Allocate the dataset structure */
- if(NULL == (dataset = H5FL_CALLOC(H5D_t)))
+ if (NULL == (dataset = H5FL_CALLOC(H5D_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy (take ownership) of the object location object */
- if(H5O_loc_copy(&(dataset->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
+ if (H5O_loc_copy(&(dataset->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy object location")
/* Shallow copy (take ownership) of the group hier. path */
- if(H5G_name_copy(&(dataset->path), loc->path, H5_COPY_SHALLOW) < 0)
+ if (H5G_name_copy(&(dataset->path), loc->path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy path")
/* Get the external file prefix */
- if(H5D_build_extfile_prefix(dataset, dapl_id, &extfile_prefix) < 0)
+ if (H5D_build_extfile_prefix(dataset, dapl_id, &extfile_prefix) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix")
/* Check if dataset was already open */
- if(NULL == (shared_fo = (H5D_shared_t *)H5FO_opened(dataset->oloc.file, dataset->oloc.addr))) {
+ if (NULL == (shared_fo = (H5D_shared_t *)H5FO_opened(dataset->oloc.file, dataset->oloc.addr))) {
/* Clear any errors from H5FO_opened() */
H5E_clear_stack(NULL);
/* Open the dataset object */
- if(H5D__open_oid(dataset, dapl_id, dxpl_id) < 0)
+ if (H5D__open_oid(dataset, dapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found")
/* Add the dataset to the list of opened objects in the file */
- if(H5FO_insert(dataset->oloc.file, dataset->oloc.addr, dataset->shared, FALSE) < 0)
+ if (H5FO_insert(dataset->oloc.file, dataset->oloc.addr, dataset->shared, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects")
/* Increment object count for the object in the top file */
- if(H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0)
+ if (H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count")
/* We're the first dataset to use the the shared info */
@@ -1283,18 +1242,20 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
/* Check whether the external file prefix of the already open dataset
* matches the new external file prefix
*/
- if(HDstrcmp(extfile_prefix, dataset->shared->extfile_prefix) != 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "new external file prefix does not match external file prefix of already open dataset")
+ if (HDstrcmp(extfile_prefix, dataset->shared->extfile_prefix) != 0)
+ HGOTO_ERROR(
+ H5E_DATASET, H5E_CANTOPENOBJ, NULL,
+ "new external file prefix does not match external file prefix of already open dataset")
/* Check if the object has been opened through the top file yet */
- if(H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) {
+ if (H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) {
/* Open the object through this top file */
- if(H5O_open(&(dataset->oloc)) < 0)
+ if (H5O_open(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open object header")
} /* end if */
/* Increment object count for the object in the top file */
- if(H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0)
+ if (H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count")
} /* end else */
@@ -1304,12 +1265,12 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
done:
extfile_prefix = (char *)H5MM_xfree(extfile_prefix);
- if(ret_value == NULL) {
+ if (ret_value == NULL) {
/* Free the location--casting away const*/
- if(dataset) {
- if(shared_fo == NULL && dataset->shared) { /* Need to free shared fo */
+ if (dataset) {
+ if (shared_fo == NULL && dataset->shared) { /* Need to free shared fo */
dataset->shared->extfile_prefix = (char *)H5MM_xfree(dataset->shared->extfile_prefix);
- dataset->shared = H5FL_FREE(H5D_shared_t, dataset->shared);
+ dataset->shared = H5FL_FREE(H5D_shared_t, dataset->shared);
}
H5O_loc_free(&(dataset->oloc));
@@ -1317,35 +1278,30 @@ done:
dataset = H5FL_FREE(H5D_t, dataset);
} /* end if */
- if(shared_fo)
+ if (shared_fo)
shared_fo->fo_count--;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__open_oid
- *
- * Purpose: Opens a dataset for access.
+ * Function: H5D__open_oid
*
- * Return: Dataset pointer on success, NULL on failure
- *
- * Programmer: Quincey Koziol
- * Monday, October 12, 1998
+ * Purpose: Opens a dataset for access.
*
+ * Return: Dataset pointer on success, NULL on failure
*-------------------------------------------------------------------------
*/
static herr_t
H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
{
- H5P_genplist_t *plist; /* Property list */
- H5O_fill_t *fill_prop; /* Pointer to dataset's fill value info */
- unsigned alloc_time_state; /* Allocation time state */
- htri_t msg_exists; /* Whether a particular type of message exists */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list */
+ H5O_fill_t * fill_prop; /* Pointer to dataset's fill value info */
+ unsigned alloc_time_state; /* Allocation time state */
+ htri_t msg_exists; /* Whether a particular type of message exists */
+ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1353,33 +1309,34 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
HDassert(dataset);
/* (Set the 'vl_type' parameter to FALSE since it doesn't matter from here) */
- if(NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, FALSE, FALSE)))
+ if (NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, dapl_id, FALSE, FALSE)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Open the dataset object */
- if(H5O_open(&(dataset->oloc)) < 0)
+ if (H5O_open(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open")
/* Get the type and space */
- if(NULL == (dataset->shared->type = (H5T_t *)H5O_msg_read(&(dataset->oloc), H5O_DTYPE_ID, NULL, dxpl_id)))
+ if (NULL ==
+ (dataset->shared->type = (H5T_t *)H5O_msg_read(&(dataset->oloc), H5O_DTYPE_ID, NULL, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load type info from dataset header")
- if(H5T_set_loc(dataset->shared->type, dataset->oloc.file, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(dataset->shared->type, dataset->oloc.file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
- if(NULL == (dataset->shared->space = H5S_read(&(dataset->oloc), dxpl_id)))
+ if (NULL == (dataset->shared->space = H5S_read(&(dataset->oloc), dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header")
/* Get a datatype ID for the dataset's datatype */
- if((dataset->shared->type_id = H5I_register(H5I_DATATYPE, dataset->shared->type, FALSE)) < 0)
+ if ((dataset->shared->type_id = H5I_register(H5I_DATATYPE, dataset->shared->type, FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type")
/* Get dataset creation property list object */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dataset->shared->dcpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dataset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Get the layout/pline/efl message information */
- if(H5D__layout_oh_read(dataset, dxpl_id, dapl_id, plist) < 0)
+ if (H5D__layout_oh_read(dataset, dxpl_id, dapl_id, plist) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info")
/* Indicate that the layout information was initialized */
@@ -1389,23 +1346,23 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
fill_prop = &dataset->shared->dcpl_cache.fill;
/* Try to get the new fill value message from the object header */
- if((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_NEW_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_NEW_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists")
- if(msg_exists) {
- if(NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_NEW_ID, fill_prop, dxpl_id))
+ if (msg_exists) {
+ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_NEW_ID, fill_prop, dxpl_id))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message")
} /* end if */
else {
- /* For backward compatibility, try to retrieve the old fill value message */
- if((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_ID, dxpl_id)) < 0)
+ /* For backward compatibility, try to retrieve the old fill value message */
+ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists")
- if(msg_exists) {
- if(NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_ID, fill_prop, dxpl_id))
+ if (msg_exists) {
+ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_ID, fill_prop, dxpl_id))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message")
} /* end if */
else {
/* Set the space allocation time appropriately, based on the type of dataset storage */
- switch(dataset->shared->layout.type) {
+ switch (dataset->shared->layout.type) {
case H5D_COMPACT:
fill_prop->alloc_time = H5D_ALLOC_TIME_EARLY;
break;
@@ -1423,23 +1380,23 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
default:
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "not implemented yet")
} /* end switch */ /*lint !e788 All appropriate cases are covered */
- } /* end else */
+ } /* end else */
/* If "old" fill value size is 0 (undefined), map it to -1 */
- if(fill_prop->size == 0)
+ if (fill_prop->size == 0)
fill_prop->size = (ssize_t)-1;
} /* end if */
alloc_time_state = 0;
- if((dataset->shared->layout.type == H5D_COMPACT && fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY)
- || (dataset->shared->layout.type == H5D_CONTIGUOUS && fill_prop->alloc_time == H5D_ALLOC_TIME_LATE)
- || (dataset->shared->layout.type == H5D_CHUNKED && fill_prop->alloc_time == H5D_ALLOC_TIME_INCR))
+ if ((dataset->shared->layout.type == H5D_COMPACT && fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY) ||
+ (dataset->shared->layout.type == H5D_CONTIGUOUS && fill_prop->alloc_time == H5D_ALLOC_TIME_LATE) ||
+ (dataset->shared->layout.type == H5D_CHUNKED && fill_prop->alloc_time == H5D_ALLOC_TIME_INCR))
alloc_time_state = 1;
/* Set revised fill value properties, if they are different from the defaults */
- if(H5P_fill_value_cmp(&H5D_def_dset.dcpl_cache.fill, fill_prop, sizeof(H5O_fill_t))) {
- if(H5P_set(plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0)
+ if (H5P_fill_value_cmp(&H5D_def_dset.dcpl_cache.fill, fill_prop, sizeof(H5O_fill_t))) {
+ if (H5P_set(plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set fill value")
- if(H5P_set(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0)
+ if (H5P_set(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set allocation time state")
} /* end if */
@@ -1448,59 +1405,54 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
* This is important only for parallel I/O where the space must
* be fully allocated before I/O can happen.
*/
- if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR)
- && !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
- && H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_ALLOCATE_EARLY)) {
- if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0)
+ if ((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR) &&
+ !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) &&
+ H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_ALLOCATE_EARLY)) {
+ if (H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage")
} /* end if */
done:
- if(ret_value < 0) {
- if(H5F_addr_defined(dataset->oloc.addr) && H5O_close(&(dataset->oloc)) < 0)
+ if (ret_value < 0) {
+ if (H5F_addr_defined(dataset->oloc.addr) && H5O_close(&(dataset->oloc)) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header")
- if(dataset->shared) {
- if(dataset->shared->layout.type == H5D_CHUNKED && layout_init)
- if(H5D__chunk_dest(dataset->oloc.file, dxpl_id, dataset) < 0)
+ if (dataset->shared) {
+ if (dataset->shared->layout.type == H5D_CHUNKED && layout_init)
+ if (H5D__chunk_dest(dataset->oloc.file, dxpl_id, dataset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
- if(dataset->shared->space && H5S_close(dataset->shared->space) < 0)
+ if (dataset->shared->space && H5S_close(dataset->shared->space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
- if(dataset->shared->type) {
- if(dataset->shared->type_id > 0) {
- if(H5I_dec_ref(dataset->shared->type_id) < 0)
+ if (dataset->shared->type) {
+ if (dataset->shared->type_id > 0) {
+ if (H5I_dec_ref(dataset->shared->type_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype")
} /* end if */
else {
- if(H5T_close(dataset->shared->type) < 0)
+ if (H5T_close(dataset->shared->type) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype")
} /* end else */
- } /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__open_oid() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_close
- *
- * Purpose: Insures that all data has been saved to the file, closes the
- * dataset object header, and frees all resources used by the
- * descriptor.
- *
- * Return: Non-negative on success/Negative on failure
+ * Function: H5D_close
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Purpose: Insures that all data has been saved to the file, closes the
+ * dataset object header, and frees all resources used by the
+ * descriptor.
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5D_close(H5D_t *dataset)
{
unsigned free_failed = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1514,52 +1466,57 @@ H5D_close(H5D_t *dataset)
#endif /* H5D_CHUNK_DEBUG */
dataset->shared->fo_count--;
- if(dataset->shared->fo_count == 0) {
+ if (dataset->shared->fo_count == 0) {
+
/* Flush the dataset's information. Continue to close even if it fails. */
- if(H5D__flush_real(dataset, H5AC_dxpl_id) < 0)
+ if (H5D__flush_real(dataset, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
/* Free the data sieve buffer, if it's been allocated */
- if(dataset->shared->cache.contig.sieve_buf) {
- HDassert(dataset->shared->layout.type != H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
+ if (dataset->shared->cache.contig.sieve_buf) {
+ HDassert(dataset->shared->layout.type !=
+ H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
- dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
+ dataset->shared->cache.contig.sieve_buf =
+ (unsigned char *)H5FL_BLK_FREE(sieve_buf, dataset->shared->cache.contig.sieve_buf);
} /* end if */
/* Free cached information for each kind of dataset */
- switch(dataset->shared->layout.type) {
+ switch (dataset->shared->layout.type) {
case H5D_CONTIGUOUS:
break;
case H5D_CHUNKED:
/* Check for skip list for iterating over chunks during I/O to close */
- if(dataset->shared->cache.chunk.sel_chunks) {
+ if (dataset->shared->cache.chunk.sel_chunks) {
HDassert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
H5SL_close(dataset->shared->cache.chunk.sel_chunks);
dataset->shared->cache.chunk.sel_chunks = NULL;
} /* end if */
/* Check for cached single chunk dataspace */
- if(dataset->shared->cache.chunk.single_space) {
+ if (dataset->shared->cache.chunk.single_space) {
(void)H5S_close(dataset->shared->cache.chunk.single_space);
dataset->shared->cache.chunk.single_space = NULL;
} /* end if */
/* Check for cached single element chunk info */
- if(dataset->shared->cache.chunk.single_chunk_info) {
- dataset->shared->cache.chunk.single_chunk_info = H5FL_FREE(H5D_chunk_info_t, dataset->shared->cache.chunk.single_chunk_info);
+ if (dataset->shared->cache.chunk.single_chunk_info) {
+ dataset->shared->cache.chunk.single_chunk_info =
+ H5FL_FREE(H5D_chunk_info_t, dataset->shared->cache.chunk.single_chunk_info);
dataset->shared->cache.chunk.single_chunk_info = NULL;
} /* end if */
- /* Flush and destroy chunks in the cache. Continue to close even if
+ /* Flush and destroy chunks in the cache. Continue to close even if
* it fails. */
- if(H5D__chunk_dest(dataset->oloc.file, H5AC_dxpl_id, dataset) < 0)
+ if (H5D__chunk_dest(dataset->oloc.file, H5AC_dxpl_id, dataset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
break;
case H5D_COMPACT:
/* Free the buffer for the raw data for compact datasets */
- dataset->shared->layout.storage.u.compact.buf = H5MM_xfree(dataset->shared->layout.storage.u.compact.buf);
+ dataset->shared->layout.storage.u.compact.buf =
+ H5MM_xfree(dataset->shared->layout.storage.u.compact.buf);
break;
case H5D_LAYOUT_ERROR:
@@ -1568,28 +1525,30 @@ H5D_close(H5D_t *dataset)
HDassert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
/* Free the external file prefix */
dataset->shared->extfile_prefix = (char *)H5MM_xfree(dataset->shared->extfile_prefix);
/*
- * Release datatype, dataspace and creation property list -- there isn't
- * much we can do if one of these fails, so we just continue.
- */
- free_failed |= (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
- H5I_dec_ref(dataset->shared->dcpl_id) < 0);
+ * Release datatype, dataspace, creation and access property lists -- there isn't
+ * much we can do if one of these fails, so we just continue.
+ */
+ free_failed |=
+ (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
+ H5I_dec_ref(dataset->shared->dcpl_id) < 0 ||
+ H5I_dec_ref(dataset->shared->dapl_id) < 0);
/* Remove the dataset from the list of opened objects in the file */
- if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
+ if (H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
- if(H5FO_delete(dataset->oloc.file, H5AC_dxpl_id, dataset->oloc.addr) < 0)
+ if (H5FO_delete(dataset->oloc.file, H5AC_dxpl_id, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't remove dataset from list of open objects")
/* Close the dataset object */
/* (This closes the file, if this is the last object open) */
- if(H5O_close(&(dataset->oloc)) < 0)
+ if (H5O_close(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header")
/*
@@ -1599,52 +1558,48 @@ H5D_close(H5D_t *dataset)
* above).
*/
dataset->oloc.file = NULL;
+ dataset->shared = H5FL_FREE(H5D_shared_t, dataset->shared);
- dataset->shared = H5FL_FREE(H5D_shared_t, dataset->shared);
} /* end if */
else {
/* Decrement the ref. count for this object in the top file */
- if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
+ if (H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
/* Check reference count for this object in the top file */
- if(H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) {
- if(H5O_close(&(dataset->oloc)) < 0)
+ if (H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) {
+ if (H5O_close(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to close")
} /* end if */
else
/* Free object location (i.e. "unhold" the file if appropriate) */
- if(H5O_loc_free(&(dataset->oloc)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
+ if (H5O_loc_free(&(dataset->oloc)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
} /* end else */
- /* Release the dataset's path info */
- if(H5G_name_free(&(dataset->path)) < 0)
- free_failed = TRUE;
+ /* Release the dataset's path info */
+ if (H5G_name_free(&(dataset->path)) < 0)
+ free_failed = TRUE;
/* Free the dataset's memory structure */
dataset = H5FL_FREE(H5D_t, dataset);
/* Check if anything failed in the middle... */
- if(free_failed)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't free a component of the dataset, but the dataset was freed anyway.")
+ if (free_failed)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "couldn't free a component of the dataset, but the dataset was freed anyway.")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_oloc
+ * Function: H5D_oloc
*
- * Purpose: Returns a pointer to the object location for a dataset.
- *
- * Return: Success: Ptr to location
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Friday, April 24, 1998
+ * Purpose: Returns a pointer to the object location for a dataset.
*
+ * Return: Success: Ptr to location
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5O_loc_t *
@@ -1656,18 +1611,13 @@ H5D_oloc(H5D_t *dataset)
FUNC_LEAVE_NOAPI(dataset ? &(dataset->oloc) : (H5O_loc_t *)NULL)
} /* end H5D_oloc() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_nameof
- *
- * Purpose: Returns a pointer to the group hier. path for a dataset.
- *
- * Return: Success: Ptr to entry
- * Failure: NULL
+ * Function: H5D_nameof
*
- * Programmer: Quincey Koziol
- * Monday, September 12, 2005
+ * Purpose: Returns a pointer to the group hier. path for a dataset.
*
+ * Return: Success: Ptr to entry
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5G_name_t *
@@ -1679,19 +1629,14 @@ H5D_nameof(H5D_t *dataset)
FUNC_LEAVE_NOAPI(dataset ? &(dataset->path) : (H5G_name_t *)NULL)
} /* end H5D_nameof() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_typeof
+ * Function: H5D_typeof
*
- * Purpose: Returns a pointer to the dataset's datatype. The datatype
- * is not copied.
- *
- * Return: Success: Ptr to the dataset's datatype, uncopied.
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Thursday, June 4, 1998
+ * Purpose: Returns a pointer to the dataset's datatype. The datatype
+ * is not copied.
*
+ * Return: Success: Ptr to the dataset's datatype, uncopied.
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -1707,28 +1652,23 @@ H5D_typeof(const H5D_t *dset)
FUNC_LEAVE_NOAPI(dset->shared->type)
} /* end H5D_typeof() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__alloc_storage
- *
- * Purpose: Allocate storage for the raw data of a dataset.
+ * Function: H5D__alloc_storage
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Friday, January 16, 1998
+ * Purpose: Allocate storage for the raw data of a dataset.
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
-H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
- hbool_t full_overwrite, hsize_t old_dim[])
+H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc, hbool_t full_overwrite,
+ hsize_t old_dim[])
{
- H5F_t *f = dset->oloc.file; /* The dataset's file pointer */
- H5O_layout_t *layout; /* The dataset's layout information */
- hbool_t must_init_space = FALSE; /* Flag to indicate that space should be initialized */
- hbool_t addr_set = FALSE; /* Flag to indicate that the dataset's storage address was set */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t * f = dset->oloc.file; /* The dataset's file pointer */
+ H5O_layout_t *layout; /* The dataset's layout information */
+ hbool_t must_init_space = FALSE; /* Flag to indicate that space should be initialized */
+ hbool_t addr_set = FALSE; /* Flag to indicate that the dataset's storage address was set */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1740,17 +1680,17 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
* We assume that external storage is already
* allocated by the caller, or at least will be before I/O is performed.
*/
- if(!(H5S_NULL == H5S_GET_EXTENT_TYPE(dset->shared->space) || dset->shared->dcpl_cache.efl.nused > 0)) {
+ if (!(H5S_NULL == H5S_GET_EXTENT_TYPE(dset->shared->space) || dset->shared->dcpl_cache.efl.nused > 0)) {
/* Get a pointer to the dataset's layout information */
layout = &(dset->shared->layout);
- switch(layout->type) {
+ switch (layout->type) {
case H5D_CONTIGUOUS:
- if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
+ if (!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Check if we have a zero-sized dataset */
- if(layout->storage.u.contig.size > 0) {
+ if (layout->storage.u.contig.size > 0) {
/* Reserve space in the file for the entire array */
- if(H5D__contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
+ if (H5D__contig_alloc(f, dxpl_id, &layout->storage.u.contig /*out*/) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
/* Indicate that we should initialize storage space */
@@ -1765,9 +1705,9 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
break;
case H5D_CHUNKED:
- if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
+ if (!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Create the root of the B-tree that describes chunked storage */
- if(H5D__chunk_create(dset /*in,out*/, dxpl_id) < 0)
+ if (H5D__chunk_create(dset /*in,out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
/* Indicate that we set the storage addr */
@@ -1778,33 +1718,36 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
} /* end if */
/* If space allocation is set to 'early' and we are extending
- * the dataset, indicate that space should be allocated, so the
+ * the dataset, indicate that space should be allocated, so the
* B-tree gets expanded. -QAK
*/
- if(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY
- && time_alloc == H5D_ALLOC_EXTEND)
- must_init_space = TRUE;
+ if (dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY &&
+ time_alloc == H5D_ALLOC_EXTEND)
+ must_init_space = TRUE;
break;
case H5D_COMPACT:
/* Check if space is already allocated */
- if(NULL == layout->storage.u.compact.buf) {
- /* Reserve space in layout header message for the entire array.
- * Starting from the 1.8.7 release, we allow dataspace to have
+ if (NULL == layout->storage.u.compact.buf) {
+ /* Reserve space in layout header message for the entire array.
+ * Starting from the 1.8.7 release, we allow dataspace to have
* zero dimension size. So the storage size can be zero.
* SLU 2011/4/4 */
- if(layout->storage.u.compact.size > 0) {
- if(NULL == (layout->storage.u.compact.buf = H5MM_malloc(layout->storage.u.compact.size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for compact dataset")
- if(!full_overwrite)
+ if (layout->storage.u.compact.size > 0) {
+ if (NULL ==
+ (layout->storage.u.compact.buf = H5MM_malloc(layout->storage.u.compact.size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate memory for compact dataset")
+ if (!full_overwrite)
HDmemset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
layout->storage.u.compact.dirty = TRUE;
/* Indicate that we should initialize storage space */
must_init_space = TRUE;
- } else {
+ }
+ else {
layout->storage.u.compact.dirty = FALSE;
- must_init_space = FALSE;
+ must_init_space = FALSE;
}
} /* end if */
break;
@@ -1815,12 +1758,12 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
HDassert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
/* Check if we need to initialize the space */
- if(must_init_space) {
- if(layout->type == H5D_CHUNKED) {
+ if (must_init_space) {
+ if (layout->type == H5D_CHUNKED) {
/* If we are doing incremental allocation and the B-tree got
* created during a H5Dwrite call, don't initialize the storage
* now, wait for the actual writes to each block and let the
@@ -1830,26 +1773,30 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
* fill values to the chunks they allocate space for. Yes,
* this is icky. -QAK
*/
- if(!(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR && time_alloc == H5D_ALLOC_WRITE))
- if(H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
+ if (!(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR &&
+ time_alloc == H5D_ALLOC_WRITE))
+ if (H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to initialize dataset with fill value")
} /* end if */
else {
- H5D_fill_value_t fill_status; /* The fill value status */
+ H5D_fill_value_t fill_status; /* The fill value status */
/* Check the dataset's fill-value status */
- if(H5P_is_fill_value_defined(&dset->shared->dcpl_cache.fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(&dset->shared->dcpl_cache.fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* If we are filling the dataset on allocation or "if set" and
* the fill value _is_ set, do that now */
- if(dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC ||
- (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
- if(H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
+ if (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC ||
+ (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET &&
+ fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
+ if (H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to initialize dataset with fill value")
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
/* If we set the address (and aren't in the middle of creating the
* dataset), mark the layout header message for later writing to
@@ -1858,9 +1805,9 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
/* (The layout message is already in the dataset's object header, this
* operation just sets the address and makes it constant)
*/
- if(time_alloc != H5D_ALLOC_CREATE && addr_set)
+ if (time_alloc != H5D_ALLOC_CREATE && addr_set)
/* Mark the layout as dirty, for later writing to the file */
- if(H5D__mark(dset, dxpl_id, H5D_MARK_LAYOUT) < 0)
+ if (H5D__mark(dset, dxpl_id, H5D_MARK_LAYOUT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
} /* end if */
@@ -1868,26 +1815,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__alloc_storage() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__init_storage
- *
- * Purpose: Initialize the data for a new dataset. If a selection is
- * defined for SPACE then initialize only that part of the
- * dataset.
- *
- * Return: Non-negative on success/Negative on failure
+ * Function: H5D__init_storage
*
- * Programmer: Robb Matzke
- * Monday, October 5, 1998
+ * Purpose: Initialize the data for a new dataset. If a selection is
+ * defined for SPACE then initialize only that part of the
+ * dataset.
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
- hid_t dxpl_id)
+H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[], hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1896,18 +1837,20 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
switch (dset->shared->layout.type) {
case H5D_COMPACT:
/* If we will be immediately overwriting the values, don't bother to clear them */
- if(!full_overwrite) {
+ if (!full_overwrite) {
/* Fill the compact dataset storage */
- if(H5D__compact_fill(dset, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize compact dataset storage")
+ if (H5D__compact_fill(dset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to initialize compact dataset storage")
} /* end if */
break;
case H5D_CONTIGUOUS:
/* Don't write default fill values to external files */
/* If we will be immediately overwriting the values, don't bother to clear them */
- if((dset->shared->dcpl_cache.efl.nused == 0 || dset->shared->dcpl_cache.fill.buf) && !full_overwrite)
- if(H5D__contig_fill(dset, dxpl_id) < 0)
+ if ((dset->shared->dcpl_cache.efl.nused == 0 || dset->shared->dcpl_cache.fill.buf) &&
+ !full_overwrite)
+ if (H5D__contig_fill(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset")
break;
@@ -1917,13 +1860,13 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
* for all chunks now and initialize each chunk with the fill value.
*/
{
- hsize_t zero_dim[H5O_LAYOUT_NDIMS] = {0};
+ hsize_t zero_dim[H5O_LAYOUT_NDIMS] = {0};
/* Use zeros for old dimensions if not specified */
- if(old_dim == NULL)
+ if (old_dim == NULL)
old_dim = zero_dim;
- if(H5D__chunk_allocate(dset, dxpl_id, full_overwrite, old_dim) < 0)
+ if (H5D__chunk_allocate(dset, dxpl_id, full_overwrite, old_dim) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset")
break;
} /* end block */
@@ -1934,39 +1877,35 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
HDassert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
-#endif /* NDEBUG */
+#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_storage() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__get_storage_size
- *
- * Purpose: Determines how much space has been reserved to store the raw
- * data of a dataset.
- *
- * Return: Non-negative on success, negative on failure
+ * Function: H5D__get_storage_size
*
- * Programmer: Robb Matzke
- * Wednesday, April 21, 1999
+ * Purpose: Determines how much space has been reserved to store the raw
+ * data of a dataset.
*
+ * Return: Non-negative on success, negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
- switch(dset->shared->layout.type) {
+ switch (dset->shared->layout.type) {
case H5D_CHUNKED:
- if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
- if(H5D__chunk_allocated(dset, dxpl_id, storage_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve chunked dataset allocated size")
+ if ((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
+ if (H5D__chunk_allocated(dset, dxpl_id, storage_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
+ "can't retrieve chunked dataset allocated size")
} /* end if */
else
*storage_size = 0;
@@ -1974,7 +1913,7 @@ H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size)
case H5D_CONTIGUOUS:
/* Datasets which are not allocated yet are using no space on disk */
- if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
+ if ((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
*storage_size = dset->shared->layout.storage.u.contig.size;
else
*storage_size = 0;
@@ -1994,40 +1933,38 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_storage_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__get_offset
+ * Function: H5D__get_offset
*
- * Purpose: Private function for H5D__get_offset. Returns the address
+ * Purpose: Private function for H5Dget_offset(). Returns the address
* of dataset in file.
*
- * Return: Success: the address of dataset
+ * Return: Success: The address of dataset
*
- * Failure: HADDR_UNDEF
- *
- * Programmer: Raymond Lu
- * November 6, 2002
+ * Failure: HADDR_UNDEF (but also a valid value)
*
*-------------------------------------------------------------------------
*/
haddr_t
H5D__get_offset(const H5D_t *dset)
{
- haddr_t ret_value = HADDR_UNDEF;
+ haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
HDassert(dset);
- switch(dset->shared->layout.type) {
+ switch (dset->shared->layout.type) {
case H5D_CHUNKED:
case H5D_COMPACT:
break;
case H5D_CONTIGUOUS:
/* If dataspace hasn't been allocated or dataset is stored in
- * an external file, the value will be HADDR_UNDEF. */
- if(dset->shared->dcpl_cache.efl.nused == 0 || H5F_addr_defined(dset->shared->layout.storage.u.contig.addr))
+ * an external file, the value will be HADDR_UNDEF.
+ */
+ if (dset->shared->dcpl_cache.efl.nused == 0 ||
+ H5F_addr_defined(dset->shared->layout.storage.u.contig.addr))
/* Return the absolute dataset offset from the beginning of file. */
ret_value = dset->shared->layout.storage.u.contig.addr + H5F_BASE_ADDR(dset->oloc.file);
break;
@@ -2036,36 +1973,31 @@ H5D__get_offset(const H5D_t *dset)
case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "unknown dataset layout type")
- } /*lint !e788 All appropriate cases are covered */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_offset() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_vlen_reclaim
+ * Function: H5D_vlen_reclaim
*
- * Purpose: Frees the buffers allocated for storing variable-length data
- * in memory. Only frees the VL data in the selection defined in the
- * dataspace. The dataset transfer property list is required to find the
- * correct allocation/free methods for the VL data in the buffer.
- *
- * Return: Non-negative on success, negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, November 22, 2005
+ * Purpose: Frees the buffers allocated for storing variable-length data
+ * in memory. Only frees the VL data in the selection defined in the
+ * dataspace. The dataset transfer property list is required to find the
+ * correct allocation/free methods for the VL data in the buffer.
*
+ * Return: Non-negative on success, negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, void *buf)
{
- H5T_t *type; /* Datatype */
- H5S_sel_iter_op_t dset_op; /* Operator for iteration */
- H5T_vlen_alloc_info_t _vl_alloc_info; /* VL allocation info buffer */
- H5T_vlen_alloc_info_t *vl_alloc_info = &_vl_alloc_info; /* VL allocation info */
- herr_t ret_value;
+ H5T_t * type; /* Datatype */
+ H5S_sel_iter_op_t dset_op; /* Operator for iteration */
+ H5T_vlen_alloc_info_t _vl_alloc_info; /* VL allocation info buffer */
+ H5T_vlen_alloc_info_t *vl_alloc_info = &_vl_alloc_info; /* VL allocation info */
+ herr_t ret_value;
FUNC_ENTER_NOAPI(FAIL)
@@ -2075,50 +2007,45 @@ H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, void *buf)
HDassert(H5P_isa_class(plist_id, H5P_DATASET_XFER));
HDassert(buf);
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
/* Get the allocation info */
- if(H5T_vlen_get_alloc_info(plist_id,&vl_alloc_info) < 0)
+ if (H5T_vlen_get_alloc_info(plist_id, &vl_alloc_info) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info")
/* Call H5S_select_iterate with args, etc. */
- dset_op.op_type = H5S_SEL_ITER_OP_APP;
- dset_op.u.app_op.op = H5T_vlen_reclaim;
+ dset_op.op_type = H5S_SEL_ITER_OP_APP;
+ dset_op.u.app_op.op = H5T_vlen_reclaim;
dset_op.u.app_op.type_id = type_id;
ret_value = H5S_select_iterate(buf, type, space, &dset_op, vl_alloc_info);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_vlen_reclaim() */
+} /* end H5D_vlen_reclaim() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__vlen_get_buf_size_alloc
- *
- * Purpose: This routine makes certain there is enough space in the temporary
- * buffer for the new data to read in. All the VL data read in is actually
- * placed in this buffer, overwriting the previous data. Needless to say,
- * this data is not actually usable.
- *
- * Return: Non-negative on success, negative on failure
+ * Function: H5D__vlen_get_buf_size_alloc
*
- * Programmer: Quincey Koziol
- * Tuesday, August 17, 1999
+ * Purpose: This routine makes certain there is enough space in the temporary
+ * buffer for the new data to read in. All the VL data read in is actually
+ * placed in this buffer, overwriting the previous data. Needless to say,
+ * this data is not actually usable.
*
+ * Return: Non-negative on success, negative on failure
*-------------------------------------------------------------------------
*/
void *
H5D__vlen_get_buf_size_alloc(size_t size, void *info)
{
H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)info;
- void *ret_value; /* Return value */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
/* Get a temporary pointer to space for the VL data */
- if((vlen_bufsize->vl_tbuf = H5FL_BLK_REALLOC(vlen_vl_buf, vlen_bufsize->vl_tbuf, size)) != NULL)
+ if ((vlen_bufsize->vl_tbuf = H5FL_BLK_REALLOC(vlen_vl_buf, vlen_bufsize->vl_tbuf, size)) != NULL)
vlen_bufsize->size += size;
/* Set return value */
@@ -2127,16 +2054,15 @@ H5D__vlen_get_buf_size_alloc(size_t size, void *info)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size_alloc() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__vlen_get_buf_size
+ * Function: H5D__vlen_get_buf_size
*
- * Purpose: This routine checks the number of bytes required to store a single
- * element from a dataset in memory, creating a selection with just the
- * single element selected to read in the element and using a custom memory
- * allocator for any VL data encountered.
- * The *size value is modified according to how many bytes are
- * required to store the element in memory.
+ * Purpose: This routine checks the number of bytes required to store a single
+ * element from a dataset in memory, creating a selection with just the
+ * single element selected to read in the element and using a custom memory
+ * allocator for any VL data encountered.
+ * The *size value is modified according to how many bytes are
+ * required to store the element in memory.
*
* Implementation: This routine actually performs the read with a custom
* memory manager which basically just counts the bytes requested and
@@ -2146,20 +2072,16 @@ H5D__vlen_get_buf_size_alloc(size_t size, void *info)
* Kinda kludgy, but easier than the other method of trying to figure out
* the sizes without actually reading the data in... - QAK
*
- * Return: Non-negative on success, negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, August 17, 1999
- *
+ * Return: Non-negative on success, negative on failure
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
herr_t
-H5D__vlen_get_buf_size(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t *point, void *op_data)
+H5D__vlen_get_buf_size(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim,
+ const hsize_t *point, void *op_data)
{
H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)op_data;
- H5T_t *dt; /* Datatype for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5T_t * dt; /* Datatype for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2167,43 +2089,40 @@ H5D__vlen_get_buf_size(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ATT
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check args */
- if(NULL == (dt = (H5T_t *)H5I_object(type_id)))
+ if (NULL == (dt = (H5T_t *)H5I_object(type_id)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a datatype")
/* Make certain there is enough fixed-length buffer available */
- if(NULL == (vlen_bufsize->fl_tbuf = H5FL_BLK_REALLOC(vlen_fl_buf, vlen_bufsize->fl_tbuf, H5T_get_size(dt))))
+ if (NULL ==
+ (vlen_bufsize->fl_tbuf = H5FL_BLK_REALLOC(vlen_fl_buf, vlen_bufsize->fl_tbuf, H5T_get_size(dt))))
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't resize tbuf")
/* Select point to read in */
- if(H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0)
+ if (H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't select point")
/* Read in the point (with the custom VL memory allocator) */
- if(H5D__read(vlen_bufsize->dset, type_id, vlen_bufsize->mspace, vlen_bufsize->fspace, vlen_bufsize->xfer_pid, vlen_bufsize->fl_tbuf) < 0)
+ if (H5D__read(vlen_bufsize->dset, type_id, vlen_bufsize->mspace, vlen_bufsize->fspace,
+ vlen_bufsize->xfer_pid, vlen_bufsize->fl_tbuf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read point")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__check_filters
- *
- * Purpose: Check if the filters have be initialized for the dataset
- *
- * Return: Non-negative on success/Negative on failure
+ * Function: H5D__check_filters
*
- * Programmer: Quincey Koziol
- * Thursday, October 11, 2007
+ * Purpose: Check if the filters have be initialized for the dataset
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5D__check_filters(H5D_t *dataset)
{
- H5O_fill_t *fill; /* Dataset's fill value */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_fill_t *fill; /* Dataset's fill value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2216,52 +2135,47 @@ H5D__check_filters(H5D_t *dataset)
* that requires writing on an extend.
*/
fill = &dataset->shared->dcpl_cache.fill;
- if(!dataset->shared->checked_filters) {
- H5D_fill_value_t fill_status; /* Whether the fill value is defined */
+ if (!dataset->shared->checked_filters) {
+ H5D_fill_value_t fill_status; /* Whether the fill value is defined */
/* Retrieve the "defined" status of the fill value */
- if(H5P_is_fill_value_defined(fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(fill, &fill_status) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Couldn't retrieve fill value from dataset.")
/* See if we can check the filter status */
- if(fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) {
- if(fill->fill_time == H5D_FILL_TIME_ALLOC ||
- (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
+ if (fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) {
+ if (fill->fill_time == H5D_FILL_TIME_ALLOC ||
+ (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
/* Filters must have encoding enabled. Ensure that all filters can be applied */
- if(H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0)
+ if (H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters")
dataset->shared->checked_filters = TRUE;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__check_filters() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__set_extent
- *
- * Purpose: Based on H5D_extend, allows change to a lower dimension,
- * calls H5S_set_extent and H5D__chunk_prune_by_extent instead
+ * Function: H5D__set_extent
*
- * Return: Non-negative on success, negative on failure
- *
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * April 9, 2002
+ * Purpose: Based on H5D_extend, allows change to a lower dimension,
+ * calls H5S_set_extent and H5D__chunk_prune_by_extent instead
*
+ * Return: Non-negative on success, negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
{
- H5S_t *space; /* Dataset's dataspace */
- int rank; /* Dataspace # of dimensions */
- hsize_t curr_dims[H5O_LAYOUT_NDIMS];/* Current dimension sizes */
- htri_t changed; /* Whether the dataspace changed size */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5S_t * space; /* Dataset's dataspace */
+ int rank; /* Dataspace # of dimensions */
+ hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
+ htri_t changed; /* Whether the dataspace changed size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2270,41 +2184,42 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
HDassert(size);
/* Check if we are allowed to modify this file */
- if(0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR))
+ if (0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
- /* Check if we are allowed to modify the space; only datasets with chunked and external storage are allowed to be modified */
- if(H5D_COMPACT == dset->shared->layout.type)
+ /* Check if we are allowed to modify the space; only datasets with chunked and external storage are
+ * allowed to be modified */
+ if (H5D_COMPACT == dset->shared->layout.type)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact storage")
- if(H5D_CONTIGUOUS == dset->shared->layout.type && 0 == dset->shared->dcpl_cache.efl.nused)
+ if (H5D_CONTIGUOUS == dset->shared->layout.type && 0 == dset->shared->dcpl_cache.efl.nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage")
/* Check if the filters in the DCPL will need to encode, and if so, can they? */
- if(H5D__check_filters(dset) < 0)
+ if (H5D__check_filters(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters")
/* Get the dataspace */
space = dset->shared->space;
/* Check if we are shrinking or expanding any of the dimensions */
- if((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0)
+ if ((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions")
/* Modify the size of the dataspace */
- if((changed = H5S_set_extent(space, size)) < 0)
+ if ((changed = H5S_set_extent(space, size)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
/* Don't bother updating things, unless they've changed */
- if(changed) {
- hbool_t shrink = FALSE; /* Flag to indicate a dimension has shrank */
- hbool_t expand = FALSE; /* Flag to indicate a dimension has grown */
- unsigned u; /* Local index variable */
+ if (changed) {
+ hbool_t shrink = FALSE; /* Flag to indicate a dimension has shrank */
+ hbool_t expand = FALSE; /* Flag to indicate a dimension has grown */
+ unsigned u; /* Local index variable */
/* Determine if we are shrinking and/or expanding any dimensions */
- for(u = 0; u < (unsigned)rank; u++) {
- if(size[u] < curr_dims[u])
+ for (u = 0; u < (unsigned)rank; u++) {
+ if (size[u] < curr_dims[u])
shrink = TRUE;
- if(size[u] > curr_dims[u])
+ if (size[u] > curr_dims[u])
expand = TRUE;
} /* end for */
@@ -2313,17 +2228,17 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
*-------------------------------------------------------------------------
*/
/* Update the index values for the cached chunks for this dataset */
- if(H5D_CHUNKED == dset->shared->layout.type) {
- /* Update the cached chunk info */
- if(H5D__chunk_set_info(dset) < 0)
+ if (H5D_CHUNKED == dset->shared->layout.type) {
+ /* Set the cached chunk info */
+ if (H5D__chunk_set_info(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks")
- if(H5D__chunk_update_cache(dset, dxpl_id) < 0)
+ if (H5D__chunk_update_cache(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices")
} /* end if */
/* Allocate space for the new parts of the dataset, if appropriate */
- if(expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY)
- if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
+ if (expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY)
+ if (H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage")
/*-------------------------------------------------------------------------
@@ -2332,14 +2247,16 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
* and if the chunks are written
*-------------------------------------------------------------------------
*/
- if(shrink && H5D_CHUNKED == dset->shared->layout.type &&
- (*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
+ if (shrink && H5D_CHUNKED == dset->shared->layout.type &&
+ ((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage) ||
+ (dset->shared->layout.ops->is_data_cached &&
+ (*dset->shared->layout.ops->is_data_cached)(dset->shared))))
/* Remove excess chunks */
- if(H5D__chunk_prune_by_extent(dset, dxpl_id, curr_dims) < 0)
+ if (H5D__chunk_prune_by_extent(dset, dxpl_id, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks")
/* Mark the dataspace as dirty, for later writing to the file */
- if(H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
+ if (H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
} /* end if */
@@ -2347,24 +2264,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__set_extent() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__flush_sieve_buf
- *
- * Purpose: Flush any dataset sieve buffer info cached in memory
+ * Function: H5D__flush_sieve_buf
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * July 27, 2009
+ * Purpose: Flush any dataset sieve buffer info cached in memory
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2372,12 +2284,14 @@ H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
HDassert(dataset);
/* Flush the raw data buffer, if we have a dirty one */
- if(dataset->shared->cache.contig.sieve_buf && dataset->shared->cache.contig.sieve_dirty) {
- HDassert(dataset->shared->layout.type != H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
+ if (dataset->shared->cache.contig.sieve_buf && dataset->shared->cache.contig.sieve_dirty) {
+ HDassert(dataset->shared->layout.type !=
+ H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
/* Write dirty data sieve buffer to file */
- if(H5F_block_write(dataset->oloc.file, H5FD_MEM_DRAW, dataset->shared->cache.contig.sieve_loc,
- dataset->shared->cache.contig.sieve_size, dxpl_id, dataset->shared->cache.contig.sieve_buf) < 0)
+ if (H5F_block_write(dataset->oloc.file, H5FD_MEM_DRAW, dataset->shared->cache.contig.sieve_loc,
+ dataset->shared->cache.contig.sieve_size, dxpl_id,
+ dataset->shared->cache.contig.sieve_buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
/* Reset sieve buffer dirty flag */
@@ -2388,25 +2302,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush_sieve_buf() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__flush_real
- *
- * Purpose: Flush any dataset information cached in memory
+ * Function: H5D__flush_real
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * December 6, 2007
+ * Purpose: Flush any dataset information cached in memory
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to dataset's object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Pointer to dataset's object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2414,16 +2323,16 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
HDassert(dataset);
/* Check for metadata changes that will require updating the object's modification time */
- if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
- unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
+ if (dataset->shared->layout_dirty || dataset->shared->space_dirty) {
+ unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
/* Pin the object header */
- if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ if (NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
/* Update the layout on disk, if it's been changed */
- if(dataset->shared->layout_dirty) {
- if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ if (dataset->shared->layout_dirty) {
+ if (H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
dataset->shared->layout_dirty = FALSE;
@@ -2432,8 +2341,8 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
} /* end if */
/* Update the dataspace on disk, if it's been changed */
- if(dataset->shared->space_dirty) {
- if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
+ if (dataset->shared->space_dirty) {
+ if (H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
dataset->shared->space_dirty = FALSE;
@@ -2446,27 +2355,25 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
} /* end if */
/* Flush cached raw data for each kind of dataset layout */
- if(dataset->shared->layout.ops->flush &&
- (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
+ if (dataset->shared->layout.ops->flush && (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
done:
/* Release pointer to object header */
- if(oh != NULL)
- if(H5O_unpin(oh) < 0)
+ if (oh != NULL)
+ if (H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush_real() */
-
/*-------------------------------------------------------------------------
* Function: H5D__mark
*
* Purpose: Mark some aspect of a dataset as dirty
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* July 4, 2008
@@ -2476,7 +2383,7 @@ done:
herr_t
H5D__mark(const H5D_t *dataset, hid_t H5_ATTR_UNUSED dxpl_id, unsigned flags)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -2485,34 +2392,29 @@ H5D__mark(const H5D_t *dataset, hid_t H5_ATTR_UNUSED dxpl_id, unsigned flags)
HDassert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
/* Mark aspects of the dataset as dirty */
- if(flags & H5D_MARK_SPACE)
+ if (flags & H5D_MARK_SPACE)
dataset->shared->space_dirty = TRUE;
- if(flags & H5D_MARK_LAYOUT)
+ if (flags & H5D_MARK_LAYOUT)
dataset->shared->layout_dirty = TRUE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mark() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__flush_cb
- *
- * Purpose: Flush any dataset information cached in memory
+ * Function: H5D__flush_cb
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 8, 2007
+ * Purpose: Flush any dataset information cached in memory
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
static int
H5D__flush_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata)
{
- H5D_t *dataset = (H5D_t *)_dataset; /* Dataset pointer */
- H5D_flush_ud_t *udata = (H5D_flush_ud_t *)_udata; /* User data for callback */
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5D_t * dataset = (H5D_t *)_dataset; /* Dataset pointer */
+ H5D_flush_ud_t *udata = (H5D_flush_ud_t *)_udata; /* User data for callback */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -2520,9 +2422,9 @@ H5D__flush_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata)
HDassert(dataset);
/* Check for dataset in same file */
- if(udata->f == dataset->oloc.file) {
+ if (udata->f == dataset->oloc.file) {
/* Flush the dataset's information */
- if(H5D__flush_real(dataset, udata->dxpl_id) < 0)
+ if (H5D__flush_real(dataset, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to flush cached dataset info")
} /* end if */
@@ -2530,25 +2432,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_flush
- *
- * Purpose: Flush any dataset information cached in memory
- *
- * Return: Success: Non-negative
- * Failure: Negative
+ * Function: H5D_flush
*
- * Programmer: Ray Lu
- * August 14, 2002
+ * Purpose: Flush any dataset information cached in memory
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5D_flush(const H5F_t *f, hid_t dxpl_id)
{
H5D_flush_ud_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2556,278 +2453,283 @@ H5D_flush(const H5F_t *f, hid_t dxpl_id)
HDassert(f);
/* Set user data for callback */
- udata.f = f;
+ udata.f = f;
udata.dxpl_id = dxpl_id;
/* Iterate over all the open datasets */
- if(H5I_iterate(H5I_DATASET, H5D__flush_cb, &udata, FALSE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5D__flush_cb, &udata, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to flush cached dataset info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_flush() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_get_create_plist
+ * Function: H5D_get_create_plist
*
- * Purpose: Private function for H5Dget_create_plist
- *
- * Return: Success: ID for a copy of the dataset creation
- * property list. The template should be
- * released by calling H5P_close().
- *
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Tuesday, February 3, 1998
+ * Purpose: Private function for H5Dget_create_plist
*
+ * Return: Success: ID for a copy of the dataset creation
+ * property list. The template should be
+ * released by calling H5P_close().
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
hid_t
H5D_get_create_plist(H5D_t *dset)
{
- H5P_genplist_t *dcpl_plist; /* Dataset's DCPL */
- H5P_genplist_t *new_plist; /* Copy of dataset's DCPL */
- H5O_fill_t copied_fill; /* Fill value to tweak */
- hid_t new_dcpl_id = FAIL;
- hid_t ret_value; /* Return value */
+ H5P_genplist_t *dcpl_plist; /* Dataset's DCPL */
+ H5P_genplist_t *new_plist; /* Copy of dataset's DCPL */
+ H5O_fill_t copied_fill; /* Fill value to tweak */
+ hid_t new_dcpl_id = FAIL;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- if(NULL == (dcpl_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
+ if (NULL == (dcpl_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Copy the creation property list */
- if((new_dcpl_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0)
+ if ((new_dcpl_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id)))
+ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
- if(H5O_get_create_plist(&dset->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
+ if (H5O_get_create_plist(&dset->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object creation info")
/* Get the fill value property */
- if(H5P_get(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0)
+ if (H5P_get(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value")
/* Check if there is a fill value, but no type yet */
- if(copied_fill.buf != NULL && copied_fill.type == NULL) {
- H5T_path_t *tpath; /* Conversion information*/
+ if (copied_fill.buf != NULL && copied_fill.type == NULL) {
+ H5T_path_t *tpath; /* Conversion information*/
/* Copy the dataset type into the fill value message */
- if(NULL == (copied_fill.type = H5T_copy(dset->shared->type, H5T_COPY_TRANSIENT)))
+ if (NULL == (copied_fill.type = H5T_copy(dset->shared->type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy dataset datatype for fill value")
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(dset->shared->type, copied_fill.type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types")
+ if (NULL == (tpath = H5T_path_find(dset->shared->type, copied_fill.type, NULL, NULL, H5AC_ind_dxpl_id,
+ FALSE)))
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL,
+ "unable to convert between src and dest data types")
/* Convert disk form of fill value into memory form */
- if(!H5T_path_noop(tpath)) {
- hid_t dst_id, src_id; /* Source & destination datatypes for type conversion */
- uint8_t *bkg_buf = NULL; /* Background conversion buffer */
- size_t bkg_size; /* Size of background buffer */
+ if (!H5T_path_noop(tpath)) {
+ hid_t dst_id, src_id; /* Source & destination datatypes for type conversion */
+ uint8_t *bkg_buf = NULL; /* Background conversion buffer */
+ size_t bkg_size; /* Size of background buffer */
/* Wrap copies of types to convert */
dst_id = H5I_register(H5I_DATATYPE, H5T_copy(copied_fill.type, H5T_COPY_TRANSIENT), FALSE);
- if(dst_id < 0)
+ if (dst_id < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy/register datatype")
src_id = H5I_register(H5I_DATATYPE, H5T_copy(dset->shared->type, H5T_COPY_ALL), FALSE);
- if(src_id < 0) {
+ if (src_id < 0) {
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy/register datatype")
} /* end if */
/* Allocate a background buffer */
bkg_size = MAX(H5T_GET_SIZE(copied_fill.type), H5T_GET_SIZE(dset->shared->type));
- if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) {
+ if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end if */
/* Convert fill value */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
+ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, bkg_buf,
+ H5AC_ind_dxpl_id) < 0) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
} /* end if */
/* Release local resources */
- if(H5I_dec_ref(src_id) < 0)
+ if (H5I_dec_ref(src_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(H5I_dec_ref(dst_id) < 0)
+ if (H5I_dec_ref(dst_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object")
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
} /* end if */
- } /* end if */
+ } /* end if */
/* Set back the fill value property to property list */
- if(H5P_set(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0)
+ if (H5P_set(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property list fill value")
/* Set the return value */
ret_value = new_dcpl_id;
done:
- if(ret_value < 0)
- if(new_dcpl_id > 0)
- if(H5I_dec_app_ref(new_dcpl_id) < 0)
+ if (ret_value < 0)
+ if (new_dcpl_id > 0)
+ if (H5I_dec_app_ref(new_dcpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_create_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_get_access_plist
- *
- * Purpose: Returns a copy of the dataset access property list.
+ * Function: H5D_get_access_plist
*
- * Return: Success: ID for a copy of the dataset access
- * property list.
- *
- * Failure: FAIL
- *
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Purpose: Returns a copy of the dataset access property list.
*
+ * Return: Success: ID for a copy of the dataset access
+ * property list.
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
hid_t
H5D_get_access_plist(H5D_t *dset)
{
- H5P_genplist_t *old_plist; /* Default DAPL */
- H5P_genplist_t *new_plist; /* New DAPL */
- hid_t new_dapl_id = FAIL;
- hid_t ret_value = FAIL;
+ H5P_genplist_t *old_plist; /* Stored DAPL from dset */
+ H5P_genplist_t *new_plist; /* New DAPL */
+ H5P_genplist_t *def_fapl; /* Default FAPL */
+ H5D_rdcc_t def_chunk_info; /* Default chunk cache property */
+ hid_t new_dapl_id = FAIL;
+ hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
- /* Make a copy of the default dataset access property list */
- if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_ID_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ /* Make a copy of the dataset's dataset access property list */
+ if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(dset->shared->dapl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list")
if ((new_dapl_id = H5P_copy_plist(old_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy dataset access property list")
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- /* If the dataset is chunked then copy the rdcc parameters */
+ /* If the dataset is chunked then copy the rdcc parameters. Otherwise, use
+ * the default values. */
if (dset->shared->layout.type == H5D_CHUNKED) {
if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(dset->shared->cache.chunk.nslots)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots")
- if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(dset->shared->cache.chunk.nbytes_max)) < 0)
+ if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(dset->shared->cache.chunk.nbytes_max)) <
+ 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size")
if (H5P_set(new_plist, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &(dset->shared->cache.chunk.w0)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks")
- } /* end if */
+ }
+ else {
+ /* Get the default FAPL */
+ if (NULL == (def_fapl = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
+ HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a property list")
+
+ /* Set the data cache number of slots to the value of the default FAPL */
+ if (H5P_get(def_fapl, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &def_chunk_info.nslots) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data number of slots");
+ if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &def_chunk_info.nslots) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache number of slots")
+
+ /* Set the data cache byte size to the value of the default FAPL */
+ if (H5P_get(def_fapl, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &def_chunk_info.nbytes_max) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data cache byte size");
+ if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &def_chunk_info.nbytes_max) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache byte size")
+
+ /* Set the preempt read chunks property to the value of the default FAPL */
+ if (H5P_get(def_fapl, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &def_chunk_info.w0) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get preempt read chunks");
+ if (H5P_set(new_plist, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &def_chunk_info.w0) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set preempt read chunks")
+ } /* end if-else */
/* Set the return value */
ret_value = new_dapl_id;
done:
- if(ret_value < 0) {
- if(new_dapl_id > 0)
- if(H5I_dec_app_ref(new_dapl_id) < 0)
+ if (ret_value < 0)
+ if (new_dapl_id > 0)
+ if (H5I_dec_app_ref(new_dapl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't free")
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_access_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_get_space
- *
- * Purpose: Returns and ID for the dataspace of the dataset.
- *
- * Return: Success: ID for dataspace
+ * Function: H5D_get_space
*
- * Failure: FAIL
- *
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Purpose: Returns and ID for the dataspace of the dataset.
*
+ * Return: Success: ID for dataspace
+ * Failure: FAIL
*-------------------------------------------------------------------------
*/
hid_t
H5D_get_space(H5D_t *dset)
{
- H5S_t *space = NULL;
- hid_t ret_value = FAIL;
+ H5S_t *space = NULL;
+ hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_NOAPI_NOINIT
- /* Read the data space message and return a data space object */
- if(NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get data space")
+ /* Read the dataspace message and return a dataspace object */
+ if (NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace")
/* Create an atom */
- if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace")
done:
- if(ret_value < 0)
- if(space != NULL)
- if(H5S_close(space) < 0)
+ if (ret_value < 0)
+ if (space != NULL)
+ if (H5S_close(space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_space() */
-
/*-------------------------------------------------------------------------
- * Function: H5D_get_type
- *
- * Purpose: Returns and ID for the datatype of the dataset.
+ * Function: H5D_get_type
*
- * Return: Success: ID for datatype
+ * Purpose: Returns and ID for the datatype of the dataset.
*
- * Failure: FAIL
- *
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Return: Success: ID for datatype
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
hid_t
H5D_get_type(H5D_t *dset)
{
- H5T_t *dt = NULL;
- hid_t ret_value = FAIL;
+ H5T_t *dt = NULL;
+ hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
/* Patch the datatype's "top level" file pointer */
- if(H5T_patch_file(dset->shared->type, dset->oloc.file) < 0)
+ if (H5T_patch_file(dset->shared->type, dset->oloc.file) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer")
/* Copy the dataset's datatype */
- if(NULL == (dt = H5T_copy(dset->shared->type, H5T_COPY_REOPEN)))
+ if (NULL == (dt = H5T_copy(dset->shared->type, H5T_COPY_REOPEN)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype")
/* Mark any datatypes as being in memory now */
- if(H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0)
+ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
/* Lock copied type */
- if(H5T_lock(dt, FALSE) < 0)
+ if (H5T_lock(dt, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to lock transient datatype")
- if((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
done:
- if(ret_value < 0) {
- if(dt && H5T_close(dt) < 0)
+ if (ret_value < 0)
+ if (dt && H5T_close(dt) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype")
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_type() */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index cb72437..e0b7efb 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,72 +15,65 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /* suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Sprivate.h" /* Dataspace */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Sprivate.h" /* Dataspace */
+#include "H5Tprivate.h" /* Datatype */
#ifdef H5_HAVE_PARALLEL
/* Remove this if H5R_DATASET_REGION is no longer used in this file */
#include "H5Rpublic.h"
#endif /*H5_HAVE_PARALLEL*/
-
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
/* Internal I/O routines */
-static herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id,
- const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist,
- const void *buf);
-static herr_t H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id,
- const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id, const void *buf);
+static herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
+ hid_t dset_xfer_plist, const void *buf);
+static herr_t H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, const H5S_t *mem_space,
+ const H5S_t *file_space, hid_t dxpl_id, const void *buf);
/* Setup/teardown routines */
static herr_t H5D__ioinfo_init(H5D_t *dset,
#ifndef H5_HAVE_PARALLEL
-const
+ const
#endif /* H5_HAVE_PARALLEL */
- H5D_dxpl_cache_t *dxpl_cache,
- hid_t dxpl_id, const H5D_type_info_t *type_info, H5D_storage_t *store,
- H5D_io_info_t *io_info);
-static herr_t H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
- hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
- H5D_type_info_t *type_info);
+ H5D_dxpl_cache_t *dxpl_cache,
+ hid_t dxpl_id, const H5D_type_info_t *type_info, H5D_storage_t *store,
+ H5D_io_info_t *io_info);
+static herr_t H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
+ hid_t mem_type_id, hbool_t do_write, H5D_type_info_t *type_info);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
- hid_t dxpl_id, const H5S_t *file_space, const H5S_t *mem_space,
- const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
+static herr_t H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
+ const H5S_t *file_space, const H5S_t *mem_space,
+ const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
static herr_t H5D__ioinfo_term(H5D_io_info_t *io_info);
#endif /* H5_HAVE_PARALLEL */
static herr_t H5D__typeinfo_term(const H5D_type_info_t *type_info);
-
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -88,120 +81,116 @@ static herr_t H5D__typeinfo_term(const H5D_type_info_t *type_info);
/* Declare a free list to manage blocks of type conversion data */
H5FL_BLK_DEFINE(type_conv);
-
-
/*-------------------------------------------------------------------------
- * Function: H5Dread
+ * Function: H5Dread
*
- * Purpose: Reads (part of) a DSET from the file into application
- * memory BUF. The part of the dataset to read is defined with
- * MEM_SPACE_ID and FILE_SPACE_ID. The data points are
- * converted from their file type to the MEM_TYPE_ID specified.
- * Additional miscellaneous data transfer properties can be
- * passed to this function with the PLIST_ID argument.
+ * Purpose: Reads (part of) a DSET from the file into application
+ * memory BUF. The part of the dataset to read is defined with
+ * MEM_SPACE_ID and FILE_SPACE_ID. The data points are
+ * converted from their file type to the MEM_TYPE_ID specified.
+ * Additional miscellaneous data transfer properties can be
+ * passed to this function with the PLIST_ID argument.
*
- * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
- * that the entire file data space is to be referenced.
+ * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
+ * that the entire file dataspace is to be referenced.
*
- * The MEM_SPACE_ID can be the constant H5S_ALL in which case
- * the memory data space is the same as the file data space
- * defined when the dataset was created.
+ * The MEM_SPACE_ID can be the constant H5S_ALL in which case
+ * the memory dataspace is the same as the file dataspace
+ * defined when the dataset was created.
*
- * The number of elements in the memory data space must match
- * the number of elements in the file data space.
+ * The number of elements in the memory dataspace must match
+ * the number of elements in the file dataspace.
*
- * The PLIST_ID can be the constant H5P_DEFAULT in which
- * case the default data transfer properties are used.
+ * The PLIST_ID can be the constant H5P_DEFAULT in which
+ * case the default data transfer properties are used.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
- hid_t file_space_id, hid_t plist_id, void *buf/*out*/)
+H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id,
+ void *buf /*out*/)
{
- H5D_t *dset = NULL;
- H5P_genplist_t *plist; /* Property list pointer */
- const H5S_t *mem_space = NULL;
- const H5S_t *file_space = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
- hsize_t *direct_offset = NULL;
- hbool_t direct_read = FALSE;
+ H5D_t * dset = NULL;
+ H5P_genplist_t *plist; /* Property list pointer */
+ const H5S_t * mem_space = NULL;
+ const H5S_t * file_space = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t * direct_offset = NULL;
+ hbool_t direct_read = FALSE;
uint32_t direct_filters = 0;
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id,
- plist_id, buf);
+ H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id, plist_id, buf);
/* check arguments */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(NULL == dset->oloc.file)
+ if (NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(mem_space_id < 0 || file_space_id < 0)
+ if (mem_space_id < 0 || file_space_id < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
- if(H5S_ALL != mem_space_id) {
- if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
+ if (H5S_ALL != mem_space_id) {
+ if (NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
- if(H5S_SELECT_VALID(mem_space) != TRUE)
+ if (H5S_SELECT_VALID(mem_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
} /* end if */
- if(H5S_ALL != file_space_id) {
- if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
+ if (H5S_ALL != file_space_id) {
+ if (NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
- if(H5S_SELECT_VALID(file_space) != TRUE)
+ if (H5S_SELECT_VALID(file_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
} /* end if */
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == plist_id)
- plist_id= H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
+ plist_id = H5P_DATASET_XFER_DEFAULT;
+ else if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
/* Get the dataset transfer property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Retrieve the 'direct read' flag */
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &direct_read) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &direct_read) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting flag for direct chunk read")
- if(direct_read) {
+ if (direct_read) {
unsigned u;
int ndims = 0;
hsize_t dims[H5O_LAYOUT_NDIMS];
hsize_t internal_offset[H5O_LAYOUT_NDIMS];
- if(H5D_CHUNKED != dset->shared->layout.type)
+ if (H5D_CHUNKED != dset->shared->layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
/* Get the direct chunk offset property */
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &direct_offset) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &direct_offset) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting direct offset from xfer properties")
/* The library's chunking code requires the offset terminates with a zero. So transfer the
* offset array to an internal offset array */
- if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dims, NULL)) < 0)
+ if ((ndims = H5S_get_simple_extent_dims(dset->shared->space, dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve dataspace extent dims")
- for(u = 0; u < ndims; u++) {
+ for (u = 0; u < ndims; u++) {
/* Make sure the offset doesn't exceed the dataset's dimensions */
- if(direct_offset[u] > dims[u])
+ if (direct_offset[u] > dims[u])
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset")
/* Make sure the offset fall right on a chunk's boundary */
- if(direct_offset[u] % dset->shared->layout.u.chunk.dim[u])
+ if (direct_offset[u] % dset->shared->layout.u.chunk.dim[u])
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary")
internal_offset[u] = direct_offset[u];
@@ -211,180 +200,175 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
internal_offset[ndims] = 0;
/* Read the raw chunk */
- if(H5D__chunk_direct_read(dset, plist_id, internal_offset, &direct_filters, buf) < 0)
+ if (H5D__chunk_direct_read(dset, plist_id, internal_offset, &direct_filters, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read chunk directly")
/* Set the chunk filter mask property */
- if(H5P_set(plist, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, &direct_filters) < 0)
+ if (H5P_set(plist, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, &direct_filters) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error setting filter mask xfer property")
}
else {
- /* read raw data */
- if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
+ /* read raw data */
+ if (H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf /*out*/) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
}
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dread() */
-
/*-------------------------------------------------------------------------
- * Function: H5Dwrite
+ * Function: H5Dwrite
*
- * Purpose: Writes (part of) a DSET from application memory BUF to the
- * file. The part of the dataset to write is defined with the
- * MEM_SPACE_ID and FILE_SPACE_ID arguments. The data points
- * are converted from their current type (MEM_TYPE_ID) to their
- * file datatype. Additional miscellaneous data transfer
- * properties can be passed to this function with the
- * PLIST_ID argument.
+ * Purpose: Writes (part of) a DSET from application memory BUF to the
+ * file. The part of the dataset to write is defined with the
+ * MEM_SPACE_ID and FILE_SPACE_ID arguments. The data points
+ * are converted from their current type (MEM_TYPE_ID) to their
+ * file datatype. Additional miscellaneous data transfer
+ * properties can be passed to this function with the
+ * PLIST_ID argument.
*
- * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
- * that the entire file data space is to be referenced.
+ * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
+ * that the entire file dataspace is to be referenced.
*
- * The MEM_SPACE_ID can be the constant H5S_ALL in which case
- * the memory data space is the same as the file data space
- * defined when the dataset was created.
+ * The MEM_SPACE_ID can be the constant H5S_ALL in which case
+ * the memory dataspace is the same as the file dataspace
+ * defined when the dataset was created.
*
- * The number of elements in the memory data space must match
- * the number of elements in the file data space.
+ * The number of elements in the memory dataspace must match
+ * the number of elements in the file dataspace.
*
- * The PLIST_ID can be the constant H5P_DEFAULT in which
- * case the default data transfer properties are used.
+ * The PLIST_ID can be the constant H5P_DEFAULT in which
+ * case the default data transfer properties are used.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
- hid_t file_space_id, hid_t dxpl_id, const void *buf)
+H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id,
+ const void *buf)
{
- H5D_t *dset = NULL;
- H5P_genplist_t *plist; /* Property list pointer */
- const H5S_t *mem_space = NULL;
- const H5S_t *file_space = NULL;
- hbool_t direct_write = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t * dset = NULL;
+ H5P_genplist_t *plist; /* Property list pointer */
+ const H5S_t * mem_space = NULL;
+ const H5S_t * file_space = NULL;
+ hbool_t direct_write = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id,
- dxpl_id, buf);
+ H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf);
- /* check arguments */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ /* Get dataset pointer and ensure it's associated with a file */
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(NULL == dset->oloc.file)
+ if (NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Get the default dataset transfer property list if the user didn't provide one */
- if(H5P_DEFAULT == dxpl_id)
- dxpl_id= H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
+ if (H5P_DEFAULT == dxpl_id)
+ dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
/* Get the dataset transfer property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Retrieve the 'direct write' flag */
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &direct_write) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &direct_write) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting flag for direct chunk write")
/* Check dataspace selections if this is not a direct write */
- if(!direct_write) {
- if(mem_space_id < 0 || file_space_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ if (!direct_write) {
+ if (mem_space_id < 0 || file_space_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
- if(H5S_ALL != mem_space_id) {
- if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
+ if (H5S_ALL != mem_space_id) {
+ if (NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Check for valid selection */
- if(H5S_SELECT_VALID(mem_space) != TRUE)
+ if (H5S_SELECT_VALID(mem_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "memory selection+offset not within extent")
} /* end if */
- if(H5S_ALL != file_space_id) {
- if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
+ if (H5S_ALL != file_space_id) {
+ if (NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Check for valid selection */
- if(H5S_SELECT_VALID(file_space) != TRUE)
+ if (H5S_SELECT_VALID(file_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "file selection+offset not within extent")
} /* end if */
}
- if(H5D__pre_write(dset, direct_write, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
+ if (H5D__pre_write(dset, direct_write, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dwrite() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__pre_write
+ * Function: H5D__pre_write
*
- * Purpose: Preparation for writing data.
+ * Purpose: Preparation for writing data.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * 2 November 2012
+ * Programmer: Raymond Lu
+ * 2 November 2012
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id,
- const H5S_t *mem_space, const H5S_t *file_space,
- hid_t dxpl_id, const void *buf)
+H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, const H5S_t *mem_space,
+ const H5S_t *file_space, hid_t dxpl_id, const void *buf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Direct chunk write */
- if(direct_write) {
- H5P_genplist_t *plist; /* Property list pointer */
- uint32_t direct_filters;
- hsize_t *direct_offset;
- uint32_t direct_datasize;
- int ndims = 0;
- hsize_t dims[H5O_LAYOUT_NDIMS];
- hsize_t internal_offset[H5O_LAYOUT_NDIMS];
- unsigned u;
+ if (direct_write) {
+ H5P_genplist_t *plist; /* Property list pointer */
+ uint32_t direct_filters;
+ hsize_t * direct_offset;
+ uint32_t direct_datasize;
+ int ndims = 0;
+ hsize_t dims[H5O_LAYOUT_NDIMS];
+ hsize_t internal_offset[H5O_LAYOUT_NDIMS];
+ unsigned u;
/* Get the dataset transfer property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
- if(H5D_CHUNKED != dset->shared->layout.type)
+ if (H5D_CHUNKED != dset->shared->layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
/* Retrieve parameters for direct chunk write */
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &direct_filters) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &direct_filters) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting filter info for direct chunk write")
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &direct_offset) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &direct_offset) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting offset info for direct chunk write")
- if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &direct_datasize) < 0)
+ if (H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &direct_datasize) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data size for direct chunk write")
/* The library's chunking code requires the offset terminates with a zero. So transfer the
* offset array to an internal offset array */
- if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dims, NULL)) < 0)
+ if ((ndims = H5S_get_simple_extent_dims(dset->shared->space, dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve dataspace extent dims")
- for(u = 0; u < ndims; u++) {
+ for (u = 0; u < ndims; u++) {
/* Make sure the offset doesn't exceed the dataset's dimensions */
- if(direct_offset[u] > dims[u])
+ if (direct_offset[u] > dims[u])
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset")
/* Make sure the offset fall right on a chunk's boundary */
- if(direct_offset[u] % dset->shared->layout.u.chunk.dim[u])
+ if (direct_offset[u] % dset->shared->layout.u.chunk.dim[u])
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary")
internal_offset[u] = direct_offset[u];
@@ -394,12 +378,12 @@ H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id,
internal_offset[ndims] = 0;
/* write raw data */
- if(H5D__chunk_direct_write(dset, dxpl_id, direct_filters, internal_offset, direct_datasize, buf) < 0)
+ if (H5D__chunk_direct_write(dset, dxpl_id, direct_filters, internal_offset, direct_datasize, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write chunk directly")
- } /* end if */
- else { /* Normal write */
+ } /* end if */
+ else { /* Normal write */
/* write raw data */
- if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
+ if (H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
} /* end else */
@@ -407,106 +391,105 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__pre_write() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__read
+ * Function: H5D__read
*
- * Purpose: Reads (part of) a DATASET into application memory BUF. See
- * H5Dread() for complete details.
+ * Purpose: Reads (part of) a DATASET into application memory BUF. See
+ * H5Dread() for complete details.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
- const H5S_t *file_space, hid_t dxpl_id, void *buf/*out*/)
+H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id,
+ void *buf /*out*/)
{
- H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
- H5D_io_info_t io_info; /* Dataset I/O info */
- H5D_type_info_t type_info; /* Datatype info for operation */
- hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
- H5S_t * projected_mem_space = NULL; /* If not NULL, ptr to dataspace containing a */
- /* projection of the supplied mem_space to a new */
- /* data space with rank equal to that of */
- /* file_space. */
- /* */
- /* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
- /* comparing the mem_space and the data_space, */
- /* and the mem_space have different rank. */
- /* */
- /* Note that if this variable is used, the */
- /* projected mem space must be discarded at the */
- /* end of the function to avoid a memory leak. */
- H5D_storage_t store; /*union of EFL and chunk pointer in file space */
- hssize_t snelmts; /*total number of elmts (signed) */
- hsize_t nelmts; /*total number of elmts */
+ H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
+ H5D_io_info_t io_info; /* Dataset I/O info */
+ H5D_type_info_t type_info; /* Datatype info for operation */
+ hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
+ H5S_t * projected_mem_space = NULL; /* If not NULL, ptr to dataspace containing a */
+ /* projection of the supplied mem_space to a new */
+ /* data space with rank equal to that of */
+ /* file_space. */
+ /* */
+ /* This field is only used if */
+ /* H5S_select_shape_same() returns TRUE when */
+ /* comparing the mem_space and the data_space, */
+ /* and the mem_space have different rank. */
+ /* */
+ /* Note that if this variable is used, the */
+ /* projected mem space must be discarded at the */
+ /* end of the function to avoid a memory leak. */
+ H5D_storage_t store; /*union of EFL and chunk pointer in file space */
+ hssize_t snelmts; /*total number of elmts (signed) */
+ hsize_t nelmts; /*total number of elmts */
#ifdef H5_HAVE_PARALLEL
- hbool_t io_info_init = FALSE; /* Whether the I/O info has been initialized */
-#endif /*H5_HAVE_PARALLEL*/
- hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- char fake_char; /* Temporary variable for NULL buffer pointers */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t io_info_init = FALSE; /* Whether the I/O info has been initialized */
+#endif /*H5_HAVE_PARALLEL*/
+ hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ char fake_char; /* Temporary variable for NULL buffer pointers */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* check args */
HDassert(dataset && dataset->oloc.file);
- if(!file_space)
+ if (!file_space)
file_space = dataset->shared->space;
- if(!mem_space)
+ if (!mem_space)
mem_space = file_space;
- if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dst dataspace has invalid selection")
+ if ((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dst dataspace has invalid selection")
H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t);
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Patch the top level file pointer for dt->shared->u.vlen.f if needed */
H5T_patch_vlen_file(dataset->shared->type, dataset->oloc.file);
/* Set up datatype info for operation */
- if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
+ if (H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
type_info_init = TRUE;
#ifdef H5_HAVE_PARALLEL
/* Collective access is not permissible without a MPI based VFD */
- if(dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE &&
- !(H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI)))
+ if (dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE &&
+ !(H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based drivers only")
#endif /*H5_HAVE_PARALLEL*/
/* Make certain that the number of elements in each selection is the same */
- if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
+ if (nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
/* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
- if(NULL == buf) {
+ if (NULL == buf) {
/* Check for any elements selected (which is invalid) */
- if(nelmts > 0)
+ if (nelmts > 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer.
+ * This is for some MPI package like ChaMPIon on NCSA's tungsten which
+ * doesn't support this feature.
+ */
buf = &fake_char;
} /* end if */
/* Make sure that both selections have their extents set */
- if(!(H5S_has_extent(file_space)))
+ if (!(H5S_has_extent(file_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set")
- if(!(H5S_has_extent(mem_space)))
+ if (!(H5S_has_extent(mem_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set")
/* H5S_select_shape_same() has been modified to accept topologically identical
@@ -522,24 +505,24 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
* Note that in general, this requires us to touch up the memory buffer as
* well.
*/
- if(TRUE == H5S_select_shape_same(mem_space, file_space) &&
- H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
- void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
- /* to the beginning of the projected mem space. */
+ if (TRUE == H5S_select_shape_same(mem_space, file_space) &&
+ H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
+ void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
+ /* to the beginning of the projected mem space. */
/* Attempt to construct projected dataspace for memory dataspace */
- if(H5S_select_construct_projection(mem_space, &projected_mem_space,
- (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf, (const void **)&adj_buf, type_info.dst_type_size) < 0)
+ if (H5S_select_construct_projection(mem_space, &projected_mem_space,
+ (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf,
+ (const void **)&adj_buf, type_info.dst_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
HDassert(projected_mem_space);
HDassert(adj_buf);
/* Switch to using projected memory dataspace & adjusted buffer */
mem_space = projected_mem_space;
- buf = adj_buf;
+ buf = adj_buf;
} /* end if */
-
/* Retrieve dataset properties */
/* <none needed in the general case> */
@@ -549,25 +532,30 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
* fill time is NEVER, there is no way to tell whether part of data
* has been overwritten. So just proceed in reading.
*/
- if(nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 &&
- !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)) {
- H5D_fill_value_t fill_status; /* Whether/How the fill value is defined */
+ if (nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 &&
+ !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) &&
+ !(dataset->shared->layout.ops->is_data_cached &&
+ (*dataset->shared->layout.ops->is_data_cached)(dataset->shared))) {
+ H5D_fill_value_t fill_status; /* Whether/How the fill value is defined */
/* Retrieve dataset's fill-value properties */
- if(H5P_is_fill_value_defined(&dataset->shared->dcpl_cache.fill, &fill_status) < 0)
+ if (H5P_is_fill_value_defined(&dataset->shared->dcpl_cache.fill, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
/* Should be impossible, but check anyway... */
- if(fill_status == H5D_FILL_VALUE_UNDEFINED &&
- (dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC || dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET))
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "read failed: dataset doesn't exist, no data can be read")
+ if (fill_status == H5D_FILL_VALUE_UNDEFINED &&
+ (dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC ||
+ dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET))
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL,
+ "read failed: dataset doesn't exist, no data can be read")
/* If we're never going to fill this dataset, just leave the junk in the user's buffer */
- if(dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_NEVER)
+ if (dataset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_NEVER)
HGOTO_DONE(SUCCEED)
/* Go fill the user's selection with the dataset's fill value */
- if(H5D__fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type, mem_space, dxpl_id) < 0)
+ if (H5D__fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type,
+ mem_space, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed")
else
HGOTO_DONE(SUCCEED)
@@ -575,103 +563,104 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Set up I/O operation */
io_info.op_type = H5D_IO_OP_READ;
- io_info.u.rbuf = buf;
- if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
+ io_info.u.rbuf = buf;
+ if (H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation")
#ifdef H5_HAVE_PARALLEL
io_info_init = TRUE;
#endif /*H5_HAVE_PARALLEL*/
/* Sanity check that space is allocated, if there are elements */
- if(nelmts > 0)
- HDassert((*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
- || dataset->shared->dcpl_cache.efl.nused > 0
- || dataset->shared->layout.type == H5D_COMPACT);
+ if (nelmts > 0)
+ HDassert((*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) ||
+ (dataset->shared->layout.ops->is_data_cached &&
+ (*dataset->shared->layout.ops->is_data_cached)(dataset->shared)) ||
+ dataset->shared->dcpl_cache.efl.nused > 0 || dataset->shared->layout.type == H5D_COMPACT);
/* Call storage method's I/O initialization routine */
HDmemset(&fm, 0, sizeof(H5D_chunk_map_t));
- if(io_info.layout_ops.io_init && (*io_info.layout_ops.io_init)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
+ if (io_info.layout_ops.io_init &&
+ (*io_info.layout_ops.io_init)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info")
io_op_init = TRUE;
#ifdef H5_HAVE_PARALLEL
/* Adjust I/O info for any parallel I/O */
- if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
+ if (H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
#endif /*H5_HAVE_PARALLEL*/
/* Invoke correct "high level" I/O routine */
- if((*io_info.io_ops.multi_read)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
+ if ((*io_info.io_ops.multi_read)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
done:
/* Shut down the I/O op information */
- if(io_op_init && io_info.layout_ops.io_term && (*io_info.layout_ops.io_term)(&fm) < 0)
+ if (io_op_init && io_info.layout_ops.io_term && (*io_info.layout_ops.io_term)(&fm) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
#ifdef H5_HAVE_PARALLEL
/* Shut down io_info struct */
- if(io_info_init)
- if(H5D__ioinfo_term(&io_info) < 0)
+ if (io_info_init)
+ if (H5D__ioinfo_term(&io_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
+ if (type_info_init && H5D__typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
/* discard projected mem space if it was created */
- if(NULL != projected_mem_space)
- if(H5S_close(projected_mem_space) < 0)
+ if (NULL != projected_mem_space)
+ if (H5S_close(projected_mem_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__read() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__write
+ * Function: H5D__write
*
- * Purpose: Writes (part of) a DATASET to a file from application memory
- * BUF. See H5Dwrite() for complete details.
+ * Purpose: Writes (part of) a DATASET to a file from application memory
+ * BUF. See H5Dwrite() for complete details.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
- const H5S_t *file_space, hid_t dxpl_id, const void *buf)
+H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id,
+ const void *buf)
{
- H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
- H5D_io_info_t io_info; /* Dataset I/O info */
- H5D_type_info_t type_info; /* Datatype info for operation */
- hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
- H5S_t * projected_mem_space = NULL; /* If not NULL, ptr to dataspace containing a */
- /* projection of the supplied mem_space to a new */
- /* data space with rank equal to that of */
- /* file_space. */
- /* */
- /* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
- /* comparing the mem_space and the data_space, */
- /* and the mem_space have different rank. */
- /* */
- /* Note that if this variable is used, the */
- /* projected mem space must be discarded at the */
- /* end of the function to avoid a memory leak. */
- H5D_storage_t store; /*union of EFL and chunk pointer in file space */
- hssize_t snelmts; /*total number of elmts (signed) */
- hsize_t nelmts; /*total number of elmts */
+ H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
+ H5D_io_info_t io_info; /* Dataset I/O info */
+ H5D_type_info_t type_info; /* Datatype info for operation */
+ hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
+ H5S_t * projected_mem_space = NULL; /* If not NULL, ptr to dataspace containing a */
+ /* projection of the supplied mem_space to a new */
+ /* data space with rank equal to that of */
+ /* file_space. */
+ /* */
+ /* This field is only used if */
+ /* H5S_select_shape_same() returns TRUE when */
+ /* comparing the mem_space and the data_space, */
+ /* and the mem_space have different rank. */
+ /* */
+ /* Note that if this variable is used, the */
+ /* projected mem space must be discarded at the */
+ /* end of the function to avoid a memory leak. */
+ H5D_storage_t store; /*union of EFL and chunk pointer in file space */
+ hssize_t snelmts; /*total number of elmts (signed) */
+ hsize_t nelmts; /*total number of elmts */
#ifdef H5_HAVE_PARALLEL
- hbool_t io_info_init = FALSE; /* Whether the I/O info has been initialized */
-#endif /*H5_HAVE_PARALLEL*/
- hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
- H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- char fake_char; /* Temporary variable for NULL buffer pointers */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t io_info_init = FALSE; /* Whether the I/O info has been initialized */
+#endif /*H5_HAVE_PARALLEL*/
+ hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ char fake_char; /* Temporary variable for NULL buffer pointers */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -679,37 +668,38 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HDassert(dataset && dataset->oloc.file);
/* All filters in the DCPL must have encoding enabled. */
- if(!dataset->shared->checked_filters) {
- if(H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0)
+ if (!dataset->shared->checked_filters) {
+ if (H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters")
dataset->shared->checked_filters = TRUE;
} /* end if */
/* Check if we are allowed to write to this file */
- if(0 == (H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Patch the top level file pointer for dt->shared->u.vlen.f if needed */
H5T_patch_vlen_file(dataset->shared->type, dataset->oloc.file);
/* Set up datatype info for operation */
- if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
+ if (H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
type_info_init = TRUE;
/* Various MPI based checks */
#ifdef H5_HAVE_PARALLEL
- if(H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI)) {
+ if (H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* If MPI based VFD is used, no VL datatype support yet. */
/* This is because they use the global heap in the file and we don't */
/* support parallel access of that yet */
- if(H5T_detect_class(type_info.mem_type, H5T_VLEN, FALSE) > 0)
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "Parallel IO does not support writing VL datatypes yet")
+ if (H5T_detect_class(type_info.mem_type, H5T_VLEN, FALSE) > 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL,
+ "Parallel IO does not support writing VL datatypes yet")
/* If MPI based VFD is used, no VL datatype support yet. */
/* This is because they use the global heap in the file and we don't */
@@ -717,53 +707,54 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* We should really use H5T_detect_class() here, but it will be difficult
* to detect the type of the reference if it is nested... -QAK
*/
- if(H5T_get_class(type_info.mem_type, TRUE) == H5T_REFERENCE &&
- H5T_get_ref_type(type_info.mem_type) == H5R_DATASET_REGION)
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "Parallel IO does not support writing region reference datatypes yet")
+ if (H5T_get_class(type_info.mem_type, TRUE) == H5T_REFERENCE &&
+ H5T_get_ref_type(type_info.mem_type) == H5R_DATASET_REGION)
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL,
+ "Parallel IO does not support writing region reference datatypes yet")
/* Can't write to chunked datasets with filters, in parallel */
- if(dataset->shared->layout.type == H5D_CHUNKED &&
- dataset->shared->dcpl_cache.pline.nused > 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot write to chunked storage with filters in parallel")
+ if (dataset->shared->layout.type == H5D_CHUNKED && dataset->shared->dcpl_cache.pline.nused > 0)
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
+ "cannot write to chunked storage with filters in parallel")
} /* end if */
else {
/* Collective access is not permissible without a MPI based VFD */
- if(dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE)
+ if (dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based driver only")
- } /* end else */
+ } /* end else */
#endif /*H5_HAVE_PARALLEL*/
/* Initialize dataspace information */
- if(!file_space)
+ if (!file_space)
file_space = dataset->shared->space;
- if(!mem_space)
+ if (!mem_space)
mem_space = file_space;
- if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
+ if ((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t);
/* Make certain that the number of elements in each selection is the same */
- if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
+ if (nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes")
/* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
- if(NULL == buf) {
+ if (NULL == buf) {
/* Check for any elements selected (which is invalid) */
- if(nelmts > 0)
+ if (nelmts > 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer.
+ * This is for some MPI package like ChaMPIon on NCSA's tungsten which
+ * doesn't support this feature.
+ */
buf = &fake_char;
} /* end if */
/* Make sure that both selections have their extents set */
- if(!(H5S_has_extent(file_space)))
+ if (!(H5S_has_extent(file_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set")
- if(!(H5S_has_extent(mem_space)))
+ if (!(H5S_has_extent(mem_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set")
/* H5S_select_shape_same() has been modified to accept topologically
@@ -779,51 +770,52 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
* Note that in general, this requires us to touch up the memory buffer
* as well.
*/
- if(TRUE == H5S_select_shape_same(mem_space, file_space) &&
- H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
- void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
- /* to the beginning of the projected mem space. */
+ if (TRUE == H5S_select_shape_same(mem_space, file_space) &&
+ H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
+ void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
+ /* to the beginning of the projected mem space. */
/* Attempt to construct projected dataspace for memory dataspace */
- if(H5S_select_construct_projection(mem_space, &projected_mem_space,
- (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf, (const void **)&adj_buf, type_info.src_type_size) < 0)
+ if (H5S_select_construct_projection(mem_space, &projected_mem_space,
+ (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf,
+ (const void **)&adj_buf, type_info.src_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
HDassert(projected_mem_space);
HDassert(adj_buf);
/* Switch to using projected memory dataspace & adjusted buffer */
mem_space = projected_mem_space;
- buf = adj_buf;
+ buf = adj_buf;
} /* end if */
/* Retrieve dataset properties */
/* <none needed currently> */
/* Allocate data space and initialize it if it hasn't been. */
- if(nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 &&
- !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)) {
- hssize_t file_nelmts; /* Number of elements in file dataset's dataspace */
- hbool_t full_overwrite; /* Whether we are over-writing all the elements */
+ if (nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 &&
+ !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)) {
+ hssize_t file_nelmts; /* Number of elements in file dataset's dataspace */
+ hbool_t full_overwrite; /* Whether we are over-writing all the elements */
/* Get the number of elements in file dataset's dataspace */
- if((file_nelmts = H5S_GET_EXTENT_NPOINTS(file_space)) < 0)
+ if ((file_nelmts = H5S_GET_EXTENT_NPOINTS(file_space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "can't retrieve number of elements in file dataset")
/* Always allow fill values to be written if the dataset has a VL datatype */
- if(H5T_detect_class(dataset->shared->type, H5T_VLEN, FALSE))
+ if (H5T_detect_class(dataset->shared->type, H5T_VLEN, FALSE))
full_overwrite = FALSE;
else
full_overwrite = (hbool_t)((hsize_t)file_nelmts == nelmts ? TRUE : FALSE);
- /* Allocate storage */
- if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
+ /* Allocate storage */
+ if (H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
} /* end if */
/* Set up I/O operation */
io_info.op_type = H5D_IO_OP_WRITE;
- io_info.u.wbuf = buf;
- if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
+ io_info.u.wbuf = buf;
+ if (H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation")
#ifdef H5_HAVE_PARALLEL
io_info_init = TRUE;
@@ -831,80 +823,81 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Call storage method's I/O initialization routine */
HDmemset(&fm, 0, sizeof(H5D_chunk_map_t));
- if(io_info.layout_ops.io_init && (*io_info.layout_ops.io_init)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
+ if (io_info.layout_ops.io_init &&
+ (*io_info.layout_ops.io_init)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info")
io_op_init = TRUE;
#ifdef H5_HAVE_PARALLEL
/* Adjust I/O info for any parallel I/O */
- if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
+ if (H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
#endif /*H5_HAVE_PARALLEL*/
/* Invoke correct "high level" I/O routine */
- if((*io_info.io_ops.multi_write)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
+ if ((*io_info.io_ops.multi_write)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
#ifdef OLD_WAY
-/*
- * This was taken out because it can be called in a parallel program with
- * independent access, causing the metadata cache to get corrupted. Its been
- * disabled for all types of access (serial as well as parallel) to make the
- * modification time consistent for all programs. -QAK
- *
- * We should set a value in the dataset's shared information instead and flush
- * it to the file when the dataset is being closed. -QAK
- */
+ /*
+ * This was taken out because it can be called in a parallel program with
+ * independent access, causing the metadata cache to get corrupted. Its been
+ * disabled for all types of access (serial as well as parallel) to make the
+ * modification time consistent for all programs. -QAK
+ *
+ * We should set a value in the dataset's shared information instead and flush
+ * it to the file when the dataset is being closed. -QAK
+ */
/*
* Update modification time. We have to do this explicitly because
* writing to a dataset doesn't necessarily change the object header.
*/
- if(H5O_touch(&(dataset->oloc), FALSE, dxpl_id) < 0)
+ if (H5O_touch(&(dataset->oloc), FALSE, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time")
#endif /* OLD_WAY */
done:
/* Shut down the I/O op information */
- if(io_op_init && io_info.layout_ops.io_term && (*io_info.layout_ops.io_term)(&fm) < 0)
+ if (io_op_init && io_info.layout_ops.io_term && (*io_info.layout_ops.io_term)(&fm) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
#ifdef H5_HAVE_PARALLEL
/* Shut down io_info struct */
- if(io_info_init && H5D__ioinfo_term(&io_info) < 0)
+ if (io_info_init && H5D__ioinfo_term(&io_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
+ if (type_info_init && H5D__typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
/* discard projected mem space if it was created */
- if(NULL != projected_mem_space)
- if(H5S_close(projected_mem_space) < 0)
+ if (NULL != projected_mem_space)
+ if (H5S_close(projected_mem_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__write() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__ioinfo_init
+ * Function: H5D__ioinfo_init
*
- * Purpose: Routine for determining correct I/O operations for
+ * Purpose: Routine for determining correct I/O operations for
* each I/O action.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, September 30, 2004
+ * Programmer: Quincey Koziol
+ * Thursday, September 30, 2004
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__ioinfo_init(H5D_t *dset,
#ifndef H5_HAVE_PARALLEL
-const
+ const
#endif /* H5_HAVE_PARALLEL */
- H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
- const H5D_type_info_t *type_info, H5D_storage_t *store, H5D_io_info_t *io_info)
+ H5D_dxpl_cache_t *dxpl_cache,
+ hid_t dxpl_id, const H5D_type_info_t *type_info, H5D_storage_t *store,
+ H5D_io_info_t *io_info)
{
FUNC_ENTER_STATIC_NOERR
@@ -916,32 +909,32 @@ const
HDassert(io_info);
/* Set up "normal" I/O fields */
- io_info->dset = dset;
+ io_info->dset = dset;
io_info->dxpl_cache = dxpl_cache;
- io_info->dxpl_id = dxpl_id;
- io_info->store = store;
+ io_info->dxpl_id = dxpl_id;
+ io_info->store = store;
/* Set I/O operations to initial values */
io_info->layout_ops = *dset->shared->layout.ops;
/* Set the "high-level" I/O operations for the dataset */
- io_info->io_ops.multi_read = dset->shared->layout.ops->ser_read;
+ io_info->io_ops.multi_read = dset->shared->layout.ops->ser_read;
io_info->io_ops.multi_write = dset->shared->layout.ops->ser_write;
/* Set the I/O operations for reading/writing single blocks on disk */
- if(type_info->is_xform_noop && type_info->is_conv_noop) {
+ if (type_info->is_xform_noop && type_info->is_conv_noop) {
/*
* If there is no data transform or type conversion then read directly into
* the application's buffer. This saves at least one mem-to-mem copy.
*/
- io_info->io_ops.single_read = H5D__select_read;
+ io_info->io_ops.single_read = H5D__select_read;
io_info->io_ops.single_write = H5D__select_write;
} /* end if */
else {
/*
* This is the general case (type conversion, usually).
*/
- io_info->io_ops.single_read = H5D__scatgath_read;
+ io_info->io_ops.single_read = H5D__scatgath_read;
io_info->io_ops.single_write = H5D__scatgath_write;
} /* end else */
@@ -953,28 +946,26 @@ const
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__ioinfo_init() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__typeinfo_init
+ * Function: H5D__typeinfo_init
*
- * Purpose: Routine for determining correct datatype information for
+ * Purpose: Routine for determining correct datatype information for
* each I/O action.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, March 4, 2008
+ * Programmer: Quincey Koziol
+ * Tuesday, March 4, 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
- hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
- H5D_type_info_t *type_info)
+H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, hid_t mem_type_id,
+ hbool_t do_write, H5D_type_info_t *type_info)
{
- const H5T_t *src_type; /* Source datatype */
- const H5T_t *dst_type; /* Destination datatype */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5T_t *src_type; /* Source datatype */
+ const H5T_t *dst_type; /* Destination datatype */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -986,65 +977,63 @@ H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
HDmemset(type_info, 0, sizeof(*type_info));
/* Get the memory & dataset datatypes */
- if(NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
type_info->dset_type = dset->shared->type;
- if(do_write) {
- src_type = type_info->mem_type;
- dst_type = dset->shared->type;
+ if (do_write) {
+ src_type = type_info->mem_type;
+ dst_type = dset->shared->type;
type_info->src_type_id = mem_type_id;
type_info->dst_type_id = dset->shared->type_id;
} /* end if */
else {
- src_type = dset->shared->type;
- dst_type = type_info->mem_type;
+ src_type = dset->shared->type;
+ dst_type = type_info->mem_type;
type_info->src_type_id = dset->shared->type_id;
type_info->dst_type_id = mem_type_id;
} /* end else */
- /*
- * Locate the type conversion function and data space conversion
+ /* Locate the type conversion function and dataspace conversion
* functions, and set up the element numbering information. If a data
* type conversion is necessary then register datatype atoms. Data type
* conversion is necessary if the user has set the `need_bkg' to a high
* enough value in xfer_parms since turning off datatype conversion also
* turns off background preservation.
*/
- if(NULL == (type_info->tpath = H5T_path_find(src_type, dst_type, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
+ if (NULL == (type_info->tpath = H5T_path_find(src_type, dst_type, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
/* Precompute some useful information */
type_info->src_type_size = H5T_get_size(src_type);
type_info->dst_type_size = H5T_get_size(dst_type);
type_info->max_type_size = MAX(type_info->src_type_size, type_info->dst_type_size);
- type_info->is_conv_noop = H5T_path_noop(type_info->tpath);
+ type_info->is_conv_noop = H5T_path_noop(type_info->tpath);
type_info->is_xform_noop = H5Z_xform_noop(dxpl_cache->data_xform_prop);
- if(type_info->is_xform_noop && type_info->is_conv_noop) {
+ if (type_info->is_xform_noop && type_info->is_conv_noop) {
type_info->cmpd_subset = NULL;
- type_info->need_bkg = H5T_BKG_NO;
+ type_info->need_bkg = H5T_BKG_NO;
} /* end if */
else {
- size_t target_size; /* Desired buffer size */
+ size_t target_size; /* Desired buffer size */
/* Check if the datatypes are compound subsets of one another */
type_info->cmpd_subset = H5T_path_compound_subset(type_info->tpath);
/* Check if we need a background buffer */
- if(do_write && H5T_detect_class(dset->shared->type, H5T_VLEN, FALSE))
+ if (do_write && H5T_detect_class(dset->shared->type, H5T_VLEN, FALSE))
type_info->need_bkg = H5T_BKG_YES;
else {
- H5T_bkg_t path_bkg; /* Type conversion's background info */
+ H5T_bkg_t path_bkg; /* Type conversion's background info */
- if((path_bkg = H5T_path_bkg(type_info->tpath))) {
+ if ((path_bkg = H5T_path_bkg(type_info->tpath))) {
/* Retrieve the bkgr buffer property */
type_info->need_bkg = dxpl_cache->bkgr_buf_type;
type_info->need_bkg = MAX(path_bkg, type_info->need_bkg);
} /* end if */
else
type_info->need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/
- } /* end else */
-
+ } /* end else */
/* Set up datatype conversion/background buffers */
@@ -1052,15 +1041,16 @@ H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
target_size = dxpl_cache->max_temp_buf;
/* If the buffer is too small to hold even one element, try to make it bigger */
- if(target_size < type_info->max_type_size) {
- hbool_t default_buffer_info; /* Whether the buffer information are the defaults */
+ if (target_size < type_info->max_type_size) {
+ hbool_t default_buffer_info; /* Whether the buffer information are the defaults */
/* Detect if we have all default settings for buffers */
- default_buffer_info = (hbool_t)((H5D_TEMP_BUF_SIZE == dxpl_cache->max_temp_buf)
- && (NULL == dxpl_cache->tconv_buf) && (NULL == dxpl_cache->bkgr_buf));
+ default_buffer_info =
+ (hbool_t)((H5D_TEMP_BUF_SIZE == dxpl_cache->max_temp_buf) &&
+ (NULL == dxpl_cache->tconv_buf) && (NULL == dxpl_cache->bkgr_buf));
/* Check if we are using the default buffer info */
- if(default_buffer_info)
+ if (default_buffer_info)
/* OK to get bigger for library default settings */
target_size = type_info->max_type_size;
else
@@ -1072,66 +1062,65 @@ H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
type_info->request_nelmts = target_size / type_info->max_type_size;
/* Sanity check elements in temporary buffer */
- if(type_info->request_nelmts == 0)
+ if (type_info->request_nelmts == 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "temporary buffer max size is too small")
- /*
- * Get a temporary buffer for type conversion unless the app has already
+ /* Get a temporary buffer for type conversion unless the app has already
* supplied one through the xfer properties. Instead of allocating a
* buffer which is the exact size, we allocate the target size. The
* malloc() is usually less resource-intensive if we allocate/free the
* same size over and over.
*/
- if(NULL == (type_info->tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
+ if (NULL == (type_info->tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
/* Allocate temporary buffer */
- if(NULL == (type_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
+ if (NULL == (type_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
type_info->tconv_buf_allocated = TRUE;
} /* end if */
- if(type_info->need_bkg && NULL == (type_info->bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
- size_t bkg_size; /* Desired background buffer size */
+ if (type_info->need_bkg && NULL == (type_info->bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
+ size_t bkg_size; /* Desired background buffer size */
/* Compute the background buffer size */
/* (don't try to use buffers smaller than the default size) */
bkg_size = type_info->request_nelmts * type_info->dst_type_size;
- if(bkg_size < dxpl_cache->max_temp_buf)
+ if (bkg_size < dxpl_cache->max_temp_buf)
bkg_size = dxpl_cache->max_temp_buf;
/* Allocate background buffer */
/* (Need calloc()-like call since memory needs to be initialized) */
- if(NULL == (type_info->bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion")
+ if (NULL == (type_info->bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for background conversion")
type_info->bkg_buf_allocated = TRUE;
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__typeinfo_init() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__ioinfo_adjust
+ * Function: H5D__ioinfo_adjust
*
- * Purpose: Adjust operation's I/O info for any parallel I/O
+ * Purpose: Adjust operation's I/O info for any parallel I/O
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, March 27, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, March 27, 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
- const H5S_t *file_space, const H5S_t *mem_space,
- const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm)
+H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id, const H5S_t *file_space,
+ const H5S_t *mem_space, const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm)
{
- H5P_genplist_t *dx_plist; /* Data transer property list */
+ H5P_genplist_t * dx_plist; /* Data transer property list */
H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode; /* performed chunk optimization */
- H5D_mpio_actual_io_mode_t actual_io_mode; /* performed io mode */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_mpio_actual_io_mode_t actual_io_mode; /* performed io mode */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1145,43 +1134,43 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
HDassert(io_info);
/* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Reset the actual io mode properties to the default values in case
* the dxpl was previously used in a collective I/O operation.
*/
actual_chunk_opt_mode = H5D_MPIO_NO_CHUNK_OPTIMIZATION;
- actual_io_mode = H5D_MPIO_NO_COLLECTIVE;
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ actual_io_mode = H5D_MPIO_NO_COLLECTIVE;
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
/* Make any parallel I/O adjustments */
- if(io_info->using_mpi_vfd) {
- htri_t opt; /* Flag whether a selection is optimizable */
+ if (io_info->using_mpi_vfd) {
+ htri_t opt; /* Flag whether a selection is optimizable */
/* Record the original state of parallel I/O transfer options */
- io_info->orig.xfer_mode = io_info->dxpl_cache->xfer_mode;
- io_info->orig.coll_opt_mode = io_info->dxpl_cache->coll_opt_mode;
- io_info->orig.io_ops.single_read = io_info->io_ops.single_read;
+ io_info->orig.xfer_mode = io_info->dxpl_cache->xfer_mode;
+ io_info->orig.coll_opt_mode = io_info->dxpl_cache->coll_opt_mode;
+ io_info->orig.io_ops.single_read = io_info->io_ops.single_read;
io_info->orig.io_ops.single_write = io_info->io_ops.single_write;
/* Get MPI communicator */
- if(MPI_COMM_NULL == (io_info->comm = H5F_mpi_get_comm(dset->oloc.file)))
+ if (MPI_COMM_NULL == (io_info->comm = H5F_mpi_get_comm(dset->oloc.file)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator")
/* Check if we can set direct MPI-IO read/write functions */
- if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm, dx_plist)) < 0)
+ if ((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm, dx_plist)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ")
/* Check if we can use the optimized parallel I/O routines */
- if(opt == TRUE) {
+ if (opt == TRUE) {
/* Override the I/O op pointers to the MPI-specific routines */
- io_info->io_ops.multi_read = dset->shared->layout.ops->par_read;
- io_info->io_ops.multi_write = dset->shared->layout.ops->par_write;
- io_info->io_ops.single_read = H5D__mpio_select_read;
+ io_info->io_ops.multi_read = dset->shared->layout.ops->par_read;
+ io_info->io_ops.multi_write = dset->shared->layout.ops->par_write;
+ io_info->io_ops.single_read = H5D__mpio_select_read;
io_info->io_ops.single_write = H5D__mpio_select_write;
} /* end if */
else {
@@ -1189,68 +1178,67 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
* collective I/O, change the request to use independent I/O, but
* mark it so that we remember to revert the change.
*/
- if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE) {
+ if (io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE) {
/* Change the xfer_mode to independent for handling the I/O */
io_info->dxpl_cache->xfer_mode = H5FD_MPIO_INDEPENDENT;
- if(H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->dxpl_cache->xfer_mode) < 0)
+ if (H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->dxpl_cache->xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set transfer mode")
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__ioinfo_adjust() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__ioinfo_term
+ * Function: H5D__ioinfo_term
*
- * Purpose: Common logic for terminating an I/O info object
+ * Purpose: Common logic for terminating an I/O info object
* (Only used for restoring MPI transfer mode currently)
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Friday, February 6, 2004
+ * Programmer: Quincey Koziol
+ * Friday, February 6, 2004
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__ioinfo_term(H5D_io_info_t *io_info)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
/* Check if we used the MPI VFD for the I/O */
- if(io_info->using_mpi_vfd) {
+ if (io_info->using_mpi_vfd) {
/* Check if we need to revert the change to the xfer mode */
- if(io_info->orig.xfer_mode != io_info->dxpl_cache->xfer_mode) {
- H5P_genplist_t *dx_plist; /* Data transer property list */
+ if (io_info->orig.xfer_mode != io_info->dxpl_cache->xfer_mode) {
+ H5P_genplist_t *dx_plist; /* Data transer property list */
/* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Restore the original parallel I/O mode */
- if(H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->orig.xfer_mode) < 0)
+ if (H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->orig.xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set transfer mode")
} /* end if */
/* Check if we need to revert the change to the collective opt mode */
- if(io_info->orig.coll_opt_mode != io_info->dxpl_cache->coll_opt_mode) {
- H5P_genplist_t *dx_plist; /* Data transer property list */
+ if (io_info->orig.coll_opt_mode != io_info->dxpl_cache->coll_opt_mode) {
+ H5P_genplist_t *dx_plist; /* Data transer property list */
/* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Restore the original parallel I/O mode */
- if(H5P_set(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &io_info->orig.coll_opt_mode) < 0)
+ if (H5P_set(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &io_info->orig.coll_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set collective option mode")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1258,16 +1246,15 @@ done:
#endif /* H5_HAVE_PARALLEL */
-
/*-------------------------------------------------------------------------
- * Function: H5D__typeinfo_term
+ * Function: H5D__typeinfo_term
*
- * Purpose: Common logic for terminating a type info object
+ * Purpose: Common logic for terminating a type info object
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, March 6, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, March 6, 2008
*
*-------------------------------------------------------------------------
*/
@@ -1277,11 +1264,11 @@ H5D__typeinfo_term(const H5D_type_info_t *type_info)
FUNC_ENTER_STATIC_NOERR
/* Check for releasing datatype conversion & background buffers */
- if(type_info->tconv_buf_allocated) {
+ if (type_info->tconv_buf_allocated) {
HDassert(type_info->tconv_buf);
(void)H5FL_BLK_FREE(type_conv, type_info->tconv_buf);
} /* end if */
- if(type_info->bkg_buf_allocated) {
+ if (type_info->bkg_buf_allocated) {
HDassert(type_info->bkg_buf);
(void)H5FL_BLK_FREE(type_conv, type_info->bkg_buf);
} /* end if */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 94d4c6b..9990db1 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,66 +15,57 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLprivate.h" /* Local heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLprivate.h" /* Local heaps */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5D__layout_set_io_ops
+ * Function: H5D__layout_set_io_ops
*
- * Purpose: Set the I/O operation function pointers for a dataset,
+ * Purpose: Set the I/O operation function pointers for a dataset,
* according to the dataset's layout
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, March 20, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, March 20, 2008
*
*-------------------------------------------------------------------------
*/
herr_t
H5D__layout_set_io_ops(const H5D_t *dataset)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -82,9 +73,9 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
HDassert(dataset);
/* Set the I/O functions for each layout type */
- switch(dataset->shared->layout.type) {
+ switch (dataset->shared->layout.type) {
case H5D_CONTIGUOUS:
- if(dataset->shared->dcpl_cache.efl.nused > 0)
+ if (dataset->shared->dcpl_cache.efl.nused > 0)
dataset->shared->layout.ops = H5D_LOPS_EFL;
else
dataset->shared->layout.ops = H5D_LOPS_CONTIG;
@@ -112,7 +103,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_io_ops() */
-
/*-------------------------------------------------------------------------
* Function: H5D__layout_meta_size
*
@@ -131,7 +121,7 @@ done:
size_t
H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data)
{
- size_t ret_value;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_PACKAGE
@@ -139,20 +129,22 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
HDassert(f);
HDassert(layout);
- ret_value = 1 + /* Version number */
- 1; /* layout class type */
+ ret_value = 1 + /* Version number */
+ 1; /* layout class type */
- switch(layout->type) {
+ switch (layout->type) {
case H5D_COMPACT:
+ /* This information only present in older versions of message */
/* Size of raw data */
ret_value += 2;
- if(include_compact_data)
- ret_value += layout->storage.u.compact.size;/* data for compact dataset */
+ if (include_compact_data)
+ ret_value += layout->storage.u.compact.size; /* data for compact dataset */
break;
case H5D_CONTIGUOUS:
- ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
- ret_value += H5F_SIZEOF_SIZE(f); /* Length of data */
+ /* This information only present in older versions of message */
+ ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
+ ret_value += H5F_SIZEOF_SIZE(f); /* Length of data */
break;
case H5D_CHUNKED:
@@ -164,7 +156,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
ret_value += layout->u.chunk.ndims * 4;
/* B-tree address */
- ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
+ ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
break;
case H5D_LAYOUT_ERROR:
@@ -177,28 +169,26 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_meta_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__layout_oh_create
+ * Function: H5D__layout_oh_create
*
- * Purpose: Create layout/pline/efl information for dataset
+ * Purpose: Create layout/pline/efl information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
herr_t
-H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
- hid_t dapl_id)
+H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
{
- H5O_layout_t *layout; /* Dataset's layout information */
- const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_layout_t * layout; /* Dataset's layout information */
+ const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
+ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -208,20 +198,21 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
HDassert(dset);
/* Set some local variables, for convenience */
- layout = &dset->shared->layout;
+ layout = &dset->shared->layout;
fill_prop = &dset->shared->dcpl_cache.fill;
/* Update the filters message, if this is a chunked dataset */
- if(layout->type == H5D_CHUNKED) {
- H5O_pline_t *pline; /* Dataset's I/O pipeline information */
+ if (layout->type == H5D_CHUNKED) {
+ H5O_pline_t *pline; /* Dataset's I/O pipeline information */
pline = &dset->shared->dcpl_cache.pline;
- if(pline->nused > 0 && H5O_msg_append_oh(file, dxpl_id, oh, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, pline) < 0)
+ if (pline->nused > 0 &&
+ H5O_msg_append_oh(file, dxpl_id, oh, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update filter header message")
} /* end if */
/* Initialize the layout information for the new dataset */
- if(dset->shared->layout.ops->init && (dset->shared->layout.ops->init)(file, dxpl_id, dset, dapl_id) < 0)
+ if (dset->shared->layout.ops->init && (dset->shared->layout.ops->init)(file, dxpl_id, dset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information")
/* Indicate that the layout information was initialized */
@@ -231,41 +222,41 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
* Allocate storage if space allocate time is early; otherwise delay
* allocation until later.
*/
- if(fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY)
- if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE, NULL) < 0)
+ if (fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY)
+ if (H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
/* Update external storage message, if it's used */
- if(dset->shared->dcpl_cache.efl.nused > 0) {
+ if (dset->shared->dcpl_cache.efl.nused > 0) {
H5O_efl_t *efl = &dset->shared->dcpl_cache.efl; /* Dataset's external file list */
- H5HL_t *heap; /* Pointer to local heap for EFL file names */
- size_t heap_size = H5HL_ALIGN(1);
- size_t u;
+ H5HL_t * heap; /* Pointer to local heap for EFL file names */
+ size_t heap_size = H5HL_ALIGN(1);
+ size_t u;
/* Determine size of heap needed to stored the file names */
- for(u = 0; u < efl->nused; ++u)
+ for (u = 0; u < efl->nused; ++u)
heap_size += H5HL_ALIGN(HDstrlen(efl->slot[u].name) + 1);
/* Create the heap for the EFL file names */
- if(H5HL_create(file, dxpl_id, heap_size, &efl->heap_addr/*out*/) < 0)
+ if (H5HL_create(file, dxpl_id, heap_size, &efl->heap_addr /*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create EFL file name heap")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(file, dxpl_id, efl->heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(file, dxpl_id, efl->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect EFL file name heap")
/* Insert "empty" name first */
- if((size_t)(-1) == H5HL_insert(file, dxpl_id, heap, (size_t)1, "")) {
+ if ((size_t)(-1) == H5HL_insert(file, dxpl_id, heap, (size_t)1, "")) {
H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
- for(u = 0; u < efl->nused; ++u) {
- size_t offset; /* Offset of file name in heap */
+ for (u = 0; u < efl->nused; ++u) {
+ size_t offset; /* Offset of file name in heap */
/* Insert file name into heap */
- if((size_t)(-1) == (offset = H5HL_insert(file, dxpl_id, heap,
- HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name))) {
+ if ((size_t)(-1) == (offset = H5HL_insert(file, dxpl_id, heap, HDstrlen(efl->slot[u].name) + 1,
+ efl->slot[u].name))) {
H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
@@ -276,52 +267,56 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
} /* end for */
/* Release the heap */
- if(H5HL_unprotect(heap) < 0)
+ if (H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect EFL file name heap")
heap = NULL;
/* Insert EFL message into dataset object header */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_EFL_ID, H5O_MSG_FLAG_CONSTANT, 0, efl) < 0)
+ if (H5O_msg_append_oh(file, dxpl_id, oh, H5O_EFL_ID, H5O_MSG_FLAG_CONSTANT, 0, efl) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update external file list message")
} /* end if */
/* Create layout message */
- /* (Don't make layout message constant unless allocation time is early, since space may not be allocated) */
+ /* (Don't make layout message constant unless allocation time is early, since space may not be allocated)
+ */
/* (Note: this is relying on H5D__alloc_storage not calling H5O_msg_write during dataset creation) */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_LAYOUT_ID, ((fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type) ? H5O_MSG_FLAG_CONSTANT : 0), 0, layout) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout")
+ if (H5O_msg_append_oh(file, dxpl_id, oh, H5O_LAYOUT_ID,
+ ((fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type)
+ ? H5O_MSG_FLAG_CONSTANT
+ : 0),
+ 0, layout) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout")
done:
/* Error cleanup */
- if(ret_value < 0) {
- if(dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D__chunk_dest(file, dxpl_id, dset) < 0)
+ if (ret_value < 0) {
+ if (dset->shared->layout.type == H5D_CHUNKED && layout_init) {
+ if (H5D__chunk_dest(file, dxpl_id, dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_create() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__layout_oh_read
+ * Function: H5D__layout_oh_read
*
- * Purpose: Read layout/pline/efl information for dataset
+ * Purpose: Read layout/pline/efl information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
herr_t
H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist)
{
- htri_t msg_exists; /* Whether a particular type of message exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t msg_exists; /* Whether a particular type of message exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -330,15 +325,15 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
HDassert(plist);
/* Get the optional filters message */
- if((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_PLINE_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_PLINE_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists")
- if(msg_exists) {
+ if (msg_exists) {
/* Retrieve the I/O pipeline message */
- if(NULL == H5O_msg_read(&(dataset->oloc), H5O_PLINE_ID, &dataset->shared->dcpl_cache.pline, dxpl_id))
+ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_PLINE_ID, &dataset->shared->dcpl_cache.pline, dxpl_id))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message")
/* Set the I/O pipeline info in the property list */
- if(H5P_set(plist, H5O_CRT_PIPELINE_NAME, &dataset->shared->dcpl_cache.pline) < 0)
+ if (H5P_set(plist, H5O_CRT_PIPELINE_NAME, &dataset->shared->dcpl_cache.pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set pipeline")
} /* end if */
@@ -348,19 +343,19 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
* values are copied to the dataset create plist so the user can query
* them.
*/
- if(NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout), dxpl_id))
+ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout), dxpl_id))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message")
/* Check for external file list message (which might not exist) */
- if((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_EFL_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_EFL_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists")
- if(msg_exists) {
+ if (msg_exists) {
/* Retrieve the EFL message */
- if(NULL == H5O_msg_read(&(dataset->oloc), H5O_EFL_ID, &dataset->shared->dcpl_cache.efl, dxpl_id))
+ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_EFL_ID, &dataset->shared->dcpl_cache.efl, dxpl_id))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message")
/* Set the EFL info in the property list */
- if(H5P_set(plist, H5D_CRT_EXT_FILE_LIST_NAME, &dataset->shared->dcpl_cache.efl) < 0)
+ if (H5P_set(plist, H5D_CRT_EXT_FILE_LIST_NAME, &dataset->shared->dcpl_cache.efl) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set external file list")
/* Set the dataset's I/O operations */
@@ -371,66 +366,66 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
HDassert(dataset->shared->layout.ops);
/* Adjust chunk dimensions to omit datatype size (in last dimension) for creation property */
- if(H5D_CHUNKED == dataset->shared->layout.type)
+ if (H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims--;
/* Copy layout to the DCPL */
- if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &dataset->shared->layout) < 0)
+ if (H5P_set(plist, H5D_CRT_LAYOUT_NAME, &dataset->shared->layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout")
/* Adjust chunk dimensions back again (*sigh*) */
- if(H5D_CHUNKED == dataset->shared->layout.type)
+ if (H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims++;
- switch(dataset->shared->layout.type) {
- case H5D_CONTIGUOUS:
- {
- hsize_t tmp_size; /* Temporary holder for raw data size */
- size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
+ switch (dataset->shared->layout.type) {
+ case H5D_CONTIGUOUS: {
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
/* Compute the size of the contiguous storage for versions of the
* layout message less than version 3 because versions 1 & 2 would
* truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
*/
- if(dataset->shared->layout.version < 3) {
- hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
- hsize_t nelmts; /* Number of elements in dataspace */
- size_t dt_size; /* Size of datatype */
+ if (dataset->shared->layout.version < 3) {
+ hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
+ hsize_t nelmts; /* Number of elements in dataspace */
+ size_t dt_size; /* Size of datatype */
/* Retrieve the number of elements in the dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
+ if ((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
+ "unable to retrieve number of elements in dataspace")
nelmts = (hsize_t)snelmts;
/* Get the datatype's size */
- if(0 == (dt_size = H5T_GET_SIZE(dataset->shared->type)))
+ if (0 == (dt_size = H5T_GET_SIZE(dataset->shared->type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
/* Compute the size of the dataset's contiguous storage */
tmp_size = nelmts * dt_size;
/* Check for overflow during multiplication */
- if(nelmts != (tmp_size / dt_size))
+ if (nelmts != (tmp_size / dt_size))
HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
/* Assign the dataset's contiguous storage size */
dataset->shared->layout.storage.u.contig.size = tmp_size;
- } else
+ }
+ else
tmp_size = dataset->shared->layout.storage.u.contig.size;
- /* Get the sieve buffer size for the file */
- tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file);
+ /* Get the sieve buffer size for the file */
+ tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file);
- /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
- * from the file access property. (SLU - 2012/3/30) */
- if(tmp_size < tmp_sieve_buf_size)
- dataset->shared->cache.contig.sieve_buf_size = tmp_size;
- else
- dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
- }
- break;
+ /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
+ * from the file access property. (SLU - 2012/3/30) */
+ if (tmp_size < tmp_sieve_buf_size)
+ dataset->shared->cache.contig.sieve_buf_size = tmp_size;
+ else
+ dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
+ } break;
case H5D_CHUNKED:
/* Initialize the chunk cache for the dataset */
- if(H5D__chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
+ if (H5D__chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize chunk cache")
break;
@@ -447,24 +442,23 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5D__layout_oh_write
+ * Function: H5D__layout_oh_write
*
- * Purpose: Write layout/pline/efl information for dataset
+ * Purpose: Write layout information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
herr_t
H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_flags)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -473,10 +467,10 @@ H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_f
HDassert(oh);
/* Write the layout message to the dataset's header */
- if(H5O_msg_write_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, H5O_MSG_FLAG_CONSTANT, update_flags, &dataset->shared->layout) < 0)
+ if (H5O_msg_write_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, H5O_MSG_FLAG_CONSTANT, update_flags,
+ &dataset->shared->layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_write() */
-
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index c4c9fbe..28fe736 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,21 +27,20 @@
#define H5D_PACKAGE /* suppress error about including H5Dpkg */
-
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Sprivate.h" /* Dataspaces */
-#include "H5VMprivate.h" /* Vector */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Sprivate.h" /* Dataspaces */
+#include "H5VMprivate.h" /* Vector */
#ifdef H5_HAVE_PARALLEL
@@ -66,7 +65,7 @@
#define H5D_OBTAIN_ALL_CHUNK_ADDR_COL 2
/* Macros to define the default ratio of obtaining all chunk addresses for one linked-chunk IO case */
-#define H5D_ALL_CHUNK_ADDR_THRES_COL 30
+#define H5D_ALL_CHUNK_ADDR_THRES_COL 30
#define H5D_ALL_CHUNK_ADDR_THRES_COL_NUM 10000
/***** Macros for multi-chunk collective IO case. *****/
@@ -76,73 +75,65 @@
*/
/* Macros to represent different IO modes(NONE, Independent or collective)for multiple chunk IO case */
-#define H5D_CHUNK_IO_MODE_IND 0
-#define H5D_CHUNK_IO_MODE_COL 1
+#define H5D_CHUNK_IO_MODE_IND 0
+#define H5D_CHUNK_IO_MODE_COL 1
/* Macros to represent the regularity of the selection for multiple chunk IO case. */
-#define H5D_CHUNK_SELECT_REG 1
-#define H5D_CHUNK_SELECT_IRREG 2
-#define H5D_CHUNK_SELECT_NONE 0
-
+#define H5D_CHUNK_SELECT_REG 1
+#define H5D_CHUNK_SELECT_IRREG 2
+#define H5D_CHUNK_SELECT_NONE 0
/******************/
/* Local Typedefs */
/******************/
/* Combine chunk address and chunk info into a struct for better performance. */
typedef struct H5D_chunk_addr_info_t {
- haddr_t chunk_addr;
- H5D_chunk_info_t chunk_info;
+ haddr_t chunk_addr;
+ H5D_chunk_info_t chunk_info;
} H5D_chunk_addr_info_t;
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5D__chunk_collective_io(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, H5D_chunk_map_t *fm);
-static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, H5D_chunk_map_t *fm,
- H5P_genplist_t *dx_plist);
-static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int sum_chunk,
- H5P_genplist_t *dx_plist);
-static herr_t H5D__inter_collective_io(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, const H5S_t *file_space,
- const H5S_t *mem_space);
-static herr_t H5D__final_collective_io(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, MPI_Datatype *mpi_file_type,
- MPI_Datatype *mpi_buf_type);
+static herr_t H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ H5D_chunk_map_t *fm);
+static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist);
+static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ H5D_chunk_map_t *fm, int sum_chunk, H5P_genplist_t *dx_plist);
+static herr_t H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ const H5S_t *file_space, const H5S_t *mem_space);
+static herr_t H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, MPI_Datatype *mpi_file_type,
+ MPI_Datatype *mpi_buf_type);
static herr_t H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
- H5D_chunk_addr_info_t chunk_addr_info_array[], int many_chunk_opt);
-static herr_t H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm,
- H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[]);
+ H5D_chunk_addr_info_t chunk_addr_info_array[], int many_chunk_opt);
+static herr_t H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist,
+ uint8_t assign_io_mode[], haddr_t chunk_addr[]);
static herr_t H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
- H5FD_mpio_xfer_t xfer_mode);
+ H5FD_mpio_xfer_t xfer_mode);
static herr_t H5D__ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
- H5FD_mpio_collective_opt_t coll_opt_mode);
-static herr_t H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info,
- const H5D_chunk_map_t *fm, int *min_chunkf);
-static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info,
- const H5D_chunk_map_t *fm, int *sum_chunkf);
-
+ H5FD_mpio_collective_opt_t coll_opt_mode);
+static herr_t H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
+ int *min_chunkf);
+static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
+ int *sum_chunkf);
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5D__mpio_opt_possible
*
* Purpose: Checks if an direct I/O transfer is possible between memory and
* the file.
*
- * Return: Sauccess: Non-negative: TRUE or FALSE
+ * Return: Success: Non-negative: TRUE or FALSE
* Failure: Negative
*
* Programmer: Quincey Koziol
@@ -151,13 +142,12 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info,
*-------------------------------------------------------------------------
*/
htri_t
-H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
- const H5S_t *mem_space, const H5D_type_info_t *type_info,
- const H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
+H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, const H5S_t *mem_space,
+ const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
{
- int local_cause = 0; /* Local reason(s) for breaking collective mode */
- int global_cause = 0; /* Global reason(s) for breaking collective mode */
- htri_t ret_value; /* Return value */
+ int local_cause = 0; /* Local reason(s) for breaking collective mode */
+ int global_cause = 0; /* Global reason(s) for breaking collective mode */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_PACKAGE
@@ -167,36 +157,35 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
HDassert(file_space);
HDassert(type_info);
-
/* For independent I/O, get out quickly and don't try to form consensus */
- if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT)
+ if (io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT)
local_cause |= H5D_MPIO_SET_INDEPENDENT;
/* Optimized MPI types flag must be set */
/* (based on 'HDF5_MPI_OPT_TYPES' environment variable) */
- if(!H5FD_mpi_opt_types_g)
+ if (!H5FD_mpi_opt_types_g)
local_cause |= H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED;
/* Don't allow collective operations if datatype conversions need to happen */
- if(!type_info->is_conv_noop)
+ if (!type_info->is_conv_noop)
local_cause |= H5D_MPIO_DATATYPE_CONVERSION;
/* Don't allow collective operations if data transform operations should occur */
- if(!type_info->is_xform_noop)
+ if (!type_info->is_xform_noop)
local_cause |= H5D_MPIO_DATA_TRANSFORMS;
/* Check whether these are both simple or scalar dataspaces */
- if(!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space))
- && (H5S_SIMPLE == H5S_GET_EXTENT_TYPE(file_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(file_space))))
+ if (!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space)) &&
+ (H5S_SIMPLE == H5S_GET_EXTENT_TYPE(file_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(file_space))))
local_cause |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
/* Dataset storage must be contiguous or chunked */
- if(!(io_info->dset->shared->layout.type == H5D_CONTIGUOUS ||
- io_info->dset->shared->layout.type == H5D_CHUNKED))
+ if (!(io_info->dset->shared->layout.type == H5D_CONTIGUOUS ||
+ io_info->dset->shared->layout.type == H5D_CHUNKED))
local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
/* check if external-file storage is used */
- if(io_info->dset->shared->dcpl_cache.efl.nused > 0)
+ if (io_info->dset->shared->dcpl_cache.efl.nused > 0)
local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
/* The handling of memory space is different for chunking and contiguous
@@ -207,29 +196,30 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
*/
/* Don't allow collective operations if filters need to be applied */
- if(io_info->dset->shared->layout.type == H5D_CHUNKED &&
- io_info->dset->shared->dcpl_cache.pline.nused > 0)
+ if (io_info->dset->shared->layout.type == H5D_CHUNKED &&
+ io_info->dset->shared->dcpl_cache.pline.nused > 0)
local_cause |= H5D_MPIO_FILTERS;
/* Check for independent I/O */
- if(local_cause & H5D_MPIO_SET_INDEPENDENT)
+ if (local_cause & H5D_MPIO_SET_INDEPENDENT)
global_cause = local_cause;
else {
- int mpi_code; /* MPI error code */
+ int mpi_code; /* MPI error code */
/* Form consensus opinion among all processes about whether to perform
* collective I/O
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&local_cause, &global_cause, 1, MPI_INT, MPI_BOR, io_info->comm)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Allreduce(&local_cause, &global_cause, 1, MPI_INT, MPI_BOR, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code)
} /* end else */
/* Write the local value of no-collective-cause to the DXPL. */
- if(H5P_set(dx_plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, &local_cause) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set local no collective cause property")
+ if (H5P_set(dx_plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, &local_cause) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set local no collective cause property")
/* Write the global value of no-collective-cause to the DXPL. */
- if(H5P_set(dx_plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, &global_cause) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, &global_cause) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set global no collective cause property")
/* Set the return value, based on the global cause */
@@ -239,7 +229,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__mpio_opt_possible() */
-
/*-------------------------------------------------------------------------
* Function: H5D__mpio_select_read
*
@@ -253,22 +242,24 @@ done:
*/
herr_t
H5D__mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space)
+ hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space)
{
- const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
+ const H5D_contig_storage_t *store_contig =
+ &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
- if(H5F_block_read(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr, (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.rbuf) < 0)
+ if (H5F_block_read(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr,
+ (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.rbuf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't finish collective parallel read")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mpio_select_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__mpio_select_write
*
@@ -282,23 +273,25 @@ done:
*/
herr_t
H5D__mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space)
+ hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space)
{
- const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
+ const H5D_contig_storage_t *store_contig =
+ &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
- if(H5F_block_write(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr, (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.wbuf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't finish collective parallel write")
+ if (H5F_block_write(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr,
+ (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.wbuf) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't finish collective parallel write")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mpio_select_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__ioinfo_xfer_mode
*
@@ -312,29 +305,28 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
- H5FD_mpio_xfer_t xfer_mode)
+H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist, H5FD_mpio_xfer_t xfer_mode)
{
- herr_t ret_value = SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_STATIC
/* Change the xfer_mode */
io_info->dxpl_cache->xfer_mode = xfer_mode;
- if(H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->dxpl_cache->xfer_mode) < 0)
+ if (H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->dxpl_cache->xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set transfer mode")
/* Change the "single I/O" function pointers */
- if(xfer_mode == H5FD_MPIO_INDEPENDENT) {
+ if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
/* Set the pointers to the original, non-MPI-specific routines */
- io_info->io_ops.single_read = io_info->orig.io_ops.single_read;
+ io_info->io_ops.single_read = io_info->orig.io_ops.single_read;
io_info->io_ops.single_write = io_info->orig.io_ops.single_write;
} /* end if */
else {
HDassert(xfer_mode == H5FD_MPIO_COLLECTIVE);
/* Set the pointers to the MPI-specific routines */
- io_info->io_ops.single_read = H5D__mpio_select_read;
+ io_info->io_ops.single_read = H5D__mpio_select_read;
io_info->io_ops.single_write = H5D__mpio_select_write;
} /* end else */
@@ -342,7 +334,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__ioinfo_xfer_mode() */
-
/*-------------------------------------------------------------------------
* Function: H5D__ioinfo_coll_opt_mode
*
@@ -358,22 +349,21 @@ done:
*/
static herr_t
H5D__ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
- H5FD_mpio_collective_opt_t coll_opt_mode)
+ H5FD_mpio_collective_opt_t coll_opt_mode)
{
- herr_t ret_value = SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_STATIC
/* Change the optimal xfer_mode */
io_info->dxpl_cache->coll_opt_mode = coll_opt_mode;
- if(H5P_set(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &io_info->dxpl_cache->coll_opt_mode) < 0)
+ if (H5P_set(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &io_info->dxpl_cache->coll_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set transfer mode")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__ioinfo_coll_opt_mode() */
-
/*-------------------------------------------------------------------------
* Function: H5D__mpio_get_min_chunk
*
@@ -388,11 +378,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
- int *min_chunkf)
+H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, int *min_chunkf)
{
- int num_chunkf; /* Number of chunks to iterate over */
- int mpi_code; /* MPI return code */
+ int num_chunkf; /* Number of chunks to iterate over */
+ int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -401,14 +390,14 @@ H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
num_chunkf = H5SL_count(fm->sel_chunks);
/* Determine the minimum # of chunks for all processes */
- if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&num_chunkf, min_chunkf, 1, MPI_INT, MPI_MIN, io_info->comm)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Allreduce(&num_chunkf, min_chunkf, 1, MPI_INT, MPI_MIN, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mpio_get_min_chunk() */
-
/*-------------------------------------------------------------------------
* Function: H5D__mpio_get_sum_chunk
*
@@ -423,30 +412,29 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
- int *sum_chunkf)
+H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, int *sum_chunkf)
{
- int num_chunkf; /* Number of chunks to iterate over */
+ int num_chunkf; /* Number of chunks to iterate over */
size_t ori_num_chunkf;
- int mpi_code; /* MPI return code */
+ int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
/* Get the number of chunks to perform I/O on */
- num_chunkf = 0;
+ num_chunkf = 0;
ori_num_chunkf = H5SL_count(fm->sel_chunks);
H5_CHECKED_ASSIGN(num_chunkf, int, ori_num_chunkf, size_t);
/* Determine the summation of number of chunks for all processes */
- if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&num_chunkf, sum_chunkf, 1, MPI_INT, MPI_SUM, io_info->comm)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Allreduce(&num_chunkf, sum_chunkf, 1, MPI_INT, MPI_SUM, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mpio_get_sum_chunk() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_collective_read
*
@@ -462,12 +450,12 @@ done:
*/
herr_t
H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
- H5P_genplist_t *dx_plist; /* Pointer to DXPL */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t * dx_plist; /* Pointer to DXPL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -476,24 +464,23 @@ H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_
HDassert(TRUE == H5P_isa_class(io_info->dxpl_id, H5P_DATASET_XFER));
/* Call generic internal collective I/O routine */
- if(H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
+ if (H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "couldn't finish shared collective MPI-IO")
/* Obtain the data transfer properties */
- if(NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
/* Set the actual I/O mode property. internal_collective_io will not break to
* independent I/O, so we set it here.
*/
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_collective_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__contig_collective_write
*
@@ -509,12 +496,12 @@ done:
*/
herr_t
H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
- H5P_genplist_t *dx_plist; /* Pointer to DXPL */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t * dx_plist; /* Pointer to DXPL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -523,24 +510,23 @@ H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type
HDassert(TRUE == H5P_isa_class(io_info->dxpl_id, H5P_DATASET_XFER));
/* Call generic internal collective I/O routine */
- if(H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
+ if (H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "couldn't finish shared collective MPI-IO")
/* Obtain the data transfer properties */
- if(NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
/* Set the actual I/O mode property. internal_collective_io will not break to
* independent I/O, so we set it here.
*/
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_collective_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_collective_io
*
@@ -578,17 +564,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- H5D_chunk_map_t *fm)
+H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm)
{
- H5P_genplist_t *dx_plist; /* Pointer to DXPL */
+ H5P_genplist_t * dx_plist; /* Pointer to DXPL */
H5FD_mpio_chunk_opt_t chunk_opt_mode;
- int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
- int sum_chunk = -1;
+ int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
+ int sum_chunk = -1;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- htri_t temp_not_link_io = FALSE;
+ htri_t temp_not_link_io = FALSE;
#endif
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -599,31 +584,33 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
HDassert(fm);
/* Obtain the data transfer properties */
- if(NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Check the optional property list on what to do with collective chunk IO. */
- chunk_opt_mode = (H5FD_mpio_chunk_opt_t)H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME);
- if(H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode)
- io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/
+ chunk_opt_mode = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME);
+ if (H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode)
+ io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/
/* direct request to multi-chunk-io */
- else if(H5FD_MPIO_CHUNK_MULTI_IO == chunk_opt_mode)
- io_option = H5D_MULTI_CHUNK_IO;
+ else if (H5FD_MPIO_CHUNK_MULTI_IO == chunk_opt_mode)
+ io_option = H5D_MULTI_CHUNK_IO;
/* via default path. branch by num threshold */
else {
- unsigned one_link_chunk_io_threshold; /* Threshhold to use single collective I/O for all chunks */
- int mpi_size; /* Number of processes in MPI job */
+ unsigned one_link_chunk_io_threshold; /* Threshhold to use single collective I/O for all chunks */
+ int mpi_size; /* Number of processes in MPI job */
- if(H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to obtain the total chunk number of all processes");
- if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
+ if (H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL,
+ "unable to obtain the total chunk number of all processes");
+ if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
one_link_chunk_io_threshold = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME);
/* step 1: choose an IO option */
- /* If the average number of chunk per process is greater than a threshold, we will do one link chunked IO. */
- if((unsigned)sum_chunk / mpi_size >= one_link_chunk_io_threshold)
+ /* If the average number of chunk per process is greater than a threshold, we will do one link chunked
+ * IO. */
+ if ((unsigned)sum_chunk / mpi_size >= one_link_chunk_io_threshold)
io_option = H5D_ONE_LINK_CHUNK_IO_MORE_OPT;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
else
@@ -632,63 +619,63 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
} /* end else */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
-{
- H5P_genplist_t *plist; /* Property list pointer */
- htri_t check_prop;
- int new_value;
-
- /* Get the dataset transfer property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
- HGOTO_ERROR(H5E_IO, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
-
- /*** Test collective chunk user-input optimization APIs. ***/
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME);
- if(check_prop > 0) {
- if(H5D_ONE_LINK_CHUNK_IO == io_option) {
- new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
- } /* end if */
- } /* end if */
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME);
- if(check_prop > 0) {
- if(H5D_MULTI_CHUNK_IO == io_option) {
- new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
- } /* end if */
- } /* end if */
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME);
- if(check_prop > 0) {
- if(H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) {
- new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
- } /* end if */
- } /* end if */
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME);
- if(check_prop > 0) {
- if(temp_not_link_io) {
- new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
- } /* end if */
- } /* end if */
-}
+ {
+ H5P_genplist_t *plist; /* Property list pointer */
+ htri_t check_prop;
+ int new_value;
+
+ /* Get the dataset transfer property list */
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
+ HGOTO_ERROR(H5E_IO, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
+
+ /*** Test collective chunk user-input optimization APIs. ***/
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME);
+ if (check_prop > 0) {
+ if (H5D_ONE_LINK_CHUNK_IO == io_option) {
+ new_value = 0;
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, &new_value) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
+ } /* end if */
+ } /* end if */
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME);
+ if (check_prop > 0) {
+ if (H5D_MULTI_CHUNK_IO == io_option) {
+ new_value = 0;
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, &new_value) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
+ } /* end if */
+ } /* end if */
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME);
+ if (check_prop > 0) {
+ if (H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) {
+ new_value = 0;
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, &new_value) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
+ } /* end if */
+ } /* end if */
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME);
+ if (check_prop > 0) {
+ if (temp_not_link_io) {
+ new_value = 0;
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, &new_value) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
+ } /* end if */
+ } /* end if */
+ }
#endif
/* step 2: Go ahead to do IO.*/
- if(H5D_ONE_LINK_CHUNK_IO == io_option || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) {
- if(H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk, dx_plist) < 0)
+ if (H5D_ONE_LINK_CHUNK_IO == io_option || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) {
+ if (H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk, dx_plist) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO")
} /* end if */
/* direct request to multi-chunk-io */
- else if(H5D_MULTI_CHUNK_IO == io_option) {
- if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
+ else if (H5D_MULTI_CHUNK_IO == io_option) {
+ if (H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO")
- } /* end if */
+ } /* end if */
else { /* multiple chunk IO via threshold */
- if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
+ if (H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO")
} /* end else */
@@ -696,7 +683,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_collective_io */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_collective_read
*
@@ -712,22 +698,21 @@ done:
*/
herr_t
H5D__chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Call generic selection operation */
- if(H5D__chunk_collective_io(io_info, type_info, fm) < 0)
+ if (H5D__chunk_collective_io(io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_collective_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_collective_write
*
@@ -743,22 +728,21 @@ done:
*/
herr_t
H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
+ const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Call generic selection operation */
- if(H5D__chunk_collective_io(io_info, type_info, fm) < 0)
+ if (H5D__chunk_collective_io(io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_collective_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__link_chunk_collective_io
*
@@ -774,53 +758,51 @@ done:
* Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
- * Modification:
- * - Set H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME and H5D_MPIO_ACTUAL_IO_MODE_NAME
- * dxpl in this.
- * Programmer: Jonathan Kim
- * Date: 2012-10-10
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- H5D_chunk_map_t *fm, int sum_chunk, H5P_genplist_t *dx_plist)
+H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm,
+ int sum_chunk, H5P_genplist_t *dx_plist)
{
H5D_chunk_addr_info_t *chunk_addr_info_array = NULL;
- MPI_Datatype chunk_final_mtype; /* Final memory MPI datatype for all chunks with seletion */
- hbool_t chunk_final_mtype_is_derived = FALSE;
- MPI_Datatype chunk_final_ftype; /* Final file MPI datatype for all chunks with seletion */
- hbool_t chunk_final_ftype_is_derived = FALSE;
- H5D_storage_t ctg_store; /* Storage info for "fake" contiguous dataset */
- size_t total_chunks;
- haddr_t *total_chunk_addr_array = NULL;
- MPI_Datatype *chunk_mtype = NULL;
- MPI_Datatype *chunk_ftype = NULL;
- MPI_Aint *chunk_disp_array = NULL;
- MPI_Aint *chunk_mem_disp_array = NULL;
- hbool_t *chunk_mft_is_derived_array = NULL; /* Flags to indicate each chunk's MPI file datatype is derived */
- hbool_t *chunk_mbt_is_derived_array = NULL; /* Flags to indicate each chunk's MPI memory datatype is derived */
- int *chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */
- int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */
- int mpi_code; /* MPI return code */
+ MPI_Datatype chunk_final_mtype; /* Final memory MPI datatype for all chunks with seletion */
+ hbool_t chunk_final_mtype_is_derived = FALSE;
+ MPI_Datatype chunk_final_ftype; /* Final file MPI datatype for all chunks with seletion */
+ hbool_t chunk_final_ftype_is_derived = FALSE;
+ H5D_storage_t ctg_store; /* Storage info for "fake" contiguous dataset */
+ size_t total_chunks;
+ haddr_t * total_chunk_addr_array = NULL;
+ MPI_Datatype * chunk_mtype = NULL;
+ MPI_Datatype * chunk_ftype = NULL;
+ MPI_Aint * chunk_disp_array = NULL;
+ MPI_Aint * chunk_mem_disp_array = NULL;
+ hbool_t * chunk_mft_is_derived_array =
+ NULL; /* Flags to indicate each chunk's MPI file datatype is derived */
+ hbool_t *chunk_mbt_is_derived_array =
+ NULL; /* Flags to indicate each chunk's MPI memory datatype is derived */
+ int *chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */
+ int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */
+ int mpi_code; /* MPI return code */
H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode = H5D_MPIO_LINK_CHUNK;
- H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CHUNK_COLLECTIVE;
- herr_t ret_value = SUCCEED;
+ H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CHUNK_COLLECTIVE;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
/* Set the actual-chunk-opt-mode property. */
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
/* Set the actual-io-mode property.
* Link chunk I/O does not break to independent, so can set right away */
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
/* Get the sum # of chunks, if not already available */
- if(sum_chunk < 0) {
- if(H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to obtain the total chunk number of all processes");
+ if (sum_chunk < 0) {
+ if (H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL,
+ "unable to obtain the total chunk number of all processes");
} /* end if */
/* Retrieve total # of chunks in dataset */
@@ -830,15 +812,15 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
* the dataset. [This sometimes is used by developers who want the
* equivalent of compressed contiguous datasets - QAK]
*/
- if(total_chunks == 1) {
- H5SL_node_t *chunk_node; /* Pointer to chunk node for selection */
- H5S_t *fspace; /* Dataspace describing chunk & selection in it */
- H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */
+ if (total_chunks == 1) {
+ H5SL_node_t *chunk_node; /* Pointer to chunk node for selection */
+ H5S_t * fspace; /* Dataspace describing chunk & selection in it */
+ H5S_t * mspace; /* Dataspace describing selection in memory corresponding to this chunk */
/* Check for this process having selection in this chunk */
chunk_node = H5SL_first(fm->sel_chunks);
- if(chunk_node == NULL) {
+ if (chunk_node == NULL) {
/* Set the dataspace info for I/O to NULL, this process doesn't have any I/O to perform */
fspace = mspace = NULL;
@@ -846,11 +828,11 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
ctg_store.contig.dset_addr = 0;
} /* end if */
else {
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
- H5D_chunk_info_t *chunk_info; /* Info for chunk in skiplist */
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ H5D_chunk_info_t *chunk_info; /* Info for chunk in skiplist */
/* Get the chunk info, for the selection in the chunk */
- if(NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node)))
+ if (NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node)))
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skip list")
/* Set the dataspace info for I/O */
@@ -858,8 +840,8 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
mspace = chunk_info->mspace;
/* Look up address of chunk */
- if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords,
- chunk_info->index, &udata) < 0)
+ if (H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index,
+ &udata) < 0)
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk address")
ctg_store.contig.dset_addr = udata.addr;
} /* end else */
@@ -868,69 +850,75 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
io_info->store = &ctg_store;
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before inter_collective_io for total chunk = 1 \n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before inter_collective_io for total chunk = 1 \n");
#endif
/* Perform I/O */
- if(H5D__inter_collective_io(io_info, type_info, fspace, mspace) < 0)
+ if (H5D__inter_collective_io(io_info, type_info, fspace, mspace) < 0)
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
} /* end if */
else {
- hsize_t mpi_buf_count; /* Number of MPI types */
- size_t num_chunk; /* Number of chunks for this process */
- size_t u; /* Local index variable */
+ hsize_t mpi_buf_count; /* Number of MPI types */
+ size_t num_chunk; /* Number of chunks for this process */
+ size_t u; /* Local index variable */
/* Get the number of chunks with a selection */
num_chunk = H5SL_count(fm->sel_chunks);
H5_CHECK_OVERFLOW(num_chunk, size_t, int);
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"total_chunks = %Zu, num_chunk = %Zu\n", total_chunks, num_chunk);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "total_chunks = %Zu, num_chunk = %Zu\n", total_chunks, num_chunk);
#endif
/* Set up MPI datatype for chunks selected */
- if(num_chunk) {
+ if (num_chunk) {
/* Allocate chunking information */
- if(NULL == (chunk_addr_info_array = (H5D_chunk_addr_info_t *)H5MM_malloc(num_chunk * sizeof(H5D_chunk_addr_info_t))))
+ if (NULL == (chunk_addr_info_array =
+ (H5D_chunk_addr_info_t *)H5MM_malloc(num_chunk * sizeof(H5D_chunk_addr_info_t))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk array buffer")
- if(NULL == (chunk_mtype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory datatype buffer")
- if(NULL == (chunk_ftype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype))))
+ if (NULL == (chunk_mtype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate chunk memory datatype buffer")
+ if (NULL == (chunk_ftype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file datatype buffer")
- if(NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc(num_chunk * sizeof(MPI_Aint))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file displacement buffer")
- if(NULL == (chunk_mem_disp_array = (MPI_Aint *)H5MM_calloc(num_chunk * sizeof(MPI_Aint))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory displacement buffer")
- if(NULL == (chunk_mpi_mem_counts = (int *)H5MM_calloc(num_chunk * sizeof(int))))
+ if (NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc(num_chunk * sizeof(MPI_Aint))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate chunk file displacement buffer")
+ if (NULL == (chunk_mem_disp_array = (MPI_Aint *)H5MM_calloc(num_chunk * sizeof(MPI_Aint))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate chunk memory displacement buffer")
+ if (NULL == (chunk_mpi_mem_counts = (int *)H5MM_calloc(num_chunk * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory counts buffer")
- if(NULL == (chunk_mpi_file_counts = (int *)H5MM_calloc(num_chunk * sizeof(int))))
+ if (NULL == (chunk_mpi_file_counts = (int *)H5MM_calloc(num_chunk * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file counts buffer")
- if(NULL == (chunk_mbt_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory is derived datatype flags buffer")
- if(NULL == (chunk_mft_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file is derived datatype flags buffer")
+ if (NULL == (chunk_mbt_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate chunk memory is derived datatype flags buffer")
+ if (NULL == (chunk_mft_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate chunk file is derived datatype flags buffer")
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before sorting the chunk address \n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before sorting the chunk address \n");
#endif
/* Sort the chunk address */
- if(H5D__sort_chunk(io_info, fm, chunk_addr_info_array, sum_chunk) < 0)
+ if (H5D__sort_chunk(io_info, fm, chunk_addr_info_array, sum_chunk) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to sort chunk address")
ctg_store.contig.dset_addr = chunk_addr_info_array[0].chunk_addr;
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"after sorting the chunk address \n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "after sorting the chunk address \n");
#endif
/* Obtain MPI derived datatype from all individual chunks */
- for(u = 0; u < num_chunk; u++) {
- hsize_t *permute_map = NULL; /* array that holds the mapping from the old,
- out-of-order displacements to the in-order
- displacements of the MPI datatypes of the
+ for (u = 0; u < num_chunk; u++) {
+ hsize_t *permute_map = NULL; /* array that holds the mapping from the old,
+ out-of-order displacements to the in-order
+ displacements of the MPI datatypes of the
point selection of the file space */
hbool_t is_permuted = FALSE;
@@ -939,46 +927,43 @@ if(H5DEBUG(D))
* and will be fed into the next call to H5S_mpio_space_type
* where it will be freed.
*/
- if(H5S_mpio_space_type(chunk_addr_info_array[u].chunk_info.fspace,
- type_info->src_type_size,
- &chunk_ftype[u], /* OUT: datatype created */
- &chunk_mpi_file_counts[u], /* OUT */
- &(chunk_mft_is_derived_array[u]), /* OUT */
- TRUE, /* this is a file space,
- so permute the
- datatype if the point
- selections are out of
- order */
- &permute_map,/* OUT: a map to indicate the
- permutation of points
- selected in case they
- are out of order */
- &is_permuted /* OUT */) < 0)
+ if (H5S_mpio_space_type(chunk_addr_info_array[u].chunk_info.fspace, type_info->src_type_size,
+ &chunk_ftype[u], /* OUT: datatype created */
+ &chunk_mpi_file_counts[u], /* OUT */
+ &(chunk_mft_is_derived_array[u]), /* OUT */
+ TRUE, /* this is a file space,
+ so permute the
+ datatype if the point
+ selections are out of
+ order */
+ &permute_map, /* OUT: a map to indicate the
+ permutation of points
+ selected in case they
+ are out of order */
+ &is_permuted /* OUT */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type")
/* Sanity check */
- if(is_permuted)
+ if (is_permuted)
HDassert(permute_map);
- if(H5S_mpio_space_type(chunk_addr_info_array[u].chunk_info.mspace,
- type_info->dst_type_size, &chunk_mtype[u],
- &chunk_mpi_mem_counts[u],
- &(chunk_mbt_is_derived_array[u]),
- FALSE, /* this is a memory
- space, so if the file
- space is not
- permuted, there is no
- need to permute the
- datatype if the point
- selections are out of
- order*/
- &permute_map, /* IN: the permutation map
- generated by the
- file_space selection
- and applied to the
- memory selection */
- &is_permuted /* IN */) < 0)
+ if (H5S_mpio_space_type(chunk_addr_info_array[u].chunk_info.mspace, type_info->dst_type_size,
+ &chunk_mtype[u], &chunk_mpi_mem_counts[u],
+ &(chunk_mbt_is_derived_array[u]), FALSE, /* this is a memory
+ space, so if the file
+ space is not
+ permuted, there is no
+ need to permute the
+ datatype if the point
+ selections are out of
+ order*/
+ &permute_map, /* IN: the permutation map
+ generated by the
+ file_space selection
+ and applied to the
+ memory selection */
+ &is_permuted /* IN */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type")
/* Sanity check */
- if(is_permuted)
+ if (is_permuted)
HDassert(!permute_map);
/* Chunk address relative to the first chunk */
@@ -990,46 +975,51 @@ if(H5DEBUG(D))
} /* end for */
/* Create final MPI derived datatype for the file */
- if(MPI_SUCCESS != (mpi_code = MPI_Type_create_struct((int)num_chunk, chunk_mpi_file_counts, chunk_disp_array, chunk_ftype, &chunk_final_ftype)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Type_create_struct((int)num_chunk, chunk_mpi_file_counts, chunk_disp_array,
+ chunk_ftype, &chunk_final_ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_ftype)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
chunk_final_ftype_is_derived = TRUE;
/* Create final MPI derived datatype for memory */
- if(MPI_SUCCESS != (mpi_code = MPI_Type_create_struct((int)num_chunk, chunk_mpi_mem_counts, chunk_mem_disp_array, chunk_mtype, &chunk_final_mtype)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Type_create_struct((int)num_chunk, chunk_mpi_mem_counts, chunk_mem_disp_array,
+ chunk_mtype, &chunk_final_mtype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_mtype)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_mtype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
chunk_final_mtype_is_derived = TRUE;
/* Free the file & memory MPI datatypes for each chunk */
- for(u = 0; u < num_chunk; u++) {
- if(chunk_mbt_is_derived_array[u])
- if(MPI_SUCCESS != (mpi_code = MPI_Type_free(chunk_mtype + u)))
+ for (u = 0; u < num_chunk; u++) {
+ if (chunk_mbt_is_derived_array[u])
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_free(chunk_mtype + u)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- if(chunk_mft_is_derived_array[u])
- if(MPI_SUCCESS != (mpi_code = MPI_Type_free(chunk_ftype + u)))
+ if (chunk_mft_is_derived_array[u])
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_free(chunk_ftype + u)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
} /* end for */
/* We have a single, complicated MPI datatype for both memory & file */
- mpi_buf_count = (hsize_t)1;
- } /* end if */
- else { /* no selection at all for this process */
+ mpi_buf_count = (hsize_t)1;
+ } /* end if */
+ else { /* no selection at all for this process */
/* Allocate chunking information */
- if(NULL == (total_chunk_addr_array = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * total_chunks)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate total chunk address arraybuffer")
+ if (NULL == (total_chunk_addr_array = (haddr_t *)H5MM_malloc(sizeof(haddr_t) * total_chunks)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
+ "couldn't allocate total chunk address arraybuffer")
/* Retrieve chunk address map */
- if(H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
+ if (H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Get chunk with lowest address */
ctg_store.contig.dset_addr = HADDR_MAX;
- for(u = 0; u < total_chunks; u++)
- if(total_chunk_addr_array[u] < ctg_store.contig.dset_addr)
+ for (u = 0; u < total_chunks; u++)
+ if (total_chunk_addr_array[u] < ctg_store.contig.dset_addr)
ctg_store.contig.dset_addr = total_chunk_addr_array[u];
HDassert(ctg_store.contig.dset_addr != HADDR_MAX);
@@ -1038,58 +1028,59 @@ if(H5DEBUG(D))
chunk_final_mtype = MPI_BYTE;
/* No chunks selected for this process */
- mpi_buf_count = (hsize_t)0;
+ mpi_buf_count = (hsize_t)0;
} /* end else */
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before coming to final collective IO\n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before coming to final collective IO\n");
#endif
/* Set up the base storage address for this chunk */
io_info->store = &ctg_store;
/* Perform final collective I/O operation */
- if(H5D__final_collective_io(io_info, type_info, mpi_buf_count, &chunk_final_ftype, &chunk_final_mtype) < 0)
+ if (H5D__final_collective_io(io_info, type_info, mpi_buf_count, &chunk_final_ftype,
+ &chunk_final_mtype) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish MPI-IO")
} /* end else */
done:
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before freeing memory inside H5D_link_collective_io ret_value = %d\n", ret_value);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before freeing memory inside H5D_link_collective_io ret_value = %d\n",
+ ret_value);
#endif
/* Release resources */
- if(total_chunk_addr_array)
+ if (total_chunk_addr_array)
H5MM_xfree(total_chunk_addr_array);
- if(chunk_addr_info_array)
+ if (chunk_addr_info_array)
H5MM_xfree(chunk_addr_info_array);
- if(chunk_mtype)
+ if (chunk_mtype)
H5MM_xfree(chunk_mtype);
- if(chunk_ftype)
+ if (chunk_ftype)
H5MM_xfree(chunk_ftype);
- if(chunk_disp_array)
+ if (chunk_disp_array)
H5MM_xfree(chunk_disp_array);
- if(chunk_mem_disp_array)
+ if (chunk_mem_disp_array)
H5MM_xfree(chunk_mem_disp_array);
- if(chunk_mpi_mem_counts)
+ if (chunk_mpi_mem_counts)
H5MM_xfree(chunk_mpi_mem_counts);
- if(chunk_mpi_file_counts)
+ if (chunk_mpi_file_counts)
H5MM_xfree(chunk_mpi_file_counts);
- if(chunk_mbt_is_derived_array)
+ if (chunk_mbt_is_derived_array)
H5MM_xfree(chunk_mbt_is_derived_array);
- if(chunk_mft_is_derived_array)
+ if (chunk_mft_is_derived_array)
H5MM_xfree(chunk_mft_is_derived_array);
/* Free the MPI buf and file types, if they were derived */
- if(chunk_final_mtype_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&chunk_final_mtype)))
+ if (chunk_final_mtype_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&chunk_final_mtype)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- if(chunk_final_ftype_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&chunk_final_ftype)))
+ if (chunk_final_ftype_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&chunk_final_ftype)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__link_chunk_collective_io */
-
/*-------------------------------------------------------------------------
* Function: H5D__multi_chunk_collective_io
*
@@ -1105,41 +1096,40 @@ if(H5DEBUG(D))
* Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
- * Modification:
- * - Set H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME dxpl in this to go along with
- * setting H5D_MPIO_ACTUAL_IO_MODE_NAME dxpl at the bottom.
- * Programmer: Jonathan Kim
- * Date: 2012-10-10
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
+H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm,
+ H5P_genplist_t *dx_plist)
{
- H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
- H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
- H5D_io_info_t cpt_io_info; /* Compact I/O info object */
- H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
- hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
- uint8_t *chunk_io_option = NULL;
- haddr_t *chunk_addr = NULL;
- H5D_storage_t store; /* union of EFL and chunk pointer in file space */
- H5FD_mpio_xfer_t last_xfer_mode = H5FD_MPIO_COLLECTIVE; /* Last parallel transfer for this request (H5D_XFER_IO_XFER_MODE_NAME) */
- H5FD_mpio_collective_opt_t last_coll_opt_mode = H5FD_MPIO_COLLECTIVE_IO; /* Last parallel transfer with independent IO or collective IO with this mode */
- size_t total_chunk; /* Total # of chunks in dataset */
+ H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
+ H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
+ H5D_io_info_t cpt_io_info; /* Compact I/O info object */
+ H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
+ hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
+ uint8_t * chunk_io_option = NULL;
+ haddr_t * chunk_addr = NULL;
+ H5D_storage_t store; /* union of EFL and chunk pointer in file space */
+ H5FD_mpio_xfer_t last_xfer_mode =
+ H5FD_MPIO_COLLECTIVE; /* Last parallel transfer for this request (H5D_XFER_IO_XFER_MODE_NAME) */
+ H5FD_mpio_collective_opt_t last_coll_opt_mode =
+ H5FD_MPIO_COLLECTIVE_IO; /* Last parallel transfer with independent IO or collective IO with this mode
+ */
+ size_t total_chunk; /* Total # of chunks in dataset */
#ifdef H5Dmpio_DEBUG
int mpi_rank;
#endif
- size_t u; /* Local index variable */
- H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode = H5D_MPIO_MULTI_CHUNK; /* actual chunk optimization mode */
- H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_NO_COLLECTIVE; /* Local variable for tracking the I/O mode used. */
- herr_t ret_value = SUCCEED;
+ size_t u; /* Local index variable */
+ H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode =
+ H5D_MPIO_MULTI_CHUNK; /* actual chunk optimization mode */
+ H5D_mpio_actual_io_mode_t actual_io_mode =
+ H5D_MPIO_NO_COLLECTIVE; /* Local variable for tracking the I/O mode used. */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
/* Set the actual chunk opt mode property */
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
#ifdef H5Dmpio_DEBUG
@@ -1154,17 +1144,17 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty
chunk_io_option = (uint8_t *)H5MM_calloc(total_chunk);
chunk_addr = (haddr_t *)H5MM_calloc(total_chunk * sizeof(haddr_t));
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D), "total_chunk %Zu\n", total_chunk);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "total_chunk %Zu\n", total_chunk);
#endif
/* Obtain IO option for each chunk */
- if(H5D__obtain_mpio_mode(io_info, fm, dx_plist, chunk_io_option, chunk_addr) < 0)
+ if (H5D__obtain_mpio_mode(io_info, fm, dx_plist, chunk_io_option, chunk_addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "unable to obtain MPIO mode")
/* Set up contiguous I/O info object */
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- ctg_io_info.store = &ctg_store;
+ ctg_io_info.store = &ctg_store;
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
/* Initialize temporary contiguous storage info */
@@ -1172,7 +1162,7 @@ if(H5DEBUG(D))
/* Set up compact I/O info object */
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- cpt_io_info.store = &cpt_store;
+ cpt_io_info.store = &cpt_store;
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
/* Initialize temporary compact storage info */
@@ -1182,39 +1172,40 @@ if(H5DEBUG(D))
io_info->store = &store;
/* Loop over _all_ the chunks */
- for(u = 0; u < total_chunk; u++) {
- H5D_chunk_info_t *chunk_info; /* Chunk info for current chunk */
- H5S_t *fspace; /* Dataspace describing chunk & selection in it */
- H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */
+ for (u = 0; u < total_chunk; u++) {
+ H5D_chunk_info_t *chunk_info; /* Chunk info for current chunk */
+ H5S_t * fspace; /* Dataspace describing chunk & selection in it */
+ H5S_t * mspace; /* Dataspace describing selection in memory corresponding to this chunk */
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u);
#endif
/* Get the chunk info for this chunk, if there are elements selected */
chunk_info = fm->select_chunk[u];
/* Set the storage information for chunks with selections */
- if(chunk_info) {
+ if (chunk_info) {
HDassert(chunk_info->index == u);
/* Pass in chunk's coordinates in a union. */
- store.chunk.offset = chunk_info->coords;
- store.chunk.index = chunk_info->index;
+ store.chunk.offset = chunk_info->coords;
+ store.chunk.index = chunk_info->index;
} /* end if */
/* Collective IO for this chunk,
* Note: even there is no selection for this process, the process still
* needs to contribute MPI NONE TYPE.
*/
- if(chunk_io_option[u] == H5D_CHUNK_IO_MODE_COL) {
+ if (chunk_io_option[u] == H5D_CHUNK_IO_MODE_COL) {
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"inside collective chunk IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "inside collective chunk IO mpi_rank = %d, chunk index = %Zu\n",
+ mpi_rank, u);
#endif
/* Set the file & memory dataspaces */
- if(chunk_info) {
+ if (chunk_info) {
fspace = chunk_info->fspace;
mspace = chunk_info->mspace;
@@ -1232,13 +1223,13 @@ if(H5DEBUG(D))
} /* end else */
/* Switch back to collective I/O */
- if(last_xfer_mode != H5FD_MPIO_COLLECTIVE) {
- if(H5D__ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
+ if (last_xfer_mode != H5FD_MPIO_COLLECTIVE) {
+ if (H5D__ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to collective I/O")
last_xfer_mode = H5FD_MPIO_COLLECTIVE;
} /* end if */
- if(last_coll_opt_mode != H5FD_MPIO_COLLECTIVE_IO) {
- if(H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE_IO) < 0)
+ if (last_coll_opt_mode != H5FD_MPIO_COLLECTIVE_IO) {
+ if (H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE_IO) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to collective I/O")
last_coll_opt_mode = H5FD_MPIO_COLLECTIVE_IO;
} /* end if */
@@ -1247,19 +1238,20 @@ if(H5DEBUG(D))
ctg_store.contig.dset_addr = chunk_addr[u];
/* Perform the I/O */
- if(H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
+ if (H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
- } /* end if */
- else { /* possible independent IO for this chunk */
+ } /* end if */
+ else { /* possible independent IO for this chunk */
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"inside independent IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "inside independent IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank,
+ u);
#endif
HDassert(chunk_io_option[u] == 0);
/* Set the file & memory dataspaces */
- if(chunk_info) {
+ if (chunk_info) {
fspace = chunk_info->fspace;
mspace = chunk_info->mspace;
@@ -1271,8 +1263,8 @@ if(H5DEBUG(D))
} /* end else */
/* Using independent I/O with file setview.*/
- if(last_coll_opt_mode != H5FD_MPIO_INDIVIDUAL_IO) {
- if(H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_INDIVIDUAL_IO) < 0)
+ if (last_coll_opt_mode != H5FD_MPIO_INDIVIDUAL_IO) {
+ if (H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_INDIVIDUAL_IO) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to individual I/O")
last_coll_opt_mode = H5FD_MPIO_INDIVIDUAL_IO;
} /* end if */
@@ -1281,29 +1273,28 @@ if(H5DEBUG(D))
ctg_store.contig.dset_addr = chunk_addr[u];
/* Perform the I/O */
- if(H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
+ if (H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
#ifdef H5D_DEBUG
- if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"after inter collective IO\n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "after inter collective IO\n");
#endif
} /* end else */
- } /* end for */
+ } /* end for */
/* Write the local value of actual io mode to the DXPL. */
- if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ if (H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
done:
- if(chunk_io_option)
+ if (chunk_io_option)
H5MM_xfree(chunk_io_option);
- if(chunk_addr)
+ if (chunk_addr)
H5MM_xfree(chunk_addr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__multi_chunk_collective_io */
-
/*-------------------------------------------------------------------------
* Function: H5D__inter_collective_io
*
@@ -1318,23 +1309,23 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- const H5S_t *file_space, const H5S_t *mem_space)
+H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space,
+ const H5S_t *mem_space)
{
- int mpi_buf_count; /* # of MPI types */
- hbool_t mbt_is_derived = FALSE;
- hbool_t mft_is_derived = FALSE;
- MPI_Datatype mpi_file_type, mpi_buf_type;
- int mpi_code; /* MPI return code */
- herr_t ret_value = SUCCEED; /* return value */
+ int mpi_buf_count; /* # of MPI types */
+ hbool_t mbt_is_derived = FALSE;
+ hbool_t mft_is_derived = FALSE;
+ MPI_Datatype mpi_file_type, mpi_buf_type;
+ int mpi_code; /* MPI return code */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_STATIC
- if((file_space != NULL) && (mem_space != NULL)) {
- int mpi_file_count; /* Number of file "objects" to transfer */
- hsize_t *permute_map = NULL; /* array that holds the mapping from the old,
- out-of-order displacements to the in-order
- displacements of the MPI datatypes of the
+ if ((file_space != NULL) && (mem_space != NULL)) {
+ int mpi_file_count; /* Number of file "objects" to transfer */
+ hsize_t *permute_map = NULL; /* array that holds the mapping from the old,
+ out-of-order displacements to the in-order
+ displacements of the MPI datatypes of the
point selection of the file space */
hbool_t is_permuted = FALSE;
@@ -1343,39 +1334,40 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
* and will be fed into the next call to H5S_mpio_space_type
* where it will be freed.
*/
- if(H5S_mpio_space_type(file_space, type_info->src_type_size,
- &mpi_file_type, &mpi_file_count, &mft_is_derived, /* OUT: datatype created */
- TRUE, /* this is a file space, so
- permute the datatype if the
- point selection is out of
- order */
- &permute_map, /* OUT: a map to indicate
- the permutation of
- points selected in
- case they are out of
- order */
- &is_permuted /* OUT */) < 0)
+ if (H5S_mpio_space_type(file_space, type_info->src_type_size, &mpi_file_type, &mpi_file_count,
+ &mft_is_derived, /* OUT: datatype created */
+ TRUE, /* this is a file space, so
+ permute the datatype if the
+ point selection is out of
+ order */
+ &permute_map, /* OUT: a map to indicate
+ the permutation of
+ points selected in
+ case they are out of
+ order */
+ &is_permuted /* OUT */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type")
/* Sanity check */
- if(is_permuted)
+ if (is_permuted)
HDassert(permute_map);
- if(H5S_mpio_space_type(mem_space, type_info->src_type_size,
- &mpi_buf_type, &mpi_buf_count, &mbt_is_derived, /* OUT: datatype created */
- FALSE, /* this is a memory space, so if
- the file space is not
- permuted, there is no need to
- permute the datatype if the
- point selections are out of
- order*/
- &permute_map /* IN: the permutation map
- generated by the
- file_space selection
- and applied to the
- memory selection */,
- &is_permuted /* IN */) < 0)
+ if (H5S_mpio_space_type(mem_space, type_info->src_type_size, &mpi_buf_type, &mpi_buf_count,
+ &mbt_is_derived, /* OUT: datatype created */
+ FALSE, /* this is a memory space, so if
+ the file space is not
+ permuted, there is no need to
+ permute the datatype if the
+ point selections are out of
+ order*/
+ &permute_map /* IN: the permutation map
+ generated by the
+ file_space selection
+ and applied to the
+ memory selection */
+ ,
+ &is_permuted /* IN */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buffer type")
/* Sanity check */
- if(is_permuted)
+ if (is_permuted)
HDassert(!permute_map);
} /* end if */
else {
@@ -1388,30 +1380,30 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
} /* end else */
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before final collective IO \n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before final collective IO \n");
#endif
/* Perform final collective I/O operation */
- if(H5D__final_collective_io(io_info, type_info, (hsize_t)mpi_buf_count, &mpi_file_type, &mpi_buf_type) < 0)
+ if (H5D__final_collective_io(io_info, type_info, (hsize_t)mpi_buf_count, &mpi_file_type, &mpi_buf_type) <
+ 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish collective MPI-IO")
done:
/* Free the MPI buf and file types, if they were derived */
- if(mbt_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mpi_buf_type)))
+ if (mbt_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mpi_buf_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- if(mft_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mpi_file_type)))
+ if (mft_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mpi_file_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"before leaving inter_collective_io ret_value = %d\n",ret_value);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before leaving inter_collective_io ret_value = %d\n", ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__inter_collective_io() */
-
/*-------------------------------------------------------------------------
* Function: H5D__final_collective_io
*
@@ -1425,35 +1417,34 @@ if(H5DEBUG(D))
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t mpi_buf_count, MPI_Datatype *mpi_file_type, MPI_Datatype *mpi_buf_type)
+H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t mpi_buf_count,
+ MPI_Datatype *mpi_file_type, MPI_Datatype *mpi_buf_type)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
/* Pass buf type, file type to the file driver. */
- if(H5FD_mpi_setup_collective(io_info->dxpl_id, mpi_buf_type, mpi_file_type) < 0)
+ if (H5FD_mpi_setup_collective(io_info->dxpl_id, mpi_buf_type, mpi_file_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O properties")
- if(io_info->op_type == H5D_IO_OP_WRITE) {
- if((io_info->io_ops.single_write)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
+ if (io_info->op_type == H5D_IO_OP_WRITE) {
+ if ((io_info->io_ops.single_write)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed")
} /* end if */
else {
- if((io_info->io_ops.single_read)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
+ if ((io_info->io_ops.single_read)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "optimized read failed")
} /* end else */
done:
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D),"ret_value before leaving final_collective_io=%d\n",ret_value);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "ret_value before leaving final_collective_io=%d\n", ret_value);
#endif
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__final_collective_io */
-
/*-------------------------------------------------------------------------
* Function: H5D__cmp_chunk_addr
*
@@ -1471,17 +1462,16 @@ if(H5DEBUG(D))
static int
H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
{
- haddr_t addr1, addr2;
+ haddr_t addr1 = HADDR_UNDEF, addr2 = HADDR_UNDEF;
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_STATIC_NOERR
- addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
- addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
+ addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
+ addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
- FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2))
+ FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2))
} /* end H5D__cmp_chunk_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5D__sort_chunk
*
@@ -1496,8 +1486,8 @@ H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
* Parameters:
* Input: H5D_io_info_t* io_info,
* H5D_chunk_map_t *fm(global chunk map struct)
- * Input/Output: H5D_chunk_addr_info_t chunk_addr_info_array[] : array to store chunk address and information
- * many_chunk_opt : flag to optimize the way to obtain chunk addresses
+ * Input/Output: H5D_chunk_addr_info_t chunk_addr_info_array[] : array to store chunk address
+ *and information many_chunk_opt : flag to optimize the way to obtain chunk addresses
* for many chunks
*
* Return: Non-negative on success/Negative on failure
@@ -1509,24 +1499,24 @@ H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
*/
static herr_t
H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
- H5D_chunk_addr_info_t chunk_addr_info_array[], int sum_chunk)
+ H5D_chunk_addr_info_t chunk_addr_info_array[], int sum_chunk)
{
- H5SL_node_t *chunk_node; /* Current node in chunk skip list */
- H5D_chunk_info_t *chunk_info; /* Current chunking info. of this node. */
- haddr_t chunk_addr; /* Current chunking address of this node */
- haddr_t *total_chunk_addr_array = NULL; /* The array of chunk address for the total number of chunk */
- hbool_t do_sort = FALSE; /* Whether the addresses need to be sorted */
- int bsearch_coll_chunk_threshold;
- int many_chunk_opt = H5D_OBTAIN_ONE_CHUNK_ADDR_IND;
- int mpi_size; /* Number of MPI processes */
- int mpi_code; /* MPI return code */
- int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5SL_node_t * chunk_node; /* Current node in chunk skip list */
+ H5D_chunk_info_t *chunk_info; /* Current chunking info. of this node. */
+ haddr_t chunk_addr; /* Current chunking address of this node */
+ haddr_t *total_chunk_addr_array = NULL; /* The array of chunk address for the total number of chunk */
+ hbool_t do_sort = FALSE; /* Whether the addresses need to be sorted */
+ int bsearch_coll_chunk_threshold;
+ int many_chunk_opt = H5D_OBTAIN_ONE_CHUNK_ADDR_IND;
+ int mpi_size; /* Number of MPI processes */
+ int mpi_code; /* MPI return code */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Retrieve # of MPI processes */
- if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
+ if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Calculate the actual threshold to obtain all chunk addresses collectively
@@ -1538,57 +1528,60 @@ H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
* for each process.
*/
bsearch_coll_chunk_threshold = (sum_chunk * 100) / ((int)fm->layout->u.chunk.nchunks * mpi_size);
- if((bsearch_coll_chunk_threshold > H5D_ALL_CHUNK_ADDR_THRES_COL)
- && ((sum_chunk / mpi_size) >= H5D_ALL_CHUNK_ADDR_THRES_COL_NUM))
+ if ((bsearch_coll_chunk_threshold > H5D_ALL_CHUNK_ADDR_THRES_COL) &&
+ ((sum_chunk / mpi_size) >= H5D_ALL_CHUNK_ADDR_THRES_COL_NUM))
many_chunk_opt = H5D_OBTAIN_ALL_CHUNK_ADDR_COL;
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D), "many_chunk_opt= %d\n", many_chunk_opt);
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "many_chunk_opt= %d\n", many_chunk_opt);
#endif
/* If we need to optimize the way to obtain the chunk address */
- if(many_chunk_opt != H5D_OBTAIN_ONE_CHUNK_ADDR_IND) {
+ if (many_chunk_opt != H5D_OBTAIN_ONE_CHUNK_ADDR_IND) {
int mpi_rank;
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D), "Coming inside H5D_OBTAIN_ALL_CHUNK_ADDR_COL\n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "Coming inside H5D_OBTAIN_ALL_CHUNK_ADDR_COL\n");
#endif
/* Allocate array for chunk addresses */
- if(NULL == (total_chunk_addr_array = H5MM_malloc(sizeof(haddr_t) * (size_t)fm->layout->u.chunk.nchunks)))
+ if (NULL ==
+ (total_chunk_addr_array = H5MM_malloc(sizeof(haddr_t) * (size_t)fm->layout->u.chunk.nchunks)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory chunk address array")
/* Retrieve all the chunk addresses with process 0 */
- if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
+ if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
- if(mpi_rank == 0) {
- if(H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
+ if (mpi_rank == 0) {
+ if (H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
} /* end if */
/* Broadcasting the MPI_IO option info. and chunk address info. */
- if(MPI_SUCCESS != (mpi_code = MPI_Bcast(total_chunk_addr_array, (int)(sizeof(haddr_t) * fm->layout->u.chunk.nchunks), MPI_BYTE, (int)0, io_info->comm)))
- HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
+ if (MPI_SUCCESS != (mpi_code = MPI_Bcast(total_chunk_addr_array,
+ (int)(sizeof(haddr_t) * fm->layout->u.chunk.nchunks),
+ MPI_BYTE, (int)0, io_info->comm)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
} /* end if */
/* Start at first node in chunk skip list */
i = 0;
- if(NULL == (chunk_node = H5SL_first(fm->sel_chunks)))
- HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL,"couldn't get chunk node from skipped list")
+ if (NULL == (chunk_node = H5SL_first(fm->sel_chunks)))
+ HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk node from skipped list")
/* Iterate over all chunks for this process */
- while(chunk_node) {
- if(NULL == (chunk_info = H5SL_item(chunk_node)))
- HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL,"couldn't get chunk info from skipped list")
+ while (chunk_node) {
+ if (NULL == (chunk_info = H5SL_item(chunk_node)))
+ HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
- if(many_chunk_opt == H5D_OBTAIN_ONE_CHUNK_ADDR_IND) {
- H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ if (many_chunk_opt == H5D_OBTAIN_ONE_CHUNK_ADDR_IND) {
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
/* Get address of chunk */
- if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id,
- chunk_info->coords, chunk_info->index, &udata) < 0)
+ if (H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords, chunk_info->index,
+ &udata) < 0)
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
chunk_addr = udata.addr;
} /* end if */
@@ -1596,7 +1589,7 @@ if(H5DEBUG(D))
chunk_addr = total_chunk_addr_array[chunk_info->index];
/* Check if chunk addresses are not in increasing order in the file */
- if(i > 0 && chunk_addr < chunk_addr_info_array[i - 1].chunk_addr)
+ if (i > 0 && chunk_addr < chunk_addr_info_array[i - 1].chunk_addr)
do_sort = TRUE;
/* Set the address & info for this chunk */
@@ -1609,23 +1602,22 @@ if(H5DEBUG(D))
} /* end while */
#ifdef H5D_DEBUG
-if(H5DEBUG(D))
- HDfprintf(H5DEBUG(D), "before Qsort\n");
+ if (H5DEBUG(D))
+ HDfprintf(H5DEBUG(D), "before Qsort\n");
#endif
- if(do_sort) {
+ if (do_sort) {
size_t num_chunks = H5SL_count(fm->sel_chunks);
HDqsort(chunk_addr_info_array, num_chunks, sizeof(chunk_addr_info_array[0]), H5D__cmp_chunk_addr);
} /* end if */
done:
- if(total_chunk_addr_array)
+ if (total_chunk_addr_array)
H5MM_xfree(total_chunk_addr_array);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__sort_chunk() */
-
/*-------------------------------------------------------------------------
* Function: H5D__obtain_mpio_mode
*
@@ -1646,7 +1638,8 @@ done:
* c) Build MPI derived datatype to combine "chunk address" and "assign_io" information
* in order to do MPI Bcast only once
* d) MPI Bcast the IO mode and chunk address information for each chunk.
- * 4) Each process then retrieves IO mode and chunk address information to assign_io_mode and chunk_addr.
+ * 4) Each process then retrieves IO mode and chunk address information to assign_io_mode and
+ *chunk_addr.
*
* Parameters:
*
@@ -1663,109 +1656,109 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
- H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[])
+H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist,
+ uint8_t assign_io_mode[], haddr_t chunk_addr[])
{
int total_chunks;
unsigned percent_nproc_per_chunk, threshold_nproc_per_chunk;
- uint8_t* io_mode_info = NULL;
- uint8_t* recv_io_mode_info = NULL;
- uint8_t* mergebuf = NULL;
- uint8_t* tempbuf;
- H5SL_node_t* chunk_node;
- H5D_chunk_info_t* chunk_info;
+ uint8_t * io_mode_info = NULL;
+ uint8_t * recv_io_mode_info = NULL;
+ uint8_t * mergebuf = NULL;
+ uint8_t * tempbuf;
+ H5SL_node_t * chunk_node;
+ H5D_chunk_info_t *chunk_info;
int mpi_size, mpi_rank;
MPI_Comm comm;
int ic, root;
int mpi_code;
- hbool_t mem_cleanup = FALSE;
+ hbool_t mem_cleanup = FALSE;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- int new_value;
+ int new_value;
htri_t check_prop;
#endif
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
/* Assign the rank 0 to the root */
- root = 0;
- comm = io_info->comm;
+ root = 0;
+ comm = io_info->comm;
/* Obtain the number of process and the current rank of the process */
- if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
+ if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
- if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
+ if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Setup parameters */
H5_CHECKED_ASSIGN(total_chunks, int, fm->layout->u.chunk.nchunks, hsize_t);
percent_nproc_per_chunk = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME);
/* if ratio is 0, perform collective io */
- if(0 == percent_nproc_per_chunk) {
- if(H5D__chunk_addrmap(io_info, chunk_addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address");
- for(ic = 0; ic < total_chunks; ic++)
- assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
+ if (0 == percent_nproc_per_chunk) {
+ if (H5D__chunk_addrmap(io_info, chunk_addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address");
+ for (ic = 0; ic < total_chunks; ic++)
+ assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
HGOTO_DONE(SUCCEED)
} /* end if */
- threshold_nproc_per_chunk = mpi_size * percent_nproc_per_chunk/100;
+ threshold_nproc_per_chunk = mpi_size * percent_nproc_per_chunk / 100;
/* Allocate memory */
- io_mode_info = (uint8_t *)H5MM_calloc(total_chunks);
- mergebuf = H5MM_malloc((sizeof(haddr_t) + 1) * total_chunks);
- tempbuf = mergebuf + total_chunks;
- if(mpi_rank == root)
+ io_mode_info = (uint8_t *)H5MM_calloc(total_chunks);
+ mergebuf = H5MM_malloc((sizeof(haddr_t) + 1) * total_chunks);
+ tempbuf = mergebuf + total_chunks;
+ if (mpi_rank == root)
recv_io_mode_info = (uint8_t *)H5MM_malloc(total_chunks * mpi_size);
- mem_cleanup = TRUE;
+ mem_cleanup = TRUE;
/* Obtain the regularity and selection information for all chunks in this process. */
- chunk_node = H5SL_first(fm->sel_chunks);
- while(chunk_node) {
- chunk_info = H5SL_item(chunk_node);
+ chunk_node = H5SL_first(fm->sel_chunks);
+ while (chunk_node) {
+ chunk_info = H5SL_item(chunk_node);
- io_mode_info[chunk_info->index] = H5D_CHUNK_SELECT_REG; /* this chunk is selected and is "regular" */
- chunk_node = H5SL_next(chunk_node);
+ io_mode_info[chunk_info->index] = H5D_CHUNK_SELECT_REG; /* this chunk is selected and is "regular" */
+ chunk_node = H5SL_next(chunk_node);
} /* end while */
/* Gather all the information */
- if(MPI_SUCCESS != (mpi_code = MPI_Gather(io_mode_info, total_chunks, MPI_BYTE, recv_io_mode_info, total_chunks, MPI_BYTE, root, comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Gather(io_mode_info, total_chunks, MPI_BYTE, recv_io_mode_info,
+ total_chunks, MPI_BYTE, root, comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Gather failed", mpi_code)
/* Calculate the mode for IO(collective, independent or none) at root process */
- if(mpi_rank == root) {
- int nproc;
- int* nproc_per_chunk;
+ if (mpi_rank == root) {
+ int nproc;
+ int *nproc_per_chunk;
/* pre-computing: calculate number of processes and
regularity of the selection occupied in each chunk */
- nproc_per_chunk = (int*)H5MM_calloc(total_chunks * sizeof(int));
+ nproc_per_chunk = (int *)H5MM_calloc(total_chunks * sizeof(int));
/* calculating the chunk address */
- if(H5D__chunk_addrmap(io_info, chunk_addr) < 0) {
+ if (H5D__chunk_addrmap(io_info, chunk_addr) < 0) {
HDfree(nproc_per_chunk);
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
} /* end if */
/* checking for number of process per chunk and regularity of the selection*/
- for(nproc = 0; nproc < mpi_size; nproc++) {
+ for (nproc = 0; nproc < mpi_size; nproc++) {
uint8_t *tmp_recv_io_mode_info = recv_io_mode_info + (nproc * total_chunks);
/* Calculate the number of process per chunk and adding irregular selection option */
- for(ic = 0; ic < total_chunks; ic++, tmp_recv_io_mode_info++) {
- if(*tmp_recv_io_mode_info != 0) {
+ for (ic = 0; ic < total_chunks; ic++, tmp_recv_io_mode_info++) {
+ if (*tmp_recv_io_mode_info != 0) {
nproc_per_chunk[ic]++;
} /* end if */
- } /* end for */
- } /* end for */
+ } /* end for */
+ } /* end for */
/* Calculating MPIO mode for each chunk (collective, independent, none) */
- for(ic = 0; ic < total_chunks; ic++) {
- if(nproc_per_chunk[ic] > MAX(1, threshold_nproc_per_chunk)) {
+ for (ic = 0; ic < total_chunks; ic++) {
+ if (nproc_per_chunk[ic] > MAX(1, threshold_nproc_per_chunk)) {
assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
} /* end if */
- } /* end for */
-
+ } /* end for */
/* merge buffer io_mode info and chunk addr into one */
HDmemcpy(mergebuf, assign_io_mode, total_chunks);
@@ -1775,60 +1768,60 @@ H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
} /* end if */
/* Broadcasting the MPI_IO option info. and chunk address info. */
- if(MPI_SUCCESS != (mpi_code = MPI_Bcast(mergebuf, ((sizeof(haddr_t) + 1) * total_chunks), MPI_BYTE, root, comm)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Bcast(mergebuf, ((sizeof(haddr_t) + 1) * total_chunks), MPI_BYTE, root, comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
HDmemcpy(assign_io_mode, mergebuf, total_chunks);
HDmemcpy(chunk_addr, tempbuf, sizeof(haddr_t) * total_chunks);
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
-{
- H5P_genplist_t *plist; /* Property list pointer */
+ {
+ H5P_genplist_t *plist; /* Property list pointer */
+
+ /* Get the dataset transfer property list */
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
+ HGOTO_ERROR(H5E_IO, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
+
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME);
+ if (check_prop > 0) {
+ for (ic = 0; ic < total_chunks; ic++) {
+ if (assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
+ new_value = 0;
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, &new_value) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value")
+ break;
+ } /* end if */
+ } /* end for */
+ } /* end if */
- /* Get the dataset transfer property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
- HGOTO_ERROR(H5E_IO, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
+ check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME);
+ if (check_prop > 0) {
+ int temp_count = 0;
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME);
- if(check_prop > 0) {
- for(ic = 0; ic < total_chunks; ic++) {
- if(assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
+ for (ic = 0; ic < total_chunks; ic++) {
+ if (assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
+ temp_count++;
+ break;
+ } /* end if */
+ } /* end for */
+ if (temp_count == 0) {
new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, &new_value) < 0)
+ if (H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, &new_value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value")
- break;
- } /* end if */
- } /* end for */
- } /* end if */
-
- check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME);
- if(check_prop > 0) {
- int temp_count = 0;
-
- for(ic = 0; ic < total_chunks; ic++) {
- if(assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
- temp_count++;
- break;
} /* end if */
- } /* end for */
- if(temp_count == 0) {
- new_value = 0;
- if(H5P_set(plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value")
- } /* end if */
- } /* end if */
-}
+ } /* end if */
+ }
#endif
done:
- if(mem_cleanup) {
+ if (mem_cleanup) {
HDfree(io_mode_info);
HDfree(mergebuf);
- if(mpi_rank == root)
+ if (mpi_rank == root)
HDfree(recv_io_mode_info);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__obtain_mpio_mode() */
-#endif /* H5_HAVE_PARALLEL */
-
+#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Doh.c b/src/H5Doh.c
index c9da16b..cfbfa84 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,79 +15,68 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Opkg.h" /* Object headers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-static void *H5O__dset_get_copy_file_udata(void);
-static void H5O__dset_free_copy_file_udata(void *);
-static htri_t H5O__dset_isa(H5O_t *loc);
-static hid_t H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id,
- hid_t dxpl_id, hbool_t app_ref);
-static void *H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc,
- hid_t dxpl_id);
+static void * H5O__dset_get_copy_file_udata(void);
+static void H5O__dset_free_copy_file_udata(void *);
+static htri_t H5O__dset_isa(H5O_t *loc);
+static hid_t H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
+static void * H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
static H5O_loc_t *H5O__dset_get_oloc(hid_t obj_id);
-static herr_t H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5_ih_info_t *bh_info);
-static herr_t H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
-
+static herr_t H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info);
+static herr_t H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
/* This message derives from H5O object class */
const H5O_obj_class_t H5O_OBJ_DATASET[1] = {{
- H5O_TYPE_DATASET, /* object type */
- "dataset", /* object name, for debugging */
- H5O__dset_get_copy_file_udata, /* get 'copy file' user data */
+ H5O_TYPE_DATASET, /* object type */
+ "dataset", /* object name, for debugging */
+ H5O__dset_get_copy_file_udata, /* get 'copy file' user data */
H5O__dset_free_copy_file_udata, /* free 'copy file' user data */
- H5O__dset_isa, /* "isa" message */
- H5O__dset_open, /* open an object of this class */
- H5O__dset_create, /* create an object of this class */
- H5O__dset_get_oloc, /* get an object header location for an object */
- H5O__dset_bh_info, /* get the index & heap info for an object */
- H5O__dset_flush /* flush an opened object of this class */
+ H5O__dset_isa, /* "isa" message */
+ H5O__dset_open, /* open an object of this class */
+ H5O__dset_create, /* create an object of this class */
+ H5O__dset_get_oloc, /* get an object header location for an object */
+ H5O__dset_bh_info, /* get the index & heap info for an object */
+ H5O__dset_flush /* flush an opened object of this class */
}};
/* Declare a free list to manage the H5D_copy_file_ud_t struct */
H5FL_DEFINE(H5D_copy_file_ud_t);
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_get_copy_file_udata
*
@@ -106,19 +95,18 @@ H5FL_DEFINE(H5D_copy_file_ud_t);
static void *
H5O__dset_get_copy_file_udata(void)
{
- void *ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
/* Allocate space for the 'copy file' user data for copying datasets */
- if(NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t)))
+ if (NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_get_copy_file_udata() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_free_copy_file_udata
*
@@ -143,15 +131,15 @@ H5O__dset_free_copy_file_udata(void *_udata)
HDassert(udata);
/* Release copy of dataset's dataspace extent, if it was set */
- if(udata->src_space_extent)
+ if (udata->src_space_extent)
H5O_msg_free(H5O_SDSPACE_ID, udata->src_space_extent);
/* Release copy of dataset's datatype, if it was set */
- if(udata->src_dtype)
+ if (udata->src_dtype)
H5T_close(udata->src_dtype);
/* Release copy of dataset's filter pipeline, if it was set */
- if(udata->common.src_pline)
+ if (udata->common.src_pline)
H5O_msg_free(H5O_PLINE_ID, udata->common.src_pline);
/* Release space for 'copy file' user data */
@@ -160,7 +148,6 @@ H5O__dset_free_copy_file_udata(void *_udata)
FUNC_LEAVE_NOAPI_VOID
} /* end H5O__dset_free_copy_file_udata() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_isa
*
@@ -181,30 +168,29 @@ H5O__dset_free_copy_file_udata(void *_udata)
static htri_t
H5O__dset_isa(H5O_t *oh)
{
- htri_t exists; /* Flag if header message of interest exists */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t exists; /* Flag if header message of interest exists */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_STATIC
HDassert(oh);
/* Datatype */
- if((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
- else if(!exists)
- HGOTO_DONE(FALSE)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
+ else if (!exists)
+ HGOTO_DONE(FALSE)
/* Layout */
- if((exists = H5O_msg_exists_oh(oh, H5O_SDSPACE_ID)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
- else if(!exists)
- HGOTO_DONE(FALSE)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_SDSPACE_ID)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
+ else if (!exists)
+ HGOTO_DONE(FALSE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_isa() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_open
*
@@ -221,44 +207,42 @@ done:
static hid_t
H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
{
- H5D_t *dset = NULL; /* Dataset opened */
- htri_t isdapl; /* lapl_id is a dapl */
- hid_t dapl_id; /* dapl to use to open this dataset */
- hid_t ret_value; /* Return value */
+ H5D_t *dset = NULL; /* Dataset opened */
+ htri_t isdapl; /* lapl_id is a dapl */
+ hid_t dapl_id; /* dapl to use to open this dataset */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_STATIC
HDassert(obj_loc);
/* If the lapl passed in is a dapl, use it. Otherwise, use the default dapl */
- if(lapl_id == H5P_DEFAULT)
+ if (lapl_id == H5P_DEFAULT)
isdapl = FALSE;
- else
- if((isdapl = H5P_isa_class(lapl_id, H5P_DATASET_ACCESS)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "unable to compare property list classes")
+ else if ((isdapl = H5P_isa_class(lapl_id, H5P_DATASET_ACCESS)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "unable to compare property list classes")
- if(isdapl)
+ if (isdapl)
dapl_id = lapl_id;
else
dapl_id = H5P_DATASET_ACCESS_DEFAULT;
/* Open the dataset */
- if(NULL == (dset = H5D_open(obj_loc, dapl_id, dxpl_id)))
+ if (NULL == (dset = H5D_open(obj_loc, dapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
/* Register an ID for the dataset */
- if((ret_value = H5I_register(H5I_DATASET, dset, app_ref)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASET, dset, app_ref)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataset")
done:
- if(ret_value < 0)
- if(dset && H5D_close(dset) < 0)
+ if (ret_value < 0)
+ if (dset && H5D_close(dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_open() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_create
*
@@ -275,9 +259,9 @@ done:
static void *
H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
{
- H5D_obj_create_t *crt_info = (H5D_obj_create_t *)_crt_info; /* Dataset creation parameters */
- H5D_t *dset = NULL; /* New dataset created */
- void *ret_value; /* Return value */
+ H5D_obj_create_t *crt_info = (H5D_obj_create_t *)_crt_info; /* Dataset creation parameters */
+ H5D_t * dset = NULL; /* New dataset created */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -287,27 +271,27 @@ H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
HDassert(obj_loc);
/* Create the the dataset */
- if(NULL == (dset = H5D__create(f, crt_info->type_id, crt_info->space, crt_info->dcpl_id, crt_info->dapl_id, dxpl_id)))
+ if (NULL == (dset = H5D__create(f, crt_info->type_id, crt_info->space, crt_info->dcpl_id,
+ crt_info->dapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset")
/* Set up the new dataset's location */
- if(NULL == (obj_loc->oloc = H5D_oloc(dset)))
+ if (NULL == (obj_loc->oloc = H5D_oloc(dset)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of dataset")
- if(NULL == (obj_loc->path = H5D_nameof(dset)))
+ if (NULL == (obj_loc->path = H5D_nameof(dset)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of dataset")
/* Set the return value */
ret_value = dset;
done:
- if(ret_value == NULL)
- if(dset && H5D_close(dset) < 0)
+ if (ret_value == NULL)
+ if (dset && H5D_close(dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release dataset")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_get_oloc
*
@@ -324,24 +308,23 @@ done:
static H5O_loc_t *
H5O__dset_get_oloc(hid_t obj_id)
{
- H5D_t *dset; /* Dataset opened */
- H5O_loc_t *ret_value; /* Return value */
+ H5D_t * dset; /* Dataset opened */
+ H5O_loc_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
/* Get the dataset */
- if(NULL == (dset = (H5D_t *)H5I_object(obj_id)))
+ if (NULL == (dset = (H5D_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_OHDR, H5E_BADATOM, NULL, "couldn't get object from ID")
/* Get the dataset's object header location */
- if(NULL == (ret_value = H5D_oloc(dset)))
+ if (NULL == (ret_value = H5D_oloc(dset)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_get_oloc() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_bh_info
*
@@ -354,23 +337,19 @@ done:
* Programmer: Vailin Choi
* July 11, 2007
*
- * Modification:Raymond Lu
- * 5 February, 2010
- * I added the call to H5O_msg_reset after H5D_chunk_bh_info
- * to free the PLINE.
*-------------------------------------------------------------------------
*/
static herr_t
H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
{
- H5O_layout_t layout; /* Data storage layout message */
- H5O_pline_t pline; /* I/O pipeline message */
- H5O_efl_t efl; /* External File List message */
- hbool_t layout_read = FALSE; /* Whether the layout message was read */
- hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read */
- hbool_t efl_read = FALSE; /* Whether the external file list message was read */
- htri_t exists; /* Flag if header message of interest exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_layout_t layout; /* Data storage layout message */
+ H5O_pline_t pline; /* I/O pipeline message */
+ H5O_efl_t efl; /* External File List message */
+ hbool_t layout_read = FALSE; /* Whether the layout message was read */
+ hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read */
+ hbool_t efl_read = FALSE; /* Whether the external file list message was read */
+ htri_t exists; /* Flag if header message of interest exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -380,58 +359,57 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HDassert(bh_info);
/* Get the layout message from the object header */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message")
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message")
layout_read = TRUE;
/* Check for chunked dataset storage */
- if(layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) {
+ if (layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) {
/* Check for I/O pipeline message */
- if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
- else if(exists) {
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
+ else if (exists) {
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find I/O pipeline message")
pline_read = TRUE;
} /* end else if */
else
HDmemset(&pline, 0, sizeof(pline));
- if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
+ if (H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info")
} /* end if */
/* Check for External File List message in the object header */
- if((exists = H5O_msg_exists_oh(oh, H5O_EFL_ID)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message")
+ if ((exists = H5O_msg_exists_oh(oh, H5O_EFL_ID)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message")
- if(exists && H5D__efl_is_space_alloc(&layout.storage)) {
+ if (exists && H5D__efl_is_space_alloc(&layout.storage)) {
/* Start with clean EFL info */
HDmemset(&efl, 0, sizeof(efl));
- /* Get External File List message from the object header */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_EFL_ID, &efl))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message")
+ /* Get External File List message from the object header */
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_EFL_ID, &efl))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message")
efl_read = TRUE;
- /* Get size of local heap for EFL message's file list */
- if(H5D__efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
+ /* Get size of local heap for EFL message's file list */
+ if (H5D__efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine EFL heap info")
} /* end if */
done:
/* Free messages, if they've been read in */
- if(layout_read && H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
+ if (layout_read && H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset data storage layout message")
- if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
+ if (pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
- if(efl_read && H5O_msg_reset(H5O_EFL_ID, &efl) < 0)
+ if (efl_read && H5O_msg_reset(H5O_EFL_ID, &efl) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset external file list message")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_bh_info() */
-
/*-------------------------------------------------------------------------
* Function: H5O__dset_flush
*
@@ -448,9 +426,9 @@ done:
static herr_t
H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
{
- H5D_t *dset = NULL; /* Dataset opened */
- H5O_type_t obj_type; /* Type of object at location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t * dset = NULL; /* Dataset opened */
+ H5O_type_t obj_type; /* Type of object at location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -458,22 +436,21 @@ H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
HDassert(obj_loc->oloc);
/* Check that the object found is the correct type */
- if(H5O_obj_type(obj_loc->oloc, &obj_type, dxpl_id) < 0)
+ if (H5O_obj_type(obj_loc->oloc, &obj_type, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_DATASET)
+ if (obj_type != H5O_TYPE_DATASET)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
/* Open the dataset */
- if(NULL == (dset = H5D_open(obj_loc, H5P_DATASET_ACCESS_DEFAULT, dxpl_id)))
+ if (NULL == (dset = H5D_open(obj_loc, H5P_DATASET_ACCESS_DEFAULT, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
-
- if(H5D__flush_real(dset, dxpl_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
+
+ if (H5D__flush_real(dset, dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
done:
- if(dset && H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ if (dset && H5D_close(dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_flush() */
-
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 8eaa1a4..7cd179d 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * Monday, April 14, 2003
+ * Programmer: Quincey Koziol
+ * Monday, April 14, 2003
*
- * Purpose: This file contains declarations which are visible only within
- * the H5D package. Source files outside the H5D package should
- * include H5Dprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5D package. Source files outside the H5D package should
+ * include H5Dprivate.h instead.
*/
#ifndef H5D_PACKAGE
#error "Do not include this file outside the H5D package!"
@@ -30,10 +30,10 @@
#include "H5Dprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Gprivate.h" /* Groups */
-#include "H5SLprivate.h" /* Skip lists */
-#include "H5Tprivate.h" /* Datatypes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Gprivate.h" /* Groups */
+#include "H5SLprivate.h" /* Skip lists */
+#include "H5Tprivate.h" /* Datatypes */
/**************************/
/* Package Private Macros */
@@ -43,27 +43,26 @@
#define H5D_MINHDR_SIZE 256
/* [Simple] Macro to construct a H5D_io_info_t from it's components */
-#define H5D_BUILD_IO_INFO_WRT(io_info, ds, dxpl_c, dxpl_i, str, buf) \
- (io_info)->dset = ds; \
- (io_info)->dxpl_cache = dxpl_c; \
- (io_info)->dxpl_id = dxpl_i; \
- (io_info)->store = str; \
- (io_info)->op_type = H5D_IO_OP_WRITE; \
- (io_info)->u.wbuf = buf
-#define H5D_BUILD_IO_INFO_RD(io_info, ds, dxpl_c, dxpl_i, str, buf) \
- (io_info)->dset = ds; \
- (io_info)->dxpl_cache = dxpl_c; \
- (io_info)->dxpl_id = dxpl_i; \
- (io_info)->store = str; \
- (io_info)->op_type = H5D_IO_OP_READ; \
- (io_info)->u.rbuf = buf
+#define H5D_BUILD_IO_INFO_WRT(io_info, ds, dxpl_c, dxpl_i, str, buf) \
+ (io_info)->dset = ds; \
+ (io_info)->dxpl_cache = dxpl_c; \
+ (io_info)->dxpl_id = dxpl_i; \
+ (io_info)->store = str; \
+ (io_info)->op_type = H5D_IO_OP_WRITE; \
+ (io_info)->u.wbuf = buf
+#define H5D_BUILD_IO_INFO_RD(io_info, ds, dxpl_c, dxpl_i, str, buf) \
+ (io_info)->dset = ds; \
+ (io_info)->dxpl_cache = dxpl_c; \
+ (io_info)->dxpl_id = dxpl_i; \
+ (io_info)->store = str; \
+ (io_info)->op_type = H5D_IO_OP_READ; \
+ (io_info)->u.rbuf = buf
#define H5D_CHUNK_HASH(D, ADDR) H5F_addr_hash(ADDR, (D)->cache.chunk.nslots)
/* Flags for marking aspects of a dataset dirty */
#define H5D_MARK_SPACE 0x01
-#define H5D_MARK_LAYOUT 0x02
-
+#define H5D_MARK_LAYOUT 0x02
/****************************/
/* Package Private Typedefs */
@@ -72,156 +71,164 @@
/* Typedef for datatype information for raw data I/O operation */
typedef struct H5D_type_info_t {
/* Initial values */
- const H5T_t *mem_type; /* Pointer to memory datatype */
- const H5T_t *dset_type; /* Pointer to dataset datatype */
- H5T_path_t *tpath; /* Datatype conversion path */
- hid_t src_type_id; /* Source datatype ID */
- hid_t dst_type_id; /* Destination datatype ID */
+ const H5T_t *mem_type; /* Pointer to memory datatype */
+ const H5T_t *dset_type; /* Pointer to dataset datatype */
+ H5T_path_t * tpath; /* Datatype conversion path */
+ hid_t src_type_id; /* Source datatype ID */
+ hid_t dst_type_id; /* Destination datatype ID */
/* Computed/derived values */
- size_t src_type_size; /* Size of source type */
- size_t dst_type_size; /* Size of destination type*/
- size_t max_type_size; /* Size of largest source/destination type */
- hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */
- hbool_t is_xform_noop; /* Whether the data transform is a NOOP */
- const H5T_subset_info_t *cmpd_subset; /* Info related to the compound subset conversion functions */
- H5T_bkg_t need_bkg; /* Type of background buf needed */
- size_t request_nelmts; /* Requested strip mine */
- uint8_t *tconv_buf; /* Datatype conv buffer */
- hbool_t tconv_buf_allocated; /* Whether the type conversion buffer was allocated */
- uint8_t *bkg_buf; /* Background buffer */
- hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
+ size_t src_type_size; /* Size of source type */
+ size_t dst_type_size; /* Size of destination type*/
+ size_t max_type_size; /* Size of largest source/destination type */
+ hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */
+ hbool_t is_xform_noop; /* Whether the data transform is a NOOP */
+ const H5T_subset_info_t *cmpd_subset; /* Info related to the compound subset conversion functions */
+ H5T_bkg_t need_bkg; /* Type of background buf needed */
+ size_t request_nelmts; /* Requested strip mine */
+ uint8_t * tconv_buf; /* Datatype conv buffer */
+ hbool_t tconv_buf_allocated; /* Whether the type conversion buffer was allocated */
+ uint8_t * bkg_buf; /* Background buffer */
+ hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
} H5D_type_info_t;
/* Forward declaration of structs used below */
struct H5D_io_info_t;
struct H5D_chunk_map_t;
+typedef struct H5D_shared_t H5D_shared_t;
/* Function pointers for I/O on particular types of dataset layouts */
typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset);
-typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
- hid_t dapl_id);
+typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id);
typedef hbool_t (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage);
+typedef hbool_t (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset);
typedef herr_t (*H5D_layout_io_init_func_t)(const struct H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- struct H5D_chunk_map_t *cm);
-typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, struct H5D_chunk_map_t *fm);
-typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, struct H5D_chunk_map_t *fm);
-typedef ssize_t (*H5D_layout_readvv_func_t)(const struct H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-typedef ssize_t (*H5D_layout_writevv_func_t)(const struct H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+ const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space,
+ struct H5D_chunk_map_t *cm);
+typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ struct H5D_chunk_map_t *fm);
+typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ struct H5D_chunk_map_t *fm);
+typedef ssize_t (*H5D_layout_readvv_func_t)(const struct H5D_io_info_t *io_info, size_t dset_max_nseq,
+ size_t *dset_curr_seq, size_t dset_len_arr[],
+ hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[],
+ hsize_t mem_offset_arr[]);
+typedef ssize_t (*H5D_layout_writevv_func_t)(const struct H5D_io_info_t *io_info, size_t dset_max_nseq,
+ size_t *dset_curr_seq, size_t dset_len_arr[],
+ hsize_t dset_offset_arr[], size_t mem_max_nseq,
+ size_t *mem_curr_seq, size_t mem_len_arr[],
+ hsize_t mem_offset_arr[]);
typedef herr_t (*H5D_layout_flush_func_t)(H5D_t *dataset, hid_t dxpl_id);
typedef herr_t (*H5D_layout_io_term_func_t)(const struct H5D_chunk_map_t *cm);
/* Typedef for grouping layout I/O routines */
typedef struct H5D_layout_ops_t {
- H5D_layout_construct_func_t construct; /* Layout constructor for new datasets */
- H5D_layout_init_func_t init; /* Layout initializer for dataset */
- H5D_layout_is_space_alloc_func_t is_space_alloc; /* Query routine to determine if storage is allocated */
- H5D_layout_io_init_func_t io_init; /* I/O initialization routine */
- H5D_layout_read_func_t ser_read; /* High-level I/O routine for reading data in serial */
- H5D_layout_write_func_t ser_write; /* High-level I/O routine for writing data in serial */
+ H5D_layout_construct_func_t construct; /* Layout constructor for new datasets */
+ H5D_layout_init_func_t init; /* Layout initializer for dataset */
+ H5D_layout_is_space_alloc_func_t is_space_alloc; /* Query routine to determine if storage is allocated */
+ H5D_layout_is_data_cached_func_t
+ is_data_cached; /* Query routine to determine if any raw data is cached. If routine is not present
+ then the layout type never caches raw data. */
+ H5D_layout_io_init_func_t io_init; /* I/O initialization routine */
+ H5D_layout_read_func_t ser_read; /* High-level I/O routine for reading data in serial */
+ H5D_layout_write_func_t ser_write; /* High-level I/O routine for writing data in serial */
#ifdef H5_HAVE_PARALLEL
- H5D_layout_read_func_t par_read; /* High-level I/O routine for reading data in parallel */
- H5D_layout_write_func_t par_write; /* High-level I/O routine for writing data in parallel */
-#endif /* H5_HAVE_PARALLEL */
- H5D_layout_readvv_func_t readvv; /* Low-level I/O routine for reading data */
- H5D_layout_writevv_func_t writevv; /* Low-level I/O routine for writing data */
- H5D_layout_flush_func_t flush; /* Low-level I/O routine for flushing raw data */
- H5D_layout_io_term_func_t io_term; /* I/O shutdown routine */
+ H5D_layout_read_func_t par_read; /* High-level I/O routine for reading data in parallel */
+ H5D_layout_write_func_t par_write; /* High-level I/O routine for writing data in parallel */
+#endif /* H5_HAVE_PARALLEL */
+ H5D_layout_readvv_func_t readvv; /* Low-level I/O routine for reading data */
+ H5D_layout_writevv_func_t writevv; /* Low-level I/O routine for writing data */
+ H5D_layout_flush_func_t flush; /* Low-level I/O routine for flushing raw data */
+ H5D_layout_io_term_func_t io_term; /* I/O shutdown routine */
} H5D_layout_ops_t;
/* Function pointers for either multiple or single block I/O access */
typedef herr_t (*H5D_io_single_read_func_t)(const struct H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space);
typedef herr_t (*H5D_io_single_write_func_t)(const struct H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space);
/* Typedef for raw data I/O framework info */
typedef struct H5D_io_ops_t {
- H5D_layout_read_func_t multi_read; /* High-level I/O routine for reading data */
- H5D_layout_write_func_t multi_write; /* High-level I/O routine for writing data */
- H5D_io_single_read_func_t single_read; /* I/O routine for reading single block */
- H5D_io_single_write_func_t single_write; /* I/O routine for writing single block */
+ H5D_layout_read_func_t multi_read; /* High-level I/O routine for reading data */
+ H5D_layout_write_func_t multi_write; /* High-level I/O routine for writing data */
+ H5D_io_single_read_func_t single_read; /* I/O routine for reading single block */
+ H5D_io_single_write_func_t single_write; /* I/O routine for writing single block */
} H5D_io_ops_t;
/* Typedefs for dataset storage information */
typedef struct {
- haddr_t dset_addr; /* Address of dataset in file */
- hsize_t dset_size; /* Total size of dataset in file */
+ haddr_t dset_addr; /* Address of dataset in file */
+ hsize_t dset_size; /* Total size of dataset in file */
} H5D_contig_storage_t;
typedef struct {
- hsize_t index; /* "Index" of chunk in dataset (must be first for TBBT routines) */
- hsize_t *offset; /* Chunk's coordinates in elements */
+ hsize_t index; /* "Index" of chunk in dataset (must be first for TBBT routines) */
+ hsize_t *offset; /* Chunk's coordinates in elements */
} H5D_chunk_storage_t;
typedef struct {
- void *buf; /* Buffer for compact dataset */
- hbool_t *dirty; /* Pointer to dirty flag to mark */
+ void * buf; /* Buffer for compact dataset */
+ hbool_t *dirty; /* Pointer to dirty flag to mark */
} H5D_compact_storage_t;
typedef union H5D_storage_t {
- H5D_contig_storage_t contig; /* Contiguous information for dataset */
- H5D_chunk_storage_t chunk; /* Chunk information for dataset */
+ H5D_contig_storage_t contig; /* Contiguous information for dataset */
+ H5D_chunk_storage_t chunk; /* Chunk information for dataset */
H5D_compact_storage_t compact; /* Compact information for dataset */
- H5O_efl_t efl; /* External file list information for dataset */
+ H5O_efl_t efl; /* External file list information for dataset */
} H5D_storage_t;
/* Typedef for raw data I/O operation info */
typedef enum H5D_io_op_type_t {
- H5D_IO_OP_READ, /* Read operation */
- H5D_IO_OP_WRITE /* Write operation */
+ H5D_IO_OP_READ, /* Read operation */
+ H5D_IO_OP_WRITE /* Write operation */
} H5D_io_op_type_t;
typedef struct H5D_io_info_t {
- const H5D_t *dset; /* Pointer to dataset being operated on */
+ const H5D_t *dset; /* Pointer to dataset being operated on */
#ifndef H5_HAVE_PARALLEL
const
-#endif /* H5_HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
H5D_dxpl_cache_t *dxpl_cache; /* Pointer to cached DXPL info */
- hid_t dxpl_id; /* Original DXPL ID */
+ hid_t dxpl_id; /* Original DXPL ID */
#ifdef H5_HAVE_PARALLEL
- MPI_Comm comm; /* MPI communicator for file */
- hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */
+ MPI_Comm comm; /* MPI communicator for file */
+ hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */
struct {
H5FD_mpio_xfer_t xfer_mode; /* Parallel transfer for this request (H5D_XFER_IO_XFER_MODE_NAME) */
- H5FD_mpio_collective_opt_t coll_opt_mode; /* Parallel transfer with independent IO or collective IO with this mode */
- H5D_io_ops_t io_ops; /* I/O operation function pointers */
+ H5FD_mpio_collective_opt_t
+ coll_opt_mode; /* Parallel transfer with independent IO or collective IO with this mode */
+ H5D_io_ops_t io_ops; /* I/O operation function pointers */
} orig;
-#endif /* H5_HAVE_PARALLEL */
- H5D_storage_t *store; /* Dataset storage info */
- H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */
- H5D_io_ops_t io_ops; /* I/O operation function pointers */
+#endif /* H5_HAVE_PARALLEL */
+ H5D_storage_t * store; /* Dataset storage info */
+ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */
+ H5D_io_ops_t io_ops; /* I/O operation function pointers */
H5D_io_op_type_t op_type;
union {
- void *rbuf; /* Pointer to buffer for read */
- const void *wbuf; /* Pointer to buffer to write */
+ void * rbuf; /* Pointer to buffer for read */
+ const void *wbuf; /* Pointer to buffer to write */
} u;
} H5D_io_info_t;
-
/******************/
/* Chunk typedefs */
/******************/
/* Typedef for chunked dataset index operation info */
typedef struct H5D_chk_idx_info_t {
- H5F_t *f; /* File pointer for operation */
- hid_t dxpl_id; /* DXPL ID for operation */
- const H5O_pline_t *pline; /* I/O pipeline info */
- H5O_layout_chunk_t *layout; /* Chunk layout description */
- H5O_storage_chunk_t *storage; /* Chunk storage description */
+ H5F_t * f; /* File pointer for operation */
+ hid_t dxpl_id; /* DXPL ID for operation */
+ const H5O_pline_t * pline; /* I/O pipeline info */
+ H5O_layout_chunk_t * layout; /* Chunk layout description */
+ H5O_storage_chunk_t *storage; /* Chunk storage description */
} H5D_chk_idx_info_t;
/*
@@ -236,10 +243,10 @@ typedef struct H5D_chk_idx_info_t {
* The chunk's file address, filter mask and size on disk are not key values.
*/
typedef struct H5D_chunk_rec_t {
- uint32_t nbytes; /* Size of stored data */
- hsize_t offset[H5O_LAYOUT_NDIMS]; /* Logical offset to start */
- unsigned filter_mask; /* Excluded filters */
- haddr_t chunk_addr; /* Address of chunk in file */
+ uint32_t nbytes; /* Size of stored data */
+ hsize_t offset[H5O_LAYOUT_NDIMS]; /* Logical offset to start */
+ unsigned filter_mask; /* Excluded filters */
+ haddr_t chunk_addr; /* Address of chunk in file */
} H5D_chunk_rec_t;
/*
@@ -249,154 +256,150 @@ typedef struct H5D_chunk_rec_t {
*/
typedef struct H5D_chunk_common_ud_t {
/* downward */
- const H5O_layout_chunk_t *layout; /* Chunk layout description */
- const H5O_storage_chunk_t *storage; /* Chunk storage description */
- const hsize_t *offset; /* Logical offset of chunk */
- const struct H5D_rdcc_t *rdcc; /* Chunk cache. Only necessary if the index may
- * be modified, and if any chunks in the dset
- * may be cached */
+ const H5O_layout_chunk_t * layout; /* Chunk layout description */
+ const H5O_storage_chunk_t *storage; /* Chunk storage description */
+ const hsize_t * offset; /* Logical offset of chunk */
+ const struct H5D_rdcc_t * rdcc; /* Chunk cache. Only necessary if the index may
+ * be modified, and if any chunks in the dset
+ * may be cached */
} H5D_chunk_common_ud_t;
/* B-tree callback info for various operations */
typedef struct H5D_chunk_ud_t {
- H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
+ H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
/* Upward */
- unsigned idx_hint; /*index of chunk in cache, if present */
- uint32_t nbytes; /*size of stored data */
- unsigned filter_mask; /*excluded filters */
- haddr_t addr; /*file address of chunk */
+ unsigned idx_hint; /*index of chunk in cache, if present */
+ uint32_t nbytes; /*size of stored data */
+ unsigned filter_mask; /*excluded filters */
+ haddr_t addr; /*file address of chunk */
} H5D_chunk_ud_t;
/* Typedef for "generic" chunk callbacks */
-typedef int (*H5D_chunk_cb_func_t)(const H5D_chunk_rec_t *chunk_rec,
- void *udata);
+typedef int (*H5D_chunk_cb_func_t)(const H5D_chunk_rec_t *chunk_rec, void *udata);
/* Typedefs for chunk operations */
-typedef herr_t (*H5D_chunk_init_func_t)(const H5D_chk_idx_info_t *idx_info,
- const H5S_t *space, haddr_t dset_ohdr_addr);
+typedef herr_t (*H5D_chunk_init_func_t)(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
typedef herr_t (*H5D_chunk_create_func_t)(const H5D_chk_idx_info_t *idx_info);
typedef hbool_t (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage);
-typedef herr_t (*H5D_chunk_insert_func_t)(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata);
-typedef herr_t (*H5D_chunk_get_addr_func_t)(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata);
+typedef herr_t (*H5D_chunk_insert_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+typedef herr_t (*H5D_chunk_get_addr_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
typedef herr_t (*H5D_chunk_resize_func_t)(H5O_layout_chunk_t *layout);
-typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_cb_func_t chunk_cb, void *chunk_udata);
-typedef herr_t (*H5D_chunk_remove_func_t)(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_common_ud_t *udata);
+typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+typedef herr_t (*H5D_chunk_remove_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
typedef herr_t (*H5D_chunk_delete_func_t)(const H5D_chk_idx_info_t *idx_info);
typedef herr_t (*H5D_chunk_copy_setup_func_t)(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
+ const H5D_chk_idx_info_t *idx_info_dst);
typedef herr_t (*H5D_chunk_copy_shutdown_func_t)(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst, hid_t dxpl_id);
-typedef herr_t (*H5D_chunk_size_func_t)(const H5D_chk_idx_info_t *idx_info,
- hsize_t *idx_size);
+ H5O_storage_chunk_t *storage_dst, hid_t dxpl_id);
+typedef herr_t (*H5D_chunk_size_func_t)(const H5D_chk_idx_info_t *idx_info, hsize_t *idx_size);
typedef herr_t (*H5D_chunk_reset_func_t)(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-typedef herr_t (*H5D_chunk_dump_func_t)(const H5O_storage_chunk_t *storage,
- FILE *stream);
+typedef herr_t (*H5D_chunk_dump_func_t)(const H5O_storage_chunk_t *storage, FILE *stream);
typedef herr_t (*H5D_chunk_dest_func_t)(const H5D_chk_idx_info_t *idx_info);
/* Typedef for grouping chunk I/O routines */
typedef struct H5D_chunk_ops_t {
- H5D_chunk_init_func_t init; /* Routine to initialize indexing information in memory */
- H5D_chunk_create_func_t create; /* Routine to create chunk index */
- H5D_chunk_is_space_alloc_func_t is_space_alloc; /* Query routine to determine if storage/index is allocated */
- H5D_chunk_insert_func_t insert; /* Routine to insert a chunk into an index */
- H5D_chunk_get_addr_func_t get_addr; /* Routine to retrieve address of chunk in file */
- H5D_chunk_resize_func_t resize; /* Routine to update chunk index info after resizing dataset */
- H5D_chunk_iterate_func_t iterate; /* Routine to iterate over chunks */
- H5D_chunk_remove_func_t remove; /* Routine to remove a chunk from an index */
- H5D_chunk_delete_func_t idx_delete; /* Routine to delete index & all chunks from file*/
+ H5D_chunk_init_func_t init; /* Routine to initialize indexing information in memory */
+ H5D_chunk_create_func_t create; /* Routine to create chunk index */
+ H5D_chunk_is_space_alloc_func_t
+ is_space_alloc; /* Query routine to determine if storage/index is allocated */
+ H5D_chunk_insert_func_t insert; /* Routine to insert a chunk into an index */
+ H5D_chunk_get_addr_func_t get_addr; /* Routine to retrieve address of chunk in file */
+ H5D_chunk_resize_func_t resize; /* Routine to update chunk index info after resizing dataset */
+ H5D_chunk_iterate_func_t iterate; /* Routine to iterate over chunks */
+ H5D_chunk_remove_func_t remove; /* Routine to remove a chunk from an index */
+ H5D_chunk_delete_func_t idx_delete; /* Routine to delete index & all chunks from file*/
H5D_chunk_copy_setup_func_t copy_setup; /* Routine to perform any necessary setup for copying chunks */
- H5D_chunk_copy_shutdown_func_t copy_shutdown; /* Routine to perform any necessary shutdown for copying chunks */
- H5D_chunk_size_func_t size; /* Routine to get size of indexing information */
- H5D_chunk_reset_func_t reset; /* Routine to reset indexing information */
- H5D_chunk_dump_func_t dump; /* Routine to dump indexing information */
- H5D_chunk_dest_func_t dest; /* Routine to destroy indexing information in memory */
+ H5D_chunk_copy_shutdown_func_t
+ copy_shutdown; /* Routine to perform any necessary shutdown for copying chunks */
+ H5D_chunk_size_func_t size; /* Routine to get size of indexing information */
+ H5D_chunk_reset_func_t reset; /* Routine to reset indexing information */
+ H5D_chunk_dump_func_t dump; /* Routine to dump indexing information */
+ H5D_chunk_dest_func_t dest; /* Routine to destroy indexing information in memory */
} H5D_chunk_ops_t;
/* Structure holding information about a chunk's selection for mapping */
typedef struct H5D_chunk_info_t {
- hsize_t index; /* "Index" of chunk in dataset */
- uint32_t chunk_points; /* Number of elements selected in chunk */
- hsize_t coords[H5O_LAYOUT_NDIMS]; /* Coordinates of chunk in file dataset's dataspace */
- H5S_t *fspace; /* Dataspace describing chunk & selection in it */
- unsigned fspace_shared; /* Indicate that the file space for a chunk is shared and shouldn't be freed */
- H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */
- unsigned mspace_shared; /* Indicate that the memory space for a chunk is shared and shouldn't be freed */
+ hsize_t index; /* "Index" of chunk in dataset */
+ uint32_t chunk_points; /* Number of elements selected in chunk */
+ hsize_t coords[H5O_LAYOUT_NDIMS]; /* Coordinates of chunk in file dataset's dataspace */
+ H5S_t * fspace; /* Dataspace describing chunk & selection in it */
+ unsigned fspace_shared; /* Indicate that the file space for a chunk is shared and shouldn't be freed */
+ H5S_t * mspace; /* Dataspace describing selection in memory corresponding to this chunk */
+ unsigned mspace_shared; /* Indicate that the memory space for a chunk is shared and shouldn't be freed */
} H5D_chunk_info_t;
/* Main structure holding the mapping between file chunks and memory */
typedef struct H5D_chunk_map_t {
- H5O_layout_t *layout; /* Dataset layout information*/
- hsize_t nelmts; /* Number of elements selected in file & memory dataspaces */
+ H5O_layout_t *layout; /* Dataset layout information*/
+ hsize_t nelmts; /* Number of elements selected in file & memory dataspaces */
- const H5S_t *file_space; /* Pointer to the file dataspace */
- unsigned f_ndims; /* Number of dimensions for file dataspace */
- hsize_t f_dims[H5O_LAYOUT_NDIMS]; /* File dataspace dimensions */
+ const H5S_t *file_space; /* Pointer to the file dataspace */
+ unsigned f_ndims; /* Number of dimensions for file dataspace */
+ hsize_t f_dims[H5O_LAYOUT_NDIMS]; /* File dataspace dimensions */
- const H5S_t *mem_space; /* Pointer to the memory dataspace */
- H5S_t *mchunk_tmpl; /* Dataspace template for new memory chunks */
+ const H5S_t * mem_space; /* Pointer to the memory dataspace */
+ H5S_t * mchunk_tmpl; /* Dataspace template for new memory chunks */
H5S_sel_iter_t mem_iter; /* Iterator for elements in memory selection */
- unsigned m_ndims; /* Number of dimensions for memory dataspace */
- H5S_sel_type msel_type; /* Selection type in memory */
+ unsigned m_ndims; /* Number of dimensions for memory dataspace */
+ H5S_sel_type msel_type; /* Selection type in memory */
- H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */
+ H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */
- H5S_t *single_space; /* Dataspace for single chunk */
- H5D_chunk_info_t *single_chunk_info; /* Pointer to single chunk's info */
- hbool_t use_single; /* Whether I/O is on a single element */
+ H5S_t * single_space; /* Dataspace for single chunk */
+ H5D_chunk_info_t *single_chunk_info; /* Pointer to single chunk's info */
+ hbool_t use_single; /* Whether I/O is on a single element */
- hsize_t last_index; /* Index of last chunk operated on */
- H5D_chunk_info_t *last_chunk_info; /* Pointer to last chunk's info */
+ hsize_t last_index; /* Index of last chunk operated on */
+ H5D_chunk_info_t *last_chunk_info; /* Pointer to last chunk's info */
- hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in each dimension */
+ hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in each dimension */
#ifdef H5_HAVE_PARALLEL
- H5D_chunk_info_t **select_chunk; /* Store the information about whether this chunk is selected or not */
-#endif /* H5_HAVE_PARALLEL */
+ H5D_chunk_info_t **select_chunk; /* Store the information about whether this chunk is selected or not */
+#endif /* H5_HAVE_PARALLEL */
} H5D_chunk_map_t;
/* Cached information about a particular chunk */
typedef struct H5D_chunk_cached_t {
- hbool_t valid; /*whether cache info is valid*/
- hsize_t offset[H5O_LAYOUT_NDIMS]; /*logical offset to start*/
- uint32_t nbytes; /*size of stored data */
- unsigned filter_mask; /*excluded filters */
- haddr_t addr; /*file address of chunk */
+ hbool_t valid; /*whether cache info is valid*/
+ hsize_t offset[H5O_LAYOUT_NDIMS]; /*logical offset to start*/
+ uint32_t nbytes; /*size of stored data */
+ unsigned filter_mask; /*excluded filters */
+ haddr_t addr; /*file address of chunk */
} H5D_chunk_cached_t;
/* The raw data chunk cache */
typedef struct H5D_rdcc_t {
struct {
- unsigned ninits; /* Number of chunk creations */
- unsigned nhits; /* Number of cache hits */
- unsigned nmisses;/* Number of cache misses */
- unsigned nflushes;/* Number of cache flushes */
+ unsigned ninits; /* Number of chunk creations */
+ unsigned nhits; /* Number of cache hits */
+ unsigned nmisses; /* Number of cache misses */
+ unsigned nflushes; /* Number of cache flushes */
} stats;
- size_t nbytes_max; /* Maximum cached raw data in bytes */
- size_t nslots; /* Number of chunk slots allocated */
- double w0; /* Chunk preemption policy */
- struct H5D_rdcc_ent_t *head; /* Head of doubly linked list */
- struct H5D_rdcc_ent_t *tail; /* Tail of doubly linked list */
- size_t nbytes_used; /* Current cached raw data in bytes */
- int nused; /* Number of chunk slots in use */
- H5D_chunk_cached_t last; /* Cached copy of last chunk information */
- struct H5D_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/
- H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */
- H5S_t *single_space; /* Dataspace for single element I/O on chunks */
- H5D_chunk_info_t *single_chunk_info; /* Pointer to single chunk's info */
+ size_t nbytes_max; /* Maximum cached raw data in bytes */
+ size_t nslots; /* Number of chunk slots allocated */
+ double w0; /* Chunk preemption policy */
+ struct H5D_rdcc_ent_t * head; /* Head of doubly linked list */
+ struct H5D_rdcc_ent_t * tail; /* Tail of doubly linked list */
+ size_t nbytes_used; /* Current cached raw data in bytes */
+ int nused; /* Number of chunk slots in use */
+ H5D_chunk_cached_t last; /* Cached copy of last chunk information */
+ struct H5D_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/
+ H5SL_t * sel_chunks; /* Skip list containing information for each chunk selected */
+ H5S_t * single_space; /* Dataspace for single element I/O on chunks */
+ H5D_chunk_info_t * single_chunk_info; /* Pointer to single chunk's info */
} H5D_rdcc_t;
/* The raw data contiguous data cache */
typedef struct H5D_rdcdc_t {
- unsigned char *sieve_buf; /* Buffer to hold data sieve buffer */
- haddr_t sieve_loc; /* File location (offset) of the data sieve buffer */
- size_t sieve_size; /* Size of the data sieve buffer used (in bytes) */
- size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
- hbool_t sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
+ unsigned char *sieve_buf; /* Buffer to hold data sieve buffer */
+ haddr_t sieve_loc; /* File location (offset) of the data sieve buffer */
+ size_t sieve_size; /* Size of the data sieve buffer used (in bytes) */
+ size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
+ hbool_t sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
} H5D_rdcdc_t;
/*
@@ -405,106 +408,107 @@ typedef struct H5D_rdcdc_t {
* created once for a given dataset. Thus, if a dataset is opened twice,
* there will be two IDs and two H5D_t structs, both sharing one H5D_shared_t.
*/
-typedef struct H5D_shared_t {
- size_t fo_count; /* Reference count */
- hid_t type_id; /* ID for dataset's datatype */
- H5T_t *type; /* Datatype for this dataset */
- H5S_t *space; /* Dataspace of this dataset */
- hbool_t space_dirty; /* Whether the dataspace info needs to be flushed to the file */
- hbool_t layout_dirty; /* Whether the layout info needs to be flushed to the file */
- hid_t dcpl_id; /* Dataset creation property id */
- H5D_dcpl_cache_t dcpl_cache; /* Cached DCPL values */
- H5O_layout_t layout; /* Data layout */
- hbool_t checked_filters;/* TRUE if dataset passes can_apply check */
+struct H5D_shared_t {
+ size_t fo_count; /* Reference count */
+ hid_t type_id; /* ID for dataset's datatype */
+ H5T_t * type; /* Datatype for this dataset */
+ H5S_t * space; /* Dataspace of this dataset */
+ hbool_t space_dirty; /* Whether the dataspace info needs to be flushed to the file */
+ hbool_t layout_dirty; /* Whether the layout info needs to be flushed to the file */
+ hid_t dcpl_id; /* Dataset creation property id */
+ hid_t dapl_id; /* Dataset access property id */
+ H5D_dcpl_cache_t dcpl_cache; /* Cached DCPL values */
+ H5O_layout_t layout; /* Data layout */
+ hbool_t checked_filters; /* TRUE if dataset passes can_apply check */
/* Buffered/cached information for types of raw data storage*/
struct {
- H5D_rdcdc_t contig; /* Information about contiguous data */
- /* (Note that the "contig" cache
- * information can be used by a chunked
- * dataset in certain circumstances)
- */
- H5D_rdcc_t chunk; /* Information about chunked data */
+ H5D_rdcdc_t contig; /* Information about contiguous data */
+ /* (Note that the "contig" cache
+ * information can be used by a chunked
+ * dataset in certain circumstances)
+ */
+ H5D_rdcc_t chunk; /* Information about chunked data */
} cache;
- char *extfile_prefix; /* expanded external file prefix */
-} H5D_shared_t;
+ char *extfile_prefix; /* expanded external file prefix */
+};
struct H5D_t {
- H5O_loc_t oloc; /* Object header location */
- H5G_name_t path; /* Group hierarchy path */
- H5D_shared_t *shared; /* cached information from file */
+ H5O_loc_t oloc; /* Object header location */
+ H5G_name_t path; /* Group hierarchy path */
+ H5D_shared_t *shared; /* cached information from file */
};
/* Enumerated type for allocating dataset's storage */
typedef enum {
- H5D_ALLOC_CREATE, /* Dataset is being created */
- H5D_ALLOC_OPEN, /* Dataset is being opened */
- H5D_ALLOC_EXTEND, /* Dataset's dataspace is being extended */
- H5D_ALLOC_WRITE /* Dataset is being extended */
+ H5D_ALLOC_CREATE, /* Dataset is being created */
+ H5D_ALLOC_OPEN, /* Dataset is being opened */
+ H5D_ALLOC_EXTEND, /* Dataset's dataspace is being extended */
+ H5D_ALLOC_WRITE /* Dataset is being extended */
} H5D_time_alloc_t;
-
/* Typedef for dataset creation operation */
typedef struct {
- hid_t type_id; /* Datatype for dataset */
- const H5S_t *space; /* Dataspace for dataset */
- hid_t dcpl_id; /* Dataset creation property list */
- hid_t dapl_id; /* Dataset access property list */
+ hid_t type_id; /* Datatype for dataset */
+ const H5S_t *space; /* Dataspace for dataset */
+ hid_t dcpl_id; /* Dataset creation property list */
+ hid_t dapl_id; /* Dataset access property list */
} H5D_obj_create_t;
/* Typedef for filling a buffer with a fill value */
typedef struct H5D_fill_buf_info_t {
- H5MM_allocate_t fill_alloc_func; /* Routine to call for allocating fill buffer */
- void *fill_alloc_info; /* Extra info for allocation routine */
- H5MM_free_t fill_free_func; /* Routine to call for freeing fill buffer */
- void *fill_free_info; /* Extra info for free routine */
- H5T_path_t *fill_to_mem_tpath; /* Datatype conversion path for converting the fill value to the memory buffer */
- H5T_path_t *mem_to_dset_tpath; /* Datatype conversion path for converting the memory buffer to the dataset elements */
- const H5O_fill_t *fill; /* Pointer to fill value */
- void *fill_buf; /* Fill buffer */
- size_t fill_buf_size; /* Size of fill buffer */
- hbool_t use_caller_fill_buf; /* Whether the caller provided the fill buffer */
- void *bkg_buf; /* Background conversion buffer */
- size_t bkg_buf_size; /* Size of background buffer */
- H5T_t *mem_type; /* Pointer to memory datatype */
- const H5T_t *file_type; /* Pointer to file datatype */
- hid_t mem_tid; /* ID for memory version of disk datatype */
- hid_t file_tid; /* ID for disk datatype */
- size_t mem_elmt_size, file_elmt_size; /* Size of element in memory and on disk */
- size_t max_elmt_size; /* Max. size of memory or file datatype */
- size_t elmts_per_buf; /* # of elements that fit into a buffer */
- hbool_t has_vlen_fill_type; /* Whether the datatype for the fill value has a variable-length component */
+ H5MM_allocate_t fill_alloc_func; /* Routine to call for allocating fill buffer */
+ void * fill_alloc_info; /* Extra info for allocation routine */
+ H5MM_free_t fill_free_func; /* Routine to call for freeing fill buffer */
+ void * fill_free_info; /* Extra info for free routine */
+ H5T_path_t
+ *fill_to_mem_tpath; /* Datatype conversion path for converting the fill value to the memory buffer */
+ H5T_path_t *mem_to_dset_tpath; /* Datatype conversion path for converting the memory buffer to the dataset
+ elements */
+ const H5O_fill_t *fill; /* Pointer to fill value */
+ void * fill_buf; /* Fill buffer */
+ size_t fill_buf_size; /* Size of fill buffer */
+ hbool_t use_caller_fill_buf; /* Whether the caller provided the fill buffer */
+ void * bkg_buf; /* Background conversion buffer */
+ size_t bkg_buf_size; /* Size of background buffer */
+ H5T_t * mem_type; /* Pointer to memory datatype */
+ const H5T_t * file_type; /* Pointer to file datatype */
+ hid_t mem_tid; /* ID for memory version of disk datatype */
+ hid_t file_tid; /* ID for disk datatype */
+ size_t mem_elmt_size, file_elmt_size; /* Size of element in memory and on disk */
+ size_t max_elmt_size; /* Max. size of memory or file datatype */
+ size_t elmts_per_buf; /* # of elements that fit into a buffer */
+ hbool_t has_vlen_fill_type; /* Whether the datatype for the fill value has a variable-length component */
} H5D_fill_buf_info_t;
/* Internal data structure for computing variable-length dataset's total size */
typedef struct {
- H5D_t *dset; /* Dataset for operation */
- H5S_t *fspace; /* Dataset's dataspace for operation */
- H5S_t *mspace; /* Memory dataspace for operation */
- void *fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
- void *vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
- hid_t xfer_pid; /* ID of the dataset xfer property list */
- hsize_t size; /* Accumulated number of bytes for the selection */
+ H5D_t * dset; /* Dataset for operation */
+ H5S_t * fspace; /* Dataset's dataspace for operation */
+ H5S_t * mspace; /* Memory dataspace for operation */
+ void * fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
+ void * vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
+ hid_t xfer_pid; /* ID of the dataset xfer property list */
+ hsize_t size; /* Accumulated number of bytes for the selection */
} H5D_vlen_bufsize_t;
/* Raw data chunks are cached. Each entry in the cache is: */
typedef struct H5D_rdcc_ent_t {
- hbool_t locked; /*entry is locked in cache */
- hbool_t dirty; /*needs to be written to disk? */
- hbool_t deleted; /*chunk about to be deleted (do not flush) */
- hsize_t offset[H5O_LAYOUT_NDIMS]; /*chunk name */
- uint32_t rd_count; /*bytes remaining to be read */
- uint32_t wr_count; /*bytes remaining to be written */
- haddr_t chunk_addr; /*address of chunk in file */
- uint8_t *chunk; /*the unfiltered chunk data */
- unsigned idx; /*index in hash table */
- struct H5D_rdcc_ent_t *next;/*next item in doubly-linked list */
- struct H5D_rdcc_ent_t *prev;/*previous item in doubly-linked list */
+ hbool_t locked; /*entry is locked in cache */
+ hbool_t dirty; /*needs to be written to disk? */
+ hbool_t deleted; /*chunk about to be deleted (do not flush) */
+ hsize_t offset[H5O_LAYOUT_NDIMS]; /*chunk name */
+ uint32_t rd_count; /*bytes remaining to be read */
+ uint32_t wr_count; /*bytes remaining to be written */
+ haddr_t chunk_addr; /*address of chunk in file */
+ uint8_t * chunk; /*the unfiltered chunk data */
+ unsigned idx; /*index in hash table */
+ struct H5D_rdcc_ent_t *next; /*next item in doubly-linked list */
+ struct H5D_rdcc_ent_t *prev; /*previous item in doubly-linked list */
} H5D_rdcc_ent_t;
typedef H5D_rdcc_ent_t *H5D_rdcc_ent_ptr_t; /* For free lists */
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -519,151 +523,127 @@ H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_CHUNK[1];
/* Chunked layout operations */
H5_DLLVAR const H5D_chunk_ops_t H5D_COPS_BTREE[1];
-
/******************************/
/* Package Private Prototypes */
/******************************/
H5_DLL herr_t H5D__term_pub_interface(void);
H5_DLL herr_t H5D__term_deprec_interface(void);
-H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space,
- hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id);
-H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name,
- hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id,
- hid_t dapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation,
- hid_t dxpl_id);
-H5_DLL herr_t H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
- hbool_t full_overwrite, hsize_t old_dim[]);
-H5_DLL herr_t H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size);
-H5_DLL herr_t H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, hsize_t *storage_size);
+H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t dapl_id,
+ hid_t dxpl_id);
+H5_DLL H5D_t * H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H5S_t *space,
+ hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id);
+H5_DLL herr_t H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
+ hbool_t full_overwrite, hsize_t old_dim[]);
+H5_DLL herr_t H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size);
+H5_DLL herr_t H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset,
+ hsize_t *storage_size);
H5_DLL haddr_t H5D__get_offset(const H5D_t *dset);
-H5_DLL void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);
-H5_DLL herr_t H5D__vlen_get_buf_size(void *elem, hid_t type_id, unsigned ndim,
- const hsize_t *point, void *op_data);
-H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
-H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
-H5_DLL herr_t H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
-H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
-H5_DLL herr_t H5D__mark(const H5D_t *dataset, hid_t dxpl_id, unsigned flags);
-H5_DLL herr_t H5D__flush_real(H5D_t *dataset, hid_t dxpl_id);
+H5_DLL void * H5D__vlen_get_buf_size_alloc(size_t size, void *info);
+H5_DLL herr_t H5D__vlen_get_buf_size(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point,
+ void *op_data);
+H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
+H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
+H5_DLL herr_t H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
+H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
+H5_DLL herr_t H5D__mark(const H5D_t *dataset, hid_t dxpl_id, unsigned flags);
+H5_DLL herr_t H5D__flush_real(H5D_t *dataset, hid_t dxpl_id);
/* Internal I/O routines */
-H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id,
- const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist,
- void *buf/*out*/);
+H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
+ hid_t dset_xfer_plist, void *buf /*out*/);
/* Functions that perform direct serial I/O operations */
-H5_DLL herr_t H5D__select_read(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
-H5_DLL herr_t H5D__select_write(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
/* Functions that perform scatter-gather serial I/O operations */
-H5_DLL herr_t H5D__scatter_mem(const void *_tscat_buf,
- const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
- const H5D_dxpl_cache_t *dxpl_cache, void *_buf);
-H5_DLL herr_t H5D__scatgath_read(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
-H5_DLL herr_t H5D__scatgath_write(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__scatter_mem(const void *_tscat_buf, const H5S_t *space, H5S_sel_iter_t *iter,
+ size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, void *_buf);
+H5_DLL herr_t H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
/* Functions that operate on dataset's layout information */
H5_DLL herr_t H5D__layout_set_io_ops(const H5D_t *dataset);
-H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout,
- hbool_t include_compact_data);
-H5_DLL herr_t H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh,
- H5D_t *dset, hid_t dapl_id);
-H5_DLL herr_t H5D__layout_oh_read(H5D_t *dset, hid_t dxpl_id, hid_t dapl_id,
- H5P_genplist_t *plist);
-H5_DLL herr_t H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh,
- unsigned update_flags);
+H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data);
+H5_DLL herr_t H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset, hid_t dapl_id);
+H5_DLL herr_t H5D__layout_oh_read(H5D_t *dset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist);
+H5_DLL herr_t H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_flags);
/* Functions that operate on contiguous storage */
-H5_DLL herr_t H5D__contig_alloc(H5F_t *f, hid_t dxpl_id,
- H5O_storage_contig_t *storage);
+H5_DLL herr_t H5D__contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage);
H5_DLL hbool_t H5D__contig_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL herr_t H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id);
-H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm);
-H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm);
-H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
- H5F_t *f_dst, H5O_storage_contig_t *storage_dst, H5T_t *src_dtype,
- H5O_copy_t *cpy_info, hid_t dxpl_id);
-H5_DLL herr_t H5D__contig_delete(H5F_t *f, hid_t dxpl_id,
- const H5O_storage_t *store);
-
+H5_DLL hbool_t H5D__contig_is_data_cached(const H5D_shared_t *shared_dset);
+H5_DLL herr_t H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id);
+H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f_dst,
+ H5O_storage_contig_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info,
+ hid_t dxpl_id);
+H5_DLL herr_t H5D__contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *store);
/* Functions that operate on chunked dataset storage */
-H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
- hbool_t write_op);
-H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/, hid_t dxpl_id);
-H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
-H5_DLL herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
- hid_t dapl_id);
+H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_op);
+H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/, hid_t dxpl_id);
+H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
+H5_DLL herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id);
H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id,
- const hsize_t *chunk_offset, hsize_t chunk_idx, H5D_chunk_ud_t *udata);
-H5_DLL void *H5D__chunk_lock(const H5D_io_info_t *io_info,
- H5D_chunk_ud_t *udata, hbool_t relax);
-H5_DLL herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info,
- const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk,
- uint32_t naccessed);
-H5_DLL herr_t H5D__chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes);
-H5_DLL herr_t H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id,
- hbool_t full_overwrite, hsize_t old_dim[]);
-H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id,
- const hsize_t *old_dim);
+H5_DLL hbool_t H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset);
+H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *chunk_offset,
+ hsize_t chunk_idx, H5D_chunk_ud_t *udata);
+H5_DLL void * H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax);
+H5_DLL herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata, hbool_t dirty,
+ void *chunk, uint32_t naccessed);
+H5_DLL herr_t H5D__chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes);
+H5_DLL herr_t H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
+ hsize_t old_dim[]);
+H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[]);
#endif /* H5_HAVE_PARALLEL */
H5_DLL herr_t H5D__chunk_update_cache(H5D_t *dset, hid_t dxpl_id);
-H5_DLL herr_t H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
- H5O_layout_chunk_t *layout_src, H5F_t *f_dst, H5O_storage_chunk_t *storage_dst,
- const H5S_extent_t *ds_extent_src, const H5T_t *dt_src,
- const H5O_pline_t *pline_src, H5O_copy_t *cpy_info, hid_t dxpl_id);
-H5_DLL herr_t H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
- const H5O_pline_t *pline, hsize_t *btree_size);
+H5_DLL herr_t H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk_t *layout_src,
+ H5F_t *f_dst, H5O_storage_chunk_t *storage_dst,
+ const H5S_extent_t *ds_extent_src, const H5T_t *dt_src,
+ const H5O_pline_t *pline_src, H5O_copy_t *cpy_info, hid_t dxpl_id);
+H5_DLL herr_t H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout, const H5O_pline_t *pline,
+ hsize_t *btree_size);
H5_DLL herr_t H5D__chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream);
H5_DLL herr_t H5D__chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset);
-H5_DLL herr_t H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5O_storage_t *store);
-H5_DLL herr_t H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters,
- hsize_t *offset, uint32_t data_size, const void *buf);
-H5_DLL herr_t H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset,
- uint32_t *filters, void *buf);
+H5_DLL herr_t H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *store);
+H5_DLL herr_t H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsize_t *offset,
+ uint32_t data_size, const void *buf);
+H5_DLL herr_t H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset, uint32_t *filters,
+ void *buf);
#ifdef H5D_CHUNK_DEBUG
H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, hbool_t headers);
#endif /* H5D_CHUNK_DEBUG */
/* Functions that operate on compact dataset storage */
H5_DLL herr_t H5D__compact_fill(const H5D_t *dset, hid_t dxpl_id);
-H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src,
- H5F_t *f_dst, H5O_storage_compact_t *storage_dst, H5T_t *src_dtype,
- H5O_copy_t *cpy_info, hid_t dxpl_id);
+H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
+ H5O_storage_compact_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info,
+ hid_t dxpl_id);
/* Functions that operate on EFL (External File List)*/
H5_DLL hbool_t H5D__efl_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl,
- hsize_t *heap_size);
+H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size);
/* Functions that perform fill value operations on datasets */
-H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
- const H5T_t *buf_type, const H5S_t *space, hid_t dxpl_id);
-H5_DLL herr_t H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
- H5MM_allocate_t alloc_func, void *alloc_info,
- H5MM_free_t free_func, void *free_info,
- const H5O_fill_t *fill, const H5T_t *dset_type, hid_t dset_type_id,
- size_t nelmts, size_t min_buf_size, hid_t dxpl_id);
-H5_DLL herr_t H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts,
- hid_t dxpl_id);
+H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type,
+ const H5S_t *space, hid_t dxpl_id);
+H5_DLL herr_t H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocate_t alloc_func,
+ void *alloc_info, H5MM_free_t free_func, void *free_info, const H5O_fill_t *fill,
+ const H5T_t *dset_type, hid_t dset_type_id, size_t nelmts, size_t min_buf_size,
+ hid_t dxpl_id);
+H5_DLL herr_t H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id);
H5_DLL herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info);
#ifdef H5_HAVE_PARALLEL
@@ -672,39 +652,36 @@ H5_DLL herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info);
#ifndef H5Dmpio_DEBUG
#define H5Dmpio_DEBUG
#endif /*H5Dmpio_DEBUG*/
-#endif/*H5S_DEBUG*/
+#endif /*H5S_DEBUG*/
/* MPI-IO function to read, it will select either regular or irregular read */
-H5_DLL herr_t H5D__mpio_select_read(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
/* MPI-IO function to write, it will select either regular or irregular read */
-H5_DLL herr_t H5D__mpio_select_write(const H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+H5_DLL herr_t H5D__mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
/* MPI-IO functions to handle contiguous collective IO */
-H5_DLL herr_t H5D__contig_collective_read(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, H5D_chunk_map_t *fm);
-H5_DLL herr_t H5D__contig_collective_write(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *fm);
/* MPI-IO functions to handle chunked collective IO */
-H5_DLL herr_t H5D__chunk_collective_read(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, H5D_chunk_map_t *fm);
-H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space, H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *fm);
+H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+ hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ H5D_chunk_map_t *fm);
/* MPI-IO function to check if a direct I/O transfer is possible between
* memory and the file */
-H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info,
- const H5S_t *file_space, const H5S_t *mem_space,
- const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm,
- H5P_genplist_t *dx_plist);
+H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
+ const H5S_t *mem_space, const H5D_type_info_t *type_info,
+ const H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist);
#endif /* H5_HAVE_PARALLEL */
@@ -717,4 +694,3 @@ H5_DLL herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *
#endif /* H5D_TESTING */
#endif /*_H5Dpkg_H*/
-
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 0fcd8c5..cc9330b 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,11 +21,10 @@
#include "H5Dpublic.h"
/* Private headers needed by this file */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspaces */
-#include "H5Zprivate.h" /* Data filters */
-
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspaces */
+#include "H5Zprivate.h" /* Data filters */
/**************************/
/* Library Private Macros */
@@ -33,80 +32,81 @@
/*
* Feature: Define H5D_DEBUG on the compiler command line if you want to
- * debug dataset I/O. NDEBUG must not be defined in order for this
- * to have any effect.
+ * debug dataset I/O. NDEBUG must not be defined in order for this
+ * to have any effect.
*/
#ifdef NDEBUG
-# undef H5D_DEBUG
+#undef H5D_DEBUG
#endif
/* ======== Dataset creation property names ======== */
-#define H5D_CRT_LAYOUT_NAME "layout" /* Storage layout */
-#define H5D_CRT_FILL_VALUE_NAME "fill_value" /* Fill value */
+#define H5D_CRT_LAYOUT_NAME "layout" /* Storage layout */
+#define H5D_CRT_FILL_VALUE_NAME "fill_value" /* Fill value */
#define H5D_CRT_ALLOC_TIME_STATE_NAME "alloc_time_state" /* Space allocation time state */
-#define H5D_CRT_EXT_FILE_LIST_NAME "efl" /* External file list */
+#define H5D_CRT_EXT_FILE_LIST_NAME "efl" /* External file list */
/* ======== Dataset access property names ======== */
-#define H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */
-#define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
-#define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
-#define H5D_ACS_EFILE_PREFIX_NAME "external file prefix" /* External file prefix */
+#define H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */
+#define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
+#define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
+#define H5D_ACS_EFILE_PREFIX_NAME "external file prefix" /* External file prefix */
/* ======== Data transfer properties ======== */
-#define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */
-#define H5D_XFER_TCONV_BUF_NAME "tconv_buf" /* Type conversion buffer */
-#define H5D_XFER_BKGR_BUF_NAME "bkgr_buf" /* Background buffer */
-#define H5D_XFER_BKGR_BUF_TYPE_NAME "bkgr_buf_type" /* Background buffer type */
+#define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */
+#define H5D_XFER_TCONV_BUF_NAME "tconv_buf" /* Type conversion buffer */
+#define H5D_XFER_BKGR_BUF_NAME "bkgr_buf" /* Background buffer */
+#define H5D_XFER_BKGR_BUF_TYPE_NAME "bkgr_buf_type" /* Background buffer type */
#define H5D_XFER_BTREE_SPLIT_RATIO_NAME "btree_split_ratio" /* B-tree node splitting ratio */
-#define H5D_XFER_VLEN_ALLOC_NAME "vlen_alloc" /* Vlen allocation function */
-#define H5D_XFER_VLEN_ALLOC_INFO_NAME "vlen_alloc_info" /* Vlen allocation info */
-#define H5D_XFER_VLEN_FREE_NAME "vlen_free" /* Vlen free function */
-#define H5D_XFER_VLEN_FREE_INFO_NAME "vlen_free_info" /* Vlen free info */
-#define H5D_XFER_VFL_ID_NAME "vfl_id" /* File driver ID */
-#define H5D_XFER_VFL_INFO_NAME "vfl_info" /* File driver info */
-#define H5D_XFER_HYPER_VECTOR_SIZE_NAME "vec_size" /* Hyperslab vector size */
+#define H5D_XFER_VLEN_ALLOC_NAME "vlen_alloc" /* Vlen allocation function */
+#define H5D_XFER_VLEN_ALLOC_INFO_NAME "vlen_alloc_info" /* Vlen allocation info */
+#define H5D_XFER_VLEN_FREE_NAME "vlen_free" /* Vlen free function */
+#define H5D_XFER_VLEN_FREE_INFO_NAME "vlen_free_info" /* Vlen free info */
+#define H5D_XFER_VFL_ID_NAME "vfl_id" /* File driver ID */
+#define H5D_XFER_VFL_INFO_NAME "vfl_info" /* File driver info */
+#define H5D_XFER_HYPER_VECTOR_SIZE_NAME "vec_size" /* Hyperslab vector size */
#ifdef H5_HAVE_PARALLEL
-#define H5D_XFER_IO_XFER_MODE_NAME "io_xfer_mode" /* I/O transfer mode */
-#define H5D_XFER_MPIO_COLLECTIVE_OPT_NAME "mpio_collective_opt" /* Optimization of MPI-IO transfer mode */
-#define H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME "mpio_chunk_opt_hard"
-#define H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME "mpio_chunk_opt_num"
-#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio"
+#define H5D_XFER_IO_XFER_MODE_NAME "io_xfer_mode" /* I/O transfer mode */
+#define H5D_XFER_MPIO_COLLECTIVE_OPT_NAME "mpio_collective_opt" /* Optimization of MPI-IO transfer mode */
+#define H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME "mpio_chunk_opt_hard"
+#define H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME "mpio_chunk_opt_num"
+#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio"
#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME "actual_chunk_opt_mode"
-#define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode"
-#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME "local_no_collective_cause" /* cause of broken collective I/O in each process */
-#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME "global_no_collective_cause" /* cause of broken collective I/O in all processes */
-#endif /* H5_HAVE_PARALLEL */
-#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
-#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
-#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
-#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
+#define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode"
+#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME \
+ "local_no_collective_cause" /* cause of broken collective I/O in each process */
+#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME \
+ "global_no_collective_cause" /* cause of broken collective I/O in all processes */
+#endif /* H5_HAVE_PARALLEL */
+#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
+#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
+#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
+#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
/* Collective chunk instrumentation properties */
-#define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard"
-#define H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME "coll_chunk_multi_hard"
-#define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_true"
-#define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_false"
+#define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard"
+#define H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME "coll_chunk_multi_hard"
+#define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_true"
+#define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_false"
#define H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME "coll_chunk_multi_coll"
-#define H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME "coll_chunk_multi_ind"
+#define H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME "coll_chunk_multi_ind"
/* Definitions for all collective chunk instrumentation properties */
-#define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned)
-#define H5D_XFER_COLL_CHUNK_DEF 1
-#define H5D_XFER_COLL_CHUNK_FIX 0
+#define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned)
+#define H5D_XFER_COLL_CHUNK_DEF 1
+#define H5D_XFER_COLL_CHUNK_FIX 0
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Default temporary buffer size */
-#define H5D_TEMP_BUF_SIZE (1024 * 1024)
+#define H5D_TEMP_BUF_SIZE (1024 * 1024)
/* Default I/O vector size */
-#define H5D_IO_VECTOR_SIZE 1024
+#define H5D_IO_VECTOR_SIZE 1024
/* Default VL allocation & free info */
-#define H5D_VLEN_ALLOC NULL
-#define H5D_VLEN_ALLOC_INFO NULL
-#define H5D_VLEN_FREE NULL
-#define H5D_VLEN_FREE_INFO NULL
-
+#define H5D_VLEN_ALLOC NULL
+#define H5D_VLEN_ALLOC_INFO NULL
+#define H5D_VLEN_FREE NULL
+#define H5D_VLEN_FREE_INFO NULL
/****************************/
/* Library Private Typedefs */
@@ -117,41 +117,40 @@ typedef struct H5D_t H5D_t;
/* Typedef for cached dataset transfer property list information */
typedef struct H5D_dxpl_cache_t {
- size_t max_temp_buf; /* Maximum temporary buffer size (H5D_XFER_MAX_TEMP_BUF_NAME) */
- void *tconv_buf; /* Temporary conversion buffer (H5D_XFER_TCONV_BUF_NAME) */
- void *bkgr_buf; /* Background conversion buffer (H5D_XFER_BKGR_BUF_NAME) */
- H5T_bkg_t bkgr_buf_type; /* Background buffer type (H5D_XFER_BKGR_BUF_NAME) */
- H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */
- double btree_split_ratio[3];/* B-tree split ratios (H5D_XFER_BTREE_SPLIT_RATIO_NAME) */
- size_t vec_size; /* Size of hyperslab vector (H5D_XFER_HYPER_VECTOR_SIZE_NAME) */
+ size_t max_temp_buf; /* Maximum temporary buffer size (H5D_XFER_MAX_TEMP_BUF_NAME) */
+ void * tconv_buf; /* Temporary conversion buffer (H5D_XFER_TCONV_BUF_NAME) */
+ void * bkgr_buf; /* Background conversion buffer (H5D_XFER_BKGR_BUF_NAME) */
+ H5T_bkg_t bkgr_buf_type; /* Background buffer type (H5D_XFER_BKGR_BUF_NAME) */
+ H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */
+ double btree_split_ratio[3]; /* B-tree split ratios (H5D_XFER_BTREE_SPLIT_RATIO_NAME) */
+ size_t vec_size; /* Size of hyperslab vector (H5D_XFER_HYPER_VECTOR_SIZE_NAME) */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode; /* Parallel transfer for this request (H5D_XFER_IO_XFER_MODE_NAME) */
- H5FD_mpio_collective_opt_t coll_opt_mode; /* Parallel transfer with independent IO or collective IO with this mode */
-#endif /*H5_HAVE_PARALLEL*/
- H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */
+ H5FD_mpio_collective_opt_t
+ coll_opt_mode; /* Parallel transfer with independent IO or collective IO with this mode */
+#endif /*H5_HAVE_PARALLEL*/
+ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */
H5Z_data_xform_t *data_xform_prop; /* Data transform prop (H5D_XFER_XFORM_NAME) */
} H5D_dxpl_cache_t;
/* Typedef for cached dataset creation property list information */
typedef struct H5D_dcpl_cache_t {
- H5O_fill_t fill; /* Fill value info (H5D_CRT_FILL_VALUE_NAME) */
- H5O_pline_t pline; /* I/O pipeline info (H5O_CRT_PIPELINE_NAME) */
- H5O_efl_t efl; /* External file list info (H5D_CRT_EXT_FILE_LIST_NAME) */
+ H5O_fill_t fill; /* Fill value info (H5D_CRT_FILL_VALUE_NAME) */
+ H5O_pline_t pline; /* I/O pipeline info (H5O_CRT_PIPELINE_NAME) */
+ H5O_efl_t efl; /* External file list info (H5D_CRT_EXT_FILE_LIST_NAME) */
} H5D_dcpl_cache_t;
/* Callback information for copying datasets */
typedef struct H5D_copy_file_ud_t {
- H5O_copy_file_ud_common_t common; /* Shared information (must be first) */
- struct H5S_extent_t *src_space_extent; /* Copy of dataspace extent for dataset */
- H5T_t *src_dtype; /* Copy of datatype for dataset */
+ H5O_copy_file_ud_common_t common; /* Shared information (must be first) */
+ struct H5S_extent_t * src_space_extent; /* Copy of dataspace extent for dataset */
+ H5T_t * src_dtype; /* Copy of datatype for dataset */
} H5D_copy_file_ud_t;
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/******************************/
/* Library Private Prototypes */
/******************************/
@@ -163,21 +162,19 @@ H5_DLL H5O_loc_t *H5D_oloc(H5D_t *dataset);
H5_DLL H5G_name_t *H5D_nameof(H5D_t *dataset);
H5_DLL H5T_t *H5D_typeof(const H5D_t *dset);
H5_DLL herr_t H5D_flush(const H5F_t *f, hid_t dxpl_id);
-H5_DLL hid_t H5D_get_create_plist(H5D_t *dset);
-H5_DLL hid_t H5D_get_access_plist(H5D_t *dset);
-H5_DLL hid_t H5D_get_space(H5D_t *dset);
-H5_DLL hid_t H5D_get_type(H5D_t *dset);
+H5_DLL hid_t H5D_get_create_plist(H5D_t *dset);
+H5_DLL hid_t H5D_get_access_plist(H5D_t *dset);
+H5_DLL hid_t H5D_get_space(H5D_t *dset);
+H5_DLL hid_t H5D_get_type(H5D_t *dset);
/* Functions that operate on vlen data */
-H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id,
- void *buf);
+H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, void *buf);
/* Functions that operate on chunked storage */
H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
/* Functions that operate on indexed storage */
-H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
- int indent, int fwidth, unsigned ndims);
+H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ unsigned ndims);
#endif /* _H5Dprivate_H */
-
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 41bcc40..a0dc74c 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,20 +28,20 @@
/*****************/
/* Macros used to "unset" chunk cache configuration parameters */
-#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
-#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t) -1)
-#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0f)
+#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t)-1)
+#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t)-1)
+#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0f)
/* Property names for H5LTDdirect_chunk_write */
-#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
-#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME "direct_chunk_filters"
-#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME "direct_chunk_offset"
-#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME "direct_chunk_datasize"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME "direct_chunk_filters"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME "direct_chunk_offset"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME "direct_chunk_datasize"
/* Property names for H5LTDdirect_chunk_read */
-#define H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME "direct_chunk_read_flag"
-#define H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME "direct_chunk_read_offset"
-#define H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME "direct_chunk_read_filters"
+#define H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME "direct_chunk_read_flag"
+#define H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME "direct_chunk_read_offset"
+#define H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME "direct_chunk_read_filters"
/*******************/
/* Public Typedefs */
@@ -49,50 +49,50 @@
/* Values for the H5D_LAYOUT property */
typedef enum H5D_layout_t {
- H5D_LAYOUT_ERROR = -1,
+ H5D_LAYOUT_ERROR = -1,
- H5D_COMPACT = 0, /*raw data is very small */
- H5D_CONTIGUOUS = 1, /*the default */
- H5D_CHUNKED = 2, /*slow and fancy */
- H5D_NLAYOUTS = 3 /*this one must be last! */
+ H5D_COMPACT = 0, /*raw data is very small */
+ H5D_CONTIGUOUS = 1, /*the default */
+ H5D_CHUNKED = 2, /*slow and fancy */
+ H5D_NLAYOUTS = 3 /*this one must be last! */
} H5D_layout_t;
/* Types of chunk index data structures */
typedef enum H5D_chunk_index_t {
- H5D_CHUNK_BTREE = 0 /* v1 B-tree index */
+ H5D_CHUNK_BTREE = 0 /* v1 B-tree index */
} H5D_chunk_index_t;
/* Values for the space allocation time property */
typedef enum H5D_alloc_time_t {
- H5D_ALLOC_TIME_ERROR = -1,
- H5D_ALLOC_TIME_DEFAULT = 0,
- H5D_ALLOC_TIME_EARLY = 1,
- H5D_ALLOC_TIME_LATE = 2,
- H5D_ALLOC_TIME_INCR = 3
+ H5D_ALLOC_TIME_ERROR = -1,
+ H5D_ALLOC_TIME_DEFAULT = 0,
+ H5D_ALLOC_TIME_EARLY = 1,
+ H5D_ALLOC_TIME_LATE = 2,
+ H5D_ALLOC_TIME_INCR = 3
} H5D_alloc_time_t;
/* Values for the status of space allocation */
typedef enum H5D_space_status_t {
- H5D_SPACE_STATUS_ERROR = -1,
- H5D_SPACE_STATUS_NOT_ALLOCATED = 0,
- H5D_SPACE_STATUS_PART_ALLOCATED = 1,
- H5D_SPACE_STATUS_ALLOCATED = 2
+ H5D_SPACE_STATUS_ERROR = -1,
+ H5D_SPACE_STATUS_NOT_ALLOCATED = 0,
+ H5D_SPACE_STATUS_PART_ALLOCATED = 1,
+ H5D_SPACE_STATUS_ALLOCATED = 2
} H5D_space_status_t;
/* Values for time of writing fill value property */
typedef enum H5D_fill_time_t {
- H5D_FILL_TIME_ERROR = -1,
+ H5D_FILL_TIME_ERROR = -1,
H5D_FILL_TIME_ALLOC = 0,
- H5D_FILL_TIME_NEVER = 1,
- H5D_FILL_TIME_IFSET = 2
+ H5D_FILL_TIME_NEVER = 1,
+ H5D_FILL_TIME_IFSET = 2
} H5D_fill_time_t;
/* Values for fill value status */
typedef enum H5D_fill_value_t {
- H5D_FILL_VALUE_ERROR =-1,
- H5D_FILL_VALUE_UNDEFINED =0,
- H5D_FILL_VALUE_DEFAULT =1,
- H5D_FILL_VALUE_USER_DEFINED =2
+ H5D_FILL_VALUE_ERROR = -1,
+ H5D_FILL_VALUE_UNDEFINED = 0,
+ H5D_FILL_VALUE_DEFAULT = 1,
+ H5D_FILL_VALUE_USER_DEFINED = 2
} H5D_fill_value_t;
/********************/
@@ -107,48 +107,43 @@ extern "C" {
#endif
/* Define the operator function pointer for H5Diterate() */
-typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim,
- const hsize_t *point, void *operator_data);
+typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point,
+ void *operator_data);
/* Define the operator function pointer for H5Dscatter() */
-typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/,
- size_t *src_buf_bytes_used/*out*/,
+typedef herr_t (*H5D_scatter_func_t)(const void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/,
void *op_data);
/* Define the operator function pointer for H5Dgather() */
-typedef herr_t (*H5D_gather_func_t)(const void *dst_buf,
- size_t dst_buf_bytes_used, void *op_data);
-
-H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id,
- hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id);
-H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id,
- hid_t plist_id, hid_t dapl_id);
-H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id);
-H5_DLL herr_t H5Dclose(hid_t dset_id);
-H5_DLL hid_t H5Dget_space(hid_t dset_id);
-H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
-H5_DLL hid_t H5Dget_type(hid_t dset_id);
-H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
-H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
+typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_used, void *op_data);
+
+H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id,
+ hid_t dcpl_id, hid_t dapl_id);
+H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id, hid_t plist_id, hid_t dapl_id);
+H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id);
+H5_DLL herr_t H5Dclose(hid_t dset_id);
+H5_DLL hid_t H5Dget_space(hid_t dset_id);
+H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
+H5_DLL hid_t H5Dget_type(hid_t dset_id);
+H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
+H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
-H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
+H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
-H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
- hid_t file_space_id, hid_t plist_id, void *buf/*out*/);
-H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
- hid_t file_space_id, hid_t plist_id, const void *buf);
-H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id,
- H5D_operator_t op, void *operator_data);
-H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
-H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size);
-H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf,
- hid_t buf_type, hid_t space);
-H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
-H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id,
- hid_t dst_space_id, void *dst_buf);
-H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
- size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data);
-H5_DLL herr_t H5Ddebug(hid_t dset_id);
+H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
+ hid_t plist_id, void *buf /*out*/);
+H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
+ hid_t plist_id, const void *buf);
+H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *operator_data);
+H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
+H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size);
+H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, hid_t buf_type, hid_t space);
+H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
+H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id,
+ void *dst_buf);
+H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size,
+ void *dst_buf, H5D_gather_func_t op, void *op_data);
+H5_DLL herr_t H5Ddebug(hid_t dset_id);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
@@ -158,14 +153,11 @@ H5_DLL herr_t H5Ddebug(hid_t dset_id);
/* Macros */
-
/* Typedefs */
-
/* Function prototypes */
-H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id,
- hid_t space_id, hid_t dcpl_id);
-H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
+H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id);
+H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 8b58f62..95d5a3f 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,52 +15,43 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5D__scatter_file(const H5D_io_info_t *io_info,
- const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts,
- const void *buf);
-static size_t H5D__gather_file(const H5D_io_info_t *io_info,
- const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts,
- void *buf);
-static size_t H5D__gather_mem(const void *_buf,
- const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
- const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf/*out*/);
-static herr_t H5D__compound_opt_read(size_t nelmts, const H5S_t *mem_space,
- H5S_sel_iter_t *iter, const H5D_dxpl_cache_t *dxpl_cache,
- const H5D_type_info_t *type_info, void *user_buf/*out*/);
+static herr_t H5D__scatter_file(const H5D_io_info_t *io_info, const H5S_t *file_space,
+ H5S_sel_iter_t *file_iter, size_t nelmts, const void *buf);
+static size_t H5D__gather_file(const H5D_io_info_t *io_info, const H5S_t *file_space,
+ H5S_sel_iter_t *file_iter, size_t nelmts, void *buf);
+static size_t H5D__gather_mem(const void *_buf, const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
+ const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf /*out*/);
+static herr_t H5D__compound_opt_read(size_t nelmts, const H5S_t *mem_space, H5S_sel_iter_t *iter,
+ const H5D_dxpl_cache_t *dxpl_cache, const H5D_type_info_t *type_info,
+ void *user_buf /*out*/);
static herr_t H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info);
-
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -71,8 +62,6 @@ H5FL_SEQ_EXTERN(size_t);
/* Declare a free list to manage sequences of hsize_t */
H5FL_SEQ_EXTERN(hsize_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5D__scatter_file
*
@@ -90,22 +79,21 @@ H5FL_SEQ_EXTERN(hsize_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__scatter_file(const H5D_io_info_t *_io_info,
- const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
- const void *_buf)
+H5D__scatter_file(const H5D_io_info_t *_io_info, const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
+ const void *_buf)
{
- H5D_io_info_t tmp_io_info; /* Temporary I/O info object */
- hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- hsize_t *off = NULL; /* Pointer to sequence offsets */
- hsize_t mem_off; /* Offset in memory */
- size_t mem_curr_seq; /* "Current sequence" in memory */
- size_t dset_curr_seq; /* "Current sequence" in dataset */
- size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t *len = NULL; /* Array to store sequence lengths */
- size_t orig_mem_len, mem_len; /* Length of sequence in memory */
- size_t nseq; /* Number of sequences generated */
- size_t nelem; /* Number of elements used in sequences */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_io_info_t tmp_io_info; /* Temporary I/O info object */
+ hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
+ hsize_t * off = NULL; /* Pointer to sequence offsets */
+ hsize_t mem_off; /* Offset in memory */
+ size_t mem_curr_seq; /* "Current sequence" in memory */
+ size_t dset_curr_seq; /* "Current sequence" in dataset */
+ size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
+ size_t * len = NULL; /* Array to store sequence lengths */
+ size_t orig_mem_len, mem_len; /* Length of sequence in memory */
+ size_t nseq; /* Number of sequences generated */
+ size_t nelem; /* Number of elements used in sequences */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -119,13 +107,13 @@ H5D__scatter_file(const H5D_io_info_t *_io_info,
/* Set up temporary I/O info object */
HDmemcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
tmp_io_info.op_type = H5D_IO_OP_WRITE;
- tmp_io_info.u.wbuf = _buf;
+ tmp_io_info.u.wbuf = _buf;
/* Allocate the vector I/O arrays */
- if(tmp_io_info.dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (len = H5FL_SEQ_MALLOC(size_t, tmp_io_info.dxpl_cache->vec_size)))
+ if (tmp_io_info.dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, tmp_io_info.dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O length vector array")
- if(NULL == (off = H5FL_SEQ_MALLOC(hsize_t, tmp_io_info.dxpl_cache->vec_size)))
+ if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, tmp_io_info.dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O offset vector array")
} /* end if */
else {
@@ -134,19 +122,20 @@ H5D__scatter_file(const H5D_io_info_t *_io_info,
} /* end else */
/* Loop until all elements are written */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Get list of sequences for selection to write */
- if(H5S_SELECT_GET_SEQ_LIST(space, H5S_GET_SEQ_LIST_SORTED, iter, tmp_io_info.dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) < 0)
+ if (H5S_SELECT_GET_SEQ_LIST(space, H5S_GET_SEQ_LIST_SORTED, iter, tmp_io_info.dxpl_cache->vec_size,
+ nelmts, &nseq, &nelem, off, len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
/* Reset the current sequence information */
mem_curr_seq = dset_curr_seq = 0;
orig_mem_len = mem_len = nelem * iter->elmt_size;
- mem_off = 0;
+ mem_off = 0;
/* Write sequence list out */
- if((*tmp_io_info.layout_ops.writevv)(&tmp_io_info, nseq, &dset_curr_seq,
- len, off, (size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0)
+ if ((*tmp_io_info.layout_ops.writevv)(&tmp_io_info, nseq, &dset_curr_seq, len, off, (size_t)1,
+ &mem_curr_seq, &mem_len, &mem_off) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
/* Update buffer */
@@ -158,15 +147,14 @@ H5D__scatter_file(const H5D_io_info_t *_io_info,
done:
/* Release resources, if allocated */
- if(len && len != _len)
+ if (len && len != _len)
len = H5FL_SEQ_FREE(size_t, len);
- if(off && off != _off)
+ if (off && off != _off)
off = H5FL_SEQ_FREE(hsize_t, off);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__scatter_file() */
-
/*-------------------------------------------------------------------------
* Function: H5D__gather_file
*
@@ -189,22 +177,21 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5D__gather_file(const H5D_io_info_t *_io_info,
- const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
- void *_buf/*out*/)
+H5D__gather_file(const H5D_io_info_t *_io_info, const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
+ void *_buf /*out*/)
{
- H5D_io_info_t tmp_io_info; /* Temporary I/O info object */
- hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- hsize_t *off = NULL; /* Pointer to sequence offsets */
- hsize_t mem_off; /* Offset in memory */
- size_t mem_curr_seq; /* "Current sequence" in memory */
- size_t dset_curr_seq; /* "Current sequence" in dataset */
- size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t *len = NULL; /* Pointer to sequence lengths */
- size_t orig_mem_len, mem_len; /* Length of sequence in memory */
- size_t nseq; /* Number of sequences generated */
- size_t nelem; /* Number of elements used in sequences */
- size_t ret_value = nelmts; /* Return value */
+ H5D_io_info_t tmp_io_info; /* Temporary I/O info object */
+ hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
+ hsize_t * off = NULL; /* Pointer to sequence offsets */
+ hsize_t mem_off; /* Offset in memory */
+ size_t mem_curr_seq; /* "Current sequence" in memory */
+ size_t dset_curr_seq; /* "Current sequence" in dataset */
+ size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
+ size_t * len = NULL; /* Pointer to sequence lengths */
+ size_t orig_mem_len, mem_len; /* Length of sequence in memory */
+ size_t nseq; /* Number of sequences generated */
+ size_t nelem; /* Number of elements used in sequences */
+ size_t ret_value = nelmts; /* Return value */
FUNC_ENTER_STATIC
@@ -220,13 +207,13 @@ H5D__gather_file(const H5D_io_info_t *_io_info,
/* Set up temporary I/O info object */
HDmemcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
tmp_io_info.op_type = H5D_IO_OP_READ;
- tmp_io_info.u.rbuf = _buf;
+ tmp_io_info.u.rbuf = _buf;
/* Allocate the vector I/O arrays */
- if(tmp_io_info.dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (len = H5FL_SEQ_MALLOC(size_t, tmp_io_info.dxpl_cache->vec_size)))
+ if (tmp_io_info.dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, tmp_io_info.dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "can't allocate I/O length vector array")
- if(NULL == (off = H5FL_SEQ_MALLOC(hsize_t, tmp_io_info.dxpl_cache->vec_size)))
+ if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, tmp_io_info.dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "can't allocate I/O offset vector array")
} /* end if */
else {
@@ -235,19 +222,20 @@ H5D__gather_file(const H5D_io_info_t *_io_info,
} /* end else */
/* Loop until all elements are read */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Get list of sequences for selection to read */
- if(H5S_SELECT_GET_SEQ_LIST(space, H5S_GET_SEQ_LIST_SORTED, iter, tmp_io_info.dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) < 0)
+ if (H5S_SELECT_GET_SEQ_LIST(space, H5S_GET_SEQ_LIST_SORTED, iter, tmp_io_info.dxpl_cache->vec_size,
+ nelmts, &nseq, &nelem, off, len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
/* Reset the current sequence information */
mem_curr_seq = dset_curr_seq = 0;
orig_mem_len = mem_len = nelem * iter->elmt_size;
- mem_off = 0;
+ mem_off = 0;
/* Read sequence list in */
- if((*tmp_io_info.layout_ops.readvv)(&tmp_io_info, nseq, &dset_curr_seq,
- len, off, (size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0)
+ if ((*tmp_io_info.layout_ops.readvv)(&tmp_io_info, nseq, &dset_curr_seq, len, off, (size_t)1,
+ &mem_curr_seq, &mem_len, &mem_off) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, 0, "read error")
/* Update buffer */
@@ -259,15 +247,14 @@ H5D__gather_file(const H5D_io_info_t *_io_info,
done:
/* Release resources, if allocated */
- if(len && len != _len)
+ if (len && len != _len)
len = H5FL_SEQ_FREE(size_t, len);
- if(off && off != _off)
+ if (off && off != _off)
off = H5FL_SEQ_FREE(hsize_t, off);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__gather_file() */
-
/*-------------------------------------------------------------------------
* Function: H5D__scatter_mem
*
@@ -284,21 +271,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
- H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache,
- void *_buf/*out*/)
+H5D__scatter_mem(const void *_tscat_buf, const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
+ const H5D_dxpl_cache_t *dxpl_cache, void *_buf /*out*/)
{
- uint8_t *buf = (uint8_t *)_buf; /* Get local copies for address arithmetic */
+ uint8_t * buf = (uint8_t *)_buf; /* Get local copies for address arithmetic */
const uint8_t *tscat_buf = (const uint8_t *)_tscat_buf;
- hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- hsize_t *off = NULL; /* Pointer to sequence offsets */
- size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t *len = NULL; /* Pointer to sequence lengths */
- size_t curr_len; /* Length of bytes left to process in sequence */
- size_t nseq; /* Number of sequences generated */
- size_t curr_seq; /* Current sequence being processed */
- size_t nelem; /* Number of elements used in sequences */
- herr_t ret_value = SUCCEED; /* Number of elements scattered */
+ hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
+ hsize_t * off = NULL; /* Pointer to sequence offsets */
+ size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
+ size_t * len = NULL; /* Pointer to sequence lengths */
+ size_t curr_len; /* Length of bytes left to process in sequence */
+ size_t nseq; /* Number of sequences generated */
+ size_t curr_seq; /* Current sequence being processed */
+ size_t nelem; /* Number of elements used in sequences */
+ herr_t ret_value = SUCCEED; /* Number of elements scattered */
FUNC_ENTER_PACKAGE
@@ -310,10 +296,10 @@ H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
HDassert(buf);
/* Allocate the vector I/O arrays */
- if(dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
+ if (dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O length vector array")
- if(NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
+ if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O offset vector array")
} /* end if */
else {
@@ -322,13 +308,14 @@ H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
} /* end else */
/* Loop until all elements are written */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Get list of sequences for selection to write */
- if(H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) < 0)
- HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
+ if (H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) <
+ 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
/* Loop, while sequences left to process */
- for(curr_seq = 0; curr_seq < nseq; curr_seq++) {
+ for (curr_seq = 0; curr_seq < nseq; curr_seq++) {
/* Get the number of bytes in sequence */
curr_len = len[curr_seq];
@@ -344,15 +331,14 @@ H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
done:
/* Release resources, if allocated */
- if(len && len != _len)
+ if (len && len != _len)
len = H5FL_SEQ_FREE(size_t, len);
- if(off && off != _off)
+ if (off && off != _off)
off = H5FL_SEQ_FREE(hsize_t, off);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__scatter_mem() */
+} /* H5D__scatter_mem() */
-
/*-------------------------------------------------------------------------
* Function: H5D__gather_mem
*
@@ -371,21 +357,20 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5D__gather_mem(const void *_buf, const H5S_t *space,
- H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache,
- void *_tgath_buf/*out*/)
+H5D__gather_mem(const void *_buf, const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
+ const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf /*out*/)
{
- const uint8_t *buf = (const uint8_t *)_buf; /* Get local copies for address arithmetic */
- uint8_t *tgath_buf = (uint8_t *)_tgath_buf;
- hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- hsize_t *off = NULL; /* Pointer to sequence offsets */
- size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t *len = NULL; /* Pointer to sequence lengths */
- size_t curr_len; /* Length of bytes left to process in sequence */
- size_t nseq; /* Number of sequences generated */
- size_t curr_seq; /* Current sequence being processed */
- size_t nelem; /* Number of elements used in sequences */
- size_t ret_value = nelmts; /* Number of elements gathered */
+ const uint8_t *buf = (const uint8_t *)_buf; /* Get local copies for address arithmetic */
+ uint8_t * tgath_buf = (uint8_t *)_tgath_buf;
+ hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
+ hsize_t * off = NULL; /* Pointer to sequence offsets */
+ size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
+ size_t * len = NULL; /* Pointer to sequence lengths */
+ size_t curr_len; /* Length of bytes left to process in sequence */
+ size_t nseq; /* Number of sequences generated */
+ size_t curr_seq; /* Current sequence being processed */
+ size_t nelem; /* Number of elements used in sequences */
+ size_t ret_value = nelmts; /* Number of elements gathered */
FUNC_ENTER_STATIC
@@ -397,10 +382,10 @@ H5D__gather_mem(const void *_buf, const H5S_t *space,
HDassert(tgath_buf);
/* Allocate the vector I/O arrays */
- if(dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
+ if (dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "can't allocate I/O length vector array")
- if(NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
+ if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "can't allocate I/O offset vector array")
} /* end if */
else {
@@ -409,13 +394,14 @@ H5D__gather_mem(const void *_buf, const H5S_t *space,
} /* end else */
/* Loop until all elements are written */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Get list of sequences for selection to write */
- if(H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) < 0)
- HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
+ if (H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &nelem, off, len) <
+ 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
/* Loop, while sequences left to process */
- for(curr_seq = 0; curr_seq < nseq; curr_seq++) {
+ for (curr_seq = 0; curr_seq < nseq; curr_seq++) {
/* Get the number of bytes in sequence */
curr_len = len[curr_seq];
@@ -431,15 +417,14 @@ H5D__gather_mem(const void *_buf, const H5S_t *space,
done:
/* Release resources, if allocated */
- if(len && len != _len)
+ if (len && len != _len)
len = H5FL_SEQ_FREE(size_t, len);
- if(off && off != _off)
+ if (off && off != _off)
off = H5FL_SEQ_FREE(hsize_t, off);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__gather_mem() */
+} /* H5D__gather_mem() */
-
/*-------------------------------------------------------------------------
* Function: H5D__scatgath_read
*
@@ -453,20 +438,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
+H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space)
{
- const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
- void *buf = io_info->u.rbuf; /* Local pointer to application buffer */
- H5S_sel_iter_t mem_iter; /*memory selection iteration info*/
- hbool_t mem_iter_init = FALSE; /*memory selection iteration info has been initialized */
- H5S_sel_iter_t bkg_iter; /*background iteration info*/
- hbool_t bkg_iter_init = FALSE; /*background iteration info has been initialized */
- H5S_sel_iter_t file_iter; /*file selection iteration info*/
- hbool_t file_iter_init = FALSE; /*file selection iteration info has been initialized */
- hsize_t smine_start; /*strip mine start loc */
- size_t smine_nelmts; /*elements per strip */
- herr_t ret_value = SUCCEED; /*return value */
+ const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
+ void * buf = io_info->u.rbuf; /* Local pointer to application buffer */
+ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/
+ hbool_t mem_iter_init = FALSE; /*memory selection iteration info has been initialized */
+ H5S_sel_iter_t bkg_iter; /*background iteration info*/
+ hbool_t bkg_iter_init = FALSE; /*background iteration info has been initialized */
+ H5S_sel_iter_t file_iter; /*file selection iteration info*/
+ hbool_t file_iter_init = FALSE; /*file selection iteration info has been initialized */
+ hsize_t smine_start; /*strip mine start loc */
+ size_t smine_nelmts; /*elements per strip */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_PACKAGE
@@ -478,23 +463,23 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
HDassert(buf);
/* Check for NOOP read */
- if(nelmts == 0)
+ if (nelmts == 0)
HGOTO_DONE(SUCCEED)
/* Figure out the strip mine size. */
- if(H5S_select_iter_init(&file_iter, file_space, type_info->src_type_size) < 0)
+ if (H5S_select_iter_init(&file_iter, file_space, type_info->src_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information")
- file_iter_init = TRUE; /*file selection iteration info has been initialized */
- if(H5S_select_iter_init(&mem_iter, mem_space, type_info->dst_type_size) < 0)
+ file_iter_init = TRUE; /*file selection iteration info has been initialized */
+ if (H5S_select_iter_init(&mem_iter, mem_space, type_info->dst_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information")
- mem_iter_init = TRUE; /*file selection iteration info has been initialized */
- if(H5S_select_iter_init(&bkg_iter, mem_space, type_info->dst_type_size) < 0)
+ mem_iter_init = TRUE; /*file selection iteration info has been initialized */
+ if (H5S_select_iter_init(&bkg_iter, mem_space, type_info->dst_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information")
- bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
+ bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
/* Start strip mining... */
- for(smine_start = 0; smine_start < nelmts; smine_start += smine_nelmts) {
- size_t n; /* Elements operated on */
+ for (smine_start = 0; smine_start < nelmts; smine_start += smine_nelmts) {
+ size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
HDassert(H5S_SELECT_ITER_NELMTS(&file_iter) == (nelmts - smine_start));
@@ -506,72 +491,71 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
* if necessary.
*/
- /*
+ /*
* Gather data
*/
- n = H5D__gather_file(io_info, file_space, &file_iter, smine_nelmts,
- type_info->tconv_buf/*out*/);
- if(n != smine_nelmts)
+ n = H5D__gather_file(io_info, file_space, &file_iter, smine_nelmts, type_info->tconv_buf /*out*/);
+ if (n != smine_nelmts)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed")
/* If the source and destination are compound types and subset of each other
* and no conversion is needed, copy the data directly into user's buffer and
* bypass the rest of steps.
*/
- if(type_info->cmpd_subset && H5T_SUBSET_FALSE != type_info->cmpd_subset->subset) {
- if(H5D__compound_opt_read(smine_nelmts, mem_space, &mem_iter, dxpl_cache,
- type_info, buf /*out*/) < 0)
+ if (type_info->cmpd_subset && H5T_SUBSET_FALSE != type_info->cmpd_subset->subset) {
+ if (H5D__compound_opt_read(smine_nelmts, mem_space, &mem_iter, dxpl_cache, type_info,
+ buf /*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed")
} /* end if */
else {
- if(H5T_BKG_YES == type_info->need_bkg) {
- n = H5D__gather_mem(buf, mem_space, &bkg_iter, smine_nelmts,
- dxpl_cache, type_info->bkg_buf/*out*/);
- if(n != smine_nelmts)
+ if (H5T_BKG_YES == type_info->need_bkg) {
+ n = H5D__gather_mem(buf, mem_space, &bkg_iter, smine_nelmts, dxpl_cache,
+ type_info->bkg_buf /*out*/);
+ if (n != smine_nelmts)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed")
} /* end if */
/*
* Perform datatype conversion.
*/
- if(H5T_convert(type_info->tpath, type_info->src_type_id, type_info->dst_type_id,
- smine_nelmts, (size_t)0, (size_t)0, type_info->tconv_buf,
- type_info->bkg_buf, io_info->dxpl_id) < 0)
+ if (H5T_convert(type_info->tpath, type_info->src_type_id, type_info->dst_type_id, smine_nelmts,
+ (size_t)0, (size_t)0, type_info->tconv_buf, type_info->bkg_buf,
+ io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
/* Do the data transform after the conversion (since we're using type mem_type) */
- if(!type_info->is_xform_noop)
- if(H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts, type_info->mem_type) < 0)
+ if (!type_info->is_xform_noop)
+ if (H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts,
+ type_info->mem_type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
/*
* Scatter the data into memory.
*/
- if(H5D__scatter_mem(type_info->tconv_buf, mem_space, &mem_iter,
- smine_nelmts, dxpl_cache, buf/*out*/) < 0)
+ if (H5D__scatter_mem(type_info->tconv_buf, mem_space, &mem_iter, smine_nelmts, dxpl_cache,
+ buf /*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed")
} /* end else */
- } /* end for */
+ } /* end for */
done:
/* Release selection iterators */
- if(file_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
+ if (file_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
- if(mem_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
+ if (mem_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
- if(bkg_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&bkg_iter) < 0)
+ if (bkg_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&bkg_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__scatgath_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__scatgath_write
*
@@ -585,20 +569,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
+H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space)
{
- const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
- const void *buf = io_info->u.wbuf; /* Local pointer to application buffer */
- H5S_sel_iter_t mem_iter; /*memory selection iteration info*/
- hbool_t mem_iter_init = FALSE; /*memory selection iteration info has been initialized */
- H5S_sel_iter_t bkg_iter; /*background iteration info*/
- hbool_t bkg_iter_init = FALSE; /*background iteration info has been initialized */
- H5S_sel_iter_t file_iter; /*file selection iteration info*/
- hbool_t file_iter_init = FALSE; /*file selection iteration info has been initialized */
- hsize_t smine_start; /*strip mine start loc */
- size_t smine_nelmts; /*elements per strip */
- herr_t ret_value = SUCCEED; /*return value */
+ const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
+ const void * buf = io_info->u.wbuf; /* Local pointer to application buffer */
+ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/
+ hbool_t mem_iter_init = FALSE; /*memory selection iteration info has been initialized */
+ H5S_sel_iter_t bkg_iter; /*background iteration info*/
+ hbool_t bkg_iter_init = FALSE; /*background iteration info has been initialized */
+ H5S_sel_iter_t file_iter; /*file selection iteration info*/
+ hbool_t file_iter_init = FALSE; /*file selection iteration info has been initialized */
+ hsize_t smine_start; /*strip mine start loc */
+ size_t smine_nelmts; /*elements per strip */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_PACKAGE
@@ -610,23 +594,23 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_in
HDassert(buf);
/* Check for NOOP write */
- if(nelmts == 0)
+ if (nelmts == 0)
HGOTO_DONE(SUCCEED)
/* Figure out the strip mine size. */
- if(H5S_select_iter_init(&file_iter, file_space, type_info->dst_type_size) < 0)
+ if (H5S_select_iter_init(&file_iter, file_space, type_info->dst_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information")
- file_iter_init = TRUE; /*file selection iteration info has been initialized */
- if(H5S_select_iter_init(&mem_iter, mem_space, type_info->src_type_size) < 0)
+ file_iter_init = TRUE; /*file selection iteration info has been initialized */
+ if (H5S_select_iter_init(&mem_iter, mem_space, type_info->src_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information")
- mem_iter_init = TRUE; /*file selection iteration info has been initialized */
- if(H5S_select_iter_init(&bkg_iter, file_space, type_info->dst_type_size) < 0)
+ mem_iter_init = TRUE; /*file selection iteration info has been initialized */
+ if (H5S_select_iter_init(&bkg_iter, file_space, type_info->dst_type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information")
- bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
+ bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
/* Start strip mining... */
- for(smine_start = 0; smine_start < nelmts; smine_start += smine_nelmts) {
- size_t n; /* Elements operated on */
+ for (smine_start = 0; smine_start < nelmts; smine_start += smine_nelmts) {
+ size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
HDassert(H5S_SELECT_ITER_NELMTS(&file_iter) == (nelmts - smine_start));
@@ -637,9 +621,9 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_in
* buffer. Also gather data from the file into the background buffer
* if necessary.
*/
- n = H5D__gather_mem(buf, mem_space, &mem_iter, smine_nelmts,
- dxpl_cache, type_info->tconv_buf/*out*/);
- if(n != smine_nelmts)
+ n = H5D__gather_mem(buf, mem_space, &mem_iter, smine_nelmts, dxpl_cache,
+ type_info->tconv_buf /*out*/);
+ if (n != smine_nelmts)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed")
/* If the source and destination are compound types and the destination is
@@ -648,61 +632,60 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_in
* is a subset of the destination, the optimization is done in conversion
* function H5T_conv_struct_opt to protect the background data.
*/
- if(type_info->cmpd_subset && H5T_SUBSET_DST == type_info->cmpd_subset->subset
- && type_info->dst_type_size == type_info->cmpd_subset->copy_size) {
- if(H5D__compound_opt_write(smine_nelmts, type_info) < 0)
+ if (type_info->cmpd_subset && H5T_SUBSET_DST == type_info->cmpd_subset->subset &&
+ type_info->dst_type_size == type_info->cmpd_subset->copy_size) {
+ if (H5D__compound_opt_write(smine_nelmts, type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed")
} /* end if */
else {
- if(H5T_BKG_YES == type_info->need_bkg) {
+ if (H5T_BKG_YES == type_info->need_bkg) {
n = H5D__gather_file(io_info, file_space, &bkg_iter, smine_nelmts,
- type_info->bkg_buf/*out*/);
- if(n != smine_nelmts)
+ type_info->bkg_buf /*out*/);
+ if (n != smine_nelmts)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed")
} /* end if */
/* Do the data transform before the type conversion (since
* transforms must be done in the memory type). */
- if(!type_info->is_xform_noop)
- if(H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts, type_info->mem_type) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
+ if (!type_info->is_xform_noop)
+ if (H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts,
+ type_info->mem_type) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
/*
* Perform datatype conversion.
*/
- if(H5T_convert(type_info->tpath, type_info->src_type_id, type_info->dst_type_id,
- smine_nelmts, (size_t)0, (size_t)0, type_info->tconv_buf,
- type_info->bkg_buf, io_info->dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
+ if (H5T_convert(type_info->tpath, type_info->src_type_id, type_info->dst_type_id, smine_nelmts,
+ (size_t)0, (size_t)0, type_info->tconv_buf, type_info->bkg_buf,
+ io_info->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
} /* end else */
/*
* Scatter the data out to the file.
*/
- if(H5D__scatter_file(io_info, file_space, &file_iter, smine_nelmts,
- type_info->tconv_buf) < 0)
+ if (H5D__scatter_file(io_info, file_space, &file_iter, smine_nelmts, type_info->tconv_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed")
} /* end for */
done:
/* Release selection iterators */
- if(file_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
+ if (file_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
- if(mem_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
+ if (mem_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
- if(bkg_iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&bkg_iter) < 0)
+ if (bkg_iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&bkg_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__scatgath_write() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compound_opt_read
*
@@ -736,18 +719,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
- H5S_sel_iter_t *iter, const H5D_dxpl_cache_t *dxpl_cache,
- const H5D_type_info_t *type_info, void *user_buf/*out*/)
+H5D__compound_opt_read(size_t nelmts, const H5S_t *space, H5S_sel_iter_t *iter,
+ const H5D_dxpl_cache_t *dxpl_cache, const H5D_type_info_t *type_info,
+ void *user_buf /*out*/)
{
- uint8_t *ubuf = (uint8_t *)user_buf; /* Cast for pointer arithmetic */
- uint8_t *xdbuf; /* Pointer into dataset buffer */
- hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- hsize_t *off = NULL; /* Pointer to sequence offsets */
- size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t *len = NULL; /* Pointer to sequence lengths */
- size_t src_stride, dst_stride, copy_size;
- herr_t ret_value = SUCCEED; /*return value */
+ uint8_t *ubuf = (uint8_t *)user_buf; /* Cast for pointer arithmetic */
+ uint8_t *xdbuf; /* Pointer into dataset buffer */
+ hsize_t _off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
+ hsize_t *off = NULL; /* Pointer to sequence offsets */
+ size_t _len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
+ size_t * len = NULL; /* Pointer to sequence lengths */
+ size_t src_stride, dst_stride, copy_size;
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -759,14 +742,14 @@ H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
HDassert(type_info);
HDassert(type_info->cmpd_subset);
HDassert(H5T_SUBSET_SRC == type_info->cmpd_subset->subset ||
- H5T_SUBSET_DST == type_info->cmpd_subset->subset);
+ H5T_SUBSET_DST == type_info->cmpd_subset->subset);
HDassert(user_buf);
/* Allocate the vector I/O arrays */
- if(dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
+ if (dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O length vector array")
- if(NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
+ if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O offset vector array")
} /* end if */
else {
@@ -783,22 +766,23 @@ H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
/* Loop until all elements are written */
xdbuf = type_info->tconv_buf;
- while(nelmts > 0) {
- size_t nseq; /* Number of sequences generated */
- size_t curr_seq; /* Current sequence being processed */
- size_t elmtno; /* Element counter */
+ while (nelmts > 0) {
+ size_t nseq; /* Number of sequences generated */
+ size_t curr_seq; /* Current sequence being processed */
+ size_t elmtno; /* Element counter */
/* Get list of sequences for selection to write */
- if(H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &elmtno, off, len) < 0)
+ if (H5S_SELECT_GET_SEQ_LIST(space, 0, iter, dxpl_cache->vec_size, nelmts, &nseq, &elmtno, off, len) <
+ 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed")
/* Loop, while sequences left to process */
- for(curr_seq = 0; curr_seq < nseq; curr_seq++) {
- size_t curr_off; /* Offset of bytes left to process in sequence */
- size_t curr_len; /* Length of bytes left to process in sequence */
- size_t curr_nelmts; /* Number of elements to process in sequence */
- uint8_t *xubuf;
- size_t i; /* Local index variable */
+ for (curr_seq = 0; curr_seq < nseq; curr_seq++) {
+ size_t curr_off; /* Offset of bytes left to process in sequence */
+ size_t curr_len; /* Length of bytes left to process in sequence */
+ size_t curr_nelmts; /* Number of elements to process in sequence */
+ uint8_t *xubuf;
+ size_t i; /* Local index variable */
/* Get the number of bytes and offset in sequence */
curr_len = len[curr_seq];
@@ -807,17 +791,17 @@ H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
/* Decide the number of elements and position in the buffer. */
curr_nelmts = curr_len / dst_stride;
- xubuf = ubuf + curr_off;
+ xubuf = ubuf + curr_off;
/* Copy the data into the right place. */
- for(i = 0; i < curr_nelmts; i++) {
+ for (i = 0; i < curr_nelmts; i++) {
HDmemmove(xubuf, xdbuf, copy_size);
/* Update pointers */
xdbuf += src_stride;
xubuf += dst_stride;
} /* end for */
- } /* end for */
+ } /* end for */
/* Decrement number of elements left to process */
nelmts -= elmtno;
@@ -825,15 +809,14 @@ H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
done:
/* Release resources, if allocated */
- if(len && len != _len)
+ if (len && len != _len)
len = H5FL_SEQ_FREE(size_t, len);
- if(off && off != _off)
+ if (off && off != _off)
off = H5FL_SEQ_FREE(hsize_t, off);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__compound_opt_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__compound_opt_write
*
@@ -870,9 +853,9 @@ done:
static herr_t
H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
{
- uint8_t *xsbuf, *xdbuf; /* Source & destination pointers into dataset buffer */
- size_t src_stride, dst_stride; /* Strides through source & destination datatypes */
- size_t i; /* Local index variable */
+ uint8_t *xsbuf, *xdbuf; /* Source & destination pointers into dataset buffer */
+ size_t src_stride, dst_stride; /* Strides through source & destination datatypes */
+ size_t i; /* Local index variable */
FUNC_ENTER_STATIC_NOERR
@@ -887,7 +870,7 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
/* Loop until all elements are written */
xsbuf = (uint8_t *)type_info->tconv_buf;
xdbuf = (uint8_t *)type_info->tconv_buf;
- for(i = 0; i < nelmts; i++) {
+ for (i = 0; i < nelmts; i++) {
HDmemmove(xdbuf, xsbuf, dst_stride);
/* Update pointers */
@@ -898,7 +881,6 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__compound_opt_write() */
-
/*-------------------------------------------------------------------------
* Function: H5Dscatter
*
@@ -916,73 +898,72 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
*-------------------------------------------------------------------------
*/
herr_t
-H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id,
- hid_t dst_space_id, void *dst_buf)
+H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf)
{
- H5T_t *type; /* Datatype */
- H5S_t *dst_space; /* Dataspace */
- H5S_sel_iter_t iter; /* Selection iteration info*/
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
- const void *src_buf = NULL; /* Source (contiguous) data buffer */
- size_t src_buf_nbytes = 0; /* Size of src_buf */
- size_t type_size; /* Datatype element size */
- hssize_t nelmts; /* Number of remaining elements in selection */
- size_t nelmts_scatter = 0; /* Number of elements to scatter to dst_buf */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5T_t * type; /* Datatype */
+ H5S_t * dst_space; /* Dataspace */
+ H5S_sel_iter_t iter; /* Selection iteration info*/
+ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ const void * src_buf = NULL; /* Source (contiguous) data buffer */
+ size_t src_buf_nbytes = 0; /* Size of src_buf */
+ size_t type_size; /* Datatype element size */
+ hssize_t nelmts; /* Number of remaining elements in selection */
+ size_t nelmts_scatter = 0; /* Number of elements to scatter to dst_buf */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "x*xii*x", op, op_data, type_id, dst_space_id, dst_buf);
/* Check args */
- if(op == NULL)
+ if (op == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid callback function pointer")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- if(NULL == (dst_space= (H5S_t *)H5I_object_verify(dst_space_id, H5I_DATASPACE)))
+ if (NULL == (dst_space = (H5S_t *)H5I_object_verify(dst_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
- if(dst_buf == NULL)
+ if (dst_buf == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided")
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(H5P_DATASET_XFER_DEFAULT, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(H5P_DATASET_XFER_DEFAULT, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Get datatype element size */
- if(0 == (type_size = H5T_GET_SIZE(type)))
+ if (0 == (type_size = H5T_GET_SIZE(type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size")
/* Get number of elements in dataspace */
- if((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(dst_space)) < 0)
+ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(dst_space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection")
/* Initialize selection iterator */
- if(H5S_select_iter_init(&iter, dst_space, type_size) < 0)
+ if (H5S_select_iter_init(&iter, dst_space, type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information")
iter_init = TRUE;
/* Loop until all data has been scattered */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Make callback to retrieve data */
- if(op(&src_buf, &src_buf_nbytes, op_data) < 0)
+ if (op(&src_buf, &src_buf_nbytes, op_data) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure")
/* Calculate number of elements */
nelmts_scatter = src_buf_nbytes / type_size;
/* Check callback results */
- if(!src_buf)
+ if (!src_buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback did not return a buffer")
- if(src_buf_nbytes == 0)
+ if (src_buf_nbytes == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned a buffer size of 0")
- if(src_buf_nbytes % type_size)
+ if (src_buf_nbytes % type_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size is not a multiple of datatype size")
- if(nelmts_scatter > (size_t)nelmts)
+ if (nelmts_scatter > (size_t)nelmts)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned more elements than in selection")
/* Scatter data */
- if(H5D__scatter_mem(src_buf, dst_space, &iter, nelmts_scatter, dxpl_cache, dst_buf) < 0)
+ if (H5D__scatter_mem(src_buf, dst_space, &iter, nelmts_scatter, dxpl_cache, dst_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "scatter failed")
nelmts -= (hssize_t)nelmts_scatter;
@@ -990,15 +971,14 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id,
done:
/* Release selection iterator */
- if(iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&iter) < 0)
+ if (iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
FUNC_LEAVE_API(ret_value)
-} /* H5Dscatter() */
+} /* H5Dscatter() */
-
/*-------------------------------------------------------------------------
* Function: H5Dgather
*
@@ -1016,73 +996,74 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
- size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data)
+H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, void *dst_buf,
+ H5D_gather_func_t op, void *op_data)
{
- H5T_t *type; /* Datatype */
- H5S_t *src_space; /* Dataspace */
- H5S_sel_iter_t iter; /* Selection iteration info*/
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
- size_t type_size; /* Datatype element size */
- hssize_t nelmts; /* Number of remaining elements in selection */
- size_t dst_buf_nelmts; /* Number of elements that can fit in dst_buf */
- size_t nelmts_gathered; /* Number of elements gathered from src_buf */
- H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5T_t * type; /* Datatype */
+ H5S_t * src_space; /* Dataspace */
+ H5S_sel_iter_t iter; /* Selection iteration info*/
+ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ size_t type_size; /* Datatype element size */
+ hssize_t nelmts; /* Number of remaining elements in selection */
+ size_t dst_buf_nelmts; /* Number of elements that can fit in dst_buf */
+ size_t nelmts_gathered; /* Number of elements gathered from src_buf */
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*xiz*xx*x", src_space_id, src_buf, type_id, dst_buf_size,
- dst_buf, op, op_data);
+ H5TRACE7("e", "i*xiz*xx*x", src_space_id, src_buf, type_id, dst_buf_size, dst_buf, op, op_data);
/* Check args */
- if(NULL == (src_space= (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE)))
+ if (NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
- if(src_buf == NULL)
+ if (src_buf == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source buffer provided")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- if(dst_buf_size == 0)
+ if (dst_buf_size == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer size is 0")
- if(dst_buf == NULL)
+ if (dst_buf == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided")
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(H5P_DATASET_XFER_DEFAULT, &dxpl_cache) < 0)
+ if (H5D__get_dxpl_cache(H5P_DATASET_XFER_DEFAULT, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Get datatype element size */
- if(0 == (type_size = H5T_GET_SIZE(type)))
+ if (0 == (type_size = H5T_GET_SIZE(type)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size")
/* Get number of elements in dst_buf_size */
dst_buf_nelmts = dst_buf_size / type_size;
- if(dst_buf_nelmts == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer is not large enough to hold one element")
+ if (dst_buf_nelmts == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "destination buffer is not large enough to hold one element")
/* Get number of elements in dataspace */
- if((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(src_space)) < 0)
+ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(src_space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection")
/* If dst_buf is not large enough to hold all the elements, make sure there
* is a callback */
- if(((size_t)nelmts > dst_buf_nelmts) && (op == NULL))
+ if (((size_t)nelmts > dst_buf_nelmts) && (op == NULL))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback supplied and destination buffer too small")
/* Initialize selection iterator */
- if(H5S_select_iter_init(&iter, src_space, type_size) < 0)
+ if (H5S_select_iter_init(&iter, src_space, type_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information")
iter_init = TRUE;
/* Loop until all data has been scattered */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Gather data */
- if(0 == (nelmts_gathered = H5D__gather_mem(src_buf, src_space, &iter, MIN(dst_buf_nelmts, (size_t)nelmts), dxpl_cache, dst_buf)))
+ if (0 == (nelmts_gathered = H5D__gather_mem(
+ src_buf, src_space, &iter, MIN(dst_buf_nelmts, (size_t)nelmts), dxpl_cache, dst_buf)))
HGOTO_ERROR(H5E_IO, H5E_CANTCOPY, FAIL, "gather failed")
HDassert(nelmts_gathered == MIN(dst_buf_nelmts, (size_t)nelmts));
/* Make callback to process dst_buf */
- if(op && op(dst_buf, nelmts_gathered * type_size, op_data) < 0)
+ if (op && op(dst_buf, nelmts_gathered * type_size, op_data) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure")
nelmts -= (hssize_t)nelmts_gathered;
@@ -1091,11 +1072,10 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
done:
/* Release selection iterator */
- if(iter_init) {
- if(H5S_SELECT_ITER_RELEASE(&iter) < 0)
+ if (iter_init) {
+ if (H5S_SELECT_ITER_RELEASE(&iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
} /* end if */
FUNC_LEAVE_API(ret_value)
-} /* H5Dgather() */
-
+} /* H5Dgather() */
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 7e86b9d..53a3fe7 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.ued>
+/* Programmer: Quincey Koziol
* Thursday, September 30, 2004
*
* Purpose: Dataspace I/O functions.
@@ -21,41 +21,35 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
- size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
-
+static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space);
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -66,8 +60,6 @@ H5FL_SEQ_DEFINE(size_t);
/* Declare a free list to manage sequences of hsize_t */
H5FL_SEQ_DEFINE(hsize_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5D__select_io
*
@@ -81,27 +73,27 @@ H5FL_SEQ_DEFINE(hsize_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
- size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
+H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, const H5S_t *file_space,
+ const H5S_t *mem_space)
{
- H5S_sel_iter_t mem_iter; /* Memory selection iteration info */
- hbool_t mem_iter_init = 0; /* Memory selection iteration info has been initialized */
- H5S_sel_iter_t file_iter; /* File selection iteration info */
- hbool_t file_iter_init = 0; /* File selection iteration info has been initialized */
- hsize_t _mem_off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets in memory */
- hsize_t *mem_off = NULL; /* Pointer to sequence offsets in memory */
- hsize_t _file_off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets in the file */
- hsize_t *file_off = NULL; /* Pointer to sequence offsets in the file */
- size_t _mem_len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths in memory */
- size_t *mem_len = NULL; /* Pointer to sequence lengths in memory */
- size_t _file_len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths in the file */
- size_t *file_len = NULL; /* Pointer to sequence lengths in the file */
- size_t curr_mem_seq; /* Current memory sequence to operate on */
- size_t curr_file_seq; /* Current file sequence to operate on */
- size_t mem_nseq; /* Number of sequences generated in the file */
- size_t file_nseq; /* Number of sequences generated in memory */
- ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5S_sel_iter_t mem_iter; /* Memory selection iteration info */
+ hbool_t mem_iter_init = 0; /* Memory selection iteration info has been initialized */
+ H5S_sel_iter_t file_iter; /* File selection iteration info */
+ hbool_t file_iter_init = 0; /* File selection iteration info has been initialized */
+ hsize_t _mem_off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets in memory */
+ hsize_t * mem_off = NULL; /* Pointer to sequence offsets in memory */
+ hsize_t _file_off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets in the file */
+ hsize_t * file_off = NULL; /* Pointer to sequence offsets in the file */
+ size_t _mem_len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths in memory */
+ size_t * mem_len = NULL; /* Pointer to sequence lengths in memory */
+ size_t _file_len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths in the file */
+ size_t * file_len = NULL; /* Pointer to sequence lengths in the file */
+ size_t curr_mem_seq; /* Current memory sequence to operate on */
+ size_t curr_file_seq; /* Current file sequence to operate on */
+ size_t mem_nseq; /* Number of sequences generated in the file */
+ size_t file_nseq; /* Number of sequences generated in memory */
+ ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -113,29 +105,29 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
HDassert(io_info->u.rbuf);
/* Allocate the vector I/O arrays */
- if(io_info->dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
- if(NULL == (mem_len = H5FL_SEQ_MALLOC(size_t,io_info->dxpl_cache->vec_size)))
+ if (io_info->dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) {
+ if (NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, io_info->dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O length vector array")
- if(NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t,io_info->dxpl_cache->vec_size)))
+ if (NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t, io_info->dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O offset vector array")
- if(NULL == (file_len = H5FL_SEQ_MALLOC(size_t,io_info->dxpl_cache->vec_size)))
+ if (NULL == (file_len = H5FL_SEQ_MALLOC(size_t, io_info->dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O length vector array")
- if(NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t,io_info->dxpl_cache->vec_size)))
+ if (NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t, io_info->dxpl_cache->vec_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate I/O offset vector array")
} /* end if */
else {
- mem_len = _mem_len;
- mem_off = _mem_off;
+ mem_len = _mem_len;
+ mem_off = _mem_off;
file_len = _file_len;
file_off = _file_off;
} /* end else */
/* Check for only one element in selection */
- if(nelmts == 1) {
+ if (nelmts == 1) {
/* Get offset of first element in selections */
- if(H5S_SELECT_OFFSET(file_space, file_off) < 0)
+ if (H5S_SELECT_OFFSET(file_space, file_off) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve file selection offset")
- if(H5S_SELECT_OFFSET(mem_space, mem_off) < 0)
+ if (H5S_SELECT_OFFSET(mem_space, mem_off) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve memory selection offset")
/* Set up necessary information for I/O operation */
@@ -146,17 +138,17 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
*file_len = *mem_len = elmt_size;
/* Perform I/O on memory and file sequences */
- if(io_info->op_type == H5D_IO_OP_READ) {
- if((tmp_file_len = (*io_info->layout_ops.readvv)(io_info,
- file_nseq, &curr_file_seq, file_len, file_off,
- mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
+ if (io_info->op_type == H5D_IO_OP_READ) {
+ if ((tmp_file_len =
+ (*io_info->layout_ops.readvv)(io_info, file_nseq, &curr_file_seq, file_len, file_off,
+ mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
HDassert(io_info->op_type == H5D_IO_OP_WRITE);
- if((tmp_file_len = (*io_info->layout_ops.writevv)(io_info,
- file_nseq, &curr_file_seq, file_len, file_off,
- mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
+ if ((tmp_file_len =
+ (*io_info->layout_ops.writevv)(io_info, file_nseq, &curr_file_seq, file_len, file_off,
+ mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
} /* end else */
@@ -164,29 +156,31 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
} /* end if */
else {
- size_t mem_nelem; /* Number of elements used in memory sequences */
- size_t file_nelem; /* Number of elements used in file sequences */
+ size_t mem_nelem; /* Number of elements used in memory sequences */
+ size_t file_nelem; /* Number of elements used in file sequences */
/* Initialize file iterator */
- if(H5S_select_iter_init(&file_iter, file_space, elmt_size) < 0)
+ if (H5S_select_iter_init(&file_iter, file_space, elmt_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
- file_iter_init = 1; /* File selection iteration info has been initialized */
+ file_iter_init = 1; /* File selection iteration info has been initialized */
/* Initialize memory iterator */
- if(H5S_select_iter_init(&mem_iter, mem_space, elmt_size) < 0)
+ if (H5S_select_iter_init(&mem_iter, mem_space, elmt_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
- mem_iter_init = 1; /* Memory selection iteration info has been initialized */
+ mem_iter_init = 1; /* Memory selection iteration info has been initialized */
/* Initialize sequence counts */
curr_mem_seq = curr_file_seq = 0;
mem_nseq = file_nseq = 0;
/* Loop, until all bytes are processed */
- while(nelmts > 0) {
+ while (nelmts > 0) {
/* Check if more file sequences are needed */
- if(curr_file_seq >= file_nseq) {
+ if (curr_file_seq >= file_nseq) {
/* Get sequences for file selection */
- if(H5S_SELECT_GET_SEQ_LIST(file_space, H5S_GET_SEQ_LIST_SORTED, &file_iter, io_info->dxpl_cache->vec_size, nelmts, &file_nseq, &file_nelem, file_off, file_len) < 0)
+ if (H5S_SELECT_GET_SEQ_LIST(file_space, H5S_GET_SEQ_LIST_SORTED, &file_iter,
+ io_info->dxpl_cache->vec_size, nelmts, &file_nseq, &file_nelem,
+ file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
/* Start at the beginning of the sequences again */
@@ -194,9 +188,10 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
} /* end if */
/* Check if more memory sequences are needed */
- if(curr_mem_seq >= mem_nseq) {
+ if (curr_mem_seq >= mem_nseq) {
/* Get sequences for memory selection */
- if(H5S_SELECT_GET_SEQ_LIST(mem_space, 0, &mem_iter, io_info->dxpl_cache->vec_size, nelmts, &mem_nseq, &mem_nelem, mem_off, mem_len) < 0)
+ if (H5S_SELECT_GET_SEQ_LIST(mem_space, 0, &mem_iter, io_info->dxpl_cache->vec_size, nelmts,
+ &mem_nseq, &mem_nelem, mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
/* Start at the beginning of the sequences again */
@@ -204,51 +199,52 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
} /* end if */
/* Perform I/O on memory and file sequences */
- if(io_info->op_type == H5D_IO_OP_READ) {
- if((tmp_file_len = (*io_info->layout_ops.readvv)(io_info,
- file_nseq, &curr_file_seq, file_len, file_off,
- mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
+ if (io_info->op_type == H5D_IO_OP_READ) {
+ if ((tmp_file_len =
+ (*io_info->layout_ops.readvv)(io_info, file_nseq, &curr_file_seq, file_len, file_off,
+ mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
HDassert(io_info->op_type == H5D_IO_OP_WRITE);
- if((tmp_file_len = (*io_info->layout_ops.writevv)(io_info,
- file_nseq, &curr_file_seq, file_len, file_off,
- mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
+ if ((tmp_file_len = (*io_info->layout_ops.writevv)(io_info, file_nseq, &curr_file_seq,
+ file_len, file_off, mem_nseq,
+ &curr_mem_seq, mem_len, mem_off)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
} /* end else */
/* Decrement number of elements left to process */
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ if (elmt_size == 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "Resulted in division by zero")
nelmts -= ((size_t)tmp_file_len / elmt_size);
} /* end while */
- } /* end else */
+ } /* end else */
done:
/* Release file selection iterator */
- if(file_iter_init)
- if(H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
+ if (file_iter_init)
+ if (H5S_SELECT_ITER_RELEASE(&file_iter) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
/* Release memory selection iterator */
- if(mem_iter_init)
- if(H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
+ if (mem_iter_init)
+ if (H5S_SELECT_ITER_RELEASE(&mem_iter) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
/* Release vector arrays, if allocated */
- if(file_len && file_len != _file_len)
+ if (file_len && file_len != _file_len)
file_len = H5FL_SEQ_FREE(size_t, file_len);
- if(file_off && file_off != _file_off)
+ if (file_off && file_off != _file_off)
file_off = H5FL_SEQ_FREE(hsize_t, file_off);
- if(mem_len && mem_len != _mem_len)
+ if (mem_len && mem_len != _mem_len)
mem_len = H5FL_SEQ_FREE(size_t, mem_len);
- if(mem_off && mem_off != _mem_off)
+ if (mem_off && mem_off != _mem_off)
mem_off = H5FL_SEQ_FREE(hsize_t, mem_off);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__select_io() */
-
/*-------------------------------------------------------------------------
* Function: H5D__select_read
*
@@ -262,8 +258,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
+H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -271,15 +267,13 @@ H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Call generic selection operation */
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
- if(H5D__select_io(io_info, type_info->src_type_size, (size_t)nelmts,
- file_space, mem_space) < 0)
+ if (H5D__select_io(io_info, type_info->src_type_size, (size_t)nelmts, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__select_read() */
-
/*-------------------------------------------------------------------------
* Function: H5D__select_write
*
@@ -293,8 +287,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
+H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
+ const H5S_t *file_space, const H5S_t *mem_space)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -302,11 +296,9 @@ H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
/* Call generic selection operation */
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
- if(H5D__select_io(io_info, type_info->dst_type_size, (size_t)nelmts,
- file_space, mem_space) < 0)
+ if (H5D__select_io(io_info, type_info->dst_type_size, (size_t)nelmts, file_space, mem_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__select_write() */
-
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index c74b844..70ced54 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Dataset testing functions.
@@ -21,45 +21,37 @@
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-#define H5D_TESTING /*suppress warning about H5D testing funcs*/
-
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_TESTING /*suppress warning about H5D testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5D__layout_version_test
@@ -82,23 +74,22 @@
herr_t
H5D__layout_version_test(hid_t did, unsigned *version)
{
- H5D_t *dset; /* Pointer to dataset to query */
+ H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_PACKAGE
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
- if(version)
+ if (version)
*version = dset->shared->layout.version;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__layout_version_test() */
+} /* H5D__layout_version_test() */
-
/*--------------------------------------------------------------------------
NAME
H5D__layout_contig_size_test
@@ -121,25 +112,24 @@ done:
herr_t
H5D__layout_contig_size_test(hid_t did, hsize_t *size)
{
- H5D_t *dset; /* Pointer to dataset to query */
+ H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_PACKAGE
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
- if(size) {
+ if (size) {
HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
*size = dset->shared->layout.storage.u.contig.size;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__layout_contig_size_test() */
+} /* H5D__layout_contig_size_test() */
-
/*--------------------------------------------------------------------------
NAME
H5D__layout_compact_dirty_test
@@ -168,19 +158,18 @@ H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty)
FUNC_ENTER_PACKAGE
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
- if(dirty) {
+ if (dirty) {
HDassert(dset->shared->layout.type == H5D_COMPACT);
*dirty = dset->shared->layout.storage.u.compact.dirty;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__layout_compact_dirty_test() */
+} /* H5D__layout_compact_dirty_test() */
-
/*--------------------------------------------------------------------------
NAME
H5D__current_cache_size_test
@@ -203,26 +192,25 @@ done:
herr_t
H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
{
- H5D_t *dset; /* Pointer to dataset to query */
- herr_t ret_value = SUCCEED; /* return value */
+ H5D_t *dset; /* Pointer to dataset to query */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_PACKAGE
/* Check args */
- if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ if (NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(nbytes_used) {
+ if (nbytes_used) {
HDassert(dset->shared->layout.type == H5D_CHUNKED);
*nbytes_used = dset->shared->cache.chunk.nbytes_used;
} /* end if */
- if(nused) {
+ if (nused) {
HDassert(dset->shared->layout.type == H5D_CHUNKED);
*nused = dset->shared->cache.chunk.nused;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__current_cache_size_test() */
-
+} /* H5D__current_cache_size_test() */
diff --git a/src/H5E.c b/src/H5E.c
index a94c5bc..2529dd2 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -43,67 +43,59 @@
/* Module Setup */
/****************/
-#define H5E_PACKAGE /*suppress error about including H5Epkg */
+#define H5E_PACKAGE /*suppress error about including H5Epkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5E_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5E_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Epkg.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Epkg.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
/* HDF5 error class */
-#define H5E_CLS_NAME "HDF5"
-#define H5E_CLS_LIB_NAME "HDF5"
-
+#define H5E_CLS_NAME "HDF5"
+#define H5E_CLS_LIB_NAME "HDF5"
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Static function declarations */
-static H5E_cls_t *H5E_register_class(const char *cls_name, const char *lib_name,
- const char *version);
-static herr_t H5E_unregister_class(H5E_cls_t *cls);
-static ssize_t H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size);
-static int H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata);
-static herr_t H5E_close_msg(H5E_msg_t *err);
+static H5E_cls_t *H5E_register_class(const char *cls_name, const char *lib_name, const char *version);
+static herr_t H5E_unregister_class(H5E_cls_t *cls);
+static ssize_t H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size);
+static int H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata);
+static herr_t H5E_close_msg(H5E_msg_t *err);
static H5E_msg_t *H5E_create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg);
-static H5E_t *H5E_get_current_stack(void);
-static herr_t H5E_set_current_stack(H5E_t *estack);
-static herr_t H5E_close_stack(H5E_t *err_stack);
-static ssize_t H5E_get_num(const H5E_t *err_stack);
-
+static H5E_t * H5E_get_current_stack(void);
+static herr_t H5E_set_current_stack(H5E_t *estack);
+static herr_t H5E_close_stack(H5E_t *err_stack);
+static ssize_t H5E_get_num(const H5E_t *err_stack);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -119,38 +111,34 @@ H5FL_DEFINE_STATIC(H5E_msg_t);
/* Error class ID class */
static const H5I_class_t H5I_ERRCLS_CLS[1] = {{
- H5I_ERROR_CLASS, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
+ H5I_ERROR_CLASS, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
(H5I_free_t)H5E_unregister_class /* Callback routine for closing objects of this class */
}};
/* Error message ID class */
static const H5I_class_t H5I_ERRMSG_CLS[1] = {{
- H5I_ERROR_MSG, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5E_close_msg /* Callback routine for closing objects of this class */
+ H5I_ERROR_MSG, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5E_close_msg /* Callback routine for closing objects of this class */
}};
/* Error stack ID class */
static const H5I_class_t H5I_ERRSTK_CLS[1] = {{
- H5I_ERROR_STACK, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
+ H5I_ERROR_STACK, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
(H5I_free_t)H5E_close_stack /* Callback routine for closing objects of this class */
}};
-
-
/*-------------------------------------------------------------------------
- * Function: H5E_init
- *
- * Purpose: Initialize the interface from some other layer.
+ * Function: H5E_init
*
- * Return: Success: non-negative
+ * Purpose: Initialize the interface from some other layer.
*
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Tuesday, June 29, 2004
@@ -160,7 +148,7 @@ static const H5I_class_t H5I_ERRSTK_CLS[1] = {{
herr_t
H5E_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -169,7 +157,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_init() */
-
/*--------------------------------------------------------------------------
* Function: H5E_set_default_auto
*
@@ -191,14 +178,14 @@ H5E_set_default_auto(H5E_t *stk)
#ifndef H5_NO_DEPRECATED_SYMBOLS
#ifdef H5_USE_16_API_DEFAULT
stk->auto_op.vers = 1;
-#else /* H5_USE_16_API */
+#else /* H5_USE_16_API */
stk->auto_op.vers = 2;
#endif /* H5_USE_16_API_DEFAULT */
stk->auto_op.func1 = stk->auto_op.func1_default = (H5E_auto1_t)H5Eprint1;
stk->auto_op.func2 = stk->auto_op.func2_default = (H5E_auto2_t)H5Eprint2;
- stk->auto_op.is_default = TRUE;
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+ stk->auto_op.is_default = TRUE;
+#else /* H5_NO_DEPRECATED_SYMBOLS */
stk->auto_op.func2 = (H5E_auto2_t)H5Eprint2;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -207,7 +194,6 @@ H5E_set_default_auto(H5E_t *stk)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_set_default_auto() */
-
/*--------------------------------------------------------------------------
* Function: H5E_init_interface
*
@@ -223,23 +209,23 @@ H5E_set_default_auto(H5E_t *stk)
static herr_t
H5E_init_interface(void)
{
- H5E_cls_t *cls; /* Pointer to error class */
- H5E_msg_t *msg; /* Pointer to new error message */
- char lib_vers[128]; /* Buffer to constructu library version within */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_cls_t *cls; /* Pointer to error class */
+ H5E_msg_t *msg; /* Pointer to new error message */
+ char lib_vers[128]; /* Buffer to constructu library version within */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the error class IDs */
- if(H5I_register_type(H5I_ERRCLS_CLS) < 0)
+ if (H5I_register_type(H5I_ERRCLS_CLS) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Initialize the atom group for the major error IDs */
- if(H5I_register_type(H5I_ERRMSG_CLS) < 0)
+ if (H5I_register_type(H5I_ERRMSG_CLS) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Initialize the atom group for the error stacks */
- if(H5I_register_type(H5I_ERRSTK_CLS) < 0)
+ if (H5I_register_type(H5I_ERRSTK_CLS) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
#ifndef H5_HAVE_THREADSAFE
@@ -249,29 +235,29 @@ H5E_init_interface(void)
/* Allocate the HDF5 error class */
HDassert(H5E_ERR_CLS_g == (-1));
- HDsnprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, (HDstrlen(H5_VERS_SUBRELEASE) > 0 ? "-"H5_VERS_SUBRELEASE : ""));
- if(NULL == (cls = H5E_register_class(H5E_CLS_NAME, H5E_CLS_LIB_NAME, lib_vers)))
+ HDsnprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
+ (HDstrlen(H5_VERS_SUBRELEASE) > 0 ? "-" H5_VERS_SUBRELEASE : ""));
+ if (NULL == (cls = H5E_register_class(H5E_CLS_NAME, H5E_CLS_LIB_NAME, lib_vers)))
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "class initialization failed")
- if((H5E_ERR_CLS_g = H5I_register(H5I_ERROR_CLASS, cls, FALSE)) < 0)
+ if ((H5E_ERR_CLS_g = H5I_register(H5I_ERROR_CLASS, cls, FALSE)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error class")
- /* Include the automatically generated error code initialization */
- #include "H5Einit.h"
+/* Include the automatically generated error code initialization */
+#include "H5Einit.h"
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_term_interface
+ * Function: H5E_term_interface
*
- * Purpose: Terminates the H5E interface
+ * Purpose: Terminates the H5E interface
*
- * Return: Success: Positive if anything is done that might
- * affect other interfaces; zero otherwise.
+ * Return: Success: Positive if anything is done that might
+ * affect other interfaces; zero otherwise.
*
- * Failure: Negative.
+ * Failure: Negative
*
* Programmer: Raymond Lu
* Tuesday, July 22, 2003
@@ -281,11 +267,11 @@ done:
int
H5E_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
+ if (H5_interface_initialize_g) {
int ncls, nmsg, nstk;
/* Check if there are any open error stacks, classes or messages */
@@ -293,62 +279,61 @@ H5E_term_interface(void)
nmsg = H5I_nmembers(H5I_ERROR_MSG);
nstk = H5I_nmembers(H5I_ERROR_STACK);
- if((ncls + nmsg + nstk) > 0) {
+ if ((ncls + nmsg + nstk) > 0) {
/* Clear any outstanding error stacks */
- if(nstk > 0)
- (void)H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE);
+ if (nstk > 0)
+ (void)H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE);
/* Clear all the error classes */
- if(ncls > 0) {
- (void)H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE);
+ if (ncls > 0) {
+ (void)H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE);
/* Reset the HDF5 error class, if its been closed */
- if(H5I_nmembers(H5I_ERROR_CLASS) == 0)
+ if (H5I_nmembers(H5I_ERROR_CLASS) == 0)
H5E_ERR_CLS_g = -1;
} /* end if */
/* Clear all the error messages */
- if(nmsg > 0) {
- (void)H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE);
+ if (nmsg > 0) {
+ (void)H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE);
/* Reset the HDF5 error messages, if they've been closed */
- if(H5I_nmembers(H5I_ERROR_MSG) == 0) {
- /* Include the automatically generated error code termination */
- #include "H5Eterm.h"
+ if (H5I_nmembers(H5I_ERROR_MSG) == 0) {
+/* Include the automatically generated error code termination */
+#include "H5Eterm.h"
} /* end if */
- } /* end if */
+ } /* end if */
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Close deprecated interface */
n += H5E__term_deprec_interface();
- /* Destroy the error class, message, and stack id groups */
- (void)H5I_dec_type_ref(H5I_ERROR_STACK);
- (void)H5I_dec_type_ref(H5I_ERROR_CLASS);
- (void)H5I_dec_type_ref(H5I_ERROR_MSG);
+ /* Destroy the error class, message, and stack id groups */
+ (void)H5I_dec_type_ref(H5I_ERROR_STACK);
+ (void)H5I_dec_type_ref(H5I_ERROR_CLASS);
+ (void)H5I_dec_type_ref(H5I_ERROR_MSG);
n++; /*H5I*/
- /* Mark closed */
- H5_interface_initialize_g = 0;
- } /* end else */
- } /* end if */
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* end H5E_term_interface() */
-
#ifdef H5_HAVE_THREADSAFE
/*-------------------------------------------------------------------------
- * Function: H5E_get_stack
+ * Function: H5E_get_stack
*
- * Purpose: Support function for H5E_get_my_stack() to initialize and
+ * Purpose: Support function for H5E_get_my_stack() to initialize and
* acquire per-thread error stack.
*
- * Return: Success: error stack (H5E_t *)
+ * Return: Success: Pointer to an error stack struct (H5E_t *)
*
- * Failure: NULL
+ * Failure: NULL
*
* Programmer: Chee Wai LEE
* April 24, 2000
@@ -358,18 +343,22 @@ H5E_term_interface(void)
H5E_t *
H5E_get_stack(void)
{
- H5E_t *estack;
+ H5E_t *estack = NULL;
FUNC_ENTER_NOAPI_NOINIT_NOERR
estack = (H5E_t *)H5TS_get_thread_local_value(H5TS_errstk_key_g);
- if(!estack) {
+ if (!estack) {
/* No associated value with current thread - create one */
#ifdef H5_HAVE_WIN_THREADS
- estack = (H5E_t *)LocalAlloc(LPTR, sizeof(H5E_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
+ /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
+ estack = (H5E_t *)LocalAlloc(LPTR, sizeof(H5E_t));
#else
- estack = (H5E_t *)H5FL_MALLOC(H5E_t);
+ /* Use HDmalloc here since this has to match the HDfree in the
+ * destructor and we want to avoid the codestack there.
+ */
+ estack = (H5E_t *)HDmalloc(sizeof(H5E_t));
#endif /* H5_HAVE_WIN_THREADS */
HDassert(estack);
@@ -387,15 +376,14 @@ H5E_get_stack(void)
/* Set return value */
FUNC_LEAVE_NOAPI(estack)
} /* end H5E_get_stack() */
-#endif /* H5_HAVE_THREADSAFE */
+#endif /* H5_HAVE_THREADSAFE */
-
/*-------------------------------------------------------------------------
- * Function: H5E_free_class
+ * Function: H5E_free_class
*
- * Purpose: Private function to free an error class.
+ * Purpose: Private function to free an error class.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Friday, January 22, 2009
@@ -411,21 +399,21 @@ H5E_free_class(H5E_cls_t *cls)
HDassert(cls);
/* Free error class structure */
- cls->cls_name = (char *)H5MM_xfree((void*)cls->cls_name);
- cls->lib_name = (char *)H5MM_xfree((void*)cls->lib_name);
- cls->lib_vers = (char *)H5MM_xfree((void*)cls->lib_vers);
- cls = H5FL_FREE(H5E_cls_t, cls);
+ cls->cls_name = (char *)H5MM_xfree((void *)cls->cls_name);
+ cls->lib_name = (char *)H5MM_xfree((void *)cls->lib_name);
+ cls->lib_vers = (char *)H5MM_xfree((void *)cls->lib_vers);
+ cls = H5FL_FREE(H5E_cls_t, cls);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_free_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eregister_class
+ * Function: H5Eregister_class
*
- * Purpose: Registers an error class.
+ * Purpose: Registers an error class.
*
- * Return: Non-negative value as class ID on success/Negative on failure
+ * Return: Success: An ID for the error class
+ * Failure: H5I_INVALID_HID
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -435,35 +423,35 @@ H5E_free_class(H5E_cls_t *cls)
hid_t
H5Eregister_class(const char *cls_name, const char *lib_name, const char *version)
{
- H5E_cls_t *cls; /* Pointer to error class */
- hid_t ret_value; /* Return value */
+ H5E_cls_t *cls; /* Pointer to error class */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "*s*s*s", cls_name, lib_name, version);
/* Check arguments */
- if(cls_name == NULL || lib_name == NULL || version == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid string")
+ if (cls_name == NULL || lib_name == NULL || version == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid string")
/* Create the new error class object */
- if(NULL == (cls = H5E_register_class(cls_name, lib_name, version)))
- HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, FAIL, "can't create error class")
+ if (NULL == (cls = H5E_register_class(cls_name, lib_name, version)))
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error class")
/* Register the new error class to get an ID for it */
- if((ret_value = H5I_register(H5I_ERROR_CLASS, cls, TRUE)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error class")
+ if ((ret_value = H5I_register(H5I_ERROR_CLASS, cls, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error class")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eregister_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_register_class
+ * Function: H5E_register_class
*
- * Purpose: Private function to register an error class.
+ * Purpose: Private function to register an error class.
*
- * Return: Non-negative value as class ID on success/Negative on failure
+ * Return: Success: Pointer to an error class struct
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -473,8 +461,8 @@ done:
static H5E_cls_t *
H5E_register_class(const char *cls_name, const char *lib_name, const char *version)
{
- H5E_cls_t *cls = NULL; /* Pointer to error class */
- H5E_cls_t *ret_value; /* Return value */
+ H5E_cls_t *cls = NULL; /* Pointer to error class */
+ H5E_cls_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -484,37 +472,36 @@ H5E_register_class(const char *cls_name, const char *lib_name, const char *versi
HDassert(version);
/* Allocate space for new error class */
- if(NULL == (cls = H5FL_CALLOC(H5E_cls_t)))
+ if (NULL == (cls = H5FL_CALLOC(H5E_cls_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Duplicate string information */
- if(NULL == (cls->cls_name = H5MM_xstrdup(cls_name)))
+ if (NULL == (cls->cls_name = H5MM_xstrdup(cls_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (cls->lib_name = H5MM_xstrdup(lib_name)))
+ if (NULL == (cls->lib_name = H5MM_xstrdup(lib_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (cls->lib_vers = H5MM_xstrdup(version)))
+ if (NULL == (cls->lib_vers = H5MM_xstrdup(version)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set the return value */
ret_value = cls;
done:
- if(!ret_value)
- if(cls && H5E_free_class(cls) < 0)
+ if (!ret_value)
+ if (cls && H5E_free_class(cls) < 0)
HDONE_ERROR(H5E_ERROR, H5E_CANTRELEASE, NULL, "unable to free error class")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_register_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eunregister_class
+ * Function: H5Eunregister_class
*
- * Purpose: Closes an error class.
+ * Purpose: Closes an error class.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 11, 2003
*
*-------------------------------------------------------------------------
@@ -522,33 +509,32 @@ done:
herr_t
H5Eunregister_class(hid_t class_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", class_id);
/* Check arguments */
- if(H5I_ERROR_CLASS != H5I_get_type(class_id))
+ if (H5I_ERROR_CLASS != H5I_get_type(class_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class")
/*
* Decrement the counter on the dataset. It will be freed if the count
* reaches zero.
*/
- if(H5I_dec_app_ref(class_id) < 0)
+ if (H5I_dec_app_ref(class_id) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eunregister_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_unregister_class
+ * Function: H5E_unregister_class
*
- * Purpose: Private function to close an error class.
+ * Purpose: Private function to close an error class.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -558,7 +544,7 @@ done:
static herr_t
H5E_unregister_class(H5E_cls_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -566,25 +552,24 @@ H5E_unregister_class(H5E_cls_t *cls)
HDassert(cls);
/* Iterate over all the messages and delete those in this error class */
- if(H5I_iterate(H5I_ERROR_MSG, H5E_close_msg_cb, cls, FALSE) < 0)
+ if (H5I_iterate(H5I_ERROR_MSG, H5E_close_msg_cb, cls, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class")
/* Free error class structure */
- if(H5E_free_class(cls) < 0)
+ if (H5E_free_class(cls) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_unregister_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_class_name
+ * Function: H5Eget_class_name
*
- * Purpose: Retrieves error class name.
+ * Purpose: Retrieves error class name.
*
- * Return: Non-negative for name length if succeeds(zero means no name);
- * otherwise returns negative value.
+ * Return: Success: Name length (zero means no name)
+ * Failure: -1
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -594,32 +579,31 @@ done:
ssize_t
H5Eget_class_name(hid_t class_id, char *name, size_t size)
{
- H5E_cls_t *cls; /* Pointer to error class */
- ssize_t ret_value; /* Return value */
+ H5E_cls_t *cls; /* Pointer to error class */
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "i*sz", class_id, name, size);
/* Get the error class */
- if(NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error class ID")
+ if (NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error class ID")
/* Retrieve the class name */
- if((ret_value = H5E_get_class_name(cls, name, size)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get error class name")
+ if ((ret_value = H5E_get_class_name(cls, name, size)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error class name")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_class_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_get_class_name
+ * Function: H5E_get_class_name
*
- * Purpose: Private function to retrieve error class name.
+ * Purpose: Private function to retrieve error class name.
*
- * Return: Non-negative for name length if succeeds(zero means no name);
- * otherwise returns negative value.
+ * Return: Success: Name length (zero means no name)
+ * Failure: -1
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -629,7 +613,7 @@ done:
static ssize_t
H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size)
{
- ssize_t len; /* Length of error class's name */
+ ssize_t len = -1; /* Length of error class's name */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -640,17 +624,16 @@ H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size)
len = (ssize_t)HDstrlen(cls->cls_name);
/* Set the user's buffer, if provided */
- if(name) {
- HDstrncpy(name, cls->cls_name, MIN((size_t)(len + 1), size));
- if((size_t)len >= size)
- name[size - 1] = '\0';
+ if (name) {
+ HDstrncpy(name, cls->cls_name, MIN((size_t)(len + 1), size));
+ if ((size_t)len >= size)
+ name[size - 1] = '\0';
} /* end if */
/* Return the full length */
FUNC_LEAVE_NOAPI(len)
} /* end H5E_get_class_name() */
-
/*-------------------------------------------------------------------------
* Function: H5E_close_msg_cb
*
@@ -667,9 +650,9 @@ H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size)
static int
H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata)
{
- H5E_msg_t *err_msg = (H5E_msg_t*)obj_ptr;
- H5E_cls_t *cls = (H5E_cls_t*)udata;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_msg_t *err_msg = (H5E_msg_t *)obj_ptr;
+ H5E_cls_t *cls = (H5E_cls_t *)udata;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -677,10 +660,10 @@ H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata)
HDassert(err_msg);
/* Close the message if it is in the class being closed */
- if(err_msg->cls == cls) {
- if(H5E_close_msg(err_msg) < 0)
+ if (err_msg->cls == cls) {
+ if (H5E_close_msg(err_msg) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTCLOSEOBJ, FAIL, "unable to close error message")
- if(NULL == H5I_remove(obj_id))
+ if (NULL == H5I_remove(obj_id))
HGOTO_ERROR(H5E_ERROR, H5E_CANTREMOVE, FAIL, "unable to remove error message")
} /* end if */
@@ -688,13 +671,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_close_msg_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eclose_msg
+ * Function: H5Eclose_msg
*
- * Purpose: Closes a major or minor error.
+ * Purpose: Closes a major or minor error.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -704,30 +686,29 @@ done:
herr_t
H5Eclose_msg(hid_t err_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", err_id);
/* Check arguments */
- if(H5I_ERROR_MSG != H5I_get_type(err_id))
+ if (H5I_ERROR_MSG != H5I_get_type(err_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class")
/* Decrement the counter. It will be freed if the count reaches zero. */
- if(H5I_dec_app_ref(err_id) < 0)
+ if (H5I_dec_app_ref(err_id) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eclose_msg() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_close_msg
+ * Function: H5E_close_msg
*
- * Purpose: Private function to close an error messge.
+ * Purpose: Private function to close an error messge.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -750,13 +731,13 @@ H5E_close_msg(H5E_msg_t *err)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_close_msg() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ecreate_msg
+ * Function: H5Ecreate_msg
*
- * Purpose: Creates a major or minor error, returns an ID.
+ * Purpose: Creates a major or minor error, returns an ID.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Success: An error ID
+ * Failure: H5I_INVALID_HID
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -766,41 +747,42 @@ H5E_close_msg(H5E_msg_t *err)
hid_t
H5Ecreate_msg(hid_t class_id, H5E_type_t msg_type, const char *msg_str)
{
- H5E_cls_t *cls; /* Pointer to error class */
- H5E_msg_t *msg; /* Pointer to new error message */
- hid_t ret_value; /* Return value */
+ H5E_cls_t *cls; /* Pointer to error class */
+ H5E_msg_t *msg; /* Pointer to new error message */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "iEt*s", class_id, msg_type, msg_str);
/* Check arguments */
- if(msg_type != H5E_MAJOR && msg_type != H5E_MINOR)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid message type")
- if(msg_str == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "message is NULL")
+ if (msg_type != H5E_MAJOR && msg_type != H5E_MINOR)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "not a valid message type")
+ if (msg_str == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "message is NULL")
/* Get the error class */
- if(NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error class ID")
+ if (NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an error class ID")
/* Create the new error message object */
- if(NULL == (msg = H5E_create_msg(cls, msg_type, msg_str)))
- HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, FAIL, "can't create error message")
+ if (NULL == (msg = H5E_create_msg(cls, msg_type, msg_str)))
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error message")
/* Register the new error class to get an ID for it */
- if((ret_value = H5I_register(H5I_ERROR_MSG, msg, TRUE)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+ if ((ret_value = H5I_register(H5I_ERROR_MSG, msg, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error message")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ecreate_msg() */
/*-------------------------------------------------------------------------
- * Function: H5E_create_msg
+ * Function: H5E_create_msg
*
- * Purpose: Private function to create a major or minor error.
+ * Purpose: Private function to create a major or minor error.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Success: Pointer to a message struct
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -810,8 +792,8 @@ done:
static H5E_msg_t *
H5E_create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
{
- H5E_msg_t *msg = NULL; /* Pointer to new error message */
- H5E_msg_t *ret_value; /* Return value */
+ H5E_msg_t *msg = NULL; /* Pointer to new error message */
+ H5E_msg_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -821,34 +803,33 @@ H5E_create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
HDassert(msg_str);
/* Allocate new message object */
- if(NULL == (msg = H5FL_MALLOC(H5E_msg_t)))
+ if (NULL == (msg = H5FL_MALLOC(H5E_msg_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Fill new message object */
- msg->cls = cls;
+ msg->cls = cls;
msg->type = msg_type;
- if(NULL == (msg->msg = H5MM_xstrdup(msg_str)))
+ if (NULL == (msg->msg = H5MM_xstrdup(msg_str)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set return value */
ret_value = msg;
done:
- if(!ret_value)
- if(msg && H5E_close_msg(msg) < 0)
+ if (!ret_value)
+ if (msg && H5E_close_msg(msg) < 0)
HDONE_ERROR(H5E_ERROR, H5E_CANTCLOSEOBJ, NULL, "unable to close error message")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_create_msg() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_msg
+ * Function: H5Eget_msg
*
- * Purpose: Retrieves an error message.
+ * Purpose: Retrieves an error message.
*
- * Return: Non-negative for message length if succeeds(zero means no message);
- * otherwise returns negative value.
+ * Return: Success: Message length (zero means no message)
+ * Failure: -1
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -858,31 +839,31 @@ done:
ssize_t
H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg_str, size_t size)
{
- H5E_msg_t *msg; /* Pointer to error message */
- ssize_t ret_value; /* Return value */
+ H5E_msg_t *msg; /* Pointer to error message */
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE4("Zs", "i*Et*sz", msg_id, type, msg_str, size);
/* Get the message object */
- if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(msg_id, H5I_ERROR_MSG)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error message ID")
+ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(msg_id, H5I_ERROR_MSG)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error message ID")
/* Get the message's text */
- if((ret_value = H5E_get_msg(msg, type, msg_str, size)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get error message text")
+ if ((ret_value = H5E_get_msg(msg, type, msg_str, size)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error message text")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_msg() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ecreate_stack
+ * Function: H5Ecreate_stack
*
- * Purpose: Creates a new, empty, error stack.
+ * Purpose: Creates a new, empty, error stack.
*
- * Return: Non-negative value as stack ID on success/Negative on failure
+ * Return: Success: An error stack ID
+ * Failure: H5I_INVALID_HID
*
* Programmer: Quincey Koziol
* Thursday, November 1, 2007
@@ -892,35 +873,35 @@ done:
hid_t
H5Ecreate_stack(void)
{
- H5E_t *stk; /* Error stack */
- hid_t ret_value; /* Return value */
+ H5E_t *stk; /* Error stack */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE0("i","");
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE0("i", "");
/* Allocate a new error stack */
- if(NULL == (stk = H5FL_CALLOC(H5E_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (stk = H5FL_CALLOC(H5E_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
/* Set the "automatic" error reporting info to the library default */
H5E_set_default_auto(stk);
/* Register the stack */
- if((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't create error stack")
+ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ecreate_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_current_stack
+ * Function: H5Eget_current_stack
*
- * Purpose: Registers current error stack, returns object handle for it,
+ * Purpose: Registers current error stack, returns object handle for it,
* clears it.
*
- * Return: Non-negative value as stack ID on success/Negative on failure
+ * Return: Success: An error stack ID
+ * Failure: H5I_INVALID_HID
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -930,32 +911,32 @@ done:
hid_t
H5Eget_current_stack(void)
{
- H5E_t *stk; /* Error stack */
- hid_t ret_value; /* Return value */
+ H5E_t *stk; /* Error stack */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(FAIL)
- H5TRACE0("i","");
+ FUNC_ENTER_API_NOCLEAR(H5I_INVALID_HID)
+ H5TRACE0("i", "");
/* Get the current stack */
- if(NULL == (stk = H5E_get_current_stack()))
- HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, FAIL, "can't create error stack")
+ if (NULL == (stk = H5E_get_current_stack()))
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error stack")
/* Register the stack */
- if((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't create error stack")
+ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_current_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_get_current_stack
+ * Function: H5E_get_current_stack
*
- * Purpose: Private function to register an error stack.
+ * Purpose: Private function to register an error stack.
*
- * Return: Non-negative value as class ID on success/Negative on failure
+ * Return: Success: Pointer to an error class struct
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 11, 2003
@@ -965,51 +946,52 @@ done:
static H5E_t *
H5E_get_current_stack(void)
{
- H5E_t *current_stack; /* Pointer to the current error stack */
- H5E_t *estack_copy=NULL; /* Pointer to new error stack to return */
- unsigned u; /* Local index variable */
- H5E_t *ret_value; /* Return value */
+ H5E_t * current_stack; /* Pointer to the current error stack */
+ H5E_t * estack_copy = NULL; /* Pointer to new error stack to return */
+ unsigned u; /* Local index variable */
+ H5E_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get a pointer to the current error stack */
- if(NULL == (current_stack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get current error stack")
+ if (NULL == (current_stack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get current error stack")
/* Allocate a new error stack */
- if(NULL == (estack_copy = H5FL_CALLOC(H5E_t)))
+ if (NULL == (estack_copy = H5FL_CALLOC(H5E_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Make a copy of current error stack */
estack_copy->nused = current_stack->nused;
- for(u = 0; u < current_stack->nused; u++) {
+ for (u = 0; u < current_stack->nused; u++) {
H5E_error2_t *current_error, *new_error; /* Pointers to errors on each stack */
/* Get pointers into the current error stack location */
current_error = &(current_stack->slot[u]);
- new_error = &(estack_copy->slot[u]);
+ new_error = &(estack_copy->slot[u]);
/* Increment the IDs to indicate that they are used in this stack */
- if(H5I_inc_ref(current_error->cls_id, FALSE) < 0)
+ if (H5I_inc_ref(current_error->cls_id, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error class")
new_error->cls_id = current_error->cls_id;
- if(H5I_inc_ref(current_error->maj_num, FALSE) < 0)
+ if (H5I_inc_ref(current_error->maj_num, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message")
new_error->maj_num = current_error->maj_num;
- if(H5I_inc_ref(current_error->min_num, FALSE) < 0)
+ if (H5I_inc_ref(current_error->min_num, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message")
new_error->min_num = current_error->min_num;
- if(NULL == (new_error->func_name = H5MM_xstrdup(current_error->func_name)))
+ if (NULL == (new_error->func_name = H5MM_xstrdup(current_error->func_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (new_error->file_name = H5MM_xstrdup(current_error->file_name)))
+ if (NULL == (new_error->file_name = H5MM_xstrdup(current_error->file_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
new_error->line = current_error->line;
- if(NULL == (new_error->desc = H5MM_xstrdup(current_error->desc)))
+ if (NULL == (new_error->desc = H5MM_xstrdup(current_error->desc)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
} /* end for */
/* Copy the "automatic" error reporting information */
- estack_copy->auto_op = current_stack->auto_op;
+ estack_copy->auto_op = current_stack->auto_op;
estack_copy->auto_data = current_stack->auto_data;
/* Empty current error stack */
@@ -1019,54 +1001,48 @@ H5E_get_current_stack(void)
ret_value = estack_copy;
done:
- if(ret_value == NULL)
- if(estack_copy)
+ if (ret_value == NULL)
+ if (estack_copy)
estack_copy = H5FL_FREE(H5E_t, estack_copy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_get_current_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eset_current_stack
+ * Function: H5Eset_current_stack
*
- * Purpose: Replaces current stack with specified stack. This closes the
- * stack ID also.
+ * Purpose: Replaces current stack with specified stack. This closes the
+ * stack ID also.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 15, 2003
*
- * Modification:
- * Raymond Lu
- * 7 September 2010
- * Also closes the stack to avoid potential problem (bug 1799)
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Eset_current_stack(hid_t err_stack)
{
H5E_t *estack;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", err_stack);
- if(err_stack != H5E_DEFAULT) {
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (err_stack != H5E_DEFAULT) {
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
/* Set the current error stack */
- if(H5E_set_current_stack(estack) < 0)
+ if (H5E_set_current_stack(estack) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "unable to set error stack")
/*
* Decrement the counter on the error stack. It will be freed if the count
* reaches zero.
*/
- if(H5I_dec_app_ref(err_stack) < 0)
+ if (H5I_dec_app_ref(err_stack) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack")
} /* end if */
@@ -1074,13 +1050,12 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eset_current_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_set_current_stack
+ * Function: H5E_set_current_stack
*
- * Purpose: Private function to replace an error stack.
+ * Purpose: Private function to replace an error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 15, 2003
@@ -1090,9 +1065,9 @@ done:
static herr_t
H5E_set_current_stack(H5E_t *estack)
{
- H5E_t *current_stack; /* Default error stack */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * current_stack; /* Default error stack */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1100,37 +1075,38 @@ H5E_set_current_stack(H5E_t *estack)
HDassert(estack);
/* Get a pointer to the current error stack */
- if(NULL == (current_stack = H5E_get_my_stack ())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
+ if (NULL == (current_stack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty current error stack */
H5E_clear_stack(current_stack);
/* Copy new stack to current error stack */
current_stack->nused = estack->nused;
- for(u = 0; u < current_stack->nused; u++) {
+ for (u = 0; u < current_stack->nused; u++) {
H5E_error2_t *current_error, *new_error; /* Pointers to errors on each stack */
/* Get pointers into the current error stack location */
current_error = &(current_stack->slot[u]);
- new_error = &(estack->slot[u]);
+ new_error = &(estack->slot[u]);
/* Increment the IDs to indicate that they are used in this stack */
- if(H5I_inc_ref(new_error->cls_id, FALSE) < 0)
+ if (H5I_inc_ref(new_error->cls_id, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class")
current_error->cls_id = new_error->cls_id;
- if(H5I_inc_ref(new_error->maj_num, FALSE) < 0)
+ if (H5I_inc_ref(new_error->maj_num, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class")
current_error->maj_num = new_error->maj_num;
- if(H5I_inc_ref(new_error->min_num, FALSE) < 0)
+ if (H5I_inc_ref(new_error->min_num, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class")
current_error->min_num = new_error->min_num;
- if(NULL == (current_error->func_name = H5MM_xstrdup(new_error->func_name)))
+ if (NULL == (current_error->func_name = H5MM_xstrdup(new_error->func_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(NULL == (current_error->file_name = H5MM_xstrdup(new_error->file_name)))
+ if (NULL == (current_error->file_name = H5MM_xstrdup(new_error->file_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
current_error->line = new_error->line;
- if(NULL == (current_error->desc = H5MM_xstrdup(new_error->desc)))
+ if (NULL == (current_error->desc = H5MM_xstrdup(new_error->desc)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end for */
@@ -1138,15 +1114,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_set_current_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eclose_stack
+ * Function: H5Eclose_stack
*
- * Purpose: Closes an error stack.
+ * Purpose: Closes an error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 14, 2003
*
*-------------------------------------------------------------------------
@@ -1154,21 +1129,21 @@ done:
herr_t
H5Eclose_stack(hid_t stack_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", stack_id);
- if(H5E_DEFAULT != stack_id) {
+ if (H5E_DEFAULT != stack_id) {
/* Check arguments */
- if(H5I_ERROR_STACK != H5I_get_type(stack_id))
+ if (H5I_ERROR_STACK != H5I_get_type(stack_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
/*
* Decrement the counter on the error stack. It will be freed if the count
* reaches zero.
*/
- if(H5I_dec_app_ref(stack_id) < 0)
+ if (H5I_dec_app_ref(stack_id) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack")
} /* end if */
@@ -1176,13 +1151,12 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eclose_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_close_stack
+ * Function: H5E_close_stack
*
- * Purpose: Private function to close an error stack.
+ * Purpose: Private function to close an error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -1206,13 +1180,13 @@ H5E_close_stack(H5E_t *estack)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_close_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_num
+ * Function: H5Eget_num
*
- * Purpose: Retrieves the number of error message.
+ * Purpose: Retrieves the number of error messages.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Success: The number of errors
+ * Failure: -1
*
* Programmer: Raymond Lu
* Friday, July 15, 2003
@@ -1222,42 +1196,43 @@ H5E_close_stack(H5E_t *estack)
ssize_t
H5Eget_num(hid_t error_stack_id)
{
- H5E_t *estack; /* Error stack to operate on */
- ssize_t ret_value; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ ssize_t ret_value; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(FAIL)
+ FUNC_ENTER_API_NOCLEAR((-1))
H5TRACE1("Zs", "i", error_stack_id);
/* Need to check for errors */
- if(error_stack_id == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
+ if (error_stack_id == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get current error stack")
} /* end if */
else {
/* Only clear the error stack if it's not the default stack */
H5E_clear_stack(NULL);
/* Get the error stack to operate on */
- if(NULL == (estack = (H5E_t *)H5I_object_verify(error_stack_id, H5I_ERROR_STACK)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(error_stack_id, H5I_ERROR_STACK)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an error stack ID")
} /* end else */
/* Get the number of errors on stack */
- if((ret_value = H5E_get_num(estack)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get number of errors")
+ if ((ret_value = H5E_get_num(estack)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get number of errors")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_num() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_get_num
+ * Function: H5E_get_num
*
- * Purpose: Private function to retrieve number of errors in error stack.
+ * Purpose: Private function to retrieve number of errors in error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Success: The number of errors
+ * Failure: -1 (can't fail at this time)
*
* Programmer: Raymond Lu
* Friday, July 15, 2003
@@ -1274,15 +1249,14 @@ H5E_get_num(const H5E_t *estack)
FUNC_LEAVE_NOAPI((ssize_t)estack->nused)
} /* end H5E_get_num() */
-
/*-------------------------------------------------------------------------
- * Function: H5Epop
+ * Function: H5Epop
*
- * Purpose: Deletes some error messages from the top of error stack.
+ * Purpose: Deletes some error messages from the top of error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -1291,15 +1265,16 @@ herr_t
H5Epop(hid_t err_stack, size_t count)
{
H5E_t *estack;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE2("e", "iz", err_stack, count);
/* Need to check for errors */
- if(err_stack == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (err_stack == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
else {
@@ -1307,131 +1282,136 @@ H5Epop(hid_t err_stack, size_t count)
H5E_clear_stack(NULL);
/* Get the error stack to operate on */
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
} /* end else */
/* Range limit the number of errors to pop off stack */
- if(count > estack->nused)
+ if (count > estack->nused)
count = estack->nused;
/* Pop the errors off the stack */
- if(H5E_pop(estack, count) < 0)
+ if (H5E_pop(estack, count) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't pop errors from stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Epop() */
-
/*-------------------------------------------------------------------------
- * Function: H5Epush2
+ * Function: H5Epush2
*
- * Purpose: Pushes a new error record onto error stack for the current
- * thread. The error has major and minor IDs MAJ_ID and
- * MIN_ID, the name of a function where the error was detected,
- * the name of the file where the error was detected, the
- * line within that file, and an error description string. The
- * function name, file name, and error description strings must
- * be statically allocated.
+ * Purpose: Pushes a new error record onto error stack for the current
+ * thread. The error has major and minor IDs MAJ_ID and
+ * MIN_ID, the name of a function where the error was detected,
+ * the name of the file where the error was detected, the
+ * line within that file, and an error description string. The
+ * function name, file name, and error description strings must
+ * be statically allocated.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, October 18, 1999
*
- * Notes: Basically a new public API wrapper around the H5E_push_stack
+ * Notes: Basically a new public API wrapper around the H5E_push_stack
* function.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
- hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)
+H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id,
+ hid_t min_id, const char *fmt, ...)
{
- va_list ap; /* Varargs info */
- H5E_t *estack; /* Pointer to error stack to modify */
+ va_list ap; /* Varargs info */
+ H5E_t * estack; /* Pointer to error stack to modify */
#ifndef H5_HAVE_VASPRINTF
- int tmp_len; /* Current size of description buffer */
- int desc_len; /* Actual length of description when formatted */
-#endif /* H5_HAVE_VASPRINTF */
- char *tmp = NULL; /* Buffer to place formatted description in */
- hbool_t va_started = FALSE; /* Whether the variable argument list is open */
- herr_t ret_value=SUCCEED; /* Return value */
+ int tmp_len; /* Current size of description buffer */
+ int desc_len; /* Actual length of description when formatted */
+#endif /* H5_HAVE_VASPRINTF */
+ char * tmp = NULL; /* Buffer to place formatted description in */
+ hbool_t va_started = FALSE; /* Whether the variable argument list is open */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
- H5TRACE8("e", "i*s*sIuiii*s", err_stack, file, func, line, cls_id, maj_id,
- min_id, fmt);
+ H5TRACE8("e", "i*s*sIuiii*s", err_stack, file, func, line, cls_id, maj_id, min_id, fmt);
- if(err_stack == H5E_DEFAULT)
- estack = NULL;
+ if (err_stack == H5E_DEFAULT)
+ estack = NULL;
else {
/* Only clear the error stack if it's not the default stack */
H5E_clear_stack(NULL);
/* Get the error stack to operate on */
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
} /* end else */
-/* Note that the variable-argument parsing for the format is identical in
- * the H5E_printf_stack() routine - correct errors and make changes in both
- * places. -QAK
- */
+ /* Note that the variable-argument parsing for the format is identical in
+ * the H5E_printf_stack() routine - correct errors and make changes in both
+ * places. -QAK
+ */
/* Format the description */
- va_start(ap, fmt);
+ HDva_start(ap, fmt);
va_started = TRUE;
#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
- if(HDvasprintf(&tmp, fmt, ap) < 0)
+ if (HDvasprintf(&tmp, fmt, ap) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-#else /* H5_HAVE_VASPRINTF */
+#else /* H5_HAVE_VASPRINTF */
/* Allocate space for the formatted description buffer */
tmp_len = 128;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
+ if (NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* If the description doesn't fit into the initial buffer size, allocate more space and try again */
- while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
+ while ((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
/* shutdown & restart the va_list */
- va_end(ap);
- va_start(ap, fmt);
+ HDva_end(ap);
+ HDva_start(ap, fmt);
/* Release the previous description, it's too small */
H5MM_xfree(tmp);
/* Allocate a description of the appropriate length */
tmp_len = desc_len + 1;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
+ if (NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end while */
#endif /* H5_HAVE_VASPRINTF */
/* Push the error on the stack */
- if(H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
+ if (H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack")
done:
- if(va_started)
- va_end(ap);
- if(tmp)
+ if (va_started)
+ HDva_end(ap);
+#ifdef H5_HAVE_VASPRINTF
+ /* Memory was allocated with HDvasprintf so it needs to be freed
+ * with HDfree
+ */
+ if (tmp)
+ HDfree(tmp);
+#else /* H5_HAVE_VASPRINTF */
+ if (tmp)
H5MM_xfree(tmp);
+#endif /* H5_HAVE_VASPRINTF */
FUNC_LEAVE_API(ret_value)
} /* end H5Epush2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eclear2
+ * Function: H5Eclear2
*
- * Purpose: Clears the error stack for the specified error stack.
+ * Purpose: Clears the error stack for the specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -1439,44 +1419,43 @@ done:
herr_t
H5Eclear2(hid_t err_stack)
{
- H5E_t *estack; /* Error stack to operate on */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t *estack; /* Error stack to operate on */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE1("e", "i", err_stack);
/* Need to check for errors */
- if(err_stack == H5E_DEFAULT)
- estack = NULL;
+ if (err_stack == H5E_DEFAULT)
+ estack = NULL;
else {
/* Only clear the error stack if it's not the default stack */
H5E_clear_stack(NULL);
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
} /* end else */
/* Clear the error stack */
- if(H5E_clear_stack(estack) < 0)
+ if (H5E_clear_stack(estack) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eclear2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eprint2
+ * Function: H5Eprint2
*
- * Purpose: Prints the error stack in some default way. This is just a
- * convenience function for H5Ewalk() with a function that
- * prints error messages. Users are encouraged to write there
- * own more specific error handlers.
+ * Purpose: Prints the error stack in some default way. This is just a
+ * convenience function for H5Ewalk() with a function that
+ * prints error messages. Users are encouraged to write their
+ * own more specific error handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -1484,44 +1463,44 @@ done:
herr_t
H5Eprint2(hid_t err_stack, FILE *stream)
{
- H5E_t *estack; /* Error stack to operate on */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t *estack; /* Error stack to operate on */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
/* Need to check for errors */
- if(err_stack == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (err_stack == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
else {
/* Only clear the error stack if it's not the default stack */
H5E_clear_stack(NULL);
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
} /* end else */
/* Print error stack */
- if(H5E_print(estack, stream, FALSE) < 0)
+ if (H5E_print(estack, stream, FALSE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eprint2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ewalk2
+ * Function: H5Ewalk2
*
- * Purpose: Walks the error stack for the current thread and calls some
- * function for each error along the way.
+ * Purpose: Walks the error stack for the current thread and calls some
+ * function for each error along the way.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -1529,145 +1508,136 @@ done:
herr_t
H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t stack_func, void *client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_walk_op_t op; /* Operator for walking error stack */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_walk_op_t op; /* Operator for walking error stack */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
/* Need to check for errors */
- if(err_stack == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (err_stack == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
else {
/* Only clear the error stack if it's not the default stack */
H5E_clear_stack(NULL);
- if(NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
+ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
} /* end else */
/* Walk the error stack */
- op.vers = 2;
+ op.vers = 2;
op.u.func2 = stack_func;
- if(H5E_walk(estack, direction, &op, client_data) < 0)
+ if (H5E_walk(estack, direction, &op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ewalk2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_auto2
+ * Function: H5Eget_auto2
*
- * Purpose: Returns the current settings for the automatic error stack
- * traversal function and its data for specific error stack.
- * Either (or both) arguments may be null in which case the
- * value is not returned.
+ * Purpose: Returns the current settings for the automatic error stack
+ * traversal function and its data for specific error stack.
+ * Either (or both) arguments may be null in which case the
+ * value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Robb Matzke
* Saturday, February 28, 1998
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the printing function isn't the default H5Eprint1 or 2,
- * and H5Eset_auto1 has been called to set the old style
- * printing function, a call to H5Eget_auto2 should fail.
*-------------------------------------------------------------------------
*/
herr_t
H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t op; /* Error stack function */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_auto_op_t op; /* Error stack function */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x**x", estack_id, func, client_data);
- if(estack_id == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (estack_id == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
- else
- if(NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
+ else if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &op, client_data) < 0)
+ if (H5E_get_auto(estack, &op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto1 */
- if(!op.is_default && op.vers == 1)
+ if (!op.is_default && op.vers == 1)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto1 has been called")
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- if(func)
+ if (func)
*func = op.func2;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_auto2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eset_auto2
+ * Function: H5Eset_auto2
*
- * Purpose: Turns on or off automatic printing of errors for certain
+ * Purpose: Turns on or off automatic printing of errors for certain
* error stack. When turned on (non-null FUNC pointer) any
* API function which returns an error indication will first
* call FUNC passing it CLIENT_DATA as an argument.
*
- * The default values before this function is called are
- * H5Eprint2() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint2() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
+ * direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Robb Matzke
* Friday, February 27, 1998
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the FUNC is H5Eprint2, put the IS_DEFAULT flag on.
*-------------------------------------------------------------------------
*/
herr_t
H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t op; /* Error stack operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_auto_op_t op; /* Error stack operator */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE3("e", "ix*x", estack_id, func, client_data);
- if(estack_id == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (estack_id == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
- else
- if(NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
+ else if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &op, NULL) < 0)
+ if (H5E_get_auto(estack, &op, NULL) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
/* Set the automatic error reporting information */
- if(func != op.func2_default)
+ if (func != op.func2_default)
op.is_default = FALSE;
else
op.is_default = TRUE;
@@ -1678,23 +1648,22 @@ H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data)
/* Set the automatic error reporting function */
op.func2 = func;
- if(H5E_set_auto(estack, &op, client_data) < 0)
+ if (H5E_set_auto(estack, &op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eset_auto2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eauto_is_v2
+ * Function: H5Eauto_is_v2
*
- * Purpose: Determines if the error auto reporting function for an
+ * Purpose: Determines if the error auto reporting function for an
* error stack conforms to the H5E_auto_stack_t typedef
* or the H5E_auto_t typedef. The IS_STACK parameter is set
* to 1 for the first case and 0 for the latter case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Quincey Koziol
* Wednesday, September 8, 2004
@@ -1704,22 +1673,22 @@ done:
herr_t
H5Eauto_is_v2(hid_t estack_id, unsigned *is_stack)
{
- H5E_t *estack; /* Error stack to operate on */
+ H5E_t *estack; /* Error stack to operate on */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", estack_id, is_stack);
- if(estack_id == H5E_DEFAULT) {
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (estack_id == H5E_DEFAULT) {
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
} /* end if */
- else
- if(NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
+ else if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID")
/* Check if the error stack reporting function is the "newer" stack type */
- if(is_stack)
+ if (is_stack)
#ifndef H5_NO_DEPRECATED_SYMBOLS
*is_stack = estack->auto_op.vers > 1;
#else
@@ -1729,4 +1698,3 @@ H5Eauto_is_v2(hid_t estack_id, unsigned *is_stack)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eauto_is_v2() */
-
diff --git a/src/H5Edefin.h b/src/H5Edefin.h
index 6c0e794..5b5165c 100644
--- a/src/H5Edefin.h
+++ b/src/H5Edefin.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,7 +22,7 @@
hid_t H5E_DATASET_g = FAIL; /* Dataset */
hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
hid_t H5E_STORAGE_g = FAIL; /* Data storage */
-hid_t H5E_FILE_g = FAIL; /* File accessibilty */
+hid_t H5E_FILE_g = FAIL; /* File accessibility */
hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
hid_t H5E_SYM_g = FAIL; /* Symbol table */
hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
@@ -131,7 +131,7 @@ hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
/* Plugin errors */
hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
-/* File accessibilty errors */
+/* File accessibility errors */
hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index e2ef79c..e6a6bb6 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Edeprec.c
* April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5E interface. These
* functions are here for compatibility purposes and may be
@@ -29,58 +29,48 @@
/* Module Setup */
/****************/
-#define H5E_PACKAGE /*suppress error about including H5Epkg */
+#define H5E_PACKAGE /*suppress error about including H5Epkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5E__init_deprec_interface
-
+#define H5_INTERFACE_INIT_FUNC H5E__init_deprec_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Epkg.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Epkg.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5E__init_deprec_interface -- Initialize interface-specific information
@@ -101,7 +91,6 @@ H5E__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5E_init())
} /* H5E__init_deprec_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5E__term_deprec_interface -- Terminate interface
@@ -126,14 +115,14 @@ H5E__term_deprec_interface(void)
} /* H5E__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
- * Function: H5Eget_major
+ * Function: H5Eget_major
*
- * Purpose: Retrieves a major error message.
+ * Purpose: Retrieves a major error message.
*
- * Return: Returns message if succeeds.
- * otherwise returns NULL.
+ * Return: Success: Pointer to the message
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -143,50 +132,49 @@ H5E__term_deprec_interface(void)
char *
H5Eget_major(H5E_major_t maj)
{
- H5E_msg_t *msg; /* Pointer to error message */
- ssize_t size;
- H5E_type_t type;
- char *msg_str = NULL;
- char *ret_value; /* Return value */
+ H5E_msg_t *msg; /* Pointer to error message */
+ ssize_t size;
+ H5E_type_t type;
+ char * msg_str = NULL;
+ char * ret_value; /* Return value */
FUNC_ENTER_API_NOCLEAR(NULL)
H5TRACE1("*s", "i", maj);
/* Get the message object */
- if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
+ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
/* Get the size & type of the message's text */
- if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
- if(type != H5E_MAJOR)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one")
+ if ((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if (type != H5E_MAJOR)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one")
/* Application will free this */
size++;
msg_str = (char *)H5MM_malloc((size_t)size);
/* Get the text for the message */
- if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if (H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
ret_value = msg_str;
done:
- if(!ret_value)
+ if (!ret_value)
msg_str = (char *)H5MM_xfree(msg_str);
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_major() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_minor
+ * Function: H5Eget_minor
*
- * Purpose: Retrieves a minor error message.
+ * Purpose: Retrieves a minor error message.
*
- * Return: Returns message if succeeds.
- * otherwise returns NULL.
+ * Return: Success: Pointer to the message
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -196,57 +184,56 @@ done:
char *
H5Eget_minor(H5E_minor_t min)
{
- H5E_msg_t *msg; /* Pointer to error message */
- ssize_t size;
- H5E_type_t type;
- char *msg_str = NULL;
- char *ret_value; /* Return value */
+ H5E_msg_t *msg; /* Pointer to error message */
+ ssize_t size;
+ H5E_type_t type;
+ char * msg_str = NULL;
+ char * ret_value; /* Return value */
FUNC_ENTER_API_NOCLEAR(NULL)
H5TRACE1("*s", "i", min);
/* Get the message object */
- if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
+ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
/* Get the size & type of the message's text */
- if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
- if(type != H5E_MINOR)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one")
+ if ((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if (type != H5E_MINOR)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one")
/* Application will free this */
size++;
msg_str = (char *)H5MM_malloc((size_t)size);
/* Get the text for the message */
- if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if (H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
ret_value = msg_str;
done:
- if(!ret_value)
+ if (!ret_value)
msg_str = (char *)H5MM_xfree(msg_str);
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_minor() */
-
/*-------------------------------------------------------------------------
- * Function: H5Epush1
+ * Function: H5Epush1
*
- * Purpose: This function definition is for backward compatibility only.
+ * Purpose: This function definition is for backward compatibility only.
* It doesn't have error stack and error class as parameters.
* The old definition of major and minor is casted as HID_T
* in H5Epublic.h
*
- * Notes: Basically a public API wrapper around the H5E_push2
+ * Notes: Basically a public API wrapper around the H5E_push2
* function. For backward compatibility, it maintains the
* same parameter as the old function, in contrary to
* H5Epush2.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Tuesday, Sep 16, 2003
@@ -254,31 +241,29 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Epush1(const char *file, const char *func, unsigned line,
- H5E_major_t maj, H5E_minor_t min, const char *str)
+H5Epush1(const char *file, const char *func, unsigned line, H5E_major_t maj, H5E_minor_t min, const char *str)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE6("e", "*s*sIuii*s", file, func, line, maj, min, str);
/* Push the error on the default error stack */
- if(H5E_push_stack(NULL, file, func, line, H5E_ERR_CLS_g, maj, min, str) < 0)
+ if (H5E_push_stack(NULL, file, func, line, H5E_ERR_CLS_g, maj, min, str) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Epush1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eclear1
+ * Function: H5Eclear1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* Clears the error stack for the specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Wednesday, July 16, 2003
@@ -292,27 +277,26 @@ H5Eclear1(void)
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
- H5TRACE0("e","");
+ H5TRACE0("e", "");
/* Clear the default error stack */
- if(H5E_clear_stack(NULL) < 0)
+ if (H5E_clear_stack(NULL) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eclear1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eprint1
+ * Function: H5Eprint1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* Prints the error stack in some default way. This is just a
- * convenience function for H5Ewalk() with a function that
- * prints error messages. Users are encouraged to write there
- * own more specific error handlers.
+ * convenience function for H5Ewalk() with a function that
+ * prints error messages. Users are encouraged to write there
+ * own more specific error handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -322,33 +306,33 @@ done:
herr_t
H5Eprint1(FILE *stream)
{
- H5E_t *estack; /* Error stack to operate on */
+ H5E_t *estack; /* Error stack to operate on */
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Print error stack */
- if(H5E_print(estack, stream, TRUE) < 0)
+ if (H5E_print(estack, stream, TRUE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eprint1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ewalk1
+ * Function: H5Ewalk1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* Walks the error stack for the current thread and calls some
- * function for each error along the way.
+ * function for each error along the way.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -358,136 +342,128 @@ done:
herr_t
H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_walk_op_t walk_op; /* Error stack walking callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_walk_op_t walk_op; /* Error stack walking callback */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Walk the error stack */
- walk_op.vers = 1;
+ walk_op.vers = 1;
walk_op.u.func1 = func;
- if(H5E_walk(estack, direction, &walk_op, client_data) < 0)
+ if (H5E_walk(estack, direction, &walk_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ewalk1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eget_auto1
+ * Function: H5Eget_auto1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* Returns the current settings for the automatic error stack
- * traversal function and its data for specific error stack.
- * Either (or both) arguments may be null in which case the
- * value is not returned.
+ * traversal function and its data for specific error stack.
+ * Either (or both) arguments may be null in which case the
+ * value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the printing function isn't the default H5Eprint1 or 2,
- * and H5Eset_auto2 has been called to set the new style
- * printing function, a call to H5Eget_auto1 should fail.
*-------------------------------------------------------------------------
*/
herr_t
H5Eget_auto1(H5E_auto1_t *func, void **client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t auto_op; /* Error stack operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_auto_op_t auto_op; /* Error stack operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "*x**x", func, client_data);
/* Retrieve default error stack */
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &auto_op, client_data) < 0)
+ if (H5E_get_auto(estack, &auto_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
/* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto2 */
- if(!auto_op.is_default && auto_op.vers == 2)
+ if (!auto_op.is_default && auto_op.vers == 2)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto2 has been called")
- if(func)
+ if (func)
*func = auto_op.func1;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eget_auto1() */
-
/*-------------------------------------------------------------------------
- * Function: H5Eset_auto1
+ * Function: H5Eset_auto1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* Turns on or off automatic printing of errors for certain
* error stack. When turned on (non-null FUNC pointer) any
* API function which returns an error indication will first
* call FUNC passing it CLIENT_DATA as an argument.
*
- * The default values before this function is called are
- * H5Eprint1() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint1() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
+ * direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the FUNC is H5Eprint2, put the IS_DEFAULT flag on.
*-------------------------------------------------------------------------
*/
herr_t
H5Eset_auto1(H5E_auto1_t func, void *client_data)
{
- H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t auto_op; /* Error stack operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5E_t * estack; /* Error stack to operate on */
+ H5E_auto_op_t auto_op; /* Error stack operator */
+ herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE2("e", "x*x", func, client_data);
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &auto_op, NULL) < 0)
+ if (H5E_get_auto(estack, &auto_op, NULL) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
/* Set the automatic error reporting information */
auto_op.vers = 1;
- if(func != auto_op.func1_default)
+ if (func != auto_op.func1_default)
auto_op.is_default = FALSE;
else
auto_op.is_default = TRUE;
auto_op.func1 = func;
- if(H5E_set_auto(estack, &auto_op, client_data) < 0)
+ if (H5E_set_auto(estack, &auto_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Eset_auto1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Einit.h b/src/H5Einit.h
index 4423ebb..db522d0 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,157 +22,157 @@
/* Major error codes */
/*********************/
-assert(H5E_DATASET_g==(-1));
+HDassert(H5E_DATASET_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FUNC_g==(-1));
+HDassert(H5E_FUNC_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_STORAGE_g==(-1));
+HDassert(H5E_STORAGE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FILE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL)
+HDassert(H5E_FILE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibility"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SOHM_g==(-1));
+HDassert(H5E_SOHM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SYM_g==(-1));
+HDassert(H5E_SYM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLUGIN_g==(-1));
+HDassert(H5E_PLUGIN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_VFL_g==(-1));
+HDassert(H5E_VFL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_INTERNAL_g==(-1));
+HDassert(H5E_INTERNAL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BTREE_g==(-1));
+HDassert(H5E_BTREE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_REFERENCE_g==(-1));
+HDassert(H5E_REFERENCE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DATASPACE_g==(-1));
+HDassert(H5E_DATASPACE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_RESOURCE_g==(-1));
+HDassert(H5E_RESOURCE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLIST_g==(-1));
+HDassert(H5E_PLIST_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_LINK_g==(-1));
+HDassert(H5E_LINK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DATATYPE_g==(-1));
+HDassert(H5E_DATATYPE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_RS_g==(-1));
+HDassert(H5E_RS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_HEAP_g==(-1));
+HDassert(H5E_HEAP_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OHDR_g==(-1));
+HDassert(H5E_OHDR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ATOM_g==(-1));
+HDassert(H5E_ATOM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ATTR_g==(-1));
+HDassert(H5E_ATTR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NONE_MAJOR_g==(-1));
+HDassert(H5E_NONE_MAJOR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_IO_g==(-1));
+HDassert(H5E_IO_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SLIST_g==(-1));
+HDassert(H5E_SLIST_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_EFL_g==(-1));
+HDassert(H5E_EFL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_TST_g==(-1));
+HDassert(H5E_TST_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ARGS_g==(-1));
+HDassert(H5E_ARGS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ERROR_g==(-1));
+HDassert(H5E_ERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLINE_g==(-1));
+HDassert(H5E_PLINE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FSPACE_g==(-1));
+HDassert(H5E_FSPACE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CACHE_g==(-1));
+HDassert(H5E_CACHE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
@@ -184,622 +184,622 @@ if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
/* Generic low-level file I/O errors */
-assert(H5E_SEEKERROR_g==(-1));
+HDassert(H5E_SEEKERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_READERROR_g==(-1));
+HDassert(H5E_READERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_WRITEERROR_g==(-1));
+HDassert(H5E_WRITEERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CLOSEERROR_g==(-1));
+HDassert(H5E_CLOSEERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OVERFLOW_g==(-1));
+HDassert(H5E_OVERFLOW_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FCNTL_g==(-1));
+HDassert(H5E_FCNTL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Resource errors */
-assert(H5E_NOSPACE_g==(-1));
+HDassert(H5E_NOSPACE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTALLOC_g==(-1));
+HDassert(H5E_CANTALLOC_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOPY_g==(-1));
+HDassert(H5E_CANTCOPY_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTFREE_g==(-1));
+HDassert(H5E_CANTFREE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ALREADYEXISTS_g==(-1));
+HDassert(H5E_ALREADYEXISTS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTLOCK_g==(-1));
+HDassert(H5E_CANTLOCK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUNLOCK_g==(-1));
+HDassert(H5E_CANTUNLOCK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTGC_g==(-1));
+HDassert(H5E_CANTGC_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTGETSIZE_g==(-1));
+HDassert(H5E_CANTGETSIZE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OBJOPEN_g==(-1));
+HDassert(H5E_OBJOPEN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Heap errors */
-assert(H5E_CANTRESTORE_g==(-1));
+HDassert(H5E_CANTRESTORE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOMPUTE_g==(-1));
+HDassert(H5E_CANTCOMPUTE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTEXTEND_g==(-1));
+HDassert(H5E_CANTEXTEND_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTATTACH_g==(-1));
+HDassert(H5E_CANTATTACH_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUPDATE_g==(-1));
+HDassert(H5E_CANTUPDATE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTOPERATE_g==(-1));
+HDassert(H5E_CANTOPERATE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Function entry/exit interface errors */
-assert(H5E_CANTINIT_g==(-1));
+HDassert(H5E_CANTINIT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ALREADYINIT_g==(-1));
+HDassert(H5E_ALREADYINIT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRELEASE_g==(-1));
+HDassert(H5E_CANTRELEASE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Property list errors */
-assert(H5E_CANTGET_g==(-1));
+HDassert(H5E_CANTGET_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSET_g==(-1));
+HDassert(H5E_CANTSET_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DUPCLASS_g==(-1));
+HDassert(H5E_DUPCLASS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SETDISALLOWED_g==(-1));
+HDassert(H5E_SETDISALLOWED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Free space errors */
-assert(H5E_CANTMERGE_g==(-1));
+HDassert(H5E_CANTMERGE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREVIVE_g==(-1));
+HDassert(H5E_CANTREVIVE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSHRINK_g==(-1));
+HDassert(H5E_CANTSHRINK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Object header related errors */
-assert(H5E_LINKCOUNT_g==(-1));
+HDassert(H5E_LINKCOUNT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_VERSION_g==(-1));
+HDassert(H5E_VERSION_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ALIGNMENT_g==(-1));
+HDassert(H5E_ALIGNMENT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADMESG_g==(-1));
+HDassert(H5E_BADMESG_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDELETE_g==(-1));
+HDassert(H5E_CANTDELETE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADITER_g==(-1));
+HDassert(H5E_BADITER_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTPACK_g==(-1));
+HDassert(H5E_CANTPACK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRESET_g==(-1));
+HDassert(H5E_CANTRESET_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRENAME_g==(-1));
+HDassert(H5E_CANTRENAME_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* System level errors */
-assert(H5E_SYSERRSTR_g==(-1));
+HDassert(H5E_SYSERRSTR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* I/O pipeline errors */
-assert(H5E_NOFILTER_g==(-1));
+HDassert(H5E_NOFILTER_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CALLBACK_g==(-1));
+HDassert(H5E_CALLBACK_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANAPPLY_g==(-1));
+HDassert(H5E_CANAPPLY_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SETLOCAL_g==(-1));
+HDassert(H5E_SETLOCAL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOENCODER_g==(-1));
+HDassert(H5E_NOENCODER_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTFILTER_g==(-1));
+HDassert(H5E_CANTFILTER_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Group related errors */
-assert(H5E_CANTOPENOBJ_g==(-1));
+HDassert(H5E_CANTOPENOBJ_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCLOSEOBJ_g==(-1));
+HDassert(H5E_CANTCLOSEOBJ_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_COMPLEN_g==(-1));
+HDassert(H5E_COMPLEN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PATH_g==(-1));
+HDassert(H5E_PATH_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* No error */
-assert(H5E_NONE_MINOR_g==(-1));
+HDassert(H5E_NONE_MINOR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Plugin errors */
-assert(H5E_OPENERROR_g==(-1));
+HDassert(H5E_OPENERROR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* File accessibilty errors */
-assert(H5E_FILEEXISTS_g==(-1));
+/* File accessibility errors */
+HDassert(H5E_FILEEXISTS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FILEOPEN_g==(-1));
+HDassert(H5E_FILEOPEN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCREATE_g==(-1));
+HDassert(H5E_CANTCREATE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTOPENFILE_g==(-1));
+HDassert(H5E_CANTOPENFILE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCLOSEFILE_g==(-1));
+HDassert(H5E_CANTCLOSEFILE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOTHDF5_g==(-1));
+HDassert(H5E_NOTHDF5_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADFILE_g==(-1));
+HDassert(H5E_BADFILE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_TRUNCATED_g==(-1));
+HDassert(H5E_TRUNCATED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_MOUNT_g==(-1));
+HDassert(H5E_MOUNT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Object atom related errors */
-assert(H5E_BADATOM_g==(-1));
+HDassert(H5E_BADATOM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADGROUP_g==(-1));
+HDassert(H5E_BADGROUP_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREGISTER_g==(-1));
+HDassert(H5E_CANTREGISTER_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTINC_g==(-1));
+HDassert(H5E_CANTINC_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDEC_g==(-1));
+HDassert(H5E_CANTDEC_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOIDS_g==(-1));
+HDassert(H5E_NOIDS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Cache related errors */
-assert(H5E_CANTFLUSH_g==(-1));
+HDassert(H5E_CANTFLUSH_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSERIALIZE_g==(-1));
+HDassert(H5E_CANTSERIALIZE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTLOAD_g==(-1));
+HDassert(H5E_CANTLOAD_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PROTECT_g==(-1));
+HDassert(H5E_PROTECT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOTCACHED_g==(-1));
+HDassert(H5E_NOTCACHED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SYSTEM_g==(-1));
+HDassert(H5E_SYSTEM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTINS_g==(-1));
+HDassert(H5E_CANTINS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTPROTECT_g==(-1));
+HDassert(H5E_CANTPROTECT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUNPROTECT_g==(-1));
+HDassert(H5E_CANTUNPROTECT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTPIN_g==(-1));
+HDassert(H5E_CANTPIN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUNPIN_g==(-1));
+HDassert(H5E_CANTUNPIN_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTMARKDIRTY_g==(-1));
+HDassert(H5E_CANTMARKDIRTY_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDIRTY_g==(-1));
+HDassert(H5E_CANTDIRTY_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTEXPUNGE_g==(-1));
+HDassert(H5E_CANTEXPUNGE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRESIZE_g==(-1));
+HDassert(H5E_CANTRESIZE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Link related errors */
-assert(H5E_TRAVERSE_g==(-1));
+HDassert(H5E_TRAVERSE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NLINKS_g==(-1));
+HDassert(H5E_NLINKS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOTREGISTERED_g==(-1));
+HDassert(H5E_NOTREGISTERED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTMOVE_g==(-1));
+HDassert(H5E_CANTMOVE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSORT_g==(-1));
+HDassert(H5E_CANTSORT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Parallel MPI errors */
-assert(H5E_MPI_g==(-1));
+HDassert(H5E_MPI_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_MPIERRSTR_g==(-1));
+HDassert(H5E_MPIERRSTR_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRECV_g==(-1));
+HDassert(H5E_CANTRECV_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Dataspace errors */
-assert(H5E_CANTCLIP_g==(-1));
+HDassert(H5E_CANTCLIP_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOUNT_g==(-1));
+HDassert(H5E_CANTCOUNT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSELECT_g==(-1));
+HDassert(H5E_CANTSELECT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTNEXT_g==(-1));
+HDassert(H5E_CANTNEXT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADSELECT_g==(-1));
+HDassert(H5E_BADSELECT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOMPARE_g==(-1));
+HDassert(H5E_CANTCOMPARE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Argument errors */
-assert(H5E_UNINITIALIZED_g==(-1));
+HDassert(H5E_UNINITIALIZED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_UNSUPPORTED_g==(-1));
+HDassert(H5E_UNSUPPORTED_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADTYPE_g==(-1));
+HDassert(H5E_BADTYPE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADRANGE_g==(-1));
+HDassert(H5E_BADRANGE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADVALUE_g==(-1));
+HDassert(H5E_BADVALUE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* B-tree related errors */
-assert(H5E_NOTFOUND_g==(-1));
+HDassert(H5E_NOTFOUND_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_EXISTS_g==(-1));
+HDassert(H5E_EXISTS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTENCODE_g==(-1));
+HDassert(H5E_CANTENCODE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDECODE_g==(-1));
+HDassert(H5E_CANTDECODE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSPLIT_g==(-1));
+HDassert(H5E_CANTSPLIT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREDISTRIBUTE_g==(-1));
+HDassert(H5E_CANTREDISTRIBUTE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSWAP_g==(-1));
+HDassert(H5E_CANTSWAP_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTINSERT_g==(-1));
+HDassert(H5E_CANTINSERT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTLIST_g==(-1));
+HDassert(H5E_CANTLIST_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTMODIFY_g==(-1));
+HDassert(H5E_CANTMODIFY_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREMOVE_g==(-1));
+HDassert(H5E_CANTREMOVE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Datatype conversion errors */
-assert(H5E_CANTCONVERT_g==(-1));
+HDassert(H5E_CANTCONVERT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADSIZE_g==(-1));
+HDassert(H5E_BADSIZE_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
diff --git a/src/H5Eint.c b/src/H5Eint.c
index 636866b..ea6b767 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Eint.c
* April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: General use, "internal" routines for error handling.
*
@@ -26,53 +26,46 @@
/* Module Setup */
/****************/
-#define H5E_PACKAGE /*suppress error about including H5Epkg */
+#define H5E_PACKAGE /*suppress error about including H5Epkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5E_init_int_interface
-
+#define H5_INTERFACE_INIT_FUNC H5E_init_int_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Epkg.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Epkg.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5TSprivate.h" /* Thread stuff */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Printing information */
typedef struct H5E_print_t {
- FILE *stream;
- H5E_cls_t cls;
+ FILE * stream;
+ H5E_cls_t cls;
} H5E_print_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
#ifndef H5_NO_DEPRECATED_SYMBOLS
-static herr_t H5E_walk1_cb(int n, H5E_error1_t *err_desc,
- void *client_data);
+static herr_t H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-static herr_t H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc,
- void *client_data);
-static herr_t H5E_clear_entries(H5E_t *estack, size_t nentries);
-
+static herr_t H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data);
+static herr_t H5E_clear_entries(H5E_t *estack, size_t nentries);
/*********************/
/* Package Variables */
@@ -85,7 +78,6 @@ static herr_t H5E_clear_entries(H5E_t *estack, size_t nentries);
H5E_t H5E_stack_g[1];
#endif /* H5_HAVE_THREADSAFE */
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -100,7 +92,6 @@ hid_t H5E_ERR_CLS_g = FAIL;
/* Include the automatically generated error code definitions */
#include "H5Edefin.h"
-
/*******************/
/* Local Variables */
/*******************/
@@ -109,12 +100,10 @@ hid_t H5E_ERR_CLS_g = FAIL;
/*
* variables used for MPI error reporting
*/
-char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
-int H5E_mpi_error_str_len;
+char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
+int H5E_mpi_error_str_len;
#endif /* H5_HAVE_PARALLEL */
-
-
/*--------------------------------------------------------------------------
NAME
H5E_init_int_interface -- Initialize interface-specific information
@@ -135,14 +124,13 @@ H5E_init_int_interface(void)
FUNC_LEAVE_NOAPI(H5E_init())
} /* H5E_init_int_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_get_msg
+ * Function: H5E_get_msg
*
- * Purpose: Private function to retrieve an error message.
+ * Purpose: Private function to retrieve an error message.
*
- * Return: Non-negative for name length if succeeds(zero means no name);
- * otherwise returns negative value.
+ * Return: Success: Message length (zero means no message)
+ * Failure: -1
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -152,7 +140,7 @@ H5E_init_int_interface(void)
ssize_t
H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
{
- ssize_t len; /* Length of error message */
+ ssize_t len = -1; /* Length of error message */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -163,14 +151,14 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
len = (ssize_t)HDstrlen(msg->msg);
/* Copy the message into the user's buffer, if given */
- if(msg_str) {
- HDstrncpy(msg_str, msg->msg, MIN((size_t)(len+1), size));
- if((size_t)len >= size)
- msg_str[size - 1] = '\0';
+ if (msg_str) {
+ HDstrncpy(msg_str, msg->msg, MIN((size_t)(len + 1), size));
+ if ((size_t)len >= size)
+ msg_str[size - 1] = '\0';
} /* end if */
/* Give the message type, if asked */
- if(type)
+ if (type)
*type = msg->type;
/* Set the return value to the full length of the message */
@@ -178,34 +166,34 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
} /* end H5E_get_msg() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk1_cb
+ * Function: H5E_walk1_cb
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * This function is for backward compatibility with v1.6.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk() function. This function is called
- * also by H5Eprint(). Application writers are encouraged to
- * use this function as a model for their own error stack
- * walking functions.
+ * that prints error messages to the specified output stream.
+ * This function is for backward compatibility with v1.6.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk() function. This function is called
+ * also by H5Eprint(). Application writers are encouraged to
+ * use this function as a model for their own error stack
+ * walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Thursday, May 11, 2006
@@ -215,15 +203,15 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
static herr_t
H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
{
- H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
- H5E_cls_t *cls_ptr; /* Pointer to error class */
- H5E_msg_t *maj_ptr; /* Pointer to major error info */
- H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
- unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
- herr_t ret_value = SUCCEED;
+ H5E_print_t *eprint = (H5E_print_t *)client_data;
+ FILE * stream; /* I/O stream to print output to */
+ H5E_cls_t * cls_ptr; /* Pointer to error class */
+ H5E_msg_t * maj_ptr; /* Pointer to major error info */
+ H5E_msg_t * min_ptr; /* Pointer to minor error info */
+ const char * maj_str = "No major description"; /* Major error description */
+ const char * min_str = "No minor description"; /* Minor error description */
+ unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -231,7 +219,7 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
HDassert(err_desc);
/* If no client data was passed, output to stderr */
- if(!client_data)
+ if (!client_data)
stream = stderr;
else
stream = eprint->stream;
@@ -241,98 +229,94 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
min_ptr = (H5E_msg_t *)H5I_object_verify(err_desc->min_num, H5I_ERROR_MSG);
/* Check for bad pointer(s), but can't issue error, just leave */
- if(!maj_ptr || !min_ptr)
+ if (!maj_ptr || !min_ptr)
HGOTO_DONE(FAIL)
- if(maj_ptr->msg)
+ if (maj_ptr->msg)
maj_str = maj_ptr->msg;
- if(min_ptr->msg)
+ if (min_ptr->msg)
min_str = min_ptr->msg;
/* Get error class info */
cls_ptr = maj_ptr->cls;
/* Print error class header if new class */
- if(eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name)) {
+ if (eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name)) {
/* update to the new class information */
- if(cls_ptr->cls_name)
+ if (cls_ptr->cls_name)
eprint->cls.cls_name = cls_ptr->cls_name;
- if(cls_ptr->lib_name)
+ if (cls_ptr->lib_name)
eprint->cls.lib_name = cls_ptr->lib_name;
- if(cls_ptr->lib_vers)
+ if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
- if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ if (mpi_initialized && !mpi_finalized) {
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
-#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
- if(err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
- have_desc=0;
+ if (err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
+ have_desc = 0;
/* Print error message */
- fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
+ (have_desc ? err_desc->desc : ""));
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk1_cb() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
/*-------------------------------------------------------------------------
- * Function: H5E_walk2_cb
+ * Function: H5E_walk2_cb
*
- * Purpose: This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk2() function. This function is
- * called also by H5Eprint2(). Application writers are
- * encouraged to use this function as a model for their own
- * error stack walking functions.
+ * Purpose: This is a default error stack traversal callback function
+ * that prints error messages to the specified output stream.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk2() function. This function is
+ * called also by H5Eprint2(). Application writers are
+ * encouraged to use this function as a model for their own
+ * error stack walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, December 12, 1997
@@ -342,15 +326,15 @@ done:
static herr_t
H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
{
- H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
- H5E_cls_t *cls_ptr; /* Pointer to error class */
- H5E_msg_t *maj_ptr; /* Pointer to major error info */
- H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
- unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
- herr_t ret_value = SUCCEED;
+ H5E_print_t *eprint = (H5E_print_t *)client_data;
+ FILE * stream; /* I/O stream to print output to */
+ H5E_cls_t * cls_ptr; /* Pointer to error class */
+ H5E_msg_t * maj_ptr; /* Pointer to major error info */
+ H5E_msg_t * min_ptr; /* Pointer to minor error info */
+ const char * maj_str = "No major description"; /* Major error description */
+ const char * min_str = "No minor description"; /* Minor error description */
+ unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -358,7 +342,7 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
HDassert(err_desc);
/* If no client data was passed, output to stderr */
- if(!client_data)
+ if (!client_data)
stream = stderr;
else
stream = eprint->stream;
@@ -368,12 +352,12 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
min_ptr = (H5E_msg_t *)H5I_object_verify(err_desc->min_num, H5I_ERROR_MSG);
/* Check for bad pointer(s), but can't issue error, just leave */
- if(!maj_ptr || !min_ptr)
+ if (!maj_ptr || !min_ptr)
HGOTO_DONE(FAIL)
- if(maj_ptr->msg)
+ if (maj_ptr->msg)
maj_str = maj_ptr->msg;
- if(min_ptr->msg)
+ if (min_ptr->msg)
min_str = min_ptr->msg;
/* Get error class info. Don't use the class of the major or minor error because
@@ -381,74 +365,70 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
cls_ptr = (H5E_cls_t *)H5I_object_verify(err_desc->cls_id, H5I_ERROR_CLASS);
/* Check for bad pointer(s), but can't issue error, just leave */
- if(!cls_ptr)
+ if (!cls_ptr)
HGOTO_DONE(FAIL)
/* Print error class header if new class */
- if(eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name)) {
+ if (eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name)) {
/* update to the new class information */
- if(cls_ptr->cls_name)
+ if (cls_ptr->cls_name)
eprint->cls.cls_name = cls_ptr->cls_name;
- if(cls_ptr->lib_name)
+ if (cls_ptr->lib_name)
eprint->cls.lib_name = cls_ptr->lib_name;
- if(cls_ptr->lib_vers)
+ if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
- if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ if (mpi_initialized && !mpi_finalized) {
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
-#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
- if(err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
+ if (err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
have_desc = 0;
/* Print error message */
- fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
+ (have_desc ? err_desc->desc : ""));
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk2_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_print
+ * Function: H5E_print
*
- * Purpose: Private function to print the error stack in some default
+ * Purpose: Private function to print the error stack in some default
* way. This is just a convenience function for H5Ewalk() and
* H5Ewalk2() with a function that prints error messages.
- * Users are encouraged to write there own more specific error
+ * Users are encouraged to write their own more specific error
* handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, February 27, 1998
@@ -458,9 +438,9 @@ done:
herr_t
H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
{
- H5E_print_t eprint; /* Callback information to pass to H5E_walk() */
- H5E_walk_op_t walk_op; /* Error stack walking callback */
- herr_t ret_value = SUCCEED;
+ H5E_print_t eprint; /* Callback information to pass to H5E_walk() */
+ H5E_walk_op_t walk_op; /* Error stack walking callback */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -468,7 +448,7 @@ H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
HDassert(estack);
/* If no stream was given, use stderr */
- if(!stream)
+ if (!stream)
eprint.stream = stderr;
else
eprint.stream = stream;
@@ -477,20 +457,20 @@ H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
HDmemset(&eprint.cls, 0, sizeof(H5E_cls_t));
/* Walk the error stack */
- if(bk_compatible) {
+ if (bk_compatible) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- walk_op.vers = 1;
+ walk_op.vers = 1;
walk_op.u.func1 = H5E_walk1_cb;
- if(H5E_walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void*)&eprint) < 0)
+ if (H5E_walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
HDassert(0 && "version 1 error stack print without deprecated symbols!");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- } /* end if */
+ } /* end if */
else {
- walk_op.vers = 2;
+ walk_op.vers = 2;
walk_op.u.func2 = H5E_walk2_cb;
- if(H5E_walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void*)&eprint) < 0)
+ if (H5E_walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
} /* end else */
@@ -498,31 +478,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_print() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_walk
+ * Function: H5E_walk
*
- * Purpose: Private function for H5Ewalk.
+ * Purpose: Private function for H5Ewalk.
* Walks the error stack, calling the specified function for
- * each error on the stack. The DIRECTION argument determines
- * whether the stack is walked from the inside out or the
- * outside in. The value H5E_WALK_UPWARD means begin with the
- * most specific error and end at the API; H5E_WALK_DOWNWARD
- * means to start at the API and end at the inner-most function
- * where the error was first detected.
- *
- * The function pointed to by STACK_FUNC will be called for
- * each error record in the error stack. It's arguments will
- * include an index number (beginning at zero regardless of
- * stack traversal direction), an error stack entry, and the
- * CLIENT_DATA pointer passed to H5E_print.
- *
- * The function FUNC is also provided for backward compatibility.
- * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
- * compatible with older library. If BK_COMPATIBLE is FALSE,
- * STACK_FUNC is used.
- *
- * Return: Non-negative on success/Negative on failure
+ * each error on the stack. The DIRECTION argument determines
+ * whether the stack is walked from the inside out or the
+ * outside in. The value H5E_WALK_UPWARD means begin with the
+ * most specific error and end at the API; H5E_WALK_DOWNWARD
+ * means to start at the API and end at the inner-most function
+ * where the error was first detected.
+ *
+ * The function pointed to by STACK_FUNC will be called for
+ * each error record in the error stack. It's arguments will
+ * include an index number (beginning at zero regardless of
+ * stack traversal direction), an error stack entry, and the
+ * CLIENT_DATA pointer passed to H5E_print.
+ *
+ * The function FUNC is also provided for backward compatibility.
+ * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
+ * compatible with older library. If BK_COMPATIBLE is FALSE,
+ * STACK_FUNC is used.
+ *
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, December 12, 1997
@@ -530,12 +509,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op,
- void *client_data)
+H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op, void *client_data)
{
- int i; /* Local index variable */
- herr_t status; /* Status from callback function */
- herr_t ret_value = SUCCEED; /* Return value */
+ int i; /* Local index variable */
+ herr_t status; /* Status from callback function */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -544,84 +522,84 @@ H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op
HDassert(op);
/* check args, but rather than failing use some default value */
- if(direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
- direction = H5E_WALK_UPWARD;
+ if (direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
+ direction = H5E_WALK_UPWARD;
/* Walk the stack if a callback function was given */
- if(op->vers == 1) {
+ if (op->vers == 1) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- if(op->u.func1) {
+ if (op->u.func1) {
H5E_error1_t old_err;
status = SUCCEED;
- if(H5E_WALK_UPWARD == direction) {
- for(i = 0; i < (int)estack->nused && status >= 0; i++) {
+ if (H5E_WALK_UPWARD == direction) {
+ for (i = 0; i < (int)estack->nused && status >= 0; i++) {
/* Point to each error record on the stack and pass it to callback function.*/
- old_err.maj_num = estack->slot[i].maj_num;
- old_err.min_num = estack->slot[i].min_num;
+ old_err.maj_num = estack->slot[i].maj_num;
+ old_err.min_num = estack->slot[i].min_num;
old_err.func_name = estack->slot[i].func_name;
old_err.file_name = estack->slot[i].file_name;
- old_err.desc = estack->slot[i].desc;
- old_err.line = estack->slot[i].line;
+ old_err.desc = estack->slot[i].desc;
+ old_err.line = estack->slot[i].line;
status = (op->u.func1)(i, &old_err, client_data);
} /* end for */
- } /* end if */
+ } /* end if */
else {
H5_CHECK_OVERFLOW(estack->nused - 1, size_t, int);
- for(i = (int)(estack->nused - 1); i >= 0 && status >= 0; i--) {
+ for (i = (int)(estack->nused - 1); i >= 0 && status >= 0; i--) {
/* Point to each error record on the stack and pass it to callback function.*/
- old_err.maj_num = estack->slot[i].maj_num;
- old_err.min_num = estack->slot[i].min_num;
+ old_err.maj_num = estack->slot[i].maj_num;
+ old_err.min_num = estack->slot[i].min_num;
old_err.func_name = estack->slot[i].func_name;
old_err.file_name = estack->slot[i].file_name;
- old_err.desc = estack->slot[i].desc;
- old_err.line = estack->slot[i].line;
+ old_err.desc = estack->slot[i].desc;
+ old_err.line = estack->slot[i].line;
status = (op->u.func1)((int)(estack->nused - (size_t)(i + 1)), &old_err, client_data);
} /* end for */
- } /* end else */
+ } /* end else */
- if(status < 0)
+ if (status < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
} /* end if */
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
HDassert(0 && "version 1 error stack walk without deprecated symbols!");
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- } /* end if */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ } /* end if */
else {
HDassert(op->vers == 2);
- if(op->u.func2) {
+ if (op->u.func2) {
status = SUCCEED;
- if(H5E_WALK_UPWARD == direction) {
- for(i = 0; i < (int)estack->nused && status >= 0; i++)
+ if (H5E_WALK_UPWARD == direction) {
+ for (i = 0; i < (int)estack->nused && status >= 0; i++)
status = (op->u.func2)((unsigned)i, estack->slot + i, client_data);
} /* end if */
else {
H5_CHECK_OVERFLOW(estack->nused - 1, size_t, int);
- for(i = (int)(estack->nused - 1); i >= 0 && status >= 0; i--)
- status = (op->u.func2)((unsigned)(estack->nused - (size_t)(i + 1)), estack->slot + i, client_data);
+ for (i = (int)(estack->nused - 1); i >= 0 && status >= 0; i--)
+ status = (op->u.func2)((unsigned)(estack->nused - (size_t)(i + 1)), estack->slot + i,
+ client_data);
} /* end else */
- if(status < 0)
+ if (status < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_get_auto
+ * Function: H5E_get_auto
*
- * Purpose: Private function to return the current settings for the
+ * Purpose: Private function to return the current settings for the
* automatic error stack traversal function and its data
* for specific error stack. Either (or both) arguments may
* be null in which case the value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* July 18, 2003
@@ -636,32 +614,31 @@ H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
HDassert(estack);
/* Retrieve the requested information */
- if(op)
+ if (op)
*op = estack->auto_op;
- if(client_data)
+ if (client_data)
*client_data = estack->auto_data;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_get_auto2() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_set_auto
+ * Function: H5E_set_auto
*
- * Purpose: Private function to turn on or off automatic printing of
+ * Purpose: Private function to turn on or off automatic printing of
* errors for certain error stack. When turned on (non-null
* FUNC pointer) any API function which returns an error
* indication will first call FUNC passing it CLIENT_DATA
* as an argument.
*
- * The default values before this function is called are
- * H5Eprint2() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint2() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
+ * direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, February 27, 1998
@@ -676,19 +653,18 @@ H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
HDassert(estack);
/* Set the automatic error reporting info */
- estack->auto_op = *op;
+ estack->auto_op = *op;
estack->auto_data = client_data;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_set_auto() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_printf_stack
+ * Function: H5E_printf_stack
*
- * Purpose: Printf-like wrapper around H5E_push_stack.
+ * Purpose: Printf-like wrapper around H5E__push_stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Tuesday, August 12, 2008
@@ -696,17 +672,17 @@ H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
- hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)
+H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id,
+ hid_t min_id, const char *fmt, ...)
{
- va_list ap; /* Varargs info */
+ va_list ap; /* Varargs info */
#ifndef H5_HAVE_VASPRINTF
- int tmp_len; /* Current size of description buffer */
- int desc_len; /* Actual length of description when formatted */
-#endif /* H5_HAVE_VASPRINTF */
- char *tmp = NULL; /* Buffer to place formatted description in */
- hbool_t va_started = FALSE; /* Whether the variable argument list is open */
- herr_t ret_value = SUCCEED; /* Return value */
+ int tmp_len; /* Current size of description buffer */
+ int desc_len; /* Actual length of description when formatted */
+#endif /* H5_HAVE_VASPRINTF */
+ char * tmp = NULL; /* Buffer to place formatted description in */
+ hbool_t va_started = FALSE; /* Whether the variable argument list is open */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
@@ -723,69 +699,76 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
HDassert(min_id > 0);
HDassert(fmt);
-/* Note that the variable-argument parsing for the format is identical in
- * the H5Epush2() routine - correct errors and make changes in both
- * places. -QAK
- */
+ /* Note that the variable-argument parsing for the format is identical in
+ * the H5Epush2() routine - correct errors and make changes in both
+ * places. -QAK
+ */
/* Start the variable-argument parsing */
- va_start(ap, fmt);
+ HDva_start(ap, fmt);
va_started = TRUE;
#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
- if(HDvasprintf(&tmp, fmt, ap) < 0)
+ if (HDvasprintf(&tmp, fmt, ap) < 0)
HGOTO_DONE(FAIL)
-#else /* H5_HAVE_VASPRINTF */
+#else /* H5_HAVE_VASPRINTF */
/* Allocate space for the formatted description buffer */
tmp_len = 128;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
+ if (NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
HGOTO_DONE(FAIL)
/* If the description doesn't fit into the initial buffer size, allocate more space and try again */
- while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
+ while ((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
/* shutdown & restart the va_list */
- va_end(ap);
- va_start(ap, fmt);
+ HDva_end(ap);
+ HDva_start(ap, fmt);
/* Release the previous description, it's too small */
H5MM_xfree(tmp);
/* Allocate a description of the appropriate length */
tmp_len = desc_len + 1;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
+ if (NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
HGOTO_DONE(FAIL)
} /* end while */
#endif /* H5_HAVE_VASPRINTF */
/* Push the error on the stack */
- if(H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
+ if (H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
HGOTO_DONE(FAIL)
done:
- if(va_started)
- va_end(ap);
- if(tmp)
+ if (va_started)
+ HDva_end(ap);
+#ifdef H5_HAVE_VASPRINTF
+ /* Memory was allocated with HDvasprintf so it needs to be freed
+ * with HDfree
+ */
+ if (tmp)
+ HDfree(tmp);
+#else /* H5_HAVE_VASPRINTF */
+ if (tmp)
H5MM_xfree(tmp);
+#endif /* H5_HAVE_VASPRINTF */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_push_stack
+ * Function: H5E_push_stack
*
- * Purpose: Pushes a new error record onto error stack for the current
- * thread. The error has major and minor IDs MAJ_ID and
- * MIN_ID, the name of a function where the error was detected,
- * the name of the file where the error was detected, the
- * line within that file, and an error description string. The
- * function name, file name, and error description strings must
- * be statically allocated (the FUNC_ENTER() macro takes care of
- * the function name and file name automatically, but the
- * programmer is responsible for the description string).
+ * Purpose: Pushes a new error record onto error stack for the current
+ * thread. The error has major and minor IDs MAJ_ID and
+ * MIN_ID, the name of a function where the error was detected,
+ * the name of the file where the error was detected, the
+ * line within that file, and an error description string. The
+ * function name, file name, and error description strings must
+ * be statically allocated (the FUNC_ENTER() macro takes care of
+ * the function name and file name automatically, but the
+ * programmer is responsible for the description string).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, December 12, 1997
@@ -793,10 +776,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
- hid_t cls_id, hid_t maj_id, hid_t min_id, const char *desc)
+H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id,
+ hid_t min_id, const char *desc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
@@ -813,19 +796,20 @@ H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
HDassert(min_id > 0);
/* Check for 'default' error stack */
- if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (estack == NULL)
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_DONE(FAIL)
/*
* Don't fail if arguments are bad. Instead, substitute some default
* value.
*/
- if(!func)
+ if (!func)
func = "Unknown_Function";
- if(!file)
+ if (!file)
file = "Unknown_File";
- if(!desc)
+ if (!desc)
desc = "No description given";
/*
@@ -833,39 +817,38 @@ H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
*/
HDassert(estack);
- if(estack->nused < H5E_NSLOTS) {
+ if (estack->nused < H5E_NSLOTS) {
/* Increment the IDs to indicate that they are used in this stack */
- if(H5I_inc_ref(cls_id, FALSE) < 0)
+ if (H5I_inc_ref(cls_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].cls_id = cls_id;
- if(H5I_inc_ref(maj_id, FALSE) < 0)
+ estack->slot[estack->nused].cls_id = cls_id;
+ if (H5I_inc_ref(maj_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].maj_num = maj_id;
- if(H5I_inc_ref(min_id, FALSE) < 0)
+ estack->slot[estack->nused].maj_num = maj_id;
+ if (H5I_inc_ref(min_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].min_num = min_id;
- if(NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
+ estack->slot[estack->nused].min_num = min_id;
+ if (NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
HGOTO_DONE(FAIL)
- if(NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
+ if (NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].line = line;
- if(NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
+ estack->slot[estack->nused].line = line;
+ if (NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
HGOTO_DONE(FAIL)
- estack->nused++;
+ estack->nused++;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_push_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_clear_entries
+ * Function: H5E_clear_entries
*
- * Purpose: Private function to clear the error stack entries for the
+ * Purpose: Private function to clear the error stack entries for the
* specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Wednesday, August 6, 2003
@@ -875,9 +858,9 @@ done:
static herr_t
H5E_clear_entries(H5E_t *estack, size_t nentries)
{
- H5E_error2_t *error; /* Pointer to error stack entry to clear */
- unsigned u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5E_error2_t *error; /* Pointer to error stack entry to clear */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -886,26 +869,26 @@ H5E_clear_entries(H5E_t *estack, size_t nentries)
HDassert(estack->nused >= nentries);
/* Empty the error stack from the top down */
- for(u = 0; nentries > 0; nentries--, u++) {
+ for (u = 0; nentries > 0; nentries--, u++) {
error = &(estack->slot[estack->nused - (u + 1)]);
/* Decrement the IDs to indicate that they are no longer used by this stack */
/* (In reverse order that they were incremented, so that reference counts work well) */
- if(H5I_dec_ref(error->min_num) < 0)
+ if (H5I_dec_ref(error->min_num) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message")
- if(H5I_dec_ref(error->maj_num) < 0)
+ if (H5I_dec_ref(error->maj_num) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message")
- if(H5I_dec_ref(error->cls_id) < 0)
+ if (H5I_dec_ref(error->cls_id) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class")
/* Release strings */
- if(error->func_name)
- H5MM_xfree((void *)error->func_name); /* Casting away const OK - QAK */
- if(error->file_name)
- H5MM_xfree((void *)error->file_name); /* Casting away const OK - QAK */
- if(error->desc)
- H5MM_xfree((void *)error->desc); /* Casting away const OK - QAK */
- } /* end for */
+ if (error->func_name)
+ H5MM_xfree((void *)error->func_name); /* Casting away const OK - QAK */
+ if (error->file_name)
+ H5MM_xfree((void *)error->file_name); /* Casting away const OK - QAK */
+ if (error->desc)
+ H5MM_xfree((void *)error->desc); /* Casting away const OK - QAK */
+ } /* end for */
/* Decrement number of errors on stack */
estack->nused -= u;
@@ -914,14 +897,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_entries() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_clear_stack
+ * Function: H5E_clear_stack
*
- * Purpose: Private function to clear the error stack for the
+ * Purpose: Private function to clear the error stack for the
* specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Wednesday, July 16, 2003
@@ -931,33 +913,33 @@ done:
herr_t
H5E_clear_stack(H5E_t *estack)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check for 'default' error stack */
- if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if (estack == NULL)
+ if (NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in
+ non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty the error stack */
HDassert(estack);
- if(estack->nused)
- if(H5E_clear_entries(estack, estack->nused) < 0)
+ if (estack->nused)
+ if (H5E_clear_entries(estack, estack->nused) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_stack() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_pop
+ * Function: H5E_pop
*
- * Purpose: Private function to delete some error messages from the top
+ * Purpose: Private function to delete some error messages from the top
* of error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Friday, July 16, 2003
@@ -967,7 +949,7 @@ done:
herr_t
H5E_pop(H5E_t *estack, size_t count)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -976,22 +958,21 @@ H5E_pop(H5E_t *estack, size_t count)
HDassert(estack->nused >= count);
/* Remove the entries from the error stack */
- if(H5E_clear_entries(estack, count) < 0)
+ if (H5E_clear_entries(estack, count) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't remove errors from stack")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_pop() */
-
/*-------------------------------------------------------------------------
- * Function: H5E_dump_api_stack
+ * Function: H5E_dump_api_stack
*
- * Purpose: Private function to dump the error stack during an error in
+ * Purpose: Private function to dump the error stack during an error in
* an API function if a callback function is defined for the
* current error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Wednesday, August 6, 2003
@@ -1001,32 +982,31 @@ done:
herr_t
H5E_dump_api_stack(int is_api)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Only dump the error stack during an API call */
- if(is_api) {
+ if (is_api) {
H5E_t *estack = H5E_get_my_stack();
HDassert(estack);
#ifdef H5_NO_DEPRECATED_SYMBOLS
- if(estack->auto_op.func2)
- (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- if(estack->auto_op.vers == 1) {
- if(estack->auto_op.func1)
+ if (estack->auto_op.func2)
+ (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
+#else /* H5_NO_DEPRECATED_SYMBOLS */
+ if (estack->auto_op.vers == 1) {
+ if (estack->auto_op.func1)
(void)((estack->auto_op.func1)(estack->auto_data));
} /* end if */
else {
- if(estack->auto_op.func2)
+ if (estack->auto_op.func2)
(void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
} /* end else */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_dump_api_stack() */
-
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
index 8c1656b..908683f 100644
--- a/src/H5Epkg.h
+++ b/src/H5Epkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, April 11, 2007
*
* Purpose: This file contains declarations which are visible only within
@@ -31,16 +31,15 @@
/* Other private headers needed by this file */
-
/**************************/
/* Package Private Macros */
/**************************/
/* Amount to indent each error */
-#define H5E_INDENT 2
+#define H5E_INDENT 2
/* Number of slots in an error stack */
-#define H5E_NSLOTS 32
+#define H5E_NSLOTS 32
#ifdef H5_HAVE_THREADSAFE
/*
@@ -52,7 +51,7 @@
* In order for this macro to work, H5E_get_my_stack() must be preceeded
* by "H5E_t *estack =".
*/
-#define H5E_get_my_stack() H5E_get_stack()
+#define H5E_get_my_stack() H5E_get_stack()
#else /* H5_HAVE_THREADSAFE */
/*
* The current error stack.
@@ -60,7 +59,6 @@
#define H5E_get_my_stack() (H5E_stack_g + 0)
#endif /* H5_HAVE_THREADSAFE */
-
/****************************/
/* Package Private Typedefs */
/****************************/
@@ -68,53 +66,52 @@
/* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */
#ifndef H5_NO_DEPRECATED_SYMBOLS
typedef struct {
- unsigned vers; /* Which version callback to use */
- hbool_t is_default; /* If the printing function is the library's own. */
- H5E_auto1_t func1; /* Old-style callback, NO error stack param. */
- H5E_auto2_t func2; /* New-style callback, with error stack param. */
- H5E_auto1_t func1_default; /* The saved library's default function - old style. */
- H5E_auto2_t func2_default; /* The saved library's default function - new style. */
+ unsigned vers; /* Which version callback to use */
+ hbool_t is_default; /* If the printing function is the library's own. */
+ H5E_auto1_t func1; /* Old-style callback, NO error stack param. */
+ H5E_auto2_t func2; /* New-style callback, with error stack param. */
+ H5E_auto1_t func1_default; /* The saved library's default function - old style. */
+ H5E_auto2_t func2_default; /* The saved library's default function - new style. */
} H5E_auto_op_t;
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
typedef struct {
- H5E_auto_t func2; /* Only the new style callback function is available. */
+ H5E_auto_t func2; /* Only the new style callback function is available. */
} H5E_auto_op_t;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */
typedef struct {
- unsigned vers; /* Which version callback to use */
+ unsigned vers; /* Which version callback to use */
union {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5E_walk1_t func1; /* Old-style callback, NO error stack param. */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5E_walk2_t func2; /* New-style callback, with error stack param. */
- }u;
+ H5E_walk1_t func1; /* Old-style callback, NO error stack param. */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5E_walk2_t func2; /* New-style callback, with error stack param. */
+ } u;
} H5E_walk_op_t;
/* Error class */
typedef struct H5E_cls_t {
- char *cls_name; /* Name of error class */
- char *lib_name; /* Name of library within class */
- char *lib_vers; /* Version of library */
+ char *cls_name; /* Name of error class */
+ char *lib_name; /* Name of library within class */
+ char *lib_vers; /* Version of library */
} H5E_cls_t;
/* Major or minor message */
typedef struct H5E_msg_t {
- char *msg; /* Message for error */
- H5E_type_t type; /* Type of error (major or minor) */
- H5E_cls_t *cls; /* Which error class this message belongs to */
+ char * msg; /* Message for error */
+ H5E_type_t type; /* Type of error (major or minor) */
+ H5E_cls_t *cls; /* Which error class this message belongs to */
} H5E_msg_t;
/* Error stack */
struct H5E_t {
- size_t nused; /* Num slots currently used in stack */
- H5E_error2_t slot[H5E_NSLOTS]; /* Array of error records */
- H5E_auto_op_t auto_op; /* Operator for 'automatic' error reporting */
- void *auto_data; /* Callback data for 'automatic error reporting */
+ size_t nused; /* Num slots currently used in stack */
+ H5E_error2_t slot[H5E_NSLOTS]; /* Array of error records */
+ H5E_auto_op_t auto_op; /* Operator for 'automatic' error reporting */
+ void * auto_data; /* Callback data for 'automatic error reporting */
};
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -123,10 +120,9 @@ struct H5E_t {
/*
* The current error stack.
*/
-H5_DLLVAR H5E_t H5E_stack_g[1];
+H5_DLLVAR H5E_t H5E_stack_g[1];
#endif /* H5_HAVE_THREADSAFE */
-
/******************************/
/* Package Private Prototypes */
/******************************/
@@ -134,16 +130,12 @@ H5_DLL herr_t H5E__term_deprec_interface(void);
#ifdef H5_HAVE_THREADSAFE
H5_DLL H5E_t *H5E_get_stack(void);
#endif /* H5_HAVE_THREADSAFE */
-H5_DLL ssize_t H5E_get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type,
- char *msg, size_t size);
-H5_DLL herr_t H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compat);
-H5_DLL herr_t H5E_walk(const H5E_t *estack, H5E_direction_t direction,
- const H5E_walk_op_t *op, void *client_data);
-H5_DLL herr_t H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op,
- void **client_data);
-H5_DLL herr_t H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op,
- void *client_data);
-H5_DLL herr_t H5E_pop(H5E_t *err_stack, size_t count);
+H5_DLL ssize_t H5E_get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type, char *msg, size_t size);
+H5_DLL herr_t H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compat);
+H5_DLL herr_t H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op,
+ void *client_data);
+H5_DLL herr_t H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data);
+H5_DLL herr_t H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data);
+H5_DLL herr_t H5E_pop(H5E_t *err_stack, size_t count);
#endif /* _H5Epkg_H */
-
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index 52134cc..d7e6bbc 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,16 +30,17 @@ typedef struct H5E_t H5E_t;
* and a FUNC_LEAVE() within a function body. The arguments are the major
* error number, the minor error number, and a description of the error.
*/
-#define HERROR(maj_id, min_id, ...) H5E_printf_stack(NULL, __FILE__, FUNC, __LINE__, H5E_ERR_CLS_g, maj_id, min_id, __VA_ARGS__)
+#define HERROR(maj_id, min_id, ...) \
+ H5E_printf_stack(NULL, __FILE__, FUNC, __LINE__, H5E_ERR_CLS_g, maj_id, min_id, __VA_ARGS__)
/*
* HCOMMON_ERROR macro, used by HDONE_ERROR and HGOTO_ERROR
* (Shouldn't need to be used outside this header file)
*/
-#define HCOMMON_ERROR(maj, min, ...) \
- HERROR(maj, min, __VA_ARGS__); \
- err_occurred = TRUE; \
- err_occurred = err_occurred; /* Shut GCC warnings up! */
+#define HCOMMON_ERROR(maj, min, ...) \
+ HERROR(maj, min, __VA_ARGS__); \
+ err_occurred = TRUE; \
+ err_occurred = err_occurred; /* Shut GCC warnings up! */
/*
* HDONE_ERROR macro, used to facilitate error reporting between a
@@ -50,10 +51,11 @@ typedef struct H5E_t H5E_t;
* (This macro can also be used to push an error and set the return value
* without jumping to any labels)
*/
-#define HDONE_ERROR(maj, min, ret_val, ...) { \
- HCOMMON_ERROR(maj, min, __VA_ARGS__); \
- ret_value = ret_val; \
-}
+#define HDONE_ERROR(maj, min, ret_val, ...) \
+ { \
+ HCOMMON_ERROR(maj, min, __VA_ARGS__); \
+ ret_value = ret_val; \
+ }
/*
* HGOTO_ERROR macro, used to facilitate error reporting between a
@@ -62,10 +64,11 @@ typedef struct H5E_t H5E_t;
* error string. The return value is assigned to a variable `ret_value' and
* control branches to the `done' label.
*/
-#define HGOTO_ERROR(maj, min, ret_val, ...) { \
- HCOMMON_ERROR(maj, min, __VA_ARGS__); \
- HGOTO_DONE(ret_val) \
-}
+#define HGOTO_ERROR(maj, min, ret_val, ...) \
+ { \
+ HCOMMON_ERROR(maj, min, __VA_ARGS__); \
+ HGOTO_DONE(ret_val) \
+ }
/*
* HGOTO_DONE macro, used to facilitate normal return between a FUNC_ENTER()
@@ -73,14 +76,60 @@ typedef struct H5E_t H5E_t;
* value which is assigned to the `ret_value' variable. Control branches to
* the `done' label.
*/
-#define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;}
+#define HGOTO_DONE(ret_val) \
+ { \
+ ret_value = ret_val; \
+ goto done; \
+ }
+/*
+ * H5E_PRINTF macro, used to facilitate error reporting between a BEGIN_FUNC()
+ * and an END_FUNC() within a function body. The arguments are the minor
+ * error number, a description of the error (as a printf-like format string),
+ * and an optional set of arguments for the printf format arguments.
+ */
+#define H5E_PRINTF(...) \
+ H5E_printf_stack(NULL, __FILE__, FUNC, __LINE__, H5E_ERR_CLS_g, H5_MY_PKG_ERR, __VA_ARGS__)
+
+/*
+ * H5_LEAVE macro, used to facilitate control flow between a
+ * BEGIN_FUNC() and an END_FUNC() within a function body. The argument is
+ * the return value.
+ * The return value is assigned to a variable `ret_value' and control branches
+ * to the `catch_except' label, if we're not already past it.
+ */
+#define H5_LEAVE(v) \
+ { \
+ ret_value = v; \
+ if (!past_catch) \
+ goto catch_except; \
+ }
+
+/*
+ * H5E_THROW macro, used to facilitate error reporting between a
+ * FUNC_ENTER() and a FUNC_LEAVE() within a function body. The arguments are
+ * the minor error number, and an error string.
+ * The return value is assigned to a variable `ret_value' and control branches
+ * to the `catch_except' label, if we're not already past it.
+ */
+#define H5E_THROW(...) \
+ { \
+ H5E_PRINTF(__VA_ARGS__); \
+ H5_LEAVE(fail_value) \
+ }
+
+/* Macro for "catching" flow of control when an error occurs. Note that the
+ * H5_LEAVE macro won't jump back here once it's past this point.
+ */
+#define CATCH \
+catch_except:; \
+ past_catch = TRUE;
/* Library-private functions defined in H5E package */
H5_DLL herr_t H5E_init(void);
-H5_DLL herr_t H5E_push_stack(H5E_t *estack, const char *file, const char *func,
- unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *desc);
-H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func,
- unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...);
+H5_DLL herr_t H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id,
+ hid_t maj_id, hid_t min_id, const char *desc);
+H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id,
+ hid_t maj_id, hid_t min_id, const char *fmt, ...);
H5_DLL herr_t H5E_clear_stack(H5E_t *estack);
H5_DLL herr_t H5E_dump_api_stack(int is_api);
@@ -92,36 +141,42 @@ H5_DLL herr_t H5E_dump_api_stack(int is_api);
/* Retrieve the error code description string and push it onto the error
* stack.
*/
-#define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str) { \
- int myerrno = errno; \
- HDONE_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, HDstrerror(myerrno)); \
-}
-#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) { \
- int myerrno = errno; \
- HGOTO_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, HDstrerror(myerrno)); \
-}
+#define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str) \
+ { \
+ int myerrno = errno; \
+ HDONE_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \
+ HDstrerror(myerrno)); \
+ }
+#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) \
+ { \
+ int myerrno = errno; \
+ HGOTO_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \
+ HDstrerror(myerrno)); \
+ }
#ifdef H5_HAVE_PARALLEL
/*
* MPI error handling macros.
*/
-extern char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
-extern int H5E_mpi_error_str_len;
-
-#define HMPI_ERROR(mpierr){ \
- MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
- HERROR(H5E_INTERNAL, H5E_MPIERRSTR, "%s", H5E_mpi_error_str); \
-}
-#define HMPI_DONE_ERROR(retcode, str, mpierr){ \
- HMPI_ERROR(mpierr); \
- HDONE_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
-}
-#define HMPI_GOTO_ERROR(retcode, str, mpierr){ \
- HMPI_ERROR(mpierr); \
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
-}
+extern char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
+extern int H5E_mpi_error_str_len;
+
+#define HMPI_ERROR(mpierr) \
+ { \
+ MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
+ HERROR(H5E_INTERNAL, H5E_MPIERRSTR, "%s", H5E_mpi_error_str); \
+ }
+#define HMPI_DONE_ERROR(retcode, str, mpierr) \
+ { \
+ HMPI_ERROR(mpierr); \
+ HDONE_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+ }
+#define HMPI_GOTO_ERROR(retcode, str, mpierr) \
+ { \
+ HMPI_ERROR(mpierr); \
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+ }
#endif /* H5_HAVE_PARALLEL */
#endif /* _H5Eprivate_H */
-
diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h
index 0a72245..324da8f 100644
--- a/src/H5Epubgen.h
+++ b/src/H5Epubgen.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -60,7 +60,7 @@ extern "C" {
H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */
H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */
-H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */
+H5_DLLVAR hid_t H5E_FILE_g; /* File accessibility */
H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */
H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */
H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */
@@ -225,7 +225,7 @@ H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */
#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g)
H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */
-/* File accessibilty errors */
+/* File accessibility errors */
#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g)
#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g)
#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g)
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index 3eae2da..952ae38 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,42 +17,39 @@
#ifndef _H5Epublic_H
#define _H5Epublic_H
-#include <stdio.h> /*FILE arg of H5Eprint() */
+#include <stdio.h> /*FILE arg of H5Eprint() */
/* Public headers needed by this file */
#include "H5public.h"
#include "H5Ipublic.h"
/* Value for the default error stack */
-#define H5E_DEFAULT (hid_t)0
+#define H5E_DEFAULT (hid_t)0
/* Different kinds of error information */
-typedef enum H5E_type_t {
- H5E_MAJOR,
- H5E_MINOR
-} H5E_type_t;
+typedef enum H5E_type_t { H5E_MAJOR, H5E_MINOR } H5E_type_t;
/* Information about an error; element of error stack */
typedef struct H5E_error2_t {
- hid_t cls_id; /*class ID */
- hid_t maj_num; /*major error ID */
- hid_t min_num; /*minor error number */
- unsigned line; /*line in file where error occurs */
- const char *func_name; /*function in which error occurred */
- const char *file_name; /*file in which error occurred */
- const char *desc; /*optional supplied description */
+ hid_t cls_id; /*class ID */
+ hid_t maj_num; /*major error ID */
+ hid_t min_num; /*minor error number */
+ unsigned line; /*line in file where error occurs */
+ const char *func_name; /*function in which error occurred */
+ const char *file_name; /*file in which error occurred */
+ const char *desc; /*optional supplied description */
} H5E_error2_t;
/* When this header is included from a private header, don't make calls to H5open() */
#undef H5OPEN
#ifndef _H5private_H
-#define H5OPEN H5open(),
-#else /* _H5private_H */
+#define H5OPEN H5open(),
+#else /* _H5private_H */
#define H5OPEN
-#endif /* _H5private_H */
+#endif /* _H5private_H */
/* HDF5 error class */
-#define H5E_ERR_CLS (H5OPEN H5E_ERR_CLS_g)
+#define H5E_ERR_CLS (H5OPEN H5E_ERR_CLS_g)
H5_DLLVAR hid_t H5E_ERR_CLS_g;
/* Include the automatically generated public header information */
@@ -75,108 +72,108 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g;
* purpose.
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS
-#define H5E_BEGIN_TRY { \
- unsigned H5E_saved_is_v2; \
- union { \
- H5E_auto1_t efunc1; \
- H5E_auto2_t efunc2; \
- } H5E_saved; \
- void *H5E_saved_edata; \
- \
- (void)H5Eauto_is_v2(H5E_DEFAULT, &H5E_saved_is_v2); \
- if(H5E_saved_is_v2) { \
- (void)H5Eget_auto2(H5E_DEFAULT, &H5E_saved.efunc2, &H5E_saved_edata); \
- (void)H5Eset_auto2(H5E_DEFAULT, NULL, NULL); \
- } else { \
- (void)H5Eget_auto1(&H5E_saved.efunc1, &H5E_saved_edata); \
- (void)H5Eset_auto1(NULL, NULL); \
+#define H5E_BEGIN_TRY \
+ { \
+ unsigned H5E_saved_is_v2; \
+ union { \
+ H5E_auto1_t efunc1; \
+ H5E_auto2_t efunc2; \
+ } H5E_saved; \
+ void *H5E_saved_edata; \
+ \
+ (void)H5Eauto_is_v2(H5E_DEFAULT, &H5E_saved_is_v2); \
+ if (H5E_saved_is_v2) { \
+ (void)H5Eget_auto2(H5E_DEFAULT, &H5E_saved.efunc2, &H5E_saved_edata); \
+ (void)H5Eset_auto2(H5E_DEFAULT, NULL, NULL); \
+ } \
+ else { \
+ (void)H5Eget_auto1(&H5E_saved.efunc1, &H5E_saved_edata); \
+ (void)H5Eset_auto1(NULL, NULL); \
+ }
+
+#define H5E_END_TRY \
+ if (H5E_saved_is_v2) \
+ (void)H5Eset_auto2(H5E_DEFAULT, H5E_saved.efunc2, H5E_saved_edata); \
+ else \
+ (void)H5Eset_auto1(H5E_saved.efunc1, H5E_saved_edata); \
}
-
-#define H5E_END_TRY \
- if(H5E_saved_is_v2) \
- (void)H5Eset_auto2(H5E_DEFAULT, H5E_saved.efunc2, H5E_saved_edata); \
- else \
- (void)H5Eset_auto1(H5E_saved.efunc1, H5E_saved_edata); \
-}
#else /* H5_NO_DEPRECATED_SYMBOLS */
-#define H5E_BEGIN_TRY { \
- H5E_auto_t saved_efunc; \
- void *H5E_saved_edata; \
- \
- (void)H5Eget_auto(H5E_DEFAULT, &saved_efunc, &H5E_saved_edata); \
- (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-
-#define H5E_END_TRY \
- (void)H5Eset_auto(H5E_DEFAULT, saved_efunc, H5E_saved_edata); \
-}
+#define H5E_BEGIN_TRY \
+ { \
+ H5E_auto_t saved_efunc; \
+ void * H5E_saved_edata; \
+ \
+ (void)H5Eget_auto(H5E_DEFAULT, &saved_efunc, &H5E_saved_edata); \
+ (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL);
+
+#define H5E_END_TRY \
+ (void)H5Eset_auto(H5E_DEFAULT, saved_efunc, H5E_saved_edata); \
+ }
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/*
* Public API Convenience Macros for Error reporting - Documented
*/
/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */
-#define H5Epush_sim(func, cls, maj, min, str) H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str)
+#define H5Epush_sim(func, cls, maj, min, str) \
+ H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str)
/*
* Public API Convenience Macros for Error reporting - Undocumented
*/
/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */
/* And return after pushing error onto stack */
-#define H5Epush_ret(func, cls, maj, min, str, ret) { \
- H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
- return(ret); \
-}
+#define H5Epush_ret(func, cls, maj, min, str, ret) \
+ { \
+ H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
+ return (ret); \
+ }
/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in
* And goto a label after pushing error onto stack.
*/
-#define H5Epush_goto(func, cls, maj, min, str, label) { \
- H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
- goto label; \
-}
+#define H5Epush_goto(func, cls, maj, min, str, label) \
+ { \
+ H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
+ goto label; \
+ }
/* Error stack traversal direction */
typedef enum H5E_direction_t {
- H5E_WALK_UPWARD = 0, /*begin deep, end at API function */
- H5E_WALK_DOWNWARD = 1 /*begin at API function, end deep */
+ H5E_WALK_UPWARD = 0, /*begin deep, end at API function */
+ H5E_WALK_DOWNWARD = 1 /*begin at API function, end deep */
} H5E_direction_t;
-
#ifdef __cplusplus
extern "C" {
#endif
/* Error stack traversal callback function pointers */
-typedef herr_t (*H5E_walk2_t)(unsigned n, const H5E_error2_t *err_desc,
- void *client_data);
+typedef herr_t (*H5E_walk2_t)(unsigned n, const H5E_error2_t *err_desc, void *client_data);
typedef herr_t (*H5E_auto2_t)(hid_t estack, void *client_data);
/* Public API functions */
-H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name,
- const char *version);
-H5_DLL herr_t H5Eunregister_class(hid_t class_id);
-H5_DLL herr_t H5Eclose_msg(hid_t err_id);
-H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg);
-H5_DLL hid_t H5Ecreate_stack(void);
-H5_DLL hid_t H5Eget_current_stack(void);
-H5_DLL herr_t H5Eclose_stack(hid_t stack_id);
+H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name, const char *version);
+H5_DLL herr_t H5Eunregister_class(hid_t class_id);
+H5_DLL herr_t H5Eclose_msg(hid_t err_id);
+H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg);
+H5_DLL hid_t H5Ecreate_stack(void);
+H5_DLL hid_t H5Eget_current_stack(void);
+H5_DLL herr_t H5Eclose_stack(hid_t stack_id);
H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size);
-H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id);
-H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
- hid_t cls_id, hid_t maj_id, hid_t min_id, const char *msg, ...);
-H5_DLL herr_t H5Epop(hid_t err_stack, size_t count);
-H5_DLL herr_t H5Eprint2(hid_t err_stack, FILE *stream);
-H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func,
- void *client_data);
-H5_DLL herr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data);
-H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data);
-H5_DLL herr_t H5Eclear2(hid_t err_stack);
-H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack);
-H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg,
- size_t size);
+H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id);
+H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id,
+ hid_t maj_id, hid_t min_id, const char *msg, ...);
+H5_DLL herr_t H5Epop(hid_t err_stack, size_t count);
+H5_DLL herr_t H5Eprint2(hid_t err_stack, FILE *stream);
+H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void *client_data);
+H5_DLL herr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data);
+H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data);
+H5_DLL herr_t H5Eclear2(hid_t err_stack);
+H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack);
+H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg, size_t size);
H5_DLL ssize_t H5Eget_num(hid_t error_stack_id);
-
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
@@ -188,17 +185,17 @@ H5_DLL ssize_t H5Eget_num(hid_t error_stack_id);
/* Alias major & minor error types to hid_t's, for compatibility with new
* error API in v1.8
*/
-typedef hid_t H5E_major_t;
-typedef hid_t H5E_minor_t;
+typedef hid_t H5E_major_t;
+typedef hid_t H5E_minor_t;
/* Information about an error element of error stack. */
typedef struct H5E_error1_t {
- H5E_major_t maj_num; /*major error number */
- H5E_minor_t min_num; /*minor error number */
- const char *func_name; /*function in which error occurred */
- const char *file_name; /*file in which error occurred */
- unsigned line; /*line in file where error occurs */
- const char *desc; /*optional supplied description */
+ H5E_major_t maj_num; /*major error number */
+ H5E_minor_t min_num; /*minor error number */
+ const char *func_name; /*function in which error occurred */
+ const char *file_name; /*file in which error occurred */
+ unsigned line; /*line in file where error occurs */
+ const char *desc; /*optional supplied description */
} H5E_error1_t;
/* Error stack traversal callback function pointers */
@@ -208,14 +205,13 @@ typedef herr_t (*H5E_auto1_t)(void *client_data);
/* Function prototypes */
H5_DLL herr_t H5Eclear1(void);
H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data);
-H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line,
- H5E_major_t maj, H5E_minor_t min, const char *str);
+H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line, H5E_major_t maj, H5E_minor_t min,
+ const char *str);
H5_DLL herr_t H5Eprint1(FILE *stream);
H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data);
-H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func,
- void *client_data);
-H5_DLL char *H5Eget_major(H5E_major_t maj);
-H5_DLL char *H5Eget_minor(H5E_minor_t min);
+H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data);
+H5_DLL char * H5Eget_major(H5E_major_t maj);
+H5_DLL char * H5Eget_minor(H5E_minor_t min);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
@@ -223,4 +219,3 @@ H5_DLL char *H5Eget_minor(H5E_minor_t min);
#endif
#endif /* end _H5Epublic_H */
-
diff --git a/src/H5Eterm.h b/src/H5Eterm.h
index 2a8e11e..7ae28f9 100644
--- a/src/H5Eterm.h
+++ b/src/H5Eterm.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -133,7 +133,7 @@ H5E_NONE_MINOR_g=
/* Plugin errors */
H5E_OPENERROR_g=
-/* File accessibilty errors */
+/* File accessibility errors */
H5E_FILEEXISTS_g=
H5E_FILEOPEN_g=
H5E_CANTCREATE_g=
diff --git a/src/H5F.c b/src/H5F.c
index ca0fa57..f0f296d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,76 +15,65 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F__init_pub_interface
-
+#define H5_INTERFACE_INIT_FUNC H5F__init_pub_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Aprivate.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-#include "H5Tprivate.h" /* Datatypes */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Aprivate.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5Tprivate.h" /* Datatypes */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/* File ID class */
static const H5I_class_t H5I_FILE_CLS[1] = {{
- H5I_FILE, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5F_close /* Callback routine for closing objects of this class */
+ H5I_FILE, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5F_close /* Callback routine for closing objects of this class */
}};
-
/*--------------------------------------------------------------------------
NAME
H5F__init_pub_interface -- Initialize interface-specific information
@@ -100,13 +89,13 @@ DESCRIPTION
static herr_t
H5F__init_pub_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/*
* Initialize the atom group for the file IDs.
*/
- if(H5I_register_type(H5I_FILE_CLS) < 0)
+ if (H5I_register_type(H5I_FILE_CLS) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface")
ret_value = H5F_init();
@@ -114,7 +103,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__init_pub_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5F_init
*
@@ -131,7 +119,7 @@ done:
herr_t
H5F_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -140,7 +128,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_init() */
-
/*-------------------------------------------------------------------------
* Function: H5F_term_interface
*
@@ -162,195 +149,171 @@ done:
int
H5F_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
- if(H5I_nmembers(H5I_FILE) > 0) {
+ if (H5_interface_initialize_g) {
+ if (H5I_nmembers(H5I_FILE) > 0) {
(void)H5I_clear_type(H5I_FILE, FALSE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Make certain we've cleaned up all the shared file objects */
H5F_sfile_assert_num(0);
/* Destroy the file object id group */
- (void)H5I_dec_type_ref(H5I_FILE);
+ (void)H5I_dec_type_ref(H5I_FILE);
n++; /*H5I*/
- /* Mark closed */
- H5_interface_initialize_g = 0;
- } /* end else */
- } /* end if */
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* end H5F_term_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_create_plist
- *
- * Purpose: Get an atom for a copy of the file-creation property list for
- * this file. This function returns an atom with a copy of the
- * properties used to create a file.
- *
- * Return: Success: template ID
- *
- * Failure: FAIL
+ * Function: H5Fget_create_plist
*
- * Programmer: Unknown
+ * Purpose: Get an atom for a copy of the file-creation property list for
+ * this file. This function returns an atom with a copy of the
+ * properties used to create a file.
*
+ * Return: Success: Object ID for a copy of the file creation
+ * property list.
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5Fget_create_plist(hid_t file_id)
{
- H5F_t *file; /* File info */
- H5P_genplist_t *plist; /* Property list */
- hid_t ret_value; /* Return value */
+ H5F_t * file; /* File info */
+ H5P_genplist_t *plist; /* Property list */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", file_id);
/* check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(file->shared->fcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(file->shared->fcpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file creation property list")
- /* Create the property list object to return */
- if((ret_value = H5P_copy_plist(plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to copy file creation properties")
+ /* Retrieve the file creation property list */
+ if ((ret_value = H5P_copy_plist(plist, TRUE)) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy file creation properties")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_create_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_access_plist
+ * Function: H5Fget_access_plist
*
- * Purpose: Returns a copy of the file access property list of the
- * specified file.
+ * Purpose: Returns a copy of the file access property list of the
+ * specified file.
*
* NOTE: Make sure that, if you are going to overwrite
* information in the copied property list that was
* previously opened and assigned to the property list, then
* you must close it before overwriting the values.
*
- * Return: Success: Object ID for a copy of the file access
- * property list.
- *
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Wednesday, February 18, 1998
- *
+ * Return: Success: Object ID for a copy of the file access
+ * property list.
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5Fget_access_plist(hid_t file_id)
{
- H5F_t *f; /* File info */
- hid_t ret_value; /* Return value */
+ H5F_t *f; /* File info */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", file_id);
/* Check args */
- if(NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
/* Retrieve the file's access property list */
- if((ret_value = H5F_get_access_plist(f, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file access property list")
+ if ((ret_value = H5F_get_access_plist(f, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_access_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_obj_count
- *
- * Purpose: Public function returning the number of opened object IDs
- * (files, datasets, groups and datatypes) in the same file.
- *
- * Return: Non-negative on success; negative on failure.
+ * Function: H5Fget_obj_count
*
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
+ * Purpose: Public function returning the number of opened object IDs
+ * (files, datasets, groups and datatypes) in the same file.
*
+ * Return: Success: The number of opened object IDs
+ * Failure: -1
*-------------------------------------------------------------------------
*/
ssize_t
H5Fget_obj_count(hid_t file_id, unsigned types)
{
- H5F_t *f = NULL; /* File to query */
- size_t obj_count = 0; /* Number of opened objects */
- ssize_t ret_value; /* Return value */
+ H5F_t * f = NULL; /* File to query */
+ size_t obj_count = 0; /* Number of opened objects */
+ ssize_t ret_value = 0; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE2("Zs", "iIu", file_id, types);
/* Check arguments */
- if(file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file id")
- if(0 == (types & H5F_OBJ_ALL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an object type")
+ if (file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file id")
+ if (0 == (types & H5F_OBJ_ALL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type")
/* Perform the query */
- if(H5F_get_obj_count(f, types, TRUE, &obj_count) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_count failed")
+ if (H5F_get_obj_count(f, types, TRUE, &obj_count) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, (-1), "H5F_get_obj_count failed")
- /* Set the return value */
+ /* Set return value */
ret_value = (ssize_t)obj_count;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_obj_count() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_object_ids
- *
- * Purpose: Public function to return a list of opened object IDs.
+ * Function: H5Fget_object_ids
*
- * Return: Non-negative on success; negative on failure.
- *
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
- *
- * Modification:
- * Raymond Lu
- * 24 September 2008
- * Changed the return value to ssize_t and MAX_OBJTS to size_t to
- * accommadate potential large number of objects.
+ * Purpose: Public function to return a list of opened object IDs.
*
+ * Return: Success: The number of IDs in oid_list
+ * Failure: -1
*-------------------------------------------------------------------------
*/
ssize_t
H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list)
{
- H5F_t *f = NULL; /* File to query */
- size_t obj_id_count = 0; /* Number of open objects */
- ssize_t ret_value; /* Return value */
+ H5F_t * f = NULL; /* File to query */
+ size_t obj_id_count = 0; /* Number of open objects */
+ ssize_t ret_value = 0; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE4("Zs", "iIuz*i", file_id, types, max_objs, oid_list);
/* Check arguments */
- if(file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file id")
- if(0 == (types & H5F_OBJ_ALL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an object type")
- if(!oid_list)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "object ID list is NULL")
+ if (file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file id")
+ if (0 == (types & H5F_OBJ_ALL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type")
+ if (!oid_list)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "object ID list is NULL")
/* Perform the query */
- if(H5F_get_obj_ids(f, types, max_objs, oid_list, TRUE, &obj_id_count) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_ids failed")
+ if (H5F_get_obj_ids(f, types, max_objs, oid_list, TRUE, &obj_id_count) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, (-1), "H5F_get_obj_ids failed")
/* Set the return value */
ret_value = (ssize_t)obj_id_count;
@@ -359,332 +322,272 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_obj_ids() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_vfd_handle
*
* Purpose: Returns a pointer to the file handle of the low-level file
* driver.
*
- * Return: Success: non-negative value.
- * Failure: negative.
- *
- * Programmer: Raymond Lu
- * Sep. 16, 2002
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
-H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle)
+H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle)
{
- H5F_t *file; /* File to query */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File to query */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "ii**x", file_id, fapl, file_handle);
+ H5TRACE3("e", "ii**x", file_id, fapl_id, file_handle);
/* Check args */
- if(!file_handle)
+ if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file handle pointer")
- /* Get the file */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file id")
+ /* Get the file object */
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Retrieve the VFD handle for the file */
- if(H5F_get_vfd_handle(file, fapl, file_handle) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve VFD handle")
+ if (H5F_get_vfd_handle(file, fapl_id, file_handle) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get VFD handle")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_vfd_handle() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fis_hdf5
- *
- * Purpose: Check the file signature to detect an HDF5 file.
+ * Function: H5Fis_hdf5
*
- * Bugs: This function is not robust: it only uses the default file
- * driver when attempting to open the file when in fact it
- * should use all known file drivers.
+ * Purpose: Check the file signature to detect an HDF5 file.
*
- * Return: Success: TRUE/FALSE
+ * Bugs: This function is not robust: it only uses the default file
+ * driver when attempting to open the file when in fact it
+ * should use all known file drivers.
*
- * Failure: Negative
+ * Return: Success: TRUE/FALSE
+ * Failure: -1 (includes file does not exist)
*
- * Programmer: Unknown
- *
- * Modifications:
- * Robb Matzke, 1999-08-02
- * Rewritten to use the virtual file layer.
*-------------------------------------------------------------------------
*/
htri_t
H5Fis_hdf5(const char *name)
{
- htri_t ret_value; /* Return value */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "*s", name);
/* Check args and all the boring stuff. */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
/* call the private is_HDF5 function */
- if((ret_value = H5F_is_hdf5(name)) < 0)
+ if ((ret_value = H5F_is_hdf5(name)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable open file")
done:
-
FUNC_LEAVE_API(ret_value)
} /* end H5Fis_hdf5() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fcreate
- *
- * Purpose: This is the primary function for creating HDF5 files . The
- * flags parameter determines whether an existing file will be
- * overwritten or not. All newly created files are opened for
- * both reading and writing. All flags may be combined with the
- * bit-wise OR operator (`|') to change the behavior of the file
- * create call.
- *
- * The more complex behaviors of a file's creation and access
- * are controlled through the file-creation and file-access
- * property lists. The value of H5P_DEFAULT for a template
- * value indicates that the library should use the default
- * values for the appropriate template.
- *
- * See also: H5Fpublic.h for the list of supported flags. H5Ppublic.h for
- * the list of file creation and file access properties.
- *
- * Return: Success: A file ID
- *
- * Failure: FAIL
- *
- * Programmer: Unknown
- *
+ * Function: H5Fcreate
+ *
+ * Purpose: This is the primary function for creating HDF5 files . The
+ * flags parameter determines whether an existing file will be
+ * overwritten or not. All newly created files are opened for
+ * both reading and writing. All flags may be combined with the
+ * bit-wise OR operator (`|') to change the behavior of the file
+ * create call.
+ *
+ * The more complex behaviors of a file's creation and access
+ * are controlled through the file-creation and file-access
+ * property lists. The value of H5P_DEFAULT for a template
+ * value indicates that the library should use the default
+ * values for the appropriate template.
+ *
+ * See also: H5Fpublic.h for the list of supported flags. H5Ppublic.h for
+ * the list of file creation and file access properties.
+ *
+ * Return: Success: A file ID
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
{
- H5F_t *new_file = NULL; /*file struct for new file */
- hid_t ret_value; /*return value */
+ H5F_t *new_file = NULL; /* File struct for new file */
+ hid_t ret_value; /* return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id);
/* Check/fix arguments */
- if(!filename || !*filename)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name")
+ if (!filename || !*filename)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name")
+
/* In this routine, we only accept the following flags:
* H5F_ACC_EXCL and H5F_ACC_TRUNC
*/
- if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags")
+ if (flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid flags")
+
/* The H5F_ACC_EXCL and H5F_ACC_TRUNC flags are mutually exclusive */
- if((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation")
+ if ((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "mutually exclusive flags for file creation")
/* Check file creation property list */
- if(H5P_DEFAULT == fcpl_id)
+ if (H5P_DEFAULT == fcpl_id)
fcpl_id = H5P_FILE_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file create property list")
+ else if (TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file create property list")
/* Check the file access property list */
- if(H5P_DEFAULT == fapl_id)
+ if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
+ else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file access property list")
- /*
- * Adjust bit flags by turning on the creation bit and making sure that
+ /* Adjust bit flags by turning on the creation bit and making sure that
* the EXCL or TRUNC bit is set. All newly-created files are opened for
* reading and writing.
*/
- if (0==(flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC)))
- flags |= H5F_ACC_EXCL; /*default*/
+ if (0 == (flags & (H5F_ACC_EXCL | H5F_ACC_TRUNC)))
+ flags |= H5F_ACC_EXCL; /*default*/
flags |= H5F_ACC_RDWR | H5F_ACC_CREAT;
- /*
- * Create a new file or truncate an existing file.
- */
- if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create file")
+ /* Create a new file or truncate an existing file */
+ if (NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file")
/* Get an atom for the file */
- if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file")
+ if ((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file")
/* Keep this ID in file object structure */
new_file->file_id = ret_value;
done:
- if(ret_value < 0 && new_file)
- if(H5F_close(new_file) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file")
+ if (ret_value < 0 && new_file)
+ if (H5F_close(new_file) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, H5I_INVALID_HID, "problems closing file")
FUNC_LEAVE_API(ret_value)
} /* end H5Fcreate() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fopen
- *
- * Purpose: This is the primary function for accessing existing HDF5
- * files. The FLAGS argument determines whether writing to an
- * existing file will be allowed or not. All flags may be
- * combined with the bit-wise OR operator (`|') to change the
- * behavior of the file open call. The more complex behaviors
- * of a file's access are controlled through the file-access
- * property list.
- *
- * See Also: H5Fpublic.h for a list of possible values for FLAGS.
- *
- * Return: Success: A file ID
- *
- * Failure: FAIL
+ * Function: H5Fopen
*
- * Programmer: Unknown
+ * Purpose: This is the primary function for accessing existing HDF5
+ * files. The FLAGS argument determines whether writing to an
+ * existing file will be allowed or not. All flags may be
+ * combined with the bit-wise OR operator (`|') to change the
+ * behavior of the file open call. The more complex behaviors
+ * of a file's access are controlled through the file-access
+ * property list.
*
- * Modifications:
- * Robb Matzke, 1997-07-18
- * File struct creation and destruction is through H5F_new() and
- * H5F_dest(). Reading the root symbol table entry is done with
- * H5G_decode().
+ * See Also: H5Fpublic.h for a list of possible values for FLAGS.
*
- * Robb Matzke, 1997-09-23
- * Most of the work is now done by H5F_open() since H5Fcreate()
- * and H5Fopen() originally contained almost identical code.
- *
- * Robb Matzke, 1998-02-18
- * Added better error checking for the flags and the file access
- * property list. It used to be possible to make the library
- * dump core by passing an object ID that was not a file access
- * property list.
- *
- * Robb Matzke, 1999-08-02
- * The file access property list is passed to the H5F_open() as
- * object IDs.
+ * Return: Success: A file ID
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
{
- H5F_t *new_file = NULL; /*file struct for new file */
- hid_t ret_value; /*return value */
+ H5F_t *new_file = NULL; /* file struct for new file */
+ hid_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "*sIui", filename, flags, fapl_id);
- /* Check/fix arguments. */
- if(!filename || !*filename)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name")
+ /* Check arguments */
+ if (!filename || !*filename)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name")
/* Reject undefined flags (~H5F_ACC_PUBLIC_FLAGS) and the H5F_ACC_TRUNC & H5F_ACC_EXCL flags */
- if((flags & ~H5F_ACC_PUBLIC_FLAGS) ||
- (flags & H5F_ACC_TRUNC) || (flags & H5F_ACC_EXCL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags")
- if(H5P_DEFAULT == fapl_id)
+ if ((flags & ~H5F_ACC_PUBLIC_FLAGS) || (flags & H5F_ACC_TRUNC) || (flags & H5F_ACC_EXCL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags")
+ if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
+ else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file access property list")
/* Open the file */
- if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open file")
+ if (NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file")
- /* Get an atom for the file */
- if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle")
+ /* Get an ID for the file */
+ if ((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
/* Keep this ID in file object structure */
new_file->file_id = ret_value;
done:
- if(ret_value < 0 && new_file && H5F_try_close(new_file) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file")
-
+ if (ret_value < 0 && new_file && H5F_try_close(new_file) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, H5I_INVALID_HID, "problems closing file")
FUNC_LEAVE_API(ret_value)
} /* end H5Fopen() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fflush
- *
- * Purpose: Flushes all outstanding buffers of a file to disk but does
- * not remove them from the cache. The OBJECT_ID can be a file,
- * dataset, group, attribute, or named data type.
+ * Function: H5Fflush
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, August 6, 1998
+ * Purpose: Flushes all outstanding buffers of a file to disk but does
+ * not remove them from the cache. The OBJECT_ID can be a file,
+ * dataset, group, attribute, or named data type.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fflush(hid_t object_id, H5F_scope_t scope)
{
- H5F_t *f = NULL; /* File to flush */
- H5O_loc_t *oloc = NULL; /* Object location for ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t * f = NULL; /* File to flush */
+ H5O_loc_t *oloc = NULL; /* Object location for ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iFs", object_id, scope);
- switch(H5I_get_type(object_id)) {
+ switch (H5I_get_type(object_id)) {
case H5I_FILE:
- if(NULL == (f = (H5F_t *)H5I_object(object_id)))
+ if (NULL == (f = (H5F_t *)H5I_object(object_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
break;
- case H5I_GROUP:
- {
- H5G_t *grp;
+ case H5I_GROUP: {
+ H5G_t *grp;
- if(NULL == (grp = (H5G_t *)H5I_object(object_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid group identifier")
- oloc = H5G_oloc(grp);
- }
- break;
+ if (NULL == (grp = (H5G_t *)H5I_object(object_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid group identifier")
+ oloc = H5G_oloc(grp);
+ } break;
- case H5I_DATATYPE:
- {
- H5T_t *type;
+ case H5I_DATATYPE: {
+ H5T_t *type;
- if(NULL == (type = (H5T_t *)H5I_object(object_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid type identifier")
- oloc = H5T_oloc(type);
- }
- break;
+ if (NULL == (type = (H5T_t *)H5I_object(object_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid type identifier")
+ oloc = H5T_oloc(type);
+ } break;
- case H5I_DATASET:
- {
- H5D_t *dset;
+ case H5I_DATASET: {
+ H5D_t *dset;
- if(NULL == (dset = (H5D_t *)H5I_object(object_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier")
- oloc = H5D_oloc(dset);
- }
- break;
+ if (NULL == (dset = (H5D_t *)H5I_object(object_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier")
+ oloc = H5D_oloc(dset);
+ } break;
- case H5I_ATTR:
- {
- H5A_t *attr;
+ case H5I_ATTR: {
+ H5A_t *attr;
- if(NULL == (attr = (H5A_t *)H5I_object(object_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid attribute identifier")
- oloc = H5A_oloc(attr);
- }
- break;
+ if (NULL == (attr = (H5A_t *)H5I_object(object_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid attribute identifier")
+ oloc = H5A_oloc(attr);
+ } break;
case H5I_UNINIT:
case H5I_BADID:
@@ -701,87 +604,79 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
} /* end switch */
- if(!f) {
- if(!oloc)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file")
- f = oloc->file;
+ if (!f) {
+ if (!oloc)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file")
+ f = oloc->file;
} /* end if */
- if(!f)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file")
+ if (!f)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file")
/* Flush the file */
/*
- * Nothing to do if the file is read only. This determination is
+ * Nothing to do if the file is read only. This determination is
* made at the shared open(2) flags level, implying that opening a
* file twice, once for read-only and once for read-write, and then
* calling H5Fflush() with the read-only handle, still causes data
* to be flushed.
*/
- if(H5F_ACC_RDWR & H5F_INTENT(f)) {
+ if (H5F_ACC_RDWR & H5F_INTENT(f)) {
/* Flush other files, depending on scope */
- if(H5F_SCOPE_GLOBAL == scope) {
+ if (H5F_SCOPE_GLOBAL == scope) {
/* Call the flush routine for mounted file hierarchies */
- if(H5F_flush_mounts(f, H5AC_dxpl_id) < 0)
+ if (H5F_flush_mounts(f, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy")
} /* end if */
else {
/* Call the flush routine, for this file */
- if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
+ if (H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")
} /* end else */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fflush() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fclose
- *
- * Purpose: This function closes the file specified by FILE_ID by
- * flushing all data to storage, and terminating access to the
- * file through FILE_ID. If objects (e.g., datasets, groups,
- * etc.) are open in the file then the underlying storage is not
- * closed until those objects are closed; however, all data for
- * the file and the open objects is flushed.
+ * Function: H5Fclose
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Saturday, February 20, 1999
- *
- * Modifications:
+ * Purpose: This function closes the file specified by FILE_ID by
+ * flushing all data to storage, and terminating access to the
+ * file through FILE_ID. If objects (e.g., datasets, groups,
+ * etc.) are open in the file then the underlying storage is not
+ * closed until those objects are closed; however, all data for
+ * the file and the open objects is flushed.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fclose(hid_t file_id)
{
- H5F_t *f = NULL;
- int nref;
- herr_t ret_value = SUCCEED;
+ H5F_t *f = NULL;
+ int nref;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
- /* Check/fix arguments. */
- if(H5I_FILE != H5I_get_type(file_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID")
+ /* Check arguments */
+ if (H5I_FILE != H5I_get_type(file_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID")
/* Flush file if this is the last reference to this id and we have write
* intent, unless it will be flushed by the "shared" file being closed.
* This is only necessary to replicate previous behaviour, and could be
* disabled by an option/property to improve performance. */
- if(NULL == (f = (H5F_t *)H5I_object(file_id)))
+ if (NULL == (f = (H5F_t *)H5I_object(file_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
- if((f->shared->nrefs > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) {
- if((nref = H5I_get_ref(file_id, FALSE)) < 0)
+ if ((f->shared->nrefs > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) {
+ if ((nref = H5I_get_ref(file_id, FALSE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID ref count")
- if(nref == 1)
- if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
+ if (nref == 1)
+ if (H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
} /* end if */
@@ -789,81 +684,72 @@ H5Fclose(hid_t file_id)
* Decrement reference count on atom. When it reaches zero the file will
* be closed.
*/
- if(H5I_dec_app_ref(file_id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed")
+ if (H5I_dec_app_ref(file_id) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fclose() */
-
/*-------------------------------------------------------------------------
- * Function: H5Freopen
- *
- * Purpose: Reopen a file. The new file handle which is returned points
- * to the same file as the specified file handle. Both handles
- * share caches and other information. The only difference
- * between the handles is that the new handle is not mounted
- * anywhere and no files are mounted on it.
+ * Function: H5Freopen
*
- * Return: Success: New file ID
- *
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Friday, October 16, 1998
+ * Purpose: Reopen a file. The new file handle which is returned points
+ * to the same file as the specified file handle. Both handles
+ * share caches and other information. The only difference
+ * between the handles is that the new handle is not mounted
+ * anywhere and no files are mounted on it.
*
+ * Return: Success: New file ID
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5Freopen(hid_t file_id)
{
- H5F_t *old_file = NULL;
- H5F_t *new_file = NULL;
- hid_t ret_value;
+ H5F_t *old_file = NULL;
+ H5F_t *new_file = NULL;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", file_id);
/* Check arguments */
- if(NULL == (old_file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (NULL == (old_file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
/* Get a new "top level" file struct, sharing the same "low level" file struct */
- if(NULL == (new_file = H5F_new(old_file->shared, 0, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, NULL)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file")
+ if (NULL ==
+ (new_file = H5F_new(old_file->shared, 0, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, NULL)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file")
/* Duplicate old file's names */
- new_file->open_name = H5MM_xstrdup(old_file->open_name);
+ new_file->open_name = H5MM_xstrdup(old_file->open_name);
new_file->actual_name = H5MM_xstrdup(old_file->actual_name);
- new_file->extpath = H5MM_xstrdup(old_file->extpath);
+ new_file->extpath = H5MM_xstrdup(old_file->extpath);
- if((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle")
+ if ((ret_value = H5I_register(H5I_FILE, new_file, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
/* Keep this ID in file object structure */
new_file->file_id = ret_value;
done:
- if(ret_value < 0 && new_file)
- if(H5F_dest(new_file, H5AC_dxpl_id, FALSE) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file")
+ if (ret_value < 0 && new_file)
+ if (H5F_dest(new_file, H5AC_dxpl_id, FALSE) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, H5I_INVALID_HID, "can't close file")
FUNC_LEAVE_API(ret_value)
} /* end H5Freopen() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_intent
+ * Function: H5Fget_intent
*
- * Purpose: Public API to retrieve the file's 'intent' flags passed
+ * Purpose: Public API to retrieve the file's 'intent' flags passed
* during H5Fopen()
*
- * Return: Non-negative on success/negative on failure
- *
- * Programmer: James Laird
- * August 23, 2006
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -875,18 +761,18 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags)
H5TRACE2("e", "i*Iu", file_id, intent_flags);
/* If no intent flags were passed in, exit quietly */
- if(intent_flags) {
- H5F_t * file; /* Pointer to file structure */
+ if (intent_flags) {
+ H5F_t *file; /* Pointer to file structure */
/* Get the internal file structure */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* HDF5 uses some flags internally that users don't know about.
* Simplify things for them so that they only get either H5F_ACC_RDWR
* or H5F_ACC_RDONLY.
*/
- if(H5F_INTENT(file) & H5F_ACC_RDWR)
+ if (H5F_INTENT(file) & H5F_ACC_RDWR)
*intent_flags = H5F_ACC_RDWR;
else
*intent_flags = H5F_ACC_RDONLY;
@@ -896,38 +782,32 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_intent() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_freespace
*
* Purpose: Retrieves the amount of free space in the file.
*
- * Return: Success: Amount of free space for type
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Oct 6, 2003
- *
+ * Return: Success: Amount of free space for type
+ * Failure: -1
*-------------------------------------------------------------------------
*/
hssize_t
H5Fget_freespace(hid_t file_id)
{
- H5F_t *file; /* File object for file ID */
- hsize_t tot_space; /* Amount of free space in the file */
- hssize_t ret_value; /* Return value */
+ H5F_t * file; /* File object for file ID */
+ hsize_t tot_space; /* Amount of free space in the file */
+ hssize_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Hs", "i", file_id);
- /* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ /* Get the file object */
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
/* Go get the actual amount of free space in the file */
- if(H5MF_get_freespace(file, H5AC_ind_dxpl_id, &tot_space, NULL) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file")
+ if (H5MF_get_freespace(file, H5AC_ind_dxpl_id, &tot_space, NULL) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to check free space for file")
ret_value = (hssize_t)tot_space;
@@ -935,377 +815,335 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_freespace() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_filesize
*
* Purpose: Retrieves the file size of the HDF5 file. This function
* is called after an existing file is opened in order
- * to learn the true size of the underlying file.
+ * to learn the true size of the underlying file.
*
* Return: Success: Non-negative
* Failure: Negative
- *
- * Programmer: David Pitt
- * david.pitt@bigpond.com
- * Apr 27, 2004
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Fget_filesize(hid_t file_id, hsize_t *size)
{
- H5F_t *file; /* File object for file ID */
- haddr_t eof; /* End of file address */
- haddr_t base_addr; /* Base address for the file */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t * file; /* File object for file ID */
+ haddr_t eof; /* End of file address */
+ haddr_t base_addr; /* Base address for the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", file_id, size);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Go get the actual file size */
- if(HADDR_UNDEF == (eof = H5FD_get_eof(file->shared->lf)))
+ if (HADDR_UNDEF == (eof = H5FD_get_eof(file->shared->lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
+
base_addr = H5FD_get_base_addr(file->shared->lf);
- if(size)
- *size = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */
+ if (size)
+ *size = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_filesize() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_file_image
*
- * Purpose: If a buffer is provided (via the buf_ptr argument) and is
- * big enough (size in buf_len argument), load *buf_ptr with
- * an image of the open file whose ID is provided in the
- * file_id parameter, and return the number of bytes copied
- * to the buffer.
+ * Purpose: If a buffer is provided (via the buf_ptr argument) and is
+ * big enough (size in buf_len argument), load *buf_ptr with
+ * an image of the open file whose ID is provided in the
+ * file_id parameter, and return the number of bytes copied
+ * to the buffer.
*
- * If the buffer exists, but is too small to contain an image
- * of the indicated file, return a negative number.
+ * If the buffer exists, but is too small to contain an image
+ * of the indicated file, return a negative number.
*
- * Finally, if no buffer is provided, return the size of the
- * buffer needed. This value is simply the eoa of the target
- * file.
+ * Finally, if no buffer is provided, return the size of the
+ * buffer needed. This value is simply the eoa of the target
+ * file.
*
- * Note that any user block is skipped.
+ * Note that any user block is skipped.
*
- * Also note that the function may not be used on files
- * opened with either the split/multi file driver or the
- * family file driver.
+ * Also note that the function may not be used on files
+ * opened with either the split/multi file driver or the
+ * family file driver.
*
- * In the former case, the sparse address space makes the
- * get file image operation impractical, due to the size of
- * the image typically required.
+ * In the former case, the sparse address space makes the
+ * get file image operation impractical, due to the size of
+ * the image typically required.
*
- * In the case of the family file driver, the problem is
- * the driver message in the super block, which will prevent
- * the image being opened with any driver other than the
- * family file driver -- which negates the purpose of the
- * operation. This can be fixed, but no resources for
- * this now.
- *
- * Return: Success: Bytes copied / number of bytes needed.
- * Failure: negative value
- *
- * Programmer: John Mainzer
- * 11/15/11
+ * In the case of the family file driver, the problem is
+ * the driver message in the super block, which will prevent
+ * the image being opened with any driver other than the
+ * family file driver -- which negates the purpose of the
+ * operation. This can be fixed, but no resources for
+ * this now.
*
+ * Return: Success: Bytes copied / number of bytes needed
+ * Failure: -1
*-------------------------------------------------------------------------
*/
ssize_t
H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
{
- H5F_t *file; /* File object for file ID */
- ssize_t ret_value; /* Return value */
+ H5F_t * file; /* File object for file ID */
+ ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "i*xz", file_id, buf_ptr, buf_len);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file ID")
/* call private get_file_image function */
- if((ret_value = H5F_get_file_image(file, buf_ptr, buf_len)) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file image")
+ if ((ret_value = H5F_get_file_image(file, buf_ptr, buf_len)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file image")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Fget_file_image() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_mdc_config
*
* Purpose: Retrieves the current automatic cache resize configuration
- * from the metadata cache, and return it in *config_ptr.
+ * from the metadata cache, and return it in *config_ptr.
*
- * Note that the version field of *config_Ptr must be correctly
- * filled in by the caller. This allows us to adapt for
- * obsolete versions of the structure.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 3/24/05
+ * Note that the version field of *config_Ptr must be correctly
+ * filled in by the caller. This allows us to adapt for
+ * obsolete versions of the structure.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
{
- H5F_t *file; /* File object for file ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
- if((NULL == config_ptr) || (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION))
+ if ((NULL == config_ptr) || (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config_ptr")
/* Go get the resize configuration */
- if(H5AC_get_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
+ if (H5AC_get_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_auto_resize_config() failed.")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Fget_mdc_config() */
-
/*-------------------------------------------------------------------------
* Function: H5Fset_mdc_config
*
* Purpose: Sets the current metadata cache automatic resize
- * configuration, using the contents of the instance of
- * H5AC_cache_config_t pointed to by config_ptr.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 3/24/05
+ * configuration, using the contents of the instance of
+ * H5AC_cache_config_t pointed to by config_ptr.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
{
- H5F_t *file; /* File object for file ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
- /* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ /* Get the file object */
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
- /* set the resize configuration */
- if(H5AC_set_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
+ /* Set the metadata cache configuration */
+ if (H5AC_set_cache_auto_resize_config(file->shared->cache, config_ptr) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC_set_cache_auto_resize_config() failed.")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Fset_mdc_config() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_mdc_hit_rate
*
* Purpose: Retrieves the current hit rate from the metadata cache.
- * This rate is the overall hit rate since the last time
- * the hit rate statistics were reset either manually or
- * automatically.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 3/24/05
+ * This rate is the overall hit rate since the last time
+ * the hit rate statistics were reset either manually or
+ * automatically.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
{
- H5F_t *file; /* File object for file ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*d", file_id, hit_rate_ptr);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
-
- if(NULL == hit_rate_ptr)
+ if (NULL == hit_rate_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL hit rate pointer")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
- /* Go get the current hit rate */
- if(H5AC_get_cache_hit_rate(file->shared->cache, hit_rate_ptr) < 0)
+ /* Get the current hit rate */
+ if (H5AC_get_cache_hit_rate(file->shared->cache, hit_rate_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_hit_rate() failed.")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Fget_mdc_hit_rate() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_mdc_size
*
* Purpose: Retrieves the maximum size, minimum clean size, current
- * size, and current number of entries from the metadata
- * cache associated with the specified file. If any of
- * the ptr parameters are NULL, the associated datum is
- * not returned.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 3/24/05
+ * size, and current number of entries from the metadata
+ * cache associated with the specified file. If any of
+ * the ptr parameters are NULL, the associated datum is
+ * not returned.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
-H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
- size_t *cur_size_ptr, int *cur_num_entries_ptr)
+H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, size_t *cur_size_ptr,
+ int *cur_num_entries_ptr)
{
- H5F_t *file; /* File object for file ID */
- int32_t cur_num_entries;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t * file; /* File object for file ID */
+ int32_t cur_num_entries;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "i*z*z*z*Is", file_id, max_size_ptr, min_clean_size_ptr,
- cur_size_ptr, cur_num_entries_ptr);
+ H5TRACE5("e", "i*z*z*z*Is", file_id, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
- /* Go get the size data */
- if(H5AC_get_cache_size(file->shared->cache, max_size_ptr,
- min_clean_size_ptr, cur_size_ptr, &cur_num_entries) < 0)
+ /* Get the size data */
+ if (H5AC_get_cache_size(file->shared->cache, max_size_ptr, min_clean_size_ptr, cur_size_ptr,
+ &cur_num_entries) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_size() failed.")
-
- if(cur_num_entries_ptr != NULL)
- *cur_num_entries_ptr = (int)cur_num_entries;
+ if (cur_num_entries_ptr != NULL)
+ *cur_num_entries_ptr = (int)cur_num_entries;
done:
FUNC_LEAVE_API(ret_value)
} /* H5Fget_mdc_size() */
-
/*-------------------------------------------------------------------------
* Function: H5Freset_mdc_hit_rate_stats
*
* Purpose: Reset the hit rate statistic whose current value can
- * be obtained via the H5Fget_mdc_hit_rate() call. Note
- * that this statistic will also be reset once per epoch
- * by the automatic cache resize code if it is enabled.
+ * be obtained via the H5Fget_mdc_hit_rate() call. Note
+ * that this statistic will also be reset once per epoch
+ * by the automatic cache resize code if it is enabled.
*
- * It is probably a bad idea to call this function unless
- * you are controlling cache size from your program instead
- * of using our cache size control code.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 3/24/05
+ * It is probably a bad idea to call this function unless
+ * you are controlling cache size from your program instead
+ * of using our cache size control code.
*
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Freset_mdc_hit_rate_stats(hid_t file_id)
{
- H5F_t *file; /* File object for file ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
- /* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ /* Get the file object */
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Reset the hit rate statistic */
- if(H5AC_reset_cache_hit_rate_stats(file->shared->cache) < 0)
+ if (H5AC_reset_cache_hit_rate_stats(file->shared->cache) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't reset cache hit rate")
done:
FUNC_LEAVE_API(ret_value)
} /* H5Freset_mdc_hit_rate_stats() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_name
*
* Purpose: Gets the name of the file to which object OBJ_ID belongs.
- * If `name' is non-NULL then write up to `size' bytes into that
+ * If 'name' is non-NULL then write up to 'size' bytes into that
* buffer and always return the length of the entry name.
- * Otherwise `size' is ignored and the function does not store the name,
- * just returning the number of characters required to store the name.
- * If an error occurs then the buffer pointed to by `name' (NULL or non-NULL)
- * is unchanged and the function returns a negative value.
- *
- * Note: This routine returns the name that was used to open the file,
- * not the actual name after resolving symlinks, etc.
- *
- * Return: Success: The length of the file name
- * Failure: Negative
+ * Otherwise `size' is ignored and the function does not store
+ * the name, just returning the number of characters required to
+ * store the name. If an error occurs then the buffer pointed to
+ * by 'name' (NULL or non-NULL) is unchanged and the function
+ * returns a negative value.
*
- * Programmer: Raymond Lu
- * June 29, 2004
+ * Note: This routine returns the name that was used to open the file,
+ * not the actual name after resolving symlinks, etc.
*
+ * Return: Success: The length of the file name
+ * Failure: -1
*-------------------------------------------------------------------------
*/
ssize_t
-H5Fget_name(hid_t obj_id, char *name/*out*/, size_t size)
+H5Fget_name(hid_t obj_id, char *name /*out*/, size_t size)
{
- H5F_t *f; /* Top file in mount hierarchy */
- size_t len;
- ssize_t ret_value;
+ H5F_t * f; /* Top file in mount hierarchy */
+ size_t len;
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "ixz", obj_id, name, size);
/* For file IDs, get the file object directly */
/* (This prevents the H5G_loc() call from returning the file pointer for
* the top file in a mount hierarchy)
*/
- if(H5I_get_type(obj_id) == H5I_FILE ) {
- if(NULL == (f = (H5F_t *)H5I_object(obj_id)))
+ if (H5I_get_type(obj_id) == H5I_FILE) {
+ if (NULL == (f = (H5F_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
} /* end if */
else {
- H5G_loc_t loc; /* Object location */
+ H5G_loc_t loc; /* Object location */
/* Get symbol table entry */
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object ID")
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a valid object ID")
f = loc.oloc->file;
} /* end else */
len = HDstrlen(H5F_OPEN_NAME(f));
- if(name) {
- HDstrncpy(name, H5F_OPEN_NAME(f), MIN(len + 1,size));
- if(len >= size)
- name[size-1]='\0';
+ if (name) {
+ HDstrncpy(name, H5F_OPEN_NAME(f), MIN(len + 1, size));
+ if (len >= size)
+ name[size - 1] = '\0';
} /* end if */
/* Set return value */
@@ -1315,13 +1153,12 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_name() */
-
/*-------------------------------------------------------------------------
* Function: H5Fget_info
- * 1. Get storage size for superblock extension if there is one
+ * 1. Get storage size for superblock extension if there is one
* 2. Get the amount of btree and heap storage for entries
* in the SOHM table if there is one.
- * Consider success when there is no superblock extension and/or SOHM table
+ * Consider success when there is no superblock extension and/or SOHM table
*
* Return: Success: non-negative on success
* Failure: Negative
@@ -1334,30 +1171,30 @@ done:
herr_t
H5Fget_info(hid_t obj_id, H5F_info_t *finfo)
{
- H5F_t *f; /* Top file in mount hierarchy */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *f; /* Top file in mount hierarchy */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", obj_id, finfo);
/* Check args */
- if(!finfo)
+ if (!finfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
/* For file IDs, get the file object directly */
/* (This prevents the H5G_loc() call from returning the file pointer for
* the top file in a mount hierarchy)
*/
- if(H5I_get_type(obj_id) == H5I_FILE ) {
- if(NULL == (f = (H5F_t *)H5I_object(obj_id)))
+ if (H5I_get_type(obj_id) == H5I_FILE) {
+ if (NULL == (f = (H5F_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
} /* end if */
else {
- H5G_loc_t loc; /* Object location */
+ H5G_loc_t loc; /* Object location */
/* Get symbol table entry */
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object ID")
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object ID")
f = loc.oloc->file;
} /* end else */
HDassert(f->shared);
@@ -1366,19 +1203,18 @@ H5Fget_info(hid_t obj_id, H5F_info_t *finfo)
HDmemset(finfo, 0, sizeof(H5F_info_t));
/* Check for superblock extension info */
- if(H5F_super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
+ if (H5F_super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
/* Check for SOHM info */
- if(H5F_addr_defined(f->shared->sohm_addr))
- if(H5SM_ih_size(f, H5AC_ind_dxpl_id, finfo) < 0)
+ if (H5F_addr_defined(f->shared->sohm_addr))
+ if (H5SM_ih_size(f, H5AC_ind_dxpl_id, finfo) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM btree & heap storage info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_info() */
-
/*-------------------------------------------------------------------------
* Function: H5Fclear_elink_file_cache
*
@@ -1386,29 +1222,26 @@ done:
* provided file, potentially closing any cached files
* unless they are held open from somewhere\ else.
*
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Neil Fortner; December 30, 2010
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
H5Fclear_elink_file_cache(hid_t file_id)
{
- H5F_t *file; /* File */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Release the EFC */
- if(file->shared->efc)
- if(H5F_efc_release(file->shared->efc) < 0)
+ if (file->shared->efc)
+ if (H5F_efc_release(file->shared->efc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
done:
diff --git a/src/H5FD.c b/src/H5FD.c
index 63b7dfc..348ca42 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -6,93 +6,83 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Monday, July 26, 1999
- *
- * Purpose: The Virtual File Layer as described in documentation.
- * This is the greatest common denominator for all types of
- * storage access whether a file, memory, network, etc. This
- * layer usually just dispatches the request to an actual
- * file driver layer.
+ * Purpose: The Virtual File Layer as described in documentation.
+ * This is the greatest common denominator for all types of
+ * storage access whether a file, memory, network, etc. This
+ * layer usually just dispatches the request to an actual
+ * file driver layer.
*/
/****************/
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5FD_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDpkg.h" /* File Drivers */
-#include "H5FDcore.h" /* Files stored entirely in memory */
-#include "H5FDfamily.h" /* File families */
-#include "H5FDlog.h" /* sec2 driver with I/O logging (for debugging) */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5FDmulti.h" /* Usage-partitioned file family */
-#include "H5FDsec2.h" /* POSIX unbuffered file I/O */
-#include "H5FDstdio.h" /* Standard C buffered I/O */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDpkg.h" /* File Drivers */
+#include "H5FDcore.h" /* Files stored entirely in memory */
+#include "H5FDfamily.h" /* File families */
+#include "H5FDlog.h" /* sec2 driver with I/O logging (for debugging) */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5FDmulti.h" /* Usage-partitioned file family */
+#include "H5FDsec2.h" /* POSIX unbuffered file I/O */
+#include "H5FDstdio.h" /* Standard C buffered I/O */
#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
+#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
-#include "H5FDdirect.h" /* Direct file I/O */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5FDdirect.h" /* Direct file I/O */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size,
- const void *old_pl, void **copied_pl);
-static herr_t H5FD_pl_close(hid_t driver_id, herr_t (*free_func)(void *),
- void *pl);
+static herr_t H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size, const void *old_pl,
+ void **copied_pl);
+static herr_t H5FD_pl_close(hid_t driver_id, herr_t (*free_func)(void *), void *pl);
static herr_t H5FD_free_cls(H5FD_class_t *cls);
static herr_t H5FD_fapl_copy(hid_t driver_id, const void *fapl, void **copied_fapl);
-static int H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/);
-static int H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/);
+static int H5FD_query(const H5FD_t *f, unsigned long *flags /*out*/);
+static int H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -113,23 +103,21 @@ static unsigned long H5FD_file_serial_no_g;
/* File driver ID class */
static const H5I_class_t H5I_VFL_CLS[1] = {{
- H5I_VFL, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5FD_free_cls /* Callback routine for closing objects of this class */
+ H5I_VFL, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5FD_free_cls /* Callback routine for closing objects of this class */
}};
-
-
/*-------------------------------------------------------------------------
- * Function: H5FD_init
+ * Function: H5FD_init
*
- * Purpose: Initialize the interface from some other package.
+ * Purpose: Initialize the interface from some other package.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 3, 2007
*
*-------------------------------------------------------------------------
@@ -137,7 +125,7 @@ static const H5I_class_t H5I_VFL_CLS[1] = {{
herr_t
H5FD_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -146,17 +134,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_init() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_init_interface
+ * Function: H5FD_init_interface
*
- * Purpose: Initialize the virtual file layer.
+ * Purpose: Initialize the virtual file layer.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*
* Modifications:
@@ -166,12 +153,12 @@ done:
static herr_t
H5FD_init_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(H5I_register_type(H5I_VFL_CLS) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface")
+ if (H5I_register_type(H5I_VFL_CLS) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the file serial numbers */
H5FD_file_serial_no_g = 0;
@@ -180,40 +167,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_term_interface
+ * Function: H5FD_term_interface
*
- * Purpose: Terminate this interface: free all memory and reset global
- * variables to their initial values. Release all ID groups
- * associated with this interface.
+ * Purpose: Terminate this interface: free all memory and reset global
+ * variables to their initial values. Release all ID groups
+ * associated with this interface.
*
- * Return: Success: Positive if anything was done that might
- * have affected other interfaces; zero
- * otherwise.
+ * Return: Success: Positive if anything was done that might
+ * have affected other interfaces; zero
+ * otherwise.
*
- * Failure: Never fails.
- *
- * Programmer: Robb Matzke
- * Friday, February 19, 1999
- *
- * Modifications:
+ * Failure: Never fails.
*
*-------------------------------------------------------------------------
*/
int
H5FD_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
- if(H5I_nmembers(H5I_VFL) > 0) {
- (void)H5I_clear_type(H5I_VFL, FALSE, FALSE);
+ if (H5_interface_initialize_g) {
+ if (H5I_nmembers(H5I_VFL) > 0) {
+ (void)H5I_clear_type(H5I_VFL, FALSE, FALSE);
/* Reset the VFL drivers, if they've been closed */
- if(H5I_nmembers(H5I_VFL)==0) {
+ if (H5I_nmembers(H5I_VFL) == 0) {
H5FD_sec2_term();
#ifdef H5_HAVE_DIRECT
H5FD_direct_term();
@@ -228,40 +209,32 @@ H5FD_term_interface(void)
H5FD_multi_term();
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_term();
-#endif /* H5_HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
} /* end if */
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Destroy the VFL driver id group */
- (void)H5I_dec_type_ref(H5I_VFL);
+ (void)H5I_dec_type_ref(H5I_VFL);
n++; /*H5I*/
- /* Mark closed */
- H5_interface_initialize_g = 0;
- } /* end else */
- } /* end if */
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* end H5FD_term_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_free_cls
- *
- * Purpose: Frees a file driver class struct and returns an indication of
- * success. This function is used as the free callback for the
- * virtual file layer object identifiers (cf H5FD_init_interface).
- *
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Function: H5FD_free_cls
*
- * Programmer: Robb Matzke
- * Monday, July 26, 1999
+ * Purpose: Frees a file driver class struct and returns an indication of
+ * success. This function is used as the free callback for the
+ * virtual file layer object identifiers (cf H5FD_init_package).
*
- * Modifications:
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -275,205 +248,178 @@ H5FD_free_cls(H5FD_class_t *cls)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_free_cls() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDregister
- *
- * Purpose: Registers a new file driver as a member of the virtual file
- * driver class. Certain fields of the class struct are
- * required and that is checked here so it doesn't have to be
- * checked every time the field is accessed.
- *
- * Return: Success: A file driver ID which is good until the
- * library is closed or the driver is
- * unregistered.
+ * Function: H5FDregister
*
- * Failure: A negative value.
+ * Purpose: Registers a new file driver as a member of the virtual file
+ * driver class. Certain fields of the class struct are
+ * required and that is checked here so it doesn't have to be
+ * checked every time the field is accessed.
*
- * Programmer: Robb Matzke
- * Monday, July 26, 1999
+ * Return: Success: A file driver ID which is good until the
+ * library is closed or the driver is
+ * unregistered.
*
- * Modifications:
- * Copied guts of function into H5FD_register
- * Quincey Koziol
- * Friday, January 30, 2004
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5FDregister(const H5FD_class_t *cls)
{
- hid_t ret_value;
- H5FD_mem_t type;
+ H5FD_mem_t type;
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "*x", cls);
/* Check arguments */
- if(!cls)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "null class pointer is disallowed")
- if(!cls->open || !cls->close)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`open' and/or `close' methods are not defined")
- if(!cls->get_eoa || !cls->set_eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eoa' and/or `set_eoa' methods are not defined")
- if(!cls->get_eof)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eof' method is not defined")
- if(!cls->read || !cls->write)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`read' and/or `write' method is not defined")
- for (type=H5FD_MEM_DEFAULT; type<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,type))
- if(cls->fl_map[type]<H5FD_MEM_NOLIST || cls->fl_map[type]>=H5FD_MEM_NTYPES)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid free-list mapping")
+ if (!cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null class pointer is disallowed")
+ if (!cls->open || !cls->close)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
+ "'open' and/or 'close' methods are not defined")
+ if (!cls->get_eoa || !cls->set_eoa)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
+ "'get_eoa' and/or 'set_eoa' methods are not defined")
+ if (!cls->get_eof)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "'get_eof' method is not defined")
+ if (!cls->read || !cls->write)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
+ "'read' and/or 'write' method is not defined")
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ if (cls->fl_map[type] < H5FD_MEM_NOLIST || cls->fl_map[type] >= H5FD_MEM_NTYPES)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid free-list mapping")
/* Create the new class ID */
- if((ret_value=H5FD_register(cls, sizeof(H5FD_class_t), TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register file driver ID")
+ if ((ret_value = H5FD_register(cls, sizeof(H5FD_class_t), TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDregister() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_register
+ * Function: H5FD_register
*
- * Purpose: Registers a new file driver as a member of the virtual file
- * driver class. Certain fields of the class struct are
- * required and that is checked here so it doesn't have to be
- * checked every time the field is accessed.
+ * Purpose: Registers a new file driver as a member of the virtual file
+ * driver class. Certain fields of the class struct are
+ * required and that is checked here so it doesn't have to be
+ * checked every time the field is accessed.
*
- * Return: Success: A file driver ID which is good until the
- * library is closed or the driver is
- * unregistered.
+ * Return: Success: A file driver ID which is good until the
+ * library is closed or the driver is
+ * unregistered.
*
- * Failure: A negative value.
- *
- * Programmer: Robb Matzke
- * Monday, July 26, 1999
- *
- * Modifications:
- * Broke into public and internal routines & added 'size'
- * parameter to internal routine, which allows us to create
- * sub-classes of H5FD_class_t for internal support (see the
- * MPI drivers, etc.)
- * Quincey Koziol
- * January 30, 2004
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
{
- const H5FD_class_t *cls = (const H5FD_class_t *)_cls;
- H5FD_class_t *saved = NULL;
- H5FD_mem_t type;
- hid_t ret_value;
+ const H5FD_class_t *cls = (const H5FD_class_t *)_cls;
+ H5FD_class_t * saved = NULL;
+ H5FD_mem_t type;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- /* Check arguments */
+ /* Sanity checks */
HDassert(cls);
HDassert(cls->open && cls->close);
HDassert(cls->get_eoa && cls->set_eoa);
HDassert(cls->get_eof);
HDassert(cls->read && cls->write);
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
HDassert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
/* Copy the class structure so the caller can reuse or free it */
- if(NULL == (saved = (H5FD_class_t *)H5MM_malloc(size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for file driver class struct")
+ if (NULL == (saved = (H5FD_class_t *)H5MM_malloc(size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID,
+ "memory allocation failed for file driver class struct")
HDmemcpy(saved, cls, size);
/* Create the new class ID */
- if((ret_value = H5I_register(H5I_VFL, saved, app_ref)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register file driver ID")
+ if ((ret_value = H5I_register(H5I_VFL, saved, app_ref)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID")
done:
- if(ret_value < 0)
- if(saved)
+ if (H5I_INVALID_HID == ret_value)
+ if (saved)
H5MM_xfree(saved);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_register() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDunregister
+ * Function: H5FDunregister
*
- * Purpose: Removes a driver ID from the library. This in no way affects
- * file access property lists which have been defined to use
- * this driver or files which are already opened under this
- * driver.
+ * Purpose: Removes a driver ID from the library. This in no way affects
+ * file access property lists which have been defined to use
+ * this driver or files which are already opened under this
+ * driver.
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Monday, July 26, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDunregister(hid_t driver_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", driver_id);
/* Check arguments */
- if(NULL == H5I_object_verify(driver_id, H5I_VFL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver")
+ if (NULL == H5I_object_verify(driver_id, H5I_VFL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver")
/* The H5FD_class_t struct will be freed by this function */
- if(H5I_dec_app_ref(driver_id) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "unable to unregister file driver")
+ if (H5I_dec_app_ref(driver_id) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "unable to unregister file driver")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDunregister() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_class
- *
- * Purpose: Obtains a pointer to the driver struct containing all the
- * callback pointers, etc. The PLIST_ID argument can be a file
- * access property list, a data transfer property list, or a
- * file driver identifier.
+ * Function: H5FD_get_class
*
- * Return: Success: Ptr to the driver information. The pointer is
- * only valid as long as the driver remains
- * registered or some file or property list
- * exists which references the driver.
+ * Purpose: Obtains a pointer to the driver struct containing all the
+ * callback pointers, etc. The PLIST_ID argument can be a file
+ * access property list, a data transfer property list, or a
+ * file driver identifier.
*
- * Failure: NULL
+ * Return: Success: Ptr to the driver information. The pointer is
+ * only valid as long as the driver remains
+ * registered or some file or property list
+ * exists which references the driver.
*
- * Programmer: Robb Matzke
- * Friday, August 20, 1999
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
H5FD_class_t *
H5FD_get_class(hid_t id)
{
- H5FD_class_t *ret_value = NULL;
+ H5FD_class_t *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
- if(H5I_VFL == H5I_get_type(id))
- ret_value = (H5FD_class_t *)H5I_object(id);
+ if (H5I_VFL == H5I_get_type(id))
+ ret_value = (H5FD_class_t *)H5I_object(id);
else {
- H5P_genplist_t *plist; /* Property list pointer */
- hid_t driver_id = -1;
+ H5P_genplist_t *plist; /* Property list pointer */
+ hid_t driver_id = -1;
/* Get the plist structure */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID")
- if(TRUE == H5P_isa_class(id, H5P_FILE_ACCESS)) {
- if(H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
+ if (TRUE == H5P_isa_class(id, H5P_FILE_ACCESS)) {
+ if (H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID")
ret_value = H5FD_get_class(driver_id);
} /* end if */
@@ -485,121 +431,111 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_class() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_sb_size
- *
- * Purpose: Obtains the number of bytes required to store the driver file
- * access data in the HDF5 superblock.
+ * Function: H5FD_sb_size
*
- * Return: Success: Number of bytes required.
+ * Purpose: Obtains the number of bytes required to store the driver file
+ * access data in the HDF5 superblock.
*
- * Failure: 0 if an error occurs or if the driver has no
- * data to store in the superblock.
+ * Return: Success: Number of bytes required. May be zero if the
+ * driver has no data to store in the superblock.
*
- * Programmer: Robb Matzke
- * Monday, August 16, 1999
- *
- * Modifications:
+ * Failure: This function cannot indicate errors.
*
*-------------------------------------------------------------------------
*/
hsize_t
H5FD_sb_size(H5FD_t *file)
{
- hsize_t ret_value=0;
+ hsize_t ret_value = 0;
FUNC_ENTER_NOAPI(0)
- HDassert(file && file->cls);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
- if(file->cls->sb_size)
- ret_value = (file->cls->sb_size)(file);
+ /* Dispatch to driver */
+ if (file->cls->sb_size)
+ ret_value = (file->cls->sb_size)(file);
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_sb_encode
- *
- * Purpose: Encode driver-specific data into the output arguments. The
- * NAME is a nine-byte buffer which should get an
- * eight-character driver name and/or version followed by a null
- * terminator. The BUF argument is a buffer to receive the
- * encoded driver-specific data. The size of the BUF array is
- * the size returned by the H5FD_sb_size() call.
- *
- * Return: Success: Non-negative
+ * Function: H5FD_sb_encode
*
- * Failure: Negative
+ * Purpose: Encode driver-specific data into the output arguments. The
+ * NAME is a nine-byte buffer which should get an
+ * eight-character driver name and/or version followed by a null
+ * terminator. The BUF argument is a buffer to receive the
+ * encoded driver-specific data. The size of the BUF array is
+ * the size returned by the H5FD_sb_size() call.
*
- * Programmer: Robb Matzke
- * Monday, August 16, 1999
- *
- * Modifications:
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf)
+H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
- if(file->cls->sb_encode &&
- (file->cls->sb_encode)(file, name/*out*/, buf/*out*/) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_encode request failed")
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
+
+ /* Dispatch to driver */
+ if (file->cls->sb_encode && (file->cls->sb_encode)(file, name /*out*/, buf /*out*/) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_encode request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_sb_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_sb_decode
- *
- * Purpose: Decodes the driver information block.
+ * Function: H5FD_sb_decode
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Decodes the driver information block.
*
- * Programmer: Robb Matzke
- * Monday, August 16, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
- if(file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_decode request failed")
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
+
+ /* Dispatch to driver */
+ if (file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_decode request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sb_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_pl_copy
+ * Function: H5FD_pl_copy
*
- * Purpose: Copies the driver-specific part of the a property list.
+ * Purpose: Copies the driver-specific part of the a property list.
* This is common code, used by both the dataset transfer and
* file access property list routines.
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, October 23, 2003
*
* Modifications:
@@ -611,45 +547,46 @@ done:
static herr_t
H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size, const void *old_pl, void **copied_pl)
{
- void *new_pl = NULL; /* Copy of property list */
- herr_t ret_value=SUCCEED; /* Return value */
+ void * new_pl = NULL; /* Copy of property list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Copy old pl, if one exists */
- if(old_pl) {
+ if (old_pl) {
/* Allow the driver to copy or do it ourselves */
- if(copy_func) {
+ if (copy_func) {
new_pl = (copy_func)(old_pl);
- if(new_pl==NULL)
+ if (new_pl == NULL)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, FAIL, "property list copy failed")
- } else if(pl_size>0) {
- if((new_pl = H5MM_malloc(pl_size))==NULL)
+ }
+ else if (pl_size > 0) {
+ if ((new_pl = H5MM_malloc(pl_size)) == NULL)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, FAIL, "property list allocation failed")
HDmemcpy(new_pl, old_pl, pl_size);
- } else
+ }
+ else
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "no way to copy driver property list")
} /* end if */
/* Set copied value */
- *copied_pl=new_pl;
+ *copied_pl = new_pl;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_pl_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_pl_close
+ * Function: H5FD_pl_close
*
- * Purpose: Closes a driver for a property list
+ * Purpose: Closes a driver for a property list
* This is common code, used by both the dataset transfer and
* file access property list routines.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, October 23, 2003
*
*-------------------------------------------------------------------------
@@ -657,80 +594,77 @@ done:
static herr_t
H5FD_pl_close(hid_t driver_id, herr_t (*free_func)(void *), void *pl)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allow driver to free or do it ourselves */
- if(pl && free_func) {
- if((free_func)(pl) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver free request failed")
+ if (pl && free_func) {
+ if ((free_func)(pl) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver free request failed")
} /* end if */
else
- H5MM_xfree(pl);
+ H5MM_xfree(pl);
/* Decrement reference count for driver */
- if(H5I_dec_ref(driver_id) < 0)
+ if (H5I_dec_ref(driver_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't decrement reference count for driver")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_pl_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_fapl_get
+ * Function: H5FD_fapl_get
*
- * Purpose: Gets the file access property list associated with a file.
- * Usually the file will copy what it needs from the original
- * file access property list when the file is created. The
- * purpose of this function is to create a new file access
- * property list based on the settings in the file, which may
- * have been modified from the original file access property
- * list.
+ * Purpose: Gets the file access property list associated with a file.
+ * Usually the file will copy what it needs from the original
+ * file access property list when the file is created. The
+ * purpose of this function is to create a new file access
+ * property list based on the settings in the file, which may
+ * have been modified from the original file access property
+ * list.
*
- * Return: Success: Pointer to a new file access property list
- * with all members copied. If the file is
- * closed then this property list lives on, and
- * vice versa.
+ * Return: Success: Pointer to a new file access property list
+ * with all members copied. If the file is
+ * closed then this property list lives on, and
+ * vice versa.
*
- * Failure: NULL, including when the file has no
- * properties.
+ * This can be NULL if the file has no properties.
*
- * Programmer: Robb Matzke
- * Friday, August 13, 1999
- *
- * Modifications:
+ * Failure: This function cannot indicate errors.
*
*-------------------------------------------------------------------------
*/
void *
H5FD_fapl_get(H5FD_t *file)
{
- void *ret_value=NULL;
+ void *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
+ /* Sanity checks */
HDassert(file);
+ HDassert(file->cls);
- if(file->cls->fapl_get)
- ret_value = (file->cls->fapl_get)(file);
+ /* Dispatch to driver */
+ if (file->cls->fapl_get)
+ ret_value = (file->cls->fapl_get)(file);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_fapl_get() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_fapl_open
+ * Function: H5FD_fapl_open
*
- * Purpose: Mark a driver as used by a file access property list
+ * Purpose: Mark a driver as used by a file access property list
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, October 23, 2003
*
* Modifications:
@@ -740,44 +674,43 @@ done:
herr_t
H5FD_fapl_open(H5P_genplist_t *plist, hid_t driver_id, const void *driver_info)
{
- void *copied_driver_info = NULL; /* Temporary VFL driver info */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * copied_driver_info = NULL; /* Temporary VFL driver info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Increment the reference count on driver and copy driver info */
- if(H5I_inc_ref(driver_id, FALSE) < 0)
+ if (H5I_inc_ref(driver_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver")
- if(H5FD_fapl_copy(driver_id, driver_info, &copied_driver_info) < 0)
+ if (H5FD_fapl_copy(driver_id, driver_info, &copied_driver_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "can't copy VFL driver info")
/* Set the driver properties for the list */
- if(H5P_set(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
+ if (H5P_set(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set driver ID")
- if(H5P_set(plist, H5F_ACS_FILE_DRV_INFO_NAME, &copied_driver_info) < 0)
+ if (H5P_set(plist, H5F_ACS_FILE_DRV_INFO_NAME, &copied_driver_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set driver info")
copied_driver_info = NULL;
done:
- if(ret_value < 0)
- if(copied_driver_info && H5FD_fapl_close(driver_id, copied_driver_info) < 0)
+ if (ret_value < 0)
+ if (copied_driver_info && H5FD_fapl_close(driver_id, copied_driver_info) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close copy of driver info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_fapl_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_fapl_copy
+ * Function: H5FD_fapl_copy
*
- * Purpose: Copies the driver-specific part of the file access property
- * list.
+ * Purpose: Copies the driver-specific part of the file access property
+ * list.
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, August 3, 1999
*
*-------------------------------------------------------------------------
@@ -786,32 +719,31 @@ static herr_t
H5FD_fapl_copy(hid_t driver_id, const void *old_fapl, void **copied_fapl)
{
H5FD_class_t *driver;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- if(NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID")
+ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID")
/* Copy the file access property list */
- if(H5FD_pl_copy(driver->fapl_copy, driver->fapl_size, old_fapl, copied_fapl) < 0)
+ if (H5FD_pl_copy(driver->fapl_copy, driver->fapl_size, old_fapl, copied_fapl) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "can't copy driver file access property list")
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_fapl_close
+ * Function: H5FD_fapl_close
*
- * Purpose: Closes a driver for a dataset transfer property list
+ * Purpose: Closes a driver for a dataset transfer property list
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, August 3, 1999
*
* Modifications:
@@ -821,18 +753,18 @@ done:
herr_t
H5FD_fapl_close(hid_t driver_id, void *fapl)
{
- H5FD_class_t *driver = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_class_t *driver = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- if(driver_id > 0) {
- if(NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
+ if (driver_id > 0) {
+ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID")
/* Close the driver for the property list */
- if(H5FD_pl_close(driver_id, driver->fapl_free, fapl) < 0)
+ if (H5FD_pl_close(driver_id, driver->fapl_free, fapl) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver fapl_free request failed")
} /* end if */
@@ -840,176 +772,159 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_fapl_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDopen
- *
- * Purpose: Opens a file named NAME for the type(s) of access described
- * by the bit vector FLAGS according to a file access property
- * list FAPL_ID (which may be the constant H5P_DEFAULT). The
- * file should expect to handle format addresses in the range [0,
- * MAXADDR] (if MAXADDR is the undefined address then the caller
- * doesn't care about the address range).
+ * Function: H5FDopen
*
- * Possible values for the FLAGS bits are:
+ * Purpose: Opens a file named NAME for the type(s) of access described
+ * by the bit vector FLAGS according to a file access property
+ * list FAPL_ID (which may be the constant H5P_DEFAULT). The
+ * file should expect to handle format addresses in the range [0,
+ * MAXADDR] (if MAXADDR is the undefined address then the caller
+ * doesn't care about the address range).
*
- * H5F_ACC_RDWR: Open the file for read and write access. If
- * this bit is not set then open the file for
- * read only access. It is permissible to open a
- * file for read and write access when only read
- * access is requested by the library (the
- * library will never attempt to write to a file
- * which it opened with only read access).
+ * Possible values for the FLAGS bits are:
*
- * H5F_ACC_CREATE: Create the file if it doesn't already exist.
- * However, see H5F_ACC_EXCL below.
+ * H5F_ACC_RDWR: Open the file for read and write access. If
+ * this bit is not set then open the file for
+ * read only access. It is permissible to open a
+ * file for read and write access when only read
+ * access is requested by the library (the
+ * library will never attempt to write to a file
+ * which it opened with only read access).
*
- * H5F_ACC_TRUNC: Truncate the file if it already exists. This
- * is equivalent to deleting the file and then
- * creating a new empty file.
+ * H5F_ACC_CREATE: Create the file if it doesn't already exist.
+ * However, see H5F_ACC_EXCL below.
*
- * H5F_ACC_EXCL: When used with H5F_ACC_CREATE, if the file
- * already exists then the open should fail.
- * Note that this is unsupported/broken with
- * some file drivers (e.g., sec2 across nfs) and
- * will contain a race condition when used to
- * perform file locking.
+ * H5F_ACC_TRUNC: Truncate the file if it already exists. This
+ * is equivalent to deleting the file and then
+ * creating a new empty file.
*
- * The MAXADDR is the maximum address which will be requested by
- * the library during an allocation operation. Usually this is
- * the same value as the MAXADDR field of the class structure,
- * but it can be smaller if the driver is being used under some
- * other driver.
+ * H5F_ACC_EXCL: When used with H5F_ACC_CREATE, if the file
+ * already exists then the open should fail.
+ * Note that this is unsupported/broken with
+ * some file drivers (e.g., sec2 across nfs) and
+ * will contain a race condition when used to
+ * perform file locking.
*
- * Note that when the driver `open' callback gets control that
- * the public part of the file struct (the H5FD_t part) will be
- * incomplete and will be filled in after that callback returns.
+ * The MAXADDR is the maximum address which will be requested by
+ * the library during an allocation operation. Usually this is
+ * the same value as the MAXADDR field of the class structure,
+ * but it can be smaller if the driver is being used under some
+ * other driver.
*
- * Return: Success: Pointer to a new file driver struct.
+ * Note that when the driver 'open' callback gets control that
+ * the public part of the file struct (the H5FD_t part) will be
+ * incomplete and will be filled in after that callback returns.
*
- * Failure: NULL
+ * Return: Success: Pointer to a new file driver struct.
*
- * Programmer: Robb Matzke
- * Tuesday, July 27, 1999
- *
- * Modifications:
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
H5FD_t *
H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_t *ret_value=NULL;
+ H5FD_t *ret_value = NULL;
FUNC_ENTER_API(NULL)
H5TRACE4("*x", "*sIuia", name, flags, fapl_id, maxaddr);
/* Check arguments */
- if(H5P_DEFAULT == fapl_id)
+ if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
+ else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL==(ret_value=H5FD_open(name, flags, fapl_id, maxaddr)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to open file")
+ /* Call private function */
+ if (NULL == (ret_value = H5FD_open(name, flags, fapl_id, maxaddr)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to open file")
done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_open
- *
- * Purpose: Private version of H5FDopen()
+ * Function: H5FD_open
*
- * Return: Success: Pointer to a new file driver struct
+ * Purpose: Private version of H5FDopen()
*
- * Failure: NULL
+ * Return: Success: Pointer to a new file driver struct
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
- *
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
H5FD_t *
H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_class_t *driver; /* VFD for file */
- H5FD_t *file = NULL; /* VFD file struct */
- hid_t driver_id = -1; /* VFD ID */
- H5P_genplist_t *plist; /* Property list pointer */
- unsigned long driver_flags = 0; /* File-inspecific driver feature flags */
- H5FD_file_image_info_t file_image_info; /* Initial file image */
- H5FD_t *ret_value; /* Return value */
+ H5FD_class_t * driver; /* VFD for file */
+ H5FD_t * file = NULL; /* VFD file struct */
+ hid_t driver_id = -1; /* VFD ID */
+ H5P_genplist_t * plist; /* Property list pointer */
+ unsigned long driver_flags = 0; /* File-inspecific driver feature flags */
+ H5FD_file_image_info_t file_image_info; /* Initial file image */
+ H5FD_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
- /* Sanity check */
- if(0 == maxaddr)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "zero format address range")
+ /* Sanity checks */
+ if (0 == maxaddr)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "zero format address range")
/* Get file access property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
/* Get the VFD to open the file with */
- if(H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
+ if (H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &driver_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID")
/* Get driver info */
- if(NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
- HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid driver ID in file access property list")
- if(NULL == driver->open)
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `open' method")
+ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
+ HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid driver ID in file access property list")
+ if (NULL == driver->open)
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `open' method")
/* Query driver flag */
H5FD_driver_query(driver, &driver_flags);
/* Get initial file image info */
- if(H5P_get(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
+ if (H5P_get(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file image info")
/* If an image is provided, make sure the driver supports this feature */
HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
- if((file_image_info.buffer != NULL) && !(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE))
+ if ((file_image_info.buffer != NULL) && !(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE))
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file image set, but not supported.")
/* Dispatch to file driver */
- if(HADDR_UNDEF == maxaddr)
+ if (HADDR_UNDEF == maxaddr)
maxaddr = driver->maxaddr;
- if(NULL == (file = (driver->open)(name, flags, fapl_id, maxaddr)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "open failed")
+ if (NULL == (file = (driver->open)(name, flags, fapl_id, maxaddr)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "open failed")
/*
* Fill in public fields. We must increment the reference count on the
* driver ID to prevent it from being freed while this file is open.
*/
file->driver_id = driver_id;
- if(H5I_inc_ref(file->driver_id, FALSE) < 0)
+ if (H5I_inc_ref(file->driver_id, FALSE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver")
- file->cls = driver;
+ file->cls = driver;
file->maxaddr = maxaddr;
- if(H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(file->threshold)) < 0)
+ if (H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(file->threshold)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold")
- if(H5P_get(plist, H5F_ACS_ALIGN_NAME, &(file->alignment)) < 0)
+ if (H5P_get(plist, H5F_ACS_ALIGN_NAME, &(file->alignment)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment")
/* Retrieve the VFL driver feature flags */
- if(H5FD_query(file, &(file->feature_flags)) < 0)
+ if (H5FD_query(file, &(file->feature_flags)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to query file driver")
/* Increment the global serial number & assign it to this H5FD_t object */
- if(++H5FD_file_serial_no_g == 0) {
+ if (++H5FD_file_serial_no_g == 0) {
/* (Just error out if we wrap around for now...) */
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to get file serial number")
} /* end if */
@@ -1027,53 +942,47 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDclose
- *
- * Purpose: Closes the file by calling the driver `close' callback, which
- * should free all driver-private data and free the file struct.
- * Note that the public part of the file struct (the H5FD_t part)
- * will be all zero during the driver close callback like during
- * the `open' callback.
+ * Function: H5FDclose
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Closes the file by calling the driver 'close' callback, which
+ * should free all driver-private data and free the file struct.
+ * Note that the public part of the file struct (the H5FD_t part)
+ * will be all zero during the driver close callback like during
+ * the 'open' callback.
*
- * Programmer: Robb Matzke
- * Tuesday, July 27, 1999
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDclose(H5FD_t *file)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", file);
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
- if(H5FD_close(file) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
+ /* Call private function */
+ if (H5FD_close(file) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDclose() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_close
- *
- * Purpose: Private version of H5FDclose()
+ * Function: H5FD_close
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Private version of H5FDclose()
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -1085,204 +994,192 @@ H5FD_close(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
- /* check args */
- HDassert(file && file->cls);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
/* Prepare to close file by clearing all public fields */
driver = file->cls;
- if(H5I_dec_ref(file->driver_id) < 0)
+ if (H5I_dec_ref(file->driver_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
- /*
- * Dispatch to the driver for actual close. If the driver fails to
+ /* Dispatch to the driver for actual close. If the driver fails to
* close the file then the file will be in an unusable state.
*/
HDassert(driver->close);
- if((driver->close)(file) < 0)
+ if ((driver->close)(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDcmp
+ * Function: H5FDcmp
*
- * Purpose: Compare the keys of two files using the file driver callback
- * if the files belong to the same driver, otherwise sort the
- * files by driver class pointer value.
+ * Purpose: Compare the keys of two files using the file driver callback
+ * if the files belong to the same driver, otherwise sort the
+ * files by driver class pointer value.
*
- * Return: Success: A value like strcmp()
+ * Return: Success: A value like strcmp()
*
- * Failure: Must never fail. If both file handles are
- * invalid then they compare equal. If one file
- * handle is invalid then it compares less than
- * the other. If both files belong to the same
- * driver and the driver doesn't provide a
- * comparison callback then the file pointers
- * themselves are compared.
- *
- * Programmer: Robb Matzke
- * Tuesday, July 27, 1999
- *
- * Modifications:
+ * Failure: Must never fail. If both file handles are
+ * invalid then they compare equal. If one file
+ * handle is invalid then it compares less than
+ * the other. If both files belong to the same
+ * driver and the driver doesn't provide a
+ * comparison callback then the file pointers
+ * themselves are compared.
*
*-------------------------------------------------------------------------
*/
int
H5FDcmp(const H5FD_t *f1, const H5FD_t *f2)
{
- int ret_value;
+ int ret_value = -1;
- FUNC_ENTER_API(-1) /*return value is arbitrary*/
+ FUNC_ENTER_API(-1) /* return value is arbitrary */
H5TRACE2("Is", "*x*x", f1, f2);
+ /* Call private function */
ret_value = H5FD_cmp(f1, f2);
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5FDcmp() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_cmp
- *
- * Purpose: Private version of H5FDcmp()
- *
- * Return: Success: A value like strcmp()
+ * Function: H5FD_cmp
*
- * Failure: Must never fail.
+ * Purpose: Private version of H5FDcmp()
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: Success: A value like strcmp()
*
- * Modifications:
+ * Failure: Must never fail.
*
*-------------------------------------------------------------------------
*/
int
H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2)
{
- int ret_value;
+ int ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI(-1) /*return value is arbitrary*/
+ FUNC_ENTER_NOAPI(-1) /* return value is arbitrary */
- if((!f1 || !f1->cls) && (!f2 || !f2->cls))
+ if ((!f1 || !f1->cls) && (!f2 || !f2->cls))
HGOTO_DONE(0)
- if(!f1 || !f1->cls)
+ if (!f1 || !f1->cls)
HGOTO_DONE(-1)
- if(!f2 || !f2->cls)
+ if (!f2 || !f2->cls)
HGOTO_DONE(1)
- if(f1->cls < f2->cls)
+ if (f1->cls < f2->cls)
HGOTO_DONE(-1)
- if(f1->cls > f2->cls)
+ if (f1->cls > f2->cls)
HGOTO_DONE(1)
/* Files are same driver; no cmp callback */
- if(!f1->cls->cmp) {
- if(f1<f2)
+ if (!f1->cls->cmp) {
+ if (f1 < f2)
HGOTO_DONE(-1)
- if(f1>f2)
+ if (f1 > f2)
HGOTO_DONE(1)
- HGOTO_DONE(0)
+ HGOTO_DONE(0)
}
+ /* Dispatch to driver */
ret_value = (f1->cls->cmp)(f1, f2);
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_cmp() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDquery
+ * Function: H5FDquery
*
- * Purpose: Query a VFL driver for its feature flags. (listed in H5FDpublic.h)
+ * Purpose: Query a VFL driver for its feature flags. (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- *
- * Failure: negative
- *
- * Programmer: Quincey Koziol
- * Friday, August 25, 2000
- *
- * Modifications:
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
-H5FDquery(const H5FD_t *f, unsigned long *flags/*out*/)
+H5FDquery(const H5FD_t *file, unsigned long *flags /*out*/)
{
- int ret_value;
+ int ret_value = 0;
- FUNC_ENTER_API(FAIL)
- H5TRACE2("Is", "*xx", f, flags);
+ FUNC_ENTER_API((-1))
+ H5TRACE2("Is", "*xx", file, flags);
- HDassert(f);
- HDassert(flags);
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file class pointer cannot be NULL")
+ if (!flags)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "flags parameter cannot be NULL")
- ret_value = H5FD_query(f, flags);
+ /* Call private function */
+ if (H5FD_query(file, flags) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "unable to query feature flags")
done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_query
- *
- * Purpose: Private version of H5FDquery()
- *
- * Return: Success: non-negative
+ * Function: H5FD_query
*
- * Failure: negative
+ * Purpose: Private version of H5FDquery()
*
- * Programmer: Quincey Koziol
- * Friday, August 25, 2000
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static int
-H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/)
+H5FD_query(const H5FD_t *file, unsigned long *flags /*out*/)
{
- int ret_value = 0; /* Return value */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
HDassert(flags);
- /* Check for query driver and call it */
- if(f->cls->query)
- ret_value = (f->cls->query)(f, flags);
+ /* Dispatch to driver (if available) */
+ if (file->cls->query) {
+ if ((file->cls->query)(file, flags) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to query feature flags")
+ }
else
- *flags=0;
+ *flags = 0;
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_query() */
-
/*-------------------------------------------------------------------------
-* Function: H5FD_driver_query
-*
-* Purpose: Similar to H5FD_query(), but intended for cases when we don't
-* have a file available (e.g. before one is opened). Since we
-* can't use the file to get the driver, the driver is passed in
-* as a parameter.
-*
-* Return: Success: non-negative
-* Failure: negative
-*
-* Programmer: Jacob Gruber
-* Wednesday, August 17, 2011
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5FD_driver_query
+ *
+ * Purpose: Similar to H5FD_query(), but intended for cases when we don't
+ * have a file available (e.g. before one is opened). Since we
+ * can't use the file to get the driver, the driver is passed in
+ * as a parameter.
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Jacob Gruber
+ * Wednesday, August 17, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
static int
-H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/)
+H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/)
{
- int ret_value = 0; /* Return value */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1290,78 +1187,75 @@ H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/)
HDassert(flags);
/* Check for the driver to query and then query it */
- if(driver->query)
+ if (driver->query)
ret_value = (driver->query)(NULL, flags);
- else
+ else
*flags = 0;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_driver_query() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDalloc
+ * Function: H5FDalloc
*
- * Purpose: Allocates SIZE bytes of memory from the FILE. The memory will
- * be used according to the allocation class TYPE. First we try
- * to satisfy the request from one of the free lists, according
- * to the free list map provided by the driver. The free list
- * array has one entry for each request type and the value of
- * that array element can be one of four possibilities:
+ * Purpose: Allocates SIZE bytes of memory from the FILE. The memory will
+ * be used according to the allocation class TYPE. First we try
+ * to satisfy the request from one of the free lists, according
+ * to the free list map provided by the driver. The free list
+ * array has one entry for each request type and the value of
+ * that array element can be one of four possibilities:
*
- * It can be the constant H5FD_MEM_DEFAULT (or zero) which
- * indicates that the identity mapping is used. In other
- * words, the request type maps to its own free list.
+ * It can be the constant H5FD_MEM_DEFAULT (or zero) which
+ * indicates that the identity mapping is used. In other
+ * words, the request type maps to its own free list.
*
- * It can be the request type itself, which has the same
- * effect as the H5FD_MEM_DEFAULT value above.
+ * It can be the request type itself, which has the same
+ * effect as the H5FD_MEM_DEFAULT value above.
*
- * It can be the ID for another request type, which
- * indicates that the free list for the specified type
- * should be used instead.
+ * It can be the ID for another request type, which
+ * indicates that the free list for the specified type
+ * should be used instead.
*
- * It can be the constant H5FD_MEM_NOLIST which means that
- * no free list should be used for this type of request.
+ * It can be the constant H5FD_MEM_NOLIST which means that
+ * no free list should be used for this type of request.
*
- * If the request cannot be satisfied from a free list then
- * either the driver's `alloc' callback is invoked (if one was
- * supplied) or the end-of-address marker is extended. The
- * `alloc' callback is always called with the same arguments as
- * the H5FDalloc().
+ * If the request cannot be satisfied from a free list then
+ * either the driver's 'alloc' callback is invoked (if one was
+ * supplied) or the end-of-address marker is extended. The
+ * 'alloc' callback is always called with the same arguments as
+ * the H5FDalloc().
*
- * Return: Success: The format address of the new file memory.
+ * Return: Success: The format address of the new file memory.
*
- * Failure: The undefined address HADDR_UNDEF
- *
- * Programmer: Robb Matzke
- * Tuesday, July 27, 1999
+ * Failure: The undefined address HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
- haddr_t ret_value = HADDR_UNDEF;
+ haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE4("a", "*xMtih", file, type, dxpl_id, size);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer")
- if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid request type")
- if(size == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "zero-size request")
- if(H5P_DEFAULT == dxpl_id)
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL")
+ if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid request type")
+ if (size == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "zero-size request")
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a data transfer property list")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a data transfer property list")
- /* Do the real work */
- if(HADDR_UNDEF == (ret_value = H5FD_alloc_real(file, dxpl_id, type, size, NULL, NULL)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file memory")
+ /* Call private function */
+ if (HADDR_UNDEF == (ret_value = H5FD_alloc_real(file, dxpl_id, type, size, NULL, NULL)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file memory")
/* (Note compensating for base address subtraction in internal routine) */
ret_value += file->base_addr;
@@ -1370,88 +1264,79 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDalloc() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDfree
- *
- * Purpose: Frees format addresses starting with ADDR and continuing for
- * SIZE bytes in the file FILE. The type of space being freed is
- * specified by TYPE, which is mapped to a free list as
- * described for the H5FDalloc() function above. If the request
- * doesn't map to a free list then either the application `free'
- * callback is invoked (if defined) or the memory is leaked.
+ * Function: H5FDfree
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Purpose: Frees format addresses starting with ADDR and continuing for
+ * SIZE bytes in the file FILE. The type of space being freed is
+ * specified by TYPE, which is mapped to a free list as
+ * described for the H5FDalloc() function above. If the request
+ * doesn't map to a free list then either the application 'free'
+ * callback is invoked (if defined) or the memory is leaked.
*
- * Programmer: Robb Matzke
- * Wednesday, July 28, 1999
- *
- * Modifications:
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xMtiah", file, type, dxpl_id, addr, size);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
- if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request type")
- if(H5P_DEFAULT == dxpl_id)
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
- /* Do the real work */
+ /* Call private function */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_free_real(file, dxpl_id, type, addr - file->base_addr, size) < 0)
+ if (H5FD_free_real(file, dxpl_id, type, addr - file->base_addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "file deallocation request failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDfree() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDget_eoa
- *
- * Purpose: Returns the address of the first byte after the last
- * allocated memory in the file.
+ * Function: H5FDget_eoa
*
- * Return: Success: First byte after allocated memory.
- * Failure: HADDR_UNDEF
+ * Purpose: Returns the address of the first byte after the last
+ * allocated memory in the file.
*
- * Programmer: Robb Matzke
- * Friday, July 30, 1999
+ * Return: Success: First byte after allocated memory.
+ * Failure: HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FDget_eoa(H5FD_t *file, H5FD_mem_t type)
{
- haddr_t ret_value;
+ haddr_t ret_value;
FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE2("a", "*xMt", file, type);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer")
- if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type")
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL")
+ if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type")
- /* The real work */
- if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(file, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed")
+ /* Call private function */
+ if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(file, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed")
/* (Note compensating for base address subtraction in internal routine) */
ret_value += file->base_addr;
@@ -1460,7 +1345,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDget_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FDset_eoa
*
@@ -1480,78 +1364,73 @@ done:
* Return: Success: Non-negative
* Failure: Negative, no side effect
*
- * Programmer: Robb Matzke
- * Friday, July 30, 1999
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xMta", file, type, addr);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
- if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type")
- if(!H5F_addr_defined(addr) || addr > file->maxaddr)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value")
-
- /* The real work */
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type")
+ if (!H5F_addr_defined(addr) || addr > file->maxaddr)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value")
+
+ /* Call private function */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_set_eoa(file, type, addr - file->base_addr) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed")
+ if (H5FD_set_eoa(file, type, addr - file->base_addr) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDset_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDget_eof
- *
- * Purpose: Returns the end-of-file address, which is the greater of the
- * end-of-format address and the actual EOF marker. This
- * function is called after an existing file is opened in order
- * for the library to learn the true size of the underlying file
- * and to determine whether the hdf5 data has been truncated.
+ * Function: H5FDget_eof
*
- * It is also used when a file is first opened to learn whether
- * the file is empty or not.
+ * Purpose: Returns the end-of-file address, which is the greater of the
+ * end-of-format address and the actual EOF marker. This
+ * function is called after an existing file is opened in order
+ * for the library to learn the true size of the underlying file
+ * and to determine whether the hdf5 data has been truncated.
*
- * It is permissible for the driver to return the maximum address
- * for the file size if the file is not empty.
+ * It is also used when a file is first opened to learn whether
+ * the file is empty or not.
*
- * Return: Success: The EOF address.
+ * It is permissible for the driver to return the maximum address
+ * for the file size if the file is not empty.
*
- * Failure: HADDR_UNDEF
+ * Return: Success: The EOF address.
*
- * Programmer: Robb Matzke
- * Thursday, July 29, 1999
- *
- * Modifications:
+ * Failure: HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FDget_eof(H5FD_t *file)
{
- haddr_t ret_value;
+ haddr_t ret_value;
FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE1("a", "*x", file);
/* Check arguments */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer")
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL")
- /* The real work */
- if(HADDR_UNDEF == (ret_value = H5FD_get_eof(file)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed")
+ /* Call private function */
+ if (HADDR_UNDEF == (ret_value = H5FD_get_eof(file)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed")
/* (Note compensating for base address subtraction in internal routine) */
ret_value += file->base_addr;
@@ -1560,27 +1439,24 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDget_eof() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_maxaddr
- *
- * Purpose: Private version of H5FDget_eof()
+ * Function: H5FD_get_maxaddr
*
- * Return: Success: The maximum address allowed in the file.
- * Failure: HADDR_UNDEF
+ * Purpose: Private version of H5FDget_eof()
*
- * Programmer: Quincey Koziol
- * Thursday, January 3, 2008
+ * Return: Success: The maximum address allowed in the file.
+ * Failure: HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FD_get_maxaddr(const H5FD_t *file)
{
- haddr_t ret_value; /* Return value */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
+ /* Sanity checks */
HDassert(file);
/* Set return value */
@@ -1590,17 +1466,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_maxaddr() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_feature_flags
+ * Function: H5FD_get_feature_flags
*
- * Purpose: Retrieve the feature flags for the VFD
+ * Purpose: Retrieve the feature flags for the VFD
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Tuesday, January 8, 2008
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -1609,6 +1480,7 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
HDassert(feature_flags);
@@ -1618,35 +1490,31 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_get_feature_flags() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_fs_type_map
- *
- * Purpose: Retrieve the free space type mapping for the VFD
+ * Function: H5FD_get_fs_type_map
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Retrieve the free space type mapping for the VFD
*
- * Programmer: Quincey Koziol
- * Thursday, January 17, 2008
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /* Sanity check */
- HDassert(file && file->cls);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
HDassert(type_map);
/* Check for VFD class providing a type map retrieval rouine */
- if(file->cls->get_type_map) {
+ if (file->cls->get_type_map) {
/* Retrieve type mapping for this file */
- if((file->cls->get_type_map)(file, type_map) < 0)
+ if ((file->cls->get_type_map)(file, type_map) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get type map failed")
} /* end if */
else
@@ -1657,271 +1525,243 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_fs_type_map() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDread
- *
- * Purpose: Reads SIZE bytes from FILE beginning at address ADDR
- * according to the data transfer property list DXPL_ID (which may
- * be the constant H5P_DEFAULT). The result is written into the
- * buffer BUF.
+ * Function: H5FDread
*
- * Return: Success: Non-negative. The read result is written into
- * the BUF buffer which should be allocated by
- * the caller.
+ * Purpose: Reads SIZE bytes from FILE beginning at address ADDR
+ * according to the data transfer property list DXPL_ID (which may
+ * be the constant H5P_DEFAULT). The result is written into the
+ * buffer BUF.
*
- * Failure: Negative. The contents of BUF is undefined.
+ * Return: Success: Non-negative
+ * The read result is written into the BUF buffer
+ * which should be allocated by the caller.
*
- * Programmer: Robb Matzke
- * Thursday, July 29, 1999
+ * Failure: Negative
+ * The contents of BUF are undefined.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf /*out*/)
{
- H5P_genplist_t *dxpl; /* DXPL object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiazx", file, type, dxpl_id, addr, size, buf);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (!buf)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL")
/* Get the default dataset transfer property list if the user didn't provide one */
- if(H5P_DEFAULT == dxpl_id)
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
- if(!buf)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
/* Get the DXPL plist object for DXPL ID */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
- /* Do the real work */
+ /* Call private function */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_read(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed")
+ if (H5FD_read(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDread() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDwrite
- *
- * Purpose: Writes SIZE bytes to FILE beginning at address ADDR according
- * to the data transfer property list DXPL_ID (which may be the
- * constant H5P_DEFAULT). The bytes to be written come from the
- * buffer BUF.
- *
- * Return: Success: Non-negative
+ * Function: H5FDwrite
*
- * Failure: Negative
+ * Purpose: Writes SIZE bytes to FILE beginning at address ADDR according
+ * to the data transfer property list DXPL_ID (which may be the
+ * constant H5P_DEFAULT). The bytes to be written come from the
+ * buffer BUF.
*
- * Programmer: Robb Matzke
- * Thursday, July 29, 1999
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- const void *buf)
+H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf)
{
- H5P_genplist_t *dxpl; /* DXPL object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiaz*x", file, type, dxpl_id, addr, size, buf);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (!buf)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL")
+
/* Get the default dataset transfer property list if the user didn't provide one */
- if(H5P_DEFAULT == dxpl_id)
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
- if(!buf)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
/* Get the DXPL plist object for DXPL ID */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
- /* The real work */
+ /* Call private function */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_write(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed")
+ if (H5FD_write(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5FDwrite() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDflush
- *
- * Purpose: Notify driver to flush all cached data. If the driver has no
- * flush method then nothing happens.
- *
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Function: H5FDflush
*
- * Programmer: Robb Matzke
- * Thursday, July 29, 1999
+ * Purpose: Notify driver to flush all cached data. If the driver has no
+ * flush method then nothing happens.
*
- * Modifications:
- * Quincey Koziol, May 20, 2002
- * Added 'closing' parameter
+ * Return: Non-negative on success/Negative on failureL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDflush(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xiIu", file, dxpl_id, closing);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
- if(H5P_DEFAULT == dxpl_id)
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
/* Do the real work */
- if(H5FD_flush(file, dxpl_id, closing) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "file flush request failed")
+ if (H5FD_flush(file, dxpl_id, closing) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "file flush request failed")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5FDflush() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_flush
+ * Function: H5FD_flush
*
- * Purpose: Private version of H5FDflush()
+ * Purpose: Private version of H5FDflush()
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_flush(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
- if(file->cls->flush && (file->cls->flush)(file, dxpl_id, closing) < 0)
+ /* Dispatch to driver */
+ if (file->cls->flush && (file->cls->flush)(file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver flush request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_flush() */
-
/*-------------------------------------------------------------------------
- * Function: H5FDtruncate
- *
- * Purpose: Notify driver to truncate the file back to the allocated size.
+ * Function: H5FDtruncate
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Notify driver to truncate the file back to the allocated size.
*
- * Programmer: Quincey Koziol
- * Thursday, January 31, 2008
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xib", file, dxpl_id, closing);
- /* Check args */
- if(!file || !file->cls)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer")
- if(H5P_DEFAULT == dxpl_id)
+ /* Check arguments */
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
+ else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
- /* Do the real work */
- if(H5FD_truncate(file, dxpl_id, closing) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "file flush request failed")
+ /* Call private function */
+ if (H5FD_truncate(file, dxpl_id, closing) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "file flush request failed")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5FDtruncate() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_truncate
+ * Function: H5FD_truncate
*
- * Purpose: Private version of H5FDtruncate()
+ * Purpose: Private version of H5FDtruncate()
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Thursday, January 31, 2008
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_truncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
+ /* Sanity checks */
+ HDassert(file);
+ HDassert(file->cls);
- if(file->cls->truncate && (file->cls->truncate)(file, dxpl_id, closing) < 0)
+ /* Dispatch to driver */
+ if (file->cls->truncate && (file->cls->truncate)(file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "driver truncate request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_truncate() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_fileno
+ * Function: H5FD_get_fileno
*
- * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value
- * (Mainly added to stop non-file routines from poking about in the
- * H5FD_t data structure)
+ * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5FD_t data structure)
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * March 27, 2002
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -1930,6 +1770,7 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
HDassert(filenum);
@@ -1939,83 +1780,80 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_get_fileno() */
-
/*--------------------------------------------------------------------------
* Function: H5FDget_vfd_handle
*
* Purpose: Returns a pointer to the file handle of low-level virtual
* file driver.
*
- * Return: Non-negative if succeed; negative otherwise.
- *
- * Programmer: Raymond Lu
- * Sep. 16, 2002
- *
- * Modifications:
+ * Return: Non-negative on success/Negative on failure
*
*--------------------------------------------------------------------------
*/
herr_t
-H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle)
+H5FDget_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
{
- herr_t ret_value;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "*xi**x", file, fapl, file_handle);
+ H5TRACE3("e", "*xi**x", file, fapl_id, file_handle);
/* Check arguments */
- HDassert(file);
- HDassert(file_handle);
-
- ret_value = H5FD_get_vfd_handle(file, fapl, file_handle);
+ if (!file)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL")
+ if (!file->cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL")
+ if (!file_handle)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle parameter cannot be NULL")
+
+ /* Call private function */
+ if (H5FD_get_vfd_handle(file, fapl_id, file_handle) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")
done:
+ if (FAIL == ret_value)
+ *file_handle = NULL;
+
FUNC_LEAVE_API(ret_value)
} /* end H5FDget_vfd_handle() */
-
/*--------------------------------------------------------------------------
* Function: H5FD_get_vfd_handle
*
- * Purpose: Retrieve the file handle for file driver.
- *
- * Return: Non-negative if succeed; negative if fails.
+ * Purpose: Private version of H5FDget_vfd_handle()
*
- * Programmer: Raymond Lu
- * Sep. 16, 2002
+ * Return: SUCCEED/FAIL
*
*--------------------------------------------------------------------------
*/
herr_t
-H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle)
+H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
- /* Sanity check */
+ /* Sanity checks */
HDassert(file);
+ HDassert(file->cls);
HDassert(file_handle);
- if(NULL == file->cls->get_handle)
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no `get_vfd_handle' method")
- if((file->cls->get_handle)(file, fapl, file_handle) < 0)
+ /* Dispatch to driver */
+ if (NULL == file->cls->get_handle)
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no `get_vfd_handle' method")
+ if ((file->cls->get_handle)(file, fapl_id, file_handle) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_vfd_handle() */
-
/*--------------------------------------------------------------------------
* Function: H5FD_set_base_addr
*
* Purpose: Set the base address for the file
*
- * Return: Non-negative if succeed; negative if fails.
- *
- * Programmer: Quincey Koziol
- * Jan. 17, 2008
+ * Return: SUCCEED (Can't fail)
*
*--------------------------------------------------------------------------
*/
@@ -2024,6 +1862,7 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
HDassert(H5F_addr_defined(base_addr));
@@ -2033,17 +1872,13 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_set_base_addr() */
-
/*--------------------------------------------------------------------------
* Function: H5FD_get_base_addr
*
* Purpose: Get the base address for the file
*
- * Return: Success: The absolute base address of the file
- * Failure: The undefined address (HADDR_UNDEF)
- *
- * Programmer: Quincey Koziol
- * Sept. 10, 2009
+ * Return: Success: The absolute base address of the file
+ * (Can't fail)
*
*--------------------------------------------------------------------------
*/
@@ -2052,9 +1887,44 @@ H5FD_get_base_addr(const H5FD_t *file)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
/* Return the file's base address */
FUNC_LEAVE_NOAPI(file->base_addr)
} /* end H5FD_get_base_addr() */
+/*-------------------------------------------------------------------------
+ * Function: H5FDdriver_query
+ *
+ * Purpose: Similar to H5FD_query(), but intended for cases when we don't
+ * have a file available (e.g. before one is opened). Since we
+ * can't use the file to get the driver, the driver ID is passed
+ * in as a parameter.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FDdriver_query(hid_t driver_id, unsigned long *flags /*out*/)
+{
+ H5FD_class_t *driver = NULL; /* Pointer to VFD class struct */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "ix", driver_id, flags);
+
+ /* Check arguments */
+ if (NULL == flags)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "flags parameter cannot be NULL")
+
+ /* Check for the driver to query and then query it */
+ if (NULL == (driver = (H5FD_class_t *)H5I_object_verify(driver_id, H5I_VFL)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a VFL ID")
+ if (H5FD_driver_query(driver, flags) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "driver flag query failed")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5FDdriver_query() */
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index b57225c..462f715 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
* Purpose: A driver which stores the HDF5 data in main memory using
@@ -21,26 +21,26 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_core_init_interface
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDcore.h" /* Core file driver */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SLprivate.h" /* Skip lists */
+#define H5_INTERFACE_INIT_FUNC H5FD_core_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDcore.h" /* Core file driver */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_CORE_g = 0;
/* The skip list node type. Represents a region in the file. */
typedef struct H5FD_core_region_t {
- haddr_t start; /* Start address of the region */
- haddr_t end; /* End address of the region */
+ haddr_t start; /* Start address of the region */
+ haddr_t end; /* End address of the region */
} H5FD_core_region_t;
/* The description of a file belonging to this driver. The 'eoa' and 'eof'
@@ -48,22 +48,22 @@ typedef struct H5FD_core_region_t {
* of the file (the current size of the underlying memory).
*/
typedef struct H5FD_core_t {
- H5FD_t pub; /* public stuff, must be first */
- char *name; /* for equivalence testing */
- unsigned char *mem; /* the underlying memory */
- haddr_t eoa; /* end of allocated region */
- haddr_t eof; /* current allocated size */
- size_t increment; /* multiples for mem allocation */
- hbool_t backing_store; /* write to file name on flush */
- size_t bstore_page_size; /* backing store page size */
- int fd; /* backing store file descriptor */
+ H5FD_t pub; /* public stuff, must be first */
+ char * name; /* for equivalence testing */
+ unsigned char *mem; /* the underlying memory */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* current allocated size */
+ size_t increment; /* multiples for mem allocation */
+ hbool_t backing_store; /* write to file name on flush */
+ size_t bstore_page_size; /* backing store page size */
+ int fd; /* backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
* identify a file.
*/
- dev_t device; /*file device number */
- ino_t inode; /*file i-node number */
+ dev_t device; /*file device number */
+ ino_t inode; /*file i-node number */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -79,21 +79,21 @@ typedef struct H5FD_core_t {
*
* http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD nFileIndexLow;
- DWORD nFileIndexHigh;
- DWORD dwVolumeSerialNumber;
-
- HANDLE hFile; /* Native windows file handle */
-#endif /* H5_HAVE_WIN32_API */
- hbool_t dirty; /* changes not saved? */
- H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
- H5SL_t *dirty_list; /* dirty parts of the file */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
+ hbool_t dirty; /* changes not saved? */
+ H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
+ H5SL_t * dirty_list; /* dirty parts of the file */
} H5FD_core_t;
/* Driver-specific file access properties */
typedef struct H5FD_core_fapl_t {
- size_t increment; /* how much to grow memory */
- hbool_t backing_store; /* write to file name on flush */
+ size_t increment; /* how much to grow memory */
+ hbool_t backing_store; /* write to file name on flush */
} H5FD_core_fapl_t;
/* Allocate memory in multiples of this size by default */
@@ -112,72 +112,69 @@ typedef struct H5FD_core_fapl_t {
* REGION_OVERFLOW: Checks whether an address and size pair describe data
* which can be addressed entirely in memory.
*/
-#define MAXADDR ((haddr_t)((~(size_t)0)-1))
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || (A) > (haddr_t)MAXADDR)
-#define SIZE_OVERFLOW(Z) ((Z) > (hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (size_t)((A)+(Z))<(size_t)(A))
+#define MAXADDR ((haddr_t)((~(size_t)0) - 1))
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || (A) > (haddr_t)MAXADDR)
+#define SIZE_OVERFLOW(Z) ((Z) > (hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A, Z) \
+ (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (size_t)((A) + (Z)) < (size_t)(A))
/* Prototypes */
-static herr_t H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end);
-static herr_t H5FD_core_destroy_dirty_list(H5FD_core_t *file);
-static herr_t H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size);
-static void *H5FD_core_fapl_get(H5FD_t *_file);
-static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_core_close(H5FD_t *_file);
-static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_core_query(const H5FD_t *_f1, unsigned long *flags);
+static herr_t H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end);
+static herr_t H5FD_core_destroy_dirty_list(H5FD_core_t *file);
+static herr_t H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size);
+static void * H5FD_core_fapl_get(H5FD_t *_file);
+static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_core_close(H5FD_t *_file);
+static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_core_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_core_get_eof(const H5FD_t *_file);
-static herr_t H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_core_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_core_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_core_g = {
- "core", /* name */
- MAXADDR, /* maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /* sb_size */
- NULL, /* sb_encode */
- NULL, /* sb_decode */
- sizeof(H5FD_core_fapl_t), /* fapl_size */
- H5FD_core_fapl_get, /* fapl_get */
- NULL, /* fapl_copy */
- NULL, /* fapl_free */
- 0, /* dxpl_size */
- NULL, /* dxpl_copy */
- NULL, /* dxpl_free */
- H5FD_core_open, /* open */
- H5FD_core_close, /* close */
- H5FD_core_cmp, /* cmp */
- H5FD_core_query, /* query */
- NULL, /* get_type_map */
- NULL, /* alloc */
- NULL, /* free */
- H5FD_core_get_eoa, /* get_eoa */
- H5FD_core_set_eoa, /* set_eoa */
- H5FD_core_get_eof, /* get_eof */
- H5FD_core_get_handle, /* get_handle */
- H5FD_core_read, /* read */
- H5FD_core_write, /* write */
- H5FD_core_flush, /* flush */
- H5FD_core_truncate, /* truncate */
- NULL, /* lock */
- NULL, /* unlock */
- H5FD_FLMAP_DICHOTOMY /* fl_map */
+ "core", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_core_fapl_t), /* fapl_size */
+ H5FD_core_fapl_get, /* fapl_get */
+ NULL, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_core_open, /* open */
+ H5FD_core_close, /* close */
+ H5FD_core_cmp, /* cmp */
+ H5FD_core_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_core_get_eoa, /* get_eoa */
+ H5FD_core_set_eoa, /* set_eoa */
+ H5FD_core_get_eof, /* get_eof */
+ H5FD_core_get_handle, /* get_handle */
+ H5FD_core_read, /* read */
+ H5FD_core_write, /* write */
+ H5FD_core_flush, /* flush */
+ H5FD_core_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Define a free list to manage the region type */
H5FL_DEFINE(H5FD_core_region_t);
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_add_dirty_region
*
@@ -191,16 +188,13 @@ H5FL_DEFINE(H5FD_core_region_t);
static herr_t
H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
{
- H5FD_core_region_t *b_item = NULL;
- H5FD_core_region_t *a_item = NULL;
- H5FD_core_region_t *item = NULL;
- haddr_t b_addr = 0;
- haddr_t a_addr = 0;
- hbool_t create_new_node = TRUE;
- herr_t ret_value = SUCCEED;
-#ifdef DER
- hbool_t was_adjusted = FALSE;
-#endif
+ H5FD_core_region_t *b_item = NULL;
+ H5FD_core_region_t *a_item = NULL;
+ H5FD_core_region_t *item = NULL;
+ haddr_t b_addr = 0;
+ haddr_t a_addr = 0;
+ hbool_t create_new_node = TRUE;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -208,52 +202,31 @@ H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
HDassert(file->dirty_list);
HDassert(start <= end);
-#ifdef DER
-fprintf(stderr, "Add region: (%llu, %llu)\n", start, end);
-#endif
-
/* Adjust the dirty region to the nearest block boundaries */
- if(start % file->bstore_page_size != 0) {
+ if (start % file->bstore_page_size != 0)
start = (start / file->bstore_page_size) * file->bstore_page_size;
-#ifdef DER
- was_adjusted = TRUE;
-#endif
- }
- if(end % file->bstore_page_size != (file->bstore_page_size - 1)) {
+
+ if (end % file->bstore_page_size != (file->bstore_page_size - 1)) {
end = (((end / file->bstore_page_size) + 1) * file->bstore_page_size) - 1;
- if(end > file->eof){
-#ifdef DER
-fprintf(stderr, "Adjusted to EOF\n");
-#endif
+ if (end > file->eof)
end = file->eof - 1;
- }
-#ifdef DER
- was_adjusted = TRUE;
-#endif
- }
-
-#ifdef DER
-if(was_adjusted)
- fprintf(stderr, "Adjusted region: (%llu, %llu)\n", start, end);
-#endif
+ } /* end if */
/* Get the regions before and after the intended insertion point */
- b_addr = start +1;
+ b_addr = start + 1;
a_addr = end + 2;
b_item = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &b_addr);
a_item = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &a_addr);
/* Check to see if we need to extend the upper end of the NEW region */
- if(a_item) {
- if(start < a_item->start && end < a_item->end) {
-
+ if (a_item)
+ if (start < a_item->start && end < a_item->end) {
/* Extend the end of the NEW region to match the existing AFTER region */
end = a_item->end;
- }
- }
+ } /* end if */
/* Attempt to extend the PREV region */
- if(b_item) {
- if(start <= b_item->end + 1) {
+ if (b_item)
+ if (start <= b_item->end + 1) {
/* Need to set this for the delete algorithm */
start = b_item->start;
@@ -262,14 +235,13 @@ if(was_adjusted)
* just update an existing one instead.
*/
create_new_node = FALSE;
- }
- }
+ } /* end if */
/* Remove any old nodes that are no longer needed */
- while(a_item && a_item->start > start) {
+ while (a_item && a_item->start > start) {
H5FD_core_region_t *less;
- haddr_t key = a_item->start - 1;
+ haddr_t key = a_item->start - 1;
/* Save the previous node before we trash this one */
less = (H5FD_core_region_t *)H5SL_less(file->dirty_list, &key);
@@ -279,19 +251,20 @@ if(was_adjusted)
a_item = H5FL_FREE(H5FD_core_region_t, a_item);
/* Set up to check the next node */
- if(less)
+ if (less)
a_item = less;
- }
+ } /* end while */
/* Insert the new node */
- if(create_new_node) {
- if(NULL == (item = (H5FD_core_region_t *)H5SL_search(file->dirty_list, &start))) {
+ if (create_new_node) {
+ if (NULL == (item = (H5FD_core_region_t *)H5SL_search(file->dirty_list, &start))) {
/* Ok to insert. No pre-existing node with that key. */
- item = (H5FD_core_region_t *)H5FL_CALLOC(H5FD_core_region_t);
+ item = (H5FD_core_region_t *)H5FL_CALLOC(H5FD_core_region_t);
item->start = start;
- item->end = end;
- if(H5SL_insert(file->dirty_list, item, &item->start) < 0)
- HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n", start, end)
+ item->end = end;
+ if (H5SL_insert(file->dirty_list, item, &item->start) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n",
+ start, end)
}
else {
/* Store the new item endpoint if it's bigger */
@@ -300,15 +273,14 @@ if(was_adjusted)
}
else {
/* Update the size of the before region */
- if(b_item->end < end)
+ if (b_item->end < end)
b_item->end = end;
}
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_add_dirty_region() */
+} /* end H5FD__core_add_dirty_region() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_destroy_dirty_list
*
@@ -328,29 +300,21 @@ H5FD_core_destroy_dirty_list(H5FD_core_t *file)
HDassert(file);
/* Destroy the list, including any remaining list elements */
- if(file->dirty_list) {
+ if (file->dirty_list) {
H5FD_core_region_t *region = NULL;
-#ifdef DER
-{
-size_t count = H5SL_count(file->dirty_list);
-if(count != 0)
- fprintf(stderr, "LIST NOT EMPTY AT DESTROY\n");
-}
-#endif
- while(NULL != (region = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list)))
+ while (NULL != (region = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list)))
region = H5FL_FREE(H5FD_core_region_t, region);
- if(H5SL_close(file->dirty_list) < 0)
+ if (H5SL_close(file->dirty_list) < 0)
HGOTO_ERROR(H5E_SLIST, H5E_CLOSEERROR, FAIL, "can't close core vfd dirty list")
file->dirty_list = NULL;
- }
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_destroy_dirty_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_write_to_bstore
*
@@ -360,50 +324,51 @@ done:
*
*-------------------------------------------------------------------------
*/
-static herr_t H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
+static herr_t
+H5FD_core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
{
- unsigned char *ptr = file->mem + addr; /* mutable pointer into the
- * buffer (can't change mem)
- */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned char *ptr = file->mem + addr; /* mutable pointer into the
+ * buffer (can't change mem)
+ */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Write to backing store */
- if((off_t)addr != HDlseek(file->fd, (off_t)addr, SEEK_SET))
+ if ((off_t)addr != HDlseek(file->fd, (off_t)addr, SEEK_SET))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store")
while (size > 0) {
- h5_posix_io_t bytes_in = 0; /* # of bytes to write */
- h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
-#ifdef DER
-fprintf(stderr, "\nNEW\n");
-#endif
do {
bytes_wrote = HDwrite(file->fd, ptr, bytes_in);
-#ifdef DER
-fprintf(stderr, "bytes wrote: %lu\n", bytes_wrote);
-#endif
- } while(-1 == bytes_wrote && EINTR == errno);
+ } while (-1 == bytes_wrote && EINTR == errno);
- if(-1 == bytes_wrote) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ if (-1 == bytes_wrote) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
+ "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, "
+ "errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this "
+ "sub-write = %llu, bytes actually written = %llu, offset = %llu",
+ HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_wrote > 0);
@@ -416,17 +381,14 @@ fprintf(stderr, "bytes wrote: %lu\n", bytes_wrote);
done:
FUNC_LEAVE_NOAPI(ret_value)
-
} /* end H5FD_core_write_to_bstore() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_init_interface
*
* Purpose: Initializes any interface-specific data or routines.
*
- * Return: Success: The driver ID for the core driver.
- * Failure: Negative.
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -438,15 +400,14 @@ H5FD_core_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_core_init())
} /* H5FD_core_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_init
*
* Purpose: Initialize this driver by registering the driver with the
* library.
*
- * Return: Success: The driver ID for the core driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the core driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, July 29, 1999
@@ -456,21 +417,20 @@ H5FD_core_init_interface(void)
hid_t
H5FD_core_init(void)
{
- hid_t ret_value = H5FD_CORE_g; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if(H5I_VFL != H5I_get_type(H5FD_CORE_g))
- H5FD_CORE_g = H5FD_register(&H5FD_core_g,sizeof(H5FD_class_t),FALSE);
+ if (H5I_VFL != H5I_get_type(H5FD_CORE_g))
+ H5FD_CORE_g = H5FD_register(&H5FD_core_g, sizeof(H5FD_class_t), FALSE);
/* Set return value */
ret_value = H5FD_CORE_g;
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_core_init() */
-
/*---------------------------------------------------------------------------
* Function: H5FD_core_term
*
@@ -494,7 +454,6 @@ H5FD_core_term(void)
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_core_term() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_core
*
@@ -512,27 +471,26 @@ H5FD_core_term(void)
herr_t
H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
{
- H5FD_core_fapl_t fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5FD_core_fapl_t fa;
+ H5P_genplist_t * plist; /* Property list pointer */
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "izb", fapl_id, increment, backing_store);
/* Check argument */
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- fa.increment = increment;
+ fa.increment = increment;
fa.backing_store = backing_store;
- ret_value= H5P_set_driver(plist, H5FD_CORE, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_CORE, &fa);
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pset_fapl_core() */
-
/*-------------------------------------------------------------------------
* Function: H5Pget_fapl_core
*
@@ -548,18 +506,18 @@ done:
herr_t
H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/)
{
- H5FD_core_fapl_t *fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t * plist; /* Property list pointer */
+ const H5FD_core_fapl_t *fa;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, increment, backing_store);
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- if(H5FD_CORE != H5P_get_driver(plist))
+ if (H5FD_CORE != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if(NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
if (increment)
@@ -569,16 +527,14 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_fapl_core() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_fapl_get
*
* Purpose: Returns a copy of the file access properties.
*
* Return: Success: Ptr to new file access properties.
- *
* Failure: NULL
*
* Programmer: Robb Matzke
@@ -589,16 +545,16 @@ done:
static void *
H5FD_core_fapl_get(H5FD_t *_file)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- H5FD_core_fapl_t *fa;
- void *ret_value; /* Return value */
+ H5FD_core_t * file = (H5FD_core_t *)_file;
+ H5FD_core_fapl_t *fa;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(NULL == (fa = (H5FD_core_fapl_t *)H5MM_calloc(sizeof(H5FD_core_fapl_t))))
+ if (NULL == (fa = (H5FD_core_fapl_t *)H5MM_calloc(sizeof(H5FD_core_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- fa->increment = file->increment;
+ fa->increment = file->increment;
fa->backing_store = (hbool_t)(file->fd >= 0);
/* Set return value */
@@ -608,7 +564,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_open
*
@@ -617,7 +572,6 @@ done:
* Return: Success: A pointer to a new file data structure. The
* public fields will be initialized by the
* caller, which is always H5FD_open().
- *
* Failure: NULL
*
* Programmer: Robb Matzke
@@ -628,77 +582,80 @@ done:
static H5FD_t *
H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- int o_flags;
- H5FD_core_t *file = NULL;
- H5FD_core_fapl_t *fa = NULL;
- H5P_genplist_t *plist; /* Property list pointer */
+ int o_flags;
+ H5FD_core_t * file = NULL;
+ const H5FD_core_fapl_t *fa = NULL;
+ H5P_genplist_t * plist; /* Property list pointer */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- int fd = -1;
- H5FD_file_image_info_t file_image_info;
- H5FD_t *ret_value;
+ h5_stat_t sb;
+ int fd = -1;
+ H5FD_file_image_info_t file_image_info;
+ H5FD_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if(0 == maxaddr || HADDR_UNDEF == maxaddr)
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if(ADDR_OVERFLOW(maxaddr))
+ if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow")
HDassert(H5P_DEFAULT != fapl_id);
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
/* Build the open flags */
o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if(H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
- if(H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
- if(H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
+ if (H5F_ACC_TRUNC & flags)
+ o_flags |= O_TRUNC;
+ if (H5F_ACC_CREAT & flags)
+ o_flags |= O_CREAT;
+ if (H5F_ACC_EXCL & flags)
+ o_flags |= O_EXCL;
/* Retrieve initial file image info */
- if(H5P_get(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
+ if (H5P_get(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial file image info")
/* If the file image exists and this is an open, make sure the file doesn't exist */
HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
HDmemset(&sb, 0, sizeof(sb));
- if((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
- if(HDopen(name, o_flags, 0666) >= 0)
+ if ((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
+ if (HDopen(name, o_flags, 0666) >= 0)
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists")
-
+
/* If backing store is requested, create and stat the file
- * Note: We are forcing the O_CREAT flag here, even though this is
+ * Note: We are forcing the O_CREAT flag here, even though this is
* technically an open.
*/
- if(fa->backing_store) {
- if((fd = HDopen(name, o_flags | O_CREAT, 0666)) < 0)
+ if (fa->backing_store) {
+ if ((fd = HDopen(name, o_flags | O_CREAT, 0666)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file")
- if(HDfstat(fd, &sb) < 0)
+ if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
} /* end if */
- } /* end if */
+ } /* end if */
/* Open backing store, and get stat() from file. The only case that backing
* store is off is when the backing_store flag is off and H5F_ACC_CREAT is
* on. */
- else if(fa->backing_store || !(H5F_ACC_CREAT & flags)) {
- if((fd = HDopen(name, o_flags, 0666)) < 0)
+ else if (fa->backing_store || !(H5F_ACC_CREAT & flags)) {
+ if ((fd = HDopen(name, o_flags, 0666)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file")
- if(HDfstat(fd, &sb) < 0)
+ if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
} /* end if */
/* Create the new file struct */
- if(NULL == (file = (H5FD_core_t *)H5MM_calloc(sizeof(H5FD_core_t))))
+ if (NULL == (file = (H5FD_core_t *)H5MM_calloc(sizeof(H5FD_core_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
file->fd = fd;
- if(name && *name)
+ if (name && *name)
file->name = H5MM_xstrdup(name);
/* The increment comes from either the file access property list or the
@@ -713,44 +670,45 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Save file image callbacks */
file->fi_callbacks = file_image_info.callbacks;
- if(fd >= 0) {
+ if (fd >= 0) {
/* Retrieve information for determining uniqueness of file */
#ifdef H5_HAVE_WIN32_API
file->hFile = (HANDLE)_get_osfhandle(fd);
- if(INVALID_HANDLE_VALUE == file->hFile)
+ if (INVALID_HANDLE_VALUE == file->hFile)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle")
- if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
+ if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information")
- file->nFileIndexHigh = fileinfo.nFileIndexHigh;
- file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
-#else /* H5_HAVE_WIN32_API */
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
- file->inode = sb.st_ino;
+ file->inode = sb.st_ino;
#endif /* H5_HAVE_WIN32_API */
- } /* end if */
+ } /* end if */
/* If an existing file is opened, load the whole file into memory. */
- if(!(H5F_ACC_CREAT & flags)) {
+ if (!(H5F_ACC_CREAT & flags)) {
size_t size;
/* Retrieve file size */
- if(file_image_info.buffer && file_image_info.size > 0)
+ if (file_image_info.buffer && file_image_info.size > 0)
size = file_image_info.size;
else
size = (size_t)sb.st_size;
/* Check if we should allocate the memory buffer and read in existing data */
- if(size) {
+ if (size) {
/* Allocate memory for the file's data, using the file image callback if available. */
- if(file->fi_callbacks.image_malloc) {
- if(NULL == (file->mem = (unsigned char*)file->fi_callbacks.image_malloc(size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata)))
+ if (file->fi_callbacks.image_malloc) {
+ if (NULL == (file->mem = (unsigned char *)file->fi_callbacks.image_malloc(
+ size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "image malloc callback failed")
} /* end if */
else {
- if(NULL == (file->mem = (unsigned char*)H5MM_malloc(size)))
+ if (NULL == (file->mem = (unsigned char *)H5MM_malloc(size)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate memory block")
} /* end else */
@@ -758,9 +716,11 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->eof = size;
/* If there is an initial file image, copy it, using the callback if possible */
- if(file_image_info.buffer && file_image_info.size > 0) {
- if(file->fi_callbacks.image_memcpy) {
- if(file->mem != file->fi_callbacks.image_memcpy(file->mem, file_image_info.buffer, size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata))
+ if (file_image_info.buffer && file_image_info.size > 0) {
+ if (file->fi_callbacks.image_memcpy) {
+ if (file->mem != file->fi_callbacks.image_memcpy(file->mem, file_image_info.buffer, size,
+ H5FD_FILE_IMAGE_OP_FILE_OPEN,
+ file->fi_callbacks.udata))
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, NULL, "image_memcpy callback failed")
} /* end if */
else
@@ -771,55 +731,62 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Read in existing data, being careful of interrupted system calls,
* partial results, and the end of the file.
*/
-
+
uint8_t *mem = file->mem; /* memory pointer for writes */
-
- while(size > 0) {
- h5_posix_io_t bytes_in = 0; /* # of bytes to read */
- h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
-
+
+ while (size > 0) {
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
+
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
-
+
do {
bytes_read = HDread(file->fd, mem, bytes_in);
- } while(-1 == bytes_read && EINTR == errno);
-
- if(-1 == bytes_read) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ } while (-1 == bytes_read && EINTR == errno);
+
+ if (-1 == bytes_read) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', file->mem = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), file->mem, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
+ HGOTO_ERROR(
+ H5E_IO, H5E_READERROR, NULL,
+ "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
+ "error message = '%s', file->mem = %p, total read size = %llu, bytes this "
+ "sub-read = %llu, bytes actually read = %llu, offset = %llu",
+ HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), file->mem,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
-
+
HDassert(bytes_read >= 0);
HDassert((size_t)bytes_read <= size);
-
+
mem += bytes_read;
size -= (size_t)bytes_read;
} /* end while */
- } /* end else */
- } /* end if */
- } /* end if */
+ } /* end else */
+ } /* end if */
+ } /* end if */
/* Set up write tracking if the backing store is on */
file->dirty_list = NULL;
- if(fa->backing_store) {
- hbool_t write_tracking_flag = FALSE; /* what the user asked for */
- hbool_t use_write_tracking = FALSE; /* what we're actually doing */
+ if (fa->backing_store) {
+ hbool_t write_tracking_flag = FALSE; /* what the user asked for */
+ hbool_t use_write_tracking = FALSE; /* what we're actually doing */
/* Get the write tracking flag */
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &write_tracking_flag) < 0)
+ if (H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &write_tracking_flag) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking flag");
/* Get the page size */
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &(file->bstore_page_size)) < 0)
+ if (H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &(file->bstore_page_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking page size");
/* default is to have write tracking OFF for create (hence the check to see
@@ -827,27 +794,23 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* on open (when not read-only).
*/
/* Only use write tracking if the file is open for writing */
- use_write_tracking =
- TRUE == write_tracking_flag /* user asked for write tracking */
- && !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
- && file->bstore_page_size != 0; /* page size is not zero */
+ use_write_tracking = TRUE == write_tracking_flag /* user asked for write tracking */
+ && !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
+ && file->bstore_page_size != 0; /* page size is not zero */
/* initialize the dirty list */
- if(use_write_tracking) {
- if(NULL == (file->dirty_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ if (use_write_tracking) {
+ if (NULL == (file->dirty_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, NULL, "can't create core vfd dirty region list");
-#ifdef DER
-fprintf(stderr, "\n");
-#endif
} /* end if */
- } /* end if */
+ } /* end if */
/* Set return value */
ret_value = (H5FD_t *)file;
done:
- if(!ret_value && file) {
- if(file->fd >= 0)
+ if (!ret_value && file) {
+ if (file->fd >= 0)
HDclose(file->fd);
H5MM_xfree(file->name);
H5MM_xfree(file->mem);
@@ -857,7 +820,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_open() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_close
*
@@ -873,29 +835,30 @@ done:
static herr_t
H5FD_core_close(H5FD_t *_file)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Flush any changed buffers */
- if(H5FD_core_flush(_file, (hid_t)-1, TRUE) < 0)
+ if (H5FD_core_flush(_file, (hid_t)-1, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush core vfd backing store")
/* Destroy the dirty region list */
- if(file->dirty_list)
- if(H5FD_core_destroy_dirty_list(file) != SUCCEED)
+ if (file->dirty_list)
+ if (H5FD_core_destroy_dirty_list(file) != SUCCEED)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free core vfd dirty region list")
/* Release resources */
- if(file->fd >= 0)
+ if (file->fd >= 0)
HDclose(file->fd);
- if(file->name)
+ if (file->name)
H5MM_xfree(file->name);
- if(file->mem) {
+ if (file->mem) {
/* Use image callback if available */
- if(file->fi_callbacks.image_free) {
- if(file->fi_callbacks.image_free(file->mem, H5FD_FILE_IMAGE_OP_FILE_CLOSE, file->fi_callbacks.udata) < 0)
+ if (file->fi_callbacks.image_free) {
+ if (file->fi_callbacks.image_free(file->mem, H5FD_FILE_IMAGE_OP_FILE_CLOSE,
+ file->fi_callbacks.udata) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "image_free callback failed")
} /* end if */
else
@@ -908,7 +871,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_close() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_cmp
*
@@ -918,7 +880,6 @@ done:
* address.
*
* Return: Success: A value like strcmp()
- *
* Failure: never fails (arguments were checked by the
* caller).
*
@@ -930,54 +891,66 @@ done:
static int
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 = 0;
+ const H5FD_core_t *f1 = (const H5FD_core_t *)_f1;
+ const H5FD_core_t *f2 = (const H5FD_core_t *)_f2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(f1->fd >= 0 && f2->fd >= 0) {
+ if (f1->fd >= 0 && f2->fd >= 0) {
/* Compare low level file information for backing store */
#ifdef H5_HAVE_WIN32_API
- if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
- if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) HGOTO_DONE(1)
+ if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
+ HGOTO_DONE(-1)
+ if (f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber)
+ HGOTO_DONE(1)
- if(f1->nFileIndexHigh < f2->nFileIndexHigh) HGOTO_DONE(-1)
- if(f1->nFileIndexHigh > f2->nFileIndexHigh) HGOTO_DONE(1)
+ if (f1->nFileIndexHigh < f2->nFileIndexHigh)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexHigh > f2->nFileIndexHigh)
+ HGOTO_DONE(1)
- if(f1->nFileIndexLow < f2->nFileIndexLow) HGOTO_DONE(-1)
- if(f1->nFileIndexLow > f2->nFileIndexLow) HGOTO_DONE(1)
+ if (f1->nFileIndexLow < f2->nFileIndexLow)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexLow > f2->nFileIndexLow)
+ HGOTO_DONE(1)
#else
#ifdef H5_DEV_T_IS_SCALAR
- if (f1->device < f2->device) HGOTO_DONE(-1)
- if (f1->device > f2->device) HGOTO_DONE(1)
-#else /* H5_DEV_T_IS_SCALAR */
+ if (f1->device < f2->device)
+ HGOTO_DONE(-1)
+ if (f1->device > f2->device)
+ HGOTO_DONE(1)
+#else /* H5_DEV_T_IS_SCALAR */
/* If dev_t isn't a scalar value on this system, just use memcmp to
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ HGOTO_DONE(-1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
- if (f1->inode < f2->inode) HGOTO_DONE(-1)
- if (f1->inode > f2->inode) HGOTO_DONE(1)
+ if (f1->inode < f2->inode)
+ HGOTO_DONE(-1)
+ if (f1->inode > f2->inode)
+ HGOTO_DONE(1)
#endif /*H5_HAVE_WIN32_API*/
- } /* end if */
+ } /* end if */
else {
- if (NULL==f1->name && NULL==f2->name) {
- if (f1<f2)
+ if (NULL == f1->name && NULL == f2->name) {
+ if (f1 < f2)
HGOTO_DONE(-1)
- if (f1>f2)
+ if (f1 > f2)
HGOTO_DONE(1)
HGOTO_DONE(0)
} /* end if */
- if (NULL==f1->name)
+ if (NULL == f1->name)
HGOTO_DONE(-1)
- if (NULL==f2->name)
+ if (NULL == f2->name)
HGOTO_DONE(1)
ret_value = HDstrcmp(f1->name, f2->name);
@@ -987,7 +960,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_query
*
@@ -1002,31 +974,32 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
+H5FD_core_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* clang-format off */
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags = 0;
- *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */
- *flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */
+ *flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */
/* If the backing store is open, a POSIX file handle is available */
if(file && file->fd >= 0 && file->backing_store)
*flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
} /* end if */
+ /* clang-format on */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_core_query() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_get_eoa
*
@@ -1044,14 +1017,13 @@ H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
static haddr_t
H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_set_eoa
*
@@ -1069,12 +1041,12 @@ H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
static herr_t
H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(ADDR_OVERFLOW(addr))
+ if (ADDR_OVERFLOW(addr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow")
file->eoa = addr;
@@ -1083,7 +1055,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_set_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_get_eof
*
@@ -1103,14 +1074,13 @@ done:
static haddr_t
H5FD_core_get_eof(const H5FD_t *_file)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_get_handle
*
@@ -1124,38 +1094,38 @@ H5FD_core_get_eof(const H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
{
- H5FD_core_t *file = (H5FD_core_t *)_file; /* core VFD info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file; /* core VFD info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- if(!file_handle)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
+ if (!file_handle)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
/* Check for non-default FAPL */
- if(H5P_FILE_ACCESS_DEFAULT != fapl && H5P_DEFAULT != fapl) {
- H5P_genplist_t *plist; /* Property list pointer */
+ if (H5P_FILE_ACCESS_DEFAULT != fapl && H5P_DEFAULT != fapl) {
+ H5P_genplist_t *plist; /* Property list pointer */
/* Get the FAPL */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl)))
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list")
/* Check if private property for retrieving the backing store POSIX
* file descriptor is set. (This should not be set except within the
* library) QAK - 2009/12/04
*/
- if(H5P_exist_plist(plist, H5F_ACS_WANT_POSIX_FD_NAME) > 0) {
- hbool_t want_posix_fd; /* Setting for retrieving file descriptor from core VFD */
+ if (H5P_exist_plist(plist, H5F_ACS_WANT_POSIX_FD_NAME) > 0) {
+ hbool_t want_posix_fd; /* Setting for retrieving file descriptor from core VFD */
/* Get property */
- if(H5P_get(plist, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
+ if (H5P_get(plist, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get property of retrieving file descriptor")
/* If property is set, pass back the file descriptor instead of the memory address */
- if(want_posix_fd)
+ if (want_posix_fd)
*file_handle = &(file->fd);
else
*file_handle = &(file->mem);
@@ -1170,7 +1140,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_get_handle() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_read
*
@@ -1180,7 +1149,6 @@ done:
*
* Return: Success: SUCCEED. Result is stored in caller-supplied
* buffer BUF.
- *
* Failure: FAIL, Contents of buffer BUF are undefined.
*
* Programmer: Robb Matzke
@@ -1190,10 +1158,10 @@ done:
*/
static herr_t
H5FD_core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+ size_t size, void *buf /*out*/)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1212,11 +1180,11 @@ H5FD_core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
#ifndef NDEBUG
hsize_t temp_nbytes;
- temp_nbytes = file->eof-addr;
- H5_CHECK_OVERFLOW(temp_nbytes,hsize_t,size_t);
- nbytes = MIN(size,(size_t)temp_nbytes);
-#else /* NDEBUG */
- nbytes = MIN(size,(size_t)(file->eof-addr));
+ temp_nbytes = file->eof - addr;
+ H5_CHECK_OVERFLOW(temp_nbytes, hsize_t, size_t);
+ nbytes = MIN(size, (size_t)temp_nbytes);
+#else /* NDEBUG */
+ nbytes = MIN(size, (size_t)(file->eof - addr));
#endif /* NDEBUG */
HDmemcpy(buf, file->mem + addr, nbytes);
@@ -1233,7 +1201,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_write
*
@@ -1250,10 +1217,10 @@ done:
*/
static herr_t
H5FD_core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1261,7 +1228,7 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
HDassert(buf);
/* Check for overflow conditions */
- if(REGION_OVERFLOW(addr, size))
+ if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
/*
@@ -1270,23 +1237,27 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
* careful of non-Posix realloc() that doesn't understand what to do when
* the first argument is null.
*/
- if(addr + size > file->eof) {
+ if (addr + size > file->eof) {
unsigned char *x;
- size_t new_eof;
+ size_t new_eof;
/* Determine new size of memory buffer */
H5_CHECKED_ASSIGN(new_eof, size_t, file->increment * ((addr + size) / file->increment), hsize_t);
- if((addr + size) % file->increment)
+ if ((addr + size) % file->increment)
new_eof += file->increment;
/* (Re)allocate memory for the file buffer, using callbacks if available */
- if(file->fi_callbacks.image_realloc) {
- if(NULL == (x = (unsigned char *)file->fi_callbacks.image_realloc(file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes with callback", (unsigned long long)new_eof)
+ if (file->fi_callbacks.image_realloc) {
+ if (NULL == (x = (unsigned char *)file->fi_callbacks.image_realloc(
+ file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL,
+ "unable to allocate memory block of %llu bytes with callback",
+ (unsigned long long)new_eof)
} /* end if */
else {
- if(NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
+ if (NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes",
+ (unsigned long long)new_eof)
} /* end else */
#ifdef H5_CLEAR_MEMORY
@@ -1298,11 +1269,14 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
} /* end if */
/* Add the buffer region to the dirty list if using that optimization */
- if(file->dirty_list) {
+ if (file->dirty_list) {
haddr_t start = addr;
- haddr_t end = addr + (haddr_t)size - 1;
- if(H5FD_core_add_dirty_region(file, start, end) != SUCCEED)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu", start, end)
+ haddr_t end = addr + (haddr_t)size - 1;
+ if (H5FD_core_add_dirty_region(file, start, end) != SUCCEED)
+ HGOTO_ERROR(
+ H5E_VFL, H5E_CANTINSERT, FAIL,
+ "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu",
+ start, end)
}
/* Write from BUF to memory */
@@ -1315,7 +1289,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_write() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_flush
*
@@ -1332,8 +1305,8 @@ done:
static herr_t
H5FD_core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, unsigned H5_ATTR_UNUSED closing)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1341,47 +1314,31 @@ H5FD_core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, unsigned H5_ATTR_UN
if (file->dirty && file->fd >= 0 && file->backing_store) {
/* Use the dirty list, if available */
- if(file->dirty_list) {
+ if (file->dirty_list) {
H5FD_core_region_t *item = NULL;
- size_t size;
+ size_t size;
-#ifdef DER
- fprintf(stderr, "FLUSHING. DIRTY LIST:\n");
-#endif
- while(NULL != (item = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list))) {
+ while (NULL != (item = (H5FD_core_region_t *)H5SL_remove_first(file->dirty_list))) {
/* The file may have been truncated, so check for that
* and skip or adjust as necessary.
*/
- if(item->start < file->eof) {
- if(item->end >= file->eof)
+ if (item->start < file->eof) {
+ if (item->end >= file->eof)
item->end = file->eof - 1;
+
size = (size_t)((item->end - item->start) + 1);
-#ifdef DER
-fprintf(stderr, "(%llu, %llu : %lu)\n", item->start, item->end, size);
-#endif
- if(H5FD_core_write_to_bstore(file, item->start, size) != SUCCEED)
+ if (H5FD_core_write_to_bstore(file, item->start, size) != SUCCEED)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store")
} /* end if */
-
+
item = H5FL_FREE(H5FD_core_region_t, item);
} /* end while */
-
-#ifdef DER
-fprintf(stderr, "EOF: %llu\n", file->eof);
-fprintf(stderr, "EOA: %llu\n", file->eoa);
-if(file->eoa > file->eof)
- fprintf(stderr, "*** EOA BADNESS ***\n");
-fprintf(stderr, "\n");
-#endif
- }
+ } /* end if */
/* Otherwise, write the entire file out at once */
- else {
- if(H5FD_core_write_to_bstore(file, (haddr_t)0, (size_t)file->eof) != SUCCEED)
- HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store")
-
- } /* end while */
+ else if (H5FD_core_write_to_bstore(file, (haddr_t)0, (size_t)file->eof) != SUCCEED)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store")
file->dirty = FALSE;
}
@@ -1390,7 +1347,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_core_truncate
*
@@ -1398,24 +1354,24 @@ done:
* than the end-of-address.
*
* Addendum -- 12/2/11
- * For file images opened with the core file driver, it is
+ * For file images opened with the core file driver, it is
* necessary that we avoid reallocating the core file driver's
* buffer uneccessarily.
*
* To this end, I have made the following functional changes
- * to this function.
+ * to this function.
*
- * If we are closing, and there is no backing store, this
+ * If we are closing, and there is no backing store, this
* function becomes a no-op.
*
* If we are closing, and there is backing store, we set the
- * eof to equal the eoa, and truncate the backing store to
+ * eof to equal the eoa, and truncate the backing store to
* the new eof
*
- * If we are not closing, we realloc the buffer to size equal
- * to the smallest multiple of the allocation increment that
- * equals or exceeds the eoa and set the eof accordingly.
- * Note that we no longer truncate the backing store to the
+ * If we are not closing, we realloc the buffer to size equal
+ * to the smallest multiple of the allocation increment that
+ * equals or exceeds the eoa and set the eof accordingly.
+ * Note that we no longer truncate the backing store to the
* new eof if applicable.
* -- JRM
*
@@ -1429,54 +1385,57 @@ done:
static herr_t
H5FD_core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- size_t new_eof; /* New size of memory buffer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t *)_file;
+ size_t new_eof; /* New size of memory buffer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* if we are closing and not using backing store, do nothing */
- if(!closing || file->backing_store) {
- if(closing) /* set eof to eoa */
+ if (!closing || file->backing_store) {
+ if (closing) /* set eof to eoa */
new_eof = file->eoa;
else { /* set eof to smallest multiple of increment that exceeds eoa */
/* Determine new size of memory buffer */
H5_CHECKED_ASSIGN(new_eof, size_t, file->increment * (file->eoa / file->increment), hsize_t);
- if(file->eoa % file->increment)
+ if (file->eoa % file->increment)
new_eof += file->increment;
} /* end else */
/* Extend the file to make sure it's large enough */
- if(!H5F_addr_eq(file->eof, (haddr_t)new_eof)) {
- unsigned char *x; /* Pointer to new buffer for file data */
+ if (!H5F_addr_eq(file->eof, (haddr_t)new_eof)) {
+ unsigned char *x; /* Pointer to new buffer for file data */
/* (Re)allocate memory for the file buffer, using callback if available */
- if(file->fi_callbacks.image_realloc) {
- if(NULL == (x = (unsigned char *)file->fi_callbacks.image_realloc(file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block with callback")
+ if (file->fi_callbacks.image_realloc) {
+ if (NULL ==
+ (x = (unsigned char *)file->fi_callbacks.image_realloc(
+ file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL,
+ "unable to allocate memory block with callback")
} /* end if */
else {
- if(NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
+ if (NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block")
} /* end else */
#ifdef H5_CLEAR_MEMORY
- if(file->eof < new_eof)
+ if (file->eof < new_eof)
HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
#endif /* H5_CLEAR_MEMORY */
file->mem = x;
/* Update backing store, if using it and if closing */
- if(closing && (file->fd >= 0) && file->backing_store) {
+ if (closing && (file->fd >= 0) && file->backing_store) {
#ifdef H5_HAVE_WIN32_API
- LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
- DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
- * Only used as an error code here.
- */
- DWORD dwError; /* DWORD error code from GetLastError() */
- BOOL bError; /* Boolean error flag */
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
/* Windows uses this odd QuadPart union for 32/64-bit portability */
li.QuadPart = (__int64)file->eoa;
@@ -1487,31 +1446,27 @@ H5FD_core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
* from SetFilePointer(), we also need to check GetLastError().
*/
dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ if (INVALID_SET_FILE_POINTER == dwPtrLow) {
dwError = GetLastError();
- if(dwError != NO_ERROR )
+ if (dwError != NO_ERROR)
HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer")
}
bError = SetEndOfFile(file->hFile);
- if(0 == bError)
+ if (0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* H5_HAVE_WIN32_API */
- if(-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
+#else /* H5_HAVE_WIN32_API */
+ if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
-#ifdef DER
-fprintf(stderr, "OLD: Truncated to: %llu\n", file->eoa);
-#endif
} /* end if */
/* Update the eof value */
file->eof = new_eof;
} /* end if */
- } /* end if(file->eof < file->eoa) */
+ } /* end if(file->eof < file->eoa) */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_truncate() */
-
diff --git a/src/H5FDcore.h b/src/H5FDcore.h
index 3ee61b6..1b59ccb 100644
--- a/src/H5FDcore.h
+++ b/src/H5FDcore.h
@@ -6,33 +6,29 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
- * Purpose: The public header file for the sec2 driver.
+ * Purpose: The public header file for the core driver.
*/
#ifndef H5FDcore_H
#define H5FDcore_H
-#include "H5Ipublic.h"
-
-#define H5FD_CORE (H5FD_core_init())
+#define H5FD_CORE (H5FD_core_init())
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_core_init(void);
-H5_DLL void H5FD_core_term(void);
-H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment,
- hbool_t backing_store);
-H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
- hbool_t *backing_store/*out*/);
+H5_DLL hid_t H5FD_core_init(void);
+H5_DLL void H5FD_core_term(void);
+H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store);
+H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/);
#ifdef __cplusplus
}
#endif
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index ff18c71..e60ca5c 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The Direct I/O file driver forces the data to be written to
@@ -21,21 +21,21 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_direct_init_interface
+#define H5_INTERFACE_INIT_FUNC H5FD_direct_init_interface
/* For system function posix_memalign - Commented it out because copper isn't able to compile
* this file. */
/* #define _XOPEN_SOURCE 600 */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDdirect.h" /* Direct file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDdirect.h" /* Direct file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_DIRECT
@@ -43,16 +43,16 @@
static hid_t H5FD_DIRECT_g = 0;
/* File operations */
-#define OP_UNKNOWN 0
+#define OP_UNKNOWN 0
#define OP_READ 1
-#define OP_WRITE 2
+#define OP_WRITE 2
/* Driver-specific file access properties */
typedef struct H5FD_direct_fapl_t {
size_t mboundary; /* Memory boundary for alignment */
- size_t fbsize; /* File system block size */
- size_t cbsize; /* Maximal buffer size for copying user data */
- hbool_t must_align; /* Decides if data alignment is required */
+ size_t fbsize; /* File system block size */
+ size_t cbsize; /* Maximal buffer size for copying user data */
+ hbool_t must_align; /* Decides if data alignment is required */
} H5FD_direct_fapl_t;
/*
@@ -68,20 +68,20 @@ typedef struct H5FD_direct_fapl_t {
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_direct_t {
- H5FD_t pub; /*public stuff, must be first */
- int fd; /*the unix file */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- int op; /*last operation */
- H5FD_direct_fapl_t fa; /*file access properties */
+ H5FD_t pub; /*public stuff, must be first */
+ int fd; /*the unix file */
+ haddr_t eoa; /*end of allocated region */
+ haddr_t eof; /*end of file; current file size*/
+ haddr_t pos; /*current file I/O position */
+ int op; /*last operation */
+ H5FD_direct_fapl_t fa; /*file access properties */
#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
*/
- dev_t device; /*file device number */
- ino_t inode; /*file i-node number */
+ dev_t device; /*file device number */
+ ino_t inode; /*file i-node number */
#else
/*
* On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
@@ -95,6 +95,7 @@ typedef struct H5FD_direct_t {
DWORD fileindexlo;
DWORD fileindexhi;
#endif
+
} H5FD_direct_t;
/*
@@ -112,70 +113,66 @@ typedef struct H5FD_direct_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A, Z) \
+ (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static void *H5FD_direct_fapl_get(H5FD_t *file);
-static void *H5FD_direct_fapl_copy(const void *_old_fa);
-static H5FD_t *H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_direct_close(H5FD_t *_file);
-static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags);
+static void * H5FD_direct_fapl_get(H5FD_t *file);
+static void * H5FD_direct_fapl_copy(const void *_old_fa);
+static H5FD_t *H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_direct_close(H5FD_t *_file);
+static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_direct_get_eof(const H5FD_t *_file);
-static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_direct_g = {
- "direct", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_direct_fapl_t), /*fapl_size */
- H5FD_direct_fapl_get, /*fapl_get */
- H5FD_direct_fapl_copy, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_direct_open, /*open */
- H5FD_direct_close, /*close */
- H5FD_direct_cmp, /*cmp */
- H5FD_direct_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_direct_get_eoa, /*get_eoa */
- H5FD_direct_set_eoa, /*set_eoa */
- H5FD_direct_get_eof, /*get_eof */
- H5FD_direct_get_handle, /*get_handle */
- H5FD_direct_read, /*read */
- H5FD_direct_write, /*write */
- NULL, /*flush */
- H5FD_direct_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "direct", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_direct_fapl_t), /*fapl_size */
+ H5FD_direct_fapl_get, /*fapl_get */
+ H5FD_direct_fapl_copy, /*fapl_copy */
+ NULL, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_direct_open, /*open */
+ H5FD_direct_close, /*close */
+ H5FD_direct_cmp, /*cmp */
+ H5FD_direct_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_direct_get_eoa, /*get_eoa */
+ H5FD_direct_set_eoa, /*set_eoa */
+ H5FD_direct_get_eof, /*get_eof */
+ H5FD_direct_get_handle, /*get_handle */
+ H5FD_direct_read, /*read */
+ H5FD_direct_write, /*write */
+ NULL, /*flush */
+ H5FD_direct_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
+ H5FD_FLMAP_DICHOTOMY /*fl_map */
};
/* Declare a free list to manage the H5FD_direct_t struct */
H5FL_DEFINE_STATIC(H5FD_direct_t);
-
/*--------------------------------------------------------------------------
NAME
H5FD_direct_init_interface -- Initialize interface-specific information
@@ -197,42 +194,37 @@ H5FD_direct_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_direct_init())
} /* H5FD_direct_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_init
- *
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Function: H5FD_direct_init
*
- * Return: Success: The driver ID for the direct driver.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Failure: Negative.
+ * Return: Success: The driver ID for the direct driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
H5FD_direct_init(void)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if (H5I_VFL!=H5I_get_type(H5FD_DIRECT_g))
- H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g,sizeof(H5FD_class_t),FALSE);
+ if (H5I_VFL != H5I_get_type(H5FD_DIRECT_g))
+ H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g, sizeof(H5FD_class_t), FALSE);
/* Set return value */
- ret_value=H5FD_DIRECT_g;
+ ret_value = H5FD_DIRECT_g;
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_direct_init() */
-
/*---------------------------------------------------------------------------
* Function: H5FD_direct_term
*
@@ -243,8 +235,6 @@ done:
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
void
@@ -253,12 +243,11 @@ H5FD_direct_term(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
- H5FD_DIRECT_g=0;
+ H5FD_DIRECT_g = 0;
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_direct_term() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_direct
*
@@ -271,50 +260,48 @@ H5FD_direct_term(void)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbuf_size)
{
- H5P_genplist_t *plist; /* Property list pointer */
- H5FD_direct_fapl_t fa;
- herr_t ret_value;
+ H5P_genplist_t * plist; /* Property list pointer */
+ H5FD_direct_fapl_t fa;
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "izzz", fapl_id, boundary, block_size, cbuf_size);
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- if(boundary != 0)
- fa.mboundary = boundary;
+ HDmemset(&fa, 0, sizeof(H5FD_direct_fapl_t));
+ if (boundary != 0)
+ fa.mboundary = boundary;
else
- fa.mboundary = MBOUNDARY_DEF;
- if(block_size != 0)
- fa.fbsize = block_size;
+ fa.mboundary = MBOUNDARY_DEF;
+ if (block_size != 0)
+ fa.fbsize = block_size;
else
- fa.fbsize = FBSIZE_DEF;
- if(cbuf_size != 0)
- fa.cbsize = cbuf_size;
+ fa.fbsize = FBSIZE_DEF;
+ if (cbuf_size != 0)
+ fa.cbsize = cbuf_size;
else
- fa.cbsize = CBSIZE_DEF;
+ fa.cbsize = CBSIZE_DEF;
/* Set the default to be true for data alignment */
fa.must_align = TRUE;
/* Copy buffer size must be a multiple of file block size */
- if(fa.cbsize % fa.fbsize != 0)
+ if (fa.cbsize % fa.fbsize != 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "copy buffer size must be a multiple of block size")
- ret_value= H5P_set_driver(plist, H5FD_DIRECT, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_DIRECT, &fa);
done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5Pget_fapl_direct
*
@@ -328,39 +315,36 @@ done:
* Programmer: Raymond Lu
* Wednesday, October 18, 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/, size_t *block_size/*out*/,
- size_t *cbuf_size/*out*/)
+H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size /*out*/,
+ size_t *cbuf_size /*out*/)
{
- H5FD_direct_fapl_t *fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5P_genplist_t * plist; /* Property list pointer */
+ const H5FD_direct_fapl_t *fa;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "ixxx", fapl_id, boundary, block_size, cbuf_size);
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
- if (H5FD_DIRECT!=H5P_get_driver(plist))
+ if (H5FD_DIRECT != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if (NULL==(fa=H5P_get_driver_info(plist)))
+ if (NULL == (fa = H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
if (boundary)
*boundary = fa->mboundary;
if (block_size)
- *block_size = fa->fbsize;
+ *block_size = fa->fbsize;
if (cbuf_size)
- *cbuf_size = fa->cbsize;
+ *cbuf_size = fa->cbsize;
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_fapl_direct() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_fapl_get
*
@@ -376,26 +360,23 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_direct_fapl_get(H5FD_t *_file)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- void *ret_value; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Set return value */
- ret_value= H5FD_direct_fapl_copy(&(file->fa));
+ ret_value = H5FD_direct_fapl_copy(&(file->fa));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_fapl_get() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_fapl_copy
*
@@ -408,15 +389,13 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_direct_fapl_copy(const void *_old_fa)
{
- const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t*)_old_fa;
- H5FD_direct_fapl_t *new_fa = H5MM_malloc(sizeof(H5FD_direct_fapl_t));
+ const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t *)_old_fa;
+ H5FD_direct_fapl_t * new_fa = H5MM_malloc(sizeof(H5FD_direct_fapl_t));
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -428,7 +407,6 @@ H5FD_direct_fapl_copy(const void *_old_fa)
FUNC_LEAVE_NOAPI(new_fa)
} /* end H5FD_direct_fapl_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_open
*
@@ -443,69 +421,70 @@ H5FD_direct_fapl_copy(const void *_old_fa)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5FD_t *
H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- int o_flags;
- int fd=(-1);
- H5FD_direct_t *file=NULL;
- H5FD_direct_fapl_t *fa;
+ int o_flags;
+ int fd = (-1);
+ H5FD_direct_t * file = NULL;
+ H5FD_direct_fapl_t *fa;
#ifdef H5_HAVE_WIN32_API
- HFILE filehandle;
+ HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- H5P_genplist_t *plist; /* Property list */
- int *buf1, *buf2;
- H5FD_t *ret_value;
+ h5_stat_t sb;
+ H5P_genplist_t *plist; /* Property list */
+ void * buf1, *buf2;
+ H5FD_t * ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check on file offsets */
- HDassert(sizeof(HDoff_t)>=sizeof(size_t));
+ HDassert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if (0==maxaddr || HADDR_UNDEF==maxaddr)
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
/* Build the open flags */
o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if (H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
- if (H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
- if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
+ if (H5F_ACC_TRUNC & flags)
+ o_flags |= O_TRUNC;
+ if (H5F_ACC_CREAT & flags)
+ o_flags |= O_CREAT;
+ if (H5F_ACC_EXCL & flags)
+ o_flags |= O_EXCL;
/* Flag for Direct I/O */
o_flags |= O_DIRECT;
/* Open the file */
- if ((fd=HDopen(name, o_flags, 0666))<0)
+ if ((fd = HDopen(name, o_flags, 0666)) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file")
- if (HDfstat(fd, &sb)<0)
+ if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
/* Create the new file struct */
- if (NULL==(file=H5FL_CALLOC(H5FD_direct_t)))
+ if (NULL == (file = H5FL_CALLOC(H5FD_direct_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
/* Get the driver specific information */
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL == (fa = (H5FD_direct_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_direct_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
file->fd = fd;
H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t);
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
#ifdef H5_HAVE_WIN32_API
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
@@ -513,67 +492,70 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
file->fileindexlo = fileinfo.nFileIndexLow;
#else
file->device = sb.st_dev;
- file->inode = sb.st_ino;
+ file->inode = sb.st_ino;
#endif /*H5_HAVE_WIN32_API*/
file->fa.mboundary = fa->mboundary;
- file->fa.fbsize = fa->fbsize;
- file->fa.cbsize = fa->cbsize;
+ file->fa.fbsize = fa->fbsize;
+ file->fa.cbsize = fa->cbsize;
/* Try to decide if data alignment is required. The reason to check it here
* is to handle correctly the case that the file is in a different file system
* than the one where the program is running.
*/
buf1 = (int *)HDmalloc(sizeof(int));
- if(HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
+ if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
- if(o_flags & O_CREAT) {
- if(HDwrite(file->fd, (void*)buf1, sizeof(int))<0) {
- if(HDwrite(file->fd, (void*)buf2, file->fa.fbsize)<0)
+ if (o_flags & O_CREAT) {
+ if (HDwrite(file->fd, (void *)buf1, sizeof(int)) < 0) {
+ if (HDwrite(file->fd, (void *)buf2, file->fa.fbsize) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, NULL, "file system may not support Direct I/O")
else
file->fa.must_align = TRUE;
- } else {
+ }
+ else {
file->fa.must_align = FALSE;
HDftruncate(file->fd, (HDoff_t)0);
}
- } else {
- if(HDread(file->fd, (void*)buf1, sizeof(int))<0) {
- if(HDread(file->fd, (void*)buf2, file->fa.fbsize)<0)
+ }
+ else {
+ if (HDread(file->fd, (void *)buf1, sizeof(int)) < 0) {
+ if (HDread(file->fd, (void *)buf2, file->fa.fbsize) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "file system may not support Direct I/O")
else
file->fa.must_align = TRUE;
- } else {
- if(o_flags & O_RDWR) {
- if(HDlseek(file->fd, (HDoff_t)0, SEEK_SET) < 0)
+ }
+ else {
+ if (o_flags & O_RDWR) {
+ if (HDlseek(file->fd, (HDoff_t)0, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to seek to proper position")
- if(HDwrite(file->fd, (void *)buf1, sizeof(int))<0)
+ if (HDwrite(file->fd, (void *)buf1, sizeof(int)) < 0)
file->fa.must_align = TRUE;
else
file->fa.must_align = FALSE;
- } else
+ }
+ else
file->fa.must_align = FALSE;
}
}
- if(buf1)
+ if (buf1)
HDfree(buf1);
- if(buf2)
+ if (buf2)
HDfree(buf2);
/* Set return value */
- ret_value=(H5FD_t*)file;
+ ret_value = (H5FD_t *)file;
done:
- if(ret_value==NULL) {
- if(fd>=0)
+ if (ret_value == NULL) {
+ if (fd >= 0)
HDclose(fd);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_close
*
@@ -586,28 +568,25 @@ done:
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_close(H5FD_t *_file)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if (HDclose(file->fd)<0)
+ if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
- H5FL_FREE(H5FD_direct_t,file);
+ H5FL_FREE(H5FD_direct_t, file);
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_cmp
*
@@ -622,41 +601,49 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_direct_t *f1 = (const H5FD_direct_t*)_f1;
- const H5FD_direct_t *f2 = (const H5FD_direct_t*)_f2;
- int ret_value=0;
+ const H5FD_direct_t *f1 = (const H5FD_direct_t *)_f1;
+ const H5FD_direct_t *f2 = (const H5FD_direct_t *)_f2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5_HAVE_WIN32_API
- if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
- if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
+ if (f1->fileindexhi < f2->fileindexhi)
+ HGOTO_DONE(-1)
+ if (f1->fileindexhi > f2->fileindexhi)
+ HGOTO_DONE(1)
- if (f1->fileindexlo < f2->fileindexlo) HGOTO_DONE(-1)
- if (f1->fileindexlo > f2->fileindexlo) HGOTO_DONE(1)
+ if (f1->fileindexlo < f2->fileindexlo)
+ HGOTO_DONE(-1)
+ if (f1->fileindexlo > f2->fileindexlo)
+ HGOTO_DONE(1)
#else
#ifdef H5_DEV_T_IS_SCALAR
- if (f1->device < f2->device) HGOTO_DONE(-1)
- if (f1->device > f2->device) HGOTO_DONE(1)
-#else /* H5_DEV_T_IS_SCALAR */
+ if (f1->device < f2->device)
+ HGOTO_DONE(-1)
+ if (f1->device > f2->device)
+ HGOTO_DONE(1)
+#else /* H5_DEV_T_IS_SCALAR */
/* If dev_t isn't a scalar value on this system, just use memcmp to
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ HGOTO_DONE(-1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
- if (f1->inode < f2->inode) HGOTO_DONE(-1)
- if (f1->inode > f2->inode) HGOTO_DONE(1)
+ if (f1->inode < f2->inode)
+ HGOTO_DONE(-1)
+ if (f1->inode > f2->inode)
+ HGOTO_DONE(1)
#endif
@@ -664,7 +651,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_query
*
@@ -678,28 +664,25 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out */)
+H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED *_f, unsigned long *flags /* out */)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags|=H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_get_eoa
*
@@ -714,24 +697,18 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
+ const H5FD_direct_t *file = (const H5FD_direct_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_set_eoa
*
@@ -746,17 +723,12 @@ H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -765,7 +737,6 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_get_eof
*
@@ -782,21 +753,18 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_direct_get_eof(const H5FD_t *_file)
{
- const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
+ const H5FD_direct_t *file = (const H5FD_direct_t *)_file;
FUNC_ENTER_NOAPI_NOINIT
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_diect_get_handle
*
@@ -807,19 +775,17 @@ H5FD_direct_get_eof(const H5FD_t *_file)
* Programmer: Raymond Lu
* 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
+H5FD_direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
- H5FD_direct_t *file = (H5FD_direct_t *)_file;
- herr_t ret_value = SUCCEED;
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
- if(!file_handle)
+ if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = &(file->fd);
@@ -827,7 +793,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_read
*
@@ -843,26 +808,24 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+ size_t size, void *buf /*out*/)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- ssize_t nbytes;
- hbool_t _must_align = TRUE;
- herr_t ret_value=SUCCEED; /* Return value */
- size_t alloc_size;
- void *copy_buf = NULL, *p2;
- size_t _boundary;
- size_t _fbsize;
- size_t _cbsize;
- haddr_t read_size; /* Size to read into copy buffer */
- size_t copy_size = size; /* Size remaining to read when using copy buffer */
- size_t copy_offset; /* Offset into copy buffer of the requested data */
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ ssize_t nbytes;
+ hbool_t _must_align = TRUE;
+ herr_t ret_value = SUCCEED; /* Return value */
+ size_t alloc_size;
+ void * copy_buf = NULL, *p2;
+ size_t _boundary;
+ size_t _fbsize;
+ size_t _cbsize;
+ haddr_t read_size; /* Size to read into copy buffer */
+ size_t copy_size = size; /* Size remaining to read when using copy buffer */
+ size_t copy_offset; /* Offset into copy buffer of the requested data */
FUNC_ENTER_NOAPI_NOINIT
@@ -870,7 +833,7 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
HDassert(buf);
/* Check for overflow conditions */
- if (HADDR_UNDEF==addr)
+ if (HADDR_UNDEF == addr)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined")
if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
@@ -884,134 +847,133 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
* copy buffer size.
*/
_boundary = file->fa.mboundary;
- _fbsize = file->fa.fbsize;
- _cbsize = file->fa.cbsize;
+ _fbsize = file->fa.fbsize;
+ _cbsize = file->fa.cbsize;
/* if the data is aligned or the system doesn't require data to be aligned,
* read it directly from the file. If not, read a bigger
* and aligned data first, then copy the data into memory buffer.
*/
- if(!_must_align || ((addr%_fbsize==0) && (size%_fbsize==0) && ((size_t)buf%_boundary==0))) {
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_READ!=file->op) &&
- HDlseek(file->fd, (HDoff_t)addr, SEEK_SET)<0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- /* Read the aligned data in file first, being careful of interrupted
- * system calls and partial results. */
- while (size>0) {
- do {
- nbytes = HDread(file->fd, buf, size);
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- if (0==nbytes) {
- /* end of file but not end of format address space */
- HDmemset(buf, 0, size);
- break;
+ if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
+ /* Seek to the correct location */
+ if ((addr != file->pos || OP_READ != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+ /* Read the aligned data in file first, being careful of interrupted
+ * system calls and partial results. */
+ while (size > 0) {
+ do {
+ nbytes = HDread(file->fd, buf, size);
+ } while (-1 == nbytes && EINTR == errno);
+ if (-1 == nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
+ if (0 == nbytes) {
+ /* end of file but not end of format address space */
+ HDmemset(buf, 0, size);
+ break;
+ }
+ HDassert(nbytes >= 0);
+ HDassert((size_t)nbytes <= size);
+ H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
+ size -= (size_t)nbytes;
+ H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
+ addr += (haddr_t)nbytes;
+ buf = (char *)buf + nbytes;
+ }
}
- HDassert(nbytes>=0);
- HDassert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (char*)buf + nbytes;
- }
- } else {
- /* Calculate where we will begin copying from the copy buffer */
- copy_offset = (size_t)(addr % _fbsize);
-
- /* allocate memory needed for the Direct IO option up to the maximal
- * copy buffer size. Make a bigger buffer for aligned I/O if size is
- * smaller than maximal copy buffer. */
- alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
- if(alloc_size > _cbsize)
- alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
- if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
-
- /* look for the aligned position for reading the data */
- HDassert(!(((addr / _fbsize) * _fbsize) % _fbsize));
- if(HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize),
- SEEK_SET) < 0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-
- /*
- * Read the aligned data in file into aligned buffer first, then copy the data
- * into the final buffer. If the data size is bigger than maximal copy buffer
- * size, do the reading by segment (the outer while loop). If not, do one step
- * reading.
- */
- do {
- /* Read the aligned data in file first. Not able to handle interrupted
- * system calls and partial results like sec2 driver does because the
- * data may no longer be aligned. It's especially true when the data in
- * file is smaller than ALLOC_SIZE. */
- HDmemset(copy_buf, 0, alloc_size);
-
- /* Calculate how much data we have to read in this iteration
- * (including unused parts of blocks) */
- if((copy_size + copy_offset) < alloc_size)
- read_size = ((copy_size + copy_offset - 1) / _fbsize + 1)
- * _fbsize;
- else
- read_size = alloc_size;
+ else {
+ /* Calculate where we will begin copying from the copy buffer */
+ copy_offset = (size_t)(addr % _fbsize);
+
+ /* allocate memory needed for the Direct IO option up to the maximal
+ * copy buffer size. Make a bigger buffer for aligned I/O if size is
+ * smaller than maximal copy buffer. */
+ alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
+ if (alloc_size > _cbsize)
+ alloc_size = _cbsize;
+ HDassert(!(alloc_size % _fbsize));
+ if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
+
+ /* look for the aligned position for reading the data */
+ HDassert(!(((addr / _fbsize) * _fbsize) % _fbsize));
+ if (HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- HDassert(!(read_size % _fbsize));
+ /*
+ * Read the aligned data in file into aligned buffer first, then copy the data
+ * into the final buffer. If the data size is bigger than maximal copy buffer
+ * size, do the reading by segment (the outer while loop). If not, do one step
+ * reading.
+ */
do {
- nbytes = HDread(file->fd, copy_buf, read_size);
- } while(-1==nbytes && EINTR==errno);
-
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
-
- /* Copy the needed data from the copy buffer to the output
- * buffer, and update copy_size. If the copy buffer does not
- * contain the rest of the data, just copy what's in the copy
- * buffer and also update read_addr and copy_offset to read the
- * next section of data. */
- p2 = (unsigned char*)copy_buf + copy_offset;
- if((copy_size + copy_offset) <= alloc_size) {
- HDmemcpy(buf, p2, copy_size);
- buf = (unsigned char *)buf + copy_size;
- copy_size = 0;
- } /* end if */
- else {
- HDmemcpy(buf, p2, alloc_size - copy_offset);
- buf = (unsigned char*)buf + alloc_size - copy_offset;
- copy_size -= alloc_size - copy_offset;
- copy_offset = 0;
- } /* end else */
- } while (copy_size > 0);
-
- /*Final step: update address*/
- addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
-
- if(copy_buf) {
- HDfree(copy_buf);
- copy_buf = NULL;
+ /* Read the aligned data in file first. Not able to handle interrupted
+ * system calls and partial results like sec2 driver does because the
+ * data may no longer be aligned. It's especially true when the data in
+ * file is smaller than ALLOC_SIZE. */
+ HDmemset(copy_buf, 0, alloc_size);
+
+ /* Calculate how much data we have to read in this iteration
+ * (including unused parts of blocks) */
+ if ((copy_size + copy_offset) < alloc_size)
+ read_size = ((copy_size + copy_offset - 1) / _fbsize + 1) * _fbsize;
+ else
+ read_size = alloc_size;
+
+ HDassert(!(read_size % _fbsize));
+ do {
+ nbytes = HDread(file->fd, copy_buf, read_size);
+ } while (-1 == nbytes && EINTR == errno);
+
+ if (-1 == nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
+
+ /* Copy the needed data from the copy buffer to the output
+ * buffer, and update copy_size. If the copy buffer does not
+ * contain the rest of the data, just copy what's in the copy
+ * buffer and also update read_addr and copy_offset to read the
+ * next section of data. */
+ p2 = (unsigned char *)copy_buf + copy_offset;
+ if ((copy_size + copy_offset) <= alloc_size) {
+ HDmemcpy(buf, p2, copy_size);
+ buf = (unsigned char *)buf + copy_size;
+ copy_size = 0;
} /* end if */
+ else {
+ HDmemcpy(buf, p2, alloc_size - copy_offset);
+ buf = (unsigned char *)buf + alloc_size - copy_offset;
+ copy_size -= alloc_size - copy_offset;
+ copy_offset = 0;
+ } /* end else */
+ } while (copy_size > 0);
+
+ /*Final step: update address*/
+ addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
+
+ if (copy_buf) {
+ /* Free with HDfree since it came from posix_memalign */
+ HDfree(copy_buf);
+ copy_buf = NULL;
+ } /* end if */
}
/* Update current position */
file->pos = addr;
- file->op = OP_READ;
+ file->op = OP_READ;
done:
- if(ret_value<0) {
- if(copy_buf)
+ if (ret_value < 0) {
+ /* Free with HDfree since it came from posix_memalign */
+ if (copy_buf)
HDfree(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_write
*
@@ -1026,29 +988,27 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- ssize_t nbytes;
- hbool_t _must_align = TRUE;
- herr_t ret_value=SUCCEED; /* Return value */
- size_t alloc_size;
- void *copy_buf = NULL, *p1;
- const void *p3;
- size_t _boundary;
- size_t _fbsize;
- size_t _cbsize;
- haddr_t write_addr; /* Address to write copy buffer */
- haddr_t write_size; /* Size to write from copy buffer */
- haddr_t read_size; /* Size to read into copy buffer */
- size_t copy_size = size; /* Size remaining to write when using copy buffer */
- size_t copy_offset; /* Offset into copy buffer of the data to write */
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ ssize_t nbytes;
+ hbool_t _must_align = TRUE;
+ herr_t ret_value = SUCCEED; /* Return value */
+ size_t alloc_size;
+ void * copy_buf = NULL, *p1;
+ const void * p3;
+ size_t _boundary;
+ size_t _fbsize;
+ size_t _cbsize;
+ haddr_t write_addr; /* Address to write copy buffer */
+ haddr_t write_size; /* Size to write from copy buffer */
+ haddr_t read_size; /* Size to read into copy buffer */
+ size_t copy_size = size; /* Size remaining to write when using copy buffer */
+ size_t copy_offset; /* Offset into copy buffer of the data to write */
FUNC_ENTER_NOAPI_NOINIT
@@ -1056,7 +1016,7 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
HDassert(buf);
/* Check for overflow conditions */
- if (HADDR_UNDEF==addr)
+ if (HADDR_UNDEF == addr)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined")
if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
@@ -1070,181 +1030,179 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
* copy buffer size.
*/
_boundary = file->fa.mboundary;
- _fbsize = file->fa.fbsize;
- _cbsize = file->fa.cbsize;
+ _fbsize = file->fa.fbsize;
+ _cbsize = file->fa.cbsize;
/* if the data is aligned or the system doesn't require data to be aligned,
* write it directly to the file. If not, read a bigger and aligned data
* first, update buffer with user data, then write the data out.
*/
- if(!_must_align || ((addr%_fbsize==0) && (size%_fbsize==0) && ((size_t)buf%_boundary==0))) {
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_WRITE!=file->op) &&
- HDlseek(file->fd, (HDoff_t)addr, SEEK_SET)<0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-
- while (size>0) {
- do {
- nbytes = HDwrite(file->fd, buf, size);
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- HDassert(nbytes>0);
- HDassert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (const char*)buf + nbytes;
- }
- } else {
- /* Calculate where we will begin reading from (on disk) and where we
- * will begin copying from the copy buffer */
- write_addr = (addr / _fbsize) * _fbsize;
- copy_offset = (size_t)(addr % _fbsize);
-
- /* allocate memory needed for the Direct IO option up to the maximal
- * copy buffer size. Make a bigger buffer for aligned I/O if size is
- * smaller than maximal copy buffer.
- */
- alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
- if(alloc_size > _cbsize)
- alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
-
- if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
-
- /* look for the right position for reading or writing the data */
- if(HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-
- p3 = buf;
- do {
- /* Calculate how much data we have to write in this iteration
- * (including unused parts of blocks) */
- if((copy_size + copy_offset) < alloc_size)
- write_size = ((copy_size + copy_offset - 1) / _fbsize + 1)
- * _fbsize;
- else
- write_size = alloc_size;
-
- /*
- * Read the aligned data first if the aligned region doesn't fall
- * entirely in the range to be written. Not able to handle interrupted
- * system calls and partial results like sec2 driver does because the
- * data may no longer be aligned. It's especially true when the data in
- * file is smaller than ALLOC_SIZE. Only read the entire section if
- * both ends are misaligned, otherwise only read the block on the
- * misaligned end.
+ if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
+ /* Seek to the correct location */
+ if ((addr != file->pos || OP_WRITE != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+
+ while (size > 0) {
+ do {
+ nbytes = HDwrite(file->fd, buf, size);
+ } while (-1 == nbytes && EINTR == errno);
+ if (-1 == nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
+ HDassert(nbytes > 0);
+ HDassert((size_t)nbytes <= size);
+ H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
+ size -= (size_t)nbytes;
+ H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
+ addr += (haddr_t)nbytes;
+ buf = (const char *)buf + nbytes;
+ }
+ }
+ else {
+ /* Calculate where we will begin reading from (on disk) and where we
+ * will begin copying from the copy buffer */
+ write_addr = (addr / _fbsize) * _fbsize;
+ copy_offset = (size_t)(addr % _fbsize);
+
+ /* allocate memory needed for the Direct IO option up to the maximal
+ * copy buffer size. Make a bigger buffer for aligned I/O if size is
+ * smaller than maximal copy buffer.
*/
- HDmemset(copy_buf, 0, _fbsize);
-
- if(copy_offset > 0) {
- if((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
- read_size = write_size;
- p1 = copy_buf;
- } /* end if */
- else {
- read_size = _fbsize;
- p1 = copy_buf;
- } /* end else */
- } /* end if */
- else if((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
- read_size = _fbsize;
- p1 = (unsigned char *)copy_buf + write_size - _fbsize;
-
- /* Seek to the last block, for reading */
- HDassert(!((write_addr + write_size - _fbsize) % _fbsize));
- if(HDlseek(file->fd,
- (HDoff_t)(write_addr + write_size - _fbsize),
- SEEK_SET) < 0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- } /* end if */
- else
- p1 = NULL;
+ alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
+ if (alloc_size > _cbsize)
+ alloc_size = _cbsize;
+ HDassert(!(alloc_size % _fbsize));
- if(p1) {
- HDassert(!(read_size % _fbsize));
- do {
- nbytes = HDread(file->fd, p1, read_size);
- } while (-1==nbytes && EINTR==errno);
+ if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- } /* end if */
+ /* look for the right position for reading or writing the data */
+ if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- /* look for the right position and append or copy the data to be written to
- * the aligned buffer.
- * Consider all possible situations here: file address is not aligned on
- * file block size; the end of data address is not aligned; the end of data
- * address is aligned; data size is smaller or bigger than maximal copy size.
- */
- p1 = (unsigned char *)copy_buf + copy_offset;
- if((copy_size + copy_offset) <= alloc_size) {
- HDmemcpy(p1, p3, copy_size);
- copy_size = 0;
+ p3 = buf;
+ do {
+ /* Calculate how much data we have to write in this iteration
+ * (including unused parts of blocks) */
+ if ((copy_size + copy_offset) < alloc_size)
+ write_size = ((copy_size + copy_offset - 1) / _fbsize + 1) * _fbsize;
+ else
+ write_size = alloc_size;
+
+ /*
+ * Read the aligned data first if the aligned region doesn't fall
+ * entirely in the range to be written. Not able to handle interrupted
+ * system calls and partial results like sec2 driver does because the
+ * data may no longer be aligned. It's especially true when the data in
+ * file is smaller than ALLOC_SIZE. Only read the entire section if
+ * both ends are misaligned, otherwise only read the block on the
+ * misaligned end.
+ */
+ HDmemset(copy_buf, 0, _fbsize);
+
+ if (copy_offset > 0) {
+ if ((write_addr + write_size) > (addr + size)) {
+ HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ read_size = write_size;
+ p1 = copy_buf;
} /* end if */
else {
- HDmemcpy(p1, p3, alloc_size - copy_offset);
- p3 = (const unsigned char *)p3 + (alloc_size - copy_offset);
- copy_size -= alloc_size - copy_offset;
- copy_offset = 0;
+ read_size = _fbsize;
+ p1 = copy_buf;
} /* end else */
+ } /* end if */
+ else if ((write_addr + write_size) > (addr + size)) {
+ HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ read_size = _fbsize;
+ p1 = (unsigned char *)copy_buf + write_size - _fbsize;
+
+ /* Seek to the last block, for reading */
+ HDassert(!((write_addr + write_size - _fbsize) % _fbsize));
+ if (HDlseek(file->fd, (HDoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+ } /* end if */
+ else
+ p1 = NULL;
- /*look for the aligned position for writing the data*/
- HDassert(!(write_addr % _fbsize));
- if(HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+ if (p1) {
+ HDassert(!(read_size % _fbsize));
+ do {
+ nbytes = HDread(file->fd, p1, read_size);
+ } while (-1 == nbytes && EINTR == errno);
- /*
- * Write the data. It doesn't truncate the extra data introduced by
- * alignment because that step is done in H5FD_direct_flush.
- */
- HDassert(!(write_size % _fbsize));
- do {
- nbytes = HDwrite(file->fd, copy_buf, write_size);
- } while (-1==nbytes && EINTR==errno);
+ if (-1 == nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
+ } /* end if */
+
+ /* look for the right position and append or copy the data to be written to
+ * the aligned buffer.
+ * Consider all possible situations here: file address is not aligned on
+ * file block size; the end of data address is not aligned; the end of data
+ * address is aligned; data size is smaller or bigger than maximal copy size.
+ */
+ p1 = (unsigned char *)copy_buf + copy_offset;
+ if ((copy_size + copy_offset) <= alloc_size) {
+ HDmemcpy(p1, p3, copy_size);
+ copy_size = 0;
+ } /* end if */
+ else {
+ HDmemcpy(p1, p3, alloc_size - copy_offset);
+ p3 = (const unsigned char *)p3 + (alloc_size - copy_offset);
+ copy_size -= alloc_size - copy_offset;
+ copy_offset = 0;
+ } /* end else */
+
+ /*look for the aligned position for writing the data*/
+ HDassert(!(write_addr % _fbsize));
+ if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
+ /*
+ * Write the data. It doesn't truncate the extra data introduced by
+ * alignment because that step is done in H5FD_direct_flush.
+ */
+ HDassert(!(write_size % _fbsize));
+ do {
+ nbytes = HDwrite(file->fd, copy_buf, write_size);
+ } while (-1 == nbytes && EINTR == errno);
- /* update the write address */
- write_addr += write_size;
- } while (copy_size > 0);
+ if (-1 == nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- /*Update the address and size*/
- addr = write_addr;
- buf = (const char*)buf + size;
+ /* update the write address */
+ write_addr += write_size;
+ } while (copy_size > 0);
- if(copy_buf) {
- HDfree(copy_buf);
- copy_buf = NULL;
+ /*Update the address and size*/
+ addr = write_addr;
+ buf = (const char *)buf + size;
+
+ if (copy_buf) {
+ /* Free with HDfree since it came from posix_memalign */
+ HDfree(copy_buf);
+ copy_buf = NULL;
} /* end if */
}
/* Update current position and eof */
file->pos = addr;
- file->op = OP_WRITE;
- if (file->pos>file->eof)
+ file->op = OP_WRITE;
+ if (file->pos > file->eof)
file->eof = file->pos;
done:
- if(ret_value<0) {
- if(copy_buf)
+ if (ret_value < 0) {
+ /* Free with HDfree since it came from posix_memalign */
+ if (copy_buf)
HDfree(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_direct_truncate
*
@@ -1263,18 +1221,18 @@ done:
static herr_t
H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Extend the file to make sure it's large enough */
- if (file->eoa!=file->eof) {
+ if (file->eoa != file->eof) {
#ifdef H5_HAVE_WIN32_API
- HFILE filehandle; /* Windows file handle */
- LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
+ HFILE filehandle; /* Windows file handle */
+ LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
/* Map the posix file handle to a Windows file handle */
filehandle = _get_osfhandle(file->fd);
@@ -1282,11 +1240,11 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT
/* Translate 64-bit integers into form Windows wants */
/* [This algorithm is from the Windows documentation for SetFilePointer()] */
li.QuadPart = (LONGLONG)file->eoa;
- (void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
- if(SetEndOfFile((HANDLE)filehandle)==0)
+ (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
+ if (SetEndOfFile((HANDLE)filehandle) == 0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* H5_HAVE_WIN32_API */
- if (-1==HDftruncate(file->fd, (HDoff_t)file->eoa))
+#else /* H5_HAVE_WIN32_API */
+ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
@@ -1295,13 +1253,13 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
}
- else if (file->fa.must_align){
- /*Even though eof is equal to eoa, file is still truncated because Direct I/O
- *write introduces some extra data for alignment.
- */
- if (-1==HDftruncate(file->fd, (HDoff_t)file->eof))
+ else if (file->fa.must_align) {
+ /*Even though eof is equal to eoa, file is still truncated because Direct I/O
+ *write introduces some extra data for alignment.
+ */
+ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
}
@@ -1309,4 +1267,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_truncate() */
#endif /* H5_HAVE_DIRECT */
-
diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h
index f509e44..b8a9f5b 100644
--- a/src/H5FDdirect.h
+++ b/src/H5FDdirect.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The public header file for the direct driver.
@@ -20,12 +20,10 @@
#ifndef H5FDdirect_H
#define H5FDdirect_H
-#include "H5Ipublic.h"
-
#ifdef H5_HAVE_DIRECT
-# define H5FD_DIRECT (H5FD_direct_init())
+#define H5FD_DIRECT (H5FD_direct_init())
#else
-# define H5FD_DIRECT (-1)
+#define H5FD_DIRECT (-1)
#endif /* H5_HAVE_DIRECT */
#ifdef H5_HAVE_DIRECT
@@ -35,16 +33,15 @@ extern "C" {
/* Default values for memory boundary, file block size, and maximal copy buffer size.
* Application can set these values through the function H5Pset_fapl_direct. */
-#define MBOUNDARY_DEF 4096
-#define FBSIZE_DEF 4096
-#define CBSIZE_DEF 16*1024*1024
-
-H5_DLL hid_t H5FD_direct_init(void);
-H5_DLL void H5FD_direct_term(void);
-H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size,
- size_t cbuf_size);
-H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/,
- size_t *block_size/*out*/, size_t *cbuf_size/*out*/);
+#define MBOUNDARY_DEF 4096
+#define FBSIZE_DEF 4096
+#define CBSIZE_DEF 16 * 1024 * 1024
+
+H5_DLL hid_t H5FD_direct_init(void);
+H5_DLL void H5FD_direct_term(void);
+H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size, size_t cbuf_size);
+H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size /*out*/,
+ size_t *cbuf_size /*out*/);
#ifdef __cplusplus
}
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 269441a..6c3af6a 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -6,141 +6,136 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Monday, November 10, 1997
- *
- * Purpose: Implements a family of files that acts as a single hdf5
- * file. The purpose is to be able to split a huge file on a
- * 64-bit platform, transfer all the <2GB members to a 32-bit
- * platform, and then access the entire huge file on the 32-bit
- * platform.
- *
- * All family members are logically the same size although their
- * physical sizes may vary. The logical member size is
- * determined by looking at the physical size of the first member
- * when the file is opened. When creating a file family, the
- * first member is created with a predefined physical size
- * (actually, this happens when the file family is flushed, and
- * can be quite time consuming on file systems that don't
- * implement holes, like nfs).
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a family of files that acts as a single hdf5
+ * file. The purpose is to be able to split a huge file on a
+ * 64-bit platform, transfer all the <2GB members to a 32-bit
+ * platform, and then access the entire huge file on the 32-bit
+ * platform.
+ *
+ * All family members are logically the same size although their
+ * physical sizes may vary. The logical member size is
+ * determined by looking at the physical size of the first member
+ * when the file is opened. When creating a file family, the
+ * first member is created with a predefined physical size
+ * (actually, this happens when the file family is flushed, and
+ * can be quite time consuming on file systems that don't
+ * implement holes, like nfs).
*
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_family_init_interface
+#define H5_INTERFACE_INIT_FUNC H5FD_family_init_interface
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDfamily.h" /* Family file driver */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDfamily.h" /* Family file driver */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#undef MAX
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
#undef MIN
-#define MIN(X,Y) ((X)<(Y)?(X):(Y))
+#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
/* The driver identification number, initialized at runtime */
static hid_t H5FD_FAMILY_g = 0;
/* The description of a file belonging to this driver. */
typedef struct H5FD_family_t {
- H5FD_t pub; /*public stuff, must be first */
- hid_t memb_fapl_id; /*file access property list for members */
- hsize_t memb_size; /*actual size of each member file */
- hsize_t pmem_size; /*member size passed in from property */
- unsigned nmembs; /*number of family members */
- unsigned amembs; /*number of member slots allocated */
- H5FD_t **memb; /*dynamic array of member pointers */
- haddr_t eoa; /*end of allocated addresses */
- char *name; /*name generator printf format */
- unsigned flags; /*flags for opening additional members */
+ H5FD_t pub; /*public stuff, must be first */
+ hid_t memb_fapl_id; /*file access property list for members */
+ hsize_t memb_size; /*actual size of each member file */
+ hsize_t pmem_size; /*member size passed in from property */
+ unsigned nmembs; /*number of family members */
+ unsigned amembs; /*number of member slots allocated */
+ H5FD_t **memb; /*dynamic array of member pointers */
+ haddr_t eoa; /*end of allocated addresses */
+ char * name; /*name generator printf format */
+ unsigned flags; /*flags for opening additional members */
/* Information from properties set by 'h5repart' tool */
- hsize_t mem_newsize; /*new member size passed in as private
- * property. It's used only by h5repart */
- hbool_t repart_members; /* Whether to mark the superblock dirty
- * when it is loaded, so that the family
- * member sizes can be re-encoded */
+ hsize_t mem_newsize; /*new member size passed in as private
+ * property. It's used only by h5repart */
+ hbool_t repart_members; /* Whether to mark the superblock dirty
+ * when it is loaded, so that the family
+ * member sizes can be re-encoded */
} H5FD_family_t;
/* Driver-specific file access properties */
typedef struct H5FD_family_fapl_t {
- hsize_t memb_size; /*size of each member */
- hid_t memb_fapl_id; /*file access property list of each memb*/
+ hsize_t memb_size; /*size of each member */
+ hid_t memb_fapl_id; /*file access property list of each memb*/
} H5FD_family_fapl_t;
/* Callback prototypes */
-static void *H5FD_family_fapl_get(H5FD_t *_file);
-static void *H5FD_family_fapl_copy(const void *_old_fa);
-static herr_t H5FD_family_fapl_free(void *_fa);
+static void * H5FD_family_fapl_get(H5FD_t *_file);
+static void * H5FD_family_fapl_copy(const void *_old_fa);
+static herr_t H5FD_family_fapl_free(void *_fa);
static hsize_t H5FD_family_sb_size(H5FD_t *_file);
-static herr_t H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/);
-static herr_t H5FD_family_sb_decode(H5FD_t *_file, const char *name,
- const unsigned char *buf);
-static H5FD_t *H5FD_family_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_family_close(H5FD_t *_file);
-static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
+static herr_t H5FD_family_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out*/);
+static herr_t H5FD_family_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf);
+static H5FD_t *H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_family_close(H5FD_t *_file);
+static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
+static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD_family_get_eof(const H5FD_t *_file);
-static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
-static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
-static herr_t H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ void *_buf /*out*/);
+static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ const void *_buf);
+static herr_t H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
- "family", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /*fc_degree */
- H5FD_family_sb_size, /*sb_size */
- H5FD_family_sb_encode, /*sb_encode */
- H5FD_family_sb_decode, /*sb_decode */
- sizeof(H5FD_family_fapl_t), /*fapl_size */
- H5FD_family_fapl_get, /*fapl_get */
- H5FD_family_fapl_copy, /*fapl_copy */
- H5FD_family_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_family_open, /*open */
- H5FD_family_close, /*close */
- H5FD_family_cmp, /*cmp */
- H5FD_family_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_family_get_eoa, /*get_eoa */
- H5FD_family_set_eoa, /*set_eoa */
- H5FD_family_get_eof, /*get_eof */
- H5FD_family_get_handle, /*get_handle */
- H5FD_family_read, /*read */
- H5FD_family_write, /*write */
- H5FD_family_flush, /*flush */
- H5FD_family_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "family", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_WEAK, /*fc_degree */
+ H5FD_family_sb_size, /*sb_size */
+ H5FD_family_sb_encode, /*sb_encode */
+ H5FD_family_sb_decode, /*sb_decode */
+ sizeof(H5FD_family_fapl_t), /*fapl_size */
+ H5FD_family_fapl_get, /*fapl_get */
+ H5FD_family_fapl_copy, /*fapl_copy */
+ H5FD_family_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_family_open, /*open */
+ H5FD_family_close, /*close */
+ H5FD_family_cmp, /*cmp */
+ H5FD_family_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_family_get_eoa, /*get_eoa */
+ H5FD_family_set_eoa, /*set_eoa */
+ H5FD_family_get_eof, /*get_eof */
+ H5FD_family_get_handle, /*get_handle */
+ H5FD_family_read, /*read */
+ H5FD_family_write, /*write */
+ H5FD_family_flush, /*flush */
+ H5FD_family_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
+ H5FD_FLMAP_DICHOTOMY /*fl_map */
};
-
/*--------------------------------------------------------------------------
NAME
H5FD_family_init_interface -- Initialize interface-specific information
@@ -162,32 +157,28 @@ H5FD_family_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_family_init())
} /* H5FD_family_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_init
- *
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Function: H5FD_family_init
*
- * Return: Success: The driver ID for the family driver.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Failure: Negative
+ * Return: Success: The driver ID for the family driver
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
H5FD_family_init(void)
{
- hid_t ret_value = H5FD_FAMILY_g; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if(H5I_VFL != H5I_get_type(H5FD_FAMILY_g))
+ if (H5I_VFL != H5I_get_type(H5FD_FAMILY_g))
H5FD_FAMILY_g = H5FD_register(&H5FD_family_g, sizeof(H5FD_class_t), FALSE);
/* Set return value */
@@ -197,19 +188,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_family_init() */
-
/*---------------------------------------------------------------------------
- * Function: H5FD_family_term
+ * Function: H5FD_family_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Return: <none>
+ * Return: <none>
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
void
@@ -218,116 +206,97 @@ H5FD_family_term(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
- H5FD_FAMILY_g=0;
+ H5FD_FAMILY_g = 0;
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_family_term() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_family
+ * Function: H5Pset_fapl_family
*
- * Purpose: Sets the file access property list FAPL_ID to use the family
- * driver. The MEMB_SIZE is the size in bytes of each file
- * member (used only when creating a new file) and the
- * MEMB_FAPL_ID is a file access property list to be used for
- * each family member.
+ * Purpose: Sets the file access property list FAPL_ID to use the family
+ * driver. The MEMB_SIZE is the size in bytes of each file
+ * member (used only when creating a new file) and the
+ * MEMB_FAPL_ID is a file access property list to be used for
+ * each family member.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id)
{
- herr_t ret_value;
- H5FD_family_fapl_t fa={0, -1};
- H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value;
+ H5FD_family_fapl_t fa = {0, -1};
+ H5P_genplist_t * plist; /* Property list pointer */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ihi", fapl_id, msize, memb_fapl_id);
-
/* Check arguments */
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- if(H5P_DEFAULT == memb_fapl_id)
+ if (H5P_DEFAULT == memb_fapl_id)
memb_fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(memb_fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
+ else if (TRUE != H5P_isa_class(memb_fapl_id, H5P_FILE_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
/*
* Initialize driver specific information. No need to copy it into the FA
* struct since all members will be copied by H5P_set_driver().
*/
- fa.memb_size = msize;
+ fa.memb_size = msize;
fa.memb_fapl_id = memb_fapl_id;
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- ret_value= H5P_set_driver(plist, H5FD_FAMILY, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_FAMILY, &fa);
done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_family
+ * Function: H5Pget_fapl_family
*
- * Purpose: Returns information about the family file access property
- * list though the function arguments.
+ * Purpose: Returns information about the family file access property
+ * list though the function arguments.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/,
- hid_t *memb_fapl_id/*out*/)
+H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /*out*/)
{
- H5FD_family_fapl_t *fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5P_genplist_t * plist; /* Property list pointer */
+ const H5FD_family_fapl_t *fa;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, msize, memb_fapl_id);
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
- if(H5FD_FAMILY != H5P_get_driver(plist))
+ if (H5FD_FAMILY != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if(NULL == (fa = (H5FD_family_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_family_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
- if(msize)
+ if (msize)
*msize = fa->memb_size;
- if(memb_fapl_id) {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
+ if (memb_fapl_id) {
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
*memb_fapl_id = H5P_copy_plist(plist, TRUE);
} /* end if */
@@ -336,134 +305,125 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_get
+ * Function: H5FD_family_fapl_get
*
- * Purpose: Gets a file access property list which could be used to
- * create an identical file.
+ * Purpose: Gets a file access property list which could be used to
+ * create an identical file.
*
- * Return: Success: Ptr to new file access property list.
+ * Return: Success: Ptr to new file access property list.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_family_fapl_get(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- H5FD_family_fapl_t *fa = NULL;
- H5P_genplist_t *plist; /* Property list pointer */
- void *ret_value; /* Return value */
+ H5FD_family_t * file = (H5FD_family_t *)_file;
+ H5FD_family_fapl_t *fa = NULL;
+ H5P_genplist_t * plist; /* Property list pointer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
+ if (NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
fa->memb_size = file->memb_size;
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(file->memb_fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(file->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
fa->memb_fapl_id = H5P_copy_plist(plist, FALSE);
/* Set return value */
- ret_value=fa;
+ ret_value = fa;
done:
- if(ret_value==NULL) {
- if(fa!=NULL)
+ if (ret_value == NULL)
+ if (fa != NULL)
H5MM_xfree(fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_copy
+ * Function: H5FD_family_fapl_copy
*
- * Purpose: Copies the family-specific file access properties.
+ * Purpose: Copies the family-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_family_fapl_copy(const void *_old_fa)
{
- const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa;
- H5FD_family_fapl_t *new_fa = NULL;
- H5P_genplist_t *plist; /* Property list pointer */
- void *ret_value; /* Return value */
+ const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t *)_old_fa;
+ H5FD_family_fapl_t * new_fa = NULL;
+ H5P_genplist_t * plist; /* Property list pointer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
+ if (NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the fields of the structure */
HDmemcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t));
/* Deep copy the property list objects in the structure */
- if(old_fa->memb_fapl_id==H5P_FILE_ACCESS_DEFAULT) {
- if(H5I_inc_ref(new_fa->memb_fapl_id, FALSE)<0)
+ if (old_fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) {
+ if (H5I_inc_ref(new_fa->memb_fapl_id, FALSE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver")
} /* end if */
else {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(old_fa->memb_fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(old_fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
new_fa->memb_fapl_id = H5P_copy_plist(plist, FALSE);
} /* end else */
/* Set return value */
- ret_value=new_fa;
+ ret_value = new_fa;
done:
- if(ret_value==NULL) {
- if(new_fa!=NULL)
+ if (ret_value == NULL)
+ if (new_fa != NULL)
H5MM_xfree(new_fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_free
+ * Function: H5FD_family_fapl_free
*
- * Purpose: Frees the family-specific file access properties.
+ * Purpose: Frees the family-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_fapl_free(void *_fa)
{
- H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_fapl_t *fa = (H5FD_family_fapl_t *)_fa;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if(H5I_dec_ref(fa->memb_fapl_id) < 0)
+ if (H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
H5MM_xfree(fa);
@@ -471,22 +431,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_size
+ * Function: H5FD_family_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hsize_t
@@ -499,31 +456,28 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
FUNC_LEAVE_NOAPI(8)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_encode
+ * Function: H5FD_family_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is the member file size and name template.
+ * The encoding is the member file size and name template.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
+H5FD_family_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_t *file = (H5FD_family_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -544,21 +498,20 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_sb_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_decode
+ * Function: H5FD_family_sb_decode
*
- * Purpose: This function has 2 separate purpose. One is to decodes the
+ * Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
* the eight-character (plus null termination) name stored in i
* the file. The FILE argument is updated according to the
* information in the superblock.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -566,9 +519,9 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
static herr_t
H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- uint64_t msize;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t *)_file;
+ uint64_t msize;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -579,152 +532,137 @@ H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsi
* h5repart is being used to change member file size. h5repart will open
* files for read and write. When the files are closed, metadata will be
* flushed to the files and updated to this new size */
- if(file->mem_newsize) {
+ if (file->mem_newsize)
file->memb_size = file->pmem_size = file->mem_newsize;
- HGOTO_DONE(ret_value)
- } /* end if */
-
- /* Default - use the saved member size */
- if(file->pmem_size == H5F_FAMILY_DEFAULT)
- file->pmem_size = msize;
-
- /* Check if member size from file access property is correct */
- if(msize != file->pmem_size) {
- char err_msg[128];
-
- HDsnprintf(err_msg, sizeof(err_msg), "Family member size should be %lu. But the size from file access property is %lu", (unsigned long)msize, (unsigned long)file->pmem_size);
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, err_msg)
- } /* end if */
-
- /* Update member file size to the size saved in the superblock.
- * That's the size intended to be. */
- file->memb_size = msize;
+ else {
+ /* Default - use the saved member size */
+ if (file->pmem_size == H5F_FAMILY_DEFAULT)
+ file->pmem_size = msize;
+
+ /* Check if member size from file access property is correct */
+ if (msize != file->pmem_size)
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "Family member size should be %lu. But the size from file access property is %lu",
+ (unsigned long)msize, (unsigned long)file->pmem_size)
+
+ /* Update member file size to the size saved in the superblock.
+ * That's the size intended to be. */
+ file->memb_size = msize;
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_sb_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_open
+ * Function: H5FD_family_open
*
- * Purpose: Creates and/or opens a family of files as an HDF5 file.
+ * Purpose: Creates and/or opens a family of files as an HDF5 file.
*
- * Return: Success: A pointer to a new file dat structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file dat structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Thursday, November 18, 2004
- * When file is re-opened, member size passed in from access property
- * is checked to see if it's reasonable. If there is only 1 member
- * file, member size can't be smaller than current member size.
- * If there are at least 2 member files, member size can only be equal
- * the 1st member size.
- *
- * Raymond Lu
- * Tuesday, May 24, 2005
- * The modification described above has been changed. The major checking
- * is done in H5F_read_superblock. Member file size is saved in the
- * superblock now. H5F_read_superblock() reads this saved size and compare
- * to the size passed in from file access property. Wrong size will
- * result in a failure.
- *
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * memb_name & temp in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF("format-nonliteral")
static H5FD_t *
-H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_family_t *file=NULL;
- H5FD_t *ret_value=NULL;
- char memb_name[4096], temp[4096];
- hsize_t eof=HADDR_UNDEF;
- unsigned t_flags = flags & ~H5F_ACC_CREAT;
+ H5FD_family_t *file = NULL;
+ H5FD_t * ret_value = NULL;
+ char memb_name[4096], temp[4096];
+ hsize_t eof = HADDR_UNDEF;
+ unsigned t_flags = flags & ~H5F_ACC_CREAT;
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if(0 == maxaddr || HADDR_UNDEF == maxaddr)
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
/* Initialize file from file access properties */
- if(NULL == (file = (H5FD_family_t *)H5MM_calloc(sizeof(H5FD_family_t))))
+ if (NULL == (file = (H5FD_family_t *)H5MM_calloc(sizeof(H5FD_family_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
- if(H5P_FILE_ACCESS_DEFAULT==fapl_id) {
+ if (H5P_FILE_ACCESS_DEFAULT == fapl_id) {
file->memb_fapl_id = H5P_FILE_ACCESS_DEFAULT;
- if(H5I_inc_ref(file->memb_fapl_id, FALSE) < 0)
+ if (H5I_inc_ref(file->memb_fapl_id, FALSE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver")
- file->memb_size = 1024 * 1024 * 1024; /*1GB. Actual member size to be updated later */
- file->pmem_size = 1024 * 1024 * 1024; /*1GB. Member size passed in through property */
- file->mem_newsize = 0; /*New member size used by h5repart only */
- } /* end if */
+ file->memb_size = 1024 * 1024 * 1024; /*1GB. Actual member size to be updated later */
+ file->pmem_size = 1024 * 1024 * 1024; /*1GB. Member size passed in through property */
+ file->mem_newsize = 0; /*New member size used by h5repart only */
+ } /* end if */
else {
- H5P_genplist_t *plist; /* Property list pointer */
- H5FD_family_fapl_t *fa;
+ H5P_genplist_t * plist; /* Property list pointer */
+ const H5FD_family_fapl_t *fa;
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL == (fa = (H5FD_family_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_family_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
/* Check for new family file size. It's used by h5repart only. */
- if(H5P_exist_plist(plist, H5F_ACS_FAMILY_NEWSIZE_NAME) > 0) {
- hsize_t fam_newsize = 0; /* New member size, when repartitioning */
+ if (H5P_exist_plist(plist, H5F_ACS_FAMILY_NEWSIZE_NAME) > 0) {
+ hsize_t fam_newsize = 0; /* New member size, when repartitioning */
/* Get the new family file size */
- if(H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &fam_newsize) < 0)
+ if (H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &fam_newsize) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size")
/* Store information for later */
- file->mem_newsize = fam_newsize; /* New member size passed in through property */
+ file->mem_newsize = fam_newsize; /* New member size passed in through property */
file->repart_members = TRUE;
} /* end if */
- if(fa->memb_fapl_id==H5P_FILE_ACCESS_DEFAULT) {
- if(H5I_inc_ref(fa->memb_fapl_id, FALSE)<0)
+ if (fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) {
+ if (H5I_inc_ref(fa->memb_fapl_id, FALSE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver")
file->memb_fapl_id = fa->memb_fapl_id;
} /* end if */
else {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
file->memb_fapl_id = H5P_copy_plist(plist, FALSE);
- } /* end else */
+ } /* end else */
file->memb_size = fa->memb_size; /* Actual member size to be updated later */
file->pmem_size = fa->memb_size; /* Member size passed in through property */
- } /* end else */
- file->name = H5MM_strdup(name);
+ } /* end else */
+ file->name = H5MM_strdup(name);
file->flags = flags;
/* Check that names are unique */
HDsnprintf(memb_name, sizeof(memb_name), name, 0);
HDsnprintf(temp, sizeof(temp), name, 1);
- if(!HDstrcmp(memb_name, temp))
+ if (!HDstrcmp(memb_name, temp))
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file names not unique")
/* Open all the family members */
- while(1) {
+ while (1) {
HDsnprintf(memb_name, sizeof(memb_name), name, file->nmembs);
/* Enlarge member array */
- if(file->nmembs >= file->amembs) {
+ if (file->nmembs >= file->amembs) {
unsigned n = MAX(64, 2 * file->amembs);
H5FD_t **x;
HDassert(n > 0);
- if(NULL == (x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *))))
+ if (NULL == (x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to reallocate members")
file->amembs = n;
- file->memb = x;
+ file->memb = x;
} /* end if */
/*
@@ -732,12 +670,14 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
* otherwise an open failure means that we've reached the last member.
* Allow H5F_ACC_CREAT only on the first family member.
*/
- H5E_BEGIN_TRY {
- file->memb[file->nmembs] = H5FDopen(memb_name,
- (0==file->nmembs ? flags : t_flags), file->memb_fapl_id, HADDR_UNDEF);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY
+ {
+ file->memb[file->nmembs] =
+ H5FDopen(memb_name, (0 == file->nmembs ? flags : t_flags), file->memb_fapl_id, HADDR_UNDEF);
+ }
+ H5E_END_TRY;
if (!file->memb[file->nmembs]) {
- if (0==file->nmembs)
+ if (0 == file->nmembs)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open member file")
H5E_clear_stack(NULL);
break;
@@ -745,54 +685,55 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
file->nmembs++;
}
- /* If the file is reopened and there's only one member file existing, this file maybe
+ /* If the file is reopened and there's only one member file existing, this file may be
* smaller than the size specified through H5Pset_fapl_family(). Update the actual
* member size.
*/
- if ((eof=H5FDget_eof(file->memb[0]))) file->memb_size = eof;
+ if ((eof = H5FDget_eof(file->memb[0])))
+ file->memb_size = eof;
- ret_value=(H5FD_t *)file;
+ ret_value = (H5FD_t *)file;
done:
/* Cleanup and fail */
- if(ret_value == NULL && file != NULL) {
- unsigned nerrors = 0; /* Number of errors closing member files */
- unsigned u; /* Local index variable */
+ if (ret_value == NULL && file != NULL) {
+ unsigned nerrors = 0; /* Number of errors closing member files */
+ unsigned u; /* Local index variable */
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
- for(u = 0; u < file->nmembs; u++)
- if(file->memb[u])
- if(H5FD_close(file->memb[u]) < 0)
+ for (u = 0; u < file->nmembs; u++)
+ if (file->memb[u])
+ if (H5FD_close(file->memb[u]) < 0)
nerrors++;
- if(nerrors)
+ if (nerrors)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close member files")
- if(file->memb)
+ if (file->memb)
H5MM_xfree(file->memb);
- if(H5I_dec_ref(file->memb_fapl_id) < 0)
+ if (H5I_dec_ref(file->memb_fapl_id) < 0)
HDONE_ERROR(H5E_VFL, H5E_CANTDEC, NULL, "can't close driver ID")
- if(file->name)
+ if (file->name)
H5MM_xfree(file->name);
H5MM_xfree(file);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_open() */
+H5_GCC_DIAG_ON("format-nonliteral")
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_close
+ * Function: H5FD_family_close
*
- * Purpose: Closes a family of files.
+ * Purpose: Closes a family of files.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -800,29 +741,29 @@ done:
static herr_t
H5FD_family_close(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned nerrors = 0; /* Number of errors while closing member files */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t *)_file;
+ unsigned nerrors = 0; /* Number of errors while closing member files */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
- for(u = 0; u < file->nmembs; u++) {
- if(file->memb[u]) {
- if(H5FD_close(file->memb[u]) < 0)
+ for (u = 0; u < file->nmembs; u++) {
+ if (file->memb[u]) {
+ if (H5FD_close(file->memb[u]) < 0)
nerrors++;
else
file->memb[u] = NULL;
} /* end if */
- } /* end for */
- if(nerrors)
+ } /* end for */
+ if (nerrors)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close member files")
/* Clean up other stuff */
- if(H5I_dec_ref(file->memb_fapl_id) < 0)
+ if (H5I_dec_ref(file->memb_fapl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
H5MM_xfree(file->memb);
@@ -832,220 +773,211 @@ H5FD_family_close(H5FD_t *_file)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_cmp
+ * Function: H5FD_family_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first member of the two families.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first member of the two families.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
- const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
- int ret_value=(H5FD_VFD_DEFAULT);
+ const H5FD_family_t *f1 = (const H5FD_family_t *)_f1;
+ const H5FD_family_t *f2 = (const H5FD_family_t *)_f2;
+ int ret_value = (H5FD_VFD_DEFAULT);
FUNC_ENTER_NOAPI_NOINIT_NOERR
- assert(f1->nmembs>=1 && f1->memb[0]);
- assert(f2->nmembs>=1 && f2->memb[0]);
+ HDassert(f1->nmembs >= 1 && f1->memb[0]);
+ HDassert(f2->nmembs >= 1 && f2->memb[0]);
- ret_value= H5FDcmp(f1->memb[0], f2->memb[0]);
+ ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_query
+ * Function: H5FD_family_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
-H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
+H5FD_family_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
+ const H5FD_family_t *file = (const H5FD_family_t *)_file; /* Family VFD info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
*flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes. */
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
*flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
/* Check for flags that are set by h5repart */
- if(file && file->repart_members)
- *flags |= H5FD_FEAT_DIRTY_SBLK_LOAD; /* Mark the superblock dirty when it is loaded (so the family member sizes are rewritten) */
- } /* end if */
+ if (file && file->repart_members)
+ *flags |= H5FD_FEAT_DIRTY_SBLK_LOAD; /* Mark the superblock dirty when it is loaded (so the family
+ member sizes are rewritten) */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_query() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eoa
+ * Function: H5FD_family_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
+ const H5FD_family_t *file = (const H5FD_family_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_set_eoa
+ * Function: H5FD_family_set_eoa
*
- * Purpose: Set the end-of-address marker for the file.
+ * Purpose: Set the end-of-address marker for the file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() call with
+ * memb_name in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- haddr_t addr = abs_eoa;
- char memb_name[4096];
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t *)_file;
+ haddr_t addr = abs_eoa;
+ char memb_name[4096];
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- for(u = 0; addr || u < file->nmembs; u++) {
+ for (u = 0; addr || u < file->nmembs; u++) {
/* Enlarge member array */
- if(u >= file->amembs) {
+ if (u >= file->amembs) {
unsigned n = MAX(64, 2 * file->amembs);
H5FD_t **x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *));
- if(!x)
+ if (!x)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block")
file->amembs = n;
- file->memb = x;
+ file->memb = x;
file->nmembs = u;
} /* end if */
/* Create another file if necessary */
- if(u >= file->nmembs || !file->memb[u]) {
- file->nmembs = MAX(file->nmembs, u+1);
+ if (u >= file->nmembs || !file->memb[u]) {
+ file->nmembs = MAX(file->nmembs, u + 1);
HDsnprintf(memb_name, sizeof(memb_name), file->name, u);
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5_CHECK_OVERFLOW(file->memb_size, hsize_t, haddr_t);
- file->memb[u] = H5FDopen(memb_name, file->flags | H5F_ACC_CREAT,
- file->memb_fapl_id, (haddr_t)file->memb_size);
- } H5E_END_TRY;
- if(NULL == file->memb[u])
+ file->memb[u] = H5FDopen(memb_name, file->flags | H5F_ACC_CREAT, file->memb_fapl_id,
+ (haddr_t)file->memb_size);
+ }
+ H5E_END_TRY;
+ if (NULL == file->memb[u])
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open member file")
} /* end if */
/* Set the EOA marker for the member */
/* (Note compensating for base address addition in internal routine) */
H5_CHECK_OVERFLOW(file->memb_size, hsize_t, haddr_t);
- if(addr > (haddr_t)file->memb_size) {
- if(H5FD_set_eoa(file->memb[u], type, ((haddr_t)file->memb_size - file->pub.base_addr)) < 0)
+ if (addr > (haddr_t)file->memb_size) {
+ if (H5FD_set_eoa(file->memb[u], type, ((haddr_t)file->memb_size - file->pub.base_addr)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa")
addr -= file->memb_size;
} /* end if */
else {
- if(H5FD_set_eoa(file->memb[u], type, (addr - file->pub.base_addr)) < 0)
+ if (H5FD_set_eoa(file->memb[u], type, (addr - file->pub.base_addr)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa")
addr = 0;
} /* end else */
- } /* end for */
+ } /* end for */
file->eoa = abs_eoa;
done:
FUNC_LEAVE_NOAPI(ret_value)
}
+H5_GCC_DIAG_ON("format-nonliteral")
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eof
+ * Function: H5FD_family_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total family size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total family size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the family of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the family of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_family_get_eof(const H5FD_t *_file)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
- haddr_t eof=0;
- int i; /* Local index variable */
- haddr_t ret_value; /* Return value */
+ const H5FD_family_t *file = (const H5FD_family_t *)_file;
+ haddr_t eof = 0;
+ int i; /* Local index variable */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1055,10 +987,10 @@ H5FD_family_get_eof(const H5FD_t *_file)
* loop with i==0.
*/
HDassert(file->nmembs > 0);
- for(i = (int)file->nmembs - 1; i >= 0; --i) {
- if((eof = H5FD_get_eof(file->memb[i])) != 0)
+ for (i = (int)file->nmembs - 1; i >= 0; --i) {
+ if ((eof = H5FD_get_eof(file->memb[i])) != 0)
break;
- if(0 == i)
+ if (0 == i)
break;
} /* end for */
@@ -1069,7 +1001,7 @@ H5FD_family_get_eof(const H5FD_t *_file)
* The file size is the number of members before the i'th member plus the
* size of the i'th member.
*/
- eof += ((unsigned)i)*file->memb_size;
+ eof += ((unsigned)i) * file->memb_size;
/* Set return value */
ret_value = MAX(eof, file->eoa);
@@ -1077,7 +1009,6 @@ H5FD_family_get_eof(const H5FD_t *_file)
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_family_get_handle
*
@@ -1088,30 +1019,28 @@ H5FD_family_get_eof(const H5FD_t *_file)
* Programmer: Raymond Lu
* Sept. 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
{
- H5FD_family_t *file = (H5FD_family_t *)_file;
- H5P_genplist_t *plist;
- hsize_t offset;
- int memb;
- herr_t ret_value;
+ H5FD_family_t * file = (H5FD_family_t *)_file;
+ H5P_genplist_t *plist;
+ hsize_t offset;
+ int memb;
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get the plist structure and family offset */
- if(NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
- if(H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0)
+ if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get offset for family driver")
- if(offset > (file->memb_size * file->nmembs))
+ if (offset > (file->memb_size * file->nmembs))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "offset is bigger than file size")
- memb = (int)(offset/file->memb_size);
+ memb = (int)(offset / file->memb_size);
ret_value = H5FD_get_vfd_handle(file->memb[memb], fapl, file_handle);
@@ -1119,38 +1048,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_read
+ * Function: H5FD_family_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *_buf/*out*/)
+H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *_buf /*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned char *buf = (unsigned char*)_buf;
- haddr_t sub;
- size_t req;
- hsize_t tempreq;
- unsigned u; /* Local index variable */
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_family_t * file = (H5FD_family_t *)_file;
+ unsigned char * buf = (unsigned char *)_buf;
+ haddr_t sub;
+ size_t req;
+ hsize_t tempreq;
+ unsigned u; /* Local index variable */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1158,26 +1083,26 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
* Get the member data transfer property list. If the transfer property
* list does not belong to this driver then assume defaults
*/
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Read from each member */
- while(size > 0) {
+ while (size > 0) {
H5_CHECKED_ASSIGN(u, unsigned, addr / file->memb_size, hsize_t);
sub = addr % file->memb_size;
- /* This check is for mainly for IA32 architecture whose size_t's size
- * is 4 bytes, to prevent overflow when user application is trying to
- * write files bigger than 4GB. */
- tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ /* This check is for mainly for IA32 architecture whose size_t's size
+ * is 4 bytes, to prevent overflow when user application is trying to
+ * write files bigger than 4GB. */
+ tempreq = file->memb_size - sub;
+ if (tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u<file->nmembs);
+ HDassert(u < file->nmembs);
- if (H5FDread(file->memb[u], type, dxpl_id, sub, req, buf)<0)
+ if (H5FDread(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed")
addr += req;
@@ -1189,37 +1114,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_write
+ * Function: H5FD_family_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- const void *_buf)
+H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *_buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- const unsigned char *buf = (const unsigned char*)_buf;
- haddr_t sub;
- size_t req;
- hsize_t tempreq;
- unsigned u; /* Local index variable */
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t * file = (H5FD_family_t *)_file;
+ const unsigned char *buf = (const unsigned char *)_buf;
+ haddr_t sub;
+ size_t req;
+ hsize_t tempreq;
+ unsigned u; /* Local index variable */
+ H5P_genplist_t * plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1227,11 +1148,11 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
* Get the member data transfer property list. If the transfer property
* list does not belong to this driver then assume defaults.
*/
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Write to each member */
- while (size>0) {
+ while (size > 0) {
H5_CHECKED_ASSIGN(u, unsigned, addr / file->memb_size, hsize_t);
sub = addr % file->memb_size;
@@ -1239,14 +1160,14 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
/* This check is for mainly for IA32 architecture whose size_t's size
* is 4 bytes, to prevent overflow when user application is trying to
* write files bigger than 4GB. */
- tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ tempreq = file->memb_size - sub;
+ if (tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u<file->nmembs);
+ HDassert(u < file->nmembs);
- if (H5FDwrite(file->memb[u], type, dxpl_id, sub, req, buf)<0)
+ if (H5FDwrite(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "member file write failed")
addr += req;
@@ -1258,16 +1179,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_flush
+ * Function: H5FD_family_flush
*
- * Purpose: Flushes all family members.
+ * Purpose: Flushes all family members.
*
- * Return: Success: 0
- * Failure: -1, as many files flushed as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1275,34 +1195,33 @@ done:
static herr_t
H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t *)_file;
+ unsigned u, nerrors = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- for(u = 0; u < file->nmembs; u++)
- if(file->memb[u] && H5FD_flush(file->memb[u], dxpl_id, closing) < 0)
+ for (u = 0; u < file->nmembs; u++)
+ if (file->memb[u] && H5FD_flush(file->memb[u], dxpl_id, closing) < 0)
nerrors++;
- if(nerrors)
+ if (nerrors)
HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_flush() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_family_truncate
+ * Function: H5FD_family_truncate
*
- * Purpose: Truncates all family members.
+ * Purpose: Truncates all family members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files truncated as possible.
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, February 23, 2008
*
*-------------------------------------------------------------------------
@@ -1310,20 +1229,19 @@ done:
static herr_t
H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t *)_file;
+ unsigned u, nerrors = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- for(u = 0; u < file->nmembs; u++)
- if(file->memb[u] && H5FD_truncate(file->memb[u], dxpl_id, closing) < 0)
+ for (u = 0; u < file->nmembs; u++)
+ if (file->memb[u] && H5FD_truncate(file->memb[u], dxpl_id, closing) < 0)
nerrors++;
- if(nerrors)
+ if (nerrors)
HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_truncate() */
-
diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h
index 7dde5b8..9d57f15 100644
--- a/src/H5FDfamily.h
+++ b/src/H5FDfamily.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 4, 1999
*
* Purpose: The public header file for the family driver.
@@ -20,20 +20,16 @@
#ifndef H5FDfamily_H
#define H5FDfamily_H
-#include "H5Ipublic.h"
-
-#define H5FD_FAMILY (H5FD_family_init())
+#define H5FD_FAMILY (H5FD_family_init())
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_family_init(void);
-H5_DLL void H5FD_family_term(void);
-H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size,
- hid_t memb_fapl_id);
-H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size/*out*/,
- hid_t *memb_fapl_id/*out*/);
+H5_DLL hid_t H5FD_family_init(void);
+H5_DLL void H5FD_family_term(void);
+H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size, hid_t memb_fapl_id);
+H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size /*out*/, hid_t *memb_fapl_id /*out*/);
#ifdef __cplusplus
}
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
new file mode 100644
index 0000000..5a11e44
--- /dev/null
+++ b/src/H5FDhdfs.c
@@ -0,0 +1,1698 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Read-Only HDFS Virtual File Driver (VFD) *
+ * Copyright (c) 2018, The HDF Group. *
+ * *
+ * All rights reserved. *
+ * *
+ * NOTICE: *
+ * All information contained herein is, and remains, the property of The HDF *
+ * Group. The intellectual and technical concepts contained herein are *
+ * proprietary to The HDF Group. Dissemination of this information or *
+ * reproduction of this material is strictly forbidden unless prior written *
+ * permission is obtained from The HDF Group. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Jacob Smith
+ * 2018-04-23
+ *
+ * Purpose: Provide read-only access to files on the Hadoop Distributed
+ * File System (HDFS).
+ */
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_hdfs_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDhdfs.h" /* hdfs file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+
+#ifdef H5_HAVE_LIBHDFS
+
+/* HDFS routines
+ * Have to turn off -Wstrict-prototypes as this header contains functions
+ * defined as foo() instead of foo(void), which triggers warnings that HDF5
+ * then interprets as errors.
+ * -Wundef isn't interpreted as an error by HDF5, but the header does do
+ * some bad symbol interpretation that raises a warning that is out of our
+ * control.
+ */
+H5_GCC_DIAG_OFF("strict-prototypes")
+H5_GCC_DIAG_OFF("undef")
+#include <hdfs.h>
+H5_GCC_DIAG_ON("strict-prototypes")
+H5_GCC_DIAG_ON("undef")
+
+/* toggle function call prints: 1 turns on */
+#define HDFS_DEBUG 0
+
+/* toggle stats collection and reporting */
+#define HDFS_STATS 0
+
+/* The driver identification number, initialized at runtime */
+static hid_t H5FD_HDFS_g = 0;
+
+#if HDFS_STATS
+
+/* arbitrarily large value, such that any reasonable size read will be "less"
+ * than this value and set a true minimum
+ * not 0 because that may be a valid recorded minimum in degenerate cases
+ */
+#define HDFS_STATS_STARTING_MIN 0xfffffffful
+
+/* Configuration definitions for stats collection and breakdown
+ *
+ * 2^10 = 1024
+ * Reads up to 1024 bytes (1 kB) fall in bin 0
+ * 2^(10+(1*16)) = 2^26 = 64MB
+ * Reads of 64MB or greater fall in "overflow" bin[BIN_COUNT]
+ */
+#define HDFS_STATS_BASE 2
+#define HDFS_STATS_INTERVAL 1
+#define HDFS_STATS_START_POWER 10
+#define HDFS_STATS_BIN_COUNT 16 /* MUST BE GREATER THAN 0 */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Calculate `BASE ^ (START_POWER + (INTERVAL * bin_i))`
+ * Stores result at `(unsigned long long *) out_ptr`.
+ * Used in computing boundaries between stats bins.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ */
+#define HDFS_STATS_POW(bin_i, out_ptr) \
+ { \
+ unsigned long long donotshadowresult = 1; \
+ unsigned donotshadowindex = 0; \
+ for (donotshadowindex = 0; \
+ donotshadowindex < (((bin_i)*HDFS_STATS_INTERVAL) + HDFS_STATS_START_POWER); \
+ donotshadowindex++) { \
+ donotshadowresult *= HDFS_STATS_BASE; \
+ } \
+ *(out_ptr) = donotshadowresult; \
+ }
+
+/* array to hold pre-computed boundaries for stats bins */
+static unsigned long long hdfs_stats_boundaries[HDFS_STATS_BIN_COUNT];
+
+/***************************************************************************
+ *
+ * Structure: hdfs_statsbin
+ *
+ * Purpose:
+ *
+ * Structure for storing per-file hdfs VFD usage statistics.
+ *
+ *
+ *
+ * `count` (unsigned long long)
+ *
+ * Number of reads with size in this bin's range.
+ *
+ * `bytes` (unsigned long long)
+ *
+ * Total number of bytes read through this bin.
+ *
+ * `min` (unsigned long long)
+ *
+ * Smallest read size in this bin.
+ *
+ * `max` (unsigned long long)
+ *
+ * Largest read size in this bin.
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ *
+ ***************************************************************************/
+typedef struct {
+ unsigned long long count;
+ unsigned long long bytes;
+ unsigned long long min;
+ unsigned long long max;
+} hdfs_statsbin;
+
+#endif /* HDFS_STATS */
+
+/* "unique" identifier for `hdfs_t` structures.
+ * Randomly generated by unweighted dice rolls.
+ */
+#define HDFS_HDFST_MAGIC 0x1AD5DE84
+
+/***************************************************************************
+ *
+ * Structure: hdfs_t
+ *
+ * Purpose:
+ *
+ * Contain/retain information associated with a file hosted on Hadoop
+ * Distributed File System (HDFS). Instantiated and populated via
+ * `H5FD__hdfs_handle_open()` and cleaned up via `H5FD_hdfs_handle_close()`.
+ *
+ * `magic` (unisgned long)
+ *
+ * Number to indicate that this structure is of the promised
+ * type and should still be valid; should be HDFS_HDFST_MAGIC throughout
+ * the lifespan of the structure. Upon deletion of the structure, the
+ * programmer should set magic to anything but HDFS_HDFST_MAGIC, to
+ * indicate that the structure is to no longer be trusted.
+ *
+ * `filesystem` (hdfsFS)
+ *
+ * A libhdfs file system handle.
+ *
+ * `fileinfo` (hdfsFileInfo*)
+ *
+ * A pointer to a libhdfs file info structure.
+ *
+ * `file` (hdfsFile)
+ *
+ * A libhdfs file handle.
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ * May 2018
+ *
+ ***************************************************************************
+ */
+typedef struct {
+ unsigned long magic;
+ hdfsFS filesystem;
+ hdfsFileInfo *fileinfo;
+ hdfsFile file;
+} hdfs_t;
+
+/***************************************************************************
+ *
+ * Structure: H5FD_hdfs_t
+ *
+ * Purpose:
+ *
+ * H5FD_hdfs_t is a structure used to store all information needed to
+ * maintain R/O access to a single HDF5 file in an HDFS file system.
+ * This structure is created when such a file is "opened" and
+ * discarded when it is "closed".
+ *
+ *
+ * `pub` (H5FD_t)
+ *
+ * Instance of H5FD_t which contains all fields common to all VFDs.
+ * It must be the first item in this structure, since at higher levels,
+ * this structure will be treated as an instance of H5FD_t.
+ *
+ * `fa` (H5FD_hdfs_fapl_t)
+ *
+ * Instance of `H5FD_hdfs_fapl_t` containing the HDFS configuration data
+ * needed to "open" the HDF5 file.
+ *
+ * `eoa` (haddr_t)
+ *
+ * End of addressed space in file. After open, it should always
+ * equal the file size.
+ *
+ * `hdfs_handle` (hdfs_t *)
+ *
+ * Instance of HDFS Request handle associated with the target resource.
+ * Responsible for communicating with remote host and presenting file
+ * contents as indistinguishable from a file on the local filesystem.
+ *
+ * *** present only if HDFS_SATS is flagged to enable stats collection ***
+ *
+ * `meta` (hdfs_statsbin[])
+ * `raw` (hdfs_statsbin[])
+ *
+ * Only present if hdfs stats collection is enabled.
+ *
+ * Arrays of `hdfs_statsbin` structures to record raw- and metadata reads.
+ *
+ * Records count and size of reads performed by the VFD, and is used to
+ * print formatted usage statistics to stdout upon VFD shutdown.
+ *
+ * Reads of each raw- and metadata type are recorded in an individual bin
+ * determined by the size of the read. The last bin of each type is
+ * reserved for "big" reads, with no defined upper bound.
+ *
+ * *** end HDFS_STATS ***
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ *
+ ***************************************************************************/
+typedef struct H5FD_hdfs_t {
+ H5FD_t pub;
+ H5FD_hdfs_fapl_t fa;
+ haddr_t eoa;
+ hdfs_t * hdfs_handle;
+#if HDFS_STATS
+ hdfs_statsbin meta[HDFS_STATS_BIN_COUNT + 1];
+ hdfs_statsbin raw[HDFS_STATS_BIN_COUNT + 1];
+#endif
+} H5FD_hdfs_t;
+
+/*
+ * These macros check for overflow of various quantities. These macros
+ * assume that HDoff_t is signed and haddr_t and size_t are unsigned.
+ *
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
+ * Only included if HDFS code should compile.
+ *
+ */
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+
+/* Prototypes */
+static void * H5FD_hdfs_fapl_get(H5FD_t *_file);
+static void * H5FD_hdfs_fapl_copy(const void *_old_fa);
+static herr_t H5FD_hdfs_fapl_free(void *_fa);
+static H5FD_t *H5FD_hdfs_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_hdfs_close(H5FD_t *_file);
+static int H5FD_hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_hdfs_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD_hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD_hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD_hdfs_get_eof(const H5FD_t *_file);
+static herr_t H5FD_hdfs_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_hdfs_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_hdfs_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_hdfs_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+
+static herr_t H5FD_hdfs_validate_config(const H5FD_hdfs_fapl_t *fa);
+
+static const H5FD_class_t H5FD_hdfs_g = {
+ "hdfs", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_hdfs_fapl_t), /* fapl_size */
+ H5FD_hdfs_fapl_get, /* fapl_get */
+ H5FD_hdfs_fapl_copy, /* fapl_copy */
+ H5FD_hdfs_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_hdfs_open, /* open */
+ H5FD_hdfs_close, /* close */
+ H5FD_hdfs_cmp, /* cmp */
+ H5FD_hdfs_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_hdfs_get_eoa, /* get_eoa */
+ H5FD_hdfs_set_eoa, /* set_eoa */
+ H5FD_hdfs_get_eof, /* get_eof */
+ H5FD_hdfs_get_handle, /* get_handle */
+ H5FD_hdfs_read, /* read */
+ H5FD_hdfs_write, /* write */
+ NULL, /* flush */
+ H5FD_hdfs_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
+};
+
+/* Declare a free list to manage the H5FD_hdfs_t struct */
+H5FL_DEFINE_STATIC(H5FD_hdfs_t);
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ FUNC_LEAVE_NOAPI(H5FD_hdfs_init())
+} /* H5FD_hdfs_init_interface() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_init
+ *
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
+ *
+ * Return: Success: The driver ID for the hdfs driver.
+ * Failure: Negative
+ *
+ * Programmer: Jacob Smith, 2018
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5FD_hdfs_init(void)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+#if HDFS_STATS
+ unsigned int bin_i;
+#endif
+
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (H5I_VFL != H5I_get_type(H5FD_HDFS_g))
+ H5FD_HDFS_g = H5FD_register(&H5FD_hdfs_g, sizeof(H5FD_class_t), FALSE);
+
+#if HDFS_STATS
+ /* pre-compute statsbin boundaries
+ */
+ for (bin_i = 0; bin_i < HDFS_STATS_BIN_COUNT; bin_i++) {
+ unsigned long long value = 0;
+
+ HDFS_STATS_POW(bin_i, &value)
+ hdfs_stats_boundaries[bin_i] = value;
+ }
+#endif
+
+ ret_value = H5FD_HDFS_g;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_hdfs_init() */
+
+/*---------------------------------------------------------------------------
+ * Function: H5FD_hdfs_term
+ *
+ * Purpose: Shut down the VFD
+ *
+ * Returns: <none>
+ *
+ * Programmer: Jacob Smith 2018
+ *
+ *---------------------------------------------------------------------------
+ */
+void
+H5FD_hdfs_term(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Reset VFL ID */
+ H5FD_HDFS_g = 0;
+
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5FD_hdfs_term() */
+
+/*--------------------------------------------------------------------------
+ * Function: H5FD_hdfs_handle_open
+ *
+ * Purpose: Create a HDFS file handle, 'opening' the target file.
+ *
+ * Return: Success: Pointer to HDFS container/handle of opened file.
+ * Failure: NULL
+ *
+ * Programmer: Gerd Herber
+ * May 2018
+ *
+ *--------------------------------------------------------------------------
+ */
+static hdfs_t *
+H5FD_hdfs_handle_open(const char *path, const char *namenode_name, const int32_t namenode_port,
+ const char *user_name, const char *kerberos_ticket_cache,
+ const int32_t stream_buffer_size)
+{
+ struct hdfsBuilder *builder = NULL;
+ hdfs_t * handle = NULL;
+ hdfs_t * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (path == NULL || path[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "path cannot be null")
+ if (namenode_name == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode name cannot be null")
+ if (namenode_port < 0 || namenode_port > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode port must be non-negative and <= 65535")
+ if (stream_buffer_size < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "buffer size must non-negative")
+
+ handle = (hdfs_t *)H5MM_malloc(sizeof(hdfs_t));
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle")
+
+ handle->magic = (unsigned long)HDFS_HDFST_MAGIC;
+ handle->filesystem = NULL; /* TODO: not a pointer; NULL may cause bug */
+ handle->fileinfo = NULL;
+ handle->file = NULL; /* TODO: not a pointer; NULL may cause bug */
+
+ builder = hdfsNewBuilder();
+ if (!builder)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) failed to create builder")
+ hdfsBuilderSetNameNode(builder, namenode_name);
+ hdfsBuilderSetNameNodePort(builder, (tPort)namenode_port);
+ if (user_name != NULL && user_name[0] != '\0')
+ hdfsBuilderSetUserName(builder, user_name);
+ if (kerberos_ticket_cache != NULL && kerberos_ticket_cache[0] != '\0')
+ hdfsBuilderSetKerbTicketCachePath(builder, kerberos_ticket_cache);
+
+ /* Call to `hdfsBuilderConnect` releases builder, regardless of success. */
+ handle->filesystem = hdfsBuilderConnect(builder);
+ if (!handle->filesystem)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) could not connect to default namenode")
+ handle->fileinfo = hdfsGetPathInfo(handle->filesystem, path);
+ if (!handle->fileinfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "hdfsGetPathInfo failed")
+ handle->file = hdfsOpenFile(handle->filesystem, path, O_RDONLY, stream_buffer_size, 0, 0);
+ if (!handle->file)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "(hdfs) could not open")
+
+ ret_value = handle;
+
+done:
+ if (ret_value == NULL && handle != NULL) {
+ /* error; clean up */
+ HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ handle->magic++;
+ if (handle->file != NULL)
+ if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close hdfs file handle")
+ if (handle->fileinfo != NULL)
+ hdfsFreeFileInfo(handle->fileinfo, 1);
+ if (handle->filesystem != NULL)
+ if (FAIL == (hdfsDisconnect(handle->filesystem)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to disconnect from hdfs")
+ H5MM_xfree(handle);
+ }
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_handle_open() */
+
+/*--------------------------------------------------------------------------
+ * Function: H5FD_hdfs_handle_close
+ *
+ * Purpose: 'Close' an HDFS file container/handle, releasing underlying
+ * resources.
+ *
+ * Return: Success: `SUCCEED` (0)
+ * Failure: `FAIL` (-1)
+ *
+ * Programmer: Gerd Herber
+ * May 2018
+ *
+ *--------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_handle_close(hdfs_t *handle)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null")
+ if (handle->magic != HDFS_HDFST_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic")
+
+ handle->magic++;
+ if (handle->file != NULL)
+ if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close hdfs file handle")
+ if (handle->fileinfo != NULL)
+ hdfsFreeFileInfo(handle->fileinfo, 1);
+ if (handle->filesystem != NULL)
+ if (FAIL == (hdfsDisconnect(handle->filesystem)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to disconnect hdfs file system")
+
+ H5MM_xfree(handle);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_handle_close() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_validate_config()
+ *
+ * Purpose: Test to see if the supplied instance of H5FD_hdfs_fapl_t
+ * contains internally consistant data. Return SUCCEED if so,
+ * and FAIL otherwise.
+ *
+ * Note the difference between internally consistant and
+ * correct. As we will have to try to access the target
+ * object to determine whether the supplied data is correct,
+ * we will settle for internal consistancy at this point
+ *
+ * Return: SUCCEED if instance of H5FD_hdfs_fapl_t contains internally
+ * consistant data, FAIL otherwise.
+ *
+ * Programmer: Jacob Smith
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_validate_config(const H5FD_hdfs_fapl_t *fa)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(fa != NULL);
+
+ if (fa->version != H5FD__CURR_HDFS_FAPL_T_VERSION)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_hdfs_fapl_t version");
+ if (fa->namenode_port > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid namenode port number");
+ if (fa->namenode_port < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid namenode port number");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_validate_config() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_fapl_hdfs
+ *
+ * Purpose: Modify the file access property list to use the H5FD_HDFS
+ * driver defined in this source file. All driver specific
+ * properties are passed in as a pointer to a suitably
+ * initialized instance of H5FD_hdfs_fapl_t
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith 2018
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
+{
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", fapl_id, fa);
+
+ HDassert(fa != NULL);
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
+ if (plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ if (FAIL == H5FD_hdfs_validate_config(fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid hdfs config")
+
+ ret_value = H5P_set_driver(plist, H5FD_HDFS, (void *)fa);
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Pset_fapl_hdfs() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_fapl_hdfs
+ *
+ * Purpose: Returns information about the hdfs file access property
+ * list though the function arguments.
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: John Mainzer
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out)
+{
+ const H5FD_hdfs_fapl_t *fa = NULL;
+ H5P_genplist_t * plist = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", fapl_id, fa_out);
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (fa_out == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_out is NULL")
+
+ plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
+ if (plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
+
+ if (H5FD_HDFS != H5P_get_driver(plist))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
+
+ fa = (const H5FD_hdfs_fapl_t *)H5P_get_driver_info(plist);
+ if (fa == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
+
+ /* Copy the hdfs fapl data out */
+ HDmemcpy(fa_out, fa, sizeof(H5FD_hdfs_fapl_t));
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Pget_fapl_hdfs() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_fapl_get
+ *
+ * Purpose: Gets a file access property list which could be used to
+ * create an identical file.
+ *
+ * Return: Success: Ptr to new file access property list value.
+ *
+ * Failure: NULL
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5FD_hdfs_fapl_get(H5FD_t *_file)
+{
+ H5FD_hdfs_t * file = (H5FD_hdfs_t *)_file;
+ H5FD_hdfs_fapl_t *fa = NULL;
+ void * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ fa = (H5FD_hdfs_fapl_t *)H5MM_calloc(sizeof(H5FD_hdfs_fapl_t));
+ if (fa == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed")
+
+ /* Copy the fields of the structure */
+ HDmemcpy(fa, &(file->fa), sizeof(H5FD_hdfs_fapl_t));
+
+ ret_value = fa;
+
+done:
+ if (ret_value == NULL && fa != NULL)
+ H5MM_xfree(fa); /* clean up on error */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_fapl_get() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_fapl_copy
+ *
+ * Purpose: Copies the hdfs-specific file access properties.
+ *
+ * Return: Success: Ptr to a new property list
+ *
+ * Failure: NULL
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5FD_hdfs_fapl_copy(const void *_old_fa)
+{
+ const H5FD_hdfs_fapl_t *old_fa = (const H5FD_hdfs_fapl_t *)_old_fa;
+ H5FD_hdfs_fapl_t * new_fa = NULL;
+ void * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ new_fa = (H5FD_hdfs_fapl_t *)H5MM_malloc(sizeof(H5FD_hdfs_fapl_t));
+ if (new_fa == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed")
+
+ HDmemcpy(new_fa, old_fa, sizeof(H5FD_hdfs_fapl_t));
+ ret_value = new_fa;
+
+done:
+ if (ret_value == NULL && new_fa != NULL)
+ H5MM_xfree(new_fa); /* clean up on error */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_fapl_copy() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_fapl_free
+ *
+ * Purpose: Frees the hdfs-specific file access properties.
+ *
+ * Return: SUCCEED (cannot fail)
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_fapl_free(void *_fa)
+{
+ H5FD_hdfs_fapl_t *fa = (H5FD_hdfs_fapl_t *)_fa;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(fa != NULL); /* sanity check */
+
+ H5MM_xfree(fa);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD_hdfs_fapl_free() */
+
+#if HDFS_STATS
+/*----------------------------------------------------------------------------
+ *
+ * Function: hdfs_reset_stats()
+ *
+ * Purpose:
+ *
+ * Reset the stats collection elements in this virtual file structure.
+ *
+ * Clears any set data in stats bins; initializes/zeroes values.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - Occurs if the file is invalid somehow
+ *
+ * Programmer: Jacob Smith
+ * 2017-12-08
+ *
+ *----------------------------------------------------------------------------
+ */
+static herr_t
+hdfs_reset_stats(H5FD_hdfs_t *file)
+{
+ unsigned i = 0;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null")
+
+ for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ file->raw[i].bytes = 0;
+ file->raw[i].count = 0;
+ file->raw[i].min = (unsigned long long)HDFS_STATS_STARTING_MIN;
+ file->raw[i].max = 0;
+
+ file->meta[i].bytes = 0;
+ file->meta[i].count = 0;
+ file->meta[i].min = (unsigned long long)HDFS_STATS_STARTING_MIN;
+ file->meta[i].max = 0;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* hdfs_reset_stats */
+#endif /* HDFS_STATS */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_open()
+ *
+ * Purpose:
+ *
+ * Create and/or opens a file as an HDF5 file.
+ *
+ * Any flag except H5F_ACC_RDONLY will cause an error.
+ *
+ * Return:
+ *
+ * Success: A pointer to a new file data structure.
+ * The public fields will be initialized by the caller, which is
+ * always H5FD_open().
+ *
+ * Failure: NULL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5FD_t *
+H5FD_hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+{
+ H5FD_t * ret_value = NULL;
+ H5FD_hdfs_t * file = NULL;
+ hdfs_t * handle = NULL;
+ H5FD_hdfs_fapl_t fa;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif /* HDFS_DEBUG */
+
+ /* Sanity check on file offsets */
+ HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
+
+ /* Check arguments */
+ if (!path || !*path)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
+ if (ADDR_OVERFLOW(maxaddr))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
+ if (flags != H5F_ACC_RDONLY)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed")
+ if (fapl_id == H5P_DEFAULT || fapl_id == H5P_FILE_ACCESS_DEFAULT)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "fapl cannot be H5P_DEFAULT")
+ if (FAIL == H5Pget_fapl_hdfs(fapl_id, &fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list")
+
+ handle = H5FD_hdfs_handle_open(path, fa.namenode_name, fa.namenode_port, fa.user_name,
+ fa.kerberos_ticket_cache, fa.stream_buffer_size);
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open")
+
+ HDassert(handle->magic == HDFS_HDFST_MAGIC);
+
+ /* Create new file struct */
+ file = H5FL_CALLOC(H5FD_hdfs_t);
+ if (file == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct")
+ file->hdfs_handle = handle;
+ HDmemcpy(&(file->fa), &fa, sizeof(H5FD_hdfs_fapl_t));
+
+#if HDFS_STATS
+ if (FAIL == hdfs_reset_stats(file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics")
+#endif /* HDFS_STATS */
+
+ ret_value = (H5FD_t *)file;
+
+done:
+ if (ret_value == NULL) {
+ if (handle != NULL)
+ if (FAIL == H5FD_hdfs_handle_close(handle))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close HDFS file handle")
+ if (file != NULL)
+ file = H5FL_FREE(H5FD_hdfs_t, file);
+ } /* end if null return value (error) */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_open() */
+
+#if HDFS_STATS
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: hdfs_fprint_stats()
+ *
+ * Purpose:
+ *
+ * Tabulate and pretty-print statistics for this virtual file.
+ *
+ * Should be called upon file close.
+ *
+ * Shows number of reads and bytes read, broken down by
+ * "raw" (H5FD_MEM_DRAW)
+ * or "meta" (any other flag)
+ *
+ * Prints filename and listing of total number of reads and bytes read,
+ * both as a grand total and separate meta- and rawdata reads.
+ *
+ * If any reads were done, prints out two tables:
+ *
+ * 1. overview of raw- and metadata reads
+ * - min (smallest size read)
+ * - average of size read
+ * - k,M,G suffixes by powers of 1024 (2^10)
+ * - max (largest size read)
+ * 2. tabulation of "bins", sepraring reads into exponentially-larger
+ * ranges of size.
+ * - columns for number of reads, total bytes, and average size, with
+ * separate sub-colums for raw- and metadata reads.
+ * - each row represents one bin, identified by the top of its range
+ *
+ * Bin ranges can be modified with pound-defines at the top of this file.
+ *
+ * Bins without any reads in their bounds are not printed.
+ *
+ * An "overflow" bin is also present, to catch "big" reads.
+ *
+ * Output for all bins (and range ceiling and average size report)
+ * is divied by powers of 1024. By corollary, four digits before the decimal
+ * is valid.
+ *
+ * - 41080 bytes is represented by 40.177k, not 41.080k
+ * - 1004.831M represents approx. 1052642000 bytes
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - occurs if the file passed in is invalid
+ * - TODO: if stream is invalid? how can we check this?
+ *
+ * Programmer: Jacob Smith
+ *
+ *----------------------------------------------------------------------------
+ */
+static herr_t
+hdfs_fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
+{
+ herr_t ret_value = SUCCEED;
+ parsed_url_t * purl = NULL;
+ unsigned i = 0;
+ unsigned long count_meta = 0;
+ unsigned long count_raw = 0;
+ double average_meta = 0.0;
+ double average_raw = 0.0;
+ unsigned long long min_meta = (unsigned long long)HDFS_STATS_STARTING_MIN;
+ unsigned long long min_raw = (unsigned long long)HDFS_STATS_STARTING_MIN;
+ unsigned long long max_meta = 0;
+ unsigned long long max_raw = 0;
+ unsigned long long bytes_raw = 0;
+ unsigned long long bytes_meta = 0;
+ double re_dub = 0.0; /* re-usable double variable */
+ unsigned suffix_i = 0;
+ const char suffixes[] = {' ', 'K', 'M', 'G', 'T', 'P'};
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if (stream == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null")
+ if (file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null")
+ if (file->hdfs_handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle cannot be null")
+ if (file->hdfs_handle->magic != HDFS_HDFST_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle has invalid magic")
+
+ /*******************
+ * AGGREGATE STATS *
+ *******************/
+
+ for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ const hdfs_statsbin *r = &file->raw[i];
+ const hdfs_statsbin *m = &file->meta[i];
+
+ if (m->min < min_meta)
+ min_meta = m->min;
+ if (r->min < min_raw)
+ min_raw = r->min;
+ if (m->max > max_meta)
+ max_meta = m->max;
+ if (r->max > max_raw)
+ max_raw = r->max;
+
+ count_raw += r->count;
+ count_meta += m->count;
+ bytes_raw += r->bytes;
+ bytes_meta += m->bytes;
+ }
+ if (count_raw > 0)
+ average_raw = (double)bytes_raw / (double)count_raw;
+ if (count_meta > 0)
+ average_meta = (double)bytes_meta / (double)count_meta;
+
+ /******************
+ * PRINT OVERVIEW *
+ ******************/
+
+ HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
+
+ if (count_raw + count_meta == 0)
+ goto done;
+
+ /*************************
+ * PRINT AGGREGATE STATS *
+ *************************/
+
+ HDfprintf(stream, "SIZES meta raw\n");
+ HDfprintf(stream, " min ");
+ if (count_meta == 0)
+ HDfprintf(stream, " 0.000 ");
+ else {
+ re_dub = (double)min_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ }
+
+ if (count_raw == 0)
+ HDfprintf(stream, " 0.000 \n");
+ else {
+ re_dub = (double)min_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ }
+
+ HDfprintf(stream, " avg ");
+ re_dub = (double)average_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+
+ re_dub = (double)average_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+
+ HDfprintf(stream, " max ");
+ re_dub = (double)max_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+
+ re_dub = (double)max_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+
+ /******************************
+ * PRINT INDIVIDUAL BIN STATS *
+ ******************************/
+
+ HDfprintf(stream, "BINS # of reads total bytes average size\n");
+ HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+
+ for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ const hdfs_statsbin *m;
+ const hdfs_statsbin *r;
+ unsigned long long range_end = 0;
+ char bm_suffix = ' '; /* bytes-meta */
+ double bm_val = 0.0;
+ char br_suffix = ' '; /* bytes-raw */
+ double br_val = 0.0;
+ char am_suffix = ' '; /* average-meta */
+ double am_val = 0.0;
+ char ar_suffix = ' '; /* average-raw */
+ double ar_val = 0.0;
+
+ m = &file->meta[i];
+ r = &file->raw[i];
+ if (r->count == 0 && m->count == 0)
+ continue;
+
+ range_end = hdfs_stats_boundaries[i];
+
+ if (i == HDFS_STATS_BIN_COUNT) {
+ range_end = hdfs_stats_boundaries[i - 1];
+ HDfprintf(stream, ">");
+ }
+ else
+ HDfprintf(stream, " ");
+
+ bm_val = (double)m->bytes;
+ for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
+ bm_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ bm_suffix = suffixes[suffix_i];
+
+ br_val = (double)r->bytes;
+ for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
+ br_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ br_suffix = suffixes[suffix_i];
+
+ if (m->count > 0)
+ am_val = (double)(m->bytes) / (double)(m->count);
+ for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
+ am_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ am_suffix = suffixes[suffix_i];
+
+ if (r->count > 0)
+ ar_val = (double)(r->bytes) / (double)(r->count);
+ for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
+ ar_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ ar_suffix = suffixes[suffix_i];
+
+ re_dub = (double)range_end;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+
+ HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* rawdata reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* rawdata bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* rawdata average */
+ HDfflush(stream);
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* hdfs_fprint_stats */
+#endif /* HDFS_STATS */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_close
+ *
+ * Purpose:
+ *
+ * Close an HDF5 file.
+ *
+ * Return:
+ *
+ * SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_close(H5FD_t *_file)
+{
+ H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Sanity checks */
+ HDassert(file != NULL);
+ HDassert(file->hdfs_handle != NULL);
+ HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+
+ /* Close the underlying request handle */
+ if (file->hdfs_handle != NULL)
+ if (FAIL == H5FD_hdfs_handle_close(file->hdfs_handle))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close HDFS file handle")
+
+#if HDFS_STATS
+ /* TODO: mechanism to re-target stats printout */
+ if (FAIL == hdfs_fprint_stats(stdout, file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics")
+#endif /* HDFS_STATS */
+
+ /* Release the file info */
+ file = H5FL_FREE(H5FD_hdfs_t, file);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_hdfs_close() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_cmp()
+ *
+ * Purpose:
+ *
+ * Compares two files using this driver by their HDFS-provided file info,
+ * field-by-field.
+ *
+ * Return:
+ * Equivalent: 0
+ * Not Equivalent: -1
+ *
+ * Programmer: Gerd Herber
+ * May 2018
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+H5FD_hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+{
+ int ret_value = 0;
+ const H5FD_hdfs_t *f1 = (const H5FD_hdfs_t *)_f1;
+ const H5FD_hdfs_t *f2 = (const H5FD_hdfs_t *)_f2;
+ hdfsFileInfo * finfo1 = NULL;
+ hdfsFileInfo * finfo2 = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif /* HDFS_DEBUG */
+
+ HDassert(f1->hdfs_handle != NULL);
+ HDassert(f2->hdfs_handle != NULL);
+ HDassert(f1->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ HDassert(f2->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+
+ finfo1 = f1->hdfs_handle->fileinfo;
+ finfo2 = f2->hdfs_handle->fileinfo;
+ HDassert(finfo1 != NULL);
+ HDassert(finfo2 != NULL);
+
+ if (finfo1->mKind != finfo2->mKind) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mName != finfo2->mName) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mLastMod != finfo2->mLastMod) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mSize != finfo2->mSize) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mReplication != finfo2->mReplication) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mBlockSize != finfo2->mBlockSize) {
+ HGOTO_DONE(-1);
+ }
+ if (HDstrcmp(finfo1->mOwner, finfo2->mOwner)) {
+ HGOTO_DONE(-1);
+ }
+ if (HDstrcmp(finfo1->mGroup, finfo2->mGroup)) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mPermissions != finfo2->mPermissions) {
+ HGOTO_DONE(-1);
+ }
+ if (finfo1->mLastAccess != finfo2->mLastAccess) {
+ HGOTO_DONE(-1);
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_cmp() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_hdfs_query
+ *
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * (listed in H5FDpublic.h)
+ *
+ * Note that since the HDFS VFD is read only, most flags
+ * are irrelevant.
+ *
+ * The term "set" is highly misleading...
+ * stores/copies the supported flags in the out-pointer `flags`.
+ *
+ * Return: SUCCEED (Can't fail)
+ *
+ * Programmer: John Mainzer
+ * 9/11/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags) /* out variable */
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (flags) {
+ *flags = 0;
+ *flags |= H5FD_FEAT_DATA_SIEVE;
+ }
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD_hdfs_query() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_get_eoa()
+ *
+ * Purpose:
+ *
+ * Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
+ *
+ * Return:
+ *
+ * The end-of-address marker.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+{
+ const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ FUNC_LEAVE_NOAPI(file->eoa)
+} /* end H5FD_hdfs_get_eoa() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_set_eoa()
+ *
+ * Purpose:
+ *
+ * Set the end-of-address marker for the file.
+ *
+ * Return:
+ *
+ * SUCCEED (can't fail)
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-03
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+{
+ H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ file->eoa = addr;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD_hdfs_set_eoa() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_get_eof()
+ *
+ * Purpose:
+ *
+ * Returns the end-of-file marker.
+ *
+ * Return:
+ *
+ * EOF: the first address past the end of the "file", either the
+ * filesystem file or the HDF5 file.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_hdfs_get_eof(const H5FD_t *_file)
+{
+ const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HDassert(file->hdfs_handle != NULL);
+ HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+
+ FUNC_LEAVE_NOAPI((size_t)file->hdfs_handle->fileinfo->mSize)
+} /* end H5FD_hdfs_get_eof() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_get_handle()
+ *
+ * Purpose:
+ *
+ * Returns the HDFS handle (hdfs_t) of hdfs file driver.
+ *
+ * Returns:
+ *
+ * SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
+{
+ H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif /* HDFS_DEBUG */
+
+ if (!file_handle)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
+
+ *file_handle = file->hdfs_handle;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_hdfs_get_handle() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_read()
+ *
+ * Purpose:
+ *
+ * Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in DXPL_ID.
+ *
+ * Return:
+ *
+ * Success: `SUCCEED`
+ * - Result is stored in caller-supplied buffer BUF.
+ * Failure: `FAIL`
+ * - Unable to complete read.
+ * - Contents of buffer `buf` are undefined.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-??
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+ size_t size, void *buf)
+{
+ H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
+ size_t filesize = 0;
+ herr_t ret_value = SUCCEED;
+#if HDFS_STATS
+ /* working variables for storing stats */
+ hdfs_statsbin *bin = NULL;
+ unsigned bin_i = 0;
+#endif /* HDFS_STATS */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif /* HDFS_DEBUG */
+
+ HDassert(file != NULL);
+ HDassert(file->hdfs_handle != NULL);
+ HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ HDassert(buf != NULL);
+
+ filesize = (size_t)file->hdfs_handle->fileinfo->mSize;
+
+ if ((addr > filesize) || ((addr + size) > filesize))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address")
+
+ if (FAIL ==
+ hdfsPread(file->hdfs_handle->filesystem, file->hdfs_handle->file, (tOffset)addr, buf, (tSize)size))
+ HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read")
+
+#if HDFS_STATS
+
+ /* Find which "bin" this read fits in. Can be "overflow" bin. */
+ for (bin_i = 0; bin_i < HDFS_STATS_BIN_COUNT; bin_i++)
+ if ((unsigned long long)size < hdfs_stats_boundaries[bin_i])
+ break;
+ bin = (type == H5FD_MEM_DRAW) ? &file->raw[bin_i] : &file->meta[bin_i];
+
+ /* Store collected stats in appropriate bin */
+ if (bin->count == 0) {
+ bin->min = size;
+ bin->max = size;
+ }
+ else {
+ if (size < bin->min)
+ bin->min = size;
+ if (size > bin->max)
+ bin->max = size;
+ }
+ bin->count++;
+ bin->bytes += (unsigned long long)size;
+
+#endif /* HDFS_STATS */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_hdfs_read() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_write()
+ *
+ * Purpose:
+ *
+ * Write bytes to file.
+ * UNSUPPORTED IN READ-ONLY HDFS VFD.
+ *
+ * Return:
+ *
+ * FAIL (Not possible with Read-Only S3 file.)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-23
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+ haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, const void H5_ATTR_UNUSED *buf)
+{
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_hdfs_write() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_hdfs_truncate
+ *
+ * Purpose:
+ *
+ * Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
+ *
+ * NOT POSSIBLE ON READ-ONLY S3 FILES.
+ *
+ * Return:
+ *
+ * FAIL (Not possible on Read-Only S3 files.)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-23
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_hdfs_truncate() */
+
+#else /* H5_HAVE_LIBHDFS */
+
+/* No-op stubs to avoid binary compatibility problems with previous
+ * HDF5 1.8 versions. Non-functional versions of these API calls were
+ * erroneously included in the library even when the HDFS VFD was not
+ * configured.
+ */
+hid_t
+H5FD_hdfs_init(void)
+{
+ /* This should never be called since the header doesn't invoke it */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_LEAVE_NOAPI(H5I_INVALID_HID)
+}
+
+void
+H5FD_hdfs_term(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5FD_hdfs_term() */
+
+herr_t
+H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out)
+{
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_API_NOINIT
+ H5TRACE2("e", "i*x", fapl_id, fa_out);
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "HDFS VFD not included in the HDF5 library")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+}
+
+herr_t
+H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
+{
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_API_NOINIT
+ H5TRACE2("e", "i*x", fapl_id, fa);
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "HDFS VFD not included in the HDF5 library")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+}
+
+#endif /* H5_HAVE_LIBHDFS */
diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h
new file mode 100644
index 0000000..a5d08b2
--- /dev/null
+++ b/src/H5FDhdfs.h
@@ -0,0 +1,123 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Read-Only HDFS Virtual File Driver (VFD) *
+ * Copyright (c) 2018, The HDF Group. *
+ * *
+ * All rights reserved. *
+ * *
+ * NOTICE: *
+ * All information contained herein is, and remains, the property of The HDF *
+ * Group. The intellectual and technical concepts contained herein are *
+ * proprietary to The HDF Group. Dissemination of this information or *
+ * reproduction of this material is strictly forbidden unless prior written *
+ * permission is obtained from The HDF Group. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Jacob Smith
+ * 2018-04-23
+ *
+ * Purpose: The public header file for the hdfs driver.
+ */
+
+#ifndef H5FDhdfs_H
+#define H5FDhdfs_H
+
+#ifdef H5_HAVE_LIBHDFS
+#define H5FD_HDFS (H5FD_hdfs_init())
+#else /* H5_HAVE_LIBHDFS */
+#define H5FD_HDFS (-1)
+#endif /* H5_HAVE_LIBHDFS */
+
+/****************************************************************************
+ *
+ * Structure: H5FD_hdfs_fapl_t
+ *
+ * Purpose:
+ *
+ * H5FD_hdfs_fapl_t is a public structure that is used to pass
+ * configuration information to the appropriate HDFS VFD via the FAPL.
+ * A pointer to an instance of this structure is a parameter to
+ * H5Pset_fapl_hdfs() and H5Pget_fapl_hdfs().
+ *
+ *
+ *
+ * `version` (int32_t)
+ *
+ * Version number of the `H5FD_hdfs_fapl_t` structure. Any instance passed
+ * to the above calls must have a recognized version number, or an error
+ * will be flagged.
+ *
+ * This field should be set to `H5FD__CURR_HDFS_FAPL_T_VERSION`.
+ *
+ * `namenode_name` (const char[])
+ *
+ * Name of "Name Node" to access as the HDFS server.
+ *
+ * Must not be longer than `H5FD__HDFS_NODE_NAME_SPACE`.
+ *
+ * TBD: Can be NULL.
+ *
+ * `namenode_port` (int32_t) TBD
+ *
+ * Port number to use to connect with Name Node.
+ *
+ * TBD: If 0, uses a default port.
+ *
+ * `kerberos_ticket_cache` (const char[])
+ *
+ * Path to the location of the Kerberos authentication cache.
+ *
+ * Must not be longer than `H5FD__HDFS_KERB_CACHE_PATH_SPACE`.
+ *
+ * TBD: Can be NULL.
+ *
+ * `user_name` (const char[])
+ *
+ * Username to use when accessing file.
+ *
+ * Must not be longer than `H5FD__HDFS_USER_NAME_SPACE`.
+ *
+ * TBD: Can be NULL.
+ *
+ * `stream_buffer_size` (int32_t)
+ *
+ * Size (in bytes) of the file read stream buffer.
+ *
+ * TBD: If -1, relies on a default value.
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ * 2018-04-23
+ *
+ ****************************************************************************/
+
+#define H5FD__CURR_HDFS_FAPL_T_VERSION 1
+
+#define H5FD__HDFS_NODE_NAME_SPACE 128
+#define H5FD__HDFS_USER_NAME_SPACE 128
+#define H5FD__HDFS_KERB_CACHE_PATH_SPACE 128
+
+typedef struct H5FD_hdfs_fapl_t {
+ int32_t version;
+ char namenode_name[H5FD__HDFS_NODE_NAME_SPACE + 1];
+ int32_t namenode_port;
+ char user_name[H5FD__HDFS_USER_NAME_SPACE + 1];
+ char kerberos_ticket_cache[H5FD__HDFS_KERB_CACHE_PATH_SPACE + 1];
+ int32_t stream_buffer_size;
+} H5FD_hdfs_fapl_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5_DLL hid_t H5FD_hdfs_init(void);
+H5_DLL void H5FD_hdfs_term(void);
+H5_DLL herr_t H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out);
+H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ifndef H5FDhdfs_H */
diff --git a/src/H5FDint.c b/src/H5FDint.c
index f9ac310..6b82fe5 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -6,18 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5FDint.c
- * Jan 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5FDint.c
*
- * Purpose: Internal routine for VFD operations
+ * Purpose: Internal routine for VFD operations
*
*-------------------------------------------------------------------------
*/
@@ -26,58 +24,48 @@
/* Module Setup */
/****************/
-#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
+#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_int_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5FD_int_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDpkg.h" /* File Drivers */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDpkg.h" /* File Drivers */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5FD_int_init_interface -- Initialize interface-specific information
@@ -99,7 +87,6 @@ H5FD_int_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_init())
} /* H5FD_int_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_locate_signature
*
@@ -107,54 +94,52 @@ H5FD_int_init_interface(void)
* signature can appear at address 0, or any power of two
* beginning with 512.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr)
{
- haddr_t addr, eoa;
- uint8_t buf[H5F_SIGNATURE_LEN];
- unsigned n, maxpow;
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t addr = HADDR_UNDEF;
+ haddr_t eoa = HADDR_UNDEF;
+ uint8_t buf[H5F_SIGNATURE_LEN];
+ unsigned n;
+ unsigned maxpow;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Find the least N such that 2^N is larger than the file size */
- if(HADDR_UNDEF == (addr = H5FD_get_eof(file)) || HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER)))
+ if (HADDR_UNDEF == (addr = H5FD_get_eof(file)) ||
+ HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER)))
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value")
- for(maxpow = 0; addr; maxpow++)
+ for (maxpow = 0; addr; maxpow++)
addr >>= 1;
maxpow = MAX(maxpow, 9);
- /*
- * Search for the file signature at format address zero followed by
+ /* Search for the file signature at format address zero followed by
* powers of two larger than 9.
*/
- for(n = 8; n < maxpow; n++) {
+ for (n = 8; n < maxpow; n++) {
addr = (8 == n) ? 0 : (haddr_t)1 << n;
- if(H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0)
+ if (H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
- if(H5FD_read(file, dxpl, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
+ if (H5FD_read(file, dxpl, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
- if(!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
+ if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
- } /* end for */
+ }
/*
* If the signature was not found then reset the EOA value and return
* HADDR_UNDEF.
*/
- if(n >= maxpow) {
- if(H5FD_set_eoa(file, H5FD_MEM_SUPER, eoa) < 0)
+ if (n >= maxpow) {
+ if (H5FD_set_eoa(file, H5FD_MEM_SUPER, eoa) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to reset EOA value")
*sig_addr = HADDR_UNDEF;
- } /* end if */
+ }
else
/* Set return value */
*sig_addr = addr;
@@ -163,26 +148,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_locate_signature() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_read
- *
- * Purpose: Private version of H5FDread()
+ * Function: H5FD_read
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Private version of H5FDread()
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
- size_t size, void *buf/*out*/)
+H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr, size_t size,
+ void *buf /*out*/)
{
- haddr_t eoa = HADDR_UNDEF;
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa = HADDR_UNDEF;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -191,47 +171,45 @@ H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t add
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
- /* Do not return early for Parallel mode since the I/O could be a */
- /* collective transfer. */
- /* The no-op case */
- if(0 == size)
+ /* The no-op case
+ *
+ * Do not return early for Parallel mode since the I/O could be a
+ * collective transfer.
+ */
+ if (0 == size)
HGOTO_DONE(SUCCEED)
#endif /* H5_HAVE_PARALLEL */
- if(HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed")
- if((addr + file->base_addr + size) > eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%llu, eoa=%llu",
- (unsigned long long)(addr+ file->base_addr), (unsigned long long)size, (unsigned long long)eoa)
+ if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed")
+ if ((addr + file->base_addr + size) > eoa)
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%llu, eoa=%llu",
+ (unsigned long long)(addr + file->base_addr), (unsigned long long)size,
+ (unsigned long long)eoa)
/* Dispatch to driver */
- if((file->cls->read)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
+ if ((file->cls->read)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_write
+ * Function: H5FD_write
*
- * Purpose: Private version of H5FDwrite()
+ * Purpose: Private version of H5FDwrite()
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
- size_t size, const void *buf)
+H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr, size_t size,
+ const void *buf)
{
- haddr_t eoa = HADDR_UNDEF;
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa = HADDR_UNDEF; /* EOA for file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -240,50 +218,48 @@ H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t ad
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
- /* Do not return early for Parallel mode since the I/O could be a */
- /* collective transfer. */
- /* The no-op case */
- if(0 == size)
+ /* The no-op case
+ *
+ * Do not return early for Parallel mode since the I/O could be a
+ * collective transfer.
+ */
+ if (0 == size)
HGOTO_DONE(SUCCEED)
#endif /* H5_HAVE_PARALLEL */
- if(HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed")
- if((addr + file->base_addr + size) > eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%llu, eoa=%llu",
- (unsigned long long)(addr+ file->base_addr), (unsigned long long)size, (unsigned long long)eoa)
+ if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed")
+ if ((addr + file->base_addr + size) > eoa)
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%llu, eoa=%llu",
+ (unsigned long long)(addr + file->base_addr), (unsigned long long)size,
+ (unsigned long long)eoa)
/* Dispatch to driver */
- if((file->cls->write)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
+ if ((file->cls->write)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_write() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_set_eoa
+ * Function: H5FD_set_eoa
*
- * Purpose: Private version of H5FDset_eoa()
+ * Purpose: Private version of H5FDset_eoa()
*
* This function expects the EOA is a RELATIVE address, i.e.
* relative to the base address. This is NOT the same as the
* EOA stored in the superblock, which is an absolute
* address. Object addresses are relative.
*
- * Return: Success: Non-negative
- * Failure: Negative, no side effect
- *
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -291,44 +267,41 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
HDassert(H5F_addr_defined(addr) && addr <= file->maxaddr);
/* Dispatch to driver, convert to absolute address */
- if((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver set_eoa request failed")
+ if ((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver set_eoa request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_set_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_eoa
+ * Function: H5FD_get_eoa
*
- * Purpose: Private version of H5FDget_eoa()
+ * Purpose: Private version of H5FDget_eoa()
*
* This function returns the EOA as a RELATIVE address, i.e.
* relative to the base address. This is NOT the same as the
* EOA stored in the superblock, which is an absolute
* address. Object addresses are relative.
*
- * Return: Success: First byte after allocated memory.
- * Failure: HADDR_UNDEF
+ * Return: Success: First byte after allocated memory
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
+ * Failure: HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type)
{
- haddr_t ret_value;
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(file && file->cls);
/* Dispatch to driver */
- if(HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed")
/* Adjust for base address in file (convert to relative address) */
ret_value -= file->base_addr;
@@ -337,44 +310,38 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_eof
+ * Function: H5FD_get_eof
*
- * Purpose: Private version of H5FDget_eof()
+ * Purpose: Private version of H5FDget_eof()
*
* This function returns the EOF as a RELATIVE address, i.e.
* relative to the base address. This will be different
* from the end of the physical file if there is a user
* block.
*
- * Return: Success: The EOF address.
- *
- * Failure: HADDR_UNDEF
+ * Return: Success: The EOF address.
*
- * Programmer: Robb Matzke
- * Wednesday, August 4, 1999
- *
- * Modifications:
+ * Failure: HADDR_UNDEF
*
*-------------------------------------------------------------------------
*/
haddr_t
H5FD_get_eof(const H5FD_t *file)
{
- haddr_t ret_value;
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(file && file->cls);
/* Dispatch to driver */
- if(file->cls->get_eof) {
- if(HADDR_UNDEF == (ret_value = (file->cls->get_eof)(file)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "driver get_eof request failed")
- } /* end if */
+ if (file->cls->get_eof) {
+ if (HADDR_UNDEF == (ret_value = (file->cls->get_eof)(file)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "driver get_eof request failed")
+ }
else
- ret_value = file->maxaddr;
+ ret_value = file->maxaddr;
/* Adjust for base address in file (convert to relative address) */
ret_value -= file->base_addr;
@@ -382,4 +349,3 @@ H5FD_get_eof(const H5FD_t *file)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_eof() */
-
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 6bbd1d7..a14e0de 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@@ -25,27 +25,26 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_log_init_interface
-
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDlog.h" /* Logging file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#define H5_INTERFACE_INIT_FUNC H5FD_log_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDlog.h" /* Logging file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_LOG_g = 0;
/* Driver-specific file access properties */
typedef struct H5FD_log_fapl_t {
- char *logfile; /* Allocated log file name */
+ char * logfile; /* Allocated log file name */
unsigned long long flags; /* Flags for logging behavior */
- size_t buf_size; /* Size of buffers for track flavor and number of times each byte is accessed */
+ size_t buf_size; /* Size of buffers for track flavor and number of times each byte is accessed */
} H5FD_log_fapl_t;
/* Define strings for the different file memory types
@@ -53,14 +52,9 @@ typedef struct H5FD_log_fapl_t {
* Note that H5FD_MEM_NOLIST is not listed here since it has
* a negative value.
*/
-static const char *flavors[]={
- "H5FD_MEM_DEFAULT",
- "H5FD_MEM_SUPER",
- "H5FD_MEM_BTREE",
- "H5FD_MEM_DRAW",
- "H5FD_MEM_GHEAP",
- "H5FD_MEM_LHEAP",
- "H5FD_MEM_OHDR",
+static const char *flavors[] = {
+ "H5FD_MEM_DEFAULT", "H5FD_MEM_SUPER", "H5FD_MEM_BTREE", "H5FD_MEM_DRAW",
+ "H5FD_MEM_GHEAP", "H5FD_MEM_LHEAP", "H5FD_MEM_OHDR",
};
/* The description of a file belonging to this driver. The `eoa' and `eof'
@@ -75,13 +69,13 @@ static const char *flavors[]={
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_log_t {
- H5FD_t pub; /* public stuff, must be first */
- int fd; /* the unix file */
- haddr_t eoa; /* end of allocated region */
- haddr_t eof; /* end of file; current file size */
- haddr_t pos; /* current file I/O position */
- H5FD_file_op_t op; /* last operation */
- char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
+ H5FD_t pub; /* public stuff, must be first */
+ int fd; /* the unix file */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* end of file; current file size */
+ haddr_t pos; /* current file I/O position */
+ H5FD_file_op_t op; /* last operation */
+ char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
* identify a file. Note that Cygwin, MinGW and other Windows POSIX
@@ -89,8 +83,8 @@ typedef struct H5FD_log_t {
* and will use the 'device + inodes' scheme as opposed to the
* Windows code further below.
*/
- dev_t device; /* file device number */
- ino_t inode; /* file i-node number */
+ dev_t device; /* file device number */
+ ino_t inode; /* file i-node number */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -106,34 +100,34 @@ typedef struct H5FD_log_t {
*
* http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD nFileIndexLow;
- DWORD nFileIndexHigh;
- DWORD dwVolumeSerialNumber;
-
- HANDLE hFile; /* Native windows file handle */
-#endif /* H5_HAVE_WIN32_API */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
/* Information from properties set by 'h5repart' tool
*
* Whether to eliminate the family driver info and convert this file to
* a single file
*/
- hbool_t fam_to_sec2;
+ hbool_t fam_to_sec2;
/* Fields for tracking I/O operations */
- unsigned char *nread; /* Number of reads from a file location */
- unsigned char *nwrite; /* Number of write to a file location */
- unsigned char *flavor; /* Flavor of information written to file location */
- unsigned long long total_read_ops; /* Total number of read operations */
- unsigned long long total_write_ops; /* Total number of write operations */
- unsigned long long total_seek_ops; /* Total number of seek operations */
- unsigned long long total_truncate_ops; /* Total number of truncate operations */
- double total_read_time; /* Total time spent in read operations */
- double total_write_time; /* Total time spent in write operations */
- double total_seek_time; /* Total time spent in seek operations */
- size_t iosize; /* Size of I/O information buffers */
- FILE *logfp; /* Log file pointer */
- H5FD_log_fapl_t fa; /* Driver-specific file access properties */
+ unsigned char * nread; /* Number of reads from a file location */
+ unsigned char * nwrite; /* Number of write to a file location */
+ unsigned char * flavor; /* Flavor of information written to file location */
+ unsigned long long total_read_ops; /* Total number of read operations */
+ unsigned long long total_write_ops; /* Total number of write operations */
+ unsigned long long total_seek_ops; /* Total number of seek operations */
+ unsigned long long total_truncate_ops; /* Total number of truncate operations */
+ double total_read_time; /* Total time spent in read operations */
+ double total_write_time; /* Total time spent in write operations */
+ double total_seek_time; /* Total time spent in seek operations */
+ size_t iosize; /* Size of I/O information buffers */
+ FILE * logfp; /* Log file pointer */
+ H5FD_log_fapl_t fa; /* Driver-specific file access properties */
} H5FD_log_t;
/*
@@ -151,71 +145,68 @@ typedef struct H5FD_log_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A, Z) \
+ (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static void *H5FD_log_fapl_get(H5FD_t *file);
-static void *H5FD_log_fapl_copy(const void *_old_fa);
-static herr_t H5FD_log_fapl_free(void *_fa);
-static H5FD_t *H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_log_close(H5FD_t *_file);
-static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
+static void * H5FD_log_fapl_get(H5FD_t *file);
+static void * H5FD_log_fapl_copy(const void *_old_fa);
+static herr_t H5FD_log_fapl_free(void *_fa);
+static H5FD_t *H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_log_close(H5FD_t *_file);
+static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static haddr_t H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_log_get_eof(const H5FD_t *_file);
-static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_log_g = {
- "log", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_log_fapl_t), /*fapl_size */
- H5FD_log_fapl_get, /*fapl_get */
- H5FD_log_fapl_copy, /*fapl_copy */
- H5FD_log_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_log_open, /*open */
- H5FD_log_close, /*close */
- H5FD_log_cmp, /*cmp */
- H5FD_log_query, /*query */
- NULL, /*get_type_map */
- H5FD_log_alloc, /*alloc */
- NULL, /*free */
- H5FD_log_get_eoa, /*get_eoa */
- H5FD_log_set_eoa, /*set_eoa */
- H5FD_log_get_eof, /*get_eof */
- H5FD_log_get_handle, /*get_handle */
- H5FD_log_read, /*read */
- H5FD_log_write, /*write */
- NULL, /*flush */
- H5FD_log_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "log", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_log_fapl_t), /*fapl_size */
+ H5FD_log_fapl_get, /*fapl_get */
+ H5FD_log_fapl_copy, /*fapl_copy */
+ H5FD_log_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_log_open, /*open */
+ H5FD_log_close, /*close */
+ H5FD_log_cmp, /*cmp */
+ H5FD_log_query, /*query */
+ NULL, /*get_type_map */
+ H5FD_log_alloc, /*alloc */
+ NULL, /*free */
+ H5FD_log_get_eoa, /*get_eoa */
+ H5FD_log_set_eoa, /*set_eoa */
+ H5FD_log_get_eof, /*get_eof */
+ H5FD_log_get_handle, /*get_handle */
+ H5FD_log_read, /*read */
+ H5FD_log_write, /*write */
+ NULL, /*flush */
+ H5FD_log_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
+ H5FD_FLMAP_DICHOTOMY /*fl_map */
};
/* Declare a free list to manage the H5FD_log_t struct */
H5FL_DEFINE_STATIC(H5FD_log_t);
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_init_interface
*
@@ -234,15 +225,14 @@ H5FD_log_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_log_init())
} /* H5FD_log_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_init
*
* Purpose: Initialize this driver by registering the driver with the
* library.
*
- * Return: Success: The driver ID for the log driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the log driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, July 29, 1999
@@ -252,11 +242,11 @@ H5FD_log_init_interface(void)
hid_t
H5FD_log_init(void)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if(H5I_VFL != H5I_get_type(H5FD_LOG_g))
+ if (H5I_VFL != H5I_get_type(H5FD_LOG_g))
H5FD_LOG_g = H5FD_register(&H5FD_log_g, sizeof(H5FD_class_t), FALSE);
/* Set return value */
@@ -266,7 +256,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_init() */
-
/*---------------------------------------------------------------------------
* Function: H5FD_log_term
*
@@ -290,7 +279,6 @@ H5FD_log_term(void)
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_log_term() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_log
*
@@ -307,31 +295,30 @@ H5FD_log_term(void)
herr_t
H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size)
{
- H5FD_log_fapl_t fa; /* File access property list information */
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value; /* Return value */
+ H5FD_log_fapl_t fa; /* File access property list information */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sULz", fapl_id, logfile, flags, buf_size);
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- /* This shallow copy is correct! The string will be properly
- * copied deep down in the H5P code.
+ /* This shallow copy is correct! The string will be properly
+ * copied deep down in the H5P code.
*/
fa.logfile = (char *)logfile;
- fa.flags = flags;
+ fa.flags = flags;
fa.buf_size = buf_size;
- ret_value = H5P_set_driver(plist, H5FD_LOG, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_LOG, &fa);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_fapl_log() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_get
*
@@ -351,8 +338,8 @@ done:
static void *
H5FD_log_fapl_get(H5FD_t *_file)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- void *ret_value; /* Return value */
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -362,7 +349,6 @@ H5FD_log_fapl_get(H5FD_t *_file)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_fapl_get() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_copy
*
@@ -379,33 +365,33 @@ H5FD_log_fapl_get(H5FD_t *_file)
static void *
H5FD_log_fapl_copy(const void *_old_fa)
{
- const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa;
- H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
- void *ret_value; /* Return value */
+ const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t *)_old_fa;
+ H5FD_log_fapl_t * new_fa = NULL; /* New FAPL info */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(old_fa);
/* Allocate the new FAPL info */
- if(NULL == (new_fa = (H5FD_log_fapl_t *)H5MM_calloc(sizeof(H5FD_log_fapl_t))))
+ if (NULL == (new_fa = (H5FD_log_fapl_t *)H5MM_calloc(sizeof(H5FD_log_fapl_t))))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL")
/* Copy the general information */
HDmemcpy(new_fa, old_fa, sizeof(H5FD_log_fapl_t));
/* Deep copy the log file name */
- if(old_fa->logfile != NULL)
- if(NULL == (new_fa->logfile = H5MM_xstrdup(old_fa->logfile)))
+ if (old_fa->logfile != NULL)
+ if (NULL == (new_fa->logfile = H5MM_xstrdup(old_fa->logfile)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate log file name")
/* Set return value */
ret_value = new_fa;
done:
- if(NULL == ret_value)
- if(new_fa) {
- if(new_fa->logfile)
+ if (NULL == ret_value)
+ if (new_fa) {
+ if (new_fa->logfile)
H5MM_free(new_fa->logfile);
H5MM_free(new_fa);
} /* end if */
@@ -413,7 +399,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_fapl_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_free
*
@@ -429,19 +414,18 @@ done:
static herr_t
H5FD_log_fapl_free(void *_fa)
{
- H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa;
+ H5FD_log_fapl_t *fa = (H5FD_log_fapl_t *)_fa;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the fapl information */
- if(fa->logfile)
+ if (fa->logfile)
H5MM_xfree(fa->logfile);
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_fapl_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_open
*
@@ -460,11 +444,11 @@ H5FD_log_fapl_free(void *_fa)
static H5FD_t *
H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_log_t *file = NULL;
- H5P_genplist_t *plist; /* Property list */
- H5FD_log_fapl_t *fa; /* File access property list information */
- int fd = -1; /* File descriptor */
- int o_flags; /* Flags for open() call */
+ H5FD_log_t * file = NULL;
+ H5P_genplist_t * plist; /* Property list */
+ const H5FD_log_fapl_t *fa; /* File access property list information */
+ int fd = -1; /* File descriptor */
+ int o_flags; /* Flags for open() call */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -473,8 +457,8 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
struct timeval open_timeval_diff;
struct timeval stat_timeval_diff;
#endif /* H5_HAVE_GETTIMEOFDAY */
- h5_stat_t sb;
- H5FD_t *ret_value; /* Return value */
+ h5_stat_t sb;
+ H5FD_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -482,99 +466,102 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if(0 == maxaddr || HADDR_UNDEF == maxaddr)
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if(ADDR_OVERFLOW(maxaddr))
+ if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
/* Build the open flags */
o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if(H5F_ACC_TRUNC & flags)
+ if (H5F_ACC_TRUNC & flags)
o_flags |= O_TRUNC;
- if(H5F_ACC_CREAT & flags)
+ if (H5F_ACC_CREAT & flags)
o_flags |= O_CREAT;
- if(H5F_ACC_EXCL & flags)
+ if (H5F_ACC_EXCL & flags)
o_flags |= O_EXCL;
/* Get the driver specific information */
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL == (fa = (H5FD_log_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_log_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
#ifdef H5_HAVE_GETTIMEOFDAY
- if(fa->flags & H5FD_LOG_TIME_OPEN)
+ if (fa->flags & H5FD_LOG_TIME_OPEN)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Open the file */
- if((fd = HDopen(name, o_flags, 0666)) < 0) {
+ if ((fd = HDopen(name, o_flags, 0666)) < 0) {
int myerrno = errno;
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x", name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
+ HGOTO_ERROR(
+ H5E_FILE, H5E_CANTOPENFILE, NULL,
+ "unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x",
+ name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
} /* end if */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(fa->flags & H5FD_LOG_TIME_OPEN) {
+ if (fa->flags & H5FD_LOG_TIME_OPEN) {
struct timeval timeval_stop;
HDgettimeofday(&timeval_stop, NULL);
- /* Calculate the elapsed gettimeofday time */
- open_timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- open_timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(open_timeval_diff.tv_usec < 0) {
- open_timeval_diff.tv_usec += 1000000;
- open_timeval_diff.tv_sec--;
- } /* end if */
- } /* end if */
-#endif /* H5_HAVE_GETTIMEOFDAY */
+ /* Calculate the elapsed gettimeofday time */
+ open_timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
+ open_timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (open_timeval_diff.tv_usec < 0) {
+ open_timeval_diff.tv_usec += 1000000;
+ open_timeval_diff.tv_sec--;
+ } /* end if */
+ } /* end if */
+#endif /* H5_HAVE_GETTIMEOFDAY */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(fa->flags & H5FD_LOG_TIME_STAT)
+ if (fa->flags & H5FD_LOG_TIME_STAT)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Get the file stats */
- if(HDfstat(fd, &sb) < 0)
+ if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
#ifdef H5_HAVE_GETTIMEOFDAY
- if(fa->flags & H5FD_LOG_TIME_STAT) {
+ if (fa->flags & H5FD_LOG_TIME_STAT) {
struct timeval timeval_stop;
HDgettimeofday(&timeval_stop, NULL);
- /* Calculate the elapsed gettimeofday time */
- stat_timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- stat_timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(stat_timeval_diff.tv_usec < 0) {
- stat_timeval_diff.tv_usec += 1000000;
- stat_timeval_diff.tv_sec--;
- } /* end if */
- } /* end if */
-#endif /* H5_HAVE_GETTIMEOFDAY */
+ /* Calculate the elapsed gettimeofday time */
+ stat_timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
+ stat_timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (stat_timeval_diff.tv_usec < 0) {
+ stat_timeval_diff.tv_usec += 1000000;
+ stat_timeval_diff.tv_sec--;
+ } /* end if */
+ } /* end if */
+#endif /* H5_HAVE_GETTIMEOFDAY */
/* Create the new file struct */
- if(NULL == (file = H5FL_CALLOC(H5FD_log_t)))
+ if (NULL == (file = H5FL_CALLOC(H5FD_log_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
file->fd = fd;
H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t);
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
#ifdef H5_HAVE_WIN32_API
file->hFile = (HANDLE)_get_osfhandle(fd);
- if(INVALID_HANDLE_VALUE == file->hFile)
+ if (INVALID_HANDLE_VALUE == file->hFile)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle")
- if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
+ if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information")
- file->nFileIndexHigh = fileinfo.nFileIndexHigh;
- file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
-#else /* H5_HAVE_WIN32_API */
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
- file->inode = sb.st_ino;
+ file->inode = sb.st_ino;
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
@@ -585,64 +572,67 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->fa.flags = fa->flags;
/* Check if we are doing any logging at all */
- if(file->fa.flags != 0) {
+ if (file->fa.flags != 0) {
/* Allocate buffers for tracking file accesses and data "flavor" */
file->iosize = fa->buf_size;
- if(file->fa.flags & H5FD_LOG_FILE_READ) {
+ if (file->fa.flags & H5FD_LOG_FILE_READ) {
file->nread = (unsigned char *)H5MM_calloc(file->iosize);
HDassert(file->nread);
} /* end if */
- if(file->fa.flags & H5FD_LOG_FILE_WRITE) {
+ if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
file->nwrite = (unsigned char *)H5MM_calloc(file->iosize);
HDassert(file->nwrite);
} /* end if */
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ if (file->fa.flags & H5FD_LOG_FLAVOR) {
file->flavor = (unsigned char *)H5MM_calloc(file->iosize);
HDassert(file->flavor);
} /* end if */
/* Set the log file pointer */
- if(fa->logfile)
+ if (fa->logfile)
file->logfp = HDfopen(fa->logfile, "w");
else
file->logfp = stderr;
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_OPEN)
- HDfprintf(file->logfp, "Open took: (%f s)\n", (double)open_timeval_diff.tv_sec + ((double)open_timeval_diff.tv_usec / (double)1000000.0f));
- if(file->fa.flags & H5FD_LOG_TIME_STAT)
- HDfprintf(file->logfp, "Stat took: (%f s)\n", (double)stat_timeval_diff.tv_sec + ((double)stat_timeval_diff.tv_usec / (double)1000000.0f));
+ if (file->fa.flags & H5FD_LOG_TIME_OPEN)
+ HDfprintf(file->logfp, "Open took: (%f s)\n",
+ (double)open_timeval_diff.tv_sec +
+ ((double)open_timeval_diff.tv_usec / (double)1000000.0f));
+ if (file->fa.flags & H5FD_LOG_TIME_STAT)
+ HDfprintf(file->logfp, "Stat took: (%f s)\n",
+ (double)stat_timeval_diff.tv_sec +
+ ((double)stat_timeval_diff.tv_usec / (double)1000000.0f));
#endif /* H5_HAVE_GETTIMEOFDAY */
} /* end if */
/* Check for non-default FAPL */
- if(H5P_FILE_ACCESS_DEFAULT != fapl_id) {
+ if (H5P_FILE_ACCESS_DEFAULT != fapl_id) {
/* This step is for h5repart tool only. If user wants to change file driver from
* family to sec2 while using h5repart, this private property should be set so that
* in the later step, the library can ignore the family driver information saved
* in the superblock.
*/
- if(H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SEC2_NAME) > 0)
- if(H5P_get(plist, H5F_ACS_FAMILY_TO_SEC2_NAME, &file->fam_to_sec2) < 0)
+ if (H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SEC2_NAME) > 0)
+ if (H5P_get(plist, H5F_ACS_FAMILY_TO_SEC2_NAME, &file->fam_to_sec2) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to sec2")
} /* end if */
/* Set return value */
- ret_value = (H5FD_t*)file;
+ ret_value = (H5FD_t *)file;
done:
- if(NULL == ret_value) {
- if(fd >= 0)
+ if (NULL == ret_value) {
+ if (fd >= 0)
HDclose(fd);
- if(file)
+ if (file)
file = H5FL_FREE(H5FD_log_t, file);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_open() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_close
*
@@ -659,11 +649,11 @@ done:
static herr_t
H5FD_log_close(H5FD_t *_file)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
#ifdef H5_HAVE_GETTIMEOFDAY
struct timeval timeval_start, timeval_stop;
-#endif /* H5_HAVE_GETTIMEOFDAY */
- herr_t ret_value = SUCCEED; /* Return value */
+#endif /* H5_HAVE_GETTIMEOFDAY */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -671,115 +661,122 @@ H5FD_log_close(H5FD_t *_file)
HDassert(file);
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags&H5FD_LOG_TIME_CLOSE)
+ if (file->fa.flags & H5FD_LOG_TIME_CLOSE)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Close the underlying file */
- if(HDclose(file->fd) < 0)
+ if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags&H5FD_LOG_TIME_CLOSE)
+ if (file->fa.flags & H5FD_LOG_TIME_CLOSE)
HDgettimeofday(&timeval_stop, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Dump I/O information */
- if(file->fa.flags != 0) {
- haddr_t addr;
- haddr_t last_addr;
+ if (file->fa.flags != 0) {
+ haddr_t addr;
+ haddr_t last_addr;
unsigned char last_val;
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_CLOSE) {
+ if (file->fa.flags & H5FD_LOG_TIME_CLOSE) {
struct timeval timeval_diff;
- /* Calculate the elapsed gettimeofday time */
- timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(timeval_diff.tv_usec < 0) {
- timeval_diff.tv_usec += 1000000;
- timeval_diff.tv_sec--;
- } /* end if */
- HDfprintf(file->logfp, "Close took: (%f s)\n", (double)timeval_diff.tv_sec + ((double)timeval_diff.tv_usec / (double)1000000.0f));
+ /* Calculate the elapsed gettimeofday time */
+ timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
+ timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_usec += 1000000;
+ timeval_diff.tv_sec--;
+ } /* end if */
+ HDfprintf(file->logfp, "Close took: (%f s)\n",
+ (double)timeval_diff.tv_sec + ((double)timeval_diff.tv_usec / (double)1000000.0f));
} /* end if */
-#endif /* H5_HAVE_GETTIMEOFDAY */
+#endif /* H5_HAVE_GETTIMEOFDAY */
/* Dump the total number of seek/read/write operations */
- if(file->fa.flags & H5FD_LOG_NUM_READ)
+ if (file->fa.flags & H5FD_LOG_NUM_READ)
HDfprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops);
- if(file->fa.flags & H5FD_LOG_NUM_WRITE)
+ if (file->fa.flags & H5FD_LOG_NUM_WRITE)
HDfprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops);
- if(file->fa.flags & H5FD_LOG_NUM_SEEK)
+ if (file->fa.flags & H5FD_LOG_NUM_SEEK)
HDfprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops);
- if(file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
+ if (file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
HDfprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops);
/* Dump the total time in seek/read/write */
- if(file->fa.flags & H5FD_LOG_TIME_READ)
+ if (file->fa.flags & H5FD_LOG_TIME_READ)
HDfprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time);
- if(file->fa.flags & H5FD_LOG_TIME_WRITE)
+ if (file->fa.flags & H5FD_LOG_TIME_WRITE)
HDfprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time);
- if(file->fa.flags & H5FD_LOG_TIME_SEEK)
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK)
HDfprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time);
/* Dump the write I/O information */
- if(file->fa.flags & H5FD_LOG_FILE_WRITE) {
+ if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
HDfprintf(file->logfp, "Dumping write I/O information:\n");
- last_val = file->nwrite[0];
+ last_val = file->nwrite[0];
last_addr = 0;
- addr = 1;
- while(addr < file->eoa) {
- if(file->nwrite[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
- last_val = file->nwrite[addr];
+ addr = 1;
+ while (addr < file->eoa) {
+ if (file->nwrite[addr] != last_val) {
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ last_val = file->nwrite[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
} /* end if */
/* Dump the read I/O information */
- if(file->fa.flags & H5FD_LOG_FILE_READ) {
+ if (file->fa.flags & H5FD_LOG_FILE_READ) {
HDfprintf(file->logfp, "Dumping read I/O information:\n");
- last_val = file->nread[0];
+ last_val = file->nread[0];
last_addr = 0;
- addr = 1;
- while(addr < file->eoa) {
- if(file->nread[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
- last_val = file->nread[addr];
+ addr = 1;
+ while (addr < file->eoa) {
+ if (file->nread[addr] != last_val) {
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ last_val = file->nread[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
} /* end if */
/* Dump the I/O flavor information */
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ if (file->fa.flags & H5FD_LOG_FLAVOR) {
HDfprintf(file->logfp, "Dumping I/O flavor information:\n");
- last_val = file->flavor[0];
+ last_val = file->flavor[0];
last_addr = 0;
- addr = 1;
- while(addr < file->eoa) {
- if(file->flavor[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
- last_val = file->flavor[addr];
+ addr = 1;
+ while (addr < file->eoa) {
+ if (file->flavor[addr] != last_val) {
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ last_val = file->flavor[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1),
+ (unsigned long)(addr - last_addr), flavors[last_val]);
} /* end if */
/* Free the logging information */
- if(file->fa.flags & H5FD_LOG_FILE_WRITE)
+ if (file->fa.flags & H5FD_LOG_FILE_WRITE)
file->nwrite = (unsigned char *)H5MM_xfree(file->nwrite);
- if(file->fa.flags & H5FD_LOG_FILE_READ)
+ if (file->fa.flags & H5FD_LOG_FILE_READ)
file->nread = (unsigned char *)H5MM_xfree(file->nread);
- if(file->fa.flags & H5FD_LOG_FLAVOR)
+ if (file->fa.flags & H5FD_LOG_FLAVOR)
file->flavor = (unsigned char *)H5MM_xfree(file->flavor);
- if(file->logfp != stderr)
+ if (file->logfp != stderr)
HDfclose(file->logfp);
} /* end if */
@@ -790,7 +787,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_close() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_cmp
*
@@ -809,36 +805,48 @@ done:
static int
H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
- const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
- int ret_value = 0;
+ const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
+ const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5_HAVE_WIN32_API
- if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
- if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) HGOTO_DONE(1)
-
- if(f1->nFileIndexHigh < f2->nFileIndexHigh) HGOTO_DONE(-1)
- if(f1->nFileIndexHigh > f2->nFileIndexHigh) HGOTO_DONE(1)
-
- if(f1->nFileIndexLow < f2->nFileIndexLow) HGOTO_DONE(-1)
- if(f1->nFileIndexLow > f2->nFileIndexLow) HGOTO_DONE(1)
+ if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
+ HGOTO_DONE(-1)
+ if (f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber)
+ HGOTO_DONE(1)
+
+ if (f1->nFileIndexHigh < f2->nFileIndexHigh)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexHigh > f2->nFileIndexHigh)
+ HGOTO_DONE(1)
+
+ if (f1->nFileIndexLow < f2->nFileIndexLow)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexLow > f2->nFileIndexLow)
+ HGOTO_DONE(1)
#else
#ifdef H5_DEV_T_IS_SCALAR
- if(f1->device < f2->device) HGOTO_DONE(-1)
- if(f1->device > f2->device) HGOTO_DONE(1)
-#else /* H5_DEV_T_IS_SCALAR */
+ if (f1->device < f2->device)
+ HGOTO_DONE(-1)
+ if (f1->device > f2->device)
+ HGOTO_DONE(1)
+#else /* H5_DEV_T_IS_SCALAR */
/* If dev_t isn't a scalar value on this system, just use memcmp to
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ HGOTO_DONE(-1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
- if(f1->inode < f2->inode) HGOTO_DONE(-1)
- if(f1->inode > f2->inode) HGOTO_DONE(1)
+ if (f1->inode < f2->inode)
+ HGOTO_DONE(-1)
+ if (f1->inode > f2->inode)
+ HGOTO_DONE(1)
#endif
@@ -846,7 +854,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_query
*
@@ -863,28 +870,28 @@ done:
static herr_t
H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
- const H5FD_log_t *file = (const H5FD_log_t *)_file;
+ const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
*flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
*flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
*flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
/* Check for flags that are set by h5repart */
- if(file && file->fam_to_sec2)
- *flags |= H5FD_FEAT_IGNORE_DRVRINFO; /* Ignore the driver info when file is opened (which eliminates it) */
- } /* end if */
+ if (file && file->fam_to_sec2)
+ *flags |= H5FD_FEAT_IGNORE_DRVRINFO; /* Ignore the driver info when file is opened (which
+ eliminates it) */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_query() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_alloc
*
@@ -901,9 +908,9 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
static haddr_t
H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsize_t size)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- haddr_t addr;
- haddr_t ret_value; /* Return value */
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ haddr_t addr;
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -911,24 +918,25 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsi
addr = file->eoa;
/* Check if we need to align this block */
- if(size >= file->pub.threshold) {
+ if (size >= file->pub.threshold) {
/* Check for an already aligned block */
- if(addr % file->pub.alignment != 0)
+ if (addr % file->pub.alignment != 0)
addr = ((addr / file->pub.alignment) + 1) * file->pub.alignment;
} /* end if */
file->eoa = addr + size;
/* Retain the (first) flavor of the information written to the file */
- if(file->fa.flags != 0) {
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ if (file->fa.flags != 0) {
+ if (file->fa.flags & H5FD_LOG_FLAVOR) {
HDassert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
HDmemset(&file->flavor[addr], (int)type, (size_t)size);
} /* end if */
- if(file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", addr, (addr + size) - 1, size, flavors[type]);
+ if (file->fa.flags & H5FD_LOG_ALLOC)
+ HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", addr, (addr + size) - 1, size,
+ flavors[type]);
} /* end if */
/* Set return value */
@@ -937,7 +945,6 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsi
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_eoa
*
@@ -956,14 +963,13 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsi
static haddr_t
H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_log_t *file = (const H5FD_log_t *)_file;
+ const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_log_get_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_set_eoa
*
@@ -981,33 +987,34 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
static herr_t
H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(file->fa.flags != 0) {
- if(H5F_addr_gt(addr, file->eoa) && H5F_addr_gt(addr, 0)) {
+ if (file->fa.flags != 0) {
+ /* Check for increasing file size */
+ if (H5F_addr_gt(addr, file->eoa) && H5F_addr_gt(addr, 0)) {
hsize_t size = addr - file->eoa;
/* Retain the flavor of the space allocated by the extension */
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ if (file->fa.flags & H5FD_LOG_FLAVOR) {
HDassert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
} /* end if */
/* Log the extension like an allocation */
- if(file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
+ if (file->fa.flags & H5FD_LOG_ALLOC)
+ HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size,
+ flavors[type]);
} /* end if */
- } /* end if */
+ } /* end if */
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_set_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_eof
*
@@ -1028,14 +1035,13 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
static haddr_t
H5FD_log_get_eof(const H5FD_t *_file)
{
- const H5FD_log_t *file = (const H5FD_log_t *)_file;
+ const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
} /* end H5FD_log_get_eof() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_handle
*
@@ -1051,12 +1057,12 @@ H5FD_log_get_eof(const H5FD_t *_file)
static herr_t
H5FD_log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- herr_t ret_value = SUCCEED;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
- if(!file_handle)
+ if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = &(file->fd);
@@ -1065,7 +1071,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_get_handle() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_read
*
@@ -1083,16 +1088,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size,
+ void *buf /*out*/)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- size_t orig_size = size; /* Save the original size for later */
- haddr_t orig_addr = addr;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ size_t orig_size = size; /* Save the original size for later */
+ haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
- struct timeval timeval_start, timeval_stop;
-#endif /* H5_HAVE_GETTIMEOFDAY */
- herr_t ret_value = SUCCEED; /* Return value */
+ struct timeval timeval_start, timeval_stop;
+#endif /* H5_HAVE_GETTIMEOFDAY */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1100,51 +1105,51 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
HDassert(buf);
/* Check for overflow conditions */
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
- if(REGION_OVERFLOW(addr, size))
+ if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
/* Log the I/O information about the read */
- if(file->fa.flags != 0) {
- size_t tmp_size = size;
+ if (file->fa.flags != 0) {
+ size_t tmp_size = size;
haddr_t tmp_addr = addr;
/* Log information about the number of times these locations are read */
- if(file->fa.flags & H5FD_LOG_FILE_READ) {
+ if (file->fa.flags & H5FD_LOG_FILE_READ) {
HDassert((addr + size) < file->iosize);
- while(tmp_size-- > 0)
+ while (tmp_size-- > 0)
file->nread[tmp_addr++]++;
} /* end if */
- } /* end if */
+ } /* end if */
/* Seek to the correct location */
- if(addr != file->pos || OP_READ != file->op) {
+ if (addr != file->pos || OP_READ != file->op) {
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK)
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
- if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK)
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK)
HDgettimeofday(&timeval_stop, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Log information about the seek */
- if(file->fa.flags & H5FD_LOG_NUM_SEEK)
+ if (file->fa.flags & H5FD_LOG_NUM_SEEK)
file->total_seek_ops++;
- if(file->fa.flags & H5FD_LOG_LOC_SEEK) {
+ if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr);
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK) {
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK) {
struct timeval timeval_diff;
- double time_diff;
+ double time_diff;
/* Calculate the elapsed gettimeofday time */
timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (timeval_diff.tv_usec < 0) {
timeval_diff.tv_usec += 1000000;
timeval_diff.tv_sec--;
} /* end if */
@@ -1156,49 +1161,56 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
} /* end if */
else
HDfprintf(file->logfp, "\n");
-#else /* H5_HAVE_GETTIMEOFDAY */
+#else /* H5_HAVE_GETTIMEOFDAY */
HDfprintf(file->logfp, "\n");
-#endif /* H5_HAVE_GETTIMEOFDAY */
+#endif /* H5_HAVE_GETTIMEOFDAY */
} /* end if */
- } /* end if */
+ } /* end if */
/*
* Read data, being careful of interrupted system calls, partial results,
* and the end of the file.
*/
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_READ)
+ if (file->fa.flags & H5FD_LOG_TIME_READ)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
- while(size > 0) {
+ while (size > 0) {
- h5_posix_io_t bytes_in = 0; /* # of bytes to read */
- h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
do {
bytes_read = HDread(file->fd, buf, bytes_in);
- } while(-1 == bytes_read && EINTR == errno);
+ } while (-1 == bytes_read && EINTR == errno);
- if(-1 == bytes_read) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ if (-1 == bytes_read) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- if(file->fa.flags & H5FD_LOG_LOC_READ)
- HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
-
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
+ if (file->fa.flags & H5FD_LOG_LOC_READ)
+ HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size);
+
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,
+ "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
+ "error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, "
+ "bytes actually read = %llu, offset = %llu",
+ HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
- if(0 == bytes_read) {
+ if (0 == bytes_read) {
/* end of file but not end of format address space */
HDmemset(buf, 0, size);
break;
@@ -1206,34 +1218,35 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
HDassert(bytes_read >= 0);
HDassert((size_t)bytes_read <= size);
-
+
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
buf = (char *)buf + bytes_read;
} /* end while */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_READ)
+ if (file->fa.flags & H5FD_LOG_TIME_READ)
HDgettimeofday(&timeval_stop, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Log information about the read */
- if(file->fa.flags & H5FD_LOG_NUM_READ)
+ if (file->fa.flags & H5FD_LOG_NUM_READ)
file->total_read_ops++;
- if(file->fa.flags & H5FD_LOG_LOC_READ) {
- HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Read", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ if (file->fa.flags & H5FD_LOG_LOC_READ) {
+ HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Read", orig_addr, (orig_addr + orig_size) - 1,
+ orig_size, flavors[type]);
/* XXX: Verify the flavor information, if we have it? */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_READ) {
+ if (file->fa.flags & H5FD_LOG_TIME_READ) {
struct timeval timeval_diff;
- double time_diff;
+ double time_diff;
/* Calculate the elapsed gettimeofday time */
timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (timeval_diff.tv_usec < 0) {
timeval_diff.tv_usec += 1000000;
timeval_diff.tv_sec--;
} /* end if */
@@ -1245,26 +1258,25 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
} /* end if */
else
HDfprintf(file->logfp, "\n");
-#else /* H5_HAVE_GETTIMEOFDAY */
+#else /* H5_HAVE_GETTIMEOFDAY */
HDfprintf(file->logfp, "\n");
#endif /* H5_HAVE_GETTIMEOFDAY */
- } /* end if */
+ } /* end if */
/* Update current position */
file->pos = addr;
- file->op = OP_READ;
+ file->op = OP_READ;
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_read() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_write
*
@@ -1280,16 +1292,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size,
+ const void *buf)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- size_t orig_size = size; /* Save the original size for later */
- haddr_t orig_addr = addr;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ size_t orig_size = size; /* Save the original size for later */
+ haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
- struct timeval timeval_start, timeval_stop;
-#endif /* H5_HAVE_GETTIMEOFDAY */
- herr_t ret_value = SUCCEED; /* Return value */
+ struct timeval timeval_start, timeval_stop;
+#endif /* H5_HAVE_GETTIMEOFDAY */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1298,55 +1310,58 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
HDassert(buf);
/* Verify that we are writing out the type of data we allocated in this location */
- if(file->flavor) {
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] || (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] || (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
+ if (file->flavor) {
+ HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] ||
+ (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
+ HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] ||
+ (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
} /* end if */
/* Check for overflow conditions */
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
- if(REGION_OVERFLOW(addr, size))
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu", (unsigned long long)addr, (unsigned long long)size)
+ if (REGION_OVERFLOW(addr, size))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu",
+ (unsigned long long)addr, (unsigned long long)size)
/* Log the I/O information about the write */
- if(file->fa.flags & H5FD_LOG_FILE_WRITE) {
- size_t tmp_size = size;
+ if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
+ size_t tmp_size = size;
haddr_t tmp_addr = addr;
/* Log information about the number of times these locations are read */
HDassert((addr + size) < file->iosize);
- while(tmp_size-- > 0)
+ while (tmp_size-- > 0)
file->nwrite[tmp_addr++]++;
} /* end if */
/* Seek to the correct location */
- if(addr != file->pos || OP_WRITE != file->op) {
+ if (addr != file->pos || OP_WRITE != file->op) {
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK)
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
- if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK)
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK)
HDgettimeofday(&timeval_stop, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Log information about the seek */
- if(file->fa.flags & H5FD_LOG_NUM_SEEK)
+ if (file->fa.flags & H5FD_LOG_NUM_SEEK)
file->total_seek_ops++;
- if(file->fa.flags & H5FD_LOG_LOC_SEEK) {
+ if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr);
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_SEEK) {
+ if (file->fa.flags & H5FD_LOG_TIME_SEEK) {
struct timeval timeval_diff;
- double time_diff;
+ double time_diff;
/* Calculate the elapsed gettimeofday time */
timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (timeval_diff.tv_usec < 0) {
timeval_diff.tv_usec += 1000000;
timeval_diff.tv_sec--;
} /* end if */
@@ -1358,46 +1373,53 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
} /* end if */
else
HDfprintf(file->logfp, "\n");
-#else /* H5_HAVE_GETTIMEOFDAY */
+#else /* H5_HAVE_GETTIMEOFDAY */
HDfprintf(file->logfp, "\n");
-#endif /* H5_HAVE_GETTIMEOFDAY */
+#endif /* H5_HAVE_GETTIMEOFDAY */
} /* end if */
- } /* end if */
+ } /* end if */
/*
* Write the data, being careful of interrupted system calls and partial
* results
*/
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags&H5FD_LOG_TIME_WRITE)
+ if (file->fa.flags & H5FD_LOG_TIME_WRITE)
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
- while(size > 0) {
+ while (size > 0) {
- h5_posix_io_t bytes_in = 0; /* # of bytes to write */
- h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, buf, bytes_in);
- } while(-1 == bytes_wrote && EINTR == errno);
+ } while (-1 == bytes_wrote && EINTR == errno);
- if(-1 == bytes_wrote) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ if (-1 == bytes_wrote) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- if(file->fa.flags & H5FD_LOG_LOC_WRITE)
- HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
-
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
+ if (file->fa.flags & H5FD_LOG_LOC_WRITE)
+ HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size);
+
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
+ "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
+ "error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = "
+ "%llu, bytes actually written = %llu, offset = %llu",
+ HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_wrote > 0);
@@ -1408,31 +1430,33 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
buf = (const char *)buf + bytes_wrote;
} /* end while */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_WRITE)
+ if (file->fa.flags & H5FD_LOG_TIME_WRITE)
HDgettimeofday(&timeval_stop, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
/* Log information about the write */
- if(file->fa.flags & H5FD_LOG_NUM_WRITE)
+ if (file->fa.flags & H5FD_LOG_NUM_WRITE)
file->total_write_ops++;
- if(file->fa.flags & H5FD_LOG_LOC_WRITE) {
- HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Written", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
-
- /* Check if this is the first write into a "default" section, grabbed by the metadata agregation algorithm */
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
- if((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT)
+ if (file->fa.flags & H5FD_LOG_LOC_WRITE) {
+ HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Written", orig_addr, (orig_addr + orig_size) - 1,
+ orig_size, flavors[type]);
+
+ /* Check if this is the first write into a "default" section, grabbed by the metadata agregation
+ * algorithm */
+ if (file->fa.flags & H5FD_LOG_FLAVOR) {
+ if ((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT)
HDmemset(&file->flavor[orig_addr], (int)type, orig_size);
} /* end if */
#ifdef H5_HAVE_GETTIMEOFDAY
- if(file->fa.flags & H5FD_LOG_TIME_WRITE) {
+ if (file->fa.flags & H5FD_LOG_TIME_WRITE) {
struct timeval timeval_diff;
- double time_diff;
+ double time_diff;
/* Calculate the elapsed gettimeofday time */
timeval_diff.tv_usec = timeval_stop.tv_usec - timeval_start.tv_usec;
- timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
- if(timeval_diff.tv_usec < 0) {
+ timeval_diff.tv_sec = timeval_stop.tv_sec - timeval_start.tv_sec;
+ if (timeval_diff.tv_usec < 0) {
timeval_diff.tv_usec += 1000000;
timeval_diff.tv_sec--;
} /* end if */
@@ -1444,28 +1468,27 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
} /* end if */
else
HDfprintf(file->logfp, "\n");
-#else /* H5_HAVE_GETTIMEOFDAY */
+#else /* H5_HAVE_GETTIMEOFDAY */
HDfprintf(file->logfp, "\n");
#endif /* H5_HAVE_GETTIMEOFDAY */
- } /* end if */
+ } /* end if */
/* Update current position and eof */
file->pos = addr;
- file->op = OP_WRITE;
- if(file->pos > file->eof)
+ file->op = OP_WRITE;
+ if (file->pos > file->eof)
file->eof = file->pos;
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_write() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_log_truncate
*
@@ -1482,22 +1505,22 @@ done:
static herr_t
H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Extend the file to make sure it's large enough */
- if(!H5F_addr_eq(file->eoa, file->eof)) {
+ if (!H5F_addr_eq(file->eoa, file->eof)) {
#ifdef H5_HAVE_WIN32_API
- LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
- DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
- * Only used as an error code here.
- */
- DWORD dwError; /* DWORD error code from GetLastError() */
- BOOL bError; /* Boolean error flag */
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
/* Windows uses this odd QuadPart union for 32/64-bit portability */
li.QuadPart = (__int64)file->eoa;
@@ -1508,22 +1531,22 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
* from SetFilePointer(), we also need to check GetLastError().
*/
dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ if (INVALID_SET_FILE_POINTER == dwPtrLow) {
dwError = GetLastError();
- if(dwError != NO_ERROR )
+ if (dwError != NO_ERROR)
HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer")
}
bError = SetEndOfFile(file->hFile);
- if(0 == bError)
+ if (0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* H5_HAVE_WIN32_API */
- if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
+#else /* H5_HAVE_WIN32_API */
+ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
/* Log information about the truncate */
- if(file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
+ if (file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
file->total_truncate_ops++;
/* Update the eof value */
@@ -1531,10 +1554,9 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_truncate() */
-
diff --git a/src/H5FDlog.h b/src/H5FDlog.h
index 8b3697c..12b654b 100644
--- a/src/H5FDlog.h
+++ b/src/H5FDlog.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The public header file for the log driver.
@@ -20,28 +20,26 @@
#ifndef H5FDlog_H
#define H5FDlog_H
-#include "H5Ipublic.h"
-
-#define H5FD_LOG (H5FD_log_init())
+#define H5FD_LOG (H5FD_log_init())
/* Flags for H5Pset_fapl_log() */
/* Flags for tracking where reads/writes/seeks occur */
-#define H5FD_LOG_LOC_READ 0x00000001
-#define H5FD_LOG_LOC_WRITE 0x00000002
-#define H5FD_LOG_LOC_SEEK 0x00000004
-#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ|H5FD_LOG_LOC_WRITE|H5FD_LOG_LOC_SEEK)
+#define H5FD_LOG_LOC_READ 0x00000001
+#define H5FD_LOG_LOC_WRITE 0x00000002
+#define H5FD_LOG_LOC_SEEK 0x00000004
+#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ | H5FD_LOG_LOC_WRITE | H5FD_LOG_LOC_SEEK)
/* Flags for tracking number of times each byte is read/written */
#define H5FD_LOG_FILE_READ 0x00000008
#define H5FD_LOG_FILE_WRITE 0x00000010
-#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ|H5FD_LOG_FILE_WRITE)
+#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ | H5FD_LOG_FILE_WRITE)
/* Flag for tracking "flavor" (type) of information stored at each byte */
-#define H5FD_LOG_FLAVOR 0x00000020
+#define H5FD_LOG_FLAVOR 0x00000020
/* Flags for tracking total number of reads/writes/seeks/truncates */
-#define H5FD_LOG_NUM_READ 0x00000040
-#define H5FD_LOG_NUM_WRITE 0x00000080
-#define H5FD_LOG_NUM_SEEK 0x00000100
+#define H5FD_LOG_NUM_READ 0x00000040
+#define H5FD_LOG_NUM_WRITE 0x00000080
+#define H5FD_LOG_NUM_SEEK 0x00000100
#define H5FD_LOG_NUM_TRUNCATE 0x00000200
-#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ|H5FD_LOG_NUM_WRITE|H5FD_LOG_NUM_SEEK|H5FD_LOG_NUM_TRUNCATE)
+#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ | H5FD_LOG_NUM_WRITE | H5FD_LOG_NUM_SEEK | H5FD_LOG_NUM_TRUNCATE)
/* Flags for tracking time spent in open/stat/read/write/seek/close */
#define H5FD_LOG_TIME_OPEN 0x00000400
#define H5FD_LOG_TIME_STAT 0x00000800
@@ -49,17 +47,21 @@
#define H5FD_LOG_TIME_WRITE 0x00002000
#define H5FD_LOG_TIME_SEEK 0x00004000
#define H5FD_LOG_TIME_CLOSE 0x00008000
-#define H5FD_LOG_TIME_IO (H5FD_LOG_TIME_OPEN|H5FD_LOG_TIME_STAT|H5FD_LOG_TIME_READ|H5FD_LOG_TIME_WRITE|H5FD_LOG_TIME_SEEK|H5FD_LOG_TIME_CLOSE)
+#define H5FD_LOG_TIME_IO \
+ (H5FD_LOG_TIME_OPEN | H5FD_LOG_TIME_STAT | H5FD_LOG_TIME_READ | H5FD_LOG_TIME_WRITE | \
+ H5FD_LOG_TIME_SEEK | H5FD_LOG_TIME_CLOSE)
/* Flag for tracking allocation of space in file */
-#define H5FD_LOG_ALLOC 0x00010000
-#define H5FD_LOG_ALL (H5FD_LOG_ALLOC|H5FD_LOG_TIME_IO|H5FD_LOG_NUM_IO|H5FD_LOG_FLAVOR|H5FD_LOG_FILE_IO|H5FD_LOG_LOC_IO)
+#define H5FD_LOG_ALLOC 0x00010000
+#define H5FD_LOG_ALL \
+ (H5FD_LOG_ALLOC | H5FD_LOG_TIME_IO | H5FD_LOG_NUM_IO | H5FD_LOG_FLAVOR | H5FD_LOG_FILE_IO | \
+ H5FD_LOG_LOC_IO)
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_log_init(void);
-H5_DLL void H5FD_log_term(void);
+H5_DLL hid_t H5FD_log_init(void);
+H5_DLL void H5FD_log_term(void);
H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size);
#ifdef __cplusplus
@@ -67,4 +69,3 @@ H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long
#endif
#endif
-
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index d463b53..afadab4 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -6,30 +6,28 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: Common routines for all MPI-based VFL drivers.
*
*/
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDmpi.h" /* Common MPI file driver */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDmpi.h" /* Common MPI file driver */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_PARALLEL
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_rank
*
@@ -42,8 +40,6 @@
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -51,24 +47,23 @@ H5FD_mpi_get_rank(const H5FD_t *file)
{
const H5FD_class_mpi_t *cls;
- int ret_value;
+ int ret_value;
FUNC_ENTER_NOAPI(FAIL)
HDassert(file);
cls = (const H5FD_class_mpi_t *)(file->cls);
HDassert(cls);
- HDassert(cls->get_rank); /* All MPI drivers must implement this */
+ HDassert(cls->get_rank); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((ret_value=(cls->get_rank)(file))<0)
+ if ((ret_value = (cls->get_rank)(file)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_get_rank() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_size
*
@@ -81,32 +76,29 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
H5FD_mpi_get_size(const H5FD_t *file)
{
const H5FD_class_mpi_t *cls;
- int ret_value;
+ int ret_value;
FUNC_ENTER_NOAPI(FAIL)
HDassert(file);
cls = (const H5FD_class_mpi_t *)(file->cls);
HDassert(cls);
- HDassert(cls->get_size); /* All MPI drivers must implement this */
+ HDassert(cls->get_size); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((ret_value=(cls->get_size)(file))<0)
+ if ((ret_value = (cls->get_size)(file)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_get_size() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_comm
*
@@ -119,32 +111,29 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
MPI_Comm
H5FD_mpi_get_comm(const H5FD_t *file)
{
const H5FD_class_mpi_t *cls;
- MPI_Comm ret_value;
+ MPI_Comm ret_value;
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
HDassert(file);
cls = (const H5FD_class_mpi_t *)(file->cls);
HDassert(cls);
- HDassert(cls->get_comm); /* All MPI drivers must implement this */
+ HDassert(cls->get_comm); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((ret_value=(cls->get_comm)(file))==MPI_COMM_NULL)
+ if ((ret_value = (cls->get_comm)(file)) == MPI_COMM_NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_get_comm() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_MPIOff_to_haddr
*
@@ -158,31 +147,23 @@ done:
* Programmer: Unknown
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1999-04-23
- * An error is reported for address overflows. The ADDR output
- * argument is optional.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
haddr_t
H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off)
{
- haddr_t ret_value=HADDR_UNDEF;
+ haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (mpi_off != (MPI_Offset)(haddr_t)mpi_off)
- ret_value=HADDR_UNDEF;
+ ret_value = HADDR_UNDEF;
else
- ret_value=(haddr_t)mpi_off;
+ ret_value = (haddr_t)mpi_off;
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_haddr_to_MPIOff
*
@@ -196,22 +177,12 @@ H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off)
* Programmer: Unknown
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1999-04-23
- * An error is reported for address overflows. The ADDR output
- * argument is optional.
- *
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
+H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/)
{
- herr_t ret_value=FAIL;
+ herr_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -221,14 +192,13 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
*mpi_off = (MPI_Offset)addr;
if (addr != (haddr_t)((MPI_Offset)addr))
- ret_value=FAIL;
+ ret_value = FAIL;
else
- ret_value=SUCCEED;
+ ret_value = SUCCEED;
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_comm_info_dup
*
@@ -245,35 +215,34 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
*
* Programmer: Albert Cheng
* Jan 8, 2003
- *
- * Modifications:
*-------------------------------------------------------------------------
*/
herr_t
H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Info *info_new)
{
- herr_t ret_value=SUCCEED;
- MPI_Comm comm_dup=MPI_COMM_NULL;
- MPI_Info info_dup=MPI_INFO_NULL;
- int mpi_code;
+ herr_t ret_value = SUCCEED;
+ MPI_Comm comm_dup = MPI_COMM_NULL;
+ MPI_Info info_dup = MPI_INFO_NULL;
+ int mpi_code;
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if (MPI_COMM_NULL == comm)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "not a valid argument")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "not a valid argument")
if (!comm_new || !info_new)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "bad pointers")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "bad pointers")
/* Dup them. Using temporary variables for error recovery cleanup. */
- if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(comm, &comm_dup)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
- if (MPI_INFO_NULL != info){
- if (MPI_SUCCESS != (mpi_code=MPI_Info_dup(info, &info_dup)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
- }else{
- /* No dup, just copy it. */
- info_dup = info;
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_dup(comm, &comm_dup)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
+ if (MPI_INFO_NULL != info) {
+ if (MPI_SUCCESS != (mpi_code = MPI_Info_dup(info, &info_dup)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
+ }
+ else {
+ /* No dup, just copy it. */
+ info_dup = info;
}
/* copy them to the return arguments */
@@ -281,18 +250,17 @@ H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Inf
*info_new = info_dup;
done:
- if (FAIL == ret_value){
- /* need to free anything created here */
- if (MPI_COMM_NULL != comm_dup)
- MPI_Comm_free(&comm_dup);
- if (MPI_INFO_NULL != info_dup)
- MPI_Info_free(&info_dup);
+ if (FAIL == ret_value) {
+ /* need to free anything created here */
+ if (MPI_COMM_NULL != comm_dup)
+ MPI_Comm_free(&comm_dup);
+ if (MPI_INFO_NULL != info_dup)
+ MPI_Info_free(&info_dup);
}
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_comm_info_free
*
@@ -308,32 +276,30 @@ done:
*
* Programmer: Albert Cheng
* Jan 8, 2003
- *
- * Modifications:
*-------------------------------------------------------------------------
*/
herr_t
H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info)
{
- herr_t ret_value=SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if (!comm || !info)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "not a valid argument")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "not a valid argument")
if (MPI_COMM_NULL != *comm)
- MPI_Comm_free(comm);
+ MPI_Comm_free(comm);
if (MPI_INFO_NULL != *info)
- MPI_Info_free(info);
+ MPI_Info_free(info);
done:
FUNC_LEAVE_NOAPI(ret_value)
}
#ifdef NOT_YET
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_wait_for_left_neighbor
*
@@ -355,32 +321,29 @@ done:
* Programmer: rky
* 19981207
*
- * Modifications:
- * Robb Matzke, 1999-08-09
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- char msgbuf[1];
- MPI_Status rcvstat;
- int mpi_code; /* mpi return code */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ char msgbuf[1];
+ MPI_Status rcvstat;
+ int mpi_code; /* mpi return code */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
/* Portably initialize MPI status variable */
- HDmemset(&rcvstat,0,sizeof(MPI_Status));
+ HDmemset(&rcvstat, 0, sizeof(MPI_Status));
/* p0 has no left neighbor; all other procs wait for msg */
if (file->mpi_rank != 0) {
- if (MPI_SUCCESS != (mpi_code=MPI_Recv( &msgbuf, 1, MPI_CHAR,
- file->mpi_rank-1, MPI_ANY_TAG, file->comm, &rcvstat )))
+ if (MPI_SUCCESS != (mpi_code = MPI_Recv(&msgbuf, 1, MPI_CHAR, file->mpi_rank - 1, MPI_ANY_TAG,
+ file->comm, &rcvstat)))
HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mpi_code)
}
@@ -388,7 +351,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_signal_right_neighbor
*
@@ -410,26 +372,24 @@ done:
* Programmer: rky
* 19981207
*
- * Modifications:
- * Robb Matzke, 1999-08-09
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
H5FD_mpio_signal_right_neighbor(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- char msgbuf[1];
- int mpi_code; /* mpi return code */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ char msgbuf[1];
+ int mpi_code; /* mpi return code */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
- if(file->mpi_rank != (file->mpi_size - 1))
- if(MPI_SUCCESS != (mpi_code=MPI_Send(&msgbuf, 0/*empty msg*/, MPI_CHAR, file->mpi_rank + 1, 0, file->comm)))
+ if (file->mpi_rank != (file->mpi_size - 1))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_Send(&msgbuf, 0 /*empty msg*/, MPI_CHAR, file->mpi_rank + 1, 0, file->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Send failed", mpi_code)
done:
@@ -437,7 +397,6 @@ done:
}
#endif /* NOT_YET */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_setup_collective
*
@@ -466,21 +425,21 @@ done:
herr_t
H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype, MPI_Datatype *ftype)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list")
/* Set buffer MPI type */
- if(H5P_set(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, btype) < 0)
+ if (H5P_set(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, btype) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O property")
/* Set File MPI type */
- if(H5P_set(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, ftype) < 0)
+ if (H5P_set(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, ftype) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O property")
done:
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index 2d62c79..3af5e41 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: The public header file for common items for all MPI VFL drivers
@@ -36,25 +36,24 @@
#define H5D_MULTI_CHUNK_IO_COL_THRESHOLD 60
/* Type of I/O for data transfer properties */
typedef enum H5FD_mpio_xfer_t {
- H5FD_MPIO_INDEPENDENT = 0, /*zero is the default*/
+ H5FD_MPIO_INDEPENDENT = 0, /*zero is the default*/
H5FD_MPIO_COLLECTIVE
} H5FD_mpio_xfer_t;
/* Type of chunked dataset I/O */
typedef enum H5FD_mpio_chunk_opt_t {
H5FD_MPIO_CHUNK_DEFAULT = 0,
- H5FD_MPIO_CHUNK_ONE_IO, /*zero is the default*/
+ H5FD_MPIO_CHUNK_ONE_IO, /*zero is the default*/
H5FD_MPIO_CHUNK_MULTI_IO
} H5FD_mpio_chunk_opt_t;
/* Type of collective I/O */
typedef enum H5FD_mpio_collective_opt_t {
H5FD_MPIO_COLLECTIVE_IO = 0,
- H5FD_MPIO_INDIVIDUAL_IO /*zero is the default*/
+ H5FD_MPIO_INDIVIDUAL_IO /*zero is the default*/
} H5FD_mpio_collective_opt_t;
/* Include all the MPI VFL headers */
-#include "H5FDmpio.h" /* MPI I/O file driver */
+#include "H5FDmpio.h" /* MPI I/O file driver */
#endif /* H5FDmpi_H */
-
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index c8edb85..8f129f2 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -6,32 +6,31 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
- * Purpose: This is the MPI-2 I/O driver.
+ * Purpose: This is the MPI-2 I/O driver.
*
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_mpio_init_interface
-
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#define H5_INTERFACE_INIT_FUNC H5FD_mpio_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_PARALLEL
@@ -58,85 +57,85 @@ static char H5FD_mpi_native_g[] = "native";
* driver doesn't bother to keep it updated since it's an expensive operation.
*/
typedef struct H5FD_mpio_t {
- H5FD_t pub; /*public stuff, must be first */
- MPI_File f; /*MPIO file handle */
- MPI_Comm comm; /*communicator */
- MPI_Info info; /*file information */
- int mpi_rank; /* This process's rank */
- int mpi_size; /* Total number of processes */
- haddr_t eof; /*end-of-file marker */
- haddr_t eoa; /*end-of-address marker */
- haddr_t last_eoa; /* Last known end-of-address marker */
+ H5FD_t pub; /*public stuff, must be first */
+ MPI_File f; /*MPIO file handle */
+ MPI_Comm comm; /*communicator */
+ MPI_Info info; /*file information */
+ int mpi_rank; /* This process's rank */
+ int mpi_size; /* Total number of processes */
+ haddr_t eof; /*end-of-file marker */
+ haddr_t eoa; /*end-of-address marker */
+ haddr_t last_eoa; /* Last known end-of-address marker */
} H5FD_mpio_t;
/* Private Prototypes */
/* Callbacks */
-static void *H5FD_mpio_fapl_get(H5FD_t *_file);
-static void *H5FD_mpio_fapl_copy(const void *_old_fa);
-static herr_t H5FD_mpio_fapl_free(void *_fa);
-static H5FD_t *H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_mpio_close(H5FD_t *_file);
-static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_mpio_get_eof(const H5FD_t *_file);
-static herr_t H5FD_mpio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_mpio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_mpio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static int H5FD_mpio_mpi_rank(const H5FD_t *_file);
-static int H5FD_mpio_mpi_size(const H5FD_t *_file);
+static void * H5FD_mpio_fapl_get(H5FD_t *_file);
+static void * H5FD_mpio_fapl_copy(const void *_old_fa);
+static herr_t H5FD_mpio_fapl_free(void *_fa);
+static H5FD_t * H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_mpio_close(H5FD_t *_file);
+static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD_mpio_get_eof(const H5FD_t *_file);
+static herr_t H5FD_mpio_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_mpio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_mpio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static int H5FD_mpio_mpi_rank(const H5FD_t *_file);
+static int H5FD_mpio_mpi_size(const H5FD_t *_file);
static MPI_Comm H5FD_mpio_communicator(const H5FD_t *_file);
/* MPIO-specific file access properties */
typedef struct H5FD_mpio_fapl_t {
- MPI_Comm comm; /*communicator */
- MPI_Info info; /*file information */
+ MPI_Comm comm; /*communicator */
+ MPI_Info info; /*file information */
} H5FD_mpio_fapl_t;
/* The MPIO file driver information */
static const H5FD_class_mpi_t H5FD_mpio_g = {
- { /* Start of superclass information */
- "mpio", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_SEMI, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_mpio_fapl_t), /*fapl_size */
- H5FD_mpio_fapl_get, /*fapl_get */
- H5FD_mpio_fapl_copy, /*fapl_copy */
- H5FD_mpio_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_mpio_open, /*open */
- H5FD_mpio_close, /*close */
- NULL, /*cmp */
- H5FD_mpio_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_mpio_get_eoa, /*get_eoa */
- H5FD_mpio_set_eoa, /*set_eoa */
- H5FD_mpio_get_eof, /*get_eof */
- H5FD_mpio_get_handle, /*get_handle */
- H5FD_mpio_read, /*read */
- H5FD_mpio_write, /*write */
- H5FD_mpio_flush, /*flush */
- H5FD_mpio_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
- }, /* End of superclass information */
- H5FD_mpio_mpi_rank, /*get_rank */
- H5FD_mpio_mpi_size, /*get_size */
- H5FD_mpio_communicator /*get_comm */
+ {
+ /* Start of superclass information */
+ "mpio", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_SEMI, /* fc_degree */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_mpio_fapl_t), /*fapl_size */
+ H5FD_mpio_fapl_get, /*fapl_get */
+ H5FD_mpio_fapl_copy, /*fapl_copy */
+ H5FD_mpio_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_mpio_open, /*open */
+ H5FD_mpio_close, /*close */
+ NULL, /*cmp */
+ H5FD_mpio_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_mpio_get_eoa, /*get_eoa */
+ H5FD_mpio_set_eoa, /*set_eoa */
+ H5FD_mpio_get_eof, /*get_eof */
+ H5FD_mpio_get_handle, /*get_handle */
+ H5FD_mpio_read, /*read */
+ H5FD_mpio_write, /*write */
+ H5FD_mpio_flush, /*flush */
+ H5FD_mpio_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
+ H5FD_FLMAP_DICHOTOMY /*fl_map */
+ }, /* End of superclass information */
+ H5FD_mpio_mpi_rank, /*get_rank */
+ H5FD_mpio_mpi_size, /*get_size */
+ H5FD_mpio_communicator /*get_comm */
};
#ifdef H5FDmpio_DEBUG
@@ -148,18 +147,17 @@ static const H5FD_class_mpi_t H5FD_mpio_g = {
* 't' trace function entry and exit
* 'w' show write offset and size
*/
-static int H5FD_mpio_Debug[256] =
- { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
+static int H5FD_mpio_Debug[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#endif
-
/*--------------------------------------------------------------------------
NAME
H5FD_mpio_init_interface -- Initialize interface-specific information
@@ -181,15 +179,14 @@ H5FD_mpio_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_mpio_init())
} /* H5FD_mpio_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_init
+ * Function: H5FD_mpio_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the mpio driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the mpio driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, August 5, 1999
@@ -201,34 +198,34 @@ H5FD_mpio_init(void)
{
#ifdef H5FDmpio_DEBUG
static int H5FD_mpio_Debug_inited = 0;
-#endif /* H5FDmpio_DEBUG */
- const char *s; /* String for environment variables */
- hid_t ret_value; /* Return value */
+#endif /* H5FDmpio_DEBUG */
+ const char *s; /* String for environment variables */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Register the MPI-IO VFD, if it isn't already */
- if(H5I_VFL != H5I_get_type(H5FD_MPIO_g))
+ if (H5I_VFL != H5I_get_type(H5FD_MPIO_g))
H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g, sizeof(H5FD_class_mpi_t), FALSE);
/* Allow MPI buf-and-file-type optimizations? */
s = HDgetenv("HDF5_MPI_OPT_TYPES");
- if(s && HDisdigit(*s))
+ if (s && HDisdigit(*s))
H5FD_mpi_opt_types_g = (hbool_t)HDstrtol(s, NULL, 0);
#ifdef H5FDmpio_DEBUG
- if(!H5FD_mpio_Debug_inited) {
+ if (!H5FD_mpio_Debug_inited) {
/* Retrieve MPI-IO debugging environment variable */
s = HDgetenv("H5FD_mpio_Debug");
- if(s) {
+ if (s) {
/* Set debug mask */
- while(*s) {
- H5FD_mpio_Debug[(int)*s]++;
- s++;
- } /* end while */
- } /* end if */
+ while (*s) {
+ H5FD_mpio_Debug[(int)*s]++;
+ s++;
+ } /* end while */
+ } /* end if */
H5FD_mpio_Debug_inited++;
- } /* end if */
+ } /* end if */
#endif /* H5FDmpio_DEBUG */
/* Set return value */
@@ -238,19 +235,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_init() */
-
/*---------------------------------------------------------------------------
- * Function: H5FD_mpio_term
+ * Function: H5FD_mpio_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Return: <none>
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
void
@@ -259,466 +253,407 @@ H5FD_mpio_term(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
- H5FD_MPIO_g=0;
+ H5FD_MPIO_g = 0;
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_mpio_term() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_mpio
+ * Function: H5Pset_fapl_mpio
*
- * Purpose: Store the user supplied MPIO communicator comm and info in
- * the file access property list FAPL_ID which can then be used
- * to create and/or open the file. This function is available
- * only in the parallel HDF5 library and is not collective.
+ * Purpose: Store the user supplied MPIO communicator comm and info in
+ * the file access property list FAPL_ID which can then be used
+ * to create and/or open the file. This function is available
+ * only in the parallel HDF5 library and is not collective.
*
- * comm is the MPI communicator to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of comm. Any modification to comm after this function
- * call returns has no effect on the access property list.
+ * comm is the MPI communicator to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of comm. Any modification to comm after this function
+ * call returns has no effect on the access property list.
*
- * info is the MPI Info object to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of info. Any modification to info after this
- * function call returns has no effect on the access property
- * list.
+ * info is the MPI Info object to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of info. Any modification to info after this
+ * function call returns has no effect on the access property
+ * list.
*
* If fapl_id has previously set comm and info values, they
* will be replaced and the old communicator and Info object
* are freed.
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Albert Cheng
- * Feb 3, 1998
- *
- * Modifications:
- * Robb Matzke, 1998-02-18
- * Check all arguments before the property list is updated so we
- * don't leave the property list in a bad state if something
- * goes wrong. Also, the property list data type changed to
- * allow more generality so all the mpi-related stuff is in the
- * `u.mpi' member. The `access_mode' will contain only
- * mpi-related flags defined in H5Fpublic.h.
- *
- * Albert Cheng, 1998-04-16
- * Removed the ACCESS_MODE argument. The access mode is changed
- * to be controlled by data transfer property list during data
- * read/write calls.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * Raymond Lu, 2001-10-23
- * Changed the file access list to the new generic property
- * list.
- *
- * Albert Cheng, 2003-04-17
- * Modified the description of the function that it now stores
- * a duplicate of the communicator and INFO object. Free the
- * old duplicates if previously set. (Work is actually done
- * by H5P_set_driver.)
+ * Feb 3, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
{
- H5FD_mpio_fapl_t fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5FD_mpio_fapl_t fa;
+ H5P_genplist_t * plist; /* Property list pointer */
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iMcMi", fapl_id, comm, info);
- if(fapl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (fapl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
- if(MPI_COMM_NULL == comm)
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
+ if (MPI_COMM_NULL == comm)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
fa.comm = comm;
fa.info = info;
/* duplication is done during driver setting. */
- ret_value= H5P_set_driver(plist, H5FD_MPIO, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_MPIO, &fa);
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* H5Pset_fapl_mpio() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_mpio
- *
- * Purpose: If the file access property list is set to the H5FD_MPIO
- * driver then this function returns duplicates of the MPI
- * communicator and Info object stored through the comm and
- * info pointers. It is the responsibility of the application
- * to free the returned communicator and Info object.
- *
- * Return: Success: Non-negative with the communicator and
- * Info object returned through the comm and
- * info arguments if non-null. Since they are
- * duplicates of the stored objects, future
- * modifications to the access property list do
- * not affect them and it is the responsibility
- * of the application to free them.
- *
- * Failure: Negative
+ * Function: H5Pget_fapl_mpio
+ *
+ * Purpose: If the file access property list is set to the H5FD_MPIO
+ * driver then this function returns duplicates of the MPI
+ * communicator and Info object stored through the comm and
+ * info pointers. It is the responsibility of the application
+ * to free the returned communicator and Info object.
+ *
+ * Return: Success: Non-negative with the communicator and
+ * Info object returned through the comm and
+ * info arguments if non-null. Since they are
+ * duplicates of the stored objects, future
+ * modifications to the access property list do
+ * not affect them and it is the responsibility
+ * of the application to free them.
+ * Failure: Negative
*
* Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- * Albert Cheng, Apr 16, 1998
- * Removed the access_mode argument. The access_mode is changed
- * to be controlled by data transfer property list during data
- * read/write calls.
- *
- * Raymond Lu, 2001-10-23
- * Changed the file access list to the new generic property
- * list.
- *
- * Albert Cheng, 2003-04-17
- * Return duplicates of the stored communicator and Info object.
+ * Thursday, February 26, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
+H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/)
{
- H5FD_mpio_fapl_t *fa;
- H5P_genplist_t *plist; /* Property list pointer */
- MPI_Comm comm_tmp=MPI_COMM_NULL;
- int mpi_code; /* mpi return code */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_mpio_fapl_t *fa;
+ H5P_genplist_t * plist; /* Property list pointer */
+ MPI_Comm comm_tmp = MPI_COMM_NULL;
+ int mpi_code; /* mpi return code */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, comm, info);
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
- if(H5FD_MPIO != H5P_get_driver(plist))
+ if (H5FD_MPIO != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if(NULL == (fa = (H5FD_mpio_fapl_t *)H5P_get_driver_info(plist)))
+ if (NULL == (fa = (H5FD_mpio_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
/* Store the duplicated communicator in a temporary variable for error */
/* recovery in case the INFO duplication fails. We cannot attempt to */
/* the value into *comm yet since if MPI_Comm_dup fails, we will end */
/* up freeing whatever *comm holds and that could be invalid. */
- if (comm){
- if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(fa->comm, &comm_tmp)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
+ if (comm) {
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_dup(fa->comm, &comm_tmp)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
}
- if (info){
- if (MPI_INFO_NULL != fa->info){
- if (MPI_SUCCESS != (mpi_code=MPI_Info_dup(fa->info, info)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
- }else{
- /* do not dup it */
- *info = MPI_INFO_NULL;
- }
- }
+ if (info) {
+ if (MPI_INFO_NULL != fa->info) {
+ if (MPI_SUCCESS != (mpi_code = MPI_Info_dup(fa->info, info)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
+ } /* end if */
+ else
+ /* do not dup it */
+ *info = MPI_INFO_NULL;
+ } /* end if */
+ /* Store the copied communicator, now that the Info object has been
+ * successfully copied.
+ */
if (comm)
*comm = comm_tmp;
done:
- if (FAIL==ret_value){
- /* need to free anything created here */
- if (comm_tmp != MPI_COMM_NULL)
- MPI_Comm_free(&comm_tmp);
- }
+ if (ret_value < 0)
+ /* need to free anything created here */
+ if (comm_tmp != MPI_COMM_NULL)
+ MPI_Comm_free(&comm_tmp);
+
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_fapl_mpio() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio
+ * Function: H5Pset_dxpl_mpio
*
- * Purpose: Set the data transfer property list DXPL_ID to use transfer
- * mode XFER_MODE. The property list can then be used to control
- * the I/O transfer mode during data I/O operations. The valid
- * transfer modes are:
+ * Purpose: Set the data transfer property list DXPL_ID to use transfer
+ * mode XFER_MODE. The property list can then be used to control
+ * the I/O transfer mode during data I/O operations. The valid
+ * transfer modes are:
*
- * H5FD_MPIO_INDEPENDENT:
- * Use independent I/O access (the default).
+ * H5FD_MPIO_INDEPENDENT:
+ * Use independent I/O access (the default).
*
- * H5FD_MPIO_COLLECTIVE:
- * Use collective I/O access.
+ * H5FD_MPIO_COLLECTIVE:
+ * Use collective I/O access.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Albert Cheng
- * April 2, 1998
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDt", dxpl_id, xfer_mode);
- if(dxpl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ if (dxpl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
- if(H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode)
+ if (H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode")
/* Set the transfer mode */
- if(H5P_set(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
+ if (H5P_set(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pget_dxpl_mpio
+ * Function: H5Pget_dxpl_mpio
*
- * Purpose: Queries the transfer mode current set in the data transfer
- * property list DXPL_ID. This is not collective.
+ * Purpose: Queries the transfer mode current set in the data transfer
+ * property list DXPL_ID. This is not collective.
*
- * Return: Success: Non-negative, with the transfer mode returned
- * through the XFER_MODE argument if it is
- * non-null.
- *
- * Failure: Negative
+ * Return: Success: Non-negative, with the transfer mode returned
+ * through the XFER_MODE argument if it is
+ * non-null.
+ * Failure: Negative
*
* Programmer: Albert Cheng
- * April 2, 1998
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/)
+H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", dxpl_id, xfer_mode);
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ /* Check arguments */
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Get the transfer mode */
- if(xfer_mode)
- if(H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, xfer_mode) < 0)
+ if (xfer_mode)
+ if (H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to get value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_dxpl_mpio() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_collective_opt
+ * Function: H5Pset_dxpl_mpio_collective_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mode)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDc", dxpl_id, opt_mode);
- if(dxpl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ if (dxpl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
- if(H5P_set(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &opt_mode) < 0)
+ if (H5P_set(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_collective_opt() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt
+ * Function: H5Pset_dxpl_mpio_chunk_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDh", dxpl_id, opt_mode);
- if(dxpl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ if (dxpl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
- if(H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, &opt_mode) < 0)
+ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, &opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_num
+ * Function: H5Pset_dxpl_mpio_chunk_opt_num
*
- * Purpose: To set a threshold for doing linked chunk IO
+ * Purpose: To set a threshold for doing linked chunk IO
*
- * Note: If the number is greater than the threshold set by the user,
- * the library will do linked chunk I/O; otherwise, I/O will be
- * done for every chunk.
+ * Note: If the number is greater than the threshold set by the user,
+ * the library will do linked chunk I/O; otherwise, I/O will be
+ * done for every chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", dxpl_id, num_chunk_per_proc);
- if(dxpl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ if (dxpl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
- if(H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, &num_chunk_per_proc) < 0)
+ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, &num_chunk_per_proc) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_num() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
+ * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
*
- * Purpose: To set a threshold for doing collective I/O for each chunk
+ * Purpose: To set a threshold for doing collective I/O for each chunk
*
- * Note: The library will calculate the percentage of the number of
- * process holding selections at each chunk. If that percentage
- * of number of process in the individual chunk is greater than
- * the threshold set by the user, the library will do collective
- * chunk I/O for this chunk; otherwise, independent I/O will be
- * done for this chunk.
+ * Note: The library will calculate the percentage of the number of
+ * process holding selections at each chunk. If that percentage
+ * of number of process in the individual chunk is greater than
+ * the threshold set by the user, the library will do collective
+ * chunk I/O for this chunk; otherwise, independent I/O will be
+ * done for this chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_chunk)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", dxpl_id, percent_num_proc_per_chunk);
- if(dxpl_id == H5P_DEFAULT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
-
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ if (dxpl_id == H5P_DEFAULT)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
+ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
- if(H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, &percent_num_proc_per_chunk) < 0)
+ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, &percent_num_proc_per_chunk) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_ratio() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_get
+ * Function: H5FD_mpio_fapl_get
*
- * Purpose: Returns a file access property list which could be used to
- * create another file the same as this one.
+ * Purpose: Returns a file access property list which could be used to
+ * create another file the same as this one.
*
- * Return: Success: Ptr to new file access property list with all
- * fields copied from the file pointer.
+ * Return: Success: Ptr to new file access property list with all
+ * fields copied from the file pointer.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -726,21 +661,21 @@ done:
static void *
H5FD_mpio_fapl_get(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- H5FD_mpio_fapl_t *fa = NULL;
- void *ret_value; /* Return value */
+ H5FD_mpio_t * file = (H5FD_mpio_t *)_file;
+ H5FD_mpio_fapl_t *fa = NULL;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
- if(NULL == (fa = (H5FD_mpio_fapl_t *)H5MM_calloc(sizeof(H5FD_mpio_fapl_t))))
+ if (NULL == (fa = (H5FD_mpio_fapl_t *)H5MM_calloc(sizeof(H5FD_mpio_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Duplicate communicator and Info object. */
- if(FAIL == H5FD_mpi_comm_info_dup(file->comm, file->info, &fa->comm, &fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ if (FAIL == H5FD_mpi_comm_info_dup(file->comm, file->info, &fa->comm, &fa->info))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* Set return value */
ret_value = fa;
@@ -749,17 +684,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_copy
+ * Function: H5FD_mpio_fapl_copy
*
- * Purpose: Copies the mpio-specific file access properties.
+ * Purpose: Copies the mpio-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
*-------------------------------------------------------------------------
@@ -767,103 +701,97 @@ done:
static void *
H5FD_mpio_fapl_copy(const void *_old_fa)
{
- void *ret_value = NULL;
- const H5FD_mpio_fapl_t *old_fa = (const H5FD_mpio_fapl_t*)_old_fa;
- H5FD_mpio_fapl_t *new_fa = NULL;
+ void * ret_value = NULL;
+ const H5FD_mpio_fapl_t *old_fa = (const H5FD_mpio_fapl_t *)_old_fa;
+ H5FD_mpio_fapl_t * new_fa = NULL;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
-if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
#endif
- if(NULL == (new_fa = (H5FD_mpio_fapl_t *)H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
+ if (NULL == (new_fa = (H5FD_mpio_fapl_t *)H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the general information */
HDmemcpy(new_fa, old_fa, sizeof(H5FD_mpio_fapl_t));
/* Duplicate communicator and Info object. */
- if(FAIL == H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ if (FAIL == H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
ret_value = new_fa;
done:
- if (NULL == ret_value){
- /* cleanup */
- if (new_fa)
- H5MM_xfree(new_fa);
+ if (NULL == ret_value) {
+ /* cleanup */
+ if (new_fa)
+ H5MM_xfree(new_fa);
}
#ifdef H5FDmpio_DEBUG
-if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_free
+ * Function: H5FD_mpio_fapl_free
*
- * Purpose: Frees the mpio-specific file access properties.
+ * Purpose: Frees the mpio-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpio_fapl_free(void *_fa)
{
- herr_t ret_value = SUCCEED;
- H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
+ herr_t ret_value = SUCCEED;
+ H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t *)_fa;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5FDmpio_DEBUG
-if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "in H5FD_mpio_fapl_free\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stderr, "in H5FD_mpio_fapl_free\n");
#endif
HDassert(fa);
/* Free the internal communicator and INFO object */
- HDassert(MPI_COMM_NULL!=fa->comm);
+ HDassert(MPI_COMM_NULL != fa->comm);
H5FD_mpi_comm_info_free(&fa->comm, &fa->info);
H5MM_xfree(fa);
#ifdef H5FDmpio_DEBUG
-if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_set_mpio_atomicity
+ * Function: H5FD_set_mpio_atomicity
*
- * Purpose: Sets the atomicity mode
+ * Purpose: Sets the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: Negative
- *
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ int mpi_code; /* MPI return code */
int temp_flag;
herr_t ret_value = SUCCEED;
@@ -871,7 +799,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
if (FALSE == flag)
@@ -880,37 +808,35 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
temp_flag = 1;
/* set atomicity value */
- if (MPI_SUCCESS != (mpi_code=MPI_File_set_atomicity(file->f, temp_flag)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_atomicity(file->f, temp_flag)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_atomicity", mpi_code)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_set_mpio_atomicity() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_get_mpio_atomicity
- *
- * Purpose: Returns the atomicity mode
+ * Function: H5FD_get_mpio_atomicity
*
- * Return: Success: Non-negative
+ * Purpose: Returns the atomicity mode
*
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
herr_t
H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ int mpi_code; /* MPI return code */
int temp_flag;
herr_t ret_value = SUCCEED;
@@ -918,11 +844,11 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
- /* get atomicity value */
- if (MPI_SUCCESS != (mpi_code=MPI_File_get_atomicity(file->f, &temp_flag)))
+ /* Get atomicity value */
+ if (MPI_SUCCESS != (mpi_code = MPI_File_get_atomicity(file->f, &temp_flag)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_get_atomicity", mpi_code)
if (0 != temp_flag)
@@ -933,119 +859,94 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_get_mpio_atomicity() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_open
*
* Purpose: Opens a file with name NAME. The FLAGS are a bit field with
- * purpose similar to the second argument of open(2) and which
- * are defined in H5Fpublic.h. The file access property list
- * FAPL_ID contains the properties driver properties and MAXADDR
- * is the largest address which this file will be expected to
- * access. This is collective.
- *
- * Return: Success: A new file pointer.
+ * purpose similar to the second argument of open(2) and which
+ * are defined in H5Fpublic.h. The file access property list
+ * FAPL_ID contains the properties driver properties and MAXADDR
+ * is the largest address which this file will be expected to
+ * access. This is collective.
*
- * Failure: NULL
+ * Return: Success: A new file pointer
+ * Failure: NULL
*
- * Programmer:
+ * Programmer: Robert Kim Yates
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument. Moved some error checking
- * here from elsewhere.
- *
- * rky, 1998-01-11
- * Added H5FD_mpio_Debug debug flags controlled by MPI_Info.
- *
- * rky, 1998-08-28
- * Init flag controlling redundant metadata writes to disk.
- *
- * rky, 1998-12-07
- * Added barrier after MPI_File_set_size to prevent race
- * condition -- subsequent writes were being truncated, causing
- * holes in file.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * rky & ppw, 1999-11-07
- * Modified "H5FD_mpio_open" so that file-truncation is
- * avoided for brand-new files (with zero filesize).
- *
- * Albert Cheng, 2003-04-17
- * Duplicate the communicator and Info object so that file is
- * insulated from the old one.
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t H5_ATTR_UNUSED maxaddr)
+H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR_UNUSED maxaddr)
{
- H5FD_mpio_t *file=NULL;
- MPI_File fh;
- unsigned file_opened=0; /* Flag to indicate that the file was successfully opened */
- int mpi_amode;
- int mpi_rank; /* MPI rank of this process */
- int mpi_size; /* Total number of MPI processes */
- int mpi_code; /* mpi return code */
- MPI_Offset size;
- const H5FD_mpio_fapl_t *fa=NULL;
- H5FD_mpio_fapl_t _fa;
- H5P_genplist_t *plist; /* Property list pointer */
- MPI_Comm comm_dup=MPI_COMM_NULL;
- MPI_Info info_dup=MPI_INFO_NULL;
- H5FD_t *ret_value; /* Return value */
+ H5FD_mpio_t * file = NULL;
+ MPI_File fh;
+ unsigned file_opened = 0; /* Flag to indicate that the file was successfully opened */
+ int mpi_amode;
+ int mpi_rank; /* MPI rank of this process */
+ int mpi_size; /* Total number of MPI processes */
+ int mpi_code; /* mpi return code */
+ MPI_Offset size;
+ const H5FD_mpio_fapl_t *fa = NULL;
+ H5FD_mpio_fapl_t _fa;
+ H5P_genplist_t * plist; /* Property list pointer */
+ MPI_Comm comm_dup = MPI_COMM_NULL;
+ MPI_Info info_dup = MPI_INFO_NULL;
+ H5FD_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t']) {
- fprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
- "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ HDfprintf(stdout,
+ "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
+ "fapl_id=%d, maxaddr=%lu)\n",
+ name, flags, (int)fapl_id, (unsigned long)maxaddr);
}
#endif
- /* Obtain a pointer to mpio-specific file access properties */
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ /* Get a pointer to the fapl */
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_get_driver(plist)) {
+ if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_get_driver(plist)) {
_fa.comm = MPI_COMM_SELF; /*default*/
_fa.info = MPI_INFO_NULL; /*default*/
- fa = &_fa;
- } else {
- if(NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_get_driver_info(plist)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
- }
+ fa = &_fa;
+ } /* end if */
+ else {
+ if (NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_get_driver_info(plist)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
+ } /* end else */
/* Duplicate communicator and Info object for use by this file. */
- if (FAIL==H5FD_mpi_comm_info_dup(fa->comm, fa->info, &comm_dup, &info_dup))
+ if (FAIL == H5FD_mpi_comm_info_dup(fa->comm, fa->info, &comm_dup, &info_dup))
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
- /* convert HDF5 flags to MPI-IO flags */
- /* some combinations are illegal; let MPI-IO figure it out */
- mpi_amode = (flags&H5F_ACC_RDWR) ? MPI_MODE_RDWR : MPI_MODE_RDONLY;
- if (flags&H5F_ACC_CREAT) mpi_amode |= MPI_MODE_CREATE;
- if (flags&H5F_ACC_EXCL) mpi_amode |= MPI_MODE_EXCL;
+ /* Convert HDF5 flags to MPI-IO flags */
+ /* Some combinations are illegal; let MPI-IO figure it out */
+ mpi_amode = (flags & H5F_ACC_RDWR) ? MPI_MODE_RDWR : MPI_MODE_RDONLY;
+ if (flags & H5F_ACC_CREAT)
+ mpi_amode |= MPI_MODE_CREATE;
+ if (flags & H5F_ACC_EXCL)
+ mpi_amode |= MPI_MODE_EXCL;
#ifdef H5FDmpio_DEBUG
/* Check for debug commands in the info parameter */
{
- char debug_str[128];
- int flag, i;
+ char debug_str[128];
+ int flag, i;
if (MPI_INFO_NULL != info_dup) {
- MPI_Info_get(fa->info, H5F_MPIO_DEBUG_KEY, sizeof(debug_str)-1, debug_str, &flag);
+ MPI_Info_get(fa->info, H5F_MPIO_DEBUG_KEY, sizeof(debug_str) - 1, debug_str, &flag);
if (flag) {
- fprintf(stdout, "H5FD_mpio debug flags=%s\n", debug_str );
- for (i=0;
- debug_str[i]/*end of string*/ && i<128/*just in case*/;
- ++i) {
+ HDfprintf(stdout, "H5FD_mpio debug flags=%s\n", debug_str);
+ for (i = 0; debug_str[i] /*end of string*/ && i < 128 /*just in case*/; ++i) {
H5FD_mpio_Debug[(int)debug_str[i]] = 1;
}
}
@@ -1053,42 +954,42 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
}
#endif
- if(MPI_SUCCESS != (mpi_code = MPI_File_open(comm_dup, name, mpi_amode, info_dup, &fh)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_open(comm_dup, name, mpi_amode, info_dup, &fh)))
HMPI_GOTO_ERROR(NULL, "MPI_File_open failed", mpi_code)
- file_opened=1;
+ file_opened = 1;
/* Get the MPI rank of this process and the total number of processes */
- if (MPI_SUCCESS != (mpi_code=MPI_Comm_rank (comm_dup, &mpi_rank)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm_dup, &mpi_rank)))
HMPI_GOTO_ERROR(NULL, "MPI_Comm_rank failed", mpi_code)
- if (MPI_SUCCESS != (mpi_code=MPI_Comm_size (comm_dup, &mpi_size)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(comm_dup, &mpi_size)))
HMPI_GOTO_ERROR(NULL, "MPI_Comm_size failed", mpi_code)
/* Build the return value and initialize it */
- if(NULL == (file = (H5FD_mpio_t *)H5MM_calloc(sizeof(H5FD_mpio_t))))
+ if (NULL == (file = (H5FD_mpio_t *)H5MM_calloc(sizeof(H5FD_mpio_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- file->f = fh;
- file->comm = comm_dup;
- file->info = info_dup;
+ file->f = fh;
+ file->comm = comm_dup;
+ file->info = info_dup;
file->mpi_rank = mpi_rank;
file->mpi_size = mpi_size;
/* Only processor p0 will get the filesize and broadcast it. */
if (mpi_rank == 0) {
- if (MPI_SUCCESS != (mpi_code=MPI_File_get_size(fh, &size)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_get_size(fh, &size)))
HMPI_GOTO_ERROR(NULL, "MPI_File_get_size failed", mpi_code)
} /* end if */
/* Broadcast file size */
- if(MPI_SUCCESS != (mpi_code = MPI_Bcast(&size, (int)sizeof(MPI_Offset), MPI_BYTE, 0, comm_dup)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Bcast(&size, (int)sizeof(MPI_Offset), MPI_BYTE, 0, comm_dup)))
HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code)
/* Determine if the file should be truncated */
- if(size && (flags & H5F_ACC_TRUNC)) {
- if (MPI_SUCCESS != (mpi_code=MPI_File_set_size(fh, (MPI_Offset)0)))
+ if (size && (flags & H5F_ACC_TRUNC)) {
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_size(fh, (MPI_Offset)0)))
HMPI_GOTO_ERROR(NULL, "MPI_File_set_size failed", mpi_code)
/* Don't let any proc return until all have truncated the file. */
- if (MPI_SUCCESS!= (mpi_code=MPI_Barrier(comm_dup)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(comm_dup)))
HMPI_GOTO_ERROR(NULL, "MPI_Barrier failed", mpi_code)
/* File is zero size now */
@@ -1099,69 +1000,60 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
file->eof = H5FD_mpi_MPIOff_to_haddr(size);
/* Set return value */
- ret_value=(H5FD_t*)file;
+ ret_value = (H5FD_t *)file;
done:
- if(ret_value==NULL) {
- if(file_opened)
+ if (ret_value == NULL) {
+ if (file_opened)
MPI_File_close(&fh);
- if (MPI_COMM_NULL != comm_dup)
- MPI_Comm_free(&comm_dup);
- if (MPI_INFO_NULL != info_dup)
- MPI_Info_free(&info_dup);
- if (file)
- H5MM_xfree(file);
+ if (MPI_COMM_NULL != comm_dup)
+ MPI_Comm_free(&comm_dup);
+ if (MPI_INFO_NULL != info_dup)
+ MPI_Info_free(&info_dup);
+ if (file)
+ H5MM_xfree(file);
} /* end if */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_open\n" );
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_mpio_open() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_close
*
* Purpose: Closes a file. This is collective.
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Unknown
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * Albert Cheng, 2003-04-17
- * Free the communicator stored.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpio_close(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* MPI return code */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ int mpi_code; /* MPI return code */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_close\n");
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
+
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
/* MPI_File_close sets argument to MPI_FILE_NULL */
- if (MPI_SUCCESS != (mpi_code=MPI_File_close(&(file->f)/*in,out*/)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_close(&(file->f) /*in,out*/)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_close failed", mpi_code)
/* Clean up other stuff */
@@ -1171,34 +1063,23 @@ H5FD_mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_close\n");
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_mpio_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_query
+ * Function: H5FD_mpio_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Friday, August 25, 2000
*
- * Modifications:
- *
- * John Mainzer -- 9/21/05
- * Modified code to turn off the
- * H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
- * With the movement of
- * all cache writes to process 0, this flag has become
- * problematic in PHDF5.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1207,165 +1088,145 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
- if(flags) {
- *flags=0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- *flags|=H5FD_FEAT_HAS_MPI; /* This driver uses MPI */
- *flags|=H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */
- } /* end if */
+ if (flags) {
+ *flags = 0;
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_HAS_MPI; /* This driver uses MPI */
+ *flags |= H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-}
+} /* end H5FD_mpio_query() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eoa
+ * Function: H5FD_mpio_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
- *
- * Failure: HADDR_UNDEF
+ * Return: Success: The end-of-address marker
+ * Failure: HADDR_UNDEF
*
* Programmer: Robb Matzke
* Friday, August 6, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eoa)
-}
+} /* end H5FD_mpio_get_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_set_eoa
- *
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Function: H5FD_mpio_set_eoa
*
- * Return: Success: 0
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Friday, August 6, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-}
+} /* end H5FD_mpio_set_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eof
+ * Function: H5FD_mpio_get_eof
*
- * Purpose: Gets the end-of-file marker for the file. The EOF marker
- * is the real size of the file.
+ * Purpose: Gets the end-of-file marker for the file. The EOF marker
+ * is the real size of the file.
*
- * The MPIO driver doesn't bother keeping this field updated
- * since that's a relatively expensive operation. Fortunately
- * the library only needs the EOF just after the file is opened
- * in order to determine whether the file is empty, truncated,
- * or okay. Therefore, any MPIO I/O function will set its value
- * to HADDR_UNDEF which is the error return value of this
- * function.
+ * The MPIO driver doesn't bother keeping this field updated
+ * since that's a relatively expensive operation. Fortunately
+ * the library only needs the EOF just after the file is opened
+ * in order to determine whether the file is empty, truncated,
+ * or okay. Therefore, any MPIO I/O function will set its value
+ * to HADDR_UNDEF which is the error return value of this
+ * function.
*
* Keeping the EOF updated (during write calls) is expensive
* because any process may extend the physical end of the
* file. -QAK
*
- * Return: Success: The end-of-address marker.
- *
- * Failure: HADDR_UNDEF
+ * Return: Success: The end-of-file marker
+ * Failure: HADDR_UNDEF
*
* Programmer: Robb Matzke
* Friday, August 6, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_mpio_get_eof(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eof)
-}
+} /* end H5FD_mpio_get_eof() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_get_handle
*
* Purpose: Returns the file handle of MPIO file driver.
*
- * Returns: Non-negative if succeed or negative if fails.
+ * Returns: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sept. 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
-*/
+ */
static herr_t
-H5FD_mpio_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
+H5FD_mpio_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
- H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
- herr_t ret_value = SUCCEED;
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
- if(!file_handle)
+ if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = &(file->f);
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_mpio_get_handle() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_read
*
@@ -1436,40 +1297,42 @@ done:
*/
static herr_t
H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+ void *buf /*out*/)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t * file = (H5FD_mpio_t *)_file;
MPI_Offset mpi_off;
- MPI_Status mpi_stat; /* Status from I/O operation */
- int mpi_code; /* mpi return code */
- MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- int size_i; /* Integer copy of 'size' to read */
- int bytes_read; /* Number of bytes read in */
+ MPI_Status mpi_stat; /* Status from I/O operation */
+ int mpi_code; /* mpi return code */
+ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
+ int size_i; /* Integer copy of 'size' to read */
+ int bytes_read; /* Number of bytes read in */
int n;
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
- H5P_genplist_t *plist = NULL; /* Property list pointer */
- hbool_t use_view_this_time = FALSE;
- herr_t ret_value = SUCCEED;
+ int type_size; /* MPI datatype used for I/O's size */
+ int io_size; /* Actual number of bytes requested */
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ hbool_t use_view_this_time = FALSE;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_read\n" );
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
+
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
/* Make certain we have the correct type of property list */
- HDassert(H5I_GENPROP_LST==H5I_get_type(dxpl_id));
- HDassert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
+ HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
+ HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
HDassert(buf);
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat,0,sizeof(MPI_Status));
+ HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
- if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off/*out*/)<0)
+ if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off /*out*/) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off")
size_i = (int)size;
if ((hsize_t)size_i != size)
@@ -1477,20 +1340,19 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t dxpl_id, had
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'r'])
- fprintf(stdout, "in H5FD_mpio_read mpi_off=%ld size_i=%d\n",
- (long)mpi_off, size_i );
+ HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", FUNC, (long)mpi_off, size_i);
#endif
/* Only look for MPI views for raw data transfers */
- if(type==H5FD_MEM_DRAW) {
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
+ if (type == H5FD_MEM_DRAW) {
+ H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
/* Obtain the data transfer properties */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* get the transfer mode from the dxpl */
- if(H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode)<0)
+ if (H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode")
/*
@@ -1499,71 +1361,76 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t dxpl_id, had
* us to test that btype=ftype=MPI_BYTE (or even MPI_TYPE_NULL, which
* could mean "use MPI_BYTE" by convention).
*/
- if(xfer_mode==H5FD_MPIO_COLLECTIVE) {
- MPI_Datatype file_type;
+ if (xfer_mode == H5FD_MPIO_COLLECTIVE) {
+ MPI_Datatype file_type;
/* Remember that views are used */
use_view_this_time = TRUE;
/* prepare for a full-blown xfer using btype, ftype, and disp */
- if(H5P_get(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &buf_type)<0)
+ if (H5P_get(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &buf_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O type property")
- if(H5P_get(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type)<0)
+ if (H5P_get(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O type property")
/*
* Set the file view when we are using MPI derived types
*/
- if (MPI_SUCCESS != (mpi_code=MPI_File_set_view(file->f, mpi_off, MPI_BYTE, file_type, H5FD_mpi_native_g, file->info)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, mpi_off, MPI_BYTE, file_type,
+ H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
/* When using types, use the address as the displacement for
* MPI_File_set_view and reset the address for the read to zero
*/
- mpi_off=0;
+ mpi_off = 0;
} /* end if */
- } /* end if */
+ } /* end if */
/* Read the data. */
- if(use_view_this_time) {
- H5FD_mpio_collective_opt_t coll_opt_mode;
+ if (use_view_this_time) {
+ H5FD_mpio_collective_opt_t coll_opt_mode;
#ifdef H5FDmpio_DEBUG
- if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_read: using MPIO collective mode\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_read: using MPIO collective mode\n");
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
HDassert(plist);
/* get the transfer mode from the dxpl */
- if(H5P_get(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &coll_opt_mode)<0)
+ if (H5P_get(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &coll_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property")
- if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
+ if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_read: doing MPI collective IO\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_read: doing MPI collective IO\n");
#endif
- if(MPI_SUCCESS != (mpi_code = MPI_File_read_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_File_read_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at_all failed", mpi_code)
} /* end if */
else {
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_read: doing MPI independent IO\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_read: doing MPI independent IO\n");
#endif
- if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code)
} /* end else */
/*
* Reset the file view when we used MPI derived types
*/
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE,
+ H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
- } else {
- if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ }
+ else {
+ if (MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code)
}
@@ -1573,210 +1440,110 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t dxpl_id, had
* datatype in this call though... (We aren't because using it causes
* the LANL "qsc" machine to dump core - 12/19/03) - QAK]
*/
- if (MPI_SUCCESS != (mpi_code=MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
/* Get the type's size */
- if (MPI_SUCCESS != (mpi_code=MPI_Type_size(buf_type,&type_size)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code)
/* Compute the actual number of bytes requested */
- io_size=type_size*size_i;
+ io_size = type_size * size_i;
/* Check for read failure */
- if (bytes_read<0 || bytes_read>io_size)
+ if (bytes_read < 0 || bytes_read > io_size)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
/*
* This gives us zeroes beyond end of physical MPI file.
*/
- if ((n=(io_size-bytes_read)) > 0)
- HDmemset((char*)buf+bytes_read, 0, (size_t)n);
+ if ((n = (io_size - bytes_read)) > 0)
+ HDmemset((char *)buf + bytes_read, 0, (size_t)n);
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_read\n" );
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_mpio_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_write
- *
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Function: H5FD_mpio_write
*
- * MPI is able to coalesce requests from different processes
- * (collective and independent).
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * Return: Success: Zero. USE_TYPES and OLD_USE_TYPES in the
- * access params are altered.
+ * MPI is able to coalesce requests from different processes
+ * (collective and independent).
*
- * Failure: -1, USE_TYPES and OLD_USE_TYPES in the
- * access params may be altered.
+ * Return: Success: SUCCEED. USE_TYPES and OLD_USE_TYPES in the
+ * access params are altered.
+ * Failure: FAIL. USE_TYPES and OLD_USE_TYPES in the
+ * access params may be altered.
*
- * Programmer: Unknown
+ * Programmer: Robert Kim Yates
* January 30, 1998
*
- * Modifications:
- * rky, 1998-08-28
- * If the file->allsame flag is set, we assume that all the
- * procs in the relevant MPI communicator will write identical
- * data at identical offsets in the file, so only proc 0 will
- * write, and all other procs will wait for p0 to finish. This
- * is useful for writing metadata, for example. Note that we
- * don't _check_ that the data is identical. Also, the mechanism
- * we use to eliminate the redundant writes is by requiring a
- * call to H5FD_mpio_tas_allsame before the write, which is
- * rather klugey. Would it be better to pass a parameter to
- * low-level writes like H5F_block_write and H5F_low_write,
- * instead? Or...??? Also, when I created this mechanism I
- * wanted to minimize the difference in behavior between the old
- * way of doing things (i.e., all procs write) and the new way,
- * so the writes are eliminated at the very lowest level, here
- * in H5FD_mpio_write. It may be better to rethink that, and
- * short-circuit the writes at a higher level (e.g., at the
- * points in the code where H5FD_mpio_tas_allsame is called).
- *
- *
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
- *
- * rky, 1998-04-10
- * Call independent or collective MPI write, based on
- * ACCESS_PARMS.
- *
- * rky, 1998-04-24
- * Removed redundant write from H5FD_mpio_write.
- *
- * Albert Cheng, 1998-06-01
- * Added XFER_MODE to control independent or collective MPI
- * write.
- *
- * rky, 1998-08-16
- * Use BTYPE, FTYPE, and DISP from access parms. The guts of
- * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
- * single dual-purpose routine.
- *
- * rky, 1998-08-28
- * Added ALLSAME parameter to make all but proc 0 skip the
- * actual write.
- *
- * Robb Matzke, 1999-04-21
- * Changed XFER_MODE to XFER_PARMS for all H5FD_*_write()
- * callbacks.
- *
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * Albert Cheng, 1999-12-19
- * When only-p0-write-allsame-data, p0 Bcasts the
- * ret_value to other processes. This prevents
- * a racing condition (that other processes try to
- * read the file before p0 finishes writing) and also
- * allows all processes to report the same ret_value.
- *
- * Kim Yates, Pat Weidhaas, 2000-09-26
- * Move block of coding where only p0 writes after the
- * MPI_File_set_view call.
- *
- * Quincey Koziol, 2002-05-10
- * Instead of always writing metadata from process 0, spread the
- * burden among all the processes by using a round-robin rotation
- * scheme.
- *
- * Quincey Koziol, 2002-05-10
- * Removed allsame code, keying off the type parameter instead.
- *
- * Quincey Koziol, 2002-05-14
- * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
- * for the I/O transfer. Someday we might include code to decode
- * the MPI type used for more complicated transfers and call
- * MPI_Get_count all the time.
- *
- * Quincey Koziol - 2002/06/17
- * Removed 'disp' parameter from H5FD_mpio_setup routine and use
- * the address of the dataset in MPI_File_set_view() calls, as
- * necessary.
- *
- * Quincey Koziol - 2002/06/24
- * Removed "lazy" MPI_File_set_view() calls, since they would fail
- * if the first I/O was a collective I/O using MPI derived types
- * and the next I/O was an independent I/O.
- *
- * Quincey Koziol - 2002/07/18
- * Added "block_before_meta_write" dataset transfer flag, which
- * is set during writes from a metadata cache flush and indicates
- * that all the processes must sync up before (one of them)
- * writing metadata.
- *
- * Quincey Koziol - 2003/10/22-31
- * Restructured code massively, straightening out logic and finally
- * getting the bytes_written stuff working.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- MPI_Offset mpi_off;
- MPI_Status mpi_stat; /* Status from I/O operation */
- MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t * file = (H5FD_mpio_t *)_file;
+ MPI_Offset mpi_off;
+ MPI_Status mpi_stat; /* Status from I/O operation */
+ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
+ int mpi_code; /* MPI return code */
int size_i, bytes_written;
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
- hbool_t use_view_this_time = FALSE;
- H5P_genplist_t *plist = NULL; /* Property list pointer */
- herr_t ret_value = SUCCEED;
+ int type_size; /* MPI datatype used for I/O's size */
+ int io_size; /* Actual number of bytes requested */
+ hbool_t use_view_this_time = FALSE;
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_write\n" );
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
+
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
/* Make certain we have the correct type of property list */
- HDassert(H5I_GENPROP_LST==H5I_get_type(dxpl_id));
- HDassert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
+ HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
+ HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
HDassert(buf);
/* Portably initialize MPI status variable */
HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
- if(H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0)
+ if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off")
size_i = (int)size;
- if((hsize_t)size_i != size)
+ if ((hsize_t)size_i != size)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from size to size_i")
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'w'])
- fprintf(stdout, "in H5FD_mpio_write mpi_off=%ld size_i=%d\n", (long)mpi_off, size_i);
+ if (H5FD_mpio_Debug[(int)'w'])
+ HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", FUNC, (long)mpi_off, size_i);
#endif
- if(type == H5FD_MEM_DRAW) {
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
+ if (type == H5FD_MEM_DRAW) {
+ H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
/* Obtain the data transfer properties */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* get the transfer mode from the dxpl */
- if(H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode)<0)
+ if (H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode")
/*
@@ -1785,22 +1552,23 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
* us to test that btype=ftype=MPI_BYTE (or even MPI_TYPE_NULL, which
* could mean "use MPI_BYTE" by convention).
*/
- if(xfer_mode == H5FD_MPIO_COLLECTIVE) {
- MPI_Datatype file_type;
+ if (xfer_mode == H5FD_MPIO_COLLECTIVE) {
+ MPI_Datatype file_type;
/* Remember that views are used */
use_view_this_time = TRUE;
/* prepare for a full-blown xfer using btype, ftype, and disp */
- if(H5P_get(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &buf_type) < 0)
+ if (H5P_get(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, &buf_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O type property")
- if(H5P_get(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type) < 0)
+ if (H5P_get(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, &file_type) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O type property")
/*
* Set the file view when we are using MPI derived types
*/
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, mpi_off, MPI_BYTE, file_type, H5FD_mpi_native_g, file->info)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, mpi_off, MPI_BYTE, file_type,
+ H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
/* When using types, use the address as the displacement for
@@ -1808,55 +1576,60 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
*/
mpi_off = 0;
} /* end if */
- } /* end if */
+ } /* end if */
else {
#if 0 /* JRM -- 3/23/10 */ /* this is no longer always the case */
/* Only one process can do the actual metadata write */
if(file->mpi_rank != H5_PAR_META_WRITE)
#ifdef LATER
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't write metadata from non-zero rank")
-#else /* LATER */
+#else /* LATER */
HGOTO_DONE(SUCCEED) /* skip the actual write */
#endif /* LATER */
#endif /* JRM */
- } /* end if */
+ } /* end if */
/* Write the data. */
- if(use_view_this_time) {
+ if (use_view_this_time) {
H5FD_mpio_collective_opt_t coll_opt_mode;
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
#endif
+
/* Get the collective_opt property to check whether the application wants to do IO individually. */
HDassert(plist);
/* get the transfer mode from the dxpl */
- if(H5P_get(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &coll_opt_mode)<0)
+ if (H5P_get(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &coll_opt_mode) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property")
- if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
+ if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
#endif
- if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_File_write_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
} /* end if */
else {
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
#endif
- if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ if (MPI_SUCCESS !=
+ (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code)
} /* end else */
/* Reset the file view when we used MPI derived types */
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE,
+ H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
- } else {
- if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ }
+ else {
+ if (MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code)
}
@@ -1866,18 +1639,18 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
* datatype in this call though... (We aren't because using it causes
* the LANL "qsc" machine to dump core - 12/19/03) - QAK]
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
/* Get the type's size */
- if(MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code)
/* Compute the actual number of bytes requested */
io_size = type_size * size_i;
/* Check for write failure */
- if(bytes_written != io_size)
+ if (bytes_written != io_size)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Forget the EOF value (see H5FD_mpio_get_eof()) --rpm 1999-08-06 */
@@ -1885,22 +1658,19 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
done:
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
- file->mpi_rank, ret_value );
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", FUNC, file->mpi_rank, ret_value);
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_write() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_flush
*
* Purpose: Makes sure that all data is on disk. This is collective.
*
- * Return: Success: Non-negative
- *
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* January 30, 1998
@@ -1910,35 +1680,35 @@ done:
static herr_t
H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, unsigned closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* mpi return code */
- herr_t ret_value = SUCCEED;
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ int mpi_code; /* mpi return code */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
+
+ /* Sanity checks */
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
/* Only sync the file if we are not going to immediately close it */
- if(!closing) {
- if(MPI_SUCCESS != (mpi_code = MPI_File_sync(file->f)))
+ if (!closing)
+ if (MPI_SUCCESS != (mpi_code = MPI_File_sync(file->f)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_sync failed", mpi_code)
- } /* end if */
done:
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_truncate
*
@@ -1955,15 +1725,17 @@ done:
static herr_t
H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- herr_t ret_value = SUCCEED;
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "%s: Entering\n", FUNC);
#endif
+
+ /* Sanity checks */
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -1971,24 +1743,24 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
* Unfortunately, keeping track of EOF is an expensive operation, so
* we can't just check whether EOF<EOA like with other drivers.
* Therefore we'll just read the byte at EOA-1 and then write it back. */
- if(file->eoa > file->last_eoa) {
- int mpi_code; /* mpi return code */
- MPI_Offset mpi_off;
+ if (file->eoa > file->last_eoa) {
+ int mpi_code; /* mpi return code */
+ MPI_Offset mpi_off;
- if(H5FD_mpi_haddr_to_MPIOff(file->eoa, &mpi_off) < 0)
+ if (H5FD_mpi_haddr_to_MPIOff(file->eoa, &mpi_off) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset")
/* Extend the file's size */
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, mpi_off)))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, mpi_off)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_size failed", mpi_code)
- /* Don't let any proc return until all have extended the file.
+ /* Don't let any proc return until all have extended the file.
* (Prevents race condition where some processes go ahead and write
* more data to the file before all the processes have finished making
* it the shorter length, potentially truncating the file and dropping
* the new data written)
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm)))
+ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code)
/* Update the 'last' eoa value */
@@ -1997,100 +1769,92 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
#ifdef H5FDmpio_DEBUG
- if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ if (H5FD_mpio_Debug[(int)'t'])
+ HDfprintf(stdout, "%s: Leaving\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_truncate() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_rank
+ * Function: H5FD_mpio_mpi_rank
*
- * Purpose: Returns the MPI rank for a process
+ * Purpose: Returns the MPI rank for a process
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
* Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FD_mpio_mpi_rank(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->mpi_rank)
} /* end H5FD_mpio_mpi_rank() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_size
+ * Function: H5FD_mpio_mpi_size
*
- * Purpose: Returns the number of MPI processes
+ * Purpose: Returns the number of MPI processes
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
* Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FD_mpio_mpi_size(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->mpi_size)
} /* end H5FD_mpio_mpi_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_communicator
- *
- * Purpose: Returns the MPI communicator for the file.
+ * Function: H5FD_mpio_communicator
*
- * Return: Success: The communicator
+ * Purpose: Returns the MPI communicator for the file.
*
- * Failure: NULL
+ * Return: Success: The communicator
+ * Failure: Can't fail
*
* Programmer: Robb Matzke
* Monday, August 9, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static MPI_Comm
H5FD_mpio_communicator(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Sanity checks */
HDassert(file);
- HDassert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->comm)
-}
+} /* end H5FD_mpio_communicator() */
#endif /* H5_HAVE_PARALLEL */
-
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 223786e..ee1f905 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the mpio driver.
@@ -23,9 +23,9 @@
/* Macros */
#ifdef H5_HAVE_PARALLEL
-# define H5FD_MPIO (H5FD_mpio_init())
+#define H5FD_MPIO (H5FD_mpio_init())
#else
-# define H5FD_MPIO (-1)
+#define H5FD_MPIO (-1)
#endif /* H5_HAVE_PARALLEL */
#ifdef H5_HAVE_PARALLEL
@@ -44,13 +44,12 @@ H5_DLLVAR hbool_t H5FD_mpi_opt_types_g;
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_mpio_init(void);
-H5_DLL void H5FD_mpio_term(void);
+H5_DLL hid_t H5FD_mpio_init(void);
+H5_DLL void H5FD_mpio_term(void);
H5_DLL herr_t H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
-H5_DLL herr_t H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/,
- MPI_Info *info/*out*/);
+H5_DLL herr_t H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/);
H5_DLL herr_t H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode);
-H5_DLL herr_t H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/);
+H5_DLL herr_t H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/);
H5_DLL herr_t H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mode);
H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode);
H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc);
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index c76c2c0..12beaa8 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -6,76 +6,79 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Monday, November 10, 1997
- *
- * Purpose: Implements a file driver which dispatches I/O requests to
- * other file drivers depending on the purpose of the address
- * region being accessed. For instance, all meta-data could be
- * place in one file while all raw data goes to some other file.
- * This also serves as an example of coding a complex file driver,
- * therefore, it should not use any non-public definitions.
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a file driver which dispatches I/O requests to
+ * other file drivers depending on the purpose of the address
+ * region being accessed. For instance, all meta-data could be
+ * place in one file while all raw data goes to some other file.
+ * This also serves as an example of coding a complex file driver,
+ * therefore, it should not use any non-public definitions.
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-/* Disable certain warnings in PC-Lint: */
-/*lint --emacro( {534, 830}, H5P_DEFAULT, H5P_FILE_ACCESS, H5P_DATASET_XFER) */
-/*lint --emacro( {534, 830}, H5FD_MULTI) */
-/*lint -esym( 534, H5Eclear2, H5Epush2) */
-
#include "hdf5.h"
-
/* Our version of MAX */
#undef MAX
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
#ifndef FALSE
-#define FALSE 0
+#define FALSE 0
#endif
#ifndef TRUE
-#define TRUE 1
+#define TRUE 1
#endif
/* Loop through all mapped files */
-#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \
- H5FD_mem_t _unmapped, LOOPVAR; \
- hbool_t _seen[H5FD_MEM_NTYPES]; \
- \
- memset(_seen, 0, sizeof _seen); \
- for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \
- LOOPVAR = MAP[_unmapped]; \
- if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
- assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- if (_seen[LOOPVAR]++) continue;
-
-#define ALL_MEMBERS(LOOPVAR) { \
- H5FD_mem_t LOOPVAR; \
- for (LOOPVAR=H5FD_MEM_DEFAULT; LOOPVAR<H5FD_MEM_NTYPES; LOOPVAR=(H5FD_mem_t)(LOOPVAR+1)) {
-
-
-#define END_MEMBERS }}
+#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) \
+ { \
+ H5FD_mem_t ITER, LOOPVAR; \
+ unsigned SEEN[H5FD_MEM_NTYPES]; \
+ \
+ memset(SEEN, 0, sizeof SEEN); \
+ for (ITER = H5FD_MEM_SUPER; ITER < H5FD_MEM_NTYPES; ITER = (H5FD_mem_t)(ITER + 1)) { \
+ LOOPVAR = MAP[ITER]; \
+ if (H5FD_MEM_DEFAULT == LOOPVAR) \
+ LOOPVAR = ITER; \
+ assert(LOOPVAR > 0 && LOOPVAR < H5FD_MEM_NTYPES); \
+ if (SEEN[LOOPVAR]++) \
+ continue;
+
+/* Need two front-ends, since they are nested sometimes */
+#define UNIQUE_MEMBERS(MAP, LOOPVAR) UNIQUE_MEMBERS_CORE(MAP, _unmapped, _seen, LOOPVAR)
+#define UNIQUE_MEMBERS2(MAP, LOOPVAR) UNIQUE_MEMBERS_CORE(MAP, _unmapped2, _seen2, LOOPVAR)
+
+#define ALL_MEMBERS(LOOPVAR) \
+ { \
+ H5FD_mem_t LOOPVAR; \
+ for (LOOPVAR = H5FD_MEM_DEFAULT; LOOPVAR < H5FD_MEM_NTYPES; LOOPVAR = (H5FD_mem_t)(LOOPVAR + 1)) {
+
+#define END_MEMBERS \
+ } \
+ }
-#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
+#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
/* The driver identification number, initialized at runtime */
static hid_t H5FD_MULTI_g = 0;
/* Driver-specific file access properties */
typedef struct H5FD_multi_fapl_t {
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /*memory usage map */
- hid_t memb_fapl[H5FD_MEM_NTYPES];/*member access properties */
- char *memb_name[H5FD_MEM_NTYPES];/*name generators */
- haddr_t memb_addr[H5FD_MEM_NTYPES];/*starting addr per member */
- hbool_t relax; /*less stringent error checking */
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /*memory usage map */
+ hid_t memb_fapl[H5FD_MEM_NTYPES]; /*member access properties */
+ char * memb_name[H5FD_MEM_NTYPES]; /*name generators */
+ haddr_t memb_addr[H5FD_MEM_NTYPES]; /*starting addr per member */
+ hbool_t relax; /*less stringent error checking */
} H5FD_multi_fapl_t;
/*
@@ -85,142 +88,131 @@ typedef struct H5FD_multi_fapl_t {
* copied into the parent file struct in H5F_open().
*/
typedef struct H5FD_multi_t {
- H5FD_t pub; /*public stuff, must be first */
- H5FD_multi_fapl_t fa; /*driver-specific file access properties*/
- haddr_t memb_next[H5FD_MEM_NTYPES];/*addr of next member */
- H5FD_t *memb[H5FD_MEM_NTYPES]; /*member pointers */
- haddr_t memb_eoa[H5FD_MEM_NTYPES]; /*EOA for individual files,
- *end of allocated addresses. v1.6 library
- *have the EOA for the entire file. But it's
- *meaningless for MULTI file. We replaced it
- *with the EOAs for individual files */
- unsigned flags; /*file open flags saved for debugging */
- char *name; /*name passed to H5Fopen or H5Fcreate */
+ H5FD_t pub; /*public stuff, must be first */
+ H5FD_multi_fapl_t fa; /*driver-specific file access properties */
+ haddr_t memb_next[H5FD_MEM_NTYPES]; /*addr of next member */
+ H5FD_t * memb[H5FD_MEM_NTYPES]; /*member pointers */
+ haddr_t memb_eoa[H5FD_MEM_NTYPES]; /*EOA for individual files,
+ *end of allocated addresses. v1.6 library
+ *have the EOA for the entire file. But it's
+ *meaningless for MULTI file. We replaced it
+ *with the EOAs for individual files */
+ unsigned flags; /*file open flags saved for debugging */
+ char * name; /*name passed to H5Fopen or H5Fcreate */
} H5FD_multi_t;
/* Driver specific data transfer properties */
typedef struct H5FD_multi_dxpl_t {
- hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/
+ hid_t memb_dxpl[H5FD_MEM_NTYPES]; /*member data xfer properties*/
} H5FD_multi_dxpl_t;
/* Private functions */
static char *my_strdup(const char *s);
-static int compute_next(H5FD_multi_t *file);
-static int open_members(H5FD_multi_t *file);
+static int compute_next(H5FD_multi_t *file);
+static int open_members(H5FD_multi_t *file);
/* Callback prototypes */
static hsize_t H5FD_multi_sb_size(H5FD_t *file);
-static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/,
- unsigned char *buf/*out*/);
-static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name,
- const unsigned char *buf);
-static void *H5FD_multi_fapl_get(H5FD_t *file);
-static void *H5FD_multi_fapl_copy(const void *_old_fa);
-static herr_t H5FD_multi_fapl_free(void *_fa);
-static H5FD_t *H5FD_multi_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_multi_close(H5FD_t *_file);
-static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags);
-static herr_t H5FD_multi_get_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
+static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name /*out*/, unsigned char *buf /*out*/);
+static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name, const unsigned char *buf);
+static void * H5FD_multi_fapl_get(H5FD_t *file);
+static void * H5FD_multi_fapl_copy(const void *_old_fa);
+static herr_t H5FD_multi_fapl_free(void *_fa);
+static H5FD_t *H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_multi_close(H5FD_t *_file);
+static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags);
+static herr_t H5FD_multi_get_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
static haddr_t H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
+static herr_t H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD_multi_get_eof(const H5FD_t *_file);
-static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- hsize_t size);
-static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
-static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
-static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
+static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ void *_buf /*out*/);
+static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ const void *_buf);
+static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
/* The class struct */
static const H5FD_class_t H5FD_multi_g = {
- "multi", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_multi_sb_size, /*sb_size */
- H5FD_multi_sb_encode, /*sb_encode */
- H5FD_multi_sb_decode, /*sb_decode */
- sizeof(H5FD_multi_fapl_t), /*fapl_size */
- H5FD_multi_fapl_get, /*fapl_get */
- H5FD_multi_fapl_copy, /*fapl_copy */
- H5FD_multi_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_multi_open, /*open */
- H5FD_multi_close, /*close */
- H5FD_multi_cmp, /*cmp */
- H5FD_multi_query, /*query */
- H5FD_multi_get_type_map, /*get_type_map */
- H5FD_multi_alloc, /*alloc */
- H5FD_multi_free, /*free */
- H5FD_multi_get_eoa, /*get_eoa */
- H5FD_multi_set_eoa, /*set_eoa */
- H5FD_multi_get_eof, /*get_eof */
- H5FD_multi_get_handle, /*get_handle */
- H5FD_multi_read, /*read */
- H5FD_multi_write, /*write */
- H5FD_multi_flush, /*flush */
- H5FD_multi_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DEFAULT /*fl_map */
+ "multi", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_multi_sb_size, /*sb_size */
+ H5FD_multi_sb_encode, /*sb_encode */
+ H5FD_multi_sb_decode, /*sb_decode */
+ sizeof(H5FD_multi_fapl_t), /*fapl_size */
+ H5FD_multi_fapl_get, /*fapl_get */
+ H5FD_multi_fapl_copy, /*fapl_copy */
+ H5FD_multi_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_multi_open, /*open */
+ H5FD_multi_close, /*close */
+ H5FD_multi_cmp, /*cmp */
+ H5FD_multi_query, /*query */
+ H5FD_multi_get_type_map, /*get_type_map */
+ H5FD_multi_alloc, /*alloc */
+ H5FD_multi_free, /*free */
+ H5FD_multi_get_eoa, /*get_eoa */
+ H5FD_multi_set_eoa, /*set_eoa */
+ H5FD_multi_get_eof, /*get_eof */
+ H5FD_multi_get_handle, /*get_handle */
+ H5FD_multi_read, /*read */
+ H5FD_multi_write, /*write */
+ H5FD_multi_flush, /*flush */
+ H5FD_multi_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
+ H5FD_FLMAP_DEFAULT /*fl_map */
};
-
/*-------------------------------------------------------------------------
- * Function: my_strdup
+ * Function: my_strdup
*
- * Purpose: Private version of strdup()
+ * Purpose: Private version of strdup()
*
- * Return: Success: Ptr to new copy of string
+ * Return: Success: Ptr to new copy of string
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static char *
my_strdup(const char *s)
{
- char *x;
+ char * x;
size_t str_len;
- if(!s)
+ if (!s)
return NULL;
str_len = strlen(s) + 1;
- if(NULL == (x = (char *)malloc(str_len)))
+ if (NULL == (x = (char *)malloc(str_len)))
return NULL;
memcpy(x, s, str_len);
return x;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_init
+ * Function: H5FD_multi_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the multi driver.
+ * Return: Success: The driver ID for the multi driver
+ * Failure: H5I_INVALID_HID
*
- * Failure: Negative
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -229,69 +221,58 @@ H5FD_multi_init(void)
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if (H5I_VFL!=H5Iget_type(H5FD_MULTI_g)) {
- H5FD_MULTI_g = H5FDregister(&H5FD_multi_g);
- }
+ if (H5I_VFL != H5Iget_type(H5FD_MULTI_g))
+ H5FD_MULTI_g = H5FDregister(&H5FD_multi_g);
+
return H5FD_MULTI_g;
-}
+} /* end H5FD_multi_init() */
-
/*---------------------------------------------------------------------------
- * Function: H5FD_multi_term
+ * Function: H5FD_multi_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
void
H5FD_multi_term(void)
{
/* Reset VFL ID */
- H5FD_MULTI_g=0;
+ H5FD_MULTI_g = 0;
} /* end H5FD_multi_term() */
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_split
+ * Function: H5Pset_fapl_split
*
- * Purpose: Compatibility function. Makes the multi driver act like the
- * old split driver which stored meta data in one file and raw
- * data in another file.
+ * Purpose: Compatibility function. Makes the multi driver act like the
+ * old split driver which stored meta data in one file and raw
+ * data in another file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 11, 1999
*
- * Modifications:
- * Albert Cheng, Sep 17, 2001
- * Added feature that if the raw or meta extension string contains
- * a "%s", it will be substituted by the filename given for H5Fopen
- * or H5Fcreate. This is same as the multi-file syntax. If no %s
- * is found, one is inserted at the beginning. This is the previous
- * behavior.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id)
+H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, const char *raw_ext,
+ hid_t raw_plist_id)
{
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
- hid_t memb_fapl[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN], raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
/*NO TRACE*/
@@ -299,158 +280,153 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
H5Eclear2(H5E_DEFAULT);
/* Initialize */
- ALL_MEMBERS(mt) {
- /* Treat global heap as raw data, not metadata */
- memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
- memb_fapl[mt] = -1;
- memb_name[mt] = NULL;
- memb_addr[mt] = HADDR_UNDEF;
- } END_MEMBERS;
+ ALL_MEMBERS(mt)
+ {
+ /* Treat global heap as raw data, not metadata */
+ memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
+ memb_fapl[mt] = -1;
+ memb_name[mt] = NULL;
+ memb_addr[mt] = HADDR_UNDEF;
+ }
+ END_MEMBERS;
/* The file access properties */
memb_fapl[H5FD_MEM_SUPER] = meta_plist_id;
- memb_fapl[H5FD_MEM_DRAW] = raw_plist_id;
+ memb_fapl[H5FD_MEM_DRAW] = raw_plist_id;
/* The names */
/* process meta filename */
- if(meta_ext) {
- if(strstr(meta_ext, "%s")) {
+ if (meta_ext) {
+ if (strstr(meta_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(meta_name) - QK & JK - 2013/01/17
*/
- strncpy(meta_name, meta_ext, sizeof(meta_name));
+ strncpy(meta_name, meta_ext, sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
- else
- sprintf(meta_name, "%%s%s", meta_ext);
+ else
+ sprintf(meta_name, "%%s%s", meta_ext);
}
else {
- strncpy(meta_name, "%s.meta", sizeof(meta_name));
+ strncpy(meta_name, "%s.meta", sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
memb_name[H5FD_MEM_SUPER] = meta_name;
/* process raw filename */
- if(raw_ext) {
- if(strstr(raw_ext, "%s")) {
+ if (raw_ext) {
+ if (strstr(raw_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(raw_name) - QK & JK - 2013/01/17
*/
- strncpy(raw_name, raw_ext, sizeof(raw_name));
+ strncpy(raw_name, raw_ext, sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
- else
- sprintf(raw_name, "%%s%s", raw_ext);
+ else
+ sprintf(raw_name, "%%s%s", raw_ext);
}
else {
- strncpy(raw_name, "%s.raw", sizeof(raw_name));
+ strncpy(raw_name, "%s.raw", sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
memb_name[H5FD_MEM_DRAW] = raw_name;
/* The sizes */
memb_addr[H5FD_MEM_SUPER] = 0;
- memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
+ memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE);
}
-
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_multi
+ * Function: H5Pset_fapl_multi
*
- * Purpose: Sets the file access property list FAPL_ID to use the multi
- * driver. The MEMB_MAP array maps memory usage types to other
- * memory usage types and is the mechanism which allows the
- * caller to specify how many files are created. The array
- * contains H5FD_MEM_NTYPES entries which are either the value
- * H5FD_MEM_DEFAULT or a memory usage type and the number of
- * unique values determines the number of files which are
- * opened. For each memory usage type which will be associated
- * with a file the MEMB_FAPL array should have a property list
- * and the MEMB_NAME array should be a name generator (a
- * printf-style format with a %s which will be replaced with the
- * name passed to H5FDopen(), usually from H5Fcreate() or
- * H5Fopen()).
+ * Purpose: Sets the file access property list FAPL_ID to use the multi
+ * driver. The MEMB_MAP array maps memory usage types to other
+ * memory usage types and is the mechanism which allows the
+ * caller to specify how many files are created. The array
+ * contains H5FD_MEM_NTYPES entries which are either the value
+ * H5FD_MEM_DEFAULT or a memory usage type and the number of
+ * unique values determines the number of files which are
+ * opened. For each memory usage type which will be associated
+ * with a file the MEMB_FAPL array should have a property list
+ * and the MEMB_NAME array should be a name generator (a
+ * printf-style format with a %s which will be replaced with the
+ * name passed to H5FDopen(), usually from H5Fcreate() or
+ * H5Fopen()).
*
- * If RELAX is set then opening an existing file for read-only
- * access will not fail if some file members are missing. This
- * allows a file to be accessed in a limited sense if just the
- * meta data is available.
+ * If RELAX is set then opening an existing file for read-only
+ * access will not fail if some file members are missing. This
+ * allows a file to be accessed in a limited sense if just the
+ * meta data is available.
*
- * Defaults: Default values for each of the optional arguments are:
+ * Defaults: Default values for each of the optional arguments are:
*
- * memb_map: The default member map has the value
- * H5FD_MEM_DEFAULT for each element.
+ * memb_map: The default member map has the value
+ * H5FD_MEM_DEFAULT for each element.
*
- * memb_fapl: The value H5P_DEFAULT for each element.
+ * memb_fapl: The value H5P_DEFAULT for each element.
*
- * memb_name: The string `%s-X.h5' where `X' is one of the
- * letters `s' (H5FD_MEM_SUPER),
- * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
- * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
- * `o' (H5FD_MEM_OHDR).
+ * memb_name: The string `%s-X.h5' where `X' is one of the
+ * letters `s' (H5FD_MEM_SUPER),
+ * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
+ * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
+ * `o' (H5FD_MEM_OHDR).
*
- * memb_addr: The value HADDR_UNDEF for each element.
+ * memb_addr: The value HADDR_UNDEF for each element.
*
*
- * Example: To set up a multi file access property list which partitions
- * data into meta and raw files each being 1/2 of the address
- * space one would say:
+ * Example: To set up a multi file access property list which partitions
+ * data into meta and raw files each being 1/2 of the address
+ * space one would say:
*
- * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
- * hid_t memb_fapl[H5FD_MEM_NTYPES];
- * const char *memb[H5FD_MEM_NTYPES];
- * haddr_t memb_addr[H5FD_MEM_NTYPES];
+ * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
+ * hid_t memb_fapl[H5FD_MEM_NTYPES];
+ * const char *memb[H5FD_MEM_NTYPES];
+ * haddr_t memb_addr[H5FD_MEM_NTYPES];
*
- * // The mapping...
- * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
- * memb_map[mt] = H5FD_MEM_SUPER;
- * }
- * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
+ * // The mapping...
+ * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+ * memb_map[mt] = H5FD_MEM_SUPER;
+ * }
+ * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
*
- * // Member information
- * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_SUPER] = "%s.meta";
- * memb_addr[H5FD_MEM_SUPER] = 0;
+ * // Member information
+ * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_SUPER] = "%s.meta";
+ * memb_addr[H5FD_MEM_SUPER] = 0;
*
- * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_DRAW] = "%s.raw";
- * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
+ * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_DRAW] = "%s.raw";
+ * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
*
- * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
- * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
- * memb_name, memb_addr, TRUE);
+ * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
+ * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
+ * memb_name, memb_addr, TRUE);
*
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu, 2001-10-25
- * Use new generic property list for argument checking.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char * const *memb_name,
- const haddr_t *memb_addr, hbool_t relax)
+H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_fapl,
+ const char *const *memb_name, const haddr_t *memb_addr, hbool_t relax)
{
- H5FD_multi_fapl_t fa;
- H5FD_mem_t mt, mmt;
- H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
- hid_t _memb_fapl[H5FD_MEM_NTYPES];
- char _memb_name[H5FD_MEM_NTYPES][16];
- const char *_memb_name_ptrs[H5FD_MEM_NTYPES];
- haddr_t _memb_addr[H5FD_MEM_NTYPES];
- static const char *letters = "Xsbrglo";
- static const char *func="H5FDset_fapl_multi"; /* Function Name for error reporting */
+ H5FD_multi_fapl_t fa;
+ H5FD_mem_t mt, mmt;
+ H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
+ hid_t _memb_fapl[H5FD_MEM_NTYPES];
+ char _memb_name[H5FD_MEM_NTYPES][16];
+ const char * _memb_name_ptrs[H5FD_MEM_NTYPES];
+ haddr_t _memb_addr[H5FD_MEM_NTYPES];
+ static const char *letters = "Xsbrglo";
+ static const char *func = "H5FDset_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
@@ -458,222 +434,206 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
H5Eclear2(H5E_DEFAULT);
/* Check arguments and supply default values */
- if(H5I_GENPROP_LST != H5Iget_type(fapl_id) ||
- TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1)
- if (!memb_map) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_map[mt] = H5FD_MEM_DEFAULT;
- memb_map = _memb_map;
- }
+ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1) if (!memb_map)
+ {
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1))
+ _memb_map[mt] = H5FD_MEM_DEFAULT;
+ memb_map = _memb_map;
+ }
if (!memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
- memb_fapl = _memb_fapl;
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1))
+ _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
+ memb_fapl = _memb_fapl;
}
if (!memb_name) {
- assert(strlen(letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
- _memb_name_ptrs[mt] = _memb_name[mt];
- }
- memb_name = _memb_name_ptrs;
+ assert(strlen(letters) == H5FD_MEM_NTYPES);
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
+ _memb_name_ptrs[mt] = _memb_name[mt];
+ }
+ memb_name = _memb_name_ptrs;
}
if (!memb_addr) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1));
- memb_addr = _memb_addr;
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1))
+ _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES - 1));
+ memb_addr = _memb_addr;
}
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- /* Map usage type */
- mmt = memb_map[mt];
- if (mmt<0 || mmt>=H5FD_MEM_NTYPES)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1)
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
-
- /*
- * All members of MEMB_FAPL must be either defaults or actual file
- * access property lists.
- */
- if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ /* Map usage type */
+ mmt = memb_map[mt];
+ if (mmt < 0 || mmt >= H5FD_MEM_NTYPES)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range",
+ -1) if (H5FD_MEM_DEFAULT == mmt) mmt = mt;
+
+ /*
+ * All members of MEMB_FAPL must be either defaults or actual file
+ * access property lists.
+ */
+ if (H5P_DEFAULT != memb_fapl[mmt] && TRUE != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1)
- /* All names must be defined */
- if (!memb_name[mmt] || !memb_name[mmt][0])
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1)
+ /* All names must be defined */
+ if (!memb_name[mmt] || !memb_name[mmt][0]) H5Epush_ret(
+ func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1)
}
/*
* Initialize driver specific information. No need to copy it into the FA
* struct since all members will be copied by H5Pset_driver().
*/
- memcpy(fa.memb_map, memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
- memcpy(fa.memb_fapl, memb_fapl, H5FD_MEM_NTYPES*sizeof(hid_t));
- memcpy(fa.memb_name, memb_name, H5FD_MEM_NTYPES*sizeof(char*));
- memcpy(fa.memb_addr, memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
+ memcpy(fa.memb_map, memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t));
+ memcpy(fa.memb_fapl, memb_fapl, H5FD_MEM_NTYPES * sizeof(hid_t));
+ memcpy(fa.memb_name, memb_name, H5FD_MEM_NTYPES * sizeof(char *));
+ memcpy(fa.memb_addr, memb_addr, H5FD_MEM_NTYPES * sizeof(haddr_t));
fa.relax = relax;
/* Patch up H5P_DEFAULT property lists for members */
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if(fa.memb_fapl[mt]==H5P_DEFAULT)
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if (fa.memb_fapl[mt] == H5P_DEFAULT)
fa.memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
}
return H5Pset_driver(fapl_id, H5FD_MULTI, &fa);
}
-
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_multi
+ * Function: H5Pget_fapl_multi
*
- * Purpose: Returns information about the multi file access property
- * list though the function arguments which are the same as for
- * H5Pset_fapl_multi() above.
+ * Purpose: Returns information about the multi file access property
+ * list though the function arguments which are the same as for
+ * H5Pset_fapl_multi() above.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu, 2001-10-25
- * Use new generic property list for argument checking.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
- hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
- haddr_t *memb_addr/*out*/, hbool_t *relax)
+H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl /*out*/,
+ char **memb_name /*out*/, haddr_t *memb_addr /*out*/, hbool_t *relax)
{
- H5FD_multi_fapl_t *fa;
- H5FD_mem_t mt;
- static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */
+ const H5FD_multi_fapl_t *fa;
+ H5FD_mem_t mt;
+ static const char * func = "H5FDget_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if(H5I_GENPROP_LST != H5Iget_type(fapl_id) ||
- TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1)
- if(H5FD_MULTI != H5Pget_driver(fapl_id))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1)
- if(NULL == (fa= (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1)
+ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list",
+ -1) if (H5FD_MULTI != H5Pget_driver(fapl_id))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver",
+ -1) if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1)
- if (memb_map)
- memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
+ if (memb_map) memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t));
if (memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (fa->memb_fapl[mt]>=0)
- memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- else
- memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
- }
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if (fa->memb_fapl[mt] >= 0)
+ memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
+ else
+ memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
+ }
}
- if(memb_name) {
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(fa->memb_name[mt])
- memb_name[mt] = my_strdup(fa->memb_name[mt]);
- else
- memb_name[mt] = NULL;
- }
+ if (memb_name) {
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if (fa->memb_name[mt])
+ memb_name[mt] = my_strdup(fa->memb_name[mt]);
+ else
+ memb_name[mt] = NULL;
+ }
}
if (memb_addr)
- memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
+ memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES * sizeof(haddr_t));
if (relax)
- *relax = fa->relax;
+ *relax = fa->relax;
return 0;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_size
+ * Function: H5FD_multi_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hsize_t
H5FD_multi_sb_size(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- unsigned nseen = 0;
- hsize_t nbytes = 8; /*size of header*/
+ H5FD_multi_t *file = (H5FD_multi_t *)_file;
+ unsigned nseen = 0;
+ hsize_t nbytes = 8; /*size of header*/
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* How many unique files? */
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- nseen++;
- } END_MEMBERS;
+ UNIQUE_MEMBERS(file->fa.memb_map, mt) { nseen++; }
+ END_MEMBERS;
/* Addresses and EOA markers */
nbytes += nseen * 2 * 8;
/* Name templates */
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- size_t n = strlen(file->fa.memb_name[mt])+1;
- nbytes += (n+7) & ~((size_t)0x0007);
- } END_MEMBERS;
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
+ size_t n = strlen(file->fa.memb_name[mt]) + 1;
+ nbytes += (n + 7) & ~((size_t)0x0007);
+ }
+ END_MEMBERS;
return nbytes;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_encode
+ * Function: H5FD_multi_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is a six-byte member mapping followed two bytes
- * which are unused. For each unique file in usage-type order
- * encode all the starting addresses as unsigned 64-bit integers,
- * then all the EOA values as unsigned 64-bit integers, then all
- * the template names as null terminated strings which are
- * multiples of 8 characters.
+ * The encoding is a six-byte member mapping followed two bytes
+ * which are unused. For each unique file in usage-type order
+ * encode all the starting addresses as unsigned 64-bit integers,
+ * then all the EOA values as unsigned 64-bit integers, then all
+ * the template names as null terminated strings which are
+ * multiples of 8 characters.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/)
+H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- haddr_t memb_eoa;
- unsigned char *p;
- size_t nseen;
- size_t i;
- H5FD_mem_t m;
- static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ haddr_t memb_eoa;
+ unsigned char * p;
+ size_t nseen;
+ size_t i;
+ H5FD_mem_t m;
+ static const char *func = "H5FD_multi_sb_encode"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -682,10 +642,10 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
strncpy(name, "NCSAmulti", (size_t)8);
name[8] = '\0';
- assert(7==H5FD_MEM_NTYPES);
+ assert(7 == H5FD_MEM_NTYPES);
- for (m=H5FD_MEM_SUPER; m<H5FD_MEM_NTYPES; m=(H5FD_mem_t)(m+1)) {
- buf[m-1] = (unsigned char)file->fa.memb_map[m];
+ for (m = H5FD_MEM_SUPER; m < H5FD_MEM_NTYPES; m = (H5FD_mem_t)(m + 1)) {
+ buf[m - 1] = (unsigned char)file->fa.memb_map[m];
}
buf[6] = 0;
buf[7] = 0;
@@ -697,49 +657,52 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
/* Encode all starting addresses and EOA values */
nseen = 0;
- p = buf+8;
- assert(sizeof(haddr_t)<=8);
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
+ p = buf + 8;
+ assert(sizeof(haddr_t) <= 8);
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
memcpy(p, &(file->fa.memb_addr[mt]), sizeof(haddr_t));
p += sizeof(haddr_t);
memb_eoa = H5FDget_eoa(file->memb[mt], mt);
memcpy(p, &memb_eoa, sizeof(haddr_t));
p += sizeof(haddr_t);
nseen++;
- } END_MEMBERS;
- if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen*2, buf+8, NULL, H5P_DEFAULT)<0)
+ }
+ END_MEMBERS;
+ if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
- /* Encode all name templates */
- p = buf + 8 + nseen*2*8;
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
+ /* Encode all name templates */
+ p = buf + 8 + nseen * 2 * 8;
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
size_t n = strlen(file->fa.memb_name[mt]) + 1;
strncpy((char *)p, file->fa.memb_name[mt], n);
p += n;
- for (i=n; i%8; i++)
+ for (i = n; i % 8; i++)
*p++ = '\0';
- } END_MEMBERS;
+ }
+ END_MEMBERS;
return 0;
} /* end H5FD_multi_sb_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_decode
+ * Function: H5FD_multi_sb_decode
*
- * Purpose: Decodes the superblock information for this driver. The NAME
- * argument is the eight-character (plus null termination) name
- * stored in the file.
+ * Purpose: Decodes the superblock information for this driver. The NAME
+ * argument is the eight-character (plus null termination) name
+ * stored in the file.
*
- * The FILE argument is updated according to the information in
- * the superblock. This may mean that some member files are
- * closed and others are opened.
+ * The FILE argument is updated according to the information in
+ * the superblock. This may mean that some member files are
+ * closed and others are opened.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
@@ -747,18 +710,18 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
static herr_t
H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- char x[2*H5FD_MEM_NTYPES*8];
- H5FD_mem_t map[H5FD_MEM_NTYPES];
- int i;
- size_t nseen=0;
- hbool_t map_changed=FALSE;
- hbool_t in_use[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
- haddr_t memb_eoa[H5FD_MEM_NTYPES];
- haddr_t *ap;
- static const char *func="H5FD_multi_sb_decode"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ char x[2 * H5FD_MEM_NTYPES * 8];
+ H5FD_mem_t map[H5FD_MEM_NTYPES];
+ int i;
+ size_t nseen = 0;
+ hbool_t map_changed = FALSE;
+ hbool_t in_use[H5FD_MEM_NTYPES];
+ const char * memb_name[H5FD_MEM_NTYPES];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+ haddr_t memb_eoa[H5FD_MEM_NTYPES];
+ haddr_t * ap;
+ static const char *func = "H5FD_multi_sb_decode"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -767,47 +730,53 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
if (strcmp(name, "NCSAmult"))
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1)
- /* Set default values */
- ALL_MEMBERS(mt) {
- memb_addr[mt] = HADDR_UNDEF;
- memb_eoa[mt] = HADDR_UNDEF;
- memb_name[mt] = NULL;
- } END_MEMBERS;
+ /* Set default values */
+ ALL_MEMBERS(mt)
+ {
+ memb_addr[mt] = HADDR_UNDEF;
+ memb_eoa[mt] = HADDR_UNDEF;
+ memb_name[mt] = NULL;
+ }
+ END_MEMBERS;
/*
* Read the map and count the unique members.
*/
memset(map, 0, sizeof map);
- for (i=0; i<6; i++) {
- map[i+1] = (H5FD_mem_t)buf[i];
- if (file->fa.memb_map[i+1]!=map[i+1])
- map_changed=TRUE;
+ for (i = 0; i < 6; i++) {
+ map[i + 1] = (H5FD_mem_t)buf[i];
+ if (file->fa.memb_map[i + 1] != map[i + 1])
+ map_changed = TRUE;
}
- UNIQUE_MEMBERS(map, mt) {
- nseen++;
- } END_MEMBERS;
+ UNIQUE_MEMBERS(map, mt) { nseen++; }
+ END_MEMBERS;
buf += 8;
/* Decode Address and EOA values */
- assert(sizeof(haddr_t)<=8);
- memcpy(x, buf, (nseen*2*8));
- buf += nseen*2*8;
- if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen*2, x, NULL, H5P_DEFAULT)<0)
+ assert(sizeof(haddr_t) <= 8);
+ memcpy(x, buf, (nseen * 2 * 8));
+ buf += nseen * 2 * 8;
+ if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen * 2, x, NULL, H5P_DEFAULT) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
- ap = (haddr_t*)x;
- UNIQUE_MEMBERS(map, mt) {
+ ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning -
+ 2019/07/05, QAK */
+ UNIQUE_MEMBERS(map, mt)
+ {
memb_addr[_unmapped] = *ap++;
- memb_eoa[_unmapped] = *ap++;
- } END_MEMBERS;
+ memb_eoa[_unmapped] = *ap++;
+ }
+ END_MEMBERS;
/* Decode name templates */
- UNIQUE_MEMBERS(map, mt) {
- size_t n = strlen((const char *)buf)+1;
+ UNIQUE_MEMBERS(map, mt)
+ {
+ size_t n = strlen((const char *)buf) + 1;
memb_name[_unmapped] = (const char *)buf;
- buf += (n+7) & ~((unsigned)0x0007);
- } END_MEMBERS;
+ buf += (n + 7) & ~((unsigned)0x0007);
+ }
+ END_MEMBERS;
/*
* Use the mapping saved in the superblock in preference to the one
@@ -817,77 +786,79 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
*/
if (map_changed) {
/* Commit map */
- ALL_MEMBERS(mt) {
- file->fa.memb_map[mt] = map[mt];
- } END_MEMBERS;
+ ALL_MEMBERS(mt) { file->fa.memb_map[mt] = map[mt]; }
+ END_MEMBERS;
/* Close files which are unused now */
memset(in_use, 0, sizeof in_use);
- UNIQUE_MEMBERS(map, mt) {
- in_use[mt] = TRUE;
- } END_MEMBERS;
- ALL_MEMBERS(mt) {
+ UNIQUE_MEMBERS(map, mt) { in_use[mt] = TRUE; }
+ END_MEMBERS;
+ ALL_MEMBERS(mt)
+ {
if (!in_use[mt] && file->memb[mt]) {
(void)H5FDclose(file->memb[mt]);
file->memb[mt] = NULL;
}
file->fa.memb_map[mt] = map[mt];
- } END_MEMBERS;
+ }
+ END_MEMBERS;
}
/* Commit member starting addresses and name templates */
- ALL_MEMBERS(mt) {
+ ALL_MEMBERS(mt)
+ {
file->fa.memb_addr[mt] = memb_addr[mt];
if (memb_name[mt]) {
if (file->fa.memb_name[mt])
free(file->fa.memb_name[mt]);
file->fa.memb_name[mt] = my_strdup(memb_name[mt]);
}
- } END_MEMBERS;
- if (compute_next(file)<0)
+ }
+ END_MEMBERS;
+ if (compute_next(file) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1)
- /* Open all necessary files */
- if (open_members(file)<0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1)
+ /* Open all necessary files */
+ if (open_members(file) < 0)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1)
- /* Set the EOA marker for all open files */
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- if (file->memb[mt])
- if(H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt])<0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1)
-
- /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) */
- file->memb_eoa[mt] = memb_eoa[mt];
- } END_MEMBERS;
+ /* Set the EOA marker for all open files */
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
+ if (file->memb[mt])
+ if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1)
+
+ /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa)
+ */
+ file->memb_eoa[mt] = memb_eoa[mt];
+ }
+ END_MEMBERS;
return 0;
} /* end H5FD_multi_sb_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_get
+ * Function: H5FD_multi_fapl_get
*
- * Purpose: Returns a file access property list which indicates how the
- * specified file is being accessed. The return list could be
- * used to access another file the same way.
+ * Purpose: Returns a file access property list which indicates how the
+ * specified file is being accessed. The return list could be
+ * used to access another file the same way.
*
- * Return: Success: Ptr to new file access property list with all
- * members copied from the file struct.
+ * Return: Success: Ptr to new file access property list with all
+ * members copied from the file struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_multi_fapl_get(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_multi_t *file = (H5FD_multi_t *)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -895,30 +866,27 @@ H5FD_multi_fapl_get(H5FD_t *_file)
return H5FD_multi_fapl_copy(&(file->fa));
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_copy
+ * Function: H5FD_multi_fapl_copy
*
- * Purpose: Copies the multi-specific file access properties.
+ * Purpose: Copies the multi-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FD_multi_fapl_copy(const void *_old_fa)
{
- const H5FD_multi_fapl_t *old_fa = (const H5FD_multi_fapl_t*)_old_fa;
- H5FD_multi_fapl_t *new_fa = (H5FD_multi_fapl_t *)malloc(sizeof(H5FD_multi_fapl_t));
- int nerrors = 0;
- static const char *func="H5FD_multi_fapl_copy"; /* Function Name for error reporting */
+ const H5FD_multi_fapl_t *old_fa = (const H5FD_multi_fapl_t *)_old_fa;
+ H5FD_multi_fapl_t * new_fa = (H5FD_multi_fapl_t *)malloc(sizeof(H5FD_multi_fapl_t));
+ int nerrors = 0;
+ static const char * func = "H5FD_multi_fapl_copy"; /* Function Name for error reporting */
assert(new_fa);
@@ -926,312 +894,322 @@ H5FD_multi_fapl_copy(const void *_old_fa)
H5Eclear2(H5E_DEFAULT);
memcpy(new_fa, old_fa, sizeof(H5FD_multi_fapl_t));
- ALL_MEMBERS(mt) {
- if (old_fa->memb_fapl[mt]>=0) {
- new_fa->memb_fapl[mt] = H5Pcopy(old_fa->memb_fapl[mt]);
- if(new_fa->memb_fapl[mt]<0)
+ ALL_MEMBERS(mt)
+ {
+ if (old_fa->memb_fapl[mt] >= 0) {
+ new_fa->memb_fapl[mt] = H5Pcopy(old_fa->memb_fapl[mt]);
+ if (new_fa->memb_fapl[mt] < 0)
nerrors++;
- }
- if (old_fa->memb_name[mt]) {
- new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
- assert(new_fa->memb_name[mt]);
- }
- } END_MEMBERS;
+ }
+ if (old_fa->memb_name[mt]) {
+ new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
+ assert(new_fa->memb_name[mt]);
+ }
+ }
+ END_MEMBERS;
if (nerrors) {
- ALL_MEMBERS(mt) {
- if (new_fa->memb_fapl[mt]>=0)
+ ALL_MEMBERS(mt)
+ {
+ if (new_fa->memb_fapl[mt] >= 0)
(void)H5Pclose(new_fa->memb_fapl[mt]);
if (new_fa->memb_name[mt])
free(new_fa->memb_name[mt]);
- } END_MEMBERS;
+ }
+ END_MEMBERS;
free(new_fa);
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "invalid freespace objects", NULL)
}
return new_fa;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_free
+ * Function: H5FD_multi_fapl_free
*
- * Purpose: Frees the multi-specific file access properties.
+ * Purpose: Frees the multi-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_fapl_free(void *_fa)
{
- H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
- static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */
+ H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t *)_fa;
+ static const char *func = "H5FD_multi_fapl_free"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- ALL_MEMBERS(mt) {
- if (fa->memb_fapl[mt]>=0)
- if(H5Pclose(fa->memb_fapl[mt])<0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1)
- if (fa->memb_name[mt])
- free(fa->memb_name[mt]);
- } END_MEMBERS;
+ ALL_MEMBERS(mt)
+ {
+ if (fa->memb_fapl[mt] >= 0)
+ if (H5Pclose(fa->memb_fapl[mt]) < 0)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list",
+ -1) if (fa->memb_name[mt]) free(fa->memb_name[mt]);
+ }
+ END_MEMBERS;
free(fa);
return 0;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_open
+ * Function: H5FD_multi_open
*
- * Purpose: Creates and/or opens a multi HDF5 file.
+ * Purpose: Creates and/or opens a multi HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_multi_t *file=NULL;
- hid_t close_fapl=-1;
- H5FD_multi_fapl_t *fa;
- H5FD_mem_t m;
- static const char *func="H5FD_multi_open"; /* Function Name for error reporting */
+ H5FD_multi_t * file = NULL;
+ hid_t close_fapl = -1;
+ const H5FD_multi_fapl_t *fa;
+ H5FD_mem_t m;
+ static const char * func = "H5FD_multi_open"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Check arguments */
if (!name || !*name)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL)
- if (0==maxaddr || HADDR_UNDEF==maxaddr)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL)
-
- /*
- * Initialize the file from the file access properties, using default
- * values if necessary. Make sure to use CALLOC here because the code
- * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa
- * in H5FD_multi_t.
- */
- if(NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t))))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL)
- if(H5P_FILE_ACCESS_DEFAULT==fapl_id || H5FD_MULTI!=H5Pget_driver(fapl_id)) {
- close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE)<0)
- H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
- }
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name",
+ NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL)
+
+ /*
+ * Initialize the file from the file access properties, using default
+ * values if necessary. Make sure to use CALLOC here because the code
+ * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa
+ * in H5FD_multi_t.
+ */
+ if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) H5Epush_ret(
+ func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed",
+ NULL) if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id))
+ {
+ close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0)
+ H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
+ }
fa = (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
assert(fa);
- ALL_MEMBERS(mt) {
- file->fa.memb_map[mt] = fa->memb_map[mt];
- file->fa.memb_addr[mt] = fa->memb_addr[mt];
- if (fa->memb_fapl[mt]>=0)
- file->fa.memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- else
- file->fa.memb_fapl[mt] = fa->memb_fapl[mt];
- if (fa->memb_name[mt])
- file->fa.memb_name[mt] = my_strdup(fa->memb_name[mt]);
- else
- file->fa.memb_name[mt] = NULL;
- } END_MEMBERS;
+ ALL_MEMBERS(mt)
+ {
+ file->fa.memb_map[mt] = fa->memb_map[mt];
+ file->fa.memb_addr[mt] = fa->memb_addr[mt];
+ if (fa->memb_fapl[mt] >= 0)
+ file->fa.memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
+ else
+ file->fa.memb_fapl[mt] = fa->memb_fapl[mt];
+ if (fa->memb_name[mt])
+ file->fa.memb_name[mt] = my_strdup(fa->memb_name[mt]);
+ else
+ file->fa.memb_name[mt] = NULL;
+ }
+ END_MEMBERS;
file->fa.relax = fa->relax;
- file->flags = flags;
- file->name = my_strdup(name);
- if (close_fapl>=0)
- if(H5Pclose(close_fapl)<0)
+ file->flags = flags;
+ file->name = my_strdup(name);
+ if (close_fapl >= 0)
+ if (H5Pclose(close_fapl) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", error)
- /* Compute derived properties and open member files */
- if (compute_next(file)<0)
- H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", error);
- if (open_members(file)<0)
+ /* Compute derived properties and open member files */
+ if (compute_next(file) < 0) H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE,
+ "compute_next() failed", error);
+ if (open_members(file) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", error);
/* We must have opened at least the superblock file */
- if (H5FD_MEM_DEFAULT==(m=file->fa.memb_map[H5FD_MEM_SUPER]))
+ if (H5FD_MEM_DEFAULT == (m = file->fa.memb_map[H5FD_MEM_SUPER]))
m = H5FD_MEM_SUPER;
- if (NULL==file->memb[m])
+ if (NULL == file->memb[m])
goto error;
- return (H5FD_t*)file;
+ return (H5FD_t *)file;
error:
/* Cleanup and fail */
if (file) {
- ALL_MEMBERS(mt) {
- if (file->memb[mt]) (void)H5FDclose(file->memb[mt]);
- if (file->fa.memb_fapl[mt]>=0) (void)H5Pclose(file->fa.memb_fapl[mt]);
- if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
- } END_MEMBERS;
- if (file->name) free(file->name);
- free(file);
+ ALL_MEMBERS(mt)
+ {
+ if (file->memb[mt])
+ (void)H5FDclose(file->memb[mt]);
+ if (file->fa.memb_fapl[mt] >= 0)
+ (void)H5Pclose(file->fa.memb_fapl[mt]);
+ if (file->fa.memb_name[mt])
+ free(file->fa.memb_name[mt]);
+ }
+ END_MEMBERS;
+ if (file->name)
+ free(file->name);
+ free(file);
}
return NULL;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_close
+ * Function: H5FD_multi_close
*
- * Purpose: Closes a multi file.
+ * Purpose: Closes a multi file.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_close(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors=0;
- static const char *func="H5FD_multi_close"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ int nerrors = 0;
+ static const char *func = "H5FD_multi_close"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Close as many members as possible */
- ALL_MEMBERS(mt) {
- if (file->memb[mt]) {
- if (H5FDclose(file->memb[mt])<0) {
- nerrors++;
- } else {
- file->memb[mt] = NULL;
- }
- }
- } END_MEMBERS;
+ ALL_MEMBERS(mt)
+ {
+ if (file->memb[mt]) {
+ if (H5FDclose(file->memb[mt]) < 0) {
+ nerrors++;
+ }
+ else {
+ file->memb[mt] = NULL;
+ }
+ }
+ }
+ END_MEMBERS;
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1)
- /* Clean up other stuff */
- ALL_MEMBERS(mt) {
- if (file->fa.memb_fapl[mt]>=0) (void)H5Pclose(file->fa.memb_fapl[mt]);
- if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
- } END_MEMBERS;
+ /* Clean up other stuff */
+ ALL_MEMBERS(mt)
+ {
+ if (file->fa.memb_fapl[mt] >= 0)
+ (void)H5Pclose(file->fa.memb_fapl[mt]);
+ if (file->fa.memb_name[mt])
+ free(file->fa.memb_name[mt]);
+ }
+ END_MEMBERS;
+
free(file->name);
free(file);
return 0;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_cmp
+ * Function: H5FD_multi_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first common member of the two
- * families. If the families have no members in common then the
- * file with the earliest member is smaller than the other file.
- * We abort if neither file has any members.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first common member of the two
+ * families. If the families have no members in common then the
+ * file with the earliest member is smaller than the other file.
+ * We abort if neither file has any members.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by th caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
- const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
- H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
- int cmp=0;
+ const H5FD_multi_t *f1 = (const H5FD_multi_t *)_f1;
+ const H5FD_multi_t *f2 = (const H5FD_multi_t *)_f2;
+ H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
+ int cmp = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- ALL_MEMBERS(mt) {
+ ALL_MEMBERS(mt)
+ {
out_mt = mt;
- if (f1->memb[mt] && f2->memb[mt]) break;
- if (!cmp) {
- if (f1->memb[mt]) cmp = -1;
- else if (f2->memb[mt]) cmp = 1;
- }
- } END_MEMBERS;
- assert(cmp || out_mt<H5FD_MEM_NTYPES);
- if (out_mt>=H5FD_MEM_NTYPES) return cmp;
+ if (f1->memb[mt] && f2->memb[mt])
+ break;
+ if (!cmp) {
+ if (f1->memb[mt])
+ cmp = -1;
+ else if (f2->memb[mt])
+ cmp = 1;
+ }
+ }
+ END_MEMBERS;
+ assert(cmp || out_mt < H5FD_MEM_NTYPES);
+ if (out_mt >= H5FD_MEM_NTYPES)
+ return cmp;
return H5FDcmp(f1->memb[out_mt], f2->memb[out_mt]);
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_query
+ * Function: H5FD_multi_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, September 26, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
{
/* Shut compiler up */
- _f=_f;
+ _f = _f;
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
*flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- } /* end if */
+ } /* end if */
- return(0);
+ return (0);
} /* end H5FD_multi_query() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_type_map
+ * Function: H5FD_multi_get_type_map
*
- * Purpose: Retrieve the memory type mapping for this file
+ * Purpose: Retrieve the memory type mapping for this file
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 9, 2008
*
*-------------------------------------------------------------------------
@@ -1239,46 +1217,37 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
static herr_t
H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t *)_file;
/* Copy file's free space type mapping */
memcpy(type_map, file->fa.memb_map, sizeof(file->fa.memb_map));
- return(0);
+ return (0);
} /* end H5FD_multi_get_type_map() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eoa
+ * Function: H5FD_multi_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- * If the TYPE is H5FD_MEM_DEFAULT, simply find the biggest
- * EOA of individual file because the EOA for the whole file
- * is meaningless.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
- haddr_t eoa = 0;
- haddr_t memb_eoa = 0;
- static const char *func="H5FD_multi_get_eoa"; /* Function Name for error reporting */
+ const H5FD_multi_t *file = (const H5FD_multi_t *)_file;
+ haddr_t eoa = 0;
+ haddr_t memb_eoa = 0;
+ static const char * func = "H5FD_multi_get_eoa"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -1289,200 +1258,193 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
* Here the code finds the biggest EOA for individual file if
* the query is for TYPE == H5FD_MEM_DEFAULT.
*/
- if(H5FD_MEM_DEFAULT == type) {
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- if (file->memb[mt]) {
+ if (H5FD_MEM_DEFAULT == type) {
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
+ if (file->memb[mt]) {
/* Retrieve EOA */
- H5E_BEGIN_TRY {
- memb_eoa = H5FDget_eoa(file->memb[mt], mt);
- } H5E_END_TRY;
-
- if (HADDR_UNDEF==memb_eoa)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
- } else if (file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- memb_eoa = file->memb_next[mt];
- assert(HADDR_UNDEF!=memb_eoa);
- } else {
+ H5E_BEGIN_TRY { memb_eoa = H5FDget_eoa(file->memb[mt], mt); }
+ H5E_END_TRY;
+
+ if (HADDR_UNDEF == memb_eoa)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa",
+ HADDR_UNDEF)
+ }
+ else if (file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ memb_eoa = file->memb_next[mt];
+ assert(HADDR_UNDEF != memb_eoa);
+ }
+ else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
- if(memb_eoa > eoa)
+ if (memb_eoa > eoa)
eoa = memb_eoa;
- } END_MEMBERS;
- } else {
+ }
+ END_MEMBERS;
+ }
+ else {
H5FD_mem_t mmt = file->fa.memb_map[type];
- if (H5FD_MEM_DEFAULT==mmt) mmt = type;
-
- if (file->memb[mmt]) {
- H5E_BEGIN_TRY {
- eoa = H5FDget_eoa(file->memb[mmt], mmt);
- } H5E_END_TRY;
-
- if (HADDR_UNDEF==eoa)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
- if (eoa>0) eoa += file->fa.memb_addr[mmt];
- } else if (file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- eoa = file->memb_next[mmt];
- assert(HADDR_UNDEF!=eoa);
- } else {
+
+ if (H5FD_MEM_DEFAULT == mmt)
+ mmt = type;
+
+ if (file->memb[mmt]) {
+ H5E_BEGIN_TRY { eoa = H5FDget_eoa(file->memb[mmt], mmt); }
+ H5E_END_TRY;
+
+ if (HADDR_UNDEF == eoa)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa",
+ HADDR_UNDEF) if (eoa > 0) eoa += file->fa.memb_addr[mmt];
+ }
+ else if (file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ eoa = file->memb_next[mmt];
+ assert(HADDR_UNDEF != eoa);
+ }
+ else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
}
return eoa;
} /* end H5FD_multi_get_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_set_eoa
+ * Function: H5FD_multi_set_eoa
*
- * Purpose: Set the end-of-address marker for the file by savig the new
- * EOA value in the file struct. Also set the EOA marker for the
- * subfile in which the new EOA value falls. We don't set the
- * EOA values of any other subfiles.
+ * Purpose: Set the end-of-address marker for the file by savig the new
+ * EOA value in the file struct. Also set the EOA marker for the
+ * subfile in which the new EOA value falls. We don't set the
+ * EOA values of any other subfiles.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 10 January 2007
- * EOA for the whole file is discarded because it's meaningless
- * for MULTI file. This function only sets eoa for individual
- * file.
- *
- * Raymond Lu
- * 21 June 2011
- * Backward compatibility of EOA. Please the comment in the
- * code.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- herr_t status;
- static const char *func="H5FD_multi_set_eoa"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_mem_t mmt;
+ herr_t status;
+ static const char *func = "H5FD_multi_set_eoa"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
mmt = file->fa.memb_map[type];
- if(H5FD_MEM_DEFAULT == mmt)
+ if (H5FD_MEM_DEFAULT == mmt)
mmt = type;
- /* Handle backward compatibility in a quick and simple way. v1.6 library had EOA for the entire virtual
- * file. But it wasn't meaningful. So v1.8 library doesn't have it anymore. It saves the EOA for the
- * metadata file, instead. Here we try to figure out whether the EOA is from a v1.6 file by comparing its
- * value. If it is a big value, we assume it's from v1.6 and simply discard it. This is the normal case
- * when the metadata file has the smallest starting address. If the metadata file has the biggest address,
- * the EOAs of v1.6 and v1.8 files are the same. It won't cause any trouble. (Please see Issue 2598
- * in Jira) SLU - 2011/6/21
+ /* Handle backward compatibility in a quick and simple way. v1.6 library
+ * had EOA for the entire virtual file. But it wasn't meaningful. So v1.8
+ * library doesn't have it anymore. It saves the EOA for the metadata file,
+ * instead. Here we try to figure out whether the EOA is from a v1.6 file
+ * by comparing its value. If it is a big value, we assume it's from v1.6
+ * and simply discard it. This is the normal case when the metadata file
+ * has the smallest starting address. If the metadata file has the biggest
+ * address, the EOAs of v1.6 and v1.8 files are the same. It won't cause
+ * any trouble. (Please see Issue 2598 in Jira) SLU - 2011/6/21
*/
- if(H5FD_MEM_SUPER == type && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > file->memb_eoa[H5FD_MEM_SUPER])
+ if (H5FD_MEM_SUPER == type && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > file->memb_eoa[H5FD_MEM_SUPER])
return 0;
assert(eoa >= file->fa.memb_addr[mmt]);
assert(eoa < file->memb_next[mmt]);
- H5E_BEGIN_TRY {
- status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
- } H5E_END_TRY;
- if (status<0)
+ H5E_BEGIN_TRY { status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); }
+ H5E_END_TRY;
+ if (status < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1)
- return 0;
+ return 0;
} /* end H5FD_multi_set_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eof
+ * Function: H5FD_multi_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total multi size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total multi size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the multi of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the multi of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 5 January 2007
- * Multi driver no longer has EOA for the whole file. Calculate
- * it in the same way as EOF instead.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_multi_get_eof(const H5FD_t *_file)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
- haddr_t eof=0, tmp_eof;
- haddr_t eoa=0, tmp_eoa;
- static const char *func="H5FD_multi_get_eof"; /* Function Name for error reporting */
+ const H5FD_multi_t *file = (const H5FD_multi_t *)_file;
+ haddr_t eof = 0, tmp_eof;
+ haddr_t eoa = 0, tmp_eoa;
+ static const char * func = "H5FD_multi_get_eof"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- if (file->memb[mt]) {
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
+ if (file->memb[mt]) {
/* Retrieve EOF */
- H5E_BEGIN_TRY {
- tmp_eof = H5FDget_eof(file->memb[mt]);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { tmp_eof = H5FDget_eof(file->memb[mt]); }
+ H5E_END_TRY;
- if (HADDR_UNDEF==tmp_eof)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF)
- if (tmp_eof>0) tmp_eof += file->fa.memb_addr[mt];
+ if (HADDR_UNDEF == tmp_eof)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof",
+ HADDR_UNDEF) if (tmp_eof > 0) tmp_eof += file->fa.memb_addr[mt];
/* Retrieve EOA */
- H5E_BEGIN_TRY {
- tmp_eoa = H5FDget_eoa(file->memb[mt], mt);
- } H5E_END_TRY;
-
- if (HADDR_UNDEF==tmp_eoa)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
- if (tmp_eoa>0) tmp_eoa += file->fa.memb_addr[mt];
- } else if (file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- tmp_eof = file->memb_next[mt];
- assert(HADDR_UNDEF!=tmp_eof);
-
- tmp_eoa = file->memb_next[mt];
- assert(HADDR_UNDEF!=tmp_eoa);
- } else {
+ H5E_BEGIN_TRY { tmp_eoa = H5FDget_eoa(file->memb[mt], mt); }
+ H5E_END_TRY;
+
+ if (HADDR_UNDEF == tmp_eoa)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa",
+ HADDR_UNDEF) if (tmp_eoa > 0) tmp_eoa += file->fa.memb_addr[mt];
+ }
+ else if (file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ tmp_eof = file->memb_next[mt];
+ assert(HADDR_UNDEF != tmp_eof);
+
+ tmp_eoa = file->memb_next[mt];
+ assert(HADDR_UNDEF != tmp_eoa);
+ }
+ else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF)
- }
+ }
- if (tmp_eof>eof) eof = tmp_eof;
- if (tmp_eoa>eoa) eoa = tmp_eoa;
- } END_MEMBERS;
+ if (tmp_eof > eof)
+ eof = tmp_eof;
+ if (tmp_eoa > eoa)
+ eoa = tmp_eoa;
+ }
+ END_MEMBERS;
return MAX(eoa, eof);
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_multi_get_handle
*
@@ -1493,225 +1455,215 @@ H5FD_multi_get_eof(const H5FD_t *_file)
* Programmer: Raymond Lu
* Sept. 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
{
- H5FD_multi_t *file = (H5FD_multi_t *)_file;
- H5FD_mem_t type, mmt;
- static const char *func="H5FD_multi_get_handle"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_mem_t type, mmt;
+ static const char *func = "H5FD_multi_get_handle"; /* Function Name for error reporting */
/* Get data type for multi driver */
- if(H5Pget_multi_type(fapl, &type) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't get data type for multi driver", -1)
- if(type<H5FD_MEM_DEFAULT || type>=H5FD_MEM_NTYPES)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1)
- mmt = file->fa.memb_map[type];
- if(H5FD_MEM_DEFAULT==mmt) mmt = type;
+ if (H5Pget_multi_type(fapl, &type) < 0)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't get data type for multi driver",
+ -1) if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1) mmt =
+ file->fa.memb_map[type];
+ if (H5FD_MEM_DEFAULT == mmt)
+ mmt = type;
return (H5FDget_vfd_handle(file->memb[mmt], fapl, file_handle));
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_alloc
+ * Function: H5FD_multi_alloc
*
- * Purpose: Allocate file memory.
+ * Purpose: Allocate file memory.
*
- * Return: Success: Address of new memory
+ * Return: Success: Address of new memory
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- haddr_t addr;
- static const char *func="H5FD_multi_alloc"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_mem_t mmt;
+ haddr_t addr;
+ static const char *func = "H5FD_multi_alloc"; /* Function Name for error reporting */
mmt = file->fa.memb_map[type];
- if (H5FD_MEM_DEFAULT==mmt) mmt = type;
+ if (H5FD_MEM_DEFAULT == mmt)
+ mmt = type;
- if (HADDR_UNDEF==(addr=H5FDalloc(file->memb[mmt], mmt, dxpl_id, size)))
+ if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size)))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF)
- addr += file->fa.memb_addr[mmt];
+ addr += file->fa.memb_addr[mmt];
-/*#ifdef TMP
- if ( addr + size > file->eoa ) {
+ /*#ifdef TMP
+ if ( addr + size > file->eoa ) {
- if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
+ if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \
- "can't set eoa", HADDR_UNDEF)
- }
- }
-#else
- if ( addr + size > file->eoa )
- file->eoa = addr + size;
-#endif */
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \
+ "can't set eoa", HADDR_UNDEF)
+ }
+ }
+ #else
+ if ( addr + size > file->eoa )
+ file->eoa = addr + size;
+ #endif */
return addr;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_free
+ * Function: H5FD_multi_free
*
- * Purpose: Frees memory
+ * Purpose: Frees memory
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
+ H5FD_multi_t *file = (H5FD_multi_t *)_file;
+ H5FD_mem_t mmt;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
mmt = file->fa.memb_map[type];
- if (H5FD_MEM_DEFAULT==mmt) mmt = type;
+ if (H5FD_MEM_DEFAULT == mmt)
+ mmt = type;
- assert(addr>=file->fa.memb_addr[mmt]);
- assert(addr+size<=file->memb_next[mmt]);
- return H5FDfree(file->memb[mmt], mmt, dxpl_id, addr-file->fa.memb_addr[mmt], size);
+ assert(addr >= file->fa.memb_addr[mmt]);
+ assert(addr + size <= file->memb_next[mmt]);
+ return H5FDfree(file->memb[mmt], mmt, dxpl_id, addr - file->fa.memb_addr[mmt], size);
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_read
+ * Function: H5FD_multi_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/)
+H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *_buf /*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_multi_dxpl_t dx;
- htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_multi_dxpl_t dx;
+ htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
- for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ for (mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ mmt = file->fa.memb_map[mt];
+ if (H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if (file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
- } /* end for */
+ if (file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
+ } /* end for */
assert(hi > 0);
/* Read from that member */
- return H5FDread(file->memb[hi], type, (prop_exists ? dx.memb_dxpl[hi] : H5P_DEFAULT),
- addr - start_addr, size, _buf);
+ return H5FDread(file->memb[hi], type, (prop_exists ? dx.memb_dxpl[hi] : H5P_DEFAULT), addr - start_addr,
+ size, _buf);
} /* end H5FD_multi_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_write
+ * Function: H5FD_multi_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf)
+H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *_buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_multi_dxpl_t dx;
- htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_multi_dxpl_t dx;
+ htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
- for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ for (mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ mmt = file->fa.memb_map[mt];
+ if (H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt<H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if (file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
- } /* end for */
+ if (file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
+ } /* end for */
assert(hi > 0);
/* Write to that member */
- return H5FDwrite(file->memb[hi], type, (prop_exists ? dx.memb_dxpl[hi] : H5P_DEFAULT),
- addr - start_addr, size, _buf);
+ return H5FDwrite(file->memb[hi], type, (prop_exists ? dx.memb_dxpl[hi] : H5P_DEFAULT), addr - start_addr,
+ size, _buf);
} /* end H5FD_multi_write() */
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_flush
+ * Function: H5FD_multi_flush
*
- * Purpose: Flushes all multi members.
+ * Purpose: Flushes all multi members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files flushed as possible.
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1719,40 +1671,40 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t
H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
- static const char *func="H5FD_multi_flush"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_mem_t mt;
+ int nerrors = 0;
+ static const char *func = "H5FD_multi_flush"; /* Function Name for error reporting */
#if 0
- H5FD_mem_t mmt;
+ H5FD_mem_t mmt;
/* Debugging stuff... */
- fprintf(stderr, "multifile access information:\n");
+ HDfprintf(stderr, "multifile access information:\n");
/* print the map */
- fprintf(stderr, " map=");
+ HDfprintf(stderr, " map=");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- mmt = file->memb_map[mt];
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
- fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
+ mmt = file->memb_map[mt];
+ if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
+ HDfprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
}
- fprintf(stderr, "\n");
+ HDfprintf(stderr, "\n");
/* print info about each file */
- fprintf(stderr, " File Starting Allocated Next Member\n");
- fprintf(stderr, " Number Address Size Address Name\n");
- fprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n");
+ HDfprintf(stderr, " File Starting Allocated Next Member\n");
+ HDfprintf(stderr, " Number Address Size Address Name\n");
+ HDfprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- if (HADDR_UNDEF!=file->memb_addr[mt]) {
- haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
- fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
- (int)mt, (unsigned long long)(file->memb_addr[mt]),
- (unsigned long long)eoa,
- (unsigned long long)(file->memb_next[mt]),
- file->memb_name[mt]);
- }
+ if (HADDR_UNDEF!=file->memb_addr[mt]) {
+ haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
+ HDfprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
+ (int)mt, (unsigned long long)(file->memb_addr[mt]),
+ (unsigned long long)eoa,
+ (unsigned long long)(file->memb_next[mt]),
+ file->memb_name[mt]);
+ }
}
#endif
@@ -1760,29 +1712,31 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
H5Eclear2(H5E_DEFAULT);
/* Flush each file */
- for (mt=H5FD_MEM_SUPER; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (file->memb[mt]) {
- H5E_BEGIN_TRY {
- if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++;
- } H5E_END_TRY;
- }
+ for (mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if (file->memb[mt]) {
+ H5E_BEGIN_TRY
+ {
+ if (H5FDflush(file->memb[mt], dxpl_id, closing) < 0)
+ nerrors++;
+ }
+ H5E_END_TRY;
+ }
}
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1)
- return 0;
+ return 0;
}
-
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_truncate
+ * Function: H5FD_multi_truncate
*
- * Purpose: Truncates all multi members.
+ * Purpose: Truncates all multi members.
*
- * Return: Success: 0
- * Failure: -1, as many files truncated as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 31, 2008
*
*-------------------------------------------------------------------------
@@ -1790,45 +1744,44 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
static herr_t
H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
- static const char *func="H5FD_multi_truncate"; /* Function Name for error reporting */
+ H5FD_multi_t * file = (H5FD_multi_t *)_file;
+ H5FD_mem_t mt;
+ int nerrors = 0;
+ static const char *func = "H5FD_multi_truncate"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Truncate each file */
- for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(file->memb[mt]) {
- H5E_BEGIN_TRY {
- if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
+ for (mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if (file->memb[mt]) {
+ H5E_BEGIN_TRY
+ {
+ if (H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
nerrors++;
- } H5E_END_TRY;
- }
+ }
+ H5E_END_TRY;
+ }
}
- if(nerrors)
+ if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1)
- return 0;
+ return 0;
} /* end H5FD_multi_truncate() */
-
/*-------------------------------------------------------------------------
- * Function: compute_next
+ * Function: compute_next
*
- * Purpose: Compute the memb_next[] values of the file based on the
- * file's member map and the member starting addresses.
+ * Purpose: Compute the memb_next[] values of the file based on the
+ * file's member map and the member starting addresses.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1837,77 +1790,84 @@ compute_next(H5FD_multi_t *file)
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- ALL_MEMBERS(mt) {
- file->memb_next[mt] = HADDR_UNDEF;
- } END_MEMBERS;
-
- UNIQUE_MEMBERS(file->fa.memb_map, mt1) {
- UNIQUE_MEMBERS(file->fa.memb_map, mt2) {
- if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] &&
- (HADDR_UNDEF==file->memb_next[mt1] ||
- file->memb_next[mt1]>file->fa.memb_addr[mt2])) {
- file->memb_next[mt1] = file->fa.memb_addr[mt2];
- }
- } END_MEMBERS;
- if (HADDR_UNDEF==file->memb_next[mt1]) {
- file->memb_next[mt1] = HADDR_MAX; /*last member*/
- }
- } END_MEMBERS;
+ ALL_MEMBERS(mt) { file->memb_next[mt] = HADDR_UNDEF; }
+ END_MEMBERS;
+
+ UNIQUE_MEMBERS(file->fa.memb_map, mt1)
+ {
+ UNIQUE_MEMBERS2(file->fa.memb_map, mt2)
+ {
+ if (file->fa.memb_addr[mt1] < file->fa.memb_addr[mt2] &&
+ (HADDR_UNDEF == file->memb_next[mt1] || file->memb_next[mt1] > file->fa.memb_addr[mt2])) {
+ file->memb_next[mt1] = file->fa.memb_addr[mt2];
+ }
+ }
+ END_MEMBERS;
+ if (HADDR_UNDEF == file->memb_next[mt1]) {
+ file->memb_next[mt1] = HADDR_MAX; /*last member*/
+ }
+ }
+ END_MEMBERS;
return 0;
}
-
/*-------------------------------------------------------------------------
- * Function: open_members
+ * Function: open_members
*
- * Purpose: Opens all members which are not opened yet.
+ * Purpose: Opens all members which are not opened yet.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() call with
+ * tmp in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
open_members(H5FD_multi_t *file)
{
- char tmp[H5FD_MULT_MAX_FILE_NAME_LEN];
- int nerrors=0;
- static const char *func="(H5FD_multi)open_members"; /* Function Name for error reporting */
+ char tmp[H5FD_MULT_MAX_FILE_NAME_LEN];
+ int nerrors = 0;
+ static const char *func = "(H5FD_multi)open_members"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- if(file->memb[mt])
+ UNIQUE_MEMBERS(file->fa.memb_map, mt)
+ {
+ if (file->memb[mt])
continue; /*already open*/
- assert(file->fa.memb_name[mt]);
+ assert(file->fa.memb_name[mt]);
/* Note: This truncates the user's filename down to only sizeof(tmp)
* characters. -QK & JK, 2013/01/17
*/
- sprintf(tmp, file->fa.memb_name[mt], file->name);
-
- H5E_BEGIN_TRY {
- file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF);
- } H5E_END_TRY;
- if(!file->memb[mt]) {
- if(!file->fa.relax || (file->flags & H5F_ACC_RDWR))
- nerrors++;
- }
- } END_MEMBERS;
+ sprintf(tmp, file->fa.memb_name[mt], file->name);
+
+ H5E_BEGIN_TRY { file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); }
+ H5E_END_TRY;
+ if (!file->memb[mt]) {
+ if (!file->fa.relax || (file->flags & H5F_ACC_RDWR))
+ nerrors++;
+ }
+ }
+ END_MEMBERS;
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1)
- return 0;
+ return 0;
}
+H5_GCC_DIAG_ON("format-nonliteral")
-
#ifdef _H5private_H
/*
* This is not related to the functionality of the driver code.
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index 959cc4d..8a3fb79 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the "multi" driver.
@@ -20,26 +20,19 @@
#ifndef H5FDmulti_H
#define H5FDmulti_H
-#include "H5Ipublic.h"
-#include "H5Ppublic.h" /* Property lists */
-#include "H5Fpublic.h"
-
-#define H5FD_MULTI (H5FD_multi_init())
+#define H5FD_MULTI (H5FD_multi_init())
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_multi_init(void);
-H5_DLL void H5FD_multi_term(void);
-H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char * const *memb_name,
- const haddr_t *memb_addr, hbool_t relax);
-H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
- hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
- haddr_t *memb_addr/*out*/, hbool_t *relax/*out*/);
-H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext,
- hid_t meta_plist_id, const char *raw_ext,
- hid_t raw_plist_id);
+H5_DLL hid_t H5FD_multi_init(void);
+H5_DLL void H5FD_multi_term(void);
+H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_fapl,
+ const char *const *memb_name, const haddr_t *memb_addr, hbool_t relax);
+H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl /*out*/,
+ char **memb_name /*out*/, haddr_t *memb_addr /*out*/, hbool_t *relax /*out*/);
+H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, const char *raw_ext,
+ hid_t raw_plist_id);
#ifdef __cplusplus
}
#endif
diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h
index 0bacc9c..7bec86b 100644
--- a/src/H5FDpkg.h
+++ b/src/H5FDpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, January 3, 2008
*
* Purpose: This file contains declarations which are visible only within
@@ -27,39 +27,33 @@
#define _H5FDpkg_H
/* Get package's private header */
-#include "H5FDprivate.h" /* File drivers */
+#include "H5FDprivate.h" /* File drivers */
/* Other private headers needed by this file */
-#include "H5FLprivate.h" /* Free lists */
+#include "H5FLprivate.h" /* Free lists */
/**************************/
/* Package Private Macros */
/**************************/
-
/****************************/
/* Package Private Typedefs */
/****************************/
-
/*****************************/
/* Package Private Variables */
/*****************************/
-
/******************************/
/* Package Private Prototypes */
/******************************/
-H5_DLL herr_t H5FD_init(void);
-H5_DLL haddr_t H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
- hsize_t size, haddr_t *align_addr, hsize_t *align_size);
-H5_DLL herr_t H5FD_free_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
- haddr_t addr, hsize_t size);
+H5_DLL herr_t H5FD_init(void);
+H5_DLL haddr_t H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, hsize_t size,
+ haddr_t *align_addr, hsize_t *align_size);
+H5_DLL herr_t H5FD_free_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr, hsize_t size);
-
-/* Testing routines */
+/* Testing functions */
#ifdef H5FD_TESTING
#endif /* H5FD_TESTING */
#endif /* _H5FDpkg_H */
-
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 9568f46..6e41d42 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDprivate_H
@@ -22,34 +22,33 @@
#include "H5FDpublic.h"
/* Private headers needed by this file */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5Pprivate.h" /* Property lists */
/*
* The MPI drivers are needed because there are
* places where we check for things that aren't handled by these drivers.
*/
-#include "H5FDmpi.h" /* MPI-based file drivers */
-
+#include "H5FDmpi.h" /* MPI-based file drivers */
/**************************/
/* Library Private Macros */
/**************************/
/* Length of filename buffer */
-#define H5FD_MAX_FILENAME_LEN 1024
+#define H5FD_MAX_FILENAME_LEN 1024
#ifdef H5_HAVE_PARALLEL
/* ======== Temporary data transfer properties ======== */
/* Definitions for memory MPI type property */
-#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
/* Definitions for file MPI type property */
-#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
typedef struct H5FD_class_mpi_t {
- H5FD_class_t super; /* Superclass information & methods */
- int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
- int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
+ H5FD_class_t super; /* Superclass information & methods */
+ int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
+ int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
} H5FD_class_mpi_t;
#endif
@@ -60,40 +59,44 @@ typedef struct H5FD_class_mpi_t {
/* File operations */
typedef enum {
- OP_UNKNOWN = 0, /* Unknown last file operation */
- OP_READ = 1, /* Last file I/O operation was a read */
- OP_WRITE = 2 /* Last file I/O operation was a write */
+ OP_UNKNOWN = 0, /* Unknown last file operation */
+ OP_READ = 1, /* Last file I/O operation was a read */
+ OP_WRITE = 2 /* Last file I/O operation was a write */
} H5FD_file_op_t;
-
/* Define structure to hold initial file image and other relevant information */
typedef struct {
- void *buffer;
- size_t size;
+ void * buffer;
+ size_t size;
H5FD_file_image_callbacks_t callbacks;
} H5FD_file_image_info_t;
/* Define default file image info */
-#define H5FD_DEFAULT_FILE_IMAGE_INFO { \
- /* file image buffer */ NULL, \
- /* buffer size */ 0, \
- { /* Callbacks */ \
- /* image_malloc */ NULL, \
- /* image_memcpy */ NULL, \
- /* image_realloc */ NULL, \
- /* image_free */ NULL, \
- /* udata_copy */ NULL, \
- /* udata_free */ NULL, \
- /* udata */ NULL, \
- } \
-}
-
+#define H5FD_DEFAULT_FILE_IMAGE_INFO \
+ { \
+ NULL, /* file image buffer */ \
+ 0, /* buffer size */ \
+ { /* Callbacks */ \
+ NULL, /* image_malloc */ \
+ NULL, /* image_memcpy */ \
+ NULL, /* image_realloc */ \
+ NULL, /* image_free */ \
+ NULL, /* udata_copy */ \
+ NULL, /* udata_free */ \
+ NULL, /* udata */ \
+ } \
+ }
+
+/* Define structure to hold driver ID & info for FAPLs */
+typedef struct {
+ hid_t driver_id; /* Driver's ID */
+ const void *driver_info; /* Driver info, for open callbacks */
+} H5FD_driver_prop_t;
/*****************************/
/* Library Private Variables */
/*****************************/
-
/******************************/
/* Library Private Prototypes */
/******************************/
@@ -102,40 +105,41 @@ typedef struct {
struct H5P_genplist_t;
struct H5F_t;
-H5_DLL int H5FD_term_interface(void);
+H5_DLL int H5FD_term_interface(void);
H5_DLL herr_t H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr);
H5_DLL H5FD_class_t *H5FD_get_class(hid_t id);
-H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
-H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf);
-H5_DLL herr_t H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf);
-H5_DLL void *H5FD_fapl_get(H5FD_t *file);
-H5_DLL herr_t H5FD_fapl_open(struct H5P_genplist_t *plist, hid_t driver_id, const void *driver_info);
-H5_DLL herr_t H5FD_fapl_close(hid_t driver_id, void *fapl);
-H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
-H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-H5_DLL herr_t H5FD_close(H5FD_t *file);
-H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
-H5_DLL haddr_t H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f,
- hsize_t size, haddr_t *align_addr, hsize_t *align_size);
-H5_DLL herr_t H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f,
- haddr_t addr, hsize_t size);
-H5_DLL htri_t H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f,
- haddr_t blk_end, hsize_t extra_requested);
+H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
+H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf);
+H5_DLL herr_t H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf);
+H5_DLL void * H5FD_fapl_get(H5FD_t *file);
+H5_DLL herr_t H5FD_fapl_open(struct H5P_genplist_t *plist, hid_t driver_id, const void *driver_info);
+H5_DLL herr_t H5FD_fapl_close(hid_t driver_id, void *fapl);
+H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
+H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+H5_DLL herr_t H5FD_close(H5FD_t *file);
+H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
+H5_DLL haddr_t H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f, hsize_t size,
+ haddr_t *align_addr, hsize_t *align_size);
+H5_DLL herr_t H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f, haddr_t addr,
+ hsize_t size);
+H5_DLL htri_t H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, haddr_t blk_end,
+ hsize_t extra_requested);
H5_DLL haddr_t H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type);
-H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr);
+H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr);
H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file);
H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file);
-H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags);
-H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
-H5_DLL herr_t H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
- haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
- haddr_t addr, size_t size, const void *buf);
+H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags);
+H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
+H5_DLL herr_t H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr, size_t size,
+ void *buf /*out*/);
+H5_DLL herr_t H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr, size_t size,
+ const void *buf);
H5_DLL herr_t H5FD_flush(H5FD_t *file, hid_t dxpl_id, unsigned closing);
H5_DLL herr_t H5FD_truncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
+H5_DLL herr_t H5FD_lock(H5FD_t *file, hbool_t rw);
+H5_DLL herr_t H5FD_unlock(H5FD_t *file);
H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum);
-H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle);
+H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle);
H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr);
H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
@@ -143,24 +147,21 @@ H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
#ifdef H5_HAVE_PARALLEL
/* General routines */
H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
-H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
-H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
- MPI_Comm *comm_new, MPI_Info *info_new);
-H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
+H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/);
+H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Info *info_new);
+H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
#ifdef NOT_YET
H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
#endif /* NOT_YET */
-H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype,
- MPI_Datatype *ftype);
+H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype, MPI_Datatype *ftype);
H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, hbool_t flag);
H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag);
/* Driver specific methods */
-H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
-H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
+H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
+H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
#endif /* H5_HAVE_PARALLEL */
#endif /* !_H5FDprivate_H */
-
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index a52c57a..fcedba2 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -6,26 +6,26 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDpublic_H
#define _H5FDpublic_H
#include "H5public.h"
-#include "H5Fpublic.h" /*for H5F_close_degree_t */
+#include "H5Fpublic.h" /*for H5F_close_degree_t */
-#define H5_HAVE_VFL 1 /*define a convenient app feature test*/
-#define H5FD_VFD_DEFAULT 0 /* Default VFL driver value */
+#define H5_HAVE_VFL 1 /*define a convenient app feature test*/
+#define H5FD_VFD_DEFAULT 0 /* Default VFL driver value */
/* Types of allocation requests: see H5Fpublic.h */
-typedef enum H5F_mem_t H5FD_mem_t;
+typedef enum H5F_mem_t H5FD_mem_t;
/* Map "fractal heap" header blocks to 'ohdr' type file memory, since its
* a fair amount of work to add a new kind of file memory and they are similar
@@ -56,8 +56,8 @@ typedef enum H5F_mem_t H5FD_mem_t;
*
* -QAK
*/
-#define H5FD_MEM_FSPACE_HDR H5FD_MEM_OHDR
-#define H5FD_MEM_FSPACE_SINFO H5FD_MEM_LHEAP
+#define H5FD_MEM_FSPACE_HDR H5FD_MEM_OHDR
+#define H5FD_MEM_FSPACE_SINFO H5FD_MEM_LHEAP
/* Map "shared object header message" master table to 'ohdr' type file memory,
* since its a fair amount of work to add a new kind of file memory and they are
@@ -69,8 +69,8 @@ typedef enum H5F_mem_t H5FD_mem_t;
*
* -QAK
*/
-#define H5FD_MEM_SOHM_TABLE H5FD_MEM_OHDR
-#define H5FD_MEM_SOHM_INDEX H5FD_MEM_BTREE
+#define H5FD_MEM_SOHM_TABLE H5FD_MEM_OHDR
+#define H5FD_MEM_SOHM_INDEX H5FD_MEM_BTREE
/*
* A free-list map which maps all types of allocation requests to a single
@@ -79,125 +79,128 @@ typedef enum H5F_mem_t H5FD_mem_t;
* want to make most efficient reuse of freed memory. The use of the
* H5FD_MEM_SUPER free list is arbitrary.
*/
-#define H5FD_FLMAP_SINGLE { \
- H5FD_MEM_SUPER, /*default*/ \
- H5FD_MEM_SUPER, /*super*/ \
- H5FD_MEM_SUPER, /*btree*/ \
- H5FD_MEM_SUPER, /*draw*/ \
- H5FD_MEM_SUPER, /*gheap*/ \
- H5FD_MEM_SUPER, /*lheap*/ \
- H5FD_MEM_SUPER /*ohdr*/ \
-}
+#define H5FD_FLMAP_SINGLE \
+ { \
+ H5FD_MEM_SUPER, /*default*/ \
+ H5FD_MEM_SUPER, /*super*/ \
+ H5FD_MEM_SUPER, /*btree*/ \
+ H5FD_MEM_SUPER, /*draw*/ \
+ H5FD_MEM_SUPER, /*gheap*/ \
+ H5FD_MEM_SUPER, /*lheap*/ \
+ H5FD_MEM_SUPER /*ohdr*/ \
+ }
/*
* A free-list map which segregates requests into `raw' or `meta' data
* pools.
*/
-#define H5FD_FLMAP_DICHOTOMY { \
- H5FD_MEM_SUPER, /*default*/ \
- H5FD_MEM_SUPER, /*super*/ \
- H5FD_MEM_SUPER, /*btree*/ \
- H5FD_MEM_DRAW, /*draw*/ \
- H5FD_MEM_DRAW, /*gheap*/ \
- H5FD_MEM_SUPER, /*lheap*/ \
- H5FD_MEM_SUPER /*ohdr*/ \
-}
+#define H5FD_FLMAP_DICHOTOMY \
+ { \
+ H5FD_MEM_SUPER, /*default*/ \
+ H5FD_MEM_SUPER, /*super*/ \
+ H5FD_MEM_SUPER, /*btree*/ \
+ H5FD_MEM_DRAW, /*draw*/ \
+ H5FD_MEM_DRAW, /*gheap*/ \
+ H5FD_MEM_SUPER, /*lheap*/ \
+ H5FD_MEM_SUPER /*ohdr*/ \
+ }
/*
* The default free list map which causes each request type to use it's own
* free-list.
*/
-#define H5FD_FLMAP_DEFAULT { \
- H5FD_MEM_DEFAULT, /*default*/ \
- H5FD_MEM_DEFAULT, /*super*/ \
- H5FD_MEM_DEFAULT, /*btree*/ \
- H5FD_MEM_DEFAULT, /*draw*/ \
- H5FD_MEM_DEFAULT, /*gheap*/ \
- H5FD_MEM_DEFAULT, /*lheap*/ \
- H5FD_MEM_DEFAULT /*ohdr*/ \
-}
-
+#define H5FD_FLMAP_DEFAULT \
+ { \
+ H5FD_MEM_DEFAULT, /*default*/ \
+ H5FD_MEM_DEFAULT, /*super*/ \
+ H5FD_MEM_DEFAULT, /*btree*/ \
+ H5FD_MEM_DEFAULT, /*draw*/ \
+ H5FD_MEM_DEFAULT, /*gheap*/ \
+ H5FD_MEM_DEFAULT, /*lheap*/ \
+ H5FD_MEM_DEFAULT /*ohdr*/ \
+ }
/* Define VFL driver features that can be enabled on a per-driver basis */
/* These are returned with the 'query' function pointer in H5FD_class_t */
- /*
- * Defining the H5FD_FEAT_AGGREGATE_METADATA for a VFL driver means that
- * the library will attempt to allocate a larger block for metadata and
- * then sub-allocate each metadata request from that larger block.
- */
-#define H5FD_FEAT_AGGREGATE_METADATA 0x00000001
- /*
- * Defining the H5FD_FEAT_ACCUMULATE_METADATA for a VFL driver means that
- * the library will attempt to cache metadata as it is written to the file
- * and build up a larger block of metadata to eventually pass to the VFL
- * 'write' routine.
- *
- * Distinguish between updating the metadata accumulator on writes and
- * reads. This is particularly (perhaps only, even) important for MPI-I/O
- * where we guarantee that writes are collective, but reads may not be.
- * If we were to allow the metadata accumulator to be written during a
- * read operation, the application would hang.
- */
-#define H5FD_FEAT_ACCUMULATE_METADATA_WRITE 0x00000002
-#define H5FD_FEAT_ACCUMULATE_METADATA_READ 0x00000004
-#define H5FD_FEAT_ACCUMULATE_METADATA (H5FD_FEAT_ACCUMULATE_METADATA_WRITE|H5FD_FEAT_ACCUMULATE_METADATA_READ)
- /*
- * Defining the H5FD_FEAT_DATA_SIEVE for a VFL driver means that
- * the library will attempt to cache raw data as it is read from/written to
- * a file in a "data seive" buffer. See Rajeev Thakur's papers:
- * http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz
- * http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz
- */
-#define H5FD_FEAT_DATA_SIEVE 0x00000008
- /*
- * Defining the H5FD_FEAT_AGGREGATE_SMALLDATA for a VFL driver means that
- * the library will attempt to allocate a larger block for "small" raw data
- * and then sub-allocate "small" raw data requests from that larger block.
- */
-#define H5FD_FEAT_AGGREGATE_SMALLDATA 0x00000010
- /*
- * Defining the H5FD_FEAT_IGNORE_DRVRINFO for a VFL driver means that
- * the library will ignore the driver info that is encoded in the file
- * for the VFL driver. (This will cause the driver info to be eliminated
- * from the file when it is flushed/closed, if the file is opened R/W).
- */
-#define H5FD_FEAT_IGNORE_DRVRINFO 0x00000020
- /*
- * Defining the H5FD_FEAT_DIRTY_SBLK_LOAD for a VFL driver means that
- * the library will mark the superblock dirty when the file is opened
- * R/W. This will cause the driver info to be re-encoded when the file
- * is flushed/closed.
- */
-#define H5FD_FEAT_DIRTY_SBLK_LOAD 0x00000040
- /*
- * Defining the H5FD_FEAT_POSIX_COMPAT_HANDLE for a VFL driver means that
- * the handle for the VFD (returned with the 'get_handle' callback) is
- * of type 'int' and is compatible with POSIX I/O calls.
- */
-#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
- /*
- * Defining the H5FD_FEAT_HAS_MPI for a VFL driver means that
- * the driver makes use of MPI communication and code may retrieve
- * communicator/rank information from it
- */
-#define H5FD_FEAT_HAS_MPI 0x00000100
- /*
- * Defining the H5FD_FEAT_ALLOCATE_EARLY for a VFL driver will force
- * the library to use the H5D_ALLOC_TIME_EARLY on dataset create
- * instead of the default H5D_ALLOC_TIME_LATE
- */
-#define H5FD_FEAT_ALLOCATE_EARLY 0x00000200
- /*
- * Defining the H5FD_FEAT_ALLOW_FILE_IMAGE for a VFL driver means that
- * the driver is able to use a file image in the fapl as the initial
- * contents of a file.
- */
-#define H5FD_FEAT_ALLOW_FILE_IMAGE 0x00000400
- /*
- * Defining the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS for a VFL driver
- * means that the driver is able to use callbacks to make a copy of the
- * image to store in memory.
- */
+/*
+ * Defining H5FD_FEAT_AGGREGATE_METADATA for a VFL driver means that
+ * the library will attempt to allocate a larger block for metadata and
+ * then sub-allocate each metadata request from that larger block.
+ */
+#define H5FD_FEAT_AGGREGATE_METADATA 0x00000001
+/*
+ * Defining H5FD_FEAT_ACCUMULATE_METADATA for a VFL driver means that
+ * the library will attempt to cache metadata as it is written to the file
+ * and build up a larger block of metadata to eventually pass to the VFL
+ * 'write' routine.
+ *
+ * Distinguish between updating the metadata accumulator on writes and
+ * reads. This is particularly (perhaps only, even) important for MPI-I/O
+ * where we guarantee that writes are collective, but reads may not be.
+ * If we were to allow the metadata accumulator to be written during a
+ * read operation, the application would hang.
+ */
+#define H5FD_FEAT_ACCUMULATE_METADATA_WRITE 0x00000002
+#define H5FD_FEAT_ACCUMULATE_METADATA_READ 0x00000004
+#define H5FD_FEAT_ACCUMULATE_METADATA \
+ (H5FD_FEAT_ACCUMULATE_METADATA_WRITE | H5FD_FEAT_ACCUMULATE_METADATA_READ)
+/*
+ * Defining H5FD_FEAT_DATA_SIEVE for a VFL driver means that
+ * the library will attempt to cache raw data as it is read from/written to
+ * a file in a "data seive" buffer. See Rajeev Thakur's papers:
+ * http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz
+ * http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz
+ */
+#define H5FD_FEAT_DATA_SIEVE 0x00000008
+/*
+ * Defining H5FD_FEAT_AGGREGATE_SMALLDATA for a VFL driver means that
+ * the library will attempt to allocate a larger block for "small" raw data
+ * and then sub-allocate "small" raw data requests from that larger block.
+ */
+#define H5FD_FEAT_AGGREGATE_SMALLDATA 0x00000010
+/*
+ * Defining H5FD_FEAT_IGNORE_DRVRINFO for a VFL driver means that
+ * the library will ignore the driver info that is encoded in the file
+ * for the VFL driver. (This will cause the driver info to be eliminated
+ * from the file when it is flushed/closed, if the file is opened R/W).
+ */
+#define H5FD_FEAT_IGNORE_DRVRINFO 0x00000020
+/*
+ * Defining the H5FD_FEAT_DIRTY_SBLK_LOAD for a VFL driver means that
+ * the library will mark the superblock dirty when the file is opened
+ * R/W. This will cause the driver info to be re-encoded when the file
+ * is flushed/closed.
+ */
+#define H5FD_FEAT_DIRTY_SBLK_LOAD 0x00000040
+/*
+ * Defining H5FD_FEAT_POSIX_COMPAT_HANDLE for a VFL driver means that
+ * the handle for the VFD (returned with the 'get_handle' callback) is
+ * of type 'int' and is compatible with POSIX I/O calls.
+ */
+#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
+/*
+ * Defining H5FD_FEAT_HAS_MPI for a VFL driver means that
+ * the driver makes use of MPI communication and code may retrieve
+ * communicator/rank information from it
+ */
+#define H5FD_FEAT_HAS_MPI 0x00000100
+/*
+ * Defining the H5FD_FEAT_ALLOCATE_EARLY for a VFL driver will force
+ * the library to use the H5D_ALLOC_TIME_EARLY on dataset create
+ * instead of the default H5D_ALLOC_TIME_LATE
+ */
+#define H5FD_FEAT_ALLOCATE_EARLY 0x00000200
+/*
+ * Defining H5FD_FEAT_ALLOW_FILE_IMAGE for a VFL driver means that
+ * the driver is able to use a file image in the fapl as the initial
+ * contents of a file.
+ */
+#define H5FD_FEAT_ALLOW_FILE_IMAGE 0x00000400
+/*
+ * Defining H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS for a VFL driver
+ * means that the driver is able to use callbacks to make a copy of the
+ * image to store in memory.
+ */
#define H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS 0x00000800
/* Forward declaration */
@@ -205,49 +208,44 @@ typedef struct H5FD_t H5FD_t;
/* Class information for each file driver */
typedef struct H5FD_class_t {
- const char *name;
- haddr_t maxaddr;
+ const char * name;
+ haddr_t maxaddr;
H5F_close_degree_t fc_degree;
hsize_t (*sb_size)(H5FD_t *file);
- herr_t (*sb_encode)(H5FD_t *file, char *name/*out*/,
- unsigned char *p/*out*/);
- herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p);
- size_t fapl_size;
- void * (*fapl_get)(H5FD_t *file);
- void * (*fapl_copy)(const void *fapl);
- herr_t (*fapl_free)(void *fapl);
- size_t dxpl_size;
- void * (*dxpl_copy)(const void *dxpl);
- herr_t (*dxpl_free)(void *dxpl);
- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl,
- haddr_t maxaddr);
- herr_t (*close)(H5FD_t *file);
- int (*cmp)(const H5FD_t *f1, const H5FD_t *f2);
- herr_t (*query)(const H5FD_t *f1, unsigned long *flags);
- herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map);
+ herr_t (*sb_encode)(H5FD_t *file, char *name /*out*/, unsigned char *p /*out*/);
+ herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p);
+ size_t fapl_size;
+ void *(*fapl_get)(H5FD_t *file);
+ void *(*fapl_copy)(const void *fapl);
+ herr_t (*fapl_free)(void *fapl);
+ size_t dxpl_size;
+ void *(*dxpl_copy)(const void *dxpl);
+ herr_t (*dxpl_free)(void *dxpl);
+ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr);
+ herr_t (*close)(H5FD_t *file);
+ int (*cmp)(const H5FD_t *f1, const H5FD_t *f2);
+ herr_t (*query)(const H5FD_t *f1, unsigned long *flags);
+ herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map);
haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
- herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
- haddr_t addr, hsize_t size);
+ herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type);
- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr);
+ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr);
haddr_t (*get_eof)(const H5FD_t *file);
- herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle);
- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl,
- haddr_t addr, size_t size, void *buffer);
- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl,
- haddr_t addr, size_t size, const void *buffer);
- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, unsigned closing);
- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
- herr_t (*lock)(H5FD_t *file, unsigned char *oid, unsigned lock_type, hbool_t last);
- herr_t (*unlock)(H5FD_t *file, unsigned char *oid, hbool_t last);
+ herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void **file_handle);
+ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer);
+ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer);
+ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, unsigned closing);
+ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
+ herr_t (*lock)(H5FD_t *file, unsigned char *oid, unsigned lock_type, hbool_t last);
+ herr_t (*unlock)(H5FD_t *file, unsigned char *oid, hbool_t last);
H5FD_mem_t fl_map[H5FD_MEM_NTYPES];
} H5FD_class_t;
/* A free list is a singly-linked list of address/size pairs. */
typedef struct H5FD_free_t {
- haddr_t addr;
- hsize_t size;
- struct H5FD_free_t *next;
+ haddr_t addr;
+ hsize_t size;
+ struct H5FD_free_t *next;
} H5FD_free_t;
/*
@@ -255,22 +253,22 @@ typedef struct H5FD_free_t {
* are declared here and the driver appends private fields in memory.
*/
struct H5FD_t {
- hid_t driver_id; /*driver ID for this file */
- const H5FD_class_t *cls; /*constant class info */
- unsigned long fileno; /* File 'serial' number */
- unsigned long feature_flags; /* VFL Driver feature Flags */
- haddr_t maxaddr; /* For this file, overrides class */
- haddr_t base_addr; /* Base address for HDF5 data w/in file */
+ hid_t driver_id; /*driver ID for this file */
+ const H5FD_class_t *cls; /*constant class info */
+ unsigned long fileno; /* File 'serial' number */
+ unsigned long feature_flags; /* VFL Driver feature Flags */
+ haddr_t maxaddr; /* For this file, overrides class */
+ haddr_t base_addr; /* Base address for HDF5 data w/in file */
/* Space allocation management fields */
- hsize_t threshold; /* Threshold for alignment */
- hsize_t alignment; /* Allocation alignment */
+ hsize_t threshold; /* Threshold for alignment */
+ hsize_t alignment; /* Allocation alignment */
};
/* Define enum for the source of file image callbacks */
typedef enum {
H5FD_FILE_IMAGE_OP_NO_OP,
- H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET,
+ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET,
H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY,
H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET,
H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE,
@@ -281,16 +279,13 @@ typedef enum {
/* Define structure to hold file image callbacks */
typedef struct {
- void *(*image_malloc)(size_t size, H5FD_file_image_op_t file_image_op,
- void *udata);
- void *(*image_memcpy)(void *dest, const void *src, size_t size,
- H5FD_file_image_op_t file_image_op, void *udata);
- void *(*image_realloc)(void *ptr, size_t size,
- H5FD_file_image_op_t file_image_op, void *udata);
- herr_t (*image_free)(void *ptr, H5FD_file_image_op_t file_image_op,
+ void *(*image_malloc)(size_t size, H5FD_file_image_op_t file_image_op, void *udata);
+ void *(*image_memcpy)(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op,
void *udata);
- void *(*udata_copy)(void *udata);
- herr_t (*udata_free)(void *udata);
+ void *(*image_realloc)(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata);
+ herr_t (*image_free)(void *ptr, H5FD_file_image_op_t file_image_op, void *udata);
+ void *(*udata_copy)(void *udata);
+ herr_t (*udata_free)(void *udata);
void *udata;
} H5FD_file_image_callbacks_t;
@@ -299,29 +294,30 @@ extern "C" {
#endif
/* Function prototypes */
-H5_DLL hid_t H5FDregister(const H5FD_class_t *cls);
+H5_DLL hid_t H5FDregister(const H5FD_class_t *cls);
H5_DLL herr_t H5FDunregister(hid_t driver_id);
-H5_DLL H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-H5_DLL herr_t H5FDclose(H5FD_t *file);
-H5_DLL int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2);
-H5_DLL int H5FDquery(const H5FD_t *f, unsigned long *flags);
+H5_DLL H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+H5_DLL herr_t H5FDclose(H5FD_t *file);
+H5_DLL int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2);
+H5_DLL int H5FDquery(const H5FD_t *f, unsigned long *flags);
H5_DLL haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
- haddr_t addr, hsize_t size);
+H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
H5_DLL haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type);
-H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa);
+H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa);
H5_DLL haddr_t H5FDget_eof(H5FD_t *file);
-H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle);
-H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
- haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
- haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, unsigned closing);
-H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
+H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle);
+H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ void *buf /*out*/);
+H5_DLL herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+ const void *buf);
+H5_DLL herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, unsigned closing);
+H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
+/* H5_DLL herr_t H5FDlock(H5FD_t *file, hbool_t rw);
+H5_DLL herr_t H5FDunlock(H5FD_t *file); */
+/* Allows querying a VFD ID for features before the file is opened */
+H5_DLL herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags /*out*/);
#ifdef __cplusplus
}
#endif
#endif
-
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
new file mode 100644
index 0000000..237dd8f
--- /dev/null
+++ b/src/H5FDros3.c
@@ -0,0 +1,1576 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Read-Only S3 Virtual File Driver (VFD)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-13
+ *
+ * Purpose:
+ *
+ * Provide read-only access to files hosted on Amazon's S3 service.
+ * Relies on "s3comms" utility layer to implement the AWS REST API.
+ */
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_ros3_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDros3.h" /* ros3 file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5FDs3comms.h" /* S3 Communications */
+
+#ifdef H5_HAVE_ROS3_VFD
+
+/* toggle function call prints: 1 turns on
+ */
+#define ROS3_DEBUG 0
+
+/* toggle stats collection and reporting
+ */
+#define ROS3_STATS 0
+
+/* The driver identification number, initialized at runtime
+ */
+static hid_t H5FD_ROS3_g = 0;
+
+#if ROS3_STATS
+
+/* arbitrarily large value, such that any reasonable size read will be "less"
+ * than this value and set a true minimum
+ * not 0 because that may be a valid recorded minimum in degenerate cases
+ */
+#define ROS3_STATS_STARTING_MIN 0xfffffffful
+
+/* Configuration definitions for stats collection and breakdown
+ *
+ * 2^10 = 1024
+ * Reads up to 1024 bytes (1 kB) fall in bin 0
+ * 2^(10+(1*16)) = 2^26 = 64MB
+ * Reads of 64MB or greater fall in "overflow" bin[BIN_COUNT]
+ */
+#define ROS3_STATS_BASE 2
+#define ROS3_STATS_INTERVAL 1
+#define ROS3_STATS_START_POWER 10
+#define ROS3_STATS_BIN_COUNT 16 /* MUST BE GREATER THAN 0 */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Calculate `BASE ^ (START_POWER + (INTERVAL * bin_i))`
+ * Stores result at `(unsigned long long *) out_ptr`.
+ * Used in computing boundaries between stats bins.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ */
+#define ROS3_STATS_POW(bin_i, out_ptr) \
+ { \
+ unsigned long long donotshadowresult = 1; \
+ unsigned donotshadowindex = 0; \
+ for (donotshadowindex = 0; \
+ donotshadowindex < (((bin_i)*ROS3_STATS_INTERVAL) + ROS3_STATS_START_POWER); \
+ donotshadowindex++) { \
+ donotshadowresult *= ROS3_STATS_BASE; \
+ } \
+ *(out_ptr) = donotshadowresult; \
+ }
+
+/* array to hold pre-computed boundaries for stats bins */
+static unsigned long long ros3_stats_boundaries[ROS3_STATS_BIN_COUNT];
+
+/***************************************************************************
+ *
+ * Structure: ros3_statsbin
+ *
+ * Purpose:
+ *
+ * Structure for storing per-file ros3 VFD usage statistics.
+ *
+ *
+ *
+ * `count` (unsigned long long)
+ *
+ * Number of reads with size in this bin's range.
+ *
+ * `bytes` (unsigned long long)
+ *
+ * Total number of bytes read through this bin.
+ *
+ * `min` (unsigned long long)
+ *
+ * Smallest read size in this bin.
+ *
+ * `max` (unsigned long long)
+ *
+ * Largest read size in this bin.
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ *
+ ***************************************************************************/
+typedef struct {
+ unsigned long long count;
+ unsigned long long bytes;
+ unsigned long long min;
+ unsigned long long max;
+} ros3_statsbin;
+
+#endif /* ROS3_STATS */
+
+/***************************************************************************
+ *
+ * Structure: H5FD_ros3_t
+ *
+ * Purpose:
+ *
+ * H5FD_ros3_t is a structure used to store all information needed to
+ * maintain R/O access to a single HDF5 file that has been stored as a
+ * S3 object. This structure is created when such a file is "opened" and
+ * discarded when it is "closed".
+ *
+ * Presents an S3 object as a file to the HDF5 library.
+ *
+ *
+ *
+ * `pub` (H5FD_t)
+ *
+ * Instance of H5FD_t which contains all fields common to all VFDs.
+ * It must be the first item in this structure, since at higher levels,
+ * this structure will be treated as an instance of H5FD_t.
+ *
+ * `fa` (H5FD_ros3_fapl_t)
+ *
+ * Instance of `H5FD_ros3_fapl_t` containing the S3 configuration data
+ * needed to "open" the HDF5 file.
+ *
+ * `eoa` (haddr_t)
+ *
+ * End of addressed space in file. After open, it should always
+ * equal the file size.
+ *
+ * `s3r_handle` (s3r_t *)
+ *
+ * Instance of S3 Request handle associated with the target resource.
+ * Responsible for communicating with remote host and presenting file
+ * contents as indistinguishable from a file on the local filesystem.
+ *
+ * *** present only if ROS3_SATS is flagged to enable stats collection ***
+ *
+ * `meta` (ros3_statsbin[])
+ * `raw` (ros3_statsbin[])
+ *
+ * Only present if ros3 stats collection is enabled.
+ *
+ * Arrays of `ros3_statsbin` structures to record raw- and metadata reads.
+ *
+ * Records count and size of reads performed by the VFD, and is used to
+ * print formatted usage statistics to stdout upon VFD shutdown.
+ *
+ * Reads of each raw- and metadata type are recorded in an individual bin
+ * determined by the size of the read. The last bin of each type is
+ * reserved for "big" reads, with no defined upper bound.
+ *
+ * *** end ROS3_STATS ***
+ *
+ *
+ *
+ * Programmer: Jacob Smith
+ *
+ ***************************************************************************/
+typedef struct H5FD_ros3_t {
+ H5FD_t pub;
+ H5FD_ros3_fapl_t fa;
+ haddr_t eoa;
+ s3r_t * s3r_handle;
+#if ROS3_STATS
+ ros3_statsbin meta[ROS3_STATS_BIN_COUNT + 1];
+ ros3_statsbin raw[ROS3_STATS_BIN_COUNT + 1];
+#endif
+} H5FD_ros3_t;
+
+/*
+ * These macros check for overflow of various quantities. These macros
+ * assume that HDoff_t is signed and haddr_t and size_t are unsigned.
+ *
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
+ * Only included if it may be used -- ROS3 VFD is enabled.
+ *
+ */
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+
+/* Prototypes */
+static H5FD_t *H5FD_ros3_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_ros3_close(H5FD_t *_file);
+static int H5FD_ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_ros3_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD_ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD_ros3_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD_ros3_get_eof(const H5FD_t *_file);
+static herr_t H5FD_ros3_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_ros3_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_ros3_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_ros3_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_ros3_validate_config(const H5FD_ros3_fapl_t *fa);
+static void * H5FD_ros3_fapl_get(H5FD_t *_file);
+static void * H5FD_ros3_fapl_copy(const void *_old_fa);
+static herr_t H5FD_ros3_fapl_free(void *_fa);
+
+static const H5FD_class_t H5FD_ros3_g = {
+ "ros3", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_ros3_fapl_t), /* fapl_size */
+ H5FD_ros3_fapl_get, /* fapl_get */
+ H5FD_ros3_fapl_copy, /* fapl_copy */
+ H5FD_ros3_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_ros3_open, /* open */
+ H5FD_ros3_close, /* close */
+ H5FD_ros3_cmp, /* cmp */
+ H5FD_ros3_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_ros3_get_eoa, /* get_eoa */
+ H5FD_ros3_set_eoa, /* set_eoa */
+ H5FD_ros3_get_eof, /* get_eof */
+ H5FD_ros3_get_handle, /* get_handle */
+ H5FD_ros3_read, /* read */
+ H5FD_ros3_write, /* write */
+ NULL, /* flush */
+ H5FD_ros3_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
+};
+
+/* Declare a free list to manage the H5FD_ros3_t struct */
+H5FL_DEFINE_STATIC(H5FD_ros3_t);
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Success: The driver ID for the ros3 driver.
+ * Failure: Negative
+ *
+ * Programmer: Jacob Smith 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ FUNC_LEAVE_NOAPI(H5FD_ros3_init())
+} /* H5FD_ros3_init_interface() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_init
+ *
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
+ *
+ * Return: Success: The driver ID for the ros3 driver.
+ * Failure: Negative
+ *
+ * Programmer: Jacob Smith 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5FD_ros3_init(void)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+#if ROS3_STATS
+ unsigned int bin_i;
+#endif
+
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (H5I_VFL != H5I_get_type(H5FD_ROS3_g))
+ H5FD_ROS3_g = H5FD_register(&H5FD_ros3_g, sizeof(H5FD_class_t), FALSE);
+
+#if ROS3_STATS
+ /* pre-compute statsbin boundaries
+ */
+ for (bin_i = 0; bin_i < ROS3_STATS_BIN_COUNT; bin_i++) {
+ unsigned long long value = 0;
+
+ ROS3_STATS_POW(bin_i, &value)
+ ros3_stats_boundaries[bin_i] = value;
+ }
+#endif
+
+ /* Set return value */
+ ret_value = H5FD_ROS3_g;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_init() */
+
+/*---------------------------------------------------------------------------
+ * Function: H5FD_ros3_term
+ *
+ * Purpose: Shut down the VFD
+ *
+ * Returns: <none>
+ *
+ * Programmer: Jacob Smith 2017
+ *
+ *---------------------------------------------------------------------------
+ */
+void
+H5FD_ros3_term(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Reset VFL ID */
+ H5FD_ROS3_g = 0;
+
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5FD_ros3_term() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_fapl_ros3
+ *
+ * Purpose: Modify the file access property list to use the H5FD_ROS3
+ * driver defined in this source file. All driver specfic
+ * properties are passed in as a pointer to a suitably
+ * initialized instance of H5FD_ros3_fapl_t
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: John Mainzer
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa)
+{
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", fapl_id, fa);
+
+ HDassert(fa != NULL);
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
+ if (plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+
+ if (FAIL == H5FD_ros3_validate_config(fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid ros3 config")
+
+ ret_value = H5P_set_driver(plist, H5FD_ROS3, (void *)fa);
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pset_fapl_ros3() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_validate_config()
+ *
+ * Purpose: Test to see if the supplied instance of H5FD_ros3_fapl_t
+ * contains internally consistant data. Return SUCCEED if so,
+ * and FAIL otherwise.
+ *
+ * Note the difference between internally consistant and
+ * correct. As we will have to try to access the target
+ * object to determine whether the supplied data is correct,
+ * we will settle for internal consistancy at this point
+ *
+ * Return: SUCCEED if instance of H5FD_ros3_fapl_t contains internally
+ * consistant data, FAIL otherwise.
+ *
+ * Programmer: Jacob Smith
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_validate_config(const H5FD_ros3_fapl_t *fa)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ HDassert(fa != NULL);
+
+ if (fa->version != H5FD_CURR_ROS3_FAPL_T_VERSION)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ros3_fapl_t version");
+
+ /* if set to authenticate, region and id cannot be empty strings */
+ if (fa->authenticate == TRUE)
+ if ((fa->aws_region[0] == '\0') || (fa->secret_id[0] == '\0'))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Inconsistent authentication information");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_validate_config() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_fapl_ros3
+ *
+ * Purpose: Returns information about the ros3 file access property
+ * list though the function arguments.
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: John Mainzer
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out)
+{
+ const H5FD_ros3_fapl_t *fa = NULL;
+ H5P_genplist_t * plist = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", fapl_id, fa_out);
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (fa_out == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_out is NULL")
+
+ plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
+ if (plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
+
+ if (H5FD_ROS3 != H5P_get_driver(plist))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
+
+ fa = (const H5FD_ros3_fapl_t *)H5P_get_driver_info(plist);
+ if (fa == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
+
+ /* Copy the ros3 fapl data out */
+ HDmemcpy(fa_out, fa, sizeof(H5FD_ros3_fapl_t));
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_fapl_ros3() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_fapl_get
+ *
+ * Purpose: Gets a file access property list which could be used to
+ * create an identical file.
+ *
+ * Return: Success: Ptr to new file access property list value.
+ *
+ * Failure: NULL
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5FD_ros3_fapl_get(H5FD_t *_file)
+{
+ H5FD_ros3_t * file = (H5FD_ros3_t *)_file;
+ H5FD_ros3_fapl_t *fa = NULL;
+ void * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ fa = (H5FD_ros3_fapl_t *)H5MM_calloc(sizeof(H5FD_ros3_fapl_t));
+ if (fa == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+
+ /* Copy the fields of the structure */
+ HDmemcpy(fa, &(file->fa), sizeof(H5FD_ros3_fapl_t));
+
+ /* Set return value */
+ ret_value = fa;
+
+done:
+ if (ret_value == NULL)
+ if (fa != NULL)
+ H5MM_xfree(fa);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_fapl_get() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_fapl_copy
+ *
+ * Purpose: Copies the ros3-specific file access properties.
+ *
+ * Return: Success: Ptr to a new property list
+ *
+ * Failure: NULL
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5FD_ros3_fapl_copy(const void *_old_fa)
+{
+ const H5FD_ros3_fapl_t *old_fa = (const H5FD_ros3_fapl_t *)_old_fa;
+ H5FD_ros3_fapl_t * new_fa = NULL;
+ void * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ new_fa = (H5FD_ros3_fapl_t *)H5MM_malloc(sizeof(H5FD_ros3_fapl_t));
+ if (new_fa == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+
+ HDmemcpy(new_fa, old_fa, sizeof(H5FD_ros3_fapl_t));
+ ret_value = new_fa;
+
+done:
+ if (ret_value == NULL)
+ if (new_fa != NULL)
+ H5MM_xfree(new_fa);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_fapl_copy() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_fapl_free
+ *
+ * Purpose: Frees the ros3-specific file access properties.
+ *
+ * Return: SUCCEED (cannot fail)
+ *
+ * Programmer: John Mainzer
+ * 9/8/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_fapl_free(void *_fa)
+{
+ H5FD_ros3_fapl_t *fa = (H5FD_ros3_fapl_t *)_fa;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(fa != NULL); /* sanity check */
+
+ H5MM_xfree(fa);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5FD_ros3_fapl_free() */
+
+#if ROS3_STATS
+/*----------------------------------------------------------------------------
+ *
+ * Function: ros3_reset_stats()
+ *
+ * Purpose:
+ *
+ * Reset the stats collection elements in this virtual file structure.
+ *
+ * Clears any set data in stats bins; initializes/zeroes values.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - Occurs if the file is invalid somehow
+ *
+ * Programmer: Jacob Smith
+ * 2017-12-08
+ *
+ *----------------------------------------------------------------------------
+ */
+static herr_t
+ros3_reset_stats(H5FD_ros3_t *file)
+{
+ unsigned i = 0;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null");
+
+ for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ file->raw[i].bytes = 0;
+ file->raw[i].count = 0;
+ file->raw[i].min = (unsigned long long)ROS3_STATS_STARTING_MIN;
+ file->raw[i].max = 0;
+
+ file->meta[i].bytes = 0;
+ file->meta[i].count = 0;
+ file->meta[i].min = (unsigned long long)ROS3_STATS_STARTING_MIN;
+ file->meta[i].max = 0;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end ros3_reset_stats() */
+#endif /* ROS3_STATS */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_open()
+ *
+ * Purpose:
+ *
+ * Create and/or opens a file as an HDF5 file.
+ *
+ * Any flag except H5F_ACC_RDONLY will cause an error.
+ *
+ * Name (as received from `H5FD_open()`) must conform to web url:
+ * NAME :: HTTP "://" DOMAIN [PORT] ["/" [URI] [QUERY] ]
+ * HTTP :: "http" [ "s" ]
+ * DOMAIN :: e.g., "mybucket.host.org"
+ * PORT :: ":" <number> (e.g., ":9000" )
+ * URI :: <string> (e.g., "path/to/resource.hd5" )
+ * QUERY :: "?" <string> (e.g., "arg1=param1&arg2=param2")
+ *
+ * Return:
+ *
+ * Success: A pointer to a new file data structure.
+ * The public fields will be initialized by the caller, which is
+ * always H5FD_open().
+ *
+ * Failure: NULL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5FD_t *
+H5FD_ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+{
+ H5FD_ros3_t * file = NULL;
+ struct tm * now = NULL;
+ char iso8601now[ISO8601_SIZE];
+ unsigned char signing_key[SHA256_DIGEST_LENGTH];
+ s3r_t * handle = NULL;
+ H5FD_ros3_fapl_t fa;
+ H5FD_t * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Sanity check on file offsets */
+ HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
+
+ /* Check arguments */
+ if (!url || !*url)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
+ if (ADDR_OVERFLOW(maxaddr))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
+ if (flags != H5F_ACC_RDONLY)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed")
+
+ if (FAIL == H5Pget_fapl_ros3(fapl_id, &fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list")
+
+ if (CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to initialize curl global (placeholder flags)")
+
+ /* open file; procedure depends on whether or not the fapl instructs to
+ * authenticate requests or not.
+ */
+ if (fa.authenticate == TRUE) {
+ /* compute signing key (part of AWS/S3 REST API)
+ * can be re-used by user/key for 7 days after creation.
+ * find way to re-use/share
+ */
+ now = gmnow();
+ HDassert(now != NULL);
+ if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while writing iso8601 timestamp")
+ if (FAIL == H5FD_s3comms_signing_key(signing_key, (const char *)fa.secret_key,
+ (const char *)fa.aws_region, (const char *)iso8601now))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while computing signing key")
+
+ handle = H5FD_s3comms_s3r_open(url, (const char *)fa.aws_region, (const char *)fa.secret_id,
+ (const unsigned char *)signing_key);
+ }
+ else
+ handle = H5FD_s3comms_s3r_open(url, NULL, NULL, NULL);
+
+ if (handle == NULL)
+ /* If we want to check CURL's say on the matter in a controlled
+ * fashion, this is the place to do it, but would need to make a
+ * few minor changes to s3comms `s3r_t` and `s3r_read()`.
+ */
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open");
+
+ /* create new file struct */
+ file = H5FL_CALLOC(H5FD_ros3_t);
+ if (file == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
+
+ file->s3r_handle = handle;
+ HDmemcpy(&(file->fa), &fa, sizeof(H5FD_ros3_fapl_t));
+
+#if ROS3_STATS
+ if (FAIL == ros3_reset_stats(file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics")
+#endif /* ROS3_STATS */
+
+ ret_value = (H5FD_t *)file;
+
+done:
+ if (ret_value == NULL) {
+ if (handle != NULL)
+ if (FAIL == H5FD_s3comms_s3r_close(handle))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close s3 file handle")
+ if (file != NULL)
+ file = H5FL_FREE(H5FD_ros3_t, file);
+ curl_global_cleanup(); /* early cleanup because open failed */
+ } /* end if null return value (error) */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_open() */
+
+#if ROS3_STATS
+/*----------------------------------------------------------------------------
+ *
+ * Function: ros3_fprint_stats()
+ *
+ * Purpose:
+ *
+ * Tabulate and pretty-print statistics for this virtual file.
+ *
+ * Should be called upon file close.
+ *
+ * Shows number of reads and bytes read, broken down by
+ * "raw" (H5FD_MEM_DRAW)
+ * or "meta" (any other flag)
+ *
+ * Prints filename and listing of total number of reads and bytes read,
+ * both as a grand total and separate meta- and rawdata reads.
+ *
+ * If any reads were done, prints out two tables:
+ *
+ * 1. overview of raw- and metadata reads
+ * - min (smallest size read)
+ * - average of size read
+ * - k,M,G suffixes by powers of 1024 (2^10)
+ * - max (largest size read)
+ * 2. tabulation of "bins", sepraring reads into exponentially-larger
+ * ranges of size.
+ * - columns for number of reads, total bytes, and average size, with
+ * separate sub-colums for raw- and metadata reads.
+ * - each row represents one bin, identified by the top of its range
+ *
+ * Bin ranges can be modified with pound-defines at the top of this file.
+ *
+ * Bins without any reads in their bounds are not printed.
+ *
+ * An "overflow" bin is also present, to catch "big" reads.
+ *
+ * Output for all bins (and range ceiling and average size report)
+ * is divied by powers of 1024. By corollary, four digits before the decimal
+ * is valid.
+ *
+ * - 41080 bytes is represented by 40.177k, not 41.080k
+ * - 1004.831M represents approx. 1052642000 bytes
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - occurs if the file passed in is invalid
+ * - TODO: if stream is invalid? how can we check this?
+ *
+ * Programmer: Jacob Smith
+ *
+ *----------------------------------------------------------------------------
+ */
+static herr_t
+ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
+{
+ herr_t ret_value = SUCCEED;
+ parsed_url_t * purl = NULL;
+ unsigned i = 0;
+ unsigned long count_meta = 0;
+ unsigned long count_raw = 0;
+ double average_meta = 0.0;
+ double average_raw = 0.0;
+ unsigned long long min_meta = (unsigned long long)ROS3_STATS_STARTING_MIN;
+ unsigned long long min_raw = (unsigned long long)ROS3_STATS_STARTING_MIN;
+ unsigned long long max_meta = 0;
+ unsigned long long max_raw = 0;
+ unsigned long long bytes_raw = 0;
+ unsigned long long bytes_meta = 0;
+ double re_dub = 0.0; /* re-usable double variable */
+ unsigned suffix_i = 0;
+ const char suffixes[] = {' ', 'K', 'M', 'G', 'T', 'P'};
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if (stream == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null");
+ if (file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null");
+ if (file->s3r_handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "s3 request handle cannot be null");
+ if (file->s3r_handle->purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "parsed url structure cannot be null");
+ purl = file->s3r_handle->purl;
+
+ /******************
+ * PRINT FILENAME *
+ ******************/
+
+ HDfprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
+ if (purl->port != NULL && purl->port[0] != '\0')
+ HDfprintf(stream, ":%s", purl->port);
+ if (purl->query != NULL && purl->query[0] != '\0') {
+ if (purl->path != NULL && purl->path[0] != '\0')
+ HDfprintf(stream, "/%s", purl->path);
+ else
+ HDfprintf(stream, "/");
+ HDfprintf(stream, "?%s", purl->query);
+ }
+ else if (purl->path != NULL && purl->path[0] != '\0') {
+ HDfprintf(stream, "/%s", purl->path);
+ }
+ HDfprintf(stream, "\n");
+
+ /*******************
+ * AGGREGATE STATS *
+ *******************/
+
+ for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ const ros3_statsbin *r = &file->raw[i];
+ const ros3_statsbin *m = &file->meta[i];
+
+ if (m->min < min_meta)
+ min_meta = m->min;
+ if (r->min < min_raw)
+ min_raw = r->min;
+ if (m->max > max_meta)
+ max_meta = m->max;
+ if (r->max > max_raw)
+ max_raw = r->max;
+
+ count_raw += r->count;
+ count_meta += m->count;
+ bytes_raw += r->bytes;
+ bytes_meta += m->bytes;
+ }
+ if (count_raw > 0)
+ average_raw = (double)bytes_raw / (double)count_raw;
+ if (count_meta > 0)
+ average_meta = (double)bytes_meta / (double)count_meta;
+
+ /******************
+ * PRINT OVERVIEW *
+ ******************/
+
+ HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
+
+ if (count_raw + count_meta == 0)
+ goto done;
+
+ /*************************
+ * PRINT AGGREGATE STATS *
+ *************************/
+
+ HDfprintf(stream, "SIZES meta raw\n");
+ HDfprintf(stream, " min ");
+ if (count_meta == 0)
+ HDfprintf(stream, " 0.000 ");
+ else {
+ re_dub = (double)min_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ }
+
+ if (count_raw == 0)
+ HDfprintf(stream, " 0.000 \n");
+ else {
+ re_dub = (double)min_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ }
+
+ HDfprintf(stream, " avg ");
+ re_dub = (double)average_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+
+ re_dub = (double)average_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+
+ HDfprintf(stream, " max ");
+ re_dub = (double)max_meta;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+
+ re_dub = (double)max_raw;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+
+ /******************************
+ * PRINT INDIVIDUAL BIN STATS *
+ ******************************/
+
+ HDfprintf(stream, "BINS # of reads total bytes average size\n");
+ HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+
+ for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ const ros3_statsbin *m;
+ const ros3_statsbin *r;
+ unsigned long long range_end = 0;
+ char bm_suffix = ' '; /* bytes-meta */
+ double bm_val = 0.0;
+ char br_suffix = ' '; /* bytes-raw */
+ double br_val = 0.0;
+ char am_suffix = ' '; /* average-meta */
+ double am_val = 0.0;
+ char ar_suffix = ' '; /* average-raw */
+ double ar_val = 0.0;
+
+ m = &file->meta[i];
+ r = &file->raw[i];
+ if (r->count == 0 && m->count == 0)
+ continue;
+
+ range_end = ros3_stats_boundaries[i];
+
+ if (i == ROS3_STATS_BIN_COUNT) {
+ range_end = ros3_stats_boundaries[i - 1];
+ HDfprintf(stream, ">");
+ }
+ else
+ HDfprintf(stream, " ");
+
+ bm_val = (double)m->bytes;
+ for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
+ bm_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ bm_suffix = suffixes[suffix_i];
+
+ br_val = (double)r->bytes;
+ for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
+ br_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ br_suffix = suffixes[suffix_i];
+
+ if (m->count > 0)
+ am_val = (double)(m->bytes) / (double)(m->count);
+ for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
+ am_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ am_suffix = suffixes[suffix_i];
+
+ if (r->count > 0)
+ ar_val = (double)(r->bytes) / (double)(r->count);
+ for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
+ ar_val /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+ ar_suffix = suffixes[suffix_i];
+
+ re_dub = (double)range_end;
+ for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ re_dub /= 1024.0;
+ HDassert(suffix_i < sizeof(suffixes));
+
+ HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* rawdata reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* rawdata bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* rawdata average */
+
+ HDfflush(stream);
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+
+} /* ros3_fprint_stats */
+#endif /* ROS3_STATS */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_close()
+ *
+ * Purpose:
+ *
+ * Close an HDF5 file.
+ *
+ * Return:
+ *
+ * SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
+{
+ H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Sanity checks */
+ HDassert(file != NULL);
+ HDassert(file->s3r_handle != NULL);
+
+ /* Close the underlying request handle
+ */
+ if (FAIL == H5FD_s3comms_s3r_close(file->s3r_handle))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close S3 request handle")
+
+#if ROS3_STATS
+ /* TODO: mechanism to re-target stats printout */
+ if (ros3_fprint_stats(stdout, file) == FAIL)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics")
+#endif /* ROS3_STATS */
+
+ /* Release the file info */
+ file = H5FL_FREE(H5FD_ros3_t, file);
+
+done:
+ curl_global_cleanup(); /* cleanup to answer init on open */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_close() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_cmp()
+ *
+ * Purpose:
+ *
+ * Compares two files belonging to this driver using an arbitrary
+ * (but consistent) ordering:
+ *
+ * + url scheme
+ * + url host
+ * + url port
+ * + url path
+ * + url query
+ * + fapl aws_region
+ * + fapl secret_id
+ * + fapl secret_key
+ *
+ * tl;dr -> check URL, check crentials
+ *
+ * Return:
+ *
+ * - Equivalent: 0
+ * - Not Equivalent: -1
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-06
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+H5FD_ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+{
+ const H5FD_ros3_t * f1 = (const H5FD_ros3_t *)_f1;
+ const H5FD_ros3_t * f2 = (const H5FD_ros3_t *)_f2;
+ const parsed_url_t *purl1 = NULL;
+ const parsed_url_t *purl2 = NULL;
+ int ret_value = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HDassert(f1->s3r_handle != NULL);
+ HDassert(f2->s3r_handle != NULL);
+
+ purl1 = (const parsed_url_t *)f1->s3r_handle->purl;
+ purl2 = (const parsed_url_t *)f2->s3r_handle->purl;
+ HDassert(purl1 != NULL);
+ HDassert(purl2 != NULL);
+ HDassert(purl1->scheme != NULL);
+ HDassert(purl2->scheme != NULL);
+ HDassert(purl1->host != NULL);
+ HDassert(purl2->host != NULL);
+
+ /* URL: SCHEME */
+ if (HDstrcmp(purl1->scheme, purl2->scheme))
+ HGOTO_DONE(-1)
+
+ /* URL: HOST */
+ if (HDstrcmp(purl1->host, purl2->host))
+ HGOTO_DONE(-1)
+
+ /* URL: PORT */
+ if (purl1->port && purl2->port) {
+ if (HDstrcmp(purl1->port, purl2->port))
+ HGOTO_DONE(-1)
+ }
+ else if (purl1->port)
+ HGOTO_DONE(-1)
+ else if (purl2->port)
+ HGOTO_DONE(-1)
+
+ /* URL: PATH */
+ if (purl1->path && purl2->path) {
+ if (HDstrcmp(purl1->path, purl2->path))
+ HGOTO_DONE(-1)
+ }
+ else if (purl1->path && !purl2->path)
+ HGOTO_DONE(-1)
+ else if (purl2->path && !purl1->path)
+ HGOTO_DONE(-1)
+
+ /* URL: QUERY */
+ if (purl1->query && purl2->query) {
+ if (HDstrcmp(purl1->query, purl2->query))
+ HGOTO_DONE(-1)
+ }
+ else if (purl1->query && !purl2->query)
+ HGOTO_DONE(-1)
+ else if (purl2->query && !purl1->query)
+ HGOTO_DONE(-1)
+
+ /* FAPL: AWS_REGION */
+ if (f1->fa.aws_region[0] != '\0' && f2->fa.aws_region[0] != '\0') {
+ if (HDstrcmp(f1->fa.aws_region, f2->fa.aws_region))
+ HGOTO_DONE(-1)
+ }
+ else if (f1->fa.aws_region[0] != '\0')
+ HGOTO_DONE(-1)
+ else if (f2->fa.aws_region[0] != '\0')
+ HGOTO_DONE(-1)
+
+ /* FAPL: SECRET_ID */
+ if (f1->fa.secret_id[0] != '\0' && f2->fa.secret_id[0] != '\0') {
+ if (HDstrcmp(f1->fa.secret_id, f2->fa.secret_id))
+ HGOTO_DONE(-1)
+ }
+ else if (f1->fa.secret_id[0] != '\0')
+ HGOTO_DONE(-1)
+ else if (f2->fa.secret_id[0] != '\0')
+ HGOTO_DONE(-1)
+
+ /* FAPL: SECRET_KEY */
+ if (f1->fa.secret_key[0] != '\0' && f2->fa.secret_key[0] != '\0') {
+ if (HDstrcmp(f1->fa.secret_key, f2->fa.secret_key))
+ HGOTO_DONE(-1)
+ }
+ else if (f1->fa.secret_key[0] != '\0')
+ HGOTO_DONE(-1)
+ else if (f2->fa.secret_key[0] != '\0')
+ HGOTO_DONE(-1)
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_ros3_cmp() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_ros3_query
+ *
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * (listed in H5FDpublic.h)
+ *
+ * Note that since the ROS3 VFD is read only, most flags
+ * are irrelevant.
+ *
+ * The term "set" is highly misleading...
+ * stores/copies the supported flags in the out-pointer `flags`.
+ *
+ * Return: SUCCEED (Can't fail)
+ *
+ * Programmer: John Mainzer
+ * 9/11/17
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out */)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ /* Set the VFL feature flags that this driver supports */
+ if (flags) {
+ *flags = 0;
+ /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD_ros3_query() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_get_eoa()
+ *
+ * Purpose:
+ *
+ * Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
+ *
+ * Return:
+ *
+ * The end-of-address marker.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+{
+ const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ FUNC_LEAVE_NOAPI(file->eoa)
+} /* end H5FD_ros3_get_eoa() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_set_eoa()
+ *
+ * Purpose:
+ *
+ * Set the end-of-address marker for the file.
+ *
+ * Return:
+ *
+ * SUCCEED (can't fail)
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-03
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+{
+ H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ file->eoa = addr;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD_ros3_set_eoa() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_get_eof()
+ *
+ * Purpose:
+ *
+ * Returns the end-of-file marker.
+ *
+ * Return:
+ *
+ * EOF: the first address past the end of the "file", either the
+ * filesystem file or the HDF5 file.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_ros3_get_eof(const H5FD_t *_file)
+{
+ const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ FUNC_LEAVE_NOAPI(H5FD_s3comms_s3r_get_filesize(file->s3r_handle))
+} /* end H5FD_ros3_get_eof() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_get_handle()
+ *
+ * Purpose:
+ *
+ * Returns the S3 Request handle (s3r_t) of ros3 file driver.
+ *
+ * Returns:
+ *
+ * SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-02
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
+{
+ H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if (!file_handle)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
+
+ *file_handle = file->s3r_handle;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_get_handle() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_read()
+ *
+ * Purpose
+ *
+ * Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in DXPL_ID.
+ *
+ * Return:
+ *
+ * Success: `SUCCEED`
+ * - Result is stored in caller-supplied buffer BUF.
+ * Failure: `FAIL`
+ * - Unable to complete read.
+ * - Contents of buffer `buf` are undefined.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-??
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+ size_t size, void *buf)
+{
+ H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
+ size_t filesize = 0;
+ herr_t ret_value = SUCCEED;
+#if ROS3_STATS
+ /* working variables for storing stats */
+ ros3_statsbin *bin = NULL;
+ unsigned bin_i = 0;
+#endif /* ROS3_STATS */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HDassert(file != NULL);
+ HDassert(file->s3r_handle != NULL);
+ HDassert(buf != NULL);
+
+ filesize = H5FD_s3comms_s3r_get_filesize(file->s3r_handle);
+
+ if ((addr > filesize) || ((addr + size) > filesize))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address")
+
+ if (H5FD_s3comms_s3r_read(file->s3r_handle, addr, size, buf) == FAIL)
+ HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read")
+
+#if ROS3_STATS
+
+ /* Find which "bin" this read fits in. Can be "overflow" bin. */
+ for (bin_i = 0; bin_i < ROS3_STATS_BIN_COUNT; bin_i++)
+ if ((unsigned long long)size < ros3_stats_boundaries[bin_i])
+ break;
+ bin = (type == H5FD_MEM_DRAW) ? &file->raw[bin_i] : &file->meta[bin_i];
+
+ /* Store collected stats in appropriate bin */
+ if (bin->count == 0) {
+ bin->min = size;
+ bin->max = size;
+ }
+ else {
+ if (size < bin->min)
+ bin->min = size;
+ if (size > bin->max)
+ bin->max = size;
+ }
+ bin->count++;
+ bin->bytes += (unsigned long long)size;
+
+#endif /* ROS3_STATS */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_read() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_write()
+ *
+ * Purpose:
+ *
+ * Write bytes to file.
+ * UNSUPPORTED IN READ-ONLY ROS3 VFD.
+ *
+ * Return:
+ *
+ * FAIL (Not possible with Read-Only S3 file.)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-23
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+ haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, const void H5_ATTR_UNUSED *buf)
+{
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_ros3_write() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5FD_ros3_truncate()
+ *
+ * Purpose:
+ *
+ * Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
+ *
+ * NOT POSSIBLE ON READ-ONLY S3 FILES.
+ *
+ * Return:
+ *
+ * FAIL (Not possible on Read-Only S3 files.)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-23
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if ROS3_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_ros3_truncate() */
+
+#endif /* H5_HAVE_ROS3_VFD */
diff --git a/src/H5FDros3.h b/src/H5FDros3.h
new file mode 100644
index 0000000..57a7597
--- /dev/null
+++ b/src/H5FDros3.h
@@ -0,0 +1,103 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Read-Only S3 Virtual File Driver (VFD)
+ *
+ * Programmer: John Mainzer
+ * 2017-10-10
+ *
+ * Purpose: The public header file for the ros3 driver.
+ */
+#ifndef H5FDros3_H
+#define H5FDros3_H
+
+#ifdef H5_HAVE_ROS3_VFD
+#define H5FD_ROS3 (H5FD_ros3_init())
+#else
+#define H5FD_ROS3 (H5I_INVALID_HID)
+#endif /* H5_HAVE_ROS3_VFD */
+
+#ifdef H5_HAVE_ROS3_VFD
+
+/****************************************************************************
+ *
+ * Structure: H5FD_ros3_fapl_t
+ *
+ * Purpose:
+ *
+ * H5FD_ros3_fapl_t is a public structure that is used to pass S3
+ * authentication data to the appropriate S3 VFD via the FAPL. A pointer
+ * to an instance of this structure is a parameter to H5Pset_fapl_ros3()
+ * and H5Pget_fapl_ros3().
+ *
+ *
+ *
+ * `version` (int32_t)
+ *
+ * Version number of the H5FD_ros3_fapl_t structure. Any instance passed
+ * to the above calls must have a recognized version number, or an error
+ * will be flagged.
+ *
+ * This field should be set to H5FD_CURR_ROS3_FAPL_T_VERSION.
+ *
+ * `authenticate` (hbool_t)
+ *
+ * Flag TRUE or FALSE whether or not requests are to be authenticated
+ * with the AWS4 algorithm.
+ * If TRUE, `aws_region`, `secret_id`, and `secret_key` must be populated.
+ * If FALSE, those three components are unused.
+ *
+ * `aws_region` (char[])
+ *
+ * String: name of the AWS "region" of the host, e.g. "us-east-1".
+ *
+ * `secret_id` (char[])
+ *
+ * String: "Access ID" for the resource.
+ *
+ * `secret_key` (char[])
+ *
+ * String: "Secret Access Key" associated with the ID and resource.
+ *
+ ****************************************************************************/
+
+#define H5FD_CURR_ROS3_FAPL_T_VERSION 1
+
+#define H5FD_ROS3_MAX_REGION_LEN 32
+#define H5FD_ROS3_MAX_SECRET_ID_LEN 128
+#define H5FD_ROS3_MAX_SECRET_KEY_LEN 128
+
+typedef struct H5FD_ros3_fapl_t {
+ int32_t version;
+ hbool_t authenticate;
+ char aws_region[H5FD_ROS3_MAX_REGION_LEN + 1];
+ char secret_id[H5FD_ROS3_MAX_SECRET_ID_LEN + 1];
+ char secret_key[H5FD_ROS3_MAX_SECRET_KEY_LEN + 1];
+} H5FD_ros3_fapl_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5_DLL hid_t H5FD_ros3_init(void);
+H5_DLL void H5FD_ros3_term(void);
+H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out);
+H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H5_HAVE_ROS3_VFD */
+
+#endif /* ifndef H5FDros3_H */
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
new file mode 100644
index 0000000..38700b4
--- /dev/null
+++ b/src/H5FDs3comms.c
@@ -0,0 +1,2883 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*****************************************************************************
+ * Read-Only S3 Virtual File Driver (VFD)
+ *
+ * Source for S3 Communications module
+ *
+ * ***NOT A FILE DRIVER***
+ *
+ * Provide functions and structures required for interfacing with Amazon
+ * Simple Storage Service (S3).
+ *
+ * Provide S3 object access as if it were a local file.
+ *
+ * Connect to remote host, send and receive HTTP requests and responses
+ * as part of the AWS REST API, authenticating requests as appropriate.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-30
+ *
+ *****************************************************************************/
+
+/****************/
+/* Module Setup */
+/****************/
+
+/***********/
+/* Headers */
+/***********/
+
+#include "H5private.h" /* generic functions */
+#include "H5Eprivate.h" /* error handling */
+#include "H5MMprivate.h" /* memory management */
+#include "H5FDs3comms.h" /* S3 Communications */
+
+/****************/
+/* Local Macros */
+/****************/
+
+#ifdef H5_HAVE_ROS3_VFD
+
+/* toggle debugging (enable with 1)
+ */
+#define S3COMMS_DEBUG 0
+
+/* manipulate verbosity of CURL output
+ * operates separately from S3COMMS_DEBUG
+ *
+ * 0 -> no explicit curl output
+ * 1 -> on error, print failure info to stderr
+ * 2 -> in addition to above, print information for all performs; sets all
+ * curl handles with CURLOPT_VERBOSE
+ */
+#define S3COMMS_CURL_VERBOSITY 0
+
+/* size to allocate for "bytes=<first_byte>[-<last_byte>]" HTTP Range value
+ */
+#define S3COMMS_MAX_RANGE_STRING_SIZE 128
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Structures */
+/********************/
+
+/* struct s3r_datastruct
+ * Structure passed to curl write callback
+ * pointer to data region and record of bytes written (offset)
+ */
+struct s3r_datastruct {
+ unsigned long magic;
+ char * data;
+ size_t size;
+};
+#define S3COMMS_CALLBACK_DATASTRUCT_MAGIC 0x28c2b2ul
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+size_t curlwritecallback(char *ptr, size_t size, size_t nmemb, void *userdata);
+
+herr_t H5FD_s3comms_s3r_getsize(s3r_t *handle);
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+/*************/
+/* Functions */
+/*************/
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: curlwritecallback()
+ *
+ * Purpose:
+ *
+ * Function called by CURL to write received data.
+ *
+ * Writes bytes to `userdata`.
+ *
+ * Internally manages number of bytes processed.
+ *
+ * Return:
+ *
+ * - Number of bytes processed.
+ * - Should equal number of bytes passed to callback.
+ * - Failure will result in curl error: CURLE_WRITE_ERROR.
+ *
+ * Programmer: Jacob Smith
+ * 2017-08-17
+ *
+ *----------------------------------------------------------------------------
+ */
+size_t
+curlwritecallback(char *ptr, size_t size, size_t nmemb, void *userdata)
+{
+ struct s3r_datastruct *sds = (struct s3r_datastruct *)userdata;
+ size_t product = (size * nmemb);
+ size_t written = 0;
+
+ if (sds->magic != S3COMMS_CALLBACK_DATASTRUCT_MAGIC)
+ return written;
+
+ if (size > 0) {
+ HDmemcpy(&(sds->data[sds->size]), ptr, product);
+ sds->size += product;
+ written = product;
+ }
+
+ return written;
+} /* end curlwritecallback() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_hrb_node_set()
+ *
+ * Purpose:
+ *
+ * Create, insert, modify, and remove elements in a field node list.
+ *
+ * `name` cannot be null; will return FAIL and list will be unaltered.
+ *
+ * Entries are accessed via the lowercase representation of their name:
+ * "Host", "host", and "hOSt" would all access the same node,
+ * but name's case is relevant in HTTP request output.
+ *
+ * List pointer `L` must always point to either of :
+ * - header node with lowest alphabetical order (by lowername)
+ * - NULL, if list is empty
+ *
+ * Types of operations:
+ *
+ * - CREATE
+ * - If `L` is NULL and `name` and `value` are not NULL,
+ * a new node is created at `L`, starting a list.
+ * - MODIFY
+ * - If a node is found with a matching lowercase name and `value`
+ * is not NULL, the existing name, value, and cat values are released
+ * and replaced with the new data.
+ * - No modifications are made to the list pointers.
+ * - REMOVE
+ * - If `value` is NULL, will attempt to remove node with matching
+ * lowercase name.
+ * - If no match found, returns FAIL and list is not modified.
+ * - When removing a node, all its resources is released.
+ * - If removing the last node in the list, list pointer is set to NULL.
+ * - INSERT
+ * - If no nodes exists with matching lowercase name and `value`
+ * is not NULL, a new node is created, inserted into list
+ * alphabetically by lowercase name.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - List was successfully modified
+ * - FAILURE: `FAIL`
+ * - Unable to perform operation
+ * - Forbidden (attempting to remove absent node, e.g.)
+ * - Internal error
+ *
+ * Programmer: Jacob Smith
+ * 2017-09-22
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
+{
+ size_t i = 0;
+ char * valuecpy = NULL;
+ char * namecpy = NULL;
+ size_t namelen = 0;
+ char * lowername = NULL;
+ char * nvcat = NULL;
+ hrb_node_t *node_ptr = NULL;
+ hrb_node_t *new_node = NULL;
+ hbool_t is_looking = TRUE;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
+ HDprintf("NAME: %s\n", name);
+ HDprintf("VALUE: %s\n", value);
+ HDprintf("LIST:\n->");
+ for (node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next)
+ HDfprintf(stdout, "{%s}\n->", node_ptr->cat);
+ HDprintf("(null)\n");
+ HDfflush(stdout);
+ node_ptr = NULL;
+#endif
+
+ if (name == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to operate on null name");
+ namelen = HDstrlen(name);
+
+ /***********************
+ * PREPARE ALL STRINGS *
+ **********************/
+
+ /* copy and lowercase name
+ */
+ lowername = (char *)H5MM_malloc(sizeof(char) * (namelen + 1));
+ if (lowername == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for lowercase name copy.");
+ for (i = 0; i < namelen; i++)
+ lowername[i] = (char)HDtolower((int)name[i]);
+ lowername[namelen] = 0;
+
+ /* If value supplied, copy name, value, and concatenated "name: value".
+ * If NULL, we will be removing a node or doing nothing, so no need for
+ * copies
+ */
+ if (value != NULL) {
+ int ret = 0;
+ size_t valuelen = HDstrlen(value);
+ size_t catlen = namelen + valuelen + 2; /* +2 from ": " */
+ size_t catwrite = catlen + 3; /* 3 not 1 to quiet compiler warning */
+
+ namecpy = (char *)H5MM_malloc(sizeof(char) * (namelen + 1));
+ if (namecpy == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for name copy.");
+ HDmemcpy(namecpy, name, (namelen + 1));
+
+ valuecpy = (char *)H5MM_malloc(sizeof(char) * (valuelen + 1));
+ if (valuecpy == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for value copy.");
+ HDmemcpy(valuecpy, value, (valuelen + 1));
+
+ nvcat = (char *)H5MM_malloc(sizeof(char) * catwrite);
+ if (nvcat == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for concatenated string.");
+ ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value);
+ if (ret < 0 || (size_t)ret > catlen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value);
+ HDassert(catlen == HDstrlen(nvcat));
+
+ /* create new_node, should we need it
+ */
+ new_node = (hrb_node_t *)H5MM_malloc(sizeof(hrb_node_t));
+ if (new_node == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for new set.");
+
+ new_node->magic = S3COMMS_HRB_NODE_MAGIC;
+ new_node->name = NULL;
+ new_node->value = NULL;
+ new_node->cat = NULL;
+ new_node->lowername = NULL;
+ new_node->next = NULL;
+ }
+
+ /***************
+ * ACT ON LIST *
+ ***************/
+
+ if (*L == NULL) {
+ if (value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list")
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("CREATE NEW\n");
+ HDfflush(stdout);
+#endif
+ /*******************
+ * CREATE NEW LIST *
+ *******************/
+
+ new_node->cat = nvcat;
+ new_node->name = namecpy;
+ new_node->lowername = lowername;
+ new_node->value = valuecpy;
+
+ *L = new_node;
+ goto done; /* bypass further seeking */
+ }
+ }
+
+ /* sanity-check pointer passed in
+ */
+ HDassert((*L) != NULL);
+ HDassert((*L)->magic == S3COMMS_HRB_NODE_MAGIC);
+ node_ptr = (*L);
+
+ /* Check whether to modify/remove first node in list
+ */
+ if (HDstrcmp(lowername, node_ptr->lowername) == 0) {
+
+ is_looking = FALSE;
+
+ if (value == NULL) {
+#if S3COMMS_DEBUG
+ HDprintf("REMOVE HEAD\n");
+ HDfflush(stdout);
+#endif
+ /***************
+ * REMOVE HEAD *
+ ***************/
+
+ *L = node_ptr->next;
+
+#if S3COMMS_DEBUG
+ HDprintf("FREEING CAT (node)\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(node_ptr->cat);
+#if S3COMMS_DEBUG
+ HDprintf("FREEING LOWERNAME (node)\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(node_ptr->lowername);
+#if S3COMMS_DEBUG
+ HDprintf("FREEING NAME (node)\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(node_ptr->name);
+#if S3COMMS_DEBUG
+ HDprintf("FREEING VALUE (node)\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(node_ptr->value);
+#if S3COMMS_DEBUG
+ HDprintf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
+ HDfflush(stdout);
+#endif
+ HDassert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC);
+ node_ptr->magic += 1ul;
+#if S3COMMS_DEBUG
+ HDprintf("FREEING POINTER\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(node_ptr);
+
+#if S3COMMS_DEBUG
+ HDprintf("FREEING WORKING LOWERNAME\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(lowername);
+ lowername = NULL;
+ }
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("MODIFY HEAD\n");
+ HDfflush(stdout);
+#endif
+ /***************
+ * MODIFY HEAD *
+ ***************/
+
+ H5MM_xfree(node_ptr->cat);
+ H5MM_xfree(node_ptr->name);
+ H5MM_xfree(node_ptr->value);
+
+ node_ptr->name = namecpy;
+ node_ptr->value = valuecpy;
+ node_ptr->cat = nvcat;
+
+ H5MM_xfree(lowername);
+ lowername = NULL;
+ new_node->magic += 1ul;
+ H5MM_xfree(new_node);
+ new_node = NULL;
+ }
+ }
+ else if (HDstrcmp(lowername, node_ptr->lowername) < 0) {
+
+ is_looking = FALSE;
+
+ if (value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head")
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("PREPEND NEW HEAD\n");
+ HDfflush(stdout);
+#endif
+ /*******************
+ * INSERT NEW HEAD *
+ *******************/
+
+ new_node->name = namecpy;
+ new_node->value = valuecpy;
+ new_node->lowername = lowername;
+ new_node->cat = nvcat;
+ new_node->next = node_ptr;
+ *L = new_node;
+ }
+ }
+
+ /***************
+ * SEARCH LIST *
+ ***************/
+
+ while (is_looking) {
+ if (node_ptr->next == NULL) {
+
+ is_looking = FALSE;
+
+ if (value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("APPEND A NODE\n");
+ HDfflush(stdout);
+#endif
+ /*******************
+ * APPEND NEW NODE *
+ *******************/
+
+ HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ new_node->name = namecpy;
+ new_node->value = valuecpy;
+ new_node->lowername = lowername;
+ new_node->cat = nvcat;
+ node_ptr->next = new_node;
+ }
+ }
+ else if (HDstrcmp(lowername, node_ptr->next->lowername) < 0) {
+
+ is_looking = FALSE;
+
+ if (value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("INSERT A NODE\n");
+ HDfflush(stdout);
+#endif
+ /*******************
+ * INSERT NEW NODE *
+ *******************/
+
+ HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ new_node->name = namecpy;
+ new_node->value = valuecpy;
+ new_node->lowername = lowername;
+ new_node->cat = nvcat;
+ new_node->next = node_ptr->next;
+ node_ptr->next = new_node;
+ }
+ }
+ else if (HDstrcmp(lowername, node_ptr->next->lowername) == 0) {
+
+ is_looking = FALSE;
+
+ if (value == NULL) {
+ /*****************
+ * REMOVE A NODE *
+ *****************/
+
+ hrb_node_t *tmp = node_ptr->next;
+ node_ptr->next = tmp->next;
+
+#if S3COMMS_DEBUG
+ HDprintf("REMOVE A NODE\n");
+ HDfflush(stdout);
+#endif
+ H5MM_xfree(tmp->cat);
+ H5MM_xfree(tmp->lowername);
+ H5MM_xfree(tmp->name);
+ H5MM_xfree(tmp->value);
+
+ HDassert(tmp->magic == S3COMMS_HRB_NODE_MAGIC);
+ tmp->magic += 1ul;
+ H5MM_xfree(tmp);
+
+ H5MM_xfree(lowername);
+ lowername = NULL;
+ }
+ else {
+#if S3COMMS_DEBUG
+ HDprintf("MODIFY A NODE\n");
+ HDfflush(stdout);
+#endif
+ /*****************
+ * MODIFY A NODE *
+ *****************/
+
+ node_ptr = node_ptr->next;
+ H5MM_xfree(node_ptr->name);
+ H5MM_xfree(node_ptr->value);
+ H5MM_xfree(node_ptr->cat);
+
+ HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ new_node->magic += 1ul;
+ H5MM_xfree(new_node);
+ H5MM_xfree(lowername);
+ new_node = NULL;
+ lowername = NULL;
+
+ node_ptr->name = namecpy;
+ node_ptr->value = valuecpy;
+ node_ptr->cat = nvcat;
+ }
+ }
+ else {
+ /****************
+ * KEEP LOOKING *
+ ****************/
+
+ node_ptr = node_ptr->next;
+ }
+ } /* end while is_looking */
+
+done:
+ if (ret_value == FAIL) {
+ /* clean up */
+ if (nvcat != NULL)
+ H5MM_xfree(nvcat);
+ if (namecpy != NULL)
+ H5MM_xfree(namecpy);
+ if (lowername != NULL)
+ H5MM_xfree(lowername);
+ if (valuecpy != NULL)
+ H5MM_xfree(valuecpy);
+ if (new_node != NULL) {
+ HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ new_node->magic += 1ul;
+ H5MM_xfree(new_node);
+ }
+ }
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_hrb_node_set() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_hrb_destroy()
+ *
+ * Purpose:
+ *
+ * Destroy and free resources _directly_ associated with an HTTP Buffer.
+ *
+ * Takes a pointer to pointer to the buffer structure.
+ * This allows for the pointer itself to be NULLed from within the call.
+ *
+ * If buffer or buffer pointer is NULL, there is no effect.
+ *
+ * Headers list at `first_header` is not touched.
+ *
+ * - Programmer should re-use or destroy `first_header` pointer
+ * (hrb_node_t *) as suits their purposes.
+ * - Recommend fetching prior to destroy()
+ * e.g., `reuse_node = hrb_to_die->first_header; destroy(hrb_to_die);`
+ * or maintaining an external reference.
+ * - Destroy node/list separately as appropriate
+ * - Failure to account for this will result in a memory leak.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - successfully released buffer resources
+ * - if `buf` is NULL or `*buf` is NULL, no effect
+ * - FAILURE: `FAIL`
+ * - `buf->magic != S3COMMS_HRB_MAGIC`
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-21
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_hrb_destroy(hrb_t **_buf)
+{
+ hrb_t *buf = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
+#endif
+
+ if (_buf != NULL && *_buf != NULL) {
+ buf = *_buf;
+ if (buf->magic != S3COMMS_HRB_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pointer's magic does not match.");
+
+ H5MM_xfree(buf->verb);
+ H5MM_xfree(buf->version);
+ H5MM_xfree(buf->resource);
+ buf->magic += 1ul;
+ H5MM_xfree(buf);
+ *_buf = NULL;
+ } /* end if `_buf` has some value */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_s3comms_hrb_destroy() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_hrb_init_request()
+ *
+ * Purpose:
+ *
+ * Create a new HTTP Request Buffer
+ *
+ * All non-null arguments should be null-terminated strings.
+ *
+ * If `verb` is NULL, defaults to "GET".
+ * If `http_version` is NULL, defaults to "HTTP/1.1".
+ *
+ * `resource` cannot be NULL; should be string beginning with slash
+ * character ('/').
+ *
+ * All strings are copied into the structure, making them safe from
+ * modification in source strings.
+ *
+ * Return:
+ *
+ * - SUCCESS: pointer to new `hrb_t`
+ * - FAILURE: `NULL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-21
+ *
+ *----------------------------------------------------------------------------
+ */
+hrb_t *
+H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const char *_http_version)
+{
+ hrb_t *request = NULL;
+ char * res = NULL;
+ size_t reslen = 0;
+ hrb_t *ret_value = NULL;
+ char * verb = NULL;
+ size_t verblen = 0;
+ char * vrsn = NULL;
+ size_t vrsnlen = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
+#endif
+
+ if (_resource == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "resource string cannot be null.");
+
+ /* populate valid NULLs with defaults */
+ if (_verb == NULL)
+ _verb = "GET";
+ if (_http_version == NULL)
+ _http_version = "HTTP/1.1";
+
+ /* malloc space for and prepare structure */
+ request = (hrb_t *)H5MM_malloc(sizeof(hrb_t));
+ if (request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for request structure");
+ request->magic = S3COMMS_HRB_MAGIC;
+ request->body = NULL;
+ request->body_len = 0;
+ request->first_header = NULL;
+
+ /* malloc and copy strings for the structure */
+ reslen = HDstrlen(_resource);
+
+ if (_resource[0] == '/') {
+ res = (char *)H5MM_malloc(sizeof(char) * (reslen + 1));
+ if (res == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
+ HDmemcpy(res, _resource, (reslen + 1));
+ }
+ else {
+ res = (char *)H5MM_malloc(sizeof(char) * (reslen + 2));
+ if (res == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
+ *res = '/';
+ HDmemcpy((&res[1]), _resource, (reslen + 1));
+ HDassert((reslen + 1) == HDstrlen(res));
+ } /* end if (else resource string not starting with '/') */
+
+ verblen = HDstrlen(_verb) + 1;
+ verb = (char *)H5MM_malloc(sizeof(char) * verblen);
+ if (verb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for verb string");
+ HDstrncpy(verb, _verb, verblen);
+
+ vrsnlen = HDstrlen(_http_version) + 1;
+ vrsn = (char *)H5MM_malloc(sizeof(char) * vrsnlen);
+ if (vrsn == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for http-version string");
+ HDstrncpy(vrsn, _http_version, vrsnlen);
+
+ /* place new copies into structure */
+ request->resource = res;
+ request->verb = verb;
+ request->version = vrsn;
+
+ ret_value = request;
+
+done:
+ /* if there is an error, clean up after ourselves */
+ if (ret_value == NULL) {
+ if (request != NULL)
+ H5MM_xfree(request);
+ if (vrsn != NULL)
+ H5MM_xfree(vrsn);
+ if (verb != NULL)
+ H5MM_xfree(verb);
+ if (res != NULL)
+ H5MM_xfree(res);
+ }
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_s3comms_hrb_init_request() */
+
+/****************************************************************************
+ * S3R FUNCTIONS
+ ****************************************************************************/
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_s3r_close()
+ *
+ * Purpose:
+ *
+ * Close communications through given S3 Request Handle (`s3r_t`)
+ * and clean up associated resources.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - fails if handle is null or has invalid magic number
+ *
+ *
+ * Programmer: Jacob Smith
+ * 2017-08-31
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_s3r_close(s3r_t *handle)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
+#endif
+
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if (handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
+
+ curl_easy_cleanup(handle->curlhandle);
+
+ H5MM_xfree(handle->secret_id);
+ H5MM_xfree(handle->region);
+ H5MM_xfree(handle->signing_key);
+
+ HDassert(handle->httpverb != NULL);
+ H5MM_xfree(handle->httpverb);
+
+ if (FAIL == H5FD_s3comms_free_purl(handle->purl))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to release parsed url structure")
+
+ H5MM_xfree(handle);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_s3comms_s3r_close */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_s3r_get_filesize()
+ *
+ * Purpose:
+ *
+ * Retrieve the filesize of an open request handle.
+ *
+ * Wrapper "getter" to hide implementation details.
+ *
+ *
+ * Return:
+ *
+ * - SUCCESS: size of file, in bytes, if handle is valid.
+ * - FAILURE: 0, if handle is NULL or undefined.
+ *
+ * Programmer: Jacob Smith 2017-01-14
+ *
+ *----------------------------------------------------------------------------
+ */
+size_t
+H5FD_s3comms_s3r_get_filesize(s3r_t *handle)
+{
+ size_t ret_value = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ if (handle != NULL)
+ ret_value = handle->filesize;
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_s3comms_s3r_get_filesize */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_s3r_getsize()
+ *
+ * Purpose:
+ *
+ * Get the number of bytes of handle's target resource.
+ *
+ * Sets handle and curlhandle with to enact an HTTP HEAD request on file,
+ * and parses received headers to extract "Content-Length" from response
+ * headers, storing file size at `handle->filesize`.
+ *
+ * Critical step in opening (initiating) an `s3r_t` handle.
+ *
+ * Wraps `s3r_read()`.
+ * Sets curlhandle to write headers to a temporary buffer (using extant
+ * write callback) and provides no buffer for body.
+ *
+ * Upon exit, unsets HTTP HEAD settings from curl handle, returning to
+ * initial state. In event of error, curl handle state is undefined and is
+ * not to be trusted.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-08-23
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_s3r_getsize(s3r_t *handle)
+{
+ uintmax_t content_length = 0;
+ CURL * curlh = NULL;
+ char * end = NULL;
+ char * headerresponse = NULL;
+ struct s3r_datastruct sds = {S3COMMS_CALLBACK_DATASTRUCT_MAGIC, NULL, 0};
+ char * start = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
+#endif
+
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if (handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
+ if (handle->curlhandle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
+
+ /********************
+ * PREPARE FOR HEAD *
+ ********************/
+
+ curlh = handle->curlhandle;
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, &sds))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
+
+ HDassert(handle->httpverb == NULL);
+ handle->httpverb = (char *)H5MM_malloc(sizeof(char) * 16);
+ if (handle->httpverb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for S3 request HTTP verb");
+ HDmemcpy(handle->httpverb, "HEAD", 5);
+
+ headerresponse = (char *)H5MM_malloc(sizeof(char) * CURL_MAX_HTTP_HEADER);
+ if (headerresponse == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for curl header response");
+ sds.data = headerresponse;
+
+ /*******************
+ * PERFORM REQUEST *
+ *******************/
+
+ /* these parameters fetch the entire file,
+ * but, with a NULL destination and NOBODY and HEADERDATA supplied above,
+ * only http metadata will be sent by server and recorded by s3comms
+ */
+ if (FAIL == H5FD_s3comms_s3r_read(handle, 0, 0, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem in reading during getsize.");
+
+ if (sds.size > CURL_MAX_HTTP_HEADER)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun")
+ else if (sds.size == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata")
+#if S3COMMS_DEBUG
+ else
+ HDfprintf(stderr, "GETSIZE: OK\n");
+#endif
+
+ /******************
+ * PARSE RESPONSE *
+ ******************/
+
+ start = HDstrstr(headerresponse, "\r\nContent-Length: ");
+ if (start == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find \"Content-Length\" in response.");
+
+ /* move "start" to beginning of value in line; find end of line */
+ start = start + HDstrlen("\r\nContent-Length: ");
+ end = HDstrstr(start, "\r\n");
+ if (end == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find end of content length line");
+
+ /* place null terminator at end of numbers
+ */
+ *end = '\0';
+
+ content_length = HDstrtoumax((const char *)start, NULL, 0);
+ if (UINTMAX_MAX > SIZE_MAX && content_length > SIZE_MAX)
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "content_length overflows size_t");
+
+ if (content_length == 0 || errno == ERANGE) /* errno set by HDstrtoumax*/
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "could not convert found \"Content-Length\" response (\"%s\")",
+ start); /* range is null-terminated, remember */
+
+ handle->filesize = (size_t)content_length;
+
+ /**********************
+ * UNDO HEAD SETTINGS *
+ **********************/
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
+
+done:
+ H5MM_xfree(headerresponse);
+ sds.magic += 1; /* set to bad magic */
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5FD_s3comms_s3r_getsize */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_s3r_open()
+ *
+ * Purpose:
+ *
+ * Logically 'open' a file hosted on S3.
+ *
+ * - create new Request Handle
+ * - copy supplied url
+ * - copy authentication info if supplied
+ * - create CURL handle
+ * - fetch size of file
+ * - connect with server and execute HEAD request
+ * - return request handle ready for reads
+ *
+ * To use 'default' port to connect, `port` should be 0.
+ *
+ * To prevent AWS4 authentication, pass null pointer to `region`, `id`,
+ * and `signing_key`.
+ *
+ * Uses `H5FD_s3comms_parse_url()` to validate and parse url input.
+ *
+ * Return:
+ *
+ * - SUCCESS: Pointer to new request handle.
+ * - FAILURE: NULL
+ * - occurs if:
+ * - authentication strings are inconsistent
+ * - must _all_ be null, or have at least `region` and `id`
+ * - url is NULL (no filename)
+ * - unable to parse url (malformed?)
+ * - error while performing `getsize()`
+ *
+ * Programmer: Jacob Smith
+ * 2017-09-01
+ *
+ *----------------------------------------------------------------------------
+ */
+s3r_t *
+H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const unsigned char *signing_key)
+{
+ size_t tmplen = 0;
+ CURL * curlh = NULL;
+ s3r_t * handle = NULL;
+ parsed_url_t *purl = NULL;
+ s3r_t * ret_value = NULL;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
+#endif
+
+ if (url == NULL || url[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "url cannot be null.");
+
+ if (FAIL == H5FD_s3comms_parse_url(url, &purl))
+ /* probably a malformed url, but could be internal error */
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, "unable to create parsed url structure");
+
+ HDassert(purl != NULL); /* if above passes, this must be true */
+ HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+
+ handle = (s3r_t *)H5MM_malloc(sizeof(s3r_t));
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle.");
+
+ handle->magic = S3COMMS_S3R_MAGIC;
+ handle->purl = purl;
+ handle->filesize = 0;
+ handle->region = NULL;
+ handle->secret_id = NULL;
+ handle->signing_key = NULL;
+ handle->httpverb = NULL;
+
+ /*************************************
+ * RECORD AUTHENTICATION INFORMATION *
+ *************************************/
+
+ if ((region != NULL && *region != '\0') || (id != NULL && *id != '\0') || (signing_key != NULL)) {
+
+ /* if one exists, all three must exist */
+ if (region == NULL || region[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "region cannot be null.");
+ if (id == NULL || id[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "secret id cannot be null.");
+ if (signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "signing key cannot be null.");
+
+ /* copy strings */
+ tmplen = HDstrlen(region) + 1;
+ handle->region = (char *)H5MM_malloc(sizeof(char) * tmplen);
+ if (handle->region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle region copy.");
+ HDmemcpy(handle->region, region, tmplen);
+
+ tmplen = HDstrlen(id) + 1;
+ handle->secret_id = (char *)H5MM_malloc(sizeof(char) * tmplen);
+ if (handle->secret_id == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle ID copy.");
+ HDmemcpy(handle->secret_id, id, tmplen);
+
+ tmplen = SHA256_DIGEST_LENGTH;
+ handle->signing_key = (unsigned char *)H5MM_malloc(sizeof(unsigned char) * tmplen);
+ if (handle->signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle key copy.");
+ HDmemcpy(handle->signing_key, signing_key, tmplen);
+ } /* if authentication information provided */
+
+ /************************
+ * INITIATE CURL HANDLE *
+ ************************/
+
+ curlh = curl_easy_init();
+ if (curlh == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem creating curl easy handle!");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPGET, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTPGET).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTP_VERSION).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_FAILONERROR, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_FAILONERROR).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEFUNCTION, curlwritecallback))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_WRITEFUNCTION).");
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_URL, url))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_URL).");
+
+#if S3COMMS_CURL_VERBOSITY > 1
+ /* CURL will print (to stdout) information for each operation
+ */
+ curl_easy_setopt(curlh, CURLOPT_VERBOSE, 1L);
+#endif
+
+ handle->curlhandle = curlh;
+
+ /*******************
+ * OPEN CONNECTION *
+ * * * * * * * * * *
+ * GET FILE SIZE *
+ *******************/
+
+ if (FAIL == H5FD_s3comms_s3r_getsize(handle))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem in H5FD_s3comms_s3r_getsize.");
+
+ /*********************
+ * FINAL PREPARATION *
+ *********************/
+
+ HDassert(handle->httpverb != NULL);
+ HDmemcpy(handle->httpverb, "GET", 4);
+
+ ret_value = handle;
+
+done:
+ if (ret_value == NULL) {
+ if (curlh != NULL)
+ curl_easy_cleanup(curlh);
+ if (FAIL == H5FD_s3comms_free_purl(purl))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to free parsed url structure")
+ if (handle != NULL) {
+ H5MM_xfree(handle->region);
+ H5MM_xfree(handle->secret_id);
+ H5MM_xfree(handle->signing_key);
+ if (handle->httpverb != NULL)
+ H5MM_xfree(handle->httpverb);
+ H5MM_xfree(handle);
+ }
+ }
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_s3comms_s3r_open */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_s3r_read()
+ *
+ * Purpose:
+ *
+ * Read file pointed to by request handle, writing specified
+ * `offset` .. `offset + len` bytes to buffer `dest`.
+ *
+ * If `len` is 0, reads entirety of file starting at `offset`.
+ * If `offset` and `len` are both 0, reads entire file.
+ *
+ * If `offset` or `offset+len` is greater than the file size, read is
+ * aborted and returns `FAIL`.
+ *
+ * Uses configured "curl easy handle" to perform request.
+ *
+ * In event of error, buffer should remain unaltered.
+ *
+ * If handle is set to authorize a request, creates a new (temporary)
+ * HTTP Request object (hrb_t) for generating requisite headers,
+ * which is then translated to a `curl slist` and set in the curl handle
+ * for the request.
+ *
+ * `dest` _may_ be NULL, but no body data will be recorded.
+ *
+ * - In general practice, NULL should never be passed in as `dest`.
+ * - NULL `dest` passed in by internal function `s3r_getsize()`, in
+ * conjunction with CURLOPT_NOBODY to preempt transmission of file data
+ * from server.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-08-22
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
+{
+ CURL * curlh = NULL;
+ CURLcode p_status = CURLE_OK;
+ struct curl_slist *curlheaders = NULL;
+ hrb_node_t * headers = NULL;
+ hrb_node_t * node = NULL;
+ struct tm * now = NULL;
+ char * rangebytesstr = NULL;
+ hrb_t * request = NULL;
+ int ret = 0; /* working variable to check */
+ /* return value of HDsnprintf */
+ struct s3r_datastruct *sds = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_s3r_read.\n");
+#endif
+
+ /**************************************
+ * ABSOLUTELY NECESSARY SANITY-CHECKS *
+ **************************************/
+
+ if (handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if (handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
+ if (handle->curlhandle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
+ if (handle->purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url.")
+ HDassert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ if (offset > handle->filesize || (len + offset) > handle->filesize)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF")
+
+ curlh = handle->curlhandle;
+
+ /*********************
+ * PREPARE WRITEDATA *
+ *********************/
+
+ if (dest != NULL) {
+ sds = (struct s3r_datastruct *)H5MM_malloc(sizeof(struct s3r_datastruct));
+ if (sds == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc destination datastructure.");
+
+ sds->magic = S3COMMS_CALLBACK_DATASTRUCT_MAGIC;
+ sds->data = (char *)dest;
+ sds->size = 0;
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEDATA, sds))
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL,
+ "error while setting CURL option (CURLOPT_WRITEDATA).");
+ }
+
+ /*********************
+ * FORMAT HTTP RANGE *
+ *********************/
+
+ if (len > 0) {
+ rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1));
+ if (rangebytesstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
+ ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE),
+ "bytes=" H5_PRINTF_HADDR_FMT "-" H5_PRINTF_HADDR_FMT, offset, offset + len - 1);
+ if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
+ }
+ else if (offset > 0) {
+ rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1));
+ if (rangebytesstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
+ ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=" H5_PRINTF_HADDR_FMT "-",
+ offset);
+ if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
+ }
+
+ /*******************
+ * COMPILE REQUEST *
+ *******************/
+
+ if (handle->signing_key == NULL) {
+ /* Do not authenticate. */
+ if (rangebytesstr != NULL) {
+ /* Pass in range directly */
+ char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */
+
+ bytesrange_ptr = HDstrchr(rangebytesstr, '=');
+ HDassert(bytesrange_ptr != NULL);
+ bytesrange_ptr++; /* move to first char past '=' */
+ HDassert(*bytesrange_ptr != '\0');
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, bytesrange_ptr))
+ HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL,
+ "error while setting CURL option (CURLOPT_RANGE). ");
+ }
+ }
+ else {
+ /* authenticate request
+ */
+ char authorization[512 + 1];
+ /* 512 := approximate max length...
+ * 67 <len("AWS4-HMAC-SHA256 Credential=///s3/aws4_request,"
+ * "SignedHeaders=,Signature=")>
+ * + 8 <yyyyMMDD>
+ * + 64 <hex(sha256())>
+ * + 128 <max? len(secret_id)>
+ * + 20 <max? len(region)>
+ * + 128 <max? len(signed_headers)>
+ */
+ char buffer1[512 + 1]; /* -> Canonical Request -> Signature */
+ char buffer2[256 + 1]; /* -> String To Sign -> Credential */
+ char iso8601now[ISO8601_SIZE];
+ char signed_headers[48 + 1];
+ /* should be large enough for nominal listing:
+ * "host;range;x-amz-content-sha256;x-amz-date"
+ * + '\0', with "range;" possibly absent
+ */
+
+ /* zero start of strings */
+ authorization[0] = 0;
+ buffer1[0] = 0;
+ buffer2[0] = 0;
+ iso8601now[0] = 0;
+ signed_headers[0] = 0;
+
+ /**** VERIFY INFORMATION EXISTS ****/
+
+ if (handle->secret_id == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null secret_id.");
+ if (handle->signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null signing_key.");
+ if (handle->httpverb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null httpverb.");
+ if (handle->purl->host == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null host.");
+ if (handle->purl->path == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null resource.");
+
+ /**** CREATE HTTP REQUEST STRUCTURE (hrb_t) ****/
+
+ request = H5FD_s3comms_hrb_init_request((const char *)handle->httpverb,
+ (const char *)handle->purl->path, "HTTP/1.1");
+ if (request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not allocate hrb_t request.");
+ HDassert(request->magic == S3COMMS_HRB_MAGIC);
+
+ now = gmnow();
+ if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not format ISO8601 time.");
+
+ if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-date", (const char *)iso8601now))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header")
+ if (headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
+ HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+
+ if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-content-sha256", (const char *)EMPTY_SHA256))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-content-sha256 header")
+ if (headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
+ HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+
+ if (rangebytesstr != NULL) {
+ if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Range", rangebytesstr))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set range header")
+ if (headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
+ HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ }
+
+ if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Host", handle->purl->host))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set host header")
+ if (headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
+ HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+
+ request->first_header = headers;
+
+ /**** COMPUTE AUTHORIZATION ****/
+
+ /* buffer1 -> canonical request */
+ if (FAIL == H5FD_s3comms_aws_canonical_request(buffer1, 512, signed_headers, 48, request))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad canonical request");
+ /* buffer2->string-to-sign */
+ if (FAIL == H5FD_s3comms_tostringtosign(buffer2, buffer1, iso8601now, handle->region))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad string-to-sign");
+ /* buffer1 -> signature */
+ if (FAIL == H5FD_s3comms_HMAC_SHA256(handle->signing_key, SHA256_DIGEST_LENGTH, buffer2,
+ HDstrlen(buffer2), buffer1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad signature");
+
+ iso8601now[8] = 0; /* trim to yyyyMMDD */
+ ret = S3COMMS_FORMAT_CREDENTIAL(buffer2, handle->secret_id, iso8601now, handle->region, "s3");
+ if (ret == 0 || ret >= S3COMMS_MAX_CREDENTIAL_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 credential string");
+
+ ret = HDsnprintf(authorization, 512, "AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s",
+ buffer2, signed_headers, buffer1);
+ if (ret <= 0 || ret >= 512)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 authorization string");
+
+ /* append authorization header to http request buffer */
+ if (H5FD_s3comms_hrb_node_set(&headers, "Authorization", (const char *)authorization) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set Authorization header")
+ if (headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
+
+ /* update hrb's "first header" pointer */
+ request->first_header = headers;
+
+ /**** SET CURLHANDLE HTTP HEADERS FROM GENERATED DATA ****/
+
+ node = request->first_header;
+ while (node != NULL) {
+ HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+ curlheaders = curl_slist_append(curlheaders, (const char *)node->cat);
+ if (curlheaders == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not append header to curl slist.");
+ node = node->next;
+ }
+
+ /* sanity-check */
+ if (curlheaders == NULL)
+ /* above loop was probably never run */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "curlheaders was never populated.");
+
+ /* finally, set http headers in curl handle */
+ if (curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, curlheaders) != CURLE_OK)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "error while setting CURL option (CURLOPT_HTTPHEADER).");
+ } /* end if should authenticate (info provided) */
+
+ /*******************
+ * PERFORM REQUEST *
+ *******************/
+
+#if S3COMMS_CURL_VERBOSITY > 0
+ /* In event of error, print detailed information to stderr
+ * This is not the default behavior.
+ */
+ {
+ long int httpcode = 0;
+ char curlerrbuf[CURL_ERROR_SIZE];
+ curlerrbuf[0] = '\0';
+
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem setting error buffer")
+
+ p_status = curl_easy_perform(curlh);
+
+ if (p_status != CURLE_OK) {
+ if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code")
+ HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode);
+ HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status));
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request.");
+ }
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem unsetting error buffer")
+ } /* verbose error reporting */
+#else
+ p_status = curl_easy_perform(curlh);
+
+ if (p_status != CURLE_OK)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "curl cannot perform request")
+#endif
+
+#if S3COMMS_DEBUG
+ if (dest != NULL) {
+ HDfprintf(stderr, "len: %d\n", (int)len);
+ HDfprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
+ if (sds == NULL)
+ HDfprintf(stderr, "sds is NULL!\n");
+ else {
+ HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds);
+ HDfprintf(stderr, "sds->size: %d\n", (int)sds->size);
+ if (len > sds->size)
+ HDfprintf(stderr, "buffer overwrite\n");
+ }
+ }
+ else
+ HDfprintf(stderr, "performed on entire file\n");
+#endif
+
+done:
+ /* clean any malloc'd resources
+ */
+ if (curlheaders != NULL) {
+ curl_slist_free_all(curlheaders);
+ curlheaders = NULL;
+ }
+ if (rangebytesstr != NULL) {
+ H5MM_xfree(rangebytesstr);
+ rangebytesstr = NULL;
+ }
+ if (sds != NULL) {
+ H5MM_xfree(sds);
+ sds = NULL;
+ }
+ if (request != NULL) {
+ while (headers != NULL)
+ if (FAIL == H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header node")
+ HDassert(NULL == headers);
+ if (FAIL == H5FD_s3comms_hrb_destroy(&request))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header request structure")
+ HDassert(NULL == request);
+ }
+
+ if (curlh != NULL) {
+ /* clear any Range */
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_RANGE")
+
+ /* clear headers */
+ if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_HTTPHEADER")
+ }
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5FD_s3comms_s3r_read */
+
+/****************************************************************************
+ * MISCELLANEOUS FUNCTIONS
+ ****************************************************************************/
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: gmnow()
+ *
+ * Purpose:
+ *
+ * Get the output of `time.h`'s `gmtime()` call while minimizing setup
+ * clutter where important.
+ *
+ * Return:
+ *
+ * Pointer to resulting `struct tm`,as created by gmtime(time_t * T).
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-12
+ *
+ *----------------------------------------------------------------------------
+ */
+struct tm *
+gmnow(void)
+{
+ time_t now;
+ time_t * now_ptr = &now;
+ struct tm *ret_value = NULL;
+
+ /* Doctor assert, checks against error in time() */
+ if ((time_t)(-1) != HDtime(now_ptr))
+ ret_value = HDgmtime(now_ptr);
+
+ HDassert(ret_value != NULL);
+
+ return ret_value;
+} /* end gmnow() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_aws_canonical_request()
+ *
+ * Purpose:
+ *
+ * Compose AWS "Canonical Request" (and signed headers string)
+ * as defined in the REST API documentation.
+ *
+ * Both destination strings are null-terminated.
+ *
+ * Destination string arguments must be provided with adequate space.
+ *
+ * Canonical Request format:
+ *
+ * <HTTP VERB>"\n"
+ * <resource path>"\n"
+ * <query string>"\n"
+ * <header1>"\n" (`lowercase(name)`":"`trim(value)`)
+ * <header2>"\n"
+ * ... (headers sorted by name)
+ * <header_n>"\n"
+ * "\n"
+ * <signed headers>"\n" (`lowercase(header 1 name)`";"`header 2 name`;...)
+ * <hex-string of sha256sum of body> ("e3b0c4429...", e.g.)
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - writes canonical request to respective `...dest` strings
+ * - FAILURE: `FAIL`
+ * - one or more input argument was NULL
+ * - internal error
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-04
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, char *signed_headers_dest,
+ int _sh_size, hrb_t *http_request)
+{
+ hrb_node_t *node = NULL;
+ const char *query_params = ""; /* unused at present */
+ herr_t ret_value = SUCCEED;
+ int ret = 0;
+ size_t cr_size = (size_t)_cr_size;
+ size_t sh_size = (size_t)_sh_size;
+ size_t cr_len = 0; /* working length of canonical request str */
+ size_t sh_len = 0; /* working length of signed headers str */
+ char tmpstr[256 + 1];
+ tmpstr[256] = 0; /* terminating NULL */
+
+ /* "query params" refers to the optional element in the URL, e.g.
+ * http://bucket.aws.com/myfile.txt?max-keys=2&prefix=J
+ * ^-----------------^
+ *
+ * Not handled/implemented as of 2017-10-xx.
+ * Element introduced as empty placeholder and reminder.
+ * Further research to be done if this is ever relevant for the
+ * VFD use-cases.
+ */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
+#endif
+
+ if (http_request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hrb object cannot be null.");
+ HDassert(http_request->magic == S3COMMS_HRB_MAGIC);
+
+ if (canonical_request_dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request destination cannot be null.");
+
+ if (signed_headers_dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "signed headers destination cannot be null.");
+
+ /* HTTP verb, resource path, and query string lines */
+ cr_len = (HDstrlen(http_request->verb) + HDstrlen(http_request->resource) + HDstrlen(query_params) +
+ (size_t)3); /* three newline chars */
+ if (cr_len >= cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
+ /* TODO: compiler warning */
+ ret = HDsnprintf(canonical_request_dest, (cr_size - 1), "%s\n%s\n%s\n", http_request->verb,
+ http_request->resource, query_params);
+ if (ret < 0 || (size_t)ret >= cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to compose canonical request first line");
+
+ /* write in canonical headers, building signed headers concurrently */
+ node = http_request->first_header; /* assumed sorted */
+ while (node != NULL) {
+
+ HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+
+ ret = HDsnprintf(tmpstr, 256, "%s:%s\n", node->lowername, node->value);
+ if (ret < 0 || ret >= 256)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to concatenate HTTP header %s:%s",
+ node->lowername, node->value);
+ cr_len += HDstrlen(tmpstr);
+ if (cr_len + 1 > cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
+ HDstrcat(canonical_request_dest, tmpstr);
+
+ ret = HDsnprintf(tmpstr, 256, "%s;", node->lowername);
+ if (ret < 0 || ret >= 256)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to append semicolon to lowername %s",
+ node->lowername);
+ sh_len += HDstrlen(tmpstr);
+ if (sh_len + 1 > sh_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in signed headers");
+ HDstrcat(signed_headers_dest, tmpstr);
+
+ node = node->next;
+ } /* end while node is not NULL */
+
+ /* remove trailing ';' from signed headers sequence */
+ signed_headers_dest[HDstrlen(signed_headers_dest) - 1] = '\0';
+
+ /* append signed headers and payload hash
+ * NOTE: at present, no HTTP body is handled, per the nature of
+ * requests/range-gets
+ */
+ HDstrcat(canonical_request_dest, "\n");
+ HDstrcat(canonical_request_dest, signed_headers_dest);
+ HDstrcat(canonical_request_dest, "\n");
+ HDstrcat(canonical_request_dest, EMPTY_SHA256);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_aws_canonical_request() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_bytes_to_hex()
+ *
+ * Purpose:
+ *
+ * Produce human-readable hex string [0-9A-F] from sequence of bytes.
+ *
+ * For each byte (char), writes two-character hexadecimal representation.
+ *
+ * No null-terminator appended.
+ *
+ * Assumes `dest` is allocated to enough size (msg_len * 2).
+ *
+ * Fails if either `dest` or `msg` are null.
+ *
+ * `msg_len` message length of 0 has no effect.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - hex string written to `dest` (not null-terminated)
+ * - FAILURE: `FAIL`
+ * - `dest == NULL`
+ * - `msg == NULL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-12
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, hbool_t lowercase)
+{
+ size_t i = 0;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
+#endif
+
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hex destination cannot be null.")
+ if (msg == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null.")
+
+ for (i = 0; i < msg_len; i++) {
+ int chars_written = HDsnprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */
+ (lowercase == TRUE) ? "%02x" : "%02X", msg[i]);
+ if (chars_written != 2)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem while writing hex chars for %c", msg[i]);
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_bytes_to_hex() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_free_purl()
+ *
+ * Purpose:
+ *
+ * Release resources from a parsed_url_t pointer.
+ *
+ * If pointer is null, nothing happens.
+ *
+ * Return:
+ *
+ * `SUCCEED` (never fails)
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-01
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_free_purl(parsed_url_t *purl)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+#if S3COMMS_DEBUG
+ HDprintf("called H5FD_s3comms_free_purl.\n");
+#endif
+
+ if (purl != NULL) {
+ HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ if (purl->scheme != NULL)
+ H5MM_xfree(purl->scheme);
+ if (purl->host != NULL)
+ H5MM_xfree(purl->host);
+ if (purl->port != NULL)
+ H5MM_xfree(purl->port);
+ if (purl->path != NULL)
+ H5MM_xfree(purl->path);
+ if (purl->query != NULL)
+ H5MM_xfree(purl->query);
+ purl->magic += 1ul;
+ H5MM_xfree(purl);
+ }
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5FD_s3comms_free_purl() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_HMAC_SHA256()
+ *
+ * Purpose:
+ *
+ * Generate Hash-based Message Authentication Checksum using the SHA-256
+ * hashing algorithm.
+ *
+ * Given a key, message, and respective lengths (to accommodate null
+ * characters in either), generate _hex string_ of authentication checksum
+ * and write to `dest`.
+ *
+ * `dest` must be at least `SHA256_DIGEST_LENGTH * 2` characters in size.
+ * Not enforceable by this function.
+ * `dest` will _not_ be null-terminated by this function.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - hex string written to `dest` (not null-terminated)
+ * - FAILURE: `FAIL`
+ * - `dest == NULL`
+ * - error while generating hex string output
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-??
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *msg, size_t msg_len,
+ char *dest)
+{
+ unsigned char md[SHA256_DIGEST_LENGTH];
+ unsigned int md_len = SHA256_DIGEST_LENGTH;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
+#endif
+
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.");
+
+ HMAC(EVP_sha256(), key, (int)key_len, (const unsigned char *)msg, msg_len, md, &md_len);
+
+ if (H5FD_s3comms_bytes_to_hex(dest, (const unsigned char *)md, (size_t)md_len, TRUE) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not convert to hex string.");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5FD_s3comms_HMAC_SHA256 */
+
+/*-----------------------------------------------------------------------------
+ *
+ * Function: H5FD__s3comms_load_aws_creds_from_file()
+ *
+ * Purpose:
+ *
+ * Extract AWS configuration information from a target file.
+ *
+ * Given a file and a profile name, e.g. "ros3_vfd_test", attempt to locate
+ * that region in the file. If not found, returns in error and output
+ * pointers are not modified.
+ *
+ * If the profile label is found, attempts to locate and parse configuration
+ * data, stopping at the first line where:
+ * + reached end of file
+ * + line does not start with a recognized setting name
+ *
+ * Following AWS documentation, looks for any of:
+ * + aws_access_key_id
+ * + aws_secret_access_key
+ * + region
+ *
+ * To be valid, the setting must begin the line with one of the keywords,
+ * followed immediately by an equals sign '=', and have some data before
+ * newline at end of line.
+ * + `spam=eggs` would be INVALID because name is unrecognized
+ * + `region = us-east-2` would be INVALID because of spaces
+ * + `region=` would be INVALID because no data.
+ *
+ * Upon successful parsing of a setting line, will store the result in the
+ * corresponding output pointer. If the output pointer is NULL, will skip
+ * any matching setting line while parsing -- useful to prevent overwrite
+ * when reading from multiple files.
+ *
+ * Return:
+ *
+ * + SUCCESS: `SUCCEED`
+ * + no error. settings may or may not have been loaded.
+ * + FAILURE: `FAIL`
+ * + internal error occurred.
+ * + -1 :: unable to format profile label
+ * + -2 :: profile name/label not found in file
+ * + -3 :: some other error
+ *
+ * Programmer: Jacob Smith
+ * 2018-02-27
+ *
+ *-----------------------------------------------------------------------------
+ */
+static herr_t
+H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, char *key_id, char *access_key,
+ char *aws_region)
+{
+ char profile_line[32];
+ char buffer[128];
+ const char *setting_names[] = {
+ "region",
+ "aws_access_key_id",
+ "aws_secret_access_key",
+ };
+ char *const setting_pointers[] = {
+ aws_region,
+ key_id,
+ access_key,
+ };
+ unsigned setting_count = 3;
+ herr_t ret_value = SUCCEED;
+ unsigned buffer_i = 0;
+ unsigned setting_i = 0;
+ int found_setting = 0;
+ char * line_buffer = &(buffer[0]);
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called load_aws_creds_from_file.\n");
+#endif
+
+ /* format target line for start of profile */
+ if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name))
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label")
+
+ /* look for start of profile */
+ do {
+ /* clear buffer */
+ for (buffer_i = 0; buffer_i < 128; buffer_i++)
+ buffer[buffer_i] = 0;
+
+ line_buffer = fgets(line_buffer, 128, file);
+ if (line_buffer == NULL) /* reached end of file */
+ goto done;
+ } while (HDstrncmp(line_buffer, profile_line, HDstrlen(profile_line)));
+
+ /* extract credentials from lines */
+ do {
+ /* clear buffer */
+ for (buffer_i = 0; buffer_i < 128; buffer_i++)
+ buffer[buffer_i] = 0;
+
+ /* collect a line from file */
+ line_buffer = fgets(line_buffer, 128, file);
+ if (line_buffer == NULL)
+ goto done; /* end of file */
+
+ /* loop over names to see if line looks like assignment */
+ for (setting_i = 0; setting_i < setting_count; setting_i++) {
+ size_t setting_name_len = 0;
+ const char *setting_name = NULL;
+ char line_prefix[128];
+
+ setting_name = setting_names[setting_i];
+ setting_name_len = HDstrlen(setting_name);
+ if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix")
+
+ /* found a matching name? */
+ if (!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) {
+ found_setting = 1;
+
+ /* skip NULL destination buffer */
+ if (setting_pointers[setting_i] == NULL)
+ break;
+
+ /* advance to end of name in string */
+ do {
+ line_buffer++;
+ } while (*line_buffer != 0 && *line_buffer != '=');
+
+ if (*line_buffer == 0 || *(line_buffer + 1) == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incomplete assignment in file")
+ line_buffer++; /* was pointing at '='; advance */
+
+ /* copy line buffer into out pointer */
+ HDstrncpy(setting_pointers[setting_i], (const char *)line_buffer, HDstrlen(line_buffer));
+
+ /* "trim" tailing whitespace by replacing with null terminator*/
+ buffer_i = 0;
+ while (!HDisspace(setting_pointers[setting_i][buffer_i]))
+ buffer_i++;
+ setting_pointers[setting_i][buffer_i] = '\0';
+
+ break; /* have read setting; don't compare with others */
+ } /* end if possible name match */
+ } /* end for each setting name */
+ } while (found_setting);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD__s3comms_load_aws_creds_from_file() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_load_aws_profile()
+ *
+ * Purpose :
+ *
+ * Read aws profile elements from standard location on system and store
+ * settings in memory.
+ *
+ * Looks for both `~/.aws/config` and `~/.aws/credentials`, the standard
+ * files for AWS tools. If a file exists (can be opened), looks for the
+ * given profile name and reads the settings into the relevant buffer.
+ *
+ * Any setting duplicated in both files will be set to that from
+ * `credentials`.
+ *
+ * Settings are stored in the supplied buffers as null-terminated strings.
+ *
+ * Return:
+ *
+ * + SUCCESS: `SUCCEED` (0)
+ * + no error occurred and all settings were populated
+ * + FAILURE: `FAIL` (-1)
+ * + internal error occurred
+ * + unable to locate profile
+ * + region, key id, and secret key were not all found and set
+ *
+ * Programmer: Jacob Smith
+ * 2018-02-27
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *secret_access_key_out,
+ char *aws_region_out)
+{
+ herr_t ret_value = SUCCEED;
+ FILE * credfile = NULL;
+ char awspath[117];
+ char filepath[128];
+ int ret = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n");
+#endif
+
+#ifdef H5_HAVE_WIN32_API
+ ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("USERPROFILE"));
+#else
+ ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("HOME"));
+#endif
+ if (ret < 0 || (size_t)ret >= 117)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path")
+ ret = HDsnprintf(filepath, 128, "%s%s", awspath, "credentials");
+ if (ret < 0 || (size_t)ret >= 128)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path")
+
+ credfile = HDfopen(filepath, "r");
+ if (credfile != NULL) {
+ if (H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, key_id_out, secret_access_key_out,
+ aws_region_out) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws credentials")
+ if (HDfclose(credfile) == EOF)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close credentials file")
+ credfile = NULL;
+ } /* end if credential file opened */
+
+ ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config");
+ if (ret < 0 || (size_t)ret >= 128)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path")
+ credfile = HDfopen(filepath, "r");
+ if (credfile != NULL) {
+ if (H5FD__s3comms_load_aws_creds_from_file(
+ credfile, profile_name, (*key_id_out == 0) ? key_id_out : NULL,
+ (*secret_access_key_out == 0) ? secret_access_key_out : NULL,
+ (*aws_region_out == 0) ? aws_region_out : NULL) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws config")
+ if (HDfclose(credfile) == EOF)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close config file")
+ credfile = NULL;
+ } /* end if credential file opened */
+
+ /* fail if not all three settings were loaded */
+ if (*key_id_out == 0 || *secret_access_key_out == 0 || *aws_region_out == 0)
+ ret_value = FAIL;
+
+done:
+ if (credfile != NULL)
+ if (HDfclose(credfile) == EOF)
+ HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL, "problem error-closing aws configuration file")
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_load_aws_profile() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_nlowercase()
+ *
+ * Purpose:
+ *
+ * From string starting at `s`, write `len` characters to `dest`,
+ * converting all to lowercase.
+ *
+ * Behavior is undefined if `s` is NULL or `len` overruns the allocated
+ * space of either `s` or `dest`.
+ *
+ * Provided as convenience.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - upon completion, `dest` is populated
+ * - FAILURE: `FAIL`
+ * - `dest == NULL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-09-18
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
+#endif
+
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.");
+
+ if (len > 0) {
+ HDmemcpy(dest, s, len);
+ do {
+ len--;
+ dest[len] = (char)HDtolower((int)dest[len]);
+ } while (len > 0);
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_nlowercase() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_parse_url()
+ *
+ * Purpose:
+ *
+ * Parse URL-like string and stuff URL components into
+ * `parsed_url` structure, if possible.
+ *
+ * Expects null-terminated string of format:
+ * SCHEME "://" HOST [":" PORT ] ["/" [ PATH ] ] ["?" QUERY]
+ * where SCHEME :: "[a-zA-Z/.-]+"
+ * PORT :: "[0-9]"
+ *
+ * Stores resulting structure in argument pointer `purl`, if successful,
+ * creating and populating new `parsed_url_t` structure pointer.
+ * Empty or absent elements are NULL in new purl structure.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - `purl` pointer is populated
+ * - FAILURE: `FAIL`
+ * - unable to parse
+ * - `purl` is unaltered (probably NULL)
+ *
+ * Programmer: Jacob Smith
+ * 2017-10-30
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
+{
+ parsed_url_t *purl = NULL; /* pointer to new structure */
+ const char * tmpstr = NULL; /* working pointer in string */
+ const char * curstr = str; /* "start" pointer in string */
+ long int len = 0; /* substring length */
+ long int urllen = 0; /* length of passed-in url string */
+ unsigned int i = 0;
+ herr_t ret_value = FAIL;
+
+ FUNC_ENTER_NOAPI_NOINIT;
+
+#if S3COMMS_DEBUG
+ HDprintf("called H5FD_s3comms_parse_url.\n");
+#endif
+
+ if (str == NULL || *str == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid url string");
+
+ urllen = (long int)HDstrlen(str);
+
+ purl = (parsed_url_t *)H5MM_malloc(sizeof(parsed_url_t));
+ if (purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for parsed_url_t");
+ purl->magic = S3COMMS_PARSED_URL_MAGIC;
+ purl->scheme = NULL;
+ purl->host = NULL;
+ purl->port = NULL;
+ purl->path = NULL;
+ purl->query = NULL;
+
+ /***************
+ * READ SCHEME *
+ ***************/
+
+ tmpstr = HDstrchr(curstr, ':');
+ if (tmpstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL");
+ len = tmpstr - curstr;
+ HDassert((0 <= len) && (len < urllen));
+
+ /* check for restrictions */
+ for (i = 0; i < len; i++) {
+ /* scheme = [a-zA-Z+-.]+ (terminated by ":") */
+ if (!HDisalpha(curstr[i]) && '+' != curstr[i] && '-' != curstr[i] && '.' != curstr[i])
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction");
+ }
+
+ /* copy lowercased scheme to structure */
+ purl->scheme = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
+ if (purl->scheme == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for SCHEME");
+ HDstrncpy(purl->scheme, curstr, (size_t)len);
+ purl->scheme[len] = '\0';
+ for (i = 0; i < len; i++)
+ purl->scheme[i] = (char)HDtolower(purl->scheme[i]);
+
+ /* Skip "://" */
+ tmpstr += 3;
+ curstr = tmpstr;
+
+ /*************
+ * READ HOST *
+ *************/
+
+ if (*curstr == '[') {
+ /* IPv6 */
+ while (']' != *tmpstr) {
+ /* end of string reached! */
+ if (tmpstr == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reached end of URL: incomplete IPv6 HOST");
+ tmpstr++;
+ }
+ tmpstr++;
+ } /* end if (IPv6) */
+ else {
+ while (0 != *tmpstr) {
+ if (':' == *tmpstr || '/' == *tmpstr || '?' == *tmpstr)
+ break;
+ tmpstr++;
+ }
+ } /* end else (IPv4) */
+ len = tmpstr - curstr;
+ if (len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty")
+ else if (len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of HOST substring");
+
+ /* copy host */
+ purl->host = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
+ if (purl->host == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for HOST");
+ HDstrncpy(purl->host, curstr, (size_t)len);
+ purl->host[len] = 0;
+
+ /*************
+ * READ PORT *
+ *************/
+
+ if (':' == *tmpstr) {
+ tmpstr += 1; /* advance past ':' */
+ curstr = tmpstr;
+ while ((0 != *tmpstr) && ('/' != *tmpstr) && ('?' != *tmpstr))
+ tmpstr++;
+ len = tmpstr - curstr;
+ if (len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty")
+ else if (len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PORT substring");
+ for (i = 0; i < len; i++)
+ if (!HDisdigit(curstr[i]))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT is not a decimal string");
+
+ /* copy port */
+ purl->port = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
+ if (purl->port == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PORT");
+ HDstrncpy(purl->port, curstr, (size_t)len);
+ purl->port[len] = 0;
+ } /* end if PORT element */
+
+ /*************
+ * READ PATH *
+ *************/
+
+ if ('/' == *tmpstr) {
+ /* advance past '/' */
+ tmpstr += 1;
+ curstr = tmpstr;
+
+ /* seek end of PATH */
+ while ((0 != *tmpstr) && ('?' != *tmpstr))
+ tmpstr++;
+ len = tmpstr - curstr;
+ if (len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PATH substring");
+ if (len > 0) {
+ purl->path = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
+ if (purl->path == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH");
+ HDstrncpy(purl->path, curstr, (size_t)len);
+ purl->path[len] = 0;
+ }
+ } /* end if PATH element */
+
+ /**************
+ * READ QUERY *
+ **************/
+
+ if ('?' == *tmpstr) {
+ tmpstr += 1;
+ curstr = tmpstr;
+ while (0 != *tmpstr)
+ tmpstr++;
+ len = tmpstr - curstr;
+ if (len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty")
+ else if (len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of QUERY substring");
+ purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
+ if (purl->query == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for QUERY");
+ HDstrncpy(purl->query, curstr, (size_t)len);
+ purl->query[len] = 0;
+ } /* end if QUERY exists */
+
+ *_purl = purl;
+ ret_value = SUCCEED;
+
+done:
+ if (ret_value == FAIL)
+ H5FD_s3comms_free_purl(purl);
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_parse_url() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_percent_encode_char()
+ *
+ * Purpose:
+ *
+ * "Percent-encode" utf-8 character `c`, e.g.,
+ * '$' -> "%24"
+ * '¢' -> "%C2%A2"
+ *
+ * `c` cannot be null.
+ *
+ * Does not (currently) accept multi-byte characters...
+ * limit to (?) u+00ff, well below upper bound for two-byte utf-8 encoding
+ * (u+0080..u+07ff).
+ *
+ * Writes output to `repr`.
+ * `repr` cannot be null.
+ * Assumes adequate space i `repr`...
+ * >>> char[4] or [7] for most characters,
+ * >>> [13] as theoretical maximum.
+ *
+ * Representation `repr` is null-terminated.
+ *
+ * Stores length of representation (without null terminator) at pointer
+ * `repr_len`.
+ *
+ * Return : SUCCEED/FAIL
+ *
+ * - SUCCESS: `SUCCEED`
+ * - percent-encoded representation written to `repr`
+ * - 'repr' is null-terminated
+ * - FAILURE: `FAIL`
+ * - `c` or `repr` was NULL
+ *
+ * Programmer: Jacob Smith
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr_len)
+{
+ unsigned int i = 0;
+ int chars_written = 0;
+ herr_t ret_value = SUCCEED;
+#if S3COMMS_DEBUG
+ unsigned char s[2] = {c, 0};
+ unsigned char hex[3] = {0, 0, 0};
+#endif
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
+#endif
+
+ if (repr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.")
+
+#if S3COMMS_DEBUG
+ H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE);
+ HDfprintf(stdout, " CHAR: \'%s\'\n", s);
+ HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
+#endif
+
+ if (c <= (unsigned char)0x7f) {
+ /* character represented in a single "byte"
+ * and single percent-code
+ */
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, " SINGLE-BYTE\n");
+#endif
+ *repr_len = 3;
+ chars_written = HDsnprintf(repr, 4, "%%%02X", c);
+ if (chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
+ } /* end if single-byte unicode char */
+ else {
+ /* multi-byte, multi-percent representation
+ */
+ unsigned int acc = 0; /* byte accumulator */
+ unsigned int k = 0; /* uint character representation */
+ unsigned int stack_size = 0;
+ unsigned char stack[4] = {0, 0, 0, 0};
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, " MULTI-BYTE\n");
+#endif
+ stack_size = 0;
+ k = (unsigned int)c;
+ *repr_len = 0;
+ do {
+ /* push number onto stack in six-bit slices
+ */
+ acc = k;
+ acc >>= 6; /* cull least */
+ acc <<= 6; /* six bits */
+ stack[stack_size++] = (unsigned char)(k - acc);
+ k = acc >> 6;
+ } while (k > 0);
+
+ /* `stack` now has two to four six-bit 'numbers' to be put into
+ * UTF-8 byte fields.
+ */
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, " STACK:\n {\n");
+ for (i = 0; i < stack_size; i++) {
+ H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE);
+ hex[2] = 0;
+ HDfprintf(stdout, " %s,\n", hex);
+ }
+ HDfprintf(stdout, " }\n");
+#endif
+
+ /****************
+ * leading byte *
+ ****************/
+
+ /* prepend 11[1[1]]0 to first byte */
+ /* 110xxxxx, 1110xxxx, or 11110xxx */
+ acc = 0xC0; /* 0x11000000 */
+ acc += (stack_size > 2) ? 0x20 : 0; /* 0x00100000 */
+ acc += (stack_size > 3) ? 0x10 : 0; /* 0x00010000 */
+ stack_size--;
+ chars_written = HDsnprintf(repr, 4, "%%%02X", (unsigned char)(acc + stack[stack_size]));
+ if (chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
+ *repr_len += 3;
+
+ /************************
+ * continuation byte(s) *
+ ************************/
+
+ /* 10xxxxxx */
+ for (i = 0; i < stack_size; i++) {
+ chars_written =
+ HDsnprintf(&repr[i * 3 + 3], 4, "%%%02X", (unsigned char)(0x80 + stack[stack_size - 1 - i]));
+ if (chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
+ *repr_len += 3;
+ } /* end for each continuation byte */
+ } /* end else (multi-byte) */
+
+ *(repr + *repr_len) = '\0';
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5FD_s3comms_percent_encode_char */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_signing_key()
+ *
+ * Purpose:
+ *
+ * Create AWS4 "Signing Key" from secret key, AWS region, and timestamp.
+ *
+ * Sequentially runs HMAC_SHA256 on strings in specified order,
+ * generating re-usable checksum (according to documentation, valid for
+ * 7 days from time given).
+ *
+ * `secret` is `access key id` for targeted service/bucket/resource.
+ *
+ * `iso8601now` must conform to format, yyyyMMDD'T'hhmmss'Z'
+ * e.g. "19690720T201740Z".
+ *
+ * `region` should be one of AWS service region names, e.g. "us-east-1".
+ *
+ * Hard-coded "service" algorithm requirement to "s3".
+ *
+ * Inputs must be null-terminated strings.
+ *
+ * Writes to `md` the raw byte data, length of `SHA256_DIGEST_LENGTH`.
+ * Programmer must ensure that `md` is appropriately allocated.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - raw byte data of signing key written to `md`
+ * - FAILURE: `FAIL`
+ * - if any input arguments was NULL
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-13
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *region, const char *iso8601now)
+{
+ char * AWS4_secret = NULL;
+ size_t AWS4_secret_len = 0;
+ unsigned char datekey[SHA256_DIGEST_LENGTH];
+ unsigned char dateregionkey[SHA256_DIGEST_LENGTH];
+ unsigned char dateregionservicekey[SHA256_DIGEST_LENGTH];
+ int ret = 0; /* return value of HDsnprintf */
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n");
+#endif
+
+ if (md == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Destination `md` cannot be NULL.")
+ if (secret == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`secret` cannot be NULL.")
+ if (region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`region` cannot be NULL.")
+ if (iso8601now == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL.")
+
+ AWS4_secret_len = 4 + HDstrlen(secret) + 1;
+ AWS4_secret = (char *)H5MM_malloc(sizeof(char *) * AWS4_secret_len);
+ if (AWS4_secret == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space.")
+
+ /* prepend "AWS4" to start of the secret key */
+ ret = HDsnprintf(AWS4_secret, AWS4_secret_len, "%s%s", "AWS4", secret);
+ if ((size_t)ret != (AWS4_secret_len - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem writing AWS4+secret `%s`", secret);
+
+ /* hash_func, key, len(key), msg, len(msg), digest_dest, digest_len_dest
+ * we know digest length, so ignore via NULL
+ */
+ HMAC(EVP_sha256(), (const unsigned char *)AWS4_secret, (int)HDstrlen(AWS4_secret),
+ (const unsigned char *)iso8601now, 8, /* 8 --> length of 8 --> "yyyyMMDD" */
+ datekey, NULL);
+ HMAC(EVP_sha256(), (const unsigned char *)datekey, SHA256_DIGEST_LENGTH, (const unsigned char *)region,
+ HDstrlen(region), dateregionkey, NULL);
+ HMAC(EVP_sha256(), (const unsigned char *)dateregionkey, SHA256_DIGEST_LENGTH,
+ (const unsigned char *)"s3", 2, dateregionservicekey, NULL);
+ HMAC(EVP_sha256(), (const unsigned char *)dateregionservicekey, SHA256_DIGEST_LENGTH,
+ (const unsigned char *)"aws4_request", 12, md, NULL);
+
+done:
+ H5MM_xfree(AWS4_secret);
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5FD_s3comms_signing_key() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_tostringtosign()
+ *
+ * Purpose:
+ *
+ * Get AWS "String to Sign" from Canonical Request, timestamp,
+ * and AWS "region".
+ *
+ * Common between single request and "chunked upload",
+ * conforms to:
+ * "AWS4-HMAC-SHA256\n" +
+ * <ISO8601 date format> + "\n" + // yyyyMMDD'T'hhmmss'Z'
+ * <yyyyMMDD> + "/" + <AWS Region> + "/s3/aws4-request\n" +
+ * hex(SHA256(<CANONICAL-REQUEST>))
+ *
+ * Inputs `creq` (canonical request string), `now` (ISO8601 format),
+ * and `region` (s3 region designator string) must all be
+ * null-terminated strings.
+ *
+ * Result is written to `dest` with null-terminator.
+ * It is left to programmer to ensure `dest` has adequate space.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - "string to sign" written to `dest` and null-terminated
+ * - FAILURE: `FAIL`
+ * - if any of the inputs are NULL
+ * - if an error is encountered while computing checksum
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-??
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const char *region)
+{
+ unsigned char checksum[SHA256_DIGEST_LENGTH * 2 + 1];
+ size_t d = 0;
+ char day[9];
+ char hexsum[SHA256_DIGEST_LENGTH * 2 + 1];
+ size_t i = 0;
+ int ret = 0; /* HDsnprintf return value */
+ herr_t ret_value = SUCCEED;
+ char tmp[128];
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
+#endif
+
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer cannot be null.")
+ if (req == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request cannot be null.")
+ if (now == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Timestring cannot be NULL.")
+ if (region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Region cannot be NULL.")
+
+ for (i = 0; i < 128; i++)
+ tmp[i] = '\0';
+ for (i = 0; i < SHA256_DIGEST_LENGTH * 2 + 1; i++) {
+ checksum[i] = '\0';
+ hexsum[i] = '\0';
+ }
+ HDstrncpy(day, now, 8);
+ day[8] = '\0';
+ ret = HDsnprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region);
+ if (ret <= 0 || ret >= 127)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string")
+
+ HDmemcpy((dest + d), "AWS4-HMAC-SHA256\n", 17);
+ d = 17;
+
+ HDmemcpy((dest + d), now, HDstrlen(now));
+ d += HDstrlen(now);
+ dest[d++] = '\n';
+
+ HDmemcpy((dest + d), tmp, HDstrlen(tmp));
+ d += HDstrlen(tmp);
+ dest[d++] = '\n';
+
+ SHA256((const unsigned char *)req, HDstrlen(req), checksum);
+
+ if (H5FD_s3comms_bytes_to_hex(hexsum, (const unsigned char *)checksum, SHA256_DIGEST_LENGTH, TRUE) ==
+ FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not create hex string");
+
+ for (i = 0; i < SHA256_DIGEST_LENGTH * 2; i++)
+ dest[d++] = hexsum[i];
+
+ dest[d] = '\0';
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5ros3_tostringtosign() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_trim()
+ *
+ * Purpose:
+ *
+ * Remove all whitespace characters from start and end of a string `s`
+ * of length `s_len`, writing trimmed string copy to `dest`.
+ * Stores number of characters remaining at `n_written`.
+ *
+ * Destination for trimmed copy `dest` cannot be null.
+ * `dest` must have adequate space allocated for trimmed copy.
+ * If inadequate space, behavior is undefined, possibly resulting
+ * in segfault or overwrite of other data.
+ *
+ * If `s` is NULL or all whitespace, `dest` is untouched and `n_written`
+ * is set to 0.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - `dest == NULL`
+ *
+ * Programmer: Jacob Smith
+ * 2017-09-18
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "called H5FD_s3comms_trim.\n");
+#endif
+
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.")
+ if (s == NULL)
+ s_len = 0;
+
+ if (s_len > 0) {
+ /* Find first non-whitespace character from start;
+ * reduce total length per character.
+ */
+ while ((s_len > 0) && HDisspace((unsigned char)s[0]) && s_len > 0) {
+ s++;
+ s_len--;
+ }
+
+ /* Find first non-whitespace character from tail;
+ * reduce length per-character.
+ * If length is 0 already, there is no non-whitespace character.
+ */
+ if (s_len > 0) {
+ do {
+ s_len--;
+ } while (HDisspace((unsigned char)s[s_len]));
+ s_len++;
+
+ /* write output into dest */
+ HDmemcpy(dest, s, s_len);
+ }
+ }
+
+ *n_written = s_len;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_s3comms_trim() */
+
+/*----------------------------------------------------------------------------
+ *
+ * Function: H5FD_s3comms_uriencode()
+ *
+ * Purpose:
+ *
+ * URIencode (percent-encode) every byte except "[a-zA-Z0-9]-._~".
+ *
+ * For each character in source string `_s` from `s[0]` to `s[s_len-1]`,
+ * writes to `dest` either the raw character or its percent-encoded
+ * equivalent.
+ *
+ * See `H5FD_s3comms_bytes_to_hex` for information on percent-encoding.
+ *
+ * Space (' ') character encoded as "%20" (not "+")
+ *
+ * Forward-slash ('/') encoded as "%2F" only when `encode_slash == true`.
+ *
+ * Records number of characters written at `n_written`.
+ *
+ * Assumes that `dest` has been allocated with enough space.
+ *
+ * Neither `dest` nor `s` can be NULL.
+ *
+ * `s_len == 0` will have no effect.
+ *
+ * Return:
+ *
+ * - SUCCESS: `SUCCEED`
+ * - FAILURE: `FAIL`
+ * - source strings `s` or destination `dest` are NULL
+ * - error while attempting to percent-encode a character
+ *
+ * Programmer: Jacob Smith
+ * 2017-07-??
+ *
+ *----------------------------------------------------------------------------
+ */
+herr_t
+H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_slash, size_t *n_written)
+{
+ char c = 0;
+ size_t dest_off = 0;
+ char hex_buffer[13];
+ size_t hex_off = 0;
+ size_t hex_len = 0;
+ herr_t ret_value = SUCCEED;
+ size_t s_off = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+#if S3COMMS_DEBUG
+ HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n");
+#endif
+
+ if (s == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source string cannot be NULL");
+ if (dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be NULL");
+
+ /* Write characters to destination, converting to percent-encoded
+ * "hex-utf-8" strings if necessary.
+ * e.g., '$' -> "%24"
+ */
+ for (s_off = 0; s_off < s_len; s_off++) {
+ c = s[s_off];
+ if (HDisalnum(c) || c == '.' || c == '-' || c == '_' || c == '~' ||
+ (c == '/' && encode_slash == FALSE))
+ dest[dest_off++] = c;
+ else {
+ hex_off = 0;
+ if (H5FD_s3comms_percent_encode_char(hex_buffer, (const unsigned char)c, &hex_len) == FAIL) {
+ hex_buffer[0] = c;
+ hex_buffer[1] = 0;
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "unable to percent-encode character \'%s\' "
+ "at %d in \"%s\"",
+ hex_buffer, (int)s_off, s);
+ }
+
+ for (hex_off = 0; hex_off < hex_len; hex_off++)
+ dest[dest_off++] = hex_buffer[hex_off];
+ } /* end else (not a regular character) */
+ } /* end for each character */
+
+ if (dest_off < s_len)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer overflow");
+
+ *n_written = dest_off;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD_s3comms_uriencode */
+
+#endif /* H5_HAVE_ROS3_VFD */
diff --git a/src/H5FDs3comms.h b/src/H5FDs3comms.h
new file mode 100644
index 0000000..da6a62d
--- /dev/null
+++ b/src/H5FDs3comms.h
@@ -0,0 +1,562 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*****************************************************************************
+ * Read-Only S3 Virtual File Driver (VFD)
+ *
+ * This is the header for the S3 Communications module
+ *
+ * ***NOT A FILE DRIVER***
+ *
+ * Purpose:
+ *
+ * - Provide structures and functions related to communicating with
+ * Amazon S3 (Simple Storage Service).
+ * - Abstract away the REST API (HTTP,
+ * networked communications) behind a series of uniform function calls.
+ * - Handle AWS4 authentication, if appropriate.
+ * - Fail predictably in event of errors.
+ * - Eventually, support more S3 operations, such as creating, writing to,
+ * and removing Objects remotely.
+ *
+ * translates:
+ * `read(some_file, bytes_offset, bytes_length, &dest_buffer);`
+ * to:
+ * ```
+ * GET myfile HTTP/1.1
+ * Host: somewhere.me
+ * Range: bytes=4096-5115
+ * ```
+ * and places received bytes from HTTP response...
+ * ```
+ * HTTP/1.1 206 Partial-Content
+ * Content-Range: 4096-5115/63239
+ *
+ * <bytes>
+ * ```
+ * ...in destination buffer.
+ *
+ * TODO: put documentation in a consistent place and point to it from here.
+ *
+ * Programmer: Jacob Smith
+ * 2017-11-30
+ *
+ *****************************************************************************/
+
+#include "H5private.h" /* Generic Functions */
+
+#ifdef H5_HAVE_ROS3_VFD
+
+/* Necessary S3 headers */
+#include <curl/curl.h>
+#include <openssl/evp.h>
+#include <openssl/hmac.h>
+#include <openssl/sha.h>
+
+/*****************
+ * PUBLIC MACROS *
+ *****************/
+
+/* hexadecimal string of pre-computed sha256 checksum of the empty string
+ * hex(sha256sum(""))
+ */
+#define EMPTY_SHA256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+
+/* string length (plus null terminator)
+ * example ISO8601-format string: "20170713T145903Z" (YYYYmmdd'T'HHMMSS'_')
+ */
+#define ISO8601_SIZE 17
+
+/* string length (plus null terminator)
+ * example RFC7231-format string: "Fri, 30 Jun 2017 20:41:55 GMT"
+ */
+#define RFC7231_SIZE 30
+
+/*---------------------------------------------------------------------------
+ *
+ * Macro: ISO8601NOW()
+ *
+ * Purpose:
+ *
+ * write "YYYYmmdd'T'HHMMSS'Z'" (less single-quotes) to dest
+ * e.g., "20170630T204155Z"
+ *
+ * wrapper for strftime()
+ *
+ * It is left to the programmer to check return value of
+ * ISO8601NOW (should equal ISO8601_SIZE - 1).
+ *
+ *---------------------------------------------------------------------------
+ */
+#define ISO8601NOW(dest, now_gm) strftime((dest), ISO8601_SIZE, "%Y%m%dT%H%M%SZ", (now_gm))
+
+/*---------------------------------------------------------------------------
+ *
+ * Macro: RFC7231NOW()
+ *
+ * Purpose:
+ *
+ * write "Day, dd Mmm YYYY HH:MM:SS GMT" to dest
+ * e.g., "Fri, 30 Jun 2017 20:41:55 GMT"
+ *
+ * wrapper for strftime()
+ *
+ * It is left to the programmer to check return value of
+ * RFC7231NOW (should equal RFC7231_SIZE - 1).
+ *
+ *---------------------------------------------------------------------------
+ */
+#define RFC7231NOW(dest, now_gm) strftime((dest), RFC7231_SIZE, "%a, %d %b %Y %H:%M:%S GMT", (now_gm))
+
+/* Reasonable maximum length of a credential string.
+ * Provided for error-checking S3COMMS_FORMAT_CREDENTIAL (below).
+ * 17 <- "////aws4_request\0"
+ * 2 < "s3" (service)
+ * 8 <- "YYYYmmdd" (date)
+ * 128 <- (access_id)
+ * 155 :: sum
+ */
+#define S3COMMS_MAX_CREDENTIAL_SIZE 155
+
+/*---------------------------------------------------------------------------
+ *
+ * Macro: H5FD_S3COMMS_FORMAT_CREDENTIAL()
+ *
+ * Purpose:
+ *
+ * Format "S3 Credential" string from inputs, for AWS4.
+ *
+ * Wrapper for HDsnprintf().
+ *
+ * _HAS NO ERROR-CHECKING FACILITIES_
+ * It is left to programmer to ensure that return value confers success.
+ * e.g.,
+ * ```
+ * assert( S3COMMS_MAX_CREDENTIAL_SIZE >=
+ * S3COMMS_FORMAT_CREDENTIAL(...) );
+ * ```
+ *
+ * "<access-id>/<date>/<aws-region>/<aws-service>/aws4_request"
+ * assuming that `dest` has adequate space.
+ *
+ * ALL inputs must be null-terminated strings.
+ *
+ * `access` should be the user's access key ID.
+ * `date` must be of format "YYYYmmdd".
+ * `region` should be relevant AWS region, i.e. "us-east-1".
+ * `service` should be "s3".
+ *
+ *---------------------------------------------------------------------------
+ */
+#define S3COMMS_FORMAT_CREDENTIAL(dest, access, iso8601_date, region, service) \
+ HDsnprintf((dest), S3COMMS_MAX_CREDENTIAL_SIZE, "%s/%s/%s/%s/aws4_request", (access), (iso8601_date), \
+ (region), (service))
+
+/*********************
+ * PUBLIC STRUCTURES *
+ *********************/
+
+/*----------------------------------------------------------------------------
+ *
+ * Structure: hrb_node_t
+ *
+ * HTTP Header Field Node
+ *
+ *
+ *
+ * Maintain a ordered (linked) list of HTTP Header fields.
+ *
+ * Provides efficient access and manipulation of a logical sequence of
+ * HTTP header fields, of particular use when composing an
+ * "S3 Canonical Request" for authentication.
+ *
+ * - The creation of a Canoncial Request involves:
+ * - convert field names to lower case
+ * - sort by this lower-case name
+ * - convert ": " name-value separator in HTTP string to ":"
+ * - get sorted lowercase names without field or separator
+ *
+ * As HTTP headers allow headers in any order (excepting the case of multiple
+ * headers with the same name), the list ordering can be optimized for Canonical
+ * Request creation, suggesting alphabtical order. For more expedient insertion
+ * and removal of elements in the list, linked list seems preferable to a
+ * dynamically-expanding array. The usually-smaller number of entries (5 or
+ * fewer) makes performance overhead of traversing the list trivial.
+ *
+ * The above requirements of creating at Canonical Request suggests a reasonable
+ * trade-off of speed for space with the option to compute elements as needed
+ * or to have the various elements prepared and stored in the structure
+ * (e.g. name, value, lowername, concatenated name:value)
+ * The structure currently is implemented to pre-compute.
+ *
+ * At all times, the "first" node of the list should be the least,
+ * alphabetically. For all nodes, the `next` node should be either NULL or
+ * of greater alphabetical value.
+ *
+ * Each node contains its own header field information, plus a pointer to the
+ * next node.
+ *
+ * It is not allowed to have multiple nodes with the same _lowercase_ `name`s
+ * in the same list
+ * (i.e., name is case-insensitive for access and modification.)
+ *
+ * All data (`name`, `value`, `lowername`, and `cat`) are null-terminated
+ * strings allocated specifically for their node.
+ *
+ *
+ *
+ * `magic` (unsigned long)
+ *
+ * "unique" idenfier number for the structure type
+ *
+ * `name` (char *)
+ *
+ * Case-meaningful name of the HTTP field.
+ * Given case is how it is supplied to networking code.
+ * e.g., "Range"
+ *
+ * `lowername` (char *)
+ *
+ * Lowercase copy of name.
+ * e.g., "range"
+ *
+ * `value` (char *)
+ *
+ * Case-meaningful value of HTTP field.
+ * e.g., "bytes=0-9"
+ *
+ * `cat` (char *)
+ *
+ * Concatenated, null-terminated string of HTTP header line,
+ * as the field would appear in an HTTP request.
+ * e.g., "Range: bytes=0-9"
+ *
+ * `next` (hrb_node_t *)
+ *
+ * Pointers to next node in the list, or NULL sentinel as end of list.
+ * Next node must have a greater `lowername` as determined by strcmp().
+ *
+ *----------------------------------------------------------------------------
+ */
+typedef struct hrb_node_t {
+ unsigned long magic;
+ char * name;
+ char * value;
+ char * cat;
+ char * lowername;
+ struct hrb_node_t *next;
+} hrb_node_t;
+#define S3COMMS_HRB_NODE_MAGIC 0x7F5757UL
+
+/*----------------------------------------------------------------------------
+ *
+ * Structure: hrb_t
+ *
+ * HTTP Request Buffer structure
+ *
+ *
+ *
+ * Logically represent an HTTP request
+ *
+ * GET /myplace/myfile.h5 HTTP/1.1
+ * Host: over.rainbow.oz
+ * Date: Fri, 01 Dec 2017 12:35:04 CST
+ *
+ * <body>
+ *
+ * ...with fast, efficient access to and modification of primary and field
+ * elements.
+ *
+ * Structure for building HTTP requests while hiding much of the string
+ * processing required "under the hood."
+ *
+ * Information about the request target -- the first line -- and the body text,
+ * if any, are managed directly with this structure. All header fields, e.g.,
+ * "Host" and "Date" above, are created with a linked list of `hrb_node_t` and
+ * included in the request by a pointer to the head of the list.
+ *
+ *
+ *
+ * `magic` (unsigned long)
+ *
+ * "Magic" number confirming that this is an hrb_t structure and
+ * what operations are valid for it.
+ *
+ * Must be S3COMMS_HRB_MAGIC to be valid.
+ *
+ * `body` (char *) :
+ *
+ * Pointer to start of HTTP body.
+ *
+ * Can be NULL, in which case it is treated as the empty string, "".
+ *
+ * `body_len` (size_t) :
+ *
+ * Number of bytes (characters) in `body`. 0 if empty or NULL `body`.
+ *
+ * `first_header` (hrb_node_t *) :
+ *
+ * Pointer to first SORTED header node, if any.
+ * It is left to the programmer to ensure that this node and associated
+ * list is destroyed when done.
+ *
+ * `resource` (char *) :
+ *
+ * Pointer to resource URL string, e.g., "/folder/page.xhtml".
+ *
+ * `verb` (char *) :
+ *
+ * Pointer to HTTP verb string, e.g., "GET".
+ *
+ * `version` (char *) :
+ *
+ * Pointer to HTTP version string, e.g., "HTTP/1.1".
+ *
+ *----------------------------------------------------------------------------
+ */
+typedef struct {
+ unsigned long magic;
+ char * body;
+ size_t body_len;
+ hrb_node_t * first_header;
+ char * resource;
+ char * verb;
+ char * version;
+} hrb_t;
+#define S3COMMS_HRB_MAGIC 0x6DCC84UL
+
+/*----------------------------------------------------------------------------
+ *
+ * Structure: parsed_url_t
+ *
+ *
+ * Represent a URL with easily-accessed pointers to logical elements within.
+ * These elements (components) are stored as null-terminated strings (or just
+ * NULLs). These components should be allocated for the structure, making the
+ * data as safe as possible from modification. If a component is NULL, it is
+ * either implicit in or absent from the URL.
+ *
+ * "http://mybucket.s3.amazonaws.com:8080/somefile.h5?param=value&arg=value"
+ * ^--^ ^-----------------------^ ^--^ ^---------^ ^-------------------^
+ * Scheme Host Port Resource Query/-ies
+ *
+ *
+ *
+ * `magic` (unsigned long)
+ *
+ * Structure identification and validation identifier.
+ * Identifies as `parsed_url_t` type.
+ *
+ * `scheme` (char *)
+ *
+ * String representing which protocol is to be expected.
+ * _Must_ be present.
+ * "http", "https", "ftp", e.g.
+ *
+ * `host` (char *)
+ *
+ * String of host, either domain name, IPv4, or IPv6 format.
+ * _Must_ be present.
+ * "over.rainbow.oz", "192.168.0.1", "[0000:0000:0000:0001]"
+ *
+ * `port` (char *)
+ *
+ * String representation of specified port. Must resolve to a valid unsigned
+ * integer.
+ * "9000", "80"
+ *
+ * `path` (char *)
+ *
+ * Path to resource on host. If not specified, assumes root "/".
+ * "lollipop_guild.wav", "characters/witches/white.dat"
+ *
+ * `query` (char *)
+ *
+ * Single string of all query parameters in url (if any).
+ * "arg1=value1&arg2=value2"
+ *
+ *----------------------------------------------------------------------------
+ */
+typedef struct {
+ unsigned long magic;
+ char * scheme; /* required */
+ char * host; /* required */
+ char * port;
+ char * path;
+ char * query;
+} parsed_url_t;
+#define S3COMMS_PARSED_URL_MAGIC 0x21D0DFUL
+
+/*----------------------------------------------------------------------------
+ *
+ * Structure: s3r_t
+ *
+ *
+ *
+ * S3 request structure "handle".
+ *
+ * Holds persistent information for Amazon S3 requests.
+ *
+ * Instantiated through `H5FD_s3comms_s3r_open()`, copies data into self.
+ *
+ * Intended to be re-used for operations on a remote object.
+ *
+ * Cleaned up through `H5FD_s3comms_s3r_close()`.
+ *
+ * _DO NOT_ share handle between threads: curl easy handle `curlhandle` has
+ * undefined behavior if called to perform in multiple threads.
+ *
+ *
+ *
+ * `magic` (unsigned long)
+ *
+ * "magic" number identifying this structure as unique type.
+ * MUST equal `S3R_MAGIC` to be valid.
+ *
+ * `curlhandle` (CURL)
+ *
+ * Pointer to the curl_easy handle generated for the request.
+ *
+ * `httpverb` (char *)
+ *
+ * Pointer to NULL-terminated string. HTTP verb,
+ * e.g. "GET", "HEAD", "PUT", etc.
+ *
+ * Default is NULL, resulting in a "GET" request.
+ *
+ * `purl` (parsed_url_t *)
+ *
+ * Pointer to structure holding the elements of URL for file open.
+ *
+ * e.g., "http://bucket.aws.com:8080/myfile.dat?q1=v1&q2=v2"
+ * parsed into...
+ * { scheme: "http"
+ * host: "bucket.aws.com"
+ * port: "8080"
+ * path: "myfile.dat"
+ * query: "q1=v1&q2=v2"
+ * }
+ *
+ * Cannot be NULL.
+ *
+ * `region` (char *)
+ *
+ * Pointer to NULL-terminated string, specifying S3 "region",
+ * e.g., "us-east-1".
+ *
+ * Required to authenticate.
+ *
+ * `secret_id` (char *)
+ *
+ * Pointer to NULL-terminated string for "secret" access id to S3 resource.
+ *
+ * Requred to authenticate.
+ *
+ * `signing_key` (unsigned char *)
+ *
+ * Pointer to `SHA256_DIGEST_LENGTH`-long string for "re-usable" signing
+ * key, generated via
+ * `HMAC-SHA256(HMAC-SHA256(HMAC-SHA256(HMAC-SHA256("AWS4<secret_key>",
+ * "<yyyyMMDD"), "<aws-region>"), "<aws-service>"), "aws4_request")`
+ * which may be re-used for several (up to seven (7)) days from creation?
+ * Computed once upon file open.
+ *
+ * Requred to authenticate.
+ *
+ *----------------------------------------------------------------------------
+ */
+typedef struct {
+ unsigned long magic;
+ CURL * curlhandle;
+ size_t filesize;
+ char * httpverb;
+ parsed_url_t * purl;
+ char * region;
+ char * secret_id;
+ unsigned char *signing_key;
+} s3r_t;
+
+#define S3COMMS_S3R_MAGIC 0x44d8d79
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************
+ * DECLARATION OF HTTP FIELD LIST ROUTINES *
+ *******************************************/
+
+H5_DLL herr_t H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value);
+
+/***********************************************
+ * DECLARATION OF HTTP REQUEST BUFFER ROUTINES *
+ ***********************************************/
+
+H5_DLL herr_t H5FD_s3comms_hrb_destroy(hrb_t **buf);
+
+H5_DLL hrb_t *H5FD_s3comms_hrb_init_request(const char *verb, const char *resource, const char *host);
+
+/*************************************
+ * DECLARATION OF S3REQUEST ROUTINES *
+ *************************************/
+
+H5_DLL herr_t H5FD_s3comms_s3r_close(s3r_t *handle);
+
+H5_DLL size_t H5FD_s3comms_s3r_get_filesize(s3r_t *handle);
+
+H5_DLL s3r_t *H5FD_s3comms_s3r_open(const char url[], const char region[], const char id[],
+ const unsigned char signing_key[]);
+
+H5_DLL herr_t H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest);
+
+/*********************************
+ * DECLARATION OF OTHER ROUTINES *
+ *********************************/
+
+H5_DLL struct tm *gmnow(void);
+
+H5_DLL herr_t H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int cr_size,
+ char *signed_headers_dest, int sh_size, hrb_t *http_request);
+
+H5_DLL herr_t H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
+ hbool_t lowercase);
+
+H5_DLL herr_t H5FD_s3comms_free_purl(parsed_url_t *purl);
+
+H5_DLL herr_t H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *msg,
+ size_t msg_len, char *dest);
+
+H5_DLL herr_t H5FD_s3comms_load_aws_profile(const char *name, char *key_id_out, char *secret_access_key_out,
+ char *aws_region_out);
+
+H5_DLL herr_t H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len);
+
+H5_DLL herr_t H5FD_s3comms_parse_url(const char *str, parsed_url_t **purl);
+
+H5_DLL herr_t H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr_len);
+
+H5_DLL herr_t H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *region,
+ const char *iso8601now);
+
+H5_DLL herr_t H5FD_s3comms_tostringtosign(char *dest, const char *req_str, const char *now,
+ const char *region);
+
+H5_DLL herr_t H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written);
+
+H5_DLL herr_t H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_slash,
+ size_t *n_written);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H5_HAVE_ROS3_VFD */
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 3ee738c..72772c4 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@@ -24,18 +24,17 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_sec2_init_interface
-
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDsec2.h" /* Sec2 file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#define H5_INTERFACE_INIT_FUNC H5FD_sec2_init_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDsec2.h" /* Sec2 file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_SEC2_g = 0;
@@ -52,13 +51,13 @@ static hid_t H5FD_SEC2_g = 0;
* occurs), and 'op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_sec2_t {
- H5FD_t pub; /* public stuff, must be first */
- int fd; /* the filesystem file descriptor */
- haddr_t eoa; /* end of allocated region */
- haddr_t eof; /* end of file; current file size */
- haddr_t pos; /* current file I/O position */
- H5FD_file_op_t op; /* last operation */
- char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
+ H5FD_t pub; /* public stuff, must be first */
+ int fd; /* the filesystem file descriptor */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* end of file; current file size */
+ haddr_t pos; /* current file I/O position */
+ H5FD_file_op_t op; /* last operation */
+ char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
* identify a file. Note that Cygwin, MinGW and other Windows POSIX
@@ -66,8 +65,8 @@ typedef struct H5FD_sec2_t {
* and will use the 'device + inodes' scheme as opposed to the
* Windows code further below.
*/
- dev_t device; /* file device number */
- ino_t inode; /* file i-node number */
+ dev_t device; /* file device number */
+ ino_t inode; /* file i-node number */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -83,19 +82,19 @@ typedef struct H5FD_sec2_t {
*
* http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD nFileIndexLow;
- DWORD nFileIndexHigh;
- DWORD dwVolumeSerialNumber;
-
- HANDLE hFile; /* Native windows file handle */
-#endif /* H5_HAVE_WIN32_API */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
/* Information from properties set by 'h5repart' tool
*
* Whether to eliminate the family driver info and convert this file to
* a single file.
*/
- hbool_t fam_to_sec2;
+ hbool_t fam_to_sec2;
} H5FD_sec2_t;
/*
@@ -113,67 +112,64 @@ typedef struct H5FD_sec2_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A, Z) \
+ (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_sec2_close(H5FD_t *_file);
-static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
+static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_sec2_close(H5FD_t *_file);
+static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file);
-static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_sec2_g = {
- "sec2", /* name */
- MAXADDR, /* maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /* sb_size */
- NULL, /* sb_encode */
- NULL, /* sb_decode */
- 0, /* fapl_size */
- NULL, /* fapl_get */
- NULL, /* fapl_copy */
- NULL, /* fapl_free */
- 0, /* dxpl_size */
- NULL, /* dxpl_copy */
- NULL, /* dxpl_free */
- H5FD_sec2_open, /* open */
- H5FD_sec2_close, /* close */
- H5FD_sec2_cmp, /* cmp */
- H5FD_sec2_query, /* query */
- NULL, /* get_type_map */
- NULL, /* alloc */
- NULL, /* free */
- H5FD_sec2_get_eoa, /* get_eoa */
- H5FD_sec2_set_eoa, /* set_eoa */
- H5FD_sec2_get_eof, /* get_eof */
- H5FD_sec2_get_handle, /* get_handle */
- H5FD_sec2_read, /* read */
- H5FD_sec2_write, /* write */
- NULL, /* flush */
- H5FD_sec2_truncate, /* truncate */
- NULL, /* lock */
- NULL, /* unlock */
- H5FD_FLMAP_DICHOTOMY /* fl_map */
+ "sec2", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ 0, /* fapl_size */
+ NULL, /* fapl_get */
+ NULL, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_sec2_open, /* open */
+ H5FD_sec2_close, /* close */
+ H5FD_sec2_cmp, /* cmp */
+ H5FD_sec2_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_sec2_get_eoa, /* get_eoa */
+ H5FD_sec2_set_eoa, /* set_eoa */
+ H5FD_sec2_get_eof, /* get_eof */
+ H5FD_sec2_get_handle, /* get_handle */
+ H5FD_sec2_read, /* read */
+ H5FD_sec2_write, /* write */
+ NULL, /* flush */
+ H5FD_sec2_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_sec2_t struct */
H5FL_DEFINE_STATIC(H5FD_sec2_t);
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_init_interface
*
@@ -192,15 +188,14 @@ H5FD_sec2_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_sec2_init())
} /* H5FD_sec2_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_init
*
* Purpose: Initialize this driver by registering the driver with the
* library.
*
- * Return: Success: The driver ID for the sec2 driver.
- * Failure: Negative
+ * Return: Success: The driver ID for the sec2 driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, July 29, 1999
@@ -210,11 +205,11 @@ H5FD_sec2_init_interface(void)
hid_t
H5FD_sec2_init(void)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if(H5I_VFL != H5I_get_type(H5FD_SEC2_g))
+ if (H5I_VFL != H5I_get_type(H5FD_SEC2_g))
H5FD_SEC2_g = H5FD_register(&H5FD_sec2_g, sizeof(H5FD_class_t), FALSE);
/* Set return value */
@@ -224,7 +219,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_init() */
-
/*---------------------------------------------------------------------------
* Function: H5FD_sec2_term
*
@@ -248,7 +242,6 @@ H5FD_sec2_term(void)
FUNC_LEAVE_NOAPI_VOID
} /* end H5FD_sec2_term() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_sec2
*
@@ -266,13 +259,13 @@ H5FD_sec2_term(void)
herr_t
H5Pset_fapl_sec2(hid_t fapl_id)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", fapl_id);
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
ret_value = H5P_set_driver(plist, H5FD_SEC2, NULL);
@@ -281,7 +274,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_fapl_sec2() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_open
*
@@ -300,14 +292,14 @@ done:
static H5FD_t *
H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_sec2_t *file = NULL; /* sec2 VFD info */
- int fd = -1; /* File descriptor */
- int o_flags; /* Flags for open() call */
+ H5FD_sec2_t *file = NULL; /* sec2 VFD info */
+ int fd = -1; /* File descriptor */
+ int o_flags; /* Flags for open() call */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- H5FD_t *ret_value; /* Return value */
+ h5_stat_t sb;
+ H5FD_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -315,53 +307,56 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if(0 == maxaddr || HADDR_UNDEF == maxaddr)
+ if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if(ADDR_OVERFLOW(maxaddr))
+ if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
/* Build the open flags */
o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if(H5F_ACC_TRUNC & flags)
+ if (H5F_ACC_TRUNC & flags)
o_flags |= O_TRUNC;
- if(H5F_ACC_CREAT & flags)
+ if (H5F_ACC_CREAT & flags)
o_flags |= O_CREAT;
- if(H5F_ACC_EXCL & flags)
+ if (H5F_ACC_EXCL & flags)
o_flags |= O_EXCL;
/* Open the file */
- if((fd = HDopen(name, o_flags, 0666)) < 0) {
+ if ((fd = HDopen(name, o_flags, 0666)) < 0) {
int myerrno = errno;
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x", name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
+ HGOTO_ERROR(
+ H5E_FILE, H5E_CANTOPENFILE, NULL,
+ "unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x",
+ name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
} /* end if */
- if(HDfstat(fd, &sb) < 0)
+ if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
/* Create the new file struct */
- if(NULL == (file = H5FL_CALLOC(H5FD_sec2_t)))
+ if (NULL == (file = H5FL_CALLOC(H5FD_sec2_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
file->fd = fd;
H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t);
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
#ifdef H5_HAVE_WIN32_API
file->hFile = (HANDLE)_get_osfhandle(fd);
- if(INVALID_HANDLE_VALUE == file->hFile)
+ if (INVALID_HANDLE_VALUE == file->hFile)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle")
- if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
+ if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information")
- file->nFileIndexHigh = fileinfo.nFileIndexHigh;
- file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
-#else /* H5_HAVE_WIN32_API */
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
- file->inode = sb.st_ino;
+ file->inode = sb.st_ino;
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
@@ -369,11 +364,11 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->filename[sizeof(file->filename) - 1] = '\0';
/* Check for non-default FAPL */
- if(H5P_FILE_ACCESS_DEFAULT != fapl_id) {
- H5P_genplist_t *plist; /* Property list pointer */
+ if (H5P_FILE_ACCESS_DEFAULT != fapl_id) {
+ H5P_genplist_t *plist; /* Property list pointer */
/* Get the FAPL */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, NULL, "not a file access property list")
/* This step is for h5repart tool only. If user wants to change file driver from
@@ -381,26 +376,25 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* in the later step, the library can ignore the family driver information saved
* in the superblock.
*/
- if(H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SEC2_NAME) > 0)
- if(H5P_get(plist, H5F_ACS_FAMILY_TO_SEC2_NAME, &file->fam_to_sec2) < 0)
+ if (H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SEC2_NAME) > 0)
+ if (H5P_get(plist, H5F_ACS_FAMILY_TO_SEC2_NAME, &file->fam_to_sec2) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to sec2")
} /* end if */
/* Set return value */
- ret_value = (H5FD_t*)file;
+ ret_value = (H5FD_t *)file;
done:
- if(NULL == ret_value) {
- if(fd >= 0)
+ if (NULL == ret_value) {
+ if (fd >= 0)
HDclose(fd);
- if(file)
+ if (file)
file = H5FL_FREE(H5FD_sec2_t, file);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_open() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_close
*
@@ -417,8 +411,8 @@ done:
static herr_t
H5FD_sec2_close(H5FD_t *_file)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -426,7 +420,7 @@ H5FD_sec2_close(H5FD_t *_file)
HDassert(file);
/* Close the underlying file */
- if(HDclose(file->fd) < 0)
+ if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
/* Release the file info */
@@ -436,7 +430,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_close() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_cmp
*
@@ -455,42 +448,53 @@ done:
static int
H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
- const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
- int ret_value = 0;
+ const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
+ const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5_HAVE_WIN32_API
- if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
- if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) HGOTO_DONE(1)
-
- if(f1->nFileIndexHigh < f2->nFileIndexHigh) HGOTO_DONE(-1)
- if(f1->nFileIndexHigh > f2->nFileIndexHigh) HGOTO_DONE(1)
-
- if(f1->nFileIndexLow < f2->nFileIndexLow) HGOTO_DONE(-1)
- if(f1->nFileIndexLow > f2->nFileIndexLow) HGOTO_DONE(1)
+ if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
+ HGOTO_DONE(-1)
+ if (f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber)
+ HGOTO_DONE(1)
+
+ if (f1->nFileIndexHigh < f2->nFileIndexHigh)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexHigh > f2->nFileIndexHigh)
+ HGOTO_DONE(1)
+
+ if (f1->nFileIndexLow < f2->nFileIndexLow)
+ HGOTO_DONE(-1)
+ if (f1->nFileIndexLow > f2->nFileIndexLow)
+ HGOTO_DONE(1)
#else /* H5_HAVE_WIN32_API */
#ifdef H5_DEV_T_IS_SCALAR
- if(f1->device < f2->device) HGOTO_DONE(-1)
- if(f1->device > f2->device) HGOTO_DONE(1)
-#else /* H5_DEV_T_IS_SCALAR */
+ if (f1->device < f2->device)
+ HGOTO_DONE(-1)
+ if (f1->device > f2->device)
+ HGOTO_DONE(1)
+#else /* H5_DEV_T_IS_SCALAR */
/* If dev_t isn't a scalar value on this system, just use memcmp to
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) HGOTO_DONE(-1)
- if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ HGOTO_DONE(-1)
+ if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
- if(f1->inode < f2->inode) HGOTO_DONE(-1)
- if(f1->inode > f2->inode) HGOTO_DONE(1)
+ if (f1->inode < f2->inode)
+ HGOTO_DONE(-1)
+ if (f1->inode > f2->inode)
+ HGOTO_DONE(1)
#endif /* H5_HAVE_WIN32_API */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_query
*
@@ -507,28 +511,28 @@ done:
static herr_t
H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
- const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
+ const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
/* Check for flags that are set by h5repart */
- if(file && file->fam_to_sec2)
- *flags |= H5FD_FEAT_IGNORE_DRVRINFO; /* Ignore the driver info when file is opened (which eliminates it) */
- } /* end if */
+ if (file && file->fam_to_sec2)
+ *flags |= H5FD_FEAT_IGNORE_DRVRINFO; /* Ignore the driver info when file is opened (which
+ eliminates it) */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_sec2_query() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_get_eoa
*
@@ -546,14 +550,13 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
static haddr_t
H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
+ const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_sec2_get_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_set_eoa
*
@@ -571,7 +574,7 @@ H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
static herr_t
H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -580,7 +583,6 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_sec2_set_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_get_eof
*
@@ -588,7 +590,7 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
* either the filesystem end-of-file or the HDF5 end-of-address
* markers.
*
- * Return: End of file address, the first address past the end of the
+ * Return: End of file address, the first address past the end of the
* "file", either the filesystem file or the HDF5 file.
*
* Programmer: Robb Matzke
@@ -599,14 +601,13 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
static haddr_t
H5FD_sec2_get_eof(const H5FD_t *_file)
{
- const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
+ const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
} /* end H5FD_sec2_get_eof() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_get_handle
*
@@ -622,12 +623,12 @@ H5FD_sec2_get_eof(const H5FD_t *_file)
static herr_t
H5FD_sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED;
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
- if(!file_handle)
+ if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = &(file->fd);
@@ -636,7 +637,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_get_handle() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_read
*
@@ -654,11 +654,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr, size_t size, void *buf /*out*/)
+H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+ size_t size, void *buf /*out*/)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -666,54 +666,59 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
HDassert(buf);
/* Check for overflow conditions */
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
- if(REGION_OVERFLOW(addr, size))
+ if (REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
/* Seek to the correct location */
- if(addr != file->pos || OP_READ != file->op) {
- if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ if (addr != file->pos || OP_READ != file->op) {
+ if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
/* Read data, being careful of interrupted system calls, partial results,
* and the end of the file.
*/
- while(size > 0) {
-
- h5_posix_io_t bytes_in = 0; /* # of bytes to read */
- h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ while (size > 0) {
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
do {
bytes_read = HDread(file->fd, buf, bytes_in);
- } while(-1 == bytes_read && EINTR == errno);
-
- if(-1 == bytes_read) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ } while (-1 == bytes_read && EINTR == errno);
+
+ if (-1 == bytes_read) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,
+ "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
+ "error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, "
+ "bytes actually read = %llu, offset = %llu",
+ HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
-
- if(0 == bytes_read) {
+
+ if (0 == bytes_read) {
/* end of file but not end of format address space */
HDmemset(buf, 0, size);
break;
} /* end if */
-
+
HDassert(bytes_read >= 0);
HDassert((size_t)bytes_read <= size);
-
+
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
buf = (char *)buf + bytes_read;
@@ -721,19 +726,18 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
/* Update current position */
file->pos = addr;
- file->op = OP_READ;
+ file->op = OP_READ;
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_read() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_write
*
@@ -749,11 +753,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr, size_t size, const void *buf)
+H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+ size_t size, const void *buf)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -761,45 +765,51 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
HDassert(buf);
/* Check for overflow conditions */
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
- if(REGION_OVERFLOW(addr, size))
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu", (unsigned long long)addr, (unsigned long long)size)
+ if (REGION_OVERFLOW(addr, size))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu",
+ (unsigned long long)addr, (unsigned long long)size)
/* Seek to the correct location */
- if(addr != file->pos || OP_WRITE != file->op) {
- if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
+ if (addr != file->pos || OP_WRITE != file->op) {
+ if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
/* Write the data, being careful of interrupted system calls and partial
* results
*/
- while(size > 0) {
-
- h5_posix_io_t bytes_in = 0; /* # of bytes to write */
- h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ while (size > 0) {
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_POSIX_MAX_IO_BYTES)
+ if (size > H5_POSIX_MAX_IO_BYTES)
bytes_in = H5_POSIX_MAX_IO_BYTES;
else
bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, buf, bytes_in);
- } while(-1 == bytes_wrote && EINTR == errno);
-
- if(-1 == bytes_wrote) { /* error */
- int myerrno = errno;
- time_t mytime = HDtime(NULL);
+ } while (-1 == bytes_wrote && EINTR == errno);
+
+ if (-1 == bytes_wrote) { /* error */
+ int myerrno = errno;
+ time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
+ "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
+ "error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = "
+ "%llu, bytes actually written = %llu, offset = %llu",
+ HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ (unsigned long long)size, (unsigned long long)bytes_in,
+ (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
-
+
HDassert(bytes_wrote > 0);
HDassert((size_t)bytes_wrote <= size);
@@ -810,21 +820,20 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Update current position and eof */
file->pos = addr;
- file->op = OP_WRITE;
- if(file->pos > file->eof)
+ file->op = OP_WRITE;
+ if (file->pos > file->eof)
file->eof = file->pos;
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_write() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_truncate
*
@@ -841,22 +850,22 @@ done:
static herr_t
H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Extend the file to make sure it's large enough */
- if(!H5F_addr_eq(file->eoa, file->eof)) {
+ if (!H5F_addr_eq(file->eoa, file->eof)) {
#ifdef H5_HAVE_WIN32_API
- LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
- DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
- * Only used as an error code here.
- */
- DWORD dwError; /* DWORD error code from GetLastError() */
- BOOL bError; /* Boolean error flag */
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
/* Windows uses this odd QuadPart union for 32/64-bit portability */
li.QuadPart = (__int64)file->eoa;
@@ -867,17 +876,17 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
* from SetFilePointer(), we also need to check GetLastError().
*/
dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ if (INVALID_SET_FILE_POINTER == dwPtrLow) {
dwError = GetLastError();
- if(dwError != NO_ERROR )
+ if (dwError != NO_ERROR)
HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer")
}
bError = SetEndOfFile(file->hFile);
- if(0 == bError)
+ if (0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* H5_HAVE_WIN32_API */
- if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
+#else /* H5_HAVE_WIN32_API */
+ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
@@ -886,10 +895,9 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
+ file->op = OP_UNKNOWN;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_truncate() */
-
diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h
index 65ef1db..8655879 100644
--- a/src/H5FDsec2.h
+++ b/src/H5FDsec2.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
@@ -20,16 +20,14 @@
#ifndef H5FDsec2_H
#define H5FDsec2_H
-#include "H5Ipublic.h"
-
-#define H5FD_SEC2 (H5FD_sec2_init())
+#define H5FD_SEC2 (H5FD_sec2_init())
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_sec2_init(void);
-H5_DLL void H5FD_sec2_term(void);
+H5_DLL hid_t H5FD_sec2_init(void);
+H5_DLL void H5FD_sec2_term(void);
H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id);
#ifdef __cplusplus
@@ -37,4 +35,3 @@ H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id);
#endif
#endif
-
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index b7a60c0..8691b2d 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,9 +15,9 @@
*
* Created: H5FDspace.c
* Jan 3 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
- * Purpose: Space allocation routines for the file.
+ * Purpose: Space allocation routines for the file driver code.
*
*-------------------------------------------------------------------------
*/
@@ -26,21 +26,19 @@
/* Module Setup */
/****************/
-#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
+#define H5FD_PACKAGE /*suppress error about including H5FDpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_space_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5FD_space_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDpkg.h" /* File Drivers */
-#include "H5FDmulti.h" /* Usage-partitioned file family */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDpkg.h" /* File Drivers */
+#include "H5FDmulti.h" /* Usage-partitioned file family */
/****************/
/* Local Macros */
@@ -49,32 +47,26 @@
/* Define this to display information about file allocations */
/* #define H5FD_ALLOC_DEBUG */
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -82,8 +74,6 @@
/* Declare a free list to manage the H5FD_free_t struct */
H5FL_DEFINE(H5FD_free_t);
-
-
/*--------------------------------------------------------------------------
NAME
H5FD_space_init_interface -- Initialize interface-specific information
@@ -105,7 +95,6 @@ H5FD_space_init_interface(void)
FUNC_LEAVE_NOAPI(H5FD_init())
} /* H5FD_space_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_extend
*
@@ -122,12 +111,13 @@ H5FD_space_init_interface(void)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size)
+H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, haddr_t *frag_addr,
+ hsize_t *frag_size)
{
- hsize_t orig_size = size; /* Original allocation size */
- haddr_t eoa; /* Address of end-of-allocated space */
- hsize_t extra; /* Extra space to allocate, to align request */
- haddr_t ret_value; /* Return value */
+ hsize_t orig_size = size; /* Original allocation size */
+ haddr_t eoa; /* Address of end-of-allocated space */
+ hsize_t extra; /* Extra space to allocate, to align request */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -142,24 +132,24 @@ H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, hadd
/* Compute extra space to allocate, if this is a new block and should be aligned */
extra = 0;
- if(new_block && file->alignment > 1 && orig_size >= file->threshold) {
- hsize_t mis_align; /* Amount EOA is misaligned */
+ if (new_block && file->alignment > 1 && orig_size >= file->threshold) {
+ hsize_t mis_align; /* Amount EOA is misaligned */
/* Check for EOA already aligned */
- if((mis_align = (eoa % file->alignment)) > 0) {
+ if ((mis_align = (eoa % file->alignment)) > 0) {
extra = file->alignment - mis_align;
- if(frag_addr)
- *frag_addr = eoa - file->base_addr; /* adjust for file's base address */
- if(frag_size)
+ if (frag_addr)
+ *frag_addr = eoa - file->base_addr; /* adjust for file's base address */
+ if (frag_size)
*frag_size = extra;
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* Add in extra allocation amount */
size += extra;
/* Check for overflow when extending */
- if(H5F_addr_overflow(eoa, size) || (eoa + size) > file->maxaddr)
+ if (H5F_addr_overflow(eoa, size) || (eoa + size) > file->maxaddr)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed")
/* Set the [possibly aligned] address to return */
@@ -167,18 +157,17 @@ H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, hadd
/* Extend the end-of-allocated space address */
eoa += size;
- if(file->cls->set_eoa(file, type, eoa) < 0)
+ if (file->cls->set_eoa(file, type, eoa) < 0)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed")
/* Post-condition sanity check */
- if(new_block && file->alignment && orig_size >= file->threshold)
- HDassert(!(ret_value % file->alignment));
+ if (new_block && file->alignment && orig_size >= file->threshold)
+ HDassert(!(ret_value % file->alignment));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_extend() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_alloc_real
*
@@ -193,13 +182,14 @@ done:
*-------------------------------------------------------------------------
*/
haddr_t
-H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size)
+H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr,
+ hsize_t *frag_size)
{
- haddr_t ret_value; /* Return value */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
+ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
#endif /* H5FD_ALLOC_DEBUG */
/* check args */
@@ -209,12 +199,12 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
HDassert(size > 0);
/* Dispatch to driver `alloc' callback or extend the end-of-address marker */
- if(file->cls->alloc) {
- if((ret_value = (file->cls->alloc)(file, type, dxpl_id, size)) == HADDR_UNDEF)
+ if (file->cls->alloc) {
+ if ((ret_value = (file->cls->alloc)(file, type, dxpl_id, size)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver allocation request failed")
} /* end if */
else {
- if((ret_value = H5FD_extend(file, type, TRUE, size, frag_addr, frag_size)) == HADDR_UNDEF)
+ if ((ret_value = H5FD_extend(file, type, TRUE, size, frag_addr, frag_size)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver eoa update request failed")
} /* end else */
@@ -223,12 +213,11 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
done:
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
#endif /* H5FD_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_alloc_real() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_alloc
*
@@ -248,10 +237,10 @@ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
*-------------------------------------------------------------------------
*/
haddr_t
-H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, hsize_t size,
- haddr_t *frag_addr, hsize_t *frag_size)
+H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, hsize_t size, haddr_t *frag_addr,
+ hsize_t *frag_size)
{
- haddr_t ret_value; /* Return value */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
@@ -263,18 +252,17 @@ H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, hsize_t size,
/* Call the real 'alloc' routine */
ret_value = H5FD_alloc_real(file, dxpl_id, type, size, frag_addr, frag_size);
- if(!H5F_addr_defined(ret_value))
+ if (!H5F_addr_defined(ret_value))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "real 'alloc' request failed")
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5F_super_dirty(f) < 0)
+ if (H5F_super_dirty(f) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark superblock as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_free_real
*
@@ -291,7 +279,7 @@ done:
herr_t
H5FD_free_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr, hsize_t size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -302,58 +290,58 @@ H5FD_free_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr, hsize
HDassert(size > 0);
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size);
+ HDfprintf(stderr, "%s: type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */
/* Sanity checking */
- if(!H5F_addr_defined(addr))
+ if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file offset")
/* Convert address to absolute file offset */
addr += file->base_addr;
/* More sanity checking */
- if(addr > file->maxaddr || H5F_addr_overflow(addr, size) || (addr + size) > file->maxaddr)
+ if (addr > file->maxaddr || H5F_addr_overflow(addr, size) || (addr + size) > file->maxaddr)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file free space region to free")
/* Check for file driver 'free' callback and call it if available */
- if(file->cls->free) {
+ if (file->cls->free) {
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Letting VFD free space\n", FUNC);
+ HDfprintf(stderr, "%s: Letting VFD free space\n", FUNC);
#endif /* H5FD_ALLOC_DEBUG */
- if((file->cls->free)(file, type, dxpl_id, addr, size) < 0)
+ if ((file->cls->free)(file, type, dxpl_id, addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
} /* end if */
/* Check if this free block is at the end of file allocated space.
* Truncate it if this is true.
*/
- else if(file->cls->get_eoa) {
- haddr_t eoa;
+ else if (file->cls->get_eoa) {
+ haddr_t eoa;
eoa = file->cls->get_eoa(file, type);
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: eoa = %a\n", FUNC, eoa);
+ HDfprintf(stderr, "%s: eoa = %a\n", FUNC, eoa);
#endif /* H5FD_ALLOC_DEBUG */
- if(eoa == (addr + size)) {
+ if (eoa == (addr + size)) {
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Reducing file size to = %a\n", FUNC, addr);
+ HDfprintf(stderr, "%s: Reducing file size to = %a\n", FUNC, addr);
#endif /* H5FD_ALLOC_DEBUG */
- if(file->cls->set_eoa(file, type, addr) < 0)
+ if (file->cls->set_eoa(file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed")
} /* end if */
- } /* end else-if */
+ } /* end else-if */
else {
/* leak memory */
#ifdef H5FD_ALLOC_DEBUG
-HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size);
+ HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type,
+ addr, size);
#endif /* H5FD_ALLOC_DEBUG */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_free_real() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_free
*
@@ -373,10 +361,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, haddr_t addr,
- hsize_t size)
+H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, haddr_t addr, hsize_t size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -387,18 +374,17 @@ H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, haddr_t addr,
HDassert(size > 0);
/* Call the real 'free' routine */
- if(H5FD_free_real(file, dxpl_id, type, addr, size) < 0)
+ if (H5FD_free_real(file, dxpl_id, type, addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "real 'free' request failed")
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5F_super_dirty(f) < 0)
+ if (H5F_super_dirty(f) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_try_extend
*
@@ -418,11 +404,10 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end,
- hsize_t extra_requested)
+H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_t extra_requested)
{
- haddr_t eoa; /* End of allocated space in file */
- htri_t ret_value = FALSE; /* Return value */
+ haddr_t eoa; /* End of allocated space in file */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -434,20 +419,20 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end,
HDassert(f);
/* Retrieve the end of the address space */
- if(HADDR_UNDEF == (eoa = file->cls->get_eoa(file, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (eoa = file->cls->get_eoa(file, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_eoa request failed")
/* Adjust block end by base address of the file, to create absolute address */
blk_end += file->base_addr;
/* Check if the block is exactly at the end of the file */
- if(H5F_addr_eq(blk_end, eoa)) {
+ if (H5F_addr_eq(blk_end, eoa)) {
/* Extend the object by extending the underlying file */
- if(HADDR_UNDEF == H5FD_extend(file, type, FALSE, extra_requested, NULL, NULL))
+ if (HADDR_UNDEF == H5FD_extend(file, type, FALSE, extra_requested, NULL, NULL))
HGOTO_ERROR(H5E_VFL, H5E_CANTEXTEND, FAIL, "driver extend request failed")
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5F_super_dirty(f) < 0)
+ if (H5F_super_dirty(f) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
/* Indicate success */
@@ -457,4 +442,3 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_try_extend() */
-
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 1cabddf..4745f38 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 22, 1997
*
* Purpose: The C STDIO virtual file driver which only uses calls from stdio.h.
@@ -35,8 +35,8 @@
#ifdef H5_HAVE_WIN32_API
/* The following two defines must be before any windows headers are included */
-#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
-#define NOGDI /* Exclude Graphic Display Interface macros */
+#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
+#define NOGDI /* Exclude Graphic Display Interface macros */
#include <windows.h>
#include <io.h>
@@ -51,7 +51,7 @@
#ifdef MAX
#undef MAX
#endif /* MAX */
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
/* The driver identification number, initialized at runtime */
static hid_t H5FD_STDIO_g = 0;
@@ -61,10 +61,10 @@ static size_t H5_STDIO_MAX_IO_BYTES_g = (size_t)-1;
/* File operations */
typedef enum {
- H5FD_STDIO_OP_UNKNOWN=0,
- H5FD_STDIO_OP_READ=1,
- H5FD_STDIO_OP_WRITE=2,
- H5FD_STDIO_OP_SEEK=3
+ H5FD_STDIO_OP_UNKNOWN = 0,
+ H5FD_STDIO_OP_READ = 1,
+ H5FD_STDIO_OP_WRITE = 2,
+ H5FD_STDIO_OP_SEEK = 3
} H5FD_stdio_file_op;
/* The description of a file belonging to this driver. The 'eoa' and 'eof'
@@ -79,14 +79,14 @@ typedef enum {
* occurs), and 'op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_stdio_t {
- H5FD_t pub; /* public stuff, must be first */
- FILE *fp; /* the file handle */
- int fd; /* file descriptor (for truncate) */
- haddr_t eoa; /* end of allocated region */
- haddr_t eof; /* end of file; current file size */
- haddr_t pos; /* current file I/O position */
- unsigned write_access; /* Flag to indicate the file was opened with write access */
- H5FD_stdio_file_op op; /* last operation */
+ H5FD_t pub; /* public stuff, must be first */
+ FILE * fp; /* the file handle */
+ int fd; /* file descriptor (for truncate) */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* end of file; current file size */
+ haddr_t pos; /* current file I/O position */
+ unsigned write_access; /* Flag to indicate the file was opened with write access */
+ H5FD_stdio_file_op op; /* last operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
* identify a file. Note that Cygwin, MinGW and other Windows POSIX
@@ -94,8 +94,8 @@ typedef struct H5FD_stdio_t {
* and will use the 'device + inodes' scheme as opposed to the
* Windows code further below.
*/
- dev_t device; /* file device number */
- ino_t inode; /* file i-node number */
+ dev_t device; /* file device number */
+ ino_t inode; /* file i-node number */
#else
/* Files in windows are uniquely identified by the volume serial
* number and the file index (both low and high parts).
@@ -111,21 +111,21 @@ typedef struct H5FD_stdio_t {
*
* http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD nFileIndexLow;
- DWORD nFileIndexHigh;
- DWORD dwVolumeSerialNumber;
-
- HANDLE hFile; /* Native windows file handle */
-#endif /* H5_HAVE_WIN32_API */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
} H5FD_stdio_t;
/* Use similar structure as in H5private.h by defining Windows stuff first. */
#ifdef H5_HAVE_WIN32_API
#ifndef H5_HAVE_MINGW
- #define file_fseek _fseeki64
- #define file_offset_t __int64
- #define file_ftruncate _chsize_s /* Supported in VS 2005 or newer */
- #define file_ftell _ftelli64
+#define file_fseek _fseeki64
+#define file_offset_t __int64
+#define file_ftruncate _chsize_s /* Supported in VS 2005 or newer */
+#define file_ftell _ftelli64
#endif /* H5_HAVE_MINGW */
#endif /* H5_HAVE_WIN32_API */
@@ -133,10 +133,10 @@ typedef struct H5FD_stdio_t {
* more platform-independent names.
*/
#ifndef file_fseek
- #define file_fseek fseeko
- #define file_offset_t off_t
- #define file_ftruncate ftruncate
- #define file_ftell ftello
+#define file_fseek fseeko
+#define file_offset_t off_t
+#define file_ftruncate ftruncate
+#define file_ftell ftello
#endif /* file_fseek */
/* These macros check for overflow of various quantities. These macros
@@ -154,65 +154,64 @@ typedef struct H5FD_stdio_t {
* argument of the file seek function.
*/
/* adding for windows NT filesystem support. */
-#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || (file_offset_t)((A)+(Z))<(file_offset_t)(A))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(file_offset_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A, Z) \
+ (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || \
+ (file_offset_t)((A) + (Z)) < (file_offset_t)(A))
/* Prototypes */
-static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_stdio_close(H5FD_t *lf);
-static int H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags);
+static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_stdio_close(H5FD_t *lf);
+static int H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static haddr_t H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_stdio_get_eof(const H5FD_t *_file);
-static herr_t H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_stdio_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle);
+static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ void *buf);
+static herr_t H5FD_stdio_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
+ const void *buf);
+static herr_t H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_stdio_g = {
- "stdio", /* name */
- MAXADDR, /* maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /* sb_size */
- NULL, /* sb_encode */
- NULL, /* sb_decode */
- 0, /* fapl_size */
- NULL, /* fapl_get */
- NULL, /* fapl_copy */
- NULL, /* fapl_free */
- 0, /* dxpl_size */
- NULL, /* dxpl_copy */
- NULL, /* dxpl_free */
- H5FD_stdio_open, /* open */
- H5FD_stdio_close, /* close */
- H5FD_stdio_cmp, /* cmp */
- H5FD_stdio_query, /* query */
- NULL, /* get_type_map */
- H5FD_stdio_alloc, /* alloc */
- NULL, /* free */
- H5FD_stdio_get_eoa, /* get_eoa */
- H5FD_stdio_set_eoa, /* set_eoa */
- H5FD_stdio_get_eof, /* get_eof */
- H5FD_stdio_get_handle, /* get_handle */
- H5FD_stdio_read, /* read */
- H5FD_stdio_write, /* write */
- H5FD_stdio_flush, /* flush */
- H5FD_stdio_truncate, /* truncate */
- NULL, /* lock */
- NULL, /* unlock */
- H5FD_FLMAP_DICHOTOMY /* fl_map */
+ "stdio", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ 0, /* fapl_size */
+ NULL, /* fapl_get */
+ NULL, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_stdio_open, /* open */
+ H5FD_stdio_close, /* close */
+ H5FD_stdio_cmp, /* cmp */
+ H5FD_stdio_query, /* query */
+ NULL, /* get_type_map */
+ H5FD_stdio_alloc, /* alloc */
+ NULL, /* free */
+ H5FD_stdio_get_eoa, /* get_eoa */
+ H5FD_stdio_set_eoa, /* set_eoa */
+ H5FD_stdio_get_eof, /* get_eof */
+ H5FD_stdio_get_handle, /* get_handle */
+ H5FD_stdio_read, /* read */
+ H5FD_stdio_write, /* write */
+ H5FD_stdio_flush, /* flush */
+ H5FD_stdio_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_init
*
@@ -234,12 +233,11 @@ H5FD_stdio_init(void)
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if (H5I_VFL!=H5Iget_type(H5FD_STDIO_g))
+ if (H5I_VFL != H5Iget_type(H5FD_STDIO_g))
H5FD_STDIO_g = H5FDregister(&H5FD_stdio_g);
return H5FD_STDIO_g;
} /* end H5FD_stdio_init() */
-
/*---------------------------------------------------------------------------
* Function: H5FD_stdio_term
*
@@ -261,7 +259,6 @@ H5FD_stdio_term(void)
return;
} /* end H5FD_stdio_term() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_stdio
*
@@ -279,20 +276,19 @@ H5FD_stdio_term(void)
herr_t
H5Pset_fapl_stdio(hid_t fapl_id)
{
- static const char *func = "H5FDset_fapl_stdio"; /*for error reporting*/
+ static const char *func = "H5FDset_fapl_stdio"; /*for error reporting*/
/*NO TRACE*/
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ if (0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1)
- return H5Pset_driver(fapl_id, H5FD_STDIO, NULL);
+ return H5Pset_driver(fapl_id, H5FD_STDIO, NULL);
} /* end H5Pset_fapl_stdio() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_open
*
@@ -318,18 +314,17 @@ H5Pset_fapl_stdio(hid_t fapl_id)
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- FILE *f = NULL;
- unsigned write_access = 0; /* File opened with write access? */
- H5FD_stdio_t *file = NULL;
- static const char *func = "H5FD_stdio_open"; /* Function Name for error reporting */
+ FILE * f = NULL;
+ unsigned write_access = 0; /* File opened with write access? */
+ H5FD_stdio_t * file = NULL;
+ static const char *func = "H5FD_stdio_open"; /* Function Name for error reporting */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
-#else /* H5_HAVE_WIN32_API */
- struct stat sb;
-#endif /* H5_HAVE_WIN32_API */
+#else /* H5_HAVE_WIN32_API */
+ struct stat sb;
+#endif /* H5_HAVE_WIN32_API */
/* Sanity check on file offsets */
assert(sizeof(file_offset_t) >= sizeof(size_t));
@@ -342,104 +337,108 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
/* Check arguments */
if (!name || !*name)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL)
- if (0 == maxaddr || HADDR_UNDEF == maxaddr)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL)
- if (ADDR_OVERFLOW(maxaddr))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL)
-
- /* Tentatively open file in read-only mode, to check for existence */
- if(flags & H5F_ACC_RDWR)
- f = fopen(name, "rb+");
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name",
+ NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr",
+ NULL) if (ADDR_OVERFLOW(maxaddr))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL)
+
+ /* Tentatively open file in read-only mode, to check for existence */
+ if (flags & H5F_ACC_RDWR) f = fopen(name, "rb+");
else
f = fopen(name, "rb");
- if(!f) {
+ if (!f) {
/* File doesn't exist */
- if(flags & H5F_ACC_CREAT) {
+ if (flags & H5F_ACC_CREAT) {
assert(flags & H5F_ACC_RDWR);
- f = fopen(name, "wb+");
- write_access = 1; /* Note the write access */
+ f = fopen(name, "wb+");
+ write_access = 1; /* Note the write access */
}
else
- H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "file doesn't exist and CREAT wasn't specified", NULL)
- } else if(flags & H5F_ACC_EXCL) {
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE,
+ "file doesn't exist and CREAT wasn't specified", NULL)
+ }
+ else if (flags & H5F_ACC_EXCL) {
/* File exists, but EXCL is passed. Fail. */
assert(flags & H5F_ACC_CREAT);
fclose(f);
- H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_FILEEXISTS, "file exists but CREAT and EXCL were specified", NULL)
- } else if(flags & H5F_ACC_RDWR) {
- if(flags & H5F_ACC_TRUNC)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_FILEEXISTS,
+ "file exists but CREAT and EXCL were specified", NULL)
+ }
+ else if (flags & H5F_ACC_RDWR) {
+ if (flags & H5F_ACC_TRUNC)
f = freopen(name, "wb+", f);
- write_access = 1; /* Note the write access */
- } /* end if */
+ write_access = 1; /* Note the write access */
+ } /* end if */
/* Note there is no need to reopen if neither TRUNC nor EXCL are specified,
* as the tentative open will work */
- if(!f)
+ if (!f)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL)
- /* Build the return value */
- if(NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t)))) {
- fclose(f);
- H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL)
- } /* end if */
- file->fp = f;
- file->op = H5FD_STDIO_OP_SEEK;
- file->pos = HADDR_UNDEF;
- file->write_access = write_access; /* Note the write_access for later */
- if(file_fseek(file->fp, (file_offset_t)0, SEEK_END) < 0) {
+ /* Build the return value */
+ if (NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t))))
+ {
+ fclose(f);
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL)
+ } /* end if */
+ file->fp = f;
+ file->op = H5FD_STDIO_OP_SEEK;
+ file->pos = HADDR_UNDEF;
+ file->write_access = write_access; /* Note the write_access for later */
+ if (file_fseek(file->fp, (file_offset_t)0, SEEK_END) < 0) {
file->op = H5FD_STDIO_OP_UNKNOWN;
- } else {
+ }
+ else {
file_offset_t x = file_ftell(file->fp);
- assert (x >= 0);
+ assert(x >= 0);
file->eof = (haddr_t)x;
}
/* Get the file descriptor (needed for truncate and some Windows information) */
#ifdef H5_HAVE_WIN32_API
file->fd = _fileno(file->fp);
-#else /* H5_HAVE_WIN32_API */
+#else /* H5_HAVE_WIN32_API */
file->fd = fileno(file->fp);
#endif /* H5_HAVE_WIN32_API */
- if(file->fd < 0) {
+ if (file->fd < 0) {
free(file);
fclose(f);
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get file descriptor", NULL);
} /* end if */
-
#ifdef H5_HAVE_WIN32_API
file->hFile = (HANDLE)_get_osfhandle(file->fd);
- if(INVALID_HANDLE_VALUE == file->hFile) {
+ if (INVALID_HANDLE_VALUE == file->hFile) {
free(file);
fclose(f);
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get Windows file handle", NULL);
} /* end if */
- if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) {
+ if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) {
free(file);
fclose(f);
- H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE, "unable to get Windows file descriptor information", NULL);
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTOPENFILE,
+ "unable to get Windows file descriptor information", NULL);
} /* end if */
- file->nFileIndexHigh = fileinfo.nFileIndexHigh;
- file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
-#else /* H5_HAVE_WIN32_API */
- if(fstat(file->fd, &sb) < 0) {
+#else /* H5_HAVE_WIN32_API */
+ if (fstat(file->fd, &sb) < 0) {
free(file);
fclose(f);
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL)
} /* end if */
file->device = sb.st_dev;
- file->inode = sb.st_ino;
+ file->inode = sb.st_ino;
#endif /* H5_HAVE_WIN32_API */
- return (H5FD_t*)file;
+ return ((H5FD_t *)file);
} /* end H5FD_stdio_open() */
-
/*-------------------------------------------------------------------------
* Function: H5F_stdio_close
*
@@ -458,8 +457,8 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
static herr_t
H5FD_stdio_close(H5FD_t *_file)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- static const char *func = "H5FD_stdio_close"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_close"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -467,12 +466,11 @@ H5FD_stdio_close(H5FD_t *_file)
if (fclose(file->fp) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1)
- free(file);
+ free(file);
return 0;
} /* end H5FD_stdio_close() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_cmp
*
@@ -492,41 +490,52 @@ H5FD_stdio_close(H5FD_t *_file)
static int
H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_stdio_t *f1 = (const H5FD_stdio_t*)_f1;
- const H5FD_stdio_t *f2 = (const H5FD_stdio_t*)_f2;
+ const H5FD_stdio_t *f1 = (const H5FD_stdio_t *)_f1;
+ const H5FD_stdio_t *f2 = (const H5FD_stdio_t *)_f2;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
#ifdef H5_HAVE_WIN32_API
- if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) return -1;
- if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) return 1;
-
- if(f1->nFileIndexHigh < f2->nFileIndexHigh) return -1;
- if(f1->nFileIndexHigh > f2->nFileIndexHigh) return 1;
-
- if(f1->nFileIndexLow < f2->nFileIndexLow) return -1;
- if(f1->nFileIndexLow > f2->nFileIndexLow) return 1;
+ if (f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber)
+ return -1;
+ if (f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber)
+ return 1;
+
+ if (f1->nFileIndexHigh < f2->nFileIndexHigh)
+ return -1;
+ if (f1->nFileIndexHigh > f2->nFileIndexHigh)
+ return 1;
+
+ if (f1->nFileIndexLow < f2->nFileIndexLow)
+ return -1;
+ if (f1->nFileIndexLow > f2->nFileIndexLow)
+ return 1;
#else /* H5_HAVE_WIN32_API */
#ifdef H5_DEV_T_IS_SCALAR
- if(f1->device < f2->device) return -1;
- if(f1->device > f2->device) return 1;
-#else /* H5_DEV_T_IS_SCALAR */
+ if (f1->device < f2->device)
+ return -1;
+ if (f1->device > f2->device)
+ return 1;
+#else /* H5_DEV_T_IS_SCALAR */
/* If dev_t isn't a scalar value on this system, just use memcmp to
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) return -1;
- if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) return 1;
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ return -1;
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ return 1;
#endif /* H5_DEV_T_IS_SCALAR */
- if(f1->inode < f2->inode) return -1;
- if(f1->inode > f2->inode) return 1;
+ if (f1->inode < f2->inode)
+ return -1;
+ if (f1->inode > f2->inode)
+ return 1;
#endif /* H5_HAVE_WIN32_API */
return 0;
} /* H5FD_stdio_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_query
*
@@ -546,21 +555,20 @@ static herr_t
H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
{
/* Quiet the compiler */
- _f=_f;
+ _f = _f;
/* Set the VFL feature flags that this driver supports */
- if(flags) {
+ if (flags) {
*flags = 0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags|=H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
return 0;
} /* end H5FD_stdio_query() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_alloc
*
@@ -580,13 +588,14 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_ATTR_UNUSED*/ dxpl_id, hsize_t size)
+H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_ATTR_UNUSED*/ dxpl_id,
+ hsize_t size)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- haddr_t addr;
+ H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
+ haddr_t addr;
/* Quiet compiler */
- type = type;
+ type = type;
dxpl_id = dxpl_id;
/* Clear the error stack */
@@ -596,9 +605,9 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_A
addr = file->eoa;
/* Check if we need to align this block */
- if(size >= file->pub.threshold) {
+ if (size >= file->pub.threshold) {
/* Check for an already aligned block */
- if((addr % file->pub.alignment) != 0)
+ if ((addr % file->pub.alignment) != 0)
addr = ((addr / file->pub.alignment) + 1) * file->pub.alignment;
} /* end if */
@@ -607,7 +616,6 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_A
return addr;
} /* end H5FD_stdio_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_get_eoa
*
@@ -638,7 +646,6 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
return file->eoa;
} /* end H5FD_stdio_get_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_set_eoa
*
@@ -658,7 +665,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
static herr_t
H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t addr)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -671,7 +678,6 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t ad
return 0;
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_get_eof
*
@@ -693,7 +699,7 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t ad
static haddr_t
H5FD_stdio_get_eof(const H5FD_t *_file)
{
- const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
+ const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -701,7 +707,6 @@ H5FD_stdio_get_eof(const H5FD_t *_file)
return MAX(file->eof, file->eoa);
} /* end H5FD_stdio_get_eof() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_get_handle
*
@@ -715,10 +720,10 @@ H5FD_stdio_get_eof(const H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
{
- H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
- static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */
/* Quiet the compiler */
fapl = fapl;
@@ -727,13 +732,12 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
H5Eclear2(H5E_DEFAULT);
*file_handle = &(file->fp);
- if(*file_handle == NULL)
+ if (*file_handle == NULL)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1)
- return 0;
+ return 0;
} /* end H5FD_stdio_get_handle() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_read
*
@@ -753,38 +757,35 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf /*out*/)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */
/* Quiet the compiler */
- type = type;
+ type = type;
dxpl_id = dxpl_id;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Check for overflow */
- if (HADDR_UNDEF==addr)
- H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
- if (REGION_OVERFLOW(addr, size))
- H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
+ if (HADDR_UNDEF == addr)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed",
+ -1) if (REGION_OVERFLOW(addr, size))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
- /* Check easy cases */
- if (0 == size)
- return 0;
+ /* Check easy cases */
+ if (0 == size) return 0;
if ((haddr_t)addr >= file->eof) {
memset(buf, 0, size);
return 0;
}
/* Seek to the correct file position. */
- if (!(file->op == H5FD_STDIO_OP_READ || file->op == H5FD_STDIO_OP_SEEK) ||
- file->pos != addr) {
+ if (!(file->op == H5FD_STDIO_OP_READ || file->op == H5FD_STDIO_OP_SEEK) || file->pos != addr) {
if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) {
- file->op = H5FD_STDIO_OP_UNKNOWN;
+ file->op = H5FD_STDIO_OP_UNKNOWN;
file->pos = HADDR_UNDEF;
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1)
}
@@ -793,7 +794,7 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
/* Read zeros past the logical end of file (physical is handled below) */
if (addr + size > file->eof) {
- size_t nbytes = (size_t) (addr + size - file->eof);
+ size_t nbytes = (size_t)(addr + size - file->eof);
memset((unsigned char *)buf + size - nbytes, 0, nbytes);
size -= nbytes;
}
@@ -802,44 +803,43 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
* will advance the file position by N. If N is zero or an error
* occurs then the file position is undefined.
*/
- while(size > 0) {
+ while (size > 0) {
- size_t bytes_in = 0; /* # of bytes to read */
- size_t bytes_read = 0; /* # of bytes actually read */
- size_t item_size = 1; /* size of items in bytes */
+ size_t bytes_in = 0; /* # of bytes to read */
+ size_t bytes_read = 0; /* # of bytes actually read */
+ size_t item_size = 1; /* size of items in bytes */
- if(size > H5_STDIO_MAX_IO_BYTES_g)
+ if (size > H5_STDIO_MAX_IO_BYTES_g)
bytes_in = H5_STDIO_MAX_IO_BYTES_g;
else
bytes_in = size;
bytes_read = fread(buf, item_size, bytes_in, file->fp);
- if(0 == bytes_read && ferror(file->fp)) { /* error */
- file->op = H5FD_STDIO_OP_UNKNOWN;
+ if (0 == bytes_read && ferror(file->fp)) { /* error */
+ file->op = H5FD_STDIO_OP_UNKNOWN;
file->pos = HADDR_UNDEF;
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1)
} /* end if */
-
- if(0 == bytes_read && feof(file->fp)) {
+
+ if (0 == bytes_read && feof(file->fp)) {
/* end of file but not end of format address space */
memset((unsigned char *)buf, 0, size);
break;
} /* end if */
-
+
size -= bytes_read;
addr += (haddr_t)bytes_read;
buf = (char *)buf + bytes_read;
} /* end while */
/* Update the file position data. */
- file->op = H5FD_STDIO_OP_READ;
+ file->op = H5FD_STDIO_OP_READ;
file->pos = addr;
return 0;
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_write
*
@@ -858,59 +858,58 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */
/* Quiet the compiler */
dxpl_id = dxpl_id;
- type = type;
+ type = type;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
- H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
- if (REGION_OVERFLOW(addr, size))
- H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
-
- /* Seek to the correct file position. */
- if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) ||
- file->pos != addr) {
- if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) {
- file->op = H5FD_STDIO_OP_UNKNOWN;
- file->pos = HADDR_UNDEF;
- H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed",
+ -1) if (REGION_OVERFLOW(addr, size))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1)
+
+ /* Seek to the correct file position. */
+ if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr)
+ {
+ if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) {
+ file->op = H5FD_STDIO_OP_UNKNOWN;
+ file->pos = HADDR_UNDEF;
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1)
+ }
+ file->pos = addr;
}
- file->pos = addr;
- }
/* Write the buffer. On successful return, the file position will be
* advanced by the number of bytes read. On failure, the file position is
* undefined.
*/
- while(size > 0) {
+ while (size > 0) {
- size_t bytes_in = 0; /* # of bytes to write */
- size_t bytes_wrote = 0; /* # of bytes written */
- size_t item_size = 1; /* size of items in bytes */
+ size_t bytes_in = 0; /* # of bytes to write */
+ size_t bytes_wrote = 0; /* # of bytes written */
+ size_t item_size = 1; /* size of items in bytes */
- if(size > H5_STDIO_MAX_IO_BYTES_g)
+ if (size > H5_STDIO_MAX_IO_BYTES_g)
bytes_in = H5_STDIO_MAX_IO_BYTES_g;
else
bytes_in = size;
bytes_wrote = fwrite(buf, item_size, bytes_in, file->fp);
- if(bytes_wrote != bytes_in || (0 == bytes_wrote && ferror(file->fp))) { /* error */
- file->op = H5FD_STDIO_OP_UNKNOWN;
+ if (bytes_wrote != bytes_in || (0 == bytes_wrote && ferror(file->fp))) { /* error */
+ file->op = H5FD_STDIO_OP_UNKNOWN;
file->pos = HADDR_UNDEF;
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1)
} /* end if */
-
+
assert(bytes_wrote > 0);
assert((size_t)bytes_wrote <= size);
@@ -920,7 +919,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
}
/* Update seek optimizing data. */
- file->op = H5FD_STDIO_OP_WRITE;
+ file->op = H5FD_STDIO_OP_WRITE;
file->pos = addr;
/* Update EOF if necessary */
@@ -930,7 +929,6 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
return 0;
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_flush
*
@@ -950,8 +948,8 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t
H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
/* Quiet the compiler */
dxpl_id = dxpl_id;
@@ -960,21 +958,20 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
H5Eclear2(H5E_DEFAULT);
/* Only try to flush the file if we have write access */
- if(file->write_access) {
- if(!closing) {
- if(fflush(file->fp) < 0)
+ if (file->write_access) {
+ if (!closing) {
+ if (fflush(file->fp) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1)
- /* Reset last file I/O information */
- file->pos = HADDR_UNDEF;
+ /* Reset last file I/O information */
+ file->pos = HADDR_UNDEF;
file->op = H5FD_STDIO_OP_UNKNOWN;
} /* end if */
- } /* end if */
+ } /* end if */
return 0;
} /* end H5FD_stdio_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_stdio_truncate
*
@@ -995,8 +992,8 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
static herr_t
H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
+ H5FD_stdio_t * file = (H5FD_stdio_t *)_file;
+ static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
/* Quiet the compiler */
dxpl_id = dxpl_id;
@@ -1006,17 +1003,17 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
H5Eclear2(H5E_DEFAULT);
/* Only try to flush the file if we have write access */
- if(file->write_access) {
+ if (file->write_access) {
/* Makes sure that the true file size is the same as the end-of-address. */
- if(file->eoa != file->eof) {
+ if (file->eoa != file->eof) {
#ifdef H5_HAVE_WIN32_API
- LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
- DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
- * Only used as an error code here.
- */
- DWORD dwError; /* DWORD error code from GetLastError() */
- BOOL bError; /* Boolean error flag */
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
/* Reset seek offset to beginning of file, so that file isn't re-extended later */
rewind(file->fp);
@@ -1030,42 +1027,43 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
* from SetFilePointer(), we also need to check GetLastError().
*/
dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ if (INVALID_SET_FILE_POINTER == dwPtrLow) {
dwError = GetLastError();
- if(dwError != NO_ERROR )
+ if (dwError != NO_ERROR)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_FILEOPEN, "unable to set file pointer", -1)
}
-
+
bError = SetEndOfFile(file->hFile);
- if(0 == bError)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1)
-#else /* H5_HAVE_WIN32_API */
+ if (0 == bError)
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR,
+ "unable to truncate/extend file properly", -1)
+#else /* H5_HAVE_WIN32_API */
/* Reset seek offset to beginning of file, so that file isn't re-extended later */
rewind(file->fp);
/* Truncate file to proper length */
- if(-1 == file_ftruncate(file->fd, (file_offset_t)file->eoa))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1)
+ if (-1 == file_ftruncate(file->fd, (file_offset_t)file->eoa))
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR,
+ "unable to truncate/extend file properly", -1)
#endif /* H5_HAVE_WIN32_API */
- /* Update the eof value */
- file->eof = file->eoa;
+ /* Update the eof value */
+ file->eof = file->eoa;
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
- file->op = H5FD_STDIO_OP_UNKNOWN;
+ file->op = H5FD_STDIO_OP_UNKNOWN;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Double-check for problems */
- if(file->eoa > file->eof)
+ if (file->eoa > file->eof)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_TRUNCATED, "eoa > eof!", -1)
} /* end else */
return 0;
} /* end H5FD_stdio_truncate() */
-
#ifdef _H5private_H
/*
* This is not related to the functionality of the driver code.
@@ -1074,4 +1072,3 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
*/
#error "Do not use HDF5 private definitions"
#endif
-
diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h
index b629981..2ad4352 100644
--- a/src/H5FDstdio.h
+++ b/src/H5FDstdio.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
@@ -22,14 +22,14 @@
#include "H5Ipublic.h"
-#define H5FD_STDIO (H5FD_stdio_init())
+#define H5FD_STDIO (H5FD_stdio_init())
#ifdef __cplusplus
extern "C" {
#endif
-H5_DLL hid_t H5FD_stdio_init(void);
-H5_DLL void H5FD_stdio_term(void);
+H5_DLL hid_t H5FD_stdio_init(void);
+H5_DLL void H5FD_stdio_term(void);
H5_DLL herr_t H5Pset_fapl_stdio(hid_t fapl_id);
#ifdef __cplusplus
diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c
index 76c4f18..6ce33a7 100644
--- a/src/H5FDwindows.c
+++ b/src/H5FDwindows.c
@@ -6,25 +6,24 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDwindows.h" /* Windows file driver */
-#include "H5FDsec2.h" /* Windows file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDwindows.h" /* Windows file driver */
+#include "H5FDsec2.h" /* Windows file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_WINDOWS
-
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_windows
*
@@ -48,13 +47,13 @@
herr_t
H5Pset_fapl_windows(hid_t fapl_id)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", fapl_id);
- if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
ret_value = H5P_set_driver(plist, H5FD_WINDOWS, NULL);
@@ -64,4 +63,3 @@ done:
} /* end H5Pset_fapl_windows() */
#endif /* H5_HAVE_WINDOWS */
-
diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h
index a32233a..2060440 100644
--- a/src/H5FDwindows.h
+++ b/src/H5FDwindows.h
@@ -6,14 +6,14 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Scott Wegner <swegner@hdfgroup.org>
- * Based on code by Robb Matzke
+ * Programmer: Scott Wegner
+ * Based on code by Robb Matzke
* Thursday, May 24 2007
*
* Purpose: The public header file for the windows driver.
@@ -24,7 +24,7 @@
#include "H5Ipublic.h"
#include "H5FDsec2.h"
-#define H5FD_WINDOWS (H5FD_windows_init())
+#define H5FD_WINDOWS (H5FD_windows_init())
#ifdef __cplusplus
extern "C" {
diff --git a/src/H5FL.c b/src/H5FL.c
index 59f0f82..c443f51 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
* Purpose: Manage priority queues of free-lists (of blocks of bytes).
@@ -26,15 +26,14 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FL_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5FL_init_interface
/* #define H5FL_DEBUG */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MMprivate.h" /* Memory management */
/*
* Private type definitions
@@ -44,84 +43,85 @@
Default limits on how much memory can accumulate on each free list before
it is garbage collected.
*/
-static size_t H5FL_reg_glb_mem_lim=1*1024*1024; /* Default to 1MB limit on all regular free lists */
-static size_t H5FL_reg_lst_mem_lim=1*65536; /* Default to 64KB limit on each regular free list */
-static size_t H5FL_arr_glb_mem_lim=4*1024*1024; /* Default to 4MB limit on all array free lists */
-static size_t H5FL_arr_lst_mem_lim=4*65536; /* Default to 256KB limit on each array free list */
-static size_t H5FL_blk_glb_mem_lim=16*1024*1024; /* Default to 16MB limit on all block free lists */
-static size_t H5FL_blk_lst_mem_lim=1024*1024; /* Default to 1024KB (1MB) limit on each block free list */
-static size_t H5FL_fac_glb_mem_lim=16*1024*1024; /* Default to 16MB limit on all factory free lists */
-static size_t H5FL_fac_lst_mem_lim=1024*1024; /* Default to 1024KB (1MB) limit on each factory free list */
+static size_t H5FL_reg_glb_mem_lim = 1 * 1024 * 1024; /* Default to 1MB limit on all regular free lists */
+static size_t H5FL_reg_lst_mem_lim = 1 * 65536; /* Default to 64KB limit on each regular free list */
+static size_t H5FL_arr_glb_mem_lim = 4 * 1024 * 1024; /* Default to 4MB limit on all array free lists */
+static size_t H5FL_arr_lst_mem_lim = 4 * 65536; /* Default to 256KB limit on each array free list */
+static size_t H5FL_blk_glb_mem_lim = 16 * 1024 * 1024; /* Default to 16MB limit on all block free lists */
+static size_t H5FL_blk_lst_mem_lim = 1024 * 1024; /* Default to 1024KB (1MB) limit on each block free list */
+static size_t H5FL_fac_glb_mem_lim = 16 * 1024 * 1024; /* Default to 16MB limit on all factory free lists */
+static size_t H5FL_fac_lst_mem_lim =
+ 1024 * 1024; /* Default to 1024KB (1MB) limit on each factory free list */
/* A garbage collection node for regular free lists */
typedef struct H5FL_reg_gc_node_t {
- H5FL_reg_head_t *list; /* Pointer to the head of the list to garbage collect */
- struct H5FL_reg_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
+ H5FL_reg_head_t * list; /* Pointer to the head of the list to garbage collect */
+ struct H5FL_reg_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
} H5FL_reg_gc_node_t;
/* The garbage collection head for regular free lists */
typedef struct H5FL_reg_gc_list_t {
- size_t mem_freed; /* Amount of free memory on list */
- struct H5FL_reg_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
+ size_t mem_freed; /* Amount of free memory on list */
+ struct H5FL_reg_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
} H5FL_reg_gc_list_t;
/* The head of the list of things to garbage collect */
-static H5FL_reg_gc_list_t H5FL_reg_gc_head={0,NULL};
+static H5FL_reg_gc_list_t H5FL_reg_gc_head = {0, NULL};
/* A garbage collection node for array free lists */
typedef struct H5FL_gc_arr_node_t {
- H5FL_arr_head_t *list; /* Pointer to the head of the list to garbage collect */
- struct H5FL_gc_arr_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
+ H5FL_arr_head_t * list; /* Pointer to the head of the list to garbage collect */
+ struct H5FL_gc_arr_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
} H5FL_gc_arr_node_t;
/* The garbage collection head for array free lists */
typedef struct H5FL_gc_arr_list_t {
- size_t mem_freed; /* Amount of free memory on list */
- struct H5FL_gc_arr_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
+ size_t mem_freed; /* Amount of free memory on list */
+ struct H5FL_gc_arr_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
} H5FL_gc_arr_list_t;
/* The head of the list of array things to garbage collect */
-static H5FL_gc_arr_list_t H5FL_arr_gc_head={0,NULL};
+static H5FL_gc_arr_list_t H5FL_arr_gc_head = {0, NULL};
/* A garbage collection node for blocks */
typedef struct H5FL_blk_gc_node_t {
- H5FL_blk_head_t *pq; /* Pointer to the head of the PQ to garbage collect */
- struct H5FL_blk_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
+ H5FL_blk_head_t * pq; /* Pointer to the head of the PQ to garbage collect */
+ struct H5FL_blk_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
} H5FL_blk_gc_node_t;
/* The garbage collection head for blocks */
typedef struct H5FL_blk_gc_list_t {
- size_t mem_freed; /* Amount of free memory on list */
- struct H5FL_blk_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
+ size_t mem_freed; /* Amount of free memory on list */
+ struct H5FL_blk_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
} H5FL_blk_gc_list_t;
/* The head of the list of PQs to garbage collect */
-static H5FL_blk_gc_list_t H5FL_blk_gc_head={0,NULL};
+static H5FL_blk_gc_list_t H5FL_blk_gc_head = {0, NULL};
/* A garbage collection node for factory free lists */
struct H5FL_fac_gc_node_t {
- H5FL_fac_head_t *list; /* Pointer to the head of the list to garbage collect */
- struct H5FL_fac_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
+ H5FL_fac_head_t * list; /* Pointer to the head of the list to garbage collect */
+ struct H5FL_fac_gc_node_t *next; /* Pointer to the next node in the list of things to garbage collect */
};
/* The garbage collection head for factory free lists */
typedef struct H5FL_fac_gc_list_t {
- size_t mem_freed; /* Amount of free memory on list */
- struct H5FL_fac_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
+ size_t mem_freed; /* Amount of free memory on list */
+ struct H5FL_fac_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
} H5FL_fac_gc_list_t;
/* Data structure to store each block in factory free list */
struct H5FL_fac_node_t {
- struct H5FL_fac_node_t *next; /* Pointer to next block in free list */
+ struct H5FL_fac_node_t *next; /* Pointer to next block in free list */
};
/* The head of the list of factory things to garbage collect */
-static H5FL_fac_gc_list_t H5FL_fac_gc_head={0,NULL};
+static H5FL_fac_gc_list_t H5FL_fac_gc_head = {0, NULL};
#ifdef H5FL_TRACK
/* Extra headers needed */
-#include "H5CSprivate.h" /* Function stack */
+#include "H5CSprivate.h" /* Function stack */
/* Head of "outstanding allocations" list */
static H5FL_track_t *H5FL_out_head_g = NULL;
@@ -146,7 +146,6 @@ H5FL_DEFINE(H5FL_fac_gc_node_t);
/* Declare a free list to manage the H5FL_fac_head_t struct */
H5FL_DEFINE(H5FL_fac_head_t);
-
/*--------------------------------------------------------------------------
NAME
H5FL_init_interface -- Initialize interface-specific information
@@ -169,7 +168,6 @@ H5FL_init_interface(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FL_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_malloc
*
@@ -182,33 +180,30 @@ H5FL_init_interface(void)
* Programmer: Quincey Koziol
* Tuesday, August 1, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5FL_malloc(size_t mem_size)
{
- void *ret_value; /* return value*/
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Attempt to allocate the memory requested */
- if(NULL==(ret_value=H5MM_malloc(mem_size))) {
+ if (NULL == (ret_value = H5MM_malloc(mem_size))) {
/* If we can't allocate the memory now, try garbage collecting first */
- if(H5FL_garbage_coll()<0)
+ if (H5FL_garbage_coll() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during allocation")
/* Now try allocating the memory again */
- if(NULL==(ret_value=H5MM_malloc(mem_size)))
+ if (NULL == (ret_value = H5MM_malloc(mem_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_malloc() */
+} /* end H5FL_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_init
*
@@ -221,65 +216,59 @@ done:
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_reg_init(H5FL_reg_head_t *head)
{
- H5FL_reg_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_reg_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
- if(NULL == (new_node = (H5FL_reg_gc_node_t *)H5MM_malloc(sizeof(H5FL_reg_gc_node_t))))
+ if (NULL == (new_node = (H5FL_reg_gc_node_t *)H5MM_malloc(sizeof(H5FL_reg_gc_node_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the new garbage collection node */
new_node->list = head;
/* Link in to the garbage collection list */
- new_node->next=H5FL_reg_gc_head.first;
- H5FL_reg_gc_head.first=new_node;
+ new_node->next = H5FL_reg_gc_head.first;
+ H5FL_reg_gc_head.first = new_node;
/* Indicate that the free list is initialized */
- head->init=1;
+ head->init = 1;
/* Make certain that the space allocated is large enough to store a free list pointer (eventually) */
- if(head->size<sizeof(H5FL_reg_node_t))
- head->size=sizeof(H5FL_reg_node_t);
+ if (head->size < sizeof(H5FL_reg_node_t))
+ head->size = sizeof(H5FL_reg_node_t);
- /* Make certain there's room for tracking information, if any */
+ /* Make certain there's room for tracking information, if any */
#ifdef H5FL_TRACK
head->size += sizeof(H5FL_track_t);
#endif /* H5FL_TRACK */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_reg_init() */
+} /* end H5FL_reg_init() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_free
*
* Purpose: Release an object & put on free list
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Always returns NULL
*
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
{
- void *ret_value=NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
/* NOINIT OK here because this must be called after H5FL_reg_malloc/calloc
* -NAF */
@@ -296,58 +285,57 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
/* Free tracking information about the allocation location */
H5CS_close_stack(trk->stack);
trk->stack = H5MM_xfree(trk->stack);
- trk->file = H5MM_xfree(trk->file);
- trk->func = H5MM_xfree(trk->func);
+ trk->file = H5MM_xfree(trk->file);
+ trk->func = H5MM_xfree(trk->func);
/* Remove from "outstanding allocations" list */
- if(trk == H5FL_out_head_g) {
+ if (trk == H5FL_out_head_g) {
H5FL_out_head_g = H5FL_out_head_g->next;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = NULL;
} /* end if */
else {
trk->prev->next = trk->next;
- if(trk->next)
+ if (trk->next)
trk->next->prev = trk->prev;
} /* end else */
}
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj,255,head->size);
+ HDmemset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
HDassert(head->init);
/* Link into the free list */
- ((H5FL_reg_node_t *)obj)->next=head->list;
+ ((H5FL_reg_node_t *)obj)->next = head->list;
/* Point free list at the node freed */
- head->list=(H5FL_reg_node_t *)obj;
+ head->list = (H5FL_reg_node_t *)obj;
/* Increment the number of blocks on free list */
head->onlist++;
/* Increment the amount of "regular" freed memory globally */
- H5FL_reg_gc_head.mem_freed+=head->size;
+ H5FL_reg_gc_head.mem_freed += head->size;
/* Check for exceeding free list memory use limits */
/* First check this particular list */
- if(head->onlist * head->size > H5FL_reg_lst_mem_lim)
- if(H5FL_reg_gc_list(head)<0)
+ if (head->onlist * head->size > H5FL_reg_lst_mem_lim)
+ if (H5FL_reg_gc_list(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
/* Then check the global amount memory on regular free lists */
- if(H5FL_reg_gc_head.mem_freed>H5FL_reg_glb_mem_lim)
- if(H5FL_reg_gc()<0)
+ if (H5FL_reg_gc_head.mem_freed > H5FL_reg_glb_mem_lim)
+ if (H5FL_reg_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_reg_free() */
+} /* end H5FL_reg_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_malloc
*
@@ -359,14 +347,12 @@ done:
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to object to return */
FUNC_ENTER_NOAPI(NULL)
@@ -374,27 +360,27 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
HDassert(head);
/* Make certain the list is initialized first */
- if(!head->init)
- if(H5FL_reg_init(head)<0)
+ if (!head->init)
+ if (H5FL_reg_init(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'regular' blocks")
/* Check for nodes available on the free list first */
- if(head->list!=NULL) {
+ if (head->list != NULL) {
/* Get a pointer to the block on the free list */
- ret_value=(void *)(head->list);
+ ret_value = (void *)(head->list);
/* Remove node from free list */
- head->list=head->list->next;
+ head->list = head->list->next;
/* Decrement the number of blocks & memory on free list */
head->onlist--;
/* Decrement the amount of global "regular" free list memory in use */
- H5FL_reg_gc_head.mem_freed-=(head->size);
+ H5FL_reg_gc_head.mem_freed -= (head->size);
} /* end if */
/* Otherwise allocate a node */
else {
- if (NULL==(ret_value = H5FL_malloc(head->size)))
+ if (NULL == (ret_value = H5FL_malloc(head->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Increment the number of blocks allocated in list */
@@ -412,7 +398,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
/* Add to "outstanding allocations" list */
((H5FL_track_t *)ret_value)->prev = NULL;
((H5FL_track_t *)ret_value)->next = H5FL_out_head_g;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = (H5FL_track_t *)ret_value;
H5FL_out_head_g = (H5FL_track_t *)ret_value;
@@ -422,9 +408,8 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_reg_malloc() */
+} /* end H5FL_reg_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_calloc
*
@@ -436,14 +421,12 @@ done:
* Programmer: Quincey Koziol
* Monday, December 23, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to object to return */
FUNC_ENTER_NOAPI(NULL)
@@ -451,18 +434,17 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
HDassert(head);
/* Allocate the block */
- if (NULL==(ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT)))
+ if (NULL == (ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value,0,head->size - H5FL_TRACK_SIZE);
+ HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_reg_calloc() */
+} /* end H5FL_reg_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_gc_list
*
@@ -474,26 +456,24 @@ done:
* Programmer: Quincey Koziol
* Tuesday, July 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_reg_gc_list(H5FL_reg_head_t *head)
{
H5FL_reg_node_t *free_list; /* Pointer to nodes in free list being garbage collected */
- void *tmp; /* Temporary node pointer */
- size_t total_mem; /* Total memory used on list */
+ void * tmp; /* Temporary node pointer */
+ size_t total_mem; /* Total memory used on list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Calculate the total memory used on this list */
- total_mem=head->onlist*head->size;
+ total_mem = head->onlist * head->size;
/* For each free list being garbage collected, walk through the nodes and free them */
- free_list=head->list;
- while(free_list!=NULL) {
- tmp=free_list->next;
+ free_list = head->list;
+ while (free_list != NULL) {
+ tmp = free_list->next;
/* Decrement the count of nodes allocated and free the node */
head->allocated--;
@@ -504,16 +484,15 @@ H5FL_reg_gc_list(H5FL_reg_head_t *head)
} /* end while */
/* Indicate no free nodes on the free list */
- head->list=NULL;
- head->onlist=0;
+ head->list = NULL;
+ head->onlist = 0;
/* Decrement global count of free memory on "regular" lists */
- H5FL_reg_gc_head.mem_freed-=total_mem;
+ H5FL_reg_gc_head.mem_freed -= total_mem;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FL_reg_gc_list() */
+} /* end H5FL_reg_gc_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_reg_gc
*
@@ -525,39 +504,34 @@ H5FL_reg_gc_list(H5FL_reg_head_t *head)
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- * Broke into two parts, one for looping over all the free lists and
- * another for freeing each list - QAK 7/25/00
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_reg_gc(void)
{
- H5FL_reg_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_reg_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
- gc_node=H5FL_reg_gc_head.first;
- while(gc_node!=NULL) {
+ gc_node = H5FL_reg_gc_head.first;
+ while (gc_node != NULL) {
/* Release the free nodes on the list */
- if(H5FL_reg_gc_list(gc_node->list)<0)
+ if (H5FL_reg_gc_list(gc_node->list) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed")
/* Go on to the next free list to garbage collect */
- gc_node=gc_node->next;
+ gc_node = gc_node->next;
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_reg_gc_head.mem_freed==0);
+ HDassert(H5FL_reg_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_reg_gc() */
+} /* end H5FL_reg_gc() */
-
/*--------------------------------------------------------------------------
NAME
H5FL_reg_term
@@ -568,7 +542,7 @@ done:
RETURNS
Success: Positive if any action might have caused a change in some
other interface; zero otherwise.
- Failure: Negative
+ Failure: Negative
DESCRIPTION
Release any resources allocated.
GLOBAL VARIABLES
@@ -586,40 +560,41 @@ done:
static int
H5FL_reg_term(void)
{
- H5FL_reg_gc_node_t *left; /* pointer to garbage collection lists with work left */
- H5FL_reg_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
+ H5FL_reg_gc_node_t *left; /* pointer to garbage collection lists with work left */
+ H5FL_reg_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5_interface_initialize_g) {
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
- left=NULL;
- while(H5FL_reg_gc_head.first!=NULL) {
- tmp=H5FL_reg_gc_head.first->next;
+ left = NULL;
+ while (H5FL_reg_gc_head.first != NULL) {
+ tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
- printf("H5FL_reg_term: head->name=%s, head->allocated=%d\n", H5FL_reg_gc_head.first->list->name,(int)H5FL_reg_gc_head.first->list->allocated);
+ printf("H5FL_reg_term: head->name=%s, head->allocated=%d\n", H5FL_reg_gc_head.first->list->name,
+ (int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
- if(H5FL_reg_gc_head.first->list->allocated>0) {
+ if (H5FL_reg_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
- H5FL_reg_gc_head.first->next=left;
- left=H5FL_reg_gc_head.first;
+ H5FL_reg_gc_head.first->next = left;
+ left = H5FL_reg_gc_head.first;
} /* end if */
/* No allocations left open for list, get rid of it */
else {
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_reg_gc_head.first->list->init=0;
+ H5FL_reg_gc_head.first->list->init = 0;
/* Free the node from the garbage collection list */
H5MM_xfree(H5FL_reg_gc_head.first);
} /* end else */
- H5FL_reg_gc_head.first=tmp;
+ H5FL_reg_gc_head.first = tmp;
} /* end while */
/* Point to the list of nodes left with allocations open, if any */
- H5FL_reg_gc_head.first=left;
+ H5FL_reg_gc_head.first = left;
if (!left)
H5_interface_initialize_g = 0; /*this layer has reached its initial state*/
}
@@ -627,9 +602,8 @@ H5FL_reg_term(void)
/* Terminating this layer never affects other layers; rather, other layers affect
* the termination of this layer. */
FUNC_LEAVE_NOAPI(0)
-} /* end H5FL_reg_term() */
+} /* end H5FL_reg_term() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_find_list
*
@@ -645,54 +619,51 @@ H5FL_reg_term(void)
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5FL_blk_node_t *
H5FL_blk_find_list(H5FL_blk_node_t **head, size_t size)
{
- H5FL_blk_node_t *temp; /* Temp. pointer to node in the native list */
+ H5FL_blk_node_t *temp = NULL; /* Temp. pointer to node in the native list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Find the correct free list */
- temp=*head;
+ temp = *head;
/* Check if the node is at the head of the list */
- if(temp && temp->size!=size) {
- temp=temp->next;
+ if (temp && temp->size != size) {
+ temp = temp->next;
- while(temp!=NULL) {
+ while (temp != NULL) {
/* Check if we found the correct node */
- if(temp->size==size) {
+ if (temp->size == size) {
/* Take the node found out of it's current position */
- if(temp->next==NULL) {
- temp->prev->next=NULL;
+ if (temp->next == NULL) {
+ temp->prev->next = NULL;
} /* end if */
else {
- temp->prev->next=temp->next;
- temp->next->prev=temp->prev;
+ temp->prev->next = temp->next;
+ temp->next->prev = temp->prev;
} /* end else */
/* Move the found node to the head of the list */
- temp->prev=NULL;
- temp->next=*head;
- (*head)->prev=temp;
- *head=temp;
+ temp->prev = NULL;
+ temp->next = *head;
+ (*head)->prev = temp;
+ *head = temp;
/* Get out */
break;
} /* end if */
- temp=temp->next;
+ temp = temp->next;
} /* end while */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(temp)
} /* end H5FL_blk_find_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_create_list
*
@@ -706,45 +677,42 @@ H5FL_blk_find_list(H5FL_blk_node_t **head, size_t size)
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5FL_blk_node_t *
H5FL_blk_create_list(H5FL_blk_node_t **head, size_t size)
{
- H5FL_blk_node_t *temp; /* Temp. pointer to node in the list */
- H5FL_blk_node_t *ret_value;
+ H5FL_blk_node_t *temp; /* Temp. pointer to node in the list */
+ H5FL_blk_node_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allocate room for the new free list node */
- if(NULL==(temp=H5FL_MALLOC(H5FL_blk_node_t)))
+ if (NULL == (temp = H5FL_MALLOC(H5FL_blk_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk info")
/* Set the correct values for the new free list */
- temp->size=size;
- temp->list=NULL;
+ temp->size = size;
+ temp->list = NULL;
/* Attach to head of priority queue */
- if(*head==NULL) {
- *head=temp;
- temp->next=temp->prev=NULL;
+ if (*head == NULL) {
+ *head = temp;
+ temp->next = temp->prev = NULL;
} /* end if */
else {
- temp->next=*head;
- (*head)->prev=temp;
- temp->prev=NULL;
- *head=temp;
+ temp->next = *head;
+ (*head)->prev = temp;
+ temp->prev = NULL;
+ *head = temp;
} /* end else */
- ret_value=temp;
+ ret_value = temp;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_create_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_init
*
@@ -757,37 +725,34 @@ done:
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_blk_init(H5FL_blk_head_t *head)
{
- H5FL_blk_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_blk_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
- if(NULL == (new_node = (H5FL_blk_gc_node_t *)H5MM_malloc(sizeof(H5FL_blk_gc_node_t))))
+ if (NULL == (new_node = (H5FL_blk_gc_node_t *)H5MM_malloc(sizeof(H5FL_blk_gc_node_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the new garbage collection node */
new_node->pq = head;
/* Link in to the garbage collection list */
- new_node->next=H5FL_blk_gc_head.first;
- H5FL_blk_gc_head.first=new_node;
+ new_node->next = H5FL_blk_gc_head.first;
+ H5FL_blk_gc_head.first = new_node;
/* Indicate that the PQ is initialized */
- head->init=1;
+ head->init = 1;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_blk_init() */
+} /* end H5FL_blk_init() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_free_block_avail
*
@@ -800,15 +765,13 @@ done:
* Programmer: Quincey Koziol
* Monday, December 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
{
- H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
- htri_t ret_value; /* Return value */
+ H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -817,15 +780,14 @@ H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
/* check if there is a free list for blocks of this size */
/* and if there are any blocks available on the list */
- if((free_list=H5FL_blk_find_list(&(head->head),size))!=NULL && free_list->list!=NULL)
- ret_value=TRUE;
+ if ((free_list = H5FL_blk_find_list(&(head->head), size)) != NULL && free_list->list != NULL)
+ ret_value = TRUE;
else
- ret_value=FALSE;
+ ret_value = FALSE;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_free_block_avail() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_malloc
*
@@ -840,16 +802,14 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
{
- H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
- H5FL_blk_list_t *temp; /* Temp. ptr to the new native list allocated */
- void *ret_value; /* Pointer to the block to return to the user */
+ H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
+ H5FL_blk_list_t *temp; /* Temp. ptr to the new native list allocated */
+ void * ret_value = NULL; /* Pointer to the block to return to the user */
FUNC_ENTER_NOAPI(NULL)
@@ -858,29 +818,28 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
HDassert(size);
/* Make certain the list is initialized first */
- if(!head->init)
- if(H5FL_blk_init(head)<0)
+ if (!head->init)
+ if (H5FL_blk_init(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'block' list")
/* check if there is a free list for blocks of this size */
/* and if there are any blocks available on the list */
- if((free_list=H5FL_blk_find_list(&(head->head),size))!=NULL && free_list->list!=NULL) {
+ if ((free_list = H5FL_blk_find_list(&(head->head), size)) != NULL && free_list->list != NULL) {
/* Remove the first node from the free list */
- temp=free_list->list;
- free_list->list=free_list->list->next;
+ temp = free_list->list;
+ free_list->list = free_list->list->next;
/* Decrement the number of blocks & memory used on free list */
head->onlist--;
- head->list_mem-=size;
+ head->list_mem -= size;
/* Decrement the amount of global "block" free list memory in use */
- H5FL_blk_gc_head.mem_freed-=size;
-
+ H5FL_blk_gc_head.mem_freed -= size;
} /* end if */
/* No free list available, or there are no nodes on the list, allocate a new node to give to the user */
else {
/* Allocate new node, with room for the page info header and the actual page data */
- if(NULL == (temp = (H5FL_blk_list_t *)H5FL_malloc(sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE + size)))
+ if (NULL == (temp = (H5FL_blk_list_t *)H5FL_malloc(sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE + size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk")
/* Increment the number of blocks allocated */
@@ -888,10 +847,10 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
} /* end else */
/* Initialize the block allocated */
- temp->size=size;
+ temp->size = size;
/* Set the return value to the block itself */
- ret_value=((char *)temp)+sizeof(H5FL_blk_list_t);
+ ret_value = ((char *)temp) + sizeof(H5FL_blk_list_t);
#ifdef H5FL_TRACK
/* Copy allocation location information */
@@ -904,7 +863,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
/* Add to "outstanding allocations" list */
((H5FL_track_t *)ret_value)->prev = NULL;
((H5FL_track_t *)ret_value)->next = H5FL_out_head_g;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = (H5FL_track_t *)ret_value;
H5FL_out_head_g = (H5FL_track_t *)ret_value;
@@ -916,7 +875,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_calloc
*
@@ -932,14 +890,12 @@ done:
* Programmer: Quincey Koziol
* Monday, December 23, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to the block to return to the user */
+ void *ret_value = NULL; /* Pointer to the block to return to the user */
FUNC_ENTER_NOAPI(NULL)
@@ -948,17 +904,16 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
HDassert(size);
/* Allocate the block */
- if (NULL==(ret_value = H5FL_blk_malloc(head,size H5FL_TRACK_INFO_INT)))
+ if (NULL == (ret_value = H5FL_blk_malloc(head, size H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the block to zeros */
- HDmemset(ret_value,0,size);
+ HDmemset(ret_value, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_free
*
@@ -973,17 +928,15 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_blk_free(H5FL_blk_head_t *head, void *block)
{
- H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
- H5FL_blk_list_t *temp; /* Temp. ptr to the new free list node allocated */
- size_t free_size; /* Size of the block freed */
- void *ret_value=NULL; /* Return value */
+ H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
+ H5FL_blk_list_t *temp; /* Temp. ptr to the new free list node allocated */
+ size_t free_size; /* Size of the block freed */
+ void * ret_value = NULL; /* Return value */
/* NOINIT OK here because this must be called after H5FL_blk_malloc/calloc
* -NAF */
@@ -1000,69 +953,71 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
/* Free tracking information about the allocation location */
H5CS_close_stack(trk->stack);
trk->stack = H5MM_xfree(trk->stack);
- trk->file = H5MM_xfree(trk->file);
- trk->func = H5MM_xfree(trk->func);
+ trk->file = H5MM_xfree(trk->file);
+ trk->func = H5MM_xfree(trk->func);
/* Remove from "outstanding allocations" list */
- if(trk == H5FL_out_head_g) {
+ if (trk == H5FL_out_head_g) {
H5FL_out_head_g = H5FL_out_head_g->next;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = NULL;
} /* end if */
else {
trk->prev->next = trk->next;
- if(trk->next)
+ if (trk->next)
trk->next->prev = trk->prev;
} /* end else */
}
#endif /* H5FL_TRACK */
/* Get the pointer to the native block info header in front of the native block to free */
- temp=(H5FL_blk_list_t *)((unsigned char *)block-sizeof(H5FL_blk_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
+ temp =
+ (H5FL_blk_list_t *)((unsigned char *)block -
+ sizeof(
+ H5FL_blk_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
/* Save the block's size for later */
- free_size=temp->size;
+ free_size = temp->size;
#ifdef H5FL_DEBUG
- HDmemset(temp,255,free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
+ HDmemset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
#endif /* H5FL_DEBUG */
- /* check if there is a free list for native blocks of this size */
- if((free_list=H5FL_blk_find_list(&(head->head),free_size))==NULL) {
+ /* Check if there is a free list for native blocks of this size */
+ if ((free_list = H5FL_blk_find_list(&(head->head), free_size)) == NULL) {
/* No free list available, create a new list node and insert it to the queue */
- free_list=H5FL_blk_create_list(&(head->head),free_size);
+ free_list = H5FL_blk_create_list(&(head->head), free_size);
HDassert(free_list);
} /* end if */
/* Prepend the free'd native block to the front of the free list */
- if(free_list!=NULL) {
- temp->next=free_list->list; /* Overwrites the size field in union */
- free_list->list=temp;
+ if (free_list != NULL) {
+ temp->next = free_list->list; /* Overwrites the size field in union */
+ free_list->list = temp;
} /* end if */
/* Increment the number of blocks on free list */
head->onlist++;
- head->list_mem+=free_size;
+ head->list_mem += free_size;
/* Increment the amount of "block" freed memory globally */
- H5FL_blk_gc_head.mem_freed+=free_size;
+ H5FL_blk_gc_head.mem_freed += free_size;
/* Check for exceeding free list memory use limits */
/* First check this particular list */
- if(head->list_mem>H5FL_blk_lst_mem_lim)
- if(H5FL_blk_gc_list(head)<0)
+ if (head->list_mem > H5FL_blk_lst_mem_lim)
+ if (H5FL_blk_gc_list(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
/* Then check the global amount memory on block free lists */
- if(H5FL_blk_gc_head.mem_freed>H5FL_blk_glb_mem_lim)
- if(H5FL_blk_gc()<0)
+ if (H5FL_blk_gc_head.mem_freed > H5FL_blk_glb_mem_lim)
+ if (H5FL_blk_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_realloc
*
@@ -1076,14 +1031,12 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_PARAMS)
{
- void *ret_value=NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1092,21 +1045,24 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
HDassert(new_size);
/* Check if we are actually re-allocating a block */
- if(block!=NULL) {
- H5FL_blk_list_t *temp; /* Temp. ptr to the new block node allocated */
+ if (block != NULL) {
+ H5FL_blk_list_t *temp; /* Temp. ptr to the new block node allocated */
/* Get the pointer to the chunk info header in front of the chunk to free */
- temp=(H5FL_blk_list_t *)((unsigned char *)block - (sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
+ temp = (H5FL_blk_list_t
+ *)((unsigned char *)block -
+ (sizeof(H5FL_blk_list_t) +
+ H5FL_TRACK_SIZE)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
/* check if we are actually changing the size of the buffer */
- if(new_size!=temp->size) {
- size_t blk_size; /* Temporary block size */
+ if (new_size != temp->size) {
+ size_t blk_size; /* Temporary block size */
- if((ret_value=H5FL_blk_malloc(head,new_size H5FL_TRACK_INFO_INT))==NULL)
+ if ((ret_value = H5FL_blk_malloc(head, new_size H5FL_TRACK_INFO_INT)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block")
- blk_size=MIN(new_size,temp->size);
- HDmemcpy(ret_value,block,blk_size);
- H5FL_blk_free(head,block);
+ blk_size = MIN(new_size, temp->size);
+ HDmemcpy(ret_value, block, blk_size);
+ H5FL_blk_free(head, block);
} /* end if */
else {
#ifdef H5FL_TRACK
@@ -1125,18 +1081,17 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
trk->line = call_line;
}
#endif /* H5FL_TRACK */
- ret_value=block;
+ ret_value = block;
} /* end if */
- } /* end if */
+ } /* end if */
/* Not re-allocating, just allocate a fresh block */
else
- ret_value=H5FL_blk_malloc(head,new_size H5FL_TRACK_INFO_INT);
+ ret_value = H5FL_blk_malloc(head, new_size H5FL_TRACK_INFO_INT);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_realloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_gc_list
*
@@ -1148,34 +1103,32 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_blk_gc_list(H5FL_blk_head_t *head)
{
H5FL_blk_list_t *list; /* The free list of native nodes of a particular size */
- void *next; /* Temp. ptr to the free list list node */
- void *temp; /* Temp. ptr to the free list page node */
+ void * next; /* Temp. ptr to the free list list node */
+ void * temp; /* Temp. ptr to the free list page node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Loop through all the nodes in the block free list queue */
- while(head->head!=NULL) {
- temp=head->head->next;
+ while (head->head != NULL) {
+ temp = head->head->next;
/* Loop through all the blocks in the free list, freeing them */
- list=head->head->list;
- while(list!=NULL) {
- next=list->next;
+ list = head->head->list;
+ while (list != NULL) {
+ next = list->next;
/* Decrement the number of blocks & memory allocated from this PQ */
head->allocated--;
- head->list_mem-=head->head->size;
+ head->list_mem -= head->head->size;
/* Decrement global count of free memory on "block" lists */
- H5FL_blk_gc_head.mem_freed-=head->head->size;
+ H5FL_blk_gc_head.mem_freed -= head->head->size;
/* Free the block */
H5MM_free(list);
@@ -1191,16 +1144,15 @@ H5FL_blk_gc_list(H5FL_blk_head_t *head)
} /* end while */
/* Indicate no free nodes on the free list */
- head->head = NULL;
+ head->head = NULL;
head->onlist = 0;
/* Double check that all the memory on this list is recycled */
HDassert(0 == head->list_mem);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FL_blk_gc_list() */
+} /* end H5FL_blk_gc_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_blk_gc
*
@@ -1212,37 +1164,34 @@ H5FL_blk_gc_list(H5FL_blk_head_t *head)
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_blk_gc(void)
{
- H5FL_blk_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_blk_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
- gc_node=H5FL_blk_gc_head.first;
- while(gc_node!=NULL) {
+ gc_node = H5FL_blk_gc_head.first;
+ while (gc_node != NULL) {
/* For each free list being garbage collected, walk through the nodes and free them */
- if(H5FL_blk_gc_list(gc_node->pq)<0)
+ if (H5FL_blk_gc_list(gc_node->pq) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed")
/* Go on to the next free list to garbage collect */
- gc_node=gc_node->next;
+ gc_node = gc_node->next;
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_blk_gc_head.mem_freed==0);
+ HDassert(H5FL_blk_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_blk_gc() */
+} /* end H5FL_blk_gc() */
-
/*--------------------------------------------------------------------------
NAME
H5FL_blk_term
@@ -1253,7 +1202,7 @@ done:
RETURNS
Success: Positive if any action might have caused a change in some
other interface; zero otherwise.
- Failure: Negative
+ Failure: Negative
DESCRIPTION
Release any resources allocated.
GLOBAL VARIABLES
@@ -1265,45 +1214,45 @@ done:
static int
H5FL_blk_term(void)
{
- H5FL_blk_gc_node_t *left; /* pointer to garbage collection lists with work left */
- H5FL_blk_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
+ H5FL_blk_gc_node_t *left; /* pointer to garbage collection lists with work left */
+ H5FL_blk_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
- left=NULL;
- while(H5FL_blk_gc_head.first!=NULL) {
- tmp=H5FL_blk_gc_head.first->next;
+ left = NULL;
+ while (H5FL_blk_gc_head.first != NULL) {
+ tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("H5FL_blk_term: head->name=%s, head->allocated=%d\n", H5FL_blk_gc_head.first->pq->name,(int)H5FL_blk_gc_head.first->pq->allocated);
+ HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name,
+ (int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
- if(H5FL_blk_gc_head.first->pq->allocated>0) {
+ if (H5FL_blk_gc_head.first->pq->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
- H5FL_blk_gc_head.first->next=left;
- left=H5FL_blk_gc_head.first;
+ H5FL_blk_gc_head.first->next = left;
+ left = H5FL_blk_gc_head.first;
} /* end if */
/* No allocations left open for list, get rid of it */
else {
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_blk_gc_head.first->pq->init=0;
+ H5FL_blk_gc_head.first->pq->init = 0;
/* Free the node from the garbage collection list */
H5MM_free(H5FL_blk_gc_head.first);
} /* end else */
- H5FL_blk_gc_head.first=tmp;
+ H5FL_blk_gc_head.first = tmp;
} /* end while */
/* Point to the list of nodes left with allocations open, if any */
- H5FL_blk_gc_head.first=left;
+ H5FL_blk_gc_head.first = left;
- FUNC_LEAVE_NOAPI(H5FL_blk_gc_head.first!=NULL ? 1 : 0)
-} /* end H5FL_blk_term() */
+ FUNC_LEAVE_NOAPI(H5FL_blk_gc_head.first != NULL ? 1 : 0)
+} /* end H5FL_blk_term() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_init
*
@@ -1316,36 +1265,35 @@ printf("H5FL_blk_term: head->name=%s, head->allocated=%d\n", H5FL_blk_gc_head.fi
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_arr_init(H5FL_arr_head_t *head)
{
- H5FL_gc_arr_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
- size_t u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_gc_arr_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
- if(NULL == (new_node = (H5FL_gc_arr_node_t *)H5MM_malloc(sizeof(H5FL_gc_arr_node_t))))
+ if (NULL == (new_node = (H5FL_gc_arr_node_t *)H5MM_malloc(sizeof(H5FL_gc_arr_node_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the new garbage collection node */
new_node->list = head;
/* Link in to the garbage collection list */
- new_node->next=H5FL_arr_gc_head.first;
- H5FL_arr_gc_head.first=new_node;
+ new_node->next = H5FL_arr_gc_head.first;
+ H5FL_arr_gc_head.first = new_node;
/* Allocate room for the free lists */
- if(NULL == (head->list_arr = (H5FL_arr_node_t *)H5MM_calloc((size_t)head->maxelem*sizeof(H5FL_arr_node_t))))
+ if (NULL ==
+ (head->list_arr = (H5FL_arr_node_t *)H5MM_calloc((size_t)head->maxelem * sizeof(H5FL_arr_node_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the size of each array */
- for(u = 0; u < (size_t)head->maxelem; u++)
+ for (u = 0; u < (size_t)head->maxelem; u++)
head->list_arr[u].size = head->base_size + (head->elem_size * u);
/* Indicate that the free list is initialized */
@@ -1353,9 +1301,8 @@ H5FL_arr_init(H5FL_arr_head_t *head)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_init() */
+} /* end H5FL_arr_init() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_free
*
@@ -1367,17 +1314,15 @@ done:
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
{
- H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
- size_t mem_size; /* Size of memory being freed */
- size_t free_nelem; /* Number of elements in node being free'd */
- void *ret_value=NULL; /* Return value */
+ H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
+ size_t mem_size; /* Size of memory being freed */
+ size_t free_nelem; /* Number of elements in node being free'd */
+ void * ret_value = NULL; /* Return value */
/* NOINIT OK here because this must be called after H5FL_arr_malloc/calloc
* -NAF */
@@ -1385,7 +1330,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
/* The H5MM_xfree code allows obj to null */
if (!obj)
- HGOTO_DONE (NULL)
+ HGOTO_DONE(NULL)
/* Double check parameters */
HDassert(head);
@@ -1394,46 +1339,48 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
HDassert(head->init);
/* Get the pointer to the info header in front of the block to free */
- temp=(H5FL_arr_list_t *)((unsigned char *)obj-sizeof(H5FL_arr_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
+ temp =
+ (H5FL_arr_list_t *)((unsigned char *)obj -
+ sizeof(
+ H5FL_arr_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
/* Get the number of elements */
- free_nelem=temp->nelem;
+ free_nelem = temp->nelem;
/* Double-check that there is enough room for arrays of this size */
- HDassert((int)free_nelem<=head->maxelem);
+ HDassert((int)free_nelem <= head->maxelem);
/* Link into the free list */
- temp->next=head->list_arr[free_nelem].list;
+ temp->next = head->list_arr[free_nelem].list;
/* Point free list at the node freed */
- head->list_arr[free_nelem].list=temp;
+ head->list_arr[free_nelem].list = temp;
/* Get the size of arrays with this many elements */
- mem_size=head->list_arr[free_nelem].size;
+ mem_size = head->list_arr[free_nelem].size;
/* Increment the number of blocks & memory used on free list */
head->list_arr[free_nelem].onlist++;
- head->list_mem+=mem_size;
+ head->list_mem += mem_size;
/* Increment the amount of "array" freed memory globally */
- H5FL_arr_gc_head.mem_freed+=mem_size;
+ H5FL_arr_gc_head.mem_freed += mem_size;
/* Check for exceeding free list memory use limits */
/* First check this particular list */
- if(head->list_mem>H5FL_arr_lst_mem_lim)
- if(H5FL_arr_gc_list(head)<0)
+ if (head->list_mem > H5FL_arr_lst_mem_lim)
+ if (H5FL_arr_gc_list(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
/* Then check the global amount memory on array free lists */
- if(H5FL_arr_gc_head.mem_freed>H5FL_arr_glb_mem_lim)
- if(H5FL_arr_gc()<0)
+ if (H5FL_arr_gc_head.mem_freed > H5FL_arr_glb_mem_lim)
+ if (H5FL_arr_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_free() */
+} /* end H5FL_arr_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_malloc
*
@@ -1445,16 +1392,14 @@ done:
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem)
{
- H5FL_arr_list_t *new_obj; /* Pointer to the new free list node allocated */
- void *ret_value; /* Pointer to object to return */
- size_t mem_size; /* Size of memory block being recycled */
+ H5FL_arr_list_t *new_obj; /* Pointer to the new free list node allocated */
+ size_t mem_size; /* Size of memory block being recycled */
+ void * ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1463,35 +1408,35 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem)
HDassert(elem);
/* Make certain the list is initialized first */
- if(!head->init)
- if(H5FL_arr_init(head)<0)
+ if (!head->init)
+ if (H5FL_arr_init(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'array' blocks")
/* Sanity check that the number of elements is supported */
- HDassert(elem<=(unsigned) head->maxelem);
+ HDassert(elem <= (unsigned)head->maxelem);
/* Get the set of the memory block */
- mem_size=head->list_arr[elem].size;
+ mem_size = head->list_arr[elem].size;
/* Check for nodes available on the free list first */
- if(head->list_arr[elem].list!=NULL) {
+ if (head->list_arr[elem].list != NULL) {
/* Get a pointer to the block on the free list */
- new_obj=head->list_arr[elem].list;
+ new_obj = head->list_arr[elem].list;
/* Remove node from free list */
- head->list_arr[elem].list=head->list_arr[elem].list->next;
+ head->list_arr[elem].list = head->list_arr[elem].list->next;
/* Decrement the number of blocks & memory used on free list */
head->list_arr[elem].onlist--;
- head->list_mem-=mem_size;
+ head->list_mem -= mem_size;
/* Decrement the amount of global "array" free list memory in use */
- H5FL_arr_gc_head.mem_freed-=mem_size;
+ H5FL_arr_gc_head.mem_freed -= mem_size;
} /* end if */
/* Otherwise allocate a node */
else {
- if(NULL == (new_obj = (H5FL_arr_list_t *)H5FL_malloc(sizeof(H5FL_arr_list_t)+mem_size)))
+ if (NULL == (new_obj = (H5FL_arr_list_t *)H5FL_malloc(sizeof(H5FL_arr_list_t) + mem_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Increment the number of blocks allocated in list */
@@ -1499,16 +1444,15 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem)
} /* end else */
/* Initialize the new object */
- new_obj->nelem=elem;
+ new_obj->nelem = elem;
/* Get a pointer to the new block */
- ret_value=((char *)new_obj)+sizeof(H5FL_arr_list_t);
+ ret_value = ((char *)new_obj) + sizeof(H5FL_arr_list_t);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_malloc() */
+} /* end H5FL_arr_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_calloc
*
@@ -1520,14 +1464,12 @@ done:
* Programmer: Quincey Koziol
* Monday, December 23, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1536,7 +1478,7 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem)
HDassert(elem);
/* Allocate the array */
- if(NULL == (ret_value = H5FL_arr_malloc(head, elem)))
+ if (NULL == (ret_value = H5FL_arr_malloc(head, elem)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
@@ -1544,9 +1486,8 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_calloc() */
+} /* end H5FL_arr_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_realloc
*
@@ -1558,14 +1499,12 @@ done:
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
-H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
+H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1574,40 +1513,41 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
HDassert(new_elem);
/* Check if we are really allocating the object */
- if(obj==NULL)
- ret_value=H5FL_arr_malloc(head,new_elem);
+ if (obj == NULL)
+ ret_value = H5FL_arr_malloc(head, new_elem);
else {
- H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
+ H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
/* Sanity check that the number of elements is supported */
- HDassert((int)new_elem<=head->maxelem);
+ HDassert((int)new_elem <= head->maxelem);
/* Get the pointer to the info header in front of the block to free */
- temp=(H5FL_arr_list_t *)((unsigned char *)obj-sizeof(H5FL_arr_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
+ temp = (H5FL_arr_list_t
+ *)((unsigned char *)obj -
+ sizeof(H5FL_arr_list_t)); /*lint !e826 Pointer-to-pointer cast is appropriate here */
/* Check if the size is really changing */
- if(temp->nelem!=new_elem) {
- size_t blk_size; /* Size of block */
+ if (temp->nelem != new_elem) {
+ size_t blk_size; /* Size of block */
/* Get the new array of objects */
- ret_value=H5FL_arr_malloc(head,new_elem);
+ ret_value = H5FL_arr_malloc(head, new_elem);
/* Copy the appropriate amount of elements */
- blk_size = head->list_arr[ MIN(temp->nelem, new_elem) ].size;
- HDmemcpy(ret_value,obj,blk_size);
+ blk_size = head->list_arr[MIN(temp->nelem, new_elem)].size;
+ HDmemcpy(ret_value, obj, blk_size);
/* Free the old block */
- H5FL_arr_free(head,obj);
+ H5FL_arr_free(head, obj);
} /* end if */
else
- ret_value=obj;
+ ret_value = obj;
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_realloc() */
+} /* end H5FL_arr_realloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_gc_list
*
@@ -1619,29 +1559,27 @@ done:
* Programmer: Quincey Koziol
* Tuesday, July 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_arr_gc_list(H5FL_arr_head_t *head)
{
H5FL_arr_list_t *arr_free_list; /* Pointer to nodes in free list being garbage collected */
- void *tmp; /* Temporary node pointer */
- unsigned u; /* Counter for array of free lists */
- size_t total_mem; /* Total memory used on list */
+ void * tmp; /* Temporary node pointer */
+ unsigned u; /* Counter for array of free lists */
+ size_t total_mem; /* Total memory used on list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Walk through the array of free lists */
- for(u=0; u<(unsigned)head->maxelem; u++) {
- if(head->list_arr[u].onlist>0) {
+ for (u = 0; u < (unsigned)head->maxelem; u++) {
+ if (head->list_arr[u].onlist > 0) {
/* Calculate the total memory used on this list */
- total_mem=head->list_arr[u].onlist*head->list_arr[u].size;
+ total_mem = head->list_arr[u].onlist * head->list_arr[u].size;
/* For each free list being garbage collected, walk through the nodes and free them */
- arr_free_list=head->list_arr[u].list;
- while(arr_free_list!=NULL) {
+ arr_free_list = head->list_arr[u].list;
+ while (arr_free_list != NULL) {
tmp = arr_free_list->next;
/* Decrement the count of nodes allocated and free the node */
@@ -1652,24 +1590,23 @@ H5FL_arr_gc_list(H5FL_arr_head_t *head)
} /* end while */
/* Indicate no free nodes on the free list */
- head->list_arr[u].list = NULL;
+ head->list_arr[u].list = NULL;
head->list_arr[u].onlist = 0;
/* Decrement count of free memory on this "array" list */
- head->list_mem-=total_mem;
+ head->list_mem -= total_mem;
/* Decrement global count of free memory on "array" lists */
- H5FL_arr_gc_head.mem_freed-=total_mem;
+ H5FL_arr_gc_head.mem_freed -= total_mem;
} /* end if */
- } /* end for */
+ } /* end for */
/* Double check that all the memory on this list is recycled */
- HDassert(head->list_mem==0);
+ HDassert(head->list_mem == 0);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FL_arr_gc_list() */
+} /* end H5FL_arr_gc_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_arr_gc
*
@@ -1681,37 +1618,34 @@ H5FL_arr_gc_list(H5FL_arr_head_t *head)
* Programmer: Quincey Koziol
* Saturday, March 25, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_arr_gc(void)
{
- H5FL_gc_arr_node_t *gc_arr_node; /* Pointer into the list of things to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_gc_arr_node_t *gc_arr_node; /* Pointer into the list of things to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
- gc_arr_node=H5FL_arr_gc_head.first;
- while(gc_arr_node!=NULL) {
+ gc_arr_node = H5FL_arr_gc_head.first;
+ while (gc_arr_node != NULL) {
/* Release the free nodes on the list */
- if(H5FL_arr_gc_list(gc_arr_node->list)<0)
+ if (H5FL_arr_gc_list(gc_arr_node->list) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed")
/* Go on to the next free list to garbage collect */
- gc_arr_node=gc_arr_node->next;
+ gc_arr_node = gc_arr_node->next;
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_arr_gc_head.mem_freed==0);
+ HDassert(H5FL_arr_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_arr_gc() */
+} /* end H5FL_arr_gc() */
-
/*--------------------------------------------------------------------------
NAME
H5FL_arr_term
@@ -1722,7 +1656,7 @@ done:
RETURNS
Success: Positive if any action might have caused a change in some
other interface; zero otherwise.
- Failure: Negative
+ Failure: Negative
DESCRIPTION
Release any resources allocated.
GLOBAL VARIABLES
@@ -1734,24 +1668,25 @@ done:
static int
H5FL_arr_term(void)
{
- H5FL_gc_arr_node_t *left; /* pointer to garbage collection lists with work left */
- H5FL_gc_arr_node_t *tmp; /* Temporary pointer to a garbage collection node */
+ H5FL_gc_arr_node_t *left; /* pointer to garbage collection lists with work left */
+ H5FL_gc_arr_node_t *tmp; /* Temporary pointer to a garbage collection node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
- left=NULL;
- while(H5FL_arr_gc_head.first!=NULL) {
- tmp=H5FL_arr_gc_head.first->next;
+ left = NULL;
+ while (H5FL_arr_gc_head.first != NULL) {
+ tmp = H5FL_arr_gc_head.first->next;
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
-printf("H5FL_arr_term: head->name=%s, head->allocated=%d\n", H5FL_arr_gc_head.first->list->name,(int)H5FL_arr_gc_head.first->list->allocated);
+ HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name,
+ (int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
- if(H5FL_arr_gc_head.first->list->allocated>0) {
+ if (H5FL_arr_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
- H5FL_arr_gc_head.first->next=left;
- left=H5FL_arr_gc_head.first;
+ H5FL_arr_gc_head.first->next = left;
+ left = H5FL_arr_gc_head.first;
} /* end if */
/* No allocations left open for list, get rid of it */
else {
@@ -1759,22 +1694,21 @@ printf("H5FL_arr_term: head->name=%s, head->allocated=%d\n", H5FL_arr_gc_head.fi
H5MM_xfree(H5FL_arr_gc_head.first->list->list_arr);
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_arr_gc_head.first->list->init=0;
+ H5FL_arr_gc_head.first->list->init = 0;
/* Free the node from the garbage collection list */
H5MM_free(H5FL_arr_gc_head.first);
} /* end else */
- H5FL_arr_gc_head.first=tmp;
+ H5FL_arr_gc_head.first = tmp;
} /* end while */
/* Point to the list of nodes left with allocations open, if any */
- H5FL_arr_gc_head.first=left;
+ H5FL_arr_gc_head.first = left;
- FUNC_LEAVE_NOAPI(H5FL_arr_gc_head.first!=NULL ? 1 : 0)
-} /* end H5FL_arr_term() */
+ FUNC_LEAVE_NOAPI(H5FL_arr_gc_head.first != NULL ? 1 : 0)
+} /* end H5FL_arr_term() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_seq_free
*
@@ -1786,8 +1720,6 @@ printf("H5FL_arr_term: head->name=%s, head->allocated=%d\n", H5FL_arr_gc_head.fi
* Programmer: Quincey Koziol
* Saturday, April 3, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
@@ -1805,12 +1737,11 @@ H5FL_seq_free(H5FL_seq_head_t *head, void *obj)
HDassert(head->queue.init);
/* Use block routine */
- H5FL_blk_free(&(head->queue),obj);
+ H5FL_blk_free(&(head->queue), obj);
FUNC_LEAVE_NOAPI(NULL)
-} /* end H5FL_seq_free() */
+} /* end H5FL_seq_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_seq_malloc
*
@@ -1822,14 +1753,12 @@ H5FL_seq_free(H5FL_seq_head_t *head, void *obj)
* Programmer: Quincey Koziol
* Saturday, April 3, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1838,13 +1767,12 @@ H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
HDassert(elem);
/* Use block routine */
- ret_value=H5FL_blk_malloc(&(head->queue),head->size*elem H5FL_TRACK_INFO_INT);
+ ret_value = H5FL_blk_malloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_seq_malloc() */
+} /* end H5FL_seq_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_seq_calloc
*
@@ -1856,14 +1784,12 @@ done:
* Programmer: Quincey Koziol
* Saturday, April 3, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1872,13 +1798,12 @@ H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
HDassert(elem);
/* Use block routine */
- ret_value=H5FL_blk_calloc(&(head->queue),head->size*elem H5FL_TRACK_INFO_INT);
+ ret_value = H5FL_blk_calloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_seq_calloc() */
+} /* end H5FL_seq_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_seq_realloc
*
@@ -1890,14 +1815,12 @@ done:
* Programmer: Quincey Koziol
* Saturday, April 3, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void *
-H5FL_seq_realloc(H5FL_seq_head_t *head, void * obj, size_t new_elem H5FL_TRACK_PARAMS)
+H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
FUNC_ENTER_NOAPI(NULL)
@@ -1906,13 +1829,12 @@ H5FL_seq_realloc(H5FL_seq_head_t *head, void * obj, size_t new_elem H5FL_TRACK_P
HDassert(new_elem);
/* Use block routine */
- ret_value=H5FL_blk_realloc(&(head->queue),obj,head->size*new_elem H5FL_TRACK_INFO_INT);
+ ret_value = H5FL_blk_realloc(&(head->queue), obj, head->size * new_elem H5FL_TRACK_INFO_INT);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_seq_realloc() */
+} /* end H5FL_seq_realloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_init
*
@@ -1924,19 +1846,14 @@ done:
* Programmer: Quincey Koziol
* Wednesday, February 2, 2005
*
- * Modifications:
- * Neil Fortner
- * Friday, December 19, 2008
- * Totally rewritten to support new factory implementation
- *
*-------------------------------------------------------------------------
*/
H5FL_fac_head_t *
H5FL_fac_init(size_t size)
{
- H5FL_fac_gc_node_t *new_node = NULL; /* Pointer to the node for the new list to garbage collect */
- H5FL_fac_head_t *factory = NULL; /* Pointer to new block factory */
- H5FL_fac_head_t *ret_value; /* Return value */
+ H5FL_fac_gc_node_t *new_node = NULL; /* Pointer to the node for the new list to garbage collect */
+ H5FL_fac_head_t * factory = NULL; /* Pointer to new block factory */
+ H5FL_fac_head_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1944,31 +1861,31 @@ H5FL_fac_init(size_t size)
HDassert(size > 0);
/* Allocate room for the new factory */
- if(NULL == (factory = (H5FL_fac_head_t *)H5FL_CALLOC(H5FL_fac_head_t)))
+ if (NULL == (factory = (H5FL_fac_head_t *)H5FL_CALLOC(H5FL_fac_head_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for factory object")
/* Set size of blocks for factory */
factory->size = size;
/* Allocate a new garbage collection node */
- if(NULL == (new_node = (H5FL_fac_gc_node_t *)H5FL_MALLOC(H5FL_fac_gc_node_t)))
+ if (NULL == (new_node = (H5FL_fac_gc_node_t *)H5FL_MALLOC(H5FL_fac_gc_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Initialize the new garbage collection node */
new_node->list = factory;
/* Link in to the garbage collection list */
- new_node->next = H5FL_fac_gc_head.first;
+ new_node->next = H5FL_fac_gc_head.first;
H5FL_fac_gc_head.first = new_node;
- if(new_node->next)
- new_node->next->list->prev_gc=new_node;
+ if (new_node->next)
+ new_node->next->list->prev_gc = new_node;
/* The new factory's prev_gc field will be set to NULL */
/* Make certain that the space allocated is large enough to store a free list pointer (eventually) */
- if(factory->size < sizeof(H5FL_fac_node_t))
+ if (factory->size < sizeof(H5FL_fac_node_t))
factory->size = sizeof(H5FL_fac_node_t);
- /* Make certain there's room for tracking information, if any */
+ /* Make certain there's room for tracking information, if any */
#ifdef H5FL_TRACK
factory->size += sizeof(H5FL_track_t);
#endif /* H5FL_TRACK */
@@ -1980,17 +1897,16 @@ H5FL_fac_init(size_t size)
ret_value = factory;
done:
- if(!ret_value) {
- if(factory)
+ if (!ret_value) {
+ if (factory)
factory = H5FL_FREE(H5FL_fac_head_t, factory);
- if(new_node)
+ if (new_node)
new_node = H5FL_FREE(H5FL_fac_gc_node_t, new_node);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_init() */
+} /* end H5FL_fac_init() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_free
*
@@ -2001,17 +1917,12 @@ done:
* Programmer: Quincey Koziol
* Wednesday, February 2, 2005
*
- * Modifications:
- * Neil Fortner
- * Friday, December 19, 2008
- * Totally rewritten to support new factory implementation
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
{
- void *ret_value=NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
FUNC_ENTER_NOAPI_NOINIT
@@ -2027,58 +1938,57 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
/* Free tracking information about the allocation location */
H5CS_close_stack(trk->stack);
trk->stack = H5MM_xfree(trk->stack);
- trk->file = H5MM_xfree(trk->file);
- trk->func = H5MM_xfree(trk->func);
+ trk->file = H5MM_xfree(trk->file);
+ trk->func = H5MM_xfree(trk->func);
/* Remove from "outstanding allocations" list */
- if(trk == H5FL_out_head_g) {
+ if (trk == H5FL_out_head_g) {
H5FL_out_head_g = H5FL_out_head_g->next;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = NULL;
} /* end if */
else {
trk->prev->next = trk->next;
- if(trk->next)
+ if (trk->next)
trk->next->prev = trk->prev;
} /* end else */
}
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj,255,head->size);
+ HDmemset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
HDassert(head->init);
/* Link into the free list */
- ((H5FL_fac_node_t *)obj)->next=head->list;
+ ((H5FL_fac_node_t *)obj)->next = head->list;
/* Point free list at the node freed */
- head->list=(H5FL_fac_node_t *)obj;
+ head->list = (H5FL_fac_node_t *)obj;
/* Increment the number of blocks on free list */
head->onlist++;
/* Increment the amount of "factory" freed memory globally */
- H5FL_fac_gc_head.mem_freed+=head->size;
+ H5FL_fac_gc_head.mem_freed += head->size;
/* Check for exceeding free list memory use limits */
/* First check this particular list */
- if(head->onlist * head->size > H5FL_fac_lst_mem_lim)
- if(H5FL_fac_gc_list(head)<0)
+ if (head->onlist * head->size > H5FL_fac_lst_mem_lim)
+ if (H5FL_fac_gc_list(head) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
/* Then check the global amount memory on factory free lists */
- if(H5FL_fac_gc_head.mem_freed > H5FL_fac_glb_mem_lim)
- if(H5FL_fac_gc()<0)
+ if (H5FL_fac_gc_head.mem_freed > H5FL_fac_glb_mem_lim)
+ if (H5FL_fac_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_free() */
+} /* end H5FL_fac_free() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_malloc
*
@@ -2090,17 +2000,12 @@ done:
* Programmer: Quincey Koziol
* Wednesday, February 2, 2005
*
- * Modifications:
- * Neil Fortner
- * Friday, December 19, 2008
- * Totally rewritten to support new factory implementation
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value; /* Pointer to object to return */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
FUNC_ENTER_NOAPI_NOINIT
@@ -2110,22 +2015,22 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
HDassert(head->init);
/* Check for nodes available on the free list first */
- if(head->list!=NULL) {
+ if (head->list != NULL) {
/* Get a pointer to the block on the free list */
- ret_value=(void *)(head->list);
+ ret_value = (void *)(head->list);
/* Remove node from free list */
- head->list=head->list->next;
+ head->list = head->list->next;
/* Decrement the number of blocks & memory on free list */
head->onlist--;
/* Decrement the amount of global "factory" free list memory in use */
- H5FL_fac_gc_head.mem_freed-=(head->size);
+ H5FL_fac_gc_head.mem_freed -= (head->size);
} /* end if */
/* Otherwise allocate a node */
else {
- if (NULL==(ret_value = H5FL_malloc(head->size)))
+ if (NULL == (ret_value = H5FL_malloc(head->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Increment the number of blocks allocated in list */
@@ -2143,7 +2048,7 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
/* Add to "outstanding allocations" list */
((H5FL_track_t *)ret_value)->prev = NULL;
((H5FL_track_t *)ret_value)->next = H5FL_out_head_g;
- if(H5FL_out_head_g)
+ if (H5FL_out_head_g)
H5FL_out_head_g->prev = (H5FL_track_t *)ret_value;
H5FL_out_head_g = (H5FL_track_t *)ret_value;
@@ -2153,9 +2058,8 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_malloc() */
+} /* end H5FL_fac_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_calloc
*
@@ -2167,17 +2071,12 @@ done:
* Programmer: Quincey Koziol
* Wednesday, February 2, 2005
*
- * Modifications:
- * Neil Fortner
- * Friday, December 19, 2008
- * Totally rewritten to support new factory implementation
- *
*-------------------------------------------------------------------------
*/
void *
H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
{
- void *ret_value; /* Pointer to object to return */
+ void *ret_value = NULL; /* Pointer to the block to return */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
FUNC_ENTER_NOAPI_NOINIT
@@ -2186,17 +2085,17 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
HDassert(head);
/* Allocate the block */
- if (NULL==(ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT)))
+ if (NULL == (ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value,0,head->size - H5FL_TRACK_SIZE);
+ HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_calloc() */
-
+} /* end H5FL_fac_calloc() */
+
/*-------------------------------------------------------------------------
* Function: H5FL_fac_gc_list
*
@@ -2208,26 +2107,24 @@ done:
* Programmer: Neil Fortner
* Friday, December 19, 2008
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_fac_gc_list(H5FL_fac_head_t *head)
{
H5FL_fac_node_t *free_list; /* Pointer to nodes in free list being garbage collected */
- void *tmp; /* Temporary node pointer */
- size_t total_mem; /* Total memory used on list */
+ void * tmp; /* Temporary node pointer */
+ size_t total_mem; /* Total memory used on list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Calculate the total memory used on this list */
- total_mem=head->onlist*head->size;
+ total_mem = head->onlist * head->size;
/* For each free list being garbage collected, walk through the nodes and free them */
- free_list=head->list;
- while(free_list!=NULL) {
- tmp=free_list->next;
+ free_list = head->list;
+ while (free_list != NULL) {
+ tmp = free_list->next;
/* Decrement the count of nodes allocated and free the node */
head->allocated--;
@@ -2238,16 +2135,15 @@ H5FL_fac_gc_list(H5FL_fac_head_t *head)
} /* end while */
/* Indicate no free nodes on the free list */
- head->list=NULL;
- head->onlist=0;
+ head->list = NULL;
+ head->onlist = 0;
/* Decrement global count of free memory on "factory" lists */
- H5FL_fac_gc_head.mem_freed-=total_mem;
+ H5FL_fac_gc_head.mem_freed -= total_mem;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FL_fac_gc_list() */
+} /* end H5FL_fac_gc_list() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_gc
*
@@ -2259,37 +2155,34 @@ H5FL_fac_gc_list(H5FL_fac_head_t *head)
* Programmer: Neil Fortner
* Friday, December 19, 2008
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FL_fac_gc(void)
{
- H5FL_fac_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
- herr_t ret_value=SUCCEED; /* return value*/
+ H5FL_fac_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
+ herr_t ret_value = SUCCEED; /* return value*/
FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
- gc_node=H5FL_fac_gc_head.first;
- while(gc_node!=NULL) {
+ gc_node = H5FL_fac_gc_head.first;
+ while (gc_node != NULL) {
/* Release the free nodes on the list */
- if(H5FL_fac_gc_list(gc_node->list)<0)
+ if (H5FL_fac_gc_list(gc_node->list) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed")
/* Go on to the next free list to garbage collect */
- gc_node=gc_node->next;
+ gc_node = gc_node->next;
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_fac_gc_head.mem_freed==0);
+ HDassert(H5FL_fac_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_gc() */
+} /* end H5FL_fac_gc() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_term
*
@@ -2301,18 +2194,13 @@ done:
* Programmer: Quincey Koziol
* Wednesday, February 2, 2005
*
- * Modifications:
- * Neil Fortner
- * Friday, December 19, 2008
- * Totally rewritten to support new factory implementation
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FL_fac_term(H5FL_fac_head_t *factory)
{
- H5FL_fac_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FL_fac_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
+ herr_t ret_value = SUCCEED; /* Return value */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
FUNC_ENTER_NOAPI_NOINIT
@@ -2321,29 +2209,31 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
HDassert(factory);
/* Garbage collect all the blocks in the factory's free list */
- if(H5FL_fac_gc_list(factory)<0)
+ if (H5FL_fac_gc_list(factory) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of factory failed")
/* Verify that all the blocks have been freed */
- if(factory->allocated>0)
+ if (factory->allocated > 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "factory still has objects allocated")
/* Unlink block free list for factory from global free list */
- if(factory->prev_gc) {
- H5FL_fac_gc_node_t *last = factory->prev_gc; /* Garbage collection node before the one being removed */
+ if (factory->prev_gc) {
+ H5FL_fac_gc_node_t *last =
+ factory->prev_gc; /* Garbage collection node before the one being removed */
HDassert(last->next->list == factory);
- tmp = last->next->next;
+ tmp = last->next->next;
last->next = H5FL_FREE(H5FL_fac_gc_node_t, last->next);
last->next = tmp;
- if(tmp)
+ if (tmp)
tmp->list->prev_gc = last;
- } else {
+ }
+ else {
HDassert(H5FL_fac_gc_head.first->list == factory);
- tmp = H5FL_fac_gc_head.first->next;
+ tmp = H5FL_fac_gc_head.first->next;
H5FL_fac_gc_head.first = H5FL_FREE(H5FL_fac_gc_node_t, H5FL_fac_gc_head.first);
H5FL_fac_gc_head.first = tmp;
- if(tmp)
+ if (tmp)
tmp->list->prev_gc = NULL;
} /* end else */
@@ -2352,9 +2242,8 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_fac_term() */
+} /* end H5FL_fac_term() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_fac_term_all
*
@@ -2366,23 +2255,22 @@ done:
* Programmer: Neil Fortner
* Friday, December 19, 2008
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
H5FL_fac_term_all(void)
{
- H5FL_fac_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
+ H5FL_fac_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list */
- while(H5FL_fac_gc_head.first != NULL) {
- tmp=H5FL_fac_gc_head.first->next;
+ while (H5FL_fac_gc_head.first != NULL) {
+ tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("H5FL_fac_term: head->size=%d, head->allocated=%d\n", (int)H5FL_fac_gc_head.first->list->size,(int)H5FL_fac_gc_head.first->list->allocated);
+ printf("H5FL_fac_term: head->size=%d, head->allocated=%d\n", (int)H5FL_fac_gc_head.first->list->size,
+ (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
@@ -2398,9 +2286,8 @@ printf("H5FL_fac_term: head->size=%d, head->allocated=%d\n", (int)H5FL_fac_gc_he
} /* end while */
FUNC_LEAVE_NOAPI(0)
-} /* end H5FL_fac_term_all() */
+} /* end H5FL_fac_term_all() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_garbage_coll
*
@@ -2412,38 +2299,35 @@ printf("H5FL_fac_term: head->size=%d, head->allocated=%d\n", (int)H5FL_fac_gc_he
* Programmer: Quincey Koziol
* Friday, March 24, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FL_garbage_coll(void)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
/* Garbage collect the free lists for array objects */
- if(H5FL_arr_gc()<0)
+ if (H5FL_arr_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect array objects")
/* Garbage collect free lists for blocks */
- if(H5FL_blk_gc()<0)
+ if (H5FL_blk_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect block objects")
/* Garbage collect the free lists for regular objects */
- if(H5FL_reg_gc()<0)
+ if (H5FL_reg_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect regular objects")
/* Garbage collect the free lists for factory objects */
- if(H5FL_fac_gc()<0)
+ if (H5FL_fac_gc() < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect regular objects")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_garbage_coll() */
+} /* end H5FL_garbage_coll() */
-
/*-------------------------------------------------------------------------
* Function: H5FL_set_free_list_limits
*
@@ -2469,44 +2353,38 @@ done:
* Programmer: Quincey Koziol
* Wednesday, August 2, 2000
*
- * Modifications: Neil Fortner
- * Wednesday, April 8, 2009
- * Added support for factory free lists
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
- int arr_list_lim, int blk_global_lim, int blk_list_lim, int fac_global_lim,
- int fac_list_lim)
+H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim, int fac_global_lim, int fac_list_lim)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
/* Set the limit variables */
/* limit on all regular free lists */
- H5FL_reg_glb_mem_lim=(reg_global_lim==-1 ? UINT_MAX : (size_t)reg_global_lim);
+ H5FL_reg_glb_mem_lim = (reg_global_lim == -1 ? UINT_MAX : (size_t)reg_global_lim);
/* limit on each regular free list */
- H5FL_reg_lst_mem_lim=(reg_list_lim==-1 ? UINT_MAX : (size_t)reg_list_lim);
+ H5FL_reg_lst_mem_lim = (reg_list_lim == -1 ? UINT_MAX : (size_t)reg_list_lim);
/* limit on all array free lists */
- H5FL_arr_glb_mem_lim=(arr_global_lim==-1 ? UINT_MAX : (size_t)arr_global_lim);
+ H5FL_arr_glb_mem_lim = (arr_global_lim == -1 ? UINT_MAX : (size_t)arr_global_lim);
/* limit on each array free list */
- H5FL_arr_lst_mem_lim=(arr_list_lim==-1 ? UINT_MAX : (size_t)arr_list_lim);
+ H5FL_arr_lst_mem_lim = (arr_list_lim == -1 ? UINT_MAX : (size_t)arr_list_lim);
/* limit on all block free lists */
- H5FL_blk_glb_mem_lim=(blk_global_lim==-1 ? UINT_MAX : (size_t)blk_global_lim);
+ H5FL_blk_glb_mem_lim = (blk_global_lim == -1 ? UINT_MAX : (size_t)blk_global_lim);
/* limit on each block free list */
- H5FL_blk_lst_mem_lim=(blk_list_lim==-1 ? UINT_MAX : (size_t)blk_list_lim);
+ H5FL_blk_lst_mem_lim = (blk_list_lim == -1 ? UINT_MAX : (size_t)blk_list_lim);
/* limit on all factory free lists */
- H5FL_fac_glb_mem_lim=(fac_global_lim==-1 ? UINT_MAX : (size_t)fac_global_lim);
+ H5FL_fac_glb_mem_lim = (fac_global_lim == -1 ? UINT_MAX : (size_t)fac_global_lim);
/* limit on each factory free list */
- H5FL_fac_lst_mem_lim=(fac_list_lim==-1 ? UINT_MAX : (size_t)fac_list_lim);
+ H5FL_fac_lst_mem_lim = (fac_list_lim == -1 ? UINT_MAX : (size_t)fac_list_lim);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FL_set_free_list_limits() */
+} /* end H5FL_set_free_list_limits() */
-
/*--------------------------------------------------------------------------
NAME
H5FL_term_interface
@@ -2517,7 +2395,7 @@ done:
RETURNS
Success: Positive if any action might have caused a change in some
other interface; zero otherwise.
- Failure: Negative
+ Failure: Negative
DESCRIPTION
Release any resources allocated.
GLOBAL VARIABLES
@@ -2529,33 +2407,33 @@ done:
int
H5FL_term_interface(void)
{
- int ret_value=0;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* Garbage collect any nodes on the free lists */
- (void)H5FL_garbage_coll();
+ /* Garbage collect any nodes on the free lists */
+ (void)
+ H5FL_garbage_coll();
- ret_value=H5FL_reg_term()+H5FL_fac_term_all()+H5FL_arr_term()+H5FL_blk_term();
+ ret_value = H5FL_reg_term() + H5FL_fac_term_all() + H5FL_arr_term() + H5FL_blk_term();
#ifdef H5FL_TRACK
/* If we haven't freed all the allocated memory, dump out the list now */
- if(ret_value > 0 && H5FL_out_head_g) {
+ if (ret_value > 0 && H5FL_out_head_g) {
H5FL_track_t *trk = H5FL_out_head_g;
/* Dump information about all the outstanding allocations */
- while(trk != NULL) {
+ while (trk != NULL) {
/* Print information about the outstanding block */
- HDfprintf(stderr,"%s: Outstanding allocation:\n", "H5FL_term_interface");
- HDfprintf(stderr,"\tFile: %s, Function: %s, Line: %d\n", trk->file, trk->func, trk->line);
+ HDfprintf(stderr, "%s: Outstanding allocation:\n", "H5FL_term_interface");
+ HDfprintf(stderr, "\tFile: %s, Function: %s, Line: %d\n", trk->file, trk->func, trk->line);
H5CS_print_stack(trk->stack, stderr);
/* Advance to next node */
trk = trk->next;
} /* end while */
- } /* end if */
-#endif /* H5FL_TRACK */
+ } /* end if */
+#endif /* H5FL_TRACK */
FUNC_LEAVE_NOAPI(ret_value)
}
-
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 7d69fa2..3481b7a 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,12 +15,10 @@
*
* Created: H5FLprivate.h
* Mar 23 2000
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5FLprivate_H
@@ -28,8 +26,8 @@
/* Public headers needed by this file */
#ifdef LATER
-#include "H5FLpublic.h" /*API prototypes */
-#endif /* LATER */
+#include "H5FLpublic.h" /*API prototypes */
+#endif /* LATER */
/* Private headers needed by this file */
@@ -53,23 +51,23 @@
/* #define H5FL_TRACK */
#ifdef H5FL_TRACK
/* Macro for inclusion in the free list allocation calls */
-#define H5FL_TRACK_INFO ,__FILE__, FUNC, __LINE__
+#define H5FL_TRACK_INFO , __FILE__, FUNC, __LINE__
/* Macro for inclusion in internal free list allocation calls */
-#define H5FL_TRACK_INFO_INT ,call_file, call_func, call_line
+#define H5FL_TRACK_INFO_INT , call_file, call_func, call_line
/* Macro for inclusion in the free list allocation parameters */
-#define H5FL_TRACK_PARAMS ,const char *call_file, const char *call_func, int call_line
+#define H5FL_TRACK_PARAMS , const char *call_file, const char *call_func, int call_line
/* Forward declarations for structure fields */
struct H5CS_t;
/* Tracking information for each block */
typedef struct H5FL_track_t {
- struct H5CS_t *stack; /* Function stack */
- char *file; /* Name of file containing calling function */
- char *func; /* Name of calling function */
- int line; /* Line # within calling function */
+ struct H5CS_t * stack; /* Function stack */
+ char * file; /* Name of file containing calling function */
+ char * func; /* Name of calling function */
+ int line; /* Line # within calling function */
struct H5FL_track_t *next; /* Pointer to next tracking block */
struct H5FL_track_t *prev; /* Pointer to previous tracking block */
} H5FL_track_t;
@@ -81,7 +79,7 @@ typedef struct H5FL_track_t {
#define H5FL_TRACK_INFO
#define H5FL_TRACK_INFO_INT
#define H5FL_TRACK_PARAMS
-#define H5FL_TRACK_SIZE 0
+#define H5FL_TRACK_SIZE 0
#endif /* H5FL_TRACK */
/*
@@ -90,44 +88,44 @@ typedef struct H5FL_track_t {
/* Data structure to store each block in free list */
typedef struct H5FL_reg_node_t {
- struct H5FL_reg_node_t *next; /* Pointer to next block in free list */
+ struct H5FL_reg_node_t *next; /* Pointer to next block in free list */
} H5FL_reg_node_t;
/* Data structure for free list of blocks */
typedef struct H5FL_reg_head_t {
- unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
- unsigned onlist; /* Number of blocks on free list */
- const char *name; /* Name of the type */
- size_t size; /* Size of the blocks in the list */
- H5FL_reg_node_t *list; /* List of free blocks */
+ unsigned init; /* Whether the free list has been initialized */
+ unsigned allocated; /* Number of blocks allocated */
+ unsigned onlist; /* Number of blocks on free list */
+ const char * name; /* Name of the type */
+ size_t size; /* Size of the blocks in the list */
+ H5FL_reg_node_t *list; /* List of free blocks */
} H5FL_reg_head_t;
/*
* Macros for defining & using free lists for a type
*/
-#define H5FL_REG_NAME(t) H5_##t##_reg_free_list
+#define H5FL_REG_NAME(t) H5_##t##_reg_free_list
#ifndef H5_NO_REG_FREE_LISTS
/* Common macros for H5FL_DEFINE & H5FL_DEFINE_STATIC */
-#define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t)={0,0,0,#t,sizeof(t),NULL}
+#define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t) = {0, 0, 0, #t, sizeof(t), NULL}
/* Declare a free list to manage objects of type 't' */
#define H5FL_DEFINE(t) H5_DLL H5FL_DEFINE_COMMON(t)
/* Reference a free list for type 't' defined in another file */
-#define H5FL_EXTERN(t) H5_DLLVAR H5FL_reg_head_t H5FL_REG_NAME(t)
+#define H5FL_EXTERN(t) H5_DLLVAR H5FL_reg_head_t H5FL_REG_NAME(t)
/* Declare a static free list to manage objects of type 't' */
-#define H5FL_DEFINE_STATIC(t) static H5FL_DEFINE_COMMON(t)
+#define H5FL_DEFINE_STATIC(t) static H5FL_DEFINE_COMMON(t)
/* Allocate an object of type 't' */
-#define H5FL_MALLOC(t) (t *)H5FL_reg_malloc(&(H5FL_REG_NAME(t)) H5FL_TRACK_INFO)
+#define H5FL_MALLOC(t) (t *)H5FL_reg_malloc(&(H5FL_REG_NAME(t))H5FL_TRACK_INFO)
/* Allocate an object of type 't' and clear it to all zeros */
-#define H5FL_CALLOC(t) (t *)H5FL_reg_calloc(&(H5FL_REG_NAME(t)) H5FL_TRACK_INFO)
+#define H5FL_CALLOC(t) (t *)H5FL_reg_calloc(&(H5FL_REG_NAME(t))H5FL_TRACK_INFO)
/* Free an object of type 't' */
-#define H5FL_FREE(t,obj) (t *)H5FL_reg_free(&(H5FL_REG_NAME(t)),obj)
+#define H5FL_FREE(t, obj) (t *)H5FL_reg_free(&(H5FL_REG_NAME(t)), obj)
/* Re-allocating an object of type 't' is not defined, because these free-lists
* only support fixed sized types, like structs, etc..
@@ -138,167 +136,169 @@ typedef struct H5FL_reg_head_t {
/* Common macro for H5FL_DEFINE & H5FL_DEFINE_STATIC */
#define H5FL_DEFINE_COMMON(t) int H5_ATTR_UNUSED H5FL_REG_NAME(t)
-#define H5FL_DEFINE(t) H5_DLL H5FL_DEFINE_COMMON(t)
-#define H5FL_EXTERN(t) H5_DLLVAR H5FL_DEFINE_COMMON(t)
-#define H5FL_DEFINE_STATIC(t) static H5FL_DEFINE_COMMON(t)
-#define H5FL_MALLOC(t) (t *)H5MM_malloc(sizeof(t))
-#define H5FL_CALLOC(t) (t *)H5MM_calloc(sizeof(t))
-#define H5FL_FREE(t,obj) (t *)H5MM_xfree(obj)
+#define H5FL_DEFINE(t) H5_DLL H5FL_DEFINE_COMMON(t)
+#define H5FL_EXTERN(t) H5_DLLVAR H5FL_DEFINE_COMMON(t)
+#define H5FL_DEFINE_STATIC(t) static H5FL_DEFINE_COMMON(t)
+#define H5FL_MALLOC(t) (t *)H5MM_malloc(sizeof(t))
+#define H5FL_CALLOC(t) (t *)H5MM_calloc(sizeof(t))
+#define H5FL_FREE(t, obj) (t *)H5MM_xfree(obj)
#endif /* H5_NO_REG_FREE_LISTS */
/* Data structure to store information about each block allocated */
typedef union H5FL_blk_list_t {
- size_t size; /* Size of the page */
- union H5FL_blk_list_t *next; /* Pointer to next block in free list */
- double unused1; /* Unused normally, just here for aligment */
- haddr_t unused2; /* Unused normally, just here for aligment */
+ size_t size; /* Size of the page */
+ union H5FL_blk_list_t *next; /* Pointer to next block in free list */
+ double unused1; /* Unused normally, just here for aligment */
+ haddr_t unused2; /* Unused normally, just here for aligment */
} H5FL_blk_list_t;
/* Data structure for priority queue node of block free lists */
typedef struct H5FL_blk_node_t {
- size_t size; /* Size of the blocks in the list */
- H5FL_blk_list_t *list; /* List of free blocks */
- struct H5FL_blk_node_t *next; /* Pointer to next free list in queue */
- struct H5FL_blk_node_t *prev; /* Pointer to previous free list in queue */
+ size_t size; /* Size of the blocks in the list */
+ H5FL_blk_list_t * list; /* List of free blocks */
+ struct H5FL_blk_node_t *next; /* Pointer to next free list in queue */
+ struct H5FL_blk_node_t *prev; /* Pointer to previous free list in queue */
} H5FL_blk_node_t;
/* Data structure for priority queue of native block free lists */
typedef struct H5FL_blk_head_t {
- unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
- unsigned onlist; /* Number of blocks on free list */
- size_t list_mem; /* Amount of memory in block on free list */
- const char *name; /* Name of the type */
- H5FL_blk_node_t *head; /* Pointer to first free list in queue */
+ unsigned init; /* Whether the free list has been initialized */
+ unsigned allocated; /* Number of blocks allocated */
+ unsigned onlist; /* Number of blocks on free list */
+ size_t list_mem; /* Amount of memory in block on free list */
+ const char * name; /* Name of the type */
+ H5FL_blk_node_t *head; /* Pointer to first free list in queue */
} H5FL_blk_head_t;
/*
* Macros for defining & using priority queues
*/
-#define H5FL_BLK_NAME(t) H5_##t##_blk_free_list
+#define H5FL_BLK_NAME(t) H5_##t##_blk_free_list
#ifndef H5_NO_BLK_FREE_LISTS
/* Common macro for H5FL_BLK_DEFINE & H5FL_BLK_DEFINE_STATIC */
-#define H5FL_BLK_DEFINE_COMMON(t) H5FL_blk_head_t H5FL_BLK_NAME(t)={0,0,0,0,#t"_blk",NULL}
+#define H5FL_BLK_DEFINE_COMMON(t) H5FL_blk_head_t H5FL_BLK_NAME(t) = {0, 0, 0, 0, #t "_blk", NULL}
/* Declare a free list to manage objects of type 't' */
-#define H5FL_BLK_DEFINE(t) H5_DLL H5FL_BLK_DEFINE_COMMON(t)
+#define H5FL_BLK_DEFINE(t) H5_DLL H5FL_BLK_DEFINE_COMMON(t)
/* Reference a free list for type 't' defined in another file */
-#define H5FL_BLK_EXTERN(t) H5_DLLVAR H5FL_blk_head_t H5FL_BLK_NAME(t)
+#define H5FL_BLK_EXTERN(t) H5_DLLVAR H5FL_blk_head_t H5FL_BLK_NAME(t)
/* Declare a static free list to manage objects of type 't' */
-#define H5FL_BLK_DEFINE_STATIC(t) static H5FL_BLK_DEFINE_COMMON(t)
+#define H5FL_BLK_DEFINE_STATIC(t) static H5FL_BLK_DEFINE_COMMON(t)
-/* Allocate an block of type 't' */
-#define H5FL_BLK_MALLOC(t,size) (uint8_t *)H5FL_blk_malloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO)
+/* Allocate a block of type 't' */
+#define H5FL_BLK_MALLOC(t, size) (uint8_t *)H5FL_blk_malloc(&(H5FL_BLK_NAME(t)), size H5FL_TRACK_INFO)
-/* Allocate an block of type 't' and clear it to zeros */
-#define H5FL_BLK_CALLOC(t,size) (uint8_t *)H5FL_blk_calloc(&(H5FL_BLK_NAME(t)),size H5FL_TRACK_INFO)
+/* Allocate a block of type 't' and clear it to zeros */
+#define H5FL_BLK_CALLOC(t, size) (uint8_t *)H5FL_blk_calloc(&(H5FL_BLK_NAME(t)), size H5FL_TRACK_INFO)
/* Free a block of type 't' */
-#define H5FL_BLK_FREE(t,blk) (uint8_t *)H5FL_blk_free(&(H5FL_BLK_NAME(t)),blk)
+#define H5FL_BLK_FREE(t, blk) (uint8_t *)H5FL_blk_free(&(H5FL_BLK_NAME(t)), blk)
/* Re-allocate a block of type 't' */
-#define H5FL_BLK_REALLOC(t,blk,new_size) (uint8_t *)H5FL_blk_realloc(&(H5FL_BLK_NAME(t)),blk,new_size H5FL_TRACK_INFO)
+#define H5FL_BLK_REALLOC(t, blk, new_size) \
+ (uint8_t *)H5FL_blk_realloc(&(H5FL_BLK_NAME(t)), blk, new_size H5FL_TRACK_INFO)
/* Check if there is a free block available to re-use */
-#define H5FL_BLK_AVAIL(t,size) H5FL_blk_free_block_avail(&(H5FL_BLK_NAME(t)),size)
+#define H5FL_BLK_AVAIL(t, size) H5FL_blk_free_block_avail(&(H5FL_BLK_NAME(t)), size)
#else /* H5_NO_BLK_FREE_LISTS */
/* Common macro for H5FL_BLK_DEFINE & H5FL_BLK_DEFINE_STATIC */
#define H5FL_BLK_DEFINE_COMMON(t) int H5_ATTR_UNUSED H5FL_BLK_NAME(t)
-#define H5FL_BLK_DEFINE(t) H5_DLL H5FL_BLK_DEFINE_COMMON(t)
-#define H5FL_BLK_EXTERN(t) H5_DLLVAR H5FL_BLK_DEFINE_COMMON(t)
-#define H5FL_BLK_DEFINE_STATIC(t) static H5FL_BLK_DEFINE_COMMON(t)
-#define H5FL_BLK_MALLOC(t,size) (uint8_t *)H5MM_malloc(size)
-#define H5FL_BLK_CALLOC(t,size) (uint8_t *)H5MM_calloc(size)
-#define H5FL_BLK_FREE(t,blk) (uint8_t *)H5MM_xfree(blk)
-#define H5FL_BLK_REALLOC(t,blk,new_size) (uint8_t *)H5MM_realloc(blk,new_size)
-#define H5FL_BLK_AVAIL(t,size) (FALSE)
+#define H5FL_BLK_DEFINE(t) H5_DLL H5FL_BLK_DEFINE_COMMON(t)
+#define H5FL_BLK_EXTERN(t) H5_DLLVAR H5FL_BLK_DEFINE_COMMON(t)
+#define H5FL_BLK_DEFINE_STATIC(t) static H5FL_BLK_DEFINE_COMMON(t)
+#define H5FL_BLK_MALLOC(t, size) (uint8_t *)H5MM_malloc(size)
+#define H5FL_BLK_CALLOC(t, size) (uint8_t *)H5MM_calloc(size)
+#define H5FL_BLK_FREE(t, blk) (uint8_t *)H5MM_xfree(blk)
+#define H5FL_BLK_REALLOC(t, blk, new_size) (uint8_t *)H5MM_realloc(blk, new_size)
+#define H5FL_BLK_AVAIL(t, size) (FALSE)
#endif /* H5_NO_BLK_FREE_LISTS */
/* Data structure to store each array in free list */
typedef union H5FL_arr_list_t {
- union H5FL_arr_list_t *next; /* Pointer to next block in free list */
- size_t nelem; /* Number of elements in this array */
- double unused1; /* Unused normally, just here for aligment */
- haddr_t unused2; /* Unused normally, just here for aligment */
+ union H5FL_arr_list_t *next; /* Pointer to next block in free list */
+ size_t nelem; /* Number of elements in this array */
+ double unused1; /* Unused normally, just here for aligment */
+ haddr_t unused2; /* Unused normally, just here for aligment */
} H5FL_arr_list_t;
/* Data structure for each size of array element */
typedef struct H5FL_arr_node_t {
- size_t size; /* Size of the blocks in the list */
- unsigned onlist; /* Number of blocks on free list */
- H5FL_arr_list_t *list; /* List of free blocks */
+ size_t size; /* Size of the blocks in the list */
+ unsigned onlist; /* Number of blocks on free list */
+ H5FL_arr_list_t *list; /* List of free blocks */
} H5FL_arr_node_t;
/* Data structure for free list of array blocks */
typedef struct H5FL_arr_head_t {
- unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
- size_t list_mem; /* Amount of memory in block on free list */
- const char *name; /* Name of the type */
- int maxelem; /* Maximum number of elements in an array */
- size_t base_size; /* Size of the "base" object in the list */
- size_t elem_size; /* Size of the array elements in the list */
+ unsigned init; /* Whether the free list has been initialized */
+ unsigned allocated; /* Number of blocks allocated */
+ size_t list_mem; /* Amount of memory in block on free list */
+ const char * name; /* Name of the type */
+ int maxelem; /* Maximum number of elements in an array */
+ size_t base_size; /* Size of the "base" object in the list */
+ size_t elem_size; /* Size of the array elements in the list */
H5FL_arr_node_t *list_arr; /* Array of lists of free blocks */
} H5FL_arr_head_t;
/*
* Macros for defining & using free lists for an array of a type
*/
-#define H5FL_ARR_NAME(t) H5_##t##_arr_free_list
+#define H5FL_ARR_NAME(t) H5_##t##_arr_free_list
#ifndef H5_NO_ARR_FREE_LISTS
/* Common macro for H5FL_ARR_DEFINE & H5FL_ARR_DEFINE_STATIC (and H5FL_BARR variants) */
-#define H5FL_ARR_DEFINE_COMMON(b,t,m) H5FL_arr_head_t H5FL_ARR_NAME(t)={0,0,0,#t"_arr",m+1,b,sizeof(t),NULL}
+#define H5FL_ARR_DEFINE_COMMON(b, t, m) \
+ H5FL_arr_head_t H5FL_ARR_NAME(t) = {0, 0, 0, #t "_arr", m + 1, b, sizeof(t), NULL}
/* Declare a free list to manage arrays of type 't' */
-#define H5FL_ARR_DEFINE(t,m) H5_DLL H5FL_ARR_DEFINE_COMMON(0,t,m)
+#define H5FL_ARR_DEFINE(t, m) H5_DLL H5FL_ARR_DEFINE_COMMON(0, t, m)
/* Declare a free list to manage base 'b' + arrays of type 't' */
-#define H5FL_BARR_DEFINE(b,t,m) H5_DLL H5FL_ARR_DEFINE_COMMON(sizeof(b),t,m)
+#define H5FL_BARR_DEFINE(b, t, m) H5_DLL H5FL_ARR_DEFINE_COMMON(sizeof(b), t, m)
/* Reference a free list for arrays of type 't' defined in another file */
-#define H5FL_ARR_EXTERN(t) H5_DLLVAR H5FL_arr_head_t H5FL_ARR_NAME(t)
+#define H5FL_ARR_EXTERN(t) H5_DLLVAR H5FL_arr_head_t H5FL_ARR_NAME(t)
/* Declare a static free list to manage arrays of type 't' */
-#define H5FL_ARR_DEFINE_STATIC(t,m) static H5FL_ARR_DEFINE_COMMON(0,t,m)
+#define H5FL_ARR_DEFINE_STATIC(t, m) static H5FL_ARR_DEFINE_COMMON(0, t, m)
/* Declare a static free list to manage base 'b' + arrays of type 't' */
-#define H5FL_BARR_DEFINE_STATIC(b,t,m) static H5FL_ARR_DEFINE_COMMON(sizeof(b),t,m)
+#define H5FL_BARR_DEFINE_STATIC(b, t, m) static H5FL_ARR_DEFINE_COMMON(sizeof(b), t, m)
/* Allocate an array of type 't' */
-#define H5FL_ARR_MALLOC(t,elem) H5FL_arr_malloc(&(H5FL_ARR_NAME(t)),elem)
+#define H5FL_ARR_MALLOC(t, elem) H5FL_arr_malloc(&(H5FL_ARR_NAME(t)), elem)
/* Allocate an array of type 't' and clear it to all zeros */
-#define H5FL_ARR_CALLOC(t,elem) H5FL_arr_calloc(&(H5FL_ARR_NAME(t)),elem)
+#define H5FL_ARR_CALLOC(t, elem) H5FL_arr_calloc(&(H5FL_ARR_NAME(t)), elem)
/* Free an array of type 't' */
-#define H5FL_ARR_FREE(t,obj) (t *)H5FL_arr_free(&(H5FL_ARR_NAME(t)),obj)
+#define H5FL_ARR_FREE(t, obj) (t *)H5FL_arr_free(&(H5FL_ARR_NAME(t)), obj)
/* Re-allocate an array of type 't' */
-#define H5FL_ARR_REALLOC(t,obj,new_elem) H5FL_arr_realloc(&(H5FL_ARR_NAME(t)),obj,new_elem)
+#define H5FL_ARR_REALLOC(t, obj, new_elem) H5FL_arr_realloc(&(H5FL_ARR_NAME(t)), obj, new_elem)
#else /* H5_NO_ARR_FREE_LISTS */
/* Common macro for H5FL_ARR_DEFINE & H5FL_ARR_DEFINE_STATIC (and H5FL_BARR variants) */
-#define H5FL_ARR_DEFINE_COMMON(t,m) size_t H5FL_ARR_NAME(t)
-
-#define H5FL_ARR_DEFINE(t,m) H5_DLL H5FL_ARR_DEFINE_COMMON(t,m) = 0
-#define H5FL_BARR_DEFINE(b,t,m) H5_DLL H5FL_ARR_DEFINE_COMMON(t,m) = sizeof(b)
-#define H5FL_ARR_EXTERN(t) H5_DLLVAR H5FL_ARR_DEFINE_COMMON(t,m)
-#define H5FL_ARR_DEFINE_STATIC(t,m) static H5FL_ARR_DEFINE_COMMON(t,m) = 0
-#define H5FL_BARR_DEFINE_STATIC(b,t,m) static H5FL_ARR_DEFINE_COMMON(t,m) = sizeof(b)
-#define H5FL_ARR_MALLOC(t,elem) H5MM_malloc(H5FL_ARR_NAME(t) + ((elem)*sizeof(t)))
-#define H5FL_ARR_CALLOC(t,elem) H5MM_calloc(H5FL_ARR_NAME(t) + ((elem)*sizeof(t)))
-#define H5FL_ARR_FREE(t,obj) (t *)H5MM_xfree(obj)
-#define H5FL_ARR_REALLOC(t,obj,new_elem) H5MM_realloc(obj,H5FL_ARR_NAME(t) + ((new_elem)*sizeof(t)))
+#define H5FL_ARR_DEFINE_COMMON(t, m) size_t H5FL_ARR_NAME(t)
+
+#define H5FL_ARR_DEFINE(t, m) H5_DLL H5FL_ARR_DEFINE_COMMON(t, m) = 0
+#define H5FL_BARR_DEFINE(b, t, m) H5_DLL H5FL_ARR_DEFINE_COMMON(t, m) = sizeof(b)
+#define H5FL_ARR_EXTERN(t) H5_DLLVAR H5FL_ARR_DEFINE_COMMON(t, m)
+#define H5FL_ARR_DEFINE_STATIC(t, m) static H5FL_ARR_DEFINE_COMMON(t, m) = 0
+#define H5FL_BARR_DEFINE_STATIC(b, t, m) static H5FL_ARR_DEFINE_COMMON(t, m) = sizeof(b)
+#define H5FL_ARR_MALLOC(t, elem) H5MM_malloc(H5FL_ARR_NAME(t) + ((elem) * sizeof(t)))
+#define H5FL_ARR_CALLOC(t, elem) H5MM_calloc(H5FL_ARR_NAME(t) + ((elem) * sizeof(t)))
+#define H5FL_ARR_FREE(t, obj) (t *)H5MM_xfree(obj)
+#define H5FL_ARR_REALLOC(t, obj, new_elem) H5MM_realloc(obj, H5FL_ARR_NAME(t) + ((new_elem) * sizeof(t)))
#endif /* H5_NO_ARR_FREE_LISTS */
/* Data structure for free list of sequence blocks */
typedef struct H5FL_seq_head_t {
- H5FL_blk_head_t queue; /* Priority queue of sequence blocks */
- size_t size; /* Size of the sequence elements in the list */
+ H5FL_blk_head_t queue; /* Priority queue of sequence blocks */
+ size_t size; /* Size of the sequence elements in the list */
} H5FL_seq_head_t;
/*
@@ -307,60 +307,61 @@ typedef struct H5FL_seq_head_t {
* Sequences are like arrays, except they have no upper limit.
*
*/
-#define H5FL_SEQ_NAME(t) H5_##t##_seq_free_list
+#define H5FL_SEQ_NAME(t) H5_##t##_seq_free_list
#ifndef H5_NO_SEQ_FREE_LISTS
/* Common macro for H5FL_SEQ_DEFINE & H5FL_SEQ_DEFINE_STATIC */
-#define H5FL_SEQ_DEFINE_COMMON(t) H5FL_seq_head_t H5FL_SEQ_NAME(t)={{0,0,0,0,#t"_seq",NULL},sizeof(t)}
+#define H5FL_SEQ_DEFINE_COMMON(t) \
+ H5FL_seq_head_t H5FL_SEQ_NAME(t) = {{0, 0, 0, 0, #t "_seq", NULL}, sizeof(t)}
/* Declare a free list to manage sequences of type 't' */
-#define H5FL_SEQ_DEFINE(t) H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
+#define H5FL_SEQ_DEFINE(t) H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
/* Reference a free list for sequences of type 't' defined in another file */
-#define H5FL_SEQ_EXTERN(t) H5_DLLVAR H5FL_seq_head_t H5FL_SEQ_NAME(t)
+#define H5FL_SEQ_EXTERN(t) H5_DLLVAR H5FL_seq_head_t H5FL_SEQ_NAME(t)
/* Declare a static free list to manage sequences of type 't' */
-#define H5FL_SEQ_DEFINE_STATIC(t) static H5FL_SEQ_DEFINE_COMMON(t)
+#define H5FL_SEQ_DEFINE_STATIC(t) static H5FL_SEQ_DEFINE_COMMON(t)
/* Allocate a sequence of type 't' */
-#define H5FL_SEQ_MALLOC(t,elem) (t *)H5FL_seq_malloc(&(H5FL_SEQ_NAME(t)),elem H5FL_TRACK_INFO)
+#define H5FL_SEQ_MALLOC(t, elem) (t *)H5FL_seq_malloc(&(H5FL_SEQ_NAME(t)), elem H5FL_TRACK_INFO)
/* Allocate a sequence of type 't' and clear it to all zeros */
-#define H5FL_SEQ_CALLOC(t,elem) (t *)H5FL_seq_calloc(&(H5FL_SEQ_NAME(t)),elem H5FL_TRACK_INFO)
+#define H5FL_SEQ_CALLOC(t, elem) (t *)H5FL_seq_calloc(&(H5FL_SEQ_NAME(t)), elem H5FL_TRACK_INFO)
/* Free a sequence of type 't' */
-#define H5FL_SEQ_FREE(t,obj) H5FL_seq_free(&(H5FL_SEQ_NAME(t)),obj)
+#define H5FL_SEQ_FREE(t, obj) H5FL_seq_free(&(H5FL_SEQ_NAME(t)), obj)
/* Re-allocate a sequence of type 't' */
-#define H5FL_SEQ_REALLOC(t,obj,new_elem) (t *)H5FL_seq_realloc(&(H5FL_SEQ_NAME(t)),obj,new_elem H5FL_TRACK_INFO)
+#define H5FL_SEQ_REALLOC(t, obj, new_elem) \
+ (t *)H5FL_seq_realloc(&(H5FL_SEQ_NAME(t)), obj, new_elem H5FL_TRACK_INFO)
#else /* H5_NO_SEQ_FREE_LISTS */
/* Common macro for H5FL_SEQ_DEFINE & H5FL_SEQ_DEFINE_STATIC */
#define H5FL_SEQ_DEFINE_COMMON(t) int H5_ATTR_UNUSED H5FL_SEQ_NAME(t)
-#define H5FL_SEQ_DEFINE(t) H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
-#define H5FL_SEQ_EXTERN(t) H5_DLLVAR H5FL_SEQ_DEFINE_COMMON(t)
-#define H5FL_SEQ_DEFINE_STATIC(t) static H5FL_SEQ_DEFINE_COMMON(t)
-#define H5FL_SEQ_MALLOC(t,elem) (t *)H5MM_malloc((elem)*sizeof(t))
-#define H5FL_SEQ_CALLOC(t,elem) (t *)H5MM_calloc((elem)*sizeof(t))
-#define H5FL_SEQ_FREE(t,obj) (t *)H5MM_xfree(obj)
-#define H5FL_SEQ_REALLOC(t,obj,new_elem) (t *)H5MM_realloc(obj,(new_elem)*sizeof(t))
+#define H5FL_SEQ_DEFINE(t) H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
+#define H5FL_SEQ_EXTERN(t) H5_DLLVAR H5FL_SEQ_DEFINE_COMMON(t)
+#define H5FL_SEQ_DEFINE_STATIC(t) static H5FL_SEQ_DEFINE_COMMON(t)
+#define H5FL_SEQ_MALLOC(t, elem) (t *)H5MM_malloc((elem) * sizeof(t))
+#define H5FL_SEQ_CALLOC(t, elem) (t *)H5MM_calloc((elem) * sizeof(t))
+#define H5FL_SEQ_FREE(t, obj) (t *)H5MM_xfree(obj)
+#define H5FL_SEQ_REALLOC(t, obj, new_elem) (t *)H5MM_realloc(obj, (new_elem) * sizeof(t))
#endif /* H5_NO_SEQ_FREE_LISTS */
/* Forward declarations of the data structures for free list block factory */
typedef struct H5FL_fac_gc_node_t H5FL_fac_gc_node_t;
-typedef struct H5FL_fac_node_t H5FL_fac_node_t;
+typedef struct H5FL_fac_node_t H5FL_fac_node_t;
/* Data structure for free list block factory */
typedef struct H5FL_fac_head_t {
- unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
- unsigned onlist; /* Number of blocks on free list */
- size_t size; /* Size of the blocks in the list */
- H5FL_fac_node_t *list; /* List of free blocks */
- H5FL_fac_gc_node_t *prev_gc; /* Previous garbage collection node in list */
+ unsigned init; /* Whether the free list has been initialized */
+ unsigned allocated; /* Number of blocks allocated */
+ unsigned onlist; /* Number of blocks on free list */
+ size_t size; /* Size of the blocks in the list */
+ H5FL_fac_node_t * list; /* List of free blocks */
+ H5FL_fac_gc_node_t *prev_gc; /* Previous garbage collection node in list */
} H5FL_fac_head_t;
-
/*
* Macros for defining & using free list factories
*
@@ -379,15 +380,15 @@ typedef struct H5FL_fac_head_t {
#define H5FL_FAC_FREE(f, obj) H5FL_fac_free(f, obj)
#else /* H5_NO_FAC_FREE_LISTS */
-#define H5FL_FAC_MALLOC(f) H5MM_malloc(f->size)
-#define H5FL_FAC_CALLOC(f) H5MM_calloc(f->size)
+#define H5FL_FAC_MALLOC(f) H5MM_malloc(f->size)
+#define H5FL_FAC_CALLOC(f) H5MM_calloc(f->size)
#define H5FL_FAC_FREE(f, obj) H5MM_xfree(obj)
#endif /* H5_NO_FAC_FREE_LISTS */
/*
* Library prototypes.
*/
- /* Block free lists */
+/* Block free lists */
H5_DLL void * H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS);
H5_DLL void * H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS);
H5_DLL void * H5FL_blk_free(H5FL_blk_head_t *head, void *block);
@@ -395,34 +396,34 @@ H5_DLL void * H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_si
H5_DLL htri_t H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size);
/* Regular free lists */
-H5_DLL void * H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_reg_free(H5FL_reg_head_t *head, void *obj);
+H5_DLL void *H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
+H5_DLL void *H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS);
+H5_DLL void *H5FL_reg_free(H5FL_reg_head_t *head, void *obj);
/* Array free lists */
-H5_DLL void * H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem);
-H5_DLL void * H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem);
-H5_DLL void * H5FL_arr_free(H5FL_arr_head_t *head, void *obj);
-H5_DLL void * H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem);
+H5_DLL void *H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem);
+H5_DLL void *H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem);
+H5_DLL void *H5FL_arr_free(H5FL_arr_head_t *head, void *obj);
+H5_DLL void *H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem);
/* Sequence free lists */
-H5_DLL void * H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_seq_free(H5FL_seq_head_t *head, void *obj);
-H5_DLL void * H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PARAMS);
+H5_DLL void *H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
+H5_DLL void *H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS);
+H5_DLL void *H5FL_seq_free(H5FL_seq_head_t *head, void *obj);
+H5_DLL void *H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PARAMS);
/* Factory free lists */
H5_DLL H5FL_fac_head_t *H5FL_fac_init(size_t size);
-H5_DLL void * H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
-H5_DLL void * H5FL_fac_free(H5FL_fac_head_t *head, void *obj);
-H5_DLL herr_t H5FL_fac_term(H5FL_fac_head_t *head);
+H5_DLL void * H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
+H5_DLL void * H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS);
+H5_DLL void * H5FL_fac_free(H5FL_fac_head_t *head, void *obj);
+H5_DLL herr_t H5FL_fac_term(H5FL_fac_head_t *head);
/* General free list routines */
H5_DLL herr_t H5FL_garbage_coll(void);
-H5_DLL herr_t H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim,
- int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim,
- int fac_global_lim, int fac_list_lim);
-H5_DLL int H5FL_term_interface(void);
+H5_DLL herr_t H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
+ int arr_list_lim, int blk_global_lim, int blk_list_lim,
+ int fac_global_lim, int fac_list_lim);
+H5_DLL int H5FL_term_interface(void);
#endif
diff --git a/src/H5FO.c b/src/H5FO.c
index 504d594..87c6eeb 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,28 +19,27 @@
*
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Oprivate.h" /* Object headers */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Oprivate.h" /* Object headers */
/* Private typedefs */
/* Information about open objects in a file */
typedef struct H5FO_open_obj_t {
- haddr_t addr; /* Address of object header for object */
- void *obj; /* Pointer to the object */
- hbool_t deleted; /* Flag to indicate that the object was deleted from the file */
+ haddr_t addr; /* Address of object header for object */
+ void * obj; /* Pointer to the object */
+ hbool_t deleted; /* Flag to indicate that the object was deleted from the file */
} H5FO_open_obj_t;
/* Information about counted objects in a file */
typedef struct H5FO_obj_count_t {
- haddr_t addr; /* Address of object header for object */
- hsize_t count; /* Number of times object is opened */
+ haddr_t addr; /* Address of object header for object */
+ hsize_t count; /* Number of times object is opened */
} H5FO_obj_count_t;
/* Declare a free list to manage the H5FO_open_obj_t struct */
@@ -49,7 +48,6 @@ H5FL_DEFINE_STATIC(H5FO_open_obj_t);
/* Declare a free list to manage the H5FO_obj_count_t struct */
H5FL_DEFINE_STATIC(H5FO_obj_count_t);
-
/*--------------------------------------------------------------------------
NAME
H5FO_create
@@ -71,7 +69,7 @@ H5FL_DEFINE_STATIC(H5FO_obj_count_t);
herr_t
H5FO_create(const H5F_t *f)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -80,14 +78,13 @@ H5FO_create(const H5F_t *f)
HDassert(f->shared);
/* Create container used to store open object info */
- if((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
+ if ((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_create() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_opened
@@ -112,7 +109,7 @@ void *
H5FO_opened(const H5F_t *f, haddr_t addr)
{
H5FO_open_obj_t *open_obj; /* Information about open object */
- void *ret_value; /* Return value */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -123,7 +120,7 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs,&addr))) {
+ if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr))) {
ret_value = open_obj->obj;
HDassert(ret_value != NULL);
} /* end if */
@@ -133,7 +130,6 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_opened() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_insert
@@ -158,8 +154,8 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
herr_t
H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
{
- H5FO_open_obj_t *open_obj; /* Information about open object */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FO_open_obj_t *open_obj; /* Information about open object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -171,23 +167,22 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
HDassert(obj);
/* Allocate new opened object information structure */
- if((open_obj=H5FL_MALLOC(H5FO_open_obj_t))==NULL)
- HGOTO_ERROR(H5E_CACHE,H5E_NOSPACE,FAIL,"memory allocation failed")
+ if ((open_obj = H5FL_MALLOC(H5FO_open_obj_t)) == NULL)
+ HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Assign information */
- open_obj->addr=addr;
- open_obj->obj=obj;
- open_obj->deleted=delete_flag;
+ open_obj->addr = addr;
+ open_obj->obj = obj;
+ open_obj->deleted = delete_flag;
/* Insert into container */
- if(H5SL_insert(f->shared->open_objs,&open_obj->addr,open_obj)<0)
- HGOTO_ERROR(H5E_CACHE,H5E_CANTINSERT,FAIL,"can't insert object into container")
+ if (H5SL_insert(f->shared->open_objs, &open_obj->addr, open_obj) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_insert() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_delete
@@ -210,8 +205,8 @@ done:
herr_t
H5FO_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
{
- H5FO_open_obj_t *open_obj; /* Information about open object */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FO_open_obj_t *open_obj; /* Information about open object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -222,12 +217,12 @@ H5FO_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Remove from container */
- if(NULL == (open_obj = (H5FO_open_obj_t *)H5SL_remove(f->shared->open_objs, &addr)))
- HGOTO_ERROR(H5E_CACHE,H5E_CANTRELEASE,FAIL,"can't remove object from container")
+ if (NULL == (open_obj = (H5FO_open_obj_t *)H5SL_remove(f->shared->open_objs, &addr)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container")
/* Check if the object was deleted from the file */
- if(open_obj->deleted) {
- if(H5O_delete(f, dxpl_id, addr) < 0)
+ if (open_obj->deleted) {
+ if (H5O_delete(f, dxpl_id, addr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file")
} /* end if */
@@ -238,7 +233,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_delete() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_mark
@@ -261,8 +255,8 @@ done:
herr_t
H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
{
- H5FO_open_obj_t *open_obj; /* Information about open object */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FO_open_obj_t *open_obj; /* Information about open object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -273,7 +267,7 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
+ if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
open_obj->deleted = deleted;
else
ret_value = FAIL;
@@ -281,7 +275,6 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_mark() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_marked
@@ -305,8 +298,8 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
hbool_t
H5FO_marked(const H5F_t *f, haddr_t addr)
{
- H5FO_open_obj_t *open_obj; /* Information about open object */
- hbool_t ret_value = FALSE; /* Return value */
+ H5FO_open_obj_t *open_obj; /* Information about open object */
+ hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -317,13 +310,12 @@ H5FO_marked(const H5F_t *f, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
+ if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
ret_value = open_obj->deleted;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_marked() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_dest
@@ -345,7 +337,7 @@ H5FO_marked(const H5F_t *f, haddr_t addr)
herr_t
H5FO_dest(const H5F_t *f)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -355,20 +347,19 @@ H5FO_dest(const H5F_t *f)
HDassert(f->shared->open_objs);
/* Check if the object info set is empty */
- if(H5SL_count(f->shared->open_objs)!=0)
+ if (H5SL_count(f->shared->open_objs) != 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set")
/* Release the open object info set container */
- if(H5SL_close(f->shared->open_objs)<0)
+ if (H5SL_close(f->shared->open_objs) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set")
- f->shared->open_objs=NULL;
+ f->shared->open_objs = NULL;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_dest() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_top_create
@@ -390,7 +381,7 @@ done:
herr_t
H5FO_top_create(H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -398,14 +389,13 @@ H5FO_top_create(H5F_t *f)
HDassert(f);
/* Create container used to store open object info */
- if((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
+ if ((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_top_create() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_top_incr
@@ -428,8 +418,8 @@ done:
herr_t
H5FO_top_incr(const H5F_t *f, haddr_t addr)
{
- H5FO_obj_count_t *obj_count; /* Ref. count for object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FO_obj_count_t *obj_count; /* Ref. count for object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -439,28 +429,27 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
+ if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
(obj_count->count)++;
} /* end if */
else {
/* Allocate new opened object information structure */
- if(NULL == (obj_count = H5FL_MALLOC(H5FO_obj_count_t)))
- HGOTO_ERROR(H5E_CACHE,H5E_NOSPACE,FAIL,"memory allocation failed")
+ if (NULL == (obj_count = H5FL_MALLOC(H5FO_obj_count_t)))
+ HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Assign information */
- obj_count->addr = addr;
+ obj_count->addr = addr;
obj_count->count = 1;
/* Insert into container */
- if(H5SL_insert(f->obj_count, &obj_count->addr, obj_count) < 0)
- HGOTO_ERROR(H5E_CACHE,H5E_CANTINSERT,FAIL,"can't insert object into container")
+ if (H5SL_insert(f->obj_count, &obj_count->addr, obj_count) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_top_incr() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_top_decr
@@ -483,8 +472,8 @@ done:
herr_t
H5FO_top_decr(const H5F_t *f, haddr_t addr)
{
- H5FO_obj_count_t *obj_count; /* Ref. count for object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FO_obj_count_t *obj_count; /* Ref. count for object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -494,19 +483,19 @@ H5FO_top_decr(const H5F_t *f, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
+ if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
/* Decrement the reference count for the object */
(obj_count->count)--;
- if(obj_count->count == 0) {
+ if (obj_count->count == 0) {
/* Remove from container */
- if(NULL == (obj_count = (H5FO_obj_count_t *)H5SL_remove(f->obj_count, &addr)))
+ if (NULL == (obj_count = (H5FO_obj_count_t *)H5SL_remove(f->obj_count, &addr)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container")
/* Release the object information */
obj_count = H5FL_FREE(H5FO_obj_count_t, obj_count);
} /* end if */
- } /* end if */
+ } /* end if */
else
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't decrement ref. count")
@@ -514,7 +503,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_top_decr() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_top_count
@@ -537,8 +525,8 @@ done:
hsize_t
H5FO_top_count(const H5F_t *f, haddr_t addr)
{
- H5FO_obj_count_t *obj_count; /* Ref. count for object */
- hsize_t ret_value; /* Return value */
+ H5FO_obj_count_t *obj_count; /* Ref. count for object */
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -548,7 +536,7 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Get the object node from the container */
- if(NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr)))
+ if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr)))
ret_value = obj_count->count;
else
ret_value = 0;
@@ -556,7 +544,6 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_top_count() */
-
/*--------------------------------------------------------------------------
NAME
H5FO_top_dest
@@ -578,7 +565,7 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
herr_t
H5FO_top_dest(H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -587,11 +574,11 @@ H5FO_top_dest(H5F_t *f)
HDassert(f->obj_count);
/* Check if the object count set is empty */
- if(H5SL_count(f->obj_count) != 0)
+ if (H5SL_count(f->obj_count) != 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set")
/* Release the open object count set container */
- if(H5SL_close(f->obj_count) < 0)
+ if (H5SL_close(f->obj_count) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set")
f->obj_count = NULL;
@@ -599,4 +586,3 @@ H5FO_top_dest(H5F_t *f)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_top_dest() */
-
diff --git a/src/H5FOprivate.h b/src/H5FOprivate.h
index aa85c29..716ce9d 100644
--- a/src/H5FOprivate.h
+++ b/src/H5FOprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,30 +22,29 @@
#endif /* LATER */
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
+#include "H5SLprivate.h" /* Skip lists */
/* Typedefs */
/* Typedef for open object cache */
-typedef H5SL_t H5FO_t; /* Currently, all open objects are stored in skip list */
+typedef H5SL_t H5FO_t; /* Currently, all open objects are stored in skip list */
/* Macros */
/* Private routines */
-H5_DLL herr_t H5FO_create(const H5F_t *f);
-H5_DLL void *H5FO_opened(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag);
-H5_DLL herr_t H5FO_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
-H5_DLL herr_t H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted);
+H5_DLL herr_t H5FO_create(const H5F_t *f);
+H5_DLL void * H5FO_opened(const H5F_t *f, haddr_t addr);
+H5_DLL herr_t H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag);
+H5_DLL herr_t H5FO_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+H5_DLL herr_t H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted);
H5_DLL hbool_t H5FO_marked(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_dest(const H5F_t *f);
-H5_DLL herr_t H5FO_top_create(H5F_t *f);
-H5_DLL herr_t H5FO_top_incr(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_top_decr(const H5F_t *f, haddr_t addr);
+H5_DLL herr_t H5FO_dest(const H5F_t *f);
+H5_DLL herr_t H5FO_top_create(H5F_t *f);
+H5_DLL herr_t H5FO_top_incr(const H5F_t *f, haddr_t addr);
+H5_DLL herr_t H5FO_top_decr(const H5F_t *f, haddr_t addr);
H5_DLL hsize_t H5FO_top_count(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_top_dest(H5F_t *f);
+H5_DLL herr_t H5FO_top_dest(H5F_t *f);
#endif /* _H5FOprivate_H */
-
diff --git a/src/H5FS.c b/src/H5FS.c
index 7cdbea1..a8303df 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, May 2, 2006
*
- * Purpose: Free space tracking functions.
+ * Purpose: Free space tracking functions.
*
- * Note: (Used to be in the H5HFflist.c file, prior to the date above)
+ * Note: (Used to be in the H5HFflist.c file, prior to the date above)
*
*/
@@ -25,32 +25,29 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* File free space */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* File free space */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -59,7 +56,6 @@
static herr_t H5FS_sinfo_free_sect_cb(void *item, void *key, void *op_data);
static herr_t H5FS_sinfo_free_node_cb(void *item, void *key, void *op_data);
-
/*********************/
/* Package Variables */
/*********************/
@@ -70,46 +66,37 @@ H5FL_SEQ_DEFINE(H5FS_section_class_t);
/* Declare a free list to manage the H5FS_t struct */
H5FL_DEFINE(H5FS_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5FS_create
- *
- * Purpose: Allocate & initialize file free space info
+ * Function: H5FS_create
*
- * Return: Success: Pointer to free space structure
+ * Purpose: Allocate & initialize file free space info
*
- * Failure: NULL
+ * Return: Success: Pointer to free space structure
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
- * Modifications:
- * Vailin Choi, July 29th, 2008
- * Add two more parameters for handling alignment: alignment & threshhold
- *
*-------------------------------------------------------------------------
*/
H5FS_t *
-H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_create,
- size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold)
+H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_create, size_t nclasses,
+ const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold)
{
- H5FS_t *fspace = NULL; /* New free space structure */
- H5FS_t *ret_value; /* Return value */
+ H5FS_t *fspace = NULL; /* New free space structure */
+ H5FS_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses);
+ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
@@ -121,27 +108,28 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl
/*
* Allocate free space structure
*/
- if(NULL == (fspace = H5FS_new(f, nclasses, classes, cls_init_udata)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
+ if (NULL == (fspace = H5FS_new(f, nclasses, classes, cls_init_udata)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
/* Initialize creation information for free space manager */
- fspace->client = fs_create->client;
+ fspace->client = fs_create->client;
fspace->shrink_percent = fs_create->shrink_percent;
fspace->expand_percent = fs_create->expand_percent;
- fspace->max_sect_addr = fs_create->max_sect_addr;
- fspace->max_sect_size = fs_create->max_sect_size;
+ fspace->max_sect_addr = fs_create->max_sect_addr;
+ fspace->max_sect_size = fs_create->max_sect_size;
fspace->alignment = alignment;
fspace->threshold = threshold;
/* Check if the free space tracker is supposed to be persistent */
- if(fs_addr) {
+ if (fs_addr) {
/* Allocate space for the free space header */
- if(HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, dxpl_id, (hsize_t)fspace->hdr_size)))
+ if (HADDR_UNDEF ==
+ (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, dxpl_id, (hsize_t)fspace->hdr_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header")
/* Cache the new free space header (pinned) */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache")
/* Return free space header address to caller, if desired */
@@ -154,51 +142,45 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl
/* Set the return value */
ret_value = fspace;
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", FUNC, fspace, fspace->addr);
+ HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", FUNC, fspace, fspace->addr);
#endif /* H5FS_DEBUG */
done:
- if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if (!ret_value && fspace)
+ if (H5FS_hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_create() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_open
+ * Function: H5FS_open
*
- * Purpose: Open an existing file free space info structure on disk
+ * Purpose: Open an existing file free space info structure on disk
*
- * Return: Success: Pointer to free space structure
+ * Return: Success: Pointer to free space structure
+ * Failure: NULL
*
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 2, 2006
*
- * Modfications:
- *
- * Vailin Choi, July 29th, 2008
- * Add two more parameters for handling alignment: alignment & threshhold
- *
*-------------------------------------------------------------------------
*/
H5FS_t *
-H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, size_t nclasses,
- const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold)
+H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, size_t nclasses, const H5FS_section_class_t *classes[],
+ void *cls_init_udata, hsize_t alignment, hsize_t threshold)
{
- H5FS_t *fspace = NULL; /* New free space structure */
- H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- H5FS_t *ret_value; /* Return value */
+ H5FS_t * fspace = NULL; /* New free space structure */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ H5FS_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr, nclasses);
+ HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr,
+ nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
@@ -207,33 +189,34 @@ HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\
HDassert(classes);
/* Initialize user data for protecting the free space manager */
- cache_udata.f = f;
- cache_udata.nclasses = nclasses;
- cache_udata.classes = classes;
+ cache_udata.f = f;
+ cache_udata.nclasses = nclasses;
+ cache_udata.classes = classes;
cache_udata.cls_init_udata = cls_init_udata;
- cache_udata.addr = fs_addr;
+ cache_udata.addr = fs_addr;
/* Protect the free space header */
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
+ if (NULL ==
+ (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header")
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
-HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", FUNC, fspace->sect_size);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", FUNC, fspace->alloc_sect_size);
-HDfprintf(stderr, "%s: fspace->sinfo = %p\n", FUNC, fspace->sinfo);
-HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc);
+ HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", FUNC, fspace->sect_size);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", FUNC, fspace->alloc_sect_size);
+ HDfprintf(stderr, "%s: fspace->sinfo = %p\n", FUNC, fspace->sinfo);
+ HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc);
#endif /* H5FS_DEBUG */
/* Increment the reference count on the free space manager header */
HDassert(fspace->rc <= 1);
- if(H5FS_incr(fspace) < 0)
+ if (H5FS_incr(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header")
fspace->alignment = alignment;
fspace->threshold = threshold;
/* Unlock free space header */
- if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, NULL, "unable to release free space header")
/* Set return value */
@@ -243,17 +226,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_delete
- *
- * Purpose: Delete a free space manager on disk
+ * Function: H5FS_delete
*
- * Return: Success: non-negative
+ * Purpose: Delete a free space manager on disk
*
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 30, 2006
*
*-------------------------------------------------------------------------
@@ -261,13 +241,13 @@ done:
herr_t
H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr)
{
- H5FS_t *fspace = NULL; /* Free space header loaded from file */
- H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_t * fspace = NULL; /* Free space header loaded from file */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr);
+ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr);
#endif /* H5FS_DEBUG */
/* Check arguments. */
@@ -276,14 +256,15 @@ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_ad
/* Initialize user data for protecting the free space manager */
/* (no class information necessary for delete) */
- cache_udata.f = f;
- cache_udata.nclasses = 0;
- cache_udata.classes = NULL;
+ cache_udata.f = f;
+ cache_udata.nclasses = 0;
+ cache_udata.classes = NULL;
cache_udata.cls_init_udata = NULL;
- cache_udata.addr = fs_addr;
+ cache_udata.addr = fs_addr;
/* Protect the free space header */
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_WRITE)))
+ if (NULL ==
+ (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header")
/* Sanity check */
@@ -291,62 +272,63 @@ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_ad
/* Delete serialized section storage, if there are any */
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
#endif /* H5FS_DEBUG */
- if(fspace->serial_sect_count > 0) {
- unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */
+ if (fspace->serial_sect_count > 0) {
+ unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */
/* Sanity check */
HDassert(H5F_addr_defined(fspace->sect_addr));
HDassert(fspace->alloc_sect_size > 0);
/* Check the free space section info's status in the metadata cache */
- if(H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for free space section info")
+ if (H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for free space section info")
/* If the free space section info is in the cache, expunge it now */
- if(sinfo_status & H5AC_ES__IN_CACHE) {
+ if (sinfo_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
HDassert(!(sinfo_status & H5AC_ES__IS_PINNED));
HDassert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Expunging free space section info from cache\n", FUNC);
+ HDfprintf(stderr, "%s: Expunging free space section info from cache\n", FUNC);
#endif /* H5FS_DEBUG */
/* Evict the free space section info from the metadata cache */
/* (Free file space) */
- if(H5AC_expunge_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove free space section info from cache")
+ if (H5AC_expunge_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr,
+ H5AC__FREE_FILE_SPACE_FLAG) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL,
+ "unable to remove free space section info from cache")
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC);
-#endif /* H5FS_DEBUG */
+ HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC);
+#endif /* H5FS_DEBUG */
} /* end if */
else {
/* Release the space in the file */
- if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_addr, fspace->alloc_sect_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_addr, fspace->alloc_sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections")
} /* end else */
- } /* end if */
+ } /* end if */
done:
- if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
+ if (fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace,
+ H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space header")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_delete() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_close
+ * Function: H5FS_close
*
- * Purpose: Destroy & deallocate free list structure, serializing sections
+ * Purpose: Destroy & deallocate free list structure, serializing sections
* in the bins
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -354,7 +336,7 @@ done:
herr_t
H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -362,58 +344,67 @@ H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace)
HDassert(f);
HDassert(fspace);
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %a, fspace->sinfo = %p\n", FUNC, fspace, fspace->addr, fspace->sinfo);
+ HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %a, fspace->sinfo = %p\n", FUNC, fspace,
+ fspace->addr, fspace->sinfo);
#endif /* H5FS_DEBUG */
/* Check if section info is valid */
/* (i.e. the header "owns" the section info and it's not in the cache) */
- if(fspace->sinfo) {
+ if (fspace->sinfo) {
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu, fspace->serial_sect_count = %Hu, fspace->sect_addr = %a, fspace->rc = %u\n", FUNC, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
+ HDfprintf(stderr,
+ "%s: fspace->tot_sect_count = %Hu, fspace->serial_sect_count = %Hu, fspace->sect_addr = "
+ "%a, fspace->rc = %u\n",
+ FUNC, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_DEBUG */
/* If there are sections to serialize, update them */
/* (if the free space manager is persistent) */
- if(fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
+ if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
+ HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
#endif /* H5FS_DEBUG */
- if(fspace->sinfo->dirty) {
+ if (fspace->sinfo->dirty) {
/* Check if the section info is "floating" */
- if(!H5F_addr_defined(fspace->sect_addr)) {
+ if (!H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
HDassert(fspace->sect_size > 0);
/* Allocate space for the section info in file */
- if(HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size)))
- HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections")
+ if (HADDR_UNDEF == (fspace->sect_addr =
+ H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL,
+ "file allocation failed for free space sections")
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Mark free space header as dirty */
- if(H5AC_mark_entry_dirty(fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+ if (H5AC_mark_entry_dirty(fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL,
+ "unable to mark free space header as dirty")
} /* end if */
- } /* end if */
- else
- /* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ } /* end if */
+ else
+ /* Sanity check that section info has address */
+ HDassert(H5F_addr_defined(fspace->sect_addr));
/* Cache the free space section info */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache")
} /* end if */
else {
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: NOT storing section info in file\n", FUNC);
+ HDfprintf(stderr, "%s: NOT storing section info in file\n", FUNC);
#endif /* H5FS_DEBUG */
/* Check if space for the section info is allocated */
- if(H5F_addr_defined(fspace->sect_addr)) {
+ if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
/* (section info should only be in the file if the header is */
HDassert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Section info allocated though\n", FUNC);
+ HDfprintf(stderr, "%s: Section info allocated though\n", FUNC);
#endif /* H5FS_DEBUG */
/* Check if the section info is for the free space in the file */
/* (NOTE: This is the "bootstrapping" special case for the
@@ -421,59 +412,63 @@ HDfprintf(stderr, "%s: Section info allocated though\n", FUNC);
* section info and re-creating it as a section in the
* manager. -QAK)
*/
- if(fspace->client == H5FS_CLIENT_FILE_ID) {
- htri_t status; /* "can absorb" status for section into */
+ if (fspace->client == H5FS_CLIENT_FILE_ID) {
+ htri_t status; /* "can absorb" status for section into */
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Section info is for file free space\n", FUNC);
+ HDfprintf(stderr, "%s: Section info is for file free space\n", FUNC);
#endif /* H5FS_DEBUG */
/* Try to shrink the file or absorb the section info into a block aggregator */
- if((status = H5MF_try_shrink(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_addr, fspace->alloc_sect_size)) < 0)
+ if ((status = H5MF_try_shrink(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_addr,
+ fspace->alloc_sect_size)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for absorbing section info")
- else if(status == FALSE) {
+ else if (status == FALSE) {
/* Section info can't "go away", but it's free. Allow
* header to record it
*/
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC);
-#endif /* H5FS_DEBUG */
+ HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC);
+#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Section info went 'go away'\n", FUNC);
+ HDfprintf(stderr, "%s: Section info went 'go away'\n", FUNC);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
- fspace->sect_addr = HADDR_UNDEF;
+ fspace->sect_addr = HADDR_UNDEF;
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_entry_dirty(fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+ if (H5AC_mark_entry_dirty(fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL,
+ "unable to mark free space header as dirty")
} /* end else */
- } /* end if */
+ } /* end if */
else {
- haddr_t old_sect_addr = fspace->sect_addr; /* Previous location of section info in file */
- hsize_t old_alloc_sect_size = fspace->alloc_sect_size; /* Previous size of section info in file */
+ haddr_t old_sect_addr = fspace->sect_addr; /* Previous location of section info in file */
+ hsize_t old_alloc_sect_size =
+ fspace->alloc_sect_size; /* Previous size of section info in file */
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
+ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
- fspace->sect_addr = HADDR_UNDEF;
+ fspace->sect_addr = HADDR_UNDEF;
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_entry_dirty(fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+ if (H5AC_mark_entry_dirty(fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL,
+ "unable to mark free space header as dirty")
/* Free previous serialized sections disk space */
- if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, old_sect_addr, old_alloc_sect_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, old_sect_addr, old_alloc_sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections")
} /* end if */
- } /* end else */
+ } /* end else */
/* Destroy section info */
- if(H5FS_sinfo_dest(fspace->sinfo) < 0)
+ if (H5FS_sinfo_dest(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space section info")
} /* end else */
@@ -482,7 +477,7 @@ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
} /* end if */
else {
/* Just sanity checks... */
- if(fspace->serial_sect_count > 0)
+ if (fspace->serial_sect_count > 0)
/* Sanity check that section info has address */
HDassert(H5F_addr_defined(fspace->sect_addr));
else
@@ -491,37 +486,35 @@ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
} /* end else */
/* Decrement the reference count on the free space manager header */
- if(H5FS_decr(fspace) < 0)
+ if (H5FS_decr(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header")
done:
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_value, fspace->rc);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_value, fspace->rc);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_new
+ * Function: H5FS__new
*
- * Purpose: Create new free space manager structure
+ * Purpose: Create new free space manager structure
*
- * Return: Success: non-NULL, pointer to new free space manager struct
- * Failure: NULL
+ * Return: Success: non-NULL, pointer to new free space manager struct
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 31, 2006
*
*-------------------------------------------------------------------------
*/
H5FS_t *
-H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[],
- void *cls_init_udata)
+H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata)
{
- H5FS_t *fspace = NULL; /* Free space manager */
- size_t u; /* Local index variable */
- H5FS_t *ret_value; /* Return value */
+ H5FS_t *fspace = NULL; /* Free space manager */
+ size_t u; /* Local index variable */
+ H5FS_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -531,17 +524,18 @@ H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[],
/*
* Allocate free space structure
*/
- if(NULL == (fspace = H5FL_CALLOC(H5FS_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
+ if (NULL == (fspace = H5FL_CALLOC(H5FS_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
/* Set immutable free list parameters */
fspace->nclasses = nclasses;
- if(nclasses > 0) {
- if(NULL == (fspace->sect_cls = H5FL_SEQ_MALLOC(H5FS_section_class_t, nclasses)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space section class array")
+ if (nclasses > 0) {
+ if (NULL == (fspace->sect_cls = H5FL_SEQ_MALLOC(H5FS_section_class_t, nclasses)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for free space section class array")
/* Initialize the section classes for this free space list */
- for(u = 0; u < nclasses; u++) {
+ for (u = 0; u < nclasses; u++) {
/* Make certain that section class type can be used as an array index into this array */
HDassert(u == classes[u]->type);
@@ -549,46 +543,45 @@ H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[],
HDmemcpy(&fspace->sect_cls[u], classes[u], sizeof(H5FS_section_class_t));
/* Call the class initialization routine, if there is one */
- if(fspace->sect_cls[u].init_cls)
- if((fspace->sect_cls[u].init_cls)(&fspace->sect_cls[u], cls_init_udata) < 0)
+ if (fspace->sect_cls[u].init_cls)
+ if ((fspace->sect_cls[u].init_cls)(&fspace->sect_cls[u], cls_init_udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "unable to initialize section class")
/* Determine maximum class-specific serialization size for each section */
- if(fspace->sect_cls[u].serial_size > fspace->max_cls_serial_size)
+ if (fspace->sect_cls[u].serial_size > fspace->max_cls_serial_size)
fspace->max_cls_serial_size = fspace->sect_cls[u].serial_size;
} /* end for */
- } /* end if */
+ } /* end if */
/* Initialize non-zero information for new free space manager */
- fspace->addr = HADDR_UNDEF;
- fspace->hdr_size = H5FS_HEADER_SIZE(f);
+ fspace->addr = HADDR_UNDEF;
+ fspace->hdr_size = H5FS_HEADER_SIZE(f);
fspace->sect_addr = HADDR_UNDEF;
/* Set return value */
ret_value = fspace;
done:
- if(!ret_value)
- if(fspace) {
+ if (!ret_value)
+ if (fspace) {
/* Should probably call the class 'term' callback for all classes
* that have had their 'init' callback called... -QAK
*/
- if(fspace->sect_cls)
- fspace->sect_cls = (H5FS_section_class_t *)H5FL_SEQ_FREE(H5FS_section_class_t, fspace->sect_cls);
+ if (fspace->sect_cls)
+ fspace->sect_cls =
+ (H5FS_section_class_t *)H5FL_SEQ_FREE(H5FS_section_class_t, fspace->sect_cls);
fspace = H5FL_FREE(H5FS_t, fspace);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_new() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_size
*
* Purpose: Collect meta storage info used by the free space manager
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
* Programmer: Vailin Choi
* June 19, 2007
@@ -603,7 +596,6 @@ H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size)
/*
* Check arguments.
*/
- HDassert(f);
HDassert(fspace);
HDassert(meta_size);
@@ -613,14 +605,12 @@ H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FS_size() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_incr
*
* Purpose: Increment reference count on free space header
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* February 7, 2008
@@ -630,11 +620,11 @@ H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size)
herr_t
H5FS_incr(H5FS_t *fspace)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
+ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
#endif /* H5FS_DEBUG */
/*
@@ -643,8 +633,8 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
HDassert(fspace);
/* Check if we should pin the header in the cache */
- if(fspace->rc == 0 && H5F_addr_defined(fspace->addr))
- if(H5AC_pin_protected_entry(fspace) < 0)
+ if (fspace->rc == 0 && H5F_addr_defined(fspace->addr))
+ if (H5AC_pin_protected_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin free space header")
/* Increment reference count on header */
@@ -654,14 +644,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_incr() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_decr
*
* Purpose: Decrement reference count on free space header
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* February 7, 2008
@@ -671,11 +659,11 @@ done:
herr_t
H5FS_decr(H5FS_t *fspace)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
-HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
+ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
#endif /* H5FS_DEBUG */
/*
@@ -687,77 +675,70 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
fspace->rc--;
/* Check if we should unpin the header in the cache */
- if(fspace->rc == 0) {
- if(H5F_addr_defined(fspace->addr)) {
- if(H5AC_unpin_entry(fspace) < 0)
+ if (fspace->rc == 0) {
+ if (H5F_addr_defined(fspace->addr)) {
+ if (H5AC_unpin_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
} /* end if */
else {
- if(H5FS_hdr_dest(fspace) < 0)
+ if (H5FS_hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space header")
} /* end else */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_decr() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_dirty
+ * Function: H5FS_dirty
*
- * Purpose: Mark free space header as dirty
+ * Purpose: Mark free space header as dirty
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 14 2008
+ * Programmer: Quincey Koziol
+ * Feb 14 2008
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_dirty(H5FS_t *fspace)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
-#ifdef QAK
-HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
-#endif /* QAK */
/* Sanity check */
HDassert(fspace);
/* Check if the free space manager is persistent */
- if(H5F_addr_defined(fspace->addr))
+ if (H5F_addr_defined(fspace->addr))
/* Mark header as dirty in cache */
- if(H5AC_mark_entry_dirty(fspace) < 0)
+ if (H5AC_mark_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_dirty() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_hdr_dest
+ * Function: H5FS_hdr_dest
*
- * Purpose: Destroys a free space header in memory.
+ * Purpose: Destroys a free space header in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 2 2006
+ * Programmer: Quincey Koziol
+ * May 2 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_hdr_dest(H5FS_t *fspace)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -767,15 +748,15 @@ H5FS_hdr_dest(H5FS_t *fspace)
HDassert(fspace);
/* Terminate the section classes for this free space list */
- for(u = 0; u < fspace->nclasses ; u++) {
+ for (u = 0; u < fspace->nclasses; u++) {
/* Call the class termination routine, if there is one */
- if(fspace->sect_cls[u].term_cls)
- if((fspace->sect_cls[u].term_cls)(&fspace->sect_cls[u]) < 0)
+ if (fspace->sect_cls[u].term_cls)
+ if ((fspace->sect_cls[u].term_cls)(&fspace->sect_cls[u]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "unable to finalize section class")
} /* end for */
/* Release the memory for the free space section classes */
- if(fspace->sect_cls)
+ if (fspace->sect_cls)
fspace->sect_cls = (H5FS_section_class_t *)H5FL_SEQ_FREE(H5FS_section_class_t, fspace->sect_cls);
/* Free free space info */
@@ -785,16 +766,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_hdr_dest() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_free_sect_cb
+ * Function: H5FS_sinfo_free_sect_cb
*
- * Purpose: Free a size-tracking node for a bin
+ * Purpose: Free a size-tracking node for a bin
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, March 11, 2006
*
*-------------------------------------------------------------------------
@@ -802,8 +781,8 @@ done:
static herr_t
H5FS_sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
{
- H5FS_section_info_t *sect = (H5FS_section_info_t *)_sect; /* Section to free */
- const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)op_data; /* Free space manager for section */
+ H5FS_section_info_t *sect = (H5FS_section_info_t *)_sect; /* Section to free */
+ const H5FS_sinfo_t * sinfo = (const H5FS_sinfo_t *)op_data; /* Free space manager for section */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -814,19 +793,16 @@ H5FS_sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
(*sinfo->fspace->sect_cls[sect->type].free)(sect);
FUNC_LEAVE_NOAPI(0)
-} /* H5FS_sinfo_free_sect_cb() */
+} /* H5FS_sinfo_free_sect_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_free_node_cb
- *
- * Purpose: Free a size-tracking node for a bin
+ * Function: H5FS_sinfo_free_node_cb
*
- * Return: Success: non-negative
+ * Purpose: Free a size-tracking node for a bin
*
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, March 11, 2006
*
*-------------------------------------------------------------------------
@@ -834,7 +810,7 @@ H5FS_sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
static herr_t
H5FS_sinfo_free_node_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
{
- H5FS_node_t *fspace_node = (H5FS_node_t *)item; /* Temporary pointer to free space list node */
+ H5FS_node_t *fspace_node = (H5FS_node_t *)item; /* Temporary pointer to free space list node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -848,27 +824,25 @@ H5FS_sinfo_free_node_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
fspace_node = H5FL_FREE(H5FS_node_t, fspace_node);
FUNC_LEAVE_NOAPI(0)
-} /* H5FS_sinfo_free_node_cb() */
+} /* H5FS_sinfo_free_node_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_dest
+ * Function: H5FS_sinfo_dest
*
- * Purpose: Destroys a free space section info in memory.
+ * Purpose: Destroys a free space section info in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * July 31 2006
+ * Programmer: Quincey Koziol
+ * July 31 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_sinfo_dest(H5FS_sinfo_t *sinfo)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -880,8 +854,8 @@ H5FS_sinfo_dest(H5FS_sinfo_t *sinfo)
HDassert(sinfo->bins);
/* Clear out lists of nodes */
- for(u = 0; u < sinfo->nbins; u++)
- if(sinfo->bins[u].bin_list) {
+ for (u = 0; u < sinfo->nbins; u++)
+ if (sinfo->bins[u].bin_list) {
H5SL_destroy(sinfo->bins[u].bin_list, H5FS_sinfo_free_node_cb, sinfo);
sinfo->bins[u].bin_list = NULL;
} /* end if */
@@ -890,8 +864,8 @@ H5FS_sinfo_dest(H5FS_sinfo_t *sinfo)
sinfo->bins = H5FL_SEQ_FREE(H5FS_bin_t, sinfo->bins);
/* Release skip list for merging sections */
- if(sinfo->merge_list)
- if(H5SL_close(sinfo->merge_list) < 0)
+ if (sinfo->merge_list)
+ if (H5SL_close(sinfo->merge_list) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy section merging skip list")
/* Decrement the reference count on free space header */
@@ -899,7 +873,7 @@ H5FS_sinfo_dest(H5FS_sinfo_t *sinfo)
* disappearing immediately)
*/
sinfo->fspace->sinfo = NULL;
- if(H5FS_decr(sinfo->fspace) < 0)
+ if (H5FS_decr(sinfo->fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header")
sinfo->fspace = NULL;
@@ -911,17 +885,16 @@ done:
} /* end H5FS_sinfo_dest() */
#ifdef H5FS_DEBUG_ASSERT
-
+
/*-------------------------------------------------------------------------
- * Function: H5FS_assert
+ * Function: H5FS_assert
*
- * Purpose: Verify that the free space manager is mostly sane
+ * Purpose: Verify that the free space manager is mostly sane
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 17 2006
+ * Programmer: Quincey Koziol
+ * Jul 17 2006
*
*-------------------------------------------------------------------------
*/
@@ -929,12 +902,9 @@ herr_t
H5FS_assert(const H5FS_t *fspace)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifndef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_assert", fspace->tot_sect_count);
-#endif /* QAK */
/* Checks for section info, if it's available */
- if(fspace->sinfo) {
+ if (fspace->sinfo) {
/* Sanity check sections */
H5FS_sect_assert(fspace);
@@ -947,9 +917,6 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_assert", fspace->t
HDassert(fspace->tot_sect_count >= fspace->serial_sect_count);
HDassert(fspace->tot_sect_count >= fspace->ghost_sect_count);
HDassert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
-#ifdef QAK
- HDassert(fspace->serial_sect_count > 0 || fspace->ghost_sect_count == 0);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FS_assert() */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index fdf4e4d..d9a76b3 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5FScache.c
- * May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5FScache.c
+ * May 2 2006
+ * Quincey Koziol
*
- * Purpose: Implement file free space metadata cache methods.
+ * Purpose: Implement file free space metadata cache methods.
*
*-------------------------------------------------------------------------
*/
@@ -26,30 +26,29 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* File free space */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
-#include "H5WBprivate.h" /* Wrapped Buffers */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* File free space */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* File free space format version #'s */
-#define H5FS_HDR_VERSION 0 /* Header */
-#define H5FS_SINFO_VERSION 0 /* Serialized sections */
+#define H5FS_HDR_VERSION 0 /* Header */
+#define H5FS_SINFO_VERSION 0 /* Serialized sections */
/* Size of stack buffer for serialized headers */
-#define H5FS_HDR_BUF_SIZE 256
-
+#define H5FS_HDR_BUF_SIZE 256
/******************/
/* Local Typedefs */
@@ -57,17 +56,15 @@
/* User data for skip list iterator callback for iterating over section size nodes when syncing */
typedef struct {
- H5FS_sinfo_t *sinfo; /* Free space section info */
- uint8_t **p; /* Pointer to address of buffer pointer to serialize with */
- unsigned sect_cnt_size; /* # of bytes to encode section size counts in */
+ H5FS_sinfo_t *sinfo; /* Free space section info */
+ uint8_t ** p; /* Pointer to address of buffer pointer to serialize with */
+ unsigned sect_cnt_size; /* # of bytes to encode section size counts in */
} H5FS_iter_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -78,16 +75,17 @@ static herr_t H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key
/* Metadata cache callbacks */
static H5FS_t *H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace);
-static herr_t H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy);
-static herr_t H5FS_cache_hdr_size(const H5F_t *f, const H5FS_t *fspace, size_t *size_ptr);
+static herr_t H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace);
+static herr_t H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy);
+static herr_t H5FS_cache_hdr_size(const H5F_t *f, const H5FS_t *fspace, size_t *size_ptr);
static H5FS_sinfo_t *H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_sinfo_t *sinfo, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo);
-static herr_t H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy);
-static herr_t H5FS_cache_sinfo_size(const H5F_t *f, const H5FS_sinfo_t *sinfo, size_t *size_ptr);
-
+static herr_t H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
+ H5FS_sinfo_t *sinfo, unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo);
+static herr_t H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy);
+static herr_t H5FS_cache_sinfo_size(const H5F_t *f, const H5FS_sinfo_t *sinfo, size_t *size_ptr);
/*********************/
/* Package Variables */
@@ -113,12 +111,10 @@ const H5AC_class_t H5AC_FSPACE_SINFO[1] = {{
(H5AC_size_func_t)H5FS_cache_sinfo_size,
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -126,8 +122,6 @@ const H5AC_class_t H5AC_FSPACE_SINFO[1] = {{
/* Declare a free list to manage free space section data to/from disk */
H5FL_BLK_DEFINE_STATIC(sect_block);
-
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_hdr_load
*
@@ -145,16 +139,16 @@ H5FL_BLK_DEFINE_STATIC(sect_block);
static H5FS_t *
H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5FS_t *fspace = NULL; /* Free space header info */
- H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* user data for callback */
- H5WB_t *wb = NULL; /* Wrapped buffer for header data */
- uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */
- uint8_t *hdr; /* Pointer to header buffer */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- unsigned nclasses; /* Number of section classes */
- H5FS_t *ret_value; /* Return value */
+ H5FS_t * fspace = NULL; /* Free space header info */
+ H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* user data for callback */
+ H5WB_t * wb = NULL; /* Wrapped buffer for header data */
+ uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */
+ uint8_t * hdr; /* Pointer to header buffer */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ unsigned nclasses; /* Number of section classes */
+ H5FS_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -163,39 +157,39 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate a new free space manager */
- if(NULL == (fspace = H5FS_new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (fspace = H5FS_new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set free space manager's internal information */
fspace->addr = udata->addr;
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size)))
+ if (NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size)))
HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read header from disk */
- if(H5F_block_read(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space header")
+ if (H5F_block_read(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space header")
p = hdr;
/* Magic number */
- if(HDmemcmp(p, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
+ if (HDmemcmp(p, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5FS_HDR_VERSION)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version")
+ if (*p++ != H5FS_HDR_VERSION)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version")
/* Client ID */
fspace->client = (H5FS_client_t)*p++;
- if(fspace->client >= H5FS_NUM_CLIENT_ID)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header")
+ if (fspace->client >= H5FS_NUM_CLIENT_ID)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header")
/* Total space tracked */
H5F_DECODE_LENGTH(udata->f, p, fspace->tot_space);
@@ -212,8 +206,8 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* # of section classes */
/* (only check if we actually have some classes) */
UINT16DECODE(p, nclasses);
- if(fspace->nclasses > 0 && fspace->nclasses != nclasses)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch")
+ if (fspace->nclasses > 0 && fspace->nclasses != nclasses)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch")
/* Shrink percent */
UINT16DECODE(p, fspace->shrink_percent);
@@ -245,24 +239,24 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert((size_t)(p - (const uint8_t *)hdr) == fspace->hdr_size);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL,
+ "incorrect metadata checksum for fractal heap indirect block")
/* Set return value */
ret_value = fspace;
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
- if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if (!ret_value && fspace)
+ if (H5FS_hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_hdr_flush
*
@@ -277,11 +271,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5WB_t *wb = NULL; /* Wrapped buffer for header data */
- uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t *wb = NULL; /* Wrapped buffer for header data */
+ uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -292,23 +287,25 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
HDassert(H5F_addr_defined(fspace->addr));
/* Check if the header "owns" the section info */
- if(fspace->sinfo) {
+ if (fspace->sinfo) {
/* Sanity check - should not be trying to destroy header if it still
* "owns" section info
*/
HDassert(!destroy);
/* Check if the section info is dirty */
- if(fspace->sinfo->dirty) {
- if(fspace->serial_sect_count > 0) {
+ if (fspace->sinfo->dirty) {
+ if (fspace->serial_sect_count > 0) {
/* Check if we need to allocate space for section info */
- if(!H5F_addr_defined(fspace->sect_addr)) {
+ if (!H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
HDassert(fspace->sect_size > 0);
/* Allocate space for the section info in file */
- if(HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size)))
- HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections")
+ if (HADDR_UNDEF == (fspace->sect_addr =
+ H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL,
+ "file allocation failed for free space sections")
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Mark header dirty */
@@ -317,8 +314,9 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
} /* end if */
/* Write section info to file */
- if(H5FS_cache_sinfo_flush(f, dxpl_id, FALSE, fspace->sect_addr, fspace->sinfo, NULL) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space section info to disk")
+ if (H5FS_cache_sinfo_flush(f, dxpl_id, FALSE, fspace->sect_addr, fspace->sinfo, NULL) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL,
+ "unable to save free space section info to disk")
} /* end if */
else {
/* Sanity check that section info doesn't have address */
@@ -327,10 +325,10 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
/* Mark section info clean */
fspace->sinfo->dirty = FALSE;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Just sanity checks... */
- if(fspace->serial_sect_count > 0)
+ if (fspace->serial_sect_count > 0)
/* Sanity check that section info has address */
HDassert(H5F_addr_defined(fspace->sect_addr));
else
@@ -338,17 +336,17 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
HDassert(!H5F_addr_defined(fspace->sect_addr));
} /* end else */
- if(fspace->cache_info.is_dirty) {
- uint8_t *hdr; /* Pointer to header buffer */
- uint8_t *p; /* Pointer into raw data buffer */
- uint32_t metadata_chksum; /* Computed metadata checksum value */
+ if (fspace->cache_info.is_dirty) {
+ uint8_t *hdr; /* Pointer to header buffer */
+ uint8_t *p; /* Pointer into raw data buffer */
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size)))
+ if (NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size)))
HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to header */
@@ -406,27 +404,26 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
- /* Write the free space header. */
+ /* Write the free space header. */
HDassert((size_t)(p - hdr) == fspace->hdr_size);
- if(H5F_block_write(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space header to disk")
+ if (H5F_block_write(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space header to disk")
- fspace->cache_info.is_dirty = FALSE;
+ fspace->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5FS_cache_hdr_dest(f, fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
+ if (destroy)
+ if (H5FS_cache_hdr_dest(f, fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_cache_hdr_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_hdr_dest
*
@@ -457,25 +454,25 @@ H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace)
HDassert(!fspace->cache_info.free_file_space_on_destroy || H5F_addr_defined(fspace->cache_info.addr));
/* Check for freeing file space for free space header */
- if(fspace->cache_info.free_file_space_on_destroy) {
+ if (fspace->cache_info.free_file_space_on_destroy) {
/* Sanity check */
HDassert(H5F_addr_defined(fspace->addr));
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, H5AC_dxpl_id, fspace->cache_info.addr, (hsize_t)fspace->hdr_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, H5AC_dxpl_id, fspace->cache_info.addr,
+ (hsize_t)fspace->hdr_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header")
} /* end if */
/* Destroy free space header */
- if(H5FS_hdr_dest(fspace) < 0)
+ if (H5FS_hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_hdr_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_hdr_clear
*
@@ -492,7 +489,7 @@ done:
static herr_t
H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -504,15 +501,14 @@ H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy)
/* Reset the dirty flag. */
fspace->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5FS_cache_hdr_dest(f, fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
+ if (destroy)
+ if (H5FS_cache_hdr_dest(f, fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_hdr_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_hdr_size
*
@@ -544,7 +540,6 @@ H5FS_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5FS_t *fspace, size_t
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_cache_hdr_size() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_sinfo_load
*
@@ -562,15 +557,15 @@ H5FS_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5FS_t *fspace, size_t
static H5FS_sinfo_t *
H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_udata)
{
- H5FS_sinfo_t *sinfo = NULL; /* Free space section info */
+ H5FS_sinfo_t * sinfo = NULL; /* Free space section info */
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* user data for callback */
- haddr_t fs_addr; /* Free space header address */
- size_t old_sect_size; /* Old section size */
- uint8_t *buf = NULL; /* Temporary buffer */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- H5FS_sinfo_t *ret_value; /* Return value */
+ haddr_t fs_addr; /* Free space header address */
+ size_t old_sect_size; /* Old section size */
+ uint8_t * buf = NULL; /* Temporary buffer */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ H5FS_sinfo_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -579,61 +574,62 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
HDassert(udata);
/* Allocate a new free space section info */
- if(NULL == (sinfo = H5FS_sinfo_new(udata->f, udata->fspace)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (sinfo = H5FS_sinfo_new(udata->f, udata->fspace)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Allocate space for the buffer to serialize the sections into */
H5_CHECKED_ASSIGN(old_sect_size, size_t, udata->fspace->sect_size, hsize_t);
- if(NULL == (buf = H5FL_BLK_MALLOC(sect_block, (size_t)udata->fspace->sect_size)))
+ if (NULL == (buf = H5FL_BLK_MALLOC(sect_block, (size_t)udata->fspace->sect_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Read buffer from disk */
- if(H5F_block_read(f, H5FD_MEM_FSPACE_SINFO, udata->fspace->sect_addr, (size_t)udata->fspace->sect_size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space sections")
+ if (H5F_block_read(f, H5FD_MEM_FSPACE_SINFO, udata->fspace->sect_addr, (size_t)udata->fspace->sect_size,
+ dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space sections")
/* Deserialize free sections from buffer available */
p = buf;
/* Magic number */
- if(HDmemcmp(p, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature")
+ if (HDmemcmp(p, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5FS_SINFO_VERSION)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version")
+ if (*p++ != H5FS_SINFO_VERSION)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version")
/* Address of free space header for these sections */
H5F_addr_decode(udata->f, &p, &fs_addr);
- if(H5F_addr_ne(fs_addr, udata->fspace->addr))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections")
+ if (H5F_addr_ne(fs_addr, udata->fspace->addr))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections")
/* Check for any serialized sections */
- if(udata->fspace->serial_sect_count > 0) {
- hsize_t old_tot_sect_count; /* Total section count from header */
- hsize_t old_serial_sect_count; /* Total serializable section count from header */
- hsize_t old_ghost_sect_count; /* Total ghost section count from header */
- hsize_t old_tot_space; /* Total space managed from header */
+ if (udata->fspace->serial_sect_count > 0) {
+ hsize_t old_tot_sect_count; /* Total section count from header */
+ hsize_t old_serial_sect_count; /* Total serializable section count from header */
+ hsize_t old_ghost_sect_count; /* Total ghost section count from header */
+ hsize_t old_tot_space; /* Total space managed from header */
unsigned sect_cnt_size; /* The size of the section size counts */
/* Compute the size of the section counts */
sect_cnt_size = H5VM_limit_enc_size((uint64_t)udata->fspace->serial_sect_count);
/* Reset the section count, the "add" routine will update it */
- old_tot_sect_count = udata->fspace->tot_sect_count;
- old_serial_sect_count = udata->fspace->serial_sect_count;
- old_ghost_sect_count = udata->fspace->ghost_sect_count;
- old_tot_space = udata->fspace->tot_space;
- udata->fspace->tot_sect_count = 0;
+ old_tot_sect_count = udata->fspace->tot_sect_count;
+ old_serial_sect_count = udata->fspace->serial_sect_count;
+ old_ghost_sect_count = udata->fspace->ghost_sect_count;
+ old_tot_space = udata->fspace->tot_space;
+ udata->fspace->tot_sect_count = 0;
udata->fspace->serial_sect_count = 0;
- udata->fspace->ghost_sect_count = 0;
- udata->fspace->tot_space = 0;
+ udata->fspace->ghost_sect_count = 0;
+ udata->fspace->tot_space = 0;
/* Walk through the buffer, deserializing sections */
do {
- hsize_t sect_size; /* Current section size */
- size_t node_count; /* # of sections of this size */
- size_t u; /* Local index variable */
+ hsize_t sect_size = 0; /* Current section size */
+ size_t node_count = 0; /* # of sections of this size */
+ size_t u; /* Local index variable */
/* The number of sections of this node's size */
UINT64DECODE_VAR(p, node_count, sect_cnt_size);
@@ -644,11 +640,11 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
HDassert(sect_size);
/* Loop over nodes of this size */
- for(u = 0; u < node_count; u++) {
- H5FS_section_info_t *new_sect; /* Section that was deserialized */
- haddr_t sect_addr; /* Address of free space section in the address space */
- unsigned sect_type; /* Type of free space section */
- unsigned des_flags; /* Flags from deserialize callback */
+ for (u = 0; u < node_count; u++) {
+ H5FS_section_info_t *new_sect; /* Section that was deserialized */
+ haddr_t sect_addr = 0; /* Address of free space section in the address space */
+ unsigned sect_type; /* Type of free space section */
+ unsigned des_flags; /* Flags from deserialize callback */
/* The address of the section */
UINT64DECODE_VAR(p, sect_addr, sinfo->sect_off_size);
@@ -659,18 +655,22 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
/* Call 'deserialize' callback for this section */
des_flags = 0;
HDassert(udata->fspace->sect_cls[sect_type].deserialize);
- if(NULL == (new_sect = (*udata->fspace->sect_cls[sect_type].deserialize)(&udata->fspace->sect_cls[sect_type], udata->dxpl_id, p, sect_addr, sect_size, &des_flags)))
+ if (NULL == (new_sect = (*udata->fspace->sect_cls[sect_type].deserialize)(
+ &udata->fspace->sect_cls[sect_type], udata->dxpl_id, p, sect_addr, sect_size,
+ &des_flags)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDECODE, NULL, "can't deserialize section")
/* Update offset in serialization buffer */
p += udata->fspace->sect_cls[sect_type].serial_size;
/* Insert section in free space manager, unless requested not to */
- if(!(des_flags & H5FS_DESERIALIZE_NO_ADD))
- if(H5FS_sect_add(udata->f, udata->dxpl_id, udata->fspace, new_sect, H5FS_ADD_DESERIALIZING, NULL) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, NULL, "can't add section to free space manager")
+ if (!(des_flags & H5FS_DESERIALIZE_NO_ADD))
+ if (H5FS_sect_add(udata->f, udata->dxpl_id, udata->fspace, new_sect,
+ H5FS_ADD_DESERIALIZING, NULL) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, NULL,
+ "can't add section to free space manager")
} /* end for */
- } while(p < ((buf + old_sect_size) - H5FS_SIZEOF_CHKSUM));
+ } while (p < ((buf + old_sect_size) - H5FS_SIZEOF_CHKSUM));
/* Sanity check */
HDassert((size_t)(p - buf) == (old_sect_size - H5FS_SIZEOF_CHKSUM));
@@ -688,8 +688,9 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
UINT32DECODE(p, stored_chksum);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL,
+ "incorrect metadata checksum for fractal heap indirect block")
/* Sanity check */
HDassert((size_t)(p - (const uint8_t *)buf) == old_sect_size);
@@ -698,16 +699,15 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void
ret_value = sinfo;
done:
- if(buf)
+ if (buf)
buf = H5FL_BLK_FREE(sect_block, buf);
- if(!ret_value && sinfo)
- if(H5FS_sinfo_dest(sinfo) < 0)
+ if (!ret_value && sinfo)
+ if (H5FS_sinfo_dest(sinfo) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space info")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_sinfo_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5FS_sinfo_serialize_sect_cb
*
@@ -724,10 +724,10 @@ done:
static herr_t
H5FS_sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
- H5FS_section_class_t *sect_cls; /* Class of section */
- H5FS_section_info_t *sect= (H5FS_section_info_t *)_item; /* Free space section to work on */
- H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_section_class_t *sect_cls; /* Class of section */
+ H5FS_section_info_t * sect = (H5FS_section_info_t *)_item; /* Free space section to work on */
+ H5FS_iter_ud_t * udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -740,7 +740,7 @@ H5FS_sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata
sect_cls = &udata->sinfo->fspace->sect_cls[sect->type];
/* Check if this section should be serialized (i.e. is not a ghost section) */
- if(!(sect_cls->flags & H5FS_CLS_GHOST_OBJ)) {
+ if (!(sect_cls->flags & H5FS_CLS_GHOST_OBJ)) {
/* The address of the section */
UINT64ENCODE_VAR(*udata->p, sect->addr, udata->sinfo->sect_off_size);
@@ -748,8 +748,8 @@ H5FS_sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata
*(*udata->p)++ = (uint8_t)sect->type;
/* Call 'serialize' callback for this section */
- if(sect_cls->serialize) {
- if((*sect_cls->serialize)(sect_cls, sect, *udata->p) < 0)
+ if (sect_cls->serialize) {
+ if ((*sect_cls->serialize)(sect_cls, sect, *udata->p) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTSERIALIZE, FAIL, "can't synchronize section")
/* Update offset in serialization buffer */
@@ -763,7 +763,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_serialize_sect_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_sinfo_serialize_node_cb
*
@@ -780,9 +779,9 @@ done:
static herr_t
H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
- H5FS_node_t *fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */
- H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_node_t * fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */
+ H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -792,7 +791,7 @@ H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata
HDassert(udata->p);
/* Check if this node has any serializable sections */
- if(fspace_node->serial_count > 0) {
+ if (fspace_node->serial_count > 0) {
/* The number of serializable sections of this node's size */
UINT64ENCODE_VAR(*udata->p, fspace_node->serial_count, udata->sect_cnt_size);
@@ -801,7 +800,7 @@ H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata
/* Iterate through all the sections of this size */
HDassert(fspace_node->sect_list);
- if(H5SL_iterate(fspace_node->sect_list, H5FS_sinfo_serialize_sect_cb, udata) < 0)
+ if (H5SL_iterate(fspace_node->sect_list, H5FS_sinfo_serialize_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
} /* end if */
@@ -809,7 +808,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_serialize_node_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_sinfo_flush
*
@@ -824,9 +822,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_sinfo_t *sinfo, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_sinfo_t *sinfo,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -837,19 +836,19 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
HDassert(sinfo->fspace);
HDassert(sinfo->fspace->sect_cls);
- if(sinfo->cache_info.is_dirty || sinfo->dirty) {
- H5FS_iter_ud_t udata; /* User data for callbacks */
- uint8_t *buf = NULL; /* Temporary raw data buffer */
- uint8_t *p; /* Pointer into raw data buffer */
- uint32_t metadata_chksum; /* Computed metadata checksum value */
- unsigned bin; /* Current bin we are on */
+ if (sinfo->cache_info.is_dirty || sinfo->dirty) {
+ H5FS_iter_ud_t udata; /* User data for callbacks */
+ uint8_t * buf = NULL; /* Temporary raw data buffer */
+ uint8_t * p; /* Pointer into raw data buffer */
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
+ unsigned bin; /* Current bin we are on */
/* Sanity check address */
- if(H5F_addr_ne(addr, sinfo->fspace->sect_addr))
+ if (H5F_addr_ne(addr, sinfo->fspace->sect_addr))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "incorrect address for free space sections")
/* Allocate temporary buffer */
- if((buf = H5FL_BLK_MALLOC(sect_block, (size_t)sinfo->fspace->sect_size)) == NULL)
+ if ((buf = H5FL_BLK_MALLOC(sect_block, (size_t)sinfo->fspace->sect_size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
p = buf;
@@ -865,19 +864,19 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
H5F_addr_encode(f, &p, sinfo->fspace->addr);
/* Set up user data for iterator */
- udata.sinfo = sinfo;
- udata.p = &p;
+ udata.sinfo = sinfo;
+ udata.p = &p;
udata.sect_cnt_size = H5VM_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count);
/* Iterate over all the bins */
- for(bin = 0; bin < sinfo->nbins; bin++) {
+ for (bin = 0; bin < sinfo->nbins; bin++) {
/* Check if there are any sections in this bin */
- if(sinfo->bins[bin].bin_list) {
+ if (sinfo->bins[bin].bin_list) {
/* Iterate over list of section size nodes for bin */
- if(H5SL_iterate(sinfo->bins[bin].bin_list, H5FS_sinfo_serialize_node_cb, &udata) < 0)
+ if (H5SL_iterate(sinfo->bins[bin].bin_list, H5FS_sinfo_serialize_node_cb, &udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes")
} /* end if */
- } /* end for */
+ } /* end for */
/* Compute checksum */
metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);
@@ -890,24 +889,24 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
HDassert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size);
/* Write buffer to disk */
- if(H5F_block_write(f, H5FD_MEM_FSPACE_SINFO, sinfo->fspace->sect_addr, (size_t)sinfo->fspace->sect_size, dxpl_id, buf) < 0)
+ if (H5F_block_write(f, H5FD_MEM_FSPACE_SINFO, sinfo->fspace->sect_addr,
+ (size_t)sinfo->fspace->sect_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space sections to disk")
buf = H5FL_BLK_FREE(sect_block, buf);
- sinfo->cache_info.is_dirty = FALSE;
- sinfo->dirty = FALSE;
+ sinfo->cache_info.is_dirty = FALSE;
+ sinfo->dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5FS_cache_sinfo_dest(f, sinfo) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info")
+ if (destroy)
+ if (H5FS_cache_sinfo_dest(f, sinfo) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_cache_sinfo_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_sinfo_dest
*
@@ -935,25 +934,25 @@ H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo)
HDassert(!sinfo->cache_info.free_file_space_on_destroy || H5F_addr_defined(sinfo->cache_info.addr));
/* Check for freeing file space for free space section info */
- if(sinfo->cache_info.free_file_space_on_destroy) {
+ if (sinfo->cache_info.free_file_space_on_destroy) {
/* Sanity check */
HDassert(sinfo->fspace->alloc_sect_size > 0);
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, H5AC_dxpl_id, sinfo->cache_info.addr, (hsize_t)sinfo->fspace->alloc_sect_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, H5AC_dxpl_id, sinfo->cache_info.addr,
+ (hsize_t)sinfo->fspace->alloc_sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space section info")
} /* end if */
/* Destroy free space info */
- if(H5FS_sinfo_dest(sinfo) < 0)
+ if (H5FS_sinfo_dest(sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_sinfo_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_sinfo_clear
*
@@ -970,7 +969,7 @@ done:
static herr_t
H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -982,15 +981,14 @@ H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy)
/* Reset the dirty flag. */
sinfo->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5FS_cache_sinfo_dest(f, sinfo) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info")
+ if (destroy)
+ if (H5FS_cache_sinfo_dest(f, sinfo) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_sinfo_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cache_sinfo_size
*
@@ -1020,4 +1018,3 @@ H5FS_cache_sinfo_size(const H5F_t H5_ATTR_UNUSED *f, const H5FS_sinfo_t *sinfo,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_cache_sinfo_size() */
-
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index a17a792..21c449e 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5FSdbg.c
- * May 9 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5FSdbg.c
+ * May 9 2006
+ * Quincey Koziol
*
- * Purpose: Dump debugging information about a free space manager
+ * Purpose: Dump debugging information about a free space manager
*
*-------------------------------------------------------------------------
*/
@@ -26,77 +26,65 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
-#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
-#define H5MF_DEBUGGING /* Need access to file space debugging routines */
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
+#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
+#define H5MF_DEBUGGING /* Need access to file space debugging routines */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* File free space */
-#include "H5HFprivate.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* File free space */
+#include "H5HFprivate.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
- * Function: H5FS_debug
- *
- * Purpose: Prints debugging info about a free space manager.
+ * Function: H5FS_debug
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Prints debugging info about a free space manager.
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
+ * Return: SUCCEED/FAIL
*
- * Modifications:
- * Vailin Choi, July 29th, 2008
- * Add H5FS_CLIENT_FILE_ID for File Memory Management
+ * Programmer: Quincey Koziol
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5FS_t *fspace = NULL; /* Free space header info */
- H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_t * fspace = NULL; /* Free space header info */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -110,17 +98,17 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
HDassert(fwidth >= 0);
/* Initialize user data for protecting the free space manager */
- cache_udata.f = f;
- cache_udata.nclasses = 0;
- cache_udata.classes = NULL;
+ cache_udata.f = f;
+ cache_udata.nclasses = 0;
+ cache_udata.classes = NULL;
cache_udata.cls_init_udata = NULL;
- cache_udata.addr = addr;
+ cache_udata.addr = addr;
/*
* Load the free space header.
*/
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
+ if (NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Print opening message */
HDfprintf(stream, "%*sFree Space Header...\n", indent, "");
@@ -128,72 +116,53 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Free space client:",
- (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" :
- (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total free space tracked:",
- fspace->tot_space);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:",
+ (fspace->client == H5FS_CLIENT_FHEAP_ID
+ ? "Fractal heap"
+ : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Total free space tracked:", fspace->tot_space);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total number of free space sections tracked:",
- fspace->tot_sect_count);
+ "Total number of free space sections tracked:", fspace->tot_sect_count);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of serializable free space sections tracked:",
- fspace->serial_sect_count);
+ "Number of serializable free space sections tracked:", fspace->serial_sect_count);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of ghost free space sections tracked:",
- fspace->ghost_sect_count);
+ "Number of ghost free space sections tracked:", fspace->ghost_sect_count);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of free space section classes:",
- fspace->nclasses);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth,
- "Shrink percent:",
- fspace->shrink_percent);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth,
- "Expand percent:",
- fspace->expand_percent);
+ "Number of free space section classes:", fspace->nclasses);
+ HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent);
+ HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for section address space:",
- fspace->max_sect_addr);
+ "# of bits for section address space:", fspace->max_sect_addr);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Maximum section size:", fspace->max_sect_size);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Serialized sections address:", fspace->sect_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Maximum section size:",
- fspace->max_sect_size);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Serialized sections address:",
- fspace->sect_addr);
+ "Serialized sections size used:", fspace->sect_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Serialized sections size used:",
- fspace->sect_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Serialized sections size allocated:",
- fspace->alloc_sect_size);
+ "Serialized sections size allocated:", fspace->alloc_sect_size);
done:
- if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0)
+ if (fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_PROTECT, FAIL, "unable to release free space header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_debug() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_debug
+ * Function: H5FS_sect_debug
*
- * Purpose: Prints debugging info about a free space section.
+ * Purpose: Prints debugging info about a free space section.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 30 2006
+ * Programmer: Quincey Koziol
+ * May 30 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *stream, int indent, int fwidth)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -207,36 +176,34 @@ H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *str
HDassert(fwidth >= 0);
/* Call the section's debugging routine */
- if(fspace->sect_cls[sect->type].debug)
- if((fspace->sect_cls[sect->type].debug)(sect, stream, indent, fwidth) < 0)
+ if (fspace->sect_cls[sect->type].debug)
+ if ((fspace->sect_cls[sect->type].debug)(sect, stream, indent, fwidth) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't dump section's debugging info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_sect_debug() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sects_debug
+ * Function: H5FS_sects_debug
*
- * Purpose: Prints debugging info about the free space sections.
+ * Purpose: Prints debugging info about the free space sections.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
+ * Programmer: Quincey Koziol
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent, int fwidth,
- haddr_t fs_addr, haddr_t client_addr)
+ haddr_t fs_addr, haddr_t client_addr)
{
- H5FS_t *fspace = NULL; /* Free space header info */
- H5FS_client_t client; /* The client of the free space */
- H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_t * fspace = NULL; /* Free space header info */
+ H5FS_client_t client; /* The client of the free space */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -252,17 +219,18 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
HDassert(H5F_addr_defined(client_addr));
/* Initialize user data for protecting the free space manager */
- cache_udata.f = f;
- cache_udata.nclasses = 0;
- cache_udata.classes = NULL;
+ cache_udata.f = f;
+ cache_udata.nclasses = 0;
+ cache_udata.classes = NULL;
cache_udata.cls_init_udata = NULL;
- cache_udata.addr = fs_addr;
+ cache_udata.addr = fs_addr;
/*
* Load the free space header.
*/
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
+ if (NULL ==
+ (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Retrieve the client id */
client = fspace->client;
@@ -271,7 +239,7 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
/* (set the "deleted" flag for the unprotect, so the cache entry is removed
* and reloaded later, with the correct client information -QAK)
*/
- if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_PROTECT, FAIL, "unable to release free space header")
fspace = NULL;
@@ -281,15 +249,15 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
/*
* Print the values.
*/
- switch(client) {
+ switch (client) {
case H5FS_CLIENT_FHEAP_ID:
- if(H5HF_sects_debug(f, dxpl_id, client_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ if (H5HF_sects_debug(f, dxpl_id, client_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump fractal heap free space sections")
break;
case H5FS_CLIENT_FILE_ID:
#ifdef NOT_YET
- if(H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ if (H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections")
#endif /* NOT_YET */
break;
@@ -301,9 +269,8 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
} /* end switch */
done:
- if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0)
+ if (fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_PROTECT, FAIL, "unable to release free space header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_sects_debug() */
-
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index 4f113d84..b482ed6 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * Tuesday, May 2, 2006
+ * Programmer: Quincey Koziol
+ * Tuesday, May 2, 2006
*
- * Purpose: This file contains declarations which are visible only within
- * the H5FS package. Source files outside the H5FS package should
- * include H5FSprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5FS package. Source files outside the H5FS package should
+ * include H5FSprivate.h instead.
*/
#ifndef H5FS_PACKAGE
#error "Do not include this file outside the H5FS package!"
@@ -36,91 +36,90 @@
/* #define H5FS_DEBUG_ASSERT */
/* Get package's private header */
-#include "H5FSprivate.h" /* File free space */
+#include "H5FSprivate.h" /* File free space */
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5SLprivate.h" /* Skip lists */
/**************************/
/* Package Private Macros */
/**************************/
/* Size of checksum information (on disk) */
-#define H5FS_SIZEOF_CHKSUM 4
+#define H5FS_SIZEOF_CHKSUM 4
/* "Standard" size of prefix information for free space metadata */
-#define H5FS_METADATA_PREFIX_SIZE ( \
- H5_SIZEOF_MAGIC /* Signature */ \
- + 1 /* Version */ \
- + H5FS_SIZEOF_CHKSUM /* Metadata checksum */ \
+#define H5FS_METADATA_PREFIX_SIZE \
+ (H5_SIZEOF_MAGIC /* Signature */ \
+ + 1 /* Version */ \
+ + H5FS_SIZEOF_CHKSUM /* Metadata checksum */ \
)
/* Size of the fractal heap header on disk */
-#define H5FS_HEADER_SIZE(f) ( \
- /* General metadata fields */ \
- H5FS_METADATA_PREFIX_SIZE \
- \
- /* Free space header specific fields */ \
- + 1 /* Client ID */ \
- + H5F_SIZEOF_SIZE(f) /* Total free space tracked */ \
- + H5F_SIZEOF_SIZE(f) /* Total # of sections tracked */ \
- + H5F_SIZEOF_SIZE(f) /* # of serializable sections tracked */ \
- + H5F_SIZEOF_SIZE(f) /* # of ghost sections tracked */ \
- + 2 /* Number of section classes */ \
- + 2 /* Shrink percent */ \
- + 2 /* Expand percent */ \
- + 2 /* Size of address space for sections (log2 of value) */ \
- + H5F_SIZEOF_SIZE(f) /* Max. size of section to track */ \
- + H5F_SIZEOF_ADDR(f) /* Address of serialized free space sections */ \
- + H5F_SIZEOF_SIZE(f) /* Size of serialized free space sections used */ \
- + H5F_SIZEOF_SIZE(f) /* Allocated size of serialized free space sections */ \
+#define H5FS_HEADER_SIZE(f) \
+ (/* General metadata fields */ \
+ H5FS_METADATA_PREFIX_SIZE \
+ \
+ /* Free space header specific fields */ \
+ + 1 /* Client ID */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* Total free space tracked */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* Total # of sections tracked */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* # of serializable sections tracked */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* # of ghost sections tracked */ \
+ + 2 /* Number of section classes */ \
+ + 2 /* Shrink percent */ \
+ + 2 /* Expand percent */ \
+ + 2 /* Size of address space for sections (log2 of value) */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* Max. size of section to track */ \
+ + (unsigned)H5F_SIZEOF_ADDR(f) /* Address of serialized free space sections */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* Size of serialized free space sections used */ \
+ + (unsigned)H5F_SIZEOF_SIZE(f) /* Allocated size of serialized free space sections */ \
)
/* Size of the free space serialized sections on disk */
-#define H5FS_SINFO_PREFIX_SIZE(f) ( \
- /* General metadata fields */ \
- H5FS_METADATA_PREFIX_SIZE \
- \
- /* Free space serialized sections specific fields */ \
- + H5F_SIZEOF_ADDR(f) /* Address of free space header for these sections */ \
+#define H5FS_SINFO_PREFIX_SIZE(f) \
+ (/* General metadata fields */ \
+ H5FS_METADATA_PREFIX_SIZE \
+ \
+ /* Free space serialized sections specific fields */ \
+ + (unsigned)H5F_SIZEOF_ADDR(f) /* Address of free space header for these sections */ \
)
-
/****************************/
/* Package Private Typedefs */
/****************************/
/* Callback info for loading a free space header into the cache */
typedef struct H5FS_hdr_cache_ud_t {
- H5F_t *f; /* File that free space header is within */
- size_t nclasses; /* Number of section classes */
- const H5FS_section_class_t **classes; /* Array of section class info */
- void *cls_init_udata; /* Pointer to class init user data */
- haddr_t addr; /* Address of header */
+ H5F_t * f; /* File that free space header is within */
+ size_t nclasses; /* Number of section classes */
+ const H5FS_section_class_t **classes; /* Array of section class info */
+ void * cls_init_udata; /* Pointer to class init user data */
+ haddr_t addr; /* Address of header */
} H5FS_hdr_cache_ud_t;
/* Callback info for loading free space section info into the cache */
typedef struct H5FS_sinfo_cache_ud_t {
- H5F_t *f; /* File that free space section info is within */
- H5FS_t *fspace; /* free space manager */
- hid_t dxpl_id;
+ H5F_t * f; /* File that free space section info is within */
+ H5FS_t *fspace; /* free space manager */
+ hid_t dxpl_id;
} H5FS_sinfo_cache_ud_t;
/* Free space section bin info */
typedef struct H5FS_bin_t {
- size_t tot_sect_count; /* Total # of sections in this bin */
- size_t serial_sect_count; /* # of serializable sections in this bin */
- size_t ghost_sect_count; /* # of un-serializable sections in this bin */
- H5SL_t *bin_list; /* Skip list of differently sized sections */
+ size_t tot_sect_count; /* Total # of sections in this bin */
+ size_t serial_sect_count; /* # of serializable sections in this bin */
+ size_t ghost_sect_count; /* # of un-serializable sections in this bin */
+ H5SL_t *bin_list; /* Skip list of differently sized sections */
} H5FS_bin_t;
/* Free space node for free space sections of the same size */
typedef struct H5FS_node_t {
- hsize_t sect_size; /* Size of all sections on list */
- size_t serial_count; /* # of serializable sections on list */
- size_t ghost_count; /* # of un-serializable sections on list */
- H5SL_t *sect_list; /* Skip list to hold pointers to actual free list section node */
+ hsize_t sect_size; /* Size of all sections on list */
+ size_t serial_count; /* # of serializable sections on list */
+ size_t ghost_count; /* # of un-serializable sections on list */
+ H5SL_t *sect_list; /* Skip list to hold pointers to actual free list section node */
} H5FS_node_t;
/* Free space section info */
@@ -128,23 +127,23 @@ typedef struct H5FS_sinfo_t {
/* Information for H5AC cache functions, _must_ be first field in structure */
H5AC_info_t cache_info;
-/* Stored information */
- H5FS_bin_t *bins; /* Array of lists of lists of free sections */
+ /* Stored information */
+ H5FS_bin_t *bins; /* Array of lists of lists of free sections */
-/* Computed/cached values */
- hbool_t dirty; /* Whether this info in memory is out of sync w/info in file */
+ /* Computed/cached values */
+ hbool_t dirty; /* Whether this info in memory is out of sync w/info in file */
unsigned nbins; /* Number of bins */
- size_t serial_size; /* Total size of all serializable sections */
- size_t tot_size_count; /* Total number of differently sized sections */
- size_t serial_size_count; /* Total number of differently sized serializable sections */
- size_t ghost_size_count; /* Total number of differently sized un-serializable sections */
+ size_t serial_size; /* Total size of all serializable sections */
+ size_t tot_size_count; /* Total number of differently sized sections */
+ size_t serial_size_count; /* Total number of differently sized serializable sections */
+ size_t ghost_size_count; /* Total number of differently sized un-serializable sections */
unsigned sect_prefix_size; /* Size of the section serialization prefix (in bytes) */
unsigned sect_off_size; /* Size of a section offset (in bytes) */
unsigned sect_len_size; /* Size of a section length (in bytes) */
- H5FS_t *fspace; /* Pointer to free space manager that owns sections */
+ H5FS_t * fspace; /* Pointer to free space manager that owns sections */
-/* Memory data structures (not stored directly) */
- H5SL_t *merge_list; /* Skip list to hold sections for detecting merges */
+ /* Memory data structures (not stored directly) */
+ H5SL_t *merge_list; /* Skip list to hold sections for detecting merges */
} H5FS_sinfo_t;
/* Free space header info */
@@ -152,45 +151,43 @@ struct H5FS_t {
/* Information for H5AC cache functions, _must_ be first field in structure */
H5AC_info_t cache_info;
-/* Stored information */
+ /* Stored information */
/* Statistics about sections managed */
- hsize_t tot_space; /* Total amount of space tracked */
- hsize_t tot_sect_count; /* Total # of sections tracked */
- hsize_t serial_sect_count; /* # of serializable sections tracked */
- hsize_t ghost_sect_count; /* # of un-serializable sections tracked */
+ hsize_t tot_space; /* Total amount of space tracked */
+ hsize_t tot_sect_count; /* Total # of sections tracked */
+ hsize_t serial_sect_count; /* # of serializable sections tracked */
+ hsize_t ghost_sect_count; /* # of un-serializable sections tracked */
/* Creation parameters */
- H5FS_client_t client; /* Type of user of this free space manager */
- unsigned nclasses; /* Number of section classes handled */
- unsigned shrink_percent; /* Percent of "normal" serialized size to shrink serialized space at */
- unsigned expand_percent; /* Percent of "normal" serialized size to expand serialized space at */
- unsigned max_sect_addr; /* Size of address space free sections are within (log2 of actual value) */
- hsize_t max_sect_size; /* Maximum size of section to track */
+ H5FS_client_t client; /* Type of user of this free space manager */
+ unsigned nclasses; /* Number of section classes handled */
+ unsigned shrink_percent; /* Percent of "normal" serialized size to shrink serialized space at */
+ unsigned expand_percent; /* Percent of "normal" serialized size to expand serialized space at */
+ unsigned max_sect_addr; /* Size of address space free sections are within (log2 of actual value) */
+ hsize_t max_sect_size; /* Maximum size of section to track */
/* Serialized section information */
- haddr_t sect_addr; /* Address of the section info in the file */
- hsize_t sect_size; /* Size of the section info in the file */
- hsize_t alloc_sect_size; /* Allocated size of the section info in the file */
-
-/* Computed/cached values */
- unsigned rc; /* Count of outstanding references to struct */
- haddr_t addr; /* Address of free space header on disk */
- size_t hdr_size; /* Size of free space header on disk */
- H5FS_sinfo_t *sinfo; /* Section information */
- unsigned sinfo_lock_count; /* # of times the section info has been locked */
- hbool_t sinfo_protected; /* Whether the section info was protected when locked */
- hbool_t sinfo_modified; /* Whether the section info has been modified while locked */
- H5AC_protect_t sinfo_accmode; /* Access mode for protecting the section info */
- size_t max_cls_serial_size; /* Max. additional size of serialized form of section */
- hsize_t threshold; /* Threshold for alignment */
- hsize_t alignment; /* Alignment */
-
-
-/* Memory data structures (not stored directly) */
+ haddr_t sect_addr; /* Address of the section info in the file */
+ hsize_t sect_size; /* Size of the section info in the file */
+ hsize_t alloc_sect_size; /* Allocated size of the section info in the file */
+
+ /* Computed/cached values */
+ unsigned rc; /* Count of outstanding references to struct */
+ haddr_t addr; /* Address of free space header on disk */
+ size_t hdr_size; /* Size of free space header on disk */
+ H5FS_sinfo_t * sinfo; /* Section information */
+ unsigned sinfo_lock_count; /* # of times the section info has been locked */
+ hbool_t sinfo_protected; /* Whether the section info was protected when locked */
+ hbool_t sinfo_modified; /* Whether the section info has been modified while locked */
+ H5AC_protect_t sinfo_accmode; /* Access mode for protecting the section info */
+ size_t max_cls_serial_size; /* Max. additional size of serialized form of section */
+ hsize_t threshold; /* Threshold for alignment */
+ hsize_t alignment; /* Alignment */
+
+ /* Memory data structures (not stored directly) */
H5FS_section_class_t *sect_cls; /* Array of section classes for this free list */
};
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -213,17 +210,16 @@ H5FL_EXTERN(H5FS_sinfo_t);
/* Declare a free list to manage the H5FS_t struct */
H5FL_EXTERN(H5FS_t);
-
/******************************/
/* Package Private Prototypes */
/******************************/
/* Free space manager header routines */
-H5_DLL H5FS_t *H5FS_new(const H5F_t *f, size_t nclasses,
- const H5FS_section_class_t *classes[], void *cls_init_udata);
-H5_DLL herr_t H5FS_incr(H5FS_t *fspace);
-H5_DLL herr_t H5FS_decr(H5FS_t *fspace);
-H5_DLL herr_t H5FS_dirty(H5FS_t *fspace);
+H5_DLL H5FS_t *H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[],
+ void *cls_init_udata);
+H5_DLL herr_t H5FS_incr(H5FS_t *fspace);
+H5_DLL herr_t H5FS_decr(H5FS_t *fspace);
+H5_DLL herr_t H5FS_dirty(H5FS_t *fspace);
/* Free space section routines */
H5_DLL H5FS_sinfo_t *H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace);
@@ -241,8 +237,7 @@ H5_DLL herr_t H5FS_sect_assert(const H5FS_t *fspace);
/* Testing routines */
#ifdef H5FS_TESTING
H5_DLL herr_t H5FS_get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam);
-H5_DLL int H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
+H5_DLL int H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
#endif /* H5FS_TESTING */
#endif /* _H5FSpkg_H */
-
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index 30c8173..cdcad73 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5FSprivate.h
- * May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5FSprivate.h
+ * May 2 2006
+ * Quincey Koziol
*
- * Purpose: Private header for library accessible file free space routines.
+ * Purpose: Private header for library accessible file free space routines.
*
*-------------------------------------------------------------------------
*/
@@ -29,49 +29,56 @@
#include "H5FSpublic.h"
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
/* Library Private Macros */
/**************************/
/* Flags for H5FS_section_class_t 'flags' field */
-#define H5FS_CLS_GHOST_OBJ 0x01 /* Objects in this class shouldn't be
- * serialized to the file.
- */
-#define H5FS_CLS_SEPAR_OBJ 0x02 /* Objects in this class shouldn't
- * participate in merge operations.
- */
-#define H5FS_CLS_MERGE_SYM 0x04 /* Objects in this class only merge
- * with other objects in this class.
- */
-#define H5FS_CLS_ADJUST_OK 0x08 /* Objects in this class can be merged
- * without requiring a can_adjust/adjust
- * callback pair.
- */
+#define H5FS_CLS_GHOST_OBJ \
+ 0x01 /* Objects in this class shouldn't be \
+ * serialized to the file. \
+ */
+#define H5FS_CLS_SEPAR_OBJ \
+ 0x02 /* Objects in this class shouldn't \
+ * participate in merge operations. \
+ */
+#define H5FS_CLS_MERGE_SYM \
+ 0x04 /* Objects in this class only merge \
+ * with other objects in this class. \
+ */
+#define H5FS_CLS_ADJUST_OK \
+ 0x08 /* Objects in this class can be merged \
+ * without requiring a can_adjust/adjust \
+ * callback pair. \
+ */
/* Flags for H5FS_add() */
-#define H5FS_ADD_DESERIALIZING 0x01 /* Free space is being deserialized
- */
-#define H5FS_ADD_RETURNED_SPACE 0x02 /* Section was previously allocated
- * and is being returned to the
- * free space manager (usually
- * as a result of freeing an
- * object)
- */
-#define H5FS_ADD_SKIP_VALID 0x04 /* Don't check validity after adding
- * this section. (state of the
- * managed sections is in flux)
- */
+#define H5FS_ADD_DESERIALIZING \
+ 0x01 /* Free space is being deserialized \
+ */
+#define H5FS_ADD_RETURNED_SPACE \
+ 0x02 /* Section was previously allocated \
+ * and is being returned to the \
+ * free space manager (usually \
+ * as a result of freeing an \
+ * object) \
+ */
+#define H5FS_ADD_SKIP_VALID \
+ 0x04 /* Don't check validity after adding \
+ * this section. (state of the \
+ * managed sections is in flux) \
+ */
/* Flags for deserialize callback */
-#define H5FS_DESERIALIZE_NO_ADD 0x01 /* Don't add section to free space
- * manager after it's deserialized
- * (its only here for it's side-
- * effects).
- */
-
+#define H5FS_DESERIALIZE_NO_ADD \
+ 0x01 /* Don't add section to free space \
+ * manager after it's deserialized \
+ * (its only here for it's side- \
+ * effects). \
+ */
/****************************/
/* Library Private Typedefs */
@@ -86,76 +93,83 @@ typedef struct H5FS_section_info_t H5FS_section_info_t;
/* Free space section class info */
typedef struct H5FS_section_class_t {
/* Class variables */
- const unsigned type; /* Type of free space section */
- size_t serial_size; /* Size of serialized form of section */
- unsigned flags; /* Class flags */
- void *cls_private; /* Class private information */
+ const unsigned type; /* Type of free space section */
+ size_t serial_size; /* Size of serialized form of section */
+ unsigned flags; /* Class flags */
+ void * cls_private; /* Class private information */
/* Class methods */
- herr_t (*init_cls)(struct H5FS_section_class_t *, void *); /* Routine to initialize class-specific settings */
- herr_t (*term_cls)(struct H5FS_section_class_t *); /* Routine to terminate class-specific settings */
+ herr_t (*init_cls)(struct H5FS_section_class_t *,
+ void *); /* Routine to initialize class-specific settings */
+ herr_t (*term_cls)(struct H5FS_section_class_t *); /* Routine to terminate class-specific settings */
/* Object methods */
- herr_t (*add)(H5FS_section_info_t *, unsigned *, void *); /* Routine called when section is about to be added to manager */
- herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, uint8_t *); /* Routine to serialize a "live" section into a buffer */
- H5FS_section_info_t *(*deserialize)(const struct H5FS_section_class_t *, hid_t dxpl_id, const uint8_t *, haddr_t, hsize_t, unsigned *); /* Routine to deserialize a buffer into a "live" section */
- htri_t (*can_merge)(const H5FS_section_info_t *, const H5FS_section_info_t *, void *); /* Routine to determine if two nodes are mergable */
- herr_t (*merge)(H5FS_section_info_t *, H5FS_section_info_t *, void *); /* Routine to merge two nodes */
- htri_t (*can_shrink)(const H5FS_section_info_t *, void *); /* Routine to determine if node can shrink container */
- herr_t (*shrink)(H5FS_section_info_t **, void *); /* Routine to shrink container */
- herr_t (*free)(H5FS_section_info_t *); /* Routine to free node */
- herr_t (*valid)(const struct H5FS_section_class_t *, const H5FS_section_info_t *); /* Routine to check if a section is valid */
- H5FS_section_info_t *(*split)(H5FS_section_info_t *, hsize_t); /* Routine to create the split section */
- herr_t (*debug)(const H5FS_section_info_t *, FILE *, int , int ); /* Routine to dump debugging information about a section */
+ herr_t (*add)(H5FS_section_info_t *, unsigned *,
+ void *); /* Routine called when section is about to be added to manager */
+ herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *,
+ uint8_t *); /* Routine to serialize a "live" section into a buffer */
+ H5FS_section_info_t *(*deserialize)(
+ const struct H5FS_section_class_t *, hid_t dxpl_id, const uint8_t *, haddr_t, hsize_t,
+ unsigned *); /* Routine to deserialize a buffer into a "live" section */
+ htri_t (*can_merge)(const H5FS_section_info_t *, const H5FS_section_info_t *,
+ void *); /* Routine to determine if two nodes are mergable */
+ herr_t (*merge)(H5FS_section_info_t *, H5FS_section_info_t *, void *); /* Routine to merge two nodes */
+ htri_t (*can_shrink)(const H5FS_section_info_t *,
+ void *); /* Routine to determine if node can shrink container */
+ herr_t (*shrink)(H5FS_section_info_t **, void *); /* Routine to shrink container */
+ herr_t (*free)(H5FS_section_info_t *); /* Routine to free node */
+ herr_t (*valid)(const struct H5FS_section_class_t *,
+ const H5FS_section_info_t *); /* Routine to check if a section is valid */
+ H5FS_section_info_t *(*split)(H5FS_section_info_t *, hsize_t); /* Routine to create the split section */
+ herr_t (*debug)(const H5FS_section_info_t *, FILE *, int,
+ int); /* Routine to dump debugging information about a section */
} H5FS_section_class_t;
/* State of section ("live" or "serialized") */
typedef enum H5FS_section_state_t {
- H5FS_SECT_LIVE, /* Section has "live" memory references */
- H5FS_SECT_SERIALIZED /* Section is in "serialized" form */
+ H5FS_SECT_LIVE, /* Section has "live" memory references */
+ H5FS_SECT_SERIALIZED /* Section is in "serialized" form */
} H5FS_section_state_t;
/* Free space section info */
struct H5FS_section_info_t {
- haddr_t addr; /* Offset of free space section in the address space */
- hsize_t size; /* Size of free space section */
- unsigned type; /* Type of free space section (i.e. class) */
- H5FS_section_state_t state; /* Whether the section is in "serialized" or "live" form */
+ haddr_t addr; /* Offset of free space section in the address space */
+ hsize_t size; /* Size of free space section */
+ unsigned type; /* Type of free space section (i.e. class) */
+ H5FS_section_state_t state; /* Whether the section is in "serialized" or "live" form */
};
/* Free space client IDs for identifying user of free space */
typedef enum H5FS_client_t {
- H5FS_CLIENT_FHEAP_ID = 0, /* Free space is used by fractal heap */
- H5FS_CLIENT_FILE_ID, /* Free space is used by file */
- H5FS_NUM_CLIENT_ID /* Number of free space client IDs (must be last) */
+ H5FS_CLIENT_FHEAP_ID = 0, /* Free space is used by fractal heap */
+ H5FS_CLIENT_FILE_ID, /* Free space is used by file */
+ H5FS_NUM_CLIENT_ID /* Number of free space client IDs (must be last) */
} H5FS_client_t;
/* Free space creation parameters */
typedef struct H5FS_create_t {
- H5FS_client_t client; /* Client's ID */
- unsigned shrink_percent; /* Percent of "normal" serialized size to shrink serialized space at */
- unsigned expand_percent; /* Percent of "normal" serialized size to expand serialized space at */
- unsigned max_sect_addr; /* Size of address space free sections are within (log2 of actual value) */
- hsize_t max_sect_size; /* Maximum size of section to track */
+ H5FS_client_t client; /* Client's ID */
+ unsigned shrink_percent; /* Percent of "normal" serialized size to shrink serialized space at */
+ unsigned expand_percent; /* Percent of "normal" serialized size to expand serialized space at */
+ unsigned max_sect_addr; /* Size of address space free sections are within (log2 of actual value) */
+ hsize_t max_sect_size; /* Maximum size of section to track */
} H5FS_create_t;
/* Free space statistics info */
typedef struct H5FS_stat_t {
- hsize_t tot_space; /* Total amount of space tracked */
- hsize_t tot_sect_count; /* Total # of sections tracked */
- hsize_t serial_sect_count; /* # of serializable sections tracked */
- hsize_t ghost_sect_count; /* # of un-serializable sections tracked */
- haddr_t addr; /* Address of free space header on disk */
- hsize_t hdr_size; /* Size of the free-space header on disk */
- haddr_t sect_addr; /* Address of the section info in the file */
- hsize_t alloc_sect_size; /* Allocated size of the section info in the file */
- hsize_t sect_size; /* Size of the section info in the file */
+ hsize_t tot_space; /* Total amount of space tracked */
+ hsize_t tot_sect_count; /* Total # of sections tracked */
+ hsize_t serial_sect_count; /* # of serializable sections tracked */
+ hsize_t ghost_sect_count; /* # of un-serializable sections tracked */
+ haddr_t addr; /* Address of free space header on disk */
+ hsize_t hdr_size; /* Size of the free-space header on disk */
+ haddr_t sect_addr; /* Address of the section info in the file */
+ hsize_t alloc_sect_size; /* Allocated size of the section info in the file */
+ hsize_t sect_size; /* Size of the section info in the file */
} H5FS_stat_t;
/* Typedef for iteration operations */
-typedef herr_t (*H5FS_operator_t)(H5FS_section_info_t *sect,
- void *operator_data/*in,out*/);
-
+typedef herr_t (*H5FS_operator_t)(H5FS_section_info_t *sect, void *operator_data /*in,out*/);
/*****************************/
/* Library-private Variables */
@@ -164,35 +178,33 @@ typedef herr_t (*H5FS_operator_t)(H5FS_section_info_t *sect,
/* Declare a free list to manage the H5FS_section_class_t sequence information */
H5FL_SEQ_EXTERN(H5FS_section_class_t);
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
/* Free space manager routines */
-H5_DLL H5FS_t *H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr,
- const H5FS_create_t *fs_create, size_t nclasses,
- const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold);
-H5_DLL H5FS_t *H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr,
- size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold);
-H5_DLL herr_t H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size);
-H5_DLL herr_t H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr);
-H5_DLL herr_t H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace);
+H5_DLL H5FS_t *H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_create,
+ size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata,
+ hsize_t alignment, hsize_t threshold);
+H5_DLL H5FS_t *H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, size_t nclasses,
+ const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment,
+ hsize_t threshold);
+H5_DLL herr_t H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size);
+H5_DLL herr_t H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr);
+H5_DLL herr_t H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace);
/* Free space section routines */
-H5_DLL herr_t H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- H5FS_section_info_t *node, unsigned flags, void *op_data);
-H5_DLL htri_t H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- haddr_t addr, hsize_t size, hsize_t extra_requested);
-H5_DLL herr_t H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- H5FS_section_info_t *node);
-H5_DLL htri_t H5FS_sect_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- hsize_t request, H5FS_section_info_t **node);
+H5_DLL herr_t H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *node,
+ unsigned flags, void *op_data);
+H5_DLL htri_t H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, haddr_t addr, hsize_t size,
+ hsize_t extra_requested);
+H5_DLL herr_t H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *node);
+H5_DLL htri_t H5FS_sect_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hsize_t request,
+ H5FS_section_info_t **node);
H5_DLL herr_t H5FS_sect_iterate(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_operator_t op, void *op_data);
-H5_DLL herr_t H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space,
- hsize_t *nsects);
-H5_DLL herr_t H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- H5FS_section_info_t *sect, unsigned new_class);
+H5_DLL herr_t H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space, hsize_t *nsects);
+H5_DLL herr_t H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect,
+ unsigned new_class);
H5_DLL htri_t H5FS_sect_try_shrink_eoa(const H5F_t *f, hid_t dxpl_id, const H5FS_t *fspace, void *op_data);
H5_DLL herr_t H5FS_sect_query_last_sect(const H5FS_t *fspace, haddr_t *sect_addr, hsize_t *sect_size);
@@ -200,12 +212,10 @@ H5_DLL herr_t H5FS_sect_query_last_sect(const H5FS_t *fspace, haddr_t *sect_addr
H5_DLL herr_t H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats);
/* Debugging routines for dumping file structures */
-H5_DLL herr_t H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, haddr_t fs_addr, haddr_t client_addr);
-H5_DLL herr_t H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect,
- FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t fs_addr, haddr_t client_addr);
+H5_DLL herr_t H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *stream, int indent,
+ int fwidth);
#endif /* _H5FSprivate_H */
-
diff --git a/src/H5FSpublic.h b/src/H5FSpublic.h
index a2f69ae..09a2f6d 100644
--- a/src/H5FSpublic.h
+++ b/src/H5FSpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5FSpublic.h
* May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Public declarations for the file free space package.
*
@@ -49,4 +49,3 @@ extern "C" {
#endif
#endif /* _H5FSpublic_H */
-
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 432a36d..2c04204 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -6,16 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Monday, July 31, 2006
*
- * Purpose: Free space tracking functions.
+ * Purpose: Free space tracking functions.
*
*/
@@ -23,66 +23,57 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
-
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* File free space */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* File free space */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for skip list iterator callback for iterating over section size nodes */
typedef struct {
- H5FS_t *fspace; /* Free space manager info */
- H5FS_operator_t op; /* Operator for the iteration */
- void *op_data; /* Information to pass to the operator */
+ H5FS_t * fspace; /* Free space manager info */
+ H5FS_operator_t op; /* Operator for the iteration */
+ void * op_data; /* Information to pass to the operator */
} H5FS_iter_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
- unsigned flags);
+static herr_t H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned flags);
static herr_t H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls);
static herr_t H5FS_size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node,
- const H5FS_section_class_t *cls);
+ const H5FS_section_class_t *cls);
static herr_t H5FS_sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect);
-static herr_t H5FS_sect_unlink_rest(H5FS_t *fspace,
- const H5FS_section_class_t *cls, H5FS_section_info_t *sect);
+ H5FS_section_info_t *sect);
+static herr_t H5FS_sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
+ H5FS_section_info_t *sect);
static herr_t H5FS_sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect);
static herr_t H5FS_sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect);
-static herr_t H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect, unsigned flags);
-static herr_t H5FS_sect_link(H5FS_t *fspace, H5FS_section_info_t *sect,
- unsigned flags);
-static herr_t H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect,
- void *op_data);
+ H5FS_section_info_t *sect);
+static herr_t H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_section_info_t *sect,
+ unsigned flags);
+static herr_t H5FS_sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags);
+static herr_t H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data);
static htri_t H5FS_sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node);
static herr_t H5FS_sect_serialize_size(H5FS_t *fspace);
-
/*********************/
/* Package Variables */
/*********************/
@@ -96,27 +87,23 @@ H5FL_SEQ_DEFINE(H5FS_bin_t);
/* Declare a free list to manage the H5FS_sinfo_t struct */
H5FL_DEFINE(H5FS_sinfo_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_new
+ * Function: H5FS_sinfo_new
*
- * Purpose: Create new section info structure
+ * Purpose: Create new section info structure
*
- * Return: Success: non-NULL, pointer to new section info struct
- * Failure: NULL
+ * Return: Success: non-NULL, pointer to new section info struct
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 31, 2006
*
*-------------------------------------------------------------------------
@@ -124,8 +111,8 @@ H5FL_DEFINE(H5FS_sinfo_t);
H5FS_sinfo_t *
H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace)
{
- H5FS_sinfo_t *sinfo = NULL; /* Section information struct created */
- H5FS_sinfo_t *ret_value; /* Return value */
+ H5FS_sinfo_t *sinfo = NULL; /* Section information struct created */
+ H5FS_sinfo_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -133,31 +120,33 @@ H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace)
HDassert(f);
HDassert(fspace);
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: fspace->addr = %a\n", FUNC, fspace->addr);
+ HDfprintf(stderr, "%s: fspace->addr = %a\n", FUNC, fspace->addr);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate the free space header */
- if(NULL == (sinfo = H5FL_CALLOC(H5FS_sinfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (sinfo = H5FL_CALLOC(H5FS_sinfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set non-zero values */
- sinfo->nbins = H5VM_log2_gen(fspace->max_sect_size);
+ sinfo->nbins = H5VM_log2_gen(fspace->max_sect_size);
sinfo->sect_prefix_size = (size_t)H5FS_SINFO_PREFIX_SIZE(f);
- sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
- sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
+ sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
+ sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: fspace->max_sect_size = %Hu\n", FUNC, fspace->max_sect_size);
-HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", FUNC, fspace->max_sect_addr);
-HDfprintf(stderr, "%s: sinfo->nbins = %u\n", FUNC, sinfo->nbins);
-HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", FUNC, sinfo->sect_off_size, sinfo->sect_len_size);
+ HDfprintf(stderr, "%s: fspace->max_sect_size = %Hu\n", FUNC, fspace->max_sect_size);
+ HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", FUNC, fspace->max_sect_addr);
+ HDfprintf(stderr, "%s: sinfo->nbins = %u\n", FUNC, sinfo->nbins);
+ HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", FUNC,
+ sinfo->sect_off_size, sinfo->sect_len_size);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate space for the section size bins */
- if(NULL == (sinfo->bins = H5FL_SEQ_CALLOC(H5FS_bin_t, (size_t)sinfo->nbins)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space section bin array")
+ if (NULL == (sinfo->bins = H5FL_SEQ_CALLOC(H5FS_bin_t, (size_t)sinfo->nbins)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for free space section bin array")
/* Increment the reference count on the free space manager header */
- if(H5FS_incr(fspace) < 0)
+ if (H5FS_incr(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header")
sinfo->fspace = fspace;
@@ -170,9 +159,9 @@ HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n",
ret_value = sinfo;
done:
- if(ret_value == NULL && sinfo) {
+ if (ret_value == NULL && sinfo) {
/* Release bins for skip lists */
- if(sinfo->bins)
+ if (sinfo->bins)
sinfo->bins = H5FL_SEQ_FREE(H5FS_bin_t, sinfo->bins);
/* Release free space section info */
@@ -182,21 +171,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_new() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_lock
+ * Function: H5FS_sinfo_lock
*
- * Purpose: Make certain the section info for the free space manager is
+ * Purpose: Make certain the section info for the free space manager is
* in memory.
*
* Either uses existing section info owned by the free space
* header, loads section info from disk, or creates new section
* info
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, February 7, 2008
*
*-------------------------------------------------------------------------
@@ -204,13 +191,15 @@ done:
static herr_t
H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5AC_protect_t accmode)
{
- H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
+ HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC,
+ fspace->addr, fspace->sinfo, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
@@ -220,51 +209,56 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
/* If the free space header doesn't already "own" the section info, load
* section info or create it
*/
- if(fspace->sinfo) {
+ if (fspace->sinfo) {
/* Check if the section info was protected & we want a different access mode */
- if(fspace->sinfo_protected && accmode != fspace->sinfo_accmode) {
+ if (fspace->sinfo_protected && accmode != fspace->sinfo_accmode) {
/* Check if we need to switch from read-only access to read-write */
- if(H5AC_WRITE == accmode) {
+ if (H5AC_WRITE == accmode) {
/* Unprotect the read-only section info */
- if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
+ if (H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo,
+ H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL,
+ "unable to release free space section info")
/* Re-protect the section info with read-write access */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.dxpl_id = dxpl_id;
- cache_udata.fspace = fspace;
- if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC_WRITE)))
+ cache_udata.fspace = fspace;
+ if (NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(
+ f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections")
/* Switch the access mode we have */
fspace->sinfo_accmode = H5AC_WRITE;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
else {
/* If the section address is defined, load it from the file */
- if(H5F_addr_defined(fspace->sect_addr)) {
+ if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
HDassert(fspace->sinfo_protected == FALSE);
HDassert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
+ HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", FUNC,
+ fspace->sect_addr);
#endif /* H5FS_SINFO_DEBUG */
/* Protect the free space sections */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.dxpl_id = dxpl_id;
- cache_udata.fspace = fspace;
- if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, accmode)))
+ cache_udata.fspace = fspace;
+ if (NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(
+ f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, accmode)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections")
/* Remember that we protected the section info & the access mode */
fspace->sinfo_protected = TRUE;
- fspace->sinfo_accmode = accmode;
+ fspace->sinfo_accmode = accmode;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Creating new section info\n", FUNC);
+ HDfprintf(stderr, "%s: Creating new section info\n", FUNC);
#endif /* H5FS_SINFO_DEBUG */
/* Sanity check */
HDassert(fspace->tot_sect_count == 0);
@@ -272,13 +266,13 @@ HDfprintf(stderr, "%s: Creating new section info\n", FUNC);
HDassert(fspace->ghost_sect_count == 0);
/* Allocate and initialize free space section info */
- if(NULL == (fspace->sinfo = H5FS_sinfo_new(f, fspace)))
+ if (NULL == (fspace->sinfo = H5FS_sinfo_new(f, fspace)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create section info")
/* Set initial size of section info to 0 */
fspace->sect_size = fspace->alloc_sect_size = 0;
} /* end if */
- } /* end if */
+ } /* end if */
HDassert(fspace->rc == 2);
/* Increment the section info lock count */
@@ -286,23 +280,23 @@ HDfprintf(stderr, "%s: Creating new section info\n", FUNC);
done:
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
+ HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC,
+ fspace->addr, fspace->sinfo, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_lock() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sinfo_unlock
+ * Function: H5FS_sinfo_unlock
*
- * Purpose: Release the section info, either giving ownership back to
+ * Purpose: Release the section info, either giving ownership back to
* the cache or letting the free space header keep it.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, February 7, 2008
*
*-------------------------------------------------------------------------
@@ -310,13 +304,18 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
static herr_t
H5FS_sinfo_unlock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hbool_t modified)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Called, modified = %t, fspace->addr = %a, fspace->sect_addr = %a\n", FUNC, modified, fspace->addr, fspace->sect_addr);
-HDfprintf(stderr, "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %t, fspace->sinfo_protected = %t\n", FUNC, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
+ HDfprintf(stderr, "%s: Called, modified = %t, fspace->addr = %a, fspace->sect_addr = %a\n", FUNC,
+ modified, fspace->addr, fspace->sect_addr);
+ HDfprintf(
+ stderr,
+ "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %t, fspace->sinfo_protected = %t\n",
+ FUNC, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
@@ -326,9 +325,9 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
HDassert(fspace->sinfo);
/* Check if we modified any section */
- if(modified) {
+ if (modified) {
/* Check if the section info was protected with a different access mode */
- if(fspace->sinfo_protected && fspace->sinfo_accmode != H5AC_WRITE)
+ if (fspace->sinfo_protected && fspace->sinfo_accmode != H5AC_WRITE)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDIRTY, FAIL, "attempt to modify read-only section info")
/* If we modified the section info, mark it dirty */
@@ -340,7 +339,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
/* Assume that the modification will affect the statistics in the header
* and mark that dirty also
*/
- if(H5FS_dirty(fspace) < 0)
+ if (H5FS_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end if */
@@ -348,24 +347,26 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
fspace->sinfo_lock_count--;
/* Check if section info lock count dropped to zero */
- if(fspace->sinfo_lock_count == 0) {
- hbool_t release_sinfo_space = FALSE; /* Flag to indicate section info space in file should be released */
+ if (fspace->sinfo_lock_count == 0) {
+ hbool_t release_sinfo_space =
+ FALSE; /* Flag to indicate section info space in file should be released */
/* Check if we actually protected the section info */
- if(fspace->sinfo_protected) {
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
+ if (fspace->sinfo_protected) {
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
/* Sanity check */
HDassert(H5F_addr_defined(fspace->addr));
/* Check if we've made new changes to the section info while locked */
- if(fspace->sinfo_modified) {
+ if (fspace->sinfo_modified) {
/* Note that we've modified the section info */
cache_flags |= H5AC__DIRTIED_FLAG;
/* Check if the section info size in the file has changed */
- if(fspace->sect_size != fspace->alloc_sect_size)
+ if (fspace->sect_size != fspace->alloc_sect_size)
cache_flags |= H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;
+
} /* end if */
/* Sanity check */
@@ -375,35 +376,36 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
/* (Possibly dirty) */
/* (Possibly taking ownership from the cache) */
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", FUNC, cache_flags);
+ HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", FUNC, cache_flags);
#endif /* H5FS_SINFO_DEBUG */
- if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) <
+ 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
/* Reset the protected flag on the section info */
fspace->sinfo_protected = FALSE;
/* Check if header is taking ownership of section info */
- if((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
+ if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Taking ownership of section info\n", FUNC);
+ HDfprintf(stderr, "%s: Taking ownership of section info\n", FUNC);
#endif /* H5FS_SINFO_DEBUG */
/* Set flag to release section info space in file */
release_sinfo_space = TRUE;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Relinquishing section info ownership\n", FUNC);
+ HDfprintf(stderr, "%s: Relinquishing section info ownership\n", FUNC);
#endif /* H5FS_SINFO_DEBUG */
/* Free space header relinquished ownership of section info */
fspace->sinfo = NULL;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check if the section info was modified */
- if(fspace->sinfo_modified) {
+ if (fspace->sinfo_modified) {
/* Check if we need to release section info in the file */
- if(H5F_addr_defined(fspace->sect_addr))
+ if (H5F_addr_defined(fspace->sect_addr))
/* Set flag to release section info space in file */
release_sinfo_space = TRUE;
else
@@ -411,59 +413,60 @@ HDfprintf(stderr, "%s: Relinquishing section info ownership\n", FUNC);
} /* end if */
else {
/* Sanity checks... */
- if(H5F_addr_defined(fspace->sect_addr))
+ if (H5F_addr_defined(fspace->sect_addr))
HDassert(fspace->alloc_sect_size == fspace->sect_size);
else
HDassert(fspace->alloc_sect_size == 0);
} /* end else */
- } /* end else */
+ } /* end else */
/* Reset the "section info modified" flag */
fspace->sinfo_modified = FALSE;
/* Check if header needs to release section info in the file */
- if(release_sinfo_space) {
- haddr_t old_sect_addr = fspace->sect_addr; /* Previous location of section info in file */
- hsize_t old_alloc_sect_size = fspace->alloc_sect_size; /* Previous size of section info in file */
+ if (release_sinfo_space) {
+ haddr_t old_sect_addr = fspace->sect_addr; /* Previous location of section info in file */
+ hsize_t old_alloc_sect_size = fspace->alloc_sect_size; /* Previous size of section info in file */
/* Sanity check */
HDassert(H5F_addr_defined(fspace->addr));
/* Reset section info in header */
- fspace->sect_addr = HADDR_UNDEF;
+ fspace->sect_addr = HADDR_UNDEF;
fspace->alloc_sect_size = 0;
/* If we haven't already marked the header dirty, do so now */
- if(!modified)
- if(H5FS_dirty(fspace) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+ if (!modified)
+ if (H5FS_dirty(fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL,
+ "unable to mark free space header as dirty")
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Freeing section info on disk, old_sect_addr = %a, old_alloc_sect_size = %Hu\n", FUNC, old_sect_addr, old_alloc_sect_size);
+ HDfprintf(stderr,
+ "%s: Freeing section info on disk, old_sect_addr = %a, old_alloc_sect_size = %Hu\n",
+ FUNC, old_sect_addr, old_alloc_sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Release space for section info in file */
- if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, old_sect_addr, old_alloc_sect_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, old_sect_addr, old_alloc_sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections")
} /* end if */
- } /* end if */
+ } /* end if */
done:
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_unlock() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_serialize_size
+ * Function: H5FS_sect_serialize_size
*
- * Purpose: Determine serialized size of all sections in free space manager
+ * Purpose: Determine serialized size of all sections in free space manager
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 8, 2006
*
*-------------------------------------------------------------------------
@@ -475,26 +478,17 @@ H5FS_sect_serialize_size(H5FS_t *fspace)
/* Check arguments. */
HDassert(fspace);
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 1.0 - fspace->sect_size = %Hu\n", "H5FS_sect_serialize_size", fspace->sect_size);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Zu\n", "H5FS_sect_serialize_size", fspace->serial_sect_count);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", "H5FS_sect_serialize_size", fspace->alloc_sect_size);
-HDfprintf(stderr, "%s: fspace->sinfo->serial_size_count = %Zu\n", "H5FS_sect_serialize_size", fspace->sinfo->serial_size_count);
-#endif /* QAK */
/* Compute the size of the buffer required to serialize all the sections */
- if(fspace->serial_sect_count > 0) {
- size_t sect_buf_size; /* Section buffer size */
+ if (fspace->serial_sect_count > 0) {
+ size_t sect_buf_size; /* Section buffer size */
/* Serialized sections prefix */
sect_buf_size = fspace->sinfo->sect_prefix_size;
/* Count for each differently sized serializable section */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->sinfo->serial_size_count = %Zu\n", "H5FS_sect_serialize_size", fspace->sinfo->serial_size_count);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", "H5FS_sect_serialize_size", fspace->serial_sect_count);
-#endif /* QAK */
- sect_buf_size += fspace->sinfo->serial_size_count * H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count);
+ sect_buf_size +=
+ fspace->sinfo->serial_size_count * H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count);
/* Size for each differently sized serializable section */
sect_buf_size += fspace->sinfo->serial_size_count * fspace->sinfo->sect_len_size;
@@ -518,26 +512,23 @@ HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", "H5FS_sect_serialize_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_sect_serialize_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_increase
+ * Function: H5FS_sect_increase
*
- * Purpose: Increase the size of the serialized free space section info
+ * Purpose: Increase the size of the serialized free space section info
* on disk
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 8, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
- unsigned flags)
+H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned flags)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -550,7 +541,7 @@ H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
fspace->tot_sect_count++;
/* Check for serializable or 'ghost' section */
- if(cls->flags & H5FS_CLS_GHOST_OBJ) {
+ if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
HDassert(cls->serial_size == 0);
@@ -562,36 +553,29 @@ H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
fspace->serial_sect_count++;
/* Increment amount of space required to serialize all sections */
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size);
-HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
-#endif /* QAK */
fspace->sinfo->serial_size += cls->serial_size;
/* Update the free space sections' serialized size */
/* (if we're not deserializing the sections from disk) */
- if(!(flags & H5FS_ADD_DESERIALIZING)) {
- if(H5FS_sect_serialize_size(fspace) < 0)
+ if (!(flags & H5FS_ADD_DESERIALIZING)) {
+ if (H5FS_sect_serialize_size(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk")
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_increase() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_decrease
+ * Function: H5FS_sect_decrease
*
- * Purpose: Decrease the size of the serialized free space section info
+ * Purpose: Decrease the size of the serialized free space section info
* on disk
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 8, 2006
*
*-------------------------------------------------------------------------
@@ -599,7 +583,7 @@ done:
static herr_t
H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -612,7 +596,7 @@ H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
fspace->tot_sect_count--;
/* Check for serializable or 'ghost' section */
- if(cls->flags & H5FS_CLS_GHOST_OBJ) {
+ if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
HDassert(cls->serial_size == 0);
@@ -624,14 +608,10 @@ H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
fspace->serial_sect_count--;
/* Decrement amount of space required to serialize all sections */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size);
-HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
-#endif /* QAK */
fspace->sinfo->serial_size -= cls->serial_size;
/* Update the free space sections' serialized size */
- if(H5FS_sect_serialize_size(fspace) < 0)
+ if (H5FS_sect_serialize_size(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk")
} /* end else */
@@ -639,25 +619,23 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_decrease() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_size_node_decr
+ * Function: H5FS_size_node_decr
*
- * Purpose: Decrement the number of sections of a particular size
+ * Purpose: Decrement the number of sections of a particular size
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FS_size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node,
- const H5FS_section_class_t *cls)
+ const H5FS_section_class_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -671,12 +649,9 @@ H5FS_size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node,
* the bin's skiplist is also a skiplist...)
*/
sinfo->bins[bin].tot_sect_count--;
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bins[bin].sect_count);
-#endif /* QAK */
/* Check for 'ghost' or 'serializable' section */
- if(cls->flags & H5FS_CLS_GHOST_OBJ) {
+ if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Decrement node's ghost section count */
fspace_node->ghost_count--;
@@ -684,7 +659,7 @@ HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bi
sinfo->bins[bin].ghost_sect_count--;
/* If the node has no more ghost sections, decrement number of ghost section sizes managed */
- if(fspace_node->ghost_count == 0)
+ if (fspace_node->ghost_count == 0)
sinfo->ghost_size_count--;
} /* end if */
else {
@@ -694,14 +669,15 @@ HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bi
/* Decrement bin's serializable section count */
sinfo->bins[bin].serial_sect_count--;
- /* If the node has no more serializable sections, decrement number of serializable section sizes managed */
- if(fspace_node->serial_count == 0)
+ /* If the node has no more serializable sections, decrement number of serializable section sizes
+ * managed */
+ if (fspace_node->serial_count == 0)
sinfo->serial_size_count--;
} /* end else */
/* Check for no more nodes on list of that size */
- if(H5SL_count(fspace_node->sect_list) == 0) {
- H5FS_node_t *tmp_fspace_node; /* Free space list size node */
+ if (H5SL_count(fspace_node->sect_list) == 0) {
+ H5FS_node_t *tmp_fspace_node; /* Free space list size node */
/* Sanity checks */
HDassert(fspace_node->ghost_count == 0);
@@ -709,11 +685,11 @@ HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bi
/* Remove size tracking list from bin */
tmp_fspace_node = (H5FS_node_t *)H5SL_remove(sinfo->bins[bin].bin_list, &fspace_node->sect_size);
- if(tmp_fspace_node == NULL || tmp_fspace_node != fspace_node)
+ if (tmp_fspace_node == NULL || tmp_fspace_node != fspace_node)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list")
/* Destroy skip list for size tracking node */
- if(H5SL_close(fspace_node->sect_list) < 0)
+ if (H5SL_close(fspace_node->sect_list) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy size tracking node's skip list")
/* Release free space list node */
@@ -727,29 +703,26 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_size_node_decr() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_unlink_size
+ * Function: H5FS_sect_unlink_size
*
- * Purpose: Remove a section node from size tracking data structures for
+ * Purpose: Remove a section node from size tracking data structures for
* a free space manager
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect)
+H5FS_sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_section_info_t *sect)
{
- H5FS_node_t *fspace_node; /* Free list size node */
- H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
- unsigned bin; /* Bin to put the free space section in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_node_t * fspace_node; /* Free list size node */
+ H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
+ unsigned bin; /* Bin to put the free space section in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -762,48 +735,44 @@ H5FS_sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(sect->size);
HDassert(bin < sinfo->nbins);
- if(sinfo->bins[bin].bin_list == NULL)
+ if (sinfo->bins[bin].bin_list == NULL)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "node's bin is empty?")
/* Find space node for section's size */
- if((fspace_node = (H5FS_node_t *)H5SL_search(sinfo->bins[bin].bin_list, &sect->size)) == NULL)
+ if ((fspace_node = (H5FS_node_t *)H5SL_search(sinfo->bins[bin].bin_list, &sect->size)) == NULL)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section size node")
/* Remove the section's node from the list */
tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace_node->sect_list, &sect->addr);
- if(tmp_sect_node == NULL || tmp_sect_node != sect)
+ if (tmp_sect_node == NULL || tmp_sect_node != sect)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list")
/* Decrement # of sections in section size node */
- if(H5FS_size_node_decr(sinfo, bin, fspace_node, cls) < 0)
+ if (H5FS_size_node_decr(sinfo, bin, fspace_node, cls) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space size node from skip list")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_unlink_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_unlink_rest
+ * Function: H5FS_sect_unlink_rest
*
- * Purpose: Finish unlinking a section from the rest of the free space
+ * Purpose: Finish unlinking a section from the rest of the free space
* manager's data structures, after the section has been removed
* from the size tracking data structures
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect)
+H5FS_sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_section_info_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -814,41 +783,33 @@ H5FS_sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
HDassert(sect);
/* Remove node from merge list, if it was entered there */
- if(!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
+ if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
-#ifdef QAK
-HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, &sect->addr);
- if(tmp_sect_node == NULL || tmp_sect_node != sect)
+ if (tmp_sect_node == NULL || tmp_sect_node != sect)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list")
} /* end if */
/* Update section info & check if we need less room for the serialized free space sections */
- if(H5FS_sect_decrease(fspace, cls) < 0)
+ if (H5FS_sect_decrease(fspace, cls) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk")
/* Decrement amount of free space managed */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
fspace->tot_space -= sect->size;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_unlink_rest() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_remove_real
+ * Function: H5FS_sect_remove_real
*
- * Purpose: Remove a section from the free space manager
+ * Purpose: Remove a section from the free space manager
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
@@ -856,8 +817,8 @@ done:
static herr_t
H5FS_sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
{
- const H5FS_section_class_t *cls; /* Class of section */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5FS_section_class_t *cls; /* Class of section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -870,37 +831,35 @@ H5FS_sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
cls = &fspace->sect_cls[sect->type];
/* Remove node from size tracked data structures */
- if(H5FS_sect_unlink_size(fspace->sinfo, cls, sect) < 0)
+ if (H5FS_sect_unlink_size(fspace->sinfo, cls, sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from size tracking data structures")
/* Update rest of free space manager data structures for node removal */
- if(H5FS_sect_unlink_rest(fspace, cls, sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from non-size tracking data structures")
+ if (H5FS_sect_unlink_rest(fspace, cls, sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL,
+ "can't remove section from non-size tracking data structures")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_remove_real() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_remove
+ * Function: H5FS_sect_remove
*
- * Purpose: Remove a section from the free space manager
+ * Purpose: Remove a section from the free space manager
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- H5FS_section_info_t *sect)
+H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -910,49 +869,43 @@ H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
HDassert(sect);
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
/* Perform actual section removal */
- if(H5FS_sect_remove_real(fspace, sect) < 0)
+ if (H5FS_sect_remove_real(fspace, sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove section")
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, TRUE) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, TRUE) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_remove() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_link_size
+ * Function: H5FS_sect_link_size
*
- * Purpose: Add a section of free space to the free list bins
+ * Purpose: Add a section of free space to the free list bins
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect)
+H5FS_sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_section_info_t *sect)
{
- H5FS_node_t *fspace_node = NULL; /* Pointer to free space node of the correct size */
- hbool_t fspace_node_alloc = FALSE; /* Whether the free space node was allocated */
- unsigned bin; /* Bin to put the free space section in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_node_t *fspace_node = NULL; /* Pointer to free space node of the correct size */
+ hbool_t fspace_node_alloc = FALSE; /* Whether the free space node was allocated */
+ unsigned bin; /* Bin to put the free space section in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
-#ifdef QAK
-HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, sect->addr);
-#endif /* QAK */
/* Check arguments. */
HDassert(sinfo);
@@ -963,30 +916,29 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
/* Determine correct bin which holds items of the section's size */
bin = H5VM_log2_gen(sect->size);
HDassert(bin < sinfo->nbins);
- if(sinfo->bins[bin].bin_list == NULL) {
- if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
+ if (sinfo->bins[bin].bin_list == NULL) {
+ if (NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
} /* end if */
- else {
+ else
/* Check for node list of the correct size already */
fspace_node = (H5FS_node_t *)H5SL_search(sinfo->bins[bin].bin_list, &sect->size);
- } /* end else */
/* Check if we need to create a new skip list for nodes of this size */
- if(fspace_node == NULL) {
+ if (fspace_node == NULL) {
/* Allocate new free list size node */
- if(NULL == (fspace_node = H5FL_MALLOC(H5FS_node_t)))
+ if (NULL == (fspace_node = H5FL_MALLOC(H5FS_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for free space node")
fspace_node_alloc = TRUE;
/* Initialize the free list size node */
- fspace_node->sect_size = sect->size;
+ fspace_node->sect_size = sect->size;
fspace_node->serial_count = fspace_node->ghost_count = 0;
- if(NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ if (NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
/* Insert new free space size node into bin's list */
- if(H5SL_insert(sinfo->bins[bin].bin_list, fspace_node, &fspace_node->sect_size) < 0)
+ if (H5SL_insert(sinfo->bins[bin].bin_list, fspace_node, &fspace_node->sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list")
fspace_node_alloc = FALSE; /* (owned by the bin skip list now, don't need to free on error) */
@@ -998,16 +950,13 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
/* (Different from the # of items in the bin's skiplist, since each node on
* the bin's skiplist is also a skiplist...)
*/
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bins[bin].sect_count);
-#endif /* QAK */
sinfo->bins[bin].tot_sect_count++;
- if(cls->flags & H5FS_CLS_GHOST_OBJ) {
+ if (cls->flags & H5FS_CLS_GHOST_OBJ) {
sinfo->bins[bin].ghost_sect_count++;
fspace_node->ghost_count++;
/* Check for first ghost section in node */
- if(fspace_node->ghost_count == 1)
+ if (fspace_node->ghost_count == 1)
sinfo->ghost_size_count++;
} /* end if */
else {
@@ -1015,46 +964,44 @@ HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bi
fspace_node->serial_count++;
/* Check for first serializable section in node */
- if(fspace_node->serial_count == 1)
+ if (fspace_node->serial_count == 1)
sinfo->serial_size_count++;
} /* end else */
/* Insert free space node into correct skip list */
- if(H5SL_insert(fspace_node->sect_list, sect, &sect->addr) < 0)
+ if (H5SL_insert(fspace_node->sect_list, sect, &sect->addr) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list")
done:
- if(ret_value < 0)
- if(fspace_node && fspace_node_alloc) {
- if(fspace_node->sect_list && H5SL_close(fspace_node->sect_list) < 0)
- HDONE_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy size free space node's skip list")
+ if (ret_value < 0)
+ if (fspace_node && fspace_node_alloc) {
+ if (fspace_node->sect_list && H5SL_close(fspace_node->sect_list) < 0)
+ HDONE_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL,
+ "can't destroy size free space node's skip list")
fspace_node = H5FL_FREE(H5FS_node_t, fspace_node);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_link_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_link_rest
+ * Function: H5FS_sect_link_rest
*
- * Purpose: Link a section into the rest of the non-size tracking
+ * Purpose: Link a section into the rest of the non-size tracking
* free space manager data structures
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
- H5FS_section_info_t *sect, unsigned flags)
+H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_section_info_t *sect,
+ unsigned flags)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1064,19 +1011,18 @@ H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
HDassert(sect);
/* Add section to the address-ordered list of sections, if allowed */
- if(!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
-#ifdef QAK
-HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
- if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
- if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")
+ if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
+ if (fspace->sinfo->merge_list == NULL)
+ if (NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL,
+ "can't create skip list for merging free space sections")
+ if (H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
+ "can't insert free space node into merging skip list")
} /* end if */
/* Update section info & check if we need more room for the serialized free space sections */
- if(H5FS_sect_increase(fspace, cls, flags) < 0)
+ if (H5FS_sect_increase(fspace, cls, flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk")
/* Increment amount of free space managed */
@@ -1086,17 +1032,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_link_rest() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_link
+ * Function: H5FS_sect_link
*
- * Purpose: Link a section into the internal data structures
+ * Purpose: Link a section into the internal data structures
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
*-------------------------------------------------------------------------
@@ -1104,8 +1047,8 @@ done:
static herr_t
H5FS_sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
{
- const H5FS_section_class_t *cls; /* Class of section */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5FS_section_class_t *cls; /* Class of section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1118,56 +1061,39 @@ H5FS_sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
cls = &fspace->sect_cls[sect->type];
/* Add section to size tracked data structures */
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 1.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
- if(H5FS_sect_link_size(fspace->sinfo, cls, sect) < 0)
+ if (H5FS_sect_link_size(fspace->sinfo, cls, sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to size tracking data structures")
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 2.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
/* Update rest of free space manager data structures for section addition */
- if(H5FS_sect_link_rest(fspace, cls, sect, flags) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to non-size tracking data structures")
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 3.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
+ if (H5FS_sect_link_rest(fspace, cls, sect, flags) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
+ "can't add section to non-size tracking data structures")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_link() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_merge
+ * Function: H5FS_sect_merge
*
- * Purpose: Attempt to merge a returned free space section with existing
+ * Purpose: Attempt to merge a returned free space section with existing
* free space.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 17, 2006
*
- * Modifications: Vailin Choi; Sept 25th 2008
- * Changes to the "shrinking" part--
- * 1. Get last section node in merge-list instead of "less-than"
- * node for further iteration
- * 2. Remove "can-be-shrunk" section from free-space instead of
- * "less-than" section
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
{
- H5FS_section_class_t *sect_cls; /* Section's class */
- hbool_t modified; /* Flag to indicate merge or shrink occurred */
- hbool_t remove_sect = FALSE; /* Whether a section should be removed before shrinking */
- htri_t status; /* Status value */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_section_class_t *sect_cls; /* Section's class */
+ hbool_t modified; /* Flag to indicate merge or shrink occurred */
+ hbool_t remove_sect = FALSE; /* Whether a section should be removed before shrinking */
+ htri_t status; /* Status value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1178,13 +1104,13 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HDassert((*sect)->size);
/* Loop until no more merging */
- if(fspace->sinfo->merge_list) {
+ if (fspace->sinfo->merge_list) {
do {
- H5SL_node_t *less_sect_node; /* Skip list node for section less than new section */
- H5SL_node_t *greater_sect_node; /* Skip list node for section greater than new section */
- H5FS_section_info_t *tmp_sect; /* Temporary free space section */
- H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
- hbool_t greater_sect_node_valid = FALSE; /* Indicate if 'greater than' section node is valid */
+ H5SL_node_t * less_sect_node; /* Skip list node for section less than new section */
+ H5SL_node_t * greater_sect_node; /* Skip list node for section greater than new section */
+ H5FS_section_info_t * tmp_sect; /* Temporary free space section */
+ H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
+ hbool_t greater_sect_node_valid = FALSE; /* Indicate if 'greater than' section node is valid */
/* Reset 'modification occurred' flag */
modified = FALSE;
@@ -1193,9 +1119,9 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
less_sect_node = H5SL_below(fspace->sinfo->merge_list, &(*sect)->addr);
/* Check for node before new node able to merge with new node */
- if(less_sect_node) {
+ if (less_sect_node) {
/* Check for node greater than section */
- greater_sect_node = H5SL_next(less_sect_node);
+ greater_sect_node = H5SL_next(less_sect_node);
greater_sect_node_valid = TRUE;
/* Get section for 'less than' skip list node */
@@ -1203,27 +1129,28 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Get classes for right & left sections */
tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
- sect_cls = &fspace->sect_cls[(*sect)->type];
+ sect_cls = &fspace->sect_cls[(*sect)->type];
/* Check if sections of the left most class can merge with sections
* of another class & whether the sections are the same type,
* then check for 'can merge' callback
*/
- if((!(tmp_sect_cls->flags & H5FS_CLS_MERGE_SYM) || (tmp_sect->type == (*sect)->type))
- && tmp_sect_cls->can_merge) {
+ if ((!(tmp_sect_cls->flags & H5FS_CLS_MERGE_SYM) || (tmp_sect->type == (*sect)->type)) &&
+ tmp_sect_cls->can_merge) {
/* Determine if the sections can merge */
- if((status = (*tmp_sect_cls->can_merge)(tmp_sect, *sect, op_data)) < 0)
+ if ((status = (*tmp_sect_cls->can_merge)(tmp_sect, *sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
- if(status > 0) {
+ if (status > 0) {
/* Sanity check */
HDassert(tmp_sect_cls->merge);
/* Remove 'less than' node from data structures */
- if(H5FS_sect_remove_real(fspace, tmp_sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't remove section from internal data structures")
+ if (H5FS_sect_remove_real(fspace, tmp_sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
+ "can't remove section from internal data structures")
/* Merge the two sections together */
- if((*tmp_sect_cls->merge)(tmp_sect, *sect, op_data) < 0)
+ if ((*tmp_sect_cls->merge)(tmp_sect, *sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections")
/* Retarget section pointer to 'less than' node that was merged into */
@@ -1232,55 +1159,53 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Indicate successful merge occurred */
modified = TRUE;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* Look for section after new (or merged) section, if not already determined */
- if(!greater_sect_node_valid)
+ if (!greater_sect_node_valid)
greater_sect_node = H5SL_above(fspace->sinfo->merge_list, &(*sect)->addr);
/* Check for node after new node able to merge with new node */
- if(greater_sect_node) {
+ if (greater_sect_node) {
/* Get section for 'greater than' skip list node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(greater_sect_node);
/* Get classes for right & left sections */
- sect_cls = &fspace->sect_cls[(*sect)->type];
+ sect_cls = &fspace->sect_cls[(*sect)->type];
tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
/* Check if sections of the left most class can merge with sections
* of another class & whether the sections are the same type,
* then check for 'can merge' callback
*/
- if((!(sect_cls->flags & H5FS_CLS_MERGE_SYM) || ((*sect)->type == tmp_sect->type))
- && sect_cls->can_merge) {
+ if ((!(sect_cls->flags & H5FS_CLS_MERGE_SYM) || ((*sect)->type == tmp_sect->type)) &&
+ sect_cls->can_merge) {
/* Determine if the sections can merge */
- if((status = (*sect_cls->can_merge)(*sect, tmp_sect, op_data)) < 0)
+ if ((status = (*sect_cls->can_merge)(*sect, tmp_sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
- if(status > 0) {
+ if (status > 0) {
/* Sanity check */
HDassert(sect_cls->merge);
/* Remove 'greater than' node from data structures */
- if(H5FS_sect_remove_real(fspace, tmp_sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't remove section from internal data structures")
+ if (H5FS_sect_remove_real(fspace, tmp_sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
+ "can't remove section from internal data structures")
/* Merge the two sections together */
- if((*sect_cls->merge)(*sect, tmp_sect, op_data) < 0)
+ if ((*sect_cls->merge)(*sect, tmp_sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections")
/* Indicate successful merge occurred */
modified = TRUE;
} /* end if */
- } /* end if */
- } /* end if */
- } while(modified);
+ } /* end if */
+ } /* end if */
+ } while (modified);
} /* end if */
HDassert(*sect);
-#ifdef QAK
-HDfprintf(stderr, "%s: Done merging, (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sect)->addr, (*sect)->size, (*sect)->type, ((*sect)->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
-#endif /* QAK */
/* Loop until no more shrinking */
do {
@@ -1289,36 +1214,33 @@ HDfprintf(stderr, "%s: Done merging, (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sec
/* Check for (possibly merged) section able to shrink the size of the container */
sect_cls = &fspace->sect_cls[(*sect)->type];
- if(sect_cls->can_shrink) {
- if((status = (*sect_cls->can_shrink)(*sect, op_data)) < 0)
+ if (sect_cls->can_shrink) {
+ if ((status = (*sect_cls->can_shrink)(*sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
- if(status > 0) {
-#ifdef QAK
-HDfprintf(stderr, "%s: Can shrink!\n", FUNC);
-#endif /* QAK */
-
- /* Remove SECT from free-space manager */
+ if (status > 0) {
+ /* Remove SECT from free-space manager */
/* (only possible to happen on second+ pass through loop) */
- if(remove_sect) {
- if(H5FS_sect_remove_real(fspace, *sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't remove section from internal data structures")
- remove_sect = FALSE;
- } /* end if */
+ if (remove_sect) {
+ if (H5FS_sect_remove_real(fspace, *sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
+ "can't remove section from internal data structures")
+ remove_sect = FALSE;
+ } /* end if */
/* Shrink the container */
/* (callback can indicate that it has discarded the section by setting *sect to NULL) */
HDassert(sect_cls->shrink);
- if((*sect_cls->shrink)(sect, op_data) < 0)
+ if ((*sect_cls->shrink)(sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container")
/* If this section was shrunk away, we may need to shrink another section */
- if(*sect == NULL) {
+ if (*sect == NULL) {
/* Check for sections on merge list */
- if(fspace->sinfo->merge_list) {
- H5SL_node_t *last_node; /* Last node in merge list */
+ if (fspace->sinfo->merge_list) {
+ H5SL_node_t *last_node; /* Last node in merge list */
/* Check for last node in the merge list */
- if(NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
+ if (NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
/* Get the pointer to the last section, from the last node */
*sect = (H5FS_section_info_t *)H5SL_item(last_node);
HDassert(*sect);
@@ -1326,62 +1248,49 @@ HDfprintf(stderr, "%s: Can shrink!\n", FUNC);
/* Indicate that this section needs to be removed if it causes a shrink */
remove_sect = TRUE;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* Indicate successful merge occurred */
modified = TRUE;
} /* end if */
- } /* end if */
- } while(modified && *sect);
+ } /* end if */
+ } while (modified && *sect);
/* Check for section that was shrunk away and next section not shrinking */
- if(remove_sect && (*sect != NULL))
- *sect = NULL;
-
-#ifdef QAK
-HDfprintf(stderr, "%s: Done shrinking\n", FUNC);
-if(*sect)
- HDfprintf(stderr, "%s: (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sect)->addr, (*sect)->size, (*sect)->type, ((*sect)->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
-else
- HDfprintf(stderr, "%s: *sect = %p\n", FUNC, *sect);
-#endif /* QAK */
+ if (remove_sect && (*sect != NULL))
+ *sect = NULL;
done:
-#ifdef QAK
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_merge() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_add
- *
- * Purpose: Add a section of free space to the free list
+ * Function: H5FS_sect_add
*
- * Return: Success: non-negative
+ * Purpose: Add a section of free space to the free list
*
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect,
- unsigned flags, void *op_data)
+H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags,
+ void *op_data)
{
- H5FS_section_class_t *cls; /* Section's class */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_section_class_t *cls; /* Section's class */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->size, sect->type, (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
+ HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->size, sect->type,
+ (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
@@ -1391,25 +1300,24 @@ HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->siz
HDassert(sect->size);
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
/* Call "add" section class callback, if there is one */
cls = &fspace->sect_cls[sect->type];
- if(cls->add) {
- if((*cls->add)(sect, &flags, op_data) < 0)
+ if (cls->add)
+ if ((*cls->add)(sect, &flags, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "'add' section class callback failed")
- } /* end if */
/* Check for merging returned space with existing section node */
- if(flags & H5FS_ADD_RETURNED_SPACE) {
+ if (flags & H5FS_ADD_RETURNED_SPACE) {
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Returning space\n", FUNC);
+ HDfprintf(stderr, "%s: Returning space\n", FUNC);
#endif /* H5FS_SINFO_DEBUG */
/* Attempt to merge returned section with existing sections */
- if(H5FS_sect_merge(fspace, &sect, op_data) < 0)
+ if (H5FS_sect_merge(fspace, &sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections")
} /* end if */
@@ -1417,59 +1325,58 @@ HDfprintf(stderr, "%s: Returning space\n", FUNC);
/* (If section has been completely merged or shrunk away, 'sect' will
* be NULL at this point - QAK)
*/
- if(sect)
- if(H5FS_sect_link(fspace, sect, flags) < 0)
+ if (sect)
+ if (H5FS_sect_link(fspace, sect, flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
+ HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
#endif /* H5FS_SINFO_DEBUG */
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
- if(!(flags & H5FS_ADD_DESERIALIZING))
+ if (!(flags & H5FS_ADD_DESERIALIZING))
sinfo_modified = TRUE;
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
#ifdef H5FS_DEBUG_ASSERT
-if(!(flags & (H5FS_ADD_DESERIALIZING | H5FS_ADD_SKIP_VALID)))
- H5FS_assert(fspace);
+ if (!(flags & (H5FS_ADD_DESERIALIZING | H5FS_ADD_SKIP_VALID)))
+ H5FS_assert(fspace);
#endif /* H5FS_DEBUG_ASSERT */
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_add() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_try_extend
+ * Function: H5FS_sect_try_extend
*
- * Purpose: Try to extend a block using space from a section on the free list
+ * Purpose: Try to extend a block using space from a section on the free list
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
*-------------------------------------------------------------------------
*/
htri_t
-H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, haddr_t addr,
- hsize_t size, hsize_t extra_requested)
+H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, haddr_t addr, hsize_t size,
+ hsize_t extra_requested)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
- htri_t ret_value = FALSE; /* Return value */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", FUNC, addr, size, extra_requested);
+ HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", FUNC, addr, size,
+ extra_requested);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
@@ -1481,39 +1388,38 @@ HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", FUNC, ad
/* Check for any sections on free space list */
#ifdef H5FS_SINFO_DEBUG
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", FUNC, fspace->serial_sect_count);
-HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_sect_count);
+ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
+ HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", FUNC, fspace->serial_sect_count);
+ HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_sect_count);
#endif /* H5FS_SINFO_DEBUG */
- if(fspace->tot_sect_count > 0) {
- H5FS_section_info_t *sect; /* Temporary free space section */
+ if (fspace->tot_sect_count > 0) {
+ H5FS_section_info_t *sect; /* Temporary free space section */
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
+ /*
-/*
+ Pseudo-code for algorithm:
-Pseudo-code for algorithm:
-
-_section_ = <Get pointer to section with address > _region.addr_>
-if(_section_)
- if(_section_ adjoins _region_ && _section.size_ >= _extra_requested_)
- <remove section from data structures>
- if(_section.size_ > _extra_requested_)
- if(<can adjust _section_>)
- <adjust _section_ by _extra_requested_>
- <add adjusted section back to data structures>
- else
- <re-add UNadjusted section back to data structures>
- <error>
- <mark free space sections as changed in metadata cache>
-
-*/
+ _section_ = <Get pointer to section with address > _region.addr_>
+ if(_section_)
+ if(_section_ adjoins _region_ && _section.size_ >= _extra_requested_)
+ <remove section from data structures>
+ if(_section.size_ > _extra_requested_)
+ if(<can adjust _section_>)
+ <adjust _section_ by _extra_requested_>
+ <add adjusted section back to data structures>
+ else
+ <re-add UNadjusted section back to data structures>
+ <error>
+ <mark free space sections as changed in metadata cache>
+
+ */
/* Look for a section after block to extend */
- if((sect = (H5FS_section_info_t *)H5SL_greater(fspace->sinfo->merge_list, &addr))) {
+ if ((sect = (H5FS_section_info_t *)H5SL_greater(fspace->sinfo->merge_list, &addr))) {
/* Check if this section adjoins the block and is large enough to
* fulfill extension request.
*
@@ -1521,12 +1427,13 @@ if(_section_)
* possible neighboring nodes and is not at the end of the file
* (or it would have been eliminated), etc)
*/
- if(sect->size >= extra_requested && (addr + size) == sect->addr) {
- H5FS_section_class_t *cls; /* Section's class */
+ if (sect->size >= extra_requested && (addr + size) == sect->addr) {
+ H5FS_section_class_t *cls; /* Section's class */
/* Remove section from data structures */
- if(H5FS_sect_remove_real(fspace, sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't remove section from internal data structures")
+ if (H5FS_sect_remove_real(fspace, sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
+ "can't remove section from internal data structures")
/* Get class for section */
cls = &fspace->sect_cls[sect->type];
@@ -1537,7 +1444,7 @@ if(_section_)
* for the current usage, so I've deferred messing with
* it. - QAK - 2008/01/08)
*/
- if(sect->size > extra_requested) {
+ if (sect->size > extra_requested) {
/* Sanity check (for now) */
HDassert(cls->flags & H5FS_CLS_ADJUST_OK);
@@ -1546,15 +1453,16 @@ if(_section_)
sect->size -= extra_requested;
/* Re-add adjusted section to free sections data structures */
- if(H5FS_sect_link(fspace, sect, 0) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
+ if (H5FS_sect_link(fspace, sect, 0) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
+ "can't insert free space section into skip list")
} /* end if */
else {
/* Sanity check */
HDassert(sect->size == extra_requested);
/* Exact match, so just free section */
- if((*cls->free)(sect) < 0)
+ if ((*cls->free)(sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't free section")
} /* end else */
@@ -1564,48 +1472,40 @@ if(_section_)
/* Indicate success */
HGOTO_DONE(TRUE);
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_try_extend() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_find_node
+ * Function: H5FS_sect_find_node
*
- * Purpose: Locate a section of free space (in existing free space list
+ * Purpose: Locate a section of free space (in existing free space list
* bins) that is large enough to fulfill request.
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
- * Modifications:
- * Vailin Choi, July 29th, 2008
- * Modified to handle alignment by going through each bin to find
- * a section that is big enough to fulfill "request+fragment for alignment"
- *
*-------------------------------------------------------------------------
*/
static htri_t
H5FS_sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node)
{
- H5FS_node_t *fspace_node; /* Free list size node */
- unsigned bin; /* Bin to put the free space section in */
- htri_t ret_value = FALSE; /* Return value */
+ H5FS_node_t *fspace_node; /* Free list size node */
+ unsigned bin; /* Bin to put the free space section in */
+ htri_t ret_value = FALSE; /* Return value */
- H5SL_node_t *curr_size_node=NULL;
- const H5FS_section_class_t *cls; /* Class of section */
- hsize_t alignment;
+ H5SL_node_t * curr_size_node = NULL;
+ const H5FS_section_class_t *cls; /* Class of section */
+ hsize_t alignment;
FUNC_ENTER_NOAPI_NOINIT
@@ -1619,46 +1519,46 @@ H5FS_sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node)
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(request);
HDassert(bin < fspace->sinfo->nbins);
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->sinfo->nbins = %u\n", FUNC, fspace->sinfo->nbins);
-HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
-#endif /* QAK */
alignment = fspace->alignment;
- if(!((alignment > 1) && (request >= fspace->threshold)))
- alignment = 0; /* no alignment */
+ if (!((alignment > 1) && (request >= fspace->threshold)))
+ alignment = 0; /* no alignment */
do {
/* Check if there's any sections in this bin */
- if(fspace->sinfo->bins[bin].bin_list) {
-
- if (!alignment) { /* no alignment */
- /* Find the first free space section that is large enough to fulfill request */
- /* (Since the bins use skip lists to track the sizes of the address-ordered
- * lists, this is actually a "best fit" algorithm)
- */
- /* Look for large enough free space section in this bin */
- if((fspace_node = (H5FS_node_t *)H5SL_greater(fspace->sinfo->bins[bin].bin_list, &request))) {
- /* Take first node off of the list (ie. node w/lowest address) */
- if(NULL == (*node = (H5FS_section_info_t *)H5SL_remove_first(fspace_node->sect_list)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list")
-
- /* Get section's class */
- cls = &fspace->sect_cls[(*node)->type];
- /* Decrement # of sections in section size node */
- if(H5FS_size_node_decr(fspace->sinfo, bin, fspace_node, cls) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space size node from skip list")
- if(H5FS_sect_unlink_rest(fspace, cls, *node) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from non-size tracking data structures")
- /* Indicate that we found a node for the request */
- HGOTO_DONE(TRUE)
- } /* end if */
- } /* end if */
+ if (fspace->sinfo->bins[bin].bin_list) {
+
+ if (!alignment) { /* no alignment */
+ /* Find the first free space section that is large enough to fulfill request */
+ /* (Since the bins use skip lists to track the sizes of the address-ordered
+ * lists, this is actually a "best fit" algorithm)
+ */
+ /* Look for large enough free space section in this bin */
+ if ((fspace_node =
+ (H5FS_node_t *)H5SL_greater(fspace->sinfo->bins[bin].bin_list, &request))) {
+ /* Take first node off of the list (ie. node w/lowest address) */
+ if (NULL == (*node = (H5FS_section_info_t *)H5SL_remove_first(fspace_node->sect_list)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL,
+ "can't remove free space node from skip list")
+
+ /* Get section's class */
+ cls = &fspace->sect_cls[(*node)->type];
+ /* Decrement # of sections in section size node */
+ if (H5FS_size_node_decr(fspace->sinfo, bin, fspace_node, cls) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL,
+ "can't remove free space size node from skip list")
+ if (H5FS_sect_unlink_rest(fspace, cls, *node) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL,
+ "can't remove section from non-size tracking data structures")
+ /* Indicate that we found a node for the request */
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end if */
else { /* alignment is set */
/* get the first node of a certain size in this bin */
curr_size_node = H5SL_first(fspace->sinfo->bins[bin].bin_list);
while (curr_size_node != NULL) {
- H5FS_node_t *curr_fspace_node=NULL;
- H5SL_node_t *curr_sect_node=NULL;
+ H5FS_node_t *curr_fspace_node = NULL;
+ H5SL_node_t *curr_sect_node = NULL;
/* Get the free space node for free space sections of the same size */
curr_fspace_node = (H5FS_node_t *)H5SL_item(curr_size_node);
@@ -1666,10 +1566,10 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
/* Get the Skip list which holds pointers to actual free list sections */
curr_sect_node = (H5SL_node_t *)H5SL_first(curr_fspace_node->sect_list);
- while(curr_sect_node != NULL) {
- H5FS_section_info_t *curr_sect=NULL;
- hsize_t mis_align=0, frag_size=0;
- H5FS_section_info_t *split_sect=NULL;
+ while (curr_sect_node != NULL) {
+ H5FS_section_info_t *curr_sect = NULL;
+ hsize_t mis_align = 0, frag_size = 0;
+ H5FS_section_info_t *split_sect = NULL;
/* Get section node */
curr_sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node);
@@ -1687,14 +1587,18 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
if ((curr_sect->size >= (request + frag_size)) && (cls->split)) {
/* remove the section with aligned address */
- if(NULL == (*node = (H5FS_section_info_t *)H5SL_remove(curr_fspace_node->sect_list, &curr_sect->addr)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list")
+ if (NULL == (*node = (H5FS_section_info_t *)H5SL_remove(
+ curr_fspace_node->sect_list, &curr_sect->addr)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL,
+ "can't remove free space node from skip list")
/* Decrement # of sections in section size node */
- if(H5FS_size_node_decr(fspace->sinfo, bin, curr_fspace_node, cls) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space size node from skip list")
+ if (H5FS_size_node_decr(fspace->sinfo, bin, curr_fspace_node, cls) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL,
+ "can't remove free space size node from skip list")
- if(H5FS_sect_unlink_rest(fspace, cls, *node) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from non-size tracking data structures")
+ if (H5FS_sect_unlink_rest(fspace, cls, *node) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL,
+ "can't remove section from non-size tracking data structures")
/*
* The split() callback splits NODE into 2 sections:
@@ -1704,15 +1608,16 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
*/
if (mis_align) {
split_sect = cls->split(*node, frag_size);
- if((H5FS_sect_link(fspace, split_sect, 0) < 0))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
+ if ((H5FS_sect_link(fspace, split_sect, 0) < 0))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
+ "can't insert free space section into skip list")
/* sanity check */
HDassert(split_sect->addr < (*node)->addr);
HDassert(request <= (*node)->size);
- }
+ } /* end if */
/* Indicate that we found a node for the request */
HGOTO_DONE(TRUE)
- }
+ } /* end if */
/* Get the next section node in the list */
curr_sect_node = H5SL_next(curr_sect_node);
@@ -1721,50 +1626,38 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
/* Get the next size node in the bin */
curr_size_node = H5SL_next(curr_size_node);
} /* end while of curr_size_node */
- } /* else of alignment */
- } /* if bin_list */
- /* Advance to next larger bin */
+ } /* else of alignment */
+ } /* if bin_list */
+ /* Advance to next larger bin */
bin++;
- } while(bin < fspace->sinfo->nbins);
+ } while (bin < fspace->sinfo->nbins);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_find_node() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_find
+ * Function: H5FS_sect_find
*
- * Purpose: Locate a section of free space (in existing free space list) that
+ * Purpose: Locate a section of free space (in existing free space list) that
* is large enough to fulfill request.
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
- * Modifications:
- * Vailin Choi, July 29th 2008
- * Move H5FS_sect_unlink_rest() to H5FS_sect_find_node()
- *
*-------------------------------------------------------------------------
*/
htri_t
-H5FS_sect_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hsize_t request,
- H5FS_section_info_t **node)
+H5FS_sect_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
- htri_t ret_value = FALSE; /* Return value */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
-#ifdef QAK
-HDfprintf(stderr, "%s: request = %Hu\n", FUNC, request);
-#endif /* QAK */
-
/* Check arguments. */
HDassert(fspace);
HDassert(fspace->nclasses);
@@ -1772,34 +1665,26 @@ HDfprintf(stderr, "%s: request = %Hu\n", FUNC, request);
HDassert(node);
/* Check for any sections on free space list */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", FUNC, fspace->serial_sect_count);
-HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_sect_count);
-#endif /* QAK */
- if(fspace->tot_sect_count > 0) {
+ if (fspace->tot_sect_count > 0) {
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
/* Look for node in bins */
- if((ret_value = H5FS_sect_find_node(fspace, request, node)) < 0)
+ if ((ret_value = H5FS_sect_find_node(fspace, request, node)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from bins")
/* Decrement # of sections on free list, if we found an object */
- if(ret_value > 0) {
+ if (ret_value > 0) {
/* Note that we've modified the section info */
sinfo_modified = TRUE;
-#ifdef QAK
-HDfprintf(stderr, "%s: (*node)->size = %Hu, (*node)->addr = %a, (*node)->type = %u\n", FUNC, (*node)->size, (*node)->addr, (*node)->type);
-#endif /* QAK */
- }
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
#ifdef H5FS_DEBUG_ASSERT
@@ -1808,18 +1693,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_find() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_iterate_sect_cb
+ * Function: H5FS_iterate_sect_cb
*
- * Purpose: Skip list iterator callback to iterate over free space sections
+ * Purpose: Skip list iterator callback to iterate over free space sections
* of a particular size
*
- * Return: Success: non-negative
- *
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, May 13, 2006
*
*-------------------------------------------------------------------------
@@ -1827,9 +1709,9 @@ done:
static herr_t
H5FS_iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
- H5FS_section_info_t *sect_info = (H5FS_section_info_t *)_item; /* Free space section to work on */
- H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_section_info_t *sect_info = (H5FS_section_info_t *)_item; /* Free space section to work on */
+ H5FS_iter_ud_t * udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1839,25 +1721,22 @@ H5FS_iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
HDassert(udata->op);
/* Make callback for this section */
- if((*udata->op)(sect_info, udata->op_data) < 0)
+ if ((*udata->op)(sect_info, udata->op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "iteration callback failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_iterate_sect_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_iterate_node_cb
+ * Function: H5FS_iterate_node_cb
*
- * Purpose: Skip list iterator callback to iterate over free space sections
+ * Purpose: Skip list iterator callback to iterate over free space sections
* in a bin
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, May 13, 2006
*
*-------------------------------------------------------------------------
@@ -1865,9 +1744,9 @@ done:
static herr_t
H5FS_iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
- H5FS_node_t *fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */
- H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_node_t * fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */
+ H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1878,24 +1757,21 @@ H5FS_iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
/* Iterate through all the sections of this size */
HDassert(fspace_node->sect_list);
- if(H5SL_iterate(fspace_node->sect_list, H5FS_iterate_sect_cb, udata) < 0)
+ if (H5SL_iterate(fspace_node->sect_list, H5FS_iterate_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_iterate_node_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_iterate
- *
- * Purpose: Iterate over all the sections managed
+ * Function: H5FS_sect_iterate
*
- * Return: Success: non-negative
+ * Purpose: Iterate over all the sections managed
*
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, May 13, 2006
*
*-------------------------------------------------------------------------
@@ -1903,9 +1779,9 @@ done:
herr_t
H5FS_sect_iterate(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
{
- H5FS_iter_ud_t udata; /* User data for callbacks */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_iter_ud_t udata; /* User data for callbacks */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1913,56 +1789,47 @@ H5FS_sect_iterate(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_operator_t op, v
HDassert(fspace);
HDassert(op);
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
-#endif /* QAK */
-
/* Set up user data for iterator */
- udata.fspace = fspace;
- udata.op = op;
+ udata.fspace = fspace;
+ udata.op = op;
udata.op_data = op_data;
/* Iterate over sections, if there are any */
- if(fspace->tot_sect_count) {
- unsigned bin; /* Current bin we are on */
+ if (fspace->tot_sect_count) {
+ unsigned bin; /* Current bin we are on */
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_READ) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_READ) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
/* Iterate over all the bins */
-#ifdef QAK
-HDfprintf(stderr, "%s: Iterate over section bins\n", FUNC);
-#endif /* QAK */
- for(bin = 0; bin < fspace->sinfo->nbins; bin++) {
+ for (bin = 0; bin < fspace->sinfo->nbins; bin++) {
/* Check if there are any sections in this bin */
- if(fspace->sinfo->bins[bin].bin_list) {
+ if (fspace->sinfo->bins[bin].bin_list) {
/* Iterate over list of section size nodes for bin */
- if(H5SL_iterate(fspace->sinfo->bins[bin].bin_list, H5FS_iterate_node_cb, &udata) < 0)
+ if (H5SL_iterate(fspace->sinfo->bins[bin].bin_list, H5FS_iterate_node_cb, &udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes")
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, FALSE) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, FALSE) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_iterate() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_stats
+ * Function: H5FS_sect_stats
*
- * Purpose: Retrieve info about the sections managed
+ * Purpose: Retrieve info about the sections managed
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 30, 2006
*
*-------------------------------------------------------------------------
@@ -1976,39 +1843,35 @@ H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space, hsize_t *nsects)
HDassert(fspace);
/* Get the stats desired */
- if(tot_space)
+ if (tot_space)
*tot_space = fspace->tot_space;
- if(nsects)
+ if (nsects)
*nsects = fspace->tot_sect_count;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_sect_stats() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_change_class
+ * Function: H5FS_sect_change_class
*
- * Purpose: Make appropriate adjustments to internal data structures when
+ * Purpose: Make appropriate adjustments to internal data structures when
* a section changes class
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 10, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
- H5FS_section_info_t *sect, unsigned new_class)
+H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned new_class)
{
- const H5FS_section_class_t *old_cls; /* Old class of section */
- const H5FS_section_class_t *new_cls; /* New class of section */
- unsigned old_class; /* Old class ID of section */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5FS_section_class_t *old_cls; /* Old class of section */
+ const H5FS_section_class_t *new_cls; /* New class of section */
+ unsigned old_class; /* Old class ID of section */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2019,33 +1882,26 @@ H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
HDassert(new_class < fspace->nclasses);
/* Get a pointer to the section info */
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
/* Get class info */
old_class = sect->type;
- old_cls = &fspace->sect_cls[sect->type];
- new_cls = &fspace->sect_cls[new_class];
-#ifdef QAK
-HDfprintf(stderr, "%s: old_cls->flags = %x\n", FUNC, old_cls->flags);
-HDfprintf(stderr, "%s: new_cls->flags = %x\n", FUNC, new_cls->flags);
-#endif /* QAK */
+ old_cls = &fspace->sect_cls[sect->type];
+ new_cls = &fspace->sect_cls[new_class];
/* Check if the section's class change will affect the # of serializable or ghost sections */
- if((old_cls->flags & H5FS_CLS_GHOST_OBJ) != (new_cls->flags & H5FS_CLS_GHOST_OBJ)) {
- H5FS_node_t *fspace_node; /* Free list size node */
- unsigned bin; /* Bin to put the free space section in */
- hbool_t to_ghost; /* Flag if the section is changing to a ghost section */
+ if ((old_cls->flags & H5FS_CLS_GHOST_OBJ) != (new_cls->flags & H5FS_CLS_GHOST_OBJ)) {
+ H5FS_node_t *fspace_node; /* Free list size node */
+ unsigned bin; /* Bin to put the free space section in */
+ hbool_t to_ghost; /* Flag if the section is changing to a ghost section */
/* Determine if this section is becoming a ghost or is becoming serializable */
- if(old_cls->flags & H5FS_CLS_GHOST_OBJ)
+ if (old_cls->flags & H5FS_CLS_GHOST_OBJ)
to_ghost = FALSE;
else
to_ghost = TRUE;
-#ifdef QAK
-HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
-#endif /* QAK */
/* Sanity check */
HDassert(fspace->sinfo->bins);
@@ -2060,7 +1916,7 @@ HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
HDassert(fspace_node);
/* Adjust serializable/ghost counts */
- if(to_ghost) {
+ if (to_ghost) {
/* Adjust global section count totals */
fspace->serial_sect_count--;
fspace->ghost_sect_count++;
@@ -2074,9 +1930,9 @@ HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
fspace_node->ghost_count++;
/* Check if we switched a section size node's status */
- if(fspace_node->serial_count == 0)
+ if (fspace_node->serial_count == 0)
fspace->sinfo->serial_size_count--;
- if(fspace_node->ghost_count == 1)
+ if (fspace_node->ghost_count == 1)
fspace->sinfo->ghost_size_count++;
} /* end if */
else {
@@ -2093,48 +1949,41 @@ HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
fspace_node->ghost_count--;
/* Check if we switched a section size node's status */
- if(fspace_node->serial_count == 1)
+ if (fspace_node->serial_count == 1)
fspace->sinfo->serial_size_count++;
- if(fspace_node->ghost_count == 0)
+ if (fspace_node->ghost_count == 0)
fspace->sinfo->ghost_size_count--;
} /* end else */
- } /* end if */
+ } /* end if */
/* Check if the section's class change will affect the mergable list */
- if((old_cls->flags & H5FS_CLS_SEPAR_OBJ) != (new_cls->flags & H5FS_CLS_SEPAR_OBJ)) {
- hbool_t to_mergable; /* Flag if the section is changing to a mergable section */
+ if ((old_cls->flags & H5FS_CLS_SEPAR_OBJ) != (new_cls->flags & H5FS_CLS_SEPAR_OBJ)) {
+ hbool_t to_mergable; /* Flag if the section is changing to a mergable section */
/* Determine if this section is becoming mergable or is becoming separate */
- if(old_cls->flags & H5FS_CLS_SEPAR_OBJ)
+ if (old_cls->flags & H5FS_CLS_SEPAR_OBJ)
to_mergable = TRUE;
else
to_mergable = FALSE;
-#ifdef QAK
-HDfprintf(stderr, "%s: to_mergable = %u\n", FUNC, to_mergable);
-#endif /* QAK */
/* Add or remove section from merge list, as appropriate */
- if(to_mergable) {
-#ifdef QAK
-HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
- if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
- if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")
+ if (to_mergable) {
+ if (fspace->sinfo->merge_list == NULL)
+ if (NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL,
+ "can't create skip list for merging free space sections")
+ if (H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
+ "can't insert free space node into merging skip list")
} /* end if */
else {
H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
-#ifdef QAK
-HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, &sect->addr);
- if(tmp_sect_node == NULL || tmp_sect_node != sect)
+ if (tmp_sect_node == NULL || tmp_sect_node != sect)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list")
} /* end else */
- } /* end if */
+ } /* end if */
/* Change the section's class */
sect->type = new_class;
@@ -2144,115 +1993,108 @@ HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC
fspace->sinfo->serial_size += fspace->sect_cls[new_class].serial_size;
/* Update current space used for free space sections */
- if(H5FS_sect_serialize_size(fspace) < 0)
+ if (H5FS_sect_serialize_size(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk")
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, TRUE) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, TRUE) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_change_class() */
#ifdef H5FS_DEBUG_ASSERT
-
+
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_assert
+ * Function: H5FS_sect_assert
*
- * Purpose: Verify that the sections managed are mostly sane
+ * Purpose: Verify that the sections managed are mostly sane
*
- * Return: Non-negative on success, negative on failure
+ * Return: void
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 17 2006
+ * Programmer: Quincey Koziol
+ * Jul 17 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_sect_assert(const H5FS_t *fspace)
{
- hsize_t separate_obj; /* The number of separate objects managed */
+ hsize_t separate_obj; /* The number of separate objects managed */
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_sect_assert", fspace->tot_sect_count);
-#endif /* QAK */
/* Initialize state */
separate_obj = 0;
/* Check for bins to work on */
- if(fspace->sinfo->bins) {
- hsize_t acc_tot_sect_count; /* Accumulated total section count from bins */
- hsize_t acc_serial_sect_count; /* Accumulated serializable section count from bins */
- hsize_t acc_ghost_sect_count; /* Accumulated ghost section count from bins */
- size_t acc_tot_size_count; /* Accumulated total section size count from bins */
- size_t acc_serial_size_count; /* Accumulated serializable section size count from bins */
- size_t acc_ghost_size_count; /* Accumulated ghost section size count from bins */
- unsigned u; /* Local index variable */
+ if (fspace->sinfo->bins) {
+ hsize_t acc_tot_sect_count; /* Accumulated total section count from bins */
+ hsize_t acc_serial_sect_count; /* Accumulated serializable section count from bins */
+ hsize_t acc_ghost_sect_count; /* Accumulated ghost section count from bins */
+ size_t acc_tot_size_count; /* Accumulated total section size count from bins */
+ size_t acc_serial_size_count; /* Accumulated serializable section size count from bins */
+ size_t acc_ghost_size_count; /* Accumulated ghost section size count from bins */
+ unsigned u; /* Local index variable */
/* Walk through all sections in bins */
- acc_tot_sect_count = 0;
+ acc_tot_sect_count = 0;
acc_serial_sect_count = 0;
- acc_ghost_sect_count = 0;
- acc_tot_size_count = 0;
+ acc_ghost_sect_count = 0;
+ acc_tot_size_count = 0;
acc_serial_size_count = 0;
- acc_ghost_size_count = 0;
- for(u = 0; u < fspace->sinfo->nbins; u++) {
+ acc_ghost_size_count = 0;
+ for (u = 0; u < fspace->sinfo->nbins; u++) {
acc_tot_sect_count += fspace->sinfo->bins[u].tot_sect_count;
acc_serial_sect_count += fspace->sinfo->bins[u].serial_sect_count;
acc_ghost_sect_count += fspace->sinfo->bins[u].ghost_sect_count;
- if(fspace->sinfo->bins[u].bin_list) {
- H5SL_node_t *curr_size_node; /* Current section size node in skip list */
- size_t bin_serial_count; /* # of serializable sections in this bin */
- size_t bin_ghost_count; /* # of ghost sections in this bin */
+ if (fspace->sinfo->bins[u].bin_list) {
+ H5SL_node_t *curr_size_node; /* Current section size node in skip list */
+ size_t bin_serial_count; /* # of serializable sections in this bin */
+ size_t bin_ghost_count; /* # of ghost sections in this bin */
acc_tot_size_count += H5SL_count(fspace->sinfo->bins[u].bin_list);
/* Walk through the sections in this bin */
- curr_size_node = H5SL_first(fspace->sinfo->bins[u].bin_list);
+ curr_size_node = H5SL_first(fspace->sinfo->bins[u].bin_list);
bin_serial_count = 0;
- bin_ghost_count = 0;
- while(curr_size_node != NULL) {
+ bin_ghost_count = 0;
+ while (curr_size_node != NULL) {
H5FS_node_t *fspace_node; /* Section size node */
H5SL_node_t *curr_sect_node; /* Current section node in skip list */
- size_t size_serial_count; /* # of serializable sections of this size */
- size_t size_ghost_count; /* # of ghost sections of this size */
+ size_t size_serial_count; /* # of serializable sections of this size */
+ size_t size_ghost_count; /* # of ghost sections of this size */
/* Get section size node */
fspace_node = H5SL_item(curr_size_node);
/* Check sections on list */
- curr_sect_node = H5SL_first(fspace_node->sect_list);
+ curr_sect_node = H5SL_first(fspace_node->sect_list);
size_serial_count = 0;
- size_ghost_count = 0;
- while(curr_sect_node != NULL) {
- H5FS_section_class_t *cls; /* Class of section */
- H5FS_section_info_t *sect; /* Section */
+ size_ghost_count = 0;
+ while (curr_sect_node != NULL) {
+ H5FS_section_class_t *cls; /* Class of section */
+ H5FS_section_info_t * sect; /* Section */
/* Get section node & it's class */
sect = H5SL_item(curr_sect_node);
- cls = &fspace->sect_cls[sect->type];
-#ifdef QAK
-HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H5FS_assert", sect->size, sect->addr, sect->type);
-#endif /* QAK */
+ cls = &fspace->sect_cls[sect->type];
/* Sanity check section */
HDassert(H5F_addr_defined(sect->addr));
HDassert(fspace_node->sect_size == sect->size);
- if(cls->valid)
+ if (cls->valid)
(*cls->valid)(cls, sect);
/* Add to correct count */
- if(cls->flags & H5FS_CLS_GHOST_OBJ)
+ if (cls->flags & H5FS_CLS_GHOST_OBJ)
size_ghost_count++;
else
size_serial_count++;
/* Count node, if separate */
- if(cls->flags & H5FS_CLS_SEPAR_OBJ)
+ if (cls->flags & H5FS_CLS_SEPAR_OBJ)
separate_obj++;
/* Get the next section node in the list */
@@ -2264,9 +2106,9 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H
HDassert(fspace_node->ghost_count == size_ghost_count);
/* Add to global count of serializable & ghost section sizes */
- if(fspace_node->serial_count > 0)
+ if (fspace_node->serial_count > 0)
acc_serial_size_count++;
- if(fspace_node->ghost_count > 0)
+ if (fspace_node->ghost_count > 0)
acc_ghost_size_count++;
/* Add to bin's serializable & ghost counts */
@@ -2282,7 +2124,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H
HDassert(fspace->sinfo->bins[u].serial_sect_count == bin_serial_count);
HDassert(fspace->sinfo->bins[u].ghost_sect_count == bin_ghost_count);
} /* end if */
- } /* end for */
+ } /* end for */
/* Check counts from bins vs. global counts */
HDassert(fspace->sinfo->tot_size_count == acc_tot_size_count);
@@ -2300,93 +2142,91 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H
} /* end else */
/* Make certain that the number of sections on the address list is correct */
- if(fspace->sinfo->merge_list)
+ if (fspace->sinfo->merge_list)
HDassert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list)));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FS_sect_assert() */
#endif /* H5FS_DEBUG_ASSERT */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_try_shrink_eoa
+ * Function: H5FS_sect_try_shrink_eoa
*
- * Purpose: To shrink the last section on the merge list if the section
- * is at EOF.
+ * Purpose: To shrink the last section on the merge list if the section
+ * is at EOF.
*
- * Return: Success: non-negative (TRUE/FALSE)
- * Failure: negative
+ * Return: TRUE/FALSE/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
*
*-------------------------------------------------------------------------
*/
htri_t
H5FS_sect_try_shrink_eoa(const H5F_t *f, hid_t dxpl_id, const H5FS_t *fspace, void *op_data)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t section_removed = FALSE; /* Whether a section was removed */
- htri_t ret_value = FALSE; /* Return value */
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ hbool_t section_removed = FALSE; /* Whether a section was removed */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(fspace);
- if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ if (H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
sinfo_valid = TRUE;
- if(fspace->sinfo && fspace->sinfo->merge_list) {
- H5SL_node_t *last_node; /* Last node in merge list */
+ if (fspace->sinfo && fspace->sinfo->merge_list) {
+ H5SL_node_t *last_node; /* Last node in merge list */
/* Check for last node in the merge list */
- if(NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
- H5FS_section_info_t *tmp_sect; /* Temporary free space section */
- H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
+ if (NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
+ H5FS_section_info_t * tmp_sect; /* Temporary free space section */
+ H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
/* Get the pointer to the last section, from the last node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(last_node);
HDassert(tmp_sect);
- tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
- if(tmp_sect_cls->can_shrink) {
+ tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
+ if (tmp_sect_cls->can_shrink) {
/* Check if the section can be shrunk away */
- if((ret_value = (*tmp_sect_cls->can_shrink)(tmp_sect, op_data)) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
- if(ret_value > 0) {
- HDassert(tmp_sect_cls->shrink);
+ if ((ret_value = (*tmp_sect_cls->can_shrink)(tmp_sect, op_data)) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
+ if (ret_value > 0) {
+ HDassert(tmp_sect_cls->shrink);
/* Remove section from free space manager */
- if(H5FS_sect_remove_real(fspace, tmp_sect) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't remove section from internal data structures")
+ if (H5FS_sect_remove_real(fspace, tmp_sect) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
+ "can't remove section from internal data structures")
section_removed = TRUE;
/* Shrink away section */
- if((*tmp_sect_cls->shrink)(&tmp_sect, op_data) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container")
- } /* end if */
- } /* end if */
- } /* end if */
- } /* end if */
+ if ((*tmp_sect_cls->shrink)(&tmp_sect, op_data) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container")
+ } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release the section info */
- if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, section_removed) < 0)
+ if (sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, section_removed) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_try_shrink_eoa() */
-
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_query_last_sect
+ * Function: H5FS_sect_query_last_sect
*
- * Purpose: Retrieve info about the last section on the merge list
+ * Purpose: Retrieve info about the last section on the merge list
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
*
*-------------------------------------------------------------------------
*/
@@ -2398,23 +2238,22 @@ H5FS_sect_query_last_sect(const H5FS_t *fspace, haddr_t *sect_addr, hsize_t *sec
/* Check arguments. */
HDassert(fspace);
- if(fspace->sinfo && fspace->sinfo->merge_list) {
- H5SL_node_t *last_node; /* Last node in merge list */
+ if (fspace->sinfo && fspace->sinfo->merge_list) {
+ H5SL_node_t *last_node; /* Last node in merge list */
/* Check for last node in the merge list */
- if(NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
- H5FS_section_info_t *tmp_sect; /* Temporary free space section */
+ if (NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
+ H5FS_section_info_t *tmp_sect; /* Temporary free space section */
/* Get the pointer to the last section, from the last node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(last_node);
HDassert(tmp_sect);
- if(sect_addr)
+ if (sect_addr)
*sect_addr = tmp_sect->addr;
- if(sect_size)
+ if (sect_size)
*sect_size = tmp_sect->size;
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_sect_query_last_sect() */
-
diff --git a/src/H5FSstat.c b/src/H5FSstat.c
index 6242b54..b3679f7 100644
--- a/src/H5FSstat.c
+++ b/src/H5FSstat.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,62 +20,52 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* Free-space manager */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* Free-space manager */
/****************/
/* Local Macros */
/****************/
-
/********************/
/* Package Typedefs */
/********************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5FS_stat_info
*
* Purpose: Retrieve metadata statistics for the free-space manager
*
- * Return: Success: non-negative
- *
- * Failure: does not fail
+ * Return: SUCCEED (Can't fail)
*
* Programmer: Vailin Choi
- * August 25th, 2008
+ * August 25th, 2008
*
*-------------------------------------------------------------------------
*/
@@ -89,16 +79,15 @@ H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats)
HDassert(stats);
/* Report statistics for free space */
- stats->tot_space = frsp->tot_space;
- stats->tot_sect_count = frsp->tot_sect_count;
+ stats->tot_space = frsp->tot_space;
+ stats->tot_sect_count = frsp->tot_sect_count;
stats->serial_sect_count = frsp->serial_sect_count;
- stats->ghost_sect_count = frsp->ghost_sect_count;
- stats->addr = frsp->addr;
- stats->hdr_size = (size_t)H5FS_HEADER_SIZE(f);
- stats->sect_addr = frsp->sect_addr;
- stats->alloc_sect_size = frsp->alloc_sect_size;
- stats->sect_size = frsp->sect_size;
+ stats->ghost_sect_count = frsp->ghost_sect_count;
+ stats->addr = frsp->addr;
+ stats->hdr_size = (size_t)H5FS_HEADER_SIZE(f);
+ stats->sect_addr = frsp->sect_addr;
+ stats->alloc_sect_size = frsp->alloc_sect_size;
+ stats->sect_size = frsp->sect_size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_stat_info() */
-
diff --git a/src/H5FStest.c b/src/H5FStest.c
index 7ea9a4a..ca333c6 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,63 +20,53 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
-#define H5FS_TESTING /*suppress warning about H5FS testing funcs */
+#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
+#define H5FS_TESTING /*suppress warning about H5FS testing funcs */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* Free-space manager */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* Free-space manager */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5FS_get_cparam_test
*
* Purpose: Retrieve the parameters used to create the free-space manager
*
- * Return: Success: non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: negative
- *
- * Programmer: similar to H5HF_get_cparam_test()
- * Vailin Choi; August 25th, 2008
+ * Programmer: Vailin Choi
+ * August 25th, 2008
*
*-------------------------------------------------------------------------
*/
@@ -89,33 +79,31 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
HDassert(frsp);
HDassert(cparam);
- cparam->client = frsp->client;
+ cparam->client = frsp->client;
cparam->shrink_percent = frsp->shrink_percent;
cparam->expand_percent = frsp->expand_percent;
- cparam->max_sect_addr = frsp->max_sect_addr;
- cparam->max_sect_size = frsp->max_sect_size;
+ cparam->max_sect_addr = frsp->max_sect_addr;
+ cparam->max_sect_size = frsp->max_sect_size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_get_cparam_test() */
-
/*-------------------------------------------------------------------------
* Function: H5FS_cmp_cparam_test
*
* Purpose: Compare the parameters used to create the fractal heap
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: A value like strcmp()
*
- * Programmer: similar to H5HF_cmp_cparam_test()
- * Vailin Choi; August 25th, 2008
+ * Programmer: Vailin Choi
+ * August 25th, 2008
*
*-------------------------------------------------------------------------
*/
int
H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
{
- int ret_value = SUCCEED; /* Return value */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -123,32 +111,31 @@ H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
HDassert(cparam1);
HDassert(cparam2);
- if(cparam1->client < cparam2->client)
+ if (cparam1->client < cparam2->client)
HGOTO_DONE(-1)
- else if(cparam1->client > cparam2->client)
+ else if (cparam1->client > cparam2->client)
HGOTO_DONE(1)
- if(cparam1->shrink_percent < cparam2->shrink_percent)
+ if (cparam1->shrink_percent < cparam2->shrink_percent)
HGOTO_DONE(-1)
- else if(cparam1->shrink_percent > cparam2->shrink_percent)
+ else if (cparam1->shrink_percent > cparam2->shrink_percent)
HGOTO_DONE(1)
- if(cparam1->expand_percent < cparam2->expand_percent)
+ if (cparam1->expand_percent < cparam2->expand_percent)
HGOTO_DONE(-1)
- else if(cparam1->expand_percent > cparam2->expand_percent)
+ else if (cparam1->expand_percent > cparam2->expand_percent)
HGOTO_DONE(1)
- if(cparam1->max_sect_size < cparam2->max_sect_size)
+ if (cparam1->max_sect_size < cparam2->max_sect_size)
HGOTO_DONE(-1)
- else if(cparam1->max_sect_size > cparam2->max_sect_size)
+ else if (cparam1->max_sect_size > cparam2->max_sect_size)
HGOTO_DONE(1)
- if(cparam1->max_sect_addr < cparam2->max_sect_addr)
+ if (cparam1->max_sect_addr < cparam2->max_sect_addr)
HGOTO_DONE(-1)
- else if(cparam1->max_sect_addr > cparam2->max_sect_addr)
+ else if (cparam1->max_sect_addr > cparam2->max_sect_addr)
HGOTO_DONE(1)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_cmp_cparam_test */
-
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 80f8d65..f2a94df 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Faccum.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File metadata "accumulator" routines. (Used to
* cache small metadata I/Os and group them into a
@@ -28,28 +28,25 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5VMprivate.h" /* Vectors and arrays */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
/* Metadata accumulator controls */
-#define H5F_ACCUM_THROTTLE 8
-#define H5F_ACCUM_THRESHOLD 2048
-#define H5F_ACCUM_MAX_SIZE (1024 *1024) /* Max. accum. buf size (max. I/Os will be 1/2 this size) */
-
+#define H5F_ACCUM_THROTTLE 8
+#define H5F_ACCUM_THRESHOLD 2048
+#define H5F_ACCUM_MAX_SIZE (1024 * 1024) /* Max. accum. buf size (max. I/Os will be 1/2 this size) */
/******************/
/* Local Typedefs */
@@ -57,31 +54,26 @@
/* Enumerated type to indicate how data will be added to accumulator */
typedef enum {
- H5F_ACCUM_PREPEND, /* Data will be prepended to accumulator */
- H5F_ACCUM_APPEND /* Data will be appended to accumulator */
+ H5F_ACCUM_PREPEND, /* Data will be prepended to accumulator */
+ H5F_ACCUM_APPEND /* Data will be appended to accumulator */
} H5F_accum_adjust_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -89,8 +81,6 @@ typedef enum {
/* Declare a PQ free list to manage the metadata accumulator buffer */
H5FL_BLK_DEFINE_STATIC(meta_accum);
-
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_read
*
@@ -104,17 +94,15 @@ H5FL_BLK_DEFINE_STATIC(meta_accum);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
- size_t size, void *buf/*out*/)
+H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*out*/)
{
- H5FD_mem_t map_type; /* Mapped memory type */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t map_type; /* Mapped memory type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -127,48 +115,48 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
/* Check if this information is in the metadata accumulator */
- if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
- H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
+ if ((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
/* Set up alias for file's metadata accumulator info */
accum = &fio_info->f->shared->accum;
- if(size < H5F_ACCUM_MAX_SIZE) {
+ if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
HDassert(!accum->buf || (accum->alloc_size >= accum->size));
/* Current read adjoins or overlaps with metadata accumulator */
- if(H5F_addr_overlap(addr, size, accum->loc, accum->size)
- || ((addr + size) == accum->loc)
- || (accum->loc + accum->size) == addr) {
- size_t amount_before; /* Amount to read before current accumulator */
- haddr_t new_addr; /* New address of the accumulator buffer */
- size_t new_size; /* New size of the accumulator buffer */
+ if (H5F_addr_overlap(addr, size, accum->loc, accum->size) || ((addr + size) == accum->loc) ||
+ (accum->loc + accum->size) == addr) {
+ size_t amount_before; /* Amount to read before current accumulator */
+ haddr_t new_addr; /* New address of the accumulator buffer */
+ size_t new_size; /* New size of the accumulator buffer */
/* Compute new values for accumulator */
new_addr = MIN(addr, accum->loc);
new_size = (size_t)(MAX((addr + size), (accum->loc + accum->size)) - new_addr);
/* Check if we need more buffer space */
- if(new_size > accum->alloc_size) {
- size_t new_alloc_size; /* New size of accumulator */
+ if (new_size > accum->alloc_size) {
+ size_t new_alloc_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_alloc_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(new_size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
+ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
accum->alloc_size = new_alloc_size;
#ifdef H5_CLEAR_MEMORY
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
+#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Read the part before the metadata accumulator */
- if(addr < accum->loc) {
+ if (addr < accum->loc) {
/* Set the amount to read */
H5_CHECKED_ASSIGN(amount_before, size_t, (accum->loc - addr), hsize_t);
@@ -176,25 +164,29 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
HDmemmove(accum->buf + amount_before, accum->buf, accum->size);
/* Adjust dirty region tracking info, if present */
- if(accum->dirty)
+ if (accum->dirty)
accum->dirty_off += amount_before;
/* Dispatch to driver */
- if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, amount_before, accum->buf) < 0)
+ if (H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, amount_before,
+ accum->buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
else
amount_before = 0;
/* Read the part after the metadata accumulator */
- if((addr + size) > (accum->loc + accum->size)) {
- size_t amount_after; /* Amount to read at a time */
+ if ((addr + size) > (accum->loc + accum->size)) {
+ size_t amount_after; /* Amount to read at a time */
/* Set the amount to read */
- H5_CHECKED_ASSIGN(amount_after, size_t, ((addr + size) - (accum->loc + accum->size)), hsize_t);
+ H5_CHECKED_ASSIGN(amount_after, size_t, ((addr + size) - (accum->loc + accum->size)),
+ hsize_t);
/* Dispatch to driver */
- if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, (accum->loc + accum->size), amount_after, (accum->buf + accum->size + amount_before)) < 0)
+ if (H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type,
+ (accum->loc + accum->size), amount_after,
+ (accum->buf + accum->size + amount_before)) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
@@ -202,19 +194,19 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
HDmemcpy(buf, accum->buf + (addr - new_addr), size);
/* Adjust the accumulator address & size */
- accum->loc = new_addr;
+ accum->loc = new_addr;
accum->size = new_size;
} /* end if */
/* Current read doesn't overlap with metadata accumulator, read it from file */
else {
/* Dispatch to driver */
- if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
+ if (H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Read the data */
- if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
+ if (H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
/* Check for overlap w/dirty accumulator */
@@ -222,15 +214,15 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
* information in the accumulator with [some of] the information
* just read in. -QAK)
*/
- if(accum->dirty &&
- H5F_addr_overlap(addr, size, accum->loc + accum->dirty_off, accum->dirty_len)) {
- haddr_t dirty_loc = accum->loc + accum->dirty_off; /* File offset of dirty information */
- size_t buf_off; /* Offset of dirty region in buffer */
- size_t dirty_off; /* Offset within dirty region */
- size_t overlap_size; /* Size of overlap with dirty region */
+ if (accum->dirty &&
+ H5F_addr_overlap(addr, size, accum->loc + accum->dirty_off, accum->dirty_len)) {
+ haddr_t dirty_loc = accum->loc + accum->dirty_off; /* File offset of dirty information */
+ size_t buf_off; /* Offset of dirty region in buffer */
+ size_t dirty_off; /* Offset within dirty region */
+ size_t overlap_size; /* Size of overlap with dirty region */
/* Check for read starting before beginning dirty region */
- if(H5F_addr_le(addr, dirty_loc)) {
+ if (H5F_addr_le(addr, dirty_loc)) {
/* Compute offset of dirty region within buffer */
buf_off = (size_t)(dirty_loc - addr);
@@ -238,26 +230,27 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
dirty_off = 0;
/* Check for read ending within dirty region */
- if(H5F_addr_lt(addr + size, dirty_loc + accum->dirty_len))
+ if (H5F_addr_lt(addr + size, dirty_loc + accum->dirty_len))
overlap_size = (size_t)((addr + size) - buf_off);
- else /* Access covers whole dirty region */
+ else /* Access covers whole dirty region */
overlap_size = accum->dirty_len;
- } /* end if */
+ } /* end if */
else { /* Read starts after beginning of dirty region */
/* Compute dirty offset within buffer and overlap size */
- buf_off = 0;
- dirty_off = (size_t)(addr - dirty_loc);
+ buf_off = 0;
+ dirty_off = (size_t)(addr - dirty_loc);
overlap_size = (size_t)((dirty_loc + accum->dirty_len) - addr);
} /* end else */
/* Copy the dirty region to buffer */
- HDmemcpy((unsigned char *)buf + buf_off, (unsigned char *)accum->buf + accum->dirty_off + dirty_off, overlap_size);
+ HDmemcpy((unsigned char *)buf + buf_off,
+ (unsigned char *)accum->buf + accum->dirty_off + dirty_off, overlap_size);
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
/* Read the data */
- if(H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
+ if (H5FD_read(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
@@ -265,7 +258,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_read() */
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_adjust
*
@@ -274,16 +266,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 11 2009
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
- H5F_accum_adjust_t adjust, size_t size)
+H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info, H5F_accum_adjust_t adjust,
+ size_t size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -294,70 +285,77 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
HDassert(size <= H5F_ACCUM_MAX_SIZE);
/* Check if we need more buffer space */
- if((size + accum->size) > accum->alloc_size) {
- size_t new_size; /* New size of accumulator */
+ if ((size + accum->size) > accum->alloc_size) {
+ size_t new_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)((size + accum->size) - 1)));
/* Check for accumulator getting too big */
- if(new_size > H5F_ACCUM_MAX_SIZE) {
- size_t shrink_size; /* Amount to shrink accumulator by */
- size_t remnant_size; /* Amount left in accumulator */
+ if (new_size > H5F_ACCUM_MAX_SIZE) {
+ size_t shrink_size; /* Amount to shrink accumulator by */
+ size_t remnant_size; /* Amount left in accumulator */
/* Cap the accumulator's growth, leaving some room */
/* Determine the amounts to work with */
- if(size > (H5F_ACCUM_MAX_SIZE / 2)) {
- new_size = H5F_ACCUM_MAX_SIZE;
- shrink_size = accum->size;
+ if (size > (H5F_ACCUM_MAX_SIZE / 2)) {
+ new_size = H5F_ACCUM_MAX_SIZE;
+ shrink_size = accum->size;
remnant_size = 0;
} /* end if */
else {
- if(H5F_ACCUM_PREPEND == adjust) {
- new_size = (H5F_ACCUM_MAX_SIZE / 2);
- shrink_size = (H5F_ACCUM_MAX_SIZE / 2);
+ if (H5F_ACCUM_PREPEND == adjust) {
+ new_size = (H5F_ACCUM_MAX_SIZE / 2);
+ shrink_size = (H5F_ACCUM_MAX_SIZE / 2);
remnant_size = accum->size - shrink_size;
} /* end if */
else {
size_t adjust_size = size + accum->dirty_len;
/* Check if we can slide the dirty region down, to accommodate the request */
- if(accum->dirty && (adjust_size <= H5F_ACCUM_MAX_SIZE)) {
- if((ssize_t)(H5F_ACCUM_MAX_SIZE - (accum->dirty_off + adjust_size)) >= (ssize_t)(2 * size))
+ if (accum->dirty && (adjust_size <= H5F_ACCUM_MAX_SIZE)) {
+ if ((ssize_t)(H5F_ACCUM_MAX_SIZE - (accum->dirty_off + adjust_size)) >=
+ (ssize_t)(2 * size))
shrink_size = accum->dirty_off / 2;
else
shrink_size = accum->dirty_off;
remnant_size = accum->size - shrink_size;
- new_size = remnant_size + size;
+ new_size = remnant_size + size;
} /* end if */
else {
- new_size = (H5F_ACCUM_MAX_SIZE / 2);
- shrink_size = (H5F_ACCUM_MAX_SIZE / 2);
+ new_size = (H5F_ACCUM_MAX_SIZE / 2);
+ shrink_size = (H5F_ACCUM_MAX_SIZE / 2);
remnant_size = accum->size - shrink_size;
} /* end else */
- } /* end else */
- } /* end else */
+ } /* end else */
+ } /* end else */
/* Check if we need to flush accumulator data to file */
- if(accum->dirty) {
+ if (accum->dirty) {
/* Check whether to accumulator will be prepended or appended */
- if(H5F_ACCUM_PREPEND == adjust) {
+ if (H5F_ACCUM_PREPEND == adjust) {
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
- if((accum->size - shrink_size) < (accum->dirty_off + accum->dirty_len)) {
- /* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if ((accum->size - shrink_size) < (accum->dirty_off + accum->dirty_len)) {
+ /* Write out the dirty region from the metadata accumulator, with dispatch to driver
+ */
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ (accum->loc + accum->dirty_off), accum->dirty_len,
+ (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
accum->dirty = FALSE;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
- if(shrink_size > accum->dirty_off) {
- /* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if (shrink_size > accum->dirty_off) {
+ /* Write out the dirty region from the metadata accumulator, with dispatch to driver
+ */
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ (accum->loc + accum->dirty_off), accum->dirty_len,
+ (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -367,11 +365,11 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
/* Adjust dirty region tracking info */
accum->dirty_off -= shrink_size;
} /* end else */
- } /* end if */
+ } /* end if */
/* Trim the accumulator's use of its buffer */
accum->size = remnant_size;
-
+
/* When appending, need to adjust location of accumulator */
if (H5F_ACCUM_APPEND == adjust) {
/* Move remnant of accumulator down */
@@ -380,30 +378,29 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
/* Adjust accumulator's location */
accum->loc += shrink_size;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check for accumulator needing to be reallocated */
- if(new_size > accum->alloc_size) {
- unsigned char *new_buf; /* New buffer to hold the accumulated metadata */
+ if (new_size > accum->alloc_size) {
+ unsigned char *new_buf; /* New buffer to hold the accumulated metadata */
/* Reallocate the metadata accumulator buffer */
- if(NULL == (new_buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
+ if (NULL == (new_buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate metadata accumulator buffer")
/* Update accumulator info */
- accum->buf = new_buf;
+ accum->buf = new_buf;
accum->alloc_size = new_size;
#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
+#endif /* H5_CLEAR_MEMORY */
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_adjust() */
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_write
*
@@ -413,17 +410,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
- size_t size, const void *buf)
+H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf)
{
- H5FD_mem_t map_type; /* Mapped memory type */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t map_type; /* Mapped memory type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -437,22 +432,22 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
/* Check for accumulating metadata */
- if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
- H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
+ if ((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
/* Set up alias for file's metadata accumulator info */
accum = &fio_info->f->shared->accum;
- if(size < H5F_ACCUM_MAX_SIZE) {
+ if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
HDassert(!accum->buf || (accum->alloc_size >= accum->size));
/* Check if there is already metadata in the accumulator */
- if(accum->size > 0) {
+ if (accum->size > 0) {
/* Check if the new metadata adjoins the beginning of the current accumulator */
- if((addr + size) == accum->loc) {
+ if ((addr + size) == accum->loc) {
/* Check if we need to adjust accumulator size */
- if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, size) < 0)
+ if (H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Move the existing metadata to the proper location */
@@ -466,78 +461,79 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
accum->size += size;
/* Adjust the dirty region and mark accumulator dirty */
- if(accum->dirty)
+ if (accum->dirty)
accum->dirty_len = size + accum->dirty_off + accum->dirty_len;
else {
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
accum->dirty_off = 0;
} /* end if */
/* Check if the new metadata adjoins the end of the current accumulator */
- else if(addr == (accum->loc + accum->size)) {
+ else if (addr == (accum->loc + accum->size)) {
/* Check if we need to adjust accumulator size */
- if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, size) < 0)
+ if (H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Copy the new metadata to the end */
HDmemcpy(accum->buf + accum->size, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- if(accum->dirty)
+ if (accum->dirty)
accum->dirty_len = size + (accum->size - accum->dirty_off);
else {
accum->dirty_off = accum->size;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
/* Set the new size of the metadata accumulator */
accum->size += size;
} /* end if */
/* Check if the piece of metadata being written overlaps the metadata accumulator */
- else if(H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
- size_t add_size; /* New size of the accumulator buffer */
+ else if (H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
+ size_t add_size; /* New size of the accumulator buffer */
/* Check if the new metadata is entirely within the current accumulator */
- if(addr >= accum->loc && (addr + size) <= (accum->loc + accum->size)) {
+ if (addr >= accum->loc && (addr + size) <= (accum->loc + accum->size)) {
size_t dirty_off = (size_t)(addr - accum->loc);
/* Copy the new metadata to the proper location within the accumulator */
HDmemcpy(accum->buf + dirty_off, buf, size);
/* Adjust the dirty region and mark accumulator dirty */
- if(accum->dirty) {
+ if (accum->dirty) {
/* Check for new metadata starting before current dirty region */
- if(dirty_off <= accum->dirty_off) {
- if((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
+ if (dirty_off <= accum->dirty_off) {
+ if ((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
accum->dirty_len = (accum->dirty_off + accum->dirty_len) - dirty_off;
else
accum->dirty_len = size;
accum->dirty_off = dirty_off;
} /* end if */
else {
- if((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
+ if ((dirty_off + size) <= (accum->dirty_off + accum->dirty_len))
; /* accum->dirty_len doesn't change */
else
accum->dirty_len = (dirty_off + size) - accum->dirty_off;
} /* end else */
- } /* end if */
+ } /* end if */
else {
accum->dirty_off = dirty_off;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* Check if the new metadata overlaps the beginning of the current accumulator */
- else if(addr < accum->loc && (addr + size) <= (accum->loc + accum->size)) {
- size_t old_offset; /* Offset of old data within the accumulator buffer */
+ else if (addr < accum->loc && (addr + size) <= (accum->loc + accum->size)) {
+ size_t old_offset; /* Offset of old data within the accumulator buffer */
- /* Calculate the amount we will need to add to the accumulator size, based on the amount of overlap */
+ /* Calculate the amount we will need to add to the accumulator size, based on the
+ * amount of overlap */
H5_CHECKED_ASSIGN(add_size, size_t, (accum->loc - addr), hsize_t);
/* Check if we need to adjust accumulator size */
- if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, add_size) < 0)
+ if (H5F__accum_adjust(accum, fio_info, H5F_ACCUM_PREPEND, add_size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Calculate the proper offset of the existing metadata */
@@ -554,11 +550,11 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
accum->size += add_size;
/* Adjust the dirty region and mark accumulator dirty */
- if(accum->dirty) {
+ if (accum->dirty) {
size_t curr_dirty_end = add_size + accum->dirty_off + accum->dirty_len;
accum->dirty_off = 0;
- if(size <= curr_dirty_end)
+ if (size <= curr_dirty_end)
accum->dirty_len = curr_dirty_end;
else
accum->dirty_len = size;
@@ -566,18 +562,20 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
else {
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* Check if the new metadata overlaps the end of the current accumulator */
- else if(addr >= accum->loc && (addr + size) > (accum->loc + accum->size)) {
- size_t dirty_off; /* Offset of dirty region */
+ else if (addr >= accum->loc && (addr + size) > (accum->loc + accum->size)) {
+ size_t dirty_off; /* Offset of dirty region */
- /* Calculate the amount we will need to add to the accumulator size, based on the amount of overlap */
- H5_CHECKED_ASSIGN(add_size, size_t, (addr + size) - (accum->loc + accum->size), hsize_t);
+ /* Calculate the amount we will need to add to the accumulator size, based on the
+ * amount of overlap */
+ H5_CHECKED_ASSIGN(add_size, size_t, (addr + size) - (accum->loc + accum->size),
+ hsize_t);
/* Check if we need to adjust accumulator size */
- if(H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, add_size) < 0)
+ if (H5F__accum_adjust(accum, fio_info, H5F_ACCUM_APPEND, add_size) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Compute offset of dirty region (after adjusting accumulator) */
@@ -590,60 +588,64 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
accum->size += add_size;
/* Adjust the dirty region and mark accumulator dirty */
- if(accum->dirty) {
+ if (accum->dirty) {
/* Check for new metadata starting before current dirty region */
- if(dirty_off <= accum->dirty_off) {
+ if (dirty_off <= accum->dirty_off) {
accum->dirty_off = dirty_off;
accum->dirty_len = size;
} /* end if */
else {
accum->dirty_len = (dirty_off + size) - accum->dirty_off;
} /* end else */
- } /* end if */
+ } /* end if */
else {
accum->dirty_off = dirty_off;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* New metadata overlaps both ends of the current accumulator */
else {
/* Check if we need more buffer space */
- if(size > accum->alloc_size) {
- size_t new_alloc_size; /* New size of accumulator */
+ if (size > accum->alloc_size) {
+ size_t new_alloc_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_alloc_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
+ if (NULL ==
+ (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
accum->alloc_size = new_alloc_size;
#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Copy the new metadata to the buffer */
HDmemcpy(accum->buf, buf, size);
/* Set the new size & location of the metadata accumulator */
- accum->loc = addr;
+ accum->loc = addr;
accum->size = size;
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* New piece of metadata doesn't adjoin or overlap the existing accumulator */
else {
/* Write out the existing metadata accumulator, with dispatch to driver */
- if(accum->dirty) {
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, accum->loc + accum->dirty_off, accum->dirty_len, accum->buf + accum->dirty_off) < 0)
+ if (accum->dirty) {
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ accum->loc + accum->dirty_off, accum->dirty_len,
+ accum->buf + accum->dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -652,42 +654,45 @@ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
/* Cache the new piece of metadata */
/* Check if we need to resize the buffer */
- if(size > accum->alloc_size) {
- size_t new_size; /* New size of accumulator */
+ if (size > accum->alloc_size) {
+ size_t new_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Grow the metadata accumulator buffer */
- if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
+ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
accum->alloc_size = new_size;
#ifdef H5_CLEAR_MEMORY
-{
-size_t clear_size = MAX(accum->size, size);
-HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
-}
-#endif /* H5_CLEAR_MEMORY */
+ {
+ size_t clear_size = MAX(accum->size, size);
+ HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
+ }
+#endif /* H5_CLEAR_MEMORY */
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
- if(size < (accum->alloc_size / H5F_ACCUM_THROTTLE) &&
- accum->alloc_size > H5F_ACCUM_THRESHOLD) {
- size_t tmp_size = (accum->alloc_size / H5F_ACCUM_THROTTLE); /* New size of accumulator buffer */
+ if (size < (accum->alloc_size / H5F_ACCUM_THROTTLE) &&
+ accum->alloc_size > H5F_ACCUM_THRESHOLD) {
+ size_t tmp_size =
+ (accum->alloc_size / H5F_ACCUM_THROTTLE); /* New size of accumulator buffer */
/* Shrink the accumulator buffer */
- if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, tmp_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
+ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, tmp_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
accum->alloc_size = tmp_size;
} /* end if */
- } /* end else */
+ } /* end else */
/* Update the metadata accumulator information */
- accum->loc = addr;
+ accum->loc = addr;
accum->size = size;
/* Store the piece of metadata in the accumulator */
@@ -696,31 +701,32 @@ HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* No metadata in the accumulator, grab this piece and keep it */
else {
/* Check if we need to reallocate the buffer */
- if(size > accum->alloc_size) {
- size_t new_size; /* New size of accumulator */
+ if (size > accum->alloc_size) {
+ size_t new_size; /* New size of accumulator */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
/* Reallocate the metadata accumulator buffer */
- if(NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate metadata accumulator buffer")
+ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "unable to allocate metadata accumulator buffer")
/* Note the new buffer size */
accum->alloc_size = new_size;
#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+#endif /* H5_CLEAR_MEMORY */
} /* end if */
/* Update the metadata accumulator information */
- accum->loc = addr;
+ accum->loc = addr;
accum->size = size;
/* Store the piece of metadata in the accumulator */
@@ -729,62 +735,64 @@ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Write the data */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Check for overlap w/accumulator */
/* (Note that this could be improved by updating the accumulator
* with [some of] the information just read in. -QAK)
*/
- if(H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
+ if (H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
/* Check for write starting before beginning of accumulator */
- if(H5F_addr_le(addr, accum->loc)) {
+ if (H5F_addr_le(addr, accum->loc)) {
/* Check for write ending within accumulator */
- if(H5F_addr_le(addr + size, accum->loc + accum->size)) {
- size_t overlap_size; /* Size of overlapping region */
+ if (H5F_addr_le(addr + size, accum->loc + accum->size)) {
+ size_t overlap_size; /* Size of overlapping region */
/* Compute overlap size */
overlap_size = (size_t)((addr + size) - accum->loc);
/* Check for dirty region */
- if(accum->dirty) {
- haddr_t dirty_start = accum->loc + accum->dirty_off; /* File address of start of dirty region */
- haddr_t dirty_end = dirty_start + accum->dirty_len; /* File address of end of dirty region */
+ if (accum->dirty) {
+ haddr_t dirty_start =
+ accum->loc + accum->dirty_off; /* File address of start of dirty region */
+ haddr_t dirty_end =
+ dirty_start + accum->dirty_len; /* File address of end of dirty region */
/* Check if entire dirty region is overwritten */
- if(H5F_addr_le(dirty_end, addr + size)) {
- accum->dirty = FALSE;
+ if (H5F_addr_le(dirty_end, addr + size)) {
+ accum->dirty = FALSE;
accum->dirty_len = 0;
} /* end if */
else {
/* Check for dirty region falling after write */
- if(H5F_addr_le(addr + size, dirty_start))
+ if (H5F_addr_le(addr + size, dirty_start))
accum->dirty_off = overlap_size;
- else { /* Dirty region overlaps w/written region */
+ else { /* Dirty region overlaps w/written region */
accum->dirty_off = 0;
accum->dirty_len -= (size_t)((addr + size) - dirty_start);
} /* end else */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* Trim bottom of accumulator off */
accum->loc += overlap_size;
accum->size -= overlap_size;
HDmemmove(accum->buf, accum->buf + overlap_size, accum->size);
- } /* end if */
- else { /* Access covers whole accumulator */
+ } /* end if */
+ else { /* Access covers whole accumulator */
/* Reset accumulator, but don't flush */
- if(H5F__accum_reset(fio_info, FALSE) < 0)
+ if (H5F__accum_reset(fio_info, FALSE) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator")
- } /* end else */
- } /* end if */
- else { /* Write starts after beginning of accumulator */
- size_t overlap_size; /* Size of overlapping region */
+ } /* end else */
+ } /* end if */
+ else { /* Write starts after beginning of accumulator */
+ size_t overlap_size; /* Size of overlapping region */
/* Sanity check */
HDassert(H5F_addr_gt(addr + size, accum->loc + accum->size));
@@ -793,33 +801,35 @@ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
overlap_size = (size_t)((accum->loc + accum->size) - addr);
/* Check for dirty region */
- if(accum->dirty) {
- haddr_t dirty_start = accum->loc + accum->dirty_off; /* File address of start of dirty region */
- haddr_t dirty_end = dirty_start + accum->dirty_len; /* File address of end of dirty region */
+ if (accum->dirty) {
+ haddr_t dirty_start =
+ accum->loc + accum->dirty_off; /* File address of start of dirty region */
+ haddr_t dirty_end =
+ dirty_start + accum->dirty_len; /* File address of end of dirty region */
/* Check if entire dirty region is overwritten */
- if(H5F_addr_ge(dirty_start, addr)) {
- accum->dirty = FALSE;
+ if (H5F_addr_ge(dirty_start, addr)) {
+ accum->dirty = FALSE;
accum->dirty_len = 0;
} /* end if */
else {
/* Check for dirty region falling before write */
- if(H5F_addr_le(dirty_end, addr))
+ if (H5F_addr_le(dirty_end, addr))
; /* noop */
- else /* Dirty region overlaps w/written region */
+ else /* Dirty region overlaps w/written region */
accum->dirty_len = (size_t)(addr - dirty_start);
} /* end if */
- } /* end if */
+ } /* end if */
/* Trim top of accumulator off */
accum->size -= overlap_size;
} /* end else */
- } /* end if */
- } /* end else */
- } /* end if */
+ } /* end if */
+ } /* end else */
+ } /* end if */
else {
/* Write the data */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end else */
@@ -827,7 +837,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_write() */
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_free
*
@@ -837,17 +846,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr,
- hsize_t size)
+H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr, hsize_t size)
{
- H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -860,9 +867,9 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
accum = &fio_info->f->shared->accum;
/* Adjust the metadata accumulator to remove the freed block, if it overlaps */
- if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
- && H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
- size_t overlap_size; /* Size of overlap with accumulator */
+ if ((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) &&
+ H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
+ size_t overlap_size; /* Size of overlap with accumulator */
/* Sanity check */
/* (The metadata accumulator should not intersect w/raw data */
@@ -870,17 +877,17 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
HDassert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
/* Check for overlapping the beginning of the accumulator */
- if(H5F_addr_le(addr, accum->loc)) {
+ if (H5F_addr_le(addr, accum->loc)) {
/* Check for completely overlapping the accumulator */
- if(H5F_addr_ge(addr + size, accum->loc + accum->size)) {
+ if (H5F_addr_ge(addr + size, accum->loc + accum->size)) {
/* Reset the accumulator, but don't free buffer */
- accum->loc = HADDR_UNDEF;
- accum->size = 0;
+ accum->loc = HADDR_UNDEF;
+ accum->size = 0;
accum->dirty = FALSE;
} /* end if */
/* Block to free must end within the accumulator */
else {
- size_t new_accum_size; /* Size of new accumulator buffer */
+ size_t new_accum_size; /* Size of new accumulator buffer */
/* Calculate the size of the overlap with the accumulator, etc. */
H5_CHECKED_ASSIGN(overlap_size, size_t, (addr + size) - accum->loc, haddr_t);
@@ -894,13 +901,13 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
accum->size = new_accum_size;
/* Adjust the dirty region and possibly mark accumulator clean */
- if(accum->dirty) {
+ if (accum->dirty) {
/* Check if block freed is entirely before dirty region */
- if(overlap_size < accum->dirty_off)
+ if (overlap_size < accum->dirty_off)
accum->dirty_off -= overlap_size;
else {
/* Check if block freed ends within dirty region */
- if(overlap_size < (accum->dirty_off + accum->dirty_len)) {
+ if (overlap_size < (accum->dirty_off + accum->dirty_len)) {
accum->dirty_len = (accum->dirty_off + accum->dirty_len) - overlap_size;
accum->dirty_off = 0;
} /* end if */
@@ -908,45 +915,48 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
else
accum->dirty = FALSE;
} /* end else */
- } /* end if */
- } /* end else */
- } /* end if */
+ } /* end if */
+ } /* end else */
+ } /* end if */
/* Block to free must start within the accumulator */
else {
- haddr_t dirty_end = accum->loc + accum->dirty_off + accum->dirty_len;
+ haddr_t dirty_end = accum->loc + accum->dirty_off + accum->dirty_len;
haddr_t dirty_start = accum->loc + accum->dirty_off;
/* Calculate the size of the overlap with the accumulator */
H5_CHECKED_ASSIGN(overlap_size, size_t, (accum->loc + accum->size) - addr, haddr_t);
/* Check if block to free begins before end of dirty region */
- if(accum->dirty && H5F_addr_lt(addr, dirty_end)) {
+ if (accum->dirty && H5F_addr_lt(addr, dirty_end)) {
haddr_t tail_addr;
/* Calculate the address of the tail to write */
tail_addr = addr + size;
/* Check if the block to free begins before dirty region */
- if(H5F_addr_lt(addr, dirty_start)) {
+ if (H5F_addr_lt(addr, dirty_start)) {
/* Check if block to free is entirely before dirty region */
- if(H5F_addr_le(tail_addr, dirty_start)) {
+ if (H5F_addr_le(tail_addr, dirty_start)) {
/* Write out the entire dirty region of the accumulator */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start, accum->dirty_len, accum->buf + accum->dirty_off) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start,
+ accum->dirty_len, accum->buf + accum->dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Block to free overlaps with some/all of dirty region */
/* Check for unfreed dirty region to write */
- else if(H5F_addr_lt(tail_addr, dirty_end)) {
+ else if (H5F_addr_lt(tail_addr, dirty_end)) {
size_t write_size;
size_t dirty_delta;
- write_size = (size_t)(dirty_end - tail_addr);
+ write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
HDassert(write_size > 0);
/* Write out the unfreed dirty region of the accumulator */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, accum->buf + accum->dirty_off + dirty_delta) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ dirty_start + dirty_delta, write_size,
+ accum->buf + accum->dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
@@ -956,22 +966,24 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
/* Block to free begins at beginning of or in middle of dirty region */
else {
/* Check if block to free ends before end of dirty region */
- if(H5F_addr_lt(tail_addr, dirty_end)) {
+ if (H5F_addr_lt(tail_addr, dirty_end)) {
size_t write_size;
size_t dirty_delta;
- write_size = (size_t)(dirty_end - tail_addr);
+ write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
HDassert(write_size > 0);
/* Write out the unfreed end of the dirty region of the accumulator */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, accum->buf + accum->dirty_off + dirty_delta) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ dirty_start + dirty_delta, write_size,
+ accum->buf + accum->dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Check for block to free beginning at same location as dirty region */
- if(H5F_addr_eq(addr, dirty_start)) {
+ if (H5F_addr_eq(addr, dirty_start)) {
/* Reset dirty flag */
accum->dirty = FALSE;
} /* end if */
@@ -979,20 +991,19 @@ H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t H5_ATTR_UNUSED type, h
else {
accum->dirty_len = (size_t)(addr - dirty_start);
} /* end else */
- } /* end else */
+ } /* end else */
} /* end if */
/* Adjust the accumulator information */
accum->size = accum->size - overlap_size;
} /* end else */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_free() */
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_flush
*
@@ -1001,7 +1012,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -1009,7 +1019,7 @@ done:
herr_t
H5F__accum_flush(const H5F_io_info_t *fio_info)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1018,9 +1028,13 @@ H5F__accum_flush(const H5F_io_info_t *fio_info)
HDassert(fio_info->dxpl);
/* Check if we need to flush out the metadata accumulator */
- if((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && fio_info->f->shared->accum.dirty) {
+ if ((fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) &&
+ fio_info->f->shared->accum.dirty) {
/* Flush the metadata contents */
- if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT, fio_info->f->shared->accum.loc + fio_info->f->shared->accum.dirty_off, fio_info->f->shared->accum.dirty_len, fio_info->f->shared->accum.buf + fio_info->f->shared->accum.dirty_off) < 0)
+ if (H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, H5FD_MEM_DEFAULT,
+ fio_info->f->shared->accum.loc + fio_info->f->shared->accum.dirty_off,
+ fio_info->f->shared->accum.dirty_len,
+ fio_info->f->shared->accum.buf + fio_info->f->shared->accum.dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset the dirty flag */
@@ -1031,7 +1045,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5F__accum_reset
*
@@ -1040,7 +1053,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -1048,7 +1060,7 @@ done:
herr_t
H5F__accum_reset(const H5F_io_info_t *fio_info, hbool_t flush)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1057,27 +1069,26 @@ H5F__accum_reset(const H5F_io_info_t *fio_info, hbool_t flush)
HDassert(fio_info->dxpl);
/* Flush any dirty data in accumulator, if requested */
- if(flush)
- if(H5F__accum_flush(fio_info) < 0)
+ if (flush)
+ if (H5F__accum_flush(fio_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "can't flush metadata accumulator")
/* Check if we need to reset the metadata accumulator information */
- if(fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) {
+ if (fio_info->f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) {
/* Sanity check */
HDassert(!fio_info->f->closing || FALSE == fio_info->f->shared->accum.dirty);
/* Free the buffer */
- if(fio_info->f->shared->accum.buf)
+ if (fio_info->f->shared->accum.buf)
fio_info->f->shared->accum.buf = H5FL_BLK_FREE(meta_accum, fio_info->f->shared->accum.buf);
/* Reset the buffer sizes & location */
fio_info->f->shared->accum.alloc_size = fio_info->f->shared->accum.size = 0;
- fio_info->f->shared->accum.loc = HADDR_UNDEF;
- fio_info->f->shared->accum.dirty = FALSE;
- fio_info->f->shared->accum.dirty_len = 0;
+ fio_info->f->shared->accum.loc = HADDR_UNDEF;
+ fio_info->f->shared->accum.dirty = FALSE;
+ fio_info->f->shared->accum.dirty_len = 0;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__accum_reset() */
-
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index 8f50f26..4e116ed 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, July 19, 2011
*
* Purpose: Each file has a small cache of global heap collections called
@@ -33,19 +33,17 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5HGprivate.h" /* Global heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5HGprivate.h" /* Global heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
@@ -55,40 +53,32 @@
* Maximum length of the CWFS list, the list of remembered collections that
* have free space.
*/
-#define H5F_NCWFS 16
-
+#define H5F_NCWFS 16
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5F_cwfs_add
*
@@ -105,7 +95,7 @@
herr_t
H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -119,23 +109,25 @@ H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
* necessary to make room. We remove the right-most entry that has less
* free space than this heap.
*/
- if(NULL == f->shared->cwfs) {
- if(NULL == (f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5F_NCWFS * sizeof(H5HG_heap_t *))))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate CWFS for file")
- f->shared->cwfs[0] = heap;
- f->shared->ncwfs = 1;
- } else if(H5F_NCWFS == f->shared->ncwfs) {
- int i; /* Local index variable */
-
- for(i = H5F_NCWFS - 1; i >= 0; --i)
- if(H5HG_FREE_SIZE(f->shared->cwfs[i]) < H5HG_FREE_SIZE(heap)) {
+ if (NULL == f->shared->cwfs) {
+ if (NULL == (f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5F_NCWFS * sizeof(H5HG_heap_t *))))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate CWFS for file")
+ f->shared->cwfs[0] = heap;
+ f->shared->ncwfs = 1;
+ }
+ else if (H5F_NCWFS == f->shared->ncwfs) {
+ int i; /* Local index variable */
+
+ for (i = H5F_NCWFS - 1; i >= 0; --i)
+ if (H5HG_FREE_SIZE(f->shared->cwfs[i]) < H5HG_FREE_SIZE(heap)) {
HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, (size_t)i * sizeof(H5HG_heap_t *));
f->shared->cwfs[0] = heap;
break;
} /* end if */
- } else {
+ }
+ else {
HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, f->shared->ncwfs * sizeof(H5HG_heap_t *));
- f->shared->cwfs[0] = heap;
+ f->shared->cwfs[0] = heap;
f->shared->ncwfs += 1;
} /* end else */
@@ -143,7 +135,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_cwfs_add() */
-
/*-------------------------------------------------------------------------
* Function: H5F_cwfs_find_free_heap
*
@@ -161,9 +152,9 @@ done:
herr_t
H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr)
{
- unsigned cwfsno; /* Local index for iterating over collections */
- hbool_t found = FALSE; /* Flag to indicate a heap with enough space was found */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned cwfsno; /* Local index for iterating over collections */
+ hbool_t found = FALSE; /* Flag to indicate a heap with enough space was found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -188,59 +179,60 @@ H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr)
*
* JRM - 5/24/04
*/
- for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++)
- if(H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]) >= need) {
- *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
+ for (cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++)
+ if (H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]) >= need) {
+ *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
found = TRUE;
- break;
- } /* end if */
+ break;
+ } /* end if */
/*
* If we didn't find any collection with enough free space the check if
* we can extend any of the collections to make enough room.
*/
- if(!found) {
+ if (!found) {
size_t new_need;
- for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++) {
+ for (cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++) {
new_need = need;
new_need -= H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]);
new_need = MAX(H5HG_SIZE(f->shared->cwfs[cwfsno]), new_need);
- if((H5HG_SIZE(f->shared->cwfs[cwfsno]) + new_need) <= H5HG_MAXSIZE) {
- htri_t was_extended; /* Whether the heap was extended */
+ if ((H5HG_SIZE(f->shared->cwfs[cwfsno]) + new_need) <= H5HG_MAXSIZE) {
+ htri_t was_extended; /* Whether the heap was extended */
- was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need);
- if(was_extended < 0)
+ was_extended =
+ H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]),
+ (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need);
+ if (was_extended < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap")
- else if(was_extended == TRUE) {
- if(H5HG_extend(f, dxpl_id, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0)
+ else if (was_extended == TRUE) {
+ if (H5HG_extend(f, dxpl_id, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection")
*addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
found = TRUE;
break;
} /* end if */
- } /* end if */
- } /* end for */
- } /* end if */
+ } /* end if */
+ } /* end for */
+ } /* end if */
- if(found) {
+ if (found) {
/* Move the collection forward in the CWFS list, if it's not
* already at the front
*/
- if(cwfsno > 0) {
+ if (cwfsno > 0) {
H5HG_heap_t *tmp = f->shared->cwfs[cwfsno];
- f->shared->cwfs[cwfsno] = f->shared->cwfs[cwfsno - 1];
+ f->shared->cwfs[cwfsno] = f->shared->cwfs[cwfsno - 1];
f->shared->cwfs[cwfsno - 1] = tmp;
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_cwfs_find_free_heap() */
-
/*-------------------------------------------------------------------------
* Function: H5F_cwfs_advance_heap
*
@@ -257,7 +249,7 @@ done:
herr_t
H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOERR
@@ -266,23 +258,22 @@ H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
HDassert(f->shared);
HDassert(heap);
- for(u = 0; u < f->shared->ncwfs; u++)
- if(f->shared->cwfs[u] == heap) {
- if(u) {
- f->shared->cwfs[u] = f->shared->cwfs[u - 1];
+ for (u = 0; u < f->shared->ncwfs; u++)
+ if (f->shared->cwfs[u] == heap) {
+ if (u) {
+ f->shared->cwfs[u] = f->shared->cwfs[u - 1];
f->shared->cwfs[u - 1] = heap;
} /* end if */
break;
} /* end if */
- if(add_heap && u >= f->shared->ncwfs) {
- f->shared->ncwfs = MIN(f->shared->ncwfs + 1, H5F_NCWFS);
+ if (add_heap && u >= f->shared->ncwfs) {
+ f->shared->ncwfs = MIN(f->shared->ncwfs + 1, H5F_NCWFS);
f->shared->cwfs[f->shared->ncwfs - 1] = heap;
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_cwfs_advance_heap() */
-
/*-------------------------------------------------------------------------
* Function: H5F_cwfs_remove_heap
*
@@ -299,7 +290,7 @@ H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
herr_t
H5F_cwfs_remove_heap(H5F_file_t *shared, H5HG_heap_t *heap)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOERR
@@ -308,14 +299,13 @@ H5F_cwfs_remove_heap(H5F_file_t *shared, H5HG_heap_t *heap)
HDassert(heap);
/* Remove the heap from the CWFS list */
- for(u = 0; u < shared->ncwfs; u++) {
- if(shared->cwfs[u] == heap) {
+ for (u = 0; u < shared->ncwfs; u++) {
+ if (shared->cwfs[u] == heap) {
shared->ncwfs -= 1;
HDmemmove(shared->cwfs + u, shared->cwfs + u + 1, (shared->ncwfs - u) * sizeof(H5HG_heap_t *));
break;
} /* end if */
- } /* end for */
+ } /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_cwfs_remove_heap() */
-
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index fc4aafd4..aa5d4d3 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -6,29 +6,27 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: File object debugging functions.
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* ID Functions */
+#include "H5Pprivate.h" /* Property lists */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* ID Functions */
-#include "H5Pprivate.h" /* Property lists */
-
-
/*-------------------------------------------------------------------------
* Function: H5F_debug
*
@@ -39,7 +37,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
@@ -47,9 +44,9 @@
herr_t
H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
{
- H5P_genplist_t *plist; /* File creation property list */
- hsize_t userblock_size; /* Userblock size */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* File creation property list */
+ hsize_t userblock_size; /* Userblock size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -60,71 +57,66 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
HDassert(fwidth >= 0);
/* Get property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Retrieve file creation properties */
- if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
+ if (H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size")
/* debug */
HDfprintf(stream, "%*sFile Super Block...\n", indent, "");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f));
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name (as opened):", H5F_OPEN_NAME(f));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth,
- "File access flags", f->shared->flags);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "File open reference count:", f->shared->nrefs);
+ "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
+ HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs);
HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth,
- "Address of super block:", f->shared->sblock->base_addr);
- HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth,
- "Size of userblock:", userblock_size);
+ "Address of super block:", f->shared->sblock->base_addr);
+ HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth, "Size of userblock:", userblock_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Superblock version number:", f->shared->sblock->super_vers);
+ "Superblock version number:", f->shared->sblock->super_vers);
/* Hard-wired versions */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
+ "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
+ "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
+ "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file offsets (haddr_t type):", (unsigned) f->shared->sizeof_addr);
+ "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr);
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file lengths (hsize_t type):", (unsigned) f->shared->sizeof_size);
+ "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
+ "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
+ "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
- "File status flags:", (unsigned)(f->shared->sblock->status_flags));
+ "File status flags:", (unsigned)(f->shared->sblock->status_flags));
HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Superblock extension address:", f->shared->sblock->ext_addr);
+ "Superblock extension address:", f->shared->sblock->ext_addr);
HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Shared object header message table address:", f->shared->sohm_addr);
+ "Shared object header message table address:", f->shared->sohm_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared object header message version number:", (unsigned) f->shared->sohm_vers);
+ "Shared object header message version number:", (unsigned)f->shared->sohm_vers);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of shared object header message indexes:", (unsigned) f->shared->sohm_nindexes);
+ "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes);
HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Address of driver information block:", f->shared->sblock->driver_addr);
+ "Address of driver information block:", f->shared->sblock->driver_addr);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Root group symbol table entry:",
- f->shared->root_grp ? "" : "(none)");
- if(f->shared->root_grp) {
- if(f->shared->sblock->root_ent) /* Use real root group symbol table entry */
+ "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)");
+ if (f->shared->root_grp) {
+ if (f->shared->sblock->root_ent) /* Use real root group symbol table entry */
H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
else {
- H5O_loc_t *root_oloc; /* Root object location */
- H5G_entry_t root_ent; /* Constructed root symbol table entry */
+ H5O_loc_t * root_oloc; /* Root object location */
+ H5G_entry_t root_ent; /* Constructed root symbol table entry */
/* Reset the root group entry */
H5G__ent_reset(&root_ent);
@@ -132,15 +124,14 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
/* Build up a simulated root group symbol table entry */
root_oloc = H5G_oloc(f->shared->root_grp);
HDassert(root_oloc);
- root_ent.type = H5G_NOTHING_CACHED;
+ root_ent.type = H5G_NOTHING_CACHED;
root_ent.header = root_oloc->addr;
/* Display root group symbol table entry info */
H5G__ent_debug(&root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
} /* end else */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_debug() */
-
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index a3c53c9..d9b6e39 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Defc.c
* December 13, 2010
- * Neil Fortner <nfortne2@hdfgroup.org>
+ * Neil Fortner
*
* Purpose: External file caching routines - implements a
* cache of external files to minimize the number of
@@ -24,53 +24,51 @@
*-------------------------------------------------------------------------
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* Special values for the "tag" field below */
-#define H5F_EFC_TAG_DEFAULT -1
-#define H5F_EFC_TAG_LOCK -2
-#define H5F_EFC_TAG_CLOSE -3
-#define H5F_EFC_TAG_DONTCLOSE -4
+#define H5F_EFC_TAG_DEFAULT -1
+#define H5F_EFC_TAG_LOCK -2
+#define H5F_EFC_TAG_CLOSE -3
+#define H5F_EFC_TAG_DONTCLOSE -4
/* Structure for each entry in a file's external file cache */
typedef struct H5F_efc_ent_t {
- char *name; /* Name of the file */
- H5F_t *file; /* File object */
- struct H5F_efc_ent_t *LRU_next; /* Next item in LRU list */
- struct H5F_efc_ent_t *LRU_prev; /* Previous item in LRU list */
- unsigned nopen; /* Number of times this file is currently opened by an EFC client */
+ char * name; /* Name of the file */
+ H5F_t * file; /* File object */
+ struct H5F_efc_ent_t *LRU_next; /* Next item in LRU list */
+ struct H5F_efc_ent_t *LRU_prev; /* Previous item in LRU list */
+ unsigned nopen; /* Number of times this file is currently opened by an EFC client */
} H5F_efc_ent_t;
/* Structure for a shared file struct's external file cache */
struct H5F_efc_t {
- H5SL_t *slist; /* Skip list of cached external files */
- H5F_efc_ent_t *LRU_head; /* Head of LRU list. This is the least recently used file */
- H5F_efc_ent_t *LRU_tail; /* Tail of LRU list. This is the most recently used file */
- unsigned nfiles; /* Size of the external file cache */
- unsigned max_nfiles; /* Maximum size of the external file cache */
- unsigned nrefs; /* Number of times this file appears in another file's EFC */
- int tag; /* Temporary variable used by H5F_efc_try_close() */
- H5F_file_t *tmp_next; /* Next file in temporary list used by H5F_efc_try_close() */
+ H5SL_t * slist; /* Skip list of cached external files */
+ H5F_efc_ent_t *LRU_head; /* Head of LRU list. This is the least recently used file */
+ H5F_efc_ent_t *LRU_tail; /* Tail of LRU list. This is the most recently used file */
+ unsigned nfiles; /* Size of the external file cache */
+ unsigned max_nfiles; /* Maximum size of the external file cache */
+ unsigned nrefs; /* Number of times this file appears in another file's EFC */
+ int tag; /* Temporary variable used by H5F_efc_try_close() */
+ H5F_file_t * tmp_next; /* Next file in temporary list used by H5F_efc_try_close() */
};
/* Private prototypes */
static herr_t H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent);
-static void H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail);
-static void H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail);
+static void H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail);
+static void H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail);
/* Free lists */
H5FL_DEFINE_STATIC(H5F_efc_ent_t);
H5FL_DEFINE_STATIC(H5F_efc_t);
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_create
*
@@ -89,8 +87,8 @@ H5FL_DEFINE_STATIC(H5F_efc_t);
H5F_efc_t *
H5F_efc_create(unsigned max_nfiles)
{
- H5F_efc_t *efc = NULL; /* EFC object */
- H5F_efc_t *ret_value; /* Return value */
+ H5F_efc_t *efc = NULL; /* EFC object */
+ H5F_efc_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -98,7 +96,7 @@ H5F_efc_create(unsigned max_nfiles)
HDassert(max_nfiles > 0);
/* Allocate EFC struct */
- if(NULL == (efc = H5FL_CALLOC(H5F_efc_t)))
+ if (NULL == (efc = H5FL_CALLOC(H5F_efc_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Initialize maximum number of files */
@@ -111,13 +109,12 @@ H5F_efc_create(unsigned max_nfiles)
ret_value = efc;
done:
- if(ret_value == NULL && efc)
+ if (ret_value == NULL && efc)
efc = H5FL_FREE(H5F_efc_t, efc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_efc_create() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_open
*
@@ -138,13 +135,12 @@ done:
*-------------------------------------------------------------------------
*/
H5F_t *
-H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
- hid_t fapl_id, hid_t dxpl_id)
+H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id)
{
- H5F_efc_t *efc = NULL; /* External file cache for parent file */
- H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
- hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
- H5F_t *ret_value = NULL; /* Return value */
+ H5F_efc_t * efc = NULL; /* External file cache for parent file */
+ H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
+ hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
+ H5F_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -159,9 +155,8 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
/* Check if the EFC exists. If it does not, just call H5F_open(). We
* support this so clients do not have to make 2 different calls depending
* on the state of the efc. */
- if(!efc) {
- if(NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id,
- dxpl_id)))
+ if (!efc) {
+ if (NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file")
/* Increment the number of open objects to prevent the file from being
@@ -175,31 +170,31 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
/* Search the skip list for name if the skip list exists, create the skip
* list otherwise */
- if(efc->slist) {
- if(efc->nfiles > 0)
+ if (efc->slist) {
+ if (efc->nfiles > 0)
ent = (H5F_efc_ent_t *)H5SL_search(efc->slist, name);
} /* end if */
else {
HDassert(efc->nfiles == 0);
- if(NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR, NULL)))
+ if (NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create skip list")
} /* end else */
/* If we found the file update the LRU list and return the cached file,
* otherwise open the file and cache it */
- if(ent) {
+ if (ent) {
HDassert(efc->LRU_head);
HDassert(efc->LRU_tail);
/* Move ent to the head of the LRU list, if it is not already there */
- if(ent->LRU_prev) {
+ if (ent->LRU_prev) {
HDassert(efc->LRU_head != ent);
/* Remove from current position. Note that once we touch the LRU
* list we cannot revert to the previous state. Make sure there can
* be no errors between when we first touch the LRU list and when
* the cache is in a consistent state! */
- if(ent->LRU_next)
+ if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
HDassert(efc->LRU_tail == ent);
@@ -208,10 +203,10 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
ent->LRU_prev->LRU_next = ent->LRU_next;
/* Add to head of LRU list */
- ent->LRU_next = efc->LRU_head;
+ ent->LRU_next = efc->LRU_head;
ent->LRU_next->LRU_prev = ent;
- ent->LRU_prev = NULL;
- efc->LRU_head = ent;
+ ent->LRU_prev = NULL;
+ efc->LRU_head = ent;
} /* end if */
/* Mark the file as open */
@@ -219,22 +214,22 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
} /* end if */
else {
/* Check if we need to evict something */
- if(efc->nfiles == efc->max_nfiles) {
+ if (efc->nfiles == efc->max_nfiles) {
/* Search for an unopened file from the tail */
- for(ent = efc->LRU_tail; ent && ent->nopen; ent = ent->LRU_prev);
+ for (ent = efc->LRU_tail; ent && ent->nopen; ent = ent->LRU_prev)
+ ;
/* Evict the file if found, otherwise just open the target file and
* do not add it to cache */
- if(ent) {
- if(H5F_efc_remove_ent(efc, ent) < 0)
+ if (ent) {
+ if (H5F_efc_remove_ent(efc, ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, NULL, "can't remove entry from external file cache")
/* Do not free ent, we will recycle it below */
} /* end if */
else {
/* Cannot cache file, just open file and return */
- if(NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id,
- dxpl_id)))
+ if (NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file")
/* Increment the number of open objects to prevent the file from
@@ -244,19 +239,18 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
HGOTO_DONE(ret_value)
} /* end else */
- } /* end if */
+ } /* end if */
else
/* Allocate new entry */
- if(NULL == (ent = H5FL_MALLOC(H5F_efc_ent_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (ent = H5FL_MALLOC(H5F_efc_ent_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Build new entry */
- if(NULL == (ent->name = H5MM_strdup(name)))
+ if (NULL == (ent->name = H5MM_strdup(name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Open the file */
- if(NULL == (ent->file = H5F_open(name, flags, fcpl_id, fapl_id,
- dxpl_id)))
+ if (NULL == (ent->file = H5F_open(name, flags, fcpl_id, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file")
open_file = TRUE;
@@ -266,16 +260,16 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
/* Add the file to the cache */
/* Skip list */
- if(H5SL_insert(efc->slist, ent, ent->name) < 0)
+ if (H5SL_insert(efc->slist, ent, ent->name) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, NULL, "can't insert entry into skip list")
/* Add to head of LRU list and update tail if necessary */
ent->LRU_next = efc->LRU_head;
- if(ent->LRU_next)
+ if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent;
ent->LRU_prev = NULL;
efc->LRU_head = ent;
- if(!efc->LRU_tail) {
+ if (!efc->LRU_tail) {
HDassert(!ent->LRU_next);
efc->LRU_tail = ent;
} /* end if */
@@ -285,7 +279,7 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
/* Update nfiles and nrefs */
efc->nfiles++;
- if(ent->file->shared->efc)
+ if (ent->file->shared->efc)
ent->file->shared->efc->nrefs++;
} /* end else */
@@ -298,21 +292,20 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
ret_value = ent->file;
done:
- if(!ret_value)
- if(ent) {
- if(open_file) {
+ if (!ret_value)
+ if (ent) {
+ if (open_file) {
ent->file->nopen_objs--;
- if(H5F_try_close(ent->file) < 0)
+ if (H5F_try_close(ent->file) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "can't close external file")
} /* end if */
ent->name = (char *)H5MM_xfree(ent->name);
- ent = H5FL_FREE(H5F_efc_ent_t, ent);
+ ent = H5FL_FREE(H5F_efc_ent_t, ent);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_efc_open() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_close
*
@@ -331,9 +324,9 @@ done:
herr_t
H5F_efc_close(H5F_t *parent, H5F_t *file)
{
- H5F_efc_t *efc = NULL; /* External file cache for parent file */
- H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_efc_t * efc = NULL; /* External file cache for parent file */
+ H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -349,9 +342,9 @@ H5F_efc_close(H5F_t *parent, H5F_t *file)
/* Check if the EFC exists. If it does not, just call H5F_try_close(). We
* support this so clients do not have to make 2 different calls depending
* on the state of the efc. */
- if(!efc) {
+ if (!efc) {
file->nopen_objs--;
- if(H5F_try_close(file) < 0)
+ if (H5F_try_close(file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file")
HGOTO_DONE(SUCCEED)
@@ -362,10 +355,11 @@ H5F_efc_close(H5F_t *parent, H5F_t *file)
* the head. In the unlikely case that the file is not found, just call
* H5F_try_close(). This could happen if the EFC was full of open files
* when the file was opened. */
- for(ent = efc->LRU_head; ent && ent->file != file; ent = ent->LRU_next);
- if(!ent) {
+ for (ent = efc->LRU_head; ent && ent->file != file; ent = ent->LRU_next)
+ ;
+ if (!ent) {
file->nopen_objs--;
- if(H5F_try_close(file) < 0)
+ if (H5F_try_close(file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file")
} /* end if */
else
@@ -376,7 +370,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_efc_close() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_max_nfiles
*
@@ -401,7 +394,6 @@ H5F_efc_max_nfiles(H5F_efc_t *efc)
FUNC_LEAVE_NOAPI(efc->max_nfiles)
} /* end H5F_efc_max_nfiles */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_release
*
@@ -420,9 +412,9 @@ H5F_efc_max_nfiles(H5F_efc_t *efc)
herr_t
H5F_efc_release(H5F_efc_t *efc)
{
- H5F_efc_ent_t *ent = NULL; /* EFC entry */
- H5F_efc_ent_t *prev_ent = NULL; /* Previous EFC entry */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_efc_ent_t *ent = NULL; /* EFC entry */
+ H5F_efc_ent_t *prev_ent = NULL; /* Previous EFC entry */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -434,21 +426,20 @@ H5F_efc_release(H5F_efc_t *efc)
* would require a cycle, a cycle would necessarily invoke
* H5F_efc_try_close(), and that function checks the status of the lock
* before calling this one. */
- HDassert((efc->tag == H5F_EFC_TAG_DEFAULT)
- || (efc->tag == H5F_EFC_TAG_CLOSE));
+ HDassert((efc->tag == H5F_EFC_TAG_DEFAULT) || (efc->tag == H5F_EFC_TAG_CLOSE));
efc->tag = H5F_EFC_TAG_LOCK;
/* Walk down the LRU list, releasing any files that are not opened by an EFC
* client */
ent = efc->LRU_head;
- while(ent)
- if(!ent->nopen) {
- if(H5F_efc_remove_ent(efc, ent) < 0)
+ while (ent)
+ if (!ent->nopen) {
+ if (H5F_efc_remove_ent(efc, ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "can't remove entry from external file cache")
/* Free the entry and move to next entry in LRU list */
prev_ent = ent;
- ent = ent->LRU_next;
+ ent = ent->LRU_next;
prev_ent = H5FL_FREE(H5F_efc_ent_t, prev_ent);
} /* end if */
else
@@ -463,7 +454,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5F_efc_release() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_destroy
*
@@ -482,20 +472,20 @@ done:
herr_t
H5F_efc_destroy(H5F_efc_t *efc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(efc);
- if(efc->nfiles > 0) {
+ if (efc->nfiles > 0) {
/* Release (clear) the efc */
- if(H5F_efc_release(efc) < 0)
+ if (H5F_efc_release(efc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
/* If there are still cached files, return an error */
- if(efc->nfiles > 0)
+ if (efc->nfiles > 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't destroy EFC after incomplete release")
} /* end if */
@@ -504,8 +494,8 @@ H5F_efc_destroy(H5F_efc_t *efc)
HDassert(efc->LRU_tail == NULL);
/* Close skip list */
- if(efc->slist)
- if(H5SL_close(efc->slist) < 0)
+ if (efc->slist)
+ if (H5SL_close(efc->slist) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close skip list")
/* Free EFC object */
@@ -515,7 +505,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5F_efc_destroy() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_remove_ent
*
@@ -533,7 +522,7 @@ done:
static herr_t
H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -543,17 +532,17 @@ H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
HDassert(ent);
/* Remove from skip list */
- if(ent != H5SL_remove(efc->slist, ent->name))
+ if (ent != H5SL_remove(efc->slist, ent->name))
HGOTO_ERROR(H5E_FILE, H5E_CANTDELETE, FAIL, "can't delete entry from skip list")
/* Remove from LRU list */
- if(ent->LRU_next)
+ if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
HDassert(efc->LRU_tail == ent);
efc->LRU_tail = ent->LRU_prev;
} /* end else */
- if(ent->LRU_prev)
+ if (ent->LRU_prev)
ent->LRU_prev->LRU_next = ent->LRU_next;
else {
HDassert(efc->LRU_head == ent);
@@ -562,7 +551,7 @@ H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
/* Update nfiles and nrefs */
efc->nfiles--;
- if(ent->file->shared->efc)
+ if (ent->file->shared->efc)
ent->file->shared->efc->nrefs--;
/* Free the name */
@@ -573,7 +562,7 @@ H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
* However we must still manipulate the nopen_objs field to prevent the file
* from being closed out from under us. */
ent->file->nopen_objs--;
- if(H5F_try_close(ent->file) < 0)
+ if (H5F_try_close(ent->file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file")
ent->file = NULL;
@@ -581,7 +570,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_efc_remove_ent() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_try_close_tag1
*
@@ -599,8 +587,8 @@ done:
static void
H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
{
- H5F_efc_ent_t *ent = NULL; /* EFC entry */
- H5F_file_t *esf; /* Convenience pointer to ent->file->shared */
+ H5F_efc_ent_t *ent = NULL; /* EFC entry */
+ H5F_file_t * esf; /* Convenience pointer to ent->file->shared */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -613,17 +601,17 @@ H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
HDassert(*tail);
/* Recurse into this file's cached files */
- for(ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
+ for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
esf = ent->file->shared;
- if(esf->efc) {
+ if (esf->efc) {
/* If tag were 0, that would mean there are more actual references
* than are counted by nrefs */
HDassert(esf->efc->tag != 0);
/* If tag has been set, we have already visited this file so just
* decrement tag and continue */
- if(esf->efc->tag > 0)
+ if (esf->efc->tag > 0)
esf->efc->tag--;
/* If there are references that are not from an EFC, it will never
* be possible to close the file. Just continue. Also continue if
@@ -631,8 +619,8 @@ H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
* that the reference counts will never match for the root file, but
* that's ok because the root file will always have a tag and enter
* the branch above. */
- else if((esf->nrefs == esf->efc->nrefs)
- && (esf->efc->tag != H5F_EFC_TAG_LOCK) && !(ent->nopen)) {
+ else if ((esf->nrefs == esf->efc->nrefs) && (esf->efc->tag != H5F_EFC_TAG_LOCK) &&
+ !(ent->nopen)) {
/* If we get here, this file's "tmp_next" pointer must be NULL
*/
HDassert(esf->efc->tmp_next == NULL);
@@ -640,22 +628,21 @@ H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
/* If nrefs > 1, Add this file to the list of files with nrefs >
* 1 and initialize tag to the number of references (except this
* one) */
- if(esf->nrefs > 1) {
+ if (esf->nrefs > 1) {
(*tail)->efc->tmp_next = esf;
- *tail = esf;
- esf->efc->tag = (int)esf->nrefs - 1;
+ *tail = esf;
+ esf->efc->tag = (int)esf->nrefs - 1;
} /* end if */
/* Recurse into the entry */
H5F_efc_try_close_tag1(ent->file->shared, tail);
} /* end if */
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_efc_try_close_tag1() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_try_close_tag2
*
@@ -673,8 +660,8 @@ H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
static void
H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail)
{
- H5F_efc_ent_t *ent = NULL; /* EFC entry */
- H5F_file_t *esf; /* Convenience pointer to ent->file->shared */
+ H5F_efc_ent_t *ent = NULL; /* EFC entry */
+ H5F_file_t * esf; /* Convenience pointer to ent->file->shared */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -683,7 +670,7 @@ H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail)
HDassert(sf->efc);
/* Recurse into this file's cached files */
- for(ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
+ for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
esf = ent->file->shared;
/* Only recurse if the file is tagged CLOSE or DEFAULT. If it is tagged
@@ -694,39 +681,36 @@ H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail)
* make sure we do not go off into somewhere cb1 didn't touch. The
* root file should never be tagged DEFAULT here, so the reference check
* is still appropriate. */
- if((esf->efc) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE)
- || ((esf->efc->tag == H5F_EFC_TAG_DEFAULT)
- && (esf->nrefs == esf->efc->nrefs) && !(ent->nopen)))) {
+ if ((esf->efc) &&
+ ((esf->efc->tag == H5F_EFC_TAG_CLOSE) ||
+ ((esf->efc->tag == H5F_EFC_TAG_DEFAULT) && (esf->nrefs == esf->efc->nrefs) && !(ent->nopen)))) {
/* tag should always be CLOSE is nrefs > 1 or DEFAULT if nrefs == 1
* here */
- HDassert(((esf->nrefs > 1)
- && ((esf->efc->tag == H5F_EFC_TAG_CLOSE)))
- || ((esf->nrefs == 1)
- && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
+ HDassert(((esf->nrefs > 1) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE))) ||
+ ((esf->nrefs == 1) && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
/* If tag is set to DONTCLOSE, we have already visited this file
* *or* it will be the start point of another iteration so just
* continue */
- if(esf->efc->tag != H5F_EFC_TAG_DONTCLOSE) {
+ if (esf->efc->tag != H5F_EFC_TAG_DONTCLOSE) {
/* If tag is CLOSE, set to DONTCLOSE and add to the list of
* uncloseable files. */
- if(esf->efc->tag == H5F_EFC_TAG_CLOSE) {
- esf->efc->tag = H5F_EFC_TAG_DONTCLOSE;
- esf->efc->tmp_next = NULL;
+ if (esf->efc->tag == H5F_EFC_TAG_CLOSE) {
+ esf->efc->tag = H5F_EFC_TAG_DONTCLOSE;
+ esf->efc->tmp_next = NULL;
(*tail)->efc->tmp_next = esf;
- *tail = esf;
+ *tail = esf;
} /* end if */
/* Recurse into the entry */
H5F_efc_try_close_tag2(esf, tail);
} /* end if */
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_efc_try_close_tag2() */
-
/*-------------------------------------------------------------------------
* Function: H5F_efc_try_close
*
@@ -780,12 +764,14 @@ H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail)
herr_t
H5F_efc_try_close(H5F_t *f)
{
- H5F_file_t *tail; /* Tail of linked list of found files. Head will be f->shared. */
- H5F_file_t *uncloseable_head = NULL; /* Head of linked list of files found to be uncloseable by the first pass */
- H5F_file_t *uncloseable_tail = NULL; /* Tail of linked list of files found to be uncloseable by the first pass */
- H5F_file_t *sf; /* Temporary file pointer */
- H5F_file_t *next; /* Temporary file pointer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_file_t *tail; /* Tail of linked list of found files. Head will be f->shared. */
+ H5F_file_t *uncloseable_head =
+ NULL; /* Head of linked list of files found to be uncloseable by the first pass */
+ H5F_file_t *uncloseable_tail =
+ NULL; /* Tail of linked list of files found to be uncloseable by the first pass */
+ H5F_file_t *sf; /* Temporary file pointer */
+ H5F_file_t *next; /* Temporary file pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -797,12 +783,12 @@ H5F_efc_try_close(H5F_t *f)
HDassert(f->shared->nrefs > 1);
HDassert(f->shared->efc->tag < 0);
- if(f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
+ if (f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
/* We must have reentered this function, and we should close this file.
* In actuality, we just release the EFC, the recursion should
* eventually reduce this file's reference count to 1 (though possibly
* not from this call to H5F_efc_release()). */
- if(H5F_efc_release(f->shared->efc) < 0)
+ if (H5F_efc_release(f->shared->efc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
/* If we marked the file as closeable, there must be no open files in
@@ -828,15 +814,14 @@ H5F_efc_try_close(H5F_t *f)
* not close/release it */
/* If nfiles is 0, then there is nothing to do. Just return. This may also
* occur on reentry (for example if this file was previously released). */
- if((f->shared->nrefs != f->shared->efc->nrefs + 1)
- || (f->shared->efc->tag == H5F_EFC_TAG_DONTCLOSE)
- || (f->shared->efc->nfiles == 0))
+ if ((f->shared->nrefs != f->shared->efc->nrefs + 1) || (f->shared->efc->tag == H5F_EFC_TAG_DONTCLOSE) ||
+ (f->shared->efc->nfiles == 0))
/* We must have reentered this function, and we should not close this
* file. Just return. */
HGOTO_DONE(SUCCEED)
/* If the file EFC were locked, that should always mean that there exists
- * a reference to this file that is not in an EFC (it may have just been
+ * a reference to this file that is not in an EFC (it may have just been
* removed from an EFC), and should have been caught by the above check */
/* If we get here then we must be beginning a new run. Make sure that the
* temporary variables in f->shared->efc are at the default value */
@@ -858,13 +843,13 @@ H5F_efc_try_close(H5F_t *f)
/* Check if f->shared->efc->tag dropped to 0. If it did not,
* we cannot close anything. Just reset temporary values and return. */
- if(f->shared->efc->tag > 0) {
+ if (f->shared->efc->tag > 0) {
sf = f->shared;
- while(sf) {
- next = sf->efc->tmp_next;
- sf->efc->tag = H5F_EFC_TAG_DEFAULT;
+ while (sf) {
+ next = sf->efc->tmp_next;
+ sf->efc->tag = H5F_EFC_TAG_DEFAULT;
sf->efc->tmp_next = NULL;
- sf = next;
+ sf = next;
} /* end while */
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -872,19 +857,19 @@ H5F_efc_try_close(H5F_t *f)
/* Run through the linked list , separating into two lists, one with tag ==
* 0 and one with tag > 0. Mark them as either H5F_EFC_TAG_CLOSE or
* H5F_EFC_TAG_DONTCLOSE as appropriate. */
- sf = f->shared;
+ sf = f->shared;
tail = NULL;
- while(sf) {
+ while (sf) {
HDassert(sf->efc->tag >= 0);
next = sf->efc->tmp_next;
- if(sf->efc->tag > 0) {
+ if (sf->efc->tag > 0) {
/* Remove from main list */
HDassert(tail);
tail->efc->tmp_next = sf->efc->tmp_next;
- sf->efc->tmp_next = NULL;
+ sf->efc->tmp_next = NULL;
/* Add to uncloseable list */
- if(!uncloseable_head)
+ if (!uncloseable_head)
uncloseable_head = sf;
else
uncloseable_tail->efc->tmp_next = sf;
@@ -895,7 +880,7 @@ H5F_efc_try_close(H5F_t *f)
} /* end if */
else {
sf->efc->tag = H5F_EFC_TAG_CLOSE;
- tail = sf;
+ tail = sf;
} /* end else */
sf = next;
} /* end while */
@@ -908,20 +893,20 @@ H5F_efc_try_close(H5F_t *f)
* so we know when to stop. We do not need to keep track of the closeable
* list any more. */
sf = uncloseable_head;
- if(sf) {
+ if (sf) {
tail = uncloseable_tail;
HDassert(tail);
- while(sf != tail->efc->tmp_next) {
+ while (sf != tail->efc->tmp_next) {
H5F_efc_try_close_tag2(sf, &uncloseable_tail);
sf = sf->efc->tmp_next;
} /* end while */
- } /* end if */
+ } /* end if */
/* If the root file's tag is still H5F_EFC_TAG_CLOSE, release its EFC. This
* should start the recursive release that should close all closeable files.
* Also, see the top of this function. */
- if(f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
- if(H5F_efc_release(f->shared->efc) < 0)
+ if (f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
+ if (H5F_efc_release(f->shared->efc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
/* Make sure the file's reference count is now 1 and will be closed by
@@ -931,18 +916,17 @@ H5F_efc_try_close(H5F_t *f)
/* Clean up uncloseable files (reset tag and tmp_next). All closeable files
* should have been closed, and therefore do not need to be cleaned up. */
- if(uncloseable_head) {
+ if (uncloseable_head) {
sf = uncloseable_head;
- while(sf) {
+ while (sf) {
next = sf->efc->tmp_next;
HDassert(sf->efc->tag == H5F_EFC_TAG_DONTCLOSE);
- sf->efc->tag = H5F_EFC_TAG_DEFAULT;
+ sf->efc->tag = H5F_EFC_TAG_DEFAULT;
sf->efc->tmp_next = NULL;
- sf = next;
+ sf = next;
} /* end while */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_efc_try_close() */
-
diff --git a/src/H5Ffake.c b/src/H5Ffake.c
index 2d25ba1..26b1fff 100644
--- a/src/H5Ffake.c
+++ b/src/H5Ffake.c
@@ -6,25 +6,23 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F_init_fake_interface
-
+#define H5_INTERFACE_INIT_FUNC H5F_init_fake_interface
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
/* PRIVATE PROTOTYPES */
-
/*--------------------------------------------------------------------------
NAME
H5F_init_fake_interface -- Initialize interface-specific information
@@ -46,7 +44,6 @@ H5F_init_fake_interface(void)
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_fake_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5F_fake_alloc
*
@@ -59,7 +56,6 @@ H5F_init_fake_interface(void)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 2, 2006
*
*-------------------------------------------------------------------------
@@ -67,19 +63,19 @@ H5F_init_fake_interface(void)
H5F_t *
H5F_fake_alloc(uint8_t sizeof_size)
{
- H5F_t *f = NULL; /* Pointer to fake file struct */
- H5F_t *ret_value; /* Return value */
+ H5F_t *f = NULL; /* Pointer to fake file struct */
+ H5F_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Allocate faked file struct */
- if(NULL == (f = H5FL_CALLOC(H5F_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
- if(NULL == (f->shared = H5FL_CALLOC(H5F_file_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
+ if (NULL == (f = H5FL_CALLOC(H5F_t)))
+ HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
+ if (NULL == (f->shared = H5FL_CALLOC(H5F_file_t)))
+ HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
/* Only set fields necessary for clients */
- if(sizeof_size == 0)
+ if (sizeof_size == 0)
f->shared->sizeof_size = H5F_OBJ_SIZE_SIZE;
else
f->shared->sizeof_size = sizeof_size;
@@ -88,13 +84,12 @@ H5F_fake_alloc(uint8_t sizeof_size)
ret_value = f;
done:
- if(!ret_value)
+ if (!ret_value)
H5F_fake_free(f);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_fake_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5F_fake_free
*
@@ -104,7 +99,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 2, 2006
*
*-------------------------------------------------------------------------
@@ -115,13 +109,12 @@ H5F_fake_free(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free faked file struct */
- if(f) {
+ if (f) {
/* Destroy shared file struct */
- if(f->shared)
+ if (f->shared)
f->shared = H5FL_FREE(H5F_file_t, f->shared);
f = H5FL_FREE(H5F_t, f);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F_fake_free() */
-
diff --git a/src/H5Fint.c b/src/H5Fint.c
index a92fa46..83f672f 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,42 +15,41 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5F_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Aprivate.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-#include "H5Tprivate.h" /* Datatypes */
+#include "H5private.h" /* Generic Functions */
+#include "H5Aprivate.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5Tprivate.h" /* Datatypes */
/* Predefined file drivers */
-#include "H5FDcore.h" /*temporary in-memory files */
-#include "H5FDfamily.h" /*family of files */
-#include "H5FDlog.h" /* sec2 driver with logging, for debugging */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5FDmulti.h" /*multiple files partitioned by mem usage */
-#include "H5FDsec2.h" /*Posix unbuffered I/O */
-#include "H5FDstdio.h" /* Standard C buffered I/O */
+#include "H5FDcore.h" /* temporary in-memory files */
+#include "H5FDfamily.h" /* family of files */
+#include "H5FDlog.h" /* sec2 driver with logging, for debugging */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5FDmulti.h" /* multiple files partitioned by mem usage */
+#include "H5FDsec2.h" /* Posix unbuffered I/O */
+#include "H5FDstdio.h" /* Standard C buffered I/O */
#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
+#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
-#include "H5FDdirect.h" /*Linux direct I/O */
+#include "H5FDdirect.h" /* Linux direct I/O */
/****************/
/* Local Macros */
@@ -62,45 +61,41 @@
/* Struct only used by functions H5F_get_objects and H5F_get_objects_cb */
typedef struct H5F_olist_t {
- H5I_type_t obj_type; /* Type of object to look for */
- hid_t *obj_id_list; /* Pointer to the list of open IDs to return */
- size_t *obj_id_count; /* Number of open IDs */
+ H5I_type_t obj_type; /* Type of object to look for */
+ hid_t * obj_id_list; /* Pointer to the list of open IDs to return */
+ size_t * obj_id_count; /* Number of open IDs */
struct {
- hbool_t local; /* Set flag for "local" file searches */
+ hbool_t local; /* Set flag for "local" file searches */
union {
- H5F_file_t *shared; /* Pointer to shared file to look inside */
- const H5F_t *file; /* Pointer to file to look inside */
+ H5F_file_t * shared; /* Pointer to shared file to look inside */
+ const H5F_t *file; /* Pointer to file to look inside */
} ptr;
} file_info;
- size_t list_index; /* Current index in open ID array */
- size_t max_nobjs; /* Maximum # of IDs to put into array */
+ size_t list_index; /* Current index in open ID array */
+ size_t max_nobjs; /* Maximum # of IDs to put into array */
} H5F_olist_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static int H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key);
-static herr_t H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl,
- const char *name, char ** /*out*/ actual_name);/* Declare a free list to manage the H5F_t struct */
-
+static herr_t
+H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *name,
+ char ** /*out*/ actual_name); /* Declare a free list to manage the H5F_t struct */
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -111,16 +106,15 @@ H5FL_DEFINE(H5F_t);
/* Declare a free list to manage the H5F_file_t struct */
H5FL_DEFINE(H5F_file_t);
-
/*-------------------------------------------------------------------------
- * Function: H5F_init_interface
+ * Function: H5F_init_interface
*
- * Purpose: Initialize interface-specific information.
+ * Purpose: Initialize interface-specific information.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, November 20, 1998
*
*-------------------------------------------------------------------------
@@ -128,134 +122,125 @@ H5FL_DEFINE(H5F_file_t);
static herr_t
H5F_init_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_access_plist
+ * Function: H5F_get_access_plist
*
- * Purpose: Returns a copy of the file access property list of the
- * specified file.
+ * Purpose: Returns a copy of the file access property list of the
+ * specified file.
*
* NOTE: Make sure that, if you are going to overwrite
* information in the copied property list that was
* previously opened and assigned to the property list, then
* you must close it before overwriting the values.
*
- * Return: Success: Object ID for a copy of the file access
- * property list.
- *
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Wednesday, May 25, 2005
- *
- * Modifications:
- *
+ * Return: Success: Object ID for a copy of the file access
+ * property list.
+ * Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
hid_t
H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
{
- H5P_genplist_t *new_plist; /* New property list */
- H5P_genplist_t *old_plist; /* Old property list */
- void *driver_info=NULL;
- unsigned efc_size = 0;
- hid_t ret_value = SUCCEED;
+ H5P_genplist_t *new_plist; /* New property list */
+ H5P_genplist_t *old_plist; /* Old property list */
+ void * driver_info = NULL;
+ unsigned efc_size = 0;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check args */
HDassert(f);
/* Make a copy of the default file access property list */
- if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- if((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(ret_value)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
+ if ((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, H5I_INVALID_HID, "can't copy file access property list")
+ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(ret_value)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
/* Copy properties of the file access property list */
- if(H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set initial metadata cache resize config.")
- if(H5P_set(new_plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots")
- if(H5P_set(new_plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size")
- if(H5P_set(new_plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks")
- if(H5P_set(new_plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment threshold")
- if(H5P_set(new_plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment")
- if(H5P_set(new_plist, H5F_ACS_GARBG_COLCT_REF_NAME, &(f->shared->gc_ref)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference")
- if(H5P_set(new_plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache size")
- if(H5P_set(new_plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't sieve buffer size")
- if(H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' cache size")
- if(H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag")
- if(f->shared->efc)
+ if (H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID,
+ "can't set initial metadata cache resize config.")
+ if (H5P_set(new_plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache number of slots")
+ if (H5P_set(new_plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache byte size")
+ if (H5P_set(new_plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set preempt read chunks")
+ if (H5P_set(new_plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment threshold")
+ if (H5P_set(new_plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment")
+ if (H5P_set(new_plist, H5F_ACS_GARBG_COLCT_REF_NAME, &(f->shared->gc_ref)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set garbage collect reference")
+ if (H5P_set(new_plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set metadata cache size")
+ if (H5P_set(new_plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't sieve buffer size")
+ if (H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set 'small data' cache size")
+ if (H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set 'latest format' flag")
+ if (f->shared->efc)
efc_size = H5F_efc_max_nfiles(f->shared->efc);
- if(H5P_set(new_plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set elink file cache size")
+ if (H5P_set(new_plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set elink file cache size")
/*
* Since we're resetting the driver ID and info, close them if they
* exist in this new property list.
*/
- if(H5P_facc_close(ret_value, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't free the old driver information")
+ if (H5P_facc_close(ret_value, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, H5I_INVALID_HID, "can't free the old driver information")
/* Increment the reference count on the driver ID and insert it into the property list */
- if(H5I_inc_ref(f->shared->lf->driver_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver")
- if(H5P_set(new_plist, H5F_ACS_FILE_DRV_ID_NAME, &(f->shared->lf->driver_id)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file driver ID")
+ if (H5I_inc_ref(f->shared->lf->driver_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFL driver")
+ if (H5P_set(new_plist, H5F_ACS_FILE_DRV_ID_NAME, &(f->shared->lf->driver_id)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file driver ID")
/* Set the driver "info" in the property list */
driver_info = H5FD_fapl_get(f->shared->lf);
- if(driver_info != NULL && H5P_set(new_plist, H5F_ACS_FILE_DRV_INFO_NAME, &driver_info) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file driver info")
+ if (driver_info != NULL && H5P_set(new_plist, H5F_ACS_FILE_DRV_INFO_NAME, &driver_info) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file driver info")
/* Set the file close degree appropriately */
- if(f->shared->fc_degree == H5F_CLOSE_DEFAULT && H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->lf->cls->fc_degree)) < 0) {
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree")
- } else if(f->shared->fc_degree != H5F_CLOSE_DEFAULT && H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->fc_degree)) < 0) {
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree")
+ if (f->shared->fc_degree == H5F_CLOSE_DEFAULT &&
+ H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->lf->cls->fc_degree)) < 0) {
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree")
+ }
+ else if (f->shared->fc_degree != H5F_CLOSE_DEFAULT &&
+ H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->fc_degree)) < 0) {
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree")
}
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_access_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_obj_count
+ * Function: H5F_get_obj_count
*
- * Purpose: Private function return the number of opened object IDs
- * (files, datasets, groups, datatypes) in the same file.
+ * Purpose: Private function return the number of opened object IDs
+ * (files, datasets, groups, datatypes) in the same file.
*
* Return: SUCCEED on success, FAIL on failure.
- *
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
- *
*-------------------------------------------------------------------------
*/
herr_t
H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -263,30 +248,26 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_i
HDassert(obj_id_count_ptr);
/* Perform the query */
- if((ret_value = H5F_get_objects(f, types, 0, NULL, app_ref, obj_id_count_ptr)) < 0)
+ if ((ret_value = H5F_get_objects(f, types, 0, NULL, app_ref, obj_id_count_ptr)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_objects failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_obj_count() */
-
/*-------------------------------------------------------------------------
* Function: H5F_get_obj_ids
*
* Purpose: Private function to return a list of opened object IDs.
*
* Return: Non-negative on success; can't fail.
- *
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, hbool_t app_ref, size_t *obj_id_count_ptr)
+H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, hbool_t app_ref,
+ size_t *obj_id_count_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -294,33 +275,30 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list
HDassert(obj_id_count_ptr);
/* Perform the query */
- if((ret_value = H5F_get_objects(f, types, max_objs, oid_list, app_ref, obj_id_count_ptr)) < 0)
+ if ((ret_value = H5F_get_objects(f, types, max_objs, oid_list, app_ref, obj_id_count_ptr)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_objects failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_obj_ids() */
-
/*---------------------------------------------------------------------------
- * Function: H5F_get_objects
- *
- * Purpose: This function is called by H5F_get_obj_count or
- * H5F_get_obj_ids to get number of object IDs and/or a
- * list of opened object IDs (in return value).
- * Return: Non-negative on success; Can't fail.
+ * Function: H5F_get_objects
*
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
+ * Purpose: This function is called by H5F_get_obj_count or
+ * H5F_get_obj_ids to get number of object IDs and/or a
+ * list of opened object IDs (in return value).
*
+ * Return: SUCCEED/FAIL
*---------------------------------------------------------------------------
*/
herr_t
-H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr)
+H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_list, hbool_t app_ref,
+ size_t *obj_id_count_ptr)
{
- size_t obj_id_count=0; /* Number of open IDs */
- H5F_olist_t olist; /* Structure to hold search results */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t obj_id_count = 0; /* Number of open IDs */
+ H5F_olist_t olist; /* Structure to hold search results */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -328,26 +306,26 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_
HDassert(obj_id_count_ptr);
/* Set up search information */
- olist.obj_id_list = (max_nobjs==0 ? NULL : obj_id_list);
+ olist.obj_id_list = (max_nobjs == 0 ? NULL : obj_id_list);
olist.obj_id_count = &obj_id_count;
olist.list_index = 0;
- olist.max_nobjs = max_nobjs;
+ olist.max_nobjs = max_nobjs;
/* Determine if we are searching for local or global objects */
- if(types & H5F_OBJ_LOCAL) {
- olist.file_info.local = TRUE;
+ if (types & H5F_OBJ_LOCAL) {
+ olist.file_info.local = TRUE;
olist.file_info.ptr.file = f;
} /* end if */
else {
- olist.file_info.local = FALSE;
+ olist.file_info.local = FALSE;
olist.file_info.ptr.shared = f ? f->shared : NULL;
} /* end else */
/* Iterate through file IDs to count the number, and put their
* IDs on the object list. */
- if(types & H5F_OBJ_FILE) {
+ if (types & H5F_OBJ_FILE) {
olist.obj_type = H5I_FILE;
- if(H5I_iterate(H5I_FILE, H5F_get_objects_cb, &olist, app_ref) < 0)
+ if (H5I_iterate(H5I_FILE, H5F_get_objects_cb, &olist, app_ref) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(1)")
} /* end if */
@@ -355,50 +333,50 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_
* or the caller wants to get the list of IDs and the list isn't full,
* search through dataset IDs to count number of datasets, and put their
* IDs on the object list */
- if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) {
+ if (!olist.max_nobjs || (olist.max_nobjs && olist.list_index < olist.max_nobjs)) {
if (types & H5F_OBJ_DATASET) {
olist.obj_type = H5I_DATASET;
- if(H5I_iterate(H5I_DATASET, H5F_get_objects_cb, &olist, app_ref) < 0)
+ if (H5I_iterate(H5I_DATASET, H5F_get_objects_cb, &olist, app_ref) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(2)")
} /* end if */
- }
+ }
/* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero),
* or the caller wants to get the list of IDs and the list isn't full,
* search through group IDs to count number of groups, and put their
* IDs on the object list */
- if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) {
- if(types & H5F_OBJ_GROUP) {
+ if (!olist.max_nobjs || (olist.max_nobjs && olist.list_index < olist.max_nobjs)) {
+ if (types & H5F_OBJ_GROUP) {
olist.obj_type = H5I_GROUP;
- if(H5I_iterate(H5I_GROUP, H5F_get_objects_cb, &olist, app_ref) < 0)
+ if (H5I_iterate(H5I_GROUP, H5F_get_objects_cb, &olist, app_ref) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(3)")
- } /* end if */
- }
+ }
+ }
/* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero),
* or the caller wants to get the list of IDs and the list isn't full,
* search through datatype IDs to count number of named datatypes, and put their
* IDs on the object list */
- if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) {
- if(types & H5F_OBJ_DATATYPE) {
+ if (!olist.max_nobjs || (olist.max_nobjs && olist.list_index < olist.max_nobjs)) {
+ if (types & H5F_OBJ_DATATYPE) {
olist.obj_type = H5I_DATATYPE;
- if(H5I_iterate(H5I_DATATYPE, H5F_get_objects_cb, &olist, app_ref) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5F_get_objects_cb, &olist, app_ref) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(4)")
} /* end if */
- }
+ }
/* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero),
* or the caller wants to get the list of IDs and the list isn't full,
* search through attribute IDs to count number of attributes, and put their
* IDs on the object list */
- if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) {
- if(types & H5F_OBJ_ATTR) {
+ if (!olist.max_nobjs || (olist.max_nobjs && olist.list_index < olist.max_nobjs)) {
+ if (types & H5F_OBJ_ATTR) {
olist.obj_type = H5I_ATTR;
- if(H5I_iterate(H5I_ATTR, H5F_get_objects_cb, &olist, app_ref) < 0)
+ if (H5I_iterate(H5I_ATTR, H5F_get_objects_cb, &olist, app_ref) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(5)")
} /* end if */
}
-
+
/* Set the number of objects currently open */
*obj_id_count_ptr = obj_id_count;
@@ -406,28 +384,23 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_objects() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_objects_cb
+ * Function: H5F_get_objects_cb
*
- * Purpose: H5F_get_objects' callback function. It verifies if an
- * object is in the file, and either count it or put its ID
- * on the list.
+ * Purpose: H5F_get_objects' callback function. It verifies if an
+ * object is in the file, and either count it or put its ID
+ * on the list.
*
* Return: H5_ITER_STOP if the array of object IDs is filled up.
* H5_ITER_CONT otherwise.
- *
- * Programmer: Raymond Lu
- * Wednesday, Dec 5, 2001
- *
*-------------------------------------------------------------------------
*/
static int
H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
{
- H5F_olist_t *olist = (H5F_olist_t *)key; /* Alias for search info */
- int ret_value = H5_ITER_CONT; /* Return value */
- hbool_t add_obj = FALSE;
+ H5F_olist_t *olist = (H5F_olist_t *)key; /* Alias for search info */
+ hbool_t add_obj = FALSE;
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -435,251 +408,240 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
HDassert(olist);
/* Count file IDs */
- if(olist->obj_type == H5I_FILE) {
- if((olist->file_info.local &&
- (!olist->file_info.ptr.file || (olist->file_info.ptr.file && (H5F_t*)obj_ptr == olist->file_info.ptr.file) ))
- || (!olist->file_info.local &&
- ( !olist->file_info.ptr.shared || (olist->file_info.ptr.shared && ((H5F_t*)obj_ptr)->shared == olist->file_info.ptr.shared) ))) {
+ if (olist->obj_type == H5I_FILE) {
+ if ((olist->file_info.local &&
+ (!olist->file_info.ptr.file ||
+ (olist->file_info.ptr.file && (H5F_t *)obj_ptr == olist->file_info.ptr.file))) ||
+ (!olist->file_info.local &&
+ (!olist->file_info.ptr.shared ||
+ (olist->file_info.ptr.shared && ((H5F_t *)obj_ptr)->shared == olist->file_info.ptr.shared)))) {
add_obj = TRUE;
- }
- } /* end if */
- else { /* either count opened object IDs or put the IDs on the list */
- H5O_loc_t *oloc; /* Group entry info for object */
-
- switch(olist->obj_type) {
- case H5I_ATTR:
- oloc = H5A_oloc((H5A_t *)obj_ptr);
+ } /* end if */
+ } /* end if */
+ else { /* Either count opened object IDs or put the IDs on the list */
+ H5O_loc_t *oloc; /* Group entry info for object */
+
+ switch (olist->obj_type) {
+ case H5I_ATTR:
+ oloc = H5A_oloc((H5A_t *)obj_ptr);
break;
- case H5I_GROUP:
- oloc = H5G_oloc((H5G_t *)obj_ptr);
+ case H5I_GROUP:
+ oloc = H5G_oloc((H5G_t *)obj_ptr);
break;
- case H5I_DATASET:
- oloc = H5D_oloc((H5D_t *)obj_ptr);
- break;
+ case H5I_DATASET:
+ oloc = H5D_oloc((H5D_t *)obj_ptr);
+ break;
- case H5I_DATATYPE:
- if(H5T_is_named((H5T_t*)obj_ptr)==TRUE)
- oloc = H5T_oloc((H5T_t*)obj_ptr);
+ case H5I_DATATYPE:
+ if (H5T_is_named((H5T_t *)obj_ptr) == TRUE)
+ oloc = H5T_oloc((H5T_t *)obj_ptr);
else
oloc = NULL;
- break;
-
- case H5I_UNINIT:
- case H5I_BADID:
- case H5I_FILE:
- case H5I_DATASPACE:
- case H5I_REFERENCE:
- case H5I_VFL:
- case H5I_GENPROP_CLS:
- case H5I_GENPROP_LST:
- case H5I_ERROR_CLASS:
- case H5I_ERROR_MSG:
- case H5I_ERROR_STACK:
- case H5I_NTYPES:
+ break;
+
+ case H5I_UNINIT:
+ case H5I_BADID:
+ case H5I_FILE:
+ case H5I_DATASPACE:
+ case H5I_REFERENCE:
+ case H5I_VFL:
+ case H5I_GENPROP_CLS:
+ case H5I_GENPROP_LST:
+ case H5I_ERROR_CLASS:
+ case H5I_ERROR_MSG:
+ case H5I_ERROR_STACK:
+ case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "unknown data object")
- } /* end switch */
-
- if((olist->file_info.local &&
- ( (!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE)
- || (!olist->file_info.ptr.file && olist->obj_type != H5I_DATATYPE)
- || (oloc && oloc->file == olist->file_info.ptr.file)))
- || (!olist->file_info.local &&
- ((!olist->file_info.ptr.shared && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE)
- || (!olist->file_info.ptr.shared && olist->obj_type != H5I_DATATYPE)
- || (oloc && oloc->file && oloc->file->shared == olist->file_info.ptr.shared)))) {
+ } /* end switch */
+
+ if ((olist->file_info.local && ((!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE &&
+ H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) ||
+ (!olist->file_info.ptr.file && olist->obj_type != H5I_DATATYPE) ||
+ (oloc && oloc->file == olist->file_info.ptr.file))) ||
+ (!olist->file_info.local &&
+ ((!olist->file_info.ptr.shared && olist->obj_type == H5I_DATATYPE &&
+ H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) ||
+ (!olist->file_info.ptr.shared && olist->obj_type != H5I_DATATYPE) ||
+ (oloc && oloc->file && oloc->file->shared == olist->file_info.ptr.shared)))) {
add_obj = TRUE;
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
- if(TRUE==add_obj) {
+ if (TRUE == add_obj) {
/* Add the object's ID to the ID list, if appropriate */
- if(olist->obj_id_list) {
+ if (olist->obj_id_list) {
olist->obj_id_list[olist->list_index] = obj_id;
- olist->list_index++;
- } /* end if */
+ olist->list_index++;
+ } /* end if */
/* Increment the number of open objects */
- if(olist->obj_id_count)
+ if (olist->obj_id_count)
(*olist->obj_id_count)++;
/* Check if we've filled up the array. Return H5_ITER_STOP only if
* we have filled up the array. Otherwise return H5_ITER_CONT(RET_VALUE is
- * preset to H5_ITER_CONT) because H5I_iterate needs the return value of
- * H5_ITER_CONT to continue the iteration. */
- if(olist->max_nobjs>0 && olist->list_index>=olist->max_nobjs)
- HGOTO_DONE(H5_ITER_STOP) /* Indicate that the iterator should stop */
+ * preset to H5_ITER_CONT) because H5I_iterate needs the return value of
+ * H5_ITER_CONT to continue the iteration.
+ */
+ if (olist->max_nobjs > 0 && olist->list_index >= olist->max_nobjs)
+ HGOTO_DONE(H5_ITER_STOP) /* Indicate that the iterator should stop */
}
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_objects_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_is_hdf5
- *
- * Purpose: Check the file signature to detect an HDF5 file.
- *
- * Bugs: This function is not robust: it only uses the default file
- * driver when attempting to open the file when in fact it
- * should use all known file drivers.
- *
- * Return: Success: TRUE/FALSE
+ * Function: H5F_is_hdf5
*
- * Failure: Negative
+ * Purpose: Check the file signature to detect an HDF5 file.
*
- * Programmer: Unknown
+ * Bugs: This function is not robust: it only uses the default file
+ * driver when attempting to open the file when in fact it
+ * should use all known file drivers.
*
- * Modifications:
- * Robb Matzke, 1999-08-02
- * Rewritten to use the virtual file layer.
+ * Return: TRUE/FALSE/FAIL
*-------------------------------------------------------------------------
*/
htri_t
H5F_is_hdf5(const char *name)
{
- H5FD_t *file = NULL; /* Low-level file struct */
- haddr_t sig_addr; /* Addess of hdf5 file signature */
- htri_t ret_value; /* Return value */
+ H5FD_t *file = NULL; /* Low-level file struct */
+ haddr_t sig_addr = HADDR_UNDEF; /* Addess of hdf5 file signature */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Open the file at the virtual file layer */
- if(NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF)))
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
+ if (NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF)))
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
/* The file is an hdf5 file if the hdf5 file signature can be found */
- if(H5FD_locate_signature(file, H5AC_ind_dxpl_g, &sig_addr) < 0)
+ if (H5FD_locate_signature(file, H5AC_ind_dxpl_g, &sig_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
ret_value = (HADDR_UNDEF != sig_addr);
done:
/* Close the file */
- if(file)
- if(H5FD_close(file) < 0 && ret_value >= 0)
+ if (file)
+ if (H5FD_close(file) < 0 && ret_value >= 0)
HDONE_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_is_hdf5() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_new
+ * Function: H5F_new
*
- * Purpose: Creates a new file object and initializes it. The
- * H5Fopen and H5Fcreate functions then fill in various
- * fields. If SHARED is a non-null pointer then the shared info
- * to which it points has the reference count incremented.
- * Otherwise a new, empty shared info struct is created and
- * initialized with the specified file access property list.
+ * Purpose: Creates a new file object and initializes it. The
+ * H5Fopen and H5Fcreate functions then fill in various fields.
+ * If SHARED is a non-null pointer then the shared info
+ * to which it points has the reference count incremented.
+ * Otherwise a new, empty shared info struct is created and
+ * initialized with the specified file access property list.
*
- * Errors:
+ * Return: Success: Pointer to a new file struct
*
- * Return: Success: Ptr to a new file struct.
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 18 1997
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
H5F_t *
H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
{
- H5F_t *f = NULL, *ret_value;
+ H5F_t *f = NULL;
+ H5F_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
- if(NULL == (f = H5FL_CALLOC(H5F_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
- f->file_id = -1;
+ if (NULL == (f = H5FL_CALLOC(H5F_t)))
+ HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
+ f->file_id = H5I_INVALID_HID;
- if(shared) {
+ if (shared) {
HDassert(lf == NULL);
- f->shared = shared;
- } /* end if */
+ f->shared = shared;
+ }
else {
- H5P_genplist_t *plist; /* Property list */
- unsigned efc_size; /* External file cache size */
- size_t u; /* Local index variable */
+ H5P_genplist_t *plist; /* Property list */
+ unsigned efc_size; /* External file cache size */
+ size_t u; /* Local index variable */
HDassert(lf != NULL);
- if(NULL == (f->shared = H5FL_CALLOC(H5F_file_t)))
+ if (NULL == (f->shared = H5FL_CALLOC(H5F_file_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
- f->shared->flags = flags;
- f->shared->sohm_addr = HADDR_UNDEF;
- f->shared->sohm_vers = HDF5_SHAREDHEADER_VERSION;
- for(u = 0; u < NELMTS(f->shared->fs_addr); u++)
+ f->shared->flags = flags;
+ f->shared->sohm_addr = HADDR_UNDEF;
+ f->shared->sohm_vers = HDF5_SHAREDHEADER_VERSION;
+ for (u = 0; u < NELMTS(f->shared->fs_addr); u++)
f->shared->fs_addr[u] = HADDR_UNDEF;
- f->shared->accum.loc = HADDR_UNDEF;
- f->shared->lf = lf;
-
- /*
- * Copy the file creation and file access property lists into the
- * new file handle. We do this early because some values might need
- * to change as the file is being opened.
- */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fcpl_id)))
+ f->shared->accum.loc = HADDR_UNDEF;
+ f->shared->lf = lf;
+
+ /*
+ * Copy the file creation and file access property lists into the
+ * new file handle. We do this early because some values might need
+ * to change as the file is being opened.
+ */
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not property list")
f->shared->fcpl_id = H5P_copy_plist(plist, FALSE);
/* Get the FCPL values to cache */
- if(H5P_get(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &f->shared->sizeof_addr) < 0)
+ if (H5P_get(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &f->shared->sizeof_addr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for address")
- if(H5P_get(plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &f->shared->sizeof_size) < 0)
+ if (H5P_get(plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &f->shared->sizeof_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for object size")
- if(H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &f->shared->sohm_nindexes) < 0)
+ if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &f->shared->sohm_nindexes) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get number of SOHM indexes")
HDassert(f->shared->sohm_nindexes < 255);
/* Get the FAPL values to cache */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list")
- if(H5P_get(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
+ if (H5P_get(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config")
- if(H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0)
+ if (H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache number of slots")
- if(H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
+ if (H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache byte size")
- if(H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0)
+ if (H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get preempt read chunk")
- if(H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0)
+ if (H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold")
- if(H5P_get(plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0)
+ if (H5P_get(plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment")
- if(H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME,&(f->shared->gc_ref)) < 0)
+ if (H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, &(f->shared->gc_ref)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference")
- if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
+ if (H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size")
- if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ if (H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag")
- if(H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0)
+ if (H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get metadata cache size")
f->shared->meta_aggr.feature_flag = H5FD_FEAT_AGGREGATE_METADATA;
- if(H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0)
+ if (H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'small data' cache size")
f->shared->sdata_aggr.feature_flag = H5FD_FEAT_AGGREGATE_SMALLDATA;
- if(H5P_get(plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0)
+ if (H5P_get(plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get elink file cache size")
- if(efc_size > 0)
- if(NULL == (f->shared->efc = H5F_efc_create(efc_size)))
+ if (efc_size > 0)
+ if (NULL == (f->shared->efc = H5F_efc_create(efc_size)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't create external file cache")
/* Get the VFD values to cache */
f->shared->maxaddr = H5FD_get_maxaddr(lf);
- if(!H5F_addr_defined(f->shared->maxaddr))
+ if (!H5F_addr_defined(f->shared->maxaddr))
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad maximum address from VFD")
- if(H5FD_get_feature_flags(lf, &f->shared->feature_flags) < 0)
+ if (H5FD_get_feature_flags(lf, &f->shared->feature_flags) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get feature flags from VFD")
- if(H5FD_get_fs_type_map(lf, f->shared->fs_type_map) < 0)
+ if (H5FD_get_fs_type_map(lf, f->shared->fs_type_map) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get free space type mapping from VFD")
- if(H5MF_init_merge_flags(f) < 0)
+ if (H5MF_init_merge_flags(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "problem initializing free space merge flags")
f->shared->tmp_addr = f->shared->maxaddr;
/* Disable temp. space allocation for parallel I/O (for now) */
@@ -693,72 +655,66 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t
*/
f->shared->use_tmp_space = !H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI);
- /*
- * Create a metadata cache with the specified number of elements.
- * The cache might be created with a different number of elements and
- * the access property list should be updated to reflect that.
- */
- if(H5AC_create(f, &(f->shared->mdc_initCacheCfg)) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache")
+ /*
+ * Create a metadata cache with the specified number of elements.
+ * The cache might be created with a different number of elements and
+ * the access property list should be updated to reflect that.
+ */
+ if (H5AC_create(f, &(f->shared->mdc_initCacheCfg)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache")
/* Create the file's "open object" information */
- if(H5FO_create(f) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure")
+ if (H5FO_create(f) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure")
/* Add new "shared" struct to list of open files */
- if(H5F_sfile_add(f->shared) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to append to list of open files")
+ if (H5F_sfile_add(f->shared) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to append to list of open files")
} /* end else */
f->shared->nrefs++;
/* Create the file's "top open object" information */
- if(H5FO_top_create(f) < 0)
+ if (H5FO_top_create(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure")
/* Set return value */
ret_value = f;
done:
- if(!ret_value && f) {
- if(!shared) {
+ if (!ret_value && f) {
+ if (!shared) {
/* Attempt to clean up some of the shared file structures */
- if(f->shared->efc)
- if(H5F_efc_destroy(f->shared->efc) < 0)
+ if (f->shared->efc)
+ if (H5F_efc_destroy(f->shared->efc) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, NULL, "can't destroy external file cache")
- if(f->shared->fcpl_id > 0)
- if(H5I_dec_ref(f->shared->fcpl_id) < 0)
+ if (f->shared->fcpl_id > 0)
+ if (H5I_dec_ref(f->shared->fcpl_id) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list")
f->shared = H5FL_FREE(H5F_file_t, f->shared);
- } /* end if */
- f = H5FL_FREE(H5F_t, f);
- } /* end if */
+ }
+ f = H5FL_FREE(H5F_t, f);
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_new() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_dest
- *
- * Purpose: Destroys a file structure. This function flushes the cache
- * but doesn't do any other cleanup other than freeing memory
- * for the file struct. The shared info for the file is freed
- * only when its reference count reaches zero.
+ * Function: H5F_dest
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 18 1997
+ * Purpose: Destroys a file structure. This function flushes the cache
+ * but doesn't do any other cleanup other than freeing memory
+ * for the file struct. The shared info for the file is freed
+ * only when its reference count reaches zero.
*
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -766,26 +722,26 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
HDassert(f);
HDassert(f->shared);
- if(1 == f->shared->nrefs) {
- H5F_io_info_t fio_info; /* I/O info for operation */
+ if (1 == f->shared->nrefs) {
+ H5F_io_info_t fio_info; /* I/O info for operation */
/* Flush at this point since the file will be closed.
* Only try to flush the file if it was opened with write access, and if
* the caller requested a flush.
*/
- if((f->shared->flags & H5F_ACC_RDWR) && flush)
- if(H5F_flush(f, dxpl_id, TRUE) < 0)
+ if ((f->shared->flags & H5F_ACC_RDWR) && flush)
+ if (H5F_flush(f, dxpl_id, TRUE) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
/* Release the external file cache */
- if(f->shared->efc) {
- if(H5F_efc_destroy(f->shared->efc) < 0)
+ if (f->shared->efc) {
+ if (H5F_efc_destroy(f->shared->efc) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't destroy external file cache")
f->shared->efc = NULL;
} /* end if */
/* Release objects that depend on the superblock being initialized */
- if(f->shared->sblock) {
+ if (f->shared->sblock) {
/* Shutdown file free space manager(s) */
/* (We should release the free space information now (before truncating
* the file and before the metadata cache is shut down) since the
@@ -793,34 +749,34 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
* and also because releasing free space can shrink the file's
* 'eoa' value)
*/
- if(H5F_ACC_RDWR & H5F_INTENT(f)) {
- if(H5MF_close(f, dxpl_id) < 0)
+ if (H5F_ACC_RDWR & H5F_INTENT(f)) {
+ if (H5MF_close(f, dxpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file free space info")
/* Flush the file again (if requested), as shutting down the
* free space manager may dirty some data structures again.
*/
- if(flush)
- if(H5F_flush(f, dxpl_id, TRUE) < 0)
+ if (flush)
+ if (H5F_flush(f, dxpl_id, TRUE) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
} /* end if */
/* Unpin the superblock, since we're about to destroy the cache */
- if(H5AC_unpin_entry(f->shared->sblock) < 0)
+ if (H5AC_unpin_entry(f->shared->sblock) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
f->shared->sblock = NULL;
} /* end if */
-
+
/* Remove shared file struct from list of open files */
- if(H5F_sfile_remove(f->shared) < 0)
+ if (H5F_sfile_remove(f->shared) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
/* Shutdown the metadata cache */
- if(H5AC_dest(f, dxpl_id))
+ if (H5AC_dest(f, dxpl_id))
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
@@ -828,9 +784,9 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
* Do not close the root group since we didn't count it, but free
* the memory associated with it.
*/
- if(f->shared->root_grp) {
+ if (f->shared->root_grp) {
/* Free the root group */
- if(H5G_root_free(f->shared->root_grp) < 0)
+ if (H5G_root_free(f->shared->root_grp) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
f->shared->root_grp = NULL;
@@ -838,42 +794,42 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Destroy other components of the file */
- if(H5F__accum_reset(&fio_info, TRUE) < 0)
+ if (H5F__accum_reset(&fio_info, TRUE) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
- if(H5FO_dest(f) < 0)
+ if (H5FO_dest(f) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
f->shared->cwfs = (struct H5HG_heap_t **)H5MM_xfree(f->shared->cwfs);
- if(H5G_node_close(f) < 0)
+ if (H5G_node_close(f) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
/* Destroy file creation properties */
- if(H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id))
+ if (H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id))
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a property list")
- if(H5I_dec_ref(f->shared->fcpl_id) < 0)
+ if (H5I_dec_ref(f->shared->fcpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close property list")
/* Close the file */
- if(H5FD_close(f->shared->lf) < 0)
+ if (H5FD_close(f->shared->lf) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
/* Free mount table */
- f->shared->mtab.child = (H5F_mount_t *)H5MM_xfree(f->shared->mtab.child);
+ f->shared->mtab.child = (H5F_mount_t *)H5MM_xfree(f->shared->mtab.child);
f->shared->mtab.nalloc = 0;
/* Destroy shared file struct */
f->shared = (H5F_file_t *)H5FL_FREE(H5F_file_t, f->shared);
-
- } else if(f->shared->nrefs > 0) {
+ }
+ else if (f->shared->nrefs > 0) {
/*
* There are other references to the shared part of the file.
* Only decrement the reference count.
@@ -882,76 +838,70 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
}
/* Free the non-shared part of the file */
- f->open_name = (char *)H5MM_xfree(f->open_name);
+ f->open_name = (char *)H5MM_xfree(f->open_name);
f->actual_name = (char *)H5MM_xfree(f->actual_name);
- f->extpath = (char *)H5MM_xfree(f->extpath);
- if(H5FO_top_dest(f) < 0)
+ f->extpath = (char *)H5MM_xfree(f->extpath);
+ if (H5FO_top_dest(f) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "problems closing file")
f->shared = NULL;
- f = H5FL_FREE(H5F_t, f);
+ f = H5FL_FREE(H5F_t, f);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_dest() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_open
- *
- * Purpose: Opens (or creates) a file. This function understands the
- * following flags which are similar in nature to the Posix
- * open(2) flags.
- *
- * H5F_ACC_RDWR: Open with read/write access. If the file is
- * currently open for read-only access then it
- * will be reopened. Absence of this flag
- * implies read-only access.
+ * Function: H5F_open
*
- * H5F_ACC_CREAT: Create a new file if it doesn't exist yet.
- * The permissions are 0666 bit-wise AND with
- * the current umask. H5F_ACC_WRITE must also
- * be specified.
+ * Purpose: Opens (or creates) a file. This function understands the
+ * following flags which are similar in nature to the Posix
+ * open(2) flags.
*
- * H5F_ACC_EXCL: This flag causes H5F_open() to fail if the
- * file already exists.
+ * H5F_ACC_RDWR: Open with read/write access. If the file is
+ * currently open for read-only access then it
+ * will be reopened. Absence of this flag
+ * implies read-only access.
*
- * H5F_ACC_TRUNC: The file is truncated and a new HDF5 superblock
- * is written. This operation will fail if the
- * file is already open.
+ * H5F_ACC_CREAT: Create a new file if it doesn't exist yet.
+ * The permissions are 0666 bit-wise AND with
+ * the current umask. H5F_ACC_WRITE must also
+ * be specified.
*
- * Unlinking the file name from the group directed graph while
- * the file is opened causes the file to continue to exist but
- * one will not be able to upgrade the file from read-only
- * access to read-write access by reopening it. Disk resources
- * for the file are released when all handles to the file are
- * closed. NOTE: This paragraph probably only applies to Unix;
- * deleting the file name in other OS's has undefined results.
+ * H5F_ACC_EXCL: This flag causes H5F_open() to fail if the
+ * file already exists.
*
- * The CREATE_PARMS argument is optional. A null pointer will
- * cause the default file creation parameters to be used.
+ * H5F_ACC_TRUNC: The file is truncated and a new HDF5 superblock
+ * is written. This operation will fail if the
+ * file is already open.
*
- * The ACCESS_PARMS argument is optional. A null pointer will
- * cause the default file access parameters to be used.
+ * Unlinking the file name from the group directed graph while
+ * the file is opened causes the file to continue to exist but
+ * one will not be able to upgrade the file from read-only
+ * access to read-write access by reopening it. Disk resources
+ * for the file are released when all handles to the file are
+ * closed. NOTE: This paragraph probably only applies to Unix;
+ * deleting the file name in other OS's has undefined results.
*
- * Return: Success: A new file pointer.
- * Failure: NULL
+ * The CREATE_PARMS argument is optional. A null pointer will
+ * cause the default file creation parameters to be used.
*
- * Programmer: Robb Matzke
- * Tuesday, September 23, 1997
+ * The ACCESS_PARMS argument is optional. A null pointer will
+ * cause the default file access parameters to be used.
*
+ * Return: Success: A new file pointer.
+ * Failure: NULL
*-------------------------------------------------------------------------
*/
H5F_t *
-H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
- hid_t dxpl_id)
+H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id)
{
- H5F_t *file = NULL; /*the success return value */
- H5F_file_t *shared = NULL; /*shared part of `file' */
- H5FD_t *lf = NULL; /*file driver part of `shared' */
- unsigned tent_flags; /*tentative flags */
- H5FD_class_t *drvr; /*file driver class info */
- H5P_genplist_t *a_plist; /*file access property list */
- H5F_close_degree_t fc_degree; /*file close degree */
- H5F_t *ret_value; /*actual return value */
+ H5F_t * file = NULL; /*the success return value */
+ H5F_file_t * shared = NULL; /*shared part of `file' */
+ H5FD_t * lf = NULL; /*file driver part of `shared' */
+ unsigned tent_flags; /*tentative flags */
+ H5FD_class_t * drvr; /*file driver class info */
+ H5P_genplist_t * a_plist; /*file access property list */
+ H5F_close_degree_t fc_degree; /*file close degree */
+ H5F_t * ret_value; /*actual return value */
FUNC_ENTER_NOAPI(NULL)
@@ -963,7 +913,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
* Otherwise it is the application's responsibility to never open the
* same file more than once at a time.
*/
- if(NULL == (drvr = H5FD_get_class(fapl_id)))
+ if (NULL == (drvr = H5FD_get_class(fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to retrieve VFL class")
/*
@@ -977,77 +927,83 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
* application's responsibility to prevent this situation (there's no
* way for us to detect it here anyway).
*/
- if(drvr->cmp)
- tent_flags = flags & ~(H5F_ACC_CREAT|H5F_ACC_TRUNC|H5F_ACC_EXCL);
+ if (drvr->cmp)
+ tent_flags = flags & ~(H5F_ACC_CREAT | H5F_ACC_TRUNC | H5F_ACC_EXCL);
else
- tent_flags = flags;
+ tent_flags = flags;
- if(NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) {
- if(tent_flags == flags) {
+ if (NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) {
+ if (tent_flags == flags) {
#ifndef H5_USING_MEMCHECKER
time_t mytime = HDtime(NULL);
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags)
-#else /* H5_USING_MEMCHECKER */
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags)
-#endif /* H5_USING_MEMCHECKER */
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL,
+ "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime),
+ name, tent_flags)
+#else /* H5_USING_MEMCHECKER */
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x",
+ name, tent_flags)
+#endif /* H5_USING_MEMCHECKER */
} /* end if */
H5E_clear_stack(NULL);
- tent_flags = flags;
- if(NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) {
+ tent_flags = flags;
+ if (NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) {
#ifndef H5_USING_MEMCHECKER
time_t mytime = HDtime(NULL);
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags)
-#else /* H5_USING_MEMCHECKER */
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags)
-#endif /* H5_USING_MEMCHECKER */
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL,
+ "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime),
+ name, tent_flags)
+#else /* H5_USING_MEMCHECKER */
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x",
+ name, tent_flags)
+#endif /* H5_USING_MEMCHECKER */
} /* end if */
- } /* end if */
+ } /* end if */
/* Is the file already open? */
- if((shared = H5F_sfile_search(lf)) != NULL) {
- /*
- * The file is already open, so use that one instead of the one we
- * just opened. We only one one H5FD_t* per file so one doesn't
- * confuse the other. But fail if this request was to truncate the
- * file (since we can't do that while the file is open), or if the
- * request was to create a non-existent file (since the file already
- * exists), or if the new request adds write access (since the
- * readers don't expect the file to change under them).
- */
- if(H5FD_close(lf) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info")
- if(flags & H5F_ACC_TRUNC)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to truncate a file which is already open")
- if(flags & H5F_ACC_EXCL)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file exists")
- if((flags & H5F_ACC_RDWR) && 0 == (shared->flags & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for read-only")
+ if ((shared = H5F_sfile_search(lf)) != NULL) {
+ /*
+ * The file is already open, so use that one instead of the one we
+ * just opened. We only one one H5FD_t* per file so one doesn't
+ * confuse the other. But fail if this request was to truncate the
+ * file (since we can't do that while the file is open), or if the
+ * request was to create a non-existent file (since the file already
+ * exists), or if the new request adds write access (since the
+ * readers don't expect the file to change under them).
+ */
+ if (H5FD_close(lf) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info")
+ if (flags & H5F_ACC_TRUNC)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to truncate a file which is already open")
+ if (flags & H5F_ACC_EXCL)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file exists")
+ if ((flags & H5F_ACC_RDWR) && 0 == (shared->flags & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for read-only")
/* Allocate new "high-level" file struct */
- if((file = H5F_new(shared, flags, fcpl_id, fapl_id, NULL)) == NULL)
+ if ((file = H5F_new(shared, flags, fcpl_id, fapl_id, NULL)) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create new file object")
} /* end if */
else {
/* Check if tentative open was good enough */
- if(flags != tent_flags) {
+ if (flags != tent_flags) {
/*
* This file is not yet open by the library and the flags we used to
* open it are different than the desired flags. Close the tentative
* file and open it for real.
*/
- if(H5FD_close(lf) < 0) {
+ if (H5FD_close(lf) < 0) {
file = NULL; /*to prevent destruction of wrong file*/
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info")
} /* end if */
- if(NULL == (lf = H5FD_open(name, flags, fapl_id, HADDR_UNDEF))) {
+ if (NULL == (lf = H5FD_open(name, flags, fapl_id, HADDR_UNDEF))) {
file = NULL; /*to prevent destruction of wrong file*/
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file")
} /* end if */
- } /* end if */
+ } /* end if */
- if(NULL == (file = H5F_new(NULL, flags, fcpl_id, fapl_id, lf)))
+ if (NULL == (file = H5F_new(NULL, flags, fcpl_id, fapl_id, lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create new file object")
} /* end else */
@@ -1056,13 +1012,13 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
/* Short cuts */
shared = file->shared;
- lf = shared->lf;
+ lf = shared->lf;
/*
* Read or write the file superblock, depending on whether the file is
* empty or not.
*/
- if(0 == H5FD_get_eof(lf) && (flags & H5F_ACC_RDWR)) {
+ if (0 == H5FD_get_eof(lf) && (flags & H5F_ACC_RDWR)) {
/*
* We've just opened a fresh new file (or truncated one). We need
* to create & write the superblock.
@@ -1070,27 +1026,28 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
/* Initialize information about the superblock and allocate space for it */
/* (Writes superblock extension messages, if there are any) */
- if(H5F_super_init(file, dxpl_id) < 0)
+ if (H5F_super_init(file, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to allocate file superblock")
/* Create and open the root group */
/* (This must be after the space for the superblock is allocated in
* the file, since the superblock must be at offset 0)
*/
- if(H5G_mkroot(file, dxpl_id, TRUE) < 0)
+ if (H5G_mkroot(file, dxpl_id, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create/open root group")
- } else if (1 == shared->nrefs) {
- /* Read the superblock if it hasn't been read before. */
- if(H5F_super_read(file, dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
-
- /* Open the root group */
- if(H5G_mkroot(file, dxpl_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read root group")
+ }
+ else if (1 == shared->nrefs) {
+ /* Read the superblock if it hasn't been read before. */
+ if (H5F_super_read(file, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
+
+ /* Open the root group */
+ if (H5G_mkroot(file, dxpl_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read root group")
} /* end if */
/* Get the file access property list, for future queries */
- if(NULL == (a_plist = (H5P_genplist_t *)H5I_object(fapl_id)))
+ if (NULL == (a_plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list")
/*
@@ -1099,59 +1056,55 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
* second time or later, verify the access property list value matches
* the degree in shared file structure.
*/
- if(H5P_get(a_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0)
+ if (H5P_get(a_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file close degree")
- if(shared->nrefs == 1) {
- if(fc_degree == H5F_CLOSE_DEFAULT)
+ if (shared->nrefs == 1) {
+ if (fc_degree == H5F_CLOSE_DEFAULT)
shared->fc_degree = lf->cls->fc_degree;
else
shared->fc_degree = fc_degree;
- } else if(shared->nrefs > 1) {
- if(fc_degree == H5F_CLOSE_DEFAULT && shared->fc_degree != lf->cls->fc_degree)
+ }
+ else if (shared->nrefs > 1) {
+ if (fc_degree == H5F_CLOSE_DEFAULT && shared->fc_degree != lf->cls->fc_degree)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match")
- if(fc_degree != H5F_CLOSE_DEFAULT && fc_degree != shared->fc_degree)
+ if (fc_degree != H5F_CLOSE_DEFAULT && fc_degree != shared->fc_degree)
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 links */
- if(H5_build_extpath(name, &file->extpath) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath")
+ if (H5_build_extpath(name, &file->extpath) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath")
/* Formulate the actual file name, after following symlinks, etc. */
- if(H5F_build_actual_name(file, a_plist, name, &file->actual_name) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build actual name")
+ if (H5F_build_actual_name(file, a_plist, name, &file->actual_name) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build actual name")
/* Success */
ret_value = file;
done:
- if(!ret_value && file)
- if(H5F_dest(file, dxpl_id, FALSE) < 0)
+ if (!ret_value && file)
+ if (H5F_dest(file, dxpl_id, FALSE) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_open() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_flush
+ * Function: H5F_flush
*
- * Purpose: Flushes cached data.
+ * Purpose: Flushes cached data.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 29 1997
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
{
- H5F_io_info_t fio_info; /* I/O info for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_io_info_t fio_info; /* I/O info for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1159,7 +1112,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
HDassert(f);
/* Flush any cached dataset storage raw data */
- if(H5D_flush(f, dxpl_id) < 0)
+ if (H5D_flush(f, dxpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush dataset cache")
@@ -1169,36 +1122,36 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
/* (needs to happen before cache flush, with superblock write, since the
* 'eoa' value is written in superblock -QAK)
*/
- if(H5MF_free_aggrs(f, dxpl_id) < 0)
+ if (H5MF_free_aggrs(f, dxpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file space")
/* Flush the entire metadata cache */
- if(H5AC_flush(f, dxpl_id) < 0)
+ if (H5AC_flush(f, dxpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
/* Truncate the file to the current allocated size */
- if(H5FD_truncate(f->shared->lf, dxpl_id, closing) < 0)
+ if (H5FD_truncate(f->shared->lf, dxpl_id, closing) < 0)
HDONE_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "low level truncate failed")
/* Flush the entire metadata cache again since the EOA could have changed in the truncate call. */
- if(H5AC_flush(f, dxpl_id) < 0)
+ if (H5AC_flush(f, dxpl_id) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Flush out the metadata accumulator */
- if(H5F__accum_flush(&fio_info) < 0)
+ if (H5F__accum_flush(&fio_info) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator")
/* Flush file buffers to disk. */
- if(H5FD_flush(f->shared->lf, dxpl_id, closing) < 0)
+ if (H5FD_flush(f->shared->lf, dxpl_id, closing) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed")
@@ -1206,93 +1159,76 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_flush() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_close
- *
- * Purpose: Closes a file or causes the close operation to be pended.
- * This function is called two ways: from the API it gets called
- * by H5Fclose->H5I_dec_ref->H5F_close when H5I_dec_ref()
- * decrements the file ID reference count to zero. The file ID
- * is removed from the H5I_FILE group by H5I_dec_ref() just
- * before H5F_close() is called. If there are open object
- * headers then the close is pended by moving the file to the
- * H5I_FILE_CLOSING ID group (the f->closing contains the ID
- * assigned to file).
+ * Function: H5F_close
*
- * This function is also called directly from H5O_close() when
- * the last object header is closed for the file and the file
- * has a pending close.
+ * Purpose: Internal routine to close a file.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Tuesday, September 23, 1997
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5F_close(H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
- HDassert(f->file_id > 0); /* This routine should only be called when a file ID's ref count drops to zero */
+ HDassert(f->file_id >
+ 0); /* This routine should only be called when a file ID's ref count drops to zero */
/* Perform checks for "semi" file close degree here, since closing the
- * file is not allowed if there are objects still open */
- if(f->shared->fc_degree == H5F_CLOSE_SEMI) {
- unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */
- unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
+ * file is not allowed if there are objects still open.
+ */
+ if (f->shared->fc_degree == H5F_CLOSE_SEMI) {
+ unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */
+ unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
/* Get the number of open objects and open files on this file/mount hierarchy */
- if(H5F_mount_count_ids(f, &nopen_files, &nopen_objs) < 0)
+ if (H5F_mount_count_ids(f, &nopen_files, &nopen_objs) < 0)
HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy")
/* If there are no other file IDs open on this file/mount hier., but
* there are still open objects, issue an error and bail out now,
* without decrementing the file ID's reference count and triggering
- * a "real" attempt at closing the file */
- if(nopen_files == 1 && nopen_objs > 0)
+ * a "real" attempt at closing the file.
+ */
+ if (nopen_files == 1 && nopen_objs > 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file, there are objects still open")
- } /* end if */
+ }
/* Reset the file ID for this file */
f->file_id = -1;
/* Attempt to close the file/mount hierarchy */
- if(H5F_try_close(f) < 0)
+ if (H5F_try_close(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_try_close
- *
- * Purpose: Attempts to close a file due to one of several actions:
- * - The reference count on the file ID dropped to zero
- * - The last open object was closed in the file
- * - The file was unmounted
+ * Function: H5F_try_close
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Attempts to close a file due to one of several actions:
+ * - The reference count on the file ID dropped to zero
+ * - The last open object was closed in the file
+ * - The file was unmounted
*
- * Programmer: Quincey Koziol
- * Tuesday, July 19, 2005
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5F_try_close(H5F_t *f)
{
- unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */
- unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */
+ unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1301,24 +1237,24 @@ H5F_try_close(H5F_t *f)
HDassert(f->shared);
/* Check if this file is already in the process of closing */
- if(f->closing)
+ if (f->closing)
HGOTO_DONE(SUCCEED)
/* Get the number of open objects and open files on this file/mount hierarchy */
- if(H5F_mount_count_ids(f, &nopen_files, &nopen_objs) < 0)
+ if (H5F_mount_count_ids(f, &nopen_files, &nopen_objs) < 0)
HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy")
/*
* Close file according to close degree:
*
- * H5F_CLOSE_WEAK: if there are still objects open, wait until
- * they are all closed.
- * H5F_CLOSE_SEMI: if there are still objects open, return fail;
- * otherwise, close file.
- * H5F_CLOSE_STRONG: if there are still objects open, close them
- * first, then close file.
+ * H5F_CLOSE_WEAK: if there are still objects open, wait until
+ * they are all closed.
+ * H5F_CLOSE_SEMI: if there are still objects open, return fail;
+ * otherwise, close file.
+ * H5F_CLOSE_STRONG: if there are still objects open, close them
+ * first, then close file.
*/
- switch(f->shared->fc_degree) {
+ switch (f->shared->fc_degree) {
case H5F_CLOSE_WEAK:
/*
* If file or object IDS are still open then delay deletion of
@@ -1326,28 +1262,31 @@ H5F_try_close(H5F_t *f)
* caches and update the object header anyway so that failing to
* close all objects isn't a major problem.
*/
- if((nopen_files + nopen_objs) > 0)
+ if ((nopen_files + nopen_objs) > 0)
HGOTO_DONE(SUCCEED)
break;
case H5F_CLOSE_SEMI:
/* Can leave safely if file IDs are still open on this file */
- if(nopen_files > 0)
+ if (nopen_files > 0)
HGOTO_DONE(SUCCEED)
/* Sanity check: If close degree if "semi" and we have gotten this
- * far and there are objects left open, bail out now */
+ * far and there are objects left open, bail out now.
+ */
HDassert(nopen_files == 0 && nopen_objs == 0);
- /* If we've gotten this far (ie. there are no open objects in the file), fall through to flush & close */
+ /* If we've gotten this far (ie. there are no open objects in the file), fall through to flush &
+ * close */
break;
case H5F_CLOSE_STRONG:
/* If there are other open files in the hierarchy, we can leave now */
- if(nopen_files > 0)
+ if (nopen_files > 0)
HGOTO_DONE(SUCCEED)
- /* If we've gotten this far (ie. there are no open file IDs in the file/mount hierarchy), fall through to flush & close */
+ /* If we've gotten this far (ie. there are no open file IDs in the file/mount hierarchy), fall
+ * through to flush & close */
break;
case H5F_CLOSE_DEFAULT:
@@ -1359,26 +1298,28 @@ H5F_try_close(H5F_t *f)
f->closing = TRUE;
/* If the file close degree is "strong", close all the open objects in this file */
- if(f->shared->fc_degree == H5F_CLOSE_STRONG) {
- HDassert(nopen_files == 0);
+ if (f->shared->fc_degree == H5F_CLOSE_STRONG) {
+ HDassert(nopen_files == 0);
/* Forced close of all opened objects in this file */
- if(f->nopen_objs > 0) {
- size_t obj_count; /* # of open objects */
- hid_t objs[128]; /* Array of objects to close */
- herr_t result; /* Local result from obj ID query */
- size_t u; /* Local index variable */
+ if (f->nopen_objs > 0) {
+ size_t obj_count; /* # of open objects */
+ hid_t objs[128]; /* Array of objects to close */
+ herr_t result; /* Local result from obj ID query */
+ size_t u; /* Local index variable */
/* Get the list of IDs of open dataset, group, & attribute objects */
- while((result = H5F_get_obj_ids(f, H5F_OBJ_LOCAL | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_ATTR, (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE, &obj_count)) <= 0
- && obj_count != 0 ) {
+ while ((result = H5F_get_obj_ids(
+ f, H5F_OBJ_LOCAL | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_ATTR,
+ (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE, &obj_count)) <= 0 &&
+ obj_count != 0) {
/* Try to close all the open objects in this file */
- for(u = 0; u < obj_count; u++)
- if(H5I_dec_ref(objs[u]) < 0)
+ for (u = 0; u < obj_count; u++)
+ if (H5I_dec_ref(objs[u]) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't close object")
- } /* end while */
- if(result < 0)
+ }
+ if (result < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(1)")
/* Get the list of IDs of open named datatype objects */
@@ -1386,84 +1327,87 @@ H5F_try_close(H5F_t *f)
* they could be using one of the named datatypes and then the
* open named datatype ID will get closed twice)
*/
- while((result = H5F_get_obj_ids(f, H5F_OBJ_LOCAL | H5F_OBJ_DATATYPE, (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE, &obj_count)) <= 0
- && obj_count != 0) {
+ while ((result = H5F_get_obj_ids(f, H5F_OBJ_LOCAL | H5F_OBJ_DATATYPE,
+ (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE,
+ &obj_count)) <= 0 &&
+ obj_count != 0) {
/* Try to close all the open objects in this file */
- for(u = 0; u < obj_count; u++)
- if(H5I_dec_ref(objs[u]) < 0)
+ for (u = 0; u < obj_count; u++)
+ if (H5I_dec_ref(objs[u]) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't close object")
- } /* end while */
- if(result < 0)
+ }
+ if (result < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(2)")
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if this is a child file in a mounting hierarchy & proceed up the
* hierarchy if so.
*/
- if(f->parent)
- if(H5F_try_close(f->parent) < 0)
+ if (f->parent)
+ if (H5F_try_close(f->parent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close parent file")
/* Unmount and close each child before closing the current file. */
- if(H5F_close_mounts(f) < 0)
+ if (H5F_close_mounts(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't unmount child files")
/* If there is more than one reference to the shared file struct and the
* file has an external file cache, we should see if it can be closed. This
- * can happen if a cycle is formed with external file caches */
- if(f->shared->efc && (f->shared->nrefs > 1))
- if(H5F_efc_try_close(f) < 0)
+ * can happen if a cycle is formed with external file caches.
+ */
+ if (f->shared->efc && (f->shared->nrefs > 1))
+ if (H5F_efc_try_close(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't attempt to close EFC")
/* Delay flush until the shared file struct is closed, in H5F_dest. If the
* application called H5Fclose, it would have been flushed in that function
- * (unless it will have been flushed in H5F_dest anyways). */
+ * (unless it will have been flushed in H5F_dest anyways).
+ */
/*
* Destroy the H5F_t struct and decrement the reference count for the
* shared H5F_file_t struct. If the reference count for the H5F_file_t
* struct reaches zero then destroy it also.
*/
- if(H5F_dest(f, H5AC_dxpl_id, TRUE) < 0)
+ if (H5F_dest(f, H5AC_dxpl_id, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_try_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_id
+ * Function: H5F_get_id
*
- * Purpose: Get the file ID, incrementing it, or "resurrecting" it as
+ * Purpose: Get the file ID, incrementing it, or "resurrecting" it as
* appropriate.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: An ID for a file
*
- * Programmer: Raymond Lu
- * Oct 29, 2003
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5F_get_id(H5F_t *file, hbool_t app_ref)
{
- hid_t ret_value;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
- if(file->file_id == -1) {
+ if (file->file_id == H5I_INVALID_HID) {
/* Get an atom for the file */
- if((file->file_id = H5I_register(H5I_FILE, file, app_ref)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file")
- } else {
- /* Increment reference count on atom. */
- if(H5I_inc_ref(file->file_id, app_ref) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, FAIL, "incrementing file ID failed")
+ if ((file->file_id = H5I_register(H5I_FILE, file, app_ref)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file")
+ }
+ else {
+ /* Increment reference count on existing ID */
+ if (H5I_inc_ref(file->file_id, app_ref) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, H5I_INVALID_HID, "incrementing file ID failed")
} /* end else */
ret_value = file->file_id;
@@ -1472,20 +1416,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_id() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_incr_nopen_objs
- *
- * Purpose: Increment the number of open objects for a file.
+ * Function: H5F_incr_nopen_objs
*
- * Return: Success: The number of open objects, after the increment
- *
- * Failure: (can't happen)
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Mar 6 2007
+ * Purpose: Increment the number of open objects for a file.
*
+ * Return: Success: The number of open objects, after the increment
+ * Failure: (can't happen)
*-------------------------------------------------------------------------
*/
unsigned
@@ -1499,20 +1436,13 @@ H5F_incr_nopen_objs(H5F_t *f)
FUNC_LEAVE_NOAPI(++f->nopen_objs)
} /* end H5F_incr_nopen_objs() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_decr_nopen_objs
- *
- * Purpose: Decrement the number of open objects for a file.
+ * Function: H5F_decr_nopen_objs
*
- * Return: Success: The number of open objects, after the decrement
- *
- * Failure: (can't happen)
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Mar 6 2007
+ * Purpose: Decrement the number of open objects for a file.
*
+ * Return: Success: The number of open objects, after the decrement
+ * Failure: (can't happen)
*-------------------------------------------------------------------------
*/
unsigned
@@ -1526,28 +1456,22 @@ H5F_decr_nopen_objs(H5F_t *f)
FUNC_LEAVE_NOAPI(--f->nopen_objs)
} /* end H5F_decr_nopen_objs() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_build_actual_name
- *
- * Purpose: Retrieve the name of a file, after following symlinks, etc.
- *
- * Note: Currently only working for "POSIX I/O compatible" VFDs
+ * Function: H5F_build_actual_name
*
- * Return: Success: 0
- * Failure: -1
+ * Purpose: Retrieve the name of a file, after following symlinks, etc.
*
- * Programmer: Quincey Koziol
- * November 25, 2009
+ * Note: Currently only working for "POSIX I/O compatible" VFDs
*
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
static herr_t
H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *name,
- char **actual_name/*out*/)
+ char **actual_name /*out*/)
{
- hid_t new_fapl_id = -1; /* ID for duplicated FAPL */
- herr_t ret_value = SUCCEED; /* Return value */
+ hid_t new_fapl_id = H5I_INVALID_HID; /* ID for duplicated FAPL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1565,101 +1489,97 @@ H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *na
*/
#ifdef H5_HAVE_SYMLINK
/* Check for POSIX I/O compatible file handle */
- if(H5F_HAS_FEATURE(f, H5FD_FEAT_POSIX_COMPAT_HANDLE)) {
- h5_stat_t lst; /* Stat info from lstat() call */
+ if (H5F_HAS_FEATURE(f, H5FD_FEAT_POSIX_COMPAT_HANDLE)) {
+ h5_stat_t lst; /* Stat info from lstat() call */
/* Call lstat() on the file's name */
- if(HDlstat(name, &lst) < 0)
+ if (HDlstat(name, &lst) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stat info for file")
/* Check for symbolic link */
- if(S_IFLNK == (lst.st_mode & S_IFMT)) {
- H5P_genplist_t *new_fapl; /* Duplicated FAPL */
- int *fd; /* POSIX I/O file descriptor */
- h5_stat_t st; /* Stat info from stat() call */
- h5_stat_t fst; /* Stat info from fstat() call */
- char realname[PATH_MAX]; /* Fully resolved path name of file */
- hbool_t want_posix_fd; /* Flag for retrieving file descriptor from VFD */
+ if (S_IFLNK == (lst.st_mode & S_IFMT)) {
+ H5P_genplist_t *new_fapl; /* Duplicated FAPL */
+ int * fd; /* POSIX I/O file descriptor */
+ h5_stat_t st; /* Stat info from stat() call */
+ h5_stat_t fst; /* Stat info from fstat() call */
+ char realname[PATH_MAX]; /* Fully resolved path name of file */
+ hbool_t want_posix_fd; /* Flag for retrieving file descriptor from VFD */
/* Perform a sanity check that the file or link wasn't switched
* between when we opened it and when we called lstat(). This is
* according to the security best practices for lstat() documented
- * here: https://www.securecoding.cert.org/confluence/display/seccode/POS35-C.+Avoid+race+conditions+while+checking+for+the+existence+of+a+symbolic+link
+ * here:
+ * https://www.securecoding.cert.org/confluence/display/seccode/POS35-C.+Avoid+race+conditions+while+checking+for+the+existence+of+a+symbolic+link
*/
/* Copy the FAPL object to modify */
- if((new_fapl_id = H5P_copy_plist(fapl, FALSE)) < 0)
+ if ((new_fapl_id = H5P_copy_plist(fapl, FALSE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
- if(NULL == (new_fapl = (H5P_genplist_t *)H5I_object(new_fapl_id)))
+ if (NULL == (new_fapl = (H5P_genplist_t *)H5I_object(new_fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "can't get property list")
/* Set the character encoding on the new property list */
want_posix_fd = TRUE;
- if(H5P_set(new_fapl, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
+ if (H5P_set(new_fapl, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding")
/* Retrieve the file handle */
- if(H5F_get_vfd_handle(f, new_fapl_id, (void **)&fd) < 0)
+ if (H5F_get_vfd_handle(f, new_fapl_id, (void **)&fd) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve POSIX file descriptor")
/* Stat the filename we're resolving */
- if(HDstat(name, &st) < 0)
+ if (HDstat(name, &st) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to stat file")
/* Stat the file we opened */
- if(HDfstat(*fd, &fst) < 0)
+ if (HDfstat(*fd, &fst) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to fstat file")
/* Verify that the files are really the same */
- if(st.st_mode != fst.st_mode || st.st_ino != fst.st_ino || st.st_dev != fst.st_dev)
+ if (st.st_mode != fst.st_mode || st.st_ino != fst.st_ino || st.st_dev != fst.st_dev)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "files' st_ino or st_dev fields changed!")
/* Get the resolved path for the file name */
- if(NULL == HDrealpath(name, realname))
+ if (NULL == HDrealpath(name, realname))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve real path for file")
/* Duplicate the resolved path for the file name */
- if(NULL == (*actual_name = (char *)H5MM_strdup(realname)))
+ if (NULL == (*actual_name = (char *)H5MM_strdup(realname)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path")
} /* end if */
- } /* end if */
-#endif /* H5_HAVE_SYMLINK */
+ } /* end if */
+#endif /* H5_HAVE_SYMLINK */
/* Check if we've resolved the file's name */
- if(NULL == *actual_name) {
+ if (NULL == *actual_name) {
/* Just duplicate the name used to open the file */
- if(NULL == (*actual_name = (char *)H5MM_strdup(name)))
+ if (NULL == (*actual_name = (char *)H5MM_strdup(name)))
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate open name")
} /* end else */
done:
/* Close the property list */
- if(new_fapl_id > 0)
- if(H5I_dec_app_ref(new_fapl_id) < 0)
+ if (new_fapl_id > 0)
+ if (H5I_dec_app_ref(new_fapl_id) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close duplicated FAPL")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_build_actual_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_addr_encode_len
- *
- * Purpose: Encodes an address into the buffer pointed to by *PP and
- * then increments the pointer to the first byte after the
- * address. An undefined value is stored as all 1's.
- *
- * Return: void
+ * Function: H5F_addr_encode_len
*
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
+ * Purpose: Encodes an address into the buffer pointed to by *PP and
+ * then increments the pointer to the first byte after the
+ * address. An undefined value is stored as all 1's.
*
+ * Return: void
*-------------------------------------------------------------------------
*/
void
-H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr)
+H5F_addr_encode_len(size_t addr_len, uint8_t **pp /*in,out*/, haddr_t addr)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1667,38 +1587,33 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr)
HDassert(addr_len);
HDassert(pp && *pp);
- if(H5F_addr_defined(addr)) {
- for(u = 0; u < addr_len; u++) {
- *(*pp)++ = (uint8_t)(addr & 0xff);
- addr >>= 8;
- } /* end for */
- HDassert("overflow" && 0 == addr);
+ if (H5F_addr_defined(addr)) {
+ for (u = 0; u < addr_len; u++) {
+ *(*pp)++ = (uint8_t)(addr & 0xff);
+ addr >>= 8;
+ } /* end for */
+ HDassert("overflow" && 0 == addr);
} /* end if */
else {
- for(u = 0; u < addr_len; u++)
- *(*pp)++ = 0xff;
+ for (u = 0; u < addr_len; u++)
+ *(*pp)++ = 0xff;
} /* end else */
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_addr_encode_len() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_addr_encode
+ * Function: H5F_addr_encode
*
- * Purpose: Encodes an address into the buffer pointed to by *PP and
- * then increments the pointer to the first byte after the
- * address. An undefined value is stored as all 1's.
- *
- * Return: void
- *
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
+ * Purpose: Encodes an address into the buffer pointed to by *PP and
+ * then increments the pointer to the first byte after the
+ * address. An undefined value is stored as all 1's.
*
+ * Return: void
*-------------------------------------------------------------------------
*/
void
-H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr)
+H5F_addr_encode(const H5F_t *f, uint8_t **pp /*in,out*/, haddr_t addr)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1710,29 +1625,24 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr)
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_addr_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_addr_decode_len
- *
- * Purpose: Decodes an address from the buffer pointed to by *PP and
- * updates the pointer to point to the next byte after the
- * address.
- *
- * If the value read is all 1's then the address is returned
- * with an undefined value.
+ * Function: H5F_addr_decode_len
*
- * Return: void
+ * Purpose: Decodes an address from the buffer pointed to by *PP and
+ * updates the pointer to point to the next byte after the
+ * address.
*
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
+ * If the value read is all 1's then the address is returned
+ * with an undefined value.
*
+ * Return: void
*-------------------------------------------------------------------------
*/
void
-H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*out*/)
+H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *addr_p /*out*/)
{
- hbool_t all_zero = TRUE; /* True if address was all zeroes */
- unsigned u; /* Local index variable */
+ hbool_t all_zero = TRUE; /* True if address was all zeroes */
+ unsigned u; /* Local index variable */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1745,59 +1655,53 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr
*addr_p = 0;
/* Decode bytes from address */
- for(u = 0; u < addr_len; u++) {
- uint8_t c; /* Local decoded byte */
+ for (u = 0; u < addr_len; u++) {
+ uint8_t c; /* Local decoded byte */
/* Get decoded byte (and advance pointer) */
- c = *(*pp)++;
+ c = *(*pp)++;
/* Check for non-undefined address byte value */
- if(c != 0xff)
+ if (c != 0xff)
all_zero = FALSE;
- if(u < sizeof(*addr_p)) {
- haddr_t tmp = c; /* Local copy of address, for casting */
+ if (u < sizeof(*addr_p)) {
+ haddr_t tmp = c; /* Local copy of address, for casting */
/* Shift decoded byte to correct position */
- tmp <<= (u * 8); /*use tmp to get casting right */
+ tmp <<= (u * 8); /*use tmp to get casting right */
/* Merge into already decoded bytes */
- *addr_p |= tmp;
- } /* end if */
- else
- if(!all_zero)
- HDassert(0 == **pp); /*overflow */
- } /* end for */
+ *addr_p |= tmp;
+ } /* end if */
+ else if (!all_zero)
+ HDassert(0 == **pp); /*overflow */
+ } /* end for */
/* If 'all_zero' is still TRUE, the address was entirely composed of '0xff'
* bytes, which is the encoded form of 'HADDR_UNDEF', so set the destination
* to that value */
- if(all_zero)
+ if (all_zero)
*addr_p = HADDR_UNDEF;
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_addr_decode_len() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_addr_decode
- *
- * Purpose: Decodes an address from the buffer pointed to by *PP and
- * updates the pointer to point to the next byte after the
- * address.
+ * Function: H5F_addr_decode
*
- * If the value read is all 1's then the address is returned
- * with an undefined value.
+ * Purpose: Decodes an address from the buffer pointed to by *PP and
+ * updates the pointer to point to the next byte after the
+ * address.
*
- * Return: void
- *
- * Programmer: Robb Matzke
- * Friday, November 7, 1997
+ * If the value read is all 1's then the address is returned
+ * with an undefined value.
*
+ * Return: void
*-------------------------------------------------------------------------
*/
void
-H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*out*/)
+H5F_addr_decode(const H5F_t *f, const uint8_t **pp /*in,out*/, haddr_t *addr_p /*out*/)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1809,18 +1713,12 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_addr_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5F_set_grp_btree_shared
*
* Purpose: Set the grp_btree_shared field with a valid ref-count pointer.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * 7/19/11
- *
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
@@ -1839,18 +1737,12 @@ H5F_set_grp_btree_shared(H5F_t *f, H5RC_t *rc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_set_grp_btree_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5F_set_sohm_addr
*
* Purpose: Set the sohm_addr field with a new value.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * 7/20/11
- *
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
@@ -1868,18 +1760,12 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_set_sohm_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5F_set_sohm_vers
*
* Purpose: Set the sohm_vers field with a new value.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * 7/20/11
- *
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
@@ -1897,18 +1783,12 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_set_sohm_vers() */
-
/*-------------------------------------------------------------------------
* Function: H5F_set_sohm_nindexes
*
* Purpose: Set the sohm_nindexes field with a new value.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * 7/20/11
- *
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
@@ -1926,18 +1806,12 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_set_sohm_nindexes() */
-
/*-------------------------------------------------------------------------
* Function: H5F_set_store_msg_crt_idx
*
* Purpose: Set the store_msg_crt_idx field with a new value.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * 7/20/11
- *
+ * Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
herr_t
@@ -1955,35 +1829,30 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_set_store_msg_crt_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5F_get_file_image
*
* Purpose: Private version of H5Fget_file_image
*
* Return: Success: Bytes copied / number of bytes needed.
- * Failure: negative value
- *
- * Programmer: John Mainzer
- * 11/15/11
- *
+ * Failure: -1
*-------------------------------------------------------------------------
*/
ssize_t
H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
{
- H5FD_t *fd_ptr; /* file driver */
- haddr_t eoa; /* End of file address */
- ssize_t ret_value; /* Return value */
+ H5FD_t *fd_ptr; /* file driver */
+ haddr_t eoa; /* End of file address */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- if(!file || !file->shared || !file->shared->lf)
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file_id yields invalid file pointer")
+ if (!file || !file->shared || !file->shared->lf)
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, (-1), "file_id yields invalid file pointer")
fd_ptr = file->shared->lf;
- if(!fd_ptr->cls)
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "fd_ptr yields invalid class pointer")
+ if (!fd_ptr->cls)
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, (-1), "fd_ptr yields invalid class pointer")
/* the address space used by the split and multi file drivers is not
* a good fit for this call. Since the plan is to depreciate these
@@ -2003,54 +1872,54 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
*
* JRM -- 11/11/22
*/
- if(HDstrcmp(fd_ptr->cls->name, "multi") == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not supported for multi file driver.")
+ if (HDstrcmp(fd_ptr->cls->name, "multi") == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "Not supported for multi file driver.")
- /* While the family file driver is conceptually fully compatible
+ /* While the family file driver is conceptually fully compatible
* with the get file image operation, it sets a file driver message
* in the super block that prevents the image being opened with any
* driver other than the family file driver. Needless to say, this
* rather defeats the purpose of the get file image operation.
*
- * While this problem is quire solvable, the required time and
+ * While this problem is quire solvable, the required time and
* resources are lacking at present. Hence, for now, we don't
- * allow the get file image operation to be performed on files
+ * allow the get file image operation to be performed on files
* opened with the family file driver.
*
- * Observe that the following test only looks at the top level
+ * Observe that the following test only looks at the top level
* driver, and fails if there is some other driver sitting on to
- * of the family file driver.
+ * of the family file driver.
*
* I don't think this can happen at present, but that may change
* in the future.
* JRM -- 12/21/11
*/
- if(HDstrcmp(fd_ptr->cls->name, "family") == 0)
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver.")
+ if (HDstrcmp(fd_ptr->cls->name, "family") == 0)
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, (-1), "Not supported for family file driver.")
/* Go get the actual file size */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(file->shared->lf, H5FD_MEM_DEFAULT)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(file->shared->lf, H5FD_MEM_DEFAULT)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file size")
/* set ret_value = to eoa -- will overwrite this if appropriate */
ret_value = (ssize_t)eoa;
/* test to see if a buffer was provided -- if not, we are done */
- if(buf_ptr != NULL) {
- size_t space_needed; /* size of file image */
+ if (buf_ptr != NULL) {
+ size_t space_needed; /* size of file image */
/* Check for buffer too small */
- if((haddr_t)buf_len < eoa)
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "supplied buffer too small")
+ if ((haddr_t)buf_len < eoa)
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, (-1), "supplied buffer too small")
space_needed = (size_t)eoa;
/* read in the file image */
/* (Note compensation for base address addition in internal routine) */
- if(H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed")
+ if (H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_READERROR, (-1), "file image read request failed")
} /* end if */
-
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_get_file_image() */
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 4af825b..491bef3 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Fio.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File I/O routines.
*
@@ -26,55 +26,45 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5F_block_read
*
@@ -85,43 +75,41 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- hid_t dxpl_id, void *buf/*out*/)
+H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id, void *buf /*out*/)
{
- H5F_io_info_t fio_info; /* I/O info for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_io_info_t fio_info; /* I/O info for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
+ /* Sanity checks */
HDassert(f);
HDassert(f->shared);
HDassert(buf);
HDassert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
- if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
+ if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Pass through metadata accumulator layer */
- if(H5F__accum_read(&fio_info, type, addr, size, buf) < 0)
+ if (H5F__accum_read(&fio_info, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through metadata accumulator failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_block_read() */
-
/*-------------------------------------------------------------------------
* Function: H5F_block_write
*
@@ -132,23 +120,19 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- hid_t dxpl_id, const void *buf)
+H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id, const void *buf)
{
- H5F_io_info_t fio_info; /* I/O info for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_io_info_t fio_info; /* I/O info for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
-#ifdef QAK
-HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size);
-#endif /* QAK */
+ /* Sanity checks */
HDassert(f);
HDassert(f->shared);
HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
@@ -156,19 +140,18 @@ HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size);
HDassert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
- if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
+ if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Pass through metadata accumulator layer */
- if(H5F__accum_write(&fio_info, type, addr, size, buf) < 0)
+ if (H5F__accum_write(&fio_info, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through metadata accumulator failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_block_write() */
-
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 7cbaa72..6543dd5 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -6,34 +6,31 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F_init_mount_interface
-
+#define H5_INTERFACE_INIT_FUNC H5F_init_mount_interface
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* PRIVATE PROTOTYPES */
-static herr_t H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
- hid_t plist_id, hid_t dxpl_id);
+static herr_t H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id, hid_t dxpl_id);
static herr_t H5F_unmount(H5G_loc_t *loc, const char *name, hid_t dxpl_id);
-static void H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs);
+static void H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs);
-
/*--------------------------------------------------------------------------
NAME
H5F_init_mount_interface -- Initialize interface-specific information
@@ -55,7 +52,6 @@ H5F_init_mount_interface(void)
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_mount_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5F_close_mounts
*
@@ -71,8 +67,8 @@ H5F_init_mount_interface(void)
herr_t
H5F_close_mounts(H5F_t *f)
{
- unsigned u; /* Local index */
- herr_t ret_value=SUCCEED; /* Return value */
+ unsigned u; /* Local index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -80,28 +76,29 @@ H5F_close_mounts(H5F_t *f)
/* Unmount all child files. Loop backwards to avoid having to adjust u when
* a file is unmounted. Note that we rely on unsigned u "wrapping around"
- * to terminate the loop. */
+ * to terminate the loop.
+ */
for (u = f->shared->mtab.nmounts - 1; u < f->shared->mtab.nmounts; u--) {
/* Only unmount children mounted to this top level file structure */
- if(f->shared->mtab.child[u].file->parent == f) {
+ if (f->shared->mtab.child[u].file->parent == f) {
/* Detach the child file from the parent file */
f->shared->mtab.child[u].file->parent = NULL;
/* Close the internal group maintaining the mount point */
- if(H5G_close(f->shared->mtab.child[u].group) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close child group")
+ if (H5G_close(f->shared->mtab.child[u].group) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close child group")
/* Close the child file */
- if(H5F_try_close(f->shared->mtab.child[u].file) < 0)
+ if (H5F_try_close(f->shared->mtab.child[u].file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close child file")
/* Eliminate the mount point from the table */
HDmemmove(f->shared->mtab.child + u, f->shared->mtab.child + u + 1,
- (f->shared->mtab.nmounts - u - 1) * sizeof(f->shared->mtab.child[0]));
+ (f->shared->mtab.nmounts - u - 1) * sizeof(f->shared->mtab.child[0]));
f->shared->mtab.nmounts--;
f->nmounts--;
}
- } /* end if */
+ }
HDassert(f->nmounts == 0);
@@ -109,7 +106,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_close_mounts() */
-
/*-------------------------------------------------------------------------
* Function: H5F_mount
*
@@ -125,19 +121,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
- hid_t H5_ATTR_UNUSED plist_id, hid_t dxpl_id)
+H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UNUSED plist_id, hid_t dxpl_id)
{
- H5G_t *mount_point = NULL; /*mount point group */
- H5F_t *ancestor = NULL; /*ancestor files */
- H5F_t *parent = NULL; /*file containing mount point */
- unsigned lt, rt, md; /*binary search indices */
- int cmp; /*binary search comparison value*/
- H5G_loc_t mp_loc; /* entry of moint point to be opened */
- H5G_name_t mp_path; /* Mount point group hier. path */
- H5O_loc_t mp_oloc; /* Mount point object location */
- H5G_loc_t root_loc; /* Group location of root of file to mount */
- herr_t ret_value = SUCCEED; /*return value */
+ H5G_t * mount_point = NULL; /*mount point group */
+ H5F_t * ancestor = NULL; /*ancestor files */
+ H5F_t * parent = NULL; /*file containing mount point */
+ unsigned lt, rt, md; /*binary search indices */
+ int cmp; /*binary search comparison value*/
+ H5G_loc_t mp_loc; /* entry of moint point to be opened */
+ H5G_name_t mp_path; /* Mount point group hier. path */
+ H5O_loc_t mp_oloc; /* Mount point object location */
+ H5G_loc_t root_loc; /* Group location of root of file to mount */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -157,24 +152,24 @@ H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
* the parent & child files have the same file close degree, and
* that the mount wouldn't introduce a cycle in the mount tree.
*/
- if(child->parent)
+ if (child->parent)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "file is already mounted")
- if(H5G_loc_find(loc, name, &mp_loc/*out*/, H5P_DEFAULT, dxpl_id) < 0)
+ if (H5G_loc_find(loc, name, &mp_loc /*out*/, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
/* If the mount location is holding its file open, that file will close
* and remove the mount as soon as we exit this function. Prevent the
* user from doing this.
*/
- if(mp_loc.oloc->holding_file != FALSE)
+ if (mp_loc.oloc->holding_file != FALSE)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount path cannot contain links to external files")
/* Open the mount point group */
- if(NULL == (mount_point = H5G_open(&mp_loc, dxpl_id)))
+ if (NULL == (mount_point = H5G_open(&mp_loc, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found")
/* Check if the proposed mount point group is already a mount point */
- if(H5G_MOUNTED(mount_point))
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use")
+ if (H5G_MOUNTED(mount_point))
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use")
/* Retrieve information from the mount point group */
/* (Some of which we had before but was reset in mp_loc when the group
@@ -186,13 +181,13 @@ H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
HDassert(mp_loc.oloc);
mp_loc.path = H5G_nameof(mount_point);
HDassert(mp_loc.path);
- for(ancestor = parent; ancestor; ancestor = ancestor->parent) {
- if(ancestor->shared == child->shared)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount would introduce a cycle")
- } /* end for */
+ for (ancestor = parent; ancestor; ancestor = ancestor->parent) {
+ if (ancestor->shared == child->shared)
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount would introduce a cycle")
+ }
/* Make certain that the parent & child files have the same "file close degree" */
- if(parent->shared->fc_degree != child->shared->fc_degree)
+ if (parent->shared->fc_degree != child->shared->fc_degree)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mounted file has different file close degree than parent")
/*
@@ -201,77 +196,76 @@ H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
* `md' will be the index where the child should be inserted.
*/
lt = md = 0;
- rt = parent->shared->mtab.nmounts;
- cmp = -1;
- while(lt < rt && cmp) {
- H5O_loc_t *oloc; /*temporary symbol table entry */
-
- md = (lt + rt) / 2;
- oloc = H5G_oloc(parent->shared->mtab.child[md].group);
- cmp = H5F_addr_cmp(mp_loc.oloc->addr, oloc->addr);
- if(cmp < 0)
- rt = md;
- else if(cmp > 0)
- lt = md + 1;
- } /* end while */
- if(cmp > 0)
+ rt = parent->shared->mtab.nmounts;
+ cmp = -1;
+ while (lt < rt && cmp) {
+ H5O_loc_t *oloc; /*temporary symbol table entry */
+
+ md = (lt + rt) / 2;
+ oloc = H5G_oloc(parent->shared->mtab.child[md].group);
+ cmp = H5F_addr_cmp(mp_loc.oloc->addr, oloc->addr);
+ if (cmp < 0)
+ rt = md;
+ else if (cmp > 0)
+ lt = md + 1;
+ }
+ if (cmp > 0)
md++;
- if(!cmp)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use")
+ if (!cmp)
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use")
/* Make room in the table */
- if(parent->shared->mtab.nmounts >= parent->shared->mtab.nalloc) {
- unsigned n = MAX(16, 2 * parent->shared->mtab.nalloc);
- H5F_mount_t *x = (H5F_mount_t *)H5MM_realloc(parent->shared->mtab.child, n * sizeof(parent->shared->mtab.child[0]));
+ if (parent->shared->mtab.nmounts >= parent->shared->mtab.nalloc) {
+ unsigned n = MAX(16, 2 * parent->shared->mtab.nalloc);
+ H5F_mount_t *x = (H5F_mount_t *)H5MM_realloc(parent->shared->mtab.child,
+ n * sizeof(parent->shared->mtab.child[0]));
- if(!x)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for mount table")
- parent->shared->mtab.child = x;
- parent->shared->mtab.nalloc = n;
- } /* end if */
+ if (!x)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for mount table")
+ parent->shared->mtab.child = x;
+ parent->shared->mtab.nalloc = n;
+ }
/* Insert into table */
HDmemmove(parent->shared->mtab.child + md + 1, parent->shared->mtab.child + md,
- (parent->shared->mtab.nmounts-md) * sizeof(parent->shared->mtab.child[0]));
+ (parent->shared->mtab.nmounts - md) * sizeof(parent->shared->mtab.child[0]));
parent->shared->mtab.nmounts++;
parent->nmounts++;
parent->shared->mtab.child[md].group = mount_point;
- parent->shared->mtab.child[md].file = child;
- child->parent = parent;
+ parent->shared->mtab.child[md].file = child;
+ child->parent = parent;
/* Set the group's mountpoint flag */
- if(H5G_mount(parent->shared->mtab.child[md].group) < 0)
+ if (H5G_mount(parent->shared->mtab.child[md].group) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to set group mounted flag")
/* Get the group location for the root group in the file to unmount */
- if(NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp)))
+ if (NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (root_loc.path = H5G_nameof(child->shared->root_grp)))
+ if (NULL == (root_loc.path = H5G_nameof(child->shared->root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
/* Search the open IDs and replace names for mount operation */
/* We pass H5G_UNKNOWN as object type; search all IDs */
- if(H5G_name_replace(NULL, H5G_NAME_MOUNT, mp_loc.oloc->file,
- mp_loc.path->full_path_r, root_loc.oloc->file, root_loc.path->full_path_r,
- dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to replace name")
+ if (H5G_name_replace(NULL, H5G_NAME_MOUNT, mp_loc.oloc->file, mp_loc.path->full_path_r,
+ root_loc.oloc->file, root_loc.path->full_path_r, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to replace name")
done:
- if(ret_value < 0) {
- if(mount_point) {
- if(H5G_close(mount_point) < 0)
+ if (ret_value < 0) {
+ if (mount_point) {
+ if (H5G_close(mount_point) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close mounted group")
- } /* end if */
+ }
else {
- if(H5G_loc_free(&mp_loc) < 0)
+ if (H5G_loc_free(&mp_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free mount location")
- } /* end else */
- } /* end if */
+ }
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mount() */
-
/*-------------------------------------------------------------------------
* Function: H5F_unmount
*
@@ -293,17 +287,17 @@ done:
static herr_t
H5F_unmount(H5G_loc_t *loc, const char *name, hid_t dxpl_id)
{
- H5G_t *child_group = NULL; /* Child's group in parent mtab */
- H5F_t *child = NULL; /*mounted file */
- H5F_t *parent = NULL; /*file where mounted */
- H5O_loc_t *mnt_oloc; /* symbol table entry for root of mounted file */
- H5G_name_t mp_path; /* Mount point group hier. path */
- H5O_loc_t mp_oloc; /* Mount point object location */
- H5G_loc_t mp_loc; /* entry used to open mount point*/
- hbool_t mp_loc_setup = FALSE; /* Whether mount point location is set up */
- H5G_loc_t root_loc; /* Group location of root of file to unmount */
- int child_idx; /* Index of child in parent's mtab */
- herr_t ret_value = SUCCEED; /*return value */
+ H5G_t * child_group = NULL; /* Child's group in parent mtab */
+ H5F_t * child = NULL; /*mounted file */
+ H5F_t * parent = NULL; /*file where mounted */
+ H5O_loc_t *mnt_oloc; /* symbol table entry for root of mounted file */
+ H5G_name_t mp_path; /* Mount point group hier. path */
+ H5O_loc_t mp_oloc; /* Mount point object location */
+ H5G_loc_t mp_loc; /* entry used to open mount point*/
+ hbool_t mp_loc_setup = FALSE; /* Whether mount point location is set up */
+ H5G_loc_t root_loc; /* Group location of root of file to unmount */
+ int child_idx; /* Index of child in parent's mtab */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -320,59 +314,61 @@ H5F_unmount(H5G_loc_t *loc, const char *name, hid_t dxpl_id)
* If we get the root group and the file has a parent in the mount tree,
* then we must have found the mount point.
*/
- if(H5G_loc_find(loc, name, &mp_loc/*out*/, H5P_DEFAULT, dxpl_id) < 0)
+ if (H5G_loc_find(loc, name, &mp_loc /*out*/, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
mp_loc_setup = TRUE;
- child = mp_loc.oloc->file;
- mnt_oloc = H5G_oloc(child->shared->root_grp);
- child_idx = -1;
-
- if(child->parent && H5F_addr_eq(mp_oloc.addr, mnt_oloc->addr)) {
- unsigned u; /*counters */
-
- /*
- * We've been given the root group of the child. We do a reverse
- * lookup in the parent's mount table to find the correct entry.
- */
- parent = child->parent;
- for(u = 0; u < parent->shared->mtab.nmounts; u++) {
- if(parent->shared->mtab.child[u].file->shared == child->shared) {
+ child = mp_loc.oloc->file;
+ mnt_oloc = H5G_oloc(child->shared->root_grp);
+ child_idx = -1;
+
+ if (child->parent && H5F_addr_eq(mp_oloc.addr, mnt_oloc->addr)) {
+ unsigned u; /*counters */
+
+ /*
+ * We've been given the root group of the child. We do a reverse
+ * lookup in the parent's mount table to find the correct entry.
+ */
+ parent = child->parent;
+ for (u = 0; u < parent->shared->mtab.nmounts; u++) {
+ if (parent->shared->mtab.child[u].file->shared == child->shared) {
/* Found the correct index */
child_idx = (int)u;
break;
- } /* end if */
- } /* end for */
- } else {
- unsigned lt, rt, md = 0; /*binary search indices */
- int cmp; /*binary search comparison value*/
-
- /*
- * We've been given the mount point in the parent. We use a binary
- * search in the parent to locate the mounted file, if any.
- */
- parent = child; /*we guessed wrong*/
- lt = 0;
- rt = parent->shared->mtab.nmounts;
- cmp = -1;
- while(lt < rt && cmp) {
- md = (lt + rt) / 2;
- mnt_oloc = H5G_oloc(parent->shared->mtab.child[md].group);
- cmp = H5F_addr_cmp(mp_oloc.addr, mnt_oloc->addr);
- if (cmp<0)
- rt = md;
- else
- lt = md + 1;
- } /* end while */
- if(cmp)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "not a mount point")
+ }
+ }
+ }
+ else {
+ unsigned lt, rt, md = 0; /*binary search indices */
+ int cmp; /*binary search comparison value*/
+
+ /* We've been given the mount point in the parent. We use a binary
+ * search in the parent to locate the mounted file, if any.
+ */
+ parent = child; /*we guessed wrong*/
+ lt = 0;
+ rt = parent->shared->mtab.nmounts;
+ cmp = -1;
+
+ while (lt < rt && cmp) {
+ md = (lt + rt) / 2;
+ mnt_oloc = H5G_oloc(parent->shared->mtab.child[md].group);
+ cmp = H5F_addr_cmp(mp_oloc.addr, mnt_oloc->addr);
+ if (cmp < 0)
+ rt = md;
+ else
+ lt = md + 1;
+ }
+
+ if (cmp)
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "not a mount point")
/* Found the correct index, set the info about the child */
child_idx = (int)md;
H5G_loc_free(&mp_loc);
mp_loc_setup = FALSE;
- mp_loc.oloc = mnt_oloc;
- mp_loc.path = H5G_nameof(parent->shared->mtab.child[md].group);
- child = parent->shared->mtab.child[child_idx].file;
+ mp_loc.oloc = mnt_oloc;
+ mp_loc.path = H5G_nameof(parent->shared->mtab.child[md].group);
+ child = parent->shared->mtab.child[child_idx].file;
/* Set the parent to be the actual parent of the discovered child.
* Could be different due to the shared mount table. */
@@ -384,43 +380,43 @@ H5F_unmount(H5G_loc_t *loc, const char *name, hid_t dxpl_id)
child_group = parent->shared->mtab.child[child_idx].group;
/* Get the group location for the root group in the file to unmount */
- if(NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp)))
+ if (NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (root_loc.path = H5G_nameof(child->shared->root_grp)))
+ if (NULL == (root_loc.path = H5G_nameof(child->shared->root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
/* Search the open IDs replace names to reflect unmount operation */
- if(H5G_name_replace(NULL, H5G_NAME_UNMOUNT, mp_loc.oloc->file,
- mp_loc.path->full_path_r, root_loc.oloc->file, root_loc.path->full_path_r,
- dxpl_id) < 0)
+ if (H5G_name_replace(NULL, H5G_NAME_UNMOUNT, mp_loc.oloc->file, mp_loc.path->full_path_r,
+ root_loc.oloc->file, root_loc.path->full_path_r, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to replace name")
/* Eliminate the mount point from the table */
- HDmemmove(parent->shared->mtab.child + (unsigned)child_idx, (parent->shared->mtab.child + (unsigned)child_idx) + 1,
- ((parent->shared->mtab.nmounts - (unsigned)child_idx) - 1) * sizeof(parent->shared->mtab.child[0]));
+ HDmemmove(parent->shared->mtab.child + (unsigned)child_idx,
+ (parent->shared->mtab.child + (unsigned)child_idx) + 1,
+ ((parent->shared->mtab.nmounts - (unsigned)child_idx) - 1) *
+ sizeof(parent->shared->mtab.child[0]));
parent->shared->mtab.nmounts -= 1;
parent->nmounts -= 1;
/* Unmount the child file from the parent file */
- if(H5G_unmount(child_group) < 0)
+ if (H5G_unmount(child_group) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to reset group mounted flag")
- if(H5G_close(child_group) < 0)
+ if (H5G_close(child_group) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close unmounted group")
/* Detach child file from parent & see if it should close */
child->parent = NULL;
- if(H5F_try_close(child) < 0)
+ if (H5F_try_close(child) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close unmounted file")
done:
/* Free the mount point location's information, if it's been set up */
- if(mp_loc_setup)
+ if (mp_loc_setup)
H5G_loc_free(&mp_loc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_unmount() */
-
/*-------------------------------------------------------------------------
* Function: H5F_is_mount
*
@@ -437,13 +433,13 @@ done:
hbool_t
H5F_is_mount(const H5F_t *file)
{
- hbool_t ret_value; /* Return value */
+ hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
- if(file->parent != NULL)
+ if (file->parent != NULL)
ret_value = TRUE;
else
ret_value = FALSE;
@@ -451,102 +447,92 @@ H5F_is_mount(const H5F_t *file)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_is_mount() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fmount
+ * Function: H5Fmount
*
- * Purpose: Mount file CHILD_ID onto the group specified by LOC_ID and
- * NAME using mount properties PLIST_ID.
+ * Purpose: Mount file CHILD_ID onto the group specified by LOC_ID and
+ * NAME using mount properties PLIST_ID.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Tuesday, October 6, 1998
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
{
- H5G_loc_t loc;
- H5F_t *child = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc;
+ H5F_t * child = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sii", loc_id, name, child_id, plist_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(NULL == (child = (H5F_t *)H5I_object_verify(child_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
- if(H5P_DEFAULT == plist_id)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (NULL == (child = (H5F_t *)H5I_object_verify(child_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (H5P_DEFAULT == plist_id)
plist_id = H5P_FILE_MOUNT_DEFAULT;
- else
- if(TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property list")
+ else if (TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property list")
/* Do the mount */
- if(H5F_mount(&loc, name, child, plist_id, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file")
+ if (H5F_mount(&loc, name, child, plist_id, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fmount() */
-
/*-------------------------------------------------------------------------
- * Function: H5Funmount
+ * Function: H5Funmount
*
- * Purpose: Given a mount point, dissassociate the mount point's file
- * from the file mounted there. Do not close either file.
+ * Purpose: Given a mount point, dissassociate the mount point's file
+ * from the file mounted there. Do not close either file.
*
- * The mount point can either be the group in the parent or the
- * root group of the mounted file (both groups have the same
- * name). If the mount point was opened before the mount then
- * it's the group in the parent, but if it was opened after the
- * mount then it's the root group of the child.
+ * The mount point can either be the group in the parent or the
+ * root group of the mounted file (both groups have the same
+ * name). If the mount point was opened before the mount then
+ * it's the group in the parent, but if it was opened after the
+ * mount then it's the root group of the child.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Tuesday, October 6, 1998
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Funmount(hid_t loc_id, const char *name)
{
- H5G_loc_t loc;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5G_loc_t loc;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
- /* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ /* Check arguments */
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- /* Unmount */
+ /* Perform the unmount operation */
if (H5F_unmount(&loc, name, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file")
+ HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Funmount() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_mount_count_ids_recurse
+ * Function: H5F_mount_count_ids_recurse
*
- * Purpose: Helper routine for counting number of open IDs in mount
+ * Purpose: Helper routine for counting number of open IDs in mount
* hierarchy.
*
- * Return: <none>
+ * Return: void
*
* Programmer: Quincey Koziol
* Tuesday, July 19, 2005
@@ -556,7 +542,7 @@ done:
static void
H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
{
- unsigned u; /* Local index value */
+ unsigned u; /* Local index value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -566,7 +552,7 @@ H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_obj
HDassert(nopen_objs);
/* If this file is still open, increment number of file IDs open */
- if(f->file_id > 0)
+ if (f->file_id > 0)
*nopen_files += 1;
/* Increment number of open objects in file
@@ -576,27 +562,26 @@ H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_obj
*nopen_objs += (f->nopen_objs - f->nmounts);
/* Iterate over files mounted in this file and add in their open ID counts also */
- for(u = 0; u < f->shared->mtab.nmounts; u++) {
+ for (u = 0; u < f->shared->mtab.nmounts; u++) {
/* Only recurse on children mounted to this top level file structure */
- if(f->shared->mtab.child[u].file->parent == f) {
+ if (f->shared->mtab.child[u].file->parent == f) {
/* Increment the open object count if the mount point group has an open ID */
- if(H5G_get_shared_count(f->shared->mtab.child[u].group) > 1)
+ if (H5G_get_shared_count(f->shared->mtab.child[u].group) > 1)
*nopen_objs += 1;
H5F_mount_count_ids_recurse(f->shared->mtab.child[u].file, nopen_files, nopen_objs);
}
- } /* end for */
+ }
FUNC_LEAVE_NOAPI_VOID
} /* end H5F_mount_count_ids_recurse() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_mount_count_ids
+ * Function: H5F_mount_count_ids
*
- * Purpose: Count the number of open file & object IDs in a mount hierarchy
+ * Purpose: Count the number of open file & object IDs in a mount hierarchy
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Tues, July 19, 2005
@@ -614,7 +599,7 @@ H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
HDassert(nopen_objs);
/* Find the top file in the mounting hierarchy */
- while(f->parent)
+ while (f->parent)
f = f->parent;
/* Count open IDs in the hierarchy */
@@ -623,7 +608,6 @@ H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F_mount_count_ids() */
-
/*-------------------------------------------------------------------------
* Function: H5F_flush_mounts_recurse
*
@@ -639,9 +623,9 @@ H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
static herr_t
H5F_flush_mounts_recurse(H5F_t *f, hid_t dxpl_id)
{
- unsigned nerrors = 0; /* Errors from recursive flushes */
- unsigned u; /* Index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned nerrors = 0; /* Errors from recursive flushes */
+ unsigned u; /* Index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -649,29 +633,28 @@ H5F_flush_mounts_recurse(H5F_t *f, hid_t dxpl_id)
HDassert(f);
/* Flush all child files, not stopping for errors */
- for(u = 0; u < f->shared->mtab.nmounts; u++)
- if(H5F_flush_mounts_recurse(f->shared->mtab.child[u].file, dxpl_id) < 0)
+ for (u = 0; u < f->shared->mtab.nmounts; u++)
+ if (H5F_flush_mounts_recurse(f->shared->mtab.child[u].file, dxpl_id) < 0)
nerrors++;
/* Call the "real" flush routine, for this file */
- if(H5F_flush(f, dxpl_id, FALSE) < 0)
+ if (H5F_flush(f, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")
/* Check flush errors for children - errors are already on the stack */
- if(nerrors)
+ if (nerrors)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's child mounts")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_flush_mounts_recurse() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_flush_mounts
+ * Function: H5F_flush_mounts
*
- * Purpose: Flush a mount hierarchy
+ * Purpose: Flush a mount hierarchy
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Fri, August 21, 2009
@@ -681,7 +664,7 @@ done:
herr_t
H5F_flush_mounts(H5F_t *f, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -689,18 +672,17 @@ H5F_flush_mounts(H5F_t *f, hid_t dxpl_id)
HDassert(f);
/* Find the top file in the mount hierarchy */
- while(f->parent)
+ while (f->parent)
f = f->parent;
/* Flush the mounted file hierarchy */
- if(H5F_flush_mounts_recurse(f, dxpl_id) < 0)
+ if (H5F_flush_mounts_recurse(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_flush_mounts() */
-
/*-------------------------------------------------------------------------
* Function: H5F_traverse_mount
*
@@ -715,14 +697,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
+H5F_traverse_mount(H5O_loc_t *oloc /*in,out*/)
{
- H5F_t *parent = oloc->file, /* File of object */
- *child = NULL; /* Child file */
- unsigned lt, rt, md = 0; /* Binary search indices */
- int cmp;
- H5O_loc_t *mnt_oloc = NULL; /* Object location for mount points */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *parent = oloc->file, /* File of object */
+ *child = NULL; /* Child file */
+ unsigned lt, rt, md = 0; /* Binary search indices */
+ int cmp;
+ H5O_loc_t *mnt_oloc = NULL; /* Object location for mount points */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -734,25 +716,25 @@ H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
* of file2, which is mounted somewhere in file3.
*/
do {
- /*
- * Use a binary search to find the potential mount point in the mount
- * table for the parent
- */
- lt = 0;
- rt = parent->shared->mtab.nmounts;
- cmp = -1;
- while(lt < rt && cmp) {
- md = (lt + rt) / 2;
- mnt_oloc = H5G_oloc(parent->shared->mtab.child[md].group);
- cmp = H5F_addr_cmp(oloc->addr, mnt_oloc->addr);
- if(cmp < 0)
- rt = md;
- else
- lt = md + 1;
- } /* end while */
+ /*
+ * Use a binary search to find the potential mount point in the mount
+ * table for the parent
+ */
+ lt = 0;
+ rt = parent->shared->mtab.nmounts;
+ cmp = -1;
+ while (lt < rt && cmp) {
+ md = (lt + rt) / 2;
+ mnt_oloc = H5G_oloc(parent->shared->mtab.child[md].group);
+ cmp = H5F_addr_cmp(oloc->addr, mnt_oloc->addr);
+ if (cmp < 0)
+ rt = md;
+ else
+ lt = md + 1;
+ }
/* Copy root info over to ENT */
- if(0 == cmp) {
+ if (0 == cmp) {
/* Get the child file */
child = parent->shared->mtab.child[md].file;
@@ -760,11 +742,11 @@ H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
mnt_oloc = H5G_oloc(child->shared->root_grp);
/* Release the mount point */
- if(H5O_loc_free(oloc) < 0)
+ if (H5O_loc_free(oloc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location")
/* Copy the entry for the root group */
- if(H5O_loc_copy(oloc, mnt_oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(oloc, mnt_oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
/* In case the shared root group info points to a different file handle
@@ -774,9 +756,8 @@ H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
/* Switch to child's file */
parent = child;
} /* end if */
- } while(!cmp);
+ } while (!cmp);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_traverse_mount() */
-
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 3d6ef49..b6aa63c 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Fmpi.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: MPI-related routines.
*
@@ -26,124 +26,109 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5F_mpi_get_rank
+ * Function: H5F_mpi_get_rank
*
- * Purpose: Retrieves the rank of an MPI process.
+ * Purpose: Retrieves the rank of an MPI process.
*
- * Return: Success: The rank (non-negative)
+ * Return: Success: The rank (non-negative)
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
H5F_mpi_get_rank(const H5F_t *f)
{
- int ret_value;
+ int ret_value = -1;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
HDassert(f && f->shared);
/* Dispatch to driver */
- if ((ret_value=H5FD_mpi_get_rank(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
+ if ((ret_value = H5FD_mpi_get_rank(f->shared->lf)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_rank request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_get_rank() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_mpi_get_comm
+ * Function: H5F_mpi_get_comm
*
- * Purpose: Retrieves the file's communicator
+ * Purpose: Retrieves the file's communicator
*
- * Return: Success: The communicator (non-negative)
+ * Return: Success: The communicator (non-negative)
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
MPI_Comm
H5F_mpi_get_comm(const H5F_t *f)
{
- MPI_Comm ret_value;
+ MPI_Comm ret_value = MPI_COMM_NULL;
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
HDassert(f && f->shared);
/* Dispatch to driver */
- if ((ret_value=H5FD_mpi_get_comm(f->shared->lf))==MPI_COMM_NULL)
+ if ((ret_value = H5FD_mpi_get_comm(f->shared->lf)) == MPI_COMM_NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_get_comm() */
-
/*-------------------------------------------------------------------------
* Function: H5F_mpi_get_size
*
@@ -156,105 +141,94 @@ done:
* Programmer: John Mainzer
* Friday, May 6, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
H5F_mpi_get_size(const H5F_t *f)
{
- int ret_value;
+ int ret_value = -1;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
HDassert(f && f->shared);
/* Dispatch to driver */
- if ((ret_value=H5FD_mpi_get_size(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed")
+ if ((ret_value = H5FD_mpi_get_size(f->shared->lf)) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "driver get_size request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_get_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fset_mpi_atomicity
- *
- * Purpose: Sets the atomicity mode
+ * Function: H5Fset_mpi_atomicity
*
- * Return: Success: Non-negative
+ * Purpose: Private call to set the atomicity mode
*
- * Failure: Negative
- *
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag)
{
- H5F_t *file;
- herr_t ret_value = SUCCEED;
+ H5F_t *file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ib", file_id, flag);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Check VFD */
- if(!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
+ if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "incorrect VFL driver, does not support MPI atomicity mode")
- /* set atomicity value */
- if (H5FD_set_mpio_atomicity (file->shared->lf, flag) < 0)
+ /* Set atomicity value */
+ if (H5FD_set_mpio_atomicity(file->shared->lf, flag) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set atomicity flag")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Fset_mpi_atomicity() */
-
/*-------------------------------------------------------------------------
- * Function: H5Fget_mpi_atomicity
+ * Function: H5Fget_mpi_atomicity
*
- * Purpose: Returns the atomicity mode
+ * Purpose: Returns the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Failure: Negative
- *
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
herr_t
H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag)
{
- H5F_t *file;
- herr_t ret_value = SUCCEED;
+ H5F_t *file;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*b", file_id, flag);
/* Check args */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Check VFD */
- if(!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
+ if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "incorrect VFL driver, does not support MPI atomicity mode")
- /* get atomicity value */
- if (H5FD_get_mpio_atomicity (file->shared->lf, flag) < 0)
+ /* Get atomicity value */
+ if (H5FD_get_mpio_atomicity(file->shared->lf, flag) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get atomicity flag")
done:
FUNC_LEAVE_API(ret_value)
}
#endif /* H5_HAVE_PARALLEL */
-
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index e90123f..c27f3ac 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose: This file contains declarations which are visible only within
@@ -30,94 +30,89 @@
#include "H5Fprivate.h"
/* Other public headers needed by this file */
-#include "H5Bpublic.h" /* B-tree header, for H5B_NUM_BTREE_ID */
+#include "H5Bpublic.h" /* B-tree header, for H5B_NUM_BTREE_ID */
/* Other private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5FOprivate.h" /* File objects */
-#include "H5FSprivate.h" /* File free space */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Oprivate.h" /* Object header messages */
-#include "H5RCprivate.h" /* Reference counted object functions */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5FOprivate.h" /* File objects */
+#include "H5FSprivate.h" /* File free space */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Oprivate.h" /* Object header messages */
+#include "H5RCprivate.h" /* Reference counted object functions */
/*
* Feature: Define this constant on the compiler command-line if you want to
* see some debugging messages on the debug stream.
*/
#ifdef NDEBUG
-# undef H5F_DEBUG
+#undef H5F_DEBUG
#endif
/* Superblock status flags */
-#define H5F_SUPER_WRITE_ACCESS 0x01
-#define H5F_SUPER_FILE_OK 0x02
-#define H5F_SUPER_ALL_FLAGS (H5F_SUPER_WRITE_ACCESS | H5F_SUPER_FILE_OK)
+#define H5F_SUPER_WRITE_ACCESS 0x01
+#define H5F_SUPER_FILE_OK 0x02
+#define H5F_SUPER_ALL_FLAGS (H5F_SUPER_WRITE_ACCESS | H5F_SUPER_FILE_OK)
/* Mask for removing private file access flags */
-#define H5F_ACC_PUBLIC_FLAGS 0x001fu
+#define H5F_ACC_PUBLIC_FLAGS 0x001fu
/* Free space section+aggregator merge flags */
-#define H5F_FS_MERGE_METADATA 0x01 /* Section can merge with metadata aggregator */
-#define H5F_FS_MERGE_RAWDATA 0x02 /* Section can merge with small 'raw' data aggregator */
+#define H5F_FS_MERGE_METADATA 0x01 /* Section can merge with metadata aggregator */
+#define H5F_FS_MERGE_RAWDATA 0x02 /* Section can merge with small 'raw' data aggregator */
/* Macro to abstract checking whether file is using a free space manager */
-#define H5F_HAVE_FREE_SPACE_MANAGER(F) TRUE /* Currently always have a free space manager */
+#define H5F_HAVE_FREE_SPACE_MANAGER(F) TRUE /* Currently always have a free space manager */
/* Macros for encoding/decoding superblock */
-#define H5F_MAX_DRVINFOBLOCK_SIZE 1024 /* Maximum size of superblock driver info buffer */
-#define H5F_DRVINFOBLOCK_HDR_SIZE 16 /* Size of superblock driver info header */
+#define H5F_MAX_DRVINFOBLOCK_SIZE 1024 /* Maximum size of superblock driver info buffer */
+#define H5F_DRVINFOBLOCK_HDR_SIZE 16 /* Size of superblock driver info header */
/* Superblock sizes for various versions */
-#define H5F_SIZEOF_CHKSUM 4 /* Checksum size in the file */
+#define H5F_SIZEOF_CHKSUM 4 /* Checksum size in the file */
/* Fixed-size portion at the beginning of all superblocks */
-#define H5F_SUPERBLOCK_FIXED_SIZE ( H5F_SIGNATURE_LEN \
- + 1) /* superblock version */
+#define H5F_SUPERBLOCK_FIXED_SIZE (H5F_SIGNATURE_LEN + 1) /* superblock version */
/* Macros for computing variable-size superblock size */
-#define H5F_SUPERBLOCK_VARLEN_SIZE_COMMON \
- (2 /* freespace, and root group versions */ \
- + 1 /* reserved */ \
- + 3 /* shared header vers, size of address, size of lengths */ \
- + 1 /* reserved */ \
- + 4 /* group leaf k, group internal k */ \
- + 4) /* consistency flags */
-#define H5F_SUPERBLOCK_VARLEN_SIZE_V0(f) \
- ( H5F_SUPERBLOCK_VARLEN_SIZE_COMMON /* Common variable-length info */ \
- + H5F_SIZEOF_ADDR(f) /* base address */ \
- + H5F_SIZEOF_ADDR(f) /* <unused> */ \
- + H5F_SIZEOF_ADDR(f) /* EOF address */ \
- + H5F_SIZEOF_ADDR(f) /* driver block address */ \
- + H5G_SIZEOF_ENTRY(f)) /* root group ptr */
-#define H5F_SUPERBLOCK_VARLEN_SIZE_V1(f) \
- ( H5F_SUPERBLOCK_VARLEN_SIZE_COMMON /* Common variable-length info */ \
- + 2 /* indexed B-tree internal k */ \
- + 2 /* reserved */ \
- + H5F_SIZEOF_ADDR(f) /* base address */ \
- + H5F_SIZEOF_ADDR(f) /* <unused> */ \
- + H5F_SIZEOF_ADDR(f) /* EOF address */ \
- + H5F_SIZEOF_ADDR(f) /* driver block address */ \
- + H5G_SIZEOF_ENTRY(f)) /* root group ptr */
-#define H5F_SUPERBLOCK_VARLEN_SIZE_V2(f) \
- ( 2 /* size of address, size of lengths */ \
- + 1 /* consistency flags */ \
- + H5F_SIZEOF_ADDR(f) /* base address */ \
- + H5F_SIZEOF_ADDR(f) /* superblock extension address */ \
- + H5F_SIZEOF_ADDR(f) /* EOF address */ \
- + H5F_SIZEOF_ADDR(f) /* root group object header address */ \
- + H5F_SIZEOF_CHKSUM) /* superblock checksum (keep this last) */
-#define H5F_SUPERBLOCK_VARLEN_SIZE(v, f) ( \
- (v == 0 ? H5F_SUPERBLOCK_VARLEN_SIZE_V0(f) : 0) \
- + (v == 1 ? H5F_SUPERBLOCK_VARLEN_SIZE_V1(f) : 0) \
- + (v == 2 ? H5F_SUPERBLOCK_VARLEN_SIZE_V2(f) : 0))
+#define H5F_SUPERBLOCK_VARLEN_SIZE_COMMON \
+ (2 /* freespace, and root group versions */ \
+ + 1 /* reserved */ \
+ + 3 /* shared header vers, size of address, size of lengths */ \
+ + 1 /* reserved */ \
+ + 4 /* group leaf k, group internal k */ \
+ + 4) /* consistency flags */
+#define H5F_SUPERBLOCK_VARLEN_SIZE_V0(f) \
+ (H5F_SUPERBLOCK_VARLEN_SIZE_COMMON /* Common variable-length info */ \
+ + H5F_SIZEOF_ADDR(f) /* base address */ \
+ + H5F_SIZEOF_ADDR(f) /* <unused> */ \
+ + H5F_SIZEOF_ADDR(f) /* EOF address */ \
+ + H5F_SIZEOF_ADDR(f) /* driver block address */ \
+ + H5G_SIZEOF_ENTRY(f)) /* root group ptr */
+#define H5F_SUPERBLOCK_VARLEN_SIZE_V1(f) \
+ (H5F_SUPERBLOCK_VARLEN_SIZE_COMMON /* Common variable-length info */ \
+ + 2 /* indexed B-tree internal k */ \
+ + 2 /* reserved */ \
+ + H5F_SIZEOF_ADDR(f) /* base address */ \
+ + H5F_SIZEOF_ADDR(f) /* <unused> */ \
+ + H5F_SIZEOF_ADDR(f) /* EOF address */ \
+ + H5F_SIZEOF_ADDR(f) /* driver block address */ \
+ + H5G_SIZEOF_ENTRY(f)) /* root group ptr */
+#define H5F_SUPERBLOCK_VARLEN_SIZE_V2(f) \
+ (2 /* size of address, size of lengths */ \
+ + 1 /* consistency flags */ \
+ + H5F_SIZEOF_ADDR(f) /* base address */ \
+ + H5F_SIZEOF_ADDR(f) /* superblock extension address */ \
+ + H5F_SIZEOF_ADDR(f) /* EOF address */ \
+ + H5F_SIZEOF_ADDR(f) /* root group object header address */ \
+ + H5F_SIZEOF_CHKSUM) /* superblock checksum (keep this last) */
+#define H5F_SUPERBLOCK_VARLEN_SIZE(v, f) \
+ ((v == 0 ? H5F_SUPERBLOCK_VARLEN_SIZE_V0(f) : 0) + (v == 1 ? H5F_SUPERBLOCK_VARLEN_SIZE_V1(f) : 0) + \
+ (v == 2 ? H5F_SUPERBLOCK_VARLEN_SIZE_V2(f) : 0))
/* Total size of superblock, depends on superblock version */
-#define H5F_SUPERBLOCK_SIZE(v, f) ( H5F_SUPERBLOCK_FIXED_SIZE \
- + H5F_SUPERBLOCK_VARLEN_SIZE(v, f))
-
+#define H5F_SUPERBLOCK_SIZE(v, f) (H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_VARLEN_SIZE(v, f))
/* Forward declaration external file cache struct used below (defined in
* H5Fefc.c) */
@@ -125,35 +120,35 @@ typedef struct H5F_efc_t H5F_efc_t;
/* Structure for metadata & "small [raw] data" block aggregation fields */
struct H5F_blk_aggr_t {
- unsigned long feature_flag; /* Feature flag type */
- hsize_t alloc_size; /* Size for allocating new blocks */
- hsize_t tot_size; /* Total amount of bytes aggregated into block */
- hsize_t size; /* Current size of block left */
- haddr_t addr; /* Location of block left */
+ unsigned long feature_flag; /* Feature flag type */
+ hsize_t alloc_size; /* Size for allocating new blocks */
+ hsize_t tot_size; /* Total amount of bytes aggregated into block */
+ hsize_t size; /* Current size of block left */
+ haddr_t addr; /* Location of block left */
};
/* Structure for metadata accumulator fields */
typedef struct H5F_meta_accum_t {
- unsigned char *buf; /* Buffer to hold the accumulated metadata */
- haddr_t loc; /* File location (offset) of the accumulated metadata */
- size_t size; /* Size of the accumulated metadata buffer used (in bytes) */
- size_t alloc_size; /* Size of the accumulated metadata buffer allocated (in bytes) */
- size_t dirty_off; /* Offset of the dirty region in the accumulator buffer */
- size_t dirty_len; /* Length of the dirty region in the accumulator buffer */
- hbool_t dirty; /* Flag to indicate that the accumulated metadata is dirty */
+ unsigned char *buf; /* Buffer to hold the accumulated metadata */
+ haddr_t loc; /* File location (offset) of the accumulated metadata */
+ size_t size; /* Size of the accumulated metadata buffer used (in bytes) */
+ size_t alloc_size; /* Size of the accumulated metadata buffer allocated (in bytes) */
+ size_t dirty_off; /* Offset of the dirty region in the accumulator buffer */
+ size_t dirty_len; /* Length of the dirty region in the accumulator buffer */
+ hbool_t dirty; /* Flag to indicate that the accumulated metadata is dirty */
} H5F_meta_accum_t;
/* Enum for free space manager state */
typedef enum H5F_fs_state_t {
- H5F_FS_STATE_CLOSED, /* Free space manager is closed */
- H5F_FS_STATE_OPEN, /* Free space manager has been opened */
- H5F_FS_STATE_DELETING /* Free space manager is being deleted */
+ H5F_FS_STATE_CLOSED, /* Free space manager is closed */
+ H5F_FS_STATE_OPEN, /* Free space manager has been opened */
+ H5F_FS_STATE_DELETING /* Free space manager is being deleted */
} H5F_fs_state_t;
/* A record of the mount table */
typedef struct H5F_mount_t {
- struct H5G_t *group; /* Mount point group held open */
- struct H5F_t *file; /* File mounted at that point */
+ struct H5G_t *group; /* Mount point group held open */
+ struct H5F_t *file; /* File mounted at that point */
} H5F_mount_t;
/*
@@ -161,26 +156,26 @@ typedef struct H5F_mount_t {
* to which this table belongs.
*/
typedef struct H5F_mtab_t {
- unsigned nmounts;/* Number of children which are mounted */
- unsigned nalloc; /* Number of mount slots allocated */
- H5F_mount_t *child; /* An array of mount records */
+ unsigned nmounts; /* Number of children which are mounted */
+ unsigned nalloc; /* Number of mount slots allocated */
+ H5F_mount_t *child; /* An array of mount records */
} H5F_mtab_t;
/* Structure specifically to store superblock. This was originally
* maintained entirely within H5F_file_t, but is now extracted
* here because the superblock is now handled by the cache */
typedef struct H5F_super_t {
- H5AC_info_t cache_info; /* Cache entry information structure */
- unsigned super_vers; /* Superblock version */
- uint8_t status_flags; /* File status flags */
- unsigned sym_leaf_k; /* Size of leaves in symbol tables */
+ H5AC_info_t cache_info; /* Cache entry information structure */
+ unsigned super_vers; /* Superblock version */
+ uint8_t status_flags; /* File status flags */
+ unsigned sym_leaf_k; /* Size of leaves in symbol tables */
unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree key values for each type */
- haddr_t base_addr; /* Absolute base address for rel.addrs. */
- /* (superblock for file is at this offset) */
- haddr_t ext_addr; /* Relative address of superblock extension */
- haddr_t driver_addr; /* File driver information block address */
- haddr_t root_addr; /* Root group address */
- H5G_entry_t *root_ent; /* Root group symbol table entry */
+ haddr_t base_addr; /* Absolute base address for rel.addrs. */
+ /* (superblock for file is at this offset) */
+ haddr_t ext_addr; /* Relative address of superblock extension */
+ haddr_t driver_addr; /* File driver information block address */
+ haddr_t root_addr; /* Root group address */
+ H5G_entry_t *root_ent; /* Root group symbol table entry */
} H5F_super_t;
/*
@@ -191,60 +186,59 @@ typedef struct H5F_super_t {
* pointing to this struct.
*/
struct H5F_file_t {
- H5FD_t *lf; /* Lower level file handle for I/O */
- H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */
- unsigned nrefs; /* Ref count for times file is opened */
- unsigned flags; /* Access Permissions for file */
- H5F_mtab_t mtab; /* File mount table */
- H5F_efc_t *efc; /* External file cache */
+ H5FD_t * lf; /* Lower level file handle for I/O */
+ H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */
+ unsigned nrefs; /* Ref count for times file is opened */
+ unsigned flags; /* Access Permissions for file */
+ H5F_mtab_t mtab; /* File mount table */
+ H5F_efc_t * efc; /* External file cache */
/* Cached values from FCPL/superblock */
- uint8_t sizeof_addr; /* Size of addresses in file */
- uint8_t sizeof_size; /* Size of offsets in file */
- haddr_t sohm_addr; /* Relative address of shared object header message table */
- unsigned sohm_vers; /* Version of shared message table on disk */
- unsigned sohm_nindexes; /* Number of shared messages indexes in the table */
+ uint8_t sizeof_addr; /* Size of addresses in file */
+ uint8_t sizeof_size; /* Size of offsets in file */
+ haddr_t sohm_addr; /* Relative address of shared object header message table */
+ unsigned sohm_vers; /* Version of shared message table on disk */
+ unsigned sohm_nindexes; /* Number of shared messages indexes in the table */
unsigned long feature_flags; /* VFL Driver feature Flags */
- haddr_t maxaddr; /* Maximum address for file */
-
- H5AC_t *cache; /* The object cache */
- H5AC_cache_config_t
- mdc_initCacheCfg; /* initial configuration for the */
- /* metadata cache. This structure is */
- /* fixed at creation time and should */
- /* not change thereafter. */
- hid_t fcpl_id; /* File creation property list ID */
- H5F_close_degree_t fc_degree; /* File close behavior degree */
- size_t rdcc_nslots; /* Size of raw data chunk cache (slots) */
- size_t rdcc_nbytes; /* Size of raw data chunk cache (bytes) */
- double rdcc_w0; /* Preempt read chunks first? [0.0..1.0]*/
- size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
- hsize_t threshold; /* Threshold for alignment */
- hsize_t alignment; /* Alignment */
- unsigned gc_ref; /* Garbage-collect references? */
- hbool_t latest_format; /* Always use the latest format? */
- hbool_t store_msg_crt_idx; /* Store creation index for object header messages? */
- unsigned ncwfs; /* Num entries on cwfs list */
- struct H5HG_heap_t **cwfs; /* Global heap cache */
- struct H5G_t *root_grp; /* Open root group */
- H5FO_t *open_objs; /* Open objects in file */
- H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
+ haddr_t maxaddr; /* Maximum address for file */
+
+ H5AC_t * cache; /* The object cache */
+ H5AC_cache_config_t mdc_initCacheCfg; /* initial configuration for the */
+ /* metadata cache. This structure is */
+ /* fixed at creation time and should */
+ /* not change thereafter. */
+ hid_t fcpl_id; /* File creation property list ID */
+ H5F_close_degree_t fc_degree; /* File close behavior degree */
+ size_t rdcc_nslots; /* Size of raw data chunk cache (slots) */
+ size_t rdcc_nbytes; /* Size of raw data chunk cache (bytes) */
+ double rdcc_w0; /* Preempt read chunks first? [0.0..1.0]*/
+ size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
+ hsize_t threshold; /* Threshold for alignment */
+ hsize_t alignment; /* Alignment */
+ unsigned gc_ref; /* Garbage-collect references? */
+ hbool_t latest_format; /* Always use the latest format? */
+ hbool_t store_msg_crt_idx; /* Store creation index for object header messages? */
+ unsigned ncwfs; /* Num entries on cwfs list */
+ struct H5HG_heap_t **cwfs; /* Global heap cache */
+ struct H5G_t * root_grp; /* Open root group */
+ H5FO_t * open_objs; /* Open objects in file */
+ H5RC_t * grp_btree_shared; /* Ref-counted group B-tree node info */
/* File space allocation information */
- hbool_t use_tmp_space; /* Whether temp. file space allocation is allowed */
- haddr_t tmp_addr; /* Next address to use for temp. space in the file */
- unsigned fs_aggr_merge[H5FD_MEM_NTYPES]; /* Flags for whether free space can merge with aggregator(s) */
- H5F_fs_state_t fs_state[H5FD_MEM_NTYPES]; /* State of free space manager for each type */
- haddr_t fs_addr[H5FD_MEM_NTYPES]; /* Address of free space manager info for each type */
- H5FS_t *fs_man[H5FD_MEM_NTYPES]; /* Free space manager for each file space type */
- H5FD_mem_t fs_type_map[H5FD_MEM_NTYPES]; /* Mapping of "real" file space type into tracked type */
- H5F_blk_aggr_t meta_aggr; /* Metadata aggregation info */
- /* (if aggregating metadata allocations) */
- H5F_blk_aggr_t sdata_aggr; /* "Small data" aggregation info */
- /* (if aggregating "small data" allocations) */
+ hbool_t use_tmp_space; /* Whether temp. file space allocation is allowed */
+ haddr_t tmp_addr; /* Next address to use for temp. space in the file */
+ unsigned fs_aggr_merge[H5FD_MEM_NTYPES]; /* Flags for whether free space can merge with aggregator(s) */
+ H5F_fs_state_t fs_state[H5FD_MEM_NTYPES]; /* State of free space manager for each type */
+ haddr_t fs_addr[H5FD_MEM_NTYPES]; /* Address of free space manager info for each type */
+ H5FS_t * fs_man[H5FD_MEM_NTYPES]; /* Free space manager for each file space type */
+ H5FD_mem_t fs_type_map[H5FD_MEM_NTYPES]; /* Mapping of "real" file space type into tracked type */
+ H5F_blk_aggr_t meta_aggr; /* Metadata aggregation info */
+ /* (if aggregating metadata allocations) */
+ H5F_blk_aggr_t sdata_aggr; /* "Small data" aggregation info */
+ /* (if aggregating "small data" allocations) */
/* Metadata accumulator information */
- H5F_meta_accum_t accum; /* Metadata accumulator info */
+ H5F_meta_accum_t accum; /* Metadata accumulator info */
};
/*
@@ -253,19 +247,18 @@ struct H5F_file_t {
* to shared H5F_file_t structs.
*/
struct H5F_t {
- char *open_name; /* Name used to open file */
- char *actual_name; /* Actual name of the file, after resolving symlinks, etc. */
- char *extpath; /* Path for searching target external link file */
- H5F_file_t *shared; /* The shared file info */
- unsigned nopen_objs; /* Number of open object headers*/
- H5FO_t *obj_count; /* # of time each object is opened through top file structure */
- hid_t file_id; /* ID of this file */
- hbool_t closing; /* File is in the process of being closed */
- struct H5F_t *parent; /* Parent file that this file is mounted to */
- unsigned nmounts; /* Number of children mounted to this file */
+ char * open_name; /* Name used to open file */
+ char * actual_name; /* Actual name of the file, after resolving symlinks, etc. */
+ char * extpath; /* Path for searching target external link file */
+ H5F_file_t * shared; /* The shared file info */
+ unsigned nopen_objs; /* Number of open object headers*/
+ H5FO_t * obj_count; /* # of time each object is opened through top file structure */
+ hid_t file_id; /* ID of this file */
+ hbool_t closing; /* File is in the process of being closed */
+ struct H5F_t *parent; /* Parent file that this file is mounted to */
+ unsigned nmounts; /* Number of children mounted to this file */
};
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -278,7 +271,6 @@ H5FL_EXTERN(H5F_file_t);
H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1];
-
/******************************/
/* Package Private Prototypes */
/******************************/
@@ -286,61 +278,56 @@ H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1];
/* General routines */
H5_DLL herr_t H5F_init(void);
H5_DLL herr_t H5F__term_deprec_interface(void);
-H5F_t *H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id,
- hid_t fapl_id, H5FD_t *lf);
-herr_t H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush);
+H5F_t * H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf);
+herr_t H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush);
H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing);
H5_DLL htri_t H5F_is_hdf5(const char *name);
-H5_DLL herr_t H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr);
+H5_DLL herr_t H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list,
+ hbool_t app_ref, size_t *obj_id_count_ptr);
H5_DLL herr_t H5F_close(H5F_t *f);
/* File mount related routines */
H5_DLL herr_t H5F_close_mounts(H5F_t *f);
-H5_DLL int H5F_term_unmount_cb(void *obj_ptr, hid_t obj_id, void *key);
+H5_DLL int H5F_term_unmount_cb(void *obj_ptr, hid_t obj_id, void *key);
H5_DLL herr_t H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs);
/* Superblock related routines */
H5_DLL herr_t H5F_super_init(H5F_t *f, hid_t dxpl_id);
H5_DLL herr_t H5F_super_read(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size,
- hsize_t *super_ext_info);
+H5_DLL herr_t H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_info);
H5_DLL herr_t H5F_super_free(H5F_super_t *sblock);
/* Superblock extension related routines */
H5_DLL herr_t H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr);
H5_DLL herr_t H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, unsigned id, void *mesg, hbool_t may_create);
-H5_DLL herr_t H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id,
- hbool_t was_created);
+H5_DLL herr_t H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id, hbool_t was_created);
/* Metadata accumulator routines */
-H5_DLL herr_t H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type,
- haddr_t addr, size_t size, void *buf);
-H5_DLL herr_t H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type,
- haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t type,
- haddr_t addr, hsize_t size);
+H5_DLL herr_t H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr, size_t size,
+ void *buf);
+H5_DLL herr_t H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr, size_t size,
+ const void *buf);
+H5_DLL herr_t H5F__accum_free(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr, hsize_t size);
H5_DLL herr_t H5F__accum_flush(const H5F_io_info_t *fio_info);
H5_DLL herr_t H5F__accum_reset(const H5F_io_info_t *fio_info, hbool_t flush);
/* Shared file list related routines */
H5_DLL herr_t H5F_sfile_add(H5F_file_t *shared);
-H5_DLL H5F_file_t * H5F_sfile_search(H5FD_t *lf);
-H5_DLL herr_t H5F_sfile_remove(H5F_file_t *shared);
+H5_DLL H5F_file_t *H5F_sfile_search(H5FD_t *lf);
+H5_DLL herr_t H5F_sfile_remove(H5F_file_t *shared);
/* External file cache routines */
H5_DLL H5F_efc_t *H5F_efc_create(unsigned max_nfiles);
-H5_DLL unsigned H5F_efc_max_nfiles(H5F_efc_t *efc);
-H5_DLL herr_t H5F_efc_release(H5F_efc_t *efc);
-H5_DLL herr_t H5F_efc_destroy(H5F_efc_t *efc);
-H5_DLL herr_t H5F_efc_try_close(H5F_t *f);
+H5_DLL unsigned H5F_efc_max_nfiles(H5F_efc_t *efc);
+H5_DLL herr_t H5F_efc_release(H5F_efc_t *efc);
+H5_DLL herr_t H5F_efc_destroy(H5F_efc_t *efc);
+H5_DLL herr_t H5F_efc_try_close(H5F_t *f);
/* Testing functions */
#ifdef H5F_TESTING
-H5_DLL herr_t H5F_get_sohm_mesg_count_test(hid_t fid, unsigned type_id,
- size_t *mesg_count);
+H5_DLL herr_t H5F_get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count);
H5_DLL herr_t H5F_check_cached_stab_test(hid_t file_id);
H5_DLL herr_t H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr);
#endif /* H5F_TESTING */
#endif /* _H5Fpkg_H */
-
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 41eecf3..468379a 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,11 +22,10 @@
#include "H5Fpublic.h"
/* Public headers needed by this file */
-#include "H5FDpublic.h" /* File drivers */
+#include "H5FDpublic.h" /* File drivers */
/* Private headers needed by this file */
-
/**************************/
/* Library Private Macros */
/**************************/
@@ -36,73 +35,92 @@
* Currently, all file meta-data is little-endian.
*/
-# define INT16ENCODE(p, i) { \
- *(p) = (uint8_t)( (unsigned)(i) & 0xff); (p)++; \
- *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); (p)++; \
-}
-
-# define UINT16ENCODE(p, i) { \
- *(p) = (uint8_t)( (unsigned)(i) & 0xff); (p)++; \
- *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); (p)++; \
-}
-
-# define INT32ENCODE(p, i) { \
- *(p) = (uint8_t)( (uint32_t)(i) & 0xff); (p)++; \
- *(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); (p)++; \
- *(p) = (uint8_t)(((uint32_t)(i) >> 16) & 0xff); (p)++; \
- *(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); (p)++; \
-}
-
-# define UINT32ENCODE(p, i) { \
- *(p) = (uint8_t)( (i) & 0xff); (p)++; \
- *(p) = (uint8_t)(((i) >> 8) & 0xff); (p)++; \
- *(p) = (uint8_t)(((i) >> 16) & 0xff); (p)++; \
- *(p) = (uint8_t)(((i) >> 24) & 0xff); (p)++; \
-}
+#define INT16ENCODE(p, i) \
+ { \
+ *(p) = (uint8_t)((unsigned)(i)&0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \
+ (p)++; \
+ }
+
+#define UINT16ENCODE(p, i) \
+ { \
+ *(p) = (uint8_t)((unsigned)(i)&0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \
+ (p)++; \
+ }
+
+#define INT32ENCODE(p, i) \
+ { \
+ *(p) = (uint8_t)((uint32_t)(i)&0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 16) & 0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); \
+ (p)++; \
+ }
+
+#define UINT32ENCODE(p, i) \
+ { \
+ *(p) = (uint8_t)((i)&0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((i) >> 8) & 0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((i) >> 16) & 0xff); \
+ (p)++; \
+ *(p) = (uint8_t)(((i) >> 24) & 0xff); \
+ (p)++; \
+ }
/* Encode an unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
-# define ENCODE_VAR(p, typ, n, l) { \
- typ _n = (n); \
- size_t _i; \
- uint8_t *_p = (uint8_t*)(p); \
- \
- for(_i = 0; _i < l; _i++, _n >>= 8) \
- *_p++ = (uint8_t)(_n & 0xff); \
- (p) = (uint8_t*)(p) + l; \
-}
+#define ENCODE_VAR(p, typ, n, l) \
+ { \
+ typ _n = (n); \
+ size_t _i; \
+ uint8_t *_p = (uint8_t *)(p); \
+ \
+ for (_i = 0; _i < l; _i++, _n >>= 8) \
+ *_p++ = (uint8_t)(_n & 0xff); \
+ (p) = (uint8_t *)(p) + l; \
+ }
/* Encode a 32-bit unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
-# define UINT32ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint32_t, n, l)
-
-# define INT64ENCODE(p, n) { \
- int64_t _n = (n); \
- size_t _i; \
- uint8_t *_p = (uint8_t*)(p); \
- \
- for (_i = 0; _i < sizeof(int64_t); _i++, _n >>= 8) \
- *_p++ = (uint8_t)(_n & 0xff); \
- for (/*void*/; _i < 8; _i++) \
- *_p++ = (n) < 0 ? 0xff : 0; \
- (p) = (uint8_t*)(p)+8; \
-}
-
-# define UINT64ENCODE(p, n) { \
- uint64_t _n = (n); \
- size_t _i; \
- uint8_t *_p = (uint8_t*)(p); \
- \
- for (_i = 0; _i < sizeof(uint64_t); _i++, _n >>= 8) \
- *_p++ = (uint8_t)(_n & 0xff); \
- for (/*void*/; _i < 8; _i++) \
- *_p++ = 0; \
- (p) = (uint8_t*)(p) + 8; \
-}
+#define UINT32ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint32_t, n, l)
+
+#define INT64ENCODE(p, n) \
+ { \
+ int64_t _n = (n); \
+ size_t _i; \
+ uint8_t *_p = (uint8_t *)(p); \
+ \
+ for (_i = 0; _i < sizeof(int64_t); _i++, _n >>= 8) \
+ *_p++ = (uint8_t)(_n & 0xff); \
+ for (/*void*/; _i < 8; _i++) \
+ *_p++ = (n) < 0 ? 0xff : 0; \
+ (p) = (uint8_t *)(p) + 8; \
+ }
+
+#define UINT64ENCODE(p, n) \
+ { \
+ uint64_t _n = (n); \
+ size_t _i; \
+ uint8_t *_p = (uint8_t *)(p); \
+ \
+ for (_i = 0; _i < sizeof(uint64_t); _i++, _n >>= 8) \
+ *_p++ = (uint8_t)(_n & 0xff); \
+ for (/*void*/; _i < 8; _i++) \
+ *_p++ = 0; \
+ (p) = (uint8_t *)(p) + 8; \
+ }
/* Encode a 64-bit unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
-# define UINT64ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint64_t, n, l)
+#define UINT64ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint64_t, n, l)
/* DECODE converts little endian bytes pointed by p to integer values and store
* it in i. For signed values, need to do sign-extension when converting
@@ -112,292 +130,350 @@
* correctly even if i is actually a 64bit int like in a Cray.
*/
-# define INT16DECODE(p, i) { \
- (i) = (int16_t)((*(p) & 0xff)); (p)++; \
- (i) |= (int16_t)(((*(p) & 0xff) << 8) | \
- ((*(p) & 0x80) ? ~0xffff : 0x0)); (p)++; \
-}
-
-# define UINT16DECODE(p, i) { \
- (i) = (uint16_t) (*(p) & 0xff); (p)++; \
- (i) |= (uint16_t)((*(p) & 0xff) << 8); (p)++; \
-}
-
-# define INT32DECODE(p, i) { \
- (i) = ( *(p) & 0xff); (p)++; \
- (i) |= ((int32_t)(*(p) & 0xff) << 8); (p)++; \
- (i) |= ((int32_t)(*(p) & 0xff) << 16); (p)++; \
- (i) |= ((int32_t)(((*(p) & 0xff) << 24) | \
- ((*(p) & 0x80) ? ~0xffffffff : 0x0))); (p)++; \
-}
-
-# define UINT32DECODE(p, i) { \
- (i) = (uint32_t)(*(p) & 0xff); (p)++; \
- (i) |= ((uint32_t)(*(p) & 0xff) << 8); (p)++; \
- (i) |= ((uint32_t)(*(p) & 0xff) << 16); (p)++; \
- (i) |= ((uint32_t)(*(p) & 0xff) << 24); (p)++; \
-}
+#define INT16DECODE(p, i) \
+ { \
+ (i) = (int16_t)((*(p)&0xff)); \
+ (p)++; \
+ (i) |= (int16_t)(((*(p)&0xff) << 8) | ((*(p)&0x80) ? ~0xffff : 0x0)); \
+ (p)++; \
+ }
+
+#define UINT16DECODE(p, i) \
+ { \
+ (i) = (uint16_t)(*(p)&0xff); \
+ (p)++; \
+ (i) |= (uint16_t)((*(p)&0xff) << 8); \
+ (p)++; \
+ }
+
+#define INT32DECODE(p, i) \
+ { \
+ (i) = (*(p)&0xff); \
+ (p)++; \
+ (i) |= ((int32_t)(*(p)&0xff) << 8); \
+ (p)++; \
+ (i) |= ((int32_t)(*(p)&0xff) << 16); \
+ (p)++; \
+ (i) |= ((int32_t)(((*(p)&0xff) << 24) | ((*(p)&0x80) ? ~0xffffffff : 0x0))); \
+ (p)++; \
+ }
+
+#define UINT32DECODE(p, i) \
+ { \
+ (i) = (uint32_t)(*(p)&0xff); \
+ (p)++; \
+ (i) |= ((uint32_t)(*(p)&0xff) << 8); \
+ (p)++; \
+ (i) |= ((uint32_t)(*(p)&0xff) << 16); \
+ (p)++; \
+ (i) |= ((uint32_t)(*(p)&0xff) << 24); \
+ (p)++; \
+ }
/* Decode a variable-sized buffer */
/* (Assumes that the high bits of the integer will be zero) */
-# define DECODE_VAR(p, n, l) { \
- size_t _i; \
- \
- n = 0; \
- (p) += l; \
- for (_i = 0; _i < l; _i++) \
- n = (n << 8) | *(--p); \
- (p) += l; \
-}
+#define DECODE_VAR(p, n, l) \
+ { \
+ size_t _i; \
+ \
+ n = 0; \
+ (p) += l; \
+ for (_i = 0; _i < l; _i++) \
+ n = (n << 8) | *(--p); \
+ (p) += l; \
+ }
/* Decode a variable-sized buffer into a 32-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
-# define UINT32DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
-
-# define INT64DECODE(p, n) { \
- /* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
- \
- n = 0; \
- (p) += 8; \
- for (_i = 0; _i < sizeof(int64_t); _i++) \
- n = (n << 8) | *(--p); \
- (p) += 8; \
-}
-
-# define UINT64DECODE(p, n) { \
- /* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
- \
- n = 0; \
- (p) += 8; \
- for (_i = 0; _i < sizeof(uint64_t); _i++) \
- n = (n << 8) | *(--p); \
- (p) += 8; \
-}
+#define UINT32DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
+
+#define INT64DECODE(p, n) \
+ { \
+ /* WE DON'T CHECK FOR OVERFLOW! */ \
+ size_t _i; \
+ \
+ n = 0; \
+ (p) += 8; \
+ for (_i = 0; _i < sizeof(int64_t); _i++) \
+ n = (n << 8) | *(--p); \
+ (p) += 8; \
+ }
+
+#define UINT64DECODE(p, n) \
+ { \
+ /* WE DON'T CHECK FOR OVERFLOW! */ \
+ size_t _i; \
+ \
+ n = 0; \
+ (p) += 8; \
+ for (_i = 0; _i < sizeof(uint64_t); _i++) \
+ n = (n << 8) | *(--p); \
+ (p) += 8; \
+ }
/* Decode a variable-sized buffer into a 64-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
-# define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
+#define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
+/* clang-format off */
/* Address-related macros */
-#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
- HADDR_UNDEF==(X)+(haddr_t)(Z) || \
- (X)+(haddr_t)(Z)<(X))
-#define H5F_addr_hash(X,M) ((unsigned)((X)%(M)))
-#define H5F_addr_defined(X) ((X)!=HADDR_UNDEF)
+#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
+ HADDR_UNDEF==(X)+(haddr_t)(Z) || \
+ (X)+(haddr_t)(Z)<(X))
+#define H5F_addr_hash(X,M) ((unsigned)((X)%(M)))
+#define H5F_addr_defined(X) ((X)!=HADDR_UNDEF)
/* The H5F_addr_eq() macro guarantees that Y is not HADDR_UNDEF by making
* certain that X is not HADDR_UNDEF and then checking that X equals Y
*/
-#define H5F_addr_eq(X,Y) ((X)!=HADDR_UNDEF && \
- (X)==(Y))
-#define H5F_addr_ne(X,Y) (!H5F_addr_eq((X),(Y)))
-#define H5F_addr_lt(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
- (X)<(Y))
-#define H5F_addr_le(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
- (X)<=(Y))
-#define H5F_addr_gt(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
- (X)>(Y))
-#define H5F_addr_ge(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
- (X)>=(Y))
-#define H5F_addr_cmp(X,Y) (H5F_addr_eq((X), (Y)) ? 0 : \
- (H5F_addr_lt((X), (Y)) ? -1 : 1))
-#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
+#define H5F_addr_eq(X,Y) ((X)!=HADDR_UNDEF && \
+ (X)==(Y))
+#define H5F_addr_ne(X,Y) (!H5F_addr_eq((X),(Y)))
+#define H5F_addr_lt(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
+ (X)<(Y))
+#define H5F_addr_le(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
+ (X)<=(Y))
+#define H5F_addr_gt(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
+ (X)>(Y))
+#define H5F_addr_ge(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
+ (X)>=(Y))
+#define H5F_addr_cmp(X,Y) (H5F_addr_eq((X), (Y)) ? 0 : \
+ (H5F_addr_lt((X), (Y)) ? -1 : 1))
+#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
#define H5F_addr_overlap(O1,L1,O2,L2) (((O1) < (O2) && ((O1) + (L1)) > (O2)) || \
((O1) >= (O2) && (O1) < ((O2) + (L2))))
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5F_PACKAGE
-#define H5F_INTENT(F) ((F)->shared->flags)
-#define H5F_OPEN_NAME(F) ((F)->open_name)
-#define H5F_ACTUAL_NAME(F) ((F)->actual_name)
-#define H5F_EXTPATH(F) ((F)->extpath)
-#define H5F_SHARED(F) ((F)->shared)
+#define H5F_INTENT(F) ((F)->shared->flags)
+#define H5F_OPEN_NAME(F) ((F)->open_name)
+#define H5F_ACTUAL_NAME(F) ((F)->actual_name)
+#define H5F_EXTPATH(F) ((F)->extpath)
+#define H5F_SHARED(F) ((F)->shared)
#define H5F_SAME_SHARED(F1, F2) ((F1)->shared == (F2)->shared))
-#define H5F_NOPEN_OBJS(F) ((F)->nopen_objs)
-#define H5F_INCR_NOPEN_OBJS(F) ((F)->nopen_objs++)
-#define H5F_DECR_NOPEN_OBJS(F) ((F)->nopen_objs--)
-#define H5F_FILE_ID(F) ((F)->file_id)
-#define H5F_PARENT(F) ((F)->parent)
-#define H5F_NMOUNTS(F) ((F)->nmounts)
-#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
-#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
-#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL))
-#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr)
-#define H5F_SYM_LEAF_K(F) ((F)->shared->sblock->sym_leaf_k)
-#define H5F_KVALUE(F,T) ((F)->shared->sblock->btree_k[(T)->id])
-#define H5F_NREFS(F) ((F)->shared->nrefs)
-#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr)
-#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size)
-#define H5F_SOHM_ADDR(F) ((F)->shared->sohm_addr)
-#define H5F_SET_SOHM_ADDR(F, A) ((F)->shared->sohm_addr = (A))
-#define H5F_SOHM_VERS(F) ((F)->shared->sohm_vers)
-#define H5F_SET_SOHM_VERS(F, V) ((F)->shared->sohm_vers = (V))
-#define H5F_SOHM_NINDEXES(F) ((F)->shared->sohm_nindexes)
-#define H5F_SET_SOHM_NINDEXES(F, N) ((F)->shared->sohm_nindexes = (N))
-#define H5F_FCPL(F) ((F)->shared->fcpl_id)
-#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree)
-#define H5F_RDCC_NSLOTS(F) ((F)->shared->rdcc_nslots)
-#define H5F_RDCC_NBYTES(F) ((F)->shared->rdcc_nbytes)
-#define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0)
-#define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size)
-#define H5F_GC_REF(F) ((F)->shared->gc_ref)
-#define H5F_USE_LATEST_FORMAT(F) ((F)->shared->latest_format)
-#define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx)
-#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL))
-#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared)
-#define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL)
-#define H5F_USE_TMP_SPACE(F) ((F)->shared->use_tmp_space)
-#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_addr_le((F)->shared->tmp_addr, (ADDR)))
+#define H5F_NOPEN_OBJS(F) ((F)->nopen_objs)
+#define H5F_INCR_NOPEN_OBJS(F) ((F)->nopen_objs++)
+#define H5F_DECR_NOPEN_OBJS(F) ((F)->nopen_objs--)
+#define H5F_FILE_ID(F) ((F)->file_id)
+#define H5F_PARENT(F) ((F)->parent)
+#define H5F_NMOUNTS(F) ((F)->nmounts)
+#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
+#define H5F_GET_FILENO(F, FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
+#define H5F_HAS_FEATURE(F, FL) ((F)->shared->lf->feature_flags & (FL))
+#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr)
+#define H5F_SYM_LEAF_K(F) ((F)->shared->sblock->sym_leaf_k)
+#define H5F_KVALUE(F, T) ((F)->shared->sblock->btree_k[(T)->id])
+#define H5F_NREFS(F) ((F)->shared->nrefs)
+#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr)
+#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size)
+#define H5F_SOHM_ADDR(F) ((F)->shared->sohm_addr)
+#define H5F_SET_SOHM_ADDR(F, A) ((F)->shared->sohm_addr = (A))
+#define H5F_SOHM_VERS(F) ((F)->shared->sohm_vers)
+#define H5F_SET_SOHM_VERS(F, V) ((F)->shared->sohm_vers = (V))
+#define H5F_SOHM_NINDEXES(F) ((F)->shared->sohm_nindexes)
+#define H5F_SET_SOHM_NINDEXES(F, N) ((F)->shared->sohm_nindexes = (N))
+#define H5F_FCPL(F) ((F)->shared->fcpl_id)
+#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree)
+#define H5F_RDCC_NSLOTS(F) ((F)->shared->rdcc_nslots)
+#define H5F_RDCC_NBYTES(F) ((F)->shared->rdcc_nbytes)
+#define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0)
+#define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size)
+#define H5F_GC_REF(F) ((F)->shared->gc_ref)
+#define H5F_USE_LATEST_FORMAT(F) ((F)->shared->latest_format)
+#define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx)
+#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL))
+#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared)
+#define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL)
+#define H5F_USE_TMP_SPACE(F) ((F)->shared->use_tmp_space)
+#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_addr_le((F)->shared->tmp_addr, (ADDR)))
#else /* H5F_PACKAGE */
-#define H5F_INTENT(F) (H5F_get_intent(F))
-#define H5F_OPEN_NAME(F) (H5F_get_open_name(F))
-#define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F))
-#define H5F_EXTPATH(F) (H5F_get_extpath(F))
-#define H5F_SHARED(F) (H5F_get_shared(F))
-#define H5F_SAME_SHARED(F1, F2) (H5F_same_shared((F1), (F2)))
-#define H5F_NOPEN_OBJS(F) (H5F_get_nopen_objs(F))
-#define H5F_INCR_NOPEN_OBJS(F) (H5F_incr_nopen_objs(F))
-#define H5F_DECR_NOPEN_OBJS(F) (H5F_decr_nopen_objs(F))
-#define H5F_FILE_ID(F) (H5F_get_file_id(F))
-#define H5F_PARENT(F) (H5F_get_parent(F))
-#define H5F_NMOUNTS(F) (H5F_get_nmounts(F))
-#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
-#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM)))
-#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL))
-#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F))
-#define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F))
-#define H5F_KVALUE(F,T) (H5F_Kvalue(F,T))
-#define H5F_NREFS(F) (H5F_get_nrefs(F))
-#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F))
-#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F))
-#define H5F_SOHM_ADDR(F) (H5F_get_sohm_addr(F))
-#define H5F_SET_SOHM_ADDR(F, A) (H5F_set_sohm_addr((F), (A)))
-#define H5F_SOHM_VERS(F) (H5F_get_sohm_vers(F))
-#define H5F_SET_SOHM_VERS(F, V) (H5F_set_sohm_vers((F), (V)))
-#define H5F_SOHM_NINDEXES(F) (H5F_get_sohm_nindexes(F))
-#define H5F_SET_SOHM_NINDEXES(F, N) (H5F_set_sohm_nindexes((F), (N)))
-#define H5F_FCPL(F) (H5F_get_fcpl(F))
-#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F))
-#define H5F_RDCC_NSLOTS(F) (H5F_rdcc_nslots(F))
-#define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F))
-#define H5F_RDCC_W0(F) (H5F_rdcc_w0(F))
-#define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F))
-#define H5F_GC_REF(F) (H5F_gc_ref(F))
-#define H5F_USE_LATEST_FORMAT(F) (H5F_use_latest_format(F))
-#define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F))
-#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL)))
-#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F))
-#define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC)))
-#define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F))
-#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR)))
+#define H5F_INTENT(F) (H5F_get_intent(F))
+#define H5F_OPEN_NAME(F) (H5F_get_open_name(F))
+#define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F))
+#define H5F_EXTPATH(F) (H5F_get_extpath(F))
+#define H5F_SHARED(F) (H5F_get_shared(F))
+#define H5F_SAME_SHARED(F1, F2) (H5F_same_shared((F1), (F2)))
+#define H5F_NOPEN_OBJS(F) (H5F_get_nopen_objs(F))
+#define H5F_INCR_NOPEN_OBJS(F) (H5F_incr_nopen_objs(F))
+#define H5F_DECR_NOPEN_OBJS(F) (H5F_decr_nopen_objs(F))
+#define H5F_FILE_ID(F) (H5F_get_file_id(F))
+#define H5F_PARENT(F) (H5F_get_parent(F))
+#define H5F_NMOUNTS(F) (H5F_get_nmounts(F))
+#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
+#define H5F_GET_FILENO(F, FILENUM) (H5F_get_fileno((F), &(FILENUM)))
+#define H5F_HAS_FEATURE(F, FL) (H5F_has_feature(F, FL))
+#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F))
+#define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F))
+#define H5F_KVALUE(F, T) (H5F_Kvalue(F, T))
+#define H5F_NREFS(F) (H5F_get_nrefs(F))
+#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F))
+#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F))
+#define H5F_SOHM_ADDR(F) (H5F_get_sohm_addr(F))
+#define H5F_SET_SOHM_ADDR(F, A) (H5F_set_sohm_addr((F), (A)))
+#define H5F_SOHM_VERS(F) (H5F_get_sohm_vers(F))
+#define H5F_SET_SOHM_VERS(F, V) (H5F_set_sohm_vers((F), (V)))
+#define H5F_SOHM_NINDEXES(F) (H5F_get_sohm_nindexes(F))
+#define H5F_SET_SOHM_NINDEXES(F, N) (H5F_set_sohm_nindexes((F), (N)))
+#define H5F_FCPL(F) (H5F_get_fcpl(F))
+#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F))
+#define H5F_RDCC_NSLOTS(F) (H5F_rdcc_nslots(F))
+#define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F))
+#define H5F_RDCC_W0(F) (H5F_rdcc_w0(F))
+#define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F))
+#define H5F_GC_REF(F) (H5F_gc_ref(F))
+#define H5F_USE_LATEST_FORMAT(F) (H5F_use_latest_format(F))
+#define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F))
+#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL)))
+#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F))
+#define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC)))
+#define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F))
+#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR)))
#endif /* H5F_PACKAGE */
-
/* Macros to encode/decode offset/length's for storing in the file */
-#define H5F_ENCODE_OFFSET(f,p,o) switch(H5F_SIZEOF_ADDR(f)) { \
- case 4: UINT32ENCODE(p,o); break; \
- case 8: UINT64ENCODE(p,o); break; \
- case 2: UINT16ENCODE(p,o); break; \
-}
-
-#define H5F_DECODE_OFFSET(f,p,o) switch (H5F_SIZEOF_ADDR (f)) { \
- case 4: UINT32DECODE(p, o); break; \
- case 8: UINT64DECODE(p, o); break; \
- case 2: UINT16DECODE(p, o); break; \
-}
-
-#define H5F_ENCODE_LENGTH_LEN(p,l,s) switch(s) { \
- case 4: UINT32ENCODE(p,l); break; \
- case 8: UINT64ENCODE(p,l); break; \
- case 2: UINT16ENCODE(p,l); break; \
- default: HDassert("bad sizeof size" && 0); \
-}
-
-#define H5F_ENCODE_LENGTH(f,p,l) H5F_ENCODE_LENGTH_LEN(p,l,H5F_SIZEOF_SIZE(f))
-
-#define H5F_DECODE_LENGTH_LEN(p,l,s) switch(s) { \
- case 4: UINT32DECODE(p,l); break; \
- case 8: UINT64DECODE(p,l); break; \
- case 2: UINT16DECODE(p,l); break; \
- default: HDassert("bad sizeof size" && 0); \
-}
-
-#define H5F_DECODE_LENGTH(f,p,l) H5F_DECODE_LENGTH_LEN(p,l,H5F_SIZEOF_SIZE(f))
+#define H5F_ENCODE_OFFSET(f, p, o) \
+ switch (H5F_SIZEOF_ADDR(f)) { \
+ case 4: \
+ UINT32ENCODE(p, o); \
+ break; \
+ case 8: \
+ UINT64ENCODE(p, o); \
+ break; \
+ case 2: \
+ UINT16ENCODE(p, o); \
+ break; \
+ }
+
+#define H5F_DECODE_OFFSET(f, p, o) \
+ switch (H5F_SIZEOF_ADDR(f)) { \
+ case 4: \
+ UINT32DECODE(p, o); \
+ break; \
+ case 8: \
+ UINT64DECODE(p, o); \
+ break; \
+ case 2: \
+ UINT16DECODE(p, o); \
+ break; \
+ }
+
+#define H5F_ENCODE_LENGTH_LEN(p, l, s) \
+ switch (s) { \
+ case 4: \
+ UINT32ENCODE(p, l); \
+ break; \
+ case 8: \
+ UINT64ENCODE(p, l); \
+ break; \
+ case 2: \
+ UINT16ENCODE(p, l); \
+ break; \
+ default: \
+ HDassert("bad sizeof size" && 0); \
+ }
+
+#define H5F_ENCODE_LENGTH(f, p, l) H5F_ENCODE_LENGTH_LEN(p, l, H5F_SIZEOF_SIZE(f))
+
+#define H5F_DECODE_LENGTH_LEN(p, l, s) \
+ switch (s) { \
+ case 4: \
+ UINT32DECODE(p, l); \
+ break; \
+ case 8: \
+ UINT64DECODE(p, l); \
+ break; \
+ case 2: \
+ UINT16DECODE(p, l); \
+ break; \
+ default: \
+ HDassert("bad sizeof size" && 0); \
+ }
+
+#define H5F_DECODE_LENGTH(f, p, l) H5F_DECODE_LENGTH_LEN(p, l, H5F_SIZEOF_SIZE(f))
/*
* Macros that check for overflows. These are somewhat dangerous to fiddle
* with.
*/
#if (H5_SIZEOF_SIZE_T >= H5_SIZEOF_OFF_T)
-# define H5F_OVERFLOW_SIZET2OFFT(X) \
- ((size_t)(X)>=(size_t)((size_t)1<<(8*sizeof(off_t)-1)))
+#define H5F_OVERFLOW_SIZET2OFFT(X) ((size_t)(X) >= (size_t)((size_t)1 << (8 * sizeof(off_t) - 1)))
#else
-# define H5F_OVERFLOW_SIZET2OFFT(X) 0
+#define H5F_OVERFLOW_SIZET2OFFT(X) 0
#endif
#if (H5_SIZEOF_HSIZE_T >= H5_SIZEOF_OFF_T)
-# define H5F_OVERFLOW_HSIZET2OFFT(X) \
- ((hsize_t)(X)>=(hsize_t)((hsize_t)1<<(8*sizeof(off_t)-1)))
+#define H5F_OVERFLOW_HSIZET2OFFT(X) ((hsize_t)(X) >= (hsize_t)((hsize_t)1 << (8 * sizeof(off_t) - 1)))
#else
-# define H5F_OVERFLOW_HSIZET2OFFT(X) 0
+#define H5F_OVERFLOW_HSIZET2OFFT(X) 0
#endif
/* Sizes of object addresses & sizes in the file (in bytes) */
-#define H5F_OBJ_ADDR_SIZE sizeof(haddr_t)
-#define H5F_OBJ_SIZE_SIZE sizeof(hsize_t)
+#define H5F_OBJ_ADDR_SIZE sizeof(haddr_t)
+#define H5F_OBJ_SIZE_SIZE sizeof(hsize_t)
/* File-wide default character encoding can not yet be set via the file
* creation property list and is always ASCII. */
#define H5F_DEFAULT_CSET H5T_CSET_ASCII
/* ========= File Creation properties ============ */
-#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */
-#define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */
-#define H5F_CRT_SYM_LEAF_DEF 4
-#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */
-#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */
-#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
-#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
-#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */
+#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */
+#define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */
+#define H5F_CRT_SYM_LEAF_DEF 4
+#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */
+#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */
+#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
+#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
+/* Number of shared object header message indexes */
+#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes"
#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */
-#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */
-#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
-#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
-
-
+/* Minimum size of messages in each index */
+#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize"
+#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
+#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
/* ========= File Access properties ============ */
-#define H5F_ACS_META_CACHE_INIT_CONFIG_NAME "mdc_initCacheCfg" /* Initial metadata cache resize configuration */
-#define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */
-#define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
-#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
-#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */
-#define H5F_ACS_ALIGN_NAME "align" /* Alignment */
-#define H5F_ACS_META_BLOCK_SIZE_NAME "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */
-#define H5F_ACS_SIEVE_BUF_SIZE_NAME "sieve_buf_size" /* Maximum sieve buffer size (when data sieving is allowed by file driver) */
-#define H5F_ACS_SDATA_BLOCK_SIZE_NAME "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data allocations) */
-#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */
-#define H5F_ACS_FILE_DRV_ID_NAME "driver_id" /* File driver ID */
-#define H5F_ACS_FILE_DRV_INFO_NAME "driver_info" /* File driver info */
-#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */
-#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */
-#define H5F_ACS_FAMILY_NEWSIZE_NAME "family_newsize" /* New member size of family driver. (private property only used by h5repart) */
-#define H5F_ACS_FAMILY_TO_SEC2_NAME "family_to_sec2" /* Whether to convert family to sec2 driver. (private property only used by h5repart) */
-#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */
-#define H5F_ACS_LATEST_FORMAT_NAME "latest_format" /* 'Use latest format version' flag */
-#define H5F_ACS_WANT_POSIX_FD_NAME "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address */
-#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */
-#define H5F_ACS_FILE_IMAGE_INFO_NAME "file_image_info" /* struct containing initial file image and callback info */
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
+#define H5F_ACS_META_CACHE_INIT_CONFIG_NAME \
+ "mdc_initCacheCfg" /* Initial metadata cache resize configuration */
+#define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */
+#define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
+#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
+#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */
+#define H5F_ACS_ALIGN_NAME "align" /* Alignment */
+#define H5F_ACS_META_BLOCK_SIZE_NAME \
+ "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */
+#define H5F_ACS_SIEVE_BUF_SIZE_NAME \
+ "sieve_buf_size" /* Maximum sieve buffer size (when data sieving is allowed by file driver) */
+#define H5F_ACS_SDATA_BLOCK_SIZE_NAME \
+ "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data \
+ allocations) */
+#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */
+#define H5F_ACS_FILE_DRV_ID_NAME "driver_id" /* File driver ID */
+#define H5F_ACS_FILE_DRV_INFO_NAME "driver_info" /* File driver info */
+#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */
+#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */
+#define H5F_ACS_FAMILY_NEWSIZE_NAME \
+ "family_newsize" /* New member size of family driver. (private property only used by h5repart) */
+#define H5F_ACS_FAMILY_TO_SEC2_NAME \
+ "family_to_sec2" /* Whether to convert family to sec2 driver. (private property only used by h5repart) \
+ */
+#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */
+#define H5F_ACS_LATEST_FORMAT_NAME "latest_format" /* 'Use latest format version' flag */
+#define H5F_ACS_WANT_POSIX_FD_NAME \
+ "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address \
+ */
+#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */
+#define H5F_ACS_FILE_IMAGE_INFO_NAME \
+ "file_image_info" /* struct containing initial file image and callback info */
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME \
+ "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME \
+ "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
/* ======================== File Mount properties ====================*/
-#define H5F_MNT_SYM_LOCAL_NAME "local" /* Whether absolute symlinks local to file. */
-
+#define H5F_MNT_SYM_LOCAL_NAME "local" /* Whether absolute symlinks local to file. */
#ifdef H5_HAVE_PARALLEL
/* Which process writes metadata */
@@ -405,75 +481,75 @@
#endif /* H5_HAVE_PARALLEL */
/* Define the HDF5 file signature */
-#define H5F_SIGNATURE "\211HDF\r\n\032\n"
+#define H5F_SIGNATURE "\211HDF\r\n\032\n"
#define H5F_SIGNATURE_LEN 8
/* Version #'s of the major components of the file format */
-#define HDF5_SUPERBLOCK_VERSION_DEF 0 /* The default super block format */
-#define HDF5_SUPERBLOCK_VERSION_1 1 /* Version with non-default B-tree 'K' value */
-#define HDF5_SUPERBLOCK_VERSION_2 2 /* Revised version with superblock extension and checksum */
-#define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_2 /* The maximum super block format */
-#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */
-#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */
-#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */
-#define HDF5_DRIVERINFO_VERSION_0 0 /* of the Driver Information Block*/
+#define HDF5_SUPERBLOCK_VERSION_DEF 0 /* The default super block format */
+#define HDF5_SUPERBLOCK_VERSION_1 1 /* Version with non-default B-tree 'K' value */
+#define HDF5_SUPERBLOCK_VERSION_2 2 /* Revised version with superblock extension and checksum */
+#define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_2 /* The maximum super block format */
+#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */
+#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */
+#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */
+#define HDF5_DRIVERINFO_VERSION_0 0 /* of the Driver Information Block*/
/* B-tree internal 'K' values */
-#define HDF5_BTREE_SNODE_IK_DEF 16
-#define HDF5_BTREE_CHUNK_IK_DEF 32 /* Note! this value is assumed
- to be 32 for version 0
- of the superblock and
- if it is changed, the code
- must compensate. -QAK
- */
-#define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */
- /* See format specification on version 1 B-trees */
+#define HDF5_BTREE_SNODE_IK_DEF 16
+#define HDF5_BTREE_CHUNK_IK_DEF \
+ 32 /* Note! this value is assumed \
+ to be 32 for version 0 \
+ of the superblock and \
+ if it is changed, the code \
+ must compensate. -QAK \
+ */
+#define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */
+ /* See format specification on version 1 B-trees */
/* Macros to define signatures of all objects in the file */
/* Size of signature information (on disk) */
/* (all on-disk signatures should be this length) */
-#define H5_SIZEOF_MAGIC 4
+#define H5_SIZEOF_MAGIC 4
/* v1 B-tree node signature */
-#define H5B_MAGIC "TREE"
+#define H5B_MAGIC "TREE"
/* v2 B-tree signatures */
-#define H5B2_HDR_MAGIC "BTHD" /* Header */
-#define H5B2_INT_MAGIC "BTIN" /* Internal node */
-#define H5B2_LEAF_MAGIC "BTLF" /* Leaf node */
+#define H5B2_HDR_MAGIC "BTHD" /* Header */
+#define H5B2_INT_MAGIC "BTIN" /* Internal node */
+#define H5B2_LEAF_MAGIC "BTLF" /* Leaf node */
/* Extensible array signatures */
-#define H5EA_HDR_MAGIC "EAHD" /* Header */
-#define H5EA_IBLOCK_MAGIC "EAIB" /* Index block */
-#define H5EA_DBLOCK_MAGIC "EADB" /* Data block */
+#define H5EA_HDR_MAGIC "EAHD" /* Header */
+#define H5EA_IBLOCK_MAGIC "EAIB" /* Index block */
+#define H5EA_DBLOCK_MAGIC "EADB" /* Data block */
/* Free space signatures */
-#define H5FS_HDR_MAGIC "FSHD" /* Header */
-#define H5FS_SINFO_MAGIC "FSSE" /* Serialized sections */
+#define H5FS_HDR_MAGIC "FSHD" /* Header */
+#define H5FS_SINFO_MAGIC "FSSE" /* Serialized sections */
/* Symbol table node signature */
-#define H5G_NODE_MAGIC "SNOD"
+#define H5G_NODE_MAGIC "SNOD"
/* Fractal heap signatures */
-#define H5HF_HDR_MAGIC "FRHP" /* Header */
-#define H5HF_IBLOCK_MAGIC "FHIB" /* Indirect block */
-#define H5HF_DBLOCK_MAGIC "FHDB" /* Direct block */
+#define H5HF_HDR_MAGIC "FRHP" /* Header */
+#define H5HF_IBLOCK_MAGIC "FHIB" /* Indirect block */
+#define H5HF_DBLOCK_MAGIC "FHDB" /* Direct block */
/* Global heap signature */
-#define H5HG_MAGIC "GCOL"
+#define H5HG_MAGIC "GCOL"
/* Local heap signature */
-#define H5HL_MAGIC "HEAP"
+#define H5HL_MAGIC "HEAP"
/* Object header signatures */
-#define H5O_HDR_MAGIC "OHDR" /* Header */
-#define H5O_CHK_MAGIC "OCHK" /* Continuation chunk */
+#define H5O_HDR_MAGIC "OHDR" /* Header */
+#define H5O_CHK_MAGIC "OCHK" /* Continuation chunk */
/* Shared Message signatures */
-#define H5SM_TABLE_MAGIC "SMTB" /* Shared Message Table */
-#define H5SM_LIST_MAGIC "SMLI" /* Shared Message List */
-
+#define H5SM_TABLE_MAGIC "SMTB" /* Shared Message Table */
+#define H5SM_LIST_MAGIC "SMLI" /* Shared Message List */
/****************************/
/* Library Private Typedefs */
@@ -489,7 +565,7 @@ struct H5P_genplist_t;
/* Forward declarations for anonymous H5F objects */
/* Main file structures */
-typedef struct H5F_t H5F_t;
+typedef struct H5F_t H5F_t;
typedef struct H5F_file_t H5F_file_t;
/* Block aggregation structure */
@@ -497,92 +573,88 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
/* I/O Info for an operation */
typedef struct H5F_io_info_t {
- const H5F_t *f; /* File object */
- const struct H5P_genplist_t *dxpl; /* DXPL object */
+ const H5F_t * f; /* File object */
+ const struct H5P_genplist_t *dxpl; /* DXPL object */
} H5F_io_info_t;
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-
/* Private functions */
-H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id,
- hid_t fapl_id, hid_t dxpl_id);
+H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id);
H5_DLL herr_t H5F_try_close(H5F_t *f);
/* Functions than retrieve values from the file struct */
H5_DLL unsigned H5F_get_intent(const H5F_t *f);
-H5_DLL char *H5F_get_open_name(const H5F_t *f);
-H5_DLL char *H5F_get_actual_name(const H5F_t *f);
-H5_DLL char *H5F_get_extpath(const H5F_t *f);
+H5_DLL char * H5F_get_open_name(const H5F_t *f);
+H5_DLL char * H5F_get_actual_name(const H5F_t *f);
+H5_DLL char * H5F_get_extpath(const H5F_t *f);
H5_DLL H5F_file_t *H5F_get_shared(const H5F_t *f);
-H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
-H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
-H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
-H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
-H5_DLL hid_t H5F_get_file_id(const H5F_t *f);
-H5_DLL ssize_t H5F_get_file_image(H5F_t *f, void *buf_ptr, size_t buf_len);
-H5_DLL H5F_t *H5F_get_parent(const H5F_t *f);
+H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
+H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
+H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
+H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
+H5_DLL hid_t H5F_get_file_id(const H5F_t *f);
+H5_DLL ssize_t H5F_get_file_image(H5F_t *f, void *buf_ptr, size_t buf_len);
+H5_DLL H5F_t * H5F_get_parent(const H5F_t *f);
H5_DLL unsigned H5F_get_nmounts(const H5F_t *f);
-H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
-H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref);
-H5_DLL herr_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr);
-H5_DLL herr_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, hbool_t app_ref, size_t *obj_id_count_ptr);
+H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
+H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref);
+H5_DLL herr_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr);
+H5_DLL herr_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list,
+ hbool_t app_ref, size_t *obj_id_count_ptr);
/* Functions than retrieve values set/cached from the superblock/FCPL */
-H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
-H5_DLL unsigned H5F_sym_leaf_k(const H5F_t *f);
-H5_DLL unsigned H5F_Kvalue(const H5F_t *f, const struct H5B_class_t *type);
-H5_DLL unsigned H5F_get_nrefs(const H5F_t *f);
-H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f);
-H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f);
-H5_DLL haddr_t H5F_get_sohm_addr(const H5F_t *f);
-H5_DLL herr_t H5F_set_sohm_addr(H5F_t *f, haddr_t addr);
-H5_DLL unsigned H5F_get_sohm_vers(const H5F_t *f);
-H5_DLL herr_t H5F_set_sohm_vers(H5F_t *f, unsigned vers);
-H5_DLL unsigned H5F_get_sohm_nindexes(const H5F_t *f);
-H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes);
-H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
+H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
+H5_DLL unsigned H5F_sym_leaf_k(const H5F_t *f);
+H5_DLL unsigned H5F_Kvalue(const H5F_t *f, const struct H5B_class_t *type);
+H5_DLL unsigned H5F_get_nrefs(const H5F_t *f);
+H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f);
+H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f);
+H5_DLL haddr_t H5F_get_sohm_addr(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_addr(H5F_t *f, haddr_t addr);
+H5_DLL unsigned H5F_get_sohm_vers(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_vers(H5F_t *f, unsigned vers);
+H5_DLL unsigned H5F_get_sohm_nindexes(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes);
+H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f);
-H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f);
-H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
-H5_DLL double H5F_rdcc_w0(const H5F_t *f);
-H5_DLL size_t H5F_sieve_buf_size(const H5F_t *f);
-H5_DLL unsigned H5F_gc_ref(const H5F_t *f);
-H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f);
-H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f);
-H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag);
-H5_DLL struct H5RC_t *H5F_grp_btree_shared(const H5F_t *f);
-H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5RC_t *rc);
-H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f);
-H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr);
+H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f);
+H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
+H5_DLL double H5F_rdcc_w0(const H5F_t *f);
+H5_DLL size_t H5F_sieve_buf_size(const H5F_t *f);
+H5_DLL unsigned H5F_gc_ref(const H5F_t *f);
+H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f);
+H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f);
+H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag);
+H5_DLL struct H5RC_t * H5F_grp_btree_shared(const H5F_t *f);
+H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5RC_t *rc);
+H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f);
+H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr);
/* Functions that retrieve values from VFD layer */
-H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
-H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
+H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
+H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature);
H5_DLL haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type);
-H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl,
- void **file_handle);
+H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle);
/* Functions that check file mounting information */
H5_DLL hbool_t H5F_is_mount(const H5F_t *file);
H5_DLL hbool_t H5F_has_mount(const H5F_t *file);
-H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc/*in,out*/);
-H5_DLL herr_t H5F_flush_mounts(H5F_t *f, hid_t dxpl_id);
+H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc /*in,out*/);
+H5_DLL herr_t H5F_flush_mounts(H5F_t *f, hid_t dxpl_id);
/* Functions that operate on blocks of bytes wrt super block */
-H5_DLL herr_t H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr,
- size_t size, hid_t dxpl_id, void *buf/*out*/);
-H5_DLL herr_t H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr,
- size_t size, hid_t dxpl_id, const void *buf);
+H5_DLL herr_t H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id,
+ void *buf /*out*/);
+H5_DLL herr_t H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id,
+ const void *buf);
/* Address-related functions */
H5_DLL void H5F_addr_encode(const H5F_t *f, uint8_t **pp, haddr_t addr);
@@ -605,25 +677,23 @@ H5_DLL herr_t H5F_super_dirty(H5F_t *f);
/* Parallel I/O (i.e. MPI) related routines */
#ifdef H5_HAVE_PARALLEL
-H5_DLL int H5F_mpi_get_rank(const H5F_t *f);
+H5_DLL int H5F_mpi_get_rank(const H5F_t *f);
H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
-H5_DLL int H5F_mpi_get_size(const H5F_t *f);
+H5_DLL int H5F_mpi_get_size(const H5F_t *f);
#endif /* H5_HAVE_PARALLEL */
/* External file cache routines */
-H5_DLL H5F_t *H5F_efc_open(H5F_t *parent, const char *name, unsigned flags,
- hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id);
+H5_DLL H5F_t *H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
+ hid_t dxpl_id);
H5_DLL herr_t H5F_efc_close(H5F_t *parent, H5F_t *file);
/* Global heap CWFS routines */
H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap);
H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr);
-H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap,
- hbool_t add_heap);
+H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap, hbool_t add_heap);
H5_DLL herr_t H5F_cwfs_remove_heap(H5F_file_t *shared, struct H5HG_heap_t *heap);
/* Debugging functions */
-H5_DLL herr_t H5F_debug(H5F_t *f, FILE * stream, int indent, int fwidth);
+H5_DLL herr_t H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth);
#endif /* _H5Fprivate_H */
-
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 11d731f..c48bea0 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,10 +25,10 @@
/* When this header is included from a private header, don't make calls to H5check() */
#undef H5CHECK
#ifndef _H5private_H
-#define H5CHECK H5check(),
-#else /* _H5private_H */
+#define H5CHECK H5check(),
+#else /* _H5private_H */
#define H5CHECK
-#endif /* _H5private_H */
+#endif /* _H5private_H */
/*
* These are the bits that can be passed to the `flags' argument of
@@ -42,26 +42,26 @@
* H5F_ACC_DEBUG no longer has any prints any special debug info. The symbol is
* being retained and will be listed as deprecated in HDF5 1.10.0.
*/
-#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */
-#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */
-#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */
-#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists */
-#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (no longer used) */
-#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
+#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */
+#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */
+#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */
+#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists */
+#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (no longer used) */
+#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
* parent file. */
-#define H5F_ACC_DEFAULT (H5CHECK 0xffffu) /*ignore setting on lapl */
+#define H5F_ACC_DEFAULT (H5CHECK 0xffffu) /*ignore setting on lapl */
/* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
-#define H5F_OBJ_FILE (0x0001u) /* File objects */
-#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */
-#define H5F_OBJ_GROUP (0x0004u) /* Group objects */
-#define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */
-#define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */
-#define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR)
-#define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */
- /* (as opposed to objects opened through any file ID accessing this file) */
+#define H5F_OBJ_FILE (0x0001u) /* File objects */
+#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */
+#define H5F_OBJ_GROUP (0x0004u) /* Group objects */
+#define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */
+#define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */
+#define H5F_OBJ_ALL (H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR)
+#define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */
+/* (as opposed to objects opened through any file ID accessing this file) */
#define H5F_FAMILY_DEFAULT (hsize_t)0
@@ -77,35 +77,35 @@
/* The difference between a single file and a set of mounted files */
typedef enum H5F_scope_t {
- H5F_SCOPE_LOCAL = 0, /*specified file handle only */
- H5F_SCOPE_GLOBAL = 1 /*entire virtual file */
+ H5F_SCOPE_LOCAL = 0, /*specified file handle only */
+ H5F_SCOPE_GLOBAL = 1 /*entire virtual file */
} H5F_scope_t;
/* Unlimited file size for H5Pset_external() */
-#define H5F_UNLIMITED ((hsize_t)(-1L))
+#define H5F_UNLIMITED ((hsize_t)(-1L))
/* How does file close behave?
* H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL
* H5F_CLOSE_WEAK - file closes only after all opened objects are closed
* H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file
- close fails
+ close fails
* H5F_CLOSE_STRONG - if there are opened objects, close them first, then
- close file
+ close file
*/
typedef enum H5F_close_degree_t {
- H5F_CLOSE_DEFAULT = 0,
- H5F_CLOSE_WEAK = 1,
- H5F_CLOSE_SEMI = 2,
- H5F_CLOSE_STRONG = 3
+ H5F_CLOSE_DEFAULT = 0,
+ H5F_CLOSE_WEAK = 1,
+ H5F_CLOSE_SEMI = 2,
+ H5F_CLOSE_STRONG = 3
} H5F_close_degree_t;
/* Current "global" information about file */
/* (just size info currently) */
typedef struct H5F_info_t {
- hsize_t super_ext_size; /* Superblock extension size */
+ hsize_t super_ext_size; /* Superblock extension size */
struct {
- hsize_t hdr_size; /* Shared object header message header size */
- H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
+ hsize_t hdr_size; /* Shared object header message header size */
+ H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
} sohm;
} H5F_info_t;
@@ -118,31 +118,31 @@ typedef struct H5F_info_t {
* enumeration.
*/
typedef enum H5F_mem_t {
- H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list.
- * Must be negative.
- */
- H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the
- * datatype set in a larger allocation
- * that will be suballocated by the library.
- * Must be zero.
- */
- H5FD_MEM_SUPER = 1, /* Superblock data */
- H5FD_MEM_BTREE = 2, /* B-tree data */
- H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */
- H5FD_MEM_GHEAP = 4, /* Global heap data */
- H5FD_MEM_LHEAP = 5, /* Local heap data */
- H5FD_MEM_OHDR = 6, /* Object header data */
-
- H5FD_MEM_NTYPES /* Sentinel value - must be last */
+ H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list.
+ * Must be negative.
+ */
+ H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the
+ * datatype set in a larger allocation
+ * that will be suballocated by the library.
+ * Must be zero.
+ */
+ H5FD_MEM_SUPER = 1, /* Superblock data */
+ H5FD_MEM_BTREE = 2, /* B-tree data */
+ H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */
+ H5FD_MEM_GHEAP = 4, /* Global heap data */
+ H5FD_MEM_LHEAP = 5, /* Local heap data */
+ H5FD_MEM_OHDR = 6, /* Object header data */
+
+ H5FD_MEM_NTYPES /* Sentinel value - must be last */
} H5F_mem_t;
/* Library's file format versions */
typedef enum H5F_libver_t {
- H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */
- H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/
+ H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */
+ H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/
} H5F_libver_t;
-/* Define file format version for 1.8 to prepare for 1.10 release.
+/* Define file format version for 1.8 to prepare for 1.10 release.
* (Not used anywhere now)*/
#define H5F_LIBVER_18 H5F_LIBVER_LATEST
@@ -151,39 +151,32 @@ extern "C" {
#endif
/* Functions in H5F.c */
-H5_DLL htri_t H5Fis_hdf5(const char *filename);
-H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags,
- hid_t create_plist, hid_t access_plist);
-H5_DLL hid_t H5Fopen(const char *filename, unsigned flags,
- hid_t access_plist);
-H5_DLL hid_t H5Freopen(hid_t file_id);
-H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
-H5_DLL herr_t H5Fclose(hid_t file_id);
-H5_DLL hid_t H5Fget_create_plist(hid_t file_id);
-H5_DLL hid_t H5Fget_access_plist(hid_t file_id);
-H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent);
-H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types);
-H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list);
-H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle);
-H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist);
-H5_DLL herr_t H5Funmount(hid_t loc, const char *name);
+H5_DLL htri_t H5Fis_hdf5(const char *filename);
+H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist);
+H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist);
+H5_DLL hid_t H5Freopen(hid_t file_id);
+H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
+H5_DLL herr_t H5Fclose(hid_t file_id);
+H5_DLL hid_t H5Fget_create_plist(hid_t file_id);
+H5_DLL hid_t H5Fget_access_plist(hid_t file_id);
+H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent);
+H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types);
+H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list);
+H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle);
+H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist);
+H5_DLL herr_t H5Funmount(hid_t loc, const char *name);
H5_DLL hssize_t H5Fget_freespace(hid_t file_id);
-H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size);
-H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
-H5_DLL herr_t H5Fget_mdc_config(hid_t file_id,
- H5AC_cache_config_t * config_ptr);
-H5_DLL herr_t H5Fset_mdc_config(hid_t file_id,
- H5AC_cache_config_t * config_ptr);
-H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr);
-H5_DLL herr_t H5Fget_mdc_size(hid_t file_id,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int * cur_num_entries_ptr);
-H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id);
-H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
-H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info);
-H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id);
+H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size);
+H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len);
+H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr);
+H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
+ size_t *cur_size_ptr, int *cur_num_entries_ptr);
+H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id);
+H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
+H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info);
+H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag);
H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
@@ -193,4 +186,3 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
}
#endif
#endif /* _H5Fpublic_H */
-
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 5bf28eb..173f17e 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Fquery.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File structure query routines.
*
@@ -26,66 +26,52 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_intent
+ * Function: H5F_get_intent
*
- * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: 'intent' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * September 29, 2000
+ * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: 'intent' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -99,18 +85,13 @@ H5F_get_intent(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->flags)
} /* end H5F_get_intent() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_open_name
- *
- * Purpose: Retrieve the name used to open a file.
+ * Function: H5F_get_open_name
*
- * Return: Success: The name of the file.
- * Failure: ? (should not happen)
- *
- * Programmer: Neil Fortner
- * December 15 2008
+ * Purpose: Retrieve the name used to open a file.
*
+ * Return: Success: The name of the file.
+ * Failure: ? (should not happen)
*-------------------------------------------------------------------------
*/
char *
@@ -125,18 +106,13 @@ H5F_get_open_name(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->open_name)
} /* end H5F_get_open_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_actual_name
- *
- * Purpose: Retrieve the actual name of a file, after resolving symlinks, etc.
- *
- * Return: Success: The name of the file.
- * Failure: ? (should not happen)
+ * Function: H5F_get_actual_name
*
- * Programmer: Quincey Koziol
- * November 25 2009
+ * Purpose: Retrieve the actual name of a file, after resolving symlinks, etc.
*
+ * Return: Success: The name of the file.
+ * Failure: ? (should not happen)
*-------------------------------------------------------------------------
*/
char *
@@ -151,18 +127,14 @@ H5F_get_actual_name(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->actual_name)
} /* end H5F_get_actual_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_extpath
+ * Function: H5F_get_extpath
*
- * Purpose: Retrieve the file's 'extpath' flags
- * This is used by H5L_extern_traverse() and H5D_build_extfile_prefix() 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
+ * Purpose: Retrieve the file's 'extpath' flags
+ * This is used by H5L_extern_traverse() and H5D_build_file_prefix()
+ * to retrieve the main file's location when searching the target file.
*
+ * Return: 'extpath' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
char *
@@ -177,16 +149,12 @@ H5F_get_extpath(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->extpath)
} /* end H5F_get_extpath() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_shared
- *
- * Purpose: Retrieve the file's 'shared' pointer
+ * Function: H5F_get_shared
*
- * Return: 'shared' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'shared' pointer
*
+ * Return: 'shared' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
H5F_file_t *
@@ -200,16 +168,12 @@ H5F_get_shared(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared)
} /* end H5F_get_shared() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_same_shared
- *
- * Purpose: Determine if two files have the same shared file pointer
- *
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Function: H5F_same_shared
*
- * Programmer: Quincey Koziol, July 19, 2011
+ * Purpose: Determine if two files have the same shared file pointer
*
+ * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -226,16 +190,12 @@ H5F_same_shared(const H5F_t *f1, const H5F_t *f2)
FUNC_LEAVE_NOAPI(f1->shared == f2->shared)
} /* end H5F_same_shared() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_nopen_objs
+ * Function: H5F_get_nopen_objs
*
- * Purpose: Retrieve the file's 'nopen_objs' value
- *
- * Return: 'nopen_objs' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'nopen_objs' value
*
+ * Return: 'nopen_objs' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -249,16 +209,12 @@ H5F_get_nopen_objs(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->nopen_objs)
} /* end H5F_get_nopen_objs() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_file_id
- *
- * Purpose: Retrieve the file's 'file_id' value
+ * Function: H5F_get_file_id
*
- * Return: 'file_id' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'file_id' value
*
+ * Return: 'file_id' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
hid_t
@@ -272,16 +228,12 @@ H5F_get_file_id(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->file_id)
} /* end H5F_get_file_id() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_parent
- *
- * Purpose: Retrieve the file's 'parent' pointer
- *
- * Return: 'parent' on success/abort on failure (shouldn't fail)
+ * Function: H5F_get_parent
*
- * Programmer: Quincey Koziol, July 19, 2011
+ * Purpose: Retrieve the file's 'parent' pointer
*
+ * Return: 'parent' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
H5F_t *
@@ -295,16 +247,12 @@ H5F_get_parent(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->parent)
} /* end H5F_get_parent() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_nmounts
+ * Function: H5F_get_nmounts
*
- * Purpose: Retrieve the file's 'nmounts' value
- *
- * Return: 'nmounts' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'nmounts' value
*
+ * Return: 'nmounts' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -318,20 +266,13 @@ H5F_get_nmounts(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->nmounts)
} /* end H5F_get_nmounts() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_fcpl
- *
- * Purpose: Retrieve the value of a file's FCPL.
+ * Function: H5F_get_fcpl
*
- * Return: Success: The FCPL for the file.
- *
- * Failure: ? (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 25 2005
+ * Purpose: Retrieve the value of a file's FCPL.
*
+ * Return: Success: The FCPL for the file.
+ * Failure: ? (should not happen)
*-------------------------------------------------------------------------
*/
hid_t
@@ -346,19 +287,14 @@ H5F_get_fcpl(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->fcpl_id)
} /* end H5F_get_fcpl() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sizeof_addr
- *
- * Purpose: Quick and dirty routine to retrieve the size of the file's size_t
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
+ * Function: H5F_sizeof_addr
*
- * Return: 'sizeof_addr' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * September 29, 2000
+ * Purpose: Quick and dirty routine to retrieve the size of the file's size_t
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: 'sizeof_addr' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
uint8_t
@@ -373,19 +309,14 @@ H5F_sizeof_addr(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sizeof_addr)
} /* end H5F_sizeof_addr() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sizeof_size
- *
- * Purpose: Quick and dirty routine to retrieve the size of the file's off_t
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: 'sizeof_size' on success/abort on failure (shouldn't fail)
+ * Function: H5F_sizeof_size
*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * September 29, 2000
+ * Purpose: Quick and dirty routine to retrieve the size of the file's off_t
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: 'sizeof_size' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
uint8_t
@@ -400,16 +331,12 @@ H5F_sizeof_size(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sizeof_size)
} /* H5F_sizeof_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_addr
+ * Function: H5F_get_sohm_addr
*
- * Purpose: Retrieve the file's 'sohm_addr' value
- *
- * Return: 'sohm_addr' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'sohm_addr' value
*
+ * Return: 'sohm_addr' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
haddr_t
@@ -424,16 +351,12 @@ H5F_get_sohm_addr(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sohm_addr)
} /* end H5F_get_sohm_addr() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_vers
- *
- * Purpose: Retrieve the file's 'sohm_vers' value
+ * Function: H5F_get_sohm_vers
*
- * Return: 'sohm_vers' on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'sohm_vers' value
*
+ * Return: 'sohm_vers' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -448,16 +371,12 @@ H5F_get_sohm_vers(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sohm_vers)
} /* end H5F_get_sohm_vers() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_nindexes
- *
- * Purpose: Retrieve the file's 'sohm_nindexes' value
- *
- * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail)
+ * Function: H5F_get_sohm_nindexes
*
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'sohm_nindexes' value
*
+ * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -472,23 +391,16 @@ H5F_get_sohm_nindexes(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sohm_nindexes)
} /* end H5F_get_sohm_nindexes() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sym_leaf_k
+ * Function: H5F_sym_leaf_k
*
- * Purpose: Replaced a macro to retrieve the symbol table leaf size,
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the symbol table leaf size,
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-negative, and the symbol table leaf size is
+ * Return: Success: Non-negative, and the symbol table leaf size is
* returned.
- *
- * Failure: Negative (should not happen)
- *
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
- * Oct 14 2001
- *
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
unsigned
@@ -504,23 +416,16 @@ H5F_sym_leaf_k(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sblock->sym_leaf_k)
} /* end H5F_sym_leaf_k() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_Kvalue
+ * Function: H5F_Kvalue
*
- * Purpose: Replaced a macro to retrieve a B-tree key value for a certain
- * type, now that the generic properties are being used to store
- * the B-tree values.
+ * Purpose: Replaced a macro to retrieve a B-tree key value for a certain
+ * type, now that the generic properties are being used to store
+ * the B-tree values.
*
- * Return: Success: Non-negative, and the B-tree key value is
+ * Return: Success: Non-negative, and the B-tree key value is
* returned.
- *
- * Failure: Negative (should not happen)
- *
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
- * Oct 14 2001
- *
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
unsigned
@@ -537,16 +442,12 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
FUNC_LEAVE_NOAPI(f->shared->sblock->btree_k[type->id])
} /* end H5F_Kvalue() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_nrefs
- *
- * Purpose: Retrieve the file's 'nrefs' value
- *
- * Return: 'nrefs' on success/abort on failure (shouldn't fail)
+ * Function: H5F_get_nrefs
*
- * Programmer: Quincey Koziol, July 20, 2011
+ * Purpose: Retrieve the file's 'nrefs' value
*
+ * Return: 'nrefs' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
unsigned
@@ -561,23 +462,16 @@ H5F_get_nrefs(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->nrefs)
} /* end H5F_get_nrefs() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_rdcc_nslots
+ * Function: H5F_rdcc_nslots
*
- * Purpose: Replaced a macro to retrieve the raw data cache number of slots,
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the raw data cache number of slots,
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-negative, and the raw data cache number of
+ * Return: Success: Non-negative, and the raw data cache number of
* of slots is returned.
- *
- * Failure: Negative (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jun 1 2004
- *
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
size_t
@@ -592,23 +486,16 @@ H5F_rdcc_nslots(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->rdcc_nslots)
} /* end H5F_rdcc_nelmts() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_rdcc_nbytes
+ * Function: H5F_rdcc_nbytes
*
- * Purpose: Replaced a macro to retrieve the raw data cache number of bytes,
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the raw data cache number of bytes,
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-negative, and the raw data cache number of
+ * Return: Success: Non-negative, and the raw data cache number of
* of bytes is returned.
- *
- * Failure: Negative (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jun 1 2004
- *
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
size_t
@@ -623,23 +510,16 @@ H5F_rdcc_nbytes(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->rdcc_nbytes)
} /* end H5F_rdcc_nbytes() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_rdcc_w0
+ * Function: H5F_rdcc_w0
*
- * Purpose: Replaced a macro to retrieve the raw data cache 'w0' value
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the raw data cache 'w0' value
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-negative, and the raw data cache 'w0' value
+ * Return: Success: Non-negative, and the raw data cache 'w0' value
* is returned.
- *
- * Failure: Negative (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jun 2 2004
- *
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
double
@@ -654,19 +534,14 @@ H5F_rdcc_w0(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->rdcc_w0)
} /* end H5F_rdcc_w0() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_base_addr
+ * Function: H5F_get_base_addr
*
- * Purpose: Quick and dirty routine to retrieve the file's 'base_addr' value
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
- * December 20, 2002
+ * Purpose: Quick and dirty routine to retrieve the file's 'base_addr' value
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
haddr_t
@@ -682,23 +557,16 @@ H5F_get_base_addr(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sblock->base_addr)
} /* end H5F_get_base_addr() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_grp_btree_shared
+ * Function: H5F_grp_btree_shared
*
- * Purpose: Replaced a macro to retrieve the shared B-tree node info
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the shared B-tree node info
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-void, and the shared B-tree node info
+ * Return: Success: Non-void, and the shared B-tree node info
* is returned.
- *
- * Failure: void (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jul 5 2004
- *
+ * Failure: void (should not happen)
*-------------------------------------------------------------------------
*/
H5RC_t *
@@ -713,23 +581,16 @@ H5F_grp_btree_shared(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->grp_btree_shared)
} /* end H5F_grp_btree_shared() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sieve_buf_size
+ * Function: H5F_sieve_buf_size
*
- * Purpose: Replaced a macro to retrieve the dataset sieve buffer size
- * now that the generic properties are being used to store
- * the values.
+ * Purpose: Replaced a macro to retrieve the dataset sieve buffer size
+ * now that the generic properties are being used to store
+ * the values.
*
- * Return: Success: Non-void, and the dataset sieve buffer size
+ * Return: Success: Non-void, and the dataset sieve buffer size
* is returned.
- *
- * Failure: void (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jul 8 2005
- *
+ * Failure: void (should not happen)
*-------------------------------------------------------------------------
*/
size_t
@@ -744,22 +605,18 @@ H5F_sieve_buf_size(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->sieve_buf_size)
} /* end H5F_sieve_buf_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_gc_ref
+ * Function: H5F_gc_ref
*
- * Purpose: Replaced a macro to retrieve the "garbage collect
- * references flag" now that the generic properties are being used
- * to store the values.
+ * Purpose: Replaced a macro to retrieve the "garbage collect
+ * references flag" now that the generic properties are being used
+ * to store the values.
*
- * Return: Success: The "garbage collect references flag"
- * is returned.
+ * Return: Success: The "garbage collect references flag" is returned.
+ * Failure: (should not happen)
*
- * Failure: (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jul 8 2005
+ * Programmer: Quincey Koziol
+ * Jul 8 2005
*
*-------------------------------------------------------------------------
*/
@@ -775,21 +632,14 @@ H5F_gc_ref(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->gc_ref)
} /* end H5F_gc_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_use_latest_format
- *
- * Purpose: Retrieve the 'use the latest version of the format' flag for
- * the file.
+ * Function: H5F_use_latest_format
*
- * Return: Success: Non-negative, the 'use the latest format' flag
- *
- * Failure: (can't happen)
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Oct 2 2006
+ * Purpose: Retrieve the 'use the latest version of the format' flag for
+ * the file.
*
+ * Return: Success: Non-negative, the 'use the latest format' flag
+ * Failure: (can't happen)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -804,20 +654,13 @@ H5F_use_latest_format(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->latest_format)
} /* end H5F_use_latest_format() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_fc_degree
- *
- * Purpose: Retrieve the 'file close degree' for the file.
+ * Function: H5F_get_fc_degree
*
- * Return: Success: Non-negative, the 'file close degree'
- *
- * Failure: (can't happen)
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Mar 5 2007
+ * Purpose: Retrieve the 'file close degree' for the file.
*
+ * Return: Success: Non-negative, the 'file close degree'
+ * Failure: (can't happen)
*-------------------------------------------------------------------------
*/
H5F_close_degree_t
@@ -832,20 +675,13 @@ H5F_get_fc_degree(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->fc_degree)
} /* end H5F_get_fc_degree() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_store_msg_crt_idx
- *
- * Purpose: Retrieve the 'store message creation index' flag for the file.
+ * Function: H5F_store_msg_crt_idx
*
- * Return: Success: Non-negative, the 'store message creation index' flag
- *
- * Failure: (can't happen)
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Mar 6 2007
+ * Purpose: Retrieve the 'store message creation index' flag for the file.
*
+ * Return: Success: Non-negative, the 'store message creation index' flag
+ * Failure: (can't happen)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -860,19 +696,13 @@ H5F_store_msg_crt_idx(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->store_msg_crt_idx)
} /* end H5F_store_msg_crt_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_has_feature
- *
- * Purpose: Check if a file has a particular feature enabled
+ * Function: H5F_has_feature
*
- * Return: Success: Non-negative - TRUE or FALSE
- * Failure: Negative (should not happen)
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 31 2004
+ * Purpose: Check if a file has a particular feature enabled
*
+ * Return: Success: Non-negative - TRUE or FALSE
+ * Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -884,22 +714,17 @@ H5F_has_feature(const H5F_t *f, unsigned feature)
HDassert(f);
HDassert(f->shared);
- FUNC_LEAVE_NOAPI((hbool_t)(f->shared->lf->feature_flags&feature))
+ FUNC_LEAVE_NOAPI((hbool_t)(f->shared->lf->feature_flags & feature))
} /* end H5F_has_feature() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_driver_id
- *
- * Purpose: Quick and dirty routine to retrieve the file's 'driver_id' value
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: 'driver_id' on success/abort on failure (shouldn't fail)
+ * Function: H5F_get_driver_id
*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * October 10, 2000
+ * Purpose: Quick and dirty routine to retrieve the file's 'driver_id' value
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: 'driver_id' on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
hid_t
@@ -915,25 +740,20 @@ H5F_get_driver_id(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->lf->driver_id)
} /* end H5F_get_driver_id() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_fileno
+ * Function: H5F_get_fileno
*
- * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * March 27, 2002
+ * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
H5F_get_fileno(const H5F_t *f, unsigned long *filenum)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -943,30 +763,25 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum)
HDassert(filenum);
/* Retrieve the file's serial number */
- if(H5FD_get_fileno(f->shared->lf, filenum) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno")
+ if (H5FD_get_fileno(f->shared->lf, filenum) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_fileno() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_eoa
- *
- * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value
+ * Function: H5F_get_eoa
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
- * June 1, 2004
+ * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value
*
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
haddr_t
H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
{
- haddr_t ret_value;
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
@@ -974,14 +789,13 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
HDassert(f->shared);
/* Dispatch to driver */
- if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5F_get_vfd_handle
*
@@ -990,16 +804,12 @@ done:
*
* Return: Success: Non-negative.
* Failure: negative.
- *
- * Programmer: Raymond Lu
- * Sep. 16, 2002
- *
*-------------------------------------------------------------------------
*/
herr_t
H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1008,27 +818,22 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
HDassert(file_handle);
/* Get the VFD handle */
- if(H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0)
+ if (H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_vfd_handle() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_is_tmp_addr
+ * Function: H5F_is_tmp_addr
*
- * Purpose: Quick and dirty routine to determine if an address is in
- * the 'temporary' file space.
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
- *
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * June 11, 2009
+ * Purpose: Quick and dirty routine to determine if an address is in
+ * the 'temporary' file space.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -1043,20 +848,15 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
FUNC_LEAVE_NOAPI(H5F_addr_le(f->shared->tmp_addr, addr))
} /* end H5F_is_tmp_addr() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_use_tmp_space
- *
- * Purpose: Quick and dirty routine to determine if using temporary
- * file space is allowed for this file.
- * (Mainly added to stop non-file routines from poking about in the
- * H5F_t data structure)
+ * Function: H5F_use_tmp_space
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
- *
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * July 1, 2009
+ * Purpose: Quick and dirty routine to determine if using temporary
+ * file space is allowed for this file.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
*
+ * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
hbool_t
@@ -1070,4 +870,3 @@ H5F_use_tmp_space(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->use_tmp_space)
} /* end H5F_use_tmp_space() */
-
diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c
index 45f0e61..b25e32d 100644
--- a/src/H5Fsfile.c
+++ b/src/H5Fsfile.c
@@ -6,26 +6,26 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free lists */
/* PRIVATE TYPEDEFS */
/* Struct for tracking "shared" file structs */
typedef struct H5F_sfile_node_t {
- H5F_file_t *shared; /* Pointer to "shared" file struct */
- struct H5F_sfile_node_t *next; /* Pointer to next node */
+ H5F_file_t * shared; /* Pointer to "shared" file struct */
+ struct H5F_sfile_node_t *next; /* Pointer to next node */
} H5F_sfile_node_t;
/* PRIVATE PROTOTYPES */
@@ -38,13 +38,12 @@ H5FL_DEFINE_STATIC(H5F_sfile_node_t);
/* Declare a local variable to track the shared file information */
H5F_sfile_node_t *H5F_sfile_head_g = NULL;
-
/*-------------------------------------------------------------------------
- * Function: H5F_sfile_assert_num
+ * Function: H5F_sfile_assert_num
*
- * Purpose: Sanity checking that shared file list is empty
+ * Purpose: Sanity checking that shared file list is empty
*
- * Return: none (void)
+ * Return: void
*
* Programmer: Quincey Koziol
* Monday, July 25, 2005
@@ -56,18 +55,18 @@ H5F_sfile_assert_num(unsigned n)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(n == 0) {
+ if (n == 0) {
/* Sanity checking */
HDassert(H5F_sfile_head_g == NULL);
} /* end if */
else {
- unsigned count; /* Number of open shared files */
- H5F_sfile_node_t *curr; /* Current shared file node */
+ unsigned count; /* Number of open shared files */
+ H5F_sfile_node_t *curr; /* Current shared file node */
/* Iterate through low-level files for matching low-level file info */
- curr = H5F_sfile_head_g;
+ curr = H5F_sfile_head_g;
count = 0;
- while(curr) {
+ while (curr) {
/* Increment # of open shared file structs */
count++;
@@ -82,26 +81,23 @@ H5F_sfile_assert_num(unsigned n)
FUNC_LEAVE_NOAPI_VOID
} /* H5F_sfile_assert_num() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sfile_add
+ * Function: H5F_sfile_add
*
- * Purpose: Add a "shared" file struct to the list of open files
+ * Purpose: Add a "shared" file struct to the list of open files
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, July 18, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5F_sfile_add(H5F_file_t *shared)
{
- H5F_sfile_node_t *new_shared; /* New shared file node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_sfile_node_t *new_shared; /* New shared file node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -110,7 +106,7 @@ H5F_sfile_add(H5F_file_t *shared)
/* Allocate new shared file node */
if (NULL == (new_shared = H5FL_CALLOC(H5F_sfile_node_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set shared file value */
new_shared->shared = shared;
@@ -123,27 +119,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sfile_add() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sfile_search
+ * Function: H5F_sfile_search
*
- * Purpose: Search for a "shared" file with low-level file info that
+ * Purpose: Search for a "shared" file with low-level file info that
* matches
*
- * Return: Non-NULL on success / NULL on failure
+ * Return: Non-NULL on success / NULL on failure
*
* Programmer: Quincey Koziol
* Monday, July 18, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5F_file_t *
H5F_sfile_search(H5FD_t *lf)
{
H5F_sfile_node_t *curr; /* Current shared file node */
- H5F_file_t *ret_value = NULL; /* Return value */
+ H5F_file_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -152,9 +145,9 @@ H5F_sfile_search(H5FD_t *lf)
/* Iterate through low-level files for matching low-level file info */
curr = H5F_sfile_head_g;
- while(curr) {
+ while (curr) {
/* Check for match */
- if(0==H5FD_cmp(curr->shared->lf, lf))
+ if (0 == H5FD_cmp(curr->shared->lf, lf))
HGOTO_DONE(curr->shared)
/* Advance to next shared file node */
@@ -165,27 +158,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sfile_search() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_sfile_remove
+ * Function: H5F_sfile_remove
*
- * Purpose: Remove a "shared" file struct from the list of open files
+ * Purpose: Remove a "shared" file struct from the list of open files
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, July 18, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5F_sfile_remove(H5F_file_t *shared)
{
- H5F_sfile_node_t *curr; /* Current shared file node */
- H5F_sfile_node_t *last; /* Last shared file node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_sfile_node_t *curr; /* Current shared file node */
+ H5F_sfile_node_t *last; /* Last shared file node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -195,18 +185,18 @@ H5F_sfile_remove(H5F_file_t *shared)
/* Locate shared file node with correct shared file */
last = NULL;
curr = H5F_sfile_head_g;
- while(curr && curr->shared != shared) {
+ while (curr && curr->shared != shared) {
/* Advance to next node */
last = curr;
curr = curr->next;
} /* end while */
/* Indicate error if the node wasn't found */
- if(curr == NULL)
- HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "can't find shared file info")
+ if (curr == NULL)
+ HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "can't find shared file info")
/* Remove node found from list */
- if(last != NULL)
+ if (last != NULL)
/* Removing middle or tail node in list */
last->next = curr->next;
else
@@ -220,4 +210,3 @@ H5F_sfile_remove(H5F_file_t *shared)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sfile_remove() */
-
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index b032ca9..62c2f47 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,52 +15,45 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5F_init_super_interface
-
+#define H5_INTERFACE_INIT_FUNC H5F_init_super_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr);
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -68,13 +61,10 @@ static herr_t H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr);
/* Declare a free list to manage the H5F_super_t struct */
H5FL_DEFINE(H5F_super_t);
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5F_init_super_interface -- Initialize interface-specific information
@@ -96,7 +86,6 @@ H5F_init_super_interface(void)
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_super_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_ext_create
*
@@ -112,7 +101,7 @@ H5F_init_super_interface(void)
static herr_t
H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -124,9 +113,11 @@ H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr)
HDassert(ext_ptr);
/* Check for older version of superblock format that can't support superblock extensions */
- if(f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "superblock extension not permitted with version %u of superblock", f->shared->sblock->super_vers)
- else if(H5F_addr_defined(f->shared->sblock->ext_addr))
+ if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL,
+ "superblock extension not permitted with version %u of superblock",
+ f->shared->sblock->super_vers)
+ else if (H5F_addr_defined(f->shared->sblock->ext_addr))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "superblock extension already exists?!?!")
else {
/* The superblock extension isn't actually a group, but the
@@ -138,7 +129,7 @@ H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr)
* extension.
*/
H5O_loc_reset(ext_ptr);
- if(H5O_create(f, dxpl_id, 0, (size_t)1, H5P_GROUP_CREATE_DEFAULT, ext_ptr) < 0)
+ if (H5O_create(f, dxpl_id, 0, (size_t)1, H5P_GROUP_CREATE_DEFAULT, ext_ptr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create superblock extension")
/* Record the address of the superblock extension */
@@ -149,7 +140,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_create() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_ext_open
*
@@ -165,7 +155,7 @@ done:
herr_t
H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -180,14 +170,13 @@ H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
ext_ptr->addr = ext_addr;
/* Open the superblock extension object header */
- if(H5O_open(ext_ptr) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open superblock extension")
+ if (H5O_open(ext_ptr) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open superblock extension")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_open() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_ext_close
*
@@ -201,10 +190,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id,
- hbool_t was_created)
+H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id, hbool_t was_created)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -213,19 +201,19 @@ H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id,
HDassert(ext_ptr);
/* Check if extension was created */
- if(was_created) {
+ if (was_created) {
/* Increment link count on superblock extension's object header */
- if(H5O_link(ext_ptr, 1, dxpl_id) < 0)
+ if (H5O_link(ext_ptr, 1, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_LINKCOUNT, FAIL, "unable to increment hard link count")
/* Decrement refcount on superblock extension's object header in memory */
- if(H5O_dec_rc_by_loc(ext_ptr, dxpl_id) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to decrement refcount on superblock extension")
+ if (H5O_dec_rc_by_loc(ext_ptr, dxpl_id) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to decrement refcount on superblock extension")
} /* end if */
/* Twiddle the number of open objects to avoid closing the file. */
f->nopen_objs++;
- if(H5O_close(ext_ptr) < 0)
+ if (H5O_close(ext_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close superblock extension")
f->nopen_objs--;
@@ -233,7 +221,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_close() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_read
*
@@ -246,7 +233,6 @@ done:
* Failure: FAIL
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept 12, 2003
*
*-------------------------------------------------------------------------
@@ -254,49 +240,49 @@ done:
herr_t
H5F_super_read(H5F_t *f, hid_t dxpl_id)
{
- H5P_genplist_t *dxpl; /* DXPL object */
- H5F_super_t * sblock = NULL; /* superblock structure */
- unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */
- haddr_t super_addr; /* Absolute address of superblock */
- H5AC_protect_t rw; /* read/write permissions for file */
- hbool_t dirtied = FALSE; /* Bool for sblock protect call */
- herr_t ret_value = SUCCEED; /* return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ H5F_super_t * sblock = NULL; /* superblock structure */
+ unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */
+ haddr_t super_addr; /* Absolute address of superblock */
+ H5AC_protect_t rw; /* read/write permissions for file */
+ hbool_t dirtied = FALSE; /* Bool for sblock protect call */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get the DXPL plist object for DXPL ID */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Find the superblock */
- if(H5FD_locate_signature(f->shared->lf, dxpl, &super_addr) < 0)
+ if (H5FD_locate_signature(f->shared->lf, dxpl, &super_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
- if(HADDR_UNDEF == super_addr)
+ if (HADDR_UNDEF == super_addr)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "file signature not found")
/* Check for userblock present */
- if(H5F_addr_gt(super_addr, 0)) {
+ if (H5F_addr_gt(super_addr, 0)) {
/* Set the base address for the file in the VFD now */
- if(H5FD_set_base_addr(f->shared->lf, super_addr) < 0)
+ if (H5FD_set_base_addr(f->shared->lf, super_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver")
} /* end if */
/* Determine file intent for superblock protect */
- if(H5F_INTENT(f) & H5F_ACC_RDWR)
+ if (H5F_INTENT(f) & H5F_ACC_RDWR)
rw = H5AC_WRITE;
else
rw = H5AC_READ;
/* Look up the superblock */
- if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &dirtied, rw)))
+ if (NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &dirtied, rw)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "unable to load superblock")
/* Mark the superblock dirty if it was modified during loading or VFD indicated to do so */
- if((H5AC_WRITE == rw) && (dirtied || H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_SBLK_LOAD)))
+ if ((H5AC_WRITE == rw) && (dirtied || H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_SBLK_LOAD)))
sblock_flags |= H5AC__DIRTIED_FLAG;
/* Pin the superblock in the cache */
- if(H5AC_pin_protected_entry(sblock) < 0)
+ if (H5AC_pin_protected_entry(sblock) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin superblock")
/* Set the pointer to the pinned superblock */
@@ -304,13 +290,12 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
done:
/* Release the superblock */
- if(sblock && H5AC_unprotect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0)
+ if (sblock && H5AC_unprotect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_super_read() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_init
*
@@ -322,7 +307,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 15, 2003
*
*-------------------------------------------------------------------------
@@ -330,62 +314,62 @@ done:
herr_t
H5F_super_init(H5F_t *f, hid_t dxpl_id)
{
- H5F_super_t *sblock = NULL; /* Superblock cache structure */
- hbool_t sblock_in_cache = FALSE; /* Whether the superblock has been inserted into the metadata cache */
- H5P_genplist_t *plist; /* File creation property list */
- hsize_t userblock_size; /* Size of userblock, in bytes */
- hsize_t superblock_size; /* Size of superblock, in bytes */
- size_t driver_size; /* Size of driver info block (bytes) */
- unsigned super_vers = HDF5_SUPERBLOCK_VERSION_DEF; /* Superblock version for file */
- H5O_loc_t ext_loc; /* Superblock extension object location */
- hbool_t need_ext; /* Whether the superblock extension is needed */
- hbool_t ext_created = FALSE; /* Whether the extension has been created */
- herr_t ret_value = SUCCEED; /* Return Value */
+ H5F_super_t *sblock = NULL; /* Superblock cache structure */
+ hbool_t sblock_in_cache = FALSE; /* Whether the superblock has been inserted into the metadata cache */
+ H5P_genplist_t *plist; /* File creation property list */
+ hsize_t userblock_size; /* Size of userblock, in bytes */
+ hsize_t superblock_size; /* Size of superblock, in bytes */
+ size_t driver_size; /* Size of driver info block (bytes) */
+ unsigned super_vers = HDF5_SUPERBLOCK_VERSION_DEF; /* Superblock version for file */
+ H5O_loc_t ext_loc; /* Superblock extension object location */
+ hbool_t need_ext; /* Whether the superblock extension is needed */
+ hbool_t ext_created = FALSE; /* Whether the extension has been created */
+ herr_t ret_value = SUCCEED; /* Return Value */
FUNC_ENTER_NOAPI(FAIL)
/* Allocate space for the superblock */
- if(NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
+ if (NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize various address information */
- sblock->base_addr = HADDR_UNDEF;
- sblock->ext_addr = HADDR_UNDEF;
+ sblock->base_addr = HADDR_UNDEF;
+ sblock->ext_addr = HADDR_UNDEF;
sblock->driver_addr = HADDR_UNDEF;
- sblock->root_addr = HADDR_UNDEF;
+ sblock->root_addr = HADDR_UNDEF;
/* Get the shared file creation property list */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Initialize sym_leaf_k */
- if(H5P_get(plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0)
+ if (H5P_get(plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for object size")
/* Initialize btree_k */
- if(H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, &sblock->btree_k[0]) < 0)
+ if (H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, &sblock->btree_k[0]) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes")
/* Bump superblock version if we are to use the latest version of the format */
- if(f->shared->latest_format)
+ if (f->shared->latest_format)
super_vers = HDF5_SUPERBLOCK_VERSION_LATEST;
/* Bump superblock version to create superblock extension for SOHM info */
- else if(f->shared->sohm_nindexes > 0)
+ else if (f->shared->sohm_nindexes > 0)
super_vers = HDF5_SUPERBLOCK_VERSION_2;
/* Check for non-default indexed storage B-tree internal 'K' value
* and set the version # of the superblock to 1 if it is a non-default
* value.
*/
- else if(sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF)
+ else if (sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF)
super_vers = HDF5_SUPERBLOCK_VERSION_1;
/* If a newer superblock version is required, set it here */
- if(super_vers != HDF5_SUPERBLOCK_VERSION_DEF) {
- H5P_genplist_t *c_plist; /* Property list */
+ if (super_vers != HDF5_SUPERBLOCK_VERSION_DEF) {
+ H5P_genplist_t *c_plist; /* Property list */
- if(NULL == (c_plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
+ if (NULL == (c_plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property list")
- if(H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
+ if (H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set superblock version")
} /* end if */
@@ -395,28 +379,29 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
* base address is set to the same thing as the superblock for
* now.
*/
- if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
+ if (H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get userblock size")
/* Sanity check the userblock size vs. the file's allocation alignment */
- if(userblock_size > 0) {
- if(userblock_size < f->shared->alignment)
+ if (userblock_size > 0) {
+ if (userblock_size < f->shared->alignment)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "userblock size must be > file object alignment")
- if(0 != (userblock_size % f->shared->alignment))
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "userblock size must be an integral multiple of file object alignment")
+ if (0 != (userblock_size % f->shared->alignment))
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "userblock size must be an integral multiple of file object alignment")
} /* end if */
- sblock->base_addr = userblock_size;
+ sblock->base_addr = userblock_size;
sblock->status_flags = 0;
/* Reserve space for the userblock */
- if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, userblock_size) < 0)
+ if (H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, userblock_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for userblock")
/* Set the base address for the file in the VFD now, after allocating
* space for userblock.
*/
- if(H5FD_set_base_addr(f->shared->lf, sblock->base_addr) < 0)
+ if (H5FD_set_base_addr(f->shared->lf, sblock->base_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set base address for file driver")
/* Save a local copy of the superblock version number */
@@ -427,7 +412,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
/* Compute the size of the driver information block */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
- if(driver_size > 0) {
+ if (driver_size > 0) {
driver_size += H5F_DRVINFOBLOCK_HDR_SIZE;
/*
@@ -443,15 +428,15 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
* superblock need to be at the beginning of the file and only the first
* allocation request is required to return memory at format address zero.
*/
- if(super_vers < HDF5_SUPERBLOCK_VERSION_2)
+ if (super_vers < HDF5_SUPERBLOCK_VERSION_2)
superblock_size += driver_size;
/* Reserve space in the file for the superblock, instead of allocating it */
- if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, superblock_size) < 0)
+ if (H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, superblock_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for superblock")
/* Insert superblock into cache, pinned */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache")
sblock_in_cache = TRUE;
@@ -463,7 +448,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
*/
/* Files with SOHM indices always need the superblock extension */
- if(f->shared->sohm_nindexes > 0) {
+ if (f->shared->sohm_nindexes > 0) {
HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
@@ -471,14 +456,14 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
* for the superblock extension, check for non-default values to store
* in it.
*/
- else if(super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
+ else if (super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
/* Check for non-default v1 B-tree 'K' values to store */
- if(sblock->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
- sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF ||
- sblock->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF)
+ if (sblock->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
+ sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF ||
+ sblock->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF)
need_ext = TRUE;
/* Check for driver info to store */
- else if(driver_size > 0)
+ else if (driver_size > 0)
need_ext = TRUE;
else
need_ext = FALSE;
@@ -487,7 +472,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
need_ext = FALSE;
/* Create the superblock extension for "extra" superblock data, if necessary. */
- if(need_ext) {
+ if (need_ext) {
/* The superblock extension isn't actually a group, but the
* default group creation list should work fine.
* If we don't supply a size for the object header, HDF5 will
@@ -496,86 +481,88 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
* be tuned if more information is added to the superblock
* extension.
*/
- if(H5F_super_ext_create(f, dxpl_id, &ext_loc) < 0)
+ if (H5F_super_ext_create(f, dxpl_id, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension")
ext_created = TRUE;
/* Create the Shared Object Header Message table and register it with
* the metadata cache, if this file supports shared messages.
*/
- if(f->shared->sohm_nindexes > 0) {
+ if (f->shared->sohm_nindexes > 0) {
/* Initialize the shared message code & write the SOHM message to the extension */
- if(H5SM_init(f, plist, &ext_loc, dxpl_id) < 0)
+ if (H5SM_init(f, plist, &ext_loc, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create SOHM table")
- } /* end if */
+ }
/* Check for non-default v1 B-tree 'K' values to store */
- if(sblock->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
- sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF ||
- sblock->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF) {
- H5O_btreek_t btreek; /* v1 B-tree 'K' value message for superblock extension */
+ if (sblock->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
+ sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF ||
+ sblock->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF) {
+ H5O_btreek_t btreek; /* v1 B-tree 'K' value message for superblock extension */
/* Write v1 B-tree 'K' value information to the superblock extension */
btreek.btree_k[H5B_CHUNK_ID] = sblock->btree_k[H5B_CHUNK_ID];
btreek.btree_k[H5B_SNODE_ID] = sblock->btree_k[H5B_SNODE_ID];
- btreek.sym_leaf_k = sblock->sym_leaf_k;
- if(H5O_msg_create(&ext_loc, H5O_BTREEK_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &btreek, dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update v1 B-tree 'K' value header message")
+ btreek.sym_leaf_k = sblock->sym_leaf_k;
+ if (H5O_msg_create(&ext_loc, H5O_BTREEK_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE,
+ H5O_UPDATE_TIME, &btreek, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL,
+ "unable to update v1 B-tree 'K' value header message")
} /* end if */
/* Check for driver info to store */
- if(driver_size > 0) {
- H5O_drvinfo_t drvinfo; /* Driver info */
- uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
+ if (driver_size > 0) {
+ H5O_drvinfo_t drvinfo; /* Driver info */
+ uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
+ if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Write driver info information to the superblock extension */
drvinfo.len = driver_size;
drvinfo.buf = dbuf;
- if(H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0)
+ if (H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Close superblock extension, if it was created */
- if(ext_created && H5F_super_ext_close(f, &ext_loc, dxpl_id, ext_created) < 0)
+ if (ext_created && H5F_super_ext_close(f, &ext_loc, dxpl_id, ext_created) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close file's superblock extension")
/* Cleanup on failure */
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Check if the superblock has been allocated yet */
- if(sblock) {
+ if (sblock) {
/* Check if we've cached it already */
- if(sblock_in_cache) {
+ if (sblock_in_cache) {
/* Unpin superblock in cache */
- if(H5AC_unpin_entry(sblock) < 0)
+ if (H5AC_unpin_entry(sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
/* Evict the superblock from the cache */
- if(H5AC_expunge_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge superblock")
} /* end if */
else
/* Free superblock */
- if(H5F_super_free(sblock) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock")
+ if (H5F_super_free(sblock) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock")
/* Reset variables in file structure */
f->shared->sblock = NULL;
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_super_init() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_dirty
*
@@ -592,7 +579,7 @@ done:
herr_t
H5F_super_dirty(H5F_t *f)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -602,14 +589,13 @@ H5F_super_dirty(H5F_t *f)
HDassert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5AC_mark_entry_dirty(f->shared->sblock) < 0)
+ if (H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_dirty() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_free
*
@@ -640,7 +626,6 @@ H5F_super_free(H5F_super_t *sblock)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F_super_free() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_size
*
@@ -657,7 +642,7 @@ H5F_super_free(H5F_super_t *sblock)
herr_t
H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -667,14 +652,14 @@ H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_
HDassert(f->shared->sblock);
/* Set the superblock size */
- if(super_size)
- *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock->super_vers, f);
+ if (super_size)
+ *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock->super_vers, f);
/* Set the superblock extension size */
- if(super_ext_size) {
- if(H5F_addr_defined(f->shared->sblock->ext_addr)) {
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- H5O_hdr_info_t hdr_info; /* Object info for superblock extension */
+ if (super_ext_size) {
+ if (H5F_addr_defined(f->shared->sblock->ext_addr)) {
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ H5O_hdr_info_t hdr_info; /* Object info for superblock extension */
/* Set up "fake" object location for superblock extension */
H5O_loc_reset(&ext_loc);
@@ -682,7 +667,7 @@ H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_
ext_loc.addr = f->shared->sblock->ext_addr;
/* Get object header info for superblock extension */
- if(H5O_get_hdr_info(&ext_loc, dxpl_id, &hdr_info) < 0)
+ if (H5O_get_hdr_info(&ext_loc, dxpl_id, &hdr_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info")
/* Set the superblock extension size */
@@ -697,7 +682,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_size() */
-
/*-------------------------------------------------------------------------
* Function: H5F_super_ext_write_msg()
*
@@ -712,11 +696,11 @@ done:
herr_t
H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, unsigned id, void *mesg, hbool_t may_create)
{
- hbool_t ext_created = FALSE; /* Whether superblock extension was created */
- hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- htri_t status; /* Indicate whether the message exists or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t ext_created = FALSE; /* Whether superblock extension was created */
+ hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ htri_t status; /* Indicate whether the message exists or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -726,50 +710,50 @@ H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, unsigned id, void *mesg, hbool_
HDassert(f->shared->sblock);
/* Open/create the superblock extension object header */
- if(H5F_addr_defined(f->shared->sblock->ext_addr)) {
- if(H5F_super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension")
+ if (H5F_addr_defined(f->shared->sblock->ext_addr)) {
+ if (H5F_super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension")
} /* end if */
else {
HDassert(may_create);
- if(H5F_super_ext_create(f, dxpl_id, &ext_loc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
+ if (H5F_super_ext_create(f, dxpl_id, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
ext_created = TRUE;
} /* end else */
HDassert(H5F_addr_defined(ext_loc.addr));
ext_opened = TRUE;
/* Check if message with ID does not exist in the object header */
- if((status = H5O_msg_exists(&ext_loc, id, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message or message exists")
+ if ((status = H5O_msg_exists(&ext_loc, id, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL,
+ "unable to check object header for message or message exists")
/* Check for creating vs. writing */
- if(may_create) {
- if(status)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should not exist")
+ if (may_create) {
+ if (status)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should not exist")
- /* Create the message with ID in the superblock extension */
- if(H5O_msg_create(&ext_loc, id, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, mesg, dxpl_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to create the message in object header")
+ /* Create the message with ID in the superblock extension */
+ if (H5O_msg_create(&ext_loc, id, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, mesg, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to create the message in object header")
} /* end if */
else {
- if(!status)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should exist")
+ if (!status)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should exist")
- /* Update the message with ID in the superblock extension */
- if(H5O_msg_write(&ext_loc, id, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, mesg, dxpl_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to write the message in object header")
+ /* Update the message with ID in the superblock extension */
+ if (H5O_msg_write(&ext_loc, id, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, mesg, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to write the message in object header")
} /* end else */
done:
/* Close the superblock extension, if it was opened */
- if(ext_opened && H5F_super_ext_close(f, &ext_loc, dxpl_id, ext_created) < 0)
+ if (ext_opened && H5F_super_ext_close(f, &ext_loc, dxpl_id, ext_created) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close file's superblock extension")
/* Mark superblock dirty in cache, if superblock extension was created */
- if(ext_created && H5AC_mark_entry_dirty(f->shared->sblock) < 0)
+ if (ext_created && H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_write_msg() */
-
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index c6f7a46..b06e508 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -6,52 +6,58 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5Fsuper_cache.c
+ * Aug 15 2009
+ * Quincey Koziol
+ *
+ * Purpose: Implement file superblock & driver info metadata cache methods.
+ *
+ *-------------------------------------------------------------------------
+ */
+
/****************/
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
/* Local Macros */
/****************/
/* Maximum size of super-block buffers */
-#define H5F_MAX_SUPERBLOCK_SIZE 134
-
+#define H5F_MAX_SUPERBLOCK_SIZE 134
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -59,11 +65,10 @@
/* Metadata cache (H5AC) callbacks */
static H5F_super_t *H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
static herr_t H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F_super_t *sblock);
-static herr_t H5F_sblock_dest(H5F_t *f, H5F_super_t * sblock);
+static herr_t H5F_sblock_dest(H5F_t *f, H5F_super_t *sblock);
static herr_t H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy);
static herr_t H5F_sblock_size(const H5F_t *f, const H5F_super_t *sblock, size_t *size_ptr);
-
/*********************/
/* Package Variables */
/*********************/
@@ -85,13 +90,10 @@ const H5AC_class_t H5AC_SUPERBLOCK[1] = {{
/* Declare extern the free list to manage the H5F_super_t struct */
H5FL_EXTERN(H5F_super_t);
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5F_sblock_load
*
@@ -110,23 +112,23 @@ H5FL_EXTERN(H5F_super_t);
static H5F_super_t *
H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_udata)
{
- H5F_super_t *sblock = NULL; /* File's superblock */
- haddr_t base_addr = HADDR_UNDEF; /* Base address of file */
- uint8_t sbuf[H5F_MAX_SUPERBLOCK_SIZE]; /* Buffer for superblock */
- H5P_genplist_t *dxpl; /* DXPL object */
- H5P_genplist_t *c_plist; /* File creation property list */
- H5F_file_t *shared; /* shared part of `file' */
- H5FD_t *lf; /* file driver part of `shared' */
- haddr_t stored_eoa; /*relative end-of-addr in file */
- haddr_t eof; /*end of file address */
- uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */
- uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */
- const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */
- size_t variable_size; /*variable sizeof superblock */
- uint8_t *p; /* Temporary pointer into encoding buffer */
- unsigned super_vers; /* Superblock version */
- hbool_t *dirtied = (hbool_t *)_udata; /* Set up dirtied out value */
- H5F_super_t *ret_value; /* Return value */
+ H5F_super_t * sblock = NULL; /* File's superblock */
+ haddr_t base_addr = HADDR_UNDEF; /* Base address of file */
+ uint8_t sbuf[H5F_MAX_SUPERBLOCK_SIZE]; /* Buffer for superblock */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ H5P_genplist_t *c_plist; /* File creation property list */
+ H5F_file_t * shared; /* shared part of `file' */
+ H5FD_t * lf; /* file driver part of `shared' */
+ haddr_t stored_eoa; /*relative end-of-addr in file */
+ haddr_t eof; /*end of file address */
+ uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */
+ uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */
+ const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */
+ size_t variable_size; /*variable sizeof superblock */
+ uint8_t * p; /* Temporary pointer into encoding buffer */
+ unsigned super_vers; /* Superblock version */
+ hbool_t * dirtied = (hbool_t *)_udata; /* Set up dirtied out value */
+ H5F_super_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -137,30 +139,30 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
/* Short cuts */
shared = f->shared;
- lf = shared->lf;
+ lf = shared->lf;
/* Get the shared file creation property list */
- if(NULL == (c_plist = (H5P_genplist_t *)H5I_object(shared->fcpl_id)))
+ if (NULL == (c_plist = (H5P_genplist_t *)H5I_object(shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list")
/* Get the base address for the file in the VFD */
- if(HADDR_UNDEF == (base_addr = H5FD_get_base_addr(lf)))
+ if (HADDR_UNDEF == (base_addr = H5FD_get_base_addr(lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "failed to get base address for file driver")
/* Allocate space for the superblock */
- if(NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
+ if (NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the DXPL plist object for DXPL ID */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list")
/* Read fixed-size portion of the superblock */
p = sbuf;
H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t);
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
+ if (H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
/* Skip over signature (already checked when locating the superblock) */
@@ -168,9 +170,9 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
/* Superblock version */
super_vers = *p++;
- if(super_vers > HDF5_SUPERBLOCK_VERSION_LATEST)
+ if (super_vers > HDF5_SUPERBLOCK_VERSION_LATEST)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad superblock version number")
- if(H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
+ if (H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set superblock version")
/* Record the superblock version */
@@ -185,66 +187,66 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
HDassert(fixed_size + variable_size <= sizeof(sbuf));
/* Read in variable-sized portion of superblock */
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)(fixed_size + variable_size)) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)(fixed_size + variable_size)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
+ if (H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read superblock")
/* Check for older version of superblock format */
- if(super_vers < HDF5_SUPERBLOCK_VERSION_2) {
- uint32_t status_flags; /* File status flags */
- unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree internal node 'K' values */
- unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */
+ if (super_vers < HDF5_SUPERBLOCK_VERSION_2) {
+ uint32_t status_flags; /* File status flags */
+ unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree internal node 'K' values */
+ unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */
/* Freespace version (hard-wired) */
- if(HDF5_FREESPACE_VERSION != *p++)
+ if (HDF5_FREESPACE_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad free space version number")
/* Root group version number (hard-wired) */
- if(HDF5_OBJECTDIR_VERSION != *p++)
+ if (HDF5_OBJECTDIR_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad object directory version number")
/* Skip over reserved byte */
p++;
/* Shared header version number (hard-wired) */
- if(HDF5_SHAREDHEADER_VERSION != *p++)
+ if (HDF5_SHAREDHEADER_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad shared-header format version number")
/* Size of file addresses */
sizeof_addr = *p++;
- if(sizeof_addr != 2 && sizeof_addr != 4 &&
- sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32)
+ if (sizeof_addr != 2 && sizeof_addr != 4 && sizeof_addr != 8 && sizeof_addr != 16 &&
+ sizeof_addr != 32)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address")
- if(H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0)
+ if (H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number in an address")
- shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */
+ shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */
/* Size of file sizes */
sizeof_size = *p++;
- if(sizeof_size != 2 && sizeof_size != 4 &&
- sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32)
+ if (sizeof_size != 2 && sizeof_size != 4 && sizeof_size != 8 && sizeof_size != 16 &&
+ sizeof_size != 32)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size")
- if(H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0)
+ if (H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number for object size")
- shared->sizeof_size = sizeof_size; /* Keep a local copy also */
+ shared->sizeof_size = sizeof_size; /* Keep a local copy also */
/* Skip over reserved byte */
p++;
/* Various B-tree sizes */
UINT16DECODE(p, sym_leaf_k);
- if(sym_leaf_k == 0)
+ if (sym_leaf_k == 0)
HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad symbol table leaf node 1/2 rank")
- if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &sym_leaf_k) < 0)
+ if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &sym_leaf_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for symbol table leaf nodes")
- sblock->sym_leaf_k = sym_leaf_k; /* Keep a local copy also */
+ sblock->sym_leaf_k = sym_leaf_k; /* Keep a local copy also */
/* Need 'get' call to set other array values */
- if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
+ if (H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes")
UINT16DECODE(p, btree_k[H5B_SNODE_ID]);
- if(btree_k[H5B_SNODE_ID] == 0)
+ if (btree_k[H5B_SNODE_ID] == 0)
HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad 1/2 rank for btree internal nodes")
/*
* Delay setting the value in the property list until we've checked
@@ -255,40 +257,42 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
UINT32DECODE(p, status_flags);
HDassert(status_flags <= 255);
sblock->status_flags = (uint8_t)status_flags;
- if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS)
+ if (sblock->status_flags & ~H5F_SUPER_ALL_FLAGS)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock")
/*
* If the superblock version # is greater than 0, read in the indexed
* storage B-tree internal 'K' value
*/
- if(super_vers > HDF5_SUPERBLOCK_VERSION_DEF) {
+ if (super_vers > HDF5_SUPERBLOCK_VERSION_DEF) {
UINT16DECODE(p, btree_k[H5B_CHUNK_ID]);
/* Reserved bytes are present only in version 1 */
- if(super_vers == HDF5_SUPERBLOCK_VERSION_1)
- p += 2; /* reserved */
- } /* end if */
+ if (super_vers == HDF5_SUPERBLOCK_VERSION_1)
+ p += 2; /* reserved */
+ } /* end if */
else
btree_k[H5B_CHUNK_ID] = HDF5_BTREE_CHUNK_IK_DEF;
/* Set the B-tree internal node values, etc */
- if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
+ if (H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for btree internal nodes")
- HDmemcpy(sblock->btree_k, btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID); /* Keep a local copy also */
+ HDmemcpy(sblock->btree_k, btree_k,
+ sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID); /* Keep a local copy also */
/* Remainder of "variable-sized" portion of superblock */
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->driver_addr/*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->driver_addr /*out*/);
/* Allocate space for the root group symbol table entry */
HDassert(!sblock->root_ent);
- if(NULL == (sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't allocate space for root group symbol table entry")
+ if (NULL == (sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL,
+ "can't allocate space for root group symbol table entry")
/* decode the root group symbol table entry */
- if(H5G_ent_decode(f, (const uint8_t **)&p, sblock->root_ent) < 0)
+ if (H5G_ent_decode(f, (const uint8_t **)&p, sblock->root_ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode root group symbol table entry")
/* Set the root group address to the correct value */
@@ -298,9 +302,9 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
* Check if superblock address is different from base address and
* adjust base address and "end of address" address if so.
*/
- if(!H5F_addr_eq(base_addr, sblock->base_addr)) {
+ if (!H5F_addr_eq(base_addr, sblock->base_addr)) {
/* Check if the superblock moved earlier in the file */
- if(H5F_addr_lt(base_addr, sblock->base_addr))
+ if (H5F_addr_lt(base_addr, sblock->base_addr))
stored_eoa -= (sblock->base_addr - base_addr);
else
/* The superblock moved later in the file */
@@ -310,7 +314,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
sblock->base_addr = base_addr;
/* Set the base address for the file in the VFD now */
- if(H5FD_set_base_addr(lf, sblock->base_addr) < 0)
+ if (H5FD_set_base_addr(lf, sblock->base_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "failed to set base address for file driver")
/* Indicate that the superblock should be marked dirty */
@@ -322,7 +326,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
* undefined to let the library ignore the family driver information saved
* in the superblock.
*/
- if(H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
+ if (H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
/* Eliminate the driver info */
sblock->driver_addr = HADDR_UNDEF;
@@ -331,22 +335,23 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
} /* end if */
/* Decode the optional driver information block */
- if(H5F_addr_defined(sblock->driver_addr)) {
- uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Buffer for driver info block */
- char drv_name[9]; /* Name of driver */
- unsigned drv_vers; /* Version of driver info block */
- size_t drv_variable_size; /* Size of variable-length portion of driver info block, in bytes */
+ if (H5F_addr_defined(sblock->driver_addr)) {
+ uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Buffer for driver info block */
+ char drv_name[9]; /* Name of driver */
+ unsigned drv_vers; /* Version of driver info block */
+ size_t drv_variable_size; /* Size of variable-length portion of driver info block, in bytes */
/* Read in fixed-sized portion of driver info block */
p = dbuf;
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0)
+ if (H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE,
+ p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read driver information block")
/* Version number */
drv_vers = *p++;
- if(drv_vers != HDF5_DRIVERINFO_VERSION_0)
+ if (drv_vers != HDF5_DRIVERINFO_VERSION_0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "bad driver information block version number")
p += 3; /* reserved bytes */
@@ -365,54 +370,56 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
*/
- if(!HDstrncmp(drv_name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
+ if (!HDstrncmp(drv_name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "family driver should be used")
- if(!HDstrncmp(drv_name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
+ if (!HDstrncmp(drv_name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "multi driver should be used")
/* Read in variable-sized portion of driver info block */
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_SUPER,
+ sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0)
+ if (H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE,
+ drv_variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information")
/* Decode driver information */
- if(H5FD_sb_decode(lf, drv_name, p) < 0)
+ if (H5FD_sb_decode(lf, drv_name, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information")
} /* end if */
- } /* end if */
+ } /* end if */
else {
- uint32_t computed_chksum; /* Computed checksum */
- uint32_t read_chksum; /* Checksum read from file */
+ uint32_t computed_chksum; /* Computed checksum */
+ uint32_t read_chksum; /* Checksum read from file */
/* Size of file addresses */
sizeof_addr = *p++;
- if(sizeof_addr != 2 && sizeof_addr != 4 &&
- sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32)
+ if (sizeof_addr != 2 && sizeof_addr != 4 && sizeof_addr != 8 && sizeof_addr != 16 &&
+ sizeof_addr != 32)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address")
- if(H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0)
+ if (H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number in an address")
- shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */
+ shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */
/* Size of file sizes */
sizeof_size = *p++;
- if(sizeof_size != 2 && sizeof_size != 4 &&
- sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32)
+ if (sizeof_size != 2 && sizeof_size != 4 && sizeof_size != 8 && sizeof_size != 16 &&
+ sizeof_size != 32)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size")
- if(H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0)
+ if (H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number for object size")
- shared->sizeof_size = sizeof_size; /* Keep a local copy also */
+ shared->sizeof_size = sizeof_size; /* Keep a local copy also */
/* File status flags (not really used yet) */
sblock->status_flags = *p++;
- if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS)
+ if (sblock->status_flags & ~H5F_SUPER_ALL_FLAGS)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock")
/* Base, superblock extension, end of file & root group object header addresses */
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa/*out*/);
- H5F_addr_decode(f, (const uint8_t **)&p, &sblock->root_addr/*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &stored_eoa /*out*/);
+ H5F_addr_decode(f, (const uint8_t **)&p, &sblock->root_addr /*out*/);
/* Compute checksum for superblock */
computed_chksum = H5_checksum_metadata(sbuf, (size_t)(p - sbuf), 0);
@@ -421,16 +428,16 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
UINT32DECODE(p, read_chksum);
/* Verify correct checksum */
- if(read_chksum != computed_chksum)
+ if (read_chksum != computed_chksum)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "bad checksum on driver information block")
/*
* Check if superblock address is different from base address and
* adjust base address and "end of address" address if so.
*/
- if(!H5F_addr_eq(base_addr, sblock->base_addr)) {
+ if (!H5F_addr_eq(base_addr, sblock->base_addr)) {
/* Check if the superblock moved earlier in the file */
- if(H5F_addr_lt(base_addr, sblock->base_addr))
+ if (H5F_addr_lt(base_addr, sblock->base_addr))
stored_eoa -= (sblock->base_addr - base_addr);
else
/* The superblock moved later in the file */
@@ -440,7 +447,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
sblock->base_addr = base_addr;
/* Set the base address for the file in the VFD now */
- if(H5FD_set_base_addr(lf, sblock->base_addr) < 0)
+ if (H5FD_set_base_addr(lf, sblock->base_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "failed to set base address for file driver")
/* Indicate that the superblock should be marked dirty */
@@ -448,9 +455,9 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
} /* end if */
/* Get the B-tree internal node values, etc */
- if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, sblock->btree_k) < 0)
+ if (H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, sblock->btree_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes")
- if(H5P_get(c_plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0)
+ if (H5P_get(c_plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes")
} /* end else */
@@ -458,7 +465,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
* The user-defined data is the area of the file before the base
* address.
*/
- if(H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &sblock->base_addr) < 0)
+ if (H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &sblock->base_addr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set userblock size")
/*
@@ -466,27 +473,30 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
* possible is if the first file of a family of files was opened
* individually.
*/
- if(HADDR_UNDEF == (eof = H5FD_get_eof(lf)))
+ if (HADDR_UNDEF == (eof = H5FD_get_eof(lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size")
/* (Account for the stored EOA being absolute offset -QAK) */
- if((eof + sblock->base_addr) < stored_eoa)
- HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eoa)
+ if ((eof + sblock->base_addr) < stored_eoa)
+ HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL,
+ "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu",
+ (unsigned long long)eof, (unsigned long long)sblock->base_addr,
+ (unsigned long long)stored_eoa)
/*
* Tell the file driver how much address space has already been
* allocated so that it knows how to allocate additional memory.
*/
/* (Account for the stored EOA being absolute offset -NAF) */
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eoa - sblock->base_addr) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eoa - sblock->base_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to set end-of-address marker for file")
/* Read the file's superblock extension, if there is one. */
- if(H5F_addr_defined(sblock->ext_addr)) {
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */
- H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */
- htri_t status; /* Status for message existing */
+ if (H5F_addr_defined(sblock->ext_addr)) {
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */
+ H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */
+ htri_t status; /* Status for message existing */
/* Sanity check - superblock extension should only be defined for
* superblock version >= 2.
@@ -496,77 +506,77 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
/* Check for superblock extension being located "outside" the stored
* 'eoa' value, which can occur with the split/multi VFD.
*/
- if(H5F_addr_gt(sblock->ext_addr, stored_eoa)) {
+ if (H5F_addr_gt(sblock->ext_addr, stored_eoa)) {
/* Set the 'eoa' for the object header memory type large enough
* to give some room for a reasonably sized superblock extension.
* (This is _rather_ a kludge -QAK)
*/
- if(H5FD_set_eoa(lf, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0)
+ if (H5FD_set_eoa(lf, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to set end-of-address marker for file")
} /* end if */
/* Open the superblock extension */
- if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0)
+ if (H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, NULL, "unable to open file's superblock extension")
/* Check for the extension having a 'driver info' message */
- if((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID, dxpl_id)) < 0)
+ if ((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to read object header")
- if(status) {
+ if (status) {
/* Check for ignoring the driver info for this file */
- if(H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
+ if (H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
/* Indicate that the superblock should be marked dirty */
*dirtied = TRUE;
} /* end if */
else {
/* Retrieve the 'driver info' structure */
- if(NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo, dxpl_id))
+ if (NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo, dxpl_id))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "driver info message not present")
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
*/
- if(!HDstrncmp(drvinfo.name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
+ if (!HDstrncmp(drvinfo.name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "family driver should be used")
- if(!HDstrncmp(drvinfo.name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
+ if (!HDstrncmp(drvinfo.name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "multi driver should be used")
/* Decode driver information */
- if(H5FD_sb_decode(lf, drvinfo.name, drvinfo.buf) < 0)
+ if (H5FD_sb_decode(lf, drvinfo.name, drvinfo.buf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information")
/* Reset driver info message */
H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);
} /* end else */
- } /* end if */
+ } /* end if */
/* Read in the shared OH message information if there is any */
- if(H5SM_get_info(&ext_loc, c_plist, dxpl_id) < 0)
+ if (H5SM_get_info(&ext_loc, c_plist, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read SOHM table information")
/* Check for the extension having a 'v1 B-tree "K"' message */
- if((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID, dxpl_id)) < 0)
+ if ((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to read object header")
- if(status) {
+ if (status) {
/* Retrieve the 'v1 B-tree "K"' structure */
- if(NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek, dxpl_id))
+ if (NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek, dxpl_id))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "v1 B-tree 'K' info message not present")
/* Set non-default v1 B-tree 'K' value info from file */
sblock->btree_k[H5B_CHUNK_ID] = btreek.btree_k[H5B_CHUNK_ID];
sblock->btree_k[H5B_SNODE_ID] = btreek.btree_k[H5B_SNODE_ID];
- sblock->sym_leaf_k = btreek.sym_leaf_k;
+ sblock->sym_leaf_k = btreek.sym_leaf_k;
/* Set non-default v1 B-tree 'K' values in the property list */
- if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0)
+ if (H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for btree internal nodes")
- if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0)
+ if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for symbol table leaf nodes")
} /* end if */
/* Close superblock extension */
- if(H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, NULL, "unable to close file's superblock extension")
+ if (H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, NULL, "unable to close file's superblock extension")
} /* end if */
/* Set return value */
@@ -574,14 +584,13 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda
done:
/* Release the [possibly partially initialized] superblock on errors */
- if(!ret_value && sblock)
- if(H5F_super_free(sblock) < 0)
+ if (!ret_value && sblock)
+ if (H5F_super_free(sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTFREE, NULL, "unable to destroy superblock data")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sblock_load() */
-
/*-------------------------------------------------------------------------
* Function: H5F_sblock_flush
*
@@ -597,10 +606,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr,
- H5F_super_t *sblock)
+H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, H5F_super_t *sblock)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -609,13 +617,14 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
HDassert(H5F_addr_eq(addr, 0));
HDassert(sblock);
- if(sblock->cache_info.is_dirty) {
- H5P_genplist_t *dxpl; /* DXPL object */
- uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */
- uint8_t *p; /* Ptr into encoding buffer */
- haddr_t rel_eoa; /* Relative EOA for file */
- size_t superblock_size; /* Size of superblock, in bytes */
- size_t driver_size; /* Size of driver info block (bytes)*/
+ if (sblock->cache_info.is_dirty) {
+ H5P_genplist_t *dxpl; /* DXPL object */
+ uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE +
+ H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */
+ uint8_t * p; /* Ptr into encoding buffer */
+ haddr_t rel_eoa; /* Relative EOA for file */
+ size_t superblock_size; /* Size of superblock, in bytes */
+ size_t driver_size; /* Size of driver info block (bytes)*/
/* Encode the common portion of the file superblock for all versions */
p = buf;
@@ -624,15 +633,15 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
*p++ = (uint8_t)sblock->super_vers;
/* Check for older version of superblock format */
- if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
- *p++ = (uint8_t)HDF5_FREESPACE_VERSION; /* (hard-wired) */
- *p++ = (uint8_t)HDF5_OBJECTDIR_VERSION; /* (hard-wired) */
- *p++ = 0; /* reserved*/
+ if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
+ *p++ = (uint8_t)HDF5_FREESPACE_VERSION; /* (hard-wired) */
+ *p++ = (uint8_t)HDF5_OBJECTDIR_VERSION; /* (hard-wired) */
+ *p++ = 0; /* reserved*/
- *p++ = (uint8_t)HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */
+ *p++ = (uint8_t)HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */
*p++ = (uint8_t)H5F_SIZEOF_ADDR(f);
*p++ = (uint8_t)H5F_SIZEOF_SIZE(f);
- *p++ = 0; /* reserved */
+ *p++ = 0; /* reserved */
UINT16ENCODE(p, sblock->sym_leaf_k);
UINT16ENCODE(p, sblock->btree_k[H5B_SNODE_ID]);
@@ -642,11 +651,11 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
* Versions of the superblock >0 have the indexed storage B-tree
* internal 'K' value stored
*/
- if(sblock->super_vers > HDF5_SUPERBLOCK_VERSION_DEF) {
+ if (sblock->super_vers > HDF5_SUPERBLOCK_VERSION_DEF) {
UINT16ENCODE(p, sblock->btree_k[H5B_CHUNK_ID]);
- *p++ = 0; /*reserved */
- *p++ = 0; /*reserved */
- } /* end if */
+ *p++ = 0; /*reserved */
+ *p++ = 0; /*reserved */
+ } /* end if */
H5F_addr_encode(f, &p, sblock->base_addr);
H5F_addr_encode(f, &p, sblock->ext_addr);
@@ -655,7 +664,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
H5F_addr_encode(f, &p, sblock->driver_addr);
/* Encode the root group object entry, including the cached stab info */
- if(H5G_ent_encode(f, &p, sblock->root_ent) < 0)
+ if (H5G_ent_encode(f, &p, sblock->root_ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry")
/* Encode the driver information block. */
@@ -668,21 +677,21 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
* overwrite the (meta)data right after the superblock. This situation happens to
* the family driver particularly. SLU - 2009/3/24
*/
- if(driver_size > 0 && H5F_addr_defined(sblock->driver_addr)) {
- char driver_name[9]; /* Name of driver, for driver info block */
- uint8_t *dbuf = p; /* Pointer to beginning of driver info */
+ if (driver_size > 0 && H5F_addr_defined(sblock->driver_addr)) {
+ char driver_name[9]; /* Name of driver, for driver info block */
+ uint8_t *dbuf = p; /* Pointer to beginning of driver info */
/* Encode the driver information block */
*p++ = HDF5_DRIVERINFO_VERSION_0; /* Version */
- *p++ = 0; /* reserved */
- *p++ = 0; /* reserved */
- *p++ = 0; /* reserved */
+ *p++ = 0; /* reserved */
+ *p++ = 0; /* reserved */
+ *p++ = 0; /* reserved */
/* Driver info size, excluding header */
UINT32ENCODE(p, driver_size);
/* Encode driver-specific data */
- if(H5FD_sb_encode(f->shared->lf, driver_name, dbuf + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
+ if (H5FD_sb_encode(f->shared->lf, driver_name, dbuf + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Store driver name (set in 'H5FD_sb_encode' call above) */
@@ -692,10 +701,10 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
/* (for later use in computing the superblock size) */
p += 8 + driver_size;
} /* end if */
- } /* end if */
+ } /* end if */
else {
- uint32_t chksum; /* Checksum temporary variable */
- H5O_loc_t *root_oloc; /* Pointer to root group's object location */
+ uint32_t chksum; /* Checksum temporary variable */
+ H5O_loc_t *root_oloc; /* Pointer to root group's object location */
/* Size of file addresses & offsets, and status flags */
*p++ = (uint8_t)H5F_SIZEOF_ADDR(f);
@@ -709,14 +718,15 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
H5F_addr_encode(f, &p, (rel_eoa + sblock->base_addr));
/* Retrieve information for root group */
- if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp)))
+ if (NULL == (root_oloc = H5G_oloc(f->shared->root_grp)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information")
/* Encode address of root group's object header */
H5F_addr_encode(f, &p, root_oloc->addr);
/* Compute superblock checksum */
- chksum = H5_checksum_metadata(buf, ((size_t)H5F_SUPERBLOCK_SIZE(sblock->super_vers, f) - H5F_SIZEOF_CHKSUM), 0);
+ chksum = H5_checksum_metadata(
+ buf, ((size_t)H5F_SUPERBLOCK_SIZE(sblock->super_vers, f) - H5F_SIZEOF_CHKSUM), 0);
/* Superblock checksum */
UINT32ENCODE(p, chksum);
@@ -732,62 +742,65 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE
HDassert(superblock_size <= sizeof(buf));
/* Get the DXPL plist object for DXPL ID */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Write superblock */
/* (always at relative address 0) */
- if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
+ if (H5FD_write(f->shared->lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write superblock")
/* Check for newer version of superblock format & superblock extension */
- if(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && H5F_addr_defined(sblock->ext_addr)) {
+ if (sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && H5F_addr_defined(sblock->ext_addr)) {
/* Check for ignoring the driver info for this file */
- if(!H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
+ if (!H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) {
/* Check for driver info message */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
- if(driver_size > 0) {
- H5O_drvinfo_t drvinfo; /* Driver info */
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
+ if (driver_size > 0) {
+ H5O_drvinfo_t drvinfo; /* Driver info */
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
+ if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Open the superblock extension's object header */
- if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension")
+ if (H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL,
+ "unable to open file's superblock extension")
/* Write driver info information to the superblock extension */
drvinfo.len = driver_size;
drvinfo.buf = dbuf;
- if(H5O_msg_write(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "unable to update driver info header message")
+ if (H5O_msg_write(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME,
+ &drvinfo, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
+ "unable to update driver info header message")
/* Close the superblock extension object header */
- if(H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension")
+ if (H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL,
+ "unable to close file's superblock extension")
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* Reset the dirty flag. */
sblock->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5F_sblock_dest(f, sblock) < 0)
+ if (destroy)
+ if (H5F_sblock_dest(f, sblock) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CLOSEERROR, FAIL, "can't close superblock")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sblock_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5F_sblock_dest
*
@@ -801,9 +814,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_sblock_dest(H5F_t H5_ATTR_UNUSED *f, H5F_super_t* sblock)
+H5F_sblock_dest(H5F_t H5_ATTR_UNUSED *f, H5F_super_t *sblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -811,14 +824,13 @@ H5F_sblock_dest(H5F_t H5_ATTR_UNUSED *f, H5F_super_t* sblock)
HDassert(sblock);
/* Free superblock */
- if(H5F_super_free(sblock) < 0)
+ if (H5F_super_free(sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sblock_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5F_sblock_clear
*
@@ -834,7 +846,7 @@ done:
static herr_t
H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -846,15 +858,14 @@ H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy)
/* Reset the dirty flag. */
sblock->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5F_sblock_dest(f, sblock) < 0)
+ if (destroy)
+ if (H5F_sblock_dest(f, sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to delete superblock")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_sblock_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5F_sblock_size
*
@@ -882,4 +893,3 @@ H5F_sblock_size(const H5F_t *f, const H5F_super_t *sblock, size_t *size_ptr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F_sblock_size() */
-
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index dc85036..4ef7f04 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ftest.c
* Jan 3 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File testing routines.
*
@@ -26,105 +26,92 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5F_TESTING /*suppress warning about H5F testing funcs*/
-#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
-#define H5SM_TESTING /*suppress warning about H5SM testing funcs*/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5G_TESTING /*suppress warning about H5G testing funcs*/
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5F_TESTING /*suppress warning about H5F testing funcs*/
+#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
+#define H5SM_TESTING /*suppress warning about H5SM testing funcs*/
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_TESTING /*suppress warning about H5G testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMpkg.h" /* Shared object header messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMpkg.h" /* Shared object header messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_mesg_count_test
+ * Function: H5F_get_sohm_mesg_count_test
*
* Purpose: Retrieve the number of shared messages of a given type in a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Jan 3, 2007
+ * Programmer: Quincey Koziol
+ * Jan 3, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id,
- size_t *mesg_count)
+H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_count)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve count for message type */
- if(H5SM_get_mesg_count_test(file, H5AC_ind_dxpl_id, type_id, mesg_count) < 0)
+ if (H5SM_get_mesg_count_test(file, H5AC_ind_dxpl_id, type_id, mesg_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_sohm_mesg_count_test() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_check_cached_stab_test
+ * Function: H5F_check_cached_stab_test
*
* Purpose: Check that a file's superblock contains a cached symbol
* table entry, that the entry matches that in the root
* group's object header, and check that the addresses are
* valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -134,31 +121,29 @@ done:
herr_t
H5F_check_cached_stab_test(hid_t file_id)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Verify the cached stab info */
- if(H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0)
+ if (H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_check_cached_stab_test() */
-
/*-------------------------------------------------------------------------
- * Function: H5F_get_maxaddr_test
+ * Function: H5F_get_maxaddr_test
*
* Purpose: Retrieve the maximum address for a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Jun 10, 2009
@@ -168,14 +153,14 @@ done:
herr_t
H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ if (NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve maxaddr for file */
*maxaddr = file->shared->maxaddr;
@@ -183,4 +168,3 @@ H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_maxaddr_test() */
-
diff --git a/src/H5G.c b/src/H5G.c
index 3fcf151..4bd9ad7 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -14,14 +14,12 @@
/*-------------------------------------------------------------------------
*
* Created: H5G.c
- * Jul 18 1997
- * Robb Matzke <matzke@llnl.gov>
*
* Purpose: Symbol table functions. The functions that begin with
- * `H5G_stab_' don't understand the naming system; they operate
+ * 'H5G_stab_' don't understand the naming system; they operate
* on a single symbol table at a time.
*
- * The functions that begin with `H5G_node_' operate on the leaf
+ * The functions that begin with 'H5G_node_' operate on the leaf
* nodes of a symbol table B-tree. They should be defined in
* the H5Gnode.c file.
*
@@ -42,11 +40,11 @@
* +--------------+----------- +--------------------------------+
* | Location ID | Name | Meaning |
* +--------------+------------+--------------------------------+
- * | File ID | "/foo/bar" | Find `foo' within `bar' within |
+ * | File ID | "/foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the specified|
* | | | file. |
* +--------------+------------+--------------------------------+
- * | File ID | "foo/bar" | Find `foo' within `bar' within |
+ * | File ID | "foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the specified|
* | | | file. |
* +--------------+------------+--------------------------------+
@@ -56,11 +54,11 @@
* | File ID | "." | The root group of the specified|
* | | | the specified file. |
* +--------------+------------+--------------------------------+
- * | Group ID | "/foo/bar" | Find `foo' within `bar' within |
+ * | Group ID | "/foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the file |
* | | | containing the specified group.|
* +--------------+------------+--------------------------------+
- * | Group ID | "foo/bar" | File `foo' within `bar' within |
+ * | Group ID | "foo/bar" | File 'foo' within 'bar' within |
* | | | the specified group. |
* +--------------+------------+--------------------------------+
* | Group ID | "/" | The root group of the file |
@@ -77,67 +75,57 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5G_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5G_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
/* Group ID class */
static const H5I_class_t H5I_GROUP_CLS[1] = {{
- H5I_GROUP, /* ID class value */
- H5I_CLASS_REUSE_IDS, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5G_close /* Callback routine for closing objects of this class */
+ H5I_GROUP, /* ID class value */
+ H5I_CLASS_REUSE_IDS, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5G_close /* Callback routine for closing objects of this class */
}};
-
-
/*-------------------------------------------------------------------------
* Function: H5G__init
*
@@ -154,7 +142,7 @@ static const H5I_class_t H5I_GROUP_CLS[1] = {{
herr_t
H5G__init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -163,7 +151,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__init() */
-
/*-------------------------------------------------------------------------
* Function: H5G_init_interface
*
@@ -186,19 +173,18 @@ done:
static herr_t
H5G_init_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the group IDs */
- if(H5I_register_type(H5I_GROUP_CLS) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
+ if (H5I_register_type(H5I_GROUP_CLS) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5G_term_interface
*
@@ -206,7 +192,6 @@ done:
*
* Return: Success: Positive if anything is done that might
* affect other interfaces; zero otherwise.
- *
* Failure: Negative.
*
* Programmer: Robb Matzke
@@ -217,15 +202,15 @@ done:
int
H5G_term_interface(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
- if(H5I_nmembers(H5I_GROUP) > 0) {
+ if (H5_interface_initialize_g) {
+ if (H5I_nmembers(H5I_GROUP) > 0) {
(void)H5I_clear_type(H5I_GROUP, FALSE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
else {
/* Close deprecated interface */
n += H5G__term_deprec_interface();
@@ -237,16 +222,15 @@ H5G_term_interface(void)
/* Mark closed */
H5_interface_initialize_g = 0;
} /* end else */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
} /* end H5G_term_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gcreate2
+ * Function: H5Gcreate2
*
- * Purpose: Creates a new group relative to LOC_ID, giving it the
+ * Purpose: Creates a new group relative to LOC_ID, giving it the
* specified creation property list GCPL_ID and access
* property list GAPL_ID. The link to the new group is
* created with the LCPL_ID.
@@ -258,74 +242,66 @@ H5G_term_interface(void)
* hid_t gcpl_id; IN: Property list for group creation
* hid_t gapl_id; IN: Property list for group access
*
- * Return: Success: The object ID of a new, empty group open for
- * writing. Call H5Gclose() when finished with
- * the group.
- *
- * Failure: FAIL
+ * Return: Success: The object ID of a new, empty group open for
+ * writing. Call H5Gclose() when finished with
+ * the group.
*
- * Programmer: Quincey Koziol
- * April 5, 2007
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
- hid_t gapl_id)
+H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id)
{
- H5G_loc_t loc; /* Location to create group */
- H5G_t *grp = NULL; /* New group created */
- hid_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location to create group */
+ H5G_t * grp = NULL; /* New group created */
+ hid_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE5("i", "i*siii", loc_id, name, lcpl_id, gcpl_id, gapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
/* Get correct property list */
- if(H5P_DEFAULT == lcpl_id)
+ if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
+ else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link creation property list")
/* Check group creation property list */
- if(H5P_DEFAULT == gcpl_id)
+ if (H5P_DEFAULT == gcpl_id)
gcpl_id = H5P_GROUP_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group create property list")
+ else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group create property list")
/* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
+ if (H5P_DEFAULT == gapl_id)
gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ else if (TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list")
/* Create the new group & get its ID */
- if(NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
- if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+ if (NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
+ if ((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group")
done:
- if(ret_value < 0)
- if(grp && H5G_close(grp) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release group")
FUNC_LEAVE_API(ret_value)
} /* end H5Gcreate2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gcreate_anon
+ * Function: H5Gcreate_anon
*
- * Purpose: Creates a new group relative to LOC_ID, giving it the
+ * Purpose: Creates a new group relative to LOC_ID, giving it the
* specified creation property list GCPL_ID and access
* property list GAPL_ID.
*
@@ -341,357 +317,330 @@ done:
* hid_t gcpl_id; IN: Property list for group creation
* hid_t gapl_id; IN: Property list for group access
*
- * Example: To create missing groups "A" and "B01" along the given path "/A/B01/grp"
+ * Example: To create missing groups "A" and "B01" along the given path "/A/B01/grp"
* hid_t create_id = H5Pcreate(H5P_GROUP_CREATE);
* int status = H5Pset_create_intermediate_group(create_id, TRUE);
* hid_t gid = H5Gcreate_anon(file_id, "/A/B01/grp", create_id, H5P_DEFAULT);
*
- * Return: Success: The object ID of a new, empty group open for
- * writing. Call H5Gclose() when finished with
- * the group.
- *
- * Failure: FAIL
+ * Return: Success: The object ID of a new, empty group open for
+ * writing. Call H5Gclose() when finished with
+ * the group.
*
- * Programmer: Peter Cao
- * May 08, 2005
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
{
- H5G_loc_t loc;
- H5G_t *grp = NULL;
- H5G_obj_create_t gcrt_info; /* Information for group creation */
- hid_t ret_value;
+ H5G_loc_t loc;
+ H5G_t * grp = NULL;
+ H5G_obj_create_t gcrt_info; /* Information for group creation */
+ hid_t ret_value;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "iii", loc_id, gcpl_id, gapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
/* Check group creation property list */
- if(H5P_DEFAULT == gcpl_id)
+ if (H5P_DEFAULT == gcpl_id)
gcpl_id = H5P_GROUP_CREATE_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group create property list")
+ else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group create property list")
/* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
+ if (H5P_DEFAULT == gapl_id)
gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ else if (TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list")
/* Set up group creation info */
- gcrt_info.gcpl_id = gcpl_id;
+ gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
- if(NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
- if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+ if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
+ if ((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group")
done:
/* Release the group's object header, if it was created */
- if(grp) {
- H5O_loc_t *oloc; /* Object location for group */
+ if (grp) {
+ H5O_loc_t *oloc; /* Object location for group */
/* Get the new group's object location */
- if(NULL == (oloc = H5G_oloc(grp)))
- HDONE_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object location of group")
+ if (NULL == (oloc = H5G_oloc(grp)))
+ HDONE_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to get object location of group")
/* Decrement refcount on group's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
+ if (H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID,
+ "unable to decrement refcount on newly created object")
} /* end if */
/* Cleanup on failure */
- if(ret_value < 0)
- if(grp && H5G_close(grp) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release group")
FUNC_LEAVE_API(ret_value)
} /* end H5Gcreate_anon() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gopen2
+ * Function: H5Gopen2
*
- * Purpose: Opens an existing group for modification. When finished,
- * call H5Gclose() to close it and release resources.
+ * Purpose: Opens an existing group for modification. When finished,
+ * call H5Gclose() to close it and release resources.
*
* This function allows the user the pass in a Group Access
* Property List, which H5Gopen1() does not.
*
- * Return: Success: Object ID of the group.
- * Failure: FAIL
+ * Return: Success: Object ID of the group
*
- * Programmer: James Laird
- * Thursday, July 27, 2006
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
{
- H5G_t *grp = NULL; /* Group opened */
- H5G_loc_t loc; /* Location of parent for group */
- hid_t ret_value; /* Return value */
+ H5G_t * grp = NULL; /* Group opened */
+ H5G_loc_t loc; /* Location of parent for group */
+ hid_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, name, gapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
/* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
+ if (H5P_DEFAULT == gapl_id)
gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ else if (TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list")
/* Open the group */
- if((grp = H5G__open_name(&loc, name, gapl_id, H5AC_ind_dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ if ((grp = H5G__open_name(&loc, name, gapl_id, H5AC_ind_dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group")
/* Register an ID for the group */
- if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+ if ((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group")
done:
- if(ret_value < 0) {
- if(grp && H5G_close(grp) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
- } /* end if */
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release group")
FUNC_LEAVE_API(ret_value)
} /* end H5Gopen2() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gget_create_plist
- *
- * Purpose: Returns a copy of the group creation property list.
+ * Function: H5Gget_create_plist
*
- * Return: Success: ID for a copy of the group creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Purpose: Returns a copy of the group creation property list.
*
- * Failure: FAIL
+ * Return: Success: ID for a copy of the group creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Programmer: Quincey Koziol
- * Tuesday, October 25, 2005
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Gget_create_plist(hid_t group_id)
{
- H5G_t *group = NULL;
- hid_t ret_value = FAIL;
+ H5G_t *group = NULL;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", group_id);
/* Check args */
- if(NULL == (group = (H5G_t *)H5I_object_verify(group_id, H5I_GROUP)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
+ if (NULL == (group = (H5G_t *)H5I_object_verify(group_id, H5I_GROUP)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group")
- if((ret_value = H5G_get_create_plist(group)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
+ /* Retrieve the GCPL */
+ if ((ret_value = H5G_get_create_plist(group)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_create_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_get_create_plist
+ * Function: H5G_get_create_plist
*
- * Purpose: Private function for H5Gget_create_plist
+ * Purpose: Private function for H5Gget_create_plist
*
- * Return: Success: ID for a copy of the group creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Return: Success: ID for a copy of the group creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Tuesday, October 25, 2005
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5G_get_create_plist(H5G_t *grp)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t ginfo_exists;
- htri_t linfo_exists;
- htri_t pline_exists;
- H5P_genplist_t *gcpl_plist;
- H5P_genplist_t *new_plist;
- hid_t new_gcpl_id = FAIL;
- hid_t ret_value = FAIL;
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t ginfo_exists;
+ htri_t linfo_exists;
+ htri_t pline_exists;
+ H5P_genplist_t *gcpl_plist;
+ H5P_genplist_t *new_plist;
+ hid_t new_gcpl_id = H5I_INVALID_HID;
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Copy the default group creation property list */
- if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default group creation property list")
- if((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to copy the creation property list")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+ if (NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list")
+ if ((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list")
+ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list")
/* Retrieve any object creation properties */
- if(H5O_get_create_plist(&grp->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object creation info")
+ if (H5O_get_create_plist(&grp->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info")
/* Check for the group having a group info message */
- if((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(ginfo_exists) {
- H5O_ginfo_t ginfo; /* Group info message */
+ if ((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header")
+ if (ginfo_exists) {
+ H5O_ginfo_t ginfo; /* Group info message */
/* Read the group info */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo, H5AC_ind_dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
+ if (NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo, H5AC_ind_dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get group info")
/* Set the group info for the property list */
- if(H5P_set(new_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info")
+ if (H5P_set(new_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info")
} /* end if */
/* Check for the group having a link info message */
- if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(linfo_exists) {
+ if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header")
+ if (linfo_exists) {
/* Set the link info for the property list */
- if(H5P_set(new_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set link info")
+ if (H5P_set(new_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link info")
} /* end if */
/* Check for the group having a pipeline message */
- if((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(pline_exists) {
- H5O_pline_t pline; /* Pipeline message */
+ if ((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to read object header")
+ if (pline_exists) {
+ H5O_pline_t pline; /* Pipeline message */
/* Read the pipeline */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline, H5AC_ind_dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline")
+ if (NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline, H5AC_ind_dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get link pipeline")
/* Set the pipeline for the property list */
- if(H5P_set(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set link pipeline")
+ if (H5P_set(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link pipeline")
} /* end if */
/* Set the return value */
ret_value = new_gcpl_id;
done:
- if(ret_value < 0) {
- if(new_gcpl_id > 0)
- if(H5I_dec_app_ref(new_gcpl_id) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't free")
+ if (ret_value < 0) {
+ if (new_gcpl_id > 0)
+ if (H5I_dec_app_ref(new_gcpl_id) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID, "can't free")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_create_plist() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gget_info
+ * Function: H5Gget_info
*
- * Purpose: Retrieve information about a group.
+ * Purpose: Retrieve information about a group.
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Gget_info(hid_t grp_id, H5G_info_t *grp_info)
{
- H5I_type_t id_type; /* Type of ID */
- H5G_loc_t loc; /* Location of group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5I_type_t id_type; /* Type of ID */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", grp_id, grp_info);
/* Check args */
id_type = H5I_get_type(grp_id);
- if(!(H5I_GROUP == id_type || H5I_FILE == id_type))
+ if (!(H5I_GROUP == id_type || H5I_FILE == id_type))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(!grp_info)
+ if (!grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
/* Get group location */
- if(H5G_loc(grp_id, &loc) < 0)
+ if (H5G_loc(grp_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Retrieve the group's information */
- if(H5G__obj_info(loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if (H5G__obj_info(loc.oloc, grp_info /*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_info() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gget_info_by_name
+ * Function: H5Gget_info_by_name
*
- * Purpose: Retrieve information about a group.
+ * Purpose: Retrieve information about a group, where the group is
+ * identified by name instead of ID.
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
- hid_t lapl_id)
+H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- H5G_loc_t grp_loc; /* Location used to open group */
- H5G_name_t grp_path; /* Opened object group hier. path */
- H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ H5G_loc_t grp_loc; /* Location used to open group */
+ H5G_name_t grp_path; /* Opened object group hier. path */
+ H5O_loc_t grp_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*xi", loc_id, name, grp_info, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(!grp_info)
+ if (!grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -699,67 +648,60 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
H5G_loc_reset(&grp_loc);
/* Find the group object */
- if(H5G_loc_find(&loc, name, &grp_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, name, &grp_loc /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
- if(loc_found && H5G_loc_free(&grp_loc) < 0)
+ if (loc_found && H5G_loc_free(&grp_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_info_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gget_info_by_idx
+ * Function: H5Gget_info_by_idx
*
- * Purpose: Retrieve information about a group, according to the order
+ * Purpose: Retrieve information about a group, according to the order
* of an index.
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5G_info_t *grp_info, hid_t lapl_id)
+H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, H5G_info_t *grp_info, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- H5G_loc_t grp_loc; /* Location used to open group */
- H5G_name_t grp_path; /* Opened object group hier. path */
- H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ H5G_loc_t grp_loc; /* Location used to open group */
+ H5G_name_t grp_path; /* Opened object group hier. path */
+ H5O_loc_t grp_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, grp_info,
- lapl_id);
+ H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, grp_info, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!grp_info)
+ if (!group_name || !*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (!grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -767,56 +709,51 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&grp_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &grp_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &grp_loc /*out*/, lapl_id,
+ H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
/* Release the object location */
- if(loc_found && H5G_loc_free(&grp_loc) < 0)
+ if (loc_found && H5G_loc_free(&grp_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_info_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5Gclose
+ * Function: H5Gclose
*
- * Purpose: Closes the specified group. The group ID will no longer be
- * valid for accessing the group.
+ * Purpose: Closes the specified group. The group ID will no longer be
+ * valid for accessing the group.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Wednesday, December 31, 1997
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5Gclose(hid_t group_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", group_id);
/* Check args */
- if(NULL == H5I_object_verify(group_id,H5I_GROUP))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
+ if (NULL == H5I_object_verify(group_id, H5I_GROUP))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
- /*
- * Decrement the counter on the group atom. It will be freed if the count
+ /* Decrement the counter on the group atom. It will be freed if the count
* reaches zero.
*/
- if(H5I_dec_app_ref(group_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
+ if (H5I_dec_app_ref(group_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gclose() */
-
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index d520484..70574c5 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gbtree2.c
* Sep 9 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing fields on links
*
@@ -26,22 +26,19 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -52,22 +49,20 @@
*/
typedef struct H5G_fh_ud_cmp_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- const char *name; /* Name of link to compare */
- H5B2_found_t found_op; /* Callback when correct link is found */
- void *found_op_data; /* Callback data when correct link is found */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ const char * name; /* Name of link to compare */
+ H5B2_found_t found_op; /* Callback when correct link is found */
+ void * found_op_data; /* Callback data when correct link is found */
/* upward */
- int cmp; /* Comparison of two link names */
+ int cmp; /* Comparison of two link names */
} H5G_fh_ud_cmp_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -77,48 +72,45 @@ typedef struct H5G_fh_ud_cmp_t {
/* v2 B-tree driver callbacks for 'creation order' index */
static herr_t H5G_dense_btree2_corder_store(void *native, const void *udata);
static herr_t H5G_dense_btree2_corder_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5G_dense_btree2_corder_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5G_dense_btree2_corder_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5G_dense_btree2_corder_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5G_dense_btree2_corder_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent,
+ int fwidth, const void *record, const void *_udata);
/* v2 B-tree driver callbacks for 'name' index */
static herr_t H5G_dense_btree2_name_store(void *native, const void *udata);
static herr_t H5G_dense_btree2_name_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5G_dense_btree2_name_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5G_dense_btree2_name_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5G_dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5G_dense_btree2_name_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5G_dense_btree2_name_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5G_dense_btree2_name_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent, int fwidth,
+ const void *record, const void *_udata);
/* Fractal heap function callbacks */
static herr_t H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
-
/*********************/
/* Package Variables */
/*********************/
/* v2 B-tree class for indexing 'name' field of links */
-const H5B2_class_t H5G_BT2_NAME[1]={{ /* B-tree class information */
- H5B2_GRP_DENSE_NAME_ID, /* Type of B-tree */
- "H5B2_GRP_DENSE_NAME_ID", /* Name of B-tree class */
- sizeof(H5G_dense_bt2_name_rec_t), /* Size of native record */
- NULL, /* Create client callback context */
- NULL, /* Destroy client callback context */
- H5G_dense_btree2_name_store, /* Record storage callback */
- H5G_dense_btree2_name_compare, /* Record comparison callback */
- H5G_dense_btree2_name_encode, /* Record encoding callback */
- H5G_dense_btree2_name_decode, /* Record decoding callback */
- H5G_dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+const H5B2_class_t H5G_BT2_NAME[1] = {{
+ /* B-tree class information */
+ H5B2_GRP_DENSE_NAME_ID, /* Type of B-tree */
+ "H5B2_GRP_DENSE_NAME_ID", /* Name of B-tree class */
+ sizeof(H5G_dense_bt2_name_rec_t), /* Size of native record */
+ NULL, /* Create client callback context */
+ NULL, /* Destroy client callback context */
+ H5G_dense_btree2_name_store, /* Record storage callback */
+ H5G_dense_btree2_name_compare, /* Record comparison callback */
+ H5G_dense_btree2_name_encode, /* Record encoding callback */
+ H5G_dense_btree2_name_decode, /* Record decoding callback */
+ H5G_dense_btree2_name_debug, /* Record debugging callback */
+ NULL, /* Create debugging context */
+ NULL /* Destroy debugging context */
}};
/* v2 B-tree class for indexing 'creation order' field of links */
-const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
+const H5B2_class_t H5G_BT2_CORDER[1] = {{
+ /* B-tree class information */
H5B2_GRP_DENSE_CORDER_ID, /* Type of B-tree */
"H5B2_GRP_DENSE_CORDER_ID", /* Name of B-tree class */
sizeof(H5G_dense_bt2_corder_rec_t), /* Size of native record */
@@ -137,13 +129,10 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_fh_name_cmp
*
@@ -153,7 +142,6 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -161,22 +149,23 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
static herr_t
H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_cmp_t *udata = (H5G_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
- H5O_link_t *lnk; /* Pointer to link created from heap object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_cmp_t *udata = (H5G_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
+ H5O_link_t * lnk; /* Pointer to link created from heap object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
- if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
/* Compare the string values */
udata->cmp = HDstrcmp(udata->name, lnk->name);
/* Check for correct link & callback to make */
- if(udata->cmp == 0 && udata->found_op) {
- if((udata->found_op)(lnk, udata->found_op_data) < 0)
+ if (udata->cmp == 0 && udata->found_op) {
+ if ((udata->found_op)(lnk, udata->found_op_data) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed")
} /* end if */
@@ -187,7 +176,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_fh_name_cmp() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_name_store
*
@@ -204,7 +192,7 @@ done:
static herr_t
H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
{
- const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
+ const H5G_bt2_ud_ins_t * udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -216,7 +204,6 @@ H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_name_store() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_name_compare
*
@@ -234,9 +221,9 @@ H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
static herr_t
H5G_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
{
- const H5G_bt2_ud_common_t *bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
- const H5G_dense_bt2_name_rec_t *bt2_rec = (const H5G_dense_bt2_name_rec_t *)_bt2_rec;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5G_bt2_ud_common_t * bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
+ const H5G_dense_bt2_name_rec_t *bt2_rec = (const H5G_dense_bt2_name_rec_t *)_bt2_rec;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -245,30 +232,29 @@ H5G_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
HDassert(bt2_rec);
/* Check hash value */
- if(bt2_udata->name_hash < bt2_rec->hash)
+ if (bt2_udata->name_hash < bt2_rec->hash)
*result = (-1);
- else if(bt2_udata->name_hash > bt2_rec->hash)
+ else if (bt2_udata->name_hash > bt2_rec->hash)
*result = 1;
else {
- H5G_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5G_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
/* Sanity check */
HDassert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
- fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.name = bt2_udata->name;
- fh_udata.found_op = bt2_udata->found_op;
+ fh_udata.f = bt2_udata->f;
+ fh_udata.dxpl_id = bt2_udata->dxpl_id;
+ fh_udata.name = bt2_udata->name;
+ fh_udata.found_op = bt2_udata->found_op;
fh_udata.found_op_data = bt2_udata->found_op_data;
/* up */
fh_udata.cmp = 0;
/* Check if the user's link and the B-tree's link have the same name */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, bt2_rec->id,
- H5G_dense_fh_name_cmp, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, bt2_rec->id, H5G_dense_fh_name_cmp, &fh_udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
/* Callback will set comparison value */
@@ -279,7 +265,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5G_dense_btree2_name_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_name_encode
*
@@ -307,7 +292,6 @@ H5G_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_name_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_name_decode
*
@@ -335,7 +319,6 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_name_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_name_debug
*
@@ -351,23 +334,20 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
*/
static herr_t
H5G_dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%lx, ", indent, "", fwidth, "Record:",
- nrecord->hash);
- for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
+ HDfprintf(stream, "%*s%-*s {%lx, ", indent, "", fwidth, "Record:", nrecord->hash);
+ for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_name_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_corder_store
*
@@ -384,7 +364,7 @@ H5G_dense_btree2_name_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H
static herr_t
H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
{
- const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
+ const H5G_bt2_ud_ins_t * udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -396,7 +376,6 @@ H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_corder_store() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_corder_compare
*
@@ -414,8 +393,8 @@ H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
static herr_t
H5G_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
{
- const H5G_bt2_ud_common_t *bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
- const H5G_dense_bt2_corder_rec_t *bt2_rec = (const H5G_dense_bt2_corder_rec_t *)_bt2_rec;
+ const H5G_bt2_ud_common_t * bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
+ const H5G_dense_bt2_corder_rec_t *bt2_rec = (const H5G_dense_bt2_corder_rec_t *)_bt2_rec;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -423,20 +402,10 @@ H5G_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, in
HDassert(bt2_udata);
HDassert(bt2_rec);
-#ifdef QAK
-{
-unsigned u;
-
-HDfprintf(stderr, "%s: bt2_udata->corder = %Hd\n", "H5G_dense_btree2_corder_compare", (hsize_t)bt2_udata->corder);
-HDfprintf(stderr, "%s: bt2_rec = {%Hu, ", "H5G_dense_btree2_corder_compare", (hsize_t)bt2_rec->corder);
-for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", bt2_rec->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
-}
-#endif /* QAK */
/* Check creation order value */
- if(bt2_udata->corder < bt2_rec->corder)
+ if (bt2_udata->corder < bt2_rec->corder)
*result = -1;
- else if(bt2_udata->corder > bt2_rec->corder)
+ else if (bt2_udata->corder > bt2_rec->corder)
*result = 1;
else
*result = 0;
@@ -444,7 +413,6 @@ for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_corder_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_corder_encode
*
@@ -472,7 +440,6 @@ H5G_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_corder_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_corder_decode
*
@@ -500,7 +467,6 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_corder_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_btree2_corder_debug
*
@@ -516,19 +482,16 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
*/
static herr_t
H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%Hu, ", indent, "", fwidth, "Record:",
- nrecord->corder);
- for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
+ HDfprintf(stream, "%*s%-*s {%Hu, ", indent, "", fwidth, "Record:", nrecord->corder);
+ for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_dense_btree2_corder_debug() */
-
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index 994c5bf..3b4af3d 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gcache.c
* Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement group metadata cache methods.
*
@@ -26,60 +26,52 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
-#define H5G_NODE_VERS 1 /* Symbol table node version number */
-#define H5G_NODE_BUF_SIZE 512 /* Size of stack buffer for serialized nodes */
-
+#define H5G_NODE_VERS 1 /* Symbol table node version number */
+#define H5G_NODE_BUF_SIZE 512 /* Size of stack buffer for serialized nodes */
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache (H5AC) callbacks */
static H5G_node_t *H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
- H5G_node_t *sym, unsigned *flags_ptr);
-static herr_t H5G_node_dest(H5F_t *f, H5G_node_t *sym);
-static herr_t H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy);
-static herr_t H5G_node_size(const H5F_t *f, const H5G_node_t *sym, size_t *size_ptr);
-
+static herr_t H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_t *sym,
+ unsigned *flags_ptr);
+static herr_t H5G_node_dest(H5F_t *f, H5G_node_t *sym);
+static herr_t H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy);
+static herr_t H5G_node_size(const H5F_t *f, const H5G_node_t *sym, size_t *size_ptr);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -94,14 +86,12 @@ const H5AC_class_t H5AC_SNODE[1] = {{
(H5AC_size_func_t)H5G_node_size,
}};
-
/* Declare extern the free list to manage the H5G_node_t struct */
H5FL_EXTERN(H5G_node_t);
/* Declare extern the free list to manage sequences of H5G_entry_t's */
H5FL_SEQ_EXTERN(H5G_entry_t);
-
/*-------------------------------------------------------------------------
* Function: H5G_node_load
*
@@ -111,7 +101,6 @@ H5FL_SEQ_EXTERN(H5G_entry_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -119,13 +108,13 @@ H5FL_SEQ_EXTERN(H5G_entry_t);
static H5G_node_t *
H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- H5G_node_t *sym = NULL;
- H5WB_t *wb = NULL; /* Wrapped buffer for node data */
- uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */
- uint8_t *node; /* Pointer to node buffer */
- const uint8_t *p;
- const uint8_t *p_end;
- H5G_node_t *ret_value; /* Return value */
+ H5G_node_t * sym = NULL;
+ H5WB_t * wb = NULL; /* Wrapped buffer for node data */
+ uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */
+ uint8_t * node; /* Pointer to node buffer */
+ const uint8_t *p;
+ const uint8_t *p_end;
+ H5G_node_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -135,22 +124,22 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
HDassert(udata);
/* Allocate symbol table data structures */
- if(NULL == (sym = H5FL_CALLOC(H5G_node_t)))
+ if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
sym->node_size = H5G_NODE_SIZE(f);
- if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
+ if (NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Wrap the local buffer for serialized node info */
- if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
+ if (NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for node */
- if(NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size)))
+ if (NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read the serialized symbol table node. */
- if(H5F_block_read(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0)
+ if (H5F_block_read(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL, "unable to read symbol table node")
/* Get temporary pointer to serialized node */
@@ -162,12 +151,12 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
p_end = p + sym->node_size - 1;
/* magic */
- if(HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature")
p += 4;
/* version */
- if(H5G_NODE_VERS != *p++)
+ if (H5G_NODE_VERS != *p++)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version")
/* reserved */
@@ -177,7 +166,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
UINT16DECODE(p, sym->nsyms);
/* entries */
- if(H5G__ent_decode_vec(f, &p, p_end, sym->entry, sym->nsyms) < 0)
+ if (H5G__ent_decode_vec(f, &p, p_end, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
/* Set return value */
@@ -185,16 +174,15 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
- if(!ret_value)
- if(sym && H5G__node_free(sym) < 0)
+ if (!ret_value)
+ if (sym && H5G__node_free(sym) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, NULL, "unable to destroy symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_load() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_flush
*
@@ -203,17 +191,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_t *sym, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_t *sym,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5WB_t *wb = NULL; /* Wrapped buffer for node data */
- uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t *wb = NULL; /* Wrapped buffer for node data */
+ uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -227,16 +215,16 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
/*
* Write the symbol node to disk.
*/
- if(sym->cache_info.is_dirty) {
- uint8_t *node; /* Pointer to node buffer */
- uint8_t *p; /* Pointer into raw data buffer */
+ if (sym->cache_info.is_dirty) {
+ uint8_t *node; /* Pointer to node buffer */
+ uint8_t *p; /* Pointer into raw data buffer */
/* Wrap the local buffer for serialized node info */
- if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
+ if (NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for node */
- if(NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size)))
+ if (NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to serialized symbol table node */
@@ -256,12 +244,12 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
UINT16ENCODE(p, sym->nsyms);
/* entries */
- if(H5G__ent_encode_vec(f, &p, sym->entry, sym->nsyms) < 0)
+ if (H5G__ent_encode_vec(f, &p, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
HDmemset(p, 0, sym->node_size - (size_t)(p - node));
- /* Write the serialized symbol table node. */
- if(H5F_block_write(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0)
+ /* Write the serialized symbol table node. */
+ if (H5F_block_write(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0)
HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "unable to write symbol table node to the file")
/* Reset the node's dirty flag */
@@ -272,19 +260,18 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
* Destroy the symbol node? This might happen if the node is being
* preempted from the cache.
*/
- if(destroy)
- if(H5G_node_dest(f, sym) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
+ if (destroy)
+ if (H5G_node_dest(f, sym) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_dest
*
@@ -293,7 +280,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -301,13 +287,11 @@ done:
static herr_t
H5G_node_dest(H5F_t *f, H5G_node_t *sym)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- /*
- * Check arguments.
- */
+ /* Sanity checks */
HDassert(f);
HDassert(sym);
@@ -318,22 +302,21 @@ H5G_node_dest(H5F_t *f, H5G_node_t *sym)
HDassert(!sym->cache_info.free_file_space_on_destroy || H5F_addr_defined(sym->cache_info.addr));
/* Check for freeing file space for symbol table node */
- if(sym->cache_info.free_file_space_on_destroy) {
+ if (sym->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, sym->cache_info.addr, (hsize_t)sym->node_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, sym->cache_info.addr, (hsize_t)sym->node_size) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to free symbol table node")
} /* end if */
/* Destroy symbol table node */
- if(H5G__node_free(sym) < 0)
+ if (H5G__node_free(sym) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_clear
*
@@ -342,7 +325,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 20 2003
*
*-------------------------------------------------------------------------
@@ -354,9 +336,7 @@ H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT
- /*
- * Check arguments.
- */
+ /* Sanity checks */
HDassert(sym);
/* Reset the node's dirty flag */
@@ -366,15 +346,14 @@ H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy)
* Destroy the symbol node? This might happen if the node is being
* preempted from the cache.
*/
- if(destroy)
- if(H5G_node_dest(f, sym) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
+ if (destroy)
+ if (H5G_node_dest(f, sym) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_size
*
@@ -404,4 +383,3 @@ H5G_node_size(const H5F_t H5_ATTR_UNUSED *f, const H5G_node_t *sym, size_t *size
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G_node_size() */
-
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 6577d0c..32e1e17 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,67 +15,63 @@
*
* Created: H5Gcompact.c
* Sep 5 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for handling compact storage.
*
*-------------------------------------------------------------------------
*/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Packages needed by this file... */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5MMprivate.h" /* Memory management */
/* Private typedefs */
/* User data for link message iteration when building link table */
typedef struct {
H5G_link_table_t *ltable; /* Pointer to link table to build */
- size_t curr_lnk; /* Current link to operate on */
+ size_t curr_lnk; /* Current link to operate on */
} H5G_iter_bt_t;
/* User data for deleting a link in the link messages */
typedef struct {
/* downward */
- H5F_t *file; /* File that object header is located within */
- hid_t dxpl_id; /* DXPL during insertion */
- H5RS_str_t *grp_full_path_r;/* Full path for group of link */
- const char *name; /* Link name to search for */
+ H5F_t * file; /* File that object header is located within */
+ hid_t dxpl_id; /* DXPL during insertion */
+ H5RS_str_t *grp_full_path_r; /* Full path for group of link */
+ const char *name; /* Link name to search for */
} H5G_iter_rm_t;
/* User data for link message iteration when querying link info */
typedef struct {
/* downward */
- const char *name; /* Name to search for */
+ const char *name; /* Name to search for */
/* upward */
- H5O_link_t *lnk; /* Link struct to fill in */
- hbool_t found; /* Flag to indicate that the object was found */
+ H5O_link_t *lnk; /* Link struct to fill in */
+ hbool_t found; /* Flag to indicate that the object was found */
} H5G_iter_lkp_t;
/* Private macros */
/* PRIVATE PROTOTYPES */
static herr_t H5G_compact_build_table_cb(const void *_mesg, unsigned idx, void *_udata);
-static herr_t H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- H5G_link_table_t *ltable);
+static herr_t H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable);
-
/*-------------------------------------------------------------------------
- * Function: H5G_compact_build_table_cb
+ * Function: H5G_compact_build_table_cb
*
- * Purpose: Callback routine for searching 'link' messages for a particular
+ * Purpose: Callback routine for searching 'link' messages for a particular
* name.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
@@ -83,9 +79,9 @@ static herr_t H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id,
static herr_t
H5G_compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
- const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
- H5G_iter_bt_t *udata = (H5G_iter_bt_t *)_udata; /* 'User data' passed in */
- herr_t ret_value=H5_ITER_CONT; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
+ H5G_iter_bt_t * udata = (H5G_iter_bt_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -95,7 +91,7 @@ H5G_compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
HDassert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link message into table */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])))
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
/* Increment current link entry to operate on */
@@ -105,7 +101,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_compact_build_table_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_compact_build_table
*
@@ -121,10 +116,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable)
+H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, H5G_link_table_t *ltable)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -138,26 +133,26 @@ H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t
ltable->nlinks = (size_t)linfo->nlinks;
/* Allocate space for the table entries */
- if(ltable->nlinks > 0) {
- H5G_iter_bt_t udata; /* User data for iteration callback */
- H5O_mesg_operator_t op; /* Message operator */
+ if (ltable->nlinks > 0) {
+ H5G_iter_bt_t udata; /* User data for iteration callback */
+ H5O_mesg_operator_t op; /* Message operator */
/* Allocate the link table */
- if((ltable->lnks = (H5O_link_t *)H5MM_malloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL)
+ if ((ltable->lnks = (H5O_link_t *)H5MM_malloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set up user data for iteration */
- udata.ltable = ltable;
+ udata.ltable = ltable;
udata.curr_lnk = 0;
/* Iterate through the link messages, adding them to the table */
- op.op_type = H5O_MESG_OP_APP;
+ op.op_type = H5O_MESG_OP_APP;
op.u.app_op = H5G_compact_build_table_cb;
- if(H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages")
/* Sort link table in correct iteration order */
- if(H5G__link_sort_table(ltable, idx_type, order) < 0)
+ if (H5G__link_sort_table(ltable, idx_type, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
} /* end if */
else
@@ -167,7 +162,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_compact_build_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_insert
*
@@ -178,16 +172,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
- hid_t dxpl_id)
+H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -196,14 +188,13 @@ H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
HDassert(obj_lnk);
/* Insert link message into group */
- if(H5O_msg_create(grp_oloc, H5O_LINK_ID, 0, H5O_UPDATE_TIME, obj_lnk, dxpl_id) < 0)
+ if (H5O_msg_create(grp_oloc, H5O_LINK_ID, 0, H5O_UPDATE_TIME, obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_get_name_by_idx
*
@@ -218,12 +209,11 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t idx, char* name, size_t size)
+H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t idx, char *name, size_t size)
{
- H5G_link_table_t ltable = {0, NULL}; /* Link table */
- ssize_t ret_value; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_PACKAGE
@@ -231,32 +221,31 @@ H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
HDassert(oloc);
/* Build table of all link messages */
- if(H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table")
/* Check for going out of bounds */
- if(idx >= ltable.nlinks)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
+ if (idx >= ltable.nlinks)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Get the length of the name */
ret_value = (ssize_t)HDstrlen(ltable.lnks[idx].name);
/* Copy the name into the user's buffer, if given */
- if(name) {
+ if (name) {
HDstrncpy(name, ltable.lnks[idx].name, MIN((size_t)(ret_value + 1), size));
- if((size_t)ret_value >= size)
- name[size - 1]='\0';
+ if ((size_t)ret_value >= size)
+ name[size - 1] = '\0';
} /* end if */
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_get_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_compact_remove_common_cb
*
@@ -266,7 +255,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
@@ -274,9 +262,9 @@ done:
static herr_t
H5G_compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
- const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
- H5G_iter_rm_t *udata = (H5G_iter_rm_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
+ H5G_iter_rm_t * udata = (H5G_iter_rm_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -285,9 +273,9 @@ H5G_compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi
HDassert(udata);
/* If we've found the right link, get the object type */
- if(HDstrcmp(lnk->name, udata->name) == 0) {
+ if (HDstrcmp(lnk->name, udata->name) == 0) {
/* Replace path names for link being removed */
- if(H5G__link_name_replace(udata->file, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
+ if (H5G__link_name_replace(udata->file, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object type")
/* Stop the iteration, we found the correct link */
@@ -298,7 +286,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_compact_remove_common_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_remove
*
@@ -312,11 +299,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
- const char *name)
+H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r, const char *name)
{
H5G_iter_rm_t udata; /* Data to pass through OH iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -324,20 +310,20 @@ H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_p
HDassert(name && *name);
/* Initialize data to pass through object header iteration */
- udata.file = oloc->file;
- udata.dxpl_id = dxpl_id;
+ udata.file = oloc->file;
+ udata.dxpl_id = dxpl_id;
udata.grp_full_path_r = grp_full_path_r;
- udata.name = name;
+ udata.name = name;
/* Iterate over the link messages to delete the right one */
- if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE, dxpl_id) < 0)
+ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE, dxpl_id) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_remove_by_idx
*
@@ -351,13 +337,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n)
+H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5RS_str_t *grp_full_path_r, H5_index_t idx_type, H5_iter_order_t order, hsize_t n)
{
- H5G_link_table_t ltable = {0, NULL};/* Link table */
- H5G_iter_rm_t udata; /* Data to pass through OH iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ H5G_iter_rm_t udata; /* Data to pass through OH iteration */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -365,32 +350,32 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
HDassert(linfo);
/* Build table of all link messages, sorted according to desired order */
- if(H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table")
/* Check for going out of bounds */
- if(n >= ltable.nlinks)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound")
+ if (n >= ltable.nlinks)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound")
/* Initialize data to pass through object header iteration */
- udata.file = oloc->file;
- udata.dxpl_id = dxpl_id;
+ udata.file = oloc->file;
+ udata.dxpl_id = dxpl_id;
udata.grp_full_path_r = grp_full_path_r;
- udata.name = ltable.lnks[n].name;
+ udata.name = ltable.lnks[n].name;
/* Iterate over the link messages to delete the right one */
- if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE, dxpl_id) < 0)
+ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE, dxpl_id) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message")
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_remove_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_iterate
*
@@ -404,12 +389,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- H5G_lib_iterate_t op, void *op_data)
+H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op,
+ void *op_data)
{
- H5G_link_table_t ltable = {0, NULL}; /* Link table */
- herr_t ret_value; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -419,32 +404,30 @@ H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *li
HDassert(op);
/* Build table of all link messages */
- if(H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table")
/* Iterate over links in table */
- if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_iterate() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_compact_lookup_cb
+ * Function: H5G_compact_lookup_cb
*
- * Purpose: Callback routine for searching 'link' messages for a particular
+ * Purpose: Callback routine for searching 'link' messages for a particular
* name & gettting object location for it
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
@@ -452,9 +435,9 @@ done:
static herr_t
H5G_compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
- const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
- H5G_iter_lkp_t *udata = (H5G_iter_lkp_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
+ H5G_iter_lkp_t * udata = (H5G_iter_lkp_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -463,10 +446,10 @@ H5G_compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_uda
HDassert(udata);
/* Check for name to get information */
- if(HDstrcmp(lnk->name, udata->name) == 0) {
- if(udata->lnk) {
+ if (HDstrcmp(lnk->name, udata->name) == 0) {
+ if (udata->lnk) {
/* Copy link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, lnk, udata->lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, udata->lnk))
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
} /* end if */
@@ -481,7 +464,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_compact_lookup_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_lookup
*
@@ -490,18 +472,16 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
*/
htri_t
-H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
- hid_t dxpl_id)
+H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk, hid_t dxpl_id)
{
- H5G_iter_lkp_t udata; /* User data for iteration callback */
- H5O_mesg_operator_t op; /* Message operator */
- htri_t ret_value; /* Return value */
+ H5G_iter_lkp_t udata; /* User data for iteration callback */
+ H5O_mesg_operator_t op; /* Message operator */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -510,14 +490,14 @@ H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
HDassert(name && *name);
/* Set up user data for iteration */
- udata.name = name;
- udata.lnk = lnk;
+ udata.name = name;
+ udata.lnk = lnk;
udata.found = FALSE;
/* Iterate through the link messages, adding them to the table */
- op.op_type = H5O_MESG_OP_APP;
+ op.op_type = H5O_MESG_OP_APP;
op.u.app_op = H5G_compact_lookup_cb;
- if(H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages")
/* Determine if we found the link we were looking for */
@@ -527,7 +507,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5G__compact_lookup_by_idx
*
@@ -537,17 +516,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
{
- H5G_link_table_t ltable = {0, NULL};/* Link table */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -557,27 +535,27 @@ H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo
HDassert(lnk);
/* Build table of all link messages, sorted according to desired order */
- if(H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G_compact_build_table(oloc, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table")
/* Check for going out of bounds */
- if(n >= ltable.nlinks)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound")
+ if (n >= ltable.nlinks)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound")
/* Copy link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, &ltable.lnks[n], lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, &ltable.lnks[n], lnk))
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_lookup_by_idx() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5G__compact_get_type_by_idx
*
@@ -592,11 +570,10 @@ done:
*-------------------------------------------------------------------------
*/
H5G_obj_t
-H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
- hsize_t idx)
+H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo, hsize_t idx)
{
- H5G_link_table_t ltable = {0, NULL}; /* Link table */
- H5G_obj_t ret_value; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */
FUNC_ENTER_PACKAGE
@@ -604,43 +581,43 @@ H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *
HDassert(oloc);
/* Build table of all link messages */
- if(H5G_compact_build_table(oloc, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
+ if (H5G_compact_build_table(oloc, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5G_UNKNOWN, "can't create link message table")
/* Check for going out of bounds */
- if(idx >= ltable.nlinks)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5G_UNKNOWN, "index out of bound")
+ if (idx >= ltable.nlinks)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5G_UNKNOWN, "index out of bound")
/* Determine type of object */
- if(ltable.lnks[idx].type == H5L_TYPE_SOFT)
+ if (ltable.lnks[idx].type == H5L_TYPE_SOFT)
ret_value = H5G_LINK;
- else if(ltable.lnks[idx].type >= H5L_TYPE_UD_MIN)
+ else if (ltable.lnks[idx].type >= H5L_TYPE_UD_MIN)
ret_value = H5G_UDLINK;
- else if(ltable.lnks[idx].type == H5L_TYPE_HARD){
- H5O_loc_t tmp_oloc; /* Temporary object location */
- H5O_type_t obj_type; /* Type of object at location */
+ else if (ltable.lnks[idx].type == H5L_TYPE_HARD) {
+ H5O_loc_t tmp_oloc; /* Temporary object location */
+ H5O_type_t obj_type; /* Type of object at location */
/* Build temporary object location */
tmp_oloc.file = oloc->file;
tmp_oloc.addr = ltable.lnks[idx].u.hard.addr;
/* Get the type of the object */
- if(H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
+ if (H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type")
/* Map to group object type */
- if(H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type)))
+ if (H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type)))
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type")
- } else {
+ }
+ else {
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "unknown link type")
} /* end else */
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, H5G_UNKNOWN, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__compact_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index a43939e..f6cbe46 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gdense.c
* Sep 9 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for operating on "dense" link storage for a
* group in a file.
@@ -27,44 +27,42 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* Fractal heap creation parameters for "dense" link storage */
-#define H5G_FHEAP_MAN_WIDTH 4
-#define H5G_FHEAP_MAN_START_BLOCK_SIZE 512
-#define H5G_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
-#define H5G_FHEAP_MAN_MAX_INDEX 32
-#define H5G_FHEAP_MAN_START_ROOT_ROWS 1
-#define H5G_FHEAP_CHECKSUM_DBLOCKS TRUE
-#define H5G_FHEAP_MAX_MAN_SIZE (4 * 1024)
+#define H5G_FHEAP_MAN_WIDTH 4
+#define H5G_FHEAP_MAN_START_BLOCK_SIZE 512
+#define H5G_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
+#define H5G_FHEAP_MAN_MAX_INDEX 32
+#define H5G_FHEAP_MAN_START_ROOT_ROWS 1
+#define H5G_FHEAP_CHECKSUM_DBLOCKS TRUE
+#define H5G_FHEAP_MAX_MAN_SIZE (4 * 1024)
/* v2 B-tree creation macros for 'name' field index */
-#define H5G_NAME_BT2_NODE_SIZE 512
-#define H5G_NAME_BT2_MERGE_PERC 40
-#define H5G_NAME_BT2_SPLIT_PERC 100
+#define H5G_NAME_BT2_NODE_SIZE 512
+#define H5G_NAME_BT2_MERGE_PERC 40
+#define H5G_NAME_BT2_SPLIT_PERC 100
/* v2 B-tree creation macros for 'corder' field index */
-#define H5G_CORDER_BT2_NODE_SIZE 512
-#define H5G_CORDER_BT2_MERGE_PERC 40
-#define H5G_CORDER_BT2_SPLIT_PERC 100
+#define H5G_CORDER_BT2_NODE_SIZE 512
+#define H5G_CORDER_BT2_MERGE_PERC 40
+#define H5G_CORDER_BT2_SPLIT_PERC 100
/* Size of stack buffer for serialized link */
-#define H5G_LINK_BUF_SIZE 128
-
+#define H5G_LINK_BUF_SIZE 128
/******************/
/* Local Typedefs */
@@ -73,7 +71,7 @@
/* Data exchange structure to use when building table of links in group */
typedef struct {
H5G_link_table_t *ltable; /* Pointer to link table to build */
- size_t curr_lnk; /* Current link to operate on */
+ size_t curr_lnk; /* Current link to operate on */
} H5G_dense_bt_ud_t;
/*
@@ -82,18 +80,18 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- hsize_t count; /* # of links examined */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t *fheap; /* Fractal heap handle */
+ hsize_t count; /* # of links examined */
/* downward (from application) */
- hsize_t skip; /* Number of links to skip */
- H5G_lib_iterate_t op; /* Callback for each link */
- void *op_data; /* Callback data for each link */
+ hsize_t skip; /* Number of links to skip */
+ H5G_lib_iterate_t op; /* Callback for each link */
+ void * op_data; /* Callback data for each link */
/* upward */
- int op_ret; /* Return value from callback */
+ int op_ret; /* Return value from callback */
} H5G_bt2_ud_it_t;
/*
@@ -102,11 +100,11 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t *f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
/* upward */
- H5O_link_t *lnk; /* Copy of link */
+ H5O_link_t *lnk; /* Copy of link */
} H5G_fh_ud_it_t;
/*
@@ -115,11 +113,11 @@ typedef struct {
*/
typedef struct {
/* downward */
- H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
- hbool_t rem_from_fheap; /* Whether to remove the link from the fractal heap */
- haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
- H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
- hbool_t replace_names; /* Whether to replace the names of open objects */
+ H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
+ hbool_t rem_from_fheap; /* Whether to remove the link from the fractal heap */
+ haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
+ H5RS_str_t * grp_full_path_r; /* Full path of group where link is removed */
+ hbool_t replace_names; /* Whether to replace the names of open objects */
} H5G_bt2_ud_rm_t;
/*
@@ -128,11 +126,11 @@ typedef struct {
*/
typedef struct {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
- H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
- hbool_t replace_names; /* Whether to replace the names of open objects */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
+ H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
+ hbool_t replace_names; /* Whether to replace the names of open objects */
} H5G_fh_ud_rm_t;
/*
@@ -141,12 +139,12 @@ typedef struct {
*/
typedef struct {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- H5_index_t idx_type; /* Primary index for removing link */
- haddr_t other_bt2_addr; /* Address of "other" v2 B-tree indexing link */
- H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t * fheap; /* Fractal heap handle */
+ H5_index_t idx_type; /* Primary index for removing link */
+ haddr_t other_bt2_addr; /* Address of "other" v2 B-tree indexing link */
+ H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
} H5G_bt2_ud_rmbi_t;
/*
@@ -155,11 +153,11 @@ typedef struct {
*/
typedef struct {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t *f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
/* upward */
- H5O_link_t *lnk; /* Pointer to link to remove */
+ H5O_link_t *lnk; /* Pointer to link to remove */
} H5G_fh_ud_rmbi_t;
/*
@@ -168,16 +166,16 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t *fheap; /* Fractal heap handle */
/* downward (from application) */
- char *name; /* Name buffer to fill */
- size_t name_size; /* Size of name buffer to fill */
+ char * name; /* Name buffer to fill */
+ size_t name_size; /* Size of name buffer to fill */
/* upward */
- ssize_t name_len; /* Full length of name */
+ ssize_t name_len; /* Full length of name */
} H5G_bt2_ud_gnbi_t;
/*
@@ -186,15 +184,15 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t *f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
/* downward (from application) */
- char *name; /* Name buffer to fill */
- size_t name_size; /* Size of name buffer to fill */
+ char * name; /* Name buffer to fill */
+ size_t name_size; /* Size of name buffer to fill */
/* upward */
- ssize_t name_len; /* Full length of name */
+ ssize_t name_len; /* Full length of name */
} H5G_fh_ud_gnbi_t;
/*
@@ -203,12 +201,12 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t *fheap; /* Fractal heap handle */
/* upward */
- H5O_link_t *lnk; /* Pointer to link */
+ H5O_link_t *lnk; /* Pointer to link */
} H5G_bt2_ud_lbi_t;
/*
@@ -217,40 +215,33 @@ typedef struct {
*/
typedef struct {
/* downward (internal) */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
+ H5F_t *f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
/* upward */
- H5O_link_t *lnk; /* Pointer to link */
+ H5O_link_t *lnk; /* Pointer to link */
} H5G_fh_ud_lbi_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_create
*
@@ -259,22 +250,20 @@ typedef struct {
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
- const H5O_pline_t *pline)
+H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, const H5O_pline_t *pline)
{
- H5HF_create_t fheap_cparam; /* Fractal heap creation parameters */
- H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for names */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order */
- size_t fheap_id_len; /* Fractal heap ID length */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_create_t fheap_cparam; /* Fractal heap creation parameters */
+ H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for names */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order */
+ size_t fheap_id_len; /* Fractal heap ID length */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -285,89 +274,76 @@ H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
HDassert(linfo);
/* Set fractal heap creation parameters */
-/* XXX: Give some control of these to applications? */
+ /* XXX: Give some control of these to applications? */
HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
- fheap_cparam.managed.width = H5G_FHEAP_MAN_WIDTH;
+ fheap_cparam.managed.width = H5G_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5G_FHEAP_MAN_START_BLOCK_SIZE;
- fheap_cparam.managed.max_direct_size = H5G_FHEAP_MAN_MAX_DIRECT_SIZE;
- fheap_cparam.managed.max_index = H5G_FHEAP_MAN_MAX_INDEX;
- fheap_cparam.managed.start_root_rows = H5G_FHEAP_MAN_START_ROOT_ROWS;
- fheap_cparam.checksum_dblocks = H5G_FHEAP_CHECKSUM_DBLOCKS;
- fheap_cparam.max_man_size = H5G_FHEAP_MAX_MAN_SIZE;
- if(pline)
+ fheap_cparam.managed.max_direct_size = H5G_FHEAP_MAN_MAX_DIRECT_SIZE;
+ fheap_cparam.managed.max_index = H5G_FHEAP_MAN_MAX_INDEX;
+ fheap_cparam.managed.start_root_rows = H5G_FHEAP_MAN_START_ROOT_ROWS;
+ fheap_cparam.checksum_dblocks = H5G_FHEAP_CHECKSUM_DBLOCKS;
+ fheap_cparam.max_man_size = H5G_FHEAP_MAX_MAN_SIZE;
+ if (pline)
fheap_cparam.pline = *pline;
/* Create fractal heap for storing links */
- if(NULL == (fheap = H5HF_create(f, dxpl_id, &fheap_cparam)))
+ if (NULL == (fheap = H5HF_create(f, dxpl_id, &fheap_cparam)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create fractal heap")
/* Retrieve the heap's address in the file */
- if(H5HF_get_heap_addr(fheap, &(linfo->fheap_addr)) < 0)
+ if (H5HF_get_heap_addr(fheap, &(linfo->fheap_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get fractal heap address")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->fheap_addr = %a\n", FUNC, linfo->fheap_addr);
-#endif /* QAK */
/* Retrieve the heap's ID length in the file */
- if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
+ if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
HDassert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
-#ifdef QAK
-HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
-#endif /* QAK */
/* Create the name index v2 B-tree */
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
- bt2_cparam.cls = H5G_BT2_NAME;
+ bt2_cparam.cls = H5G_BT2_NAME;
bt2_cparam.node_size = (size_t)H5G_NAME_BT2_NODE_SIZE;
- bt2_cparam.rrec_size = 4 + /* Name's hash value */
- fheap_id_len; /* Fractal heap ID */
+ bt2_cparam.rrec_size = 4 + /* Name's hash value */
+ fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_NAME_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_NAME_BT2_MERGE_PERC;
- if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
+ if (NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index")
/* Retrieve the v2 B-tree's address in the file */
- if(H5B2_get_addr(bt2_name, &(linfo->name_bt2_addr)) < 0)
+ if (H5B2_get_addr(bt2_name, &(linfo->name_bt2_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr);
-#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
- if(linfo->index_corder) {
+ if (linfo->index_corder) {
/* Create the creation order index v2 B-tree */
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
- bt2_cparam.cls = H5G_BT2_CORDER;
+ bt2_cparam.cls = H5G_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5G_CORDER_BT2_NODE_SIZE;
- bt2_cparam.rrec_size = 8 + /* Creation order value */
- fheap_id_len; /* Fractal heap ID */
+ bt2_cparam.rrec_size = 8 + /* Creation order value */
+ fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_CORDER_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_CORDER_BT2_MERGE_PERC;
- if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
+ if (NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index")
/* Retrieve the v2 B-tree's address in the file */
- if(H5B2_get_addr(bt2_corder, &(linfo->corder_bt2_addr)) < 0)
+ if (H5B2_get_addr(bt2_corder, &(linfo->corder_bt2_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->corder_bt2_addr = %a\n", FUNC, linfo->corder_bt2_addr);
-#endif /* QAK */
} /* end if */
done:
/* Close the open objects */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_create() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_insert
*
@@ -376,24 +352,22 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- const H5O_link_t *lnk)
+H5G__dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
{
- H5G_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- size_t link_size; /* Size of serialized link in the heap */
- H5WB_t *wb = NULL; /* Wrapped buffer for link data */
- uint8_t link_buf[H5G_LINK_BUF_SIZE]; /* Buffer for serializing link */
- void *link_ptr = NULL; /* Pointer to serialized link */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ size_t link_size; /* Size of serialized link in the heap */
+ H5WB_t * wb = NULL; /* Wrapped buffer for link data */
+ uint8_t link_buf[H5G_LINK_BUF_SIZE]; /* Buffer for serializing link */
+ void * link_ptr = NULL; /* Pointer to serialized link */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -403,84 +377,76 @@ H5G__dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(f);
HDassert(linfo);
HDassert(lnk);
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->fheap_addr = %a\n", FUNC, linfo->fheap_addr);
-HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr);
-#endif /* QAK */
/* Find out the size of buffer needed for serialized link */
- if((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
+ if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size")
-#ifdef QAK
-HDfprintf(stderr, "%s: HDstrlen(lnk->name) = %Zu, link_size = %Zu\n", FUNC, HDstrlen(lnk->name), link_size);
-#endif /* QAK */
/* Wrap the local buffer for serialized link */
- if(NULL == (wb = H5WB_wrap(link_buf, sizeof(link_buf))))
+ if (NULL == (wb = H5WB_wrap(link_buf, sizeof(link_buf))))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for link */
- if(NULL == (link_ptr = H5WB_actual(wb, link_size)))
+ if (NULL == (link_ptr = H5WB_actual(wb, link_size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Create serialized form of link */
- if(H5O_msg_encode(f, H5O_LINK_ID, FALSE, (unsigned char *)link_ptr, lnk) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode link")
+ if (H5O_msg_encode(f, H5O_LINK_ID, FALSE, (unsigned char *)link_ptr, lnk) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode link")
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Insert the serialized link into the fractal heap */
- if(H5HF_insert(fheap, dxpl_id, link_size, link_ptr, udata.id) < 0)
+ if (H5HF_insert(fheap, dxpl_id, link_size, link_ptr, udata.id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the callback information for v2 B-tree record insertion */
- udata.common.f = f;
- udata.common.dxpl_id = dxpl_id;
- udata.common.fheap = fheap;
- udata.common.name = lnk->name;
- udata.common.name_hash = H5_checksum_lookup3(lnk->name, HDstrlen(lnk->name), 0);
- udata.common.corder = lnk->corder;
- udata.common.found_op = NULL;
+ udata.common.f = f;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.fheap = fheap;
+ udata.common.name = lnk->name;
+ udata.common.name_hash = H5_checksum_lookup3(lnk->name, HDstrlen(lnk->name), 0);
+ udata.common.corder = lnk->corder;
+ udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
/* udata.id already set in H5HF_insert() call */
/* Insert link into 'name' tracking v2 B-tree */
- if(H5B2_insert(bt2_name, dxpl_id, &udata) < 0)
+ if (H5B2_insert(bt2_name, dxpl_id, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree")
/* Check if we should create a creation order index v2 B-tree record */
- if(linfo->index_corder) {
+ if (linfo->index_corder) {
/* Open the creation order index v2 B-tree */
HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo->corder_bt2_addr, NULL)))
+ if (NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Insert the record into the creation order index v2 B-tree */
- if(H5B2_insert(bt2_corder, dxpl_id, &udata) < 0)
+ if (H5B2_insert(bt2_corder, dxpl_id, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree")
} /* end if */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_lookup_cb
*
@@ -489,7 +455,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -497,9 +462,9 @@ done:
static herr_t
H5G_dense_lookup_cb(const void *_lnk, void *_user_lnk)
{
- const H5O_link_t *lnk = (const H5O_link_t *)_lnk; /* Record from B-tree */
- H5O_link_t *user_lnk = (H5O_link_t *)_user_lnk; /* User data from v2 B-tree link lookup */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_lnk; /* Record from B-tree */
+ H5O_link_t * user_lnk = (H5O_link_t *)_user_lnk; /* User data from v2 B-tree link lookup */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -510,14 +475,13 @@ H5G_dense_lookup_cb(const void *_lnk, void *_user_lnk)
HDassert(user_lnk);
/* Copy link information */
- if(H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL)
+ if (H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_lookup_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_lookup
*
@@ -526,19 +490,17 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
htri_t
-H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- const char *name, H5O_link_t *lnk)
+H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, const char *name, H5O_link_t *lnk)
{
- H5G_bt2_ud_common_t udata; /* User data for v2 B-tree link lookup */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t ret_value; /* Return value */
+ H5G_bt2_ud_common_t udata; /* User data for v2 B-tree link lookup */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -551,37 +513,36 @@ H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(lnk);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Construct the user data for v2 B-tree callback */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.found_op = H5G_dense_lookup_cb; /* v2 B-tree comparison callback */
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.name = name;
+ udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.found_op = H5G_dense_lookup_cb; /* v2 B-tree comparison callback */
udata.found_op_data = lnk;
/* Find & copy the named link in the 'name' index */
- if((ret_value = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
+ if ((ret_value = H5B2_find(bt2_name, dxpl_id, &udata, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in name index")
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_lookup_by_idx_fh_cb
*
@@ -591,7 +552,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
@@ -599,29 +559,29 @@ done:
static herr_t
H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_lbi_t *udata = (H5G_fh_ud_lbi_t *)_udata; /* User data for fractal heap 'op' callback */
- H5O_link_t *tmp_lnk = NULL; /* Temporary pointer to link */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_lbi_t *udata = (H5G_fh_ud_lbi_t *)_udata; /* User data for fractal heap 'op' callback */
+ H5O_link_t * tmp_lnk = NULL; /* Temporary pointer to link */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode link information & keep a copy */
- if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
/* Copy link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, tmp_lnk, udata->lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, tmp_lnk, udata->lnk))
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
done:
/* Release the space allocated for the link */
- if(tmp_lnk)
+ if (tmp_lnk)
H5O_msg_free(H5O_LINK_ID, tmp_lnk);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_lookup_by_idx_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_lookup_by_idx_bt2_cb
*
@@ -630,7 +590,6 @@ done:
* Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
@@ -638,29 +597,28 @@ done:
static herr_t
H5G_dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
- H5G_bt2_ud_lbi_t *bt2_udata = (H5G_bt2_ud_lbi_t *)_bt2_udata; /* User data for callback */
- H5G_fh_ud_lbi_t fh_udata; /* User data for fractal heap 'op' callback */
- int ret_value = H5_ITER_CONT; /* Return value */
+ const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
+ H5G_bt2_ud_lbi_t * bt2_udata = (H5G_bt2_ud_lbi_t *)_bt2_udata; /* User data for callback */
+ H5G_fh_ud_lbi_t fh_udata; /* User data for fractal heap 'op' callback */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.lnk = bt2_udata->lnk;
+ fh_udata.lnk = bt2_udata->lnk;
/* Call fractal heap 'op' routine, to copy the link information */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id,
- H5G_dense_lookup_by_idx_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id, H5G_dense_lookup_by_idx_fh_cb, &fh_udata) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "link found callback failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_lookup_by_idx_bt2_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_lookup_by_idx
*
@@ -670,20 +628,19 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
+H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_link_table_t ltable = {0, NULL}; /* Table of links */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_link_table_t ltable = {0, NULL}; /* Table of links */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -695,7 +652,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(lnk);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Since names are hashed, getting them in strictly increasing or
* decreasing order requires building a table and sorting it.
* If the order is native, use the B-tree for names.
@@ -717,60 +674,59 @@ H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
* use the B-tree for names instead of building a table to speed up the
* process.
*/
- if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
+ if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
HDassert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
- if(H5F_addr_defined(bt2_addr)) {
- H5G_bt2_ud_lbi_t udata; /* User data for v2 B-tree link lookup */
+ if (H5F_addr_defined(bt2_addr)) {
+ H5G_bt2_ud_lbi_t udata; /* User data for v2 B-tree link lookup */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree callback */
- udata.f = f;
+ udata.f = f;
udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.lnk = lnk;
+ udata.fheap = fheap;
+ udata.lnk = lnk;
/* Find & copy the link in the appropriate index */
- if(H5B2_index(bt2, dxpl_id, order, n, H5G_dense_lookup_by_idx_bt2_cb, &udata) < 0)
+ if (H5B2_index(bt2, dxpl_id, order, n, H5G_dense_lookup_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in index")
- } /* end if */
- else { /* Otherwise, we need to build a table of the links and sort it */
+ } /* end if */
+ else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
- if(n >= ltable.nlinks)
+ if (n >= ltable.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Copy link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, &ltable.lnks[n], lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, &ltable.lnks[n], lnk))
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
} /* end else */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_lookup_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_build_table_cb
*
@@ -781,7 +737,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 25 2006
*
*-------------------------------------------------------------------------
@@ -789,8 +744,8 @@ done:
static herr_t
H5G_dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
{
- H5G_dense_bt_ud_t *udata = (H5G_dense_bt_ud_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5G_dense_bt_ud_t *udata = (H5G_dense_bt_ud_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -800,7 +755,7 @@ H5G_dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
HDassert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link information */
- if(H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL)
+ if (H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message")
/* Increment number of links stored */
@@ -810,7 +765,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_build_table_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_build_table
*
@@ -828,10 +782,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable)
+H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, H5G_link_table_t *ltable)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -845,23 +799,24 @@ H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
ltable->nlinks = (size_t)linfo->nlinks;
/* Allocate space for the table entries */
- if(ltable->nlinks > 0) {
- H5G_dense_bt_ud_t udata; /* User data for iteration callback */
+ if (ltable->nlinks > 0) {
+ H5G_dense_bt_ud_t udata; /* User data for iteration callback */
/* Allocate the table to store the links */
- if((ltable->lnks = (H5O_link_t *)H5MM_malloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL)
+ if ((ltable->lnks = (H5O_link_t *)H5MM_malloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set up user data for iteration */
- udata.ltable = ltable;
+ udata.ltable = ltable;
udata.curr_lnk = 0;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5G__dense_iterate(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_dense_build_table_cb, &udata) < 0)
+ if (H5G__dense_iterate(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL,
+ H5G_dense_build_table_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Sort link table in correct iteration order */
- if(H5G__link_sort_table(ltable, idx_type, order) < 0)
+ if (H5G__link_sort_table(ltable, idx_type, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
} /* end if */
else
@@ -871,7 +826,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_build_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_iterate_fh_cb
*
@@ -881,7 +835,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -889,8 +842,8 @@ done:
static herr_t
H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -901,14 +854,14 @@ H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
* HDF5 routine, it could attempt to re-protect that direct block for the
* heap, causing the HDF5 routine called to fail - QAK)
*/
- if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID,
+ obj_len, (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_iterate_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_iterate_bt2_cb
*
@@ -917,7 +870,6 @@ done:
* Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -925,26 +877,25 @@ done:
static herr_t
H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
- H5G_bt2_ud_it_t *bt2_udata = (H5G_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
+ H5G_bt2_ud_it_t * bt2_udata = (H5G_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check for skipping links */
- if(bt2_udata->skip > 0)
+ if (bt2_udata->skip > 0)
--bt2_udata->skip;
else {
- H5G_fh_ud_it_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5G_fh_ud_it_t fh_udata; /* User data for fractal heap 'op' callback */
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
/* Call fractal heap 'op' routine, to copy the link information */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id,
- H5G_dense_iterate_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id, H5G_dense_iterate_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed")
/* Make the callback */
@@ -959,14 +910,13 @@ H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
bt2_udata->count++;
/* Check for callback failure and pass along return value */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_iterate_bt2_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_iterate
*
@@ -975,21 +925,20 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- H5G_lib_iterate_t op, void *op_data)
+H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op,
+ void *op_data)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_link_table_t ltable = {0, NULL}; /* Table of links */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
- herr_t ret_value; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_link_table_t ltable = {0, NULL}; /* Table of links */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1001,7 +950,7 @@ H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(op);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Since names are hashed, getting them in strictly increasing or
* decreasing order requires building a table and sorting it. If
* the order is native, use the B-tree for names.
@@ -1023,67 +972,66 @@ H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
* use the B-tree for names instead of building a table to speed up the
* process.
*/
- if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
+ if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
HDassert(H5F_addr_defined(linfo->name_bt2_addr));
bt2_addr = linfo->name_bt2_addr;
} /* end if */
/* Check on iteration order */
- if(order == H5_ITER_NATIVE) {
- H5G_bt2_ud_it_t udata; /* User data for iterator callback */
+ if (order == H5_ITER_NATIVE) {
+ H5G_bt2_ud_it_t udata; /* User data for iterator callback */
/* Sanity check */
HDassert(H5F_addr_defined(bt2_addr));
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree iterator callback */
- udata.f = f;
+ udata.f = f;
udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.skip = skip;
- udata.count = 0;
- udata.op = op;
+ udata.fheap = fheap;
+ udata.skip = skip;
+ udata.count = 0;
+ udata.op = op;
udata.op_data = op_data;
/* Iterate over the records in the v2 B-tree's "native" order */
/* (by hash of name) */
- if((ret_value = H5B2_iterate(bt2, dxpl_id, H5G_dense_iterate_bt2_cb, &udata)) < 0)
+ if ((ret_value = H5B2_iterate(bt2, dxpl_id, H5G_dense_iterate_bt2_cb, &udata)) < 0)
HERROR(H5E_SYM, H5E_BADITER, "link iteration failed");
/* Update the last link examined, if requested */
- if(last_lnk)
+ if (last_lnk)
*last_lnk = udata.count;
} /* end if */
else {
/* Build the table of links for this group */
- if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Iterate over links in table */
- if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_get_name_by_idx_fh_cb
*
@@ -1093,7 +1041,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
@@ -1101,23 +1048,24 @@ done:
static herr_t
H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_gnbi_t *udata = (H5G_fh_ud_gnbi_t *)_udata; /* User data for fractal heap 'op' callback */
- H5O_link_t *lnk; /* Pointer to link created from heap object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_gnbi_t *udata = (H5G_fh_ud_gnbi_t *)_udata; /* User data for fractal heap 'op' callback */
+ H5O_link_t * lnk; /* Pointer to link created from heap object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
- if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
/* Get the length of the name */
udata->name_len = (ssize_t)HDstrlen(lnk->name);
/* Copy the name into the user's buffer, if given */
- if(udata->name) {
+ if (udata->name) {
HDstrncpy(udata->name, lnk->name, MIN((size_t)(udata->name_len + 1), udata->name_size));
- if((size_t)udata->name_len >= udata->name_size)
+ if ((size_t)udata->name_len >= udata->name_size)
udata->name[udata->name_size - 1] = '\0';
} /* end if */
@@ -1128,7 +1076,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_get_name_by_idx_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_get_name_by_idx_bt2_cb
*
@@ -1137,7 +1084,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
@@ -1145,23 +1091,23 @@ done:
static herr_t
H5G_dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
- H5G_bt2_ud_gnbi_t *bt2_udata = (H5G_bt2_ud_gnbi_t *)_bt2_udata; /* User data for callback */
- H5G_fh_ud_gnbi_t fh_udata; /* User data for fractal heap 'op' callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
+ H5G_bt2_ud_gnbi_t * bt2_udata = (H5G_bt2_ud_gnbi_t *)_bt2_udata; /* User data for callback */
+ H5G_fh_ud_gnbi_t fh_udata; /* User data for fractal heap 'op' callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Prepare user data for callback */
/* down */
- fh_udata.f = bt2_udata->f;
- fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.name = bt2_udata->name;
+ fh_udata.f = bt2_udata->f;
+ fh_udata.dxpl_id = bt2_udata->dxpl_id;
+ fh_udata.name = bt2_udata->name;
fh_udata.name_size = bt2_udata->name_size;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id,
- H5G_dense_get_name_by_idx_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, record->id, H5G_dense_get_name_by_idx_fh_cb,
+ &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed")
/* Set the name's full length to return */
@@ -1171,7 +1117,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_get_name_by_idx_bt2_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_get_name_by_idx
*
@@ -1181,21 +1126,19 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
*/
ssize_t
-H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name,
- size_t size)
+H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, char *name, size_t size)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_link_table_t ltable = {0, NULL}; /* Table of links */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
- ssize_t ret_value; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_link_table_t ltable = {0, NULL}; /* Table of links */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1206,7 +1149,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
HDassert(linfo);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Since names are hashed, getting them in strictly increasing or
* decreasing order requires building a table and sorting it. If
* the order is native, use the B-tree for names.
@@ -1228,70 +1171,69 @@ H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
* use the B-tree for names instead of building a table to speed up the
* process.
*/
- if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
+ if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
HDassert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
- if(H5F_addr_defined(bt2_addr)) {
- H5G_bt2_ud_gnbi_t udata; /* User data for v2 B-tree callback */
+ if (H5F_addr_defined(bt2_addr)) {
+ H5G_bt2_ud_gnbi_t udata; /* User data for v2 B-tree callback */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.name = name;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.name = name;
udata.name_size = size;
/* Retrieve the name according to the v2 B-tree's index order */
- if(H5B2_index(bt2, dxpl_id, order, n, H5G_dense_get_name_by_idx_bt2_cb, &udata) < 0)
+ if (H5B2_index(bt2, dxpl_id, order, n, H5G_dense_get_name_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLIST, FAIL, "can't locate object in v2 B-tree")
/* Set return value */
ret_value = udata.name_len;
- } /* end if */
- else { /* Otherwise, we need to build a table of the links and sort it */
+ } /* end if */
+ else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
- if(n >= ltable.nlinks)
+ if (n >= ltable.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Get the length of the name */
ret_value = (ssize_t)HDstrlen(ltable.lnks[n].name);
/* Copy the name into the user's buffer, if given */
- if(name) {
+ if (name) {
HDstrncpy(name, ltable.lnks[n].name, MIN((size_t)(ret_value + 1), size));
- if((size_t)ret_value >= size)
- name[size - 1]='\0';
+ if ((size_t)ret_value >= size)
+ name[size - 1] = '\0';
} /* end if */
- } /* end else */
+ } /* end else */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_get_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_remove_fh_cb
*
@@ -1300,7 +1242,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
@@ -1308,23 +1249,24 @@ done:
static herr_t
H5G_dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_rm_t *udata = (H5G_fh_ud_rm_t *)_udata; /* User data for fractal heap 'op' callback */
- H5O_link_t *lnk = NULL; /* Pointer to link created from heap object */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_rm_t *udata = (H5G_fh_ud_rm_t *)_udata; /* User data for fractal heap 'op' callback */
+ H5O_link_t * lnk = NULL; /* Pointer to link created from heap object */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
- if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len,
+ (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link")
/* Check for removing the link from the creation order index */
- if(H5F_addr_defined(udata->corder_bt2_addr)) {
- H5G_bt2_ud_common_t bt2_udata; /* Info for B-tree callbacks */
+ if (H5F_addr_defined(udata->corder_bt2_addr)) {
+ H5G_bt2_ud_common_t bt2_udata; /* Info for B-tree callbacks */
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(udata->f, udata->dxpl_id, udata->corder_bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(udata->f, udata->dxpl_id, udata->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1332,31 +1274,31 @@ H5G_dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
bt2_udata.corder = lnk->corder;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove(bt2, udata->dxpl_id, &bt2_udata, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from creation order index v2 B-tree")
+ if (H5B2_remove(bt2, udata->dxpl_id, &bt2_udata, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL,
+ "unable to remove link from creation order index v2 B-tree")
} /* end if */
/* Replace open objects' names, if requested */
- if(udata->replace_names)
- if(H5G__link_name_replace(udata->f, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
+ if (udata->replace_names)
+ if (H5G__link_name_replace(udata->f, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects")
/* Perform the deletion action on the link, if requested */
/* (call message "delete" callback directly: *ick* - QAK) */
- if(H5O_link_delete(udata->f, udata->dxpl_id, NULL, lnk) < 0)
+ if (H5O_link_delete(udata->f, udata->dxpl_id, NULL, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link")
done:
/* Release resources */
- if(bt2 && H5B2_close(bt2, udata->dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, udata->dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
- if(lnk)
+ if (lnk)
H5O_msg_free(H5O_LINK_ID, lnk);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_remove_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_remove_bt2_cb
*
@@ -1365,7 +1307,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
@@ -1373,35 +1314,34 @@ done:
static herr_t
H5G_dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
{
- const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
- H5G_bt2_ud_rm_t *bt2_udata = (H5G_bt2_ud_rm_t *)_bt2_udata; /* User data for callback */
- H5G_fh_ud_rm_t fh_udata; /* User data for fractal heap 'op' callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
+ H5G_bt2_ud_rm_t * bt2_udata = (H5G_bt2_ud_rm_t *)_bt2_udata; /* User data for callback */
+ H5G_fh_ud_rm_t fh_udata; /* User data for fractal heap 'op' callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Set up the user data for fractal heap 'op' callback */
- fh_udata.f = bt2_udata->common.f;
- fh_udata.dxpl_id = bt2_udata->common.dxpl_id;
+ fh_udata.f = bt2_udata->common.f;
+ fh_udata.dxpl_id = bt2_udata->common.dxpl_id;
fh_udata.corder_bt2_addr = bt2_udata->corder_bt2_addr;
fh_udata.grp_full_path_r = bt2_udata->grp_full_path_r;
- fh_udata.replace_names = bt2_udata->replace_names;
+ fh_udata.replace_names = bt2_udata->replace_names;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->common.fheap, bt2_udata->common.dxpl_id, record->id,
- H5G_dense_remove_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->common.fheap, bt2_udata->common.dxpl_id, record->id, H5G_dense_remove_fh_cb,
+ &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
/* Remove record from fractal heap, if requested */
- if(bt2_udata->rem_from_fheap)
- if(H5HF_remove(bt2_udata->common.fheap, bt2_udata->common.dxpl_id, record->id) < 0)
+ if (bt2_udata->rem_from_fheap)
+ if (H5HF_remove(bt2_udata->common.fheap, bt2_udata->common.dxpl_id, record->id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_remove_bt2_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_remove
*
@@ -1410,19 +1350,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5RS_str_t *grp_full_path_r, const char *name)
+H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r,
+ const char *name)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1434,41 +1373,40 @@ H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(name && *name);
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- udata.common.f = f;
- udata.common.dxpl_id = dxpl_id;
- udata.common.fheap = fheap;
- udata.common.name = name;
- udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.common.found_op = NULL;
+ udata.common.f = f;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.fheap = fheap;
+ udata.common.name = name;
+ udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
- udata.rem_from_fheap = TRUE;
- udata.corder_bt2_addr = linfo->corder_bt2_addr;
- udata.grp_full_path_r = grp_full_path_r;
- udata.replace_names = TRUE;
+ udata.rem_from_fheap = TRUE;
+ udata.corder_bt2_addr = linfo->corder_bt2_addr;
+ udata.grp_full_path_r = grp_full_path_r;
+ udata.replace_names = TRUE;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove(bt2, dxpl_id, &udata, H5G_dense_remove_bt2_cb, &udata) < 0)
+ if (H5B2_remove(bt2, dxpl_id, &udata, H5G_dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from name index v2 B-tree")
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_remove_by_idx_fh_cb
*
@@ -1477,7 +1415,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 15 2006
*
*-------------------------------------------------------------------------
@@ -1485,13 +1422,14 @@ done:
static herr_t
H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
- H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
- if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
+ if (NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID,
+ obj_len, (const unsigned char *)obj)))
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, H5_ITER_ERROR, "can't decode link")
/* Can't operate on link here because the fractal heap block is locked */
@@ -1500,7 +1438,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_remove_by_idx_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_dense_remove_by_idx_bt2_cb
*
@@ -1509,7 +1446,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 15 2006
*
*-------------------------------------------------------------------------
@@ -1517,16 +1453,16 @@ done:
static herr_t
H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
- H5G_bt2_ud_rmbi_t *bt2_udata = (H5G_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
- H5G_fh_ud_rmbi_t fh_udata; /* User data for fractal heap 'op' callback */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- const uint8_t *heap_id; /* Heap ID for link */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_bt2_ud_rmbi_t *bt2_udata = (H5G_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
+ H5G_fh_ud_rmbi_t fh_udata; /* User data for fractal heap 'op' callback */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ const uint8_t * heap_id; /* Heap ID for link */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Determine the index being used */
- if(bt2_udata->idx_type == H5_INDEX_NAME) {
+ if (bt2_udata->idx_type == H5_INDEX_NAME) {
const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
/* Set the heap ID to operate on */
@@ -1542,22 +1478,21 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
} /* end else */
/* Set up the user data for fractal heap 'op' callback */
- fh_udata.f = bt2_udata->f;
+ fh_udata.f = bt2_udata->f;
fh_udata.dxpl_id = bt2_udata->dxpl_id;
- fh_udata.lnk = NULL;
+ fh_udata.lnk = NULL;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, heap_id,
- H5G_dense_remove_by_idx_fh_cb, &fh_udata) < 0)
+ if (H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, heap_id, H5G_dense_remove_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
HDassert(fh_udata.lnk);
/* Check for removing the link from the "other" index (creation order, when name used and vice versa) */
- if(H5F_addr_defined(bt2_udata->other_bt2_addr)) {
- H5G_bt2_ud_common_t other_bt2_udata; /* Info for B-tree callbacks */
+ if (H5F_addr_defined(bt2_udata->other_bt2_addr)) {
+ H5G_bt2_ud_common_t other_bt2_udata; /* Info for B-tree callbacks */
/* Determine the index being used */
- if(bt2_udata->idx_type == H5_INDEX_NAME) {
+ if (bt2_udata->idx_type == H5_INDEX_NAME) {
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.corder = fh_udata.lnk->corder;
} /* end if */
@@ -1565,51 +1500,53 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
- other_bt2_udata.f = bt2_udata->f;
+ other_bt2_udata.f = bt2_udata->f;
other_bt2_udata.dxpl_id = bt2_udata->dxpl_id;
- other_bt2_udata.fheap = bt2_udata->fheap;
- other_bt2_udata.name = fh_udata.lnk->name;
- other_bt2_udata.name_hash = H5_checksum_lookup3(fh_udata.lnk->name, HDstrlen(fh_udata.lnk->name), 0);
- other_bt2_udata.found_op = NULL;
+ other_bt2_udata.fheap = bt2_udata->fheap;
+ other_bt2_udata.name = fh_udata.lnk->name;
+ other_bt2_udata.name_hash =
+ H5_checksum_lookup3(fh_udata.lnk->name, HDstrlen(fh_udata.lnk->name), 0);
+ other_bt2_udata.found_op = NULL;
other_bt2_udata.found_op_data = NULL;
} /* end else */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for 'other' index")
/* Set the common information for the v2 B-tree remove operation */
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove(bt2, bt2_udata->dxpl_id, &other_bt2_udata, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, H5_ITER_ERROR, "unable to remove link from 'other' index v2 B-tree")
+ if (H5B2_remove(bt2, bt2_udata->dxpl_id, &other_bt2_udata, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, H5_ITER_ERROR,
+ "unable to remove link from 'other' index v2 B-tree")
} /* end if */
/* Replace open objects' names */
- if(H5G__link_name_replace(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->grp_full_path_r, fh_udata.lnk) < 0)
+ if (H5G__link_name_replace(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->grp_full_path_r, fh_udata.lnk) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects")
/* Perform the deletion action on the link */
/* (call link message "delete" callback directly: *ick* - QAK) */
- if(H5O_link_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.lnk) < 0)
+ if (H5O_link_delete(bt2_udata->f, bt2_udata->dxpl_id, NULL, fh_udata.lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link")
/* Release the space allocated for the link */
H5O_msg_free(H5O_LINK_ID, fh_udata.lnk);
/* Remove record from fractal heap */
- if(H5HF_remove(bt2_udata->fheap, bt2_udata->dxpl_id, heap_id) < 0)
+ if (H5HF_remove(bt2_udata->fheap, bt2_udata->dxpl_id, heap_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap")
done:
/* Release resources */
- if(bt2 && H5B2_close(bt2, bt2_udata->dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, bt2_udata->dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for 'other' index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_dense_remove_by_idx_bt2_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_remove_by_idx
*
@@ -1619,21 +1556,19 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5RS_str_t *grp_full_path_r, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n)
+H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_link_table_t ltable = {0, NULL}; /* Table of links */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_link_table_t ltable = {0, NULL}; /* Table of links */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1644,7 +1579,7 @@ H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HDassert(linfo);
/* Determine the address of the index to use */
- if(idx_type == H5_INDEX_NAME) {
+ if (idx_type == H5_INDEX_NAME) {
/* Since names are hashed, getting them in strictly increasing or
* decreasing order requires building a table and sorting it. If
* the order is native, use the B-tree for names.
@@ -1666,62 +1601,61 @@ H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
* use the B-tree for names instead of building a table to speed up the
* process.
*/
- if(order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
+ if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
HDassert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
- if(H5F_addr_defined(bt2_addr)) {
- H5G_bt2_ud_rmbi_t udata; /* User data for v2 B-tree record removal */
+ if (H5F_addr_defined(bt2_addr)) {
+ H5G_bt2_ud_rmbi_t udata; /* User data for v2 B-tree record removal */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
+ if (NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'remove by index' callback */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.fheap = fheap;
- udata.idx_type = idx_type;
- udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? linfo->corder_bt2_addr : linfo->name_bt2_addr;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.fheap = fheap;
+ udata.idx_type = idx_type;
+ udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? linfo->corder_bt2_addr : linfo->name_bt2_addr;
udata.grp_full_path_r = grp_full_path_r;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5G_dense_remove_by_idx_bt2_cb, &udata) < 0)
+ if (H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5G_dense_remove_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from indexed v2 B-tree")
- } /* end if */
- else { /* Otherwise, we need to build a table of the links and sort it */
+ } /* end if */
+ else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if (H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
- if(n >= ltable.nlinks)
+ if (n >= ltable.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Remove the appropriate link from the dense storage */
- if(H5G__dense_remove(f, dxpl_id, linfo, grp_full_path_r, ltable.lnks[n].name) < 0)
+ if (H5G__dense_remove(f, dxpl_id, linfo, grp_full_path_r, ltable.lnks[n].name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from dense storage")
} /* end else */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_remove_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G__dense_delete
*
@@ -1730,7 +1664,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
@@ -1738,7 +1671,7 @@ done:
herr_t
H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1751,48 +1684,48 @@ H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
/* Check if we are to adjust the ref. count for all the links */
/* (we adjust the ref. count when deleting a group and we _don't_ adjust
* the ref. count when transitioning back to compact storage)
- */
- if(adj_link) {
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5G_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
+ */
+ if (adj_link) {
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5G_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo->fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- udata.common.f = f;
- udata.common.dxpl_id = dxpl_id;
- udata.common.fheap = fheap;
- udata.common.name = NULL;
- udata.common.name_hash = 0;
- udata.common.found_op = NULL;
+ udata.common.f = f;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.fheap = fheap;
+ udata.common.name = NULL;
+ udata.common.name_hash = 0;
+ udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
- udata.rem_from_fheap = FALSE; /* handled in "bulk" below by deleting entire heap */
- udata.corder_bt2_addr = linfo->corder_bt2_addr;
- udata.grp_full_path_r = NULL;
- udata.replace_names = FALSE;
+ udata.rem_from_fheap = FALSE; /* handled in "bulk" below by deleting entire heap */
+ udata.corder_bt2_addr = linfo->corder_bt2_addr;
+ udata.grp_full_path_r = NULL;
+ udata.replace_names = FALSE;
/* Delete the name index, adjusting the ref. count on links removed */
- if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, H5G_dense_remove_bt2_cb, &udata) < 0)
+ if (H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, H5G_dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
/* Close the fractal heap */
- if(H5HF_close(fheap, dxpl_id) < 0)
+ if (H5HF_close(fheap, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
} /* end if */
else {
/* Delete the name index, without adjusting the ref. count on the links */
- if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL, NULL) < 0)
+ if (H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
} /* end else */
linfo->name_bt2_addr = HADDR_UNDEF;
/* Check if we should delete the creation order index v2 B-tree */
- if(linfo->index_corder) {
+ if (linfo->index_corder) {
/* Delete the creation order index, without adjusting the ref. count on the links */
HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
- if(H5B2_delete(f, dxpl_id, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
+ if (H5B2_delete(f, dxpl_id, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
linfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
@@ -1800,7 +1733,7 @@ H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
/* Delete the fractal heap */
- if(H5HF_delete(f, dxpl_id, linfo->fheap_addr) < 0)
+ if (H5HF_delete(f, dxpl_id, linfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap")
linfo->fheap_addr = HADDR_UNDEF;
@@ -1809,7 +1742,7 @@ done:
} /* end H5G__dense_delete() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5G__dense_get_type_by_idx
*
@@ -1825,17 +1758,15 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
*/
H5G_obj_t
-H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
- hsize_t idx)
+H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hsize_t idx)
{
- H5G_link_table_t ltable = {0, NULL}; /* Table of links */
- H5G_obj_t ret_value; /* Return value */
+ H5G_link_table_t ltable = {0, NULL}; /* Table of links */
+ H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1846,43 +1777,43 @@ H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
HDassert(linfo);
/* Build the table of links for this group */
- if(H5G__dense_build_table(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
+ if (H5G__dense_build_table(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "error building table of links")
/* Check for going out of bounds */
- if(idx >= ltable.nlinks)
+ if (idx >= ltable.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "index out of bound")
/* Determine type of object */
- if(ltable.lnks[idx].type == H5L_TYPE_SOFT)
+ if (ltable.lnks[idx].type == H5L_TYPE_SOFT)
ret_value = H5G_LINK;
- else if(ltable.lnks[idx].type >= H5L_TYPE_UD_MIN)
+ else if (ltable.lnks[idx].type >= H5L_TYPE_UD_MIN)
ret_value = H5G_UDLINK;
- else if(ltable.lnks[idx].type == H5L_TYPE_HARD) {
- H5O_loc_t tmp_oloc; /* Temporary object location */
- H5O_type_t obj_type; /* Type of object at location */
+ else if (ltable.lnks[idx].type == H5L_TYPE_HARD) {
+ H5O_loc_t tmp_oloc; /* Temporary object location */
+ H5O_type_t obj_type; /* Type of object at location */
/* Build temporary object location */
tmp_oloc.file = f;
tmp_oloc.addr = ltable.lnks[idx].u.hard.addr;
/* Get the type of the object */
- if(H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
+ if (H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type")
/* Map to group object type */
- if(H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type)))
+ if (H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type)))
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type")
- } else {
+ }
+ else {
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "unknown link type")
} /* end else */
done:
/* Release link table */
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, H5G_UNKNOWN, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__dense_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 9dc1703..c3f8005 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gdeprec.c
* June 21 2006
- * James Laird <jlaird@ncsa.uiuc.edu>
+ * James Laird
*
* Purpose: Deprecated functions from the H5G interface. These
* functions are here for compatibility purposes and may be
@@ -29,29 +29,26 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5G__init_deprec_interface
-
+#define H5_INTERFACE_INIT_FUNC H5G__init_deprec_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5Pprivate.h" /* Property lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -59,52 +56,41 @@
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* User data for path traversal routine for getting object info */
typedef struct {
- H5G_stat_t *statbuf; /* Stat buffer about object */
- hbool_t follow_link; /* Whether we are following a link or not */
- H5F_t *loc_file; /* Pointer to the file the location is in */
- hid_t dxpl_id; /* Dataset transfer property list */
+ H5G_stat_t *statbuf; /* Stat buffer about object */
+ hbool_t follow_link; /* Whether we are following a link or not */
+ H5F_t * loc_file; /* Pointer to the file the location is in */
+ hid_t dxpl_id; /* Dataset transfer property list */
} H5G_trav_goi_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5G_link_hard(hid_t cur_loc_id, const char *cur_name,
- hid_t new_loc_id, const char *new_name);
-static herr_t H5G_move(hid_t src_loc_id, const char *src_name,
- hid_t dst_loc_id, const char *dst_name);
-static herr_t H5G_get_objinfo_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5G_get_objinfo(const H5G_loc_t *loc, const char *name,
- hbool_t follow_link, H5G_stat_t *statbuf/*out*/, hid_t dxpl_id);
-static H5G_obj_t H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
- hid_t dxpl_id);
+static herr_t H5G_link_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const char *new_name);
+static herr_t H5G_move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name);
+static herr_t H5G_get_objinfo_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5G_get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
+ H5G_stat_t *statbuf /*out*/, hid_t dxpl_id);
+static H5G_obj_t H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5G__init_deprec_interface -- Initialize interface-specific information
@@ -125,7 +111,6 @@ H5G__init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5G__init())
} /* H5G__init_deprec_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5G__term_deprec_interface -- Terminate interface
@@ -150,7 +135,7 @@ H5G__term_deprec_interface(void)
} /* H5G__term_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5G_map_obj_type
*
@@ -166,13 +151,13 @@ H5G__term_deprec_interface(void)
H5G_obj_t
H5G_map_obj_type(H5O_type_t obj_type)
{
- H5G_obj_t ret_value; /* Return value */
+ H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Map object type to older "group" object type */
- switch(obj_type) {
+ switch (obj_type) {
case H5O_TYPE_GROUP:
ret_value = H5G_GROUP;
break;
@@ -194,7 +179,6 @@ H5G_map_obj_type(H5O_type_t obj_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_map_obj_type() */
-
/*-------------------------------------------------------------------------
* Function: H5Gcreate1
*
@@ -223,69 +207,68 @@ H5G_map_obj_type(H5O_type_t obj_type)
hid_t
H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
{
- H5G_loc_t loc; /* Location to create group */
- H5G_t *grp = NULL; /* New group created */
- hid_t tmp_gcpl = (-1); /* Temporary group creation property list */
- hid_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location to create group */
+ H5G_t * grp = NULL; /* New group created */
+ hid_t tmp_gcpl = (-1); /* Temporary group creation property list */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*sz", loc_id, name, size_hint);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
/* Check if we need to create a non-standard GCPL */
- if(size_hint > 0) {
- H5P_genplist_t *gc_plist; /* Property list created */
- H5O_ginfo_t ginfo; /* Group info property */
+ if (size_hint > 0) {
+ H5P_genplist_t *gc_plist; /* Property list created */
+ H5O_ginfo_t ginfo; /* Group info property */
/* Get the default property list */
- if(NULL == (gc_plist = (H5P_genplist_t *)H5I_object(H5P_GROUP_CREATE_DEFAULT)))
+ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(H5P_GROUP_CREATE_DEFAULT)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Make a copy of the default property list */
- if((tmp_gcpl = H5P_copy_plist(gc_plist, FALSE)) < 0)
+ if ((tmp_gcpl = H5P_copy_plist(gc_plist, FALSE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to copy the creation property list")
/* Get pointer to the copied property list */
- if(NULL == (gc_plist = (H5P_genplist_t *)H5I_object(tmp_gcpl)))
+ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(tmp_gcpl)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get the group info property */
- if(H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ if (H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info")
/* Set the non-default local heap size hint */
H5_CHECKED_ASSIGN(ginfo.lheap_size_hint, uint32_t, size_hint, size_t);
- if(H5P_set(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ if (H5P_set(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info")
} /* end if */
else
tmp_gcpl = H5P_GROUP_CREATE_DEFAULT;
/* Create the new group & get its ID */
- if(NULL == (grp = H5G__create_named(&loc, name, H5P_LINK_CREATE_DEFAULT,
- tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5AC_dxpl_id)))
+ if (NULL == (grp = H5G__create_named(&loc, name, H5P_LINK_CREATE_DEFAULT, tmp_gcpl,
+ H5P_GROUP_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
- if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+ if ((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
done:
- if(tmp_gcpl > 0 && tmp_gcpl != H5P_GROUP_CREATE_DEFAULT)
- if(H5I_dec_ref(tmp_gcpl) < 0)
+ if (tmp_gcpl > 0 && tmp_gcpl != H5P_GROUP_CREATE_DEFAULT)
+ if (H5I_dec_ref(tmp_gcpl) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release property list")
- if(ret_value < 0)
- if(grp && H5G_close(grp) < 0)
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
FUNC_LEAVE_API(ret_value)
} /* end H5Gcreate1() */
-
/*-------------------------------------------------------------------------
* Function: H5Gopen1
*
@@ -306,37 +289,35 @@ done:
hid_t
H5Gopen1(hid_t loc_id, const char *name)
{
- H5G_t *grp = NULL; /* Group opened */
- H5G_loc_t loc; /* Location of parent for group */
- hid_t ret_value; /* Return value */
+ H5G_t * grp = NULL; /* Group opened */
+ H5G_loc_t loc; /* Location of parent for group */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the group */
- if((grp = H5G__open_name(&loc, name, H5P_DEFAULT, H5AC_ind_dxpl_id)) == NULL)
+ if ((grp = H5G__open_name(&loc, name, H5P_DEFAULT, H5AC_ind_dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an atom for the group */
- if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
done:
- if(ret_value < 0) {
- if(grp && H5G_close(grp) < 0)
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
- } /* end if */
FUNC_LEAVE_API(ret_value)
} /* end H5Gopen1() */
-
/*-------------------------------------------------------------------------
* Function: H5Glink
*
@@ -348,30 +329,30 @@ done:
herr_t
H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iLl*s*s", cur_loc_id, type, cur_name, new_name);
/* Check arguments */
- if(!cur_name || !*cur_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!new_name || !*new_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
+ if (!cur_name || !*cur_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
+ if (!new_name || !*new_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
- if(type == H5L_TYPE_HARD) {
- if((ret_value = H5G_link_hard(cur_loc_id, cur_name, H5L_SAME_LOC, new_name)) < 0)
+ if (type == H5L_TYPE_HARD) {
+ if ((ret_value = H5G_link_hard(cur_loc_id, cur_name, H5L_SAME_LOC, new_name)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't create link")
} /* end if */
- else if(type == H5L_TYPE_SOFT) {
- H5G_loc_t cur_loc; /* Group location for new link */
+ else if (type == H5L_TYPE_SOFT) {
+ H5G_loc_t cur_loc; /* Group location for new link */
/* Finish checking arguments */
- if(H5G_loc(cur_loc_id, &cur_loc) < 0)
+ if (H5G_loc(cur_loc_id, &cur_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Create the link */
- if(H5L_create_soft(cur_name, &cur_loc, new_name, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ if (H5L_create_soft(cur_name, &cur_loc, new_name, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
} /* end else if */
else
@@ -381,7 +362,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Glink() */
-
/*-------------------------------------------------------------------------
* Function: H5Glink2
*
@@ -391,38 +371,37 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
- hid_t new_loc_id, const char *new_name)
+H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id, const char *new_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*sLli*s", cur_loc_id, cur_name, type, new_loc_id, new_name);
/* Check arguments */
- if(!cur_name || !*cur_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!new_name || !*new_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
+ if (!cur_name || !*cur_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
+ if (!new_name || !*new_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
- if(type == H5L_TYPE_HARD) {
- if((ret_value = H5G_link_hard(cur_loc_id, cur_name, new_loc_id, new_name)) < 0)
+ if (type == H5L_TYPE_HARD) {
+ if ((ret_value = H5G_link_hard(cur_loc_id, cur_name, new_loc_id, new_name)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't create link")
} /* end if */
- else if(type == H5L_TYPE_SOFT) {
- H5G_loc_t new_loc; /* Group location for new link */
+ else if (type == H5L_TYPE_SOFT) {
+ H5G_loc_t new_loc; /* Group location for new link */
/* Soft links only need one location, the new_loc_id, but it's possible that
* new_loc_id is H5L_SAME_LOC */
- if(new_loc_id == H5L_SAME_LOC)
+ if (new_loc_id == H5L_SAME_LOC)
new_loc_id = cur_loc_id;
/* Finish checking arguments */
- if(H5G_loc(new_loc_id, &new_loc) < 0)
+ if (H5G_loc(new_loc_id, &new_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Create the link */
- if(H5L_create_soft(cur_name, &new_loc, new_name, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ if (H5L_create_soft(cur_name, &new_loc, new_name, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
} /* end else if */
else
@@ -432,7 +411,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Glink2() */
-
/*-------------------------------------------------------------------------
* Function: H5G_link_hard
*
@@ -450,43 +428,40 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_link_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id,
- const char *new_name)
+H5G_link_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const char *new_name)
{
- H5G_loc_t cur_loc, *cur_loc_p; /* Information about current link's group */
- H5G_loc_t new_loc, *new_loc_p; /* Information about new link's group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t cur_loc, *cur_loc_p; /* Information about current link's group */
+ H5G_loc_t new_loc, *new_loc_p; /* Information about new link's group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Finish checking arguments */
- if(cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC)
+ if (cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not be both H5L_SAME_LOC")
- if(cur_loc_id != H5L_SAME_LOC && H5G_loc(cur_loc_id, &cur_loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(new_loc_id != H5L_SAME_LOC && H5G_loc(new_loc_id, &new_loc) < 0)
+ if (cur_loc_id != H5L_SAME_LOC && H5G_loc(cur_loc_id, &cur_loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (new_loc_id != H5L_SAME_LOC && H5G_loc(new_loc_id, &new_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Set up current & new location pointers */
cur_loc_p = &cur_loc;
new_loc_p = &new_loc;
- if(cur_loc_id == H5L_SAME_LOC)
+ if (cur_loc_id == H5L_SAME_LOC)
cur_loc_p = new_loc_p;
- else if(new_loc_id == H5L_SAME_LOC)
- new_loc_p = cur_loc_p;
- else if(cur_loc_p->oloc->file != new_loc_p->oloc->file)
+ else if (new_loc_id == H5L_SAME_LOC)
+ new_loc_p = cur_loc_p;
+ else if (cur_loc_p->oloc->file != new_loc_p->oloc->file)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should be in the same file.")
/* Create the link */
- if(H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name,
- H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
+ if (H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_link_hard() */
-
/*-------------------------------------------------------------------------
* Function: H5Gmove
*
@@ -497,20 +472,19 @@ done:
herr_t
H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", src_loc_id, src_name, dst_name);
/* Call common routine to move the link */
- if(H5G_move(src_loc_id, src_name, H5L_SAME_LOC, dst_name) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't move link")
+ if (H5G_move(src_loc_id, src_name, H5L_SAME_LOC, dst_name) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't move link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gmove() */
-
/*-------------------------------------------------------------------------
* Function: H5Gmove2
*
@@ -519,23 +493,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name)
+H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*si*s", src_loc_id, src_name, dst_loc_id, dst_name);
/* Call common routine to move the link */
- if(H5G_move(src_loc_id, src_name, dst_loc_id, dst_name) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't move link")
+ if (H5G_move(src_loc_id, src_name, dst_loc_id, dst_name) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "couldn't move link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gmove2() */
-
/*-------------------------------------------------------------------------
* Function: H5G_move
*
@@ -554,45 +526,42 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name)
+H5G_move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name)
{
- H5G_loc_t src_loc, *src_loc_p; /* Group info for source location */
- H5G_loc_t dst_loc, *dst_loc_p; /* Group info for destination location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t src_loc, *src_loc_p; /* Group info for source location */
+ H5G_loc_t dst_loc, *dst_loc_p; /* Group info for destination location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC")
- if(src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
+ if (src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
+ if (dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!src_name || !*src_name)
+ if (!src_name || !*src_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!dst_name || !*dst_name)
+ if (!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
/* Set up src & dst location pointers */
src_loc_p = &src_loc;
dst_loc_p = &dst_loc;
- if(src_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC)
src_loc_p = dst_loc_p;
- else if(dst_loc_id == H5L_SAME_LOC)
+ else if (dst_loc_id == H5L_SAME_LOC)
dst_loc_p = src_loc_p;
/* Move the link */
- if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, H5P_DEFAULT,
- H5P_DEFAULT, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
+ if (H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, H5P_DEFAULT, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_move() */
-
/*-------------------------------------------------------------------------
* Function: H5Gunlink
*
@@ -603,27 +572,26 @@ done:
herr_t
H5Gunlink(hid_t loc_id, const char *name)
{
- H5G_loc_t loc; /* Group's location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Call H5L routine... */
- if(H5L_delete(&loc, name, H5P_DEFAULT, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "couldn't delete link")
+ if (H5L_delete(&loc, name, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "couldn't delete link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gunlink() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_linkval
*
@@ -633,29 +601,28 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/)
+H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/)
{
- H5G_loc_t loc; /* Group's location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*szx", loc_id, name, size, buf);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (H5G_loc(loc_id, &loc))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Call the new link routine which provides this capability */
- if(H5L_get_val(&loc, name, buf, size, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "couldn't get link info")
+ if (H5L_get_val(&loc, name, buf, size, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "couldn't get link info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_linkval() */
-
/*-------------------------------------------------------------------------
* Function: H5Gset_comment
*
@@ -676,25 +643,24 @@ done:
herr_t
H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
{
- H5G_loc_t loc;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", loc_id, name, comment);
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5G_loc_set_comment(&loc, name, comment, H5P_DEFAULT, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to set comment value")
+ if (H5G_loc_set_comment(&loc, name, comment, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to set comment value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gset_comment() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_comment
*
@@ -721,95 +687,90 @@ done:
int
H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
{
- H5G_loc_t loc;
- int ret_value;
+ H5G_loc_t loc;
+ int ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE4("Is", "i*sz*s", loc_id, name, bufsize, buf);
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(bufsize > 0 && !buf)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no buffer specified")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (bufsize > 0 && !buf)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no buffer specified")
- if((ret_value = (int)H5G_loc_get_comment(&loc, name, buf, bufsize, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to get comment value")
+ if ((ret_value = (int)H5G_loc_get_comment(&loc, name, buf, bufsize, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to get comment value")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_comment() */
-
/*-------------------------------------------------------------------------
- * Function: H5Giterate
- *
- * Purpose: Iterates over the entries of a group. The LOC_ID and NAME
- * identify the group over which to iterate and IDX indicates
- * where to start iterating (zero means at the beginning). The
- * OPERATOR is called for each member and the iteration
- * continues until the operator returns non-zero or all members
- * are processed. The operator is passed a group ID for the
- * group being iterated, a member name, and OP_DATA for each
- * member.
+ * Function: H5Giterate
*
- * Note: Deprecated in favor of H5Literate
+ * Purpose: Iterates over the entries of a group. The LOC_ID and NAME
+ * identify the group over which to iterate and IDX indicates
+ * where to start iterating (zero means at the beginning). The
+ * OPERATOR is called for each member and the iteration
+ * continues until the operator returns non-zero or all members
+ * are processed. The operator is passed a group ID for the
+ * group being iterated, a member name, and OP_DATA for each
+ * member.
*
- * Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * NOTE: Deprecated in favor of H5Literate
*
- * Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
- * Programmer: Robb Matzke
- * Monday, March 23, 1998
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
- void *op_data)
+H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, void *op_data)
{
- H5G_link_iterate_t lnk_op; /* Link operator */
- hsize_t last_obj; /* Index of last object looked at */
- hsize_t idx; /* Internal location to hold index */
- herr_t ret_value;
+ H5G_link_iterate_t lnk_op; /* Link operator */
+ hsize_t last_obj; /* Index of last object looked at */
+ hsize_t idx; /* Internal location to hold index */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*s*Isx*x", loc_id, name, idx_p, op, op_data);
/* Check args */
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_p && *idx_p < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
- if(!op)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (idx_p && *idx_p < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
+ if (!op)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified")
/* Set number of objects looked at to zero */
last_obj = 0;
- idx = (hsize_t)(idx_p == NULL ? 0 : *idx_p);
+ idx = (hsize_t)(idx_p == NULL ? 0 : *idx_p);
/* Build link operator info */
- lnk_op.op_type = H5G_LINK_OP_OLD;
+ lnk_op.op_type = H5G_LINK_OP_OLD;
lnk_op.op_func.op_old = op;
/* Call private function. */
- if((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed")
+ if ((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data,
+ H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed")
/* Set the index we stopped at */
- if(idx_p)
+ if (idx_p)
*idx_p = (int)last_obj;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Giterate() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_num_objs
*
@@ -829,27 +790,27 @@ done:
herr_t
H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
{
- H5G_loc_t loc; /* Location of object */
- H5G_info_t grp_info; /* Group information */
- H5O_type_t obj_type; /* Type of object at location */
- herr_t ret_value = SUCCEED;
+ H5G_loc_t loc; /* Location of object */
+ H5G_info_t grp_info; /* Group information */
+ H5O_type_t obj_type; /* Type of object at location */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", loc_id, num_objs);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
+ if (H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
+ if (obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
- if(!num_objs)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
+ if (!num_objs)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
/* Retrieve information about the group */
- if(H5G__obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
+ if (H5G__obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
/* Set the number of objects [sic: links] in the group */
*num_objs = grp_info.nlinks;
@@ -858,7 +819,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_num_objs() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_objinfo
*
@@ -877,30 +837,28 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
- H5G_stat_t *statbuf/*out*/)
+H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, H5G_stat_t *statbuf /*out*/)
{
- H5G_loc_t loc;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sbx", loc_id, name, follow_link, statbuf);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Get info */
- if(H5G_get_objinfo(&loc, name, follow_link, statbuf, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "cannot stat object")
+ if (H5G_get_objinfo(&loc, name, follow_link, statbuf, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "cannot stat object")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_objinfo() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_objinfo_cb
*
@@ -915,61 +873,61 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5G_get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5G_trav_goi_t *udata = (H5G_trav_goi_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_trav_goi_t *udata = (H5G_trav_goi_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(lnk == NULL && obj_loc == NULL)
+ if (lnk == NULL && obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name)
/* Only modify user's buffer if it's available */
- if(udata->statbuf) {
- H5G_stat_t *statbuf = udata->statbuf; /* Convenience pointer for statbuf */
+ if (udata->statbuf) {
+ H5G_stat_t *statbuf = udata->statbuf; /* Convenience pointer for statbuf */
/* Common code to retrieve the file's fileno */
- if(H5F_get_fileno((obj_loc ? obj_loc : grp_loc)->oloc->file, &statbuf->fileno[0]) < 0)
+ if (H5F_get_fileno((obj_loc ? obj_loc : grp_loc)->oloc->file, &statbuf->fileno[0]) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unable to read fileno")
/* Info for soft and UD links is gotten by H5L_get_info. If we have
* a hard link, follow it and get info on the object
*/
- if(udata->follow_link || !lnk || (lnk->type == H5L_TYPE_HARD)) {
- H5O_info_t oinfo; /* Object information */
+ if (udata->follow_link || !lnk || (lnk->type == H5L_TYPE_HARD)) {
+ H5O_info_t oinfo; /* Object information */
/* Go retrieve the object information */
/* (don't need index & heap info) */
HDassert(obj_loc);
- if(H5O_get_info(obj_loc->oloc, udata->dxpl_id, FALSE, &oinfo) < 0)
+ if (H5O_get_info(obj_loc->oloc, udata->dxpl_id, FALSE, &oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info")
/* Get mapped object type */
statbuf->type = H5G_map_obj_type(oinfo.type);
- /* Get object number (i.e. address) for object */
- statbuf->objno[0] = (unsigned long)(oinfo.addr);
+ /* Get object number (i.e. address) for object */
+ statbuf->objno[0] = (unsigned long)(oinfo.addr);
#if H5_SIZEOF_UINT64_T > H5_SIZEOF_LONG
- statbuf->objno[1] = (unsigned long)(oinfo.addr >> 8 * sizeof(long));
+ statbuf->objno[1] = (unsigned long)(oinfo.addr >> 8 * sizeof(long));
#else
- statbuf->objno[1] = 0;
+ statbuf->objno[1] = 0;
#endif
/* Get # of hard links pointing to object */
- statbuf->nlink = oinfo.rc;
+ statbuf->nlink = oinfo.rc;
/* Get modification time for object */
statbuf->mtime = oinfo.ctime;
/* Retrieve the object header information */
- statbuf->ohdr.size = oinfo.hdr.space.total;
- statbuf->ohdr.free = oinfo.hdr.space.free;
- statbuf->ohdr.nmesgs = oinfo.hdr.nmesgs;
+ statbuf->ohdr.size = oinfo.hdr.space.total;
+ statbuf->ohdr.free = oinfo.hdr.space.free;
+ statbuf->ohdr.nmesgs = oinfo.hdr.nmesgs;
statbuf->ohdr.nchunks = oinfo.hdr.nchunks;
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -979,7 +937,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_objinfo_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_objinfo
*
@@ -997,59 +954,59 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
- H5G_stat_t *statbuf/*out*/, hid_t dxpl_id)
+H5G_get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5G_stat_t *statbuf /*out*/,
+ hid_t dxpl_id)
{
- H5G_trav_goi_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_trav_goi_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
+ /* Sanity checks */
HDassert(loc);
HDassert(name && *name);
/* Reset stat buffer, if one was given */
- if(statbuf)
+ if (statbuf)
HDmemset(statbuf, 0, sizeof(H5G_stat_t));
/* Set up user data for retrieving information */
- udata.statbuf = statbuf;
+ udata.statbuf = statbuf;
udata.follow_link = follow_link;
- udata.loc_file = loc->oloc->file;
- udata.dxpl_id = dxpl_id;
+ udata.loc_file = loc->oloc->file;
+ udata.dxpl_id = dxpl_id;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(loc, name, (unsigned)(follow_link ? H5G_TARGET_NORMAL : H5G_TARGET_SLINK|H5G_TARGET_UDLINK),
- H5G_get_objinfo_cb, &udata, H5P_DEFAULT, dxpl_id) < 0)
+ if (H5G_traverse(loc, name,
+ (unsigned)(follow_link ? H5G_TARGET_NORMAL : H5G_TARGET_SLINK | H5G_TARGET_UDLINK),
+ H5G_get_objinfo_cb, &udata, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
/* If we're pointing at a soft or UD link, get the real link length and type */
- if(statbuf && follow_link == 0) {
- H5L_info_t linfo; /* Link information buffer */
- herr_t ret;
+ if (statbuf && follow_link == 0) {
+ H5L_info_t linfo; /* Link information buffer */
+ herr_t ret;
/* Get information about link to the object. If this fails, e.g.
* because the object is ".", just treat the object as a hard link. */
- H5E_BEGIN_TRY {
- ret = H5L_get_info(loc, name, &linfo, H5P_DEFAULT, dxpl_id);
- } H5E_END_TRY
+ H5E_BEGIN_TRY { ret = H5L_get_info(loc, name, &linfo, H5P_DEFAULT, dxpl_id); }
+ H5E_END_TRY
- if(ret >= 0 && linfo.type != H5L_TYPE_HARD) {
+ if (ret >= 0 && linfo.type != H5L_TYPE_HARD) {
statbuf->linklen = linfo.u.val_size;
- if(linfo.type == H5L_TYPE_SOFT)
+ if (linfo.type == H5L_TYPE_SOFT)
statbuf->type = H5G_LINK;
- else { /* UD link. H5L_get_info checked for invalid link classes */
+ else { /* UD link. H5L_get_info checked for invalid link classes */
HDassert(linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX);
statbuf->type = H5G_UDLINK;
} /* end else */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_objinfo() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_objname_by_idx
*
@@ -1076,30 +1033,30 @@ done:
ssize_t
H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size)
{
- H5G_loc_t loc; /* Object location */
- H5O_type_t obj_type; /* Type of object at location */
- ssize_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5O_type_t obj_type; /* Type of object at location */
+ ssize_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE4("Zs", "ih*sz", loc_id, idx, name, size);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
+ if (H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
+ if (obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a group")
/* Call internal function */
- if((ret_value = H5G_obj_get_name_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "can't get object name")
+ if ((ret_value = H5G_obj_get_name_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size,
+ H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "can't get object name")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_objname_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Gget_objtype_by_idx
*
@@ -1118,30 +1075,29 @@ done:
H5G_obj_t
H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
{
- H5G_loc_t loc; /* Object location */
- H5O_type_t obj_type; /* Type of object at location */
- H5G_obj_t ret_value;
+ H5G_loc_t loc; /* Object location */
+ H5O_type_t obj_type; /* Type of object at location */
+ H5G_obj_t ret_value;
FUNC_ENTER_API(H5G_UNKNOWN)
H5TRACE2("Go", "ih", loc_id, idx);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID")
+ if (H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
+ if (obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "not a group")
/* Call internal function*/
- if((ret_value = H5G_obj_get_type_by_idx(loc.oloc, idx, H5AC_ind_dxpl_id)) == H5G_UNKNOWN)
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object type")
+ if ((ret_value = H5G_obj_get_type_by_idx(loc.oloc, idx, H5AC_ind_dxpl_id)) == H5G_UNKNOWN)
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object type")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_objtype_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_get_type_by_idx
*
@@ -1160,9 +1116,9 @@ done:
static H5G_obj_t
H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- H5G_obj_t ret_value; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ H5G_obj_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5G_UNKNOWN)
@@ -1170,23 +1126,23 @@ H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
HDassert(oloc);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't check for link info message")
- if(linfo_exists) {
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (linfo_exists) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's name from the dense link storage */
- if((ret_value = H5G__dense_get_type_by_idx(oloc->file, dxpl_id, &linfo, idx)) < 0)
+ if ((ret_value = H5G__dense_get_type_by_idx(oloc->file, dxpl_id, &linfo, idx)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end if */
else {
/* Get the object's type from the link messages */
- if((ret_value = H5G__compact_get_type_by_idx(oloc, dxpl_id, &linfo, idx)) < 0)
+ if ((ret_value = H5G__compact_get_type_by_idx(oloc, dxpl_id, &linfo, idx)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Get the object's type from the symbol table */
- if((ret_value = H5G__stab_get_type_by_idx(oloc, idx, dxpl_id)) < 0)
+ if ((ret_value = H5G__stab_get_type_by_idx(oloc, idx, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end else */
@@ -1194,4 +1150,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 1bd8e63..984d601 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, September 19, 1997
*/
@@ -20,40 +20,34 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -61,18 +55,14 @@
/* Declare extern the PQ free list for the wrapped strings */
H5FL_BLK_EXTERN(str_buf);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_decode_vec
*
@@ -85,17 +75,15 @@ H5FL_BLK_EXTERN(str_buf);
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end,
- H5G_entry_t *ent, unsigned n)
+H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5G_entry_t *ent, unsigned n)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -105,10 +93,10 @@ H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end,
HDassert(ent);
/* decode entries */
- for(u = 0; u < n; u++) {
- if(*pp > p_end)
+ for (u = 0; u < n; u++) {
+ if (*pp > p_end)
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "ran off the end of the buffer")
- if(H5G_ent_decode(f, pp, ent + u) < 0)
+ if (H5G_ent_decode(f, pp, ent + u) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode")
}
@@ -116,7 +104,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__ent_decode_vec() */
-
/*-------------------------------------------------------------------------
* Function: H5G_ent_decode
*
@@ -128,7 +115,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -136,9 +122,9 @@ done:
herr_t
H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
{
- const uint8_t *p_ret = *pp;
- uint32_t tmp;
- herr_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *p_ret = *pp;
+ uint32_t tmp;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -155,7 +141,7 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
ent->type = (H5G_cache_type_t)tmp;
/* decode scratch-pad */
- switch(ent->type) {
+ switch (ent->type) {
case H5G_NOTHING_CACHED:
break;
@@ -181,7 +167,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_ent_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_encode_vec
*
@@ -194,7 +179,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -202,8 +186,8 @@ done:
herr_t
H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsigned n)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -213,15 +197,14 @@ H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsign
HDassert(ent);
/* encode entries */
- for(u = 0; u < n; u++)
- if(H5G_ent_encode(f, pp, ent + u) < 0)
+ for (u = 0; u < n; u++)
+ if (H5G_ent_encode(f, pp, ent + u) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5G__ent_encode_vec() */
-
/*-------------------------------------------------------------------------
* Function: H5G_ent_encode
*
@@ -234,7 +217,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -242,8 +224,8 @@ done:
herr_t
H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
- uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
- herr_t ret_value = SUCCEED; /* Return value */
+ uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -252,15 +234,15 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
HDassert(pp);
/* Check for actual entry to encode */
- if(ent) {
+ if (ent) {
/* encode header */
H5F_ENCODE_LENGTH(f, *pp, ent->name_off);
H5F_addr_encode(f, pp, ent->header);
UINT32ENCODE(*pp, ent->type);
- UINT32ENCODE(*pp, 0); /*reserved*/
+ UINT32ENCODE(*pp, 0); /*reserved*/
/* encode scratch-pad */
- switch(ent->type) {
+ switch (ent->type) {
case H5G_NOTHING_CACHED:
break;
@@ -279,16 +261,16 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
default:
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown symbol table entry cache type")
} /* end switch */
- } /* end if */
+ } /* end if */
else {
H5F_ENCODE_LENGTH(f, *pp, 0);
H5F_addr_encode(f, pp, HADDR_UNDEF);
UINT32ENCODE(*pp, H5G_NOTHING_CACHED);
- UINT32ENCODE(*pp, 0); /*reserved*/
- } /* end else */
+ UINT32ENCODE(*pp, 0); /*reserved*/
+ } /* end else */
/* fill with zero */
- if(*pp < p_ret)
+ if (*pp < p_ret)
HDmemset(*pp, 0, (size_t)(p_ret - *pp));
*pp = p_ret;
@@ -296,7 +278,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_ent_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_copy
*
@@ -306,7 +287,6 @@ done:
* Failure: Negative
*
* Programmer: Pedro Vicente
- * pvn@ncsa.uiuc.edu
* ???day, August ??, 2002
*
* Notes: 'depth' parameter determines how much of the group entry
@@ -335,10 +315,11 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
HDmemcpy(dst, src, sizeof(H5G_entry_t));
/* Deep copy the names */
- if(depth == H5_COPY_DEEP) {
+ if (depth == H5_COPY_DEEP) {
/* Nothing currently */
;
- } else if(depth == H5_COPY_SHALLOW) {
+ }
+ else if (depth == H5_COPY_SHALLOW) {
/* Discarding 'const' qualifier OK - QAK */
H5G__ent_reset((H5G_entry_t *)src);
} /* end if */
@@ -346,7 +327,6 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
FUNC_LEAVE_NOAPI_VOID
} /* end H5G__ent_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_reset
*
@@ -375,7 +355,6 @@ H5G__ent_reset(H5G_entry_t *ent)
FUNC_LEAVE_NOAPI_VOID
} /* end H5G__ent_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_convert
*
@@ -385,18 +364,16 @@ H5G__ent_reset(H5G_entry_t *ent)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
- const H5O_link_t *lnk, H5O_type_t obj_type, const void *crt_info,
- H5G_entry_t *ent)
+H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name, const H5O_link_t *lnk,
+ H5O_type_t obj_type, const void *crt_info, H5G_entry_t *ent)
{
- size_t name_offset; /* Offset of name in heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t name_offset; /* Offset of name in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -413,87 +390,82 @@ H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
* Add the new name to the heap.
*/
name_offset = H5HL_insert(f, dxpl_id, heap, HDstrlen(name) + 1, name);
- if(0 == name_offset || (size_t)(-1) == name_offset)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert symbol name into heap")
+ if (0 == name_offset || (size_t)(-1) == name_offset)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert symbol name into heap")
ent->name_off = name_offset;
/* Build correct information for symbol table entry based on link type */
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
- if(obj_type == H5O_TYPE_GROUP) {
+ if (obj_type == H5O_TYPE_GROUP) {
const H5G_obj_create_t *gcrt_info = (const H5G_obj_create_t *)crt_info;
ent->type = gcrt_info->cache_type;
- if(ent->type != H5G_NOTHING_CACHED)
+ if (ent->type != H5G_NOTHING_CACHED)
ent->cache = gcrt_info->cache;
#ifndef NDEBUG
else {
/* Make sure there is no stab message in the target object
*/
- H5O_loc_t targ_oloc; /* Location of link target */
- htri_t stab_exists; /* Whether the target symbol table exists */
+ H5O_loc_t targ_oloc; /* Location of link target */
+ htri_t stab_exists; /* Whether the target symbol table exists */
/* Build target object location */
- if(H5O_loc_reset(&targ_oloc) < 0)
+ if (H5O_loc_reset(&targ_oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location")
targ_oloc.file = f;
targ_oloc.addr = lnk->u.hard.addr;
/* Check if a symbol table message exists */
- if((stab_exists = H5O_msg_exists(&targ_oloc, H5O_STAB_ID,
- dxpl_id)) < 0)
+ if ((stab_exists = H5O_msg_exists(&targ_oloc, H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message")
HDassert(!stab_exists);
} /* end else */
-#endif /* NDEBUG */
- } /* end if */
- else if(obj_type == H5O_TYPE_UNKNOWN){
+#endif /* NDEBUG */
+ } /* end if */
+ else if (obj_type == H5O_TYPE_UNKNOWN) {
/* Try to retrieve symbol table information for caching */
- H5O_loc_t targ_oloc; /* Location of link target */
- H5O_t *oh; /* Link target object header */
- H5O_stab_t stab; /* Link target symbol table */
- htri_t stab_exists; /* Whether the target symbol table exists */
+ H5O_loc_t targ_oloc; /* Location of link target */
+ H5O_t * oh; /* Link target object header */
+ H5O_stab_t stab; /* Link target symbol table */
+ htri_t stab_exists; /* Whether the target symbol table exists */
/* Build target object location */
- if(H5O_loc_reset(&targ_oloc) < 0)
+ if (H5O_loc_reset(&targ_oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location")
targ_oloc.file = f;
targ_oloc.addr = lnk->u.hard.addr;
/* Get the object header */
- if(NULL == (oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ)))
+ if (NULL == (oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, FAIL, "unable to protect target object header")
/* Check if a symbol table message exists */
- if((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0) {
- if(H5O_unprotect(&targ_oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET)
- < 0)
+ if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0) {
+ if (H5O_unprotect(&targ_oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HERROR(H5E_SYM, H5E_CANTUNPROTECT, "unable to release object header");
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message")
} /* end if */
- if(stab_exists) {
+ if (stab_exists) {
/* Read symbol table message */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID,
- &stab)) {
- if(H5O_unprotect(&targ_oloc, dxpl_id, oh,
- H5AC__NO_FLAGS_SET) < 0)
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab)) {
+ if (H5O_unprotect(&targ_oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HERROR(H5E_SYM, H5E_CANTUNPROTECT, "unable to release object header");
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read STAB message")
} /* end if */
/* Cache symbol table message */
- ent->type = H5G_CACHED_STAB;
+ ent->type = H5G_CACHED_STAB;
ent->cache.stab.btree_addr = stab.btree_addr;
- ent->cache.stab.heap_addr = stab.heap_addr;
+ ent->cache.stab.heap_addr = stab.heap_addr;
} /* end if */
else
/* No symbol table message, don't cache anything */
ent->type = H5G_NOTHING_CACHED;
- if(H5O_unprotect(&targ_oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET)
- < 0)
+ if (H5O_unprotect(&targ_oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
} /* end else */
else
@@ -502,32 +474,30 @@ H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
ent->header = lnk->u.hard.addr;
break;
- case H5L_TYPE_SOFT:
- {
- size_t lnk_offset; /* Offset to sym-link value */
+ case H5L_TYPE_SOFT: {
+ size_t lnk_offset; /* Offset to sym-link value */
- /* Insert link value into local heap */
- if((size_t)(-1) == (lnk_offset = H5HL_insert(f, dxpl_id, heap,
- HDstrlen(lnk->u.soft.name) + 1, lnk->u.soft.name)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap")
+ /* Insert link value into local heap */
+ if ((size_t)(-1) == (lnk_offset = H5HL_insert(f, dxpl_id, heap, HDstrlen(lnk->u.soft.name) + 1,
+ lnk->u.soft.name)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap")
- ent->type = H5G_CACHED_SLINK;
- ent->cache.slink.lval_offset = lnk_offset;
- } /* end case */
- break;
+ ent->type = H5G_CACHED_SLINK;
+ ent->cache.slink.lval_offset = lnk_offset;
+ } /* end case */
+ break;
case H5L_TYPE_ERROR:
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
default:
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type")
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__ent_convert() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_debug
*
@@ -536,16 +506,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 29 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
- const H5HL_t *heap)
+H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, const H5HL_t *heap)
{
- const char *lval = NULL;
+ const char *lval = NULL;
int nested_indent, nested_fwidth;
FUNC_ENTER_PACKAGE_NOERR
@@ -555,15 +523,12 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
nested_fwidth = MAX(0, fwidth - 3);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Name offset into private heap:",
- (unsigned long) (ent->name_off));
+ "Name offset into private heap:", (unsigned long)(ent->name_off));
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Object header address:", ent->header);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object header address:", ent->header);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth,
- "Cache info type:");
- switch(ent->type) {
+ HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:");
+ switch (ent->type) {
case H5G_NOTHING_CACHED:
HDfprintf(stream, "Nothing Cached\n");
break;
@@ -571,8 +536,7 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
case H5G_CACHED_STAB:
HDfprintf(stream, "Symbol Table\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Cached entry information:");
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:");
HDfprintf(stream, "%*s%-*s %a\n", nested_indent, "", nested_fwidth,
"B-tree address:", ent->cache.stab.btree_addr);
@@ -582,19 +546,17 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
case H5G_CACHED_SLINK:
HDfprintf(stream, "Symbolic Link\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Cached information:");
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:");
HDfprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
- "Link value offset:",
- (unsigned long)(ent->cache.slink.lval_offset));
- if(heap) {
+ "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset));
+ if (heap) {
lval = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset);
HDfprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth,
- "Link value:",
- (lval == NULL) ? "" : lval);
+ "Link value:", (lval == NULL) ? "" : lval);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth, "Warning: Invalid heap address given, name not displayed!");
+ HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
break;
case H5G_CACHED_ERROR:
@@ -606,4 +568,3 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__ent_debug() */
-
diff --git a/src/H5Gint.c b/src/H5Gint.c
index a9762b3..cab9924 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gint.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: General use, "internal" routines for groups.
*
@@ -26,74 +26,68 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5G_init_int_interface
-
+#define H5_INTERFACE_INIT_FUNC H5G_init_int_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for path traversal routine for "insertion file" routine */
typedef struct {
- H5G_loc_t *loc; /* Pointer to the location for insertion */
+ H5G_loc_t *loc; /* Pointer to the location for insertion */
} H5G_trav_ins_t;
/* User data for application-style iteration over links in a group */
typedef struct {
- hid_t gid; /* The group ID for the application callback */
+ hid_t gid; /* The group ID for the application callback */
H5G_link_iterate_t lnk_op; /* Application callback */
- void *op_data; /* Application's op data */
+ void * op_data; /* Application's op data */
} H5G_iter_appcall_ud_t;
/* User data for recursive traversal over links from a group */
typedef struct {
- hid_t gid; /* The group ID for the starting group */
- H5G_loc_t *curr_loc; /* Location of starting group */
- hid_t lapl_id; /* LAPL for walking across links */
- hid_t dxpl_id; /* DXPL for operations */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Iteration order within index */
- H5SL_t *visited; /* Skip list for tracking visited nodes */
- char *path; /* Path name of the link */
- size_t curr_path_len; /* Current length of the path in the buffer */
- size_t path_buf_size; /* Size of path buffer */
- H5L_iterate_t op; /* Application callback */
- void *op_data; /* Application's op data */
+ hid_t gid; /* The group ID for the starting group */
+ H5G_loc_t * curr_loc; /* Location of starting group */
+ hid_t lapl_id; /* LAPL for walking across links */
+ hid_t dxpl_id; /* DXPL for operations */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Iteration order within index */
+ H5SL_t * visited; /* Skip list for tracking visited nodes */
+ char * path; /* Path name of the link */
+ size_t curr_path_len; /* Current length of the path in the buffer */
+ size_t path_buf_size; /* Size of path buffer */
+ H5L_iterate_t op; /* Application callback */
+ void * op_data; /* Application's op data */
} H5G_iter_visit_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5G_open_oid(H5G_t *grp, hid_t dxpl_id);
-
/*********************/
/* Package Variables */
/*********************/
@@ -105,18 +99,14 @@ H5FL_DEFINE(H5G_shared_t);
/* Declare the free list to manage H5_obj_t's */
H5FL_DEFINE(H5_obj_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*--------------------------------------------------------------------------
NAME
H5G_init_int_interface -- Initialize interface-specific information
@@ -132,19 +122,18 @@ DESCRIPTION
static herr_t
H5G_init_int_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Funnel all work to H5G__init() */
- if(H5G__init() < 0)
+ if (H5G__init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "interface initialization failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5G_init_int_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5G__create_named
*
@@ -160,12 +149,12 @@ done:
*-------------------------------------------------------------------------
*/
H5G_t *
-H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id,
- hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id)
+H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id,
+ hid_t dxpl_id)
{
- H5O_obj_create_t ocrt_info; /* Information for object creation */
- H5G_obj_create_t gcrt_info; /* Information for group creation */
- H5G_t *ret_value; /* Return value */
+ H5O_obj_create_t ocrt_info; /* Information for object creation */
+ H5G_obj_create_t gcrt_info; /* Information for group creation */
+ H5G_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -178,17 +167,17 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id,
HDassert(dxpl_id != H5P_DEFAULT);
/* Set up group creation info */
- gcrt_info.gcpl_id = gcpl_id;
+ gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Set up object creation information */
ocrt_info.obj_type = H5O_TYPE_GROUP;
ocrt_info.crt_info = &gcrt_info;
- ocrt_info.new_obj = NULL;
+ ocrt_info.new_obj = NULL;
/* Create the new group and link it to its parent group */
- if(H5L_link_object(loc, name, &ocrt_info, lcpl_id, gapl_id, dxpl_id) < 0)
+ if (H5L_link_object(loc, name, &ocrt_info, lcpl_id, gapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
HDassert(ocrt_info.new_obj);
@@ -199,7 +188,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__create_named() */
-
/*-------------------------------------------------------------------------
* Function: H5G__create
*
@@ -213,7 +201,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -221,9 +208,9 @@ done:
H5G_t *
H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id)
{
- H5G_t *grp = NULL; /*new group */
- unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */
- H5G_t *ret_value; /* Return value */
+ H5G_t * grp = NULL; /*new group */
+ unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */
+ H5G_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -233,20 +220,20 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id)
HDassert(dxpl_id != H5P_DEFAULT);
/* create an open group */
- if(NULL == (grp = H5FL_CALLOC(H5G_t)))
+ if (NULL == (grp = H5FL_CALLOC(H5G_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
+ if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Create the group object header */
- if(H5G__obj_create(file, dxpl_id, gcrt_info, &(grp->oloc)/*out*/) < 0)
+ if (H5G__obj_create(file, dxpl_id, gcrt_info, &(grp->oloc) /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header")
- oloc_init = 1; /* Indicate that the object location information is valid */
+ oloc_init = 1; /* Indicate that the object location information is valid */
/* Add group to list of open objects in file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count")
- if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
+ if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
/* Set the count of times the object is opened */
@@ -256,27 +243,27 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id)
ret_value = grp;
done:
- if(ret_value == NULL) {
+ if (ret_value == NULL) {
/* Check if we need to release the file-oriented symbol table info */
- if(oloc_init) {
- if(H5O_dec_rc_by_loc(&(grp->oloc), dxpl_id) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object")
- if(H5O_close(&(grp->oloc)) < 0)
+ if (oloc_init) {
+ if (H5O_dec_rc_by_loc(&(grp->oloc), dxpl_id) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTDEC, NULL,
+ "unable to decrement refcount on newly created object")
+ if (H5O_close(&(grp->oloc)) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "unable to release object header")
- if(H5O_delete(file, dxpl_id, grp->oloc.addr) < 0)
+ if (H5O_delete(file, dxpl_id, grp->oloc.addr) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, NULL, "unable to delete object header")
} /* end if */
- if(grp != NULL) {
- if(grp->shared != NULL)
+ if (grp != NULL) {
+ if (grp->shared != NULL)
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
grp = H5FL_FREE(H5G_t, grp);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__create() */
-
/*-------------------------------------------------------------------------
* Function: H5G__open_name
*
@@ -291,16 +278,15 @@ done:
*-------------------------------------------------------------------------
*/
H5G_t *
-H5G__open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id,
- hid_t dxpl_id)
+H5G__open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id, hid_t dxpl_id)
{
- H5G_t *grp = NULL; /* Group to open */
- H5G_loc_t grp_loc; /* Location used to open group */
- H5G_name_t grp_path; /* Opened object group hier. path */
- H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- H5O_type_t obj_type; /* Type of object at location */
- H5G_t *ret_value; /* Return value */
+ H5G_t * grp = NULL; /* Group to open */
+ H5G_loc_t grp_loc; /* Location used to open group */
+ H5G_name_t grp_path; /* Opened object group hier. path */
+ H5O_loc_t grp_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ H5O_type_t obj_type; /* Type of object at location */
+ H5G_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -314,33 +300,31 @@ H5G__open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id,
H5G_loc_reset(&grp_loc);
/* Find the group object using the gapl passed in */
- if(H5G_loc_find(loc, name, &grp_loc/*out*/, gapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(loc, name, &grp_loc /*out*/, gapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found")
loc_found = TRUE;
/* Check that the object found is the correct type */
- if(H5O_obj_type(&grp_oloc, &obj_type, dxpl_id) < 0)
+ if (H5O_obj_type(&grp_oloc, &obj_type, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
+ if (obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group")
/* Open the group */
- if((grp = H5G_open(&grp_loc, dxpl_id)) == NULL)
+ if ((grp = H5G_open(&grp_loc, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group")
/* Set return value */
ret_value = grp;
done:
- if(!ret_value) {
- if(loc_found && H5G_loc_free(&grp_loc) < 0)
+ if (!ret_value)
+ if (loc_found && H5G_loc_free(&grp_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, NULL, "can't free location")
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__open_name() */
-
/*-------------------------------------------------------------------------
* Function: H5G_open
*
@@ -359,9 +343,9 @@ done:
H5G_t *
H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
{
- H5G_t *grp = NULL; /* Group opened */
- H5G_shared_t *shared_fo; /* Shared group object */
- H5G_t *ret_value; /* Return value */
+ H5G_t * grp = NULL; /* Group opened */
+ H5G_shared_t *shared_fo; /* Shared group object */
+ H5G_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -369,33 +353,33 @@ H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
HDassert(loc);
/* Allocate the group structure */
- if(NULL == (grp = H5FL_CALLOC(H5G_t)))
+ if (NULL == (grp = H5FL_CALLOC(H5G_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group")
/* Shallow copy (take ownership) of the group location object */
- if(H5O_loc_copy(&(grp->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
+ if (H5O_loc_copy(&(grp->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location")
- if(H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
+ if (H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path")
/* Check if group was already open */
- if((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) {
+ if ((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) {
/* Clear any errors from H5FO_opened() */
H5E_clear_stack(NULL);
/* Open the group object */
- if(H5G_open_oid(grp, dxpl_id) < 0)
+ if (H5G_open_oid(grp, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found")
/* Add group to list of open objects in file */
- if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
+ if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
} /* end if */
/* Increment object count for the object in the top file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
/* Set open object count */
@@ -409,14 +393,14 @@ H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
shared_fo->fo_count++;
/* Check if the object has been opened through the top file yet */
- if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
+ if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
/* Open the object through this top file */
- if(H5O_open(&(grp->oloc)) < 0)
+ if (H5O_open(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header")
} /* end if */
/* Increment object count for the object in the top file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
} /* end else */
@@ -424,7 +408,7 @@ H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
ret_value = grp;
done:
- if(!ret_value && grp) {
+ if (!ret_value && grp) {
H5O_loc_free(&(grp->oloc));
H5G_name_free(&(grp->path));
grp = H5FL_FREE(H5G_t, grp);
@@ -433,7 +417,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_open() */
-
/*-------------------------------------------------------------------------
* Function: H5G_open_oid
*
@@ -452,8 +435,8 @@ done:
static herr_t
H5G_open_oid(H5G_t *grp, hid_t dxpl_id)
{
- hbool_t obj_opened = FALSE;
- herr_t ret_value = SUCCEED;
+ hbool_t obj_opened = FALSE;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -461,31 +444,30 @@ H5G_open_oid(H5G_t *grp, hid_t dxpl_id)
HDassert(grp);
/* Allocate the shared information for the group */
- if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
+ if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Grab the object header */
- if(H5O_open(&(grp->oloc)) < 0)
+ if (H5O_open(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
obj_opened = TRUE;
/* Check if this object has the right message(s) to be treated as a group */
- if((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id) <= 0)
- && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id) <= 0))
+ if ((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id) <= 0) &&
+ (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id) <= 0))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group")
done:
- if(ret_value < 0) {
- if(obj_opened)
+ if (ret_value < 0) {
+ if (obj_opened)
H5O_close(&(grp->oloc));
- if(grp->shared)
+ if (grp->shared)
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_open_oid() */
-
/*-------------------------------------------------------------------------
* Function: H5G_close
*
@@ -501,7 +483,7 @@ done:
herr_t
H5G_close(H5G_t *grp)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -511,43 +493,44 @@ H5G_close(H5G_t *grp)
--grp->shared->fo_count;
- if(0 == grp->shared->fo_count) {
+ if (0 == grp->shared->fo_count) {
HDassert(grp != H5G_rootof(H5G_fileof(grp)));
/* Remove the group from the list of opened objects in the file */
- if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
+ if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
- if(H5FO_delete(grp->oloc.file, H5AC_dxpl_id, grp->oloc.addr) < 0)
+ if (H5FO_delete(grp->oloc.file, H5AC_dxpl_id, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects")
- if(H5O_close(&(grp->oloc)) < 0)
+ if (H5O_close(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- } else {
+ }
+ else {
/* Decrement the ref. count for this object in the top file */
- if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
+ if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
/* Check reference count for this object in the top file */
- if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
- if(H5O_close(&(grp->oloc)) < 0)
+ if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
+ if (H5O_close(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
} /* end if */
else
/* Free object location (i.e. "unhold" the file if appropriate) */
- if(H5O_loc_free(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
+ if (H5O_loc_free(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
/* If this group is a mount point and the mount point is the last open
* reference to the group, then attempt to close down the file hierarchy
*/
- if(grp->shared->mounted && grp->shared->fo_count == 1) {
+ if (grp->shared->mounted && grp->shared->fo_count == 1) {
/* Attempt to close down the file hierarchy */
- if(H5F_try_close(grp->oloc.file) < 0)
+ if (H5F_try_close(grp->oloc.file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
} /* end if */
- } /* end else */
+ } /* end else */
- if(H5G_name_free(&(grp->path)) < 0) {
+ if (H5G_name_free(&(grp->path)) < 0) {
grp = H5FL_FREE(H5G_t, grp);
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name")
} /* end if */
@@ -558,7 +541,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_close() */
-
/*-------------------------------------------------------------------------
* Function: H5G_oloc
*
@@ -581,7 +563,6 @@ H5G_oloc(H5G_t *grp)
FUNC_LEAVE_NOAPI(grp ? &(grp->oloc) : NULL)
} /* end H5G_oloc() */
-
/*-------------------------------------------------------------------------
* Function: H5G_nameof
*
@@ -604,7 +585,6 @@ H5G_nameof(H5G_t *grp)
FUNC_LEAVE_NOAPI(grp ? &(grp->path) : NULL)
} /* end H5G_nameof() */
-
/*-------------------------------------------------------------------------
* Function: H5G_fileof
*
@@ -630,7 +610,6 @@ H5G_fileof(H5G_t *grp)
FUNC_LEAVE_NOAPI(grp->oloc.file)
} /* end H5G_fileof() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_shared_count
*
@@ -654,7 +633,6 @@ H5G_get_shared_count(H5G_t *grp)
FUNC_LEAVE_NOAPI(grp->shared->fo_count)
} /* end H5G_get_shared_count() */
-
/*-------------------------------------------------------------------------
* Function: H5G_mount
*
@@ -682,7 +660,6 @@ H5G_mount(H5G_t *grp)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_mount() */
-
/*-------------------------------------------------------------------------
* Function: H5G_mounted
*
@@ -706,7 +683,6 @@ H5G_mounted(H5G_t *grp)
FUNC_LEAVE_NOAPI(grp->shared->mounted)
} /* end H5G_mounted() */
-
/*-------------------------------------------------------------------------
* Function: H5G_unmount
*
@@ -734,7 +710,6 @@ H5G_unmount(H5G_t *grp)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_unmount() */
-
/*-------------------------------------------------------------------------
* Function: H5G_iterate_cb
*
@@ -751,8 +726,8 @@ H5G_unmount(H5G_t *grp)
static herr_t
H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
{
- H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
- herr_t ret_value = H5_ITER_ERROR; /* Return value */
+ H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
+ herr_t ret_value = H5_ITER_ERROR; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -760,7 +735,7 @@ H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
HDassert(lnk);
HDassert(udata);
- switch(udata->lnk_op.op_type) {
+ switch (udata->lnk_op.op_type) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
case H5G_LINK_OP_OLD:
/* Make the old-type application callback */
@@ -768,18 +743,16 @@ H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
break;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- case H5G_LINK_OP_NEW:
- {
- H5L_info_t info; /* Link info */
+ case H5G_LINK_OP_NEW: {
+ H5L_info_t info; /* Link info */
- /* Retrieve the info for the link */
- if(H5G_link_to_info(lnk, &info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
+ /* Retrieve the info for the link */
+ if (H5G_link_to_info(lnk, &info) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
- /* Make the application callback */
- ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data);
- }
- break;
+ /* Make the application callback */
+ ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data);
+ } break;
default:
HDassert(0 && "Unknown link op type?!?");
@@ -789,14 +762,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_iterate_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_iterate
+ * Function: H5G_iterate
*
* Purpose: Private function for iterating over links in a group
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Oct 3, 2005
@@ -804,15 +775,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_iterate(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id)
+H5G_iterate(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_lnk, const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_t loc; /* Location of parent for group */
- hid_t gid = -1; /* ID of group to iterate over */
- H5G_t *grp = NULL; /* Pointer to group data structure to iterate over */
- H5G_iter_appcall_ud_t udata; /* User data for callback */
- herr_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location of parent for group */
+ hid_t gid = H5I_INVALID_HID; /* ID of group to iterate over */
+ H5G_t * grp = NULL; /* Pointer to group data structure to iterate over */
+ H5G_iter_appcall_ud_t udata; /* User data for callback */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -821,39 +791,38 @@ H5G_iterate(hid_t loc_id, const char *group_name,
HDassert(last_lnk);
HDassert(lnk_op && lnk_op->op_func.op_new);
- /*
- * Open the group on which to operate. We also create a group ID which
+ /* Open the group on which to operate. We also create a group ID which
* we can pass to the application-defined operator.
*/
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(NULL == (grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)))
+ if (NULL == (grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
/* Set up user data for callback */
- udata.gid = gid;
- udata.lnk_op = *lnk_op;
+ udata.gid = gid;
+ udata.lnk_op = *lnk_op;
udata.op_data = op_data;
/* Call the real group iteration routine */
- if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G_iterate_cb, &udata, dxpl_id)) < 0)
+ if ((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G_iterate_cb, &udata,
+ dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links")
done:
/* Release the group opened */
- if(gid > 0) {
- if(H5I_dec_app_ref(gid) < 0)
+ if (gid > 0) {
+ if (H5I_dec_app_ref(gid) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
- } /* end if */
- else if(grp && H5G_close(grp) < 0)
+ }
+ else if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5G_free_visit_visited
*
@@ -867,7 +836,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data/*in,out*/)
+H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data /*in,out*/)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -876,7 +845,6 @@ H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_free_visit_visited() */
-
/*-------------------------------------------------------------------------
* Function: H5G_visit_cb
*
@@ -893,16 +861,16 @@ H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
static herr_t
H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
{
- H5G_iter_visit_ud_t *udata = (H5G_iter_visit_ud_t *)_udata; /* User data for callback */
- H5L_info_t info; /* Link info */
- H5G_loc_t obj_loc; /* Location of object */
- H5G_name_t obj_path; /* Object's group hier. path */
- H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
+ H5G_iter_visit_ud_t *udata = (H5G_iter_visit_ud_t *)_udata; /* User data for callback */
+ H5L_info_t info; /* Link info */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ hbool_t obj_found = FALSE; /* Object at 'name' found */
size_t old_path_len = udata->curr_path_len; /* Length of path before appending this link's name */
- size_t link_name_len; /* Length of link's name */
- size_t len_needed; /* Length of path string needed */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ size_t link_name_len; /* Length of link's name */
+ size_t len_needed; /* Length of path string needed */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -913,14 +881,14 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
/* Check if we will need more space to store this link's relative path */
/* ("+2" is for string terminator and possible '/' for group separator later) */
link_name_len = HDstrlen(lnk->name);
- len_needed = udata->curr_path_len + link_name_len + 2;
- if(len_needed > udata->path_buf_size) {
- void *new_path; /* Pointer to new path buffer */
+ len_needed = udata->curr_path_len + link_name_len + 2;
+ if (len_needed > udata->path_buf_size) {
+ void *new_path; /* Pointer to new path buffer */
/* Attempt to allocate larger buffer for path */
- if(NULL == (new_path = H5MM_realloc(udata->path, len_needed)))
+ if (NULL == (new_path = H5MM_realloc(udata->path, len_needed)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string")
- udata->path = (char *)new_path;
+ udata->path = (char *)new_path;
udata->path_buf_size = len_needed;
} /* end if */
@@ -930,15 +898,15 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
udata->curr_path_len += link_name_len;
/* Construct the link info from the link message */
- if(H5G_link_to_info(lnk, &info) < 0)
+ if (H5G_link_to_info(lnk, &info) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
/* Make the application callback */
ret_value = (udata->op)(udata->gid, udata->path, &info, udata->op_data);
/* Check for doing more work */
- if(ret_value == H5_ITER_CONT && lnk->type == H5L_TYPE_HARD) {
- H5_obj_t obj_pos; /* Object "position" for this object */
+ if (ret_value == H5_ITER_CONT && lnk->type == H5L_TYPE_HARD) {
+ H5_obj_t obj_pos; /* Object "position" for this object */
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -947,7 +915,7 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
/* Find the object using the LAPL passed in */
/* (Correctly handles mounted files) */
- if(H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
+ if (H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc /*out*/, udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
obj_found = TRUE;
@@ -956,37 +924,38 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
obj_pos.addr = obj_oloc.addr;
/* Check if we've seen the object the link references before */
- if(NULL == H5SL_search(udata->visited, &obj_pos)) {
- H5O_type_t otype; /* Basic object type (group, dataset, etc.) */
- unsigned rc; /* Reference count of object */
+ if (NULL == H5SL_search(udata->visited, &obj_pos)) {
+ H5O_type_t otype; /* Basic object type (group, dataset, etc.) */
+ unsigned rc; /* Reference count of object */
/* Get the object's reference count and type */
- if(H5O_get_rc_and_type(&obj_oloc, udata->dxpl_id, &rc, &otype) < 0)
+ if (H5O_get_rc_and_type(&obj_oloc, udata->dxpl_id, &rc, &otype) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
- if(rc > 1) {
- H5_obj_t *new_node; /* New object node for visited list */
+ if (rc > 1) {
+ H5_obj_t *new_node; /* New object node for visited list */
/* Allocate new object "position" node */
- if((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
+ if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node")
/* Set node information */
*new_node = obj_pos;
/* Add to list of visited objects */
- if(H5SL_insert(udata->visited, new_node, new_node) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert object node into visited list")
+ if (H5SL_insert(udata->visited, new_node, new_node) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR,
+ "can't insert object node into visited list")
} /* end if */
/* If it's a group, we recurse into it */
- if(otype == H5O_TYPE_GROUP) {
- H5G_loc_t *old_loc = udata->curr_loc; /* Pointer to previous group location info */
- H5_index_t idx_type = udata->idx_type; /* Type of index to use */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
+ if (otype == H5O_TYPE_GROUP) {
+ H5G_loc_t * old_loc = udata->curr_loc; /* Pointer to previous group location info */
+ H5_index_t idx_type = udata->idx_type; /* Type of index to use */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
/* Add the path separator to the current path */
HDassert(udata->path[udata->curr_path_len] == '\0');
@@ -994,13 +963,13 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
udata->curr_path_len++;
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(&obj_oloc, &linfo, udata->dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(&obj_oloc, &linfo, udata->dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
/* Switch to name order for this group */
idx_type = H5_INDEX_NAME;
} /* end if */
@@ -1009,7 +978,7 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
/* Switch to name order for this group */
idx_type = H5_INDEX_NAME;
} /* end if */
@@ -1018,31 +987,31 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
udata->curr_loc = &obj_loc;
/* Iterate over links in group */
- ret_value = H5G__obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL, H5G_visit_cb, udata, udata->dxpl_id);
+ ret_value = H5G__obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL,
+ H5G_visit_cb, udata, udata->dxpl_id);
/* Restore location */
udata->curr_loc = old_loc;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Reset path back to incoming path */
udata->path[old_path_len] = '\0';
- udata->curr_path_len = old_path_len;
+ udata->curr_path_len = old_path_len;
/* Release resources */
- if(obj_found && H5G_loc_free(&obj_loc) < 0)
+ if (obj_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_visit_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_visit
+ * Function: H5G_visit
*
- * Purpose: Recursively visit all the links in a group and all
+ * Purpose: Recursively visit all the links in a group and all
* the groups that are linked to from that group. Links within
* each group are visited according to the order within the
* specified index (unless the specified index does not exist for
@@ -1054,35 +1023,29 @@ done:
* callback with more than one link that points to a particular
* _object_.
*
- * Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
- *
- *
- *
- * Programmer: Quincey Koziol
- * November 4 2007
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id)
+H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,
+ void *op_data, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_iter_visit_ud_t udata; /* User data for callback */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- hid_t gid = (-1); /* Group ID */
- H5G_t *grp = NULL; /* Group opened */
- H5G_loc_t loc; /* Location of group passed in */
- H5G_loc_t start_loc; /* Location of starting group */
- unsigned rc; /* Reference count of object */
- herr_t ret_value; /* Return value */
+ H5G_iter_visit_ud_t udata; /* User data for callback */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ H5G_t * grp = NULL; /* Group opened */
+ H5G_loc_t loc; /* Location of group passed in */
+ H5G_loc_t start_loc; /* Location of starting group */
+ unsigned rc; /* Reference count of object */
+ herr_t ret_value = FAIL; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
HDmemset(&udata, 0, sizeof(udata));
@@ -1090,52 +1053,52 @@ H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Open the group to begin visiting within */
- if((grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)) == NULL)
+ if ((grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an ID for the starting group */
- if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
/* Get the location of the starting group */
- if(H5G_loc(gid, &start_loc) < 0)
+ if (H5G_loc(gid, &start_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Set up user data */
- udata.gid = gid;
+ udata.gid = gid;
udata.curr_loc = &start_loc;
- udata.lapl_id = lapl_id;
- udata.dxpl_id = dxpl_id;
+ udata.lapl_id = lapl_id;
+ udata.dxpl_id = dxpl_id;
udata.idx_type = idx_type;
- udata.order = order;
- udata.op = op;
- udata.op_data = op_data;
+ udata.order = order;
+ udata.op = op;
+ udata.op_data = op_data;
/* Allocate space for the path name */
- if(NULL == (udata.path = H5MM_strdup("")))
+ if (NULL == (udata.path = H5MM_strdup("")))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer")
udata.path_buf_size = 1;
udata.curr_path_len = 0;
/* Create skip list to store visited object information */
- if((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
+ if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
/* Get the group's reference count */
- if(H5O_get_rc_and_type(&grp->oloc, dxpl_id, &rc, NULL) < 0)
+ if (H5O_get_rc_and_type(&grp->oloc, dxpl_id, &rc, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info")
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
- if(rc > 1) {
- H5_obj_t *obj_pos; /* New object node for visited list */
+ if (rc > 1) {
+ H5_obj_t *obj_pos; /* New object node for visited list */
/* Allocate new object "position" node */
- if((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
+ if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node")
/* Construct unique "position" for this object */
@@ -1143,18 +1106,18 @@ H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
obj_pos->addr = grp->oloc.addr;
/* Add to list of visited objects */
- if(H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
+ if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list")
} /* end if */
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
/* Switch to name order for this group */
idx_type = H5_INDEX_NAME;
} /* end if */
@@ -1163,29 +1126,29 @@ H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
/* Switch to name order for this group */
idx_type = H5_INDEX_NAME;
} /* end if */
/* Call the link iteration routine */
- if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G_visit_cb, &udata, dxpl_id)) < 0)
+ if ((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G_visit_cb, &udata,
+ dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links")
done:
/* Release user data resources */
H5MM_xfree(udata.path);
- if(udata.visited)
+ if (udata.visited)
H5SL_destroy(udata.visited, H5G_free_visit_visited, NULL);
/* Release the group opened */
- if(gid > 0) {
- if(H5I_dec_app_ref(gid) < 0)
+ if (gid > 0) {
+ if (H5I_dec_app_ref(gid) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
} /* end if */
- else if(grp && H5G_close(grp) < 0)
+ else if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_visit() */
-
diff --git a/src/H5Glink.c b/src/H5Glink.c
index 255add0..9cf2b47 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Glink.c
* Nov 13 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Functions for handling links in groups.
*
@@ -26,37 +26,32 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Ppublic.h" /* Property Lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Ppublic.h" /* Property Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -66,23 +61,18 @@ static int H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2);
static int H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2);
static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G_link_cmp_name_inc
*
@@ -96,7 +86,6 @@ static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
* (i.e. same as strcmp())
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
@@ -109,7 +98,6 @@ H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
} /* end H5G_link_cmp_name_inc() */
-
/*-------------------------------------------------------------------------
* Function: H5G_link_cmp_name_dec
*
@@ -123,7 +111,6 @@ H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
* (i.e. opposite strcmp())
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 25 2006
*
*-------------------------------------------------------------------------
@@ -136,7 +123,6 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
} /* end H5G_link_cmp_name_dec() */
-
/*-------------------------------------------------------------------------
* Function: H5G_link_cmp_corder_inc
*
@@ -149,7 +135,6 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
@@ -157,13 +142,13 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
static int
H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
{
- int ret_value; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
+ if (((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = -1;
- else if(((const H5O_link_t *)lnk1)->corder > ((const H5O_link_t *)lnk2)->corder)
+ else if (((const H5O_link_t *)lnk1)->corder > ((const H5O_link_t *)lnk2)->corder)
ret_value = 1;
else
ret_value = 0;
@@ -171,7 +156,6 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_link_cmp_corder_inc() */
-
/*-------------------------------------------------------------------------
* Function: H5G_link_cmp_corder_dec
*
@@ -184,7 +168,6 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
@@ -192,13 +175,13 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
static int
H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
{
- int ret_value; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
+ if (((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = 1;
- else if(((const H5O_link_t *)lnk1)->corder > ((const H5O_link_t *)lnk2)->corder)
+ else if (((const H5O_link_t *)lnk1)->corder > ((const H5O_link_t *)lnk2)->corder)
ret_value = -1;
else
ret_value = 0;
@@ -206,7 +189,6 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_link_cmp_corder_dec() */
-
/*-------------------------------------------------------------------------
* Function: H5G__ent_to_link
*
@@ -215,17 +197,15 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 16 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
- const H5G_entry_t *ent, const char *name)
+H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, const char *name)
{
- hbool_t dup_soft = FALSE; /* xstrdup the symbolic link name or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t dup_soft = FALSE; /* xstrdup the symbolic link name or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -236,21 +216,21 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
HDassert(name);
/* Set (default) common info for link */
- lnk->cset = H5F_DEFAULT_CSET;
- lnk->corder = 0;
- lnk->corder_valid = FALSE; /* Creation order not valid for this link */
- if((lnk->name = H5MM_xstrdup(name)) == NULL)
+ lnk->cset = H5F_DEFAULT_CSET;
+ lnk->corder = 0;
+ lnk->corder_valid = FALSE; /* Creation order not valid for this link */
+ if ((lnk->name = H5MM_xstrdup(name)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate link name")
/* Object is a symbolic or hard link */
- if(ent->type == H5G_CACHED_SLINK) {
- const char *s; /* Pointer to link value */
+ if (ent->type == H5G_CACHED_SLINK) {
+ const char *s; /* Pointer to link value */
- if((s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset)) == NULL)
+ if ((s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get symbolic link name")
/* Copy the link value */
- if((lnk->u.soft.name = H5MM_xstrdup(s)) == NULL)
+ if ((lnk->u.soft.name = H5MM_xstrdup(s)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate symbolic link name")
dup_soft = TRUE;
@@ -267,16 +247,15 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
} /* end else */
done:
- if(ret_value < 0) {
- if(lnk->name)
+ if (ret_value < 0) {
+ if (lnk->name)
H5MM_xfree(lnk->name);
- if(ent->type == H5G_CACHED_SLINK && dup_soft)
+ if (ent->type == H5G_CACHED_SLINK && dup_soft)
H5MM_xfree(lnk->u.soft.name);
}
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__ent_to_link() */
-
/*-------------------------------------------------------------------------
* Function: H5G_link_to_info
*
@@ -292,7 +271,7 @@ done:
herr_t
H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -300,13 +279,13 @@ H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
HDassert(lnk);
/* Get information from the link */
- if(info) {
- info->cset = lnk->cset;
- info->corder = lnk->corder;
+ if (info) {
+ info->cset = lnk->cset;
+ info->corder = lnk->corder;
info->corder_valid = lnk->corder_valid;
- info->type = lnk->type;
+ info->type = lnk->type;
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
info->u.address = lnk->u.hard.addr;
break;
@@ -318,11 +297,10 @@ H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
case H5L_TYPE_ERROR:
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
- default:
- {
- const H5L_class_t *link_class; /* User-defined link class */
+ default: {
+ const H5L_class_t *link_class; /* User-defined link class */
- if(lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX)
+ if (lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "unknown link class")
/* User-defined link; call its query function to get the link udata size. */
@@ -332,27 +310,29 @@ H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
*/
link_class = H5L_find_class(lnk->type);
- if(link_class != NULL && link_class->query_func != NULL) {
- ssize_t cb_ret; /* Return value from UD callback */
+ if (link_class != NULL && link_class->query_func != NULL) {
+ ssize_t cb_ret; /* Return value from UD callback */
/* Call the link's query routine to retrieve the user-defined link's value size */
- /* (in case the query routine packs/unpacks the link value in some way that changes its size) */
- if((cb_ret = (link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, NULL, (size_t)0)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query buffer size callback returned failure")
+ /* (in case the query routine packs/unpacks the link value in some way that changes its
+ * size) */
+ if ((cb_ret = (link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, NULL,
+ (size_t)0)) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL,
+ "query buffer size callback returned failure")
info->u.val_size = (size_t)cb_ret;
} /* end if */
else
info->u.val_size = 0;
} /* end case */
- } /* end switch */
- } /* end if */
+ } /* end switch */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_link_to_info() */
-
/*-------------------------------------------------------------------------
* Function: H5G__link_to_loc
*
@@ -366,10 +346,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc)
+H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -383,69 +362,75 @@ H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
*/
/* Check for unknown library-internal link */
- if(lnk->type > H5L_TYPE_BUILTIN_MAX && lnk->type < H5L_TYPE_UD_MIN)
+ if (lnk->type > H5L_TYPE_BUILTIN_MAX && lnk->type < H5L_TYPE_UD_MIN)
HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "unknown link type")
/* Build object's group hier. location */
- if(H5G_name_set(grp_loc->path, obj_loc->path, lnk->name) < 0)
+ if (H5G_name_set(grp_loc->path, obj_loc->path, lnk->name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name")
/* Set the object location, if it's a hard link set the address also */
- obj_loc->oloc->file = grp_loc->oloc->file;
+ obj_loc->oloc->file = grp_loc->oloc->file;
obj_loc->oloc->holding_file = FALSE;
- if(lnk->type == H5L_TYPE_HARD)
+ if (lnk->type == H5L_TYPE_HARD)
obj_loc->oloc->addr = lnk->u.hard.addr;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__link_to_loc() */
-
/*-------------------------------------------------------------------------
- * Function: H5G__link_sort_table
+ * Function: H5G__link_sort_table
*
* Purpose: Sort table containing a list of links for a group
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Nov 20, 2006
+ * Programmer: Quincey Koziol
+ * Nov 20, 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
- H5_iter_order_t order)
+H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_order_t order)
{
+ herr_t ret_value = SUCCEED;
+
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ltable);
+ /* Can't sort when empty since the links table will be NULL */
+ if (0 == ltable->nlinks)
+ HGOTO_DONE(ret_value);
+
+ /* This should never be NULL if the number of links is non-zero */
+ HDassert(ltable->lnks);
+
/* Pick appropriate sorting routine */
- if(idx_type == H5_INDEX_NAME) {
- if(order == H5_ITER_INC)
+ if (idx_type == H5_INDEX_NAME) {
+ if (order == H5_ITER_INC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_name_inc);
- else if(order == H5_ITER_DEC)
+ else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_name_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end if */
else {
HDassert(idx_type == H5_INDEX_CRT_ORDER);
- if(order == H5_ITER_INC)
+ if (order == H5_ITER_INC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_corder_inc);
- else if(order == H5_ITER_DEC)
+ else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_corder_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end else */
+done:
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__link_sort_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G__link_iterate_table
*
@@ -461,11 +446,11 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
*-------------------------------------------------------------------------
*/
herr_t
-H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
- hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data)
+H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip, hsize_t *last_lnk,
+ const H5G_lib_iterate_t op, void *op_data)
{
- size_t u; /* Local index variable */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ size_t u; /* Local index variable */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -474,28 +459,27 @@ H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
HDassert(op);
/* Skip over links, if requested */
- if(last_lnk)
+ if (last_lnk)
*last_lnk += skip;
/* Iterate over link messages */
H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t)
- for(; u < ltable->nlinks && !ret_value; u++) {
+ for (; u < ltable->nlinks && !ret_value; u++) {
/* Make the callback */
ret_value = (op)(&(ltable->lnks[u]), op_data);
/* Increment the number of entries passed through */
- if(last_lnk)
+ if (last_lnk)
(*last_lnk)++;
} /* end for */
/* Check for callback failure and pass along return value */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__link_iterate_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G__link_release_table
*
@@ -512,8 +496,8 @@ H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
herr_t
H5G__link_release_table(H5G_link_table_t *ltable)
{
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -521,10 +505,10 @@ H5G__link_release_table(H5G_link_table_t *ltable)
HDassert(ltable);
/* Release link info, if any */
- if(ltable->nlinks > 0) {
+ if (ltable->nlinks > 0) {
/* Free link message information */
- for(u = 0; u < ltable->nlinks; u++)
- if(H5O_msg_reset(H5O_LINK_ID, &(ltable->lnks[u])) < 0)
+ for (u = 0; u < ltable->nlinks; u++)
+ if (H5O_msg_reset(H5O_LINK_ID, &(ltable->lnks[u])) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link message")
/* Free table of links */
@@ -537,7 +521,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__link_release_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G__link_name_replace
*
@@ -547,17 +530,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 13 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
- const H5O_link_t *lnk)
+H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk)
{
- H5RS_str_t *obj_path_r = NULL; /* Full path for link being removed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5RS_str_t *obj_path_r = NULL; /* Full path for link being removed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -565,16 +546,15 @@ H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
HDassert(file);
/* Search the open IDs and replace names for unlinked object */
- if(grp_full_path_r) {
+ if (grp_full_path_r) {
obj_path_r = H5G_build_fullpath_refstr_str(grp_full_path_r, lnk->name);
- if(H5G_name_replace(lnk, H5G_NAME_DELETE, file, obj_path_r, NULL, NULL, dxpl_id) < 0)
+ if (H5G_name_replace(lnk, H5G_NAME_DELETE, file, obj_path_r, NULL, NULL, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to replace name")
- } /* end if */
+ }
done:
- if(obj_path_r)
+ if (obj_path_r)
H5RS_decr(obj_path_r);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__link_name_replace() */
-
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 1f0f157..c9fb857 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gloc.c
* Sep 13 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for working with group "locations"
*
@@ -26,26 +26,23 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Aprivate.h" /* Attributes */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Aprivate.h" /* Attributes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -53,43 +50,43 @@
/* User data for looking up an object in a group */
typedef struct {
/* upward */
- H5G_loc_t *loc; /* Group location to set */
+ H5G_loc_t *loc; /* Group location to set */
} H5G_loc_fnd_t;
/* User data for checking if an object exists */
typedef struct {
/* upward */
- htri_t exists; /* Whether the object exists */
+ htri_t exists; /* Whether the object exists */
} H5G_loc_exists_t;
/* User data for looking up an object in a group by index */
typedef struct {
/* downward */
- hid_t lapl_id; /* LAPL to use for operation */
- hid_t dxpl_id; /* DXPL to use for operation */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Iteration order within index */
- hsize_t n; /* Offset within index */
+ hid_t lapl_id; /* LAPL to use for operation */
+ hid_t dxpl_id; /* DXPL to use for operation */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Iteration order within index */
+ hsize_t n; /* Offset within index */
/* upward */
- H5G_loc_t *loc; /* Group location to set */
+ H5G_loc_t *loc; /* Group location to set */
} H5G_loc_fbi_t;
/* User data for getting an object's info in a group */
typedef struct {
/* downward */
- hid_t dxpl_id; /* DXPL to use for operation */
- hbool_t want_ih_info; /* Whether to retrieve the index & heap info */
+ hid_t dxpl_id; /* DXPL to use for operation */
+ hbool_t want_ih_info; /* Whether to retrieve the index & heap info */
/* upward */
- H5O_info_t *oinfo; /* Object information to retrieve */
+ H5O_info_t *oinfo; /* Object information to retrieve */
} H5G_loc_info_t;
/* User data for setting an object's comment in a group */
typedef struct {
/* downward */
- hid_t dxpl_id; /* DXPL to use for operation */
- const char *comment; /* Object comment buffer */
+ hid_t dxpl_id; /* DXPL to use for operation */
+ const char *comment; /* Object comment buffer */
/* upward */
} H5G_loc_sc_t;
@@ -97,84 +94,69 @@ typedef struct {
/* User data for getting an object's comment in a group */
typedef struct {
/* downward */
- hid_t dxpl_id; /* DXPL to use for operation */
- char *comment; /* Object comment buffer */
- size_t bufsize; /* Size of object comment buffer */
+ hid_t dxpl_id; /* DXPL to use for operation */
+ char * comment; /* Object comment buffer */
+ size_t bufsize; /* Size of object comment buffer */
/* upward */
- ssize_t comment_size; /* Actual size of object comment */
+ ssize_t comment_size; /* Actual size of object comment */
} H5G_loc_gc_t;
-
/********************/
/* Local Prototypes */
/********************/
/* Group traversal callbacks */
-static herr_t H5G_loc_find_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata,
- H5G_own_loc_t *own_loc);
-static herr_t H5G_loc_find_by_idx_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata,
- H5G_own_loc_t *own_loc);
-static herr_t H5G_loc_set_comment_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata,
- H5G_own_loc_t *own_loc);
-static herr_t H5G_loc_get_comment_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata,
- H5G_own_loc_t *own_loc);
-
+static herr_t H5G_loc_find_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc,
+ void *_udata, H5G_own_loc_t *own_loc);
+static herr_t H5G_loc_find_by_idx_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata, H5G_own_loc_t *own_loc);
+static herr_t H5G_loc_set_comment_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata, H5G_own_loc_t *own_loc);
+static herr_t H5G_loc_get_comment_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata, H5G_own_loc_t *own_loc);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5G_loc
+ * Function: H5G_loc
*
- * Purpose: Given an object ID return a location for the object.
+ * Purpose: Given an object ID return a location for the object.
*
- * Return: Success: Group pointer.
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, September 13, 2005
+ * Returns: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5G_loc(hid_t loc_id, H5G_loc_t *loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- switch(H5I_get_type(loc_id)) {
- case H5I_FILE:
- {
- H5F_t *f;
+ switch (H5I_get_type(loc_id)) {
+ case H5I_FILE: {
+ H5F_t *f;
- /* Get the file struct */
- if(NULL == (f = (H5F_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file ID")
+ /* Get the file struct */
+ if (NULL == (f = (H5F_t *)H5I_object(loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file ID")
- /* Construct a group location for root group of the file */
- if(H5G_root_loc(f, loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
- } /* end case */
+ /* Construct a group location for root group of the file */
+ if (H5G_root_loc(f, loc) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
break;
+ }
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
@@ -183,62 +165,59 @@ H5G_loc(hid_t loc_id, H5G_loc_t *loc)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of error class, message or stack")
-
- case H5I_GROUP:
- {
- H5G_t *group;
-
- if(NULL == (group = (H5G_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group ID")
- if(NULL == (loc->oloc = H5G_oloc(group)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group")
- if(NULL == (loc->path = H5G_nameof(group)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group")
- } /* end case */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "unable to get group location of error class, message or stack")
+
+ case H5I_GROUP: {
+ H5G_t *group;
+
+ if (NULL == (group = (H5G_t *)H5I_object(loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group ID")
+ if (NULL == (loc->oloc = H5G_oloc(group)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group")
+ if (NULL == (loc->path = H5G_nameof(group)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group")
break;
+ }
+
+ case H5I_DATATYPE: {
+ H5T_t *dt;
- case H5I_DATATYPE:
- {
- H5T_t *dt;
-
- if(NULL == (dt = (H5T_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid type ID")
- if(NULL == (loc->oloc = H5T_oloc(dt)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype")
- if(NULL == (loc->path = H5T_nameof(dt)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype")
- } /* end case */
+ if (NULL == (dt = (H5T_t *)H5I_object(loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid type ID")
+ if (NULL == (loc->oloc = H5T_oloc(dt)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype")
+ if (NULL == (loc->path = H5T_nameof(dt)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype")
break;
+ }
case H5I_DATASPACE:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace")
- case H5I_DATASET:
- {
- H5D_t *dset;
-
- if(NULL == (dset = (H5D_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid data ID")
- if(NULL == (loc->oloc = H5D_oloc(dset)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset")
- if(NULL == (loc->path = H5D_nameof(dset)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset")
- } /* end case */
+ case H5I_DATASET: {
+ H5D_t *dset;
+
+ if (NULL == (dset = (H5D_t *)H5I_object(loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid data ID")
+ if (NULL == (loc->oloc = H5D_oloc(dset)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset")
+ if (NULL == (loc->path = H5D_nameof(dset)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset")
break;
+ }
+
+ case H5I_ATTR: {
+ H5A_t *attr;
- case H5I_ATTR:
- {
- H5A_t *attr;
-
- if(NULL == (attr = (H5A_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid attribute ID")
- if(NULL == (loc->oloc = H5A_oloc(attr)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute")
- if(NULL == (loc->path = H5A_nameof(attr)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute")
- } /* end case */
+ if (NULL == (attr = (H5A_t *)H5I_object(loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid attribute ID")
+ if (NULL == (loc->oloc = H5A_oloc(attr)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute")
+ if (NULL == (loc->path = H5A_nameof(attr)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute")
break;
+ }
case H5I_REFERENCE:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of reference")
@@ -255,7 +234,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc() */
-
/*-------------------------------------------------------------------------
* Function: H5G__loc_copy
*
@@ -271,7 +249,7 @@ done:
herr_t
H5G__loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -280,16 +258,15 @@ H5G__loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
HDassert(src);
/* Copy components of the location */
- if(H5O_loc_copy(dst->oloc, src->oloc, depth) < 0)
+ if (H5O_loc_copy(dst->oloc, src->oloc, depth) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy entry")
- if(H5G_name_copy(dst->path, src->path, depth) < 0)
+ if (H5G_name_copy(dst->path, src->path, depth) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy path")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__loc_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_reset
*
@@ -305,7 +282,7 @@ done:
herr_t
H5G_loc_reset(H5G_loc_t *loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -313,16 +290,15 @@ H5G_loc_reset(H5G_loc_t *loc)
HDassert(loc);
/* Reset components of the location */
- if(H5O_loc_reset(loc->oloc) < 0)
+ if (H5O_loc_reset(loc->oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset entry")
- if(H5G_name_reset(loc->path) < 0)
+ if (H5G_name_reset(loc->path) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset path")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_free
*
@@ -338,7 +314,7 @@ done:
herr_t
H5G_loc_free(H5G_loc_t *loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -346,16 +322,15 @@ H5G_loc_free(H5G_loc_t *loc)
HDassert(loc);
/* Reset components of the location */
- if(H5G_name_free(loc->path) < 0)
+ if (H5G_name_free(loc->path) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free path")
- if(H5O_loc_free(loc->oloc) < 0)
+ if (H5O_loc_free(loc->oloc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to free object header location")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_free() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_find_cb
*
@@ -369,17 +344,17 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_find_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_find_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_fnd_t *udata = (H5G_loc_fnd_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_fnd_t *udata = (H5G_loc_fnd_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid object */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object '%s' doesn't exist", name)
/* Take ownership of the object's group location */
@@ -393,7 +368,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_find_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_find
*
@@ -407,11 +381,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc/*out*/,
- hid_t lapl_id, hid_t dxpl_id)
+H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_fnd_t udata; /* User data for traversal callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_fnd_t udata; /* User data for traversal callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -424,14 +397,13 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc/*out*/,
udata.loc = obj_loc;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_find_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_find_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_find() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_find_by_idx_cb
*
@@ -446,49 +418,50 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_fbi_t *udata = (H5G_loc_fbi_t *)_udata; /* User data passed in */
- H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
- size_t links_left = H5L_NUM_LINKS; /* # of links left to traverse */
- hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
- hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_fbi_t *udata = (H5G_loc_fbi_t *)_udata; /* User data passed in */
+ H5O_link_t fnd_lnk; /* Link within group */
+ hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ size_t links_left = H5L_NUM_LINKS; /* # of links left to traverse */
+ hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
+ hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Query link */
- if(H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order,
- udata->n, &fnd_lnk, udata->dxpl_id) < 0)
+ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk,
+ udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found")
lnk_copied = TRUE;
/* Build the initial object location for the link */
- if(H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
+ if (H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location")
obj_loc_valid = TRUE;
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
/* (may modify the object location) */
- if(H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc, &obj_exists, udata->lapl_id, udata->dxpl_id) < 0)
+ if (H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc,
+ &obj_exists, udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed")
done:
/* Reset the link information, if we have a copy */
- if(lnk_copied)
+ if (lnk_copied)
H5O_msg_reset(H5O_LINK_ID, &fnd_lnk);
/* Release the object location if we failed after copying it */
- if(ret_value < 0 && obj_loc_valid)
- if(H5G_loc_free(udata->loc) < 0)
+ if (ret_value < 0 && obj_loc_valid)
+ if (H5G_loc_free(udata->loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
/* Indicate that this callback didn't take ownership of the group *
@@ -498,7 +471,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_find_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_find_by_idx
*
@@ -512,12 +484,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5G_loc_t *obj_loc/*out*/, hid_t lapl_id,
- hid_t dxpl_id)
+H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, H5G_loc_t *obj_loc /*out*/, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_fbi_t udata; /* User data for traversal callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_fbi_t udata; /* User data for traversal callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -527,22 +498,22 @@ H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
HDassert(obj_loc);
/* Set up user data for locating object */
- udata.dxpl_id = dxpl_id;
- udata.lapl_id = lapl_id;
+ udata.dxpl_id = dxpl_id;
+ udata.lapl_id = lapl_id;
udata.idx_type = idx_type;
- udata.order = order;
- udata.n = n;
- udata.loc = obj_loc;
+ udata.order = order;
+ udata.n = n;
+ udata.loc = obj_loc;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, group_name, H5G_TARGET_NORMAL, H5G_loc_find_by_idx_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, group_name, H5G_TARGET_NORMAL, H5G_loc_find_by_idx_cb, &udata, lapl_id, dxpl_id) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_find_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G__loc_insert
*
@@ -556,11 +527,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc,
- H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id)
+H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type,
+ const void *crt_info, hid_t dxpl_id)
{
- H5O_link_t lnk; /* Link for object to insert */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t lnk; /* Link for object to insert */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -570,28 +541,26 @@ H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc,
HDassert(obj_loc);
/* Create link object for the object location */
- lnk.type = H5L_TYPE_HARD;
- lnk.cset = H5F_DEFAULT_CSET;
- lnk.corder = 0; /* Will be reset if the group is tracking creation order */
- lnk.corder_valid = FALSE; /* Indicate that the creation order isn't valid (yet) */
+ lnk.type = H5L_TYPE_HARD;
+ lnk.cset = H5F_DEFAULT_CSET;
+ lnk.corder = 0; /* Will be reset if the group is tracking creation order */
+ lnk.corder_valid = FALSE; /* Indicate that the creation order isn't valid (yet) */
/* Casting away const OK -QAK */
- lnk.name = (char *)name;
+ lnk.name = (char *)name;
lnk.u.hard.addr = obj_loc->oloc->addr;
/* Insert new group into current group's symbol table */
- if(H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info,
- dxpl_id) < 0)
+ if (H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object")
/* Set the name of the object location */
- if(H5G_name_set(grp_loc->path, obj_loc->path, name) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name")
+ if (H5G_name_set(grp_loc->path, obj_loc->path, name) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__loc_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_exists_cb
*
@@ -605,17 +574,17 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_exists_t *udata = (H5G_loc_exists_t *)_udata; /* User data passed in */
+ H5G_loc_exists_t *udata = (H5G_loc_exists_t *)_udata; /* User data passed in */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check if the name in this group resolved to a valid object */
- if(obj_loc == NULL)
- if(lnk)
+ if (obj_loc == NULL)
+ if (lnk)
udata->exists = FALSE;
else
udata->exists = FAIL;
@@ -629,7 +598,6 @@ H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_loc_exists_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_exists
*
@@ -646,8 +614,8 @@ H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UN
htri_t
H5G_loc_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_exists_t udata; /* User data for traversal callback */
- htri_t ret_value; /* Return value */
+ H5G_loc_exists_t udata; /* User data for traversal callback */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -659,7 +627,7 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl
udata.exists = FALSE;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G_loc_exists_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G_loc_exists_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists")
/* Set return value */
@@ -669,34 +637,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_exists() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_loc_info_cb
+ * Function: H5G__loc_info_cb
*
- * Purpose: Callback for retrieving object info for an object in a group
+ * Purpose: Callback for retrieving object info for an object in a group
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, November 23, 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_info_t *udata = (H5G_loc_info_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_info_t *udata = (H5G_loc_info_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Query object information */
- if(H5O_get_info(obj_loc->oloc, udata->dxpl_id, udata->want_ih_info, udata->oinfo) < 0)
+ if (H5O_get_info(obj_loc->oloc, udata->dxpl_id, udata->want_ih_info, udata->oinfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info")
done:
@@ -707,11 +675,10 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_info_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5G_loc_info
+ * Function: H5G_loc_info
*
- * Purpose: Retrieve the information for an object from a group location
+ * Purpose: Retrieve the information for an object from a group location
* and path to that object
*
* Return: Non-negative on success/Negative on failure
@@ -722,11 +689,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t *oinfo/*out*/,
- hid_t lapl_id, hid_t dxpl_id)
+H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t *oinfo /*out*/, hid_t lapl_id,
+ hid_t dxpl_id)
{
H5G_loc_info_t udata; /* User data for traversal callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -736,19 +703,18 @@ H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t
HDassert(oinfo);
/* Set up user data for locating object */
- udata.dxpl_id = dxpl_id;
+ udata.dxpl_id = dxpl_id;
udata.want_ih_info = want_ih_info;
- udata.oinfo = oinfo;
+ udata.oinfo = oinfo;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_info_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_info_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_info() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_set_comment_cb
*
@@ -762,35 +728,37 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_sc_t *udata = (H5G_loc_sc_t *)_udata; /* User data passed in */
- H5O_name_t comment; /* Object header "comment" message */
- htri_t exists; /* Whether a "comment" message already exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_sc_t *udata = (H5G_loc_sc_t *)_udata; /* User data passed in */
+ H5O_name_t comment; /* Object header "comment" message */
+ htri_t exists; /* Whether a "comment" message already exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Check for existing comment message */
- if((exists = H5O_msg_exists(obj_loc->oloc, H5O_NAME_ID, udata->dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
+ if ((exists = H5O_msg_exists(obj_loc->oloc, H5O_NAME_ID, udata->dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
/* Remove the previous comment message if any */
- if(exists)
- if(H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, TRUE, udata->dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete existing comment object header message")
+ if (exists)
+ if (H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, TRUE, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL,
+ "unable to delete existing comment object header message")
/* Add the new message */
- if(udata->comment && *udata->comment) {
+ if (udata->comment && *udata->comment) {
/* Casting away const OK -QAK */
- comment.s = (char *)udata->comment;
- if(H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment, udata->dxpl_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message")
+ comment.s = (char *)udata->comment;
+ if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message")
} /* end if */
done:
@@ -801,7 +769,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_set_comment_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_set_comment
*
@@ -816,11 +783,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_set_comment(H5G_loc_t *loc, const char *name, const char *comment,
- hid_t lapl_id, hid_t dxpl_id)
+H5G_loc_set_comment(H5G_loc_t *loc, const char *name, const char *comment, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_sc_t udata; /* User data for traversal callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_sc_t udata; /* User data for traversal callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -833,14 +799,13 @@ H5G_loc_set_comment(H5G_loc_t *loc, const char *name, const char *comment,
udata.comment = comment;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_set_comment_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_set_comment_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_set_comment() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_get_comment_cb
*
@@ -854,41 +819,43 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5G_loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_gc_t *udata = (H5G_loc_gc_t *)_udata; /* User data passed in */
- H5O_name_t comment; /* Object header "comment" message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_gc_t *udata = (H5G_loc_gc_t *)_udata; /* User data passed in */
+ H5O_name_t comment; /* Object header "comment" message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Query object comment */
comment.s = NULL;
- if(NULL == H5O_msg_read(obj_loc->oloc, H5O_NAME_ID, &comment, udata->dxpl_id)) {
- if(udata->comment && udata->bufsize > 0)
+ if (NULL == H5O_msg_read(obj_loc->oloc, H5O_NAME_ID, &comment, udata->dxpl_id)) {
+ if (udata->comment && udata->bufsize > 0)
udata->comment[0] = '\0';
- udata->comment_size = 0;
- } else {
- if(udata->comment && udata->bufsize)
- HDstrncpy(udata->comment, comment.s, udata->bufsize);
- udata->comment_size = (ssize_t)HDstrlen(comment.s);
- H5O_msg_reset(H5O_NAME_ID, &comment);
- } /* end else */
+ udata->comment_size = 0;
+ }
+ else {
+ if (udata->comment && udata->bufsize)
+ HDstrncpy(udata->comment, comment.s, udata->bufsize);
+ udata->comment_size = (ssize_t)HDstrlen(comment.s);
+ H5O_msg_reset(H5O_NAME_ID, &comment);
+ }
done:
/* Indicate that this callback didn't take ownership of the group *
- * location for the object */
+ * location for the object.
+ */
*own_loc = H5G_OWN_NONE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_get_comment_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_loc_get_comment
*
@@ -907,11 +874,11 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment/*out*/,
- size_t bufsize, hid_t lapl_id, hid_t dxpl_id)
+H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment /*out*/, size_t bufsize, hid_t lapl_id,
+ hid_t dxpl_id)
{
- H5G_loc_gc_t udata; /* User data for traversal callback */
- ssize_t ret_value; /* Return value */
+ H5G_loc_gc_t udata; /* User data for traversal callback */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -920,13 +887,13 @@ H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment/*out*/,
HDassert(name && *name);
/* Set up user data for locating object */
- udata.dxpl_id = dxpl_id;
- udata.comment = comment;
- udata.bufsize = bufsize;
+ udata.dxpl_id = dxpl_id;
+ udata.comment = comment;
+ udata.bufsize = bufsize;
udata.comment_size = (-1);
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_get_comment_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_get_comment_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
/* Set the return value */
@@ -935,4 +902,3 @@ H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment/*out*/,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_loc_get_comment() */
-
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 6db4b48..cd3b94c 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gname.c
* Sep 12 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for handling group hierarchy paths.
*
@@ -26,70 +26,65 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory wrappers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory wrappers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Struct used by change name callback function */
typedef struct H5G_names_t {
- H5G_names_op_t op; /* Operation performed on file */
- H5F_t *src_file; /* Top file in src location's mounted file hier. */
- H5RS_str_t *src_full_path_r; /* Source location's full path */
- H5F_t *dst_file; /* Destination location's file */
- H5RS_str_t *dst_full_path_r; /* Destination location's full path */
+ H5G_names_op_t op; /* Operation performed on file */
+ H5F_t * src_file; /* Top file in src location's mounted file hier. */
+ H5RS_str_t * src_full_path_r; /* Source location's full path */
+ H5F_t * dst_file; /* Destination location's file */
+ H5RS_str_t * dst_full_path_r; /* Destination location's full path */
} H5G_names_t;
/* Info to pass to the iteration function when building name */
typedef struct H5G_gnba_iter_t {
/* In */
- const H5O_loc_t *loc; /* The location of the object we're looking for */
- hid_t lapl_id; /* LAPL for operations */
- hid_t dxpl_id; /* DXPL for operations */
+ const H5O_loc_t *loc; /* The location of the object we're looking for */
+ hid_t lapl_id; /* LAPL for operations */
+ hid_t dxpl_id; /* DXPL for operations */
/* Out */
- char *path; /* Name of the object */
+ char *path; /* Name of the object */
} H5G_gnba_iter_t;
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static htri_t H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r);
+static htri_t H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r);
static H5RS_str_t *H5G_build_fullpath(const char *prefix, const char *name);
#ifdef NOT_YET
static H5RS_str_t *H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r);
#endif /* NOT_YET */
-static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr,
- const char *full_suffix, const char *src_path, const char *dst_path);
-static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
-
+static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path,
+ const char *dst_path);
+static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
/*********************/
/* Package Variables */
@@ -98,18 +93,14 @@ static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
/* Declare extern the PQ free list for the wrapped strings */
H5FL_BLK_EXTERN(str_buf);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G__component
*
@@ -123,7 +114,6 @@ H5FL_BLK_EXTERN(str_buf);
* Failure: Ptr to the null terminator of NAME.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -143,7 +133,6 @@ H5G__component(const char *name, size_t *size_p)
FUNC_LEAVE_NOAPI(name)
} /* end H5G__component() */
-
/*-------------------------------------------------------------------------
* Function: H5G_normalize
*
@@ -161,10 +150,10 @@ H5G__component(const char *name, size_t *size_p)
char *
H5G_normalize(const char *name)
{
- char *norm; /* Pointer to the normalized string */
- size_t s,d; /* Positions within the strings */
- unsigned last_slash; /* Flag to indicate last character was a slash */
- char *ret_value; /* Return value */
+ char * norm; /* Pointer to the normalized string */
+ size_t s, d; /* Positions within the strings */
+ unsigned last_slash; /* Flag to indicate last character was a slash */
+ char * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -172,22 +161,22 @@ H5G_normalize(const char *name)
HDassert(name);
/* Duplicate the name, to return */
- if(NULL == (norm = H5MM_strdup(name)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string")
+ if (NULL == (norm = H5MM_strdup(name)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string")
/* Walk through the characters, omitting duplicated '/'s */
- s = d = 0;
+ s = d = 0;
last_slash = 0;
- while(name[s] != '\0') {
- if(name[s] == '/')
- if(last_slash)
+ while (name[s] != '\0') {
+ if (name[s] == '/')
+ if (last_slash)
;
else {
- norm[d++] = name[s];
+ norm[d++] = name[s];
last_slash = 1;
} /* end else */
else {
- norm[d++] = name[s];
+ norm[d++] = name[s];
last_slash = 0;
} /* end else */
s++;
@@ -197,7 +186,7 @@ H5G_normalize(const char *name)
norm[d] = '\0';
/* Check for final '/' on normalized name & eliminate it */
- if(d > 1 && last_slash)
+ if (d > 1 && last_slash)
norm[d - 1] = '\0';
/* Set return value */
@@ -207,7 +196,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_normalize() */
-
/*-------------------------------------------------------------------------
* Function: H5G_common_path
*
@@ -216,7 +204,7 @@ done:
* Return: TRUE for valid prefix, FALSE for not a valid prefix, FAIL
* on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: September 24, 2002
*
@@ -225,37 +213,37 @@ done:
static htri_t
H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
{
- const char *fullpath; /* Pointer to actual fullpath string */
- const char *prefix; /* Pointer to actual prefix string */
- size_t nchars1,nchars2; /* Number of characters in components */
- htri_t ret_value=FALSE; /* Return value */
+ const char *fullpath; /* Pointer to actual fullpath string */
+ const char *prefix; /* Pointer to actual prefix string */
+ size_t nchars1, nchars2; /* Number of characters in components */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get component of each name */
- fullpath=H5RS_get_str(fullpath_r);
+ fullpath = H5RS_get_str(fullpath_r);
HDassert(fullpath);
- fullpath=H5G__component(fullpath,&nchars1);
+ fullpath = H5G__component(fullpath, &nchars1);
HDassert(fullpath);
- prefix=H5RS_get_str(prefix_r);
+ prefix = H5RS_get_str(prefix_r);
HDassert(prefix);
- prefix=H5G__component(prefix,&nchars2);
+ prefix = H5G__component(prefix, &nchars2);
HDassert(prefix);
/* Check if we have a real string for each component */
- while(*fullpath && *prefix) {
+ while (*fullpath && *prefix) {
/* Check that the components we found are the same length */
- if(nchars1==nchars2) {
+ if (nchars1 == nchars2) {
/* Check that the two components are equal */
- if(HDstrncmp(fullpath,prefix,nchars1)==0) {
+ if (HDstrncmp(fullpath, prefix, nchars1) == 0) {
/* Advance the pointers in the names */
- fullpath+=nchars1;
- prefix+=nchars2;
+ fullpath += nchars1;
+ prefix += nchars2;
/* Get next component of each name */
- fullpath=H5G__component(fullpath,&nchars1);
+ fullpath = H5G__component(fullpath, &nchars1);
HDassert(fullpath);
- prefix=H5G__component(prefix,&nchars2);
+ prefix = H5G__component(prefix, &nchars2);
HDassert(prefix);
} /* end if */
else
@@ -266,14 +254,13 @@ H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
} /* end while */
/* If we reached the end of the prefix path to check, it must be a valid prefix */
- if(*prefix=='\0')
- ret_value=TRUE;
+ if (*prefix == '\0')
+ ret_value = TRUE;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_common_path() */
-
/*-------------------------------------------------------------------------
* Function: H5G_build_fullpath
*
@@ -281,7 +268,7 @@ done:
*
* Return: Pointer to reference counted string on success, NULL on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: August 19, 2005
*
@@ -290,12 +277,12 @@ done:
static H5RS_str_t *
H5G_build_fullpath(const char *prefix, const char *name)
{
- char *full_path; /* Full user path built */
- size_t orig_path_len; /* Original length of the path */
- size_t path_len; /* Length of the path */
- size_t name_len; /* Length of the name */
- unsigned need_sep; /* Flag to indicate if separator is needed */
- H5RS_str_t *ret_value; /* Return value */
+ char * full_path; /* Full user path built */
+ size_t orig_path_len; /* Original length of the path */
+ size_t path_len; /* Length of the path */
+ size_t name_len; /* Length of the name */
+ unsigned need_sep; /* Flag to indicate if separator is needed */
+ H5RS_str_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -307,7 +294,7 @@ H5G_build_fullpath(const char *prefix, const char *name)
orig_path_len = path_len = HDstrlen(prefix);
/* Determine if there is a trailing separator in the name */
- if(prefix[path_len - 1] == '/')
+ if (prefix[path_len - 1] == '/')
need_sep = 0;
else
need_sep = 1;
@@ -317,24 +304,23 @@ H5G_build_fullpath(const char *prefix, const char *name)
path_len += name_len + need_sep;
/* Allocate space for the path */
- if(NULL == (full_path = (char *)H5FL_BLK_MALLOC(str_buf, path_len + 1)))
+ if (NULL == (full_path = (char *)H5FL_BLK_MALLOC(str_buf, path_len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Build full path */
HDstrncpy(full_path, prefix, orig_path_len + 1);
- if(need_sep)
+ if (need_sep)
HDstrncat(full_path, "/", (size_t)1);
HDstrncat(full_path, name, name_len);
/* Create reference counted string for path */
- if(NULL == (ret_value = H5RS_own(full_path)))
+ if (NULL == (ret_value = H5RS_own(full_path)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_build_fullpath() */
-
/*-------------------------------------------------------------------------
* Function: H5G_build_fullpath_refstr_str
*
@@ -343,7 +329,7 @@ done:
* Return: Success: Non-NULL, combined path
* Failure: NULL
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
* Tuesday, October 11, 2005
*
*-------------------------------------------------------------------------
@@ -351,8 +337,8 @@ done:
H5RS_str_t *
H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
{
- const char *prefix; /* Pointer to raw string for path */
- H5RS_str_t *ret_value;
+ const char *prefix; /* Pointer to raw string for path */
+ H5RS_str_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -370,7 +356,7 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
} /* end H5G_build_fullpath_refstr_str() */
#ifdef NOT_YET
-
+
/*-------------------------------------------------------------------------
* Function: H5G_name_build_refstr_refstr
*
@@ -379,7 +365,7 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
*
* Return: Pointer to reference counted string on success, NULL on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: August 19, 2005
*
@@ -388,9 +374,9 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
static H5RS_str_t *
H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r)
{
- const char *prefix; /* Pointer to raw string of prefix */
- const char *name; /* Pointer to raw string of name */
- H5RS_str_t *ret_value; /* Return value */
+ const char *prefix; /* Pointer to raw string of prefix */
+ const char *name; /* Pointer to raw string of name */
+ H5RS_str_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -407,7 +393,6 @@ H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *n
} /* end H5G_build_fullpath_refstr_refstr() */
#endif /* NOT_YET */
-
/*-------------------------------------------------------------------------
* Function: H5G__name_init
*
@@ -439,7 +424,6 @@ H5G__name_init(H5G_name_t *name, const char *path)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__name_init() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_set
*
@@ -448,7 +432,7 @@ H5G__name_init(H5G_name_t *name, const char *path)
* Return: Success: Non-negative
* Failure: Negative
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* Thursday, August 22, 2002
*
*-------------------------------------------------------------------------
@@ -456,7 +440,7 @@ H5G__name_init(H5G_name_t *name, const char *path)
herr_t
H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -468,16 +452,16 @@ H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name)
H5G_name_free(obj);
/* Create the object's full path, if a full path exists in the location */
- if(loc->full_path_r) {
+ if (loc->full_path_r) {
/* Go build the new full path */
- if((obj->full_path_r = H5G_build_fullpath_refstr_str(loc->full_path_r, name)) == NULL)
+ if ((obj->full_path_r = H5G_build_fullpath_refstr_str(loc->full_path_r, name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name")
} /* end if */
/* Create the object's user path, if a user path exists in the location */
- if(loc->user_path_r) {
+ if (loc->user_path_r) {
/* Go build the new user path */
- if((obj->user_path_r = H5G_build_fullpath_refstr_str(loc->user_path_r, name)) == NULL)
+ if ((obj->user_path_r = H5G_build_fullpath_refstr_str(loc->user_path_r, name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name")
} /* end if */
@@ -485,7 +469,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_name_set() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_copy
*
@@ -527,10 +510,11 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
HDmemcpy(dst, src, sizeof(H5G_name_t));
/* Deep copy the names */
- if(depth == H5_COPY_DEEP) {
+ if (depth == H5_COPY_DEEP) {
dst->full_path_r = H5RS_dup(src->full_path_r);
dst->user_path_r = H5RS_dup(src->user_path_r);
- } else {
+ }
+ else {
/* Discarding 'const' qualifier OK - QAK */
H5G_name_reset((H5G_name_t *)src);
} /* end if */
@@ -538,7 +522,6 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_name
*
@@ -552,18 +535,14 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
* Programmer: Quincey Koziol
* Tuesday, December 13, 2005
*
- * Modifications: Leon Arber
- * Oct. 18, 2006
- * Added functionality to get the name for a reference.
- *
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
- hbool_t *cached, hid_t lapl_id, hid_t dxpl_id)
+H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, hbool_t *cached, hid_t lapl_id,
+ hid_t dxpl_id)
{
- ssize_t len = 0; /* Length of object's name */
- ssize_t ret_value; /* Return value */
+ ssize_t len = 0; /* Length of object's name */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -571,40 +550,40 @@ H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
HDassert(loc);
/* If the user path is available and it's not "hidden", use it */
- if(loc->path->user_path_r != NULL && loc->path->obj_hidden == 0) {
+ if (loc->path->user_path_r != NULL && loc->path->obj_hidden == 0) {
len = H5RS_len(loc->path->user_path_r);
- if(name) {
+ if (name) {
HDstrncpy(name, H5RS_get_str(loc->path->user_path_r), MIN((size_t)(len + 1), size));
- if((size_t)len >= size)
+ if ((size_t)len >= size)
name[size - 1] = '\0';
} /* end if */
/* Indicate that the name is cached, if requested */
/* (Currently only used for testing - QAK, 2010/07/26) */
- if(cached)
+ if (cached)
*cached = TRUE;
} /* end if */
- else if(!loc->path->obj_hidden) {
- hid_t file;
+ else if (!loc->path->obj_hidden) {
+ hid_t file;
/* Retrieve file ID for name search */
- if((file = H5F_get_id(loc->oloc->file, FALSE)) < 0)
+ if ((file = H5F_get_id(loc->oloc->file, FALSE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get file ID")
/* Search for name of object */
- if((len = H5G_get_name_by_addr(file, lapl_id, dxpl_id, loc->oloc, name, size)) < 0) {
+ if ((len = H5G_get_name_by_addr(file, lapl_id, dxpl_id, loc->oloc, name, size)) < 0) {
H5I_dec_ref(file);
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name")
} /* end if */
/* Close file ID used for search */
- if(H5I_dec_ref(file) < 0)
+ if (H5I_dec_ref(file) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCLOSEFILE, FAIL, "can't determine name")
/* Indicate that the name is _not_ cached, if requested */
/* (Currently only used for testing - QAK, 2010/07/26) */
- if(cached)
+ if (cached)
*cached = FALSE;
} /* end else */
@@ -615,7 +594,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_name() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_reset
*
@@ -643,7 +621,6 @@ H5G_name_reset(H5G_name_t *name)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_free
*
@@ -651,7 +628,7 @@ H5G_name_reset(H5G_name_t *name)
*
* Return: Success
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: August 22, 2002
*
@@ -665,11 +642,11 @@ H5G_name_free(H5G_name_t *name)
/* Check args */
HDassert(name);
- if(name->full_path_r) {
+ if (name->full_path_r) {
H5RS_decr(name->full_path_r);
name->full_path_r = NULL;
} /* end if */
- if(name->user_path_r) {
+ if (name->user_path_r) {
H5RS_decr(name->user_path_r);
name->user_path_r = NULL;
} /* end if */
@@ -678,7 +655,6 @@ H5G_name_free(H5G_name_t *name)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_free() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_move_path
*
@@ -694,12 +670,12 @@ H5G_name_free(H5G_name_t *name)
*/
static herr_t
H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path,
- const char *dst_path)
+ const char *dst_path)
{
- const char *path; /* Path to update */
- size_t path_len; /* Length of path */
- size_t full_suffix_len; /* Length of full suffix */
- herr_t ret_value = SUCCEED; /* Return value */
+ const char *path; /* Path to update */
+ size_t path_len; /* Length of path */
+ size_t full_suffix_len; /* Length of full suffix */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -715,31 +691,30 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
/* Check if path needs to be updated */
full_suffix_len = HDstrlen(full_suffix);
- path_len = HDstrlen(path);
- if(full_suffix_len < path_len) {
- const char *dst_suffix; /* Destination suffix that changes */
- size_t dst_suffix_len; /* Length of destination suffix */
- const char *src_suffix; /* Source suffix that changes */
- size_t path_prefix_len; /* Length of path prefix */
- const char *path_prefix2; /* 2nd prefix for path */
- size_t path_prefix2_len; /* Length of 2nd path prefix */
- const char *common_prefix; /* Common prefix for src & dst paths */
- size_t common_prefix_len; /* Length of common prefix */
- char *new_path; /* Pointer to new path */
- size_t new_path_len; /* Length of new path */
-
+ path_len = HDstrlen(path);
+ if (full_suffix_len < path_len) {
+ const char *dst_suffix; /* Destination suffix that changes */
+ size_t dst_suffix_len; /* Length of destination suffix */
+ const char *src_suffix; /* Source suffix that changes */
+ size_t path_prefix_len; /* Length of path prefix */
+ const char *path_prefix2; /* 2nd prefix for path */
+ size_t path_prefix2_len; /* Length of 2nd path prefix */
+ const char *common_prefix; /* Common prefix for src & dst paths */
+ size_t common_prefix_len; /* Length of common prefix */
+ char * new_path; /* Pointer to new path */
+ size_t new_path_len; /* Length of new path */
/* Compute path prefix before full suffix*/
path_prefix_len = path_len - full_suffix_len;
/* Determine the common prefix for src & dst paths */
- common_prefix = src_path;
+ common_prefix = src_path;
common_prefix_len = 0;
/* Find first character that is different */
- while(*(src_path + common_prefix_len) == *(dst_path + common_prefix_len))
+ while (*(src_path + common_prefix_len) == *(dst_path + common_prefix_len))
common_prefix_len++;
/* Back up to previous '/' */
- while(*(common_prefix + common_prefix_len) != '/')
+ while (*(common_prefix + common_prefix_len) != '/')
common_prefix_len--;
/* Include '/' */
common_prefix_len++;
@@ -748,26 +723,26 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
src_suffix = src_path + (common_prefix_len - 1);
/* Determine destination suffix */
- dst_suffix = dst_path + (common_prefix_len - 1);
+ dst_suffix = dst_path + (common_prefix_len - 1);
dst_suffix_len = HDstrlen(dst_suffix);
/* Compute path prefix before src suffix*/
- path_prefix2 = path;
+ path_prefix2 = path;
path_prefix2_len = path_prefix_len - HDstrlen(src_suffix);
/* Allocate space for the new path */
new_path_len = path_prefix2_len + dst_suffix_len + full_suffix_len;
- if(NULL == (new_path = (char *)H5FL_BLK_MALLOC(str_buf, new_path_len + 1)))
+ if (NULL == (new_path = (char *)H5FL_BLK_MALLOC(str_buf, new_path_len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Create the new path */
- if(path_prefix2_len > 0) {
+ if (path_prefix2_len > 0) {
HDstrncpy(new_path, path_prefix2, path_prefix2_len + 1);
HDstrncpy(new_path + path_prefix2_len, dst_suffix, dst_suffix_len + 1);
} /* end if */
else
HDstrncpy(new_path, dst_suffix, dst_suffix_len + 1);
- if(full_suffix_len > 0)
+ if (full_suffix_len > 0)
HDstrncat(new_path, full_suffix, full_suffix_len);
/* Release previous path */
@@ -781,7 +756,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_name_move_path() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_replace_cb
*
@@ -789,7 +763,7 @@ done:
*
* Return: Success: 0, Failure: -1
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: June 5, 2002
*
@@ -798,35 +772,35 @@ done:
static int
H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
{
- const H5G_names_t *names = (const H5G_names_t *)key; /* Get operation's information */
- H5O_loc_t *oloc; /* Object location for object that the ID refers to */
- H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
- H5F_t *top_obj_file; /* Top file in object's mounted file hier. */
- hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5G_names_t *names = (const H5G_names_t *)key; /* Get operation's information */
+ H5O_loc_t * oloc; /* Object location for object that the ID refers to */
+ H5G_name_t * obj_path; /* Pointer to group hier. path for obj */
+ H5F_t * top_obj_file; /* Top file in object's mounted file hier. */
+ hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_ptr);
/* Get the symbol table entry */
- switch(H5I_get_type(obj_id)) {
+ switch (H5I_get_type(obj_id)) {
case H5I_GROUP:
- oloc = H5G_oloc((H5G_t *)obj_ptr);
+ oloc = H5G_oloc((H5G_t *)obj_ptr);
obj_path = H5G_nameof((H5G_t *)obj_ptr);
break;
case H5I_DATASET:
- oloc = H5D_oloc((H5D_t *)obj_ptr);
+ oloc = H5D_oloc((H5D_t *)obj_ptr);
obj_path = H5D_nameof((H5D_t *)obj_ptr);
break;
case H5I_DATATYPE:
/* Avoid non-named datatypes */
- if(!H5T_is_named((H5T_t *)obj_ptr))
- HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */
+ if (!H5T_is_named((H5T_t *)obj_ptr))
+ HGOTO_DONE(SUCCEED) /* Do not exit search over IDs */
- oloc = H5T_oloc((H5T_t *)obj_ptr);
+ oloc = H5T_oloc((H5T_t *)obj_ptr);
obj_path = H5T_nameof((H5T_t *)obj_ptr);
break;
@@ -850,60 +824,60 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
HDassert(obj_path);
/* Check if the object has a full path still */
- if(!obj_path->full_path_r)
- HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
+ if (!obj_path->full_path_r)
+ HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
/* Find the top file in object's mount hier. */
- if(H5F_PARENT(oloc->file)) {
+ if (H5F_PARENT(oloc->file)) {
/* Check if object is in child file (for mount & unmount operations) */
- if(names->dst_file && H5F_SAME_SHARED(oloc->file, names->dst_file))
+ if (names->dst_file && H5F_SAME_SHARED(oloc->file, names->dst_file))
obj_in_child = TRUE;
/* Find the "top" file in the chain of mounted files */
top_obj_file = H5F_PARENT(oloc->file);
- while(H5F_PARENT(top_obj_file) != NULL) {
+ while (H5F_PARENT(top_obj_file) != NULL) {
/* Check if object is in child mount hier. (for mount & unmount operations) */
- if(names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
+ if (names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
obj_in_child = TRUE;
top_obj_file = H5F_PARENT(top_obj_file);
} /* end while */
- } /* end if */
+ } /* end if */
else
top_obj_file = oloc->file;
/* Check if object is in top of child mount hier. (for mount & unmount operations) */
- if(names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
+ if (names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
obj_in_child = TRUE;
/* Check if the object is in same file mount hier. */
- if(!H5F_SAME_SHARED(top_obj_file, names->src_file))
- HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
+ if (!H5F_SAME_SHARED(top_obj_file, names->src_file))
+ HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
- switch(names->op) {
+ switch (names->op) {
/*-------------------------------------------------------------------------
* H5G_NAME_MOUNT
*-------------------------------------------------------------------------
*/
case H5G_NAME_MOUNT:
/* Check if object is in child mount hier. */
- if(obj_in_child) {
- const char *full_path; /* Full path of current object */
- const char *src_path; /* Full path of source object */
- size_t src_path_len; /* Length of source full path */
- char *new_full_path; /* New full path of object */
- size_t new_full_len; /* Length of new full path */
+ if (obj_in_child) {
+ const char *full_path; /* Full path of current object */
+ const char *src_path; /* Full path of source object */
+ size_t src_path_len; /* Length of source full path */
+ char * new_full_path; /* New full path of object */
+ size_t new_full_len; /* Length of new full path */
/* Get pointers to paths of interest */
- full_path = H5RS_get_str(obj_path->full_path_r);
- src_path = H5RS_get_str(names->src_full_path_r);
+ full_path = H5RS_get_str(obj_path->full_path_r);
+ src_path = H5RS_get_str(names->src_full_path_r);
src_path_len = HDstrlen(src_path);
/* Build new full path */
/* Allocate space for the new full path */
new_full_len = src_path_len + HDstrlen(full_path);
- if(NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1)))
+ if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Create the new full path */
@@ -920,12 +894,12 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
else {
/* Check if the source is along the entry's path */
/* (But not actually the entry itself) */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
- H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
+ if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
+ H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
/* Hide the user path */
(obj_path->obj_hidden)++;
} /* end if */
- } /* end else */
+ } /* end else */
break;
/*-------------------------------------------------------------------------
@@ -933,25 +907,25 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
*-------------------------------------------------------------------------
*/
case H5G_NAME_UNMOUNT:
- if(obj_in_child) {
- const char *full_path; /* Full path of current object */
- const char *full_suffix; /* Full path after source path */
- size_t full_suffix_len; /* Length of full path after source path */
- const char *src_path; /* Full path of source object */
- char *new_full_path; /* New full path of object */
+ if (obj_in_child) {
+ const char *full_path; /* Full path of current object */
+ const char *full_suffix; /* Full path after source path */
+ size_t full_suffix_len; /* Length of full path after source path */
+ const char *src_path; /* Full path of source object */
+ char * new_full_path; /* New full path of object */
/* Get pointers to paths of interest */
full_path = H5RS_get_str(obj_path->full_path_r);
- src_path = H5RS_get_str(names->src_full_path_r);
+ src_path = H5RS_get_str(names->src_full_path_r);
/* Construct full path suffix */
- full_suffix = full_path + HDstrlen(src_path);
+ full_suffix = full_path + HDstrlen(src_path);
full_suffix_len = HDstrlen(full_suffix);
/* Build new full path */
/* Create the new full path */
- if(NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, full_suffix_len + 1)))
+ if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, full_suffix_len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
HDstrncpy(new_full_path, full_suffix, full_suffix_len + 1);
@@ -962,20 +936,21 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
obj_path->full_path_r = H5RS_own(new_full_path);
/* Check if the object's user path should be invalidated */
- if(obj_path->user_path_r && HDstrlen(new_full_path) < (size_t)H5RS_len(obj_path->user_path_r)) {
+ if (obj_path->user_path_r &&
+ HDstrlen(new_full_path) < (size_t)H5RS_len(obj_path->user_path_r)) {
/* Free user path */
H5RS_decr(obj_path->user_path_r);
obj_path->user_path_r = NULL;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Check if file being unmounted was hiding the object */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
- H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
+ if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
+ H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
/* Un-hide the user path */
(obj_path->obj_hidden)--;
} /* end if */
- } /* end else */
+ } /* end else */
break;
/*-------------------------------------------------------------------------
@@ -984,7 +959,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
*/
case H5G_NAME_DELETE:
/* Check if the location being unlinked is in the path for the current object */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
+ if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
/* Free paths for object */
H5G_name_free(obj_path);
} /* end if */
@@ -996,23 +971,23 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
*/
case H5G_NAME_MOVE: /* Link move case, check for relative names case */
/* Check if the src object moved is in the current object's path */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
- const char *full_path; /* Full path of current object */
- const char *full_suffix; /* Suffix of full path, after src_path */
- size_t full_suffix_len; /* Length of suffix of full path after src_path*/
- char *new_full_path; /* New full path of object */
- size_t new_full_len; /* Length of new full path */
- const char *src_path; /* Full path of source object */
- const char *dst_path; /* Full path of destination object */
- size_t dst_path_len; /* Length of destination's full path */
+ if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
+ const char *full_path; /* Full path of current object */
+ const char *full_suffix; /* Suffix of full path, after src_path */
+ size_t full_suffix_len; /* Length of suffix of full path after src_path*/
+ char * new_full_path; /* New full path of object */
+ size_t new_full_len; /* Length of new full path */
+ const char *src_path; /* Full path of source object */
+ const char *dst_path; /* Full path of destination object */
+ size_t dst_path_len; /* Length of destination's full path */
/* Sanity check */
HDassert(names->dst_full_path_r);
/* Get pointers to paths of interest */
- full_path = H5RS_get_str(obj_path->full_path_r);
- src_path = H5RS_get_str(names->src_full_path_r);
- dst_path = H5RS_get_str(names->dst_full_path_r);
+ full_path = H5RS_get_str(obj_path->full_path_r);
+ src_path = H5RS_get_str(names->src_full_path_r);
+ dst_path = H5RS_get_str(names->dst_full_path_r);
dst_path_len = HDstrlen(dst_path);
/* Make certain that the source and destination names are full (not relative) paths */
@@ -1020,19 +995,19 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
HDassert(*dst_path == '/');
/* Get pointer to "full suffix" */
- full_suffix = full_path + HDstrlen(src_path);
+ full_suffix = full_path + HDstrlen(src_path);
full_suffix_len = HDstrlen(full_suffix);
/* Update the user path, if one exists */
- if(obj_path->user_path_r)
- if(H5G_name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0)
+ if (obj_path->user_path_r)
+ if (H5G_name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0)
HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name")
/* Build new full path */
/* Allocate space for the new full path */
new_full_len = dst_path_len + full_suffix_len;
- if(NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1)))
+ if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Create the new full path */
@@ -1055,7 +1030,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5G_name_replace_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_name_replace
*
@@ -1068,16 +1042,15 @@ done:
*
* Return: Success: 0, Failure: -1
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: June 11, 2002
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
- H5RS_str_t *src_full_path_r, H5F_t *dst_file, H5RS_str_t *dst_full_path_r,
- hid_t dxpl_id)
+H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS_str_t *src_full_path_r,
+ H5F_t *dst_file, H5RS_str_t *dst_full_path_r, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED;
@@ -1087,53 +1060,52 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
HDassert(src_file);
/* Check if the object we are manipulating has a path */
- if(src_full_path_r) {
- hbool_t search_group = FALSE; /* Flag to indicate that groups are to be searched */
- hbool_t search_dataset = FALSE; /* Flag to indicate that datasets are to be searched */
+ if (src_full_path_r) {
+ hbool_t search_group = FALSE; /* Flag to indicate that groups are to be searched */
+ hbool_t search_dataset = FALSE; /* Flag to indicate that datasets are to be searched */
hbool_t search_datatype = FALSE; /* Flag to indicate that datatypes are to be searched */
/* Check for particular link to operate on */
- if(lnk) {
+ if (lnk) {
/* Look up the object type for each type of link */
- switch(lnk->type) {
- case H5L_TYPE_HARD:
- {
- H5O_loc_t tmp_oloc; /* Temporary object location */
- H5O_type_t obj_type; /* Type of object at location */
-
- /* Build temporary object location */
- tmp_oloc.file = src_file;
- tmp_oloc.addr = lnk->u.hard.addr;
-
- /* Get the type of the object */
- if(H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
-
- /* Determine which type of objects to operate on */
- switch(obj_type) {
- case H5O_TYPE_GROUP:
- /* Search and replace names through group IDs */
- search_group = TRUE;
- break;
-
- case H5O_TYPE_DATASET:
- /* Search and replace names through dataset IDs */
- search_dataset = TRUE;
- break;
-
- case H5O_TYPE_NAMED_DATATYPE:
- /* Search and replace names through datatype IDs */
- search_datatype = TRUE;
- break;
-
- case H5O_TYPE_UNKNOWN:
- case H5O_TYPE_NTYPES:
- /* Search and replace names through datatype IDs */
- default:
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not valid object type")
- } /* end switch */
- } /* end case */
- break;
+ switch (lnk->type) {
+ case H5L_TYPE_HARD: {
+ H5O_loc_t tmp_oloc; /* Temporary object location */
+ H5O_type_t obj_type; /* Type of object at location */
+
+ /* Build temporary object location */
+ tmp_oloc.file = src_file;
+ tmp_oloc.addr = lnk->u.hard.addr;
+
+ /* Get the type of the object */
+ if (H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
+
+ /* Determine which type of objects to operate on */
+ switch (obj_type) {
+ case H5O_TYPE_GROUP:
+ /* Search and replace names through group IDs */
+ search_group = TRUE;
+ break;
+
+ case H5O_TYPE_DATASET:
+ /* Search and replace names through dataset IDs */
+ search_dataset = TRUE;
+ break;
+
+ case H5O_TYPE_NAMED_DATATYPE:
+ /* Search and replace names through datatype IDs */
+ search_datatype = TRUE;
+ break;
+
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
+ /* Search and replace names through datatype IDs */
+ default:
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not valid object type")
+ } /* end switch */
+ } /* end case */
+ break;
case H5L_TYPE_SOFT:
/* Symbolic links might resolve to any object, so we need to search all IDs */
@@ -1143,10 +1115,10 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
case H5L_TYPE_ERROR:
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
- default: /* User-defined link */
+ default: /* User-defined link */
/* Check for unknown library-defined link type */
- if(lnk->type < H5L_TYPE_UD_MIN)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown link type")
+ if (lnk->type < H5L_TYPE_UD_MIN)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown link type")
/* User-defined & external links automatically wipe out
* names (because it would be too much work to track them),
@@ -1154,73 +1126,71 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
*/
break;
} /* end switch */
- } /* end if */
+ } /* end if */
else {
/* We pass NULL as link pointer when we need to search all IDs */
search_group = search_dataset = search_datatype = TRUE;
- } /* end else */
+ }
/* Check if we need to operate on the objects affected */
- if(search_group || search_dataset || search_datatype) {
- H5G_names_t names; /* Structure to hold operation information for callback */
+ if (search_group || search_dataset || search_datatype) {
+ H5G_names_t names; /* Structure to hold operation information for callback */
/* Find top file in src location's mount hierarchy */
- while(H5F_PARENT(src_file))
+ while (H5F_PARENT(src_file))
src_file = H5F_PARENT(src_file);
/* Set up common information for callback */
- names.src_file = src_file;
+ names.src_file = src_file;
names.src_full_path_r = src_full_path_r;
- names.dst_file = dst_file;
+ names.dst_file = dst_file;
names.dst_full_path_r = dst_full_path_r;
- names.op = op;
+ names.op = op;
/* Search through group IDs */
- if(search_group)
- if(H5I_iterate(H5I_GROUP, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups")
+ if (search_group)
+ if (H5I_iterate(H5I_GROUP, H5G_name_replace_cb, &names, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups")
/* Search through dataset IDs */
- if(search_dataset)
- if(H5I_iterate(H5I_DATASET, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets")
+ if (search_dataset)
+ if (H5I_iterate(H5I_DATASET, H5G_name_replace_cb, &names, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets")
/* Search through datatype IDs */
- if(search_datatype)
- if(H5I_iterate(H5I_DATATYPE, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes")
+ if (search_datatype)
+ if (H5I_iterate(H5I_DATATYPE, H5G_name_replace_cb, &names, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_name_replace() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_name_by_addr_cb
*
* Purpose: Callback for retrieving object's name by address
*
* Return: Positive if path is for object desired
- * 0 if not correct object
- * negative on failure.
+ * 0 if not correct object
+ * negative on failure.
*
* Programmer: Quincey Koziol
- * November 4 2007
+ * November 4 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
- void *_udata)
+H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo, void *_udata)
{
H5G_gnba_iter_t *udata = (H5G_gnba_iter_t *)_udata; /* User data for iteration */
- H5G_loc_t obj_loc; /* Location of object */
- H5G_name_t obj_path; /* Object's group hier. path */
- H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'path' found */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ hbool_t obj_found = FALSE; /* Object at 'path' found */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1231,11 +1201,11 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
HDassert(udata->path == NULL);
/* Check for hard link with correct address */
- if(linfo->type == H5L_TYPE_HARD && udata->loc->addr == linfo->u.address) {
- H5G_loc_t grp_loc; /* Location of group */
+ if (linfo->type == H5L_TYPE_HARD && udata->loc->addr == linfo->u.address) {
+ H5G_loc_t grp_loc; /* Location of group */
/* Get group's location */
- if(H5G_loc(gid, &grp_loc) < 0)
+ if (H5G_loc(gid, &grp_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "bad group location")
/* Set up opened object location to fill in */
@@ -1244,38 +1214,38 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
H5G_loc_reset(&obj_loc);
/* Find the object */
- if(H5G_loc_find(&grp_loc, path, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
+ if (H5G_loc_find(&grp_loc, path, &obj_loc /*out*/, udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
obj_found = TRUE;
/* Check for object in same file (handles mounted files) */
/* (re-verify address, in case we traversed a file mount) */
- if(udata->loc->addr == obj_loc.oloc->addr && udata->loc->file == obj_loc.oloc->file) {
- if(NULL == (udata->path = H5MM_strdup(path)))
+ if (udata->loc->addr == obj_loc.oloc->addr && udata->loc->file == obj_loc.oloc->file) {
+ if (NULL == (udata->path = H5MM_strdup(path)))
HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, H5_ITER_ERROR, "can't duplicate path string")
/* We found a match so we return immediately */
HGOTO_DONE(H5_ITER_STOP)
} /* end if */
- } /* end if */
+ } /* end if */
done:
- if(obj_found && H5G_loc_free(&obj_loc) < 0)
+ if (obj_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_name_by_addr_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_get_name_by_addr
*
* Purpose: Tries to figure out the path to an object from it's address
*
- * Return: returns size of path name, and copies it into buffer
- * pointed to by name if that buffer is big enough.
- * 0 if it cannot find the path
- * negative on failure.
+ * Return: Success: Returns size of path name, and copies it into buffer
+ * pointed to by name if that buffer is big enough.
+ * 0 if it cannot find the path
+ *
+ * Failure: -1
*
* Programmer: Quincey Koziol
* November 4 2007
@@ -1283,61 +1253,61 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *loc,
- char *name, size_t size)
+H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *loc, char *name, size_t size)
{
- H5G_gnba_iter_t udata; /* User data for iteration */
- H5G_loc_t root_loc; /* Root group's location */
- hbool_t found_obj = FALSE; /* If we found the object */
- herr_t status; /* Status from iteration */
- ssize_t ret_value; /* Return value */
+ H5G_gnba_iter_t udata; /* User data for iteration */
+ H5G_loc_t root_loc; /* Root group's location */
+ hbool_t found_obj = FALSE; /* If we found the object */
+ herr_t status; /* Status from iteration */
+ ssize_t ret_value = -1; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
HDmemset(&udata, 0, sizeof(udata));
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
- /* Construct the link info for the file's root group */
- if(H5G_loc(file, &root_loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get root group's location")
+ /* Construct a group location for root group of the file */
+ if (H5G_loc(file, &root_loc) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, (-1), "can't get root group's location")
/* Check for root group being the object looked for */
- if(root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) {
- if(NULL == (udata.path = H5MM_strdup("")))
- HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string")
+ if (root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) {
+ if (NULL == (udata.path = H5MM_strdup("")))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, (-1), "can't duplicate path string")
found_obj = TRUE;
} /* end if */
else {
/* Set up user data for iterator */
- udata.loc = loc;
+ udata.loc = loc;
udata.lapl_id = lapl_id;
udata.dxpl_id = dxpl_id;
- udata.path = NULL;
+ udata.path = NULL;
/* Visit all the links in the file */
- if((status = H5G_visit(file, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata, lapl_id, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name")
- else if(status > 0)
+ if ((status = H5G_visit(file, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata,
+ lapl_id, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, (-1), "group traversal failed while looking for object name")
+ else if (status > 0)
found_obj = TRUE;
} /* end else */
/* Check for finding the object */
- if(found_obj) {
+ if (found_obj) {
/* Set the length of the full path */
- ret_value = (ssize_t)(HDstrlen(udata.path) + 1); /* Length of path + 1 (for "/") */
+ ret_value = (ssize_t)(HDstrlen(udata.path) + 1); /* Length of path + 1 (for "/") */
/* If there's a buffer provided, copy into it, up to the limit of its size */
- if(name) {
+ if (name) {
/* Copy the initial path separator */
HDstrncpy(name, "/", (size_t)2);
/* Append the rest of the path */
/* (less one character, for the initial path separator) */
HDstrncat(name, udata.path, (size - 2));
- if((size_t)ret_value >= size)
+ if ((size_t)ret_value >= size)
name[size - 1] = '\0';
} /* end if */
- } /* end if */
+ } /* end if */
else
ret_value = 0;
@@ -1347,4 +1317,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_name_by_addr() */
-
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 2c4b840..45735c8 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gnode.c
* Jun 26 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Functions for handling symbol table nodes. A
* symbol table node is a small collection of symbol
@@ -29,29 +29,26 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Ppublic.h" /* Property Lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Ppublic.h" /* Property Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -61,37 +58,32 @@
* nodes consists of this structure...
*/
typedef struct H5G_node_key_t {
- size_t offset; /*offset into heap for name */
+ size_t offset; /*offset into heap for name */
} H5G_node_key_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* B-tree callbacks */
-static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata);
-static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key,
- void *_udata, void *_rt_key, haddr_t *addr_p/*out*/);
-static int H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key);
-static int H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static htri_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key,
- void *_udata);
+static H5RC_t * H5G_node_get_shared(const H5F_t *f, const void *_udata);
+static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata,
+ void *_rt_key, haddr_t *addr_p /*out*/);
+static int H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key);
+static int H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key);
+static htri_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, void *_udata);
static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
- hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
- hbool_t *rt_key_changed, haddr_t *new_node_p/*out*/);
-static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *lt_key,
- hbool_t *lt_key_changed, void *udata, void *rt_key, hbool_t *rt_key_changed);
-static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
-static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
-static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth,
- const void *key, const void *udata);
-
+ hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
+ hbool_t *rt_key_changed, haddr_t *new_node_p /*out*/);
+static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *lt_key, hbool_t *lt_key_changed,
+ void *udata, void *rt_key, hbool_t *rt_key_changed);
+static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
+static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
+static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *key, const void *udata);
/*********************/
/* Package Variables */
@@ -99,21 +91,21 @@ static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth,
/* H5G inherits B-tree like properties from H5B */
H5B_class_t H5B_SNODE[1] = {{
- H5B_SNODE_ID, /*id */
- sizeof(H5G_node_key_t), /*sizeof_nkey */
- H5G_node_get_shared, /*get_shared */
- H5G_node_create, /*new */
- H5G_node_cmp2, /*cmp2 */
- H5G_node_cmp3, /*cmp3 */
- H5G_node_found, /*found */
- H5G_node_insert, /*insert */
- TRUE, /*follow min branch? */
- TRUE, /*follow max branch? */
- H5B_RIGHT, /*critical key */
- H5G_node_remove, /*remove */
- H5G_node_decode_key, /*decode */
- H5G_node_encode_key, /*encode */
- H5G_node_debug_key /*debug */
+ H5B_SNODE_ID, /*id */
+ sizeof(H5G_node_key_t), /*sizeof_nkey */
+ H5G_node_get_shared, /*get_shared */
+ H5G_node_create, /*new */
+ H5G_node_cmp2, /*cmp2 */
+ H5G_node_cmp3, /*cmp3 */
+ H5G_node_found, /*found */
+ H5G_node_insert, /*insert */
+ TRUE, /*follow min branch? */
+ TRUE, /*follow max branch? */
+ H5B_RIGHT, /*critical key */
+ H5G_node_remove, /*remove */
+ H5G_node_decode_key, /*decode */
+ H5G_node_encode_key, /*encode */
+ H5G_node_debug_key /*debug */
}};
/* Declare a free list to manage the H5G_node_t struct */
@@ -122,17 +114,14 @@ H5FL_DEFINE(H5G_node_t);
/* Declare a free list to manage sequences of H5G_entry_t's */
H5FL_SEQ_DEFINE(H5G_entry_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5G_node_get_shared
*
@@ -145,8 +134,6 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5RC_t *
@@ -160,7 +147,6 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
FUNC_LEAVE_NOAPI(H5F_GRP_BTREE_SHARED(f))
} /* end H5G_node_get_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_decode_key
*
@@ -169,7 +155,6 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -177,7 +162,7 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
static herr_t
H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
- H5G_node_key_t *key = (H5G_node_key_t *) _key;
+ H5G_node_key_t *key = (H5G_node_key_t *)_key;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -190,7 +175,6 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_node_decode_key() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_encode_key
*
@@ -199,7 +183,6 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -207,7 +190,7 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
static herr_t
H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
- const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
+ const H5G_node_key_t *key = (const H5G_node_key_t *)_key;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -220,7 +203,6 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_node_encode_key() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_debug_key
*
@@ -234,25 +216,23 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
- const void *_udata)
+H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, const void *_udata)
{
- const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
- const H5G_bt_common_t *udata = (const H5G_bt_common_t *) _udata;
+ const H5G_node_key_t * key = (const H5G_node_key_t *)_key;
+ const H5G_bt_common_t *udata = (const H5G_bt_common_t *)_udata;
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(key);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:",
- (unsigned)key->offset);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset);
- if(udata->heap) {
+ if (udata->heap) {
const char *s;
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:");
- if((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL)
+ if ((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL)
HDfprintf(stream, "%s\n", s);
} /* end if */
else
@@ -261,7 +241,6 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_node_debug_key() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_free
*
@@ -270,7 +249,6 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -288,14 +266,13 @@ H5G__node_free(H5G_node_t *sym)
/* Verify that node is clean */
HDassert(sym->cache_info.is_dirty == FALSE);
- if(sym->entry)
+ if (sym->entry)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t, sym->entry);
sym = H5FL_FREE(H5G_node_t, sym);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__node_free() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_create
*
@@ -310,19 +287,18 @@ H5G__node_free(H5G_node_t *sym)
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key,
- void H5_ATTR_UNUSED *_udata, void *_rt_key, haddr_t *addr_p/*out*/)
+ void H5_ATTR_UNUSED *_udata, void *_rt_key, haddr_t *addr_p /*out*/)
{
- H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key;
- H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
- H5G_node_t *sym = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key;
+ H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
+ H5G_node_t * sym = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -332,15 +308,15 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_
HDassert(f);
HDassert(H5B_INS_FIRST == op);
- if(NULL == (sym = H5FL_CALLOC(H5G_node_t)))
+ if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
sym->node_size = H5G_NODE_SIZE(f);
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)sym->node_size)))
+ if (HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)sym->node_size)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space")
- if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
+ if (NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed")
- if(H5AC_insert_entry(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node")
/*
* The left and right symbols in an empty tree are both the
@@ -348,24 +324,23 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_
* allows the comparison functions to work correctly without knowing
* that there are no symbols.
*/
- if(lt_key)
+ if (lt_key)
lt_key->offset = 0;
- if(rt_key)
+ if (rt_key)
rt_key->offset = 0;
done:
- if(ret_value < 0) {
- if(sym != NULL) {
- if(sym->entry != NULL)
+ if (ret_value < 0) {
+ if (sym != NULL) {
+ if (sym->entry != NULL)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t, sym->entry);
sym = H5FL_FREE(H5G_node_t, sym);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_create() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_cmp2
*
@@ -382,21 +357,18 @@ done:
* Failure: FAIL (same as LT_KEY<RT_KEY)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
{
- H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata;
- H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
- H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key;
- const char *s1, *s2;
- int ret_value = SUCCEED; /* Return value */
+ H5G_bt_common_t *udata = (H5G_bt_common_t *)_udata;
+ H5G_node_key_t * lt_key = (H5G_node_key_t *)_lt_key;
+ H5G_node_key_t * rt_key = (H5G_node_key_t *)_rt_key;
+ const char * s1, *s2;
+ int ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -406,9 +378,9 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
HDassert(rt_key);
/* Get pointers to string names */
- if((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
+ if ((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name")
- if((s2 = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL)
+ if ((s2 = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name")
/* Set return value */
@@ -418,7 +390,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5G_node_cmp2() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_cmp3
*
@@ -439,21 +410,18 @@ done:
* Failure: FAIL (same as UDATA < LT_KEY)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
{
- H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata;
- H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
- H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key;
- const char *s;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_bt_common_t *udata = (H5G_bt_common_t *)_udata;
+ H5G_node_key_t * lt_key = (H5G_node_key_t *)_lt_key;
+ H5G_node_key_t * rt_key = (H5G_node_key_t *)_rt_key;
+ const char * s;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -463,15 +431,15 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
HDassert(rt_key);
/* left side */
- if((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
+ if ((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name")
- if(HDstrcmp(udata->name, s) <= 0)
+ if (HDstrcmp(udata->name, s) <= 0)
ret_value = (-1);
else {
/* right side */
- if((s = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL)
+ if ((s = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name")
- if(HDstrcmp(udata->name, s) > 0)
+ if (HDstrcmp(udata->name, s) > 0)
ret_value = 1;
} /* end else */
@@ -479,7 +447,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_cmp3() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_found
*
@@ -501,21 +468,19 @@ done:
* Failure: Negative if not found.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
*/
static htri_t
-H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key,
- void *_udata)
+H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, void *_udata)
{
- H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata;
- H5G_node_t *sn = NULL;
- unsigned lt = 0, idx = 0, rt;
- int cmp = 1;
- const char *s;
- htri_t ret_value = TRUE; /* Return value */
+ H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata;
+ H5G_node_t * sn = NULL;
+ unsigned lt = 0, idx = 0, rt;
+ int cmp = 1;
+ const char * s;
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -529,17 +494,17 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED
/*
* Load the symbol table node for exclusive access.
*/
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node")
/*
* Binary search.
*/
rt = sn->nsyms;
- while(lt < rt && cmp) {
+ while (lt < rt && cmp) {
idx = (lt + rt) / 2;
-
- if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
+
+ if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name")
cmp = HDstrcmp(udata->common.name, s);
@@ -549,21 +514,20 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED
lt = idx + 1;
} /* end while */
- if(cmp)
+ if (cmp)
HGOTO_DONE(FALSE)
/* Call user's callback operator */
- if((udata->op)(&sn->entry[idx], udata->op_data) < 0)
+ if ((udata->op)(&sn->entry[idx], udata->op_data) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "iterator callback failed")
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_found() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_insert
*
@@ -591,28 +555,25 @@ done:
* Failure: H5B_INS_ERROR, NEW_NODE_P might not be initialized.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 24 1997
*
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- void H5_ATTR_UNUSED *_lt_key, hbool_t H5_ATTR_UNUSED *lt_key_changed,
- void *_md_key, void *_udata,
- void *_rt_key, hbool_t *rt_key_changed,
- haddr_t *new_node_p)
+H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void H5_ATTR_UNUSED *_lt_key,
+ hbool_t H5_ATTR_UNUSED *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
+ hbool_t *rt_key_changed, haddr_t *new_node_p)
{
- H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key;
- H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key;
- H5G_bt_ins_t *udata = (H5G_bt_ins_t *) _udata;
- H5G_node_t *sn = NULL, *snrt = NULL;
+ H5G_node_key_t *md_key = (H5G_node_key_t *)_md_key;
+ H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
+ H5G_bt_ins_t * udata = (H5G_bt_ins_t *)_udata;
+ H5G_node_t * sn = NULL, *snrt = NULL;
unsigned sn_flags = H5AC__NO_FLAGS_SET, snrt_flags = H5AC__NO_FLAGS_SET;
- const char *s;
- unsigned lt = 0, rt; /* Binary search cntrs */
+ const char * s;
+ unsigned lt = 0, rt; /* Binary search cntrs */
int cmp = 1, idx = -1;
- H5G_node_t *insert_into = NULL; /*node that gets new entry*/
- H5G_entry_t ent; /* Entry to insert in node */
+ H5G_node_t * insert_into = NULL; /*node that gets new entry*/
+ H5G_entry_t ent; /* Entry to insert in node */
H5B_ins_t ret_value = H5B_INS_ERROR;
FUNC_ENTER_NOAPI_NOINIT
@@ -630,20 +591,20 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
/*
* Load the symbol node.
*/
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node")
/*
* Where does the new symbol get inserted? We use a binary search.
*/
rt = sn->nsyms;
- while(lt < rt) {
+ while (lt < rt) {
idx = (int)((lt + rt) / 2);
- if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
+ if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name")
/* Check if symbol is already present */
- if(0 == (cmp = HDstrcmp(udata->common.name, s)))
+ if (0 == (cmp = HDstrcmp(udata->common.name, s)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR, "symbol is already present in symbol table")
if (cmp < 0)
@@ -654,12 +615,12 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
idx += cmp > 0 ? 1 : 0;
/* Convert link information & name to symbol table entry */
- if(H5G__ent_convert(f, dxpl_id, udata->common.heap, udata->common.name,
- udata->lnk, udata->obj_type, udata->crt_info, &ent) < 0)
+ if (H5G__ent_convert(f, dxpl_id, udata->common.heap, udata->common.name, udata->lnk, udata->obj_type,
+ udata->crt_info, &ent) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link")
/* Determine where to place entry in node */
- if(sn->nsyms >= 2 * H5F_SYM_LEAF_K(f)) {
+ if (sn->nsyms >= 2 * H5F_SYM_LEAF_K(f)) {
/*
* The node is full. Split it into a left and right
* node and return the address of the new right node (the
@@ -668,20 +629,18 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
ret_value = H5B_INS_RIGHT;
/* The right node */
- if(H5G_node_create(f, dxpl_id, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p/*out*/) < 0)
+ if (H5G_node_create(f, dxpl_id, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node")
- if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC_WRITE)))
+ if (NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node")
- HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f),
- H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
+ HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f), H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
snrt->nsyms = H5F_SYM_LEAF_K(f);
snrt_flags |= H5AC__DIRTIED_FLAG;
/* The left node */
- HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0,
- H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
+ HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
sn->nsyms = H5F_SYM_LEAF_K(f);
sn_flags |= H5AC__DIRTIED_FLAG;
@@ -689,35 +648,35 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
md_key->offset = sn->entry[sn->nsyms - 1].name_off;
/* Where to insert the new entry? */
- if(idx <= (int)H5F_SYM_LEAF_K(f)) {
+ if (idx <= (int)H5F_SYM_LEAF_K(f)) {
insert_into = sn;
- if(idx == (int)H5F_SYM_LEAF_K(f))
+ if (idx == (int)H5F_SYM_LEAF_K(f))
md_key->offset = ent.name_off;
} /* end if */
else {
idx -= H5F_SYM_LEAF_K(f);
insert_into = snrt;
- if(idx == (int)H5F_SYM_LEAF_K(f)) {
- rt_key->offset = ent.name_off;
+ if (idx == (int)H5F_SYM_LEAF_K(f)) {
+ rt_key->offset = ent.name_off;
*rt_key_changed = TRUE;
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
/* Where to insert the new entry? */
ret_value = H5B_INS_NOOP;
sn_flags |= H5AC__DIRTIED_FLAG;
insert_into = sn;
- if(idx == (int)sn->nsyms) {
- rt_key->offset = ent.name_off;
+ if (idx == (int)sn->nsyms) {
+ rt_key->offset = ent.name_off;
*rt_key_changed = TRUE;
} /* end if */
- } /* end else */
+ } /* end else */
/* Move entries down to make room for new entry */
HDassert(idx >= 0);
HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx,
- (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
+ (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
/* Copy new entry into table */
H5G__ent_copy(&(insert_into->entry[idx]), &ent, H5_COPY_SHALLOW);
@@ -726,15 +685,14 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
insert_into->nsyms += 1;
done:
- if(snrt && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, snrt_flags) < 0)
+ if (snrt && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, snrt_flags) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node")
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_remove
*
@@ -764,18 +722,17 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
- hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/,
- void *_udata/*in,out*/, void *_rt_key/*in,out*/,
- hbool_t *rt_key_changed/*out*/)
+H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out*/,
+ hbool_t H5_ATTR_UNUSED *lt_key_changed /*out*/, void *_udata /*in,out*/,
+ void *_rt_key /*in,out*/, hbool_t *rt_key_changed /*out*/)
{
- H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key;
- H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
- H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata;
- H5G_node_t *sn = NULL;
+ H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key;
+ H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
+ H5G_bt_rm_t * udata = (H5G_bt_rm_t *)_udata;
+ H5G_node_t * sn = NULL;
unsigned sn_flags = H5AC__NO_FLAGS_SET;
unsigned lt = 0, rt, idx = 0;
- int cmp = 1;
+ int cmp = 1;
H5B_ins_t ret_value = H5B_INS_ERROR;
FUNC_ENTER_NOAPI_NOINIT
@@ -788,44 +745,45 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
HDassert(udata && udata->common.heap);
/* Load the symbol table */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node")
/* "Normal" removal of a single entry from the symbol table node */
- if(udata->common.name != NULL) {
- H5O_link_t lnk; /* Constructed link for replacement */
- size_t link_name_len; /* Length of string in local heap */
+ if (udata->common.name != NULL) {
+ H5O_link_t lnk; /* Constructed link for replacement */
+ size_t link_name_len; /* Length of string in local heap */
/* Find the name with a binary search */
rt = sn->nsyms;
- while(lt < rt && cmp) {
- const char *s; /* Pointer to string in local heap */
+ while (lt < rt && cmp) {
+ const char *s; /* Pointer to string in local heap */
idx = (lt + rt) / 2;
- if((s = H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
+ if ((s = H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name")
cmp = HDstrcmp(udata->common.name, s);
- if(cmp < 0)
+ if (cmp < 0)
rt = idx;
else
lt = idx + 1;
} /* end while */
- if(cmp)
+ if (cmp)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5B_INS_ERROR, "name not found")
/* Get a pointer to the name of the link */
- if(NULL == (lnk.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)))
+ if (NULL == (lnk.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name")
link_name_len = HDstrlen(lnk.name) + 1;
/* Set up rest of link structure */
lnk.corder_valid = FALSE;
- lnk.corder = 0;
- lnk.cset = H5T_CSET_ASCII;
- if(sn->entry[idx].type == H5G_CACHED_SLINK) {
+ lnk.corder = 0;
+ lnk.cset = H5T_CSET_ASCII;
+ if (sn->entry[idx].type == H5G_CACHED_SLINK) {
lnk.type = H5L_TYPE_SOFT;
- if(NULL == (lnk.u.soft.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].cache.slink.lval_offset)))
+ if (NULL == (lnk.u.soft.name = (char *)H5HL_offset_into(udata->common.heap,
+ sn->entry[idx].cache.slink.lval_offset)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name")
} /* end if */
else {
@@ -835,37 +793,39 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
} /* end else */
/* Replace any object names */
- if(H5G__link_name_replace(f, dxpl_id, udata->grp_full_path_r, &lnk) < 0)
+ if (H5G__link_name_replace(f, dxpl_id, udata->grp_full_path_r, &lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get object type")
/* Decrement the ref. count for hard links */
- if(lnk.type == H5L_TYPE_HARD) {
- H5O_loc_t tmp_oloc; /* Temporary object location */
+ if (lnk.type == H5L_TYPE_HARD) {
+ H5O_loc_t tmp_oloc; /* Temporary object location */
/* Build temporary object location */
tmp_oloc.file = f;
tmp_oloc.addr = lnk.u.hard.addr;
- if(H5O_link(&tmp_oloc, -1, dxpl_id) < 0)
+ if (H5O_link(&tmp_oloc, -1, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to decrement object link count")
} /* end if */
else {
/* Remove the soft link's value from the local heap */
- if(lnk.u.soft.name) {
- size_t soft_link_len; /* Length of string in local heap */
+ if (lnk.u.soft.name) {
+ size_t soft_link_len; /* Length of string in local heap */
soft_link_len = HDstrlen(lnk.u.soft.name) + 1;
- if(H5HL_remove(f, dxpl_id, udata->common.heap, sn->entry[idx].cache.slink.lval_offset, soft_link_len) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, "unable to remove soft link from local heap")
+ if (H5HL_remove(f, dxpl_id, udata->common.heap, sn->entry[idx].cache.slink.lval_offset,
+ soft_link_len) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR,
+ "unable to remove soft link from local heap")
} /* end if */
- } /* end else */
+ } /* end else */
/* Remove the link's name from the local heap */
- if(H5HL_remove(f, dxpl_id, udata->common.heap, sn->entry[idx].name_off, link_name_len) < 0)
+ if (H5HL_remove(f, dxpl_id, udata->common.heap, sn->entry[idx].name_off, link_name_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, "unable to remove link name from local heap")
/* Remove the entry from the symbol table node */
- if(1 == sn->nsyms) {
+ if (1 == sn->nsyms) {
/*
* We are about to remove the only symbol in this node. Free this
* node and indicate that the pointer to this node in the B-tree
@@ -875,7 +835,8 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
sn->nsyms = 0;
sn_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
ret_value = H5B_INS_REMOVE;
- } else if(0 == idx) {
+ }
+ else if (0 == idx) {
/*
* We are about to remove the left-most entry from the symbol table
* node but there are other entries to the right. No key values
@@ -883,10 +844,10 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
*/
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
- HDmemmove(sn->entry + idx, sn->entry + idx + 1,
- (sn->nsyms-idx) * sizeof(H5G_entry_t));
+ HDmemmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
- } else if (idx + 1 == sn->nsyms) {
+ }
+ else if (idx + 1 == sn->nsyms) {
/*
* We are about to remove the right-most entry from the symbol table
* node but there are other entries to the left. The right key
@@ -894,39 +855,40 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
*/
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
- rt_key->offset = sn->entry[sn->nsyms - 1].name_off;
+ rt_key->offset = sn->entry[sn->nsyms - 1].name_off;
*rt_key_changed = TRUE;
- ret_value = H5B_INS_NOOP;
- } else {
+ ret_value = H5B_INS_NOOP;
+ }
+ else {
/*
* We are about to remove an entry from the middle of a symbol table
* node.
*/
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
- HDmemmove(sn->entry + idx, sn->entry + idx + 1,
- (sn->nsyms - idx) * sizeof(H5G_entry_t));
+ HDmemmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
} /* end else */
- } /* end if */
+ } /* end if */
/* Remove all entries from node, during B-tree deletion */
else {
- H5O_loc_t tmp_oloc; /* Temporary object location */
+ H5O_loc_t tmp_oloc; /* Temporary object location */
/* Build temporary object location */
tmp_oloc.file = f;
/* Reduce the link count for all entries in this node */
- for(idx = 0; idx < sn->nsyms; idx++) {
- if(!(H5G_CACHED_SLINK == sn->entry[idx].type)) {
+ for (idx = 0; idx < sn->nsyms; idx++) {
+ if (!(H5G_CACHED_SLINK == sn->entry[idx].type)) {
/* Decrement the reference count */
HDassert(H5F_addr_defined(sn->entry[idx].header));
tmp_oloc.addr = sn->entry[idx].header;
- if(H5O_link(&tmp_oloc, -1, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, "unable to decrement object link count")
+ if (H5O_link(&tmp_oloc, -1, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR,
+ "unable to decrement object link count")
} /* end if */
- } /* end for */
+ } /* end for */
/*
* We are about to remove all the symbols in this node. Free this
@@ -939,13 +901,12 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
} /* end else */
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_iterate
*
@@ -954,19 +915,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 24 1997
*
*-------------------------------------------------------------------------
*/
int
H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
- const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+ const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- H5G_bt_it_it_t *udata = (H5G_bt_it_it_t *)_udata;
- H5G_node_t *sn = NULL;
- H5G_entry_t *ents; /* Pointer to entries in this node */
- unsigned u; /* Local index variable */
+ H5G_bt_it_it_t *udata = (H5G_bt_it_it_t *)_udata;
+ H5G_node_t * sn = NULL;
+ H5G_entry_t * ents; /* Pointer to entries in this node */
+ unsigned u; /* Local index variable */
int ret_value = H5_ITER_CONT;
FUNC_ENTER_PACKAGE
@@ -979,51 +939,52 @@ H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, h
HDassert(udata && udata->heap);
/* Protect the symbol table node & local heap while we iterate over entries */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node")
/*
* Iterate over the symbol table node entries.
*/
- for(u = 0, ents = sn->entry; u < sn->nsyms && ret_value == H5_ITER_CONT; u++) {
- if(udata->skip > 0)
+ for (u = 0, ents = sn->entry; u < sn->nsyms && ret_value == H5_ITER_CONT; u++) {
+ if (udata->skip > 0)
--udata->skip;
else {
- H5O_link_t lnk; /* Link for entry */
- const char *name; /* Pointer to link name in heap */
+ H5O_link_t lnk; /* Link for entry */
+ const char *name; /* Pointer to link name in heap */
/* Get the pointer to the name of the link in the heap */
- if((name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off)) == NULL)
+ if ((name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table node name")
/* Convert the entry to a link */
- if(H5G__ent_to_link(&lnk, udata->heap, &ents[u], name) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, "unable to convert symbol table entry to link")
+ if (H5G__ent_to_link(&lnk, udata->heap, &ents[u], name) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR,
+ "unable to convert symbol table entry to link")
/* Make the callback */
ret_value = (udata->op)(&lnk, udata->op_data);
/* Release memory for link object */
- if(H5O_msg_reset(H5O_LINK_ID, &lnk) < 0)
+ if (H5O_msg_reset(H5O_LINK_ID, &lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, H5_ITER_ERROR, "unable to release link message")
} /* end else */
/* Increment the number of entries passed through */
/* (whether we skipped them or not) */
- if(udata->final_ent)
+ if (udata->final_ent)
(*udata->final_ent)++;
} /* end for */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
done:
/* Release resources */
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_iterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5G__node_sumup
*
@@ -1039,11 +1000,11 @@ done:
*/
int
H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
- const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+ const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- hsize_t *num_objs = (hsize_t *)_udata;
- H5G_node_t *sn = NULL;
- int ret_value = H5_ITER_CONT;
+ hsize_t * num_objs = (hsize_t *)_udata;
+ H5G_node_t *sn = NULL;
+ int ret_value = H5_ITER_CONT;
FUNC_ENTER_PACKAGE
@@ -1055,19 +1016,18 @@ H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, had
HDassert(num_objs);
/* Find the object node and add the number of symbol entries. */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node")
*num_objs += sn->nsyms;
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_sumup() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_by_idx
*
@@ -1084,10 +1044,10 @@ done:
*/
int
H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
- const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+ const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- H5G_bt_it_idx_common_t *udata = (H5G_bt_it_idx_common_t *)_udata;
- H5G_node_t *sn = NULL;
+ H5G_bt_it_idx_common_t *udata = (H5G_bt_it_idx_common_t *)_udata;
+ H5G_node_t * sn = NULL;
int ret_value = H5_ITER_CONT;
FUNC_ENTER_PACKAGE
@@ -1100,19 +1060,19 @@ H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, ha
HDassert(udata);
/* Get a pointer to the symbol table node */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node");
/* Find the node, locate the object symbol table entry and retrieve the name */
- if(udata->idx >= udata->num_objs && udata->idx < (udata->num_objs + sn->nsyms)) {
- hsize_t ent_idx; /* Entry index in this node */
+ if (udata->idx >= udata->num_objs && udata->idx < (udata->num_objs + sn->nsyms)) {
+ hsize_t ent_idx; /* Entry index in this node */
/* Compute index of entry */
ent_idx = udata->idx - udata->num_objs;
/* Call 'by index' callback */
HDassert(udata->op);
- if((udata->op)(&sn->entry[ent_idx], udata) < 0)
+ if ((udata->op)(&sn->entry[ent_idx], udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "'by index' callback failed")
/* Indicate that we found the entry we are interested in */
@@ -1122,13 +1082,12 @@ H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, ha
udata->num_objs += sn->nsyms;
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_init
*
@@ -1146,9 +1105,9 @@ done:
herr_t
H5G__node_init(H5F_t *f)
{
- H5B_shared_t *shared; /* Shared B-tree node info */
- size_t sizeof_rkey; /* Size of raw (disk) key */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B_shared_t *shared; /* Shared B-tree node info */
+ size_t sizeof_rkey; /* Size of raw (disk) key */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1156,24 +1115,23 @@ H5G__node_init(H5F_t *f)
HDassert(f);
/* Set the raw key size */
- sizeof_rkey = H5F_SIZEOF_SIZE(f); /*name offset */
+ sizeof_rkey = H5F_SIZEOF_SIZE(f); /*name offset */
/* Allocate & initialize global info for the shared structure */
- if(NULL == (shared = H5B_shared_new(f, H5B_SNODE, sizeof_rkey)))
+ if (NULL == (shared = H5B_shared_new(f, H5B_SNODE, sizeof_rkey)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info")
/* Set up the "local" information for this file's groups */
/* <none> */
/* Make shared B-tree info reference counted */
- if(H5F_SET_GRP_BTREE_SHARED(f, H5RC_create(shared, H5B_shared_free)) < 0)
+ if (H5F_SET_GRP_BTREE_SHARED(f, H5RC_create(shared, H5B_shared_free)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_init() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_close
*
@@ -1198,13 +1156,12 @@ H5G_node_close(const H5F_t *f)
HDassert(f);
/* Free the raw B-tree node buffer */
- if(H5F_GRP_BTREE_SHARED(f))
+ if (H5F_GRP_BTREE_SHARED(f))
H5RC_DEC(H5F_GRP_BTREE_SHARED(f));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_node_close */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_copy
*
@@ -1220,15 +1177,15 @@ H5G_node_close(const H5F_t *f)
*/
int
H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
- const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+ const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- H5G_bt_it_cpy_t *udata = (H5G_bt_it_cpy_t *)_udata;
- const H5O_loc_t *src_oloc = udata->src_oloc;
- H5O_copy_t *cpy_info = udata->cpy_info;
- H5HL_t *heap = NULL;
- H5G_node_t *sn = NULL;
- unsigned int i; /* Local index variable */
- int ret_value = H5_ITER_CONT;
+ H5G_bt_it_cpy_t *udata = (H5G_bt_it_cpy_t *)_udata;
+ const H5O_loc_t *src_oloc = udata->src_oloc;
+ H5O_copy_t * cpy_info = udata->cpy_info;
+ H5HL_t * heap = NULL;
+ H5G_node_t * sn = NULL;
+ unsigned int i; /* Local index variable */
+ int ret_value = H5_ITER_CONT;
FUNC_ENTER_PACKAGE
@@ -1238,29 +1195,30 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd
HDassert(udata);
/* load the symbol table into memory from the source file */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node")
/* get the base address of the heap */
- if(NULL == (heap = H5HL_protect(f, dxpl_id, udata->src_heap_addr, H5AC_READ)))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to protect symbol name")
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, udata->src_heap_addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to protect symbol name")
/* copy object in this node one by one */
- for(i = 0; i < sn->nsyms; i++) {
- H5G_entry_t *src_ent = &(sn->entry[i]); /* Convenience variable to refer to current source group entry */
- H5O_link_t lnk; /* Link to insert */
- const char *name; /* Name of source object */
- H5G_entry_t tmp_src_ent; /* Temperary copy. Change will not affect the cache */
- H5O_type_t obj_type = H5O_TYPE_UNKNOWN; /* Target object type */
- H5G_copy_file_ud_t *cpy_udata; /* Copy file udata */
- H5G_obj_create_t gcrt_info; /* Group creation info */
+ for (i = 0; i < sn->nsyms; i++) {
+ H5G_entry_t *src_ent =
+ &(sn->entry[i]); /* Convenience variable to refer to current source group entry */
+ H5O_link_t lnk; /* Link to insert */
+ const char * name; /* Name of source object */
+ H5G_entry_t tmp_src_ent; /* Temperary copy. Change will not affect the cache */
+ H5O_type_t obj_type = H5O_TYPE_UNKNOWN; /* Target object type */
+ H5G_copy_file_ud_t *cpy_udata; /* Copy file udata */
+ H5G_obj_create_t gcrt_info; /* Group creation info */
/* expand soft link */
- if(H5G_CACHED_SLINK == src_ent->type && cpy_info->expand_soft_link) {
- H5O_info_t oinfo; /* Information about object pointed to by soft link */
- H5G_loc_t grp_loc; /* Group location holding soft link */
- H5G_name_t grp_path; /* Path for group holding soft link */
- char *link_name; /* Pointer to value of soft link */
+ if (H5G_CACHED_SLINK == src_ent->type && cpy_info->expand_soft_link) {
+ H5O_info_t oinfo; /* Information about object pointed to by soft link */
+ H5G_loc_t grp_loc; /* Group location holding soft link */
+ H5G_name_t grp_path; /* Path for group holding soft link */
+ char * link_name; /* Pointer to value of soft link */
/* Make a temporary copy, so that it will not change the info in the cache */
HDmemcpy(&tmp_src_ent, src_ent, sizeof(H5G_entry_t));
@@ -1271,22 +1229,22 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd
grp_loc.oloc = (H5O_loc_t *)src_oloc;
/* Get pointer to link value in local heap */
- if((link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset)) == NULL)
+ if ((link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name")
/* Check if the object pointed by the soft link exists in the source file */
- if(H5G_loc_info(&grp_loc, link_name, FALSE, &oinfo, H5P_DEFAULT, dxpl_id) >= 0) {
+ if (H5G_loc_info(&grp_loc, link_name, FALSE, &oinfo, H5P_DEFAULT, dxpl_id) >= 0) {
tmp_src_ent.header = oinfo.addr;
- src_ent = &tmp_src_ent;
+ src_ent = &tmp_src_ent;
} /* end if */
else
H5E_clear_stack(NULL); /* discard any errors from a dangling soft link */
- } /* if ((H5G_CACHED_SLINK == src_ent->type)... */
+ } /* if ((H5G_CACHED_SLINK == src_ent->type)... */
/* Check if object in source group is a hard link */
- if(H5F_addr_defined(src_ent->header)) {
- H5O_loc_t new_dst_oloc; /* Copied object location in destination */
- H5O_loc_t tmp_src_oloc; /* Temporary object location for source object */
+ if (H5F_addr_defined(src_ent->header)) {
+ H5O_loc_t new_dst_oloc; /* Copied object location in destination */
+ H5O_loc_t tmp_src_oloc; /* Temporary object location for source object */
/* Set up copied object location to fill in */
H5O_loc_reset(&new_dst_oloc);
@@ -1298,65 +1256,63 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd
tmp_src_oloc.addr = src_ent->header;
/* Copy the shared object from source to destination */
- if(H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id,
- cpy_info, TRUE, &obj_type, (void **)&cpy_udata) < 0)
+ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info, TRUE, &obj_type,
+ (void **)&cpy_udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy object")
/* Set up object creation info for symbol table insertion. Only
* case so far is for inserting old-style groups (for caching stab
* info). */
- if(obj_type == H5O_TYPE_GROUP) {
- gcrt_info.gcpl_id = H5P_DEFAULT;
+ if (obj_type == H5O_TYPE_GROUP) {
+ gcrt_info.gcpl_id = H5P_DEFAULT;
gcrt_info.cache_type = cpy_udata->cache_type;
- gcrt_info.cache = cpy_udata->cache;
+ gcrt_info.cache = cpy_udata->cache;
} /* end if */
/* Construct link information for eventual insertion */
- lnk.type = H5L_TYPE_HARD;
+ lnk.type = H5L_TYPE_HARD;
lnk.u.hard.addr = new_dst_oloc.addr;
} /* ( H5F_addr_defined(src_ent->header)) */
- else if(H5G_CACHED_SLINK == src_ent->type) {
+ else if (H5G_CACHED_SLINK == src_ent->type) {
/* it is a soft link */
/* Set object type to unknown */
obj_type = H5O_TYPE_UNKNOWN;
/* Construct link information for eventual insertion */
lnk.type = H5L_TYPE_SOFT;
- if((lnk.u.soft.name = (char *)H5HL_offset_into(heap, src_ent->cache.slink.lval_offset)) == NULL)
+ if ((lnk.u.soft.name = (char *)H5HL_offset_into(heap, src_ent->cache.slink.lval_offset)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name")
} /* else if */
else
HDassert(0 && "Unknown entry type");
/* Set up common link data */
- lnk.cset = H5F_DEFAULT_CSET; /* XXX: Allow user to set this */
- lnk.corder = 0; /* Creation order is not tracked for old-style links */
+ lnk.cset = H5F_DEFAULT_CSET; /* XXX: Allow user to set this */
+ lnk.corder = 0; /* Creation order is not tracked for old-style links */
lnk.corder_valid = FALSE; /* Creation order is not valid */
- /* lnk.name = name; */ /* This will be set in callback */
+ /* lnk.name = name; */ /* This will be set in callback */
/* Determine name of source object */
- if((name = (const char *)H5HL_offset_into(heap, src_ent->name_off)) == NULL)
+ if ((name = (const char *)H5HL_offset_into(heap, src_ent->name_off)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name")
/* Insert the new object in the destination file's group */
/* (Don't increment the link count - that's already done above for hard links) */
- if(H5G__stab_insert_real(udata->dst_file, udata->dst_stab, name, &lnk,
- obj_type, (obj_type == H5O_TYPE_GROUP ? &gcrt_info : NULL),
- dxpl_id) < 0)
+ if (H5G__stab_insert_real(udata->dst_file, udata->dst_stab, name, &lnk, obj_type,
+ (obj_type == H5O_TYPE_GROUP ? &gcrt_info : NULL), dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name")
} /* end of for (i=0; i<sn->nsyms; i++) */
done:
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to unprotect symbol name")
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_build_table
*
@@ -1365,18 +1321,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 19 2006
*
*-------------------------------------------------------------------------
*/
int
H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
- const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+ const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- H5G_bt_it_bt_t *udata = (H5G_bt_it_bt_t *)_udata;
- H5G_node_t *sn = NULL; /* Symbol table node */
- unsigned u; /* Local index variable */
+ H5G_bt_it_bt_t *udata = (H5G_bt_it_bt_t *)_udata;
+ H5G_node_t * sn = NULL; /* Symbol table node */
+ unsigned u; /* Local index variable */
int ret_value = H5_ITER_CONT;
FUNC_ENTER_PACKAGE
@@ -1392,46 +1347,47 @@ H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_ke
* Save information about the symbol table node since we can't lock it
* because we're about to call an application function.
*/
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node")
/* Check if the link table needs to be extended */
- if((udata->ltable->nlinks + sn->nsyms) >= udata->alloc_nlinks) {
- size_t na = MAX((udata->ltable->nlinks + sn->nsyms), (udata->alloc_nlinks * 2)); /* Double # of links allocated */
- H5O_link_t *x; /* Pointer to larger array of links */
+ if ((udata->ltable->nlinks + sn->nsyms) >= udata->alloc_nlinks) {
+ size_t na = MAX((udata->ltable->nlinks + sn->nsyms),
+ (udata->alloc_nlinks * 2)); /* Double # of links allocated */
+ H5O_link_t *x; /* Pointer to larger array of links */
/* Re-allocate the link table */
- if(NULL == (x = (H5O_link_t *)H5MM_realloc(udata->ltable->lnks, sizeof(H5O_link_t) * na)))
+ if (NULL == (x = (H5O_link_t *)H5MM_realloc(udata->ltable->lnks, sizeof(H5O_link_t) * na)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed")
udata->ltable->lnks = x;
} /* end if */
/* Iterate over the symbol table node entries, adding to link table */
- for(u = 0; u < sn->nsyms; u++) {
- const char *name; /* Pointer to link name in heap */
- size_t linkno; /* Link allocated */
+ for (u = 0; u < sn->nsyms; u++) {
+ const char *name; /* Pointer to link name in heap */
+ size_t linkno; /* Link allocated */
/* Get pointer to link's name in the heap */
- if((name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off)) == NULL)
+ if ((name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table link name")
/* Determine the link to operate on in the table */
linkno = udata->ltable->nlinks++;
/* Convert the entry to a link */
- if(H5G__ent_to_link(&udata->ltable->lnks[linkno], udata->heap, &sn->entry[u], name) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, "unable to convert symbol table entry to link")
+ if (H5G__ent_to_link(&udata->ltable->lnks[linkno], udata->heap, &sn->entry[u], name) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR,
+ "unable to convert symbol table entry to link")
} /* end for */
done:
/* Release the locked items */
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__node_build_table() */
-
/*-------------------------------------------------------------------------
* Function: H5G__node_iterate_size
*
@@ -1446,10 +1402,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATTR_UNUSED *_lt_key,
- haddr_t H5_ATTR_UNUSED addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata)
+H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATTR_UNUSED *_lt_key,
+ haddr_t H5_ATTR_UNUSED addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata)
{
- hsize_t *stab_size = (hsize_t *)_udata; /* User data */
+ hsize_t *stab_size = (hsize_t *)_udata; /* User data */
FUNC_ENTER_PACKAGE_NOERR
@@ -1462,7 +1418,6 @@ H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATT
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__node_iterate_size() */
-
/*-------------------------------------------------------------------------
* Function: H5G_node_debug
*
@@ -1472,19 +1427,17 @@ H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATT
* Return: 0(zero) on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 4 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
- int fwidth, haddr_t heap_addr)
+H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t heap_addr)
{
- H5G_node_t *sn = NULL;
- H5HL_t *heap = NULL;
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_node_t *sn = NULL;
+ H5HL_t * heap = NULL;
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1498,57 +1451,55 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
HDassert(fwidth >= 0);
/* Pin the heap down in memory */
- if(heap_addr > 0 && H5F_addr_defined(heap_addr))
- if(NULL == (heap = H5HL_protect(f, dxpl_id, heap_addr, H5AC_READ)))
+ if (heap_addr > 0 && H5F_addr_defined(heap_addr))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table heap")
/*
* If we couldn't load the symbol table node, then try loading the
* B-tree node.
*/
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) {
- H5G_bt_common_t udata; /*data to pass through B-tree */
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) {
+ H5G_bt_common_t udata; /*data to pass through B-tree */
H5E_clear_stack(NULL); /* discard that error */
udata.heap = heap;
- if(H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_SNODE, &udata) < 0)
+ if (H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_SNODE, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node");
} /* end if */
else {
HDfprintf(stream, "%*sSymbol Table Node...\n", indent, "");
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty:",
- sn->cache_info.is_dirty ? "Yes" : "No");
+ "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of Node (in bytes):", (unsigned)sn->node_size);
- HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth,
- "Number of Symbols:",
- sn->nsyms, (unsigned)(2 * H5F_SYM_LEAF_K(f)));
+ "Size of Node (in bytes):", (unsigned)sn->node_size);
+ HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms,
+ (unsigned)(2 * H5F_SYM_LEAF_K(f)));
indent += 3;
fwidth = MAX(0, fwidth - 3);
- for(u = 0; u < sn->nsyms; u++) {
+ for (u = 0; u < sn->nsyms; u++) {
HDfprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u);
- if(heap) {
+ if (heap) {
const char *s = (const char *)H5HL_offset_into(heap, sn->entry[u].name_off);
- if(s)
+ if (s)
HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Warning: Invalid heap address given, name not displayed!");
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap);
} /* end for */
- } /* end if */
+ } /* end if */
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node")
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_debug() */
-
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 97c9a76..8b05d25 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gobj.c
* Sep 5 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for abstract handling of objects in groups.
*
@@ -26,28 +26,25 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property Lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -56,59 +53,50 @@
* link storage
*/
typedef struct {
- H5F_t *f; /* Pointer to file for insertion */
- hid_t dxpl_id; /* DXPL during insertion */
- H5O_linfo_t *linfo; /* Pointer to link info */
+ H5F_t * f; /* Pointer to file for insertion */
+ hid_t dxpl_id; /* DXPL during insertion */
+ H5O_linfo_t *linfo; /* Pointer to link info */
} H5G_obj_oh_it_ud1_t;
/* User data for link iterator when converting dense link storage to link
* messages
*/
typedef struct {
- H5O_link_t *lnk_table; /* Array of links to convert */
- size_t nlinks; /* Number of links converted */
- size_t alloc_links; /* Size of link table */
+ H5O_link_t *lnk_table; /* Array of links to convert */
+ size_t nlinks; /* Number of links converted */
+ size_t alloc_links; /* Size of link table */
} H5G_obj_lnk_it_ud1_t;
/* User data for symbol table iterator when converting old-format group to
* a new-format group
*/
typedef struct {
- const H5O_loc_t *grp_oloc; /* Pointer to group for insertion */
- hid_t dxpl_id; /* DXPL during insertion */
+ const H5O_loc_t *grp_oloc; /* Pointer to group for insertion */
+ hid_t dxpl_id; /* DXPL during insertion */
} H5G_obj_stab_it_ud1_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned idx,
- void *_udata);
-static herr_t H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo,
- hid_t dxpl_id);
-
+static herr_t H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned idx, void *_udata);
+static herr_t H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_create
*
@@ -117,20 +105,18 @@ static herr_t H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *li
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 29 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
- H5O_loc_t *oloc/*out*/)
+H5G__obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/)
{
- H5P_genplist_t *gc_plist; /* Group creation property list */
- H5O_ginfo_t ginfo; /* Group info */
- H5O_linfo_t linfo; /* Link info */
- H5O_pline_t pline; /* Pipeline */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *gc_plist; /* Group creation property list */
+ H5O_ginfo_t ginfo; /* Group info */
+ H5O_linfo_t linfo; /* Link info */
+ H5O_pline_t pline; /* Pipeline */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -141,30 +127,29 @@ H5G__obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
HDassert(oloc);
/* Get the property list */
- if(NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id)))
+ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a property list")
/* Get the group info property */
- if(H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ if (H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info")
/* Get the link info property */
- if(H5P_get(gc_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
+ if (H5P_get(gc_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info")
/* Get the pipeline property */
- if(H5P_get(gc_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
+ if (H5P_get(gc_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info")
/* Call the "real" group creation routine now */
- if(H5G__obj_create_real(f, dxpl_id, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0)
+ if (H5G__obj_create_real(f, dxpl_id, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_create() */
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_create_real
*
@@ -173,20 +158,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 29 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
- const H5O_linfo_t *linfo, const H5O_pline_t *pline,
- H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/)
+H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linfo,
+ const H5O_pline_t *pline, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/)
{
- size_t hdr_size; /* Size of object header to request */
- hbool_t use_latest_format; /* Flag indicating the new group format should be used */
- hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t hdr_size; /* Size of object header to request */
+ hbool_t use_latest_format; /* Flag indicating the new group format should be used */
+ hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -200,13 +183,12 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
HDassert(oloc);
/* Check for invalid access request */
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
/* Check for using the latest version of the group format */
/* (add more checks for creating "new format" groups when needed) */
- if(H5F_USE_LATEST_FORMAT(f) || linfo->track_corder
- || (pline && pline->nused))
+ if (H5F_USE_LATEST_FORMAT(f) || linfo->track_corder || (pline && pline->nused))
use_latest_format = TRUE;
else
use_latest_format = FALSE;
@@ -214,17 +196,17 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
/* Make certain that the creation order is being tracked if an index is
* going to be built on it.
*/
- if(linfo->index_corder && !linfo->track_corder)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it")
+ if (linfo->index_corder && !linfo->track_corder)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it")
/* Check if we should be using the latest version of the group format */
- if(use_latest_format) {
- H5O_link_t lnk; /* Temporary link message info for computing message size */
- char null_char = '\0'; /* Character for creating null string */
- size_t ginfo_size; /* Size of the group info message */
- size_t linfo_size; /* Size of the link info message */
- size_t pline_size = 0; /* Size of the pipeline message */
- size_t link_size; /* Size of a link message */
+ if (use_latest_format) {
+ H5O_link_t lnk; /* Temporary link message info for computing message size */
+ char null_char = '\0'; /* Character for creating null string */
+ size_t ginfo_size; /* Size of the group info message */
+ size_t linfo_size; /* Size of the link info message */
+ size_t pline_size = 0; /* Size of the pipeline message */
+ size_t link_size; /* Size of a link message */
/* Calculate message size information, for creating group's object header */
linfo_size = H5O_msg_size_f(f, gcpl_id, H5O_LINFO_ID, linfo, (size_t)0);
@@ -233,24 +215,21 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
ginfo_size = H5O_msg_size_f(f, gcpl_id, H5O_GINFO_ID, ginfo, (size_t)0);
HDassert(ginfo_size);
- if(pline && pline->nused) {
+ if (pline && pline->nused) {
pline_size = H5O_msg_size_f(f, gcpl_id, H5O_PLINE_ID, pline, (size_t)0);
HDassert(pline_size);
} /* end if */
- lnk.type = H5L_TYPE_HARD;
- lnk.corder = 0;
+ lnk.type = H5L_TYPE_HARD;
+ lnk.corder = 0;
lnk.corder_valid = linfo->track_corder;
- lnk.cset = H5T_CSET_ASCII;
- lnk.name = &null_char;
- link_size = H5O_msg_size_f(f, gcpl_id, H5O_LINK_ID, &lnk, (size_t)ginfo->est_name_len);
+ lnk.cset = H5T_CSET_ASCII;
+ lnk.name = &null_char;
+ link_size = H5O_msg_size_f(f, gcpl_id, H5O_LINK_ID, &lnk, (size_t)ginfo->est_name_len);
HDassert(link_size);
/* Compute size of header to use for creation */
- hdr_size = linfo_size +
- ginfo_size +
- pline_size +
- (ginfo->est_num_entries * link_size);
+ hdr_size = linfo_size + ginfo_size + pline_size + (ginfo->est_num_entries * link_size);
} /* end if */
else
hdr_size = (size_t)(4 + 2 * H5F_SIZEOF_ADDR(f));
@@ -260,45 +239,44 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
* since nothing refers to it yet. The link count will be
* incremented if the object is added to the group directed graph.
*/
- if(H5O_create(f, dxpl_id, hdr_size, (size_t)1, gcpl_id, oloc/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header")
+ if (H5O_create(f, dxpl_id, hdr_size, (size_t)1, gcpl_id, oloc /*out*/) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header")
/* Check for format of group to create */
- if(use_latest_format) {
+ if (use_latest_format) {
/* Insert link info message */
/* (Casting away const OK - QAK) */
- if(H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo, dxpl_id) < 0)
+ if (H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Insert group info message */
/* (Casting away const OK - QAK) */
- if(H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo, dxpl_id) < 0)
+ if (H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Insert pipeline message */
- if(pline && pline->nused)
+ if (pline && pline->nused)
/* (Casting away const OK - QAK) */
- if(H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline, dxpl_id) < 0)
+ if (H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
} /* end if */
else {
- H5O_stab_t stab; /* Symbol table message */
+ H5O_stab_t stab; /* Symbol table message */
/* The group doesn't currently have a 'stab' message, go create one */
- if(H5G__stab_create(oloc, dxpl_id, ginfo, &stab) < 0)
+ if (H5G__stab_create(oloc, dxpl_id, ginfo, &stab) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table")
/* Cache the symbol table information */
- gcrt_info->cache_type = H5G_CACHED_STAB;
+ gcrt_info->cache_type = H5G_CACHED_STAB;
gcrt_info->cache.stab.btree_addr = stab.btree_addr;
- gcrt_info->cache.stab.heap_addr = stab.heap_addr;
+ gcrt_info->cache.stab.heap_addr = stab.heap_addr;
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_create_real() */
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_get_linfo
*
@@ -309,7 +287,6 @@ done:
* Failure: FAIL if error occurred
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 11 2007
*
*-------------------------------------------------------------------------
@@ -317,8 +294,8 @@ done:
htri_t
H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
{
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- htri_t ret_value; /* Return value */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -327,43 +304,42 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
HDassert(linfo);
/* Check for the group having a link info message */
- if((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(ret_value) {
+ if ((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
+ if (ret_value) {
/* Retrieve the "link info" structure */
- if(NULL == H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "link info message not present")
/* Check if we don't know how many links there are */
- if(linfo->nlinks == HSIZET_MAX) {
+ if (linfo->nlinks == HSIZET_MAX) {
/* Check if we are using "dense" link storage */
- if(H5F_addr_defined(linfo->fheap_addr)) {
+ if (H5F_addr_defined(linfo->fheap_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(grp_oloc->file, dxpl_id, linfo->name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(grp_oloc->file, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
/* (should be same # of records in all indices) */
- if(H5B2_get_nrec(bt2_name, &linfo->nlinks) < 0)
+ if (H5B2_get_nrec(bt2_name, &linfo->nlinks) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of records in index")
} /* end if */
else {
/* Retrieve # of links from object header */
- if(H5O_get_nlinks(grp_oloc, dxpl_id, &linfo->nlinks) < 0)
+ if (H5O_get_nlinks(grp_oloc, dxpl_id, &linfo->nlinks) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of links for object")
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_get_linfo() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_compact_to_dense_cb
*
@@ -373,7 +349,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
@@ -381,9 +356,9 @@ done:
static herr_t
H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
- const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
- H5G_obj_oh_it_ud1_t *udata = (H5G_obj_oh_it_ud1_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ const H5O_link_t * lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
+ H5G_obj_oh_it_ud1_t *udata = (H5G_obj_oh_it_ud1_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -392,14 +367,13 @@ H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
HDassert(udata);
/* Insert link into dense link storage */
- if(H5G__dense_insert(udata->f, udata->dxpl_id, udata->linfo, lnk) < 0)
+ if (H5G__dense_insert(udata->f, udata->dxpl_id, udata->linfo, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_compact_to_dense_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_stab_to_new_cb
*
@@ -409,7 +383,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 16 2006
*
*-------------------------------------------------------------------------
@@ -417,8 +390,8 @@ done:
static herr_t
H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
{
- H5G_obj_stab_it_ud1_t *udata = (H5G_obj_stab_it_ud1_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5G_obj_stab_it_ud1_t *udata = (H5G_obj_stab_it_ud1_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -428,15 +401,14 @@ H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
/* Insert link into group */
/* (Casting away const OK - QAK) */
- if(H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE,
- H5O_TYPE_UNKNOWN, NULL, udata->dxpl_id) < 0)
+ if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE, H5O_TYPE_UNKNOWN, NULL,
+ udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_stab_to_new_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_insert
*
@@ -449,22 +421,21 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
- hbool_t adj_link, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id)
+H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, hbool_t adj_link,
+ H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id)
{
- H5O_pline_t tmp_pline; /* Pipeline message */
- H5O_pline_t *pline = NULL; /* Pointer to pipeline message */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */
- hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_pline_t tmp_pline; /* Pipeline message */
+ H5O_pline_t *pline = NULL; /* Pointer to pipeline message */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */
+ hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -475,19 +446,19 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
/* Check if we have information about the number of objects in this group */
/* (by attempting to get the link info message for this group) */
- if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
- H5O_ginfo_t ginfo; /* Group info message */
- size_t link_msg_size; /* Size of new link message in the file */
+ if (linfo_exists) {
+ H5O_ginfo_t ginfo; /* Group info message */
+ size_t link_msg_size; /* Size of new link message in the file */
/* Using the new format for groups */
use_old_format = FALSE;
/* Check for tracking creation order on this group's links */
- if(linfo.track_corder) {
+ if (linfo.track_corder) {
/* Set the creation order for the new link & indicate that it's valid */
- obj_lnk->corder = linfo.max_corder;
+ obj_lnk->corder = linfo.max_corder;
obj_lnk->corder_valid = TRUE;
/* Increment the max. creation order used in the group */
@@ -495,92 +466,93 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
} /* end if */
/* Get the link's message size */
- if((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0)
+ if ((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size")
/* Get the group info */
- if(NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
/* If there's still a small enough number of links, use the 'link' message */
/* (If the encoded form of the link is too large to fit into an object
* header message, convert to using dense link storage instead of link messages)
*/
- if(H5F_addr_defined(linfo.fheap_addr))
+ if (H5F_addr_defined(linfo.fheap_addr))
use_new_dense = TRUE;
- else if(linfo.nlinks < ginfo.max_compact && link_msg_size < H5O_MESG_MAX_SIZE)
+ else if (linfo.nlinks < ginfo.max_compact && link_msg_size < H5O_MESG_MAX_SIZE)
use_new_dense = FALSE;
else {
- htri_t pline_exists; /* Whether the pipeline message exists */
- H5G_obj_oh_it_ud1_t udata; /* User data for iteration */
- H5O_mesg_operator_t op; /* Message operator */
+ htri_t pline_exists; /* Whether the pipeline message exists */
+ H5G_obj_oh_it_ud1_t udata; /* User data for iteration */
+ H5O_mesg_operator_t op; /* Message operator */
/* Get the pipeline message, if it exists */
- if((pline_exists = H5O_msg_exists(grp_oloc, H5O_PLINE_ID, dxpl_id)) < 0)
+ if ((pline_exists = H5O_msg_exists(grp_oloc, H5O_PLINE_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(pline_exists) {
- if(NULL == H5O_msg_read(grp_oloc, H5O_PLINE_ID, &tmp_pline, dxpl_id))
+ if (pline_exists) {
+ if (NULL == H5O_msg_read(grp_oloc, H5O_PLINE_ID, &tmp_pline, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline")
pline = &tmp_pline;
} /* end if */
/* The group doesn't currently have "dense" storage for links */
- if(H5G__dense_create(grp_oloc->file, dxpl_id, &linfo, pline) < 0)
+ if (H5G__dense_create(grp_oloc->file, dxpl_id, &linfo, pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group")
/* Set up user data for object header message iteration */
- udata.f = grp_oloc->file;
+ udata.f = grp_oloc->file;
udata.dxpl_id = dxpl_id;
- udata.linfo = &linfo;
+ udata.linfo = &linfo;
/* Iterate over the 'link' messages, inserting them into the dense link storage */
- op.op_type = H5O_MESG_OP_APP;
+ op.op_type = H5O_MESG_OP_APP;
op.u.app_op = H5G_obj_compact_to_dense_cb;
- if(H5O_msg_iterate(grp_oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate(grp_oloc, H5O_LINK_ID, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links")
/* Remove all the 'link' messages */
- if(H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, FALSE, dxpl_id) < 0)
+ if (H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, FALSE, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages")
use_new_dense = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check for new-style link information */
- if(obj_lnk->cset != H5T_CSET_ASCII || obj_lnk->type > H5L_TYPE_BUILTIN_MAX) {
- H5O_linfo_t new_linfo = H5G_CRT_LINK_INFO_DEF; /* Link information */
- H5O_ginfo_t new_ginfo = H5G_CRT_GROUP_INFO_DEF; /* Group information */
- H5G_obj_stab_it_ud1_t udata; /* User data for iteration */
+ if (obj_lnk->cset != H5T_CSET_ASCII || obj_lnk->type > H5L_TYPE_BUILTIN_MAX) {
+ H5O_linfo_t new_linfo = H5G_CRT_LINK_INFO_DEF; /* Link information */
+ H5O_ginfo_t new_ginfo = H5G_CRT_GROUP_INFO_DEF; /* Group information */
+ H5G_obj_stab_it_ud1_t udata; /* User data for iteration */
/* Convert group to "new format" group, in order to hold the information */
/* Insert link info message */
- if(H5O_msg_create(grp_oloc, H5O_LINFO_ID, 0, 0, &new_linfo, dxpl_id) < 0)
+ if (H5O_msg_create(grp_oloc, H5O_LINFO_ID, 0, 0, &new_linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Insert group info message */
- if(H5O_msg_create(grp_oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, H5O_UPDATE_TIME, &new_ginfo, dxpl_id) < 0)
+ if (H5O_msg_create(grp_oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, H5O_UPDATE_TIME, &new_ginfo,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Set up user data for iteration */
udata.grp_oloc = grp_oloc;
- udata.dxpl_id = dxpl_id;
+ udata.dxpl_id = dxpl_id;
/* Iterate through all links in "old format" group and insert them into new format */
- if(H5G__stab_iterate(grp_oloc, dxpl_id, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_obj_stab_to_new_cb, &udata) < 0)
+ if (H5G__stab_iterate(grp_oloc, dxpl_id, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_obj_stab_to_new_cb,
+ &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links")
/* Remove the symbol table message from the group */
- if(H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, FALSE, dxpl_id) < 0)
+ if (H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, FALSE, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage")
/* Recursively call this routine to insert the new link, since the
* group is in the "new format" now and the link info should be
* set up, etc.
*/
- if(H5G_obj_insert(grp_oloc, name, obj_lnk, adj_link, obj_type,
- crt_info, dxpl_id) < 0)
+ if (H5G_obj_insert(grp_oloc, name, obj_lnk, adj_link, obj_type, crt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into group")
/* Done with insertion now */
@@ -591,35 +563,34 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
} /* end if */
/* Insert into symbol table or "dense" storage */
- if(use_old_format) {
+ if (use_old_format) {
/* Insert into symbol table */
- if(H5G__stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info, dxpl_id)
- < 0)
+ if (H5G__stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table")
} /* end if */
else {
- if(use_new_dense) {
+ if (use_new_dense) {
/* Insert into dense link storage */
- if(H5G__dense_insert(grp_oloc->file, dxpl_id, &linfo, obj_lnk) < 0)
+ if (H5G__dense_insert(grp_oloc->file, dxpl_id, &linfo, obj_lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage")
} /* end if */
else {
/* Insert with link message */
- if(H5G__compact_insert(grp_oloc, obj_lnk, dxpl_id) < 0)
+ if (H5G__compact_insert(grp_oloc, obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message")
} /* end else */
- } /* end else */
+ } /* end else */
/* Increment the number of objects in this group */
- if(!use_old_format) {
+ if (!use_old_format) {
linfo.nlinks++;
- if(H5O_msg_write(grp_oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, &linfo, dxpl_id) < 0)
+ if (H5O_msg_write(grp_oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message")
} /* end if */
/* Increment link count on object, if requested and it's a hard link */
- if(adj_link && obj_lnk->type == H5L_TYPE_HARD) {
- H5O_loc_t obj_oloc; /* Object location */
+ if (adj_link && obj_lnk->type == H5L_TYPE_HARD) {
+ H5O_loc_t obj_oloc; /* Object location */
H5O_loc_reset(&obj_oloc);
/* Create temporary object location */
@@ -627,19 +598,18 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
obj_oloc.addr = obj_lnk->u.hard.addr;
/* Increment reference count for object */
- if(H5O_link(&obj_oloc, 1, dxpl_id) < 0)
+ if (H5O_link(&obj_oloc, 1, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "unable to increment hard link count")
} /* end if */
done:
/* Free any space used by the pipeline message */
- if(pline && H5O_msg_reset(H5O_PLINE_ID, pline) < 0)
+ if (pline && H5O_msg_reset(H5O_PLINE_ID, pline) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "can't release pipeline")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_iterate
*
@@ -656,13 +626,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__obj_iterate(const H5O_loc_t *grp_oloc,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id)
+H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- herr_t ret_value; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -671,38 +640,40 @@ H5G__obj_iterate(const H5O_loc_t *grp_oloc,
HDassert(op);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for going out of bounds */
- if(skip > 0 && (size_t)skip >= linfo.nlinks)
+ if (skip > 0 && (size_t)skip >= linfo.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group")
} /* end if */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Iterate over the links in the group, building a table of the link messages */
- if((ret_value = H5G__dense_iterate(grp_oloc->file, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__dense_iterate(grp_oloc->file, dxpl_id, &linfo, idx_type, order, skip,
+ last_lnk, op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links")
} /* end if */
else {
/* Get the object's name from the link messages */
- if((ret_value = H5G__compact_iterate(grp_oloc, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__compact_iterate(grp_oloc, dxpl_id, &linfo, idx_type, order, skip, last_lnk,
+ op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Iterate over symbol table */
- if((ret_value = H5G__stab_iterate(grp_oloc, dxpl_id, order, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__stab_iterate(grp_oloc, dxpl_id, order, skip, last_lnk, op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table")
} /* end else */
@@ -710,7 +681,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_info
*
@@ -719,7 +689,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 27 2006
*
*-------------------------------------------------------------------------
@@ -727,13 +696,13 @@ done:
herr_t
H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
{
- H5G_t *grp = NULL; /* Group to query */
- H5G_loc_t grp_loc; /* Entry of group to be queried */
- H5G_name_t grp_path; /* Group hier. path */
- H5O_loc_t grp_oloc; /* Group object location */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_t * grp = NULL; /* Group to query */
+ H5G_loc_t grp_loc; /* Entry of group to be queried */
+ H5G_name_t grp_path; /* Group hier. path */
+ H5O_loc_t grp_oloc; /* Group object location */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -747,49 +716,48 @@ H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
H5G_loc_reset(&grp_loc);
/* Deep copy (duplicate) of the group location object */
- if(H5O_loc_copy(&grp_oloc, oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(&grp_oloc, oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location")
/* Open the group */
- if(NULL == (grp = H5G_open(&grp_loc, dxpl_id)))
+ if (NULL == (grp = H5G_open(&grp_loc, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found")
/* Get information from the group */
grp_info->mounted = H5G_MOUNTED(grp);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Retrieve the information about the links */
- grp_info->nlinks = linfo.nlinks;
+ grp_info->nlinks = linfo.nlinks;
grp_info->max_corder = linfo.max_corder;
/* Check if the group is using compact or dense storage for its links */
- if(H5F_addr_defined(linfo.fheap_addr))
+ if (H5F_addr_defined(linfo.fheap_addr))
grp_info->storage_type = H5G_STORAGE_TYPE_DENSE;
else
grp_info->storage_type = H5G_STORAGE_TYPE_COMPACT;
} /* end if */
else {
/* Get the number of objects in this group by iterating over symbol table */
- if(H5G__stab_count(oloc, &grp_info->nlinks, dxpl_id) < 0)
+ if (H5G__stab_count(oloc, &grp_info->nlinks, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects")
/* Set the other information about the group */
grp_info->storage_type = H5G_STORAGE_TYPE_SYMBOL_TABLE;
- grp_info->max_corder = 0;
+ grp_info->max_corder = 0;
} /* end else */
done:
/* Clean up resources */
- if(grp && H5G_close(grp) < 0)
+ if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "unable to close queried group")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_info() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_get_name_by_idx
*
@@ -804,12 +772,12 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, char* name, size_t size, hid_t dxpl_id)
+H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ char *name, size_t size, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- ssize_t ret_value; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -817,35 +785,37 @@ H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type,
HDassert(oloc && oloc->file);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group")
} /* end if */
/* Check for dense link storage */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's name from the dense link storage */
- if((ret_value = H5G__dense_get_name_by_idx(oloc->file, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
+ if ((ret_value = H5G__dense_get_name_by_idx(oloc->file, dxpl_id, &linfo, idx_type, order, n, name,
+ size)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end if */
else {
/* Get the object's name from the link messages */
- if((ret_value = H5G__compact_get_name_by_idx(oloc, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
+ if ((ret_value =
+ H5G__compact_get_name_by_idx(oloc, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Get the object's name from the symbol table */
- if((ret_value = H5G__stab_get_name_by_idx(oloc, order, n, name, size, dxpl_id)) < 0)
+ if ((ret_value = H5G__stab_get_name_by_idx(oloc, order, n, name, size, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end else */
@@ -853,7 +823,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_get_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_remove_update_linfo
*
@@ -870,7 +839,7 @@ done:
static herr_t
H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -882,87 +851,90 @@ H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxp
linfo->nlinks--;
/* Reset the creation order min/max if there's no more links in group */
- if(linfo->nlinks == 0)
+ if (linfo->nlinks == 0)
linfo->max_corder = 0;
/* Check for transitioning out of dense storage, if we are using it */
- if(H5F_addr_defined(linfo->fheap_addr)) {
+ if (H5F_addr_defined(linfo->fheap_addr)) {
/* Check if there's no more links */
- if(linfo->nlinks == 0) {
+ if (linfo->nlinks == 0) {
/* Delete the dense storage */
- if(H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
+ if (H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage")
} /* end if */
/* Check for switching back to compact storage */
else {
- H5O_ginfo_t ginfo; /* Group info message */
+ H5O_ginfo_t ginfo; /* Group info message */
/* Get the group info */
- if(NULL == H5O_msg_read(oloc, H5O_GINFO_ID, &ginfo, dxpl_id))
+ if (NULL == H5O_msg_read(oloc, H5O_GINFO_ID, &ginfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
/* Check if we should switch from dense storage back to link messages */
- if(linfo->nlinks < ginfo.min_dense) {
- struct H5O_t *oh = NULL; /* Pointer to group's object header */
- H5G_link_table_t ltable; /* Table of links */
- hbool_t can_convert = TRUE; /* Whether converting to link messages is possible */
- size_t u; /* Local index */
+ if (linfo->nlinks < ginfo.min_dense) {
+ struct H5O_t * oh = NULL; /* Pointer to group's object header */
+ H5G_link_table_t ltable; /* Table of links */
+ hbool_t can_convert = TRUE; /* Whether converting to link messages is possible */
+ size_t u; /* Local index */
/* Build the table of links for this group */
- if(H5G__dense_build_table(oloc->file, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, &ltable) < 0)
+ if (H5G__dense_build_table(oloc->file, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE,
+ &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Pin the object header */
- if(NULL == (oh = H5O_pin(oloc, dxpl_id)))
+ if (NULL == (oh = H5O_pin(oloc, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header")
/* Inspect links in table for ones that can't be converted back
* into link message form (currently only links which can't fit
* into an object header message)
*/
- for(u = 0; u < linfo->nlinks; u++)
- if(H5O_msg_size_oh(oloc->file, oh, H5O_LINK_ID, &(ltable.lnks[u]), (size_t)0) >= H5O_MESG_MAX_SIZE) {
+ for (u = 0; u < linfo->nlinks; u++)
+ if (H5O_msg_size_oh(oloc->file, oh, H5O_LINK_ID, &(ltable.lnks[u]), (size_t)0) >=
+ H5O_MESG_MAX_SIZE) {
can_convert = FALSE;
break;
} /* end if */
/* If ok, insert links as link messages */
- if(can_convert) {
+ if (can_convert) {
/* Insert link messages into group */
- for(u = 0; u < linfo->nlinks; u++)
- if(H5O_msg_append_oh(oloc->file, dxpl_id, oh, H5O_LINK_ID, 0, H5O_UPDATE_TIME, &(ltable.lnks[u])) < 0) {
+ for (u = 0; u < linfo->nlinks; u++)
+ if (H5O_msg_append_oh(oloc->file, dxpl_id, oh, H5O_LINK_ID, 0, H5O_UPDATE_TIME,
+ &(ltable.lnks[u])) < 0) {
/* Release object header */
- if(H5O_unpin(oh) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
+ if (H5O_unpin(oh) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL,
+ "unable to unpin group object header")
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
} /* end if */
/* Remove the dense storage */
- if(H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
+ if (H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage")
} /* end if */
/* Release object header */
- if(H5O_unpin(oh) < 0)
+ if (H5O_unpin(oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
/* Free link table information */
- if(H5G__link_release_table(&ltable) < 0)
+ if (H5G__link_release_table(&ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
/* Update link info in the object header */
- if(H5O_msg_write(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, linfo, dxpl_id) < 0)
+ if (H5O_msg_write(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_remove_update_linfo() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_remove
*
@@ -979,10 +951,10 @@ done:
herr_t
H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -991,43 +963,42 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
HDassert(name && *name);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Using the new format for groups */
use_old_format = FALSE;
/* Check for dense or compact storage */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Remove object from the dense link storage */
- if(H5G__dense_remove(oloc->file, dxpl_id, &linfo, grp_full_path_r, name) < 0)
+ if (H5G__dense_remove(oloc->file, dxpl_id, &linfo, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end if */
else {
/* Remove object from the link messages */
- if(H5G__compact_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
+ if (H5G__compact_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Using the old format for groups */
use_old_format = TRUE;
/* Remove object from the symbol table */
- if(H5G__stab_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
+ if (H5G__stab_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
/* Update link info for a new-style group */
- if(!use_old_format)
- if(H5G_obj_remove_update_linfo(oloc, &linfo, dxpl_id) < 0)
+ if (!use_old_format)
+ if (H5G_obj_remove_update_linfo(oloc, &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_remove_by_idx
*
@@ -1042,13 +1013,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
+H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1056,13 +1027,13 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
HDassert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group")
} /* end if */
@@ -1070,41 +1041,41 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
use_old_format = FALSE;
/* Check for dense or compact storage */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Remove object from the dense link storage */
- if(H5G__dense_remove_by_idx(grp_oloc->file, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
+ if (H5G__dense_remove_by_idx(grp_oloc->file, dxpl_id, &linfo, grp_full_path_r, idx_type, order,
+ n) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end if */
else {
/* Remove object from compact link storage */
- if(H5G__compact_remove_by_idx(grp_oloc, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
+ if (H5G__compact_remove_by_idx(grp_oloc, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Using the old format for groups */
use_old_format = TRUE;
/* Remove object from the symbol table */
- if(H5G__stab_remove_by_idx(grp_oloc, dxpl_id, grp_full_path_r, order, n) < 0)
+ if (H5G__stab_remove_by_idx(grp_oloc, dxpl_id, grp_full_path_r, order, n) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
/* Update link info for a new-style group */
- if(!use_old_format) {
- if(H5G_obj_remove_update_linfo(grp_oloc, &linfo, dxpl_id) < 0)
+ if (!use_old_format)
+ if (H5G_obj_remove_update_linfo(grp_oloc, &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info")
- } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G__obj_lookup
*
@@ -1113,18 +1084,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2005
*
*-------------------------------------------------------------------------
*/
htri_t
-H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
- hid_t dxpl_id)
+H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- htri_t ret_value = FALSE; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1133,32 +1102,30 @@ H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
HDassert(name && *name);
/* Attempt to get the link info message for this group */
- if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for dense link storage */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's info from the dense link storage */
- if((ret_value = H5G__dense_lookup(grp_oloc->file, dxpl_id, &linfo, name, lnk)) < 0)
+ if ((ret_value = H5G__dense_lookup(grp_oloc->file, dxpl_id, &linfo, name, lnk)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end if */
else {
/* Get the object's info from the link messages */
- if((ret_value = H5G__compact_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
+ if ((ret_value = H5G__compact_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
- } /* end if */
- else {
+ } /* end if */
+ else
/* Get the object's info from the symbol table */
- if((ret_value = H5G__stab_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
- } /* end else */
+ if ((ret_value = H5G__stab_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__obj_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5G_obj_lookup_by_idx
*
@@ -1168,18 +1135,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5O_link_t *lnk, hid_t dxpl_id)
+H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ H5O_link_t *lnk, hid_t dxpl_id)
{
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1187,39 +1153,38 @@ H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type,
HDassert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info message for this group */
- if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
+ if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
+ if (idx_type == H5_INDEX_CRT_ORDER) {
/* Check if creation order is tracked */
- if(!linfo.track_corder)
+ if (!linfo.track_corder)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group")
} /* end if */
/* Check for dense link storage */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Get the link from the dense storage */
- if(H5G__dense_lookup_by_idx(grp_oloc->file, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
+ if (H5G__dense_lookup_by_idx(grp_oloc->file, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end if */
else {
/* Get the link from the link messages */
- if(H5G__compact_lookup_by_idx(grp_oloc, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
+ if (H5G__compact_lookup_by_idx(grp_oloc, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
+ if (idx_type != H5_INDEX_NAME)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Get the object's info from the symbol table */
- if(H5G__stab_lookup_by_idx(grp_oloc, order, n, lnk, dxpl_id) < 0)
+ if (H5G__stab_lookup_by_idx(grp_oloc, order, n, lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_lookup_by_idx() */
-
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 11cca01..3bb437a 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,78 +15,67 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Opkg.h" /* Object headers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-static void *H5O_group_get_copy_file_udata(void);
-static void H5O_group_free_copy_file_udata(void *udata);
-static htri_t H5O_group_isa(H5O_t *loc);
-static hid_t H5O_group_open(const H5G_loc_t *obj_loc, hid_t lapl_id,
- hid_t dxpl_id, hbool_t app_ref);
-static void *H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc,
- hid_t dxpl_id);
+static void * H5O_group_get_copy_file_udata(void);
+static void H5O_group_free_copy_file_udata(void *udata);
+static htri_t H5O_group_isa(H5O_t *loc);
+static hid_t H5O_group_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
+static void * H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
static H5O_loc_t *H5O_group_get_oloc(hid_t obj_id);
-static herr_t H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5_ih_info_t *bh_info);
-
+static herr_t H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
/* This message derives from H5O object class */
const H5O_obj_class_t H5O_OBJ_GROUP[1] = {{
- H5O_TYPE_GROUP, /* object type */
- "group", /* object name, for debugging */
- H5O_group_get_copy_file_udata, /* get 'copy file' user data */
+ H5O_TYPE_GROUP, /* object type */
+ "group", /* object name, for debugging */
+ H5O_group_get_copy_file_udata, /* get 'copy file' user data */
H5O_group_free_copy_file_udata, /* free 'copy file' user data */
- H5O_group_isa, /* "isa" message */
- H5O_group_open, /* open an object of this class */
- H5O_group_create, /* create an object of this class */
- H5O_group_get_oloc, /* get an object header location for an object */
- H5O_group_bh_info, /* get the index & heap info for an object */
- NULL /* flush an opened object of this class */
+ H5O_group_isa, /* "isa" message */
+ H5O_group_open, /* open an object of this class */
+ H5O_group_create, /* create an object of this class */
+ H5O_group_get_oloc, /* get an object header location for an object */
+ H5O_group_bh_info, /* get the index & heap info for an object */
+ NULL /* flush an opened object of this class */
}};
/* Declare the external free list to manage the H5O_ginfo_t struct */
H5FL_DEFINE(H5G_copy_file_ud_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_group_get_copy_file_udata
*
@@ -105,21 +94,20 @@ H5FL_DEFINE(H5G_copy_file_ud_t);
static void *
H5O_group_get_copy_file_udata(void)
{
- void *ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for the 'copy file' user data for copying groups.
* Currently this is only a ginfo, so there is no specific struct type for
* this operation. */
- if(NULL == (ret_value = H5FL_CALLOC(H5G_copy_file_ud_t)))
+ if (NULL == (ret_value = H5FL_CALLOC(H5G_copy_file_ud_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_get_copy_file_udata() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_free_copy_file_udata
*
@@ -152,7 +140,6 @@ H5O_group_free_copy_file_udata(void *_udata)
FUNC_LEAVE_NOAPI_VOID
} /* end H5O_group_free_copy_file_udata() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_isa
*
@@ -173,19 +160,19 @@ H5O_group_free_copy_file_udata(void *_udata)
static htri_t
H5O_group_isa(struct H5O_t *oh)
{
- htri_t stab_exists; /* Whether the 'stab' message is in the object header */
- htri_t linfo_exists; /* Whether the 'linfo' message is in the object header */
- htri_t ret_value; /* Return value */
+ htri_t stab_exists; /* Whether the 'stab' message is in the object header */
+ htri_t linfo_exists; /* Whether the 'linfo' message is in the object header */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(oh);
/* Check for any of the messages that indicate a group */
- if((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
- if((linfo_exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
+ if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
+ if ((linfo_exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
ret_value = (stab_exists > 0 || linfo_exists > 0);
@@ -193,7 +180,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_isa() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_open
*
@@ -210,30 +196,29 @@ done:
static hid_t
H5O_group_open(const H5G_loc_t *obj_loc, hid_t H5_ATTR_UNUSED lapl_id, hid_t dxpl_id, hbool_t app_ref)
{
- H5G_t *grp = NULL; /* Group opened */
- hid_t ret_value; /* Return value */
+ H5G_t *grp = NULL; /* Group opened */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_loc);
/* Open the group */
- if(NULL == (grp = H5G_open(obj_loc, dxpl_id)))
+ if (NULL == (grp = H5G_open(obj_loc, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an ID for the group */
- if((ret_value = H5I_register(H5I_GROUP, grp, app_ref)) < 0)
+ if ((ret_value = H5I_register(H5I_GROUP, grp, app_ref)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
done:
- if(ret_value < 0)
- if(grp && H5G_close(grp) < 0)
+ if (ret_value < 0)
+ if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_open() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_create
*
@@ -250,9 +235,9 @@ done:
static void *
H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
{
- H5G_obj_create_t *crt_info = (H5G_obj_create_t *)_crt_info; /* Group creation parameters */
- H5G_t *grp = NULL; /* New group created */
- void *ret_value; /* Return value */
+ H5G_obj_create_t *crt_info = (H5G_obj_create_t *)_crt_info; /* Group creation parameters */
+ H5G_t * grp = NULL; /* New group created */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -262,27 +247,26 @@ H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
HDassert(obj_loc);
/* Create the the group */
- if(NULL == (grp = H5G__create(f, crt_info, dxpl_id)))
+ if (NULL == (grp = H5G__create(f, crt_info, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group")
/* Set up the new group's location */
- if(NULL == (obj_loc->oloc = H5G_oloc(grp)))
+ if (NULL == (obj_loc->oloc = H5G_oloc(grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of group")
- if(NULL == (obj_loc->path = H5G_nameof(grp)))
+ if (NULL == (obj_loc->path = H5G_nameof(grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of group")
/* Set the return value */
ret_value = grp;
done:
- if(ret_value == NULL)
- if(grp && H5G_close(grp) < 0)
+ if (ret_value == NULL)
+ if (grp && H5G_close(grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "unable to release group")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_get_oloc
*
@@ -299,24 +283,23 @@ done:
static H5O_loc_t *
H5O_group_get_oloc(hid_t obj_id)
{
- H5G_t *grp; /* Group opened */
- H5O_loc_t *ret_value; /* Return value */
+ H5G_t * grp; /* Group opened */
+ H5O_loc_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get the group */
- if(NULL == (grp = (H5G_t *)H5I_object(obj_id)))
+ if (NULL == (grp = (H5G_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_OHDR, H5E_BADATOM, NULL, "couldn't get object from ID")
/* Get the group's object header location */
- if(NULL == (ret_value = H5G_oloc(grp)))
+ if (NULL == (ret_value = H5G_oloc(grp)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_get_oloc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_group_bh_info
*
@@ -333,11 +316,11 @@ done:
static herr_t
H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
{
- htri_t exists; /* Flag if header message of interest exists */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t exists; /* Flag if header message of interest exists */
+ H5HF_t *fheap = NULL; /* Fractal heap handle */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -347,69 +330,70 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HDassert(bh_info);
/* Check for "new style" group info */
- if((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
- if(exists > 0) {
- H5O_linfo_t linfo; /* Link info message */
+ if ((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
+ if (exists > 0) {
+ H5O_linfo_t linfo; /* Link info message */
/* Get "new style" group info */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LINFO_ID, &linfo))
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't read LINFO message")
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LINFO_ID, &linfo))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't read LINFO message")
/* Check if name index available */
- if(H5F_addr_defined(linfo.name_bt2_addr)) {
+ if (H5F_addr_defined(linfo.name_bt2_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Get name index B-tree size */
- if(H5B2_size(bt2_name, dxpl_id, &bh_info->index_size) < 0)
+ if (H5B2_size(bt2_name, dxpl_id, &bh_info->index_size) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info for name index")
} /* end if */
/* Check if creation order index available */
- if(H5F_addr_defined(linfo.corder_bt2_addr)) {
+ if (H5F_addr_defined(linfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo.corder_bt2_addr, NULL)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
+ if (NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo.corder_bt2_addr, NULL)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for creation order index")
/* Get creation order index B-tree size */
- if(H5B2_size(bt2_corder, dxpl_id, &bh_info->index_size) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info for creation order index")
+ if (H5B2_size(bt2_corder, dxpl_id, &bh_info->index_size) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL,
+ "can't retrieve B-tree storage info for creation order index")
} /* end if */
/* Get fractal heap size, if available */
- if(H5F_addr_defined(linfo.fheap_addr)) {
+ if (H5F_addr_defined(linfo.fheap_addr)) {
/* Open the fractal heap for links */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, linfo.fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, linfo.fheap_addr)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Get heap storage size */
- if(H5HF_size(fheap, dxpl_id, &bh_info->heap_size) < 0)
+ if (H5HF_size(fheap, dxpl_id, &bh_info->heap_size) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info")
} /* end if */
- } /* end if */
+ } /* end if */
else {
- H5O_stab_t stab; /* Info about symbol table */
+ H5O_stab_t stab; /* Info about symbol table */
/* Must be "old style" group, get symbol table message */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab))
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages")
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages")
/* Get symbol table size info */
- if(H5G__stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
+ if (H5G__stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info")
} /* end else */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_group_bh_info() */
-
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index f49ef26..b962739 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -1,4 +1,4 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, September 18, 1997
*
* Purpose: This file contains declarations which are visible
@@ -30,32 +30,30 @@
#include "H5Gprivate.h"
/* Other private headers needed by this file */
-#include "H5B2private.h" /* v2 B-trees */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HFprivate.h" /* Fractal heaps */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5B2private.h" /* v2 B-trees */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFprivate.h" /* Fractal heaps */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5SLprivate.h" /* Skip lists */
/**************************/
/* Package Private Macros */
/**************************/
/* Standard length of fractal heap ID for link */
-#define H5G_DENSE_FHEAP_ID_LEN 7
+#define H5G_DENSE_FHEAP_ID_LEN 7
/* Size of a symbol table node on disk */
-#define H5G_NODE_SIZE(f) ( \
- /* General metadata fields */ \
- H5_SIZEOF_MAGIC \
- + 1 /* Version */ \
- + 1 /* Reserved */ \
- + 2 /* Number of symbols */ \
- \
- /* Entries */ \
- + ((2 * H5F_SYM_LEAF_K(f)) * H5G_SIZEOF_ENTRY(f)) \
- )
-
+#define H5G_NODE_SIZE(f) \
+ ( /* General metadata fields */ \
+ H5_SIZEOF_MAGIC /*magic number */ \
+ + 1 /* Version */ \
+ + 1 /* Reserved */ \
+ + 2 /* Number of symbols */ \
+ \
+ /* Entries */ \
+ + ((2 * H5F_SYM_LEAF_K(f)) * H5G_SIZEOF_ENTRY(f)))
/****************************/
/* Package Private Typedefs */
@@ -68,12 +66,12 @@
* symbol table entry.
*/
typedef enum H5G_cache_type_t {
- H5G_CACHED_ERROR = -1, /*force enum to be signed */
- H5G_NOTHING_CACHED = 0, /*nothing is cached, must be 0 */
- H5G_CACHED_STAB = 1, /*symbol table, `stab' */
- H5G_CACHED_SLINK = 2, /*symbolic link */
+ H5G_CACHED_ERROR = -1, /*force enum to be signed */
+ H5G_NOTHING_CACHED = 0, /*nothing is cached, must be 0 */
+ H5G_CACHED_STAB = 1, /*symbol table, `stab' */
+ H5G_CACHED_SLINK = 2, /*symbolic link */
- H5G_NCACHED /*THIS MUST BE LAST */
+ H5G_NCACHED /*THIS MUST BE LAST */
} H5G_cache_type_t;
/*
@@ -85,12 +83,12 @@ typedef enum H5G_cache_type_t {
*/
typedef union H5G_cache_t {
struct {
- haddr_t btree_addr; /*file address of symbol table B-tree*/
- haddr_t heap_addr; /*file address of stab name heap */
+ haddr_t btree_addr; /*file address of symbol table B-tree*/
+ haddr_t heap_addr; /*file address of stab name heap */
} stab;
struct {
- size_t lval_offset; /*link value offset */
+ size_t lval_offset; /*link value offset */
} slink;
} H5G_cache_t;
@@ -101,10 +99,10 @@ typedef union H5G_cache_t {
* points.
*/
struct H5G_entry_t {
- H5G_cache_type_t type; /*type of information cached */
- H5G_cache_t cache; /*cached data from object header */
- size_t name_off; /*offset of name within name heap */
- haddr_t header; /*file address of object header */
+ H5G_cache_type_t type; /*type of information cached */
+ H5G_cache_t cache; /*cached data from object header */
+ size_t name_off; /*offset of name within name heap */
+ haddr_t header; /*file address of object header */
};
/*
@@ -114,19 +112,19 @@ struct H5G_entry_t {
* table or group.
*/
typedef struct H5G_node_t {
- H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
- /* first field in structure */
- size_t node_size; /* Size of node on disk */
- unsigned nsyms; /* Number of symbols */
- H5G_entry_t *entry; /* Array of symbol table entries */
+ H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
+ /* first field in structure */
+ size_t node_size; /* Size of node on disk */
+ unsigned nsyms; /* Number of symbols */
+ H5G_entry_t *entry; /* Array of symbol table entries */
} H5G_node_t;
/*
* Shared information for all open group objects
*/
struct H5G_shared_t {
- int fo_count; /* open file object count */
- hbool_t mounted; /* Group is mount point */
+ int fo_count; /* open file object count */
+ hbool_t mounted; /* Group is mount point */
};
/*
@@ -134,9 +132,9 @@ struct H5G_shared_t {
* above the H5G layer.
*/
struct H5G_t {
- H5G_shared_t *shared; /* Shared file object data */
- H5O_loc_t oloc; /* Object location for group */
- H5G_name_t path; /* Group hierarchy path */
+ H5G_shared_t *shared; /* Shared file object data */
+ H5O_loc_t oloc; /* Object location for group */
+ H5G_name_t path; /* Group hierarchy path */
};
/* Link iteration operator for internal library callbacks */
@@ -144,8 +142,8 @@ typedef herr_t (*H5G_lib_iterate_t)(const H5O_link_t *lnk, void *op_data);
/* Data structure to hold table of links for a group */
typedef struct {
- size_t nlinks; /* # of links in table */
- H5O_link_t *lnks; /* Pointer to array of links */
+ size_t nlinks; /* # of links in table */
+ H5O_link_t *lnks; /* Pointer to array of links */
} H5G_link_table_t;
/*
@@ -158,8 +156,8 @@ typedef struct {
*/
typedef struct H5G_bt_common_t {
/* downward */
- const char *name; /*points to temporary memory */
- H5HL_t *heap; /*symbol table heap */
+ const char *name; /*points to temporary memory */
+ H5HL_t * heap; /*symbol table heap */
} H5G_bt_common_t;
/*
@@ -168,10 +166,10 @@ typedef struct H5G_bt_common_t {
*/
typedef struct H5G_bt_ins_t {
/* downward */
- H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
- const H5O_link_t *lnk; /* Link to insert into table */
- H5O_type_t obj_type; /* Type of object being inserted */
- const void *crt_info; /* Creation info for object being inserted */
+ H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
+ const H5O_link_t *lnk; /* Link to insert into table */
+ H5O_type_t obj_type; /* Type of object being inserted */
+ const void * crt_info; /* Creation info for object being inserted */
} H5G_bt_ins_t;
/*
@@ -180,12 +178,12 @@ typedef struct H5G_bt_ins_t {
*/
typedef struct H5G_bt_rm_t {
/* downward */
- H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
- H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
+ H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
+ H5RS_str_t * grp_full_path_r; /* Full path of group where link is removed */
} H5G_bt_rm_t;
/* Typedef for B-tree 'find' operation */
-typedef herr_t (*H5G_bt_find_op_t)(const H5G_entry_t *ent/*in*/, void *operator_data/*in,out*/);
+typedef herr_t (*H5G_bt_find_op_t)(const H5G_entry_t *ent /*in*/, void *operator_data /*in,out*/);
/*
* Data exchange structure for symbol table nodes. This structure is
@@ -193,9 +191,9 @@ typedef herr_t (*H5G_bt_find_op_t)(const H5G_entry_t *ent/*in*/, void *operator_
*/
typedef struct H5G_bt_lkp_t {
/* downward */
- H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
- H5G_bt_find_op_t op; /* Operator to call when correct entry is found */
- void *op_data; /* Data to pass to operator */
+ H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */
+ H5G_bt_find_op_t op; /* Operator to call when correct entry is found */
+ void * op_data; /* Data to pass to operator */
/* upward */
} H5G_bt_lkp_t;
@@ -206,40 +204,40 @@ typedef struct H5G_bt_lkp_t {
*/
typedef struct H5G_bt_it_it_t {
/* downward */
- H5HL_t *heap; /*symbol table heap */
- hsize_t skip; /*initial entries to skip */
- H5G_lib_iterate_t op; /*iteration operator */
- void *op_data; /*user-defined operator data */
+ H5HL_t * heap; /*symbol table heap */
+ hsize_t skip; /*initial entries to skip */
+ H5G_lib_iterate_t op; /*iteration operator */
+ void * op_data; /*user-defined operator data */
/* upward */
- hsize_t *final_ent; /*final entry looked at */
+ hsize_t *final_ent; /*final entry looked at */
} H5G_bt_it_it_t;
/* Data passed through B-tree iteration for copying copy symbol table content */
typedef struct H5G_bt_it_cpy_t {
- const H5O_loc_t *src_oloc; /* Source object location */
- haddr_t src_heap_addr; /* Heap address of the source symbol table */
- H5F_t *dst_file; /* File of destination group */
- const H5O_stab_t *dst_stab; /* Symbol table message for destination group */
- H5O_copy_t *cpy_info; /* Information for copy operation */
+ const H5O_loc_t * src_oloc; /* Source object location */
+ haddr_t src_heap_addr; /* Heap address of the source symbol table */
+ H5F_t * dst_file; /* File of destination group */
+ const H5O_stab_t *dst_stab; /* Symbol table message for destination group */
+ H5O_copy_t * cpy_info; /* Information for copy operation */
} H5G_bt_it_cpy_t;
/* Common information for "by index" lookups in symbol tables */
typedef struct H5G_bt_it_idx_common_t {
/* downward */
- hsize_t idx; /* Index of group member to be queried */
- hsize_t num_objs; /* The number of objects having been traversed */
- H5G_bt_find_op_t op; /* Operator to call when correct entry is found */
+ hsize_t idx; /* Index of group member to be queried */
+ hsize_t num_objs; /* The number of objects having been traversed */
+ H5G_bt_find_op_t op; /* Operator to call when correct entry is found */
} H5G_bt_it_idx_common_t;
/* Data passed through B-tree iteration for building a table of the links */
typedef struct H5G_bt_it_bt_t {
/* downward */
- size_t alloc_nlinks; /* Number of links allocated in table */
- H5HL_t *heap; /* Symbol table heap */
+ size_t alloc_nlinks; /* Number of links allocated in table */
+ H5HL_t *heap; /* Symbol table heap */
/* upward */
- H5G_link_table_t *ltable; /* Link table to add information to */
+ H5G_link_table_t *ltable; /* Link table to add information to */
} H5G_bt_it_bt_t;
/* Typedefs for "new format" groups */
@@ -248,8 +246,8 @@ typedef struct H5G_bt_it_bt_t {
/* Typedef for native 'name' field index records in the v2 B-tree */
/* (Keep 'id' field first so generic record handling in callbacks works) */
typedef struct H5G_dense_bt2_name_rec_t {
- uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID for link */
- uint32_t hash; /* Hash of 'name' field value */
+ uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID for link */
+ uint32_t hash; /* Hash of 'name' field value */
} H5G_dense_bt2_name_rec_t;
/* Typedef for native 'creation order' field index records in the v2 B-tree */
@@ -266,14 +264,14 @@ typedef struct H5G_dense_bt2_corder_rec_t {
*/
typedef struct H5G_bt2_ud_common_t {
/* downward */
- H5F_t *f; /* Pointer to file that fractal heap is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5HF_t *fheap; /* Fractal heap handle */
- const char *name; /* Name of link to compare */
- uint32_t name_hash; /* Hash of name of link to compare */
- int64_t corder; /* Creation order value of link to compare */
- H5B2_found_t found_op; /* Callback when correct link is found */
- void *found_op_data; /* Callback data when correct link is found */
+ H5F_t * f; /* Pointer to file that fractal heap is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5HF_t * fheap; /* Fractal heap handle */
+ const char * name; /* Name of link to compare */
+ uint32_t name_hash; /* Hash of name of link to compare */
+ int64_t corder; /* Creation order value of link to compare */
+ H5B2_found_t found_op; /* Callback when correct link is found */
+ void * found_op_data; /* Callback data when correct link is found */
} H5G_bt2_ud_common_t;
/*
@@ -282,25 +280,24 @@ typedef struct H5G_bt2_ud_common_t {
*/
typedef struct H5G_bt2_ud_ins_t {
/* downward */
- H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
- uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID of link to insert */
+ H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
+ uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID of link to insert */
} H5G_bt2_ud_ins_t;
/* Typedef for group creation operation */
-typedef struct H5G_obj_create_t{
- hid_t gcpl_id; /* Group creation property list */
+typedef struct H5G_obj_create_t {
+ hid_t gcpl_id; /* Group creation property list */
H5G_cache_type_t cache_type; /* Type of symbol table entry cache */
- H5G_cache_t cache; /* Cached data for symbol table entry */
+ H5G_cache_t cache; /* Cached data for symbol table entry */
} H5G_obj_create_t;
/* Callback information for copying groups */
typedef struct H5G_copy_file_ud_t {
- H5O_copy_file_ud_common_t common; /* Shared information (must be first) */
- H5G_cache_type_t cache_type; /* Type of symbol table entry cache */
- H5G_cache_t cache; /* Cached data for symbol table entry */
+ H5O_copy_file_ud_common_t common; /* Shared information (must be first) */
+ H5G_cache_type_t cache_type; /* Type of symbol table entry cache */
+ H5G_cache_t cache; /* Cached data for symbol table entry */
} H5G_copy_file_ud_t;
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -332,25 +329,23 @@ H5FL_EXTERN(H5G_shared_t);
/*
* General group routines
*/
-H5_DLL H5G_t *H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info,
- hid_t dxpl_id);
-H5_DLL H5G_t *H5G__create_named(const H5G_loc_t *loc, const char *name,
- hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id);
-H5_DLL H5G_t *H5G__open_name(const H5G_loc_t *loc, const char *name,
- hid_t gapl_id, hid_t dxpl_id);
+H5_DLL H5G_t *H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id);
+H5_DLL H5G_t *H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t gcpl_id,
+ hid_t gapl_id, hid_t dxpl_id);
+H5_DLL H5G_t *H5G__open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id, hid_t dxpl_id);
/*
* Group hierarchy traversal routines
*/
-H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc,
- const H5O_link_t *lnk, unsigned target, size_t *nlinks, hbool_t last_comp,
- H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target,
+ size_t *nlinks, hbool_t last_comp, H5G_loc_t *obj_loc,
+ hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
/*
* Utility functions
*/
-H5_DLL herr_t H5G__init(void);
-H5_DLL herr_t H5G__term_deprec_interface(void);
+H5_DLL herr_t H5G__init(void);
+H5_DLL herr_t H5G__term_deprec_interface(void);
H5_DLL const char *H5G__component(const char *name, size_t *size_p);
/*
@@ -358,155 +353,131 @@ H5_DLL const char *H5G__component(const char *name, size_t *size_p);
* functions that understand names are exported to the rest of
* the library and appear in H5Gprivate.h.
*/
-H5_DLL herr_t H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id,
- const H5O_ginfo_t *ginfo, H5O_stab_t *stab);
-H5_DLL herr_t H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
- hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab,
- const char *name, H5O_link_t *obj_lnk, H5O_type_t obj_type,
- const void *crt_info, hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab);
-H5_DLL herr_t H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
- hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
-H5_DLL herr_t H5G__stab_count(struct H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
- H5_ih_info_t *bh_info);
-H5_DLL ssize_t H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order,
- hsize_t n, char* name, size_t size, hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_remove(const H5O_loc_t *oloc, hid_t dxpl_id,
- H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G__stab_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- H5RS_str_t *grp_full_path_r, H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL herr_t H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order,
- hsize_t n, H5O_link_t *lnk, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
+ H5O_stab_t *stab);
+H5_DLL herr_t H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
+ H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_link_t *obj_lnk,
+ H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab);
+H5_DLL herr_t H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
+H5_DLL herr_t H5G__stab_count(struct H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab, H5_ih_info_t *bh_info);
+H5_DLL ssize_t H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n, char *name,
+ size_t size, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+ const char *name);
+H5_DLL herr_t H5G__stab_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+ H5_iter_order_t order, hsize_t n);
+H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
+ H5O_link_t *lnk, hid_t dxpl_id);
#ifndef H5_STRICT_FORMAT_CHECKS
-H5_DLL herr_t H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id,
- H5O_stab_t *alt_stab);
+H5_DLL herr_t H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab);
#endif /* H5_STRICT_FORMAT_CHECKS */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
- hid_t dxpl_id);
+H5_DLL H5G_obj_t H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
/*
* Functions that understand symbol table entries.
*/
-H5_DLL void H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src,
- H5_copy_depth_t depth);
-H5_DLL void H5G__ent_reset(H5G_entry_t *ent);
-H5_DLL herr_t H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp,
- const uint8_t *p_end, H5G_entry_t *ent, unsigned n);
-H5_DLL herr_t H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp,
- const H5G_entry_t *ent, unsigned n);
-H5_DLL herr_t H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap,
- const char *name, const H5O_link_t *lnk, H5O_type_t obj_type,
- const void *crt_info, H5G_entry_t *ent);
-H5_DLL herr_t H5G__ent_debug(const H5G_entry_t *ent, FILE * stream, int indent,
- int fwidth, const H5HL_t *heap);
+H5_DLL void H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth);
+H5_DLL void H5G__ent_reset(H5G_entry_t *ent);
+H5_DLL herr_t H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5G_entry_t *ent,
+ unsigned n);
+H5_DLL herr_t H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsigned n);
+H5_DLL herr_t H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name, const H5O_link_t *lnk,
+ H5O_type_t obj_type, const void *crt_info, H5G_entry_t *ent);
+H5_DLL herr_t H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
+ const H5HL_t *heap);
/* Functions that understand symbol table nodes */
H5_DLL herr_t H5G__node_init(H5F_t *f);
-H5_DLL int H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
-H5_DLL int H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
-H5_DLL int H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
-H5_DLL int H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
+H5_DLL int H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key,
+ void *_udata);
+H5_DLL int H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key,
+ void *_udata);
+H5_DLL int H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key,
+ void *_udata);
+H5_DLL int H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, const void *_rt_key,
+ void *_udata);
H5_DLL int H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
+ const void *_rt_key, void *_udata);
H5_DLL herr_t H5G__node_iterate_size(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
- const void *_rt_key, void *_udata);
+ const void *_rt_key, void *_udata);
H5_DLL herr_t H5G__node_free(H5G_node_t *sym);
/* Functions that understand links in groups */
-H5_DLL herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
- const H5G_entry_t *ent, const char *name);
-H5_DLL herr_t H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc);
-H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
- H5_iter_order_t order);
-H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable,
- hsize_t skip, hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data);
+H5_DLL herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, const char *name);
+H5_DLL herr_t H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc);
+H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_order_t order);
+H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip, hsize_t *last_lnk,
+ const H5G_lib_iterate_t op, void *op_data);
H5_DLL herr_t H5G__link_release_table(H5G_link_table_t *ltable);
-H5_DLL herr_t H5G__link_name_replace(H5F_t *file, hid_t dxpl_id,
- H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk);
+H5_DLL herr_t H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+ const H5O_link_t *lnk);
/* Functions that understand "compact" link storage */
-H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
- hid_t dxpl_id);
-H5_DLL ssize_t H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t idx, char *name, size_t size);
-H5_DLL herr_t H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id,
- H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
-H5_DLL htri_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL herr_t H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, H5O_link_t *lnk);
+H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk, hid_t dxpl_id);
+H5_DLL ssize_t H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t idx,
+ char *name, size_t size);
+H5_DLL herr_t H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+ const char *name);
+H5_DLL herr_t H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n);
+H5_DLL herr_t H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
+H5_DLL htri_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ H5O_link_t *lnk);
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
- const H5O_linfo_t *linfo, hsize_t idx);
+H5_DLL H5G_obj_t H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ hsize_t idx);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Functions that understand "dense" link storage */
-H5_DLL herr_t H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable);
-H5_DLL herr_t H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
- const H5O_pline_t *pline);
-H5_DLL herr_t H5G__dense_insert(H5F_t *f, hid_t dxpl_id,
- const H5O_linfo_t *linfo, const H5O_link_t *lnk);
-H5_DLL htri_t H5G__dense_lookup(H5F_t *f, hid_t dxpl_id,
- const H5O_linfo_t *linfo, const char *name, H5O_link_t *lnk);
-H5_DLL herr_t H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, H5O_link_t *lnk);
-H5_DLL herr_t H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- H5G_lib_iterate_t op, void *op_data);
-H5_DLL ssize_t H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id,
- H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- char *name, size_t size);
-H5_DLL herr_t H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
- H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id,
- const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
- hbool_t adj_link);
+H5_DLL herr_t H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, H5G_link_table_t *ltable);
+H5_DLL herr_t H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, const H5O_pline_t *pline);
+H5_DLL herr_t H5G__dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, const H5O_link_t *lnk);
+H5_DLL htri_t H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, const char *name,
+ H5O_link_t *lnk);
+H5_DLL herr_t H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5O_link_t *lnk);
+H5_DLL herr_t H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op,
+ void *op_data);
+H5_DLL ssize_t H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, char *name, size_t size);
+H5_DLL herr_t H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5RS_str_t *grp_full_path_r, const char *name);
+H5_DLL herr_t H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+ H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n);
+H5_DLL herr_t H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link);
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id,
- H5O_linfo_t *linfo, hsize_t idx);
+H5_DLL H5G_obj_t H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hsize_t idx);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Functions that understand group objects */
-H5_DLL herr_t H5G__obj_create(H5F_t *f, hid_t dxpl_id,
- H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/);
-H5_DLL herr_t H5G__obj_create_real(H5F_t *f, hid_t dxpl_id,
- const H5O_ginfo_t *ginfo, const H5O_linfo_t *linfo,
- const H5O_pline_t *pline, H5G_obj_create_t *gcrt_info,
- H5O_loc_t *oloc/*out*/);
-H5_DLL htri_t H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo,
- hid_t dxpl_id);
-H5_DLL herr_t H5G__obj_iterate(const H5O_loc_t *grp_oloc,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id);
+H5_DLL herr_t H5G__obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/);
+H5_DLL herr_t H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
+ const H5O_linfo_t *linfo, const H5O_pline_t *pline,
+ H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/);
+H5_DLL htri_t H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id);
+H5_DLL herr_t H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data,
+ hid_t dxpl_id);
H5_DLL herr_t H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id);
-H5_DLL htri_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *lnk, hid_t dxpl_id);
+H5_DLL htri_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk, hid_t dxpl_id);
/*
* These functions operate on group hierarchy names.
@@ -517,8 +488,8 @@ H5_DLL herr_t H5G__name_init(H5G_name_t *name, const char *path);
* These functions operate on group "locations"
*/
H5_DLL herr_t H5G__loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth);
-H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, const char *name,
- H5G_loc_t *obj_loc, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id);
+H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type,
+ const void *crt_info, hid_t dxpl_id);
/* Testing functions */
#ifdef H5G_TESTING
@@ -528,10 +499,10 @@ H5_DLL htri_t H5G__has_stab_test(hid_t gid);
H5_DLL htri_t H5G__is_new_dense_test(hid_t gid);
H5_DLL herr_t H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count);
H5_DLL herr_t H5G__lheap_size_test(hid_t gid, size_t *lheap_size);
-H5_DLL herr_t H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *user_path_hidden);
+H5_DLL herr_t H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len,
+ unsigned *user_path_hidden);
H5_DLL herr_t H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent);
H5_DLL herr_t H5G__verify_cached_stabs_test(hid_t gid);
#endif /* H5G_TESTING */
#endif /* _H5Gpkg_H */
-
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index c37721a..cc161d5 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gprivate.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Library-visible declarations.
*
@@ -29,43 +29,37 @@
#include "H5Gpublic.h"
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5Bprivate.h" /* B-trees */
-#include "H5Fprivate.h" /* File access */
-#include "H5RSprivate.h" /* Reference-counted strings */
-
-/*
- * Define this to enable debugging.
- */
-#ifdef NDEBUG
-# undef H5G_DEBUG
-#endif
+#include "H5private.h" /* Generic Functions */
+#include "H5Bprivate.h" /* B-trees */
+#include "H5Fprivate.h" /* File access */
+#include "H5RSprivate.h" /* Reference-counted strings */
/*
* The disk size for a symbol table entry...
*/
-#define H5G_SIZEOF_SCRATCH 16
-#define H5G_SIZEOF_ENTRY(F) \
- (H5F_SIZEOF_SIZE(F) + /*offset of name into heap */ \
- H5F_SIZEOF_ADDR(F) + /*address of object header */ \
- 4 + /*entry type */ \
- 4 + /*reserved */ \
- H5G_SIZEOF_SCRATCH) /*scratch pad space */
+#define H5G_SIZEOF_SCRATCH 16
+#define H5G_SIZEOF_ENTRY(F) \
+ (H5F_SIZEOF_SIZE(F) + /*offset of name into heap */ \
+ H5F_SIZEOF_ADDR(F) + /*address of object header */ \
+ 4 + /*entry type */ \
+ 4 + /*reserved */ \
+ H5G_SIZEOF_SCRATCH) /*scratch pad space */
/* ========= Group Creation properties ============ */
/* Defaults for link info values */
-#define H5G_CRT_LINFO_TRACK_CORDER FALSE
-#define H5G_CRT_LINFO_INDEX_CORDER FALSE
-#define H5G_CRT_LINFO_NLINKS 0
-#define H5G_CRT_LINFO_MAX_CORDER 0
-#define H5G_CRT_LINFO_LINK_FHEAP_ADDR HADDR_UNDEF
-#define H5G_CRT_LINFO_NAME_BT2_ADDR HADDR_UNDEF
-#define H5G_CRT_LINFO_CORDER_BT2_ADDR HADDR_UNDEF
+#define H5G_CRT_LINFO_TRACK_CORDER FALSE
+#define H5G_CRT_LINFO_INDEX_CORDER FALSE
+#define H5G_CRT_LINFO_NLINKS 0
+#define H5G_CRT_LINFO_MAX_CORDER 0
+#define H5G_CRT_LINFO_LINK_FHEAP_ADDR HADDR_UNDEF
+#define H5G_CRT_LINFO_NAME_BT2_ADDR HADDR_UNDEF
+#define H5G_CRT_LINFO_CORDER_BT2_ADDR HADDR_UNDEF
/* Definitions for link info settings */
-#define H5G_CRT_LINK_INFO_NAME "link info"
-#define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t)
+#define H5G_CRT_LINK_INFO_NAME "link info"
+#define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t)
+/* clang-format off */
#define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_TRACK_CORDER, \
H5G_CRT_LINFO_INDEX_CORDER, \
H5G_CRT_LINFO_MAX_CORDER, \
@@ -74,19 +68,21 @@
H5G_CRT_LINFO_LINK_FHEAP_ADDR, \
H5G_CRT_LINFO_NAME_BT2_ADDR \
}
+/* clang-format on */
/* Defaults for group info values */
-#define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0
-#define H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE FALSE
-#define H5G_CRT_GINFO_MAX_COMPACT 8
-#define H5G_CRT_GINFO_MIN_DENSE 6
-#define H5G_CRT_GINFO_STORE_EST_ENTRY_INFO FALSE
-#define H5G_CRT_GINFO_EST_NUM_ENTRIES 4
-#define H5G_CRT_GINFO_EST_NAME_LEN 8
+#define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0
+#define H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE FALSE
+#define H5G_CRT_GINFO_MAX_COMPACT 8
+#define H5G_CRT_GINFO_MIN_DENSE 6
+#define H5G_CRT_GINFO_STORE_EST_ENTRY_INFO FALSE
+#define H5G_CRT_GINFO_EST_NUM_ENTRIES 4
+#define H5G_CRT_GINFO_EST_NAME_LEN 8
/* Definitions for group info settings */
-#define H5G_CRT_GROUP_INFO_NAME "group info"
-#define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t)
+#define H5G_CRT_GROUP_INFO_NAME "group info"
+#define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t)
+/* clang-format off */
#define H5G_CRT_GROUP_INFO_DEF {H5G_CRT_GINFO_LHEAP_SIZE_HINT, \
H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE, \
H5G_CRT_GINFO_MAX_COMPACT, \
@@ -95,12 +91,13 @@
H5G_CRT_GINFO_EST_NUM_ENTRIES, \
H5G_CRT_GINFO_EST_NAME_LEN \
}
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5G_PACKAGE
-#define H5G_MOUNTED(G) ((G)->shared->mounted)
+#define H5G_MOUNTED(G) ((G)->shared->mounted)
#else /* H5G_PACKAGE */
-#define H5G_MOUNTED(G) (H5G_mounted(G))
+#define H5G_MOUNTED(G) (H5G_mounted(G))
#endif /* H5G_PACKAGE */
/*
@@ -108,34 +105,34 @@
* a symbolic link or a mount point. The normal operation is to follow the
* symbolic link or mount point and return information about its target.
*/
-#define H5G_TARGET_NORMAL 0x0000
-#define H5G_TARGET_SLINK 0x0001
-#define H5G_TARGET_MOUNT 0x0002
-#define H5G_TARGET_UDLINK 0x0004
-#define H5G_TARGET_EXISTS 0x0008
-#define H5G_CRT_INTMD_GROUP 0x0010
+#define H5G_TARGET_NORMAL 0x0000
+#define H5G_TARGET_SLINK 0x0001
+#define H5G_TARGET_MOUNT 0x0002
+#define H5G_TARGET_UDLINK 0x0004
+#define H5G_TARGET_EXISTS 0x0008
+#define H5G_CRT_INTMD_GROUP 0x0010
/* Type of operation being performed for call to H5G_name_replace() */
typedef enum {
- H5G_NAME_MOVE = 0, /* H5*move call */
- H5G_NAME_DELETE, /* H5Ldelete call */
- H5G_NAME_MOUNT, /* H5Fmount call */
- H5G_NAME_UNMOUNT /* H5Funmount call */
+ H5G_NAME_MOVE = 0, /* H5*move call */
+ H5G_NAME_DELETE, /* H5Ldelete call */
+ H5G_NAME_MOUNT, /* H5Fmount call */
+ H5G_NAME_UNMOUNT /* H5Funmount call */
} H5G_names_op_t;
/* Status returned from traversal callbacks; whether the object location
* or group location need to be closed */
-#define H5G_OWN_NONE 0
+#define H5G_OWN_NONE 0
#define H5G_OWN_OBJ_LOC 1
#define H5G_OWN_GRP_LOC 2
-#define H5G_OWN_BOTH 3
+#define H5G_OWN_BOTH 3
typedef int H5G_own_loc_t;
/* Structure to store information about the name an object was opened with */
typedef struct {
- H5RS_str_t *full_path_r; /* Path to object, as seen from root of current file mounting hierarchy */
- H5RS_str_t *user_path_r; /* Path to object, as opened by user */
- unsigned obj_hidden; /* Whether the object is visible in group hier. */
+ H5RS_str_t *full_path_r; /* Path to object, as seen from root of current file mounting hierarchy */
+ H5RS_str_t *user_path_r; /* Path to object, as opened by user */
+ unsigned obj_hidden; /* Whether the object is visible in group hier. */
} H5G_name_t;
/* Forward declarations (for prototypes & struct definitions) */
@@ -147,8 +144,8 @@ struct H5O_link_t;
* location and a group hierarchy path for the object.
*/
typedef struct {
- struct H5O_loc_t *oloc; /* Object header location */
- H5G_name_t *path; /* Group hierarchy path */
+ struct H5O_loc_t *oloc; /* Object header location */
+ H5G_name_t * path; /* Group hierarchy path */
} H5G_loc_t;
/* Typedef for path traversal operations */
@@ -161,45 +158,45 @@ typedef struct {
* H5G_OWN_GRP_LOC if it takes ownership of grp_loc, and H5G_OWN_NONE if obj_loc and
* grp_loc need to be deleted.
*/
-typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc/*in*/, const char *name,
- const struct H5O_link_t *lnk/*in*/, H5G_loc_t *obj_loc/*out*/, void *operator_data/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
+typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc /*in*/, const char *name,
+ const struct H5O_link_t *lnk /*in*/, H5G_loc_t *obj_loc /*out*/,
+ void *operator_data /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
/* Describe kind of callback to make for each link */
typedef enum H5G_link_iterate_op_type_t {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5G_LINK_OP_OLD, /* "Old" application callback */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5G_LINK_OP_NEW /* "New" application callback */
+ H5G_LINK_OP_OLD, /* "Old" application callback */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5G_LINK_OP_NEW /* "New" application callback */
} H5G_link_iterate_op_type_t;
typedef struct {
H5G_link_iterate_op_type_t op_type;
union {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5G_iterate_t op_old; /* "Old" application callback for each link */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5L_iterate_t op_new; /* "New" application callback for each link */
+ H5G_iterate_t op_old; /* "Old" application callback for each link */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5L_iterate_t op_new; /* "New" application callback for each link */
} op_func;
} H5G_link_iterate_t;
-typedef struct H5G_t H5G_t;
+typedef struct H5G_t H5G_t;
typedef struct H5G_shared_t H5G_shared_t;
-typedef struct H5G_entry_t H5G_entry_t;
+typedef struct H5G_entry_t H5G_entry_t;
/*
* Library prototypes... These are the ones that other packages routinely
* call.
*/
H5_DLL struct H5O_loc_t *H5G_oloc(H5G_t *grp);
-H5_DLL H5G_name_t * H5G_nameof(H5G_t *grp);
+H5_DLL H5G_name_t *H5G_nameof(H5G_t *grp);
H5_DLL H5F_t *H5G_fileof(H5G_t *grp);
-H5_DLL H5G_t *H5G_open(const H5G_loc_t *loc, hid_t dxpl_id);
-H5_DLL herr_t H5G_close(H5G_t *grp);
-H5_DLL herr_t H5G_get_shared_count(H5G_t *grp);
-H5_DLL herr_t H5G_mount(H5G_t *grp);
+H5_DLL H5G_t * H5G_open(const H5G_loc_t *loc, hid_t dxpl_id);
+H5_DLL herr_t H5G_close(H5G_t *grp);
+H5_DLL herr_t H5G_get_shared_count(H5G_t *grp);
+H5_DLL herr_t H5G_mount(H5G_t *grp);
H5_DLL hbool_t H5G_mounted(H5G_t *grp);
-H5_DLL herr_t H5G_unmount(H5G_t *grp);
+H5_DLL herr_t H5G_unmount(H5G_t *grp);
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL H5G_obj_t H5G_map_obj_type(H5O_type_t obj_type);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -212,17 +209,15 @@ H5_DLL char *H5G_normalize(const char *name);
/*
* Group hierarchy traversal routines
*/
-H5_DLL herr_t H5G_traverse(const H5G_loc_t *loc, const char *name,
- unsigned target, H5G_traverse_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id);
-H5_DLL herr_t H5G_iterate(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_visit(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, void *op_data,
- hid_t lapl_id, hid_t dxpl_id);
-
-/*
+H5_DLL herr_t H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traverse_t op,
+ void *op_data, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G_iterate(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t skip, hsize_t *last_lnk, const H5G_link_iterate_t *lnk_op, void *op_data,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ H5L_iterate_t op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
+
+/*
* Functions that understand links in groups
*/
H5_DLL herr_t H5G_link_to_info(const struct H5O_link_t *lnk, H5L_info_t *linfo);
@@ -230,25 +225,25 @@ H5_DLL herr_t H5G_link_to_info(const struct H5O_link_t *lnk, H5L_info_t *linfo);
/*
* Functions that understand group objects
*/
-H5_DLL herr_t H5G_obj_insert(const struct H5O_loc_t *grp_oloc, const char *name,
- struct H5O_link_t *obj_lnk, hbool_t adj_link, H5O_type_t obj_type,
- const void *crt_info, hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_insert(const struct H5O_loc_t *grp_oloc, const char *name, struct H5O_link_t *obj_lnk,
+ hbool_t adj_link, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id);
H5_DLL ssize_t H5G_obj_get_name_by_idx(const struct H5O_loc_t *oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, char* name, size_t size, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_remove(const struct H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r,
- const char *name, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_remove_by_idx(const struct H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_lookup_by_idx(const struct H5O_loc_t *grp_oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, struct H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL hid_t H5G_get_create_plist(H5G_t *grp);
+ H5_iter_order_t order, hsize_t n, char *name, size_t size,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_remove(const struct H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_remove_by_idx(const struct H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_lookup_by_idx(const struct H5O_loc_t *grp_oloc, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, struct H5O_link_t *lnk, hid_t dxpl_id);
+H5_DLL hid_t H5G_get_create_plist(H5G_t *grp);
/*
* These functions operate on symbol table nodes.
*/
H5_DLL herr_t H5G_node_close(const H5F_t *f);
-H5_DLL herr_t H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
- int indent, int fwidth, haddr_t heap);
+H5_DLL herr_t H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t heap);
/*
* These functions operate on group object locations.
@@ -259,39 +254,37 @@ H5_DLL herr_t H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *en
/*
* These functions operate on group hierarchy names.
*/
-H5_DLL herr_t H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name);
-H5_DLL herr_t H5G_name_replace(const struct H5O_link_t *lnk, H5G_names_op_t op,
- H5F_t *src_file, H5RS_str_t *src_full_path_r, H5F_t *dst_file,
- H5RS_str_t *dst_full_path_r, hid_t dxpl_id);
-H5_DLL herr_t H5G_name_reset(H5G_name_t *name);
-H5_DLL herr_t H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth);
-H5_DLL herr_t H5G_name_free(H5G_name_t *name);
-H5_DLL ssize_t H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
- hbool_t *cached, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL ssize_t H5G_get_name_by_addr(hid_t fid, hid_t lapl_id, hid_t dxpl_id,
- const struct H5O_loc_t *loc, char* name, size_t size);
+H5_DLL herr_t H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name);
+H5_DLL herr_t H5G_name_replace(const struct H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
+ H5RS_str_t *src_full_path_r, H5F_t *dst_file, H5RS_str_t *dst_full_path_r,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G_name_reset(H5G_name_t *name);
+H5_DLL herr_t H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth);
+H5_DLL herr_t H5G_name_free(H5G_name_t *name);
+H5_DLL ssize_t H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, hbool_t *cached,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL ssize_t H5G_get_name_by_addr(hid_t fid, hid_t lapl_id, hid_t dxpl_id, const struct H5O_loc_t *loc,
+ char *name, size_t size);
H5_DLL H5RS_str_t *H5G_build_fullpath_refstr_str(H5RS_str_t *path_r, const char *name);
/*
* These functions operate on group "locations"
*/
-H5_DLL herr_t H5G_loc(hid_t loc_id, H5G_loc_t *loc);
-H5_DLL herr_t H5G_loc_find(const H5G_loc_t *loc, const char *name,
- H5G_loc_t *obj_loc/*out*/, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5G_loc_t *obj_loc/*out*/, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL htri_t H5G_loc_exists(const H5G_loc_t *loc, const char *name,
- hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_loc_info(H5G_loc_t *loc, const char *name,
- hbool_t want_ih_info, H5O_info_t *oinfo/*out*/, hid_t lapl_id,
- hid_t dxpl_id);
-H5_DLL herr_t H5G_loc_set_comment(H5G_loc_t *loc, const char *name,
- const char *comment, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL ssize_t H5G_loc_get_comment(H5G_loc_t *loc, const char *name,
- char *comment/*out*/, size_t bufsize, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_loc_reset(H5G_loc_t *loc);
-H5_DLL herr_t H5G_loc_free(H5G_loc_t *loc);
+H5_DLL herr_t H5G_loc(hid_t loc_id, H5G_loc_t *loc);
+H5_DLL herr_t H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5G_loc_t *obj_loc /*out*/, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL htri_t H5G_loc_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t *oinfo /*out*/,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G_loc_set_comment(H5G_loc_t *loc, const char *name, const char *comment, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL ssize_t H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment /*out*/, size_t bufsize,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5G_loc_reset(H5G_loc_t *loc);
+H5_DLL herr_t H5G_loc_free(H5G_loc_t *loc);
/*
* These functions operate on the root group
@@ -302,4 +295,3 @@ H5_DLL herr_t H5G_root_free(H5G_t *grp);
H5_DLL H5G_t *H5G_rootof(H5F_t *f);
#endif /* _H5Gprivate_H */
-
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 9c5803c..c279d7f 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gpublic.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5G package
*
@@ -28,59 +28,55 @@
#include <sys/types.h>
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Lpublic.h" /* Links */
-#include "H5Opublic.h" /* Object headers */
-#include "H5Tpublic.h" /* Datatypes */
+#include "H5public.h" /* Generic Functions */
+#include "H5Lpublic.h" /* Links */
+#include "H5Opublic.h" /* Object headers */
+#include "H5Tpublic.h" /* Datatypes */
/*****************/
/* Public Macros */
/*****************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*******************/
/* Public Typedefs */
/*******************/
/* Types of link storage for groups */
typedef enum H5G_storage_type_t {
- H5G_STORAGE_TYPE_UNKNOWN = -1, /* Unknown link storage type */
- H5G_STORAGE_TYPE_SYMBOL_TABLE, /* Links in group are stored with a "symbol table" */
- /* (this is sometimes called "old-style" groups) */
- H5G_STORAGE_TYPE_COMPACT, /* Links are stored in object header */
- H5G_STORAGE_TYPE_DENSE /* Links are stored in fractal heap & indexed with v2 B-tree */
+ H5G_STORAGE_TYPE_UNKNOWN = -1, /* Unknown link storage type */
+ H5G_STORAGE_TYPE_SYMBOL_TABLE, /* Links in group are stored with a "symbol table" */
+ /* (this is sometimes called "old-style" groups) */
+ H5G_STORAGE_TYPE_COMPACT, /* Links are stored in object header */
+ H5G_STORAGE_TYPE_DENSE /* Links are stored in fractal heap & indexed with v2 B-tree */
} H5G_storage_type_t;
/* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */
typedef struct H5G_info_t {
- H5G_storage_type_t storage_type; /* Type of storage for links in group */
- hsize_t nlinks; /* Number of links in group */
- int64_t max_corder; /* Current max. creation order value for group */
- hbool_t mounted; /* Whether group has a file mounted on it */
+ H5G_storage_type_t storage_type; /* Type of storage for links in group */
+ hsize_t nlinks; /* Number of links in group */
+ int64_t max_corder; /* Current max. creation order value for group */
+ hbool_t mounted; /* Whether group has a file mounted on it */
} H5G_info_t;
/********************/
/* Public Variables */
/********************/
-
/*********************/
/* Public Prototypes */
/*********************/
-H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id,
- hid_t gcpl_id, hid_t gapl_id);
-H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
-H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id);
-H5_DLL hid_t H5Gget_create_plist(hid_t group_id);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id);
+H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
+H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id);
+H5_DLL hid_t H5Gget_create_plist(hid_t group_id);
H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo);
-H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo,
- hid_t lapl_id);
-H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo,
- hid_t lapl_id);
+H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id);
+H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id);
H5_DLL herr_t H5Gclose(hid_t group_id);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
@@ -92,18 +88,17 @@ H5_DLL herr_t H5Gclose(hid_t group_id);
/* Macros */
/* Link definitions */
-#define H5G_SAME_LOC H5L_SAME_LOC
+#define H5G_SAME_LOC H5L_SAME_LOC
#define H5G_LINK_ERROR H5L_TYPE_ERROR
-#define H5G_LINK_HARD H5L_TYPE_HARD
-#define H5G_LINK_SOFT H5L_TYPE_SOFT
-#define H5G_link_t H5L_type_t
+#define H5G_LINK_HARD H5L_TYPE_HARD
+#define H5G_LINK_SOFT H5L_TYPE_SOFT
+#define H5G_link_t H5L_type_t
/* Macros for types of objects in a group (see H5G_obj_t definition) */
-#define H5G_NTYPES 256 /* Max possible number of types */
-#define H5G_NLIBTYPES 8 /* Number of internal types */
-#define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES)
-#define H5G_USERTYPE(X) (8 + (X)) /* User defined types */
-
+#define H5G_NTYPES 256 /* Max possible number of types */
+#define H5G_NLIBTYPES 8 /* Number of internal types */
+#define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES)
+#define H5G_USERTYPE(X) (8 + (X)) /* User defined types */
/* Typedefs */
@@ -115,15 +110,15 @@ H5_DLL herr_t H5Gclose(hid_t group_id);
* than one type.
*/
typedef enum H5G_obj_t {
- H5G_UNKNOWN = -1, /* Unknown object type */
- H5G_GROUP, /* Object is a group */
- H5G_DATASET, /* Object is a dataset */
- H5G_TYPE, /* Object is a named data type */
- H5G_LINK, /* Object is a symbolic link */
- H5G_UDLINK, /* Object is a user-defined link */
- H5G_RESERVED_5, /* Reserved for future use */
- H5G_RESERVED_6, /* Reserved for future use */
- H5G_RESERVED_7 /* Reserved for future use */
+ H5G_UNKNOWN = -1, /* Unknown object type */
+ H5G_GROUP, /* Object is a group */
+ H5G_DATASET, /* Object is a dataset */
+ H5G_TYPE, /* Object is a named data type */
+ H5G_LINK, /* Object is a symbolic link */
+ H5G_UDLINK, /* Object is a user-defined link */
+ H5G_RESERVED_5, /* Reserved for future use */
+ H5G_RESERVED_6, /* Reserved for future use */
+ H5G_RESERVED_7 /* Reserved for future use */
} H5G_obj_t;
/* Prototype for H5Giterate() operator */
@@ -131,40 +126,32 @@ typedef herr_t (*H5G_iterate_t)(hid_t group, const char *name, void *op_data);
/* Information about an object */
typedef struct H5G_stat_t {
- unsigned long fileno[2]; /*file number */
- unsigned long objno[2]; /*object number */
- unsigned nlink; /*number of hard links to object*/
- H5G_obj_t type; /*basic object type */
- time_t mtime; /*modification time */
- size_t linklen; /*symbolic link value length */
- H5O_stat_t ohdr; /* Object header information */
+ unsigned long fileno[2]; /*file number */
+ unsigned long objno[2]; /*object number */
+ unsigned nlink; /*number of hard links to object*/
+ H5G_obj_t type; /*basic object type */
+ time_t mtime; /*modification time */
+ size_t linklen; /*symbolic link value length */
+ H5O_stat_t ohdr; /* Object header information */
} H5G_stat_t;
-
/* Function prototypes */
-H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint);
-H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name);
-H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name,
- const char *new_name);
-H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
- hid_t new_loc_id, const char *new_name);
-H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name,
- const char *dst_name);
-H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name);
-H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name);
-H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size,
- char *buf/*out*/);
-H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment);
-H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize,
- char *buf);
-H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx,
- H5G_iterate_t op, void *op_data);
-H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
-H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name,
- hbool_t follow_link, H5G_stat_t *statbuf/*out*/);
-H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char* name,
- size_t size);
+H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint);
+H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name);
+H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name);
+H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id,
+ const char *new_name);
+H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name);
+H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name);
+H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name);
+H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/);
+H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment);
+H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf);
+H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx, H5G_iterate_t op, void *op_data);
+H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
+H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
+ H5G_stat_t *statbuf /*out*/);
+H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size);
H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -173,4 +160,3 @@ H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx);
}
#endif
#endif /* _H5Gpublic_H */
-
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 66e7dea..d69d986 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Groot.c
* Apr 8 2009
- * Neil Fortner <nfortne2@hdfgroup.org>
+ * Neil Fortner
*
* Purpose: Functions for operating on the root group.
*
@@ -26,58 +26,48 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property Lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G_rootof
*
@@ -106,7 +96,7 @@ H5G_rootof(H5F_t *f)
HDassert(f->shared);
/* Walk to top of mounted files */
- while(f->parent)
+ while (f->parent)
f = f->parent;
/* Sanity check */
@@ -115,15 +105,14 @@ H5G_rootof(H5F_t *f)
HDassert(f->shared->root_grp);
/* Check to see if the root group was opened through a different
- * "top" file, and switch it to point at the current "top" file.
- */
- if(f->shared->root_grp->oloc.file != f)
+ * "top" file, and switch it to point at the current "top" file.
+ */
+ if (f->shared->root_grp->oloc.file != f)
f->shared->root_grp->oloc.file = f;
FUNC_LEAVE_NOAPI(f->shared->root_grp)
} /* end H5G_rootof() */
-
/*-------------------------------------------------------------------------
* Function: H5G_mkroot
*
@@ -137,7 +126,6 @@ H5G_rootof(H5F_t *f)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -145,12 +133,12 @@ H5G_rootof(H5F_t *f)
herr_t
H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
{
- H5G_loc_t root_loc; /* Root location information */
- H5G_obj_create_t gcrt_info; /* Root group object creation info */
- htri_t stab_exists = -1; /* Whether the symbol table exists */
- hbool_t sblock_dirty = FALSE; /* Whether superblock was dirtied */
- hbool_t path_init = FALSE; /* Whether path was initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t root_loc; /* Root location information */
+ H5G_obj_create_t gcrt_info; /* Root group object creation info */
+ htri_t stab_exists = -1; /* Whether the symbol table exists */
+ hbool_t sblock_dirty = FALSE; /* Whether superblock was dirtied */
+ hbool_t path_init = FALSE; /* Whether path was initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -160,19 +148,19 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
HDassert(f->shared->sblock);
/* Check if the root group is already initialized */
- if(f->shared->root_grp)
+ if (f->shared->root_grp)
HGOTO_DONE(SUCCEED)
/* Create information needed for group nodes */
- if(H5G__node_init(f) < 0)
+ if (H5G__node_init(f) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info")
/*
* Create the group pointer
*/
- if(NULL == (f->shared->root_grp = H5FL_CALLOC(H5G_t)))
+ if (NULL == (f->shared->root_grp = H5FL_CALLOC(H5G_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(NULL == (f->shared->root_grp->shared = H5FL_CALLOC(H5G_shared_t))) {
+ if (NULL == (f->shared->root_grp->shared = H5FL_CALLOC(H5G_shared_t))) {
f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
} /* end if */
@@ -187,108 +175,109 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
* If there is no root object then create one. The root group always starts
* with a hard link count of one since it's pointed to by the superblock.
*/
- if(create_root) {
+ if (create_root) {
/* Create root group */
/* (Pass the FCPL which is a sub-class of the group creation property class) */
- gcrt_info.gcpl_id = f->shared->fcpl_id;
+ gcrt_info.gcpl_id = f->shared->fcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- if(H5G__obj_create(f, dxpl_id, &gcrt_info, root_loc.oloc/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
- if(1 != H5O_link(root_loc.oloc, 1, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)")
+ if (H5G__obj_create(f, dxpl_id, &gcrt_info, root_loc.oloc /*out*/) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
+ if (1 != H5O_link(root_loc.oloc, 1, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)")
/* Decrement refcount on root group's object header in memory */
- if(H5O_dec_rc_by_loc(root_loc.oloc, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to decrement refcount on root group's object header")
+ if (H5O_dec_rc_by_loc(root_loc.oloc, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL,
+ "unable to decrement refcount on root group's object header")
/* Mark superblock dirty, so root group info is flushed */
sblock_dirty = TRUE;
/* Create the root group symbol table entry */
HDassert(!f->shared->sblock->root_ent);
- if(f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
+ if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
/* Allocate space for the root group symbol table entry */
- if(NULL == (f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
+ if (NULL == (f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry")
/* Initialize the root group symbol table entry */
f->shared->sblock->root_ent->type = gcrt_info.cache_type;
- if(gcrt_info.cache_type != H5G_NOTHING_CACHED)
+ if (gcrt_info.cache_type != H5G_NOTHING_CACHED)
f->shared->sblock->root_ent->cache = gcrt_info.cache;
- f->shared->sblock->root_ent->name_off = 0; /* No name (yet) */
- f->shared->sblock->root_ent->header = root_loc.oloc->addr;
+ f->shared->sblock->root_ent->name_off = 0; /* No name (yet) */
+ f->shared->sblock->root_ent->header = root_loc.oloc->addr;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Create root group object location from f */
root_loc.oloc->addr = f->shared->sblock->root_addr;
root_loc.oloc->file = f;
- /*
- * Open the root object as a group.
- */
- if(H5O_open(root_loc.oloc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group")
+ /*
+ * Open the root object as a group.
+ */
+ if (H5O_open(root_loc.oloc) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group")
/* Actions to take if the symbol table information is cached */
- if(f->shared->sblock->root_ent && f->shared->sblock->root_ent->type == H5G_CACHED_STAB) {
+ if (f->shared->sblock->root_ent && f->shared->sblock->root_ent->type == H5G_CACHED_STAB) {
/* Check for the situation where the symbol table is cached but does
* not exist. This can happen if, for example, an external link is
* added to the root group. */
- if((stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID, dxpl_id)) < 0)
+ if ((stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists")
/* Remove the cache if the stab does not exist */
- if(!stab_exists)
+ if (!stab_exists)
f->shared->sblock->root_ent->type = H5G_NOTHING_CACHED;
#ifndef H5_STRICT_FORMAT_CHECKS
/* If symbol table information is cached, check if we should replace the
- * symbol table message with the cached symbol table information */
- else if(H5F_INTENT(f) & H5F_ACC_RDWR) {
- H5O_stab_t cached_stab;
+ * symbol table message with the cached symbol table information */
+ else if (H5F_INTENT(f) & H5F_ACC_RDWR) {
+ H5O_stab_t cached_stab;
/* Retrieve the cached symbol table information */
cached_stab.btree_addr = f->shared->sblock->root_ent->cache.stab.btree_addr;
- cached_stab.heap_addr = f->shared->sblock->root_ent->cache.stab.heap_addr;
+ cached_stab.heap_addr = f->shared->sblock->root_ent->cache.stab.heap_addr;
/* Check if the symbol table message is valid, and replace with the
- * cached symbol table if necessary */
- if(H5G__stab_valid(root_loc.oloc, dxpl_id, &cached_stab) < 0)
+ * cached symbol table if necessary */
+ if (H5G__stab_valid(root_loc.oloc, dxpl_id, &cached_stab) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table")
} /* end if */
-#endif /* H5_STRICT_FORMAT_CHECKS */
- } /* end if */
- } /* end else */
+#endif /* H5_STRICT_FORMAT_CHECKS */
+ } /* end if */
+ } /* end else */
/* Cache the root group's symbol table information in the root group symbol
* table entry. It will have been allocated by now if it needs to be
* present, so we don't need to check the superblock version. We do this if
* we have write access, the root entry has been allocated (i.e.
* super_vers < 2) and the stab info is not already cached. */
- if((H5F_INTENT(f) & H5F_ACC_RDWR) && stab_exists != FALSE && f->shared->sblock->root_ent
- && f->shared->sblock->root_ent->type != H5G_CACHED_STAB) {
- H5O_stab_t stab; /* Symbol table */
+ if ((H5F_INTENT(f) & H5F_ACC_RDWR) && stab_exists != FALSE && f->shared->sblock->root_ent &&
+ f->shared->sblock->root_ent->type != H5G_CACHED_STAB) {
+ H5O_stab_t stab; /* Symbol table */
/* Check if the stab message exists. It's possible for the root group
* to use the latest version while the superblock is an old version.
* If stab_exists is not -1 then we have already checked. */
- if(stab_exists == -1 && (stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID, dxpl_id)) < 0)
+ if (stab_exists == -1 && (stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists")
- if(stab_exists) {
+ if (stab_exists) {
/* Read the root group's symbol table message */
- if(NULL == H5O_msg_read(root_loc.oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(root_loc.oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message")
/* Update the root group symbol table entry */
- f->shared->sblock->root_ent->type = H5G_CACHED_STAB;
+ f->shared->sblock->root_ent->type = H5G_CACHED_STAB;
f->shared->sblock->root_ent->cache.stab.btree_addr = stab.btree_addr;
- f->shared->sblock->root_ent->cache.stab.heap_addr = stab.heap_addr;
+ f->shared->sblock->root_ent->cache.stab.heap_addr = stab.heap_addr;
/* Mark superblock dirty, so root group info is flushed */
sblock_dirty = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
/* Create the path names for the root group's entry */
H5G__name_init(root_loc.path, "/");
@@ -299,49 +288,47 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
* exists. Don't count either the superblock extension or the root group
* in the number of open objects in the file.
*/
- HDassert((1 == f->nopen_objs) ||
- (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
+ HDassert((1 == f->nopen_objs) || (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
f->nopen_objs--;
done:
/* In case of error, free various memory locations that may have been
* allocated */
- if(ret_value < 0) {
- if(f->shared->root_grp) {
- if(path_init)
+ if (ret_value < 0) {
+ if (f->shared->root_grp) {
+ if (path_init)
H5G_name_free(root_loc.path);
- if(f->shared->root_grp->shared)
+ if (f->shared->root_grp->shared)
f->shared->root_grp->shared = H5FL_FREE(H5G_shared_t, f->shared->root_grp->shared);
f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp);
} /* end if */
- if(f->shared->sblock)
+ if (f->shared->sblock)
f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_xfree(f->shared->sblock->root_ent);
} /* end if */
/* Mark superblock dirty in cache, if necessary */
- if(sblock_dirty)
- if(H5AC_mark_entry_dirty(f->shared->sblock) < 0)
+ if (sblock_dirty)
+ if (H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_mkroot() */
-
/*-------------------------------------------------------------------------
-* Function: H5G_root_free
-*
-* Purpose: Free memory used by an H5G_t struct (and its H5G_shared_t).
-* Does not close the group or decrement the reference count.
-* Used to free memory used by the root group.
-*
-* Return: Success: Non-negative
-* Failure: Negative
-*
-* Programmer: James Laird
-* Tuesday, September 7, 2004
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: H5G_root_free
+ *
+ * Purpose: Free memory used by an H5G_t struct (and its H5G_shared_t).
+ * Does not close the group or decrement the reference count.
+ * Used to free memory used by the root group.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: James Laird
+ * Tuesday, September 7, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
herr_t
H5G_root_free(H5G_t *grp)
{
@@ -355,12 +342,11 @@ H5G_root_free(H5G_t *grp)
H5G_name_free(&(grp->path));
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- grp = H5FL_FREE(H5G_t, grp);
+ grp = H5FL_FREE(H5G_t, grp);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_root_free() */
-
/*-------------------------------------------------------------------------
* Function: H5G_root_loc
*
@@ -370,7 +356,6 @@ H5G_root_free(H5G_t *grp)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 5 2007
*
*-------------------------------------------------------------------------
@@ -378,8 +363,8 @@ H5G_root_free(H5G_t *grp)
herr_t
H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
{
- H5G_t *root_grp; /* Pointer to root group's info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_t *root_grp; /* Pointer to root group's info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -391,9 +376,9 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
HDassert(root_grp);
/* Build the group location for the root group */
- if(NULL == (loc->oloc = H5G_oloc(root_grp)))
+ if (NULL == (loc->oloc = H5G_oloc(root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (loc->path = H5G_nameof(root_grp)))
+ if (NULL == (loc->path = H5G_nameof(root_grp)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
/* Patch up root group's object location to reflect this file */
@@ -401,12 +386,11 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
* share an underlying low-level file)
*/
/* (but only for non-mounted files) */
- if(!H5F_is_mount(f)) {
- loc->oloc->file = f;
+ if (!H5F_is_mount(f)) {
+ loc->oloc->file = f;
loc->oloc->holding_file = FALSE;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_root_loc() */
-
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 0eb7b0b..6d1193d 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, September 19, 1997
*
*/
@@ -20,25 +20,22 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -46,33 +43,33 @@
/* User data for finding link information from B-tree */
typedef struct {
/* downward */
- const char *name; /* Name to search for */
- H5HL_t *heap; /* Local heap for group */
+ const char *name; /* Name to search for */
+ H5HL_t * heap; /* Local heap for group */
/* upward */
- H5O_link_t *lnk; /* Caller's link location */
+ H5O_link_t *lnk; /* Caller's link location */
} H5G_stab_fnd_ud_t;
/* Data passed through B-tree iteration for looking up a name by index */
typedef struct H5G_bt_it_gnbi_t {
/* downward */
H5G_bt_it_idx_common_t common; /* Common information for "by index" lookup */
- H5HL_t *heap; /*symbol table heap */
+ H5HL_t * heap; /*symbol table heap */
/* upward */
- char *name; /*member name to be returned */
+ char *name; /*member name to be returned */
} H5G_bt_it_gnbi_t;
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Data passed through B-tree iteration for looking up a type by index */
typedef struct H5G_bt_it_gtbi_t {
/* downward */
- H5G_bt_it_idx_common_t common; /* Common information for "by index" lookup */
- H5F_t *f; /* Pointer to file that symbol table is in */
- hid_t dxpl_id; /* DXPL for operation */
+ H5G_bt_it_idx_common_t common; /* Common information for "by index" lookup */
+ H5F_t * f; /* Pointer to file that symbol table is in */
+ hid_t dxpl_id; /* DXPL for operation */
/* upward */
- H5G_obj_t type; /*member type to be returned */
+ H5G_obj_t type; /*member type to be returned */
} H5G_bt_it_gtbi_t;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -80,40 +77,33 @@ typedef struct H5G_bt_it_gtbi_t {
typedef struct H5G_bt_it_lbi_t {
/* downward */
H5G_bt_it_idx_common_t common; /* Common information for "by index" lookup */
- H5HL_t *heap; /*symbol table heap */
+ H5HL_t * heap; /*symbol table heap */
/* upward */
- H5O_link_t *lnk; /*link to be returned */
- hbool_t found; /*whether we found the link */
+ H5O_link_t *lnk; /*link to be returned */
+ hbool_t found; /*whether we found the link */
} H5G_bt_it_lbi_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_create_components
*
@@ -128,7 +118,6 @@ typedef struct H5G_bt_it_lbi_t {
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 7 2005
*
*-------------------------------------------------------------------------
@@ -136,9 +125,9 @@ typedef struct H5G_bt_it_lbi_t {
herr_t
H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- size_t name_offset; /* Offset of "" name */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t *heap = NULL; /* Pointer to local heap */
+ size_t name_offset; /* Offset of "" name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -150,20 +139,20 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
HDassert(size_hint > 0);
/* Create the B-tree */
- if(H5B_create(f, dxpl_id, H5B_SNODE, NULL, &(stab->btree_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
+ if (H5B_create(f, dxpl_id, H5B_SNODE, NULL, &(stab->btree_addr) /*out*/) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
/* Create symbol table private heap */
- if(H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap")
+ if (H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr) /*out*/) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Insert name into the heap */
- if((size_t)(-1) == (name_offset = H5HL_insert(f, dxpl_id, heap, (size_t)1, "")))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap")
+ if ((size_t)(-1) == (name_offset = H5HL_insert(f, dxpl_id, heap, (size_t)1, "")))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap")
/*
* B-tree's won't work if the first name isn't at the beginning
@@ -173,13 +162,12 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_create_components() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_create
*
@@ -195,18 +183,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
- H5O_stab_t *stab)
+H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo, H5O_stab_t *stab)
{
- size_t heap_hint; /* Local heap size hint */
- size_t size_hint; /* Local heap size hint */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t heap_hint; /* Local heap size hint */
+ size_t size_hint; /* Local heap size hint */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -217,30 +203,32 @@ H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
HDassert(stab);
/* Adjust the size hint, if necessary */
- if(ginfo->lheap_size_hint == 0)
- heap_hint = 8 + /* "null" name inserted for B-tree */
- (ginfo->est_num_entries * H5HL_ALIGN(ginfo->est_name_len + 1)) + /* estimated size of names for links, aligned for inserting into local heap */
- H5HL_SIZEOF_FREE(grp_oloc->file); /* Free list entry in local heap */
+ if (ginfo->lheap_size_hint == 0)
+ heap_hint =
+ 8 + /* "null" name inserted for B-tree */
+ (ginfo->est_num_entries *
+ H5HL_ALIGN(ginfo->est_name_len +
+ 1)) + /* estimated size of names for links, aligned for inserting into local heap */
+ H5HL_SIZEOF_FREE(grp_oloc->file); /* Free list entry in local heap */
else
heap_hint = ginfo->lheap_size_hint;
size_hint = MAX(heap_hint, H5HL_SIZEOF_FREE(grp_oloc->file) + 2);
/* Go create the B-tree & local heap */
- if(H5G__stab_create_components(grp_oloc->file, stab, size_hint, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components")
+ if (H5G__stab_create_components(grp_oloc->file, stab, size_hint, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components")
/*
* Insert the symbol table message into the object header and the symbol
* table entry.
*/
- if(H5O_msg_create(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME, stab, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
+ if (H5O_msg_create(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME, stab, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_create() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_insert_real
*
@@ -251,19 +239,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@uiuc.edu
* Nov 7 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name,
- H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
- hid_t dxpl_id)
+H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_link_t *obj_lnk,
+ H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5G_bt_ins_t udata; /* Data to pass through B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5G_bt_ins_t udata; /* Data to pass through B-tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -274,29 +260,28 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name,
HDassert(obj_lnk);
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Initialize data to pass through B-tree */
udata.common.name = name;
udata.common.heap = heap;
- udata.lnk = obj_lnk;
- udata.obj_type = obj_type;
- udata.crt_info = crt_info;
+ udata.lnk = obj_lnk;
+ udata.obj_type = obj_type;
+ udata.crt_info = crt_info;
/* Insert into symbol table */
- if(H5B_insert(f, dxpl_id, H5B_SNODE, stab->btree_addr, &udata) < 0)
+ if (H5B_insert(f, dxpl_id, H5B_SNODE, stab->btree_addr, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_insert_real() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_insert
*
@@ -307,18 +292,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
- hid_t dxpl_id)
+H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, H5O_type_t obj_type,
+ const void *crt_info, hid_t dxpl_id)
{
- H5O_stab_t stab; /* Symbol table message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_stab_t stab; /* Symbol table message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -328,18 +311,16 @@ H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name,
HDassert(obj_lnk);
/* Retrieve symbol table message */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table")
- if(H5G__stab_insert_real(grp_oloc->file, &stab, name, obj_lnk, obj_type,
- crt_info, dxpl_id) < 0)
+ if (H5G__stab_insert_real(grp_oloc->file, &stab, name, obj_lnk, obj_type, crt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_remove
*
@@ -353,13 +334,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_remove(const H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
- const char *name)
+H5G__stab_remove(const H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r, const char *name)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5O_stab_t stab; /*symbol table message */
- H5G_bt_rm_t udata; /*data to pass through B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5O_stab_t stab; /*symbol table message */
+ H5G_bt_rm_t udata; /*data to pass through B-tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -367,31 +347,30 @@ H5G__stab_remove(const H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_
HDassert(name && *name);
/* Read in symbol table message */
- if(NULL == H5O_msg_read(loc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(loc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(loc->file, dxpl_id, stab.heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(loc->file, dxpl_id, stab.heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Initialize data to pass through B-tree */
- udata.common.name = name;
- udata.common.heap = heap;
+ udata.common.name = name;
+ udata.common.heap = heap;
udata.grp_full_path_r = grp_full_path_r;
/* Remove from symbol table */
- if(H5B_remove(loc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata) < 0)
+ if (H5B_remove(loc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_remove_by_idx
*
@@ -406,54 +385,53 @@ done:
*/
herr_t
H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
- H5_iter_order_t order, hsize_t n)
+ H5_iter_order_t order, hsize_t n)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5O_stab_t stab; /* Symbol table message */
- H5G_bt_rm_t udata; /* Data to pass through B-tree */
- H5O_link_t obj_lnk; /* Object's link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5O_stab_t stab; /* Symbol table message */
+ H5G_bt_rm_t udata; /* Data to pass through B-tree */
+ H5O_link_t obj_lnk; /* Object's link within group */
+ hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
HDassert(grp_oloc && grp_oloc->file);
/* Look up name of link to remove, by index */
- if(H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk, dxpl_id) < 0)
+ if (H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get link information")
lnk_copied = TRUE;
/* Read in symbol table message */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Initialize data to pass through B-tree */
- udata.common.name = obj_lnk.name;
- udata.common.heap = heap;
+ udata.common.name = obj_lnk.name;
+ udata.common.heap = heap;
udata.grp_full_path_r = grp_full_path_r;
/* Remove link from symbol table */
- if(H5B_remove(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata) < 0)
+ if (H5B_remove(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Reset the link information, if we have a copy */
- if(lnk_copied)
+ if (lnk_copied)
H5O_msg_reset(H5O_LINK_ID, &obj_lnk);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_remove_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_delete
*
@@ -464,16 +442,14 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5G_bt_rm_t udata; /*data to pass through B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5G_bt_rm_t udata; /*data to pass through B-tree */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -483,7 +459,7 @@ H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
HDassert(H5F_addr_defined(stab->heap_addr));
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Set up user data for B-tree deletion */
@@ -491,27 +467,26 @@ H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
udata.common.heap = heap;
/* Delete entire B-tree */
- if(H5B_delete(f, dxpl_id, H5B_SNODE, stab->btree_addr, &udata) < 0)
+ if (H5B_delete(f, dxpl_id, H5B_SNODE, stab->btree_addr, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table B-tree")
/* Release resources */
- if(H5HL_unprotect(heap) < 0)
+ if (H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
heap = NULL;
/* Delete local heap for names */
- if(H5HL_delete(f, dxpl_id, stab->heap_addr) < 0)
+ if (H5HL_delete(f, dxpl_id, stab->heap_addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table heap")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_iterate
*
@@ -525,13 +500,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
- hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data)
+H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data)
{
- H5HL_t *heap = NULL; /* Local heap for group */
- H5O_stab_t stab; /* Info about symbol table */
- H5G_link_table_t ltable = {0, NULL}; /* Link table */
- herr_t ret_value; /* Return value */
+ H5HL_t * heap = NULL; /* Local heap for group */
+ H5O_stab_t stab; /* Info about symbol table */
+ H5G_link_table_t ltable = {0, NULL}; /* Link table */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -540,70 +515,70 @@ H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
HDassert(op);
/* Get the B-tree info */
- if(NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
+ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Check on iteration order */
/* ("native" iteration order is increasing for this link storage mechanism) */
- if(order != H5_ITER_DEC) {
- H5G_bt_it_it_t udata; /* User data to pass to B-tree callback */
+ if (order != H5_ITER_DEC) {
+ H5G_bt_it_it_t udata; /* User data to pass to B-tree callback */
/* Build udata to pass through H5B_iterate() to H5G__node_iterate() */
- udata.heap = heap;
- udata.skip = skip;
+ udata.heap = heap;
+ udata.skip = skip;
udata.final_ent = last_lnk;
- udata.op = op;
- udata.op_data = op_data;
+ udata.op = op;
+ udata.op_data = op_data;
/* Iterate over the group members */
- if((ret_value = H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_iterate, &udata)) < 0)
+ if ((ret_value =
+ H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_iterate, &udata)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
/* Check for too high of a starting index (ex post facto :-) */
/* (Skipping exactly as many entries as are in the group is currently an error) */
- if(skip > 0 && skip >= *last_lnk)
+ if (skip > 0 && skip >= *last_lnk)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
} /* end if */
else {
- H5G_bt_it_bt_t udata; /* User data to pass to B-tree callback */
+ H5G_bt_it_bt_t udata; /* User data to pass to B-tree callback */
/* Build udata to pass through H5B_iterate() to H5G__node_build_table() */
udata.alloc_nlinks = 0;
- udata.heap = heap;
- udata.ltable = &ltable;
+ udata.heap = heap;
+ udata.ltable = &ltable;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_build_table, &udata) < 0)
+ if (H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_build_table, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to build link table")
/* Check for skipping out of bounds */
- if(skip > 0 && (size_t)skip >= ltable.nlinks)
+ if (skip > 0 && (size_t)skip >= ltable.nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Sort link table in correct iteration order */
- if(H5G__link_sort_table(&ltable, H5_INDEX_NAME, order) < 0)
+ if (H5G__link_sort_table(&ltable, H5_INDEX_NAME, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
/* Iterate over links in table */
- if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if ((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
- if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
+ if (ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_count
*
@@ -619,8 +594,8 @@ done:
herr_t
H5G__stab_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
{
- H5O_stab_t stab; /* Info about symbol table */
- herr_t ret_value = SUCCEED;
+ H5O_stab_t stab; /* Info about symbol table */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -632,18 +607,17 @@ H5G__stab_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
*num_objs = 0;
/* Get the B-tree info */
- if(NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
+ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, num_objs) < 0)
+ if (H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, num_objs) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_count() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_bh_size
*
@@ -657,12 +631,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
- H5_ih_info_t *bh_info)
+H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab, H5_ih_info_t *bh_info)
{
- hsize_t snode_size; /* Symbol table node size */
- H5B_info_t bt_info; /* B-tree node info */
- herr_t ret_value = SUCCEED;
+ hsize_t snode_size; /* Symbol table node size */
+ H5B_info_t bt_info; /* B-tree node info */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -675,21 +648,21 @@ H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
snode_size = 0;
/* Get the B-tree & symbol table node size info */
- if(H5B_get_info(f, dxpl_id, H5B_SNODE, stab->btree_addr, &bt_info, H5G__node_iterate_size, &snode_size) < 0)
+ if (H5B_get_info(f, dxpl_id, H5B_SNODE, stab->btree_addr, &bt_info, H5G__node_iterate_size, &snode_size) <
+ 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Add symbol table & B-tree node sizes to index info */
bh_info->index_size += snode_size + bt_info.size;
/* Get the size of the local heap for the group */
- if(H5HL_heapsize(f, dxpl_id, stab->heap_addr, &(bh_info->heap_size)) < 0)
+ if (H5HL_heapsize(f, dxpl_id, stab->heap_addr, &(bh_info->heap_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "iteration operator failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_bh_size() */
-
/*-------------------------------------------------------------------------
* Function: H5G_stab_get_name_by_idx_cb
*
@@ -707,10 +680,10 @@ done:
static herr_t
H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
- H5G_bt_it_gnbi_t *udata = (H5G_bt_it_gnbi_t *)_udata;
- size_t name_off; /* Offset of name in heap */
- const char *name; /* Pointer to name string in heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_bt_it_gnbi_t *udata = (H5G_bt_it_gnbi_t *)_udata;
+ size_t name_off; /* Offset of name in heap */
+ const char * name; /* Pointer to name string in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -721,17 +694,16 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
/* Get name offset in heap */
name_off = ent->name_off;
- if((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL)
+ if ((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name")
- if((udata->name = H5MM_strdup(name)) == NULL)
+ if ((udata->name = H5MM_strdup(name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to duplicate symbol table link name")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_stab_get_name_by_idx_cb */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_get_name_by_idx
*
@@ -746,14 +718,14 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
- char* name, size_t size, hid_t dxpl_id)
+H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n, char *name, size_t size,
+ hid_t dxpl_id)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5O_stab_t stab; /* Info about local heap & B-tree */
- H5G_bt_it_gnbi_t udata; /* Iteration information */
- hbool_t udata_valid = FALSE; /* Whether iteration information is valid */
- ssize_t ret_value; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5O_stab_t stab; /* Info about local heap & B-tree */
+ H5G_bt_it_gnbi_t udata; /* Iteration information */
+ hbool_t udata_valid = FALSE; /* Whether iteration information is valid */
+ ssize_t ret_value = -1; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
HDmemset(&udata, 0, sizeof(udata));
@@ -764,19 +736,19 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
HDassert(oloc);
/* Get the B-tree & local heap info */
- if(NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
+ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Remap index for decreasing iteration order */
- if(order == H5_ITER_DEC) {
- hsize_t nlinks = 0; /* Number of links in group */
+ if (order == H5_ITER_DEC) {
+ hsize_t nlinks = 0; /* Number of links in group */
/* Iterate over the symbol table nodes, to count the links */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0)
+ if (H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Map decreasing iteration order index to increasing iteration order index */
@@ -784,44 +756,43 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
} /* end if */
/* Set iteration information */
- udata.common.idx = n;
+ udata.common.idx = n;
udata.common.num_objs = 0;
- udata.common.op = H5G_stab_get_name_by_idx_cb;
- udata.heap = heap;
- udata.name = NULL;
- udata_valid = TRUE;
+ udata.common.op = H5G_stab_get_name_by_idx_cb;
+ udata.heap = heap;
+ udata.name = NULL;
+ udata_valid = TRUE;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
+ if (H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
/* If we don't know the name now, we almost certainly went out of bounds */
- if(udata.name == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound")
+ if (udata.name == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound")
/* Get the length of the name */
ret_value = (ssize_t)HDstrlen(udata.name);
/* Copy the name into the user's buffer, if given */
- if(name) {
+ if (name) {
HDstrncpy(name, udata.name, MIN((size_t)(ret_value + 1), size));
- if((size_t)ret_value >= size)
- name[size - 1]='\0';
+ if ((size_t)ret_value >= size)
+ name[size - 1] = '\0';
} /* end if */
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Free the duplicated name */
- if(udata_valid && udata.name != NULL)
+ if (udata_valid && udata.name != NULL)
H5MM_xfree(udata.name);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_get_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5G_stab_lookup_cb
*
@@ -839,22 +810,21 @@ done:
static herr_t
H5G_stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
{
- H5G_stab_fnd_ud_t *udata = (H5G_stab_fnd_ud_t *)_udata; /* 'User data' passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_stab_fnd_ud_t *udata = (H5G_stab_fnd_ud_t *)_udata; /* 'User data' passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check for setting link info */
- if(udata->lnk)
+ if (udata->lnk)
/* Convert the entry to a link */
- if(H5G__ent_to_link(udata->lnk, udata->heap, ent, udata->name) < 0)
+ if (H5G__ent_to_link(udata->lnk, udata->heap, ent, udata->name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_stab_lookup_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_lookup
*
@@ -863,20 +833,18 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
*/
htri_t
-H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
- hid_t dxpl_id)
+H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk, hid_t dxpl_id)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5G_bt_lkp_t bt_udata; /* Data to pass through B-tree */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5G_bt_lkp_t bt_udata; /* Data to pass through B-tree */
H5G_stab_fnd_ud_t udata; /* 'User data' to give to callback */
- H5O_stab_t stab; /* Symbol table message */
- htri_t ret_value; /* Return value */
+ H5O_stab_t stab; /* Symbol table message */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -886,37 +854,36 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
HDassert(lnk);
/* Retrieve the symbol table message for the group */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't read message")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Set up user data to pass to 'find' operation callback */
udata.name = name;
- udata.lnk = lnk;
+ udata.lnk = lnk;
udata.heap = heap;
/* Set up the user data for actual B-tree find operation */
bt_udata.common.name = name;
bt_udata.common.heap = heap;
- bt_udata.op = H5G_stab_lookup_cb;
- bt_udata.op_data = &udata;
+ bt_udata.op = H5G_stab_lookup_cb;
+ bt_udata.op_data = &udata;
/* Search the B-tree */
- if((ret_value = H5B_find(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &bt_udata)) < 0)
+ if ((ret_value = H5B_find(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, &bt_udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5G_stab_lookup_by_idx_cb
*
@@ -935,8 +902,8 @@ static herr_t
H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
H5G_bt_it_lbi_t *udata = (H5G_bt_it_lbi_t *)_udata;
- const char *name; /* Pointer to name string in heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ const char * name; /* Pointer to name string in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -945,11 +912,11 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
HDassert(udata && udata->heap);
/* Get a pointer to the link name */
- if((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL)
+ if ((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name")
/* Convert the entry to a link */
- if(H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0)
+ if (H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link")
udata->found = TRUE;
@@ -957,7 +924,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_stab_lookup_by_idx_cb */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_lookup_by_idx
*
@@ -966,19 +932,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
- H5O_link_t *lnk, hid_t dxpl_id)
+H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk,
+ hid_t dxpl_id)
{
- H5HL_t *heap = NULL; /* Pointer to local heap */
- H5G_bt_it_lbi_t udata; /* Iteration information */
- H5O_stab_t stab; /* Symbol table message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ H5G_bt_it_lbi_t udata; /* Iteration information */
+ H5O_stab_t stab; /* Symbol table message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -987,19 +952,19 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
HDassert(lnk);
/* Get the B-tree & local heap info */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Remap index for decreasing iteration order */
- if(order == H5_ITER_DEC) {
- hsize_t nlinks = 0; /* Number of links in group */
+ if (order == H5_ITER_DEC) {
+ hsize_t nlinks = 0; /* Number of links in group */
/* Iterate over the symbol table nodes, to count the links */
- if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0)
+ if (H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Map decreasing iteration order index to increasing iteration order index */
@@ -1007,31 +972,31 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
} /* end if */
/* Set iteration information */
- udata.common.idx = n;
+ udata.common.idx = n;
udata.common.num_objs = 0;
- udata.common.op = H5G_stab_lookup_by_idx_cb;
- udata.heap = heap;
- udata.lnk = lnk;
- udata.found = FALSE;
+ udata.common.op = H5G_stab_lookup_by_idx_cb;
+ udata.heap = heap;
+ udata.lnk = lnk;
+ udata.found = FALSE;
/* Iterate over the group members */
- if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
+ if (H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
/* If we didn't find the link, we almost certainly went out of bounds */
- if(!udata.found)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound")
+ if (!udata.found)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_lookup_by_idx() */
#ifndef H5_STRICT_FORMAT_CHECKS
-
+
/*-------------------------------------------------------------------------
* Function: H5G__stab_valid
*
@@ -1049,7 +1014,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Mar 17, 2009
*
*-------------------------------------------------------------------------
@@ -1057,55 +1021,56 @@ done:
herr_t
H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab)
{
- H5O_stab_t stab; /* Current symbol table */
- H5HL_t *heap = NULL; /* Pointer to local heap */
- hbool_t changed = FALSE; /* Whether stab has been modified */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_stab_t stab; /* Current symbol table */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ hbool_t changed = FALSE; /* Whether stab has been modified */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Read the symbol table message */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message");
/* Check if the symbol table message's b-tree address is valid */
- if(H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr) < 0) {
+ if (H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr) < 0) {
/* Address is invalid, try the b-tree address in the alternate symbol
* table message */
- if(!alt_stab || H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, alt_stab->btree_addr) < 0)
+ if (!alt_stab || H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, alt_stab->btree_addr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to locate b-tree")
else {
/* The alternate symbol table's b-tree address is valid. Adjust the
* symbol table message in the group. */
stab.btree_addr = alt_stab->btree_addr;
- changed = TRUE;
+ changed = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* Check if the symbol table message's heap address is valid */
- if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) {
+ if (NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) {
/* Address is invalid, try the heap address in the alternate symbol
* table message */
- if(!alt_stab || NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, alt_stab->heap_addr, H5AC_READ)))
+ if (!alt_stab ||
+ NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, alt_stab->heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "unable to locate heap")
else {
/* The alternate symbol table's heap address is valid. Adjust the
* symbol table message in the group. */
stab.heap_addr = alt_stab->heap_addr;
- changed = TRUE;
+ changed = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* Update the symbol table message and clear errors if necessary */
- if(changed) {
+ if (changed) {
H5E_clear_stack(NULL);
- if(H5O_msg_write(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME | H5O_UPDATE_FORCE, &stab, dxpl_id) < 0)
+ if (H5O_msg_write(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME | H5O_UPDATE_FORCE, &stab, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to correct symbol table message")
} /* end if */
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1113,7 +1078,7 @@ done:
#endif /* H5_STRICT_FORMAT_CHECKS */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5G_stab_get_type_by_idx_cb
*
@@ -1131,8 +1096,8 @@ done:
static herr_t
H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
- H5G_bt_it_gtbi_t *udata = (H5G_bt_it_gtbi_t *)_udata;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_bt_it_gtbi_t *udata = (H5G_bt_it_gtbi_t *)_udata;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1141,7 +1106,7 @@ H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata)
HDassert(udata);
/* Check for a soft link */
- switch(ent->type) {
+ switch (ent->type) {
case H5G_CACHED_SLINK:
udata->type = H5G_LINK;
break;
@@ -1150,29 +1115,26 @@ H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata)
case H5G_NOTHING_CACHED:
case H5G_CACHED_STAB:
case H5G_NCACHED:
- default:
- {
- H5O_loc_t tmp_oloc; /* Temporary object location */
- H5O_type_t obj_type; /* Type of object at location */
-
- /* Build temporary object location */
- tmp_oloc.file = udata->f;
- HDassert(H5F_addr_defined(ent->header));
- tmp_oloc.addr = ent->header;
-
- /* Get the type of the object */
- if(H5O_obj_type(&tmp_oloc, &obj_type, udata->dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
- udata->type = H5G_map_obj_type(obj_type);
- }
- break;
+ default: {
+ H5O_loc_t tmp_oloc; /* Temporary object location */
+ H5O_type_t obj_type; /* Type of object at location */
+
+ /* Build temporary object location */
+ tmp_oloc.file = udata->f;
+ HDassert(H5F_addr_defined(ent->header));
+ tmp_oloc.addr = ent->header;
+
+ /* Get the type of the object */
+ if (H5O_obj_type(&tmp_oloc, &obj_type, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
+ udata->type = H5G_map_obj_type(obj_type);
+ } break;
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_stab_get_type_by_idx_cb */
-
/*-------------------------------------------------------------------------
* Function: H5G__stab_get_type_by_idx
*
@@ -1191,9 +1153,9 @@ done:
H5G_obj_t
H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
{
- H5O_stab_t stab; /* Info about local heap & B-tree */
- H5G_bt_it_gtbi_t udata; /* User data for B-tree callback */
- H5G_obj_t ret_value; /* Return value */
+ H5O_stab_t stab; /* Info about local heap & B-tree */
+ H5G_bt_it_gtbi_t udata; /* User data for B-tree callback */
+ H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1201,24 +1163,24 @@ H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
HDassert(oloc);
/* Get the B-tree & local heap info */
- if(NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "unable to determine local heap address")
+ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "unable to determine local heap address")
/* Set iteration information */
- udata.common.idx = idx;
+ udata.common.idx = idx;
udata.common.num_objs = 0;
- udata.common.op = H5G_stab_get_type_by_idx_cb;
- udata.f = oloc->file;
- udata.dxpl_id = dxpl_id;
- udata.type = H5G_UNKNOWN;
+ udata.common.op = H5G_stab_get_type_by_idx_cb;
+ udata.f = oloc->file;
+ udata.dxpl_id = dxpl_id;
+ udata.type = H5G_UNKNOWN;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "iteration operator failed")
+ if (H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "iteration operator failed")
/* If we don't know the type now, we almost certainly went out of bounds */
- if(udata.type == H5G_UNKNOWN)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "index out of bound")
+ if (udata.type == H5G_UNKNOWN)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "index out of bound")
/* Set the return value */
ret_value = udata.type;
@@ -1227,4 +1189,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__stab_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 6c477e2..053e977 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Monday, October 17, 2005
*
* Purpose: Group testing functions.
@@ -21,55 +21,47 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5G_TESTING /*suppress warning about H5G testing funcs*/
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5G_TESTING /*suppress warning about H5G testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*--------------------------------------------------------------------------
NAME
H5G__is_empty_test
@@ -79,7 +71,7 @@
htri_t H5G__is_empty_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has no link messages and no symbol table message
and no "dense" link storage
@@ -92,97 +84,96 @@
htri_t
H5G__is_empty_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = FALSE; /* Indicate that a header message is present */
- htri_t linfo_exists = FALSE;/* Indicate that the 'link info' message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = FALSE; /* Indicate that a header message is present */
+ htri_t linfo_exists = FALSE; /* Indicate that the 'link info' message is present */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* "New format" checks */
/* Check if the group has any link messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0) {
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0) {
/* Sanity check that new group format shouldn't have old messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
+ if (msg_exists > 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
HGOTO_DONE(FALSE)
} /* end if */
/* Check for a link info message */
- if((linfo_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(linfo_exists > 0) {
- H5O_linfo_t linfo; /* Link info message */
+ if ((linfo_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (linfo_exists > 0) {
+ H5O_linfo_t linfo; /* Link info message */
/* Sanity check that new group format shouldn't have old messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
+ if (msg_exists > 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found")
/* Get the link info */
- if(H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
+ if (H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
- if(H5F_addr_defined(linfo.fheap_addr))
+ if (H5F_addr_defined(linfo.fheap_addr))
HGOTO_DONE(FALSE)
- if(H5F_addr_defined(linfo.name_bt2_addr))
+ if (H5F_addr_defined(linfo.name_bt2_addr))
HGOTO_DONE(FALSE)
- if(H5F_addr_defined(linfo.corder_bt2_addr))
+ if (H5F_addr_defined(linfo.corder_bt2_addr))
HGOTO_DONE(FALSE)
/* Check for link count */
- if(linfo.nlinks > 0)
+ if (linfo.nlinks > 0)
HGOTO_DONE(FALSE)
} /* end if */
/* "Old format" checks */
/* Check if the group has a symbol table message */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0) {
- H5O_stab_t stab; /* Info about local heap & B-tree */
- hsize_t nlinks; /* Number of links in the group */
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0) {
+ H5O_stab_t stab; /* Info about local heap & B-tree */
+ hsize_t nlinks; /* Number of links in the group */
/* Sanity check that old group format shouldn't have new messages */
- if(linfo_exists > 0)
+ if (linfo_exists > 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found")
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, dxpl_id)) < 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
+ if (msg_exists > 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and group info messages found")
/* Get the B-tree & local heap info */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read symbol table message")
/* Get the count of links in the group */
- if(H5G__stab_count(&(grp->oloc), &nlinks, dxpl_id) < 0)
+ if (H5G__stab_count(&(grp->oloc), &nlinks, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to count links")
/* Check for link count */
- if(nlinks > 0)
+ if (nlinks > 0)
HGOTO_DONE(FALSE)
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__is_empty_test() */
+} /* H5G__is_empty_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__has_links_test
@@ -193,7 +184,7 @@ done:
hid_t gid; IN: group to check
unsigned *nmsgs; OUT: # of link messages in header
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has link messages and how many.
GLOBAL VARIABLES
@@ -205,44 +196,43 @@ done:
htri_t
H5G__has_links_test(hid_t gid, unsigned *nmsgs)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Check if the group has any link messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists == 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has a symbol table message */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
/* Check if we should retrieve the number of link messages */
- if(nmsgs) {
- int msg_count; /* Number of messages of a type */
+ if (nmsgs) {
+ int msg_count; /* Number of messages of a type */
/* Check how many link messages there are */
- if((msg_count = H5O_msg_count(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
+ if ((msg_count = H5O_msg_count(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count link messages")
*nmsgs = (unsigned)msg_count;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__has_links_test() */
+} /* H5G__has_links_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__has_stab_test
@@ -252,7 +242,7 @@ done:
htri_t H5G__has_stab_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has a symbol table message.
GLOBAL VARIABLES
@@ -264,34 +254,33 @@ done:
htri_t
H5G__has_stab_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Check if the group has a symbol table message */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists == 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__has_stab_test() */
+} /* H5G__has_stab_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__is_new_dense_test
@@ -301,7 +290,7 @@ done:
htri_t H5G__is_new_dense_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group is in the "new" format for groups (link messages/
fractal heap+v2 B-tree) and if it is in "dense" storage form (ie. it has
@@ -315,51 +304,50 @@ done:
htri_t
H5G__is_new_dense_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Check if the group has a symbol table message */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0)
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has link info message */
- if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
- if(msg_exists > 0) {
- H5O_linfo_t linfo; /* Link info message */
+ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if (msg_exists > 0) {
+ H5O_linfo_t linfo; /* Link info message */
/* Get the link info */
- if(H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
+ if (H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
- if(!H5F_addr_defined(linfo.fheap_addr))
+ if (!H5F_addr_defined(linfo.fheap_addr))
HGOTO_DONE(FALSE)
- if(!H5F_addr_defined(linfo.name_bt2_addr))
+ if (!H5F_addr_defined(linfo.name_bt2_addr))
HGOTO_DONE(FALSE)
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__is_new_dense_test() */
+} /* H5G__is_new_dense_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__new_dense_info_test
@@ -371,7 +359,7 @@ done:
hsize_t *name_count; OUT: Number of links in name index
hsize_t *corder_count; OUT: Number of links in creation order index
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Currently, just retrieves the number of links in each index and returns
them.
@@ -384,61 +372,61 @@ done:
herr_t
H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
{
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- H5O_linfo_t linfo; /* Link info message */
- H5G_t *grp = NULL; /* Pointer to group */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ H5O_linfo_t linfo; /* Link info message */
+ H5G_t * grp = NULL; /* Pointer to group */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Get the link info */
- if(H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
+ if (H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
- if(!H5F_addr_defined(linfo.fheap_addr))
+ if (!H5F_addr_defined(linfo.fheap_addr))
HGOTO_DONE(FAIL)
- if(!H5F_addr_defined(linfo.name_bt2_addr))
+ if (!H5F_addr_defined(linfo.name_bt2_addr))
HGOTO_DONE(FAIL)
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(grp->oloc.file, dxpl_id, linfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(grp->oloc.file, dxpl_id, linfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
- if(H5B2_get_nrec(bt2_name, name_count) < 0)
+ if (H5B2_get_nrec(bt2_name, name_count) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
/* Check if there is a creation order index */
- if(H5F_addr_defined(linfo.corder_bt2_addr)) {
+ if (H5F_addr_defined(linfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(grp->oloc.file, dxpl_id, linfo.corder_bt2_addr, NULL)))
+ if (NULL == (bt2_corder = H5B2_open(grp->oloc.file, dxpl_id, linfo.corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Retrieve # of records in creation order index */
- if(H5B2_get_nrec(bt2_corder, corder_count) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from creation order index")
+ if (H5B2_get_nrec(bt2_corder, corder_count) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL,
+ "unable to retrieve # of records from creation order index")
} /* end if */
else
*corder_count = 0;
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__new_dense_info_test() */
+} /* H5G__new_dense_info_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__lheap_size_test
@@ -449,7 +437,7 @@ done:
hid_t gid; IN: group to check
size_t *lheap_size; OUT: Size of local heap
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Checks the size of the local heap for a group
GLOBAL VARIABLES
@@ -461,30 +449,29 @@ done:
herr_t
H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
{
- H5G_t *grp = NULL; /* Pointer to group */
- H5O_stab_t stab; /* Symbol table message */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_t * grp = NULL; /* Pointer to group */
+ H5O_stab_t stab; /* Symbol table message */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Get group structure */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Make certain the group has a symbol table message */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
+ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
/* Check the size of the local heap for the group */
- if(H5HL_get_size(grp->oloc.file, dxpl_id, stab.heap_addr, lheap_size) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
+ if (H5HL_get_size(grp->oloc.file, dxpl_id, stab.heap_addr, lheap_size) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__lheap_size_test() */
+} /* H5G__lheap_size_test() */
-
/*--------------------------------------------------------------------------
NAME
H5G__user_path_test
@@ -497,7 +484,7 @@ done:
size_t *user_path_len; OUT: Size of user path
unsigned *obj_hidden; OUT: Whether object is hidden
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Retrieves the user path for an ID. A zero for the length is returned in
the case of no user path.
@@ -510,9 +497,9 @@ done:
herr_t
H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *obj_hidden)
{
- void *obj_ptr; /* Pointer to object for ID */
- H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * obj_ptr; /* Pointer to object for ID */
+ H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -521,11 +508,11 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
HDassert(obj_hidden);
/* Get pointer to object for ID */
- if(NULL == (obj_ptr = H5I_object(obj_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get object for ID")
+ if (NULL == (obj_ptr = H5I_object(obj_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get object for ID")
/* Get the symbol table entry */
- switch(H5I_get_type(obj_id)) {
+ switch (H5I_get_type(obj_id)) {
case H5I_GROUP:
obj_path = H5G_nameof((H5G_t *)obj_ptr);
break;
@@ -536,7 +523,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
case H5I_DATATYPE:
/* Avoid non-named datatypes */
- if(!H5T_is_named((H5T_t *)obj_ptr))
+ if (!H5T_is_named((H5T_t *)obj_ptr))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a named datatype")
obj_path = H5T_nameof((H5T_t *)obj_ptr);
@@ -561,11 +548,11 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
HDassert(obj_path);
/* Retrieve a copy of the user path and put it into the buffer */
- if(obj_path->user_path_r) {
+ if (obj_path->user_path_r) {
ssize_t len = H5RS_len(obj_path->user_path_r);
/* Set the user path, if given */
- if(user_path)
+ if (user_path)
HDstrncpy(user_path, H5RS_get_str(obj_path->user_path_r), (size_t)(len + 1));
/* Set the length of the path */
@@ -576,14 +563,13 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
} /* end if */
else {
*user_path_len = 0;
- *obj_hidden = 0;
+ *obj_hidden = 0;
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G__user_path_test() */
+} /* H5G__user_path_test() */
-
/*-------------------------------------------------------------------------
* Function: H5G__verify_cached_stab_test
*
@@ -592,8 +578,7 @@ done:
* the provided group's object header, and check that the
* addresses are valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -603,44 +588,42 @@ done:
herr_t
H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
{
- H5O_stab_t stab; /* Symbol table */
- H5HL_t *heap = NULL; /* Pointer to local heap */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_stab_t stab; /* Symbol table */
+ H5HL_t * heap = NULL; /* Pointer to local heap */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Verify that stab info is cached in ent */
- if(ent->type != H5G_CACHED_STAB)
+ if (ent->type != H5G_CACHED_STAB)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "symbol table information is not cached")
/* Read the symbol table message from the group */
- if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message")
/* Verify that the cached symbol table info matches the symbol table message
* in the object header */
- if((ent->cache.stab.btree_addr != stab.btree_addr)
- || (ent->cache.stab.heap_addr != stab.heap_addr))
+ if ((ent->cache.stab.btree_addr != stab.btree_addr) || (ent->cache.stab.heap_addr != stab.heap_addr))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "cached stab info does not match object header")
/* Verify that the btree address is valid */
- if(H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr) < 0)
+ if (H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "b-tree address is invalid")
/* Verify that the heap address is valid */
- if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "heap address is invalid")
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__verify_cached_stab_test() */
-
/*-------------------------------------------------------------------------
* Function: H5G_verify_cached_stabs_test_cb
*
@@ -649,7 +632,7 @@ done:
* group with a symbol table, and that that information is
* correct.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: H5_ITER_STOP/H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Neil Fortner
* Apr 8, 2011
@@ -657,85 +640,82 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5G_verify_cached_stabs_test_cb(H5F_t *f, hid_t dxpl_id,
- const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const void H5_ATTR_UNUSED *_rt_key,
- void H5_ATTR_UNUSED *udata)
+H5G_verify_cached_stabs_test_cb(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
+ const void H5_ATTR_UNUSED *_rt_key, void H5_ATTR_UNUSED *udata)
{
- H5G_node_t *sn = NULL;
- H5O_loc_t targ_oloc;
- H5O_t *targ_oh = NULL;
- htri_t stab_exists;
- H5O_stab_t stab;
- unsigned i;
- int ret_value = H5_ITER_CONT;
+ H5G_node_t *sn = NULL;
+ H5O_loc_t targ_oloc;
+ H5O_t * targ_oh = NULL;
+ htri_t stab_exists;
+ H5O_stab_t stab;
+ unsigned i;
+ int ret_value = H5_ITER_CONT;
FUNC_ENTER_NOAPI_NOINIT
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(H5F_addr_defined(addr));
/* Load the node */
- if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
+ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node")
/* Check each target object to see if its stab message (if present) matches
* the cached stab (if present). If one exists, both must exist. */
/* Initialize constant fields in target oloc */
- targ_oloc.file = f;
+ targ_oloc.file = f;
targ_oloc.holding_file = FALSE;
/* Iterate over entries */
- for(i=0; i<sn->nsyms; i++) {
+ for (i = 0; i < sn->nsyms; i++) {
/* Update oloc address */
targ_oloc.addr = sn->entry[i].header;
/* Load target object header */
- if(NULL == (targ_oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ)))
+ if (NULL == (targ_oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header")
/* Check if a symbol table message exists */
- if((stab_exists = H5O_msg_exists_oh(targ_oh, H5O_STAB_ID)) < 0)
+ if ((stab_exists = H5O_msg_exists_oh(targ_oh, H5O_STAB_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to check for STAB message")
- if(stab_exists) {
+ if (stab_exists) {
/* Read symbol table message */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, targ_oh, H5O_STAB_ID, &stab))
+ if (NULL == H5O_msg_read_oh(f, dxpl_id, targ_oh, H5O_STAB_ID, &stab))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to read STAB message")
/* Check if the stab matches the cached stab info */
- if(sn->entry[i].type != H5G_CACHED_STAB)
+ if (sn->entry[i].type != H5G_CACHED_STAB)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "STAB message is not cached in group node")
- if((sn->entry[i].cache.stab.btree_addr != stab.btree_addr)
- || (sn->entry[i].cache.stab.heap_addr != stab.heap_addr))
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "cached symbol table information is incorrect")
- } /* end if */
- else if(sn->entry[i].type == H5G_CACHED_STAB)
+ if ((sn->entry[i].cache.stab.btree_addr != stab.btree_addr) ||
+ (sn->entry[i].cache.stab.heap_addr != stab.heap_addr))
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR,
+ "cached symbol table information is incorrect")
+ }
+ else if (sn->entry[i].type == H5G_CACHED_STAB)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "nonexistent STAB message is cached")
/* Unprotect target object */
- if(H5O_unprotect(&targ_oloc, dxpl_id, targ_oh, H5AC__NO_FLAGS_SET) < 0)
+ if (H5O_unprotect(&targ_oloc, dxpl_id, targ_oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to release object header");
targ_oh = NULL;
} /* end for */
done:
- if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
+ if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
- if(targ_oh) {
+ if (targ_oh) {
HDassert(ret_value == H5_ITER_ERROR);
- if(H5O_unprotect(&targ_oloc, dxpl_id, targ_oh, H5AC__NO_FLAGS_SET) < 0)
+ if (H5O_unprotect(&targ_oloc, dxpl_id, targ_oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to release object header");
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_verify_cached_stabs_test_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G__verify_cached_stabs_test
*
@@ -749,7 +729,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* April 6 2011
*
*-------------------------------------------------------------------------
@@ -757,12 +736,12 @@ done:
herr_t
H5G__verify_cached_stabs_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Group */
- htri_t stab_exists;
- H5O_stab_t stab; /* Symbol table message */
- H5G_bt_common_t udata = {NULL, NULL}; /* Dummy udata so H5B_iterate doesn't freak out */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_t * grp = NULL; /* Group */
+ htri_t stab_exists;
+ H5O_stab_t stab; /* Symbol table message */
+ H5G_bt_common_t udata = {NULL, NULL}; /* Dummy udata so H5B_iterate doesn't freak out */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -770,29 +749,27 @@ H5G__verify_cached_stabs_test(hid_t gid)
HDassert(gid >= 0);
/* Check args */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
+ if (NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
/* Check for group having a symbol table message */
/* Check for the group having a group info message */
- if((stab_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID,
- dxpl_id)) < 0)
+ if ((stab_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
/* No need to check anything if the symbol table doesn't exist */
- if(!stab_exists)
+ if (!stab_exists)
HGOTO_DONE(SUCCEED);
/* Read the stab */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
+ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get symbol table info")
/* Iterate over the b-tree, checking validity of cached information */
- if((ret_value = H5B_iterate(grp->oloc.file, dxpl_id, H5B_SNODE,
- stab.btree_addr, H5G_verify_cached_stabs_test_cb, &udata)) < 0)
+ if ((ret_value = H5B_iterate(grp->oloc.file, dxpl_id, H5B_SNODE, stab.btree_addr,
+ H5G_verify_cached_stabs_test_cb, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "iteration operator failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__verify_cached_stabs_test() */
-
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 94b8716..4fb6749 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Gtraverse.c
* Sep 13 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for traversing group hierarchy
*
@@ -26,30 +26,27 @@
/* Module Setup */
/****************/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Ppublic.h" /* Property Lists */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Ppublic.h" /* Property Lists */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
@@ -57,52 +54,44 @@
/* User data for path traversal routine */
typedef struct {
/* down */
- hbool_t chk_exists; /* Flag to indicate we are checking if object exists */
+ hbool_t chk_exists; /* Flag to indicate we are checking if object exists */
/* up */
- H5G_loc_t *obj_loc; /* Object location */
- hbool_t exists; /* Indicate if object exists */
+ H5G_loc_t *obj_loc; /* Object location */
+ hbool_t exists; /* Indicate if object exists */
} H5G_trav_slink_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5G_traverse_slink_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5G_traverse_ud(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/,
- hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
+static herr_t H5G_traverse_slink_cb(H5G_loc_t *grp_loc, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5G_traverse_ud(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
+ unsigned target, size_t *nlinks /*in,out*/, hbool_t *obj_exists, hid_t lapl_id,
+ hid_t dxpl_id);
static herr_t H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/,
- hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
-static herr_t H5G_traverse_real(const H5G_loc_t *loc, const char *name,
- unsigned target, size_t *nlinks, H5G_traverse_t op, void *op_data,
- hid_t lapl_id, hid_t dxpl_id);
-
+ H5G_loc_t *obj_loc /*in,out*/, unsigned target, size_t *nlinks /*in,out*/,
+ hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
+static herr_t H5G_traverse_real(const H5G_loc_t *loc, const char *name, unsigned target, size_t *nlinks,
+ H5G_traverse_t op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5G_traverse_slink_cb
*
@@ -118,17 +107,17 @@ static herr_t H5G_traverse_real(const H5G_loc_t *loc, const char *name,
*/
static herr_t
H5G_traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5G_trav_slink_t *udata = (H5G_trav_slink_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_trav_slink_t *udata = (H5G_trav_slink_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check for dangling soft link */
- if(obj_loc == NULL) {
- if(udata->chk_exists)
+ if (obj_loc == NULL) {
+ if (udata->chk_exists)
udata->exists = FALSE;
else
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found")
@@ -149,7 +138,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse_slink_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5G_traverse_link_ud
*
@@ -164,21 +152,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/,
- hbool_t *obj_exists, hid_t _lapl_id, hid_t dxpl_id)
+H5G_traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
+ unsigned target, size_t *nlinks /*in,out*/, hbool_t *obj_exists, hid_t _lapl_id,
+ hid_t dxpl_id)
{
- const H5L_class_t *link_class; /* User-defined link class */
- hid_t cb_return = -1; /* The ID the user-defined callback returned */
- H5G_loc_t grp_loc_copy;
- H5G_name_t grp_path_copy;
- H5O_loc_t grp_oloc_copy;
- H5G_loc_t new_loc; /* Group location for newly opened external object */
- H5G_t *grp;
- hid_t lapl_id = (-1); /* LAPL local to this routine */
- H5P_genplist_t *lapl; /* LAPL with nlinks set */
- hid_t cur_grp = (-1);
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5L_class_t *link_class; /* User-defined link class */
+ hid_t cb_return = -1; /* The ID the user-defined callback returned */
+ H5G_loc_t grp_loc_copy;
+ H5G_name_t grp_path_copy;
+ H5O_loc_t grp_oloc_copy;
+ H5G_loc_t new_loc; /* Group location for newly opened external object */
+ H5G_t * grp;
+ hid_t lapl_id = (-1); /* LAPL local to this routine */
+ H5P_genplist_t * lapl; /* LAPL with nlinks set */
+ hid_t cur_grp = (-1);
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -191,7 +179,7 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
HDassert(_lapl_id >= 0);
/* Get the link class for this type of link. */
- if(NULL == (link_class = H5L_find_class(lnk->type)))
+ if (NULL == (link_class = H5L_find_class(lnk->type)))
HGOTO_ERROR(H5E_SYM, H5E_NOTREGISTERED, FAIL, "unable to get UD link class")
/* Set up location for user-defined callback. Use a copy of our current
@@ -199,46 +187,46 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
grp_loc_copy.path = &grp_path_copy;
grp_loc_copy.oloc = &grp_oloc_copy;
H5G_loc_reset(&grp_loc_copy);
- if(H5G__loc_copy(&grp_loc_copy, grp_loc, H5_COPY_DEEP) < 0)
+ if (H5G__loc_copy(&grp_loc_copy, grp_loc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "unable to copy object location")
/* Create a group ID to pass to the user-defined callback */
- if(NULL == (grp = H5G_open(&grp_loc_copy, dxpl_id)))
+ if (NULL == (grp = H5G_open(&grp_loc_copy, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((cur_grp = H5I_register(H5I_GROUP, grp, FALSE)) < 0)
+ if ((cur_grp = H5I_register(H5I_GROUP, grp, FALSE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group")
/* Check for generic default property list and use link access default if so */
- if(_lapl_id == H5P_DEFAULT) {
+ if (_lapl_id == H5P_DEFAULT) {
HDassert(H5P_LINK_ACCESS_DEFAULT != -1);
- if(NULL == (lapl = (H5P_genplist_t *)H5I_object(H5P_LINK_ACCESS_DEFAULT)))
+ if (NULL == (lapl = (H5P_genplist_t *)H5I_object(H5P_LINK_ACCESS_DEFAULT)))
HGOTO_ERROR(H5E_SYM, H5E_BADATOM, FAIL, "unable to get default property list")
} /* end if */
else {
/* Get the underlying property list passed in */
- if(NULL == (lapl = (H5P_genplist_t *)H5I_object(_lapl_id)))
+ if (NULL == (lapl = (H5P_genplist_t *)H5I_object(_lapl_id)))
HGOTO_ERROR(H5E_SYM, H5E_BADATOM, FAIL, "unable to get property list from ID")
} /* end else */
/* Copy the property list passed in */
- if((lapl_id = H5P_copy_plist(lapl, FALSE)) < 0)
+ if ((lapl_id = H5P_copy_plist(lapl, FALSE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "unable to copy property list")
/* Get the underlying property list copy */
- if(NULL == (lapl = (H5P_genplist_t *)H5I_object(lapl_id)))
+ if (NULL == (lapl = (H5P_genplist_t *)H5I_object(lapl_id)))
HGOTO_ERROR(H5E_SYM, H5E_BADATOM, FAIL, "unable to get property list from ID")
/* Record number of soft links left to traverse in the property list. */
- if(H5P_set(lapl, H5L_ACS_NLINKS_NAME, nlinks) < 0)
+ if (H5P_set(lapl, H5L_ACS_NLINKS_NAME, nlinks) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set nlink info")
/* User-defined callback function */
cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, lapl_id);
/* Check for failing to locate the object */
- if(cb_return < 0) {
+ if (cb_return < 0) {
/* Check if we just needed to know if the object exists */
- if(target & H5G_TARGET_EXISTS) {
+ if (target & H5G_TARGET_EXISTS) {
/* Clear any errors from the stack */
H5E_clear_stack(NULL);
@@ -254,7 +242,7 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
} /* end if */
/* Get the object location information from the ID the user callback returned */
- if(H5G_loc(cb_return, &new_loc) < 0)
+ if (H5G_loc(cb_return, &new_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to get object location from ID")
/* Release any previous location information for the object */
@@ -266,32 +254,31 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
/* Hold the file open until we free this object header (otherwise the
* object location will be invalidated when the file closes).
*/
- if(H5O_loc_hold_file(obj_loc->oloc) < 0)
+ if (H5O_loc_hold_file(obj_loc->oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open")
/* We have a copy of the location and we're holding the file open.
* Close the open ID the user passed back.
*/
- if(H5I_dec_ref(cb_return) < 0)
+ if (H5I_dec_ref(cb_return) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback")
cb_return = (hid_t)(-1);
done:
/* Close location given to callback. */
- if(cur_grp > 0 && H5I_dec_ref(cur_grp) < 0)
+ if (cur_grp > 0 && H5I_dec_ref(cur_grp) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close atom for current location")
- if(ret_value < 0 && cb_return > 0 && H5I_dec_ref(cb_return) < 0)
+ if (ret_value < 0 && cb_return > 0 && H5I_dec_ref(cb_return) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback")
/* Close the LAPL, if we copied one */
- if(lapl_id > 0 && H5I_dec_ref(lapl_id) < 0)
+ if (lapl_id > 0 && H5I_dec_ref(lapl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close copied link access property list")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse_ud() */
-
/*-------------------------------------------------------------------------
* Function: H5G_traverse_slink
*
@@ -309,18 +296,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/,
- hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id)
+H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
+ unsigned target, size_t *nlinks /*in,out*/, hbool_t *obj_exists, hid_t lapl_id,
+ hid_t dxpl_id)
{
- H5G_trav_slink_t udata; /* User data to pass to link traversal callback */
- H5G_name_t tmp_obj_path; /* Temporary copy of object's path */
- hbool_t tmp_obj_path_set = FALSE; /* Flag to indicate that tmp object path is initialized */
- H5O_loc_t tmp_grp_oloc; /* Temporary copy of group entry */
- H5G_name_t tmp_grp_path; /* Temporary copy of group's path */
- H5G_loc_t tmp_grp_loc; /* Temporary copy of group's location */
- hbool_t tmp_grp_loc_set = FALSE; /* Flag to indicate that tmp group location is initialized */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_trav_slink_t udata; /* User data to pass to link traversal callback */
+ H5G_name_t tmp_obj_path; /* Temporary copy of object's path */
+ hbool_t tmp_obj_path_set = FALSE; /* Flag to indicate that tmp object path is initialized */
+ H5O_loc_t tmp_grp_oloc; /* Temporary copy of group entry */
+ H5G_name_t tmp_grp_path; /* Temporary copy of group's path */
+ H5G_loc_t tmp_grp_loc; /* Temporary copy of group's location */
+ hbool_t tmp_grp_loc_set = FALSE; /* Flag to indicate that tmp group location is initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -352,31 +339,31 @@ H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
/* Set up user data for traversal callback */
udata.chk_exists = (target & H5G_TARGET_EXISTS) ? TRUE : FALSE;
- udata.exists = FALSE;
- udata.obj_loc = obj_loc;
+ udata.exists = FALSE;
+ udata.obj_loc = obj_loc;
/* Traverse the link */
- if(H5G_traverse_real(&tmp_grp_loc, lnk->u.soft.name, target, nlinks, H5G_traverse_slink_cb, &udata, lapl_id, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link")
+ if (H5G_traverse_real(&tmp_grp_loc, lnk->u.soft.name, target, nlinks, H5G_traverse_slink_cb, &udata,
+ lapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link")
/* Pass back information about whether the object exists */
*obj_exists = udata.exists;
done:
/* Restore object's group hier. path */
- if(tmp_obj_path_set) {
+ if (tmp_obj_path_set) {
H5G_name_free(obj_loc->path);
H5G_name_copy(obj_loc->path, &tmp_obj_path, H5_COPY_SHALLOW);
} /* end if */
/* Release cloned copy of group location */
- if(tmp_grp_loc_set)
+ if (tmp_grp_loc_set)
H5G_loc_free(&tmp_grp_loc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse_slink() */
-
/*-------------------------------------------------------------------------
* Function: H5G__traverse_special
*
@@ -385,17 +372,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- unsigned target, size_t *nlinks, hbool_t last_comp,
- H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id)
+H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target, size_t *nlinks,
+ hbool_t last_comp, H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id,
+ hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -405,16 +391,15 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
HDassert(obj_loc);
HDassert(nlinks);
- /*
- * If we found a symbolic link then we should follow it. But if this
+ /* If we found a symbolic link then we should follow it. But if this
* is the last component of the name and the H5G_TARGET_SLINK bit of
* TARGET is set then we don't follow it.
*/
- if(H5L_TYPE_SOFT == lnk->type &&
- (0 == (target & H5G_TARGET_SLINK) || !last_comp)) {
- if((*nlinks)-- <= 0)
+ if (H5L_TYPE_SOFT == lnk->type && (0 == (target & H5G_TARGET_SLINK) || !last_comp)) {
+ if ((*nlinks)-- <= 0)
HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links")
- if(H5G_traverse_slink(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse_slink(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists,
+ lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "symbolic link traversal failed")
} /* end if */
@@ -423,11 +408,11 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
* is the last component of the name and the H5G_TARGET_UDLINK bit of
* TARGET is set then we don't follow it.
*/
- if(lnk->type >= H5L_TYPE_UD_MIN &&
- (0 == (target & H5G_TARGET_UDLINK) || !last_comp) ) {
- if((*nlinks)-- <= 0)
+ if (lnk->type >= H5L_TYPE_UD_MIN && (0 == (target & H5G_TARGET_UDLINK) || !last_comp)) {
+ if ((*nlinks)-- <= 0)
HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links")
- if(H5G_traverse_ud(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse_ud(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), nlinks, obj_exists, lapl_id,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "user-defined link traversal failed")
} /* end if */
@@ -442,9 +427,8 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
* the status of the object (into a hard link), so don't use an 'else'
* statement here. -QAK)
*/
- if(H5F_addr_defined(obj_loc->oloc->addr) &&
- (0 == (target & H5G_TARGET_MOUNT) || !last_comp)) {
- if(H5F_traverse_mount(obj_loc->oloc/*in,out*/) < 0)
+ if (H5F_addr_defined(obj_loc->oloc->addr) && (0 == (target & H5G_TARGET_MOUNT) || !last_comp)) {
+ if (H5F_traverse_mount(obj_loc->oloc /*in,out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "mount point traversal failed")
} /* end if */
@@ -452,15 +436,14 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
* and obj_loc is in the same file, obj_loc should also hold the
* file open so that closing the grp_loc doesn't close the file.
*/
- if(grp_loc->oloc->holding_file && grp_loc->oloc->file == obj_loc->oloc->file)
- if(H5O_loc_hold_file(obj_loc->oloc) < 0)
+ if (grp_loc->oloc->holding_file && grp_loc->oloc->file == obj_loc->oloc->file)
+ if (H5O_loc_hold_file(obj_loc->oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__traverse_special() */
-
/*-------------------------------------------------------------------------
* Function: H5G_traverse_real
*
@@ -472,33 +455,32 @@ done:
* resolved.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
- size_t *nlinks, H5G_traverse_t op, void *op_data, hid_t lapl_id, hid_t dxpl_id)
+H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, size_t *nlinks, H5G_traverse_t op,
+ void *op_data, hid_t lapl_id, hid_t dxpl_id)
{
- H5G_loc_t loc; /* Location of start object */
- H5O_loc_t grp_oloc; /* Object loc. for current group */
- H5G_name_t grp_path; /* Path for current group */
- H5G_loc_t grp_loc; /* Location of group */
- H5O_loc_t obj_oloc; /* Object found */
- H5G_name_t obj_path; /* Path for object found */
- H5G_loc_t obj_loc; /* Location of object */
- size_t nchars; /* component name length */
- H5O_link_t lnk; /* Link information for object */
- hbool_t link_valid = FALSE; /* Flag to indicate that the link information is valid */
- hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
+ H5G_loc_t loc; /* Location of start object */
+ H5O_loc_t grp_oloc; /* Object loc. for current group */
+ H5G_name_t grp_path; /* Path for current group */
+ H5G_loc_t grp_loc; /* Location of group */
+ H5O_loc_t obj_oloc; /* Object found */
+ H5G_name_t obj_path; /* Path for object found */
+ H5G_loc_t obj_loc; /* Location of object */
+ size_t nchars; /* component name length */
+ H5O_link_t lnk; /* Link information for object */
+ hbool_t link_valid = FALSE; /* Flag to indicate that the link information is valid */
+ hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
H5G_own_loc_t own_loc = H5G_OWN_NONE; /* Enum to indicate whether callback took ownership of locations*/
- hbool_t group_copy = FALSE; /* Flag to indicate that the group entry is copied */
- char comp_buf[1024]; /* Temporary buffer for path components */
- char *comp; /* Pointer to buffer for path components */
- H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */
- hbool_t last_comp = FALSE; /* Flag to indicate that a component is the last component in the name */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t group_copy = FALSE; /* Flag to indicate that the group entry is copied */
+ char comp_buf[1024]; /* Temporary buffer for path components */
+ char * comp; /* Pointer to buffer for path components */
+ H5WB_t * wb = NULL; /* Wrapped buffer for temporary buffer */
+ hbool_t last_comp = FALSE; /* Flag to indicate that a component is the last component in the name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -513,8 +495,8 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
* root of the file; for relative names it starts at CWG.
*/
/* Check if we need to get the root group's entry */
- if('/' == *name) {
- H5G_t *root_grp; /* Temporary pointer to root group of file */
+ if ('/' == *name) {
+ H5G_t *root_grp; /* Temporary pointer to root group of file */
/* Look up root group for starting location */
root_grp = H5G_rootof(_loc->oloc->file);
@@ -537,72 +519,72 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
/* Clear group location */
- if(H5G_loc_reset(&grp_loc) < 0)
+ if (H5G_loc_reset(&grp_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location")
#endif /* H5_USING_MEMCHECKER */
/* Deep copy of the starting location to group location */
- if(H5G__loc_copy(&grp_loc, &loc, H5_COPY_DEEP) < 0)
+ if (H5G__loc_copy(&grp_loc, &loc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy location")
group_copy = TRUE;
/* Clear object location */
- if(H5G_loc_reset(&obj_loc) < 0)
+ if (H5G_loc_reset(&obj_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location")
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(comp_buf, sizeof(comp_buf))))
+ if (NULL == (wb = H5WB_wrap(comp_buf, sizeof(comp_buf))))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough */
- if(NULL == (comp = (char *)H5WB_actual(wb, (HDstrlen(name) + 1))))
+ if (NULL == (comp = (char *)H5WB_actual(wb, (HDstrlen(name) + 1))))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Traverse the path */
- while((name = H5G__component(name, &nchars)) && *name) {
- const char *s; /* Temporary string pointer */
- htri_t lookup_status; /* Status from object lookup */
- hbool_t obj_exists; /* Whether the object exists */
-
- /*
- * Copy the component name into a null-terminated buffer so
- * we can pass it down to the other symbol table functions.
- */
- HDmemcpy(comp, name, nchars);
- comp[nchars] = '\0';
-
- /*
- * The special name `.' is a no-op.
- */
- if('.' == comp[0] && !comp[1]) {
- name += nchars;
- continue;
- } /* end if */
+ while ((name = H5G__component(name, &nchars)) && *name) {
+ const char *s; /* Temporary string pointer */
+ htri_t lookup_status; /* Status from object lookup */
+ hbool_t obj_exists; /* Whether the object exists */
+
+ /*
+ * Copy the component name into a null-terminated buffer so
+ * we can pass it down to the other symbol table functions.
+ */
+ HDmemcpy(comp, name, nchars);
+ comp[nchars] = '\0';
+
+ /*
+ * The special name `.' is a no-op.
+ */
+ if ('.' == comp[0] && !comp[1]) {
+ name += nchars;
+ continue;
+ } /* end if */
/* Check if this is the last component of the name */
- if(!((s = H5G__component(name + nchars, NULL)) && *s))
+ if (!((s = H5G__component(name + nchars, NULL)) && *s))
last_comp = TRUE;
/* If there's valid information in the link, reset it */
- if(link_valid) {
+ if (link_valid) {
H5O_msg_reset(H5O_LINK_ID, &lnk);
link_valid = FALSE;
} /* end if */
/* Get information for object in current group */
- if((lookup_status = H5G__obj_lookup(grp_loc.oloc, comp, &lnk/*out*/, dxpl_id)) < 0)
+ if ((lookup_status = H5G__obj_lookup(grp_loc.oloc, comp, &lnk /*out*/, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component")
obj_exists = FALSE;
/* If the lookup was OK, build object location and traverse special links, etc. */
- if(lookup_status) {
+ if (lookup_status) {
/* Sanity check link and indicate it's valid */
HDassert(lnk.type >= H5L_TYPE_HARD);
HDassert(!HDstrcmp(comp, lnk.name));
link_valid = TRUE;
/* Build object location from the link */
- if(H5G__link_to_loc(&grp_loc, &lnk, &obj_loc) < 0)
+ if (H5G__link_to_loc(&grp_loc, &lnk, &obj_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location")
obj_loc_valid = TRUE;
@@ -611,19 +593,20 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
- if(H5G__traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, &obj_exists, lapl_id, dxpl_id) < 0)
+ if (H5G__traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, &obj_exists,
+ lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed")
} /* end if */
/* Check for last component in name provided */
- if(last_comp) {
- H5O_link_t *cb_lnk; /* Pointer to link info for callback */
- H5G_loc_t *cb_loc; /* Pointer to object location for callback */
+ if (last_comp) {
+ H5O_link_t *cb_lnk; /* Pointer to link info for callback */
+ H5G_loc_t * cb_loc; /* Pointer to object location for callback */
/* Set callback parameters appropriately, based on link being found */
- if(lookup_status) {
+ if (lookup_status) {
cb_lnk = &lnk;
- if(obj_exists)
+ if (obj_exists)
cb_loc = &obj_loc;
else
cb_loc = NULL;
@@ -635,36 +618,36 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
} /* end else */
/* Call 'operator' routine */
- if((op)(&grp_loc, comp, cb_lnk, cb_loc, op_data, &own_loc) < 0)
+ if ((op)(&grp_loc, comp, cb_lnk, cb_loc, op_data, &own_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CALLBACK, FAIL, "traversal operator failed")
HGOTO_DONE(SUCCEED)
} /* end if */
/* Handle lookup failures now */
- if(!lookup_status) {
+ if (!lookup_status) {
/* If an intermediate group doesn't exist & flag is set, create the group */
- if(target & H5G_CRT_INTMD_GROUP) {
- const H5O_ginfo_t def_ginfo = H5G_CRT_GROUP_INFO_DEF; /* Default group info settings */
- const H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */
- const H5O_pline_t def_pline = H5O_CRT_PIPELINE_DEF; /* Default filter pipeline settings */
- H5O_ginfo_t par_ginfo; /* Group info settings for parent group */
- H5O_linfo_t par_linfo; /* Link info settings for parent group */
- H5O_pline_t par_pline; /* Filter pipeline settings for parent group */
- H5O_linfo_t tmp_linfo; /* Temporary link info settings */
- htri_t exists; /* Whether a group or link info message exists */
- const H5O_ginfo_t *ginfo; /* Group info settings for new group */
- const H5O_linfo_t *linfo; /* Link info settings for new group */
- const H5O_pline_t *pline; /* Filter pipeline settings for new group */
- H5G_obj_create_t gcrt_info; /* Group creation info */
+ if (target & H5G_CRT_INTMD_GROUP) {
+ const H5O_ginfo_t def_ginfo = H5G_CRT_GROUP_INFO_DEF; /* Default group info settings */
+ const H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */
+ const H5O_pline_t def_pline = H5O_CRT_PIPELINE_DEF; /* Default filter pipeline settings */
+ H5O_ginfo_t par_ginfo; /* Group info settings for parent group */
+ H5O_linfo_t par_linfo; /* Link info settings for parent group */
+ H5O_pline_t par_pline; /* Filter pipeline settings for parent group */
+ H5O_linfo_t tmp_linfo; /* Temporary link info settings */
+ htri_t exists; /* Whether a group or link info message exists */
+ const H5O_ginfo_t *ginfo; /* Group info settings for new group */
+ const H5O_linfo_t *linfo; /* Link info settings for new group */
+ const H5O_pline_t *pline; /* Filter pipeline settings for new group */
+ H5G_obj_create_t gcrt_info; /* Group creation info */
/* Check for the parent group having a group info message */
/* (OK if not found) */
- if((exists = H5O_msg_exists(grp_loc.oloc, H5O_GINFO_ID, dxpl_id)) < 0)
+ if ((exists = H5O_msg_exists(grp_loc.oloc, H5O_GINFO_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(exists) {
+ if (exists) {
/* Get the group info for parent group */
- if(NULL == H5O_msg_read(grp_loc.oloc, H5O_GINFO_ID, &par_ginfo, dxpl_id))
+ if (NULL == H5O_msg_read(grp_loc.oloc, H5O_GINFO_ID, &par_ginfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "group info message not present")
/* Use parent group info settings */
@@ -677,16 +660,16 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Check for the parent group having a link info message */
/* (OK if not found) */
/* Get the link info for parent group */
- if((exists = H5G__obj_get_linfo(grp_loc.oloc, &par_linfo, dxpl_id)) < 0)
+ if ((exists = H5G__obj_get_linfo(grp_loc.oloc, &par_linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(exists) {
+ if (exists) {
/* Only keep the creation order information from the parent
* group's link info
*/
HDmemcpy(&tmp_linfo, &def_linfo, sizeof(H5O_linfo_t));
tmp_linfo.track_corder = par_linfo.track_corder;
tmp_linfo.index_corder = par_linfo.index_corder;
- linfo = &tmp_linfo;
+ linfo = &tmp_linfo;
} /* end if */
else
/* Use default link info settings */
@@ -694,11 +677,11 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Check for the parent group having a filter pipeline message */
/* (OK if not found) */
- if((exists = H5O_msg_exists(grp_loc.oloc, H5O_PLINE_ID, dxpl_id)) < 0)
+ if ((exists = H5O_msg_exists(grp_loc.oloc, H5O_PLINE_ID, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
- if(exists) {
+ if (exists) {
/* Get the filter pipeline for parent group */
- if(NULL == H5O_msg_read(grp_loc.oloc, H5O_PLINE_ID, &par_pline, dxpl_id))
+ if (NULL == H5O_msg_read(grp_loc.oloc, H5O_PLINE_ID, &par_pline, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "filter pipeline message not present")
/* Use parent filter pipeline settings */
@@ -709,53 +692,55 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
pline = &def_pline;
/* Create the intermediate group */
-/* XXX: Should we allow user to control the group creation params here? -QAK */
- gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
+ /* XXX: Should we allow user to control the group creation params here? -QAK */
+ gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
- if(H5G__obj_create_real(grp_oloc.file, dxpl_id, ginfo, linfo, pline, &gcrt_info, obj_loc.oloc/*out*/) < 0)
+ if (H5G__obj_create_real(grp_oloc.file, dxpl_id, ginfo, linfo, pline, &gcrt_info,
+ obj_loc.oloc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
/* Insert new group into current group's symbol table */
- if(H5G__loc_insert(&grp_loc, comp, &obj_loc, H5O_TYPE_GROUP, &gcrt_info, dxpl_id) < 0)
+ if (H5G__loc_insert(&grp_loc, comp, &obj_loc, H5O_TYPE_GROUP, &gcrt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert intermediate group")
/* Decrement refcount on intermediate group's object header in memory */
- if(H5O_dec_rc_by_loc(obj_loc.oloc, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
+ if (H5O_dec_rc_by_loc(obj_loc.oloc, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL,
+ "unable to decrement refcount on newly created object")
/* Close new group */
- if(H5O_close(obj_loc.oloc) < 0)
+ if (H5O_close(obj_loc.oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
/* If the parent group was holding the file open, the
* newly-created group should, as well.
*/
- if(grp_loc.oloc->holding_file)
- if(H5O_loc_hold_file(obj_loc.oloc) < 0)
+ if (grp_loc.oloc->holding_file)
+ if (H5O_loc_hold_file(obj_loc.oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open")
/* Reset any non-default object header messages */
- if(ginfo != &def_ginfo)
+ if (ginfo != &def_ginfo)
/* (Casting away const OK - QAK) */
- if(H5O_msg_reset(H5O_GINFO_ID, (void *)ginfo) < 0)
+ if (H5O_msg_reset(H5O_GINFO_ID, (void *)ginfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message")
- if(linfo != &def_linfo)
+ if (linfo != &def_linfo)
/* (Casting away const OK - QAK) */
- if(H5O_msg_reset(H5O_LINFO_ID, (void *)linfo) < 0)
+ if (H5O_msg_reset(H5O_LINFO_ID, (void *)linfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message")
- if(pline != &def_pline)
+ if (pline != &def_pline)
/* (Casting away const OK - QAK) */
- if(H5O_msg_reset(H5O_PLINE_ID, (void *)pline) < 0)
+ if (H5O_msg_reset(H5O_PLINE_ID, (void *)pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message")
} /* end if */
else
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found")
} /* end if */
- /*
- * Advance to the next component of the path.
- */
+ /*
+ * Advance to the next component of the path.
+ */
/* Transfer "ownership" of the object's information to the group object */
H5G_loc_free(&grp_loc);
@@ -763,8 +748,8 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
H5G_loc_reset(&obj_loc);
obj_loc_valid = FALSE;
- /* Advance to next component in string */
- name += nchars;
+ /* Advance to next component in string */
+ name += nchars;
} /* end while */
/* Call 'operator' routine */
@@ -774,41 +759,40 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
* NULL.
*/
HDassert(group_copy);
- if((op)(NULL, ".", NULL, &grp_loc, op_data, &own_loc) < 0)
+ if ((op)(NULL, ".", NULL, &grp_loc, op_data, &own_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "traversal operator failed")
/* If the callback took ownership of the object location, it actually has
* ownership of grp_loc. It shouldn't have tried to take ownership of
* the "group location", which was NULL. */
- HDassert(!(own_loc & H5G_OWN_GRP_LOC));
- if(own_loc & H5G_OWN_OBJ_LOC)
- own_loc |= H5G_OWN_GRP_LOC;
+ HDassert(!(own_loc & H5G_OWN_GRP_LOC));
+ if (own_loc & H5G_OWN_OBJ_LOC)
+ own_loc |= H5G_OWN_GRP_LOC;
done:
/* If there's been an error, the callback doesn't really get ownership of
* any location and we should close them both */
- if(ret_value < 0)
+ if (ret_value < 0)
own_loc = H5G_OWN_NONE;
/* Free all open locations. This also closes any open external files. */
- if(obj_loc_valid && !(own_loc & H5G_OWN_OBJ_LOC))
+ if (obj_loc_valid && !(own_loc & H5G_OWN_OBJ_LOC))
H5G_loc_free(&obj_loc);
- if(group_copy && !(own_loc & H5G_OWN_GRP_LOC))
+ if (group_copy && !(own_loc & H5G_OWN_GRP_LOC))
H5G_loc_free(&grp_loc);
/* If there's valid information in the link, reset it */
- if(link_valid)
- if(H5O_msg_reset(H5O_LINK_ID, &lnk) < 0)
+ if (link_valid)
+ if (H5O_msg_reset(H5O_LINK_ID, &lnk) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link message")
/* Release temporary component buffer */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't release wrapped buffer")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse_real() */
-
/*-------------------------------------------------------------------------
* Function: H5G_traverse
*
@@ -820,45 +804,43 @@ done:
* traversed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 13 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traverse_t op,
- void *op_data, hid_t lapl_id, hid_t dxpl_id)
+H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traverse_t op, void *op_data,
+ hid_t lapl_id, hid_t dxpl_id)
{
- size_t nlinks; /* Link countdown value */
- H5P_genplist_t *lapl; /* Property list with value for nlinks */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t nlinks; /* Link countdown value */
+ H5P_genplist_t *lapl; /* Property list with value for nlinks */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no name given")
- if(!loc)
+ if (!loc)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no starting location")
- if(!op)
+ if (!op)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no operation provided")
HDassert(lapl_id >= 0);
/* Set nlinks value from property list, if it exists */
- if(lapl_id == H5P_DEFAULT)
+ if (lapl_id == H5P_DEFAULT)
nlinks = H5L_NUM_LINKS;
else {
- if(NULL == (lapl = (H5P_genplist_t *)H5I_object(lapl_id)))
+ if (NULL == (lapl = (H5P_genplist_t *)H5I_object(lapl_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
- if(H5P_get(lapl, H5L_ACS_NLINKS_NAME, &nlinks) < 0)
+ if (H5P_get(lapl, H5L_ACS_NLINKS_NAME, &nlinks) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of links")
} /* end else */
/* Go perform "real" traversal */
- if(H5G_traverse_real(loc, name, target, &nlinks, op, op_data, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse_real(loc, name, target, &nlinks, op, op_data, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "internal path traversal failed")
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse() */
-
diff --git a/src/H5HF.c b/src/H5HF.c
index 6940826..b18d6ec 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HF.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements a "fractal heap" for storing variable-
* length objects in a file.
@@ -31,47 +31,41 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FOprivate.h" /* File objects */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FOprivate.h" /* File objects */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -79,8 +73,6 @@
/* Declare a free list to manage the H5HF_t struct */
H5FL_DEFINE_STATIC(H5HF_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_op_read
*
@@ -89,7 +81,6 @@ H5FL_DEFINE_STATIC(H5HF_t);
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -105,7 +96,6 @@ H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_op_read() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_op_write
*
@@ -114,7 +104,6 @@ H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
@@ -125,12 +114,11 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Perform "write", using memcpy() */
- HDmemcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
+ HDmemcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_op_write() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_create
*
@@ -140,7 +128,6 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -148,10 +135,10 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
H5HF_t *
H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
{
- H5HF_t *fh = NULL; /* Pointer to new fractal heap */
- H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
- haddr_t fh_addr; /* Heap header address */
- H5HF_t *ret_value; /* Return value */
+ H5HF_t * fh = NULL; /* Pointer to new fractal heap */
+ H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
+ haddr_t fh_addr; /* Heap header address */
+ H5HF_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -162,25 +149,25 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
HDassert(cparam);
/* Create shared fractal heap header */
- if(HADDR_UNDEF == (fh_addr = H5HF_hdr_create(f, dxpl_id, cparam)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create fractal heap header")
+ if (HADDR_UNDEF == (fh_addr = H5HF_hdr_create(f, dxpl_id, cparam)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create fractal heap header")
/* Allocate fractal heap wrapper */
- if(NULL == (fh = H5FL_MALLOC(H5HF_t)))
+ if (NULL == (fh = H5FL_MALLOC(H5HF_t)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info")
/* Lock the heap header into memory */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE)))
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header")
/* Point fractal heap wrapper at header and bump it's ref count */
fh->hdr = hdr;
- if(H5HF_hdr_incr(fh->hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
+ if (H5HF_hdr_incr(fh->hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Increment # of files using this heap header */
- if(H5HF_hdr_fuse_incr(fh->hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
+ if (H5HF_hdr_fuse_incr(fh->hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
/* Set file pointer for this heap open context */
fh->f = f;
@@ -189,16 +176,15 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
ret_value = fh;
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release fractal heap header")
- if(!ret_value && fh)
- if(H5HF_close(fh, dxpl_id) < 0)
+ if (!ret_value && fh)
+ if (H5HF_close(fh, dxpl_id) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, NULL, "unable to close fractal heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_open
*
@@ -208,7 +194,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2006
*
*-------------------------------------------------------------------------
@@ -216,9 +201,9 @@ done:
H5HF_t *
H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
{
- H5HF_t *fh = NULL; /* Pointer to new fractal heap */
- H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
- H5HF_t *ret_value; /* Return value */
+ H5HF_t * fh = NULL; /* Pointer to new fractal heap */
+ H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
+ H5HF_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -229,25 +214,25 @@ H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
HDassert(H5F_addr_defined(fh_addr));
/* Load the heap header into memory */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ)))
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header")
/* Check for pending heap deletion */
- if(hdr->pending_delete)
+ if (hdr->pending_delete)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, NULL, "can't open fractal heap pending deletion")
/* Create fractal heap info */
- if(NULL == (fh = H5FL_MALLOC(H5HF_t)))
+ if (NULL == (fh = H5FL_MALLOC(H5HF_t)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info")
/* Point fractal heap wrapper at header */
fh->hdr = hdr;
- if(H5HF_hdr_incr(fh->hdr) < 0)
+ if (H5HF_hdr_incr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Increment # of files using this heap header */
- if(H5HF_hdr_fuse_incr(fh->hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
+ if (H5HF_hdr_fuse_incr(fh->hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
/* Set file pointer for this heap open context */
fh->f = f;
@@ -256,16 +241,15 @@ H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
ret_value = fh;
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release fractal heap header")
- if(!ret_value && fh)
- if(H5HF_close(fh, dxpl_id) < 0)
+ if (!ret_value && fh)
+ if (H5HF_close(fh, dxpl_id) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, NULL, "unable to close fractal heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_open() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_id_len
*
@@ -274,7 +258,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -296,7 +279,6 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_get_id_len() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_heap_addr
*
@@ -305,7 +287,6 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2006
*
*-------------------------------------------------------------------------
@@ -327,7 +308,6 @@ H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_get_heap_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_insert
*
@@ -337,17 +317,15 @@ H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
* filled in), negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj,
- void *id/*out*/)
+H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj, void *id /*out*/)
{
- H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
- herr_t ret_value = SUCCEED;
+ H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -357,7 +335,7 @@ H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj,
HDassert(id);
/* Check arguments */
- if(size == 0)
+ if (size == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "can't insert 0-sized objects")
/* Set the shared heap header's file context for this operation */
@@ -367,35 +345,34 @@ H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj,
hdr = fh->hdr;
/* Check for 'huge' object */
- if(size > hdr->max_man_size) {
+ if (size > hdr->max_man_size) {
/* Store 'huge' object in heap */
/* (Casting away const OK - QAK) */
- if(H5HF_huge_insert(hdr, dxpl_id, size, (void *)obj, id) < 0)
+ if (H5HF_huge_insert(hdr, dxpl_id, size, (void *)obj, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'huge' object in fractal heap")
} /* end if */
/* Check for 'tiny' object */
- else if(size <= hdr->tiny_max_len) {
+ else if (size <= hdr->tiny_max_len) {
/* Store 'tiny' object in heap */
- if(H5HF_tiny_insert(hdr, size, obj, id) < 0)
+ if (H5HF_tiny_insert(hdr, size, obj, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'tiny' object in fractal heap")
} /* end if */
else {
/* Check if we are in "append only" mode, or if there's enough room for the object */
- if(hdr->write_once) {
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "'write once' managed blocks not supported yet")
+ if (hdr->write_once) {
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "'write once' managed blocks not supported yet")
} /* end if */
else {
/* Allocate space for object in 'managed' heap */
- if(H5HF_man_insert(hdr, dxpl_id, size, obj, id) < 0)
+ if (H5HF_man_insert(hdr, dxpl_id, size, obj, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'managed' object in fractal heap")
} /* end else */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_obj_len
*
@@ -404,7 +381,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
@@ -412,9 +388,9 @@ done:
herr_t
H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- uint8_t id_flags; /* Heap ID flag bits */
- herr_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -429,14 +405,14 @@ H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
id_flags = *id;
/* Check for correct heap ID version */
- if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
/* Check type of object in heap */
- if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Skip over the flag byte */
id++;
@@ -446,24 +422,23 @@ H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
/* Retrieve the entry length */
UINT64DECODE_VAR(id, *obj_len_p, fh->hdr->heap_len_size);
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
- if(H5HF_huge_get_obj_len(fh->hdr, dxpl_id, id, obj_len_p) < 0)
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ if (H5HF_huge_get_obj_len(fh->hdr, dxpl_id, id, obj_len_p) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's length")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
- if(H5HF_tiny_get_obj_len(fh->hdr, id, obj_len_p) < 0)
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ if (H5HF_tiny_get_obj_len(fh->hdr, id, obj_len_p) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length")
} /* end if */
else {
-HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_get_obj_len() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_read
*
@@ -472,17 +447,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 18 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj/*out*/)
+H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj /*out*/)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- uint8_t id_flags; /* Heap ID flag bits */
- herr_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -497,38 +471,37 @@ H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj/*out*/)
id_flags = *id;
/* Check for correct heap ID version */
- if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
/* Check type of object in heap */
- if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Read object from managed heap blocks */
- if(H5HF_man_read(fh->hdr, dxpl_id, id, obj) < 0)
+ if (H5HF_man_read(fh->hdr, dxpl_id, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
/* Read 'huge' object from file */
- if(H5HF_huge_read(fh->hdr, dxpl_id, id, obj) < 0)
+ if (H5HF_huge_read(fh->hdr, dxpl_id, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'huge' object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Read 'tiny' object from file */
- if(H5HF_tiny_read(fh->hdr, id, obj) < 0)
+ if (H5HF_tiny_read(fh->hdr, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap")
} /* end if */
else {
-HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_read() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_write
*
@@ -549,18 +522,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *_id, hbool_t H5_ATTR_UNUSED *id_changed,
- const void *obj)
+H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void *obj)
{
- uint8_t *id = (uint8_t *)_id; /* Object ID */
- uint8_t id_flags; /* Heap ID flag bits */
- herr_t ret_value = SUCCEED; /* Return value */
+ uint8_t *id = (uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -575,39 +546,38 @@ H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *_id, hbool_t H5_ATTR_UNUSED *id_chan
id_flags = *id;
/* Check for correct heap ID version */
- if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
/* Check type of object in heap */
- if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Operate on object from managed heap blocks */
/* (ID can't change and modifying object is "easy" to manage) */
- if(H5HF_man_write(fh->hdr, dxpl_id, id, obj) < 0)
+ if (H5HF_man_write(fh->hdr, dxpl_id, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'managed' heap object")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
/* Operate on "huge" object */
- if(H5HF_huge_write(fh->hdr, dxpl_id, id, obj) < 0)
+ if (H5HF_huge_write(fh->hdr, dxpl_id, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'huge' heap object")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Check for writing a 'tiny' object */
/* (which isn't supported yet - ID will change) */
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet")
} /* end if */
else {
-HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_write() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_op
*
@@ -621,18 +591,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *_id, H5HF_operator_t op,
- void *op_data)
+H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *_id, H5HF_operator_t op, void *op_data)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- uint8_t id_flags; /* Heap ID flag bits */
- herr_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -647,38 +615,37 @@ H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *_id, H5HF_operator_t op,
id_flags = *id;
/* Check for correct heap ID version */
- if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
/* Check type of object in heap */
- if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Operate on object from managed heap blocks */
- if(H5HF_man_op(fh->hdr, dxpl_id, id, op, op_data) < 0)
+ if (H5HF_man_op(fh->hdr, dxpl_id, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
/* Operate on 'huge' object from file */
- if(H5HF_huge_op(fh->hdr, dxpl_id, id, op, op_data) < 0)
+ if (H5HF_huge_op(fh->hdr, dxpl_id, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'huge' object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Operate on 'tiny' object from file */
- if(H5HF_tiny_op(fh->hdr, id, op, op_data) < 0)
+ if (H5HF_tiny_op(fh->hdr, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap")
} /* end if */
else {
-HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_op() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_remove
*
@@ -687,7 +654,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
@@ -695,9 +661,9 @@ done:
herr_t
H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *_id)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- uint8_t id_flags; /* Heap ID flag bits */
- herr_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ uint8_t id_flags; /* Heap ID flag bits */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -712,38 +678,37 @@ H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *_id)
id_flags = *id;
/* Check for correct heap ID version */
- if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
+ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
/* Check type of object in heap */
- if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
+ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Remove object from managed heap blocks */
- if(H5HF_man_remove(fh->hdr, dxpl_id, id) < 0)
+ if (H5HF_man_remove(fh->hdr, dxpl_id, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
/* Remove 'huge' object from file & v2 B-tree tracker */
- if(H5HF_huge_remove(fh->hdr, dxpl_id, id) < 0)
+ if (H5HF_huge_remove(fh->hdr, dxpl_id, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'huge' object from fractal heap")
} /* end if */
- else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
+ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Remove 'tiny' object from heap statistics */
- if(H5HF_tiny_remove(fh->hdr, id) < 0)
+ if (H5HF_tiny_remove(fh->hdr, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap")
} /* end if */
else {
-HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
+ HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_close
*
@@ -752,7 +717,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -760,9 +724,9 @@ done:
herr_t
H5HF_close(H5HF_t *fh, hid_t dxpl_id)
{
- hbool_t pending_delete = FALSE; /* Whether the heap is pending deletion */
- haddr_t heap_addr = HADDR_UNDEF; /* Address of heap (for deletion) */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t pending_delete = FALSE; /* Whether the heap is pending deletion */
+ haddr_t heap_addr = HADDR_UNDEF; /* Address of heap (for deletion) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -772,7 +736,7 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
HDassert(fh);
/* Decrement file reference & check if this is the last open fractal heap using the shared heap header */
- if(0 == H5HF_hdr_fuse_decr(fh->hdr)) {
+ if (0 == H5HF_hdr_fuse_decr(fh->hdr)) {
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
@@ -782,7 +746,7 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
* a reference loop and the objects couldn't be removed from
* the metadata cache - QAK)
*/
- if(H5HF_space_close(fh->hdr, dxpl_id) < 0)
+ if (H5HF_space_close(fh->hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
/* Reset the block iterator, if necessary */
@@ -791,8 +755,8 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
* a reference loop and the objects couldn't be removed from
* the metadata cache - QAK)
*/
- if(H5HF_man_iter_ready(&fh->hdr->next_block))
- if(H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
+ if (H5HF_man_iter_ready(&fh->hdr->next_block))
+ if (H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Shut down the huge object information */
@@ -800,33 +764,33 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
* has the address of an object in the file, which might be
* modified by the shutdown routine - QAK)
*/
- if(H5HF_huge_term(fh->hdr, dxpl_id) < 0)
+ if (H5HF_huge_term(fh->hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release 'huge' object info")
/* Check for pending heap deletion */
- if(fh->hdr->pending_delete) {
+ if (fh->hdr->pending_delete) {
/* Set local info, so heap deletion can occur after decrementing the
* header's ref count
*/
pending_delete = TRUE;
- heap_addr = fh->hdr->heap_addr;
+ heap_addr = fh->hdr->heap_addr;
} /* end if */
- } /* end if */
+ } /* end if */
/* Decrement the reference count on the heap header */
- if(H5HF_hdr_decr(fh->hdr) < 0)
+ if (H5HF_hdr_decr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
/* Check for pending heap deletion */
- if(pending_delete) {
- H5HF_hdr_t *hdr; /* Another pointer to fractal heap header */
+ if (pending_delete) {
+ H5HF_hdr_t *hdr; /* Another pointer to fractal heap header */
/* Lock the heap header into memory */
- if(NULL == (hdr = H5HF_hdr_protect(fh->f, dxpl_id, heap_addr, H5AC_WRITE)))
+ if (NULL == (hdr = H5HF_hdr_protect(fh->f, dxpl_id, heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Delete heap, starting with header (unprotects header) */
- if(H5HF_hdr_delete(hdr, dxpl_id) < 0)
+ if (H5HF_hdr_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap")
} /* end if */
@@ -837,7 +801,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_close() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_delete
*
@@ -846,7 +809,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 4 2006
*
*-------------------------------------------------------------------------
@@ -854,8 +816,8 @@ done:
herr_t
H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
{
- H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -866,24 +828,23 @@ H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
HDassert(H5F_addr_defined(fh_addr));
/* Lock the heap header into memory */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE)))
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Check for files using shared heap header */
- if(hdr->file_rc)
+ if (hdr->file_rc)
hdr->pending_delete = TRUE;
else {
/* Delete heap now, starting with header (unprotects header) */
- if(H5HF_hdr_delete(hdr, dxpl_id) < 0)
+ if (H5HF_hdr_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap")
hdr = NULL;
} /* end if */
done:
/* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_delete() */
-
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index a34b792..6b90bb3 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFbtree2.c
* Aug 7 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for "huge" object tracker
*
@@ -26,107 +26,95 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* v2 B-tree client callback context */
typedef struct H5HF_huge_bt2_ctx_t {
- uint8_t sizeof_size; /* Size of file sizes */
- uint8_t sizeof_addr; /* Size of file addresses */
+ uint8_t sizeof_size; /* Size of file sizes */
+ uint8_t sizeof_addr; /* Size of file addresses */
} H5HF_huge_bt2_ctx_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/* v2 B-tree driver callbacks */
-static void *H5HF_huge_bt2_crt_context(void *udata);
+static void * H5HF_huge_bt2_crt_context(void *udata);
static herr_t H5HF_huge_bt2_dst_context(void *ctx);
-static void *H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+static void * H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
static herr_t H5HF_huge_bt2_indir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_indir_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent, int fwidth,
+ const void *record, const void *_udata);
static herr_t H5HF_huge_bt2_filt_indir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_filt_indir_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent,
+ int fwidth, const void *record, const void *_udata);
static herr_t H5HF_huge_bt2_dir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_dir_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent, int fwidth,
+ const void *record, const void *_udata);
static herr_t H5HF_huge_bt2_filt_dir_store(void *native, const void *udata);
static herr_t H5HF_huge_bt2_filt_dir_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *native,
- void *ctx);
-static herr_t H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
- int indent, int fwidth, const void *record, const void *_udata);
+static herr_t H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *native, void *ctx);
+static herr_t H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *native, void *ctx);
+static herr_t H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id, int indent,
+ int fwidth, const void *record, const void *_udata);
/*********************/
/* Package Variables */
/*********************/
/* v2 B-tree class for indirectly accessed 'huge' objects */
-const H5B2_class_t H5HF_HUGE_BT2_INDIR[1]={{ /* B-tree class information */
- H5B2_FHEAP_HUGE_INDIR_ID, /* Type of B-tree */
- "H5B2_FHEAP_HUGE_INDIR_ID", /* Name of B-tree class */
- sizeof(H5HF_huge_bt2_indir_rec_t), /* Size of native record */
- H5HF_huge_bt2_crt_context, /* Create client callback context */
- H5HF_huge_bt2_dst_context, /* Destroy client callback context */
- H5HF_huge_bt2_indir_store, /* Record storage callback */
- H5HF_huge_bt2_indir_compare, /* Record comparison callback */
- H5HF_huge_bt2_indir_encode, /* Record encoding callback */
- H5HF_huge_bt2_indir_decode, /* Record decoding callback */
- H5HF_huge_bt2_indir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+const H5B2_class_t H5HF_HUGE_BT2_INDIR[1] = {{
+ /* B-tree class information */
+ H5B2_FHEAP_HUGE_INDIR_ID, /* Type of B-tree */
+ "H5B2_FHEAP_HUGE_INDIR_ID", /* Name of B-tree class */
+ sizeof(H5HF_huge_bt2_indir_rec_t), /* Size of native record */
+ H5HF_huge_bt2_crt_context, /* Create client callback context */
+ H5HF_huge_bt2_dst_context, /* Destroy client callback context */
+ H5HF_huge_bt2_indir_store, /* Record storage callback */
+ H5HF_huge_bt2_indir_compare, /* Record comparison callback */
+ H5HF_huge_bt2_indir_encode, /* Record encoding callback */
+ H5HF_huge_bt2_indir_decode, /* Record decoding callback */
+ H5HF_huge_bt2_indir_debug, /* Record debugging callback */
+ H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
+ H5HF_huge_bt2_dst_context /* Destroy debugging context */
}};
/* v2 B-tree class for indirectly accessed, filtered 'huge' objects */
-const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1]={{ /* B-tree class information */
+const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1] = {{
+ /* B-tree class information */
H5B2_FHEAP_HUGE_FILT_INDIR_ID, /* Type of B-tree */
"H5B2_FHEAP_HUGE_FILT_INDIR_ID", /* Name of B-tree class */
sizeof(H5HF_huge_bt2_filt_indir_rec_t), /* Size of native record */
@@ -142,42 +130,43 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1]={{ /* B-tree class information */
}};
/* v2 B-tree class for directly accessed 'huge' objects */
-const H5B2_class_t H5HF_HUGE_BT2_DIR[1]={{ /* B-tree class information */
- H5B2_FHEAP_HUGE_DIR_ID, /* Type of B-tree */
- "H5B2_FHEAP_HUGE_DIR_ID", /* Name of B-tree class */
- sizeof(H5HF_huge_bt2_dir_rec_t), /* Size of native record */
- H5HF_huge_bt2_crt_context, /* Create client callback context */
- H5HF_huge_bt2_dst_context, /* Destroy client callback context */
- H5HF_huge_bt2_dir_store, /* Record storage callback */
- H5HF_huge_bt2_dir_compare, /* Record comparison callback */
- H5HF_huge_bt2_dir_encode, /* Record encoding callback */
- H5HF_huge_bt2_dir_decode, /* Record decoding callback */
- H5HF_huge_bt2_dir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+const H5B2_class_t H5HF_HUGE_BT2_DIR[1] = {{
+ /* B-tree class information */
+ H5B2_FHEAP_HUGE_DIR_ID, /* Type of B-tree */
+ "H5B2_FHEAP_HUGE_DIR_ID", /* Name of B-tree class */
+ sizeof(H5HF_huge_bt2_dir_rec_t), /* Size of native record */
+ H5HF_huge_bt2_crt_context, /* Create client callback context */
+ H5HF_huge_bt2_dst_context, /* Destroy client callback context */
+ H5HF_huge_bt2_dir_store, /* Record storage callback */
+ H5HF_huge_bt2_dir_compare, /* Record comparison callback */
+ H5HF_huge_bt2_dir_encode, /* Record encoding callback */
+ H5HF_huge_bt2_dir_decode, /* Record decoding callback */
+ H5HF_huge_bt2_dir_debug, /* Record debugging callback */
+ H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
+ H5HF_huge_bt2_dst_context /* Destroy debugging context */
}};
/* v2 B-tree class for directly accessed, filtered 'huge' objects */
-const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1]={{ /* B-tree class information */
- H5B2_FHEAP_HUGE_FILT_DIR_ID, /* Type of B-tree */
- "H5B2_FHEAP_HUGE_FILT_DIR_ID", /* Name of B-tree class */
- sizeof(H5HF_huge_bt2_filt_dir_rec_t), /* Size of native record */
- H5HF_huge_bt2_crt_context, /* Create client callback context */
- H5HF_huge_bt2_dst_context, /* Destroy client callback context */
- H5HF_huge_bt2_filt_dir_store, /* Record storage callback */
- H5HF_huge_bt2_filt_dir_compare, /* Record comparison callback */
- H5HF_huge_bt2_filt_dir_encode, /* Record encoding callback */
- H5HF_huge_bt2_filt_dir_decode, /* Record decoding callback */
- H5HF_huge_bt2_filt_dir_debug, /* Record debugging callback */
- H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF_huge_bt2_dst_context /* Destroy debugging context */
+const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1] = {{
+ /* B-tree class information */
+ H5B2_FHEAP_HUGE_FILT_DIR_ID, /* Type of B-tree */
+ "H5B2_FHEAP_HUGE_FILT_DIR_ID", /* Name of B-tree class */
+ sizeof(H5HF_huge_bt2_filt_dir_rec_t), /* Size of native record */
+ H5HF_huge_bt2_crt_context, /* Create client callback context */
+ H5HF_huge_bt2_dst_context, /* Destroy client callback context */
+ H5HF_huge_bt2_filt_dir_store, /* Record storage callback */
+ H5HF_huge_bt2_filt_dir_compare, /* Record comparison callback */
+ H5HF_huge_bt2_filt_dir_encode, /* Record encoding callback */
+ H5HF_huge_bt2_filt_dir_decode, /* Record decoding callback */
+ H5HF_huge_bt2_filt_dir_debug, /* Record debugging callback */
+ H5HF_huge_bt2_crt_dbg_context, /* Create debugging context */
+ H5HF_huge_bt2_dst_context /* Destroy debugging context */
}};
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -185,8 +174,6 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1]={{ /* B-tree class information */
/* Declare a free list to manage the H5HF_huge_bt2_ctx_t struct */
H5FL_DEFINE_STATIC(H5HF_huge_bt2_ctx_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_crt_context
*
@@ -205,9 +192,9 @@ H5FL_DEFINE_STATIC(H5HF_huge_bt2_ctx_t);
static void *
H5HF_huge_bt2_crt_context(void *_f)
{
- H5F_t *f = (H5F_t *)_f; /* User data for building callback context */
- H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
+ H5F_t * f = (H5F_t *)_f; /* User data for building callback context */
+ H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -215,7 +202,7 @@ H5HF_huge_bt2_crt_context(void *_f)
HDassert(f);
/* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
+ if (NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
/* Determine the size of addresses & lengths in the file */
@@ -229,7 +216,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_crt_context() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dst_context
*
@@ -248,7 +234,7 @@ done:
static herr_t
H5HF_huge_bt2_dst_context(void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -261,7 +247,6 @@ H5HF_huge_bt2_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dst_context() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_crt_dbg_context
*
@@ -278,8 +263,8 @@ H5HF_huge_bt2_dst_context(void *_ctx)
static void *
H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
{
- H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value; /* Return value */
+ H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -287,7 +272,7 @@ H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5
HDassert(f);
/* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
+ if (NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
/* Determine the size of addresses & lengths in the file */
@@ -301,7 +286,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_crt_dbg_context() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_found
*
@@ -321,18 +305,11 @@ H5HF_huge_bt2_indir_found(const void *nrecord, void *op_data)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %Hu}\n", "H5HF_huge_bt2_indir_found",
- ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr,
- ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len,
- ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->id);
-#endif /* QAK */
*(H5HF_huge_bt2_indir_rec_t *)op_data = *(const H5HF_huge_bt2_indir_rec_t *)nrecord;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_found() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_remove
*
@@ -350,13 +327,15 @@ HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %Hu}\n", "H5HF_huge_bt2_indir_found",
herr_t
H5HF_huge_bt2_indir_remove(const void *nrecord, void *_udata)
{
- H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
- if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
+ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id,
+ ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr,
+ ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk")
/* Set the length of the object removed */
@@ -366,7 +345,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_indir_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_store
*
@@ -390,7 +368,6 @@ H5HF_huge_bt2_indir_store(void *nrecord, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_store() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_compare
*
@@ -410,13 +387,12 @@ H5HF_huge_bt2_indir_compare(const void *_rec1, const void *_rec2, int *result)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- *result = (int)(((const H5HF_huge_bt2_indir_rec_t *)_rec1)->id -
+ *result = (int)(((const H5HF_huge_bt2_indir_rec_t *)_rec1)->id -
((const H5HF_huge_bt2_indir_rec_t *)_rec2)->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_encode
*
@@ -433,7 +409,7 @@ H5HF_huge_bt2_indir_compare(const void *_rec1, const void *_rec2, int *result)
static herr_t
H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -449,7 +425,6 @@ H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_decode
*
@@ -466,7 +441,7 @@ H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
static herr_t
H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_indir_rec_t *nrecord = (H5HF_huge_bt2_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -482,7 +457,6 @@ H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_indir_debug
*
@@ -498,20 +472,18 @@ H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*/
static herr_t
H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
- nrecord->addr, nrecord->len, nrecord->id);
+ HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, nrecord->len,
+ nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_indir_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_found
*
@@ -531,20 +503,11 @@ H5HF_huge_bt2_filt_indir_found(const void *nrecord, void *op_data)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu, %Hu}\n", "H5HF_huge_bt2_filt_indir_found",
- ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->addr,
- ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->len,
- ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->filter_mask,
- ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->obj_size,
- ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->id);
-#endif /* QAK */
*(H5HF_huge_bt2_filt_indir_rec_t *)op_data = *(const H5HF_huge_bt2_filt_indir_rec_t *)nrecord;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_found() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_remove
*
@@ -562,13 +525,15 @@ HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu, %Hu}\n", "H5HF_huge_bt2_filt
herr_t
H5HF_huge_bt2_filt_indir_remove(const void *nrecord, void *_udata)
{
- H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
- if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->len) < 0)
+ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id,
+ ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->addr,
+ ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk")
/* Set the length of the object removed */
@@ -578,7 +543,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_filt_indir_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_store
*
@@ -602,7 +566,6 @@ H5HF_huge_bt2_filt_indir_store(void *nrecord, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_store() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_compare
*
@@ -622,13 +585,12 @@ H5HF_huge_bt2_filt_indir_compare(const void *_rec1, const void *_rec2, int *resu
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- *result = (int)(((const H5HF_huge_bt2_filt_indir_rec_t *)_rec1)->id -
+ *result = (int)(((const H5HF_huge_bt2_filt_indir_rec_t *)_rec1)->id -
((const H5HF_huge_bt2_filt_indir_rec_t *)_rec2)->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_encode
*
@@ -645,7 +607,7 @@ H5HF_huge_bt2_filt_indir_compare(const void *_rec1, const void *_rec2, int *resu
static herr_t
H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -663,7 +625,6 @@ H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_decode
*
@@ -680,7 +641,7 @@ H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
static herr_t
H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_indir_rec_t *nrecord = (H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -698,7 +659,6 @@ H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_indir_debug
*
@@ -714,20 +674,19 @@ H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*/
static herr_t
H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord,
+ const void H5_ATTR_UNUSED *_udata)
{
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
- nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size, nrecord->id);
+ HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr,
+ nrecord->len, nrecord->filter_mask, nrecord->obj_size, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_indir_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_remove
*
@@ -745,13 +704,15 @@ H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_
herr_t
H5HF_huge_bt2_dir_remove(const void *nrecord, void *_udata)
{
- H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
- if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
+ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id,
+ ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr,
+ ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk")
/* Set the length of the object removed */
@@ -761,7 +722,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_dir_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_store
*
@@ -785,7 +745,6 @@ H5HF_huge_bt2_dir_store(void *nrecord, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dir_store() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_compare
*
@@ -808,17 +767,13 @@ H5HF_huge_bt2_dir_compare(const void *_rec1, const void *_rec2, int *result)
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: rec1 = {%a, %Hu}\n", "H5HF_huge_bt2_dir_compare", rec1->addr, rec1->len);
-HDfprintf(stderr, "%s: rec2 = {%a, %Hu}\n", "H5HF_huge_bt2_dir_compare", rec2->addr, rec2->len);
-#endif /* QAK */
- if(rec1->addr < rec2->addr)
+ if (rec1->addr < rec2->addr)
*result = -1;
- else if(rec1->addr > rec2->addr)
+ else if (rec1->addr > rec2->addr)
*result = 1;
- else if(rec1->len < rec2->len)
+ else if (rec1->len < rec2->len)
*result = -1;
- else if(rec1->len > rec2->len)
+ else if (rec1->len > rec2->len)
*result = 1;
else
*result = 0;
@@ -826,7 +781,6 @@ HDfprintf(stderr, "%s: rec2 = {%a, %Hu}\n", "H5HF_huge_bt2_dir_compare", rec2->a
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dir_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_encode
*
@@ -843,7 +797,7 @@ HDfprintf(stderr, "%s: rec2 = {%a, %Hu}\n", "H5HF_huge_bt2_dir_compare", rec2->a
static herr_t
H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -858,7 +812,6 @@ H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dir_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_decode
*
@@ -875,7 +828,7 @@ H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
static herr_t
H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_dir_rec_t *nrecord = (H5HF_huge_bt2_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -890,7 +843,6 @@ H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dir_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_dir_debug
*
@@ -905,21 +857,18 @@ H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord,
- const void H5_ATTR_UNUSED *_udata)
+H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, int indent,
+ int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:",
- nrecord->addr, nrecord->len);
+ HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, nrecord->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_dir_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_found
*
@@ -939,19 +888,11 @@ H5HF_huge_bt2_filt_dir_found(const void *nrecord, void *op_data)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_found",
- ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->addr,
- ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->len,
- ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->filter_mask,
- ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->obj_size);
-#endif /* QAK */
*(H5HF_huge_bt2_filt_dir_rec_t *)op_data = *(const H5HF_huge_bt2_filt_dir_rec_t *)nrecord;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_found() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_remove
*
@@ -969,13 +910,15 @@ HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_
herr_t
H5HF_huge_bt2_filt_dir_remove(const void *nrecord, void *_udata)
{
- H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
- if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->len) < 0)
+ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id,
+ ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->addr,
+ ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk")
/* Set the length of the object removed */
@@ -985,7 +928,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_huge_bt2_filt_dir_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_store
*
@@ -1009,7 +951,6 @@ H5HF_huge_bt2_filt_dir_store(void *nrecord, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_store() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_compare
*
@@ -1032,17 +973,13 @@ H5HF_huge_bt2_filt_dir_compare(const void *_rec1, const void *_rec2, int *result
FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: rec1 = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_compare", rec1->addr, rec1->len, rec1->filter_mask, rec1->obj_size);
-HDfprintf(stderr, "%s: rec2 = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_compare", rec2->addr, rec2->len, rec2->filter_mask, rec2->obj_size);
-#endif /* QAK */
- if(rec1->addr < rec2->addr)
+ if (rec1->addr < rec2->addr)
*result = -1;
- else if(rec1->addr > rec2->addr)
+ else if (rec1->addr > rec2->addr)
*result = 1;
- else if(rec1->len < rec2->len)
+ else if (rec1->len < rec2->len)
*result = -1;
- else if(rec1->len > rec2->len)
+ else if (rec1->len > rec2->len)
*result = 1;
else
*result = 0;
@@ -1050,7 +987,6 @@ HDfprintf(stderr, "%s: rec2 = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_com
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_compare() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_encode
*
@@ -1067,7 +1003,7 @@ HDfprintf(stderr, "%s: rec2 = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_com
static herr_t
H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1084,7 +1020,6 @@ H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_decode
*
@@ -1101,7 +1036,7 @@ H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
static herr_t
H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
{
- H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
+ H5HF_huge_bt2_ctx_t * ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_dir_rec_t *nrecord = (H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1118,7 +1053,6 @@ H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_filt_dir_debug
*
@@ -1134,15 +1068,14 @@ H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
*/
static herr_t
H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id,
- int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
+ int indent, int fwidth, const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu}\n", indent, "", fwidth, "Record:",
- nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
+ HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr,
+ nrecord->len, nrecord->filter_mask, nrecord->obj_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_huge_bt2_filt_dir_debug() */
-
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 0d25dbf..ba91158 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFcache.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implement fractal heap metadata cache methods.
*
@@ -26,48 +26,43 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* Fractal heap format version #'s */
-#define H5HF_HDR_VERSION 0 /* Header */
-#define H5HF_DBLOCK_VERSION 0 /* Direct block */
-#define H5HF_IBLOCK_VERSION 0 /* Indirect block */
+#define H5HF_HDR_VERSION 0 /* Header */
+#define H5HF_DBLOCK_VERSION 0 /* Direct block */
+#define H5HF_IBLOCK_VERSION 0 /* Indirect block */
/* Size of stack buffer for serialized headers */
-#define H5HF_HDR_BUF_SIZE 512
+#define H5HF_HDR_BUF_SIZE 512
/* Size of stack buffer for serialized indirect blocks */
-#define H5HF_IBLOCK_BUF_SIZE 4096
-
+#define H5HF_IBLOCK_BUF_SIZE 4096
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -78,21 +73,23 @@ static herr_t H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dt
/* Metadata cache (H5AC) callbacks */
static H5HF_hdr_t *H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr);
+static herr_t H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
static herr_t H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr);
static herr_t H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy);
static herr_t H5HF_cache_hdr_size(const H5F_t *f, const H5HF_hdr_t *hdr, size_t *size_ptr);
static H5HF_indirect_t *H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_indirect_t *iblock, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock);
-static herr_t H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy);
-static herr_t H5HF_cache_iblock_size(const H5F_t *f, const H5HF_indirect_t *iblock, size_t *size_ptr);
+static herr_t H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
+ H5HF_indirect_t *iblock, unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock);
+static herr_t H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy);
+static herr_t H5HF_cache_iblock_size(const H5F_t *f, const H5HF_indirect_t *iblock, size_t *size_ptr);
static H5HF_direct_t *H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_direct_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock);
-static herr_t H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy);
-static herr_t H5HF_cache_dblock_size(const H5F_t *f, const H5HF_direct_t *dblock, size_t *size_ptr);
-
+static herr_t H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
+ H5HF_direct_t *dblock, unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock);
+static herr_t H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy);
+static herr_t H5HF_cache_dblock_size(const H5F_t *f, const H5HF_direct_t *dblock, size_t *size_ptr);
/*********************/
/* Package Variables */
@@ -128,12 +125,10 @@ const H5AC_class_t H5AC_FHEAP_DBLOCK[1] = {{
(H5AC_size_func_t)H5HF_cache_dblock_size,
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -141,8 +136,6 @@ const H5AC_class_t H5AC_FHEAP_DBLOCK[1] = {{
/* Declare a free list to manage heap direct block data to/from disk */
H5FL_BLK_DEFINE(direct_block);
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_decode
*
@@ -153,7 +146,6 @@ H5FL_BLK_DEFINE(direct_block);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -192,7 +184,6 @@ H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_encode
*
@@ -203,7 +194,6 @@ H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -242,7 +232,6 @@ H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_hdr_load
*
@@ -252,7 +241,6 @@ H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -260,17 +248,17 @@ H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
static H5HF_hdr_t *
H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap info */
+ H5HF_hdr_t * hdr = NULL; /* Fractal heap info */
H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata;
- size_t size; /* Header size */
- H5WB_t *wb = NULL; /* Wrapped buffer for header data */
- uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */
- uint8_t *buf; /* Pointer to header buffer */
- const uint8_t *p; /* Pointer into raw data buffer */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- uint8_t heap_flags; /* Status flags for heap */
- H5HF_hdr_t *ret_value; /* Return value */
+ size_t size; /* Header size */
+ H5WB_t * wb = NULL; /* Wrapped buffer for header data */
+ uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */
+ uint8_t * buf; /* Pointer to header buffer */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ uint8_t heap_flags; /* Status flags for heap */
+ H5HF_hdr_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -280,55 +268,55 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate space for the fractal heap data structure */
- if(NULL == (hdr = H5HF_hdr_alloc(udata->f)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (hdr = H5HF_hdr_alloc(udata->f)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Compute the 'base' size of the fractal heap header on disk */
size = (size_t)H5HF_HEADER_SIZE(hdr);
/* Get a pointer to a buffer that's large enough for serialized header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read header from disk */
- if(H5F_block_read(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap header")
+ if (H5F_block_read(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap header")
/* Get temporary pointer to serialized header */
p = buf;
/* Magic number */
- if(HDmemcmp(p, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header signature")
+ if (HDmemcmp(p, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5HF_HDR_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap header version")
+ if (*p++ != H5HF_HDR_VERSION)
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap header version")
/* General heap information */
- UINT16DECODE(p, hdr->id_len); /* Heap ID length */
- UINT16DECODE(p, hdr->filter_len); /* I/O filters' encoded length */
+ UINT16DECODE(p, hdr->id_len); /* Heap ID length */
+ UINT16DECODE(p, hdr->filter_len); /* I/O filters' encoded length */
/* Heap status flags */
/* (bit 0: "huge" object IDs have wrapped) */
/* (bit 1: checksum direct blocks) */
- heap_flags = *p++;
+ heap_flags = *p++;
hdr->huge_ids_wrapped = heap_flags & H5HF_HDR_FLAGS_HUGE_ID_WRAPPED;
hdr->checksum_dblocks = heap_flags & H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS;
/* "Huge" object information */
- UINT32DECODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
- H5F_DECODE_LENGTH(udata->f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
+ UINT32DECODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
+ H5F_DECODE_LENGTH(udata->f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
H5F_addr_decode(udata->f, &p, &hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */
/* "Managed" object free space information */
H5F_DECODE_LENGTH(udata->f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */
- H5F_addr_decode(udata->f, &p, &hdr->fs_addr); /* Address of free section header */
+ H5F_addr_decode(udata->f, &p, &hdr->fs_addr); /* Address of free section header */
/* Heap statistics */
H5F_DECODE_LENGTH(udata->f, p, hdr->man_size);
@@ -341,7 +329,7 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
H5F_DECODE_LENGTH(udata->f, p, hdr->tiny_nobjs);
/* Managed objects' doubling-table info */
- if(H5HF_dtable_decode(hdr->f, &p, &(hdr->man_dtable)) < 0)
+ if (H5HF_dtable_decode(hdr->f, &p, &(hdr->man_dtable)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, NULL, "unable to encode managed obj. doubling table info")
/* Sanity check */
@@ -349,30 +337,32 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert((size_t)(p - (const uint8_t *)buf) == (size - H5HF_SIZEOF_CHKSUM));
/* Check for I/O filter information to decode */
- if(hdr->filter_len > 0) {
- size_t filter_info_off; /* Offset in header of filter information */
- size_t filter_info_size; /* Size of filter information */
- H5O_pline_t *pline; /* Pipeline information from the header on disk */
+ if (hdr->filter_len > 0) {
+ size_t filter_info_off; /* Offset in header of filter information */
+ size_t filter_info_size; /* Size of filter information */
+ H5O_pline_t *pline; /* Pipeline information from the header on disk */
/* Compute the offset of the filter info in the header */
filter_info_off = (size_t)(p - (const uint8_t *)buf);
/* Compute the size of the extra filter information */
- filter_info_size = (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */
- + (unsigned)4 /* Size of filter mask for filtered root direct block */
- + hdr->filter_len); /* Size of encoded I/O filter info */
+ filter_info_size = (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */
+ + (unsigned)4 /* Size of filter mask for filtered root direct block */
+ + hdr->filter_len); /* Size of encoded I/O filter info */
/* Compute the heap header's size */
hdr->heap_size = size + filter_info_size;
/* Re-size current buffer */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->heap_size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->heap_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read in I/O filter information */
/* (and the checksum) */
- if(H5F_block_read(f, H5FD_MEM_FHEAP_HDR, (addr + filter_info_off), (filter_info_size + H5HF_SIZEOF_CHKSUM), dxpl_id, (buf + filter_info_off)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap header's I/O pipeline filter info")
+ if (H5F_block_read(f, H5FD_MEM_FHEAP_HDR, (addr + filter_info_off),
+ (filter_info_size + H5HF_SIZEOF_CHKSUM), dxpl_id, (buf + filter_info_off)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL,
+ "can't read fractal heap header's I/O pipeline filter info")
/* Point at correct offset in header for the filter information */
p = buf + filter_info_off;
@@ -384,12 +374,13 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
UINT32DECODE(p, hdr->pline_root_direct_filter_mask);
/* Decode I/O filter information */
- if(NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID, hdr->filter_len, p)))
+ if (NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID,
+ hdr->filter_len, p)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode I/O pipeline filters")
p += hdr->filter_len;
/* Copy the information into the header's I/O pipeline structure */
- if(NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &(hdr->pline)))
+ if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &(hdr->pline)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, NULL, "can't copy I/O filter pipeline")
/* Release the space allocated for the I/O pipeline filters */
@@ -410,28 +401,27 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert((size_t)(p - (const uint8_t *)buf) == hdr->heap_size);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap header")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap header")
/* Finish initialization of heap header */
- if(H5HF_hdr_finish_init(hdr) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header")
+ if (H5HF_hdr_finish_init(hdr) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header")
/* Set return value */
ret_value = hdr;
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
- if(!ret_value && hdr)
- if(H5HF_hdr_free(hdr) < 0)
+ if (!ret_value && hdr)
+ if (H5HF_hdr_free(hdr) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_hdr_flush
*
@@ -440,17 +430,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
H5WB_t *wb = NULL; /* Wrapped buffer for header data */
uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -459,25 +449,25 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
HDassert(H5F_addr_defined(addr));
HDassert(hdr);
- if(hdr->cache_info.is_dirty) {
- uint8_t *buf; /* Temporary raw data buffer */
- uint8_t *p; /* Pointer into raw data buffer */
- size_t size; /* Header size on disk */
- uint8_t heap_flags; /* Status flags for heap */
+ if (hdr->cache_info.is_dirty) {
+ uint8_t *buf; /* Temporary raw data buffer */
+ uint8_t *p; /* Pointer into raw data buffer */
+ size_t size; /* Header size on disk */
+ uint8_t heap_flags; /* Status flags for heap */
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Set the shared heap header's file context for this operation */
hdr->f = f;
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
+ if (NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Compute the size of the heap header on disk */
size = hdr->heap_size;
/* Get a pointer to a buffer that's large enough for serialized header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to serialized header */
@@ -491,25 +481,25 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
*p++ = H5HF_HDR_VERSION;
/* General heap information */
- UINT16ENCODE(p, hdr->id_len); /* Heap ID length */
- UINT16ENCODE(p, hdr->filter_len); /* I/O filters' encoded length */
+ UINT16ENCODE(p, hdr->id_len); /* Heap ID length */
+ UINT16ENCODE(p, hdr->filter_len); /* I/O filters' encoded length */
/* Heap status flags */
/* (bit 0: "huge" object IDs have wrapped) */
/* (bit 1: checksum direct blocks) */
heap_flags = 0;
- heap_flags |= (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0);
- heap_flags |= (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0);
+ heap_flags |= (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0);
+ heap_flags |= (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0);
*p++ = heap_flags;
/* "Huge" object information */
- UINT32ENCODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
- H5F_ENCODE_LENGTH(f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
- H5F_addr_encode(f, &p, hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */
+ UINT32ENCODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
+ H5F_ENCODE_LENGTH(f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
+ H5F_addr_encode(f, &p, hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */
/* "Managed" object free space information */
- H5F_ENCODE_LENGTH(f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */
- H5F_addr_encode(f, &p, hdr->fs_addr); /* Address of free section header */
+ H5F_ENCODE_LENGTH(f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */
+ H5F_addr_encode(f, &p, hdr->fs_addr); /* Address of free section header */
/* Heap statistics */
H5F_ENCODE_LENGTH(f, p, hdr->man_size);
@@ -522,11 +512,11 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
H5F_ENCODE_LENGTH(f, p, hdr->tiny_nobjs);
/* Managed objects' doubling-table info */
- if(H5HF_dtable_encode(hdr->f, &p, &(hdr->man_dtable)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info")
+ if (H5HF_dtable_encode(hdr->f, &p, &(hdr->man_dtable)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info")
/* Check for I/O filter information to encode */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Encode the size of a filtered root direct block */
H5F_ENCODE_LENGTH(f, p, hdr->pline_root_direct_size);
@@ -534,7 +524,7 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
UINT32ENCODE(p, hdr->pline_root_direct_filter_mask);
/* Encode I/O filter information */
- if(H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, p, &(hdr->pline)) < 0)
+ if (H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, p, &(hdr->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline fiters")
p += hdr->filter_len;
} /* end if */
@@ -545,27 +535,26 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
- /* Write the heap header. */
+ /* Write the heap header. */
HDassert((size_t)(p - buf) == size);
- if(H5F_block_write(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap header to disk")
+ if (H5F_block_write(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap header to disk")
- hdr->cache_info.is_dirty = FALSE;
+ hdr->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5HF_cache_hdr_dest(f, hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header")
+ if (destroy)
+ if (H5HF_cache_hdr_dest(f, hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_cache_hdr_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_hdr_dest
*
@@ -574,7 +563,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -582,7 +570,7 @@ done:
static herr_t
H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -596,22 +584,22 @@ H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr)
HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr));
/* Check for freeing file space for heap header */
- if(hdr->cache_info.free_file_space_on_destroy) {
+ if (hdr->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_HDR, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->heap_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_HDR, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->heap_size) <
+ 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap header")
} /* end if */
/* Free the shared info itself */
- if(H5HF_hdr_free(hdr) < 0)
+ if (H5HF_hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_hdr_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_hdr_clear
*
@@ -620,7 +608,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -628,7 +615,7 @@ done:
static herr_t
H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -640,15 +627,14 @@ H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy)
/* Reset the dirty flag. */
hdr->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HF_cache_hdr_dest(f, hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header")
+ if (destroy)
+ if (H5HF_cache_hdr_dest(f, hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_hdr_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_hdr_size
*
@@ -659,7 +645,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -680,7 +665,6 @@ H5HF_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_hdr_t *hdr, size_t
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_cache_hdr_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_iblock_load
*
@@ -691,7 +675,6 @@ H5HF_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_hdr_t *hdr, size_t
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -699,18 +682,18 @@ H5HF_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_hdr_t *hdr, size_t
static H5HF_indirect_t *
H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5HF_hdr_t *hdr; /* Shared fractal heap information */
- H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* user data for callback */
- H5HF_indirect_t *iblock = NULL; /* Indirect block info */
- H5WB_t *wb = NULL; /* Wrapped buffer for indirect block data */
- uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */
- uint8_t *buf; /* Temporary buffer */
- const uint8_t *p; /* Pointer into raw data buffer */
- haddr_t heap_addr; /* Address of heap header in the file */
- uint32_t stored_chksum; /* Stored metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
- unsigned u; /* Local index variable */
- H5HF_indirect_t *ret_value; /* Return value */
+ H5HF_hdr_t * hdr; /* Shared fractal heap information */
+ H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* user data for callback */
+ H5HF_indirect_t * iblock = NULL; /* Indirect block info */
+ H5WB_t * wb = NULL; /* Wrapped buffer for indirect block data */
+ uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */
+ uint8_t * buf; /* Temporary buffer */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ haddr_t heap_addr; /* Address of heap header in the file */
+ uint32_t stored_chksum; /* Stored metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
+ unsigned u; /* Local index variable */
+ H5HF_indirect_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -720,8 +703,8 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate space for the fractal heap indirect block */
- if(NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the pointer to the shared heap header */
hdr = udata->par_info->hdr;
@@ -731,53 +714,54 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Share common heap information */
iblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
+ if (H5HF_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
- iblock->rc = 0;
- iblock->nrows = *udata->nrows;
+ iblock->rc = 0;
+ iblock->nrows = *udata->nrows;
iblock->nchildren = 0;
/* Wrap the local buffer for serialized indirect block */
- if(NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf))))
+ if (NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Compute size of indirect block */
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* Get a pointer to a buffer that's large enough for serialized indirect block */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read indirect block from disk */
- if(H5F_block_read(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap indirect block")
+ if (H5F_block_read(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap indirect block")
/* Get temporary pointer to serialized indirect block */
p = buf;
/* Magic number */
- if(HDmemcmp(p, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap indirect block signature")
+ if (HDmemcmp(p, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap indirect block signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5HF_IBLOCK_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
+ if (*p++ != H5HF_IBLOCK_VERSION)
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
/* Address of heap that owns this block */
H5F_addr_decode(udata->f, &p, &heap_addr);
- if(H5F_addr_ne(heap_addr, hdr->heap_addr))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
+ if (H5F_addr_ne(heap_addr, hdr->heap_addr))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
/* Address of parent block */
- iblock->parent = udata->par_info->iblock;
+ iblock->parent = udata->par_info->iblock;
iblock->par_entry = udata->par_info->entry;
- if(iblock->parent) {
+ if (iblock->parent) {
/* Share parent block */
- if(H5HF_iblock_incr(iblock->parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
+ if (H5HF_iblock_incr(iblock->parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL,
+ "can't increment reference count on shared indirect block")
/* Set max. # of rows in this block */
iblock->max_rows = iblock->nrows;
@@ -792,31 +776,33 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Allocate & decode child block entry tables */
HDassert(iblock->nrows > 0);
- if(NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
- if(hdr->filter_len > 0) {
- unsigned dir_rows; /* Number of direct rows in this indirect block */
+ if (NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t,
+ (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
+ if (hdr->filter_len > 0) {
+ unsigned dir_rows; /* Number of direct rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
/* Allocate indirect block filtered entry array */
- if(NULL == (iblock->filt_ents = H5FL_SEQ_MALLOC(H5HF_indirect_filt_ent_t, (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->filt_ents = H5FL_SEQ_MALLOC(H5HF_indirect_filt_ent_t,
+ (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block entries")
} /* end if */
else
iblock->filt_ents = NULL;
- for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
+ for (u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
/* Decode child block address */
H5F_addr_decode(udata->f, &p, &(iblock->ents[u].addr));
/* Check for heap with I/O filters */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Sanity check */
HDassert(iblock->filt_ents);
/* Decode extra information for direct blocks */
- if(u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
+ if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
/* Size of filtered direct block */
H5F_DECODE_LENGTH(udata->f, p, iblock->filt_ents[u].size);
@@ -824,23 +810,23 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size)
- || (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* I/O filter mask for filtered direct block */
UINT32DECODE(p, iblock->filt_ents[u].filter_mask);
} /* end if */
- } /* end if */
+ } /* end if */
/* Count child blocks */
- if(H5F_addr_defined(iblock->ents[u].addr)) {
+ if (H5F_addr_defined(iblock->ents[u].addr)) {
iblock->nchildren++;
iblock->max_child = u;
} /* end if */
- } /* end for */
+ } /* end for */
/* Sanity check */
- HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
+ HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
/* Compute checksum on indirect block */
computed_chksum = H5_checksum_metadata(buf, (size_t)(p - (const uint8_t *)buf), 0);
@@ -852,18 +838,20 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert((size_t)(p - (const uint8_t *)buf) == iblock->size);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL,
+ "incorrect metadata checksum for fractal heap indirect block")
/* Check if we have any indirect block children */
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned indir_rows; /* Number of indirect rows in this indirect block */
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned indir_rows; /* Number of indirect rows in this indirect block */
/* Compute the number of indirect rows for this indirect block */
indir_rows = iblock->nrows - hdr->man_dtable.max_direct_rows;
/* Allocate & initialize child indirect block pointer array */
- if(NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC(H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC(
+ H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for block entries")
} /* end if */
else
@@ -874,16 +862,15 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
- if(!ret_value && iblock)
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if (!ret_value && iblock)
+ if (H5HF_man_iblock_dest(iblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_iblock_load() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_iblock_flush
*
@@ -892,17 +879,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_indirect_t *iblock, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_indirect_t *iblock,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5WB_t *wb = NULL; /* Wrapped buffer for indirect block data */
- uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t *wb = NULL; /* Wrapped buffer for indirect block data */
+ uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -911,16 +898,16 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert(H5F_addr_defined(addr));
HDassert(iblock);
- if(iblock->cache_info.is_dirty) {
- H5HF_hdr_t *hdr; /* Shared fractal heap information */
- uint8_t *buf; /* Temporary buffer */
- uint8_t *p; /* Pointer into raw data buffer */
+ if (iblock->cache_info.is_dirty) {
+ H5HF_hdr_t *hdr; /* Shared fractal heap information */
+ uint8_t * buf; /* Temporary buffer */
+ uint8_t * p; /* Pointer into raw data buffer */
#ifndef NDEBUG
- unsigned nchildren = 0; /* Track # of children */
- unsigned max_child = 0; /* Track max. child entry used */
-#endif /* NDEBUG */
- uint32_t metadata_chksum; /* Computed metadata checksum value */
- size_t u; /* Local index variable */
+ unsigned nchildren = 0; /* Track # of children */
+ unsigned max_child = 0; /* Track max. child entry used */
+#endif /* NDEBUG */
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
+ size_t u; /* Local index variable */
/* Get the pointer to the shared heap header */
hdr = iblock->hdr;
@@ -929,11 +916,11 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
hdr->f = f;
/* Wrap the local buffer for serialized indirect block */
- if(NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf))))
+ if (NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for serialized indirect block */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to buffer for serialized indirect block */
@@ -953,23 +940,23 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
UINT64ENCODE_VAR(p, iblock->block_off, hdr->heap_off_size);
/* Encode indirect block-specific fields */
- for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
+ for (u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
/* Encode child block address */
H5F_addr_encode(f, &p, iblock->ents[u].addr);
/* Check for heap with I/O filters */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Sanity check */
HDassert(iblock->filt_ents);
/* Encode extra information for direct blocks */
- if(u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
+ if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
/* Sanity check */
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size)
- || (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* Size of filtered direct block */
H5F_ENCODE_LENGTH(f, p, iblock->filt_ents[u].size);
@@ -977,17 +964,17 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* I/O filter mask for filtered direct block */
UINT32ENCODE(p, iblock->filt_ents[u].filter_mask);
} /* end if */
- } /* end if */
+ } /* end if */
#ifndef NDEBUG
/* Count child blocks */
- if(H5F_addr_defined(iblock->ents[u].addr)) {
+ if (H5F_addr_defined(iblock->ents[u].addr)) {
nchildren++;
- if(u > max_child)
+ if (u > max_child)
max_child = u;
} /* end if */
-#endif /* NDEBUG */
- } /* end for */
+#endif /* NDEBUG */
+ } /* end for */
/* Compute checksum */
metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);
@@ -1003,74 +990,74 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
#endif /* NDEBUG */
/* Check for needing to re-allocate indirect block from 'temp.' to 'normal' file space */
- if(H5F_IS_TMP_ADDR(f, addr)) {
+ if (H5F_IS_TMP_ADDR(f, addr)) {
/* Sanity check */
HDassert(H5F_addr_eq(iblock->addr, addr));
/* Allocate 'normal' space for the new indirect block on disk */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if (HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap indirect block")
/* Sanity check */
HDassert(!H5F_addr_eq(iblock->addr, addr));
/* Let the metadata cache know the block moved */
- if(H5AC_move_entry(f, H5AC_FHEAP_IBLOCK, iblock->addr, addr) < 0)
+ if (H5AC_move_entry(f, H5AC_FHEAP_IBLOCK, iblock->addr, addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block")
/* Update the internal address for the block */
iblock->addr = addr;
/* Check for root indirect block */
- if(NULL == iblock->parent) {
+ if (NULL == iblock->parent) {
/* Update information about indirect block's location */
hdr->man_dtable.table_addr = addr;
/* Mark that heap header was modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else {
- H5HF_indirect_t *par_iblock; /* Parent indirect block */
- unsigned par_entry; /* Entry in parent indirect block */
+ H5HF_indirect_t *par_iblock; /* Parent indirect block */
+ unsigned par_entry; /* Entry in parent indirect block */
/* Get parent information */
par_iblock = iblock->parent;
- par_entry = iblock->par_entry;
+ par_entry = iblock->par_entry;
/* Update information about indirect block's location */
par_iblock->ents[par_entry].addr = addr;
/* Mark that parent was modified */
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if (H5HF_iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
- } /* end if */
+ } /* end if */
/* Indirect block must be in 'normal' file space now */
HDassert(!H5F_IS_TMP_ADDR(f, addr));
- /* Write the indirect block */
- if(H5F_block_write(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap indirect block to disk")
+ /* Write the indirect block */
+ if (H5F_block_write(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap indirect block to disk")
/* Reset dirty flags */
- iblock->cache_info.is_dirty = FALSE;
+ iblock->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5HF_cache_iblock_dest(f, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
+ if (destroy)
+ if (H5HF_cache_iblock_dest(f, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_cache_iblock_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_iblock_dest
*
@@ -1079,7 +1066,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -1087,7 +1073,7 @@ done:
static herr_t
H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1102,26 +1088,26 @@ H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock)
HDassert(!iblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(iblock->cache_info.addr));
/* Check for freeing file space for indirect block */
- if(iblock->cache_info.free_file_space_on_destroy) {
+ if (iblock->cache_info.free_file_space_on_destroy) {
/* Check if the indirect block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!H5F_IS_TMP_ADDR(f, iblock->cache_info.addr)) {
+ if (!H5F_IS_TMP_ADDR(f, iblock->cache_info.addr)) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_IBLOCK, H5AC_dxpl_id, iblock->cache_info.addr, (hsize_t)iblock->size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_IBLOCK, H5AC_dxpl_id, iblock->cache_info.addr,
+ (hsize_t)iblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block")
} /* end if */
- } /* end if */
+ } /* end if */
/* Destroy fractal heap indirect block */
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if (H5HF_man_iblock_dest(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_iblock_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_iblock_clear
*
@@ -1130,7 +1116,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -1138,7 +1123,7 @@ done:
static herr_t
H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1150,15 +1135,14 @@ H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy)
/* Reset the dirty flag. */
iblock->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HF_cache_iblock_dest(f, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
+ if (destroy)
+ if (H5HF_cache_iblock_dest(f, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_iblock_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_iblock_size
*
@@ -1169,7 +1153,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -1189,7 +1172,6 @@ H5HF_cache_iblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_indirect_t *ibl
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_cache_iblock_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_dblock_load
*
@@ -1200,7 +1182,6 @@ H5HF_cache_iblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_indirect_t *ibl
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -1209,12 +1190,12 @@ static H5HF_direct_t *
H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
H5HF_dblock_cache_ud_t *udata = (H5HF_dblock_cache_ud_t *)_udata; /* pointer to user data */
- H5HF_hdr_t *hdr; /* Shared fractal heap information */
- H5HF_parent_t *par_info; /* Pointer to parent information */
- H5HF_direct_t *dblock = NULL; /* Direct block info */
- const uint8_t *p; /* Pointer into raw data buffer */
- haddr_t heap_addr; /* Address of heap header in the file */
- H5HF_direct_t *ret_value; /* Return value */
+ H5HF_hdr_t * hdr; /* Shared fractal heap information */
+ H5HF_parent_t * par_info; /* Pointer to parent information */
+ H5HF_direct_t * dblock = NULL; /* Direct block info */
+ const uint8_t * p; /* Pointer into raw data buffer */
+ haddr_t heap_addr; /* Address of heap header in the file */
+ H5HF_direct_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1226,42 +1207,42 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->dblock_size > 0);
/* Allocate space for the fractal heap direct block */
- if(NULL == (dblock = H5FL_MALLOC(H5HF_direct_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (dblock = H5FL_MALLOC(H5HF_direct_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Get the pointer to the shared heap header */
par_info = (H5HF_parent_t *)(&(udata->par_info));
- hdr = par_info->hdr;
+ hdr = par_info->hdr;
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
/* Share common heap information */
dblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
+ if (H5HF_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
- dblock->size = udata->dblock_size;
- dblock->file_size = 0;
+ dblock->size = udata->dblock_size;
+ dblock->file_size = 0;
dblock->blk_off_size = H5HF_SIZEOF_OFFSET_LEN(dblock->size);
/* Allocate block buffer */
-/* XXX: Change to using free-list factories */
- if(NULL == (dblock->blk = H5FL_BLK_MALLOC(direct_block, (size_t)dblock->size)))
+ /* XXX: Change to using free-list factories */
+ if (NULL == (dblock->blk = H5FL_BLK_MALLOC(direct_block, (size_t)dblock->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
- size_t nbytes; /* Number of bytes used in buffer, after applying reverse filters */
- void *read_buf; /* Pointer to buffer to read in */
- size_t read_size; /* Size of filtered direct block to read */
- unsigned filter_mask; /* Excluded filters for direct block */
+ if (hdr->filter_len > 0) {
+ H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ size_t nbytes; /* Number of bytes used in buffer, after applying reverse filters */
+ void * read_buf; /* Pointer to buffer to read in */
+ size_t read_size; /* Size of filtered direct block to read */
+ unsigned filter_mask; /* Excluded filters for direct block */
/* Check for root direct block */
- if(par_info->iblock == NULL) {
+ if (par_info->iblock == NULL) {
/* Sanity check */
HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
@@ -1277,17 +1258,18 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end else */
/* Allocate buffer to perform I/O filtering on */
- if(NULL == (read_buf = H5MM_malloc(read_size)))
+ if (NULL == (read_buf = H5MM_malloc(read_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for pipeline buffer")
/* Read filtered direct block from disk */
- if(H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, read_size, dxpl_id, read_buf) < 0)
+ if (H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, read_size, dxpl_id, read_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap direct block")
/* Push direct block data through I/O filter pipeline */
- nbytes = read_size;
+ nbytes = read_size;
filter_mask = udata->filter_mask;
- if(H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &read_size, &read_buf) < 0)
+ if (H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes,
+ &read_size, &read_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed")
/* Sanity check */
@@ -1301,7 +1283,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end if */
else {
/* Read direct block from disk */
- if(H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, dblock->size, dxpl_id, dblock->blk) < 0)
+ if (H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, dblock->size, dxpl_id, dblock->blk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap direct block")
} /* end else */
@@ -1309,35 +1291,36 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
p = dblock->blk;
/* Magic number */
- if(HDmemcmp(p, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block signature")
+ if (HDmemcmp(p, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(*p++ != H5HF_DBLOCK_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
+ if (*p++ != H5HF_DBLOCK_VERSION)
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
/* Address of heap that owns this block (just for file integrity checks) */
H5F_addr_decode(udata->f, &p, &heap_addr);
- if(H5F_addr_ne(heap_addr, hdr->heap_addr))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
+ if (H5F_addr_ne(heap_addr, hdr->heap_addr))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
/* Address of parent block */
- dblock->parent = par_info->iblock;
+ dblock->parent = par_info->iblock;
dblock->par_entry = par_info->entry;
- if(dblock->parent) {
+ if (dblock->parent) {
/* Share parent block */
- if(H5HF_iblock_incr(dblock->parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
+ if (H5HF_iblock_incr(dblock->parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL,
+ "can't increment reference count on shared indirect block")
} /* end if */
/* Offset of heap within the heap's address space */
UINT64DECODE_VAR(p, dblock->block_off, hdr->heap_off_size);
/* Decode checksum on direct block, if requested */
- if(hdr->checksum_dblocks) {
- uint32_t stored_chksum; /* Metadata checksum value */
- uint32_t computed_chksum; /* Computed metadata checksum value */
+ if (hdr->checksum_dblocks) {
+ uint32_t stored_chksum; /* Metadata checksum value */
+ uint32_t computed_chksum; /* Computed metadata checksum value */
/* Metadata checksum */
UINT32DECODE(p, stored_chksum);
@@ -1350,8 +1333,9 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
computed_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap direct block")
+ if (stored_chksum != computed_chksum)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL,
+ "incorrect metadata checksum for fractal heap direct block")
} /* end if */
/* Sanity check */
@@ -1361,14 +1345,13 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
ret_value = dblock;
done:
- if(!ret_value && dblock)
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if (!ret_value && dblock)
+ if (H5HF_man_dblock_dest(dblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_dblock_load() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_dblock_flush
*
@@ -1377,15 +1360,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_direct_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_direct_t *dblock,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1394,12 +1377,13 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert(H5F_addr_defined(addr));
HDassert(dblock);
- if(dblock->cache_info.is_dirty) {
- H5HF_hdr_t *hdr; /* Shared fractal heap information */
- hbool_t at_tmp_addr = H5F_IS_TMP_ADDR(f, addr); /* Flag to indicate direct block is at temporary address */
- void *write_buf; /* Pointer to buffer to write out */
- size_t write_size; /* Size of buffer to write out */
- uint8_t *p; /* Pointer into raw data buffer */
+ if (dblock->cache_info.is_dirty) {
+ H5HF_hdr_t *hdr; /* Shared fractal heap information */
+ hbool_t at_tmp_addr =
+ H5F_IS_TMP_ADDR(f, addr); /* Flag to indicate direct block is at temporary address */
+ void * write_buf; /* Pointer to buffer to write out */
+ size_t write_size; /* Size of buffer to write out */
+ uint8_t *p; /* Pointer into raw data buffer */
/* Get the pointer to the shared heap header */
hdr = dblock->hdr;
@@ -1424,8 +1408,8 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
UINT64ENCODE_VAR(p, dblock->block_off, hdr->heap_off_size);
/* Metadata checksum */
- if(hdr->checksum_dblocks) {
- uint32_t metadata_chksum; /* Computed metadata checksum value */
+ if (hdr->checksum_dblocks) {
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Clear the checksum field, to compute the checksum */
HDmemset(p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
@@ -1441,60 +1425,65 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert((size_t)(p - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
- size_t nbytes; /* Number of bytes used */
- unsigned filter_mask = 0; /* Filter mask for block */
+ if (hdr->filter_len > 0) {
+ H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ size_t nbytes; /* Number of bytes used */
+ unsigned filter_mask = 0; /* Filter mask for block */
/* Allocate buffer to perform I/O filtering on */
write_size = dblock->size;
- if(NULL == (write_buf = H5MM_malloc(write_size)))
+ if (NULL == (write_buf = H5MM_malloc(write_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer")
HDmemcpy(write_buf, dblock->blk, write_size);
/* Push direct block data through I/O filter pipeline */
nbytes = write_size;
- if(H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &write_size, &write_buf) < 0)
+ if (H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &write_size,
+ &write_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "output pipeline failed")
/* Use the compressed number of bytes as the size to write */
write_size = nbytes;
/* Check for root direct block */
- if(dblock->parent == NULL) {
- hbool_t hdr_changed = FALSE; /* Whether the header information changed */
+ if (dblock->parent == NULL) {
+ hbool_t hdr_changed = FALSE; /* Whether the header information changed */
/* Sanity check */
HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
HDassert(hdr->pline_root_direct_size > 0);
/* Check if the filter mask changed */
- if(hdr->pline_root_direct_filter_mask != filter_mask) {
+ if (hdr->pline_root_direct_filter_mask != filter_mask) {
hdr->pline_root_direct_filter_mask = filter_mask;
- hdr_changed = TRUE;
+ hdr_changed = TRUE;
} /* end if */
/* Check if we need to re-size the block on disk */
- if(hdr->pline_root_direct_size != write_size || at_tmp_addr) {
+ if (hdr->pline_root_direct_size != write_size || at_tmp_addr) {
/* Check if the direct block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!at_tmp_addr) {
+ if (!at_tmp_addr) {
/* Release direct block's current disk space */
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)hdr->pline_root_direct_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block")
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr,
+ (hsize_t)hdr->pline_root_direct_size) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to free fractal heap direct block")
} /* end if */
/* Allocate space for the compressed direct block */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (HADDR_UNDEF ==
+ (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
/* Let the metadata cache know, if the block moved */
- if(!H5F_addr_eq(hdr->man_dtable.table_addr, addr))
- if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0)
+ if (!H5F_addr_eq(hdr->man_dtable.table_addr, addr))
+ if (H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block")
/* Update information about compressed direct block's location & size */
- hdr->man_dtable.table_addr = addr;
+ hdr->man_dtable.table_addr = addr;
hdr->pline_root_direct_size = write_size;
/* Note that heap header was modified */
@@ -1502,50 +1491,54 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
} /* end if */
/* Check if heap header was modified */
- if(hdr_changed)
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (hdr_changed)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else {
- hbool_t par_changed = FALSE; /* Whether the parent's information changed */
- H5HF_indirect_t *par_iblock; /* Parent indirect block */
- unsigned par_entry; /* Entry in parent indirect block */
+ hbool_t par_changed = FALSE; /* Whether the parent's information changed */
+ H5HF_indirect_t *par_iblock; /* Parent indirect block */
+ unsigned par_entry; /* Entry in parent indirect block */
/* Get parent information */
par_iblock = dblock->parent;
- par_entry = dblock->par_entry;
+ par_entry = dblock->par_entry;
/* Sanity check */
HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
HDassert(par_iblock->filt_ents[par_entry].size > 0);
/* Check if the filter mask changed */
- if(par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
+ if (par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
par_iblock->filt_ents[par_entry].filter_mask = filter_mask;
- par_changed = TRUE;
+ par_changed = TRUE;
} /* end if */
/* Check if we need to re-size the block on disk */
- if(par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) {
+ if (par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) {
/* Check if the direct block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!at_tmp_addr) {
+ if (!at_tmp_addr) {
/* Release direct block's current disk space */
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)par_iblock->filt_ents[par_entry].size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block")
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr,
+ (hsize_t)par_iblock->filt_ents[par_entry].size) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to free fractal heap direct block")
} /* end if */
/* Allocate space for the compressed direct block */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (HADDR_UNDEF ==
+ (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
/* Let the metadata cache know, if the block moved */
- if(!H5F_addr_eq(par_iblock->ents[par_entry].addr, addr))
- if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0)
+ if (!H5F_addr_eq(par_iblock->ents[par_entry].addr, addr))
+ if (H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block")
/* Update information about compressed direct block's location & size */
- par_iblock->ents[par_entry].addr = addr;
+ par_iblock->ents[par_entry].addr = addr;
par_iblock->filt_ents[par_entry].size = write_size;
/* Note that parent was modified */
@@ -1553,95 +1546,98 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
} /* end if */
/* Check if parent was modified */
- if(par_changed)
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if (par_changed)
+ if (H5HF_iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end else */
- } /* end if */
+ } /* end if */
else {
- write_buf = dblock->blk;
+ write_buf = dblock->blk;
write_size = dblock->size;
/* Check for needing to re-allocate direct block from 'temp.' to 'normal' file space */
- if(at_tmp_addr) {
+ if (at_tmp_addr) {
/* Check for root direct block */
- if(NULL == dblock->parent) {
+ if (NULL == dblock->parent) {
/* Sanity check */
HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
/* Allocate 'normal' space for the direct block */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (HADDR_UNDEF ==
+ (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
/* Sanity check */
HDassert(!H5F_addr_eq(hdr->man_dtable.table_addr, addr));
/* Let the metadata cache know the block moved */
- if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0)
+ if (H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block")
/* Update information about direct block's location */
hdr->man_dtable.table_addr = addr;
/* Mark that heap header was modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else {
- H5HF_indirect_t *par_iblock; /* Parent indirect block */
- unsigned par_entry; /* Entry in parent indirect block */
+ H5HF_indirect_t *par_iblock; /* Parent indirect block */
+ unsigned par_entry; /* Entry in parent indirect block */
/* Get parent information */
par_iblock = dblock->parent;
- par_entry = dblock->par_entry;
+ par_entry = dblock->par_entry;
/* Sanity check */
HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
/* Allocate 'normal' space for the direct block */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (HADDR_UNDEF ==
+ (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
/* Sanity check */
HDassert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
/* Let the metadata cache know the block moved */
- if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0)
+ if (H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block")
/* Update information about direct block's location */
par_iblock->ents[par_entry].addr = addr;
/* Mark that parent was modified */
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if (H5HF_iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end else */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
/* Direct block must be in 'normal' file space now */
HDassert(!H5F_IS_TMP_ADDR(f, addr));
- /* Write the direct block */
- if(H5F_block_write(f, H5FD_MEM_FHEAP_DBLOCK, addr, write_size, dxpl_id, write_buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap direct block to disk")
+ /* Write the direct block */
+ if (H5F_block_write(f, H5FD_MEM_FHEAP_DBLOCK, addr, write_size, dxpl_id, write_buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap direct block to disk")
/* Release the write buffer, if it was allocated */
- if(write_buf != dblock->blk)
+ if (write_buf != dblock->blk)
H5MM_xfree(write_buf);
- dblock->cache_info.is_dirty = FALSE;
+ dblock->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5HF_cache_dblock_dest(f, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
+ if (destroy)
+ if (H5HF_cache_dblock_dest(f, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_cache_dblock_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_dblock_dest
*
@@ -1650,7 +1646,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -1658,7 +1653,7 @@ done:
static herr_t
H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1671,29 +1666,29 @@ H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock)
HDassert(!dblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblock->cache_info.addr));
/* Check for freeing file space for direct block */
- if(dblock->cache_info.free_file_space_on_destroy) {
+ if (dblock->cache_info.free_file_space_on_destroy) {
/* Sanity check */
HDassert(dblock->file_size > 0);
/* Check if the direct block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!H5F_IS_TMP_ADDR(f, dblock->cache_info.addr)) {
+ if (!H5F_IS_TMP_ADDR(f, dblock->cache_info.addr)) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, H5AC_dxpl_id, dblock->cache_info.addr, dblock->file_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, H5AC_dxpl_id, dblock->cache_info.addr,
+ dblock->file_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block")
} /* end if */
- } /* end if */
+ } /* end if */
/* Destroy fractal heap direct block */
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if (H5HF_man_dblock_dest(dblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_dblock_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_dblock_clear
*
@@ -1702,7 +1697,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -1710,7 +1704,7 @@ done:
static herr_t
H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1722,15 +1716,14 @@ H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy)
/* Reset the dirty flag. */
dblock->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HF_cache_dblock_dest(f, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
+ if (destroy)
+ if (H5HF_cache_dblock_dest(f, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_cache_dblock_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cache_dblock_size
*
@@ -1741,7 +1734,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -1760,4 +1752,3 @@ H5HF_cache_dblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_direct_t *dbloc
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_cache_dblock_size() */
-
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index c9593e6..139b38b 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFdbg.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Dump debugging information about a fractal heap
*
@@ -26,77 +26,69 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for direct block debugging iterator callback */
typedef struct {
- FILE *stream; /* Stream for output */
- int indent; /* Indention amount */
- int fwidth; /* Field width mount */
- haddr_t dblock_addr; /* Direct block's address */
- hsize_t dblock_size; /* Direct block's size */
- uint8_t *marker; /* 'Marker' array for free space */
- size_t sect_count; /* Number of free space sections in block */
- size_t amount_free; /* Amount of free space in block */
+ FILE * stream; /* Stream for output */
+ int indent; /* Indention amount */
+ int fwidth; /* Field width mount */
+ haddr_t dblock_addr; /* Direct block's address */
+ hsize_t dblock_size; /* Direct block's size */
+ uint8_t *marker; /* 'Marker' array for free space */
+ size_t sect_count; /* Number of free space sections in block */
+ size_t amount_free; /* Amount of free space in block */
} H5HF_debug_iter_ud1_t;
/* User data for free space section iterator callback */
typedef struct {
- H5FS_t *fspace; /* Free space manager */
- FILE *stream; /* Stream for output */
- int indent; /* Indention amount */
- int fwidth; /* Field width mount */
+ H5FS_t *fspace; /* Free space manager */
+ FILE * stream; /* Stream for output */
+ int indent; /* Indention amount */
+ int fwidth; /* Field width mount */
} H5HF_debug_iter_ud2_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
- int indent, int fwidth);
-
+static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwidth);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_debug
*
@@ -105,7 +97,6 @@ static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 28 2006
*
*-------------------------------------------------------------------------
@@ -127,48 +118,34 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
* Print the values.
*/
/* Creation parameter values */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Doubling table width:",
- dtable->cparam.width);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Starting block size:",
- dtable->cparam.start_block_size);
+ "Starting block size:", dtable->cparam.start_block_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Max. direct block size:",
- dtable->cparam.max_direct_size);
+ "Max. direct block size:", dtable->cparam.max_direct_size);
HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
- "Max. index size:",
- dtable->cparam.max_index);
+ "Max. index size:", dtable->cparam.max_index);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Starting # of rows in root indirect block:",
- dtable->cparam.start_root_rows);
+ "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Table's root address:",
- dtable->table_addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Table's root address:", dtable->table_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows in root indirect block:",
- dtable->curr_root_rows);
+ "Current # of rows in root indirect block:", dtable->curr_root_rows);
/* Computed values */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows in root indirect block:",
- dtable->max_root_rows);
+ "Max. # of rows in root indirect block:", dtable->max_root_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of direct rows in any indirect block:",
- dtable->max_direct_rows);
+ "Max. # of direct rows in any indirect block:", dtable->max_direct_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for IDs in first row:",
- dtable->first_row_bits);
+ "# of bits for IDs in first row:", dtable->first_row_bits);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "# of IDs in first row:",
- dtable->num_id_first_row);
+ "# of IDs in first row:", dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_print
*
@@ -177,13 +154,13 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
*/
void
-H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE *stream, int indent, int fwidth)
+H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE *stream, int indent,
+ int fwidth)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -202,94 +179,66 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Heap is:",
- hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Objects stored in 'debugging' format:",
- hdr->debug_objs);
+ "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Write once' flag:",
- hdr->write_once);
+ "Objects stored in 'debugging' format:", hdr->debug_objs);
+ HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "'Write once' flag:", hdr->write_once);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Huge' object IDs have wrapped:",
- hdr->huge_ids_wrapped);
+ "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Free space in managed blocks:",
- hdr->total_man_free);
+ "Free space in managed blocks:", hdr->total_man_free);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Managed space data block size:", hdr->man_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Managed space data block size:",
- hdr->man_size);
+ "Total managed space allocated:", hdr->man_alloc_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total managed space allocated:",
- hdr->man_alloc_size);
+ "Offset of managed space iterator:", hdr->man_iter_off);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of managed space iterator:",
- hdr->man_iter_off);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of managed objects in heap:",
- hdr->man_nobjs);
+ "Number of managed objects in heap:", hdr->man_nobjs);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of free space manager for managed blocks:",
- hdr->fs_addr);
+ "Address of free space manager for managed blocks:", hdr->fs_addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Max. size of managed object:",
- (unsigned long)hdr->max_man_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Huge' object space used:",
- hdr->huge_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'huge' objects in heap:",
- hdr->huge_nobjs);
+ "Max. size of managed object:", (unsigned long)hdr->max_man_size);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "'Huge' object space used:", hdr->huge_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "ID of next 'huge' object:",
- hdr->huge_next_id);
+ "Number of 'huge' objects in heap:", hdr->huge_nobjs);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "ID of next 'huge' object:", hdr->huge_next_id);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of v2 B-tree for 'huge' objects:",
- hdr->huge_bt2_addr);
+ "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "'Tiny' object space used:", hdr->tiny_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Tiny' object space used:",
- hdr->tiny_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'tiny' objects in heap:",
- hdr->tiny_nobjs);
+ "Number of 'tiny' objects in heap:", hdr->tiny_nobjs);
HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF_dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
/* Print information about I/O filters */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
HDfprintf(stream, "%*sI/O filter Info...\n", indent, "");
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Compressed size of root direct block:",
- hdr->pline_root_direct_size);
+ "Compressed size of root direct block:", hdr->pline_root_direct_size);
HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter mask for root direct block:",
- hdr->pline_root_direct_filter_mask);
+ "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask);
} /* end if */
- H5O_debug_id(H5O_PLINE_ID, hdr->f, dxpl_id, &(hdr->pline), stream,
- indent + 3, MAX(0, fwidth - 3));
+ H5O_debug_id(H5O_PLINE_ID, hdr->f, dxpl_id, &(hdr->pline), stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
/* Print internal (runtime) information, if requested */
- if(dump_internal) {
+ if (dump_internal) {
HDfprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, "");
/* Dump root iblock, if there is one */
HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block flags:",
- hdr->root_iblock_flags);
+ "Root indirect block flags:", hdr->root_iblock_flags);
HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block pointer:",
- hdr->root_iblock);
- if(hdr->root_iblock)
+ "Root indirect block pointer:", hdr->root_iblock);
+ if (hdr->root_iblock)
H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth);
} /* end if */
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_hdr_print() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_debug
*
@@ -298,7 +247,6 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -306,8 +254,8 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE
herr_t
H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -321,20 +269,19 @@ H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(fwidth >= 0);
/* Load the fractal heap header */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, addr, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Print the information about the heap's header */
H5HF_hdr_print(hdr, dxpl_id, FALSE, stream, indent, fwidth);
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dblock_debug_cb
*
@@ -343,7 +290,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 13 2006
*
*-------------------------------------------------------------------------
@@ -351,10 +297,10 @@ done:
static herr_t
H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
- H5HF_debug_iter_ud1_t *udata = (H5HF_debug_iter_ud1_t *)_udata; /* User data for callbacks */
- haddr_t sect_start, sect_end; /* Section's beginning and ending offsets */
- haddr_t dblock_start, dblock_end; /* Direct block's beginning and ending offsets */
+ H5HF_free_section_t * sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
+ H5HF_debug_iter_ud1_t *udata = (H5HF_debug_iter_ud1_t *)_udata; /* User data for callbacks */
+ haddr_t sect_start, sect_end; /* Section's beginning and ending offsets */
+ haddr_t dblock_start, dblock_end; /* Direct block's beginning and ending offsets */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -366,27 +312,28 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Set up some local variables, for convenience */
sect_start = sect->sect_info.addr;
- sect_end = (sect->sect_info.addr + sect->sect_info.size) - 1;
+ sect_end = (sect->sect_info.addr + sect->sect_info.size) - 1;
HDassert(sect_end >= sect_start);
dblock_start = udata->dblock_addr;
- dblock_end = (udata->dblock_addr + udata->dblock_size) - 1;
+ dblock_end = (udata->dblock_addr + udata->dblock_size) - 1;
HDassert(dblock_end >= dblock_start);
/* Check for overlap between free space section & direct block */
- if((sect_start <= dblock_end && sect_end >=dblock_start) || /* section within or overlaps w/beginning of direct block*/
- (sect_start <= dblock_end && sect_end >=dblock_end)) { /* section overlaps w/end of direct block */
- char temp_str[32]; /* Temporary string for formatting */
- size_t start, end; /* Start & end of the overlapping area */
- size_t len; /* Length of the overlapping area */
- size_t overlap; /* Track any overlaps */
- size_t u; /* Local index variable */
+ if ((sect_start <= dblock_end &&
+ sect_end >= dblock_start) || /* section within or overlaps w/beginning of direct block*/
+ (sect_start <= dblock_end && sect_end >= dblock_end)) { /* section overlaps w/end of direct block */
+ char temp_str[32]; /* Temporary string for formatting */
+ size_t start, end; /* Start & end of the overlapping area */
+ size_t len; /* Length of the overlapping area */
+ size_t overlap; /* Track any overlaps */
+ size_t u; /* Local index variable */
/* Calculate the starting & ending */
- if(sect_start < dblock_start)
+ if (sect_start < dblock_start)
start = 0;
else
H5_CHECKED_ASSIGN(start, size_t, (sect_start - dblock_start), hsize_t)
- if(sect_end > dblock_end)
+ if (sect_end > dblock_end)
H5_CHECKED_ASSIGN(end, size_t, udata->dblock_size, hsize_t)
else
H5_CHECKED_ASSIGN(end, size_t, ((sect_end - dblock_start) + 1), hsize_t)
@@ -395,22 +342,21 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
- temp_str,
- start, len);
+ HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ temp_str, start, len);
udata->sect_count++;
/* Mark this node's free space & check for overlaps w/other sections */
overlap = 0;
- for(u = start; u < end; u++) {
- if(udata->marker[u])
+ for (u = start; u < end; u++) {
+ if (udata->marker[u])
overlap++;
udata->marker[u] = 1;
} /* end for */
/* Flag overlaps */
if (overlap)
- fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
udata->amount_free += len;
} /* end if */
@@ -418,7 +364,6 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dblock_debug_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dblock_debug
*
@@ -427,21 +372,20 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 28 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
- int indent, int fwidth, haddr_t hdr_addr, size_t block_size)
+H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t hdr_addr, size_t block_size)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */
H5HF_direct_t *dblock = NULL; /* Fractal heap direct block info */
- size_t blk_prefix_size; /* Size of prefix for block */
- size_t amount_free; /* Amount of free space in block */
- uint8_t *marker = NULL; /* Track free space for block */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t blk_prefix_size; /* Size of prefix for block */
+ size_t amount_free; /* Amount of free space in block */
+ uint8_t * marker = NULL; /* Track free space for block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -457,14 +401,14 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
HDassert(block_size > 0);
/* Load the fractal heap header */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap direct block
*/
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, addr, block_size, NULL, 0, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
+ if (NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, addr, block_size, NULL, 0, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
/* Print opening message */
HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
@@ -473,65 +417,59 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of direct block in heap:",
- dblock->block_off);
+ "Offset of direct block in heap:", dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of block header:",
- blk_prefix_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of block offsets:",
- dblock->blk_off_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of block offsets:", dblock->blk_off_size);
/* Allocate space for the free space markers */
- if(NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the free space information for the heap */
- if(H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
+ if (H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space")
/* If there is a free space manager for the heap, check for sections that overlap this block */
- if(hdr->fspace) {
- H5HF_debug_iter_ud1_t udata; /* User data for callbacks */
+ if (hdr->fspace) {
+ H5HF_debug_iter_ud1_t udata; /* User data for callbacks */
/* Prepare user data for section iteration callback */
- udata.stream = stream;
- udata.indent = indent;
- udata.fwidth = fwidth;
+ udata.stream = stream;
+ udata.indent = indent;
+ udata.fwidth = fwidth;
udata.dblock_addr = dblock->block_off;
udata.dblock_size = block_size;
- udata.marker = marker;
- udata.sect_count = 0;
+ udata.marker = marker;
+ udata.sect_count = 0;
udata.amount_free = 0;
/* Print header */
HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
/* Iterate over the free space sections, to detect overlaps with this block */
- if(H5FS_sect_iterate(f, dxpl_id, hdr->fspace, H5HF_dblock_debug_cb, &udata) < 0)
+ if (H5FS_sect_iterate(f, dxpl_id, hdr->fspace, H5HF_dblock_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
/* Close the free space information */
- if(H5HF_space_close(hdr, dxpl_id) < 0)
+ if (H5HF_space_close(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
/* Keep the amount of space free */
amount_free = udata.amount_free;
/* Check for no free space */
- if(amount_free == 0)
+ if (amount_free == 0)
HDfprintf(stream, "%*s<none>\n", indent + 3, "");
} /* end if */
else
amount_free = 0;
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
- "Percent of available space for data used:",
- ((double)100.0f * (double)((dblock->size - blk_prefix_size) - amount_free) / (double)(dblock->size - blk_prefix_size)));
+ HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
+ ((double)100.0f * (double)((dblock->size - blk_prefix_size) - amount_free) /
+ (double)(dblock->size - blk_prefix_size)));
/*
* Print the data in a VMS-style octal dump.
@@ -539,16 +477,15 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
H5_buffer_dump(stream, indent, dblock->blk, marker, (size_t)0, dblock->size);
done:
- if(dblock && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_DBLOCK, addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ if (dblock && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_DBLOCK, addr, dblock, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap direct block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap header")
H5MM_xfree(marker);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_dblock_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_print
*
@@ -557,18 +494,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
*/
void
-H5HF_iblock_print(const H5HF_indirect_t *iblock,
- hbool_t dump_internal, FILE *stream, int indent, int fwidth)
+H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *stream, int indent, int fwidth)
{
- const H5HF_hdr_t *hdr; /* Pointer to heap's header */
- char temp_str[64]; /* Temporary string, for formatting */
- size_t u, v; /* Local index variable */
+ const H5HF_hdr_t *hdr; /* Pointer to heap's header */
+ char temp_str[64]; /* Temporary string, for formatting */
+ size_t u, v; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -591,96 +526,79 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of indirect block in heap:",
- iblock->block_off);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of indirect block:",
- iblock->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows:",
- iblock->nrows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows:",
- iblock->max_rows);
+ "Offset of indirect block in heap:", iblock->block_off);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max direct block rows:",
- hdr->man_dtable.max_direct_rows);
+ "Max direct block rows:", hdr->man_dtable.max_direct_rows);
/* Print the entry tables */
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
HDfprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, "");
else
HDfprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
- for(u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
- HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u, (unsigned long)hdr->man_dtable.row_block_size[u]);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str);
- for(v = 0; v < hdr->man_dtable.cparam.width; v++) {
+ for (u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
+ HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u,
+ (unsigned long)hdr->man_dtable.row_block_size[u]);
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
- if(hdr->filter_len > 0)
- HDfprintf(stream, "%*s%-*s %9a/%6Zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
- temp_str,
- iblock->ents[off].addr,
- iblock->filt_ents[off].size,
- iblock->filt_ents[off].filter_mask);
+ if (hdr->filter_len > 0)
+ HDfprintf(stream, "%*s%-*s %9a/%6Zu/%x\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr, iblock->filt_ents[off].size,
+ iblock->filt_ents[off].filter_mask);
else
- HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6),
- temp_str,
- iblock->ents[off].addr);
+ HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
- } /* end for */
+ } /* end for */
HDfprintf(stream, "%*sIndirect Block Entries:\n", indent, "");
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned first_row_bits; /* Number of bits used bit addresses in first row */
- unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned first_row_bits; /* Number of bits used bit addresses in first row */
+ unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
first_row_bits = H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size) +
- H5VM_log2_of2(hdr->man_dtable.cparam.width);
- for(u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++) {
+ H5VM_log2_of2(hdr->man_dtable.cparam.width);
+ for (u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++) {
num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1;
- HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u, num_indirect_rows);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str);
- for(v = 0; v < hdr->man_dtable.cparam.width; v++) {
+ HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u,
+ num_indirect_rows);
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
- HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6),
- temp_str,
- iblock->ents[off].addr);
+ HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- "<none>");
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>");
/* Print internal (runtime) information, if requested */
- if(dump_internal) {
+ if (dump_internal) {
HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
/* Print general information */
HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Reference count:",
- iblock->rc);
+ "Reference count:", iblock->rc);
/* Print parent's information */
HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Parent indirect block address:",
- iblock->parent);
- if(iblock->parent)
+ "Parent indirect block address:", iblock->parent);
+ if (iblock->parent)
H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth);
} /* end if */
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_iblock_print() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_debug
*
@@ -689,19 +607,18 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
- int indent, int fwidth, haddr_t hdr_addr, unsigned nrows)
+H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t hdr_addr, unsigned nrows)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
- H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */
+ H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -717,28 +634,28 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
HDassert(nrows > 0);
/* Load the fractal heap header */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap indirect block
*/
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, FALSE, H5AC_READ, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, FALSE, H5AC_READ,
+ &did_protect)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Print the information about the heap's indirect block */
H5HF_iblock_print(iblock, FALSE, stream, indent, fwidth);
done:
- if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap direct block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sects_debug_cb
*
@@ -747,7 +664,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 13 2006
*
*-------------------------------------------------------------------------
@@ -755,9 +671,9 @@ done:
static herr_t
H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
- H5HF_debug_iter_ud2_t *udata = (H5HF_debug_iter_ud2_t *)_udata; /* User data for callbacks */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t * sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
+ H5HF_debug_iter_ud2_t *udata = (H5HF_debug_iter_ud2_t *)_udata; /* User data for callbacks */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -768,32 +684,27 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
HDassert(udata);
/* Print generic section information */
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section type:",
- (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
- (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ? "first row" :
- (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
+ HDfprintf(
+ udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
+ (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE
+ ? "single"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
+ ? "first row"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
- "Section address:",
- sect->sect_info.addr);
+ "Section address:", sect->sect_info.addr);
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
- "Section size:",
- sect->sect_info.size);
-#ifdef QAK
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:",
- (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
-#endif /* QAK */
+ "Section size:", sect->sect_info.size);
/* Dump section-specific debugging information */
- if(H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < 0)
+ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
+ 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't dump section's debugging info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sects_debug_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sects_debug
*
@@ -802,17 +713,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr,
- FILE *stream, int indent, int fwidth)
+H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr, FILE *stream, int indent, int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -826,16 +735,16 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr,
HDassert(fwidth >= 0);
/* Load the fractal heap header */
- if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ if (NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Initialize the free space information for the heap */
- if(H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
+ if (H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space")
/* If there is a free space manager for the heap, iterate over them */
- if(hdr->fspace) {
- H5HF_debug_iter_ud2_t udata; /* User data for callbacks */
+ if (hdr->fspace) {
+ H5HF_debug_iter_ud2_t udata; /* User data for callbacks */
/* Prepare user data for section iteration callback */
udata.fspace = hdr->fspace;
@@ -844,18 +753,17 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr,
udata.fwidth = fwidth;
/* Iterate over all the free space sections */
- if(H5FS_sect_iterate(f, dxpl_id, hdr->fspace, H5HF_sects_debug_cb, &udata) < 0)
+ if (H5FS_sect_iterate(f, dxpl_id, hdr->fspace, H5HF_sects_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
/* Close the free space information */
- if(H5HF_space_close(hdr, dxpl_id) < 0)
+ if (H5HF_space_close(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
} /* end if */
done:
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if (hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sects_debug() */
-
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 6ac59eb..f62bb7f 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFdblock.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Direct block routines for fractal heaps.
*
@@ -26,38 +26,34 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -65,18 +61,14 @@
/* Declare a free list to manage the H5HF_direct_t struct */
H5FL_DEFINE(H5HF_direct_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_create
*
@@ -85,20 +77,19 @@ H5FL_DEFINE(H5HF_direct_t);
* Return: Pointer to new direct block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
- unsigned par_entry, haddr_t *addr_p, H5HF_free_section_t **ret_sec_node)
+H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned par_entry,
+ haddr_t *addr_p, H5HF_free_section_t **ret_sec_node)
{
- H5HF_free_section_t *sec_node; /* Pointer to free space section for block */
- H5HF_direct_t *dblock = NULL; /* Pointer to direct block */
- haddr_t dblock_addr; /* Direct block's address */
- size_t free_space; /* Free space in new block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sec_node; /* Pointer to free space section for block */
+ H5HF_direct_t * dblock = NULL; /* Pointer to direct block */
+ haddr_t dblock_addr; /* Direct block's address */
+ size_t free_space; /* Free space in new block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -110,98 +101,101 @@ H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo
/*
* Allocate file and memory data structures.
*/
- if(NULL == (dblock = H5FL_MALLOC(H5HF_direct_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block")
+ if (NULL == (dblock = H5FL_MALLOC(H5HF_direct_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block")
/* Reset the metadata cache info for the heap header */
HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
dblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
+ if (H5HF_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
/* Set info for direct block */
- if(par_iblock) {
- unsigned par_row = par_entry / hdr->man_dtable.cparam.width; /* Row for block */
+ if (par_iblock) {
+ unsigned par_row = par_entry / hdr->man_dtable.cparam.width; /* Row for block */
/* Compute offset & size, based on parent's information */
dblock->block_off = par_iblock->block_off;
dblock->block_off += hdr->man_dtable.row_block_off[par_row];
- dblock->block_off += hdr->man_dtable.row_block_size[par_row] * (par_entry % hdr->man_dtable.cparam.width);
+ dblock->block_off +=
+ hdr->man_dtable.row_block_size[par_row] * (par_entry % hdr->man_dtable.cparam.width);
H5_CHECKED_ASSIGN(dblock->size, size_t, hdr->man_dtable.row_block_size[par_row], hsize_t);
} /* end if */
else {
/* Must be the root direct block */
dblock->block_off = 0;
- dblock->size = hdr->man_dtable.cparam.start_block_size;
+ dblock->size = hdr->man_dtable.cparam.start_block_size;
} /* end else */
- dblock->file_size = 0;
+ dblock->file_size = 0;
dblock->blk_off_size = H5HF_SIZEOF_OFFSET_LEN(dblock->size);
- free_space = dblock->size - H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
+ free_space = dblock->size - H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
/* Allocate buffer for block */
-/* XXX: Change to using free-list factories */
- if((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
+ /* XXX: Change to using free-list factories */
+ if ((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
#ifdef H5_CLEAR_MEMORY
-HDmemset(dblock->blk, 0, dblock->size);
+ HDmemset(dblock->blk, 0, dblock->size);
#endif /* H5_CLEAR_MEMORY */
/* Allocate [temporary] space for the direct block on disk */
- if(H5F_USE_TMP_SPACE(hdr->f)) {
- if(HADDR_UNDEF == (dblock_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)dblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (H5F_USE_TMP_SPACE(hdr->f)) {
+ if (HADDR_UNDEF == (dblock_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)dblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
} /* end if */
else {
- if(HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)dblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block")
+ if (HADDR_UNDEF ==
+ (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)dblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap direct block")
} /* end else */
/* Attach to parent indirect block, if there is one */
dblock->parent = par_iblock;
- if(dblock->parent)
- if(H5HF_man_iblock_attach(dblock->parent, par_entry, dblock_addr) < 0)
+ if (dblock->parent)
+ if (H5HF_man_iblock_attach(dblock->parent, par_entry, dblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach direct block to parent indirect block")
dblock->par_entry = par_entry;
/* Create a new 'single' section for the free space in the block */
- if(NULL == (sec_node = H5HF_sect_single_new((dblock->block_off + H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)),
- free_space, dblock->parent, dblock->par_entry)))
+ if (NULL == (sec_node = H5HF_sect_single_new((dblock->block_off + H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)),
+ free_space, dblock->parent, dblock->par_entry)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for new direct block's free space")
/* Check what to do with section node */
- if(ret_sec_node)
+ if (ret_sec_node)
/* Pass back the pointer to the section instead of adding it to the free list */
*ret_sec_node = sec_node;
else {
/* Add new free space to the heap's list of space */
- if(H5HF_space_add(hdr, dxpl_id, sec_node, 0) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, sec_node, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list")
} /* end else */
/* Cache the new fractal heap direct block */
- if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache")
+ if (H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache")
/* Increase the allocated heap size */
- if(H5HF_hdr_inc_alloc(hdr, dblock->size) < 0)
+ if (H5HF_hdr_inc_alloc(hdr, dblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size")
/* Set the address of of direct block, if requested */
- if(addr_p)
+ if (addr_p)
*addr_p = dblock_addr;
done:
- if(ret_value < 0)
- if(dblock)
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if (ret_value < 0)
+ if (dblock)
+ if (H5HF_man_dblock_dest(dblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_destroy
*
@@ -214,18 +208,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 17 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
- haddr_t dblock_addr)
+H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock, haddr_t dblock_addr)
{
- hsize_t dblock_size; /* Size of direct block on disk */
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t dblock_size; /* Size of direct block on disk */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -236,28 +228,28 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
HDassert(dblock);
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Check for root direct block */
- if(dblock->parent == NULL)
+ if (dblock->parent == NULL)
/* Get direct block's actual size */
dblock_size = (hsize_t)hdr->pline_root_direct_size;
else {
- H5HF_indirect_t *par_iblock; /* Parent indirect block */
- unsigned par_entry; /* Entry in parent indirect block */
+ H5HF_indirect_t *par_iblock; /* Parent indirect block */
+ unsigned par_entry; /* Entry in parent indirect block */
/* Get parent information */
par_iblock = dblock->parent;
- par_entry = dblock->par_entry;
+ par_entry = dblock->par_entry;
/* Get direct block's actual size */
dblock_size = (hsize_t)par_iblock->filt_ents[par_entry].size;
} /* end else */
- } /* end if */
+ } /* end if */
else
dblock_size = (hsize_t)dblock->size;
/* Check for root direct block */
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
/* Sanity check */
HDassert(hdr->man_dtable.table_addr == dblock_addr);
HDassert(hdr->man_dtable.cparam.start_block_size == dblock->size);
@@ -269,7 +261,7 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
hdr->man_dtable.table_addr = HADDR_UNDEF;
/* Reset header information back to "empty heap" state */
- if(H5HF_hdr_empty(hdr) < 0)
+ if (H5HF_hdr_empty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty")
} /* end if */
else {
@@ -277,9 +269,9 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
hdr->man_alloc_size -= dblock->size;
/* Check for this direct block being the highest in the heap */
- if((dblock->block_off + dblock->size) == hdr->man_iter_off) {
+ if ((dblock->block_off + dblock->size) == hdr->man_iter_off) {
/* Move 'next block' iterator backwards (may shrink heap) */
- if(H5HF_hdr_reverse_iter(hdr, dxpl_id, dblock_addr) < 0)
+ if (H5HF_hdr_reverse_iter(hdr, dxpl_id, dblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reverse 'next block' iterator")
} /* end if */
#if 0
@@ -298,13 +290,13 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
#endif /* 0 */
/* Detach from parent indirect block */
- if(dblock->parent) {
- if(H5HF_man_iblock_detach(dblock->parent, dxpl_id, dblock->par_entry) < 0)
+ if (dblock->parent) {
+ if (H5HF_man_iblock_detach(dblock->parent, dxpl_id, dblock->par_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block");
- dblock->parent = NULL;
+ dblock->parent = NULL;
dblock->par_entry = 0;
} /* end if */
- } /* end else */
+ } /* end else */
/* Indicate that the indirect block should be deleted & file space freed */
dblock->file_size = dblock_size;
@@ -312,13 +304,12 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
done:
/* Unprotect the indirect block, with appropriate flags */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, cache_flags) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_destroy() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_new
*
@@ -328,18 +319,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 13 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_new(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request,
- H5HF_free_section_t **ret_sec_node)
+H5HF_man_dblock_new(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request, H5HF_free_section_t **ret_sec_node)
{
- haddr_t dblock_addr; /* Address of new direct block */
- size_t min_dblock_size; /* Min. size of direct block to allocate */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t dblock_addr; /* Address of new direct block */
+ size_t min_dblock_size; /* Min. size of direct block to allocate */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -350,7 +339,7 @@ H5HF_man_dblock_new(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request,
HDassert(request > 0);
/* Compute the min. size of the direct block needed to fulfill the request */
- if(request < hdr->man_dtable.cparam.start_block_size)
+ if (request < hdr->man_dtable.cparam.start_block_size)
min_dblock_size = hdr->man_dtable.cparam.start_block_size;
else {
min_dblock_size = ((size_t)1) << (1 + H5VM_log2_gen((uint64_t)request));
@@ -358,57 +347,62 @@ H5HF_man_dblock_new(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request,
} /* end else */
/* Adjust the size of block needed to fulfill request, with overhead */
- if((min_dblock_size - request) < H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
+ if ((min_dblock_size - request) < H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
min_dblock_size *= 2;
/* Check if this is the first block in the heap */
- if(!H5F_addr_defined(hdr->man_dtable.table_addr) &&
- min_dblock_size == hdr->man_dtable.cparam.start_block_size) {
+ if (!H5F_addr_defined(hdr->man_dtable.table_addr) &&
+ min_dblock_size == hdr->man_dtable.cparam.start_block_size) {
/* Create new direct block at starting offset */
- if(H5HF_man_dblock_create(dxpl_id, hdr, NULL, 0, &dblock_addr, ret_sec_node) < 0)
+ if (H5HF_man_dblock_create(dxpl_id, hdr, NULL, 0, &dblock_addr, ret_sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block")
/* Point root at new direct block */
hdr->man_dtable.curr_root_rows = 0;
- hdr->man_dtable.table_addr = dblock_addr;
- if(hdr->filter_len > 0) {
- hdr->pline_root_direct_size = hdr->man_dtable.cparam.start_block_size;
+ hdr->man_dtable.table_addr = dblock_addr;
+ if (hdr->filter_len > 0) {
+ hdr->pline_root_direct_size = hdr->man_dtable.cparam.start_block_size;
hdr->pline_root_direct_filter_mask = 0;
} /* end if */
/* Extend heap to cover new direct block */
- if(H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
+ if (H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size,
+ (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
} /* end if */
/* Root entry already exists, allocate direct block from root indirect block */
else {
- H5HF_indirect_t *iblock; /* Pointer to indirect block to create */
- unsigned next_row; /* Iterator's next block row */
- unsigned next_entry; /* Iterator's next block entry */
- size_t next_size; /* Size of next direct block to create */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block to create */
+ unsigned next_row; /* Iterator's next block row */
+ unsigned next_entry; /* Iterator's next block entry */
+ size_t next_size; /* Size of next direct block to create */
- /* Update iterator to reflect any previous increments as well as allow for requested direct block size */
- if(H5HF_hdr_update_iter(hdr, dxpl_id, min_dblock_size) < 0)
+ /* Update iterator to reflect any previous increments as well as allow for requested direct block size
+ */
+ if (H5HF_hdr_update_iter(hdr, dxpl_id, min_dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "unable to update block iterator")
/* Retrieve information about current iterator position */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
HDassert(next_row < iblock->nrows);
H5_CHECKED_ASSIGN(next_size, size_t, hdr->man_dtable.row_block_size[next_row], hsize_t);
/* Check for skipping over blocks */
- if(min_dblock_size > next_size) {
-HDfprintf(stderr, "%s: Skipping direct block sizes not supported, min_dblock_size = %Zu, next_size = %Zu\n", FUNC, min_dblock_size, next_size);
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet")
+ if (min_dblock_size > next_size) {
+ HDfprintf(
+ stderr,
+ "%s: Skipping direct block sizes not supported, min_dblock_size = %Zu, next_size = %Zu\n",
+ FUNC, min_dblock_size, next_size);
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet")
} /* end if */
/* Advance "next block" iterator to next direct block entry */
- if(H5HF_hdr_inc_iter(hdr, (hsize_t)next_size, 1) < 0)
+ if (H5HF_hdr_inc_iter(hdr, (hsize_t)next_size, 1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment 'next block' iterator")
/* Create new direct block at current location*/
- if(H5HF_man_dblock_create(dxpl_id, hdr, iblock, next_entry, &dblock_addr, ret_sec_node) < 0)
+ if (H5HF_man_dblock_create(dxpl_id, hdr, iblock, next_entry, &dblock_addr, ret_sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block")
} /* end else */
@@ -416,7 +410,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_protect
*
@@ -426,19 +419,17 @@ done:
* Return: Pointer to direct block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
*/
H5HF_direct_t *
-H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr,
- size_t dblock_size, H5HF_indirect_t *par_iblock, unsigned par_entry,
- H5AC_protect_t rw)
+H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, size_t dblock_size,
+ H5HF_indirect_t *par_iblock, unsigned par_entry, H5AC_protect_t rw)
{
- H5HF_direct_t *dblock; /* Direct block from cache */
- H5HF_dblock_cache_ud_t udata; /* parent and other infor for deserializing direct block */
- H5HF_direct_t *ret_value; /* Return value */
+ H5HF_direct_t * dblock; /* Direct block from cache */
+ H5HF_dblock_cache_ud_t udata; /* parent and other infor for deserializing direct block */
+ H5HF_direct_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -450,9 +441,9 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr,
HDassert(dblock_size > 0);
/* Set up parent info */
- udata.par_info.hdr = hdr;
+ udata.par_info.hdr = hdr;
udata.par_info.iblock = par_iblock;
- udata.par_info.entry = par_entry;
+ udata.par_info.entry = par_entry;
/* set up the file pointer in the user data */
udata.f = hdr->f;
@@ -463,27 +454,28 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr,
/* compute the on disk image size -- observe that odi_size and
* dblock_size will be identical if there is no filtering.
*/
- if(hdr->filter_len > 0) {
- if(par_iblock == NULL) {
- udata.odi_size = hdr->pline_root_direct_size;
- udata.filter_mask = hdr->pline_root_direct_filter_mask;
- } /* end if */
+ if (hdr->filter_len > 0) {
+ if (par_iblock == NULL) {
+ udata.odi_size = hdr->pline_root_direct_size;
+ udata.filter_mask = hdr->pline_root_direct_filter_mask;
+ } /* end if */
else {
- /* Sanity check */
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ /* Sanity check */
+ HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
- /* Set up parameters to read filtered direct block */
- udata.odi_size = par_iblock->filt_ents[par_entry].size;
+ /* Set up parameters to read filtered direct block */
+ udata.odi_size = par_iblock->filt_ents[par_entry].size;
udata.filter_mask = par_iblock->filt_ents[par_entry].filter_mask;
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
- udata.odi_size = dblock_size;
+ udata.odi_size = dblock_size;
udata.filter_mask = 0;
} /* end else */
/* Protect the direct block */
- if(NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, rw)))
+ if (NULL ==
+ (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap direct block")
/* Set the return value */
@@ -493,7 +485,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_locate
*
@@ -502,22 +493,20 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
- H5HF_indirect_t **ret_iblock, unsigned *ret_entry, hbool_t *ret_did_protect,
- H5AC_protect_t rw)
+H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, H5HF_indirect_t **ret_iblock,
+ unsigned *ret_entry, hbool_t *ret_did_protect, H5AC_protect_t rw)
{
- haddr_t iblock_addr; /* Indirect block's address */
- H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- unsigned row, col; /* Row & column for object's block */
- unsigned entry; /* Entry of block */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t iblock_addr; /* Indirect block's address */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ unsigned row, col; /* Row & column for object's block */
+ unsigned entry; /* Entry of block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -525,31 +514,32 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
* Check arguments.
*/
HDassert(hdr);
- HDassert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
+ HDassert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
HDassert(ret_iblock);
HDassert(ret_did_protect);
/* Look up row & column for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
+ if (H5HF_dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
/* Set initial indirect block info */
iblock_addr = hdr->man_dtable.table_addr;
/* Lock root indirect block */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, hdr->man_dtable.curr_root_rows, NULL, 0, FALSE, rw, &did_protect)))
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, hdr->man_dtable.curr_root_rows,
+ NULL, 0, FALSE, rw, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Check for indirect block row */
- while(row >= hdr->man_dtable.max_direct_rows) {
- H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
- hbool_t new_did_protect; /* Whether we protected the indirect block or not */
- unsigned nrows; /* Number of rows in new indirect block */
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting parent indirect block */
+ while (row >= hdr->man_dtable.max_direct_rows) {
+ H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
+ hbool_t new_did_protect; /* Whether we protected the indirect block or not */
+ unsigned nrows; /* Number of rows in new indirect block */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting parent indirect block */
/* Compute # of rows in child indirect block */
nrows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[row]) - hdr->man_dtable.first_row_bits) + 1;
- HDassert(nrows < iblock->nrows); /* child must be smaller than parent */
+ HDassert(nrows < iblock->nrows); /* child must be smaller than parent */
/* Compute indirect block's entry */
entry = (row * hdr->man_dtable.cparam.width) + col;
@@ -558,8 +548,8 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
iblock_addr = iblock->ents[entry].addr;
/* Check if we need to (re-)create the child indirect block */
- if(!H5F_addr_defined(iblock_addr)) {
- if(H5HF_man_iblock_create(hdr, dxpl_id, iblock, entry, nrows, nrows, &iblock_addr) < 0)
+ if (!H5F_addr_defined(iblock_addr)) {
+ if (H5HF_man_iblock_create(hdr, dxpl_id, iblock, entry, nrows, nrows, &iblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block")
/* Indicate that the parent indirect block was modified */
@@ -567,34 +557,34 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
} /* end if */
/* Lock child indirect block */
- if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, iblock, entry, FALSE, rw, &new_did_protect)))
+ if (NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, iblock, entry,
+ FALSE, rw, &new_did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Release the current indirect block */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, cache_flags, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, cache_flags, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
/* Switch variables to use new indirect block */
- iblock = new_iblock;
+ iblock = new_iblock;
did_protect = new_did_protect;
/* Look up row & column in new indirect block for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
+ if (H5HF_dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
- HDassert(row < iblock->nrows); /* child must be smaller than parent */
- } /* end while */
+ HDassert(row < iblock->nrows); /* child must be smaller than parent */
+ } /* end while */
/* Set return parameters */
- if(ret_entry)
+ if (ret_entry)
*ret_entry = (row * hdr->man_dtable.cparam.width) + col;
- *ret_iblock = iblock;
+ *ret_iblock = iblock;
*ret_did_protect = did_protect;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_locate() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_delete
*
@@ -608,17 +598,15 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
- hsize_t dblock_size)
+H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr, hsize_t dblock_size)
{
- unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -629,23 +617,23 @@ H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
HDassert(H5F_addr_defined(dblock_addr));
/* Check the direct block's status in the metadata cache */
- if(H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
+ if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for direct block")
/* If the direct block is in the cache, expunge it now */
- if(dblock_status & H5AC_ES__IN_CACHE) {
+ if (dblock_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
HDassert(!(dblock_status & H5AC_ES__IS_PINNED));
HDassert(!(dblock_status & H5AC_ES__IS_PROTECTED));
/* Evict the direct block from the metadata cache */
- if(H5AC_expunge_entry(f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove direct block from cache")
} /* end if */
/* Check if the direct block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!H5F_IS_TMP_ADDR(f, dblock_addr)) {
+ if (!H5F_IS_TMP_ADDR(f, dblock_addr)) {
/* Release direct block's disk space */
/* (XXX: Under the best of circumstances, this block's space in the file
* would be freed in the H5AC_expunge_entry() call above (and the
@@ -660,7 +648,7 @@ H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
* size of each entry in the cache and we can the the
* H5AC_expunge_entry() method. -QAK)
*/
- if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, dblock_addr, dblock_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, dblock_addr, dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block")
} /* end if */
@@ -668,7 +656,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_dblock_dest
*
@@ -677,7 +664,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -685,7 +671,7 @@ done:
herr_t
H5HF_man_dblock_dest(H5HF_direct_t *dblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -696,11 +682,12 @@ H5HF_man_dblock_dest(H5HF_direct_t *dblock)
/* Decrement reference count on shared fractal heap info */
HDassert(dblock->hdr != NULL);
- if(H5HF_hdr_decr(dblock->hdr) < 0)
+ if (H5HF_hdr_decr(dblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
- if(dblock->parent)
- if(H5HF_iblock_decr(dblock->parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
+ if (dblock->parent)
+ if (H5HF_iblock_decr(dblock->parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared indirect block")
/* Free block's buffer */
dblock->blk = H5FL_BLK_FREE(direct_block, dblock->blk);
@@ -711,4 +698,3 @@ H5HF_man_dblock_dest(H5HF_direct_t *dblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_dblock_dest() */
-
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 1952a30..cdf3ed6 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFdtable.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "Doubling table" routines for fractal heaps.
*
@@ -26,53 +26,45 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_init
*
@@ -81,7 +73,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -89,10 +80,10 @@
herr_t
H5HF_dtable_init(H5HF_dtable_t *dtable)
{
- hsize_t tmp_block_size; /* Temporary block size */
- hsize_t acc_block_off; /* Accumulated block offset */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t tmp_block_size; /* Temporary block size */
+ hsize_t acc_block_off; /* Accumulated block offset */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -102,30 +93,33 @@ H5HF_dtable_init(H5HF_dtable_t *dtable)
HDassert(dtable);
/* Compute/cache some values */
- dtable->start_bits = H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size);
- dtable->first_row_bits = dtable->start_bits + H5VM_log2_of2(dtable->cparam.width);
- dtable->max_root_rows = (dtable->cparam.max_index - dtable->first_row_bits) + 1;
- dtable->max_direct_bits = H5VM_log2_of2((uint32_t)dtable->cparam.max_direct_size);
- dtable->max_direct_rows = (dtable->max_direct_bits - dtable->start_bits) + 2;
- dtable->num_id_first_row = dtable->cparam.start_block_size * dtable->cparam.width;
+ dtable->start_bits = H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size);
+ dtable->first_row_bits = dtable->start_bits + H5VM_log2_of2(dtable->cparam.width);
+ dtable->max_root_rows = (dtable->cparam.max_index - dtable->first_row_bits) + 1;
+ dtable->max_direct_bits = H5VM_log2_of2((uint32_t)dtable->cparam.max_direct_size);
+ dtable->max_direct_rows = (dtable->max_direct_bits - dtable->start_bits) + 2;
+ dtable->num_id_first_row = dtable->cparam.start_block_size * dtable->cparam.width;
dtable->max_dir_blk_off_size = H5HF_SIZEOF_OFFSET_LEN(dtable->cparam.max_direct_size);
/* Build table of block sizes for each row */
- if(NULL == (dtable->row_block_size = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block size table")
- if(NULL == (dtable->row_block_off = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block offset table")
- if(NULL == (dtable->row_tot_dblock_free = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table total direct block free space table")
- if(NULL == (dtable->row_max_dblock_free = (size_t *)H5MM_malloc(dtable->max_root_rows * sizeof(size_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table max. direct block free space table")
- tmp_block_size = dtable->cparam.start_block_size;
- acc_block_off = dtable->cparam.start_block_size * dtable->cparam.width;
+ if (NULL == (dtable->row_block_size = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block size table")
+ if (NULL == (dtable->row_block_off = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block offset table")
+ if (NULL ==
+ (dtable->row_tot_dblock_free = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "can't create doubling table total direct block free space table")
+ if (NULL == (dtable->row_max_dblock_free = (size_t *)H5MM_malloc(dtable->max_root_rows * sizeof(size_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "can't create doubling table max. direct block free space table")
+ tmp_block_size = dtable->cparam.start_block_size;
+ acc_block_off = dtable->cparam.start_block_size * dtable->cparam.width;
dtable->row_block_size[0] = dtable->cparam.start_block_size;
- dtable->row_block_off[0] = 0;
- for(u = 1; u < dtable->max_root_rows; u++) {
+ dtable->row_block_off[0] = 0;
+ for (u = 1; u < dtable->max_root_rows; u++) {
dtable->row_block_size[u] = tmp_block_size;
- dtable->row_block_off[u] = acc_block_off;
+ dtable->row_block_off[u] = acc_block_off;
tmp_block_size *= 2;
acc_block_off *= 2;
} /* end for */
@@ -134,7 +128,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_dtable_init() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_lookup
*
@@ -143,7 +136,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -159,22 +151,16 @@ H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsi
HDassert(dtable);
HDassert(row);
HDassert(col);
-#ifdef QAK
-HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
-#endif /* QAK */
/* Check for offset in first row */
- if(off < dtable->num_id_first_row) {
+ if (off < dtable->num_id_first_row) {
*row = 0;
H5_CHECKED_ASSIGN(*col, unsigned, (off / dtable->cparam.start_block_size), hsize_t);
} /* end if */
else {
- unsigned high_bit = H5VM_log2_gen(off); /* Determine the high bit in the offset */
- hsize_t off_mask = ((hsize_t)1) << high_bit; /* Compute mask for determining column */
+ unsigned high_bit = H5VM_log2_gen(off); /* Determine the high bit in the offset */
+ hsize_t off_mask = ((hsize_t)1) << high_bit; /* Compute mask for determining column */
-#ifdef QAK
-HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", high_bit, off_mask);
-#endif /* QAK */
*row = (high_bit - dtable->first_row_bits) + 1;
H5_CHECKED_ASSIGN(*col, unsigned, ((off - off_mask) / dtable->row_block_size[*row]), hsize_t);
} /* end else */
@@ -182,7 +168,6 @@ HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", h
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_lookup() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_dest
*
@@ -191,7 +176,6 @@ HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", h
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -221,7 +205,6 @@ H5HF_dtable_dest(H5HF_dtable_t *dtable)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_size_to_row
*
@@ -230,7 +213,6 @@ H5HF_dtable_dest(H5HF_dtable_t *dtable)
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
@@ -238,7 +220,7 @@ H5HF_dtable_dest(H5HF_dtable_t *dtable)
unsigned
H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
{
- unsigned row; /* Row where block will fit */
+ unsigned row = 0; /* Row where block will fit */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -247,15 +229,16 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
*/
HDassert(dtable);
- if(block_size == dtable->cparam.start_block_size)
+ if (block_size == dtable->cparam.start_block_size)
row = 0;
else
- row = (H5VM_log2_of2((uint32_t)block_size) - H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size)) + 1;
+ row =
+ (H5VM_log2_of2((uint32_t)block_size) - H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size)) +
+ 1;
FUNC_LEAVE_NOAPI(row)
} /* end H5HF_dtable_size_to_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_size_to_rows
*
@@ -264,7 +247,6 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -272,7 +254,7 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
unsigned
H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
{
- unsigned rows; /* # of rows required for indirect block */
+ unsigned rows = 0; /* # of rows required for indirect block */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -286,7 +268,6 @@ H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
FUNC_LEAVE_NOAPI(rows)
} /* end H5HF_dtable_size_to_rows() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_dtable_span_size
*
@@ -295,20 +276,19 @@ H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
* Return: Non-zero span size on success/zero on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 25 2006
*
*-------------------------------------------------------------------------
*/
hsize_t
-H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
- unsigned start_col, unsigned num_entries)
+H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row, unsigned start_col,
+ unsigned num_entries)
{
unsigned start_entry; /* Entry for first block covered */
unsigned end_row; /* Row for last block covered */
unsigned end_col; /* Column for last block covered */
unsigned end_entry; /* Entry for last block covered */
- hsize_t acc_span_size; /* Accumulated span size */
+ hsize_t acc_span_size = 0; /* Accumulated span size */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -323,12 +303,8 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
/* Compute ending entry, column & row */
end_entry = (start_entry + num_entries) - 1;
- end_row = end_entry / dtable->cparam.width;
- end_col = end_entry % dtable->cparam.width;
-#ifdef QAK
-HDfprintf(stderr, "%s: start_row = %u, start_col = %u, start_entry = %u\n", "H5HF_sect_indirect_span_size", start_row, start_col, start_entry);
-HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect_indirect_span_size", end_row, end_col, end_entry);
-#endif /* QAK */
+ end_row = end_entry / dtable->cparam.width;
+ end_col = end_entry % dtable->cparam.width;
/* Initialize accumulated span size */
acc_span_size = 0;
@@ -336,34 +312,26 @@ HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect
/* Compute span size covered */
/* Check for multi-row span */
- if(start_row != end_row) {
- /* Accomodate partial starting row */
- if(start_col > 0) {
- acc_span_size = dtable->row_block_size[start_row] *
- (dtable->cparam.width - start_col);
+ if (start_row != end_row) {
+ /* Accommodate partial starting row */
+ if (start_col > 0) {
+ acc_span_size = dtable->row_block_size[start_row] * (dtable->cparam.width - start_col);
start_row++;
} /* end if */
/* Accumulate full rows */
- while(start_row < end_row) {
- acc_span_size += dtable->row_block_size[start_row] *
- dtable->cparam.width;
+ while (start_row < end_row) {
+ acc_span_size += dtable->row_block_size[start_row] * dtable->cparam.width;
start_row++;
} /* end while */
- /* Accomodate partial ending row */
- acc_span_size += dtable->row_block_size[start_row] *
- (end_col + 1);
+ /* Accommodate partial ending row */
+ acc_span_size += dtable->row_block_size[start_row] * (end_col + 1);
} /* end if */
else {
/* Span is in same row */
- acc_span_size = dtable->row_block_size[start_row] *
- ((end_col - start_col) + 1);
+ acc_span_size = dtable->row_block_size[start_row] * ((end_col - start_col) + 1);
} /* end else */
-#ifdef QAK
-HDfprintf(stderr, "%s: acc_span_size = %Hu\n", "H5HF_dtable_span_size", acc_span_size);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(acc_span_size)
} /* end H5HF_sect_indirect_span_size() */
-
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 5562d3a..3069077 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFhdr.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Heap header routines for fractal heaps.
*
@@ -26,16 +26,16 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
@@ -45,33 +45,29 @@
/* Limit on the size of the max. direct block size */
/* (This is limited to 32-bits currently, because I think it's unlikely to
* need to be larger, the 32-bit limit for H5VM_log2_of2(n), and
- * some offsets/sizes are encoded with a maxiumum of 32-bits - QAK)
+ * some offsets/sizes are encoded with a maximum of 32-bits - QAK)
*/
#define H5HF_MAX_DIRECT_SIZE_LIMIT ((hsize_t)2 * 1024 * 1024 * 1024)
/* Limit on the width of the doubling table */
/* (This is limited to 16-bits currently, because I think it's unlikely to
- * need to be larger, and its encoded with a maxiumum of 16-bits - QAK)
+ * need to be larger, and its encoded with a maximum of 16-bits - QAK)
*/
#define H5HF_WIDTH_LIMIT (64 * 1024)
#endif /* NDEBUG */
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -79,18 +75,14 @@
/* Declare a free list to manage the H5HF_hdr_t struct */
H5FL_DEFINE_STATIC(H5HF_hdr_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_alloc
*
@@ -99,7 +91,6 @@ H5FL_DEFINE_STATIC(H5HF_hdr_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -107,8 +98,8 @@ H5FL_DEFINE_STATIC(H5HF_hdr_t);
H5HF_hdr_t *
H5HF_hdr_alloc(H5F_t *f)
{
- H5HF_hdr_t *hdr = NULL; /* Shared fractal heap header */
- H5HF_hdr_t *ret_value; /* Return value */
+ H5HF_hdr_t *hdr = NULL; /* Shared fractal heap header */
+ H5HF_hdr_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -118,11 +109,11 @@ H5HF_hdr_alloc(H5F_t *f)
HDassert(f);
/* Allocate space for the shared information */
- if(NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header")
+ if (NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header")
/* Set the internal parameters for the heap */
- hdr->f = f;
+ hdr->f = f;
hdr->sizeof_size = H5F_SIZEOF_SIZE(f);
hdr->sizeof_addr = H5F_SIZEOF_ADDR(f);
@@ -133,7 +124,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_free_space
*
@@ -143,7 +133,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -151,12 +140,12 @@ done:
static herr_t
H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
{
- hsize_t acc_heap_size; /* Accumumated heap space */
- hsize_t iblock_size; /* Size of indirect block to calculate for */
- hsize_t acc_dblock_free; /* Accumumated direct block free space */
- size_t max_dblock_free; /* Max. direct block free space */
- unsigned curr_row; /* Current row in block */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t acc_heap_size; /* Accumumated heap space */
+ hsize_t iblock_size; /* Size of indirect block to calculate for */
+ hsize_t acc_dblock_free; /* Accumumated direct block free space */
+ size_t max_dblock_free; /* Max. direct block free space */
+ unsigned curr_row; /* Current row in block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -167,17 +156,15 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
HDassert(iblock_row >= hdr->man_dtable.max_direct_rows);
/* Set the free space in direct blocks */
- acc_heap_size = 0;
+ acc_heap_size = 0;
acc_dblock_free = 0;
max_dblock_free = 0;
- iblock_size = hdr->man_dtable.row_block_size[iblock_row];
- curr_row = 0;
- while(acc_heap_size < iblock_size) {
- acc_heap_size += hdr->man_dtable.row_block_size[curr_row] *
- hdr->man_dtable.cparam.width;
- acc_dblock_free += hdr->man_dtable.row_tot_dblock_free[curr_row] *
- hdr->man_dtable.cparam.width;
- if(hdr->man_dtable.row_max_dblock_free[curr_row] > max_dblock_free)
+ iblock_size = hdr->man_dtable.row_block_size[iblock_row];
+ curr_row = 0;
+ while (acc_heap_size < iblock_size) {
+ acc_heap_size += hdr->man_dtable.row_block_size[curr_row] * hdr->man_dtable.cparam.width;
+ acc_dblock_free += hdr->man_dtable.row_tot_dblock_free[curr_row] * hdr->man_dtable.cparam.width;
+ if (hdr->man_dtable.row_max_dblock_free[curr_row] > max_dblock_free)
max_dblock_free = hdr->man_dtable.row_max_dblock_free[curr_row];
curr_row++;
} /* end while */
@@ -189,7 +176,6 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_compute_free_space() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_finish_init_phase1
*
@@ -198,7 +184,6 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2006
*
*-------------------------------------------------------------------------
@@ -206,7 +191,7 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
herr_t
H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -217,18 +202,17 @@ H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
/* Compute/cache some values */
hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index);
- if(H5HF_dtable_init(&hdr->man_dtable) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info")
+ if (H5HF_dtable_init(&hdr->man_dtable) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info")
/* Set the size of heap IDs */
- hdr->heap_len_size = MIN(hdr->man_dtable.max_dir_blk_off_size,
- H5VM_limit_enc_size((uint64_t)hdr->max_man_size));
+ hdr->heap_len_size =
+ MIN(hdr->man_dtable.max_dir_blk_off_size, H5VM_limit_enc_size((uint64_t)hdr->max_man_size));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_finish_init_phase1() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_finish_init_phase2
*
@@ -237,7 +221,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2006
*
*-------------------------------------------------------------------------
@@ -245,8 +228,8 @@ done:
herr_t
H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -256,34 +239,34 @@ H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Set the free space in direct blocks */
- for(u = 0; u < hdr->man_dtable.max_root_rows; u++) {
- if(u < hdr->man_dtable.max_direct_rows) {
- hdr->man_dtable.row_tot_dblock_free[u] = hdr->man_dtable.row_block_size[u] -
- H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- H5_CHECKED_ASSIGN(hdr->man_dtable.row_max_dblock_free[u], size_t, hdr->man_dtable.row_tot_dblock_free[u], hsize_t);
+ for (u = 0; u < hdr->man_dtable.max_root_rows; u++) {
+ if (u < hdr->man_dtable.max_direct_rows) {
+ hdr->man_dtable.row_tot_dblock_free[u] =
+ hdr->man_dtable.row_block_size[u] - H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
+ H5_CHECKED_ASSIGN(hdr->man_dtable.row_max_dblock_free[u], size_t,
+ hdr->man_dtable.row_tot_dblock_free[u], hsize_t);
} /* end if */
- else
- if(H5HF_hdr_compute_free_space(hdr, u) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize direct block free space for indirect block")
+ else if (H5HF_hdr_compute_free_space(hdr, u) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't initialize direct block free space for indirect block")
} /* end for */
/* Initialize the block iterator for searching for free space */
- if(H5HF_man_iter_init(&hdr->next_block) < 0)
+ if (H5HF_man_iter_init(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator")
/* Initialize the information for tracking 'huge' objects */
- if(H5HF_huge_init(hdr) < 0)
+ if (H5HF_huge_init(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects")
/* Initialize the information for tracking 'tiny' objects */
- if(H5HF_tiny_init(hdr) < 0)
+ if (H5HF_tiny_init(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_finish_init_phase2() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_finish_init
*
@@ -292,7 +275,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -300,7 +282,7 @@ done:
herr_t
H5HF_hdr_finish_init(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -310,18 +292,17 @@ H5HF_hdr_finish_init(H5HF_hdr_t *hdr)
HDassert(hdr);
/* First phase of header final initialization */
- if(H5HF_hdr_finish_init_phase1(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization")
+ if (H5HF_hdr_finish_init_phase1(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization")
/* Second phase of header final initialization */
- if(H5HF_hdr_finish_init_phase2(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization")
+ if (H5HF_hdr_finish_init_phase2(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_finish_init() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_create
*
@@ -330,7 +311,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -338,9 +318,9 @@ done:
haddr_t
H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
{
- H5HF_hdr_t *hdr = NULL; /* The new fractal heap header information */
- size_t dblock_overhead; /* Direct block's overhead */
- haddr_t ret_value; /* Return value */
+ H5HF_hdr_t *hdr = NULL; /* The new fractal heap header information */
+ size_t dblock_overhead; /* Direct block's overhead */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -352,39 +332,40 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
#ifndef NDEBUG
/* Check for valid parameters */
- if(cparam->managed.width == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero")
- if(cparam->managed.width > H5HF_WIDTH_LIMIT)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large")
- if(!POWER_OF_TWO(cparam->managed.width))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two")
- if(cparam->managed.start_block_size == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero")
- if(!POWER_OF_TWO(cparam->managed.start_block_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two")
- if(cparam->managed.max_direct_size == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero")
- if(cparam->managed.max_direct_size > H5HF_MAX_DIRECT_SIZE_LIMIT)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large")
- if(!POWER_OF_TWO(cparam->managed.max_direct_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two")
- if(cparam->managed.max_direct_size < cparam->max_man_size)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not large enough to hold all managed blocks")
- if(cparam->managed.max_index == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero")
+ if (cparam->managed.width == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero")
+ if (cparam->managed.width > H5HF_WIDTH_LIMIT)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large")
+ if (!POWER_OF_TWO(cparam->managed.width))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two")
+ if (cparam->managed.start_block_size == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero")
+ if (!POWER_OF_TWO(cparam->managed.start_block_size))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two")
+ if (cparam->managed.max_direct_size == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero")
+ if (cparam->managed.max_direct_size > H5HF_MAX_DIRECT_SIZE_LIMIT)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large")
+ if (!POWER_OF_TWO(cparam->managed.max_direct_size))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two")
+ if (cparam->managed.max_direct_size < cparam->max_man_size)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF,
+ "max. direct block size not large enough to hold all managed blocks")
+ if (cparam->managed.max_index == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero")
#endif /* NDEBUG */
/* Allocate & basic initialization for the shared header */
- if(NULL == (hdr = H5HF_hdr_alloc(f)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info")
+ if (NULL == (hdr = H5HF_hdr_alloc(f)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info")
#ifndef NDEBUG
- if(cparam->managed.max_index > (8 * hdr->sizeof_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file")
+ if (cparam->managed.max_index > (8 * hdr->sizeof_size))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file")
#endif /* NDEBUG */
/* Set the creation parameters for the heap */
- hdr->max_man_size = cparam->max_man_size;
+ hdr->max_man_size = cparam->max_man_size;
hdr->checksum_dblocks = cparam->checksum_dblocks;
HDmemcpy(&(hdr->man_dtable.cparam), &(cparam->managed), sizeof(H5HF_dtable_cparam_t));
@@ -399,46 +380,48 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
/* First phase of header final initialization */
/* (doesn't need ID length set up) */
- if(H5HF_hdr_finish_init_phase1(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "can't finish phase #1 of header final initialization")
+ if (H5HF_hdr_finish_init_phase1(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF,
+ "can't finish phase #1 of header final initialization")
/* Copy any I/O filter pipeline */
/* (This code is not in the "finish init phase" routines because those
* routines are also called from the cache 'load' callback, and the filter
* length is already set in that case (its stored in the header on disk))
*/
- if(cparam->pline.nused > 0) {
+ if (cparam->pline.nused > 0) {
/* Check if the filters in the DCPL can be applied to this dataset */
- if(H5Z_can_apply_direct(&(cparam->pline)) < 0)
+ if (H5Z_can_apply_direct(&(cparam->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap")
/* Mark the filters as checked */
hdr->checked_filters = TRUE;
/* Make the "set local" filter callbacks for this dataset */
- if(H5Z_set_local_direct(&(cparam->pline)) < 0)
+ if (H5Z_set_local_direct(&(cparam->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters")
/* Copy the I/O filter pipeline from the creation parameters to the header */
- if(NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline)))
+ if (NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline")
/* Pay attention to the latest version flag for the file */
- if(H5F_USE_LATEST_FORMAT(hdr->f))
+ if (H5F_USE_LATEST_FORMAT(hdr->f))
/* Set the latest version for the I/O pipeline message */
- if(H5O_pline_set_latest_version(&(hdr->pline)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set latest version of I/O filter pipeline")
+ if (H5O_pline_set_latest_version(&(hdr->pline)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF,
+ "can't set latest version of I/O filter pipeline")
/* Compute the I/O filters' encoded size */
- if(0 == (hdr->filter_len = H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline))))
+ if (0 == (hdr->filter_len = H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size")
/* Compute size of header on disk */
- hdr->heap_size = H5HF_HEADER_SIZE(hdr) /* Base header size */
- + hdr->sizeof_size /* Size of size for filtered root direct block */
- + 4 /* Size of filter mask for filtered root direct block */
- + hdr->filter_len; /* Size of encoded I/O filter info */
- } /* end if */
+ hdr->heap_size = H5HF_HEADER_SIZE(hdr) /* Base header size */
+ + hdr->sizeof_size /* Size of size for filtered root direct block */
+ + 4 /* Size of filter mask for filtered root direct block */
+ + hdr->filter_len; /* Size of encoded I/O filter info */
+ } /* end if */
else {
/* Set size of header on disk */
hdr->heap_size = H5HF_HEADER_SIZE(hdr);
@@ -452,30 +435,34 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
* routines are also called from the cache 'load' callback, and the ID
* length is already set in that case (its stored in the header on disk))
*/
- switch(cparam->id_len) {
- case 0: /* Set the length of heap IDs to just enough to hold the offset & length of 'normal' objects in the heap */
+ switch (cparam->id_len) {
+ case 0: /* Set the length of heap IDs to just enough to hold the offset & length of 'normal' objects
+ in the heap */
hdr->id_len = (unsigned)1 + hdr->heap_off_size + hdr->heap_len_size;
break;
- case 1: /* Set the length of heap IDs to just enough to hold the information needed to directly access 'huge' objects in the heap */
- if(hdr->filter_len > 0)
- hdr->id_len = 1 /* ID flags */
- + hdr->sizeof_addr /* Address of filtered object */
- + hdr->sizeof_size /* Length of filtered object */
- + 4 /* Filter mask for filtered object */
- + hdr->sizeof_size; /* Size of de-filtered object in memory */
+ case 1: /* Set the length of heap IDs to just enough to hold the information needed to directly access
+ 'huge' objects in the heap */
+ if (hdr->filter_len > 0)
+ hdr->id_len = 1 /* ID flags */
+ + hdr->sizeof_addr /* Address of filtered object */
+ + hdr->sizeof_size /* Length of filtered object */
+ + 4 /* Filter mask for filtered object */
+ + hdr->sizeof_size; /* Size of de-filtered object in memory */
else
- hdr->id_len = 1 /* ID flags */
- + hdr->sizeof_addr /* Address of object */
- + hdr->sizeof_size; /* Length of object */
+ hdr->id_len = 1 /* ID flags */
+ + hdr->sizeof_addr /* Address of object */
+ + hdr->sizeof_size; /* Length of object */
break;
- default: /* Use the requested size for the heap ID */
+ default: /* Use the requested size for the heap ID */
/* Check boundaries */
- if(cparam->id_len < (1 + hdr->heap_off_size + hdr->heap_len_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF, "ID length not large enough to hold object IDs")
- else if(cparam->id_len > H5HF_MAX_ID_LEN)
- HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF, "ID length too large to store tiny object lengths")
+ if (cparam->id_len < (1 + hdr->heap_off_size + hdr->heap_len_size))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF,
+ "ID length not large enough to hold object IDs")
+ else if (cparam->id_len > H5HF_MAX_ID_LEN)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF,
+ "ID length too large to store tiny object lengths")
/* Use the requested size for the heap ID */
hdr->id_len = cparam->id_len;
@@ -484,35 +471,36 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
/* Second phase of header final initialization */
/* (needs ID and filter lengths set up) */
- if(H5HF_hdr_finish_init_phase2(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "can't finish phase #2 of header final initialization")
+ if (H5HF_hdr_finish_init_phase2(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF,
+ "can't finish phase #2 of header final initialization")
/* Extra checking for possible gap between max. direct block size minus
* overhead and "huge" object size */
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- if((cparam->managed.max_direct_size - dblock_overhead) < cparam->max_man_size)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not large enough to hold all managed blocks")
+ if ((cparam->managed.max_direct_size - dblock_overhead) < cparam->max_man_size)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF,
+ "max. direct block size not large enough to hold all managed blocks")
/* Allocate space for the header on disk */
- if(HADDR_UNDEF == (hdr->heap_addr = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, dxpl_id, (hsize_t)hdr->heap_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header")
+ if (HADDR_UNDEF == (hdr->heap_addr = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, dxpl_id, (hsize_t)hdr->heap_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header")
/* Cache the new fractal heap header */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache")
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache")
/* Set address of heap header to return */
ret_value = hdr->heap_addr;
done:
- if(!H5F_addr_defined(ret_value) && hdr)
- if(H5HF_hdr_free(hdr) < 0)
+ if (!H5F_addr_defined(ret_value) && hdr)
+ if (H5HF_hdr_free(hdr) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, HADDR_UNDEF, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_protect
*
@@ -521,7 +509,6 @@ done:
* Return: Pointer to indirect block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 5 2010
*
*-------------------------------------------------------------------------
@@ -529,9 +516,9 @@ done:
H5HF_hdr_t *
H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
{
- H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */
- H5HF_hdr_t *hdr; /* Fractal heap header */
- H5HF_hdr_t *ret_value; /* Return value */
+ H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */
+ H5HF_hdr_t * hdr; /* Fractal heap header */
+ H5HF_hdr_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -540,11 +527,11 @@ H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
HDassert(H5F_addr_defined(addr));
/* Set up userdata for protect call */
- cache_udata.f = f;
+ cache_udata.f = f;
cache_udata.dxpl_id = dxpl_id;
/* Lock the heap header into memory */
- if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, &cache_udata, rw)))
+ if (NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, &cache_udata, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header")
/* Set the header's address */
@@ -560,7 +547,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_incr
*
@@ -569,7 +555,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -577,7 +562,7 @@ done:
herr_t
H5HF_hdr_incr(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -585,8 +570,8 @@ H5HF_hdr_incr(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Mark header as un-evictable when a block is depending on it */
- if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr) < 0)
+ if (hdr->rc == 0)
+ if (H5AC_pin_protected_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header")
/* Increment reference count on shared header */
@@ -596,7 +581,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_incr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_decr
*
@@ -605,7 +589,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -613,7 +596,7 @@ done:
herr_t
H5HF_hdr_decr(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -625,9 +608,9 @@ H5HF_hdr_decr(H5HF_hdr_t *hdr)
hdr->rc--;
/* Mark header as evictable again when no child blocks depend on it */
- if(hdr->rc == 0) {
+ if (hdr->rc == 0) {
HDassert(hdr->file_rc == 0);
- if(H5AC_unpin_entry(hdr) < 0)
+ if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
} /* end if */
@@ -635,7 +618,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_fuse_incr
*
@@ -644,7 +626,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 1 2006
*
*-------------------------------------------------------------------------
@@ -663,7 +644,6 @@ H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_hdr_fuse_incr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_fuse_decr
*
@@ -672,7 +652,6 @@ H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 1 2006
*
*-------------------------------------------------------------------------
@@ -692,7 +671,6 @@ H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
FUNC_LEAVE_NOAPI(hdr->file_rc)
} /* end H5HF_hdr_fuse_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_dirty
*
@@ -701,7 +679,6 @@ H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -709,7 +686,7 @@ H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
herr_t
H5HF_hdr_dirty(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -717,20 +694,19 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Resize pinned header in cache if I/O filter is present. */
- if(hdr->filter_len > 0) {
- if(H5AC_resize_entry(hdr, (size_t)hdr->heap_size) < 0)
+ if (hdr->filter_len > 0) {
+ if (H5AC_resize_entry(hdr, (size_t)hdr->heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header")
} /* end if */
/* Mark header as dirty in cache */
- if(H5AC_mark_entry_dirty(hdr) < 0)
+ if (H5AC_mark_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_dirty() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_adj_free
*
@@ -739,7 +715,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
@@ -747,7 +722,7 @@ done:
herr_t
H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -761,14 +736,13 @@ H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
hdr->total_man_free += amt;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_adj_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_adjust_heap
*
@@ -777,7 +751,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 10 2006
*
*-------------------------------------------------------------------------
@@ -785,7 +758,7 @@ done:
herr_t
H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -801,14 +774,13 @@ H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
hdr->total_man_free += extra_free;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_adjust_heap() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_inc_alloc
*
@@ -817,7 +789,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 23 2006
*
*-------------------------------------------------------------------------
@@ -839,7 +810,6 @@ H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_hdr_inc_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_start_iter
*
@@ -848,7 +818,6 @@ H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
@@ -856,7 +825,7 @@ H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
herr_t
H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -867,7 +836,7 @@ H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
HDassert(iblock);
/* Set up "next block" iterator at correct location */
- if(H5HF_man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
+ if (H5HF_man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator")
/* Set the offset of the iterator in the heap */
@@ -877,7 +846,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_start_iter() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_reset_iter
*
@@ -886,7 +854,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -894,7 +861,7 @@ done:
herr_t
H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -904,7 +871,7 @@ H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
HDassert(hdr);
/* Reset "next block" iterator */
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if (H5HF_man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Set the offset of the iterator in the heap */
@@ -914,7 +881,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_reset_iter() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_skip_blocks
*
@@ -923,18 +889,17 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 3 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock,
- unsigned start_entry, unsigned nentries)
+H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock, unsigned start_entry,
+ unsigned nentries)
{
- unsigned row, col; /* Row & column of entry */
- hsize_t sect_size; /* Size of section in heap space */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned row, col; /* Row & column of entry */
+ hsize_t sect_size; /* Size of section in heap space */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -946,24 +911,24 @@ H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock,
HDassert(nentries);
/* Compute the span within the heap to skip */
- row = start_entry / hdr->man_dtable.cparam.width;
- col = start_entry % hdr->man_dtable.cparam.width;
+ row = start_entry / hdr->man_dtable.cparam.width;
+ col = start_entry % hdr->man_dtable.cparam.width;
sect_size = H5HF_dtable_span_size(&hdr->man_dtable, row, col, nentries);
HDassert(sect_size > 0);
/* Advance the new block iterator */
- if(H5HF_hdr_inc_iter(hdr, sect_size, nentries) < 0)
+ if (H5HF_hdr_inc_iter(hdr, sect_size, nentries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size")
/* Add 'indirect' section for blocks skipped in this row */
- if(H5HF_sect_indirect_add(hdr, dxpl_id, iblock, start_entry, nentries) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section for indirect block's free space")
+ if (H5HF_sect_indirect_add(hdr, dxpl_id, iblock, start_entry, nentries) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't create indirect section for indirect block's free space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_skip_blocks() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_update_iter
*
@@ -975,7 +940,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 14 2006
*
*-------------------------------------------------------------------------
@@ -983,7 +947,7 @@ done:
herr_t
H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -994,49 +958,49 @@ H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
HDassert(min_dblock_size > 0);
/* Check for creating first indirect block */
- if(hdr->man_dtable.curr_root_rows == 0) {
- if(H5HF_man_iblock_root_create(hdr, dxpl_id, min_dblock_size) < 0)
+ if (hdr->man_dtable.curr_root_rows == 0) {
+ if (H5HF_man_iblock_root_create(hdr, dxpl_id, min_dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to create root indirect block")
} /* end if */
else {
- H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t walked_up, walked_down; /* Condition variables for finding direct block location */
- unsigned next_row; /* Iterator's next block row */
- unsigned next_entry; /* Iterator's next block entry */
- unsigned min_dblock_row; /* Minimum row for direct block size request */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block */
+ hbool_t walked_up, walked_down; /* Condition variables for finding direct block location */
+ unsigned next_row; /* Iterator's next block row */
+ unsigned next_entry; /* Iterator's next block entry */
+ unsigned min_dblock_row; /* Minimum row for direct block size request */
/* Compute min. row for direct block requested */
min_dblock_row = H5HF_dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
/* Initialize block iterator, if necessary */
- if(!H5HF_man_iter_ready(&hdr->next_block)) {
+ if (!H5HF_man_iter_ready(&hdr->next_block)) {
/* Start iterator with previous offset of iterator */
- if(H5HF_man_iter_start_offset(hdr, dxpl_id, &hdr->next_block, hdr->man_iter_off) < 0)
+ if (H5HF_man_iter_start_offset(hdr, dxpl_id, &hdr->next_block, hdr->man_iter_off) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
} /* end if */
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
/* Check for skipping over blocks in the current block */
- if(min_dblock_row > next_row && next_row < iblock->nrows) {
- unsigned min_entry; /* Min entry for direct block requested */
- unsigned skip_entries; /* Number of entries to skip in the current block */
+ if (min_dblock_row > next_row && next_row < iblock->nrows) {
+ unsigned min_entry; /* Min entry for direct block requested */
+ unsigned skip_entries; /* Number of entries to skip in the current block */
/* Compute the number of entries to skip in the current block */
min_entry = min_dblock_row * hdr->man_dtable.cparam.width;
- if(min_dblock_row >= iblock->nrows)
+ if (min_dblock_row >= iblock->nrows)
skip_entries = (iblock->nrows * hdr->man_dtable.cparam.width) - next_entry;
else
skip_entries = min_entry - next_entry;
/* Add skipped direct blocks to heap's free space */
- if(H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, skip_entries) < 0)
+ if (H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, skip_entries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
} /* end if */
@@ -1046,25 +1010,27 @@ H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
/* Check for walking off end of indirect block */
/* (walk up iterator) */
- while(next_row >= iblock->nrows) {
+ while (next_row >= iblock->nrows) {
/* Check for needing to expand root indirect block */
- if(iblock->parent == NULL) {
- if(H5HF_man_iblock_root_double(hdr, dxpl_id, min_dblock_size) < 0)
+ if (iblock->parent == NULL) {
+ if (H5HF_man_iblock_root_double(hdr, dxpl_id, min_dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to double root indirect block")
} /* end if */
else {
/* Move iterator up one level */
- if(H5HF_man_iter_up(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
+ if (H5HF_man_iter_up(&hdr->next_block) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
+ "unable to advance current block iterator location")
/* Increment location of next block at this level */
- if(H5HF_man_iter_next(hdr, &hdr->next_block, 1) < 0)
+ if (H5HF_man_iter_next(hdr, &hdr->next_block, 1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location")
} /* end else */
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to retrieve current block iterator location")
/* Indicate that we walked up */
walked_up = TRUE;
@@ -1072,80 +1038,94 @@ H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
/* Check for walking into child indirect block */
/* (walk down iterator) */
- if(next_row >= hdr->man_dtable.max_direct_rows) {
- unsigned child_nrows; /* Number of rows in new indirect block */
+ if (next_row >= hdr->man_dtable.max_direct_rows) {
+ unsigned child_nrows; /* Number of rows in new indirect block */
HDassert(!H5F_addr_defined(iblock->ents[next_entry].addr));
/* Compute # of rows in next child indirect block to use */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[next_row]);
+ child_nrows =
+ H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[next_row]);
/* Check for skipping over indirect blocks */
/* (that don't have direct blocks large enough to hold direct block size requested) */
- if(hdr->man_dtable.row_block_size[child_nrows - 1] < min_dblock_size) {
- unsigned child_rows_needed; /* Number of rows needed to hold direct block */
- unsigned child_entry; /* Entry of child indirect block */
+ if (hdr->man_dtable.row_block_size[child_nrows - 1] < min_dblock_size) {
+ unsigned child_rows_needed; /* Number of rows needed to hold direct block */
+ unsigned child_entry; /* Entry of child indirect block */
/* Compute # of rows needed in child indirect block */
- child_rows_needed = (H5VM_log2_of2((uint32_t)min_dblock_size) - H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size)) + 2;
+ child_rows_needed = (H5VM_log2_of2((uint32_t)min_dblock_size) -
+ H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size)) +
+ 2;
HDassert(child_rows_needed > child_nrows);
- child_entry = (next_row + (child_rows_needed - child_nrows)) * hdr->man_dtable.cparam.width;
- if(child_entry > (iblock->nrows * hdr->man_dtable.cparam.width))
+ child_entry =
+ (next_row + (child_rows_needed - child_nrows)) * hdr->man_dtable.cparam.width;
+ if (child_entry > (iblock->nrows * hdr->man_dtable.cparam.width))
child_entry = iblock->nrows * hdr->man_dtable.cparam.width;
/* Add skipped indirect blocks to heap's free space */
- if(H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, (child_entry - next_entry)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
+ if (H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, (child_entry - next_entry)) <
+ 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't add skipped blocks to heap's free space")
} /* end if */
else {
- H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- haddr_t new_iblock_addr; /* New indirect block's address */
+ H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ haddr_t new_iblock_addr; /* New indirect block's address */
/* Allocate new indirect block */
- if(H5HF_man_iblock_create(hdr, dxpl_id, iblock, next_entry, child_nrows, child_nrows, &new_iblock_addr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block")
+ if (H5HF_man_iblock_create(hdr, dxpl_id, iblock, next_entry, child_nrows, child_nrows,
+ &new_iblock_addr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL,
+ "can't allocate fractal heap indirect block")
/* Lock new indirect block */
- if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, new_iblock_addr, child_nrows, iblock, next_entry, FALSE, H5AC_WRITE, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
+ if (NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, new_iblock_addr,
+ child_nrows, iblock, next_entry, FALSE,
+ H5AC_WRITE, &did_protect)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
+ "unable to protect fractal heap indirect block")
/* Move iterator down one level (pins indirect block) */
- if(H5HF_man_iter_down(&hdr->next_block, new_iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
+ if (H5HF_man_iter_down(&hdr->next_block, new_iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
+ "unable to advance current block iterator location")
/* Check for skipping over rows and add free section for skipped rows */
- if(min_dblock_size > hdr->man_dtable.cparam.start_block_size) {
- unsigned new_entry; /* Entry of direct block which is large enough */
+ if (min_dblock_size > hdr->man_dtable.cparam.start_block_size) {
+ unsigned new_entry; /* Entry of direct block which is large enough */
/* Compute entry for direct block size requested */
new_entry = hdr->man_dtable.cparam.width * min_dblock_row;
/* Add skipped blocks to heap's free space */
- if(H5HF_hdr_skip_blocks(hdr, dxpl_id, new_iblock, 0, new_entry) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
+ if (H5HF_hdr_skip_blocks(hdr, dxpl_id, new_iblock, 0, new_entry) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't add skipped blocks to heap's free space")
} /* end if */
/* Unprotect child indirect block */
- if(H5HF_man_iblock_unprotect(new_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (H5HF_man_iblock_unprotect(new_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
+ "unable to release fractal heap indirect block")
} /* end else */
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to retrieve current block iterator location")
/* Indicate that we walked down */
walked_down = TRUE;
} /* end if */
- } while(walked_down || walked_up);
+ } while (walked_down || walked_up);
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_update_iter() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_inc_iter
*
@@ -1154,7 +1134,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 23 2006
*
*-------------------------------------------------------------------------
@@ -1162,7 +1141,7 @@ done:
herr_t
H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1173,8 +1152,8 @@ H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
HDassert(nentries);
/* Advance the iterator for the current location within the indirect block */
- if(hdr->next_block.curr)
- if(H5HF_man_iter_next(hdr, &hdr->next_block, nentries) < 0)
+ if (hdr->next_block.curr)
+ if (H5HF_man_iter_next(hdr, &hdr->next_block, nentries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
/* Increment the offset of the iterator in the heap */
@@ -1184,7 +1163,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_inc_iter() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_reverse_iter
*
@@ -1194,7 +1172,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -1202,11 +1179,11 @@ done:
herr_t
H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr)
{
- H5HF_indirect_t *iblock; /* Indirect block where iterator is located */
- unsigned curr_entry; /* Current entry for iterator */
- hbool_t walked_down; /* Loop flag */
- hbool_t walked_up; /* Loop flag */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock; /* Indirect block where iterator is located */
+ unsigned curr_entry; /* Current entry for iterator */
+ hbool_t walked_down; /* Loop flag */
+ hbool_t walked_up; /* Loop flag */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1216,15 +1193,15 @@ H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr)
HDassert(hdr);
/* Initialize block iterator, if necessary */
- if(!H5HF_man_iter_ready(&hdr->next_block))
+ if (!H5HF_man_iter_ready(&hdr->next_block))
/* Start iterator with previous offset of iterator */
- if(H5HF_man_iter_start_offset(hdr, dxpl_id, &hdr->next_block, hdr->man_iter_off) < 0)
+ if (H5HF_man_iter_start_offset(hdr, dxpl_id, &hdr->next_block, hdr->man_iter_off) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
/* Walk backwards through heap, looking for direct block to place iterator after */
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
+ if (H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information")
/* Move current iterator position backwards once */
@@ -1232,30 +1209,31 @@ H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr)
/* Search backwards in the heap address space for direct block to latch onto */
do {
- int tmp_entry; /* Temp. entry for iterator (use signed value to detect errors) */
+ int tmp_entry; /* Temp. entry for iterator (use signed value to detect errors) */
/* Reset loop flags */
walked_down = FALSE;
- walked_up = FALSE;
+ walked_up = FALSE;
/* Walk backwards through entries, until we find one that has a child */
/* (Skip direct block that will be deleted, if we find it) */
tmp_entry = curr_entry;
- while(tmp_entry >= 0 &&
- (H5F_addr_eq(iblock->ents[tmp_entry].addr, dblock_addr) ||
- !H5F_addr_defined(iblock->ents[tmp_entry].addr)))
+ while (tmp_entry >= 0 && (H5F_addr_eq(iblock->ents[tmp_entry].addr, dblock_addr) ||
+ !H5F_addr_defined(iblock->ents[tmp_entry].addr)))
tmp_entry--;
/* Check for no earlier blocks in this indirect block */
- if(tmp_entry < 0) {
+ if (tmp_entry < 0) {
/* Check for parent of current indirect block */
- if(iblock->parent) {
+ if (iblock->parent) {
/* Move iterator to parent of current block */
- if(H5HF_man_iter_up(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to move current block iterator location up")
+ if (H5HF_man_iter_up(&hdr->next_block) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
+ "unable to move current block iterator location up")
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information")
+ if (H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to retrieve current block iterator information")
/* Move current iterator position backwards once */
curr_entry--;
@@ -1268,69 +1246,75 @@ H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr)
hdr->man_iter_off = 0;
/* Reset 'next block' iterator */
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if (H5HF_man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
} /* end else */
- } /* end if */
+ } /* end if */
else {
- unsigned row; /* Row for entry */
+ unsigned row; /* Row for entry */
curr_entry = tmp_entry;
/* Check if entry is for a direct block */
row = curr_entry / hdr->man_dtable.cparam.width;
- if(row < hdr->man_dtable.max_direct_rows) {
+ if (row < hdr->man_dtable.max_direct_rows) {
/* Increment entry to empty location */
curr_entry++;
/* Set the current location of the iterator to next entry after the existing direct block */
- if(H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
+ if (H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
/* Update iterator offset */
hdr->man_iter_off = iblock->block_off;
hdr->man_iter_off += hdr->man_dtable.row_block_off[curr_entry / hdr->man_dtable.cparam.width];
- hdr->man_iter_off += hdr->man_dtable.row_block_size[curr_entry / hdr->man_dtable.cparam.width] * (curr_entry % hdr->man_dtable.cparam.width);
+ hdr->man_iter_off +=
+ hdr->man_dtable.row_block_size[curr_entry / hdr->man_dtable.cparam.width] *
+ (curr_entry % hdr->man_dtable.cparam.width);
} /* end if */
else {
- H5HF_indirect_t *child_iblock; /* Pointer to child indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- unsigned child_nrows; /* # of rows in child block */
+ H5HF_indirect_t *child_iblock; /* Pointer to child indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ unsigned child_nrows; /* # of rows in child block */
/* Compute # of rows in next child indirect block to use */
child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[row]);
/* Lock child indirect block */
- if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock->ents[curr_entry].addr, child_nrows, iblock, curr_entry, FALSE, H5AC_WRITE, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
+ if (NULL == (child_iblock = H5HF_man_iblock_protect(
+ hdr, dxpl_id, iblock->ents[curr_entry].addr, child_nrows, iblock, curr_entry,
+ FALSE, H5AC_WRITE, &did_protect)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
+ "unable to protect fractal heap indirect block")
/* Set the current location of the iterator */
- if(H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
+ if (H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
/* Walk down into child indirect block (pins child block) */
- if(H5HF_man_iter_down(&hdr->next_block, child_iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
+ if (H5HF_man_iter_down(&hdr->next_block, child_iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
+ "unable to advance current block iterator location")
/* Update iterator location */
- iblock = child_iblock;
+ iblock = child_iblock;
curr_entry = (child_iblock->nrows * hdr->man_dtable.cparam.width) - 1;
/* Unprotect child indirect block */
- if(H5HF_man_iblock_unprotect(child_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (H5HF_man_iblock_unprotect(child_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
+ "unable to release fractal heap indirect block")
/* Note that we walked down */
walked_down = TRUE;
} /* end else */
- } /* end else */
- } while(walked_down || walked_up);
+ } /* end else */
+ } while (walked_down || walked_up);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_reverse_iter() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_empty
*
@@ -1339,7 +1323,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 17 2006
*
*-------------------------------------------------------------------------
@@ -1347,7 +1330,7 @@ done:
herr_t
H5HF_hdr_empty(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1355,13 +1338,13 @@ H5HF_hdr_empty(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Reset block iterator, if necessary */
- if(H5HF_man_iter_ready(&hdr->next_block)) {
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if (H5HF_man_iter_ready(&hdr->next_block)) {
+ if (H5HF_man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
} /* end if */
/* Shrink managed heap size */
- hdr->man_size = 0;
+ hdr->man_size = 0;
hdr->man_alloc_size = 0;
/* Reset the 'next block' iterator location */
@@ -1371,14 +1354,13 @@ H5HF_hdr_empty(H5HF_hdr_t *hdr)
hdr->total_man_free = 0;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_empty() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_free
*
@@ -1387,7 +1369,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -1395,7 +1376,7 @@ done:
herr_t
H5HF_hdr_free(H5HF_hdr_t *hdr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1405,12 +1386,12 @@ H5HF_hdr_free(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Free the block size lookup table for the doubling table */
- if(H5HF_dtable_dest(&hdr->man_dtable) < 0)
+ if (H5HF_dtable_dest(&hdr->man_dtable) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table")
/* Release any I/O pipeline filter information */
- if(hdr->pline.nused)
- if(H5O_msg_reset(H5O_PLINE_ID, &(hdr->pline)) < 0)
+ if (hdr->pline.nused)
+ if (H5O_msg_reset(H5O_PLINE_ID, &(hdr->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to reset I/O pipeline message")
/* Free the shared info itself */
@@ -1420,7 +1401,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_hdr_delete
*
@@ -1429,7 +1409,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 5 2007
*
*-------------------------------------------------------------------------
@@ -1437,8 +1416,8 @@ done:
herr_t
H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap header */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1449,61 +1428,63 @@ H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(!hdr->file_rc);
#ifndef NDEBUG
-{
- unsigned hdr_status = 0; /* Heap header's status in the metadata cache */
+ {
+ unsigned hdr_status = 0; /* Heap header's status in the metadata cache */
- /* Check the heap header's status in the metadata cache */
- if(H5AC_get_entry_status(hdr->f, hdr->heap_addr, &hdr_status) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header")
+ /* Check the heap header's status in the metadata cache */
+ if (H5AC_get_entry_status(hdr->f, hdr->heap_addr, &hdr_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header")
- /* Sanity checks on heap header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
-} /* end block */
+ /* Sanity checks on heap header */
+ HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ } /* end block */
#endif /* NDEBUG */
/* Check for free space manager for heap */
/* (must occur before attempting to delete the heap, so indirect blocks
* will get unpinned)
*/
- if(H5F_addr_defined(hdr->fs_addr)) {
+ if (H5F_addr_defined(hdr->fs_addr))
/* Delete free space manager for heap */
- if(H5HF_space_delete(hdr, dxpl_id) < 0)
+ if (H5HF_space_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap free space manager")
- } /* end if */
/* Check for root direct/indirect block */
- if(H5F_addr_defined(hdr->man_dtable.table_addr)) {
- if(hdr->man_dtable.curr_root_rows == 0) {
- hsize_t dblock_size; /* Size of direct block */
+ if (H5F_addr_defined(hdr->man_dtable.table_addr)) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
+ hsize_t dblock_size; /* Size of direct block */
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
dblock_size = (hsize_t)hdr->pline_root_direct_size;
/* Reset the header's pipeline information */
- hdr->pline_root_direct_size = 0;
+ hdr->pline_root_direct_size = 0;
hdr->pline_root_direct_filter_mask = 0;
} /* end else */
else
dblock_size = (hsize_t)hdr->man_dtable.cparam.start_block_size;
/* Delete root direct block */
- if(H5HF_man_dblock_delete(hdr->f, dxpl_id, hdr->man_dtable.table_addr, dblock_size) < 0)
+ if (H5HF_man_dblock_delete(hdr->f, dxpl_id, hdr->man_dtable.table_addr, dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root direct block")
} /* end if */
else {
/* Delete root indirect block */
- if(H5HF_man_iblock_delete(hdr, dxpl_id, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL, 0) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root indirect block")
+ if (H5HF_man_iblock_delete(hdr, dxpl_id, hdr->man_dtable.table_addr,
+ hdr->man_dtable.curr_root_rows, NULL, 0) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to release fractal heap root indirect block")
} /* end else */
- } /* end if */
+ } /* end if */
/* Check for 'huge' objects in heap */
- if(H5F_addr_defined(hdr->huge_bt2_addr)) {
+ if (H5F_addr_defined(hdr->huge_bt2_addr)) {
/* Delete huge objects in heap and their tracker */
- if(H5HF_huge_delete(hdr, dxpl_id) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap 'huge' objects and tracker")
+ if (H5HF_huge_delete(hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to release fractal heap 'huge' objects and tracker")
} /* end if */
/* Indicate that the heap header should be deleted & file space freed */
@@ -1511,9 +1492,8 @@ H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
done:
/* Unprotect the header with appropriate flags */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, cache_flags) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_delete() */
-
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index d6392ee..3519e22 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFhuge.c
* Aug 7 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for "huge" objects in fractal heap
*
@@ -26,39 +26,34 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
/* v2 B-tree creation macros */
-#define H5HF_HUGE_BT2_NODE_SIZE 512
-#define H5HF_HUGE_BT2_SPLIT_PERC 100
-#define H5HF_HUGE_BT2_MERGE_PERC 40
-
+#define H5HF_HUGE_BT2_NODE_SIZE 512
+#define H5HF_HUGE_BT2_SPLIT_PERC 100
+#define H5HF_HUGE_BT2_MERGE_PERC 40
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -68,25 +63,21 @@ static herr_t H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id);
/* Local 'huge' object support routines */
static hsize_t H5HF_huge_new_id(H5HF_hdr_t *hdr);
-static herr_t H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id,
- const uint8_t *id, hbool_t is_read, H5HF_operator_t op, void *op_data);
-
+static herr_t H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, hbool_t is_read,
+ H5HF_operator_t op, void *op_data);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_bt2_create
*
@@ -95,7 +86,6 @@ static herr_t H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -103,8 +93,8 @@ static herr_t H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id,
static herr_t
H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -120,53 +110,53 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
* difficult to write. "Waste" an extra byte or for small heaps (where
* the 'huge_id_size' is < 'sizeof_size' in order to make this easier -QAK)
*/
- if(hdr->huge_ids_direct) {
- if(hdr->filter_len > 0) {
- bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
- + hdr->sizeof_size /* Length of object */
- + 4 /* Filter mask for filtered object */
- + hdr->sizeof_size); /* Size of de-filtered object in memory */
- bt2_cparam.cls = H5HF_HUGE_BT2_FILT_DIR;
+ if (hdr->huge_ids_direct) {
+ if (hdr->filter_len > 0) {
+ bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
+ + hdr->sizeof_size /* Length of object */
+ + 4 /* Filter mask for filtered object */
+ + hdr->sizeof_size); /* Size of de-filtered object in memory */
+ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_DIR;
} /* end if */
else {
- bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
- + hdr->sizeof_size); /* Length of object */
- bt2_cparam.cls = H5HF_HUGE_BT2_DIR;
+ bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
+ + hdr->sizeof_size); /* Length of object */
+ bt2_cparam.cls = H5HF_HUGE_BT2_DIR;
} /* end else */
- } /* end if */
+ } /* end if */
else {
- if(hdr->filter_len > 0) {
- bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of filtered object */
- + hdr->sizeof_size /* Length of filtered object */
- + 4 /* Filter mask for filtered object */
- + hdr->sizeof_size /* Size of de-filtered object in memory */
- + hdr->sizeof_size); /* Unique ID for object */
- bt2_cparam.cls = H5HF_HUGE_BT2_FILT_INDIR;
+ if (hdr->filter_len > 0) {
+ bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of filtered object */
+ + hdr->sizeof_size /* Length of filtered object */
+ + 4 /* Filter mask for filtered object */
+ + hdr->sizeof_size /* Size of de-filtered object in memory */
+ + hdr->sizeof_size); /* Unique ID for object */
+ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_INDIR;
} /* end if */
else {
- bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
- + hdr->sizeof_size /* Length of object */
- + hdr->sizeof_size); /* Unique ID for object */
- bt2_cparam.cls = H5HF_HUGE_BT2_INDIR;
+ bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
+ + hdr->sizeof_size /* Length of object */
+ + hdr->sizeof_size); /* Unique ID for object */
+ bt2_cparam.cls = H5HF_HUGE_BT2_INDIR;
} /* end else */
- } /* end else */
- bt2_cparam.node_size = (size_t)H5HF_HUGE_BT2_NODE_SIZE;
+ } /* end else */
+ bt2_cparam.node_size = (size_t)H5HF_HUGE_BT2_NODE_SIZE;
bt2_cparam.split_percent = H5HF_HUGE_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5HF_HUGE_BT2_MERGE_PERC;
/* Create v2 B-tree for tracking 'huge' objects */
- if(NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam, hdr->f)))
+ if (NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
/* Retrieve the v2 B-tree's address in the file */
- if(H5B2_get_addr(hdr->huge_bt2, &hdr->huge_bt2_addr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get v2 B-tree address for tracking 'huge' heap objects")
+ if (H5B2_get_addr(hdr->huge_bt2, &hdr->huge_bt2_addr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "can't get v2 B-tree address for tracking 'huge' heap objects")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_bt2_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_init
*
@@ -175,7 +165,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -196,12 +185,8 @@ H5HF_huge_init(H5HF_hdr_t *hdr)
* the file in the heap ID (which will speed up accessing it) and we don't
* have any I/O pipeline filters.
*/
-#ifdef QAK
-HDfprintf(stderr, "%s: hdr->id_len = %u\n", "H5HF_huge_init", (unsigned)hdr->id_len);
-HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr->filter_len);
-#endif /* QAK */
- if(hdr->filter_len > 0) {
- if((hdr->id_len - 1) >= (unsigned)(hdr->sizeof_addr + hdr->sizeof_size + 4 + hdr->sizeof_size)) {
+ if (hdr->filter_len > 0) {
+ if ((hdr->id_len - 1) >= (unsigned)(hdr->sizeof_addr + hdr->sizeof_size + 4 + hdr->sizeof_size)) {
/* Indicate that v2 B-tree doesn't have to be used to locate object */
hdr->huge_ids_direct = TRUE;
@@ -213,7 +198,7 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
hdr->huge_ids_direct = FALSE;
} /* end if */
else {
- if((hdr->sizeof_addr + hdr->sizeof_size) <= (hdr->id_len - 1)) {
+ if ((hdr->sizeof_addr + hdr->sizeof_size) <= (hdr->id_len - 1)) {
/* Indicate that v2 B-tree doesn't have to be used to locate object */
hdr->huge_ids_direct = TRUE;
@@ -224,23 +209,22 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
/* Indicate that v2 B-tree must be used to locate object */
hdr->huge_ids_direct = FALSE;
} /* end else */
- if(!hdr->huge_ids_direct) {
+ if (!hdr->huge_ids_direct) {
/* Set the size and maximum value of 'huge' object ID */
- if((hdr->id_len - 1) < sizeof(hsize_t)) {
+ if ((hdr->id_len - 1) < sizeof(hsize_t)) {
hdr->huge_id_size = (uint8_t)(hdr->id_len - 1);
- hdr->huge_max_id = ((hsize_t)1 << (hdr->huge_id_size * 8)) - 1;
+ hdr->huge_max_id = ((hsize_t)1 << (hdr->huge_id_size * 8)) - 1;
} /*end if */
else {
hdr->huge_id_size = sizeof(hsize_t);
- hdr->huge_max_id = HSIZET_MAX;
+ hdr->huge_max_id = HSIZET_MAX;
} /* end else */
- } /* end if */
+ } /* end if */
hdr->huge_bt2 = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_huge_init() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_new_id
*
@@ -250,7 +234,6 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 15 2006
*
*-------------------------------------------------------------------------
@@ -258,8 +241,8 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
static hsize_t
H5HF_huge_new_id(H5HF_hdr_t *hdr)
{
- hsize_t new_id; /* New object's ID */
- hsize_t ret_value; /* Return value */
+ hsize_t new_id; /* New object's ID */
+ hsize_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -269,7 +252,7 @@ H5HF_huge_new_id(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Check for wrapping around 'huge' object ID space */
- if(hdr->huge_ids_wrapped)
+ if (hdr->huge_ids_wrapped)
/* Fail for now - eventually should iterate through v2 B-tree, looking for available ID */
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, 0, "wrapping 'huge' object IDs not supported yet")
else {
@@ -278,7 +261,7 @@ H5HF_huge_new_id(H5HF_hdr_t *hdr)
new_id = ++hdr->huge_next_id;
/* Check for wrapping 'huge' object IDs around */
- if(hdr->huge_next_id == hdr->huge_max_id)
+ if (hdr->huge_next_id == hdr->huge_max_id)
hdr->huge_ids_wrapped = TRUE;
} /* end else */
@@ -289,7 +272,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_new_id() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_insert
*
@@ -298,25 +280,23 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, void *obj,
- void *_id)
+H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, void *obj, void *_id)
{
- uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
- haddr_t obj_addr; /* Address of object in the file */
- void *write_buf; /* Pointer to buffer to write */
- size_t write_size; /* Size of [possibly filtered] object written to file */
- unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
- herr_t ret_value = SUCCEED; /* Return value */
+ uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
+ haddr_t obj_addr; /* Address of object in the file */
+ void * write_buf; /* Pointer to buffer to write */
+ size_t write_size; /* Size of [possibly filtered] object written to file */
+ unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
-HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
+ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
#endif /* QAK */
/*
@@ -328,81 +308,77 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
HDassert(id);
/* Check if the v2 B-tree for tracking 'huge' heap objects has been created yet */
- if(!H5F_addr_defined(hdr->huge_bt2_addr)) {
+ if (!H5F_addr_defined(hdr->huge_bt2_addr)) {
/* Go create (& open) v2 B-tree */
- if(H5HF_huge_bt2_create(hdr, dxpl_id) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
+ if (H5HF_huge_bt2_create(hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL,
+ "can't create v2 B-tree for tracking 'huge' heap objects")
} /* end if */
else {
/* Check if v2 B-tree is open yet */
- if(NULL == hdr->huge_bt2) {
+ if (NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
- } /* end else */
+ } /* end else */
HDassert(hdr->huge_bt2);
/* Check for I/O pipeline filter on heap */
- if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
- size_t nbytes; /* Number of bytes used */
+ if (hdr->filter_len > 0) {
+ H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ size_t nbytes; /* Number of bytes used */
/* Allocate buffer to perform I/O filtering on */
write_size = obj_size;
- if(NULL == (write_buf = H5MM_malloc(write_size)))
+ if (NULL == (write_buf = H5MM_malloc(write_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer")
HDmemcpy(write_buf, obj, write_size);
/* Push direct block data through I/O filter pipeline */
nbytes = write_size;
- if(H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_NO_EDC,
- filter_cb, &nbytes, &write_size, &write_buf) < 0)
+ if (H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &write_size,
+ &write_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed")
-#ifdef QAK
-HDfprintf(stderr, "%s: nbytes = %Zu, write_size = %Zu, write_buf = %p\n", FUNC, nbytes, write_size, write_buf);
-HDfprintf(stderr, "%s: obj_size = %Zu, obj = %p\n", FUNC, obj_size, obj);
-#endif /* QAK */
/* Update size of object on disk */
write_size = nbytes;
} /* end if */
else {
- write_buf = obj;
+ write_buf = obj;
write_size = obj_size;
} /* end else */
/* Allocate space in the file for storing the 'huge' object */
- if(HADDR_UNDEF == (obj_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, dxpl_id, (hsize_t)write_size)))
+ if (HADDR_UNDEF == (obj_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, dxpl_id, (hsize_t)write_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap huge object")
/* Write the object's data to disk */
- if(H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, write_size, dxpl_id, write_buf) < 0)
+ if (H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, write_size, dxpl_id, write_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed")
/* Release buffer for writing, if we had one */
- if(write_buf != obj) {
+ if (write_buf != obj) {
HDassert(hdr->filter_len > 0);
H5MM_xfree(write_buf);
} /* end if */
/* Perform different actions for directly & indirectly accessed 'huge' objects */
- if(hdr->huge_ids_direct) {
- if(hdr->filter_len > 0) {
- H5HF_huge_bt2_filt_dir_rec_t obj_rec; /* Record for tracking object */
+ if (hdr->huge_ids_direct) {
+ if (hdr->filter_len > 0) {
+ H5HF_huge_bt2_filt_dir_rec_t obj_rec; /* Record for tracking object */
/* Initialize record for tracking object in v2 B-tree */
- obj_rec.addr = obj_addr;
- obj_rec.len = write_size;
+ obj_rec.addr = obj_addr;
+ obj_rec.len = write_size;
obj_rec.filter_mask = filter_mask;
- obj_rec.obj_size = obj_size;
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_rec = {%a, %Hu, %x, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len, obj_rec.filter_mask, obj_rec.obj_size);
-#endif /* QAK */
+ obj_rec.obj_size = obj_size;
/* Insert record for object in v2 B-tree */
- if(H5B2_insert(hdr->huge_bt2, dxpl_id, &obj_rec) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "couldn't insert object tracking record in v2 B-tree")
+ if (H5B2_insert(hdr->huge_bt2, dxpl_id, &obj_rec) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL,
+ "couldn't insert object tracking record in v2 B-tree")
/* Encode ID for user */
*id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE;
@@ -412,45 +388,40 @@ HDfprintf(stderr, "%s: obj_rec = {%a, %Hu, %x, %Hu}\n", FUNC, obj_rec.addr, obj_
H5F_ENCODE_LENGTH(hdr->f, id, (hsize_t)obj_size);
} /* end if */
else {
- H5HF_huge_bt2_dir_rec_t obj_rec; /* Record for tracking object */
+ H5HF_huge_bt2_dir_rec_t obj_rec; /* Record for tracking object */
/* Initialize record for tracking object in v2 B-tree */
obj_rec.addr = obj_addr;
- obj_rec.len = write_size;
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_rec = {%a, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len);
-#endif /* QAK */
+ obj_rec.len = write_size;
/* Insert record for object in v2 B-tree */
- if(H5B2_insert(hdr->huge_bt2, dxpl_id, &obj_rec) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "couldn't insert object tracking record in v2 B-tree")
+ if (H5B2_insert(hdr->huge_bt2, dxpl_id, &obj_rec) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL,
+ "couldn't insert object tracking record in v2 B-tree")
/* Encode ID for user */
*id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE;
H5F_addr_encode(hdr->f, &id, obj_addr);
H5F_ENCODE_LENGTH(hdr->f, id, (hsize_t)write_size);
} /* end if */
- } /* end if */
+ } /* end if */
else {
- H5HF_huge_bt2_filt_indir_rec_t filt_indir_rec; /* Record for tracking filtered object */
- H5HF_huge_bt2_indir_rec_t indir_rec; /* Record for tracking non-filtered object */
- void *ins_rec; /* Pointer to record to insert */
- hsize_t new_id; /* New ID for object */
+ H5HF_huge_bt2_filt_indir_rec_t filt_indir_rec; /* Record for tracking filtered object */
+ H5HF_huge_bt2_indir_rec_t indir_rec; /* Record for tracking non-filtered object */
+ void * ins_rec; /* Pointer to record to insert */
+ hsize_t new_id; /* New ID for object */
/* Get new ID for object */
- if(0 == (new_id = H5HF_huge_new_id(hdr)))
+ if (0 == (new_id = H5HF_huge_new_id(hdr)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't generate new ID for object")
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Initialize record for object in v2 B-tree */
- filt_indir_rec.addr = obj_addr;
- filt_indir_rec.len = write_size;
+ filt_indir_rec.addr = obj_addr;
+ filt_indir_rec.len = write_size;
filt_indir_rec.filter_mask = filter_mask;
- filt_indir_rec.obj_size = obj_size;
- filt_indir_rec.id = new_id;
-#ifdef QAK
-HDfprintf(stderr, "%s: filt_indir_rec = {%a, %Hu, %x, %Hu, %Hu}\n", FUNC, filt_indir_rec.addr, filt_indir_rec.len, filt_indir_rec.filter_mask, filt_indir_rec.obj_size, filt_indir_rec.id);
-#endif /* QAK */
+ filt_indir_rec.obj_size = obj_size;
+ filt_indir_rec.id = new_id;
/* Set pointer to record to insert */
ins_rec = &filt_indir_rec;
@@ -458,18 +429,15 @@ HDfprintf(stderr, "%s: filt_indir_rec = {%a, %Hu, %x, %Hu, %Hu}\n", FUNC, filt_i
else {
/* Initialize record for object in v2 B-tree */
indir_rec.addr = obj_addr;
- indir_rec.len = write_size;
- indir_rec.id = new_id;
-#ifdef QAK
-HDfprintf(stderr, "%s: indir_rec = {%a, %Hu, %Hu}\n", FUNC, indir_rec.addr, indir_rec.len, indir_rec.id);
-#endif /* QAK */
+ indir_rec.len = write_size;
+ indir_rec.id = new_id;
/* Set pointer to record to insert */
ins_rec = &indir_rec;
} /* end else */
/* Insert record for tracking object in v2 B-tree */
- if(H5B2_insert(hdr->huge_bt2, dxpl_id, ins_rec) < 0)
+ if (H5B2_insert(hdr->huge_bt2, dxpl_id, ins_rec) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "couldn't insert object tracking record in v2 B-tree")
/* Encode ID for user */
@@ -482,14 +450,13 @@ HDfprintf(stderr, "%s: indir_rec = {%a, %Hu, %Hu}\n", FUNC, indir_rec.addr, indi
hdr->huge_nobjs++;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_get_obj_len
*
@@ -498,16 +465,14 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- size_t *obj_len_p)
+H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, size_t *obj_len_p)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -523,8 +488,8 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
id++;
/* Check if 'huge' object ID encodes address & length directly */
- if(hdr->huge_ids_direct) {
- if(hdr->filter_len > 0) {
+ if (hdr->huge_ids_direct) {
+ if (hdr->filter_len > 0) {
/* Skip over filtered object info */
id += hdr->sizeof_addr + hdr->sizeof_size + 4;
@@ -538,16 +503,17 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Retrieve the object's length */
H5F_DECODE_LENGTH(hdr->f, id, *obj_len_p);
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check if v2 B-tree is open yet */
- if(NULL == hdr->huge_bt2) {
+ if (NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
H5HF_huge_bt2_filt_indir_rec_t found_rec; /* Record found from tracking object */
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
@@ -555,7 +521,8 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Look up object in v2 B-tree */
- if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_found, &found_rec) != TRUE)
+ if (H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_found, &found_rec) !=
+ TRUE)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
/* Retrieve the object's length */
@@ -569,19 +536,18 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Look up object in v2 B-tree */
- if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
+ if (H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
/* Retrieve the object's length */
*obj_len_p = (size_t)found_rec.len;
} /* end else */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_get_obj_len() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_op_real
*
@@ -590,20 +556,19 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- hbool_t is_read, H5HF_operator_t op, void *op_data)
+H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, hbool_t is_read, H5HF_operator_t op,
+ void *op_data)
{
- void *read_buf = NULL; /* Pointer to buffer for reading */
- haddr_t obj_addr; /* Object's address in the file */
- size_t obj_size = 0; /* Object's size in the file */
- unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * read_buf = NULL; /* Pointer to buffer for reading */
+ haddr_t obj_addr; /* Object's address in the file */
+ size_t obj_size = 0; /* Object's size in the file */
+ unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -618,13 +583,13 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
id++;
/* Check for 'huge' object ID that encodes address & length directly */
- if(hdr->huge_ids_direct) {
+ if (hdr->huge_ids_direct) {
/* Retrieve the object's address and length (common) */
H5F_addr_decode(hdr->f, &id, &obj_addr);
H5F_DECODE_LENGTH(hdr->f, id, obj_size);
/* Retrieve extra information needed for filtered objects */
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
UINT32DECODE(id, filter_mask);
} /* end if */
else {
@@ -632,13 +597,14 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
- if(NULL == hdr->huge_bt2) {
+ if (NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
H5HF_huge_bt2_filt_indir_rec_t found_rec; /* Record found from tracking object */
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
@@ -646,7 +612,8 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Look up object in v2 B-tree */
- if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_found, &found_rec) != TRUE)
+ if (H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_found, &found_rec) !=
+ TRUE)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
/* Retrieve the object's address & length */
@@ -662,18 +629,18 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Look up object in v2 B-tree */
- if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
+ if (H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
/* Retrieve the object's address & length */
obj_addr = found_rec.addr;
H5_CHECKED_ASSIGN(obj_size, size_t, found_rec.len, hsize_t);
} /* end else */
- } /* end else */
+ } /* end else */
/* Set up buffer for reading */
- if(hdr->filter_len > 0 || !is_read) {
- if(NULL == (read_buf = H5MM_malloc((size_t)obj_size)))
+ if (hdr->filter_len > 0 || !is_read) {
+ if (NULL == (read_buf = H5MM_malloc((size_t)obj_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer")
} /* end if */
else
@@ -681,49 +648,49 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Read the object's (possibly filtered) data from the file */
/* (reads directly into application's buffer if no filters are present) */
- if(H5F_block_read(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, (size_t)obj_size, dxpl_id, read_buf) < 0)
+ if (H5F_block_read(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, (size_t)obj_size, dxpl_id, read_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, FAIL, "can't read 'huge' object's data from the file")
/* Check for I/O pipeline filter on heap */
- if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
- size_t read_size; /* Object's size in the file */
- size_t nbytes; /* Number of bytes used */
+ if (hdr->filter_len > 0) {
+ H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ size_t read_size; /* Object's size in the file */
+ size_t nbytes; /* Number of bytes used */
/* De-filter the object */
read_size = nbytes = obj_size;
- if(H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &read_size, &read_buf) < 0)
+ if (H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes,
+ &read_size, &read_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "input filter failed")
obj_size = nbytes;
} /* end if */
/* Perform correct operation on buffer read in */
- if(is_read) {
+ if (is_read) {
/* Copy object to user's buffer if there's filters on heap data */
/* (if there's no filters, the object was read directly into the user's buffer) */
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
HDmemcpy(op_data, read_buf, (size_t)obj_size);
} /* end if */
else {
/* Call the user's 'op' callback */
- if(op(read_buf, (size_t)obj_size, op_data) < 0) {
+ if (op(read_buf, (size_t)obj_size, op_data) < 0) {
/* Release buffer */
read_buf = H5MM_xfree(read_buf);
/* Indicate error */
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Release the buffer for reading */
- if(read_buf && read_buf != op_data)
+ if (read_buf && read_buf != op_data)
read_buf = H5MM_xfree(read_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_op_real() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_write
*
@@ -737,18 +704,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 21 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- const void *obj)
+H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, const void *obj)
{
- haddr_t obj_addr; /* Object's address in the file */
- size_t obj_size; /* Object's size in the file */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t obj_addr; /* Object's address in the file */
+ size_t obj_size; /* Object's size in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -760,14 +725,14 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(obj);
/* Check for filters on the heap */
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'huge' object with filters not supported yet")
/* Skip over the flag byte */
id++;
/* Check for 'huge' object ID that encodes address & length directly */
- if(hdr->huge_ids_direct) {
+ if (hdr->huge_ids_direct) {
/* Retrieve the object's address and length (common) */
H5F_addr_decode(hdr->f, &id, &obj_addr);
H5F_DECODE_LENGTH(hdr->f, id, obj_size);
@@ -780,17 +745,18 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
- if(NULL == hdr->huge_bt2) {
+ if (NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
/* Get ID for looking up 'huge' object in v2 B-tree */
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Look up object in v2 B-tree */
- if(H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
+ if (H5B2_find(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_found, &found_rec) != TRUE)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
/* Retrieve the object's address & length */
@@ -800,14 +766,13 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Write the object's data to the file */
/* (writes directly from application's buffer) */
- if(H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, obj_size, dxpl_id, obj) < 0)
+ if (H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, obj_size, dxpl_id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_write() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_read
*
@@ -816,7 +781,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
@@ -824,7 +788,7 @@ done:
herr_t
H5HF_huge_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -836,14 +800,13 @@ H5HF_huge_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
HDassert(obj);
/* Call the internal 'op' routine */
- if(H5HF_huge_op_real(hdr, dxpl_id, id, TRUE, NULL, obj) < 0)
+ if (H5HF_huge_op_real(hdr, dxpl_id, id, TRUE, NULL, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_read() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_op
*
@@ -852,16 +815,14 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- H5HF_operator_t op, void *op_data)
+H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -873,14 +834,13 @@ H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(op);
/* Call the internal 'op' routine routine */
- if(H5HF_huge_op_real(hdr, dxpl_id, id, FALSE, op, op_data) < 0)
+ if (H5HF_huge_op_real(hdr, dxpl_id, id, FALSE, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_op() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_remove
*
@@ -889,7 +849,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -897,8 +856,8 @@ done:
herr_t
H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
{
- H5HF_huge_remove_ud_t udata; /* User callback data for v2 B-tree remove call */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t udata; /* User callback data for v2 B-tree remove call */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -910,23 +869,24 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
HDassert(id);
/* Check if v2 B-tree is open yet */
- if(NULL == hdr->huge_bt2) {
+ if (NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
+ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
/* Skip over the flag byte */
id++;
/* Set up the common callback info */
- udata.hdr = hdr;
+ udata.hdr = hdr;
udata.dxpl_id = dxpl_id;
/* Check for 'huge' object ID that encodes address & length directly */
- if(hdr->huge_ids_direct) {
- if(hdr->filter_len > 0) {
- H5HF_huge_bt2_filt_dir_rec_t search_rec; /* Record for searching for object */
+ if (hdr->huge_ids_direct) {
+ if (hdr->filter_len > 0) {
+ H5HF_huge_bt2_filt_dir_rec_t search_rec; /* Record for searching for object */
/* Retrieve the object's address and length */
/* (used as key in v2 B-tree record) */
@@ -935,11 +895,11 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
- if(H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_dir_remove, &udata) < 0)
+ if (H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_dir_remove, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree")
} /* end if */
else {
- H5HF_huge_bt2_dir_rec_t search_rec; /* Record for searching for object */
+ H5HF_huge_bt2_dir_rec_t search_rec; /* Record for searching for object */
/* Retrieve the object's address and length */
/* (used as key in v2 B-tree record) */
@@ -948,48 +908,47 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
- if(H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_dir_remove, &udata) < 0)
+ if (H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_dir_remove, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree")
} /* end else */
- } /* end if */
+ } /* end if */
else {
- if(hdr->filter_len > 0) {
- H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
+ if (hdr->filter_len > 0) {
+ H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
- if(H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_remove, &udata) < 0)
+ if (H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_filt_indir_remove, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree")
} /* end if */
else {
- H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
+ H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
- if(H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_remove, &udata) < 0)
+ if (H5B2_remove(hdr->huge_bt2, dxpl_id, &search_rec, H5HF_huge_bt2_indir_remove, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree")
} /* end else */
- } /* end else */
+ } /* end else */
/* Update statistics about heap */
hdr->huge_size -= udata.obj_len;
hdr->huge_nobjs--;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_term
*
@@ -998,7 +957,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -1006,7 +964,7 @@ done:
herr_t
H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1016,12 +974,12 @@ H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr);
/* Check if v2 B-tree index is open */
- if(hdr->huge_bt2) {
+ if (hdr->huge_bt2) {
/* Sanity check */
HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Close v2 B-tree index */
- if(H5B2_close(hdr->huge_bt2, dxpl_id) < 0)
+ if (H5B2_close(hdr->huge_bt2, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree")
hdr->huge_bt2 = NULL;
} /* end if */
@@ -1029,22 +987,22 @@ H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
/* Check if there are no more 'huge' objects in the heap and delete the
* v2 B-tree that tracks them, if so
*/
- if(H5F_addr_defined(hdr->huge_bt2_addr) && hdr->huge_nobjs == 0) {
+ if (H5F_addr_defined(hdr->huge_bt2_addr) && hdr->huge_nobjs == 0) {
/* Sanity check */
HDassert(hdr->huge_size == 0);
/* Delete the v2 B-tree */
/* (any v2 B-tree class will work here) */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, NULL) < 0)
+ if (H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, NULL) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
/* Reset the information about 'huge' objects in the file */
- hdr->huge_bt2_addr = HADDR_UNDEF;
- hdr->huge_next_id = 0;
+ hdr->huge_bt2_addr = HADDR_UNDEF;
+ hdr->huge_next_id = 0;
hdr->huge_ids_wrapped = FALSE;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
@@ -1052,7 +1010,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_term() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_huge_delete
*
@@ -1062,7 +1019,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -1070,9 +1026,9 @@ done:
herr_t
H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- H5HF_huge_remove_ud_t udata; /* User callback data for v2 B-tree remove call */
- H5B2_remove_t op; /* Callback for v2 B-tree removal */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_huge_remove_ud_t udata; /* User callback data for v2 B-tree remove call */
+ H5B2_remove_t op; /* Callback for v2 B-tree removal */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1085,28 +1041,27 @@ H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr->huge_size);
/* Set up the callback info */
- udata.hdr = hdr;
+ udata.hdr = hdr;
udata.dxpl_id = dxpl_id;
/* Set the v2 B-tree callback operator */
- if(hdr->huge_ids_direct) {
- if(hdr->filter_len > 0)
+ if (hdr->huge_ids_direct) {
+ if (hdr->filter_len > 0)
op = H5HF_huge_bt2_filt_dir_remove;
else
op = H5HF_huge_bt2_dir_remove;
} /* end if */
else {
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
op = H5HF_huge_bt2_filt_indir_remove;
else
op = H5HF_huge_bt2_indir_remove;
} /* end else */
/* Delete the v2 B-tree */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, op, &udata) < 0)
+ if (H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, op, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_delete() */
-
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 622d24d..80b9f7a 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFiblock.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Indirect block routines for fractal heaps.
*
@@ -26,33 +26,30 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -61,7 +58,6 @@ static herr_t H5HF_iblock_unpin(H5HF_indirect_t *iblock);
static herr_t H5HF_man_iblock_root_halve(H5HF_indirect_t *root_iblock, hid_t dxpl_id);
static herr_t H5HF_man_iblock_root_revert(H5HF_indirect_t *root_iblock, hid_t dxpl_id);
-
/*********************/
/* Package Variables */
/*********************/
@@ -78,18 +74,14 @@ H5FL_SEQ_DEFINE(H5HF_indirect_filt_ent_t);
/* Declare a free list to manage the H5HF_indirect_t * sequence information */
H5FL_SEQ_DEFINE(H5HF_indirect_ptr_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_pin
*
@@ -98,7 +90,6 @@ H5FL_SEQ_DEFINE(H5HF_indirect_ptr_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
@@ -106,7 +97,7 @@ H5FL_SEQ_DEFINE(H5HF_indirect_ptr_t);
static herr_t
H5HF_iblock_pin(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -114,22 +105,22 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark block as un-evictable */
- if(H5AC_pin_protected_entry(iblock) < 0)
+ if (H5AC_pin_protected_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block")
/* If this indirect block has a parent, update it's child iblock pointer */
- if(iblock->parent) {
- H5HF_indirect_t *par_iblock = iblock->parent; /* Parent indirect block */
- unsigned indir_idx; /* Index in parent's child iblock pointer array */
+ if (iblock->parent) {
+ H5HF_indirect_t *par_iblock = iblock->parent; /* Parent indirect block */
+ unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >= (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width));
+ HDassert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
- indir_idx = iblock->par_entry - (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width);
+ indir_idx = iblock->par_entry -
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Set pointer to pinned indirect block in parent */
HDassert(par_iblock->child_iblocks[indir_idx] == NULL);
@@ -137,12 +128,12 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
} /* end if */
else {
/* Check for pinning the root indirect block */
- if(iblock->block_off == 0) {
+ if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively pinning root indirect block */
HDassert(0 == (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED));
/* Check if we should set the root iblock pointer */
- if(0 == iblock->hdr->root_iblock_flags) {
+ if (0 == iblock->hdr->root_iblock_flags) {
HDassert(NULL == iblock->hdr->root_iblock);
iblock->hdr->root_iblock = iblock;
} /* end if */
@@ -150,13 +141,12 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
/* Indicate that the root indirect block is pinned */
iblock->hdr->root_iblock_flags |= H5HF_ROOT_IBLOCK_PINNED;
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_pin() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_unpin
*
@@ -165,7 +155,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
@@ -173,7 +162,7 @@ done:
static herr_t
H5HF_iblock_unpin(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -181,18 +170,18 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
HDassert(iblock);
/* If this indirect block has a parent, reset it's child iblock pointer */
- if(iblock->parent) {
- H5HF_indirect_t *par_iblock = iblock->parent; /* Parent indirect block */
- unsigned indir_idx; /* Index in parent's child iblock pointer array */
+ if (iblock->parent) {
+ H5HF_indirect_t *par_iblock = iblock->parent; /* Parent indirect block */
+ unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >= (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width));
+ HDassert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
- indir_idx = iblock->par_entry - (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width);
+ indir_idx = iblock->par_entry -
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Reset pointer to pinned child indirect block in parent */
HDassert(par_iblock->child_iblocks[indir_idx]);
@@ -200,12 +189,12 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
} /* end if */
else {
/* Check for root indirect block */
- if(iblock->block_off == 0) {
+ if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unpinning root indirect block */
HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED);
/* Check if we should reset the root iblock pointer */
- if(H5HF_ROOT_IBLOCK_PINNED == iblock->hdr->root_iblock_flags) {
+ if (H5HF_ROOT_IBLOCK_PINNED == iblock->hdr->root_iblock_flags) {
HDassert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -213,17 +202,16 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
/* Indicate that the root indirect block is unpinned */
iblock->hdr->root_iblock_flags &= ~(H5HF_ROOT_IBLOCK_PINNED);
} /* end if */
- } /* end else */
+ } /* end else */
/* Mark block as evictable again */
- if(H5AC_unpin_entry(iblock) < 0)
+ if (H5AC_unpin_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_unpin() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_incr
*
@@ -232,7 +220,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -240,7 +227,7 @@ done:
herr_t
H5HF_iblock_incr(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -249,8 +236,8 @@ H5HF_iblock_incr(H5HF_indirect_t *iblock)
HDassert(iblock->block_off == 0 || iblock->parent);
/* Mark block as un-evictable when a child block is depending on it */
- if(iblock->rc == 0)
- if(H5HF_iblock_pin(iblock) < 0)
+ if (iblock->rc == 0)
+ if (H5HF_iblock_pin(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block")
/* Increment reference count on shared indirect block */
@@ -260,7 +247,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_incr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_decr
*
@@ -269,7 +255,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -277,7 +262,7 @@ done:
herr_t
H5HF_iblock_decr(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -288,57 +273,57 @@ H5HF_iblock_decr(H5HF_indirect_t *iblock)
iblock->rc--;
/* Mark block as evictable again when no child blocks depend on it */
- if(iblock->rc == 0) {
- H5HF_hdr_t *hdr; /* Fractal heap header */
- haddr_t iblock_addr; /* Address of fractal heap */
- hbool_t expunge_iblock = FALSE; /* Whether to expunge indirect block from heap */
+ if (iblock->rc == 0) {
+ H5HF_hdr_t *hdr; /* Fractal heap header */
+ haddr_t iblock_addr; /* Address of fractal heap */
+ hbool_t expunge_iblock = FALSE; /* Whether to expunge indirect block from heap */
/* Set up convenience variables */
- hdr = iblock->hdr;
+ hdr = iblock->hdr;
iblock_addr = iblock->addr;
- if(iblock->nchildren == 0) {
+ if (iblock->nchildren == 0) {
/* Check for deleting root indirect block (and no root direct block) */
- if(iblock->block_off == 0 && hdr->man_dtable.curr_root_rows > 0) {
+ if (iblock->block_off == 0 && hdr->man_dtable.curr_root_rows > 0) {
/* Reset root pointer information */
hdr->man_dtable.curr_root_rows = 0;
- hdr->man_dtable.table_addr = HADDR_UNDEF;
+ hdr->man_dtable.table_addr = HADDR_UNDEF;
/* Reset header information back to "empty heap" state */
- if(H5HF_hdr_empty(hdr) < 0)
+ if (H5HF_hdr_empty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty")
} /* end if */
/* Detach from parent indirect block */
- if(iblock->parent) {
+ if (iblock->parent) {
/* Detach from parent indirect block */
- if(H5HF_man_iblock_detach(iblock->parent, H5AC_dxpl_id, iblock->par_entry) < 0)
+ if (H5HF_man_iblock_detach(iblock->parent, H5AC_dxpl_id, iblock->par_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block")
- iblock->parent = NULL;
+ iblock->parent = NULL;
iblock->par_entry = 0;
} /* end if */
- /* Mark indirect block for removal from the metadata cache */
- expunge_iblock = TRUE;
+ /* Mark indirect block for removal from the metadata cache */
+ expunge_iblock = TRUE;
} /* end if */
- /* Unpin the indirect block */
- if(H5HF_iblock_unpin(iblock) < 0)
+ /* Unpin the indirect block */
+ if (H5HF_iblock_unpin(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block")
- /* Check for expunging the indirect block from the metadata cache */
- if(expunge_iblock) {
+ /* Check for expunging the indirect block from the metadata cache */
+ if (expunge_iblock) {
/* Evict the indirect block from the metadata cache */
- if(H5AC_expunge_entry(hdr->f, H5AC_dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0)
+ if (H5AC_expunge_entry(hdr->f, H5AC_dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr,
+ H5AC__FREE_FILE_SPACE_FLAG) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove indirect block from cache")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_iblock_dirty
*
@@ -347,7 +332,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -355,7 +339,7 @@ done:
herr_t
H5HF_iblock_dirty(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -363,14 +347,13 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark indirect block as dirty in cache */
- if(H5AC_mark_entry_dirty(iblock) < 0)
+ if (H5AC_mark_entry_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_dirty() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_root_create
*
@@ -379,7 +362,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -387,19 +369,19 @@ done:
herr_t
H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
{
- H5HF_indirect_t *iblock; /* Pointer to indirect block */
- haddr_t iblock_addr; /* Indirect block's address */
- hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
- hbool_t have_direct_block; /* Flag to indicate a direct block already exists */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- unsigned nrows; /* Number of rows for root indirect block */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block */
+ haddr_t iblock_addr; /* Indirect block's address */
+ hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
+ hbool_t have_direct_block; /* Flag to indicate a direct block already exists */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ unsigned nrows; /* Number of rows for root indirect block */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check for allocating entire root indirect block initially */
- if(hdr->man_dtable.cparam.start_root_rows == 0)
+ if (hdr->man_dtable.cparam.start_root_rows == 0)
nrows = hdr->man_dtable.max_root_rows;
else {
unsigned rows_needed; /* Number of rows needed to get to direct block size */
@@ -407,103 +389,111 @@ H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
nrows = hdr->man_dtable.cparam.start_root_rows;
- block_row_off = H5VM_log2_of2((uint32_t)min_dblock_size) - H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size);
- if(block_row_off > 0)
- block_row_off++; /* Account for the pair of initial rows of the initial block size */
+ block_row_off = H5VM_log2_of2((uint32_t)min_dblock_size) -
+ H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size);
+ if (block_row_off > 0)
+ block_row_off++; /* Account for the pair of initial rows of the initial block size */
rows_needed = 1 + block_row_off;
- if(nrows < rows_needed)
+ if (nrows < rows_needed)
nrows = rows_needed;
} /* end else */
/* Allocate root indirect block */
- if(H5HF_man_iblock_create(hdr, dxpl_id, NULL, 0, nrows, hdr->man_dtable.max_root_rows, &iblock_addr) < 0)
+ if (H5HF_man_iblock_create(hdr, dxpl_id, NULL, 0, nrows, hdr->man_dtable.max_root_rows, &iblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block")
/* Move current direct block (used as root) into new indirect block */
/* Lock new indirect block */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, NULL, 0, FALSE, H5AC_WRITE, &did_protect)))
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, NULL, 0, FALSE,
+ H5AC_WRITE, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Check if there's already a direct block as root) */
have_direct_block = H5F_addr_defined(hdr->man_dtable.table_addr);
- if(have_direct_block) {
- H5HF_direct_t *dblock; /* Pointer to direct block to query */
+ if (have_direct_block) {
+ H5HF_direct_t *dblock; /* Pointer to direct block to query */
/* Lock first (root) direct block */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, hdr->man_dtable.table_addr, hdr->man_dtable.cparam.start_block_size, NULL, 0, H5AC_WRITE)))
+ if (NULL ==
+ (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, hdr->man_dtable.table_addr,
+ hdr->man_dtable.cparam.start_block_size, NULL, 0, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
/* Attach direct block to new root indirect block */
- dblock->parent = iblock;
+ dblock->parent = iblock;
dblock->par_entry = 0;
- if(H5HF_man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach root direct block to parent indirect block")
+ if (H5HF_man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL,
+ "can't attach root direct block to parent indirect block")
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Set the pipeline filter information from the header */
- iblock->filt_ents[0].size = hdr->pline_root_direct_size;
+ iblock->filt_ents[0].size = hdr->pline_root_direct_size;
iblock->filt_ents[0].filter_mask = hdr->pline_root_direct_filter_mask;
/* Reset the header's pipeline information */
- hdr->pline_root_direct_size = 0;
+ hdr->pline_root_direct_size = 0;
hdr->pline_root_direct_filter_mask = 0;
} /* end if */
/* Scan free space sections to set any 'parent' pointers to new indirect block */
- if(H5HF_space_create_root(hdr, dxpl_id, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set free space section info to new root indirect block")
+ if (H5HF_space_create_root(hdr, dxpl_id, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL,
+ "can't set free space section info to new root indirect block")
/* Unlock first (previously the root) direct block */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, dblock,
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
dblock = NULL;
} /* end if */
/* Start iterator at correct location */
- if(H5HF_hdr_start_iter(hdr, iblock, (hsize_t)(have_direct_block ? hdr->man_dtable.cparam.start_block_size : 0), have_direct_block) < 0)
+ if (H5HF_hdr_start_iter(hdr, iblock,
+ (hsize_t)(have_direct_block ? hdr->man_dtable.cparam.start_block_size : 0),
+ have_direct_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator")
/* Check for skipping over direct blocks, in order to get to large enough block */
- if(min_dblock_size > hdr->man_dtable.cparam.start_block_size) {
+ if (min_dblock_size > hdr->man_dtable.cparam.start_block_size) {
/* Add skipped blocks to heap's free space */
- if(H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, have_direct_block,
- ((nrows - 1) * hdr->man_dtable.cparam.width) - have_direct_block) < 0)
+ if (H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, have_direct_block,
+ ((nrows - 1) * hdr->man_dtable.cparam.width) - have_direct_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
} /* end if */
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if (H5HF_iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Unprotect root indirect block (it's pinned by the iterator though) */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__DIRTIED_FLAG, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__DIRTIED_FLAG, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;
/* Point heap header at new indirect block */
hdr->man_dtable.curr_root_rows = nrows;
- hdr->man_dtable.table_addr = iblock_addr;
+ hdr->man_dtable.table_addr = iblock_addr;
/* Compute free space in direct blocks referenced from entries in root indirect block */
acc_dblock_free = 0;
- for(u = 0; u < nrows; u++)
+ for (u = 0; u < nrows; u++)
acc_dblock_free += hdr->man_dtable.row_tot_dblock_free[u] * hdr->man_dtable.cparam.width;
/* Account for potential initial direct block */
- if(have_direct_block)
+ if (have_direct_block)
acc_dblock_free -= hdr->man_dtable.row_tot_dblock_free[0];
/* Extend heap to cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, hdr->man_dtable.row_block_off[nrows], (hssize_t)acc_dblock_free) < 0)
+ if (H5HF_hdr_adjust_heap(hdr, hdr->man_dtable.row_block_off[nrows], (hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_root_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_root_double
*
@@ -512,7 +502,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -520,25 +509,25 @@ done:
herr_t
H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
{
- H5HF_indirect_t *iblock; /* Pointer to root indirect block */
- haddr_t new_addr; /* New address of indirect block */
- hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
- hsize_t next_size; /* The previous value of the "next size" for the new block iterator */
- hsize_t old_iblock_size; /* Old size of indirect block */
- unsigned next_row; /* The next row to allocate block in */
- unsigned next_entry; /* The previous value of the "next entry" for the new block iterator */
- unsigned new_next_entry = 0;/* The new value of the "next entry" for the new block iterator */
- unsigned min_nrows = 0; /* Min. # of direct rows */
- unsigned old_nrows; /* Old # of rows */
- unsigned new_nrows; /* New # of rows */
- hbool_t skip_direct_rows = FALSE; /* Whether we are skipping direct rows */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock; /* Pointer to root indirect block */
+ haddr_t new_addr; /* New address of indirect block */
+ hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
+ hsize_t next_size; /* The previous value of the "next size" for the new block iterator */
+ hsize_t old_iblock_size; /* Old size of indirect block */
+ unsigned next_row; /* The next row to allocate block in */
+ unsigned next_entry; /* The previous value of the "next entry" for the new block iterator */
+ unsigned new_next_entry = 0; /* The new value of the "next entry" for the new block iterator */
+ unsigned min_nrows = 0; /* Min. # of direct rows */
+ unsigned old_nrows; /* Old # of rows */
+ unsigned new_nrows; /* New # of rows */
+ hbool_t skip_direct_rows = FALSE; /* Whether we are skipping direct rows */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get "new block" iterator information */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if (H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
next_size = hdr->man_dtable.row_block_size[next_row];
@@ -550,7 +539,7 @@ H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
old_nrows = iblock->nrows;
/* Check for skipping over direct block rows */
- if(iblock->nrows < hdr->man_dtable.max_direct_rows && min_dblock_size > next_size) {
+ if (iblock->nrows < hdr->man_dtable.max_direct_rows && min_dblock_size > next_size) {
/* Sanity check */
HDassert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
@@ -569,128 +558,125 @@ H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
/* Check if the indirect block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!H5F_IS_TMP_ADDR(hdr->f, iblock->addr)) {
-/* Currently, the old block data is "thrown away" after the space is reallocated,
-* to avoid data copy in H5MF_realloc() call by just free'ing the space and
-* allocating new space.
-*
-* This also keeps the file smaller, by freeing the space and then
-* allocating new space, instead of vice versa (in H5MF_realloc).
-*
-* QAK - 3/14/2006
-*/
+ if (!H5F_IS_TMP_ADDR(hdr->f, iblock->addr))
/* Free previous indirect block disk space */
- if(H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, iblock->addr, (hsize_t)iblock->size) < 0)
+ if (H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, iblock->addr, (hsize_t)iblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block file space")
- } /* end if */
/* Compute size of buffer needed for new indirect block */
- iblock->nrows = new_nrows;
+ iblock->nrows = new_nrows;
old_iblock_size = iblock->size;
- iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
+ iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* Allocate [temporary] space for the new indirect block on disk */
- if(H5F_USE_TMP_SPACE(hdr->f)) {
- if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ if (H5F_USE_TMP_SPACE(hdr->f)) {
+ if (HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
} /* end if */
else {
- if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ if (HADDR_UNDEF ==
+ (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
} /* end else */
/* Resize pinned indirect block in the cache, if its changed size */
- if(old_iblock_size != iblock->size) {
- if(H5AC_resize_entry(iblock, (size_t)iblock->size) < 0)
+ if (old_iblock_size != iblock->size) {
+ if (H5AC_resize_entry(iblock, (size_t)iblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block")
} /* end if */
/* Move object in cache, if it actually was relocated */
- if(H5F_addr_ne(iblock->addr, new_addr)) {
- if(H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0)
+ if (H5F_addr_ne(iblock->addr, new_addr)) {
+ if (H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move fractal heap root indirect block")
iblock->addr = new_addr;
} /* end if */
/* Re-allocate child block entry array */
- if(NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents,
+ (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries")
/* Check for skipping over rows and add free section for skipped rows */
- if(skip_direct_rows) {
+ if (skip_direct_rows)
/* Add skipped blocks to heap's free space */
- if(H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, (new_next_entry - next_entry)) < 0)
+ if (H5HF_hdr_skip_blocks(hdr, dxpl_id, iblock, next_entry, (new_next_entry - next_entry)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
- } /* end if */
/* Initialize new direct block entries in rows added */
acc_dblock_free = 0;
- for(u = (old_nrows * hdr->man_dtable.cparam.width); u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
- unsigned row = u / hdr->man_dtable.cparam.width; /* Row for current entry */
+ for (u = (old_nrows * hdr->man_dtable.cparam.width); u < (iblock->nrows * hdr->man_dtable.cparam.width);
+ u++) {
+ unsigned row = u / hdr->man_dtable.cparam.width; /* Row for current entry */
iblock->ents[u].addr = HADDR_UNDEF;
acc_dblock_free += hdr->man_dtable.row_tot_dblock_free[row];
} /* end for */
/* Check for needing to re-allocate filtered entry array */
- if(hdr->filter_len > 0 && old_nrows < hdr->man_dtable.max_direct_rows) {
- unsigned dir_rows; /* Number of direct rows in this indirect block */
+ if (hdr->filter_len > 0 && old_nrows < hdr->man_dtable.max_direct_rows) {
+ unsigned dir_rows; /* Number of direct rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
HDassert(dir_rows > old_nrows);
/* Re-allocate filtered direct block entry array */
- if(NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents, (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents,
+ (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries")
/* Initialize new entries allocated */
- for(u = (old_nrows * hdr->man_dtable.cparam.width); u < (dir_rows * hdr->man_dtable.cparam.width); u++) {
- iblock->filt_ents[u].size = 0;
+ for (u = (old_nrows * hdr->man_dtable.cparam.width); u < (dir_rows * hdr->man_dtable.cparam.width);
+ u++) {
+ iblock->filt_ents[u].size = 0;
iblock->filt_ents[u].filter_mask = 0;
} /* end for */
- } /* end if */
+ } /* end if */
/* Check for needing to re-allocate child iblock pointer array */
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned indir_rows; /* Number of indirect rows in this indirect block */
- unsigned old_indir_rows; /* Previous number of indirect rows in this indirect block */
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned indir_rows; /* Number of indirect rows in this indirect block */
+ unsigned old_indir_rows; /* Previous number of indirect rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
indir_rows = iblock->nrows - hdr->man_dtable.max_direct_rows;
/* Re-allocate child indirect block array */
- if(NULL == (iblock->child_iblocks = H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL ==
+ (iblock->child_iblocks = H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks,
+ (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries")
/* Compute the previous # of indirect rows in this block */
- if(old_nrows < hdr->man_dtable.max_direct_rows)
+ if (old_nrows < hdr->man_dtable.max_direct_rows)
old_indir_rows = 0;
else
old_indir_rows = old_nrows - hdr->man_dtable.max_direct_rows;
/* Initialize new entries allocated */
- for(u = (old_indir_rows * hdr->man_dtable.cparam.width); u < (indir_rows * hdr->man_dtable.cparam.width); u++)
+ for (u = (old_indir_rows * hdr->man_dtable.cparam.width);
+ u < (indir_rows * hdr->man_dtable.cparam.width); u++)
iblock->child_iblocks[u] = NULL;
} /* end if */
/* Mark indirect block as dirty */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if (H5HF_iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Update other shared header info */
hdr->man_dtable.curr_root_rows = new_nrows;
- hdr->man_dtable.table_addr = new_addr;
+ hdr->man_dtable.table_addr = new_addr;
/* Extend heap to cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], (hssize_t)acc_dblock_free) < 0)
+ if (H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1],
+ (hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_root_double() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_root_halve
*
@@ -699,7 +685,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jun 12 2006
*
*-------------------------------------------------------------------------
@@ -707,15 +692,15 @@ done:
static herr_t
H5HF_man_iblock_root_halve(H5HF_indirect_t *iblock, hid_t dxpl_id)
{
- H5HF_hdr_t *hdr = iblock->hdr; /* Pointer to heap header */
- haddr_t new_addr; /* New address of indirect block */
- hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
- hsize_t old_size; /* Old size of indirect block */
- unsigned max_child_row; /* Row for max. child entry */
- unsigned old_nrows; /* Old # of rows */
- unsigned new_nrows; /* New # of rows */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = iblock->hdr; /* Pointer to heap header */
+ haddr_t new_addr; /* New address of indirect block */
+ hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
+ hsize_t old_size; /* Old size of indirect block */
+ unsigned max_child_row; /* Row for max. child entry */
+ unsigned old_nrows; /* Old # of rows */
+ unsigned new_nrows; /* New # of rows */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -732,100 +717,98 @@ H5HF_man_iblock_root_halve(H5HF_indirect_t *iblock, hid_t dxpl_id)
/* Check if the indirect block is NOT currently allocated in temp. file space */
/* (temp. file space does not need to be freed) */
- if(!H5F_IS_TMP_ADDR(hdr->f, iblock->addr)) {
-/* Currently, the old block data is "thrown away" after the space is reallocated,
-* to avoid data copy in H5MF_realloc() call by just free'ing the space and
-* allocating new space.
-*
-* This also keeps the file smaller, by freeing the space and then
-* allocating new space, instead of vice versa (in H5MF_realloc).
-*
-* QAK - 6/12/2006
-*/
+ if (!H5F_IS_TMP_ADDR(hdr->f, iblock->addr))
/* Free previous indirect block disk space */
- if(H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, iblock->addr, (hsize_t)iblock->size) < 0)
+ if (H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, iblock->addr, (hsize_t)iblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block file space")
- } /* end if */
/* Compute free space in rows to delete */
acc_dblock_free = 0;
- for(u = new_nrows; u < iblock->nrows; u++)
+ for (u = new_nrows; u < iblock->nrows; u++)
acc_dblock_free += hdr->man_dtable.row_tot_dblock_free[u] * hdr->man_dtable.cparam.width;
/* Compute size of buffer needed for new indirect block */
- old_nrows = iblock->nrows;
+ old_nrows = iblock->nrows;
iblock->nrows = new_nrows;
- old_size = iblock->size;
- iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
+ old_size = iblock->size;
+ iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* Allocate [temporary] space for the new indirect block on disk */
- if(H5F_USE_TMP_SPACE(hdr->f)) {
- if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ if (H5F_USE_TMP_SPACE(hdr->f)) {
+ if (HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
} /* end if */
else {
- if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ if (HADDR_UNDEF ==
+ (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
} /* end else */
/* Resize pinned indirect block in the cache, if it has changed size */
- if(old_size != iblock->size) {
- if(H5AC_resize_entry(iblock, (size_t)iblock->size) < 0)
+ if (old_size != iblock->size) {
+ if (H5AC_resize_entry(iblock, (size_t)iblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block")
} /* end if */
/* Move object in cache, if it actually was relocated */
- if(H5F_addr_ne(iblock->addr, new_addr)) {
- if(H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0)
+ if (H5F_addr_ne(iblock->addr, new_addr)) {
+ if (H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSPLIT, FAIL, "unable to move fractal heap root indirect block")
iblock->addr = new_addr;
} /* end if */
/* Re-allocate child block entry array */
- if(NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents,
+ (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries")
/* Check for needing to re-allocate filtered entry array */
- if(hdr->filter_len > 0 && new_nrows < hdr->man_dtable.max_direct_rows) {
+ if (hdr->filter_len > 0 && new_nrows < hdr->man_dtable.max_direct_rows) {
/* Re-allocate filtered direct block entry array */
- if(NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
+ if (NULL ==
+ (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents,
+ (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries")
} /* end if */
/* Check for needing to re-allocate child iblock pointer array */
- if(old_nrows > hdr->man_dtable.max_direct_rows) {
+ if (old_nrows > hdr->man_dtable.max_direct_rows) {
/* Check for shrinking away child iblock pointer array */
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned indir_rows; /* Number of indirect rows in this indirect block */
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned indir_rows; /* Number of indirect rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
indir_rows = iblock->nrows - hdr->man_dtable.max_direct_rows;
/* Re-allocate child indirect block array */
- if(NULL == (iblock->child_iblocks = H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries")
+ if (NULL == (iblock->child_iblocks =
+ H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks,
+ (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL,
+ "memory allocation failed for filtered direct entries")
} /* end if */
else
- iblock->child_iblocks = (H5HF_indirect_ptr_t *)H5FL_SEQ_FREE(H5HF_indirect_ptr_t, iblock->child_iblocks);
+ iblock->child_iblocks =
+ (H5HF_indirect_ptr_t *)H5FL_SEQ_FREE(H5HF_indirect_ptr_t, iblock->child_iblocks);
} /* end if */
/* Mark indirect block as dirty */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if (H5HF_iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Update other shared header info */
hdr->man_dtable.curr_root_rows = new_nrows;
- hdr->man_dtable.table_addr = new_addr;
+ hdr->man_dtable.table_addr = new_addr;
/* Shrink heap to only cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], -(hssize_t)acc_dblock_free) < 0)
+ if (H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1],
+ -(hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce space to cover root direct block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_root_halve() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_root_revert
*
@@ -837,7 +820,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -845,11 +827,11 @@ done:
static herr_t
H5HF_man_iblock_root_revert(H5HF_indirect_t *root_iblock, hid_t dxpl_id)
{
- H5HF_hdr_t *hdr; /* Pointer to heap's header */
+ H5HF_hdr_t * hdr; /* Pointer to heap's header */
H5HF_direct_t *dblock = NULL; /* Pointer to new root indirect block */
- haddr_t dblock_addr; /* Direct block's address in the file */
- size_t dblock_size; /* Direct block's size */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t dblock_addr; /* Direct block's address in the file */
+ size_t dblock_size; /* Direct block's size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -859,54 +841,55 @@ H5HF_man_iblock_root_revert(H5HF_indirect_t *root_iblock, hid_t dxpl_id)
HDassert(root_iblock);
/* Set up local convenience variables */
- hdr = root_iblock->hdr;
+ hdr = root_iblock->hdr;
dblock_addr = root_iblock->ents[0].addr;
dblock_size = hdr->man_dtable.cparam.start_block_size;
/* Get pointer to last direct block */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, root_iblock, 0, H5AC_WRITE)))
+ if (NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, root_iblock, 0,
+ H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
HDassert(dblock->parent == root_iblock);
HDassert(dblock->par_entry == 0);
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0) {
+ if (hdr->filter_len > 0) {
/* Set the header's pipeline information from the indirect block */
- hdr->pline_root_direct_size = root_iblock->filt_ents[0].size;
+ hdr->pline_root_direct_size = root_iblock->filt_ents[0].size;
hdr->pline_root_direct_filter_mask = root_iblock->filt_ents[0].filter_mask;
} /* end if */
/* Detach direct block from parent */
- if(H5HF_man_iblock_detach(dblock->parent, dxpl_id, 0) < 0)
+ if (H5HF_man_iblock_detach(dblock->parent, dxpl_id, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach direct block from parent indirect block")
- dblock->parent = NULL;
+ dblock->parent = NULL;
dblock->par_entry = 0;
/* Point root at direct block */
hdr->man_dtable.curr_root_rows = 0;
- hdr->man_dtable.table_addr = dblock_addr;
+ hdr->man_dtable.table_addr = dblock_addr;
/* Reset 'next block' iterator */
- if(H5HF_hdr_reset_iter(hdr, (hsize_t)dblock_size) < 0)
+ if (H5HF_hdr_reset_iter(hdr, (hsize_t)dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Extend heap to just cover first direct block */
- if(H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
+ if (H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size,
+ (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
/* Scan free space sections to reset any 'parent' pointers */
- if(H5HF_space_revert_root(hdr, dxpl_id) < 0)
+ if (H5HF_space_revert_root(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESET, FAIL, "can't reset free space section info")
-
done:
- if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ if (dblock &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_root_revert() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_alloc_row
*
@@ -918,7 +901,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -926,11 +908,11 @@ done:
herr_t
H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t **sec_node)
{
- H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
+ H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */
H5HF_free_section_t *old_sec_node = *sec_node; /* Pointer to old indirect section node */
- unsigned dblock_entry; /* Entry for direct block */
- hbool_t iblock_held = FALSE; /* Flag to indicate that indirect block is held */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned dblock_entry; /* Entry for direct block */
+ hbool_t iblock_held = FALSE; /* Flag to indicate that indirect block is held */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -942,39 +924,39 @@ H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t **
HDassert(old_sec_node->u.row.row < hdr->man_dtable.max_direct_rows);
/* Check for serialized section */
- if(old_sec_node->sect_info.state == H5FS_SECT_SERIALIZED) {
+ if (old_sec_node->sect_info.state == H5FS_SECT_SERIALIZED) {
/* Revive indirect section */
- if(H5HF_sect_row_revive(hdr, dxpl_id, old_sec_node) < 0)
+ if (H5HF_sect_row_revive(hdr, dxpl_id, old_sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
} /* end if */
/* Get a pointer to the indirect block covering the section */
- if(NULL == (iblock = H5HF_sect_row_get_iblock(old_sec_node)))
+ if (NULL == (iblock = H5HF_sect_row_get_iblock(old_sec_node)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve indirect block for row section")
/* Hold indirect block in memory, until direct block can point to it */
- if(H5HF_iblock_incr(iblock) < 0)
+ if (H5HF_iblock_incr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
iblock_held = TRUE;
/* Reduce (& possibly re-add) 'row' section */
- if(H5HF_sect_row_reduce(hdr, dxpl_id, old_sec_node, &dblock_entry) < 0)
+ if (H5HF_sect_row_reduce(hdr, dxpl_id, old_sec_node, &dblock_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce row section node")
/* Create direct block & single section */
- if(H5HF_man_dblock_create(dxpl_id, hdr, iblock, dblock_entry, NULL, sec_node) < 0)
+ if (H5HF_man_dblock_create(dxpl_id, hdr, iblock, dblock_entry, NULL, sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block")
done:
/* Release hold on indirect block */
- if(iblock_held)
- if(H5HF_iblock_decr(iblock) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
+ if (iblock_held)
+ if (H5HF_iblock_decr(iblock) < 0)
+ HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared indirect block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_alloc_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_create
*
@@ -983,18 +965,17 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblock,
- unsigned par_entry, unsigned nrows, unsigned max_rows, haddr_t *addr_p)
+H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblock, unsigned par_entry,
+ unsigned nrows, unsigned max_rows, haddr_t *addr_p)
{
- H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1008,107 +989,115 @@ H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblo
/*
* Allocate file and memory data structures.
*/
- if(NULL == (iblock = H5FL_MALLOC(H5HF_indirect_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap indirect block")
+ if (NULL == (iblock = H5FL_MALLOC(H5HF_indirect_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for fractal heap indirect block")
/* Reset the metadata cache info for the heap header */
HDmemset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
iblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
+ if (H5HF_hdr_incr(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
/* Set info for direct block */
- iblock->rc = 0;
- iblock->nrows = nrows;
+ iblock->rc = 0;
+ iblock->nrows = nrows;
iblock->max_rows = max_rows;
/* Compute size of buffer needed for indirect block */
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* Allocate child block entry array */
- if(NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries")
+ if (NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t,
+ (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries")
/* Initialize indirect block entry tables */
- for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++)
+ for (u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++)
iblock->ents[u].addr = HADDR_UNDEF;
/* Check for I/O filters to apply to this heap */
- if(hdr->filter_len > 0) {
- unsigned dir_rows; /* Number of direct rows in this indirect block */
+ if (hdr->filter_len > 0) {
+ unsigned dir_rows; /* Number of direct rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
/* Allocate & initialize indirect block filtered entry array */
- if(NULL == (iblock->filt_ents = H5FL_SEQ_CALLOC(H5HF_indirect_filt_ent_t, (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->filt_ents = H5FL_SEQ_CALLOC(H5HF_indirect_filt_ent_t,
+ (size_t)(dir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries")
} /* end if */
else
iblock->filt_ents = NULL;
/* Check if we have any indirect block children */
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned indir_rows; /* Number of indirect rows in this indirect block */
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned indir_rows; /* Number of indirect rows in this indirect block */
/* Compute the number of indirect rows for this indirect block */
indir_rows = iblock->nrows - hdr->man_dtable.max_direct_rows;
/* Allocate & initialize child indirect block pointer array */
- if(NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC(H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
+ if (NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC(
+ H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries")
} /* end if */
else
iblock->child_iblocks = NULL;
/* Allocate [temporary] space for the indirect block on disk */
- if(H5F_USE_TMP_SPACE(hdr->f)) {
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if (H5F_USE_TMP_SPACE(hdr->f)) {
+ if (HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap indirect block")
} /* end if */
else {
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if (HADDR_UNDEF ==
+ (*addr_p = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "file allocation failed for fractal heap indirect block")
} /* end else */
iblock->addr = *addr_p;
/* Attach to parent indirect block, if there is one */
- iblock->parent = par_iblock;
+ iblock->parent = par_iblock;
iblock->par_entry = par_entry;
- if(iblock->parent) {
+ if (iblock->parent) {
/* Attach new block to parent */
- if(H5HF_man_iblock_attach(iblock->parent, par_entry, *addr_p) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach indirect block to parent indirect block")
+ if (H5HF_man_iblock_attach(iblock->parent, par_entry, *addr_p) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL,
+ "can't attach indirect block to parent indirect block")
/* Compute the indirect block's offset in the heap's address space */
/* (based on parent's block offset) */
iblock->block_off = par_iblock->block_off;
iblock->block_off += hdr->man_dtable.row_block_off[par_entry / hdr->man_dtable.cparam.width];
- iblock->block_off += hdr->man_dtable.row_block_size[par_entry / hdr->man_dtable.cparam.width] * (par_entry % hdr->man_dtable.cparam.width);
+ iblock->block_off += hdr->man_dtable.row_block_size[par_entry / hdr->man_dtable.cparam.width] *
+ (par_entry % hdr->man_dtable.cparam.width);
} /* end if */
else
- iblock->block_off = 0; /* Must be the root indirect block... */
+ iblock->block_off = 0; /* Must be the root indirect block... */
/* Update indirect block's statistics */
iblock->nchildren = 0;
iblock->max_child = 0;
/* Cache the new indirect block */
- if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache")
+ if (H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache")
done:
- if(ret_value < 0)
- if(iblock)
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if (ret_value < 0)
+ if (iblock)
+ if (H5HF_man_iblock_dest(iblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_protect
*
@@ -1117,20 +1106,19 @@ done:
* Return: Pointer to indirect block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
*/
H5HF_indirect_t *
-H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
- unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry,
- hbool_t must_protect, H5AC_protect_t rw, hbool_t *did_protect)
+H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, unsigned iblock_nrows,
+ H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
+ H5AC_protect_t rw, hbool_t *did_protect)
{
- H5HF_parent_t par_info; /* Parent info for loading block */
- H5HF_indirect_t *iblock = NULL; /* Indirect block from cache */
- hbool_t should_protect = FALSE; /* Whether we should protect the indirect block or not */
- H5HF_indirect_t *ret_value; /* Return value */
+ H5HF_parent_t par_info; /* Parent info for loading block */
+ H5HF_indirect_t *iblock = NULL; /* Indirect block from cache */
+ hbool_t should_protect = FALSE; /* Whether we should protect the indirect block or not */
+ H5HF_indirect_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1143,31 +1131,29 @@ H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
HDassert(did_protect);
/* Check if we are allowed to use existing pinned iblock pointer */
- if(!must_protect) {
+ if (!must_protect) {
/* Check for this block already being pinned */
- if(par_iblock) {
- unsigned indir_idx; /* Index in parent's child iblock pointer array */
+ if (par_iblock) {
+ unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
- HDassert(par_entry >= (hdr->man_dtable.max_direct_rows
- * hdr->man_dtable.cparam.width));
+ HDassert(par_entry >= (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
- indir_idx = par_entry - (hdr->man_dtable.max_direct_rows
- * hdr->man_dtable.cparam.width);
+ indir_idx = par_entry - (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width);
/* Check for pointer to pinned indirect block in parent */
- if(par_iblock->child_iblocks[indir_idx])
+ if (par_iblock->child_iblocks[indir_idx])
iblock = par_iblock->child_iblocks[indir_idx];
else
should_protect = TRUE;
} /* end if */
else {
/* Check for root indirect block */
- if(H5F_addr_eq(iblock_addr, hdr->man_dtable.table_addr)) {
+ if (H5F_addr_eq(iblock_addr, hdr->man_dtable.table_addr)) {
/* Check for valid pointer to pinned indirect block in root */
- if(H5HF_ROOT_IBLOCK_PINNED == hdr->root_iblock_flags) {
+ if (H5HF_ROOT_IBLOCK_PINNED == hdr->root_iblock_flags) {
/* Sanity check */
HDassert(NULL != hdr->root_iblock);
@@ -1180,40 +1166,41 @@ H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
should_protect = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
else
should_protect = TRUE;
} /* end else */
- } /* end if */
+ } /* end if */
/* Check for protecting indirect block */
- if(must_protect || should_protect) {
+ if (must_protect || should_protect) {
H5HF_iblock_cache_ud_t cache_udata; /* User-data for callback */
/* Set up parent info */
- par_info.hdr = hdr;
+ par_info.hdr = hdr;
par_info.iblock = par_iblock;
- par_info.entry = par_entry;
+ par_info.entry = par_entry;
/* Set up user data for protect call */
- cache_udata.f = hdr->f;
+ cache_udata.f = hdr->f;
cache_udata.par_info = &par_info;
- cache_udata.nrows = &iblock_nrows;
+ cache_udata.nrows = &iblock_nrows;
/* Protect the indirect block */
- if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, &cache_udata, rw)))
+ if (NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr,
+ &cache_udata, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap indirect block")
/* Set the indirect block's address */
iblock->addr = iblock_addr;
/* Check for root indirect block */
- if(iblock->block_off == 0) {
+ if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively protecting root indirect block */
HDassert(0 == (hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED));
/* Check if we should set the root iblock pointer */
- if(0 == hdr->root_iblock_flags) {
+ if (0 == hdr->root_iblock_flags) {
HDassert(NULL == hdr->root_iblock);
hdr->root_iblock = iblock;
} /* end if */
@@ -1236,7 +1223,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_unprotect
*
@@ -1245,16 +1231,14 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
- unsigned cache_flags, hbool_t did_protect)
+H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned cache_flags, hbool_t did_protect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1265,14 +1249,14 @@ H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
/* Check if we previously protected this indirect block */
/* (as opposed to using an existing pointer to a pinned child indirect block) */
- if(did_protect) {
+ if (did_protect) {
/* Check for root indirect block */
- if(iblock->block_off == 0) {
+ if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unprotecting root indirect block */
HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED);
/* Check if we should reset the root iblock pointer */
- if(H5HF_ROOT_IBLOCK_PROTECTED == iblock->hdr->root_iblock_flags) {
+ if (H5HF_ROOT_IBLOCK_PROTECTED == iblock->hdr->root_iblock_flags) {
HDassert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -1282,7 +1266,7 @@ H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
} /* end if */
/* Unprotect the indirect block */
- if(H5AC_unprotect(iblock->hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock->addr, iblock, cache_flags) < 0)
+ if (H5AC_unprotect(iblock->hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock->addr, iblock, cache_flags) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
} /* end if */
@@ -1290,7 +1274,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_unprotect() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_attach
*
@@ -1299,7 +1282,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
@@ -1307,7 +1289,7 @@ done:
herr_t
H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1319,15 +1301,15 @@ H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_ad
HDassert(!H5F_addr_defined(iblock->ents[entry].addr));
/* Increment the reference count on this indirect block */
- if(H5HF_iblock_incr(iblock) < 0)
+ if (H5HF_iblock_incr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Point at the child block */
iblock->ents[entry].addr = child_addr;
/* Check for I/O filters on this heap */
- if(iblock->hdr->filter_len > 0) {
- unsigned row; /* Row for entry */
+ if (iblock->hdr->filter_len > 0) {
+ unsigned row; /* Row for entry */
/* Sanity check */
HDassert(iblock->filt_ents);
@@ -1336,26 +1318,25 @@ H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_ad
row = entry / iblock->hdr->man_dtable.cparam.width;
/* If this is a direct block, set its initial size */
- if(row < iblock->hdr->man_dtable.max_direct_rows)
+ if (row < iblock->hdr->man_dtable.max_direct_rows)
iblock->filt_ents[entry].size = iblock->hdr->man_dtable.row_block_size[row];
} /* end if */
/* Check for max. entry used */
- if(entry > iblock->max_child)
+ if (entry > iblock->max_child)
iblock->max_child = entry;
/* Increment the # of child blocks */
iblock->nchildren++;
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if (H5HF_iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_attach() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_detach
*
@@ -1364,7 +1345,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -1372,8 +1352,8 @@ done:
herr_t
H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry)
{
- unsigned row; /* Row for entry */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned row; /* Row for entry */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1390,27 +1370,26 @@ H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry)
row = entry / iblock->hdr->man_dtable.cparam.width;
/* Check for I/O filters on this heap */
- if(iblock->hdr->filter_len > 0) {
+ if (iblock->hdr->filter_len > 0) {
/* Sanity check */
HDassert(iblock->filt_ents);
/* If this is a direct block, reset its initial size */
- if(row < iblock->hdr->man_dtable.max_direct_rows) {
- iblock->filt_ents[entry].size = 0;
+ if (row < iblock->hdr->man_dtable.max_direct_rows) {
+ iblock->filt_ents[entry].size = 0;
iblock->filt_ents[entry].filter_mask = 0;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check for indirect block being detached */
- if(row >= iblock->hdr->man_dtable.max_direct_rows) {
- unsigned indir_idx; /* Index in parent's child iblock pointer array */
+ if (row >= iblock->hdr->man_dtable.max_direct_rows) {
+ unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(iblock->child_iblocks);
/* Compute index in child iblock pointer array */
- indir_idx = entry - (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width);
+ indir_idx = entry - (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Sanity check */
HDassert(iblock->child_iblocks[indir_idx]);
@@ -1427,55 +1406,55 @@ H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry)
iblock->nchildren--;
/* Reduce the max. entry used, if necessary */
- if(entry == iblock->max_child) {
- if(iblock->nchildren > 0)
- while(!H5F_addr_defined(iblock->ents[iblock->max_child].addr))
+ if (entry == iblock->max_child) {
+ if (iblock->nchildren > 0)
+ while (!H5F_addr_defined(iblock->ents[iblock->max_child].addr))
iblock->max_child--;
else
iblock->max_child = 0;
} /* end if */
/* If this is the root indirect block handle some special cases */
- if(iblock->block_off == 0) {
+ if (iblock->block_off == 0) {
/* If the number of children drops to 1, and that child is the first
* direct block in the heap, convert the heap back to using a root
* direct block
*/
- if(iblock->nchildren == 1 && H5F_addr_defined(iblock->ents[0].addr))
- if(H5HF_man_iblock_root_revert(iblock, dxpl_id) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't convert root indirect block back to root direct block")
+ if (iblock->nchildren == 1 && H5F_addr_defined(iblock->ents[0].addr))
+ if (H5HF_man_iblock_root_revert(iblock, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL,
+ "can't convert root indirect block back to root direct block")
/* Check for reducing size of root indirect block */
- if(iblock->nchildren > 0 && iblock->hdr->man_dtable.cparam.start_root_rows != 0
- && entry > iblock->max_child) {
- unsigned max_child_row; /* Row for max. child entry */
+ if (iblock->nchildren > 0 && iblock->hdr->man_dtable.cparam.start_root_rows != 0 &&
+ entry > iblock->max_child) {
+ unsigned max_child_row; /* Row for max. child entry */
/* Compute information needed for determining whether to reduce size of root indirect block */
max_child_row = iblock->max_child / iblock->hdr->man_dtable.cparam.width;
/* Check if the root indirect block should be reduced */
- if(iblock->nrows > 1 && max_child_row <= (iblock->nrows / 2))
- if(H5HF_man_iblock_root_halve(iblock, dxpl_id) < 0)
+ if (iblock->nrows > 1 && max_child_row <= (iblock->nrows / 2))
+ if (H5HF_man_iblock_root_halve(iblock, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce size of root indirect block")
} /* end if */
- } /* end if */
+ } /* end if */
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if (H5HF_iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Decrement the reference count on this indirect block */
/* (should be last, so that potential 'unpin' on this indirect block
* doesn't invalidate the 'iblock' variable)
*/
- if(H5HF_iblock_decr(iblock) < 0)
+ if (H5HF_iblock_decr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_detach() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_entry_addr
*
@@ -1484,7 +1463,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -1506,7 +1484,6 @@ H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *chi
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iblock_entry_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_delete
*
@@ -1519,21 +1496,20 @@ H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *chi
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
- unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry)
+H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, unsigned iblock_nrows,
+ H5HF_indirect_t *par_iblock, unsigned par_entry)
{
- H5HF_indirect_t *iblock; /* Pointer to indirect block */
- unsigned row, col; /* Current row & column in indirect block */
- unsigned entry; /* Current entry in row */
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block */
+ unsigned row, col; /* Current row & column in indirect block */
+ unsigned entry; /* Current entry in row */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1545,62 +1521,67 @@ H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
HDassert(iblock_nrows > 0);
/* Lock indirect block */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, par_iblock, par_entry, TRUE, H5AC_WRITE, &did_protect)))
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, par_iblock,
+ par_entry, TRUE, H5AC_WRITE, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
HDassert(iblock->nchildren > 0);
HDassert(did_protect == TRUE);
/* Iterate over rows in this indirect block */
entry = 0;
- for(row = 0; row < iblock->nrows; row++) {
+ for (row = 0; row < iblock->nrows; row++) {
/* Iterate over entries in this row */
- for(col = 0; col < hdr->man_dtable.cparam.width; col++, entry++) {
+ for (col = 0; col < hdr->man_dtable.cparam.width; col++, entry++) {
/* Check for child entry at this position */
- if(H5F_addr_defined(iblock->ents[entry].addr)) {
- hsize_t row_block_size; /* The size of blocks in this row */
+ if (H5F_addr_defined(iblock->ents[entry].addr)) {
+ hsize_t row_block_size; /* The size of blocks in this row */
/* Get the row's block size */
row_block_size = (hsize_t)hdr->man_dtable.row_block_size[row];
/* Are we in a direct or indirect block row */
- if(row < hdr->man_dtable.max_direct_rows) {
- hsize_t dblock_size; /* Size of direct block on disk */
+ if (row < hdr->man_dtable.max_direct_rows) {
+ hsize_t dblock_size; /* Size of direct block on disk */
/* Check for I/O filters on this heap */
- if(hdr->filter_len > 0)
+ if (hdr->filter_len > 0)
dblock_size = iblock->filt_ents[entry].size;
else
dblock_size = row_block_size;
/* Delete child direct block */
- if(H5HF_man_dblock_delete(hdr->f, dxpl_id, iblock->ents[entry].addr, dblock_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap child direct block")
+ if (H5HF_man_dblock_delete(hdr->f, dxpl_id, iblock->ents[entry].addr, dblock_size) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to release fractal heap child direct block")
} /* end if */
else {
- unsigned child_nrows; /* Number of rows in new indirect block */
+ unsigned child_nrows; /* Number of rows in new indirect block */
/* Compute # of rows in next child indirect block to use */
child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, row_block_size);
/* Delete child indirect block */
- if(H5HF_man_iblock_delete(hdr, dxpl_id, iblock->ents[entry].addr, child_nrows, iblock, entry) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap child indirect block")
+ if (H5HF_man_iblock_delete(hdr, dxpl_id, iblock->ents[entry].addr, child_nrows, iblock,
+ entry) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
+ "unable to release fractal heap child indirect block")
} /* end else */
- } /* end if */
- } /* end for */
- } /* end row */
+ } /* end if */
+ } /* end for */
+ } /* end row */
#ifndef NDEBUG
-{
- unsigned iblock_status = 0; /* Indirect block's status in the metadata cache */
+ {
+ unsigned iblock_status = 0; /* Indirect block's status in the metadata cache */
- /* Check the indirect block's status in the metadata cache */
- if(H5AC_get_entry_status(hdr->f, iblock_addr, &iblock_status) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for indirect block")
+ /* Check the indirect block's status in the metadata cache */
+ if (H5AC_get_entry_status(hdr->f, iblock_addr, &iblock_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for indirect block")
- /* Check if indirect block is pinned */
- HDassert(!(iblock_status & H5AC_ES__IS_PINNED));
-}
+ /* Check if indirect block is pinned */
+ HDassert(!(iblock_status & H5AC_ES__IS_PINNED));
+ }
#endif /* NDEBUG */
/* Indicate that the indirect block should be deleted & file space freed */
@@ -1608,13 +1589,12 @@ H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
done:
/* Unprotect the indirect block, with appropriate flags */
- if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, cache_flags, did_protect) < 0)
+ if (iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, cache_flags, did_protect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_delete() */
-
/*-------------------------------------------------------------------------
*
* Function: H5HF_man_iblock_size
@@ -1628,12 +1608,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_addr,
- unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size)
+H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned nrows,
+ H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size)
{
- H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1646,44 +1626,47 @@ H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_ad
HDassert(heap_size);
/* Protect the indirect block */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, par_iblock, par_entry, FALSE, H5AC_READ, &did_protect)))
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, par_iblock, par_entry,
+ FALSE, H5AC_READ, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Accumulate size of this indirect block */
*heap_size += iblock->size;
/* Indirect entries in this indirect block */
- if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
- unsigned first_row_bits; /* Number of bits used bit addresses in first row */
- unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
- unsigned entry; /* Current entry in row */
- size_t u; /* Local index variable */
-
- entry = hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width;
- first_row_bits = H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size) +
- H5VM_log2_of2(hdr->man_dtable.cparam.width);
- num_indirect_rows =
- (H5VM_log2_gen(hdr->man_dtable.row_block_size[hdr->man_dtable.max_direct_rows]) - first_row_bits) + 1;
- for(u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++, num_indirect_rows++) {
- size_t v; /* Local index variable */
-
- for(v = 0; v < hdr->man_dtable.cparam.width; v++, entry++)
- if(H5F_addr_defined(iblock->ents[entry].addr))
- if(H5HF_man_iblock_size(f, dxpl_id, hdr, iblock->ents[entry].addr, num_indirect_rows, iblock, entry, heap_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to get fractal heap storage info for indirect block")
+ if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
+ unsigned first_row_bits; /* Number of bits used bit addresses in first row */
+ unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
+ unsigned entry; /* Current entry in row */
+ size_t u; /* Local index variable */
+
+ entry = hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width;
+ first_row_bits = H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size) +
+ H5VM_log2_of2(hdr->man_dtable.cparam.width);
+ num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[hdr->man_dtable.max_direct_rows]) -
+ first_row_bits) +
+ 1;
+ for (u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++, num_indirect_rows++) {
+ size_t v; /* Local index variable */
+
+ for (v = 0; v < hdr->man_dtable.cparam.width; v++, entry++)
+ if (H5F_addr_defined(iblock->ents[entry].addr))
+ if (H5HF_man_iblock_size(f, dxpl_id, hdr, iblock->ents[entry].addr, num_indirect_rows,
+ iblock, entry, heap_size) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL,
+ "unable to get fractal heap storage info for indirect block")
} /* end for */
- } /* end if */
+ } /* end if */
done:
/* Release the indirect block */
- if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iblock_dest
*
@@ -1692,7 +1675,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -1700,7 +1682,7 @@ done:
herr_t
H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1712,18 +1694,19 @@ H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
/* Decrement reference count on shared info */
HDassert(iblock->hdr);
- if(H5HF_hdr_decr(iblock->hdr) < 0)
+ if (H5HF_hdr_decr(iblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
- if(iblock->parent)
- if(H5HF_iblock_decr(iblock->parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
+ if (iblock->parent)
+ if (H5HF_iblock_decr(iblock->parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared indirect block")
/* Release entry tables */
- if(iblock->ents)
+ if (iblock->ents)
iblock->ents = H5FL_SEQ_FREE(H5HF_indirect_ent_t, iblock->ents);
- if(iblock->filt_ents)
+ if (iblock->filt_ents)
iblock->filt_ents = H5FL_SEQ_FREE(H5HF_indirect_filt_ent_t, iblock->filt_ents);
- if(iblock->child_iblocks)
+ if (iblock->child_iblocks)
iblock->child_iblocks = H5FL_SEQ_FREE(H5HF_indirect_ptr_t, iblock->child_iblocks);
/* Free fractal heap indirect block info */
@@ -1732,4 +1715,3 @@ H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_dest() */
-
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index b01c5e1..d4bac30 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFiter.c
* Apr 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Block iteration routines for fractal heaps.
*
@@ -26,46 +26,40 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -73,8 +67,6 @@
/* Declare a free list to manage the H5HF_block_loc_t struct */
H5FL_DEFINE(H5HF_block_loc_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_init
*
@@ -85,7 +77,6 @@ H5FL_DEFINE(H5HF_block_loc_t);
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -106,7 +97,6 @@ H5HF_man_iter_init(H5HF_block_iter_t *biter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iter_init() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_start_offset
*
@@ -116,25 +106,23 @@ H5HF_man_iter_init(H5HF_block_iter_t *biter)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_block_iter_t *biter, hsize_t offset)
+H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_block_iter_t *biter, hsize_t offset)
{
- H5HF_indirect_t *iblock; /* Indirect block for location context */
- haddr_t iblock_addr; /* Address of indirect block */
- unsigned iblock_nrows; /* # of rows in indirect block */
- H5HF_indirect_t *iblock_parent; /* Parent indirect block of location context */
- unsigned iblock_par_entry; /* Entry within parent indirect block */
- hsize_t curr_offset; /* Current offset, as adjusted */
- unsigned row; /* Current row we are on */
- unsigned col; /* Column in row */
- hbool_t root_block = TRUE; /* Flag to indicate the current block is the root indirect block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock; /* Indirect block for location context */
+ haddr_t iblock_addr; /* Address of indirect block */
+ unsigned iblock_nrows; /* # of rows in indirect block */
+ H5HF_indirect_t *iblock_parent; /* Parent indirect block of location context */
+ unsigned iblock_par_entry; /* Entry within parent indirect block */
+ hsize_t curr_offset; /* Current offset, as adjusted */
+ unsigned row; /* Current row we are on */
+ unsigned col; /* Column in row */
+ hbool_t root_block = TRUE; /* Flag to indicate the current block is the root indirect block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -148,30 +136,31 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(offset >= hdr->man_dtable.cparam.start_block_size);
/* Allocate level structure */
- if(NULL == (biter->curr = H5FL_MALLOC(H5HF_block_loc_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct block free list section")
-
-/*
-1: <Scan down block offsets for dtable rows until find a row >= offset>
- <Set current location's row, col, entry & size>
- <If row < max_direct_rows>
- <Done>
- <Else - row > max_direct_rows>
- <Create new block level>
- <Link new block level into iterator>
- <Adjust offset for block offset for row>
- <Make new block level the current context>
- <Goto 1>
-
-*/
+ if (NULL == (biter->curr = H5FL_MALLOC(H5HF_block_loc_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for direct block free list section")
+
+ /*
+ 1: <Scan down block offsets for dtable rows until find a row >= offset>
+ <Set current location's row, col, entry & size>
+ <If row < max_direct_rows>
+ <Done>
+ <Else - row > max_direct_rows>
+ <Create new block level>
+ <Link new block level into iterator>
+ <Adjust offset for block offset for row>
+ <Make new block level the current context>
+ <Goto 1>
+
+ */
do {
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
/* Walk down the rows in the doubling table until we've found the correct row for the next block */
- for(row = 0; row < hdr->man_dtable.max_root_rows; row++)
- if((offset >= hdr->man_dtable.row_block_off[row]) &&
- (offset < hdr->man_dtable.row_block_off[row] +
- (hdr->man_dtable.cparam.width * hdr->man_dtable.row_block_size[row])))
+ for (row = 0; row < hdr->man_dtable.max_root_rows; row++)
+ if ((offset >= hdr->man_dtable.row_block_off[row]) &&
+ (offset < hdr->man_dtable.row_block_off[row] +
+ (hdr->man_dtable.cparam.width * hdr->man_dtable.row_block_size[row])))
break;
/* Adjust offset by row offset */
@@ -182,15 +171,15 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
col = (unsigned)(curr_offset / hdr->man_dtable.row_block_size[row]);
/* Set the current level's context */
- biter->curr->row = row;
- biter->curr->col = col;
+ biter->curr->row = row;
+ biter->curr->col = col;
biter->curr->entry = (row * hdr->man_dtable.cparam.width) + col;
/* Get the context indirect block's information */
- if(root_block) {
- iblock_addr = hdr->man_dtable.table_addr;
- iblock_nrows = hdr->man_dtable.curr_root_rows;
- iblock_parent = NULL;
+ if (root_block) {
+ iblock_addr = hdr->man_dtable.table_addr;
+ iblock_nrows = hdr->man_dtable.curr_root_rows;
+ iblock_parent = NULL;
iblock_par_entry = 0;
/* The root block can't go up further... */
@@ -200,49 +189,53 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
root_block = FALSE;
} /* end if */
else {
- hsize_t child_size; /* Size of new indirect block to create */
+ hsize_t child_size; /* Size of new indirect block to create */
/* Retrieve the parent information from the previous context location */
- iblock_parent = biter->curr->up->context;
+ iblock_parent = biter->curr->up->context;
iblock_par_entry = biter->curr->up->entry;
/* Look up the address of context indirect block */
iblock_addr = iblock_parent->ents[iblock_par_entry].addr;
/* Compute # of rows in context indirect block */
- child_size = hdr->man_dtable.row_block_size[biter->curr->up->row];
+ child_size = hdr->man_dtable.row_block_size[biter->curr->up->row];
iblock_nrows = (H5VM_log2_gen(child_size) - hdr->man_dtable.first_row_bits) + 1;
} /* end else */
/* Load indirect block for this context location */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, FALSE, H5AC_WRITE, &did_protect)))
+ if (NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent,
+ iblock_par_entry, FALSE, H5AC_WRITE, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Make indirect block the context for the current location */
biter->curr->context = iblock;
/* Hold the indirect block with the location */
- if(H5HF_iblock_incr(biter->curr->context) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
+ if (H5HF_iblock_incr(biter->curr->context) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL,
+ "can't increment reference count on shared indirect block")
/* Release the current indirect block */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;
/* See if the location falls in a direct block row */
/* Or, if the offset has just filled up a direct or indirect block */
- if(curr_offset == (col * hdr->man_dtable.row_block_size[row]) || row < hdr->man_dtable.max_direct_rows) {
+ if (curr_offset == (col * hdr->man_dtable.row_block_size[row]) ||
+ row < hdr->man_dtable.max_direct_rows) {
HDassert(curr_offset - (col * hdr->man_dtable.row_block_size[row]) == 0);
- break; /* Done now */
- } /* end if */
+ break; /* Done now */
+ } /* end if */
/* Indirect block row */
else {
- H5HF_block_loc_t *new_loc; /* Pointer to new block location */
+ H5HF_block_loc_t *new_loc; /* Pointer to new block location */
/* Allocate level structure */
- if(NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct block free list section")
+ if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for direct block free list section")
/* Link new level into iterator */
new_loc->up = biter->curr;
@@ -252,8 +245,8 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
/* Make new block the current context */
biter->curr = new_loc;
- } /* end else */
- } while(1); /* Breaks out in middle */
+ } /* end else */
+ } while (1); /* Breaks out in middle */
/* Set flag to indicate block iterator finished initializing */
biter->ready = TRUE;
@@ -262,7 +255,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iter_start_offset() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_set_entry
*
@@ -271,7 +263,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -288,13 +279,12 @@ H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigne
/* Set location context */
biter->curr->entry = entry;
- biter->curr->row = entry / hdr->man_dtable.cparam.width;
- biter->curr->col = entry % hdr->man_dtable.cparam.width;
+ biter->curr->row = entry / hdr->man_dtable.cparam.width;
+ biter->curr->col = entry % hdr->man_dtable.cparam.width;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iter_set_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_start_entry
*
@@ -304,17 +294,16 @@ H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigne
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
- H5HF_indirect_t *iblock, unsigned start_entry)
+H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indirect_t *iblock,
+ unsigned start_entry)
{
- H5HF_block_loc_t *new_loc = NULL; /* Pointer to new block location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_block_loc_t *new_loc = NULL; /* Pointer to new block location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -327,18 +316,19 @@ H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
HDassert(iblock);
/* Create new location for iterator */
- if(NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct block free list section")
+ if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for direct block free list section")
/* Set up location context */
- new_loc->entry = start_entry;
- new_loc->row = start_entry / hdr->man_dtable.cparam.width;
- new_loc->col = start_entry % hdr->man_dtable.cparam.width;
+ new_loc->entry = start_entry;
+ new_loc->row = start_entry / hdr->man_dtable.cparam.width;
+ new_loc->col = start_entry % hdr->man_dtable.cparam.width;
new_loc->context = iblock;
- new_loc->up = NULL;
+ new_loc->up = NULL;
/* Increment reference count on indirect block */
- if(H5HF_iblock_incr(new_loc->context) < 0)
+ if (H5HF_iblock_incr(new_loc->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Make new location the current location */
@@ -348,13 +338,12 @@ H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
biter->ready = TRUE;
done:
- if(ret_value < 0 && new_loc)
+ if (ret_value < 0 && new_loc)
new_loc = H5FL_FREE(H5HF_block_loc_t, new_loc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iter_start_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_reset
*
@@ -364,7 +353,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -372,7 +360,7 @@ done:
herr_t
H5HF_man_iter_reset(H5HF_block_iter_t *biter)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -382,20 +370,21 @@ H5HF_man_iter_reset(H5HF_block_iter_t *biter)
HDassert(biter);
/* Free any location contexts that exist */
- if(biter->curr) {
- H5HF_block_loc_t *curr_loc; /* Pointer to current block location */
- H5HF_block_loc_t *next_loc; /* Pointer to next block location */
+ if (biter->curr) {
+ H5HF_block_loc_t *curr_loc; /* Pointer to current block location */
+ H5HF_block_loc_t *next_loc; /* Pointer to next block location */
/* Free location contexts */
curr_loc = biter->curr;
- while(curr_loc) {
+ while (curr_loc) {
/* Get pointer to next node */
next_loc = curr_loc->up;
/* If this node is holding an indirect block, release the block */
- if(curr_loc->context)
- if(H5HF_iblock_decr(curr_loc->context) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
+ if (curr_loc->context)
+ if (H5HF_iblock_decr(curr_loc->context) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on shared indirect block")
/* Free the current location context */
curr_loc = H5FL_FREE(H5HF_block_loc_t, curr_loc);
@@ -415,7 +404,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iter_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_next
*
@@ -424,7 +412,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -446,12 +433,11 @@ H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
biter->curr->entry += nentries;
biter->curr->row = biter->curr->entry / hdr->man_dtable.cparam.width;
biter->curr->col = biter->curr->entry % hdr->man_dtable.cparam.width;
-/* HDassert(biter->curr->row <= biter->curr->context->nrows); */
+ /* HDassert(biter->curr->row <= biter->curr->context->nrows); */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iter_next() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_up
*
@@ -460,7 +446,6 @@ H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -468,8 +453,8 @@ H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
herr_t
H5HF_man_iter_up(H5HF_block_iter_t *biter)
{
- H5HF_block_loc_t *up_loc; /* Pointer to 'up' block location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_block_loc_t *up_loc; /* Pointer to 'up' block location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -483,7 +468,7 @@ H5HF_man_iter_up(H5HF_block_iter_t *biter)
HDassert(biter->curr->context);
/* Release hold on current location's indirect block */
- if(H5HF_iblock_decr(biter->curr->context) < 0)
+ if (H5HF_iblock_decr(biter->curr->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
/* Get pointer to location context above this one */
@@ -499,7 +484,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iter_up() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_down
*
@@ -508,7 +492,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -516,8 +499,8 @@ done:
herr_t
H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
{
- H5HF_block_loc_t *down_loc = NULL; /* Pointer to new 'down' block location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_block_loc_t *down_loc = NULL; /* Pointer to new 'down' block location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -530,31 +513,31 @@ H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
HDassert(biter->curr->context);
/* Create new location to move down to */
- if(NULL == (down_loc = H5FL_MALLOC(H5HF_block_loc_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct block free list section")
+ if (NULL == (down_loc = H5FL_MALLOC(H5HF_block_loc_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for direct block free list section")
/* Initialize down location */
- down_loc->row = 0;
- down_loc->col = 0;
- down_loc->entry = 0;
+ down_loc->row = 0;
+ down_loc->col = 0;
+ down_loc->entry = 0;
down_loc->context = iblock;
- down_loc->up = biter->curr;
+ down_loc->up = biter->curr;
/* Increment reference count on indirect block */
- if(H5HF_iblock_incr(down_loc->context) < 0)
+ if (H5HF_iblock_incr(down_loc->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Make down location the current location */
biter->curr = down_loc;
done:
- if(ret_value < 0 && down_loc)
+ if (ret_value < 0 && down_loc)
down_loc = H5FL_FREE(H5HF_block_loc_t, down_loc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iter_down() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_curr
*
@@ -563,14 +546,13 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
- unsigned *entry, H5HF_indirect_t **block)
+H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsigned *entry,
+ H5HF_indirect_t **block)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -581,19 +563,18 @@ H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
HDassert(biter->ready);
/* Retrieve the information asked for */
- if(row)
+ if (row)
*row = biter->curr->row;
- if(col)
+ if (col)
*col = biter->curr->col;
- if(entry)
+ if (entry)
*entry = biter->curr->entry;
- if(block)
+ if (block)
*block = biter->curr->context;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iter_curr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_offset
*
@@ -602,7 +583,6 @@ H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
@@ -610,7 +590,7 @@ H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
herr_t
H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
{
- hsize_t curr_offset; /* For computing offset in heap */
+ hsize_t curr_offset; /* For computing offset in heap */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -633,7 +613,6 @@ H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_man_iter_offset() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_iter_ready
*
@@ -642,7 +621,6 @@ H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
@@ -659,4 +637,3 @@ H5HF_man_iter_ready(H5HF_block_iter_t *biter)
FUNC_LEAVE_NOAPI(biter->ready)
} /* end H5HF_man_iter_ready() */
-
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 9613cb0..fb6e844 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFman.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "Managed" object routines for fractal heaps.
*
@@ -26,17 +26,17 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
@@ -44,50 +44,43 @@
/* Macro to check if we can apply all filters in the pipeline. Use whenever
* performing a modification operation */
- #define H5HF_MAN_WRITE_CHECK_PLINE(HDR) \
-{ \
- if(!((HDR)->checked_filters)) { \
- if((HDR)->pline.nused) \
- if(H5Z_can_apply_direct(&((HDR)->pline)) < 0) \
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap") \
- \
- (HDR)->checked_filters = TRUE; \
- } /* end if */ \
-}
-
+#define H5HF_MAN_WRITE_CHECK_PLINE(HDR) \
+ { \
+ if (!((HDR)->checked_filters)) { \
+ if ((HDR)->pline.nused) \
+ if (H5Z_can_apply_direct(&((HDR)->pline)) < 0) \
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap") \
+ \
+ (HDR)->checked_filters = TRUE; \
+ } /* end if */ \
+ }
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id,
- const uint8_t *id, H5HF_operator_t op, void *op_data, unsigned op_flags);
+static herr_t H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op,
+ void *op_data, unsigned op_flags);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_insert
*
@@ -96,23 +89,21 @@ static herr_t H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 13 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj,
- void *_id)
+H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj, void *_id)
{
- H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section */
- H5HF_direct_t *dblock = NULL; /* Pointer to direct block to modify */
- haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */
- size_t dblock_size; /* Direct block size */
- uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
- size_t blk_off; /* Offset of object within block */
- htri_t node_found; /* Whether an existing free list node was found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section */
+ H5HF_direct_t * dblock = NULL; /* Pointer to direct block to modify */
+ haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */
+ size_t dblock_size; /* Direct block size */
+ uint8_t * id = (uint8_t *)_id; /* Pointer to ID buffer */
+ size_t blk_off; /* Offset of object within block */
+ htri_t node_found; /* Whether an existing free list node was found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -128,38 +119,40 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
/* Look for free space */
- if((node_found = H5HF_space_find(hdr, dxpl_id, (hsize_t)obj_size, &sec_node)) < 0)
+ if ((node_found = H5HF_space_find(hdr, dxpl_id, (hsize_t)obj_size, &sec_node)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap")
/* If we didn't find a node, go create a direct block big enough to hold the requested block */
- if(!node_found)
+ if (!node_found)
/* Allocate direct block big enough to hold requested size */
- if(H5HF_man_dblock_new(hdr, dxpl_id, obj_size, &sec_node) < 0)
+ if (H5HF_man_dblock_new(hdr, dxpl_id, obj_size, &sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create fractal heap direct block")
/* Check for row section */
- if(sec_node->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sec_node->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW) {
+ if (sec_node->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ sec_node->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW) {
/* Allocate 'single' selection out of 'row' selection */
- if(H5HF_man_iblock_alloc_row(hdr, dxpl_id, &sec_node) < 0)
+ if (H5HF_man_iblock_alloc_row(hdr, dxpl_id, &sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't break up row section")
} /* end if */
HDassert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check for 'single' section being serialized */
- if(sec_node->sect_info.state == H5FS_SECT_SERIALIZED) {
- if(H5HF_sect_single_revive(hdr, dxpl_id, sec_node) < 0)
+ if (sec_node->sect_info.state == H5FS_SECT_SERIALIZED) {
+ if (H5HF_sect_single_revive(hdr, dxpl_id, sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
} /* end if */
HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE);
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sec_node, &dblock_addr, &dblock_size) < 0)
+ if (H5HF_sect_single_dblock_info(hdr, dxpl_id, sec_node, &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Lock direct block */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC_WRITE)))
+ if (NULL ==
+ (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent,
+ sec_node->u.single.par_entry, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
/* Insert object into block */
@@ -172,13 +165,13 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj
HDassert(sec_node->sect_info.size >= obj_size);
/* Reduce (& possibly re-add) single section */
- if(H5HF_sect_single_reduce(hdr, dxpl_id, sec_node, obj_size) < 0)
+ if (H5HF_sect_single_reduce(hdr, dxpl_id, sec_node, obj_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce single section node")
sec_node = NULL;
/* Encode the object in the block */
{
- uint8_t *p; /* Temporary pointer to obj info in block */
+ uint8_t *p; /* Temporary pointer to obj info in block */
/* Point to location for object */
p = dblock->blk + blk_off;
@@ -198,23 +191,23 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj
hdr->man_nobjs++;
/* Reduce space available in heap (marks header dirty) */
- if(H5HF_hdr_adj_free(hdr, -(ssize_t)obj_size) < 0)
+ if (H5HF_hdr_adj_free(hdr, -(ssize_t)obj_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap")
done:
/* Release section node on error */
- if(ret_value < 0)
- if(sec_node && H5HF_sect_single_free((H5FS_section_info_t *)sec_node) < 0)
+ if (ret_value < 0)
+ if (sec_node && H5HF_sect_single_free((H5FS_section_info_t *)sec_node) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release section node")
/* Release the direct block (marked as dirty) */
- if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__DIRTIED_FLAG) < 0)
+ if (dblock &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_op_real
*
@@ -224,25 +217,24 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 17 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- H5HF_operator_t op, void *op_data, unsigned op_flags)
+H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data,
+ unsigned op_flags)
{
H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */
H5AC_protect_t dblock_access; /* Access method for direct block */
- haddr_t dblock_addr; /* Direct block address */
- size_t dblock_size; /* Direct block size */
- unsigned dblock_cache_flags; /* Flags for unprotecting direct block */
- hsize_t obj_off; /* Object's offset in heap */
- size_t obj_len; /* Object's length in heap */
- size_t blk_off; /* Offset of object in block */
- uint8_t *p; /* Temporary pointer to obj info in block */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t dblock_addr; /* Direct block address */
+ size_t dblock_size; /* Direct block size */
+ unsigned dblock_cache_flags; /* Flags for unprotecting direct block */
+ hsize_t obj_off; /* Object's offset in heap */
+ size_t obj_len; /* Object's length in heap */
+ size_t blk_off; /* Offset of object in block */
+ uint8_t * p; /* Temporary pointer to obj info in block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -254,15 +246,15 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(op);
/* Set the access mode for the direct block */
- if(op_flags & H5HF_OP_MODIFY) {
+ if (op_flags & H5HF_OP_MODIFY) {
/* Check pipeline */
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
- dblock_access = H5AC_WRITE;
+ dblock_access = H5AC_WRITE;
dblock_cache_flags = H5AC__DIRTIED_FLAG;
} /* end if */
else {
- dblock_access = H5AC_READ;
+ dblock_access = H5AC_READ;
dblock_cache_flags = H5AC__NO_FLAGS_SET;
} /* end else */
@@ -274,61 +266,66 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size);
/* Check for bad offset or length */
- if(obj_off == 0)
+ if (obj_off == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset")
- if(obj_off > hdr->man_size)
+ if (obj_off > hdr->man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large")
- if(obj_len == 0)
+ if (obj_len == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size")
- if(obj_len > hdr->man_dtable.cparam.max_direct_size)
+ if (obj_len > hdr->man_dtable.cparam.max_direct_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block")
- if(obj_len > hdr->max_man_size)
+ if (obj_len > hdr->max_man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone")
/* Check for root direct block */
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
/* Set direct block info */
dblock_addr = hdr->man_dtable.table_addr;
dblock_size = hdr->man_dtable.cparam.start_block_size;
/* Lock direct block */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, NULL, 0, dblock_access)))
+ if (NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, NULL, 0,
+ dblock_access)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
} /* end if */
else {
- H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- unsigned entry; /* Entry of block */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ unsigned entry; /* Entry of block */
/* Look up indirect block containing direct block */
- if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC_READ) < 0)
+ if (H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC_READ) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section")
/* Set direct block info */
- dblock_addr = iblock->ents[entry].addr;
- H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width]), hsize_t, size_t);
- dblock_size = (size_t)hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width];
+ dblock_addr = iblock->ents[entry].addr;
+ H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width]), hsize_t,
+ size_t);
+ dblock_size = (size_t)hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width];
/* Check for offset of invalid direct block */
- if(!H5F_addr_defined(dblock_addr)) {
+ if (!H5F_addr_defined(dblock_addr)) {
/* Unlock indirect block */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
+ "unable to release fractal heap indirect block")
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block")
} /* end if */
/* Lock direct block */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, iblock, entry, dblock_access))) {
+ if (NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, iblock, entry,
+ dblock_access))) {
/* Unlock indirect block */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
+ "unable to release fractal heap indirect block")
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
} /* end if */
/* Unlock indirect block */
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;
} /* end else */
@@ -338,29 +335,29 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
blk_off = (size_t)(obj_off - dblock->block_off);
/* Check for object's offset in the direct block prefix information */
- if(blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
+ if (blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block")
/* Check for object's length overrunning the end of the direct block */
- if((blk_off + obj_len) > dblock_size)
+ if ((blk_off + obj_len) > dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block")
/* Point to location for object */
p = dblock->blk + blk_off;
/* Call the user's 'op' callback */
- if(op(p, obj_len, op_data) < 0)
+ if (op(p, obj_len, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed")
done:
/* Unlock direct block */
- if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, dblock_cache_flags) < 0)
+ if (dblock &&
+ H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, dblock_cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_op_real() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_read
*
@@ -369,7 +366,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 17 2006
*
*-------------------------------------------------------------------------
@@ -377,7 +373,7 @@ done:
herr_t
H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -389,14 +385,13 @@ H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
HDassert(obj);
/* Call the internal 'op' routine routine */
- if(H5HF_man_op_real(hdr, dxpl_id, id, H5HF_op_read, obj, 0) < 0)
+ if (H5HF_man_op_real(hdr, dxpl_id, id, H5HF_op_read, obj, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_read() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_write
*
@@ -405,16 +400,14 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- const void *obj)
+H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, const void *obj)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -427,14 +420,13 @@ H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Call the internal 'op' routine routine */
/* (Casting away const OK - QAK) */
- if(H5HF_man_op_real(hdr, dxpl_id, id, H5HF_op_write, (void *)obj, H5HF_OP_MODIFY) < 0)
+ if (H5HF_man_op_real(hdr, dxpl_id, id, H5HF_op_write, (void *)obj, H5HF_OP_MODIFY) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_write() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_op
*
@@ -443,16 +435,14 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- H5HF_operator_t op, void *op_data)
+H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -464,14 +454,13 @@ H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
HDassert(op);
/* Call the internal 'op' routine routine */
- if(H5HF_man_op_real(hdr, dxpl_id, id, op, op_data, 0) < 0)
+ if (H5HF_man_op_real(hdr, dxpl_id, id, op, op_data, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_op() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_man_remove
*
@@ -480,7 +469,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
@@ -488,16 +476,16 @@ done:
herr_t
H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
{
- H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */
- H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- hsize_t obj_off; /* Object's offset in heap */
- size_t obj_len; /* Object's length in heap */
- size_t dblock_size; /* Direct block size */
- hsize_t dblock_block_off; /* Offset of the direct block within the heap's address space */
- unsigned dblock_entry; /* Entry of direct block in parent indirect block */
- size_t blk_off; /* Offset of object in block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */
+ H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ hsize_t obj_off; /* Object's offset in heap */
+ size_t obj_len; /* Object's length in heap */
+ size_t dblock_size; /* Direct block size */
+ hsize_t dblock_block_off; /* Offset of the direct block within the heap's address space */
+ unsigned dblock_entry; /* Entry of direct block in parent indirect block */
+ size_t blk_off; /* Offset of object in block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -518,42 +506,45 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size);
/* Check for bad offset or length */
- if(obj_off == 0)
+ if (obj_off == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset")
- if(obj_off > hdr->man_size)
+ if (obj_off > hdr->man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large")
- if(obj_len == 0)
+ if (obj_len == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size")
- if(obj_len > hdr->man_dtable.cparam.max_direct_size)
+ if (obj_len > hdr->man_dtable.cparam.max_direct_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block")
- if(obj_len > hdr->max_man_size)
+ if (obj_len > hdr->max_man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone")
/* Check for root direct block */
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
/* Set direct block info */
- dblock_size = hdr->man_dtable.cparam.start_block_size;
+ dblock_size = hdr->man_dtable.cparam.start_block_size;
dblock_block_off = 0;
- dblock_entry = 0;
+ dblock_entry = 0;
} /* end if */
else {
/* Look up indirect block containing direct block */
- if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC_WRITE) < 0)
+ if (H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC_WRITE) <
+ 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section")
/* Check for offset of invalid direct block */
- if(!H5F_addr_defined(iblock->ents[dblock_entry].addr))
+ if (!H5F_addr_defined(iblock->ents[dblock_entry].addr))
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block")
/* Set direct block info */
- H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]), hsize_t, size_t);
- dblock_size = (size_t)(hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]);
+ H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]),
+ hsize_t, size_t);
+ dblock_size = (size_t)(hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]);
/* Compute the direct block's offset in the heap's address space */
/* (based on parent indirect block's block offset) */
dblock_block_off = iblock->block_off;
dblock_block_off += hdr->man_dtable.row_block_off[dblock_entry / hdr->man_dtable.cparam.width];
- dblock_block_off += hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width] * (dblock_entry % hdr->man_dtable.cparam.width);
+ dblock_block_off += hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width] *
+ (dblock_entry % hdr->man_dtable.cparam.width);
} /* end else */
/* Compute offset of object within block */
@@ -561,47 +552,46 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
blk_off = (size_t)(obj_off - dblock_block_off);
/* Check for object's offset in the direct block prefix information */
- if(blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
+ if (blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr))
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block")
/* Check for object's length overrunning the end of the direct block */
- if((blk_off + obj_len) > dblock_size)
+ if ((blk_off + obj_len) > dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block")
/* Create free space section node */
- if(NULL == (sec_node = H5HF_sect_single_new(obj_off, obj_len, iblock, dblock_entry)))
+ if (NULL == (sec_node = H5HF_sect_single_new(obj_off, obj_len, iblock, dblock_entry)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for direct block's free space")
/* Unlock indirect block */
- if(iblock) {
- if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (iblock) {
+ if (H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;
} /* end if */
/* Increase space available in heap (marks header dirty) */
- if(H5HF_hdr_adj_free(hdr, (ssize_t)obj_len) < 0)
+ if (H5HF_hdr_adj_free(hdr, (ssize_t)obj_len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap")
/* Update statistics about heap */
hdr->man_nobjs--;
/* Return free space to the heap's list of space */
- if(H5HF_space_add(hdr, dxpl_id, sec_node, H5FS_ADD_RETURNED_SPACE) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, sec_node, H5FS_ADD_RETURNED_SPACE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list")
sec_node = NULL;
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Release section node */
- if(sec_node && H5HF_sect_single_free((H5FS_section_info_t *)sec_node) < 0)
+ if (sec_node && H5HF_sect_single_free((H5FS_section_info_t *)sec_node) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release section node")
} /* end if */
/* Unlock indirect block */
- if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_remove() */
-
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index ebd8a70..22d3110 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
* Purpose: This file contains declarations which are visible only within
@@ -30,152 +30,153 @@
#include "H5HFprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5B2private.h" /* v2 B-trees */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5FSprivate.h" /* Free space manager */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5B2private.h" /* v2 B-trees */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5FSprivate.h" /* Free space manager */
+#include "H5SLprivate.h" /* Skip lists */
/**************************/
/* Package Private Macros */
/**************************/
/* Size of checksum information (on disk) */
-#define H5HF_SIZEOF_CHKSUM 4
+#define H5HF_SIZEOF_CHKSUM 4
/* "Standard" size of prefix information for fractal heap metadata */
-#define H5HF_METADATA_PREFIX_SIZE(c) ( \
- H5_SIZEOF_MAGIC /* Signature */ \
- + 1 /* Version */ \
- + ((c) ? H5HF_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \
+#define H5HF_METADATA_PREFIX_SIZE(c) \
+ (H5_SIZEOF_MAGIC /* Signature */ \
+ + 1 /* Version */ \
+ + ((c) ? H5HF_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \
)
/* Size of doubling-table information */
-#define H5HF_DTABLE_INFO_SIZE(h) ( \
- 2 /* Width of table (i.e. # of columns) */ \
- + (h)->sizeof_size /* Starting block size */ \
- + (h)->sizeof_size /* Maximum direct block size */ \
- + 2 /* Max. size of heap (log2 of actual value - i.e. the # of bits) */ \
- + 2 /* Starting # of rows in root indirect block */ \
- + (h)->sizeof_addr /* File address of table managed */ \
- + 2 /* Current # of rows in root indirect block */ \
+#define H5HF_DTABLE_INFO_SIZE(h) \
+ (2 /* Width of table (i.e. # of columns) */ \
+ + (h)->sizeof_size /* Starting block size */ \
+ + (h)->sizeof_size /* Maximum direct block size */ \
+ + 2 /* Max. size of heap (log2 of actual value - i.e. the # of bits) */ \
+ + 2 /* Starting # of rows in root indirect block */ \
+ + (h)->sizeof_addr /* File address of table managed */ \
+ + 2 /* Current # of rows in root indirect block */ \
)
/* Flags for status byte */
-#define H5HF_HDR_FLAGS_HUGE_ID_WRAPPED 0x01 /* "huge" object IDs have wrapped */
-#define H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS 0x02 /* checksum direct blocks */
+#define H5HF_HDR_FLAGS_HUGE_ID_WRAPPED 0x01 /* "huge" object IDs have wrapped */
+#define H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS 0x02 /* checksum direct blocks */
/* Size of the fractal heap header on disk */
/* (this is the fixed-len portion, the variable-len I/O filter information
* follows this information, if there are I/O filters for the heap)
*/
-#define H5HF_HEADER_SIZE(h) ( \
- /* General metadata fields */ \
- H5HF_METADATA_PREFIX_SIZE(TRUE) \
- \
- /* Fractal Heap Header specific fields */ \
- \
- /* General heap information */ \
- + 2 /* Heap ID len */ \
- + 2 /* I/O filters' encoded len */ \
- + 1 /* Status flags */ \
- \
- /* "Huge" object fields */ \
- + 4 /* Max. size of "managed" object */ \
- + (h)->sizeof_size /* Next ID for "huge" object */ \
- + (h)->sizeof_addr /* File address of "huge" object tracker B-tree */ \
- \
- /* "Managed" object free space fields */ \
- + (h)->sizeof_size /* Total man. free space */ \
- + (h)->sizeof_addr /* File address of free section header */ \
- \
- /* Statistics fields */ \
- + (h)->sizeof_size /* Size of man. space in heap */ \
- + (h)->sizeof_size /* Size of man. space iterator offset in heap */ \
- + (h)->sizeof_size /* Size of alloacted man. space in heap */ \
- + (h)->sizeof_size /* Number of man. objects in heap */ \
- + (h)->sizeof_size /* Size of huge space in heap */ \
- + (h)->sizeof_size /* Number of huge objects in heap */ \
- + (h)->sizeof_size /* Size of tiny space in heap */ \
- + (h)->sizeof_size /* Number of tiny objects in heap */ \
- \
- /* "Managed" object doubling table info */ \
- + H5HF_DTABLE_INFO_SIZE(h) /* Size of managed obj. doubling-table info */ \
+#define H5HF_HEADER_SIZE(h) \
+ (/* General metadata fields */ \
+ H5HF_METADATA_PREFIX_SIZE(TRUE) \
+ \
+ /* Fractal Heap Header specific fields */ \
+ \
+ /* General heap information */ \
+ + 2 /* Heap ID len */ \
+ + 2 /* I/O filters' encoded len */ \
+ + 1 /* Status flags */ \
+ \
+ /* "Huge" object fields */ \
+ + 4 /* Max. size of "managed" object */ \
+ + (h)->sizeof_size /* Next ID for "huge" object */ \
+ + (h)->sizeof_addr /* File address of "huge" object tracker B-tree */ \
+ \
+ /* "Managed" object free space fields */ \
+ + (h)->sizeof_size /* Total man. free space */ \
+ + (h)->sizeof_addr /* File address of free section header */ \
+ \
+ /* Statistics fields */ \
+ + (h)->sizeof_size /* Size of man. space in heap */ \
+ + (h)->sizeof_size /* Size of man. space iterator offset in heap */ \
+ + (h)->sizeof_size /* Size of alloacted man. space in heap */ \
+ + (h)->sizeof_size /* Number of man. objects in heap */ \
+ + (h)->sizeof_size /* Size of huge space in heap */ \
+ + (h)->sizeof_size /* Number of huge objects in heap */ \
+ + (h)->sizeof_size /* Size of tiny space in heap */ \
+ + (h)->sizeof_size /* Number of tiny objects in heap */ \
+ \
+ /* "Managed" object doubling table info */ \
+ + H5HF_DTABLE_INFO_SIZE(h) /* Size of managed obj. doubling-table info */ \
)
/* Size of overhead for a direct block */
-#define H5HF_MAN_ABS_DIRECT_OVERHEAD(h) ( \
- /* General metadata fields */ \
- H5HF_METADATA_PREFIX_SIZE(h->checksum_dblocks) \
- \
- /* Fractal heap managed, absolutely mapped direct block specific fields */ \
- + (h)->sizeof_addr /* File address of heap owning the block */ \
- + (h)->heap_off_size /* Offset of the block in the heap */ \
+#define H5HF_MAN_ABS_DIRECT_OVERHEAD(h) \
+ (/* General metadata fields */ \
+ H5HF_METADATA_PREFIX_SIZE(h->checksum_dblocks) \
+ \
+ /* Fractal heap managed, absolutely mapped direct block specific fields */ \
+ + (h)->sizeof_addr /* File address of heap owning the block */ \
+ + (h)->heap_off_size /* Offset of the block in the heap */ \
)
/* Size of managed indirect block entry for a child direct block */
-#define H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h) ( \
- ((h)->filter_len > 0 ? \
- ((h)->sizeof_addr + (h)->sizeof_size + 4) : /* Size of entries for filtered direct blocks */ \
- (h)->sizeof_addr) /* Size of entries for un-filtered direct blocks */ \
+#define H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h) \
+ (((h)->filter_len > 0 ? ((h)->sizeof_addr + (h)->sizeof_size + 4) \
+ : /* Size of entries for filtered direct blocks */ \
+ (h)->sizeof_addr) /* Size of entries for un-filtered direct blocks */ \
)
/* Size of managed indirect block */
-#define H5HF_MAN_INDIRECT_SIZE(h, r) ( \
- /* General metadata fields */ \
- H5HF_METADATA_PREFIX_SIZE(TRUE) \
- \
- /* Fractal heap managed, absolutely mapped indirect block specific fields */ \
- + (h)->sizeof_addr /* File address of heap owning the block */ \
- + (h)->heap_off_size /* Offset of the block in the heap */ \
- + (MIN(r, (h)->man_dtable.max_direct_rows) * (h)->man_dtable.cparam.width * H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h)) /* Size of entries for direct blocks */ \
- + (((r > (h)->man_dtable.max_direct_rows) ? (r - (h)->man_dtable.max_direct_rows) : 0) * (h)->man_dtable.cparam.width * (h)->sizeof_addr) /* Size of entries for indirect blocks */ \
+#define H5HF_MAN_INDIRECT_SIZE(h, r) \
+ (/* General metadata fields */ \
+ H5HF_METADATA_PREFIX_SIZE(TRUE) \
+ \
+ /* Fractal heap managed, absolutely mapped indirect block specific fields */ \
+ + (h)->sizeof_addr /* File address of heap owning the block */ \
+ + (h)->heap_off_size /* Offset of the block in the heap */ \
+ + (MIN(r, (h)->man_dtable.max_direct_rows) * (h)->man_dtable.cparam.width * \
+ H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h)) /* Size of entries for direct blocks */ \
+ + (((r > (h)->man_dtable.max_direct_rows) ? (r - (h)->man_dtable.max_direct_rows) : 0) * \
+ (h)->man_dtable.cparam.width * (h)->sizeof_addr) /* Size of entries for indirect blocks */ \
)
/* Compute the # of bytes required to store an offset into a given buffer size */
-#define H5HF_SIZEOF_OFFSET_BITS(b) (((b) + 7) / 8)
-#define H5HF_SIZEOF_OFFSET_LEN(l) H5HF_SIZEOF_OFFSET_BITS(H5VM_log2_of2((unsigned)(l)))
+#define H5HF_SIZEOF_OFFSET_BITS(b) (((b) + 7) / 8)
+#define H5HF_SIZEOF_OFFSET_LEN(l) H5HF_SIZEOF_OFFSET_BITS(H5VM_log2_of2((unsigned)(l)))
/* Heap ID bit flags */
/* Heap ID version (2 bits: 6-7) */
-#define H5HF_ID_VERS_CURR 0x00 /* Current version of ID format */
-#define H5HF_ID_VERS_MASK 0xC0 /* Mask for getting the ID version from flags */
+#define H5HF_ID_VERS_CURR 0x00 /* Current version of ID format */
+#define H5HF_ID_VERS_MASK 0xC0 /* Mask for getting the ID version from flags */
/* Heap ID type (2 bits: 4-5) */
-#define H5HF_ID_TYPE_MAN 0x00 /* "Managed" object - stored in fractal heap blocks */
-#define H5HF_ID_TYPE_HUGE 0x10 /* "Huge" object - stored in file directly */
-#define H5HF_ID_TYPE_TINY 0x20 /* "Tiny" object - stored in heap ID directly */
-#define H5HF_ID_TYPE_RESERVED 0x30 /* "?" object - reserved for future use */
-#define H5HF_ID_TYPE_MASK 0x30 /* Mask for getting the ID type from flags */
+#define H5HF_ID_TYPE_MAN 0x00 /* "Managed" object - stored in fractal heap blocks */
+#define H5HF_ID_TYPE_HUGE 0x10 /* "Huge" object - stored in file directly */
+#define H5HF_ID_TYPE_TINY 0x20 /* "Tiny" object - stored in heap ID directly */
+#define H5HF_ID_TYPE_RESERVED 0x30 /* "?" object - reserved for future use */
+#define H5HF_ID_TYPE_MASK 0x30 /* Mask for getting the ID type from flags */
/* Heap ID bits 0-3 reserved for future use */
/* Encode a "managed" heap ID */
-#define H5HF_MAN_ID_ENCODE(i, h, o, l) \
- *(i) = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_MAN; \
- (i)++; \
- UINT64ENCODE_VAR((i), (o), (h)->heap_off_size); \
+#define H5HF_MAN_ID_ENCODE(i, h, o, l) \
+ *(i) = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_MAN; \
+ (i)++; \
+ UINT64ENCODE_VAR((i), (o), (h)->heap_off_size); \
UINT64ENCODE_VAR((i), (l), (h)->heap_len_size)
/* Decode a "managed" heap ID */
-#define H5HF_MAN_ID_DECODE(i, h, f, o, l) \
- f = *(uint8_t *)i++; \
- UINT64DECODE_VAR((i), (o), (h)->heap_off_size); \
+#define H5HF_MAN_ID_DECODE(i, h, f, o, l) \
+ f = *(uint8_t *)i++; \
+ UINT64DECODE_VAR((i), (o), (h)->heap_off_size); \
UINT64DECODE_VAR((i), (l), (h)->heap_len_size)
/* Free space section types for fractal heap */
/* (values stored in free space data structures in file) */
-#define H5HF_FSPACE_SECT_SINGLE 0 /* Section is a range of actual bytes in a direct block */
-#define H5HF_FSPACE_SECT_FIRST_ROW 1 /* Section is first range of blocks in an indirect block row */
-#define H5HF_FSPACE_SECT_NORMAL_ROW 2 /* Section is a range of blocks in an indirect block row */
-#define H5HF_FSPACE_SECT_INDIRECT 3 /* Section is a span of blocks in an indirect block */
+#define H5HF_FSPACE_SECT_SINGLE 0 /* Section is a range of actual bytes in a direct block */
+#define H5HF_FSPACE_SECT_FIRST_ROW 1 /* Section is first range of blocks in an indirect block row */
+#define H5HF_FSPACE_SECT_NORMAL_ROW 2 /* Section is a range of blocks in an indirect block row */
+#define H5HF_FSPACE_SECT_INDIRECT 3 /* Section is a span of blocks in an indirect block */
/* Flags for 'op' operations */
-#define H5HF_OP_MODIFY 0x0001 /* Operation will modify object */
-#define H5HF_OP_FLAGS (H5HF_OP_MODIFY) /* Bit-wise OR of all op flags */
+#define H5HF_OP_MODIFY 0x0001 /* Operation will modify object */
+#define H5HF_OP_FLAGS (H5HF_OP_MODIFY) /* Bit-wise OR of all op flags */
/* Flags for 'root_iblock_flags' field in header */
-#define H5HF_ROOT_IBLOCK_PINNED 0x01
-#define H5HF_ROOT_IBLOCK_PROTECTED 0x02
-
+#define H5HF_ROOT_IBLOCK_PINNED 0x01
+#define H5HF_ROOT_IBLOCK_PROTECTED 0x02
/****************************/
/* Package Private Typedefs */
@@ -184,37 +185,37 @@
/* Doubling-table info */
typedef struct H5HF_dtable_t {
/* Immutable, pre-set information for table */
- H5HF_dtable_cparam_t cparam; /* Creation parameters for table */
+ H5HF_dtable_cparam_t cparam; /* Creation parameters for table */
/* Derived information (stored, varies during lifetime of table) */
- haddr_t table_addr; /* Address of first block for table */
- /* Undefined if no space allocated for table */
- unsigned curr_root_rows; /* Current number of rows in the root indirect block */
- /* 0 indicates that the TABLE_ADDR field points
- * to direct block (of START_BLOCK_SIZE) instead
- * of indirect root block.
- */
+ haddr_t table_addr; /* Address of first block for table */
+ /* Undefined if no space allocated for table */
+ unsigned curr_root_rows; /* Current number of rows in the root indirect block */
+ /* 0 indicates that the TABLE_ADDR field points
+ * to direct block (of START_BLOCK_SIZE) instead
+ * of indirect root block.
+ */
/* Computed information (not stored) */
- unsigned max_root_rows; /* Maximum # of rows in root indirect block */
- unsigned max_direct_rows; /* Maximum # of direct rows in any indirect block */
- unsigned start_bits; /* # of bits for starting block size (i.e. log2(start_block_size)) */
- unsigned max_direct_bits; /* # of bits for max. direct block size (i.e. log2(max_direct_size)) */
- unsigned max_dir_blk_off_size; /* Max. size of offsets in direct blocks */
- unsigned first_row_bits; /* # of bits in address of first row */
- hsize_t num_id_first_row; /* Number of IDs in first row of table */
- hsize_t *row_block_size; /* Block size per row of indirect block */
- hsize_t *row_block_off; /* Cumulative offset per row of indirect block */
- hsize_t *row_tot_dblock_free; /* Total free space in dblocks for this row */
- /* (For indirect block rows, it's the total
- * free space in all direct blocks referenced
- * from the indirect block)
- */
- size_t *row_max_dblock_free; /* Max. free space in dblocks for this row */
- /* (For indirect block rows, it's the maximum
- * free space in a direct block referenced
- * from the indirect block)
- */
+ unsigned max_root_rows; /* Maximum # of rows in root indirect block */
+ unsigned max_direct_rows; /* Maximum # of direct rows in any indirect block */
+ unsigned start_bits; /* # of bits for starting block size (i.e. log2(start_block_size)) */
+ unsigned max_direct_bits; /* # of bits for max. direct block size (i.e. log2(max_direct_size)) */
+ unsigned max_dir_blk_off_size; /* Max. size of offsets in direct blocks */
+ unsigned first_row_bits; /* # of bits in address of first row */
+ hsize_t num_id_first_row; /* Number of IDs in first row of table */
+ hsize_t *row_block_size; /* Block size per row of indirect block */
+ hsize_t *row_block_off; /* Cumulative offset per row of indirect block */
+ hsize_t *row_tot_dblock_free; /* Total free space in dblocks for this row */
+ /* (For indirect block rows, it's the total
+ * free space in all direct blocks referenced
+ * from the indirect block)
+ */
+ size_t *row_max_dblock_free; /* Max. free space in dblocks for this row */
+ /* (For indirect block rows, it's the maximum
+ * free space in a direct block referenced
+ * from the indirect block)
+ */
} H5HF_dtable_t;
/* Fractal heap free list info (forward decl - defined in H5HFflist.c) */
@@ -226,39 +227,40 @@ typedef struct H5HF_indirect_t H5HF_indirect_t;
/* Fractal heap block location */
typedef struct H5HF_block_loc_t {
/* Necessary table fields */
- unsigned row; /* Row of block in doubling table */
- unsigned col; /* Column of block in doubling table */
+ unsigned row; /* Row of block in doubling table */
+ unsigned col; /* Column of block in doubling table */
/* Derived/computed/cached table fields */
- unsigned entry; /* Entry of block in doubling table */
+ unsigned entry; /* Entry of block in doubling table */
/* Infrastructure */
- H5HF_indirect_t *context; /* Pointer to the indirect block containing the block */
- struct H5HF_block_loc_t *up; /* Pointer to next level up in the stack of levels */
+ H5HF_indirect_t * context; /* Pointer to the indirect block containing the block */
+ struct H5HF_block_loc_t *up; /* Pointer to next level up in the stack of levels */
} H5HF_block_loc_t;
/* Fractal heap block iterator info */
typedef struct H5HF_block_iter_t {
- hbool_t ready; /* Set if iterator is finished initializing */
- H5HF_block_loc_t *curr; /* Pointer to the current level information for iterator */
+ hbool_t ready; /* Set if iterator is finished initializing */
+ H5HF_block_loc_t *curr; /* Pointer to the current level information for iterator */
} H5HF_block_iter_t;
/* Fractal heap free space section info */
typedef struct H5HF_free_section_t {
- H5FS_section_info_t sect_info; /* Free space section information (must be first in struct) */
+ H5FS_section_info_t sect_info; /* Free space section information (must be first in struct) */
union {
struct {
- H5HF_indirect_t *parent; /* Indirect block parent for free section's direct block */
- unsigned par_entry; /* Entry of free section's direct block in parent indirect block */
+ H5HF_indirect_t *parent; /* Indirect block parent for free section's direct block */
+ unsigned par_entry; /* Entry of free section's direct block in parent indirect block */
} single;
struct {
- struct H5HF_free_section_t *under; /* Pointer to indirect block underlying row section */
- unsigned row; /* Row for range of blocks */
- unsigned col; /* Column for range of blocks */
- unsigned num_entries; /* Number of entries covered */
+ struct H5HF_free_section_t *under; /* Pointer to indirect block underlying row section */
+ unsigned row; /* Row for range of blocks */
+ unsigned col; /* Column for range of blocks */
+ unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space manager */
+ hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space
+ manager */
} row;
struct {
/* Holds either a pointer to an indirect block (if its "live") or
@@ -268,23 +270,24 @@ typedef struct H5HF_free_section_t {
* or not)
*/
union {
- H5HF_indirect_t *iblock; /* Indirect block for free section */
- hsize_t iblock_off; /* Indirect block offset in "heap space" */
+ H5HF_indirect_t *iblock; /* Indirect block for free section */
+ hsize_t iblock_off; /* Indirect block offset in "heap space" */
} u;
- unsigned row; /* Row for range of blocks */
- unsigned col; /* Column for range of blocks */
- unsigned num_entries; /* Number of entries covered */
+ unsigned row; /* Row for range of blocks */
+ unsigned col; /* Column for range of blocks */
+ unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- struct H5HF_free_section_t *parent; /* Pointer to "parent" indirect section */
- unsigned par_entry; /* Entry within parent indirect section */
- hsize_t span_size; /* Size of space tracked, in "heap space" */
- unsigned iblock_entries; /* Number of entries in indirect block where section is located */
- unsigned rc; /* Reference count of outstanding row & child indirect sections */
- unsigned dir_nrows; /* Number of direct rows in section */
- struct H5HF_free_section_t **dir_rows; /* Array of pointers to outstanding row sections */
- unsigned indir_nents; /* Number of indirect entries in section */
- struct H5HF_free_section_t **indir_ents; /* Array of pointers to outstanding child indirect sections */
+ struct H5HF_free_section_t *parent; /* Pointer to "parent" indirect section */
+ unsigned par_entry; /* Entry within parent indirect section */
+ hsize_t span_size; /* Size of space tracked, in "heap space" */
+ unsigned iblock_entries; /* Number of entries in indirect block where section is located */
+ unsigned rc; /* Reference count of outstanding row & child indirect sections */
+ unsigned dir_nrows; /* Number of direct rows in section */
+ struct H5HF_free_section_t **dir_rows; /* Array of pointers to outstanding row sections */
+ unsigned indir_nents; /* Number of indirect entries in section */
+ struct H5HF_free_section_t *
+ *indir_ents; /* Array of pointers to outstanding child indirect sections */
} indirect;
} u;
} H5HF_free_section_t;
@@ -298,79 +301,81 @@ typedef struct H5HF_hdr_t {
H5AC_info_t cache_info;
/* General header information (stored in header) */
- unsigned id_len; /* Size of heap IDs (in bytes) */
- unsigned filter_len; /* Size of I/O filter information (in bytes) */
+ unsigned id_len; /* Size of heap IDs (in bytes) */
+ unsigned filter_len; /* Size of I/O filter information (in bytes) */
/* Flags for heap settings (stored in status byte in header) */
- hbool_t debug_objs; /* Is the heap storing objects in 'debug' format */
- hbool_t write_once; /* Is heap being written in "write once" mode? */
- hbool_t huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
- hbool_t checksum_dblocks; /* Should the direct blocks in the heap be checksummed? */
+ hbool_t debug_objs; /* Is the heap storing objects in 'debug' format */
+ hbool_t write_once; /* Is heap being written in "write once" mode? */
+ hbool_t huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
+ hbool_t checksum_dblocks; /* Should the direct blocks in the heap be checksummed? */
/* Doubling table information (partially stored in header) */
/* (Partially set by user, partially derived/updated internally) */
- H5HF_dtable_t man_dtable; /* Doubling-table info for managed objects */
+ H5HF_dtable_t man_dtable; /* Doubling-table info for managed objects */
/* Free space information for managed objects (stored in header) */
- hsize_t total_man_free; /* Total amount of free space in managed blocks */
- haddr_t fs_addr; /* Address of free space header on disk */
+ hsize_t total_man_free; /* Total amount of free space in managed blocks */
+ haddr_t fs_addr; /* Address of free space header on disk */
/* "Huge" object support (stored in header) */
- uint32_t max_man_size; /* Max. size of object to manage in doubling table */
- hsize_t huge_next_id; /* Next ID to use for indirectly tracked 'huge' object */
- haddr_t huge_bt2_addr; /* Address of v2 B-tree for tracking "huge" object info */
+ uint32_t max_man_size; /* Max. size of object to manage in doubling table */
+ hsize_t huge_next_id; /* Next ID to use for indirectly tracked 'huge' object */
+ haddr_t huge_bt2_addr; /* Address of v2 B-tree for tracking "huge" object info */
/* I/O filter support (stored in header, if any are used) */
- H5O_pline_t pline; /* I/O filter pipeline for heap objects */
- size_t pline_root_direct_size; /* Size of filtered root direct block */
+ H5O_pline_t pline; /* I/O filter pipeline for heap objects */
+ size_t pline_root_direct_size; /* Size of filtered root direct block */
unsigned pline_root_direct_filter_mask; /* I/O filter mask for filtered root direct block */
/* Statistics for heap (stored in header) */
- hsize_t man_size; /* Total amount of 'managed' space in heap */
- hsize_t man_alloc_size; /* Total amount of allocated 'managed' space in heap */
- hsize_t man_iter_off; /* Offset of iterator in 'managed' heap space */
- hsize_t man_nobjs; /* Number of 'managed' objects in heap */
- hsize_t huge_size; /* Total size of 'huge' objects in heap */
- hsize_t huge_nobjs; /* Number of 'huge' objects in heap */
- hsize_t tiny_size; /* Total size of 'tiny' objects in heap */
- hsize_t tiny_nobjs; /* Number of 'tiny' objects in heap */
+ hsize_t man_size; /* Total amount of 'managed' space in heap */
+ hsize_t man_alloc_size; /* Total amount of allocated 'managed' space in heap */
+ hsize_t man_iter_off; /* Offset of iterator in 'managed' heap space */
+ hsize_t man_nobjs; /* Number of 'managed' objects in heap */
+ hsize_t huge_size; /* Total size of 'huge' objects in heap */
+ hsize_t huge_nobjs; /* Number of 'huge' objects in heap */
+ hsize_t tiny_size; /* Total size of 'tiny' objects in heap */
+ hsize_t tiny_nobjs; /* Number of 'tiny' objects in heap */
/* Cached/computed values (not stored in header) */
- size_t rc; /* Reference count of heap's components using heap header */
- haddr_t heap_addr; /* Address of heap header in the file */
- size_t heap_size; /* Size of heap header in the file */
- H5AC_protect_t mode; /* Access mode for heap */
- H5F_t *f; /* Pointer to file for heap */
- size_t file_rc; /* Reference count of files using heap header */
- hbool_t pending_delete; /* Heap is pending deletion */
- uint8_t sizeof_size; /* Size of file sizes */
- uint8_t sizeof_addr; /* Size of file addresses */
+ size_t rc; /* Reference count of heap's components using heap header */
+ haddr_t heap_addr; /* Address of heap header in the file */
+ size_t heap_size; /* Size of heap header in the file */
+ H5AC_protect_t mode; /* Access mode for heap */
+ H5F_t * f; /* Pointer to file for heap */
+ size_t file_rc; /* Reference count of files using heap header */
+ hbool_t pending_delete; /* Heap is pending deletion */
+ uint8_t sizeof_size; /* Size of file sizes */
+ uint8_t sizeof_addr; /* Size of file addresses */
struct H5HF_indirect_t *root_iblock; /* Pointer to root indirect block */
- unsigned root_iblock_flags; /* Flags to indicate whether root indirect block is pinned/protected */
- H5FS_t *fspace; /* Free space list for objects in heap */
+ unsigned root_iblock_flags; /* Flags to indicate whether root indirect block is pinned/protected */
+ H5FS_t * fspace; /* Free space list for objects in heap */
H5HF_block_iter_t next_block; /* Block iterator for searching for next block with space */
- H5B2_t *huge_bt2; /* v2 B-tree handle for huge objects */
- hsize_t huge_max_id; /* Max. 'huge' heap ID before rolling 'huge' heap IDs over */
- uint8_t huge_id_size; /* Size of 'huge' heap IDs (in bytes) */
- hbool_t huge_ids_direct; /* Flag to indicate that 'huge' object's offset & length are stored directly in heap ID */
- size_t tiny_max_len; /* Max. size of tiny objects for this heap */
- hbool_t tiny_len_extended; /* Flag to indicate that 'tiny' object's length is stored in extended form (i.e. w/extra byte) */
- uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
- uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
- hbool_t checked_filters; /* TRUE if pipeline passes can_apply checks */
+ H5B2_t * huge_bt2; /* v2 B-tree handle for huge objects */
+ hsize_t huge_max_id; /* Max. 'huge' heap ID before rolling 'huge' heap IDs over */
+ uint8_t huge_id_size; /* Size of 'huge' heap IDs (in bytes) */
+ hbool_t huge_ids_direct; /* Flag to indicate that 'huge' object's offset & length are stored directly in
+ heap ID */
+ size_t tiny_max_len; /* Max. size of tiny objects for this heap */
+ hbool_t tiny_len_extended; /* Flag to indicate that 'tiny' object's length is stored in extended form
+ (i.e. w/extra byte) */
+ uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
+ uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
+ hbool_t checked_filters; /* TRUE if pipeline passes can_apply checks */
} H5HF_hdr_t;
/* Common indirect block doubling table entry */
/* (common between entries pointing to direct & indirect child blocks) */
typedef struct H5HF_indirect_ent_t {
- haddr_t addr; /* Direct block's address */
+ haddr_t addr; /* Direct block's address */
} H5HF_indirect_ent_t;
/* Extern indirect block doubling table entry for compressed direct blocks */
/* (only exists for indirect blocks in heaps that have I/O filters) */
typedef struct H5HF_indirect_filt_ent_t {
- size_t size; /* Size of child direct block, after passing though I/O filters */
- unsigned filter_mask; /* Excluded filters for child direct block */
+ size_t size; /* Size of child direct block, after passing though I/O filters */
+ unsigned filter_mask; /* Excluded filters for child direct block */
} H5HF_indirect_filt_ent_t;
/* Fractal heap indirect block */
@@ -379,22 +384,22 @@ struct H5HF_indirect_t {
H5AC_info_t cache_info;
/* Internal heap information (not stored) */
- size_t rc; /* Reference count of objects using this block */
- H5HF_hdr_t *hdr; /* Shared heap header info */
- struct H5HF_indirect_t *parent; /* Shared parent indirect block info */
- unsigned par_entry; /* Entry in parent's table */
- haddr_t addr; /* Address of this indirect block on disk */
- size_t size; /* Size of indirect block on disk */
- unsigned nrows; /* Total # of rows in indirect block */
- unsigned max_rows; /* Max. # of rows in indirect block */
- unsigned nchildren; /* Number of child blocks */
- unsigned max_child; /* Max. offset used in child entries */
+ size_t rc; /* Reference count of objects using this block */
+ H5HF_hdr_t * hdr; /* Shared heap header info */
+ struct H5HF_indirect_t * parent; /* Shared parent indirect block info */
+ unsigned par_entry; /* Entry in parent's table */
+ haddr_t addr; /* Address of this indirect block on disk */
+ size_t size; /* Size of indirect block on disk */
+ unsigned nrows; /* Total # of rows in indirect block */
+ unsigned max_rows; /* Max. # of rows in indirect block */
+ unsigned nchildren; /* Number of child blocks */
+ unsigned max_child; /* Max. offset used in child entries */
struct H5HF_indirect_t **child_iblocks; /* Array of pointers to pinned child indirect blocks */
/* Stored values */
- hsize_t block_off; /* Offset of the block within the heap's address space */
- H5HF_indirect_ent_t *ents; /* Pointer to block entry table */
- H5HF_indirect_filt_ent_t *filt_ents; /* Pointer to filtered information for direct blocks */
+ hsize_t block_off; /* Offset of the block within the heap's address space */
+ H5HF_indirect_ent_t * ents; /* Pointer to block entry table */
+ H5HF_indirect_filt_ent_t *filt_ents; /* Pointer to filtered information for direct blocks */
};
/* A fractal heap direct block */
@@ -403,111 +408,110 @@ typedef struct H5HF_direct_t {
H5AC_info_t cache_info;
/* Internal heap information */
- H5HF_hdr_t *hdr; /* Shared heap header info */
- H5HF_indirect_t *parent; /* Shared parent indirect block info */
- unsigned par_entry; /* Entry in parent's table */
- size_t size; /* Size of direct block */
- hsize_t file_size; /* Size of direct block in file (only valid when block's space is being freed) */
- unsigned blk_off_size; /* Size of offsets in the block */
- uint8_t *blk; /* Pointer to buffer containing block data */
+ H5HF_hdr_t * hdr; /* Shared heap header info */
+ H5HF_indirect_t *parent; /* Shared parent indirect block info */
+ unsigned par_entry; /* Entry in parent's table */
+ size_t size; /* Size of direct block */
+ hsize_t file_size; /* Size of direct block in file (only valid when block's space is being freed) */
+ unsigned blk_off_size; /* Size of offsets in the block */
+ uint8_t *blk; /* Pointer to buffer containing block data */
/* Stored values */
- hsize_t block_off; /* Offset of the block within the heap's address space */
+ hsize_t block_off; /* Offset of the block within the heap's address space */
} H5HF_direct_t;
/* Fractal heap */
struct H5HF_t {
- H5HF_hdr_t *hdr; /* Pointer to internal fractal heap header info */
- H5F_t *f; /* Pointer to file for heap */
+ H5HF_hdr_t *hdr; /* Pointer to internal fractal heap header info */
+ H5F_t * f; /* Pointer to file for heap */
};
/* Fractal heap "parent info" (for loading a block) */
typedef struct H5HF_parent_t {
- H5HF_hdr_t *hdr; /* Pointer to heap header info */
- H5HF_indirect_t *iblock; /* Pointer to parent indirect block */
- unsigned entry; /* Location of block in parent's entry table */
+ H5HF_hdr_t * hdr; /* Pointer to heap header info */
+ H5HF_indirect_t *iblock; /* Pointer to parent indirect block */
+ unsigned entry; /* Location of block in parent's entry table */
} H5HF_parent_t;
/* Typedef for indirectly accessed 'huge' object's records in the v2 B-tree */
typedef struct H5HF_huge_bt2_indir_rec_t {
- haddr_t addr; /* Address of the object in the file */
- hsize_t len; /* Length of the object in the file */
- hsize_t id; /* ID used for object (not used for 'huge' objects directly accessed) */
+ haddr_t addr; /* Address of the object in the file */
+ hsize_t len; /* Length of the object in the file */
+ hsize_t id; /* ID used for object (not used for 'huge' objects directly accessed) */
} H5HF_huge_bt2_indir_rec_t;
/* Typedef for indirectly accessed, filtered 'huge' object's records in the v2 B-tree */
typedef struct H5HF_huge_bt2_filt_indir_rec_t {
- haddr_t addr; /* Address of the filtered object in the file */
- hsize_t len; /* Length of the filtered object in the file */
- unsigned filter_mask; /* I/O pipeline filter mask for filtered object in the file */
- hsize_t obj_size; /* Size of the de-filtered object in memory */
- hsize_t id; /* ID used for object (not used for 'huge' objects directly accessed) */
+ haddr_t addr; /* Address of the filtered object in the file */
+ hsize_t len; /* Length of the filtered object in the file */
+ unsigned filter_mask; /* I/O pipeline filter mask for filtered object in the file */
+ hsize_t obj_size; /* Size of the de-filtered object in memory */
+ hsize_t id; /* ID used for object (not used for 'huge' objects directly accessed) */
} H5HF_huge_bt2_filt_indir_rec_t;
/* Typedef for directly accessed 'huge' object's records in the v2 B-tree */
typedef struct H5HF_huge_bt2_dir_rec_t {
- haddr_t addr; /* Address of the object in the file */
- hsize_t len; /* Length of the object in the file */
+ haddr_t addr; /* Address of the object in the file */
+ hsize_t len; /* Length of the object in the file */
} H5HF_huge_bt2_dir_rec_t;
/* Typedef for directly accessed, filtered 'huge' object's records in the v2 B-tree */
typedef struct H5HF_huge_bt2_filt_dir_rec_t {
- haddr_t addr; /* Address of the filtered object in the file */
- hsize_t len; /* Length of the filtered object in the file */
- unsigned filter_mask; /* I/O pipeline filter mask for filtered object in the file */
- hsize_t obj_size; /* Size of the de-filtered object in memory */
+ haddr_t addr; /* Address of the filtered object in the file */
+ hsize_t len; /* Length of the filtered object in the file */
+ unsigned filter_mask; /* I/O pipeline filter mask for filtered object in the file */
+ hsize_t obj_size; /* Size of the de-filtered object in memory */
} H5HF_huge_bt2_filt_dir_rec_t;
/* User data for free space section 'add' callback */
typedef struct {
- H5HF_hdr_t *hdr; /* Fractal heap header */
- hid_t dxpl_id; /* DXPL ID for operation */
+ H5HF_hdr_t *hdr; /* Fractal heap header */
+ hid_t dxpl_id; /* DXPL ID for operation */
} H5HF_sect_add_ud_t;
/* User data for v2 B-tree 'remove' callback on 'huge' objects */
typedef struct {
- H5HF_hdr_t *hdr; /* Fractal heap header (in) */
- hid_t dxpl_id; /* DXPL ID for operation (in) */
- hsize_t obj_len; /* Length of object removed (out) */
+ H5HF_hdr_t *hdr; /* Fractal heap header (in) */
+ hid_t dxpl_id; /* DXPL ID for operation (in) */
+ hsize_t obj_len; /* Length of object removed (out) */
} H5HF_huge_remove_ud_t;
/* User data for fractal heap header cache client callback */
typedef struct H5HF_hdr_cache_ud_t {
- H5F_t *f; /* File pointer */
- hid_t dxpl_id; /* DXPL ID for operation (in) */
+ H5F_t *f; /* File pointer */
+ hid_t dxpl_id; /* DXPL ID for operation (in) */
} H5HF_hdr_cache_ud_t;
/* User data for fractal heap indirect block cache client callbacks */
typedef struct H5HF_iblock_cache_ud_t {
- H5HF_parent_t * par_info; /* Parent info */
- H5F_t * f; /* File pointer */
- const unsigned *nrows; /* Number of rows */
+ H5HF_parent_t * par_info; /* Parent info */
+ H5F_t * f; /* File pointer */
+ const unsigned *nrows; /* Number of rows */
} H5HF_iblock_cache_ud_t;
/* User data for fractal heap direct block cache client callbacks */
typedef struct H5HF_dblock_cache_ud_t {
- H5HF_parent_t par_info; /* Parent info */
- H5F_t * f; /* File pointer */
- size_t odi_size; /* On disk image size of the direct block.
- * Note that there is no necessary relation
- * between this value, and the actual
- * direct block size, as conpression may
- * reduce the size of the on disk image,
- * and check sums may increase it.
- */
- size_t dblock_size; /* size of the direct block, which bears
- * no necessary relation to the block
- * odi_size -- the size of the on disk
- * image of the block. Note that the
- * metadata cache is only interested
- * in the odi_size, and thus it is this
- * value that is passed to the cache in
- * calls to it.
- */
- unsigned filter_mask; /* Excluded filters for direct block */
+ H5HF_parent_t par_info; /* Parent info */
+ H5F_t * f; /* File pointer */
+ size_t odi_size; /* On disk image size of the direct block.
+ * Note that there is no necessary relation
+ * between this value, and the actual
+ * direct block size, as conpression may
+ * reduce the size of the on disk image,
+ * and check sums may increase it.
+ */
+ size_t dblock_size; /* size of the direct block, which bears
+ * no necessary relation to the block
+ * odi_size -- the size of the on disk
+ * image of the block. Note that the
+ * metadata cache is only interested
+ * in the odi_size, and thus it is this
+ * value that is passed to the cache in
+ * calls to it.
+ */
+ unsigned filter_mask; /* Excluded filters for direct block */
} H5HF_dblock_cache_ud_t;
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -564,123 +568,104 @@ H5FL_EXTERN(H5HF_direct_t);
/* Declare a free list to manage heap direct block data to/from disk */
H5FL_BLK_EXTERN(direct_block);
-
/******************************/
/* Package Private Prototypes */
/******************************/
/* Doubling table routines */
-H5_DLL herr_t H5HF_dtable_init(H5HF_dtable_t *dtable);
-H5_DLL herr_t H5HF_dtable_dest(H5HF_dtable_t *dtable);
-H5_DLL herr_t H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off,
- unsigned *row, unsigned *col);
+H5_DLL herr_t H5HF_dtable_init(H5HF_dtable_t *dtable);
+H5_DLL herr_t H5HF_dtable_dest(H5HF_dtable_t *dtable);
+H5_DLL herr_t H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col);
H5_DLL unsigned H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size);
H5_DLL unsigned H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size);
-H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
- unsigned start_col, unsigned num_entries);
+H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row, unsigned start_col,
+ unsigned num_entries);
/* Heap header routines */
-H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f);
-H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
-H5_DLL H5HF_hdr_t *H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- H5AC_protect_t rw);
-H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_incr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_decr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr);
-H5_DLL size_t H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_dirty(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
-H5_DLL herr_t H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
-H5_DLL herr_t H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
-H5_DLL herr_t H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry);
-H5_DLL herr_t H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
-H5_DLL herr_t H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
-H5_DLL herr_t H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
-H5_DLL herr_t H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id,
- haddr_t dblock_addr);
-H5_DLL herr_t H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
-H5_DLL herr_t H5HF_hdr_empty(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_free(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
-H5_DLL herr_t H5HF_hdr_dest(H5HF_hdr_t *hdr);
+H5_DLL H5HF_hdr_t *H5HF_hdr_alloc(H5F_t *f);
+H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
+H5_DLL H5HF_hdr_t *H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw);
+H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_incr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_decr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr);
+H5_DLL size_t H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_dirty(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
+H5_DLL herr_t H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
+H5_DLL herr_t H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
+H5_DLL herr_t H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
+ unsigned curr_entry);
+H5_DLL herr_t H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock,
+ unsigned start_entry, unsigned nentries);
+H5_DLL herr_t H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
+H5_DLL herr_t H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
+H5_DLL herr_t H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr);
+H5_DLL herr_t H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
+H5_DLL herr_t H5HF_hdr_empty(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_free(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
+H5_DLL herr_t H5HF_hdr_dest(H5HF_hdr_t *hdr);
/* Indirect block routines */
H5_DLL herr_t H5HF_iblock_incr(H5HF_indirect_t *iblock);
H5_DLL herr_t H5HF_iblock_decr(H5HF_indirect_t *iblock);
H5_DLL herr_t H5HF_iblock_dirty(H5HF_indirect_t *iblock);
-H5_DLL herr_t H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
- size_t min_dblock_size);
-H5_DLL herr_t H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id,
- size_t min_dblock_size);
-H5_DLL herr_t H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t **sec_node);
-H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_indirect_t *par_iblock, unsigned par_entry, unsigned nrows,
- unsigned max_rows, haddr_t *addr_p);
-H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
- haddr_t iblock_addr, unsigned iblock_nrows,
- H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
- H5AC_protect_t rw, hbool_t *did_protect);
-H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
- unsigned cache_flags, hbool_t did_protect);
-H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
- haddr_t dblock_addr);
+H5_DLL herr_t H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
+H5_DLL herr_t H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
+H5_DLL herr_t H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t **sec_node);
+H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblock,
+ unsigned par_entry, unsigned nrows, unsigned max_rows, haddr_t *addr_p);
+H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
+ unsigned iblock_nrows, H5HF_indirect_t *par_iblock,
+ unsigned par_entry, hbool_t must_protect, H5AC_protect_t rw,
+ hbool_t *did_protect);
+H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned cache_flags,
+ hbool_t did_protect);
+H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t dblock_addr);
H5_DLL herr_t H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry);
-H5_DLL herr_t H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry,
- haddr_t *child_addr);
-H5_DLL herr_t H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id,
- haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock,
- unsigned par_entry);
-H5_DLL herr_t H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr,
- haddr_t iblock_addr, unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size/*out*/);
+H5_DLL herr_t H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *child_addr);
+H5_DLL herr_t H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
+ unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry);
+H5_DLL herr_t H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_addr,
+ unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry,
+ hsize_t *heap_size /*out*/);
H5_DLL herr_t H5HF_man_iblock_dest(H5HF_indirect_t *iblock);
/* Direct block routines */
H5_DLL herr_t H5HF_man_dblock_new(H5HF_hdr_t *fh, hid_t dxpl_id, size_t request,
- H5HF_free_section_t **ret_sec_node);
-H5_DLL herr_t H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr,
- H5HF_indirect_t *par_iblock, unsigned par_entry, haddr_t *addr_p,
- H5HF_free_section_t **ret_sec_node);
-H5_DLL herr_t H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_direct_t *dblock, haddr_t dblock_addr);
-H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
- haddr_t dblock_addr, size_t dblock_size,
- H5HF_indirect_t *par_iblock, unsigned par_entry,
- H5AC_protect_t rw);
-H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id,
- hsize_t obj_off, H5HF_indirect_t **par_iblock,
- unsigned *par_entry, hbool_t *par_did_protect, H5AC_protect_t rw);
-H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
- hsize_t dblock_size);
+ H5HF_free_section_t **ret_sec_node);
+H5_DLL herr_t H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
+ unsigned par_entry, haddr_t *addr_p, H5HF_free_section_t **ret_sec_node);
+H5_DLL herr_t H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
+ haddr_t dblock_addr);
+H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr,
+ size_t dblock_size, H5HF_indirect_t *par_iblock,
+ unsigned par_entry, H5AC_protect_t rw);
+H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
+ H5HF_indirect_t **par_iblock, unsigned *par_entry,
+ hbool_t *par_did_protect, H5AC_protect_t rw);
+H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr, hsize_t dblock_size);
H5_DLL herr_t H5HF_man_dblock_dest(H5HF_direct_t *dblock);
/* Managed object routines */
-H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
- const void *obj, void *id);
-H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
- void *obj);
-H5_DLL herr_t H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- const void *obj);
-H5_DLL herr_t H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- H5HF_operator_t op, void *op_data);
+H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size, const void *obj, void *id);
+H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id, void *obj);
+H5_DLL herr_t H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, const void *obj);
+H5_DLL herr_t H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op,
+ void *op_data);
H5_DLL herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id);
/* 'Huge' object routines */
H5_DLL herr_t H5HF_huge_init(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size,
- void *obj, void *id);
-H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id,
- const uint8_t *id, size_t *obj_len_p);
-H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
- void *obj);
-H5_DLL herr_t H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- const void *obj);
-H5_DLL herr_t H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
- H5HF_operator_t op, void *op_data);
+H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, void *obj, void *id);
+H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, size_t *obj_len_p);
+H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id, void *obj);
+H5_DLL herr_t H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, const void *obj);
+H5_DLL herr_t H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op,
+ void *op_data);
H5_DLL herr_t H5HF_huge_remove(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id);
H5_DLL herr_t H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id);
H5_DLL herr_t H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
@@ -696,80 +681,66 @@ H5_DLL herr_t H5HF_huge_bt2_filt_dir_remove(const void *nrecord, void *op_data);
/* 'Tiny' object routines */
H5_DLL herr_t H5HF_tiny_init(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj,
- void *id);
-H5_DLL herr_t H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
- size_t *obj_len_p);
+H5_DLL herr_t H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *id);
+H5_DLL herr_t H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p);
H5_DLL herr_t H5HF_tiny_read(H5HF_hdr_t *fh, const uint8_t *id, void *obj);
-H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id,
- H5HF_operator_t op, void *op_data);
+H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_data);
H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
/* Debugging routines for dumping file structures */
-H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id,
- hbool_t dump_internal, FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec);
-H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows);
+H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t dump_internal, FILE *stream,
+ int indent, int fwidth);
+H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t hdr_addr, size_t nrec);
+H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *stream, int indent,
+ int fwidth);
+H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
+ haddr_t hdr_addr, unsigned nrows);
/* Block iteration routines */
-H5_DLL herr_t H5HF_man_iter_init(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_block_iter_t *biter, hsize_t offset);
-H5_DLL herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
- H5HF_indirect_t *iblock, unsigned start_entry);
-H5_DLL herr_t H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr,
- H5HF_block_iter_t *biter, unsigned entry);
-H5_DLL herr_t H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
- unsigned nentries);
-H5_DLL herr_t H5HF_man_iter_up(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
-H5_DLL herr_t H5HF_man_iter_reset(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
- unsigned *entry, H5HF_indirect_t **block);
-H5_DLL herr_t H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
- hsize_t *offset);
+H5_DLL herr_t H5HF_man_iter_init(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_block_iter_t *biter,
+ hsize_t offset);
+H5_DLL herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indirect_t *iblock,
+ unsigned start_entry);
+H5_DLL herr_t H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry);
+H5_DLL herr_t H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries);
+H5_DLL herr_t H5HF_man_iter_up(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF_man_iter_reset(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsigned *entry,
+ H5HF_indirect_t **block);
+H5_DLL herr_t H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset);
H5_DLL hbool_t H5HF_man_iter_ready(H5HF_block_iter_t *biter);
/* Free space manipulation routines */
H5_DLL herr_t H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create);
-H5_DLL herr_t H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *node, unsigned flags);
-H5_DLL htri_t H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request,
- H5HF_free_section_t **node);
+H5_DLL herr_t H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node, unsigned flags);
+H5_DLL htri_t H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request, H5HF_free_section_t **node);
H5_DLL herr_t H5HF_space_revert_root(const H5HF_hdr_t *hdr, hid_t dxpl_id);
-H5_DLL herr_t H5HF_space_create_root(const H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_indirect_t *root_iblock);
+H5_DLL herr_t H5HF_space_create_root(const H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *root_iblock);
H5_DLL herr_t H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size);
-H5_DLL herr_t H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *node);
+H5_DLL herr_t H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node);
H5_DLL herr_t H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id);
H5_DLL herr_t H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
-H5_DLL herr_t H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, unsigned new_class);
+H5_DLL herr_t H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ unsigned new_class);
/* Free space section routines */
-H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off,
- size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry);
-H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
-H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size);
-H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, size_t amt);
-H5_DLL herr_t H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
-H5_DLL herr_t H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, unsigned *entry_p);
+H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *parent,
+ unsigned par_entry);
+H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
+H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ haddr_t *dblock_addr, size_t *dblock_size);
+H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, size_t amt);
+H5_DLL herr_t H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
+H5_DLL herr_t H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ unsigned *entry_p);
H5_DLL H5HF_indirect_t *H5HF_sect_row_get_iblock(H5HF_free_section_t *sect);
-H5_DLL herr_t H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
-H5_DLL herr_t H5HF_sect_single_free(H5FS_section_info_t *sect);
+H5_DLL herr_t H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock,
+ unsigned start_entry, unsigned nentries);
+H5_DLL herr_t H5HF_sect_single_free(H5FS_section_info_t *sect);
/* Internal operator callbacks */
H5_DLL herr_t H5HF_op_read(const void *obj, size_t obj_len, void *op_data);
@@ -777,21 +748,18 @@ H5_DLL herr_t H5HF_op_write(const void *obj, size_t obj_len, void *op_data);
/* Testing routines */
#ifdef H5HF_TESTING
-H5_DLL herr_t H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam);
-H5_DLL int H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2);
+H5_DLL herr_t H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam);
+H5_DLL int H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2);
H5_DLL unsigned H5HF_get_max_root_rows(const H5HF_t *fh);
H5_DLL unsigned H5HF_get_dtable_width_test(const H5HF_t *fh);
H5_DLL unsigned H5HF_get_dtable_max_drows_test(const H5HF_t *fh);
H5_DLL unsigned H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos);
-H5_DLL hsize_t H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row);
-H5_DLL hsize_t H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row);
-H5_DLL herr_t H5HF_get_id_off_test(const H5HF_t *fh, const void *id, hsize_t *obj_off);
-H5_DLL herr_t H5HF_get_id_type_test(const void *id, unsigned char *obj_type);
-H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
- hbool_t *len_extended);
-H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id,
- hbool_t *ids_direct);
+H5_DLL hsize_t H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row);
+H5_DLL hsize_t H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row);
+H5_DLL herr_t H5HF_get_id_off_test(const H5HF_t *fh, const void *id, hsize_t *obj_off);
+H5_DLL herr_t H5HF_get_id_type_test(const void *id, unsigned char *obj_type);
+H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended);
+H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct);
#endif /* H5HF_TESTING */
#endif /* _H5HFpkg_H */
-
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index 09bbdbe..1075945 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFprivate.h
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible fractal heap routines.
*
@@ -29,8 +29,8 @@
#include "H5HFpublic.h"
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
-#include "H5Oprivate.h" /* Object headers */
+#include "H5Fprivate.h" /* File access */
+#include "H5Oprivate.h" /* Object headers */
/**************************/
/* Library Private Macros */
@@ -39,8 +39,7 @@
/* Limit heap ID length to 4096 + 1, due to # of bits required to store
* length of 'tiny' objects (12 bits)
*/
-#define H5HF_MAX_ID_LEN (4096 + 1)
-
+#define H5HF_MAX_ID_LEN (4096 + 1)
/****************************/
/* Library Private Typedefs */
@@ -48,59 +47,58 @@
/* Creation parameters for doubling-tables */
typedef struct H5HF_dtable_cparam_t {
- unsigned width; /* Number of columns in the table (must be power of 2) */
- size_t start_block_size; /* Starting block size for table (must be power of 2) */
- size_t max_direct_size; /* Maximum size of a direct block (must be power of 2) */
- unsigned max_index; /* Maximum ID/offset for table (integer log2 of actual value, ie. the # of bits required) */
- unsigned start_root_rows; /* Starting number of rows for root indirect block */
- /* 0 indicates to create the full indirect block for the root,
- * right from the start. Doesn't have to be power of 2
- */
+ unsigned width; /* Number of columns in the table (must be power of 2) */
+ size_t start_block_size; /* Starting block size for table (must be power of 2) */
+ size_t max_direct_size; /* Maximum size of a direct block (must be power of 2) */
+ unsigned max_index; /* Maximum ID/offset for table (integer log2 of actual value, ie. the # of bits
+ required) */
+ unsigned start_root_rows; /* Starting number of rows for root indirect block */
+ /* 0 indicates to create the full indirect block for the root,
+ * right from the start. Doesn't have to be power of 2
+ */
} H5HF_dtable_cparam_t;
/* Fractal heap creation parameters */
typedef struct H5HF_create_t {
- H5HF_dtable_cparam_t managed;/* Mapped object doubling-table creation parameters */
- hbool_t checksum_dblocks; /* Whether the direct blocks should be checksummed */
- uint32_t max_man_size; /* Max. size of object to manage in doubling table */
- /* (i.e. min. size of object to store standalone) */
- uint16_t id_len; /* Length of IDs to use for heap objects */
- /* (0 - make ID just large enough to hold length & offset of object in the heap) */
- /* (1 - make ID just large enough to allow 'huge' objects to be accessed directly) */
- /* (n - make ID 'n' bytes in size) */
- H5O_pline_t pline; /* I/O filter pipeline to apply to direct blocks & 'huge' objects */
+ H5HF_dtable_cparam_t managed; /* Mapped object doubling-table creation parameters */
+ hbool_t checksum_dblocks; /* Whether the direct blocks should be checksummed */
+ uint32_t max_man_size; /* Max. size of object to manage in doubling table */
+ /* (i.e. min. size of object to store standalone) */
+ uint16_t id_len; /* Length of IDs to use for heap objects */
+ /* (0 - make ID just large enough to hold length & offset of object in the heap) */
+ /* (1 - make ID just large enough to allow 'huge' objects to be accessed directly) */
+ /* (n - make ID 'n' bytes in size) */
+ H5O_pline_t pline; /* I/O filter pipeline to apply to direct blocks & 'huge' objects */
} H5HF_create_t;
/* Fractal heap metadata statistics info */
typedef struct H5HF_stat_t {
/* 'Managed' object info */
- hsize_t man_size; /* Size of 'managed' space in heap */
- hsize_t man_alloc_size; /* Size of 'managed' space allocated in heap */
- hsize_t man_iter_off; /* Offset of "new block" iterator in 'managed' heap space */
- hsize_t man_free_space; /* Free space within 'managed' heap blocks */
- hsize_t man_nobjs; /* Number of 'managed' objects in heap */
+ hsize_t man_size; /* Size of 'managed' space in heap */
+ hsize_t man_alloc_size; /* Size of 'managed' space allocated in heap */
+ hsize_t man_iter_off; /* Offset of "new block" iterator in 'managed' heap space */
+ hsize_t man_free_space; /* Free space within 'managed' heap blocks */
+ hsize_t man_nobjs; /* Number of 'managed' objects in heap */
/* 'Huge' object info */
- hsize_t huge_size; /* Size of 'huge' objects in heap */
- hsize_t huge_nobjs; /* Number of 'huge' objects in heap */
+ hsize_t huge_size; /* Size of 'huge' objects in heap */
+ hsize_t huge_nobjs; /* Number of 'huge' objects in heap */
/* 'Tiny' object info */
- hsize_t tiny_size; /* Size of 'tiny' objects in heap */
- hsize_t tiny_nobjs; /* Number of 'tiny' objects in heap */
+ hsize_t tiny_size; /* Size of 'tiny' objects in heap */
+ hsize_t tiny_nobjs; /* Number of 'tiny' objects in heap */
} H5HF_stat_t;
/* Fractal heap info (forward decl - defined in H5HFpkg.h) */
typedef struct H5HF_t H5HF_t;
/* Typedef for 'op' operations */
-typedef herr_t (*H5HF_operator_t)(const void *obj/*in*/, size_t obj_len,
- void *op_data/*in,out*/);
+typedef herr_t (*H5HF_operator_t)(const void *obj /*in*/, size_t obj_len, void *op_data /*in,out*/);
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
@@ -108,31 +106,24 @@ typedef herr_t (*H5HF_operator_t)(const void *obj/*in*/, size_t obj_len,
/* General routines for fractal heap operations */
H5_DLL H5HF_t *H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
H5_DLL H5HF_t *H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr);
-H5_DLL herr_t H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p/*out*/);
-H5_DLL herr_t H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr/*out*/);
-H5_DLL herr_t H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size,
- const void *obj, void *id/*out*/);
-H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *id,
- size_t *obj_len_p/*out*/);
-H5_DLL herr_t H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *id,
- void *obj/*out*/);
-H5_DLL herr_t H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *id, hbool_t *id_changed,
- const void *obj);
-H5_DLL herr_t H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *id,
- H5HF_operator_t op, void *op_data);
-H5_DLL herr_t H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *id);
-H5_DLL herr_t H5HF_close(H5HF_t *fh, hid_t dxpl_id);
-H5_DLL herr_t H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr);
+H5_DLL herr_t H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p /*out*/);
+H5_DLL herr_t H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr /*out*/);
+H5_DLL herr_t H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj, void *id /*out*/);
+H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *id, size_t *obj_len_p /*out*/);
+H5_DLL herr_t H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *id, void *obj /*out*/);
+H5_DLL herr_t H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *id, hbool_t *id_changed, const void *obj);
+H5_DLL herr_t H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *id, H5HF_operator_t op, void *op_data);
+H5_DLL herr_t H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *id);
+H5_DLL herr_t H5HF_close(H5HF_t *fh, hid_t dxpl_id);
+H5_DLL herr_t H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr);
/* Statistics routines */
H5_DLL herr_t H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats);
-H5_DLL herr_t H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size/*out*/);
+H5_DLL herr_t H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size /*out*/);
/* Debugging routines */
#ifdef H5HF_DEBUGGING
-H5_DLL herr_t H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
#endif /* H5HF_DEBUGGING */
#endif /* _H5HFprivate_H */
-
diff --git a/src/H5HFpublic.h b/src/H5HFpublic.h
index 82cfc21..c35ceb9 100644
--- a/src/H5HFpublic.h
+++ b/src/H5HFpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFpublic.h
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Public declarations for the fractal heap package.
*
@@ -49,4 +49,3 @@ extern "C" {
#endif
#endif /* _H5HFpublic_H */
-
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index a3ccd46..a940243 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -6,16 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, May 1, 2006
*
- * Purpose: Free space section routines for fractal heaps.
+ * Purpose: Free space section routines for fractal heaps
*
*/
@@ -23,160 +23,134 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
/* Size of serialized indirect section information */
-#define H5HF_SECT_INDIRECT_SERIAL_SIZE(h) ( \
- (h)->heap_off_size /* Indirect block's offset in "heap space" */ \
- + 2 /* Row */ \
- + 2 /* Column */ \
- + 2 /* # of entries */ \
+#define H5HF_SECT_INDIRECT_SERIAL_SIZE(h) \
+ ((h)->heap_off_size /* Indirect block's offset in "heap space" */ \
+ + 2 /* Row */ \
+ + 2 /* Column */ \
+ + 2 /* # of entries */ \
)
-
/******************/
/* Local Typedefs */
/******************/
/* Typedef for "class private" information for sections */
typedef struct {
- H5HF_hdr_t *hdr; /* Pointer to fractal heap header */
+ H5HF_hdr_t *hdr; /* Pointer to fractal heap header */
} H5HF_sect_private_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Shared routines */
-static herr_t H5HF_sect_init_cls(H5FS_section_class_t *cls,
- H5HF_hdr_t *hdr);
-static herr_t H5HF_sect_term_cls(H5FS_section_class_t *cls);
-static H5HF_free_section_t *H5HF_sect_node_new(unsigned sect_type,
- haddr_t sect_addr, hsize_t sect_size, H5FS_section_state_t state);
-static herr_t H5HF_sect_node_free(H5HF_free_section_t *sect,
- H5HF_indirect_t *parent);
+static herr_t H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr);
+static herr_t H5HF_sect_term_cls(H5FS_section_class_t *cls);
+static H5HF_free_section_t *H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
+ H5FS_section_state_t state);
+static herr_t H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *parent);
/* 'single' section routines */
-static herr_t H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id,
- hbool_t refresh, H5HF_free_section_t *sect);
-static herr_t H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
+static herr_t H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh,
+ H5HF_free_section_t *sect);
+static herr_t H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
/* 'single' section callbacks */
-static herr_t H5HF_sect_single_add(H5FS_section_info_t *sect, unsigned *flags,
- void *udata);
-static H5FS_section_info_t *H5HF_sect_single_deserialize(const H5FS_section_class_t *cls,
- hid_t dxpl_id, const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags);
-static htri_t H5HF_sect_single_can_merge(const H5FS_section_info_t *sect1,
- const H5FS_section_info_t *sect2, void *udata);
-static herr_t H5HF_sect_single_merge(H5FS_section_info_t *sect1,
- H5FS_section_info_t *sect2, void *udata);
-static htri_t H5HF_sect_single_can_shrink(const H5FS_section_info_t *sect,
- void *udata);
-static herr_t H5HF_sect_single_shrink(H5FS_section_info_t **_sect,
- void *udata);
-static herr_t H5HF_sect_single_valid(const H5FS_section_class_t *cls,
- const H5FS_section_info_t *sect);
+static herr_t H5HF_sect_single_add(H5FS_section_info_t *sect, unsigned *flags, void *udata);
+static H5FS_section_info_t *H5HF_sect_single_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
+ const uint8_t *buf, haddr_t sect_addr,
+ hsize_t sect_size, unsigned *des_flags);
+static htri_t H5HF_sect_single_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2,
+ void *udata);
+static herr_t H5HF_sect_single_merge(H5FS_section_info_t *sect1, H5FS_section_info_t *sect2, void *udata);
+static htri_t H5HF_sect_single_can_shrink(const H5FS_section_info_t *sect, void *udata);
+static herr_t H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void *udata);
+static herr_t H5HF_sect_single_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect);
/* 'row' section routines */
-static H5HF_free_section_t *H5HF_sect_row_create(haddr_t sect_off,
- hsize_t sect_size, hbool_t is_first, unsigned row, unsigned col,
- unsigned nentries, H5HF_free_section_t *under_sect);
-static herr_t H5HF_sect_row_first(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
-static herr_t H5HF_sect_row_from_single(H5HF_hdr_t *hdr,
- H5HF_free_section_t *sect, H5HF_direct_t *dblock);
+static H5HF_free_section_t *H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
+ unsigned row, unsigned col, unsigned nentries,
+ H5HF_free_section_t *under_sect);
+static herr_t H5HF_sect_row_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
+static herr_t H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_direct_t *dblock);
static herr_t H5HF_sect_row_free_real(H5HF_free_section_t *sect);
/* 'row' section callbacks */
static herr_t H5HF_sect_row_init_cls(H5FS_section_class_t *cls, void *udata);
static herr_t H5HF_sect_row_term_cls(H5FS_section_class_t *cls);
-static herr_t H5HF_sect_row_serialize(const H5FS_section_class_t *cls,
- const H5FS_section_info_t *sect, uint8_t *buf);
-static H5FS_section_info_t *H5HF_sect_row_deserialize(const H5FS_section_class_t *cls,
- hid_t dxpl_id, const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags);
-static htri_t H5HF_sect_row_can_merge(const H5FS_section_info_t *sect1,
- const H5FS_section_info_t *sect2, void *udata);
-static herr_t H5HF_sect_row_merge(H5FS_section_info_t *sect1,
- H5FS_section_info_t *sect2, void *udata);
-static htri_t H5HF_sect_row_can_shrink(const H5FS_section_info_t *sect,
- void *udata);
-static herr_t H5HF_sect_row_shrink(H5FS_section_info_t **sect,
- void *udata);
+static herr_t H5HF_sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect,
+ uint8_t *buf);
+static H5FS_section_info_t *H5HF_sect_row_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
+ const uint8_t *buf, haddr_t sect_addr,
+ hsize_t sect_size, unsigned *des_flags);
+static htri_t H5HF_sect_row_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2,
+ void *udata);
+static herr_t H5HF_sect_row_merge(H5FS_section_info_t *sect1, H5FS_section_info_t *sect2, void *udata);
+static htri_t H5HF_sect_row_can_shrink(const H5FS_section_info_t *sect, void *udata);
+static herr_t H5HF_sect_row_shrink(H5FS_section_info_t **sect, void *udata);
static herr_t H5HF_sect_row_free(H5FS_section_info_t *sect);
-static herr_t H5HF_sect_row_valid(const H5FS_section_class_t *cls,
- const H5FS_section_info_t *sect);
-static herr_t H5HF_sect_row_debug(const H5FS_section_info_t *sect,
- FILE *stream, int indent, int fwidth);
+static herr_t H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect);
+static herr_t H5HF_sect_row_debug(const H5FS_section_info_t *sect, FILE *stream, int indent, int fwidth);
/* 'indirect' section routines */
-static H5HF_free_section_t *H5HF_sect_indirect_new(H5HF_hdr_t *hdr,
- haddr_t sect_off, hsize_t sect_size,
- H5HF_indirect_t *iblock, hsize_t iblock_off,
- unsigned row, unsigned col, unsigned nentries);
-static herr_t H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, hbool_t first_child, H5HF_free_section_t **first_row_sect,
- unsigned space_flags, unsigned start_row, unsigned start_col,
- unsigned end_row, unsigned end_col);
-static H5HF_free_section_t *H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr,
- H5HF_indirect_t *iblock, H5HF_free_section_t *row_sect);
-static herr_t H5HF_sect_indirect_decr(H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, H5HF_indirect_t *sect_iblock);
-static herr_t H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *row_sect, hbool_t *alloc_from_start);
-static herr_t H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, unsigned child_entry);
-static herr_t H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
+static H5HF_free_section_t *H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
+ H5HF_indirect_t *iblock, hsize_t iblock_off, unsigned row,
+ unsigned col, unsigned nentries);
+static herr_t H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ hbool_t first_child, H5HF_free_section_t **first_row_sect,
+ unsigned space_flags, unsigned start_row, unsigned start_col,
+ unsigned end_row, unsigned end_col);
+static H5HF_free_section_t *H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
+ H5HF_free_section_t *row_sect);
+static herr_t H5HF_sect_indirect_decr(H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ H5HF_indirect_t *sect_iblock);
+static herr_t H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *row_sect,
+ hbool_t *alloc_from_start);
+static herr_t H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ unsigned child_entry);
+static herr_t H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
static hbool_t H5HF_sect_indirect_is_first(H5HF_free_section_t *sect);
-static H5HF_indirect_t * H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect);
-static hsize_t H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect);
-static H5HF_free_section_t * H5HF_sect_indirect_top(H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect1, H5HF_free_section_t *sect2);
+static H5HF_indirect_t * H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect);
+static hsize_t H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect);
+static H5HF_free_section_t *H5HF_sect_indirect_top(H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect1,
+ H5HF_free_section_t *sect2);
static herr_t H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_shrink(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr,
- const H5HF_free_section_t *sect, uint8_t *buf);
-static H5FS_section_info_t *H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr,
- hid_t dxpl_id, const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags);
-static herr_t H5HF_sect_indirect_free(H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr,
- const H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
- FILE *stream, int indent, int fwidth);
+static herr_t H5HF_sect_indirect_shrink(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect, uint8_t *buf);
+static H5FS_section_info_t *H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *buf,
+ haddr_t sect_addr, hsize_t sect_size,
+ unsigned *des_flags);
+static herr_t H5HF_sect_indirect_free(H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect);
+static herr_t H5HF_sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int indent, int fwidth);
/* 'indirect' section callbacks */
static herr_t H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *udata);
static herr_t H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls);
-
/*********************/
/* Package Variables */
/*********************/
@@ -184,27 +158,27 @@ static herr_t H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls);
/* Class info for "single" free space sections */
H5FS_section_class_t H5HF_FSPACE_SECT_CLS_SINGLE[1] = {{
/* Class variables */
- H5HF_FSPACE_SECT_SINGLE, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM, /* Class flags */
- NULL, /* Class private info */
+ H5HF_FSPACE_SECT_SINGLE, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- NULL, /* Initialize section class */
- NULL, /* Terminate section class */
+ NULL, /* Initialize section class */
+ NULL, /* Terminate section class */
/* Object methods */
- H5HF_sect_single_add, /* Add section */
- NULL, /* Serialize section */
- H5HF_sect_single_deserialize, /* Deserialize section */
- H5HF_sect_single_can_merge, /* Can sections merge? */
- H5HF_sect_single_merge, /* Merge sections */
- H5HF_sect_single_can_shrink, /* Can section shrink container?*/
- H5HF_sect_single_shrink, /* Shrink container w/section */
- H5HF_sect_single_free, /* Free section */
- H5HF_sect_single_valid, /* Check validity of section */
- NULL, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ H5HF_sect_single_add, /* Add section */
+ NULL, /* Serialize section */
+ H5HF_sect_single_deserialize, /* Deserialize section */
+ H5HF_sect_single_can_merge, /* Can sections merge? */
+ H5HF_sect_single_merge, /* Merge sections */
+ H5HF_sect_single_can_shrink, /* Can section shrink container?*/
+ H5HF_sect_single_shrink, /* Shrink container w/section */
+ H5HF_sect_single_free, /* Free section */
+ H5HF_sect_single_valid, /* Check validity of section */
+ NULL, /* Split section node for alignment */
+ NULL, /* Dump debugging for section */
}};
/* Class info for "first row" free space sections */
@@ -213,53 +187,53 @@ H5FS_section_class_t H5HF_FSPACE_SECT_CLS_SINGLE[1] = {{
*/
H5FS_section_class_t H5HF_FSPACE_SECT_CLS_FIRST_ROW[1] = {{
/* Class variables */
- H5HF_FSPACE_SECT_FIRST_ROW, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM, /* Class flags */
- NULL, /* Class private info */
+ H5HF_FSPACE_SECT_FIRST_ROW, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- H5HF_sect_row_init_cls, /* Initialize section class */
- H5HF_sect_row_term_cls, /* Terminate section class */
+ H5HF_sect_row_init_cls, /* Initialize section class */
+ H5HF_sect_row_term_cls, /* Terminate section class */
/* Object methods */
- NULL, /* Add section */
- H5HF_sect_row_serialize, /* Serialize section */
- H5HF_sect_row_deserialize, /* Deserialize section */
- H5HF_sect_row_can_merge, /* Can sections merge? */
- H5HF_sect_row_merge, /* Merge sections */
- H5HF_sect_row_can_shrink, /* Can section shrink container?*/
- H5HF_sect_row_shrink, /* Shrink container w/section */
- H5HF_sect_row_free, /* Free section */
- H5HF_sect_row_valid, /* Check validity of section */
- NULL, /* Split section node for alignment */
- H5HF_sect_row_debug, /* Dump debugging for section */
+ NULL, /* Add section */
+ H5HF_sect_row_serialize, /* Serialize section */
+ H5HF_sect_row_deserialize, /* Deserialize section */
+ H5HF_sect_row_can_merge, /* Can sections merge? */
+ H5HF_sect_row_merge, /* Merge sections */
+ H5HF_sect_row_can_shrink, /* Can section shrink container?*/
+ H5HF_sect_row_shrink, /* Shrink container w/section */
+ H5HF_sect_row_free, /* Free section */
+ H5HF_sect_row_valid, /* Check validity of section */
+ NULL, /* Split section node for alignment */
+ H5HF_sect_row_debug, /* Dump debugging for section */
}};
/* Class info for "normal row" free space sections */
H5FS_section_class_t H5HF_FSPACE_SECT_CLS_NORMAL_ROW[1] = {{
/* Class variables */
- H5HF_FSPACE_SECT_NORMAL_ROW, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM|H5FS_CLS_SEPAR_OBJ|H5FS_CLS_GHOST_OBJ, /* Class flags */
- NULL, /* Class private info */
+ H5HF_FSPACE_SECT_NORMAL_ROW, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM | H5FS_CLS_SEPAR_OBJ | H5FS_CLS_GHOST_OBJ, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- H5HF_sect_row_init_cls, /* Initialize section class */
- H5HF_sect_row_term_cls, /* Terminate section class */
+ H5HF_sect_row_init_cls, /* Initialize section class */
+ H5HF_sect_row_term_cls, /* Terminate section class */
/* Object methods */
- NULL, /* Add section */
- NULL, /* Serialize section */
- NULL, /* Deserialize section */
- NULL, /* Can sections merge? */
- NULL, /* Merge sections */
- NULL, /* Can section shrink container?*/
- NULL, /* Shrink container w/section */
- H5HF_sect_row_free, /* Free section */
- H5HF_sect_row_valid, /* Check validity of section */
- NULL, /* Split section node for alignment */
- H5HF_sect_row_debug, /* Dump debugging for section */
+ NULL, /* Add section */
+ NULL, /* Serialize section */
+ NULL, /* Deserialize section */
+ NULL, /* Can sections merge? */
+ NULL, /* Merge sections */
+ NULL, /* Can section shrink container?*/
+ NULL, /* Shrink container w/section */
+ H5HF_sect_row_free, /* Free section */
+ H5HF_sect_row_valid, /* Check validity of section */
+ NULL, /* Split section node for alignment */
+ H5HF_sect_row_debug, /* Dump debugging for section */
}};
/* Class info for "indirect" free space sections */
@@ -268,44 +242,40 @@ H5FS_section_class_t H5HF_FSPACE_SECT_CLS_NORMAL_ROW[1] = {{
*/
H5FS_section_class_t H5HF_FSPACE_SECT_CLS_INDIRECT[1] = {{
/* Class variables */
- H5HF_FSPACE_SECT_INDIRECT, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM|H5FS_CLS_GHOST_OBJ, /* Class flags */
- NULL, /* Class private info */
+ H5HF_FSPACE_SECT_INDIRECT, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM | H5FS_CLS_GHOST_OBJ, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- H5HF_sect_indirect_init_cls, /* Initialize section class */
- H5HF_sect_indirect_term_cls, /* Terminate section class */
+ H5HF_sect_indirect_init_cls, /* Initialize section class */
+ H5HF_sect_indirect_term_cls, /* Terminate section class */
/* Object methods */
- NULL, /* Add section */
- NULL, /* Serialize section */
- NULL, /* Deserialize section */
- NULL, /* Can sections merge? */
- NULL, /* Merge sections */
- NULL, /* Can section shrink container?*/
- NULL, /* Shrink container w/section */
- NULL, /* Free section */
- NULL, /* Check validity of section */
- NULL, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ NULL, /* Add section */
+ NULL, /* Serialize section */
+ NULL, /* Deserialize section */
+ NULL, /* Can sections merge? */
+ NULL, /* Merge sections */
+ NULL, /* Can section shrink container?*/
+ NULL, /* Shrink container w/section */
+ NULL, /* Free section */
+ NULL, /* Check validity of section */
+ NULL, /* Split section node for alignment */
+ NULL, /* Dump debugging for section */
}};
/* Declare a free list to manage the H5HF_free_section_t struct */
H5FL_DEFINE(H5HF_free_section_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_init_cls
*
@@ -322,8 +292,8 @@ H5FL_DEFINE(H5HF_free_section_t);
static herr_t
H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
{
- H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -334,20 +304,19 @@ H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
/* Allocate & initialize the class-private (i.e. private shared) information
* for this type of section
*/
- if(NULL == (cls_prvt = (H5HF_sect_private_t *)H5MM_malloc(sizeof(H5HF_sect_private_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- cls_prvt->hdr = hdr;
+ if (NULL == (cls_prvt = (H5HF_sect_private_t *)H5MM_malloc(sizeof(H5HF_sect_private_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ cls_prvt->hdr = hdr;
cls->cls_private = cls_prvt;
/* Increment reference count on heap header */
- if(H5HF_hdr_incr(hdr) < 0)
+ if (H5HF_hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_init_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_term_cls
*
@@ -364,8 +333,8 @@ done:
static herr_t
H5HF_sect_term_cls(H5FS_section_class_t *cls)
{
- H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -376,7 +345,7 @@ H5HF_sect_term_cls(H5FS_section_class_t *cls)
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
/* Decrement reference count on heap header */
- if(H5HF_hdr_decr(cls_prvt->hdr) < 0)
+ if (H5HF_hdr_decr(cls_prvt->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
/* Free the class private information */
@@ -386,7 +355,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_term_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_node_new
*
@@ -402,11 +370,10 @@ done:
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
- H5FS_section_state_t sect_state)
+H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size, H5FS_section_state_t sect_state)
{
- H5HF_free_section_t *new_sect; /* New section */
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *new_sect; /* New section */
+ H5HF_free_section_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -414,15 +381,16 @@ H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
HDassert(H5F_addr_defined(sect_addr));
/* Create free list section node */
- if(NULL == (new_sect = H5FL_MALLOC(H5HF_free_section_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct block free list section")
+ if (NULL == (new_sect = H5FL_MALLOC(H5HF_free_section_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for direct block free list section")
/* Set the information passed in */
new_sect->sect_info.addr = sect_addr;
new_sect->sect_info.size = sect_size;
/* Set the section's class & state */
- new_sect->sect_info.type = sect_type;
+ new_sect->sect_info.type = sect_type;
new_sect->sect_info.state = sect_state;
/* Set return value */
@@ -432,7 +400,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_node_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_node_free
*
@@ -450,25 +417,25 @@ done:
herr_t
H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
/* Release indirect block, if there was one */
- if(iblock)
- if(H5HF_iblock_decr(iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on section's indirect block")
+ if (iblock)
+ if (H5HF_iblock_decr(iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on section's indirect block")
/* Release the section */
sect = H5FL_FREE(H5HF_free_section_t, sect);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_node_free() */
+} /* H5HF_sect_node_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_new
*
@@ -477,17 +444,15 @@ done:
* Return: Pointer to new section on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
*/
H5HF_free_section_t *
-H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
- H5HF_indirect_t *parent, unsigned par_entry)
+H5HF_sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry)
{
- H5HF_free_section_t *sect = NULL; /* 'Single' free space section to add */
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *sect = NULL; /* 'Single' free space section to add */
+ H5HF_free_section_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -497,14 +462,16 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
HDassert(sect_size);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_off, (hsize_t)sect_size, H5FS_SECT_LIVE)))
+ if (NULL ==
+ (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_off, (hsize_t)sect_size, H5FS_SECT_LIVE)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for single section")
/* Set the 'single' specific fields */
sect->u.single.parent = parent;
- if(sect->u.single.parent) {
- if(H5HF_iblock_incr(sect->u.single.parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
+ if (sect->u.single.parent) {
+ if (H5HF_iblock_incr(sect->u.single.parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL,
+ "can't increment reference count on shared indirect block")
} /* end if */
sect->u.single.par_entry = par_entry;
@@ -512,7 +479,7 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
ret_value = sect;
done:
- if(!ret_value && sect) {
+ if (!ret_value && sect) {
/* Release the section */
sect = H5FL_FREE(H5HF_free_section_t, sect);
} /* end if */
@@ -520,7 +487,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_single_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_locate_parent
*
@@ -529,19 +495,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* October 24 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh,
- H5HF_free_section_t *sect)
+H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh, H5HF_free_section_t *sect)
{
- H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
- unsigned sec_entry; /* Entry within section indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
+ unsigned sec_entry; /* Entry within section indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -553,28 +517,30 @@ H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh,
HDassert(sect);
/* Look up indirect block containing direct blocks for range */
- if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect, H5AC_READ) < 0)
+ if (H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect,
+ H5AC_READ) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section")
/* Increment reference count on indirect block that free section is in */
- if(H5HF_iblock_incr(sec_iblock) < 0)
+ if (H5HF_iblock_incr(sec_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Check for refreshing existing parent information */
- if(refresh) {
- if(sect->u.single.parent) {
+ if (refresh) {
+ if (sect->u.single.parent) {
/* Release hold on previous parent indirect block */
- if(H5HF_iblock_decr(sect->u.single.parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on section's indirect block")
+ if (H5HF_iblock_decr(sect->u.single.parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on section's indirect block")
} /* end if */
- } /* end if */
+ } /* end if */
/* Set the information for the section */
- sect->u.single.parent = sec_iblock;
+ sect->u.single.parent = sec_iblock;
sect->u.single.par_entry = sec_entry;
/* Unlock indirect block */
- if(H5HF_man_iblock_unprotect(sec_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(sec_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
sec_iblock = NULL;
@@ -582,25 +548,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_single_locate_parent() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_single_revive
+ * Function: H5HF_sect_single_revive
*
- * Purpose: Update the memory information for a 'single' free section
+ * Purpose: Update the memory information for a 'single' free section
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 8 2006
+ * Programmer: Quincey Koziol
+ * May 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect)
+H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -612,15 +575,15 @@ H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Check for root direct block */
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
/* Set the information for the section */
HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
- sect->u.single.parent = NULL;
+ sect->u.single.parent = NULL;
sect->u.single.par_entry = 0;
} /* end if */
else {
/* Look up indirect block information for section */
- if(H5HF_sect_single_locate_parent(hdr, dxpl_id, FALSE, sect) < 0)
+ if (H5HF_sect_single_locate_parent(hdr, dxpl_id, FALSE, sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get section's parent info")
} /* end else */
@@ -631,23 +594,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_single_revive() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_single_dblock_info
+ * Function: H5HF_sect_single_dblock_info
*
- * Purpose: Retrieve the direct block information for a single section
+ * Purpose: Retrieve the direct block information for a single section
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * October 24 2006
+ * Programmer: Quincey Koziol
+ * October 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size)
+H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, haddr_t *dblock_addr,
+ size_t *dblock_size)
{
FUNC_ENTER_NOAPI_NOERR
@@ -662,22 +623,22 @@ H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(dblock_size);
/* Check for root direct block */
- if(hdr->man_dtable.curr_root_rows == 0) {
+ if (hdr->man_dtable.curr_root_rows == 0) {
/* Retrieve direct block info from heap header */
HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
- *dblock_addr = hdr->man_dtable.table_addr;
- *dblock_size = hdr->man_dtable.cparam.start_block_size;
+ *dblock_addr = hdr->man_dtable.table_addr;
+ *dblock_size = hdr->man_dtable.cparam.start_block_size;
} /* end if */
else {
/* Retrieve direct block info from parent indirect block */
- *dblock_addr = sect->u.single.parent->ents[sect->u.single.par_entry].addr;
- *dblock_size = hdr->man_dtable.row_block_size[sect->u.single.par_entry / hdr->man_dtable.cparam.width];
+ *dblock_addr = sect->u.single.parent->ents[sect->u.single.par_entry].addr;
+ *dblock_size =
+ hdr->man_dtable.row_block_size[sect->u.single.par_entry / hdr->man_dtable.cparam.width];
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_sect_single_dblock_info() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_reduce
*
@@ -688,16 +649,14 @@ H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, size_t amt)
+H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, size_t amt)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -710,9 +669,9 @@ H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
/* Check for eliminating the section */
- if(sect->sect_info.size == amt) {
+ if (sect->sect_info.size == amt) {
/* Free single section */
- if(H5HF_sect_single_free((H5FS_section_info_t *)sect) < 0)
+ if (H5HF_sect_single_free((H5FS_section_info_t *)sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free single section node")
} /* end if */
else {
@@ -721,7 +680,7 @@ H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
sect->sect_info.size -= amt;
/* Re-insert section node into heap's free space */
- if(H5HF_space_add(hdr, dxpl_id, sect, 0) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, sect, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add single section to free space manager")
} /* end else */
@@ -729,7 +688,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_single_reduce() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_full_dblock
*
@@ -748,13 +706,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect)
+H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- haddr_t dblock_addr; /* Section's direct block's address */
- size_t dblock_size; /* Section's direct block's size */
- size_t dblock_overhead; /* Direct block's overhead */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t dblock_addr; /* Section's direct block's address */
+ size_t dblock_size; /* Section's direct block's size */
+ size_t dblock_overhead; /* Direct block's overhead */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -764,26 +721,27 @@ H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(hdr);
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sect, &dblock_addr, &dblock_size) < 0)
+ if (H5HF_sect_single_dblock_info(hdr, dxpl_id, sect, &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Check for section occupying entire direct block */
/* (and not the root direct block) */
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- if((dblock_size - dblock_overhead) == sect->sect_info.size &&
- hdr->man_dtable.curr_root_rows > 0) {
- H5HF_direct_t *dblock; /* Pointer to direct block for section */
+ if ((dblock_size - dblock_overhead) == sect->sect_info.size && hdr->man_dtable.curr_root_rows > 0) {
+ H5HF_direct_t *dblock; /* Pointer to direct block for section */
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sect->u.single.parent, sect->u.single.par_entry, H5AC_WRITE)))
+ if (NULL ==
+ (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sect->u.single.parent,
+ sect->u.single.par_entry, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
HDassert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
/* Convert 'single' section into 'row' section */
- if(H5HF_sect_row_from_single(hdr, sect, dblock) < 0)
+ if (H5HF_sect_row_from_single(hdr, sect, dblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't convert single section into row section")
/* Destroy direct block */
- if(H5HF_man_dblock_destroy(hdr, dxpl_id, dblock, dblock_addr) < 0)
+ if (H5HF_man_dblock_destroy(hdr, dxpl_id, dblock, dblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block")
dblock = NULL;
} /* end if */
@@ -792,7 +750,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_full_dblock() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_add
*
@@ -810,18 +767,18 @@ done:
static herr_t
H5HF_sect_single_add(H5FS_section_info_t *_sect, unsigned *flags, void *_udata)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Don't need to check section if we are deserializing, because it should
* have already been checked when it was first added
*/
- if(!(*flags & H5FS_ADD_DESERIALIZING)) {
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
+ if (!(*flags & H5FS_ADD_DESERIALIZING)) {
+ H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
/* Sanity check */
HDassert(sect);
@@ -829,14 +786,14 @@ H5HF_sect_single_add(H5FS_section_info_t *_sect, unsigned *flags, void *_udata)
/* Check if single section covers entire direct block it's in */
/* (converts to row section possibly) */
- if(H5HF_sect_single_full_dblock(hdr, dxpl_id, sect) < 0)
+ if (H5HF_sect_single_full_dblock(hdr, dxpl_id, sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section")
/* Set the "returned space" flag if the single section was changed
* into a row section, so the "merging & shrinking" algorithm
* gets executed in the free space manager
*/
- if(sect->sect_info.type != H5HF_FSPACE_SECT_SINGLE)
+ if (sect->sect_info.type != H5HF_FSPACE_SECT_SINGLE)
*flags |= H5FS_ADD_RETURNED_SPACE;
} /* end if */
@@ -844,7 +801,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_add() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_deserialize
*
@@ -859,12 +815,12 @@ done:
*-------------------------------------------------------------------------
*/
static H5FS_section_info_t *
-H5HF_sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
- hid_t H5_ATTR_UNUSED dxpl_id, const uint8_t H5_ATTR_UNUSED *buf, haddr_t sect_addr,
- hsize_t sect_size, unsigned H5_ATTR_UNUSED *des_flags)
+H5HF_sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls, hid_t H5_ATTR_UNUSED dxpl_id,
+ const uint8_t H5_ATTR_UNUSED *buf, haddr_t sect_addr, hsize_t sect_size,
+ unsigned H5_ATTR_UNUSED *des_flags)
{
- H5HF_free_section_t *new_sect; /* New section */
- H5FS_section_info_t *ret_value; /* Return value */
+ H5HF_free_section_t *new_sect; /* New section */
+ H5FS_section_info_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -873,7 +829,8 @@ H5HF_sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
HDassert(sect_size);
/* Create free list section node */
- if(NULL == (new_sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_addr, sect_size, H5FS_SECT_SERIALIZED)))
+ if (NULL ==
+ (new_sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_addr, sect_size, H5FS_SECT_SERIALIZED)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "allocation failed for direct block free list section")
/* Set return value */
@@ -883,7 +840,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_deserialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_can_merge
*
@@ -901,19 +857,19 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5HF_sect_single_can_merge(const H5FS_section_info_t *_sect1,
- const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata)
+H5HF_sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2,
+ void H5_ATTR_UNUSED *_udata)
{
- const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
- const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- htri_t ret_value = FALSE; /* Return value */
+ const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
+ const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect1);
HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
@@ -921,14 +877,13 @@ H5HF_sect_single_can_merge(const H5FS_section_info_t *_sect1,
* overhead at the beginning of a block, so no need to check if sections
* are actually within the same direct block)
*/
- if(H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr))
+ if (H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr))
HGOTO_DONE(TRUE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_can_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_merge
*
@@ -946,15 +901,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_single_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
- void *_udata)
+H5HF_sect_single_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2, void *_udata)
{
- H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
- H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
+ H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -969,24 +923,23 @@ H5HF_sect_single_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
sect1->sect_info.size += sect2->sect_info.size;
/* Get rid of second section */
- if(H5HF_sect_single_free((H5FS_section_info_t *)sect2) < 0)
+ if (H5HF_sect_single_free((H5FS_section_info_t *)sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
/* Check to see if we should revive first section */
- if(sect1->sect_info.state != H5FS_SECT_LIVE)
- if(H5HF_sect_single_revive(hdr, dxpl_id, sect1) < 0)
+ if (sect1->sect_info.state != H5FS_SECT_LIVE)
+ if (H5HF_sect_single_revive(hdr, dxpl_id, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
/* Check if single section covers entire direct block it's in */
/* (converts to row section possibly) */
- if(H5HF_sect_single_full_dblock(hdr, dxpl_id, sect1) < 0)
+ if (H5HF_sect_single_full_dblock(hdr, dxpl_id, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_can_shrink
*
@@ -1008,10 +961,10 @@ done:
static htri_t
H5HF_sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
{
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- htri_t ret_value = FALSE; /* Return value */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1024,13 +977,13 @@ H5HF_sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
* would have been converted into a row section, if there was an
* indirect block that covered it)
*/
- if(hdr->man_dtable.curr_root_rows == 0) {
- size_t dblock_size; /* Section's direct block's size */
- size_t dblock_overhead; /* Direct block's overhead */
+ if (hdr->man_dtable.curr_root_rows == 0) {
+ size_t dblock_size; /* Section's direct block's size */
+ size_t dblock_overhead; /* Direct block's overhead */
- dblock_size = hdr->man_dtable.cparam.start_block_size;
+ dblock_size = hdr->man_dtable.cparam.start_block_size;
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- if((dblock_size - dblock_overhead) == sect->sect_info.size)
+ if ((dblock_size - dblock_overhead) == sect->sect_info.size)
HGOTO_DONE(TRUE)
} /* end if */
else {
@@ -1045,7 +998,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_can_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_shrink
*
@@ -1063,14 +1015,14 @@ done:
static herr_t
H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void H5_ATTR_UNUSED *_udata)
{
- H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
- H5HF_direct_t *dblock; /* Pointer to direct block for section */
- haddr_t dblock_addr; /* Section's direct block's address */
- size_t dblock_size; /* Section's direct block's size */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
+ H5HF_direct_t * dblock; /* Pointer to direct block for section */
+ haddr_t dblock_addr; /* Section's direct block's address */
+ size_t dblock_size; /* Section's direct block's size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1080,29 +1032,30 @@ H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void H5_ATTR_UNUSED *_udata
HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check to see if we should revive section */
- if((*sect)->sect_info.state != H5FS_SECT_LIVE)
- if(H5HF_sect_single_revive(hdr, dxpl_id, (*sect)) < 0)
+ if ((*sect)->sect_info.state != H5FS_SECT_LIVE)
+ if (H5HF_sect_single_revive(hdr, dxpl_id, (*sect)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, dxpl_id, (*sect), &dblock_addr, &dblock_size) < 0)
+ if (H5HF_sect_single_dblock_info(hdr, dxpl_id, (*sect), &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Protect the direct block for the section */
/* (should be a root direct block) */
HDassert(dblock_addr == hdr->man_dtable.table_addr);
- if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr,
- dblock_size, (*sect)->u.single.parent, (*sect)->u.single.par_entry, H5AC_WRITE)))
+ if (NULL ==
+ (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, (*sect)->u.single.parent,
+ (*sect)->u.single.par_entry, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
HDassert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size));
/* Destroy direct block */
- if(H5HF_man_dblock_destroy(hdr, dxpl_id, dblock, dblock_addr) < 0)
+ if (H5HF_man_dblock_destroy(hdr, dxpl_id, dblock, dblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block")
dblock = NULL;
/* Get rid of section */
- if(H5HF_sect_single_free((H5FS_section_info_t *)*sect) < 0)
+ if (H5HF_sect_single_free((H5FS_section_info_t *)*sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
/* Indicate that the section has been released */
@@ -1112,7 +1065,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_single_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_free
*
@@ -1130,9 +1082,9 @@ done:
herr_t
H5HF_sect_single_free(H5FS_section_info_t *_sect)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
- H5HF_indirect_t *parent = NULL; /* Parent indirect block for section */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
+ H5HF_indirect_t * parent = NULL; /* Parent indirect block for section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1140,21 +1092,19 @@ H5HF_sect_single_free(H5FS_section_info_t *_sect)
HDassert(sect);
/* Check for live reference to an indirect block */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.state == H5FS_SECT_LIVE)
/* Get parent indirect block, if there was one */
- if(sect->u.single.parent)
+ if (sect->u.single.parent)
parent = sect->u.single.parent;
- } /* end if */
/* Release the section */
- if(H5HF_sect_node_free(sect, parent) < 0)
+ if (H5HF_sect_node_free(sect, parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_single_free() */
+} /* H5HF_sect_single_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_single_valid
*
@@ -1171,23 +1121,23 @@ done:
static herr_t
H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_section_info_t *_sect)
{
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
/* Check if this section is not in a direct block that is the root direct block */
/* (not enough information to check on a single section in a root direct block) */
- if(sect->u.single.parent != NULL) {
- H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */
- haddr_t dblock_addr; /* Direct block address */
- size_t dblock_size; /* Direct block size */
- size_t dblock_overhead; /* Direct block's overhead */
- unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
- herr_t status; /* Generic status value */
+ if (sect->u.single.parent != NULL) {
+ H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */
+ haddr_t dblock_addr; /* Direct block address */
+ size_t dblock_size; /* Direct block size */
+ size_t dblock_overhead; /* Direct block's overhead */
+ unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
+ herr_t status; /* Generic status value */
/* Sanity check settings for section's direct block's parent */
iblock = sect->u.single.parent;
@@ -1195,7 +1145,8 @@ H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5F
/* Retrieve direct block address from section */
/* (Casting away const OK - QAK) */
- status = H5HF_sect_single_dblock_info(iblock->hdr, H5AC_dxpl_id, (H5HF_free_section_t *)sect, &dblock_addr, &dblock_size);
+ status = H5HF_sect_single_dblock_info(iblock->hdr, H5AC_dxpl_id, (H5HF_free_section_t *)sect,
+ &dblock_addr, &dblock_size);
HDassert(status >= 0);
HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
HDassert(dblock_size > 0);
@@ -1215,11 +1166,12 @@ H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5F
* protect it here in order to check single section's sanity
* against it.
*/
- if(!(dblock_status & H5AC_ES__IS_PROTECTED)) {
- H5HF_direct_t *dblock; /* Direct block for section */
+ if (!(dblock_status & H5AC_ES__IS_PROTECTED)) {
+ H5HF_direct_t *dblock; /* Direct block for section */
/* Protect the direct block for the section */
- dblock = H5HF_man_dblock_protect(iblock->hdr, H5AC_dxpl_id, dblock_addr, dblock_size, iblock, sect->u.single.par_entry, H5AC_READ);
+ dblock = H5HF_man_dblock_protect(iblock->hdr, H5AC_dxpl_id, dblock_addr, dblock_size, iblock,
+ sect->u.single.par_entry, H5AC_READ);
HDassert(dblock);
/* Sanity check settings for section */
@@ -1227,19 +1179,19 @@ H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5F
HDassert(dblock->size > sect->sect_info.size);
HDassert(H5F_addr_lt(dblock->block_off, sect->sect_info.addr));
HDassert(H5F_addr_ge((dblock->block_off + dblock->size),
- (sect->sect_info.addr + sect->sect_info.size)));
+ (sect->sect_info.addr + sect->sect_info.size)));
/* Release direct block */
- status = H5AC_unprotect(iblock->hdr->f, H5AC_dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET);
+ status = H5AC_unprotect(iblock->hdr->f, H5AC_dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock,
+ H5AC__NO_FLAGS_SET);
HDassert(status >= 0);
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5HF_sect_single_valid() */
+} /* H5HF_sect_single_valid() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_create
*
@@ -1255,11 +1207,11 @@ H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5F
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
- unsigned row, unsigned col, unsigned nentries, H5HF_free_section_t *under_sect)
+H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, unsigned row, unsigned col,
+ unsigned nentries, H5HF_free_section_t *under_sect)
{
- H5HF_free_section_t *sect = NULL; /* 'Row' section created */
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *sect = NULL; /* 'Row' section created */
+ H5HF_free_section_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1270,13 +1222,15 @@ H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
/* Create 'row' free space section node */
/* ("inherits" underlying indirect section's state) */
- if(NULL == (sect = H5HF_sect_node_new((unsigned)(is_first ? H5HF_FSPACE_SECT_FIRST_ROW : H5HF_FSPACE_SECT_NORMAL_ROW), sect_off, sect_size, under_sect->sect_info.state)))
+ if (NULL == (sect = H5HF_sect_node_new(
+ (unsigned)(is_first ? H5HF_FSPACE_SECT_FIRST_ROW : H5HF_FSPACE_SECT_NORMAL_ROW),
+ sect_off, sect_size, under_sect->sect_info.state)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for row section")
/* Set the 'row' specific fields */
- sect->u.row.under = under_sect;
- sect->u.row.row = row;
- sect->u.row.col = col;
+ sect->u.row.under = under_sect;
+ sect->u.row.row = row;
+ sect->u.row.col = col;
sect->u.row.num_entries = nentries;
sect->u.row.checked_out = FALSE;
@@ -1287,7 +1241,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_from_single
*
@@ -1296,16 +1249,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
- H5HF_direct_t *dblock)
+H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_direct_t *dblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1317,26 +1268,25 @@ H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
HDassert(dblock);
/* Convert 'single' section information to 'row' section info */
- sect->sect_info.addr = dblock->block_off;
- sect->sect_info.type = H5HF_FSPACE_SECT_FIRST_ROW;
- sect->u.row.row = dblock->par_entry / hdr->man_dtable.cparam.width;
- sect->u.row.col = dblock->par_entry % hdr->man_dtable.cparam.width;
+ sect->sect_info.addr = dblock->block_off;
+ sect->sect_info.type = H5HF_FSPACE_SECT_FIRST_ROW;
+ sect->u.row.row = dblock->par_entry / hdr->man_dtable.cparam.width;
+ sect->u.row.col = dblock->par_entry % hdr->man_dtable.cparam.width;
sect->u.row.num_entries = 1;
sect->u.row.checked_out = FALSE;
/* Create indirect section that underlies the row section */
- if(NULL == (sect->u.row.under = H5HF_sect_indirect_for_row(hdr, dblock->parent, sect)))
+ if (NULL == (sect->u.row.under = H5HF_sect_indirect_for_row(hdr, dblock->parent, sect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "serializing row section not supported yet")
/* Release single section's hold on underlying indirect block */
- if(H5HF_iblock_decr(dblock->parent) < 0)
+ if (H5HF_iblock_decr(dblock->parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_row_from_single() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_revive
*
@@ -1345,7 +1295,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -1353,7 +1302,7 @@ done:
herr_t
H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1367,14 +1316,13 @@ H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
/* Pass along "revive" request to underlying indirect section */
/* (which will mark this section as "live") */
- if(H5HF_sect_indirect_revive_row(hdr, dxpl_id, sect->u.row.under) < 0)
+ if (H5HF_sect_indirect_revive_row(hdr, dxpl_id, sect->u.row.under) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_row_revive() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_reduce
*
@@ -1385,17 +1333,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
- unsigned *entry_p)
+H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, unsigned *entry_p)
{
- hbool_t alloc_from_start; /* Whether to allocate from the end of the row */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t alloc_from_start; /* Whether to allocate from the end of the row */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1405,7 +1351,7 @@ H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
HDassert(hdr);
HDassert(sect);
HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
HDassert(entry_p);
@@ -1415,23 +1361,23 @@ H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
/* Forward row section to indirect routines, to handle reducing underlying indirect section */
alloc_from_start = FALSE;
- if(H5HF_sect_indirect_reduce_row(hdr, dxpl_id, sect, &alloc_from_start) < 0)
+ if (H5HF_sect_indirect_reduce_row(hdr, dxpl_id, sect, &alloc_from_start) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce underlying section")
/* Determine entry allocated */
*entry_p = (sect->u.row.row * hdr->man_dtable.cparam.width) + sect->u.row.col;
- if(!alloc_from_start)
+ if (!alloc_from_start)
*entry_p += (sect->u.row.num_entries - 1);
/* Check for eliminating the section */
- if(sect->u.row.num_entries == 1) {
+ if (sect->u.row.num_entries == 1) {
/* Free row section */
- if(H5HF_sect_row_free((H5FS_section_info_t *)sect) < 0)
+ if (H5HF_sect_row_free((H5FS_section_info_t *)sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section node")
} /* end if */
else {
/* Check whether to allocate from the beginning or end of the row */
- if(alloc_from_start) {
+ if (alloc_from_start) {
/* Adjust section start */
sect->sect_info.addr += hdr->man_dtable.row_block_size[sect->u.row.row];
sect->u.row.col++;
@@ -1444,7 +1390,7 @@ H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
sect->u.row.checked_out = FALSE;
/* Add 'row' section back to free space list */
- if(H5HF_space_add(hdr, dxpl_id, sect, 0) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, sect, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add indirect section to free space manager")
} /* end else */
@@ -1452,7 +1398,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_row_reduce() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_first
*
@@ -1461,7 +1406,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -1469,7 +1413,7 @@ done:
static herr_t
H5HF_sect_row_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1482,11 +1426,11 @@ H5HF_sect_row_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
* change it's class directly and the free space manager will adjust when
* it is checked back in.
*/
- if(sect->u.row.checked_out)
+ if (sect->u.row.checked_out)
sect->sect_info.type = H5HF_FSPACE_SECT_FIRST_ROW;
else {
/* Change row section to be the "first row" */
- if(H5HF_space_sect_change_class(hdr, dxpl_id, sect, H5HF_FSPACE_SECT_FIRST_ROW) < 0)
+ if (H5HF_space_sect_change_class(hdr, dxpl_id, sect, H5HF_FSPACE_SECT_FIRST_ROW) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row")
} /* end else */
@@ -1494,7 +1438,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_row_first() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_get_iblock
*
@@ -1503,7 +1446,6 @@ done:
* Return: Pointer to indirect block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 9 2006
*
*-------------------------------------------------------------------------
@@ -1511,7 +1453,7 @@ done:
H5HF_indirect_t *
H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
{
- H5HF_indirect_t *ret_value; /* Return value */
+ H5HF_indirect_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1520,7 +1462,7 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
*/
HDassert(sect);
HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
ret_value = H5HF_sect_indirect_get_iblock(sect->u.row.under);
@@ -1528,7 +1470,6 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_row_get_iblock() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_init_cls
*
@@ -1549,8 +1490,8 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
static herr_t
H5HF_sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
{
- H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1559,11 +1500,11 @@ H5HF_sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
HDassert(hdr);
/* Call common class initialization */
- if(H5HF_sect_init_cls(cls, hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
+ if (H5HF_sect_init_cls(cls, hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
/* First row sections actually are proxies for indirection sections on disk */
- if(cls->type == H5HF_FSPACE_SECT_FIRST_ROW)
+ if (cls->type == H5HF_FSPACE_SECT_FIRST_ROW)
cls->serial_size = H5HF_SECT_INDIRECT_SERIAL_SIZE(hdr);
else
cls->serial_size = 0;
@@ -1572,7 +1513,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_init_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_term_cls
*
@@ -1593,7 +1533,7 @@ done:
static herr_t
H5HF_sect_row_term_cls(H5FS_section_class_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1601,14 +1541,13 @@ H5HF_sect_row_term_cls(H5FS_section_class_t *cls)
HDassert(cls);
/* Call common class termination */
- if(H5HF_sect_term_cls(cls) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
+ if (H5HF_sect_term_cls(cls) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_term_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_serialize
*
@@ -1624,12 +1563,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_row_serialize(const H5FS_section_class_t *cls,
- const H5FS_section_info_t *_sect, uint8_t *buf)
+H5HF_sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_info_t *_sect, uint8_t *buf)
{
- H5HF_hdr_t *hdr; /* Fractal heap header */
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t * hdr; /* Fractal heap header */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1642,14 +1580,14 @@ H5HF_sect_row_serialize(const H5FS_section_class_t *cls,
/* Forward to indirect routine to serialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
- if(H5HF_sect_indirect_serialize(hdr, sect->u.row.under, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, "can't serialize row section's underlying indirect section")
+ if (H5HF_sect_indirect_serialize(hdr, sect->u.row.under, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL,
+ "can't serialize row section's underlying indirect section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_serialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_deserialize
*
@@ -1668,12 +1606,11 @@ done:
*-------------------------------------------------------------------------
*/
static H5FS_section_info_t *
-H5HF_sect_row_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
- const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags)
+H5HF_sect_row_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id, const uint8_t *buf,
+ haddr_t sect_addr, hsize_t sect_size, unsigned *des_flags)
{
- H5HF_hdr_t *hdr; /* Fractal heap header */
- H5FS_section_info_t *ret_value; /* Return value */
+ H5HF_hdr_t * hdr; /* Fractal heap header */
+ H5FS_section_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1685,15 +1622,15 @@ H5HF_sect_row_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
/* Forward to indirect routine to deserialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
- if(NULL == (ret_value = H5HF_sect_indirect_deserialize(hdr, dxpl_id, buf,
- sect_addr, sect_size, des_flags)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't deserialize row section's underlying indirect section")
+ if (NULL ==
+ (ret_value = H5HF_sect_indirect_deserialize(hdr, dxpl_id, buf, sect_addr, sect_size, des_flags)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL,
+ "can't deserialize row section's underlying indirect section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_deserialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_can_merge
*
@@ -1711,13 +1648,13 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5HF_sect_row_can_merge(const H5FS_section_info_t *_sect1,
- const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata)
+H5HF_sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2,
+ void H5_ATTR_UNUSED *_udata)
{
- const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
- const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- H5HF_free_section_t *top_indir_sect1, *top_indir_sect2; /* Top indirect section for each row */
- htri_t ret_value = FALSE; /* Return value */
+ const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
+ const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
+ H5HF_free_section_t * top_indir_sect1, *top_indir_sect2; /* Top indirect section for each row */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1725,7 +1662,7 @@ H5HF_sect_row_can_merge(const H5FS_section_info_t *_sect1,
HDassert(sect1);
HDassert(sect1->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Get the top indirect section underlying each row */
@@ -1738,19 +1675,20 @@ H5HF_sect_row_can_merge(const H5FS_section_info_t *_sect1,
* the first section, but doesn't already have same underlying indirect
* section.
*/
- if(top_indir_sect1 != top_indir_sect2) {
- if(H5HF_sect_indirect_iblock_off(top_indir_sect1) == H5HF_sect_indirect_iblock_off(top_indir_sect2)) {
+ if (top_indir_sect1 != top_indir_sect2) {
+ if (H5HF_sect_indirect_iblock_off(top_indir_sect1) ==
+ H5HF_sect_indirect_iblock_off(top_indir_sect2)) {
/* Check if second section adjoins first section */
- if(H5F_addr_eq((top_indir_sect1->sect_info.addr + top_indir_sect1->u.indirect.span_size), top_indir_sect2->sect_info.addr))
+ if (H5F_addr_eq((top_indir_sect1->sect_info.addr + top_indir_sect1->u.indirect.span_size),
+ top_indir_sect2->sect_info.addr))
HGOTO_DONE(TRUE)
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_can_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_merge
*
@@ -1768,15 +1706,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_row_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
- void *_udata)
+H5HF_sect_row_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2, void *_udata)
{
- H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
- H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
+ H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1787,29 +1724,29 @@ H5HF_sect_row_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
HDassert(sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if second section is past end of "next block" iterator */
- if(sect2->sect_info.addr >= hdr->man_iter_off) {
- H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
+ if (sect2->sect_info.addr >= hdr->man_iter_off) {
+ H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
/* Get the top indirect section underlying second row section */
top_indir_sect = H5HF_sect_indirect_top(sect2->u.row.under);
/* Shrink away underlying indirect section */
- if(H5HF_sect_indirect_shrink(hdr, dxpl_id, top_indir_sect) < 0)
+ if (H5HF_sect_indirect_shrink(hdr, dxpl_id, top_indir_sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section")
} /* end if */
else {
/* Check to see if we should revive first section */
- if(sect1->sect_info.state != H5FS_SECT_LIVE)
- if(H5HF_sect_row_revive(hdr, dxpl_id, sect1) < 0)
+ if (sect1->sect_info.state != H5FS_SECT_LIVE)
+ if (H5HF_sect_row_revive(hdr, dxpl_id, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
/* Check to see if we should revive second section */
- if(sect2->sect_info.state != H5FS_SECT_LIVE)
- if(H5HF_sect_row_revive(hdr, dxpl_id, sect2) < 0)
+ if (sect2->sect_info.state != H5FS_SECT_LIVE)
+ if (H5HF_sect_row_revive(hdr, dxpl_id, sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
/* Merge rows' underlying indirect sections together */
- if(H5HF_sect_indirect_merge_row(hdr, dxpl_id, sect1, sect2) < 0)
+ if (H5HF_sect_indirect_merge_row(hdr, dxpl_id, sect1, sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMERGE, FAIL, "can't merge underlying indirect sections")
} /* end else */
@@ -1817,7 +1754,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_can_shrink
*
@@ -1839,10 +1775,10 @@ done:
static htri_t
H5HF_sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udata)
{
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- htri_t ret_value = FALSE; /* Return value */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1851,14 +1787,13 @@ H5HF_sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *
HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if section is past end of "next block" iterator */
- if(sect->sect_info.addr >= hdr->man_iter_off)
+ if (sect->sect_info.addr >= hdr->man_iter_off)
HGOTO_DONE(TRUE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_can_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_shrink
*
@@ -1876,12 +1811,12 @@ done:
static herr_t
H5HF_sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
{
- H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
- H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
- H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
- H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
+ H5HF_free_section_t * top_indir_sect; /* Top indirect section for row */
+ H5HF_sect_add_ud_t * udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
+ H5HF_hdr_t * hdr = udata->hdr; /* Fractal heap header */
+ hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1894,7 +1829,7 @@ H5HF_sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
top_indir_sect = H5HF_sect_indirect_top((*sect)->u.row.under);
/* Shrink away underlying indirect section */
- if(H5HF_sect_indirect_shrink(hdr, dxpl_id, top_indir_sect) < 0)
+ if (H5HF_sect_indirect_shrink(hdr, dxpl_id, top_indir_sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section")
/* Indicate that the section has been released */
@@ -1904,7 +1839,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_row_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_free_real
*
@@ -1922,21 +1856,20 @@ done:
static herr_t
H5HF_sect_row_free_real(H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
/* Release the section */
- if(H5HF_sect_node_free(sect, NULL) < 0)
+ if (H5HF_sect_node_free(sect, NULL) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_row_free_real() */
+} /* H5HF_sect_row_free_real() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_free
*
@@ -1954,8 +1887,8 @@ done:
static herr_t
H5HF_sect_row_free(H5FS_section_info_t *_sect)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1963,18 +1896,17 @@ H5HF_sect_row_free(H5FS_section_info_t *_sect)
HDassert(sect->u.row.under);
/* Decrement the ref. count on the row section's underlying indirect section */
- if(H5HF_sect_indirect_decr(sect->u.row.under) < 0)
+ if (H5HF_sect_indirect_decr(sect->u.row.under) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't detach section node")
/* Release the section */
- if(H5HF_sect_row_free_real(sect) < 0)
+ if (H5HF_sect_row_free_real(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_row_free() */
+} /* H5HF_sect_row_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_valid
*
@@ -1991,11 +1923,11 @@ done:
static herr_t
H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *_sect)
{
- H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
- const H5HF_hdr_t *hdr; /* Fractal heap header */
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
- const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
- unsigned indir_idx; /* Index of row in underlying indirect section's row array */
+ H5HF_sect_private_t * cls_prvt; /* Pointer to class private info */
+ const H5HF_hdr_t * hdr; /* Fractal heap header */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
+ const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
+ unsigned indir_idx; /* Index of row in underlying indirect section's row array */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2005,22 +1937,22 @@ H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *
/* Retrieve class private information */
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
- hdr = cls_prvt->hdr;
+ hdr = cls_prvt->hdr;
/* Sanity checking on the row */
HDassert(sect->u.row.under);
HDassert(sect->u.row.num_entries);
HDassert(sect->u.row.checked_out == FALSE);
indir_sect = sect->u.row.under;
- indir_idx = sect->u.row.row - indir_sect->u.indirect.row;
+ indir_idx = sect->u.row.row - indir_sect->u.indirect.row;
HDassert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
/* Check if the section is actually within the heap */
HDassert(sect->sect_info.addr < hdr->man_iter_off);
/* Different checking for different kinds of rows */
- if(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
- H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
+ if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
+ H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
/* Some extra sanity checks on the row */
HDassert(sect->u.row.row == indir_sect->u.indirect.row);
@@ -2033,9 +1965,8 @@ H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5HF_sect_row_valid() */
+} /* H5HF_sect_row_valid() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_row_debug
*
@@ -2050,10 +1981,9 @@ H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
- FILE *stream, int indent, int fwidth)
+H5HF_sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent, int fwidth)
{
- const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Section to dump info */
+ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Section to dump info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2061,21 +1991,14 @@ H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
HDassert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Row:",
- sect->u.row.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Column:",
- sect->u.row.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of entries:",
- sect->u.row.num_entries);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries);
/* If this is a first row section display information about underlying indirect section */
- if(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
+ if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
/* Print indirect section header */
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Underlying indirect section:");
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:");
H5HF_sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
@@ -2083,7 +2006,6 @@ H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_sect_row_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_iblock_off
*
@@ -2092,7 +2014,6 @@ H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
* Return: Offset of indirect block in "heap space" (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -2100,7 +2021,7 @@ H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
static hsize_t
H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
{
- hsize_t ret_value; /* Return value */
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2109,12 +2030,12 @@ H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
*/
HDassert(sect);
- ret_value = sect->sect_info.state == H5FS_SECT_LIVE ? sect->u.indirect.u.iblock->block_off : sect->u.indirect.u.iblock_off;
+ ret_value = sect->sect_info.state == H5FS_SECT_LIVE ? sect->u.indirect.u.iblock->block_off
+ : sect->u.indirect.u.iblock_off;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_iblock_off() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_top
*
@@ -2123,7 +2044,6 @@ H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
* Return: Pointer to the top indirect section (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -2131,7 +2051,7 @@ H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
static H5HF_free_section_t *
H5HF_sect_indirect_top(H5HF_free_section_t *sect)
{
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2140,7 +2060,7 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
*/
HDassert(sect);
- if(sect->u.indirect.parent)
+ if (sect->u.indirect.parent)
ret_value = H5HF_sect_indirect_top(sect->u.indirect.parent);
else
ret_value = sect;
@@ -2148,7 +2068,6 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_top() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_init_cls
*
@@ -2166,8 +2085,8 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
static herr_t
H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
{
- H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2176,8 +2095,8 @@ H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
HDassert(hdr);
/* Call to common class initialization */
- if(H5HF_sect_init_cls(cls, hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
+ if (H5HF_sect_init_cls(cls, hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
/* Set the size of all serialized objects of this class of sections */
cls->serial_size = H5HF_SECT_INDIRECT_SERIAL_SIZE(hdr);
@@ -2186,7 +2105,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_indirect_init_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_term_cls
*
@@ -2204,7 +2122,7 @@ done:
static herr_t
H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2212,14 +2130,13 @@ H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls)
HDassert(cls);
/* Call common class termination */
- if(H5HF_sect_term_cls(cls) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
+ if (H5HF_sect_term_cls(cls) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_indirect_term_cls() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_new
*
@@ -2229,18 +2146,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
- H5HF_indirect_t *iblock, hsize_t iblock_off, unsigned row, unsigned col,
- unsigned nentries)
+H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5HF_indirect_t *iblock,
+ hsize_t iblock_off, unsigned row, unsigned col, unsigned nentries)
{
- H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
+ H5HF_free_section_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2251,40 +2166,39 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
HDassert(nentries);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off,
- sect_size, (iblock ? H5FS_SECT_LIVE : H5FS_SECT_SERIALIZED))))
+ if (NULL == (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off, sect_size,
+ (iblock ? H5FS_SECT_LIVE : H5FS_SECT_SERIALIZED))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for indirect section")
/* Set the 'indirect' specific fields */
- if(iblock) {
- sect->u.indirect.u.iblock = iblock;
- sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width *
- sect->u.indirect.u.iblock->max_rows;
- if(H5HF_iblock_incr(sect->u.indirect.u.iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
+ if (iblock) {
+ sect->u.indirect.u.iblock = iblock;
+ sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width * sect->u.indirect.u.iblock->max_rows;
+ if (H5HF_iblock_incr(sect->u.indirect.u.iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL,
+ "can't increment reference count on shared indirect block")
} /* end if */
else {
- sect->u.indirect.u.iblock_off = iblock_off;
+ sect->u.indirect.u.iblock_off = iblock_off;
sect->u.indirect.iblock_entries = 0;
} /* end else */
- sect->u.indirect.row = row;
- sect->u.indirect.col = col;
+ sect->u.indirect.row = row;
+ sect->u.indirect.col = col;
sect->u.indirect.num_entries = nentries;
/* Compute span size of indirect section */
- sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable,
- row, col, nentries);
+ sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable, row, col, nentries);
HDassert(sect->u.indirect.span_size > 0);
/* This indirect section doesn't (currently) have a parent */
- sect->u.indirect.parent = NULL;
+ sect->u.indirect.parent = NULL;
sect->u.indirect.par_entry = 0;
/* Set return value */
ret_value = sect;
done:
- if(!ret_value && sect) {
+ if (!ret_value && sect) {
/* Release the section */
sect = H5FL_FREE(H5HF_free_section_t, sect);
} /* end if */
@@ -2292,7 +2206,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_for_row
*
@@ -2301,17 +2214,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
- H5HF_free_section_t *row_sect)
+H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_section_t *row_sect)
{
- H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
- H5HF_free_section_t *ret_value; /* Return value */
+ H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
+ H5HF_free_section_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2324,38 +2235,38 @@ H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_indirect_new(hdr, row_sect->sect_info.addr,
- row_sect->sect_info.size, iblock, iblock->block_off,
- row_sect->u.row.row, row_sect->u.row.col, row_sect->u.row.num_entries)))
+ if (NULL == (sect = H5HF_sect_indirect_new(hdr, row_sect->sect_info.addr, row_sect->sect_info.size,
+ iblock, iblock->block_off, row_sect->u.row.row,
+ row_sect->u.row.col, row_sect->u.row.num_entries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section")
/* Set # of direct rows covered */
sect->u.indirect.dir_nrows = 1;
/* Allocate space for the derived row sections */
- if(NULL == (sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *))))
+ if (NULL ==
+ (sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "allocation failed for row section pointer array")
/* Atatch the new row section to indirect section */
sect->u.indirect.dir_rows[0] = row_sect;
- sect->u.indirect.rc = 1;
+ sect->u.indirect.rc = 1;
/* No indirect rows in current section */
sect->u.indirect.indir_nents = 0;
- sect->u.indirect.indir_ents = NULL;
+ sect->u.indirect.indir_ents = NULL;
/* Set return value */
ret_value = sect;
done:
- if(!ret_value && sect)
- if(H5HF_sect_indirect_free(sect) < 0)
+ if (!ret_value && sect)
+ if (H5HF_sect_indirect_free(sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_for_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_init_rows
*
@@ -2365,27 +2276,25 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, hbool_t first_child, H5HF_free_section_t **first_row_sect,
- unsigned space_flags, unsigned start_row, unsigned start_col,
- unsigned end_row, unsigned end_col)
+H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, hbool_t first_child,
+ H5HF_free_section_t **first_row_sect, unsigned space_flags, unsigned start_row,
+ unsigned start_col, unsigned end_row, unsigned end_col)
{
- hsize_t curr_off; /* Offset of new section in "heap space" */
- size_t dblock_overhead; /* Direct block's overhead */
- unsigned row_entries; /* # of entries in row */
- unsigned row_col; /* Column within current row */
- unsigned curr_entry; /* Current entry within indirect section */
- unsigned curr_indir_entry; /* Current indirect entry within indirect section */
- unsigned curr_row; /* Current row within indirect section */
- unsigned dir_nrows; /* # of direct rows in indirect section */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t curr_off; /* Offset of new section in "heap space" */
+ size_t dblock_overhead; /* Direct block's overhead */
+ unsigned row_entries; /* # of entries in row */
+ unsigned row_col; /* Column within current row */
+ unsigned curr_entry; /* Current entry within indirect section */
+ unsigned curr_indir_entry; /* Current indirect entry within indirect section */
+ unsigned curr_row; /* Current row within indirect section */
+ unsigned dir_nrows; /* # of direct rows in indirect section */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2397,13 +2306,13 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
/* Reset reference count for indirect section */
/* (Also reset the direct & indirect row pointers */
- sect->u.indirect.rc = 0;
- sect->u.indirect.dir_rows = NULL;
+ sect->u.indirect.rc = 0;
+ sect->u.indirect.dir_rows = NULL;
sect->u.indirect.indir_ents = NULL;
/* Set up direct block information, if necessary */
- if(start_row < hdr->man_dtable.max_direct_rows) {
- unsigned max_direct_row; /* Max. direct row covered */
+ if (start_row < hdr->man_dtable.max_direct_rows) {
+ unsigned max_direct_row; /* Max. direct row covered */
/* Compute max. direct row covered by indirect section */
max_direct_row = MIN(end_row, (hdr->man_dtable.max_direct_rows - 1));
@@ -2418,24 +2327,25 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
sect->u.indirect.dir_nrows = 0;
/* Allocate space for the derived row sections */
- if(NULL == (sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * dir_nrows)))
+ if (NULL == (sect->u.indirect.dir_rows =
+ (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * dir_nrows)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array")
} /* end if */
else {
/* No rows of direct blocks covered, reset direct row information */
- dir_nrows = 0;
+ dir_nrows = 0;
sect->u.indirect.dir_nrows = 0;
} /* end else */
/* Set up indirect block information, if necessary */
- if(end_row >= hdr->man_dtable.max_direct_rows) {
- unsigned indirect_start_row; /* Row to start indirect entries on */
- unsigned indirect_start_col; /* Column to start indirect entries on */
- unsigned indirect_start_entry; /* Index of starting indirect entry */
- unsigned indirect_end_entry; /* Index of ending indirect entry */
+ if (end_row >= hdr->man_dtable.max_direct_rows) {
+ unsigned indirect_start_row; /* Row to start indirect entries on */
+ unsigned indirect_start_col; /* Column to start indirect entries on */
+ unsigned indirect_start_entry; /* Index of starting indirect entry */
+ unsigned indirect_end_entry; /* Index of ending indirect entry */
/* Compute starting indirect entry */
- if(start_row < hdr->man_dtable.max_direct_rows) {
+ if (start_row < hdr->man_dtable.max_direct_rows) {
indirect_start_row = hdr->man_dtable.max_direct_rows;
indirect_start_col = 0;
} /* end if */
@@ -2443,8 +2353,7 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
indirect_start_row = start_row;
indirect_start_col = start_col;
} /* end else */
- indirect_start_entry = (indirect_start_row * hdr->man_dtable.cparam.width)
- + indirect_start_col;
+ indirect_start_entry = (indirect_start_row * hdr->man_dtable.cparam.width) + indirect_start_col;
/* Compute ending indirect entry */
indirect_end_entry = (end_row * hdr->man_dtable.cparam.width) + end_col;
@@ -2453,7 +2362,8 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
sect->u.indirect.indir_nents = (indirect_end_entry - indirect_start_entry) + 1;
/* Allocate space for the child indirect sections */
- if(NULL == (sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * sect->u.indirect.indir_nents)))
+ if (NULL == (sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(
+ sizeof(H5HF_free_section_t *) * sect->u.indirect.indir_nents)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array")
} /* end if */
else {
@@ -2462,37 +2372,37 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
} /* end else */
/* Set up initial row information */
- if(start_row == end_row)
+ if (start_row == end_row)
row_entries = (end_col - start_col) + 1;
else
row_entries = hdr->man_dtable.cparam.width - start_col;
row_col = start_col;
/* Loop over creating the sections covered by this indirect section */
- curr_off = sect->sect_info.addr;
- curr_entry = (start_row * hdr->man_dtable.cparam.width) + start_col;
- curr_row = 0;
+ curr_off = sect->sect_info.addr;
+ curr_entry = (start_row * hdr->man_dtable.cparam.width) + start_col;
+ curr_row = 0;
curr_indir_entry = 0;
- dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- for(u = start_row; u <= end_row; u++, curr_row++) {
- if(u < hdr->man_dtable.max_direct_rows) {
- H5HF_free_section_t *row_sect = NULL; /* 'Row' free space section to add */
+ dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
+ for (u = start_row; u <= end_row; u++, curr_row++) {
+ if (u < hdr->man_dtable.max_direct_rows) {
+ H5HF_free_section_t *row_sect = NULL; /* 'Row' free space section to add */
/* Create 'row' free space section node */
- if(NULL == (row_sect = H5HF_sect_row_create(curr_off,
- (hdr->man_dtable.row_block_size[u] - dblock_overhead), first_child, u, row_col,
- row_entries, sect)))
+ if (NULL == (row_sect = H5HF_sect_row_create(
+ curr_off, (hdr->man_dtable.row_block_size[u] - dblock_overhead), first_child, u,
+ row_col, row_entries, sect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "creation failed for child row section")
/* Add new row section to array for indirect section */
sect->u.indirect.dir_rows[curr_row] = row_sect;
/* Check to see if we should grab the first row section instead of adding it immediately */
- if(first_row_sect)
+ if (first_row_sect)
*first_row_sect = row_sect;
else {
/* Add new row section to free space manager for the heap */
- if(H5HF_space_add(hdr, dxpl_id, row_sect, space_flags) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, row_sect, space_flags) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space")
} /* end else */
@@ -2506,36 +2416,42 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
curr_entry += row_entries;
/* Reset the 'first child' parameters */
- first_child = FALSE;
+ first_child = FALSE;
first_row_sect = NULL;
} /* end if */
else {
- H5HF_indirect_t *child_iblock; /* Child indirect block */
- H5HF_free_section_t *child_sect; /* Child 'indirect' section to add */
- unsigned child_nrows; /* Number of child rows in indirect blocks for this row */
- unsigned child_nentries; /* Number of child entries in indirect blocks for this row */
- unsigned v; /* Local index variable */
+ H5HF_indirect_t * child_iblock; /* Child indirect block */
+ H5HF_free_section_t *child_sect; /* Child 'indirect' section to add */
+ unsigned child_nrows; /* Number of child rows in indirect blocks for this row */
+ unsigned child_nentries; /* Number of child entries in indirect blocks for this row */
+ unsigned v; /* Local index variable */
/* Compute info about row's indirect blocks for child section */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[u]);
+ child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[u]);
child_nentries = child_nrows * hdr->man_dtable.cparam.width;
/* Add an indirect section for each indirect block in the row */
- for(v = 0; v < row_entries; v++) {
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ for (v = 0; v < row_entries; v++) {
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
/* Try to get the child section's indirect block, if it's available */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
- haddr_t child_iblock_addr; /* Child indirect block's address on disk */
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
+ haddr_t child_iblock_addr; /* Child indirect block's address on disk */
/* Get the address of the child indirect block */
- if(H5HF_man_iblock_entry_addr(sect->u.indirect.u.iblock, curr_entry, &child_iblock_addr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve child indirect block's address")
+ if (H5HF_man_iblock_entry_addr(sect->u.indirect.u.iblock, curr_entry,
+ &child_iblock_addr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to retrieve child indirect block's address")
/* If the child indirect block's address is defined, protect it */
- if(H5F_addr_defined(child_iblock_addr)) {
- if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, child_iblock_addr, child_nrows, sect->u.indirect.u.iblock, curr_entry, FALSE, H5AC_WRITE, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
+ if (H5F_addr_defined(child_iblock_addr)) {
+ if (NULL == (child_iblock =
+ H5HF_man_iblock_protect(hdr, dxpl_id, child_iblock_addr, child_nrows,
+ sect->u.indirect.u.iblock, curr_entry, FALSE,
+ H5AC_WRITE, &did_protect)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
+ "unable to protect fractal heap indirect block")
} /* end if */
else
child_iblock = NULL;
@@ -2544,25 +2460,26 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
child_iblock = NULL;
/* Create free space section node */
- if(NULL == (child_sect = H5HF_sect_indirect_new(hdr, curr_off, (hsize_t)0,
- child_iblock, curr_off, 0, 0, child_nentries)))
+ if (NULL == (child_sect = H5HF_sect_indirect_new(hdr, curr_off, (hsize_t)0, child_iblock,
+ curr_off, 0, 0, child_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
/* Initialize rows for new indirect section */
- if(H5HF_sect_indirect_init_rows(hdr, dxpl_id, child_sect,
- first_child, first_row_sect, space_flags, 0, 0,
- (child_nrows - 1), (hdr->man_dtable.cparam.width - 1)) < 0)
+ if (H5HF_sect_indirect_init_rows(hdr, dxpl_id, child_sect, first_child, first_row_sect,
+ space_flags, 0, 0, (child_nrows - 1),
+ (hdr->man_dtable.cparam.width - 1)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section")
/* If we have a valid child indirect block, release it now */
/* (will be pinned, if rows reference it) */
- if(child_iblock)
- if(H5HF_man_iblock_unprotect(child_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ if (child_iblock)
+ if (H5HF_man_iblock_unprotect(child_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
+ "unable to release fractal heap indirect block")
/* Attach child section to this section */
- child_sect->u.indirect.parent = sect;
- child_sect->u.indirect.par_entry = curr_entry;
+ child_sect->u.indirect.parent = sect;
+ child_sect->u.indirect.par_entry = curr_entry;
sect->u.indirect.indir_ents[curr_indir_entry] = child_sect;
sect->u.indirect.rc++;
@@ -2574,13 +2491,13 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
curr_indir_entry++;
/* Reset the 'first child' parameters */
- first_child = FALSE;
+ first_child = FALSE;
first_row_sect = NULL;
} /* end for */
- } /* end else */
+ } /* end else */
/* Compute the # of entries for the next row */
- if(u < (end_row - 1))
+ if (u < (end_row - 1))
row_entries = hdr->man_dtable.cparam.width;
else
row_entries = end_col + 1;
@@ -2593,21 +2510,19 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
sect->u.indirect.dir_nrows = dir_nrows;
/* Make certain we've tracked the section's dependents correctly */
- HDassert(sect->u.indirect.rc ==
- (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
done:
- if(ret_value < 0) {
- if(sect->u.indirect.indir_ents)
+ if (ret_value < 0) {
+ if (sect->u.indirect.indir_ents)
H5MM_xfree(sect->u.indirect.indir_ents);
- if(sect->u.indirect.dir_rows)
+ if (sect->u.indirect.dir_rows)
H5MM_xfree(sect->u.indirect.dir_rows);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_init_rows() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_add
*
@@ -2617,25 +2532,24 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 3 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries)
+H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock, unsigned start_entry,
+ unsigned nentries)
{
- H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
- H5HF_free_section_t *first_row_sect = NULL; /* First row section in new indirect section */
- hsize_t sect_off; /* Offset of section in heap space */
- unsigned start_row; /* Start row in indirect block */
- unsigned start_col; /* Start column in indirect block */
- unsigned end_entry; /* End entry in indirect block */
- unsigned end_row; /* End row in indirect block */
- unsigned end_col; /* End column in indirect block */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
+ H5HF_free_section_t *first_row_sect = NULL; /* First row section in new indirect section */
+ hsize_t sect_off; /* Offset of section in heap space */
+ unsigned start_row; /* Start row in indirect block */
+ unsigned start_col; /* Start column in indirect block */
+ unsigned end_entry; /* End entry in indirect block */
+ unsigned end_row; /* End row in indirect block */
+ unsigned end_col; /* End column in indirect block */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2652,41 +2566,40 @@ H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
/* Compute end column & row */
end_entry = (start_entry + nentries) - 1;
- end_row = end_entry / hdr->man_dtable.cparam.width;
- end_col = end_entry % hdr->man_dtable.cparam.width;
+ end_row = end_entry / hdr->man_dtable.cparam.width;
+ end_col = end_entry % hdr->man_dtable.cparam.width;
/* Initialize information for rows skipped over */
sect_off = iblock->block_off;
- for(u = 0; u < start_row; u++)
+ for (u = 0; u < start_row; u++)
sect_off += hdr->man_dtable.row_block_size[u] * hdr->man_dtable.cparam.width;
sect_off += hdr->man_dtable.row_block_size[start_row] * start_col;
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_indirect_new(hdr, sect_off, (hsize_t)0, iblock,
- iblock->block_off, start_row, start_col, nentries)))
+ if (NULL == (sect = H5HF_sect_indirect_new(hdr, sect_off, (hsize_t)0, iblock, iblock->block_off,
+ start_row, start_col, nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
/* Initialize rows for new indirect section */
- if(H5HF_sect_indirect_init_rows(hdr, dxpl_id, sect, TRUE, &first_row_sect,
- H5FS_ADD_SKIP_VALID, start_row, start_col, end_row, end_col) < 0)
+ if (H5HF_sect_indirect_init_rows(hdr, dxpl_id, sect, TRUE, &first_row_sect, H5FS_ADD_SKIP_VALID,
+ start_row, start_col, end_row, end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section")
HDassert(first_row_sect);
/* Now that underlying indirect section is consistent, add first row
* section to free space manager for the heap
*/
- if(H5HF_space_add(hdr, dxpl_id, first_row_sect, H5FS_ADD_RETURNED_SPACE) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, first_row_sect, H5FS_ADD_RETURNED_SPACE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space")
done:
- if(ret_value < 0 && sect)
- if(H5HF_sect_indirect_free(sect) < 0)
+ if (ret_value < 0 && sect)
+ if (H5HF_sect_indirect_free(sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_add() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_decr
*
@@ -2695,7 +2608,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -2703,7 +2615,7 @@ done:
static herr_t
H5HF_sect_indirect_decr(H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2717,27 +2629,27 @@ H5HF_sect_indirect_decr(H5HF_free_section_t *sect)
sect->u.indirect.rc--;
/* If the indirect section's ref. count drops to zero, free the section */
- if(sect->u.indirect.rc == 0) {
- H5HF_free_section_t *par_sect; /* Parent indirect section */
+ if (sect->u.indirect.rc == 0) {
+ H5HF_free_section_t *par_sect; /* Parent indirect section */
/* Preserve pointer to parent indirect section when freeing this section */
par_sect = sect->u.indirect.parent;
/* Free indirect section */
- if(H5HF_sect_indirect_free(sect) < 0)
+ if (H5HF_sect_indirect_free(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
/* Decrement ref. count on indirect section's parent */
- if(par_sect)
- if(H5HF_sect_indirect_decr(par_sect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement ref. count on parent indirect section")
+ if (par_sect)
+ if (H5HF_sect_indirect_decr(par_sect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL,
+ "can't decrement ref. count on parent indirect section")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_decr() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_revive_row
*
@@ -2746,7 +2658,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 3 2006
*
*-------------------------------------------------------------------------
@@ -2754,10 +2665,10 @@ done:
static herr_t
H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2769,22 +2680,22 @@ H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Look up indirect block containing indirect blocks for section */
- if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, NULL, &did_protect, H5AC_READ) < 0)
+ if (H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, NULL, &did_protect,
+ H5AC_READ) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section")
/* Increment reference count on indirect block that free section is in */
- if(H5HF_iblock_incr(sec_iblock) < 0)
+ if (H5HF_iblock_incr(sec_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
/* Set the pointer to the section's indirect block */
sect->u.indirect.u.iblock = sec_iblock;
/* Set the number of entries in the indirect block */
- sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width *
- sect->u.indirect.u.iblock->max_rows;
+ sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width * sect->u.indirect.u.iblock->max_rows;
/* Unlock indirect block */
- if(H5HF_man_iblock_unprotect(sec_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
+ if (H5HF_man_iblock_unprotect(sec_iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
sec_iblock = NULL;
@@ -2792,19 +2703,19 @@ H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
sect->sect_info.state = H5FS_SECT_LIVE;
/* Loop over derived row sections and mark them all as 'live' now */
- for(u = 0; u < sect->u.indirect.dir_nrows; u++)
+ for (u = 0; u < sect->u.indirect.dir_nrows; u++)
sect->u.indirect.dir_rows[u]->sect_info.state = H5FS_SECT_LIVE;
/* Revive parent indirect section, if there is one */
- if(sect->u.indirect.parent && sect->u.indirect.parent->sect_info.state == H5FS_SECT_SERIALIZED)
- if(H5HF_sect_indirect_revive(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.u.iblock->parent) < 0)
+ if (sect->u.indirect.parent && sect->u.indirect.parent->sect_info.state == H5FS_SECT_SERIALIZED)
+ if (H5HF_sect_indirect_revive(hdr, dxpl_id, sect->u.indirect.parent,
+ sect->u.indirect.u.iblock->parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_revive_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_revive
*
@@ -2813,17 +2724,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *sect, H5HF_indirect_t *sect_iblock)
+H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
+ H5HF_indirect_t *sect_iblock)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2836,33 +2746,32 @@ H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(sect_iblock);
/* Increment reference count on indirect block that free section is in */
- if(H5HF_iblock_incr(sect_iblock) < 0)
+ if (H5HF_iblock_incr(sect_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
/* Set the pointer to the section's indirect block */
sect->u.indirect.u.iblock = sect_iblock;
/* Set the number of entries in the indirect block */
- sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width *
- sect->u.indirect.u.iblock->max_rows;
+ sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width * sect->u.indirect.u.iblock->max_rows;
/* Section is "live" now */
sect->sect_info.state = H5FS_SECT_LIVE;
/* Loop over derived row sections and mark them all as 'live' now */
- for(u = 0; u < sect->u.indirect.dir_nrows; u++)
+ for (u = 0; u < sect->u.indirect.dir_nrows; u++)
sect->u.indirect.dir_rows[u]->sect_info.state = H5FS_SECT_LIVE;
/* Revive parent indirect section, if there is one */
- if(sect->u.indirect.parent && sect->u.indirect.parent->sect_info.state == H5FS_SECT_SERIALIZED)
- if(H5HF_sect_indirect_revive(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.u.iblock->parent) < 0)
+ if (sect->u.indirect.parent && sect->u.indirect.parent->sect_info.state == H5FS_SECT_SERIALIZED)
+ if (H5HF_sect_indirect_revive(hdr, dxpl_id, sect->u.indirect.parent,
+ sect->u.indirect.u.iblock->parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_revive() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_reduce_row
*
@@ -2873,26 +2782,25 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *row_sect,
- hbool_t *alloc_from_start)
+ hbool_t *alloc_from_start)
{
- H5HF_free_section_t *sect; /* Indirect section underlying row section */
- unsigned row_start_entry; /* Entry for first block covered in row section */
- unsigned row_end_entry; /* Entry for last block covered in row section */
- unsigned row_entry; /* Entry to allocate in row section */
- unsigned start_entry; /* Entry for first block covered */
- unsigned start_row; /* Start row in indirect block */
- unsigned start_col; /* Start column in indirect block */
- unsigned end_entry; /* Entry for last block covered */
- unsigned end_row; /* End row in indirect block */
- H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect; /* Indirect section underlying row section */
+ unsigned row_start_entry; /* Entry for first block covered in row section */
+ unsigned row_end_entry; /* Entry for last block covered in row section */
+ unsigned row_entry; /* Entry to allocate in row section */
+ unsigned start_entry; /* Entry for first block covered */
+ unsigned start_row; /* Start row in indirect block */
+ unsigned start_col; /* Start column in indirect block */
+ unsigned end_entry; /* Entry for last block covered */
+ unsigned end_row; /* End row in indirect block */
+ H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2904,15 +2812,15 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
/* Compute starting & ending information for row section */
row_start_entry = (row_sect->u.row.row * hdr->man_dtable.cparam.width) + row_sect->u.row.col;
- row_end_entry = (row_start_entry + row_sect->u.row.num_entries) - 1;
+ row_end_entry = (row_start_entry + row_sect->u.row.num_entries) - 1;
/* Compute starting & ending information for indirect section */
- sect = row_sect->u.row.under;
- start_row = sect->u.indirect.row;
- start_col = sect->u.indirect.col;
+ sect = row_sect->u.row.under;
+ start_row = sect->u.indirect.row;
+ start_col = sect->u.indirect.col;
start_entry = (start_row * hdr->man_dtable.cparam.width) + start_col;
- end_entry = (start_entry + sect->u.indirect.num_entries) - 1;
- end_row = end_entry / hdr->man_dtable.cparam.width;
+ end_entry = (start_entry + sect->u.indirect.num_entries) - 1;
+ end_row = end_entry / hdr->man_dtable.cparam.width;
/* Additional sanity check */
HDassert(sect->u.indirect.span_size > 0);
@@ -2922,31 +2830,31 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
HDassert(sect->u.indirect.dir_rows[(row_sect->u.row.row - start_row)] == row_sect);
/* Check if we should allocate from end of indirect section */
- if(row_end_entry == end_entry && start_row != end_row) {
+ if (row_end_entry == end_entry && start_row != end_row) {
*alloc_from_start = FALSE;
- row_entry = row_end_entry;
+ row_entry = row_end_entry;
} /* end if */
else {
*alloc_from_start = TRUE;
- row_entry = row_start_entry;
+ row_entry = row_start_entry;
} /* end else */
/* Check if we have a parent section to be detached from */
- if(sect->u.indirect.parent) {
- hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
+ if (sect->u.indirect.parent) {
+ hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
is_first = H5HF_sect_indirect_is_first(sect);
/* Remove this indirect section from parent indirect section */
- if(H5HF_sect_indirect_reduce(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0)
+ if (H5HF_sect_indirect_reduce(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section")
- sect->u.indirect.parent = NULL;
+ sect->u.indirect.parent = NULL;
sect->u.indirect.par_entry = 0;
/* If we weren't the first section, set "first row" for this indirect section */
- if(!is_first)
- if(H5HF_sect_indirect_first(hdr, dxpl_id, sect) < 0)
+ if (!is_first)
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for indirect section")
} /* end if */
@@ -2954,14 +2862,14 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
sect->u.indirect.span_size -= row_sect->sect_info.size;
/* Check how to adjust section for allocated entry */
- if(sect->u.indirect.num_entries > 1) {
- if(row_entry == start_entry) {
+ if (sect->u.indirect.num_entries > 1) {
+ if (row_entry == start_entry) {
/* Adjust section start */
sect->sect_info.addr += hdr->man_dtable.row_block_size[sect->u.indirect.row];
/* Adjust block coordinates of span */
sect->u.indirect.col++;
- if(sect->u.indirect.col == hdr->man_dtable.cparam.width) {
+ if (sect->u.indirect.col == hdr->man_dtable.cparam.width) {
HDassert(row_sect->u.row.num_entries == 1);
/* Adjust section's span information */
@@ -2972,17 +2880,17 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
sect->u.indirect.dir_nrows--;
/* Adjust direct row sections for indirect section */
- if(sect->u.indirect.dir_nrows > 0) {
+ if (sect->u.indirect.dir_nrows > 0) {
HDassert(sect->u.indirect.dir_rows);
- HDmemmove(&sect->u.indirect.dir_rows[0],
- &sect->u.indirect.dir_rows[1],
- sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
+ HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[1],
+ sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
HDassert(sect->u.indirect.dir_rows[0]);
/* Make new "first row" in indirect section */
- if(row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
- if(H5HF_sect_row_first(hdr, dxpl_id, sect->u.indirect.dir_rows[0]) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for indirect section")
+ if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
+ if (H5HF_sect_row_first(hdr, dxpl_id, sect->u.indirect.dir_rows[0]) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't make new 'first row' for indirect section")
} /* end if */
else {
/* Sanity check */
@@ -2993,17 +2901,18 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
/* Make new "first row" in indirect section */
- if(row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
- if(H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for child indirect section")
+ if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't make new 'first row' for child indirect section")
} /* end else */
- } /* end if */
+ } /* end if */
/* Adjust number of entries covered */
sect->u.indirect.num_entries--;
} /* end if */
- else if(row_entry == end_entry) {
- unsigned new_end_row; /* New end row for entries */
+ else if (row_entry == end_entry) {
+ unsigned new_end_row; /* New end row for entries */
/* Sanity check */
HDassert(sect->u.indirect.indir_nents == 0);
@@ -3015,18 +2924,18 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
/* Check for eliminating a direct row */
new_end_row = ((start_entry + sect->u.indirect.num_entries) - 1) / hdr->man_dtable.cparam.width;
HDassert(new_end_row <= end_row);
- if(new_end_row < end_row) {
+ if (new_end_row < end_row) {
HDassert(new_end_row == (end_row - 1));
sect->u.indirect.dir_nrows--;
} /* end if */
- } /* end if */
+ } /* end if */
else {
- H5HF_indirect_t *iblock; /* Pointer to indirect block for this section */
- hsize_t iblock_off; /* Section's indirect block's offset in "heap space" */
- unsigned peer_nentries; /* Number of entries in new peer indirect section */
- unsigned peer_dir_nrows; /* Number of direct rows in new peer indirect section */
- unsigned new_start_row; /* New starting row for current indirect section */
- unsigned u; /* Local index variable */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block for this section */
+ hsize_t iblock_off; /* Section's indirect block's offset in "heap space" */
+ unsigned peer_nentries; /* Number of entries in new peer indirect section */
+ unsigned peer_dir_nrows; /* Number of direct rows in new peer indirect section */
+ unsigned new_start_row; /* New starting row for current indirect section */
+ unsigned u; /* Local index variable */
/* Sanity checks */
HDassert(row_sect->u.row.col == 0);
@@ -3036,45 +2945,44 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
HDassert(row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
/* Compute basic information about peer & current indirect sections */
- new_start_row = row_sect->u.row.row;
- peer_nentries = row_entry - start_entry;
+ new_start_row = row_sect->u.row.row;
+ peer_nentries = row_entry - start_entry;
peer_dir_nrows = new_start_row - start_row;
/* Get indirect block information for peer */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
- iblock = sect->u.indirect.u.iblock;
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
+ iblock = sect->u.indirect.u.iblock;
iblock_off = sect->u.indirect.u.iblock->block_off;
} /* end if */
else {
- iblock = NULL;
+ iblock = NULL;
iblock_off = sect->u.indirect.u.iblock_off;
} /* end else */
/* Create peer indirect section */
- if(NULL == (peer_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr,
- sect->sect_info.size, iblock, iblock_off, start_row, start_col,
- peer_nentries)))
+ if (NULL ==
+ (peer_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size, iblock,
+ iblock_off, start_row, start_col, peer_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
/* Set up direct row & indirect entry information for peer section */
peer_sect->u.indirect.indir_nents = 0;
- peer_sect->u.indirect.indir_ents = NULL;
- peer_sect->u.indirect.dir_nrows = peer_dir_nrows;
- if(NULL == (peer_sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * peer_dir_nrows)))
+ peer_sect->u.indirect.indir_ents = NULL;
+ peer_sect->u.indirect.dir_nrows = peer_dir_nrows;
+ if (NULL == (peer_sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(
+ sizeof(H5HF_free_section_t *) * peer_dir_nrows)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for row section pointer array")
/* Transfer row sections between current & peer sections */
- HDmemcpy(&peer_sect->u.indirect.dir_rows[0],
- &sect->u.indirect.dir_rows[0],
- (sizeof(H5HF_free_section_t *) * peer_dir_nrows));
- HDmemmove(&sect->u.indirect.dir_rows[0],
- &sect->u.indirect.dir_rows[peer_dir_nrows],
- (sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
+ HDmemcpy(&peer_sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[0],
+ (sizeof(H5HF_free_section_t *) * peer_dir_nrows));
+ HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[peer_dir_nrows],
+ (sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
sect->u.indirect.dir_nrows -= peer_dir_nrows;
HDassert(row_sect == sect->u.indirect.dir_rows[0]);
/* Re-target transferred row sections to point to new underlying indirect section */
- for(u = 0; u < peer_dir_nrows; u++)
+ for (u = 0; u < peer_dir_nrows; u++)
peer_sect->u.indirect.dir_rows[u]->u.row.under = peer_sect;
/* Change first row section in indirect section to be the "first row" */
@@ -3090,25 +2998,27 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
/* Transfer/update cached information about indirect block */
peer_sect->u.indirect.iblock_entries = sect->u.indirect.iblock_entries;
- peer_sect->u.indirect.span_size = row_sect->sect_info.addr - peer_sect->sect_info.addr;
+ peer_sect->u.indirect.span_size = row_sect->sect_info.addr - peer_sect->sect_info.addr;
/* Update information for current section */
sect->sect_info.addr = row_sect->sect_info.addr + hdr->man_dtable.row_block_size[new_start_row];
- sect->u.indirect.span_size -= peer_sect->u.indirect.span_size; /* (span for row section has already been removed) */
+ sect->u.indirect.span_size -=
+ peer_sect->u.indirect.span_size; /* (span for row section has already been removed) */
sect->u.indirect.row = new_start_row;
sect->u.indirect.col = row_sect->u.row.col + 1;
- sect->u.indirect.num_entries -= (peer_nentries + 1); /* Transferred entries, plus the entry allocated out of the row */
+ sect->u.indirect.num_entries -=
+ (peer_nentries + 1); /* Transferred entries, plus the entry allocated out of the row */
/* Make certain we've tracked the sections' dependents correctly */
- HDassert(sect->u.indirect.rc ==
- (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
- /* Reset the peer_sect variable, to indicate that it has been hooked into the data structures correctly and shouldn't be freed */
+ /* Reset the peer_sect variable, to indicate that it has been hooked into the data structures
+ * correctly and shouldn't be freed */
peer_sect = NULL;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Decrement count of entries & rows */
sect->u.indirect.num_entries--;
@@ -3122,18 +3032,17 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
done:
/* Free allocated peer_sect. Note that this is necessary for all failures until peer_sect is linked
* into the main free space structures (via the direct blocks), and the reference count is updated. */
- if(peer_sect) {
+ if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
HDassert(ret_value < 0);
- if(H5HF_sect_indirect_free(peer_sect) < 0)
+ if (H5HF_sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_reduce_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_reduce
*
@@ -3144,22 +3053,20 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
- unsigned child_entry)
+H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, unsigned child_entry)
{
- unsigned start_entry; /* Entry for first block covered */
- unsigned start_row; /* Start row in indirect block */
- unsigned start_col; /* Start column in indirect block */
- unsigned end_entry; /* Entry for last block covered */
- unsigned end_row; /* End row in indirect block */
- H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned start_entry; /* Entry for first block covered */
+ unsigned start_row; /* Start row in indirect block */
+ unsigned start_col; /* Start column in indirect block */
+ unsigned end_entry; /* Entry for last block covered */
+ unsigned end_row; /* End row in indirect block */
+ H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3172,35 +3079,37 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
HDassert(sect->u.indirect.iblock_entries > 0);
/* Compute starting & ending information for indirect section */
- start_row = sect->u.indirect.row;
- start_col = sect->u.indirect.col;
+ start_row = sect->u.indirect.row;
+ start_col = sect->u.indirect.col;
start_entry = (start_row * hdr->man_dtable.cparam.width) + start_col;
- end_entry = (start_entry + sect->u.indirect.num_entries) - 1;
- end_row = end_entry / hdr->man_dtable.cparam.width;
+ end_entry = (start_entry + sect->u.indirect.num_entries) - 1;
+ end_row = end_entry / hdr->man_dtable.cparam.width;
/* Check how to adjust section for allocated entry */
- if(sect->u.indirect.num_entries > 1) {
+ if (sect->u.indirect.num_entries > 1) {
/* Check if we have a parent section to be detached from */
- if(sect->u.indirect.parent) {
- hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
+ if (sect->u.indirect.parent) {
+ hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
is_first = H5HF_sect_indirect_is_first(sect);
/* Reduce parent indirect section */
- if(H5HF_sect_indirect_reduce(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0)
+ if (H5HF_sect_indirect_reduce(hdr, dxpl_id, sect->u.indirect.parent, sect->u.indirect.par_entry) <
+ 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section")
- sect->u.indirect.parent = NULL;
+ sect->u.indirect.parent = NULL;
sect->u.indirect.par_entry = 0;
/* If we weren't the first section, set "first row" for this indirect section */
- if(!is_first)
- if(H5HF_sect_indirect_first(hdr, dxpl_id, sect) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for indirect section")
+ if (!is_first)
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, sect) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't make new 'first row' for indirect section")
} /* end if */
/* Check if we can allocate from start of indirect section */
- if(child_entry == start_entry) {
+ if (child_entry == start_entry) {
/* Sanity check */
HDassert(sect->u.indirect.dir_nrows == 0);
HDassert(sect->u.indirect.dir_rows == NULL);
@@ -3212,7 +3121,7 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
/* Adjust span of blocks covered */
sect->u.indirect.col++;
- if(sect->u.indirect.col == hdr->man_dtable.cparam.width) {
+ if (sect->u.indirect.col == hdr->man_dtable.cparam.width) {
sect->u.indirect.row++;
sect->u.indirect.col = 0;
} /* end if */
@@ -3221,16 +3130,16 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
/* Adjust indirect entry information */
sect->u.indirect.indir_nents--;
- HDmemmove(&sect->u.indirect.indir_ents[0],
- &sect->u.indirect.indir_ents[1],
- sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
+ HDmemmove(&sect->u.indirect.indir_ents[0], &sect->u.indirect.indir_ents[1],
+ sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
HDassert(sect->u.indirect.indir_ents[0]);
/* Make new "first row" in new first indirect child section */
- if(H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for child indirect section")
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't make new 'first row' for child indirect section")
} /* end if */
- else if(child_entry == end_entry) {
+ else if (child_entry == end_entry) {
/* Sanity check */
HDassert(sect->u.indirect.indir_nents > 0);
HDassert(sect->u.indirect.indir_ents);
@@ -3241,47 +3150,47 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
/* Adjust indirect entry information */
sect->u.indirect.indir_nents--;
- if(sect->u.indirect.indir_nents == 0)
+ if (sect->u.indirect.indir_nents == 0)
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
} /* end if */
else {
- H5HF_indirect_t *iblock; /* Pointer to indirect block for this section */
- hsize_t iblock_off; /* Section's indirect block's offset in "heap space" */
- haddr_t peer_sect_addr; /* Address of new peer section in "heap space" */
- unsigned peer_nentries; /* Number of entries in new peer indirect section */
- unsigned peer_start_row; /* Starting row for new peer indirect section */
- unsigned peer_start_col; /* Starting column for new peer indirect section */
- unsigned child_row; /* Row where child entry is located */
- unsigned new_nentries; /* New number of entries for current indirect section */
- unsigned u; /* Local index variable */
+ H5HF_indirect_t *iblock; /* Pointer to indirect block for this section */
+ hsize_t iblock_off; /* Section's indirect block's offset in "heap space" */
+ haddr_t peer_sect_addr; /* Address of new peer section in "heap space" */
+ unsigned peer_nentries; /* Number of entries in new peer indirect section */
+ unsigned peer_start_row; /* Starting row for new peer indirect section */
+ unsigned peer_start_col; /* Starting column for new peer indirect section */
+ unsigned child_row; /* Row where child entry is located */
+ unsigned new_nentries; /* New number of entries for current indirect section */
+ unsigned u; /* Local index variable */
/* Sanity check */
HDassert(sect->u.indirect.indir_nents > 0);
HDassert(sect->u.indirect.indir_ents);
/* Compute basic information about peer & current indirect sections */
- peer_nentries = end_entry - child_entry;
+ peer_nentries = end_entry - child_entry;
peer_start_row = (child_entry + 1) / hdr->man_dtable.cparam.width;
peer_start_col = (child_entry + 1) % hdr->man_dtable.cparam.width;
- child_row = child_entry / hdr->man_dtable.cparam.width;
- new_nentries = sect->u.indirect.num_entries - (peer_nentries + 1);
+ child_row = child_entry / hdr->man_dtable.cparam.width;
+ new_nentries = sect->u.indirect.num_entries - (peer_nentries + 1);
HDassert(child_row >= hdr->man_dtable.max_direct_rows);
/* Get indirect block information for peer */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
- iblock = sect->u.indirect.u.iblock;
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
+ iblock = sect->u.indirect.u.iblock;
iblock_off = sect->u.indirect.u.iblock->block_off;
} /* end if */
else {
- iblock = NULL;
+ iblock = NULL;
iblock_off = sect->u.indirect.u.iblock_off;
} /* end else */
/* Update the number of entries in current section & calculate it's span size */
/* (Will use this to compute the section address for the peer section */
sect->u.indirect.num_entries = new_nentries;
- sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable,
- sect->u.indirect.row, sect->u.indirect.col, new_nentries);
+ sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable, sect->u.indirect.row,
+ sect->u.indirect.col, new_nentries);
HDassert(sect->u.indirect.span_size > 0);
/* Compute address of peer indirect section */
@@ -3290,30 +3199,32 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
peer_sect_addr += hdr->man_dtable.row_block_size[child_row];
/* Create peer indirect section */
- if(NULL == (peer_sect = H5HF_sect_indirect_new(hdr, peer_sect_addr,
- sect->sect_info.size, iblock, iblock_off, peer_start_row,
- peer_start_col, peer_nentries)))
+ if (NULL == (peer_sect = H5HF_sect_indirect_new(hdr, peer_sect_addr, sect->sect_info.size, iblock,
+ iblock_off, peer_start_row, peer_start_col,
+ peer_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
/* Set up direct row & indirect entry information for peer section */
- peer_sect->u.indirect.dir_nrows = 0;
- peer_sect->u.indirect.dir_rows = NULL;
+ peer_sect->u.indirect.dir_nrows = 0;
+ peer_sect->u.indirect.dir_rows = NULL;
peer_sect->u.indirect.indir_nents = peer_nentries;
- if(NULL == (peer_sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * peer_nentries)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for indirect section pointer array")
+ if (NULL == (peer_sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(
+ sizeof(H5HF_free_section_t *) * peer_nentries)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL,
+ "allocation failed for indirect section pointer array")
/* Transfer child indirect sections between current & peer sections */
HDmemcpy(&peer_sect->u.indirect.indir_ents[0],
- &sect->u.indirect.indir_ents[sect->u.indirect.indir_nents - peer_nentries],
- (sizeof(H5HF_free_section_t *) * peer_nentries));
+ &sect->u.indirect.indir_ents[sect->u.indirect.indir_nents - peer_nentries],
+ (sizeof(H5HF_free_section_t *) * peer_nentries));
sect->u.indirect.indir_nents -= (peer_nentries + 1); /* Transferred blocks, plus child entry */
/* Eliminate indirect entries for this section, if appropriate */
- if(sect->u.indirect.indir_nents == 0)
+ if (sect->u.indirect.indir_nents == 0)
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
/* Re-target transferred row sections to point to new underlying indirect section */
- for(u = 0; u < peer_nentries; u++)
+ for (u = 0; u < peer_nentries; u++)
peer_sect->u.indirect.indir_ents[u]->u.indirect.parent = peer_sect;
/* Adjust reference counts for current & peer sections */
@@ -3328,18 +3239,20 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
* detached the child section yet)
*/
HDassert((sect->u.indirect.rc - 1) ==
- (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
/* Make new "first row" in peer section */
- if(H5HF_sect_indirect_first(hdr, dxpl_id, peer_sect->u.indirect.indir_ents[0]) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for peer indirect section")
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, peer_sect->u.indirect.indir_ents[0]) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
+ "can't make new 'first row' for peer indirect section")
- /* Reset the peer_sect variable, to indicate that it has been hooked into the data structures correctly and shouldn't be freed */
+ /* Reset the peer_sect variable, to indicate that it has been hooked into the data structures
+ * correctly and shouldn't be freed */
peer_sect = NULL;
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Decrement count of entries & indirect entries */
sect->u.indirect.num_entries--;
@@ -3352,24 +3265,23 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
/* Decrement # of sections which depend on this row */
/* (Must be last as section can be freed) */
- if(H5HF_sect_indirect_decr(sect) < 0)
+ if (H5HF_sect_indirect_decr(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement section's ref. count ")
done:
/* Free allocated peer_sect. Note that this is necessary for all failures until peer_sect is linked
* into the main free space structures (via the direct blocks), and the reference count is updated. */
- if(peer_sect) {
+ if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
HDassert(ret_value < 0);
- if(H5HF_sect_indirect_free(peer_sect) < 0)
+ if (H5HF_sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_reduce() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_is_first
*
@@ -3378,7 +3290,6 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/<can't fail>
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 17 2006
*
*-------------------------------------------------------------------------
@@ -3386,7 +3297,7 @@ done:
static hbool_t
H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
{
- hbool_t ret_value = FALSE; /* Return value */
+ hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -3394,8 +3305,8 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
HDassert(sect);
/* Recurse to parent */
- if(sect->u.indirect.parent) {
- if(sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
+ if (sect->u.indirect.parent) {
+ if (sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
ret_value = H5HF_sect_indirect_is_first(sect->u.indirect.parent);
} /* end if */
else
@@ -3404,7 +3315,6 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_is_first() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_first
*
@@ -3413,7 +3323,6 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -3421,7 +3330,7 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
static herr_t
H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3430,7 +3339,7 @@ H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *se
HDassert(sect);
/* Check if this indirect section has direct block rows */
- if(sect->u.indirect.dir_nrows > 0) {
+ if (sect->u.indirect.dir_nrows > 0) {
/* Sanity checks */
HDassert(sect->u.indirect.row == 0);
HDassert(sect->u.indirect.col == 0);
@@ -3438,7 +3347,7 @@ H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *se
HDassert(sect->u.indirect.dir_rows[0]);
/* Change first row section in indirect section to be the "first row" */
- if(H5HF_sect_row_first(hdr, dxpl_id, sect->u.indirect.dir_rows[0]) < 0)
+ if (H5HF_sect_row_first(hdr, dxpl_id, sect->u.indirect.dir_rows[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row")
} /* end if */
else {
@@ -3448,7 +3357,7 @@ H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *se
HDassert(sect->u.indirect.indir_ents[0]);
/* Forward to first child indirect section */
- if(H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
+ if (H5HF_sect_indirect_first(hdr, dxpl_id, sect->u.indirect.indir_ents[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set child indirect section to be first row")
} /* end else */
@@ -3456,7 +3365,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_first() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_get_iblock
*
@@ -3465,7 +3373,6 @@ done:
* Return: Pointer to indirect block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 9 2006
*
*-------------------------------------------------------------------------
@@ -3485,7 +3392,6 @@ H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect)
FUNC_LEAVE_NOAPI(sect->u.indirect.u.iblock)
} /* end H5HF_sect_indirect_get_iblock() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_merge_row
*
@@ -3503,18 +3409,18 @@ H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
- H5HF_free_section_t *row_sect1, H5HF_free_section_t *row_sect2)
+H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *row_sect1,
+ H5HF_free_section_t *row_sect2)
{
- H5HF_free_section_t *sect1, *sect2; /* Indirect sections underlying row sections */
- unsigned start_entry1; /* Start entry for section #1 */
- unsigned start_row1, start_col1; /* Starting row & column for section #1 */
- unsigned end_entry1; /* End entry for section #1 */
- unsigned end_row1; /* Ending row for section #1 */
- unsigned start_row2; /* Starting row for section #2 */
- hbool_t merged_rows; /* Flag to indicate that rows was merged together */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect1, *sect2; /* Indirect sections underlying row sections */
+ unsigned start_entry1; /* Start entry for section #1 */
+ unsigned start_row1, start_col1; /* Starting row & column for section #1 */
+ unsigned end_entry1; /* End entry for section #1 */
+ unsigned end_row1; /* Ending row for section #1 */
+ unsigned start_row2; /* Starting row for section #2 */
+ hbool_t merged_rows; /* Flag to indicate that rows was merged together */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3544,21 +3450,21 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(sect1->u.indirect.iblock_entries == sect2->u.indirect.iblock_entries);
/* Set up span information */
- start_row1 = sect1->u.indirect.row;
- start_col1 = sect1->u.indirect.col;
+ start_row1 = sect1->u.indirect.row;
+ start_col1 = sect1->u.indirect.col;
start_entry1 = (start_row1 * hdr->man_dtable.cparam.width) + start_col1;
- end_entry1 = (start_entry1 + sect1->u.indirect.num_entries) - 1;
- end_row1 = end_entry1 / hdr->man_dtable.cparam.width;
- start_row2 = sect2->u.indirect.row;
+ end_entry1 = (start_entry1 + sect1->u.indirect.num_entries) - 1;
+ end_row1 = end_entry1 / hdr->man_dtable.cparam.width;
+ start_row2 = sect2->u.indirect.row;
/* Check for direct sections in second section */
/* (second indirect section can be parent of indirect section for second
* row, and thus have no row sections of it's own)
*/
- if(sect2->u.indirect.dir_nrows > 0) {
- unsigned new_dir_nrows1; /* New value for number of direct rows in first section */
- unsigned src_row2; /* Source row for copying from second section */
- unsigned nrows_moved2; /* Number of rows to move from second section to first */
+ if (sect2->u.indirect.dir_nrows > 0) {
+ unsigned new_dir_nrows1; /* New value for number of direct rows in first section */
+ unsigned src_row2; /* Source row for copying from second section */
+ unsigned nrows_moved2; /* Number of rows to move from second section to first */
/* Sanity check child row assumptions */
/* (second indirect section should be at top of equal or deeper
@@ -3570,12 +3476,13 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
HDassert(sect1->u.indirect.dir_rows);
/* Check for sections sharing a row in the same underlying indirect block */
- if(row_sect1->u.row.under->u.indirect.u.iblock->block_off == row_sect2->u.row.under->u.indirect.u.iblock->block_off
- && end_row1 == start_row2) {
- H5HF_free_section_t *last_row_sect1; /* Last row in first indirect section */
+ if (row_sect1->u.row.under->u.indirect.u.iblock->block_off ==
+ row_sect2->u.row.under->u.indirect.u.iblock->block_off &&
+ end_row1 == start_row2) {
+ H5HF_free_section_t *last_row_sect1; /* Last row in first indirect section */
/* Locate the last row section in first indirect section, if we don't already have it */
- if(row_sect1->u.row.row != end_row1)
+ if (row_sect1->u.row.row != end_row1)
last_row_sect1 = sect1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows - 1];
else
last_row_sect1 = row_sect1;
@@ -3587,8 +3494,8 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
last_row_sect1->u.row.num_entries += row_sect2->u.row.num_entries;
/* Set up parameters for transfer of rows */
- src_row2 = 1;
- nrows_moved2 = sect2->u.indirect.dir_nrows - 1;
+ src_row2 = 1;
+ nrows_moved2 = sect2->u.indirect.dir_nrows - 1;
new_dir_nrows1 = (sect1->u.indirect.dir_nrows + sect2->u.indirect.dir_nrows) - 1;
/* Indicate that the rows were merged */
@@ -3597,8 +3504,8 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
else {
/* Set up parameters for transfer of rows */
- src_row2 = 0;
- nrows_moved2 = sect2->u.indirect.dir_nrows;
+ src_row2 = 0;
+ nrows_moved2 = sect2->u.indirect.dir_nrows;
new_dir_nrows1 = sect1->u.indirect.dir_nrows + sect2->u.indirect.dir_nrows;
/* Indicate that the rows were _not_ merged */
@@ -3606,21 +3513,21 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
} /* end else */
/* Check if we need to move additional rows */
- if(nrows_moved2 > 0) {
- H5HF_free_section_t **new_dir_rows; /* Pointer to new array of direct row pointers */
+ if (nrows_moved2 > 0) {
+ H5HF_free_section_t **new_dir_rows; /* Pointer to new array of direct row pointers */
/* Extend the first section's row array */
- if(NULL == (new_dir_rows = (H5HF_free_section_t **)H5MM_realloc(sect1->u.indirect.dir_rows, sizeof(H5HF_free_section_t *) * new_dir_nrows1)))
+ if (NULL == (new_dir_rows = (H5HF_free_section_t **)H5MM_realloc(
+ sect1->u.indirect.dir_rows, sizeof(H5HF_free_section_t *) * new_dir_nrows1)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array")
sect1->u.indirect.dir_rows = new_dir_rows;
/* Transfer the second section's rows to first section */
HDmemcpy(&sect1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows],
- &sect2->u.indirect.dir_rows[src_row2],
- (sizeof(H5HF_free_section_t *) * nrows_moved2));
+ &sect2->u.indirect.dir_rows[src_row2], (sizeof(H5HF_free_section_t *) * nrows_moved2));
/* Re-target the row sections moved from second section */
- for(u = sect1->u.indirect.dir_nrows; u < new_dir_nrows1; u++)
+ for (u = sect1->u.indirect.dir_nrows; u < new_dir_nrows1; u++)
sect1->u.indirect.dir_rows[u]->u.row.under = sect1;
/* Adjust reference counts to account for transferred rows */
@@ -3630,14 +3537,14 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
/* Update information for first section */
sect1->u.indirect.dir_nrows = new_dir_nrows1;
} /* end if */
- } /* end if */
+ } /* end if */
else
/* Indicate that the rows were _not_ merged */
merged_rows = FALSE;
/* Check for indirect sections in second section */
- if(sect2->u.indirect.indir_nents > 0) {
- unsigned new_indir_nents1; /* New value for number of indirect entries in first section */
+ if (sect2->u.indirect.indir_nents > 0) {
+ unsigned new_indir_nents1; /* New value for number of indirect entries in first section */
/* Some sanity checks on second indirect section */
HDassert(sect2->u.indirect.rc > 0);
@@ -3648,26 +3555,27 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
new_indir_nents1 = sect1->u.indirect.indir_nents + sect2->u.indirect.indir_nents;
/* Check if first section can just take over second section's memory buffer */
- if(sect1->u.indirect.indir_ents == NULL) {
+ if (sect1->u.indirect.indir_ents == NULL) {
sect1->u.indirect.indir_ents = sect2->u.indirect.indir_ents;
sect2->u.indirect.indir_ents = NULL;
} /* end if */
else {
- H5HF_free_section_t **new_indir_ents; /* Pointer to new array of indirect entries */
+ H5HF_free_section_t **new_indir_ents; /* Pointer to new array of indirect entries */
/* Extend the first section's entry array */
- if(NULL == (new_indir_ents = (H5HF_free_section_t **)H5MM_realloc(sect1->u.indirect.indir_ents, sizeof(H5HF_free_section_t *) * new_indir_nents1)))
+ if (NULL == (new_indir_ents = (H5HF_free_section_t **)H5MM_realloc(
+ sect1->u.indirect.indir_ents, sizeof(H5HF_free_section_t *) * new_indir_nents1)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array")
sect1->u.indirect.indir_ents = new_indir_ents;
/* Transfer the second section's entries to first section */
HDmemcpy(&sect1->u.indirect.indir_ents[sect1->u.indirect.indir_nents],
- &sect2->u.indirect.indir_ents[0],
- (sizeof(H5HF_free_section_t *) * sect2->u.indirect.indir_nents));
+ &sect2->u.indirect.indir_ents[0],
+ (sizeof(H5HF_free_section_t *) * sect2->u.indirect.indir_nents));
} /* end else */
/* Re-target the child indirect sections moved from second section */
- for(u = sect1->u.indirect.indir_nents; u < new_indir_nents1; u++)
+ for (u = sect1->u.indirect.indir_nents; u < new_indir_nents1; u++)
sect1->u.indirect.indir_ents[u]->u.indirect.parent = sect1;
/* Adjust reference counts for transferred child indirect sections */
@@ -3683,46 +3591,46 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
sect1->u.indirect.span_size += sect2->u.indirect.span_size;
/* Make certain we've tracked the first section's dependents correctly */
- HDassert(sect1->u.indirect.rc ==
- (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
+ HDassert(sect1->u.indirect.rc == (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
/* Wrap up, freeing or re-inserting second row section */
/* (want this to be after the first indirection section is consistent again) */
- if(merged_rows) {
+ if (merged_rows) {
/* Release second row section */
/* (indirectly releases second indirect section, since all of it's
* other dependents are gone)
*/
HDassert(sect2->u.indirect.rc == 1);
- if(H5HF_sect_row_free((H5FS_section_info_t *)row_sect2) < 0)
+ if (H5HF_sect_row_free((H5FS_section_info_t *)row_sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section")
} /* end if */
else {
/* Decrement ref. count on second indirect section's parent */
HDassert(sect2->u.indirect.rc == 0);
- if(sect2->u.indirect.parent)
- if(H5HF_sect_indirect_decr(sect2->u.indirect.parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement ref. count on parent indirect section")
+ if (sect2->u.indirect.parent)
+ if (H5HF_sect_indirect_decr(sect2->u.indirect.parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL,
+ "can't decrement ref. count on parent indirect section")
/* Free second indirect section */
- if(H5HF_sect_indirect_free(sect2) < 0)
+ if (H5HF_sect_indirect_free(sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
/* Re-add the second section's first row */
/* (it's already been added to first indirect section, but it's been removed
* from the free space manager and needs to be re-added)
- */
+ */
row_sect2->sect_info.type = H5HF_FSPACE_SECT_NORMAL_ROW;
- if(H5HF_space_add(hdr, dxpl_id, row_sect2, H5FS_ADD_SKIP_VALID) < 0)
+ if (H5HF_space_add(hdr, dxpl_id, row_sect2, H5FS_ADD_SKIP_VALID) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add second row section to free space")
} /* end else */
/* Check if we can create parent indirect section for first section */
/* (i.e. merged indirect sections cover an entire indirect block) */
- if(sect1->u.indirect.iblock_entries == sect1->u.indirect.num_entries) {
+ if (sect1->u.indirect.iblock_entries == sect1->u.indirect.num_entries) {
/* Build parent section for fully populated indirect section */
HDassert(sect1->u.indirect.parent == NULL);
- if(H5HF_sect_indirect_build_parent(hdr, sect1) < 0)
+ if (H5HF_sect_indirect_build_parent(hdr, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create parent for full indirect section")
} /* end if */
@@ -3730,7 +3638,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_merge_row() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_build_parent
*
@@ -3747,11 +3654,11 @@ done:
static herr_t
H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
{
- H5HF_indirect_t *par_iblock; /* Indirect block for parent section */
- H5HF_free_section_t *par_sect = NULL; /* Parent indirect section */
- unsigned par_row, par_col; /* Row & column in parent indirect section */
- unsigned par_entry; /* Entry within parent indirect section */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t * par_iblock; /* Indirect block for parent section */
+ H5HF_free_section_t *par_sect = NULL; /* Parent indirect section */
+ unsigned par_row, par_col; /* Row & column in parent indirect section */
+ unsigned par_entry; /* Entry within parent indirect section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3766,42 +3673,41 @@ H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/* Get information for creating parent indirect section */
par_entry = sect->u.indirect.u.iblock->par_entry;
- par_row = par_entry / hdr->man_dtable.cparam.width;
- par_col = par_entry % hdr->man_dtable.cparam.width;
+ par_row = par_entry / hdr->man_dtable.cparam.width;
+ par_col = par_entry % hdr->man_dtable.cparam.width;
HDassert(par_row >= hdr->man_dtable.max_direct_rows);
par_iblock = sect->u.indirect.u.iblock->parent;
HDassert(par_iblock);
/* Create parent indirect section */
- if(NULL == (par_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr,
- sect->sect_info.size, par_iblock, par_iblock->block_off,
- par_row, par_col, 1)))
+ if (NULL == (par_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size,
+ par_iblock, par_iblock->block_off, par_row, par_col, 1)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
/* No rows of direct blocks covered in parent, reset direct row information */
par_sect->u.indirect.dir_nrows = 0;
- par_sect->u.indirect.dir_rows = NULL;
+ par_sect->u.indirect.dir_rows = NULL;
/* Allocate space for the child indirect sections */
par_sect->u.indirect.indir_nents = 1;
- if(NULL == (par_sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *))))
+ if (NULL == (par_sect->u.indirect.indir_ents =
+ (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *))))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array")
/* Attach sections together */
- sect->u.indirect.parent = par_sect;
- sect->u.indirect.par_entry = par_entry;
+ sect->u.indirect.parent = par_sect;
+ sect->u.indirect.par_entry = par_entry;
par_sect->u.indirect.indir_ents[0] = sect;
- par_sect->u.indirect.rc = 1;
+ par_sect->u.indirect.rc = 1;
done:
- if(ret_value < 0)
- if(par_sect && H5HF_sect_indirect_free(par_sect) < 0)
+ if (ret_value < 0)
+ if (par_sect && H5HF_sect_indirect_free(par_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_build_parent() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_shrink
*
@@ -3818,8 +3724,8 @@ done:
static herr_t
H5HF_sect_indirect_shrink(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3831,33 +3737,32 @@ H5HF_sect_indirect_shrink(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
HDassert(sect->u.indirect.dir_nrows > 0 || sect->u.indirect.indir_nents > 0);
/* Walk through direct rows, freeing them */
- for(u = 0; u < sect->u.indirect.dir_nrows; u++) {
+ for (u = 0; u < sect->u.indirect.dir_nrows; u++) {
/* Remove the normal rows from free space manager */
- if(sect->u.indirect.dir_rows[u]->sect_info.type != H5HF_FSPACE_SECT_FIRST_ROW) {
+ if (sect->u.indirect.dir_rows[u]->sect_info.type != H5HF_FSPACE_SECT_FIRST_ROW) {
HDassert(sect->u.indirect.dir_rows[u]->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- if(H5HF_space_remove(hdr, dxpl_id, sect->u.indirect.dir_rows[u]) < 0)
+ if (H5HF_space_remove(hdr, dxpl_id, sect->u.indirect.dir_rows[u]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space")
} /* end if */
/* Release the row section */
- if(H5HF_sect_row_free_real(sect->u.indirect.dir_rows[u]) < 0)
+ if (H5HF_sect_row_free_real(sect->u.indirect.dir_rows[u]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node")
} /* end for */
/* Walk through indirect entries, freeing them (recursively) */
- for(u = 0; u < sect->u.indirect.indir_nents; u++)
- if(H5HF_sect_indirect_shrink(hdr, dxpl_id, sect->u.indirect.indir_ents[u]) < 0)
+ for (u = 0; u < sect->u.indirect.indir_nents; u++)
+ if (H5HF_sect_indirect_shrink(hdr, dxpl_id, sect->u.indirect.indir_ents[u]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node")
/* Free the indirect section itself */
- if(H5HF_sect_indirect_free(sect) < 0)
+ if (H5HF_sect_indirect_free(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sect_indirect_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_serialize
*
@@ -3873,10 +3778,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
- uint8_t *buf)
+H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect, uint8_t *buf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3886,14 +3790,15 @@ H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
HDassert(buf);
/* Check if this indirect section has a parent & forward if this section is first */
- if(sect->u.indirect.parent) {
- if(sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
- if(H5HF_sect_indirect_serialize(hdr, sect->u.indirect.parent, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, "can't serialize indirect section's parent indirect section")
+ if (sect->u.indirect.parent) {
+ if (sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
+ if (H5HF_sect_indirect_serialize(hdr, sect->u.indirect.parent, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL,
+ "can't serialize indirect section's parent indirect section")
} /* end if */
else {
/* Indirect range's indirect block's block offset */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
HDassert(sect->u.indirect.u.iblock);
UINT64ENCODE_VAR(buf, sect->u.indirect.u.iblock->block_off, hdr->heap_off_size);
} /* end if */
@@ -3914,14 +3819,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_indirect_serialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_deserialize
*
* Purpose: Deserialize a buffer into a "live" indirect section
*
* Return: Success: non-negative
- *
* Failure: negative
*
* Programmer: Quincey Koziol
@@ -3930,20 +3833,19 @@ done:
*-------------------------------------------------------------------------
*/
static H5FS_section_info_t *
-H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id,
- const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags)
+H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *buf, haddr_t sect_addr,
+ hsize_t sect_size, unsigned *des_flags)
{
- H5HF_free_section_t *new_sect; /* New indirect section */
- hsize_t iblock_off; /* Indirect block's offset */
- unsigned start_row; /* Indirect section's start row */
- unsigned start_col; /* Indirect section's start column */
- unsigned nentries; /* Indirect section's number of entries */
- unsigned start_entry; /* Start entry in indirect block */
- unsigned end_entry; /* End entry in indirect block */
- unsigned end_row; /* End row in indirect block */
- unsigned end_col; /* End column in indirect block */
- H5FS_section_info_t *ret_value; /* Return value */
+ H5HF_free_section_t *new_sect; /* New indirect section */
+ hsize_t iblock_off; /* Indirect block's offset */
+ unsigned start_row; /* Indirect section's start row */
+ unsigned start_col; /* Indirect section's start column */
+ unsigned nentries; /* Indirect section's number of entries */
+ unsigned start_entry; /* Start entry in indirect block */
+ unsigned end_entry; /* End entry in indirect block */
+ unsigned end_row; /* End row in indirect block */
+ unsigned end_col; /* End column in indirect block */
+ H5FS_section_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3966,8 +3868,8 @@ H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id,
UINT16DECODE(buf, nentries);
/* Create free space section node */
- if(NULL == (new_sect = H5HF_sect_indirect_new(hdr, sect_addr, sect_size,
- NULL, iblock_off, start_row, start_col, nentries)))
+ if (NULL == (new_sect = H5HF_sect_indirect_new(hdr, sect_addr, sect_size, NULL, iblock_off, start_row,
+ start_col, nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section")
/* Compute start entry */
@@ -3975,13 +3877,13 @@ H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id,
/* Compute end column & row */
end_entry = (start_entry + nentries) - 1;
- end_row = end_entry / hdr->man_dtable.cparam.width;
- end_col = end_entry % hdr->man_dtable.cparam.width;
+ end_row = end_entry / hdr->man_dtable.cparam.width;
+ end_col = end_entry % hdr->man_dtable.cparam.width;
/* Initialize rows for new indirect section */
- if(H5HF_sect_indirect_init_rows(hdr, dxpl_id, new_sect, TRUE, NULL,
- H5FS_ADD_DESERIALIZING, new_sect->u.indirect.row, new_sect->u.indirect.col,
- end_row, end_col) < 0)
+ if (H5HF_sect_indirect_init_rows(hdr, dxpl_id, new_sect, TRUE, NULL, H5FS_ADD_DESERIALIZING,
+ new_sect->u.indirect.row, new_sect->u.indirect.col, end_row,
+ end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize indirect section")
/* Indicate that this section shouldn't be added to free space manager's list */
@@ -3994,7 +3896,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_sect_indirect_deserialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_free
*
@@ -4012,8 +3913,8 @@ done:
static herr_t
H5HF_sect_indirect_free(H5HF_free_section_t *sect)
{
- H5HF_indirect_t *iblock = NULL; /* Indirect block for section */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_indirect_t *iblock = NULL; /* Indirect block for section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -4026,21 +3927,19 @@ H5HF_sect_indirect_free(H5HF_free_section_t *sect)
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
/* Check for live reference to an indirect block */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.state == H5FS_SECT_LIVE)
/* Get indirect block, if there was one */
- if(sect->u.indirect.u.iblock)
+ if (sect->u.indirect.u.iblock)
iblock = sect->u.indirect.u.iblock;
- } /* end if */
/* Release the sections */
- if(H5HF_sect_node_free(sect, iblock) < 0)
+ if (H5HF_sect_node_free(sect, iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_indirect_free() */
+} /* H5HF_sect_indirect_free() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_valid
*
@@ -4057,12 +3956,12 @@ done:
static herr_t
H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
{
- unsigned start_row; /* Row for first block covered */
- unsigned start_col; /* Column for first block covered */
- unsigned start_entry; /* Entry for first block covered */
- unsigned end_row; /* Row for last block covered */
- unsigned end_entry; /* Entry for last block covered */
- unsigned u; /* Local index variable */
+ unsigned start_row; /* Row for first block covered */
+ unsigned start_col; /* Column for first block covered */
+ unsigned start_entry; /* Entry for first block covered */
+ unsigned end_row; /* Row for last block covered */
+ unsigned end_entry; /* Entry for last block covered */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -4071,21 +3970,21 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
HDassert(sect);
/* Compute starting entry, column & row */
- start_row = sect->u.indirect.row;
- start_col = sect->u.indirect.col;
+ start_row = sect->u.indirect.row;
+ start_col = sect->u.indirect.col;
start_entry = (start_row * hdr->man_dtable.cparam.width) + start_col;
/* Compute ending entry, column & row */
end_entry = (start_entry + sect->u.indirect.num_entries) - 1;
- end_row = end_entry / hdr->man_dtable.cparam.width;
+ end_row = end_entry / hdr->man_dtable.cparam.width;
/* Sanity check any direct rows */
- if(sect->u.indirect.dir_nrows > 0) {
- unsigned dir_nrows; /* Number of direct rows in section */
- unsigned max_dir_row; /* Maximum direct row in section */
+ if (sect->u.indirect.dir_nrows > 0) {
+ unsigned dir_nrows; /* Number of direct rows in section */
+ unsigned max_dir_row; /* Maximum direct row in section */
/* Check for indirect rows in section */
- if(end_row >= hdr->man_dtable.max_direct_rows)
+ if (end_row >= hdr->man_dtable.max_direct_rows)
max_dir_row = hdr->man_dtable.max_direct_rows - 1;
else
max_dir_row = end_row;
@@ -4093,43 +3992,43 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
/* Iterate over direct rows, checking pointer references */
dir_nrows = (max_dir_row - start_row) + 1;
HDassert(dir_nrows == sect->u.indirect.dir_nrows);
- for(u = 0; u < dir_nrows; u++) {
- const H5HF_free_section_t *tmp_row_sect; /* Pointer to row section */
+ for (u = 0; u < dir_nrows; u++) {
+ const H5HF_free_section_t *tmp_row_sect; /* Pointer to row section */
tmp_row_sect = sect->u.indirect.dir_rows[u];
- HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
- || tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
HDassert(tmp_row_sect->u.row.under == sect);
HDassert(tmp_row_sect->u.row.row == (start_row + u));
- if(u > 0) {
- const H5HF_free_section_t *tmp_row_sect2; /* Pointer to row section */
+ if (u > 0) {
+ const H5HF_free_section_t *tmp_row_sect2; /* Pointer to row section */
tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1];
HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
HDassert(H5F_addr_lt(tmp_row_sect2->sect_info.addr, tmp_row_sect->sect_info.addr));
HDassert(tmp_row_sect2->sect_info.size <= tmp_row_sect->sect_info.size);
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
/* Sanity check any indirect entries */
- if(sect->u.indirect.indir_nents > 0) {
+ if (sect->u.indirect.indir_nents > 0) {
/* Basic sanity checks */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.state == H5FS_SECT_LIVE) {
HDassert(sect->u.indirect.iblock_entries);
HDassert(sect->u.indirect.indir_nents <= sect->u.indirect.iblock_entries);
} /* end if */
HDassert(sect->u.indirect.indir_ents);
/* Sanity check each child indirect section */
- for(u = 0; u < sect->u.indirect.indir_nents; u++) {
- const H5HF_free_section_t *tmp_child_sect; /* Pointer to child indirect section */
+ for (u = 0; u < sect->u.indirect.indir_nents; u++) {
+ const H5HF_free_section_t *tmp_child_sect; /* Pointer to child indirect section */
tmp_child_sect = sect->u.indirect.indir_ents[u];
HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
HDassert(tmp_child_sect->u.indirect.parent == sect);
- if(u > 0) {
- const H5HF_free_section_t *tmp_child_sect2; /* Pointer to child indirect section */
+ if (u > 0) {
+ const H5HF_free_section_t *tmp_child_sect2; /* Pointer to child indirect section */
tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1];
HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
@@ -4138,12 +4037,11 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
/* Recursively check child indirect section */
H5HF_sect_indirect_valid(hdr, tmp_child_sect);
} /* end for */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5HF_sect_indirect_valid() */
+} /* H5HF_sect_indirect_valid() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_sect_indirect_debug
*
@@ -4159,8 +4057,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
- FILE *stream, int indent, int fwidth)
+H5HF_sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int indent, int fwidth)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -4168,16 +4065,9 @@ H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
HDassert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Row:",
- sect->u.indirect.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Column:",
- sect->u.indirect.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of entries:",
- sect->u.indirect.num_entries);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_sect_indirect_debug() */
-
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 4d4b0f4..d08c270 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HFspace.c
* May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Space allocation routines for fractal heaps.
*
@@ -26,56 +26,48 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
/****************/
/* Local Macros */
/****************/
-#define H5HF_FSPACE_SHRINK 80 /* Percent of "normal" size to shrink serialized free space size */
-#define H5HF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
-#define H5HF_FSPACE_THRHD_DEF 1 /* Default: no alignment threshold */
-#define H5HF_FSPACE_ALIGN_DEF 1 /* Default: no alignment */
+#define H5HF_FSPACE_SHRINK 80 /* Percent of "normal" size to shrink serialized free space size */
+#define H5HF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
+#define H5HF_FSPACE_THRHD_DEF 1 /* Default: no alignment threshold */
+#define H5HF_FSPACE_ALIGN_DEF 1 /* Default: no alignment */
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_start
*
@@ -88,25 +80,17 @@
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
- * Modifications:
- * Vailin Choi, July 29th, 2008
- * Pass values of alignment and threshold to FS_create() and FS_open()
- * for handling alignment.
- *
*-------------------------------------------------------------------------
*/
herr_t
H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create)
{
- const H5FS_section_class_t *classes[] = { /* Free space section classes implemented for fractal heap */
- H5HF_FSPACE_SECT_CLS_SINGLE,
- H5HF_FSPACE_SECT_CLS_FIRST_ROW,
- H5HF_FSPACE_SECT_CLS_NORMAL_ROW,
- H5HF_FSPACE_SECT_CLS_INDIRECT};
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5FS_section_class_t *classes[] = {/* Free space section classes implemented for fractal heap */
+ H5HF_FSPACE_SECT_CLS_SINGLE, H5HF_FSPACE_SECT_CLS_FIRST_ROW,
+ H5HF_FSPACE_SECT_CLS_NORMAL_ROW, H5HF_FSPACE_SECT_CLS_INDIRECT};
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -116,37 +100,37 @@ H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create)
HDassert(hdr);
/* Check for creating free space info for the heap */
- if(H5F_addr_defined(hdr->fs_addr)) {
+ if (H5F_addr_defined(hdr->fs_addr)) {
/* Open an existing free space structure for the heap */
- if(NULL == (hdr->fspace = H5FS_open(hdr->f, dxpl_id, hdr->fs_addr,
- NELMTS(classes), classes, hdr, H5HF_FSPACE_THRHD_DEF, H5HF_FSPACE_ALIGN_DEF)))
+ if (NULL == (hdr->fspace = H5FS_open(hdr->f, dxpl_id, hdr->fs_addr, NELMTS(classes), classes, hdr,
+ H5HF_FSPACE_THRHD_DEF, H5HF_FSPACE_ALIGN_DEF)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info")
} /* end if */
else {
/* Check if we are allowed to create the free space manager */
- if(may_create) {
- H5FS_create_t fs_create; /* Free space creation parameters */
+ if (may_create) {
+ H5FS_create_t fs_create; /* Free space creation parameters */
/* Set the free space creation parameters */
- fs_create.client = H5FS_CLIENT_FHEAP_ID;
+ fs_create.client = H5FS_CLIENT_FHEAP_ID;
fs_create.shrink_percent = H5HF_FSPACE_SHRINK;
fs_create.expand_percent = H5HF_FSPACE_EXPAND;
- fs_create.max_sect_size = hdr->man_dtable.cparam.max_direct_size;
- fs_create.max_sect_addr = hdr->man_dtable.cparam.max_index;
+ fs_create.max_sect_size = hdr->man_dtable.cparam.max_direct_size;
+ fs_create.max_sect_addr = hdr->man_dtable.cparam.max_index;
/* Create the free space structure for the heap */
- if(NULL == (hdr->fspace = H5FS_create(hdr->f, dxpl_id, &hdr->fs_addr,
- &fs_create, NELMTS(classes), classes, hdr, H5HF_FSPACE_THRHD_DEF, H5HF_FSPACE_ALIGN_DEF)))
+ if (NULL ==
+ (hdr->fspace = H5FS_create(hdr->f, dxpl_id, &hdr->fs_addr, &fs_create, NELMTS(classes),
+ classes, hdr, H5HF_FSPACE_THRHD_DEF, H5HF_FSPACE_ALIGN_DEF)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info")
HDassert(H5F_addr_defined(hdr->fs_addr));
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_start() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_add
*
@@ -157,17 +141,15 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node,
- unsigned flags)
+H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node, unsigned flags)
{
- H5HF_sect_add_ud_t udata; /* User data for free space manager 'add' */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_sect_add_ud_t udata; /* User data for free space manager 'add' */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -178,34 +160,31 @@ H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node,
HDassert(node);
/* Check if the free space for the heap has been initialized */
- if(!hdr->fspace)
- if(H5HF_space_start(hdr, dxpl_id, TRUE) < 0)
+ if (!hdr->fspace)
+ if (H5HF_space_start(hdr, dxpl_id, TRUE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space")
/* Construct user data */
- udata.hdr = hdr;
+ udata.hdr = hdr;
udata.dxpl_id = dxpl_id;
/* Add to the free space for the heap */
- if(H5FS_sect_add(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)node, flags, &udata) < 0)
+ if (H5FS_sect_add(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)node, flags, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't add section to heap free space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_add() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_find
*
* Purpose: Attempt to find space in a fractal heap
*
* Return: Success: non-negative
- *
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -213,8 +192,8 @@ done:
htri_t
H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request, H5HF_free_section_t **node)
{
- htri_t node_found = FALSE; /* Whether an existing free list node was found */
- htri_t ret_value; /* Return value */
+ htri_t node_found = FALSE; /* Whether an existing free list node was found */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -226,13 +205,14 @@ H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request, H5HF_free_secti
HDassert(node);
/* Check if the free space for the heap has been initialized */
- if(!hdr->fspace)
- if(H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
+ if (!hdr->fspace)
+ if (H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space")
/* Search for free space in the heap */
- if(hdr->fspace)
- if((node_found = H5FS_sect_find(hdr->f, dxpl_id, hdr->fspace, request, (H5FS_section_info_t **)node)) < 0)
+ if (hdr->fspace)
+ if ((node_found =
+ H5FS_sect_find(hdr->f, dxpl_id, hdr->fspace, request, (H5FS_section_info_t **)node)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap")
/* Set return value */
@@ -242,7 +222,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_find() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_revert_root_cb
*
@@ -254,7 +233,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
@@ -262,8 +240,8 @@ done:
static herr_t
H5HF_space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udata)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -273,14 +251,15 @@ H5HF_space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udat
HDassert(sect);
/* Only modify "live" single blocks... */
- if(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE && sect->sect_info.state == H5FS_SECT_LIVE) {
+ if (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE && sect->sect_info.state == H5FS_SECT_LIVE) {
/* Release hold on previous indirect block (we must have one) */
HDassert(sect->u.single.parent);
- if(H5HF_iblock_decr(sect->u.single.parent) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on section's indirect block")
+ if (H5HF_iblock_decr(sect->u.single.parent) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
+ "can't decrement reference count on section's indirect block")
/* Reset parent information */
- sect->u.single.parent = NULL;
+ sect->u.single.parent = NULL;
sect->u.single.par_entry = 0;
} /* end if */
@@ -288,7 +267,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_revert_root_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_revert_root
*
@@ -299,7 +277,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
@@ -307,7 +284,7 @@ done:
herr_t
H5HF_space_revert_root(const H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -317,17 +294,15 @@ H5HF_space_revert_root(const H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr);
/* Only need to scan the sections if the free space has been initialized */
- if(hdr->fspace) {
- /* Iterate over all sections, reseting the parent pointers in 'single' sections */
- if(H5FS_sect_iterate(hdr->f, dxpl_id, hdr->fspace, H5HF_space_revert_root_cb, NULL) < 0)
+ if (hdr->fspace)
+ /* Iterate over all sections, resetting the parent pointers in 'single' sections */
+ if (H5FS_sect_iterate(hdr->f, dxpl_id, hdr->fspace, H5HF_space_revert_root_cb, NULL) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to reset parent pointers")
- } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_revert_root() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_create_root_cb
*
@@ -339,7 +314,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
@@ -347,9 +321,9 @@ done:
static herr_t
H5HF_space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
{
- H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
- H5HF_indirect_t *root_iblock = (H5HF_indirect_t *)_udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
+ H5HF_indirect_t * root_iblock = (H5HF_indirect_t *)_udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -365,22 +339,22 @@ H5HF_space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Increment ref. count on new root indirect block */
- if(H5HF_iblock_incr(root_iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on section's indirect block")
+ if (H5HF_iblock_incr(root_iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL,
+ "can't increment reference count on section's indirect block")
/* Set parent info ("live" section must _NOT_ have a parent right now) */
- if(sect->sect_info.state == H5FS_SECT_SERIALIZED)
- sect->sect_info.state = H5FS_SECT_LIVE; /* Mark "live" now */
+ if (sect->sect_info.state == H5FS_SECT_SERIALIZED)
+ sect->sect_info.state = H5FS_SECT_LIVE; /* Mark "live" now */
else
- HDassert(!sect->u.single.parent);
- sect->u.single.parent = root_iblock;
+ HDassert(!sect->u.single.parent);
+ sect->u.single.parent = root_iblock;
sect->u.single.par_entry = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_create_root_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_create_root
*
@@ -392,7 +366,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
@@ -400,7 +373,7 @@ done:
herr_t
H5HF_space_create_root(const H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *root_iblock)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -411,17 +384,16 @@ H5HF_space_create_root(const H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *ro
HDassert(root_iblock);
/* Only need to scan the sections if the free space has been initialized */
- if(hdr->fspace) {
- /* Iterate over all sections, seting the parent pointers in 'single' sections to the new indirect block */
- if(H5FS_sect_iterate(hdr->f, dxpl_id, hdr->fspace, H5HF_space_create_root_cb, root_iblock) < 0)
+ if (hdr->fspace)
+ /* Iterate over all sections, seting the parent pointers in 'single' sections to the new indirect
+ * block */
+ if (H5FS_sect_iterate(hdr->f, dxpl_id, hdr->fspace, H5HF_space_create_root_cb, root_iblock) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to set parent pointers")
- } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_create_root() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_size
*
@@ -431,7 +403,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14 2007
*
*-------------------------------------------------------------------------
@@ -439,7 +410,7 @@ done:
herr_t
H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -450,13 +421,13 @@ H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size)
HDassert(fs_size);
/* Check if the free space for the heap has been initialized */
- if(!hdr->fspace)
- if(H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
+ if (!hdr->fspace)
+ if (H5HF_space_start(hdr, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space")
/* Get free space metadata size */
- if(hdr->fspace) {
- if(H5FS_size(hdr->f, hdr->fspace, fs_size) < 0)
+ if (hdr->fspace) {
+ if (H5FS_size(hdr->f, hdr->fspace, fs_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info")
} /* end if */
else
@@ -466,7 +437,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_remove
*
@@ -476,7 +446,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 24 2006
*
*-------------------------------------------------------------------------
@@ -484,7 +453,7 @@ done:
herr_t
H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -496,14 +465,13 @@ H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node)
HDassert(node);
/* Remove from the free space for the heap */
- if(H5FS_sect_remove(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)node) < 0)
+ if (H5FS_sect_remove(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_close
*
@@ -514,7 +482,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -522,7 +489,7 @@ done:
herr_t
H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -532,34 +499,30 @@ H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr);
/* Check if the free space was ever opened */
- if(hdr->fspace) {
- hsize_t nsects; /* Number of sections for this heap */
+ if (hdr->fspace) {
+ hsize_t nsects; /* Number of sections for this heap */
/* Retrieve the number of sections for this heap */
- if(H5FS_sect_stats(hdr->fspace, NULL, &nsects) < 0)
+ if (H5FS_sect_stats(hdr->fspace, NULL, &nsects) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOUNT, FAIL, "can't query free space section count")
-#ifdef QAK
-HDfprintf(stderr, "%s: nsects = %Hu\n", FUNC, nsects);
-#endif /* QAK */
/* Close the free space for the heap */
- if(H5FS_close(hdr->f, dxpl_id, hdr->fspace) < 0)
+ if (H5FS_close(hdr->f, dxpl_id, hdr->fspace) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
hdr->fspace = NULL;
/* Check if we can delete the free space manager for this heap */
- if(!nsects) {
- if(H5FS_delete(hdr->f, dxpl_id, hdr->fs_addr) < 0)
+ if (!nsects) {
+ if (H5FS_delete(hdr->f, dxpl_id, hdr->fs_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete free space info")
hdr->fs_addr = HADDR_UNDEF;
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_close() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_delete
*
@@ -569,7 +532,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -577,7 +539,7 @@ done:
herr_t
H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -587,14 +549,13 @@ H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
HDassert(hdr);
/* Delete the free space manager */
- if(H5FS_delete(hdr->f, dxpl_id, hdr->fs_addr) < 0)
+ if (H5FS_delete(hdr->f, dxpl_id, hdr->fs_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "can't delete to free space manager")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_space_change_sect_class
*
@@ -605,7 +566,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -613,12 +573,9 @@ done:
herr_t
H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, unsigned new_class)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
/*
* Check arguments.
@@ -628,10 +585,9 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
HDassert(sect);
/* Notify the free space manager that a section has changed class */
- if(H5FS_sect_change_class(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)sect, new_class) < 0)
+ if (H5FS_sect_change_class(hdr->f, dxpl_id, hdr->fspace, (H5FS_section_info_t *)sect, new_class) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't modify class of free space section")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_space_sect_change_class() */
-
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 401c064..9f427ce 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: Fractal heap metadata statistics functions.
@@ -22,51 +22,43 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
/****************/
/* Local Macros */
/****************/
-
/********************/
/* Package Typedefs */
/********************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_stat_info
*
@@ -91,21 +83,20 @@ H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats)
HDassert(stats);
/* Report statistics for fractal heap */
- stats->man_size = fh->hdr->man_size;
+ stats->man_size = fh->hdr->man_size;
stats->man_alloc_size = fh->hdr->man_alloc_size;
- stats->man_iter_off = fh->hdr->man_iter_off;
- stats->man_nobjs = fh->hdr->man_nobjs;
+ stats->man_iter_off = fh->hdr->man_iter_off;
+ stats->man_nobjs = fh->hdr->man_nobjs;
stats->man_free_space = fh->hdr->total_man_free;
- stats->huge_size = fh->hdr->huge_size;
- stats->huge_nobjs = fh->hdr->huge_nobjs;
- stats->tiny_size = fh->hdr->tiny_size;
- stats->tiny_nobjs = fh->hdr->tiny_nobjs;
-/* XXX: Add more metadata statistics for the heap */
+ stats->huge_size = fh->hdr->huge_size;
+ stats->huge_nobjs = fh->hdr->huge_nobjs;
+ stats->tiny_size = fh->hdr->tiny_size;
+ stats->tiny_nobjs = fh->hdr->tiny_nobjs;
+ /* XXX: Add more metadata statistics for the heap */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_stat_info() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_size
*
@@ -124,10 +115,10 @@ H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats)
herr_t
H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
{
- H5HF_hdr_t *hdr; /* Fractal heap header */
- H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- hsize_t meta_size = 0; /* free space storage size */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_hdr_t *hdr; /* Fractal heap header */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ hsize_t meta_size = 0; /* free space storage size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -141,38 +132,40 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
hdr = fh->hdr;
/* Add in values already known */
- *heap_size += hdr->heap_size; /* Heap header */
- *heap_size += hdr->man_alloc_size; /* Direct block storage for "managed" objects */
- *heap_size += hdr->huge_size; /* "huge" object storage */
+ *heap_size += hdr->heap_size; /* Heap header */
+ *heap_size += hdr->man_alloc_size; /* Direct block storage for "managed" objects */
+ *heap_size += hdr->huge_size; /* "huge" object storage */
/* Check for indirect blocks for managed objects */
- if(H5F_addr_defined(hdr->man_dtable.table_addr) && hdr->man_dtable.curr_root_rows != 0)
- if(H5HF_man_iblock_size(hdr->f, dxpl_id, hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL, 0, heap_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get fractal heap storage info for indirect block")
+ if (H5F_addr_defined(hdr->man_dtable.table_addr) && hdr->man_dtable.curr_root_rows != 0)
+ if (H5HF_man_iblock_size(hdr->f, dxpl_id, hdr, hdr->man_dtable.table_addr,
+ hdr->man_dtable.curr_root_rows, NULL, 0, heap_size) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to get fractal heap storage info for indirect block")
/* Check for B-tree storage of huge objects in fractal heap */
- if(H5F_addr_defined(hdr->huge_bt2_addr)) {
+ if (H5F_addr_defined(hdr->huge_bt2_addr)) {
/* Open the huge object index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' objects")
+ if (NULL == (bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for tracking 'huge' objects")
/* Get the B-tree storage */
- if(H5B2_size(bt2, dxpl_id, heap_size) < 0)
+ if (H5B2_size(bt2, dxpl_id, heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info")
} /* end if */
/* Get storage for free-space tracking info */
- if(H5F_addr_defined(hdr->fs_addr)) {
- if(H5HF_space_size(hdr, dxpl_id, &meta_size) < 0)
+ if (H5F_addr_defined(hdr->fs_addr)) {
+ if (H5HF_space_size(hdr, dxpl_id, &meta_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info")
- *heap_size += meta_size;
+ *heap_size += meta_size;
} /* end if */
done:
/* Release resources */
- if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
+ if (bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for tracking 'huge' objects")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_size() */
-
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 27f4d10..9f7cf30 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, February 3, 2006
*
* Purpose: Fractal heap testing functions.
@@ -22,52 +22,44 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-#define H5HF_TESTING /*suppress warning about H5HF testing funcs*/
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+#define H5HF_TESTING /*suppress warning about H5HF testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_cparam_test
*
@@ -92,9 +84,9 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
HDassert(cparam);
/* Get fractal heap creation parameters */
- if(fh->hdr->id_len == (unsigned)(1 + fh->hdr->heap_off_size + fh->hdr->heap_len_size))
+ if (fh->hdr->id_len == (unsigned)(1 + fh->hdr->heap_off_size + fh->hdr->heap_len_size))
cparam->id_len = 0;
- else if(fh->hdr->id_len == (1 + fh->hdr->sizeof_size + fh->hdr->sizeof_addr))
+ else if (fh->hdr->id_len == (1 + fh->hdr->sizeof_size + fh->hdr->sizeof_addr))
cparam->id_len = 1;
else
cparam->id_len = fh->hdr->id_len;
@@ -105,7 +97,6 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_cparam_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_cmp_cparam_test
*
@@ -122,7 +113,7 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
int
H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
{
- int ret_value = 0; /* Return value */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -131,68 +122,65 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
HDassert(cparam2);
/* Compare doubling table parameters */
- if(cparam1->managed.width < cparam2->managed.width)
+ if (cparam1->managed.width < cparam2->managed.width)
HGOTO_DONE(-1)
- else if(cparam1->managed.width > cparam2->managed.width)
+ else if (cparam1->managed.width > cparam2->managed.width)
HGOTO_DONE(1)
- if(cparam1->managed.start_block_size < cparam2->managed.start_block_size)
+ if (cparam1->managed.start_block_size < cparam2->managed.start_block_size)
HGOTO_DONE(-1)
- else if(cparam1->managed.start_block_size > cparam2->managed.start_block_size)
+ else if (cparam1->managed.start_block_size > cparam2->managed.start_block_size)
HGOTO_DONE(1)
- if(cparam1->managed.max_direct_size < cparam2->managed.max_direct_size)
+ if (cparam1->managed.max_direct_size < cparam2->managed.max_direct_size)
HGOTO_DONE(-1)
- else if(cparam1->managed.max_direct_size > cparam2->managed.max_direct_size)
+ else if (cparam1->managed.max_direct_size > cparam2->managed.max_direct_size)
HGOTO_DONE(1)
- if(cparam1->managed.max_index < cparam2->managed.max_index)
+ if (cparam1->managed.max_index < cparam2->managed.max_index)
HGOTO_DONE(-1)
- else if(cparam1->managed.max_index > cparam2->managed.max_index)
+ else if (cparam1->managed.max_index > cparam2->managed.max_index)
HGOTO_DONE(1)
- if(cparam1->managed.start_root_rows < cparam2->managed.start_root_rows)
+ if (cparam1->managed.start_root_rows < cparam2->managed.start_root_rows)
HGOTO_DONE(-1)
- else if(cparam1->managed.start_root_rows > cparam2->managed.start_root_rows)
+ else if (cparam1->managed.start_root_rows > cparam2->managed.start_root_rows)
HGOTO_DONE(1)
/* Compare other general parameters for heap */
- if(cparam1->max_man_size < cparam2->max_man_size)
+ if (cparam1->max_man_size < cparam2->max_man_size)
HGOTO_DONE(-1)
- else if(cparam1->max_man_size > cparam2->max_man_size)
+ else if (cparam1->max_man_size > cparam2->max_man_size)
HGOTO_DONE(1)
- if(cparam1->id_len < cparam2->id_len)
+ if (cparam1->id_len < cparam2->id_len)
HGOTO_DONE(-1)
- else if(cparam1->id_len > cparam2->id_len)
+ else if (cparam1->id_len > cparam2->id_len)
HGOTO_DONE(1)
/* Compare "important" parameters for any I/O pipeline filters */
- if(cparam1->pline.nused < cparam2->pline.nused)
+ if (cparam1->pline.nused < cparam2->pline.nused)
HGOTO_DONE(-1)
- else if(cparam1->pline.nused > cparam2->pline.nused)
+ else if (cparam1->pline.nused > cparam2->pline.nused)
HGOTO_DONE(1)
else {
- size_t u, v; /* Local index variables */
+ size_t u, v; /* Local index variables */
/* Compare each filter */
- for(u = 0; u < cparam1->pline.nused; u++) {
+ for (u = 0; u < cparam1->pline.nused; u++) {
/* Check filter ID */
- if(cparam1->pline.filter[u].id < cparam2->pline.filter[u].id)
+ if (cparam1->pline.filter[u].id < cparam2->pline.filter[u].id)
HGOTO_DONE(-1)
- else if(cparam1->pline.filter[u].id > cparam2->pline.filter[u].id)
+ else if (cparam1->pline.filter[u].id > cparam2->pline.filter[u].id)
HGOTO_DONE(1)
/* Check filter flags */
- if(cparam1->pline.filter[u].flags < cparam2->pline.filter[u].flags)
+ if (cparam1->pline.filter[u].flags < cparam2->pline.filter[u].flags)
HGOTO_DONE(-1)
- else if(cparam1->pline.filter[u].flags > cparam2->pline.filter[u].flags)
+ else if (cparam1->pline.filter[u].flags > cparam2->pline.filter[u].flags)
HGOTO_DONE(1)
/* Don't worry about comparing the filter names right now... */
/* (they are expanded during the encode/decode process, but aren't copied
- * during the H5Z_append operation, generating false positive failures)
+ * during the H5Z_append operation, generating false positive failures -QAK)
*/
-#ifdef QAK
+#if 0
/* Check filter name */
-HDfprintf(stderr, "%s: Check 1.0\n", "H5HF_cmp_cparam_test");
-HDfprintf(stderr, "%s: cparam1->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam_test", u, (cparam1->pline.filter[u].name ? cparam1->pline.filter[u].name : "<nil>"));
-HDfprintf(stderr, "%s: cparam2->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam_test", u, (cparam2->pline.filter[u].name ? cparam2->pline.filter[u].name : "<nil>"));
if(!cparam1->pline.filter[u].name && cparam2->pline.filter[u].name)
HGOTO_DONE(-1)
else if(cparam1->pline.filter[u].name && !cparam2->pline.filter[u].name)
@@ -201,30 +189,29 @@ HDfprintf(stderr, "%s: cparam2->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam
if((ret_value = HDstrcmp(cparam1->pline.filter[u].name, cparam2->pline.filter[u].name)))
HGOTO_DONE(ret_value)
} /* end if */
-#endif /* QAK */
+#endif
/* Check # of filter parameters */
- if(cparam1->pline.filter[u].cd_nelmts < cparam2->pline.filter[u].cd_nelmts)
+ if (cparam1->pline.filter[u].cd_nelmts < cparam2->pline.filter[u].cd_nelmts)
HGOTO_DONE(-1)
- else if(cparam1->pline.filter[u].cd_nelmts > cparam2->pline.filter[u].cd_nelmts)
+ else if (cparam1->pline.filter[u].cd_nelmts > cparam2->pline.filter[u].cd_nelmts)
HGOTO_DONE(1)
/* Check filter parameters */
- for(v = 0; v < cparam1->pline.filter[u].cd_nelmts; v++) {
- if(cparam1->pline.filter[u].cd_values[v] < cparam2->pline.filter[u].cd_values[v])
+ for (v = 0; v < cparam1->pline.filter[u].cd_nelmts; v++) {
+ if (cparam1->pline.filter[u].cd_values[v] < cparam2->pline.filter[u].cd_values[v])
HGOTO_DONE(-1)
- else if(cparam1->pline.filter[u].cd_values[v] > cparam2->pline.filter[u].cd_values[v])
+ else if (cparam1->pline.filter[u].cd_values[v] > cparam2->pline.filter[u].cd_values[v])
HGOTO_DONE(1)
} /* end for */
} /* end for */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_cmp_cparam_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_max_root_rows
*
@@ -242,7 +229,7 @@ done:
unsigned
H5HF_get_max_root_rows(const H5HF_t *fh)
{
- unsigned ret_value; /* Return value */
+ unsigned ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -255,7 +242,6 @@ H5HF_get_max_root_rows(const H5HF_t *fh)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_max_root_rows() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_dtable_width_test
*
@@ -273,7 +259,7 @@ H5HF_get_max_root_rows(const H5HF_t *fh)
unsigned
H5HF_get_dtable_width_test(const H5HF_t *fh)
{
- unsigned ret_value; /* Return value */
+ unsigned ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -286,7 +272,6 @@ H5HF_get_dtable_width_test(const H5HF_t *fh)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_dtable_width_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_dtable_max_drows_test
*
@@ -304,7 +289,7 @@ H5HF_get_dtable_width_test(const H5HF_t *fh)
unsigned
H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
{
- unsigned ret_value; /* Return value */
+ unsigned ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -317,7 +302,6 @@ H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_dtable_max_drows_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_iblock_max_drows_test
*
@@ -339,7 +323,7 @@ H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
unsigned
H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
{
- unsigned ret_value; /* Return value */
+ unsigned ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -348,13 +332,11 @@ H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
HDassert(pos);
/* Return max. # of direct blocks in this indirect block row */
- ret_value = pos + (fh->hdr->man_dtable.max_direct_bits -
- fh->hdr->man_dtable.first_row_bits) + 1;
+ ret_value = pos + (fh->hdr->man_dtable.max_direct_bits - fh->hdr->man_dtable.first_row_bits) + 1;
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_iblock_max_drows_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_dblock_size_test
*
@@ -372,7 +354,7 @@ H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
hsize_t
H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
{
- hsize_t ret_value; /* Return value */
+ hsize_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -385,7 +367,6 @@ H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_dblock_size_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_dblock_free_test
*
@@ -404,7 +385,7 @@ H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
hsize_t
H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
{
- hsize_t ret_value; /* Return value */
+ hsize_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -417,7 +398,6 @@ H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HF_get_dblock_free_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_id_off_test
*
@@ -435,7 +415,7 @@ H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
herr_t
H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -452,7 +432,6 @@ H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_id_off_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_id_type_test
*
@@ -469,7 +448,7 @@ H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
herr_t
H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
{
- const uint8_t *id = (const uint8_t *)_id; /* Object ID */
+ const uint8_t *id = (const uint8_t *)_id; /* Object ID */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -478,12 +457,11 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
HDassert(obj_type);
/* Get the type for a heap ID */
- *obj_type = *id & H5HF_ID_TYPE_MASK;
+ *obj_type = (uint8_t)(*id & H5HF_ID_TYPE_MASK);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_id_type_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_tiny_info_test
*
@@ -498,8 +476,7 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
- hbool_t *len_extended)
+H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -510,13 +487,12 @@ H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
HDassert(len_extended);
/* Retrieve information about tiny object's ID encoding in a heap */
- *max_len = fh->hdr->tiny_max_len;
+ *max_len = fh->hdr->tiny_max_len;
*len_extended = fh->hdr->tiny_len_extended;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_tiny_info_test() */
-
/*-------------------------------------------------------------------------
* Function: H5HF_get_huge_info_test
*
@@ -541,10 +517,9 @@ H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct)
HDassert(ids_direct);
/* Retrieve information about tiny object's ID encoding in a heap */
- if(next_id)
+ if (next_id)
*next_id = fh->hdr->huge_next_id;
*ids_direct = fh->hdr->huge_ids_direct;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_huge_info_test() */
-
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index ea913a2..3aa1d1f 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5HFtiny.c
- * Aug 14 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5HFtiny.c
+ * Aug 14 2006
+ * Quincey Koziol
*
- * Purpose: Routines for "tiny" objects in fractal heap
+ * Purpose: Routines for "tiny" objects in fractal heap
*
*-------------------------------------------------------------------------
*/
@@ -26,71 +26,60 @@
/* Module Setup */
/****************/
-#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
-
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HFpkg.h" /* Fractal heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
/****************/
/* Local Macros */
/****************/
/* Tiny object length information */
-#define H5HF_TINY_LEN_SHORT 16 /* Max. length able to be encoded in first heap ID byte */
-#define H5HF_TINY_MASK_SHORT 0x0F /* Mask for length in first heap ID byte */
-#define H5HF_TINY_MASK_EXT 0x0FFF /* Mask for length in two heap ID bytes */
-#define H5HF_TINY_MASK_EXT_1 0x0F00 /* Mask for length in first byte of two heap ID bytes */
-#define H5HF_TINY_MASK_EXT_2 0x00FF /* Mask for length in second byte of two heap ID bytes */
-
+#define H5HF_TINY_LEN_SHORT 16 /* Max. length able to be encoded in first heap ID byte */
+#define H5HF_TINY_MASK_SHORT 0x0F /* Mask for length in first heap ID byte */
+#define H5HF_TINY_MASK_EXT 0x0FFF /* Mask for length in two heap ID bytes */
+#define H5HF_TINY_MASK_EXT_1 0x0F00 /* Mask for length in first byte of two heap ID bytes */
+#define H5HF_TINY_MASK_EXT_2 0x00FF /* Mask for length in second byte of two heap ID bytes */
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
- H5HF_operator_t op, void *op_data);
-
+static herr_t H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_data);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_init
+ * Function: H5HF_tiny_init
*
- * Purpose: Initialize information for tracking 'tiny' objects
+ * Purpose: Initialize information for tracking 'tiny' objects
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 14 2006
+ * Programmer: Quincey Koziol
+ * Aug 14 2006
*
*-------------------------------------------------------------------------
*/
@@ -111,47 +100,42 @@ H5HF_tiny_init(H5HF_hdr_t *hdr)
* extra byte, but using that byte means that the extra length byte is
* unnecessary)
*/
- if((hdr->id_len - 1) <= H5HF_TINY_LEN_SHORT) {
- hdr->tiny_max_len = hdr->id_len - 1;
+ if ((hdr->id_len - 1) <= H5HF_TINY_LEN_SHORT) {
+ hdr->tiny_max_len = hdr->id_len - 1;
hdr->tiny_len_extended = FALSE;
} /* end if */
- else if((hdr->id_len - 1) == (H5HF_TINY_LEN_SHORT + 1)) {
- hdr->tiny_max_len = H5HF_TINY_LEN_SHORT;
+ else if ((hdr->id_len - 1) == (H5HF_TINY_LEN_SHORT + 1)) {
+ hdr->tiny_max_len = H5HF_TINY_LEN_SHORT;
hdr->tiny_len_extended = FALSE;
} /* end if */
else {
- hdr->tiny_max_len = hdr->id_len - 2;
+ hdr->tiny_max_len = hdr->id_len - 2;
hdr->tiny_len_extended = TRUE;
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_tiny_init() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_insert
+ * Function: H5HF_tiny_insert
*
- * Purpose: Pack a 'tiny' object in a heap ID
+ * Purpose: Pack a 'tiny' object in a heap ID
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 14 2006
+ * Programmer: Quincey Koziol
+ * Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
{
- uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
- size_t enc_obj_size; /* Encoded object size */
- herr_t ret_value = SUCCEED; /* Return value */
+ uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
+ size_t enc_obj_size; /* Encoded object size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
-#endif /* QAK */
/*
* Check arguments.
@@ -166,18 +150,16 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
enc_obj_size = obj_size - 1;
/* Encode object into ID */
- if(!hdr->tiny_len_extended) {
- *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_TINY |
- (enc_obj_size & H5HF_TINY_MASK_SHORT);
+ if (!hdr->tiny_len_extended) {
+ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_TINY | (enc_obj_size & H5HF_TINY_MASK_SHORT);
} /* end if */
else {
- *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_TINY |
- ((enc_obj_size & H5HF_TINY_MASK_EXT_1) >> 8);
+ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_TINY | ((enc_obj_size & H5HF_TINY_MASK_EXT_1) >> 8);
*id++ = enc_obj_size & H5HF_TINY_MASK_EXT_2;
} /* end else */
HDmemcpy(id, obj, obj_size);
#ifdef H5_CLEAR_MEMORY
-HDmemset(id + obj_size, 0, (hdr->id_len - (1 + hdr->tiny_len_extended + obj_size)));
+ HDmemset(id + obj_size, 0, (hdr->id_len - (1 + hdr->tiny_len_extended + obj_size)));
#endif /* H5_CLEAR_MEMORY */
/* Update statistics about heap */
@@ -185,31 +167,29 @@ HDmemset(id + obj_size, 0, (hdr->id_len - (1 + hdr->tiny_len_extended + obj_size
hdr->tiny_nobjs++;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_tiny_insert() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_get_obj_len
+ * Function: H5HF_tiny_get_obj_len
*
- * Purpose: Get the size of a 'tiny' object in a fractal heap
+ * Purpose: Get the size of a 'tiny' object in a fractal heap
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 14 2006
+ * Programmer: Quincey Koziol
+ * Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
{
- size_t enc_obj_size; /* Encoded object size */
+ size_t enc_obj_size; /* Encoded object size */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -221,12 +201,12 @@ H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
HDassert(obj_len_p);
/* Check if 'tiny' object ID is in extended form, and retrieve encoded size */
- if(!hdr->tiny_len_extended)
+ if (!hdr->tiny_len_extended)
enc_obj_size = *id & H5HF_TINY_MASK_SHORT;
else
- /* (performed in this odd way to avoid compiler bug on tg-login3 with
- * gcc 3.2.2 - QAK)
- */
+ /* (performed in this odd way to avoid compiler bug on tg-login3 with
+ * gcc 3.2.2 - QAK)
+ */
enc_obj_size = *(id + 1) | ((*id & H5HF_TINY_MASK_EXT_1) << 8);
/* Set the object's length */
@@ -235,26 +215,23 @@ H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_tiny_get_obj_len() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_op_real
+ * Function: H5HF_tiny_op_real
*
- * Purpose: Internal routine to perform operation on 'tiny' object
+ * Purpose: Internal routine to perform operation on 'tiny' object
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2006
+ * Programmer: Quincey Koziol
+ * Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
- void *op_data)
+H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_data)
{
- size_t enc_obj_size; /* Encoded object size */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t enc_obj_size; /* Encoded object size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -266,7 +243,7 @@ H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
HDassert(op);
/* Check if 'tiny' object ID is in extended form */
- if(!hdr->tiny_len_extended) {
+ if (!hdr->tiny_len_extended) {
/* Retrieve the object's encoded length */
enc_obj_size = *id & H5HF_TINY_MASK_SHORT;
@@ -275,44 +252,43 @@ H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
} /* end if */
else {
/* Retrieve the object's encoded length */
- /* (performed in this odd way to avoid compiler bug on tg-login3 with
- * gcc 3.2.2 - QAK)
- */
+ /* (performed in this odd way to avoid compiler bug on tg-login3 with
+ * gcc 3.2.2 - QAK)
+ */
enc_obj_size = *(id + 1) | ((*id & H5HF_TINY_MASK_EXT_1) << 8);
/* Advance past flag byte(s) */
- /* (performed in two steps to avoid compiler bug on tg-login3 with
- * gcc 3.2.2 - QAK)
- */
- id++; id++;
- } /* end else */
+ /* (performed in two steps to avoid compiler bug on tg-login3 with
+ * gcc 3.2.2 - QAK)
+ */
+ id++;
+ id++;
+ }
/* Call the user's 'op' callback */
- if(op(id, (enc_obj_size + 1), op_data) < 0)
+ if (op(id, (enc_obj_size + 1), op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_tiny_op_real() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_read
+ * Function: H5HF_tiny_read
*
- * Purpose: Read a 'tiny' object from the heap
+ * Purpose: Read a 'tiny' object from the heap
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 8 2006
+ * Programmer: Quincey Koziol
+ * Aug 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -324,32 +300,29 @@ H5HF_tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
HDassert(obj);
/* Call the internal 'op' routine */
- if(H5HF_tiny_op_real(hdr, id, H5HF_op_read, obj) < 0)
+ if (H5HF_tiny_op_real(hdr, id, H5HF_op_read, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_tiny_read() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_op
+ * Function: H5HF_tiny_op
*
- * Purpose: Operate directly on a 'tiny' object
+ * Purpose: Operate directly on a 'tiny' object
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Sept 11 2006
+ * Programmer: Quincey Koziol
+ * Sept 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
- void *op_data)
+H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_data)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -361,32 +334,30 @@ H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
HDassert(op);
/* Call the internal 'op' routine routine */
- if(H5HF_tiny_op_real(hdr, id, op, op_data) < 0)
+ if (H5HF_tiny_op_real(hdr, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_tiny_op() */
-
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_remove
+ * Function: H5HF_tiny_remove
*
- * Purpose: Remove a 'tiny' object from the heap statistics
+ * Purpose: Remove a 'tiny' object from the heap statistics
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 14 2006
+ * Programmer: Quincey Koziol
+ * Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
{
- size_t enc_obj_size; /* Encoded object size */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t enc_obj_size; /* Encoded object size */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -397,12 +368,12 @@ H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
HDassert(id);
/* Check if 'tiny' object ID is in extended form */
- if(!hdr->tiny_len_extended)
+ if (!hdr->tiny_len_extended)
enc_obj_size = *id & H5HF_TINY_MASK_SHORT;
else
- /* (performed in this odd way to avoid compiler bug on tg-login3 with
- * gcc 3.2.2 - QAK)
- */
+ /* (performed in this odd way to avoid compiler bug on tg-login3 with
+ * gcc 3.2.2 - QAK)
+ */
enc_obj_size = *(id + 1) | ((*id & H5HF_TINY_MASK_EXT_1) << 8);
/* Update statistics about heap */
@@ -410,10 +381,9 @@ H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
hdr->tiny_nobjs--;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if (H5HF_hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_tiny_remove() */
-
diff --git a/src/H5HG.c b/src/H5HG.c
index 194e4eb..694bb23 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, March 27, 1998
*
* Purpose: Operations on the global heap. The global heap is the set of
@@ -39,19 +39,17 @@
/* Module Setup */
/****************/
-#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
-
+#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HGpkg.h" /* Global heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HGpkg.h" /* Global heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
@@ -60,31 +58,27 @@
/*
* The maximum number of links allowed to a global heap object.
*/
-#define H5HG_MAXLINK 65535
+#define H5HG_MAXLINK 65535
/*
* The maximum number of indices allowed in a global heap object.
*/
-#define H5HG_MAXIDX 65535
-
+#define H5HG_MAXIDX 65535
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static haddr_t H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size);
-
/*********************/
/* Package Variables */
/*********************/
@@ -98,18 +92,14 @@ H5FL_SEQ_DEFINE(H5HG_obj_t);
/* Declare a PQ free list to manage heap chunks */
H5FL_BLK_DEFINE(gheap_chunk);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HG_create
*
@@ -132,43 +122,43 @@ H5FL_BLK_DEFINE(gheap_chunk);
static haddr_t
H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size)
{
- H5HG_heap_t *heap = NULL;
- uint8_t *p = NULL;
- haddr_t addr = HADDR_UNDEF;
- size_t n;
- haddr_t ret_value = HADDR_UNDEF; /* Return value */
+ H5HG_heap_t *heap = NULL;
+ uint8_t * p = NULL;
+ haddr_t addr = HADDR_UNDEF;
+ size_t n;
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
- if(size < H5HG_MINSIZE)
+ if (size < H5HG_MINSIZE)
size = H5HG_MINSIZE;
size = H5HG_ALIGN(size);
/* Create it */
H5_CHECK_OVERFLOW(size, size_t, hsize_t);
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_GHEAP, dxpl_id, (hsize_t)size)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap")
- if(NULL == (heap = H5FL_MALLOC(H5HG_heap_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
- heap->addr = addr;
- heap->size = size;
+ if (HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_GHEAP, dxpl_id, (hsize_t)size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap")
+ if (NULL == (heap = H5FL_MALLOC(H5HG_heap_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ heap->addr = addr;
+ heap->size = size;
heap->shared = H5F_SHARED(f);
- if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
#ifdef H5_CLEAR_MEMORY
-HDmemset(heap->chunk, 0, size);
+ HDmemset(heap->chunk, 0, size);
#endif /* H5_CLEAR_MEMORY */
heap->nalloc = H5HG_NOBJS(f, size);
- heap->nused = 1; /* account for index 0, which is used for the free object */
- if(NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ heap->nused = 1; /* account for index 0, which is used for the free object */
+ if (NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
/* Initialize the header */
HDmemcpy(heap->chunk, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC);
- p = heap->chunk + H5_SIZEOF_MAGIC;
+ p = heap->chunk + H5_SIZEOF_MAGIC;
*p++ = H5HG_VERSION;
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
@@ -182,7 +172,7 @@ HDmemset(heap->chunk, 0, size);
*/
n = H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk);
#ifdef OLD_WAY
-/* Don't bother zeroing out the rest of the info in the heap -QAK */
+ /* Don't bother zeroing out the rest of the info in the heap -QAK */
HDmemset(p, 0, n);
#endif /* OLD_WAY */
p += n;
@@ -192,45 +182,46 @@ HDmemset(heap->chunk, 0, size);
HDassert(H5HG_ISALIGNED(heap->obj[0].size));
heap->obj[0].nrefs = 0;
heap->obj[0].begin = p;
- UINT16ENCODE(p, 0); /*object ID*/
- UINT16ENCODE(p, 0); /*reference count*/
+ UINT16ENCODE(p, 0); /*object ID*/
+ UINT16ENCODE(p, 0); /*reference count*/
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
#ifdef OLD_WAY
-/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset (p, 0, (size_t)((heap->chunk+heap->size) - p));
+ /* Don't bother zeroing out the rest of the info in the heap -QAK */
+ HDmemset(p, 0, (size_t)((heap->chunk + heap->size) - p));
#endif /* OLD_WAY */
/* Add this heap to the beginning of the CWFS list */
- if(H5F_cwfs_add(f, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to add global heap collection to file's CWFS")
+ if (H5F_cwfs_add(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF,
+ "unable to add global heap collection to file's CWFS")
/* Add the heap to the cache */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection")
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection")
ret_value = addr;
done:
/* Cleanup on error */
- if(!H5F_addr_defined(ret_value)) {
- if(H5F_addr_defined(addr)) {
+ if (!H5F_addr_defined(ret_value)) {
+ if (H5F_addr_defined(addr)) {
/* Release the space on disk */
- if(H5MF_xfree(f, H5FD_MEM_GHEAP, dxpl_id, addr, (hsize_t)size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_GHEAP, dxpl_id, addr, (hsize_t)size) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, HADDR_UNDEF, "unable to free global heap")
/* Check if the heap object was allocated */
- if(heap)
+ if (heap)
/* Destroy the heap object */
- if(H5HG_free(heap) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, HADDR_UNDEF, "unable to destroy global heap collection")
+ if (H5HG_free(heap) < 0)
+ HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, HADDR_UNDEF,
+ "unable to destroy global heap collection")
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value);
} /* H5HG_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_protect
*
@@ -246,8 +237,8 @@ done:
H5HG_heap_t *
H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
{
- H5HG_heap_t *heap; /* Global heap */
- H5HG_heap_t *ret_value; /* Return value */
+ H5HG_heap_t *heap; /* Global heap */
+ H5HG_heap_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -256,7 +247,7 @@ H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
HDassert(H5F_addr_defined(addr));
/* Lock the heap into memory */
- if(NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, f, rw)))
+ if (NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, f, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap")
/* Set the heap's address */
@@ -269,7 +260,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_alloc
*
@@ -291,36 +281,36 @@ done:
static size_t
H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
{
- size_t idx;
- uint8_t *p;
- size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
- size_t ret_value; /* Return value */
+ size_t idx;
+ uint8_t *p;
+ size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(heap);
- HDassert(heap->obj[0].size>=need);
+ HDassert(heap->obj[0].size >= need);
HDassert(heap_flags_ptr);
/*
* Find an ID for the new object. ID zero is reserved for the free space
* object.
*/
- if(heap->nused <= H5HG_MAXIDX)
+ if (heap->nused <= H5HG_MAXIDX)
idx = heap->nused++;
else {
- for(idx = 1; idx < heap->nused; idx++)
- if(NULL == heap->obj[idx].begin)
+ for (idx = 1; idx < heap->nused; idx++)
+ if (NULL == heap->obj[idx].begin)
break;
} /* end else */
HDassert(idx < heap->nused);
/* Check if we need more room to store heap objects */
- if(idx >= heap->nalloc) {
- size_t new_alloc; /* New allocation number */
- H5HG_obj_t *new_obj; /* New array of object descriptions */
+ if (idx >= heap->nalloc) {
+ size_t new_alloc; /* New allocation number */
+ H5HG_obj_t *new_obj; /* New array of object descriptions */
/* Determine the new number of objects to index */
/* nalloc is *not* guaranteed to be a power of 2! - NAF 10/26/09 */
@@ -328,7 +318,7 @@ H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
HDassert(idx < new_alloc);
/* Reallocate array of objects */
- if(NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
+ if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, 0, "memory allocation failed")
/* Clear newly allocated space */
@@ -336,50 +326,50 @@ H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
/* Update heap information */
heap->nalloc = new_alloc;
- heap->obj = new_obj;
+ heap->obj = new_obj;
HDassert(heap->nalloc > heap->nused);
} /* end if */
/* Initialize the new object */
heap->obj[idx].nrefs = 0;
- heap->obj[idx].size = size;
+ heap->obj[idx].size = size;
heap->obj[idx].begin = heap->obj[0].begin;
- p = heap->obj[idx].begin;
+ p = heap->obj[idx].begin;
UINT16ENCODE(p, idx);
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
- H5F_ENCODE_LENGTH (f, p, size);
+ H5F_ENCODE_LENGTH(f, p, size);
/* Fix the free space object */
- if(need == heap->obj[0].size) {
- /*
- * All free space has been exhausted from this collection.
- */
- heap->obj[0].size = 0;
- heap->obj[0].begin = NULL;
+ if (need == heap->obj[0].size) {
+ /*
+ * All free space has been exhausted from this collection.
+ */
+ heap->obj[0].size = 0;
+ heap->obj[0].begin = NULL;
} /* end if */
- else if(heap->obj[0].size-need >= H5HG_SIZEOF_OBJHDR (f)) {
- /*
- * Some free space remains and it's larger than a heap object header,
- * so write the new free heap object header to the heap.
- */
- heap->obj[0].size -= need;
- heap->obj[0].begin += need;
- p = heap->obj[0].begin;
- UINT16ENCODE(p, 0); /*id*/
- UINT16ENCODE(p, 0); /*nrefs*/
- UINT32ENCODE(p, 0); /*reserved*/
- H5F_ENCODE_LENGTH (f, p, heap->obj[0].size);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ else if (heap->obj[0].size - need >= H5HG_SIZEOF_OBJHDR(f)) {
+ /*
+ * Some free space remains and it's larger than a heap object header,
+ * so write the new free heap object header to the heap.
+ */
+ heap->obj[0].size -= need;
+ heap->obj[0].begin += need;
+ p = heap->obj[0].begin;
+ UINT16ENCODE(p, 0); /*id*/
+ UINT16ENCODE(p, 0); /*nrefs*/
+ UINT32ENCODE(p, 0); /*reserved*/
+ H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
+ HDassert(H5HG_ISALIGNED(heap->obj[0].size));
} /* end else-if */
else {
- /*
- * Some free space remains but it's smaller than a heap object header,
- * so we don't write the header.
- */
- heap->obj[0].size -= need;
- heap->obj[0].begin += need;
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ /*
+ * Some free space remains but it's smaller than a heap object header,
+ * so we don't write the header.
+ */
+ heap->obj[0].size -= need;
+ heap->obj[0].begin += need;
+ HDassert(H5HG_ISALIGNED(heap->obj[0].size));
}
/* Mark the heap as dirty */
@@ -392,7 +382,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HG_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_extend
*
@@ -423,13 +412,13 @@ done:
herr_t
H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need)
{
- H5HG_heap_t *heap = NULL; /* Pointer to heap to extend */
- unsigned heap_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting heap */
- size_t old_size; /* Previous size of the heap's chunk */
- uint8_t *new_chunk; /* Pointer to new chunk information */
- uint8_t *p; /* Pointer to raw heap info */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HG_heap_t *heap = NULL; /* Pointer to heap to extend */
+ unsigned heap_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting heap */
+ size_t old_size; /* Previous size of the heap's chunk */
+ uint8_t * new_chunk; /* Pointer to new chunk information */
+ uint8_t * p; /* Pointer to raw heap info */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -438,14 +427,14 @@ H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need)
HDassert(H5F_addr_defined(addr));
/* Protect the heap */
- if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
/* Re-allocate the heap information in memory */
- if(NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
+ if (NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed")
#ifdef H5_CLEAR_MEMORY
-HDmemset(new_chunk + heap->size, 0, need);
+ HDmemset(new_chunk + heap->size, 0, need);
#endif /* H5_CLEAR_MEMORY */
/* Adjust the size of the heap */
@@ -457,8 +446,8 @@ HDmemset(new_chunk + heap->size, 0, need);
H5F_ENCODE_LENGTH(f, p, heap->size);
/* Move the pointers to the existing objects to their new locations */
- for(u = 0; u < heap->nused; u++)
- if(heap->obj[u].begin)
+ for (u = 0; u < heap->nused; u++)
+ if (heap->obj[u].begin)
heap->obj[u].begin = new_chunk + (heap->obj[u].begin - heap->chunk);
/* Update the heap chunk pointer now */
@@ -466,30 +455,29 @@ HDmemset(new_chunk + heap->size, 0, need);
/* Update the free space information for the heap */
heap->obj[0].size += need;
- if(heap->obj[0].begin == NULL)
- heap->obj[0].begin = heap->chunk+old_size;
+ if (heap->obj[0].begin == NULL)
+ heap->obj[0].begin = heap->chunk + old_size;
p = heap->obj[0].begin;
- UINT16ENCODE(p, 0); /*id*/
- UINT16ENCODE(p, 0); /*nrefs*/
- UINT32ENCODE(p, 0); /*reserved*/
+ UINT16ENCODE(p, 0); /*id*/
+ UINT16ENCODE(p, 0); /*nrefs*/
+ UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
HDassert(H5HG_ISALIGNED(heap->obj[0].size));
/* Resize the heap in the cache */
- if(H5AC_resize_entry(heap, heap->size) < 0)
+ if (H5AC_resize_entry(heap, heap->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize global heap in cache")
/* Mark the heap as dirty */
heap_flags |= H5AC__DIRTIED_FLAG;
done:
- if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, heap->addr, heap, heap_flags) < 0)
+ if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, heap->addr, heap, heap_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to unprotect heap")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_extend() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_insert
*
@@ -513,14 +501,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*/)
+H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj /*out*/)
{
- size_t need; /*total space needed for object */
- size_t idx;
- haddr_t addr; /* Address of heap to add object within */
- H5HG_heap_t *heap = NULL;
- unsigned heap_flags = H5AC__NO_FLAGS_SET;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t need; /*total space needed for object */
+ size_t idx;
+ haddr_t addr; /* Address of heap to add object within */
+ H5HG_heap_t *heap = NULL;
+ unsigned heap_flags = H5AC__NO_FLAGS_SET;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -529,59 +517,58 @@ H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*/
HDassert(0 == size || obj);
HDassert(hobj);
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Find a large enough collection on the CWFS list */
need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
/* Look for a heap in the file's CWFS that has enough space for the object */
addr = HADDR_UNDEF;
- if(H5F_cwfs_find_free_heap(f, dxpl_id, need, &addr) < 0)
+ if (H5F_cwfs_find_free_heap(f, dxpl_id, need, &addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "error trying to locate heap")
/*
* If we didn't find any collection with enough free space then allocate a
* new collection large enough for the message plus the collection header.
*/
- if(!H5F_addr_defined(addr)) {
+ if (!H5F_addr_defined(addr)) {
addr = H5HG_create(f, dxpl_id, need + H5HG_SIZEOF_HDR(f));
- if(!H5F_addr_defined(addr))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection")
+ if (!H5F_addr_defined(addr))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection")
} /* end if */
HDassert(H5F_addr_defined(addr));
- if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
/* Split the free space to make room for the new object */
- if(0 == (idx = H5HG_alloc(f, heap, size, &heap_flags)))
+ if (0 == (idx = H5HG_alloc(f, heap, size, &heap_flags)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate global heap object")
/* Copy data into the heap */
- if(size > 0) {
+ if (size > 0) {
HDmemcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size);
#ifdef OLD_WAY
-/* Don't bother zeroing out the rest of the info in the heap -QAK */
+ /* Don't bother zeroing out the rest of the info in the heap -QAK */
HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0,
need - (H5HG_SIZEOF_OBJHDR(f) + size));
#endif /* OLD_WAY */
- } /* end if */
+ } /* end if */
heap_flags |= H5AC__DIRTIED_FLAG;
/* Return value */
hobj->addr = heap->addr;
- hobj->idx = idx;
+ hobj->idx = idx;
done:
- if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, heap->addr, heap, heap_flags) < 0)
+ if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, heap->addr, heap, heap_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to unprotect heap.")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_insert() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_read
*
@@ -600,14 +587,13 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/,
- size_t *buf_size)
+H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object /*out*/, size_t *buf_size)
{
- H5HG_heap_t *heap = NULL; /* Pointer to global heap object */
- size_t size; /* Size of the heap object */
- uint8_t *p; /* Pointer to object in heap buffer */
- void *orig_object = object; /* Keep a copy of the original object pointer */
- void *ret_value; /* Return value */
+ H5HG_heap_t *heap = NULL; /* Pointer to global heap object */
+ size_t size; /* Size of the heap object */
+ uint8_t * p; /* Pointer to object in heap buffer */
+ void * orig_object = object; /* Keep a copy of the original object pointer */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -616,46 +602,45 @@ H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/,
HDassert(hobj);
/* Load the heap */
- if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap")
+ if (NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap")
HDassert(hobj->idx < heap->nused);
HDassert(heap->obj[hobj->idx].begin);
size = heap->obj[hobj->idx].size;
- p = heap->obj[hobj->idx].begin + H5HG_SIZEOF_OBJHDR(f);
+ p = heap->obj[hobj->idx].begin + H5HG_SIZEOF_OBJHDR(f);
/* Allocate a buffer for the object read in, if the user didn't give one */
- if(!object && NULL == (object = H5MM_malloc(size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!object && NULL == (object = H5MM_malloc(size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(object, p, size);
/*
* Advance the heap in the CWFS list. We might have done this already
* with the H5AC_protect(), but it won't hurt to do it twice.
*/
- if(heap->obj[0].begin) {
- if(H5F_cwfs_advance_heap(f, heap, FALSE) < 0)
+ if (heap->obj[0].begin) {
+ if (H5F_cwfs_advance_heap(f, heap, FALSE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, NULL, "can't adjust file's CWFS")
} /* end if */
/* If the caller would like to know the heap object's size, set that */
- if(buf_size)
+ if (buf_size)
*buf_size = size;
/* Set return value */
ret_value = object;
done:
- if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, H5AC__NO_FLAGS_SET) < 0)
+ if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release object header")
- if(NULL == ret_value && NULL == orig_object && object)
+ if (NULL == ret_value && NULL == orig_object && object)
H5MM_free(object);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_read() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_link
*
@@ -677,28 +662,28 @@ done:
int
H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust)
{
- H5HG_heap_t *heap = NULL;
- unsigned heap_flags = H5AC__NO_FLAGS_SET;
- int ret_value; /* Return value */
+ H5HG_heap_t *heap = NULL;
+ unsigned heap_flags = H5AC__NO_FLAGS_SET;
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
HDassert(hobj);
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Load the heap */
- if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
- if(adjust != 0) {
+ if (adjust != 0) {
HDassert(hobj->idx < heap->nused);
HDassert(heap->obj[hobj->idx].begin);
- if((heap->obj[hobj->idx].nrefs + adjust) < 0)
+ if ((heap->obj[hobj->idx].nrefs + adjust) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "new link count would be out of range")
- if((heap->obj[hobj->idx].nrefs + adjust) > H5HG_MAXLINK)
+ if ((heap->obj[hobj->idx].nrefs + adjust) > H5HG_MAXLINK)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "new link count would be out of range")
heap->obj[hobj->idx].nrefs += adjust;
heap_flags |= H5AC__DIRTIED_FLAG;
@@ -708,13 +693,12 @@ H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust)
ret_value = heap->obj[hobj->idx].nrefs;
done:
- if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, heap_flags) < 0)
+ if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, heap_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_link() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_remove
*
@@ -725,35 +709,28 @@ done:
* Programmer: Robb Matzke
* Monday, March 30, 1998
*
- * Modifications:
- *
- * John Mainzer - 6/8/05
- * Modified function to use the dirtied parameter of
- * H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
+H5HG_remove(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
{
- H5HG_heap_t *heap = NULL;
- uint8_t *p = NULL, *obj_start = NULL;
- size_t need;
- unsigned u;
- unsigned flags = H5AC__NO_FLAGS_SET;/* Whether the heap gets deleted */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HG_heap_t *heap = NULL;
+ uint8_t * p = NULL, *obj_start = NULL;
+ size_t need;
+ unsigned u;
+ unsigned flags = H5AC__NO_FLAGS_SET; /* Whether the heap gets deleted */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
HDassert(hobj);
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Load the heap */
- if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
HDassert(hobj->idx < heap->nused);
@@ -763,59 +740,59 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
need = H5HG_ALIGN(heap->obj[hobj->idx].size) + H5HG_SIZEOF_OBJHDR(f);
/* Move the new free space to the end of the heap */
- for(u = 0; u < heap->nused; u++)
- if(heap->obj[u].begin > heap->obj[hobj->idx].begin)
+ for (u = 0; u < heap->nused; u++)
+ if (heap->obj[u].begin > heap->obj[hobj->idx].begin)
heap->obj[u].begin -= need;
- if(NULL == heap->obj[0].begin) {
+ if (NULL == heap->obj[0].begin) {
heap->obj[0].begin = heap->chunk + (heap->size - need);
- heap->obj[0].size = need;
+ heap->obj[0].size = need;
heap->obj[0].nrefs = 0;
} /* end if */
else
heap->obj[0].size += need;
- HDmemmove(obj_start, obj_start + need,
- heap->size - (size_t)((obj_start + need) - heap->chunk));
- if(heap->obj[0].size >= H5HG_SIZEOF_OBJHDR(f)) {
+ HDmemmove(obj_start, obj_start + need, heap->size - (size_t)((obj_start + need) - heap->chunk));
+ if (heap->obj[0].size >= H5HG_SIZEOF_OBJHDR(f)) {
p = heap->obj[0].begin;
UINT16ENCODE(p, 0); /*id*/
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
- H5F_ENCODE_LENGTH (f, p, heap->obj[0].size);
+ H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
} /* end if */
HDmemset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
flags |= H5AC__DIRTIED_FLAG;
- if((heap->obj[0].size + H5HG_SIZEOF_HDR(f)) == heap->size) {
+ if ((heap->obj[0].size + H5HG_SIZEOF_HDR(f)) == heap->size) {
/*
* The collection is empty. Remove it from the CWFS list and return it
* to the file free list.
*/
- flags |= H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; /* Indicate that the object was deleted, for the unprotect call */
- } /* end if */
+ flags |=
+ H5AC__DELETED_FLAG |
+ H5AC__FREE_FILE_SPACE_FLAG; /* Indicate that the object was deleted, for the unprotect call */
+ } /* end if */
else {
/*
* If the heap is in the CWFS list then advance it one position. The
* H5AC_protect() might have done that too, but that's okay. If the
* heap isn't on the CWFS list then add it to the end.
*/
- if(H5F_cwfs_advance_heap(f, heap, TRUE) < 0)
+ if (H5F_cwfs_advance_heap(f, heap, TRUE) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't adjust file's CWFS")
} /* end else */
done:
- if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, flags) < 0)
+ if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HG_remove() */
-
/*-------------------------------------------------------------------------
- * Function: H5HG_free
+ * Function: H5HG_free
*
- * Purpose: Destroys a global heap collection in memory
+ * Purpose: Destroys a global heap collection in memory
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Wednesday, January 15, 2003
@@ -825,7 +802,7 @@ done:
herr_t
H5HG_free(H5HG_heap_t *heap)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -833,16 +810,15 @@ H5HG_free(H5HG_heap_t *heap)
HDassert(heap);
/* Remove the heap from the CWFS list */
- if(H5F_cwfs_remove_heap(heap->shared, heap) < 0)
+ if (H5F_cwfs_remove_heap(heap->shared, heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove heap from file's CWFS")
- if(heap->chunk)
+ if (heap->chunk)
heap->chunk = H5FL_BLK_FREE(gheap_chunk, heap->chunk);
- if(heap->obj)
+ if (heap->obj)
heap->obj = H5FL_SEQ_FREE(H5HG_obj_t, heap->obj);
heap = H5FL_FREE(H5HG_heap_t, heap);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_free() */
-
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index 075697c..84247d6 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HGcache.c
* Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement global heap metadata cache methods.
*
@@ -26,47 +26,41 @@
/* Module Setup */
/****************/
-#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
-
+#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HGpkg.h" /* Global heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HGpkg.h" /* Global heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache callbacks */
static H5HG_heap_t *H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr,
- H5HG_heap_t *heap, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5HG_dest(H5F_t *f, H5HG_heap_t *heap);
-static herr_t H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy);
-static herr_t H5HG_size(const H5F_t *f, const H5HG_heap_t *heap, size_t *size_ptr);
-
+static herr_t H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, H5HG_heap_t *heap,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5HG_dest(H5F_t *f, H5HG_heap_t *heap);
+static herr_t H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy);
+static herr_t H5HG_size(const H5F_t *f, const H5HG_heap_t *heap, size_t *size_ptr);
/*********************/
/* Package Variables */
@@ -82,18 +76,14 @@ const H5AC_class_t H5AC_GHEAP[1] = {{
(H5AC_size_func_t)H5HG_size,
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HG_load
*
@@ -111,11 +101,11 @@ const H5AC_class_t H5AC_GHEAP[1] = {{
static H5HG_heap_t *
H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- H5HG_heap_t *heap = NULL;
- uint8_t *p;
- size_t nalloc, need;
- size_t max_idx = 0; /* The maximum index seen */
- H5HG_heap_t *ret_value = NULL; /* Return value */
+ H5HG_heap_t *heap = NULL;
+ uint8_t * p;
+ size_t nalloc, need;
+ size_t max_idx = 0; /* The maximum index seen */
+ H5HG_heap_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -125,23 +115,23 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
HDassert(udata);
/* Read the initial 4k page */
- if(NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
heap->shared = H5F_SHARED(f);
- if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, (size_t)H5HG_MINSIZE)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(H5F_block_read(f, H5FD_MEM_GHEAP, addr, (size_t)H5HG_MINSIZE, dxpl_id, heap->chunk) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection")
+ if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, (size_t)H5HG_MINSIZE)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (H5F_block_read(f, H5FD_MEM_GHEAP, addr, (size_t)H5HG_MINSIZE, dxpl_id, heap->chunk) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection")
p = heap->chunk;
/* Magic number */
- if(HDmemcmp(p, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad global heap collection signature")
+ if (HDmemcmp(p, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad global heap collection signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(H5HG_VERSION != *p++)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong version number in global heap")
+ if (H5HG_VERSION != *p++)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong version number in global heap")
/* Reserved */
p += 3;
@@ -154,54 +144,55 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
* If we didn't read enough in the first try, then read the rest of the
* collection now.
*/
- if(heap->size > H5HG_MINSIZE) {
- haddr_t next_addr = addr + (hsize_t)H5HG_MINSIZE;
-
- if(NULL == (heap->chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, heap->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(H5F_block_read(f, H5FD_MEM_GHEAP, next_addr, (heap->size - H5HG_MINSIZE), dxpl_id, heap->chunk + H5HG_MINSIZE) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection")
+ if (heap->size > H5HG_MINSIZE) {
+ haddr_t next_addr = addr + (hsize_t)H5HG_MINSIZE;
+
+ if (NULL == (heap->chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, heap->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (H5F_block_read(f, H5FD_MEM_GHEAP, next_addr, (heap->size - H5HG_MINSIZE), dxpl_id,
+ heap->chunk + H5HG_MINSIZE) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection")
} /* end if */
/* Decode each object */
- p = heap->chunk + H5HG_SIZEOF_HDR(f);
+ p = heap->chunk + H5HG_SIZEOF_HDR(f);
nalloc = H5HG_NOBJS(f, heap->size);
/* Calloc the obj array because the file format spec makes no guarantee
* about the order of the objects, and unused slots must be set to zero.
*/
- if(NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
heap->nalloc = nalloc;
- while(p < (heap->chunk + heap->size)) {
- if((p + H5HG_SIZEOF_OBJHDR(f)) > (heap->chunk + heap->size)) {
- /*
- * The last bit of space is too tiny for an object header, so we
- * assume that it's free space.
- */
- HDassert(NULL == heap->obj[0].begin);
- heap->obj[0].size = ((const uint8_t *)heap->chunk + heap->size) - p;
- heap->obj[0].begin = p;
- p += heap->obj[0].size;
- } /* end if */
+ while (p < (heap->chunk + heap->size)) {
+ if ((p + H5HG_SIZEOF_OBJHDR(f)) > (heap->chunk + heap->size)) {
+ /*
+ * The last bit of space is too tiny for an object header, so we
+ * assume that it's free space.
+ */
+ HDassert(NULL == heap->obj[0].begin);
+ heap->obj[0].size = ((const uint8_t *)heap->chunk + heap->size) - p;
+ heap->obj[0].begin = p;
+ p += heap->obj[0].size;
+ } /* end if */
else {
- unsigned idx;
- uint8_t *begin = p;
+ unsigned idx;
+ uint8_t *begin = p;
- UINT16DECODE(p, idx);
+ UINT16DECODE(p, idx);
/* Check if we need more room to store heap objects */
- if(idx >= heap->nalloc) {
- size_t new_alloc; /* New allocation number */
- H5HG_obj_t *new_obj; /* New array of object descriptions */
+ if (idx >= heap->nalloc) {
+ size_t new_alloc; /* New allocation number */
+ H5HG_obj_t *new_obj; /* New array of object descriptions */
/* Determine the new number of objects to index */
new_alloc = MAX(heap->nalloc * 2, (idx + 1));
HDassert(idx < new_alloc);
/* Reallocate array of objects */
- if(NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
+ if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear newly allocated space */
@@ -209,67 +200,67 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
/* Update heap information */
heap->nalloc = new_alloc;
- heap->obj = new_obj;
+ heap->obj = new_obj;
HDassert(heap->nalloc > heap->nused);
} /* end if */
- UINT16DECODE(p, heap->obj[idx].nrefs);
- p += 4; /*reserved*/
- H5F_DECODE_LENGTH(f, p, heap->obj[idx].size);
- heap->obj[idx].begin = begin;
-
- /*
- * The total storage size includes the size of the object header
- * and is zero padded so the next object header is properly
- * aligned. The entire obj array was calloc'ed, so no need to zero
- * the space here. The last bit of space is the free space object
- * whose size is never padded and already includes the object
- * header.
- */
- if(idx > 0) {
- need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(heap->obj[idx].size);
-
- if(idx > max_idx)
+ UINT16DECODE(p, heap->obj[idx].nrefs);
+ p += 4; /*reserved*/
+ H5F_DECODE_LENGTH(f, p, heap->obj[idx].size);
+ heap->obj[idx].begin = begin;
+
+ /*
+ * The total storage size includes the size of the object
+ * header and is zero padded so the next object header is
+ * properly aligned. The entire obj array was calloc'ed,
+ * so no need to zero the space here. The last bit of space
+ * is the free space object whose size is never padded and
+ * already includes the object header.
+ */
+ if (idx > 0) {
+ need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(heap->obj[idx].size);
+ if (idx > max_idx)
max_idx = idx;
- } /* end if */
+ } /* end if */
else
- need = heap->obj[idx].size;
- p = begin + need;
- } /* end else */
- } /* end while */
+ need = heap->obj[idx].size;
+ p = begin + need;
+ } /* end else */
+ } /* end while */
HDassert(p == heap->chunk + heap->size);
HDassert(H5HG_ISALIGNED(heap->obj[0].size));
/* Set the next index value to use */
- if(max_idx > 0)
+ if (max_idx > 0)
heap->nused = max_idx + 1;
else
heap->nused = 1;
+ /* Sanity check */
HDassert(max_idx < heap->nused);
/* Add the new heap to the CWFS list for the file */
- if(H5F_cwfs_add(f, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS")
+ if (H5F_cwfs_add(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS")
ret_value = heap;
done:
- if(!ret_value && heap)
- if(H5HG_free(heap) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy global heap collection")
+ if (!ret_value && heap)
+ if (H5HG_free(heap) < 0)
+ HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy global heap collection")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_load() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_flush
*
* Purpose: Flushes a global heap collection from memory to disk if it's
* dirty. Optionally deletes teh heap from memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Robb Matzke
* Friday, March 27, 1998
@@ -277,9 +268,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -289,27 +281,27 @@ H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *
HDassert(H5F_addr_eq(addr, heap->addr));
HDassert(heap);
- if(heap->cache_info.is_dirty) {
- if(H5F_block_write(f, H5FD_MEM_GHEAP, addr, heap->size, dxpl_id, heap->chunk) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write global heap collection to file")
- heap->cache_info.is_dirty = FALSE;
+ if (heap->cache_info.is_dirty) {
+ if (H5F_block_write(f, H5FD_MEM_GHEAP, addr, heap->size, dxpl_id, heap->chunk) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write global heap collection to file")
+ heap->cache_info.is_dirty = FALSE;
} /* end if */
- if(destroy)
- if(H5HG_dest(f, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection")
+ if (destroy)
+ if (H5HG_dest(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_dest
*
* Purpose: Destroys a global heap collection in memory
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Quincey Koziol
* Wednesday, January 15, 2003
@@ -319,7 +311,7 @@ done:
static herr_t
H5HG_dest(H5F_t *f, H5HG_heap_t *heap)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -333,28 +325,28 @@ H5HG_dest(H5F_t *f, H5HG_heap_t *heap)
HDassert(!heap->cache_info.free_file_space_on_destroy || H5F_addr_defined(heap->cache_info.addr));
/* Check for freeing file space for globalheap */
- if(heap->cache_info.free_file_space_on_destroy) {
+ if (heap->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_GHEAP, H5AC_dxpl_id, heap->cache_info.addr, (hsize_t)heap->size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_GHEAP, H5AC_dxpl_id, heap->cache_info.addr, (hsize_t)heap->size) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free global heap")
} /* end if */
/* Destroy global heap collection */
- if(H5HG_free(heap) < 0)
+ if (H5HG_free(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_clear
*
* Purpose: Mark a global heap in memory as non-dirty.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Quincey Koziol
* Thursday, March 20, 2003
@@ -374,15 +366,14 @@ H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy)
/* Mark heap as clean */
heap->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HG_dest(f, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection")
+ if (destroy)
+ if (H5HG_dest(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_size
*
@@ -390,7 +381,8 @@ done:
* H5HG_heap_t on disk, and return it in *len_ptr. On failure,
* the value of *len_ptr is undefined.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: John Mainzer
* 5/13/04
@@ -410,4 +402,3 @@ H5HG_size(const H5F_t H5_ATTR_UNUSED *f, const H5HG_heap_t *heap, size_t *size_p
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HG_size() */
-
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 06765eb..5da72f6 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: Global Heap object debugging functions.
@@ -21,54 +21,45 @@
/* Module Setup */
/****************/
-#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
-
+#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HGpkg.h" /* Global heaps */
-#include "H5Iprivate.h" /* ID Functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HGpkg.h" /* Global heaps */
+#include "H5Iprivate.h" /* ID Functions */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HG_debug
*
@@ -77,96 +68,83 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Mar 27, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
- int fwidth)
+H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- unsigned u, nused, maxobj;
- unsigned j, k;
- H5HG_heap_t *h = NULL;
- uint8_t *p = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u, nused, maxobj;
+ unsigned j, k;
+ H5HG_heap_t *h = NULL;
+ uint8_t * p = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
- HDassert(H5F_addr_defined (addr));
+ HDassert(H5F_addr_defined(addr));
HDassert(stream);
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- if(NULL == (h = H5HG_protect(f, dxpl_id, addr, H5AC_READ)))
+ if (NULL == (h = H5HG_protect(f, dxpl_id, addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap collection");
HDfprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
- "Dirty:",
- (int)(h->cache_info.is_dirty));
+ HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty));
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Total collection size in file:",
- (unsigned long)(h->size));
+ "Total collection size in file:", (unsigned long)(h->size));
- for(u = 1, nused = 0, maxobj = 0; u < h->nused; u++)
- if(h->obj[u].begin) {
- nused++;
- if (u>maxobj)
+ for (u = 1, nused = 0, maxobj = 0; u < h->nused; u++)
+ if (h->obj[u].begin) {
+ nused++;
+ if (u > maxobj)
maxobj = u;
- }
- HDfprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth,
- "Objects defined/allocated/max:",
- nused,
- (unsigned long)h->nalloc);
- if(nused)
+ }
+ HDfprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused,
+ (unsigned long)h->nalloc);
+ if (nused)
HDfprintf(stream, "%u\n", maxobj);
else
HDfprintf(stream, "NA\n");
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Free space:",
- (unsigned long)(h->obj[0].size));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size));
- for(u = 1; u < h->nused; u++)
- if(h->obj[u].begin) {
+ for (u = 1; u < h->nused; u++)
+ if (h->obj[u].begin) {
char buf[64];
- HDsnprintf(buf, sizeof(buf), "Object %u", u);
- HDfprintf(stream, "%*s%s\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Obffset in block:",
- (unsigned long)(h->obj[u].begin - h->chunk));
- HDfprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Reference count:",
- h->obj[u].nrefs);
- HDfprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "",
- MIN(fwidth - 3, 0),
- "Size of object body:",
- (unsigned long)(h->obj[u].size),
- (unsigned long)H5HG_ALIGN(h->obj[u].size));
- p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR(f);
- for(j = 0; j < h->obj[u].size; j += 16) {
- HDfprintf(stream, "%*s%04u: ", indent + 6, "", j);
- for(k = 0; k < 16; k++) {
- if(8 == k)
+ HDsnprintf(buf, sizeof(buf), "Object %u", u);
+ HDfprintf(stream, "%*s%s\n", indent, "", buf);
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
+ HDfprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Reference count:", h->obj[u].nrefs);
+ HDfprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Size of object body:", (unsigned long)(h->obj[u].size),
+ (unsigned long)H5HG_ALIGN(h->obj[u].size));
+ p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR(f);
+ for (j = 0; j < h->obj[u].size; j += 16) {
+ HDfprintf(stream, "%*s%04u: ", indent + 6, "", j);
+ for (k = 0; k < 16; k++) {
+ if (8 == k)
HDfprintf(stream, " ");
- if(j + k < h->obj[u].size)
- HDfprintf(stream, "%02x ", p[j + k]);
- else
- HDfputs(" ", stream);
- }
- for(k = 0; k < 16 && j + k < h->obj[u].size; k++) {
- if(8 == k)
+ if (j + k < h->obj[u].size)
+ HDfprintf(stream, "%02x ", p[j + k]);
+ else
+ HDfputs(" ", stream);
+ }
+ for (k = 0; k < 16 && j + k < h->obj[u].size; k++) {
+ if (8 == k)
HDfprintf(stream, " ");
- HDfputc(p[j + k]>' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
- }
- HDfprintf(stream, "\n");
- }
- }
+ HDfputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
+ }
+ HDfprintf(stream, "\n");
+ }
+ }
done:
if (h && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, addr, h, H5AC__NO_FLAGS_SET) < 0)
@@ -174,4 +152,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HG_debug() */
-
diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h
index 5f20ed5..d3c8334 100644
--- a/src/H5HGpkg.h
+++ b/src/H5HGpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: This file contains declarations which are visible
@@ -30,9 +30,8 @@
#include "H5HGprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free lists */
-
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free lists */
/*****************************/
/* Package Private Variables */
@@ -50,7 +49,6 @@ H5FL_SEQ_EXTERN(H5HG_obj_t);
/* Declare extern the PQ free list to manage heap chunks */
H5FL_BLK_EXTERN(gheap_chunk);
-
/**************************/
/* Package Private Macros */
/**************************/
@@ -58,7 +56,7 @@ H5FL_BLK_EXTERN(gheap_chunk);
/*
* Global heap collection version.
*/
-#define H5HG_VERSION 1
+#define H5HG_VERSION 1
/*
* All global heap collections are at least this big. This allows us to read
@@ -66,7 +64,7 @@ H5FL_BLK_EXTERN(gheap_chunk);
* bytes of header to figure out the size. If the heap is larger than this
* then a second read gets the rest after we've decoded the header.
*/
-#define H5HG_MINSIZE 4096
+#define H5HG_MINSIZE 4096
/*
* Pad all global heap messages to a multiple of eight bytes so we can load
@@ -74,29 +72,29 @@ H5FL_BLK_EXTERN(gheap_chunk);
* be sufficient for machines that have alignment constraints because our
* largest data type is eight bytes.
*/
-#define H5HG_ALIGNMENT 8
-#define H5HG_ALIGN(X) (H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/H5HG_ALIGNMENT))
-#define H5HG_ISALIGNED(X) ((X)==H5HG_ALIGN(X))
+#define H5HG_ALIGNMENT 8
+#define H5HG_ALIGN(X) (H5HG_ALIGNMENT * (((X) + H5HG_ALIGNMENT - 1) / H5HG_ALIGNMENT))
+#define H5HG_ISALIGNED(X) ((X) == H5HG_ALIGN(X))
/*
* The size of the collection header, always a multiple of the alignment so
* that the stuff that follows the header is aligned.
*/
-#define H5HG_SIZEOF_HDR(f) \
- (size_t)H5HG_ALIGN(4 + /*magic number */ \
- 1 + /*version number */ \
- 3 + /*reserved */ \
- H5F_SIZEOF_SIZE(f)) /*collection size */
+#define H5HG_SIZEOF_HDR(f) \
+ (size_t) H5HG_ALIGN(4 + /*magic number */ \
+ 1 + /*version number */ \
+ 3 + /*reserved */ \
+ H5F_SIZEOF_SIZE(f)) /*collection size */
/*
* The overhead associated with each object in the heap, always a multiple of
* the alignment so that the stuff that follows the header is aligned.
*/
-#define H5HG_SIZEOF_OBJHDR(f) \
- (size_t)H5HG_ALIGN(2 + /*object id number */ \
- 2 + /*reference count */ \
- 4 + /*reserved */ \
- H5F_SIZEOF_SIZE(f)) /*object data size */
+#define H5HG_SIZEOF_OBJHDR(f) \
+ (size_t) H5HG_ALIGN(2 + /*object id number */ \
+ 2 + /*reference count */ \
+ 4 + /*reserved */ \
+ H5F_SIZEOF_SIZE(f)) /*object data size */
/*
* The initial guess for the number of messages in a collection. We assume
@@ -105,36 +103,34 @@ H5FL_BLK_EXTERN(gheap_chunk);
* some overhead and each message has some overhead. The `+2' accounts for
* rounding and for the free space object.
*/
-#define H5HG_NOBJS(f,z) ((((z)-H5HG_SIZEOF_HDR(f))/ \
- H5HG_SIZEOF_OBJHDR(f)+2))
-
+#define H5HG_NOBJS(f, z) ((((z)-H5HG_SIZEOF_HDR(f)) / H5HG_SIZEOF_OBJHDR(f) + 2))
/****************************/
/* Package Private Typedefs */
/****************************/
typedef struct H5HG_obj_t {
- int nrefs; /*reference count */
- size_t size; /*total size of object */
- uint8_t *begin; /*ptr to object into heap->chunk*/
+ int nrefs; /* reference count */
+ size_t size; /* total size of object */
+ uint8_t *begin; /* ptr to object into heap->chunk */
} H5HG_obj_t;
/* Forward declarations for fields */
struct H5F_file_t;
struct H5HG_heap_t {
- H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
- /* first field in structure */
- haddr_t addr; /*collection address */
- size_t size; /*total size of collection */
- uint8_t *chunk; /*the collection, incl. header */
- size_t nalloc; /*numb object slots allocated */
- size_t nused; /*number of slots used */
- /* If this value is >65535 then all indices */
- /* have been used at some time and the */
- /* correct new index should be searched for */
- struct H5F_file_t *shared; /* shared file */
- H5HG_obj_t *obj; /*array of object descriptions */
+ H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
+ /* first field in structure */
+ haddr_t addr; /*collection address */
+ size_t size; /*total size of collection */
+ uint8_t *chunk; /*the collection, incl. header */
+ size_t nalloc; /*numb object slots allocated */
+ size_t nused; /*number of slots used */
+ /* If this value is >65535 then all indices */
+ /* have been used at some time and the */
+ /* correct new index should be searched for */
+ struct H5F_file_t *shared; /* shared file */
+ H5HG_obj_t * obj; /*array of object descriptions */
};
/******************************/
@@ -144,4 +140,3 @@ H5_DLL herr_t H5HG_free(H5HG_heap_t *heap);
H5_DLL H5HG_heap_t *H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw);
#endif /* _H5HGpkg_H */
-
diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h
index 497dcc8..a02ad40 100644
--- a/src/H5HGprivate.h
+++ b/src/H5HGprivate.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, March 27, 1998
*/
#ifndef _H5HGprivate_H
@@ -22,42 +22,39 @@
#include "H5HGpublic.h"
/* Private headers needed by this file. */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
/* Information to locate object in global heap */
typedef struct H5HG_t {
- haddr_t addr; /*address of collection */
- size_t idx; /*object ID within collection */
+ haddr_t addr; /*address of collection */
+ size_t idx; /*object ID within collection */
} H5HG_t;
/* Typedef for heap in memory (defined in H5HGpkg.h) */
typedef struct H5HG_heap_t H5HG_heap_t;
-
/*
* Limit global heap collections to the some reasonable size. This is
* fairly arbitrary, but needs to be small enough that no more than H5HG_MAXIDX
* objects will be allocated from a single heap.
*/
-#define H5HG_MAXSIZE 65536
+#define H5HG_MAXSIZE 65536
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5HG_PACKAGE
-#define H5HG_ADDR(H) ((H)->addr)
-#define H5HG_SIZE(H) ((H)->size)
-#define H5HG_FREE_SIZE(H) ((H)->obj[0].size)
+#define H5HG_ADDR(H) ((H)->addr)
+#define H5HG_SIZE(H) ((H)->size)
+#define H5HG_FREE_SIZE(H) ((H)->obj[0].size)
#else /* H5HG_PACKAGE */
-#define H5HG_ADDR(H) (H5HG_get_addr(H))
-#define H5HG_SIZE(H) (H5HG_get_size(H))
-#define H5HG_FREE_SIZE(H) (H5HG_get_free_size(H))
+#define H5HG_ADDR(H) (H5HG_get_addr(H))
+#define H5HG_SIZE(H) (H5HG_get_size(H))
+#define H5HG_FREE_SIZE(H) (H5HG_get_free_size(H))
#endif /* H5HG_PACKAGE */
-
/* Main global heap routines */
-H5_DLL herr_t H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj,
- H5HG_t *hobj/*out*/);
-H5_DLL void *H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object, size_t *buf_size/*out*/);
-H5_DLL int H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust);
+H5_DLL herr_t H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj /*out*/);
+H5_DLL void * H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object, size_t *buf_size /*out*/);
+H5_DLL int H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust);
H5_DLL herr_t H5HG_remove(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj);
/* Support routines */
@@ -65,12 +62,10 @@ H5_DLL herr_t H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need);
/* Query routines */
H5_DLL haddr_t H5HG_get_addr(const H5HG_heap_t *h);
-H5_DLL size_t H5HG_get_size(const H5HG_heap_t *h);
-H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h);
+H5_DLL size_t H5HG_get_size(const H5HG_heap_t *h);
+H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h);
/* Debugging functions */
-H5_DLL herr_t H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
- int fwidth);
+H5_DLL herr_t H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
#endif /* _H5HGprivate_H */
-
diff --git a/src/H5HGpublic.h b/src/H5HGpublic.h
index fcec593..31cde60 100644
--- a/src/H5HGpublic.h
+++ b/src/H5HGpublic.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, March 27, 1998
*/
#ifndef _H5HGpublic_H
diff --git a/src/H5HGquery.c b/src/H5HGquery.c
index 919deda..8a46f39 100644
--- a/src/H5HGquery.c
+++ b/src/H5HGquery.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
* Purpose: Query routines for global heaps.
@@ -23,53 +23,43 @@
/* Module Setup */
/****************/
-#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
-
+#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HGpkg.h" /* Global heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HGpkg.h" /* Global heaps */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HG_get_addr
*
@@ -93,7 +83,6 @@ H5HG_get_addr(const H5HG_heap_t *heap)
FUNC_LEAVE_NOAPI(heap->addr)
} /* H5HG_get_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_get_size
*
@@ -117,7 +106,6 @@ H5HG_get_size(const H5HG_heap_t *heap)
FUNC_LEAVE_NOAPI(heap->size)
} /* H5HG_get_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HG_get_free_size
*
@@ -140,4 +128,3 @@ H5HG_get_free_size(const H5HG_heap_t *heap)
FUNC_LEAVE_NOAPI(heap->obj[0].size)
} /* H5HG_get_free_size() */
-
diff --git a/src/H5HL.c b/src/H5HL.c
index 01ace76..3de5340 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -6,19 +6,19 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5HL.c
- * Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5HL.c
+ * Jul 16 1997
+ * Robb Matzke
*
- * Purpose: Heap functions for the local heaps used by symbol
- * tables to store names (among other things).
+ * Purpose: Heap functions for the local heaps used by symbol
+ * tables to store names (among other things).
*
*-------------------------------------------------------------------------
*/
@@ -27,43 +27,37 @@
/* Module Setup */
/****************/
-#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
-
+#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HLpkg.h" /* Local Heaps */
-#include "H5MFprivate.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HLpkg.h" /* Local Heaps */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-#define H5HL_MIN_HEAP 128 /* Minimum size to reduce heap buffer to */
-
+#define H5HL_MIN_HEAP 128 /* Minimum size to reduce heap buffer to */
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static H5HL_free_t *H5HL_remove_free(H5HL_t *heap, H5HL_free_t *fl);
-static herr_t H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap);
-
+static herr_t H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap);
/*********************/
/* Package Variables */
@@ -75,46 +69,40 @@ H5FL_DEFINE(H5HL_free_t);
/* Declare a PQ free list to manage the heap chunk information */
H5FL_BLK_DEFINE(lheap_chunk);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5HL_create
+ * Function: H5HL_create
*
- * Purpose: Creates a new heap data structure on disk and caches it
- * in memory. SIZE_HINT is a hint for the initial size of the
- * data area of the heap. If size hint is invalid then a
- * reasonable (but probably not optimal) size will be chosen.
- * If the heap ever has to grow, then REALLOC_HINT is the
- * minimum amount by which the heap will grow.
+ * Purpose: Creates a new heap data structure on disk and caches it
+ * in memory. SIZE_HINT is a hint for the initial size of the
+ * data area of the heap. If size hint is invalid then a
+ * reasonable (but probably not optimal) size will be chosen.
+ * If the heap ever has to grow, then REALLOC_HINT is the
+ * minimum amount by which the heap will grow.
*
- * Return: Success: Non-negative. The file address of new heap is
- * returned through the ADDR argument.
+ * Return: Success: SUCCEED. The file address of new heap is
+ * returned through the ADDR argument.
+ * Failure: FAIL. addr_p will be HADDR_UNDEF.
*
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 16 1997
+ * Programmer: Robb Matzke
+ * Jul 16 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
+H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p /*out*/)
{
- H5HL_t *heap = NULL; /* Heap created */
- H5HL_prfx_t *prfx = NULL; /* Heap prefix */
- hsize_t total_size; /* Total heap size on disk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap = NULL; /* Heap created */
+ H5HL_prfx_t *prfx = NULL; /* Heap prefix */
+ hsize_t total_size; /* Total heap size on disk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -123,73 +111,72 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
HDassert(addr_p);
/* Adjust size hint as necessary */
- if(size_hint && size_hint < H5HL_SIZEOF_FREE(f))
- size_hint = H5HL_SIZEOF_FREE(f);
+ if (size_hint && size_hint < H5HL_SIZEOF_FREE(f))
+ size_hint = H5HL_SIZEOF_FREE(f);
size_hint = H5HL_ALIGN(size_hint);
/* Allocate new heap structure */
- if(NULL == (heap = H5HL_new(H5F_SIZEOF_SIZE(f), H5F_SIZEOF_ADDR(f), H5HL_SIZEOF_HDR(f))))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate new heap struct")
+ if (NULL == (heap = H5HL_new(H5F_SIZEOF_SIZE(f), H5F_SIZEOF_ADDR(f), H5HL_SIZEOF_HDR(f))))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate new heap struct")
/* Allocate file space */
total_size = heap->prfx_size + size_hint;
- if(HADDR_UNDEF == (heap->prfx_addr = H5MF_alloc(f, H5FD_MEM_LHEAP, dxpl_id, total_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate file memory")
+ if (HADDR_UNDEF == (heap->prfx_addr = H5MF_alloc(f, H5FD_MEM_LHEAP, dxpl_id, total_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate file memory")
/* Initialize info */
heap->single_cache_obj = TRUE;
- heap->dblk_addr = heap->prfx_addr + (hsize_t)heap->prfx_size;
- heap->dblk_size = size_hint;
- if(size_hint)
- if(NULL == (heap->dblk_image = H5FL_BLK_CALLOC(lheap_chunk, size_hint)))
+ heap->dblk_addr = heap->prfx_addr + (hsize_t)heap->prfx_size;
+ heap->dblk_size = size_hint;
+ if (size_hint)
+ if (NULL == (heap->dblk_image = H5FL_BLK_CALLOC(lheap_chunk, size_hint)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* free list */
- if(size_hint) {
- if(NULL == (heap->freelist = H5FL_MALLOC(H5HL_free_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
- heap->freelist->offset = 0;
- heap->freelist->size = size_hint;
- heap->freelist->prev = heap->freelist->next = NULL;
- heap->free_block = 0;
+ if (size_hint) {
+ if (NULL == (heap->freelist = H5FL_MALLOC(H5HL_free_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ heap->freelist->offset = 0;
+ heap->freelist->size = size_hint;
+ heap->freelist->prev = heap->freelist->next = NULL;
+ heap->free_block = 0;
} /* end if */
else {
- heap->freelist = NULL;
+ heap->freelist = NULL;
heap->free_block = H5HL_FREE_NULL;
} /* end else */
/* Allocate the heap prefix */
- if(NULL == (prfx = H5HL_prfx_new(heap)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ if (NULL == (prfx = H5HL_prfx_new(heap)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Add to cache */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap prefix")
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap prefix")
/* Set address to return */
*addr_p = heap->prfx_addr;
done:
- if(ret_value < 0) {
- if(prfx) {
- if(H5HL_prfx_dest(prfx) < 0)
+ if (ret_value < 0) {
+ if (prfx) {
+ if (H5HL_prfx_dest(prfx) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix")
} /* end if */
else {
- if(heap) {
- if(H5F_addr_defined(heap->prfx_addr))
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, heap->prfx_addr, total_size) < 0)
+ if (heap) {
+ if (H5F_addr_defined(heap->prfx_addr))
+ if (H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, heap->prfx_addr, total_size) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "can't release heap data?")
- if(H5HL_dest(heap) < 0)
+ if (H5HL_dest(heap) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap")
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_create() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_dblk_realloc
*
@@ -199,7 +186,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -207,11 +193,11 @@ done:
static herr_t
H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
{
- H5HL_dblk_t *dblk; /* Local heap data block */
- haddr_t old_addr; /* Old location of heap data block */
- haddr_t new_addr; /* New location of heap data block */
- size_t old_heap_size; /* Old size of heap data block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_dblk_t *dblk; /* Local heap data block */
+ haddr_t old_addr; /* Old location of heap data block */
+ haddr_t new_addr; /* New location of heap data block */
+ size_t old_heap_size; /* Old size of heap data block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -220,15 +206,15 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(new_heap_size > 0);
/* Release old space on disk */
- old_addr = heap->dblk_addr;
+ old_addr = heap->dblk_addr;
old_heap_size = heap->dblk_size;
H5_CHECK_OVERFLOW(old_heap_size, size_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, old_addr, (hsize_t)old_heap_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, old_addr, (hsize_t)old_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "can't release old heap data?")
/* Allocate new space on disk */
H5_CHECK_OVERFLOW(new_heap_size, size_t, hsize_t);
- if(HADDR_UNDEF == (new_addr = H5MF_alloc(f, H5FD_MEM_LHEAP, dxpl_id, (hsize_t)new_heap_size)))
+ if (HADDR_UNDEF == (new_addr = H5MF_alloc(f, H5FD_MEM_LHEAP, dxpl_id, (hsize_t)new_heap_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate file space for heap")
/* Update heap info*/
@@ -236,15 +222,15 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
heap->dblk_size = new_heap_size;
/* Check if heap data block actually moved in the file */
- if(H5F_addr_eq(old_addr, new_addr)) {
+ if (H5F_addr_eq(old_addr, new_addr)) {
/* Check if heap data block is contiguous w/prefix */
- if(heap->single_cache_obj) {
+ if (heap->single_cache_obj) {
/* Sanity check */
HDassert(H5F_addr_eq(heap->prfx_addr + heap->prfx_size, old_addr));
HDassert(heap->prfx);
/* Resize the heap prefix in the cache */
- if(H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
+ if (H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end if */
else {
@@ -253,24 +239,24 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(heap->dblk);
/* Resize the heap data block in the cache */
- if(H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
+ if (H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check if heap data block was contiguous w/prefix previously */
- if(heap->single_cache_obj) {
+ if (heap->single_cache_obj) {
/* Create new heap data block */
- if(NULL == (dblk = H5HL_dblk_new(heap)))
+ if (NULL == (dblk = H5HL_dblk_new(heap)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate local heap data block")
/* Resize current heap prefix */
heap->prfx_size = H5HL_SIZEOF_HDR(f);
- if(H5AC_resize_entry(heap->prfx, (size_t)heap->prfx_size) < 0)
+ if (H5AC_resize_entry(heap->prfx, (size_t)heap->prfx_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap prefix in cache")
/* Insert data block into cache (pinned) */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap data block")
dblk = NULL;
@@ -282,17 +268,17 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
/* (ignore [unlikely] case where heap data block ends up
* contiguous w/heap prefix again.
*/
- if(H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
+ if (H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap data block in cache")
/* Relocate the heap data block in the cache */
- if(H5AC_move_entry(f, H5AC_LHEAP_DBLK, old_addr, new_addr) < 0)
+ if (H5AC_move_entry(f, H5AC_LHEAP_DBLK, old_addr, new_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move heap data block in cache")
} /* end else */
- } /* end else */
+ } /* end else */
done:
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Restore old heap address & size */
heap->dblk_addr = old_addr;
heap->dblk_size = old_heap_size;
@@ -301,18 +287,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_dblk_realloc() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_minimize_heap_space
*
* Purpose: Go through the heap's freelist and determine if we can
* eliminate the free blocks at the tail of the buffer.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept. 16, 2003
*
*-------------------------------------------------------------------------
@@ -320,8 +303,8 @@ done:
static herr_t
H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
{
- size_t new_heap_size = heap->dblk_size; /* New size of heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t new_heap_size = heap->dblk_size; /* New size of heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -334,14 +317,14 @@ H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
* eliminating free blocks at the tail of the buffer before flushing the
* buffer out.
*/
- if(heap->freelist) {
- H5HL_free_t *tmp_fl;
- H5HL_free_t *last_fl = NULL;
+ if (heap->freelist) {
+ H5HL_free_t *tmp_fl;
+ H5HL_free_t *last_fl = NULL;
/* Search for a free block at the end of the buffer */
- for(tmp_fl = heap->freelist; tmp_fl; tmp_fl = tmp_fl->next)
+ for (tmp_fl = heap->freelist; tmp_fl; tmp_fl = tmp_fl->next)
/* Check if the end of this free block is at the end of the buffer */
- if(tmp_fl->offset + tmp_fl->size == heap->dblk_size) {
+ if (tmp_fl->offset + tmp_fl->size == heap->dblk_size) {
last_fl = tmp_fl;
break;
} /* end if */
@@ -350,28 +333,28 @@ H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
* Found free block at the end of the buffer, decide what to do
* about it
*/
- if(last_fl) {
+ if (last_fl) {
/*
* If the last free block's size is more than half the memory
* buffer size (and the memory buffer is larger than the
* minimum size), reduce or eliminate it.
*/
- if(last_fl->size >= (heap->dblk_size / 2) && heap->dblk_size > H5HL_MIN_HEAP) {
+ if (last_fl->size >= (heap->dblk_size / 2) && heap->dblk_size > H5HL_MIN_HEAP) {
/*
* Reduce size of buffer until it's too small or would
* eliminate the free block
*/
- while(new_heap_size > H5HL_MIN_HEAP &&
- new_heap_size >= (last_fl->offset + H5HL_SIZEOF_FREE(f)))
+ while (new_heap_size > H5HL_MIN_HEAP &&
+ new_heap_size >= (last_fl->offset + H5HL_SIZEOF_FREE(f)))
new_heap_size /= 2;
/*
* Check if reducing the memory buffer size would
* eliminate the free block
*/
- if(new_heap_size < (last_fl->offset + H5HL_SIZEOF_FREE(f))) {
+ if (new_heap_size < (last_fl->offset + H5HL_SIZEOF_FREE(f))) {
/* Check if this is the only block on the free list */
- if(last_fl->prev == NULL && last_fl->next == NULL) {
+ if (last_fl->prev == NULL && last_fl->next == NULL) {
/* Double the new memory size */
new_heap_size *= 2;
@@ -390,7 +373,7 @@ H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
/* Eliminate the free block from the list */
last_fl = H5HL_remove_free(heap, last_fl);
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Truncate the free block */
last_fl->size = H5HL_ALIGN(new_heap_size - last_fl->offset);
@@ -398,24 +381,24 @@ H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
HDassert(last_fl->size >= H5HL_SIZEOF_FREE(f));
HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
} /* end else */
- } /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
/*
* If the heap grew smaller than disk storage then move the
* data segment of the heap to another contiguous block of disk
* storage.
*/
- if(new_heap_size != heap->dblk_size) {
- HDassert(new_heap_size < heap->dblk_size);
+ if (new_heap_size != heap->dblk_size) {
+ HDassert(new_heap_size < heap->dblk_size);
/* Resize the memory buffer */
- if(NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, new_heap_size)))
+ if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, new_heap_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Reallocate data block in file */
- if(H5HL_dblk_realloc(f, dxpl_id, heap, new_heap_size) < 0)
+ if (H5HL_dblk_realloc(f, dxpl_id, heap, new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "reallocating data block failed")
} /* end if */
@@ -423,7 +406,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HL_minimize_heap_space() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_protect
*
@@ -433,7 +415,6 @@ done:
* Failure: NULL
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept. 17, 2003
*
*-------------------------------------------------------------------------
@@ -441,13 +422,13 @@ done:
H5HL_t *
H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
{
- H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
- H5HL_prfx_t *prfx = NULL; /* Local heap prefix */
- H5HL_dblk_t *dblk = NULL; /* Local heap data block */
- H5HL_t *heap; /* Heap data structure */
- unsigned prfx_cache_flags = H5AC__NO_FLAGS_SET; /* Cache flags for unprotecting prefix entry */
- unsigned dblk_cache_flags = H5AC__NO_FLAGS_SET; /* Cache flags for unprotecting data block entry */
- H5HL_t *ret_value; /* Return value */
+ H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
+ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */
+ H5HL_dblk_t * dblk = NULL; /* Local heap data block */
+ H5HL_t * heap; /* Heap data structure */
+ unsigned prfx_cache_flags = H5AC__NO_FLAGS_SET; /* Cache flags for unprotecting prefix entry */
+ unsigned dblk_cache_flags = H5AC__NO_FLAGS_SET; /* Cache flags for unprotecting data block entry */
+ H5HL_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -458,11 +439,11 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
- prfx_udata.prfx_addr = addr;
+ prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
/* Protect the local heap prefix */
- if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, rw)))
+ if (NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to load heap prefix")
/* Get the pointer to the heap */
@@ -470,9 +451,9 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
/* Check if the heap is already pinned in memory */
/* (for re-entrant situation) */
- if(heap->prots == 0) {
+ if (heap->prots == 0) {
/* Check if heap has separate data block */
- if(heap->single_cache_obj) {
+ if (heap->single_cache_obj) {
/* Set the flag for pinning the prefix when unprotecting it */
prfx_cache_flags |= H5AC__PIN_ENTRY_FLAG;
} /* end if */
@@ -480,21 +461,22 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
H5HL_cache_dblk_ud_t dblk_udata; /* User data for protecting local heap data block */
/* Construct the user data for protect callback */
- dblk_udata.heap = heap;
+ dblk_udata.heap = heap;
dblk_udata.loaded = FALSE;
/* Protect the local heap data block */
- if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, rw)))
+ if (NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr,
+ &dblk_udata, rw)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to load heap data block")
/* Pin the prefix, if the data block was loaded from file */
- if(dblk_udata.loaded)
+ if (dblk_udata.loaded)
prfx_cache_flags |= H5AC__PIN_ENTRY_FLAG;
/* Set the flag for pinning the data block when unprotecting it */
dblk_cache_flags |= H5AC__PIN_ENTRY_FLAG;
} /* end if */
- } /* end if */
+ } /* end if */
/* Increment # of times heap is protected */
heap->prots++;
@@ -504,28 +486,26 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
done:
/* Release the prefix from the cache, now pinned */
- if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, prfx_cache_flags) < 0)
+ if (prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, prfx_cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release local heap prefix")
/* Release the data block from the cache, now pinned */
- if(dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, dblk_cache_flags) < 0)
+ if (dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, dblk_cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release local heap data block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_offset_into
*
* Purpose: Called directly after the call to H5HL_protect so that
- * a pointer to the object in the heap can be got.
+ * a pointer to the object in the heap can be obtained.
*
* Return: Success: Valid pointer.
- * Failure: NULL
+ * Failure: Can't fail
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept. 17, 2003
*
*-------------------------------------------------------------------------
@@ -539,25 +519,22 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
/* Sanity check */
HDassert(heap);
- if(offset >= heap->dblk_size)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to offset into local heap data block")
+ if (offset >= heap->dblk_size)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to offset into local heap data block")
ret_value = heap->dblk_image + offset;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_offset_into() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_unprotect
*
* Purpose: Unprotect the data retrieved by the H5HL_protect call.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: SUCCEED/FAIL
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept. 17, 2003
*
*-------------------------------------------------------------------------
@@ -565,7 +542,7 @@ done:
herr_t
H5HL_unprotect(H5HL_t *heap)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -576,11 +553,11 @@ H5HL_unprotect(H5HL_t *heap)
heap->prots--;
/* Check for last unprotection of heap */
- if(heap->prots == 0) {
+ if (heap->prots == 0) {
/* Check for separate heap data block */
- if(heap->single_cache_obj) {
+ if (heap->single_cache_obj) {
/* Mark local heap prefix as evictable again */
- if(H5AC_unpin_entry(heap->prfx) < 0)
+ if (H5AC_unpin_entry(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end if */
else {
@@ -589,27 +566,25 @@ H5HL_unprotect(H5HL_t *heap)
/* Mark local heap data block as evictable again */
/* (data block still pins prefix) */
- if(H5AC_unpin_entry(heap->dblk) < 0)
+ if (H5AC_unpin_entry(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end else */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_unprotect() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_remove_free
+ * Function: H5HL_remove_free
*
- * Purpose: Removes free list element FL from the specified heap and
- * frees it.
+ * Purpose: Removes free list element FL from the specified heap and
+ * frees it.
*
- * Return: NULL
+ * Return: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 17 1997
+ * Programmer: Robb Matzke
+ * Jul 17 1997
*
*-------------------------------------------------------------------------
*/
@@ -618,36 +593,33 @@ H5HL_remove_free(H5HL_t *heap, H5HL_free_t *fl)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(fl->prev)
+ if (fl->prev)
fl->prev->next = fl->next;
- if(fl->next)
+ if (fl->next)
fl->next->prev = fl->prev;
- if(!fl->prev)
+ if (!fl->prev)
heap->freelist = fl->next;
FUNC_LEAVE_NOAPI((H5HL_free_t *)H5FL_FREE(H5HL_free_t, fl))
} /* end H5HL_remove_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_dirty
+ * Function: H5HL_dirty
*
- * Purpose: Mark heap as dirty
+ * Purpose: Mark heap as dirty
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Oct 12 2008
+ * Programmer: Quincey Koziol
+ * Oct 12 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
H5HL_dirty(H5HL_t *heap)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -656,45 +628,43 @@ H5HL_dirty(H5HL_t *heap)
HDassert(heap->prfx);
/* Mark heap data block as dirty, if there is one */
- if(!heap->single_cache_obj) {
+ if (!heap->single_cache_obj) {
/* Sanity check */
HDassert(heap->dblk);
- if(H5AC_mark_entry_dirty(heap->dblk) < 0)
+ if (H5AC_mark_entry_dirty(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty")
} /* end if */
/* Mark heap prefix as dirty */
- if(H5AC_mark_entry_dirty(heap->prfx) < 0)
+ if (H5AC_mark_entry_dirty(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap prefix as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_dirty() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_insert
+ * Function: H5HL_insert
*
- * Purpose: Inserts a new item into the heap.
+ * Purpose: Inserts a new item into the heap.
*
- * Return: Success: Offset of new item within heap.
- * Failure: UFAIL
+ * Return: Success: Offset of new item within heap.
+ * Failure: UFAIL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 17 1997
+ * Programmer: Robb Matzke
+ * Jul 17 1997
*
*-------------------------------------------------------------------------
*/
size_t
H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *buf)
{
- H5HL_free_t *fl = NULL, *last_fl = NULL;
- size_t offset = 0;
- size_t need_size;
- hbool_t found;
- size_t ret_value; /* Return value */
+ H5HL_free_t *fl = NULL, *last_fl = NULL;
+ size_t offset = 0;
+ size_t need_size;
+ hbool_t found;
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(UFAIL)
@@ -710,7 +680,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(heap) < 0)
+ if (H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, UFAIL, "unable to mark heap as dirty")
/*
@@ -724,27 +694,28 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* Look for a free slot large enough for this object and which would
* leave zero or at least H5G_SIZEOF_FREE bytes left over.
*/
- for(fl = heap->freelist, found = FALSE; fl; fl = fl->next) {
- if(fl->size > need_size &&
- fl->size - need_size >= H5HL_SIZEOF_FREE(f)) {
- /* a big enough free block was found */
- offset = fl->offset;
- fl->offset += need_size;
- fl->size -= need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- found = TRUE;
- break;
- } else if(fl->size == need_size) {
- /* free block of exact size found */
- offset = fl->offset;
- fl = H5HL_remove_free(heap, fl);
- found = TRUE;
- break;
- } else if(!last_fl || last_fl->offset < fl->offset) {
- /* track free space that's closest to end of heap */
- last_fl = fl;
- }
+ for (fl = heap->freelist, found = FALSE; fl; fl = fl->next) {
+ if (fl->size > need_size && fl->size - need_size >= H5HL_SIZEOF_FREE(f)) {
+ /* a big enough free block was found */
+ offset = fl->offset;
+ fl->offset += need_size;
+ fl->size -= need_size;
+ HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ found = TRUE;
+ break;
+ }
+ else if (fl->size == need_size) {
+ /* free block of exact size found */
+ offset = fl->offset;
+ fl = H5HL_remove_free(heap, fl);
+ found = TRUE;
+ break;
+ }
+ else if (!last_fl || last_fl->offset < fl->offset) {
+ /* track free space that's closest to end of heap */
+ last_fl = fl;
+ }
} /* end for */
/*
@@ -753,15 +724,15 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* can extend that free chunk. Otherwise we'll have to make another
* free chunk. If the heap must expand, we double its size.
*/
- if(found == FALSE) {
- size_t need_more; /* How much more space we need */
- size_t new_dblk_size; /* Final size of space allocated for heap data block */
- size_t old_dblk_size; /* Previous size of space allocated for heap data block */
- htri_t was_extended; /* Whether the local heap's data segment on disk was extended */
+ if (found == FALSE) {
+ size_t need_more; /* How much more space we need */
+ size_t new_dblk_size; /* Final size of space allocated for heap data block */
+ size_t old_dblk_size; /* Previous size of space allocated for heap data block */
+ htri_t was_extended; /* Whether the local heap's data segment on disk was extended */
/* At least double the heap's size, making certain there's enough room
* for the new object */
- need_more = MAX(need_size, heap->dblk_size);
+ need_more = MAX(need_size, heap->dblk_size);
/* If there is no last free block or it's not at the end of the heap,
* and the amount of space to allocate is not big enough to include at
@@ -769,106 +740,105 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* space requested to just the amount of space needed. (Generally
* speaking, this only occurs when the heap is small -QAK)
*/
- if(!(last_fl && last_fl->offset + last_fl->size == heap->dblk_size)
- && (need_more < (need_size + H5HL_SIZEOF_FREE(f))))
+ if (!(last_fl && last_fl->offset + last_fl->size == heap->dblk_size) &&
+ (need_more < (need_size + H5HL_SIZEOF_FREE(f))))
need_more = need_size;
- new_dblk_size = heap->dblk_size + need_more;
- HDassert(heap->dblk_size < new_dblk_size);
+ new_dblk_size = heap->dblk_size + need_more;
+ HDassert(heap->dblk_size < new_dblk_size);
old_dblk_size = heap->dblk_size;
- H5_CHECK_OVERFLOW(heap->dblk_size, size_t, hsize_t);
- H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t);
+ H5_CHECK_OVERFLOW(heap->dblk_size, size_t, hsize_t);
+ H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t);
/* Extend current heap if possible */
- was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr, (hsize_t)(heap->dblk_size), (hsize_t)need_more);
- if(was_extended < 0)
+ was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr,
+ (hsize_t)(heap->dblk_size), (hsize_t)need_more);
+ if (was_extended < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, UFAIL, "error trying to extend heap")
/* Check if we extended the heap data block in file */
- if(was_extended == TRUE) {
+ if (was_extended == TRUE) {
/* Check for prefix & data block contiguous */
- if(heap->single_cache_obj) {
+ if (heap->single_cache_obj) {
/* Resize prefix+data block */
- if(H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
+ if (H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap prefix in cache")
} /* end if */
else {
/* Resize 'standalone' data block */
- if(H5AC_resize_entry(heap->dblk, (size_t)new_dblk_size) < 0)
+ if (H5AC_resize_entry(heap->dblk, (size_t)new_dblk_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap data block in cache")
} /* end else */
/* Note new size */
heap->dblk_size = new_dblk_size;
- } /* end if */
+ } /* end if */
else { /* ...if we can't, allocate a new chunk & release the old */
/* Reallocate data block in file */
- if(H5HL_dblk_realloc(f, dxpl_id, heap, new_dblk_size) < 0)
+ if (H5HL_dblk_realloc(f, dxpl_id, heap, new_dblk_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "reallocating data block failed")
- } /* end if */
+ } /* end if */
/* If the last free list in the heap is at the end of the heap, extend it */
- if(last_fl && last_fl->offset + last_fl->size == old_dblk_size) {
- /*
- * Increase the size of the last free block.
- */
- offset = last_fl->offset;
- last_fl->offset += need_size;
- last_fl->size += need_more - need_size;
- HDassert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
- HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
-
- if (last_fl->size < H5HL_SIZEOF_FREE(f)) {
+ if (last_fl && last_fl->offset + last_fl->size == old_dblk_size) {
+ /*
+ * Increase the size of the last free block.
+ */
+ offset = last_fl->offset;
+ last_fl->offset += need_size;
+ last_fl->size += need_more - need_size;
+ HDassert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
+ HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
+
+ if (last_fl->size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
- if (H5DEBUG(HL) && last_fl->size) {
- fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n",
- (unsigned long)(last_fl->size), __LINE__);
- }
+ if (H5DEBUG(HL) && last_fl->size) {
+ HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n",
+ (unsigned long)(last_fl->size), __LINE__);
+ }
#endif
- last_fl = H5HL_remove_free(heap, last_fl);
- }
- } /* end if */
+ last_fl = H5HL_remove_free(heap, last_fl);
+ }
+ } /* end if */
else {
- /*
- * Create a new free list element large enough that we can
- * take some space out of it right away.
- */
- offset = old_dblk_size;
- if(need_more - need_size >= H5HL_SIZEOF_FREE(f)) {
- if(NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, UFAIL, "memory allocation failed")
- fl->offset = old_dblk_size + need_size;
- fl->size = need_more - need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- fl->prev = NULL;
- fl->next = heap->freelist;
- if(heap->freelist)
+ /*
+ * Create a new free list element large enough that we can
+ * take some space out of it right away.
+ */
+ offset = old_dblk_size;
+ if (need_more - need_size >= H5HL_SIZEOF_FREE(f)) {
+ if (NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, UFAIL, "memory allocation failed")
+ fl->offset = old_dblk_size + need_size;
+ fl->size = need_more - need_size;
+ HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ fl->prev = NULL;
+ fl->next = heap->freelist;
+ if (heap->freelist)
heap->freelist->prev = fl;
- heap->freelist = fl;
+ heap->freelist = fl;
#ifdef H5HL_DEBUG
- } else if (H5DEBUG(HL) && need_more > need_size) {
- fprintf(H5DEBUG(HL),
- "H5HL_insert: lost %lu bytes at line %d\n",
- (unsigned long)(need_more - need_size), __LINE__);
+ }
+ else if (H5DEBUG(HL) && need_more > need_size) {
+ HDfprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
+ (unsigned long)(need_more - need_size), __LINE__);
#endif
- }
- } /* end else */
+ }
+ } /* end else */
#ifdef H5HL_DEBUG
- if (H5DEBUG(HL)) {
- fprintf(H5DEBUG(HL),
- "H5HL: resize mem buf from %lu to %lu bytes\n",
- (unsigned long)(old_dblk_size),
- (unsigned long)(old_dblk_size + need_more));
- }
+ if (H5DEBUG(HL)) {
+ HDfprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
+ (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
+ }
#endif
- if(NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, UFAIL, "memory allocation failed")
+ if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, UFAIL, "memory allocation failed")
- /* Clear new section so junk doesn't appear in the file */
+ /* Clear new section so junk doesn't appear in the file */
/* (Avoid clearing section which will be overwritten with newly inserted data) */
- HDmemset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
+ HDmemset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
} /* end if */
/* Copy the data into the heap */
@@ -881,36 +851,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5HL_insert() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_remove
+ * Function: H5HL_remove
*
- * Purpose: Removes an object or part of an object from the heap at
- * address ADDR of file F. The object (or part) to remove
- * begins at byte OFFSET from the beginning of the heap and
- * continues for SIZE bytes.
+ * Purpose: Removes an object or part of an object from the heap at
+ * address ADDR of file F. The object (or part) to remove
+ * begins at byte OFFSET from the beginning of the heap and
+ * continues for SIZE bytes.
*
- * Once part of an object is removed, one must not attempt
- * to access that part. Removing the beginning of an object
- * results in the object OFFSET increasing by the amount
- * truncated. Removing the end of an object results in
- * object truncation. Removing the middle of an object results
- * in two separate objects, one at the original offset and
- * one at the first offset past the removed portion.
+ * Once part of an object is removed, one must not attempt
+ * to access that part. Removing the beginning of an object
+ * results in the object OFFSET increasing by the amount
+ * truncated. Removing the end of an object results in
+ * object truncation. Removing the middle of an object results
+ * in two separate objects, one at the original offset and
+ * one at the first offset past the removed portion.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 16 1997
+ * Programmer: Robb Matzke
+ * Jul 16 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
{
- H5HL_free_t *fl = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_free_t *fl = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -931,7 +899,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(heap) < 0)
+ if (H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap as dirty")
/*
@@ -940,63 +908,60 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
* that all three chunks can be combined into one.
*/
fl = heap->freelist;
- while(fl) {
+ while (fl) {
H5HL_free_t *fl2 = NULL;
- if((offset + size) == fl->offset) {
- fl->offset = offset;
- fl->size += size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- fl2 = fl->next;
- while(fl2) {
- if((fl2->offset + fl2->size) == fl->offset) {
- fl->offset = fl2->offset;
- fl->size += fl2->size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- fl2 = H5HL_remove_free(heap, fl2);
- if(((fl->offset + fl->size) == heap->dblk_size) &&
- ((2 * fl->size) > heap->dblk_size)) {
- if(H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
+ if ((offset + size) == fl->offset) {
+ fl->offset = offset;
+ fl->size += size;
+ HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ fl2 = fl->next;
+ while (fl2) {
+ if ((fl2->offset + fl2->size) == fl->offset) {
+ fl->offset = fl2->offset;
+ fl->size += fl2->size;
+ HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ fl2 = H5HL_remove_free(heap, fl2);
+ if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
+ if (H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
}
- HGOTO_DONE(SUCCEED);
- }
- fl2 = fl2->next;
- }
- if(((fl->offset + fl->size) == heap->dblk_size) &&
- ((2 * fl->size) > heap->dblk_size)) {
- if(H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
+ HGOTO_DONE(SUCCEED);
+ }
+ fl2 = fl2->next;
}
- HGOTO_DONE(SUCCEED);
- } else if(fl->offset + fl->size == offset) {
- fl->size += size;
- fl2 = fl->next;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- while(fl2) {
- if(fl->offset + fl->size == fl2->offset) {
- fl->size += fl2->size;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
- fl2 = H5HL_remove_free(heap, fl2);
- if(((fl->offset + fl->size) == heap->dblk_size) &&
- ((2 * fl->size) > heap->dblk_size)) {
- if(H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
+ if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
+ if (H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
+ }
+ HGOTO_DONE(SUCCEED);
+ }
+ else if (fl->offset + fl->size == offset) {
+ fl->size += size;
+ fl2 = fl->next;
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ while (fl2) {
+ if (fl->offset + fl->size == fl2->offset) {
+ fl->size += fl2->size;
+ HDassert(fl->size == H5HL_ALIGN(fl->size));
+ fl2 = H5HL_remove_free(heap, fl2);
+ if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
+ if (H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
} /* end if */
- HGOTO_DONE(SUCCEED);
- } /* end if */
- fl2 = fl2->next;
- } /* end while */
- if(((fl->offset + fl->size) == heap->dblk_size) &&
- ((2 * fl->size) > heap->dblk_size)) {
- if(H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+ fl2 = fl2->next;
+ } /* end while */
+ if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
+ if (H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
} /* end if */
- HGOTO_DONE(SUCCEED);
- } /* end if */
- fl = fl->next;
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+ fl = fl->next;
} /* end while */
/*
@@ -1004,34 +969,32 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
* hold the free list data. If not, the freed chunk is forever
* lost.
*/
- if(size < H5HL_SIZEOF_FREE(f)) {
+ if (size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
- if(H5DEBUG(HL)) {
- fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n",
- (unsigned long) size);
- }
+ if (H5DEBUG(HL)) {
+ HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
+ }
#endif
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
} /* end if */
/*
* Add an entry to the free list.
*/
- if(NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ if (NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
fl->offset = offset;
- fl->size = size;
+ fl->size = size;
HDassert(fl->offset == H5HL_ALIGN(fl->offset));
HDassert(fl->size == H5HL_ALIGN(fl->size));
fl->prev = NULL;
fl->next = heap->freelist;
- if(heap->freelist)
+ if (heap->freelist)
heap->freelist->prev = fl;
heap->freelist = fl;
- if(((fl->offset + fl->size) == heap->dblk_size) &&
- ((2 * fl->size) > heap->dblk_size)) {
- if(H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
+ if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
+ if (H5HL_minimize_heap_space(f, dxpl_id, heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "heap size minimization failed")
} /* end if */
@@ -1039,29 +1002,27 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_remove() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_delete
+ * Function: H5HL_delete
*
- * Purpose: Deletes a local heap from disk, freeing disk space used.
+ * Purpose: Deletes a local heap from disk, freeing disk space used.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 22 2003
+ * Programmer: Quincey Koziol
+ * Mar 22 2003
*
*-------------------------------------------------------------------------
*/
herr_t
H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
{
- H5HL_t *heap; /* Local heap to delete */
- H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
- H5HL_prfx_t *prfx = NULL; /* Local heap prefix */
- H5HL_dblk_t *dblk = NULL; /* Local heap data block */
- unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * heap; /* Local heap to delete */
+ H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
+ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */
+ H5HL_dblk_t * dblk = NULL; /* Local heap data block */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1072,71 +1033,71 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
- prfx_udata.prfx_addr = addr;
+ prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
/* Protect the local heap prefix */
- if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_WRITE)))
+ if (NULL ==
+ (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix")
/* Get the pointer to the heap */
heap = prfx->heap;
/* Check if heap has separate data block */
- if(!heap->single_cache_obj) {
+ if (!heap->single_cache_obj) {
H5HL_cache_dblk_ud_t dblk_udata; /* User data for protecting local heap data block */
/* Construct the user data for protect callback */
- dblk_udata.heap = heap;
+ dblk_udata.heap = heap;
dblk_udata.loaded = FALSE;
/* Protect the local heap data block */
- if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, H5AC_WRITE)))
+ if (NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr,
+ &dblk_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap data block")
/* Pin the prefix, if the data block was loaded from file */
- if(dblk_udata.loaded) {
- if(H5AC_pin_protected_entry(prfx) < 0)
+ if (dblk_udata.loaded) {
+ if (H5AC_pin_protected_entry(prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin local heap prefix")
} /* end if */
- } /* end if */
+ } /* end if */
/* Set the flags for releasing the prefix and data block */
cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
done:
/* Release the data block from the cache, now deleted */
- if(dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, cache_flags) < 0)
+ if (dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap data block")
/* Release the prefix from the cache, now deleted */
- if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, cache_flags) < 0)
+ if (prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, cache_flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap prefix")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_delete() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_get_size
+ * Function: H5HL_get_size
*
- * Purpose: Retrieves the current size of a heap
+ * Purpose: Retrieves the current size of a heap
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Nov 7 2005
+ * Programmer: Quincey Koziol
+ * Nov 7 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
{
- H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
- H5HL_prfx_t *prfx = NULL; /* Local heap prefix */
- H5HL_t *heap; /* Heap data structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
+ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */
+ H5HL_t * heap; /* Heap data structure */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1148,11 +1109,12 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
- prfx_udata.prfx_addr = addr;
+ prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
/* Protect the local heap prefix */
- if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
+ if (NULL ==
+ (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix")
/* Get the pointer to the heap */
@@ -1162,20 +1124,19 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
*size = heap->dblk_size;
done:
- if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
+ if (prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap prefix")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_get_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_heapsize
*
* Purpose: Compute the size in bytes of the specified instance of
* H5HL_t via H5HL_size()
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Vailin Choi
* June 19 2007
@@ -1185,10 +1146,10 @@ done:
herr_t
H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size)
{
- H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
- H5HL_prfx_t *prfx = NULL; /* Local heap prefix */
- H5HL_t *heap; /* Heap data structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */
+ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */
+ H5HL_t * heap; /* Heap data structure */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1200,11 +1161,12 @@ H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size)
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
- prfx_udata.prfx_addr = addr;
+ prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
/* Protect the local heap prefix */
- if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
+ if (NULL ==
+ (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix")
/* Get the pointer to the heap */
@@ -1214,9 +1176,8 @@ H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size)
*heap_size += (hsize_t)(heap->prfx_size + heap->dblk_size);
done:
- if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
+ if (prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap prefix")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_heapsize() */
-
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 944ac90..b1a08eb 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5HLcache.c
- * Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5HLcache.c
+ * Feb 5 2008
+ * Quincey Koziol
*
- * Purpose: Implement local heap metadata cache methods.
+ * Purpose: Implement local heap metadata cache methods.
*
*-------------------------------------------------------------------------
*/
@@ -26,61 +26,56 @@
/* Module Setup */
/****************/
-#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
-
+#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLpkg.h" /* Local Heaps */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLpkg.h" /* Local Heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
-#define H5HL_VERSION 0 /* Local heap collection version */
+#define H5HL_VERSION 0 /* Local heap collection version */
-/* Set the local heap size to speculatively read in */
-/* (needs to be more than the local heap prefix size to work at all and
+/* Set the local heap size to speculatively read in
+ * (needs to be more than the local heap prefix size to work at all and
* should be larger than the default local heap size to save the
- * extra I/O operations) */
+ * extra I/O operations)
+ */
#define H5HL_SPEC_READ_SIZE 512
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache callbacks */
-static void *H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr,
- void *thing, unsigned *flags_ptr);
+static void * H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+static herr_t H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing,
+ unsigned *flags_ptr);
static herr_t H5HL_prefix_dest(H5F_t *f, void *thing);
static herr_t H5HL_prefix_clear(H5F_t *f, void *thing, hbool_t destroy);
static herr_t H5HL_prefix_size(const H5F_t *f, const void *thing, size_t *size_ptr);
-static void *H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr,
- void *thing, unsigned *flags_ptr);
+static void * H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+static herr_t H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing,
+ unsigned *flags_ptr);
static herr_t H5HL_datablock_dest(H5F_t *f, void *thing);
static herr_t H5HL_datablock_clear(H5F_t *f, void *thing, hbool_t destroy);
static herr_t H5HL_datablock_size(const H5F_t *f, const void *thing, size_t *size_ptr);
-
/*********************/
/* Package Variables */
/*********************/
@@ -104,18 +99,14 @@ const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{
H5HL_datablock_size,
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5HL_fl_deserialize
*
@@ -124,7 +115,6 @@ const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -132,9 +122,9 @@ const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{
static herr_t
H5HL_fl_deserialize(H5HL_t *heap)
{
- H5HL_free_t *fl = NULL, *tail = NULL; /* Heap free block nodes */
- hsize_t free_block; /* Offset of free block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_free_t *fl = NULL, *tail = NULL; /* Heap free block nodes */
+ hsize_t free_block; /* Offset of free block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -144,67 +134,64 @@ H5HL_fl_deserialize(H5HL_t *heap)
/* Build free list */
free_block = heap->free_block;
- while(H5HL_FREE_NULL != free_block) {
- const uint8_t *p; /* Pointer into image buffer */
+ while (H5HL_FREE_NULL != free_block) {
+ const uint8_t *p; /* Pointer into image buffer */
/* Sanity check */
- if(free_block >= heap->dblk_size)
+ if (free_block >= heap->dblk_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list")
/* Allocate & initialize free list node */
- if(NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
+ if (NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
fl->offset = (size_t)free_block;
- fl->prev = tail;
- fl->next = NULL;
+ fl->prev = tail;
+ fl->next = NULL;
/* Decode offset of next free block */
p = heap->dblk_image + free_block;
H5F_DECODE_LENGTH_LEN(p, free_block, heap->sizeof_size);
- if(free_block == 0)
+ if (free_block == 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "free block size is zero?")
/* Decode length of this free block */
H5F_DECODE_LENGTH_LEN(p, fl->size, heap->sizeof_size);
- if((fl->offset + fl->size) > heap->dblk_size)
+ if ((fl->offset + fl->size) > heap->dblk_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list")
/* Append node onto list */
- if(tail)
+ if (tail)
tail->next = fl;
else
heap->freelist = fl;
tail = fl;
- fl = NULL;
+ fl = NULL;
} /* end while */
done:
- if(ret_value < 0)
- if(fl)
+ if (ret_value < 0)
+ if (fl)
fl = H5FL_FREE(H5HL_free_t, fl);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_fl_deserialize() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_fl_serialize
+ * Function: H5HL_fl_serialize
*
- * Purpose: Serialize the free list for a heap data block
+ * Purpose: Serialize the free list for a heap data block
*
- * Return: Success: SUCCESS
- * Failure: FAIL
+ * Return: Nothing (void)
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Oct 12 2008
+ * Programmer: Quincey Koziol
+ * Oct 12 2008
*
*-------------------------------------------------------------------------
*/
static void
H5HL_fl_serialize(const H5HL_t *heap)
{
- H5HL_free_t *fl; /* Pointer to heap free list node */
+ H5HL_free_t *fl; /* Pointer to heap free list node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -212,13 +199,13 @@ H5HL_fl_serialize(const H5HL_t *heap)
HDassert(heap);
/* Serialize the free list into the heap data's image */
- for(fl = heap->freelist; fl; fl = fl->next) {
- uint8_t *p; /* Pointer into raw data buffer */
+ for (fl = heap->freelist; fl; fl = fl->next) {
+ uint8_t *p; /* Pointer into raw data buffer */
HDassert(fl->offset == H5HL_ALIGN(fl->offset));
p = heap->dblk_image + fl->offset;
- if(fl->next)
+ if (fl->next)
H5F_ENCODE_LENGTH_LEN(p, fl->next->offset, heap->sizeof_size)
else
H5F_ENCODE_LENGTH_LEN(p, H5HL_FREE_NULL, heap->sizeof_size)
@@ -229,7 +216,6 @@ H5HL_fl_serialize(const H5HL_t *heap)
FUNC_LEAVE_NOAPI_VOID
} /* end H5HL_fl_serialize() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prefix_load
*
@@ -239,7 +225,6 @@ H5HL_fl_serialize(const H5HL_t *heap)
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
@@ -247,15 +232,15 @@ H5HL_fl_serialize(const H5HL_t *heap)
static void *
H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5HL_t *heap = NULL; /* Local heap */
- H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */
- H5HL_cache_prfx_ud_t *udata = (H5HL_cache_prfx_ud_t *)_udata; /* User data for callback */
- uint8_t buf[H5HL_SPEC_READ_SIZE]; /* Buffer for decoding */
- size_t spec_read_size; /* Size of buffer to speculatively read in */
- const uint8_t *p; /* Pointer into decoding buffer */
- haddr_t eoa; /* Relative end of file address */
- hsize_t min; /* temp min value to avoid macro nesting */
- H5HL_prfx_t *ret_value; /* Return value */
+ H5HL_t * heap = NULL; /* Local heap */
+ H5HL_prfx_t * prfx = NULL; /* Heap prefix deserialized */
+ H5HL_cache_prfx_ud_t *udata = (H5HL_cache_prfx_ud_t *)_udata; /* User data for callback */
+ uint8_t buf[H5HL_SPEC_READ_SIZE]; /* Buffer for decoding */
+ size_t spec_read_size; /* Size of buffer to speculatively read in */
+ const uint8_t * p; /* Pointer into decoding buffer */
+ haddr_t eoa; /* Relative end of file address */
+ hsize_t min; /* temp min value to avoid macro nesting */
+ H5HL_prfx_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -269,7 +254,7 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->sizeof_prfx <= sizeof(buf));
/* Make certain we don't speculatively read off the end of the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_LHEAP)))
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_LHEAP)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to determine file size")
/* Compute the size of the speculative local heap prefix buffer */
@@ -278,29 +263,29 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(spec_read_size >= udata->sizeof_prfx);
/* Attempt to speculatively read both local heap prefix and heap data */
- if(H5F_block_read(f, H5FD_MEM_LHEAP, addr, spec_read_size, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap prefix")
+ if (H5F_block_read(f, H5FD_MEM_LHEAP, addr, spec_read_size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap prefix")
p = buf;
/* Check magic number */
- if(HDmemcmp(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad local heap signature")
+ if (HDmemcmp(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad local heap signature")
p += H5_SIZEOF_MAGIC;
/* Version */
- if(H5HL_VERSION != *p++)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong version number in local heap")
+ if (H5HL_VERSION != *p++)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong version number in local heap")
/* Reserved */
p += 3;
/* Allocate space in memory for the heap */
- if(NULL == (heap = H5HL_new(udata->sizeof_size, udata->sizeof_addr, udata->sizeof_prfx)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate local heap structure")
+ if (NULL == (heap = H5HL_new(udata->sizeof_size, udata->sizeof_addr, udata->sizeof_prfx)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate local heap structure")
/* Allocate the heap prefix */
- if(NULL == (prfx = H5HL_prfx_new(heap)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate local heap prefix")
+ if (NULL == (prfx = H5HL_prfx_new(heap)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate local heap prefix")
/* Store the prefix's address & length */
heap->prfx_addr = udata->prfx_addr;
@@ -311,25 +296,25 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Free list head */
H5F_DECODE_LENGTH_LEN(p, heap->free_block, udata->sizeof_size);
- if(heap->free_block != H5HL_FREE_NULL && heap->free_block >= heap->dblk_size)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap free list")
+ if (heap->free_block != H5HL_FREE_NULL && heap->free_block >= heap->dblk_size)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap free list")
/* Heap data address */
H5F_addr_decode_len(udata->sizeof_addr, &p, &(heap->dblk_addr));
/* Check if heap block exists */
- if(heap->dblk_size) {
+ if (heap->dblk_size) {
/* Check if heap data block is contiguous with header */
- if(H5F_addr_eq((heap->prfx_addr + heap->prfx_size), heap->dblk_addr)) {
+ if (H5F_addr_eq((heap->prfx_addr + heap->prfx_size), heap->dblk_addr)) {
/* Note that the heap should be a single object in the cache */
heap->single_cache_obj = TRUE;
/* Allocate space for the heap data image */
- if(NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size)))
+ if (NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Check if the current buffer from the speculative read already has the heap data */
- if(spec_read_size >= (heap->prfx_size + heap->dblk_size)) {
+ if (spec_read_size >= (heap->prfx_size + heap->dblk_size)) {
/* Set p to the start of the data block. This is necessary
* because there may be a gap between the used portion of the
* prefix and the data block due to alignment constraints. */
@@ -340,12 +325,13 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end if */
else {
/* Read the local heap data block directly into buffer */
- if(H5F_block_read(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id, heap->dblk_image) < 0)
+ if (H5F_block_read(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id,
+ heap->dblk_image) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read heap data")
} /* end else */
/* Build free list */
- if(H5HL_fl_deserialize(heap) < 0)
+ if (H5HL_fl_deserialize(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list")
} /* end if */
else
@@ -358,21 +344,20 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release the [possibly partially initialized] local heap on errors */
- if(!ret_value) {
- if(prfx) {
- if(H5HL_prfx_dest(prfx) < 0)
+ if (!ret_value) {
+ if (prfx) {
+ if (H5HL_prfx_dest(prfx) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap prefix")
} /* end if */
else {
- if(heap && H5HL_dest(heap) < 0)
+ if (heap && H5HL_dest(heap) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap")
} /* end else */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prefix_load() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prefix_flush
*
@@ -382,19 +367,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
- void *thing, unsigned H5_ATTR_UNUSED *flags_ptr)
+H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, void *thing,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to flush */
- H5WB_t *wb = NULL; /* Wrapped buffer for heap data */
- uint8_t heap_buf[H5HL_SPEC_READ_SIZE]; /* Buffer for heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5WB_t * wb = NULL; /* Wrapped buffer for heap data */
+ uint8_t heap_buf[H5HL_SPEC_READ_SIZE]; /* Buffer for heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -403,23 +387,23 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert(H5F_addr_defined(addr));
HDassert(prfx);
- if(prfx->cache_info.is_dirty) {
- H5HL_t *heap = prfx->heap; /* Pointer to the local heap */
- uint8_t *buf; /* Pointer to heap buffer */
- size_t buf_size; /* Size of buffer for encoding & writing heap info */
- uint8_t *p; /* Pointer into raw data buffer */
+ if (prfx->cache_info.is_dirty) {
+ H5HL_t * heap = prfx->heap; /* Pointer to the local heap */
+ uint8_t *buf; /* Pointer to heap buffer */
+ size_t buf_size; /* Size of buffer for encoding & writing heap info */
+ uint8_t *p; /* Pointer into raw data buffer */
/* Wrap the local buffer for serialized heap info */
- if(NULL == (wb = H5WB_wrap(heap_buf, sizeof(heap_buf))))
+ if (NULL == (wb = H5WB_wrap(heap_buf, sizeof(heap_buf))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer")
/* Compute the size of the buffer to encode & write */
buf_size = heap->prfx_size;
- if(heap->single_cache_obj)
+ if (heap->single_cache_obj)
buf_size += heap->dblk_size;
/* Get a pointer to a buffer that's large enough for serialized heap */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Update the free block value from the free list */
@@ -430,17 +414,17 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDmemcpy(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
p += H5_SIZEOF_MAGIC;
*p++ = H5HL_VERSION;
- *p++ = 0; /*reserved*/
- *p++ = 0; /*reserved*/
- *p++ = 0; /*reserved*/
+ *p++ = 0; /*reserved*/
+ *p++ = 0; /*reserved*/
+ *p++ = 0; /*reserved*/
H5F_ENCODE_LENGTH_LEN(p, heap->dblk_size, heap->sizeof_size);
H5F_ENCODE_LENGTH_LEN(p, heap->free_block, heap->sizeof_size);
H5F_addr_encode_len(heap->sizeof_addr, &p, heap->dblk_addr);
/* Check if the local heap is a single object in cache */
- if(heap->single_cache_obj) {
- if((size_t)(p - buf) < heap->prfx_size) {
- size_t gap; /* Size of gap between prefix and data block */
+ if (heap->single_cache_obj) {
+ if ((size_t)(p - buf) < heap->prfx_size) {
+ size_t gap; /* Size of gap between prefix and data block */
/* Set p to the start of the data block. This is necessary because
* there may be a gap between the used portion of the prefix and the
@@ -458,26 +442,25 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
} /* end if */
/* Write the prefix [and possibly the data block] to the file */
- if(H5F_block_write(f, H5FD_MEM_LHEAP, addr, buf_size, dxpl_id, buf) < 0)
+ if (H5F_block_write(f, H5FD_MEM_LHEAP, addr, buf_size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap header and data to file")
- prfx->cache_info.is_dirty = FALSE;
+ prfx->cache_info.is_dirty = FALSE;
} /* end if */
/* Should we destroy the memory version? */
- if(destroy)
- if(H5HL_prefix_dest(f, prfx) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix")
+ if (destroy)
+ if (H5HL_prefix_dest(f, prfx) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix")
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prefix_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prefix_dest
*
@@ -486,7 +469,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -494,8 +476,8 @@ done:
static herr_t
H5HL_prefix_dest(H5F_t *f, void *thing)
{
- H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to destroy */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to destroy */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -511,29 +493,28 @@ H5HL_prefix_dest(H5F_t *f, void *thing)
HDassert(!prfx->cache_info.free_file_space_on_destroy || H5F_addr_defined(prfx->cache_info.addr));
/* Check for freeing file space for local heap prefix */
- if(prfx->cache_info.free_file_space_on_destroy) {
- hsize_t free_size; /* Size of region to free in file */
+ if (prfx->cache_info.free_file_space_on_destroy) {
+ hsize_t free_size; /* Size of region to free in file */
/* Compute size to free for later */
free_size = prfx->heap->prfx_size;
- if(prfx->heap->single_cache_obj)
+ if (prfx->heap->single_cache_obj)
free_size += prfx->heap->dblk_size;
/* Free the local heap prefix [and possible the data block] on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, prfx->cache_info.addr, free_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, prfx->cache_info.addr, free_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap prefix")
} /* end if */
/* Destroy local heap prefix */
- if(H5HL_prfx_dest(prfx) < 0)
+ if (H5HL_prfx_dest(prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap prefix")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prefix_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prefix_clear
*
@@ -542,7 +523,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 20 2003
*
*-------------------------------------------------------------------------
@@ -550,26 +530,25 @@ done:
static herr_t
H5HL_prefix_clear(H5F_t H5_ATTR_UNUSED *f, void *thing, hbool_t destroy)
{
- H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* The local heap prefix to operate on */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* The local heap prefix to operate on */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- /* check arguments */
+ /* Check arguments */
HDassert(prfx);
/* Mark heap prefix as clean */
prfx->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HL_prefix_dest(f, prfx) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix")
+ if (destroy)
+ if (H5HL_prefix_dest(f, prfx) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prefix_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prefix_size
*
@@ -587,7 +566,7 @@ done:
static herr_t
H5HL_prefix_size(const H5F_t H5_ATTR_UNUSED *f, const void *thing, size_t *size_ptr)
{
- const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)thing; /* Pointer to local heap prefix to query */
+ const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)thing; /* Pointer to local heap prefix to query */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -600,13 +579,12 @@ H5HL_prefix_size(const H5F_t H5_ATTR_UNUSED *f, const void *thing, size_t *size_
*size_ptr = prfx->heap->prfx_size;
/* If the heap is stored as a single object, add in the data block size also */
- if(prfx->heap->single_cache_obj)
+ if (prfx->heap->single_cache_obj)
*size_ptr += prfx->heap->dblk_size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HL_prefix_size() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_datablock_load
*
@@ -616,7 +594,6 @@ H5HL_prefix_size(const H5F_t H5_ATTR_UNUSED *f, const void *thing, size_t *size_
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 5 2010
*
*-------------------------------------------------------------------------
@@ -624,9 +601,9 @@ H5HL_prefix_size(const H5F_t H5_ATTR_UNUSED *f, const void *thing, size_t *size_
static void *
H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5HL_dblk_t *dblk = NULL; /* Local heap data block deserialized */
- H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */
- H5HL_dblk_t *ret_value; /* Return value */
+ H5HL_dblk_t * dblk = NULL; /* Local heap data block deserialized */
+ H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */
+ H5HL_dblk_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -639,21 +616,22 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(NULL == udata->heap->dblk);
/* Allocate space in memory for the heap data block */
- if(NULL == (dblk = H5HL_dblk_new(udata->heap)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
+ if (NULL == (dblk = H5HL_dblk_new(udata->heap)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Check for heap still retaining image */
- if(NULL == udata->heap->dblk_image) {
+ if (NULL == udata->heap->dblk_image) {
/* Allocate space for the heap data image */
- if(NULL == (udata->heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, udata->heap->dblk_size)))
+ if (NULL == (udata->heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, udata->heap->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate data block image buffer")
/* Read local heap data block */
- if(H5F_block_read(f, H5FD_MEM_LHEAP, udata->heap->dblk_addr, udata->heap->dblk_size, dxpl_id, udata->heap->dblk_image) < 0)
+ if (H5F_block_read(f, H5FD_MEM_LHEAP, udata->heap->dblk_addr, udata->heap->dblk_size, dxpl_id,
+ udata->heap->dblk_image) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap data block")
/* Build free list */
- if(H5HL_fl_deserialize(udata->heap) < 0)
+ if (H5HL_fl_deserialize(udata->heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list")
} /* end if */
@@ -665,34 +643,33 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release the [possibly partially initialized] local heap on errors */
- if(!ret_value && dblk)
- if(H5HL_dblk_dest(dblk) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block")
+ if (!ret_value && dblk)
+ if (H5HL_dblk_dest(dblk) < 0)
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_datablock_load() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_datablock_flush
*
* Purpose: Flushes a heap's data block from memory to disk if it's dirty.
* Optionally deletes the heap data block from memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
- void *_thing, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, void *_thing,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
- H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -703,8 +680,8 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDassert(dblk->heap);
HDassert(!dblk->heap->single_cache_obj);
- if(dblk->cache_info.is_dirty) {
- H5HL_t *heap = dblk->heap; /* Pointer to the local heap */
+ if (dblk->cache_info.is_dirty) {
+ H5HL_t *heap = dblk->heap; /* Pointer to the local heap */
/* Update the free block value from the free list */
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
@@ -713,31 +690,31 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
H5HL_fl_serialize(heap);
/* Write the data block to the file */
- if(H5F_block_write(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id, heap->dblk_image) < 0)
+ if (H5F_block_write(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id, heap->dblk_image) <
+ 0)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap data block to file")
- dblk->cache_info.is_dirty = FALSE;
+ dblk->cache_info.is_dirty = FALSE;
} /* end if */
/* Should we destroy the memory version? */
- if(destroy)
- if(H5HL_datablock_dest(f, dblk) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
+ if (destroy)
+ if (H5HL_datablock_dest(f, dblk) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_datablock_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_datablock_dest
*
* Purpose: Destroys a local heap data block in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -745,8 +722,8 @@ done:
static herr_t
H5HL_datablock_dest(H5F_t *f, void *_thing)
{
- H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -763,31 +740,31 @@ H5HL_datablock_dest(H5F_t *f, void *_thing)
HDassert(!dblk->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblk->cache_info.addr));
/* Check for freeing file space for local heap data block */
- if(dblk->cache_info.free_file_space_on_destroy) {
+ if (dblk->cache_info.free_file_space_on_destroy) {
/* Free the local heap data block on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, dblk->cache_info.addr, (hsize_t)dblk->heap->dblk_size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, dblk->cache_info.addr,
+ (hsize_t)dblk->heap->dblk_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap data block")
} /* end if */
/* Destroy local heap data block */
- if(H5HL_dblk_dest(dblk) < 0)
+ if (H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap data block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_datablock_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_datablock_clear
*
* Purpose: Mark a local heap data block in memory as non-dirty.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 20 2003
*
*-------------------------------------------------------------------------
@@ -795,8 +772,8 @@ done:
static herr_t
H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
{
- H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -806,15 +783,14 @@ H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
/* Mark local heap data block as clean */
dblk->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5HL_datablock_dest(f, dblk) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
+ if (destroy)
+ if (H5HL_datablock_dest(f, dblk) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_datablock_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_datablock_size
*
@@ -846,4 +822,3 @@ H5HL_datablock_size(const H5F_t H5_ATTR_UNUSED *f, const void *_thing, size_t *s
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HL_datablock_size() */
-
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 55f695d..d42ce60 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -6,57 +6,45 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
- * Purpose: Local Heap object debugging functions.
+ * Purpose: Local Heap object debugging functions.
*/
-#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
+#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLpkg.h" /* Local heaps */
+#include "H5Iprivate.h" /* ID Functions */
+#include "H5MMprivate.h" /* Memory management */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLpkg.h" /* Local heaps */
-#include "H5Iprivate.h" /* ID Functions */
-#include "H5MMprivate.h" /* Memory management */
-
-
/*-------------------------------------------------------------------------
- * Function: H5HL_debug
- *
- * Purpose: Prints debugging information about a heap.
+ * Function: H5HL_debug
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Prints debugging information about a heap.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 1 1997
+ * Return: SUCCEED/FAIL
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * John Mainzer, 6/17/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
+ * Programmer: Robb Matzke
+ * Aug 1 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth)
+H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5HL_t *h = NULL;
- int free_block;
- H5HL_free_t *freelist;
- uint8_t *marker = NULL;
- size_t amount_free = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HL_t * h = NULL;
+ int free_block;
+ H5HL_free_t *freelist;
+ uint8_t * marker = NULL;
+ size_t amount_free = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -67,68 +55,58 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- if(NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC_READ)))
+ if (NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap")
HDfprintf(stream, "%*sLocal Heap...\n", indent, "");
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Header size (in bytes):",
- (unsigned long)h->prfx_size);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of heap data:",
- h->dblk_addr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Data bytes allocated for heap:",
- h->dblk_size);
+ "Header size (in bytes):", (unsigned long)h->prfx_size);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
- /*
- * Traverse the free list and check that all free blocks fall within
+ /* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
- * the heap. */
- if(NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ * the heap.
+ */
+ if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
- for(free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
+ for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9),
- temp_str,
- freelist->offset, freelist->size);
- if((freelist->offset + freelist->size) > h->dblk_size)
- HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
- else {
- int overlap = 0;
+ HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
+ freelist->offset, freelist->size);
+ if ((freelist->offset + freelist->size) > h->dblk_size)
+ HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
+ else {
+ int overlap = 0;
size_t i;
- for(i = 0; i < freelist->size; i++) {
- if(marker[freelist->offset + i])
- overlap++;
- marker[freelist->offset + i] = 1;
- } /* end for */
- if(overlap)
- HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
- else
- amount_free += freelist->size;
- } /* end for */
- } /* end for */
-
- if(h->dblk_size)
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
- "Percent of heap used:",
- ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
-
- /*
- * Print the data in a VMS-style octal dump.
- */
+ for (i = 0; i < freelist->size; i++) {
+ if (marker[freelist->offset + i])
+ overlap++;
+ marker[freelist->offset + i] = 1;
+ } /* end for */
+ if (overlap)
+ HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ else
+ amount_free += freelist->size;
+ } /* end else */
+ } /* end for */
+
+ if (h->dblk_size)
+ HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
+ ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
+
+ /* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
done:
- if(h && H5HL_unprotect(h) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ if (h && H5HL_unprotect(h) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
H5MM_xfree(marker);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_debug() */
-
diff --git a/src/H5HLint.c b/src/H5HLint.c
index f9f34e0..6e21b96 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5HLint.c
- * Oct 12 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5HLint.c
+ * Oct 12 2008
+ * Quincey Koziol
*
- * Purpose: Local heap internal routines.
+ * Purpose: Local heap internal routines.
*
*-------------------------------------------------------------------------
*/
@@ -26,47 +26,39 @@
/* Module Setup */
/****************/
-#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
-
+#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLpkg.h" /* Local Heaps */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLpkg.h" /* Local Heaps */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -80,27 +72,24 @@ H5FL_DEFINE_STATIC(H5HL_dblk_t);
/* Declare a free list to manage the H5HL_prfx_t struct */
H5FL_DEFINE_STATIC(H5HL_prfx_t);
-
-
/*-------------------------------------------------------------------------
- * Function: H5HL_new
+ * Function: H5HL_new
*
- * Purpose: Create a new local heap object
+ * Purpose: Create a new local heap object
*
- * Return: Success: non-NULL pointer to new local heap
- * Failure: NULL
+ * Return: Success: non-NULL pointer to new local heap
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jan 5 2010
+ * Programmer: Quincey Koziol
+ * Jan 5 2010
*
*-------------------------------------------------------------------------
*/
H5HL_t *
H5HL_new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size)
{
- H5HL_t *heap = NULL; /* New local heap */
- H5HL_t *ret_value; /* Return value */
+ H5HL_t *heap = NULL; /* New local heap */
+ H5HL_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -110,13 +99,13 @@ H5HL_new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size)
HDassert(prfx_size > 0);
/* Allocate new local heap structure */
- if(NULL == (heap = H5FL_CALLOC(H5HL_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
+ if (NULL == (heap = H5FL_CALLOC(H5HL_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Initialize non-zero fields */
heap->sizeof_size = sizeof_size;
heap->sizeof_addr = sizeof_addr;
- heap->prfx_size = prfx_size;
+ heap->prfx_size = prfx_size;
/* Set the return value */
ret_value = heap;
@@ -125,18 +114,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_inc_rc
*
- * Purpose: Increment ref. count on heap
+ * Purpose: Increment ref. count on heap
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Oct 12 2008
+ * Programmer: Quincey Koziol
+ * Oct 12 2008
*
*-------------------------------------------------------------------------
*/
@@ -154,18 +140,15 @@ H5HL_inc_rc(H5HL_t *heap)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HL_inc_rc() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_dec_rc
*
- * Purpose: Decrement ref. count on heap
+ * Purpose: Decrement ref. count on heap
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Oct 12 2008
+ * Programmer: Quincey Koziol
+ * Oct 12 2008
*
*-------------------------------------------------------------------------
*/
@@ -181,23 +164,21 @@ H5HL_dec_rc(H5HL_t *heap)
heap->rc--;
/* Check if we should destroy the heap */
- if(heap->rc == 0)
+ if (heap->rc == 0)
H5HL_dest(heap);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HL_dec_rc() */
-
/*-------------------------------------------------------------------------
- * Function: H5HL_dest
+ * Function: H5HL_dest
*
- * Purpose: Destroys a heap in memory.
+ * Purpose: Destroys a heap in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 15 2003
+ * Programmer: Quincey Koziol
+ * Jan 15 2003
*
*-------------------------------------------------------------------------
*/
@@ -215,21 +196,20 @@ H5HL_dest(H5HL_t *heap)
HDassert(heap->prfx == NULL);
HDassert(heap->dblk == NULL);
- if(heap->dblk_image)
+ if (heap->dblk_image)
heap->dblk_image = H5FL_BLK_FREE(lheap_chunk, heap->dblk_image);
- while(heap->freelist) {
- H5HL_free_t *fl;
+ while (heap->freelist) {
+ H5HL_free_t *fl;
- fl = heap->freelist;
+ fl = heap->freelist;
heap->freelist = fl->next;
- fl = H5FL_FREE(H5HL_free_t, fl);
+ fl = H5FL_FREE(H5HL_free_t, fl);
} /* end while */
heap = H5FL_FREE(H5HL_t, heap);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HL_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prfx_new
*
@@ -239,7 +219,6 @@ H5HL_dest(H5HL_t *heap)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -247,8 +226,8 @@ H5HL_dest(H5HL_t *heap)
H5HL_prfx_t *
H5HL_prfx_new(H5HL_t *heap)
{
- H5HL_prfx_t *prfx = NULL; /* New local heap prefix */
- H5HL_prfx_t *ret_value; /* Return value */
+ H5HL_prfx_t *prfx = NULL; /* New local heap prefix */
+ H5HL_prfx_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -256,12 +235,12 @@ H5HL_prfx_new(H5HL_t *heap)
HDassert(heap);
/* Allocate new local heap prefix */
- if(NULL == (prfx = H5FL_CALLOC(H5HL_prfx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
+ if (NULL == (prfx = H5FL_CALLOC(H5HL_prfx_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Increment ref. count on heap data structure */
- if(H5HL_inc_rc(heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count")
+ if (H5HL_inc_rc(heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count")
/* Link the heap & the prefix */
prfx->heap = heap;
@@ -274,7 +253,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prfx_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_prfx_dest
*
@@ -284,7 +262,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -292,7 +269,7 @@ done:
herr_t
H5HL_prfx_dest(H5HL_prfx_t *prfx)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -300,12 +277,12 @@ H5HL_prfx_dest(H5HL_prfx_t *prfx)
HDassert(prfx);
/* Check if prefix was initialized */
- if(prfx->heap) {
+ if (prfx->heap) {
/* Unlink prefix from heap */
prfx->heap->prfx = NULL;
/* Decrement ref. count on heap data structure */
- if(H5HL_dec_rc(prfx->heap) < 0)
+ if (H5HL_dec_rc(prfx->heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count")
/* Unlink heap from prefix */
@@ -319,7 +296,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_prfx_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_dblk_new
*
@@ -329,7 +305,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -337,8 +312,8 @@ done:
H5HL_dblk_t *
H5HL_dblk_new(H5HL_t *heap)
{
- H5HL_dblk_t *dblk = NULL; /* New local heap data block */
- H5HL_dblk_t *ret_value; /* Return value */
+ H5HL_dblk_t *dblk = NULL; /* New local heap data block */
+ H5HL_dblk_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -346,12 +321,12 @@ H5HL_dblk_new(H5HL_t *heap)
HDassert(heap);
/* Allocate new local heap data block */
- if(NULL == (dblk = H5FL_CALLOC(H5HL_dblk_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
+ if (NULL == (dblk = H5FL_CALLOC(H5HL_dblk_t)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Increment ref. count on heap data structure */
- if(H5HL_inc_rc(heap) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count")
+ if (H5HL_inc_rc(heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count")
/* Link the heap & the data block */
dblk->heap = heap;
@@ -364,7 +339,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_dblk_new() */
-
/*-------------------------------------------------------------------------
* Function: H5HL_dblk_dest
*
@@ -374,7 +348,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 12 2008
*
*-------------------------------------------------------------------------
@@ -382,7 +355,7 @@ done:
herr_t
H5HL_dblk_dest(H5HL_dblk_t *dblk)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -390,16 +363,16 @@ H5HL_dblk_dest(H5HL_dblk_t *dblk)
HDassert(dblk);
/* Check if data block was initialized */
- if(dblk->heap) {
+ if (dblk->heap) {
/* Unlink data block from heap */
dblk->heap->dblk = NULL;
/* Unpin the local heap prefix */
- if(H5AC_unpin_entry(dblk->heap->prfx) < 0)
+ if (H5AC_unpin_entry(dblk->heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "can't unpin local heap prefix")
/* Decrement ref. count on heap data structure */
- if(H5HL_dec_rc(dblk->heap) < 0)
+ if (H5HL_dec_rc(dblk->heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count")
/* Unlink heap from data block */
@@ -412,4 +385,3 @@ H5HL_dblk_dest(H5HL_dblk_t *dblk)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL_dblk_dest() */
-
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index e3b49d9..bfbebab24 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: This file contains declarations which are visible
@@ -30,8 +30,7 @@
#include "H5HLprivate.h"
/* Other private headers needed by this file */
-#include "H5FLprivate.h" /* Free lists */
-
+#include "H5FLprivate.h" /* Free lists */
/*****************************/
/* Package Private Variables */
@@ -49,32 +48,30 @@ H5FL_EXTERN(H5HL_free_t);
/* Declare extern the PQ free list to manage the heap chunk information */
H5FL_BLK_EXTERN(lheap_chunk);
-
/**************************/
/* Package Private Macros */
/**************************/
-#define H5HL_SIZEOF_HDR(F) \
- H5HL_ALIGN(H5_SIZEOF_MAGIC + /*heap signature */ \
- 1 + /*version */ \
- 3 + /*reserved */ \
- H5F_SIZEOF_SIZE(F) + /*data size */ \
- H5F_SIZEOF_SIZE(F) + /*free list head */ \
- H5F_SIZEOF_ADDR(F)) /*data address */
+#define H5HL_SIZEOF_HDR(F) \
+ H5HL_ALIGN(H5_SIZEOF_MAGIC + /* heap signature */ \
+ 1 + /* version */ \
+ 3 + /* reserved */ \
+ H5F_SIZEOF_SIZE(F) + /* data size */ \
+ H5F_SIZEOF_SIZE(F) + /* free list head */ \
+ H5F_SIZEOF_ADDR(F)) /* data address */
/* Value indicating end of free list on disk */
-#define H5HL_FREE_NULL 1
-
+#define H5HL_FREE_NULL 1
/****************************/
/* Package Private Typedefs */
/****************************/
typedef struct H5HL_free_t {
- size_t offset; /*offset of free block */
- size_t size; /*size of free block */
- struct H5HL_free_t *prev; /*previous entry in free list */
- struct H5HL_free_t *next; /*next entry in free list */
+ size_t offset; /* offset of free block */
+ size_t size; /* size of free block */
+ struct H5HL_free_t *prev; /* previous entry in free list */
+ struct H5HL_free_t *next; /* next entry in free list */
} H5HL_free_t;
/* Forward declarations */
@@ -83,76 +80,71 @@ typedef struct H5HL_prfx_t H5HL_prfx_t;
struct H5HL_t {
/* General heap-management fields */
- size_t rc; /* Ref. count for prefix & data block using this struct */
- size_t prots; /* # of times the heap has been protected */
- size_t sizeof_size; /* Size of file sizes */
- size_t sizeof_addr; /* Size of file addresses */
- hbool_t single_cache_obj; /* Indicate if the heap is a single object in the cache */
- H5HL_free_t *freelist; /*the free list */
+ size_t rc; /* Ref. count for prefix & data block using this struct */
+ size_t prots; /* # of times the heap has been protected */
+ size_t sizeof_size; /* Size of file sizes */
+ size_t sizeof_addr; /* Size of file addresses */
+ hbool_t single_cache_obj; /* Indicate if the heap is a single object in the cache */
+ H5HL_free_t *freelist; /* the free list */
/* Prefix-specific fields */
- H5HL_prfx_t *prfx; /* The prefix object for the heap */
- haddr_t prfx_addr; /* address of heap prefix */
- size_t prfx_size; /* size of heap prefix */
- hsize_t free_block; /* Address of first free block */
+ H5HL_prfx_t *prfx; /* The prefix object for the heap */
+ haddr_t prfx_addr; /* address of heap prefix */
+ size_t prfx_size; /* size of heap prefix */
+ hsize_t free_block; /* Address of first free block */
/* Data block-specific fields */
- H5HL_dblk_t *dblk; /* The data block object for the heap */
- haddr_t dblk_addr; /* address of data block */
- size_t dblk_size; /* size of heap data block on disk and in mem */
- uint8_t *dblk_image; /* The data block image */
+ H5HL_dblk_t *dblk; /* The data block object for the heap */
+ haddr_t dblk_addr; /* address of data block */
+ size_t dblk_size; /* size of heap data block on disk and in mem */
+ uint8_t * dblk_image; /* The data block image */
};
/* Struct for heap data block */
struct H5HL_dblk_t {
- H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
- /* first field in structure */
- H5HL_t *heap; /* Pointer to heap for data block */
+ H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
+ /* first field in structure */
+ H5HL_t *heap; /* Pointer to heap for data block */
};
/* Struct for heap prefix */
struct H5HL_prfx_t {
- H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
- /* first field in structure */
- H5HL_t *heap; /* Pointer to heap for prefix */
+ H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
+ /* first field in structure */
+ H5HL_t *heap; /* Pointer to heap for prefix */
};
/* Callback information for loading local heap prefix from disk */
typedef struct H5HL_cache_prfx_ud_t {
- /* Downwards */
- size_t sizeof_size; /* Size of file sizes */
- size_t sizeof_addr; /* Size of file addresses */
- haddr_t prfx_addr; /* Address of prefix */
- size_t sizeof_prfx; /* Size of heap prefix */
-
- /* Upwards */
+ size_t sizeof_size; /* Size of file sizes */
+ size_t sizeof_addr; /* Size of file addresses */
+ haddr_t prfx_addr; /* Address of prefix */
+ size_t sizeof_prfx; /* Size of heap prefix */
} H5HL_cache_prfx_ud_t;
/* Callback information for loading local heap data block from disk */
typedef struct H5HL_cache_dblk_ud_t {
/* Downwards */
- H5HL_t *heap; /* Local heap */
+ H5HL_t *heap; /* Local heap */
/* Upwards */
- hbool_t loaded; /* Whether data block was loaded from file */
+ hbool_t loaded; /* Whether data block was loaded from file */
} H5HL_cache_dblk_ud_t;
-
/******************************/
/* Package Private Prototypes */
/******************************/
/* Heap routines */
H5_DLL H5HL_t *H5HL_new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size);
-H5_DLL herr_t H5HL_dest(H5HL_t *heap);
+H5_DLL herr_t H5HL_dest(H5HL_t *heap);
/* Heap prefix routines */
H5_DLL H5HL_prfx_t *H5HL_prfx_new(H5HL_t *heap);
-H5_DLL herr_t H5HL_prfx_dest(H5HL_prfx_t *prfx);
+H5_DLL herr_t H5HL_prfx_dest(H5HL_prfx_t *prfx);
/* Heap data block routines */
H5_DLL H5HL_dblk_t *H5HL_dblk_new(H5HL_t *heap);
-H5_DLL herr_t H5HL_dblk_dest(H5HL_dblk_t *dblk);
+H5_DLL herr_t H5HL_dblk_dest(H5HL_dblk_t *dblk);
#endif /* _H5HLpkg_H */
-
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index 17d2196..6561fef 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -6,20 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5HLprivate.h
- * Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5HLprivate.h
+ * Jul 16 1997
+ * Robb Matzke
*
- * Purpose:
- *
- * Modifications:
+ * Purpose: Private declarations for the H5HL (local heap) package.
*
*-------------------------------------------------------------------------
*/
@@ -30,23 +28,23 @@
#include "H5HLpublic.h"
/* Private headers needed by this file. */
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Fprivate.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Fprivate.h" /* File access */
/*
* Feature: Define H5HL_DEBUG on the compiler command line if you want to
- * diagnostic messages from this layer.
+ * enable diagnostic messages from this layer.
*/
#ifdef NDEBUG
-# undef H5HL_DEBUG
+#undef H5HL_DEBUG
#endif
-#define H5HL_ALIGN(X) ((((unsigned)X)+7)&(unsigned)(~0x07)) /*align on 8-byte boundary */
+#define H5HL_ALIGN(X) ((((unsigned)X) + 7) & (unsigned)(~0x07)) /* align on 8-byte boundary */
-#define H5HL_SIZEOF_FREE(F) \
- H5HL_ALIGN(H5F_SIZEOF_SIZE (F) + /*ptr to next free block */ \
- H5F_SIZEOF_SIZE (F)) /*size of this free block */
+#define H5HL_SIZEOF_FREE(F) \
+ H5HL_ALIGN(H5F_SIZEOF_SIZE(F) + /* ptr to next free block */ \
+ H5F_SIZEOF_SIZE(F)) /* size of this free block */
/****************************/
/* Library Private Typedefs */
@@ -56,22 +54,18 @@
typedef struct H5HL_t H5HL_t;
/*
- * Library prototypes...
+ * Library prototypes
*/
-H5_DLL herr_t H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr/*out*/);
+H5_DLL herr_t H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr /*out*/);
H5_DLL H5HL_t *H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw);
-H5_DLL void *H5HL_offset_into(const H5HL_t *heap, size_t offset);
-H5_DLL herr_t H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset,
- size_t size);
-H5_DLL herr_t H5HL_unprotect(H5HL_t *heap);
-H5_DLL size_t H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t size,
- const void *buf);
-H5_DLL herr_t H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
-H5_DLL herr_t H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size);
-H5_DLL herr_t H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size);
+H5_DLL void * H5HL_offset_into(const H5HL_t *heap, size_t offset);
+H5_DLL herr_t H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size);
+H5_DLL herr_t H5HL_unprotect(H5HL_t *heap);
+H5_DLL size_t H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t size, const void *buf);
+H5_DLL herr_t H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+H5_DLL herr_t H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size);
+H5_DLL herr_t H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size);
/* Debugging functions */
-H5_DLL herr_t H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
- int fwidth);
+H5_DLL herr_t H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
#endif
-
diff --git a/src/H5HLpublic.h b/src/H5HLpublic.h
index 451e6c7..ddda38c 100644
--- a/src/H5HLpublic.h
+++ b/src/H5HLpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5HLpublic.h
* Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5HL (local heap) package.
*
diff --git a/src/H5HP.c b/src/H5HP.c
index c77610c..91fe26d 100644
--- a/src/H5HP.c
+++ b/src/H5HP.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,29 +19,28 @@
*
*/
-
/* Private headers needed */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HPprivate.h" /* Heap routines */
-#include "H5FLprivate.h" /* Memory management functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HPprivate.h" /* Heap routines */
+#include "H5FLprivate.h" /* Memory management functions */
/* Local Macros */
-#define H5HP_START_SIZE 16 /* Initial number of entries for heaps */
+#define H5HP_START_SIZE 16 /* Initial number of entries for heaps */
/* Private typedefs & structs */
/* Data structure for entries in the internal heap array */
typedef struct {
- int val; /* Value to be used for heap condition */
- H5HP_info_t *obj; /* Pointer to object stored in heap */
-}H5HP_ent_t;
+ int val; /* Value to be used for heap condition */
+ H5HP_info_t *obj; /* Pointer to object stored in heap */
+} H5HP_ent_t;
/* Main heap data structure */
struct H5HP_t {
H5HP_type_t type; /* Type of heap (minimum or maximum value at "top") */
- size_t nobjs; /* Number of active objects in heap array */
- size_t nalloc; /* Number of allocated locations in heap array */
+ size_t nobjs; /* Number of active objects in heap array */
+ size_t nalloc; /* Number of allocated locations in heap array */
H5HP_ent_t *heap; /* Pointer to array containing heap entries */
};
@@ -57,7 +56,6 @@ H5FL_DEFINE_STATIC(H5HP_t);
/* Declare a free list to manage sequences of H5HP_ent_t */
H5FL_SEQ_DEFINE_STATIC(H5HP_ent_t);
-
/*--------------------------------------------------------------------------
NAME
H5HP_swim_max
@@ -82,40 +80,39 @@ H5FL_SEQ_DEFINE_STATIC(H5HP_ent_t);
static herr_t
H5HP_swim_max(H5HP_t *heap, size_t loc)
{
- int val; /* Temporary copy value of object to move in heap */
- H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ int val; /* Temporary copy value of object to move in heap */
+ H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
- val=heap->heap[loc].val;
- obj=heap->heap[loc].obj;
+ val = heap->heap[loc].val;
+ obj = heap->heap[loc].obj;
/* Move object up in heap until it's reached the maximum location possible */
- while(heap->heap[loc/2].val < val) {
+ while (heap->heap[loc / 2].val < val) {
/* Move object "above" current location in heap down */
- heap->heap[loc].val=heap->heap[loc/2].val;
- heap->heap[loc].obj=heap->heap[loc/2].obj;
+ heap->heap[loc].val = heap->heap[loc / 2].val;
+ heap->heap[loc].obj = heap->heap[loc / 2].obj;
/* Update heap location for object which moved */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
/* Move to location "above" current location */
- loc=loc/2;
+ loc = loc / 2;
} /* end while */
/* Put object into heap at correct location */
- heap->heap[loc].val=val;
- heap->heap[loc].obj=obj;
+ heap->heap[loc].val = val;
+ heap->heap[loc].obj = obj;
/* Update heap location for object */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_swim_max() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_swim_min
@@ -140,40 +137,39 @@ H5HP_swim_max(H5HP_t *heap, size_t loc)
static herr_t
H5HP_swim_min(H5HP_t *heap, size_t loc)
{
- int val; /* Temporary copy value of object to move in heap */
- H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ int val; /* Temporary copy value of object to move in heap */
+ H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
- val=heap->heap[loc].val;
- obj=heap->heap[loc].obj;
+ val = heap->heap[loc].val;
+ obj = heap->heap[loc].obj;
/* Move object up in heap until it's reached the minimum location possible */
- while(heap->heap[loc/2].val > val) {
+ while (heap->heap[loc / 2].val > val) {
/* Move object "above" current location in heap down */
- heap->heap[loc].val=heap->heap[loc/2].val;
- heap->heap[loc].obj=heap->heap[loc/2].obj;
+ heap->heap[loc].val = heap->heap[loc / 2].val;
+ heap->heap[loc].obj = heap->heap[loc / 2].obj;
/* Update heap location for object which moved */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
/* Move to location "above" current location */
- loc=loc/2;
+ loc = loc / 2;
} /* end while */
/* Put object into heap at correct location */
- heap->heap[loc].val=val;
- heap->heap[loc].obj=obj;
+ heap->heap[loc].val = val;
+ heap->heap[loc].obj = obj;
/* Update heap location for object */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_swim_min() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_sink_max
@@ -198,38 +194,38 @@ H5HP_swim_min(H5HP_t *heap, size_t loc)
static herr_t
H5HP_sink_max(H5HP_t *heap, size_t loc)
{
- int val; /* Temporary copy value of object to move in heap */
- void *obj; /* Temporary pointer to object to move in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ int val; /* Temporary copy value of object to move in heap */
+ void * obj; /* Temporary pointer to object to move in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
- val=heap->heap[loc].val;
- obj=heap->heap[loc].obj;
+ val = heap->heap[loc].val;
+ obj = heap->heap[loc].obj;
/* Move object up in heap until it's reached the maximum location possible */
- while((2*loc)<=heap->nobjs) {
- size_t new_loc=loc*2; /* New object's potential location area */
+ while ((2 * loc) <= heap->nobjs) {
+ size_t new_loc = loc * 2; /* New object's potential location area */
/* Get the greater of the two objects below the location in heap */
- if(new_loc<heap->nobjs && (heap->heap[new_loc].val < heap->heap[new_loc+1].val))
+ if (new_loc < heap->nobjs && (heap->heap[new_loc].val < heap->heap[new_loc + 1].val))
new_loc++;
/* Check if the object is smaller than the larger of the objects below it */
/* If so, its in the correct location now, and we can get out */
- if(val >= heap->heap[new_loc].val)
+ if (val >= heap->heap[new_loc].val)
break;
/* Move the greater of the two objects below the current location up */
- heap->heap[loc].val=heap->heap[new_loc].val;
- heap->heap[loc].obj=heap->heap[new_loc].obj;
+ heap->heap[loc].val = heap->heap[new_loc].val;
+ heap->heap[loc].obj = heap->heap[new_loc].obj;
/* Update heap location for object which moved */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
/* Move to location "below" current location */
- loc=new_loc;
+ loc = new_loc;
} /* end while */
/* Put object into heap at correct location */
@@ -242,7 +238,6 @@ H5HP_sink_max(H5HP_t *heap, size_t loc)
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_sink_max() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_sink_min
@@ -267,38 +262,38 @@ H5HP_sink_max(H5HP_t *heap, size_t loc)
static herr_t
H5HP_sink_min(H5HP_t *heap, size_t loc)
{
- int val; /* Temporary copy value of object to move in heap */
- void *obj; /* Temporary pointer to object to move in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ int val; /* Temporary copy value of object to move in heap */
+ void * obj; /* Temporary pointer to object to move in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
- val=heap->heap[loc].val;
- obj=heap->heap[loc].obj;
+ val = heap->heap[loc].val;
+ obj = heap->heap[loc].obj;
/* Move object up in heap until it's reached the maximum location possible */
- while((2*loc)<=heap->nobjs) {
- size_t new_loc=loc*2; /* New object's potential location area */
+ while ((2 * loc) <= heap->nobjs) {
+ size_t new_loc = loc * 2; /* New object's potential location area */
/* Get the lesser of the two objects below the location in heap */
- if(new_loc<heap->nobjs && (heap->heap[new_loc].val > heap->heap[new_loc+1].val))
+ if (new_loc < heap->nobjs && (heap->heap[new_loc].val > heap->heap[new_loc + 1].val))
new_loc++;
/* Check if the object is greater than the larger of the objects below it */
/* If so, its in the correct location now, and we can get out */
- if(val <= heap->heap[new_loc].val)
+ if (val <= heap->heap[new_loc].val)
break;
/* Move the greater of the two objects below the current location up */
- heap->heap[loc].val=heap->heap[new_loc].val;
- heap->heap[loc].obj=heap->heap[new_loc].obj;
+ heap->heap[loc].val = heap->heap[new_loc].val;
+ heap->heap[loc].obj = heap->heap[new_loc].obj;
/* Update heap location for object which moved */
- heap->heap[loc].obj->heap_loc=loc;
+ heap->heap[loc].obj->heap_loc = loc;
/* Move to location "below" current location */
- loc=new_loc;
+ loc = new_loc;
} /* end while */
/* Put object into heap at correct location */
@@ -311,7 +306,6 @@ H5HP_sink_min(H5HP_t *heap, size_t loc)
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_sink_min() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_create
@@ -334,60 +328,59 @@ H5HP_sink_min(H5HP_t *heap, size_t loc)
H5HP_t *
H5HP_create(H5HP_type_t heap_type)
{
- H5HP_t *new_heap=NULL; /* Pointer to new heap object created */
- H5HP_t *ret_value; /* Return value */
+ H5HP_t *new_heap = NULL; /* Pointer to new heap object created */
+ H5HP_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(heap_type==H5HP_MIN_HEAP || heap_type==H5HP_MAX_HEAP);
+ HDassert(heap_type == H5HP_MIN_HEAP || heap_type == H5HP_MAX_HEAP);
/* Allocate ref-counted string structure */
- if((new_heap=H5FL_MALLOC(H5HP_t))==NULL)
- HGOTO_ERROR(H5E_HEAP,H5E_NOSPACE,NULL,"memory allocation failed");
+ if ((new_heap = H5FL_MALLOC(H5HP_t)) == NULL)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed");
/* Allocate the array to store the heap entries */
- if((new_heap->heap = H5FL_SEQ_MALLOC(H5HP_ent_t, (size_t)(H5HP_START_SIZE + 1)))==NULL)
- HGOTO_ERROR(H5E_HEAP,H5E_NOSPACE,NULL,"memory allocation failed");
+ if ((new_heap->heap = H5FL_SEQ_MALLOC(H5HP_ent_t, (size_t)(H5HP_START_SIZE + 1))) == NULL)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed");
/* Set the internal fields */
- new_heap->type=heap_type;
- new_heap->nobjs=0;
- new_heap->nalloc=H5HP_START_SIZE+1;
+ new_heap->type = heap_type;
+ new_heap->nobjs = 0;
+ new_heap->nalloc = H5HP_START_SIZE + 1;
/* Set the information in the 0'th location based on the type of heap */
- if(heap_type==H5HP_MIN_HEAP) {
+ if (heap_type == H5HP_MIN_HEAP) {
/* Set the value in the '0' location to be the minimum value, to
* simplify the algorithms
*/
- new_heap->heap[0].val=INT_MIN;
- new_heap->heap[0].obj=NULL;
+ new_heap->heap[0].val = INT_MIN;
+ new_heap->heap[0].obj = NULL;
} /* end if */
else {
/* Set the value in the '0' location to be the maximum value, to
* simplify the algorithms
*/
- new_heap->heap[0].val=INT_MAX;
- new_heap->heap[0].obj=NULL;
+ new_heap->heap[0].val = INT_MAX;
+ new_heap->heap[0].obj = NULL;
} /* end else */
/* Set the return value */
- ret_value=new_heap;
+ ret_value = new_heap;
done:
/* Error cleanup */
- if(NULL ==ret_value) {
- if(NULL != new_heap) {
- if(NULL != new_heap->heap)
+ if (NULL == ret_value) {
+ if (NULL != new_heap) {
+ if (NULL != new_heap->heap)
new_heap->heap = H5FL_SEQ_FREE(H5HP_ent_t, new_heap->heap);
new_heap = H5FL_FREE(H5HP_t, new_heap);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_create() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_count
@@ -409,7 +402,7 @@ done:
ssize_t
H5HP_count(const H5HP_t *heap)
{
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -418,21 +411,20 @@ H5HP_count(const H5HP_t *heap)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Return the number of objects in the heap */
- H5_CHECK_OVERFLOW(heap->nobjs,size_t,ssize_t);
- ret_value=(ssize_t)heap->nobjs;
+ H5_CHECK_OVERFLOW(heap->nobjs, size_t, ssize_t);
+ ret_value = (ssize_t)heap->nobjs;
/* No post-condition check necessary, since heap is constant */
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_count() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_insert
@@ -456,7 +448,7 @@ H5HP_count(const H5HP_t *heap)
herr_t
H5HP_insert(H5HP_t *heap, int val, void *obj)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -466,38 +458,38 @@ H5HP_insert(H5HP_t *heap, int val, void *obj)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Increment number of objects in heap */
heap->nobjs++;
/* Check if we need to allocate more room for heap array */
- if(heap->nobjs>=heap->nalloc) {
- size_t n = MAX(H5HP_START_SIZE, 2*(heap->nalloc-1)) + 1;
- H5HP_ent_t *new_heap = H5FL_SEQ_REALLOC(H5HP_ent_t,heap->heap, n);
+ if (heap->nobjs >= heap->nalloc) {
+ size_t n = MAX(H5HP_START_SIZE, 2 * (heap->nalloc - 1)) + 1;
+ H5HP_ent_t *new_heap = H5FL_SEQ_REALLOC(H5HP_ent_t, heap->heap, n);
if (!new_heap)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend heap array");
- heap->heap = new_heap;
+ heap->heap = new_heap;
heap->nalloc = n;
} /* end if */
/* Insert new object at end of heap */
- heap->heap[heap->nobjs].val = val;
- heap->heap[heap->nobjs].obj = (H5HP_info_t *)obj;
+ heap->heap[heap->nobjs].val = val;
+ heap->heap[heap->nobjs].obj = (H5HP_info_t *)obj;
heap->heap[heap->nobjs].obj->heap_loc = heap->nobjs;
/* Restore heap condition */
- if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_swim_max(heap,heap->nobjs)<0)
+ if (heap->type == H5HP_MAX_HEAP) {
+ if (H5HP_swim_max(heap, heap->nobjs) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,heap->nobjs)<0)
+ if (H5HP_swim_min(heap, heap->nobjs) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "unable to restore heap condition");
} /* end else */
@@ -505,16 +497,15 @@ done:
/* Check internal consistency */
/* (Post-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_insert() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_top
@@ -545,20 +536,19 @@ H5HP_top(const H5HP_t *heap, int *val)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Get value of the top object in the heap */
- *val=heap->heap[1].val;
+ *val = heap->heap[1].val;
/* No post-condition check necessary, since heap is constant */
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5HP_top() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_remove
@@ -582,7 +572,7 @@ H5HP_top(const H5HP_t *heap, int *val)
herr_t
H5HP_remove(H5HP_t *heap, int *val, void **obj)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -593,55 +583,54 @@ H5HP_remove(H5HP_t *heap, int *val, void **obj)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Check if there are any objects on the heap to remove */
- if(heap->nobjs==0)
+ if (heap->nobjs == 0)
HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "heap is empty");
/* Get the information for the top object on the heap */
- HDassert(heap->heap[1].obj->heap_loc==1);
- *val=heap->heap[1].val;
- *obj=heap->heap[1].obj;
+ HDassert(heap->heap[1].obj->heap_loc == 1);
+ *val = heap->heap[1].val;
+ *obj = heap->heap[1].obj;
/* Move the last element in the heap to the top */
- heap->heap[1].val=heap->heap[heap->nobjs].val;
- heap->heap[1].obj=heap->heap[heap->nobjs].obj;
- heap->heap[1].obj->heap_loc=1;
+ heap->heap[1].val = heap->heap[heap->nobjs].val;
+ heap->heap[1].obj = heap->heap[heap->nobjs].obj;
+ heap->heap[1].obj->heap_loc = 1;
/* Decrement number of objects in heap */
heap->nobjs--;
/* Restore heap condition, if there are objects on the heap */
- if(heap->nobjs>0) {
- if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap, (size_t)1) < 0)
+ if (heap->nobjs > 0) {
+ if (heap->type == H5HP_MAX_HEAP) {
+ if (H5HP_sink_max(heap, (size_t)1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_sink_min(heap, (size_t)1) < 0)
+ if (H5HP_sink_min(heap, (size_t)1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to restore heap condition");
} /* end else */
- } /* end if */
+ } /* end if */
done:
/* Check internal consistency */
/* (Post-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_remove() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_change
@@ -665,10 +654,10 @@ done:
herr_t
H5HP_change(H5HP_t *heap, int val, void *_obj)
{
- H5HP_info_t *obj=(H5HP_info_t *)_obj; /* Alias for object */
- size_t obj_loc; /* Location of object in heap */
- int old_val; /* Object's old priority value */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5HP_info_t *obj = (H5HP_info_t *)_obj; /* Alias for object */
+ size_t obj_loc; /* Location of object in heap */
+ int old_val; /* Object's old priority value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -678,56 +667,55 @@ H5HP_change(H5HP_t *heap, int val, void *_obj)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Get the location of the object in the heap */
- obj_loc=obj->heap_loc;
- HDassert(obj_loc>0 && obj_loc<=heap->nobjs);
+ obj_loc = obj->heap_loc;
+ HDassert(obj_loc > 0 && obj_loc <= heap->nobjs);
/* Change the heap object's priority */
- old_val=heap->heap[obj_loc].val;
- heap->heap[obj_loc].val=val;
+ old_val = heap->heap[obj_loc].val;
+ heap->heap[obj_loc].val = val;
/* Restore heap condition */
- if(val<old_val) {
- if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap,obj_loc)<0)
+ if (val < old_val) {
+ if (heap->type == H5HP_MAX_HEAP) {
+ if (H5HP_sink_max(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,obj_loc)<0)
+ if (H5HP_swim_min(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
- } /* end if */
+ } /* end if */
else {
- if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_swim_max(heap,obj_loc)<0)
+ if (heap->type == H5HP_MAX_HEAP) {
+ if (H5HP_swim_max(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_sink_min(heap,obj_loc)<0)
+ if (H5HP_sink_min(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
- } /* end else */
+ } /* end else */
done:
/* Check internal consistency */
/* (Post-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_change() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_incr
@@ -751,9 +739,9 @@ done:
herr_t
H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
{
- H5HP_info_t *obj=(H5HP_info_t *)_obj; /* Alias for object */
- size_t obj_loc; /* Location of object in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5HP_info_t *obj = (H5HP_info_t *)_obj; /* Alias for object */
+ size_t obj_loc; /* Location of object in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -763,11 +751,11 @@ H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Get the location of the object in the heap */
obj_loc = obj->heap_loc;
@@ -777,12 +765,12 @@ H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
heap->heap[obj_loc].val += (int)amt;
/* Restore heap condition */
- if(H5HP_MAX_HEAP == heap->type) {
- if(H5HP_swim_max(heap, obj_loc) < 0)
+ if (H5HP_MAX_HEAP == heap->type) {
+ if (H5HP_swim_max(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition")
} /* end if */
else {
- if(H5HP_sink_min(heap, obj_loc) < 0)
+ if (H5HP_sink_min(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition")
} /* end else */
@@ -790,16 +778,15 @@ done:
/* Check internal consistency */
/* (Post-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_incr() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_decr
@@ -823,9 +810,9 @@ done:
herr_t
H5HP_decr(H5HP_t *heap, unsigned amt, void *_obj)
{
- H5HP_info_t *obj=(H5HP_info_t *)_obj; /* Alias for object */
- size_t obj_loc; /* Location of object in heap */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5HP_info_t *obj = (H5HP_info_t *)_obj; /* Alias for object */
+ size_t obj_loc; /* Location of object in heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -835,26 +822,26 @@ H5HP_decr(H5HP_t *heap, unsigned amt, void *_obj)
/* Check internal consistency */
/* (Pre-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
/* Get the location of the object in the heap */
- obj_loc=obj->heap_loc;
- HDassert(obj_loc>0 && obj_loc<=heap->nobjs);
+ obj_loc = obj->heap_loc;
+ HDassert(obj_loc > 0 && obj_loc <= heap->nobjs);
/* Change the heap object's priority */
- heap->heap[obj_loc].val-=amt;
+ heap->heap[obj_loc].val -= amt;
/* Restore heap condition */
- if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap,obj_loc)<0)
+ if (heap->type == H5HP_MAX_HEAP) {
+ if (H5HP_sink_max(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,obj_loc)<0)
+ if (H5HP_swim_min(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
@@ -862,16 +849,15 @@ done:
/* Check internal consistency */
/* (Post-condition) */
- HDassert(heap->nobjs<heap->nalloc);
+ HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
- HDassert((heap->type==H5HP_MAX_HEAP && heap->heap[0].val==INT_MAX) ||
- (heap->type==H5HP_MIN_HEAP && heap->heap[0].val==INT_MIN));
- HDassert(heap->heap[0].obj==NULL);
+ HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ HDassert(heap->heap[0].obj == NULL);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_decr() */
-
/*--------------------------------------------------------------------------
NAME
H5HP_close
@@ -904,7 +890,7 @@ H5HP_close(H5HP_t *heap)
HDassert(heap->nobjs < heap->nalloc);
HDassert(heap->heap);
HDassert((heap->type == H5HP_MAX_HEAP && heap->heap[0].val == INT_MAX) ||
- (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
+ (heap->type == H5HP_MIN_HEAP && heap->heap[0].val == INT_MIN));
HDassert(NULL == heap->heap[0].obj);
/* Free internal structures for heap */
@@ -915,4 +901,3 @@ H5HP_close(H5HP_t *heap)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HP_close() */
-
diff --git a/src/H5HPprivate.h b/src/H5HPprivate.h
index 041c2b9..3b68400 100644
--- a/src/H5HPprivate.h
+++ b/src/H5HPprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -39,13 +39,13 @@ typedef struct H5HP_t H5HP_t;
/* Typedef for objects which can be inserted into heaps */
/* This _must_ be the first field in objects which can be inserted into heaps */
typedef struct H5HP_info_t {
- size_t heap_loc; /* Location of object in heap */
-}H5HP_info_t;
+ size_t heap_loc; /* Location of object in heap */
+} H5HP_info_t;
/* Typedef for type of heap to create */
typedef enum {
- H5HP_MIN_HEAP, /* Minimum values in heap are at the "top" */
- H5HP_MAX_HEAP /* Maximum values in heap are at the "top" */
+ H5HP_MIN_HEAP, /* Minimum values in heap are at the "top" */
+ H5HP_MAX_HEAP /* Maximum values in heap are at the "top" */
} H5HP_type_t;
/**********/
@@ -56,14 +56,13 @@ typedef enum {
/* Private routines */
/********************/
H5_DLL H5HP_t *H5HP_create(H5HP_type_t heap_type);
-H5_DLL herr_t H5HP_insert(H5HP_t *heap, int val, void *obj);
+H5_DLL herr_t H5HP_insert(H5HP_t *heap, int val, void *obj);
H5_DLL ssize_t H5HP_count(const H5HP_t *heap);
-H5_DLL herr_t H5HP_top(const H5HP_t *heap, int *val);
-H5_DLL herr_t H5HP_remove(H5HP_t *heap, int *val, void **ptr);
-H5_DLL herr_t H5HP_change(H5HP_t *heap, int val, void *obj);
-H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj);
-H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj);
-H5_DLL herr_t H5HP_close(H5HP_t *heap);
+H5_DLL herr_t H5HP_top(const H5HP_t *heap, int *val);
+H5_DLL herr_t H5HP_remove(H5HP_t *heap, int *val, void **ptr);
+H5_DLL herr_t H5HP_change(H5HP_t *heap, int val, void *obj);
+H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj);
+H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj);
+H5_DLL herr_t H5HP_close(H5HP_t *heap);
#endif /* _H5HPprivate_H */
-
diff --git a/src/H5I.c b/src/H5I.c
index 2a4a38c2..4621403 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -6,58 +6,49 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * FILE: H5I.c - Internal storage routines for handling "IDs"
+ * FILE: H5I.c - Internal storage routines for handling "IDs"
*
- * REMARKS: ID's which allow objects (void *'s currently) to be bundled
- * into "types" for more general storage.
+ * REMARKS: IDs which allow objects (void * currently) to be bundled
+ * into "types" for more general storage.
*
- * DESIGN: The types are stored in an array of pointers to store each
- * type in an element. Each "type" node contains a link to a
- * hash table to manage the IDs in each type. Allowed types are
- * values within the range 1 to H5I_MAX_NUM_TYPES and are given out
- * at run-time. Types used by the library are stored in global
- * variables defined in H5Ipublic.h.
- *
- * AUTHOR: Quincey Koziol
- *
- * MODIFICATIONS:
- * 1/3/96 - Starting writing specs & coding prototype
- * 1/7/96 - Finished coding prototype
- * 6/10/97 - Moved into HDF5 library
- * 5/18/04 - Expanded to allow registration of new types at run-time
+ * DESIGN: The types are stored in an array of pointers to store each
+ * type in an element. Each "type" node contains a link to a
+ * hash table to manage the IDs in each type. Allowed types are
+ * values within the range 1 to H5I_MAX_NUM_TYPES and are given out
+ * at run-time. Types used by the library are stored in global
+ * variables defined in H5Ipublic.h.
*/
-#define H5I_PACKAGE /*suppress error about including H5Ipkg */
+#define H5I_PACKAGE /*suppress error about including H5Ipkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5I_init_interface
-
+#define H5_INTERFACE_INIT_FUNC H5I_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Ipkg.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5SLprivate.h" /* Skip Lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Ipkg.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5SLprivate.h" /* Skip Lists */
/* Define this to compile in support for dumping ID information */
/* #define H5I_DEBUG_OUTPUT */
#ifndef H5I_DEBUG_OUTPUT
-#include "H5Gprivate.h" /* Groups */
-#else /* H5I_DEBUG_OUTPUT */
-#define H5G_PACKAGE /*suppress error message about including H5Gpkg.h */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Tprivate.h" /* Datatypes */
-#endif /* H5I_DEBUG_OUTPUT */
+#include "H5Gprivate.h" /* Groups */
+#else /* H5I_DEBUG_OUTPUT */
+#define H5G_PACKAGE /*suppress error message about including H5Gpkg.h */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Tprivate.h" /* Datatypes */
+#endif /* H5I_DEBUG_OUTPUT */
/* Local Macros */
@@ -66,56 +57,55 @@
#define MAX_FREE_ID_STRUCTS 1000
/* Combine a Type number and an atom index into an atom */
-#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
- ((hid_t)(i) & ID_MASK))
+#define H5I_MAKE(g, i) ((((hid_t)(g)&TYPE_MASK) << ID_BITS) | ((hid_t)(i)&ID_MASK))
/* Local typedefs */
/* Atom information structure used */
typedef struct H5I_id_info_t {
- hid_t id; /* ID for this info */
- unsigned count; /* ref. count for this atom */
- unsigned app_count; /* ref. count of application visible atoms */
- const void *obj_ptr; /* pointer associated with the atom */
+ hid_t id; /* ID for this info */
+ unsigned count; /* ref. count for this atom */
+ unsigned app_count; /* ref. count of application visible atoms */
+ const void *obj_ptr; /* pointer associated with the atom */
} H5I_id_info_t;
/* ID type structure used */
typedef struct {
- const H5I_class_t *cls; /* Pointer to ID class */
- unsigned init_count; /* # of times this type has been initialized*/
- hbool_t wrapped; /* Whether the id count has wrapped around */
- unsigned id_count; /* Current number of IDs held */
- hid_t nextid; /* ID to use for the next atom */
- H5SL_t *ids; /* Pointer to skip list that stores IDs */
+ const H5I_class_t *cls; /* Pointer to ID class */
+ unsigned init_count; /* # of times this type has been initialized*/
+ hbool_t wrapped; /* Whether the id count has wrapped around */
+ unsigned id_count; /* Current number of IDs held */
+ hid_t nextid; /* ID to use for the next atom */
+ H5SL_t * ids; /* Pointer to skip list that stores IDs */
/* Fields for holding available IDs */
- unsigned avail_count; /* # of available ID structures awaiting recycling */
- H5SL_t *avail_ids; /* pointer to skip list of available IDs */
+ unsigned avail_count; /* # of available ID structures awaiting recycling */
+ H5SL_t * avail_ids; /* pointer to skip list of available IDs */
} H5I_id_type_t;
typedef struct {
- H5I_search_func_t app_cb; /* Application's callback routine */
- void *app_key; /* Application's "key" (user data) */
- void *ret_obj; /* Object to return */
+ H5I_search_func_t app_cb; /* Application's callback routine */
+ void * app_key; /* Application's "key" (user data) */
+ void * ret_obj; /* Object to return */
} H5I_search_ud_t;
/* User data for iterator callback when IDs have wrapped */
typedef struct {
- hid_t nextid; /* Next ID to expect */
+ hid_t nextid; /* Next ID to expect */
} H5I_wrap_ud_t;
/* User data for iterator callback for ID iteration */
typedef struct {
- H5I_search_func_t user_func; /* 'User' function to invoke */
- void *user_udata; /* User data to pass to 'user' function */
- hbool_t app_ref; /* Whether this is an appl. ref. call */
+ H5I_search_func_t user_func; /* 'User' function to invoke */
+ void * user_udata; /* User data to pass to 'user' function */
+ hbool_t app_ref; /* Whether this is an appl. ref. call */
} H5I_iterate_ud_t;
/* User data for H5I__clear_type_cb */
typedef struct {
- H5I_id_type_t *type_ptr; /* Pointer to the type being cleard */
- hbool_t force; /* Whether to always remove the id */
- hbool_t app_ref; /* Whether this is an appl. ref. call */
+ H5I_id_type_t *type_ptr; /* Pointer to the type being cleard */
+ hbool_t force; /* Whether to always remove the id */
+ hbool_t app_ref; /* Whether this is an appl. ref. call */
} H5I_clear_type_ud_t;
/*-------------------- Locally scoped variables -----------------------------*/
@@ -129,7 +119,7 @@ static H5I_id_type_t *H5I_id_type_list_g[H5I_MAX_NUM_TYPES];
/* Starts at 1 instead of 0 because it makes trace output look nicer. If more */
/* types (or IDs within a type) are needed, adjust TYPE_BITS in H5Ipkg.h */
/* and/or increase size of hid_t */
-static H5I_type_t H5I_next_type = (H5I_type_t) H5I_NTYPES;
+static H5I_type_t H5I_next_type = (H5I_type_t)H5I_NTYPES;
/* Declare a free list to manage the H5I_id_info_t struct */
H5FL_DEFINE_STATIC(H5I_id_info_t);
@@ -141,19 +131,18 @@ H5FL_DEFINE_STATIC(H5I_id_type_t);
H5FL_DEFINE_STATIC(H5I_class_t);
/*--------------------- Local function prototypes ---------------------------*/
-static herr_t H5I__free_cb(void *_item, void *_key, void *_udata);
-static htri_t H5I__clear_type_cb(void *_id, void *key, void *udata);
-static int H5I__destroy_type(H5I_type_t type);
-static void *H5I__remove_verify(hid_t id, H5I_type_t id_type);
-static void *H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id);
-static int H5I__inc_type_ref(H5I_type_t type);
-static int H5I__get_type_ref(H5I_type_t type);
+static herr_t H5I__free_cb(void *_item, void *_key, void *_udata);
+static htri_t H5I__clear_type_cb(void *_id, void *key, void *udata);
+static int H5I__destroy_type(H5I_type_t type);
+static void * H5I__remove_verify(hid_t id, H5I_type_t id_type);
+static void * H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id);
+static int H5I__inc_type_ref(H5I_type_t type);
+static int H5I__get_type_ref(H5I_type_t type);
static H5I_id_info_t *H5I__find_id(hid_t id);
#ifdef H5I_DEBUG_OUTPUT
static herr_t H5I__debug(H5I_type_t type);
#endif /* H5I_DEBUG_OUTPUT */
-
/*--------------------------------------------------------------------------
NAME
H5I_init_interface -- Initialize interface-specific information
@@ -174,50 +163,47 @@ H5I_init_interface(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_term_interface
- *
- * Purpose: Terminate the H5I interface: release all memory, reset all
- * global variables to initial values. This only happens if all
- * types have been destroyed from other interfaces.
+ * Function: H5I_term_interface
*
- * Return: Success: Positive if any action was taken that might
- * affect some other interface; zero otherwise.
+ * Purpose: Terminate the H5I interface: release all memory, reset all
+ * global variables to initial values. This only happens if all
+ * types have been destroyed from other interfaces.
*
- * Failure: Negative.
+ * Return: Success: Positive if any action was taken that might
+ * affect some other interface; zero otherwise.
*
- * Programmer: Unknown
+ * Failure: Negative
*
*-------------------------------------------------------------------------
*/
int
H5I_term_interface(void)
{
- H5I_id_type_t *type_ptr;
- H5I_type_t type;
- int n = 0;
+ H5I_id_type_t *type_ptr;
+ H5I_type_t type;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(H5_interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* How many types are still being used? */
- for(type = (H5I_type_t)0; type < H5I_next_type; H5_INC_ENUM(H5I_type_t, type)) {
- if((type_ptr = H5I_id_type_list_g[type]) && type_ptr->ids)
+ for (type = (H5I_type_t)0; type < H5I_next_type; H5_INC_ENUM(H5I_type_t, type)) {
+ if ((type_ptr = H5I_id_type_list_g[type]) && type_ptr->ids)
n++;
} /* end for */
/* If no types are used then clean up */
- if(0 == n) {
- for(type = (H5I_type_t)0; type < H5I_next_type; H5_INC_ENUM(H5I_type_t,type)) {
+ if (0 == n) {
+ for (type = (H5I_type_t)0; type < H5I_next_type; H5_INC_ENUM(H5I_type_t, type)) {
type_ptr = H5I_id_type_list_g[type];
- if(type_ptr) {
+ if (type_ptr) {
HDassert(NULL == type_ptr->ids);
- type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr);
+ type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr);
H5I_id_type_list_g[type] = NULL;
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
/* Mark interface closed */
H5_interface_initialize_g = 0;
@@ -226,76 +212,71 @@ H5I_term_interface(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5I_term_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iregister_type
+ * Function: H5Iregister_type
*
- * Purpose: Public interface to H5I_register_type. Creates a new type
- * of ID's to give out. A specific number (RESERVED) of type
- * entries may be reserved to enable "constant" values to be handed
- * out which are valid IDs in the type, but which do not map to any
- * data structures and are not allocated dynamically later. HASH_SIZE is
- * the minimum hash table size to use for the type. FREE_FUNC is
- * called with an object pointer when the object is removed from
- * the type.
+ * Purpose: Public interface to H5I_register_type. Creates a new type
+ * of ID's to give out. A specific number (RESERVED) of type
+ * entries may be reserved to enable "constant" values to be handed
+ * out which are valid IDs in the type, but which do not map to any
+ * data structures and are not allocated dynamically later. HASH_SIZE is
+ * the minimum hash table size to use for the type. FREE_FUNC is
+ * called with an object pointer when the object is removed from
+ * the type.
*
- * Return: Success: Type ID of the new type
- * Failure: H5I_BADID
- *
- * Programmers: Nathaniel Furrer
- * James Laird
- * Friday, April 30, 2004
+ * Return: Success: Type ID of the new type
+ * Failure: H5I_BADID
*
*-------------------------------------------------------------------------
*/
H5I_type_t
H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
{
- H5I_class_t *cls = NULL; /* New ID class */
- H5I_type_t new_type; /* New ID type value */
- H5I_type_t ret_value; /* Return value */
+ H5I_class_t *cls = NULL; /* New ID class */
+ H5I_type_t new_type; /* New ID type value */
+ H5I_type_t ret_value = H5I_BADID; /* Return value */
FUNC_ENTER_API(H5I_BADID)
H5TRACE3("It", "zIux", hash_size, reserved, free_func);
/* Generate a new H5I_type_t value */
- /* Increment the number of types*/
- if(H5I_next_type < H5I_MAX_NUM_TYPES) {
+ /* Increment the number of types */
+ if (H5I_next_type < H5I_MAX_NUM_TYPES) {
new_type = H5I_next_type;
H5_INC_ENUM(H5I_type_t, H5I_next_type);
} /* end if */
else {
- hbool_t done; /* Indicate that search was successful */
- int i; /* Local index variable */
+ hbool_t done; /* Indicate that search was successful */
+ int i; /* Local index variable */
/* Look for a free type to give out */
done = FALSE;
- for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == FALSE; i++) {
- if(NULL == H5I_id_type_list_g[i]) {
+ for (i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == FALSE; i++) {
+ if (NULL == H5I_id_type_list_g[i]) {
/* Found a free type ID */
new_type = (H5I_type_t)i;
- done = TRUE;
+ done = TRUE;
} /* end if */
- } /* end for */
+ } /* end for */
/* Verify that we found a type to give out */
- if(done == FALSE)
+ if (done == FALSE)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded.")
} /* end else */
/* Allocate new ID class */
- if(NULL == (cls = H5FL_MALLOC(H5I_class_t)))
+ if (NULL == (cls = H5FL_MALLOC(H5I_class_t)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed")
/* Initialize class fields */
- cls->type_id = new_type;
- cls->flags = H5I_CLASS_IS_APPLICATION;
- cls->reserved = reserved;
+ cls->type_id = new_type;
+ cls->flags = H5I_CLASS_IS_APPLICATION;
+ cls->reserved = reserved;
cls->free_func = free_func;
/* Register the new ID class */
- if(H5I_register_type(cls) < 0)
+ if (H5I_register_type(cls) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, H5I_BADID, "can't initialize ID class")
/* Set return value */
@@ -303,36 +284,29 @@ H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
done:
/* Clean up on error */
- if(ret_value < 0) {
- if(cls)
+ if (ret_value < 0)
+ if (cls)
cls = H5FL_FREE(H5I_class_t, cls);
- } /* end if */
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_register_type
+ * Function: H5I_register_type
*
- * Purpose: Creates a new type of ID's to give out.
- * The class is initialized or its reference count is incremented
+ * Purpose: Creates a new type of ID's to give out.
+ * The class is initialized or its reference count is incremented
* (if it is already initialized).
*
- * Return: Success: Type ID of the new type
- * Failure: H5I_BADID
- *
- * Programmers: Nathaniel Furrer
- * James Laird
- * Friday, April 30, 2004
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5I_register_type(const H5I_class_t *cls)
{
- H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
- herr_t ret_value = SUCCEED; /* Return value */
+ H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -341,9 +315,9 @@ H5I_register_type(const H5I_class_t *cls)
HDassert(cls->type_id > 0 && cls->type_id < H5I_MAX_NUM_TYPES);
/* Initialize the type */
- if(NULL == H5I_id_type_list_g[cls->type_id]) {
+ if (NULL == H5I_id_type_list_g[cls->type_id]) {
/* Allocate the type information for new type */
- if(NULL == (type_ptr = (H5I_id_type_t *)H5FL_CALLOC(H5I_id_type_t)))
+ if (NULL == (type_ptr = (H5I_id_type_t *)H5FL_CALLOC(H5I_id_type_t)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, FAIL, "ID type allocation failed")
H5I_id_type_list_g[cls->type_id] = type_ptr;
} /* end if */
@@ -353,15 +327,15 @@ H5I_register_type(const H5I_class_t *cls)
} /* end else */
/* Initialize the ID type structure for new types */
- if(type_ptr->init_count == 0) {
- type_ptr->cls = cls;
- type_ptr->wrapped = FALSE;
+ if (type_ptr->init_count == 0) {
+ type_ptr->cls = cls;
+ type_ptr->wrapped = FALSE;
type_ptr->id_count = 0;
- type_ptr->nextid = (hid_t)cls->reserved;
- if(NULL == (type_ptr->ids = H5SL_create(H5SL_TYPE_HID, NULL)))
+ type_ptr->nextid = (hid_t)cls->reserved;
+ if (NULL == (type_ptr->ids = H5SL_create(H5SL_TYPE_HID, NULL)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTCREATE, FAIL, "skip list creation failed")
type_ptr->avail_count = 0;
- if(NULL == (type_ptr->avail_ids = H5SL_create(H5SL_TYPE_HID, NULL)))
+ if (NULL == (type_ptr->avail_ids = H5SL_create(H5SL_TYPE_HID, NULL)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTCREATE, FAIL, "skip list creation failed")
} /* end if */
@@ -369,67 +343,62 @@ H5I_register_type(const H5I_class_t *cls)
type_ptr->init_count++;
done:
- if(ret_value < 0) { /* Clean up on error */
- if(type_ptr) {
- if(type_ptr->ids)
+ if (ret_value < 0) { /* Clean up on error */
+ if (type_ptr) {
+ if (type_ptr->ids)
H5SL_close(type_ptr->ids);
- if(type_ptr->avail_ids)
+ if (type_ptr->avail_ids)
H5SL_close(type_ptr->avail_ids);
(void)H5FL_FREE(H5I_id_type_t, type_ptr);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5Itype_exists
+ * Function: H5Itype_exists
*
* Purpose: Query function to inform the user if a given type is
* currently registered with the library.
*
- * Return: Success: 1 if the type is registered, 0 if it is not
- * Failure: Negative
- *
- * Programmer: James Laird
- * Nathaniel Furrer
- * Tuesday, June 29, 2004
+ * Return: TRUE/FALSE/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5Itype_exists(H5I_type_t type)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "It", type);
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ /* Validate parameter */
+ if (H5I_IS_LIB_TYPE(type))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
- if(NULL == H5I_id_type_list_g[type])
+ if (NULL == H5I_id_type_list_g[type])
ret_value = FALSE;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Itype_exists() */
-
/*-------------------------------------------------------------------------
- * Function: H5Inmembers
+ * Function: H5Inmembers
*
- * Purpose: Returns the number of members in a type. Public interface to
- * H5I_nmembers. The public interface throws an error if the
+ * Purpose: Returns the number of members in a type. Public interface to
+ * H5I_nmembers. The public interface throws an error if the
* supplied type does not exist. This is different than the
* private interface, which will just return 0.
*
- * Return: Success: Zero
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -437,27 +406,27 @@ done:
herr_t
H5Inmembers(H5I_type_t type, hsize_t *num_members)
{
- int ret_value = SUCCEED; /* Return value */
+ int ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "It*h", type, num_members);
- if(H5I_IS_LIB_TYPE(type))
+ if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
/* Validate parameters. This needs to be done here, instead of letting
* the private interface handle it, because the public interface throws
* an error when the supplied type does not exist.
*/
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
- if(NULL == H5I_id_type_list_g[type])
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "supplied type does not exist")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ if (NULL == H5I_id_type_list_g[type])
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "supplied type does not exist")
- if(num_members) {
+ if (num_members) {
int members;
- if((members = H5I_nmembers(type)) < 0)
+ if ((members = H5I_nmembers(type)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCOUNT, FAIL, "can't compute number of members")
H5_CHECKED_ASSIGN(*num_members, hsize_t, members, int);
@@ -467,18 +436,17 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Inmembers() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_nmembers
+ * Function: H5I_nmembers
*
- * Purpose: Returns the number of members in a type.
+ * Purpose: Returns the number of members in a type.
*
- * Return: Success: Number of members; zero if the type is empty
- * or has been deleted.
+ * Return: Success: Number of members; zero if the type is empty
+ * or has been deleted.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -486,14 +454,14 @@ done:
int
H5I_nmembers(H5I_type_t type)
{
- H5I_id_type_t *type_ptr = NULL;
- int ret_value;
+ H5I_id_type_t *type_ptr = NULL;
+ int ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(type <= H5I_BADID || type >= H5I_next_type)
+ if (type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
- if(NULL == (type_ptr = H5I_id_type_list_g[type]) || type_ptr->init_count <= 0)
+ if (NULL == (type_ptr = H5I_id_type_list_g[type]) || type_ptr->init_count <= 0)
HGOTO_DONE(0);
/* Set return value */
@@ -503,19 +471,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_nmembers() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iclear_type
+ * Function: H5Iclear_type
*
- * Purpose: Removes all objects from the type, calling the free
- * function for each object regardless of the reference count.
- * Public interface to H5I_clear_type.
+ * Purpose: Removes all objects from the type, calling the free
+ * function for each object regardless of the reference count.
+ * Public interface to H5I_clear_type.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -523,12 +489,12 @@ done:
herr_t
H5Iclear_type(H5I_type_t type, hbool_t force)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "Itb", type, force);
- if(H5I_IS_LIB_TYPE(type))
+ if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
ret_value = H5I_clear_type(type, force, TRUE);
@@ -537,7 +503,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iclear_type() */
-
/*-------------------------------------------------------------------------
* Function: H5I__free_cb
*
@@ -554,7 +519,7 @@ done:
static herr_t
H5I__free_cb(void *_item, void H5_ATTR_UNUSED *_key, void H5_ATTR_UNUSED *_udata)
{
- H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
+ H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
FUNC_ENTER_STATIC_NOERR
@@ -566,17 +531,15 @@ H5I__free_cb(void *_item, void H5_ATTR_UNUSED *_key, void H5_ATTR_UNUSED *_udata
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* end H5I__free_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_clear_type
+ * Function: H5I_clear_type
*
- * Purpose: Removes all objects from the type, calling the free
- * function for each object regardless of the reference count.
+ * Purpose: Removes all objects from the type, calling the free
+ * function for each object regardless of the reference count.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -584,29 +547,30 @@ H5I__free_cb(void *_item, void H5_ATTR_UNUSED *_key, void H5_ATTR_UNUSED *_udata
herr_t
H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
{
- H5I_clear_type_ud_t udata; /* udata struct for callback */
- int ret_value = SUCCEED; /* Return value */
+ H5I_clear_type_ud_t udata; /* udata struct for callback */
+ int ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(type <= H5I_BADID || type >= H5I_next_type)
+ /* Validate parameters */
+ if (type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
udata.type_ptr = H5I_id_type_list_g[type];
- if(udata.type_ptr == NULL || udata.type_ptr->init_count <= 0)
+ if (udata.type_ptr == NULL || udata.type_ptr->init_count <= 0)
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
/* Finish constructing udata */
- udata.force = force;
+ udata.force = force;
udata.app_ref = app_ref;
/* Attempt to free all ids in the type */
- if(H5SL_try_free_safe(udata.type_ptr->ids, H5I__clear_type_cb, &udata) < 0)
+ if (H5SL_try_free_safe(udata.type_ptr->ids, H5I__clear_type_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't free ids in type")
/* Also free any ID structures being retained for potential re-use */
- if(udata.type_ptr->avail_count > 0) {
- if(H5SL_free(udata.type_ptr->avail_ids, H5I__free_cb, NULL) < 0)
+ if (udata.type_ptr->avail_count > 0) {
+ if (H5SL_free(udata.type_ptr->avail_ids, H5I__free_cb, NULL) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREMOVE, FAIL, "can't release available ID nodes")
udata.type_ptr->avail_count = 0;
} /* end if */
@@ -615,15 +579,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_clear_type() */
-
/*-------------------------------------------------------------------------
* Function: H5I__clear_type_cb
*
- * Purpose: Attempts to free the specified ID , calling the free
+ * Purpose: Attempts to free the specified ID, calling the free
* function for the object.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Neil Fortner
* Friday, July 10, 2015
@@ -633,82 +595,81 @@ done:
static htri_t
H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
{
- H5I_id_info_t *id = (H5I_id_info_t *)_id; /* Current ID being worked with */
- H5I_clear_type_ud_t *udata = (H5I_clear_type_ud_t *)_udata; /* udata struct */
- htri_t ret_value = FALSE; /* Return value */
+ H5I_id_info_t * id = (H5I_id_info_t *)_id; /* Current ID being worked with */
+ H5I_clear_type_ud_t *udata = (H5I_clear_type_ud_t *)_udata; /* udata struct */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_STATIC_NOERR
+ /* Sanity checks */
HDassert(id);
HDassert(udata);
HDassert(udata->type_ptr);
- /*
- * Do nothing to the object if the reference count is larger than
+ /* Do nothing to the object if the reference count is larger than
* one and forcing is off.
*/
- if(udata->force || (id->count - (!udata->app_ref * id->app_count)) <= 1) {
+ if (udata->force || (id->count - (!udata->app_ref * id->app_count)) <= 1) {
/* Check for a 'free' function and call it, if it exists */
- /* (Casting away const OK -QAK) */
- if(udata->type_ptr->cls->free_func && (udata->type_ptr->cls->free_func)((void *)id->obj_ptr) < 0) {
- if(udata->force) {
+ if (udata->type_ptr->cls->free_func &&
+ (udata->type_ptr->cls->free_func)((void *)id->obj_ptr) < 0) { /* (Casting away const OK -QAK) */
+ if (udata->force) {
#ifdef H5I_DEBUG
- if(H5DEBUG(I)) {
- fprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx "
- "failure ignored\n",
- (int)udata->type_ptr->cls->type_id,
- (unsigned long)(id->obj_ptr));
+ if (H5DEBUG(I)) {
+ HDfprintf(H5DEBUG(I),
+ "H5I: free type=%d obj=0x%08lx "
+ "failure ignored\n",
+ (int)udata->type_ptr->cls->type_id, (unsigned long)(id->obj_ptr));
} /* end if */
-#endif /*H5I_DEBUG*/
+#endif /*H5I_DEBUG*/
/* Indicate node should be removed from list */
ret_value = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
else {
/* Indicate node should be removed from list */
ret_value = TRUE;
} /* end else */
/* Remove ID if requested */
- if(ret_value) {
+ if (ret_value) {
/* Free ID info */
id = H5FL_FREE(H5I_id_info_t, id);
/* Decrement the number of IDs in the type */
udata->type_ptr->id_count--;
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__clear_type_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5Idestroy_type
+ * Function: H5Idestroy_type
*
- * Purpose: Destroys a type along with all atoms in that type
- * regardless of their reference counts. Destroying IDs
- * involves calling the free-func for each ID's object and
- * then adding the ID struct to the ID free list. Public
- * interface to H5I__destroy_type.
+ * Purpose: Destroys a type along with all atoms in that type
+ * regardless of their reference counts. Destroying IDs
+ * involves calling the free-func for each ID's object and
+ * then adding the ID struct to the ID free list. Public
+ * interface to H5I__destroy_type.
*
- * Return: Zero on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
herr_t
H5Idestroy_type(H5I_type_t type)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "It", type);
- if(H5I_IS_LIB_TYPE(type))
+ if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
ret_value = H5I__destroy_type(type);
@@ -717,84 +678,79 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idestroy_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__destroy_type
+ * Function: H5I__destroy_type
*
- * Purpose: Destroys a type along with all atoms in that type
- * regardless of their reference counts. Destroying IDs
- * involves calling the free-func for each ID's object and
- * then adding the ID struct to the ID free list.
+ * Purpose: Destroys a type along with all atoms in that type
+ * regardless of their reference counts. Destroying IDs
+ * involves calling the free-func for each ID's object and
+ * then adding the ID struct to the ID free list.
*
- * Return: Zero on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
static herr_t
H5I__destroy_type(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /* ptr to the atomic type */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5I_id_type_t *type_ptr; /* ptr to the atomic type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
- if(type <= H5I_BADID || type >= H5I_next_type)
+ /* Validate parameter */
+ if (type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
type_ptr = H5I_id_type_list_g[type];
- if(type_ptr == NULL || type_ptr->init_count <= 0)
+ if (type_ptr == NULL || type_ptr->init_count <= 0)
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
/* Close/clear/destroy all IDs for this type */
- H5E_BEGIN_TRY {
- H5I_clear_type(type, TRUE, FALSE);
- } H5E_END_TRY /*don't care about errors*/
+ H5E_BEGIN_TRY { H5I_clear_type(type, TRUE, FALSE); }
+ H5E_END_TRY /*don't care about errors*/
- /* Check if we should release the ID class */
- if(type_ptr->cls->flags & H5I_CLASS_IS_APPLICATION)
- type_ptr->cls = H5FL_FREE(H5I_class_t, (void *)type_ptr->cls);
+ /* Check if we should release the ID class */
+ if (type_ptr->cls->flags & H5I_CLASS_IS_APPLICATION)
+ type_ptr->cls = H5FL_FREE(H5I_class_t, (void *)type_ptr->cls);
- if(H5SL_close(type_ptr->avail_ids) < 0)
+ if (H5SL_close(type_ptr->avail_ids) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
type_ptr->avail_ids = NULL;
- if(H5SL_close(type_ptr->ids) < 0)
+ if (H5SL_close(type_ptr->ids) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
type_ptr->ids = NULL;
- type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr);
+ type_ptr = H5FL_FREE(H5I_id_type_t, type_ptr);
H5I_id_type_list_g[type] = NULL;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__destroy_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iregister
+ * Function: H5Iregister
*
- * Purpose: Public interface to H5I_register.
+ * Purpose: Public interface to H5I_register.
*
- * Return: Success: New object id.
- * Failure: Negative
- *
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Return: Success: New object ID
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Iregister(H5I_type_t type, const void *object)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "It*x", type, object);
- if(H5I_IS_LIB_TYPE(type))
+ if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
ret_value = H5I_register(type, object, TRUE);
@@ -803,7 +759,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister() */
-
/*-------------------------------------------------------------------------
* Function: H5I__wrapped_cb
*
@@ -820,9 +775,9 @@ done:
static herr_t
H5I__wrapped_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
- H5I_wrap_ud_t *udata = (H5I_wrap_ud_t *)_udata; /* Pointer to user data */
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
+ H5I_wrap_ud_t *udata = (H5I_wrap_ud_t *)_udata; /* Pointer to user data */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -831,7 +786,7 @@ H5I__wrapped_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
HDassert(udata);
/* Break out if we see a free ID */
- if(udata->nextid != (ID_MASK & item->id)) {
+ if (udata->nextid != (ID_MASK & item->id)) {
/* Sanity check */
HDassert(item->id > udata->nextid);
@@ -844,47 +799,44 @@ H5I__wrapped_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__wrapped_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_register
+ * Function: H5I_register
*
- * Purpose: Registers an OBJECT in a TYPE and returns an ID for it.
- * This routine does _not_ check for unique-ness of the objects,
- * if you register an object twice, you will get two different
- * IDs for it. This routine does make certain that each ID in a
- * type is unique. IDs are created by getting a unique number
- * for the type the ID is in and incorporating the type into
- * the ID which is returned to the user.
- *
- * Return: Success: New object id.
- * Failure: Negative
+ * Purpose: Registers an OBJECT in a TYPE and returns an ID for it.
+ * This routine does _not_ check for unique-ness of the objects,
+ * if you register an object twice, you will get two different
+ * IDs for it. This routine does make certain that each ID in a
+ * type is unique. IDs are created by getting a unique number
+ * for the type the ID is in and incorporating the type into
+ * the ID which is returned to the user.
*
- * Programmer: Unknown
+ * Return: Success: New object ID
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
{
- H5I_id_type_t *type_ptr; /*ptr to the type */
- H5I_id_info_t *id_ptr; /*ptr to the new ID information */
- hid_t ret_value = SUCCEED; /*return value */
+ H5I_id_type_t *type_ptr = NULL; /* ptr to the type */
+ H5I_id_info_t *id_ptr = NULL; /* ptr to the new ID information */
+ hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check arguments */
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number")
type_ptr = H5I_id_type_list_g[type];
- if(NULL == type_ptr || type_ptr->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ if (NULL == type_ptr || type_ptr->init_count <= 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, H5I_INVALID_HID, "invalid type")
/* If there is an available ID structure, use it. */
- if(type_ptr->avail_count > 0) {
+ if (type_ptr->avail_count > 0) {
/* Use existing available ID struct */
- if(NULL == (id_ptr = (H5I_id_info_t *)H5SL_remove_first(type_ptr->avail_ids)))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREMOVE, FAIL, "can't remove ID from available ID list")
-
+ if (NULL == (id_ptr = (H5I_id_info_t *)H5SL_remove_first(type_ptr->avail_ids)))
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREMOVE, H5I_INVALID_HID, "can't remove ID from available ID list")
+
/* Decrease count of available ID structures */
type_ptr->avail_count--;
} /* end if */
@@ -896,27 +848,27 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
* wrapping around, thus necessitating checking for duplicate IDs being
* handed out.
*/
- if(type_ptr->nextid > (hid_t)ID_MASK)
+ if (type_ptr->nextid > (hid_t)ID_MASK)
type_ptr->wrapped = TRUE;
/*
* If we've wrapped around then we need to check for duplicate id's being
* handed out.
*/
- if(type_ptr->wrapped) {
- H5I_wrap_ud_t udata; /* User data for iteration */
- herr_t iter_status; /* Iteration status */
+ if (type_ptr->wrapped) {
+ H5I_wrap_ud_t udata; /* User data for iteration */
+ herr_t iter_status; /* Iteration status */
/* Set up user data for iteration */
udata.nextid = (hid_t)type_ptr->cls->reserved;
/* Iterate over all the ID nodes, looking for a gap in the ID sequence */
- if((iter_status = H5SL_iterate(type_ptr->ids, H5I__wrapped_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "ID iteration failed")
+ if ((iter_status = H5SL_iterate(type_ptr->ids, H5I__wrapped_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADITER, H5I_INVALID_HID, "ID iteration failed")
/* If we didn't break out of the iteration and we're at the max. ID, we've used all the IDs */
- if(0 == iter_status && udata.nextid >= ID_MASK)
- HGOTO_ERROR(H5E_ATOM, H5E_NOIDS, FAIL, "no IDs available in type")
+ if (0 == iter_status && udata.nextid >= ID_MASK)
+ HGOTO_ERROR(H5E_ATOM, H5E_NOIDS, H5I_INVALID_HID, "no IDs available in type")
/* Sanity check */
HDassert(udata.nextid < ID_MASK);
@@ -926,8 +878,8 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
} /* end if */
/* Allocate new ID struct */
- if(NULL == (id_ptr = H5FL_MALLOC(H5I_id_info_t)))
- HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (id_ptr = H5FL_MALLOC(H5I_id_info_t)))
+ HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
/* Make a new ID */
id_ptr->id = H5I_MAKE(type, type_ptr->nextid);
@@ -937,12 +889,12 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
} /* end if */
/* Fill in remaining fields of ID struct */
- id_ptr->count = 1; /*initial reference count*/
+ id_ptr->count = 1; /*initial reference count*/
id_ptr->app_count = !!app_ref;
- id_ptr->obj_ptr = object;
+ id_ptr->obj_ptr = object;
/* Insert into the type */
- if(H5SL_insert(type_ptr->ids, id_ptr, &id_ptr->id) < 0)
+ if (H5SL_insert(type_ptr->ids, id_ptr, &id_ptr->id) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, FAIL, "can't insert ID node into skip list")
type_ptr->id_count++;
@@ -953,107 +905,97 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_subst
+ * Function: H5I_subst
*
- * Purpose: Substitute a new object pointer for the specified ID.
+ * Purpose: Substitute a new object pointer for the specified ID.
*
- * Return: Success: Non-null previous object pointer associated
- * with the specified ID.
- * Failure: NULL
+ * Return: Success: Non-NULL previous object pointer associated
+ * with the specified ID.
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * Saturday, February 27, 2010
+ * Programmer: Quincey Koziol
+ * Saturday, February 27, 2010
*
*-------------------------------------------------------------------------
*/
void *
H5I_subst(hid_t id, const void *new_object)
{
- H5I_id_info_t *id_ptr; /* Ptr to the atom */
- void *ret_value; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the atom */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* General lookup of the ID */
- if(NULL == (id_ptr = H5I__find_id(id)))
+ if (NULL == (id_ptr = H5I__find_id(id)))
HGOTO_ERROR(H5E_ATOM, H5E_NOTFOUND, NULL, "can't get ID ref count")
/* Get the old object pointer to return */
- /* (Casting away const OK -QAK) */
- ret_value = (void *)id_ptr->obj_ptr;
+ ret_value = (void *)id_ptr->obj_ptr; /* (Casting away const OK -QAK) */
/* Set the new object pointer for the ID */
id_ptr->obj_ptr = new_object;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end if */
+} /* end H5I_subst() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_object
+ * Function: H5I_object
*
- * Purpose: Find an object pointer for the specified ID.
+ * Purpose: Find an object pointer for the specified ID.
*
- * Return: Success: Non-null object pointer associated with the
- * specified ID.
- * Failure: NULL
+ * Return: Success: Non-NULL object pointer associated with the
+ * specified ID
*
- * Programmer: Unknown
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
void *
H5I_object(hid_t id)
{
- H5I_id_info_t *id_ptr; /*ptr to the new atom */
- void *ret_value = NULL; /*return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the new atom */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* General lookup of the ID */
- if(NULL != (id_ptr = H5I__find_id(id))) {
+ if (NULL != (id_ptr = H5I__find_id(id))) {
/* Get the object pointer to return */
- /* (Casting away const OK -QAK) */
- ret_value = (void *)id_ptr->obj_ptr;
- } /* end if */
+ ret_value = (void *)id_ptr->obj_ptr; /* (Casting away const OK -QAK) */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end if */
+} /* end H5I_object() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iobject_verify
- *
- * Purpose: Find an object pointer for the specified ID, verifying that
- * its in a particular type. Public interface to
- * H5I_object_verify.
+ * Function: H5Iobject_verify
*
- * Return: Success: Non-null object pointer associated with the
- * specified ID.
- * Failure: NULL
+ * Purpose: Find an object pointer for the specified ID, verifying that
+ * its in a particular type. Public interface to
+ * H5I_object_verify.
*
- * Programmer: Nathaniel Furrer
- * James Laird
- * Friday, April 23, 2004
+ * Return: Success: Non-NULL object pointer associated with the
+ * specified ID.
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
void *
H5Iobject_verify(hid_t id, H5I_type_t id_type)
{
- void * ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_API(NULL)
H5TRACE2("*x", "iIt", id, id_type);
- if(H5I_IS_LIB_TYPE(id_type))
+ /* Validate parameters */
+ if (H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
-
- if(id_type < 1 || id_type >= H5I_next_type)
+ if (id_type < 1 || id_type >= H5I_next_type)
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "identifier has invalid type")
ret_value = H5I_object_verify(id, id_type);
@@ -1062,68 +1004,67 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iobject_verify() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_object_verify
+ * Function: H5I_object_verify
*
- * Purpose: Find an object pointer for the specified ID, verifying that
- * its in a particular type.
+ * Purpose: Find an object pointer for the specified ID, verifying that
+ * its in a particular type.
*
- * Return: Success: Non-null object pointer associated with the
- * specified ID.
- * Failure: NULL
+ * Return: Success: Non-NULL object pointer associated with the
+ * specified ID.
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * Wednesday, July 31, 2002
+ * Programmer: Quincey Koziol
+ * Wednesday, July 31, 2002
*
*-------------------------------------------------------------------------
*/
void *
H5I_object_verify(hid_t id, H5I_type_t id_type)
{
- H5I_id_info_t *id_ptr = NULL; /*ptr to the new atom */
- void *ret_value = NULL; /*return value */
+ H5I_id_info_t *id_ptr = NULL; /* Pointer to the new atom */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
HDassert(id_type >= 1 && id_type < H5I_next_type);
/* Verify that the type of the ID is correct & lookup the ID */
- if(id_type == H5I_TYPE(id) && NULL != (id_ptr = H5I__find_id(id))) {
+ if (id_type == H5I_TYPE(id) && NULL != (id_ptr = H5I__find_id(id))) {
/* Get the object pointer to return */
- /* (Casting away const OK -QAK) */
- ret_value = (void *)id_ptr->obj_ptr;
- } /* end if */
+ ret_value = (void *)id_ptr->obj_ptr; /* (Casting away const OK -QAK) */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5I_object_verify() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_get_type
+ * Function: H5I_get_type
*
- * Purpose: Given an object ID return the type to which it
- * belongs. The ID need not be the ID of an object which
- * currently exists because the type number is encoded
- * in the object ID.
+ * Purpose: Given an object ID return the type to which it
+ * belongs. The ID need not be the ID of an object which
+ * currently exists because the type number is encoded
+ * in the object ID.
*
- * Return: Success: A valid type number
- * Failure: H5I_BADID, a negative value.
+ * Return: Success: A positive integer (corresponding to an H5I_type_t
+ * enum value for library ID types, but not for user
+ * ID types).
+ * Failure: H5I_BADID
*
- * Programmer: Robb Matzke
- * Friday, February 19, 1999
+ * Programmer: Robb Matzke
+ * Friday, February 19, 1999
*
*-------------------------------------------------------------------------
*/
H5I_type_t
H5I_get_type(hid_t id)
{
- H5I_type_t ret_value = H5I_BADID;
+ H5I_type_t ret_value = H5I_BADID; /* Return value */
FUNC_ENTER_NOAPI(H5I_BADID)
- if(id > 0)
+ if (id > 0)
ret_value = H5I_TYPE(id);
HDassert(ret_value >= H5I_BADID && ret_value < H5I_next_type);
@@ -1132,66 +1073,64 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iget_type
- *
- * Purpose: The public version of H5I_get_type(), obtains a type number
- * when given an ID. The ID need not be the ID of an
- * object which currently exists because the type number is
- * encoded as part of the ID.
+ * Function: H5Iget_type
*
- * Return: Success: Type number
- * Failure: H5I_BADID, a negative value
+ * Purpose: The public version of H5I_get_type(), obtains a type number
+ * when given an ID. The ID need not be the ID of an
+ * object which currently exists because the type number is
+ * encoded as part of the ID.
*
- * Programmer: Unknown
+ * Return: Success: A positive integer (corresponding to an H5I_type_t
+ * enum value for library ID types, but not for user
+ * ID types).
+ * Failure: H5I_BADID
*
*-------------------------------------------------------------------------
*/
H5I_type_t
H5Iget_type(hid_t id)
{
- H5I_type_t ret_value = H5I_BADID; /* Return value */
+ H5I_type_t ret_value = H5I_BADID; /* Return value */
FUNC_ENTER_API(H5I_BADID)
H5TRACE1("It", "i", id);
ret_value = H5I_get_type(id);
- if(ret_value <= H5I_BADID || ret_value >= H5I_next_type || NULL == H5I_object(id))
- HGOTO_DONE(H5I_BADID);
+ if (ret_value <= H5I_BADID || ret_value >= H5I_next_type || NULL == H5I_object(id))
+ HGOTO_DONE(H5I_BADID);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_type() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iremove_verify
+ * Function: H5Iremove_verify
*
- * Purpose: Removes the specified ID from its type, first checking that the
- * type of the ID and the type type are the same. Public interface to
- * H5I__remove_verify.
+ * Purpose: Removes the specified ID from its type, first checking that the
+ * type of the ID and the type type are the same. Public interface to
+ * H5I__remove_verify.
*
- * Return: Success: A pointer to the object that was removed, the
- * same pointer which would have been found by
- * calling H5I_object().
- * Failure: NULL
+ * Return: Success: A pointer to the object that was removed, the
+ * same pointer which would have been found by
+ * calling H5I_object().
+ * Failure: NULL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
*
*-------------------------------------------------------------------------
*/
void *
H5Iremove_verify(hid_t id, H5I_type_t id_type)
{
- void * ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_API(NULL)
H5TRACE2("*x", "iIt", id, id_type);
- if(H5I_IS_LIB_TYPE(id_type))
+ if (H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
/* Remove the id */
@@ -1201,49 +1140,47 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iremove_verify() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__remove_verify
+ * Function: H5I__remove_verify
*
- * Purpose: Removes the specified ID from its type, first checking that
- * the ID's type is the same as the ID type supplied as an argument
+ * Purpose: Removes the specified ID from its type, first checking that
+ * the ID's type is the same as the ID type supplied as an argument
*
- * Return: Success: A pointer to the object that was removed, the
- * same pointer which would have been found by
- * calling H5I_object().
- * Failure: NULL
+ * Return: Success: A pointer to the object that was removed, the
+ * same pointer which would have been found by
+ * calling H5I_object().
+ * Failure: NULL
*
- * Programmer: James Laird
- * Nat Furrer
+ * Programmer: James Laird
+ * Nat Furrer
*
*-------------------------------------------------------------------------
*/
void *
H5I__remove_verify(hid_t id, H5I_type_t id_type)
{
- void * ret_value = NULL; /*return value */
+ void *ret_value = NULL; /*return value */
FUNC_ENTER_STATIC_NOERR
/* Argument checking will be performed by H5I_remove() */
/* Verify that the type of the ID is correct */
- if(id_type == H5I_TYPE(id))
+ if (id_type == H5I_TYPE(id))
ret_value = H5I_remove(id);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_verify() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__remove_common
+ * Function: H5I__remove_common
*
- * Purpose: Common code to remove a specified ID from its type.
+ * Purpose: Common code to remove a specified ID from its type.
*
- * Return: Success: A pointer to the object that was removed, the
- * same pointer which would have been found by
- * calling H5I_object().
- * Failure: NULL
+ * Return: Success: A pointer to the object that was removed, the
+ * same pointer which would have been found by
+ * calling H5I_object().
+ * Failure: NULL
*
* Programmer: Quincey Koziol
* October 3, 2013
@@ -1253,8 +1190,8 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
static void *
H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id)
{
- H5I_id_info_t *curr_id; /*ptr to the current atom */
- void * ret_value; /*return value */
+ H5I_id_info_t *curr_id; /* Pointer to the current atom */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1262,31 +1199,31 @@ H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id)
HDassert(type_ptr);
/* Get the ID node for the ID */
- if(NULL == (curr_id = (H5I_id_info_t *)H5SL_remove(type_ptr->ids, &id)))
+ if (NULL == (curr_id = (H5I_id_info_t *)H5SL_remove(type_ptr->ids, &id)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node from skip list")
/* (Casting away const OK -QAK) */
ret_value = (void *)curr_id->obj_ptr;
/* See if we can reuse IDs of this type */
- if(type_ptr->cls->flags & H5I_CLASS_REUSE_IDS) {
+ if (type_ptr->cls->flags & H5I_CLASS_REUSE_IDS) {
/* See if we can decrement the next ID for the ID class */
- if(type_ptr->nextid == (ID_MASK & (curr_id->id + 1))) {
+ if (type_ptr->nextid == (ID_MASK & (curr_id->id + 1))) {
type_ptr->nextid--;
curr_id = H5FL_FREE(H5I_id_info_t, curr_id);
} /* end if */
else {
/* Store the ID on the available ID list, for later */
- if((type_ptr->avail_count < MAX_FREE_ID_STRUCTS)
- && (type_ptr->id_count > 1)) {
- if(H5SL_insert(type_ptr->avail_ids, curr_id, &curr_id->id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, NULL, "can't insert available ID node into skip list")
+ if ((type_ptr->avail_count < MAX_FREE_ID_STRUCTS) && (type_ptr->id_count > 1)) {
+ if (H5SL_insert(type_ptr->avail_ids, curr_id, &curr_id->id) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, NULL,
+ "can't insert available ID node into skip list")
type_ptr->avail_count++;
}
else
curr_id = H5FL_FREE(H5I_id_info_t, curr_id);
} /* end else */
- } /* end if */
+ } /* end if */
/* Otherwise, just toss it. */
else
curr_id = H5FL_FREE(H5I_id_info_t, curr_id);
@@ -1296,12 +1233,12 @@ H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id)
/* If there are no more IDs of this type, then we can free all available
ID strutures, and reset starting typeid and wrapped status. */
- if(0 == type_ptr->id_count) {
- if(H5SL_free(type_ptr->avail_ids, H5I__free_cb, NULL) < 0)
+ if (0 == type_ptr->id_count) {
+ if (H5SL_free(type_ptr->avail_ids, H5I__free_cb, NULL) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREMOVE, NULL, "can't release available ID nodes")
type_ptr->avail_count = 0;
- type_ptr->nextid = (hid_t)type_ptr->cls->reserved;
+ type_ptr->nextid = (hid_t)type_ptr->cls->reserved;
type_ptr->wrapped = FALSE;
} /* end if */
@@ -1309,56 +1246,52 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_common() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_remove
- *
- * Purpose: Removes the specified ID from its type.
+ * Function: H5I_remove
*
- * Return: Success: A pointer to the object that was removed, the
- * same pointer which would have been found by
- * calling H5I_object().
- * Failure: NULL
+ * Purpose: Removes the specified ID from its type.
*
- * Programmer: Unknown
+ * Return: Success: A pointer to the object that was removed, the
+ * same pointer which would have been found by
+ * calling H5I_object().
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
void *
H5I_remove(hid_t id)
{
- H5I_id_type_t *type_ptr; /*ptr to the atomic type */
- H5I_type_t type; /*atom's atomic type */
- void * ret_value; /*return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the atomic type */
+ H5I_type_t type; /* Atom's atomic type */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
type = H5I_TYPE(id);
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid type number")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid type number")
type_ptr = H5I_id_type_list_g[type];
- if(type_ptr == NULL || type_ptr->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid type")
+ if (type_ptr == NULL || type_ptr->init_count <= 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid type")
/* Remove the node from the type */
- if(NULL == (ret_value = H5I__remove_common(type_ptr, id)))
+ if (NULL == (ret_value = H5I__remove_common(type_ptr, id)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_remove() */
-
/*-------------------------------------------------------------------------
- * Function: H5Idec_ref
+ * Function: H5Idec_ref
*
- * Purpose: Decrements the number of references outstanding for an ID.
+ * Purpose: Decrements the number of references outstanding for an ID.
* If the reference count for an ID reaches zero, the object
* will be closed.
*
- * Return: Success: New reference count
- * Failure: Negative
+ * Return: Success: New reference count
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Dec 7, 2003
@@ -1368,58 +1301,54 @@ done:
int
H5Idec_ref(hid_t id)
{
- int ret_value; /* Return value */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "i", id);
/* Check arguments */
- if(id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID")
+ if (id < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
/* Do actual decrement operation */
- if((ret_value = H5I_dec_app_ref(id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, FAIL, "can't decrement ID ref count")
+ if ((ret_value = H5I_dec_app_ref(id)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_dec_ref
+ * Function: H5I_dec_ref
*
- * Purpose: Decrements the number of references outstanding for an ID.
- * This will fail if the type is not a reference counted type.
- * The ID type's 'free' function will be called for the ID
- * if the reference count for the ID reaches 0 and a free
- * function has been defined at type creation time.
+ * Purpose: Decrements the number of references outstanding for an ID.
+ * This will fail if the type is not a reference counted type.
+ * The ID type's 'free' function will be called for the ID
+ * if the reference count for the ID reaches 0 and a free
+ * function has been defined at type creation time.
*
- * Return: Success: New reference count.
+ * Return: Success: New reference count
*
- * Failure: Negative
- *
- * Programmer: Unknown
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5I_dec_ref(hid_t id)
{
- H5I_id_info_t *id_ptr; /*ptr to the new ID */
- int ret_value; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the new ID */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Sanity check */
HDassert(id >= 0);
/* General lookup of the ID */
- if(NULL == (id_ptr = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID")
+ if (NULL == (id_ptr = H5I__find_id(id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
- /*
- * If this is the last reference to the object then invoke the type's
+ /* If this is the last reference to the object then invoke the type's
* free method on the object. If the free method is undefined or
* successful then remove the object from the type; otherwise leave
* the object in the type without decrementing the reference
@@ -1427,27 +1356,27 @@ H5I_dec_ref(hid_t id)
* reference count without calling the free method.
*
* Beware: the free method may call other H5I functions.
- *
- * If an object is closing, we can remove the ID even though the free
+ *
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
- if(1 == id_ptr->count) {
- H5I_id_type_t *type_ptr; /*ptr to the type */
+ if (1 == id_ptr->count) {
+ H5I_id_type_t *type_ptr; /*ptr to the type */
/* Get the ID's type */
type_ptr = H5I_id_type_list_g[H5I_TYPE(id)];
/* (Casting away const OK -QAK) */
- if(!type_ptr->cls->free_func || (type_ptr->cls->free_func)((void *)id_ptr->obj_ptr) >= 0) {
+ if (!type_ptr->cls->free_func || (type_ptr->cls->free_func)((void *)id_ptr->obj_ptr) >= 0) {
/* Remove the node from the type */
- if(NULL == H5I__remove_common(type_ptr, id))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't remove ID node")
+ if (NULL == H5I__remove_common(type_ptr, id))
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, (-1), "can't remove ID node")
ret_value = 0;
} /* end if */
else
- ret_value = FAIL;
+ ret_value = -1;
} /* end if */
else {
--(id_ptr->count);
@@ -1458,15 +1387,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_dec_app_ref
+ * Function: H5I_dec_app_ref
*
- * Purpose: H5I_dec_ref wrapper for case of modifying the application ref.
- * count for an ID as well as normal reference count.
+ * Purpose: H5I_dec_ref wrapper for case of modifying the application ref.
+ * count for an ID as well as normal reference count.
*
- * Return: Success: New app. reference count.
- * Failure: Negative
+ * Return: Success: New app. reference count
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Sept 16, 2010
@@ -1476,23 +1404,23 @@ done:
int
H5I_dec_app_ref(hid_t id)
{
- H5I_id_info_t *id_ptr; /*ptr to the new ID */
- int ret_value; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the new ID */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Sanity check */
HDassert(id >= 0);
/* Call regular decrement reference count routine */
- if((ret_value = H5I_dec_ref(id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, FAIL, "can't decrement ID ref count")
+ if ((ret_value = H5I_dec_ref(id)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
/* Check if the ID still exists */
- if(ret_value > 0) {
+ if (ret_value > 0) {
/* General lookup of the ID */
- if(NULL == (id_ptr = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID")
+ if (NULL == (id_ptr = H5I__find_id(id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
/* Adjust app_ref */
--(id_ptr->app_count);
@@ -1506,27 +1434,23 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_dec_app_ref_always_close
+ * Function: H5I_dec_app_ref_always_close
*
- * Purpose: H5I_dec_app_ref wrapper for case of always closing the ID,
- * even when the free routine fails
+ * Purpose: H5I_dec_app_ref wrapper for case of always closing the ID,
+ * even when the free routine fails
*
- * Return: Success: New app. reference count.
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Sept 16, 2010
+ * Return: Success: New app. reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5I_dec_app_ref_always_close(hid_t id)
{
- int ret_value; /* Return value */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Sanity check */
HDassert(id >= 0);
@@ -1535,84 +1459,76 @@ H5I_dec_app_ref_always_close(hid_t id)
ret_value = H5I_dec_app_ref(id);
/* Check for failure */
- if(ret_value < 0) {
+ if (ret_value < 0) {
/*
- * If an object is closing, we can remove the ID even though the free
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
H5I_remove(id);
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, FAIL, "can't decrement ID ref count")
- } /* end if */
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref_always_close() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iinc_ref
+ * Function: H5Iinc_ref
*
- * Purpose: Increments the number of references outstanding for an ID.
+ * Purpose: Increments the number of references outstanding for an ID.
*
- * Return: Success: New reference count
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Dec 7, 2003
+ * Return: Success: New reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5Iinc_ref(hid_t id)
{
- int ret_value; /* Return value */
+ int ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "i", id);
/* Check arguments */
- if(id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID")
+ if (id < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
/* Do actual increment operation */
- if((ret_value = H5I_inc_ref(id, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, FAIL, "can't increment ID ref count")
+ if ((ret_value = H5I_inc_ref(id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, (-1), "can't increment ID ref count")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_inc_ref
+ * Function: H5I_inc_ref
*
- * Purpose: Increment the reference count for an object.
+ * Purpose: Increment the reference count for an object.
*
- * Return: Success: The new reference count.
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Thursday, July 29, 1999
+ * Return: Success: The new reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5I_inc_ref(hid_t id, hbool_t app_ref)
{
- H5I_id_info_t *id_ptr; /*ptr to the ID */
- int ret_value; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the ID */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Sanity check */
HDassert(id >= 0);
/* General lookup of the ID */
- if(NULL == (id_ptr = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID")
+ if (NULL == (id_ptr = H5I__find_id(id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
/* Adjust reference counts */
++(id_ptr->count);
@@ -1626,68 +1542,60 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_inc_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iget_ref
+ * Function: H5Iget_ref
*
- * Purpose: Retrieves the number of references outstanding for an ID.
+ * Purpose: Retrieves the number of references outstanding for an ID.
*
- * Return: Success: Reference count
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Dec 7, 2003
+ * Return: Success: Reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5Iget_ref(hid_t id)
{
- int ret_value; /* Return value */
+ int ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "i", id);
/* Check arguments */
- if(id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID")
+ if (id < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
/* Do actual retrieve operation */
- if((ret_value = H5I_get_ref(id, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID ref count")
+ if ((ret_value = H5I_get_ref(id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't get ID ref count")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_get_ref
+ * Function: H5I_get_ref
*
- * Purpose: Retrieve the reference count for an object.
- *
- * Return: Success: The reference count.
- * Failure: Negative
+ * Purpose: Retrieve the reference count for an object.
*
- * Programmer: Quincey Koziol
- * Saturday, Decemeber 6, 2003
+ * Return: Success: The reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5I_get_ref(hid_t id, hbool_t app_ref)
{
- H5I_id_info_t *id_ptr; /*ptr to the ID */
- int ret_value; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the ID */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Sanity check */
HDassert(id >= 0);
/* General lookup of the ID */
- if(NULL == (id_ptr = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID")
+ if (NULL == (id_ptr = H5I__find_id(id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
/* Set return value */
ret_value = (int)(app_ref ? id_ptr->app_count : id_ptr->count);
@@ -1696,64 +1604,53 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iinc_type_ref
- *
- * Purpose: Increments the number of references outstanding for an ID type.
+ * Function: H5Iinc_type_ref
*
- * Return: Success: New reference count
- * Failure: Negative
+ * Purpose: Increments the number of references outstanding for an ID type.
*
- * Programmer: Nat Furrer
- * James Laird
- * April 30, 2004
+ * Return: Success: New reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5Iinc_type_ref(H5I_type_t type)
{
- int ret_value; /* Return value */
+ int ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "It", type);
/* Check arguments */
- if(type <= 0 || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID type")
-
- if(H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ if (type <= 0 || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID type")
+ if (H5I_IS_LIB_TYPE(type))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
/* Do actual increment operation */
- if((ret_value = H5I__inc_type_ref(type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, FAIL, "can't increment ID type ref count")
+ if ((ret_value = H5I__inc_type_ref(type)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, (-1), "can't increment ID type ref count")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__inc_type_ref
+ * Function: H5I__inc_type_ref
*
- * Purpose: Increment the reference count for an ID type.
+ * Purpose: Increment the reference count for an ID type.
*
- * Return: Success: The new reference count.
- * Failure: Negative
- *
- * Programmer: James Laird
- * Nat Furrer
- * Friday, April 30, 2004
+ * Return: Success: The new reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static int
H5I__inc_type_ref(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /* ptr to the type */
- int ret_value; /* Return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the type */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
@@ -1762,8 +1659,8 @@ H5I__inc_type_ref(H5I_type_t type)
/* Check arguments */
type_ptr = H5I_id_type_list_g[type];
- if(!type_ptr)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ if (NULL == type_ptr)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "invalid type")
/* Set return value */
ret_value = (int)(++(type_ptr->init_count));
@@ -1772,39 +1669,40 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__inc_type_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5Idec_type_ref
- *
- * Purpose: Decrements the reference count on an entire type of IDs.
- * If the type reference count becomes zero then the type is
- * destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
- * the free-func for each ID's object and then adding the ID
- * struct to the ID free list. Public interface to
- * H5I_dec_type_ref.
- * Returns the number of references to the type on success; a
- * return value of 0 means that the type will have to be
- * re-initialized before it can be used again (and should probably
- * be set to H5I_UNINIT).
- *
- * Return: Number of references to type on success/Negative on failure
- *
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Function: H5Idec_type_ref
+ *
+ * Purpose: Decrements the reference count on an entire type of IDs.
+ * If the type reference count becomes zero then the type is
+ * destroyed along with all atoms in that type regardless of
+ * their reference counts. Destroying IDs involves calling
+ * the free-func for each ID's object and then adding the ID
+ * struct to the ID free list. Public interface to
+ * H5I_dec_type_ref.
+ * Returns the number of references to the type on success; a
+ * return value of 0 means that the type will have to be
+ * re-initialized before it can be used again (and should probably
+ * be set to H5I_UNINIT).
+ *
+ * NOTE: Using an error type to also represent a count is semantially
+ * incorrect. We should consider fixing this in a future major
+ * release (DER).
+ *
+ * Return: Success: Number of references to type
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
herr_t
H5Idec_type_ref(H5I_type_t type)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("e", "It", type);
- if(H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ if (H5I_IS_LIB_TYPE(type))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
ret_value = H5I_dec_type_ref(type);
@@ -1812,120 +1710,106 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_type_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_dec_type_ref
- *
- * Purpose: Decrements the reference count on an entire type of IDs.
- * If the type reference count becomes zero then the type is
- * destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
- * the free-func for each ID's object and then adding the ID
- * struct to the ID free list.
- * Returns the number of references to the type on success; a
- * return value of 0 means that the type will have to be
- * re-initialized before it can be used again (and should probably
- * be set to H5I_UNINIT).
- *
- * Return: Number of references to type on success/Negative on failure
- *
- * Programmer: Unknown
+ * Function: H5I_dec_type_ref
+ *
+ * Purpose: Decrements the reference count on an entire type of IDs.
+ * If the type reference count becomes zero then the type is
+ * destroyed along with all atoms in that type regardless of
+ * their reference counts. Destroying IDs involves calling
+ * the free-func for each ID's object and then adding the ID
+ * struct to the ID free list.
+ * Returns the number of references to the type on success; a
+ * return value of 0 means that the type will have to be
+ * re-initialized before it can be used again (and should probably
+ * be set to H5I_UNINIT).
+ *
+ * Return: Success: Number of references to type
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5I_dec_type_ref(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /* Pointer to the ID type */
- herr_t ret_value; /* Return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the ID type */
+ herr_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
type_ptr = H5I_id_type_list_g[type];
- if(type_ptr == NULL || type_ptr->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ if (type_ptr == NULL || type_ptr->init_count <= 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
- /*
- * Decrement the number of users of the atomic type. If this is the
+ /* Decrement the number of users of the atomic type. If this is the
* last user of the type then release all atoms from the type and
* free all memory it used. The free function is invoked for each atom
* being freed.
*/
- if(1 == type_ptr->init_count) {
+ if (1 == type_ptr->init_count) {
H5I__destroy_type(type);
ret_value = 0;
- } /* end if */
+ }
else {
--(type_ptr->init_count);
ret_value = (herr_t)type_ptr->init_count;
- } /* end else */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_type_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iget_type_ref
- *
- * Purpose: Retrieves the number of references outstanding for a type.
+ * Function: H5Iget_type_ref
*
- * Return: Success: Reference count
- * Failure: Negative
+ * Purpose: Retrieves the number of references outstanding for a type.
*
- * Programmer: Nat Furrer
- * James Laird
- * April 30, 2004
+ * Return: Success: Reference count
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
int
H5Iget_type_ref(H5I_type_t type)
{
- int ret_value; /* Return value */
+ int ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "It", type);
/* Check arguments */
- if(type <= 0 || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID type")
-
- if(H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ if (type <= 0 || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID type")
+ if (H5I_IS_LIB_TYPE(type))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
/* Do actual retrieve operation */
- if((ret_value = H5I__get_type_ref(type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID type ref count")
+ if ((ret_value = H5I__get_type_ref(type)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't get ID type ref count")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__get_type_ref
- *
- * Purpose: Retrieve the reference count for an ID type.
+ * Function: H5I__get_type_ref
*
- * Return: Success: The reference count.
+ * Purpose: Retrieve the reference count for an ID type.
*
- * Failure: Negative
+ * Return: Success: The reference count
*
- * Programmer: Nat Furrer
- * James Laird
- * April 30, 2004
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static int
H5I__get_type_ref(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /*ptr to the type */
- int ret_value; /* Return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the type */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_STATIC
@@ -1934,7 +1818,7 @@ H5I__get_type_ref(H5I_type_t type)
/* Check arguments */
type_ptr = H5I_id_type_list_g[type];
- if(!type_ptr)
+ if (!type_ptr)
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
/* Set return value */
@@ -1944,27 +1828,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__get_type_ref() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iis_valid
+ * Function: H5Iis_valid
*
- * Purpose: Check if the given id is valid. An id is valid if it is in
+ * Purpose: Check if the given id is valid. An id is valid if it is in
* use and has an application reference count of at least 1.
*
- * Return: Success: TRUE if the id is valid, FALSE otherwise.
- *
- * Failure: Negative (never fails currently)
- *
- * Programmer: Neil Fortner
- * Friday, October 31, 2008 (boo)
+ * Return: TRUE/FALSE/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5Iis_valid(hid_t id)
{
- H5I_id_info_t *id_ptr; /* ptr to the ID */
- htri_t ret_value = TRUE; /* Return value */
+ H5I_id_info_t *id_ptr; /* ptr to the ID */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", id);
@@ -1972,30 +1850,22 @@ H5Iis_valid(hid_t id)
/* Find the ID */
if (NULL == (id_ptr = H5I__find_id(id)))
ret_value = FALSE;
-
- /* Check if the found id is an internal id */
- else if (!id_ptr->app_count)
+ else if (!id_ptr->app_count) /* Check if the found id is an internal id */
ret_value = FALSE;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iis_valid() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__search_cb
- *
- * Purpose: Callback routine for H5Isearch, when it calls H5I_iterate.
- * Calls "user" callback search function, and then sets return
- * value, based on the result of that callback.
+ * Function: H5I__search_cb
*
- * Return: Success: The first object in the type for which FUNC
- * returns non-zero. NULL if FUNC returned zero
- * for every object in the type.
- * Failure: NULL
+ * Purpose: Callback routine for H5Isearch, when it calls H5I_iterate.
+ * Calls "user" callback search function, and then sets return
+ * value, based on the result of that callback.
*
- * Programmer: Quincey Koziol
- * Friday, March 30, 2012
+ * Return: Success: H5_ITER_CONT (0) or H5_ITER_STOP (1)
+ * Failure: H5_ITER_ERROR (-1)
*
*-------------------------------------------------------------------------
*/
@@ -2003,61 +1873,56 @@ static int
H5I__search_cb(void *obj, hid_t id, void *_udata)
{
H5I_search_ud_t *udata = (H5I_search_ud_t *)_udata; /* User data for callback */
- int ret_value; /* Callback return value */
+ int ret_value; /* Callback return value */
FUNC_ENTER_STATIC_NOERR
ret_value = (*udata->app_cb)(obj, id, udata->app_key);
- if(ret_value > 0)
+ if (ret_value > 0)
udata->ret_obj = obj;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__search_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5Isearch
- *
- * Purpose: Apply function FUNC to each member of type TYPE and return a
- * pointer to the first object for which FUNC returns non-zero.
- * The FUNC should take a pointer to the object and the KEY as
- * arguments and return non-zero to terminate the search (zero
- * to continue). Public interface to H5I_search.
+ * Function: H5Isearch
*
- * Limitation: Currently there is no way to start searching from where a
- * previous search left off.
+ * Purpose: Apply function FUNC to each member of type TYPE and return a
+ * pointer to the first object for which FUNC returns non-zero.
+ * The FUNC should take a pointer to the object and the KEY as
+ * arguments and return non-zero to terminate the search (zero
+ * to continue). Public interface to H5I_search.
*
- * Return: Success: The first object in the type for which FUNC
- * returns non-zero. NULL if FUNC returned zero
- * for every object in the type.
+ * Limitation: Currently there is no way to start searching from where a
+ * previous search left off.
*
- * Failure: NULL
+ * Return: Success: The first object in the type for which FUNC
+ * returns non-zero. NULL if FUNC returned zero
+ * for every object in the type.
*
- * Programmer: James Laird
- * Nathaniel Furrer
- * Friday, April 23, 2004
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
void *
H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
{
- H5I_search_ud_t udata; /* Context for iteration */
- void *ret_value; /* Return value */
+ H5I_search_ud_t udata; /* Context for iteration */
+ void * ret_value; /* Return value */
FUNC_ENTER_API(NULL)
H5TRACE3("*x", "Itx*x", type, func, key);
/* Check arguments */
- if(H5I_IS_LIB_TYPE(type))
+ if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
/* Set up udata struct */
- udata.app_cb = func;
+ udata.app_cb = func;
udata.app_key = key;
udata.ret_obj = NULL;
- /* Note that H5I_iterate returns an error code. We ignore it
+ /* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
(void)H5I_iterate(type, H5I__search_cb, &udata, TRUE);
@@ -2069,140 +1934,132 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Isearch() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__iterate_cb
+ * Function: H5I__iterate_cb
*
- * Purpose: Callback routine for H5I_iterate, invokes "user" callback
+ * Purpose: Callback routine for H5I_iterate, invokes "user" callback
* function, and then sets return value, based on the result of
* that callback.
*
- * Return: Success: Non-negative on success
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Thursday, October 3, 2013
+ * Return: Success: H5_ITER_CONT (0) or H5_ITER_STOP (1)
+ * Failure: H5_ITER_ERROR (-1)
*
*-------------------------------------------------------------------------
*/
static int
H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
- H5I_iterate_ud_t *udata = (H5I_iterate_ud_t *)_udata; /* User data for callback */
- int ret_value = H5_ITER_CONT; /* Callback return value */
+ H5I_id_info_t * item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
+ H5I_iterate_ud_t *udata = (H5I_iterate_ud_t *)_udata; /* User data for callback */
+ int ret_value = H5_ITER_CONT; /* Callback return value */
FUNC_ENTER_STATIC_NOERR
- /* Don't make callback if app_ref is set and the appl. ref count is 0 */
- if((!udata->app_ref) || (item->app_count > 0)) {
+ /* Only invoke the callback function if this ID is visible externally and
+ * its reference count is positive.
+ */
+ if ((!udata->app_ref) || (item->app_count > 0)) {
herr_t cb_ret_val;
- /* (Casting away const OK) */
- cb_ret_val = (*udata->user_func)((void *)item->obj_ptr, item->id, udata->user_udata);
- if(cb_ret_val > 0)
- ret_value = H5_ITER_STOP; /* terminate iteration early */
- else if(cb_ret_val < 0)
- ret_value = H5_ITER_ERROR; /* indicate failure (which terminates iteration) */
- } /* end if */
+ /* Invoke callback function */
+ cb_ret_val = (*udata->user_func)((void *)item->obj_ptr, item->id,
+ udata->user_udata); /* (Casting away const OK) */
+
+ /* Set the return value based on the callback's return value */
+ if (cb_ret_val > 0)
+ ret_value = H5_ITER_STOP; /* terminate iteration early */
+ else if (cb_ret_val < 0)
+ ret_value = H5_ITER_ERROR; /* indicate failure (which terminates iteration) */
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__iterate_cb() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_iterate
+ * Function: H5I_iterate
*
- * Purpose: Apply function FUNC to each member of type TYPE (with
- * non-zero application reference count if app_ref is TRUE).
- * Stop if FUNC returns a non zero value (i.e. anything
- * other than H5_ITER_CONT).
+ * Purpose: Apply function FUNC to each member of type TYPE (with
+ * non-zero application reference count if app_ref is TRUE).
+ * Stop if FUNC returns a non zero value (i.e. anything
+ * other than H5_ITER_CONT).
*
- * If FUNC returns a positive value (i.e. H5_ITER_STOP),
- * return SUCCEED.
+ * If FUNC returns a positive value (i.e. H5_ITER_STOP),
+ * return SUCCEED.
*
- * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
- * return FAIL.
- *
- * The FUNC should take a pointer to the object and the
- * udata as arguments and return non-zero to terminate
- * siteration, and zero to continue.
+ * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
+ * return FAIL.
*
- * Limitation: Currently there is no way to start the iteration from
- * where a previous iteration left off.
+ * The FUNC should take a pointer to the object and the
+ * udata as arguments and return non-zero to terminate
+ * siteration, and zero to continue.
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Limitation: Currently there is no way to start the iteration from
+ * where a previous iteration left off.
*
- * Programmer: John Mainzer
- * Monday, December 6, 2011
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref)
{
- H5I_id_type_t *type_ptr; /*ptr to the type */
- herr_t ret_value = SUCCEED; /*return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
type_ptr = H5I_id_type_list_g[type];
/* Only iterate through ID list if it is initialized and there are IDs in type */
- if(type_ptr && type_ptr->init_count > 0 && type_ptr->id_count > 0) {
- H5I_iterate_ud_t iter_udata; /* User data for iteration callback */
- herr_t iter_status; /* Iteration status */
+ if (type_ptr && type_ptr->init_count > 0 && type_ptr->id_count > 0) {
+ H5I_iterate_ud_t iter_udata; /* User data for iteration callback */
+ herr_t iter_status; /* Iteration status */
/* Set up iterator user data */
- iter_udata.user_func = func;
+ iter_udata.user_func = func;
iter_udata.user_udata = udata;
- iter_udata.app_ref = app_ref;
+ iter_udata.app_ref = app_ref;
/* Iterate over IDs */
- if((iter_status = H5SL_iterate(type_ptr->ids, H5I__iterate_cb, &iter_udata)) < 0)
+ if ((iter_status = H5SL_iterate(type_ptr->ids, H5I__iterate_cb, &iter_udata)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "iteration failed")
- } /* end if */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_iterate() */
-
/*-------------------------------------------------------------------------
- * Function: H5I__find_id
- *
- * Purpose: Given an object ID find the info struct that describes the
- * object.
+ * Function: H5I__find_id
*
- * Return: Success: Ptr to the object's info struct.
+ * Purpose: Given an object ID find the info struct that describes the
+ * object.
*
- * Failure: NULL
+ * Return: Success: A pointer to the object's info struct.
*
- * Programmer: Unknown
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
static H5I_id_info_t *
H5I__find_id(hid_t id)
{
- H5I_type_t type; /*ID's type */
- H5I_id_type_t *type_ptr; /*ptr to the type */
- H5I_id_info_t *ret_value; /*return value */
+ H5I_type_t type; /*ID's type */
+ H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
/* Check arguments */
type = H5I_TYPE(id);
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_DONE(NULL)
-
+ if (type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_DONE(NULL)
type_ptr = H5I_id_type_list_g[type];
- if(!type_ptr || type_ptr->init_count <= 0)
- HGOTO_DONE(NULL)
+ if (!type_ptr || type_ptr->init_count <= 0)
+ HGOTO_DONE(NULL)
/* Locate the ID node for the ID */
ret_value = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id);
@@ -2211,26 +2068,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__find_id() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iget_name
- *
- * Purpose: Gets a name of an object from its ID.
+ * Function: H5Iget_name
*
- * Return: Success: The length of name.
+ * Purpose: Gets a name of an object from its ID.
*
- * Failure: -1
+ * Return: Success: The length of the name
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- *
- * Date: July 26, 2002
+ * Failure: -1
*
* Comments: Public function
- * If `name' is non-NULL then write up to `size' bytes into that
+ * If 'name' is non-NULL then write up to 'size' bytes into that
* buffer and always return the length of the entry name.
- * Otherwise `size' is ignored and the function does not store the name,
+ * Otherwise 'size' is ignored and the function does not store the name,
* just returning the number of characters required to store the name.
- * If an error occurs then the buffer pointed to by `name' (NULL or non-NULL)
+ * If an error occurs then the buffer pointed to by 'name' (NULL or non-NULL)
* is unchanged and the function returns a negative value.
* If a zero is returned for the name's length, then there is no name
* associated with the ID.
@@ -2238,110 +2090,102 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5Iget_name(hid_t id, char *name/*out*/, size_t size)
+H5Iget_name(hid_t id, char *name /*out*/, size_t size)
{
- H5G_loc_t loc; /* Object location */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "ixz", id, name, size);
/* Get object location */
- if(H5G_loc(id, &loc) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object location")
+ if (H5G_loc(id, &loc) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object location")
/* Call internal group routine to retrieve object's name */
- if((ret_value = H5G_get_name(&loc, name, size, NULL, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object name")
+ if ((ret_value = H5G_get_name(&loc, name, size, NULL, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Iget_file_id
+ * Function: H5Iget_file_id
*
- * Purpose: The public version of H5I_get_file_id(), obtains the file
- * ID given an object ID. User has to close this ID.
+ * Purpose: Obtains the file ID given an object ID. The user has to
+ * close this ID.
*
- * Return: Success: file ID
+ * Return: Success: The file ID associated with the object
*
- * Failure: a negative value
- *
- * Programmer: Raymond Lu
- * Oct 27, 2003
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5Iget_file_id(hid_t obj_id)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", obj_id);
- if((ret_value = H5I_get_file_id(obj_id, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve file ID")
+ if ((ret_value = H5I_get_file_id(obj_id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_file_id() */
-
/*-------------------------------------------------------------------------
- * Function: H5I_get_file_id
+ * Function: H5I_get_file_id
*
- * Purpose: The private version of H5Iget_file_id(), obtains the file
+ * Purpose: The private version of H5Iget_file_id(), obtains the file
* ID given an object ID.
*
- * Return: Success: file ID
- * Failure: a negative value
- *
- * Programmer: Raymond Lu
- * Oct 27, 2003
+ * Return: Success: The file ID associated with the object
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
hid_t
H5I_get_file_id(hid_t obj_id, hbool_t app_ref)
{
- H5I_type_t type; /* ID type */
- hid_t ret_value; /* Return value */
+ H5I_type_t type; /* ID type */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get object type */
type = H5I_TYPE(obj_id);
- if(type == H5I_FILE) {
+ if (type == H5I_FILE) {
/* Increment reference count on file ID */
- if(H5I_inc_ref(obj_id, app_ref) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, FAIL, "incrementing file ID failed")
+ if (H5I_inc_ref(obj_id, app_ref) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, H5I_INVALID_HID, "incrementing file ID failed")
/* Set return value */
ret_value = obj_id;
} /* end if */
- else if(type == H5I_DATATYPE || type == H5I_GROUP || type == H5I_DATASET || type == H5I_ATTR) {
- H5G_loc_t loc; /* Location of object */
+ else if (type == H5I_DATATYPE || type == H5I_GROUP || type == H5I_DATASET || type == H5I_ATTR) {
+ H5G_loc_t loc; /* Location of object */
/* Get the object location information */
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get object location")
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, H5I_INVALID_HID, "can't get object location")
/* Get the file ID for the object */
- if((ret_value = H5F_get_id(loc.oloc->file, app_ref)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get file ID")
+ if ((ret_value = H5F_get_id(loc.oloc->file, app_ref)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, H5I_INVALID_HID, "can't get file ID")
} /* end if */
else
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid object ID")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "invalid object ID")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_file_id() */
#ifdef H5I_DEBUG_OUTPUT
-
+
/*-------------------------------------------------------------------------
* Function: H5I__debug_cb
*
@@ -2358,46 +2202,45 @@ done:
static herr_t
H5I__debug_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
- H5I_type_t type = *(H5I_type_t *)_udata; /* User data */
- H5G_name_t *path = NULL;
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
+ H5I_type_t type = *(H5I_type_t *)_udata; /* User data */
+ H5G_name_t * path = NULL;
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
- fprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
- fprintf(stderr, " count = %u\n", item->count);
- fprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
+ HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
+ HDfprintf(stderr, " count = %u\n", item->count);
+ HDfprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
/* Get the group location, so we get get the name */
- switch(type) {
+ switch (type) {
case H5I_GROUP:
- path = H5G_nameof((H5G_t*)item->obj_ptr);
+ path = H5G_nameof((H5G_t *)item->obj_ptr);
break;
case H5I_DATASET:
- path = H5D_nameof((H5D_t*)item->obj_ptr);
+ path = H5D_nameof((H5D_t *)item->obj_ptr);
break;
case H5I_DATATYPE:
- path = H5T_nameof((H5T_t*)item->obj_ptr);
+ path = H5T_nameof((H5T_t *)item->obj_ptr);
break;
default:
- break; /* Other types of IDs are not stored in files */
- } /* end switch*/
-
- if(path) {
- if(path->user_path_r)
- fprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
- if(path->full_path_r)
- fprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
+ break; /* Other types of IDs are not stored in files */
+ } /* end switch*/
+
+ if (path) {
+ if (path->user_path_r)
+ HDfprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
+ if (path->full_path_r)
+ HDfprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I__debug_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5I__debug
*
@@ -2418,21 +2261,20 @@ H5I__debug(H5I_type_t type)
FUNC_ENTER_STATIC_NOERR
- fprintf(stderr, "Dumping ID type %d\n", (int)type);
+ HDfprintf(stderr, "Dumping ID type %d\n", (int)type);
type_ptr = H5I_id_type_list_g[type];
/* Header */
- fprintf(stderr, " init_count = %u\n", type_ptr->init_count);
- fprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
- fprintf(stderr, " wrapped = %u\n", type_ptr->wrapped);
- fprintf(stderr, " id_count = %u\n", type_ptr->id_count);
- fprintf(stderr, " nextid = %u\n", type_ptr->nextid);
+ HDfprintf(stderr, " init_count = %u\n", type_ptr->init_count);
+ HDfprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
+ HDfprintf(stderr, " wrapped = %u\n", type_ptr->wrapped);
+ HDfprintf(stderr, " id_count = %u\n", type_ptr->id_count);
+ HDfprintf(stderr, " nextid = %u\n", type_ptr->nextid);
/* List */
- fprintf(stderr, " List:\n");
+ HDfprintf(stderr, " List:\n");
H5SL_iterate(type_ptr->ids, H5I__debug_cb, &type);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I__debug() */
#endif /* H5I_DEBUG_OUTPUT */
-
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index 6aa4552..d2406c0 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 15, 2003
*
* Purpose: This file contains declarations which are visible only within
@@ -41,8 +41,8 @@
* type). This is the only number that must be changed since all other bit
* field sizes and masks are calculated from TYPE_BITS.
*/
-#define TYPE_BITS 7
-#define TYPE_MASK (((hid_t)1 << TYPE_BITS) - 1)
+#define TYPE_BITS 7
+#define TYPE_MASK (((hid_t)1 << TYPE_BITS) - 1)
#define H5I_MAX_NUM_TYPES TYPE_MASK
@@ -50,12 +50,11 @@
* Number of bits to use for the Atom index in each atom (assumes 8-bit
* bytes). We don't use the sign bit.
*/
-#define ID_BITS ((sizeof(hid_t) * 8) - (TYPE_BITS + 1))
-#define ID_MASK (((hid_t)1 << ID_BITS) - 1)
+#define ID_BITS ((sizeof(hid_t) * 8) - (TYPE_BITS + 1))
+#define ID_MASK (((hid_t)1 << ID_BITS) - 1)
/* Map an atom to an ID type number */
-#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a) >> ID_BITS) & TYPE_MASK))
-
+#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a) >> ID_BITS) & TYPE_MASK))
/****************************/
/* Package Private Typedefs */
@@ -67,8 +66,7 @@
/* Testing functions */
#ifdef H5I_TESTING
-H5_DLL ssize_t H5I_get_name_test(hid_t id, char *name/*out*/, size_t size,
- hbool_t *cached);
+H5_DLL ssize_t H5I_get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached);
#endif /* H5I_TESTING */
#endif /*_H5Ipkg_H*/
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index 329af52..b86de65 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -31,56 +31,52 @@
/**************************/
/* Macro to determine if a H5I_type_t is a "library type" */
-#define H5I_IS_LIB_TYPE( type ) (type > 0 && type < H5I_NTYPES)
+#define H5I_IS_LIB_TYPE(type) (type > 0 && type < H5I_NTYPES)
/* Flags for ID class */
-#define H5I_CLASS_IS_APPLICATION 0x01
-#define H5I_CLASS_REUSE_IDS 0x02
-
+#define H5I_CLASS_IS_APPLICATION 0x01
+#define H5I_CLASS_REUSE_IDS 0x02
/****************************/
/* Library Private Typedefs */
/****************************/
typedef struct H5I_class_t {
- H5I_type_t type_id; /* Class ID for the type */
- unsigned flags; /* Class behavior flags */
- unsigned reserved; /* Number of reserved IDs for this type */
- /* [A specific number of type entries may be
- * reserved to enable "constant" values to be
- * handed out which are valid IDs in the type,
- * but which do not map to any data structures
- * and are not allocated dynamically later.]
- */
- H5I_free_t free_func; /* Free function for object's of this type */
+ H5I_type_t type_id; /* Class ID for the type */
+ unsigned flags; /* Class behavior flags */
+ unsigned reserved; /* Number of reserved IDs for this type */
+ /* [A specific number of type entries may be
+ * reserved to enable "constant" values to be
+ * handed out which are valid IDs in the type,
+ * but which do not map to any data structures
+ * and are not allocated dynamically later.]
+ */
+ H5I_free_t free_func; /* Free function for object's of this type */
} H5I_class_t;
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-H5_DLL herr_t H5I_register_type(const H5I_class_t *cls);
-H5_DLL int H5I_nmembers(H5I_type_t type);
-H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref);
-H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref);
-H5_DLL void *H5I_subst(hid_t id, const void *new_object);
-H5_DLL void *H5I_object(hid_t id);
-H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type);
+H5_DLL herr_t H5I_register_type(const H5I_class_t *cls);
+H5_DLL int H5I_nmembers(H5I_type_t type);
+H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref);
+H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref);
+H5_DLL void * H5I_subst(hid_t id, const void *new_object);
+H5_DLL void * H5I_object(hid_t id);
+H5_DLL void * H5I_object_verify(hid_t id, H5I_type_t id_type);
H5_DLL H5I_type_t H5I_get_type(hid_t id);
-H5_DLL hid_t H5I_get_file_id(hid_t obj_id, hbool_t app_ref);
-H5_DLL void *H5I_remove(hid_t id);
-H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref);
-H5_DLL int H5I_get_ref(hid_t id, hbool_t app_ref);
-H5_DLL int H5I_inc_ref(hid_t id, hbool_t app_ref);
-H5_DLL int H5I_dec_ref(hid_t id);
-H5_DLL int H5I_dec_app_ref(hid_t id);
-H5_DLL int H5I_dec_app_ref_always_close(hid_t id);
-H5_DLL herr_t H5I_dec_type_ref(H5I_type_t type);
+H5_DLL hid_t H5I_get_file_id(hid_t obj_id, hbool_t app_ref);
+H5_DLL void * H5I_remove(hid_t id);
+H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref);
+H5_DLL int H5I_get_ref(hid_t id, hbool_t app_ref);
+H5_DLL int H5I_inc_ref(hid_t id, hbool_t app_ref);
+H5_DLL int H5I_dec_ref(hid_t id);
+H5_DLL int H5I_dec_app_ref(hid_t id);
+H5_DLL int H5I_dec_app_ref_always_close(hid_t id);
+H5_DLL herr_t H5I_dec_type_ref(H5I_type_t type);
#endif /* _H5Iprivate_H */
-
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index c76f06c..4542132 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -28,34 +28,34 @@
* fail otherwise).
*
* When adding types here, add a section to the 'misc19' test in test/tmisc.c
- * to verify that the H5I{inc|dec|get}_ref() routines work correctly with in.
+ * to verify that the H5I{inc|dec|get}_ref() routines work correctly with it.
*
*/
typedef enum H5I_type_t {
- H5I_UNINIT = (-2), /*uninitialized type */
- H5I_BADID = (-1), /*invalid Type */
- H5I_FILE = 1, /*type ID for File objects */
- H5I_GROUP, /*type ID for Group objects */
- H5I_DATATYPE, /*type ID for Datatype objects */
- H5I_DATASPACE, /*type ID for Dataspace objects */
- H5I_DATASET, /*type ID for Dataset objects */
- H5I_ATTR, /*type ID for Attribute objects */
- H5I_REFERENCE, /*type ID for Reference objects */
- H5I_VFL, /*type ID for virtual file layer */
- H5I_GENPROP_CLS, /*type ID for generic property list classes */
- H5I_GENPROP_LST, /*type ID for generic property lists */
- H5I_ERROR_CLASS, /*type ID for error classes */
- H5I_ERROR_MSG, /*type ID for error messages */
- H5I_ERROR_STACK, /*type ID for error stacks */
- H5I_NTYPES /*number of library types, MUST BE LAST! */
+ H5I_UNINIT = (-2), /* uninitialized type */
+ H5I_BADID = (-1), /* invalid Type */
+ H5I_FILE = 1, /* type ID for File objects */
+ H5I_GROUP, /* type ID for Group objects */
+ H5I_DATATYPE, /* type ID for Datatype objects */
+ H5I_DATASPACE, /* type ID for Dataspace objects */
+ H5I_DATASET, /* type ID for Dataset objects */
+ H5I_ATTR, /* type ID for Attribute objects */
+ H5I_REFERENCE, /* type ID for Reference objects */
+ H5I_VFL, /* type ID for virtual file layer */
+ H5I_GENPROP_CLS, /* type ID for generic property list classes */
+ H5I_GENPROP_LST, /* type ID for generic property lists */
+ H5I_ERROR_CLASS, /* type ID for error classes */
+ H5I_ERROR_MSG, /* type ID for error messages */
+ H5I_ERROR_STACK, /* type ID for error stacks */
+ H5I_NTYPES /* number of library types, MUST BE LAST! */
} H5I_type_t;
/* Type of atoms to return to users */
typedef int hid_t;
-#define H5_SIZEOF_HID_T H5_SIZEOF_INT
+#define H5_SIZEOF_HID_T H5_SIZEOF_INT
/* An invalid object ID. This is also negative for error return. */
-#define H5I_INVALID_HID (-1)
+#define H5I_INVALID_HID (-1)
/*
* Function for freeing objects. This function will be called with an object
@@ -64,7 +64,7 @@ typedef int hid_t;
* can be removed from the ID type. If the function returns negative
* (failure) then the object will remain in the ID type.
*/
-typedef herr_t (*H5I_free_t)(void*);
+typedef herr_t (*H5I_free_t)(void *);
/* Type of the function to compare objects & keys */
typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);
@@ -75,28 +75,27 @@ extern "C" {
/* Public API functions */
-H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
-H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t id_type);
-H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t id_type);
+H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
+H5_DLL void * H5Iobject_verify(hid_t id, H5I_type_t id_type);
+H5_DLL void * H5Iremove_verify(hid_t id, H5I_type_t id_type);
H5_DLL H5I_type_t H5Iget_type(hid_t id);
-H5_DLL hid_t H5Iget_file_id(hid_t id);
-H5_DLL ssize_t H5Iget_name(hid_t id, char *name/*out*/, size_t size);
-H5_DLL int H5Iinc_ref(hid_t id);
-H5_DLL int H5Idec_ref(hid_t id);
-H5_DLL int H5Iget_ref(hid_t id);
+H5_DLL hid_t H5Iget_file_id(hid_t id);
+H5_DLL ssize_t H5Iget_name(hid_t id, char *name /*out*/, size_t size);
+H5_DLL int H5Iinc_ref(hid_t id);
+H5_DLL int H5Idec_ref(hid_t id);
+H5_DLL int H5Iget_ref(hid_t id);
H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func);
-H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
-H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
-H5_DLL int H5Iinc_type_ref(H5I_type_t type);
-H5_DLL int H5Idec_type_ref(H5I_type_t type);
-H5_DLL int H5Iget_type_ref(H5I_type_t type);
-H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
-H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members);
-H5_DLL htri_t H5Itype_exists(H5I_type_t type);
-H5_DLL htri_t H5Iis_valid(hid_t id);
+H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
+H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
+H5_DLL int H5Iinc_type_ref(H5I_type_t type);
+H5_DLL int H5Idec_type_ref(H5I_type_t type);
+H5_DLL int H5Iget_type_ref(H5I_type_t type);
+H5_DLL void * H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
+H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members);
+H5_DLL htri_t H5Itype_exists(H5I_type_t type);
+H5_DLL htri_t H5Iis_valid(hid_t id);
#ifdef __cplusplus
}
#endif
#endif /* _H5Ipublic_H */
-
diff --git a/src/H5Itest.c b/src/H5Itest.c
index 1ff9484..a5969d1 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgoup.org>
+/* Programmer: Quincey Koziol
* Tuesday, July 27, 2010
*
* Purpose: ID testing functions.
@@ -21,76 +21,67 @@
/* Module Setup */
/****************/
-#define H5I_PACKAGE /*suppress error about including H5Ipkg */
-#define H5I_TESTING /*suppress warning about H5I testing funcs*/
-
+#define H5I_PACKAGE /*suppress error about including H5Ipkg */
+#define H5I_TESTING /*suppress warning about H5I testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Ipkg.h" /* IDs */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Ipkg.h" /* IDs */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5I_get_name_test
+ * Function: H5I_get_name_test
*
- * Purpose: Testing version of H5Iget_name()
+ * Purpose: Testing version of H5Iget_name()
*
- * Return: Success: The length of name.
- * Failure: -1
+ * Return: Success: The length of name.
+ * Failure: -1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 27, 2010
*
*-------------------------------------------------------------------------
*/
ssize_t
-H5I_get_name_test(hid_t id, char *name/*out*/, size_t size, hbool_t *cached)
+H5I_get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached)
{
- H5G_loc_t loc; /* Object location */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Get object location */
- if(H5G_loc(id, &loc) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object location")
+ if (H5G_loc(id, &loc) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object location")
/* Call internal group routine to retrieve object's name */
- if((ret_value = H5G_get_name(&loc, name, size, cached, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object name")
+ if ((ret_value = H5G_get_name(&loc, name, size, cached, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_name_test() */
-
diff --git a/src/H5L.c b/src/H5L.c
index 1e60398..e5109c2 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,25 +15,25 @@
/* Module Setup */
/****************/
-#define H5L_PACKAGE /*suppress error about including H5Lpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5L_init_interface
+#define H5_INTERFACE_INIT_FUNC H5L_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lpkg.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* File objects */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lpkg.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* File objects */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
@@ -41,170 +41,158 @@
#define H5L_MIN_TABLE_SIZE 32 /* Minimum size of the user-defined link type table if it is allocated */
-
/******************/
/* Local Typedefs */
/******************/
/* User data for path traversal routine for getting link info by name */
typedef struct {
- H5L_info_t *linfo; /* Buffer to return to user */
- hid_t dxpl_id; /* DXPL to use in callback */
+ H5L_info_t *linfo; /* Buffer to return to user */
+ hid_t dxpl_id; /* DXPL to use in callback */
} H5L_trav_gi_t;
/* User data for path traversal routine for getting link info by index */
typedef struct {
/* In */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Order to iterate in index */
- hsize_t n; /* Offset of link within index */
- hid_t dxpl_id; /* DXPL to use in callback */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Order to iterate in index */
+ hsize_t n; /* Offset of link within index */
+ hid_t dxpl_id; /* DXPL to use in callback */
/* Out */
- H5L_info_t *linfo; /* Buffer to return to user */
+ H5L_info_t *linfo; /* Buffer to return to user */
} H5L_trav_gibi_t;
/* User data for path traversal callback to creating a link */
typedef struct {
- H5F_t *file; /* Pointer to the file */
- H5P_genplist_t *lc_plist; /* Link creation property list */
- hid_t dxpl_id; /* Dataset transfer property list */
- H5G_name_t *path; /* Path to object being linked */
- H5O_obj_create_t *ocrt_info; /* Pointer to object creation info */
- H5O_link_t *lnk; /* Pointer to link information to insert */
+ H5F_t * file; /* Pointer to the file */
+ H5P_genplist_t * lc_plist; /* Link creation property list */
+ hid_t dxpl_id; /* Dataset transfer property list */
+ H5G_name_t * path; /* Path to object being linked */
+ H5O_obj_create_t *ocrt_info; /* Pointer to object creation info */
+ H5O_link_t * lnk; /* Pointer to link information to insert */
} H5L_trav_cr_t;
/* User data for path traversal routine for moving and renaming a link */
typedef struct {
- const char *dst_name; /* Destination name for moving object */
- H5T_cset_t cset; /* Char set for new name */
- H5G_loc_t *dst_loc; /* Destination location for moving object */
- unsigned dst_target_flags; /* Target flags for destination object */
- hbool_t copy; /* TRUE if this is a copy operation */
- hid_t lapl_id; /* LAPL to use in callback */
- hid_t dxpl_id; /* DXPL to use in callback */
+ const char *dst_name; /* Destination name for moving object */
+ H5T_cset_t cset; /* Char set for new name */
+ H5G_loc_t * dst_loc; /* Destination location for moving object */
+ unsigned dst_target_flags; /* Target flags for destination object */
+ hbool_t copy; /* TRUE if this is a copy operation */
+ hid_t lapl_id; /* LAPL to use in callback */
+ hid_t dxpl_id; /* DXPL to use in callback */
} H5L_trav_mv_t;
/* User data for path traversal routine for moving and renaming an object */
typedef struct {
- H5F_t *file; /* Pointer to the file */
- H5O_link_t *lnk; /* Pointer to link information to insert */
- hbool_t copy; /* TRUE if this is a copy operation */
- hid_t dxpl_id; /* Dataset transfer property list */
+ H5F_t * file; /* Pointer to the file */
+ H5O_link_t *lnk; /* Pointer to link information to insert */
+ hbool_t copy; /* TRUE if this is a copy operation */
+ hid_t dxpl_id; /* Dataset transfer property list */
} H5L_trav_mv2_t;
/* User data for path traversal routine for getting link value */
typedef struct {
- size_t size; /* Size of user buffer */
- void *buf; /* User buffer */
+ size_t size; /* Size of user buffer */
+ void * buf; /* User buffer */
} H5L_trav_gv_t;
/* User data for path traversal routine for getting link value by index */
typedef struct {
/* In */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Order to iterate in index */
- hsize_t n; /* Offset of link within index */
- hid_t dxpl_id; /* DXPL to use in callback */
- size_t size; /* Size of user buffer */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Order to iterate in index */
+ hsize_t n; /* Offset of link within index */
+ hid_t dxpl_id; /* DXPL to use in callback */
+ size_t size; /* Size of user buffer */
/* Out */
- void *buf; /* User buffer */
+ void *buf; /* User buffer */
} H5L_trav_gvbi_t;
/* User data for path traversal routine for removing link */
typedef struct {
- hid_t dxpl_id; /* DXPL to use in callback */
+ hid_t dxpl_id; /* DXPL to use in callback */
} H5L_trav_rm_t;
/* User data for path traversal routine for removing link by index */
typedef struct {
/* In */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Order to iterate in index */
- hsize_t n; /* Offset of link within index */
- hid_t dxpl_id; /* DXPL to use in callback */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Order to iterate in index */
+ hsize_t n; /* Offset of link within index */
+ hid_t dxpl_id; /* DXPL to use in callback */
} H5L_trav_rmbi_t;
/* User data for path traversal routine for getting name by index */
typedef struct {
/* In */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Order to iterate in index */
- hsize_t n; /* Offset of link within index */
- size_t size; /* Size of name buffer */
- hid_t dxpl_id; /* DXPL to use in callback */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Order to iterate in index */
+ hsize_t n; /* Offset of link within index */
+ size_t size; /* Size of name buffer */
+ hid_t dxpl_id; /* DXPL to use in callback */
/* Out */
- char *name; /* Buffer to return name to user */
- ssize_t name_len; /* Length of full name */
+ char * name; /* Buffer to return name to user */
+ ssize_t name_len; /* Length of full name */
} H5L_trav_gnbi_t;
/********************/
/* Local Prototypes */
/********************/
-static int H5L_find_class_idx(H5L_type_t id);
-static herr_t H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
- H5G_name_t *obj_path, H5F_t *obj_file, H5O_link_t *lnk, H5O_obj_create_t *ocrt_info,
- hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+static int H5L_find_class_idx(H5L_type_t id);
+static herr_t H5L_link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *obj_path,
+ H5F_t *obj_file, H5O_link_t *lnk, H5O_obj_create_t *ocrt_info, hid_t lcpl_id,
+ hid_t lapl_id, hid_t dxpl_id);
static herr_t H5L_get_val_real(const H5O_link_t *lnk, void *buf, size_t size);
-static herr_t H5L_get_val_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_get_val_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_delete_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_delete_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_exists_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static htri_t H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id,
- hid_t dxpl_id);
-static herr_t H5L_get_info_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_get_info_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_get_name_by_idx_cb(H5G_loc_t *grp_loc/*in*/,
- const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
+static herr_t H5L_get_val_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_get_val_by_idx_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_delete_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_delete_by_idx_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_exists_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static htri_t H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id);
+static herr_t H5L_get_info_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_get_info_by_idx_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/);
+static herr_t H5L_get_name_by_idx_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
/* Information about user-defined links */
-static size_t H5L_table_alloc_g = 0;
-static size_t H5L_table_used_g = 0;
-static H5L_class_t *H5L_table_g = NULL;
+static size_t H5L_table_alloc_g = 0;
+static size_t H5L_table_used_g = 0;
+static H5L_class_t *H5L_table_g = NULL;
-
/*-------------------------------------------------------------------------
* Function: H5L_init
*
@@ -222,7 +210,7 @@ static H5L_class_t *H5L_table_g = NULL;
herr_t
H5L_init(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -231,7 +219,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_init() */
-
/*-------------------------------------------------------------------------
* Function: H5L_init_interface
*
@@ -247,19 +234,18 @@ done:
static herr_t
H5L_init_interface(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Initialize user-defined link classes */
- if(H5L_register_external() < 0)
+ if (H5L_register_external() < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_init_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5L_term_interface
*
@@ -280,7 +266,7 @@ H5L_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the table of link types */
- H5L_table_g = (H5L_class_t *)H5MM_xfree(H5L_table_g);
+ H5L_table_g = (H5L_class_t *)H5MM_xfree(H5L_table_g);
H5L_table_used_g = H5L_table_alloc_g = 0;
/* Mark the interface as uninitialized */
@@ -289,7 +275,6 @@ H5L_term_interface(void)
FUNC_LEAVE_NOAPI(n)
} /* H5L_term_interface() */
-
/*-------------------------------------------------------------------------
* Function: H5Lmove
*
@@ -297,8 +282,8 @@ H5L_term_interface(void)
* group. The original name SRC is unlinked from the group graph
* and then inserted with the new name DST (which can specify a
* new path for the object) as an atomic operation. The names
- * are interpreted relative to SRC_LOC_ID and
- * DST_LOC_ID, which are either file IDs or group ID.
+ * are interpreted relative to SRC_LOC_ID and DST_LOC_ID,
+ * which are either file IDs or group ID.
*
* Return: Non-negative on success/Negative on failure
*
@@ -308,49 +293,46 @@ H5L_term_interface(void)
*-------------------------------------------------------------------------
*/
herr_t
-H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name, hid_t lcpl_id, hid_t lapl_id)
+H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t lcpl_id,
+ hid_t lapl_id)
{
- H5G_loc_t src_loc, *src_loc_p;
- H5G_loc_t dst_loc, *dst_loc_p;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5G_loc_t src_loc, *src_loc_p;
+ H5G_loc_t dst_loc, *dst_loc_p;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id,
- lapl_id);
+ H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id, lapl_id);
/* Check arguments */
- if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC")
- if(src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
+ if (src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
+ if (dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!src_name || !*src_name)
+ if (!src_name || !*src_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!dst_name || !*dst_name)
+ if (!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
- if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
/* Set up src & dst location pointers */
src_loc_p = &src_loc;
dst_loc_p = &dst_loc;
- if(src_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC)
src_loc_p = dst_loc_p;
- else if(dst_loc_id == H5L_SAME_LOC)
+ else if (dst_loc_id == H5L_SAME_LOC)
dst_loc_p = src_loc_p;
/* Move the link */
- if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id,
- lapl_id, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
+ if (H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lmove() */
-
/*-------------------------------------------------------------------------
* Function: H5Lcopy
*
@@ -366,49 +348,46 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name, hid_t lcpl_id, hid_t lapl_id)
+H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t lcpl_id,
+ hid_t lapl_id)
{
- H5G_loc_t src_loc, *src_loc_p;
- H5G_loc_t dst_loc, *dst_loc_p;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5G_loc_t src_loc, *src_loc_p;
+ H5G_loc_t dst_loc, *dst_loc_p;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id,
- lapl_id);
+ H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id, lapl_id);
/* Check arguments */
- if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC")
- if(src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
+ if (src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
+ if (dst_loc_id != H5L_SAME_LOC && H5G_loc(dst_loc_id, &dst_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!src_name || !*src_name)
+ if (!src_name || !*src_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!dst_name || !*dst_name)
+ if (!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
- if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
/* Set up src & dst location pointers */
src_loc_p = &src_loc;
dst_loc_p = &dst_loc;
- if(src_loc_id == H5L_SAME_LOC)
+ if (src_loc_id == H5L_SAME_LOC)
src_loc_p = dst_loc_p;
- else if(dst_loc_id == H5L_SAME_LOC)
+ else if (dst_loc_id == H5L_SAME_LOC)
dst_loc_p = src_loc_p;
/* Copy the link */
- if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, TRUE, lcpl_id,
- lapl_id, H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
+ if (H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, TRUE, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lcopy() */
-
/*-------------------------------------------------------------------------
* Function: H5Lcreate_soft
*
@@ -428,34 +407,33 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lcreate_soft(const char *link_target,
- hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id)
+H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name, hid_t lcpl_id,
+ hid_t lapl_id)
{
- H5G_loc_t link_loc; /* Group location for new link */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t link_loc; /* Group location for new link */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*si*sii", link_target, link_loc_id, link_name, lcpl_id, lapl_id);
/* Check arguments */
- if(H5G_loc(link_loc_id, &link_loc) < 0)
+ if (H5G_loc(link_loc_id, &link_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!link_target || !*link_target)
+ if (!link_target || !*link_target)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no target specified")
- if(!link_name || !*link_name)
+ if (!link_name || !*link_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
- if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
/* Create the link */
- if(H5L_create_soft(link_target, &link_loc, link_name, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_create_soft(link_target, &link_loc, link_name, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_soft() */
-
/*-------------------------------------------------------------------------
* Function: H5Lcreate_hard
*
@@ -473,51 +451,48 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
- hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id)
+H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
+ hid_t lapl_id)
{
- H5G_loc_t cur_loc, *cur_loc_p;
- H5G_loc_t new_loc, *new_loc_p;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t cur_loc, *cur_loc_p;
+ H5G_loc_t new_loc, *new_loc_p;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*si*sii", cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id,
- lapl_id);
+ H5TRACE6("e", "i*si*sii", cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id);
/* Check arguments */
- if(cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC)
+ if (cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not be both H5L_SAME_LOC")
- if(cur_loc_id != H5L_SAME_LOC && H5G_loc(cur_loc_id, &cur_loc) < 0)
+ if (cur_loc_id != H5L_SAME_LOC && H5G_loc(cur_loc_id, &cur_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(new_loc_id != H5L_SAME_LOC && H5G_loc(new_loc_id, &new_loc) < 0)
+ if (new_loc_id != H5L_SAME_LOC && H5G_loc(new_loc_id, &new_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!cur_name || !*cur_name)
+ if (!cur_name || !*cur_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified")
- if(!new_name || !*new_name)
+ if (!new_name || !*new_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified")
- if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
/* Set up current & new location pointers */
cur_loc_p = &cur_loc;
new_loc_p = &new_loc;
- if(cur_loc_id == H5L_SAME_LOC)
+ if (cur_loc_id == H5L_SAME_LOC)
cur_loc_p = new_loc_p;
- else if(new_loc_id == H5L_SAME_LOC)
+ else if (new_loc_id == H5L_SAME_LOC)
new_loc_p = cur_loc_p;
- else if(cur_loc_p->oloc->file != new_loc_p->oloc->file)
+ else if (cur_loc_p->oloc->file != new_loc_p->oloc->file)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should be in the same file.")
/* Create the link */
- if(H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name,
- lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_hard() */
-
/*-------------------------------------------------------------------------
* Function: H5Lcreate_ud
*
@@ -543,39 +518,37 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
- const void *udata, size_t udata_size, hid_t lcpl_id, hid_t lapl_id)
+H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, const void *udata,
+ size_t udata_size, hid_t lcpl_id, hid_t lapl_id)
{
- H5G_loc_t link_loc;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t link_loc;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sLl*xzii", link_loc_id, link_name, link_type, udata,
- udata_size, lcpl_id, lapl_id);
+ H5TRACE7("e", "i*sLl*xzii", link_loc_id, link_name, link_type, udata, udata_size, lcpl_id, lapl_id);
/* Check arguments */
- if(H5G_loc(link_loc_id, &link_loc) < 0)
+ if (H5G_loc(link_loc_id, &link_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!link_name || !*link_name)
+ if (!link_name || !*link_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified")
- if(link_type < H5L_TYPE_UD_MIN || link_type > H5L_TYPE_MAX)
+ if (link_type < H5L_TYPE_UD_MIN || link_type > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class")
/* Create external link */
- if(H5L_create_ud(&link_loc, link_name, udata, udata_size, link_type, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_create_ud(&link_loc, link_name, udata, udata_size, link_type, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_ud() */
-
/*-------------------------------------------------------------------------
* Function: H5Ldelete
*
* Purpose: Removes the specified NAME from the group graph and
* decrements the link count for the object to which NAME
- * points. If the link count reaches zero then all file-space
+ * points. If the link count reaches zero then all file-space
* associated with the object will be reclaimed (but if the
* object is open, then the reclamation of the file space is
* delayed until all handles to the object are closed).
@@ -590,27 +563,26 @@ done:
herr_t
H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id)
{
- H5G_loc_t loc; /* Group's location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*si", loc_id, name, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Unlink */
- if(H5L_delete(&loc, name, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_delete(&loc, name, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ldelete() */
-
/*-------------------------------------------------------------------------
* Function: H5Ldelete_by_idx
*
@@ -631,46 +603,45 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id)
+H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t lapl_id)
{
- H5G_loc_t loc; /* Group's location */
- H5L_trav_rmbi_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group's location */
+ H5L_trav_rmbi_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*sIiIohi", loc_id, group_name, idx_type, order, n, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
+ if (!group_name || !*group_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up user data for unlink operation */
udata.idx_type = idx_type;
- udata.order = order;
- udata.n = n;
- udata.dxpl_id = H5AC_dxpl_id;
+ udata.order = order;
+ udata.n = n;
+ udata.dxpl_id = H5AC_dxpl_id;
/* Traverse the group hierarchy to remove the link */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT, H5L_delete_by_idx_cb, &udata, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT,
+ H5L_delete_by_idx_cb, &udata, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ldelete_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Lget_val
*
@@ -691,35 +662,32 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
- hid_t lapl_id)
+H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t lapl_id)
{
- H5G_loc_t loc; /* Group location for location to query */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group location for location to query */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*sxzi", loc_id, name, buf, size, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Get the link value */
- if(H5L_get_val(&loc, name, buf, size, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5L_get_val(&loc, name, buf, size, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link value for '%s'", name)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_val() */
-
/*-------------------------------------------------------------------------
* Function: H5Lget_val_by_idx
*
@@ -739,58 +707,53 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, void *buf/*out*/, size_t size,
- hid_t lapl_id)
+H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ void *buf /*out*/, size_t size, hid_t lapl_id)
{
- H5G_loc_t loc; /* Group location for location to query */
- H5L_trav_gvbi_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group location for location to query */
+ H5L_trav_gvbi_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, buf, size,
- lapl_id);
+ H5TRACE8("e", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, buf, size, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
+ if (!group_name || !*group_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up user data for retrieving information */
udata.idx_type = idx_type;
- udata.order = order;
- udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
- udata.buf = buf;
- udata.size = size;
+ udata.order = order;
+ udata.n = n;
+ udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.buf = buf;
+ udata.size = size;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_by_idx_cb, &udata,
+ lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
-
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_val_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Lexists
*
* Purpose: Checks if a link of a given name exists in a group
*
- * Return: Success: TRUE/FALSE
- * Failure: Negative
+ * Return: Success: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
* Friday, March 16, 2007
@@ -800,39 +763,39 @@ done:
htri_t
H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
{
- H5G_loc_t loc;
- htri_t ret_value;
+ H5G_loc_t loc;
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
+ if (!name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
+ if (!*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string")
+
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Check for the existence of the link */
- if((ret_value = H5L_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5L_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lexists() */
-
/*-------------------------------------------------------------------------
* Function: H5Lget_info
*
* Purpose: Gets metadata for a link.
*
* Return: Success: Non-negative with information in LINFO
- *
* Failure: Negative
*
* Programmer: James Laird
@@ -841,35 +804,33 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
- hid_t lapl_id)
+H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/, hid_t lapl_id)
{
- H5G_loc_t loc;
- herr_t ret_value = SUCCEED;
+ H5G_loc_t loc;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sxi", loc_id, name, linfo, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
+
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Get the link information */
- if(H5L_get_info(&loc, name, linfo, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5L_get_info(&loc, name, linfo, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_info() */
-
/*-------------------------------------------------------------------------
* Function: H5Lget_info_by_idx
*
@@ -885,50 +846,46 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5L_info_t *linfo /*out*/, hid_t lapl_id)
+H5Lget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, H5L_info_t *linfo /*out*/, hid_t lapl_id)
{
- H5G_loc_t loc; /* Group location for group to query */
- H5L_trav_gibi_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Group location for group to query */
+ H5L_trav_gibi_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIohxi", loc_id, group_name, idx_type, order, n, linfo,
- lapl_id);
+ H5TRACE7("e", "i*sIiIohxi", loc_id, group_name, idx_type, order, n, linfo, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
+ if (!group_name || !*group_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up user data for callback */
udata.idx_type = idx_type;
- udata.order = order;
- udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
- udata.linfo = linfo;
+ udata.order = order;
+ udata.n = n;
+ udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.linfo = linfo;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_get_info_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_info_by_idx_cb, &udata,
+ lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
-
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_info_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Lregister
*
@@ -951,35 +908,34 @@ done:
herr_t
H5Lregister(const H5L_class_t *cls)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", cls);
/* Check args */
- if(cls == NULL)
+ if (cls == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class")
/* Check H5L_class_t version number; this is where a function to convert
* from an outdated version should be called.
*/
- if(cls->version != H5L_LINK_CLASS_T_VERS)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5L_class_t version number")
+ if (cls->version != H5L_LINK_CLASS_T_VERS)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5L_class_t version number")
- if(cls->id < H5L_TYPE_UD_MIN || cls->id > H5L_TYPE_MAX)
+ if (cls->id < H5L_TYPE_UD_MIN || cls->id > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link identification number")
- if(cls->trav_func == NULL)
+ if (cls->trav_func == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no traversal function specified")
/* Do it */
- if(H5L_register(cls) < 0)
+ if (H5L_register(cls) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register link type")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lregister() */
-
/*-------------------------------------------------------------------------
* Function: H5Lunregister
*
@@ -998,33 +954,32 @@ done:
herr_t
H5Lunregister(H5L_type_t id)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "Ll", id);
/* Check args */
- if(id < 0 || id > H5L_TYPE_MAX)
+ if (id < 0 || id > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type")
/* Do it */
- if(H5L_unregister(id) < 0)
+ if (H5L_unregister(id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to unregister link type")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lunregister() */
-
/*-------------------------------------------------------------------------
* Function: H5Lis_registered
*
* Purpose: Tests whether a user-defined link class has been registered
* or not.
*
- * Return: Positive if the link class has been registered
- * Zero if it is unregistered
- * Negative on error (if the class is not a valid UD class ID)
+ * Return: TRUE if the link class has been registered
+ * FALSE if it is unregistered
+ * FAIL on error (if the class is not a valid UD class ID)
*
* Programmer: James Laird
* Monday, July 10, 2006
@@ -1034,19 +989,19 @@ done:
htri_t
H5Lis_registered(H5L_type_t id)
{
- size_t i; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ size_t i; /* Local index variable */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "Ll", id);
/* Check args */
- if(id < 0 || id > H5L_TYPE_MAX)
+ if (id < 0 || id > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type id number")
/* Is the link class already registered? */
- for(i = 0; i < H5L_table_used_g; i++)
- if(H5L_table_g[i].id == id) {
+ for (i = 0; i < H5L_table_used_g; i++)
+ if (H5L_table_g[i].id == id) {
ret_value = TRUE;
break;
} /* end if */
@@ -1055,7 +1010,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lis_registered() */
-
/*-------------------------------------------------------------------------
* Function: H5Lget_name_by_idx
*
@@ -1065,8 +1019,9 @@ done:
* Same pattern of behavior as H5Iget_name.
*
* Return: Success: Non-negative length of name, with information
- * in NAME buffer
- * Failure: Negative
+ * in NAME buffer
+ *
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Saturday, November 11, 2006
@@ -1074,45 +1029,44 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- char *name /*out*/, size_t size, hid_t lapl_id)
+H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, char *name /*out*/, size_t size, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- H5L_trav_gnbi_t udata; /* User data for callback */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ H5L_trav_gnbi_t udata; /* User data for callback */
+ ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE8("Zs", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, name, size,
- lapl_id);
+ FUNC_ENTER_API((-1))
+ H5TRACE8("Zs", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, name, size, lapl_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc))
+ if (H5G_loc(loc_id, &loc))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (!group_name || !*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name specified")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid iteration order specified")
+
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not link access property list ID")
/* Set up user data for callback */
udata.idx_type = idx_type;
- udata.order = order;
- udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
- udata.name = name;
- udata.size = size;
+ udata.order = order;
+ udata.n = n;
+ udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.name = name;
+ udata.size = size;
udata.name_len = -1;
/* Traverse the group hierarchy to locate the link to get name of */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_get_name_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
+ if (H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_name_by_idx_cb, &udata,
+ lapl_id, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_EXISTS, (-1), "name doesn't exist")
/* Set the return value */
ret_value = udata.name_len;
@@ -1121,7 +1075,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_name_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5Literate
*
@@ -1131,64 +1084,60 @@ done:
* Same pattern of behavior as H5Giterate.
*
* Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
* Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
- *
- *
- * Programmer: Quincey Koziol
- * Thursday, November 16, 2006
+ * library, or the negative value returned by one
+ * of the operators.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t *idx_p, H5L_iterate_t op, void *op_data)
+H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p, H5L_iterate_t op,
+ void *op_data)
{
- H5I_type_t id_type; /* Type of ID */
- H5G_link_iterate_t lnk_op; /* Link operator */
- hsize_t last_lnk; /* Index of last object looked at */
- hsize_t idx; /* Internal location to hold index */
- herr_t ret_value; /* Return value */
+ H5I_type_t id_type; /* Type of ID */
+ H5G_link_iterate_t lnk_op; /* Link operator */
+ hsize_t last_lnk; /* Index of last object looked at */
+ hsize_t idx; /* Internal location to hold index */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIiIo*hx*x", grp_id, idx_type, order, idx_p, op, op_data);
/* Check arguments */
id_type = H5I_get_type(grp_id);
- if(!(H5I_GROUP == id_type || H5I_FILE == id_type))
+ if (!(H5I_GROUP == id_type || H5I_FILE == id_type))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified")
/* Set up iteration beginning/end info */
- idx = (idx_p == NULL ? 0 : *idx_p);
+ idx = (idx_p == NULL ? 0 : *idx_p);
last_lnk = 0;
/* Build link operator info */
- lnk_op.op_type = H5G_LINK_OP_NEW;
+ lnk_op.op_type = H5G_LINK_OP_NEW;
lnk_op.op_func.op_new = op;
/* Iterate over the links */
- if((ret_value = H5G_iterate(grp_id, ".", idx_type, order, idx, &last_lnk, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5G_iterate(grp_id, ".", idx_type, order, idx, &last_lnk, &lnk_op, op_data, H5P_DEFAULT,
+ H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed")
/* Set the index we stopped at */
- if(idx_p)
+ if (idx_p)
*idx_p = last_lnk;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Literate() */
-
/*-------------------------------------------------------------------------
* Function: H5Literate_by_name
*
@@ -1198,12 +1147,12 @@ done:
* Same pattern of behavior as H5Giterate.
*
* Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
* Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * library, or the negative value returned by one
+ * of the operators.
*
*
* Programmer: Quincey Koziol
@@ -1212,55 +1161,54 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Literate_by_name(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p,
- H5L_iterate_t op, void *op_data, hid_t lapl_id)
+H5Literate_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t *idx_p, H5L_iterate_t op, void *op_data, hid_t lapl_id)
{
- H5G_link_iterate_t lnk_op; /* Link operator */
- hsize_t last_lnk; /* Index of last object looked at */
- hsize_t idx; /* Internal location to hold index */
- herr_t ret_value; /* Return value */
+ H5G_link_iterate_t lnk_op; /* Link operator */
+ hsize_t last_lnk; /* Index of last object looked at */
+ hsize_t idx; /* Internal location to hold index */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, group_name, idx_type, order, idx_p, op,
- op_data, lapl_id);
+ H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, group_name, idx_type, order, idx_p, op, op_data, lapl_id);
/* Check arguments */
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (!group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL")
+ if (!*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up iteration beginning/end info */
- idx = (idx_p == NULL ? 0 : *idx_p);
+ idx = (idx_p == NULL ? 0 : *idx_p);
last_lnk = 0;
/* Build link operator info */
- lnk_op.op_type = H5G_LINK_OP_NEW;
+ lnk_op.op_type = H5G_LINK_OP_NEW;
lnk_op.op_func.op_new = op;
/* Iterate over the links */
- if((ret_value = H5G_iterate(loc_id, group_name, idx_type, order, idx, &last_lnk, &lnk_op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5G_iterate(loc_id, group_name, idx_type, order, idx, &last_lnk, &lnk_op, op_data,
+ lapl_id, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed")
/* Set the index we stopped at */
- if(idx_p)
+ if (idx_p)
*idx_p = last_lnk;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Literate_by_name() */
-
/*-------------------------------------------------------------------------
* Function: H5Lvisit
*
@@ -1277,12 +1225,12 @@ done:
* _object_.
*
* Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
* Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * library, or the negative value returned by one
+ * of the operators.
*
* Programmer: Quincey Koziol
* November 24 2007
@@ -1290,35 +1238,33 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
- H5L_iterate_t op, void *op_data)
+H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, void *op_data)
{
- H5I_type_t id_type; /* Type of ID */
- herr_t ret_value; /* Return value */
+ H5I_type_t id_type; /* Type of ID */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIiIox*x", grp_id, idx_type, order, op, op_data);
/* Check args */
id_type = H5I_get_type(grp_id);
- if(!(H5I_GROUP == id_type || H5I_FILE == id_type))
+ if (!(H5I_GROUP == id_type || H5I_FILE == id_type))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
/* Call internal group visitation routine */
- if((ret_value = H5G_visit(grp_id, ".", idx_type, order, op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5G_visit(grp_id, ".", idx_type, order, op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link visitation failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lvisit() */
-
/*-------------------------------------------------------------------------
* Function: H5Lvisit_by_name
*
@@ -1335,12 +1281,12 @@ done:
* _object_.
*
* Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
* Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * library, or the negative value returned by one
+ * of the operators.
*
* Programmer: Quincey Koziol
* November 3 2007
@@ -1348,32 +1294,34 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id)
+H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ H5L_iterate_t op, void *op_data, hid_t lapl_id)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIox*xi", loc_id, group_name, idx_type, order, op, op_data,
- lapl_id);
+ H5TRACE7("e", "i*sIiIox*xi", loc_id, group_name, idx_type, order, op, op_data, lapl_id);
/* Check args */
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ if (!group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL")
+ if (!*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
- if(H5P_DEFAULT == lapl_id)
+
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Call internal group visitation routine */
- if((ret_value = H5G_visit(loc_id, group_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5G_visit(loc_id, group_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) <
+ 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link visitation failed")
done:
@@ -1388,7 +1336,6 @@ done:
*-------------------------------------------------------------------------
*/
-
/*-------------------------------------------------------------------------
* Function: H5L_find_class_idx
*
@@ -1407,20 +1354,19 @@ done:
static int
H5L_find_class_idx(H5L_type_t id)
{
- size_t i; /* Local index variable */
- int ret_value = FAIL; /* Return value */
+ size_t i; /* Local index variable */
+ int ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- for(i = 0; i < H5L_table_used_g; i++)
- if(H5L_table_g[i].id == id)
+ for (i = 0; i < H5L_table_used_g; i++)
+ if (H5L_table_g[i].id == id)
HGOTO_DONE((int)i)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_find_class_idx */
-
/*-------------------------------------------------------------------------
* Function: H5L_find_class
*
@@ -1438,23 +1384,22 @@ done:
const H5L_class_t *
H5L_find_class(H5L_type_t id)
{
- int idx; /* Filter index in global table */
- H5L_class_t *ret_value = NULL; /* Return value */
+ int idx; /* Filter index in global table */
+ H5L_class_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Get the index in the global table */
- if((idx = H5L_find_class_idx(id)) < 0)
+ if ((idx = H5L_find_class_idx(id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class")
/* Set return value */
- ret_value = H5L_table_g+idx;
+ ret_value = H5L_table_g + idx;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_find_class */
-
/*-------------------------------------------------------------------------
* Function: H5L_register
*
@@ -1473,8 +1418,8 @@ done:
herr_t
H5L_register(const H5L_class_t *cls)
{
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1482,23 +1427,23 @@ H5L_register(const H5L_class_t *cls)
HDassert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
/* Is the link type already registered? */
- for(i = 0; i < H5L_table_used_g; i++)
- if(H5L_table_g[i].id == cls->id)
+ for (i = 0; i < H5L_table_used_g; i++)
+ if (H5L_table_g[i].id == cls->id)
break;
/* Filter not already registered */
- if(i >= H5L_table_used_g) {
- if(H5L_table_used_g >= H5L_table_alloc_g) {
- size_t n = MAX(H5L_MIN_TABLE_SIZE, (2 * H5L_table_alloc_g));
+ if (i >= H5L_table_used_g) {
+ if (H5L_table_used_g >= H5L_table_alloc_g) {
+ size_t n = MAX(H5L_MIN_TABLE_SIZE, (2 * H5L_table_alloc_g));
H5L_class_t *table = (H5L_class_t *)H5MM_realloc(H5L_table_g, (n * sizeof(H5L_class_t)));
- if(!table)
+ if (!table)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table")
- H5L_table_g = table;
+ H5L_table_g = table;
H5L_table_alloc_g = n;
- } /* end if */
+ } /* end if */
- /* Initialize */
- i = H5L_table_used_g++;
+ /* Initialize */
+ i = H5L_table_used_g++;
} /* end if */
/* Copy link class info into table */
@@ -1508,7 +1453,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_register */
-
/*-------------------------------------------------------------------------
* Function: H5L_unregister
*
@@ -1526,20 +1470,20 @@ done:
herr_t
H5L_unregister(H5L_type_t id)
{
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(id >= 0 && id <= H5L_TYPE_MAX);
/* Is the filter already registered? */
- for(i = 0; i < H5L_table_used_g; i++)
- if(H5L_table_g[i].id == id)
+ for (i = 0; i < H5L_table_used_g; i++)
+ if (H5L_table_g[i].id == id)
break;
/* Fail if filter not found */
- if(i >= H5L_table_used_g)
+ if (i >= H5L_table_used_g)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered")
/* Remove filter from table */
@@ -1551,7 +1495,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_unregister() */
-
/*-------------------------------------------------------------------------
* Function: H5L_link
*
@@ -1566,11 +1509,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc,
- hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
+H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid_t lcpl_id, hid_t lapl_id,
+ hid_t dxpl_id)
{
- H5O_link_t lnk; /* Link to insert */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t lnk; /* Link to insert */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1585,18 +1528,18 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc,
*/
/* Construct link information for eventual insertion */
- lnk.type = H5L_TYPE_HARD;
+ lnk.type = H5L_TYPE_HARD;
lnk.u.hard.addr = obj_loc->oloc->addr;
/* Create the link */
- if(H5L_create_real(new_loc, new_name, obj_loc->path, obj_loc->oloc->file, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
+ if (H5L_create_real(new_loc, new_name, obj_loc->path, obj_loc->oloc->file, &lnk, NULL, lcpl_id, lapl_id,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_link() */
-
/*-------------------------------------------------------------------------
* Function: H5L_link_object
*
@@ -1610,11 +1553,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
- H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
+H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t *ocrt_info, hid_t lcpl_id,
+ hid_t lapl_id, hid_t dxpl_id)
{
- H5O_link_t lnk; /* Link to insert */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t lnk; /* Link to insert */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1632,14 +1575,13 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
lnk.type = H5L_TYPE_HARD;
/* Create the link */
- if(H5L_create_real(new_loc, new_name, NULL, NULL, &lnk, ocrt_info, lcpl_id, lapl_id, dxpl_id) < 0)
+ if (H5L_create_real(new_loc, new_name, NULL, NULL, &lnk, ocrt_info, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_link_object() */
-
/*-------------------------------------------------------------------------
* Function: H5L_link_cb
*
@@ -1653,33 +1595,35 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5L_link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_cr_t *udata = (H5L_trav_cr_t *)_udata; /* User data passed in */
- H5G_t *grp = NULL; /* H5G_t for this group, opened to pass to user callback */
- hid_t grp_id = FAIL; /* Id for this group (passed to user callback */
- H5G_loc_t temp_loc; /* For UD callback */
- hbool_t temp_loc_init = FALSE; /* Temporary location for UD callback (temp_loc) has been initialized */
- hbool_t obj_created = FALSE; /* Whether an object was created (through a hard link) */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_cr_t *udata = (H5L_trav_cr_t *)_udata; /* User data passed in */
+ H5G_t * grp = NULL; /* H5G_t for this group, opened to pass to user callback */
+ hid_t grp_id = FAIL; /* Id for this group (passed to user callback */
+ H5G_loc_t temp_loc; /* For UD callback */
+ hbool_t temp_loc_init = FALSE; /* Temporary location for UD callback (temp_loc) has been initialized */
+ hbool_t obj_created = FALSE; /* Whether an object was created (through a hard link) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid location */
/* (which is not what we want) */
- if(obj_loc != NULL)
+ if (obj_loc != NULL)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name already exists")
/* Check for crossing file boundaries with a new hard link */
- if(udata->lnk->type == H5L_TYPE_HARD) {
+ if (udata->lnk->type == H5L_TYPE_HARD) {
/* Check for creating an object */
/* (only for hard links) */
- if(udata->ocrt_info) {
- H5G_loc_t new_loc; /* Group location for new object */
+ if (udata->ocrt_info) {
+ H5G_loc_t new_loc; /* Group location for new object */
/* Create new object at this location */
- if(NULL == (udata->ocrt_info->new_obj = H5O_obj_create(grp_loc->oloc->file, udata->ocrt_info->obj_type, udata->ocrt_info->crt_info, &new_loc, udata->dxpl_id)))
+ if (NULL == (udata->ocrt_info->new_obj =
+ H5O_obj_create(grp_loc->oloc->file, udata->ocrt_info->obj_type,
+ udata->ocrt_info->crt_info, &new_loc, udata->dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create object")
/* Set address for hard link */
@@ -1693,57 +1637,57 @@ H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t H5_ATTR
} /* end if */
else {
/* Check that both objects are in same file */
- if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
+ if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "interfile hard links are not allowed")
} /* end else */
- } /* end if */
+ } /* end if */
/* Set 'standard' aspects of link */
- udata->lnk->corder = 0; /* Will be re-written during group insertion, if the group is tracking creation order */
- udata->lnk->corder_valid = FALSE; /* Creation order not valid (yet) */
+ udata->lnk->corder =
+ 0; /* Will be re-written during group insertion, if the group is tracking creation order */
+ udata->lnk->corder_valid = FALSE; /* Creation order not valid (yet) */
/* Check for non-default link creation properties */
- if(udata->lc_plist) {
+ if (udata->lc_plist) {
/* Get character encoding property */
- if(H5P_get(udata->lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &udata->lnk->cset) < 0)
+ if (H5P_get(udata->lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &udata->lnk->cset) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding")
} /* end if */
else
- udata->lnk->cset = H5F_DEFAULT_CSET; /* Default character encoding for link */
+ udata->lnk->cset = H5F_DEFAULT_CSET; /* Default character encoding for link */
/* Set the link's name correctly */
/* Casting away const OK -QAK */
udata->lnk->name = (char *)name;
/* Insert link into group */
- if(H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE,
- udata->ocrt_info ? udata->ocrt_info->obj_type : H5O_TYPE_UNKNOWN,
- udata->ocrt_info ? udata->ocrt_info->crt_info : NULL,
- udata->dxpl_id) < 0)
+ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE,
+ udata->ocrt_info ? udata->ocrt_info->obj_type : H5O_TYPE_UNKNOWN,
+ udata->ocrt_info ? udata->ocrt_info->crt_info : NULL, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object")
/* Set object's path if it has been passed in and is not set */
- if(udata->path != NULL && udata->path->user_path_r == NULL)
- if(H5G_name_set(grp_loc->path, udata->path, name) < 0)
+ if (udata->path != NULL && udata->path->user_path_r == NULL)
+ if (H5G_name_set(grp_loc->path, udata->path, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name")
/* If link is a user-defined link, trigger its creation callback if it has one */
- if(udata->lnk->type >= H5L_TYPE_UD_MIN) {
- const H5L_class_t *link_class; /* User-defined link class */
+ if (udata->lnk->type >= H5L_TYPE_UD_MIN) {
+ const H5L_class_t *link_class; /* User-defined link class */
/* Get the link class for this type of link. */
- if(NULL == (link_class = H5L_find_class(udata->lnk->type)))
+ if (NULL == (link_class = H5L_find_class(udata->lnk->type)))
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to get class of UD link")
- if(link_class->create_func != NULL) {
- H5O_loc_t temp_oloc;
- H5G_name_t temp_path;
+ if (link_class->create_func != NULL) {
+ H5O_loc_t temp_oloc;
+ H5G_name_t temp_path;
/* Create a temporary location (or else H5G_open will do a shallow
* copy and wipe out grp_loc)
*/
H5G_name_reset(&temp_path);
- if(H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
temp_loc.oloc = &temp_oloc;
@@ -1751,21 +1695,22 @@ H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t H5_ATTR
temp_loc_init = TRUE;
/* Set up location for user-defined callback */
- if((grp = H5G_open(&temp_loc, udata->dxpl_id)) == NULL)
+ if ((grp = H5G_open(&temp_loc, udata->dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((grp_id = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((grp_id = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register ID for group")
/* Make callback */
- if((link_class->create_func)(name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size, H5P_DEFAULT) < 0)
+ if ((link_class->create_func)(name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size,
+ H5P_DEFAULT) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "link creation callback failed")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Check if an object was created */
- if(obj_created) {
- H5O_loc_t oloc; /* Object location for created object */
+ if (obj_created) {
+ H5O_loc_t oloc; /* Object location for created object */
/* Set up object location */
HDmemset(&oloc, 0, sizeof(oloc));
@@ -1773,20 +1718,20 @@ done:
oloc.addr = udata->lnk->u.hard.addr;
/* Decrement refcount on new object's object header in memory */
- if(H5O_dec_rc_by_loc(&oloc, udata->dxpl_id) < 0)
- HDONE_ERROR(H5E_LINK, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
+ if (H5O_dec_rc_by_loc(&oloc, udata->dxpl_id) < 0)
+ HDONE_ERROR(H5E_LINK, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
/* Close the location given to the user callback if it was created */
- if(grp_id >= 0) {
- if(H5I_dec_app_ref(grp_id) < 0)
+ if (grp_id >= 0) {
+ if (H5I_dec_app_ref(grp_id) < 0)
HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback")
} /* end if */
- else if(grp != NULL) {
- if(H5G_close(grp) < 0)
+ else if (grp != NULL) {
+ if (H5G_close(grp) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close group given to UD callback")
} /* end if */
- else if(temp_loc_init)
+ else if (temp_loc_init)
H5G_loc_free(&temp_loc);
/* Indicate that this callback didn't take ownership of the group *
@@ -1796,7 +1741,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_link_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_create_real
*
@@ -1817,15 +1761,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
- H5G_name_t *obj_path, H5F_t *obj_file, H5O_link_t *lnk,
- H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
+H5L_create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *obj_path, H5F_t *obj_file,
+ H5O_link_t *lnk, H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
{
- char *norm_link_name = NULL; /* Pointer to normalized link name */
- unsigned target_flags = H5G_TARGET_NORMAL; /* Flags to pass to group traversal function */
- H5P_genplist_t *lc_plist = NULL; /* Link creation property list */
- H5L_trav_cr_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ char * norm_link_name = NULL; /* Pointer to normalized link name */
+ unsigned target_flags = H5G_TARGET_NORMAL; /* Flags to pass to group traversal function */
+ H5P_genplist_t *lc_plist = NULL; /* Link creation property list */
+ H5L_trav_cr_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1836,22 +1779,22 @@ H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
HDassert(lnk->type >= H5L_TYPE_HARD && lnk->type <= H5L_TYPE_MAX);
/* Get normalized link name */
- if((norm_link_name = H5G_normalize(link_name)) == NULL)
+ if ((norm_link_name = H5G_normalize(link_name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize name")
/* Check for flags present in creation property list */
- if(lcpl_id != H5P_DEFAULT) {
+ if (lcpl_id != H5P_DEFAULT) {
unsigned crt_intmd_group;
/* Get link creation property list */
- if(NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
+ if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get intermediate group creation property */
- if(H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0)
+ if (H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups")
- if(crt_intmd_group > 0)
+ if (crt_intmd_group > 0)
target_flags |= H5G_CRT_INTMD_GROUP;
} /* end if */
@@ -1868,26 +1811,25 @@ H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
* of its fields should be populated except for name, which is set when
* inserting it in the callback.
*/
- udata.file = obj_file;
- udata.lc_plist = lc_plist;
- udata.dxpl_id = dxpl_id;
- udata.path = obj_path;
+ udata.file = obj_file;
+ udata.lc_plist = lc_plist;
+ udata.dxpl_id = dxpl_id;
+ udata.path = obj_path;
udata.ocrt_info = ocrt_info;
- udata.lnk = lnk;
+ udata.lnk = lnk;
/* Traverse the destination path & create new link */
- if(H5G_traverse(link_loc, link_name, target_flags, H5L_link_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(link_loc, link_name, target_flags, H5L_link_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert link")
done:
/* Free the normalized path name */
- if(norm_link_name)
+ if (norm_link_name)
H5MM_xfree(norm_link_name);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_create_real() */
-
/*-------------------------------------------------------------------------
* Function: H5L_create_hard
*
@@ -1901,18 +1843,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
- const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id,
- hid_t lapl_id, hid_t dxpl_id)
+H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link_loc, const char *link_name,
+ hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
{
- char *norm_cur_name = NULL; /* Pointer to normalized current name */
- H5F_t *link_file = NULL; /* Pointer to file to link to */
- H5O_link_t lnk; /* Link to insert */
- H5G_loc_t obj_loc; /* Location of object to link to */
- H5G_name_t path; /* obj_loc's path*/
- H5O_loc_t oloc; /* obj_loc's oloc */
- hbool_t loc_valid = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ char * norm_cur_name = NULL; /* Pointer to normalized current name */
+ H5F_t * link_file = NULL; /* Pointer to file to link to */
+ H5O_link_t lnk; /* Link to insert */
+ H5G_loc_t obj_loc; /* Location of object to link to */
+ H5G_name_t path; /* obj_loc's path*/
+ H5O_loc_t oloc; /* obj_loc's oloc */
+ hbool_t loc_valid = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1923,7 +1864,7 @@ H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
HDassert(link_name && *link_name);
/* Get normalized copy of the current name */
- if((norm_cur_name = H5G_normalize(cur_name)) == NULL)
+ if ((norm_cur_name = H5G_normalize(cur_name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize name")
/* Set up link data specific to hard links */
@@ -1933,7 +1874,7 @@ H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
obj_loc.path = &path;
obj_loc.oloc = &oloc;
H5G_loc_reset(&obj_loc);
- if(H5G_loc_find(cur_loc, norm_cur_name, &obj_loc, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(cur_loc, norm_cur_name, &obj_loc, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
loc_valid = TRUE;
@@ -1945,29 +1886,28 @@ H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
/* Create actual link to the object. Pass in NULL for the path, since this
* function shouldn't change an object's user path. */
- if(H5L_create_real(link_loc, link_name, NULL, link_file, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
+ if (H5L_create_real(link_loc, link_name, NULL, link_file, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
done:
/* Free the object header location */
- if(loc_valid)
- if(H5G_loc_free(&obj_loc) < 0)
+ if (loc_valid)
+ if (H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free location")
/* Free the normalized path name */
- if(norm_cur_name)
+ if (norm_cur_name)
H5MM_xfree(norm_cur_name);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_create_hard() */
-
/*-------------------------------------------------------------------------
* Function: H5L_create_soft
*
* Purpose: Creates a soft link from LINK_NAME to TARGET_PATH.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
* Monday, April 6, 1998
@@ -1975,12 +1915,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_create_soft(const char *target_path, const H5G_loc_t *link_loc,
- const char *link_name, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
+H5L_create_soft(const char *target_path, const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id,
+ hid_t lapl_id, hid_t dxpl_id)
{
- char *norm_target = NULL; /* Pointer to normalized current name */
- H5O_link_t lnk; /* Link to insert */
- herr_t ret_value = SUCCEED; /* Return value */
+ char * norm_target = NULL; /* Pointer to normalized current name */
+ H5O_link_t lnk; /* Link to insert */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1990,26 +1930,25 @@ H5L_create_soft(const char *target_path, const H5G_loc_t *link_loc,
HDassert(link_name && *link_name);
/* Get normalized copy of the link target */
- if((norm_target = H5G_normalize(target_path)) == NULL)
+ if ((norm_target = H5G_normalize(target_path)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize name")
/* Set up link data specific to soft links */
- lnk.type = H5L_TYPE_SOFT;
+ lnk.type = H5L_TYPE_SOFT;
lnk.u.soft.name = norm_target;
/* Create actual link to the object */
- if(H5L_create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
+ if (H5L_create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
done:
/* Free the normalized target name */
- if(norm_target)
+ if (norm_target)
H5MM_xfree(norm_target);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_create_soft() */
-
/*-------------------------------------------------------------------------
* Function: H5L_create_ud
*
@@ -2024,12 +1963,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name,
- const void *ud_data, size_t ud_data_size, H5L_type_t type, hid_t lcpl_id,
- hid_t lapl_id, hid_t dxpl_id)
+H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_data, size_t ud_data_size,
+ H5L_type_t type, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
{
- H5O_link_t lnk; /* Link to insert */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t lnk; /* Link to insert */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2043,22 +1981,22 @@ H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name,
lnk.u.ud.udata = NULL;
/* Make sure that this link class is registered */
- if(H5L_find_class_idx(type) < 0)
+ if (H5L_find_class_idx(type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library")
/* Fill in UD link-specific information in the link struct*/
- if(ud_data_size > 0) {
+ if (ud_data_size > 0) {
lnk.u.ud.udata = H5MM_malloc((size_t)ud_data_size);
- HDmemcpy(lnk.u.ud.udata, ud_data, (size_t) ud_data_size);
+ HDmemcpy(lnk.u.ud.udata, ud_data, (size_t)ud_data_size);
} /* end if */
else
lnk.u.ud.udata = NULL;
lnk.u.ud.size = ud_data_size;
- lnk.type = type;
+ lnk.type = type;
/* Create actual link to the object */
- if(H5L_create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
+ if (H5L_create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to register new name for object")
done:
@@ -2068,7 +2006,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_create_ud() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_val_real
*
@@ -2084,7 +2021,7 @@ done:
static herr_t
H5L_get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2092,17 +2029,17 @@ H5L_get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
HDassert(lnk);
/* Check for soft link */
- if(H5L_TYPE_SOFT == lnk->type) {
+ if (H5L_TYPE_SOFT == lnk->type) {
/* Copy to output buffer */
- if(size > 0 && buf) {
+ if (size > 0 && buf) {
HDstrncpy((char *)buf, lnk->u.soft.name, size);
- if(HDstrlen(lnk->u.soft.name) >= size)
+ if (HDstrlen(lnk->u.soft.name) >= size)
((char *)buf)[size - 1] = '\0';
} /* end if */
- } /* end if */
+ } /* end if */
/* Check for user-defined link */
- else if(lnk->type >= H5L_TYPE_UD_MIN) {
- const H5L_class_t *link_class; /* User-defined link class */
+ else if (lnk->type >= H5L_TYPE_UD_MIN) {
+ const H5L_class_t *link_class; /* User-defined link class */
/* Get the link class for this type of link. It's okay if the class
* isn't registered, though--we just can't give any more information
@@ -2110,11 +2047,11 @@ H5L_get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
*/
link_class = H5L_find_class(lnk->type);
- if(link_class != NULL && link_class->query_func != NULL) {
- if((link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, buf, size) < 0)
+ if (link_class != NULL && link_class->query_func != NULL) {
+ if ((link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query callback returned failure")
} /* end if */
- else if(buf && size > 0)
+ else if (buf && size > 0)
((char *)buf)[0] = '\0';
} /* end if */
else
@@ -2124,7 +2061,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_val_real() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_val_cb
*
@@ -2138,20 +2074,20 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_get_val_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
- H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5L_get_val_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gv_t *udata = (H5L_trav_gv_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gv_t *udata = (H5L_trav_gv_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(lnk == NULL)
+ if (lnk == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name)
/* Retrieve the value for the link */
- if(H5L_get_val_real(lnk, udata->buf, udata->size) < 0)
+ if (H5L_get_val_real(lnk, udata->buf, udata->size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value")
done:
@@ -2162,7 +2098,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_val_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_val
*
@@ -2183,11 +2118,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size,
- hid_t lapl_id, hid_t dxpl_id)
+H5L_get_val(H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t size, hid_t lapl_id, hid_t dxpl_id)
{
- H5L_trav_gv_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gv_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2197,17 +2131,17 @@ H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size,
/* Set up user data for retrieving information */
udata.size = size;
- udata.buf = buf;
+ udata.buf = buf;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_cb, &udata, lapl_id,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5L_get_val() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_val_by_idx_cb
*
@@ -2222,34 +2156,34 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
- H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
+ H5O_link_t fnd_lnk; /* Link within group */
+ hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Query link */
- if(H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order,
- udata->n, &fnd_lnk, udata->dxpl_id) < 0)
+ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk,
+ udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found")
lnk_copied = TRUE;
/* Retrieve the value for the link */
- if(H5L_get_val_real(&fnd_lnk, udata->buf, udata->size) < 0)
+ if (H5L_get_val_real(&fnd_lnk, udata->buf, udata->size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value")
done:
/* Reset the link information, if we have a copy */
- if(lnk_copied)
+ if (lnk_copied)
H5O_msg_reset(H5O_LINK_ID, &fnd_lnk);
/* Indicate that this callback didn't take ownership of the group *
@@ -2259,7 +2193,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_val_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_delete_cb
*
@@ -2274,30 +2207,31 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_delete_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
- H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5L_delete_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
+ H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_rm_t *udata = (H5L_trav_rm_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED;
+ H5L_trav_rm_t *udata = (H5L_trav_rm_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
/* Check if the group resolved to a valid link */
- if(grp_loc == NULL)
+ if (grp_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Check if the name in this group resolved to a valid link */
- if(name == NULL)
+ if (name == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Check for non-existent (NULL) link.
* Note that this can also occur when attempting to remove '.'
*/
- if(lnk == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "callback link pointer is NULL (specified link may be '.' or not exist)")
+ if (lnk == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL,
+ "callback link pointer is NULL (specified link may be '.' or not exist)")
/* Remove the link from the group */
- if(H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, name, udata->dxpl_id) < 0)
+ if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, name, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to remove link from group")
done:
@@ -2308,7 +2242,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_delete_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_delete
*
@@ -2324,9 +2257,9 @@ done:
herr_t
H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
{
- H5L_trav_rm_t udata; /* User data for callback */
- char *norm_name = NULL; /* Pointer to normalized name */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_rm_t udata; /* User data for callback */
+ char * norm_name = NULL; /* Pointer to normalized name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2335,23 +2268,23 @@ H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
HDassert(name && *name);
/* Get normalized copy of the name */
- if((norm_name = H5G_normalize(name)) == NULL)
+ if ((norm_name = H5G_normalize(name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize name")
/* Set up user data for unlink operation */
udata.dxpl_id = dxpl_id;
- if(H5G_traverse(loc, norm_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT, H5L_delete_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, norm_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT, H5L_delete_cb,
+ &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "can't unlink object")
done:
/* Free the normalized path name */
- if(norm_name)
+ if (norm_name)
H5MM_xfree(norm_name);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5L_delete_by_idx_cb
*
@@ -2365,22 +2298,22 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_delete_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_delete_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Delete link */
- if(H5G_obj_remove_by_idx(obj_loc->oloc, obj_loc->path->full_path_r,
- udata->idx_type, udata->order, udata->n, udata->dxpl_id) < 0)
+ if (H5G_obj_remove_by_idx(obj_loc->oloc, obj_loc->path->full_path_r, udata->idx_type, udata->order,
+ udata->n, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found")
done:
@@ -2391,7 +2324,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_delete_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_move_dest_cb
*
@@ -2407,29 +2339,27 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_ATTR_UNUSED *lnk,
+ H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_mv2_t *udata = (H5L_trav_mv2_t *)_udata; /* User data passed in */
- H5G_t *grp = NULL; /* H5G_t for this group, opened to pass to user callback */
- hid_t grp_id = FAIL; /* ID for this group (passed to user callback */
- H5G_loc_t temp_loc; /* For UD callback */
- hbool_t temp_loc_init = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_mv2_t *udata = (H5L_trav_mv2_t *)_udata; /* User data passed in */
+ H5G_t * grp = NULL; /* H5G_t for this group, opened to pass to user callback */
+ hid_t grp_id = FAIL; /* ID for this group (passed to user callback */
+ H5G_loc_t temp_loc; /* For UD callback */
+ hbool_t temp_loc_init = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Make sure an object with this name doesn't already exist */
- if(obj_loc != NULL)
+ if (obj_loc != NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "an object with that name already exists")
/* Check for crossing file boundaries with a new hard link */
- if(udata->lnk->type == H5L_TYPE_HARD) {
+ if (udata->lnk->type == H5L_TYPE_HARD)
/* Check that both objects are in same file */
- if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
+ if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
- } /* end if */
/* Give the object its new name */
/* Casting away const okay -JML */
@@ -2437,27 +2367,26 @@ H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
udata->lnk->name = (char *)name;
/* Insert the link into the group */
- if(H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN,
- NULL, udata->dxpl_id) < 0)
+ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN, NULL, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
/* If the link was a user-defined link, call its move callback if it has one */
- if(udata->lnk->type >= H5L_TYPE_UD_MIN) {
- const H5L_class_t *link_class; /* User-defined link class */
+ if (udata->lnk->type >= H5L_TYPE_UD_MIN) {
+ const H5L_class_t *link_class; /* User-defined link class */
/* Get the link class for this type of link. */
- if(NULL == (link_class = H5L_find_class(udata->lnk->type)))
+ if (NULL == (link_class = H5L_find_class(udata->lnk->type)))
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered")
- if((!udata->copy && link_class->move_func) || (udata->copy && link_class->copy_func)) {
- H5O_loc_t temp_oloc;
- H5G_name_t temp_path;
+ if ((!udata->copy && link_class->move_func) || (udata->copy && link_class->copy_func)) {
+ H5O_loc_t temp_oloc;
+ H5G_name_t temp_path;
/* Create a temporary location (or else H5G_open will do a shallow
* copy and wipe out grp_loc)
*/
H5G_name_reset(&temp_path);
- if(H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
+ if (H5O_loc_copy(&temp_oloc, grp_loc->oloc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
temp_loc.oloc = &temp_oloc;
@@ -2465,33 +2394,35 @@ H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
temp_loc_init = TRUE;
/* Set up location for user-defined callback */
- if((grp = H5G_open(&temp_loc, udata->dxpl_id)) == NULL)
+ if ((grp = H5G_open(&temp_loc, udata->dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((grp_id = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((grp_id = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group ID")
- if(udata->copy) {
- if((link_class->copy_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size) < 0)
+ if (udata->copy) {
+ if ((link_class->copy_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata,
+ udata->lnk->u.ud.size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD copy callback returned error")
} /* end if */
else {
- if((link_class->move_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size) < 0)
+ if ((link_class->move_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata,
+ udata->lnk->u.ud.size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD move callback returned error")
} /* end else */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Close the location given to the user callback if it was created */
- if(grp_id >= 0) {
- if(H5I_dec_app_ref(grp_id) < 0)
+ if (grp_id >= 0) {
+ if (H5I_dec_app_ref(grp_id) < 0)
HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback")
} /* end if */
- else if(grp != NULL) {
- if(H5G_close(grp) < 0)
+ else if (grp != NULL) {
+ if (H5G_close(grp) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close group given to UD callback")
} /* end if */
- else if(temp_loc_init)
+ else if (temp_loc_init)
H5G_loc_free(&temp_loc);
/* Indicate that this callback didn't take ownership of the group *
@@ -2505,7 +2436,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_move_dest_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_move_cb
*
@@ -2521,59 +2451,59 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/)
+H5L_move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc,
+ void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_mv_t *udata = (H5L_trav_mv_t *)_udata; /* User data passed in */
- H5L_trav_mv2_t udata_out; /* User data for H5L_move_dest_cb traversal */
- char * orig_name = NULL; /* The name of the link in this group */
- hbool_t link_copied = FALSE; /* Has udata_out.lnk been allocated? */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_mv_t *udata = (H5L_trav_mv_t *)_udata; /* User data passed in */
+ H5L_trav_mv2_t udata_out; /* User data for H5L_move_dest_cb traversal */
+ char * orig_name = NULL; /* The name of the link in this group */
+ hbool_t link_copied = FALSE; /* Has udata_out.lnk been allocated? */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Check for operations on '.' */
- if(lnk == NULL)
+ if (lnk == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy")
/* Set up user data for move_dest_cb */
- if(NULL == (udata_out.lnk = (H5O_link_t *)H5O_msg_copy(H5O_LINK_ID, lnk, NULL)))
+ if (NULL == (udata_out.lnk = (H5O_link_t *)H5O_msg_copy(H5O_LINK_ID, lnk, NULL)))
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved")
/* In this special case, the link's name is going to be replaced at its
* destination, so we should free it here.
*/
udata_out.lnk->name = (char *)H5MM_xfree(udata_out.lnk->name);
- link_copied = TRUE;
+ link_copied = TRUE;
udata_out.lnk->cset = udata->cset;
- udata_out.file = grp_loc->oloc->file;
- udata_out.copy = udata->copy;
- udata_out.dxpl_id = udata->dxpl_id;
+ udata_out.file = grp_loc->oloc->file;
+ udata_out.copy = udata->copy;
+ udata_out.dxpl_id = udata->dxpl_id;
/* Keep a copy of link's name (it's "owned" by the H5G_traverse() routine) */
orig_name = H5MM_xstrdup(name);
/* Insert the link into its new location */
- if(H5G_traverse(udata->dst_loc, udata->dst_name, udata->dst_target_flags,
- H5L_move_dest_cb, &udata_out, udata->lapl_id, udata->dxpl_id) < 0)
+ if (H5G_traverse(udata->dst_loc, udata->dst_name, udata->dst_target_flags, H5L_move_dest_cb, &udata_out,
+ udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link")
/* If this is a move and not a copy operation, change the object's name and remove the old link */
- if(!udata->copy) {
- H5RS_str_t *dst_name_r; /* Ref-counted version of dest name */
+ if (!udata->copy) {
+ H5RS_str_t *dst_name_r; /* Ref-counted version of dest name */
/* Make certain that the destination name is a full (not relative) path */
- if(*(udata->dst_name) != '/') {
+ if (*(udata->dst_name) != '/') {
HDassert(udata->dst_loc->path->full_path_r);
/* Create reference counted string for full dst path */
- if((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r,
- udata->dst_name)) == NULL)
+ if ((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r,
+ udata->dst_name)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build destination path name")
} /* end if */
else
@@ -2581,14 +2511,14 @@ H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
HDassert(dst_name_r);
/* Fix names up */
- if(H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r,
- udata->dst_loc->oloc->file, dst_name_r, udata->dxpl_id) < 0) {
+ if (H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r,
+ udata->dst_loc->oloc->file, dst_name_r, udata->dxpl_id) < 0) {
H5RS_decr(dst_name_r);
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to replace name")
} /* end if */
/* Remove the old link */
- if(H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, orig_name, udata->dxpl_id) < 0) {
+ if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, orig_name, udata->dxpl_id) < 0) {
H5RS_decr(dst_name_r);
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to remove old name")
} /* end if */
@@ -2598,14 +2528,14 @@ H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
done:
/* Cleanup */
- if(orig_name)
+ if (orig_name)
H5MM_xfree(orig_name);
/* If udata_out.lnk was copied, free any memory allocated
* In this special case, the H5L_move_dest_cb callback resets the name
* so H5O_msg_free shouldn't try to free it
*/
- if(link_copied)
+ if (link_copied)
H5O_msg_free(H5O_LINK_ID, udata_out.lnk);
/* Indicate that this callback didn't take ownership of the group *
@@ -2615,7 +2545,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_move_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_move
*
@@ -2637,17 +2566,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
- const char *dst_name, hbool_t copy_flag, hid_t lcpl_id, hid_t lapl_id,
- hid_t dxpl_id)
+H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc, const char *dst_name,
+ hbool_t copy_flag, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id)
{
- unsigned dst_target_flags = H5G_TARGET_NORMAL;
- H5T_cset_t char_encoding = H5F_DEFAULT_CSET; /* Character encoding for link */
- H5P_genplist_t* lc_plist; /* Link creation property list */
- H5P_genplist_t* la_plist; /* Link access property list */
- H5L_trav_mv_t udata; /* User data for traversal */
- hid_t lapl_copy; /* Copy of lapl for this function */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned dst_target_flags = H5G_TARGET_NORMAL;
+ H5T_cset_t char_encoding = H5F_DEFAULT_CSET; /* Character encoding for link */
+ H5P_genplist_t *lc_plist; /* Link creation property list */
+ H5P_genplist_t *la_plist; /* Link access property list */
+ H5L_trav_mv_t udata; /* User data for traversal */
+ hid_t lapl_copy; /* Copy of lapl for this function */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2658,57 +2586,55 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
HDassert(dst_name && *dst_name);
/* Check for flags present in creation property list */
- if(lcpl_id != H5P_DEFAULT) {
+ if (lcpl_id != H5P_DEFAULT) {
unsigned crt_intmd_group;
- if(NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
+ if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get intermediate group creation property */
- if(H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0)
+ if (H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups")
/* Set target flags for source and destination */
- if(crt_intmd_group > 0)
+ if (crt_intmd_group > 0)
dst_target_flags |= H5G_CRT_INTMD_GROUP;
/* Get character encoding property */
- if(H5P_get(lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &char_encoding) < 0)
+ if (H5P_get(lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &char_encoding) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding")
} /* end if */
/* Copy the link access property list because traversing UD links will
* decrease the NLINKS property. HDF5 should have NLINKS traversals to
* get to the source and NLINKS more to get to the destination. */
- if(lapl_id == H5P_DEFAULT)
+ if (lapl_id == H5P_DEFAULT)
lapl_copy = lapl_id;
else {
- if(NULL == (la_plist = (H5P_genplist_t *)H5I_object(lapl_id)))
+ if (NULL == (la_plist = (H5P_genplist_t *)H5I_object(lapl_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid access PL")
- if((lapl_copy = H5P_copy_plist(la_plist, FALSE)) < 0)
+ if ((lapl_copy = H5P_copy_plist(la_plist, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy access properties")
} /* end else */
/* Set up user data */
- udata.dst_loc = dst_loc;
- udata.dst_name= dst_name;
+ udata.dst_loc = dst_loc;
+ udata.dst_name = dst_name;
udata.dst_target_flags = dst_target_flags;
- udata.cset = char_encoding;
- udata.copy = copy_flag;
- udata.lapl_id = lapl_copy;
- udata.dxpl_id = dxpl_id;
+ udata.cset = char_encoding;
+ udata.copy = copy_flag;
+ udata.lapl_id = lapl_copy;
+ udata.dxpl_id = dxpl_id;
/* Do the move */
- if(H5G_traverse(src_loc,
- src_name, H5G_TARGET_MOUNT | H5G_TARGET_SLINK | H5G_TARGET_UDLINK,
- H5L_move_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(src_loc, src_name, H5G_TARGET_MOUNT | H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_move_cb,
+ &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to find link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_move() */
-
/*-------------------------------------------------------------------------
* Function: H5L_exists_cb
*
@@ -2722,11 +2648,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t *lnk, H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t *lnk, H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- hbool_t *udata = (hbool_t *)_udata; /* User data passed in */
+ hbool_t *udata = (hbool_t *)_udata; /* User data passed in */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2740,7 +2666,6 @@ H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5L_exists_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_exists
*
@@ -2756,13 +2681,14 @@ H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED
static htri_t
H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
{
- hbool_t exists = FALSE; /* Whether the link exists in the group */
- htri_t ret_value; /* Return value */
+ hbool_t exists = FALSE; /* Whether the link exists in the group */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(loc, name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_exists_cb, &exists, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_exists_cb, &exists, lapl_id,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "path doesn't exist")
/* Set return value */
@@ -2772,7 +2698,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5L_exists() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_info_cb
*
@@ -2786,21 +2711,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_get_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t *lnk, H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_get_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t *lnk, H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gi_t *udata = (H5L_trav_gi_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gi_t *udata = (H5L_trav_gi_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
- if(lnk == NULL)
+ if (lnk == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Get information from the link */
- if(H5G_link_to_info(lnk, udata->linfo) < 0)
+ if (H5G_link_to_info(lnk, udata->linfo) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info")
done:
@@ -2811,13 +2736,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_info_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_info
*
* Purpose: Returns metadata about a link.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: James Laird
* Monday, April 17 2006
@@ -2825,26 +2749,25 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_get_info(const H5G_loc_t *loc, const char *name,
- H5L_info_t *linfo/*out*/, hid_t lapl_id, hid_t dxpl_id)
+H5L_get_info(const H5G_loc_t *loc, const char *name, H5L_info_t *linfo /*out*/, hid_t lapl_id, hid_t dxpl_id)
{
H5L_trav_gi_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- udata.linfo = linfo;
+ udata.linfo = linfo;
udata.dxpl_id = dxpl_id;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(loc, name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_get_info_cb, &udata, lapl_id, dxpl_id) < 0)
+ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_info_cb, &udata, lapl_id,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5L_get_info() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_info_by_idx_cb
*
@@ -2859,34 +2782,34 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gibi_t *udata = (H5L_trav_gibi_t *)_udata; /* User data passed in */
- H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gibi_t *udata = (H5L_trav_gibi_t *)_udata; /* User data passed in */
+ H5O_link_t fnd_lnk; /* Link within group */
+ hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Query link */
- if(H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order,
- udata->n, &fnd_lnk, udata->dxpl_id) < 0)
+ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk,
+ udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found")
lnk_copied = TRUE;
/* Get information from the link */
- if(H5G_link_to_info(&fnd_lnk, udata->linfo) < 0)
+ if (H5G_link_to_info(&fnd_lnk, udata->linfo) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info")
done:
/* Reset the link information, if we have a copy */
- if(lnk_copied)
+ if (lnk_copied)
H5O_msg_reset(H5O_LINK_ID, &fnd_lnk);
/* Indicate that this callback didn't take ownership of the group *
@@ -2896,7 +2819,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_info_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_default_lcpl
*
@@ -2914,7 +2836,7 @@ done:
hid_t
H5L_get_default_lcpl(void)
{
- hid_t ret_value; /* Return value */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2924,7 +2846,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5L_get_default_lcpl */
-
/*-------------------------------------------------------------------------
* Function: H5L_get_name_by_idx_cb
*
@@ -2939,22 +2860,22 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_get_name_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
- const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/)
+H5L_get_name_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
+ H5G_own_loc_t *own_loc /*out*/)
{
- H5L_trav_gnbi_t *udata = (H5L_trav_gnbi_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5L_trav_gnbi_t *udata = (H5L_trav_gnbi_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
- if(obj_loc == NULL)
+ if (obj_loc == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
/* Query link */
- if((udata->name_len = H5G_obj_get_name_by_idx(obj_loc->oloc, udata->idx_type, udata->order,
- udata->n, udata->name, udata->size, udata->dxpl_id)) < 0)
+ if ((udata->name_len = H5G_obj_get_name_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n,
+ udata->name, udata->size, udata->dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found")
done:
@@ -2965,7 +2886,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_name_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5L_link_copy_file
*
@@ -2975,23 +2895,22 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 29 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
- const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info)
+H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc,
+ H5O_link_t *dst_lnk, H5O_copy_t *cpy_info)
{
- H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */
- const H5O_link_t *src_lnk = _src_lnk; /* Source link */
- hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
- hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */
- H5G_loc_t tmp_src_loc; /* Group location holding target object */
- H5G_name_t tmp_src_path; /* Path for target object */
- H5O_loc_t tmp_src_oloc; /* Object location for target object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */
+ const H5O_link_t *src_lnk = _src_lnk; /* Source link */
+ hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
+ hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */
+ H5G_loc_t tmp_src_loc; /* Group location holding target object */
+ H5G_name_t tmp_src_path; /* Path for target object */
+ H5O_loc_t tmp_src_oloc; /* Object location for target object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3002,68 +2921,64 @@ H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
HDassert(cpy_info);
/* Expand soft or external link, if requested */
- if((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link)
- || (H5L_TYPE_EXTERNAL == src_lnk->type
- && cpy_info->expand_ext_link)) {
- H5G_loc_t lnk_grp_loc; /* Group location holding link */
- H5G_name_t lnk_grp_path; /* Path for link */
- htri_t tar_exists; /* Whether the target object exists */
+ if ((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) ||
+ (H5L_TYPE_EXTERNAL == src_lnk->type && cpy_info->expand_ext_link)) {
+ H5G_loc_t lnk_grp_loc; /* Group location holding link */
+ H5G_name_t lnk_grp_path; /* Path for link */
+ htri_t tar_exists; /* Whether the target object exists */
/* Set up group location for link */
H5G_name_reset(&lnk_grp_path);
lnk_grp_loc.path = &lnk_grp_path;
- lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */
+ lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */
/* Check if the target object exists */
- if((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name, H5P_DEFAULT,
- dxpl_id)) < 0)
+ if ((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name, H5P_DEFAULT, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to check if target object exists")
- if(tar_exists) {
+ if (tar_exists) {
/* Make a temporary copy of the link, so that it will not change the
* info in the cache when we change it to a hard link */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
/* Set up group location for target object. Let H5G_traverse expand
* the link. */
tmp_src_loc.path = &tmp_src_path;
tmp_src_loc.oloc = &tmp_src_oloc;
- if(H5G_loc_reset(&tmp_src_loc) < 0)
+ if (H5G_loc_reset(&tmp_src_loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to reset location")
/* Find the target object */
- if(H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc,
- H5P_DEFAULT, dxpl_id) < 0)
+ if (H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to find target object")
expanded_link_open = TRUE;
/* Convert symbolic link to hard link */
- if(tmp_src_lnk.type == H5L_TYPE_SOFT)
- tmp_src_lnk.u.soft.name =
- (char *)H5MM_xfree(tmp_src_lnk.u.soft.name);
- else if(tmp_src_lnk.u.ud.size > 0)
+ if (tmp_src_lnk.type == H5L_TYPE_SOFT)
+ tmp_src_lnk.u.soft.name = (char *)H5MM_xfree(tmp_src_lnk.u.soft.name);
+ else if (tmp_src_lnk.u.ud.size > 0)
tmp_src_lnk.u.ud.udata = H5MM_xfree(tmp_src_lnk.u.ud.udata);
- tmp_src_lnk.type = H5L_TYPE_HARD;
+ tmp_src_lnk.type = H5L_TYPE_HARD;
tmp_src_lnk.u.hard.addr = tmp_src_oloc.addr;
- src_lnk = &tmp_src_lnk;
+ src_lnk = &tmp_src_lnk;
} /* end if */
- } /* end if */
+ } /* end if */
/* Copy src link information to dst link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
+ if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
dst_lnk_init = TRUE;
/* Check if object in source group is a hard link & copy it */
- if(H5L_TYPE_HARD == src_lnk->type) {
- H5O_loc_t new_dst_oloc; /* Copied object location in destination */
+ if (H5L_TYPE_HARD == src_lnk->type) {
+ H5O_loc_t new_dst_oloc; /* Copied object location in destination */
/* Set up copied object location to fill in */
H5O_loc_reset(&new_dst_oloc);
new_dst_oloc.file = dst_file;
- if(!expanded_link_open) {
+ if (!expanded_link_open) {
/* Build temporary object location for source */
H5O_loc_reset(&tmp_src_oloc);
tmp_src_oloc.file = src_oloc->file;
@@ -3074,8 +2989,7 @@ H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
/* Copy the shared object from source to destination */
/* Don't care about obj_type or udata because those are only important
* for old style groups */
- if(H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info,
- TRUE, NULL, NULL) < 0)
+ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info, TRUE, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Copy new destination object's information for eventual insertion */
@@ -3084,18 +2998,17 @@ H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
done:
/* Check if we used a temporary src link */
- if(src_lnk != _src_lnk) {
+ if (src_lnk != _src_lnk) {
HDassert(src_lnk == &tmp_src_lnk);
H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk);
} /* end if */
- if(ret_value < 0)
- if(dst_lnk_init)
+ if (ret_value < 0)
+ if (dst_lnk_init)
H5O_msg_reset(H5O_LINK_ID, dst_lnk);
/* Check if we need to free the temp source oloc */
- if(expanded_link_open)
- if(H5G_loc_free(&tmp_src_loc) < 0)
+ if (expanded_link_open)
+ if (H5G_loc_free(&tmp_src_loc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_link_copy_file() */
-
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index b796fbe..f620697 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -6,55 +6,54 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5L_PACKAGE /*suppress error about including H5Lpkg */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5L_init_extern_interface
-
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lpkg.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opublic.h" /* File objects */
-#include "H5Pprivate.h" /* Property lists */
-
-static hid_t H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
- const void *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id);
-static ssize_t H5L_extern_query(const char H5_ATTR_UNUSED * link_name, const void *udata,
- size_t udata_size, void * buf /*out*/, size_t buf_size);
+#define H5_INTERFACE_INIT_FUNC H5L_init_extern_interface
+
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lpkg.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opublic.h" /* File objects */
+#include "H5Pprivate.h" /* Property lists */
+
+static hid_t H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const void *udata,
+ size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id);
+static ssize_t H5L_extern_query(const char H5_ATTR_UNUSED *link_name, const void *udata, size_t udata_size,
+ void *buf /*out*/, size_t buf_size);
/* Default External Link link class */
const H5L_class_t H5L_EXTERN_LINK_CLASS[1] = {{
- H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
- H5L_TYPE_EXTERNAL, /* Link type id number */
- "external", /* Link name for debugging */
- NULL, /* Creation callback */
- NULL, /* Move callback */
- NULL, /* Copy callback */
- H5L_extern_traverse, /* The actual traversal function */
- NULL, /* Deletion callback */
- H5L_extern_query /* Query callback */
+ H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
+ H5L_TYPE_EXTERNAL, /* Link type id number */
+ "external", /* Link name for debugging */
+ NULL, /* Creation callback */
+ NULL, /* Move callback */
+ NULL, /* Copy callback */
+ H5L_extern_traverse, /* The actual traversal function */
+ NULL, /* Deletion callback */
+ H5L_extern_query /* Query callback */
}};
/* Version of external link format */
-#define H5L_EXT_VERSION 0
+#define H5L_EXT_VERSION 0
/* Valid flags for external links */
-#define H5L_EXT_FLAGS_ALL 0
+#define H5L_EXT_FLAGS_ALL 0
/* Size of local link name buffer for traversing external links */
-#define H5L_EXT_TRAVERSE_BUF_SIZE 256
+#define H5L_EXT_TRAVERSE_BUF_SIZE 256
-
/*--------------------------------------------------------------------------
NAME
H5L_init_extern_interface -- Initialize interface-specific information
@@ -77,8 +76,6 @@ H5L_init_extern_interface(void)
FUNC_LEAVE_NOAPI(H5L_init())
} /* H5L_init_extern_interface() */
-
-
/*--------------------------------------------------------------------------
* Function: H5L_getenv_prefix_name --
*
@@ -93,27 +90,27 @@ H5L_init_extern_interface(void)
*
--------------------------------------------------------------------------*/
static char *
-H5L_getenv_prefix_name(char **env_prefix/*in,out*/)
+H5L_getenv_prefix_name(char **env_prefix /*in,out*/)
{
- char *retptr=NULL;
- char *strret=NULL;
+ char *retptr = NULL;
+ char *strret = NULL;
FUNC_ENTER_NOAPI_NOINIT_NOERR
strret = HDstrchr(*env_prefix, H5_COLON_SEPC);
if (strret == NULL) {
- retptr = *env_prefix;
+ retptr = *env_prefix;
*env_prefix = strret;
- } else {
- retptr = *env_prefix;
+ }
+ else {
+ retptr = *env_prefix;
*env_prefix = strret + 1;
- *strret = '\0';
+ *strret = '\0';
}
FUNC_LEAVE_NOAPI(retptr)
} /* end H5L_getenv_prefix_name() */
-
/*--------------------------------------------------------------------------
* Function: H5L_build_name
*
@@ -125,34 +122,33 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/)
*
--------------------------------------------------------------------------*/
static herr_t
-H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
+H5L_build_name(char *prefix, char *file_name, char **full_name /*out*/)
{
- size_t prefix_len; /* length of prefix */
- size_t fname_len; /* Length of external link file name */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t prefix_len; /* length of prefix */
+ size_t fname_len; /* Length of external link file name */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
prefix_len = HDstrlen(prefix);
- fname_len = HDstrlen(file_name);
+ fname_len = HDstrlen(file_name);
/* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */
- if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2)))
+ if (NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer")
/* Compose the full file name */
HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix,
- (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name);
+ (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5L_build_name() */
-
/*-------------------------------------------------------------------------
* Function: H5L_extern_traverse
*
- * Purpose: Default traversal function for external links. This can
+ * Purpose: Default traversal function for external links. This can
* be overridden using H5Lregister().
*
* Given a filename and path packed into the link udata,
@@ -161,143 +157,131 @@ done:
* link access property list, appends that prefix to the
* filename being opened.
*
- * Return: ID of the opened object on success/Negative on failure
+ * Return: ID of the opened object on success/H5I_INVALID_HID on failure
*
- * Programmer: James Laird
+ * Programmer: James Laird
* Monday, July 10, 2006
- * Modifications:
- * Vailin Choi, April 2, 2008
- * Add handling to search for the target file
- * See description in RM: H5Lcreate_external
- *
- * Vailin Choi; Sept. 12th, 2008; bug #1247
- * Retrieve the file access property list identifer that is set
- * for link access property via H5Pget_elink_fapl().
- * If the return value is H5P_DEFAULT, the parent's file access
- * property is used to H5F_open() the target file;
- * Otherwise, the file access property retrieved from H5Pget_elink_fapl()
- * is used to H5F_open() the target file.
- *
- * Vailin Choi; Nov 2010
- * Free memory pointed to by tmp_env_prefix for HDF5_EXT_PREFIX case.
*
*-------------------------------------------------------------------------
*/
static hid_t
-H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
- const void *_udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id)
+H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const void *_udata,
+ size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id)
{
- H5P_genplist_t *plist; /* Property list pointer */
- char *my_prefix; /* Library's copy of the prefix */
- H5G_loc_t root_loc; /* Location of root group in external file */
- H5G_loc_t loc; /* Location of object */
- H5F_t *ext_file = NULL; /* File struct for external file */
- const uint8_t *p = (const uint8_t *)_udata; /* Pointer into external link buffer */
- const char *file_name; /* Name of file containing external link's object */
- char *full_name = NULL; /* File name with prefix */
- const char *obj_name; /* Name external link's object */
- size_t fname_len; /* Length of external link file name */
- unsigned intent; /* File access permissions */
- H5L_elink_cb_t cb_info; /* Callback info struct */
- hid_t fapl_id = -1; /* File access property list for external link's file */
- hid_t ext_obj = -1; /* ID for external link's object */
- char *parent_group_name = NULL;/* Temporary pointer to group name */
- char local_group_name[H5L_EXT_TRAVERSE_BUF_SIZE]; /* Local buffer to hold group name */
- char *temp_file_name = NULL; /* Temporary pointer to file name */
- size_t temp_file_name_len; /* Length of temporary file name */
- char *actual_file_name = NULL; /* Parent file's actual name */
- H5P_genplist_t *fa_plist; /* File access property list pointer */
- H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
- hid_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
+ H5P_genplist_t * plist; /* Property list pointer */
+ char * my_prefix; /* Library's copy of the prefix */
+ H5G_loc_t root_loc; /* Location of root group in external file */
+ H5G_loc_t loc; /* Location of object */
+ H5F_t * ext_file = NULL; /* File struct for external file */
+ const uint8_t * p = (const uint8_t *)_udata; /* Pointer into external link buffer */
+ const char * file_name; /* Name of file containing external link's object */
+ char * full_name = NULL; /* File name with prefix */
+ const char * obj_name; /* Name external link's object */
+ size_t fname_len; /* Length of external link file name */
+ unsigned intent; /* File access permissions */
+ H5L_elink_cb_t cb_info; /* Callback info struct */
+ hid_t fapl_id = -1; /* File access property list for external link's file */
+ hid_t ext_obj = -1; /* ID for external link's object */
+ char * parent_group_name = NULL; /* Temporary pointer to group name */
+ char local_group_name[H5L_EXT_TRAVERSE_BUF_SIZE]; /* Local buffer to hold group name */
+ char * temp_file_name = NULL; /* Temporary pointer to file name */
+ size_t temp_file_name_len; /* Length of temporary file name */
+ char * actual_file_name = NULL; /* Parent file's actual name */
+ H5P_genplist_t * fa_plist; /* File access property list pointer */
+ H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
HDassert(p);
/* Check external link version & flags */
- if(((*p >> 4) & 0x0F) > H5L_EXT_VERSION)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link")
- if((*p & 0x0F) & ~H5L_EXT_FLAGS_ALL)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link")
+ if (((*p >> 4) & 0x0F) > H5L_EXT_VERSION)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad version number for external link")
+ if ((*p & 0x0F) & ~H5L_EXT_FLAGS_ALL)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad flags for external link")
p++;
/* Gather some information from the external link's user data */
file_name = (const char *)p;
fname_len = HDstrlen(file_name);
- obj_name = (const char *)p + fname_len + 1;
+ obj_name = (const char *)p + fname_len + 1;
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
/* Get the fapl_id set for lapl_id if any */
- if(H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links")
+ if (H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get fapl for links")
/* Get the location for the group holding the external link */
- if(H5G_loc(cur_group, &loc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get object location")
+ if (H5G_loc(cur_group, &loc) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get object location")
/* get the access flags set for lapl_id if any */
- if(H5P_get(plist, H5L_ACS_ELINK_FLAGS_NAME, &intent) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get elink file access flags")
+ if (H5P_get(plist, H5L_ACS_ELINK_FLAGS_NAME, &intent) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink file access flags")
/* get the file access mode flags for the parent file, if they were not set
* on lapl_id */
- if(intent == H5F_ACC_DEFAULT)
+ if (intent == H5F_ACC_DEFAULT)
intent = H5F_INTENT(loc.oloc->file);
- if((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, FALSE)) < 0))
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get parent's file access property list")
+ if ((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, FALSE)) < 0))
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get parent's file access property list")
/* Get callback_info */
- if(H5P_get(plist, H5L_ACS_ELINK_CB_NAME, &cb_info)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get elink callback info")
+ if (H5P_get(plist, H5L_ACS_ELINK_CB_NAME, &cb_info) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink callback info")
/* Get file access property list */
- if(NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
/* Make callback if it exists */
- if(cb_info.func) {
- const char *parent_file_name; /* Parent file name */
- ssize_t group_name_len; /* Length of parent group name */
+ if (cb_info.func) {
+ const char *parent_file_name; /* Parent file name */
+ ssize_t group_name_len; /* Length of parent group name */
/* Get parent file name */
parent_file_name = H5F_OPEN_NAME(loc.oloc->file);
/* Query length of parent group name */
- if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve length of group name")
+ if ((group_name_len = H5G_get_name(&loc, NULL, (size_t)0, NULL, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve length of group name")
/* Account for null terminator */
group_name_len++;
/* Check if we need to allocate larger buffer */
- if((size_t)group_name_len > sizeof(local_group_name)) {
- if(NULL == (parent_group_name = (char *)H5MM_malloc((size_t)group_name_len)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, FAIL, "can't allocate buffer to hold group name, group_name_len = %Zu", group_name_len)
+ if ((size_t)group_name_len > sizeof(local_group_name)) {
+ if (NULL == (parent_group_name = (char *)H5MM_malloc((size_t)group_name_len)))
+ HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, H5I_INVALID_HID,
+ "can't allocate buffer to hold group name, group_name_len = %zd", group_name_len)
} /* end if */
else
parent_group_name = local_group_name;
/* Get parent group name */
- if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve group name")
+ if (H5G_get_name(&loc, parent_group_name, (size_t)group_name_len, NULL, lapl_id, H5AC_ind_dxpl_id) <
+ 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve group name")
/* Make callback */
- if((cb_info.func)(parent_file_name, parent_group_name, file_name, obj_name, &intent, fapl_id, cb_info.user_data) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "traversal operator failed")
+ if ((cb_info.func)(parent_file_name, parent_group_name, file_name, obj_name, &intent, fapl_id,
+ cb_info.user_data) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, H5I_INVALID_HID, "traversal operator failed")
/* Check access flags */
- if((intent & H5F_ACC_TRUNC) || (intent & H5F_ACC_EXCL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags")
+ if ((intent & H5F_ACC_TRUNC) || (intent & H5F_ACC_EXCL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags")
} /* end if */
/* Set file close degree for new file to "weak" */
- if(H5P_set(fa_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree")
+ if (H5P_set(fa_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree")
/*
* Start searching for the target file
@@ -307,203 +291,215 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
intent = ((intent & H5F_ACC_RDWR) ? H5F_ACC_RDWR : H5F_ACC_RDONLY);
/* Copy the file name to use */
- if(NULL == (temp_file_name = H5MM_strdup(file_name)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (temp_file_name = H5MM_strdup(file_name)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
temp_file_name_len = HDstrlen(temp_file_name);
/* target file_name is an absolute pathname: see RM for detailed description */
- if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
+ if (H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
/* Try opening file */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id))) {
char *ptr;
H5E_clear_stack(NULL);
/* get last component of file_name */
- H5_GET_LAST_DELIMITER(file_name, ptr)
- HDassert(ptr);
+ H5_GET_LAST_DELIMITER(file_name, ptr)
+ HDassert(ptr);
/* Increment past delimiter */
ptr++;
/* Copy into the temp. file name */
- HDstrncpy(temp_file_name, ptr, temp_file_name_len);
+ HDstrncpy(temp_file_name, ptr, temp_file_name_len);
temp_file_name[temp_file_name_len - 1] = '\0';
} /* end if */
- } /* end if */
- else if(H5_CHECK_ABS_DRIVE(file_name)) {
+ } /* end if */
+ else if (H5_CHECK_ABS_DRIVE(file_name)) {
/* Try opening file */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id))) {
H5E_clear_stack(NULL);
- /* strip "<drive-letter>:" */
- HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len);
+ /* strip "<drive-letter>:" */
+ HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len);
temp_file_name[temp_file_name_len - 1] = '\0';
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
/* try searching from paths set in the environment variable */
- if(ext_file == NULL) {
+ if (ext_file == NULL) {
char *env_prefix;
- if(NULL != (env_prefix = HDgetenv("HDF5_EXT_PREFIX"))) {
+ if (NULL != (env_prefix = HDgetenv("HDF5_EXT_PREFIX"))) {
char *tmp_env_prefix, *saved_env;
- if(NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix)))
- HGOTO_ERROR(H5E_LINK, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix)))
+ HGOTO_ERROR(H5E_LINK, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
- while((tmp_env_prefix) && (*tmp_env_prefix)) {
+ while ((tmp_env_prefix) && (*tmp_env_prefix)) {
char *out_prefix_name;
- out_prefix_name = H5L_getenv_prefix_name(&tmp_env_prefix/*in,out*/);
- if(out_prefix_name && (*out_prefix_name)) {
- if(H5L_build_name(out_prefix_name, temp_file_name, &full_name/*out*/) < 0) {
- saved_env = (char *)H5MM_xfree(saved_env);
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- } /* end if */
+ out_prefix_name = H5L_getenv_prefix_name(&tmp_env_prefix /*in,out*/);
+ if (out_prefix_name && (*out_prefix_name)) {
+ if (H5L_build_name(out_prefix_name, temp_file_name, &full_name /*out*/) < 0) {
+ saved_env = (char *)H5MM_xfree(saved_env);
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID,
+ "can't prepend prefix to filename")
+ } /* end if */
- ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id);
+ ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id);
full_name = (char *)H5MM_xfree(full_name);
- if(ext_file != NULL)
+ if (ext_file != NULL)
break;
H5E_clear_stack(NULL);
} /* end if */
- } /* end while */
- saved_env = (char *)H5MM_xfree(saved_env);
+ } /* end while */
+ saved_env = (char *)H5MM_xfree(saved_env);
} /* end if */
- } /* end if */
+ } /* end if */
/* try searching from property list */
- if(ext_file == NULL) {
- if(H5P_get(plist, H5L_ACS_ELINK_PREFIX_NAME, &my_prefix) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external link prefix")
- if(my_prefix) {
- if(H5L_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if (ext_file == NULL) {
+ if (H5P_get(plist, H5L_ACS_ELINK_PREFIX_NAME, &my_prefix) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get external link prefix")
+ if (my_prefix) {
+ if (H5L_build_name(my_prefix, temp_file_name, &full_name /*out*/) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't prepend prefix to filename")
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id)))
H5E_clear_stack(NULL);
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
- } /* end if */
+ } /* end if */
/* try searching from main file's "extpath": see description in H5F_open() & H5_build_extpath() */
- if(ext_file == NULL) {
+ if (ext_file == NULL) {
char *extpath;
- if(NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) {
- if(H5L_build_name(extpath, temp_file_name, &full_name/*out*/) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if (NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) {
+ if (H5L_build_name(extpath, temp_file_name, &full_name /*out*/) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't prepend prefix to filename")
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id)))
H5E_clear_stack(NULL);
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
- } /* end if */
+ } /* end if */
/* try the relative file_name stored in temp_file_name */
- if(ext_file == NULL) {
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if (ext_file == NULL) {
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id)))
H5E_clear_stack(NULL);
} /* end if */
/* try the 'resolved' name for the parent file (i.e. the name after symlinks
* were resolved)
*/
- if(ext_file == NULL) {
+ if (ext_file == NULL) {
char *ptr = NULL;
/* Copy resolved file name */
- if(NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(loc.oloc->file))))
- HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, FAIL, "can't duplicate resolved file name string")
+ if (NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(loc.oloc->file))))
+ HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, H5I_INVALID_HID, "can't duplicate resolved file name string")
/* get last component of file_name */
H5_GET_LAST_DELIMITER(actual_file_name, ptr)
- if(!ptr)
- HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
+ if (!ptr)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, H5I_INVALID_HID,
+ "unable to open external file, external link file name = '%s', temp_file_name = '%s'",
+ file_name, temp_file_name)
/* Truncate filename portion from actual file name path */
*ptr = '\0';
/* Build new file name for the external file */
- if(H5L_build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
+ if (H5L_build_name(actual_file_name, temp_file_name, &full_name /*out*/) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't prepend prefix to filename")
/* Try opening with the resolved name */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
+ if (NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT,
+ fapl_id, H5AC_dxpl_id)))
+ HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, H5I_INVALID_HID,
+ "unable to open external file, external link file name = '%s', temp_file_name = '%s'",
+ file_name, temp_file_name)
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
-
/* Retrieve the "group location" for the file's root group */
- if(H5G_root_loc(ext_file, &root_loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
+ if (H5G_root_loc(ext_file, &root_loc) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5I_INVALID_HID, "unable to create location for file")
/* Open the object referenced in the external file */
- if((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, FALSE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ if ((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, FALSE)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
/* Set return value */
ret_value = ext_obj;
done:
/* Release resources */
- if(fapl_id > 0 && H5I_dec_ref(fapl_id) < 0)
- HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom for file access property list")
- if(ext_file && H5F_efc_close(loc.oloc->file, ext_file) < 0)
- HDONE_ERROR(H5E_LINK, H5E_CANTCLOSEFILE, FAIL, "problem closing external file")
- if(parent_group_name && parent_group_name != local_group_name)
+ if (fapl_id > 0 && H5I_dec_ref(fapl_id) < 0)
+ HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, H5I_INVALID_HID,
+ "unable to close atom for file access property list")
+ if (ext_file && H5F_efc_close(loc.oloc->file, ext_file) < 0)
+ HDONE_ERROR(H5E_LINK, H5E_CANTCLOSEFILE, H5I_INVALID_HID, "problem closing external file")
+ if (parent_group_name && parent_group_name != local_group_name)
parent_group_name = (char *)H5MM_xfree(parent_group_name);
- full_name = (char *)H5MM_xfree(full_name);
- temp_file_name = (char *)H5MM_xfree(temp_file_name);
+ full_name = (char *)H5MM_xfree(full_name);
+ temp_file_name = (char *)H5MM_xfree(temp_file_name);
actual_file_name = (char *)H5MM_xfree(actual_file_name);
- if(ret_value < 0) {
+ if (ret_value < 0) {
/* Close object if it's open and something failed */
- if(ext_obj >= 0 && H5I_dec_ref(ext_obj) < 0)
- HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom for external object")
+ if (ext_obj >= 0 && H5I_dec_ref(ext_obj) < 0)
+ HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, H5I_INVALID_HID,
+ "unable to close atom for external object")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_extern_traverse() */
-
/*-------------------------------------------------------------------------
* Function: H5L_extern_query
*
- * Purpose: Default query function for external links. This can
+ * Purpose: Default query function for external links. This can
* be overridden using H5Lregister().
*
* Returns the size of the link's user data. If a buffer of
* is provided, copies at most buf_size bytes of the udata
* into it.
*
- * Return: Size of buffer on success/Negative on failure
+ * Return: Size of buffer on success/Negative on failure
*
- * Programmer: James Laird
+ * Programmer: James Laird
* Monday, July 10, 2006
*
*-------------------------------------------------------------------------
*/
static ssize_t
-H5L_extern_query(const char H5_ATTR_UNUSED * link_name, const void *_udata, size_t udata_size,
- void *buf /*out*/, size_t buf_size)
+H5L_extern_query(const char H5_ATTR_UNUSED *link_name, const void *_udata, size_t udata_size,
+ void *buf /*out*/, size_t buf_size)
{
- const uint8_t *udata = (const uint8_t *)_udata; /* Pointer to external link buffer */
- ssize_t ret_value = SUCCEED; /* Return value */
+ const uint8_t *udata = (const uint8_t *)_udata; /* Pointer to external link buffer */
+ ssize_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check external link version & flags */
- if(((*udata >> 4) & 0x0F) != H5L_EXT_VERSION)
+ if (((*udata >> 4) & 0x0F) != H5L_EXT_VERSION)
HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link")
- if((*udata & 0x0F) & ~H5L_EXT_FLAGS_ALL)
+ if ((*udata & 0x0F) & ~H5L_EXT_FLAGS_ALL)
HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link")
/* If the buffer is NULL, skip writing anything in it and just return
* the size needed */
- if(buf) {
- if(udata_size < buf_size)
+ if (buf) {
+ if (udata_size < buf_size)
buf_size = udata_size;
/* Copy the udata verbatim up to buf_size */
@@ -517,74 +513,73 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_extern_query() */
-
/*-------------------------------------------------------------------------
- * Function: H5Lcreate_external
+ * Function: H5Lcreate_external
*
- * Purpose: Creates an external link from LINK_NAME to OBJ_NAME.
+ * Purpose: Creates an external link from LINK_NAME to OBJ_NAME.
*
* External links are links to objects in other HDF5 files. They
* are allowed to "dangle" like soft links internal to a file.
* FILE_NAME is the name of the file that OBJ_NAME is is contained
* within. If OBJ_NAME is given as a relative path name, the
* path will be relative to the root group of FILE_NAME.
- * LINK_NAME is interpreted relative to LINK_LOC_ID, which is
+ * LINK_NAME is interpreted relative to LINK_LOC_ID, which is
* either a file ID or a group ID.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 18, 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Lcreate_external(const char *file_name, const char *obj_name,
- hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id)
+H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_id, const char *link_name,
+ hid_t lcpl_id, hid_t lapl_id)
{
- H5G_loc_t link_loc; /* Group location to create link */
- char *norm_obj_name = NULL; /* Pointer to normalized current name */
- void *ext_link_buf = NULL; /* Buffer to contain external link */
- size_t buf_size; /* Size of buffer to hold external link */
- size_t file_name_len; /* Length of file name string */
- size_t norm_obj_name_len; /* Length of normalized object name string */
- uint8_t *p; /* Pointer into external link buffer */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t link_loc; /* Group location to create link */
+ char * norm_obj_name = NULL; /* Pointer to normalized current name */
+ void * ext_link_buf = NULL; /* Buffer to contain external link */
+ size_t buf_size; /* Size of buffer to hold external link */
+ size_t file_name_len; /* Length of file name string */
+ size_t norm_obj_name_len; /* Length of normalized object name string */
+ uint8_t * p; /* Pointer into external link buffer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "*s*si*sii", file_name, obj_name, link_loc_id, link_name,
- lcpl_id, lapl_id);
+ H5TRACE6("e", "*s*si*sii", file_name, obj_name, link_loc_id, link_name, lcpl_id, lapl_id);
/* Check arguments */
- if(!file_name || !*file_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified")
- if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified")
- if(H5G_loc(link_loc_id, &link_loc) < 0)
+ if (!file_name || !*file_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified")
+ if (!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified")
+ if (H5G_loc(link_loc_id, &link_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!link_name || !*link_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified")
+ if (!link_name || !*link_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified")
/* Get normalized copy of the link target */
- if(NULL == (norm_obj_name = H5G_normalize(obj_name)))
+ if (NULL == (norm_obj_name = H5G_normalize(obj_name)))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "can't normalize object name")
/* Combine the filename and link name into a single buffer to give to the UD link */
- file_name_len = HDstrlen(file_name) + 1;
+ file_name_len = HDstrlen(file_name) + 1;
norm_obj_name_len = HDstrlen(norm_obj_name) + 1;
- buf_size = 1 + file_name_len + norm_obj_name_len;
- if(NULL == (ext_link_buf = H5MM_malloc(buf_size)))
+ buf_size = 1 + file_name_len + norm_obj_name_len;
+ if (NULL == (ext_link_buf = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate udata buffer")
/* Encode the external link information */
- p = (uint8_t *)ext_link_buf;
- *p++ = (H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL; /* External link version & flags */
- HDstrncpy((char *)p, file_name, buf_size - 1); /* Name of file containing external link's object */
+ p = (uint8_t *)ext_link_buf;
+ *p++ = (H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL; /* External link version & flags */
+ HDstrncpy((char *)p, file_name, buf_size - 1); /* Name of file containing external link's object */
p += file_name_len;
- HDstrncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
+ HDstrncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
/* Create an external link */
- if(H5L_create_ud(&link_loc, link_name, ext_link_buf, buf_size, H5L_TYPE_EXTERNAL, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_create_ud(&link_loc, link_name, ext_link_buf, buf_size, H5L_TYPE_EXTERNAL, lcpl_id, lapl_id,
+ H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
@@ -594,7 +589,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_external() */
-
/*-------------------------------------------------------------------------
* Function: H5L_register_external
*
@@ -612,18 +606,17 @@ done:
herr_t
H5L_register_external(void)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(H5L_register(H5L_EXTERN_LINK_CLASS) < 0)
+ if (H5L_register(H5L_EXTERN_LINK_CLASS) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_register_external() */
-
/*-------------------------------------------------------------------------
* Function: H5Lunpack_elink_val
*
@@ -648,35 +641,34 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size,
- unsigned *flags, const char **filename, const char **obj_path)
+H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size, unsigned *flags, const char **filename,
+ const char **obj_path)
{
const uint8_t *ext_linkval = (const uint8_t *)_ext_linkval; /* Pointer to the link value */
- unsigned lnk_version; /* External link format version */
- unsigned lnk_flags; /* External link flags */
- size_t len; /* Length of the filename in the linkval*/
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned lnk_version; /* External link format version */
+ unsigned lnk_flags; /* External link flags */
+ size_t len; /* Length of the filename in the linkval*/
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "*xz*Iu**s**s", _ext_linkval, link_size, flags, filename,
- obj_path);
+ H5TRACE5("e", "*xz*Iu**s**s", _ext_linkval, link_size, flags, filename, obj_path);
/* Sanity check external link buffer */
- if(ext_linkval == NULL )
+ if (ext_linkval == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an external link linkval buffer")
lnk_version = (*ext_linkval >> 4) & 0x0F;
- lnk_flags = *ext_linkval & 0x0F;
- if(lnk_version > H5L_EXT_VERSION)
+ lnk_flags = *ext_linkval & 0x0F;
+ if (lnk_version > H5L_EXT_VERSION)
HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link")
- if(lnk_flags & (unsigned)~H5L_EXT_FLAGS_ALL)
+ if (lnk_flags & (unsigned)~H5L_EXT_FLAGS_ALL)
HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link")
- if(link_size <= 2)
+ if (link_size <= 2)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid external link buffer")
/* Try to do some error checking. If the last character in the linkval
* (the last character of obj_path) isn't NULL, then something's wrong.
*/
- if(ext_linkval[link_size - 1] != '\0')
+ if (ext_linkval[link_size - 1] != '\0')
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer is not NULL-terminated")
/* We're now guaranteed that HDstrlen won't segfault, since the buffer has
@@ -687,23 +679,22 @@ H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size,
/* If the first NULL we found was at the very end of the buffer, then
* this external link value has no object name and is invalid.
*/
- if((len + 1) >= (link_size - 1))
+ if ((len + 1) >= (link_size - 1))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer doesn't contain an object path")
/* If we got here then the buffer contains (at least) two strings packed
* in the correct way. Assume it's correct and return pointers to the
* filename and object path.
*/
- if(filename)
+ if (filename)
*filename = (const char *)ext_linkval + 1;
- if(obj_path)
- *obj_path = ((const char *)ext_linkval + 1) + len + 1; /* Add one for NULL terminator */
+ if (obj_path)
+ *obj_path = ((const char *)ext_linkval + 1) + len + 1; /* Add one for NULL terminator */
/* Set the flags to return */
- if(flags)
+ if (flags)
*flags = lnk_flags;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Lunpack_elink_val() */
-
diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h
index 62c9992..7c9984a 100644
--- a/src/H5Lpkg.h
+++ b/src/H5Lpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <matzke@llnl.gov>
+ * Programmer: James Laird
* Friday, December 1, 2005
*
* Purpose: This file contains declarations which are visible
@@ -31,32 +31,26 @@
/* Other private headers needed by this file */
-
/**************************/
/* Package Private Macros */
/**************************/
-
/****************************/
/* Package Private Typedefs */
/****************************/
-
/*****************************/
/* Package Private Variables */
/*****************************/
-
/******************************/
/* Package Private Prototypes */
/******************************/
-H5_DLL herr_t H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name,
- const void * ud_data, size_t ud_data_size, H5L_type_t type,
- hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id,
- const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk,
- H5O_copy_t *cpy_info);
+H5_DLL herr_t H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_data,
+ size_t ud_data_size, H5L_type_t type, hid_t lcpl_id, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL herr_t H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
+ const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info);
#endif /* _H5Lpkg_H */
-
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index 23243eb..464b893 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -22,27 +22,30 @@
#include "H5Lpublic.h"
/* Private headers needed by this file */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Oprivate.h" /* Object headers */
-
+#include "H5Gprivate.h" /* Groups */
+#include "H5Oprivate.h" /* Object headers */
/**************************/
/* Library Private Macros */
/**************************/
/* Default number of soft links to traverse */
-#define H5L_NUM_LINKS 16
+#define H5L_NUM_LINKS 16
/* ======== Link creation property names ======== */
-#define H5L_CRT_INTERMEDIATE_GROUP_NAME "intermediate_group" /* Create intermediate groups flag */
+#define H5L_CRT_INTERMEDIATE_GROUP_NAME "intermediate_group" /* Create intermediate groups flag */
/* ======== Link access property names ======== */
-#define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */
-#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */
-#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" /* file access property list for external link access */
-#define H5L_ACS_ELINK_FLAGS_NAME "external link flags" /* file access flags for external link traversal */
-#define H5L_ACS_ELINK_CB_NAME "external link callback" /* callback function for external link traversal */
-
+/* Number of soft links to traverse */
+#define H5L_ACS_NLINKS_NAME "max soft links"
+/* External link prefix */
+#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix"
+/* file access property list for external link access */
+#define H5L_ACS_ELINK_FAPL_NAME "external link fapl"
+/* file access flags for external link traversal */
+#define H5L_ACS_ELINK_FLAGS_NAME "external link flags"
+/* callback function for external link traversal */
+#define H5L_ACS_ELINK_CB_NAME "external link callback"
/****************************/
/* Library Private Typedefs */
@@ -50,41 +53,36 @@
/* Structure for external link traversal callback property */
typedef struct H5L_elink_cb_t {
- H5L_elink_traverse_t func;
- void *user_data;
+ H5L_elink_traverse_t func;
+ void * user_data;
} H5L_elink_cb_t;
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/******************************/
/* Library Private Prototypes */
/******************************/
/* General operations on links */
H5_DLL herr_t H5L_init(void);
-H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name,
- H5G_loc_t *obj_loc, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
- H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
- const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id,
- hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_create_soft(const char *target_path, const H5G_loc_t *cur_loc,
- const char *cur_name, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL hid_t H5L_get_default_lcpl(void);
-H5_DLL herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name,
- H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
- hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name,
- H5L_info_t *linkbuf/*out*/, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id,
- hid_t dxpl_id);
-H5_DLL herr_t H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/,
- size_t size, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid_t lcpl_id,
+ hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t *ocrt_info,
+ hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link_loc,
+ const char *link_name, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_create_soft(const char *target_path, const H5G_loc_t *cur_loc, const char *cur_name,
+ hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL hid_t H5L_get_default_lcpl(void);
+H5_DLL herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc, const char *dst_name,
+ hbool_t copy_flag, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name, H5L_info_t *linkbuf /*out*/, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL herr_t H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_get_val(H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t size, hid_t lapl_id,
+ hid_t dxpl_id);
H5_DLL herr_t H5L_register_external(void);
/* User-defined link functions */
@@ -93,4 +91,3 @@ H5_DLL herr_t H5L_unregister(H5L_type_t id);
H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id);
#endif /* _H5Lprivate_H */
-
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 9d1643e..b5568c9 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -25,9 +25,9 @@
#define _H5Lpublic_H
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Tpublic.h" /* Datatypes */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5Tpublic.h" /* Datatypes */
/*****************/
/* Public Macros */
@@ -35,7 +35,7 @@
/* Maximum length of a link's name */
/* (encoded in a 32-bit unsigned integer) */
-#define H5L_MAX_LINK_NAME_LEN ((uint32_t)(-1)) /* (4GB - 1) */
+#define H5L_MAX_LINK_NAME_LEN ((uint32_t)(-1)) /* (4GB - 1) */
/* Macro to indicate operation occurs on same location */
#define H5L_SAME_LOC (hid_t)0
@@ -56,28 +56,30 @@ extern "C" {
* Values 64 to 255 are for "user-defined" link class types; these types are
* defined by HDF5 but their behavior can be overridden by users.
* Users who want to create new classes of links should contact the HDF5
- * development team at hdfhelp@ncsa.uiuc.edu .
+ * development team at help@hdfgroup.org.
* These values can never change because they appear in HDF5 files.
*/
typedef enum {
- H5L_TYPE_ERROR = (-1), /* Invalid link type id */
- H5L_TYPE_HARD = 0, /* Hard link id */
- H5L_TYPE_SOFT = 1, /* Soft link id */
- H5L_TYPE_EXTERNAL = 64, /* External link id */
- H5L_TYPE_MAX = 255 /* Maximum link type id */
+ H5L_TYPE_ERROR = (-1), /* Invalid link type id */
+ H5L_TYPE_HARD = 0, /* Hard link id */
+ H5L_TYPE_SOFT = 1, /* Soft link id */
+ H5L_TYPE_EXTERNAL = 64, /* External link id */
+ H5L_TYPE_MAX = 255 /* Maximum link type id */
} H5L_type_t;
-#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */
-#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. */
+/* Maximum value link value for "built-in" link types */
+#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT
+/* Link ids at or above this value are "user-defined" link types. */
+#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL
/* Information struct for link (for H5Lget_info/H5Lget_info_by_idx) */
typedef struct {
- H5L_type_t type; /* Type of link */
- hbool_t corder_valid; /* Indicate if creation order is valid */
- int64_t corder; /* Creation order */
- H5T_cset_t cset; /* Character set of link name */
+ H5L_type_t type; /* Type of link */
+ hbool_t corder_valid; /* Indicate if creation order is valid */
+ int64_t corder; /* Creation order */
+ H5T_cset_t cset; /* Character set of link name */
union {
- haddr_t address; /* Address hard link points to */
- size_t val_size; /* Size of a soft link or UD link value */
+ haddr_t address; /* Address hard link points to */
+ size_t val_size; /* Size of a soft link or UD link value */
} u;
} H5L_info_t;
@@ -87,114 +89,104 @@ typedef struct {
*/
/* Callback prototypes for user-defined links */
/* Link creation callback */
-typedef herr_t (*H5L_create_func_t)(const char *link_name, hid_t loc_group,
- const void *lnkdata, size_t lnkdata_size, hid_t lcpl_id);
+typedef herr_t (*H5L_create_func_t)(const char *link_name, hid_t loc_group, const void *lnkdata,
+ size_t lnkdata_size, hid_t lcpl_id);
/* Callback for when the link is moved */
-typedef herr_t (*H5L_move_func_t)(const char *new_name, hid_t new_loc,
- const void *lnkdata, size_t lnkdata_size);
+typedef herr_t (*H5L_move_func_t)(const char *new_name, hid_t new_loc, const void *lnkdata,
+ size_t lnkdata_size);
/* Callback for when the link is copied */
-typedef herr_t (*H5L_copy_func_t)(const char *new_name, hid_t new_loc,
- const void *lnkdata, size_t lnkdata_size);
+typedef herr_t (*H5L_copy_func_t)(const char *new_name, hid_t new_loc, const void *lnkdata,
+ size_t lnkdata_size);
/* Callback during link traversal */
-typedef hid_t (*H5L_traverse_func_t)(const char *link_name, hid_t cur_group,
- const void *lnkdata, size_t lnkdata_size, hid_t lapl_id);
+typedef hid_t (*H5L_traverse_func_t)(const char *link_name, hid_t cur_group, const void *lnkdata,
+ size_t lnkdata_size, hid_t lapl_id);
/* Callback for when the link is deleted */
-typedef herr_t (*H5L_delete_func_t)(const char *link_name, hid_t file,
- const void *lnkdata, size_t lnkdata_size);
+typedef herr_t (*H5L_delete_func_t)(const char *link_name, hid_t file, const void *lnkdata,
+ size_t lnkdata_size);
/* Callback for querying the link */
/* Returns the size of the buffer needed */
-typedef ssize_t (*H5L_query_func_t)(const char *link_name, const void *lnkdata,
- size_t lnkdata_size, void *buf /*out*/, size_t buf_size);
+typedef ssize_t (*H5L_query_func_t)(const char *link_name, const void *lnkdata, size_t lnkdata_size,
+ void *buf /*out*/, size_t buf_size);
/* User-defined link types */
typedef struct {
- int version; /* Version number of this struct */
- H5L_type_t id; /* Link type ID */
- const char *comment; /* Comment for debugging */
- H5L_create_func_t create_func; /* Callback during link creation */
- H5L_move_func_t move_func; /* Callback after moving link */
- H5L_copy_func_t copy_func; /* Callback after copying link */
- H5L_traverse_func_t trav_func; /* Callback during link traversal */
- H5L_delete_func_t del_func; /* Callback for link deletion */
- H5L_query_func_t query_func; /* Callback for queries */
+ int version; /* Version number of this struct */
+ H5L_type_t id; /* Link type ID */
+ const char * comment; /* Comment for debugging */
+ H5L_create_func_t create_func; /* Callback during link creation */
+ H5L_move_func_t move_func; /* Callback after moving link */
+ H5L_copy_func_t copy_func; /* Callback after copying link */
+ H5L_traverse_func_t trav_func; /* Callback during link traversal */
+ H5L_delete_func_t del_func; /* Callback for link deletion */
+ H5L_query_func_t query_func; /* Callback for queries */
} H5L_class_t;
/* Prototype for H5Literate/H5Literate_by_name() operator */
-typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info,
- void *op_data);
+typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info, void *op_data);
/* Callback for external link traversal */
-typedef herr_t (*H5L_elink_traverse_t)(const char *parent_file_name,
- const char *parent_group_name, const char *child_file_name,
- const char *child_object_name, unsigned *acc_flags, hid_t fapl_id,
- void *op_data);
-
+typedef herr_t (*H5L_elink_traverse_t)(const char *parent_file_name, const char *parent_group_name,
+ const char *child_file_name, const char *child_object_name,
+ unsigned *acc_flags, hid_t fapl_id, void *op_data);
/********************/
/* Public Variables */
/********************/
-
/*********************/
/* Public Prototypes */
/*********************/
-H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc,
- const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc,
- const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name,
- hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcreate_soft(const char *link_target, hid_t link_loc_id,
- const char *link_name, hid_t lcpl_id, hid_t lapl_id);
+H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id,
+ hid_t lapl_id);
+H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id,
+ hid_t lapl_id);
+H5_DLL herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name, hid_t dst_loc, const char *dst_name,
+ hid_t lcpl_id, hid_t lapl_id);
+H5_DLL herr_t H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name, hid_t lcpl_id,
+ hid_t lapl_id);
H5_DLL herr_t H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
-H5_DLL herr_t H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/,
- size_t size, hid_t lapl_id);
-H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- void *buf/*out*/, size_t size, hid_t lapl_id);
+H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, hid_t lapl_id);
+H5_DLL herr_t H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t lapl_id);
+H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, void *buf /*out*/, size_t size,
+ hid_t lapl_id);
H5_DLL htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name,
- H5L_info_t *linfo /*out*/, hid_t lapl_id);
-H5_DLL herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5L_info_t *linfo /*out*/, hid_t lapl_id);
-H5_DLL ssize_t H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- char *name /*out*/, size_t size, hid_t lapl_id);
-H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data);
-H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,
- H5L_iterate_t op, void *op_data, hid_t lapl_id);
-H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
- H5L_iterate_t op, void *op_data);
-H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,
- void *op_data, hid_t lapl_id);
+H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/, hid_t lapl_id);
+H5_DLL herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5L_info_t *linfo /*out*/, hid_t lapl_id);
+H5_DLL ssize_t H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, char *name /*out*/, size_t size,
+ hid_t lapl_id);
+H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,
+ H5L_iterate_t op, void *op_data);
+H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data,
+ hid_t lapl_id);
+H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,
+ void *op_data);
+H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id);
/* UD link functions */
-H5_DLL herr_t H5Lcreate_ud(hid_t link_loc_id, const char *link_name,
- H5L_type_t link_type, const void *udata, size_t udata_size, hid_t lcpl_id,
- hid_t lapl_id);
+H5_DLL herr_t H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, const void *udata,
+ size_t udata_size, hid_t lcpl_id, hid_t lapl_id);
H5_DLL herr_t H5Lregister(const H5L_class_t *cls);
H5_DLL herr_t H5Lunregister(H5L_type_t id);
H5_DLL htri_t H5Lis_registered(H5L_type_t id);
/* External link functions */
-H5_DLL herr_t H5Lunpack_elink_val(const void *ext_linkval/*in*/, size_t link_size,
- unsigned *flags, const char **filename/*out*/, const char **obj_path /*out*/);
-H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name,
- hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id);
+H5_DLL herr_t H5Lunpack_elink_val(const void *ext_linkval /*in*/, size_t link_size, unsigned *flags,
+ const char **filename /*out*/, const char **obj_path /*out*/);
+H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_id,
+ const char *link_name, hid_t lcpl_id, hid_t lapl_id);
#ifdef __cplusplus
}
#endif
#endif /* _H5Lpublic_H */
-
diff --git a/src/H5MF.c b/src/H5MF.c
index 60b142f..98077e4 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5MF.c
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: File memory management functions.
*
@@ -26,32 +26,29 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFpkg.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFpkg.h" /* File memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
/****************/
-#define H5MF_FSPACE_SHRINK 80 /* Percent of "normal" size to shrink serialized free space size */
-#define H5MF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
+#define H5MF_FSPACE_SHRINK 80 /* Percent of "normal" size to shrink serialized free space size */
+#define H5MF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
/* Map an allocation request type to a free list */
-#define H5MF_ALLOC_TO_FS_TYPE(F, T) ((H5FD_MEM_DEFAULT == (F)->shared->fs_type_map[T]) \
- ? (T) : (F)->shared->fs_type_map[T])
-
+#define H5MF_ALLOC_TO_FS_TYPE(F, T) \
+ ((H5FD_MEM_DEFAULT == (F)->shared->fs_type_map[T]) ? (T) : (F)->shared->fs_type_map[T])
/******************/
/* Local Typedefs */
@@ -59,17 +56,15 @@
/* Enum for kind of free space section+aggregator merging allowed for a file */
typedef enum {
- H5MF_AGGR_MERGE_SEPARATE, /* Everything in separate free list */
- H5MF_AGGR_MERGE_DICHOTOMY, /* Metadata in one free list and raw data in another */
- H5MF_AGGR_MERGE_TOGETHER /* Metadata & raw data in one free list */
+ H5MF_AGGR_MERGE_SEPARATE, /* Everything in separate free list */
+ H5MF_AGGR_MERGE_DICHOTOMY, /* Metadata in one free list and raw data in another */
+ H5MF_AGGR_MERGE_TOGETHER /* Metadata & raw data in one free list */
} H5MF_aggr_merge_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
@@ -78,22 +73,18 @@ typedef enum {
static herr_t H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
static herr_t H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5MF_init_merge_flags
*
@@ -110,10 +101,10 @@ static herr_t H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
herr_t
H5MF_init_merge_flags(H5F_t *f)
{
- H5MF_aggr_merge_t mapping_type; /* Type of free list mapping */
- H5FD_mem_t type; /* Memory type for iteration */
- hbool_t all_same; /* Whether all the types map to the same value */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5MF_aggr_merge_t mapping_type; /* Type of free list mapping */
+ H5FD_mem_t type; /* Memory type for iteration */
+ hbool_t all_same; /* Whether all the types map to the same value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -126,62 +117,62 @@ H5MF_init_merge_flags(H5F_t *f)
* can merge with the metadata or small 'raw' data aggregator
*/
all_same = TRUE;
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
/* Check for any different type mappings */
- if(f->shared->fs_type_map[type] != f->shared->fs_type_map[H5FD_MEM_DEFAULT]) {
+ if (f->shared->fs_type_map[type] != f->shared->fs_type_map[H5FD_MEM_DEFAULT]) {
all_same = FALSE;
break;
} /* end if */
/* Check for all allocation types mapping to the same free list type */
- if(all_same) {
- if(f->shared->fs_type_map[H5FD_MEM_DEFAULT] == H5FD_MEM_DEFAULT)
+ if (all_same) {
+ if (f->shared->fs_type_map[H5FD_MEM_DEFAULT] == H5FD_MEM_DEFAULT)
mapping_type = H5MF_AGGR_MERGE_SEPARATE;
else
mapping_type = H5MF_AGGR_MERGE_TOGETHER;
} /* end if */
else {
/* Check for raw data mapping into same list as metadata */
- if(f->shared->fs_type_map[H5FD_MEM_DRAW] == f->shared->fs_type_map[H5FD_MEM_SUPER])
+ if (f->shared->fs_type_map[H5FD_MEM_DRAW] == f->shared->fs_type_map[H5FD_MEM_SUPER])
mapping_type = H5MF_AGGR_MERGE_SEPARATE;
else {
- hbool_t all_metadata_same; /* Whether all metadata go in same free list */
+ hbool_t all_metadata_same; /* Whether all metadata go in same free list */
/* One or more allocation type don't map to the same free list type */
/* Check if all the metadata allocation types map to the same type */
all_metadata_same = TRUE;
- for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ for (type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
/* Skip checking raw data free list mapping */
/* (global heap is treated as raw data) */
- if(type != H5FD_MEM_DRAW && type != H5FD_MEM_GHEAP) {
+ if (type != H5FD_MEM_DRAW && type != H5FD_MEM_GHEAP) {
/* Check for any different type mappings */
- if(f->shared->fs_type_map[type] != f->shared->fs_type_map[H5FD_MEM_SUPER]) {
+ if (f->shared->fs_type_map[type] != f->shared->fs_type_map[H5FD_MEM_SUPER]) {
all_metadata_same = FALSE;
break;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check for all metadata on same free list */
- if(all_metadata_same)
+ if (all_metadata_same)
mapping_type = H5MF_AGGR_MERGE_DICHOTOMY;
else
mapping_type = H5MF_AGGR_MERGE_SEPARATE;
} /* end else */
- } /* end else */
+ } /* end else */
/* Based on mapping type, initialize merging flags for each free list type */
- switch(mapping_type) {
+ switch (mapping_type) {
case H5MF_AGGR_MERGE_SEPARATE:
/* Don't merge any metadata together */
HDmemset(f->shared->fs_aggr_merge, 0, sizeof(f->shared->fs_aggr_merge));
/* Check if merging raw data should be allowed */
/* (treat global heaps as raw data) */
- if(H5FD_MEM_DRAW == f->shared->fs_type_map[H5FD_MEM_DRAW] ||
- H5FD_MEM_DEFAULT == f->shared->fs_type_map[H5FD_MEM_DRAW]) {
- f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA;
+ if (H5FD_MEM_DRAW == f->shared->fs_type_map[H5FD_MEM_DRAW] ||
+ H5FD_MEM_DEFAULT == f->shared->fs_type_map[H5FD_MEM_DRAW]) {
+ f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA;
f->shared->fs_aggr_merge[H5FD_MEM_GHEAP] = H5F_FS_MERGE_RAWDATA;
- } /* end if */
+ } /* end if */
break;
case H5MF_AGGR_MERGE_DICHOTOMY:
@@ -190,13 +181,14 @@ H5MF_init_merge_flags(H5F_t *f)
/* Allow merging raw data allocations together */
/* (treat global heaps as raw data) */
- f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA;
+ f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA;
f->shared->fs_aggr_merge[H5FD_MEM_GHEAP] = H5F_FS_MERGE_RAWDATA;
break;
case H5MF_AGGR_MERGE_TOGETHER:
/* Merge all allocation types together */
- HDmemset(f->shared->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA), sizeof(f->shared->fs_aggr_merge));
+ HDmemset(f->shared->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
+ sizeof(f->shared->fs_aggr_merge));
break;
default:
@@ -207,7 +199,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_init_merge_flags() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc_open
*
@@ -218,7 +209,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -226,9 +216,9 @@ done:
herr_t
H5MF_alloc_open(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
- const H5FS_section_class_t *classes[] = { /* Free space section classes implemented for file */
- H5MF_FSPACE_SECT_CLS_SIMPLE};
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5FS_section_class_t *classes[] = {/* Free space section classes implemented for file */
+ H5MF_FSPACE_SECT_CLS_SIMPLE};
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -242,19 +232,18 @@ H5MF_alloc_open(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Open an existing free space structure for the file */
- if(NULL == (f->shared->fs_man[type] = H5FS_open(f, dxpl_id, f->shared->fs_addr[type],
- NELMTS(classes), classes, f, f->shared->alignment, f->shared->threshold)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info")
+ if (NULL == (f->shared->fs_man[type] = H5FS_open(f, dxpl_id, f->shared->fs_addr[type], NELMTS(classes),
+ classes, f, f->shared->alignment, f->shared->threshold)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info")
/* Set the state for the free space manager to "open", if it is now */
- if(f->shared->fs_man[type])
+ if (f->shared->fs_man[type])
f->shared->fs_state[type] = H5F_FS_STATE_OPEN;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc_open() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc_create
*
@@ -265,7 +254,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -273,10 +261,10 @@ done:
static herr_t
H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
- const H5FS_section_class_t *classes[] = { /* Free space section classes implemented for file */
- H5MF_FSPACE_SECT_CLS_SIMPLE};
- herr_t ret_value = SUCCEED; /* Return value */
- H5FS_create_t fs_create; /* Free space creation parameters */
+ const H5FS_section_class_t *classes[] = {/* Free space section classes implemented for file */
+ H5MF_FSPACE_SECT_CLS_SIMPLE};
+ herr_t ret_value = SUCCEED; /* Return value */
+ H5FS_create_t fs_create; /* Free space creation parameters */
FUNC_ENTER_NOAPI_NOINIT
@@ -290,26 +278,24 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Set the free space creation parameters */
- fs_create.client = H5FS_CLIENT_FILE_ID;
+ fs_create.client = H5FS_CLIENT_FILE_ID;
fs_create.shrink_percent = H5MF_FSPACE_SHRINK;
fs_create.expand_percent = H5MF_FSPACE_EXPAND;
- fs_create.max_sect_addr = 1 + H5VM_log2_gen((uint64_t)f->shared->maxaddr);
- fs_create.max_sect_size = f->shared->maxaddr;
-
- if(NULL == (f->shared->fs_man[type] = H5FS_create(f, dxpl_id, NULL,
- &fs_create, NELMTS(classes), classes, f, f->shared->alignment, f->shared->threshold)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info")
+ fs_create.max_sect_addr = 1 + H5VM_log2_gen((uint64_t)f->shared->maxaddr);
+ fs_create.max_sect_size = f->shared->maxaddr;
+ if (NULL == (f->shared->fs_man[type] = H5FS_create(f, dxpl_id, NULL, &fs_create, NELMTS(classes), classes,
+ f, f->shared->alignment, f->shared->threshold)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info")
/* Set the state for the free space manager to "open", if it is now */
- if(f->shared->fs_man[type])
+ if (f->shared->fs_man[type])
f->shared->fs_state[type] = H5F_FS_STATE_OPEN;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc_create() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc_start
*
@@ -319,7 +305,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -327,7 +312,7 @@ done:
herr_t
H5MF_alloc_start(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -339,14 +324,14 @@ H5MF_alloc_start(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
HDassert(type != H5FD_MEM_NOLIST);
/* Check if the free space manager exists already */
- if(H5F_addr_defined(f->shared->fs_addr[type])) {
+ if (H5F_addr_defined(f->shared->fs_addr[type])) {
/* Open existing free space manager */
- if(H5MF_alloc_open(f, dxpl_id, type) < 0)
+ if (H5MF_alloc_open(f, dxpl_id, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, FAIL, "can't initialize file free space")
} /* end if */
else {
/* Create new free space manager */
- if(H5MF_alloc_create(f, dxpl_id, type) < 0)
+ if (H5MF_alloc_create(f, dxpl_id, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCREATE, FAIL, "can't initialize file free space")
} /* end else */
@@ -354,7 +339,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc_start() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc_close
*
@@ -370,7 +354,7 @@ done:
static herr_t
H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -384,16 +368,15 @@ H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
HDassert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
/* Close an existing free space structure for the file */
- if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ if (H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
- f->shared->fs_man[type] = NULL;
+ f->shared->fs_man[type] = NULL;
f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc_close() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc
*
@@ -406,7 +389,6 @@ done:
* Failure: HADDR_UNDEF
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 11 1997
*
*-------------------------------------------------------------------------
@@ -414,12 +396,12 @@ done:
haddr_t
H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size)
{
- H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
- haddr_t ret_value; /* Return value */
+ H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
+ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -432,26 +414,27 @@ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_typ
fs_type = H5MF_ALLOC_TO_FS_TYPE(f, alloc_type);
/* Check if we are using the free space manager for this file */
- if(H5F_HAVE_FREE_SPACE_MANAGER(f)) {
+ if (H5F_HAVE_FREE_SPACE_MANAGER(f)) {
/* Check if the free space manager for the file has been initialized */
- if(!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type]))
- if(H5MF_alloc_open(f, dxpl_id, fs_type) < 0)
+ if (!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type]))
+ if (H5MF_alloc_open(f, dxpl_id, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, HADDR_UNDEF, "can't initialize file free space")
/* Search for large enough space in the free space manager */
- if(f->shared->fs_man[fs_type]) {
- H5MF_free_section_t *node; /* Free space section pointer */
- htri_t node_found = FALSE; /* Whether an existing free list node was found */
+ if (f->shared->fs_man[fs_type]) {
+ H5MF_free_section_t *node; /* Free space section pointer */
+ htri_t node_found = FALSE; /* Whether an existing free list node was found */
/* Try to get a section from the free space manager */
- if((node_found = H5FS_sect_find(f, dxpl_id, f->shared->fs_man[fs_type], size, (H5FS_section_info_t **)&node)) < 0)
+ if ((node_found = H5FS_sect_find(f, dxpl_id, f->shared->fs_man[fs_type], size,
+ (H5FS_section_info_t **)&node)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "error locating free space in file")
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 1.5, node_found = %t\n", FUNC, node_found);
+ HDfprintf(stderr, "%s: Check 1.5, node_found = %t\n", FUNC, node_found);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Check for actually finding section */
- if(node_found) {
+ if (node_found) {
/* Sanity check */
HDassert(node);
@@ -459,61 +442,64 @@ HDfprintf(stderr, "%s: Check 1.5, node_found = %t\n", FUNC, node_found);
ret_value = node->sect_info.addr;
/* Check for eliminating the section */
- if(node->sect_info.size == size) {
+ if (node->sect_info.size == size) {
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 1.6, freeing node\n", FUNC);
+ HDfprintf(stderr, "%s: Check 1.6, freeing node\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Free section node */
- if(H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, HADDR_UNDEF, "can't free simple section node")
+ if (H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, HADDR_UNDEF,
+ "can't free simple section node")
} /* end if */
else {
- H5MF_sect_ud_t udata; /* User data for callback */
+ H5MF_sect_ud_t udata; /* User data for callback */
/* Adjust information for section */
node->sect_info.addr += size;
node->sect_info.size -= size;
/* Construct user data for callbacks */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = TRUE;
- udata.allow_eoa_shrink_only = FALSE;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.alloc_type = alloc_type;
+ udata.allow_sect_absorb = TRUE;
+ udata.allow_eoa_shrink_only = FALSE;
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 1.7, re-adding node, node->sect_info.size = %Hu\n", FUNC, node->sect_info.size);
+ HDfprintf(stderr, "%s: Check 1.7, re-adding node, node->sect_info.size = %Hu\n", FUNC,
+ node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Re-insert section node into file's free space */
- if(H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, HADDR_UNDEF, "can't re-add section to file free space")
+ if (H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node,
+ H5FS_ADD_RETURNED_SPACE, &udata) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, HADDR_UNDEF,
+ "can't re-add section to file free space")
} /* end else */
/* Leave now */
HGOTO_DONE(ret_value)
} /* end if */
- } /* end if */
+ } /* end if */
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 2.0\n", FUNC);
+ HDfprintf(stderr, "%s: Check 2.0\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- } /* end if */
+ } /* end if */
/* Allocate from the metadata aggregator (or the VFD) */
- if(HADDR_UNDEF == (ret_value = H5MF_aggr_vfd_alloc(f, alloc_type, dxpl_id, size)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd")
+ if (HADDR_UNDEF == (ret_value = H5MF_aggr_vfd_alloc(f, alloc_type, dxpl_id, size)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd")
done:
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
-H5MF_sects_dump(f, dxpl_id, stderr);
+ H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc_tmp
*
@@ -541,12 +527,12 @@ H5MF_sects_dump(f, dxpl_id, stderr);
haddr_t
H5MF_alloc_tmp(H5F_t *f, hsize_t size)
{
- haddr_t eoa; /* End of allocated space in the file */
- haddr_t ret_value; /* Return value */
+ haddr_t eoa; /* End of allocated space in the file */
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: size = %Hu\n", FUNC, size);
+ HDfprintf(stderr, "%s: size = %Hu\n", FUNC, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -556,15 +542,15 @@ HDfprintf(stderr, "%s: size = %Hu\n", FUNC, size);
HDassert(size > 0);
/* Retrieve the 'eoa' for the file */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed")
/* Compute value to return */
ret_value = f->shared->tmp_addr - size;
/* Check for overlap into the actual allocated space in the file */
- if(H5F_addr_le(ret_value, eoa))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed")
+ if (H5F_addr_le(ret_value, eoa))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed")
/* Adjust temporary address allocator in the file */
f->shared->tmp_addr = ret_value;
@@ -573,7 +559,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_alloc_tmp() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_xfree
*
@@ -583,87 +568,87 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
- hsize_t size)
+H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- H5F_io_info_t fio_info; /* I/O info for operation */
- H5MF_free_section_t *node = NULL; /* Free space section pointer */
- H5MF_sect_ud_t udata; /* User data for callback */
- H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_io_info_t fio_info; /* I/O info for operation */
+ H5MF_free_section_t *node = NULL; /* Free space section pointer */
+ H5MF_sect_ud_t udata; /* User data for callback */
+ H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size);
+ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type,
+ addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
HDassert(f);
- if(!H5F_addr_defined(addr) || 0 == size)
+ if (!H5F_addr_defined(addr) || 0 == size)
HGOTO_DONE(SUCCEED);
- HDassert(addr != 0); /* Can't deallocate the superblock :-) */
+ HDassert(addr != 0); /* Can't deallocate the superblock :-) */
/* Check for attempting to free space that's a 'temporary' file address */
- if(H5F_addr_le(f->shared->tmp_addr, addr))
+ if (H5F_addr_le(f->shared->tmp_addr, addr))
HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, "attempting to free temporary file space")
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ if (NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Check if the space to free intersects with the file's metadata accumulator */
- if(H5F__accum_free(&fio_info, alloc_type, addr, size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator")
+ if (H5F__accum_free(&fio_info, alloc_type, addr, size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL,
+ "can't check free space intersection w/metadata accumulator")
/* Get free space type from allocation type */
fs_type = H5MF_ALLOC_TO_FS_TYPE(f, alloc_type);
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: fs_type = %u\n", FUNC, (unsigned)fs_type);
+ HDfprintf(stderr, "%s: fs_type = %u\n", FUNC, (unsigned)fs_type);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Check if the free space manager for the file has been initialized */
- if(!f->shared->fs_man[fs_type]) {
+ if (!f->shared->fs_man[fs_type]) {
/* If there's no free space manager for objects of this type,
* see if we can avoid creating one by checking if the freed
* space is at the end of the file
*/
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)fs_type, f->shared->fs_addr[fs_type]);
+ HDfprintf(stderr, "%s: f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)fs_type,
+ f->shared->fs_addr[fs_type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(!H5F_addr_defined(f->shared->fs_addr[fs_type])) {
- htri_t status; /* "can absorb" status for section into */
+ if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) {
+ htri_t status; /* "can absorb" status for section into */
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Try to shrink the file or absorb the block into a block aggregator */
- if((status = H5MF_try_shrink(f, alloc_type, dxpl_id, addr, size)) < 0)
+ if ((status = H5MF_try_shrink(f, alloc_type, dxpl_id, addr, size)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for absorbing block")
- else if(status > 0)
+ else if (status > 0)
/* Indicate success */
HGOTO_DONE(SUCCEED)
} /* end if */
/* If we are deleting the free space manager, leave now, to avoid
* [re-]starting it.
- * or if file space strategy type is not using a free space manager
- * (H5F_FILE_SPACE_AGGR_VFD or H5F_FILE_SPACE_VFD), drop free space
+ * or if file space strategy type is not using a free space manager
+ * (H5F_FILE_SPACE_AGGR_VFD or H5F_FILE_SPACE_VFD), drop free space
* section on the floor.
*
* Note: this drops the space to free on the floor...
*
*/
- if(f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING ||
- !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
+ if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size);
+ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -672,49 +657,49 @@ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, a
* space isn't at the end of the file, so start up (or create)
* the file space manager
*/
- if(H5MF_alloc_start(f, dxpl_id, fs_type) < 0)
+ if (H5MF_alloc_start(f, dxpl_id, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
} /* end if */
HDassert(f->shared->fs_man[fs_type]);
/* Create free space section for block */
- if(NULL == (node = H5MF_sect_simple_new(addr, size)))
+ if (NULL == (node = H5MF_sect_simple_new(addr, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section")
/* Construct user data for callbacks */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = TRUE;
- udata.allow_eoa_shrink_only = FALSE;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.alloc_type = alloc_type;
+ udata.allow_sect_absorb = TRUE;
+ udata.allow_eoa_shrink_only = FALSE;
/* Add to the free space for the file */
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", FUNC);
+ HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
+ if (H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node,
+ H5FS_ADD_RETURNED_SPACE, &udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't add section to file free space")
node = NULL;
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC);
+ HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
done:
/* Release section node, if allocated and not added to section list or merged */
- if(node)
- if(H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
+ if (node)
+ if (H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
-H5MF_sects_dump(f, dxpl_id, stderr);
+ H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_xfree() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_try_extend
*
@@ -730,16 +715,17 @@ H5MF_sects_dump(f, dxpl_id, stderr);
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr,
- hsize_t size, hsize_t extra_requested)
+H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size,
+ hsize_t extra_requested)
{
- haddr_t end; /* End of block to extend */
- H5FD_mem_t map_type; /* Mapped type */
- htri_t ret_value; /* Return value */
+ haddr_t end; /* End of block to extend */
+ H5FD_mem_t map_type; /* Mapped type */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC, (unsigned)alloc_type, addr, size, extra_requested);
+ HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC,
+ (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
/* Sanity check */
@@ -753,49 +739,50 @@ HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_r
end = addr + size;
/* Check if the block is exactly at the end of the file */
- if((ret_value = H5FD_try_extend(f->shared->lf, map_type, f, end, extra_requested)) < 0)
+ if ((ret_value = H5FD_try_extend(f->shared->lf, map_type, f, end, extra_requested)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
- else if(ret_value == FALSE) {
- H5F_blk_aggr_t *aggr; /* Aggregator to use */
+ else if (ret_value == FALSE) {
+ H5F_blk_aggr_t *aggr; /* Aggregator to use */
/* Check for test block able to extend aggregation block */
- aggr = (map_type == H5FD_MEM_DRAW) ? &(f->shared->sdata_aggr) : &(f->shared->meta_aggr);
- if((ret_value = H5MF_aggr_try_extend(f, aggr, map_type, end, extra_requested)) < 0)
+ aggr = (map_type == H5FD_MEM_DRAW) ? &(f->shared->sdata_aggr) : &(f->shared->meta_aggr);
+ if ((ret_value = H5MF_aggr_try_extend(f, aggr, map_type, end, extra_requested)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block")
- else if(ret_value == FALSE) {
- H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
+ else if (ret_value == FALSE) {
+ H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
/* Get free space type from allocation type */
fs_type = H5MF_ALLOC_TO_FS_TYPE(f, alloc_type);
/* Check if the free space for the file has been initialized */
- if(!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type]))
- if(H5MF_alloc_open(f, dxpl_id, fs_type) < 0)
+ if (!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type]))
+ if (H5MF_alloc_open(f, dxpl_id, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
/* Check for test block able to block in free space manager */
- if(f->shared->fs_man[fs_type])
- if((ret_value = H5FS_sect_try_extend(f, dxpl_id, f->shared->fs_man[fs_type], addr, size, extra_requested)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending block in free space manager")
+ if (f->shared->fs_man[fs_type])
+ if ((ret_value = H5FS_sect_try_extend(f, dxpl_id, f->shared->fs_man[fs_type], addr, size,
+ extra_requested)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL,
+ "error extending block in free space manager")
} /* end if */
- } /* end if */
+ } /* end if */
done:
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
-H5MF_sects_dump(f, dxpl_id, stderr);
+ H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_try_extend() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_get_freespace
*
- * Purpose: Retrieve the amount of free space in a file.
+ * Purpose: Retrieve the amount of free space in the file
*
* Return: Success: Amount of free space in file
* Failure: Negative
@@ -803,27 +790,22 @@ H5MF_sects_dump(f, dxpl_id, stderr);
* Programmer: Quincey Koziol
* Monday, October 6, 2003
*
- * Modifications:
- * Vailin Choi; July 2012
- * As the default free-list mapping is changed to H5FD_FLMAP_DICHOTOMY,
- * checks are added to account for the last section of each free-space manager
- * and the remaining space in the two aggregators are at EOF.
*-------------------------------------------------------------------------
*/
herr_t
H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_size)
{
- haddr_t eoa; /* End of allocated space in the file */
- haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
- hsize_t ma_size = 0; /* Size of "metadata aggregator" */
- haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
- hsize_t sda_size = 0; /* Size of "small data aggregator" */
- hsize_t tot_fs_size = 0; /* Amount of all free space managed */
- hsize_t tot_meta_size = 0; /* Amount of metadata for free space managers */
- H5FD_mem_t type; /* Memory type for iteration */
- hbool_t fs_started[H5FD_MEM_NTYPES]; /* Indicate whether the free-space manager has been started */
- hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa; /* End of allocated space in the file */
+ haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
+ hsize_t ma_size = 0; /* Size of "metadata aggregator" */
+ haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
+ hsize_t sda_size = 0; /* Size of "small data aggregator" */
+ hsize_t tot_fs_size = 0; /* Amount of all free space managed */
+ hsize_t tot_meta_size = 0; /* Amount of metadata for free space managers */
+ H5FD_mem_t type; /* Memory type for iteration */
+ hbool_t fs_started[H5FD_MEM_NTYPES]; /* Indicate whether the free-space manager has been started */
+ hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -833,101 +815,100 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si
HDassert(f->shared->lf);
/* Retrieve the 'eoa' for the file */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
/* Retrieve metadata aggregator info, if available */
- if(H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
+ if (H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats")
/* Retrieve 'small data' aggregator info, if available */
- if(H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0)
+ if (H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats")
/* Iterate over all the free space types that have managers and get each free list's space */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
- fs_started[type] = FALSE;
+ fs_started[type] = FALSE;
- /* Check if the free space for the file has been initialized */
- if(!f->shared->fs_man[type] && H5F_addr_defined(f->shared->fs_addr[type])) {
- if(H5MF_alloc_open(f, dxpl_id, type) < 0)
+ /* Check if the free space for the file has been initialized */
+ if (!f->shared->fs_man[type] && H5F_addr_defined(f->shared->fs_addr[type])) {
+ if (H5MF_alloc_open(f, dxpl_id, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
HDassert(f->shared->fs_man[type]);
fs_started[type] = TRUE;
} /* end if */
- /* Check if there's free space of this type */
- if(f->shared->fs_man[type]) {
- hsize_t type_fs_size = 0; /* Amount of free space managed for each type */
- hsize_t type_meta_size = 0; /* Amount of free space metadata for each type */
+ /* Check if there's free space of this type */
+ if (f->shared->fs_man[type]) {
+ hsize_t type_fs_size = 0; /* Amount of free space managed for each type */
+ hsize_t type_meta_size = 0; /* Amount of free space metadata for each type */
/* Retrieve free space size from free space manager */
- if(H5FS_sect_stats(f->shared->fs_man[type], &type_fs_size, NULL) < 0)
+ if (H5FS_sect_stats(f->shared->fs_man[type], &type_fs_size, NULL) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats")
- if(H5FS_size(f, f->shared->fs_man[type], &type_meta_size) < 0)
+ if (H5FS_size(f, f->shared->fs_man[type], &type_meta_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space metadata stats")
/* Increment total free space for types */
tot_fs_size += type_fs_size;
tot_meta_size += type_meta_size;
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
/* Iterate until no more EOA shrink occurs */
do {
- eoa_shrank = FALSE;
-
- /* Check the last section of each free-space manager */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
- haddr_t sect_addr = HADDR_UNDEF;
- hsize_t sect_size = 0;
-
- if(f->shared->fs_man[type]) {
- if(H5FS_sect_query_last_sect(f->shared->fs_man[type], &sect_addr, &sect_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query last section on merge list")
-
- /* Deduct space from previous accumulation if the section is at EOA */
- if(H5F_addr_eq(sect_addr + sect_size, eoa)) {
- eoa = sect_addr;
- eoa_shrank = TRUE;
- tot_fs_size -= sect_size;
- } /* end if */
- } /* end if */
- } /* end for */
-
- /* Check the metadata and raw data aggregators */
- if(ma_size > 0 && H5F_addr_eq(ma_addr + ma_size, eoa)) {
- eoa = ma_addr;
- eoa_shrank = TRUE;
- ma_size = 0;
- } /* end if */
- if(sda_size > 0 && H5F_addr_eq(sda_addr + sda_size, eoa)) {
- eoa = sda_addr;
- eoa_shrank = TRUE;
- sda_size = 0;
- } /* end if */
- } while(eoa_shrank);
+ eoa_shrank = FALSE;
+
+ /* Check the last section of each free-space manager */
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ haddr_t sect_addr = HADDR_UNDEF;
+ hsize_t sect_size = 0;
+
+ if (f->shared->fs_man[type]) {
+ if (H5FS_sect_query_last_sect(f->shared->fs_man[type], &sect_addr, &sect_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query last section on merge list")
+
+ /* Deduct space from previous accumulation if the section is at EOA */
+ if (H5F_addr_eq(sect_addr + sect_size, eoa)) {
+ eoa = sect_addr;
+ eoa_shrank = TRUE;
+ tot_fs_size -= sect_size;
+ } /* end if */
+ } /* end if */
+ } /* end for */
+
+ /* Check the metadata and raw data aggregators */
+ if (ma_size > 0 && H5F_addr_eq(ma_addr + ma_size, eoa)) {
+ eoa = ma_addr;
+ eoa_shrank = TRUE;
+ ma_size = 0;
+ } /* end if */
+ if (sda_size > 0 && H5F_addr_eq(sda_addr + sda_size, eoa)) {
+ eoa = sda_addr;
+ eoa_shrank = TRUE;
+ sda_size = 0;
+ } /* end if */
+ } while (eoa_shrank);
/* Close the free-space managers if they were opened earlier in this routine */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
- if(fs_started[type])
- if(H5MF_alloc_close(f, dxpl_id, type) < 0)
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ if (fs_started[type])
+ if (H5MF_alloc_close(f, dxpl_id, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space")
} /* end for */
/* Set the value(s) to return */
/* (The metadata & small data aggregators count as free space now, since they aren't at EOA) */
- if(tot_space)
- *tot_space = tot_fs_size + ma_size + sda_size;
- if(meta_size)
- *meta_size = tot_meta_size;
+ if (tot_space)
+ *tot_space = tot_fs_size + ma_size + sda_size;
+ if (meta_size)
+ *meta_size = tot_meta_size;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_get_freespace() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_try_shrink
*
@@ -937,22 +918,21 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 14 2008
*
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
- hsize_t size)
+H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- H5MF_free_section_t *node = NULL; /* Free space section pointer */
- H5MF_sect_ud_t udata; /* User data for callback */
- htri_t ret_value; /* Return value */
+ H5MF_free_section_t *node = NULL; /* Free space section pointer */
+ H5MF_sect_ud_t udata; /* User data for callback */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size);
+ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type,
+ addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -963,37 +943,36 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
HDassert(size > 0);
/* Create free space section for block */
- if(NULL == (node = H5MF_sect_simple_new(addr, size)))
+ if (NULL == (node = H5MF_sect_simple_new(addr, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section")
/* Construct user data for callbacks */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = FALSE; /* Force section to be absorbed into aggregator */
- udata.allow_eoa_shrink_only = FALSE;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.alloc_type = alloc_type;
+ udata.allow_sect_absorb = FALSE; /* Force section to be absorbed into aggregator */
+ udata.allow_eoa_shrink_only = FALSE;
/* Call the "can shrink" callback for the section */
- if((ret_value = H5MF_sect_simple_can_shrink((const H5FS_section_info_t *)node, &udata)) < 0)
+ if ((ret_value = H5MF_sect_simple_can_shrink((const H5FS_section_info_t *)node, &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check if section can shrink container")
- else if(ret_value > 0) {
+ else if (ret_value > 0) {
/* Shrink or absorb the section */
- if(H5MF_sect_simple_shrink((H5FS_section_info_t **)&node, &udata) < 0)
+ if (H5MF_sect_simple_shrink((H5FS_section_info_t **)&node, &udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink container")
} /* end if */
done:
/* Free section node allocated */
- if(node && H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
+ if (node && H5MF_sect_simple_free((H5FS_section_info_t *)node) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_try_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_close_shrink_eoa
*
@@ -1009,11 +988,11 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
static herr_t
H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id)
{
- H5FD_mem_t type; /* Memory type for iteration */
- hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
- htri_t status; /* Status value */
- H5MF_sect_ud_t udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t type; /* Memory type for iteration */
+ hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
+ htri_t status; /* Status value */
+ H5MF_sect_ud_t udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1022,38 +1001,37 @@ H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id)
HDassert(f->shared);
/* Construct user data for callbacks */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
- udata.allow_sect_absorb = FALSE;
- udata.allow_eoa_shrink_only = TRUE;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
+ udata.allow_sect_absorb = FALSE;
+ udata.allow_eoa_shrink_only = TRUE;
/* Iterate until no more EOA shrinking occurs */
do {
- eoa_shrank = FALSE;
-
- /* Check the last section of each free-space manager */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
- if(f->shared->fs_man[type]) {
- udata.alloc_type = type;
- if((status = H5FS_sect_try_shrink_eoa(f, dxpl_id, f->shared->fs_man[type], &udata)) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
- else if(status > 0)
- eoa_shrank = TRUE;
- } /* end if */
- } /* end for */
-
- /* check the two aggregators */
- if((status = H5MF_aggrs_try_shrink_eoa(f, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
- else if(status > 0)
- eoa_shrank = TRUE;
- } while(eoa_shrank);
+ eoa_shrank = FALSE;
+
+ /* Check the last section of each free-space manager */
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ if (f->shared->fs_man[type]) {
+ udata.alloc_type = type;
+ if ((status = H5FS_sect_try_shrink_eoa(f, dxpl_id, f->shared->fs_man[type], &udata)) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
+ else if (status > 0)
+ eoa_shrank = TRUE;
+ } /* end if */
+ } /* end for */
+
+ /* check the two aggregators */
+ if ((status = H5MF_aggrs_try_shrink_eoa(f, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
+ else if (status > 0)
+ eoa_shrank = TRUE;
+ } while (eoa_shrank);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_close_shrink_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_close
*
@@ -1075,12 +1053,12 @@ done:
herr_t
H5MF_close(H5F_t *f, hid_t dxpl_id)
{
- H5FD_mem_t type; /* Memory type for iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t type; /* Memory type for iteration */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1090,40 +1068,42 @@ HDfprintf(stderr, "%s: Entering\n", FUNC);
/* Free the space in aggregators */
/* (for space not at EOF, it may be put into free space managers) */
- if(H5MF_free_aggrs(f, dxpl_id) < 0)
+ if (H5MF_free_aggrs(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators")
/* Trying shrinking the EOA for the file */
- if(H5MF_close_shrink_eoa(f, dxpl_id) < 0)
+ if (H5MF_close_shrink_eoa(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa")
/* Iterate over all the free space types that have managers and get each free list's space */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
+ HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC,
+ (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If the free space manager for this type is open, close it */
- if(f->shared->fs_man[type]) {
+ if (f->shared->fs_man[type]) {
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ if (H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
- f->shared->fs_man[type] = NULL;
+ f->shared->fs_man[type] = NULL;
f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
} /* end if */
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
+ HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC,
+ (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If there is free space manager info for this type, delete it */
/* (XXX: Make this optional when free space for a file can be persistent) */
- if(H5F_addr_defined(f->shared->fs_addr[type])) {
- haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
+ if (H5F_addr_defined(f->shared->fs_addr[type])) {
+ haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
/* Put address into temporary variable and reset it */
/* (Avoids loopback in file space freeing routine) */
- tmp_fs_addr = f->shared->fs_addr[type];
+ tmp_fs_addr = f->shared->fs_addr[type];
f->shared->fs_addr[type] = HADDR_UNDEF;
/* Shift to "deleting" state, to make certain we don't track any
@@ -1132,11 +1112,11 @@ HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_add
f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Delete free space manager for this type */
- if(H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
+ if (H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
/* Shift [back] to closed state */
HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
@@ -1145,22 +1125,21 @@ HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
/* Sanity check that the free space manager for this type wasn't started up again */
HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
} /* end if */
- } /* end for */
+ } /* end for */
/* Free the space in aggregators (again) */
/* (in case any free space information re-started them) */
- if(H5MF_free_aggrs(f, dxpl_id) < 0)
+ if (H5MF_free_aggrs(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators")
/* Trying shrinking the EOA for the file */
/* (in case any free space is now at the EOA) */
- if(H5MF_close_shrink_eoa(f, dxpl_id) < 0)
+ if (H5MF_close_shrink_eoa(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa")
done:
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_close() */
-
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 221b6d1..5539d37 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: Routines for aggregating free space allocations
@@ -23,58 +23,47 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5MFpkg.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5MFpkg.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
#define EXTEND_THRESHOLD 0.10F
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5MF_aggr_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
- H5F_blk_aggr_t *aggr);
-
+static herr_t H5MF_aggr_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, H5F_blk_aggr_t *aggr);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_vfd_alloc
*
@@ -95,11 +84,11 @@ static herr_t H5MF_aggr_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
haddr_t
H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size)
{
- haddr_t ret_value; /* Return value */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
+ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -109,14 +98,16 @@ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_typ
HDassert(size > 0);
/* Couldn't find anything from the free space manager, go allocate some */
- if(alloc_type != H5FD_MEM_DRAW && alloc_type != H5FD_MEM_GHEAP) {
+ if (alloc_type != H5FD_MEM_DRAW && alloc_type != H5FD_MEM_GHEAP) {
/* Handle metadata differently from "raw" data */
- if(HADDR_UNDEF == (ret_value = H5MF_aggr_alloc(f, dxpl_id, &(f->shared->meta_aggr), &(f->shared->sdata_aggr), alloc_type, size)))
+ if (HADDR_UNDEF == (ret_value = H5MF_aggr_alloc(f, dxpl_id, &(f->shared->meta_aggr),
+ &(f->shared->sdata_aggr), alloc_type, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate metadata")
} /* end if */
else {
/* Allocate "raw" data: H5FD_MEM_DRAW and H5FD_MEM_GHEAP */
- if(HADDR_UNDEF == (ret_value = H5MF_aggr_alloc(f, dxpl_id, &(f->shared->sdata_aggr), &(f->shared->meta_aggr), H5FD_MEM_DRAW, size)))
+ if (HADDR_UNDEF == (ret_value = H5MF_aggr_alloc(f, dxpl_id, &(f->shared->sdata_aggr),
+ &(f->shared->meta_aggr), H5FD_MEM_DRAW, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate raw data")
} /* end else */
@@ -125,16 +116,15 @@ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_typ
done:
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
-H5MF_sects_dump(f, dxpl_id, stderr);
+ H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggr_vfd_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_alloc
*
@@ -150,31 +140,33 @@ H5MF_sects_dump(f, dxpl_id, stderr);
*-------------------------------------------------------------------------
*/
haddr_t
-H5MF_aggr_alloc(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr,
- H5F_blk_aggr_t *other_aggr, H5FD_mem_t type, hsize_t size)
+H5MF_aggr_alloc(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5FD_mem_t type,
+ hsize_t size)
{
- haddr_t eoa_frag_addr = HADDR_UNDEF; /* Address of fragment at EOA */
- hsize_t eoa_frag_size = 0; /* Size of fragment at EOA */
- haddr_t eoa = HADDR_UNDEF; /* Initial EOA for the file */
- haddr_t ret_value; /* Return value */
+ haddr_t eoa_frag_addr = HADDR_UNDEF; /* Address of fragment at EOA */
+ hsize_t eoa_frag_size = 0; /* Size of fragment at EOA */
+ haddr_t eoa = HADDR_UNDEF; /* Initial EOA for the file */
+ haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
+ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
HDassert(other_aggr);
- HDassert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
HDassert(other_aggr->feature_flag != aggr->feature_flag);
HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
HDassert(size > 0);
/* Get the EOA for the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa")
/*
@@ -182,125 +174,151 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
* space and sub-allocate out of that, if possible. Otherwise just allocate
* through H5FD_alloc()
*/
- if(f->shared->feature_flags & aggr->feature_flag) {
- haddr_t aggr_frag_addr = HADDR_UNDEF; /* Address of aggregrator fragment */
- hsize_t aggr_frag_size = 0; /* Size of aggregator fragment */
- hsize_t alignment; /* Alignment of this section */
- hsize_t aggr_mis_align = 0; /* Mis-alignment of aggregator */
- H5FD_mem_t alloc_type, other_alloc_type;/* Current aggregator & 'other' aggregator types */
+ if (f->shared->feature_flags & aggr->feature_flag) {
+ haddr_t aggr_frag_addr = HADDR_UNDEF; /* Address of aggregrator fragment */
+ hsize_t aggr_frag_size = 0; /* Size of aggregator fragment */
+ hsize_t alignment; /* Alignment of this section */
+ hsize_t aggr_mis_align = 0; /* Mis-alignment of aggregator */
+ H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_size, aggr->size);
+ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_size, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Turn off alignment if allocation < threshold */
- alignment = f->shared->alignment;
- if(!((alignment > 1) && (size >= f->shared->threshold)))
- alignment = 0; /* no alignment */
+ alignment = f->shared->alignment;
+ if (!((alignment > 1) && (size >= f->shared->threshold)))
+ alignment = 0; /* no alignment */
/* Generate fragment if aggregator is mis-aligned */
- if(alignment && aggr->addr > 0 && (aggr_mis_align = (aggr->addr + H5FD_get_base_addr(f->shared->lf)) % alignment)) {
- aggr_frag_addr = aggr->addr;
- aggr_frag_size = alignment - aggr_mis_align;
- } /* end if */
+ if (alignment && aggr->addr > 0 &&
+ (aggr_mis_align = (aggr->addr + H5FD_get_base_addr(f->shared->lf)) % alignment)) {
+ aggr_frag_addr = aggr->addr;
+ aggr_frag_size = alignment - aggr_mis_align;
+ } /* end if */
- alloc_type = aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ? H5FD_MEM_DEFAULT : H5FD_MEM_DRAW;
- other_alloc_type = other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ? H5FD_MEM_DEFAULT : H5FD_MEM_DRAW;
+ alloc_type = aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ? H5FD_MEM_DEFAULT : H5FD_MEM_DRAW;
+ other_alloc_type =
+ other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ? H5FD_MEM_DEFAULT : H5FD_MEM_DRAW;
/* Check if the space requested is larger than the space left in the block */
- if((size + aggr_frag_size) > aggr->size) {
- htri_t was_extended = FALSE; /* Whether the file was extended */
+ if ((size + aggr_frag_size) > aggr->size) {
+ htri_t was_extended = FALSE; /* Whether the file was extended */
/* Check if the block asked for is too large for 'normal' aggregator block */
- if(size >= aggr->alloc_size) {
- hsize_t ext_size = size + aggr_frag_size;
+ if (size >= aggr->alloc_size) {
+ hsize_t ext_size = size + aggr_frag_size;
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
-
- if ((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space")
- else if (was_extended) {
- /* aggr->size is unchanged */
- ret_value = aggr->addr + aggr_frag_size;
- aggr->addr += ext_size;
- aggr->tot_size += ext_size;
- } else {
+ if (H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr))
+ HGOTO_ERROR(
+ H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
+
+ if ((aggr->addr > 0) &&
+ (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size,
+ ext_size)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space")
+ else if (was_extended) {
+ /* aggr->size is unchanged */
+ ret_value = aggr->addr + aggr_frag_size;
+ aggr->addr += ext_size;
+ aggr->tot_size += ext_size;
+ }
+ else {
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((eoa + size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
+ if (H5F_addr_gt((eoa + size), f->shared->tmp_addr))
+ HGOTO_ERROR(
+ H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
/* Release "other" aggregator, if it exists, is at the end of the allocated space,
* has allocated more than one block and the unallocated space is greater than its
* allocation block size.
*/
- if ((other_aggr->size > 0) && (H5F_addr_eq((other_aggr->addr + other_aggr->size), eoa)) &&
- (other_aggr->tot_size > other_aggr->size) && ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
- if(H5MF_aggr_free(f, dxpl_id, other_alloc_type, other_aggr) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
- } /* end if */
+ if ((other_aggr->size > 0) && (H5F_addr_eq((other_aggr->addr + other_aggr->size), eoa)) &&
+ (other_aggr->tot_size > other_aggr->size) &&
+ ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
+ if (H5MF_aggr_free(f, dxpl_id, other_alloc_type, other_aggr) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF,
+ "can't free aggregation block")
+ } /* end if */
/* Allocate space from the VFD (i.e. at the end of the file) */
- if(HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, size, &eoa_frag_addr, &eoa_frag_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
+ if (HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, size,
+ &eoa_frag_addr, &eoa_frag_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF,
+ "can't allocate aggregation block")
} /* end else */
- } /* end if */
- else {
- hsize_t ext_size = aggr->alloc_size;
+ } /* end if */
+ else {
+ hsize_t ext_size = aggr->alloc_size;
/* Allocate another block */
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: Allocating block\n", FUNC);
+ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
#endif /* H5MF_AGGR_DEBUG */
- if(aggr_frag_size > (ext_size - size))
- ext_size += (aggr_frag_size - (ext_size - size));
+ if (aggr_frag_size > (ext_size - size))
+ ext_size += (aggr_frag_size - (ext_size - size));
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
-
- if((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space")
- else if (was_extended) {
- aggr->addr += aggr_frag_size;
- aggr->size += (ext_size - aggr_frag_size);
- aggr->tot_size += ext_size;
- } else {
- haddr_t new_space; /* Address of new space allocated */
+ if (H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr))
+ HGOTO_ERROR(
+ H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
+
+ if ((aggr->addr > 0) &&
+ (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size,
+ ext_size)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space")
+ else if (was_extended) {
+ aggr->addr += aggr_frag_size;
+ aggr->size += (ext_size - aggr_frag_size);
+ aggr->tot_size += ext_size;
+ }
+ else {
+ haddr_t new_space; /* Address of new space allocated */
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((eoa + aggr->alloc_size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
+ if (H5F_addr_gt((eoa + aggr->alloc_size), f->shared->tmp_addr))
+ HGOTO_ERROR(
+ H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
/* Release "other" aggregator, if it exists, is at the end of the allocated space,
* has allocated more than one block and the unallocated space is greater than its
* allocation block size.
*/
- if((other_aggr->size > 0) && (H5F_addr_eq((other_aggr->addr + other_aggr->size), eoa)) &&
- (other_aggr->tot_size > other_aggr->size) && ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
- if(H5MF_aggr_free(f, dxpl_id, other_alloc_type, other_aggr) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
- } /* end if */
+ if ((other_aggr->size > 0) && (H5F_addr_eq((other_aggr->addr + other_aggr->size), eoa)) &&
+ (other_aggr->tot_size > other_aggr->size) &&
+ ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
+ if (H5MF_aggr_free(f, dxpl_id, other_alloc_type, other_aggr) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF,
+ "can't free aggregation block")
+ } /* end if */
/* Allocate space from the VFD (i.e. at the end of the file) */
- if(HADDR_UNDEF == (new_space = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, aggr->alloc_size, &eoa_frag_addr, &eoa_frag_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
+ if (HADDR_UNDEF ==
+ (new_space = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, aggr->alloc_size,
+ &eoa_frag_addr, &eoa_frag_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF,
+ "can't allocate aggregation block")
/* Return the unused portion of the block to a free list */
- if(aggr->size > 0)
- if(H5MF_xfree(f, alloc_type, dxpl_id, aggr->addr, aggr->size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
+ if (aggr->size > 0)
+ if (H5MF_xfree(f, alloc_type, dxpl_id, aggr->addr, aggr->size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF,
+ "can't free aggregation block")
/* If the block is not to be aligned, fold the eoa fragment
* into the newly allocated aggregator, as it could have
* been allocated in an aligned manner if the aggregator
* block is larger than the threshold */
- if(eoa_frag_size && !alignment) {
+ if (eoa_frag_size && !alignment) {
HDassert(eoa_frag_addr + eoa_frag_size == new_space);
- aggr->addr = eoa_frag_addr;
- aggr->size = aggr->alloc_size + eoa_frag_size;
+ aggr->addr = eoa_frag_addr;
+ aggr->size = aggr->alloc_size + eoa_frag_size;
aggr->tot_size = aggr->size;
/* Reset EOA fragment */
@@ -309,71 +327,72 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
} /* end if */
else {
/* Point the aggregator at the newly allocated block */
- aggr->addr = new_space;
- aggr->size = aggr->alloc_size;
+ aggr->addr = new_space;
+ aggr->size = aggr->alloc_size;
aggr->tot_size = aggr->alloc_size;
}
} /* end else */
- /* Allocate space out of the metadata block */
- ret_value = aggr->addr;
- aggr->size -= size;
- aggr->addr += size;
+ /* Allocate space out of the metadata block */
+ ret_value = aggr->addr;
+ aggr->size -= size;
+ aggr->addr += size;
} /* end else */
- /* Freeing any possible fragment due to file allocation */
- if(eoa_frag_size)
- if(H5MF_xfree(f, alloc_type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
+ /* Freeing any possible fragment due to file allocation */
+ if (eoa_frag_size)
+ if (H5MF_xfree(f, alloc_type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
- /* Freeing any possible fragment due to alignment in the block after extension */
- if(was_extended && aggr_frag_size)
- if(H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
+ /* Freeing any possible fragment due to alignment in the block after extension */
+ if (was_extended && aggr_frag_size)
+ if (H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
} /* end if */
else {
/* Allocate space out of the block */
- ret_value = aggr->addr + aggr_frag_size;
- aggr->size -= (size + aggr_frag_size);
- aggr->addr += (size + aggr_frag_size);
-
- /* free any possible fragment */
- if(aggr_frag_size)
- if(H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
+ ret_value = aggr->addr + aggr_frag_size;
+ aggr->size -= (size + aggr_frag_size);
+ aggr->addr += (size + aggr_frag_size);
+
+ /* free any possible fragment */
+ if (aggr_frag_size)
+ if (H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check for overlapping into file's temporary allocation space */
- if(H5F_addr_gt((eoa + size), f->shared->tmp_addr))
- HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space")
+ if (H5F_addr_gt((eoa + size), f->shared->tmp_addr))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF,
+ "'normal' file space allocation request will overlap into 'temporary' file space")
/* Allocate data from the file */
- if(HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, type, f, size, &eoa_frag_addr, &eoa_frag_size)))
+ if (HADDR_UNDEF ==
+ (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, type, f, size, &eoa_frag_addr, &eoa_frag_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space")
/* Check if fragment was generated */
- if(eoa_frag_size)
+ if (eoa_frag_size)
/* Put fragment on the free list */
- if(H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
+ if (H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
HDassert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
/* Post-condition sanity check */
- if(f->shared->alignment && size >= f->shared->threshold)
- HDassert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % f->shared->alignment));
+ if (f->shared->alignment && size >= f->shared->threshold)
+ HDassert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % f->shared->alignment));
done:
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggr_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_try_extend
*
@@ -400,87 +419,89 @@ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type,
- haddr_t blk_end, hsize_t extra_requested)
+H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type, haddr_t blk_end,
+ hsize_t extra_requested)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
- if(f->shared->feature_flags & aggr->feature_flag) {
- /*
- * If the block being tested adjoins the beginning of the aggregator
- * block, check if the aggregator can accomodate the extension.
+ if (f->shared->feature_flags & aggr->feature_flag) {
+ /*
+ * If the block being tested adjoins the beginning of the aggregator
+ * block, check if the aggregator can accommodate the extension.
*/
- if(H5F_addr_eq(blk_end, aggr->addr)) {
- haddr_t eoa; /* EOA for the file */
-
- /* Get the EOA for the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
-
- /* If the aggregator is at the end of file: */
- if(H5F_addr_eq(eoa, aggr->addr + aggr->size)) {
- /* If extra_requested is below percentage threshold, extend block into the aggregator. */
- if(extra_requested <= (EXTEND_THRESHOLD * aggr->size)) {
- aggr->size -= extra_requested;
- aggr->addr += extra_requested;
-
- /* Indicate success */
- HGOTO_DONE(TRUE);
- }
- /*
- * If extra_requested is above percentage threshold:
- * 1) "bubble" up the aggregator by aggr->alloc_size or extra_requested
- * 2) extend the block into the aggregator
- */
- else {
- hsize_t extra = (extra_requested < aggr->alloc_size) ? aggr->alloc_size : extra_requested;
-
- if((ret_value = H5FD_try_extend(f->shared->lf, type, f, (aggr->addr + aggr->size), extra)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
- else if(ret_value == TRUE) {
- /* Shift the aggregator block by the extra requested */
+ if (H5F_addr_eq(blk_end, aggr->addr)) {
+ haddr_t eoa; /* EOA for the file */
+
+ /* Get the EOA for the file */
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
+
+ /* If the aggregator is at the end of file: */
+ if (H5F_addr_eq(eoa, aggr->addr + aggr->size)) {
+ /* If extra_requested is below percentage threshold, extend block into the aggregator. */
+ if (extra_requested <= (EXTEND_THRESHOLD * aggr->size)) {
+ aggr->size -= extra_requested;
+ aggr->addr += extra_requested;
+
+ /* Indicate success */
+ HGOTO_DONE(TRUE);
+ }
+ /*
+ * If extra_requested is above percentage threshold:
+ * 1) "bubble" up the aggregator by aggr->alloc_size or extra_requested
+ * 2) extend the block into the aggregator
+ */
+ else {
+ hsize_t extra = (extra_requested < aggr->alloc_size) ? aggr->alloc_size : extra_requested;
+
+ if ((ret_value =
+ H5FD_try_extend(f->shared->lf, type, f, (aggr->addr + aggr->size), extra)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
+ else if (ret_value == TRUE) {
+ /* Shift the aggregator block by the extra requested */
/* (allocates the space for the extra_requested) */
- aggr->addr += extra_requested;
+ aggr->addr += extra_requested;
- /* Add extra to the aggregator's total allocated amount */
- aggr->tot_size += extra;
+ /* Add extra to the aggregator's total allocated amount */
+ aggr->tot_size += extra;
/* Account for any space added to the aggregator */
/* (either 0 (if extra_requested > aggr->alloc_size) or
* (aggr->alloc_size - extra_requested) -QAK
*/
- aggr->size += extra;
- aggr->size -= extra_requested;
- } /* end if */
- } /* end if */
- } /* end if */
- else { /* The aggreator is not at end of file */
+ aggr->size += extra;
+ aggr->size -= extra_requested;
+ } /* end else-if */
+ } /* end else */
+ } /* end if */
+ else {
+ /* The aggreator is not at end of file */
/* Check if aggregator has enough internal space to satisfy the extension. */
- if(aggr->size >= extra_requested) {
+ if (aggr->size >= extra_requested) {
/* Extend block into aggregator */
aggr->size -= extra_requested;
aggr->addr += extra_requested;
/* Indicate success */
HGOTO_DONE(TRUE);
- } /* end if */
- } /* end else */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end else */
+ } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggr_try_extend() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_can_absorb
*
@@ -497,30 +518,32 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
- const H5MF_free_section_t *sect, H5MF_shrink_type_t *shrink)
+H5MF_aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr, const H5MF_free_section_t *sect,
+ H5MF_shrink_type_t *shrink)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
HDassert(sect);
HDassert(shrink);
/* Check if this aggregator is active */
- if(f->shared->feature_flags & aggr->feature_flag) {
+ if (f->shared->feature_flags & aggr->feature_flag) {
/* Check if the block adjoins the beginning or end of the aggregator */
- if(H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)
- || H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) {
+ if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr) ||
+ H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) {
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: section {%a, %Hu} adjoins aggr = {%a, %Hu}\n", "H5MF_aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
+ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins aggr = {%a, %Hu}\n", "H5MF_aggr_can_absorb",
+ sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Check if aggregator would get too large and should be absorbed into section */
- if((aggr->size + sect->sect_info.size) >= aggr->alloc_size)
+ if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size)
*shrink = H5MF_SHRINK_SECT_ABSORB_AGGR;
else
*shrink = H5MF_SHRINK_AGGR_ABSORB_SECT;
@@ -528,13 +551,12 @@ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins aggr = {%a, %Hu}\n", "H5MF_aggr
/* Indicate success */
HGOTO_DONE(TRUE)
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggr_can_absorb() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_absorb
*
@@ -551,23 +573,25 @@ done:
*/
herr_t
H5MF_aggr_absorb(const H5F_t H5_ATTR_UNUSED *f, H5F_blk_aggr_t *aggr, H5MF_free_section_t *sect,
- hbool_t allow_sect_absorb)
+ hbool_t allow_sect_absorb)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
HDassert(f->shared->feature_flags & aggr->feature_flag);
HDassert(sect);
/* Check if aggregator would get too large and should be absorbed into section */
- if((aggr->size + sect->sect_info.size) >= aggr->alloc_size && allow_sect_absorb) {
+ if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size && allow_sect_absorb) {
/* Check if the section adjoins the beginning or end of the aggregator */
- if(H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
+ if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins front of section = {%a, %Hu}\n", "H5MF_aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins front of section = {%a, %Hu}\n", "H5MF_aggr_absorb",
+ aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto end of section */
sect->sect_info.size += aggr->size;
@@ -577,7 +601,8 @@ HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins front of section = {%a, %Hu}\n", "
HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins end of section = {%a, %Hu}\n", "H5MF_aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins end of section = {%a, %Hu}\n", "H5MF_aggr_absorb",
+ aggr->addr, aggr->size, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto beginning of section */
sect->sect_info.addr -= aggr->size;
@@ -586,14 +611,15 @@ HDfprintf(stderr, "%s: aggr {%a, %Hu} adjoins end of section = {%a, %Hu}\n", "H5
/* Reset aggregator */
aggr->tot_size = 0;
- aggr->addr = 0;
- aggr->size = 0;
+ aggr->addr = 0;
+ aggr->size = 0;
} /* end if */
else {
/* Check if the section adjoins the beginning or end of the aggregator */
- if(H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
+ if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: section {%a, %Hu} adjoins front of aggr = {%a, %Hu}\n", "H5MF_aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
+ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins front of aggr = {%a, %Hu}\n", "H5MF_aggr_absorb",
+ sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto front of aggregator */
aggr->addr -= sect->sect_info.size;
@@ -609,7 +635,8 @@ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins front of aggr = {%a, %Hu}\n", "
HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: section {%a, %Hu} adjoins end of aggr = {%a, %Hu}\n", "H5MF_aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
+ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins end of aggr = {%a, %Hu}\n", "H5MF_aggr_absorb",
+ sect->sect_info.addr, sect->sect_info.size, aggr->addr, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto end of aggregator */
aggr->size += sect->sect_info.size;
@@ -621,7 +648,6 @@ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins end of aggr = {%a, %Hu}\n", "H5
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5MF_aggr_absorb() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_query
*
@@ -636,28 +662,27 @@ HDfprintf(stderr, "%s: section {%a, %Hu} adjoins end of aggr = {%a, %Hu}\n", "H5
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr,
- hsize_t *size)
+H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr, hsize_t *size)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
- if(f->shared->feature_flags & aggr->feature_flag) {
- if(addr)
+ if (f->shared->feature_flags & aggr->feature_flag) {
+ if (addr)
*addr = aggr->addr;
- if(size)
+ if (size)
*size = aggr->size;
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5MF_aggr_query() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_reset
*
@@ -674,39 +699,42 @@ H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr,
static herr_t
H5MF_aggr_reset(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr)
{
- H5FD_mem_t alloc_type; /* Type of file memory to work with */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t alloc_type; /* Type of file memory to work with */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Set the type of memory in the file */
- alloc_type = (aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ? H5FD_MEM_DEFAULT : H5FD_MEM_DRAW); /* Type of file memory to work with */
+ alloc_type = (aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA
+ ? H5FD_MEM_DEFAULT
+ : H5FD_MEM_DRAW); /* Type of file memory to work with */
/* Check if this aggregator is active */
- if(f->shared->feature_flags & aggr->feature_flag) {
- haddr_t tmp_addr; /* Temporary holder for aggregator address */
- hsize_t tmp_size; /* Temporary holder for aggregator size */
+ if (f->shared->feature_flags & aggr->feature_flag) {
+ haddr_t tmp_addr; /* Temporary holder for aggregator address */
+ hsize_t tmp_size; /* Temporary holder for aggregator size */
/* Retain aggregator info */
tmp_addr = aggr->addr;
tmp_size = aggr->size;
#ifdef H5MF_AGGR_DEBUG
-HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", FUNC, tmp_addr, tmp_size);
+ HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", FUNC, tmp_addr, tmp_size);
#endif /* H5MF_AGGR_DEBUG */
/* Reset aggregator block information */
aggr->tot_size = 0;
- aggr->addr = 0;
- aggr->size = 0;
+ aggr->addr = 0;
+ aggr->size = 0;
/* Return the unused portion of the metadata block to the file */
- if(tmp_size > 0 && (H5F_INTENT(f) & H5F_ACC_RDWR))
- if(H5MF_xfree(f, alloc_type, dxpl_id, tmp_addr, tmp_size) < 0)
+ if (tmp_size > 0 && (H5F_INTENT(f) & H5F_ACC_RDWR))
+ if (H5MF_xfree(f, alloc_type, dxpl_id, tmp_addr, tmp_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't release aggregator's free space")
} /* end if */
@@ -714,7 +742,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggr_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_free_aggrs
*
@@ -732,13 +759,13 @@ done:
herr_t
H5MF_free_aggrs(H5F_t *f, hid_t dxpl_id)
{
- H5F_blk_aggr_t *first_aggr; /* First aggregator to reset */
- H5F_blk_aggr_t *second_aggr; /* Second aggregator to reset */
- haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
- hsize_t ma_size = 0; /* Size of "metadata aggregator" */
- haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
- hsize_t sda_size = 0; /* Size of "small data aggregator" */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_blk_aggr_t *first_aggr; /* First aggregator to reset */
+ H5F_blk_aggr_t *second_aggr; /* Second aggregator to reset */
+ haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
+ hsize_t ma_size = 0; /* Size of "metadata aggregator" */
+ haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
+ hsize_t sda_size = 0; /* Size of "small data aggregator" */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -748,42 +775,41 @@ H5MF_free_aggrs(H5F_t *f, hid_t dxpl_id)
HDassert(f->shared->lf);
/* Retrieve metadata aggregator info, if available */
- if(H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
+ if (H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats")
/* Retrieve 'small data' aggregator info, if available */
- if(H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0)
+ if (H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats")
/* Make certain we release the aggregator that's later in the file first */
/* (so the file shrinks properly) */
- if(H5F_addr_defined(ma_addr) && H5F_addr_defined(sda_addr)) {
- if(H5F_addr_lt(ma_addr, sda_addr)) {
- first_aggr = &(f->shared->sdata_aggr);
+ if (H5F_addr_defined(ma_addr) && H5F_addr_defined(sda_addr)) {
+ if (H5F_addr_lt(ma_addr, sda_addr)) {
+ first_aggr = &(f->shared->sdata_aggr);
second_aggr = &(f->shared->meta_aggr);
} /* end if */
else {
- first_aggr = &(f->shared->meta_aggr);
+ first_aggr = &(f->shared->meta_aggr);
second_aggr = &(f->shared->sdata_aggr);
} /* end else */
- } /* end if */
+ } /* end if */
else {
- first_aggr = &(f->shared->meta_aggr);
+ first_aggr = &(f->shared->meta_aggr);
second_aggr = &(f->shared->sdata_aggr);
} /* end else */
- /* Release the unused portion of the metadata and "small data" blocks back
- * to the free lists in the file.
- */
- if(H5MF_aggr_reset(f, dxpl_id, first_aggr) < 0)
+ /* Release the unused portion of the metadata and "small data" blocks back
+ * to the free lists in the file.
+ */
+ if (H5MF_aggr_reset(f, dxpl_id, first_aggr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset metadata block")
- if(H5MF_aggr_reset(f, dxpl_id, second_aggr) < 0)
+ if (H5MF_aggr_reset(f, dxpl_id, second_aggr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset 'small data' block")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_free_aggrs() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_can_shrink_eoa
*
@@ -799,29 +825,29 @@ done:
static htri_t
H5MF_aggr_can_shrink_eoa(H5F_t *f, H5FD_mem_t type, H5F_blk_aggr_t *aggr)
{
- haddr_t eoa = HADDR_UNDEF; /* EOA for the file */
- htri_t ret_value = FALSE; /* Return value */
+ haddr_t eoa = HADDR_UNDEF; /* EOA for the file */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Get the EOA for the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
/* Check if the aggregator is at EOA */
- if(aggr->size > 0 && H5F_addr_defined(aggr->addr))
- ret_value = H5F_addr_eq(eoa, aggr->addr + aggr->size);
+ if (aggr->size > 0 && H5F_addr_defined(aggr->addr))
+ ret_value = H5F_addr_eq(eoa, aggr->addr + aggr->size);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_aggr_can_shrink_eoa() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggr_free
*
@@ -839,7 +865,7 @@ done:
static herr_t
H5MF_aggr_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, H5F_blk_aggr_t *aggr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -850,23 +876,23 @@ H5MF_aggr_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, H5F_blk_aggr_t *aggr)
HDassert(H5F_addr_defined(aggr->addr));
HDassert(aggr->size > 0);
HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA || aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
HDassert(f->shared->feature_flags & aggr->feature_flag);
/* Free the remaining space at EOA in the aggregator */
- if(H5FD_free(f->shared->lf, dxpl_id, type, f, aggr->addr, aggr->size) < 0)
+ if (H5FD_free(f->shared->lf, dxpl_id, type, f, aggr->addr, aggr->size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregation block")
/* Reset the aggregator */
aggr->tot_size = 0;
- aggr->addr = HADDR_UNDEF;
- aggr->size = 0;
+ aggr->addr = HADDR_UNDEF;
+ aggr->size = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_aggr_free() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_aggrs_try_shrink_eoa
*
@@ -883,9 +909,9 @@ done:
htri_t
H5MF_aggrs_try_shrink_eoa(H5F_t *f, hid_t dxpl_id)
{
- htri_t ma_status; /* Whether the metadata aggregator can shrink the EOA */
- htri_t sda_status; /* Whether the small data aggregator can shrink the EOA */
- htri_t ret_value; /* Return value */
+ htri_t ma_status; /* Whether the metadata aggregator can shrink the EOA */
+ htri_t sda_status; /* Whether the small data aggregator can shrink the EOA */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -893,21 +919,20 @@ H5MF_aggrs_try_shrink_eoa(H5F_t *f, hid_t dxpl_id)
HDassert(f);
HDassert(f->shared);
- if((ma_status = H5MF_aggr_can_shrink_eoa(f, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr))) < 0)
+ if ((ma_status = H5MF_aggr_can_shrink_eoa(f, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats")
- if(ma_status > 0)
- if(H5MF_aggr_free(f, dxpl_id, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
+ if (ma_status > 0)
+ if (H5MF_aggr_free(f, dxpl_id, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
- if((sda_status = H5MF_aggr_can_shrink_eoa(f, H5FD_MEM_DRAW, &(f->shared->sdata_aggr))) < 0)
+ if ((sda_status = H5MF_aggr_can_shrink_eoa(f, H5FD_MEM_DRAW, &(f->shared->sdata_aggr))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats")
- if(sda_status > 0)
- if(H5MF_aggr_free(f, dxpl_id, H5FD_MEM_DRAW, &(f->shared->sdata_aggr)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
+ if (sda_status > 0)
+ if (H5MF_aggr_free(f, dxpl_id, H5FD_MEM_DRAW, &(f->shared->sdata_aggr)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
ret_value = (ma_status || sda_status);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_aggrs_try_shrink_eoa() */
-
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index d6e5d34..bb9f973 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5MFdbg.c
* Jan 31 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File memory management debugging functions.
*
@@ -26,18 +26,17 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
-#define H5MF_DEBUGGING /* Need access to file space debugging routines */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
+#define H5MF_DEBUGGING /* Need access to file space debugging routines */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5MFpkg.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5MFpkg.h" /* File memory management */
#ifdef H5MF_ALLOC_DEBUG_DUMP
@@ -45,45 +44,38 @@
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for free space section iterator callback */
typedef struct {
- H5FS_t *fspace; /* Free space manager */
- FILE *stream; /* Stream for output */
- int indent; /* Indention amount */
- int fwidth; /* Field width amount */
+ H5FS_t *fspace; /* Free space manager */
+ FILE * stream; /* Stream for output */
+ int indent; /* Indention amount */
+ int fwidth; /* Field width amount */
} H5MF_debug_iter_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5MF_sects_debug_cb
*
@@ -92,7 +84,6 @@ typedef struct {
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 31 2008
*
*-------------------------------------------------------------------------
@@ -100,9 +91,9 @@ typedef struct {
static herr_t
H5MF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
{
- H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect; /* Section to dump info */
- H5MF_debug_iter_ud_t *udata = (H5MF_debug_iter_ud_t *)_udata; /* User data for callbacks */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5MF_free_section_t * sect = (H5MF_free_section_t *)_sect; /* Section to dump info */
+ H5MF_debug_iter_ud_t *udata = (H5MF_debug_iter_ud_t *)_udata; /* User data for callbacks */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -114,30 +105,25 @@ H5MF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Print generic section information */
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section type:",
- (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE ? "simple" : "unknown"));
+ "Section type:", (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE ? "simple" : "unknown"));
HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
- "Section address:",
- sect->sect_info.addr);
+ "Section address:", sect->sect_info.addr);
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
- "Section size:",
- sect->sect_info.size);
+ "Section size:", sect->sect_info.size);
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
- "End of section:",
- (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
+ "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:",
- (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
+ "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
/* Dump section-specific debugging information */
- if(H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < 0)
+ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
+ 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't dump section's debugging info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_sects_debug_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sects_dump
*
@@ -146,7 +132,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 31 2008
*
*-------------------------------------------------------------------------
@@ -154,19 +139,19 @@ done:
herr_t
H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream)
{
- haddr_t eoa; /* End of allocated space in the file */
- haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
- hsize_t ma_size = 0; /* Size of "metadata aggregator" */
- haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
- hsize_t sda_size = 0; /* Size of "small data aggregator" */
- H5FD_mem_t type; /* Memory type for iteration */
- int indent = 0; /* Amount to indent */
- int fwidth = 50; /* Field width */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa; /* End of allocated space in the file */
+ haddr_t ma_addr = HADDR_UNDEF; /* Base "metadata aggregator" address */
+ hsize_t ma_size = 0; /* Size of "metadata aggregator" */
+ haddr_t sda_addr = HADDR_UNDEF; /* Base "small data aggregator" address */
+ hsize_t sda_size = 0; /* Size of "small data aggregator" */
+ H5FD_mem_t type; /* Memory type for iteration */
+ int indent = 0; /* Amount to indent */
+ int fwidth = 50; /* Field width */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
+ HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
/*
@@ -176,45 +161,44 @@ HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
HDassert(stream);
/* Retrieve the 'eoa' for the file */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
+ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve metadata aggregator info, if available */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: ma_addr = %a, ma_size = %Hu, end of ma = %a\n", FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
+ HDfprintf(stderr, "%s: ma_addr = %a, ma_size = %Hu, end of ma = %a\n", FUNC, ma_addr, ma_size,
+ (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
+ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, sda_addr, sda_size,
+ (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
/* Print header for type */
HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)type);
/* Check for this type being mapped to another type */
- if(H5FD_MEM_DEFAULT == f->shared->fs_type_map[type] ||
- type == f->shared->fs_type_map[type]) {
+ if (H5FD_MEM_DEFAULT == f->shared->fs_type_map[type] || type == f->shared->fs_type_map[type]) {
/* Retrieve the 'eoa' for this file memory type */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, type)))
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(f->shared->lf, type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
- "eoa:",
- eoa);
+ HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa);
/* Print header for sections */
HDfprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
- if(f->shared->fs_man[type]) {
- H5MF_debug_iter_ud_t udata; /* User data for callbacks */
+ if (f->shared->fs_man[type]) {
+ H5MF_debug_iter_ud_t udata; /* User data for callbacks */
/* Prepare user data for section iteration callback */
udata.fspace = f->shared->fs_man[type];
@@ -223,22 +207,21 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC,
udata.fwidth = MAX(0, fwidth - 6);
/* Iterate over all the free space sections */
- if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0)
+ if (H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
} /* end if */
else {
/* No sections of this type */
HDfprintf(stream, "%*s<none>\n", indent + 6, "");
} /* end else */
- } /* end if */
+ } /* end if */
else {
HDfprintf(stream, "%*sMapped to type = %u\n", indent, "", (unsigned)f->shared->fs_type_map[type]);
} /* end else */
- } /* end for */
+ } /* end for */
done:
-HDfprintf(stderr, "%s: Done dumping file free space sections\n", FUNC);
+ HDfprintf(stderr, "%s: Done dumping file free space sections\n", FUNC);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */
-
diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h
index 61b8c20..71ddf6b 100644
--- a/src/H5MFpkg.h
+++ b/src/H5MFpkg.h
@@ -6,18 +6,18 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Tuesday, January 8, 2008
+ * Programmer: Quincey Koziol
+ * Tuesday, January 8, 2008
*
- * Purpose: This file contains declarations which are visible only within
- * the H5MF package. Source files outside the H5MF package should
- * include H5MFprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5MF package. Source files outside the H5MF package should
+ * include H5MFprivate.h instead.
*/
#ifndef H5MF_PACKAGE
#error "Do not include this file outside the H5MF package!"
@@ -30,8 +30,7 @@
#include "H5MFprivate.h"
/* Other private headers needed by this file */
-#include "H5FSprivate.h" /* File free space */
-
+#include "H5FSprivate.h" /* File free space */
/**************************/
/* Package Private Macros */
@@ -49,32 +48,32 @@
/* Define this to dump free space tracker contents after they've been modified */
/* #define H5MF_ALLOC_DEBUG_DUMP */
-/* Free space section types for file */
+/* Free-space section types for file */
/* (values stored in free space data structures in file) */
-#define H5MF_FSPACE_SECT_SIMPLE 0 /* Section is a range of actual bytes in file */
-
-
+/* Section is a range of actual bytes in file */
+#define H5MF_FSPACE_SECT_SIMPLE 0
/****************************/
/* Package Private Typedefs */
/****************************/
/* File free space section info */
typedef struct H5MF_free_section_t {
- H5FS_section_info_t sect_info; /* Free space section information (must be first in struct) */
+ H5FS_section_info_t sect_info; /* Free space section information (must be first in struct) */
#ifdef NOT_YET
union {
struct {
- H5HF_indirect_t *parent; /* Indirect block parent for free section's direct block */
- unsigned par_entry; /* Entry of free section's direct block in parent indirect block */
+ H5HF_indirect_t *parent; /* Indirect block parent for free section's direct block */
+ unsigned par_entry; /* Entry of free section's direct block in parent indirect block */
} single;
struct {
- struct H5HF_free_section_t *under; /* Pointer to indirect block underlying row section */
- unsigned row; /* Row for range of blocks */
- unsigned col; /* Column for range of blocks */
- unsigned num_entries; /* Number of entries covered */
+ struct H5HF_free_section_t *under; /* Pointer to indirect block underlying row section */
+ unsigned row; /* Row for range of blocks */
+ unsigned col; /* Column for range of blocks */
+ unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space manager */
+ hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space
+ manager */
} row;
struct {
/* Holds either a pointer to an indirect block (if its "live") or
@@ -84,23 +83,24 @@ typedef struct H5MF_free_section_t {
* or not)
*/
union {
- H5HF_indirect_t *iblock; /* Indirect block for free section */
- hsize_t iblock_off; /* Indirect block offset in "heap space" */
+ H5HF_indirect_t *iblock; /* Indirect block for free section */
+ hsize_t iblock_off; /* Indirect block offset in "heap space" */
} u;
- unsigned row; /* Row for range of blocks */
- unsigned col; /* Column for range of blocks */
- unsigned num_entries; /* Number of entries covered */
+ unsigned row; /* Row for range of blocks */
+ unsigned col; /* Column for range of blocks */
+ unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- struct H5HF_free_section_t *parent; /* Pointer to "parent" indirect section */
- unsigned par_entry; /* Entry within parent indirect section */
- hsize_t span_size; /* Size of space tracked, in "heap space" */
- unsigned iblock_entries; /* Number of entries in indirect block where section is located */
- unsigned rc; /* Reference count of outstanding row & child indirect sections */
- unsigned dir_nrows; /* Number of direct rows in section */
- struct H5HF_free_section_t **dir_rows; /* Array of pointers to outstanding row sections */
- unsigned indir_nents; /* Number of indirect entries in section */
- struct H5HF_free_section_t **indir_ents; /* Array of pointers to outstanding child indirect sections */
+ struct H5HF_free_section_t *parent; /* Pointer to "parent" indirect section */
+ unsigned par_entry; /* Entry within parent indirect section */
+ hsize_t span_size; /* Size of space tracked, in "heap space" */
+ unsigned iblock_entries; /* Number of entries in indirect block where section is located */
+ unsigned rc; /* Reference count of outstanding row & child indirect sections */
+ unsigned dir_nrows; /* Number of direct rows in section */
+ struct H5HF_free_section_t **dir_rows; /* Array of pointers to outstanding row sections */
+ unsigned indir_nents; /* Number of indirect entries in section */
+ struct H5HF_free_section_t *
+ *indir_ents; /* Array of pointers to outstanding child indirect sections */
} indirect;
} u;
#endif /* NOT_YET */
@@ -108,26 +108,25 @@ typedef struct H5MF_free_section_t {
/* Type of "container shrink" operation to perform */
typedef enum {
- H5MF_SHRINK_EOA, /* Section should shrink the EOA value */
- H5MF_SHRINK_AGGR_ABSORB_SECT, /* Section should merge into the aggregator block */
- H5MF_SHRINK_SECT_ABSORB_AGGR /* Aggregator block should merge into the section */
+ H5MF_SHRINK_EOA, /* Section should shrink the EOA value */
+ H5MF_SHRINK_AGGR_ABSORB_SECT, /* Section should merge into the aggregator block */
+ H5MF_SHRINK_SECT_ABSORB_AGGR /* Aggregator block should merge into the section */
} H5MF_shrink_type_t;
/* User data for free space manager section callbacks */
typedef struct H5MF_sect_ud_t {
/* Down */
- H5F_t *f; /* Pointer to file to operate on */
- hid_t dxpl_id; /* DXPL for VFD operations */
- H5FD_mem_t alloc_type; /* Type of memory being allocated */
- hbool_t allow_sect_absorb; /* Whether sections are allowed to absorb a block aggregator */
- hbool_t allow_eoa_shrink_only; /* Whether shrinking eoa is allowed only for the section */
+ H5F_t * f; /* Pointer to file to operate on */
+ hid_t dxpl_id; /* DXPL for VFD operations */
+ H5FD_mem_t alloc_type; /* Type of memory being allocated */
+ hbool_t allow_sect_absorb; /* Whether sections are allowed to absorb a block aggregator */
+ hbool_t allow_eoa_shrink_only; /* Whether shrinking eoa is allowed only for the section */
/* Up */
- H5MF_shrink_type_t shrink; /* Type of shrink operation to perform */
- H5F_blk_aggr_t *aggr; /* Aggregator block to operate on */
+ H5MF_shrink_type_t shrink; /* Type of shrink operation to perform */
+ H5F_blk_aggr_t * aggr; /* Aggregator block to operate on */
} H5MF_sect_ud_t;
-
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -135,7 +134,6 @@ typedef struct H5MF_sect_ud_t {
/* H5MF single section inherits serializable properties from H5FS_section_class_t */
H5_DLLVAR H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1];
-
/******************************/
/* Package Private Prototypes */
/******************************/
@@ -146,29 +144,24 @@ H5_DLL herr_t H5MF_alloc_start(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
H5_DLL herr_t H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream);
/* 'simple' section routines */
-H5_DLL H5MF_free_section_t *H5MF_sect_simple_new(haddr_t sect_off,
- hsize_t sect_size);
-H5_DLL htri_t H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect,
- void *udata);
-H5_DLL herr_t H5MF_sect_simple_shrink(H5FS_section_info_t **_sect,
- void *udata);
-H5_DLL herr_t H5MF_sect_simple_free(H5FS_section_info_t *sect);
+H5_DLL H5MF_free_section_t *H5MF_sect_simple_new(haddr_t sect_off, hsize_t sect_size);
+H5_DLL htri_t H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *udata);
+H5_DLL herr_t H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *udata);
+H5_DLL herr_t H5MF_sect_simple_free(H5FS_section_info_t *sect);
/* Block aggregator routines */
-H5_DLL haddr_t H5MF_aggr_alloc(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr,
- H5F_blk_aggr_t *other_aggr, H5FD_mem_t type, hsize_t size);
-H5_DLL htri_t H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr,
- H5FD_mem_t type, haddr_t abs_blk_end, hsize_t extra_requested);
-H5_DLL htri_t H5MF_aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
- const H5MF_free_section_t *sect, H5MF_shrink_type_t *shrink);
-H5_DLL herr_t H5MF_aggr_absorb(const H5F_t *f, H5F_blk_aggr_t *aggr,
- H5MF_free_section_t *sect, hbool_t allow_sect_absorb);
-H5_DLL herr_t H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr,
- haddr_t *addr, hsize_t *size);
+H5_DLL haddr_t H5MF_aggr_alloc(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr,
+ H5FD_mem_t type, hsize_t size);
+H5_DLL htri_t H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type, haddr_t abs_blk_end,
+ hsize_t extra_requested);
+H5_DLL htri_t H5MF_aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
+ const H5MF_free_section_t *sect, H5MF_shrink_type_t *shrink);
+H5_DLL herr_t H5MF_aggr_absorb(const H5F_t *f, H5F_blk_aggr_t *aggr, H5MF_free_section_t *sect,
+ hbool_t allow_sect_absorb);
+H5_DLL herr_t H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr, hsize_t *size);
/* Testing routines */
#ifdef H5MF_TESTING
#endif /* H5MF_TESTING */
#endif /* _H5MFpkg_H */
-
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index 6299cc2..50cb8d2 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,20 +15,18 @@
*
* Created: H5MFprivate.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private header file for file memory management.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5MFprivate_H
#define _H5MFprivate_H
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File Drivers */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File Drivers */
/**************************/
/* Library Private Macros */
@@ -39,38 +37,33 @@
* see diagnostics from this layer.
*/
#ifdef NDEBUG
-# undef H5MF_DEBUG
+#undef H5MF_DEBUG
#endif
/****************************/
/* Library Private Typedefs */
/****************************/
-
/*****************************/
/* Library-private Variables */
/*****************************/
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
/* File space manager routines */
H5_DLL herr_t H5MF_init_merge_flags(H5F_t *f);
-H5_DLL herr_t H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space,
- hsize_t *meta_size);
+H5_DLL herr_t H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_size);
H5_DLL herr_t H5MF_close(H5F_t *f, hid_t dxpl_id);
/* File space allocation routines */
H5_DLL haddr_t H5MF_alloc(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
H5_DLL haddr_t H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-H5_DLL herr_t H5MF_xfree(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- hsize_t size);
-H5_DLL herr_t H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
- haddr_t addr, hsize_t size, hsize_t extra_requested);
-H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id,
- haddr_t addr, hsize_t size);
+H5_DLL herr_t H5MF_xfree(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
+H5_DLL herr_t H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr, hsize_t size,
+ hsize_t extra_requested);
+H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr, hsize_t size);
/* File 'temporary' space allocation routines */
H5_DLL haddr_t H5MF_alloc_tmp(H5F_t *f, hsize_t size);
@@ -82,10 +75,8 @@ H5_DLL htri_t H5MF_aggrs_try_shrink_eoa(H5F_t *f, hid_t dxpl_id);
/* Debugging routines */
#ifdef H5MF_DEBUGGING
#ifdef NOT_YET
-H5_DLL herr_t H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
#endif /* NOT_YET */
#endif /* H5MF_DEBUGGING */
#endif /* end _H5MFprivate_H */
-
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 18d6282..6d1772d 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: Free space section callbacks for file.
@@ -23,50 +23,42 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
-
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5MF_PACKAGE /*suppress error about including H5MFpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5MFpkg.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5MFpkg.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* 'simple' section callbacks */
-static H5FS_section_info_t *H5MF_sect_simple_deserialize(const H5FS_section_class_t *cls,
- hid_t dxpl_id, const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size,
- unsigned *des_flags);
-static htri_t H5MF_sect_simple_can_merge(const H5FS_section_info_t *sect1,
- const H5FS_section_info_t *sect2, void *udata);
-static herr_t H5MF_sect_simple_merge(H5FS_section_info_t *sect1,
- H5FS_section_info_t *sect2, void *udata);
-static herr_t H5MF_sect_simple_valid(const H5FS_section_class_t *cls,
- const H5FS_section_info_t *sect);
-static H5FS_section_info_t *H5MF_sect_simple_split(H5FS_section_info_t *sect,
- hsize_t frag_size);
+static H5FS_section_info_t *H5MF_sect_simple_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
+ const uint8_t *buf, haddr_t sect_addr,
+ hsize_t sect_size, unsigned *des_flags);
+static htri_t H5MF_sect_simple_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2,
+ void *udata);
+static herr_t H5MF_sect_simple_merge(H5FS_section_info_t *sect1, H5FS_section_info_t *sect2, void *udata);
+static herr_t H5MF_sect_simple_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect);
+static H5FS_section_info_t *H5MF_sect_simple_split(H5FS_section_info_t *sect, hsize_t frag_size);
/*********************/
/* Package Variables */
@@ -75,35 +67,33 @@ static H5FS_section_info_t *H5MF_sect_simple_split(H5FS_section_info_t *sect,
/* Class info for "simple" free space sections */
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
/* Class variables */
- H5MF_FSPACE_SECT_SIMPLE, /* Section type */
- 0, /* Extra serialized size */
+ H5MF_FSPACE_SECT_SIMPLE, /* Section type */
+ 0, /* Extra serialized size */
H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */
- NULL, /* Class private info */
+ NULL, /* Class private info */
/* Class methods */
- NULL, /* Initialize section class */
- NULL, /* Terminate section class */
+ NULL, /* Initialize section class */
+ NULL, /* Terminate section class */
/* Object methods */
- NULL, /* Add section */
- NULL, /* Serialize section */
- H5MF_sect_simple_deserialize, /* Deserialize section */
- H5MF_sect_simple_can_merge, /* Can sections merge? */
- H5MF_sect_simple_merge, /* Merge sections */
- H5MF_sect_simple_can_shrink, /* Can section shrink container?*/
- H5MF_sect_simple_shrink, /* Shrink container w/section */
- H5MF_sect_simple_free, /* Free section */
- H5MF_sect_simple_valid, /* Check validity of section */
- H5MF_sect_simple_split, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ NULL, /* Add section */
+ NULL, /* Serialize section */
+ H5MF_sect_simple_deserialize, /* Deserialize section */
+ H5MF_sect_simple_can_merge, /* Can sections merge? */
+ H5MF_sect_simple_merge, /* Merge sections */
+ H5MF_sect_simple_can_shrink, /* Can section shrink container?*/
+ H5MF_sect_simple_shrink, /* Shrink container w/section */
+ H5MF_sect_simple_free, /* Free section */
+ H5MF_sect_simple_valid, /* Check validity of section */
+ H5MF_sect_simple_split, /* Split section node for alignment */
+ NULL, /* Dump debugging for section */
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -111,8 +101,6 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
/* Declare a free list to manage the H5MF_free_section_t struct */
H5FL_DEFINE(H5MF_free_section_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_new
*
@@ -121,7 +109,6 @@ H5FL_DEFINE(H5MF_free_section_t);
* Return: Pointer to new section on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 8 2008
*
*-------------------------------------------------------------------------
@@ -129,8 +116,8 @@ H5FL_DEFINE(H5MF_free_section_t);
H5MF_free_section_t *
H5MF_sect_simple_new(haddr_t sect_off, hsize_t sect_size)
{
- H5MF_free_section_t *sect = NULL; /* 'Simple' free space section to add */
- H5MF_free_section_t *ret_value; /* Return value */
+ H5MF_free_section_t *sect; /* 'Simple' free space section to add */
+ H5MF_free_section_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -138,15 +125,16 @@ H5MF_sect_simple_new(haddr_t sect_off, hsize_t sect_size)
HDassert(sect_size);
/* Create free space section node */
- if(NULL == (sect = H5FL_MALLOC(H5MF_free_section_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct block free list section")
+ if (NULL == (sect = H5FL_MALLOC(H5MF_free_section_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for direct block free list section")
/* Set the information passed in */
sect->sect_info.addr = sect_off;
sect->sect_info.size = sect_size;
/* Set the section's class & state */
- sect->sect_info.type = H5MF_FSPACE_SECT_SIMPLE;
+ sect->sect_info.type = H5MF_FSPACE_SECT_SIMPLE;
sect->sect_info.state = H5FS_SECT_LIVE;
/* Set return value */
@@ -156,7 +144,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_sect_simple_new() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_deserialize
*
@@ -171,12 +158,12 @@ done:
*-------------------------------------------------------------------------
*/
static H5FS_section_info_t *
-H5MF_sect_simple_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
- hid_t H5_ATTR_UNUSED dxpl_id, const uint8_t H5_ATTR_UNUSED *buf, haddr_t sect_addr,
- hsize_t sect_size, unsigned H5_ATTR_UNUSED *des_flags)
+H5MF_sect_simple_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls, hid_t H5_ATTR_UNUSED dxpl_id,
+ const uint8_t H5_ATTR_UNUSED *buf, haddr_t sect_addr, hsize_t sect_size,
+ unsigned H5_ATTR_UNUSED *des_flags)
{
- H5MF_free_section_t *sect; /* New section */
- H5FS_section_info_t *ret_value; /* Return value */
+ H5MF_free_section_t *sect; /* New section */
+ H5FS_section_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -185,7 +172,7 @@ H5MF_sect_simple_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
HDassert(sect_size);
/* Create free space section for block */
- if(NULL == (sect = H5MF_sect_simple_new(sect_addr, sect_size)))
+ if (NULL == (sect = H5MF_sect_simple_new(sect_addr, sect_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section")
/* Set return value */
@@ -195,7 +182,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_sect_simple_deserialize() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_can_merge
*
@@ -212,19 +198,19 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1,
- const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata)
+H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2,
+ void H5_ATTR_UNUSED *_udata)
{
- const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */
- const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
- htri_t ret_value; /* Return value */
+ const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */
+ const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect1);
HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
@@ -233,7 +219,6 @@ H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1,
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_sect_simple_can_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_merge
*
@@ -250,12 +235,11 @@ H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1,
*-------------------------------------------------------------------------
*/
static herr_t
-H5MF_sect_simple_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
- void H5_ATTR_UNUSED *_udata)
+H5MF_sect_simple_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata)
{
- H5MF_free_section_t *sect1 = (H5MF_free_section_t *)_sect1; /* File free section */
- H5MF_free_section_t *sect2 = (H5MF_free_section_t *)_sect2; /* File free section */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5MF_free_section_t *sect1 = (H5MF_free_section_t *)_sect1; /* File free section */
+ H5MF_free_section_t *sect2 = (H5MF_free_section_t *)_sect2; /* File free section */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -270,14 +254,13 @@ H5MF_sect_simple_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
sect1->sect_info.size += sect2->sect_info.size;
/* Get rid of second section */
- if(H5MF_sect_simple_free((H5FS_section_info_t *)sect2) < 0)
+ if (H5MF_sect_simple_free((H5FS_section_info_t *)sect2) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_sect_simple_merge() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_can_shrink
*
@@ -294,11 +277,11 @@ done:
htri_t
H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
{
- const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
- H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
- haddr_t eoa; /* End of address space in the file */
- haddr_t end; /* End of section to extend */
- htri_t ret_value; /* Return value */
+ const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
+ H5MF_sect_ud_t * udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
+ haddr_t eoa; /* End of address space in the file */
+ haddr_t end; /* End of section to extend */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -308,18 +291,19 @@ H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
HDassert(udata->f);
/* Retrieve the end of the file's address space */
- if(HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
+ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
/* Compute address of end of section to check */
end = sect->sect_info.addr + sect->sect_info.size;
/* Check if the section is exactly at the end of the allocated space in the file */
- if(H5F_addr_eq(end, eoa)) {
+ if (H5F_addr_eq(end, eoa)) {
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect->sect_info.addr, sect->sect_info.size, eoa);
+ HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect->sect_info.addr,
+ sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -327,47 +311,51 @@ HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect-
} /* end if */
else {
/* Shrinking can't occur if the 'eoa_shrink_only' flag is set and we're not shrinking the EOA */
- if(udata->allow_eoa_shrink_only)
+ if (udata->allow_eoa_shrink_only)
HGOTO_DONE(FALSE)
/* Check if this section is allowed to merge with metadata aggregation block */
- if(udata->f->shared->fs_aggr_merge[udata->alloc_type] & H5F_FS_MERGE_METADATA) {
- htri_t status; /* Status from aggregator adjoin */
+ if (udata->f->shared->fs_aggr_merge[udata->alloc_type] & H5F_FS_MERGE_METADATA) {
+ htri_t status; /* Status from aggregator adjoin */
/* See if section can absorb the aggregator & vice versa */
- if((status = H5MF_aggr_can_absorb(udata->f, &(udata->f->shared->meta_aggr), sect, &(udata->shrink))) < 0)
+ if ((status = H5MF_aggr_can_absorb(udata->f, &(udata->f->shared->meta_aggr), sect,
+ &(udata->shrink))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "error merging section with aggregation block")
- else if(status > 0) {
+ else if (status > 0) {
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->meta_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins metadata aggregator\n", FUNC, sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins metadata aggregator\n", FUNC,
+ sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
HGOTO_DONE(TRUE)
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if this section is allowed to merge with small 'raw' aggregation block */
- if(udata->f->shared->fs_aggr_merge[udata->alloc_type] & H5F_FS_MERGE_RAWDATA) {
- htri_t status; /* Status from aggregator adjoin */
+ if (udata->f->shared->fs_aggr_merge[udata->alloc_type] & H5F_FS_MERGE_RAWDATA) {
+ htri_t status; /* Status from aggregator adjoin */
/* See if section can absorb the aggregator & vice versa */
- if((status = H5MF_aggr_can_absorb(udata->f, &(udata->f->shared->sdata_aggr), sect, &(udata->shrink))) < 0)
+ if ((status = H5MF_aggr_can_absorb(udata->f, &(udata->f->shared->sdata_aggr), sect,
+ &(udata->shrink))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "error merging section with aggregation block")
- else if(status > 0) {
+ else if (status > 0) {
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->sdata_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", FUNC, sect->sect_info.addr, sect->sect_info.size);
+ HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", FUNC,
+ sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
HGOTO_DONE(TRUE)
} /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
/* Set return value */
ret_value = FALSE;
@@ -376,7 +364,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_sect_simple_can_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_shrink
*
@@ -393,9 +380,9 @@ done:
herr_t
H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
{
- H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* File free section */
- H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* File free section */
+ H5MF_sect_ud_t * udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -405,12 +392,13 @@ H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
HDassert(udata->f);
/* Check for shrinking file */
- if(H5MF_SHRINK_EOA == udata->shrink) {
+ if (H5MF_SHRINK_EOA == udata->shrink) {
/* Sanity check */
HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
/* Release section's space at EOA with file driver */
- if(H5FD_free(udata->f->shared->lf, udata->dxpl_id, udata->alloc_type, udata->f, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0)
+ if (H5FD_free(udata->f->shared->lf, udata->dxpl_id, udata->alloc_type, udata->f,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed")
} /* end if */
else {
@@ -418,14 +406,15 @@ H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
HDassert(udata->aggr);
/* Absorb the section into the aggregator or vice versa */
- if(H5MF_aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't absorb section into aggregator or vice versa")
+ if (H5MF_aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL,
+ "can't absorb section into aggregator or vice versa")
} /* end else */
/* Check for freeing section */
- if(udata->shrink != H5MF_SHRINK_SECT_ABSORB_AGGR) {
+ if (udata->shrink != H5MF_SHRINK_SECT_ABSORB_AGGR) {
/* Free section */
- if(H5MF_sect_simple_free((H5FS_section_info_t *)*sect) < 0)
+ if (H5MF_sect_simple_free((H5FS_section_info_t *)*sect) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
/* Mark section as freed, for free space manager */
@@ -436,7 +425,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF_sect_simple_shrink() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_free
*
@@ -453,7 +441,7 @@ done:
herr_t
H5MF_sect_simple_free(H5FS_section_info_t *_sect)
{
- H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect; /* File free section */
+ H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect; /* File free section */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -464,9 +452,8 @@ H5MF_sect_simple_free(H5FS_section_info_t *_sect)
sect = H5FL_FREE(H5MF_free_section_t, sect);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5MF_sect_simple_free() */
+} /* H5MF_sect_simple_free() */
-
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_valid
*
@@ -481,16 +468,15 @@ H5MF_sect_simple_free(H5FS_section_info_t *_sect)
*-------------------------------------------------------------------------
*/
static herr_t
-H5MF_sect_simple_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
- const H5FS_section_info_t
+H5MF_sect_simple_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_section_info_t
#ifdef NDEBUG
- H5_ATTR_UNUSED
+ H5_ATTR_UNUSED
#endif /* NDEBUG */
- *_sect)
+ *_sect)
{
#ifndef NDEBUG
- const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
-#endif /* NDEBUG */
+ const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
+#endif /* NDEBUG */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -498,8 +484,7 @@ H5MF_sect_simple_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
HDassert(sect);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5MF_sect_simple_valid() */
-
+} /* H5MF_sect_simple_valid() */
/*-------------------------------------------------------------------------
* Function: H5MF_sect_simple_split
@@ -517,12 +502,12 @@ H5MF_sect_simple_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
static H5FS_section_info_t *
H5MF_sect_simple_split(H5FS_section_info_t *sect, hsize_t frag_size)
{
- H5MF_free_section_t *ret_value; /* Return value */
+ H5MF_free_section_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for new section */
- if(NULL == (ret_value = H5MF_sect_simple_new(sect->addr, frag_size)))
+ if (NULL == (ret_value = H5MF_sect_simple_new(sect->addr, frag_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section")
/* Set new section's info */
@@ -532,4 +517,3 @@ H5MF_sect_simple_split(H5FS_section_info_t *sect, hsize_t frag_size)
done:
FUNC_LEAVE_NOAPI((H5FS_section_info_t *)ret_value)
} /* end H5MF_sect_simple_split() */
-
diff --git a/src/H5MM.c b/src/H5MM.c
index 8b2f58a..6dd34d7 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -6,30 +6,33 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5MM.c
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
- *
- * Purpose: Memory management functions.
+ * Created: H5MM.c
+ * Jul 10 1997
+ * Robb Matzke
*
- * Modifications:
+ * Purpose: Memory management functions
*
*-------------------------------------------------------------------------
*/
+/****************/
+/* Module Setup */
+/****************/
-#include "H5private.h"
-#include "H5Eprivate.h"
-#include "H5MMprivate.h"
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
-
/*-------------------------------------------------------------------------
* Function: H5MM_malloc
*
@@ -40,10 +43,9 @@
* difficult to check as a return value. This is still
* considered an error condition since allocations of zero
* bytes usually indicate problems.
- *
- * Return: Success: Pointer new memory
*
- * Failure: NULL
+ * Return: Success: Pointer to new memory
+ * Failure: NULL
*
* Programmer: Quincey Koziol
* Nov 8 2003
@@ -53,14 +55,14 @@
void *
H5MM_malloc(size_t size)
{
- void *ret_value;
+ void *ret_value = NULL;
HDassert(size);
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(size)
+ if (size)
ret_value = HDmalloc(size);
else
ret_value = NULL;
@@ -68,7 +70,6 @@ H5MM_malloc(size_t size)
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5MM_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MM_calloc
*
@@ -82,9 +83,8 @@ H5MM_malloc(size_t size)
* bytes usually indicate problems.
*
*
- * Return: Success: Pointer new memory
- *
- * Failure: NULL
+ * Return: Success: Pointer to new memory
+ * Failure: NULL
*
* Programmer: Quincey Koziol
* Nov 8 2003
@@ -94,14 +94,14 @@ H5MM_malloc(size_t size)
void *
H5MM_calloc(size_t size)
{
- void *ret_value;
+ void *ret_value = NULL;
HDassert(size);
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(size)
+ if (size)
ret_value = HDcalloc((size_t)1, size);
else
ret_value = NULL;
@@ -109,7 +109,6 @@ H5MM_calloc(size_t size)
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5MM_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MM_realloc
*
@@ -123,10 +122,9 @@ H5MM_calloc(size_t size)
* Note that the (NULL, 0) combination is undefined behavior
* in the C standard.
*
- * Return: Success: Ptr to new memory if size > 0
- * NULL if size is zero
- *
- * Failure: NULL (input buffer is unchanged on failure)
+ * Return: Success: Ptr to new memory if size > 0
+ * NULL if size is zero
+ * Failure: NULL (input buffer is unchanged on failure)
*
* Programmer: Robb Matzke
* Jul 10 1997
@@ -136,14 +134,14 @@ H5MM_calloc(size_t size)
void *
H5MM_realloc(void *mem, size_t size)
{
- void *ret_value;
+ void *ret_value = NULL;
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mem || size);
- if(NULL == mem && 0 == size) {
+ if (NULL == mem && 0 == size) {
/* Not defined in the standard, return NULL */
ret_value = NULL;
}
@@ -151,14 +149,13 @@ H5MM_realloc(void *mem, size_t size)
ret_value = HDrealloc(mem, size);
/* Some platforms do not return NULL if size is zero. */
- if(0 == size)
+ if (0 == size)
ret_value = NULL;
}
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_realloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MM_xstrdup
*
@@ -166,23 +163,21 @@ H5MM_realloc(void *mem, size_t size)
* NULL is an acceptable value for the input string.
*
* Return: Success: Pointer to a new string (NULL if s is NULL).
- *
- * Failure: abort()
+ * Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*-------------------------------------------------------------------------
*/
char *
H5MM_xstrdup(const char *s)
{
- char *ret_value = NULL;
+ char *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
- if(s) {
- if(NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
+ if (s) {
+ if (NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDstrcpy(ret_value, s);
} /* end if */
@@ -191,7 +186,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_xstrdup() */
-
/*-------------------------------------------------------------------------
* Function: H5MM_strdup
*
@@ -202,48 +196,43 @@ done:
* an error will be raised.
*
* Return: Success: Pointer to a new string
- *
- * Failure: abort()
+ * Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*-------------------------------------------------------------------------
*/
char *
H5MM_strdup(const char *s)
{
- char *ret_value;
+ char *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
- if(!s)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "null string")
- if(NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!s)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "null string")
+ if (NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDstrcpy(ret_value, s);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_strdup() */
-
/*-------------------------------------------------------------------------
- * Function: H5MM_xfree
- *
- * Purpose: Just like free(3) except null pointers are allowed as
- * arguments, and the return value (always NULL) can be
- * assigned to the pointer whose memory was just freed:
+ * Function: H5MM_xfree
*
- * thing = H5MM_xfree (thing);
+ * Purpose: Just like free(3) except null pointers are allowed as
+ * arguments, and the return value (always NULL) can be
+ * assigned to the pointer whose memory was just freed:
*
- * Return: Success: NULL
+ * thing = H5MM_xfree (thing);
*
- * Failure: never fails
+ * Return: Success: NULL
+ * Failure: never fails
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 10 1997
+ * Programmer: Robb Matzke
+ * Jul 10 1997
*
*-------------------------------------------------------------------------
*/
@@ -253,7 +242,7 @@ H5MM_xfree(void *mem)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(mem)
+ if (mem)
HDfree(mem);
FUNC_LEAVE_NOAPI(NULL);
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index 31bf0da..0416682 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,12 +15,10 @@
*
* Created: H5MMprivate.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private header for memory management.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5MMprivate_H
@@ -31,7 +29,7 @@
/* Private headers needed by this file */
#include "H5private.h"
-#define H5MM_free(Z) HDfree(Z)
+#define H5MM_free(Z) HDfree(Z)
/*
* Library prototypes...
@@ -43,4 +41,4 @@ H5_DLL char *H5MM_xstrdup(const char *s);
H5_DLL char *H5MM_strdup(const char *s);
H5_DLL void *H5MM_xfree(void *mem);
-#endif
+#endif /* _H5MMprivate_H */
diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h
index 4e54c33..9ddd377 100644
--- a/src/H5MMpublic.h
+++ b/src/H5MMpublic.h
@@ -6,22 +6,20 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5MMproto.h
+ * Created: H5MMpublic.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5MM (memory management)
* package.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5MMpublic_H
@@ -42,4 +40,3 @@ extern "C" {
}
#endif
#endif /* _H5MMpublic_H */
-
diff --git a/src/H5MP.c b/src/H5MP.c
index 251d623..8bdabf7 100644
--- a/src/H5MP.c
+++ b/src/H5MP.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5MP.c
* May 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements memory pools. (Similar to Apache's APR
* memory pools)
@@ -27,41 +27,37 @@
*-------------------------------------------------------------------------
*/
-#define H5MP_PACKAGE /*suppress error about including H5MPpkg */
+#define H5MP_PACKAGE /*suppress error about including H5MPpkg */
/* Private headers */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5MPpkg.h" /* Memory Pools */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5MPpkg.h" /* Memory Pools */
/****************/
/* Local Macros */
/****************/
/* Minimum sized block */
-#define H5MP_MIN_BLOCK (H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t)) + H5MP_BLOCK_ALIGNMENT)
+#define H5MP_MIN_BLOCK (H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t)) + H5MP_BLOCK_ALIGNMENT)
/* First block in page */
-#define H5MP_PAGE_FIRST_BLOCK(p) \
+#define H5MP_PAGE_FIRST_BLOCK(p) \
(H5MP_page_blk_t *)((unsigned char *)(p) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)))
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/********************************/
/* Package Variable Definitions */
/********************************/
-
/********************/
/* Static Variables */
/********************/
@@ -69,8 +65,6 @@
/* Declare a free list to manage the H5MP_pool_t struct */
H5FL_DEFINE(H5MP_pool_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5MP_create
*
@@ -79,7 +73,6 @@ H5FL_DEFINE(H5MP_pool_t);
* Return: Pointer to the memory pool "header" on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
@@ -87,40 +80,39 @@ H5FL_DEFINE(H5MP_pool_t);
H5MP_pool_t *
H5MP_create(size_t page_size, unsigned flags)
{
- H5MP_pool_t *mp = NULL; /* New memory pool header */
- H5MP_pool_t *ret_value; /* Return value */
+ H5MP_pool_t *mp = NULL; /* New memory pool header */
+ H5MP_pool_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Allocate space for the pool header */
- if(NULL == (mp = H5FL_MALLOC(H5MP_pool_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for memory pool header")
+ if (NULL == (mp = H5FL_MALLOC(H5MP_pool_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for memory pool header")
/* Assign information */
mp->page_size = H5MP_BLOCK_ALIGN(page_size);
- mp->flags = flags;
+ mp->flags = flags;
/* Initialize information */
mp->free_size = 0;
- mp->first = NULL;
- mp->max_size = mp->page_size - H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t));
+ mp->first = NULL;
+ mp->max_size = mp->page_size - H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t));
/* Create factory for pool pages */
- if(NULL == (mp->page_fac = H5FL_fac_init(page_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't create page factory")
+ if (NULL == (mp->page_fac = H5FL_fac_init(page_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't create page factory")
/* Set return value */
ret_value = mp;
done:
- if(NULL == ret_value && mp)
- if(H5MP_close(mp) < 0)
+ if (NULL == ret_value && mp)
+ if (H5MP_close(mp) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTFREE, NULL, "unable to free memory pool header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MP_create() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_new_page
*
@@ -129,7 +121,6 @@ done:
* Return: Pointer to the page allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 4 2005
*
*-------------------------------------------------------------------------
@@ -137,9 +128,9 @@ done:
static H5MP_page_t *
H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
{
- H5MP_page_t *new_page; /* New page created */
- H5MP_page_blk_t *first_blk; /* Pointer to first block in page */
- H5MP_page_t *ret_value; /* Return value */
+ H5MP_page_t * new_page; /* New page created */
+ H5MP_page_blk_t *first_blk; /* Pointer to first block in page */
+ H5MP_page_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -148,34 +139,31 @@ H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
HDassert(page_size >= mp->page_size);
/* Allocate page */
- if(page_size > mp->page_size) {
- if(NULL == (new_page = (H5MP_page_t *)H5MM_malloc(page_size)))
+ if (page_size > mp->page_size) {
+ if (NULL == (new_page = (H5MP_page_t *)H5MM_malloc(page_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page")
new_page->free_size = page_size - H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t));
new_page->fac_alloc = FALSE;
} /* end if */
else {
- if(NULL == (new_page = (H5MP_page_t *)H5FL_FAC_MALLOC(mp->page_fac)))
+ if (NULL == (new_page = (H5MP_page_t *)H5FL_FAC_MALLOC(mp->page_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page")
new_page->free_size = mp->max_size;
new_page->fac_alloc = TRUE;
} /* end else */
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating new page = %p\n", FUNC, new_page);
-#endif /* QAK */
/* Initialize page information */
- first_blk = H5MP_PAGE_FIRST_BLOCK(new_page);
- first_blk->size = new_page->free_size;
- first_blk->page = new_page;
+ first_blk = H5MP_PAGE_FIRST_BLOCK(new_page);
+ first_blk->size = new_page->free_size;
+ first_blk->page = new_page;
first_blk->is_free = TRUE;
- first_blk->prev = NULL;
- first_blk->next = NULL;
+ first_blk->prev = NULL;
+ first_blk->next = NULL;
/* Insert into page list */
new_page->prev = NULL;
new_page->next = mp->first;
- if(mp->first)
+ if (mp->first)
mp->first->prev = new_page;
mp->first = new_page;
@@ -190,7 +178,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MP_new_page() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_malloc
*
@@ -199,18 +186,17 @@ done:
* Return: Pointer to the space allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
*/
void *
-H5MP_malloc (H5MP_pool_t *mp, size_t request)
+H5MP_malloc(H5MP_pool_t *mp, size_t request)
{
- H5MP_page_t *alloc_page = NULL; /* Page to allocate space from */
- H5MP_page_blk_t *alloc_free; /* Pointer to free space in page */
- size_t needed; /* Size requested, plus block header and alignment */
- void *ret_value; /* Return value */
+ H5MP_page_t * alloc_page = NULL; /* Page to allocate space from */
+ H5MP_page_blk_t *alloc_free; /* Pointer to free space in page */
+ size_t needed; /* Size requested, plus block header and alignment */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -220,32 +206,28 @@ H5MP_malloc (H5MP_pool_t *mp, size_t request)
/* Compute actual size needed */
needed = H5MP_BLOCK_ALIGN(request) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: sizeof(H5MP_page_blk_t) = %Zu\n", FUNC, sizeof(H5MP_page_blk_t));
-HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
-#endif /* QAK */
/* See if the request can be handled by existing free space */
- if(needed <= mp->free_size) {
- size_t pool_free_avail; /* Amount of free space possibly available in pool */
+ if (needed <= mp->free_size) {
+ size_t pool_free_avail; /* Amount of free space possibly available in pool */
/* Locate page with enough free space */
- alloc_page = mp->first;
+ alloc_page = mp->first;
pool_free_avail = mp->free_size;
- while(alloc_page && pool_free_avail >= needed) {
+ while (alloc_page && pool_free_avail >= needed) {
/* If we found a page with enough free space, search for large
* enough free block on that page */
- if(alloc_page->free_size >= needed) {
- size_t page_free_avail; /* Amount of free space possibly available */
+ if (alloc_page->free_size >= needed) {
+ size_t page_free_avail; /* Amount of free space possibly available */
/* Locate large enough block */
- alloc_free = alloc_page->free_blk;
+ alloc_free = alloc_page->free_blk;
page_free_avail = alloc_page->free_size;
- while(alloc_free && page_free_avail >= needed) {
- if(alloc_free->is_free) {
+ while (alloc_free && page_free_avail >= needed) {
+ if (alloc_free->is_free) {
/* If we found a large enough block, leave now */
- if(alloc_free->size >= needed)
- goto found; /* Needed to escape double "while" loop */
+ if (alloc_free->size >= needed)
+ goto found; /* Needed to escape double "while" loop */
/* Decrement amount of potential space left */
page_free_avail -= alloc_free->size;
@@ -254,7 +236,7 @@ HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
/* Go to next block */
alloc_free = alloc_free->next;
} /* end while */
- } /* end if */
+ } /* end if */
/* Decrement amount of potential space left */
pool_free_avail -= alloc_page->free_size;
@@ -262,17 +244,17 @@ HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
/* Go to next page */
alloc_page = alloc_page->next;
} /* end while */
- } /* end if */
+ } /* end if */
{
- size_t page_size; /* Size of page needed */
+ size_t page_size; /* Size of page needed */
/* Check if the request is too large for a standard page */
- page_size = (needed > mp->max_size) ?
- (needed + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t))) : mp->page_size;
+ page_size =
+ (needed > mp->max_size) ? (needed + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t))) : mp->page_size;
/* Allocate new page */
- if(NULL == (alloc_page = H5MP_new_page(mp, page_size)))
+ if (NULL == (alloc_page = H5MP_new_page(mp, page_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page")
/* Set the block to allocate from */
@@ -287,24 +269,24 @@ found:
HDassert(alloc_free);
/* Check if we can subdivide the free space */
- if(alloc_free->size > (needed + H5MP_MIN_BLOCK)) {
- H5MP_page_blk_t *new_free; /* New free block created */
+ if (alloc_free->size > (needed + H5MP_MIN_BLOCK)) {
+ H5MP_page_blk_t *new_free; /* New free block created */
/* Carve out new free block after block to allocate */
new_free = (H5MP_page_blk_t *)(((unsigned char *)alloc_free) + needed);
/* Link into existing lists */
new_free->next = alloc_free->next;
- if(alloc_free->next)
+ if (alloc_free->next)
alloc_free->next->prev = new_free;
- new_free->prev = alloc_free;
+ new_free->prev = alloc_free;
alloc_free->next = new_free;
/* Set blocks' information */
- new_free->size = alloc_free->size - needed;
- new_free->is_free = TRUE;
- new_free->page = alloc_free->page;
- alloc_free->size = needed;
+ new_free->size = alloc_free->size - needed;
+ new_free->is_free = TRUE;
+ new_free->page = alloc_free->page;
+ alloc_free->size = needed;
alloc_free->is_free = FALSE;
} /* end if */
else {
@@ -314,21 +296,17 @@ found:
/* Update page & pool's free size information */
alloc_page->free_size -= alloc_free->size;
- if(alloc_page->free_blk == alloc_free)
+ if (alloc_page->free_blk == alloc_free)
alloc_page->free_blk = alloc_free->next;
mp->free_size -= alloc_free->size;
/* Set new space pointer for the return value */
ret_value = ((unsigned char *)alloc_free) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating space from page, ret_value = %p\n", FUNC, ret_value);
-#endif /* QAK */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MP_malloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_free
*
@@ -337,7 +315,6 @@ done:
* Return: NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
* Note: Should we release pages that have no used blocks?
@@ -347,9 +324,9 @@ done:
void *
H5MP_free(H5MP_pool_t *mp, void *spc)
{
- H5MP_page_blk_t *spc_blk; /* Block for space to free */
- H5MP_page_t *spc_page; /* Page containing block to free */
- void *ret_value = NULL; /* Return value */
+ H5MP_page_blk_t *spc_blk; /* Block for space to free */
+ H5MP_page_t * spc_page; /* Page containing block to free */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -366,58 +343,54 @@ H5MP_free(H5MP_pool_t *mp, void *spc)
/* Add it's space to the amount of free space in the page & pool */
spc_page = spc_blk->page;
-#ifdef QAK
-HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
-#endif /* QAK */
spc_page->free_size += spc_blk->size;
mp->free_size += spc_blk->size;
/* Move page with newly freed space to front of list of pages in pool */
- if(spc_page != mp->first) {
+ if (spc_page != mp->first) {
/* Remove page from list */
spc_page->prev->next = spc_page->next;
- if(spc_page->next)
+ if (spc_page->next)
spc_page->next->prev = spc_page->prev;
/* Insert page at beginning of list */
- spc_page->prev = NULL;
- spc_page->next = mp->first;
+ spc_page->prev = NULL;
+ spc_page->next = mp->first;
mp->first->prev = spc_page;
- mp->first = spc_page;
+ mp->first = spc_page;
} /* end if */
/* Check if block can be merged with free space after it on page */
- if(spc_blk->next != NULL) {
- H5MP_page_blk_t *next_blk; /* Block following space to free */
+ if (spc_blk->next != NULL) {
+ H5MP_page_blk_t *next_blk; /* Block following space to free */
next_blk = spc_blk->next;
HDassert(next_blk->prev == spc_blk);
- if(next_blk->is_free) {
+ if (next_blk->is_free) {
spc_blk->size += next_blk->size;
spc_blk->next = next_blk->next;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if block can be merged with free space before it on page */
- if(spc_blk->prev != NULL) {
- H5MP_page_blk_t *prev_blk; /* Block before space to free */
+ if (spc_blk->prev != NULL) {
+ H5MP_page_blk_t *prev_blk; /* Block before space to free */
prev_blk = spc_blk->prev;
HDassert(prev_blk->next == spc_blk);
- if(prev_blk->is_free) {
+ if (prev_blk->is_free) {
prev_blk->size += spc_blk->size;
prev_blk->next = spc_blk->next;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if the block freed becomes the first free block on the page */
- if(spc_page->free_blk == NULL || spc_blk < spc_page->free_blk)
+ if (spc_page->free_blk == NULL || spc_blk < spc_page->free_blk)
spc_page->free_blk = spc_blk;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MP_free() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_close
*
@@ -426,7 +399,6 @@ HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
* Return: Non-negative on success/negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
*-------------------------------------------------------------------------
@@ -434,32 +406,32 @@ HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
herr_t
H5MP_close(H5MP_pool_t *mp)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Release memory for pool pages */
- if(mp->first != NULL) {
- H5MP_page_t *page, *next_page; /* Pointer to pages in pool */
+ if (mp->first != NULL) {
+ H5MP_page_t *page, *next_page; /* Pointer to pages in pool */
/* Iterate through pages, releasing them */
page = mp->first;
- while(page) {
+ while (page) {
next_page = page->next;
/* Free the page appropriately */
- if(page->fac_alloc)
+ if (page->fac_alloc)
page = (H5MP_page_t *)H5FL_FAC_FREE(mp->page_fac, page);
else
page = (H5MP_page_t *)H5MM_xfree(page);
page = next_page;
} /* end while */
- } /* end if */
+ } /* end if */
/* Release page factory */
- if(mp->page_fac)
- if(H5FL_fac_term(mp->page_fac) < 0)
+ if (mp->page_fac)
+ if (H5FL_fac_term(mp->page_fac) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't destroy page factory")
done:
@@ -468,4 +440,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MP_close() */
-
diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h
index ff1c33c..c6c15e6 100644
--- a/src/H5MPpkg.h
+++ b/src/H5MPpkg.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, May 2, 2005
*
* Purpose: This file contains declarations which are visible only within
@@ -27,10 +27,10 @@
#define _H5MPpkg_H
/* Get package's private header */
-#include "H5MPprivate.h" /* Memory Pools */
+#include "H5MPprivate.h" /* Memory Pools */
/* Other private headers needed by this file */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
/* Package Private Macros */
@@ -40,60 +40,56 @@
/* (Ideas from Apache APR :-) */
/* Default alignment necessary */
-#define H5MP_BLOCK_ALIGNMENT 8
+#define H5MP_BLOCK_ALIGNMENT 8
/* General alignment macro */
/* (this only works for aligning to power of 2 boundary) */
-#define H5MP_ALIGN(x, a) \
- (((x) + ((size_t)(a)) - 1) & ~(((size_t)(a)) - 1))
+#define H5MP_ALIGN(x, a) (((x) + ((size_t)(a)) - 1) & ~(((size_t)(a)) - 1))
/* Default alignment */
#define H5MP_BLOCK_ALIGN(x) H5MP_ALIGN(x, H5MP_BLOCK_ALIGNMENT)
-
/****************************/
/* Package Private Typedefs */
/****************************/
/* Free block in pool */
typedef struct H5MP_page_blk_t {
- size_t size; /* Size of block (includes this H5MP_page_blk_t info) */
- unsigned is_free:1; /* Flag to indicate the block is free */
- struct H5MP_page_t *page; /* Pointer to page block is located in */
- struct H5MP_page_blk_t *prev; /* Pointer to previous block in page */
- struct H5MP_page_blk_t *next; /* Pointer to next block in page */
+ size_t size; /* Size of block (includes this H5MP_page_blk_t info) */
+ unsigned is_free : 1; /* Flag to indicate the block is free */
+ struct H5MP_page_t * page; /* Pointer to page block is located in */
+ struct H5MP_page_blk_t *prev; /* Pointer to previous block in page */
+ struct H5MP_page_blk_t *next; /* Pointer to next block in page */
} H5MP_page_blk_t;
/* Memory pool page */
typedef struct H5MP_page_t {
- size_t free_size; /* Total amount of free space in page */
- unsigned fac_alloc:1; /* Flag to indicate the page was allocated by the pool's factory */
- H5MP_page_blk_t *free_blk; /* Pointer to first free block in page */
- struct H5MP_page_t *next; /* Pointer to next page in pool */
- struct H5MP_page_t *prev; /* Pointer to previous page in pool */
+ size_t free_size; /* Total amount of free space in page */
+ unsigned fac_alloc : 1; /* Flag to indicate the page was allocated by the pool's factory */
+ H5MP_page_blk_t * free_blk; /* Pointer to first free block in page */
+ struct H5MP_page_t *next; /* Pointer to next page in pool */
+ struct H5MP_page_t *prev; /* Pointer to previous page in pool */
} H5MP_page_t;
/* Memory pool header */
struct H5MP_pool_t {
H5FL_fac_head_t *page_fac; /* Free-list factory for pages */
- size_t page_size; /* Page size for pool */
- size_t free_size; /* Total amount of free space in pool */
- size_t max_size; /* Maximum block that will fit in a standard page */
- H5MP_page_t *first; /* Pointer to first page in pool */
- unsigned flags; /* Bit flags for pool settings */
+ size_t page_size; /* Page size for pool */
+ size_t free_size; /* Total amount of free space in pool */
+ size_t max_size; /* Maximum block that will fit in a standard page */
+ H5MP_page_t * first; /* Pointer to first page in pool */
+ unsigned flags; /* Bit flags for pool settings */
};
-
/*****************************************/
/* Package Private Variable Declarations */
/*****************************************/
-
/******************************/
/* Package Private Prototypes */
/******************************/
#ifdef H5MP_TESTING
-H5_DLL herr_t H5MP_get_pool_free_size (const H5MP_pool_t *mp, size_t *free_size);
+H5_DLL herr_t H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size);
H5_DLL htri_t H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp);
H5_DLL herr_t H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page);
H5_DLL herr_t H5MP_get_page_free_size(const H5MP_page_t *mp, size_t *page);
@@ -101,4 +97,3 @@ H5_DLL herr_t H5MP_get_page_next_page(const H5MP_page_t *page, H5MP_page_t **nex
#endif /* H5MP_TESTING */
#endif /* _H5MPpkg_H */
-
diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h
index 009cb50..87d1f1b 100644
--- a/src/H5MPprivate.h
+++ b/src/H5MPprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5MPprivate.h
* May 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for memory pool routines.
*
@@ -30,16 +30,14 @@
/* Private headers needed by this file */
-
/**************************/
/* Library Private Macros */
/**************************/
/* Pool creation flags */
/* Default settings */
-#define H5MP_FLG_DEFAULT 0
-#define H5MP_PAGE_SIZE_DEFAULT 4096 /* (bytes) */
-
+#define H5MP_FLG_DEFAULT 0
+#define H5MP_PAGE_SIZE_DEFAULT 4096 /* (bytes) */
/****************************/
/* Library Private Typedefs */
@@ -48,13 +46,12 @@
/* Memory pool header (defined in H5MPpkg.c) */
typedef struct H5MP_pool_t H5MP_pool_t;
-
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-H5_DLL H5MP_pool_t *H5MP_create (size_t page_size, unsigned flags);
-H5_DLL void * H5MP_malloc (H5MP_pool_t *mp, size_t request);
-H5_DLL void * H5MP_free (H5MP_pool_t *mp, void *spc);
-H5_DLL herr_t H5MP_close (H5MP_pool_t *mp);
+H5_DLL H5MP_pool_t *H5MP_create(size_t page_size, unsigned flags);
+H5_DLL void * H5MP_malloc(H5MP_pool_t *mp, size_t request);
+H5_DLL void * H5MP_free(H5MP_pool_t *mp, void *spc);
+H5_DLL herr_t H5MP_close(H5MP_pool_t *mp);
#endif /* _H5MPprivate_H */
diff --git a/src/H5MPtest.c b/src/H5MPtest.c
index c353bb8..a0a1f0e 100644
--- a/src/H5MPtest.c
+++ b/src/H5MPtest.c
@@ -6,30 +6,29 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
* Purpose: Memory pool testing functions.
*/
-#define H5MP_PACKAGE /*suppress error about including H5MPpkg */
-#define H5MP_TESTING /*include H5MP testing funcs*/
+#define H5MP_PACKAGE /*suppress error about including H5MPpkg */
+#define H5MP_TESTING /*include H5MP testing funcs*/
/* Private headers */
-#include "H5private.h" /* Generic Functions */
-#include "H5MPpkg.h" /* Memory Pools */
-#include "H5Eprivate.h" /* Error handling */
+#include "H5private.h" /* Generic Functions */
+#include "H5MPpkg.h" /* Memory Pools */
+#include "H5Eprivate.h" /* Error handling */
/* Static Prototypes */
/* Package variables */
-
/*-------------------------------------------------------------------------
* Function: H5MP_get_pool_free_size
*
@@ -42,8 +41,6 @@
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -61,7 +58,6 @@ H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MP_get_pool_free_size() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_get_pool_first_page
*
@@ -74,8 +70,6 @@ H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -93,7 +87,6 @@ H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MP_get_pool_first_page() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_pool_is_free_size_correct
*
@@ -109,16 +102,14 @@ H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page)
* Programmer: Quincey Koziol
* Wednesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp)
{
- H5MP_page_t *page; /* Pointer to current page */
- size_t pool_free; /* Size of pages' free space */
- htri_t ret_value = TRUE; /* Return value */
+ H5MP_page_t *page; /* Pointer to current page */
+ size_t pool_free; /* Size of pages' free space */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -127,28 +118,25 @@ H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp)
/* Iterate through pages, checking the free size & accumulating the
* free space for all the pages */
- page = mp->first;
+ page = mp->first;
pool_free = 0;
- while(page != NULL) {
- H5MP_page_blk_t *blk; /* Pointer to current free block */
- size_t page_free; /* Size of blocks on free list */
+ while (page != NULL) {
+ H5MP_page_blk_t *blk; /* Pointer to current free block */
+ size_t page_free; /* Size of blocks on free list */
/* Iterate through the blocks in page, accumulating free space */
- blk = (H5MP_page_blk_t *)((unsigned char *)page + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)));
+ blk = (H5MP_page_blk_t *)((unsigned char *)page + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)));
page_free = 0;
- while(blk != NULL) {
- if(blk->is_free)
+ while (blk != NULL) {
+ if (blk->is_free)
page_free += blk->size;
blk = blk->next;
} /* end while */
/* Check that the free space from the blocks on the free list
* corresponds to space in page */
-#ifdef QAK
-HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", page_free, page->free_size);
-#endif /* QAK */
- if(page_free != page->free_size)
- HGOTO_DONE (FALSE)
+ if (page_free != page->free_size)
+ HGOTO_DONE(FALSE)
/* Increment the amount of free space in pool */
pool_free += page->free_size;
@@ -159,17 +147,13 @@ HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_f
/* Check that the free space from the pages
* corresponds to free space in pool */
-#ifdef QAK
-HDfprintf(stderr,"%s: pool_free = %Zu, mp->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", pool_free, mp->free_size);
-#endif /* QAK */
- if(pool_free != mp->free_size)
- HGOTO_DONE (FALSE)
+ if (pool_free != mp->free_size)
+ HGOTO_DONE(FALSE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MP_pool_is_free_size_correct() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_get_page_free_size
*
@@ -182,8 +166,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -201,7 +183,6 @@ H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MP_get_page_free_size() */
-
/*-------------------------------------------------------------------------
* Function: H5MP_get_page_next_page
*
@@ -214,8 +195,6 @@ H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -232,4 +211,3 @@ H5MP_get_page_next_page(const H5MP_page_t *page, H5MP_page_t **next_page)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MP_get_page_next_page() */
-
diff --git a/src/H5O.c b/src/H5O.c
index 70585a7..eab3f1c 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -6,18 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5O.c
- * Aug 5 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5O.c
*
- * Purpose: Object header routines.
+ * Purpose: Public object header routines
*
*-------------------------------------------------------------------------
*/
@@ -26,65 +24,59 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5O_init_interface
+#define H5_INTERFACE_INIT_FUNC H5O_init_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared object header messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for recursive traversal over objects from a group */
typedef struct {
- hid_t obj_id; /* The ID for the starting group */
- H5G_loc_t *start_loc; /* Location of starting group */
- hid_t lapl_id; /* LAPL for walking across links */
- hid_t dxpl_id; /* DXPL for operations */
- H5SL_t *visited; /* Skip list for tracking visited nodes */
- H5O_iterate_t op; /* Application callback */
- void *op_data; /* Application's op data */
+ hid_t obj_id; /* The ID for the starting group */
+ H5G_loc_t * start_loc; /* Location of starting group */
+ hid_t lapl_id; /* LAPL for walking across links */
+ hid_t dxpl_id; /* DXPL for operations */
+ H5SL_t * visited; /* Skip list for tracking visited nodes */
+ H5O_iterate_t op; /* Application callback */
+ void * op_data; /* Application's op data */
} H5O_iter_visit_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5O_delete_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
static herr_t H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type);
-static herr_t H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id);
+static herr_t H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
static herr_t H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr);
static const H5O_obj_class_t *H5O_obj_class_real(H5O_t *oh);
-
/*********************/
/* Package Variables */
/*********************/
@@ -96,39 +88,34 @@ static const H5O_obj_class_t *H5O_obj_class_real(H5O_t *oh);
*/
const H5O_msg_class_t *const H5O_msg_class_g[] = {
- H5O_MSG_NULL, /*0x0000 Null */
- H5O_MSG_SDSPACE, /*0x0001 Dataspace */
- H5O_MSG_LINFO, /*0x0002 Link information */
- H5O_MSG_DTYPE, /*0x0003 Datatype */
- H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
- H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
- H5O_MSG_LINK, /*0x0006 Link */
- H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
- H5O_MSG_LAYOUT, /*0x0008 Data Layout */
+ H5O_MSG_NULL, /*0x0000 Null */
+ H5O_MSG_SDSPACE, /*0x0001 Dataspace */
+ H5O_MSG_LINFO, /*0x0002 Link information */
+ H5O_MSG_DTYPE, /*0x0003 Datatype */
+ H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
+ H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
+ H5O_MSG_LINK, /*0x0006 Link */
+ H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
+ H5O_MSG_LAYOUT, /*0x0008 Data Layout */
#ifdef H5O_ENABLE_BOGUS
- H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
-#else /* H5O_ENABLE_BOGUS */
- NULL, /*0x0009 "Bogus valid" (for testing) */
-#endif /* H5O_ENABLE_BOGUS */
- H5O_MSG_GINFO, /*0x000A Group information */
- H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
- H5O_MSG_ATTR, /*0x000C Attribute */
- H5O_MSG_NAME, /*0x000D Object name */
- H5O_MSG_MTIME, /*0x000E Object modification date and time */
- H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
- H5O_MSG_CONT, /*0x0010 Object header continuation */
- H5O_MSG_STAB, /*0x0011 Symbol table */
- H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
- H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
- H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
- H5O_MSG_AINFO, /*0x0015 Attribute information */
- H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
- H5O_MSG_UNKNOWN, /*0x0017 Placeholder for unknown message */
-#ifdef H5O_ENABLE_BOGUS
- H5O_MSG_BOGUS_INVALID /*0x0018 "Bogus invalid" (for testing) */
-#else /* H5O_ENABLE_BOGUS */
- NULL /*0x0018 "Bogus invalid" (for testing) */
-#endif /* H5O_ENABLE_BOGUS */
+ H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
+#else /* H5O_ENABLE_BOGUS */
+ NULL, /*0x0009 "Bogus valid" (for testing) */
+#endif /* H5O_ENABLE_BOGUS */
+ H5O_MSG_GINFO, /*0x000A Group information */
+ H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
+ H5O_MSG_ATTR, /*0x000C Attribute */
+ H5O_MSG_NAME, /*0x000D Object name */
+ H5O_MSG_MTIME, /*0x000E Object modification date and time */
+ H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
+ H5O_MSG_CONT, /*0x0010 Object header continuation */
+ H5O_MSG_STAB, /*0x0011 Symbol table */
+ H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
+ H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
+ H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
+ H5O_MSG_AINFO, /*0x0015 Attribute information */
+ H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
+ H5O_MSG_UNKNOWN /*0x0017 Placeholder for unknown message */
};
/* Declare a free list to manage the H5O_t struct */
@@ -146,7 +133,6 @@ H5FL_BLK_DEFINE(chunk_image);
/* Declare external the free list for H5O_cont_t sequences */
H5FL_SEQ_EXTERN(H5O_cont_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -157,7 +143,6 @@ H5FL_EXTERN(time_t);
/* Declare external the free list for H5_obj_t's */
H5FL_EXTERN(H5_obj_t);
-
/*******************/
/* Local Variables */
/*******************/
@@ -169,13 +154,11 @@ H5FL_EXTERN(H5_obj_t);
* datatype message is a datatype but only some of them are datasets.
*/
static const H5O_obj_class_t *const H5O_obj_class_g[] = {
- H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */
- H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */
- H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */
+ H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */
+ H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */
+ H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */
};
-
-
/*-------------------------------------------------------------------------
* Function: H5O_init_interface
*
@@ -206,11 +189,10 @@ H5O_init_interface(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_init_interface() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oopen
+ * Function: H5Oopen
*
- * Purpose: Opens an object within an HDF5 file.
+ * Purpose: Opens an object within an HDF5 file.
*
* This function opens an object in the same way that H5Gopen2,
* H5Topen2, and H5Dopen2 do. However, H5Oopen doesn't require
@@ -221,42 +203,43 @@ H5O_init_interface(void)
* The opened object should be closed again with H5Oclose
* or H5Gclose, H5Tclose, or H5Dclose.
*
- * Return: Success: An open object identifier
- * Failure: Negative
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
*
- * Programmer: James Laird
- * July 14 2006
+ * Programmer: James Laird
+ * July 14 2006
*
*-------------------------------------------------------------------------
*/
hid_t
H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
{
- H5G_loc_t loc;
- hid_t ret_value = FAIL;
+ H5G_loc_t loc; /* Location of group */
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, name, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL")
+ if (!*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
/* Open the object */
- if((ret_value = H5O_open_name(&loc, name, lapl_id, TRUE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ if ((ret_value = H5O_open_name(&loc, name, lapl_id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oopen() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oopen_by_idx
+ * Function: H5Oopen_by_idx
*
- * Purpose: Opens an object within an HDF5 file, according to the offset
+ * Purpose: Opens an object within an HDF5 file, according to the offset
* within an index.
*
* This function opens an object in the same way that H5Gopen,
@@ -268,42 +251,41 @@ done:
* The opened object should be closed again with H5Oclose
* or H5Gclose, H5Tclose, or H5Dclose.
*
- * Return: Success: An open object identifier
- * Failure: Negative
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Quincey Koziol
- * November 20 2006
+ * Programmer: Quincey Koziol
+ * November 20 2006
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t lapl_id)
+H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t lapl_id)
{
- H5G_loc_t loc;
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
- hid_t ret_value = FAIL;
-
- FUNC_ENTER_API(FAIL)
+ H5G_loc_t loc; /* Location of group */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ hid_t ret_value = H5I_INVALID_HID;
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE6("i", "i*sIiIohi", loc_id, group_name, idx_type, order, n, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
+ if (!group_name || !*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name specified")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -311,28 +293,28 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
+ if (H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc /*out*/, lapl_id,
+ H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5I_INVALID_HID, "group not found")
loc_found = TRUE;
/* Open the object */
- if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ if ((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
done:
/* Release the object location if we failed after copying it */
- if(ret_value < 0 && loc_found)
- if(H5G_loc_free(&obj_loc) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
+ if (ret_value < 0 && loc_found)
+ if (H5G_loc_free(&obj_loc) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5I_INVALID_HID, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* end H5Oopen_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oopen_by_addr
+ * Function: H5Oopen_by_addr
*
- * Purpose: Warning! This function is EXTREMELY DANGEROUS!
+ * Purpose: Warning! This function is EXTREMELY DANGEROUS!
* Improper use can lead to FILE CORRUPTION, INACCESSIBLE DATA,
* and other VERY BAD THINGS!
*
@@ -356,32 +338,32 @@ done:
* HDF5 file, and HDF5's file drivers will transparently
* map this to an address on disk for the filesystem.
*
- * Return: Success: An open object identifier
- * Failure: Negative
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
*
- * Programmer: James Laird
- * July 14 2006
+ * Programmer: James Laird
+ * July 14 2006
*
*-------------------------------------------------------------------------
*/
hid_t
H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
{
- H5G_loc_t loc;
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hid_t lapl_id = H5P_LINK_ACCESS_DEFAULT; /* lapl to use to open this object */
- hid_t ret_value = FAIL;
-
- FUNC_ENTER_API(FAIL)
+ H5G_loc_t loc; /* Location within file */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hid_t lapl_id = H5P_LINK_ACCESS_DEFAULT; /* lapl to use to open this object */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "ia", loc_id, addr);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!H5F_addr_defined(addr))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no address supplied")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if (!H5F_addr_defined(addr))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no address supplied")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -389,80 +371,77 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
H5G_loc_reset(&obj_loc);
obj_loc.oloc->addr = addr;
obj_loc.oloc->file = loc.oloc->file;
- H5G_name_reset(obj_loc.path); /* objects opened through this routine don't have a path name */
+ H5G_name_reset(obj_loc.path); /* objects opened through this routine don't have a path name */
/* Open the object */
- if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ if ((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
done:
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oopen_by_addr() */
-
/*-------------------------------------------------------------------------
- * Function: H5Olink
+ * Function: H5Olink
*
- * Purpose: Creates a hard link from NEW_NAME to the object specified
- * by OBJ_ID using properties defined in the Link Creation
+ * Purpose: Creates a hard link from NEW_NAME to the object specified
+ * by OBJ_ID using properties defined in the Link Creation
* Property List LCPL.
*
- * This function should be used to link objects that have just
+ * This function should be used to link objects that have just
* been created.
*
- * NEW_NAME is interpreted relative to
- * NEW_LOC_ID, which is either a file ID or a
- * group ID.
+ * NEW_NAME is interpreted relative to
+ * NEW_LOC_ID, which is either a file ID or a
+ * group ID.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: James Laird
+ * Programmer: James Laird
* Tuesday, December 13, 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
- hid_t lapl_id)
+H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id)
{
- H5G_loc_t new_loc;
- H5G_loc_t obj_loc;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t new_loc; /* Location of group to link from */
+ H5G_loc_t obj_loc; /* Location of object to link to */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "ii*sii", obj_id, new_loc_id, new_name, lcpl_id, lapl_id);
/* Check arguments */
- if(H5G_loc(obj_id, &obj_loc) < 0)
+ if (H5G_loc(obj_id, &obj_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(new_loc_id == H5L_SAME_LOC)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "cannot use H5L_SAME_LOC when only one location is specified")
- if(H5G_loc(new_loc_id, &new_loc) < 0)
+ if (new_loc_id == H5L_SAME_LOC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
+ "cannot use H5L_SAME_LOC when only one location is specified")
+ if (H5G_loc(new_loc_id, &new_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!new_name || !*new_name)
+ if (!new_name || !*new_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Avoid compiler warning on 32-bit machines */
#if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T
- if(HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN)
+ if (HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long")
#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */
- if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
/* Link to the object */
- if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if (H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Olink() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oincr_refcount
+ * Function: H5Oincr_refcount
*
- * Purpose: Warning! This function is EXTREMELY DANGEROUS!
+ * Purpose: Warning! This function is EXTREMELY DANGEROUS!
* Improper use can lead to FILE CORRUPTION, INACCESSIBLE DATA,
* and other VERY BAD THINGS!
*
@@ -471,39 +450,38 @@ done:
* that references an object by address is created. When the
* link is deleted, H5Odecr_refcount should be used.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: James Laird
- * July 14 2006
+ * Programmer: James Laird
+ * July 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5Oincr_refcount(hid_t object_id)
{
- H5O_loc_t *oloc;
- herr_t ret_value = SUCCEED;
+ H5O_loc_t *oloc; /* Object location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
- /* Get the object's oloc so we can adjust its link count */
- if((oloc = H5O_get_loc(object_id)) == NULL)
- HGOTO_ERROR(H5E_ATOM, H5E_BADVALUE, FAIL, "unable to get object location from ID")
+ /* Get the location object */
+ if ((oloc = H5O_get_loc(object_id)) == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- if(H5O_link(oloc, 1, H5AC_dxpl_id) < 0)
+ if (H5O_link(oloc, 1, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5O_incr_refcount() */
-
/*-------------------------------------------------------------------------
- * Function: H5Odecr_refcount
+ * Function: H5Odecr_refcount
*
- * Purpose: Warning! This function is EXTREMELY DANGEROUS!
+ * Purpose: Warning! This function is EXTREMELY DANGEROUS!
* Improper use can lead to FILE CORRUPTION, INACCESSIBLE DATA,
* and other VERY BAD THINGS!
*
@@ -512,121 +490,117 @@ done:
* that reference an object by address are deleted, and only
* after H5Oincr_refcount has already been used.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: James Laird
- * July 14 2006
+ * Programmer: James Laird
+ * July 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5Odecr_refcount(hid_t object_id)
{
- H5O_loc_t *oloc;
- herr_t ret_value = SUCCEED;
+ H5O_loc_t *oloc; /* Object location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
- /* Get the object's oloc so we can adjust its link count */
- if((oloc = H5O_get_loc(object_id)) == NULL)
- HGOTO_ERROR(H5E_ATOM, H5E_BADVALUE, FAIL, "unable to get object location from ID")
+ /* Get the location object */
+ if ((oloc = H5O_get_loc(object_id)) == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- if(H5O_link(oloc, -1, H5AC_dxpl_id) < 0)
+ if (H5O_link(oloc, -1, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Odecr_refcount() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oexists_by_name
+ * Function: H5Oexists_by_name
*
- * Purpose: Determine if a linked-to object exists
+ * Purpose: Determine if a linked-to object exists
*
- * Return: Success: TRUE/FALSE
- * Failure: Negative
+ * Return: Success: TRUE/FALSE
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * February 2 2010
+ * Programmer: Quincey Koziol
+ * February 2 2010
*
*-------------------------------------------------------------------------
*/
htri_t
H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location info */
- hid_t ret_value = FAIL; /* Return value */
+ H5G_loc_t loc; /* Location info */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Check if the object exists */
- if((ret_value = H5G_loc_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if ((ret_value = H5G_loc_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oexists_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oget_info
+ * Function: H5Oget_info
*
- * Purpose: Retrieve information about an object.
+ * Purpose: Retrieve information about an object.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * November 21 2006
+ * Programmer: Quincey Koziol
+ * November 21 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5Oget_info(hid_t loc_id, H5O_info_t *oinfo)
{
- H5G_loc_t loc; /* Location of group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", loc_id, oinfo);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!oinfo)
+ if (!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
/* Retrieve the object's information */
- if(H5G_loc_info(&loc, ".", TRUE, oinfo/*out*/, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_info(&loc, ".", TRUE, oinfo /*out*/, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oget_info_by_name
+ * Function: H5Oget_info_by_name
*
- * Purpose: Retrieve information about an object.
+ * Purpose: Retrieve information about an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* November 21 2006
@@ -636,79 +610,75 @@ done:
herr_t
H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*xi", loc_id, name, oinfo, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(!oinfo)
+ if (!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Retrieve the object's information */
- if(H5G_loc_info(&loc, name, TRUE, oinfo/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_info(&loc, name, TRUE, oinfo /*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oget_info_by_idx
+ * Function: H5Oget_info_by_idx
*
- * Purpose: Retrieve information about an object, according to the order
+ * Purpose: Retrieve information about an object, according to the order
* of an index.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * November 26 2006
+ * Programmer: Quincey Koziol
+ * November 26 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id)
+H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, H5O_info_t *oinfo, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, oinfo,
- lapl_id);
+ H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, oinfo, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!oinfo)
+ if (!group_name || !*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -716,197 +686,191 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc /*out*/, lapl_id,
+ H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the object's information */
- if(H5O_get_info(obj_loc.oloc, H5AC_ind_dxpl_id, TRUE, oinfo) < 0)
+ if (H5O_get_info(obj_loc.oloc, H5AC_ind_dxpl_id, TRUE, oinfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve object info")
done:
/* Release the object location */
- if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info_by_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oset_comment
+ * Function: H5Oset_comment
*
* Purpose: Gives the specified object a comment. The COMMENT string
- * should be a null terminated string. An object can have only
- * one comment at a time. Passing NULL for the COMMENT argument
- * will remove the comment property from the object.
+ * should be a null terminated string. An object can have only
+ * one comment at a time. Passing NULL for the COMMENT argument
+ * will remove the comment property from the object.
*
- * Note: Deprecated in favor of using attributes on objects
+ * Note: Deprecated in favor of using attributes on objects
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * August 30 2007
+ * Programmer: Quincey Koziol
+ * August 30 2007
*
*-------------------------------------------------------------------------
*/
herr_t
H5Oset_comment(hid_t obj_id, const char *comment)
{
- H5G_loc_t loc; /* Location of group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", obj_id, comment);
- /* Check args */
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ /* Get the location object */
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* (Re)set the object's comment */
- if(H5G_loc_set_comment(&loc, ".", comment, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_set_comment(&loc, ".", comment, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oset_comment() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oset_comment_by_name
+ * Function: H5Oset_comment_by_name
*
* Purpose: Gives the specified object a comment. The COMMENT string
- * should be a null terminated string. An object can have only
- * one comment at a time. Passing NULL for the COMMENT argument
- * will remove the comment property from the object.
+ * should be a null terminated string. An object can have only
+ * one comment at a time. Passing NULL for the COMMENT argument
+ * will remove the comment property from the object.
*
- * Note: Deprecated in favor of using attributes on objects
+ * Note: Deprecated in favor of using attributes on objects
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * August 30 2007
+ * Programmer: Quincey Koziol
+ * August 30 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
- hid_t lapl_id)
+H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*si", loc_id, name, comment, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* (Re)set the object's comment */
- if(H5G_loc_set_comment(&loc, name, comment, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_set_comment(&loc, name, comment, lapl_id, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oset_comment_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oget_comment
+ * Function: H5Oget_comment
*
- * Purpose: Retrieve comment for an object.
+ * Purpose: Retrieve comment for an object.
*
- * Return: Success: Number of bytes in the comment excluding the
- * null terminator. Zero if the object has no
- * comment.
+ * Return: Success: Number of bytes in the comment excluding the
+ * null terminator. Zero if the object has no
+ * comment.
*
- * Failure: Negative
+ * Failure: -1
*
- * Programmer: Quincey Koziol
- * August 30 2007
+ * Programmer: Quincey Koziol
+ * August 30 2007
*
*-------------------------------------------------------------------------
*/
ssize_t
H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
{
- H5G_loc_t loc; /* Location of group */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "i*sz", obj_id, comment, bufsize);
/* Check args */
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a location")
/* Retrieve the object's comment */
- if((ret_value = H5G_loc_get_comment(&loc, ".", comment/*out*/, bufsize, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
+ if ((ret_value = H5G_loc_get_comment(&loc, ".", comment /*out*/, bufsize, H5P_LINK_ACCESS_DEFAULT,
+ H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, (-1), "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_comment() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oget_comment_by_name
+ * Function: H5Oget_comment_by_name
*
- * Purpose: Retrieve comment for an object.
+ * Purpose: Retrieve comment for an object.
*
- * Return: Success: Number of bytes in the comment excluding the
- * null terminator. Zero if the object has no
- * comment.
+ * Return: Success: Number of bytes in the comment excluding the
+ * null terminator. Zero if the object has no
+ * comment.
*
- * Failure: Negative
+ * Failure: -1
*
- * Programmer: Quincey Koziol
- * August 30 2007
+ * Programmer: Quincey Koziol
+ * August 30 2007
*
*-------------------------------------------------------------------------
*/
ssize_t
-H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize,
- hid_t lapl_id)
+H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id)
{
- H5G_loc_t loc; /* Location of group */
- ssize_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Location of group */
+ ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE5("Zs", "i*s*szi", loc_id, name, comment, bufsize, lapl_id);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a location")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name")
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not link access property list ID")
/* Retrieve the object's comment */
- if((ret_value = H5G_loc_get_comment(&loc, name, comment/*out*/, bufsize, lapl_id, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
+ if ((ret_value = H5G_loc_get_comment(&loc, name, comment /*out*/, bufsize, lapl_id, H5AC_ind_dxpl_id)) <
+ 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, (-1), "object not found")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_comment_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ovisit
+ * Function: H5Ovisit
*
- * Purpose: Recursively visit an object and all the objects reachable
+ * Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
* linked to from that group will be visited. Links within
* each group are visited according to the order within the
@@ -922,49 +886,48 @@ done:
* iteration index and iteration order given) will be used to in
* the callback about the object.
*
- * Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
*
- * Programmer: Quincey Koziol
- * November 25 2007
+ * Programmer: Quincey Koziol
+ * November 25 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
- H5O_iterate_t op, void *op_data)
+H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIiIox*x", obj_id, idx_type, order, op, op_data);
/* Check args */
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
/* Call internal object visitation routine */
- if((ret_value = H5O_visit(obj_id, ".", idx_type, order, op, op_data, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "object visitation failed")
+ if ((ret_value = H5O_visit(obj_id, ".", idx_type, order, op, op_data, H5P_LINK_ACCESS_DEFAULT,
+ H5AC_ind_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "object visitation failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ovisit() */
-
/*-------------------------------------------------------------------------
- * Function: H5Ovisit_by_name
+ * Function: H5Ovisit_by_name
*
- * Purpose: Recursively visit an object and all the objects reachable
+ * Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
* linked to from that group will be visited. Links within
* each group are visited according to the order within the
@@ -980,87 +943,85 @@ done:
* iteration index and iteration order given) will be used to in
* the callback about the object.
*
- * Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
*
- * Programmer: Quincey Koziol
- * November 24 2007
+ * Programmer: Quincey Koziol
+ * November 24 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id)
+H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data, hid_t lapl_id)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIox*xi", loc_id, obj_name, idx_type, order, op, op_data,
- lapl_id);
+ H5TRACE7("e", "i*sIiIox*xi", loc_id, obj_name, idx_type, order, op, op_data, lapl_id);
/* Check args */
- if(!obj_name || !*obj_name)
+ if (!obj_name || !*obj_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
- if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(!op)
+ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if (!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
- if(H5P_DEFAULT == lapl_id)
+ if (H5P_DEFAULT == lapl_id)
lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ else if (TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
/* Call internal object visitation routine */
- if((ret_value = H5O_visit(loc_id, obj_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "object visitation failed")
+ if ((ret_value = H5O_visit(loc_id, obj_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) <
+ 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "object visitation failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ovisit_by_name() */
-
/*-------------------------------------------------------------------------
- * Function: H5Oclose
+ * Function: H5Oclose
*
- * Purpose: Close an open file object.
+ * Purpose: Close an open file object.
*
* This is the companion to H5Oopen. It is used to close any
* open object in an HDF5 file (but not IDs are that not file
* objects, such as property lists and dataspaces). It has
* the same effect as calling H5Gclose, H5Dclose, or H5Tclose.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: James Laird
- * July 14 2006
+ * Programmer: James Laird
+ * July 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5Oclose(hid_t object_id)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Get the type of the object and close it in the correct way */
- switch(H5I_get_type(object_id)) {
+ switch (H5I_get_type(object_id)) {
case H5I_GROUP:
case H5I_DATATYPE:
case H5I_DATASET:
- if(H5I_object(object_id) == NULL)
+ if (H5I_object(object_id) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
- if(H5I_dec_app_ref(object_id) < 0)
+ if (H5I_dec_app_ref(object_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
break;
@@ -1078,15 +1039,15 @@ H5Oclose(hid_t object_id)
case H5I_ERROR_STACK:
case H5I_NTYPES:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_CANTRELEASE, FAIL, "not a valid file object ID (dataset, group, or datatype)")
- break;
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTRELEASE, FAIL,
+ "not a valid file object ID (dataset, group, or datatype)")
+ break;
} /* end switch */
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oclose() */
-
/*-------------------------------------------------------------------------
* Function: H5O_create
*
@@ -1102,23 +1063,22 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
- hid_t ocpl_id, H5O_loc_t *loc/*out*/)
+H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc, hid_t ocpl_id,
+ H5O_loc_t *loc /*out*/)
{
- H5P_genplist_t *oc_plist; /* Object creation property list */
- H5O_t *oh = NULL; /* Object header created */
- haddr_t oh_addr; /* Address of initial object header */
- size_t oh_size; /* Size of initial object header */
- uint8_t oh_flags; /* Object header's initial status flags */
- unsigned insert_flags = H5AC__NO_FLAGS_SET; /* Flags for inserting object header into cache */
- hbool_t store_msg_crt_idx; /* Whether to always store message creation indices for this file */
- herr_t ret_value = SUCCEED; /* return value */
+ H5P_genplist_t *oc_plist; /* Object creation property list */
+ H5O_t * oh = NULL; /* Object header created */
+ haddr_t oh_addr; /* Address of initial object header */
+ size_t oh_size; /* Size of initial object header */
+ uint8_t oh_flags; /* Object header's initial status flags */
+ unsigned insert_flags = H5AC__NO_FLAGS_SET; /* Flags for inserting object header into cache */
+ hbool_t store_msg_crt_idx; /* Whether to always store message creation indices for this file */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1128,27 +1088,27 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Check for invalid access request */
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "no write intent on file")
/* Make certain we allocate at least a reasonable size for the object header */
size_hint = H5O_ALIGN_F(f, MAX(H5O_MIN_SIZE, size_hint));
/* Get the property list */
- if(NULL == (oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id)))
+ if (NULL == (oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list")
/* Get any object header status flags set by properties */
- if(H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0)
+ if (H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags")
/* Allocate the object header and zero out header fields */
- if(NULL == (oh = H5FL_CALLOC(H5O_t)))
+ if (NULL == (oh = H5FL_CALLOC(H5O_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize file-specific information for object header */
store_msg_crt_idx = H5F_STORE_MSG_CRT_IDX(f);
- if(H5F_USE_LATEST_FORMAT(f) || store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
+ if (H5F_USE_LATEST_FORMAT(f) || store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
oh->version = H5O_VERSION_LATEST;
else
oh->version = H5O_VERSION_1;
@@ -1156,20 +1116,20 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
oh->sizeof_addr = H5F_SIZEOF_ADDR(f);
#ifdef H5O_ENABLE_BAD_MESG_COUNT
/* Check whether the "bad message count" property is set */
- if(H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME) > 0) {
+ if (H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME) > 0) {
/* Retrieve bad message count flag */
- if(H5P_get(oc_plist, H5O_BAD_MESG_COUNT_NAME, &oh->store_bad_mesg_count) < 0)
+ if (H5P_get(oc_plist, H5O_BAD_MESG_COUNT_NAME, &oh->store_bad_mesg_count) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag")
- } /* end if */
+ } /* end if */
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
/* Set initial status flags */
oh->flags = oh_flags;
/* Initialize version-specific fields */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Initialize all time fields with current time, if we are storing them */
- if(oh->flags & H5O_HDR_STORE_TIMES)
+ if (oh->flags & H5O_HDR_STORE_TIMES)
oh->atime = oh->mtime = oh->ctime = oh->btime = H5_now();
else
oh->atime = oh->mtime = oh->ctime = oh->btime = 0;
@@ -1177,29 +1137,29 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
/* Make certain attribute creation order tracking is enabled if
* attributes can be shared in this file.
*/
- if(store_msg_crt_idx)
+ if (store_msg_crt_idx)
oh->flags |= H5O_HDR_ATTR_CRT_ORDER_TRACKED;
/* Retrieve attribute storage phase change values from property list */
- if(H5P_get(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0)
+ if (H5P_get(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes")
- if(H5P_get(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0)
+ if (H5P_get(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes")
/* Check for non-default attribute storage phase change values */
- if(oh->max_compact != H5O_CRT_ATTR_MAX_COMPACT_DEF || oh->min_dense != H5O_CRT_ATTR_MIN_DENSE_DEF)
+ if (oh->max_compact != H5O_CRT_ATTR_MAX_COMPACT_DEF || oh->min_dense != H5O_CRT_ATTR_MIN_DENSE_DEF)
oh->flags |= H5O_HDR_ATTR_STORE_PHASE_CHANGE;
- /* Determine correct value for chunk #0 size bits */
+ /* Determine correct value for chunk #0 size bits */
/* Avoid compiler warning on 32-bit machines */
#if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T
- if(size_hint > 4294967295UL)
+ if (size_hint > 4294967295UL)
oh->flags |= H5O_HDR_CHUNK0_8;
else
#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */
- if(size_hint > 65535)
+ if (size_hint > 65535)
oh->flags |= H5O_HDR_CHUNK0_4;
- else if(size_hint > 255)
+ else if (size_hint > 255)
oh->flags |= H5O_HDR_CHUNK0_2;
} /* end if */
else {
@@ -1212,51 +1172,52 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
oh_size = (size_t)H5O_SIZEOF_HDR(oh) + size_hint;
/* Allocate disk space for header and first chunk */
- if(HADDR_UNDEF == (oh_addr = H5MF_alloc(f, H5FD_MEM_OHDR, dxpl_id, (hsize_t)oh_size)))
+ if (HADDR_UNDEF == (oh_addr = H5MF_alloc(f, H5FD_MEM_OHDR, dxpl_id, (hsize_t)oh_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header")
/* Create the chunk list */
oh->nchunks = oh->alloc_nchunks = 1;
- if(NULL == (oh->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)oh->alloc_nchunks)))
+ if (NULL == (oh->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)oh->alloc_nchunks)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the first chunk */
oh->chunk[0].addr = oh_addr;
oh->chunk[0].size = oh_size;
- oh->chunk[0].gap = 0;
+ oh->chunk[0].gap = 0;
/* Allocate enough space for the first chunk */
/* (including space for serializing the object header prefix */
- if(NULL == (oh->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, oh_size)))
+ if (NULL == (oh->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, oh_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Put magic # for object header in first chunk */
- if(oh->version > H5O_VERSION_1)
+ if (oh->version > H5O_VERSION_1)
HDmemcpy(oh->chunk[0].image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
/* Create the message list */
- oh->nmesgs = 1;
+ oh->nmesgs = 1;
oh->alloc_nmesgs = H5O_NMESGS;
- if(NULL == (oh->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh->alloc_nmesgs)))
+ if (NULL == (oh->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh->alloc_nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the initial "null" message, covering the entire first chunk */
- oh->mesg[0].type = H5O_MSG_NULL;
- oh->mesg[0].dirty = TRUE;
+ oh->mesg[0].type = H5O_MSG_NULL;
+ oh->mesg[0].dirty = TRUE;
oh->mesg[0].native = NULL;
- oh->mesg[0].raw = oh->chunk[0].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)) + H5O_SIZEOF_MSGHDR_OH(oh);
+ oh->mesg[0].raw =
+ oh->chunk[0].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)) + H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[0].raw_size = size_hint - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
- oh->mesg[0].chunkno = 0;
+ oh->mesg[0].chunkno = 0;
/* Check for non-zero initial refcount on the object header */
- if(initial_rc > 0) {
+ if (initial_rc > 0) {
/* Set the initial refcount & pin the header when its inserted */
oh->rc = initial_rc;
insert_flags |= H5AC__PIN_ENTRY_FLAG;
} /* end if */
/* Cache object header */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, insert_flags) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, insert_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
oh = NULL;
@@ -1265,18 +1226,17 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
loc->addr = oh_addr;
/* Open it */
- if(H5O_open(loc) < 0)
+ if (H5O_open(loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header")
done:
- if(ret_value < 0 && oh)
- if(H5O_free(oh) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
+ if (ret_value < 0 && oh)
+ if (H5O_free(oh) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O_open
*
@@ -1298,7 +1258,7 @@ done:
herr_t
H5O_open(H5O_loc_t *loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1307,13 +1267,13 @@ H5O_open(H5O_loc_t *loc)
HDassert(loc->file);
#ifdef H5O_DEBUG
- if(H5DEBUG(O))
- HDfprintf(H5DEBUG(O), "> %a\n", loc->addr);
+ if (H5DEBUG(O))
+ HDfprintf(H5DEBUG(O), "> %a\n", loc->addr);
#endif
/* Turn off the variable for holding file or increment open-lock counters */
- if(loc->holding_file)
- loc->holding_file = FALSE;
+ if (loc->holding_file)
+ loc->holding_file = FALSE;
else
H5F_INCR_NOPEN_OBJS(loc->file);
@@ -1321,7 +1281,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_open() */
-
/*-------------------------------------------------------------------------
* Function: H5O_open_name
*
@@ -1338,12 +1297,12 @@ done:
hid_t
H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
{
- H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
- hid_t ret_value = FAIL;
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI(FAIL)
@@ -1357,23 +1316,22 @@ H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(loc, name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(loc, name, &obj_loc /*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Open the object */
- if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, app_ref)) < 0)
+ if ((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, app_ref)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
done:
- if(ret_value < 0 && loc_found)
- if(H5G_loc_free(&obj_loc) < 0)
+ if (ret_value < 0 && loc_found)
+ if (H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_open_name() */
-
/*-------------------------------------------------------------------------
* Function: H5O_open_by_loc
*
@@ -1390,27 +1348,26 @@ done:
hid_t
H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
{
- const H5O_obj_class_t *obj_class; /* Class of object for location */
- hid_t ret_value; /* Return value */
+ const H5O_obj_class_t *obj_class; /* Class of object for location */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(obj_loc);
/* Get the object class for this location */
- if(NULL == (obj_class = H5O_obj_class(obj_loc->oloc, dxpl_id)))
+ if (NULL == (obj_class = H5O_obj_class(obj_loc->oloc, dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class")
/* Call the object class's 'open' routine */
HDassert(obj_class->open);
- if((ret_value = obj_class->open(obj_loc, lapl_id, dxpl_id, app_ref)) < 0)
+ if ((ret_value = obj_class->open(obj_loc, lapl_id, dxpl_id, app_ref)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_open_by_loc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_close
*
@@ -1426,7 +1383,7 @@ done:
herr_t
H5O_close(H5O_loc_t *loc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1439,13 +1396,12 @@ H5O_close(H5O_loc_t *loc)
H5F_DECR_NOPEN_OBJS(loc->file);
#ifdef H5O_DEBUG
- if(H5DEBUG(O)) {
- if(H5F_FILE_ID(loc->file)< 0 && 1 == H5F_NREFS(loc->file))
- HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n",
- loc->addr,
- (unsigned long)H5F_NOPEN_OBJS(loc->file));
- else
- HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
+ if (H5DEBUG(O)) {
+ if (H5F_FILE_ID(loc->file) < 0 && 1 == H5F_NREFS(loc->file))
+ HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n", loc->addr,
+ (unsigned long)H5F_NOPEN_OBJS(loc->file));
+ else
+ HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
} /* end if */
#endif
@@ -1453,20 +1409,19 @@ H5O_close(H5O_loc_t *loc)
* If the file open object count has reached the number of open mount points
* (each of which has a group open in the file) attempt to close the file.
*/
- if(H5F_NOPEN_OBJS(loc->file) == H5F_NMOUNTS(loc->file))
+ if (H5F_NOPEN_OBJS(loc->file) == H5F_NMOUNTS(loc->file))
/* Attempt to close down the file hierarchy */
- if(H5F_try_close(loc->file) < 0)
+ if (H5F_try_close(loc->file) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
/* Release location information */
- if(H5O_loc_free(loc) < 0)
+ if (H5O_loc_free(loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_close() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_oh
*
@@ -1478,7 +1433,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
@@ -1486,8 +1440,8 @@ done:
int
H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
{
- haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */
- int ret_value; /* Return value */
+ haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1497,59 +1451,59 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
HDassert(deleted);
/* Check for adjusting link count */
- if(adjust) {
- if(adjust < 0) {
+ if (adjust) {
+ if (adjust < 0) {
/* Check for too large of an adjustment */
- if((unsigned)(-adjust) > oh->nlink)
+ if ((unsigned)(-adjust) > oh->nlink)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "link count would be negative")
/* Adjust the link count for the object header */
oh->nlink = (unsigned)((int)oh->nlink + adjust);
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
/* Check if the object should be deleted */
- if(oh->nlink == 0) {
+ if (oh->nlink == 0) {
/* Check if the object is still open by the user */
- if(H5FO_opened(f, addr) != NULL) {
+ if (H5FO_opened(f, addr) != NULL) {
/* Flag the object to be deleted when it's closed */
- if(H5FO_mark(f, addr, TRUE) < 0)
+ if (H5FO_mark(f, addr, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't mark object for deletion")
} /* end if */
else {
/* Mark the object header for deletion */
*deleted = TRUE;
} /* end else */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
else {
/* A new object, or one that will be deleted */
- if(0 == oh->nlink) {
+ if (0 == oh->nlink) {
/* Check if the object is currently open, but marked for deletion */
- if(H5FO_marked(f, addr)) {
+ if (H5FO_marked(f, addr)) {
/* Remove "delete me" flag on the object */
- if(H5FO_mark(f, addr, FALSE) < 0)
+ if (H5FO_mark(f, addr, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't mark object for deletion")
} /* end if */
- } /* end if */
+ } /* end if */
/* Adjust the link count for the object header */
oh->nlink = (unsigned)((int)oh->nlink + adjust);
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
/* Check for operations on refcount message */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check if the object has a refcount message already */
- if(oh->has_refcount_msg) {
+ if (oh->has_refcount_msg) {
/* Check for removing refcount message */
- if(oh->nlink <= 1) {
- if(H5O_msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, TRUE, dxpl_id) < 0)
+ if (oh->nlink <= 1) {
+ if (H5O_msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, TRUE, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete refcount message")
oh->has_refcount_msg = FALSE;
} /* end if */
@@ -1557,22 +1511,24 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
else {
H5O_refcount_t refcount = oh->nlink;
- if(H5O_msg_write_real(f, dxpl_id, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0)
+ if (H5O_msg_write_real(f, dxpl_id, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0,
+ &refcount) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update refcount message")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Check for adding refcount message to object */
- if(oh->nlink > 1) {
+ if (oh->nlink > 1) {
H5O_refcount_t refcount = oh->nlink;
- if(H5O_msg_append_real(f, dxpl_id, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0)
+ if (H5O_msg_append_real(f, dxpl_id, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0,
+ &refcount) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to create new refcount message")
oh->has_refcount_msg = TRUE;
} /* end if */
- } /* end else */
- } /* end if */
- } /* end if */
+ } /* end else */
+ } /* end if */
+ } /* end if */
/* Set return value */
ret_value = (int)oh->nlink;
@@ -1581,7 +1537,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link
*
@@ -1593,7 +1548,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
@@ -1601,9 +1555,9 @@ done:
int
H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id)
{
- H5O_t *oh = NULL;
- hbool_t deleted = FALSE; /* Whether the object was deleted */
- int ret_value; /* Return value */
+ H5O_t * oh = NULL;
+ hbool_t deleted = FALSE; /* Whether the object was deleted */
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1613,23 +1567,22 @@ H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id)
HDassert(H5F_addr_defined(loc->addr));
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Call the "real" link routine */
- if((ret_value = H5O_link_oh(loc->file, adjust, dxpl_id, oh, &deleted)) < 0)
+ if ((ret_value = H5O_link_oh(loc->file, adjust, dxpl_id, oh, &deleted)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust object link count")
done:
- if(oh && H5O_unpin(oh) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
- if(ret_value >= 0 && deleted && H5O_delete(loc->file, dxpl_id, loc->addr) < 0)
+ if (oh && H5O_unpin(oh) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
+ if (ret_value >= 0 && deleted && H5O_delete(loc->file, dxpl_id, loc->addr) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link() */
-
/*-------------------------------------------------------------------------
* Function: H5O_protect
*
@@ -1642,7 +1595,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
@@ -1650,11 +1602,11 @@ done:
H5O_t *
H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
{
- H5O_t *oh = NULL; /* Object header protected */
- H5O_cache_ud_t udata; /* User data for protecting object header */
- H5O_cont_msgs_t cont_msg_info; /* Continuation message info */
- unsigned file_intent; /* R/W intent on file */
- H5O_t *ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header protected */
+ H5O_cache_ud_t udata; /* User data for protecting object header */
+ H5O_cont_msgs_t cont_msg_info; /* Continuation message info */
+ unsigned file_intent; /* R/W intent on file */
+ H5O_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1663,34 +1615,34 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
HDassert(loc->file);
/* Check for valid address */
- if(!H5F_addr_defined(loc->addr))
+ if (!H5F_addr_defined(loc->addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined")
/* Check for write access on the file */
file_intent = H5F_INTENT(loc->file);
- if((prot == H5AC_WRITE) && (0 == (file_intent & H5F_ACC_RDWR)))
- HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file")
+ if ((prot == H5AC_WRITE) && (0 == (file_intent & H5F_ACC_RDWR)))
+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file")
/* Construct the user data for protect callback */
- udata.made_attempt = FALSE;
- udata.v1_pfx_nmesgs = 0;
- udata.common.f = loc->file;
- udata.common.dxpl_id = dxpl_id;
- udata.common.file_intent = file_intent;
+ udata.made_attempt = FALSE;
+ udata.v1_pfx_nmesgs = 0;
+ udata.common.f = loc->file;
+ udata.common.dxpl_id = dxpl_id;
+ udata.common.file_intent = file_intent;
udata.common.merged_null_msgs = 0;
- udata.common.mesgs_modified = FALSE;
+ udata.common.mesgs_modified = FALSE;
HDmemset(&cont_msg_info, 0, sizeof(cont_msg_info));
udata.common.cont_msg_info = &cont_msg_info;
- udata.common.addr = loc->addr;
+ udata.common.addr = loc->addr;
/* Lock the object header into the cache */
- if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, &udata, prot)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header")
+ if (NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, &udata, prot)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header")
/* Check if there are any continuation messages to process */
- if(cont_msg_info.nmsgs > 0) {
- size_t curr_msg; /* Current continuation message to process */
- H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
+ if (cont_msg_info.nmsgs > 0) {
+ size_t curr_msg; /* Current continuation message to process */
+ H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
/* Sanity check - we should only have continuation messages to process
* when the object header is actually loaded from the file.
@@ -1699,29 +1651,31 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
HDassert(cont_msg_info.msgs);
/* Construct the user data for protecting chunks */
- chk_udata.decoding = TRUE;
- chk_udata.oh = oh;
- chk_udata.chunkno = UINT_MAX; /* Set to invalid value, for better error detection */
- chk_udata.common.f = loc->file;
- chk_udata.common.dxpl_id = dxpl_id;
- chk_udata.common.file_intent = file_intent;
+ chk_udata.decoding = TRUE;
+ chk_udata.oh = oh;
+ chk_udata.chunkno = UINT_MAX; /* Set to invalid value, for better error detection */
+ chk_udata.common.f = loc->file;
+ chk_udata.common.dxpl_id = dxpl_id;
+ chk_udata.common.file_intent = file_intent;
chk_udata.common.merged_null_msgs = udata.common.merged_null_msgs;
- chk_udata.common.mesgs_modified = udata.common.mesgs_modified;
- chk_udata.common.cont_msg_info = &cont_msg_info;
+ chk_udata.common.mesgs_modified = udata.common.mesgs_modified;
+ chk_udata.common.cont_msg_info = &cont_msg_info;
/* Read in continuation messages, until there are no more */
curr_msg = 0;
- while(curr_msg < cont_msg_info.nmsgs) {
- H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */
+ while (curr_msg < cont_msg_info.nmsgs) {
+ H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */
#ifndef NDEBUG
- size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */
-#endif /* NDEBUG */
+ size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */
+#endif /* NDEBUG */
/* Bring the chunk into the cache */
/* (which adds to the object header) */
chk_udata.common.addr = cont_msg_info.msgs[curr_msg].addr;
- chk_udata.size = cont_msg_info.msgs[curr_msg].size;
- if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, &chk_udata, prot)))
+ chk_udata.size = cont_msg_info.msgs[curr_msg].size;
+ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR_CHK,
+ cont_msg_info.msgs[curr_msg].addr,
+ &chk_udata, prot)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
@@ -1730,7 +1684,8 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
HDassert(oh->nchunks == (chkcnt + 1));
/* Release the chunk from the cache */
- if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr,
+ chk_proxy, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk")
/* Advance to next continuation message */
@@ -1742,16 +1697,16 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
/* Pass back out some of the chunk's user data */
udata.common.merged_null_msgs = chk_udata.common.merged_null_msgs;
- udata.common.mesgs_modified = chk_udata.common.mesgs_modified;
+ udata.common.mesgs_modified = chk_udata.common.mesgs_modified;
} /* end if */
/* Check for incorrect # of object header messages, if we've just loaded
* this object header from the file
*/
- if(udata.made_attempt) {
+ if (udata.made_attempt) {
/* Check for incorrect # of messages in v1 object header */
- if(oh->version == H5O_VERSION_1 &&
- (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) {
+ if (oh->version == H5O_VERSION_1 &&
+ (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) {
/* Don't enforce the error on an incorrect # of object header messages bug
* unless strict format checking is enabled. This allows for older
* files, created with a version of the library that had a bug in tracking
@@ -1765,25 +1720,26 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
/* (object header will have been marked dirty during protect, if we
* have write access -QAK)
*/
- if(prot != H5AC_WRITE)
+ if (prot != H5AC_WRITE)
oh->prefix_modified = TRUE;
#ifndef NDEBUG
else {
- unsigned oh_status = 0; /* Object header entry cache status */
+ unsigned oh_status = 0; /* Object header entry cache status */
/* Check the object header's status in the metadata cache */
- if(H5AC_get_entry_status(loc->file, loc->addr, &oh_status) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to check metadata cache status for object header")
+ if (H5AC_get_entry_status(loc->file, loc->addr, &oh_status) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL,
+ "unable to check metadata cache status for object header")
/* Make certain that object header is not dirty */
HDassert(!(oh_status & H5AC_ES__IS_DIRTY));
} /* end else */
-#endif /* NDEBUG */
-#endif /* H5_STRICT_FORMAT_CHECKS */
+#endif /* NDEBUG */
+#endif /* H5_STRICT_FORMAT_CHECKS */
} /* end if */
/* Check for any messages that were modified while being read in */
- if(udata.common.mesgs_modified && prot != H5AC_WRITE)
+ if (udata.common.mesgs_modified && prot != H5AC_WRITE)
oh->mesgs_modified = TRUE;
/* Reset the field that contained chunk 0's size during speculative load */
@@ -1793,12 +1749,12 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
/* Take care of loose ends for modifications made while bringing in the
* object header & chunks.
*/
- if(prot == H5AC_WRITE) {
+ if (prot == H5AC_WRITE) {
/* Check for the object header prefix being modified somehow */
/* (usually through updating the # of object header messages) */
- if(oh->prefix_modified) {
+ if (oh->prefix_modified) {
/* Mark the header as dirty now */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, NULL, "unable to mark object header as dirty")
/* Reset flag */
@@ -1806,50 +1762,50 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
} /* end if */
/* Check for deferred dirty messages */
- if(oh->mesgs_modified) {
- unsigned u; /* Local index variable */
+ if (oh->mesgs_modified) {
+ unsigned u; /* Local index variable */
/* Loop through all messages, marking their chunks as dirty */
/* (slightly inefficient, since we don't know exactly which messages
* were modified when the object header & chunks were brought in
* from the file, but this only can happen once per load -QAK)
*/
- for(u = 0; u < oh->nmesgs; u++) {
+ for (u = 0; u < oh->nmesgs; u++) {
/* Mark each chunk with a dirty message as dirty also */
- if(oh->mesg[u].dirty) {
- H5O_chunk_proxy_t *chk_proxy; /* Chunk that message is in */
+ if (oh->mesg[u].dirty) {
+ H5O_chunk_proxy_t *chk_proxy; /* Chunk that message is in */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(loc->file, dxpl_id, oh, oh->mesg[u].chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(loc->file, dxpl_id, oh, oh->mesg[u].chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Unprotect chunk, marking it dirty */
- if(H5O_chunk_unprotect(loc->file, dxpl_id, chk_proxy, TRUE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk")
+ if (H5O_chunk_unprotect(loc->file, dxpl_id, chk_proxy, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL,
+ "unable to unprotect object header chunk")
} /* end if */
- } /* end for */
+ } /* end for */
/* Reset flag */
oh->mesgs_modified = FALSE;
} /* end if */
- } /* end if */
+ } /* end if */
#ifdef H5O_DEBUG
-H5O_assert(oh);
+ H5O_assert(oh);
#endif /* H5O_DEBUG */
/* Set return value */
ret_value = oh;
done:
- if(ret_value == NULL && oh)
- if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (ret_value == NULL && oh)
+ if (H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_protect() */
-
/*-------------------------------------------------------------------------
* Function: H5O_pin
*
@@ -1862,7 +1818,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -1870,8 +1825,8 @@ done:
H5O_t *
H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header */
- H5O_t *ret_value; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ H5O_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1879,12 +1834,12 @@ H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id)
HDassert(loc);
/* Get header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header")
/* Increment the reference count on the object header */
/* (which will pin it, if appropriate) */
- if(H5O_inc_rc(oh) < 0)
+ if (H5O_inc_rc(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "unable to increment reference count on object header")
/* Set the return value */
@@ -1892,13 +1847,12 @@ H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id)
done:
/* Release the object header from the cache */
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pin() */
-
/*-------------------------------------------------------------------------
* Function: H5O_unpin
*
@@ -1909,7 +1863,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -1917,7 +1870,7 @@ done:
herr_t
H5O_unpin(H5O_t *oh)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1926,14 +1879,13 @@ H5O_unpin(H5O_t *oh)
/* Decrement the reference count on the object header */
/* (which will unpin it, if appropriate) */
- if(H5O_dec_rc(oh) < 0)
+ if (H5O_dec_rc(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_unpin() */
-
/*-------------------------------------------------------------------------
* Function: H5O_unprotect
*
@@ -1945,7 +1897,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
@@ -1953,7 +1904,7 @@ done:
herr_t
H5O_unprotect(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, unsigned oh_flags)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1962,14 +1913,13 @@ H5O_unprotect(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, unsigned oh_flags)
HDassert(oh);
/* Unprotect the object header */
- if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, oh->chunk[0].addr, oh, oh_flags) < 0)
+ if (H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, oh->chunk[0].addr, oh, oh_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_unprotect() */
-
/*-------------------------------------------------------------------------
* Function: H5O_touch_oh
*
@@ -1987,10 +1937,10 @@ done:
herr_t
H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- time_t now; /* Current time */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ time_t now; /* Current time */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1998,43 +1948,45 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
HDassert(oh);
/* Check if this object header is tracking times */
- if(oh->flags & H5O_HDR_STORE_TIMES) {
+ if (oh->flags & H5O_HDR_STORE_TIMES) {
/* Get current time */
now = H5_now();
/* Check version, to determine how to store time information */
- if(oh->version == H5O_VERSION_1) {
- size_t idx; /* Index of modification time message to update */
+ if (oh->version == H5O_VERSION_1) {
+ size_t idx; /* Index of modification time message to update */
/* Look for existing message */
- for(idx = 0; idx < oh->nmesgs; idx++)
- if(H5O_MSG_MTIME == oh->mesg[idx].type || H5O_MSG_MTIME_NEW == oh->mesg[idx].type)
+ for (idx = 0; idx < oh->nmesgs; idx++)
+ if (H5O_MSG_MTIME == oh->mesg[idx].type || H5O_MSG_MTIME_NEW == oh->mesg[idx].type)
break;
/* Create a new message, if necessary */
- if(idx == oh->nmesgs) {
- unsigned mesg_flags = 0; /* Flags for message in object header */
+ if (idx == oh->nmesgs) {
+ unsigned mesg_flags = 0; /* Flags for message in object header */
/* If we would have to create a new message, but we aren't 'forcing' it, get out now */
- if(!force)
- HGOTO_DONE(SUCCEED); /*nothing to do*/
+ if (!force)
+ HGOTO_DONE(SUCCEED); /*nothing to do*/
/* Allocate space for the modification time message */
- if(H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now, &idx) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for modification time message")
+ if (H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now, &idx) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL,
+ "unable to allocate space for modification time message")
/* Set the message's flags if appropriate */
oh->mesg[idx].flags = (uint8_t)mesg_flags;
} /* end if */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, oh->mesg[idx].chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, oh->mesg[idx].chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Allocate 'native' space, if necessary */
- if(NULL == oh->mesg[idx].native) {
- if(NULL == (oh->mesg[idx].native = H5FL_MALLOC(time_t)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for modification time message")
+ if (NULL == oh->mesg[idx].native) {
+ if (NULL == (oh->mesg[idx].native = H5FL_MALLOC(time_t)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL,
+ "memory allocation failed for modification time message")
} /* end if */
/* Update the message */
@@ -2042,7 +1994,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
/* Mark the message as dirty */
oh->mesg[idx].dirty = TRUE;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
} /* end if */
else {
/* XXX: For now, update access time & change fields in the object header */
@@ -2050,20 +2002,19 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
oh->atime = oh->ctime = now;
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end else */
- } /* end if */
+ } /* end if */
done:
/* Release chunk */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_touch_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_touch
*
@@ -2082,9 +2033,9 @@ done:
herr_t
H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to modify */
- unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header to modify */
+ unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2092,25 +2043,25 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id)
HDassert(loc);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Create/Update the modification time message */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, force) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modificaton time")
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, force) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modificaton time")
/* Mark object header as changed */
oh_flags |= H5AC__DIRTIED_FLAG;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, oh_flags) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, oh_flags) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_touch() */
#ifdef H5O_ENABLE_BOGUS
-
+
/*-------------------------------------------------------------------------
* Function: H5O_bogus_oh
*
@@ -2119,7 +2070,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * <koziol@ncsa.uiuc.edu>
* Tuesday, January 21, 2003
*
*-------------------------------------------------------------------------
@@ -2127,9 +2077,9 @@ done:
herr_t
H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
{
- size_t idx; /* Local index variable */
- H5O_msg_class_t *type; /* Message class type */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t idx; /* Local index variable */
+ H5O_msg_class_t *type; /* Message class type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2137,31 +2087,30 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned bogus_id, unsigned mes
HDassert(oh);
/* Look for existing message */
- for(idx = 0; idx < oh->nmesgs; idx++)
- if(H5O_MSG_BOGUS_VALID == oh->mesg[idx].type ||
- H5O_MSG_BOGUS_INVALID == oh->mesg[idx].type)
+ for (idx = 0; idx < oh->nmesgs; idx++)
+ if (H5O_MSG_BOGUS_VALID == oh->mesg[idx].type || H5O_MSG_BOGUS_INVALID == oh->mesg[idx].type)
break;
/* Create a new message */
- if(idx == oh->nmesgs) {
- H5O_bogus_t *bogus; /* Pointer to the bogus information */
+ if (idx == oh->nmesgs) {
+ H5O_bogus_t *bogus; /* Pointer to the bogus information */
/* Allocate the native message in memory */
- if(NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t))))
+ if (NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message")
/* Update the native value */
bogus->u = H5O_BOGUS_VALUE;
- if(bogus_id == H5O_BOGUS_VALID_ID)
+ if (bogus_id == H5O_BOGUS_VALID_ID)
type = H5O_MSG_BOGUS_VALID;
- else if(bogus_id == H5O_BOGUS_INVALID_ID)
+ else if (bogus_id == H5O_BOGUS_INVALID_ID)
type = H5O_MSG_BOGUS_INVALID;
else
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID for 'bogus' message")
/* Allocate space in the object header for bogus message */
- if(H5O_msg_alloc(f, dxpl_id, oh, type, &mesg_flags, bogus, &idx) < 0)
+ if (H5O_msg_alloc(f, dxpl_id, oh, type, &mesg_flags, bogus, &idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message")
/* Point to "bogus" information (take it over) */
@@ -2171,7 +2120,7 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned bogus_id, unsigned mes
oh->mesg[idx].flags = mesg_flags;
/* Mark the message and object header as dirty */
- oh->mesg[idx].dirty = TRUE;
+ oh->mesg[idx].dirty = TRUE;
oh->cache_info.is_dirty = TRUE;
} /* end if */
@@ -2180,7 +2129,6 @@ done:
} /* end H5O_bogus_oh() */
#endif /* H5O_ENABLE_BOGUS */
-
/*-------------------------------------------------------------------------
* Function: H5O_delete
*
@@ -2192,7 +2140,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 19 2003
*
*-------------------------------------------------------------------------
@@ -2200,10 +2147,10 @@ done:
herr_t
H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
{
- H5O_t *oh = NULL; /* Object header information */
- H5O_loc_t loc; /* Object location for object to delete */
- unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header information */
+ H5O_loc_t loc; /* Object location for object to delete */
+ unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2212,29 +2159,28 @@ H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
HDassert(H5F_addr_defined(addr));
/* Set up the object location */
- loc.file = f;
- loc.addr = addr;
+ loc.file = f;
+ loc.addr = addr;
loc.holding_file = FALSE;
/* Get the object header information */
- if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_WRITE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Delete object */
- if(H5O_delete_oh(f, dxpl_id, oh) < 0)
+ if (H5O_delete_oh(f, dxpl_id, oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file")
/* Mark object header as deleted */
oh_flags = H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
done:
- if(oh && H5O_unprotect(&loc, dxpl_id, oh, oh_flags) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(&loc, dxpl_id, oh, oh_flags) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_delete_oh
*
@@ -2247,7 +2193,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 19 2003
*
*-------------------------------------------------------------------------
@@ -2255,9 +2200,9 @@ done:
static herr_t
H5O_delete_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
{
- H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- unsigned u;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
+ unsigned u;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2268,17 +2213,17 @@ H5O_delete_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/* Walk through the list of object header messages, asking each one to
* delete any file space used
*/
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
/* Free any space referred to in the file from this message */
- if(H5O_delete_mesg(f, dxpl_id, oh, curr_msg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message")
+ if (H5O_delete_mesg(f, dxpl_id, oh, curr_msg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL,
+ "unable to delete file space for object header message")
} /* end for */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_delete_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_obj_type
*
@@ -2295,27 +2240,26 @@ done:
herr_t
H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header for location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header for location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Load the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Retrieve the type of the object */
- if(H5O_obj_type_real(oh, obj_type) < 0)
+ if (H5O_obj_type_real(oh, obj_type) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_obj_type() */
-
/*-------------------------------------------------------------------------
* Function: H5O_obj_type_real
*
@@ -2332,7 +2276,7 @@ done:
static herr_t
H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type)
{
- const H5O_obj_class_t *obj_class; /* Class of object for header */
+ const H5O_obj_class_t *obj_class; /* Class of object for header */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2341,7 +2285,7 @@ H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type)
HDassert(obj_type);
/* Look up class for object header */
- if(NULL == (obj_class = H5O_obj_class_real(oh))) {
+ if (NULL == (obj_class = H5O_obj_class_real(oh))) {
/* Clear error stack from "failed" class lookup */
H5E_clear_stack(NULL);
@@ -2356,7 +2300,6 @@ H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_obj_type_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_obj_class
*
@@ -2373,27 +2316,26 @@ H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type)
const H5O_obj_class_t *
H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header for location */
- const H5O_obj_class_t *ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header for location */
+ const H5O_obj_class_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Load the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header")
/* Test whether entry qualifies as a particular type of object */
- if(NULL == (ret_value = H5O_obj_class_real(oh)))
+ if (NULL == (ret_value = H5O_obj_class_real(oh)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object type")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_obj_class() */
-
/*-------------------------------------------------------------------------
* Function: H5O_obj_class_real
*
@@ -2410,8 +2352,8 @@ done:
static const H5O_obj_class_t *
H5O_obj_class_real(H5O_t *oh)
{
- size_t i; /* Local index variable */
- const H5O_obj_class_t *ret_value; /* Return value */
+ size_t i; /* Local index variable */
+ const H5O_obj_class_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -2420,23 +2362,22 @@ H5O_obj_class_real(H5O_t *oh)
/* Test whether entry qualifies as a particular type of object */
/* (Note: loop is in reverse order, to test specific objects first) */
- for(i = NELMTS(H5O_obj_class_g); i > 0; --i) {
- htri_t isa; /* Is entry a particular type? */
+ for (i = NELMTS(H5O_obj_class_g); i > 0; --i) {
+ htri_t isa; /* Is entry a particular type? */
- if((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type")
- else if(isa)
- HGOTO_DONE(H5O_obj_class_g[i - 1])
+ if ((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type")
+ else if (isa)
+ HGOTO_DONE(H5O_obj_class_g[i - 1])
} /* end for */
- if(0 == i)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type")
+ if (0 == i)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_obj_class_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_loc
*
@@ -2453,23 +2394,23 @@ done:
H5O_loc_t *
H5O_get_loc(hid_t object_id)
{
- H5O_loc_t *ret_value; /* Return value */
+ H5O_loc_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- switch(H5I_get_type(object_id)) {
+ switch (H5I_get_type(object_id)) {
case H5I_GROUP:
- if(NULL == (ret_value = H5O_OBJ_GROUP->get_oloc(object_id)))
+ if (NULL == (ret_value = H5O_OBJ_GROUP->get_oloc(object_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from group ID")
break;
case H5I_DATASET:
- if(NULL == (ret_value = H5O_OBJ_DATASET->get_oloc(object_id)))
+ if (NULL == (ret_value = H5O_OBJ_DATASET->get_oloc(object_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from dataset ID")
break;
case H5I_DATATYPE:
- if(NULL == (ret_value = H5O_OBJ_DATATYPE->get_oloc(object_id)))
+ if (NULL == (ret_value = H5O_OBJ_DATATYPE->get_oloc(object_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID")
break;
@@ -2494,7 +2435,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_loc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_loc_reset
*
@@ -2523,7 +2463,6 @@ H5O_loc_reset(H5O_loc_t *loc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_loc_copy
*
@@ -2533,7 +2472,6 @@ H5O_loc_reset(H5O_loc_t *loc)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Monday, September 19, 2005
*
* Notes: 'depth' parameter determines how much of the group entry
@@ -2560,20 +2498,20 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
HDmemcpy(dst, src, sizeof(H5O_loc_t));
/* Deep copy the names */
- if(depth == H5_COPY_DEEP) {
+ if (depth == H5_COPY_DEEP) {
/* If the original entry was holding open the file, this one should
* hold it open, too.
*/
- if(src->holding_file)
+ if (src->holding_file)
H5F_INCR_NOPEN_OBJS(dst->file);
- } else if(depth == H5_COPY_SHALLOW) {
+ }
+ else if (depth == H5_COPY_SHALLOW) {
H5O_loc_reset(src);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_loc_hold_file
*
@@ -2598,7 +2536,7 @@ H5O_loc_hold_file(H5O_loc_t *loc)
HDassert(loc->file);
/* If this location is not already holding its file open, do so. */
- if(!loc->holding_file) {
+ if (!loc->holding_file) {
H5F_INCR_NOPEN_OBJS(loc->file);
loc->holding_file = TRUE;
} /* end if */
@@ -2606,7 +2544,6 @@ H5O_loc_hold_file(H5O_loc_t *loc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_hold_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_loc_free
*
@@ -2633,20 +2570,19 @@ H5O_loc_free(H5O_loc_t *loc)
HDassert(loc);
/* If this location is holding its file open try to close the file. */
- if(loc->holding_file) {
+ if (loc->holding_file) {
H5F_DECR_NOPEN_OBJS(loc->file);
loc->holding_file = FALSE;
- if(H5F_NOPEN_OBJS(loc->file) <= 0) {
- if(H5F_try_close(loc->file) < 0)
+ if (H5F_NOPEN_OBJS(loc->file) <= 0) {
+ if (H5F_try_close(loc->file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_loc_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_hdr_info
*
@@ -2663,8 +2599,8 @@ done:
herr_t
H5O_get_hdr_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_hdr_info_t *hdr)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2676,21 +2612,20 @@ H5O_get_hdr_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_hdr_info_t *hdr)
HDmemset(hdr, 0, sizeof(*hdr));
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header")
/* Get the information for the object header */
- if(H5O_get_hdr_info_real(oh, hdr) < 0)
+ if (H5O_get_hdr_info_real(oh, hdr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_hdr_info() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_hdr_info_real
*
@@ -2707,9 +2642,9 @@ done:
static herr_t
H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
{
- const H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
- unsigned u; /* Local index variable */
+ const H5O_mesg_t * curr_msg; /* Pointer to current message being operated on */
+ const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2728,18 +2663,18 @@ H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
hdr->flags = oh->flags;
/* Iterate over all the messages, accumulating message size & type information */
- hdr->space.meta = (hsize_t)H5O_SIZEOF_HDR(oh) + (hsize_t)(H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1));
- hdr->space.mesg = 0;
- hdr->space.free = 0;
+ hdr->space.meta = (hsize_t)H5O_SIZEOF_HDR(oh) + (hsize_t)(H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1));
+ hdr->space.mesg = 0;
+ hdr->space.free = 0;
hdr->mesg.present = 0;
- hdr->mesg.shared = 0;
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- uint64_t type_flag; /* Flag for message type */
+ hdr->mesg.shared = 0;
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ uint64_t type_flag; /* Flag for message type */
/* Accumulate space usage information, based on the type of message */
- if(H5O_NULL_ID == curr_msg->type->id)
+ if (H5O_NULL_ID == curr_msg->type->id)
hdr->space.free += (hsize_t)((size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size);
- else if(H5O_CONT_ID == curr_msg->type->id)
+ else if (H5O_CONT_ID == curr_msg->type->id)
hdr->space.meta += (hsize_t)((size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size);
else {
hdr->space.meta += (hsize_t)H5O_SIZEOF_MSGHDR_OH(oh);
@@ -2751,13 +2686,13 @@ H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
hdr->mesg.present |= type_flag;
/* Set flag if the message is shared in some way */
- if(curr_msg->flags & H5O_MSG_FLAG_SHARED) \
+ if (curr_msg->flags & H5O_MSG_FLAG_SHARED)
hdr->mesg.shared |= type_flag;
} /* end for */
/* Iterate over all the chunks, adding any gaps to the free space */
hdr->space.total = 0;
- for(u = 0, curr_chunk = &oh->chunk[0]; u < oh->nchunks; u++, curr_chunk++) {
+ for (u = 0, curr_chunk = &oh->chunk[0]; u < oh->nchunks; u++, curr_chunk++) {
/* Accumulate the size of the header on disk */
hdr->space.total += curr_chunk->size;
@@ -2771,27 +2706,22 @@ H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_get_hdr_info_real() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_get_info
- *
- * Purpose: Retrieve the information for an object
+ * Function: H5O_get_info
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Retrieve information about an object.
*
- * Programmer: Quincey Koziol
- * November 21 2006
+ * Return: Success: Non-negative
+ * Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
- H5O_info_t *oinfo)
+H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info, H5O_info_t *oinfo)
{
- const H5O_obj_class_t *obj_class; /* Class of object for header */
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_obj_class_t *obj_class; /* Class of object for header */
+ H5O_t * oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2800,8 +2730,8 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
HDassert(oinfo);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Reset the object info structure */
HDmemset(oinfo, 0, sizeof(*oinfo));
@@ -2813,7 +2743,7 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
oinfo->addr = loc->addr;
/* Get class for object */
- if(NULL == (obj_class = H5O_obj_class_real(oh)))
+ if (NULL == (obj_class = H5O_obj_class_real(oh)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class")
/* Retrieve the type of the object */
@@ -2823,14 +2753,14 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
oinfo->rc = oh->nlink;
/* Get modification time for object */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
oinfo->atime = oh->atime;
oinfo->mtime = oh->mtime;
oinfo->ctime = oh->ctime;
oinfo->btime = oh->btime;
} /* end if */
else {
- htri_t exists; /* Flag if header message of interest exists */
+ htri_t exists; /* Flag if header message of interest exists */
/* No information for access & modification fields */
/* (we stopped updating the "modification time" header message for
@@ -2842,59 +2772,58 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
oinfo->btime = 0;
/* Might be information for modification time */
- if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message")
- if(exists > 0) {
+ if (exists > 0) {
/* Get "old style" modification time info */
- if(NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_MTIME_ID, &oinfo->ctime))
+ if (NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_MTIME_ID, &oinfo->ctime))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message")
} /* end if */
else {
/* Check for "new style" modification time info */
- if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0)
+ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message")
- if(exists > 0) {
+ if (exists > 0) {
/* Get "new style" modification time info */
- if(NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_MTIME_NEW_ID, &oinfo->ctime))
+ if (NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_MTIME_NEW_ID, &oinfo->ctime))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message")
} /* end if */
else
oinfo->ctime = 0;
} /* end else */
- } /* end else */
+ } /* end else */
/* Get the information for the object header */
- if(H5O_get_hdr_info_real(oh, &oinfo->hdr) < 0)
+ if (H5O_get_hdr_info_real(oh, &oinfo->hdr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info")
/* Retrieve # of attributes */
- if(H5O_attr_count_real(loc->file, dxpl_id, oh, &oinfo->num_attrs) < 0)
+ if (H5O_attr_count_real(loc->file, dxpl_id, oh, &oinfo->num_attrs) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count")
/* Get B-tree & heap metadata storage size, if requested */
- if(want_ih_info) {
+ if (want_ih_info) {
/* Check for 'bh_info' callback for this type of object */
- if(obj_class->bh_info) {
+ if (obj_class->bh_info) {
/* Call the object's class 'bh_info' routine */
- if((obj_class->bh_info)(loc->file, dxpl_id, oh, &oinfo->meta_size.obj) < 0)
+ if ((obj_class->bh_info)(loc->file, dxpl_id, oh, &oinfo->meta_size.obj) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info")
} /* end if */
/* Get B-tree & heap info for any attributes */
- if(oinfo->num_attrs > 0) {
- if(H5O_attr_bh_info(loc->file, dxpl_id, oh, &oinfo->meta_size.attr) < 0)
+ if (oinfo->num_attrs > 0) {
+ if (H5O_attr_bh_info(loc->file, dxpl_id, oh, &oinfo->meta_size.attr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info")
} /* end if */
- } /* end if */
+ } /* end if */
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_info() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_create_plist
*
@@ -2911,8 +2840,8 @@ done:
herr_t
H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, H5P_genplist_t *oc_plist)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2921,35 +2850,36 @@ H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, H5P_genplist_t *oc_pli
HDassert(oc_plist);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Set property values, if they were used for the object */
- if(oh->version > H5O_VERSION_1) {
- uint8_t ohdr_flags; /* "User-visible" object header status flags */
+ if (oh->version > H5O_VERSION_1) {
+ uint8_t ohdr_flags; /* "User-visible" object header status flags */
/* Set attribute storage values */
- if(H5P_set(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set max. # of compact attributes in property list")
- if(H5P_set(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0)
+ if (H5P_set(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL,
+ "can't set max. # of compact attributes in property list")
+ if (H5P_set(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list")
/* Mask off non-"user visible" flags */
- ohdr_flags = oh->flags & (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES);
+ ohdr_flags = oh->flags &
+ (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES);
/* Set object header flags */
- if(H5P_set(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0)
+ if (H5P_set(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags")
} /* end if */
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_create_plist() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_nlinks
*
@@ -2966,8 +2896,8 @@ done:
herr_t
H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2976,20 +2906,19 @@ H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks)
HDassert(nlinks);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Retrieve the # of link messages seen when the object header was loaded */
*nlinks = oh->link_msgs_seen;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_nlinks() */
-
/*-------------------------------------------------------------------------
* Function: H5O_obj_create
*
@@ -3004,11 +2933,10 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc,
- hid_t dxpl_id)
+H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
{
- size_t u; /* Local index variable */
- void *ret_value = NULL; /* Return value */
+ size_t u; /* Local index variable */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -3019,25 +2947,24 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
HDassert(obj_loc);
/* Iterate through the object classes */
- for(u = 0; u < NELMTS(H5O_obj_class_g); u++) {
+ for (u = 0; u < NELMTS(H5O_obj_class_g); u++) {
/* Check for correct type of object to create */
- if(H5O_obj_class_g[u]->type == obj_type) {
+ if (H5O_obj_class_g[u]->type == obj_type) {
/* Call the object class's 'create' routine */
HDassert(H5O_obj_class_g[u]->create);
- if(NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc, dxpl_id)))
+ if (NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc, dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object")
/* Break out of loop */
break;
} /* end if */
- } /* end for */
+ } /* end for */
HDassert(ret_value);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_obj_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_oh_addr
*
@@ -3067,7 +2994,6 @@ H5O_get_oh_addr(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->chunk[0].addr)
} /* end H5O_get_oh_addr() */
-
/*-------------------------------------------------------------------------
* Function: H5O_get_rc_and_type
*
@@ -3084,8 +3010,8 @@ H5O_get_oh_addr(const H5O_t *oh)
herr_t
H5O_get_rc_and_type(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc, H5O_type_t *otype)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3093,26 +3019,25 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc, H5O_type_
HDassert(loc);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Set the object's reference count */
- if(rc)
+ if (rc)
*rc = oh->nlink;
/* Retrieve the type of the object */
- if(otype)
- if(H5O_obj_type_real(oh, otype) < 0)
+ if (otype)
+ if (H5O_obj_type_real(oh, otype) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_rc_and_type() */
-
/*-------------------------------------------------------------------------
* Function: H5O_free_visit_visited
*
@@ -3126,7 +3051,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data/*in,out*/)
+H5O_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data /*in,out*/)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -3135,7 +3060,6 @@ H5O_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_free_visit_visited() */
-
/*-------------------------------------------------------------------------
* Function: H5O_visit_cb
*
@@ -3150,15 +3074,14 @@ H5O_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *linfo,
- void *_udata)
+H5O_visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *linfo, void *_udata)
{
- H5O_iter_visit_ud_t *udata = (H5O_iter_visit_ud_t *)_udata; /* User data for callback */
- H5G_loc_t obj_loc; /* Location of object */
- H5G_name_t obj_path; /* Object's group hier. path */
- H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_visit_ud_t *udata = (H5O_iter_visit_ud_t *)_udata; /* User data for callback */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ hbool_t obj_found = FALSE; /* Object at 'name' found */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -3168,8 +3091,8 @@ H5O_visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *lin
HDassert(udata);
/* Check if this is a hard link */
- if(linfo->type == H5L_TYPE_HARD) {
- H5_obj_t obj_pos; /* Object "position" for this object */
+ if (linfo->type == H5L_TYPE_HARD) {
+ H5_obj_t obj_pos; /* Object "position" for this object */
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -3178,7 +3101,7 @@ H5O_visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *lin
/* Find the object using the LAPL passed in */
/* (Correctly handles mounted files) */
- if(H5G_loc_find(udata->start_loc, name, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
+ if (H5G_loc_find(udata->start_loc, name, &obj_loc /*out*/, udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
obj_found = TRUE;
@@ -3187,47 +3110,47 @@ H5O_visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *lin
obj_pos.addr = obj_oloc.addr;
/* Check if we've seen the object the link references before */
- if(NULL == H5SL_search(udata->visited, &obj_pos)) {
- H5O_info_t oinfo; /* Object info */
+ if (NULL == H5SL_search(udata->visited, &obj_pos)) {
+ H5O_info_t oinfo; /* Object info */
/* Get the object's info */
- if(H5O_get_info(&obj_oloc, udata->dxpl_id, TRUE, &oinfo) < 0)
+ if (H5O_get_info(&obj_oloc, udata->dxpl_id, TRUE, &oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
/* Make the application callback */
ret_value = (udata->op)(udata->obj_id, name, &oinfo, udata->op_data);
/* Check for continuing to visit objects */
- if(ret_value == H5_ITER_CONT) {
+ if (ret_value == H5_ITER_CONT) {
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
- if(oinfo.rc > 1) {
- H5_obj_t *new_node; /* New object node for visited list */
+ if (oinfo.rc > 1) {
+ H5_obj_t *new_node; /* New object node for visited list */
/* Allocate new object "position" node */
- if((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
+ if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node")
/* Set node information */
*new_node = obj_pos;
/* Add to list of visited objects */
- if(H5SL_insert(udata->visited, new_node, new_node) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert object node into visited list")
+ if (H5SL_insert(udata->visited, new_node, new_node) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR,
+ "can't insert object node into visited list")
} /* end if */
- } /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
done:
/* Release resources */
- if(obj_found && H5G_loc_free(&obj_loc) < 0)
+ if (obj_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_visit_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_visit
*
@@ -3261,19 +3184,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id)
+H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
+ void *op_data, hid_t lapl_id, hid_t dxpl_id)
{
- H5O_iter_visit_ud_t udata; /* User data for callback */
- H5G_loc_t loc; /* Location of reference object */
- H5G_loc_t obj_loc; /* Location used to open object */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
- H5O_info_t oinfo; /* Object info struct */
- hid_t obj_id = (-1); /* ID of object */
- herr_t ret_value; /* Return value */
+ H5O_iter_visit_ud_t udata; /* User data for callback */
+ H5G_loc_t loc; /* Location of reference object */
+ H5G_loc_t obj_loc; /* Location used to open object */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ H5O_info_t oinfo; /* Object info struct */
+ hid_t obj_id = (-1); /* ID of object */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3281,7 +3203,7 @@ H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HDmemset(&udata, 0, sizeof(udata));
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Set up opened group location to fill in */
@@ -3290,84 +3212,83 @@ H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
+ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Get the object's info */
- if(H5O_get_info(&obj_oloc, dxpl_id, TRUE, &oinfo) < 0)
+ if (H5O_get_info(&obj_oloc, dxpl_id, TRUE, &oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info")
/* Open the object */
/* (Takes ownership of the obj_loc information) */
- if((obj_id = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, TRUE)) < 0)
+ if ((obj_id = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
/* Make callback for starting object */
- if((ret_value = op(obj_id, ".", &oinfo, op_data)) < 0)
+ if ((ret_value = op(obj_id, ".", &oinfo, op_data)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects")
/* Check return value of first callback */
- if(ret_value != H5_ITER_CONT)
+ if (ret_value != H5_ITER_CONT)
HGOTO_DONE(ret_value);
/* Check for object being a group */
- if(oinfo.type == H5O_TYPE_GROUP) {
- H5G_loc_t start_loc; /* Location of starting group */
+ if (oinfo.type == H5O_TYPE_GROUP) {
+ H5G_loc_t start_loc; /* Location of starting group */
/* Get the location of the starting group */
- if(H5G_loc(obj_id, &start_loc) < 0)
+ if (H5G_loc(obj_id, &start_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Set up user data for visiting links */
- udata.obj_id = obj_id;
+ udata.obj_id = obj_id;
udata.start_loc = &start_loc;
- udata.lapl_id = lapl_id;
- udata.dxpl_id = dxpl_id;
- udata.op = op;
- udata.op_data = op_data;
+ udata.lapl_id = lapl_id;
+ udata.dxpl_id = dxpl_id;
+ udata.op = op;
+ udata.op_data = op_data;
/* Create skip list to store visited object information */
- if((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
+ if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
- if(oinfo.rc > 1) {
- H5_obj_t *obj_pos; /* New object node for visited list */
+ if (oinfo.rc > 1) {
+ H5_obj_t *obj_pos; /* New object node for visited list */
/* Allocate new object "position" node */
- if((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
+ if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "can't allocate object node")
/* Construct unique "position" for this object */
obj_pos->fileno = oinfo.fileno;
- obj_pos->addr = oinfo.addr;
+ obj_pos->addr = oinfo.addr;
/* Add to list of visited objects */
- if(H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
+ if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object node into visited list")
} /* end if */
/* Call internal group visitation routine */
- if((ret_value = H5G_visit(obj_id, ".", idx_type, order, H5O_visit_cb, &udata, lapl_id, dxpl_id)) < 0)
+ if ((ret_value = H5G_visit(obj_id, ".", idx_type, order, H5O_visit_cb, &udata, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
} /* end if */
done:
- if(obj_id > 0) {
- if(H5I_dec_app_ref(obj_id) < 0)
+ if (obj_id > 0) {
+ if (H5I_dec_app_ref(obj_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
} /* end if */
- else if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ else if (loc_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location")
- if(udata.visited)
+ if (udata.visited)
H5SL_destroy(udata.visited, H5O_free_visit_visited, NULL);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_visit() */
-
/*-------------------------------------------------------------------------
* Function: H5O_inc_rc
*
@@ -3384,7 +3305,7 @@ done:
herr_t
H5O_inc_rc(H5O_t *oh)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3392,8 +3313,8 @@ H5O_inc_rc(H5O_t *oh)
HDassert(oh);
/* Pin the object header when the reference count goes above 0 */
- if(oh->rc == 0)
- if(H5AC_pin_protected_entry(oh) < 0)
+ if (oh->rc == 0)
+ if (H5AC_pin_protected_entry(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Increment reference count */
@@ -3403,7 +3324,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_inc_rc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dec_rc
*
@@ -3420,26 +3340,26 @@ done:
herr_t
H5O_dec_rc(H5O_t *oh)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(oh);
+ if (!oh)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header")
/* Decrement reference count */
oh->rc--;
/* Unpin the object header when the reference count goes back to 0 */
- if(oh->rc == 0)
- if(H5AC_unpin_entry(oh) < 0)
+ if (oh->rc == 0)
+ if (H5AC_unpin_entry(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dec_rc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dec_rc_by_loc
*
@@ -3457,8 +3377,8 @@ done:
herr_t
H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3466,23 +3386,22 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id)
HDassert(loc);
/* Get header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Decrement the reference count on the object header */
/* (which will unpin it, if appropriate) */
- if(H5O_dec_rc(oh) < 0)
+ if (H5O_dec_rc(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header")
done:
/* Release the object header from the cache */
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dec_rc_by_loc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_free
*
@@ -3499,7 +3418,7 @@ done:
herr_t
H5O_free(H5O_t *oh)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -3507,20 +3426,20 @@ H5O_free(H5O_t *oh)
HDassert(oh);
/* Destroy chunks */
- if(oh->chunk) {
- for(u = 0; u < oh->nchunks; u++)
+ if (oh->chunk) {
+ for (u = 0; u < oh->nchunks; u++)
oh->chunk[u].image = H5FL_BLK_FREE(chunk_image, oh->chunk[u].image);
oh->chunk = (H5O_chunk_t *)H5FL_SEQ_FREE(H5O_chunk_t, oh->chunk);
} /* end if */
/* Destroy messages */
- if(oh->mesg) {
- for(u = 0; u < oh->nmesgs; u++) {
+ if (oh->mesg) {
+ for (u = 0; u < oh->nmesgs; u++) {
#ifndef NDEBUG
/* Verify that message is clean, unless it could have been marked
* dirty by decoding */
- if(oh->ndecode_dirtied && oh->mesg[u].dirty)
+ if (oh->ndecode_dirtied && oh->mesg[u].dirty)
oh->ndecode_dirtied--;
else
HDassert(oh->mesg[u].dirty == 0);
@@ -3540,4 +3459,3 @@ H5O_free(H5O_t *oh)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_free() */
-
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 5aab4c6..3271d5c 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,79 +15,75 @@
*
* Created: H5Oainfo.c
* Mar 6 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Attribute Information messages.
*
*-------------------------------------------------------------------------
*/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Opkg.h" /* Object headers */
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_ainfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_ainfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_ainfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_ainfo_copy(const void *_mesg, void *_dest);
+static void * H5O_ainfo_copy(const void *_mesg, void *_dest);
static size_t H5O_ainfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_ainfo_free(void *_mesg);
-static herr_t H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- void *_mesg);
-static herr_t H5O_ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
-static void *H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
- unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info);
-static herr_t H5O_ainfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
+static herr_t H5O_ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *udata);
+static void * H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+static herr_t H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
+ void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
+static herr_t H5O_ainfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_AINFO[1] = {{
- H5O_AINFO_ID, /*message id number */
- "ainfo", /*message name for debugging */
- sizeof(H5O_ainfo_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_ainfo_decode, /*decode message */
- H5O_ainfo_encode, /*encode message */
- H5O_ainfo_copy, /*copy the native value */
- H5O_ainfo_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_ainfo_free, /* free method */
- H5O_ainfo_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- H5O_ainfo_pre_copy_file, /* pre copy native value to file */
- H5O_ainfo_copy_file, /* copy native value to file */
- H5O_ainfo_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_ainfo_debug /*debug the message */
+ H5O_AINFO_ID, /*message id number */
+ "ainfo", /*message name for debugging */
+ sizeof(H5O_ainfo_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_ainfo_decode, /*decode message */
+ H5O_ainfo_encode, /*encode message */
+ H5O_ainfo_copy, /*copy the native value */
+ H5O_ainfo_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_ainfo_free, /* free method */
+ H5O_ainfo_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ H5O_ainfo_pre_copy_file, /* pre copy native value to file */
+ H5O_ainfo_copy_file, /* copy native value to file */
+ H5O_ainfo_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_ainfo_debug /*debug the message */
}};
/* Current version of attribute info information */
-#define H5O_AINFO_VERSION 0
+#define H5O_AINFO_VERSION 0
/* Flags for attribute info flag encoding */
-#define H5O_AINFO_TRACK_CORDER 0x01
-#define H5O_AINFO_INDEX_CORDER 0x02
-#define H5O_AINFO_ALL_FLAGS (H5O_AINFO_TRACK_CORDER | H5O_AINFO_INDEX_CORDER)
+#define H5O_AINFO_TRACK_CORDER 0x01
+#define H5O_AINFO_INDEX_CORDER 0x02
+#define H5O_AINFO_ALL_FLAGS (H5O_AINFO_TRACK_CORDER | H5O_AINFO_INDEX_CORDER)
/* Declare a free list to manage the H5O_ainfo_t struct */
H5FL_DEFINE_STATIC(H5O_ainfo_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_decode
*
@@ -97,19 +93,18 @@ H5FL_DEFINE_STATIC(H5O_ainfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static void *
H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_ainfo_t *ainfo = NULL; /* Attribute info */
- unsigned char flags; /* Flags for encoding attribute info */
- void *ret_value; /* Return value */
+ H5O_ainfo_t * ainfo = NULL; /* Attribute info */
+ unsigned char flags; /* Flags for encoding attribute info */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -118,16 +113,16 @@ H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
HDassert(p);
/* Version of message */
- if(*p++ != H5O_AINFO_VERSION)
+ if (*p++ != H5O_AINFO_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (ainfo = H5FL_MALLOC(H5O_ainfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (ainfo = H5FL_MALLOC(H5O_ainfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the flags for the message */
flags = *p++;
- if(flags & ~H5O_AINFO_ALL_FLAGS)
+ if (flags & ~H5O_AINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message")
ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? TRUE : FALSE;
ainfo->index_corder = (flags & H5O_AINFO_INDEX_CORDER) ? TRUE : FALSE;
@@ -136,7 +131,7 @@ H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
ainfo->nattrs = HSIZET_MAX;
/* Max. creation order value for the object */
- if(ainfo->track_corder)
+ if (ainfo->track_corder)
UINT16DECODE(p, ainfo->max_crt_idx)
else
ainfo->max_crt_idx = H5O_MAX_CRT_ORDER_IDX;
@@ -148,7 +143,7 @@ H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
H5F_addr_decode(f, &p, &(ainfo->name_bt2_addr));
/* Address of v2 B-tree to index creation order of links, if there is one */
- if(ainfo->index_corder)
+ if (ainfo->index_corder)
H5F_addr_decode(f, &p, &(ainfo->corder_bt2_addr));
else
ainfo->corder_bt2_addr = HADDR_UNDEF;
@@ -157,13 +152,12 @@ H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
ret_value = ainfo;
done:
- if(ret_value == NULL && ainfo != NULL)
+ if (ret_value == NULL && ainfo != NULL)
ainfo = H5FL_FREE(H5O_ainfo_t, ainfo);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ainfo_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_encode
*
@@ -172,7 +166,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
@@ -180,8 +173,8 @@ done:
static herr_t
H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
- unsigned char flags; /* Flags for encoding attribute info */
+ const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
+ unsigned char flags; /* Flags for encoding attribute info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -194,12 +187,12 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_AINFO_VERSION;
/* The flags for the attribute indices */
- flags = ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0;
+ flags = (unsigned char)(ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0);
flags = (unsigned char)(flags | (ainfo->index_corder ? H5O_AINFO_INDEX_CORDER : 0));
- *p++ = flags;
+ *p++ = flags;
/* Max. creation order value for the object */
- if(ainfo->track_corder)
+ if (ainfo->track_corder)
UINT16ENCODE(p, ainfo->max_crt_idx);
/* Address of fractal heap to store "dense" attributes */
@@ -209,7 +202,7 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
H5F_addr_encode(f, &p, ainfo->name_bt2_addr);
/* Address of v2 B-tree to index creation order of attributes, if they are indexed */
- if(ainfo->index_corder)
+ if (ainfo->index_corder)
H5F_addr_encode(f, &p, ainfo->corder_bt2_addr);
else
HDassert(!H5F_addr_defined(ainfo->corder_bt2_addr));
@@ -217,7 +210,6 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ainfo_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_copy
*
@@ -228,7 +220,6 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
@@ -236,16 +227,16 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
static void *
H5O_ainfo_copy(const void *_mesg, void *_dest)
{
- const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
- H5O_ainfo_t *dest = (H5O_ainfo_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
+ H5O_ainfo_t * dest = (H5O_ainfo_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(ainfo);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_ainfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ainfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *ainfo;
@@ -257,7 +248,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ainfo_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_size
*
@@ -269,7 +259,6 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
@@ -277,27 +266,29 @@ done:
static size_t
H5O_ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
- size_t ret_value; /* Return value */
+ const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
- ret_value = (size_t)(1 /* Version */
- + 1 /* Index flags */
- + (ainfo->track_corder ? 2 : 0) /* Curr. max. creation order value */
- + H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" attributes */
- + H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of attributes */
- + (ainfo->index_corder ? H5F_SIZEOF_ADDR(f) : 0)); /* Address of v2 B-tree for indexing creation order values of attributes */
+ ret_value =
+ (size_t)(1 /* Version */
+ + 1 /* Index flags */
+ + (ainfo->track_corder ? 2 : 0) /* Curr. max. creation order value */
+ + H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" attributes */
+ + H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of attributes */
+ + (ainfo->index_corder
+ ? H5F_SIZEOF_ADDR(f)
+ : 0)); /* Address of v2 B-tree for indexing creation order values of attributes */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ainfo_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
@@ -318,7 +309,6 @@ H5O_ainfo_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ainfo_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_delete
*
@@ -334,8 +324,8 @@ H5O_ainfo_free(void *mesg)
static herr_t
H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
{
- H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -344,15 +334,14 @@ H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_
HDassert(ainfo);
/* If the object is using "dense" attribute storage, delete it */
- if(H5F_addr_defined(ainfo->fheap_addr))
- if(H5A_dense_delete(f, dxpl_id, ainfo) < 0)
+ if (H5F_addr_defined(ainfo->fheap_addr))
+ if (H5A_dense_delete(f, dxpl_id, ainfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense attribute storage")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ainfo_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_pre_copy_file
*
@@ -369,7 +358,7 @@ done:
*/
static herr_t
H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
+ hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -380,13 +369,12 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
/* If we are not copying attributes into the destination file, indicate
* that this message should be deleted.
*/
- if(cpy_info->copy_without_attr)
+ if (cpy_info->copy_without_attr)
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ainfo_pre_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_copy_file
*
@@ -401,13 +389,13 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata, hid_t dxpl_id)
+H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ unsigned H5_ATTR_UNUSED *mesg_flags, H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata,
+ hid_t dxpl_id)
{
H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src;
H5O_ainfo_t *ainfo_dst = NULL;
- void *ret_value; /* Return value */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -419,16 +407,16 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
HDassert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
- if(NULL == (ainfo_dst = H5FL_MALLOC(H5O_ainfo_t)))
+ if (NULL == (ainfo_dst = H5FL_MALLOC(H5O_ainfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the top level of the information */
*ainfo_dst = *ainfo_src;
- if(H5F_addr_defined(ainfo_src->fheap_addr)) {
+ if (H5F_addr_defined(ainfo_src->fheap_addr)) {
/* copy dense attribute */
- if(H5A_dense_create(file_dst, dxpl_id, ainfo_dst) < 0)
+ if (H5A_dense_create(file_dst, dxpl_id, ainfo_dst) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes")
} /* end if */
@@ -437,13 +425,12 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
done:
/* Release destination attribute information on failure */
- if(!ret_value && ainfo_dst)
+ if (!ret_value && ainfo_dst)
ainfo_dst = H5FL_FREE(H5O_ainfo_t, ainfo_dst);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_ainfo_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_post_copy_file
*
@@ -461,28 +448,25 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
- H5O_loc_t *dst_oloc, void *mesg_dst, unsigned H5_ATTR_UNUSED *mesg_flags,
- hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
+ unsigned H5_ATTR_UNUSED *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
const H5O_ainfo_t *ainfo_src = (const H5O_ainfo_t *)mesg_src;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(ainfo_src);
- if(H5F_addr_defined(ainfo_src->fheap_addr)) {
- if(H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc,
- (H5O_ainfo_t *)mesg_dst, dxpl_id, cpy_info) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute")
- } /* end if */
+ if (H5F_addr_defined(ainfo_src->fheap_addr))
+ if (H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc, (H5O_ainfo_t *)mesg_dst, dxpl_id,
+ cpy_info) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_ainfo_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ainfo_debug
*
@@ -491,16 +475,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ainfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_ainfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *) _mesg;
+ const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -511,22 +494,19 @@ H5O_ainfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of attributes:", ainfo->nattrs);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Track creation order of attributes:", ainfo->track_corder);
+ "Track creation order of attributes:", ainfo->track_corder);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Index creation order of attributes:", ainfo->index_corder);
+ "Index creation order of attributes:", ainfo->index_corder);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
+ "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
+ "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
+ "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
-
+ "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ainfo_debug() */
-
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 25052e7..e4198d5 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Oalloc.c
* Nov 17 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header allocation routines.
*
@@ -26,53 +26,47 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno,
- hbool_t *chk_dirtied, size_t idx, uint8_t *new_gap_loc, size_t new_gap_size);
-static herr_t H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied,
- H5O_mesg_t *mesg, uint8_t *new_gap_loc, size_t new_gap_size);
+static herr_t H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, size_t idx,
+ uint8_t *new_gap_loc, size_t new_gap_size);
+static herr_t H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *new_gap_loc,
+ size_t new_gap_size);
static herr_t H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t null_idx,
- const H5O_msg_class_t *new_type, void *new_native, size_t new_size);
-static htri_t H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- unsigned chunkno, size_t size, size_t *msg_idx);
-static herr_t H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size,
- size_t *new_idx);
+ const H5O_msg_class_t *new_type, void *new_native, size_t new_size);
+static htri_t H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, size_t size,
+ size_t *msg_idx);
+static herr_t H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new_idx);
static htri_t H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u);
static htri_t H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
static htri_t H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
static htri_t H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
-static herr_t H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- unsigned chunkno);
-
+static herr_t H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno);
/*********************/
/* Package Variables */
@@ -81,18 +75,14 @@ static herr_t H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
/* Declare extern the free list for H5O_cont_t's */
H5FL_EXTERN(H5O_cont_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5O_add_gap
*
@@ -101,18 +91,17 @@ H5FL_EXTERN(H5O_cont_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
- size_t idx, uint8_t *new_gap_loc, size_t new_gap_size)
+H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, size_t idx, uint8_t *new_gap_loc,
+ size_t new_gap_size)
{
- hbool_t merged_with_null; /* Whether the gap was merged with a null message */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t merged_with_null; /* Whether the gap was merged with a null message */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -124,74 +113,75 @@ H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
HDassert(new_gap_size);
#ifndef NDEBUG
-if(chunkno > 0) {
- unsigned chk_proxy_status = 0; /* Object header chunk proxy entry cache status */
+ if (chunkno > 0) {
+ unsigned chk_proxy_status = 0; /* Object header chunk proxy entry cache status */
- /* Check the object header chunk proxy's status in the metadata cache */
- if(H5AC_get_entry_status(f, oh->chunk[chunkno].addr, &chk_proxy_status) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check metadata cache status for object header chunk proxy")
+ /* Check the object header chunk proxy's status in the metadata cache */
+ if (H5AC_get_entry_status(f, oh->chunk[chunkno].addr, &chk_proxy_status) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for object header chunk proxy")
- /* Make certain that object header is protected */
- HDassert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
-} /* end if */
+ /* Make certain that object header is protected */
+ HDassert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
+ } /* end if */
#endif /* NDEBUG */
/* Check for existing null message in chunk */
merged_with_null = FALSE;
- for(u = 0; u < oh->nmesgs && !merged_with_null; u++) {
+ for (u = 0; u < oh->nmesgs && !merged_with_null; u++) {
/* Find a null message in the chunk with the new gap */
/* (a null message that's not the one we are eliminating) */
- if(H5O_NULL_ID == oh->mesg[u].type->id && oh->mesg[u].chunkno == chunkno
- && u != idx) {
+ if (H5O_NULL_ID == oh->mesg[u].type->id && oh->mesg[u].chunkno == chunkno && u != idx) {
/* Sanity check - chunks with null messages shouldn't have a gap */
HDassert(oh->chunk[chunkno].gap == 0);
/* Eliminate the gap in the chunk */
- if(H5O_eliminate_gap(oh, chk_dirtied, &oh->mesg[u], new_gap_loc, new_gap_size) < 0)
+ if (H5O_eliminate_gap(oh, chk_dirtied, &oh->mesg[u], new_gap_loc, new_gap_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't eliminate gap in chunk")
/* Set flag to indicate that the gap was handled */
merged_with_null = TRUE;
} /* end if */
- } /* end for */
+ } /* end for */
/* If we couldn't find a null message in the chunk, move the gap to the end */
- if(!merged_with_null) {
+ if (!merged_with_null) {
/* Adjust message offsets after new gap forward in chunk */
- for(u = 0; u < oh->nmesgs; u++)
- if(oh->mesg[u].chunkno == chunkno && oh->mesg[u].raw > new_gap_loc)
+ for (u = 0; u < oh->nmesgs; u++)
+ if (oh->mesg[u].chunkno == chunkno && oh->mesg[u].raw > new_gap_loc)
oh->mesg[u].raw -= new_gap_size;
/* Slide raw message info forward in chunk image */
HDmemmove(new_gap_loc, new_gap_loc + new_gap_size,
- (size_t)((oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh))) - (new_gap_loc + new_gap_size)));
+ (size_t)((oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh))) -
+ (new_gap_loc + new_gap_size)));
/* Add existing gap size to new gap size */
new_gap_size += oh->chunk[chunkno].gap;
/* Merging with existing gap will allow for a new null message */
- if(new_gap_size >= (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
- H5O_mesg_t *null_msg; /* Pointer to new null message */
+ if (new_gap_size >= (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
+ H5O_mesg_t *null_msg; /* Pointer to new null message */
/* Check if we need to extend message table to hold the new null message */
- if(oh->nmesgs >= oh->alloc_nmesgs)
- if(H5O_alloc_msgs(oh, (size_t)1) < 0)
+ if (oh->nmesgs >= oh->alloc_nmesgs)
+ if (H5O_alloc_msgs(oh, (size_t)1) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
/* Increment new gap size */
oh->chunk[chunkno].gap += new_gap_size;
/* Create new null message, with the tail of the previous null message */
- null_msg = &(oh->mesg[oh->nmesgs++]);
- null_msg->type = H5O_MSG_NULL;
- null_msg->native = NULL;
+ null_msg = &(oh->mesg[oh->nmesgs++]);
+ null_msg->type = H5O_MSG_NULL;
+ null_msg->native = NULL;
null_msg->raw_size = new_gap_size - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
- null_msg->raw = (oh->chunk[chunkno].image + oh->chunk[chunkno].size)
- - (H5O_SIZEOF_CHKSUM_OH(oh) + null_msg->raw_size);
+ null_msg->raw = (oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + null_msg->raw_size);
null_msg->chunkno = chunkno;
/* Zero out new null message's raw data */
- if(null_msg->raw_size)
+ if (null_msg->raw_size)
HDmemset(null_msg->raw, 0, null_msg->raw_size);
/* Mark message as dirty */
@@ -211,7 +201,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_add_gap() */
-
/*-------------------------------------------------------------------------
* Function: H5O_eliminate_gap
*
@@ -227,17 +216,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
- uint8_t *gap_loc, size_t gap_size)
+H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *gap_loc, size_t gap_size)
{
- uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
- hbool_t null_before_gap; /* Flag whether the null message is before the gap or not */
+ uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
+ hbool_t null_before_gap; /* Flag whether the null message is before the gap or not */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -253,37 +240,36 @@ H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
null_before_gap = (hbool_t)(mesg->raw < gap_loc);
/* Set up information about region of messages to move */
- if(null_before_gap) {
+ if (null_before_gap) {
move_start = mesg->raw + mesg->raw_size;
- move_end = gap_loc;
+ move_end = gap_loc;
} /* end if */
else {
move_start = gap_loc + gap_size;
- move_end = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
+ move_end = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
} /* end else */
/* Check for messages between null message and gap */
- if(move_end > move_start) {
- unsigned u; /* Local index variable */
+ if (move_end > move_start) {
+ unsigned u; /* Local index variable */
/* Look for messages that need to move, to adjust raw pointers in chunk */
/* (this doesn't change the moved messages 'dirty' state) */
- for(u = 0; u < oh->nmesgs; u++) {
- uint8_t *msg_start; /* Start of encoded message in chunk */
+ for (u = 0; u < oh->nmesgs; u++) {
+ uint8_t *msg_start; /* Start of encoded message in chunk */
msg_start = oh->mesg[u].raw - H5O_SIZEOF_MSGHDR_OH(oh);
- if(oh->mesg[u].chunkno == mesg->chunkno
- && (msg_start >= move_start && msg_start < move_end)) {
+ if (oh->mesg[u].chunkno == mesg->chunkno && (msg_start >= move_start && msg_start < move_end)) {
/* Move message's raw pointer in appropriate direction */
- if(null_before_gap)
+ if (null_before_gap)
oh->mesg[u].raw += gap_size;
else
oh->mesg[u].raw -= gap_size;
} /* end if */
- } /* end for */
+ } /* end for */
/* Slide raw message info in chunk image */
- if(null_before_gap)
+ if (null_before_gap)
/* Slide messages down */
HDmemmove(move_start + gap_size, move_start, (size_t)(move_end - move_start));
else {
@@ -294,12 +280,12 @@ H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
mesg->raw -= gap_size;
} /* end else */
}
- else if(move_end == move_start && !null_before_gap) {
- /* Slide null message up */
- HDmemmove(move_start - gap_size, move_start, mesg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ else if (move_end == move_start && !null_before_gap) {
+ /* Slide null message up */
+ HDmemmove(move_start - gap_size, move_start, mesg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
- /* Adjust start of null message */
- mesg->raw -= gap_size;
+ /* Adjust start of null message */
+ mesg->raw -= gap_size;
} /* end if */
/* Zero out addition to null message */
@@ -312,13 +298,12 @@ H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
oh->chunk[mesg->chunkno].gap = 0;
/* Mark null message as dirty */
- mesg->dirty = TRUE;
+ mesg->dirty = TRUE;
*chk_dirtied = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O_eliminate_gap() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_alloc_null
@@ -328,19 +313,18 @@ H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 22 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t null_idx,
- const H5O_msg_class_t *new_type, void *new_native, size_t new_size)
+H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new_type,
+ void *new_native, size_t new_size)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
- H5O_mesg_t *alloc_msg; /* Pointer to null message to allocate out of */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
+ H5O_mesg_t * alloc_msg; /* Pointer to null message to allocate out of */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -353,29 +337,31 @@ H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t null_idx,
alloc_msg = &oh->mesg[null_idx];
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, alloc_msg->chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, alloc_msg->chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Check if there's a need to split the null message */
- if(alloc_msg->raw_size > new_size) {
+ if (alloc_msg->raw_size > new_size) {
/* Check for producing a gap in the chunk */
- if((alloc_msg->raw_size - new_size) < (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
- size_t gap_size = alloc_msg->raw_size - new_size; /* Size of gap produced */
+ if ((alloc_msg->raw_size - new_size) < (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
+ size_t gap_size = alloc_msg->raw_size - new_size; /* Size of gap produced */
/* Adjust the size of the null message being eliminated */
alloc_msg->raw_size = new_size;
/* Add the gap to the chunk */
- if(H5O_add_gap(f, oh, alloc_msg->chunkno, &chk_dirtied, null_idx, alloc_msg->raw + alloc_msg->raw_size, gap_size) < 0)
+ if (H5O_add_gap(f, oh, alloc_msg->chunkno, &chk_dirtied, null_idx,
+ alloc_msg->raw + alloc_msg->raw_size, gap_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk")
} /* end if */
else {
- size_t new_mesg_size = new_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh); /* Total size of newly allocated message */
- H5O_mesg_t *null_msg; /* Pointer to new null message */
+ size_t new_mesg_size =
+ new_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh); /* Total size of newly allocated message */
+ H5O_mesg_t *null_msg; /* Pointer to new null message */
/* Check if we need to extend message table to hold the new null message */
- if(oh->nmesgs >= oh->alloc_nmesgs) {
- if(H5O_alloc_msgs(oh, (size_t)1) < 0)
+ if (oh->nmesgs >= oh->alloc_nmesgs) {
+ if (H5O_alloc_msgs(oh, (size_t)1) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
/* "Retarget" 'alloc_msg' pointer into newly re-allocated array of messages */
@@ -383,50 +369,50 @@ H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t null_idx,
} /* end if */
/* Create new null message, with the tail of the previous null message */
- null_msg = &(oh->mesg[oh->nmesgs++]);
- null_msg->type = H5O_MSG_NULL;
- null_msg->native = NULL;
- null_msg->raw = alloc_msg->raw + new_mesg_size;
+ null_msg = &(oh->mesg[oh->nmesgs++]);
+ null_msg->type = H5O_MSG_NULL;
+ null_msg->native = NULL;
+ null_msg->raw = alloc_msg->raw + new_mesg_size;
null_msg->raw_size = alloc_msg->raw_size - new_mesg_size;
- null_msg->chunkno = alloc_msg->chunkno;
+ null_msg->chunkno = alloc_msg->chunkno;
/* Mark the message as dirty */
null_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
/* Check for gap in new null message's chunk */
- if(oh->chunk[null_msg->chunkno].gap > 0) {
- unsigned null_chunkno = null_msg->chunkno; /* Chunk w/gap */
+ if (oh->chunk[null_msg->chunkno].gap > 0) {
+ unsigned null_chunkno = null_msg->chunkno; /* Chunk w/gap */
/* Eliminate the gap in the chunk */
- if(H5O_eliminate_gap(oh, &chk_dirtied, null_msg,
- ((oh->chunk[null_chunkno].image + oh->chunk[null_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[null_chunkno].gap)),
- oh->chunk[null_chunkno].gap) < 0)
+ if (H5O_eliminate_gap(oh, &chk_dirtied, null_msg,
+ ((oh->chunk[null_chunkno].image + oh->chunk[null_chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[null_chunkno].gap)),
+ oh->chunk[null_chunkno].gap) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk")
} /* end if */
/* Set the size of the new "real" message */
alloc_msg->raw_size = new_size;
} /* end else */
- } /* end if */
+ } /* end if */
/* Initialize the new message */
- alloc_msg->type = new_type;
+ alloc_msg->type = new_type;
alloc_msg->native = new_native;
/* Mark the new message as dirty */
alloc_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
done:
/* Release chunk */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc_null() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_alloc_msgs
@@ -436,7 +422,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 21 2005
*
*-------------------------------------------------------------------------
@@ -444,10 +429,10 @@ done:
herr_t
H5O_alloc_msgs(H5O_t *oh, size_t min_alloc)
{
- size_t old_alloc; /* Old number of messages allocated */
- size_t na; /* New number of messages allocated */
- H5O_mesg_t *new_mesg; /* Pointer to new message array */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t old_alloc; /* Old number of messages allocated */
+ size_t na; /* New number of messages allocated */
+ H5O_mesg_t *new_mesg; /* Pointer to new message array */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -456,15 +441,15 @@ H5O_alloc_msgs(H5O_t *oh, size_t min_alloc)
/* Initialize number of messages information */
old_alloc = oh->alloc_nmesgs;
- na = oh->alloc_nmesgs + MAX(oh->alloc_nmesgs, min_alloc); /* At least double */
+ na = oh->alloc_nmesgs + MAX(oh->alloc_nmesgs, min_alloc); /* At least double */
/* Attempt to allocate more memory */
- if(NULL == (new_mesg = H5FL_SEQ_REALLOC(H5O_mesg_t, oh->mesg, na)))
+ if (NULL == (new_mesg = H5FL_SEQ_REALLOC(H5O_mesg_t, oh->mesg, na)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Update ohdr information */
oh->alloc_nmesgs = na;
- oh->mesg = new_mesg;
+ oh->mesg = new_mesg;
/* Set new object header info to zeros */
HDmemset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
@@ -473,7 +458,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc_msgs() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_alloc_extend_chunk
@@ -503,23 +487,22 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
- size_t size, size_t *msg_idx)
+H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, size_t size, size_t *msg_idx)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- size_t delta; /* Change in chunk's size */
- size_t aligned_size = H5O_ALIGN_OH(oh, size);
- uint8_t *old_image; /* Old address of chunk's image in memory */
- size_t old_size; /* Old size of chunk */
- htri_t was_extended; /* If chunk can be extended */
- size_t extend_msg; /* Index of null message to extend */
- hbool_t extended_msg = FALSE; /* Whether an existing message was extended */
- uint8_t new_size_flags = 0; /* New chunk #0 size flags */
- hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
- size_t extra_prfx_size = 0; /* Extra bytes added to object header prefix */
- size_t u; /* Local index variable */
- htri_t ret_value = TRUE; /* return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ size_t delta; /* Change in chunk's size */
+ size_t aligned_size = H5O_ALIGN_OH(oh, size);
+ uint8_t * old_image; /* Old address of chunk's image in memory */
+ size_t old_size; /* Old size of chunk */
+ htri_t was_extended; /* If chunk can be extended */
+ size_t extend_msg = 0; /* Index of null message to extend */
+ hbool_t extended_msg = FALSE; /* Whether an existing message was extended */
+ uint8_t new_size_flags = 0; /* New chunk #0 size flags */
+ hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
+ size_t extra_prfx_size = 0; /* Extra bytes added to object header prefix */
+ size_t u; /* Local index variable */
+ htri_t ret_value = TRUE; /* return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -534,22 +517,22 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
/* Test to see if the specified chunk ends with a null messages.
* If successful, set the index of the the null message in extend_msg.
*/
- for(u = 0; u < oh->nmesgs; u++) {
+ for (u = 0; u < oh->nmesgs; u++) {
/* Check for null message at end of proper chunk */
/* (account for possible checksum at end of chunk) */
- if(oh->mesg[u].chunkno == chunkno && H5O_NULL_ID == oh->mesg[u].type->id &&
- ((oh->mesg[u].raw + oh->mesg[u].raw_size)
- == ((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
- (oh->chunk[chunkno].gap + H5O_SIZEOF_CHKSUM_OH(oh))))) {
+ if (oh->mesg[u].chunkno == chunkno && H5O_NULL_ID == oh->mesg[u].type->id &&
+ ((oh->mesg[u].raw + oh->mesg[u].raw_size) ==
+ ((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (oh->chunk[chunkno].gap + H5O_SIZEOF_CHKSUM_OH(oh))))) {
- extend_msg = u;
+ extend_msg = u;
extended_msg = TRUE;
break;
} /* end if */
- } /* end for */
+ } /* end for */
/* If we can extend an existing null message, adjust the delta appropriately */
- if(extended_msg) {
+ if (extended_msg) {
HDassert(oh->chunk[chunkno].gap == 0);
delta = aligned_size - oh->mesg[extend_msg].raw_size;
} /* end if */
@@ -558,119 +541,119 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
delta = H5O_ALIGN_OH(oh, delta);
/* Check for changing the chunk #0 data size enough to need adjusting the flags */
- if(oh->version > H5O_VERSION_1 && chunkno == 0) {
- uint64_t chunk0_size; /* Size of chunk 0's data */
+ if (oh->version > H5O_VERSION_1 && chunkno == 0) {
+ uint64_t chunk0_size; /* Size of chunk 0's data */
size_t orig_prfx_size = (size_t)1 << (oh->flags & H5O_HDR_CHUNK0_SIZE); /* Original prefix size */
HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Check for moving to a 8-byte size encoding */
- if(orig_prfx_size < 8 && (chunk0_size + delta) > 4294967295) {
- extra_prfx_size = 8 - orig_prfx_size;
- new_size_flags = H5O_HDR_CHUNK0_8;
+ if (orig_prfx_size < 8 && (chunk0_size + delta) > 4294967295) {
+ extra_prfx_size = 8 - orig_prfx_size;
+ new_size_flags = H5O_HDR_CHUNK0_8;
adjust_size_flags = TRUE;
} /* end if */
/* Check for moving to a 4-byte size encoding */
- else if(orig_prfx_size < 4 && (chunk0_size + delta) > 65535) {
- extra_prfx_size = 4 - orig_prfx_size;
- new_size_flags = H5O_HDR_CHUNK0_4;
+ else if (orig_prfx_size < 4 && (chunk0_size + delta) > 65535) {
+ extra_prfx_size = 4 - orig_prfx_size;
+ new_size_flags = H5O_HDR_CHUNK0_4;
adjust_size_flags = TRUE;
} /* end if */
/* Check for moving to a 2-byte size encoding */
- else if(orig_prfx_size < 2 && (chunk0_size + delta) > 255) {
- extra_prfx_size = 2 - orig_prfx_size;
- new_size_flags = H5O_HDR_CHUNK0_2;
+ else if (orig_prfx_size < 2 && (chunk0_size + delta) > 255) {
+ extra_prfx_size = 2 - orig_prfx_size;
+ new_size_flags = H5O_HDR_CHUNK0_2;
adjust_size_flags = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Determine whether the chunk can be extended */
was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_OHDR, oh->chunk[chunkno].addr,
- (hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size));
- if(was_extended < 0) /* error */
+ (hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size));
+ if (was_extended < 0) /* error */
HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk")
- else if(was_extended == FALSE) /* can't extend -- we are done */
+ else if (was_extended == FALSE) /* can't extend -- we are done */
HGOTO_DONE(FALSE)
/* Adjust object header prefix flags */
- if(adjust_size_flags) {
+ if (adjust_size_flags) {
oh->flags = (uint8_t)(oh->flags & ~H5O_HDR_CHUNK0_SIZE);
oh->flags |= new_size_flags;
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
/* If we can extend an existing null message, take care of that */
- if(extended_msg) {
+ if (extended_msg) {
/* Adjust message size of existing null message */
oh->mesg[extend_msg].raw_size += delta;
} /* end if */
/* Create new null message for end of chunk */
else {
/* Create a new null message */
- if(oh->nmesgs >= oh->alloc_nmesgs)
- if(H5O_alloc_msgs(oh, (size_t)1) < 0)
+ if (oh->nmesgs >= oh->alloc_nmesgs)
+ if (H5O_alloc_msgs(oh, (size_t)1) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
/* Set extension message */
extend_msg = oh->nmesgs++;
/* Initialize new null message */
- oh->mesg[extend_msg].type = H5O_MSG_NULL;
+ oh->mesg[extend_msg].type = H5O_MSG_NULL;
oh->mesg[extend_msg].native = NULL;
- oh->mesg[extend_msg].raw = ((oh->chunk[chunkno].image + oh->chunk[chunkno].size)
- - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[chunkno].gap))
- + H5O_SIZEOF_MSGHDR_OH(oh);
+ oh->mesg[extend_msg].raw = ((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[chunkno].gap)) +
+ H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[extend_msg].raw_size = (delta + oh->chunk[chunkno].gap) - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
- oh->mesg[extend_msg].chunkno = chunkno;
+ oh->mesg[extend_msg].chunkno = chunkno;
} /* end else */
/* Mark the extended message as dirty */
oh->mesg[extend_msg].dirty = TRUE;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
/* Allocate more memory space for chunk's image */
old_image = oh->chunk[chunkno].image;
- old_size = oh->chunk[chunkno].size;
+ old_size = oh->chunk[chunkno].size;
oh->chunk[chunkno].size += delta + extra_prfx_size;
oh->chunk[chunkno].image = H5FL_BLK_REALLOC(chunk_image, old_image, oh->chunk[chunkno].size);
- oh->chunk[chunkno].gap = 0;
- if(NULL == oh->chunk[chunkno].image)
+ oh->chunk[chunkno].gap = 0;
+ if (NULL == oh->chunk[chunkno].image)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Wipe new space for chunk */
HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
/* Move chunk 0 data up if the size flags changed */
- if(adjust_size_flags)
+ if (adjust_size_flags)
HDmemmove(oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh),
- oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) - extra_prfx_size,
- old_size - (size_t)H5O_SIZEOF_HDR(oh) + extra_prfx_size);
+ oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) - extra_prfx_size,
+ old_size - (size_t)H5O_SIZEOF_HDR(oh) + extra_prfx_size);
/* Spin through existing messages, adjusting them */
- for(u = 0; u < oh->nmesgs; u++) {
+ for (u = 0; u < oh->nmesgs; u++) {
/* Adjust raw addresses for messages in this chunk to reflect new 'image' address */
- if(oh->mesg[u].chunkno == chunkno)
+ if (oh->mesg[u].chunkno == chunkno)
oh->mesg[u].raw = oh->chunk[chunkno].image + extra_prfx_size + (oh->mesg[u].raw - old_image);
/* Find continuation message which points to this chunk and adjust chunk's size */
- /* (Chunk 0 doesn't have a continuation message that points to it and
- * it's size is directly encoded in the object header) */
- if(chunkno > 0 && (H5O_CONT_ID == oh->mesg[u].type->id) &&
- (((H5O_cont_t *)(oh->mesg[u].native))->chunkno == chunkno)) {
- H5O_chunk_proxy_t *chk_proxy2 = NULL; /* Chunk that continuation message is in */
- hbool_t chk_dirtied2 = FALSE; /* Flag for unprotecting chunk */
- unsigned cont_chunkno = oh->mesg[u].chunkno; /* Chunk # for continuation message */
+ /* (Chunk 0 doesn't have a continuation message that points to it,
+ * its size is directly encoded in the object header) */
+ if (chunkno > 0 && (H5O_CONT_ID == oh->mesg[u].type->id) &&
+ (((H5O_cont_t *)(oh->mesg[u].native))->chunkno == chunkno)) {
+ H5O_chunk_proxy_t *chk_proxy2 = NULL; /* Chunk that continuation message is in */
+ hbool_t chk_dirtied2 = FALSE; /* Flag for unprotecting chunk */
+ unsigned cont_chunkno = oh->mesg[u].chunkno; /* Chunk # for continuation message */
/* Protect chunk containing continuation message */
- if(NULL == (chk_proxy2 = H5O_chunk_protect(f, dxpl_id, oh, cont_chunkno)))
+ if (NULL == (chk_proxy2 = H5O_chunk_protect(f, dxpl_id, oh, cont_chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Adjust size in continuation message */
@@ -679,16 +662,16 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
/* Flag continuation message as dirty */
oh->mesg[u].dirty = TRUE;
- chk_dirtied2 = TRUE;
+ chk_dirtied2 = TRUE;
/* Release chunk containing continuation message */
- if(H5O_chunk_unprotect(f, dxpl_id, chk_proxy2, chk_dirtied2) < 0)
+ if (H5O_chunk_unprotect(f, dxpl_id, chk_proxy2, chk_dirtied2) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
} /* end if */
- } /* end for */
+ } /* end for */
/* Resize the chunk in the cache */
- if(H5O_chunk_resize(oh, chk_proxy) < 0)
+ if (H5O_chunk_resize(oh, chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk")
/* Set new message index */
@@ -696,13 +679,12 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
done:
/* Release chunk */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc_extend_chunk() */
-
/*-------------------------------------------------------------------------
* Function: H5O_alloc_new_chunk
*
@@ -733,7 +715,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 7 1997
*
*-------------------------------------------------------------------------
@@ -743,27 +724,27 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
{
/* Struct for storing information about "best" messages to allocate from */
typedef struct {
- int msgno; /* Index in message array */
- size_t gap_size; /* Size of any "gap" in the chunk immediately after message */
- size_t null_size; /* Size of any null message in the chunk immediately after message */
- size_t total_size; /* Total size of "available" space around message */
- unsigned null_msgno; /* Message index of null message immediately after message */
+ int msgno; /* Index in message array */
+ size_t gap_size; /* Size of any "gap" in the chunk immediately after message */
+ size_t null_size; /* Size of any null message in the chunk immediately after message */
+ size_t total_size; /* Total size of "available" space around message */
+ unsigned null_msgno; /* Message index of null message immediately after message */
} alloc_info;
- H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
- H5O_chunk_proxy_t *chk_proxy; /* Chunk that message is in */
- size_t cont_size; /*continuation message size */
- size_t multi_size = 0; /* Size of all the messages in the last chunk */
- int found_null = (-1); /* Best fit null message */
- alloc_info found_attr = {-1, 0, 0, 0, 0}; /* Best fit attribute message */
- alloc_info found_other = {-1, 0, 0, 0, 0}; /* Best fit other message */
- size_t idx; /* Message number */
- uint8_t *p = NULL; /*ptr into new chunk */
- H5O_cont_t *cont = NULL; /*native continuation message */
- size_t chunkno; /* Chunk allocated */
- haddr_t new_chunk_addr;
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_mesg_t * curr_msg; /* Pointer to current message to operate on */
+ H5O_chunk_proxy_t *chk_proxy; /* Chunk that message is in */
+ size_t cont_size; /*continuation message size */
+ size_t multi_size = 0; /* Size of all the messages in the last chunk */
+ int found_null = (-1); /* Best fit null message */
+ alloc_info found_attr = {-1, 0, 0, 0, 0}; /* Best fit attribute message */
+ alloc_info found_other = {-1, 0, 0, 0, 0}; /* Best fit other message */
+ size_t idx; /* Message number */
+ uint8_t * p = NULL; /*ptr into new chunk */
+ H5O_cont_t * cont = NULL; /*native continuation message */
+ size_t chunkno; /* Chunk allocated */
+ haddr_t new_chunk_addr;
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -784,83 +765,87 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
*
*/
cont_size = H5O_ALIGN_OH(oh, (size_t)(H5F_SIZEOF_ADDR(f) + H5F_SIZEOF_SIZE(f)));
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- if(curr_msg->type->id == H5O_NULL_ID) {
- if(cont_size == curr_msg->raw_size) {
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ if (curr_msg->type->id == H5O_NULL_ID) {
+ if (cont_size == curr_msg->raw_size) {
found_null = (int)u;
break;
- } /* end if */
- else if(curr_msg->raw_size > cont_size &&
- (found_null < 0 || curr_msg->raw_size < oh->mesg[found_null].raw_size))
+ } /* end if */
+ else if (curr_msg->raw_size > cont_size &&
+ (found_null < 0 || curr_msg->raw_size < oh->mesg[found_null].raw_size))
found_null = (int)u;
} /* end if */
- else if(curr_msg->type->id == H5O_CONT_ID) {
+ else if (curr_msg->type->id == H5O_CONT_ID) {
/* Don't consider continuation messages (for now) */
} /* end if */
- else if(curr_msg->locked) {
+ else if (curr_msg->locked) {
/* Don't consider locked messages */
} /* end if */
else {
- unsigned msg_chunkno = curr_msg->chunkno; /* Chunk that the message is in */
- uint8_t *end_chunk_data = (oh->chunk[msg_chunkno].image + oh->chunk[msg_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[msg_chunkno].gap); /* End of message data in chunk */
- uint8_t *end_msg = curr_msg->raw + curr_msg->raw_size; /* End of current message */
- size_t gap_size = 0; /* Size of gap after current message */
- size_t null_size = 0; /* Size of NULL message after current message */
- unsigned null_msgno = 0; /* Index of NULL message after current message */
- size_t total_size; /* Total size of available space "around" current message */
+ unsigned msg_chunkno = curr_msg->chunkno; /* Chunk that the message is in */
+ uint8_t *end_chunk_data =
+ (oh->chunk[msg_chunkno].image + oh->chunk[msg_chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[msg_chunkno].gap); /* End of message data in chunk */
+ uint8_t *end_msg = curr_msg->raw + curr_msg->raw_size; /* End of current message */
+ size_t gap_size = 0; /* Size of gap after current message */
+ size_t null_size = 0; /* Size of NULL message after current message */
+ unsigned null_msgno = 0; /* Index of NULL message after current message */
+ size_t total_size; /* Total size of available space "around" current message */
/* Check if the message is the last one in the chunk */
- if(end_msg == end_chunk_data)
+ if (end_msg == end_chunk_data)
gap_size = oh->chunk[msg_chunkno].gap;
else {
- H5O_mesg_t *tmp_msg; /* Temp. pointer to message to operate on */
- unsigned v; /* Local index variable */
+ H5O_mesg_t *tmp_msg; /* Temp. pointer to message to operate on */
+ unsigned v; /* Local index variable */
/* Check for null message after this message, in same chunk */
- for(v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
- if(tmp_msg->type->id == H5O_NULL_ID && (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) == end_msg) {
+ for (v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
+ if (tmp_msg->type->id == H5O_NULL_ID &&
+ (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) == end_msg) {
null_msgno = v;
- null_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + tmp_msg->raw_size;
+ null_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + tmp_msg->raw_size;
break;
} /* end if */
/* XXX: Should also check for NULL message in front of current message... */
} /* end for */
- } /* end else */
+ } /* end else */
/* Add up current message's total available space */
total_size = curr_msg->raw_size + gap_size + null_size;
/* Check if message is large enough to hold continuation info */
- if(total_size >= cont_size) {
- if(curr_msg->type->id == H5O_ATTR_ID) {
- if(found_attr.msgno < 0 || total_size < found_attr.total_size) {
- found_attr.msgno = (int)u;
- found_attr.gap_size = gap_size;
- found_attr.null_size = null_size;
+ if (total_size >= cont_size) {
+ if (curr_msg->type->id == H5O_ATTR_ID) {
+ if (found_attr.msgno < 0 || total_size < found_attr.total_size) {
+ found_attr.msgno = (int)u;
+ found_attr.gap_size = gap_size;
+ found_attr.null_size = null_size;
found_attr.total_size = total_size;
found_attr.null_msgno = null_msgno;
} /* end if */
- } /* end if */
+ } /* end if */
else {
- if(found_other.msgno < 0 || total_size < found_other.total_size) {
- found_other.msgno = (int)u;
- found_other.gap_size = gap_size;
- found_other.null_size = null_size;
+ if (found_other.msgno < 0 || total_size < found_other.total_size) {
+ found_other.msgno = (int)u;
+ found_other.gap_size = gap_size;
+ found_other.null_size = null_size;
found_other.total_size = total_size;
found_other.null_msgno = null_msgno;
} /* end if */
- } /* end else */
- } /* end if */
- else if(found_null < 0 && found_attr.msgno < 0 && found_other.msgno < 0 && msg_chunkno == oh->nchunks - 1)
+ } /* end else */
+ } /* end if */
+ else if (found_null < 0 && found_attr.msgno < 0 && found_other.msgno < 0 &&
+ msg_chunkno == oh->nchunks - 1)
/* Keep track of the total size of smaller messages in the last
* chunk, in case we need to move more than 1 message.
*/
multi_size += curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
} /* end else */
- } /* end for */
- if(found_null >= 0 || found_attr.msgno >= 0 || found_other.msgno >= 0)
+ } /* end for */
+ if (found_null >= 0 || found_attr.msgno >= 0 || found_other.msgno >= 0)
multi_size = 0;
/*
@@ -873,22 +858,22 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
* If all else fails, move every message in the last chunk.
*
*/
- if(multi_size == 0) {
- if(found_null < 0) {
- if(found_other.msgno < 0)
+ if (multi_size == 0) {
+ if (found_null < 0) {
+ if (found_other.msgno < 0)
found_other = found_attr;
HDassert(found_other.msgno >= 0);
size += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[found_other.msgno].raw_size;
} /* end if */
- } /* end if */
+ } /* end if */
else
size += multi_size;
/*
* The total chunk size must include the requested space plus enough
* for the message header. This must be at least some minimum and
- * aligned propertly.
+ * aligned properly.
*/
size = MAX(H5O_MIN_SIZE, size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
HDassert(size == H5O_ALIGN_OH(oh, size));
@@ -898,37 +883,35 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
* on the chunk and the continuation chunk magic #. (which are only present
* in later versions of the object header)
*/
- size += H5O_SIZEOF_CHKHDR_OH(oh);
+ size += H5O_SIZEOF_CHKHDR_OH(oh);
/* allocate space in file to hold the new chunk */
new_chunk_addr = H5MF_alloc(f, H5FD_MEM_OHDR, dxpl_id, (hsize_t)size);
- if(HADDR_UNDEF == new_chunk_addr)
+ if (HADDR_UNDEF == new_chunk_addr)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate space for new chunk")
- /*
- * Create the new chunk giving it a file address.
- */
- if(oh->nchunks >= oh->alloc_nchunks) {
- size_t na = MAX(H5O_NCHUNKS, oh->alloc_nchunks * 2); /* Double # of chunks allocated */
+ /* Create the new chunk giving it a file address. */
+ if (oh->nchunks >= oh->alloc_nchunks) {
+ size_t na = MAX(H5O_NCHUNKS, oh->alloc_nchunks * 2); /* Double # of chunks allocated */
H5O_chunk_t *x;
- if(NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na)))
+ if (NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
oh->alloc_nchunks = na;
- oh->chunk = x;
+ oh->chunk = x;
} /* end if */
- chunkno = oh->nchunks++;
+ chunkno = oh->nchunks++;
oh->chunk[chunkno].addr = new_chunk_addr;
oh->chunk[chunkno].size = size;
- oh->chunk[chunkno].gap = 0;
- if(NULL == (oh->chunk[chunkno].image = p = H5FL_BLK_CALLOC(chunk_image, size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ oh->chunk[chunkno].gap = 0;
+ if (NULL == (oh->chunk[chunkno].image = p = H5FL_BLK_CALLOC(chunk_image, size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* If this is a later version of the object header format, put the magic
* # at the beginning of the chunk image.
*/
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
HDmemcpy(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
p += H5_SIZEOF_MAGIC;
} /* end if */
@@ -937,58 +920,59 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
* Make sure we have enough space for all possible new messages
* that could be generated below.
*/
- if(oh->nmesgs + 3 > oh->alloc_nmesgs)
- if(H5O_alloc_msgs(oh, (size_t)3) < 0)
+ if (oh->nmesgs + 3 > oh->alloc_nmesgs)
+ if (H5O_alloc_msgs(oh, (size_t)3) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
/* Check if we need to move multiple messages, in order to make room for the new message */
- if(multi_size > 0) {
+ if (multi_size > 0) {
/* Move all non-null messages in the last chunk to the new chunk. This
* should be extremely rare so we don't care too much about minimizing
* the space used.
*/
- H5O_mesg_t *null_msg; /* Pointer to new null message */
+ H5O_mesg_t *null_msg; /* Pointer to new null message */
/* Protect last chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno - 1)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno - 1)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Copy each message to the new location */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
- if(curr_msg->chunkno == chunkno - 1) {
- if(curr_msg->type->id == H5O_NULL_ID) {
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
+ if (curr_msg->chunkno == chunkno - 1) {
+ if (curr_msg->type->id == H5O_NULL_ID) {
/* Delete the null message */
- if(u < oh->nmesgs - 1)
+ if (u < oh->nmesgs - 1)
HDmemmove(curr_msg, curr_msg + 1, ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end if */
else {
/* Copy the raw data */
HDmemcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
- curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Update the message info */
curr_msg->chunkno = chunkno;
- curr_msg->raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
+ curr_msg->raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
/* Account for copied message in new chunk */
p += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size;
size -= (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size;
} /* end else */
- } /* end if */
+ } /* end if */
/* Create a null message spanning the entire last chunk */
- found_null = (int)oh->nmesgs++;
- null_msg = &(oh->mesg[found_null]);
- null_msg->type = H5O_MSG_NULL;
- null_msg->dirty = TRUE;
+ found_null = (int)oh->nmesgs++;
+ null_msg = &(oh->mesg[found_null]);
+ null_msg->type = H5O_MSG_NULL;
+ null_msg->dirty = TRUE;
null_msg->native = NULL;
- null_msg->raw = oh->chunk[chunkno - 1].image
- + ((chunkno == 1) ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh))
- - H5O_SIZEOF_CHKSUM_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh);
- null_msg->raw_size = oh->chunk[chunkno - 1].size
- - ((chunkno == 1) ? (size_t)H5O_SIZEOF_HDR(oh) : (size_t)H5O_SIZEOF_CHKHDR_OH(oh))
- - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
+ null_msg->raw = oh->chunk[chunkno - 1].image +
+ ((chunkno == 1) ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh)) -
+ H5O_SIZEOF_CHKSUM_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh);
+ null_msg->raw_size =
+ oh->chunk[chunkno - 1].size -
+ ((chunkno == 1) ? (size_t)H5O_SIZEOF_HDR(oh) : (size_t)H5O_SIZEOF_CHKHDR_OH(oh)) -
+ (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
null_msg->chunkno = chunkno - 1;
HDassert(null_msg->raw_size >= cont_size);
@@ -997,33 +981,34 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
oh->chunk[chunkno - 1].gap = 0;
/* Release chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
+ if (H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
- } else if(found_null < 0) {
+ }
+ else if (found_null < 0) {
/* Move message (that will be replaced with continuation message)
* to new chunk, if necessary.
*/
- H5O_mesg_t *null_msg; /* Pointer to new null message */
+ H5O_mesg_t *null_msg; /* Pointer to new null message */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, oh->mesg[found_other.msgno].chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, oh->mesg[found_other.msgno].chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Create null message for space that message to copy currently occupies */
- found_null = (int)oh->nmesgs++;
- null_msg = &(oh->mesg[found_null]);
- null_msg->type = H5O_MSG_NULL;
- null_msg->native = NULL;
- null_msg->raw = oh->mesg[found_other.msgno].raw;
+ found_null = (int)oh->nmesgs++;
+ null_msg = &(oh->mesg[found_null]);
+ null_msg->type = H5O_MSG_NULL;
+ null_msg->native = NULL;
+ null_msg->raw = oh->mesg[found_other.msgno].raw;
null_msg->raw_size = oh->mesg[found_other.msgno].raw_size;
- null_msg->chunkno = oh->mesg[found_other.msgno].chunkno;
+ null_msg->chunkno = oh->mesg[found_other.msgno].chunkno;
/* Copy the message to move (& its prefix) to its new location */
HDmemcpy(p, oh->mesg[found_other.msgno].raw - H5O_SIZEOF_MSGHDR_OH(oh),
oh->mesg[found_other.msgno].raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Switch moved message to point to new location */
- oh->mesg[found_other.msgno].raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
+ oh->mesg[found_other.msgno].raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[found_other.msgno].chunkno = chunkno;
/* Account for copied message in new chunk */
@@ -1031,14 +1016,15 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
size -= (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[found_other.msgno].raw_size;
/* Add any available space after the message to move to the new null message */
- if(found_other.gap_size > 0) {
+ if (found_other.gap_size > 0) {
/* Absorb a gap after the moved message */
HDassert(oh->chunk[null_msg->chunkno].gap == found_other.gap_size);
null_msg->raw_size += found_other.gap_size;
oh->chunk[null_msg->chunkno].gap = 0;
} /* end if */
- else if(found_other.null_size > 0) {
- H5O_mesg_t *old_null_msg = &oh->mesg[found_other.null_msgno]; /* Pointer to NULL message to eliminate */
+ else if (found_other.null_size > 0) {
+ H5O_mesg_t *old_null_msg =
+ &oh->mesg[found_other.null_msgno]; /* Pointer to NULL message to eliminate */
/* Absorb a null message after the moved message */
HDassert((null_msg->raw + null_msg->raw_size) == (old_null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)));
@@ -1048,8 +1034,9 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
H5O_msg_free_mesg(old_null_msg);
/* Remove null message from list of messages */
- if(found_other.null_msgno < (oh->nmesgs - 1))
- HDmemmove(old_null_msg, old_null_msg + 1, ((oh->nmesgs - 1) - found_other.null_msgno) * sizeof(H5O_mesg_t));
+ if (found_other.null_msgno < (oh->nmesgs - 1))
+ HDmemmove(old_null_msg, old_null_msg + 1,
+ ((oh->nmesgs - 1) - found_other.null_msgno) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
@@ -1063,34 +1050,34 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
null_msg->dirty = TRUE;
/* Release chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
+ if (H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
} /* end if */
HDassert(found_null >= 0);
/* Create null message for [rest of] space in new chunk */
/* (account for chunk's magic # & checksum) */
- idx = oh->nmesgs++;
- oh->mesg[idx].type = H5O_MSG_NULL;
- oh->mesg[idx].dirty = TRUE;
- oh->mesg[idx].native = NULL;
- oh->mesg[idx].raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
+ idx = oh->nmesgs++;
+ oh->mesg[idx].type = H5O_MSG_NULL;
+ oh->mesg[idx].dirty = TRUE;
+ oh->mesg[idx].native = NULL;
+ oh->mesg[idx].raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[idx].raw_size = size - (size_t)(H5O_SIZEOF_CHKHDR_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh));
- oh->mesg[idx].chunkno = chunkno;
+ oh->mesg[idx].chunkno = chunkno;
/* Insert the new chunk into the cache */
- if(H5O_chunk_add(f, dxpl_id, oh, chunkno) < 0)
+ if (H5O_chunk_add(f, dxpl_id, oh, chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't add new chunk to cache")
/* Initialize the continuation information */
- if(NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
+ if (NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- cont->addr = oh->chunk[chunkno].addr;
- cont->size = oh->chunk[chunkno].size;
+ cont->addr = oh->chunk[chunkno].addr;
+ cont->size = oh->chunk[chunkno].size;
cont->chunkno = chunkno;
/* Split the null message and point at continuation message */
- if(H5O_alloc_null(f, dxpl_id, oh, (size_t)found_null, H5O_MSG_CONT, cont, cont_size) < 0)
+ if (H5O_alloc_null(f, dxpl_id, oh, (size_t)found_null, H5O_MSG_CONT, cont, cont_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message")
/* Set new message index value */
@@ -1100,7 +1087,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc_new_chunk() */
-
/*-------------------------------------------------------------------------
* Function: H5O_alloc
*
@@ -1110,14 +1096,12 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
- const void *mesg, size_t *mesg_idx)
+H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, size_t *mesg_idx)
{
size_t raw_size; /* Raw size of message */
size_t aligned_size; /* Size of message including alignment */
@@ -1134,20 +1118,20 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
/* Compute the size needed to store the message in the object header */
raw_size = (type->raw_size)(f, FALSE, mesg);
- if(0 == raw_size)
+ if (0 == raw_size)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "can't compute object header message size")
- if(raw_size >= H5O_MESG_MAX_SIZE)
+ if (raw_size >= H5O_MESG_MAX_SIZE)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "object header message is too large")
aligned_size = H5O_ALIGN_OH(oh, raw_size);
/* look for a null message which is large enough */
- for(idx = 0; idx < oh->nmesgs; idx++)
- if(H5O_NULL_ID == oh->mesg[idx].type->id && oh->mesg[idx].raw_size >= aligned_size)
+ for (idx = 0; idx < oh->nmesgs; idx++)
+ if (H5O_NULL_ID == oh->mesg[idx].type->id && oh->mesg[idx].raw_size >= aligned_size)
break;
/* if we didn't find one, then allocate more header space */
- if(idx >= oh->nmesgs) {
- unsigned chunkno;
+ if (idx >= oh->nmesgs) {
+ unsigned chunkno;
/* check to see if we can extend one of the chunks. If we can,
* do so. Otherwise, we will have to allocate a new chunk.
@@ -1155,28 +1139,28 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
* Note that in this new version of this function, all chunks
* must have file space allocated to them.
*/
- for(chunkno = 0; chunkno < oh->nchunks; chunkno++) {
- htri_t tri_result; /* Status from attempting to extend chunk */
+ for (chunkno = 0; chunkno < oh->nchunks; chunkno++) {
+ htri_t tri_result; /* Status from attempting to extend chunk */
- if((tri_result = H5O_alloc_extend_chunk(f, dxpl_id, oh, chunkno, raw_size, &idx)) < 0)
+ if ((tri_result = H5O_alloc_extend_chunk(f, dxpl_id, oh, chunkno, raw_size, &idx)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "H5O_alloc_extend_chunk failed unexpectedly")
- if(tri_result == TRUE)
- break;
+ if (tri_result == TRUE)
+ break;
} /* end for */
/* If we were not able to extend a chunk, create a new one */
- if(idx >= oh->nmesgs)
- if(H5O_alloc_new_chunk(f, dxpl_id, oh, raw_size, &idx) < 0)
+ if (idx >= oh->nmesgs)
+ if (H5O_alloc_new_chunk(f, dxpl_id, oh, raw_size, &idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create a new object header data chunk")
} /* end if */
HDassert(idx < oh->nmesgs);
/* Split the null message and point at continuation message */
- if(H5O_alloc_null(f, dxpl_id, oh, idx, type, NULL, aligned_size) < 0)
+ if (H5O_alloc_null(f, dxpl_id, oh, idx, type, NULL, aligned_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message")
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
/* Set message index value */
@@ -1186,7 +1170,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_release_mesg
@@ -1196,18 +1179,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 22 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg,
- hbool_t adj_link)
+H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1217,22 +1198,24 @@ H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg,
HDassert(mesg);
/* Check if we should operate on the message */
- if(adj_link) {
+ if (adj_link) {
/* Free any space referred to in the file from this message */
- if(H5O_delete_mesg(f, dxpl_id, oh, mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message")
+ if (H5O_delete_mesg(f, dxpl_id, oh, mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL,
+ "unable to delete file space for object header message")
} /* end if */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, mesg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, mesg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Free any native information */
H5O_msg_free_mesg(mesg);
/* Change message type to nil and zero it */
mesg->type = H5O_MSG_NULL;
- HDassert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
+ HDassert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
HDmemset(mesg->raw, 0, mesg->raw_size);
/* Clear message flags */
@@ -1243,23 +1226,23 @@ H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg,
chk_dirtied = TRUE;
/* Check if chunk has a gap currently */
- if(oh->chunk[mesg->chunkno].gap) {
+ if (oh->chunk[mesg->chunkno].gap) {
/* Eliminate the gap in the chunk */
- if(H5O_eliminate_gap(oh, &chk_dirtied, mesg,
- ((oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap)),
- oh->chunk[mesg->chunkno].gap) < 0)
+ if (H5O_eliminate_gap(oh, &chk_dirtied, mesg,
+ ((oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap)),
+ oh->chunk[mesg->chunkno].gap) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk")
} /* end if */
done:
/* Release chunk, if not already done */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_release_mesg() */
-
/*-------------------------------------------------------------------------
* Function: H5O_move_cont
*
@@ -1276,11 +1259,11 @@ done:
static htri_t
H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that continuation message is in */
- H5O_mesg_t *cont_msg; /* Pointer to the continuation message */
- unsigned deleted_chunkno; /* Chunk # to delete */
- hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
- htri_t ret_value = TRUE; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that continuation message is in */
+ H5O_mesg_t * cont_msg; /* Pointer to the continuation message */
+ unsigned deleted_chunkno; /* Chunk # to delete */
+ hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1294,29 +1277,29 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
deleted_chunkno = ((H5O_cont_t *)(cont_msg->native))->chunkno;
/* Check if continuation message is pointing to the last chunk */
- if(deleted_chunkno == (oh->nchunks - 1)) {
- size_t nonnull_size; /* Total size of nonnull messages in the chunk pointed to by cont message */
- H5O_mesg_t *curr_msg; /* Pointer to the current message to operate on */
- size_t gap_size; /* Size of gap produced */
- size_t v; /* Local index variable */
+ if (deleted_chunkno == (oh->nchunks - 1)) {
+ size_t nonnull_size; /* Total size of nonnull messages in the chunk pointed to by cont message */
+ H5O_mesg_t *curr_msg; /* Pointer to the current message to operate on */
+ size_t gap_size; /* Size of gap produced */
+ size_t v; /* Local index variable */
/* Spin through messages */
nonnull_size = 0;
- for(v = 0, curr_msg = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg++) {
- if(curr_msg->chunkno == deleted_chunkno) {
+ for (v = 0, curr_msg = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg++) {
+ if (curr_msg->chunkno == deleted_chunkno) {
/* If there's a locked message, we can't move all messages out of
* chunk to delete, so get out now.
*/
- if(curr_msg->locked)
+ if (curr_msg->locked)
HGOTO_DONE(FALSE)
/* Find size of all non-null messages in the chunk pointed to by the continuation message */
- if(curr_msg->type->id != H5O_NULL_ID) {
+ if (curr_msg->type->id != H5O_NULL_ID) {
HDassert(curr_msg->type->id != H5O_CONT_ID);
nonnull_size += curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
} /* end if */
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
/* Size of gap in chunk w/continuation message */
gap_size = oh->chunk[cont_msg->chunkno].gap;
@@ -1325,48 +1308,49 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
/* (Could count any null messages in the chunk w/the continuation
* message also, but that is pretty complex. -QAK)
*/
- if(nonnull_size && nonnull_size <= (gap_size + cont_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh))) {
- uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
- unsigned cont_chunkno; /* Chunk number for continuation message */
+ if (nonnull_size &&
+ nonnull_size <= (gap_size + cont_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh))) {
+ uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
+ unsigned cont_chunkno; /* Chunk number for continuation message */
/* Get continuation info */
- move_start = cont_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
- move_end = cont_msg->raw + cont_msg->raw_size;
+ move_start = cont_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
+ move_end = cont_msg->raw + cont_msg->raw_size;
cont_chunkno = cont_msg->chunkno;
/* Convert continuation message into a null message. Do not delete
* the target chunk yet, so we can still copy messages from it. */
- if(H5O_release_mesg(f, dxpl_id, oh, cont_msg, FALSE) < 0)
+ if (H5O_release_mesg(f, dxpl_id, oh, cont_msg, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message")
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, cont_chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, cont_chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Move message(s) forward into continuation message */
- for(v = 0, curr_msg = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg++)
+ for (v = 0, curr_msg = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg++)
/* Look for messages in chunk to delete */
- if(curr_msg->chunkno == deleted_chunkno) {
+ if (curr_msg->chunkno == deleted_chunkno) {
/* Move messages out of chunk to delete */
- if(curr_msg->type->id != H5O_NULL_ID) {
- size_t move_size; /* Size of the message to be moved */
+ if (curr_msg->type->id != H5O_NULL_ID) {
+ size_t move_size; /* Size of the message to be moved */
/* Compute size of message to move */
move_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
/* Move message out of deleted chunk */
HDmemcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
- curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
+ curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
curr_msg->chunkno = cont_chunkno;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
/* Adjust location to move messages to */
move_start += move_size;
} /* end else */
- } /* end if */
+ } /* end if */
/* Delete the target chunk */
- if(H5O_chunk_delete(f, dxpl_id, oh, deleted_chunkno) < 0)
+ if (H5O_chunk_delete(f, dxpl_id, oh, deleted_chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache")
HDassert(move_start <= (move_end + gap_size));
@@ -1374,65 +1358,66 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
/* Check if there is space remaining in the continuation message */
/* (The remaining space can be gap or a null message) */
gap_size += (size_t)(move_end - move_start);
- if(gap_size >= (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
+ if (gap_size >= (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
/* Adjust size of null (was continuation) message */
cont_msg->raw_size = gap_size - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
- cont_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
- cont_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ cont_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
+ cont_msg->dirty = TRUE;
+ chk_dirtied = TRUE;
} /* end if */
else {
/* Check if there is space that should be a gap */
- if(gap_size > 0) {
+ if (gap_size > 0) {
/* Convert remnant into gap in chunk */
- if(H5O_add_gap(f, oh, cont_chunkno, &chk_dirtied, cont_u, move_start, gap_size) < 0)
+ if (H5O_add_gap(f, oh, cont_chunkno, &chk_dirtied, cont_u, move_start, gap_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk")
} /* end if */
/* Release any information/memory for continuation message */
H5O_msg_free_mesg(cont_msg);
- if(cont_u < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[cont_u], &oh->mesg[cont_u + 1], ((oh->nmesgs - 1) - cont_u) * sizeof(H5O_mesg_t));
+ if (cont_u < (oh->nmesgs - 1))
+ HDmemmove(&oh->mesg[cont_u], &oh->mesg[cont_u + 1],
+ ((oh->nmesgs - 1) - cont_u) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end else */
/* Move message(s) forward into continuation message */
/* Note: unsigned v wrapping around at the end */
- for(v = oh->nmesgs - 1, curr_msg = &oh->mesg[v]; v < oh->nmesgs; v--, curr_msg--)
+ for (v = oh->nmesgs - 1, curr_msg = &oh->mesg[v]; v < oh->nmesgs; v--, curr_msg--)
/* Look for messages in chunk to delete */
- if(curr_msg->chunkno == deleted_chunkno) {
+ if (curr_msg->chunkno == deleted_chunkno) {
/* Remove all null messages in deleted chunk from list of messages */
- if(curr_msg->type->id == H5O_NULL_ID) {
+ if (curr_msg->type->id == H5O_NULL_ID) {
/* Release any information/memory for message */
H5O_msg_free_mesg(curr_msg);
chk_dirtied = TRUE;
/* Remove from message list */
- if(v < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[v], &oh->mesg[v + 1], ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
+ if (v < (oh->nmesgs - 1))
+ HDmemmove(&oh->mesg[v], &oh->mesg[v + 1],
+ ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end if */
- } /* end if */
+ } /* end if */
/* Remove chunk from list of chunks */
oh->chunk[deleted_chunkno].image = H5FL_BLK_FREE(chunk_image, oh->chunk[deleted_chunkno].image);
oh->nchunks--;
- } /* end if */
+ } /* end if */
else
ret_value = FALSE;
- } /* end if */
+ } /* end if */
else
ret_value = FALSE;
done:
/* Release chunk, if not already done */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_move_cont() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_move_msgs_forward
@@ -1442,7 +1427,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 17 2005
*
*-------------------------------------------------------------------------
@@ -1450,13 +1434,13 @@ done:
static htri_t
H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
{
- H5O_chunk_proxy_t *null_chk_proxy = NULL; /* Chunk that null message is in */
- H5O_chunk_proxy_t *curr_chk_proxy = NULL; /* Chunk that message is in */
- hbool_t null_chk_dirtied = FALSE; /* Flags for unprotecting null chunk */
- hbool_t curr_chk_dirtied = FALSE; /* Flags for unprotecting curr chunk */
- hbool_t packed_msg; /* Flag to indicate that messages were packed */
- hbool_t did_packing = FALSE; /* Whether any messages were packed */
- htri_t ret_value; /* Return value */
+ H5O_chunk_proxy_t *null_chk_proxy = NULL; /* Chunk that null message is in */
+ H5O_chunk_proxy_t *curr_chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t null_chk_dirtied = FALSE; /* Flags for unprotecting null chunk */
+ hbool_t curr_chk_dirtied = FALSE; /* Flags for unprotecting curr chunk */
+ hbool_t packed_msg; /* Flag to indicate that messages were packed */
+ hbool_t did_packing = FALSE; /* Whether any messages were packed */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1468,54 +1452,60 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
* add a list of messages to each chunk -QAK)
*/
do {
- H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
- unsigned u; /* Local index variable */
+ H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
+ unsigned u; /* Local index variable */
/* Reset packed messages flag */
packed_msg = FALSE;
/* Scan through messages for messages that can be moved earlier in chunks */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- if(H5O_NULL_ID == curr_msg->type->id) {
- H5O_chunk_t *chunk; /* Pointer to chunk that null message is in */
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ if (H5O_NULL_ID == curr_msg->type->id) {
+ H5O_chunk_t *chunk; /* Pointer to chunk that null message is in */
/* Check if null message is not last in chunk */
chunk = &(oh->chunk[curr_msg->chunkno]);
- if((curr_msg->raw + curr_msg->raw_size)
- != ((chunk->image + chunk->size) - (H5O_SIZEOF_CHKSUM_OH(oh) + chunk->gap))) {
- H5O_mesg_t *nonnull_msg; /* Pointer to current message to operate on */
- unsigned v; /* Local index variable */
-
- /* Loop over messages again, looking for the message in the chunk after the null message */
- for(v = 0, nonnull_msg = &oh->mesg[0]; v < oh->nmesgs; v++, nonnull_msg++) {
+ if ((curr_msg->raw + curr_msg->raw_size) !=
+ ((chunk->image + chunk->size) - (H5O_SIZEOF_CHKSUM_OH(oh) + chunk->gap))) {
+ H5O_mesg_t *nonnull_msg; /* Pointer to current message to operate on */
+ unsigned v; /* Local index variable */
+
+ /* Loop over messages again, looking for the message in the chunk after the null message
+ */
+ for (v = 0, nonnull_msg = &oh->mesg[0]; v < oh->nmesgs; v++, nonnull_msg++) {
/* Locate message that is immediately after the null message */
- if((curr_msg->chunkno == nonnull_msg->chunkno) &&
- ((curr_msg->raw + curr_msg->raw_size) == (nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)))) {
+ if ((curr_msg->chunkno == nonnull_msg->chunkno) &&
+ ((curr_msg->raw + curr_msg->raw_size) ==
+ (nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)))) {
/* Don't swap messages if the second message is also a null message */
/* (We'll merge them together later, in another routine) */
- if(H5O_NULL_ID != nonnull_msg->type->id) {
+ if (H5O_NULL_ID != nonnull_msg->type->id) {
/* Protect chunk */
- if(NULL == (null_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
+ if (NULL ==
+ (null_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL,
+ "unable to load object header chunk")
/* Copy raw data for non-null message to new location */
HDmemmove(curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
- nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), nonnull_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ nonnull_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Adjust non-null message's offset in chunk */
nonnull_msg->raw = curr_msg->raw;
/* Adjust null message's offset in chunk */
- curr_msg->raw = nonnull_msg->raw +
- nonnull_msg->raw_size + H5O_SIZEOF_MSGHDR_OH(oh);
+ curr_msg->raw =
+ nonnull_msg->raw + nonnull_msg->raw_size + H5O_SIZEOF_MSGHDR_OH(oh);
/* Mark null message dirty */
/* (since we need to re-encode its message header) */
curr_msg->dirty = TRUE;
/* Release chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, TRUE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
+ if (H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
null_chk_proxy = NULL;
/* Set the flag to indicate that the null message
@@ -1528,122 +1518,142 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/* Break out of loop */
break;
} /* end if */
- } /* end for */
+ } /* end for */
/* Should have been message after null message */
HDassert(v < oh->nmesgs);
} /* end if */
- } /* end if */
+ } /* end if */
else {
- H5O_mesg_t *null_msg; /* Pointer to current message to operate on */
- size_t v; /* Local index variable */
+ H5O_mesg_t *null_msg; /* Pointer to current message to operate on */
+ size_t v; /* Local index variable */
/* Check if messages in chunk pointed to can replace continuation message */
- if(H5O_CONT_ID == curr_msg->type->id) {
- htri_t status; /* Status from moving messages */
+ if (H5O_CONT_ID == curr_msg->type->id) {
+ htri_t status; /* Status from moving messages */
- if((status = H5O_move_cont(f, dxpl_id, oh, u)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "Error in moving messages into cont message")
- else if(status > 0) { /* Message(s) got moved into "continuation" message */
+ if ((status = H5O_move_cont(f, dxpl_id, oh, u)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL,
+ "Error in moving messages into cont message")
+ else if (status > 0) { /* Message(s) got moved into "continuation" message */
packed_msg = TRUE;
- break;
- } /* end else-if */
- } /* end if */
+ break;
+ } /* end else-if */
+ } /* end if */
/* Don't let locked messages be moved into earlier chunk */
- if(!curr_msg->locked) {
+ if (!curr_msg->locked) {
/* Loop over messages again, looking for large enough null message in earlier chunk */
- for(v = 0, null_msg = &oh->mesg[0]; v < oh->nmesgs; v++, null_msg++) {
- if(H5O_NULL_ID == null_msg->type->id && curr_msg->chunkno > null_msg->chunkno
- && curr_msg->raw_size <= null_msg->raw_size) {
- unsigned old_chunkno; /* Old message information */
+ for (v = 0, null_msg = &oh->mesg[0]; v < oh->nmesgs; v++, null_msg++) {
+ if (H5O_NULL_ID == null_msg->type->id && curr_msg->chunkno > null_msg->chunkno &&
+ curr_msg->raw_size <= null_msg->raw_size) {
+ unsigned old_chunkno; /* Old message information */
uint8_t *old_raw;
/* Keep old information about non-null message */
old_chunkno = curr_msg->chunkno;
- old_raw = curr_msg->raw;
+ old_raw = curr_msg->raw;
/* Protect chunks */
- if(NULL == (null_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, null_msg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
- if(NULL == (curr_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
+ if (NULL ==
+ (null_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, null_msg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL,
+ "unable to load object header chunk")
+ if (NULL ==
+ (curr_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL,
+ "unable to load object header chunk")
/* Copy raw data for non-null message to new chunk */
- HDmemcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ HDmemcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Point non-null message at null message's space */
curr_msg->chunkno = null_msg->chunkno;
- curr_msg->raw = null_msg->raw;
- curr_chk_dirtied = TRUE;
+ curr_msg->raw = null_msg->raw;
+ curr_chk_dirtied = TRUE;
/* Change information for null message */
- if(curr_msg->raw_size == null_msg->raw_size) {
+ if (curr_msg->raw_size == null_msg->raw_size) {
/* Point null message at old non-null space */
/* (Instead of freeing it and allocating new message) */
null_msg->chunkno = old_chunkno;
- null_msg->raw = old_raw;
+ null_msg->raw = old_raw;
/* Mark null message dirty */
- null_msg->dirty = TRUE;
+ null_msg->dirty = TRUE;
null_chk_dirtied = TRUE;
/* Release current chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
- curr_chk_proxy = NULL;
+ if (H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
+ curr_chk_proxy = NULL;
curr_chk_dirtied = FALSE;
/* Check for gap in null message's chunk */
- if(oh->chunk[old_chunkno].gap > 0) {
+ if (oh->chunk[old_chunkno].gap > 0) {
/* Eliminate the gap in the chunk */
- if(H5O_eliminate_gap(oh, &null_chk_dirtied, null_msg,
- ((oh->chunk[old_chunkno].image + oh->chunk[old_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)),
+ if (H5O_eliminate_gap(
+ oh, &null_chk_dirtied, null_msg,
+ ((oh->chunk[old_chunkno].image + oh->chunk[old_chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)),
oh->chunk[old_chunkno].gap) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL,
+ "can't eliminate gap in chunk")
} /* end if */
/* Release null chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
- null_chk_proxy = NULL;
+ if (H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
+ null_chk_proxy = NULL;
null_chk_dirtied = FALSE;
} /* end if */
else {
- size_t new_null_msg; /* Message index for new null message */
+ size_t new_null_msg; /* Message index for new null message */
/* Check if null message is large enough to still exist */
- if((null_msg->raw_size - curr_msg->raw_size) < (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
- size_t gap_size = null_msg->raw_size - curr_msg->raw_size; /* Size of gap produced */
+ if ((null_msg->raw_size - curr_msg->raw_size) <
+ (size_t)H5O_SIZEOF_MSGHDR_OH(oh)) {
+ size_t gap_size =
+ null_msg->raw_size - curr_msg->raw_size; /* Size of gap produced */
/* Adjust the size of the null message being eliminated */
null_msg->raw_size = curr_msg->raw_size;
/* Mark null message dirty */
- null_msg->dirty = TRUE;
+ null_msg->dirty = TRUE;
null_chk_dirtied = TRUE;
/* Add the gap to the chunk */
- if(H5O_add_gap(f, oh, null_msg->chunkno, &null_chk_dirtied, v, null_msg->raw + null_msg->raw_size, gap_size) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk")
+ if (H5O_add_gap(f, oh, null_msg->chunkno, &null_chk_dirtied, v,
+ null_msg->raw + null_msg->raw_size, gap_size) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL,
+ "can't insert gap in chunk")
- /* Re-use message # for new null message taking place of non-null message */
+ /* Re-use message # for new null message taking place of non-null message
+ */
new_null_msg = v;
} /* end if */
else {
/* Adjust null message's size & offset */
null_msg->raw += curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
- null_msg->raw_size -= curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
+ null_msg->raw_size -=
+ curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
/* Mark null message dirty */
- null_msg->dirty = TRUE;
+ null_msg->dirty = TRUE;
null_chk_dirtied = TRUE;
/* Create new null message for previous location of non-null message */
- if(oh->nmesgs >= oh->alloc_nmesgs) {
- if(H5O_alloc_msgs(oh, (size_t)1) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
+ if (oh->nmesgs >= oh->alloc_nmesgs) {
+ if (H5O_alloc_msgs(oh, (size_t)1) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "can't allocate more space for messages")
- /* "Retarget" 'curr_msg' pointer into newly re-allocated array of messages */
+ /* "Retarget" 'curr_msg' pointer into newly re-allocated array of
+ * messages */
curr_msg = &oh->mesg[u];
} /* end if */
@@ -1652,35 +1662,40 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
} /* end else */
/* Release null message's chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
- null_chk_proxy = NULL;
+ if (H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
+ null_chk_proxy = NULL;
null_chk_dirtied = FALSE;
/* Initialize new null message to take over non-null message's location */
- oh->mesg[new_null_msg].type = H5O_MSG_NULL;
- oh->mesg[new_null_msg].native = NULL;
- oh->mesg[new_null_msg].raw = old_raw;
+ oh->mesg[new_null_msg].type = H5O_MSG_NULL;
+ oh->mesg[new_null_msg].native = NULL;
+ oh->mesg[new_null_msg].raw = old_raw;
oh->mesg[new_null_msg].raw_size = curr_msg->raw_size;
- oh->mesg[new_null_msg].chunkno = old_chunkno;
+ oh->mesg[new_null_msg].chunkno = old_chunkno;
/* Mark new null message dirty */
oh->mesg[new_null_msg].dirty = TRUE;
- curr_chk_dirtied = TRUE;
+ curr_chk_dirtied = TRUE;
/* Check for gap in new null message's chunk */
- if(oh->chunk[old_chunkno].gap > 0) {
+ if (oh->chunk[old_chunkno].gap > 0) {
/* Eliminate the gap in the chunk */
- if(H5O_eliminate_gap(oh, &curr_chk_dirtied, &oh->mesg[new_null_msg],
- ((oh->chunk[old_chunkno].image + oh->chunk[old_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)),
+ if (H5O_eliminate_gap(
+ oh, &curr_chk_dirtied, &oh->mesg[new_null_msg],
+ ((oh->chunk[old_chunkno].image + oh->chunk[old_chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)),
oh->chunk[old_chunkno].gap) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL,
+ "can't eliminate gap in chunk")
} /* end if */
/* Release new null message's chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
- curr_chk_proxy = NULL;
+ if (H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
+ curr_chk_proxy = NULL;
curr_chk_dirtied = FALSE;
} /* end else */
@@ -1693,34 +1708,33 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
*/
break;
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
/* If we packed messages, get out of loop and start over */
/* (Don't know if this has any benefit one way or the other -QAK) */
- if(packed_msg)
+ if (packed_msg)
break;
} /* end else */
- } /* end for */
+ } /* end for */
/* If we did any packing, remember that */
- if(packed_msg)
+ if (packed_msg)
did_packing = TRUE;
- } while(packed_msg);
+ } while (packed_msg);
/* Set return value */
ret_value = (htri_t)did_packing;
done:
- if(null_chk_proxy && H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
+ if (null_chk_proxy && H5O_chunk_unprotect(f, dxpl_id, null_chk_proxy, null_chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect null object header chunk")
- if(curr_chk_proxy && H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
+ if (curr_chk_proxy && H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, curr_chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect current object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_move_msgs_forward() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_merge_null
@@ -1730,7 +1744,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 10 2005
*
*-------------------------------------------------------------------------
@@ -1738,9 +1751,9 @@ done:
static htri_t
H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
{
- hbool_t merged_msg; /* Flag to indicate that messages were merged */
- hbool_t did_merging = FALSE; /* Whether any messages were merged */
- htri_t ret_value; /* Return value */
+ hbool_t merged_msg; /* Flag to indicate that messages were merged */
+ hbool_t did_merging = FALSE; /* Whether any messages were merged */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1752,38 +1765,41 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
* a list of messages to each chunk -QAK)
*/
do {
- H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
- unsigned u; /* Local index variable */
+ H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
+ unsigned u; /* Local index variable */
/* Reset merged messages flag */
merged_msg = FALSE;
/* Scan messages for adjacent null messages & merge them */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- if(H5O_NULL_ID == curr_msg->type->id) {
- H5O_mesg_t *curr_msg2; /* Pointer to current message to operate on */
- unsigned v; /* Local index variable */
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ if (H5O_NULL_ID == curr_msg->type->id) {
+ H5O_mesg_t *curr_msg2; /* Pointer to current message to operate on */
+ unsigned v; /* Local index variable */
/* Should be no gaps in chunk with null message */
HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Loop over messages again, looking for null message in same chunk */
- for(v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) {
- if(u != v && H5O_NULL_ID == curr_msg2->type->id && curr_msg->chunkno == curr_msg2->chunkno) {
- ssize_t adj_raw; /* Amount to adjust raw message pointer */
- size_t adj_raw_size; /* Amount to adjust raw message size */
+ for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) {
+ if (u != v && H5O_NULL_ID == curr_msg2->type->id &&
+ curr_msg->chunkno == curr_msg2->chunkno) {
+ ssize_t adj_raw; /* Amount to adjust raw message pointer */
+ size_t adj_raw_size; /* Amount to adjust raw message size */
/* Check for second message after first message */
- if((curr_msg->raw + curr_msg->raw_size) == (curr_msg2->raw - H5O_SIZEOF_MSGHDR_OH(oh))) {
+ if ((curr_msg->raw + curr_msg->raw_size) ==
+ (curr_msg2->raw - H5O_SIZEOF_MSGHDR_OH(oh))) {
/* Extend first null message length to cover second null message */
- adj_raw = 0;
+ adj_raw = 0;
adj_raw_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg2->raw_size;
/* Message has been merged */
merged_msg = TRUE;
} /* end if */
/* Check for second message before first message */
- else if((curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) == (curr_msg2->raw + curr_msg2->raw_size)) {
+ else if ((curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) ==
+ (curr_msg2->raw + curr_msg2->raw_size)) {
/* Adjust first message address and extend length to cover second message */
adj_raw = -((ssize_t)((size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg2->raw_size));
adj_raw_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg2->raw_size;
@@ -1793,15 +1809,17 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
} /* end if */
/* Second message has been merged, delete it */
- if(merged_msg) {
- H5O_chunk_proxy_t *curr_chk_proxy; /* Chunk that message is in */
+ if (merged_msg) {
+ H5O_chunk_proxy_t *curr_chk_proxy; /* Chunk that message is in */
/* Release any information/memory for second message */
H5O_msg_free_mesg(curr_msg2);
/* Protect chunk */
- if(NULL == (curr_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
+ if (NULL ==
+ (curr_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL,
+ "unable to load object header chunk")
/* Adjust first message address and extend length to cover second message */
curr_msg->raw += adj_raw;
@@ -1811,38 +1829,40 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
curr_msg->dirty = TRUE;
/* Release new null message's chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, TRUE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
+ if (H5O_chunk_unprotect(f, dxpl_id, curr_chk_proxy, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
+ "unable to unprotect object header chunk")
/* Remove second message from list of messages */
- if(v < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[v], &oh->mesg[v + 1], ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
+ if (v < (oh->nmesgs - 1))
+ HDmemmove(&oh->mesg[v], &oh->mesg[v + 1],
+ ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
oh->nmesgs--;
/* If the merged message is too large, shrink the chunk */
- if(curr_msg->raw_size >= H5O_MESG_MAX_SIZE)
- if(H5O_alloc_shrink_chunk(f, dxpl_id, oh, curr_msg->chunkno) < 0)
+ if (curr_msg->raw_size >= H5O_MESG_MAX_SIZE)
+ if (H5O_alloc_shrink_chunk(f, dxpl_id, oh, curr_msg->chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "unable to shrink chunk")
/* Get out of loop */
break;
} /* end if */
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
/* Get out of loop if we merged messages */
- if(merged_msg)
+ if (merged_msg)
break;
} /* end if */
- } /* end for */
+ } /* end for */
/* If we did any merging, remember that */
- if(merged_msg)
+ if (merged_msg)
did_merging = TRUE;
- } while(merged_msg);
+ } while (merged_msg);
/* Set return value */
ret_value = (htri_t)did_merging;
@@ -1851,7 +1871,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_merge_null() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_remove_empty_chunks
@@ -1865,7 +1884,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 17 2005
*
*-------------------------------------------------------------------------
@@ -1873,9 +1891,9 @@ done:
static htri_t
H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
{
- hbool_t deleted_chunk; /* Whether to a chunk was deleted */
- hbool_t did_deleting = FALSE; /* Whether any chunks were deleted */
- htri_t ret_value; /* Return value */
+ hbool_t deleted_chunk; /* Whether to a chunk was deleted */
+ hbool_t did_deleting = FALSE; /* Whether any chunks were deleted */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1884,39 +1902,39 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/* Loop until no chunks are freed */
do {
- H5O_mesg_t *null_msg; /* Pointer to null message found */
- H5O_mesg_t *cont_msg; /* Pointer to continuation message found */
- unsigned u, v; /* Local index variables */
+ H5O_mesg_t *null_msg; /* Pointer to null message found */
+ H5O_mesg_t *cont_msg; /* Pointer to continuation message found */
+ unsigned u, v; /* Local index variables */
/* Reset 'chunk deleted' flag */
deleted_chunk = FALSE;
/* Scan messages for null messages that fill an entire chunk */
- for(u = 0, null_msg = &oh->mesg[0]; u < oh->nmesgs; u++, null_msg++) {
+ for (u = 0, null_msg = &oh->mesg[0]; u < oh->nmesgs; u++, null_msg++) {
/* If a null message takes up an entire object header chunk (and
* its not the "base" chunk), delete that chunk from object header
*/
- if(H5O_NULL_ID == null_msg->type->id && null_msg->chunkno > 0 &&
- ((size_t)H5O_SIZEOF_MSGHDR_OH(oh) + null_msg->raw_size)
- == (oh->chunk[null_msg->chunkno].size - H5O_SIZEOF_CHKHDR_OH(oh))) {
- H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
- unsigned null_msg_no; /* Message # for null message */
- unsigned deleted_chunkno; /* Chunk # to delete */
+ if (H5O_NULL_ID == null_msg->type->id && null_msg->chunkno > 0 &&
+ ((size_t)H5O_SIZEOF_MSGHDR_OH(oh) + null_msg->raw_size) ==
+ (oh->chunk[null_msg->chunkno].size - H5O_SIZEOF_CHKHDR_OH(oh))) {
+ H5O_mesg_t *curr_msg; /* Pointer to current message to operate on */
+ unsigned null_msg_no; /* Message # for null message */
+ unsigned deleted_chunkno; /* Chunk # to delete */
/* Locate continuation message that points to chunk */
- for(v = 0, cont_msg = &oh->mesg[0]; v < oh->nmesgs; v++, cont_msg++) {
- if(H5O_CONT_ID == cont_msg->type->id) {
+ for (v = 0, cont_msg = &oh->mesg[0]; v < oh->nmesgs; v++, cont_msg++) {
+ if (H5O_CONT_ID == cont_msg->type->id) {
/* Decode current continuation message if necessary */
H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, cont_msg, FAIL)
/* Check if the chunkno needs to be set */
/* (should only occur when the continuation message is first decoded) */
- if(0 == ((H5O_cont_t *)(cont_msg->native))->chunkno) {
- unsigned w; /* Local index variable */
+ if (0 == ((H5O_cont_t *)(cont_msg->native))->chunkno) {
+ unsigned w; /* Local index variable */
/* Find chunk that this continuation message points to */
- for(w = 0; w < oh->nchunks; w++)
- if(oh->chunk[w].addr == ((H5O_cont_t *)(cont_msg->native))->addr) {
+ for (w = 0; w < oh->nchunks; w++)
+ if (oh->chunk[w].addr == ((H5O_cont_t *)(cont_msg->native))->addr) {
((H5O_cont_t *)(cont_msg->native))->chunkno = w;
break;
} /* end if */
@@ -1924,21 +1942,21 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
} /* end if */
/* Check for correct chunk to delete */
- if(oh->chunk[null_msg->chunkno].addr == ((H5O_cont_t *)(cont_msg->native))->addr)
+ if (oh->chunk[null_msg->chunkno].addr == ((H5O_cont_t *)(cont_msg->native))->addr)
break;
} /* end if */
- } /* end for */
+ } /* end for */
/* Must be a continuation message that points to chunk containing null message */
HDassert(v < oh->nmesgs);
HDassert(cont_msg);
HDassert(((H5O_cont_t *)(cont_msg->native))->chunkno == null_msg->chunkno);
/* Initialize information about null message */
- null_msg_no = u;
+ null_msg_no = u;
deleted_chunkno = null_msg->chunkno;
/* Convert continuation message into a null message */
- if(H5O_release_mesg(f, dxpl_id, oh, cont_msg, TRUE) < 0)
+ if (H5O_release_mesg(f, dxpl_id, oh, cont_msg, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message")
/*
@@ -1946,27 +1964,31 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
*/
/* Free memory for chunk image */
- oh->chunk[null_msg->chunkno].image = H5FL_BLK_FREE(chunk_image, oh->chunk[null_msg->chunkno].image);
+ oh->chunk[null_msg->chunkno].image =
+ H5FL_BLK_FREE(chunk_image, oh->chunk[null_msg->chunkno].image);
/* Remove chunk from list of chunks */
- if(null_msg->chunkno < (oh->nchunks - 1)) {
- HDmemmove(&oh->chunk[null_msg->chunkno], &oh->chunk[null_msg->chunkno + 1], ((oh->nchunks - 1) - null_msg->chunkno) * sizeof(H5O_chunk_t));
+ if (null_msg->chunkno < (oh->nchunks - 1)) {
+ HDmemmove(&oh->chunk[null_msg->chunkno], &oh->chunk[null_msg->chunkno + 1],
+ ((oh->nchunks - 1) - null_msg->chunkno) * sizeof(H5O_chunk_t));
/* Adjust chunk number for any chunk proxies that are in the cache */
- for(u = null_msg->chunkno; u < (oh->nchunks - 1); u++) {
- unsigned chk_proxy_status = 0; /* Metadata cache status of chunk proxy for chunk */
+ for (u = null_msg->chunkno; u < (oh->nchunks - 1); u++) {
+ unsigned chk_proxy_status = 0; /* Metadata cache status of chunk proxy for chunk */
/* Check the chunk proxy's status in the metadata cache */
- if(H5AC_get_entry_status(f, oh->chunk[u].addr, &chk_proxy_status) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check metadata cache status for chunk proxy")
+ if (H5AC_get_entry_status(f, oh->chunk[u].addr, &chk_proxy_status) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL,
+ "unable to check metadata cache status for chunk proxy")
/* If the entry is in the cache, update its chunk index */
- if(chk_proxy_status & H5AC_ES__IN_CACHE) {
- if(H5O_chunk_update_idx(f, dxpl_id, oh, u) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update index for chunk proxy")
+ if (chk_proxy_status & H5AC_ES__IN_CACHE) {
+ if (H5O_chunk_update_idx(f, dxpl_id, oh, u) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL,
+ "unable to update index for chunk proxy")
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
/* Decrement # of chunks */
/* (Don't bother reducing size of chunk array for now -QAK) */
@@ -1980,35 +2002,36 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
H5O_msg_free_mesg(null_msg);
/* Remove null message from list of messages */
- if(null_msg_no < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[null_msg_no], &oh->mesg[null_msg_no + 1], ((oh->nmesgs - 1) - null_msg_no) * sizeof(H5O_mesg_t));
+ if (null_msg_no < (oh->nmesgs - 1))
+ HDmemmove(&oh->mesg[null_msg_no], &oh->mesg[null_msg_no + 1],
+ ((oh->nmesgs - 1) - null_msg_no) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
oh->nmesgs--;
/* Adjust chunk # for messages in chunks after deleted chunk */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
/* Sanity check - there should be no messages in deleted chunk */
HDassert(curr_msg->chunkno != deleted_chunkno);
/* Adjust chunk index for messages in later chunks */
- if(curr_msg->chunkno > deleted_chunkno)
+ if (curr_msg->chunkno > deleted_chunkno)
curr_msg->chunkno--;
/* Check for continuation message */
- if(H5O_CONT_ID == curr_msg->type->id) {
+ if (H5O_CONT_ID == curr_msg->type->id) {
/* Decode current continuation message if necessary */
H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, curr_msg, FAIL)
/* Check if the chunkno needs to be set */
/* (should only occur when the continuation message is first decoded) */
- if(0 == ((H5O_cont_t *)(curr_msg->native))->chunkno) {
- unsigned w; /* Local index variable */
+ if (0 == ((H5O_cont_t *)(curr_msg->native))->chunkno) {
+ unsigned w; /* Local index variable */
/* Find chunk that this continuation message points to */
- for(w = 0; w < oh->nchunks; w++)
- if(oh->chunk[w].addr == ((H5O_cont_t *)(curr_msg->native))->addr) {
+ for (w = 0; w < oh->nchunks; w++)
+ if (oh->chunk[w].addr == ((H5O_cont_t *)(curr_msg->native))->addr) {
((H5O_cont_t *)(curr_msg->native))->chunkno = w;
break;
} /* end if */
@@ -2016,22 +2039,22 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
} /* end if */
else {
/* Check for pointer to chunk after deleted chunk */
- if(((H5O_cont_t *)(curr_msg->native))->chunkno > deleted_chunkno)
+ if (((H5O_cont_t *)(curr_msg->native))->chunkno > deleted_chunkno)
((H5O_cont_t *)(curr_msg->native))->chunkno--;
} /* end else */
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
/* Found chunk to delete */
deleted_chunk = TRUE;
break;
} /* end if */
- } /* end for */
+ } /* end for */
/* If we deleted any chunks, remember that */
- if(deleted_chunk)
+ if (deleted_chunk)
did_deleting = TRUE;
- } while(deleted_chunk);
+ } while (deleted_chunk);
/* Set return value */
ret_value = (htri_t)did_deleting;
@@ -2040,7 +2063,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_remove_empty_chunks() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_condense_header
@@ -2050,22 +2072,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 4 2005
*
- * Modifications:
- * Feb. 2009: Vailin Choi
- * Add 2 more parameters to H5O_move_msgs_forward() for moving
- * messages forward into "continuation" message
- *
*-------------------------------------------------------------------------
*/
herr_t
H5O_condense_header(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
{
- hbool_t rescan_header; /* Whether to rescan header */
- htri_t result; /* Result from packing/merging/etc */
- herr_t ret_value = SUCCEED; /* return value */
+ hbool_t rescan_header; /* Whether to rescan header */
+ htri_t result; /* Result from packing/merging/etc */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2079,34 +2095,33 @@ H5O_condense_header(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
/* Scan for messages that can be moved earlier in chunks */
result = H5O_move_msgs_forward(f, dxpl_id, oh);
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't move header messages forward")
- if(result > 0)
+ if (result > 0)
rescan_header = TRUE;
/* Scan for adjacent null messages & merge them */
result = H5O_merge_null(f, dxpl_id, oh);
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack null header messages")
- if(result > 0)
+ if (result > 0)
rescan_header = TRUE;
/* Scan for empty chunks to remove */
result = H5O_remove_empty_chunks(f, dxpl_id, oh);
- if(result < 0)
+ if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk")
- if(result > 0)
+ if (result > 0)
rescan_header = TRUE;
- } while(rescan_header);
+ } while (rescan_header);
#ifdef H5O_DEBUG
-H5O_assert(oh);
+ H5O_assert(oh);
#endif /* H5O_DEBUG */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_condense_header() */
-
/*-------------------------------------------------------------------------
*
* Function: H5O_alloc_shrink_chunk
@@ -2116,7 +2131,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Oct 20 2008
*
*-------------------------------------------------------------------------
@@ -2124,21 +2138,21 @@ done:
static herr_t
H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
{
- H5O_chunk_t *chunk = &oh->chunk[chunkno]; /* Chunk to shrink */
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Metadata cache proxy for chunk to shrink */
- H5O_mesg_t *curr_msg; /* Current message to examine */
- uint8_t *old_image = chunk->image; /* Old address of chunk's image in memory */
- size_t old_size = chunk->size; /* Old size of chunk */
- size_t new_size = chunk->size - chunk->gap; /* Size of shrunk chunk */
- size_t total_msg_size; /* Size of the messages in this chunk */
- size_t min_chunk_size = H5O_ALIGN_OH(oh, H5O_MIN_SIZE); /* Minimum chunk size */
- size_t sizeof_chksum = H5O_SIZEOF_CHKSUM_OH(oh); /* Size of chunk checksum */
- size_t sizeof_msghdr = H5O_SIZEOF_MSGHDR_OH(oh); /* Size of message header */
- uint8_t new_size_flags = 0; /* New chunk #0 size flags */
- hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
- size_t less_prfx_size = 0; /* Bytes removed from object header prefix */
- size_t u; /* Index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_t * chunk = &oh->chunk[chunkno]; /* Chunk to shrink */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Metadata cache proxy for chunk to shrink */
+ H5O_mesg_t * curr_msg; /* Current message to examine */
+ uint8_t * old_image = chunk->image; /* Old address of chunk's image in memory */
+ size_t old_size = chunk->size; /* Old size of chunk */
+ size_t new_size = chunk->size - chunk->gap; /* Size of shrunk chunk */
+ size_t total_msg_size; /* Size of the messages in this chunk */
+ size_t min_chunk_size = H5O_ALIGN_OH(oh, H5O_MIN_SIZE); /* Minimum chunk size */
+ size_t sizeof_chksum = H5O_SIZEOF_CHKSUM_OH(oh); /* Size of chunk checksum */
+ size_t sizeof_msghdr = H5O_SIZEOF_MSGHDR_OH(oh); /* Size of message header */
+ uint8_t new_size_flags = 0; /* New chunk #0 size flags */
+ hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
+ size_t less_prfx_size = 0; /* Bytes removed from object header prefix */
+ size_t u; /* Index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2147,33 +2161,32 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
HDassert(oh);
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Loop backwards to increase the chance of seeing more null messages at the
* end of the chunk. Note that we rely on unsigned u wrapping around at the
* end.
*/
- for(u = oh->nmesgs - 1, curr_msg = &oh->mesg[u]; u < oh->nmesgs; u--, curr_msg--) {
- if((H5O_NULL_ID == curr_msg->type->id) && (chunkno == curr_msg->chunkno)) {
+ for (u = oh->nmesgs - 1, curr_msg = &oh->mesg[u]; u < oh->nmesgs; u--, curr_msg--) {
+ if ((H5O_NULL_ID == curr_msg->type->id) && (chunkno == curr_msg->chunkno)) {
size_t shrink_size = curr_msg->raw_size + sizeof_msghdr; /* Amount to shrink the chunk by */
/* If the current message is not at the end of the chunk, copy the
- * data after it (except the checksum).
- */
- if(curr_msg->raw + curr_msg->raw_size
- < old_image + new_size - sizeof_chksum) {
- unsigned v; /* Index */
- H5O_mesg_t *curr_msg2;
- uint8_t *src = curr_msg->raw + curr_msg->raw_size; /* Source location */
+ * data after it (except the checksum).
+ */
+ if (curr_msg->raw + curr_msg->raw_size < old_image + new_size - sizeof_chksum) {
+ unsigned v; /* Index */
+ H5O_mesg_t *curr_msg2;
+ uint8_t * src = curr_msg->raw + curr_msg->raw_size; /* Source location */
/* Slide down the raw data */
HDmemmove(curr_msg->raw - sizeof_msghdr, src,
- (size_t)(old_image + new_size - sizeof_chksum - src));
+ (size_t)(old_image + new_size - sizeof_chksum - src));
/* Update the raw data pointers for messages after this one */
- for(v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++)
- if((chunkno == curr_msg2->chunkno) && (curr_msg2->raw > curr_msg->raw))
+ for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++)
+ if ((chunkno == curr_msg2->chunkno) && (curr_msg2->raw > curr_msg->raw))
curr_msg2->raw -= shrink_size;
} /* end if */
@@ -2184,29 +2197,29 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
H5O_msg_free_mesg(curr_msg);
/* Remove the deleted null message from list of messages */
- if(u < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[u], &oh->mesg[u+1], ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
+ if (u < (oh->nmesgs - 1))
+ HDmemmove(&oh->mesg[u], &oh->mesg[u + 1], ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now) */
oh->nmesgs--;
} /* end if */
- } /* end for */
+ } /* end for */
/* Check if the chunk is too small, extend if necessary */
total_msg_size = new_size - (size_t)(chunkno == 0 ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh));
- if(total_msg_size < min_chunk_size) {
+ if (total_msg_size < min_chunk_size) {
HDassert(oh->alloc_nmesgs > oh->nmesgs);
oh->nmesgs++;
/* Initialize new null message to make the chunk large enough */
- curr_msg = &oh->mesg[oh->nmesgs - 1];
- curr_msg->type = H5O_MSG_NULL;
- curr_msg->dirty = TRUE;
+ curr_msg = &oh->mesg[oh->nmesgs - 1];
+ curr_msg->type = H5O_MSG_NULL;
+ curr_msg->dirty = TRUE;
curr_msg->native = NULL;
- curr_msg->raw = old_image + new_size + sizeof_msghdr - sizeof_chksum;
- curr_msg->raw_size = MAX(H5O_ALIGN_OH(oh, min_chunk_size - total_msg_size),
- sizeof_msghdr) - sizeof_msghdr;
+ curr_msg->raw = old_image + new_size + sizeof_msghdr - sizeof_chksum;
+ curr_msg->raw_size =
+ MAX(H5O_ALIGN_OH(oh, min_chunk_size - total_msg_size), sizeof_msghdr) - sizeof_msghdr;
curr_msg->chunkno = chunkno;
/* update the new chunk size */
@@ -2214,67 +2227,67 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
} /* end if */
/* Check for changing the chunk #0 data size enough to need adjusting the flags */
- if(oh->version > H5O_VERSION_1 && chunkno == 0) {
- uint64_t chunk0_newsize = new_size - (size_t)H5O_SIZEOF_HDR(oh); /* New size of chunk 0's data */
+ if (oh->version > H5O_VERSION_1 && chunkno == 0) {
+ uint64_t chunk0_newsize = new_size - (size_t)H5O_SIZEOF_HDR(oh); /* New size of chunk 0's data */
size_t orig_prfx_size = (size_t)1 << (oh->flags & H5O_HDR_CHUNK0_SIZE); /* Original prefix size */
/* Check for moving to a 1-byte size encoding */
- if(orig_prfx_size > 1 && chunk0_newsize <= 255) {
- less_prfx_size = orig_prfx_size - 1;
- new_size_flags = H5O_HDR_CHUNK0_1;
+ if (orig_prfx_size > 1 && chunk0_newsize <= 255) {
+ less_prfx_size = orig_prfx_size - 1;
+ new_size_flags = H5O_HDR_CHUNK0_1;
adjust_size_flags = TRUE;
} /* end if */
/* Check for moving to a 2-byte size encoding */
- else if(orig_prfx_size > 2 && chunk0_newsize <= 65535) {
- less_prfx_size = orig_prfx_size - 2;
- new_size_flags = H5O_HDR_CHUNK0_2;
+ else if (orig_prfx_size > 2 && chunk0_newsize <= 65535) {
+ less_prfx_size = orig_prfx_size - 2;
+ new_size_flags = H5O_HDR_CHUNK0_2;
adjust_size_flags = TRUE;
} /* end if */
/* Check for moving to a 4-byte size encoding */
- else if(orig_prfx_size > 4 && chunk0_newsize <= 4294967295) {
- less_prfx_size = orig_prfx_size - 4;
- new_size_flags = H5O_HDR_CHUNK0_4;
+ else if (orig_prfx_size > 4 && chunk0_newsize <= 4294967295) {
+ less_prfx_size = orig_prfx_size - 4;
+ new_size_flags = H5O_HDR_CHUNK0_4;
adjust_size_flags = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
- if(adjust_size_flags) {
+ if (adjust_size_flags) {
/* Adjust object header prefix flags */
oh->flags = (uint8_t)(oh->flags & ~H5O_HDR_CHUNK0_SIZE);
oh->flags |= new_size_flags;
/* Slide chunk 0 data down */
HDmemmove(chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum,
- chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum + less_prfx_size,
- new_size - (size_t)H5O_SIZEOF_HDR(oh));
+ chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum + less_prfx_size,
+ new_size - (size_t)H5O_SIZEOF_HDR(oh));
/* Adjust chunk size */
new_size -= less_prfx_size;
} /* end if */
/* Allocate less memory space for chunk's image */
- chunk->size = new_size;
+ chunk->size = new_size;
chunk->image = H5FL_BLK_REALLOC(chunk_image, old_image, chunk->size);
- chunk->gap = 0;
- if(NULL == oh->chunk[chunkno].image)
+ chunk->gap = 0;
+ if (NULL == oh->chunk[chunkno].image)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Spin through existing messages, adjusting them */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
- if(adjust_size_flags || (chunk->image != old_image))
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ if (adjust_size_flags || (chunk->image != old_image))
/* Adjust raw addresses for messages in this chunk to reflect new 'image' address */
- if(curr_msg->chunkno == chunkno)
+ if (curr_msg->chunkno == chunkno)
curr_msg->raw = chunk->image - less_prfx_size + (curr_msg->raw - old_image);
/* Find continuation message which points to this chunk and adjust chunk's size */
/* (Chunk 0 doesn't have a continuation message that points to it and
* its size is directly encoded in the object header) */
- if(chunkno > 0 && (H5O_CONT_ID == curr_msg->type->id) &&
- (((H5O_cont_t *)(curr_msg->native))->chunkno == chunkno)) {
- H5O_chunk_proxy_t *cont_chk_proxy; /* Chunk that message is in */
+ if (chunkno > 0 && (H5O_CONT_ID == curr_msg->type->id) &&
+ (((H5O_cont_t *)(curr_msg->native))->chunkno == chunkno)) {
+ H5O_chunk_proxy_t *cont_chk_proxy; /* Chunk that message is in */
/* Protect chunk */
- if(NULL == (cont_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
+ if (NULL == (cont_chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, curr_msg->chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Adjust size of continuation message */
@@ -2285,26 +2298,25 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
curr_msg->dirty = TRUE;
/* Release chunk, marking it dirty */
- if(H5O_chunk_unprotect(f, dxpl_id, cont_chk_proxy, TRUE) < 0)
+ if (H5O_chunk_unprotect(f, dxpl_id, cont_chk_proxy, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
} /* end if */
- } /* end for */
+ } /* end for */
HDassert(new_size <= old_size);
/* Resize the chunk in the cache */
- if(H5O_chunk_resize(oh, chk_proxy) < 0)
+ if (H5O_chunk_resize(oh, chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk")
/* Free the unused space in the file */
- if(H5MF_xfree(f, H5FD_MEM_OHDR, dxpl_id, chunk->addr + new_size, (hsize_t)(old_size - new_size)) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_OHDR, dxpl_id, chunk->addr + new_size, (hsize_t)(old_size - new_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to shrink object header chunk")
done:
/* Release chunk, marking it dirty */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, TRUE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_alloc_shrink_chunk() */
-
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index c2c0fe3..3fa153e 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -6,92 +6,90 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5A_PACKAGE /*prevent warning from including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5S_PACKAGE /*suppress error about including H5Spkg */
+#define H5A_PACKAGE /*prevent warning from including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5S_PACKAGE /*suppress error about including H5Spkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Spkg.h" /* Dataspaces */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Spkg.h" /* Dataspaces */
/* PRIVATE PROTOTYPES */
static herr_t H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg);
-static void *H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
-static void *H5O_attr_copy(const void *_mesg, void *_dest);
+static void * H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
+static void * H5O_attr_copy(const void *_mesg, void *_dest);
static size_t H5O_attr_size(const H5F_t *f, const void *_mesg);
static herr_t H5O_attr_free(void *mesg);
-static herr_t H5O_attr_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
-static void *H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type,
- void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_attr_post_copy_file(const H5O_loc_t *src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst, hid_t dxpl_id,
- H5O_copy_t *cpy_info);
+static herr_t H5O_attr_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *udata);
+static void * H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
+ H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata,
+ hid_t dxpl_id);
+static herr_t H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
+ void *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
static herr_t H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx);
static herr_t H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx);
-static herr_t H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_ATTR
-#define H5O_SHARED_DECODE H5O_attr_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_attr_decode
-#define H5O_SHARED_ENCODE H5O_attr_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_attr_encode
-#define H5O_SHARED_SIZE H5O_attr_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_attr_size
-#define H5O_SHARED_DELETE H5O_attr_shared_delete
-#define H5O_SHARED_DELETE_REAL H5O_attr_delete
-#define H5O_SHARED_LINK H5O_attr_shared_link
-#define H5O_SHARED_LINK_REAL H5O_attr_link
-#define H5O_SHARED_COPY_FILE H5O_attr_shared_copy_file
-#define H5O_SHARED_COPY_FILE_REAL H5O_attr_copy_file
-#define H5O_SHARED_POST_COPY_FILE H5O_attr_shared_post_copy_file
-#define H5O_SHARED_POST_COPY_FILE_REAL H5O_attr_post_copy_file
-#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_attr_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_attr_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_TYPE H5O_MSG_ATTR
+#define H5O_SHARED_DECODE H5O_attr_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_attr_decode
+#define H5O_SHARED_ENCODE H5O_attr_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_attr_encode
+#define H5O_SHARED_SIZE H5O_attr_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_attr_size
+#define H5O_SHARED_DELETE H5O_attr_shared_delete
+#define H5O_SHARED_DELETE_REAL H5O_attr_delete
+#define H5O_SHARED_LINK H5O_attr_shared_link
+#define H5O_SHARED_LINK_REAL H5O_attr_link
+#define H5O_SHARED_COPY_FILE H5O_attr_shared_copy_file
+#define H5O_SHARED_COPY_FILE_REAL H5O_attr_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_attr_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE_REAL H5O_attr_post_copy_file
+#undef H5O_SHARED_POST_COPY_FILE_UPD
+#define H5O_SHARED_DEBUG H5O_attr_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O_attr_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_ATTR[1] = {{
- H5O_ATTR_ID, /* message id number */
- "attribute", /* message name for debugging */
- sizeof(H5A_t), /* native message size */
- H5O_SHARE_IS_SHARABLE, /* messages are sharable? */
- H5O_attr_shared_decode, /* decode message */
- H5O_attr_shared_encode, /* encode message */
- H5O_attr_copy, /* copy the native value */
- H5O_attr_shared_size, /* size of raw message */
- H5O_attr_reset, /* reset method */
- H5O_attr_free, /* free method */
- H5O_attr_shared_delete, /* file delete method */
- H5O_attr_shared_link, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- H5O_attr_pre_copy_file, /* pre copy native value to file */
- H5O_attr_shared_copy_file, /* copy native value to file */
- H5O_attr_shared_post_copy_file, /* post copy native value to file */
- H5O_attr_get_crt_index, /* get creation index */
- H5O_attr_set_crt_index, /* set creation index */
- H5O_attr_shared_debug /* debug the message */
+ H5O_ATTR_ID, /* message id number */
+ "attribute", /* message name for debugging */
+ sizeof(H5A_t), /* native message size */
+ H5O_SHARE_IS_SHARABLE, /* messages are sharable? */
+ H5O_attr_shared_decode, /* decode message */
+ H5O_attr_shared_encode, /* encode message */
+ H5O_attr_copy, /* copy the native value */
+ H5O_attr_shared_size, /* size of raw message */
+ H5O_attr_reset, /* reset method */
+ H5O_attr_free, /* free method */
+ H5O_attr_shared_delete, /* file delete method */
+ H5O_attr_shared_link, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ H5O_attr_pre_copy_file, /* pre copy native value to file */
+ H5O_attr_shared_copy_file, /* copy native value to file */
+ H5O_attr_shared_post_copy_file, /* post copy native value to file */
+ H5O_attr_get_crt_index, /* get creation index */
+ H5O_attr_set_crt_index, /* set creation index */
+ H5O_attr_shared_debug /* debug the message */
}};
/* Flags for attribute flag encoding */
-#define H5O_ATTR_FLAG_TYPE_SHARED 0x01
-#define H5O_ATTR_FLAG_SPACE_SHARED 0x02
-#define H5O_ATTR_FLAG_ALL 0x03
+#define H5O_ATTR_FLAG_TYPE_SHARED 0x01
+#define H5O_ATTR_FLAG_SPACE_SHARED 0x02
+#define H5O_ATTR_FLAG_ALL 0x03
/* Declare external the free list for H5S_t's */
H5FL_EXTERN(H5S_t);
@@ -99,7 +97,6 @@ H5FL_EXTERN(H5S_t);
/* Declare external the free list for H5S_extent_t's */
H5FL_EXTERN(H5S_extent_t);
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_decode
@@ -110,7 +107,10 @@ H5FL_EXTERN(H5S_extent_t);
void *H5O_attr_decode(f, dxpl_id, mesg_flags, p)
H5F_t *f; IN: pointer to the HDF5 file struct
hid_t dxpl_id; IN: DXPL for any I/O
+ H5O_t *open_oh; IN: pointer to the object header
unsigned mesg_flags; IN: Message flags to influence decoding
+ unsigned *ioflags; IN: flags for decoding
+ size_t p_size; IN: size of buffer *p
const uint8_t *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
@@ -121,13 +121,13 @@ H5FL_EXTERN(H5S_extent_t);
--------------------------------------------------------------------------*/
static void *
H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
- unsigned *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned *ioflags, size_t p_size, const uint8_t *p)
{
- H5A_t *attr = NULL;
- H5S_extent_t *extent; /*extent dimensionality information */
- size_t name_len; /*attribute name length */
- unsigned flags = 0; /* Attribute flags */
- H5A_t *ret_value; /* Return value */
+ H5A_t * attr = NULL;
+ H5S_extent_t *extent; /*extent dimensionality information */
+ size_t name_len; /*attribute name length */
+ unsigned flags = 0; /* Attribute flags */
+ H5A_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -135,27 +135,27 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED
HDassert(f);
HDassert(p);
- if(NULL == (attr = H5FL_CALLOC(H5A_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (attr = H5FL_CALLOC(H5A_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
+ if (NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure")
/* Version number */
attr->shared->version = *p++;
- if(attr->shared->version < H5O_ATTR_VERSION_1 || attr->shared->version > H5O_ATTR_VERSION_LATEST)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message")
+ if (attr->shared->version < H5O_ATTR_VERSION_1 || attr->shared->version > H5O_ATTR_VERSION_LATEST)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message")
/* Get the flags byte if we have a later version of the attribute */
- if(attr->shared->version >= H5O_ATTR_VERSION_2) {
+ if (attr->shared->version >= H5O_ATTR_VERSION_2) {
flags = *p++;
/* Check for unknown flag */
- if(flags & (unsigned)~H5O_ATTR_FLAG_ALL)
+ if (flags & (unsigned)~H5O_ATTR_FLAG_ALL)
HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "unknown flag for attribute message")
} /* end if */
else
- p++; /* Byte is unused when version<2 */
+ p++; /* Byte is unused when version<2 */
/*
* Decode the sizes of the parts of the attribute. The sizes stored in
@@ -169,22 +169,23 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED
* Decode the character encoding for the name for versions 3 or later,
* as well as some reserved bytes.
*/
- if(attr->shared->version >= H5O_ATTR_VERSION_3)
+ if (attr->shared->version >= H5O_ATTR_VERSION_3)
attr->shared->encoding = (H5T_cset_t)*p++;
/* Decode and store the name */
- if(NULL == (attr->shared->name = H5MM_strdup((const char *)p)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(attr->shared->version < H5O_ATTR_VERSION_2)
- p += H5O_ALIGN_OLD(name_len); /* advance the memory pointer */
+ if (NULL == (attr->shared->name = H5MM_strdup((const char *)p)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (attr->shared->version < H5O_ATTR_VERSION_2)
+ p += H5O_ALIGN_OLD(name_len); /* advance the memory pointer */
else
- p += name_len; /* advance the memory pointer */
+ p += name_len; /* advance the memory pointer */
/* Decode the attribute's datatype */
- if(NULL == (attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)(f, dxpl_id, open_oh,
- ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->dt_size, p)))
+ if (NULL == (attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)(
+ f, dxpl_id, open_oh, ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0),
+ ioflags, attr->shared->dt_size, p)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype")
- if(attr->shared->version < H5O_ATTR_VERSION_2)
+ if (attr->shared->version < H5O_ATTR_VERSION_2)
p += H5O_ALIGN_OLD(attr->shared->dt_size);
else
p += attr->shared->dt_size;
@@ -192,12 +193,13 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED
/* decode the attribute dataspace. It can be shared in versions >= 3
* What's actually shared, though, is only the extent.
*/
- if(NULL == (attr->shared->ds = H5FL_CALLOC(H5S_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (attr->shared->ds = H5FL_CALLOC(H5S_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Decode attribute's dataspace extent */
- if((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)(f, dxpl_id, open_oh,
- ((flags & H5O_ATTR_FLAG_SPACE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->ds_size, p)) == NULL)
+ if ((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)(
+ f, dxpl_id, open_oh, ((flags & H5O_ATTR_FLAG_SPACE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags,
+ attr->shared->ds_size, p)) == NULL)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace")
/* Copy the extent information to the dataspace */
@@ -207,20 +209,26 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED
extent = H5FL_FREE(H5S_extent_t, extent);
/* Default to entire dataspace being selected */
- if(H5S_select_all(attr->shared->ds, FALSE) < 0)
+ if (H5S_select_all(attr->shared->ds, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection")
- if(attr->shared->version < H5O_ATTR_VERSION_2)
+ if (attr->shared->version < H5O_ATTR_VERSION_2)
p += H5O_ALIGN_OLD(attr->shared->ds_size);
else
p += attr->shared->ds_size;
/* Compute the size of the data */
- H5_CHECKED_ASSIGN(attr->shared->data_size, size_t, H5S_GET_EXTENT_NPOINTS(attr->shared->ds) * H5T_get_size(attr->shared->dt), hsize_t);
+ H5_CHECKED_ASSIGN(attr->shared->data_size, size_t,
+ H5S_GET_EXTENT_NPOINTS(attr->shared->ds) * H5T_get_size(attr->shared->dt), hsize_t);
/* Go get the data */
- if(attr->shared->data_size) {
- if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size)))
+ if (attr->shared->data_size) {
+ /* Ensure that data size doesn't exceed buffer size, in case of
+ it's being corrupted in the file */
+ if (attr->shared->data_size > p_size)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_OVERFLOW, NULL, "data size exceeds buffer size")
+
+ if (NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(attr->shared->data, p, attr->shared->data_size);
} /* end if */
@@ -233,11 +241,11 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED
ret_value = attr;
done:
- if(NULL == ret_value)
- if(attr) {
- if(attr->shared) {
- /* Free any dynamicly allocated items */
- if(H5A_free(attr) < 0)
+ if (NULL == ret_value)
+ if (attr) {
+ if (attr->shared) {
+ /* Free any dynamically allocated items */
+ if (H5A_free(attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, NULL, "can't release attribute info")
/* Destroy shared attribute struct */
@@ -250,7 +258,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_decode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_encode
@@ -270,12 +277,12 @@ done:
static herr_t
H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
- const H5A_t *attr = (const H5A_t *) mesg;
- size_t name_len; /* Attribute name length */
- htri_t is_type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
- htri_t is_space_shared; /* Flag to indicate that a shared dataspace is used for this attribute */
- unsigned flags = 0; /* Attribute flags */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5A_t *attr = (const H5A_t *)mesg;
+ size_t name_len; /* Attribute name length */
+ htri_t is_type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
+ htri_t is_space_shared; /* Flag to indicate that a shared dataspace is used for this attribute */
+ unsigned flags = 0; /* Attribute flags */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -285,21 +292,21 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HDassert(attr);
/* Check whether datatype and dataspace are shared */
- if((is_type_shared = H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt)) < 0)
+ if ((is_type_shared = H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if datatype is shared")
- if((is_space_shared = H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds)) < 0)
+ if ((is_space_shared = H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if dataspace is shared")
/* Encode Version */
*p++ = attr->shared->version;
/* Set attribute flags if version >1 */
- if(attr->shared->version >= H5O_ATTR_VERSION_2) {
- flags = (is_type_shared ? H5O_ATTR_FLAG_TYPE_SHARED : 0 );
+ if (attr->shared->version >= H5O_ATTR_VERSION_2) {
+ flags = (is_type_shared ? H5O_ATTR_FLAG_TYPE_SHARED : 0);
flags |= (is_space_shared ? H5O_ATTR_FLAG_SPACE_SHARED : 0);
- *p++ = (uint8_t)flags; /* Set flags for attribute */
- } /* end if */
+ *p++ = (uint8_t)flags; /* Set flags for attribute */
+ } /* end if */
else
*p++ = 0; /* Reserved, for version <2 */
@@ -314,12 +321,12 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
UINT16ENCODE(p, attr->shared->ds_size);
/* The character encoding for the attribute's name, in later versions */
- if(attr->shared->version >= H5O_ATTR_VERSION_3)
- *p++ = attr->shared->encoding;
+ if (attr->shared->version >= H5O_ATTR_VERSION_3)
+ *p++ = (uint8_t)attr->shared->encoding;
/* Write the name including null terminator */
HDmemcpy(p, attr->shared->name, name_len);
- if(attr->shared->version < H5O_ATTR_VERSION_2) {
+ if (attr->shared->version < H5O_ATTR_VERSION_2) {
/* Pad to the correct number of bytes */
HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
p += H5O_ALIGN_OLD(name_len);
@@ -328,10 +335,10 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += name_len;
/* encode the attribute datatype */
- if((H5O_MSG_DTYPE->encode)(f, FALSE, p, attr->shared->dt) < 0)
+ if ((H5O_MSG_DTYPE->encode)(f, FALSE, p, attr->shared->dt) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype")
- if(attr->shared->version < H5O_ATTR_VERSION_2) {
+ if (attr->shared->version < H5O_ATTR_VERSION_2) {
HDmemset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
p += H5O_ALIGN_OLD(attr->shared->dt_size);
} /* end if */
@@ -339,10 +346,10 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += attr->shared->dt_size;
/* encode the attribute dataspace */
- if((H5O_MSG_SDSPACE->encode)(f, FALSE, p, &(attr->shared->ds->extent)) < 0)
+ if ((H5O_MSG_SDSPACE->encode)(f, FALSE, p, &(attr->shared->ds->extent)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace")
- if(attr->shared->version < H5O_ATTR_VERSION_2) {
+ if (attr->shared->version < H5O_ATTR_VERSION_2) {
HDmemset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
p += H5O_ALIGN_OLD(attr->shared->ds_size);
} /* end if */
@@ -350,7 +357,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += attr->shared->ds_size;
/* Store attribute data. If there's no data, store 0 as fill value. */
- if(attr->shared->data)
+ if (attr->shared->data)
HDmemcpy(p, attr->shared->data, attr->shared->data_size);
else
HDmemset(p, 0, attr->shared->data_size);
@@ -359,7 +366,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5O_attr_encode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_copy
@@ -378,7 +384,7 @@ done:
static void *
H5O_attr_copy(const void *_src, void *_dst)
{
- void *ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -386,14 +392,13 @@ H5O_attr_copy(const void *_src, void *_dst)
HDassert(_src);
/* copy */
- if(NULL == (ret_value = (H5A_t *)H5A_copy((H5A_t *)_dst, (const H5A_t *)_src)))
+ if (NULL == (ret_value = (H5A_t *)H5A_copy((H5A_t *)_dst, (const H5A_t *)_src)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "can't copy attribute")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_copy() */
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_size
@@ -413,48 +418,47 @@ done:
static size_t
H5O_attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
{
- const H5A_t *attr = (const H5A_t *)_mesg;
- size_t name_len;
- size_t ret_value = 0;
+ const H5A_t *attr = (const H5A_t *)_mesg;
+ size_t name_len;
+ size_t ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(attr);
/* Common size information */
- ret_value = 1 + /*version */
- 1 + /*reserved/flags */
- 2 + /*name size inc. null */
- 2 + /*type size */
- 2; /*space size */
+ ret_value = 1 + /*version */
+ 1 + /*reserved/flags */
+ 2 + /*name size inc. null */
+ 2 + /*type size */
+ 2; /*space size */
/* Length of attribute name */
name_len = HDstrlen(attr->shared->name) + 1;
/* Version-specific size information */
- if(attr->shared->version == H5O_ATTR_VERSION_1)
- ret_value += H5O_ALIGN_OLD(name_len) + /*attribute name */
- H5O_ALIGN_OLD(attr->shared->dt_size) + /*datatype */
- H5O_ALIGN_OLD(attr->shared->ds_size) + /*dataspace */
- attr->shared->data_size; /*the data itself */
- else if(attr->shared->version == H5O_ATTR_VERSION_2)
- ret_value += name_len + /*attribute name */
- attr->shared->dt_size + /*datatype */
- attr->shared->ds_size + /*dataspace */
- attr->shared->data_size; /*the data itself */
- else if(attr->shared->version == H5O_ATTR_VERSION_3)
- ret_value += 1 + /*character encoding */
- name_len + /*attribute name */
- attr->shared->dt_size + /*datatype */
- attr->shared->ds_size + /*dataspace */
- attr->shared->data_size; /*the data itself */
+ if (attr->shared->version == H5O_ATTR_VERSION_1)
+ ret_value += H5O_ALIGN_OLD(name_len) + /*attribute name */
+ H5O_ALIGN_OLD(attr->shared->dt_size) + /*datatype */
+ H5O_ALIGN_OLD(attr->shared->ds_size) + /*dataspace */
+ attr->shared->data_size; /*the data itself */
+ else if (attr->shared->version == H5O_ATTR_VERSION_2)
+ ret_value += name_len + /*attribute name */
+ attr->shared->dt_size + /*datatype */
+ attr->shared->ds_size + /*dataspace */
+ attr->shared->data_size; /*the data itself */
+ else if (attr->shared->version == H5O_ATTR_VERSION_3)
+ ret_value += 1 + /*character encoding */
+ name_len + /*attribute name */
+ attr->shared->dt_size + /*datatype */
+ attr->shared->ds_size + /*dataspace */
+ attr->shared->data_size; /*the data itself */
else
HDassert(0 && "Bad attribute version");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_reset
*
@@ -466,13 +470,6 @@ H5O_attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
- * Modification:Raymond Lu
- * 25 June 2008
- * Made this function empty. The freeing action is actually
- * done in H5O_attr_free (see H5O_msg_free_real). But this
- * empty reset function needs to be here. Otherwise, the
- * caller function H5O_msg_reset_real will zero-set the whole
- * message.
*-------------------------------------------------------------------------
*/
herr_t
@@ -483,41 +480,35 @@ H5O_attr_reset(void H5_ATTR_UNUSED *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_attr_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Thursday, November 18, 2004
*
- * Modification:Raymond Lu
- * 4 June 2008
- * Let this function call H5A_close in turn.
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_attr_free(void *mesg)
{
- H5A_t *attr = (H5A_t *)mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr = (H5A_t *)mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
- if(H5A_close(attr) < 0)
+ if (H5A_close(attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute object")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_delete
*
@@ -533,8 +524,8 @@ done:
herr_t
H5O_attr_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
{
- H5A_t *attr = (H5A_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr = (H5A_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -543,18 +534,17 @@ H5O_attr_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
HDassert(attr);
/* Decrement reference count on datatype in file */
- if((H5O_MSG_DTYPE->del)(f, dxpl_id, oh, attr->shared->dt) < 0)
+ if ((H5O_MSG_DTYPE->del)(f, dxpl_id, oh, attr->shared->dt) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count")
/* Decrement reference count on dataspace in file */
- if((H5O_MSG_SDSPACE->del)(f, dxpl_id, oh, attr->shared->ds) < 0)
+ if ((H5O_MSG_SDSPACE->del)(f, dxpl_id, oh, attr->shared->ds) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_link
*
@@ -571,8 +561,8 @@ done:
herr_t
H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
{
- H5A_t *attr = (H5A_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr = (H5A_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -586,16 +576,15 @@ H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
* message is deleted.
*/
/* Increment reference count on datatype & dataspace in file */
- if((H5O_MSG_DTYPE->link)(f, dxpl_id, oh, attr->shared->dt) < 0)
+ if ((H5O_MSG_DTYPE->link)(f, dxpl_id, oh, attr->shared->dt) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count")
- if((H5O_MSG_SDSPACE->link)(f, dxpl_id, oh, attr->shared->ds) < 0)
+ if ((H5O_MSG_SDSPACE->link)(f, dxpl_id, oh, attr->shared->ds) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_link() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_pre_copy_file
*
@@ -613,7 +602,7 @@ done:
*/
static herr_t
H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
+ hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -624,13 +613,12 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED
/* If we are not copying attributes into the destination file, indicate
* that this message should be deleted.
*/
- if(cpy_info->copy_without_attr)
+ if (cpy_info->copy_without_attr)
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_attr_pre_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_copy_file
*
@@ -646,11 +634,11 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static void *
-H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_type,
- void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata, hid_t dxpl_id)
+H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_type, void *native_src,
+ H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata,
+ hid_t dxpl_id)
{
- void *ret_value; /* Return value */
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -663,17 +651,17 @@ H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_t
/* Mark datatype as being on disk now. This step used to be done in a lower level
* by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better
* place than here. */
- if(H5T_set_loc(((H5A_t *)native_src)->shared->dt, file_src, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(((H5A_t *)native_src)->shared->dt, file_src, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location")
- if(NULL == (ret_value = H5A_attr_copy_file((H5A_t *)native_src, file_dst, recompute_size, cpy_info, dxpl_id)))
+ if (NULL ==
+ (ret_value = H5A_attr_copy_file((H5A_t *)native_src, file_dst, recompute_size, cpy_info, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy attribute")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_attr_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_post_copy_file
*
@@ -691,23 +679,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
- H5O_loc_t *dst_oloc, void *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
+ hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- herr_t ret_value = SUCCEED; /* Return value */
-
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
- if ( H5A_attr_post_copy_file(src_oloc, (const H5A_t *)mesg_src,
- dst_oloc, (H5A_t *)mesg_dst, dxpl_id, cpy_info) < 0)
+ if (H5A_attr_post_copy_file(src_oloc, (const H5A_t *)mesg_src, dst_oloc, (H5A_t *)mesg_dst, dxpl_id,
+ cpy_info) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_attr_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_get_crt_index
*
@@ -724,7 +710,7 @@ done:
static herr_t
H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
{
- const H5A_t *attr = (const H5A_t *)_mesg;
+ const H5A_t *attr = (const H5A_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -737,7 +723,6 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_attr_get_crt_index() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_set_crt_index
*
@@ -754,7 +739,7 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
static herr_t
H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
{
- H5A_t *attr = (H5A_t *)_mesg;
+ H5A_t *attr = (H5A_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -766,7 +751,6 @@ H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_attr_set_crt_index() */
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_debug
@@ -786,13 +770,12 @@ H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
parameter.
--------------------------------------------------------------------------*/
static herr_t
-H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent,
- int fwidth)
+H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth)
{
const H5A_t *mesg = (const H5A_t *)_mesg;
- const char *s; /* Temporary string pointer */
- char buf[128]; /* Temporary string buffer */
- herr_t ret_value = SUCCEED; /* Return value */
+ const char * s; /* Temporary string pointer */
+ char buf[128]; /* Temporary string buffer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -802,10 +785,8 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth,
- "Name:",
- mesg->shared->name);
- switch(mesg->shared->encoding) {
+ HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name);
+ switch (mesg->shared->encoding) {
case H5T_CSET_ASCII:
s = "ASCII";
break;
@@ -838,37 +819,27 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Character Set of Name:",
- s);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Object opened:",
- mesg->obj_opened);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Object:",
- mesg->oloc.addr);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s);
+ HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Object opened:", mesg->obj_opened);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object:", mesg->oloc.addr);
/* Check for attribute creation order index on the attribute */
- if(mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX)
+ if (mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX)
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Creation Index:",
- (unsigned)mesg->shared->crt_idx);
+ "Creation Index:", (unsigned)mesg->shared->crt_idx);
HDfprintf(stream, "%*sDatatype...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0,fwidth - 3),
- "Encoded Size:",
- (unsigned long)(mesg->shared->dt_size));
- if((H5O_MSG_DTYPE->debug)(f, dxpl_id, mesg->shared->dt, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Encoded Size:", (unsigned long)(mesg->shared->dt_size));
+ if ((H5O_MSG_DTYPE->debug)(f, dxpl_id, mesg->shared->dt, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display datatype message info")
HDfprintf(stream, "%*sDataspace...\n", indent, "");
HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Encoded Size:",
- (unsigned long)(mesg->shared->ds_size));
- if(H5S_debug(f, dxpl_id, mesg->shared->ds, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ "Encoded Size:", (unsigned long)(mesg->shared->ds_size));
+ if (H5S_debug(f, dxpl_id, mesg->shared->ds, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display dataspace message info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_debug() */
-
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 972ad2a..fa78d9e 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -6,18 +6,16 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
- * Created: H5Oattribute.c
- * Dec 11 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Oattribute.c
*
- * Purpose: Object header attribute routines.
+ * Purpose: Object header attribute routines.
*
*-------------------------------------------------------------------------
*/
@@ -26,132 +24,123 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Fprivate.h" /* File */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Fprivate.h" /* File */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for iteration when converting attributes to dense storage */
typedef struct {
- H5F_t *f; /* Pointer to file for insertion */
- hid_t dxpl_id; /* DXPL during iteration */
- H5O_ainfo_t *ainfo; /* Attribute info struct */
+ H5F_t * f; /* Pointer to file for insertion */
+ hid_t dxpl_id; /* DXPL during iteration */
+ H5O_ainfo_t *ainfo; /* Attribute info struct */
} H5O_iter_cvt_t;
/* User data for iteration when opening an attribute */
typedef struct {
/* down */
- const char *name; /* Name of attribute to open */
+ const char *name; /* Name of attribute to open */
/* up */
- H5A_t *attr; /* Attribute data to update object header with */
+ H5A_t *attr; /* Attribute data to update object header with */
} H5O_iter_opn_t;
/* User data for iteration when updating an attribute */
typedef struct {
/* down */
- H5F_t *f; /* Pointer to file attribute is in */
- hid_t dxpl_id; /* DXPL for operation */
- H5A_t *attr; /* Attribute data to update object header with */
+ H5F_t *f; /* Pointer to file attribute is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5A_t *attr; /* Attribute data to update object header with */
/* up */
- hbool_t found; /* Whether the attribute was found */
+ hbool_t found; /* Whether the attribute was found */
} H5O_iter_wrt_t;
/* User data for iteration when renaming an attribute */
typedef struct {
/* down */
- H5F_t *f; /* Pointer to file attribute is in */
- hid_t dxpl_id; /* DXPL for operation */
- const char *old_name; /* Old name of attribute */
- const char *new_name; /* New name of attribute */
+ H5F_t * f; /* Pointer to file attribute is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ const char *old_name; /* Old name of attribute */
+ const char *new_name; /* New name of attribute */
/* up */
- hbool_t found; /* Whether the attribute was found */
+ hbool_t found; /* Whether the attribute was found */
} H5O_iter_ren_t;
/* User data for iteration when iterating over attributes */
typedef struct {
/* down */
- H5F_t *f; /* Pointer to file attribute is in */
- hid_t dxpl_id; /* DXPL for operation */
- hid_t loc_id; /* ID of object being iterated over */
- unsigned skip; /* # of attributes to skip over */
- H5A_operator_t op; /* Callback routine for each attribute */
- void *op_data; /* User data for callback */
+ H5F_t * f; /* Pointer to file attribute is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ hid_t loc_id; /* ID of object being iterated over */
+ unsigned skip; /* # of attributes to skip over */
+ H5A_operator_t op; /* Callback routine for each attribute */
+ void * op_data; /* User data for callback */
/* up */
- unsigned count; /* Count of attributes examined */
+ unsigned count; /* Count of attributes examined */
} H5O_iter_itr_t;
/* User data for iteration when removing an attribute */
typedef struct {
/* down */
- H5F_t *f; /* Pointer to file attribute is in */
- hid_t dxpl_id; /* DXPL for operation */
- const char *name; /* Name of attribute to open */
+ H5F_t * f; /* Pointer to file attribute is in */
+ hid_t dxpl_id; /* DXPL for operation */
+ const char *name; /* Name of attribute to open */
/* up */
- hbool_t found; /* Found attribute to delete */
+ hbool_t found; /* Found attribute to delete */
} H5O_iter_rm_t;
/* User data for iteration when checking if an attribute exists */
typedef struct {
/* down */
- const char *name; /* Name of attribute to open */
+ const char *name; /* Name of attribute to open */
/* up */
- hbool_t found; /* Found attribute */
+ hbool_t found; /* Found attribute */
} H5O_iter_xst_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr,
- const char* name_to_open);
+static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_to_open);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_to_dense_cb
*
@@ -161,22 +150,17 @@ static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
- * Modifications:
- * Vailin Choi; Sept 2011
- * Indicate that the object header is modified and might possibly need
- * to condense messages in the object header
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
+H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
+ unsigned *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */
- H5A_t *attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */
+ H5A_t * attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -189,12 +173,12 @@ H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(attr);
/* Insert attribute into dense storage */
- if(H5A_dense_insert(udata->f, udata->dxpl_id, udata->ainfo, attr) < 0)
+ if (H5A_dense_insert(udata->f, udata->dxpl_id, udata->ainfo, attr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to add to dense storage")
/* Convert message into a null message in the header */
/* (don't delete attribute's space in the file though) */
- if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0)
+ if (H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message")
/* Indicate that the object header was modified */
@@ -204,7 +188,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_to_dense_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_create
*
@@ -220,10 +203,10 @@ done:
herr_t
H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -232,26 +215,26 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
HDassert(attr);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Check if this object already has attribute information */
- if(oh->version > H5O_VERSION_1) {
- hbool_t new_ainfo = FALSE; /* Flag to indicate that the attribute information is new */
- htri_t ainfo_exists; /* Whether the attribute info was retrieved */
+ if (oh->version > H5O_VERSION_1) {
+ hbool_t new_ainfo = FALSE; /* Flag to indicate that the attribute information is new */
+ htri_t ainfo_exists; /* Whether the attribute info was retrieved */
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
- if(!ainfo_exists) {
+ if (!ainfo_exists) {
/* Initialize attribute information */
- ainfo.track_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? TRUE : FALSE);
- ainfo.index_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? TRUE : FALSE);
- ainfo.max_crt_idx = 0;
+ ainfo.track_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? TRUE : FALSE);
+ ainfo.index_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? TRUE : FALSE);
+ ainfo.max_crt_idx = 0;
ainfo.corder_bt2_addr = HADDR_UNDEF;
- ainfo.nattrs = 0;
- ainfo.fheap_addr = HADDR_UNDEF;
- ainfo.name_bt2_addr = HADDR_UNDEF;
+ ainfo.nattrs = 0;
+ ainfo.fheap_addr = HADDR_UNDEF;
+ ainfo.name_bt2_addr = HADDR_UNDEF;
/* Set flag to add attribute information to object header */
new_ainfo = TRUE;
@@ -264,47 +247,48 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
} /* end else */
/* Check if switching to "dense" attribute storage is possible */
- if(!H5F_addr_defined(ainfo.fheap_addr)) {
- htri_t sharable; /* Whether the attribute will be shared */
- size_t raw_size = 0; /* Raw size of message */
+ if (!H5F_addr_defined(ainfo.fheap_addr)) {
+ htri_t sharable; /* Whether the attribute will be shared */
+ size_t raw_size = 0; /* Raw size of message */
/* Check for attribute being sharable */
- if((sharable = H5SM_can_share(loc->file, dxpl_id, NULL, NULL, H5O_ATTR_ID, attr)) < 0)
+ if ((sharable = H5SM_can_share(loc->file, dxpl_id, NULL, NULL, H5O_ATTR_ID, attr)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't determine attribute sharing status")
- else if(sharable == FALSE) {
+ else if (sharable == FALSE) {
/* Compute the size needed to encode the attribute */
raw_size = (H5O_MSG_ATTR->raw_size)(loc->file, FALSE, attr);
} /* end if */
/* Check for condititions for switching to "dense" attribute storage are met */
- if(ainfo.nattrs == oh->max_compact || (!sharable && raw_size >= H5O_MESG_MAX_SIZE)) {
- H5O_iter_cvt_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ if (ainfo.nattrs == oh->max_compact || (!sharable && raw_size >= H5O_MESG_MAX_SIZE)) {
+ H5O_iter_cvt_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Create dense storage for attributes */
- if(H5A_dense_create(loc->file, dxpl_id, &ainfo) < 0)
+ if (H5A_dense_create(loc->file, dxpl_id, &ainfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create dense storage for attributes")
/* Set up user data for callback */
- udata.f = loc->file;
+ udata.f = loc->file;
udata.dxpl_id = dxpl_id;
- udata.ainfo = &ainfo;
+ udata.ainfo = &ainfo;
/* Iterate over existing attributes, moving them to dense storage */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_to_dense_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTCONVERT, FAIL, "error converting attributes to dense storage")
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTCONVERT, FAIL,
+ "error converting attributes to dense storage")
} /* end if */
- } /* end if */
+ } /* end if */
/* Increment attribute count on object */
ainfo.nattrs++;
/* Check whether we're tracking the creation index on attributes */
- if(ainfo.track_corder) {
+ if (ainfo.track_corder) {
/* Check for attribute creation order index on the object wrapping around */
- if(ainfo.max_crt_idx == H5O_MAX_CRT_ORDER_IDX)
+ if (ainfo.max_crt_idx == H5O_MAX_CRT_ORDER_IDX)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINC, FAIL, "attribute creation index can't be incremented")
/* Set the creation order index on the attribute & incr. creation order index */
@@ -315,16 +299,18 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
attr->shared->crt_idx = H5O_MAX_CRT_ORDER_IDX;
/* Add the attribute information message, if one is needed */
- if(new_ainfo) {
- if(H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, &ainfo) < 0)
+ if (new_ainfo) {
+ if (H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0,
+ &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute info message")
} /* end if */
/* Otherwise, update existing message */
else {
- if(H5O_msg_write_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, &ainfo) < 0)
+ if (H5O_msg_write_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, &ainfo) <
+ 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message")
} /* end else */
- } /* end if */
+ } /* end if */
else {
/* Set "bogus" creation index for attribute */
attr->shared->crt_idx = H5O_MAX_CRT_ORDER_IDX;
@@ -334,14 +320,14 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
} /* end else */
/* Check for storing attribute with dense storage */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Insert attribute into dense storage */
- if(H5A_dense_insert(loc->file, dxpl_id, &ainfo, attr) < 0)
+ if (H5A_dense_insert(loc->file, dxpl_id, &ainfo, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage")
} /* end if */
else {
/* Append new message to object header */
- if(H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, attr) < 0)
+ if (H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute in header")
} /* end else */
@@ -352,11 +338,11 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
attr->shared->nrefs += 1;
/* Was new attribute shared? */
- if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) > 0) {
- hsize_t attr_rc; /* Attribute's ref count in shared message storage */
+ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) > 0) {
+ hsize_t attr_rc; /* Attribute's ref count in shared message storage */
/* Retrieve ref count for shared attribute */
- if(H5SM_get_refcount(loc->file, dxpl_id, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0)
+ if (H5SM_get_refcount(loc->file, dxpl_id, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
/* If this is not the first copy of the attribute in the shared message
@@ -382,26 +368,25 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
*
* *ick* -QAK, 2007/01/08
*/
- if(attr_rc > 1) {
- if(H5O_attr_delete(loc->file, dxpl_id, oh, attr) < 0)
+ if (attr_rc > 1) {
+ if (H5O_attr_delete(loc->file, dxpl_id, oh, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
} /* end if */
- } /* end if */
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ } /* end if */
+ else if (shared_mesg < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Update the modification time, if any */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_open_cb
*
@@ -411,21 +396,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
- * Modifications:
- * Vailin Choi; September 2011
- * Change oh_modified from boolean to unsigned
- * (See H5Oprivate.h for possible flags)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- unsigned H5_ATTR_UNUSED *oh_modified, void *_udata/*in,out*/)
+H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -435,15 +415,14 @@ H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
HDassert(!udata->attr);
/* Check for correct attribute message to modify */
- if(HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Make a copy of the attribute to return */
- if(NULL == (udata->attr = H5A_copy(NULL, (H5A_t *)mesg->native)))
+ if (NULL == (udata->attr = H5A_copy(NULL, (H5A_t *)mesg->native)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute")
/* Assign [somewhat arbitrary] creation order value, for older versions
* of the format or if creation order is not tracked */
- if(oh->version == H5O_VERSION_1
- || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
+ if (oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
udata->attr->shared->crt_idx = sequence;
/* Stop iterating */
@@ -454,7 +433,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_open_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_open_by_name
*
@@ -465,22 +443,17 @@ done:
* Programmer: Quincey Koziol
* Monday, December 11, 2006
*
- * Modification:Raymond Lu
- * 23 June 2008
- * If the attribute is in dense storage and has already been
- * opened, make a copy of already opened object to share some
- * object information.
*-------------------------------------------------------------------------
*/
H5A_t *
H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- H5A_t *exist_attr = NULL; /* Existing opened attribute object */
- H5A_t *opened_attr = NULL; /* Newly opened attribute object */
- htri_t found_open_attr = FALSE; /* Whether opened object is found */
- H5A_t *ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ H5A_t * exist_attr = NULL; /* Existing opened attribute object */
+ H5A_t * opened_attr = NULL; /* Newly opened attribute object */
+ htri_t found_open_attr = FALSE; /* Whether opened object is found */
+ H5A_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -489,49 +462,49 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
HDassert(name);
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't check for attribute info message")
} /* end if */
/* If found the attribute is already opened, make a copy of it to share the
* object information. If not, open attribute as a new object
*/
- if((found_open_attr = H5O_attr_find_opened_attr(loc, &exist_attr, name)) < 0)
+ if ((found_open_attr = H5O_attr_find_opened_attr(loc, &exist_attr, name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute")
- else if(found_open_attr == TRUE) {
- if(NULL == (opened_attr = H5A_copy(NULL, exist_attr)))
+ else if (found_open_attr == TRUE) {
+ if (NULL == (opened_attr = H5A_copy(NULL, exist_attr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute")
} /* end else if */
else {
/* Check for attributes in dense storage */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Open attribute with dense storage */
- if(NULL == (opened_attr = H5A_dense_open(loc->file, dxpl_id, &ainfo, name)))
+ if (NULL == (opened_attr = H5A_dense_open(loc->file, dxpl_id, &ainfo, name)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute")
} /* end if */
else {
- H5O_iter_opn_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_opn_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
udata.name = name;
udata.attr = NULL;
/* Iterate over attributes, to locate correct one to open */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_open_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "error updating attribute")
/* Check that we found the attribute */
- if(!udata.attr)
+ if (!udata.attr)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name)
/* Get attribute opened from object header */
@@ -540,7 +513,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
} /* end else */
/* Mark datatype as being on disk now */
- if(H5T_set_loc(opened_attr->shared->dt, loc->file, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(opened_attr->shared->dt, loc->file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location")
} /* end else */
@@ -548,18 +521,17 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
ret_value = opened_attr;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
/* Release any resources, on error */
- if(NULL == ret_value && opened_attr)
- if(H5A_close(opened_attr) < 0)
+ if (NULL == ret_value && opened_attr)
+ if (H5A_close(opened_attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_open_by_name() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_open_by_idx_cb
*
@@ -569,7 +541,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
@@ -577,8 +548,8 @@ done:
static herr_t
H5O_attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
{
- H5A_t **ret_attr = (H5A_t **)_ret_attr; /* 'User data' passed in */
- herr_t ret_value = H5_ITER_STOP; /* Return value */
+ H5A_t **ret_attr = (H5A_t **)_ret_attr; /* 'User data' passed in */
+ herr_t ret_value = H5_ITER_STOP; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -587,14 +558,13 @@ H5O_attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
HDassert(ret_attr);
/* Copy attribute information. Shared some attribute information. */
- if(NULL == (*ret_attr = H5A_copy(NULL, attr)))
+ if (NULL == (*ret_attr = H5A_copy(NULL, attr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_open_by_idx_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_open_by_idx
*
@@ -606,23 +576,18 @@ done:
* Programmer: Quincey Koziol
* Monday, December 18, 2006
*
- * Modification:Raymond Lu
- * 23 June 2008
- * After opening the attribute, check whether it's in dense
- * storage and has already been opened. If it has, close the
- * opened object and make a copy of already opened object.
*-------------------------------------------------------------------------
*/
H5A_t *
-H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
+H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- H5A_t *exist_attr = NULL; /* Existing opened attribute object */
- H5A_t *opened_attr = NULL; /* Newly opened attribute object */
- htri_t found_open_attr = FALSE; /* Whether opened object is found */
- H5A_t *ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ H5A_t * exist_attr = NULL; /* Existing opened attribute object */
+ H5A_t * opened_attr = NULL; /* Newly opened attribute object */
+ htri_t found_open_attr = FALSE; /* Whether opened object is found */
+ H5A_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -630,55 +595,55 @@ H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
HDassert(loc);
/* Build attribute operator info */
- attr_op.op_type = H5A_ATTR_OP_LIB;
+ attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5O_attr_open_by_idx_cb;
/* Iterate over attributes to locate correct one */
- if(H5O_attr_iterate_real((hid_t)-1, loc, dxpl_id, idx_type, order, n, NULL, &attr_op, &opened_attr) < 0)
+ if (H5O_attr_iterate_real((hid_t)-1, loc, dxpl_id, idx_type, order, n, NULL, &attr_op, &opened_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, NULL, "can't locate attribute")
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header")
/* Find out whether it has already been opened. If it has, close the object
* and make a copy of the already opened object to share the object info.
*/
- if(opened_attr) {
- if((found_open_attr = H5O_attr_find_opened_attr(loc, &exist_attr, opened_attr->shared->name)) < 0)
+ if (opened_attr) {
+ if ((found_open_attr = H5O_attr_find_opened_attr(loc, &exist_attr, opened_attr->shared->name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute")
/* If found that the attribute is already opened, make a copy of it
* and close the object just opened.
*/
- if(found_open_attr && exist_attr) {
- if(H5A_close(opened_attr) < 0)
+ if (found_open_attr && exist_attr) {
+ if (H5A_close(opened_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close attribute")
- if(NULL == (opened_attr = H5A_copy(NULL, exist_attr)))
+ if (NULL == (opened_attr = H5A_copy(NULL, exist_attr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute")
- } else {
+ }
+ else {
/* Mark datatype as being on disk now */
- if(H5T_set_loc(opened_attr->shared->dt, loc->file, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(opened_attr->shared->dt, loc->file, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location")
} /* end if */
- } /* end if */
+ } /* end if */
/* Set return value */
ret_value = opened_attr;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
/* Release any resources, on error */
- if(NULL == ret_value && opened_attr)
- if(H5A_close(opened_attr) < 0)
+ if (NULL == ret_value && opened_attr)
+ if (H5A_close(opened_attr) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close attribute")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_open_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_find_opened_attr
*
@@ -695,71 +660,70 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char* name_to_open)
+H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_to_open)
{
- hid_t *attr_id_list = NULL; /* List of IDs for opened attributes */
- unsigned long loc_fnum; /* File serial # for object */
- size_t num_open_attr; /* Number of opened attributes */
- htri_t ret_value = FALSE; /* Return value */
+ hid_t * attr_id_list = NULL; /* List of IDs for opened attributes */
+ unsigned long loc_fnum; /* File serial # for object */
+ size_t num_open_attr; /* Number of opened attributes */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Get file serial number for the location of attribute */
- if(H5F_get_fileno(loc->file, &loc_fnum) < 0)
+ if (H5F_get_fileno(loc->file, &loc_fnum) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number")
/* Count all opened attributes */
- if(H5F_get_obj_count(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, FALSE, &num_open_attr) < 0)
+ if (H5F_get_obj_count(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, FALSE, &num_open_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't count opened attributes")
/* Find out whether the attribute has been opened */
- if(num_open_attr) {
- size_t check_num_attr; /* Number of open attribute IDs */
- size_t u; /* Local index variable */
+ if (num_open_attr) {
+ size_t check_num_attr; /* Number of open attribute IDs */
+ size_t u; /* Local index variable */
/* Allocate space for the attribute ID list */
- if(NULL == (attr_id_list = (hid_t *)H5MM_malloc(num_open_attr * sizeof(hid_t))))
+ if (NULL == (attr_id_list = (hid_t *)H5MM_malloc(num_open_attr * sizeof(hid_t))))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "unable to allocate memory for attribute ID list")
/* Retrieve the IDs of all opened attributes */
- if(H5F_get_obj_ids(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, num_open_attr, attr_id_list, FALSE, &check_num_attr) < 0)
+ if (H5F_get_obj_ids(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, num_open_attr, attr_id_list, FALSE,
+ &check_num_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get IDs of opened attributes")
- if(check_num_attr != num_open_attr)
+ if (check_num_attr != num_open_attr)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "open attribute count mismatch")
/* Iterate over the attributes */
- for(u = 0; u < num_open_attr; u++) {
- unsigned long attr_fnum; /* Attributes file serial number */
+ for (u = 0; u < num_open_attr; u++) {
+ unsigned long attr_fnum; /* Attributes file serial number */
/* Get pointer to attribute */
- if(NULL == (*attr = (H5A_t *)H5I_object_verify(attr_id_list[u], H5I_ATTR)))
+ if (NULL == (*attr = (H5A_t *)H5I_object_verify(attr_id_list[u], H5I_ATTR)))
HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, FAIL, "not an attribute")
/* Get file serial number for attribute */
- if(H5F_get_fileno((*attr)->oloc.file, &attr_fnum) < 0)
+ if (H5F_get_fileno((*attr)->oloc.file, &attr_fnum) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number")
/* Verify whether it's the right object. The attribute name, object
* address to which the attribute is attached, and file serial
* number should all match.
*/
- if(!HDstrcmp(name_to_open, (*attr)->shared->name) &&
- loc->addr == (*attr)->oloc.addr &&
- loc_fnum == attr_fnum) {
+ if (!HDstrcmp(name_to_open, (*attr)->shared->name) && loc->addr == (*attr)->oloc.addr &&
+ loc_fnum == attr_fnum) {
ret_value = TRUE;
break;
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
done:
- if(attr_id_list)
+ if (attr_id_list)
H5MM_free(attr_id_list);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_find_opened_attr */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_update_shared
*
@@ -768,19 +732,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 2 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr,
- H5O_shared_t *update_sh_mesg)
+H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr, H5O_shared_t *update_sh_mesg)
{
- H5O_shared_t sh_mesg; /* Shared object header message */
- hsize_t attr_rc; /* Attribute's ref count in shared message storage */
- htri_t shared_mesg; /* Whether the message should be shared */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_shared_t sh_mesg; /* Shared object header message */
+ hsize_t attr_rc; /* Attribute's ref count in shared message storage */
+ htri_t shared_mesg; /* Whether the message should be shared */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -789,22 +751,22 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr,
HDassert(attr);
/* Extract shared message info from current attribute (for later use) */
- if(H5O_set_shared(&sh_mesg, &(attr->sh_loc)) < 0)
+ if (H5O_set_shared(&sh_mesg, &(attr->sh_loc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message")
/* Reset existing sharing information */
- if(H5O_msg_reset_share(H5O_ATTR_ID, attr) < 0)
+ if (H5O_msg_reset_share(H5O_ATTR_ID, attr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing")
/* Store new version of message as a SOHM */
/* (should always work, since we're not changing the size of the attribute) */
- if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, 0, H5O_ATTR_ID, attr, NULL)) == 0)
+ if ((shared_mesg = H5SM_try_share(f, dxpl_id, oh, 0, H5O_ATTR_ID, attr, NULL)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "attribute changed sharing status")
- else if(shared_mesg < 0)
+ else if (shared_mesg < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't share attribute")
/* Retrieve shared message storage ref count for new shared attribute */
- if(H5SM_get_refcount(f, dxpl_id, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0)
+ if (H5SM_get_refcount(f, dxpl_id, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
/* If the newly shared attribute needs to share "ownership" of the shared
@@ -816,26 +778,25 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr,
*
* *ick* -QAK, 2007/01/08
*/
- if(attr_rc == 1) {
+ if (attr_rc == 1) {
/* Increment reference count on attribute components */
- if(H5O_attr_link(f, dxpl_id, oh, attr) < 0)
+ if (H5O_attr_link(f, dxpl_id, oh, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count")
} /* end if */
/* Remove the old attribute from the SOHM storage */
- if(H5SM_delete(f, dxpl_id, oh, &sh_mesg) < 0)
+ if (H5SM_delete(f, dxpl_id, oh, &sh_mesg) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute in shared storage")
/* Extract updated shared message info from modified attribute, if requested */
- if(update_sh_mesg)
- if(H5O_set_shared(update_sh_mesg, &(attr->sh_loc)) < 0)
+ if (update_sh_mesg)
+ if (H5O_set_shared(update_sh_mesg, &(attr->sh_loc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_update_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_write_cb
*
@@ -845,28 +806,22 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
* Modification:Raymond Lu
* 4 June 2008
* Took out the data copying part because the attribute data
* is shared between attribute handle and object header.
- *
- * Modifications:
- * Vailin Choi; Sept 2011
- * Indicate that the object header is modified but does not need to
- * condense messages in the object header
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
+H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
+ unsigned *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_wrt_t *udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_wrt_t * udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -876,15 +831,15 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(!udata->found);
/* Check for correct attribute message to modify */
- if(0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
+ if (0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(udata->f, udata->dxpl_id, oh, mesg->chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(udata->f, udata->dxpl_id, oh, mesg->chunkno)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk")
/* Because the attribute structure is shared now. The only situation that requires
- * copying the data is when the metadata cache evicts and reloads this attribute.
+ * copying the data is when the metadata cache evicts and reloads this attribute.
* The shared attribute structure will be different in that situation. SLU-2010/7/29 */
- if(((H5A_t *)mesg->native)->shared != udata->attr->shared) {
+ if (((H5A_t *)mesg->native)->shared != udata->attr->shared) {
/* Sanity check */
HDassert(((H5A_t *)mesg->native)->shared->data);
HDassert(udata->attr->shared->data);
@@ -892,7 +847,8 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
/* (Needs to occur before updating the shared message, or the hash
* value on the old & new messages will be the same) */
- HDmemcpy(((H5A_t *)mesg->native)->shared->data, udata->attr->shared->data, udata->attr->shared->data_size);
+ HDmemcpy(((H5A_t *)mesg->native)->shared->data, udata->attr->shared->data,
+ udata->attr->shared->data_size);
} /* end if */
/* Mark the message as modified */
@@ -900,14 +856,16 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
chk_dirtied = TRUE;
/* Release chunk */
- if(H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk")
chk_proxy = NULL;
/* Update the shared attribute in the SOHM storage */
- if(mesg->flags & H5O_MSG_FLAG_SHARED)
- if(H5O_attr_update_shared(udata->f, udata->dxpl_id, oh, udata->attr, (H5O_shared_t *)mesg->native) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, "unable to update attribute in shared storage")
+ if (mesg->flags & H5O_MSG_FLAG_SHARED)
+ if (H5O_attr_update_shared(udata->f, udata->dxpl_id, oh, udata->attr,
+ (H5O_shared_t *)mesg->native) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR,
+ "unable to update attribute in shared storage")
/* Indicate that the object header was modified */
*oh_modified = H5O_MODIFY;
@@ -921,13 +879,12 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
done:
/* Release chunk, if not already done */
- if(chk_proxy && H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_write_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_write
*
@@ -943,9 +900,9 @@ done:
herr_t
H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -954,56 +911,55 @@ H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
HDassert(attr);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Modify the attribute data in dense storage */
- if(H5A_dense_write(loc->file, dxpl_id, &ainfo, attr) < 0)
+ if (H5A_dense_write(loc->file, dxpl_id, &ainfo, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
} /* end if */
else {
- H5O_iter_wrt_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_wrt_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
- udata.f = loc->file;
+ udata.f = loc->file;
udata.dxpl_id = dxpl_id;
- udata.attr = attr;
- udata.found = FALSE;
+ udata.attr = attr;
+ udata.found = FALSE;
/* Iterate over attributes, to locate correct one to update */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_write_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
/* Check that we found the attribute */
- if(!udata.found)
+ if (!udata.found)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate open attribute?")
} /* end else */
/* Update the modification time, if any */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_write */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_rename_chk_cb
*
@@ -1013,21 +969,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 5 2006
*
- * Modifications:
- * Vailin Choi; September 2011
- * Change "oh_modified" from boolean to unsigned
- * (See H5Oprivate.h for possible flags)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned H5_ATTR_UNUSED *oh_modified, void *_udata/*in,out*/)
+H5O_attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/,
+ unsigned H5_ATTR_UNUSED sequence, unsigned H5_ATTR_UNUSED *oh_modified,
+ void *_udata /*in,out*/)
{
- H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1037,7 +989,7 @@ H5O_attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(!udata->found);
/* Check for existing attribute with new name */
- if(HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
+ if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
/* Indicate that we found an existing attribute with the new name*/
udata->found = TRUE;
@@ -1048,7 +1000,6 @@ H5O_attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_rename_chk_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_rename_mod_cb
*
@@ -1063,23 +1014,18 @@ H5O_attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 5 2006
*
- * Modifications:
- * Vailin Choi; Sept 2011
- * Indicate that the object header is modified and might possibly need
- * to condense messages in the object header
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
+H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
+ unsigned *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_ren_t * udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1089,11 +1035,11 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(!udata->found);
/* Find correct attribute message to rename */
- if(HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
- unsigned old_version = ((H5A_t *)mesg->native)->shared->version; /* Old version of the attribute */
+ if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
+ unsigned old_version = ((H5A_t *)mesg->native)->shared->version; /* Old version of the attribute */
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(udata->f, udata->dxpl_id, oh, mesg->chunkno)))
+ if (NULL == (chk_proxy = H5O_chunk_protect(udata->f, udata->dxpl_id, oh, mesg->chunkno)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk")
/* Change the name for the attribute */
@@ -1101,7 +1047,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
((H5A_t *)mesg->native)->shared->name = H5MM_xstrdup(udata->new_name);
/* Recompute the version to encode the attribute with */
- if(H5A_set_version(udata->f, ((H5A_t *)mesg->native)) < 0)
+ if (H5A_set_version(udata->f, ((H5A_t *)mesg->native)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5_ITER_ERROR, "unable to update attribute version")
/* Mark the message as modified */
@@ -1109,24 +1055,25 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
chk_dirtied = TRUE;
/* Release chunk */
- if(H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk")
chk_proxy = NULL;
/* Check for shared message */
- if(mesg->flags & H5O_MSG_FLAG_SHARED) {
+ if (mesg->flags & H5O_MSG_FLAG_SHARED) {
/* Update the shared attribute in the SOHM storage */
- if(H5O_attr_update_shared(udata->f, udata->dxpl_id, oh, (H5A_t *)mesg->native, NULL) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, "unable to update attribute in shared storage")
+ if (H5O_attr_update_shared(udata->f, udata->dxpl_id, oh, (H5A_t *)mesg->native, NULL) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR,
+ "unable to update attribute in shared storage")
} /* end if */
else {
/* Sanity check */
HDassert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
/* Check for attribute message changing size */
- if(HDstrlen(udata->new_name) != HDstrlen(udata->old_name) ||
- old_version != ((H5A_t *)mesg->native)->shared->version) {
- H5A_t *attr; /* Attribute to re-add */
+ if (HDstrlen(udata->new_name) != HDstrlen(udata->old_name) ||
+ old_version != ((H5A_t *)mesg->native)->shared->version) {
+ H5A_t *attr; /* Attribute to re-add */
/* Take ownership of the message's native info (the attribute)
* so any shared objects in the file aren't adjusted (and
@@ -1138,22 +1085,25 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
* list of messages during the "add the modified attribute"
* step, invalidating the message pointer we have here - QAK)
*/
- attr = (H5A_t *)mesg->native;
+ attr = (H5A_t *)mesg->native;
mesg->native = NULL;
/* Delete old attribute */
- /* (doesn't decrement the link count on shared components becuase
+ /* (doesn't decrement the link count on shared components because
* the "native" pointer has been reset)
*/
- if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release previous attribute")
+ if (H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR,
+ "unable to release previous attribute")
- *oh_modified = H5O_MODIFY_CONDENSE;
+ *oh_modified = H5O_MODIFY_CONDENSE;
/* Append renamed attribute to object header */
/* (Don't let it become shared) */
- if(H5O_msg_append_real(udata->f, udata->dxpl_id, oh, H5O_MSG_ATTR, (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to relocate renamed attribute in header")
+ if (H5O_msg_append_real(udata->f, udata->dxpl_id, oh, H5O_MSG_ATTR,
+ (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5_ITER_ERROR,
+ "unable to relocate renamed attribute in header")
/* Sanity check */
HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
@@ -1161,7 +1111,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
/* Close the local copy of the attribute */
H5A_close(attr);
} /* end if */
- } /* end else */
+ } /* end else */
/* Indicate that the object header was modified */
*oh_modified |= H5O_MODIFY;
@@ -1175,13 +1125,12 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
done:
/* Release chunk, if not already done */
- if(chk_proxy && H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(udata->f, udata->dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_rename_mod_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_rename
*
@@ -1195,12 +1144,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
- const char *new_name)
+H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name, const char *new_name)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1210,67 +1158,66 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
HDassert(new_name);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Rename the attribute data in dense storage */
- if(H5A_dense_rename(loc->file, dxpl_id, &ainfo, old_name, new_name) < 0)
+ if (H5A_dense_rename(loc->file, dxpl_id, &ainfo, old_name, new_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
} /* end if */
else {
- H5O_iter_ren_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_ren_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
- udata.f = loc->file;
- udata.dxpl_id = dxpl_id;
+ udata.f = loc->file;
+ udata.dxpl_id = dxpl_id;
udata.old_name = old_name;
udata.new_name = new_name;
- udata.found = FALSE;
+ udata.found = FALSE;
/* Iterate over attributes, to check if "new name" exists already */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_rename_chk_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
/* If the new name was found, indicate an error */
- if(udata.found)
+ if (udata.found)
HGOTO_ERROR(H5E_ATTR, H5E_EXISTS, FAIL, "attribute with new name already exists")
/* Iterate over attributes again, to actually rename attribute with old name */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_rename_mod_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
/* Check that we found the attribute to rename */
- if(!udata.found)
+ if (!udata.found)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute with old name")
} /* end else */
/* Update the modification time, if any */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_rename */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_iterate_real
*
@@ -1284,14 +1231,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
- hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data)
+H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_attr,
+ const H5A_attr_iter_op_t *attr_op, void *op_data)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- herr_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1302,62 +1249,62 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
HDassert(attr_op);
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for skipping too many attributes */
- if(skip > 0 && skip >= ainfo.nattrs)
+ if (skip > 0 && skip >= ainfo.nattrs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
/* Release the object header */
- if(H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
oh = NULL;
/* Iterate over attributes in dense storage */
- if((ret_value = H5A_dense_iterate(loc->file, dxpl_id, loc_id, &ainfo, idx_type, order, skip, last_attr, attr_op, op_data)) < 0)
+ if ((ret_value = H5A_dense_iterate(loc->file, dxpl_id, loc_id, &ainfo, idx_type, order, skip,
+ last_attr, attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
} /* end if */
else {
/* Build table of attributes for compact storage */
- if(H5A_compact_build_table(loc->file, dxpl_id, oh, idx_type, order, &atable) < 0)
+ if (H5A_compact_build_table(loc->file, dxpl_id, oh, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Release the object header */
- if(H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
oh = NULL;
/* Check for skipping too many attributes */
- if(skip > 0 && skip >= atable.nattrs)
+ if (skip > 0 && skip >= atable.nattrs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
/* Iterate over attributes in table */
- if((ret_value = H5A_attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0)
+ if ((ret_value = H5A_attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
done:
/* Release resources */
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if(atable.attrs && H5A_attr_release_table(&atable) < 0)
+ if (atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_iterate_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_iterate
*
@@ -1371,12 +1318,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
- hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data)
+H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t skip,
+ hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data)
{
- H5G_loc_t loc; /* Object location */
- herr_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1384,18 +1330,18 @@ H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id,
HDassert(attr_op);
/* Look up location for location ID */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Iterate over attributes to locate correct one */
- if((ret_value = H5O_attr_iterate_real(loc_id, loc.oloc, dxpl_id, idx_type, order, skip, last_attr, attr_op, op_data)) < 0)
+ if ((ret_value = H5O_attr_iterate_real(loc_id, loc.oloc, dxpl_id, idx_type, order, skip, last_attr,
+ attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_remove_update
*
@@ -1417,11 +1363,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
- hid_t dxpl_id)
+H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo, hid_t dxpl_id)
{
- H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1434,40 +1379,41 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
ainfo->nattrs--;
/* Check for shifting from dense storage back to compact storage */
- if(H5F_addr_defined(ainfo->fheap_addr) && ainfo->nattrs < oh->min_dense) {
- hbool_t can_convert = TRUE; /* Whether converting to attribute messages is possible */
- size_t u; /* Local index */
+ if (H5F_addr_defined(ainfo->fheap_addr) && ainfo->nattrs < oh->min_dense) {
+ hbool_t can_convert = TRUE; /* Whether converting to attribute messages is possible */
+ size_t u; /* Local index */
/* Build the table of attributes for this object */
- if(H5A_dense_build_table(loc->file, dxpl_id, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, &atable) < 0)
+ if (H5A_dense_build_table(loc->file, dxpl_id, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Inspect attributes in table for ones that can't be converted back
* into attribute message form (currently only attributes which
* can't fit into an object header message)
*/
- for(u = 0; u < ainfo->nattrs; u++)
- if(H5O_msg_size_oh(loc->file, oh, H5O_ATTR_ID, (atable.attrs[u]), (size_t)0) >= H5O_MESG_MAX_SIZE) {
+ for (u = 0; u < ainfo->nattrs; u++)
+ if (H5O_msg_size_oh(loc->file, oh, H5O_ATTR_ID, (atable.attrs[u]), (size_t)0) >=
+ H5O_MESG_MAX_SIZE) {
can_convert = FALSE;
break;
} /* end if */
/* If ok, insert attributes as object header messages */
- if(can_convert) {
- H5A_t *exist_attr = NULL;
+ if (can_convert) {
+ H5A_t *exist_attr = NULL;
htri_t found_open_attr = FALSE;
/* Iterate over attributes, to put them into header */
- for(u = 0; u < ainfo->nattrs; u++) {
- htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
+ for (u = 0; u < ainfo->nattrs; u++) {
+ htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
/* Check if attribute is shared */
- if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, (atable.attrs[u]))) < 0)
+ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, (atable.attrs[u]))) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared")
- else if(shared_mesg == 0) {
+ else if (shared_mesg == 0) {
/* Increment reference count on attribute components */
/* (so that they aren't deleted when the dense attribute storage is deleted) */
- if(H5O_attr_link(loc->file, dxpl_id, oh, (atable.attrs[u])) < 0)
+ if (H5O_attr_link(loc->file, dxpl_id, oh, (atable.attrs[u])) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count")
} /* end if */
else {
@@ -1478,48 +1424,49 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
/* Insert attribute message into object header (Will increment
reference count on shared attributes) */
/* Find out whether the attribute has been opened */
- if((found_open_attr = H5O_attr_find_opened_attr(loc, &exist_attr, (atable.attrs[u])->shared->name)) < 0)
+ if ((found_open_attr =
+ H5O_attr_find_opened_attr(loc, &exist_attr, (atable.attrs[u])->shared->name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "failed in finding opened attribute")
/* If found the attribute is already opened, use the opened message to insert.
If not, still use the message in the attribute table. */
- if(found_open_attr && exist_attr) {
- if(H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, exist_attr) < 0)
+ if (found_open_attr && exist_attr) {
+ if (H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, exist_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message")
-
- } else {
- if(H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, (atable.attrs[u])) < 0)
+ }
+ else {
+ if (H5O_msg_append_real(loc->file, dxpl_id, oh, H5O_MSG_ATTR, 0, 0, (atable.attrs[u])) <
+ 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message")
}
} /* end for */
/* Remove the dense storage */
- if(H5A_dense_delete(loc->file, dxpl_id, ainfo) < 0)
+ if (H5A_dense_delete(loc->file, dxpl_id, ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete dense attribute storage")
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if we have deleted all the attributes and the attribute info
* message should be deleted itself.
*/
- if(ainfo->nattrs == 0) {
- if(H5O_msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, TRUE, dxpl_id) < 0)
+ if (ainfo->nattrs == 0) {
+ if (H5O_msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, TRUE, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute info")
} /* end if */
else {
- if(H5O_msg_write_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, ainfo) < 0)
+ if (H5O_msg_write_real(loc->file, dxpl_id, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message")
} /* end else */
done:
/* Release resources */
- if(atable.attrs && H5A_attr_release_table(&atable) < 0)
+ if (atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_remove_update() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_remove_cb
*
@@ -1529,21 +1476,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
- * Modifications:
- * Vailin Choi; Sept 2011
- * Indicate that the object header is modified and might possibly need
- * to condense messages in the object header
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
+H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
+ unsigned *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1553,9 +1495,9 @@ H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(!udata->found);
/* Check for correct attribute message to modify */
- if(HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Convert message into a null message (i.e. delete it) */
- if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, TRUE) < 0)
+ if (H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message")
/* Indicate that the object header was modified */
@@ -1572,7 +1514,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_remove_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_remove
*
@@ -1588,10 +1529,10 @@ done:
herr_t
H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1600,61 +1541,60 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
HDassert(name);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Delete attribute from dense storage */
- if(H5A_dense_remove(loc->file, dxpl_id, &ainfo, name) < 0)
+ if (H5A_dense_remove(loc->file, dxpl_id, &ainfo, name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end if */
else {
- H5O_iter_rm_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_rm_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
- udata.f = loc->file;
+ udata.f = loc->file;
udata.dxpl_id = dxpl_id;
- udata.name = name;
- udata.found = FALSE;
+ udata.name = name;
+ udata.found = FALSE;
/* Iterate over attributes, to locate correct one to delete */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_remove_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute")
/* Check that we found the attribute */
- if(!udata.found)
+ if (!udata.found)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute")
} /* end else */
/* Update the attribute information after removing an attribute */
- if(ainfo_exists)
- if(H5O_attr_remove_update(loc, oh, &ainfo, dxpl_id) < 0)
+ if (ainfo_exists)
+ if (H5O_attr_remove_update(loc, oh, &ainfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info")
/* Update the modification time, if any */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_remove_by_idx
*
@@ -1669,14 +1609,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
+H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
- H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1684,71 +1624,70 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
HDassert(loc);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Delete attribute from dense storage */
- if(H5A_dense_remove_by_idx(loc->file, dxpl_id, &ainfo, idx_type, order, n) < 0)
+ if (H5A_dense_remove_by_idx(loc->file, dxpl_id, &ainfo, idx_type, order, n) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end if */
else {
- H5O_iter_rm_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_rm_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Build table of attributes for compact storage */
- if(H5A_compact_build_table(loc->file, dxpl_id, oh, idx_type, order, &atable) < 0)
+ if (H5A_compact_build_table(loc->file, dxpl_id, oh, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Check for skipping too many attributes */
- if(n >= atable.nattrs)
+ if (n >= atable.nattrs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
/* Set up user data for callback, to remove the attribute by name */
- udata.f = loc->file;
+ udata.f = loc->file;
udata.dxpl_id = dxpl_id;
- udata.name = ((atable.attrs[n])->shared)->name;
- udata.found = FALSE;
+ udata.name = ((atable.attrs[n])->shared)->name;
+ udata.found = FALSE;
/* Iterate over attributes, to locate correct one to delete */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_remove_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute")
/* Check that we found the attribute */
- if(!udata.found)
+ if (!udata.found)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute")
} /* end else */
/* Update the attribute information after removing an attribute */
- if(ainfo_exists)
- if(H5O_attr_remove_update(loc, oh, &ainfo, dxpl_id) < 0)
+ if (ainfo_exists)
+ if (H5O_attr_remove_update(loc, oh, &ainfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info")
/* Update the modification time, if any */
- if(H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
- if(atable.attrs && H5A_attr_release_table(&atable) < 0)
+ if (atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_remove_by_idx() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_count_real
*
@@ -1764,7 +1703,7 @@ done:
herr_t
H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1774,26 +1713,26 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs)
HDassert(nattrs);
/* Check for attributes stored densely */
- if(oh->version > H5O_VERSION_1) {
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
- H5O_ainfo_t ainfo; /* Attribute information for object */
+ if (oh->version > H5O_VERSION_1) {
+ htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
/* Attempt to get the attribute information from the object header */
- if((ainfo_exists = H5A_get_ainfo(f, dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(f, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
- else if(ainfo_exists > 0)
+ else if (ainfo_exists > 0)
*nattrs = ainfo.nattrs;
else
*nattrs = 0;
} /* end if */
else {
- hsize_t attr_count; /* Number of attributes found */
- unsigned u; /* Local index variable */
+ hsize_t attr_count; /* Number of attributes found */
+ unsigned u; /* Local index variable */
/* Loop over all messages, counting the attributes */
attr_count = 0;
- for(u = 0; u < oh->nmesgs; u++)
- if(oh->mesg[u].type == H5O_MSG_ATTR)
+ for (u = 0; u < oh->nmesgs; u++)
+ if (oh->mesg[u].type == H5O_MSG_ATTR)
attr_count++;
*nattrs = attr_count;
} /* end else */
@@ -1802,7 +1741,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_count_real */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_exists_cb
*
@@ -1812,21 +1750,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
- * Modifications:
- * Vailin Choi; September 2011
- * Change "oh_modified" from boolean to unsigned
- * (See H5Oprivate.h for possible flags)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned H5_ATTR_UNUSED sequence, unsigned H5_ATTR_UNUSED *oh_modified, void *_udata/*in,out*/)
+H5O_attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
+ unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1835,7 +1768,7 @@ H5O_attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
HDassert(!udata->found);
/* Check for correct attribute message */
- if(HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Indicate that this message is the attribute sought */
udata->found = TRUE;
@@ -1846,7 +1779,6 @@ H5O_attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_exists_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_exists
*
@@ -1862,9 +1794,9 @@ H5O_attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
htri_t
H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1873,37 +1805,37 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
HDassert(name);
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for attributes stored densely */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check if attribute exists in dense storage */
- if((ret_value = H5A_dense_exists(loc->file, dxpl_id, &ainfo, name)) < 0)
+ if ((ret_value = H5A_dense_exists(loc->file, dxpl_id, &ainfo, name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute")
} /* end if */
else {
- H5O_iter_rm_t udata; /* User data for callback */
- H5O_mesg_operator_t op; /* Wrapper for operator */
+ H5O_iter_rm_t udata; /* User data for callback */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
- udata.f = loc->file;
+ udata.f = loc->file;
udata.dxpl_id = dxpl_id;
- udata.name = name;
- udata.found = FALSE;
+ udata.name = name;
+ udata.found = FALSE;
/* Iterate over existing attributes, checking for attribute with same name */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_attr_exists_cb;
- if(H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute")
/* Check that we found the attribute */
@@ -1911,13 +1843,12 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
} /* end else */
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_exists */
-
/*-------------------------------------------------------------------------
* Function: H5O_attr_bh_info
*
@@ -1933,10 +1864,10 @@ done:
herr_t
H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
{
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5HF_t *fheap = NULL; /* Fractal heap handle */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1945,63 +1876,64 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HDassert(bh_info);
/* Attributes are only stored in fractal heap & indexed w/v2 B-tree in later versions */
- if(oh->version > H5O_VERSION_1) {
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ if (oh->version > H5O_VERSION_1) {
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(f, dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(f, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
- else if(ainfo_exists > 0) {
+ else if (ainfo_exists > 0) {
/* Check if name index available */
- if(H5F_addr_defined(ainfo.name_bt2_addr)) {
+ if (H5F_addr_defined(ainfo.name_bt2_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Get name index B-tree size */
- if(H5B2_size(bt2_name, dxpl_id, &(bh_info->index_size)) < 0)
+ if (H5B2_size(bt2_name, dxpl_id, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info")
} /* end if */
/* Check if creation order index available */
- if(H5F_addr_defined(ainfo.corder_bt2_addr)) {
+ if (H5F_addr_defined(ainfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo.corder_bt2_addr, NULL)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
+ if (NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo.corder_bt2_addr, NULL)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL,
+ "unable to open v2 B-tree for creation order index")
/* Get creation order index B-tree size */
- if(H5B2_size(bt2_corder, dxpl_id, &(bh_info->index_size)) < 0)
+ if (H5B2_size(bt2_corder, dxpl_id, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info")
} /* end if */
/* Get storage size of fractal heap, if it's used */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Open the fractal heap for attributes */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo.fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, ainfo.fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Get heap storage size */
- if(H5HF_size(fheap, dxpl_id, &(bh_info->heap_size)) < 0)
+ if (H5HF_size(fheap, dxpl_id, &(bh_info->heap_size)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info")
} /* end if */
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
- if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_attr_bh_info() */
+} /* H5O_attr_bh_info() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5O_attr_count
*
@@ -2017,9 +1949,9 @@ done:
int
H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- hsize_t nattrs; /* Number of attributes */
- int ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ hsize_t nattrs; /* Number of attributes */
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -2027,21 +1959,20 @@ H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id)
HDassert(loc);
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Retrieve # of attributes on object */
- if(H5O_attr_count_real(loc->file, dxpl_id, oh, &nattrs) < 0)
+ if (H5O_attr_count_real(loc->file, dxpl_id, oh, &nattrs) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve attribute count")
/* Set return value */
ret_value = (int)nattrs;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_attr_count */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index ba9a8ad..ebb41c7 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Obogus.c
* Jan 21 2003
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "bogus" message. This message is guaranteed to never
* be found in a valid HDF5 file and is only used to
@@ -26,72 +26,71 @@
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
#ifdef H5O_ENABLE_BOGUS
/* PRIVATE PROTOTYPES */
-static void *H5O_bogus_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_bogus_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_bogus_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
static size_t H5O_bogus_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static herr_t H5O_bogus_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O_bogus_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_BOGUS_VALID[1] = {{
- H5O_BOGUS_VALID_ID, /*message id number */
- "bogus valid", /*message name for debugging */
- 0, /*native message size */
- 0, /*messages are sharable? */
- H5O_bogus_decode, /*decode message */
- H5O_bogus_encode, /*encode message */
- NULL, /*copy the native value */
- H5O_bogus_size, /*raw message size */
- NULL, /*free internal memory */
- NULL, /*free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_bogus_debug /*debug the message */
+ H5O_BOGUS_VALID_ID, /*message id number */
+ "bogus valid", /*message name for debugging */
+ 0, /*native message size */
+ H5O_SHARE_IS_SHARABLE, /*messages are sharable? */
+ H5O_bogus_decode, /*decode message */
+ H5O_bogus_encode, /*encode message */
+ NULL, /*copy the native value */
+ H5O_bogus_size, /*raw message size */
+ NULL, /*free internal memory */
+ NULL, /*free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_bogus_debug /*debug the message */
}};
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{
- H5O_BOGUS_INVALID_ID, /*message id number */
- "bogus invalid", /*message name for debugging */
- 0, /*native message size */
- 0, /*messages are sharable? */
- H5O_bogus_decode, /*decode message */
- H5O_bogus_encode, /*encode message */
- NULL, /*copy the native value */
- H5O_bogus_size, /*raw message size */
- NULL, /*free internal memory */
- NULL, /*free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_bogus_debug /*debug the message */
+ H5O_BOGUS_INVALID_ID, /*message id number */
+ "bogus invalid", /*message name for debugging */
+ 0, /*native message size */
+ H5O_SHARE_IS_SHARABLE, /*messages are sharable? */
+ H5O_bogus_decode, /*decode message */
+ H5O_bogus_encode, /*encode message */
+ NULL, /*copy the native value */
+ H5O_bogus_size, /*raw message size */
+ NULL, /*free internal memory */
+ NULL, /*free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_bogus_debug /*debug the message */
}};
-
/*-------------------------------------------------------------------------
* Function: H5O_bogus_decode
*
@@ -103,18 +102,17 @@ const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
*/
static void *
H5O_bogus_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
H5O_bogus_t *mesg = NULL;
- void *ret_value; /* Return value */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -123,27 +121,26 @@ H5O_bogus_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
HDassert(p);
/* Allocate the bogus message */
- if(NULL == (mesg = (H5O_bogus_t *)H5MM_calloc(sizeof(H5O_bogus_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (mesg = (H5O_bogus_t *)H5MM_calloc(sizeof(H5O_bogus_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* decode */
UINT32DECODE(p, mesg->u);
/* Validate the bogus info */
- if(mesg->u != H5O_BOGUS_VALUE)
- HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid bogus value :-)")
+ if (mesg->u != H5O_BOGUS_VALUE)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid bogus value :-)")
/* Set return value */
ret_value = mesg;
done:
- if(ret_value == NULL && mesg != NULL)
+ if (ret_value == NULL && mesg != NULL)
H5MM_xfree(mesg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_bogus_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_bogus_encode
*
@@ -152,13 +149,13 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void H5_ATTR_UNUSED *mesg)
+H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -173,7 +170,6 @@ H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_bogus_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_bogus_size
*
@@ -187,20 +183,19 @@ H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *mesg)
+H5O_bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+ const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(4)
} /* end H5O_bogus_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_bogus_debug
*
@@ -209,18 +204,15 @@ H5O_bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_bogus_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
- const H5O_bogus_t *mesg = (const H5O_bogus_t *)_mesg;
+ const H5O_bogus_t *mesg = (const H5O_bogus_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -231,10 +223,8 @@ H5O_bogus_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth,
- "Bogus Value:", mesg->u);
+ HDfprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_bogus_debug() */
#endif /* H5O_ENABLE_BOGUS */
-
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index 6bcdcc3..88a84d6 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -6,62 +6,60 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, March 1, 2007
*
* Purpose: A message holding non-default v1 B-tree 'K' value
* information in the superblock extension.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Opkg.h" /* Object headers */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Opkg.h" /* Object headers */
+#include "H5MMprivate.h" /* Memory management */
-static void *H5O_btreek_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_btreek_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_btreek_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_btreek_copy(const void *_mesg, void *_dest);
+static void * H5O_btreek_copy(const void *_mesg, void *_dest);
static size_t H5O_btreek_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static herr_t H5O_btreek_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O_btreek_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
- H5O_BTREEK_ID, /*message id number */
- "v1 B-tree 'K' values", /*message name for debugging */
- sizeof(H5O_btreek_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_btreek_decode, /*decode message */
- H5O_btreek_encode, /*encode message */
- H5O_btreek_copy, /*copy the native value */
- H5O_btreek_size, /*raw message size */
- NULL, /*free internal memory */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_btreek_debug /*debug the message */
+ H5O_BTREEK_ID, /*message id number */
+ "v1 B-tree 'K' values", /*message name for debugging */
+ sizeof(H5O_btreek_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_btreek_decode, /*decode message */
+ H5O_btreek_encode, /*encode message */
+ H5O_btreek_copy, /*copy the native value */
+ H5O_btreek_size, /*raw message size */
+ NULL, /*free internal memory */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_btreek_debug /*debug the message */
}};
/* Current version of v1 B-tree 'K' value information */
-#define H5O_BTREEK_VERSION 0
+#define H5O_BTREEK_VERSION 0
-
/*-------------------------------------------------------------------------
* Function: H5O_btreek_decode
*
@@ -78,11 +76,11 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
*/
static void *
H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_btreek_t *mesg; /* Native message */
- void *ret_value; /* Return value */
+ H5O_btreek_t *mesg; /* Native message */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -91,12 +89,12 @@ H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H
HDassert(p);
/* Version of message */
- if(*p++ != H5O_BTREEK_VERSION)
+ if (*p++ != H5O_BTREEK_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (mesg = (H5O_btreek_t *)H5MM_calloc(sizeof(H5O_btreek_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for v1 B-tree 'K' message")
+ if (NULL == (mesg = (H5O_btreek_t *)H5MM_calloc(sizeof(H5O_btreek_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for v1 B-tree 'K' message")
/* Retrieve non-default B-tree 'K' values */
UINT16DECODE(p, mesg->btree_k[H5B_CHUNK_ID]);
@@ -110,7 +108,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_btreek_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_btreek_encode
*
@@ -124,7 +121,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
@@ -144,7 +142,6 @@ H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_btreek_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_btreek_copy
*
@@ -162,17 +159,18 @@ H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
static void *
H5O_btreek_copy(const void *_mesg, void *_dest)
{
- const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- H5O_btreek_t *dest = (H5O_btreek_t *)_dest;
- void *ret_value;
+ const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
+ H5O_btreek_t * dest = (H5O_btreek_t *)_dest;
+ void * ret_value;
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
- if(!dest && NULL == (dest = (H5O_btreek_t *)H5MM_malloc(sizeof(H5O_btreek_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for shared message table message")
+ if (!dest && NULL == (dest = (H5O_btreek_t *)H5MM_malloc(sizeof(H5O_btreek_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for shared message table message")
/* All this message requires is a shallow copy */
*dest = *mesg;
@@ -184,7 +182,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_btreek_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_btreek_size
*
@@ -200,24 +197,24 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+ const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value;
+ size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
- ret_value = 1 + /* Version number */
- 2 + /* Chunked storage internal B-tree 'K' value */
- 2 + /* Symbol table node internal B-tree 'K' value */
- 2; /* Symbol table node leaf 'K' value */
+ ret_value = 1 + /* Version number */
+ 2 + /* Chunked storage internal B-tree 'K' value */
+ 2 + /* Symbol table node internal B-tree 'K' value */
+ 2; /* Symbol table node leaf 'K' value */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_btreek_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_btreek_debug
*
@@ -232,7 +229,7 @@ H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
*/
static herr_t
H5O_btreek_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
@@ -246,12 +243,11 @@ H5O_btreek_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
HDassert(fwidth >= 0);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
+ "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
+ "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
+ "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_btreek_debug() */
-
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 39f3ca3..9f1ed3f 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ocache.c
* Sep 28 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Object header metadata cache virtual functions.
*
@@ -26,19 +26,17 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5WBprivate.h" /* Wrapped Buffers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
@@ -50,46 +48,43 @@
* size to save the extra I/O operations) */
#define H5O_SPEC_READ_SIZE 512
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache callbacks */
static H5O_t *H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_t *oh, unsigned H5_ATTR_UNUSED * flags_ptr);
+static herr_t H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_t *oh,
+ unsigned H5_ATTR_UNUSED *flags_ptr);
static herr_t H5O_dest(H5F_t *f, H5O_t *oh);
static herr_t H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy);
static herr_t H5O_size(const H5F_t *f, const H5O_t *oh, size_t *size_ptr);
static H5O_chunk_proxy_t *H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_chunk_proxy_t *chk_proxy, unsigned H5_ATTR_UNUSED * flags_ptr);
-static herr_t H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy);
-static herr_t H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy);
+static herr_t H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
+ H5O_chunk_proxy_t *chk_proxy, unsigned H5_ATTR_UNUSED *flags_ptr);
+static herr_t H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy);
+static herr_t H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy);
static herr_t H5O_cache_chk_size(const H5F_t *f, const H5O_chunk_proxy_t *chk_proxy, size_t *size_ptr);
/* Chunk proxy routines */
static herr_t H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chunk_proxy);
/* Chunk routines */
-static herr_t H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len,
- const uint8_t *image, H5O_common_cache_ud_t *udata, hbool_t *dirty);
+static herr_t H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
+ H5O_common_cache_ud_t *udata, hbool_t *dirty);
static herr_t H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno);
/* Misc. routines */
-static herr_t H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info,
- const H5O_cont_t *cont);
-
+static herr_t H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont);
/*********************/
/* Package Variables */
@@ -124,18 +119,14 @@ H5FL_EXTERN(H5O_chunk_proxy_t);
/* Declare the free list for H5O_cont_t sequences */
H5FL_SEQ_DEFINE(H5O_cont_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5O_load
*
@@ -146,7 +137,6 @@ H5FL_SEQ_DEFINE(H5O_cont_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
@@ -154,17 +144,17 @@ H5FL_SEQ_DEFINE(H5O_cont_t);
static H5O_t *
H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5O_t *oh = NULL; /* Object header read in */
- H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
- H5WB_t *wb = NULL; /* Wrapped buffer for prefix data */
- uint8_t read_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */
- const uint8_t *p; /* Pointer into buffer to decode */
- uint8_t *buf; /* Buffer to decode */
- size_t spec_read_size; /* Size of buffer to speculatively read in */
- size_t prefix_size; /* Size of object header prefix */
- size_t buf_size; /* Size of prefix+chunk #0 buffer */
- haddr_t eoa; /* Relative end of file address */
- H5O_t *ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header read in */
+ H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
+ H5WB_t * wb = NULL; /* Wrapped buffer for prefix data */
+ uint8_t read_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */
+ const uint8_t * p; /* Pointer into buffer to decode */
+ uint8_t * buf; /* Buffer to decode */
+ size_t spec_read_size; /* Size of buffer to speculatively read in */
+ size_t prefix_size; /* Size of object header prefix */
+ size_t buf_size; /* Size of prefix+chunk #0 buffer */
+ haddr_t eoa; /* Relative end of file address */
+ H5O_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -176,20 +166,20 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->common.cont_msg_info);
/* Make certain we don't speculatively read off the end of the file */
- if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_OHDR)))
+ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_OHDR)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine file size")
/* Compute the size of the speculative object header buffer */
H5_CHECKED_ASSIGN(spec_read_size, size_t, MIN(eoa - addr, H5O_SPEC_READ_SIZE), hsize_t);
/* Attempt to speculatively read both object header prefix and first chunk */
- if(H5F_block_read(f, H5FD_MEM_OHDR, addr, spec_read_size, dxpl_id, read_buf) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header")
+ if (H5F_block_read(f, H5FD_MEM_OHDR, addr, spec_read_size, dxpl_id, read_buf) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header")
p = read_buf;
/* Allocate space for the object header data structure */
- if(NULL == (oh = H5FL_CALLOC(H5O_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (oh = H5FL_CALLOC(H5O_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* File-specific, non-stored information */
oh->sizeof_size = H5F_SIZEOF_SIZE(udata->common.f);
@@ -197,26 +187,26 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Check for presence of magic number */
/* (indicates version 2 or later) */
- if(!HDmemcmp(p, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ if (!HDmemcmp(p, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/* Magic number */
p += H5_SIZEOF_MAGIC;
/* Version */
oh->version = *p++;
- if(H5O_VERSION_2 != oh->version)
+ if (H5O_VERSION_2 != oh->version)
HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad object header version number")
/* Flags */
oh->flags = *p++;
- if(oh->flags & ~H5O_HDR_ALL_FLAGS)
+ if (oh->flags & ~H5O_HDR_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "unknown object header status flag(s)")
/* Number of links to object (unless overridden by refcount message) */
oh->nlink = 1;
/* Time fields */
- if(oh->flags & H5O_HDR_STORE_TIMES) {
- uint32_t tmp; /* Temporary value */
+ if (oh->flags & H5O_HDR_STORE_TIMES) {
+ uint32_t tmp; /* Temporary value */
UINT32DECODE(p, tmp);
oh->atime = (time_t)tmp;
@@ -231,45 +221,45 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
oh->atime = oh->mtime = oh->ctime = oh->btime = 0;
/* Attribute fields */
- if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
+ if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
UINT16DECODE(p, oh->max_compact);
UINT16DECODE(p, oh->min_dense);
- if(oh->max_compact < oh->min_dense)
+ if (oh->max_compact < oh->min_dense)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad object header attribute phase change values")
} /* end if */
else {
oh->max_compact = H5O_CRT_ATTR_MAX_COMPACT_DEF;
- oh->min_dense = H5O_CRT_ATTR_MIN_DENSE_DEF;
+ oh->min_dense = H5O_CRT_ATTR_MIN_DENSE_DEF;
} /* end else */
/* First chunk size */
- switch(oh->flags & H5O_HDR_CHUNK0_SIZE) {
- case 0: /* 1 byte size */
+ switch (oh->flags & H5O_HDR_CHUNK0_SIZE) {
+ case 0: /* 1 byte size */
oh->chunk0_size = *p++;
break;
- case 1: /* 2 byte size */
+ case 1: /* 2 byte size */
UINT16DECODE(p, oh->chunk0_size);
break;
- case 2: /* 4 byte size */
+ case 2: /* 4 byte size */
UINT32DECODE(p, oh->chunk0_size);
break;
- case 3: /* 8 byte size */
+ case 3: /* 8 byte size */
UINT64DECODE(p, oh->chunk0_size);
break;
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad size for chunk 0")
} /* end switch */
- if(oh->chunk0_size > 0 && oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh))
+ if (oh->chunk0_size > 0 && oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh))
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad object header chunk size")
} /* end if */
else {
/* Version */
oh->version = *p++;
- if(H5O_VERSION_1 != oh->version)
+ if (H5O_VERSION_1 != oh->version)
HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad object header version number")
/* Flags */
@@ -289,12 +279,12 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Reset unused attribute fields */
oh->max_compact = 0;
- oh->min_dense = 0;
+ oh->min_dense = 0;
/* First chunk size */
UINT32DECODE(p, oh->chunk0_size);
- if((udata->v1_pfx_nmesgs > 0 && oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) ||
- (udata->v1_pfx_nmesgs == 0 && oh->chunk0_size > 0))
+ if ((udata->v1_pfx_nmesgs > 0 && oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) ||
+ (udata->v1_pfx_nmesgs == 0 && oh->chunk0_size > 0))
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad object header chunk size")
/* Reserved, in version 1 (for 8-byte alignment padding) */
@@ -309,27 +299,29 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
buf_size = oh->chunk0_size + (size_t)H5O_SIZEOF_HDR(oh);
/* Check if the speculative read was large enough to parse the first chunk */
- if(spec_read_size < buf_size) {
+ if (spec_read_size < buf_size) {
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(read_buf, sizeof(read_buf))))
+ if (NULL == (wb = H5WB_wrap(read_buf, sizeof(read_buf))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for serialized header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size)))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Copy existing raw data into new buffer */
HDmemcpy(buf, read_buf, spec_read_size);
/* Read rest of the raw data */
- if(H5F_block_read(f, H5FD_MEM_OHDR, (addr + spec_read_size), (buf_size - spec_read_size), dxpl_id, (buf + spec_read_size)) < 0)
+ if (H5F_block_read(f, H5FD_MEM_OHDR, (addr + spec_read_size), (buf_size - spec_read_size), dxpl_id,
+ (buf + spec_read_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header data")
} /* end if */
else
buf = read_buf;
/* Parse the first chunk */
- if(H5O_chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, buf, &(udata->common), &oh->cache_info.is_dirty) < 0)
+ if (H5O_chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, buf, &(udata->common),
+ &oh->cache_info.is_dirty) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk")
/* Note that we've loaded the object header from the file */
@@ -340,18 +332,17 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
/* Release the [possibly partially initialized] object header on errors */
- if(!ret_value && oh)
- if(H5O_free(oh) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
+ if (!ret_value && oh)
+ if (H5O_free(oh) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_load() */
-
/*-------------------------------------------------------------------------
* Function: H5O_flush
*
@@ -360,13 +351,13 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, H5O_t *oh, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, H5O_t *oh,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -378,11 +369,11 @@ H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr,
HDassert(oh);
/* flush */
- if(oh->cache_info.is_dirty) {
- uint8_t *p; /* Pointer to object header prefix buffer */
+ if (oh->cache_info.is_dirty) {
+ uint8_t *p; /* Pointer to object header prefix buffer */
#ifdef H5O_DEBUG
-H5O_assert(oh);
+ H5O_assert(oh);
#endif /* H5O_DEBUG */
/* Point to raw data 'image' for first chunk, which has room for the prefix */
@@ -392,8 +383,8 @@ H5O_assert(oh);
* also require that chunk 0 always be updated, since the checksum
* on the entire block of memory needs to be updated if anything is
* modified */
- if(oh->version > H5O_VERSION_1) {
- uint64_t chunk0_size; /* Size of chunk 0's data */
+ if (oh->version > H5O_VERSION_1) {
+ uint64_t chunk0_size; /* Size of chunk 0's data */
HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
@@ -409,7 +400,7 @@ H5O_assert(oh);
*p++ = oh->flags;
/* Time fields */
- if(oh->flags & H5O_HDR_STORE_TIMES) {
+ if (oh->flags & H5O_HDR_STORE_TIMES) {
UINT32ENCODE(p, oh->atime);
UINT32ENCODE(p, oh->mtime);
UINT32ENCODE(p, oh->ctime);
@@ -417,37 +408,37 @@ H5O_assert(oh);
} /* end if */
/* Attribute fields */
- if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
+ if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
UINT16ENCODE(p, oh->max_compact);
UINT16ENCODE(p, oh->min_dense);
} /* end if */
/* First chunk size */
- switch(oh->flags & H5O_HDR_CHUNK0_SIZE) {
- case 0: /* 1 byte size */
+ switch (oh->flags & H5O_HDR_CHUNK0_SIZE) {
+ case 0: /* 1 byte size */
HDassert(chunk0_size < 256);
*p++ = (uint8_t)chunk0_size;
break;
- case 1: /* 2 byte size */
+ case 1: /* 2 byte size */
HDassert(chunk0_size < 65536);
UINT16ENCODE(p, chunk0_size);
break;
- case 2: /* 4 byte size */
- /* use <= 2**32 -1 to stay within 4 bytes integer range */
+ case 2: /* 4 byte size */
+ /* use <= 2**32 -1 to stay within 4 bytes integer range */
HDassert(chunk0_size <= 4294967295UL);
UINT32ENCODE(p, chunk0_size);
break;
- case 3: /* 8 byte size */
+ case 3: /* 8 byte size */
UINT64ENCODE(p, chunk0_size);
break;
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0")
} /* end switch */
- } /* end if */
+ } /* end if */
else {
/* Version */
*p++ = oh->version;
@@ -457,7 +448,7 @@ H5O_assert(oh);
/* Number of messages */
#ifdef H5O_ENABLE_BAD_MESG_COUNT
- if(oh->store_bad_mesg_count)
+ if (oh->store_bad_mesg_count)
UINT16ENCODE(p, (oh->nmesgs - 1))
else
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
@@ -476,28 +467,28 @@ H5O_assert(oh);
HDassert((size_t)(p - oh->chunk[0].image) == (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
/* Serialize messages for this chunk */
- if(H5O_chunk_serialize(f, oh, (unsigned)0) < 0)
+ if (H5O_chunk_serialize(f, oh, (unsigned)0) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk")
/* Write the chunk out */
HDassert(H5F_addr_defined(oh->chunk[0].addr));
- if(H5F_block_write(f, H5FD_MEM_OHDR, oh->chunk[0].addr, oh->chunk[0].size, dxpl_id, oh->chunk[0].image) < 0)
+ if (H5F_block_write(f, H5FD_MEM_OHDR, oh->chunk[0].addr, oh->chunk[0].size, dxpl_id,
+ oh->chunk[0].image) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header chunk to disk")
/* Mark object header as clean now */
- oh->cache_info.is_dirty = FALSE;
+ oh->cache_info.is_dirty = FALSE;
} /* end if */
/* Destroy the object header, if requested */
- if(destroy)
- if(H5O_dest(f, oh) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
+ if (destroy)
+ if (H5O_dest(f, oh) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dest
*
@@ -506,7 +497,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -514,7 +504,7 @@ done:
static herr_t
H5O_dest(H5F_t *f, H5O_t *oh)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -529,22 +519,21 @@ H5O_dest(H5F_t *f, H5O_t *oh)
HDassert(!oh->cache_info.free_file_space_on_destroy || H5F_addr_defined(oh->cache_info.addr));
/* Check for releasing file space for object header */
- if(oh->chunk && oh->cache_info.free_file_space_on_destroy) {
+ if (oh->chunk && oh->cache_info.free_file_space_on_destroy) {
/* Free main (first) object header "chunk" */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, oh->chunk[0].addr, (hsize_t)oh->chunk[0].size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, oh->chunk[0].addr, (hsize_t)oh->chunk[0].size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object header")
} /* end if */
/* Destroy object header */
- if(H5O_free(oh) < 0)
+ if (H5O_free(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5O_clear
*
@@ -553,20 +542,19 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 20 2003
*
- * Changes: In the parallel case, there is the possibility that the
+ * Changes: In the parallel case, there is the possibility that the
* the object header may be flushed by different processes
* over the life of the computation. Thus we must ensure
* that the chunk images are up to date before we mark the
* messages clean -- as otherwise we may overwrite valid
* data with a blank section of a chunk image.
*
- * To deal with this, I have added code to call
- * H5O_chunk_serialize() for all chunks before we
- * mark all messages as clean if we are not destroying the
- * object. Do this in the parallel case only, as the problem
+ * To deal with this, I have added code to call
+ * H5O_chunk_serialize() for all chunks before we
+ * mark all messages as clean if we are not destroying the
+ * object. Do this in the parallel case only, as the problem
* can only occur in this context.
*
* JRM -- 10/12/10
@@ -576,8 +564,8 @@ done:
static herr_t
H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED;
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -585,31 +573,30 @@ H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
HDassert(oh);
#ifdef H5_HAVE_PARALLEL
- if ( ( oh->cache_info.is_dirty ) && ( ! destroy ) ) {
+ if ((oh->cache_info.is_dirty) && (!destroy)) {
- size_t i;
+ size_t i;
/* scan through all chunks associated with the object header,
- * and cause them to update their images for all entries currently
- * marked dirty. Must do this in the parallel case, as it is possible
- * that this processor may clear this object header several times
- * before flushing it -- thus causing undefined sections of the image
- * to be written to disk overwriting valid data.
+ * and cause them to update their images for all entries currently
+ * marked dirty. Must do this in the parallel case, as it is possible
+ * that this processor may clear this object header several times
+ * before flushing it -- thus causing undefined sections of the image
+ * to be written to disk overwriting valid data.
*/
- for ( i = 0; i < oh->nchunks; i++ ) {
+ for (i = 0; i < oh->nchunks; i++) {
- if ( H5O_chunk_serialize(f, oh, i) < 0 ) {
+ if (H5O_chunk_serialize(f, oh, i) < 0) {
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL,
- "unable to serialize object header chunk")
- }
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk")
+ }
}
}
#endif /* H5_HAVE_PARALLEL */
/* Mark messages as clean */
- for(u = 0; u < oh->nmesgs; u++)
+ for (u = 0; u < oh->nmesgs; u++)
oh->mesg[u].dirty = FALSE;
#ifndef NDEBUG
@@ -620,15 +607,14 @@ H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
/* Mark whole header as clean */
oh->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5O_dest(f, oh) < 0)
+ if (destroy)
+ if (H5O_dest(f, oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5O_size
*
@@ -653,15 +639,14 @@ H5O_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_t *oh, size_t *size_ptr)
HDassert(size_ptr);
/* Report the object header's prefix+first chunk length */
- if(oh->chunk0_size)
- *size_ptr = (size_t)H5O_SIZEOF_HDR(oh) + oh->chunk0_size;
+ if (oh->chunk0_size)
+ *size_ptr = (size_t)H5O_SIZEOF_HDR(oh) + oh->chunk0_size;
else
- *size_ptr = oh->chunk[0].size;
+ *size_ptr = oh->chunk[0].size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cache_chk_load
*
@@ -671,7 +656,6 @@ H5O_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_t *oh, size_t *size_ptr)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 12 2008
*
*-------------------------------------------------------------------------
@@ -679,12 +663,12 @@ H5O_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_t *oh, size_t *size_ptr)
static H5O_chunk_proxy_t *
H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
- H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
- H5WB_t *wb = NULL; /* Wrapped buffer for prefix data */
- uint8_t chunk_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */
- uint8_t *buf; /* Buffer to decode */
- H5O_chunk_proxy_t *ret_value; /* Return value */
+ H5O_chunk_proxy_t * chk_proxy = NULL; /* Chunk proxy object */
+ H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
+ H5WB_t * wb = NULL; /* Wrapped buffer for prefix data */
+ uint8_t chunk_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */
+ uint8_t * buf; /* Buffer to decode */
+ H5O_chunk_proxy_t * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -695,34 +679,35 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->oh);
/* Allocate space for the object header data structure */
- if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed")
+ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Wrap the local buffer for serialized header info */
- if(NULL == (wb = H5WB_wrap(chunk_buf, sizeof(chunk_buf))))
+ if (NULL == (wb = H5WB_wrap(chunk_buf, sizeof(chunk_buf))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for serialized header */
- if(NULL == (buf = (uint8_t *)H5WB_actual(wb, udata->size)))
+ if (NULL == (buf = (uint8_t *)H5WB_actual(wb, udata->size)))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read rest of the raw data */
- if(H5F_block_read(f, H5FD_MEM_OHDR, addr, udata->size, dxpl_id, buf) < 0)
+ if (H5F_block_read(f, H5FD_MEM_OHDR, addr, udata->size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header continuation chunk")
/* Check if we are still decoding the object header */
/* (as opposed to bringing a piece of it back from the file) */
- if(udata->decoding) {
+ if (udata->decoding) {
/* Sanity check */
HDassert(udata->common.f);
HDassert(udata->common.cont_msg_info);
/* Parse the chunk */
- if(H5O_chunk_deserialize(udata->oh, udata->common.addr, udata->size, buf, &(udata->common), &chk_proxy->cache_info.is_dirty) < 0)
+ if (H5O_chunk_deserialize(udata->oh, udata->common.addr, udata->size, buf, &(udata->common),
+ &chk_proxy->cache_info.is_dirty) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize object header chunk")
/* Set the fields for the chunk proxy */
- chk_proxy->oh = udata->oh;
+ chk_proxy->oh = udata->oh;
chk_proxy->chunkno = udata->oh->nchunks - 1;
} /* end if */
else {
@@ -730,17 +715,18 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->chunkno < udata->oh->nchunks);
/* Set the fields for the chunk proxy */
- chk_proxy->oh = udata->oh;
+ chk_proxy->oh = udata->oh;
chk_proxy->chunkno = udata->chunkno;
/* Sanity check that the chunk representation we have in memory is the same
* as the one being brought in from disk.
*/
- HDassert(0 == HDmemcmp(buf, chk_proxy->oh->chunk[chk_proxy->chunkno].image, chk_proxy->oh->chunk[chk_proxy->chunkno].size));
+ HDassert(0 == HDmemcmp(buf, chk_proxy->oh->chunk[chk_proxy->chunkno].image,
+ chk_proxy->oh->chunk[chk_proxy->chunkno].size));
} /* end else */
/* Increment reference count of object header */
- if(H5O_inc_rc(udata->oh) < 0)
+ if (H5O_inc_rc(udata->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header")
/* Set return value */
@@ -748,18 +734,17 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
/* Release resources */
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
/* Release the [possibly partially initialized] object header on errors */
- if(!ret_value && chk_proxy)
- if(H5O_chunk_proxy_dest(chk_proxy) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header chunk proxy")
+ if (!ret_value && chk_proxy)
+ if (H5O_chunk_proxy_dest(chk_proxy) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header chunk proxy")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cache_chk_load() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cache_chk_flush
*
@@ -768,45 +753,47 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 12 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
- H5O_chunk_proxy_t *chk_proxy, unsigned H5_ATTR_UNUSED * flags_ptr)
+H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_chunk_proxy_t *chk_proxy,
+ unsigned H5_ATTR_UNUSED *flags_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* flush */
- if(chk_proxy->cache_info.is_dirty) {
+ if (chk_proxy->cache_info.is_dirty) {
/* Serialize messages for this chunk */
- if(H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header continuation chunk")
+ if (H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL,
+ "unable to serialize object header continuation chunk")
/* Write the chunk out */
HDassert(H5F_addr_defined(chk_proxy->oh->chunk[chk_proxy->chunkno].addr));
HDassert(H5F_addr_eq(addr, chk_proxy->oh->chunk[chk_proxy->chunkno].addr));
- if(H5F_block_write(f, H5FD_MEM_OHDR, addr, chk_proxy->oh->chunk[chk_proxy->chunkno].size, dxpl_id, chk_proxy->oh->chunk[chk_proxy->chunkno].image) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header continuation chunk to disk")
+ if (H5F_block_write(f, H5FD_MEM_OHDR, addr, chk_proxy->oh->chunk[chk_proxy->chunkno].size, dxpl_id,
+ chk_proxy->oh->chunk[chk_proxy->chunkno].image) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL,
+ "unable to write object header continuation chunk to disk")
/* Mark object header as clean now */
- chk_proxy->cache_info.is_dirty = FALSE;
+ chk_proxy->cache_info.is_dirty = FALSE;
} /* end if */
/* Destroy the object header, if requested */
- if(destroy)
- if(H5O_cache_chk_dest(f, chk_proxy) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header continuation chunk data")
+ if (destroy)
+ if (H5O_cache_chk_dest(f, chk_proxy) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL,
+ "unable to destroy object header continuation chunk data")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cache_chk_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cache_chk_dest
*
@@ -815,7 +802,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -823,7 +809,7 @@ done:
static herr_t
H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -835,25 +821,26 @@ H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy)
HDassert(chk_proxy->cache_info.is_dirty == FALSE);
/* If we're going to free the space on disk, the address must be valid */
- HDassert(!chk_proxy->cache_info.free_file_space_on_destroy || H5F_addr_defined(chk_proxy->cache_info.addr));
+ HDassert(!chk_proxy->cache_info.free_file_space_on_destroy ||
+ H5F_addr_defined(chk_proxy->cache_info.addr));
/* Check for releasing file space for object header */
- if(chk_proxy->cache_info.free_file_space_on_destroy) {
+ if (chk_proxy->cache_info.free_file_space_on_destroy) {
/* Release the space on disk */
/* (XXX: Nasty usage of internal DXPL value! -QAK) */
- if(H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, chk_proxy->oh->chunk[chk_proxy->chunkno].addr, (hsize_t)chk_proxy->oh->chunk[chk_proxy->chunkno].size) < 0)
+ if (H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, chk_proxy->oh->chunk[chk_proxy->chunkno].addr,
+ (hsize_t)chk_proxy->oh->chunk[chk_proxy->chunkno].size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object header continuation chunk")
} /* end if */
/* Destroy object header chunk proxy */
- if(H5O_chunk_proxy_dest(chk_proxy) < 0)
+ if (H5O_chunk_proxy_dest(chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cache_chk_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cache_chk_clear
*
@@ -862,29 +849,28 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
- * Changes: In the parallel case, there is the possibility that the
- * the object header chunk may be flushed by different
- * processes over the life of the computation. Thus we must
+ * Changes: In the parallel case, there is the possibility that the
+ * the object header chunk may be flushed by different
+ * processes over the life of the computation. Thus we must
* ensure that the chunk image is up to date before we mark its
* messages clean -- as otherwise we may overwrite valid
* data with a blank section of a chunk image.
*
- * To deal with this, I have added code to call
- * H5O_chunk_serialize() for this chunk before we
- * mark all messages as clean if we are not destroying the
+ * To deal with this, I have added code to call
+ * H5O_chunk_serialize() for this chunk before we
+ * mark all messages as clean if we are not destroying the
* chunk.
*
- * Do this in the parallel case only, as the problem
+ * Do this in the parallel case only, as the problem
* can only occur in this context.
*
* Note that at present at least, it seems that this fix
- * is not necessary, as we don't seem to be able to
+ * is not necessary, as we don't seem to be able to
* generate a dirty chunk without creating a dirty object
* header. However, the object header code will be changing
- * a lot in the near future, so I'll leave this fix in
+ * a lot in the near future, so I'll leave this fix in
* for now, unless Quincey requests otherwise.
*
* JRM -- 10/12/10
@@ -894,8 +880,8 @@ done:
static herr_t
H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy)
{
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED;
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -903,33 +889,32 @@ H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy)
HDassert(chk_proxy);
#ifdef H5_HAVE_PARALLEL
- if ( ( chk_proxy->oh->cache_info.is_dirty ) && ( ! destroy ) ) {
+ if ((chk_proxy->oh->cache_info.is_dirty) && (!destroy)) {
- if ( H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0 ) {
+ if (H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) {
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL,
- "unable to serialize object header chunk")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk")
}
}
#endif /* H5_HAVE_PARALLEL */
/* Mark messages in chunk as clean */
- for(u = 0; u < chk_proxy->oh->nmesgs; u++)
- if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
+ for (u = 0; u < chk_proxy->oh->nmesgs; u++)
+ if (chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
chk_proxy->oh->mesg[u].dirty = FALSE;
/* Mark as clean */
chk_proxy->cache_info.is_dirty = FALSE;
- if(destroy)
- if(H5O_cache_chk_dest(f, chk_proxy) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header continuation chunk data")
+ if (destroy)
+ if (H5O_cache_chk_dest(f, chk_proxy) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL,
+ "unable to destroy object header continuation chunk data")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cache_chk_clear() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cache_chk_size
*
@@ -940,7 +925,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -960,7 +944,6 @@ H5O_cache_chk_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_chunk_proxy_t *chk_p
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O_cache_chk_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_add_cont_msg
*
@@ -971,7 +954,6 @@ H5O_cache_chk_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_chunk_proxy_t *chk_p
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -989,27 +971,26 @@ H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
HDassert(cont);
/* Increase chunk array size, if necessary */
- if(cont_msg_info->nmsgs >= cont_msg_info->alloc_nmsgs) {
- size_t na = MAX(H5O_NCHUNKS, cont_msg_info->alloc_nmsgs * 2); /* Double # of messages allocated */
+ if (cont_msg_info->nmsgs >= cont_msg_info->alloc_nmsgs) {
+ size_t na = MAX(H5O_NCHUNKS, cont_msg_info->alloc_nmsgs * 2); /* Double # of messages allocated */
H5O_cont_t *x;
- if(NULL == (x = H5FL_SEQ_REALLOC(H5O_cont_t, cont_msg_info->msgs, na)))
+ if (NULL == (x = H5FL_SEQ_REALLOC(H5O_cont_t, cont_msg_info->msgs, na)))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "memory allocation failed")
cont_msg_info->alloc_nmsgs = na;
- cont_msg_info->msgs = x;
+ cont_msg_info->msgs = x;
} /* end if */
/* Init the continuation message info */
- contno = cont_msg_info->nmsgs++;
- cont_msg_info->msgs[contno].addr = cont->addr;
- cont_msg_info->msgs[contno].size = cont->size;
+ contno = cont_msg_info->nmsgs++;
+ cont_msg_info->msgs[contno].addr = cont->addr;
+ cont_msg_info->msgs[contno].size = cont->size;
cont_msg_info->msgs[contno].chunkno = cont->chunkno;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_add_cont_msg() */
-
/*-------------------------------------------------------------------------
* Function: H5O_chunk_deserialize
*
@@ -1019,23 +1000,22 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
- H5O_common_cache_ud_t *udata, hbool_t *dirty)
+H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image, H5O_common_cache_ud_t *udata,
+ hbool_t *dirty)
{
- const uint8_t *p; /* Pointer into buffer to decode */
- uint8_t *eom_ptr; /* Pointer to end of messages for a chunk */
- size_t curmesg; /* Current message being decoded in object header */
- unsigned merged_null_msgs = 0; /* Number of null messages merged together */
- unsigned chunkno; /* Current chunk's index */
+ const uint8_t *p; /* Pointer into buffer to decode */
+ uint8_t * eom_ptr; /* Pointer to end of messages for a chunk */
+ size_t curmesg; /* Current message being decoded in object header */
+ unsigned merged_null_msgs = 0; /* Number of null messages merged together */
+ unsigned chunkno; /* Current chunk's index */
#ifndef NDEBUG
unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */
-#endif /* NDEBUG */
+#endif /* NDEBUG */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1048,20 +1028,20 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
HDassert(udata->cont_msg_info);
/* Increase chunk array size, if necessary */
- if(oh->nchunks >= oh->alloc_nchunks) {
- size_t na = MAX(H5O_NCHUNKS, oh->alloc_nchunks * 2); /* Double # of chunks allocated */
+ if (oh->nchunks >= oh->alloc_nchunks) {
+ size_t na = MAX(H5O_NCHUNKS, oh->alloc_nchunks * 2); /* Double # of chunks allocated */
H5O_chunk_t *x;
- if(NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na)))
+ if (NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed")
oh->alloc_nchunks = na;
- oh->chunk = x;
+ oh->chunk = x;
} /* end if */
/* Init the chunk data info */
- chunkno = oh->nchunks++;
+ chunkno = oh->nchunks++;
oh->chunk[chunkno].gap = 0;
- if(chunkno == 0) {
+ if (chunkno == 0) {
/* First chunk's 'image' includes room for the object header prefix */
oh->chunk[0].addr = addr;
oh->chunk[0].size = len + (size_t)H5O_SIZEOF_HDR(oh);
@@ -1070,7 +1050,7 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
oh->chunk[chunkno].addr = addr;
oh->chunk[chunkno].size = len;
} /* end else */
- if(NULL == (oh->chunk[chunkno].image = H5FL_BLK_MALLOC(chunk_image, oh->chunk[chunkno].size)))
+ if (NULL == (oh->chunk[chunkno].image = H5FL_BLK_MALLOC(chunk_image, oh->chunk[chunkno].size)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Copy disk image into chunk's image */
@@ -1080,13 +1060,13 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
p = oh->chunk[chunkno].image;
/* Handle chunk 0 as special case */
- if(chunkno == 0)
+ if (chunkno == 0)
/* Skip over [already decoded] prefix */
p += (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh));
/* Check for magic # on chunks > 0 in later versions of the format */
- else if(chunkno > 0 && oh->version > H5O_VERSION_1) {
+ else if (chunkno > 0 && oh->version > H5O_VERSION_1) {
/* Magic number */
- if(HDmemcmp(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature")
p += H5_SIZEOF_MAGIC;
} /* end if */
@@ -1099,17 +1079,17 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
#ifndef NDEBUG
nullcnt = 0;
#endif /* NDEBUG */
- while(p < eom_ptr) {
- size_t mesgno; /* Current message to operate on */
- size_t mesg_size; /* Size of message read in */
- unsigned id; /* ID (type) of current message */
- uint8_t flags; /* Flags for current message */
- H5O_msg_crt_idx_t crt_idx = 0; /* Creation index for current message */
+ while (p < eom_ptr) {
+ size_t mesgno; /* Current message to operate on */
+ size_t mesg_size; /* Size of message read in */
+ unsigned id; /* ID (type) of current message */
+ uint8_t flags; /* Flags for current message */
+ H5O_msg_crt_idx_t crt_idx = 0; /* Creation index for current message */
/* Decode message prefix info */
/* Version # */
- if(oh->version == H5O_VERSION_1)
+ if (oh->version == H5O_VERSION_1)
UINT16DECODE(p, id)
else
id = *p++;
@@ -1120,45 +1100,42 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
/* Message flags */
flags = *p++;
- if(flags & ~H5O_MSG_FLAG_BITS)
+ if (flags & ~H5O_MSG_FLAG_BITS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unknown flag for message")
- if((flags & H5O_MSG_FLAG_SHARED) && (flags & H5O_MSG_FLAG_DONTSHARE))
+ if ((flags & H5O_MSG_FLAG_SHARED) && (flags & H5O_MSG_FLAG_DONTSHARE))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message")
- if((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE))
+ if ((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message")
- if((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && !(flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN))
+ if ((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && !(flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message")
- if((flags & H5O_MSG_FLAG_SHAREABLE)
- && H5O_msg_class_g[id]
- && !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "message of unsharable class flagged as sharable")
+ /* Delay checking the "shareable" flag until we've made sure id
+ * references a valid message class that this version of the library
+ * knows about */
/* Reserved bytes/creation index */
- if(oh->version == H5O_VERSION_1)
+ if (oh->version == H5O_VERSION_1)
p += 3; /*reserved*/
else {
/* Only decode creation index if they are being tracked */
- if(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
+ if (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
UINT16DECODE(p, crt_idx);
} /* end else */
/* Try to detect invalidly formatted object header message that
* extends past end of chunk.
*/
- if(p + mesg_size > eom_ptr)
+ if (p + mesg_size > eom_ptr)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "corrupt object header")
#ifndef NDEBUG
/* Increment count of null messages */
- if(H5O_NULL_ID == id)
+ if (H5O_NULL_ID == id)
nullcnt++;
#endif /* NDEBUG */
/* Check for combining two adjacent 'null' messages */
- if((udata->file_intent & H5F_ACC_RDWR) &&
- H5O_NULL_ID == id && oh->nmesgs > 0 &&
- H5O_NULL_ID == oh->mesg[oh->nmesgs - 1].type->id &&
- oh->mesg[oh->nmesgs - 1].chunkno == chunkno) {
+ if ((udata->file_intent & H5F_ACC_RDWR) && H5O_NULL_ID == id && oh->nmesgs > 0 &&
+ H5O_NULL_ID == oh->mesg[oh->nmesgs - 1].type->id && oh->mesg[oh->nmesgs - 1].chunkno == chunkno) {
/* Combine adjacent null messages */
mesgno = oh->nmesgs - 1;
@@ -1169,34 +1146,34 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
} /* end if */
else {
/* Check if we need to extend message table to hold the new message */
- if(oh->nmesgs >= oh->alloc_nmesgs)
- if(H5O_alloc_msgs(oh, (size_t)1) < 0)
+ if (oh->nmesgs >= oh->alloc_nmesgs)
+ if (H5O_alloc_msgs(oh, (size_t)1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate more space for messages")
/* Get index for message */
mesgno = oh->nmesgs++;
/* Initialize information about message */
- oh->mesg[mesgno].dirty = FALSE;
- oh->mesg[mesgno].flags = flags;
- oh->mesg[mesgno].crt_idx = crt_idx;
- oh->mesg[mesgno].native = NULL;
- oh->mesg[mesgno].raw = (uint8_t *)p; /* Casting away const OK - QAK */
+ oh->mesg[mesgno].dirty = FALSE;
+ oh->mesg[mesgno].flags = flags;
+ oh->mesg[mesgno].crt_idx = crt_idx;
+ oh->mesg[mesgno].native = NULL;
+ oh->mesg[mesgno].raw = (uint8_t *)p; /* Casting away const OK - QAK */
oh->mesg[mesgno].raw_size = mesg_size;
- oh->mesg[mesgno].chunkno = chunkno;
+ oh->mesg[mesgno].chunkno = chunkno;
/* Point unknown messages at 'unknown' message class */
/* (Usually from future versions of the library) */
- if(id >= H5O_UNKNOWN_ID ||
+ if (id >= H5O_UNKNOWN_ID ||
#ifdef H5O_ENABLE_BOGUS
- id == H5O_BOGUS_VALID_ID ||
+ id == H5O_BOGUS_VALID_ID ||
#endif
- NULL == H5O_msg_class_g[id]) {
+ NULL == H5O_msg_class_g[id]) {
- H5O_unknown_t *unknown; /* Pointer to "unknown" message info */
+ H5O_unknown_t *unknown; /* Pointer to "unknown" message info */
/* Allocate "unknown" message info */
- if(NULL == (unknown = H5FL_MALLOC(H5O_unknown_t)))
+ if (NULL == (unknown = H5FL_MALLOC(H5O_unknown_t)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Save the original message type ID */
@@ -1209,13 +1186,13 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
oh->mesg[mesgno].type = H5O_msg_class_g[H5O_UNKNOWN_ID];
/* Check for "fail if unknown" message flag */
- if((udata->file_intent & H5F_ACC_RDWR) &&
- (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE))
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "unknown message with 'fail if unknown' flag found")
+ if ((udata->file_intent & H5F_ACC_RDWR) &&
+ (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE))
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL,
+ "unknown message with 'fail if unknown' flag found")
/* Check for "mark if unknown" message flag, etc. */
- else if((flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) &&
- !(flags & H5O_MSG_FLAG_WAS_UNKNOWN) &&
- (udata->file_intent & H5F_ACC_RDWR)) {
+ else if ((flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) && !(flags & H5O_MSG_FLAG_WAS_UNKNOWN) &&
+ (udata->file_intent & H5F_ACC_RDWR)) {
/* Mark the message as "unknown" */
/* This is a bit aggressive, since the application may
@@ -1232,20 +1209,28 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
/* Mark the message and chunk as dirty */
oh->mesg[mesgno].dirty = TRUE;
- udata->mesgs_modified = TRUE;
- *dirty = TRUE;
+ udata->mesgs_modified = TRUE;
+ *dirty = TRUE;
} /* end if */
- } /* end if */
- else
+ } /* end if */
+ else {
+ /* Check for message of unshareable class marked as "shareable"
+ */
+ if ((flags & H5O_MSG_FLAG_SHAREABLE) && H5O_msg_class_g[id] &&
+ !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL,
+ "message of unshareable class flagged as shareable")
+
/* Set message class for "known" messages */
oh->mesg[mesgno].type = H5O_msg_class_g[id];
- } /* end else */
+ } /* end else */
+ } /* end else */
/* Advance decode pointer past message */
p += mesg_size;
/* Check for 'gap' at end of chunk */
- if((eom_ptr - p) > 0 && (eom_ptr - p) < H5O_SIZEOF_MSGHDR_OH(oh)) {
+ if ((eom_ptr - p) > 0 && (eom_ptr - p) < H5O_SIZEOF_MSGHDR_OH(oh)) {
/* Gaps can only occur in later versions of the format */
HDassert(oh->version > H5O_VERSION_1);
@@ -1258,21 +1243,22 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
/* Increment location in chunk */
p += oh->chunk[chunkno].gap;
} /* end if */
- } /* end while */
+ } /* end while */
/* Check for correct checksum on chunks, in later versions of the format */
- if(oh->version > H5O_VERSION_1) {
- uint32_t stored_chksum; /* Checksum from file */
- uint32_t computed_chksum; /* Checksum computed in memory */
+ if (oh->version > H5O_VERSION_1) {
+ uint32_t stored_chksum; /* Checksum from file */
+ uint32_t computed_chksum; /* Checksum computed in memory */
/* Metadata checksum */
UINT32DECODE(p, stored_chksum);
/* Compute checksum on chunk */
- computed_chksum = H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0);
+ computed_chksum =
+ H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0);
/* Verify checksum */
- if(stored_chksum != computed_chksum)
+ if (stored_chksum != computed_chksum)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "incorrect metadata checksum for object header chunk")
} /* end if */
@@ -1281,60 +1267,63 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
/* Do some inspection/interpretation of new messages from this chunk */
/* (detect continuation messages, ref. count messages, etc.) */
- while(curmesg < oh->nmesgs) {
+ while (curmesg < oh->nmesgs) {
/* Check if next message to examine is a continuation message */
- if(H5O_CONT_ID == oh->mesg[curmesg].type->id) {
+ if (H5O_CONT_ID == oh->mesg[curmesg].type->id) {
H5O_cont_t *cont;
- unsigned ioflags = 0; /* Flags for decode routine */
+ unsigned ioflags = 0; /* Flags for decode routine */
/* Decode continuation message */
- cont = (H5O_cont_t *)(H5O_MSG_CONT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, oh->mesg[curmesg].raw_size, oh->mesg[curmesg].raw);
- cont->chunkno = udata->cont_msg_info->nmsgs + 1; /*the next continuation message/chunk */
+ cont = (H5O_cont_t *)(H5O_MSG_CONT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags,
+ oh->mesg[curmesg].raw_size, oh->mesg[curmesg].raw);
+ cont->chunkno = udata->cont_msg_info->nmsgs + 1; /*the next continuation message/chunk */
/* Save 'native' form of continuation message */
oh->mesg[curmesg].native = cont;
/* Add to continuation messages left to interpret */
- if(H5O_add_cont_msg(udata->cont_msg_info, cont) < 0)
+ if (H5O_add_cont_msg(udata->cont_msg_info, cont) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add continuation message")
/* Mark the message & chunk as dirty if the message was changed by decoding */
- if((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
+ if ((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
oh->mesg[curmesg].dirty = TRUE;
- udata->mesgs_modified = TRUE;
- *dirty = TRUE;
+ udata->mesgs_modified = TRUE;
+ *dirty = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if next message to examine is a ref. count message */
- else if(H5O_REFCOUNT_ID == oh->mesg[curmesg].type->id) {
+ else if (H5O_REFCOUNT_ID == oh->mesg[curmesg].type->id) {
H5O_refcount_t *refcount;
- unsigned ioflags = 0; /* Flags for decode routine */
+ unsigned ioflags = 0; /* Flags for decode routine */
/* Decode ref. count message */
HDassert(oh->version > H5O_VERSION_1);
- refcount = (H5O_refcount_t *)(H5O_MSG_REFCOUNT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, oh->mesg[curmesg].raw_size, oh->mesg[curmesg].raw);
+ refcount = (H5O_refcount_t *)(H5O_MSG_REFCOUNT->decode)(udata->f, udata->dxpl_id, NULL, 0,
+ &ioflags, oh->mesg[curmesg].raw_size,
+ oh->mesg[curmesg].raw);
/* Save 'native' form of ref. count message */
oh->mesg[curmesg].native = refcount;
/* Set object header values */
oh->has_refcount_msg = TRUE;
- oh->nlink = *refcount;
+ oh->nlink = *refcount;
/* Mark the message & chunk as dirty if the message was changed by decoding */
- if((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
+ if ((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
oh->mesg[curmesg].dirty = TRUE;
- udata->mesgs_modified = TRUE;
- *dirty = TRUE;
+ udata->mesgs_modified = TRUE;
+ *dirty = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
/* Check if next message to examine is a link message */
- else if(H5O_LINK_ID == oh->mesg[curmesg].type->id) {
+ else if (H5O_LINK_ID == oh->mesg[curmesg].type->id) {
/* Increment the count of link messages */
oh->link_msgs_seen++;
} /* end if */
/* Check if next message to examine is an attribute message */
- else if(H5O_ATTR_ID == oh->mesg[curmesg].type->id) {
+ else if (H5O_ATTR_ID == oh->mesg[curmesg].type->id) {
/* Increment the count of attribute messages */
oh->attr_msgs_seen++;
} /* end if */
@@ -1344,16 +1333,15 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
} /* end while */
/* Mark the chunk dirty if we've merged null messages */
- if(merged_null_msgs) {
+ if (merged_null_msgs) {
udata->mesgs_modified = TRUE;
- *dirty = TRUE;
+ *dirty = TRUE;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_chunk_deserialize() */
-
/*-------------------------------------------------------------------------
* Function: H5O_chunk_serialize
*
@@ -1363,7 +1351,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -1371,9 +1358,9 @@ done:
static herr_t
H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
{
- H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1382,32 +1369,35 @@ H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
HDassert(oh);
/* Encode any dirty messages in this chunk */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
- if(curr_msg->dirty && curr_msg->chunkno == chunkno)
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
+ if (curr_msg->dirty && curr_msg->chunkno == chunkno)
/* Casting away const OK -QAK */
- if(H5O_msg_flush((H5F_t *)f, oh, curr_msg) < 0)
+ if (H5O_msg_flush((H5F_t *)f, oh, curr_msg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
/* Sanity checks */
- if(oh->version > H5O_VERSION_1)
+ if (oh->version > H5O_VERSION_1)
/* Make certain the magic # is present */
- HDassert(!HDmemcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ HDassert(!HDmemcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
+ H5_SIZEOF_MAGIC));
else
/* Gaps should never occur in version 1 of the format */
HDassert(oh->chunk[chunkno].gap == 0);
/* Extra work, for later versions of the format */
- if(oh->version > H5O_VERSION_1) {
- uint32_t metadata_chksum; /* Computed metadata checksum value */
- uint8_t *p; /* Pointer into object header chunk */
+ if (oh->version > H5O_VERSION_1) {
+ uint32_t metadata_chksum; /* Computed metadata checksum value */
+ uint8_t *p; /* Pointer into object header chunk */
/* Check for gap in chunk & zero it out */
- if(oh->chunk[chunkno].gap)
+ if (oh->chunk[chunkno].gap)
HDmemset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
- (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap), 0, oh->chunk[chunkno].gap);
+ (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
+ 0, oh->chunk[chunkno].gap);
/* Compute metadata checksum */
- metadata_chksum = H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0);
+ metadata_chksum =
+ H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0);
/* Metadata checksum */
p = oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM);
@@ -1418,7 +1408,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_chunk_serialize() */
-
/*-------------------------------------------------------------------------
* Function: H5O_chunk_proxy_dest
*
@@ -1428,7 +1417,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 13, 2008
*
*-------------------------------------------------------------------------
@@ -1444,7 +1432,7 @@ H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy)
HDassert(chk_proxy);
/* Decrement reference count of object header */
- if(chk_proxy->oh && H5O_dec_rc(chk_proxy->oh) < 0)
+ if (H5O_dec_rc(chk_proxy->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header")
/* Release the chunk proxy object */
@@ -1453,4 +1441,3 @@ H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_chunk_proxy_dest() */
-
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 5e62c8c..4fa0617 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ochunk.c
* Jul 13 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header chunk routines.
*
@@ -26,36 +26,31 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Opkg.h" /* Object headers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -63,28 +58,22 @@
/* Declare the free list for H5O_chunk_proxy_t's */
H5FL_DEFINE(H5O_chunk_proxy_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_add
+ * Function: H5O_chunk_add
*
- * Purpose: Add new chunk for object header to metadata cache
+ * Purpose: Add new chunk for object header to metadata cache
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -92,8 +81,8 @@ H5FL_DEFINE(H5O_chunk_proxy_t);
herr_t
H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -104,41 +93,38 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
HDassert(idx > 0);
/* Allocate space for the object header data structure */
- if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set the values in the chunk proxy */
- chk_proxy->oh = oh;
+ chk_proxy->oh = oh;
chk_proxy->chunkno = idx;
/* Increment reference count on object header */
- if(H5O_inc_rc(oh) < 0)
+ if (H5O_inc_rc(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "can't increment reference count on object header")
/* Insert the chunk proxy into the cache */
- if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk")
chk_proxy = NULL;
done:
- if(ret_value < 0)
- if(chk_proxy)
+ if (ret_value < 0)
+ if (chk_proxy)
chk_proxy = H5FL_FREE(H5O_chunk_proxy_t, chk_proxy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_add() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_protect
+ * Function: H5O_chunk_protect
*
- * Purpose: Protect an object header chunk for modifications
+ * Purpose: Protect an object header chunk for modifications
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2008
*
*-------------------------------------------------------------------------
@@ -146,8 +132,8 @@ done:
H5O_chunk_proxy_t *
H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for protected chunk */
- H5O_chunk_proxy_t *ret_value; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for protected chunk */
+ H5O_chunk_proxy_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -157,32 +143,33 @@ H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
HDassert(idx < oh->nchunks);
/* Check for protecting first chunk */
- if(0 == idx) {
+ if (0 == idx) {
/* Create new "fake" chunk proxy for first chunk */
/* (since the first chunk is already handled by the H5O_t object) */
- if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
+ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Increment reference count on object header */
- if(H5O_inc_rc(oh) < 0)
+ if (H5O_inc_rc(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header")
/* Set chunk proxy fields */
- chk_proxy->oh = oh;
+ chk_proxy->oh = oh;
chk_proxy->chunkno = idx;
} /* end if */
else {
- H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
+ H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
HDmemset(&chk_udata, 0, sizeof(chk_udata));
- chk_udata.oh = oh;
+ chk_udata.oh = oh;
chk_udata.chunkno = idx;
- chk_udata.size = oh->chunk[idx].size;
+ chk_udata.size = oh->chunk[idx].size;
/* Get the chunk proxy */
- if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE)))
+ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(
+ f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
@@ -195,33 +182,29 @@ H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
done:
/* Cleanup on error */
- if(!ret_value)
- if(0 == idx && chk_proxy)
+ if (!ret_value)
+ if (0 == idx && chk_proxy)
chk_proxy = H5FL_FREE(H5O_chunk_proxy_t, chk_proxy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_protect() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_unprotect
+ * Function: H5O_chunk_unprotect
*
- * Purpose: Unprotect an object header chunk after modifications
+ * Purpose: Unprotect an object header chunk after modifications
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2008
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy,
- hbool_t dirtied)
+H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -230,16 +213,16 @@ H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy,
HDassert(chk_proxy);
/* Check for releasing first chunk */
- if(0 == chk_proxy->chunkno) {
+ if (0 == chk_proxy->chunkno) {
/* Check for dirtying the first chunk */
- if(dirtied) {
+ if (dirtied) {
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(chk_proxy->oh) < 0)
+ if (H5AC_mark_entry_dirty(chk_proxy->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end else/if */
/* Decrement reference count of object header */
- if(H5O_dec_rc(chk_proxy->oh) < 0)
+ if (H5O_dec_rc(chk_proxy->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header")
/* Free fake chunk proxy */
@@ -247,7 +230,8 @@ H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy,
} /* end if */
else {
/* Release the chunk proxy from the cache, possibly marking it dirty */
- if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, chk_proxy->oh->chunk[chk_proxy->chunkno].addr, chk_proxy, (dirtied ? H5AC__DIRTIED_FLAG : H5AC__NO_FLAGS_SET)) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, chk_proxy->oh->chunk[chk_proxy->chunkno].addr,
+ chk_proxy, (dirtied ? H5AC__DIRTIED_FLAG : H5AC__NO_FLAGS_SET)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
} /* end else */
@@ -255,17 +239,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_unprotect() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_resize
+ * Function: H5O_chunk_resize
*
- * Purpose: Resize an object header chunk
+ * Purpose: Resize an object header chunk
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 6 2010
*
*-------------------------------------------------------------------------
@@ -273,7 +254,7 @@ done:
herr_t
H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -282,14 +263,14 @@ H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy)
HDassert(chk_proxy);
/* Check for resizing first chunk */
- if(0 == chk_proxy->chunkno) {
+ if (0 == chk_proxy->chunkno) {
/* Resize object header in cache */
- if(H5AC_resize_entry(oh, oh->chunk[0].size) < 0)
+ if (H5AC_resize_entry(oh, oh->chunk[0].size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache")
} /* end if */
else {
/* Resize chunk in cache */
- if(H5AC_resize_entry(chk_proxy, oh->chunk[chk_proxy->chunkno].size) < 0)
+ if (H5AC_resize_entry(chk_proxy, oh->chunk[chk_proxy->chunkno].size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache")
} /* end else */
@@ -297,17 +278,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_resize() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_update_idx
+ * Function: H5O_chunk_update_idx
*
- * Purpose: Update the chunk index for a chunk proxy
+ * Purpose: Update the chunk index for a chunk proxy
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -315,9 +293,9 @@ done:
herr_t
H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
- H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */
- H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */
+ H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -330,36 +308,34 @@ H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
HDmemset(&chk_udata, 0, sizeof(chk_udata));
- chk_udata.oh = oh;
+ chk_udata.oh = oh;
chk_udata.chunkno = idx;
- chk_udata.size = oh->chunk[idx].size;
+ chk_udata.size = oh->chunk[idx].size;
/* Get the chunk proxy */
- if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE)))
+ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr,
+ &chk_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Update index for chunk proxy in cache */
chk_proxy->chunkno = idx;
/* Release the chunk proxy from the cache, marking it deleted */
- if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__DIRTIED_FLAG) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__DIRTIED_FLAG) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_update_idx() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_delete
+ * Function: H5O_chunk_delete
*
- * Purpose: Notify metadata cache that a chunk has been deleted
+ * Purpose: Notify metadata cache that a chunk has been deleted
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -367,9 +343,9 @@ done:
herr_t
H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
- H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */
- H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */
+ H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -382,12 +358,13 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
HDmemset(&chk_udata, 0, sizeof(chk_udata));
- chk_udata.oh = oh;
+ chk_udata.oh = oh;
chk_udata.chunkno = idx;
- chk_udata.size = oh->chunk[idx].size;
+ chk_udata.size = oh->chunk[idx].size;
/* Get the chunk proxy */
- if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE)))
+ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr,
+ &chk_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Sanity check */
@@ -395,10 +372,10 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
HDassert(chk_proxy->chunkno == idx);
/* Release the chunk proxy from the cache, marking it deleted */
- if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, (H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG)) < 0)
+ if (H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy,
+ (H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_chunk_delete() */
-
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index b91b181..490d43e 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ocont.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: The object header continuation message. This
* message is only generated and read from within
@@ -25,53 +25,51 @@
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_cont_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_cont_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_cont_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
static size_t H5O_cont_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_cont_free(void *mesg);
static herr_t H5O_cont_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
-static herr_t H5O_cont_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O_cont_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_CONT[1] = {{
- H5O_CONT_ID, /*message id number */
- "hdr continuation", /*message name for debugging */
- sizeof(H5O_cont_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_cont_decode, /*decode message */
- H5O_cont_encode, /*encode message */
- NULL, /*no copy method */
- H5O_cont_size, /*size of header continuation */
- NULL, /*reset method */
- H5O_cont_free, /* free method */
- H5O_cont_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_cont_debug /*debugging */
+ H5O_CONT_ID, /*message id number */
+ "hdr continuation", /*message name for debugging */
+ sizeof(H5O_cont_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_cont_decode, /*decode message */
+ H5O_cont_encode, /*encode message */
+ NULL, /*no copy method */
+ H5O_cont_size, /*size of header continuation */
+ NULL, /*reset method */
+ H5O_cont_free, /* free method */
+ H5O_cont_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_cont_debug /*debugging */
}};
/* Declare the free list for H5O_cont_t's */
H5FL_DEFINE(H5O_cont_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_decode
*
@@ -82,18 +80,17 @@ H5FL_DEFINE(H5O_cont_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
static void *
H5O_cont_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_cont_t *cont = NULL;
- void *ret_value;
+ H5O_cont_t *cont = NULL;
+ void * ret_value;
FUNC_ENTER_NOAPI_NOINIT
@@ -102,8 +99,8 @@ H5O_cont_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
HDassert(p);
/* Allocate space for the message */
- if(NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ if (NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Decode */
H5F_addr_decode(f, &p, &(cont->addr));
@@ -117,7 +114,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cont_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_encode
*
@@ -126,7 +122,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 7 1997
*
*-------------------------------------------------------------------------
@@ -134,7 +129,7 @@ done:
static herr_t
H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
+ const H5O_cont_t *cont = (const H5O_cont_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -152,7 +147,6 @@ H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_cont_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_size
*
@@ -165,7 +159,6 @@ H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -173,22 +166,21 @@ H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
static size_t
H5O_cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
- ret_value = (size_t)(H5F_SIZEOF_ADDR(f) + /* Continuation header address */
- H5F_SIZEOF_SIZE(f)); /* Continuation header length */
+ ret_value = (size_t)(H5F_SIZEOF_ADDR(f) + /* Continuation header address */
+ H5F_SIZEOF_SIZE(f)); /* Continuation header length */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cont_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
@@ -209,7 +201,6 @@ H5O_cont_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_cont_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_delete
*
@@ -225,8 +216,8 @@ H5O_cont_free(void *mesg)
static herr_t
H5O_cont_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
- H5O_cont_t *mesg = (H5O_cont_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_cont_t *mesg = (H5O_cont_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -236,14 +227,13 @@ H5O_cont_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
/* Notify the cache that the chunk has been deleted */
/* (releases the space for the chunk) */
- if(H5O_chunk_delete(f, dxpl_id, open_oh, mesg->chunkno) < 0)
+ if (H5O_chunk_delete(f, dxpl_id, open_oh, mesg->chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_cont_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_cont_debug
*
@@ -252,18 +242,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_cont_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_cont_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
+ const H5O_cont_t *cont = (const H5O_cont_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -274,15 +261,11 @@ H5O_cont_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Continuation address:", cont->addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Continuation address:", cont->addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Continuation size in bytes:",
- (unsigned long) (cont->size));
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
- "Points to chunk number:",
- (int) (cont->chunkno));
+ "Continuation size in bytes:", (unsigned long)(cont->size));
+ HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_cont_debug() */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 2d974f1..bb8dcc2 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Ocopy.c
* Nov 6 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object copying routines.
*
@@ -26,76 +26,70 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Aprivate.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5HGprivate.h" /* Global Heaps */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Lprivate.h" /* Links */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Aprivate.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5HGprivate.h" /* Global Heaps */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Lprivate.h" /* Links */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Key object for skiplist of committed datatypes */
typedef struct H5O_copy_search_comm_dt_key_t {
- H5T_t *dt; /* Datatype */
- unsigned long fileno; /* File number */
+ H5T_t * dt; /* Datatype */
+ unsigned long fileno; /* File number */
} H5O_copy_search_comm_dt_key_t;
/* Callback struct for building a list of committed datatypes */
typedef struct H5O_copy_search_comm_dt_ud_t {
- H5SL_t *dst_dt_list; /* Skip list of committed datatypes */
- H5G_loc_t *dst_root_loc; /* Starting location for iteration */
- H5O_loc_t obj_oloc; /* Object location (for attribute iteration callback) */
- hid_t dxpl_id; /* Dataset transfer property list id */
+ H5SL_t * dst_dt_list; /* Skip list of committed datatypes */
+ H5G_loc_t *dst_root_loc; /* Starting location for iteration */
+ H5O_loc_t obj_oloc; /* Object location (for attribute iteration callback) */
+ hid_t dxpl_id; /* Dataset transfer property list id */
} H5O_copy_search_comm_dt_ud_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5O_copy_free_addrmap_cb(void *item, void *key, void *op_data);
-static herr_t H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
- hid_t dxpl_id, H5O_copy_t *cpy_info, H5O_type_t *obj_type, void **udata);
-static herr_t H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
- hid_t dxpl_id, hid_t ocpypl_id);
-static herr_t H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc,
- const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id);
-static herr_t H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id,
- H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, H5O_copy_t *cpy_info);
+static herr_t H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, hid_t dxpl_id,
+ H5O_copy_t *cpy_info, H5O_type_t *obj_type, void **udata);
+static herr_t H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, hid_t dxpl_id,
+ hid_t ocpypl_id);
+static herr_t H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_t ocpypl_id,
+ hid_t lcpl_id, hid_t dxpl_id);
+static herr_t H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
+ H5G_loc_t *dst_root_loc, H5O_copy_t *cpy_info);
static herr_t H5O_copy_free_comm_dt_cb(void *item, void *key, void *op_data);
-static int H5O_copy_comm_dt_cmp(const void *dt1, const void *dt2);
-static herr_t H5O_copy_search_comm_dt_cb(hid_t group, const char *name,
- const H5L_info_t *linfo, void *udata);
-static htri_t H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src,
- H5O_loc_t *oloc_dst/*in, out*/, hid_t dxpl_id, H5O_copy_t *cpy_info);
-static herr_t H5O_copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src,
- H5O_loc_t *oloc_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-
+static int H5O_copy_comm_dt_cmp(const void *dt1, const void *dt2);
+static herr_t H5O_copy_search_comm_dt_cb(hid_t group, const char *name, const H5L_info_t *linfo, void *udata);
+static htri_t H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*in, out*/,
+ hid_t dxpl_id, H5O_copy_t *cpy_info);
+static herr_t H5O_copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
/*********************/
/* Package Variables */
@@ -110,18 +104,14 @@ H5FL_DEFINE(H5O_copy_search_comm_dt_key_t);
/* Declare a free list to manage haddr_t variables */
H5FL_DEFINE(haddr_t);
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5Ocopy
*
@@ -200,40 +190,39 @@ H5FL_DEFINE(haddr_t);
*-------------------------------------------------------------------------
*/
herr_t
-H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id)
+H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id,
+ hid_t lcpl_id)
{
- H5G_loc_t loc; /* Source group group location */
- H5G_loc_t src_loc; /* Source object group location */
- H5G_loc_t dst_loc; /* Destination group location */
+ H5G_loc_t loc; /* Source group group location */
+ H5G_loc_t src_loc; /* Source object group location */
+ H5G_loc_t dst_loc; /* Destination group location */
/* for opening the destination object */
- H5G_name_t src_path; /* Opened source object hier. path */
- H5O_loc_t src_oloc; /* Opened source object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hbool_t obj_open = FALSE; /* Entry at 'name' found */
+ H5G_name_t src_path; /* Opened source object hier. path */
+ H5O_loc_t src_oloc; /* Opened source object object location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ hbool_t obj_open = FALSE; /* Entry at 'name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name,
- ocpypl_id, lcpl_id);
+ H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id);
/* Check arguments */
- if(H5G_loc(src_loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(H5G_loc(dst_loc_id, &dst_loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!src_name || !*src_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified")
- if(!dst_name || !*dst_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
+ if (H5G_loc(src_loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (H5G_loc(dst_loc_id, &dst_loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if (!src_name || !*src_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified")
+ if (!dst_name || !*dst_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
/* check if destination name already exists */
{
- H5G_name_t tmp_path;
- H5O_loc_t tmp_oloc;
- H5G_loc_t tmp_loc;
+ H5G_name_t tmp_path;
+ H5O_loc_t tmp_oloc;
+ H5G_loc_t tmp_loc;
/* Set up group location */
tmp_loc.oloc = &tmp_oloc;
@@ -241,7 +230,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_reset(&tmp_loc);
/* Check if object already exists in destination */
- if(H5G_loc_find(&dst_loc, dst_name, &tmp_loc, H5P_DEFAULT, H5AC_ind_dxpl_id) >= 0) {
+ if (H5G_loc_find(&dst_loc, dst_name, &tmp_loc, H5P_DEFAULT, H5AC_ind_dxpl_id) >= 0) {
H5G_name_free(&tmp_path);
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "destination object already exists")
} /* end if */
@@ -253,45 +242,42 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_reset(&src_loc);
/* Find the source object to copy */
- if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if (H5G_loc_find(&loc, src_name, &src_loc /*out*/, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
loc_found = TRUE;
/* Open source object's object header */
- if(H5O_open(&src_oloc) < 0)
+ if (H5O_open(&src_oloc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
obj_open = TRUE;
/* Get correct property lists */
- if(H5P_DEFAULT == lcpl_id) {
- if((lcpl_id = H5L_get_default_lcpl()) < 0)
+ if (H5P_DEFAULT == lcpl_id) {
+ if ((lcpl_id = H5L_get_default_lcpl()) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to get default lcpl")
} /* end if */
- else
- if(TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
+ else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
/* Get object copy property list */
- if(H5P_DEFAULT == ocpypl_id)
+ if (H5P_DEFAULT == ocpypl_id)
ocpypl_id = H5P_OBJECT_COPY_DEFAULT;
- else
- if(TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
+ else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
/* Do the actual copying of the object */
- if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, H5AC_dxpl_id) < 0)
+ if (H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
- if(loc_found && H5G_loc_free(&src_loc) < 0)
+ if (loc_found && H5G_loc_free(&src_loc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location")
- if(obj_open && H5O_close(&src_oloc) < 0)
+ if (obj_open && H5O_close(&src_oloc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release object header")
FUNC_LEAVE_API(ret_value)
} /* end H5Ocopy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_header_real
*
@@ -310,38 +296,30 @@ done:
* Programmer: Peter Cao
* May 30, 2005
*
- * Modifications:
- * Vailin Choi; Feb 2012
- * Bug fix for HDFFV-7853
- * When the object is opened, call the object's flush class action
- * to ensure that cached data is flushed so that H5Ocopy will get
- * the correct data.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
- hid_t dxpl_id, H5O_copy_t *cpy_info, H5O_type_t *obj_type,
- void **udata /*out*/)
+H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, hid_t dxpl_id,
+ H5O_copy_t *cpy_info, H5O_type_t *obj_type, void **udata /*out*/)
{
- H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */
- H5O_t *oh_src = NULL; /* Object header for source object */
- H5O_t *oh_dst = NULL; /* Object header for destination object */
- unsigned mesgno = 0;
- haddr_t addr_new = HADDR_UNDEF;
- hbool_t *deleted = NULL; /* Array of flags indicating whether messages should be copied */
- hbool_t inserted = FALSE; /* Whether the destination object header has been inserted into the cache */
- size_t null_msgs; /* Number of NULL messages found in each loop */
- size_t orig_dst_msgs; /* Original # of messages in dest. object */
- H5O_mesg_t *mesg_src; /* Message in source object header */
- H5O_mesg_t *mesg_dst; /* Message in source object header */
- const H5O_msg_class_t *copy_type; /* Type of message to use for copying */
- const H5O_obj_class_t *obj_class = NULL; /* Type of object we are copying */
- void *cpy_udata = NULL; /* User data for passing to message callbacks */
- uint64_t dst_oh_size; /* Total size of the destination OH */
- size_t dst_oh_null; /* Size of the null message to add to destination OH */
- size_t dst_oh_gap; /* Size of the gap in chunk #0 of destination OH */
- uint8_t *current_pos; /* Current position in destination image */
+ H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */
+ H5O_t * oh_src = NULL; /* Object header for source object */
+ H5O_t * oh_dst = NULL; /* Object header for destination object */
+ unsigned mesgno = 0;
+ haddr_t addr_new = HADDR_UNDEF;
+ hbool_t * deleted = NULL; /* Array of flags indicating whether messages should be copied */
+ hbool_t inserted = FALSE; /* Whether the destination object header has been inserted into the cache */
+ size_t null_msgs; /* Number of NULL messages found in each loop */
+ size_t orig_dst_msgs; /* Original # of messages in dest. object */
+ H5O_mesg_t *mesg_src; /* Message in source object header */
+ H5O_mesg_t *mesg_dst; /* Message in source object header */
+ const H5O_msg_class_t *copy_type; /* Type of message to use for copying */
+ const H5O_obj_class_t *obj_class = NULL; /* Type of object we are copying */
+ void * cpy_udata = NULL; /* User data for passing to message callbacks */
+ uint64_t dst_oh_size; /* Total size of the destination OH */
+ size_t dst_oh_null; /* Size of the null message to add to destination OH */
+ size_t dst_oh_gap; /* Size of the gap in chunk #0 of destination OH */
+ uint8_t * current_pos; /* Current position in destination image */
size_t msghdr_size;
herr_t ret_value = SUCCEED;
@@ -354,83 +332,82 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
HDassert(cpy_info);
/* Get pointer to object class for this object */
- if((obj_class = H5O_obj_class(oloc_src, dxpl_id)) == NULL)
+ if ((obj_class = H5O_obj_class(oloc_src, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type")
/* Set the pointer to the shared struct for the object if opened in the file */
cpy_info->shared_fo = H5FO_opened(oloc_src->file, oloc_src->addr);
/* Get source object header */
- if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC_READ)))
+ if (NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC_READ)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Retrieve user data for particular type of object to copy */
- if(obj_class->get_copy_file_udata &&
- (NULL == (cpy_udata = (obj_class->get_copy_file_udata)())))
+ if (obj_class->get_copy_file_udata && (NULL == (cpy_udata = (obj_class->get_copy_file_udata)())))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to retrieve copy user data")
/* If we are merging committed datatypes, check for a match in the destination
* file now */
- if(cpy_info->merge_comm_dt && obj_class->type == H5O_TYPE_NAMED_DATATYPE) {
+ if (cpy_info->merge_comm_dt && obj_class->type == H5O_TYPE_NAMED_DATATYPE) {
unsigned long fileno_src; /* fileno for source file */
unsigned long fileno_dst; /* fileno for destination file */
- htri_t merge; /* Whether we found a match in the destination file */
+ htri_t merge; /* Whether we found a match in the destination file */
/* Check if the source and dest file are the same. If so, just return
* the source object address */
H5F_GET_FILENO(oloc_src->file, fileno_src);
H5F_GET_FILENO(oloc_dst->file, fileno_dst);
- if(fileno_src == fileno_dst) {
- merge = TRUE;
+ if (fileno_src == fileno_dst) {
+ merge = TRUE;
oloc_dst->addr = oloc_src->addr;
} /* end if */
else
/* Search for a matching committed datatype, building the list if
* necessary */
- if((merge = H5O_copy_search_comm_dt(oloc_src->file, oh_src, oloc_dst, dxpl_id, cpy_info)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't search for matching committed datatype")
+ if ((merge = H5O_copy_search_comm_dt(oloc_src->file, oh_src, oloc_dst, dxpl_id, cpy_info)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't search for matching committed datatype")
- if(merge) {
+ if (merge) {
/* Found a match, add to skip list and exit */
/* Allocate space for the address mapping of the object copied */
- if(NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t)))
+ if (NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Insert the address mapping for the found object into the copied
* list */
addr_map->src_obj_pos.fileno = fileno_src;
- addr_map->src_obj_pos.addr = oloc_src->addr;
- addr_map->dst_addr = oloc_dst->addr;
- addr_map->is_locked = TRUE; /* We've locked the object currently */
- addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
- addr_map->obj_class = obj_class;
- addr_map->udata = cpy_udata;
+ addr_map->src_obj_pos.addr = oloc_src->addr;
+ addr_map->dst_addr = oloc_dst->addr;
+ addr_map->is_locked = TRUE; /* We've locked the object currently */
+ addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
+ addr_map->obj_class = obj_class;
+ addr_map->udata = cpy_udata;
/* Insert into skip list */
- if(H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) {
+ if (H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) {
addr_map = H5FL_FREE(H5O_addr_map_t, addr_map);
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
} /* end if */
HGOTO_DONE(SUCCEED)
} /* end if */
- } /* end if */
+ } /* end if */
/* Flush any dirty messages in source object header to update the header chunks */
- if(H5O_flush_msgs(oloc_src->file, oh_src) < 0)
+ if (H5O_flush_msgs(oloc_src->file, oh_src) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object header messages")
/* Allocate the destination object header and fill in header fields */
- if(NULL == (oh_dst = H5FL_CALLOC(H5O_t)))
+ if (NULL == (oh_dst = H5FL_CALLOC(H5O_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize header information */
- oh_dst->version = oh_src->version;
- oh_dst->flags = oh_src->flags;
+ oh_dst->version = oh_src->version;
+ oh_dst->flags = oh_src->flags;
oh_dst->link_msgs_seen = oh_src->link_msgs_seen;
oh_dst->attr_msgs_seen = oh_src->attr_msgs_seen;
- oh_dst->sizeof_size = H5F_SIZEOF_SIZE(oloc_dst->file);
- oh_dst->sizeof_addr = H5F_SIZEOF_ADDR(oloc_dst->file);
+ oh_dst->sizeof_size = H5F_SIZEOF_SIZE(oloc_dst->file);
+ oh_dst->sizeof_addr = H5F_SIZEOF_ADDR(oloc_dst->file);
/* Copy time fields */
oh_dst->atime = oh_src->atime;
@@ -440,7 +417,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Copy attribute storage information */
oh_dst->max_compact = oh_src->max_compact;
- oh_dst->min_dense = oh_src->min_dense;
+ oh_dst->min_dense = oh_src->min_dense;
/* Initialize size of chunk array. Start off with zero chunks so this field
* is consistent with the current state of the chunk array. This is
@@ -449,7 +426,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
oh_dst->alloc_nchunks = oh_dst->nchunks = 0;
/* Allocate memory for the chunk array - always start with 1 chunk */
- if(NULL == (oh_dst->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, 1)))
+ if (NULL == (oh_dst->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Update number of allocated chunks. There are still no chunks used. */
@@ -458,7 +435,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Allocate memory for "deleted" array. This array marks the message in
* the source that shouldn't be copied to the destination.
*/
- if(NULL == (deleted = (hbool_t *)HDmalloc(sizeof(hbool_t) * oh_src->nmesgs)))
+ if (NULL == (deleted = (hbool_t *)HDmalloc(sizeof(hbool_t) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
@@ -467,12 +444,12 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
* Keep track of how many NULL or deleted messages we find (or create)
*/
null_msgs = 0;
- for(mesgno = 0; mesgno < oh_src->nmesgs; mesgno++) {
+ for (mesgno = 0; mesgno < oh_src->nmesgs; mesgno++) {
/* Set up convenience variables */
mesg_src = &(oh_src->mesg[mesgno]);
/* Sanity check */
- HDassert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
+ HDassert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
/* Get message class to operate on */
copy_type = mesg_src->type;
@@ -480,70 +457,70 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Check for continuation message; these are converted to NULL
* messages because the destination OH will have only one chunk
*/
- if(H5O_CONT_ID == mesg_src->type->id || H5O_NULL_ID == mesg_src->type->id) {
+ if (H5O_CONT_ID == mesg_src->type->id || H5O_NULL_ID == mesg_src->type->id) {
deleted[mesgno] = TRUE;
++null_msgs;
copy_type = H5O_MSG_NULL;
} /* end if */
HDassert(copy_type);
- if(copy_type->pre_copy_file) {
+ if (copy_type->pre_copy_file) {
/* Decode the message if necessary. */
H5O_LOAD_NATIVE(oloc_src->file, dxpl_id, 0, oh_src, mesg_src, FAIL)
/* Perform "pre copy" operation on message */
- if((copy_type->pre_copy_file)(oloc_src->file, mesg_src->native,
- &(deleted[mesgno]), cpy_info, cpy_udata) < 0)
+ if ((copy_type->pre_copy_file)(oloc_src->file, mesg_src->native, &(deleted[mesgno]), cpy_info,
+ cpy_udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to perform 'pre copy' operation on message")
/* Check if the message should be deleted in the destination */
- if(deleted[mesgno])
+ if (deleted[mesgno])
/* Mark message as deleted */
++null_msgs;
} /* end if(copy_type->pre_copy_file) */
- } /* end for */
+ } /* end for */
/* Initialize size of message list. It may or may not include the NULL messages
* detected above.
*/
- if(cpy_info->preserve_null)
+ if (cpy_info->preserve_null)
oh_dst->alloc_nmesgs = oh_dst->nmesgs = oh_src->nmesgs;
else
oh_dst->alloc_nmesgs = oh_dst->nmesgs = (oh_src->nmesgs - null_msgs);
/* Allocate memory for destination message array */
- if(oh_dst->alloc_nmesgs > 0)
- if(NULL == (oh_dst->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh_dst->alloc_nmesgs)))
+ if (oh_dst->alloc_nmesgs > 0)
+ if (NULL == (oh_dst->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh_dst->alloc_nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* "copy" pass over messages, to perform main message copying */
null_msgs = 0;
- for(mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
+ for (mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set
*/
- if(FALSE == cpy_info->preserve_null) {
- while(deleted[mesgno + null_msgs]) {
+ if (FALSE == cpy_info->preserve_null) {
+ while (deleted[mesgno + null_msgs]) {
++null_msgs;
HDassert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
- } /* end if */
+ } /* end if */
/* Set up convenience variables */
mesg_src = &(oh_src->mesg[mesgno + null_msgs]);
mesg_dst = &(oh_dst->mesg[mesgno]);
/* Initialize non-zero components of destination message */
- mesg_dst->crt_idx = mesg_src->crt_idx;
- mesg_dst->flags = mesg_src->flags;
+ mesg_dst->crt_idx = mesg_src->crt_idx;
+ mesg_dst->flags = mesg_src->flags;
mesg_dst->raw_size = mesg_src->raw_size;
- mesg_dst->type = mesg_src->type;
+ mesg_dst->type = mesg_src->type;
/* If we're preserving deleted messages, set their types to 'NULL'
* in the destination.
*/
- if(cpy_info->preserve_null && deleted[mesgno]) {
- mesg_dst->type = H5O_MSG_NULL;
+ if (cpy_info->preserve_null && deleted[mesgno]) {
+ mesg_dst->type = H5O_MSG_NULL;
mesg_dst->flags = 0;
mesg_dst->dirty = TRUE;
} /* end if */
@@ -556,9 +533,9 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
HDassert(copy_type);
/* copy this message into destination file */
- if(copy_type->copy_file) {
- hbool_t recompute_size; /* Whether copy_file callback created a shared message */
- unsigned mesg_flags; /* Message flags */
+ if (copy_type->copy_file) {
+ hbool_t recompute_size; /* Whether copy_file callback created a shared message */
+ unsigned mesg_flags; /* Message flags */
/* Decode the message if necessary. */
H5O_LOAD_NATIVE(oloc_src->file, dxpl_id, 0, oh_src, mesg_src, FAIL)
@@ -566,20 +543,18 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Get destination message flags, and unset shared and shareable
* flags. mesg_dst->flags will contain the original flags for now.
*/
- mesg_flags = (unsigned)mesg_dst->flags & ~H5O_MSG_FLAG_SHARED
- & ~H5O_MSG_FLAG_SHAREABLE;
+ mesg_flags = (unsigned)mesg_dst->flags & ~H5O_MSG_FLAG_SHARED & ~H5O_MSG_FLAG_SHAREABLE;
/* Copy the source message */
recompute_size = FALSE;
- if((mesg_dst->native = H5O_msg_copy_file(copy_type, oloc_src->file,
- mesg_src->native, oloc_dst->file, &recompute_size,
- &mesg_flags, cpy_info, cpy_udata, dxpl_id)) == NULL)
+ if ((mesg_dst->native =
+ H5O_msg_copy_file(copy_type, oloc_src->file, mesg_src->native, oloc_dst->file,
+ &recompute_size, &mesg_flags, cpy_info, cpy_udata, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object header message")
/* Check if the sharing state changed, and recompute the size if so
*/
- if(!(mesg_flags & H5O_MSG_FLAG_SHARED)
- != !(mesg_dst->flags & H5O_MSG_FLAG_SHARED))
+ if (!(mesg_flags & H5O_MSG_FLAG_SHARED) != !(mesg_dst->flags & H5O_MSG_FLAG_SHARED))
recompute_size = TRUE;
/* Set destination message flags */
@@ -589,15 +564,15 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* (its sharing status or one of its components (for attributes)
* could have changed)
*/
- if(recompute_size)
- mesg_dst->raw_size = H5O_ALIGN_OH(oh_dst,
- H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, FALSE, mesg_dst->native));
+ if (recompute_size)
+ mesg_dst->raw_size = H5O_ALIGN_OH(
+ oh_dst, H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, FALSE, mesg_dst->native));
- /* Mark the message in the destination as dirty, so it'll get encoded when the object header is flushed */
+ /* Mark the message in the destination as dirty, so it'll get encoded when the object header is
+ * flushed */
mesg_dst->dirty = TRUE;
} /* end if (mesg_src->type->copy_file) */
- } /* end of mesgno loop */
-
+ } /* end of mesgno loop */
/* Allocate the destination header and copy any messages that didn't have
* copy callbacks. They get copied directly from the source image to the
@@ -610,35 +585,35 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Compute space for messages. */
dst_oh_size = 0;
- for(mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
+ for (mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
dst_oh_size += (uint64_t)H5O_SIZEOF_MSGHDR_OH(oh_dst);
dst_oh_size += oh_dst->mesg[mesgno].raw_size;
} /* end for */
/* Check if we need to determine correct value for chunk #0 size bits */
- if(oh_dst->version > H5O_VERSION_1) {
+ if (oh_dst->version > H5O_VERSION_1) {
/* Reset destination object header's "chunk 0 size" flags */
oh_dst->flags = (uint8_t)(oh_dst->flags & ~H5O_HDR_CHUNK0_SIZE);
/* Determine correct value for chunk #0 size bits */
- if(dst_oh_size > 4294967295)
+ if (dst_oh_size > 4294967295)
oh_dst->flags |= H5O_HDR_CHUNK0_8;
- else if(dst_oh_size > 65535)
+ else if (dst_oh_size > 65535)
oh_dst->flags |= H5O_HDR_CHUNK0_4;
- else if(dst_oh_size > 255)
+ else if (dst_oh_size > 255)
oh_dst->flags |= H5O_HDR_CHUNK0_2;
} /* end if */
/* Check if the chunk's data portion is too small */
dst_oh_gap = dst_oh_null = 0;
- if(dst_oh_size < H5O_MIN_SIZE) {
- size_t delta = (size_t)(H5O_MIN_SIZE - dst_oh_size); /* Delta in chunk size needed */
+ if (dst_oh_size < H5O_MIN_SIZE) {
+ size_t delta = (size_t)(H5O_MIN_SIZE - dst_oh_size); /* Delta in chunk size needed */
/* Sanity check */
HDassert((oh_dst->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
/* Determine whether to create gap or NULL message */
- if(delta < H5O_SIZEOF_MSGHDR_OH(oh_dst))
+ if (delta < H5O_SIZEOF_MSGHDR_OH(oh_dst))
dst_oh_gap = delta;
else
dst_oh_null = delta;
@@ -654,7 +629,8 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
dst_oh_size += (uint64_t)H5O_SIZEOF_HDR(oh_dst);
/* Allocate space for chunk in destination file */
- if(HADDR_UNDEF == (oh_dst->chunk[0].addr = H5MF_alloc(oloc_dst->file, H5FD_MEM_OHDR, dxpl_id, (hsize_t)dst_oh_size)))
+ if (HADDR_UNDEF ==
+ (oh_dst->chunk[0].addr = H5MF_alloc(oloc_dst->file, H5FD_MEM_OHDR, dxpl_id, (hsize_t)dst_oh_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header")
addr_new = oh_dst->chunk[0].addr;
@@ -667,12 +643,12 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
* clear to zero bytes, so we just set the buffer to zero's here.
* (QAK - 2010/08/17)
*/
- if(NULL == (oh_dst->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, (size_t)dst_oh_size)))
+ if (NULL == (oh_dst->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, (size_t)dst_oh_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Set dest. chunk information */
oh_dst->chunk[0].size = (size_t)dst_oh_size;
- oh_dst->chunk[0].gap = dst_oh_gap;
+ oh_dst->chunk[0].gap = dst_oh_gap;
/* Update size of chunk array. The destination now has one chunk. */
oh_dst->nchunks = 1;
@@ -689,29 +665,29 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Write the magic number for versions > 1 and skip the rest of the
* header. This will be written when the header is flushed to disk.
*/
- if(oh_dst->version > H5O_VERSION_1)
+ if (oh_dst->version > H5O_VERSION_1)
HDmemcpy(current_pos, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
current_pos += H5O_SIZEOF_HDR(oh_dst) - H5O_SIZEOF_CHKSUM_OH(oh_dst);
/* Loop through destination messages, updating their "raw" info */
null_msgs = 0;
- for(mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
+ for (mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set.
*/
- if(FALSE == cpy_info->preserve_null) {
- while(deleted[mesgno + null_msgs]) {
+ if (FALSE == cpy_info->preserve_null) {
+ while (deleted[mesgno + null_msgs]) {
++null_msgs;
HDassert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
- } /* end if */
+ } /* end if */
/* Set up convenience variables */
mesg_src = &(oh_src->mesg[mesgno + null_msgs]);
mesg_dst = &(oh_dst->mesg[mesgno]);
/* Copy each message that wasn't dirtied above */
- if(!mesg_dst->dirty)
+ if (!mesg_dst->dirty)
/* Copy the message header plus the message's raw data. */
HDmemcpy(current_pos, mesg_src->raw - msghdr_size, msghdr_size + mesg_src->raw_size);
@@ -726,56 +702,56 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
orig_dst_msgs = oh_dst->nmesgs;
/* Check if we need to add a NULL message to this header */
- if(dst_oh_null > 0) {
- size_t null_idx; /* Index of new NULL message */
+ if (dst_oh_null > 0) {
+ size_t null_idx; /* Index of new NULL message */
/* Make sure we have enough space for new NULL message */
- if(oh_dst->nmesgs + 1 > oh_dst->alloc_nmesgs)
- if(H5O_alloc_msgs(oh_dst, (size_t)1) < 0)
+ if (oh_dst->nmesgs + 1 > oh_dst->alloc_nmesgs)
+ if (H5O_alloc_msgs(oh_dst, (size_t)1) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages")
/* Create null message for [rest of] space in new chunk */
/* (account for chunk's magic # & checksum) */
- null_idx = oh_dst->nmesgs++;
- oh_dst->mesg[null_idx].type = H5O_MSG_NULL;
- oh_dst->mesg[null_idx].dirty = TRUE;
- oh_dst->mesg[null_idx].native = NULL;
- oh_dst->mesg[null_idx].raw = current_pos + msghdr_size;
- oh_dst->mesg[null_idx].raw_size = dst_oh_null - msghdr_size;
- oh_dst->mesg[null_idx].chunkno = 0;
+ null_idx = oh_dst->nmesgs++;
+ oh_dst->mesg[null_idx].type = H5O_MSG_NULL;
+ oh_dst->mesg[null_idx].dirty = TRUE;
+ oh_dst->mesg[null_idx].native = NULL;
+ oh_dst->mesg[null_idx].raw = current_pos + msghdr_size;
+ oh_dst->mesg[null_idx].raw_size = dst_oh_null - msghdr_size;
+ oh_dst->mesg[null_idx].chunkno = 0;
} /* end if */
/* Make sure we filled the chunk, except for room at the end for a checksum */
- HDassert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) == (size_t)dst_oh_size + oh_dst->chunk[0].image);
+ HDassert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) ==
+ (size_t)dst_oh_size + oh_dst->chunk[0].image);
/* Set the dest. object location to the first chunk address */
HDassert(H5F_addr_defined(addr_new));
oloc_dst->addr = addr_new;
-
/* If we are merging committed datatypes and this is a committed datatype, insert
* the copied datatype into the list of committed datatypes in the target file.
*/
- if(cpy_info->merge_comm_dt && obj_class->type == H5O_TYPE_NAMED_DATATYPE)
- if(H5O_copy_insert_comm_dt(oloc_src->file, oh_src, oloc_dst, dxpl_id, cpy_info) < 0)
+ if (cpy_info->merge_comm_dt && obj_class->type == H5O_TYPE_NAMED_DATATYPE)
+ if (H5O_copy_insert_comm_dt(oloc_src->file, oh_src, oloc_dst, dxpl_id, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't insert committed datatype into destination list")
/* Allocate space for the address mapping of the object copied */
- if(NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t)))
+ if (NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Insert the address mapping for the new object into the copied list */
/* (Do this here, because "post copy" possibly checks it) */
H5F_GET_FILENO(oloc_src->file, addr_map->src_obj_pos.fileno);
addr_map->src_obj_pos.addr = oloc_src->addr;
- addr_map->dst_addr = oloc_dst->addr;
- addr_map->is_locked = TRUE; /* We've locked the object currently */
- addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
- addr_map->obj_class = obj_class;
- addr_map->udata = cpy_udata;
+ addr_map->dst_addr = oloc_dst->addr;
+ addr_map->is_locked = TRUE; /* We've locked the object currently */
+ addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
+ addr_map->obj_class = obj_class;
+ addr_map->udata = cpy_udata;
/* Insert into skip list */
- if(H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) {
+ if (H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) {
addr_map = H5FL_FREE(H5O_addr_map_t, addr_map);
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
} /* end if */
@@ -784,16 +760,16 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
* object header for destination object
*/
null_msgs = 0;
- for(mesgno = 0; mesgno < orig_dst_msgs; mesgno++) {
+ for (mesgno = 0; mesgno < orig_dst_msgs; mesgno++) {
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set
*/
- if(FALSE == cpy_info->preserve_null) {
- while(deleted[mesgno + null_msgs]) {
+ if (FALSE == cpy_info->preserve_null) {
+ while (deleted[mesgno + null_msgs]) {
++null_msgs;
HDassert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
- } /* end if */
+ } /* end if */
/* Set up convenience variables */
mesg_src = &(oh_src->mesg[mesgno + null_msgs]);
@@ -806,8 +782,8 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
copy_type = mesg_dst->type;
HDassert(copy_type);
- if(copy_type->post_copy_file && mesg_src->native) {
- unsigned mesg_flags; /* Message flags */
+ if (copy_type->post_copy_file && mesg_src->native) {
+ unsigned mesg_flags; /* Message flags */
/* Sanity check destination message */
HDassert(mesg_dst->type == mesg_src->type);
@@ -821,58 +797,58 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
cpy_info->oh_dst = oh_dst;
/* Perform "post copy" operation on message */
- if((copy_type->post_copy_file)(oloc_src, mesg_src->native, oloc_dst,
- mesg_dst->native, &mesg_flags, dxpl_id, cpy_info) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to perform 'post copy' operation on message")
+ if ((copy_type->post_copy_file)(oloc_src, mesg_src->native, oloc_dst, mesg_dst->native,
+ &mesg_flags, dxpl_id, cpy_info) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL,
+ "unable to perform 'post copy' operation on message")
/* Verify that the flags did not change */
- HDassert(mesg_flags == (unsigned) mesg_dst->flags);
+ HDassert(mesg_flags == (unsigned)mesg_dst->flags);
} /* end if */
- } /* end for */
+ } /* end for */
/* Indicate that the destination address will no longer be locked */
addr_map->is_locked = FALSE;
/* Increment object header's reference count, if any descendents have created links to this object */
- if(addr_map->inc_ref_count) {
+ if (addr_map->inc_ref_count) {
H5_CHECK_OVERFLOW(addr_map->inc_ref_count, hsize_t, unsigned);
oh_dst->nlink += (unsigned)addr_map->inc_ref_count;
} /* end if */
/* Insert destination object header in cache */
- if(H5AC_insert_entry(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
- oh_dst = NULL;
+ oh_dst = NULL;
inserted = TRUE;
/* Set obj_type and udata, if requested */
- if(obj_type) {
+ if (obj_type) {
HDassert(udata);
*obj_type = obj_class->type;
- *udata = cpy_udata;
+ *udata = cpy_udata;
} /* end if */
done:
/* Free deleted array */
- if(deleted)
+ if (deleted)
HDfree(deleted);
/* Release pointer to source object header and its derived objects */
- if(oh_src && H5O_unprotect(oloc_src, dxpl_id, oh_src, H5AC__NO_FLAGS_SET) < 0)
+ if (oh_src && H5O_unprotect(oloc_src, dxpl_id, oh_src, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
/* Free destination object header on failure */
- if(ret_value < 0 && oh_dst && !inserted) {
- if(H5O_free(oh_dst) < 0)
+ if (ret_value < 0 && oh_dst && !inserted) {
+ if (H5O_free(oh_dst) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
- if(H5O_loc_reset(oloc_dst) < 0)
+ if (H5O_loc_reset(oloc_dst) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_header_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_header_map
*
@@ -887,14 +863,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
- hid_t dxpl_id, H5O_copy_t *cpy_info, hbool_t inc_depth,
- H5O_type_t *obj_type, void **udata /*out*/)
+H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, hid_t dxpl_id,
+ H5O_copy_t *cpy_info, hbool_t inc_depth, H5O_type_t *obj_type, void **udata /*out*/)
{
- H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */
- H5_obj_t src_obj_pos; /* Position of source object */
- hbool_t inc_link; /* Whether to increment the link count for the object */
- herr_t ret_value = SUCCEED;
+ H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */
+ H5_obj_t src_obj_pos; /* Position of source object */
+ hbool_t inc_link; /* Whether to increment the link count for the object */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -910,25 +885,23 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
src_obj_pos.addr = oloc_src->addr;
/* Search for the object in the skip list of copied objects */
- addr_map = (H5O_addr_map_t *)H5SL_search(cpy_info->map_list,
- &src_obj_pos);
+ addr_map = (H5O_addr_map_t *)H5SL_search(cpy_info->map_list, &src_obj_pos);
/* Check if address is already in list of objects copied */
- if(addr_map == NULL) {
+ if (addr_map == NULL) {
/* Copy object for the first time */
/* Check for incrementing the depth of copy */
/* (Can't do this for all copies, since committed datatypes should always be copied) */
- if(inc_depth)
+ if (inc_depth)
cpy_info->curr_depth++;
/* Copy object referred to */
- if(H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, cpy_info, obj_type,
- udata) < 0)
+ if (H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, cpy_info, obj_type, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Check for incrementing the depth of copy */
- if(inc_depth)
+ if (inc_depth)
cpy_info->curr_depth--;
/* When an object is copied for the first time, increment it's link */
@@ -942,10 +915,10 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
oloc_dst->addr = addr_map->dst_addr;
/* Return saved obj_type and udata, if requested */
- if(obj_type) {
+ if (obj_type) {
HDassert(udata);
*obj_type = addr_map->obj_class->type;
- *udata = addr_map->udata;
+ *udata = addr_map->udata;
} /* end if */
/* If the object is locked currently (because we are copying a group
@@ -953,7 +926,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
* increment it's deferred reference count instead of incrementing the
* reference count now.
*/
- if(addr_map->is_locked) {
+ if (addr_map->is_locked) {
addr_map->inc_ref_count++;
inc_link = FALSE;
} /* end if */
@@ -962,15 +935,14 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
} /* end else */
/* Increment destination object's link count, if allowed */
- if(inc_link)
- if(H5O_link(oloc_dst, 1, dxpl_id) < 0)
+ if (inc_link)
+ if (H5O_link(oloc_dst, 1, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to increment object link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_header_map() */
-
/*--------------------------------------------------------------------------
NAME
H5O_copy_free_addrmap_cb
@@ -1000,7 +972,7 @@ H5O_copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNU
HDassert(item);
/* Release user data for particular type of object */
- if(item->udata) {
+ if (item->udata) {
HDassert(item->obj_class);
HDassert(item->obj_class->free_copy_file_udata);
(item->obj_class->free_copy_file_udata)(item->udata);
@@ -1010,9 +982,8 @@ H5O_copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNU
item = H5FL_FREE(H5O_addr_map_t, item);
FUNC_LEAVE_NOAPI(0)
-} /* H5O_copy_free_addrmap_cb() */
+} /* H5O_copy_free_addrmap_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_header
*
@@ -1026,15 +997,14 @@ H5O_copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
- hid_t dxpl_id, hid_t ocpypl_id)
+H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t dxpl_id, hid_t ocpypl_id)
{
- H5O_copy_t cpy_info; /* Information for copying object */
- H5P_genplist_t *ocpy_plist; /* Object copy property list created */
+ H5O_copy_t cpy_info; /* Information for copying object */
+ H5P_genplist_t * ocpy_plist; /* Object copy property list created */
H5O_copy_dtype_merge_list_t *dt_list = NULL; /* List of datatype merge suggestions */
- H5O_mcdt_cb_info_t cb_info; /* Callback info struct */
- unsigned cpy_option = 0; /* Copy options */
- herr_t ret_value = SUCCEED;
+ H5O_mcdt_cb_info_t cb_info; /* Callback info struct */
+ unsigned cpy_option = 0; /* Copy options */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -1048,40 +1018,40 @@ H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
HDmemset(&cpy_info, 0, sizeof(H5O_copy_t));
/* Get the copy property list */
- if(NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
+ if (NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Retrieve the copy parameters */
- if(H5P_get(ocpy_plist, H5O_CPY_OPTION_NAME, &cpy_option) < 0)
+ if (H5P_get(ocpy_plist, H5O_CPY_OPTION_NAME, &cpy_option) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object copy flag")
/* Retrieve the marge committed datatype list */
- if(H5P_get(ocpy_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0)
+ if (H5P_get(ocpy_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed datatype list")
/* Get callback info */
- if(H5P_get(ocpy_plist, H5O_CPY_MCDT_SEARCH_CB_NAME, &cb_info) < 0)
+ if (H5P_get(ocpy_plist, H5O_CPY_MCDT_SEARCH_CB_NAME, &cb_info) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info")
/* Convert copy flags into copy struct */
- if((cpy_option & H5O_COPY_SHALLOW_HIERARCHY_FLAG) > 0) {
+ if ((cpy_option & H5O_COPY_SHALLOW_HIERARCHY_FLAG) > 0) {
cpy_info.copy_shallow = TRUE;
- cpy_info.max_depth = 1;
+ cpy_info.max_depth = 1;
} /* end if */
else
- cpy_info.max_depth = -1; /* Current default is for full, recursive hier. copy */
+ cpy_info.max_depth = -1; /* Current default is for full, recursive hier. copy */
cpy_info.curr_depth = 0;
- if((cpy_option & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0)
cpy_info.expand_soft_link = TRUE;
- if((cpy_option & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0)
cpy_info.expand_ext_link = TRUE;
- if((cpy_option & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0)
cpy_info.expand_ref = TRUE;
- if((cpy_option & H5O_COPY_WITHOUT_ATTR_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_WITHOUT_ATTR_FLAG) > 0)
cpy_info.copy_without_attr = TRUE;
- if((cpy_option & H5O_COPY_PRESERVE_NULL_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_PRESERVE_NULL_FLAG) > 0)
cpy_info.preserve_null = TRUE;
- if((cpy_option & H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) > 0)
+ if ((cpy_option & H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) > 0)
cpy_info.merge_comm_dt = TRUE;
/* Add dt_list to copy struct */
@@ -1092,23 +1062,22 @@ H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
cpy_info.mcdt_ud = cb_info.user_data;
/* Create a skip list to keep track of which objects are copied */
- if(NULL == (cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ, NULL)))
+ if (NULL == (cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ, NULL)))
HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, FAIL, "cannot make skip list")
/* copy the object from the source file to the destination file */
- if(H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, &cpy_info, NULL, NULL) < 0)
+ if (H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, &cpy_info, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
- if(cpy_info.map_list)
+ if (cpy_info.map_list)
H5SL_destroy(cpy_info.map_list, H5O_copy_free_addrmap_cb, NULL);
- if(cpy_info.dst_dt_list)
+ if (cpy_info.dst_dt_list)
H5SL_destroy(cpy_info.dst_dt_list, H5O_copy_free_comm_dt_cb, NULL);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_header() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_obj
*
@@ -1122,15 +1091,15 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name,
- hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id)
+H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id,
+ hid_t dxpl_id)
{
- H5G_name_t new_path; /* Copied object group hier. path */
- H5O_loc_t new_oloc; /* Copied object object location */
- H5G_loc_t new_loc; /* Group location of object copied */
- H5F_t *cached_dst_file; /* Cached destination file */
- hbool_t entry_inserted = FALSE; /* Flag to indicate that the new entry was inserted into a group */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_name_t new_path; /* Copied object group hier. path */
+ H5O_loc_t new_oloc; /* Copied object object location */
+ H5G_loc_t new_loc; /* Group location of object copied */
+ H5F_t * cached_dst_file; /* Cached destination file */
+ hbool_t entry_inserted = FALSE; /* Flag to indicate that the new entry was inserted into a group */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1152,7 +1121,7 @@ H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name,
cached_dst_file = dst_loc->oloc->file;
/* Copy the object from the source file to the destination file */
- if(H5O_copy_header(src_loc->oloc, &new_oloc, dxpl_id, ocpypl_id) < 0)
+ if (H5O_copy_header(src_loc->oloc, &new_oloc, dxpl_id, ocpypl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Patch dst_loc. Again, this can be removed once oloc's point to shared
@@ -1160,19 +1129,18 @@ H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name,
dst_loc->oloc->file = cached_dst_file;
/* Insert the new object in the destination file's group */
- if(H5L_link(dst_loc, dst_name, &new_loc, lcpl_id, H5P_DEFAULT, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link")
+ if (H5L_link(dst_loc, dst_name, &new_loc, lcpl_id, H5P_DEFAULT, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link")
entry_inserted = TRUE;
done:
/* Free the ID to name buffers */
- if(entry_inserted)
+ if (entry_inserted)
H5G_loc_free(&new_loc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_obj() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_obj_by_ref
*
@@ -1186,10 +1154,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
- H5G_loc_t *dst_root_loc, H5O_copy_t *cpy_info)
+H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc,
+ H5O_copy_t *cpy_info)
{
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1197,16 +1165,15 @@ H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
HDassert(dst_oloc);
/* Perform the copy, or look up existing copy */
- if((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, dxpl_id, cpy_info,
- FALSE, NULL, NULL)) < 0)
+ if ((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, dxpl_id, cpy_info, FALSE, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Check if a new valid object is copied to the destination */
- if(H5F_addr_defined(dst_oloc->addr) && (ret_value > SUCCEED)) {
- char tmp_obj_name[80];
- H5G_name_t new_path;
- H5O_loc_t new_oloc;
- H5G_loc_t new_loc;
+ if (H5F_addr_defined(dst_oloc->addr) && (ret_value > SUCCEED)) {
+ char tmp_obj_name[80];
+ H5G_name_t new_path;
+ H5O_loc_t new_oloc;
+ H5G_loc_t new_loc;
/* Set up group location for new object */
new_loc.oloc = &new_oloc;
@@ -1216,7 +1183,8 @@ H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
new_oloc.addr = dst_oloc->addr;
/* Pick a default name for the new object */
- HDsnprintf(tmp_obj_name, sizeof(tmp_obj_name), "~obj_pointed_by_%llu", (unsigned long long)dst_oloc->addr);
+ HDsnprintf(tmp_obj_name, sizeof(tmp_obj_name), "~obj_pointed_by_%llu",
+ (unsigned long long)dst_oloc->addr);
/* Create a link to the newly copied object */
/* Note: since H5O_copy_header_map actually copied the target object, it
@@ -1224,7 +1192,7 @@ H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
* pass the obj_type and udata fields returned by H5O_copy_header_map.
* This could be changed in the future to slightly improve performance
* --NAF */
- if(H5L_link(dst_root_loc, tmp_obj_name, &new_loc, H5P_DEFAULT, H5P_DEFAULT, dxpl_id) < 0)
+ if (H5L_link(dst_root_loc, tmp_obj_name, &new_loc, H5P_DEFAULT, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link")
H5G_loc_free(&new_loc);
@@ -1234,7 +1202,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_obj_by_ref() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_expand_ref
*
@@ -1248,17 +1215,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
- H5F_t *file_dst, void *_dst_ref, size_t ref_count, H5R_type_t ref_type,
- H5O_copy_t *cpy_info)
+H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id, H5F_t *file_dst, void *_dst_ref,
+ size_t ref_count, H5R_type_t ref_type, H5O_copy_t *cpy_info)
{
- H5O_loc_t dst_oloc; /* Copied object object location */
- H5O_loc_t src_oloc; /* Temporary object location for source object */
- H5G_loc_t dst_root_loc; /* The location of root group of the destination file */
- const uint8_t *q; /* Pointer to source OID to store */
- uint8_t *p; /* Pointer to destination OID to store */
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED;
+ H5O_loc_t dst_oloc; /* Copied object object location */
+ H5O_loc_t src_oloc; /* Temporary object location for source object */
+ H5G_loc_t dst_root_loc; /* The location of root group of the destination file */
+ const uint8_t *q; /* Pointer to source OID to store */
+ uint8_t * p; /* Pointer to destination OID to store */
+ size_t i; /* Local index variable */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1277,26 +1243,26 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
dst_oloc.file = file_dst;
/* Set up the root group in the destination file */
- if(NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(file_dst))))
+ if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(file_dst))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(file_dst))))
+ if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(file_dst))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
/* Copy object references */
- if(H5R_OBJECT == ref_type) {
+ if (H5R_OBJECT == ref_type) {
hobj_ref_t *src_ref = (hobj_ref_t *)_src_ref;
hobj_ref_t *dst_ref = (hobj_ref_t *)_dst_ref;
/* Making equivalent references in the destination file */
- for(i = 0; i < ref_count; i++) {
+ for (i = 0; i < ref_count; i++) {
/* Set up for the object copy for the reference */
q = (uint8_t *)(&src_ref[i]);
H5F_addr_decode(src_oloc.file, (const uint8_t **)&q, &(src_oloc.addr));
dst_oloc.addr = HADDR_UNDEF;
/* Attempt to copy object from source to destination file */
- if(src_oloc.addr != (haddr_t)0) {
- if(H5O_copy_obj_by_ref(&src_oloc, dxpl_id, &dst_oloc, &dst_root_loc, cpy_info) < 0)
+ if (src_oloc.addr != (haddr_t)0) {
+ if (H5O_copy_obj_by_ref(&src_oloc, dxpl_id, &dst_oloc, &dst_root_loc, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
} /* end if */
else
@@ -1306,27 +1272,28 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
/* Set the object reference info for the destination file */
p = (uint8_t *)(&dst_ref[i]);
H5F_addr_encode(dst_oloc.file, &p, dst_oloc.addr);
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
/* Copy region references */
- else if(H5R_DATASET_REGION == ref_type) {
+ else if (H5R_DATASET_REGION == ref_type) {
hdset_reg_ref_t *src_ref = (hdset_reg_ref_t *)_src_ref;
hdset_reg_ref_t *dst_ref = (hdset_reg_ref_t *)_dst_ref;
- uint8_t *buf = NULL; /* Buffer to store serialized selection in */
- H5HG_t hobjid; /* Heap object ID */
- size_t buf_size; /* Length of object in heap */
+ uint8_t * buf = NULL; /* Buffer to store serialized selection in */
+ H5HG_t hobjid; /* Heap object ID */
+ size_t buf_size; /* Length of object in heap */
/* Making equivalent references in the destination file */
- for(i = 0; i < ref_count; i++) {
+ for (i = 0; i < ref_count; i++) {
/* Get the heap ID for the dataset region */
q = (const uint8_t *)(&src_ref[i]);
H5F_addr_decode(src_oloc.file, (const uint8_t **)&q, &(hobjid.addr));
UINT32DECODE(q, hobjid.idx);
- if(hobjid.addr != (haddr_t)0) {
+ if (hobjid.addr != (haddr_t)0) {
/* Get the dataset region from the heap (allocate inside routine) */
- if((buf = (uint8_t *)H5HG_read(src_oloc.file, dxpl_id, &hobjid, NULL, &buf_size)) == NULL)
- HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL, "Unable to read dataset region information")
+ if ((buf = (uint8_t *)H5HG_read(src_oloc.file, dxpl_id, &hobjid, NULL, &buf_size)) == NULL)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL,
+ "Unable to read dataset region information")
/* Get the object oid for the dataset */
q = (const uint8_t *)buf;
@@ -1334,7 +1301,7 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
dst_oloc.addr = HADDR_UNDEF;
/* copy the object pointed by the ref to the destination */
- if(H5O_copy_obj_by_ref(&src_oloc, dxpl_id, &dst_oloc, &dst_root_loc, cpy_info) < 0) {
+ if (H5O_copy_obj_by_ref(&src_oloc, dxpl_id, &dst_oloc, &dst_root_loc, cpy_info) < 0) {
H5MM_xfree(buf);
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
} /* end if */
@@ -1344,11 +1311,11 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
H5F_addr_encode(dst_oloc.file, &p, dst_oloc.addr);
/* Save the serialized buffer to the destination */
- if(H5HG_insert(dst_oloc.file, dxpl_id, buf_size, buf, &hobjid) < 0) {
+ if (H5HG_insert(dst_oloc.file, dxpl_id, buf_size, buf, &hobjid) < 0) {
H5MM_xfree(buf);
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "Unable to write dataset region information")
} /* end if */
- } /* end if */
+ } /* end if */
else
/* Set parameters so the reference is written as all 0's */
HDmemset(&hobjid, 0, sizeof(hobjid));
@@ -1361,7 +1328,7 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
/* Free the buffer allocated in H5HG_read() */
H5MM_xfree(buf);
} /* end for */
- } /* end if */
+ } /* end if */
else
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
@@ -1369,7 +1336,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_expand_ref() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_free_comm_dt_cb
*
@@ -1385,8 +1351,8 @@ done:
static herr_t
H5O_copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *op_data)
{
- haddr_t *addr = (haddr_t *)item;
- H5O_copy_search_comm_dt_key_t *key = (H5O_copy_search_comm_dt_key_t *)_key;
+ haddr_t * addr = (haddr_t *)item;
+ H5O_copy_search_comm_dt_key_t *key = (H5O_copy_search_comm_dt_key_t *)_key;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1395,13 +1361,12 @@ H5O_copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *op_data)
HDassert(key->dt);
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
- key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
- addr = H5FL_FREE(haddr_t, addr);
+ key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
+ addr = H5FL_FREE(haddr_t, addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_copy_free_comm_dt_cb */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_comm_dt_cmp
*
@@ -1420,18 +1385,18 @@ H5O_copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *op_data)
static int
H5O_copy_comm_dt_cmp(const void *_key1, const void *_key2)
{
- const H5O_copy_search_comm_dt_key_t *key1 = (const H5O_copy_search_comm_dt_key_t *)_key1;
- const H5O_copy_search_comm_dt_key_t *key2 = (const H5O_copy_search_comm_dt_key_t *)_key2;
- int ret_value = 0;
+ const H5O_copy_search_comm_dt_key_t *key1 = (const H5O_copy_search_comm_dt_key_t *)_key1;
+ const H5O_copy_search_comm_dt_key_t *key2 = (const H5O_copy_search_comm_dt_key_t *)_key2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check fileno. It is unlikely to be different so check if they are equal
* first so only one comparison needs to be made. */
- if(key1->fileno != key2->fileno) {
- if(key1->fileno < key2->fileno)
+ if (key1->fileno != key2->fileno) {
+ if (key1->fileno < key2->fileno)
HGOTO_DONE(-1)
- if(key1->fileno > key2->fileno)
+ if (key1->fileno > key2->fileno)
HGOTO_DONE(1)
} /* end if */
@@ -1441,7 +1406,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_comm_dt_cmp */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_search_comm_dt_attr_cb
*
@@ -1461,12 +1425,12 @@ done:
static herr_t
H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
{
- H5O_copy_search_comm_dt_ud_t *udata = (H5O_copy_search_comm_dt_ud_t *)_udata;
- H5T_t *dt = NULL; /* Datatype */
- H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
- haddr_t *addr = NULL; /* Destination address */
- hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_copy_search_comm_dt_ud_t * udata = (H5O_copy_search_comm_dt_ud_t *)_udata;
+ H5T_t * dt = NULL; /* Datatype */
+ H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
+ haddr_t * addr = NULL; /* Destination address */
+ hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1477,53 +1441,52 @@ H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
HDassert(H5F_addr_defined(udata->obj_oloc.addr));
/* Get attribute datatype */
- if(NULL == (dt = H5A_type(attr)))
+ if (NULL == (dt = H5A_type(attr)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get attribute datatype")
/* Check if the datatype is committed and search the skip list if so */
- if(H5T_committed(dt)) {
+ if (H5T_committed(dt)) {
/* Allocate key */
- if(NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
+ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Copy datatype into key */
- if(NULL == (key->dt = (H5T_t *)H5O_msg_copy(H5O_DTYPE_ID, dt, NULL)))
+ if (NULL == (key->dt = (H5T_t *)H5O_msg_copy(H5O_DTYPE_ID, dt, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy datatype message")
/* Get datatype object fileno */
H5F_GET_FILENO(udata->obj_oloc.file, key->fileno);
- if(!H5SL_search(udata->dst_dt_list, key)) {
+ if (!H5SL_search(udata->dst_dt_list, key)) {
/* Allocate destination address */
- if(NULL == (addr = H5FL_MALLOC(haddr_t)))
+ if (NULL == (addr = H5FL_MALLOC(haddr_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Add the destination datatype to the skip list */
*addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr;
- if(H5SL_insert(udata->dst_dt_list, addr, key) < 0)
+ if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
obj_inserted = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Release resources */
- if(!obj_inserted) {
- if(key) {
- if(key->dt)
+ if (!obj_inserted) {
+ if (key) {
+ if (key->dt)
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
- if(addr) {
+ if (addr) {
HDassert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_search_comm_dt_attr_cb */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_search_comm_dt_check
*
@@ -1537,22 +1500,17 @@ done:
* Programmer: Neil Fortner
* Nov 3 2011
*
- * Modifications:
- * Vailin Choi; August 2012
- * Use H5O_obj_class to get object type instead of
- * H5O_get_info(...TRUE....) saving time in traversing metadata.
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
- H5O_copy_search_comm_dt_ud_t *udata)
+H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t *udata)
{
- H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
- haddr_t *addr = NULL; /* Destination address */
- hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
- H5A_attr_iter_op_t attr_op; /* Attribute iteration operator */
- const H5O_obj_class_t *obj_class = NULL; /* Type of object */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
+ haddr_t * addr = NULL; /* Destination address */
+ hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
+ H5A_attr_iter_op_t attr_op; /* Attribute iteration operator */
+ const H5O_obj_class_t * obj_class = NULL; /* Type of object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1563,92 +1521,91 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
HDassert(udata->dst_root_loc);
/* Get pointer to object class for this object */
- if((obj_class = H5O_obj_class(obj_oloc, udata->dxpl_id)) == NULL)
+ if ((obj_class = H5O_obj_class(obj_oloc, udata->dxpl_id)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type")
/* Check if the object is a datatype, a dataset using a committed
* datatype, or contains an attribute using a committed datatype */
- if(obj_class->type == H5O_TYPE_NAMED_DATATYPE) {
+ if (obj_class->type == H5O_TYPE_NAMED_DATATYPE) {
/* Allocate key */
- if(NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
+ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Read the destination datatype */
- if(NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL, udata->dxpl_id)))
+ if (NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL, udata->dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message")
/* Get destination object fileno */
H5F_GET_FILENO(obj_oloc->file, key->fileno);
/* Check if the datatype is already present in the skip list */
- if(!H5SL_search(udata->dst_dt_list, key)) {
+ if (!H5SL_search(udata->dst_dt_list, key)) {
/* Allocate destination address */
- if(NULL == (addr = H5FL_MALLOC(haddr_t)))
+ if (NULL == (addr = H5FL_MALLOC(haddr_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Add the destination datatype to the skip list */
*addr = obj_oloc->addr;
- if(H5SL_insert(udata->dst_dt_list, addr, key) < 0)
+ if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
obj_inserted = TRUE;
} /* end if */
- } /* end if */
- else if(obj_class->type == H5O_TYPE_DATASET) {
+ } /* end if */
+ else if (obj_class->type == H5O_TYPE_DATASET) {
/* Allocate key */
- if(NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
+ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Read the destination datatype */
- if(NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL, udata->dxpl_id)))
+ if (NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL, udata->dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message")
/* Check if the datatype is committed and search the skip list if so
- */
- if(H5T_committed(key->dt)) {
+ */
+ if (H5T_committed(key->dt)) {
/* Get datatype object fileno */
H5F_GET_FILENO(obj_oloc->file, key->fileno);
- if(!H5SL_search(udata->dst_dt_list, key)) {
+ if (!H5SL_search(udata->dst_dt_list, key)) {
/* Allocate destination address */
- if(NULL == (addr = H5FL_MALLOC(haddr_t)))
+ if (NULL == (addr = H5FL_MALLOC(haddr_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Add the destination datatype to the skip list */
*addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr;
- if(H5SL_insert(udata->dst_dt_list, addr, key) < 0)
+ if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
obj_inserted = TRUE;
} /* end if */
- } /* end if */
- } /* end else */
+ } /* end if */
+ } /* end else */
/* Search within attributes */
- attr_op.op_type = H5A_ATTR_OP_LIB;
- attr_op.u.lib_op = H5O_copy_search_comm_dt_attr_cb;
+ attr_op.op_type = H5A_ATTR_OP_LIB;
+ attr_op.u.lib_op = H5O_copy_search_comm_dt_attr_cb;
udata->obj_oloc.file = obj_oloc->file;
udata->obj_oloc.addr = obj_oloc->addr;
- if(H5O_attr_iterate_real((hid_t)-1, obj_oloc, udata->dxpl_id, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, udata) < 0)
+ if (H5O_attr_iterate_real((hid_t)-1, obj_oloc, udata->dxpl_id, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0,
+ NULL, &attr_op, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "error iterating over attributes");
done:
/* Release resources */
- if(!obj_inserted) {
- if(key) {
- if(key->dt)
+ if (!obj_inserted) {
+ if (key) {
+ if (key->dt)
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
- if(addr) {
+ if (addr) {
HDassert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_search_comm_dt_check */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_search_comm_dt_cb
*
@@ -1664,15 +1621,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name,
- const H5L_info_t *linfo, void *_udata)
+H5O_copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *linfo,
+ void *_udata)
{
- H5O_copy_search_comm_dt_ud_t *udata = (H5O_copy_search_comm_dt_ud_t *)_udata; /* Skip list of dtypes in dest file */
- H5G_loc_t obj_loc; /* Location of object */
- H5O_loc_t obj_oloc; /* Object's object location */
- H5G_name_t obj_path; /* Object's group hier. path */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_copy_search_comm_dt_ud_t *udata =
+ (H5O_copy_search_comm_dt_ud_t *)_udata; /* Skip list of dtypes in dest file */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ hbool_t obj_found = FALSE; /* Object at 'name' found */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1684,31 +1642,31 @@ H5O_copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name,
HDassert(udata->dst_root_loc);
/* Check if this is a hard link */
- if(linfo->type == H5L_TYPE_HARD) {
+ if (linfo->type == H5L_TYPE_HARD) {
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
obj_loc.path = &obj_path;
H5G_loc_reset(&obj_loc);
/* Find the object */
- if(H5G_loc_find(udata->dst_root_loc, name, &obj_loc/*out*/, H5P_LINK_ACCESS_DEFAULT, udata->dxpl_id) < 0)
+ if (H5G_loc_find(udata->dst_root_loc, name, &obj_loc /*out*/, H5P_LINK_ACCESS_DEFAULT,
+ udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
obj_found = TRUE;
/* Check object and add to skip list if appropriate */
- if(H5O_copy_search_comm_dt_check(&obj_oloc, udata) < 0)
+ if (H5O_copy_search_comm_dt_check(&obj_oloc, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "can't check object")
} /* end if */
done:
/* Release resources */
- if(obj_found && H5G_loc_free(&obj_loc) < 0)
+ if (obj_found && H5G_loc_free(&obj_loc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_search_comm_dt_cb */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_search_comm_dt
*
@@ -1727,14 +1685,14 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src,
- H5O_loc_t *oloc_dst/*in, out*/, hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*in, out*/, hid_t dxpl_id,
+ H5O_copy_t *cpy_info)
{
- H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
- haddr_t *dst_addr; /* Destination datatype address */
- H5G_loc_t dst_root_loc = {NULL, NULL}; /* Destination root group location */
- H5O_copy_search_comm_dt_ud_t udata; /* Group iteration user data */
- herr_t ret_value = FALSE; /* Return value */
+ H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
+ haddr_t * dst_addr; /* Destination datatype address */
+ H5G_loc_t dst_root_loc = {NULL, NULL}; /* Destination root group location */
+ H5O_copy_search_comm_dt_ud_t udata; /* Group iteration user data */
+ herr_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1746,33 +1704,33 @@ H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src,
HDassert(cpy_info);
/* Allocate key */
- if(NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
+ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Read the source datatype */
- if(NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, dxpl_id, oh_src, H5O_DTYPE_ID, NULL)))
+ if (NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, dxpl_id, oh_src, H5O_DTYPE_ID, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message")
/* Get destination object fileno */
H5F_GET_FILENO(oloc_dst->file, key->fileno);
/* Check if the destination dtype list exists, create it if it does not */
- if(!cpy_info->dst_dt_list) {
+ if (!cpy_info->dst_dt_list) {
/* Create the skip list */
- if(NULL == (cpy_info->dst_dt_list = H5SL_create(H5SL_TYPE_GENERIC, H5O_copy_comm_dt_cmp)))
+ if (NULL == (cpy_info->dst_dt_list = H5SL_create(H5SL_TYPE_GENERIC, H5O_copy_comm_dt_cmp)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for committed datatypes")
/* Add suggested types to list, if they are present */
- if(cpy_info->dst_dt_suggestion_list) {
+ if (cpy_info->dst_dt_suggestion_list) {
H5O_copy_dtype_merge_list_t *suggestion = cpy_info->dst_dt_suggestion_list;
- H5G_loc_t obj_loc; /* Location of object */
- H5O_loc_t obj_oloc; /* Object's object location */
- H5G_name_t obj_path; /* Object's group hier. path */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ H5G_name_t obj_path; /* Object's group hier. path */
/* Set up the root group in the destination file */
- if(NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
+ if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file))))
+ if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
/* Set up opened group location to fill in */
@@ -1781,101 +1739,102 @@ H5O_copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src,
H5G_loc_reset(&obj_loc);
/* Build udata */
- udata.dst_dt_list = cpy_info->dst_dt_list;
- udata.dst_root_loc = &dst_root_loc;
+ udata.dst_dt_list = cpy_info->dst_dt_list;
+ udata.dst_root_loc = &dst_root_loc;
udata.obj_oloc.file = NULL;
udata.obj_oloc.addr = HADDR_UNDEF;
- udata.dxpl_id = dxpl_id;
+ udata.dxpl_id = dxpl_id;
/* Walk through the list of datatype suggestions */
- while(suggestion) {
+ while (suggestion) {
/* Find the object */
- if(H5G_loc_find(&dst_root_loc, suggestion->path, &obj_loc/*out*/, H5P_LINK_ACCESS_DEFAULT, dxpl_id) < 0)
+ if (H5G_loc_find(&dst_root_loc, suggestion->path, &obj_loc /*out*/, H5P_LINK_ACCESS_DEFAULT,
+ dxpl_id) < 0)
/* Ignore errors - i.e. suggestions not present in
* destination file */
H5E_clear_stack(NULL);
else
/* Check object and add to skip list if appropriate */
- if(H5O_copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
- if(H5G_loc_free(&obj_loc) < 0)
- HERROR(H5E_OHDR, H5E_CANTRELEASE, "can't free location");
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object")
- } /* end if */
+ if (H5O_copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
+ if (H5G_loc_free(&obj_loc) < 0)
+ HERROR(H5E_OHDR, H5E_CANTRELEASE, "can't free location");
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object")
+ } /* end if */
/* Free location */
- if(H5G_loc_free(&obj_loc) < 0)
+ if (H5G_loc_free(&obj_loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location");
/* Advance the suggestion pointer */
suggestion = suggestion->next;
} /* end while */
- } /* end if */
+ } /* end if */
}
- if(!cpy_info->dst_dt_list_complete) {
+ if (!cpy_info->dst_dt_list_complete) {
/* Search for the type in the destination file, and return its address
* if found, but only if the list is populated with and only with
* suggested types. We will search complete lists later. */
- if(cpy_info->dst_dt_suggestion_list
- && NULL != (dst_addr = (haddr_t *)H5SL_search(
- cpy_info->dst_dt_list, key))) {
+ if (cpy_info->dst_dt_suggestion_list &&
+ NULL != (dst_addr = (haddr_t *)H5SL_search(cpy_info->dst_dt_list, key))) {
oloc_dst->addr = *dst_addr;
- ret_value = TRUE;
+ ret_value = TRUE;
} /* end if */
else {
H5O_mcdt_search_ret_t search_cb_ret = H5O_MCDT_SEARCH_CONT;
/* Make callback to see if we should search destination file */
- if(cpy_info->mcdt_cb)
- if((search_cb_ret = cpy_info->mcdt_cb(cpy_info->mcdt_ud)) == H5O_MCDT_SEARCH_ERROR)
+ if (cpy_info->mcdt_cb)
+ if ((search_cb_ret = cpy_info->mcdt_cb(cpy_info->mcdt_ud)) == H5O_MCDT_SEARCH_ERROR)
HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "callback returned error")
- if(search_cb_ret == H5O_MCDT_SEARCH_CONT) {
+ if (search_cb_ret == H5O_MCDT_SEARCH_CONT) {
/* Build the complete dst dt list */
/* Set up the root group in the destination file, if necessary */
- if(!dst_root_loc.oloc) {
+ if (!dst_root_loc.oloc) {
HDassert(!dst_root_loc.path);
- if(NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group")
- if(NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file))))
+ if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
+ "unable to get object location for root group")
+ if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
} /* end if */
else
HDassert(dst_root_loc.path);
/* Build udata. Note that this may be done twice in some cases, but
- * it should be rare and should be cheaper on average than trying to
- * keep track of whether it was done before. */
- udata.dst_dt_list = cpy_info->dst_dt_list;
- udata.dst_root_loc = &dst_root_loc;
+ * it should be rare and should be cheaper on average than trying to
+ * keep track of whether it was done before. */
+ udata.dst_dt_list = cpy_info->dst_dt_list;
+ udata.dst_root_loc = &dst_root_loc;
udata.obj_oloc.file = NULL;
udata.obj_oloc.addr = HADDR_UNDEF;
- udata.dxpl_id = dxpl_id;
+ udata.dxpl_id = dxpl_id;
/* Traverse the destination file, adding committed datatypes to the skip
- * list */
- if(H5G_visit(H5F_FILE_ID(oloc_dst->file), "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5O_copy_search_comm_dt_cb, &udata, H5P_LINK_ACCESS_DEFAULT, dxpl_id) < 0)
+ * list */
+ if (H5G_visit(H5F_FILE_ID(oloc_dst->file), "/", H5_INDEX_NAME, H5_ITER_NATIVE,
+ H5O_copy_search_comm_dt_cb, &udata, H5P_LINK_ACCESS_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
cpy_info->dst_dt_list_complete = TRUE;
} /* end if */
- else
- if(search_cb_ret != H5O_MCDT_SEARCH_STOP)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown return value for callback")
+ else if (search_cb_ret != H5O_MCDT_SEARCH_STOP)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown return value for callback")
} /* end if */
- } /* end if */
+ } /* end if */
/* Search for the type in the destination file, and return its address if
* found, but only if the list is complete */
- if(cpy_info->dst_dt_list_complete) {
- if(NULL != (dst_addr = (haddr_t *)H5SL_search(cpy_info->dst_dt_list, key))) {
+ if (cpy_info->dst_dt_list_complete) {
+ if (NULL != (dst_addr = (haddr_t *)H5SL_search(cpy_info->dst_dt_list, key))) {
oloc_dst->addr = *dst_addr;
- ret_value = TRUE;
+ ret_value = TRUE;
} /* end if */
- } /* end if */
+ } /* end if */
done:
- if(key) {
- if(key->dt)
+ if (key) {
+ if (key->dt)
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
@@ -1883,7 +1842,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_search_comm_dt */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_insert_comm_dt
*
@@ -1898,12 +1856,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst,
- hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, hid_t dxpl_id,
+ H5O_copy_t *cpy_info)
{
- H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
- haddr_t *addr = NULL; /* Destination object address */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
+ haddr_t * addr = NULL; /* Destination object address */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1916,37 +1874,36 @@ H5O_copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst,
HDassert(cpy_info->dst_dt_list);
/* Allocate key */
- if(NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
+ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Read the datatype. Read from the source file because the destination
* object could be changed in the post-copy. */
- if(NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, dxpl_id, oh_src, H5O_DTYPE_ID, NULL)))
+ if (NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, dxpl_id, oh_src, H5O_DTYPE_ID, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message")
/* Get destination object fileno */
H5F_GET_FILENO(oloc_dst->file, key->fileno);
/* Allocate destination address */
- if(NULL == (addr = H5FL_MALLOC(haddr_t)))
+ if (NULL == (addr = H5FL_MALLOC(haddr_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Add the destination datatype to the skip list */
*addr = oloc_dst->addr;
- if(H5SL_insert(cpy_info->dst_dt_list, addr, key) < 0)
+ if (H5SL_insert(cpy_info->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list")
done:
- if(ret_value < 0) {
- if(key) {
- if(key->dt)
+ if (ret_value < 0) {
+ if (key) {
+ if (key->dt)
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
- if(addr)
+ if (addr)
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_insert_comm_dt */
-
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 86db45c..f40a7aa 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Odbg.c
* Nov 17 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header debugging routines.
*
@@ -26,54 +26,47 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Ppublic.h" /* Property Lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Ppublic.h" /* Property Lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
#ifdef H5O_DEBUG
-
+
/*-------------------------------------------------------------------------
* Function: H5O_assert
*
@@ -83,7 +76,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -91,25 +83,25 @@
herr_t
H5O_assert(const H5O_t *oh)
{
- H5O_mesg_t *curr_msg; /* Pointer to current message to examine */
- H5O_mesg_t *tmp_msg; /* Pointer to temporary message to examine */
- unsigned cont_msgs_found = 0; /* # of continuation messages for object */
- size_t meta_space; /* Size of header metadata */
- size_t mesg_space; /* Size of message raw data */
- size_t free_space; /* Size of free space in header */
- size_t hdr_size; /* Size of header's chunks */
- unsigned u, v; /* Local index variables */
+ H5O_mesg_t *curr_msg; /* Pointer to current message to examine */
+ H5O_mesg_t *tmp_msg; /* Pointer to temporary message to examine */
+ unsigned cont_msgs_found = 0; /* # of continuation messages for object */
+ size_t meta_space; /* Size of header metadata */
+ size_t mesg_space; /* Size of message raw data */
+ size_t free_space; /* Size of free space in header */
+ size_t hdr_size; /* Size of header's chunks */
+ unsigned u, v; /* Local index variables */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Initialize the tracking variables */
- hdr_size = 0;
+ hdr_size = 0;
meta_space = (size_t)H5O_SIZEOF_HDR(oh) + (size_t)(H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1));
mesg_space = 0;
free_space = 0;
/* Loop over all chunks in object header */
- for(u = 0; u < oh->nchunks; u++) {
+ for (u = 0; u < oh->nchunks; u++) {
/* Accumulate the size of the header on header */
hdr_size += oh->chunk[u].size;
@@ -124,9 +116,10 @@ H5O_assert(const H5O_t *oh)
HDassert(H5F_addr_defined(oh->chunk[u].addr));
/* Version specific checks */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Make certain that the magic number is correct for each chunk */
- HDassert(!HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ HDassert(
+ !HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
/* Check for valid gap size */
HDassert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
@@ -137,33 +130,33 @@ H5O_assert(const H5O_t *oh)
} /* end for */
/* Check for correct chunk #0 size flags */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
- if(chunk0_size <= 255)
+ if (chunk0_size <= 255)
HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
- else if(chunk0_size <= 65535)
+ else if (chunk0_size <= 65535)
HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
- else if(chunk0_size <= 4294967295)
+ else if (chunk0_size <= 4294967295)
HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
else
HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
} /* end if */
/* Loop over all messages in object header */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
uint8_t *curr_hdr; /* Start of current message header */
- size_t curr_tot_size; /* Total size of current message (including header) */
+ size_t curr_tot_size; /* Total size of current message (including header) */
- curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
+ curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
curr_tot_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
/* Accumulate information, based on the type of message */
- if(H5O_NULL_ID == curr_msg->type->id)
+ if (H5O_NULL_ID == curr_msg->type->id)
free_space += curr_tot_size;
- else if(H5O_CONT_ID == curr_msg->type->id) {
- H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
- hbool_t found_chunk = FALSE; /* Found a chunk that matches */
+ else if (H5O_CONT_ID == curr_msg->type->id) {
+ H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
+ hbool_t found_chunk = FALSE; /* Found a chunk that matches */
HDassert(cont);
@@ -172,13 +165,13 @@ H5O_assert(const H5O_t *oh)
/* Sanity check that every continuation message has a matching chunk */
/* (and only one) */
- for(v = 0; v < oh->nchunks; v++) {
- if(H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
+ for (v = 0; v < oh->nchunks; v++) {
+ if (H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
HDassert(cont->chunkno == v);
HDassert(!found_chunk);
found_chunk = TRUE;
} /* end if */
- } /* end for */
+ } /* end for */
HDassert(found_chunk);
meta_space += curr_tot_size;
@@ -195,25 +188,29 @@ H5O_assert(const H5O_t *oh)
HDassert(curr_msg->chunkno < oh->nchunks);
/* Make certain null messages aren't in chunks with gaps */
- if(H5O_NULL_ID == curr_msg->type->id)
+ if (H5O_NULL_ID == curr_msg->type->id)
HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Make certain that the message is completely in a chunk message area */
- HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
- if(curr_msg->chunkno == 0)
- HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ if (curr_msg->chunkno == 0)
+ HDassert(curr_hdr >=
+ oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
else
- HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
- HDassert(curr_msg->raw + curr_msg->raw_size <= (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
+ (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ HDassert(curr_msg->raw + curr_msg->raw_size <=
+ (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
/* Make certain that no other messages overlap this message */
- for(v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
- if(u != v)
- HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr
- && (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh))
- < (curr_hdr + curr_tot_size)));
+ for (v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
+ if (u != v)
+ HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
+ (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
} /* end for */
- } /* end for */
+ } /* end for */
/* Sanity check that the # of cont. messages is correct for the # of chunks */
HDassert(oh->nchunks == (cont_msgs_found + 1));
@@ -225,7 +222,6 @@ H5O_assert(const H5O_t *oh)
} /* end H5O_assert() */
#endif /* H5O_DEBUG */
-
/*-------------------------------------------------------------------------
* Function: H5O_debug_id
*
@@ -235,24 +231,22 @@ H5O_assert(const H5O_t *oh)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 13 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, int indent, int fwidth)
+H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, int indent,
+ int fwidth)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->debug);
HDassert(f);
@@ -262,14 +256,13 @@ H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *
HDassert(fwidth >= 0);
/* Call the debug method in the class */
- if((ret_value = (type->debug)(f, dxpl_id, mesg, stream, indent, fwidth)) < 0)
+ if ((ret_value = (type->debug)(f, dxpl_id, mesg, stream, indent, fwidth)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "unable to debug message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_debug_id() */
-
/*-------------------------------------------------------------------------
* Function: H5O_debug_real
*
@@ -278,22 +271,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
- * Modifications:
- * Feb. 2009: Vailin Choi
- * Fixed bug in the accumulation of chunk_total
- * Used the appropriate flag when printing creation order tracked/indexed
*-------------------------------------------------------------------------
*/
herr_t
H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- size_t mesg_total = 0, chunk_total = 0, gap_total = 0;
- unsigned *sequence = NULL;
- unsigned i; /* Local index variable */
- herr_t ret_value = SUCCEED;
+ size_t mesg_total = 0, chunk_total = 0, gap_total = 0;
+ unsigned *sequence = NULL;
+ unsigned i; /* Local index variable */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -308,93 +296,71 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
/* debug */
HDfprintf(stream, "%*sObject Header...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Dirty:",
- oh->cache_info.is_dirty);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Version:",
- oh->version);
+ HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Dirty:", oh->cache_info.is_dirty);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Header size (in bytes):",
- (unsigned)H5O_SIZEOF_HDR(oh));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of links:",
- oh->nlink);
+ "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh));
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink);
/* Extra information for later versions */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Display object's status flags */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Attribute creation order tracked:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Attribute creation order indexed:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Attribute storage phase change values:",
- (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Timestamps:",
- (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
- if(oh->flags & ~H5O_HDR_ALL_FLAGS)
- HDfprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n",
- (unsigned)oh->flags);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:",
+ (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
+ if (oh->flags & ~H5O_HDR_ALL_FLAGS)
+ HDfprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags);
/* Only dump times, if they are tracked */
- if(oh->flags & H5O_HDR_STORE_TIMES) {
- struct tm *tm; /* Time structure */
- char buf[128]; /* Buffer for formatting time info */
+ if (oh->flags & H5O_HDR_STORE_TIMES) {
+ struct tm *tm; /* Time structure */
+ char buf[128]; /* Buffer for formatting time info */
/* Time fields */
tm = HDlocaltime(&oh->atime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Access Time:", buf);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
tm = HDlocaltime(&oh->mtime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Modification Time:", buf);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
tm = HDlocaltime(&oh->ctime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Change Time:", buf);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
tm = HDlocaltime(&oh->btime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Birth Time:", buf);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
} /* end if */
/* Attribute tracking fields */
- if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
+ if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. compact attributes:",
- (unsigned)oh->max_compact);
+ "Max. compact attributes:", (unsigned)oh->max_compact);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. dense attributes:",
- (unsigned)oh->min_dense);
+ "Min. dense attributes:", (unsigned)oh->min_dense);
} /* end if */
- } /* end if */
+ } /* end if */
HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth,
- "Number of messages (allocated):",
- oh->nmesgs, oh->alloc_nmesgs);
- HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth,
- "Number of chunks (allocated):",
- oh->nchunks, oh->alloc_nchunks);
+ "Number of messages (allocated):", oh->nmesgs, oh->alloc_nmesgs);
+ HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks,
+ oh->alloc_nchunks);
/* debug each chunk */
- for(i = 0, chunk_total = 0; i < oh->nchunks; i++) {
+ for (i = 0, chunk_total = 0; i < oh->nchunks; i++) {
size_t chunk_size;
- HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
+ HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:",
- oh->chunk[i].addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "Address:", oh->chunk[i].addr);
/* Decrement chunk 0's size by the object header prefix size */
- if(0 == i) {
- if(H5F_addr_ne(oh->chunk[i].addr, addr))
+ if (0 == i) {
+ if (H5F_addr_ne(oh->chunk[i].addr, addr))
HDfprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n");
chunk_size = oh->chunk[i].size - (size_t)H5O_SIZEOF_HDR(oh);
} /* end if */
@@ -402,134 +368,117 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
chunk_size = oh->chunk[i].size;
/* Accumulate chunk's size to total */
- chunk_total += chunk_size;
- gap_total += oh->chunk[i].gap;
+ chunk_total += chunk_size;
+ gap_total += oh->chunk[i].gap;
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Size in bytes:",
- chunk_size);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Gap:",
- oh->chunk[i].gap);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap);
} /* end for */
/* debug each message */
- if(NULL == (sequence = (unsigned *)H5MM_calloc(NELMTS(H5O_msg_class_g) * sizeof(unsigned))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- for(i = 0, mesg_total = 0; i < oh->nmesgs; i++) {
- const H5O_msg_class_t *debug_type; /* Type of message to use for callbacks */
- unsigned chunkno; /* Chunk for message */
+ if (NULL == (sequence = (unsigned *)H5MM_calloc(NELMTS(H5O_msg_class_g) * sizeof(unsigned))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ for (i = 0, mesg_total = 0; i < oh->nmesgs; i++) {
+ const H5O_msg_class_t *debug_type; /* Type of message to use for callbacks */
+ unsigned chunkno; /* Chunk for message */
/* Accumulate message's size to total */
- mesg_total += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[i].raw_size;
-
- /* For version 2 object header, add size of "OCHK" for continuation chunk */
- if (oh->mesg[i].type->id == H5O_CONT_ID)
- mesg_total += H5O_SIZEOF_CHKHDR_OH(oh);
-
- HDfprintf(stream, "%*sMessage %d...\n", indent, "", i);
-
- /* check for bad message id */
- if(oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) {
- HDfprintf(stream, "*** BAD MESSAGE ID 0x%04x\n",
- oh->mesg[i].type->id);
- continue;
- } /* end if */
-
- /* message name and size */
- HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n",
- indent + 3, "", MAX(0, fwidth - 3),
- "Message ID (sequence number):",
- (unsigned) (oh->mesg[i].type->id),
- oh->mesg[i].type->name,
- sequence[oh->mesg[i].type->id]++);
- HDfprintf(stream, "%*s%-*s %t\n", indent + 3, "", MAX (0, fwidth - 3),
- "Dirty:",
- oh->mesg[i].dirty);
- HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX (0, fwidth - 3),
- "Message flags:");
- if(oh->mesg[i].flags) {
+ mesg_total += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[i].raw_size;
+
+ /* For version 2 object header, add size of "OCHK" for continuation chunk */
+ if (oh->mesg[i].type->id == H5O_CONT_ID)
+ mesg_total += H5O_SIZEOF_CHKHDR_OH(oh);
+
+ HDfprintf(stream, "%*sMessage %d...\n", indent, "", i);
+
+ /* check for bad message id */
+ if (oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) {
+ HDfprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id);
+ continue;
+ } /* end if */
+
+ /* message name and size */
+ HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name,
+ sequence[oh->mesg[i].type->id]++);
+ HDfprintf(stream, "%*s%-*s %t\n", indent + 3, "", MAX(0, fwidth - 3), "Dirty:", oh->mesg[i].dirty);
+ HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
+ if (oh->mesg[i].flags) {
hbool_t flag_printed = FALSE;
- if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
HDfprintf(stream, "<S");
flag_printed = TRUE;
} /* end if */
- if(oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
HDfprintf(stream, "%sC", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
- if(oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
- if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
HDfprintf(stream, "%sFIU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
- if(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
HDfprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
- if(oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) {
+ if (oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) {
HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
- if(!flag_printed)
+ if (!flag_printed)
HDfprintf(stream, "-");
HDfprintf(stream, ">\n");
- if(oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS)
- HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3,"", MAX(0, fwidth - 3),
- "*** ADDITIONAL UNKNOWN FLAGS --->",
- oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
+ if (oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS)
+ HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
} /* end if */
else
HDfprintf(stream, "<none>\n");
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
- "Chunk number:",
- oh->mesg[i].chunkno);
- chunkno = oh->mesg[i].chunkno;
- if(chunkno >= oh->nchunks)
- HDfprintf(stream, "*** BAD CHUNK NUMBER\n");
- HDfprintf(stream, "%*s%-*s (%Zu, %Zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
- "Raw message data (offset, size) in chunk:",
- (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image),
- oh->mesg[i].raw_size);
-
- /* check the size */
- if((oh->mesg[i].raw + oh->mesg[i].raw_size >
- oh->chunk[chunkno].image + oh->chunk[chunkno].size) ||
- (oh->mesg[i].raw < oh->chunk[chunkno].image))
- HDfprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
-
- /* decode the message */
- debug_type = oh->mesg[i].type;
- if(NULL == oh->mesg[i].native && debug_type->decode)
+ HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Chunk number:", oh->mesg[i].chunkno);
+ chunkno = oh->mesg[i].chunkno;
+ if (chunkno >= oh->nchunks)
+ HDfprintf(stream, "*** BAD CHUNK NUMBER\n");
+ HDfprintf(stream, "%*s%-*s (%Zu, %Zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Raw message data (offset, size) in chunk:",
+ (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size);
+
+ /* check the size */
+ if ((oh->mesg[i].raw + oh->mesg[i].raw_size > oh->chunk[chunkno].image + oh->chunk[chunkno].size) ||
+ (oh->mesg[i].raw < oh->chunk[chunkno].image))
+ HDfprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
+
+ /* decode the message */
+ debug_type = oh->mesg[i].type;
+ if (NULL == oh->mesg[i].native && debug_type->decode)
H5O_LOAD_NATIVE(f, dxpl_id, H5O_DECODEIO_NOCHANGE, oh, &oh->mesg[i], FAIL)
- /* print the message */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
- "Message Information:");
- if(debug_type->debug && oh->mesg[i].native != NULL)
- (debug_type->debug)(f, dxpl_id, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6));
- else
- HDfprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
+ /* print the message */
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:");
+ if (debug_type->debug && oh->mesg[i].native != NULL)
+ (debug_type->debug)(f, dxpl_id, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6));
+ else
+ HDfprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
} /* end for */
- if((mesg_total + gap_total) != chunk_total)
- HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
+ if ((mesg_total + gap_total) != chunk_total)
+ HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
done:
/* Release resources */
- if(sequence)
+ if (sequence)
sequence = (unsigned *)H5MM_xfree(sequence);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_debug_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_debug
*
@@ -538,7 +487,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -546,9 +494,9 @@ done:
herr_t
H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5O_t *oh = NULL; /* Object header to display */
- H5O_loc_t loc; /* Object location for object to delete */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header to display */
+ H5O_loc_t loc; /* Object location for object to delete */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -560,20 +508,19 @@ H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
HDassert(fwidth >= 0);
/* Set up the object location */
- loc.file = f;
- loc.addr = addr;
+ loc.file = f;
+ loc.addr = addr;
loc.holding_file = FALSE;
- if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* debug */
H5O_debug_real(f, dxpl_id, oh, addr, stream, indent, fwidth);
done:
- if(oh && H5O_unprotect(&loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(&loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_debug() */
-
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index fd8ad6b..df418ea 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -6,63 +6,61 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, March 1, 2007
*
* Purpose: A message holding driver info settings
* in the superblock extension.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Opkg.h" /* Object headers */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Opkg.h" /* Object headers */
+#include "H5MMprivate.h" /* Memory management */
-static void *H5O_drvinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_drvinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_drvinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_drvinfo_copy(const void *_mesg, void *_dest);
+static void * H5O_drvinfo_copy(const void *_mesg, void *_dest);
static size_t H5O_drvinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_drvinfo_reset(void *_mesg);
-static herr_t H5O_drvinfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O_drvinfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{
- H5O_DRVINFO_ID, /*message id number */
- "driver info", /*message name for debugging */
- sizeof(H5O_drvinfo_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_drvinfo_decode, /*decode message */
- H5O_drvinfo_encode, /*encode message */
- H5O_drvinfo_copy, /*copy the native value */
- H5O_drvinfo_size, /*raw message size */
- H5O_drvinfo_reset, /*free internal memory */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_drvinfo_debug /*debug the message */
+ H5O_DRVINFO_ID, /*message id number */
+ "driver info", /*message name for debugging */
+ sizeof(H5O_drvinfo_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_drvinfo_decode, /*decode message */
+ H5O_drvinfo_encode, /*encode message */
+ H5O_drvinfo_copy, /*copy the native value */
+ H5O_drvinfo_size, /*raw message size */
+ H5O_drvinfo_reset, /*free internal memory */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_drvinfo_debug /*debug the message */
}};
/* Current version of driver info information */
-#define H5O_DRVINFO_VERSION 0
+#define H5O_DRVINFO_VERSION 0
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_decode
*
@@ -79,11 +77,11 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{
*/
static void *
H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_drvinfo_t *mesg; /* Native message */
- void *ret_value; /* Return value */
+ H5O_drvinfo_t *mesg; /* Native message */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -92,12 +90,12 @@ H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
HDassert(p);
/* Version of message */
- if(*p++ != H5O_DRVINFO_VERSION)
+ if (*p++ != H5O_DRVINFO_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (mesg = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message")
+ if (NULL == (mesg = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message")
/* Retrieve driver name */
HDmemcpy(mesg->name, p, 8);
@@ -109,9 +107,9 @@ H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
HDassert(mesg->len);
/* Allocate space for buffer */
- if(NULL == (mesg->buf = (uint8_t *)H5MM_malloc(mesg->len))) {
+ if (NULL == (mesg->buf = (uint8_t *)H5MM_malloc(mesg->len))) {
mesg = (H5O_drvinfo_t *)H5MM_xfree(mesg);
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer")
} /* end if */
/* Copy encoded driver info into buffer */
@@ -124,7 +122,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_drvinfo_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_encode
*
@@ -138,7 +135,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
@@ -160,7 +158,6 @@ H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_drvinfo_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_copy
*
@@ -178,26 +175,27 @@ H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
static void *
H5O_drvinfo_copy(const void *_mesg, void *_dest)
{
- const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- H5O_drvinfo_t *dest = (H5O_drvinfo_t *)_dest;
- void *ret_value;
+ const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
+ H5O_drvinfo_t * dest = (H5O_drvinfo_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
- if(!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for shared message table message")
+ if (!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for shared message table message")
/* Shallow copy the fields */
*dest = *mesg;
/* Copy the buffer */
- if(NULL == (dest->buf = (uint8_t *)H5MM_malloc(mesg->len))) {
- if(dest != _dest)
+ if (NULL == (dest->buf = (uint8_t *)H5MM_malloc(mesg->len))) {
+ if (dest != _dest)
dest = (H5O_drvinfo_t *)H5MM_xfree(dest);
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
} /* end if */
HDmemcpy(dest->buf, mesg->buf, mesg->len);
@@ -208,7 +206,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_drvinfo_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_size
*
@@ -226,8 +223,8 @@ done:
static size_t
H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- size_t ret_value;
+ const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -235,15 +232,14 @@ H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
HDassert(f);
HDassert(mesg);
- ret_value = 1 + /* Version number */
- 8 + /* Driver name */
- 2 + /* Buffer length */
- mesg->len; /* Buffer */
+ ret_value = 1 + /* Version number */
+ 8 + /* Driver name */
+ 2 + /* Buffer length */
+ mesg->len; /* Buffer */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_drvinfo_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_reset
*
@@ -253,7 +249,6 @@ H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 1 2007
*
*-------------------------------------------------------------------------
@@ -261,7 +256,7 @@ H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
static herr_t
H5O_drvinfo_reset(void *_mesg)
{
- H5O_drvinfo_t *mesg = (H5O_drvinfo_t *) _mesg;
+ H5O_drvinfo_t *mesg = (H5O_drvinfo_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -274,7 +269,6 @@ H5O_drvinfo_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_drvinfo_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_drvinfo_debug
*
@@ -289,7 +283,7 @@ H5O_drvinfo_reset(void *_mesg)
*/
static herr_t
H5O_drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
@@ -302,12 +296,8 @@ H5O_drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const v
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Driver name:", mesg->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Buffer size:", mesg->len);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Buffer size:", mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_drvinfo_debug() */
-
-
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 85fbef4..c88d6f7 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -6,113 +6,111 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5T_PACKAGE /*prevent warning from including H5Tpkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Gprivate.h" /* Groups */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Tpkg.h" /* Datatypes */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5T_PACKAGE /*prevent warning from including H5Tpkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Gprivate.h" /* Groups */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Tpkg.h" /* Datatypes */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* PRIVATE PROTOTYPES */
static herr_t H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg);
-static void *H5O_dtype_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_dtype_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static void *H5O_dtype_copy(const void *_mesg, void *_dest);
static size_t H5O_dtype_size(const H5F_t *f, const void *_mesg);
static herr_t H5O_dtype_reset(void *_mesg);
static herr_t H5O_dtype_free(void *_mesg);
static herr_t H5O_dtype_set_share(void *_mesg, const H5O_shared_t *sh);
static htri_t H5O_dtype_can_share(const void *_mesg);
-static herr_t H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
-static void *H5O_dtype_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type,
- void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_dtype_shared_post_copy_upd(const H5O_loc_t *src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst, hid_t dxpl_id,
- H5O_copy_t *cpy_info);
-
-static herr_t H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *_udata);
+static void * H5O_dtype_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
+ H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata,
+ hid_t dxpl_id);
+static herr_t H5O_dtype_shared_post_copy_upd(const H5O_loc_t *src_oloc, const void *mesg_src,
+ H5O_loc_t *dst_oloc, void *mesg_dst, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
+
+static herr_t H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_DTYPE
-#define H5O_SHARED_DECODE H5O_dtype_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_dtype_decode
-#define H5O_SHARED_ENCODE H5O_dtype_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_dtype_encode
-#define H5O_SHARED_SIZE H5O_dtype_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_dtype_size
-#define H5O_SHARED_DELETE H5O_dtype_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_DTYPE
+#define H5O_SHARED_DECODE H5O_dtype_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_dtype_decode
+#define H5O_SHARED_ENCODE H5O_dtype_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_dtype_encode
+#define H5O_SHARED_SIZE H5O_dtype_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_dtype_size
+#define H5O_SHARED_DELETE H5O_dtype_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O_dtype_shared_link
+#define H5O_SHARED_LINK H5O_dtype_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O_dtype_shared_copy_file
-#define H5O_SHARED_COPY_FILE_REAL H5O_dtype_copy_file
-#define H5O_SHARED_POST_COPY_FILE H5O_dtype_shared_post_copy_file
-#undef H5O_SHARED_POST_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE_UPD H5O_dtype_shared_post_copy_upd
-#define H5O_SHARED_DEBUG H5O_dtype_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_dtype_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_COPY_FILE H5O_dtype_shared_copy_file
+#define H5O_SHARED_COPY_FILE_REAL H5O_dtype_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_dtype_shared_post_copy_file
+#undef H5O_SHARED_POST_COPY_FILE_REAL
+#define H5O_SHARED_POST_COPY_FILE_UPD H5O_dtype_shared_post_copy_upd
+#define H5O_SHARED_DEBUG H5O_dtype_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O_dtype_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Macros to check for the proper version of a datatype */
#ifdef H5_STRICT_FORMAT_CHECKS
/* If the version is too low, give an error. No error if nochange is set
* because in that case we are either debugging or deleting the object header */
-#define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \
- if(((VERS) < (MIN_VERS)) && !(*(IOF) & H5O_DECODEIO_NOCHANGE)) \
+#define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \
+ if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) \
HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, ERR, "incorrect " CLASS " datatype version")
#else /* H5_STRICT_FORMAT_CHECKS */
/* If the version is too low and we are allowed to change the message, upgrade
* it and mark the object header as dirty */
-#define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \
- if(((VERS) < (MIN_VERS)) && !(*(IOF) & H5O_DECODEIO_NOCHANGE)) { \
- (VERS) = (MIN_VERS); \
- if(H5T__upgrade_version((DT), (VERS)) < 0) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \
- *(IOF) |= H5O_DECODEIO_DIRTY; \
- } /* end if */
+#define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \
+ if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) { \
+ (VERS) = (MIN_VERS); \
+ if (H5T__upgrade_version((DT), (VERS)) < 0) \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \
+ *(IOF) |= H5O_DECODEIO_DIRTY; \
+ } /* end if */
#endif /* H5_STRICT_FORMAT_CHECKS */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
- H5O_DTYPE_ID, /* message id number */
- "datatype", /* message name for debugging */
- sizeof(H5T_t), /* native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_dtype_shared_decode, /* decode message */
- H5O_dtype_shared_encode, /* encode message */
- H5O_dtype_copy, /* copy the native value */
- H5O_dtype_shared_size, /* size of raw message */
- H5O_dtype_reset, /* reset method */
- H5O_dtype_free, /* free method */
- H5O_dtype_shared_delete, /* file delete method */
- H5O_dtype_shared_link, /* link method */
- H5O_dtype_set_share, /* set share method */
- H5O_dtype_can_share, /* can share method */
- H5O_dtype_pre_copy_file, /* pre copy native value to file */
- H5O_dtype_shared_copy_file, /* copy native value to file */
- H5O_dtype_shared_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_dtype_shared_debug /* debug the message */
+ H5O_DTYPE_ID, /* message id number */
+ "datatype", /* message name for debugging */
+ sizeof(H5T_t), /* native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O_dtype_shared_decode, /* decode message */
+ H5O_dtype_shared_encode, /* encode message */
+ H5O_dtype_copy, /* copy the native value */
+ H5O_dtype_shared_size, /* size of raw message */
+ H5O_dtype_reset, /* reset method */
+ H5O_dtype_free, /* free method */
+ H5O_dtype_shared_delete, /* file delete method */
+ H5O_dtype_shared_link, /* link method */
+ H5O_dtype_set_share, /* set share method */
+ H5O_dtype_can_share, /* can share method */
+ H5O_dtype_pre_copy_file, /* pre copy native value to file */
+ H5O_dtype_shared_copy_file, /* copy native value to file */
+ H5O_dtype_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_dtype_shared_debug /* debug the message */
}};
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_decode_helper
*
@@ -129,12 +127,12 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *dt)
+H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t *dt)
{
- unsigned flags, version;
- unsigned i;
- size_t z;
- htri_t ret_value = FALSE; /* Return value */
+ unsigned flags, version;
+ unsigned i;
+ size_t z;
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -144,24 +142,24 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
/* Version, class & flags */
UINT32DECODE(*pp, flags);
- version = (flags>>4) & 0x0f;
- if(version < H5O_DTYPE_VERSION_1 || version > H5O_DTYPE_VERSION_3)
+ version = (flags >> 4) & 0x0f;
+ if (version < H5O_DTYPE_VERSION_1 || version > H5O_DTYPE_VERSION_3)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "bad version number for datatype message")
dt->shared->version = version;
- dt->shared->type = (H5T_class_t)(flags & 0x0f);
+ dt->shared->type = (H5T_class_t)(flags & 0x0f);
flags >>= 8;
/* Size */
UINT32DECODE(*pp, dt->shared->size);
- switch(dt->shared->type) {
+ switch (dt->shared->type) {
case H5T_INTEGER:
/*
* Integer types...
*/
- dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
- dt->shared->u.atomic.lsb_pad = (flags & 0x2) ? H5T_PAD_ONE : H5T_PAD_ZERO;
- dt->shared->u.atomic.msb_pad = (flags & 0x4) ? H5T_PAD_ONE : H5T_PAD_ZERO;
+ dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
+ dt->shared->u.atomic.lsb_pad = (flags & 0x2) ? H5T_PAD_ONE : H5T_PAD_ZERO;
+ dt->shared->u.atomic.msb_pad = (flags & 0x4) ? H5T_PAD_ONE : H5T_PAD_ZERO;
dt->shared->u.atomic.u.i.sign = (flags & 0x8) ? H5T_SGN_2 : H5T_SGN_NONE;
UINT16DECODE(*pp, dt->shared->u.atomic.offset);
UINT16DECODE(*pp, dt->shared->u.atomic.prec);
@@ -172,19 +170,19 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
* Floating-point types...
*/
dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
- if(version >= H5O_DTYPE_VERSION_3) {
+ if (version >= H5O_DTYPE_VERSION_3) {
/* Unsupported byte order*/
- if((flags & 0x40) && !(flags & 0x1))
+ if ((flags & 0x40) && !(flags & 0x1))
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bad byte order for datatype message")
/* VAX order if both 1st and 6th bits are turned on*/
- if(flags & 0x40)
+ if (flags & 0x40)
dt->shared->u.atomic.order = H5T_ORDER_VAX;
} /* end if */
dt->shared->u.atomic.lsb_pad = (flags & 0x2) ? H5T_PAD_ONE : H5T_PAD_ZERO;
dt->shared->u.atomic.msb_pad = (flags & 0x4) ? H5T_PAD_ONE : H5T_PAD_ZERO;
dt->shared->u.atomic.u.f.pad = (flags & 0x8) ? H5T_PAD_ONE : H5T_PAD_ZERO;
- switch((flags >> 4) & 0x03) {
+ switch ((flags >> 4) & 0x03) {
case 0:
dt->shared->u.atomic.u.f.norm = H5T_NORM_NONE;
break;
@@ -203,16 +201,16 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
dt->shared->u.atomic.u.f.sign = (flags >> 8) & 0xff;
UINT16DECODE(*pp, dt->shared->u.atomic.offset);
UINT16DECODE(*pp, dt->shared->u.atomic.prec);
- dt->shared->u.atomic.u.f.epos = *(*pp)++;
+ dt->shared->u.atomic.u.f.epos = *(*pp)++;
dt->shared->u.atomic.u.f.esize = *(*pp)++;
HDassert(dt->shared->u.atomic.u.f.esize > 0);
- dt->shared->u.atomic.u.f.mpos = *(*pp)++;
+ dt->shared->u.atomic.u.f.mpos = *(*pp)++;
dt->shared->u.atomic.u.f.msize = *(*pp)++;
HDassert(dt->shared->u.atomic.u.f.msize > 0);
UINT32DECODE(*pp, dt->shared->u.atomic.u.f.ebias);
break;
- case H5T_TIME: /* Time datatypes */
+ case H5T_TIME: /* Time datatypes */
dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
UINT16DECODE(*pp, dt->shared->u.atomic.prec);
break;
@@ -221,13 +219,13 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
/*
* Character string types...
*/
- dt->shared->u.atomic.order = H5T_ORDER_NONE;
- dt->shared->u.atomic.prec = 8 * dt->shared->size;
- dt->shared->u.atomic.offset = 0;
+ dt->shared->u.atomic.order = H5T_ORDER_NONE;
+ dt->shared->u.atomic.prec = 8 * dt->shared->size;
+ dt->shared->u.atomic.offset = 0;
dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;
- dt->shared->u.atomic.u.s.pad = (H5T_str_t)(flags & 0x0f);
+ dt->shared->u.atomic.u.s.pad = (H5T_str_t)(flags & 0x0f);
dt->shared->u.atomic.u.s.cset = (H5T_cset_t)((flags >> 4) & 0x0f);
break;
@@ -235,7 +233,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
/*
* Bit fields...
*/
- dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
+ dt->shared->u.atomic.order = (flags & 0x1) ? H5T_ORDER_BE : H5T_ORDER_LE;
dt->shared->u.atomic.lsb_pad = (flags & 0x2) ? H5T_PAD_ONE : H5T_PAD_ZERO;
dt->shared->u.atomic.msb_pad = (flags & 0x4) ? H5T_PAD_ONE : H5T_PAD_ZERO;
UINT16DECODE(*pp, dt->shared->u.atomic.offset);
@@ -248,191 +246,195 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
*/
z = flags & (H5T_OPAQUE_TAG_MAX - 1);
HDassert(0 == (z & 0x7)); /*must be aligned*/
- if(NULL == (dt->shared->u.opaque.tag = (char *)H5MM_malloc(z + 1)))
+ if (NULL == (dt->shared->u.opaque.tag = (char *)H5MM_malloc(z + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
HDmemcpy(dt->shared->u.opaque.tag, *pp, z);
dt->shared->u.opaque.tag[z] = '\0';
*pp += z;
break;
- case H5T_COMPOUND:
- {
- unsigned offset_nbytes; /* Size needed to encode member offsets */
- size_t max_memb_pos = 0; /* Maximum member covered, so far */
- unsigned max_version = 0; /* Maximum member version */
- hbool_t upgrade_to = 0; /* Version number we can "soft" upgrade to */
- unsigned j;
+ case H5T_COMPOUND: {
+ unsigned offset_nbytes; /* Size needed to encode member offsets */
+ size_t max_memb_pos = 0; /* Maximum member covered, so far */
+ unsigned max_version = 0; /* Maximum member version */
+ hbool_t upgrade_to = 0; /* Version number we can "soft" upgrade to */
+ unsigned j;
- /* Compute the # of bytes required to store a member offset */
- offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
+ /* Compute the # of bytes required to store a member offset */
+ offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
- /*
- * Compound datatypes...
- */
- dt->shared->u.compnd.nmembs = flags & 0xffff;
- if(dt->shared->u.compnd.nmembs == 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid number of members: %u", dt->shared->u.compnd.nmembs)
- dt->shared->u.compnd.nalloc = dt->shared->u.compnd.nmembs;
- dt->shared->u.compnd.memb = (H5T_cmemb_t *)H5MM_calloc(dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t));
- dt->shared->u.compnd.memb_size = 0;
- if(NULL == dt->shared->u.compnd.memb)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed")
- for(i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- unsigned ndims = 0; /* Number of dimensions of the array field */
- htri_t can_upgrade; /* Whether we can upgrade this type's version */
- hsize_t dim[H5O_LAYOUT_NDIMS]; /* Dimensions of the array */
- H5T_t *array_dt; /* Temporary pointer to the array datatype */
- H5T_t *temp_type; /* Temporary pointer to the field's datatype */
-
- /* Decode the field name */
- dt->shared->u.compnd.memb[i].name = H5MM_xstrdup((const char *)*pp);
-
- /* Version 3 of the datatype message eliminated the padding to multiple of 8 bytes */
- if(version >= H5O_DTYPE_VERSION_3)
- /* Advance past name, including null terminator */
- *pp += HDstrlen((const char *)*pp) + 1;
- else
- /* Advance multiple of 8 w/ null terminator */
- *pp += ((HDstrlen((const char *)*pp) + 8) / 8) * 8;
+ /*
+ * Compound datatypes...
+ */
+ dt->shared->u.compnd.nmembs = flags & 0xffff;
+ if (dt->shared->u.compnd.nmembs == 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid number of members: %u",
+ dt->shared->u.compnd.nmembs)
+ dt->shared->u.compnd.nalloc = dt->shared->u.compnd.nmembs;
+ dt->shared->u.compnd.memb =
+ (H5T_cmemb_t *)H5MM_calloc(dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t));
+ dt->shared->u.compnd.memb_size = 0;
+ if (NULL == dt->shared->u.compnd.memb)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
+ unsigned ndims = 0; /* Number of dimensions of the array field */
+ htri_t can_upgrade; /* Whether we can upgrade this type's version */
+ hsize_t dim[H5O_LAYOUT_NDIMS]; /* Dimensions of the array */
+ H5T_t * array_dt; /* Temporary pointer to the array datatype */
+ H5T_t * temp_type; /* Temporary pointer to the field's datatype */
+
+ /* Decode the field name */
+ dt->shared->u.compnd.memb[i].name = H5MM_xstrdup((const char *)*pp);
- /* Decode the field offset */
- /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
- if(version >= H5O_DTYPE_VERSION_3)
- UINT32DECODE_VAR(*pp, dt->shared->u.compnd.memb[i].offset, offset_nbytes)
- else
- UINT32DECODE(*pp, dt->shared->u.compnd.memb[i].offset)
-
- /* Older versions of the library allowed a field to have
- * intrinsic 'arrayness'. Newer versions of the library
- * use the separate array datatypes. */
- if(version == H5O_DTYPE_VERSION_1) {
- /* Decode the number of dimensions */
- ndims = *(*pp)++;
-
- /* Check that ndims is valid */
- if(ndims > 4)
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid number of dimensions for array")
-
- *pp += 3; /*reserved bytes */
-
- /* Skip dimension permutation */
- *pp += 4;
-
- /* Skip reserved bytes */
- *pp += 4;
-
- /* Decode array dimension sizes */
- for(j = 0; j < 4; j++)
- UINT32DECODE(*pp, dim[j]);
- } /* end if */
-
- /* Allocate space for the field's datatype */
- if(NULL == (temp_type = H5T__alloc()))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* Decode the field's datatype information */
- if((can_upgrade = H5O_dtype_decode_helper(f, ioflags, pp, temp_type)) < 0) {
- for(j = 0; j <= i; j++)
- H5MM_xfree(dt->shared->u.compnd.memb[j].name);
- H5MM_xfree(dt->shared->u.compnd.memb);
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode member type")
- } /* end if */
-
- /* Upgrade the version if we can and it is necessary */
- if(can_upgrade && temp_type->shared->version > version) {
- upgrade_to = temp_type->shared->version;
-
- /* Pass "can_upgrade" flag down to parent type */
- ret_value = TRUE;
- } /* end if */
-
- /* Go create the array datatype now, for older versions of the datatype message */
- if(version == H5O_DTYPE_VERSION_1) {
- /* Check if this member is an array field */
- if(ndims > 0) {
- /* Create the array datatype for the field */
- if((array_dt = H5T__array_create(temp_type, ndims, dim)) == NULL) {
- for(j = 0; j <= i; j++)
- H5MM_xfree(dt->shared->u.compnd.memb[j].name);
- H5MM_xfree(dt->shared->u.compnd.memb);
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to create array datatype")
- } /* end if */
-
- /* Close the base type for the array */
- H5T_close(temp_type);
-
- /* Make the array type the type that is set for the field */
- temp_type = array_dt;
-
- /* Reset array version if NOCHANGE is specified (i.e. h5debug) */
- if(*ioflags & H5O_DECODEIO_NOCHANGE)
- temp_type->shared->version = H5O_DTYPE_VERSION_1;
- else {
- /* Otherwise upgrade the compound version */
- if(upgrade_to < temp_type->shared->version)
- upgrade_to = temp_type->shared->version;
-
- /* Set the return value to indicate that we should freely
- * upgrade parent types */
- ret_value = TRUE;
- } /* end else */
+ /* Version 3 of the datatype message eliminated the padding to multiple of 8 bytes */
+ if (version >= H5O_DTYPE_VERSION_3)
+ /* Advance past name, including null terminator */
+ *pp += HDstrlen((const char *)*pp) + 1;
+ else
+ /* Advance multiple of 8 w/ null terminator */
+ *pp += ((HDstrlen((const char *)*pp) + 8) / 8) * 8;
+
+ /* Decode the field offset */
+ /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
+ if (version >= H5O_DTYPE_VERSION_3)
+ UINT32DECODE_VAR(*pp, dt->shared->u.compnd.memb[i].offset, offset_nbytes)
+ else
+ UINT32DECODE(*pp, dt->shared->u.compnd.memb[i].offset)
+
+ /* Older versions of the library allowed a field to have
+ * intrinsic 'arrayness'. Newer versions of the library
+ * use the separate array datatypes. */
+ if (version == H5O_DTYPE_VERSION_1) {
+ /* Decode the number of dimensions */
+ ndims = *(*pp)++;
+
+ /* Check that ndims is valid */
+ if (ndims > 4)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid number of dimensions for array")
+
+ *pp += 3; /*reserved bytes */
+
+ /* Skip dimension permutation */
+ *pp += 4;
+
+ /* Skip reserved bytes */
+ *pp += 4;
+
+ /* Decode array dimension sizes */
+ for (j = 0; j < 4; j++)
+ UINT32DECODE(*pp, dim[j]);
+ } /* end if */
+
+ /* Allocate space for the field's datatype */
+ if (NULL == (temp_type = H5T__alloc()))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+
+ /* Decode the field's datatype information */
+ if ((can_upgrade = H5O_dtype_decode_helper(f, ioflags, pp, temp_type)) < 0) {
+ for (j = 0; j <= i; j++)
+ H5MM_xfree(dt->shared->u.compnd.memb[j].name);
+ H5MM_xfree(dt->shared->u.compnd.memb);
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode member type")
+ } /* end if */
+
+ /* Upgrade the version if we can and it is necessary */
+ if (can_upgrade && temp_type->shared->version > version) {
+ upgrade_to = temp_type->shared->version;
+
+ /* Pass "can_upgrade" flag down to parent type */
+ ret_value = TRUE;
+ } /* end if */
+
+ /* Go create the array datatype now, for older versions of the datatype message */
+ if (version == H5O_DTYPE_VERSION_1) {
+ /* Check if this member is an array field */
+ if (ndims > 0) {
+ /* Create the array datatype for the field */
+ if ((array_dt = H5T__array_create(temp_type, ndims, dim)) == NULL) {
+ for (j = 0; j <= i; j++)
+ H5MM_xfree(dt->shared->u.compnd.memb[j].name);
+ H5MM_xfree(dt->shared->u.compnd.memb);
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
+ "unable to create array datatype")
} /* end if */
- } /* end if */
-
- /* Keep track of the maximum member version found */
- if(temp_type->shared->version > max_version)
- max_version = temp_type->shared->version;
-
- /*
- * Set the "force conversion" flag if VL datatype fields exist in this
- * type or any component types
- */
- if(temp_type->shared->force_conv == TRUE)
- dt->shared->force_conv = TRUE;
-
- /* Member size */
- dt->shared->u.compnd.memb[i].size = temp_type->shared->size;
- dt->shared->u.compnd.memb_size += temp_type->shared->size;
-
- /* Set the field datatype (finally :-) */
- dt->shared->u.compnd.memb[i].type = temp_type;
-
- /* Check if this field overlaps with a prior field */
- /* (probably indicates that the file is corrupt) */
- if(i > 0 && dt->shared->u.compnd.memb[i].offset < max_memb_pos) {
- for(j = 0; j < i; j++)
- if(dt->shared->u.compnd.memb[i].offset >= dt->shared->u.compnd.memb[j].offset
- && dt->shared->u.compnd.memb[i].offset < (dt->shared->u.compnd.memb[j].offset + dt->shared->u.compnd.memb[j].size))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "member overlaps with previous member")
- } /* end if */
-
- /* Update the maximum member position covered */
- max_memb_pos = MAX(max_memb_pos, (dt->shared->u.compnd.memb[i].offset + dt->shared->u.compnd.memb[i].size));
- } /* end for */
- /* Check if the compound type is packed */
- H5T__update_packed(dt);
-
- /* Upgrade the compound if requested */
- if(version < upgrade_to) {
- version = upgrade_to;
- if(H5T__upgrade_version(dt, upgrade_to) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade compound encoding version")
- /* We won't mark the message dirty since there were no
- * errors in the file, simply type versions that we will no
- * longer encode. */
+ /* Close the base type for the array */
+ H5T_close(temp_type);
+
+ /* Make the array type the type that is set for the field */
+ temp_type = array_dt;
+
+ /* Reset array version if NOCHANGE is specified (i.e. h5debug) */
+ if (*ioflags & H5O_DECODEIO_NOCHANGE)
+ temp_type->shared->version = H5O_DTYPE_VERSION_1;
+ else {
+ /* Otherwise upgrade the compound version */
+ if (upgrade_to < temp_type->shared->version)
+ upgrade_to = temp_type->shared->version;
+
+ /* Set the return value to indicate that we should freely
+ * upgrade parent types */
+ ret_value = TRUE;
+ } /* end else */
+ } /* end if */
+ } /* end if */
+
+ /* Keep track of the maximum member version found */
+ if (temp_type->shared->version > max_version)
+ max_version = temp_type->shared->version;
+
+ /*
+ * Set the "force conversion" flag if VL datatype fields exist in this
+ * type or any component types
+ */
+ if (temp_type->shared->force_conv == TRUE)
+ dt->shared->force_conv = TRUE;
+
+ /* Member size */
+ dt->shared->u.compnd.memb[i].size = temp_type->shared->size;
+ dt->shared->u.compnd.memb_size += temp_type->shared->size;
+
+ /* Set the field datatype (finally :-) */
+ dt->shared->u.compnd.memb[i].type = temp_type;
+
+ /* Check if this field overlaps with a prior field */
+ /* (probably indicates that the file is corrupt) */
+ if (i > 0 && dt->shared->u.compnd.memb[i].offset < max_memb_pos) {
+ for (j = 0; j < i; j++)
+ if (dt->shared->u.compnd.memb[i].offset >= dt->shared->u.compnd.memb[j].offset &&
+ dt->shared->u.compnd.memb[i].offset <
+ (dt->shared->u.compnd.memb[j].offset + dt->shared->u.compnd.memb[j].size))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL,
+ "member overlaps with previous member")
} /* end if */
- /* Check that no member of this compound has a version greater
- * than the compound itself. */
- H5O_DTYPE_CHECK_VERSION(dt, version, max_version, ioflags, "compound", FAIL)
- }
- break;
+ /* Update the maximum member position covered */
+ max_memb_pos = MAX(max_memb_pos,
+ (dt->shared->u.compnd.memb[i].offset + dt->shared->u.compnd.memb[i].size));
+ } /* end for */
+
+ /* Check if the compound type is packed */
+ H5T__update_packed(dt);
+
+ /* Upgrade the compound if requested */
+ if (version < upgrade_to) {
+ version = upgrade_to;
+ if (H5T__upgrade_version(dt, upgrade_to) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade compound encoding version")
+ /* We won't mark the message dirty since there were no
+ * errors in the file, simply type versions that we will no
+ * longer encode. */
+ } /* end if */
+
+ /* Check that no member of this compound has a version greater
+ * than the compound itself. */
+ H5O_DTYPE_CHECK_VERSION(dt, version, max_version, ioflags, "compound", FAIL)
+ } break;
case H5T_REFERENCE: /* Reference datatypes... */
- dt->shared->u.atomic.order = H5T_ORDER_NONE;
- dt->shared->u.atomic.prec = 8 * dt->shared->size;
- dt->shared->u.atomic.offset = 0;
+ dt->shared->u.atomic.order = H5T_ORDER_NONE;
+ dt->shared->u.atomic.prec = 8 * dt->shared->size;
+ dt->shared->u.atomic.offset = 0;
dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;
@@ -440,7 +442,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
dt->shared->u.atomic.u.r.rtype = (H5R_type_t)(flags & 0x0f);
/* Set extra information for object references, so the hobj_ref_t gets swizzled correctly */
- if(dt->shared->u.atomic.u.r.rtype == H5R_OBJECT) {
+ if (dt->shared->u.atomic.u.r.rtype == H5R_OBJECT) {
/* Mark location this type as undefined for now. The caller function should
* decide the location. */
dt->shared->u.atomic.u.r.loc = H5T_LOC_BADLOC;
@@ -455,26 +457,27 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
* Enumeration datatypes...
*/
dt->shared->u.enumer.nmembs = dt->shared->u.enumer.nalloc = flags & 0xffff;
- if(NULL == (dt->shared->parent = H5T__alloc()))
+ if (NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype")
/* Check if the parent of this enum has a version greater than the
* enum itself. */
- H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version,
- ioflags, "enum", FAIL)
+ H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version, ioflags, "enum", FAIL)
- if(NULL == (dt->shared->u.enumer.name = (char **)H5MM_calloc(dt->shared->u.enumer.nalloc * sizeof(char*))) ||
- NULL == (dt->shared->u.enumer.value = (uint8_t *)H5MM_calloc(dt->shared->u.enumer.nalloc * dt->shared->parent->shared->size)))
+ if (NULL == (dt->shared->u.enumer.name =
+ (char **)H5MM_calloc(dt->shared->u.enumer.nalloc * sizeof(char *))) ||
+ NULL == (dt->shared->u.enumer.value = (uint8_t *)H5MM_calloc(
+ dt->shared->u.enumer.nalloc * dt->shared->parent->shared->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Names */
- for(i = 0; i < dt->shared->u.enumer.nmembs; i++) {
- dt->shared->u.enumer.name[i] = H5MM_xstrdup((const char*)*pp);
+ for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
+ dt->shared->u.enumer.name[i] = H5MM_xstrdup((const char *)*pp);
/* Version 3 of the datatype message eliminated the padding to multiple of 8 bytes */
- if(version >= H5O_DTYPE_VERSION_3)
+ if (version >= H5O_DTYPE_VERSION_3)
/* Advance past name, including null terminator */
*pp += HDstrlen((const char *)*pp) + 1;
else
@@ -488,75 +491,72 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
*pp += dt->shared->u.enumer.nmembs * dt->shared->parent->shared->size;
break;
- case H5T_VLEN: /* Variable length datatypes... */
+ case H5T_VLEN: /* Variable length datatypes... */
/* Set the type of VL information, either sequence or string */
dt->shared->u.vlen.type = (H5T_vlen_type_t)(flags & 0x0f);
- if(dt->shared->u.vlen.type == H5T_VLEN_STRING) {
+ if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
dt->shared->u.vlen.pad = (H5T_str_t)((flags >> 4) & 0x0f);
dt->shared->u.vlen.cset = (H5T_cset_t)((flags >> 8) & 0x0f);
} /* end if */
/* Decode base type of VL information */
- if(NULL == (dt->shared->parent = H5T__alloc()))
+ if (NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type")
/* Check if the parent of this vlen has a version greater than the
* vlen itself. */
- H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version,
- ioflags, "vlen", FAIL)
+ H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version, ioflags, "vlen", FAIL)
- dt->shared->force_conv=TRUE;
+ dt->shared->force_conv = TRUE;
/* Mark location this type as undefined for now. The caller function should
* decide the location. */
- if(H5T_set_loc(dt, f, H5T_LOC_BADLOC) < 0)
+ if (H5T_set_loc(dt, f, H5T_LOC_BADLOC) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location")
break;
- case H5T_ARRAY: /* Array datatypes */
+ case H5T_ARRAY: /* Array datatypes */
/* Decode the number of dimensions */
dt->shared->u.array.ndims = *(*pp)++;
/* Double-check the number of dimensions */
- if(dt->shared->u.array.ndims > H5S_MAX_RANK)
+ if (dt->shared->u.array.ndims > H5S_MAX_RANK)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "too many dimensions for array datatype")
/* Skip reserved bytes, if version has them */
- if(version < H5O_DTYPE_VERSION_3)
+ if (version < H5O_DTYPE_VERSION_3)
*pp += 3;
/* Decode array dimension sizes & compute number of elements */
- for(i = 0, dt->shared->u.array.nelem = 1; i < (unsigned)dt->shared->u.array.ndims; i++) {
+ for (i = 0, dt->shared->u.array.nelem = 1; i < (unsigned)dt->shared->u.array.ndims; i++) {
UINT32DECODE(*pp, dt->shared->u.array.dim[i]);
dt->shared->u.array.nelem *= dt->shared->u.array.dim[i];
} /* end for */
/* Skip array dimension permutations, if version has them */
- if(version < H5O_DTYPE_VERSION_3)
+ if (version < H5O_DTYPE_VERSION_3)
*pp += dt->shared->u.array.ndims * 4;
/* Decode base type of array */
- if(NULL == (dt->shared->parent = H5T__alloc()))
+ if (NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode array parent type")
/* Check if the parent of this array has a version greater than the
* array itself. */
- H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version,
- ioflags, "array", FAIL)
+ H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version, ioflags, "array", FAIL)
/* There should be no array datatypes with version < 2. */
- H5O_DTYPE_CHECK_VERSION(dt, version, H5O_DTYPE_VERSION_2, ioflags,
- "array", FAIL)
+ H5O_DTYPE_CHECK_VERSION(dt, version, H5O_DTYPE_VERSION_2, ioflags, "array", FAIL)
/*
* Set the "force conversion" flag if a VL base datatype is used or
* or if any components of the base datatype are VL types.
*/
- if(dt->shared->parent->shared->force_conv == TRUE)
+ if (dt->shared->parent->shared->force_conv == TRUE)
dt->shared->force_conv = TRUE;
break;
@@ -567,18 +567,17 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
} /* end switch */
done:
- if(ret_value < 0) {
- if(dt != NULL) {
- if(dt->shared != NULL)
+ if (ret_value < 0) {
+ if (dt != NULL) {
+ if (dt->shared != NULL)
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
dt = H5FL_FREE(H5T_t, dt);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_decode_helper() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_encode_helper
*
@@ -598,11 +597,11 @@ done:
static herr_t
H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
{
- unsigned flags = 0;
- uint8_t *hdr = (uint8_t *)*pp;
- unsigned i;
- size_t n, z;
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned flags = 0;
+ uint8_t *hdr = (uint8_t *)*pp;
+ unsigned i;
+ size_t n, z;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -614,14 +613,14 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
*pp += 4;
UINT32ENCODE(*pp, dt->shared->size);
- switch(dt->shared->type) {
+ switch (dt->shared->type) {
case H5T_INTEGER:
/*
* Integer datatypes...
*/
switch (dt->shared->u.atomic.order) {
case H5T_ORDER_LE:
- break; /*nothing */
+ break; /*nothing */
case H5T_ORDER_BE:
flags |= 0x01;
@@ -632,12 +631,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_MIXED:
case H5T_ORDER_NONE:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "byte order is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "byte order is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x02;
@@ -647,12 +647,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ERROR:
case H5T_PAD_BACKGROUND:
@@ -662,12 +663,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
break;
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.u.i.sign) {
case H5T_SGN_NONE:
- break; /*nothing */
+ break; /*nothing */
case H5T_SGN_2:
flags |= 0x08;
@@ -676,7 +678,8 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_SGN_ERROR:
case H5T_NSGN:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "sign scheme is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "sign scheme is not supported in file format yet")
} /* end switch */
UINT16ENCODE(*pp, dt->shared->u.atomic.offset);
@@ -689,13 +692,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
*/
switch (dt->shared->u.atomic.order) {
case H5T_ORDER_LE:
- break; /*nothing*/
+ break; /*nothing*/
case H5T_ORDER_BE:
flags |= 0x01;
break;
- case H5T_ORDER_VAX: /*turn on 1st and 6th (reserved before adding VAX) bits*/
+ case H5T_ORDER_VAX: /*turn on 1st and 6th (reserved before adding VAX) bits*/
flags |= 0x41;
HDassert(dt->shared->version >= H5O_DTYPE_VERSION_3);
break;
@@ -704,12 +707,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_ERROR:
case H5T_ORDER_NONE:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "byte order is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "byte order is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x02;
@@ -719,12 +723,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x04;
@@ -734,12 +739,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.u.f.pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x08;
@@ -749,12 +755,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.u.f.norm) {
case H5T_NORM_NONE:
- break; /*nothing */
+ break; /*nothing */
case H5T_NORM_MSBSET:
flags |= 0x10;
@@ -766,7 +773,8 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_NORM_ERROR:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "normalization scheme is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "normalization scheme is not supported in file format yet")
} /* end switch */
flags = (unsigned)(flags | ((dt->shared->u.atomic.u.f.sign << 8) & 0xff00));
@@ -783,10 +791,10 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
UINT32ENCODE(*pp, dt->shared->u.atomic.u.f.ebias);
break;
- case H5T_TIME: /* Time datatypes... */
+ case H5T_TIME: /* Time datatypes... */
switch (dt->shared->u.atomic.order) {
case H5T_ORDER_LE:
- break; /*nothing */
+ break; /*nothing */
case H5T_ORDER_BE:
flags |= 0x01;
@@ -797,7 +805,8 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_ERROR:
case H5T_ORDER_NONE:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "byte order is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "byte order is not supported in file format yet")
} /* end switch */
UINT16ENCODE(*pp, dt->shared->u.atomic.prec);
break;
@@ -822,7 +831,7 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
*/
switch (dt->shared->u.atomic.order) {
case H5T_ORDER_LE:
- break; /*nothing */
+ break; /*nothing */
case H5T_ORDER_BE:
flags |= 0x01;
@@ -833,12 +842,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_ERROR:
case H5T_ORDER_NONE:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "byte order is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "byte order is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x02;
@@ -848,12 +858,13 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
- break; /*nothing */
+ break; /*nothing */
case H5T_PAD_ONE:
flags |= 0x04;
@@ -863,7 +874,8 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
case H5T_PAD_BACKGROUND:
case H5T_NPAD:
default:
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bit padding is not supported in file format yet")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "bit padding is not supported in file format yet")
} /* end switch */
UINT16ENCODE(*pp, dt->shared->u.atomic.offset);
@@ -877,90 +889,89 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
* null terminated).
*/
{
- size_t aligned;
+ size_t aligned;
- z = HDstrlen(dt->shared->u.opaque.tag);
+ z = HDstrlen(dt->shared->u.opaque.tag);
aligned = (z + 7) & (H5T_OPAQUE_TAG_MAX - 8);
- flags = (unsigned)(flags | aligned);
- HDmemcpy(*pp, dt->shared->u.opaque.tag, MIN(z,aligned));
- for(n = MIN(z, aligned); n < aligned; n++)
+ flags = (unsigned)(flags | aligned);
+ HDmemcpy(*pp, dt->shared->u.opaque.tag, MIN(z, aligned));
+ for (n = MIN(z, aligned); n < aligned; n++)
(*pp)[n] = 0;
*pp += aligned;
}
break;
- case H5T_COMPOUND:
- {
- unsigned offset_nbytes; /* Size needed to encode member offsets */
+ case H5T_COMPOUND: {
+ unsigned offset_nbytes; /* Size needed to encode member offsets */
- /* Compute the # of bytes required to store a member offset */
- offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
+ /* Compute the # of bytes required to store a member offset */
+ offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
- /*
- * Compound datatypes...
+ /*
+ * Compound datatypes...
+ */
+ flags = dt->shared->u.compnd.nmembs & 0xffff;
+ for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
+ /* Sanity check */
+ /* (compound datatypes w/array members must be encoded w/version >= 2) */
+ HDassert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY ||
+ dt->shared->version >= H5O_DTYPE_VERSION_2);
+
+ /* Check that the version is at least as great as the member */
+ HDassert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
+
+ /* Name */
+ HDstrcpy((char *)(*pp), dt->shared->u.compnd.memb[i].name);
+
+ /* Version 3 of the datatype message removed the padding to multiple of 8 bytes */
+ n = HDstrlen(dt->shared->u.compnd.memb[i].name);
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
+ *pp += n + 1;
+ else {
+ /* Pad name to multiple of 8 bytes */
+ for (z = n + 1; z % 8; z++)
+ (*pp)[z] = '\0';
+ *pp += z;
+ } /* end if */
+
+ /* Member offset */
+ /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
+ UINT32ENCODE_VAR(*pp, (uint32_t)dt->shared->u.compnd.memb[i].offset, offset_nbytes)
+ else
+ UINT32ENCODE(*pp, dt->shared->u.compnd.memb[i].offset)
+
+ /* If we don't have any array fields, write out the old style
+ * member information, for better backward compatibility
+ * Write out all zeros for the array information, though...
*/
- flags = dt->shared->u.compnd.nmembs & 0xffff;
- for(i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- /* Sanity check */
- /* (compound datatypes w/array members must be encoded w/version >= 2) */
- HDassert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY || dt->shared->version >= H5O_DTYPE_VERSION_2);
-
- /* Check that the version is at least as great as the member */
- HDassert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
-
- /* Name */
- HDstrcpy((char*)(*pp), dt->shared->u.compnd.memb[i].name);
-
- /* Version 3 of the datatype message removed the padding to multiple of 8 bytes */
- n = HDstrlen(dt->shared->u.compnd.memb[i].name);
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
- *pp += n + 1;
- else {
- /* Pad name to multiple of 8 bytes */
- for(z = n + 1; z % 8; z++)
- (*pp)[z] = '\0';
- *pp += z;
- } /* end if */
-
- /* Member offset */
- /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
- UINT32ENCODE_VAR(*pp, (uint32_t)dt->shared->u.compnd.memb[i].offset, offset_nbytes)
- else
- UINT32ENCODE(*pp, dt->shared->u.compnd.memb[i].offset)
+ if (dt->shared->version == H5O_DTYPE_VERSION_1) {
+ unsigned j;
- /* If we don't have any array fields, write out the old style
- * member information, for better backward compatibility
- * Write out all zeros for the array information, though...
- */
- if(dt->shared->version == H5O_DTYPE_VERSION_1) {
- unsigned j;
+ /* Dimensionality */
+ *(*pp)++ = 0;
- /* Dimensionality */
- *(*pp)++ = 0;
+ /* Reserved */
+ *(*pp)++ = 0;
+ *(*pp)++ = 0;
+ *(*pp)++ = 0;
- /* Reserved */
- *(*pp)++ = 0;
- *(*pp)++ = 0;
- *(*pp)++ = 0;
+ /* Dimension permutation */
+ UINT32ENCODE(*pp, 0);
- /* Dimension permutation */
- UINT32ENCODE(*pp, 0);
+ /* Reserved */
+ UINT32ENCODE(*pp, 0);
- /* Reserved */
+ /* Dimensions */
+ for (j = 0; j < 4; j++)
UINT32ENCODE(*pp, 0);
+ } /* end if */
- /* Dimensions */
- for(j = 0; j < 4; j++)
- UINT32ENCODE(*pp, 0);
- } /* end if */
-
- /* Subtype */
- if(H5O_dtype_encode_helper(f, pp, dt->shared->u.compnd.memb[i].type) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode member type")
- } /* end for */
- }
- break;
+ /* Subtype */
+ if (H5O_dtype_encode_helper(f, pp, dt->shared->u.compnd.memb[i].type) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode member type")
+ } /* end for */
+ } break;
case H5T_REFERENCE:
flags |= (dt->shared->u.atomic.u.r.rtype & 0x0f);
@@ -976,47 +987,48 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
flags = dt->shared->u.enumer.nmembs & 0xffff;
/* Parent type */
- if(H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode parent datatype")
/* Names, each a multiple of eight bytes */
- for(i = 0; i < dt->shared->u.enumer.nmembs; i++) {
+ for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
/* Name */
- HDstrcpy((char*)(*pp), dt->shared->u.enumer.name[i]);
+ HDstrcpy((char *)(*pp), dt->shared->u.enumer.name[i]);
/* Version 3 of the datatype message removed the padding to multiple of 8 bytes */
n = HDstrlen(dt->shared->u.enumer.name[i]);
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
*pp += n + 1;
else {
/* Pad to multiple of 8 bytes */
- for(z = n + 1; z % 8; z++)
+ for (z = n + 1; z % 8; z++)
(*pp)[z] = '\0';
*pp += z;
} /* end for */
- } /* end for */
+ } /* end for */
/* Values */
- HDmemcpy(*pp, dt->shared->u.enumer.value, dt->shared->u.enumer.nmembs * dt->shared->parent->shared->size);
+ HDmemcpy(*pp, dt->shared->u.enumer.value,
+ dt->shared->u.enumer.nmembs * dt->shared->parent->shared->size);
*pp += dt->shared->u.enumer.nmembs * dt->shared->parent->shared->size;
break;
- case H5T_VLEN: /* Variable length datatypes... */
+ case H5T_VLEN: /* Variable length datatypes... */
/* Check that the version is at least as great as the parent */
HDassert(dt->shared->version >= dt->shared->parent->shared->version);
flags |= (dt->shared->u.vlen.type & 0x0f);
- if(dt->shared->u.vlen.type == H5T_VLEN_STRING) {
- flags = (unsigned)(flags | (((unsigned)dt->shared->u.vlen.pad & 0x0f) << 4));
- flags = (unsigned)(flags | (((unsigned)dt->shared->u.vlen.cset & 0x0f) << 8));
+ if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
+ flags = (unsigned)(flags | (((unsigned)dt->shared->u.vlen.pad & 0x0f) << 4));
+ flags = (unsigned)(flags | (((unsigned)dt->shared->u.vlen.cset & 0x0f) << 8));
} /* end if */
/* Encode base type of VL information */
- if(H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type")
break;
- case H5T_ARRAY: /* Array datatypes */
+ case H5T_ARRAY: /* Array datatypes */
/* Double-check the number of dimensions */
HDassert(dt->shared->u.array.ndims <= H5S_MAX_RANK);
@@ -1031,7 +1043,7 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
*(*pp)++ = (uint8_t)dt->shared->u.array.ndims;
/* Drop this information for Version 3 of the format */
- if(dt->shared->version < H5O_DTYPE_VERSION_3) {
+ if (dt->shared->version < H5O_DTYPE_VERSION_3) {
/* Reserved */
*(*pp)++ = '\0';
*(*pp)++ = '\0';
@@ -1039,18 +1051,18 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
} /* end if */
/* Encode array dimensions */
- for(i = 0; i < (unsigned)dt->shared->u.array.ndims; i++)
+ for (i = 0; i < (unsigned)dt->shared->u.array.ndims; i++)
UINT32ENCODE(*pp, dt->shared->u.array.dim[i]);
/* Drop this information for Version 3 of the format */
- if(dt->shared->version < H5O_DTYPE_VERSION_3) {
+ if (dt->shared->version < H5O_DTYPE_VERSION_3) {
/* Encode 'fake' array dimension permutations */
- for(i = 0; i < (unsigned)dt->shared->u.array.ndims; i++)
+ for (i = 0; i < (unsigned)dt->shared->u.array.ndims; i++)
UINT32ENCODE(*pp, i);
} /* end if */
/* Encode base type of array's information */
- if(H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
+ if (H5O_dtype_encode_helper(f, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type")
break;
@@ -1071,32 +1083,32 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_encode_helper() */
-
/*--------------------------------------------------------------------------
NAME
H5O_dtype_decode
PURPOSE
Decode a message and return a pointer to a memory struct
- with the decoded information
+ with the decoded information
USAGE
void *H5O_dtype_decode(f, dxpl_id, mesg_flags, p)
- H5F_t *f; IN: pointer to the HDF5 file struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
hid_t dxpl_id; IN: DXPL for any I/O
unsigned mesg_flags; IN: Message flags to influence decoding
- const uint8 *p; IN: the raw information buffer
+ const uint8 *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
DESCRIPTION
- This function decodes the "raw" disk form of a simple datatype message
+ This function decodes the "raw" disk form of a simple datatype message
into a struct in memory native format. The struct is allocated within this
function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
-H5O_dtype_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
- unsigned *ioflags/*in,out*/, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+H5O_dtype_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned *ioflags /*in,out*/,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5T_t *dt = NULL;
- void *ret_value; /* Return value */
+ H5T_t *dt = NULL;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1104,11 +1116,11 @@ H5O_dtype_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
HDassert(p);
/* Allocate datatype message */
- if(NULL == (dt = H5T__alloc()))
+ if (NULL == (dt = H5T__alloc()))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Perform actual decode of message */
- if(H5O_dtype_decode_helper(f, ioflags, &p, dt) < 0)
+ if (H5O_dtype_decode_helper(f, ioflags, &p, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type")
/* Set return value */
@@ -1118,7 +1130,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_decode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_dtype_encode
@@ -1126,21 +1137,21 @@ done:
Encode a simple datatype message
USAGE
herr_t H5O_dtype_encode(f, raw_size, p, mesg)
- H5F_t *f; IN: pointer to the HDF5 file struct
- size_t raw_size; IN: size of the raw information buffer
- const uint8 *p; IN: the raw information buffer
- const void *mesg; IN: Pointer to the simple datatype struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ size_t raw_size; IN: size of the raw information buffer
+ const uint8 *p; IN: the raw information buffer
+ const void *mesg; IN: Pointer to the simple datatype struct
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function encodes the native memory form of the simple datatype
+ This function encodes the native memory form of the simple datatype
message in the "raw" disk form.
--------------------------------------------------------------------------*/
static herr_t
H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
- const H5T_t *dt = (const H5T_t *) mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5T_t *dt = (const H5T_t *)mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1150,14 +1161,13 @@ H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg)
HDassert(dt);
/* encode */
- if(H5O_dtype_encode_helper(f, &p, dt) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type")
+ if (H5O_dtype_encode_helper(f, &p, dt) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_encode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_dtype_copy
@@ -1165,22 +1175,22 @@ done:
Copies a message from MESG to DEST, allocating DEST if necessary.
USAGE
void *H5O_dtype_copy(mesg, dest)
- const void *mesg; IN: Pointer to the source simple datatype
- struct
- const void *dest; IN: Pointer to the destination simple
- datatype struct
+ const void *mesg; IN: Pointer to the source simple datatype
+ struct
+ const void *dest; IN: Pointer to the destination simple
+ datatype struct
RETURNS
Pointer to DEST on success, NULL on failure
DESCRIPTION
- This function copies a native (memory) simple datatype message,
+ This function copies a native (memory) simple datatype message,
allocating the destination structure if necessary.
--------------------------------------------------------------------------*/
static void *
H5O_dtype_copy(const void *_src, void *_dst)
{
- const H5T_t *src = (const H5T_t *) _src;
- H5T_t *dst;
- void *ret_value; /* Return value */
+ const H5T_t *src = (const H5T_t *)_src;
+ H5T_t * dst;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1188,14 +1198,14 @@ H5O_dtype_copy(const void *_src, void *_dst)
HDassert(src);
/* Copy */
- if(NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
+ if (NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't copy type")
/* Was result already allocated? */
- if(_dst) {
- *((H5T_t *) _dst) = *dst;
- dst = H5FL_FREE(H5T_t, dst);
- dst = (H5T_t *) _dst;
+ if (_dst) {
+ *((H5T_t *)_dst) = *dst;
+ dst = H5FL_FREE(H5T_t, dst);
+ dst = (H5T_t *)_dst;
} /* end if */
/* Set return value */
@@ -1205,7 +1215,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_copy() */
-
/*--------------------------------------------------------------------------
NAME
H5O_dtype_size
@@ -1213,21 +1222,21 @@ done:
Return the raw message size in bytes
USAGE
void *H5O_dtype_size(f, mesg)
- H5F_t *f; IN: pointer to the HDF5 file struct
- const void *mesg; IN: Pointer to the source simple datatype struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ const void *mesg; IN: Pointer to the source simple datatype struct
RETURNS
Size of message on success, 0 on failure
DESCRIPTION
- This function returns the size of the raw simple datatype message on
+ This function returns the size of the raw simple datatype message on
success. (Not counting the message type or size fields, only the data
portion of the message). It doesn't take into account alignment.
--------------------------------------------------------------------------*/
static size_t
H5O_dtype_size(const H5F_t *f, const void *_mesg)
{
- const H5T_t *dt = (const H5T_t *)_mesg;
- unsigned u; /* Local index variable */
- size_t ret_value;
+ const H5T_t *dt = (const H5T_t *)_mesg;
+ unsigned u; /* Local index variable */
+ size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1235,11 +1244,11 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
HDassert(dt);
/* Set the common size information */
- ret_value = 4 + /* Type, class & flags */
- 4; /* Size of datatype */
+ ret_value = 4 + /* Type, class & flags */
+ 4; /* Size of datatype */
/* Add in the property field length for each datatype class */
- switch(dt->shared->type) {
+ switch (dt->shared->type) {
case H5T_INTEGER:
ret_value += 4;
break;
@@ -1260,54 +1269,52 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
ret_value += (HDstrlen(dt->shared->u.opaque.tag) + 7) & (H5T_OPAQUE_TAG_MAX - 8);
break;
- case H5T_COMPOUND:
- {
- unsigned offset_nbytes; /* Size needed to encode member offsets */
+ case H5T_COMPOUND: {
+ unsigned offset_nbytes; /* Size needed to encode member offsets */
- /* Compute the # of bytes required to store a member offset */
- offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
+ /* Compute the # of bytes required to store a member offset */
+ offset_nbytes = H5VM_limit_enc_size((uint64_t)dt->shared->size);
- /* Compute the total size needed to encode compound datatype */
- for(u = 0; u < dt->shared->u.compnd.nmembs; u++) {
- size_t name_len; /* Length of field's name */
+ /* Compute the total size needed to encode compound datatype */
+ for (u = 0; u < dt->shared->u.compnd.nmembs; u++) {
+ size_t name_len; /* Length of field's name */
- /* Get length of field's name */
- name_len = HDstrlen(dt->shared->u.compnd.memb[u].name);
+ /* Get length of field's name */
+ name_len = HDstrlen(dt->shared->u.compnd.memb[u].name);
- /* Versions of the format >= 3 don't pad out the name */
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
- ret_value += name_len + 1;
- else
- ret_value += ((name_len + 8) / 8) * 8;
-
- /* Check for encoding array datatype or using the latest file format */
- /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
- ret_value += offset_nbytes; /*member offset*/
- else if(dt->shared->version == H5O_DTYPE_VERSION_2)
- ret_value += 4; /*member offset*/
- else
- ret_value += 4 + /*member offset*/
- 1 + /*dimensionality*/
- 3 + /*reserved*/
- 4 + /*permutation*/
- 4 + /*reserved*/
- 16; /*dimensions*/
- ret_value += H5O_dtype_size(f, dt->shared->u.compnd.memb[u].type);
- } /* end for */
- }
- break;
+ /* Versions of the format >= 3 don't pad out the name */
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
+ ret_value += name_len + 1;
+ else
+ ret_value += ((name_len + 8) / 8) * 8;
+
+ /* Check for encoding array datatype or using the latest file format */
+ /* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
+ ret_value += offset_nbytes; /*member offset*/
+ else if (dt->shared->version == H5O_DTYPE_VERSION_2)
+ ret_value += 4; /*member offset*/
+ else
+ ret_value += 4 + /*member offset*/
+ 1 + /*dimensionality*/
+ 3 + /*reserved*/
+ 4 + /*permutation*/
+ 4 + /*reserved*/
+ 16; /*dimensions*/
+ ret_value += H5O_dtype_size(f, dt->shared->u.compnd.memb[u].type);
+ } /* end for */
+ } break;
case H5T_ENUM:
ret_value += H5O_dtype_size(f, dt->shared->parent);
- for(u = 0; u < dt->shared->u.enumer.nmembs; u++) {
- size_t name_len; /* Length of field's name */
+ for (u = 0; u < dt->shared->u.enumer.nmembs; u++) {
+ size_t name_len; /* Length of field's name */
/* Get length of field's name */
name_len = HDstrlen(dt->shared->u.enumer.name[u]);
/* Versions of the format >= 3 don't pad out the name */
- if(dt->shared->version >= H5O_DTYPE_VERSION_3)
+ if (dt->shared->version >= H5O_DTYPE_VERSION_3)
ret_value += name_len + 1;
else
ret_value += ((name_len + 8) / 8) * 8;
@@ -1321,10 +1328,10 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
case H5T_ARRAY:
ret_value += 1; /* ndims */
- if(dt->shared->version < H5O_DTYPE_VERSION_3)
- ret_value += 3; /* reserved bytes*/
+ if (dt->shared->version < H5O_DTYPE_VERSION_3)
+ ret_value += 3; /* reserved bytes*/
ret_value += 4 * dt->shared->u.array.ndims; /* dimensions */
- if(dt->shared->version < H5O_DTYPE_VERSION_3)
+ if (dt->shared->version < H5O_DTYPE_VERSION_3)
ret_value += 4 * dt->shared->u.array.ndims; /* dimension permutations */
ret_value += H5O_dtype_size(f, dt->shared->parent);
break;
@@ -1341,7 +1348,6 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_dtype_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_reset
*
@@ -1360,17 +1366,16 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
static herr_t
H5O_dtype_reset(void *_mesg)
{
- H5T_t *dt = (H5T_t *) _mesg;
+ H5T_t *dt = (H5T_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(dt)
+ if (dt)
H5T__free(dt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_dtype_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_free
*
@@ -1392,13 +1397,12 @@ H5O_dtype_free(void *mesg)
HDassert(mesg);
- ((H5T_t *) mesg)->shared = H5FL_FREE(H5T_shared_t, ((H5T_t *) mesg)->shared);
- mesg = H5FL_FREE(H5T_t, mesg);
+ ((H5T_t *)mesg)->shared = H5FL_FREE(H5T_shared_t, ((H5T_t *)mesg)->shared);
+ mesg = H5FL_FREE(H5T_t, mesg);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_dtype_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_set_share
*
@@ -1412,9 +1416,9 @@ H5O_dtype_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
+H5O_dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh)
{
- H5T_t *dt = (H5T_t *)_mesg;
+ H5T_t *dt = (H5T_t *)_mesg;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -1429,19 +1433,20 @@ H5O_dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
/* Make sure we're not sharing a committed type in the heap */
HDassert(sh->type == H5O_SHARE_TYPE_COMMITTED ||
- (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
+ (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
/* Copy the shared information */
- if(H5O_set_shared(&(dt->sh_loc), sh) < 0)
+ if (H5O_set_shared(&(dt->sh_loc), sh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy shared message info")
/* If this is now a committed datatype, set its state properly. */
- if(sh->type == H5O_SHARE_TYPE_COMMITTED) {
+ if (sh->type == H5O_SHARE_TYPE_COMMITTED) {
dt->shared->state = H5T_STATE_NAMED;
/* Set up the object location for the datatype also */
dt->oloc.file = sh->file;
- dt->oloc.addr = sh->u.loc.oh_addr;;
+ dt->oloc.addr = sh->u.loc.oh_addr;
+ ;
dt->oloc.holding_file = FALSE;
} /* end if */
@@ -1449,7 +1454,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_set_share() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_can_share
*
@@ -1469,31 +1473,30 @@ done:
static htri_t
H5O_dtype_can_share(const void *_mesg)
{
- const H5T_t *mesg = (const H5T_t *)_mesg;
- htri_t tri_ret;
- htri_t ret_value = TRUE;
+ const H5T_t *mesg = (const H5T_t *)_mesg;
+ htri_t tri_ret;
+ htri_t ret_value = TRUE;
FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
/* Don't share immutable datatypes */
- if((tri_ret = H5T_is_immutable(mesg)) > 0)
+ if ((tri_ret = H5T_is_immutable(mesg)) > 0)
HGOTO_DONE(FALSE)
- else if(tri_ret < 0)
+ else if (tri_ret < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is immutable")
/* Don't share committed datatypes */
- if((tri_ret = H5T_committed(mesg)) > 0)
+ if ((tri_ret = H5T_committed(mesg)) > 0)
HGOTO_DONE(FALSE)
- else if(tri_ret < 0)
+ else if (tri_ret < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is shared")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_can_share() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_pre_copy_file
*
@@ -1510,13 +1513,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
- void *_udata)
+H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_UNUSED *deleted,
+ const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
{
- const H5T_t *dt_src = (const H5T_t *)mesg_src; /* Source datatype */
- H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5T_t * dt_src = (const H5T_t *)mesg_src; /* Source datatype */
+ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1531,13 +1533,13 @@ H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
* message is an early version, but since the layout information isn't
* available here, we just make a copy in all situations)
*/
- if(udata) {
+ if (udata) {
/* Create a memory copy of the variable-length datatype */
- if(NULL == (udata->src_dtype = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
+ if (NULL == (udata->src_dtype = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy")
/* Set the location of the source datatype to describe the disk form of the data */
- if(H5T_set_loc(udata->src_dtype, file_src, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(udata->src_dtype, file_src, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk")
} /* end if */
@@ -1545,7 +1547,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_pre_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_copy_file
*
@@ -1560,32 +1561,32 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg_type,
- void *native_src, H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
- H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata, hid_t H5_ATTR_UNUSED dxpl_id)
+H5O_dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
+ H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
- H5T_t *dst_mesg; /* Destination datatype */
- void *ret_value; /* Return value */
+ H5T_t *dst_mesg; /* Destination datatype */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Perform a normal copy of the object header message */
- if(NULL == (dst_mesg = (H5T_t *)H5O_dtype_copy(native_src, NULL)))
+ if (NULL == (dst_mesg = (H5T_t *)H5O_dtype_copy(native_src, NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy")
/* The datatype will be in the new file; set its location. */
- if(H5T_set_loc(dst_mesg, file_dst, H5T_LOC_DISK) < 0)
+ if (H5T_set_loc(dst_mesg, file_dst, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set location")
ret_value = dst_mesg;
done:
- if(NULL == ret_value)
+ if (NULL == ret_value)
H5O_msg_free(mesg_type->id, dst_mesg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dtype_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_dtype_shared_post_copy_upd
*
@@ -1600,15 +1601,15 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc,
- const void H5_ATTR_UNUSED *mesg_src, H5O_loc_t H5_ATTR_UNUSED *dst_oloc, void *mesg_dst,
- hid_t H5_ATTR_UNUSED dxpl_id, H5O_copy_t H5_ATTR_UNUSED *cpy_info)
+H5O_dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc, const void H5_ATTR_UNUSED *mesg_src,
+ H5O_loc_t H5_ATTR_UNUSED *dst_oloc, void *mesg_dst,
+ hid_t H5_ATTR_UNUSED dxpl_id, H5O_copy_t H5_ATTR_UNUSED *cpy_info)
{
- H5T_t *dt_dst = (H5T_t *)mesg_dst; /* Destination datatype */
+ H5T_t *dt_dst = (H5T_t *)mesg_dst; /* Destination datatype */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
+ if (dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
HDassert(H5T_committed(dt_dst));
dt_dst->oloc.file = dt_dst->sh_loc.file;
dt_dst->oloc.addr = dt_dst->sh_loc.u.loc.oh_addr;
@@ -1619,7 +1620,6 @@ H5O_dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_dtype_shared_post_copy_upd */
-
/*--------------------------------------------------------------------------
NAME
H5O_dtype_debug
@@ -1627,27 +1627,26 @@ H5O_dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc,
Prints debugging information for a message
USAGE
void *H5O_dtype_debug(f, mesg, stream, indent, fwidth)
- H5F_t *f; IN: pointer to the HDF5 file struct
- const void *mesg; IN: Pointer to the source simple datatype
- struct
- FILE *stream; IN: Pointer to the stream for output data
- int indent; IN: Amount to indent information by
- int fwidth; IN: Field width (?)
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ const void *mesg; IN: Pointer to the source simple datatype
+ struct
+ FILE *stream; IN: Pointer to the stream for output data
+ int indent; IN: Amount to indent information by
+ int fwidth; IN: Field width (?)
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function prints debugging output to the stream passed as a
+ This function prints debugging output to the stream passed as a
parameter.
--------------------------------------------------------------------------*/
static herr_t
-H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
- int indent, int fwidth)
+H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, int indent, int fwidth)
{
- const H5T_t *dt = (const H5T_t*)mesg;
- const char *s;
- char buf[256];
- unsigned i;
- size_t k;
+ const H5T_t *dt = (const H5T_t *)mesg;
+ const char * s;
+ char buf[256];
+ unsigned i;
+ size_t k;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1710,59 +1709,48 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Type class:",
- s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s);
- fprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth,
- "Size:",
- (unsigned long)(dt->shared->size), 1 == dt->shared->size ? "" : "s");
+ HDfprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size),
+ 1 == dt->shared->size ? "" : "s");
- fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Version:", dt->shared->version);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version);
if (H5T_COMPOUND == dt->shared->type) {
- fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:",
- dt->shared->u.compnd.nmembs);
- for(i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- sprintf(buf, "Member %u:", i);
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- buf,
- dt->shared->u.compnd.memb[i].name);
- fprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX(0, fwidth-3),
- "Byte offset:",
- (unsigned long)(dt->shared->u.compnd.memb[i].offset));
- H5O_dtype_debug(f, dxpl_id, dt->shared->u.compnd.memb[i].type, stream,
- indent + 3, MAX(0, fwidth - 3));
- }
- } else if(H5T_ENUM == dt->shared->type) {
- fprintf(stream, "%*s%s\n", indent, "", "Base type:");
- H5O_dtype_debug(f, dxpl_id, dt->shared->parent, stream, indent+3, MAX(0, fwidth-3));
- fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:",
- dt->shared->u.enumer.nmembs);
- for(i = 0; i < dt->shared->u.enumer.nmembs; i++) {
- sprintf(buf, "Member %u:", i);
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- buf,
- dt->shared->u.enumer.name[i]);
- fprintf(stream, "%*s%-*s 0x", indent, "", fwidth,
- "Raw bytes of value:");
- for(k = 0; k < dt->shared->parent->shared->size; k++)
- fprintf(stream, "%02x",
- dt->shared->u.enumer.value[i*dt->shared->parent->shared->size + k]);
- fprintf(stream, "\n");
- } /* end for */
-
- } else if(H5T_OPAQUE == dt->shared->type) {
- fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth,
- "Tag:", dt->shared->u.opaque.tag);
- } else if(H5T_REFERENCE == dt->shared->type) {
- fprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Fix dumping reference types!");
- } else if(H5T_STRING == dt->shared->type) {
- switch(dt->shared->u.atomic.u.s.cset) {
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.compnd.nmembs);
+ for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
+ sprintf(buf, "Member %u:", i);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
+ H5O_dtype_debug(f, dxpl_id, dt->shared->u.compnd.memb[i].type, stream, indent + 3,
+ MAX(0, fwidth - 3));
+ }
+ }
+ else if (H5T_ENUM == dt->shared->type) {
+ HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ H5O_dtype_debug(f, dxpl_id, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.enumer.nmembs);
+ for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
+ sprintf(buf, "Member %u:", i);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
+ HDfprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
+ for (k = 0; k < dt->shared->parent->shared->size; k++)
+ HDfprintf(stream, "%02x",
+ dt->shared->u.enumer.value[i * dt->shared->parent->shared->size + k]);
+ HDfprintf(stream, "\n");
+ } /* end for */
+ }
+ else if (H5T_OPAQUE == dt->shared->type) {
+ HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag);
+ }
+ else if (H5T_REFERENCE == dt->shared->type) {
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!");
+ }
+ else if (H5T_STRING == dt->shared->type) {
+ switch (dt->shared->u.atomic.u.s.cset) {
case H5T_CSET_ASCII:
s = "ASCII";
break;
@@ -1795,11 +1783,9 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Character Set:",
- s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
- switch(dt->shared->u.atomic.u.s.pad) {
+ switch (dt->shared->u.atomic.u.s.pad) {
case H5T_STR_NULLTERM:
s = "NULL Terminated";
break;
@@ -1835,11 +1821,10 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "String Padding:",
- s);
- } else if(H5T_VLEN == dt->shared->type) {
- switch(dt->shared->u.vlen.type) {
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
+ }
+ else if (H5T_VLEN == dt->shared->type) {
+ switch (dt->shared->u.vlen.type) {
case H5T_VLEN_SEQUENCE:
s = "sequence";
break;
@@ -1855,10 +1840,9 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Vlen type:", s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s);
- switch(dt->shared->u.vlen.loc) {
+ switch (dt->shared->u.vlen.loc) {
case H5T_LOC_MEMORY:
s = "memory";
break;
@@ -1874,12 +1858,11 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Location:", s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s);
/* Extra information for VL-strings */
- if(dt->shared->u.vlen.type == H5T_VLEN_STRING) {
- switch(dt->shared->u.vlen.cset) {
+ if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
+ switch (dt->shared->u.vlen.cset) {
case H5T_CSET_ASCII:
s = "ASCII";
break;
@@ -1912,11 +1895,9 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Character Set:",
- s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
- switch(dt->shared->u.vlen.pad) {
+ switch (dt->shared->u.vlen.pad) {
case H5T_STR_NULLTERM:
s = "NULL Terminated";
break;
@@ -1952,22 +1933,20 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
s = buf;
break;
} /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "String Padding:",
- s);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
} /* end if */
- } else if(H5T_ARRAY == dt->shared->type) {
- fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Rank:",
- dt->shared->u.array.ndims);
- fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
- for(i = 0; i < dt->shared->u.array.ndims; i++)
- fprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
- fprintf(stream, "}\n");
- fprintf(stream, "%*s%s\n", indent, "", "Base type:");
- H5O_dtype_debug(f, dxpl_id, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
- } else {
- switch (dt->shared->u.atomic.order) {
+ }
+ else if (H5T_ARRAY == dt->shared->type) {
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims);
+ HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
+ for (i = 0; i < dt->shared->u.array.ndims; i++)
+ HDfprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
+ HDfprintf(stream, "}\n");
+ HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ H5O_dtype_debug(f, dxpl_id, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
+ }
+ else {
+ switch (dt->shared->u.atomic.order) {
case H5T_ORDER_LE:
s = "little endian";
break;
@@ -1993,22 +1972,18 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
sprintf(buf, "H5T_ORDER_%d", dt->shared->u.atomic.order);
s = buf;
break;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Byte order:",
- s);
-
- fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Precision:",
- (unsigned long)(dt->shared->u.atomic.prec),
- 1==dt->shared->u.atomic.prec?"":"s");
-
- fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Offset:",
- (unsigned long)(dt->shared->u.atomic.offset),
- 1==dt->shared->u.atomic.offset?"":"s");
-
- switch (dt->shared->u.atomic.lsb_pad) {
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s);
+
+ HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Precision:", (unsigned long)(dt->shared->u.atomic.prec),
+ 1 == dt->shared->u.atomic.prec ? "" : "s");
+
+ HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Offset:", (unsigned long)(dt->shared->u.atomic.offset),
+ 1 == dt->shared->u.atomic.offset ? "" : "s");
+
+ switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
s = "zero";
break;
@@ -2026,11 +2001,10 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
default:
s = "pad?";
break;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Low pad type:", s);
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s);
- switch (dt->shared->u.atomic.msb_pad) {
+ switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
s = "zero";
break;
@@ -2048,12 +2022,11 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
default:
s = "pad?";
break;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "High pad type:", s);
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s);
- if (H5T_FLOAT == dt->shared->type) {
- switch (dt->shared->u.atomic.u.f.pad) {
+ if (H5T_FLOAT == dt->shared->type) {
+ switch (dt->shared->u.atomic.u.f.pad) {
case H5T_PAD_ZERO:
s = "zero";
break;
@@ -2075,11 +2048,10 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
sprintf(buf, "bit-%d", dt->shared->u.atomic.u.f.pad);
s = buf;
break;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Internal pad type:", s);
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s);
- switch (dt->shared->u.atomic.u.f.norm) {
+ switch (dt->shared->u.atomic.u.f.norm) {
case H5T_NORM_IMPLIED:
s = "implied";
break;
@@ -2094,38 +2066,31 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
case H5T_NORM_ERROR:
default:
- sprintf(buf, "H5T_NORM_%d", (int) (dt->shared->u.atomic.u.f.norm));
+ sprintf(buf, "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm));
s = buf;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Normalization:", s);
-
- fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Sign bit location:",
- (unsigned long) (dt->shared->u.atomic.u.f.sign));
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
- fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent location:",
- (unsigned long) (dt->shared->u.atomic.u.f.epos));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign));
- fprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
- "Exponent bias:",
- (unsigned long) (dt->shared->u.atomic.u.f.ebias));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos));
- fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent size:",
- (unsigned long) (dt->shared->u.atomic.u.f.esize));
+ HDfprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
+ "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias));
- fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa location:",
- (unsigned long) (dt->shared->u.atomic.u.f.mpos));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize));
- fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa size:",
- (unsigned long) (dt->shared->u.atomic.u.f.msize));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos));
- } else if (H5T_INTEGER == dt->shared->type) {
- switch (dt->shared->u.atomic.u.i.sign) {
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize));
+ }
+ else if (H5T_INTEGER == dt->shared->type) {
+ switch (dt->shared->u.atomic.u.i.sign) {
case H5T_SGN_NONE:
s = "none";
break;
@@ -2137,15 +2102,13 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
case H5T_SGN_ERROR:
case H5T_NSGN:
default:
- sprintf(buf, "H5T_SGN_%d", (int) (dt->shared->u.atomic.u.i.sign));
+ HDsprintf(buf, "H5T_SGN_%d", (int)(dt->shared->u.atomic.u.i.sign));
s = buf;
break;
- } /* end switch */
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Sign scheme:", s);
- }
+ } /* end switch */
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s);
+ }
}
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_dtype_debug() */
-
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 546eb4f..58396df 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -6,66 +6,62 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 25, 1997
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_efl_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_efl_copy(const void *_mesg, void *_dest);
+static void * H5O_efl_copy(const void *_mesg, void *_dest);
static size_t H5O_efl_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_efl_reset(void *_mesg);
-static void *H5O_efl_copy_file(H5F_t *file_src, void *mesg_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_efl_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static void * H5O_efl_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+static herr_t H5O_efl_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_EFL[1] = {{
- H5O_EFL_ID, /*message id number */
- "external file list", /*message name for debugging */
- sizeof(H5O_efl_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_efl_decode, /*decode message */
- H5O_efl_encode, /*encode message */
- H5O_efl_copy, /*copy native value */
- H5O_efl_size, /*size of message on disk */
- H5O_efl_reset, /*reset method */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_efl_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_efl_debug /*debug the message */
+ H5O_EFL_ID, /*message id number */
+ "external file list", /*message name for debugging */
+ sizeof(H5O_efl_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_efl_decode, /*decode message */
+ H5O_efl_encode, /*encode message */
+ H5O_efl_copy, /*copy native value */
+ H5O_efl_size, /*size of message on disk */
+ H5O_efl_reset, /*reset method */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_efl_copy_file, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_efl_debug /*debug the message */
}};
-#define H5O_EFL_VERSION 1
+#define H5O_EFL_VERSION 1
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_decode
*
@@ -87,16 +83,15 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{
*-------------------------------------------------------------------------
*/
static void *
-H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
+ unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_efl_t *mesg = NULL;
+ H5O_efl_t * mesg = NULL;
int version;
- const char *s = NULL;
- H5HL_t *heap;
- size_t u; /* Local index variable */
- void *ret_value = NULL; /* Return value */
+ const char *s = NULL;
+ H5HL_t * heap;
+ size_t u; /* Local index variable */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -104,12 +99,12 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
HDassert(f);
HDassert(p);
- if(NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
+ if (NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Version */
version = *p++;
- if(version != H5O_EFL_VERSION)
+ if (version != H5O_EFL_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for external file list message")
/* Reserved */
@@ -117,7 +112,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
/* Number of slots */
UINT16DECODE(p, mesg->nalloc);
- HDassert(mesg->nalloc>0);
+ HDassert(mesg->nalloc > 0);
UINT16DECODE(p, mesg->nused);
HDassert(mesg->nused <= mesg->nalloc);
@@ -127,44 +122,44 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
#ifndef NDEBUG
HDassert(H5F_addr_defined(mesg->heap_addr));
- if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read protect link value")
s = (const char *)H5HL_offset_into(heap, 0);
HDassert(s && !*s);
- if(H5HL_unprotect(heap) < 0)
+ if (H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
#endif
/* Decode the file list */
mesg->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t));
- if(NULL == mesg->slot)
+ if (NULL == mesg->slot)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ)))
+ if (NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read protect link value")
- for(u = 0; u < mesg->nused; u++) {
+ for (u = 0; u < mesg->nused; u++) {
/* Name */
- H5F_DECODE_LENGTH (f, p, mesg->slot[u].name_offset);
+ H5F_DECODE_LENGTH(f, p, mesg->slot[u].name_offset);
- if((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL)
+ if ((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "unable to get external file name")
- if(*s == (char)NULL)
+ if (*s == (char)'\0')
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "invalid external file name")
- mesg->slot[u].name = H5MM_xstrdup (s);
+ mesg->slot[u].name = H5MM_xstrdup(s);
HDassert(mesg->slot[u].name);
/* File offset */
- H5F_DECODE_LENGTH (f, p, mesg->slot[u].offset);
+ H5F_DECODE_LENGTH(f, p, mesg->slot[u].offset);
/* Size */
- H5F_DECODE_LENGTH (f, p, mesg->slot[u].size);
+ H5F_DECODE_LENGTH(f, p, mesg->slot[u].size);
} /* end for */
- if(H5HL_unprotect(heap) < 0)
+ if (H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
@@ -172,14 +167,13 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
ret_value = mesg;
done:
- if(ret_value == NULL)
- if(mesg != NULL)
+ if (ret_value == NULL)
+ if (mesg != NULL)
H5MM_xfree(mesg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_efl_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_encode
*
@@ -195,8 +189,8 @@ done:
static herr_t
H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
- size_t u; /* Local index variable */
+ const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
+ size_t u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -224,21 +218,20 @@ H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, cons
H5F_addr_encode(f, &p, mesg->heap_addr);
/* Encode file list */
- for(u = 0; u < mesg->nused; u++) {
- /*
- * The name should have been added to the heap when the dataset was
- * created.
- */
- HDassert(mesg->slot[u].name_offset);
- H5F_ENCODE_LENGTH(f, p, mesg->slot[u].name_offset);
- H5F_ENCODE_LENGTH(f, p, (hsize_t)mesg->slot[u].offset);
- H5F_ENCODE_LENGTH(f, p, mesg->slot[u].size);
+ for (u = 0; u < mesg->nused; u++) {
+ /*
+ * The name should have been added to the heap when the dataset was
+ * created.
+ */
+ HDassert(mesg->slot[u].name_offset);
+ H5F_ENCODE_LENGTH(f, p, mesg->slot[u].name_offset);
+ H5F_ENCODE_LENGTH(f, p, (hsize_t)mesg->slot[u].offset);
+ H5F_ENCODE_LENGTH(f, p, mesg->slot[u].size);
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_efl_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_copy
*
@@ -257,30 +250,30 @@ H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, cons
static void *
H5O_efl_copy(const void *_mesg, void *_dest)
{
- const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
- H5O_efl_t *dest = (H5O_efl_t *) _dest;
- size_t u; /* Local index variable */
- void *ret_value; /* Return value */
+ const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
+ H5O_efl_t * dest = (H5O_efl_t *)_dest;
+ size_t u; /* Local index variable */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
- if(!dest) {
- if(NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message")
- if(NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t))))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots")
+ if (!dest) {
+ if (NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message")
+ if (NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t))))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots")
} /* end if */
- else if(dest->nalloc < mesg->nalloc) {
- H5O_efl_entry_t *temp_slot; /* Temporary pointer to new slot information */
+ else if (dest->nalloc < mesg->nalloc) {
+ H5O_efl_entry_t *temp_slot; /* Temporary pointer to new slot information */
/* Allocate new 'slot' information */
- if(NULL == (temp_slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t))))
+ if (NULL == (temp_slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots")
/* Release old 'slot' information */
- for(u = 0; u < dest->nused; u++)
+ for (u = 0; u < dest->nused; u++)
dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name);
dest->slot = (H5O_efl_entry_t *)H5MM_xfree(dest->slot);
@@ -289,16 +282,16 @@ H5O_efl_copy(const void *_mesg, void *_dest)
} /* end if */
else {
/* Release old 'slot' information */
- for(u = 0; u < dest->nused; u++)
+ for (u = 0; u < dest->nused; u++)
dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name);
} /* end else */
dest->heap_addr = mesg->heap_addr;
- dest->nalloc = mesg->nalloc;
- dest->nused = mesg->nused;
+ dest->nalloc = mesg->nalloc;
+ dest->nused = mesg->nused;
- for(u = 0; u < mesg->nused; u++) {
- dest->slot[u] = mesg->slot[u];
- if(NULL == (dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name)))
+ for (u = 0; u < mesg->nused; u++) {
+ dest->slot[u] = mesg->slot[u];
+ if (NULL == (dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slot name")
} /* end for */
@@ -306,23 +299,22 @@ H5O_efl_copy(const void *_mesg, void *_dest)
ret_value = dest;
done:
- if(NULL == ret_value) {
- if(dest && NULL == _dest) {
- if(dest->slot) {
- for(u = 0; u < mesg->nused; u++) {
- if(dest->slot[u].name != NULL && dest->slot[u].name != mesg->slot[u].name)
+ if (NULL == ret_value) {
+ if (dest && NULL == _dest) {
+ if (dest->slot) {
+ for (u = 0; u < mesg->nused; u++) {
+ if (dest->slot[u].name != NULL && dest->slot[u].name != mesg->slot[u].name)
dest->slot[u].name = (char *)H5MM_xfree(dest->slot[u].name);
} /* end for */
dest->slot = (H5O_efl_entry_t *)H5MM_xfree(dest->slot);
} /* end if */
dest = (H5O_efl_t *)H5MM_xfree(dest);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_efl_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_size
*
@@ -343,8 +335,8 @@ done:
static size_t
H5O_efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
- size_t ret_value = 0;
+ const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
+ size_t ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -352,18 +344,17 @@ H5O_efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *
HDassert(f);
HDassert(mesg);
- ret_value = (size_t)H5F_SIZEOF_ADDR(f) + /*heap address */
- 2 + /*slots allocated*/
- 2 + /*num slots used*/
- 4 + /*reserved */
- mesg->nused * ((size_t)H5F_SIZEOF_SIZE(f) + /*name offset */
- (size_t)H5F_SIZEOF_SIZE(f) + /*file offset */
- (size_t)H5F_SIZEOF_SIZE(f)); /*file size */
+ ret_value = (size_t)H5F_SIZEOF_ADDR(f) + /*heap address */
+ 2 + /*slots allocated*/
+ 2 + /*num slots used*/
+ 4 + /*reserved */
+ mesg->nused * ((size_t)H5F_SIZEOF_SIZE(f) + /*name offset */
+ (size_t)H5F_SIZEOF_SIZE(f) + /*file offset */
+ (size_t)H5F_SIZEOF_SIZE(f)); /*file size */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_efl_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_reset
*
@@ -380,8 +371,8 @@ H5O_efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *
static herr_t
H5O_efl_reset(void *_mesg)
{
- H5O_efl_t *mesg = (H5O_efl_t *) _mesg;
- size_t u; /* Local index variable */
+ H5O_efl_t *mesg = (H5O_efl_t *)_mesg;
+ size_t u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -389,8 +380,8 @@ H5O_efl_reset(void *_mesg)
HDassert(mesg);
/* reset */
- if(mesg->slot) {
- for(u = 0; u < mesg->nused; u++)
+ if (mesg->slot) {
+ for (u = 0; u < mesg->nused; u++)
mesg->slot[u].name = (char *)H5MM_xfree(mesg->slot[u].name);
mesg->slot = (H5O_efl_entry_t *)H5MM_xfree(mesg->slot);
} /* end if */
@@ -400,7 +391,6 @@ H5O_efl_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_efl_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_total_size
*
@@ -417,29 +407,28 @@ H5O_efl_reset(void *_mesg)
*-------------------------------------------------------------------------
*/
hsize_t
-H5O_efl_total_size (H5O_efl_t *efl)
+H5O_efl_total_size(H5O_efl_t *efl)
{
- hsize_t ret_value = 0, tmp;
+ hsize_t ret_value = 0, tmp;
FUNC_ENTER_NOAPI_NOINIT
- if(efl->nused > 0 && H5O_EFL_UNLIMITED == efl->slot[efl->nused - 1].size)
- ret_value = H5O_EFL_UNLIMITED;
+ if (efl->nused > 0 && H5O_EFL_UNLIMITED == efl->slot[efl->nused - 1].size)
+ ret_value = H5O_EFL_UNLIMITED;
else {
- size_t u; /* Local index variable */
+ size_t u; /* Local index variable */
- for(u = 0; u < efl->nused; u++, ret_value = tmp) {
- tmp = ret_value + efl->slot[u].size;
- if(tmp <= ret_value)
- HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, 0, "total external storage size overflowed");
- } /* end for */
- } /* end else */
+ for (u = 0; u < efl->nused; u++, ret_value = tmp) {
+ tmp = ret_value + efl->slot[u].size;
+ if (tmp <= ret_value)
+ HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, 0, "total external storage size overflowed");
+ } /* end for */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_efl_total_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_copy_file
*
@@ -456,14 +445,14 @@ done:
*/
static void *
H5O_efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *_udata, hid_t dxpl_id)
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *_udata, hid_t dxpl_id)
{
- H5O_efl_t *efl_src = (H5O_efl_t *) mesg_src;
- H5O_efl_t *efl_dst = NULL;
- H5HL_t *heap = NULL; /* Pointer to local heap for EFL file names */
- size_t idx, size, name_offset, heap_size;
- void *ret_value; /* Return value */
+ H5O_efl_t *efl_src = (H5O_efl_t *)mesg_src;
+ H5O_efl_t *efl_dst = NULL;
+ H5HL_t * heap = NULL; /* Pointer to local heap for EFL file names */
+ size_t idx, size, name_offset, heap_size;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -472,34 +461,34 @@ H5O_efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_ds
HDassert(file_dst);
/* Allocate space for the destination efl */
- if(NULL == (efl_dst = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
+ if (NULL == (efl_dst = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the "top level" information */
HDmemcpy(efl_dst, efl_src, sizeof(H5O_efl_t));
/* Determine size needed for destination heap */
- heap_size = H5HL_ALIGN(1); /* "empty" name */
- for(idx = 0; idx < efl_src->nused; idx++)
+ heap_size = H5HL_ALIGN(1); /* "empty" name */
+ for (idx = 0; idx < efl_src->nused; idx++)
heap_size += H5HL_ALIGN(HDstrlen(efl_src->slot[idx].name) + 1);
/* Create name heap */
- if(H5HL_create(file_dst, dxpl_id, heap_size, &efl_dst->heap_addr/*out*/) < 0)
+ if (H5HL_create(file_dst, dxpl_id, heap_size, &efl_dst->heap_addr /*out*/) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, NULL, "can't create heap")
/* Pin the heap down in memory */
- if(NULL == (heap = H5HL_protect(file_dst, dxpl_id, efl_dst->heap_addr, H5AC_WRITE)))
+ if (NULL == (heap = H5HL_protect(file_dst, dxpl_id, efl_dst->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to protect EFL file name heap")
/* Insert "empty" name first */
- if((size_t)(-1) == (name_offset = H5HL_insert(file_dst, dxpl_id, heap, (size_t)1, "")))
+ if ((size_t)(-1) == (name_offset = H5HL_insert(file_dst, dxpl_id, heap, (size_t)1, "")))
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
HDassert(0 == name_offset);
/* allocate array of external file entries */
- if(efl_src->nalloc > 0) {
+ if (efl_src->nalloc > 0) {
size = efl_src->nalloc * sizeof(H5O_efl_entry_t);
- if((efl_dst->slot = (H5O_efl_entry_t *)H5MM_calloc(size)) == NULL)
+ if ((efl_dst->slot = (H5O_efl_entry_t *)H5MM_calloc(size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy content from the source. Need to update later */
@@ -507,10 +496,11 @@ H5O_efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_ds
} /* end if */
/* copy the name from the source */
- for(idx = 0; idx < efl_src->nused; idx++) {
+ for (idx = 0; idx < efl_src->nused; idx++) {
efl_dst->slot[idx].name = H5MM_xstrdup(efl_src->slot[idx].name);
- if((size_t)(-1) == (efl_dst->slot[idx].name_offset = H5HL_insert(file_dst, dxpl_id, heap,
- HDstrlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name)))
+ if ((size_t)(-1) == (efl_dst->slot[idx].name_offset =
+ H5HL_insert(file_dst, dxpl_id, heap, HDstrlen(efl_dst->slot[idx].name) + 1,
+ efl_dst->slot[idx].name)))
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
} /* end for */
@@ -519,16 +509,15 @@ H5O_efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_ds
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if (heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to unprotect EFL file name heap")
- if(!ret_value)
- if(efl_dst)
+ if (!ret_value)
+ if (efl_dst)
H5MM_xfree(efl_dst);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_efl_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_debug
*
@@ -542,11 +531,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_efl_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_efl_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
- size_t u;
+ const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
+ size_t u;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -557,36 +546,29 @@ H5O_efl_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Heap address:", mesg->heap_addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Heap address:", mesg->heap_addr);
- HDfprintf(stream, "%*s%-*s %u/%u\n", indent, "", fwidth,
- "Slots used/allocated:",
- mesg->nused, mesg->nalloc);
+ HDfprintf(stream, "%*s%-*s %u/%u\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused,
+ mesg->nalloc);
- for(u = 0; u < mesg->nused; u++) {
- char buf[64];
+ for (u = 0; u < mesg->nused; u++) {
+ char buf[64];
- HDsnprintf(buf, sizeof(buf), "File %u", (unsigned)u);
- HDfprintf(stream, "%*s%s:\n", indent, "", buf);
+ HDsnprintf(buf, sizeof(buf), "File %u", (unsigned)u);
+ HDfprintf(stream, "%*s%s:\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent+3, "", MAX (fwidth-3, 0),
- "Name:",
- mesg->slot[u].name);
+ HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Name:", mesg->slot[u].name);
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
- "Name offset:",
- (unsigned long)(mesg->slot[u].name_offset));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Name offset:", (unsigned long)(mesg->slot[u].name_offset));
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
- "Offset of data in file:",
- (unsigned long)(mesg->slot[u].offset));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Offset of data in file:", (unsigned long)(mesg->slot[u].offset));
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
- "Bytes reserved for data:",
- (unsigned long)(mesg->slot[u].size));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Bytes reserved for data:", (unsigned long)(mesg->slot[u].size));
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_efl_debug() */
-
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 70704c5..c0938b7 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -6,158 +6,159 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, September 30, 1998
*
- * Purpose: The fill message indicates a bit pattern to use for
- * uninitialized data points of a dataset.
+ * Purpose: The fill message indicates a bit pattern to use for
+ * uninitialized data points of a dataset.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Sprivate.h" /* Dataspaces */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Sprivate.h" /* Dataspaces */
-
-static void *H5O_fill_old_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_fill_old_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_fill_old_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static size_t H5O_fill_old_size(const H5F_t *f, const void *_mesg);
-static void *H5O_fill_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_fill_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_fill_new_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static size_t H5O_fill_new_size(const H5F_t *f, const void *_mesg);
-static void *H5O_fill_copy(const void *_mesg, void *_dest);
+static void * H5O_fill_copy(const void *_mesg, void *_dest);
static herr_t H5O_fill_reset(void *_mesg);
static herr_t H5O_fill_free(void *_mesg);
-static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_FILL
-#define H5O_SHARED_DECODE H5O_fill_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
-#define H5O_SHARED_ENCODE H5O_fill_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
-#define H5O_SHARED_SIZE H5O_fill_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
-#define H5O_SHARED_DELETE H5O_fill_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_FILL
+#define H5O_SHARED_DECODE H5O_fill_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
+#define H5O_SHARED_ENCODE H5O_fill_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
+#define H5O_SHARED_SIZE H5O_fill_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
+#define H5O_SHARED_DELETE H5O_fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O_fill_shared_link
+#define H5O_SHARED_LINK H5O_fill_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O_fill_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O_fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
-#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_fill_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#undef H5O_SHARED_POST_COPY_FILE_UPD
+#define H5O_SHARED_DEBUG H5O_fill_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */
#undef H5O_SHARED_TYPE
-#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
+#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#undef H5O_SHARED_DECODE
-#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
+#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
#undef H5O_SHARED_DECODE_REAL
-#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
#undef H5O_SHARED_ENCODE
-#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
+#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
#undef H5O_SHARED_ENCODE_REAL
-#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
#undef H5O_SHARED_SIZE
-#define H5O_SHARED_SIZE H5O_fill_new_shared_size
+#define H5O_SHARED_SIZE H5O_fill_new_shared_size
#undef H5O_SHARED_SIZE_REAL
-#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#undef H5O_SHARED_DELETE
-#define H5O_SHARED_DELETE H5O_fill_new_shared_delete
+#define H5O_SHARED_DELETE H5O_fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
-#define H5O_SHARED_LINK H5O_fill_new_shared_link
+#define H5O_SHARED_LINK H5O_fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
-#define H5O_SHARED_COPY_FILE H5O_fill_new_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O_fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
-#undef H5O_SHARED_POST_COPY_FILE_UPD
+#undef H5O_SHARED_POST_COPY_FILE_UPD
#undef H5O_SHARED_DEBUG
-#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
+#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
-#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O_fill_debug
#undef H5Oshared_H
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class, for old fill value before version 1.5 */
const H5O_msg_class_t H5O_MSG_FILL[1] = {{
- H5O_FILL_ID, /*message id number */
- "fill", /*message name for debugging */
- sizeof(H5O_fill_t), /*native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_fill_shared_decode, /*decode message */
- H5O_fill_shared_encode, /*encode message */
- H5O_fill_copy, /*copy the native value */
- H5O_fill_shared_size, /*raw message size */
- H5O_fill_reset, /*free internal memory */
- H5O_fill_free, /* free method */
- H5O_fill_shared_delete, /* file delete method */
- H5O_fill_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_fill_shared_copy_file, /* copy native value to file */
- H5O_fill_shared_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_fill_shared_debug /*debug the message */
+ H5O_FILL_ID, /*message id number */
+ "fill", /*message name for debugging */
+ sizeof(H5O_fill_t), /*native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O_fill_shared_decode, /*decode message */
+ H5O_fill_shared_encode, /*encode message */
+ H5O_fill_copy, /*copy the native value */
+ H5O_fill_shared_size, /*raw message size */
+ H5O_fill_reset, /*free internal memory */
+ H5O_fill_free, /* free method */
+ H5O_fill_shared_delete, /* file delete method */
+ H5O_fill_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_fill_shared_copy_file, /* copy native value to file */
+ H5O_fill_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_fill_shared_debug /*debug the message */
}};
/* This message derives from H5O message class, for new fill value after version 1.4 */
const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
- H5O_FILL_NEW_ID, /*message id number */
- "fill_new", /*message name for debugging */
- sizeof(H5O_fill_t), /*native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_fill_new_shared_decode, /*decode message */
- H5O_fill_new_shared_encode, /*encode message */
- H5O_fill_copy, /*copy the native value */
- H5O_fill_new_shared_size, /*raw message size */
- H5O_fill_reset, /*free internal memory */
- H5O_fill_free, /* free method */
- H5O_fill_new_shared_delete, /* file delete method */
- H5O_fill_new_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_fill_new_shared_copy_file, /* copy native value to file */
- H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_fill_new_shared_debug /*debug the message */
+ H5O_FILL_NEW_ID, /*message id number */
+ "fill_new", /*message name for debugging */
+ sizeof(H5O_fill_t), /*native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O_fill_new_shared_decode, /*decode message */
+ H5O_fill_new_shared_encode, /*encode message */
+ H5O_fill_copy, /*copy the native value */
+ H5O_fill_new_shared_size, /*raw message size */
+ H5O_fill_reset, /*free internal memory */
+ H5O_fill_free, /* free method */
+ H5O_fill_new_shared_delete, /* file delete method */
+ H5O_fill_new_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_fill_new_shared_copy_file, /* copy native value to file */
+ H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_fill_new_shared_debug /*debug the message */
}};
/* Masks, shift values & flags for fill value message */
-#define H5O_FILL_MASK_ALLOC_TIME 0x03
-#define H5O_FILL_SHIFT_ALLOC_TIME 0
-#define H5O_FILL_MASK_FILL_TIME 0x03
-#define H5O_FILL_SHIFT_FILL_TIME 2
-#define H5O_FILL_FLAG_UNDEFINED_VALUE 0x10
-#define H5O_FILL_FLAG_HAVE_VALUE 0x20
-#define H5O_FILL_FLAGS_ALL (H5O_FILL_MASK_ALLOC_TIME | (H5O_FILL_MASK_FILL_TIME << H5O_FILL_SHIFT_FILL_TIME) | H5O_FILL_FLAG_UNDEFINED_VALUE | H5O_FILL_FLAG_HAVE_VALUE)
+#define H5O_FILL_MASK_ALLOC_TIME 0x03
+#define H5O_FILL_SHIFT_ALLOC_TIME 0
+#define H5O_FILL_MASK_FILL_TIME 0x03
+#define H5O_FILL_SHIFT_FILL_TIME 2
+#define H5O_FILL_FLAG_UNDEFINED_VALUE 0x10
+#define H5O_FILL_FLAG_HAVE_VALUE 0x20
+#define H5O_FILL_FLAGS_ALL \
+ (H5O_FILL_MASK_ALLOC_TIME | (H5O_FILL_MASK_FILL_TIME << H5O_FILL_SHIFT_FILL_TIME) | \
+ H5O_FILL_FLAG_UNDEFINED_VALUE | H5O_FILL_FLAG_HAVE_VALUE)
/* Declare a free list to manage the H5O_fill_t struct */
H5FL_DEFINE(H5O_fill_t);
@@ -165,16 +166,15 @@ H5FL_DEFINE(H5O_fill_t);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_decode
+ * Function: H5O_fill_new_decode
*
- * Purpose: Decode a new fill value message. The new fill value
- * message is fill value plus space allocation time and
- * fill value writing time and whether fill value is defined.
+ * Purpose: Decode a new fill value message. The new fill value
+ * message is fill value plus space allocation time and
+ * fill value writing time and whether fill value is defined.
*
- * Return: Success: Ptr to new message in native struct.
- * Failure: NULL
+ * Return: Success: Ptr to new message in native struct.
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -183,27 +183,28 @@ H5FL_BLK_EXTERN(type_conv);
*/
static void *
H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL;
- void *ret_value;
+ H5O_fill_t *fill = NULL;
+ const uint8_t * p_end = p + p_size - 1; /* End of the p buffer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(p);
- if(NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
+ if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
/* Version */
fill->version = *p++;
- if(fill->version < H5O_FILL_VERSION_1 || fill->version > H5O_FILL_VERSION_LATEST)
+ if (fill->version < H5O_FILL_VERSION_1 || fill->version > H5O_FILL_VERSION_LATEST)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for fill value message")
/* Decode each version */
- if(fill->version < H5O_FILL_VERSION_3) {
+ if (fill->version < H5O_FILL_VERSION_3) {
/* Space allocation time */
fill->alloc_time = (H5D_alloc_time_t)*p++;
@@ -214,49 +215,55 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
fill->fill_defined = *p++;
/* Only decode fill value information if one is defined */
- if(fill->fill_defined) {
+ if (fill->fill_defined) {
INT32DECODE(p, fill->size);
- if(fill->size > 0) {
+ if (fill->size > 0) {
H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t);
- if(NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
+
+ /* Ensure that fill size doesn't exceed buffer size, due to possible data corruption */
+ if (p + fill->size - 1 > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "fill size exceeds buffer size")
+
+ if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value")
HDmemcpy(fill->buf, p, (size_t)fill->size);
} /* end if */
- } /* end if */
+ } /* end if */
else
fill->size = (-1);
} /* end if */
else {
- unsigned flags; /* Status flags */
+ unsigned flags; /* Status flags */
/* Flags */
flags = *p++;
/* Check for unknown flags */
- if(flags & (unsigned)~H5O_FILL_FLAGS_ALL)
+ if (flags & (unsigned)~H5O_FILL_FLAGS_ALL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown flag for fill value message")
/* Space allocation time */
- fill->alloc_time = (H5D_alloc_time_t)((flags >> H5O_FILL_SHIFT_ALLOC_TIME) & H5O_FILL_MASK_ALLOC_TIME);
+ fill->alloc_time =
+ (H5D_alloc_time_t)((flags >> H5O_FILL_SHIFT_ALLOC_TIME) & H5O_FILL_MASK_ALLOC_TIME);
/* Fill value write time */
fill->fill_time = (H5D_fill_time_t)((flags >> H5O_FILL_SHIFT_FILL_TIME) & H5O_FILL_MASK_FILL_TIME);
/* Check for undefined fill value */
- if(flags & H5O_FILL_FLAG_UNDEFINED_VALUE) {
+ if (flags & H5O_FILL_FLAG_UNDEFINED_VALUE) {
/* Sanity check */
HDassert(!(flags & H5O_FILL_FLAG_HAVE_VALUE));
/* Set value for "undefined" fill value */
fill->size = (-1);
} /* end if */
- else if(flags & H5O_FILL_FLAG_HAVE_VALUE) {
+ else if (flags & H5O_FILL_FLAG_HAVE_VALUE) {
/* Fill value size */
UINT32DECODE(p, fill->size);
/* Fill value */
H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t);
- if(NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
+ if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value")
HDmemcpy(fill->buf, p, (size_t)fill->size);
@@ -267,22 +274,21 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
/* Set the "defined" flag */
fill->fill_defined = TRUE;
} /* end else */
- } /* end else */
+ } /* end else */
/* Set return value */
ret_value = (void *)fill;
done:
- if(!ret_value && fill) {
- if(fill->buf)
+ if (!ret_value && fill) {
+ if (fill->buf)
H5MM_xfree(fill->buf);
- fill = H5FL_FREE(H5O_fill_t, fill);
+ fill = H5FL_FREE(H5O_fill_t, fill);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_decode
*
@@ -298,31 +304,36 @@ done:
*/
static void *
H5O_fill_old_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL; /* Decoded fill value message */
- void *ret_value; /* Return value */
+ H5O_fill_t *fill = NULL; /* Decoded fill value message */
+ const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(p);
- if(NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
+ if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
/* Set non-zero default fields */
- fill->version = H5O_FILL_VERSION_2;
+ fill->version = H5O_FILL_VERSION_2;
fill->alloc_time = H5D_ALLOC_TIME_LATE;
- fill->fill_time = H5D_FILL_TIME_IFSET;
+ fill->fill_time = H5D_FILL_TIME_IFSET;
/* Fill value size */
UINT32DECODE(p, fill->size);
/* Only decode the fill value itself if there is one */
- if(fill->size > 0) {
- if(NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
+ if (fill->size > 0) {
+ /* Ensure that fill size doesn't exceed buffer size, due to possible data corruption */
+ if (p + fill->size - 1 > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "fill size exceeds buffer size")
+
+ if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value")
HDmemcpy(fill->buf, p, (size_t)fill->size);
fill->fill_defined = TRUE;
@@ -331,27 +342,26 @@ H5O_fill_old_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
fill->size = (-1);
/* Set return value */
- ret_value = (void*)fill;
+ ret_value = (void *)fill;
done:
- if(!ret_value && fill) {
- if(fill->buf)
+ if (!ret_value && fill) {
+ if (fill->buf)
H5MM_xfree(fill->buf);
- fill = H5FL_FREE(H5O_fill_t, fill);
+ fill = H5FL_FREE(H5O_fill_t, fill);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_old_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_encode
+ * Function: H5O_fill_new_encode
*
- * Purpose: Encode a new fill value message. The new fill value
- * message is fill value plus space allocation time and
- * fill value writing time and whether fill value is defined.
+ * Purpose: Encode a new fill value message. The new fill value
+ * message is fill value plus space allocation time and
+ * fill value writing time and whether fill value is defined.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -361,7 +371,7 @@ done:
static herr_t
H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
- const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
+ const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -372,39 +382,40 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
/* Version */
*p++ = (uint8_t)fill->version;
- if(fill->version < H5O_FILL_VERSION_3) {
+ if (fill->version < H5O_FILL_VERSION_3) {
/* Space allocation time */
- *p++ = fill->alloc_time;
+ *p++ = (uint8_t)fill->alloc_time;
/* Fill value writing time */
- *p++ = fill->fill_time;
+ *p++ = (uint8_t)fill->fill_time;
/* Whether fill value is defined */
*p++ = (uint8_t)fill->fill_defined;
/* Only write out the size and fill value if it is defined */
- if(fill->fill_defined) {
+ if (fill->fill_defined) {
UINT32ENCODE(p, fill->size);
- if(fill->size > 0)
- if(fill->buf) {
+ if (fill->size > 0)
+ if (fill->buf) {
H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t);
HDmemcpy(p, fill->buf, (size_t)fill->size);
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
else {
- uint8_t flags = 0; /* Fill value setting flags */
+ uint8_t flags = 0; /* Fill value setting flags */
/* Encode space allocation time */
HDassert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time));
- flags = (uint8_t)(flags | ((H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time) << H5O_FILL_SHIFT_ALLOC_TIME));
+ flags =
+ (uint8_t)(flags | ((H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time) << H5O_FILL_SHIFT_ALLOC_TIME));
/* Encode fill value writing time */
HDassert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time));
flags = (uint8_t)(flags | ((H5O_FILL_MASK_FILL_TIME & fill->fill_time) << H5O_FILL_SHIFT_FILL_TIME));
/* Check if we need to encode a fill value size */
- if(fill->size < 0) {
+ if (fill->size < 0) {
/* Indicate that the fill value has been "undefined" by the user */
flags |= H5O_FILL_FLAG_UNDEFINED_VALUE;
@@ -414,7 +425,7 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
/* Sanity check */
HDassert(!fill->buf);
} /* end if */
- else if(fill->size > 0) {
+ else if (fill->size > 0) {
/* Indicate that a fill value size is present */
flags |= H5O_FILL_FLAG_HAVE_VALUE;
@@ -436,12 +447,11 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
/* Sanity check */
HDassert(!fill->buf);
} /* end else */
- } /* end else */
+ } /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_new_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_encode
*
@@ -466,23 +476,22 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
HDassert(fill && NULL == fill->type);
UINT32ENCODE(p, fill->size);
- if(fill->buf)
+ if (fill->buf)
HDmemcpy(p, fill->buf, (size_t)fill->size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_old_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_copy
+ * Function: H5O_fill_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary. The new fill value message is fill value plus
- * space allocation time and fill value writing time and
- * whether fill value is defined.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary. The new fill value message is fill value plus
+ * space allocation time and fill value writing time and
+ * whether fill value is defined.
*
- * Return: Success: Ptr to _DEST
- * Failure: NULL
+ * Return: Success: Ptr to _DEST
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -492,72 +501,74 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
static void *
H5O_fill_copy(const void *_src, void *_dst)
{
- const H5O_fill_t *src = (const H5O_fill_t *)_src;
- H5O_fill_t *dst = (H5O_fill_t *)_dst;
- void *ret_value;
+ const H5O_fill_t *src = (const H5O_fill_t *)_src;
+ H5O_fill_t * dst = (H5O_fill_t *)_dst;
+ void * ret_value;
FUNC_ENTER_NOAPI_NOINIT
HDassert(src);
- if(!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message")
+ if (!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message")
/* Shallow copy basic fields */
*dst = *src;
/* Copy data type of fill value */
- if(src->type) {
- if(NULL == (dst->type = H5T_copy(src->type, H5T_COPY_TRANSIENT)))
+ if (src->type) {
+ if (NULL == (dst->type = H5T_copy(src->type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "can't copy datatype")
} /* end if */
else
dst->type = NULL;
/* Copy fill value and its size */
- if(src->buf) {
+ if (src->buf) {
H5_CHECK_OVERFLOW(src->size, ssize_t, size_t);
- if(NULL == (dst->buf = H5MM_malloc((size_t)src->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value")
- HDmemcpy(dst->buf, src->buf, (size_t)src->size);
+ if (NULL == (dst->buf = H5MM_malloc((size_t)src->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value")
+ HDmemcpy(dst->buf, src->buf, (size_t)src->size);
/* Check for needing to convert/copy fill value */
- if(src->type) {
- H5T_path_t *tpath; /* Conversion information */
+ if (src->type) {
+ H5T_path_t *tpath; /* Conversion information */
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(src->type, dst->type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to convert between src and dst data types")
+ if (NULL == (tpath = H5T_path_find(src->type, dst->type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL,
+ "unable to convert between src and dst data types")
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
- if(!H5T_path_noop(tpath)) {
- hid_t dst_id, src_id; /* Source & destination datatypes for type conversion */
- uint8_t *bkg_buf = NULL; /* Background conversion buffer */
- size_t bkg_size; /* Size of background buffer */
+ if (!H5T_path_noop(tpath)) {
+ hid_t dst_id, src_id; /* Source & destination datatypes for type conversion */
+ uint8_t *bkg_buf = NULL; /* Background conversion buffer */
+ size_t bkg_size; /* Size of background buffer */
/* Wrap copies of types to convert */
dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->type, H5T_COPY_TRANSIENT), FALSE);
- if(dst_id < 0)
+ if (dst_id < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype")
src_id = H5I_register(H5I_DATATYPE, H5T_copy(src->type, H5T_COPY_ALL), FALSE);
- if(src_id < 0) {
+ if (src_id < 0) {
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype")
} /* end if */
/* Allocate a background buffer */
bkg_size = MAX(H5T_get_size(dst->type), H5T_get_size(src->type));
- if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) {
+ if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
} /* end if */
/* Convert fill value */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
+ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf,
+ H5AC_ind_dxpl_id) < 0) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, NULL, "datatype conversion failed")
} /* end if */
@@ -565,11 +576,11 @@ H5O_fill_copy(const void *_src, void *_dst)
/* Release the background buffer */
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
- if(bkg_buf)
+ if (bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
else
dst->buf = NULL;
@@ -577,30 +588,29 @@ H5O_fill_copy(const void *_src, void *_dst)
ret_value = dst;
done:
- if(!ret_value && dst) {
- if(dst->buf)
+ if (!ret_value && dst) {
+ if (dst->buf)
H5MM_xfree(dst->buf);
- if(dst->type)
+ if (dst->type)
H5T_close(dst->type);
- if(!_dst)
+ if (!_dst)
dst = H5FL_FREE(H5O_fill_t, dst);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_size
+ * Function: H5O_fill_new_size
*
- * Purpose: Returns the size of the raw message in bytes not counting the
- * message type or size fields, but only the data fields. This
- * function doesn't take into account alignment. The new fill
- * value message is fill value plus space allocation time and
- * fill value writing time and whether fill value is defined.
+ * Purpose: Returns the size of the raw message in bytes not counting the
+ * message type or size fields, but only the data fields. This
+ * function doesn't take into account alignment. The new fill
+ * value message is fill value plus space allocation time and
+ * fill value writing time and whether fill value is defined.
*
- * Return: Success: Message data size in bytes w/o alignment.
- * Failure: 0
+ * Return: Success: Message data size in bytes w/o alignment.
+ * Failure: 0
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -610,8 +620,8 @@ done:
static size_t
H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
{
- const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- size_t ret_value;
+ const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
+ size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -619,27 +629,26 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
HDassert(fill);
/* Determine size for different versions */
- if(fill->version < H5O_FILL_VERSION_3) {
- ret_value = 1 + /* Version number */
- 1 + /* Space allocation time */
- 1 + /* Fill value write time */
- 1; /* Fill value defined */
- if(fill->fill_defined)
- ret_value += 4 + /* Fill value size */
- (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
- } /* end if */
+ if (fill->version < H5O_FILL_VERSION_3) {
+ ret_value = 1 + /* Version number */
+ 1 + /* Space allocation time */
+ 1 + /* Fill value write time */
+ 1; /* Fill value defined */
+ if (fill->fill_defined)
+ ret_value += 4 + /* Fill value size */
+ (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
+ } /* end if */
else {
- ret_value = 1 + /* Version number */
- 1; /* Status flags */
- if(fill->size > 0)
- ret_value += 4 + /* Fill value size */
- (size_t)fill->size; /* Size of fill value */
- } /* end else */
+ ret_value = 1 + /* Version number */
+ 1; /* Status flags */
+ if (fill->size > 0)
+ ret_value += 4 + /* Fill value size */
+ (size_t)fill->size; /* Size of fill value */
+ } /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_size
*
@@ -667,15 +676,14 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O_fill_old_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_reset_dyn
+ * Function: H5O_fill_reset_dyn
*
- * Purpose: Resets dynamic fill value fields
+ * Purpose: Resets dynamic fill value fields
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, January 22, 2007
*
*-------------------------------------------------------------------------
@@ -683,32 +691,32 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
herr_t
H5O_fill_reset_dyn(H5O_fill_t *fill)
{
- hid_t fill_type_id = -1; /* Datatype ID for fill value datatype when reclaiming VL fill values */
- herr_t ret_value = SUCCEED; /* Return value */
+ hid_t fill_type_id = -1; /* Datatype ID for fill value datatype when reclaiming VL fill values */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
HDassert(fill);
- if(fill->buf) {
- if(fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) {
- H5T_t *fill_type; /* Copy of fill value datatype */
- H5S_t *fill_space; /* Scalar dataspace for fill value element */
+ if (fill->buf) {
+ if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) {
+ H5T_t *fill_type; /* Copy of fill value datatype */
+ H5S_t *fill_space; /* Scalar dataspace for fill value element */
/* Copy the fill value datatype and get an ID for it */
- if(NULL == (fill_type = H5T_copy(fill->type, H5T_COPY_TRANSIENT)))
+ if (NULL == (fill_type = H5T_copy(fill->type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy fill value datatype")
- if((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, FALSE)) < 0) {
+ if ((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, FALSE)) < 0) {
H5T_close(fill_type);
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register fill value datatype")
} /* end if */
/* Create a scalar dataspace for the fill value element */
- if(NULL == (fill_space = H5S_create(H5S_SCALAR)))
+ if (NULL == (fill_space = H5S_create(H5S_SCALAR)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create scalar dataspace")
/* Reclaim any variable length components of the fill value */
- if(H5D_vlen_reclaim(fill_type_id, fill_space, H5P_DATASET_XFER_DEFAULT, fill->buf) < 0) {
+ if (H5D_vlen_reclaim(fill_type_id, fill_space, H5P_DATASET_XFER_DEFAULT, fill->buf) < 0) {
H5S_close(fill_space);
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim variable-length fill value data")
} /* end if */
@@ -721,27 +729,26 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
fill->buf = H5MM_xfree(fill->buf);
} /* end if */
fill->size = 0;
- if(fill->type) {
- H5T_close(fill->type);
- fill->type = NULL;
+ if (fill->type) {
+ H5T_close(fill->type);
+ fill->type = NULL;
} /* end if */
done:
- if(fill_type_id > 0 && H5I_dec_ref(fill_type_id) < 0)
+ if (fill_type_id > 0 && H5I_dec_ref(fill_type_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for temp ID")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_reset_dyn() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_reset
+ * Function: H5O_fill_reset
*
- * Purpose: Resets a message to an initial state.
+ * Purpose: Resets a message to an initial state.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -749,7 +756,7 @@ done:
static herr_t
H5O_fill_reset(void *_fill)
{
- H5O_fill_t *fill = (H5O_fill_t *)_fill;
+ H5O_fill_t *fill = (H5O_fill_t *)_fill;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -766,15 +773,14 @@ H5O_fill_reset(void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_reset() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_free
+ * Function: H5O_fill_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, December 5, 2002
*
*-------------------------------------------------------------------------
@@ -791,25 +797,24 @@ H5O_fill_free(void *fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_debug
+ * Function: H5O_fill_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_fill, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- H5D_fill_value_t fill_status; /* Whether the fill value is defined */
+ H5D_fill_value_t fill_status; /* Whether the fill value is defined */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -820,91 +825,89 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(fwidth >= 0);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
- switch(fill->alloc_time) {
+ switch (fill->alloc_time) {
case H5D_ALLOC_TIME_EARLY:
- fprintf(stream,"Early\n");
+ HDfprintf(stream, "Early\n");
break;
case H5D_ALLOC_TIME_LATE:
- fprintf(stream,"Late\n");
+ HDfprintf(stream, "Late\n");
break;
case H5D_ALLOC_TIME_INCR:
- fprintf(stream,"Incremental\n");
+ HDfprintf(stream, "Incremental\n");
break;
case H5D_ALLOC_TIME_DEFAULT:
case H5D_ALLOC_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream, "Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
- switch(fill->fill_time) {
+ switch (fill->fill_time) {
case H5D_FILL_TIME_ALLOC:
- fprintf(stream,"On Allocation\n");
+ HDfprintf(stream, "On Allocation\n");
break;
case H5D_FILL_TIME_NEVER:
- fprintf(stream,"Never\n");
+ HDfprintf(stream, "Never\n");
break;
case H5D_FILL_TIME_IFSET:
- fprintf(stream,"If Set\n");
+ HDfprintf(stream, "If Set\n");
break;
case H5D_FILL_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream, "Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:");
H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status);
- switch(fill_status) {
+ switch (fill_status) {
case H5D_FILL_VALUE_UNDEFINED:
- fprintf(stream,"Undefined\n");
+ HDfprintf(stream, "Undefined\n");
break;
case H5D_FILL_VALUE_DEFAULT:
- fprintf(stream,"Default\n");
+ HDfprintf(stream, "Default\n");
break;
case H5D_FILL_VALUE_USER_DEFINED:
- fprintf(stream,"User Defined\n");
+ HDfprintf(stream, "User Defined\n");
break;
case H5D_FILL_VALUE_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth,
- "Size:", fill->size);
+ HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth, "Size:", fill->size);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
- if(fill->type) {
- H5T_debug(fill->type, stream);
- fprintf(stream, "\n");
+ if (fill->type) {
+ H5T_debug(fill->type, stream);
+ HDfprintf(stream, "\n");
} /* end if */
else
- fprintf(stream, "<dataset type>\n");
+ HDfprintf(stream, "<dataset type>\n");
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5O_fill_debug() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_fill_convert
+ * Function: H5O_fill_convert
*
- * Purpose: Convert a fill value from whatever data type it currently has
- * to the specified dataset type. The `type' field of the fill
- * value struct will be set to NULL to indicate that it has the
- * same type as the dataset.
+ * Purpose: Convert a fill value from whatever data type it currently has
+ * to the specified dataset type. The `type' field of the fill
+ * value struct will be set to NULL to indicate that it has the
+ * same type as the dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -912,10 +915,10 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
herr_t
H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_t dxpl_id)
{
- H5T_path_t *tpath; /* Type conversion info */
- void *buf = NULL, *bkg = NULL; /* Conversion buffers */
- hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5T_path_t *tpath; /* Type conversion info */
+ void * buf = NULL, *bkg = NULL; /* Conversion buffers */
+ hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -924,53 +927,53 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
HDassert(fill_changed);
/* No-op cases */
- if(!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
+ if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
/* Don't need datatype for fill value */
- if(fill->type)
+ if (fill->type)
H5T_close(fill->type);
- fill->type = NULL;
+ fill->type = NULL;
/* Note that the fill value info has changed */
*fill_changed = TRUE;
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
} /* end if */
/*
* Can we convert between source and destination data types?
*/
- if(NULL == (tpath = H5T_path_find(fill->type, dset_type, NULL, NULL, dxpl_id, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
+ if (NULL == (tpath = H5T_path_find(fill->type, dset_type, NULL, NULL, dxpl_id, FALSE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
/* Don't bother doing anything if there will be no actual conversion */
- if(!H5T_path_noop(tpath)) {
- if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill->type, H5T_COPY_ALL), FALSE)) < 0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dset_type, H5T_COPY_ALL), FALSE)) < 0)
+ if (!H5T_path_noop(tpath)) {
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill->type, H5T_COPY_ALL), FALSE)) < 0 ||
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dset_type, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy/register data type")
/*
* Datatype conversions are always done in place, so we need a buffer
* that is large enough for both source and destination.
*/
- if(H5T_get_size(fill->type) >= H5T_get_size(dset_type))
+ if (H5T_get_size(fill->type) >= H5T_get_size(dset_type))
buf = fill->buf;
else {
- if(NULL == (buf = H5MM_malloc(H5T_get_size(dset_type))))
+ if (NULL == (buf = H5MM_malloc(H5T_get_size(dset_type))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
HDmemcpy(buf, fill->buf, H5T_get_size(fill->type));
} /* end else */
/* Use CALLOC here to clear the buffer in case later the library thinks there's
* data in the background. */
- if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(dset_type))))
+ if (H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(dset_type))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
/* Do the conversion */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
+ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Update the fill message */
- if(buf != fill->buf) {
+ if (buf != fill->buf) {
H5T_vlen_reclaim_elmt(fill->buf, fill->type, dxpl_id);
H5MM_xfree(fill->buf);
fill->buf = buf;
@@ -984,25 +987,24 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
} /* end if */
done:
- if(src_id >= 0 && H5I_dec_ref(src_id) < 0)
+ if (src_id >= 0 && H5I_dec_ref(src_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for temp ID")
- if(dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
+ if (dst_id >= 0 && H5I_dec_ref(dst_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for temp ID")
- if(buf != fill->buf)
+ if (buf != fill->buf)
H5MM_xfree(buf);
- if(bkg)
+ if (bkg)
H5MM_xfree(bkg);
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5O_fill_convert() */
-
/*-------------------------------------------------------------------------
* Function: H5O_fill_set_latest_version
*
* Purpose: Set the encoding for a fill value to the latest version.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Tuesday, July 24, 2007
@@ -1022,4 +1024,3 @@ H5O_fill_set_latest_version(H5O_fill_t *fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_set_latest_version() */
-
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 8ba1f71..4ae2d31 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,67 +15,65 @@
*
* Created: H5Oginfo.c
* Aug 23 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Group Information messages.
*
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_ginfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_ginfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_ginfo_copy(const void *_mesg, void *_dest);
+static void * H5O_ginfo_copy(const void *_mesg, void *_dest);
static size_t H5O_ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_ginfo_free(void *_mesg);
-static herr_t H5O_ginfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_ginfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_GINFO[1] = {{
- H5O_GINFO_ID, /*message id number */
- "ginfo", /*message name for debugging */
- sizeof(H5O_ginfo_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_ginfo_decode, /*decode message */
- H5O_ginfo_encode, /*encode message */
- H5O_ginfo_copy, /*copy the native value */
- H5O_ginfo_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_ginfo_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_ginfo_debug /*debug the message */
+ H5O_GINFO_ID, /*message id number */
+ "ginfo", /*message name for debugging */
+ sizeof(H5O_ginfo_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_ginfo_decode, /*decode message */
+ H5O_ginfo_encode, /*encode message */
+ H5O_ginfo_copy, /*copy the native value */
+ H5O_ginfo_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_ginfo_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_ginfo_debug /*debug the message */
}};
/* Current version of group info information */
-#define H5O_GINFO_VERSION 0
+#define H5O_GINFO_VERSION 0
/* Flags for group info flag encoding */
-#define H5O_GINFO_STORE_PHASE_CHANGE 0x01
-#define H5O_GINFO_STORE_EST_ENTRY_INFO 0x02
-#define H5O_GINFO_ALL_FLAGS (H5O_GINFO_STORE_PHASE_CHANGE | H5O_GINFO_STORE_EST_ENTRY_INFO)
+#define H5O_GINFO_STORE_PHASE_CHANGE 0x01
+#define H5O_GINFO_STORE_EST_ENTRY_INFO 0x02
+#define H5O_GINFO_ALL_FLAGS (H5O_GINFO_STORE_PHASE_CHANGE | H5O_GINFO_STORE_EST_ENTRY_INFO)
/* Declare a free list to manage the H5O_ginfo_t struct */
H5FL_DEFINE_STATIC(H5O_ginfo_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_decode
*
@@ -87,19 +85,18 @@ H5FL_DEFINE_STATIC(H5O_ginfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static void *
H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_ginfo_t *ginfo = NULL; /* Pointer to group information message */
- unsigned char flags; /* Flags for encoding group info */
- void *ret_value; /* Return value */
+ H5O_ginfo_t * ginfo = NULL; /* Pointer to group information message */
+ unsigned char flags; /* Flags for encoding group info */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -107,52 +104,51 @@ H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
HDassert(p);
/* Version of message */
- if(*p++ != H5O_GINFO_VERSION)
+ if (*p++ != H5O_GINFO_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (ginfo = H5FL_CALLOC(H5O_ginfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (ginfo = H5FL_CALLOC(H5O_ginfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the flags for the group */
flags = *p++;
- if(flags & ~H5O_GINFO_ALL_FLAGS)
+ if (flags & ~H5O_GINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message")
ginfo->store_link_phase_change = (flags & H5O_GINFO_STORE_PHASE_CHANGE) ? TRUE : FALSE;
- ginfo->store_est_entry_info = (flags & H5O_GINFO_STORE_EST_ENTRY_INFO) ? TRUE : FALSE;
+ ginfo->store_est_entry_info = (flags & H5O_GINFO_STORE_EST_ENTRY_INFO) ? TRUE : FALSE;
/* Get the max. # of links to store compactly & the min. # of links to store densely */
- if(ginfo->store_link_phase_change) {
+ if (ginfo->store_link_phase_change) {
UINT16DECODE(p, ginfo->max_compact)
UINT16DECODE(p, ginfo->min_dense)
} /* end if */
else {
ginfo->max_compact = H5G_CRT_GINFO_MAX_COMPACT;
- ginfo->min_dense = H5G_CRT_GINFO_MIN_DENSE;
+ ginfo->min_dense = H5G_CRT_GINFO_MIN_DENSE;
} /* end else */
/* Get the estimated # of entries & name lengths */
- if(ginfo->store_est_entry_info) {
+ if (ginfo->store_est_entry_info) {
UINT16DECODE(p, ginfo->est_num_entries)
UINT16DECODE(p, ginfo->est_name_len)
} /* end if */
else {
ginfo->est_num_entries = H5G_CRT_GINFO_EST_NUM_ENTRIES;
- ginfo->est_name_len = H5G_CRT_GINFO_EST_NAME_LEN;
+ ginfo->est_name_len = H5G_CRT_GINFO_EST_NAME_LEN;
} /* end if */
/* Set return value */
ret_value = ginfo;
done:
- if(ret_value == NULL)
- if(ginfo != NULL)
+ if (ret_value == NULL)
+ if (ginfo != NULL)
ginfo = H5FL_FREE(H5O_ginfo_t, ginfo);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ginfo_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_encode
*
@@ -161,16 +157,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
- const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
- unsigned char flags; /* Flags for encoding group info */
+ const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
+ unsigned char flags = 0; /* Flags for encoding group info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -182,18 +178,18 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
*p++ = H5O_GINFO_VERSION;
/* The flags for the group info */
- flags = ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0;
- flags = (unsigned char)(flags | (ginfo->store_est_entry_info ? H5O_GINFO_STORE_EST_ENTRY_INFO : 0));
- *p++ = flags;
+ flags = (unsigned char)(ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0);
+ flags = (unsigned char)(flags | (ginfo->store_est_entry_info ? H5O_GINFO_STORE_EST_ENTRY_INFO : 0));
+ *p++ = flags;
/* Store the max. # of links to store compactly & the min. # of links to store densely */
- if(ginfo->store_link_phase_change) {
+ if (ginfo->store_link_phase_change) {
UINT16ENCODE(p, ginfo->max_compact)
UINT16ENCODE(p, ginfo->min_dense)
} /* end if */
/* Estimated # of entries & name lengths */
- if(ginfo->store_est_entry_info) {
+ if (ginfo->store_est_entry_info) {
UINT16ENCODE(p, ginfo->est_num_entries)
UINT16ENCODE(p, ginfo->est_name_len)
} /* end if */
@@ -201,7 +197,6 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ginfo_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_copy
*
@@ -213,7 +208,6 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
@@ -221,16 +215,16 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
static void *
H5O_ginfo_copy(const void *_mesg, void *_dest)
{
- const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
- H5O_ginfo_t *dest = (H5O_ginfo_t *)_dest;
- void *ret_value; /* Return value */
+ const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
+ H5O_ginfo_t * dest = (H5O_ginfo_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(ginfo);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *ginfo;
@@ -242,7 +236,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ginfo_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_size
*
@@ -255,7 +248,6 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
@@ -263,31 +255,30 @@ done:
static size_t
H5O_ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
- size_t ret_value; /* Return value */
+ const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
- ret_value = 1 + /* Version */
- 1 + /* Flags */
- (ginfo->store_link_phase_change ? (
- (size_t)(2 + /* "Max compact" links */
- 2) /* "Min dense" links */
- ) : 0) + /* "Min dense" links */
- (ginfo->store_est_entry_info ? (
- (size_t)(2 + /* Estimated # of entries in group */
- 2) /* Estimated length of name of entry in group */
- ) : 0);
+ ret_value = 1 + /* Version */
+ 1 + /* Flags */
+ (ginfo->store_link_phase_change ? ((size_t)(2 + /* "Max compact" links */
+ 2) /* "Min dense" links */
+ )
+ : 0) + /* "Min dense" links */
+ (ginfo->store_est_entry_info ? ((size_t)(2 + /* Estimated # of entries in group */
+ 2) /* Estimated length of name of entry in group */
+ )
+ : 0);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ginfo_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
@@ -308,7 +299,6 @@ H5O_ginfo_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ginfo_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_ginfo_debug
*
@@ -317,16 +307,15 @@ H5O_ginfo_free(void *mesg)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ginfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_ginfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
+ const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -337,15 +326,12 @@ H5O_ginfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDassert(indent >= 0);
HDassert(fwidth >= 0);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. compact links:", ginfo->max_compact);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. dense links:", ginfo->min_dense);
+ "Estimated # of objects in group:", ginfo->est_num_entries);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated # of objects in group:", ginfo->est_num_entries);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated length of object in group's name:", ginfo->est_name_len);
+ "Estimated length of object in group's name:", ginfo->est_name_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ginfo_debug() */
-
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 3f5076c..43d01a5 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -6,78 +6,72 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
* Purpose: Messages related to data layout.
*/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
/* Local macros */
-
/* PRIVATE PROTOTYPES */
-static void *H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_layout_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_layout_copy(const void *_mesg, void *_dest);
+static void * H5O_layout_copy(const void *_mesg, void *_dest);
static size_t H5O_layout_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_layout_reset(void *_mesg);
static herr_t H5O_layout_free(void *_mesg);
-static herr_t H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- void *_mesg);
-static void *H5O_layout_copy_file(H5F_t *file_src, void *mesg_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
+static void * H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+static herr_t H5O_layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_LAYOUT[1] = {{
- H5O_LAYOUT_ID, /*message id number */
- "layout", /*message name for debugging */
- sizeof(H5O_layout_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_layout_decode, /*decode message */
- H5O_layout_encode, /*encode message */
- H5O_layout_copy, /*copy the native value */
- H5O_layout_size, /*size of message on disk */
- H5O_layout_reset, /*reset method */
- H5O_layout_free, /*free the struct */
- H5O_layout_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_layout_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_layout_debug /*debug the message */
+ H5O_LAYOUT_ID, /*message id number */
+ "layout", /*message name for debugging */
+ sizeof(H5O_layout_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_layout_decode, /*decode message */
+ H5O_layout_encode, /*encode message */
+ H5O_layout_copy, /*copy the native value */
+ H5O_layout_size, /*size of message on disk */
+ H5O_layout_reset, /*reset method */
+ H5O_layout_free, /*free the struct */
+ H5O_layout_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_layout_copy_file, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_layout_debug /*debug the message */
}};
-
/* Declare a free list to manage the H5O_layout_t struct */
H5FL_DEFINE(H5O_layout_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_decode
*
@@ -95,12 +89,13 @@ H5FL_DEFINE(H5O_layout_t);
*/
static void *
H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t p_size, const uint8_t *p)
{
- H5O_layout_t *mesg = NULL;
- unsigned u;
- void *ret_value; /* Return value */
+ H5O_layout_t *mesg = NULL;
+ unsigned u;
+ const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -109,19 +104,19 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
HDassert(p);
/* decode */
- if(NULL == (mesg = H5FL_CALLOC(H5O_layout_t)))
+ if (NULL == (mesg = H5FL_CALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
mesg->version = *p++;
- if(mesg->version < H5O_LAYOUT_VERSION_1 || mesg->version > H5O_LAYOUT_VERSION_3)
+ if (mesg->version < H5O_LAYOUT_VERSION_1 || mesg->version > H5O_LAYOUT_VERSION_3)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for layout message")
- if(mesg->version < H5O_LAYOUT_VERSION_3) {
- unsigned ndims; /* Num dimensions in chunk */
+ if (mesg->version < H5O_LAYOUT_VERSION_3) {
+ unsigned ndims; /* Num dimensions in chunk */
/* Dimensionality */
ndims = *p++;
- if(ndims > H5O_LAYOUT_NDIMS)
+ if (ndims > H5O_LAYOUT_NDIMS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "dimensionality is too large")
/* Layout class */
@@ -132,13 +127,13 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
p += 5;
/* Address */
- if(mesg->type == H5D_CONTIGUOUS) {
+ if (mesg->type == H5D_CONTIGUOUS) {
H5F_addr_decode(f, &p, &(mesg->storage.u.contig.addr));
/* Set the layout operations */
mesg->ops = H5D_LOPS_CONTIG;
} /* end if */
- else if(mesg->type == H5D_CHUNKED) {
+ else if (mesg->type == H5D_CHUNKED) {
H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr));
/* Set the layout operations */
@@ -147,7 +142,7 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
/* Set the chunk operations */
/* (Only "btree" indexing type currently supported in this version) */
mesg->storage.u.chunk.idx_type = H5D_CHUNK_BTREE;
- mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
+ mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
} /* end if */
else {
/* Sanity check */
@@ -158,46 +153,56 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
} /* end else */
/* Read the size */
- if(mesg->type != H5D_CHUNKED) {
+ if (mesg->type != H5D_CHUNKED) {
/* Don't compute size of contiguous storage here, due to possible
* truncation of the dimension sizes when they were stored in this
* version of the layout message. Compute the contiguous storage
* size in the dataset code, where we've got the dataspace
* information available also. - QAK 5/26/04
*/
- p += ndims * 4; /* Skip over dimension sizes (32-bit quantities) */
- } /* end if */
+ p += ndims * 4; /* Skip over dimension sizes (32-bit quantities) */
+ } /* end if */
else {
- mesg->u.chunk.ndims=ndims;
- for(u = 0; u < ndims; u++)
+ mesg->u.chunk.ndims = ndims;
+ for (u = 0; u < ndims; u++)
UINT32DECODE(p, mesg->u.chunk.dim[u]);
/* Compute chunk size */
- for(u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < ndims; u++)
+ for (u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < ndims; u++)
mesg->u.chunk.size *= mesg->u.chunk.dim[u];
} /* end if */
- if(mesg->type == H5D_COMPACT) {
+ if (mesg->type == H5D_COMPACT) {
UINT32DECODE(p, mesg->storage.u.compact.size);
- if(mesg->storage.u.compact.size > 0) {
- if(NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for compact data buffer")
+ if (mesg->storage.u.compact.size > 0) {
+ /* Ensure that size doesn't exceed buffer size, due to possible data corruption */
+ if (p + mesg->storage.u.compact.size - 1 > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "storage fill size exceeds buffer size")
+
+ if (NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for compact data buffer")
HDmemcpy(mesg->storage.u.compact.buf, p, mesg->storage.u.compact.size);
p += mesg->storage.u.compact.size;
} /* end if */
- } /* end if */
- } /* end if */
+ } /* end if */
+ } /* end if */
else {
/* Layout class */
mesg->type = (H5D_layout_t)*p++;
/* Interpret the rest of the message according to the layout class */
- switch(mesg->type) {
+ switch (mesg->type) {
case H5D_COMPACT:
UINT16DECODE(p, mesg->storage.u.compact.size);
- if(mesg->storage.u.compact.size > 0) {
- if(NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for compact data buffer")
+ if (mesg->storage.u.compact.size > 0) {
+ /* Ensure that size doesn't exceed buffer size, due to possible data corruption */
+ if (p + mesg->storage.u.compact.size - 1 > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "storage size exceeds buffer size")
+
+ if (NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for compact data buffer")
HDmemcpy(mesg->storage.u.compact.buf, p, mesg->storage.u.compact.size);
p += mesg->storage.u.compact.size;
} /* end if */
@@ -217,24 +222,24 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
case H5D_CHUNKED:
/* Dimensionality */
mesg->u.chunk.ndims = *p++;
- if(mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS)
+ if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "dimensionality is too large")
/* B-tree address */
H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr));
/* Chunk dimensions */
- for(u = 0; u < mesg->u.chunk.ndims; u++)
+ for (u = 0; u < mesg->u.chunk.ndims; u++)
UINT32DECODE(p, mesg->u.chunk.dim[u]);
/* Compute chunk size */
- for(u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < mesg->u.chunk.ndims; u++)
+ for (u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < mesg->u.chunk.ndims; u++)
mesg->u.chunk.size *= mesg->u.chunk.dim[u];
/* Set the chunk operations */
/* (Only "btree" indexing type supported with v3 of message format) */
mesg->storage.u.chunk.idx_type = H5D_CHUNK_BTREE;
- mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
+ mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
/* Set the layout operations */
mesg->ops = H5D_LOPS_CHUNK;
@@ -245,20 +250,19 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class")
} /* end switch */
- } /* end else */
+ } /* end else */
/* Set return value */
ret_value = mesg;
done:
- if(ret_value == NULL)
- if(mesg)
+ if (ret_value == NULL)
+ if (mesg)
mesg = H5FL_FREE(H5O_layout_t, mesg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_encode
*
@@ -292,9 +296,9 @@ done:
static herr_t
H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
- unsigned u;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
+ unsigned u;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -307,17 +311,17 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
*p++ = (uint8_t)H5O_LAYOUT_VERSION_3;
/* Layout class */
- *p++ = mesg->type;
+ *p++ = (uint8_t)mesg->type;
/* Write out layout class specific information */
- switch(mesg->type) {
+ switch (mesg->type) {
case H5D_COMPACT:
/* Size of raw data */
UINT16ENCODE(p, mesg->storage.u.compact.size);
/* Raw data */
- if(mesg->storage.u.compact.size > 0) {
- if(mesg->storage.u.compact.buf)
+ if (mesg->storage.u.compact.size > 0) {
+ if (mesg->storage.u.compact.buf)
HDmemcpy(p, mesg->storage.u.compact.buf, mesg->storage.u.compact.size);
else
HDmemset(p, 0, mesg->storage.u.compact.size);
@@ -339,7 +343,7 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
H5F_addr_encode(f, &p, mesg->storage.u.chunk.idx_addr);
/* Dimension sizes */
- for(u = 0; u < mesg->u.chunk.ndims; u++)
+ for (u = 0; u < mesg->u.chunk.ndims; u++)
UINT32ENCODE(p, mesg->u.chunk.dim[u]);
break;
@@ -353,7 +357,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_copy
*
@@ -372,9 +375,9 @@ done:
static void *
H5O_layout_copy(const void *_mesg, void *_dest)
{
- const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
- H5O_layout_t *dest = (H5O_layout_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
+ H5O_layout_t * dest = (H5O_layout_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -382,16 +385,16 @@ H5O_layout_copy(const void *_mesg, void *_dest)
HDassert(mesg);
/* Allocate destination message, if necessary */
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_layout_t)))
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "layout message allocation failed")
/* copy */
*dest = *mesg;
/* Deep copy the buffer for compact datasets also */
- if(mesg->type == H5D_COMPACT && mesg->storage.u.compact.size > 0) {
+ if (mesg->type == H5D_COMPACT && mesg->storage.u.compact.size > 0) {
/* Allocate memory for the raw data */
- if(NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
+ if (NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
/* Copy over the raw data */
@@ -399,21 +402,20 @@ H5O_layout_copy(const void *_mesg, void *_dest)
} /* end if */
/* Reset the pointer of the chunked storage index but not the address */
- if(dest->type == H5D_CHUNKED && dest->storage.u.chunk.ops)
- H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ if (dest->type == H5D_CHUNKED && dest->storage.u.chunk.ops)
+ H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
/* Set return value */
ret_value = dest;
done:
- if(ret_value == NULL)
- if(NULL == _dest)
+ if (ret_value == NULL)
+ if (NULL == _dest)
dest = H5FL_FREE(H5O_layout_t, dest);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_size
*
@@ -433,8 +435,8 @@ done:
static size_t
H5O_layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
- size_t ret_value;
+ const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
+ size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -449,16 +451,15 @@ H5O_layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_layout_reset
+ * Function: H5O__layout_reset
*
- * Purpose: Frees resources within a data type message, but doesn't free
- * the message itself.
+ * Purpose: Frees resources within a data type message, but doesn't free
+ * the message itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, September 13, 2002
*
*-------------------------------------------------------------------------
@@ -466,13 +467,13 @@ H5O_layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
static herr_t
H5O_layout_reset(void *_mesg)
{
- H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
+ H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(mesg) {
+ if (mesg) {
/* Free the compact storage buffer */
- if(H5D_COMPACT == mesg->type)
+ if (H5D_COMPACT == mesg->type)
mesg->storage.u.compact.buf = H5MM_xfree(mesg->storage.u.compact.buf);
/* Reset the message */
@@ -482,7 +483,6 @@ H5O_layout_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_layout_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_free
*
@@ -498,15 +498,15 @@ H5O_layout_reset(void *_mesg)
static herr_t
H5O_layout_free(void *_mesg)
{
- H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
/* Free resources within the message */
- if(H5O_layout_reset(mesg) < 0)
+ if (H5O_layout_reset(mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free message resources")
mesg = H5FL_FREE(H5O_layout_t, mesg);
@@ -515,7 +515,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_delete
*
@@ -531,8 +530,8 @@ done:
static herr_t
H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
- H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -542,20 +541,20 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
HDassert(mesg);
/* Perform different actions, depending on the type of storage */
- switch(mesg->type) {
- case H5D_COMPACT: /* Compact data storage */
+ switch (mesg->type) {
+ case H5D_COMPACT: /* Compact data storage */
/* Nothing required */
break;
- case H5D_CONTIGUOUS: /* Contiguous block on disk */
+ case H5D_CONTIGUOUS: /* Contiguous block on disk */
/* Free the file space for the raw data */
- if(H5D__contig_delete(f, dxpl_id, &mesg->storage) < 0)
+ if (H5D__contig_delete(f, dxpl_id, &mesg->storage) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
- case H5D_CHUNKED: /* Chunked blocks on disk */
+ case H5D_CHUNKED: /* Chunked blocks on disk */
/* Free the file space for the index & chunk raw data */
- if(H5D__chunk_delete(f, dxpl_id, open_oh, &mesg->storage) < 0)
+ if (H5D__chunk_delete(f, dxpl_id, open_oh, &mesg->storage) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
@@ -569,7 +568,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_copy_file
*
@@ -585,16 +583,15 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id)
+H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ unsigned H5_ATTR_UNUSED *mesg_flags, H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id)
{
- H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
- H5O_layout_t *layout_src = (H5O_layout_t *) mesg_src;
- H5O_layout_t *layout_dst = NULL;
- hbool_t copied = FALSE; /* Whether the data was copied */
- H5D_shared_t *shared_fo = (H5D_shared_t *)cpy_info->shared_fo;
- void *ret_value; /* Return value */
+ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
+ H5O_layout_t * layout_src = (H5O_layout_t *)mesg_src;
+ H5O_layout_t * layout_dst = NULL;
+ hbool_t copied = FALSE; /* Whether the data was copied */
+ H5D_shared_t * shared_fo = (H5D_shared_t *)cpy_info->shared_fo;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -604,21 +601,23 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
HDassert(file_dst);
/* Allocate space for the destination layout */
- if(NULL == (layout_dst = H5FL_MALLOC(H5O_layout_t)))
+ if (NULL == (layout_dst = H5FL_MALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Copy the "top level" information */
*layout_dst = *layout_src;
/* Copy the layout type specific information */
- switch(layout_src->type) {
+ switch (layout_src->type) {
case H5D_COMPACT:
- if(layout_src->storage.u.compact.buf) {
+ if (layout_src->storage.u.compact.buf) {
/* copy compact raw data */
- if(H5D__compact_copy(file_src, &layout_src->storage.u.compact, file_dst, &layout_dst->storage.u.compact, udata->src_dtype, cpy_info, dxpl_id) < 0)
+ if (H5D__compact_copy(file_src, &layout_src->storage.u.compact, file_dst,
+ &layout_dst->storage.u.compact, udata->src_dtype, cpy_info,
+ dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage")
copied = TRUE;
- } /* end if */
+ } /* end if */
break;
case H5D_CONTIGUOUS:
@@ -626,25 +625,29 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
* layout message less than version 3 because versions 1 & 2 would
* truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
*/
- if(layout_src->version < H5O_LAYOUT_VERSION_3)
- layout_dst->storage.u.contig.size = H5S_extent_nelem(udata->src_space_extent) *
- H5T_get_size(udata->src_dtype);
+ if (layout_src->version < H5O_LAYOUT_VERSION_3)
+ layout_dst->storage.u.contig.size =
+ H5S_extent_nelem(udata->src_space_extent) * H5T_get_size(udata->src_dtype);
- if(H5D__contig_is_space_alloc(&layout_src->storage) ||
- (H5F_HAS_FEATURE(file_src, H5FD_FEAT_DATA_SIEVE) &&
- shared_fo && shared_fo->cache.contig.sieve_buf)) {
+ if (H5D__contig_is_space_alloc(&layout_src->storage) ||
+ (cpy_info->shared_fo &&
+ H5D__contig_is_data_cached((const H5D_shared_t *)cpy_info->shared_fo))) {
/* copy contiguous raw data */
- if(H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst, &layout_dst->storage.u.contig, udata->src_dtype, cpy_info, dxpl_id) < 0)
+ if (H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst,
+ &layout_dst->storage.u.contig, udata->src_dtype, cpy_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage")
copied = TRUE;
} /* end if */
break;
case H5D_CHUNKED:
- if(H5D__chunk_is_space_alloc(&layout_src->storage) ||
- (shared_fo && H5D__chunk_is_space_alloc(&shared_fo->layout.storage))) {
+ if (H5D__chunk_is_space_alloc(&layout_src->storage) ||
+ (cpy_info->shared_fo &&
+ H5D__chunk_is_data_cached((const H5D_shared_t *)cpy_info->shared_fo))) {
/* Create chunked layout */
- if(H5D__chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst, &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype, udata->common.src_pline, cpy_info, dxpl_id) < 0)
+ if (H5D__chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst,
+ &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype,
+ udata->common.src_pline, cpy_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage")
copied = TRUE;
} /* end if */
@@ -657,21 +660,20 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
} /* end switch */
/* Check if copy routine was invoked (which frees the source datatype) */
- if(copied)
+ if (copied)
udata->src_dtype = NULL;
/* Set return value */
ret_value = layout_dst;
done:
- if(!ret_value)
- if(layout_dst)
- layout_dst = H5FL_FREE(H5O_layout_t, layout_dst);
+ if (!ret_value)
+ if (layout_dst)
+ layout_dst = H5FL_FREE(H5O_layout_t, layout_dst);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_layout_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_layout_debug
*
@@ -685,11 +687,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth)
+H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
- unsigned u;
+ const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
+ unsigned u;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -700,50 +702,43 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Version:", mesg->version);
- switch(mesg->type) {
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ switch (mesg->type) {
case H5D_CHUNKED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Type:", "Chunked");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked");
/* Chunk # of dims & size */
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Number of dimensions:",
- (unsigned long)(mesg->u.chunk.ndims));
+ "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims));
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
- for(u = 0; u < mesg->u.chunk.ndims; u++)
+ for (u = 0; u < mesg->u.chunk.ndims; u++)
HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
HDfprintf(stream, "}\n");
/* Index information */
- switch(mesg->storage.u.chunk.idx_type) {
+ switch (mesg->storage.u.chunk.idx_type) {
case H5D_CHUNK_BTREE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Index Type:", "v1 B-tree");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree");
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"B-tree address:", mesg->storage.u.chunk.idx_addr);
break;
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Index Type:", "Unknown", (unsigned)mesg->storage.u.chunk.idx_type);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown",
+ (unsigned)mesg->storage.u.chunk.idx_type);
break;
} /* end switch */
break;
case H5D_CONTIGUOUS:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Type:", "Contiguous");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous");
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"Data address:", mesg->storage.u.contig.addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Data Size:", mesg->storage.u.contig.size);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.contig.size);
break;
case H5D_COMPACT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Type:", "Compact");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact");
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Data Size:", mesg->storage.u.compact.size);
break;
@@ -751,11 +746,10 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Type:", "Unknown", (unsigned)mesg->type);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown",
+ (unsigned)mesg->type);
break;
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_layout_debug() */
-
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index a612ae5..8c5f8e7 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,88 +15,84 @@
*
* Created: H5Olinfo.c
* Aug 23 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Link Information messages.
*
*-------------------------------------------------------------------------
*/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5L_PACKAGE /*suppress error about including H5Lpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Lpkg.h" /* Links */
-#include "H5Opkg.h" /* Object headers */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Lpkg.h" /* Links */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_linfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_linfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_linfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_linfo_copy(const void *_mesg, void *_dest);
+static void * H5O_linfo_copy(const void *_mesg, void *_dest);
static size_t H5O_linfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_linfo_free(void *_mesg);
-static herr_t H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- void *_mesg);
-static void *H5O_linfo_copy_file(H5F_t *file_src, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_linfo_post_copy_file(const H5O_loc_t *parent_src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
- unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info);
-static herr_t H5O_linfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
+static void * H5O_linfo_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+static herr_t H5O_linfo_post_copy_file(const H5O_loc_t *parent_src_oloc, const void *mesg_src,
+ H5O_loc_t *dst_oloc, void *mesg_dst, unsigned *mesg_flags,
+ hid_t dxpl_id, H5O_copy_t *cpy_info);
+static herr_t H5O_linfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_LINFO[1] = {{
- H5O_LINFO_ID, /*message id number */
- "linfo", /*message name for debugging */
- sizeof(H5O_linfo_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_linfo_decode, /*decode message */
- H5O_linfo_encode, /*encode message */
- H5O_linfo_copy, /*copy the native value */
- H5O_linfo_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_linfo_free, /* free method */
- H5O_linfo_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_linfo_copy_file, /* copy native value to file */
- H5O_linfo_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_linfo_debug /*debug the message */
+ H5O_LINFO_ID, /*message id number */
+ "linfo", /*message name for debugging */
+ sizeof(H5O_linfo_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_linfo_decode, /*decode message */
+ H5O_linfo_encode, /*encode message */
+ H5O_linfo_copy, /*copy the native value */
+ H5O_linfo_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_linfo_free, /* free method */
+ H5O_linfo_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_linfo_copy_file, /* copy native value to file */
+ H5O_linfo_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_linfo_debug /*debug the message */
}};
/* Current version of link info information */
-#define H5O_LINFO_VERSION 0
+#define H5O_LINFO_VERSION 0
/* Flags for link info index flag encoding */
-#define H5O_LINFO_TRACK_CORDER 0x01
-#define H5O_LINFO_INDEX_CORDER 0x02
-#define H5O_LINFO_ALL_FLAGS (H5O_LINFO_TRACK_CORDER | H5O_LINFO_INDEX_CORDER)
+#define H5O_LINFO_TRACK_CORDER 0x01
+#define H5O_LINFO_INDEX_CORDER 0x02
+#define H5O_LINFO_ALL_FLAGS (H5O_LINFO_TRACK_CORDER | H5O_LINFO_INDEX_CORDER)
/* Data exchange structure to use when copying links from src to dst */
typedef struct {
- const H5O_loc_t *src_oloc; /* Source object location */
- H5O_loc_t *dst_oloc; /* Destination object location */
- H5O_linfo_t *dst_linfo; /* Destination object's link info message */
- hid_t dxpl_id; /* DXPL for operation */
- H5O_copy_t *cpy_info; /* Information for copy operation */
+ const H5O_loc_t *src_oloc; /* Source object location */
+ H5O_loc_t * dst_oloc; /* Destination object location */
+ H5O_linfo_t * dst_linfo; /* Destination object's link info message */
+ hid_t dxpl_id; /* DXPL for operation */
+ H5O_copy_t * cpy_info; /* Information for copy operation */
} H5O_linfo_postcopy_ud_t;
/* Declare a free list to manage the H5O_linfo_t struct */
H5FL_DEFINE_STATIC(H5O_linfo_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_decode
*
@@ -106,19 +102,18 @@ H5FL_DEFINE_STATIC(H5O_linfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
*/
static void *
H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_linfo_t *linfo = NULL; /* Link info */
+ H5O_linfo_t * linfo = NULL; /* Link info */
unsigned char index_flags; /* Flags for encoding link index info */
- void *ret_value; /* Return value */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -127,16 +122,16 @@ H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
HDassert(p);
/* Version of message */
- if(*p++ != H5O_LINFO_VERSION)
+ if (*p++ != H5O_LINFO_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (linfo = H5FL_MALLOC(H5O_linfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (linfo = H5FL_MALLOC(H5O_linfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the index flags for the group */
index_flags = *p++;
- if(index_flags & ~H5O_LINFO_ALL_FLAGS)
+ if (index_flags & ~H5O_LINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message")
linfo->track_corder = (index_flags & H5O_LINFO_TRACK_CORDER) ? TRUE : FALSE;
linfo->index_corder = (index_flags & H5O_LINFO_INDEX_CORDER) ? TRUE : FALSE;
@@ -145,7 +140,7 @@ H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
linfo->nlinks = HSIZET_MAX;
/* Max. link creation order value for the group, if tracked */
- if(linfo->track_corder)
+ if (linfo->track_corder)
INT64DECODE(p, linfo->max_corder)
else
linfo->max_corder = 0;
@@ -157,7 +152,7 @@ H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
H5F_addr_decode(f, &p, &(linfo->name_bt2_addr));
/* Address of v2 B-tree to index creation order of links, if there is one */
- if(linfo->index_corder)
+ if (linfo->index_corder)
H5F_addr_decode(f, &p, &(linfo->corder_bt2_addr));
else
linfo->corder_bt2_addr = HADDR_UNDEF;
@@ -166,14 +161,13 @@ H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *o
ret_value = linfo;
done:
- if(ret_value == NULL)
- if(linfo != NULL)
+ if (ret_value == NULL)
+ if (linfo != NULL)
linfo = H5FL_FREE(H5O_linfo_t, linfo);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_linfo_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_encode
*
@@ -182,7 +176,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
@@ -190,8 +183,8 @@ done:
static herr_t
H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
- unsigned char index_flags; /* Flags for encoding link index info */
+ const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
+ unsigned char index_flags; /* Flags for encoding link index info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -204,12 +197,12 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_LINFO_VERSION;
/* The flags for the link indices */
- index_flags = linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0;
+ index_flags = (uint8_t)(linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0);
index_flags = (uint8_t)(index_flags | (linfo->index_corder ? H5O_LINFO_INDEX_CORDER : 0));
- *p++ = index_flags;
+ *p++ = index_flags;
/* Max. link creation order value for the group, if tracked */
- if(linfo->track_corder)
+ if (linfo->track_corder)
INT64ENCODE(p, linfo->max_corder)
/* Address of fractal heap to store "dense" links */
@@ -219,7 +212,7 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
H5F_addr_encode(f, &p, linfo->name_bt2_addr);
/* Address of v2 B-tree to index creation order of links, if they are indexed */
- if(linfo->index_corder)
+ if (linfo->index_corder)
H5F_addr_encode(f, &p, linfo->corder_bt2_addr);
else
HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
@@ -227,7 +220,6 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_linfo_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_copy
*
@@ -238,7 +230,6 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
@@ -246,16 +237,16 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
static void *
H5O_linfo_copy(const void *_mesg, void *_dest)
{
- const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
- H5O_linfo_t *dest = (H5O_linfo_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
+ H5O_linfo_t * dest = (H5O_linfo_t *)_dest;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(linfo);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_linfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_linfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *linfo;
@@ -267,7 +258,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_linfo_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_size
*
@@ -279,7 +269,6 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
@@ -287,23 +276,24 @@ done:
static size_t
H5O_linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
- size_t ret_value; /* Return value */
+ const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
- ret_value = 1 /* Version */
- + 1 /* Index flags */
- + (linfo->track_corder ? (size_t)8 : 0) /* Curr. max. creation order value */
- + (size_t)H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" links */
- + (size_t)H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of links */
- + (linfo->index_corder ? (size_t)H5F_SIZEOF_ADDR(f) : 0); /* Address of v2 B-tree for indexing creation order values of links */
+ ret_value =
+ 1 /* Version */
+ + 1 /* Index flags */
+ + (linfo->track_corder ? (size_t)8 : 0) /* Curr. max. creation order value */
+ + (size_t)H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" links */
+ + (size_t)H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of links */
+ + (linfo->index_corder ? (size_t)H5F_SIZEOF_ADDR(f)
+ : 0); /* Address of v2 B-tree for indexing creation order values of links */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_linfo_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_free
*
@@ -328,7 +318,6 @@ H5O_linfo_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_linfo_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_delete
*
@@ -344,8 +333,8 @@ H5O_linfo_free(void *mesg)
static herr_t
H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
{
- H5O_linfo_t *linfo = (H5O_linfo_t *)_mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_linfo_t *linfo = (H5O_linfo_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -354,15 +343,14 @@ H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_
HDassert(linfo);
/* If the group is using "dense" link storage, delete it */
- if(H5F_addr_defined(linfo->fheap_addr))
- if(H5G__dense_delete(f, dxpl_id, linfo, TRUE) < 0)
+ if (H5F_addr_defined(linfo->fheap_addr))
+ if (H5G__dense_delete(f, dxpl_id, linfo, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense link storage")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_linfo_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_copy_file
*
@@ -379,13 +367,13 @@ done:
*/
static void *
H5O_linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id)
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id)
{
- H5O_linfo_t *linfo_src = (H5O_linfo_t *) native_src;
- H5O_linfo_t *linfo_dst = NULL;
- H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *) _udata;
- void *ret_value; /* Return value */
+ H5O_linfo_t * linfo_src = (H5O_linfo_t *)native_src;
+ H5O_linfo_t * linfo_dst = NULL;
+ H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -394,18 +382,18 @@ H5O_linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fil
HDassert(cpy_info);
/* Copy the source message */
- if(NULL == (linfo_dst = (H5O_linfo_t *)H5O_linfo_copy(linfo_src, NULL)))
+ if (NULL == (linfo_dst = (H5O_linfo_t *)H5O_linfo_copy(linfo_src, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "memory allocation failed")
/* If we are performing a 'shallow hierarchy' copy, and the links in this
* group won't be included in the destination, reset the link info for
* this group.
*/
- if(cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth) {
- linfo_dst->nlinks = 0;
- linfo_dst->max_corder = 0;
- linfo_dst->fheap_addr = HADDR_UNDEF;
- linfo_dst->name_bt2_addr = HADDR_UNDEF;
+ if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth) {
+ linfo_dst->nlinks = 0;
+ linfo_dst->max_corder = 0;
+ linfo_dst->fheap_addr = HADDR_UNDEF;
+ linfo_dst->name_bt2_addr = HADDR_UNDEF;
linfo_dst->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
else {
@@ -413,25 +401,24 @@ H5O_linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fil
/* (XXX: should probably get the "creation" parameters for the source group's
* dense link storage components and use those - QAK)
*/
- if(H5F_addr_defined(linfo_src->fheap_addr)) {
+ if (H5F_addr_defined(linfo_src->fheap_addr)) {
/* Create the dense link storage */
- if(H5G__dense_create(file_dst, dxpl_id, linfo_dst, udata->common.src_pline) < 0)
+ if (H5G__dense_create(file_dst, dxpl_id, linfo_dst, udata->common.src_pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create 'dense' form of new format group")
} /* end if */
- } /* end else */
+ } /* end else */
/* Set return value */
ret_value = linfo_dst;
done:
- if(!ret_value)
- if(linfo_dst)
+ if (!ret_value)
+ if (linfo_dst)
linfo_dst = H5FL_FREE(H5O_linfo_t, linfo_dst);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_linfo_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_post_copy_file_cb
*
@@ -442,7 +429,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 26 2006
*
*-------------------------------------------------------------------------
@@ -450,10 +436,10 @@ done:
static herr_t
H5O_linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
{
- H5O_linfo_postcopy_ud_t *udata = (H5O_linfo_postcopy_ud_t *)_udata; /* 'User data' passed in */
- H5O_link_t dst_lnk; /* Destination link to insert */
- hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_linfo_postcopy_ud_t *udata = (H5O_linfo_postcopy_ud_t *)_udata; /* 'User data' passed in */
+ H5O_link_t dst_lnk; /* Destination link to insert */
+ hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -462,25 +448,24 @@ H5O_linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
HDassert(udata);
/* Copy the link (and the object it points to) */
- if(H5L_link_copy_file(udata->dst_oloc->file, udata->dxpl_id, src_lnk,
- udata->src_oloc, &dst_lnk, udata->cpy_info) < 0)
+ if (H5L_link_copy_file(udata->dst_oloc->file, udata->dxpl_id, src_lnk, udata->src_oloc, &dst_lnk,
+ udata->cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy link")
dst_lnk_init = TRUE;
/* Insert the new object in the destination file's group */
/* (Doesn't increment the link count - that's already been taken care of for hard links) */
- if(H5G__dense_insert(udata->dst_oloc->file, udata->dxpl_id, udata->dst_linfo, &dst_lnk) < 0)
+ if (H5G__dense_insert(udata->dst_oloc->file, udata->dxpl_id, udata->dst_linfo, &dst_lnk) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert destination link")
done:
/* Check if the destination link has been initialized */
- if(dst_lnk_init)
+ if (dst_lnk_init)
H5O_msg_reset(H5O_LINK_ID, &dst_lnk);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_linfo_post_copy_file_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_post_copy_file
*
@@ -494,13 +479,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
- H5O_loc_t *dst_oloc, void *mesg_dst, unsigned H5_ATTR_UNUSED *mesg_flags,
- hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
+ unsigned H5_ATTR_UNUSED *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- const H5O_linfo_t *linfo_src = (const H5O_linfo_t *)mesg_src;
- H5O_linfo_t *linfo_dst = (H5O_linfo_t *)mesg_dst;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_linfo_t *linfo_src = (const H5O_linfo_t *)mesg_src;
+ H5O_linfo_t * linfo_dst = (H5O_linfo_t *)mesg_dst;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -513,22 +497,23 @@ H5O_linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
HDassert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
- if(cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
+ if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
HGOTO_DONE(SUCCEED)
/* Check for copying dense link storage */
- if(H5F_addr_defined(linfo_src->fheap_addr)) {
- H5O_linfo_postcopy_ud_t udata; /* User data for iteration callback */
+ if (H5F_addr_defined(linfo_src->fheap_addr)) {
+ H5O_linfo_postcopy_ud_t udata; /* User data for iteration callback */
/* Set up dense link iteration user data */
- udata.src_oloc = src_oloc;
- udata.dst_oloc = dst_oloc;
+ udata.src_oloc = src_oloc;
+ udata.dst_oloc = dst_oloc;
udata.dst_linfo = linfo_dst;
- udata.dxpl_id = dxpl_id;
- udata.cpy_info = cpy_info;
+ udata.dxpl_id = dxpl_id;
+ udata.cpy_info = cpy_info;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5G__dense_iterate(src_oloc->file, dxpl_id, linfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5O_linfo_post_copy_file_cb, &udata) < 0)
+ if (H5G__dense_iterate(src_oloc->file, dxpl_id, linfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0,
+ NULL, H5O_linfo_post_copy_file_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
} /* end if */
@@ -536,7 +521,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_linfo_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_linfo_debug
*
@@ -545,16 +529,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_linfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_linfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_linfo_t *linfo = (const H5O_linfo_t *) _mesg;
+ const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -566,21 +549,17 @@ H5O_linfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDassert(fwidth >= 0);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Track creation order of links:", linfo->track_corder);
+ "Track creation order of links:", linfo->track_corder);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Index creation order of links:", linfo->index_corder);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of links:", linfo->nlinks);
- HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth,
- "Max. creation order value:", linfo->max_corder);
+ "Index creation order of links:", linfo->index_corder);
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of links:", linfo->nlinks);
+ HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth, "Max. creation order value:", linfo->max_corder);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' link storage fractal heap address:", linfo->fheap_addr);
+ "'Dense' link storage fractal heap address:", linfo->fheap_addr);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
+ "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
-
+ "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_linfo_debug() */
-
diff --git a/src/H5Olink.c b/src/H5Olink.c
index c0dd1d8..c9b7672 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,90 +15,88 @@
*
* Created: H5Olink.c
* Aug 29 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Link messages.
*
*-------------------------------------------------------------------------
*/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5L_PACKAGE /*suppress error about including H5Lpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lpkg.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lpkg.h" /* Links */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_link_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_link_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_link_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_link_copy(const void *_mesg, void *_dest);
+static void * H5O_link_copy(const void *_mesg, void *_dest);
static size_t H5O_link_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_link_reset(void *_mesg);
static herr_t H5O_link_free(void *_mesg);
-static herr_t H5O_link_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
-static void *H5O_link_copy_file(H5F_t *file_src, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O_link_post_copy_file(const H5O_loc_t *src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
- unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info);
-static herr_t H5O_link_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_link_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *udata);
+static void * H5O_link_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+static herr_t H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
+ void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
+static herr_t H5O_link_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_LINK[1] = {{
- H5O_LINK_ID, /*message id number */
- "link", /*message name for debugging */
- sizeof(H5O_link_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_link_decode, /*decode message */
- H5O_link_encode, /*encode message */
- H5O_link_copy, /*copy the native value */
- H5O_link_size, /*size of symbol table entry */
- H5O_link_reset, /* reset method */
- H5O_link_free, /* free method */
- H5O_link_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- H5O_link_pre_copy_file, /* pre copy native value to file */
- H5O_link_copy_file, /* copy native value to file */
- H5O_link_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_link_debug /*debug the message */
+ H5O_LINK_ID, /*message id number */
+ "link", /*message name for debugging */
+ sizeof(H5O_link_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_link_decode, /*decode message */
+ H5O_link_encode, /*encode message */
+ H5O_link_copy, /*copy the native value */
+ H5O_link_size, /*size of symbol table entry */
+ H5O_link_reset, /* reset method */
+ H5O_link_free, /* free method */
+ H5O_link_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ H5O_link_pre_copy_file, /* pre copy native value to file */
+ H5O_link_copy_file, /* copy native value to file */
+ H5O_link_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_link_debug /*debug the message */
}};
/* Current version of link information */
-#define H5O_LINK_VERSION 1
+#define H5O_LINK_VERSION 1
/* Flags for link flag encoding */
-#define H5O_LINK_NAME_SIZE 0x03 /* 2-bit field for size of name length */
-#define H5O_LINK_STORE_CORDER 0x04 /* Whether to store creation index */
-#define H5O_LINK_STORE_LINK_TYPE 0x08 /* Whether to store non-default link type */
-#define H5O_LINK_STORE_NAME_CSET 0x10 /* Whether to store non-default name character set */
-#define H5O_LINK_ALL_FLAGS (H5O_LINK_NAME_SIZE | H5O_LINK_STORE_CORDER | H5O_LINK_STORE_LINK_TYPE | H5O_LINK_STORE_NAME_CSET)
+#define H5O_LINK_NAME_SIZE 0x03 /* 2-bit field for size of name length */
+#define H5O_LINK_STORE_CORDER 0x04 /* Whether to store creation index */
+#define H5O_LINK_STORE_LINK_TYPE 0x08 /* Whether to store non-default link type */
+#define H5O_LINK_STORE_NAME_CSET 0x10 /* Whether to store non-default name character set */
+#define H5O_LINK_ALL_FLAGS \
+ (H5O_LINK_NAME_SIZE | H5O_LINK_STORE_CORDER | H5O_LINK_STORE_LINK_TYPE | H5O_LINK_STORE_NAME_CSET)
/* Individual definitions of name size values */
-#define H5O_LINK_NAME_1 0x00 /* Use 1-byte value for name length */
-#define H5O_LINK_NAME_2 0x01 /* Use 2-byte value for name length */
-#define H5O_LINK_NAME_4 0x02 /* Use 4-byte value for name length */
-#define H5O_LINK_NAME_8 0x03 /* Use 8-byte value for name length */
+#define H5O_LINK_NAME_1 0x00 /* Use 1-byte value for name length */
+#define H5O_LINK_NAME_2 0x01 /* Use 2-byte value for name length */
+#define H5O_LINK_NAME_4 0x02 /* Use 4-byte value for name length */
+#define H5O_LINK_NAME_8 0x03 /* Use 8-byte value for name length */
/* Declare a free list to manage the H5O_link_t struct */
H5FL_DEFINE_STATIC(H5O_link_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_link_decode
*
@@ -110,20 +108,20 @@ H5FL_DEFINE_STATIC(H5O_link_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
*/
static void *
H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t p_size,
+ const uint8_t *p)
{
- H5O_link_t *lnk = NULL; /* Pointer to link message */
- size_t len = 0; /* Length of a string in the message */
- unsigned char link_flags; /* Flags for encoding link info */
- void *ret_value; /* Return value */
+ H5O_link_t * lnk = NULL; /* Pointer to link message */
+ size_t len = 0; /* Length of a string in the message */
+ unsigned char link_flags; /* Flags for encoding link info */
+ const uint8_t *p_end = p + p_size; /* End of the p buffer */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -132,81 +130,86 @@ H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
HDassert(p);
/* decode */
- if(*p++ != H5O_LINK_VERSION)
+ if (*p++ != H5O_LINK_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (lnk = H5FL_CALLOC(H5O_link_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (lnk = H5FL_CALLOC(H5O_link_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the encoding flags for the link */
link_flags = *p++;
- if(link_flags & ~H5O_LINK_ALL_FLAGS)
+ if (link_flags & ~H5O_LINK_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message")
/* Check for non-default link type */
- if(link_flags & H5O_LINK_STORE_LINK_TYPE) {
+ if (link_flags & H5O_LINK_STORE_LINK_TYPE) {
/* Get the type of the link */
lnk->type = (H5L_type_t)*p++;
- if(lnk->type < H5L_TYPE_HARD || lnk->type > H5L_TYPE_MAX)
+ if (lnk->type < H5L_TYPE_HARD || lnk->type > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad link type")
} /* end if */
else
lnk->type = H5L_TYPE_HARD;
/* Get the link creation time from the file */
- if(link_flags & H5O_LINK_STORE_CORDER) {
+ if (link_flags & H5O_LINK_STORE_CORDER) {
INT64DECODE(p, lnk->corder)
lnk->corder_valid = TRUE;
} /* end if */
else {
- lnk->corder = 0;
+ lnk->corder = 0;
lnk->corder_valid = FALSE;
} /* end else */
/* Check for non-default name character set */
- if(link_flags & H5O_LINK_STORE_NAME_CSET) {
+ if (link_flags & H5O_LINK_STORE_NAME_CSET) {
/* Get the link name's character set */
lnk->cset = (H5T_cset_t)*p++;
- if(lnk->cset < H5T_CSET_ASCII || lnk->cset > H5T_CSET_UTF8)
+ if (lnk->cset < H5T_CSET_ASCII || lnk->cset > H5T_CSET_UTF8)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad cset type")
} /* end if */
else
lnk->cset = H5T_CSET_ASCII;
/* Get the length of the link's name */
- switch(link_flags & H5O_LINK_NAME_SIZE) {
- case 0: /* 1 byte size */
+ switch (link_flags & H5O_LINK_NAME_SIZE) {
+ case 0: /* 1 byte size */
len = *p++;
break;
- case 1: /* 2 byte size */
+ case 1: /* 2 byte size */
UINT16DECODE(p, len);
break;
- case 2: /* 4 byte size */
+ case 2: /* 4 byte size */
UINT32DECODE(p, len);
break;
- case 3: /* 8 byte size */
+ case 3: /* 8 byte size */
UINT64DECODE(p, len);
break;
default:
HDassert(0 && "bad size for name");
} /* end switch */
- if(len == 0)
+ if (len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid name length")
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if (p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
/* Get the link's name */
- if(NULL == (lnk->name = (char *)H5MM_malloc(len + 1)))
+ if (NULL == (lnk->name = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(lnk->name, p, len);
lnk->name[len] = '\0';
p += len;
/* Get the appropriate information for each type of link */
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
/* Get the address of the object the link points to */
H5F_addr_decode(f, &p, &(lnk->u.hard.addr));
@@ -215,9 +218,15 @@ H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
case H5L_TYPE_SOFT:
/* Get the link value */
UINT16DECODE(p, len)
- if(len == 0)
+ if (len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length")
- if(NULL == (lnk->u.soft.name = (char *)H5MM_malloc((size_t)len + 1)))
+
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if (p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
+ if (NULL == (lnk->u.soft.name = (char *)H5MM_malloc((size_t)len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(lnk->u.soft.name, p, len);
lnk->u.soft.name[len] = '\0';
@@ -229,15 +238,19 @@ H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- if(lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX)
+ if (lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown link type")
/* A UD link. Get the user-supplied data */
UINT16DECODE(p, len)
lnk->u.ud.size = len;
- if(len > 0)
- {
- if(NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len)))
+ if (len > 0) {
+ /* Make sure that length doesn't exceed buffer size, which could
+ occur when the file is corrupted */
+ if (p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
+ if (NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(lnk->u.ud.udata, p, len);
p += len;
@@ -250,13 +263,13 @@ H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
ret_value = lnk;
done:
- if(ret_value == NULL)
- if(lnk != NULL) {
- if(lnk->name != NULL)
+ if (ret_value == NULL)
+ if (lnk != NULL) {
+ if (lnk->name != NULL)
H5MM_xfree(lnk->name);
- if(lnk->type == H5L_TYPE_SOFT && lnk->u.soft.name != NULL)
+ if (lnk->type == H5L_TYPE_SOFT && lnk->u.soft.name != NULL)
H5MM_xfree(lnk->u.soft.name);
- if(lnk->type >= H5L_TYPE_UD_MIN && lnk->u.ud.size > 0 && lnk->u.ud.udata != NULL)
+ if (lnk->type >= H5L_TYPE_UD_MIN && lnk->u.ud.size > 0 && lnk->u.ud.udata != NULL)
H5MM_xfree(lnk->u.ud.udata);
lnk = H5FL_FREE(H5O_link_t, lnk);
} /* end if */
@@ -264,7 +277,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_encode
*
@@ -273,7 +285,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
@@ -281,9 +292,9 @@ done:
static herr_t
H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
- uint64_t len; /* Length of a string in the message */
- unsigned char link_flags; /* Flags for encoding link info */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
+ uint64_t len; /* Length of a string in the message */
+ unsigned char link_flags; /* Flags for encoding link info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -300,46 +311,46 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
*p++ = H5O_LINK_VERSION;
/* The encoding flags for the link */
- if(len > 4294967295)
+ if (len > 4294967295)
link_flags = H5O_LINK_NAME_8;
- else if(len > 65535)
+ else if (len > 65535)
link_flags = H5O_LINK_NAME_4;
- else if(len > 255)
+ else if (len > 255)
link_flags = H5O_LINK_NAME_2;
else
link_flags = H5O_LINK_NAME_1;
link_flags = (unsigned char)(link_flags | (lnk->corder_valid ? H5O_LINK_STORE_CORDER : 0));
link_flags = (unsigned char)(link_flags | ((lnk->type != H5L_TYPE_HARD) ? H5O_LINK_STORE_LINK_TYPE : 0));
link_flags = (unsigned char)(link_flags | ((lnk->cset != H5T_CSET_ASCII) ? H5O_LINK_STORE_NAME_CSET : 0));
- *p++ = link_flags;
+ *p++ = link_flags;
/* Store the type of a non-default link */
- if(link_flags & H5O_LINK_STORE_LINK_TYPE)
- *p++ = lnk->type;
+ if (link_flags & H5O_LINK_STORE_LINK_TYPE)
+ *p++ = (uint8_t)lnk->type;
/* Store the link creation order in the file, if its valid */
- if(lnk->corder_valid)
+ if (lnk->corder_valid)
INT64ENCODE(p, lnk->corder)
/* Store a non-default link name character set */
- if(link_flags & H5O_LINK_STORE_NAME_CSET)
+ if (link_flags & H5O_LINK_STORE_NAME_CSET)
*p++ = (uint8_t)lnk->cset;
/* Store the link name's length */
- switch(link_flags & H5O_LINK_NAME_SIZE) {
- case 0: /* 1 byte size */
+ switch (link_flags & H5O_LINK_NAME_SIZE) {
+ case 0: /* 1 byte size */
*p++ = (uint8_t)len;
break;
- case 1: /* 2 byte size */
+ case 1: /* 2 byte size */
UINT16ENCODE(p, len);
break;
- case 2: /* 4 byte size */
+ case 2: /* 4 byte size */
UINT32ENCODE(p, len);
break;
- case 3: /* 8 byte size */
+ case 3: /* 8 byte size */
UINT64ENCODE(p, len);
break;
@@ -352,7 +363,7 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
p += len;
/* Store the appropriate information for each type of link */
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
/* Store the address of the object the link points to */
H5F_addr_encode(f, &p, lnk->u.hard.addr);
@@ -377,10 +388,9 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
/* Store the user-supplied data, however long it is */
len = (uint16_t)lnk->u.ud.size;
UINT16ENCODE(p, len)
- if(len > 0)
- {
+ if (len > 0) {
HDmemcpy(p, lnk->u.ud.udata, (size_t)len);
- p+=len;
+ p += len;
}
break;
} /* end switch */
@@ -388,7 +398,6 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_link_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_copy
*
@@ -400,7 +409,6 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
@@ -408,54 +416,53 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
static void *
H5O_link_copy(const void *_mesg, void *_dest)
{
- const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
- H5O_link_t *dest = (H5O_link_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
+ H5O_link_t * dest = (H5O_link_t *)_dest;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(lnk);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_link_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_link_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy static information */
*dest = *lnk;
/* Duplicate the link's name */
HDassert(lnk->name);
- if(NULL == (dest->name = H5MM_xstrdup(lnk->name)))
+ if (NULL == (dest->name = H5MM_xstrdup(lnk->name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate link name")
/* Copy other information needed for different link types */
- if(lnk->type == H5L_TYPE_SOFT) {
- if(NULL == (dest->u.soft.name = H5MM_xstrdup(lnk->u.soft.name)))
+ if (lnk->type == H5L_TYPE_SOFT) {
+ if (NULL == (dest->u.soft.name = H5MM_xstrdup(lnk->u.soft.name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate soft link value")
} /* end if */
- else if(lnk->type >= H5L_TYPE_UD_MIN) {
- if(lnk->u.ud.size > 0) {
- if(NULL == (dest->u.ud.udata = H5MM_malloc(lnk->u.ud.size)))
+ else if (lnk->type >= H5L_TYPE_UD_MIN) {
+ if (lnk->u.ud.size > 0) {
+ if (NULL == (dest->u.ud.udata = H5MM_malloc(lnk->u.ud.size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(dest->u.ud.udata, lnk->u.ud.udata, lnk->u.ud.size);
} /* end if */
- } /* end if */
+ } /* end if */
/* Set return value */
ret_value = dest;
done:
- if(NULL == ret_value)
- if(dest) {
- if(dest->name && dest->name != lnk->name)
+ if (NULL == ret_value)
+ if (dest) {
+ if (dest->name && dest->name != lnk->name)
dest->name = (char *)H5MM_xfree(dest->name);
- if(NULL == _dest)
- dest = H5FL_FREE(H5O_link_t ,dest);
+ if (NULL == _dest)
+ dest = H5FL_FREE(H5O_link_t, dest);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_size
*
@@ -468,7 +475,6 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
@@ -477,9 +483,9 @@ static size_t
H5O_link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
- uint64_t name_len; /* Length of name */
- size_t name_size; /* Size of encoded name length */
- size_t ret_value; /* Return value */
+ uint64_t name_len; /* Length of name */
+ size_t name_size; /* Size of encoded name length */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -490,33 +496,33 @@ H5O_link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
name_len = (uint64_t)HDstrlen(lnk->name);
/* Determine correct value for name size bits */
- if(name_len > 4294967295)
+ if (name_len > 4294967295)
name_size = 8;
- else if(name_len > 65535)
+ else if (name_len > 65535)
name_size = 4;
- else if(name_len > 255)
+ else if (name_len > 255)
name_size = 2;
else
name_size = 1;
/* Set return value */
- ret_value = 1 + /* Version */
- 1 + /* Link encoding flags */
+ ret_value = 1 + /* Version */
+ 1 + /* Link encoding flags */
(lnk->type != H5L_TYPE_HARD ? (size_t)1 : 0) + /* Link type */
- (lnk->corder_valid ? 8 : 0) + /* Creation order */
- (lnk->cset != H5T_CSET_ASCII ? 1 : 0) + /* Character set */
- name_size + /* Name length */
- name_len; /* Name */
+ (lnk->corder_valid ? 8 : 0) + /* Creation order */
+ (lnk->cset != H5T_CSET_ASCII ? 1 : 0) + /* Character set */
+ name_size + /* Name length */
+ name_len; /* Name */
/* Add the appropriate length for each type of link */
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
ret_value += H5F_SIZEOF_ADDR(f);
break;
case H5L_TYPE_SOFT:
- ret_value += 2 + /* Link value length */
- HDstrlen(lnk->u.soft.name); /* Link value */
+ ret_value += 2 + /* Link value length */
+ HDstrlen(lnk->u.soft.name); /* Link value */
break;
case H5L_TYPE_ERROR:
@@ -524,15 +530,14 @@ H5O_link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
case H5L_TYPE_MAX:
default: /* Default is user-defined link type */
HDassert(lnk->type >= H5L_TYPE_UD_MIN);
- ret_value += 2 + /* User-defined data size */
- lnk->u.ud.size; /* User-defined data */
+ ret_value += 2 + /* User-defined data size */
+ lnk->u.ud.size; /* User-defined data */
break;
} /* end switch */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_reset
*
@@ -553,12 +558,12 @@ H5O_link_reset(void *_mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(lnk) {
+ if (lnk) {
/* Free information for link (but don't free link pointer) */
- if(lnk->type == H5L_TYPE_SOFT)
+ if (lnk->type == H5L_TYPE_SOFT)
lnk->u.soft.name = (char *)H5MM_xfree(lnk->u.soft.name);
else if (lnk->type >= H5L_TYPE_UD_MIN) {
- if(lnk->u.ud.size > 0)
+ if (lnk->u.ud.size > 0)
lnk->u.ud.udata = H5MM_xfree(lnk->u.ud.udata);
} /* end if */
lnk->name = (char *)H5MM_xfree(lnk->name);
@@ -567,7 +572,6 @@ H5O_link_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_link_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_free
*
@@ -596,7 +600,6 @@ H5O_link_free(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_link_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_delete
*
@@ -612,8 +615,8 @@ H5O_link_free(void *_mesg)
herr_t
H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
{
- H5O_link_t *lnk = (H5O_link_t *)_mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_link_t *lnk = (H5O_link_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -623,7 +626,7 @@ H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_m
/* Check for adjusting the link count when the link is removed */
/* Adjust the reference count of the object when a hard link is removed */
- if(lnk->type == H5L_TYPE_HARD) {
+ if (lnk->type == H5L_TYPE_HARD) {
H5O_loc_t oloc;
/* Construct object location for object, in order to decrement it's ref count */
@@ -633,42 +636,41 @@ H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_m
oloc.addr = lnk->u.hard.addr;
/* Decrement the ref count for the object */
- if(H5O_link(&oloc, -1, dxpl_id) < 0)
+ if (H5O_link(&oloc, -1, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to decrement object link count")
} /* end if */
/* Perform the "delete" callback when a user-defined link is removed */
- else if(lnk->type >= H5L_TYPE_UD_MIN) {
- const H5L_class_t *link_class; /* User-defined link class */
+ else if (lnk->type >= H5L_TYPE_UD_MIN) {
+ const H5L_class_t *link_class; /* User-defined link class */
/* Get the link class for this type of link. */
- if(NULL == (link_class = H5L_find_class(lnk->type)))
+ if (NULL == (link_class = H5L_find_class(lnk->type)))
HGOTO_ERROR(H5E_OHDR, H5E_NOTREGISTERED, FAIL, "link class not registered")
/* Check for delete callback */
- if(link_class->del_func) {
- hid_t file_id; /* ID for the file the link is located in (passed to user callback) */
+ if (link_class->del_func) {
+ hid_t file_id; /* ID for the file the link is located in (passed to user callback) */
/* Get a file ID for the file the link is in */
- if((file_id = H5F_get_id(f, FALSE)) < 0)
+ if ((file_id = H5F_get_id(f, FALSE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get file ID")
/* Call user-defined link's 'delete' callback */
- if((link_class->del_func)(lnk->name, file_id, lnk->u.ud.udata, lnk->u.ud.size) < 0) {
+ if ((link_class->del_func)(lnk->name, file_id, lnk->u.ud.udata, lnk->u.ud.size) < 0) {
H5I_dec_ref(file_id);
HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "link deletion callback returned failure")
} /* end if */
/* Release the file ID */
- if(H5I_dec_ref(file_id) < 0)
+ if (H5I_dec_ref(file_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "can't close file")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_pre_copy_file
*
@@ -686,7 +688,7 @@ done:
*/
static herr_t
H5O_link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
+ hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -699,13 +701,12 @@ H5O_link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED
* in the destination object header before performing any other actions
* on it.
*/
- if(cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
+ if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_link_pre_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_copy_file
*
@@ -722,11 +723,12 @@ H5O_link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED
*/
static void *
H5O_link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_ATTR_UNUSED *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata, hid_t H5_ATTR_UNUSED dxpl_id)
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
- H5O_link_t *link_src = (H5O_link_t *)native_src;
- void *ret_value; /* Return value */
+ H5O_link_t *link_src = (H5O_link_t *)native_src;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -736,19 +738,18 @@ H5O_link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_AT
HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Sanity check source link type */
- if(link_src->type > H5L_TYPE_SOFT && link_src->type < H5L_TYPE_UD_MIN)
+ if (link_src->type > H5L_TYPE_SOFT && link_src->type < H5L_TYPE_UD_MIN)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "unrecognized built-in link type")
/* Allocate "blank" link for destination */
/* (values will be filled in during 'post copy' operation) */
- if(NULL == (ret_value = H5FL_CALLOC(H5O_link_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (ret_value = H5FL_CALLOC(H5O_link_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_link_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_post_copy_file
*
@@ -762,13 +763,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
- H5O_loc_t *dst_oloc, void *mesg_dst, unsigned H5_ATTR_UNUSED *mesg_flags,
- hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
+ unsigned H5_ATTR_UNUSED *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- const H5O_link_t *link_src = (const H5O_link_t *)mesg_src;
- H5O_link_t *link_dst = (H5O_link_t *)mesg_dst;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_link_t *link_src = (const H5O_link_t *)mesg_src;
+ H5O_link_t * link_dst = (H5O_link_t *)mesg_dst;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -782,15 +782,13 @@ H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Copy the link (and the object it points to) */
- if(H5L_link_copy_file(dst_oloc->file, dxpl_id, link_src, src_oloc, link_dst,
- cpy_info) < 0)
+ if (H5L_link_copy_file(dst_oloc->file, dxpl_id, link_src, src_oloc, link_dst, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy link")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_link_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_link_debug
*
@@ -799,17 +797,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -820,52 +817,50 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Link Type:", (lnk->type == H5L_TYPE_HARD ? "Hard" :
- (lnk->type == H5L_TYPE_SOFT ? "Soft" :
- (lnk->type == H5L_TYPE_EXTERNAL ? "External" :
- (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:",
+ (lnk->type == H5L_TYPE_HARD
+ ? "Hard"
+ : (lnk->type == H5L_TYPE_SOFT
+ ? "Soft"
+ : (lnk->type == H5L_TYPE_EXTERNAL
+ ? "External"
+ : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
- if(lnk->corder_valid)
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Creation Order:", lnk->corder);
+ if (lnk->corder_valid)
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Creation Order:", lnk->corder);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Link Name Character Set:", (lnk->cset == H5T_CSET_ASCII ?
- "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Link Name:", lnk->name);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:",
+ (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name:", lnk->name);
/* Display link-specific information */
- switch(lnk->type) {
+ switch (lnk->type) {
case H5L_TYPE_HARD:
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Object address:", lnk->u.hard.addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object address:", lnk->u.hard.addr);
break;
case H5L_TYPE_SOFT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Link Value:", lnk->u.soft.name);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name);
break;
case H5L_TYPE_ERROR:
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
default:
- if(lnk->type >= H5L_TYPE_UD_MIN) {
- if(lnk->type == H5L_TYPE_EXTERNAL) {
- const char *objname = (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
+ if (lnk->type >= H5L_TYPE_UD_MIN) {
+ if (lnk->type == H5L_TYPE_EXTERNAL) {
+ const char *objname =
+ (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"External File Name:", lnk->u.ud.udata);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "External Object Name:", objname);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname);
} /* end if */
else {
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"User-Defined Link Size:", lnk->u.ud.size);
} /* end else */
- } /* end if */
+ } /* end if */
else
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type")
break;
@@ -874,4 +869,3 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_link_debug() */
-
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index a2e4e88..2482985 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,75 +26,65 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Aprivate.h" /* Attributes */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared object header messages */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Aprivate.h" /* Attributes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* User data for iteration while removing a message */
typedef struct {
- H5F_t *f; /* Pointer to file for insertion */
- hid_t dxpl_id; /* DXPL during iteration */
- int sequence; /* Sequence # to search for */
- unsigned nfailed; /* # of failed message removals */
- H5O_operator_t op; /* Callback routine for removal operations */
- void *op_data; /* Callback data for removal operations */
- hbool_t adj_link; /* Whether to adjust links when removing messages */
+ H5F_t * f; /* Pointer to file for insertion */
+ hid_t dxpl_id; /* DXPL during iteration */
+ int sequence; /* Sequence # to search for */
+ unsigned nfailed; /* # of failed message removals */
+ H5O_operator_t op; /* Callback routine for removal operations */
+ void * op_data; /* Callback data for removal operations */
+ hbool_t adj_link; /* Whether to adjust links when removing messages */
} H5O_iter_rm_t;
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
static herr_t H5O_msg_reset_real(const H5O_msg_class_t *type, void *native);
-static herr_t H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, unsigned *oh_modified, void *_udata/*in,out*/);
-static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
- const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
- unsigned update_flags);
-
+static herr_t H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned *oh_modified, void *_udata /*in,out*/);
+static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx, const H5O_msg_class_t *type,
+ const void *mesg, unsigned mesg_flags, unsigned update_flags);
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_create
*
@@ -105,17 +95,16 @@ static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 1 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
- unsigned update_flags, void *mesg, hid_t dxpl_id)
+H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsigned update_flags, void *mesg,
+ hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t *oh = NULL; /* Object header */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -126,21 +115,20 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
HDassert(mesg);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Go append message to object header */
- if(H5O_msg_append_oh(loc->file, dxpl_id, oh, type_id, mesg_flags, update_flags, mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to append to object header")
+ if (H5O_msg_append_oh(loc->file, dxpl_id, oh, type_id, mesg_flags, update_flags, mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to append to object header")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_create() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_append_oh
*
@@ -153,39 +141,37 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
- unsigned mesg_flags, unsigned update_flags, void *mesg)
+H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, unsigned mesg_flags,
+ unsigned update_flags, void *mesg)
{
- const H5O_msg_class_t *type; /* Original H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Original H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
HDassert(mesg);
/* Append new message to object header */
- if(H5O_msg_append_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
+ if (H5O_msg_append_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new message in header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_append_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_append_real
*
@@ -196,17 +182,16 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
- unsigned mesg_flags, unsigned update_flags, void *mesg)
+H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, unsigned mesg_flags,
+ unsigned update_flags, void *mesg)
{
- size_t idx; /* Index of message to modify */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t idx; /* Index of message to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -218,28 +203,27 @@ H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *t
HDassert(mesg);
/* Allocate space for a new message */
- if(H5O_msg_alloc(f, dxpl_id, oh, type, &mesg_flags, mesg, &idx) < 0)
+ if (H5O_msg_alloc(f, dxpl_id, oh, type, &mesg_flags, mesg, &idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create new message")
/* Copy the information for the message */
- if(H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
+ if (H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to write message")
#ifdef H5O_DEBUG
-H5O_assert(oh);
+ H5O_assert(oh);
#endif /* H5O_DEBUG */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_append_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_write
*
* Purpose: Modifies an existing message or creates a new message.
*
* The UPDATE_FLAGS argument are flags that allow the caller
- * to skip updating the modification time or reseting the message
+ * to skip updating the modification time or resetting the message
* data. This is useful when several calls to H5O_msg_write will be
* made in a sequence.
*
@@ -248,18 +232,17 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
- unsigned update_flags, void *mesg, hid_t dxpl_id)
+H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsigned update_flags, void *mesg,
+ hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to use */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header to use */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -267,36 +250,35 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
HDassert(loc);
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(mesg);
HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Call the "real" modify routine */
- if(H5O_msg_write_real(loc->file, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
+ if (H5O_msg_write_real(loc->file, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_write() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_write_oh
*
* Purpose: Modifies an existing message or creates a new message.
*
* The UPDATE_FLAGS argument are flags that allow the caller
- * to skip updating the modification time or reseting the message
+ * to skip updating the modification time or resetting the message
* data. This is useful when several calls to H5O_msg_write will be
* made in a sequence.
*
@@ -304,46 +286,44 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 6 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
- unsigned mesg_flags, unsigned update_flags, void *mesg)
+H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, unsigned mesg_flags,
+ unsigned update_flags, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(mesg);
HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Call the "real" modify routine */
- if(H5O_msg_write_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
+ if (H5O_msg_write_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_write_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_write_real
*
* Purpose: Modifies an existing message or creates a new message.
*
* The UPDATE_FLAGS argument are flags that allow the caller
- * to skip updating the modification time or reseting the message
+ * to skip updating the modification time or resetting the message
* data. This is useful when several calls to H5O_msg_write will be
* made in a sequence.
*
@@ -352,18 +332,17 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
- unsigned mesg_flags, unsigned update_flags, void *mesg)
+H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, unsigned mesg_flags,
+ unsigned update_flags, void *mesg)
{
- H5O_mesg_t *idx_msg; /* Pointer to message to modify */
- size_t idx; /* Index of message to modify */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_mesg_t *idx_msg; /* Pointer to message to modify */
+ size_t idx; /* Index of message to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -376,22 +355,22 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Locate message of correct type */
- for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(type == idx_msg->type)
+ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
+ if (type == idx_msg->type)
break;
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found")
/* Check for modifying a constant message */
- if(!(update_flags & H5O_UPDATE_FORCE) && (idx_msg->flags & H5O_MSG_FLAG_CONSTANT))
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to modify constant message")
+ if (!(update_flags & H5O_UPDATE_FORCE) && (idx_msg->flags & H5O_MSG_FLAG_CONSTANT))
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to modify constant message")
/* This message is shared, but it's being modified. */
- else if((idx_msg->flags & H5O_MSG_FLAG_SHARED) || (idx_msg->flags & H5O_MSG_FLAG_SHAREABLE)) {
- htri_t status; /* Status of "try share" call */
+ else if ((idx_msg->flags & H5O_MSG_FLAG_SHARED) || (idx_msg->flags & H5O_MSG_FLAG_SHAREABLE)) {
+ htri_t status; /* Status of "try share" call */
- /* First, sanity check to make sure it's not a committed message;
- * these can't ever be modified.
- */
+ /* First, sanity check to make sure it's not a committed message;
+ * these can't ever be modified.
+ */
HDassert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
/* Also, sanity check that a message doesn't switch status from being
@@ -407,7 +386,7 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
* the location of the object changes (from in another object's
* header to the SOHM heap), so just delete it first -QAK)
*/
- if(H5SM_delete(f, dxpl_id, oh, (H5O_shared_t *)idx_msg->native) < 0)
+ if (H5SM_delete(f, dxpl_id, oh, (H5O_shared_t *)idx_msg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete message from SOHM index")
/* If we're replacing a shared message, the new message must be shared
@@ -417,24 +396,24 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
* XXX: This doesn't handle freeing extra space in object header from
* a message shrinking.
*/
- if((status = H5SM_try_share(f, dxpl_id, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), 0, idx_msg->type->id, mesg, &mesg_flags)) < 0)
+ if ((status = H5SM_try_share(f, dxpl_id, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), 0,
+ idx_msg->type->id, mesg, &mesg_flags)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
- if(status == FALSE && (mesg_flags & H5O_MSG_FLAG_SHARED))
+ if (status == FALSE && (mesg_flags & H5O_MSG_FLAG_SHARED))
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status")
} /* end if */
/* Copy the information for the message */
- if(H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
+ if (H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to write message")
#ifdef H5O_DEBUG
-H5O_assert(oh);
+ H5O_assert(oh);
#endif /* H5O_DEBUG */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_write_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_read
*
@@ -453,17 +432,15 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
void *
-H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg,
- hid_t dxpl_id)
+H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to use */
- void *ret_value; /* Return value */
+ H5O_t *oh = NULL; /* Object header to use */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -474,21 +451,20 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg,
HDassert(type_id < NELMTS(H5O_msg_class_g));
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header")
/* Call the "real" read routine */
- if(NULL == (ret_value = H5O_msg_read_oh(loc->file, dxpl_id, oh, type_id, mesg)))
- HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header message")
+ if (NULL == (ret_value = H5O_msg_read_oh(loc->file, dxpl_id, oh, type_id, mesg)))
+ HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header message")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_read() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_read_oh
*
@@ -507,18 +483,16 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
void *
-H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
- void *mesg)
+H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- unsigned idx; /* Message's index in object header */
- void *ret_value = NULL;
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ unsigned idx; /* Message's index in object header */
+ void * ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
@@ -526,14 +500,14 @@ H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
HDassert(f);
HDassert(oh);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Scan through the messages looking for the right one */
- for(idx = 0; idx < oh->nmesgs; idx++)
- if(type == oh->mesg[idx].type)
+ for (idx = 0; idx < oh->nmesgs; idx++)
+ if (type == oh->mesg[idx].type)
break;
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "message type not found")
/*
@@ -547,14 +521,13 @@ H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
* the raw message) so we must copy the native message before
* returning.
*/
- if(NULL == (ret_value = (type->copy)(oh->mesg[idx].native, mesg)))
+ if (NULL == (ret_value = (type->copy)(oh->mesg[idx].native, mesg)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy message to user space")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_read_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_reset
*
@@ -565,7 +538,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -573,25 +545,24 @@ done:
herr_t
H5O_msg_reset(unsigned type_id, void *native)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Call the "real" reset routine */
- if(H5O_msg_reset_real(type, native) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "unable to reset object header")
+ if (H5O_msg_reset_real(type, native) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "unable to reset object header")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_reset_real
*
@@ -602,7 +573,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -610,27 +580,26 @@ done:
static herr_t
H5O_msg_reset_real(const H5O_msg_class_t *type, void *native)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(type);
- if(native) {
- if(type->reset) {
- if((type->reset)(native) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed")
- } /* end if */
+ if (native) {
+ if (type->reset) {
+ if ((type->reset)(native) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed")
+ } /* end if */
else
- HDmemset(native, 0, type->native_size);
+ HDmemset(native, 0, type->native_size);
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_reset_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_free
*
@@ -649,14 +618,14 @@ done:
void *
H5O_msg_free(unsigned type_id, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- void * ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Call the "real" free routine */
@@ -665,7 +634,6 @@ H5O_msg_free(unsigned type_id, void *mesg)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_free_mesg
*
@@ -692,7 +660,6 @@ H5O_msg_free_mesg(H5O_mesg_t *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_msg_free_mesg() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_free_real
*
@@ -700,7 +667,6 @@ H5O_msg_free_mesg(H5O_mesg_t *mesg)
* pointer.
*
* Return: Success: NULL
- *
* Failure: NULL
*
* Programmer: Robb Matzke
@@ -716,9 +682,9 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
/* check args */
HDassert(type);
- if(msg_native) {
+ if (msg_native) {
H5O_msg_reset_real(type, msg_native);
- if(NULL != (type->free))
+ if (NULL != (type->free))
(type->free)(msg_native);
else
H5MM_xfree(msg_native);
@@ -727,7 +693,6 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
FUNC_LEAVE_NOAPI(NULL)
} /* end H5O_msg_free_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_copy
*
@@ -746,26 +711,25 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
void *
H5O_msg_copy(unsigned type_id, const void *mesg, void *dst)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- void *ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(mesg);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Call the message class's copy routine */
- if(NULL == (ret_value = (type->copy)(mesg, dst)))
+ if (NULL == (ret_value = (type->copy)(mesg, dst)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy object header message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_count
*
@@ -784,10 +748,10 @@ done:
int
H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to operate on */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- unsigned msg_count; /* Message count */
- int ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header to operate on */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ unsigned msg_count; /* Message count */
+ int ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -796,25 +760,24 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Load the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Count the messages of the correct type */
msg_count = H5O_msg_count_real(oh, type);
H5_CHECKED_ASSIGN(ret_value, int, msg_count, unsigned);
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_count() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_count_real
*
@@ -833,8 +796,8 @@ done:
unsigned
H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
{
- unsigned u; /* Local index variable */
- unsigned ret_value; /* Return value */
+ unsigned u; /* Local index variable */
+ unsigned ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -843,14 +806,13 @@ H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
HDassert(type);
/* Loop over all messages, counting the ones of the type looked for */
- for(u = ret_value = 0; u < oh->nmesgs; u++)
- if(oh->mesg[u].type == type)
+ for (u = ret_value = 0; u < oh->nmesgs; u++)
+ if (oh->mesg[u].type == type)
ret_value++;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_count_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_exists
*
@@ -872,8 +834,8 @@ H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
htri_t
H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header for location */
- htri_t ret_value; /* Return value */
+ H5O_t *oh = NULL; /* Object header for location */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -882,21 +844,20 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
HDassert(type_id < NELMTS(H5O_msg_class_g));
/* Load the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Call the "real" exists routine */
- if((ret_value = H5O_msg_exists_oh(oh, type_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_READERROR, FAIL, "unable to verify object header message")
+ if ((ret_value = H5O_msg_exists_oh(oh, type_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_READERROR, FAIL, "unable to verify object header message")
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_exists() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_exists_oh
*
@@ -918,27 +879,26 @@ done:
htri_t
H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- unsigned u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ unsigned u; /* Local index variable */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Scan through the messages looking for the right one */
- for(u = 0; u < oh->nmesgs; u++)
- if(type == oh->mesg[u].type)
+ for (u = 0; u < oh->nmesgs; u++)
+ if (type == oh->mesg[u].type)
HGOTO_DONE(TRUE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_exists_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_remove
*
@@ -954,18 +914,16 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 28 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link,
- hid_t dxpl_id)
+H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -973,27 +931,26 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
HDassert(loc);
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Call the "real" remove routine */
- if((ret_value = H5O_msg_remove_real(loc->file, oh, type, sequence, NULL, NULL, adj_link, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message")
+ if ((ret_value = H5O_msg_remove_real(loc->file, oh, type, sequence, NULL, NULL, adj_link, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_remove() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_remove_op
*
@@ -1006,18 +963,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence,
- H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id)
+H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_operator_t op, void *op_data,
+ hbool_t adj_link, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1025,27 +981,26 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence,
HDassert(loc);
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Pin the object header */
- if(NULL == (oh = H5O_pin(loc, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
+ if (NULL == (oh = H5O_pin(loc, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header")
/* Call the "real" remove routine */
- if((ret_value = H5O_msg_remove_real(loc->file, oh, type, sequence, op, op_data, adj_link, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message")
+ if ((ret_value = H5O_msg_remove_real(loc->file, oh, type, sequence, op, op_data, adj_link, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message")
done:
- if(oh && H5O_unpin(oh) < 0)
+ if (oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_remove_op() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_remove_cb
*
@@ -1056,22 +1011,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
- * Modifications:
- * Vailin Choi; Sept 2011
- * Indicate that the object header is modified and might possibly need
- * to condense messages in the object header
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- unsigned *oh_modified, void *_udata/*in,out*/)
+H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, unsigned *oh_modified,
+ void *_udata /*in,out*/)
{
- H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
- htri_t try_remove = FALSE; /* Whether to try removing a message */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
+ htri_t try_remove = FALSE; /* Whether to try removing a message */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1079,33 +1029,34 @@ H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
HDassert(mesg);
/* Check for callback routine */
- if(udata->op) {
+ if (udata->op) {
/* Call the iterator callback */
- if((try_remove = (udata->op)(mesg->native, sequence, udata->op_data)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "object header message deletion callback failed")
+ if ((try_remove = (udata->op)(mesg->native, sequence, udata->op_data)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR,
+ "object header message deletion callback failed")
} /* end if */
else {
/* If there's no callback routine, does the sequence # match? */
- if((int)sequence == udata->sequence || H5O_ALL == udata->sequence)
+ if ((int)sequence == udata->sequence || H5O_ALL == udata->sequence)
try_remove = TRUE;
} /* end else */
/* Try removing the message, if indicated */
- if(try_remove) {
+ if (try_remove) {
/*
* Keep track of how many times we failed trying to remove constant
* messages.
* (OK to remove constant messages - QAK)
*/
/* Convert message into a null message */
- if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, udata->adj_link) < 0)
+ if (H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, udata->adj_link) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release message")
/* Indicate that the object header was modified & might need to condense messages in object header */
*oh_modified = H5O_MODIFY_CONDENSE;
/* Break out now, if we've found the correct message */
- if(udata->sequence == H5O_FIRST || udata->sequence != H5O_ALL)
+ if (udata->sequence == H5O_FIRST || udata->sequence != H5O_ALL)
HGOTO_DONE(H5_ITER_STOP)
} /* end if */
@@ -1113,7 +1064,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_remove_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_remove_real
*
@@ -1126,19 +1076,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 28 1997
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
- int sequence, H5O_operator_t app_op, void *op_data, hbool_t adj_link,
- hid_t dxpl_id)
+H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence, H5O_operator_t app_op,
+ void *op_data, hbool_t adj_link, hid_t dxpl_id)
{
- H5O_iter_rm_t udata; /* User data for iterator */
- H5O_mesg_operator_t op; /* Wrapper for operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_iter_rm_t udata; /* User data for iterator */
+ H5O_mesg_operator_t op; /* Wrapper for operator */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1148,33 +1096,32 @@ H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
HDassert(type);
/* Make certain we are allowed to modify the file */
- if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file")
+ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Set up iterator operator data */
- udata.f = f;
- udata.dxpl_id = dxpl_id;
+ udata.f = f;
+ udata.dxpl_id = dxpl_id;
udata.sequence = sequence;
- udata.nfailed = 0;
- udata.op = app_op;
- udata.op_data = op_data;
+ udata.nfailed = 0;
+ udata.op = app_op;
+ udata.op_data = op_data;
udata.adj_link = adj_link;
/* Iterate over the messages, deleting appropriate one(s) */
- op.op_type = H5O_MESG_OP_LIB;
+ op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O_msg_remove_cb;
- if(H5O_msg_iterate_real(f, oh, type, &op, &udata, dxpl_id) < 0)
+ if (H5O_msg_iterate_real(f, oh, type, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error iterating over messages")
/* Fail if we tried to remove any constant messages */
- if(udata.nfailed)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to remove constant message(s)")
+ if (udata.nfailed)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to remove constant message(s)")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_remove_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_iterate
*
@@ -1185,7 +1132,6 @@ done:
* object headers were processed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 19 2004
*
* Description:
@@ -1207,12 +1153,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id,
- const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id)
+H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_t *op, void *op_data,
+ hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1221,26 +1167,25 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id,
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(op);
/* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Call the "real" iterate routine */
- if((ret_value = H5O_msg_iterate_real(loc->file, oh, type, op, op_data, dxpl_id)) < 0)
+ if ((ret_value = H5O_msg_iterate_real(loc->file, oh, type, op, op_data, dxpl_id)) < 0)
HERROR(H5E_OHDR, H5E_BADITER, "unable to iterate over object header messages");
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_iterate() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_iterate_real
*
@@ -1251,7 +1196,6 @@ done:
* object headers were processed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
* Description:
@@ -1270,23 +1214,17 @@ done:
* C. Negative causes the iterator to immediately return that value,
* indicating failure.
*
- * Modifications:
- * Vailin Choi; September 2011
- * Change "oh_modified" from boolean to unsigned so as to know:
- * 1) object header is just modified
- * 2) object header is modified and possibly need to condense messages there
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
- const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id)
+H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5O_mesg_operator_t *op,
+ void *op_data, hid_t dxpl_id)
{
- H5O_mesg_t *idx_msg; /* Pointer to current message */
- unsigned idx; /* Absolute index of current message in all messages */
- unsigned sequence; /* Relative index of current message for messages of type */
- unsigned oh_modified = 0; /* Whether the callback modified the object header */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_mesg_t *idx_msg; /* Pointer to current message */
+ unsigned idx; /* Absolute index of current message in all messages */
+ unsigned sequence; /* Relative index of current message for messages of type */
+ unsigned oh_modified = 0; /* Whether the callback modified the object header */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1298,56 +1236,55 @@ H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
HDassert(op->u.app_op);
/* Iterate over messages */
- for(sequence = 0, idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs && !ret_value; idx++, idx_msg++) {
- if(type == idx_msg->type) {
+ for (sequence = 0, idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs && !ret_value; idx++, idx_msg++) {
+ if (type == idx_msg->type) {
/* Decode the message if necessary. */
H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, idx_msg, FAIL)
/* Check for making an "internal" (i.e. within the H5O package) callback */
- if(op->op_type == H5O_MESG_OP_LIB)
+ if (op->op_type == H5O_MESG_OP_LIB)
ret_value = (op->u.lib_op)(oh, idx_msg, sequence, &oh_modified, op_data);
else
ret_value = (op->u.app_op)(idx_msg->native, sequence, op_data);
/* Check for iterator callback indicating to get out of loop */
- if(ret_value != 0)
+ if (ret_value != 0)
break;
/* Increment sequence value for message type */
sequence++;
} /* end if */
- } /* end for */
+ } /* end for */
/* Check for error from iterator */
- if(ret_value < 0)
+ if (ret_value < 0)
HERROR(H5E_OHDR, H5E_CANTLIST, "iterator function failed");
done:
/* Check if object message was modified */
- if(oh_modified) {
+ if (oh_modified) {
/* Try to condense object header info if the flag indicates so */
/* (Since this routine is used to remove messages from an
* object header, the header will be condensed after each
* message removal)
*/
- if(oh_modified & H5O_MODIFY_CONDENSE) {
- if(H5O_condense_header(f, oh, dxpl_id) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
- }
+ if (oh_modified & H5O_MODIFY_CONDENSE) {
+ if (H5O_condense_header(f, oh, dxpl_id) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
+ }
/* Mark object header as changed */
- if(H5O_touch_oh(f, dxpl_id, oh, FALSE) < 0)
+ if (H5O_touch_oh(f, dxpl_id, oh, FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_entry_dirty(oh) < 0)
+ if (H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_iterate_real() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_raw_size
*
@@ -1357,37 +1294,34 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 13 2003
*
*-------------------------------------------------------------------------
*/
size_t
-H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared,
- const void *mesg)
+H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- size_t ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->raw_size);
HDassert(f);
HDassert(mesg);
/* Compute the raw data size for the mesg */
- if(0 == (ret_value = (type->raw_size)(f, disable_shared, mesg)))
+ if (0 == (ret_value = (type->raw_size)(f, disable_shared, mesg)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_raw_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_size_f
*
@@ -1400,41 +1334,38 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
*/
size_t
-H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id,
- const void *mesg, size_t extra_raw)
+H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg, size_t extra_raw)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- H5P_genplist_t *ocpl; /* Object Creation Property list */
- uint8_t oh_flags; /* Object header status flags */
- size_t ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ H5P_genplist_t * ocpl; /* Object Creation Property list */
+ uint8_t oh_flags; /* Object header status flags */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->raw_size);
HDassert(f);
HDassert(mesg);
/* Get the property list */
- if(NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id)))
+ if (NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, 0, "not a property list")
/* Get any object header status flags set by properties */
- if(H5P_get(ocpl, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0)
+ if (H5P_get(ocpl, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get object header flags")
-
/* Compute the raw data size for the mesg */
- if((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
+ if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message")
/* Add in "extra" raw space */
@@ -1444,14 +1375,13 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id,
ret_value = (size_t)H5O_ALIGN_F(f, ret_value);
/* Add space for message header */
- ret_value += (size_t)H5O_SIZEOF_MSGHDR_F(f,
- (H5F_STORE_MSG_CRT_IDX(f) || oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED));
+ ret_value += (size_t)H5O_SIZEOF_MSGHDR_F(
+ f, (H5F_STORE_MSG_CRT_IDX(f) || oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_size_f() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_size_oh
*
@@ -1464,30 +1394,28 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 7 2007
*
*-------------------------------------------------------------------------
*/
size_t
-H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id,
- const void *mesg, size_t extra_raw)
+H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *mesg, size_t extra_raw)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- size_t ret_value; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->raw_size);
HDassert(f);
HDassert(mesg);
/* Compute the raw data size for the mesg */
- if((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
+ if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message")
/* Add in "extra" raw space */
@@ -1503,7 +1431,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_size_oh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_can_share
*
@@ -1524,19 +1451,19 @@ done:
htri_t
H5O_msg_can_share(unsigned type_id, const void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- htri_t ret_value;
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ htri_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(mesg);
/* If there is a can_share callback, use it */
- if(type->can_share)
+ if (type->can_share)
ret_value = (type->can_share)(mesg);
else {
/* Otherwise, the message can be shared if messages of this type are
@@ -1553,7 +1480,6 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_can_share_in_ohdr
*
@@ -1571,14 +1497,14 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
htri_t
H5O_msg_can_share_in_ohdr(unsigned type_id)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- htri_t ret_value;
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ htri_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Otherwise, the message can be shared if messages of this type are
@@ -1590,7 +1516,6 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share_in_ohdr() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_is_shared
*
@@ -1601,7 +1526,6 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
* Object is not shared: FALSE
*
* Programmer: James Laird
- * jlaird@ncsa.uiuc.edu
* April 5 2006
*
*-------------------------------------------------------------------------
@@ -1609,27 +1533,33 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
htri_t
H5O_msg_is_shared(unsigned type_id, const void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- htri_t ret_value;
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ htri_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
-
- /* If messages in a class aren't sharable, then obviously this message isn't shared! :-) */
- if(type->share_flags & H5O_SHARE_IS_SHARABLE)
- ret_value = H5O_IS_STORED_SHARED(((const H5O_shared_t *)mesg)->type);
- else
+#ifdef H5O_ENABLE_BOGUS
+ if (type_id >= NELMTS(H5O_msg_class_g))
ret_value = FALSE;
+ else
+#endif /* H5O_ENABLE_BOGUS */
+ {
+ HDassert(type_id < NELMTS(H5O_msg_class_g));
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ HDassert(type);
+ HDassert(mesg);
+
+ /* If messages in a class aren't sharable, then obviously this message isn't shared! :-) */
+ if (type->share_flags & H5O_SHARE_IS_SHARABLE)
+ ret_value = H5O_IS_STORED_SHARED(((const H5O_shared_t *)mesg)->type);
+ else
+ ret_value = FALSE;
+ } /* end block/else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_is_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_set_share
*
@@ -1639,7 +1569,6 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
* Failure: Negative
*
* Programmer: James Laird
- * jlaird@hdfgroup.org
* November 1 2006
*
*-------------------------------------------------------------------------
@@ -1647,14 +1576,14 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
herr_t
H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
HDassert(mesg);
@@ -1664,15 +1593,15 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
/* If there's a special action for this class that needs to be performed
* when setting the shared component, do that
*/
- if(type->set_share) {
- if((type->set_share)(mesg, share) < 0)
+ if (type->set_share) {
+ if ((type->set_share)(mesg, share) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information")
} /* end if */
else {
/* Set this message as the shared component for the message, wiping out
* any information that was there before
*/
- if(H5O_set_shared((H5O_shared_t *)mesg, share) < 0)
+ if (H5O_set_shared((H5O_shared_t *)mesg, share) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information")
} /* end else */
@@ -1680,7 +1609,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_set_share() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_reset_share
*
@@ -1690,7 +1618,6 @@ done:
* Failure: Negative
*
* Programmer: James Laird
- * jlaird@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -1698,13 +1625,13 @@ done:
herr_t
H5O_msg_reset_share(unsigned type_id, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
HDassert(mesg);
@@ -1715,7 +1642,6 @@ H5O_msg_reset_share(unsigned type_id, void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_msg_reset_share() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_get_crt_index
*
@@ -1732,22 +1658,22 @@ H5O_msg_reset_share(unsigned type_id, void *mesg)
herr_t
H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt_idx)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED;
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
HDassert(mesg);
HDassert(crt_idx);
/* If there is a "get_crt_index callback, use it */
- if(type->get_crt_index) {
+ if (type->get_crt_index) {
/* Retrieve the creation index from the native message */
- if((type->get_crt_index)(mesg, crt_idx) < 0)
+ if ((type->get_crt_index)(mesg, crt_idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index")
} /* end if */
else
@@ -1757,11 +1683,10 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_get_crt_index() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_encode
*
- * Purpose: Encode an object(data type and simple data space only)
+ * Purpose: Encode an object(data type and simple dataspace only)
* description into a buffer.
*
* Return: Success: Non-negative
@@ -1769,35 +1694,32 @@ done:
* Failure: Negative
*
* Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
* July 13, 2004
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared,
- unsigned char *buf, const void *mesg)
+H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf, const void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Encode */
- if((type->encode)(f, disable_shared, buf, mesg) < 0)
+ if ((type->encode)(f, disable_shared, buf, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_decode
*
@@ -1809,41 +1731,34 @@ done:
* Failure: NULL
*
* Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
* July 14, 2004
*
- * Modifications: Neil Fortner
- * Feb 4 2009
- * Added open_oh parameter. This parameter is optional and
- * contains this message's protected object header
- *
*-------------------------------------------------------------------------
*/
void *
-H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
- size_t buf_size, const unsigned char *buf)
+H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, size_t buf_size,
+ const unsigned char *buf)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- void *ret_value; /* Return value */
- unsigned ioflags = 0; /* Flags for decode routine */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ unsigned ioflags = 0; /* Flags for decode routine */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(f);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* decode */
- if((ret_value = (type->decode)(f, dxpl_id, open_oh, 0, &ioflags, buf_size, buf)) == NULL)
+ if ((ret_value = (type->decode)(f, dxpl_id, open_oh, 0, &ioflags, buf_size, buf)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_copy_file
*
@@ -1863,11 +1778,11 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src,
- void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
- unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id)
+H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_src, H5F_t *file_dst,
+ hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata,
+ hid_t dxpl_id)
{
- void *ret_value;
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1883,14 +1798,14 @@ H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src,
/* The copy_file callback will return an H5O_shared_t only if the message
* to be copied is a committed datatype.
*/
- if(NULL == (ret_value = (type->copy_file)(file_src, native_src, file_dst, recompute_size, mesg_flags, cpy_info, udata, dxpl_id)))
+ if (NULL == (ret_value = (type->copy_file)(file_src, native_src, file_dst, recompute_size, mesg_flags,
+ cpy_info, udata, dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy object header message to file")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_alloc
*
@@ -1905,8 +1820,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
- unsigned *mesg_flags, void *native, size_t *mesg_idx)
+H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_flags,
+ void *native, size_t *mesg_idx)
{
size_t new_idx; /* New index for message */
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
@@ -1924,28 +1839,28 @@ H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
HDassert(mesg_idx);
/* Check if message is already shared */
- if((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0)
+ if ((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "error determining if message is shared")
- else if(shared_mesg > 0) {
+ else if (shared_mesg > 0) {
/* Increment message's reference count */
- if(type->link && (type->link)(f, dxpl_id, oh, native) < 0)
+ if (type->link && (type->link)(f, dxpl_id, oh, native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared message ref count")
*mesg_flags |= H5O_MSG_FLAG_SHARED;
} /* end if */
else {
/* Attempt to share message */
- if(H5SM_try_share(f, dxpl_id, oh, 0, type->id, native, mesg_flags) < 0)
+ if (H5SM_try_share(f, dxpl_id, oh, 0, type->id, native, mesg_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
} /* end else */
/* Allocate space in the object header for the message */
- if(H5O_alloc(f, dxpl_id, oh, type, native, &new_idx) < 0)
+ if (H5O_alloc(f, dxpl_id, oh, type, native, &new_idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for message")
/* Get the message's "creation index", if it has one */
- if(type->get_crt_index) {
+ if (type->get_crt_index) {
/* Retrieve the creation index from the native message */
- if((type->get_crt_index)(native, &oh->mesg[new_idx].crt_idx) < 0)
+ if ((type->get_crt_index)(native, &oh->mesg[new_idx].crt_idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index")
} /* end if */
@@ -1956,7 +1871,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_alloc() */
-
/*-------------------------------------------------------------------------
* Function: H5O_copy_mesg
*
@@ -1971,14 +1885,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
- const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
- unsigned update_flags)
+H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, const void *mesg,
+ unsigned mesg_flags, unsigned update_flags)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- H5O_mesg_t *idx_msg = &oh->mesg[idx]; /* Pointer to message to modify */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
+ H5O_mesg_t * idx_msg = &oh->mesg[idx]; /* Pointer to message to modify */
+ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1990,14 +1903,14 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
HDassert(mesg);
/* Protect chunk */
- if(NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, idx_msg->chunkno)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
+ if (NULL == (chk_proxy = H5O_chunk_protect(f, dxpl_id, oh, idx_msg->chunkno)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Reset existing native information for the header's message */
H5O_msg_reset_real(type, idx_msg->native);
/* Copy the native object for the message */
- if(NULL == (idx_msg->native = (type->copy)(mesg, idx_msg->native)))
+ if (NULL == (idx_msg->native = (type->copy)(mesg, idx_msg->native)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy message to object header")
/* Update the message flags */
@@ -2005,27 +1918,26 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
/* Mark the message as modified */
idx_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ chk_dirtied = TRUE;
/* Release chunk */
- if(H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
chk_proxy = NULL;
/* Update the modification time, if requested */
- if(update_flags & H5O_UPDATE_TIME)
- if(H5O_touch_oh(f, dxpl_id, oh, FALSE) < 0)
+ if (update_flags & H5O_UPDATE_TIME)
+ if (H5O_touch_oh(f, dxpl_id, oh, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
/* Release chunk, if not already released */
- if(chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
+ if (chk_proxy && H5O_chunk_unprotect(f, dxpl_id, chk_proxy, chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_copy_mesg() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_delete
*
@@ -2049,29 +1961,27 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
- void *mesg)
+H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(f);
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* delete */
- if((type->del) && (type->del)(f, dxpl_id, open_oh, mesg) < 0)
+ if ((type->del) && (type->del)(f, dxpl_id, open_oh, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_delete_mesg
*
@@ -2082,7 +1992,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* September 26 2003
*
*-------------------------------------------------------------------------
@@ -2090,8 +1999,8 @@ done:
herr_t
H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg)
{
- const H5O_msg_class_t *type = mesg->type; /* Type of object to free */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_msg_class_t *type = mesg->type; /* Type of object to free */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2101,19 +2010,19 @@ H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg)
HDassert(oh);
/* Check if there is a file space deletion callback for this type of message */
- if(type->del) {
+ if (type->del) {
/* Decode the message if necessary. */
H5O_LOAD_NATIVE(f, dxpl_id, H5O_DECODEIO_NOCHANGE, oh, mesg, FAIL)
- if((type->del)(f, dxpl_id, oh, mesg->native) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message")
+ if ((type->del)(f, dxpl_id, oh, mesg->native) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL,
+ "unable to delete file space for object header message")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_delete_mesg() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_flush
*
@@ -2122,7 +2031,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 14 2007
*
*-------------------------------------------------------------------------
@@ -2130,9 +2038,9 @@ done:
herr_t
H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
{
- uint8_t *p; /* Temporary pointer to encode with */
- unsigned msg_id; /* ID for message */
- herr_t ret_value = SUCCEED; /* Return value */
+ uint8_t *p; /* Temporary pointer to encode with */
+ unsigned msg_id; /* ID for message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2144,13 +2052,13 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
p = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
/* Retrieve actual message ID, for unknown messages */
- if(mesg->type == H5O_MSG_UNKNOWN)
+ if (mesg->type == H5O_MSG_UNKNOWN)
msg_id = *(H5O_unknown_t *)(mesg->native);
else
msg_id = (uint8_t)mesg->type->id;
/* Encode the message prefix */
- if(oh->version == H5O_VERSION_1)
+ if (oh->version == H5O_VERSION_1)
UINT16ENCODE(p, msg_id)
else
*p++ = (uint8_t)msg_id;
@@ -2159,22 +2067,22 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
*p++ = mesg->flags;
/* Only encode reserved bytes for version 1 of format */
- if(oh->version == H5O_VERSION_1) {
+ if (oh->version == H5O_VERSION_1) {
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
- } /* end for */
+ } /* end for */
/* Only encode creation index for version 2+ of format */
else {
/* Only encode creation index if they are being tracked */
- if(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
+ if (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
UINT16ENCODE(p, mesg->crt_idx);
} /* end else */
HDassert(p == mesg->raw);
#ifndef NDEBUG
/* Make certain that null messages aren't in chunks w/gaps */
- if(H5O_NULL_ID == msg_id)
+ if (H5O_NULL_ID == msg_id)
HDassert(oh->chunk[mesg->chunkno].gap == 0);
else
/* Non-null messages should always have a native pointer */
@@ -2182,7 +2090,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
#endif /* NDEBUG */
/* Encode the message itself, if it's not an "unknown" message */
- if(mesg->native && mesg->type != H5O_MSG_UNKNOWN) {
+ if (mesg->native && mesg->type != H5O_MSG_UNKNOWN) {
/*
* Encode the message. If the message is shared then we
* encode a Shared Object message instead of the object
@@ -2191,19 +2099,19 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
HDassert(mesg->raw >= oh->chunk[mesg->chunkno].image);
HDassert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
HDassert(mesg->raw + mesg->raw_size <=
- oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
+ oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
#ifndef NDEBUG
-/* Sanity check that the message won't overwrite past it's allocated space */
-{
- size_t msg_size;
-
- msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
- msg_size = H5O_ALIGN_OH(oh, msg_size);
- HDassert(msg_size <= mesg->raw_size);
-}
+ /* Sanity check that the message won't overwrite past it's allocated space */
+ {
+ size_t msg_size;
+
+ msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
+ msg_size = H5O_ALIGN_OH(oh, msg_size);
+ HDassert(msg_size <= mesg->raw_size);
+ }
#endif /* NDEBUG */
HDassert(mesg->type->encode);
- if((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
+ if ((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
} /* end if */
@@ -2214,7 +2122,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_flush() */
-
/*-------------------------------------------------------------------------
* Function: H5O_flush_msgs
*
@@ -2223,7 +2130,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 21 2005
*
*-------------------------------------------------------------------------
@@ -2231,9 +2137,9 @@ done:
herr_t
H5O_flush_msgs(H5F_t *f, H5O_t *oh)
{
- H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2242,26 +2148,25 @@ H5O_flush_msgs(H5F_t *f, H5O_t *oh)
HDassert(oh);
/* Encode any dirty messages */
- for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
- if(curr_msg->dirty)
- if(H5O_msg_flush(f, oh, curr_msg) < 0)
+ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
+ if (curr_msg->dirty)
+ if (H5O_msg_flush(f, oh, curr_msg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
/* Sanity check for the correct # of messages in object header */
- if(oh->nmesgs != u)
+ if (oh->nmesgs != u)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "corrupt object header - too few messages")
#ifndef NDEBUG
- /* Reset the number of messages dirtied by decoding, as they have all
- * been flushed */
- oh->ndecode_dirtied = 0;
+ /* Reset the number of messages dirtied by decoding, as they have all
+ * been flushed */
+ oh->ndecode_dirtied = 0;
#endif /* NDEBUG */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_flush_msgs() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_chunkno
*
@@ -2272,7 +2177,6 @@ done:
* Failure: <0
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Apr 22 2010
*
*-------------------------------------------------------------------------
@@ -2280,11 +2184,11 @@ done:
int
H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to use */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- H5O_mesg_t *idx_msg; /* Pointer to message to modify */
- unsigned idx; /* Index of message to modify */
- int ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header to use */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ H5O_mesg_t * idx_msg; /* Pointer to message to modify */
+ unsigned idx; /* Index of message to modify */
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2293,31 +2197,30 @@ H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Locate message of correct type */
- for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(type == idx_msg->type)
+ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
+ if (type == idx_msg->type)
break;
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found")
/* Set return value */
H5_CHECKED_ASSIGN(ret_value, int, idx_msg->chunkno, unsigned);
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_get_chunkno() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_lock
*
@@ -2327,7 +2230,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Apr 22 2010
*
*-------------------------------------------------------------------------
@@ -2335,11 +2237,11 @@ done:
herr_t
H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to use */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- H5O_mesg_t *idx_msg; /* Pointer to message to modify */
- unsigned idx; /* Index of message to modify */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header to use */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ H5O_mesg_t * idx_msg; /* Pointer to message to modify */
+ unsigned idx; /* Index of message to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2348,35 +2250,34 @@ H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Locate message of correct type */
- for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(type == idx_msg->type)
+ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
+ if (type == idx_msg->type)
break;
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found")
/* Fail if the message is already locked */
- if(idx_msg->locked)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTLOCK, FAIL, "message already locked")
+ if (idx_msg->locked)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOCK, FAIL, "message already locked")
/* Make the message locked */
idx_msg->locked = TRUE;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_lock() */
-
/*-------------------------------------------------------------------------
* Function: H5O_msg_unlock
*
@@ -2385,7 +2286,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Apr 22 2010
*
*-------------------------------------------------------------------------
@@ -2393,11 +2293,11 @@ done:
herr_t
H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header to use */
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- H5O_mesg_t *idx_msg; /* Pointer to message to modify */
- unsigned idx; /* Index of message to modify */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header to use */
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ H5O_mesg_t * idx_msg; /* Pointer to message to modify */
+ unsigned idx; /* Index of message to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2406,31 +2306,30 @@ H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
HDassert(loc->file);
HDassert(H5F_addr_defined(loc->addr));
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
HDassert(type);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Locate message of correct type */
- for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(type == idx_msg->type)
+ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
+ if (type == idx_msg->type)
break;
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found")
/* Fail if the message is not locked */
- if(!idx_msg->locked)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNLOCK, FAIL, "message not locked")
+ if (!idx_msg->locked)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNLOCK, FAIL, "message not locked")
/* Make the message unlocked */
idx_msg->locked = FALSE;
done:
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_unlock() */
-
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index e4db09b..523f9dc 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -6,92 +6,91 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, July 24, 1998
+/* Programmer: Robb Matzke
+ * Friday, July 24, 1998
*
- * Purpose: The object modification time message.
+ * Purpose: The object modification time message.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
-
-static void *H5O_mtime_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_mtime_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
static size_t H5O_mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static void *H5O_mtime_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_mtime_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_mtime_copy(const void *_mesg, void *_dest);
+static void * H5O_mtime_copy(const void *_mesg, void *_dest);
static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_mtime_reset(void *_mesg);
static herr_t H5O_mtime_free(void *_mesg);
-static herr_t H5O_mtime_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O_mtime_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
- H5O_MTIME_ID, /*message id number */
- "mtime", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_mtime_decode, /*decode message */
- H5O_mtime_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_size, /*raw message size */
- H5O_mtime_reset, /* reset method */
- H5O_mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_mtime_debug /*debug the message */
+ H5O_MTIME_ID, /*message id number */
+ "mtime", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_mtime_decode, /*decode message */
+ H5O_mtime_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_size, /*raw message size */
+ H5O_mtime_reset, /* reset method */
+ H5O_mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_mtime_debug /*debug the message */
}};
/* This message derives from H5O message class */
/* (Only encode, decode & size routines are different from old mtime routines) */
const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
- H5O_MTIME_NEW_ID, /*message id number */
- "mtime_new", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_mtime_new_decode, /*decode message */
- H5O_mtime_new_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_new_size, /*raw message size */
- H5O_mtime_reset, /* reset method */
- H5O_mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_mtime_debug /*debug the message */
+ H5O_MTIME_NEW_ID, /*message id number */
+ "mtime_new", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_mtime_new_decode, /*decode message */
+ H5O_mtime_new_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_new_size, /*raw message size */
+ H5O_mtime_reset, /* reset method */
+ H5O_mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_mtime_debug /*debug the message */
}};
/* Current version of new mtime information */
-#define H5O_MTIME_VERSION 1
+#define H5O_MTIME_VERSION 1
/* Track whether tzset routine was called */
static hbool_t ntzset = FALSE;
@@ -99,93 +98,88 @@ static hbool_t ntzset = FALSE;
/* Declare a free list to manage the time_t struct */
H5FL_DEFINE(time_t);
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_decode
+ * Function: H5O_mtime_new_decode
*
- * Purpose: Decode a new modification time message and return a pointer to a
- * new time_t value.
+ * Purpose: Decode a new modification time message and return a pointer to
+ * a new time_t value.
*
- * Return: Success: Ptr to new message in native struct.
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
- * Failure: NULL
+ * Return: Success: Ptr to new message in native struct.
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static void *
H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg;
- uint32_t tmp_time; /* Temporary copy of the time */
- void *ret_value; /* Return value */
+ time_t * mesg;
+ uint32_t tmp_time; /* Temporary copy of the time */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- assert(f);
- assert(p);
+ HDassert(f);
+ HDassert(p);
/* decode */
- if(*p++ != H5O_MTIME_VERSION)
+ if (*p++ != H5O_MTIME_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for mtime message");
/* Skip reserved bytes */
- p+=3;
+ p += 3;
/* Get the time_t from the file */
UINT32DECODE(p, tmp_time);
/* The return value */
- if (NULL==(mesg = H5FL_MALLOC(time_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ if (NULL == (mesg = H5FL_MALLOC(time_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
*mesg = (time_t)tmp_time;
/* Set return value */
- ret_value=mesg;
+ ret_value = mesg;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_mtime_new_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_decode
+ * Function: H5O_mtime_decode
*
- * Purpose: Decode a modification time message and return a pointer to a
- * new time_t value.
+ * Purpose: Decode a modification time message and return a pointer to a
+ * new time_t value.
*
- * Return: Success: Ptr to new message in native struct.
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
- * Failure: NULL
+ * Return: Success: Ptr to new message in native struct.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
static void *
H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg, the_time;
- int i;
- struct tm tm;
- void *ret_value = NULL; /* Return value */
-#if _MSC_VER >= 1900 /* VS 2015 */
- /* In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
- * variable declared in time.h. That variable was deprecated and in VS 2015
- * is removed, with _get_timezone replacing it.
- */
- long timezone = 0;
-#endif
+ time_t * mesg, the_time;
+ struct tm tm;
+ int i; /* Local index variable */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -193,57 +187,25 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
HDassert(f);
HDassert(p);
- /* Initialize time zone information */
- if(!ntzset) {
- HDtzset();
- ntzset = TRUE;
- } /* end if */
-
/* decode */
- for(i = 0; i < 14; i++)
- if(!HDisdigit(p[i]))
+ for (i = 0; i < 14; i++)
+ if (!HDisdigit(p[i]))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message")
- /*
- * Convert YYYYMMDDhhmmss UTC to a time_t. This is a little problematic
- * because mktime() operates on local times. We convert to local time
- * and then figure out the adjustment based on the local time zone and
- * daylight savings setting.
- */
+ /* Convert YYYYMMDDhhmmss UTC to a time_t. */
HDmemset(&tm, 0, sizeof tm);
- tm.tm_year = (p[0]-'0')*1000 + (p[1]-'0')*100 +
- (p[2]-'0')*10 + (p[3]-'0') - 1900;
- tm.tm_mon = (p[4]-'0')*10 + (p[5]-'0') - 1;
- tm.tm_mday = (p[6]-'0')*10 + (p[7]-'0');
- tm.tm_hour = (p[8]-'0')*10 + (p[9]-'0');
- tm.tm_min = (p[10]-'0')*10 + (p[11]-'0');
- tm.tm_sec = (p[12]-'0')*10 + (p[13]-'0');
- tm.tm_isdst = -1; /*figure it out*/
- if((time_t)-1 == (the_time = HDmktime(&tm)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message")
-
-#if defined(H5_HAVE_TM_GMTOFF)
- /* BSD-like systems */
- the_time += tm.tm_gmtoff;
-#elif defined(H5_HAVE_TIMEZONE)
- #if _MSC_VER >= 1900 /* VS 2015 */
- HDget_timezone(&timezone);
- #endif
- /* GNU/Linux systems */
- the_time -= timezone - (tm.tm_isdst ? 3600 : 0);
-#else
- /*
- * The catch-all. If we can't convert a character string universal
- * coordinated time to a time_t value reliably then we can't decode the
- * modification time message. This really isn't as bad as it sounds -- the
- * only way a user can get the modification time is from our internal
- * query routines, which can gracefully recover.
- */
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information")
-#endif
+ tm.tm_year = (p[0] - '0') * 1000 + (p[1] - '0') * 100 + (p[2] - '0') * 10 + (p[3] - '0') - 1900;
+ tm.tm_mon = (p[4] - '0') * 10 + (p[5] - '0') - 1;
+ tm.tm_mday = (p[6] - '0') * 10 + (p[7] - '0');
+ tm.tm_hour = (p[8] - '0') * 10 + (p[9] - '0');
+ tm.tm_min = (p[10] - '0') * 10 + (p[11] - '0');
+ tm.tm_sec = (p[12] - '0') * 10 + (p[13] - '0');
+ tm.tm_isdst = -1; /* (figure it out) */
+ if ((time_t)-1 == (the_time = H5_make_time(&tm)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't construct time info")
/* The return value */
- if(NULL == (mesg = H5FL_MALLOC(time_t)))
+ if (NULL == (mesg = H5FL_MALLOC(time_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
*mesg = the_time;
@@ -254,31 +216,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_mtime_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_encode
+ * Function: H5O_mtime_new_encode
*
- * Purpose: Encodes a new modification time message.
+ * Purpose: Encodes a new modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
+ const time_t *mesg = (const time_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(p);
- assert(mesg);
+ HDassert(f);
+ HDassert(p);
+ HDassert(mesg);
/* Version */
*p++ = H5O_MTIME_VERSION;
@@ -294,156 +255,141 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_mtime_new_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_encode
+ * Function: H5O_mtime_encode
*
- * Purpose: Encodes a modification time message.
+ * Purpose: Encodes a modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
- *
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
- struct tm *tm;
+ const time_t *mesg = (const time_t *)_mesg;
+ struct tm * tm;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(p);
- assert(mesg);
+ HDassert(f);
+ HDassert(p);
+ HDassert(mesg);
/* encode */
tm = HDgmtime(mesg);
- sprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
- 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ HDsprintf((char *)p, "%04d%02d%02d%02d%02d%02d", 1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_copy
+ * Function: H5O_mtime_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary.
*
- * Return: Success: Ptr to _DEST
+ * Return: Success: Ptr to _DEST
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
- *
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
static void *
H5O_mtime_copy(const void *_mesg, void *_dest)
{
- const time_t *mesg = (const time_t *) _mesg;
- time_t *dest = (time_t *) _dest;
- void *ret_value; /* Return value */
+ const time_t *mesg = (const time_t *)_mesg;
+ time_t * dest = (time_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- assert(mesg);
- if (!dest && NULL==(dest = H5FL_MALLOC(time_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ HDassert(mesg);
+ if (!dest && NULL == (dest = H5FL_MALLOC(time_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* copy */
*dest = *mesg;
/* Set return value */
- ret_value=dest;
+ ret_value = dest;
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_size
+ * Function: H5O_mtime_new_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
- *
- * Modifications:
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
+H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+ const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
+ HDassert(f);
+ HDassert(mesg);
FUNC_LEAVE_NOAPI(8)
} /* end H5O_mtime_new_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_size
- *
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Function: H5O_mtime_size
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Failure: 0
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 14 1998
+ * Failure: 0
*
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 14 1998
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
+H5O_mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+ const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
+ HDassert(f);
+ HDassert(mesg);
FUNC_LEAVE_NOAPI(16)
}
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_reset
+ * Function: H5O_mtime_reset
*
* Purpose: Frees resources within a modification time message, but doesn't free
* the message itself.
@@ -465,19 +411,16 @@ H5O_mtime_reset(void H5_ATTR_UNUSED *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_free
+ * Function: H5O_mtime_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -492,46 +435,40 @@ H5O_mtime_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_mtime_free() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_debug
- *
- * Purpose: Prints debugging info for the message.
+ * Function: H5O_mtime_debug
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Prints debugging info for the message.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Return: Non-negative on success/Negative on failure
*
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5O_mtime_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
- const time_t *mesg = (const time_t *)_mesg;
- struct tm *tm;
- char buf[128];
+ const time_t *mesg = (const time_t *)_mesg;
+ struct tm * tm;
+ char buf[128];
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
- assert(stream);
- assert(indent >= 0);
- assert(fwidth >= 0);
+ HDassert(f);
+ HDassert(mesg);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
/* debug */
tm = HDlocaltime(mesg);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Time:", buf);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 5248168..68a225a 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,56 +15,54 @@
*
* Created: H5Oname.c
* Aug 12 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Object name message.
*
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_name_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_name_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_name_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_name_copy(const void *_mesg, void *_dest);
+static void * H5O_name_copy(const void *_mesg, void *_dest);
static size_t H5O_name_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_name_reset(void *_mesg);
-static herr_t H5O_name_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O_name_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_NAME[1] = {{
- H5O_NAME_ID, /*message id number */
- "name", /*message name for debugging */
- sizeof(H5O_name_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_name_decode, /*decode message */
- H5O_name_encode, /*encode message */
- H5O_name_copy, /*copy the native value */
- H5O_name_size, /*raw message size */
- H5O_name_reset, /*free internal memory */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_name_debug /*debug the message */
+ H5O_NAME_ID, /*message id number */
+ "name", /*message name for debugging */
+ sizeof(H5O_name_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_name_decode, /*decode message */
+ H5O_name_encode, /*encode message */
+ H5O_name_copy, /*copy the native value */
+ H5O_name_size, /*raw message size */
+ H5O_name_reset, /*free internal memory */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_name_debug /*debug the message */
}};
-
/*-------------------------------------------------------------------------
* Function: H5O_name_decode
*
@@ -76,18 +74,17 @@ const H5O_msg_class_t H5O_MSG_NAME[1] = {{
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
*/
static void *
H5O_name_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_name_t *mesg;
- void *ret_value; /* Return value */
+ H5O_name_t *mesg;
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -96,24 +93,22 @@ H5O_name_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_
HDassert(p);
/* decode */
- if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (mesg->s = (char *)H5MM_strdup((const char *)p)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (mesg->s = (char *)H5MM_strdup((const char *)p)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set return value */
ret_value = mesg;
done:
- if(NULL == ret_value) {
- if(mesg)
+ if (NULL == ret_value)
+ if (mesg)
mesg = (H5O_name_t *)H5MM_xfree(mesg);
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_name_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_name_encode
*
@@ -122,17 +117,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -142,12 +134,11 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
HDassert(mesg && mesg->s);
/* encode */
- HDstrcpy((char*)p, mesg->s);
+ HDstrcpy((char *)p, mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5O_name_copy
*
@@ -159,45 +150,41 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
H5O_name_copy(const void *_mesg, void *_dest)
{
- const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- H5O_name_t *dest = (H5O_name_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ H5O_name_t * dest = (H5O_name_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
- if(!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *mesg;
- if(NULL == (dest->s = H5MM_xstrdup(mesg->s)))
+ if (NULL == (dest->s = H5MM_xstrdup(mesg->s)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set return value */
ret_value = dest;
done:
- if(NULL == ret_value)
- if(dest && NULL == _dest)
+ if (NULL == ret_value)
+ if (dest && NULL == _dest)
dest = (H5O_name_t *)H5MM_xfree(dest);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_name_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_name_size
*
@@ -211,18 +198,15 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
- const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- size_t ret_value;
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -235,7 +219,6 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5O_name_reset
*
@@ -245,17 +228,14 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_name_reset(void *_mesg)
{
- H5O_name_t *mesg = (H5O_name_t *) _mesg;
+ H5O_name_t *mesg = (H5O_name_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -268,7 +248,6 @@ H5O_name_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_name_reset() */
-
/*-------------------------------------------------------------------------
* Function: H5O_name_debug
*
@@ -277,18 +256,15 @@ H5O_name_reset(void *_mesg)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_name_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
- const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -299,9 +275,7 @@ H5O_name_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth,
- "Name:",
- mesg->s);
+ HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
}
diff --git a/src/H5Onull.c b/src/H5Onull.c
index b6a9214..fde6a1d 100644
--- a/src/H5Onull.c
+++ b/src/H5Onull.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,40 +15,37 @@
*
* Created: H5Onull.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
*
* Purpose: The null message.
*
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Opkg.h" /* Object headers */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_NULL[1] = {{
- H5O_NULL_ID, /*message id number */
- "null", /*message name for debugging */
- 0, /*native message size */
- 0, /* messages are sharable? */
- NULL, /*no decode method */
- NULL, /*no encode method */
- NULL, /*no copy method */
- NULL, /*no size method */
- NULL, /*no reset method */
- NULL, /*no free method */
- NULL, /*no file delete method */
- NULL, /*no link method */
- NULL, /*no set share method */
- NULL, /*no can share method */
- NULL, /*no pre copy native value to file */
- NULL, /*no copy native value to file */
- NULL, /*no post copy native value to file */
- NULL, /*no get creation index */
- NULL, /*no set creation index */
- NULL /*no debug method */
+ H5O_NULL_ID, /*message id number */
+ "null", /*message name for debugging */
+ 0, /*native message size */
+ 0, /* messages are sharable? */
+ NULL, /*no decode method */
+ NULL, /*no encode method */
+ NULL, /*no copy method */
+ NULL, /*no size method */
+ NULL, /*no reset method */
+ NULL, /*no free method */
+ NULL, /*no file delete method */
+ NULL, /*no link method */
+ NULL, /*no set share method */
+ NULL, /*no can share method */
+ NULL, /*no pre copy native value to file */
+ NULL, /*no copy native value to file */
+ NULL, /*no post copy native value to file */
+ NULL, /*no get creation index */
+ NULL, /*no set creation index */
+ NULL /*no debug method */
}};
-
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index f4b8014..dcdab78 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,32 +19,33 @@
#define _H5Opkg_H
/* Get package's private header */
-#include "H5Oprivate.h" /* Object headers */
+#include "H5Oprivate.h" /* Object headers */
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/* Object header macros */
-#define H5O_NMESGS 8 /*initial number of messages */
-#define H5O_NCHUNKS 2 /*initial number of chunks */
-#define H5O_MIN_SIZE 22 /* Min. obj header data size (must be big enough for a message prefix and a continuation message) */
-#define H5O_MSG_TYPES 25 /* # of types of messages */
-#define H5O_MAX_CRT_ORDER_IDX 65535 /* Max. creation order index value */
+#define H5O_NMESGS 8 /*initial number of messages */
+#define H5O_NCHUNKS 2 /*initial number of chunks */
+#define H5O_MIN_SIZE \
+ 22 /* Min. obj header data size (must be big enough for a message prefix and a continuation message) */
+#define H5O_MSG_TYPES 24 /* # of types of messages */
+#define H5O_MAX_CRT_ORDER_IDX 65535 /* Max. creation order index value */
/* Versions of object header structure */
/* Initial version of the object header format */
-#define H5O_VERSION_1 1
+#define H5O_VERSION_1 1
/* Revised version - leaves out reserved bytes and alignment padding, and adds
* magic number as prefix and checksum as suffix for all chunks.
*/
-#define H5O_VERSION_2 2
+#define H5O_VERSION_2 2
/* The latest version of the format. Look through the 'flush'
* and 'size' callback for places to change when updating this. */
-#define H5O_VERSION_LATEST H5O_VERSION_2
+#define H5O_VERSION_LATEST H5O_VERSION_2
/*
* Align messages on 8-byte boundaries because we would like to copy the
@@ -54,20 +55,13 @@
*
* Note: We no longer attempt to do this. - QAK, 10/16/06
*/
-#define H5O_ALIGN_OLD(X) (8 * (((X) + 7) / 8))
-#define H5O_ALIGN_VERS(V, X) \
- (((V) == H5O_VERSION_1) ? \
- H5O_ALIGN_OLD(X) \
- : \
- (X) \
- )
-#define H5O_ALIGN_OH(O, X) \
- H5O_ALIGN_VERS((O)->version, X)
-#define H5O_ALIGN_F(F, X) \
- H5O_ALIGN_VERS((H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), X)
+#define H5O_ALIGN_OLD(X) (8 * (((X) + 7) / 8))
+#define H5O_ALIGN_VERS(V, X) (((V) == H5O_VERSION_1) ? H5O_ALIGN_OLD(X) : (X))
+#define H5O_ALIGN_OH(O, X) H5O_ALIGN_VERS((O)->version, X)
+#define H5O_ALIGN_F(F, X) H5O_ALIGN_VERS((H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), X)
/* Size of checksum (on disk) */
-#define H5O_SIZEOF_CHKSUM 4
+#define H5O_SIZEOF_CHKSUM 4
/* ========= Object Creation properties ============ */
/* Default values for some of the object creation properties */
@@ -76,99 +70,86 @@
* default attribute phase change storage are handled correctly if they
* are changed.
*/
-#define H5O_CRT_ATTR_MAX_COMPACT_DEF 8
-#define H5O_CRT_ATTR_MIN_DENSE_DEF 6
-#define H5O_CRT_OHDR_FLAGS_DEF H5O_HDR_STORE_TIMES
+#define H5O_CRT_ATTR_MAX_COMPACT_DEF 8
+#define H5O_CRT_ATTR_MIN_DENSE_DEF 6
+#define H5O_CRT_OHDR_FLAGS_DEF H5O_HDR_STORE_TIMES
/* Object header status flag definitions */
-#define H5O_HDR_CHUNK0_1 0x00 /* Use 1-byte value for chunk #0 size */
-#define H5O_HDR_CHUNK0_2 0x01 /* Use 2-byte value for chunk #0 size */
-#define H5O_HDR_CHUNK0_4 0x02 /* Use 4-byte value for chunk #0 size */
-#define H5O_HDR_CHUNK0_8 0x03 /* Use 8-byte value for chunk #0 size */
+#define H5O_HDR_CHUNK0_1 0x00 /* Use 1-byte value for chunk #0 size */
+#define H5O_HDR_CHUNK0_2 0x01 /* Use 2-byte value for chunk #0 size */
+#define H5O_HDR_CHUNK0_4 0x02 /* Use 4-byte value for chunk #0 size */
+#define H5O_HDR_CHUNK0_8 0x03 /* Use 8-byte value for chunk #0 size */
/*
* Size of object header prefix.
*/
-#define H5O_SIZEOF_HDR(O) \
- (((O)->version == H5O_VERSION_1) \
- ? \
- H5O_ALIGN_OLD(1 + /*version number */ \
- 1 + /*reserved */ \
- 2 + /*number of messages */ \
- 4 + /*reference count */ \
- 4) /*chunk data size */ \
- : \
- (H5_SIZEOF_MAGIC + /*magic number */ \
- 1 + /*version number */ \
- 1 + /*flags */ \
- (((O)->flags & H5O_HDR_STORE_TIMES) ? ( \
- 4 + /*access time */ \
- 4 + /*modification time */ \
- 4 + /*change time */ \
- 4 /*birth time */ \
- ) : 0) + \
- (((O)->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? ( \
- 2 + /*max compact attributes */ \
- 2 /*min dense attributes */ \
- ) : 0) + \
- (1 << ((O)->flags & H5O_HDR_CHUNK0_SIZE)) + /*chunk 0 data size */ \
- H5O_SIZEOF_CHKSUM) /*checksum size */ \
+#define H5O_SIZEOF_HDR(O) \
+ (((O)->version == H5O_VERSION_1) \
+ ? H5O_ALIGN_OLD(1 + /*version number */ \
+ 1 + /*reserved */ \
+ 2 + /*number of messages */ \
+ 4 + /*reference count */ \
+ 4) /*chunk data size */ \
+ : (H5_SIZEOF_MAGIC + /*magic number */ \
+ 1 + /*version number */ \
+ 1 + /*flags */ \
+ (((O)->flags & H5O_HDR_STORE_TIMES) ? (4 + /*access time */ \
+ 4 + /*modification time */ \
+ 4 + /*change time */ \
+ 4 /*birth time */ \
+ ) \
+ : 0) + \
+ (((O)->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? (2 + /*max compact attributes */ \
+ 2 /*min dense attributes */ \
+ ) \
+ : 0) + \
+ (1 << ((O)->flags & H5O_HDR_CHUNK0_SIZE)) + /*chunk 0 data size */ \
+ H5O_SIZEOF_CHKSUM) /*checksum size */ \
)
/*
* Size of object header message prefix
*/
-#define H5O_SIZEOF_MSGHDR_VERS(V,C) \
- (((V) == H5O_VERSION_1) \
- ? \
- H5O_ALIGN_OLD(2 + /*message type */ \
- 2 + /*sizeof message data */ \
- 1 + /*flags */ \
- 3) /*reserved */ \
- : \
- (1 + /*message type */ \
- 2 + /*sizeof message data */ \
- 1 + /*flags */ \
- ((C) ? ( \
- 2 /*creation index */ \
- ) : 0)) \
- )
-#define H5O_SIZEOF_MSGHDR_OH(O) \
- H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
-#define H5O_SIZEOF_MSGHDR_F(F, C) \
- H5O_SIZEOF_MSGHDR_VERS((H5F_USE_LATEST_FORMAT(F) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C))
+#define H5O_SIZEOF_MSGHDR_VERS(V, C) \
+ (((V) == H5O_VERSION_1) ? H5O_ALIGN_OLD(2 + /*message type */ \
+ 2 + /*sizeof message data */ \
+ 1 + /*flags */ \
+ 3) /*reserved */ \
+ : (1 + /*message type */ \
+ 2 + /*sizeof message data */ \
+ 1 + /*flags */ \
+ ((C) ? (2 /*creation index */ \
+ ) \
+ : 0)))
+#define H5O_SIZEOF_MSGHDR_OH(O) \
+ H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags &H5O_HDR_ATTR_CRT_ORDER_TRACKED)
+#define H5O_SIZEOF_MSGHDR_F(F, C) \
+ H5O_SIZEOF_MSGHDR_VERS( \
+ (H5F_USE_LATEST_FORMAT(F) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C))
/*
* Size of chunk "header" for each chunk
*/
-#define H5O_SIZEOF_CHKHDR_VERS(V) \
- (((V) == H5O_VERSION_1) \
- ? \
- 0 + /*no magic # */ \
- 0 /*no checksum */ \
- : \
- H5_SIZEOF_MAGIC + /*magic # */ \
- H5O_SIZEOF_CHKSUM /*checksum */ \
+#define H5O_SIZEOF_CHKHDR_VERS(V) \
+ (((V) == H5O_VERSION_1) ? 0 + /*no magic # */ \
+ 0 /*no checksum */ \
+ : H5_SIZEOF_MAGIC + /*magic # */ \
+ H5O_SIZEOF_CHKSUM /*checksum */ \
)
-#define H5O_SIZEOF_CHKHDR_OH(O) \
- H5O_SIZEOF_CHKHDR_VERS((O)->version)
+#define H5O_SIZEOF_CHKHDR_OH(O) H5O_SIZEOF_CHKHDR_VERS((O)->version)
/*
* Size of checksum for each chunk
*/
-#define H5O_SIZEOF_CHKSUM_VERS(V) \
- (((V) == H5O_VERSION_1) \
- ? \
- 0 /*no checksum */ \
- : \
- H5O_SIZEOF_CHKSUM /*checksum */ \
+#define H5O_SIZEOF_CHKSUM_VERS(V) \
+ (((V) == H5O_VERSION_1) ? 0 /*no checksum */ \
+ : H5O_SIZEOF_CHKSUM /*checksum */ \
)
-#define H5O_SIZEOF_CHKSUM_OH(O) \
- H5O_SIZEOF_CHKSUM_VERS((O)->version)
+#define H5O_SIZEOF_CHKSUM_OH(O) H5O_SIZEOF_CHKSUM_VERS((O)->version)
/* Input/output flags for decode functions */
-#define H5O_DECODEIO_NOCHANGE 0x01u /* IN: do not modify values */
-#define H5O_DECODEIO_DIRTY 0x02u /* OUT: message has been changed */
+#define H5O_DECODEIO_NOCHANGE 0x01u /* IN: do not modify values */
+#define H5O_DECODEIO_DIRTY 0x02u /* OUT: message has been changed */
/* Macro to incremend ndecode_dirtied (only if we are debugging) */
#ifndef NDEBUG
@@ -179,84 +160,89 @@
/* Load native information for a message, if it's not already present */
/* (Only works for messages with decode callback) */
-#define H5O_LOAD_NATIVE(F, DXPL, IOF, OH, MSG, ERR) \
- if(NULL == (MSG)->native) { \
- const H5O_msg_class_t *msg_type = (MSG)->type; \
- unsigned ioflags = (IOF); \
- \
- /* Decode the message */ \
- HDassert(msg_type->decode); \
- if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, (MSG)->raw_size, (MSG)->raw))) \
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
- \
- /* Mark the message dirty if it was changed by decoding */ \
- if((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \
- (MSG)->dirty = TRUE; \
- /* Increment the count of messages dirtied by decoding, but */ \
- /* only ifndef NDEBUG */ \
- INCR_NDECODE_DIRTIED(OH) \
- } \
- \
- /* Set the message's "shared info", if it's shareable */ \
- if((MSG)->flags & H5O_MSG_FLAG_SHAREABLE) { \
- HDassert(msg_type->share_flags & H5O_SHARE_IS_SHARABLE); \
- H5O_UPDATE_SHARED((H5O_shared_t *)(MSG)->native, H5O_SHARE_TYPE_HERE, (F), msg_type->id, (MSG)->crt_idx, (OH)->chunk[0].addr) \
- } /* end if */ \
- \
- /* Set the message's "creation index", if it has one */ \
- if(msg_type->set_crt_index) { \
- /* Set the creation index for the message */ \
- if((msg_type->set_crt_index)((MSG)->native, (MSG)->crt_idx) < 0) \
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, ERR, "unable to set creation index") \
- } /* end if */ \
- } /* end if */
+#define H5O_LOAD_NATIVE(F, DXPL, IOF, OH, MSG, ERR) \
+ if (NULL == (MSG)->native) { \
+ const H5O_msg_class_t *msg_type = (MSG)->type; \
+ unsigned ioflags = (IOF); \
+ \
+ /* Decode the message */ \
+ HDassert(msg_type->decode); \
+ if (NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, \
+ (MSG)->raw_size, (MSG)->raw))) \
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
+ \
+ /* Mark the message dirty if it was changed by decoding */ \
+ if ((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \
+ (MSG)->dirty = TRUE; \
+ /* Increment the count of messages dirtied by decoding, but */ \
+ /* only ifndef NDEBUG */ \
+ INCR_NDECODE_DIRTIED(OH) \
+ } \
+ \
+ /* Set the message's "shared info", if it's shareable */ \
+ if ((MSG)->flags & H5O_MSG_FLAG_SHAREABLE) { \
+ HDassert(msg_type->share_flags &H5O_SHARE_IS_SHARABLE); \
+ H5O_UPDATE_SHARED((H5O_shared_t *)(MSG)->native, H5O_SHARE_TYPE_HERE, (F), msg_type->id, \
+ (MSG)->crt_idx, (OH)->chunk[0].addr) \
+ } /* end if */ \
+ \
+ /* Set the message's "creation index", if it has one */ \
+ if (msg_type->set_crt_index) { \
+ /* Set the creation index for the message */ \
+ if ((msg_type->set_crt_index)((MSG)->native, (MSG)->crt_idx) < 0) \
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, ERR, "unable to set creation index") \
+ } /* end if */ \
+ } /* end if */
/* Flags for a message class's "sharability" */
-#define H5O_SHARE_IS_SHARABLE 0x01
-#define H5O_SHARE_IN_OHDR 0x02
-
+#define H5O_SHARE_IS_SHARABLE 0x01
+#define H5O_SHARE_IN_OHDR 0x02
/* The "message class" type */
struct H5O_msg_class_t {
- unsigned id; /*message type ID on disk */
- const char *name; /*for debugging */
- size_t native_size; /*size of native message */
- unsigned share_flags; /* Message sharing settings */
- void *(*decode)(H5F_t *, hid_t, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *);
- herr_t (*encode)(H5F_t *, hbool_t, uint8_t *, const void *);
- void *(*copy)(const void *, void *); /*copy native value */
- size_t (*raw_size)(const H5F_t *, hbool_t, const void *);/*sizeof encoded message */
- herr_t (*reset)(void *); /*free nested data structs */
- herr_t (*free)(void *); /*free main data struct */
- herr_t (*del)(H5F_t *, hid_t, H5O_t *, void *); /* Delete space in file referenced by this message */
- herr_t (*link)(H5F_t *, hid_t, H5O_t *, void *); /* Increment any links in file reference by this message */
- herr_t (*set_share)(void*, const H5O_shared_t*); /* Set shared information */
- htri_t (*can_share)(const void *); /* Is message allowed to be shared? */
- herr_t (*pre_copy_file)(H5F_t *, const void *, hbool_t *, const H5O_copy_t *, void *); /*"pre copy" action when copying native value to file */
- void *(*copy_file)(H5F_t *, void *, H5F_t *, hbool_t *, unsigned *, H5O_copy_t *, void *, hid_t); /*copy native value to file */
- herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, hid_t, H5O_copy_t *); /*"post copy" action when copying native value to file */
- herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */
- herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */
- herr_t (*debug)(H5F_t*, hid_t, const void*, FILE*, int, int);
+ unsigned id; /*message type ID on disk */
+ const char *name; /*for debugging */
+ size_t native_size; /*size of native message */
+ unsigned share_flags; /* Message sharing settings */
+ void *(*decode)(H5F_t *, hid_t, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *);
+ herr_t (*encode)(H5F_t *, hbool_t, uint8_t *, const void *);
+ void *(*copy)(const void *, void *); /*copy native value */
+ size_t (*raw_size)(const H5F_t *, hbool_t, const void *); /*sizeof encoded message */
+ herr_t (*reset)(void *); /*free nested data structs */
+ herr_t (*free)(void *); /*free main data struct */
+ herr_t (*del)(H5F_t *, hid_t, H5O_t *, void *); /* Delete space in file referenced by this message */
+ herr_t (*link)(H5F_t *, hid_t, H5O_t *,
+ void *); /* Increment any links in file reference by this message */
+ herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */
+ htri_t (*can_share)(const void *); /* Is message allowed to be shared? */
+ herr_t (*pre_copy_file)(H5F_t *, const void *, hbool_t *, const H5O_copy_t *,
+ void *); /*"pre copy" action when copying native value to file */
+ void *(*copy_file)(H5F_t *, void *, H5F_t *, hbool_t *, unsigned *, H5O_copy_t *, void *,
+ hid_t); /*copy native value to file */
+ herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, hid_t,
+ H5O_copy_t *); /*"post copy" action when copying native value to file */
+ herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */
+ herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */
+ herr_t (*debug)(H5F_t *, hid_t, const void *, FILE *, int, int);
};
struct H5O_mesg_t {
- const H5O_msg_class_t *type; /*type of message */
- hbool_t dirty; /*raw out of date wrt native */
- hbool_t locked; /*message is locked into chunk */
- uint8_t flags; /*message flags */
- H5O_msg_crt_idx_t crt_idx; /*message creation index */
- unsigned chunkno; /*chunk number for this mesg */
- void *native; /*native format message */
- uint8_t *raw; /*ptr to raw data */
- size_t raw_size; /*size with alignment */
+ const H5O_msg_class_t *type; /*type of message */
+ hbool_t dirty; /*raw out of date wrt native */
+ hbool_t locked; /*message is locked into chunk */
+ uint8_t flags; /*message flags */
+ H5O_msg_crt_idx_t crt_idx; /*message creation index */
+ unsigned chunkno; /*chunk number for this mesg */
+ void * native; /*native format message */
+ uint8_t * raw; /*ptr to raw data */
+ size_t raw_size; /*size with alignment */
};
typedef struct H5O_chunk_t {
- haddr_t addr; /*chunk file address */
- size_t size; /*chunk size */
- size_t gap; /*space at end of chunk too small for null message */
- uint8_t *image; /*image of file */
+ haddr_t addr; /*chunk file address */
+ size_t size; /*chunk size */
+ size_t gap; /*space at end of chunk too small for null message */
+ uint8_t *image; /*image of file */
} H5O_chunk_t;
struct H5O_t {
@@ -264,123 +250,123 @@ struct H5O_t {
/* first field in structure */
/* File-specific information (not stored) */
- size_t sizeof_size; /* Size of file sizes */
- size_t sizeof_addr; /* Size of file addresses */
+ size_t sizeof_size; /* Size of file sizes */
+ size_t sizeof_addr; /* Size of file addresses */
/* Debugging information (not stored) */
#ifdef H5O_ENABLE_BAD_MESG_COUNT
- hbool_t store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */
- /* (This is to simulate a bug in earlier
- * versions of the library)
- */
-#endif /* H5O_ENABLE_BAD_MESG_COUNT */
+ hbool_t store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */
+ /* (This is to simulate a bug in earlier
+ * versions of the library)
+ */
+#endif /* H5O_ENABLE_BAD_MESG_COUNT */
#ifndef NDEBUG
- size_t ndecode_dirtied; /* Number of messages dirtied by decoding */
-#endif /* NDEBUG */
+ size_t ndecode_dirtied; /* Number of messages dirtied by decoding */
+#endif /* NDEBUG */
/* Chunk management information (not stored) */
- size_t rc; /* Reference count of [continuation] chunks using this structure */
- size_t chunk0_size; /* Size of serialized first chunk */
- hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */
- hbool_t prefix_modified; /* Whether prefix was modified when the object header was deserialized */
+ size_t rc; /* Reference count of [continuation] chunks using this structure */
+ size_t chunk0_size; /* Size of serialized first chunk */
+ hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */
+ hbool_t prefix_modified; /* Whether prefix was modified when the object header was deserialized */
/* Object information (stored) */
- hbool_t has_refcount_msg; /* Whether the object has a ref. count message */
- unsigned nlink; /*link count */
- uint8_t version; /*version number */
- uint8_t flags; /*flags */
+ hbool_t has_refcount_msg; /* Whether the object has a ref. count message */
+ unsigned nlink; /*link count */
+ uint8_t version; /*version number */
+ uint8_t flags; /*flags */
/* Time information (stored, for versions > 1 & H5O_HDR_STORE_TIMES flag set) */
- time_t atime; /*access time */
- time_t mtime; /*modification time */
- time_t ctime; /*change time */
- time_t btime; /*birth time */
+ time_t atime; /*access time */
+ time_t mtime; /*modification time */
+ time_t ctime; /*change time */
+ time_t btime; /*birth time */
/* Attribute information (stored, for versions > 1) */
- unsigned max_compact; /* Maximum # of compact attributes */
- unsigned min_dense; /* Minimum # of "dense" attributes */
+ unsigned max_compact; /* Maximum # of compact attributes */
+ unsigned min_dense; /* Minimum # of "dense" attributes */
/* Message management (stored, encoded in chunks) */
- size_t nmesgs; /*number of messages */
- size_t alloc_nmesgs; /*number of message slots */
- H5O_mesg_t *mesg; /*array of messages */
- size_t link_msgs_seen; /* # of link messages seen when loading header */
- size_t attr_msgs_seen; /* # of attribute messages seen when loading header */
+ size_t nmesgs; /*number of messages */
+ size_t alloc_nmesgs; /*number of message slots */
+ H5O_mesg_t *mesg; /*array of messages */
+ size_t link_msgs_seen; /* # of link messages seen when loading header */
+ size_t attr_msgs_seen; /* # of attribute messages seen when loading header */
/* Chunk management (not stored) */
- size_t nchunks; /*number of chunks */
- size_t alloc_nchunks; /*chunks allocated */
- H5O_chunk_t *chunk; /*array of chunks */
+ size_t nchunks; /*number of chunks */
+ size_t alloc_nchunks; /*chunks allocated */
+ H5O_chunk_t *chunk; /*array of chunks */
};
/* Class for types of objects in file */
typedef struct H5O_obj_class_t {
- H5O_type_t type; /*object type on disk */
- const char *name; /*for debugging */
- void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */
- void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */
- htri_t (*isa)(H5O_t *); /*if a header matches an object class */
- hid_t (*open)(const H5G_loc_t *, hid_t, hid_t, hbool_t ); /*open an object of this class */
- void *(*create)(H5F_t *, void *, H5G_loc_t *, hid_t ); /*create an object of this class */
- H5O_loc_t *(*get_oloc)(hid_t ); /*get the object header location for an object */
- herr_t (*bh_info)(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info); /*get the index & heap info for an object */
- herr_t (*flush)(H5G_loc_t *loc, hid_t dxpl_id); /*flush an opened object of this class */
+ H5O_type_t type; /*object type on disk */
+ const char *name; /*for debugging */
+ void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */
+ void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */
+ htri_t (*isa)(H5O_t *); /*if a header matches an object class */
+ hid_t (*open)(const H5G_loc_t *, hid_t, hid_t, hbool_t); /*open an object of this class */
+ void *(*create)(H5F_t *, void *, H5G_loc_t *, hid_t); /*create an object of this class */
+ H5O_loc_t *(*get_oloc)(hid_t); /*get the object header location for an object */
+ herr_t (*bh_info)(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
+ H5_ih_info_t *bh_info); /*get the index & heap info for an object */
+ herr_t (*flush)(H5G_loc_t *loc, hid_t dxpl_id); /*flush an opened object of this class */
} H5O_obj_class_t;
/* Node in skip list to map addresses from one file to another during object header copy */
typedef struct H5O_addr_map_t {
- H5_obj_t src_obj_pos; /* Location of source object */
- haddr_t dst_addr; /* Address of object in destination file */
- hbool_t is_locked; /* Indicate that the destination object is locked currently */
- hsize_t inc_ref_count; /* Number of deferred increments to reference count */
- const H5O_obj_class_t *obj_class; /* Object class */
- void *udata; /* Object class copy file udata */
+ H5_obj_t src_obj_pos; /* Location of source object */
+ haddr_t dst_addr; /* Address of object in destination file */
+ hbool_t is_locked; /* Indicate that the destination object is locked currently */
+ hsize_t inc_ref_count; /* Number of deferred increments to reference count */
+ const H5O_obj_class_t *obj_class; /* Object class */
+ void * udata; /* Object class copy file udata */
} H5O_addr_map_t;
/* Stack of continuation messages to interpret */
typedef struct H5O_cont_msgs_t {
- size_t nmsgs; /* Number of continuation messages found so far */
- size_t alloc_nmsgs; /* Continuation messages allocated */
- H5O_cont_t *msgs; /* Array of continuation messages */
+ size_t nmsgs; /* Number of continuation messages found so far */
+ size_t alloc_nmsgs; /* Continuation messages allocated */
+ H5O_cont_t *msgs; /* Array of continuation messages */
} H5O_cont_msgs_t;
/* Common callback information for loading object header prefix from disk */
typedef struct H5O_common_cache_ud_t {
- H5F_t *f; /* Pointer to file for object header/chunk */
- hid_t dxpl_id; /* DXPL for operation */
- unsigned file_intent; /* Read/write intent for file */
- unsigned merged_null_msgs; /* Number of null messages merged together */
- hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */
- H5O_cont_msgs_t *cont_msg_info; /* Pointer to continuation messages to work on */
- haddr_t addr; /* Address of the prefix or chunk */
+ H5F_t * f; /* Pointer to file for object header/chunk */
+ hid_t dxpl_id; /* DXPL for operation */
+ unsigned file_intent; /* Read/write intent for file */
+ unsigned merged_null_msgs; /* Number of null messages merged together */
+ hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */
+ H5O_cont_msgs_t *cont_msg_info; /* Pointer to continuation messages to work on */
+ haddr_t addr; /* Address of the prefix or chunk */
} H5O_common_cache_ud_t;
/* Callback information for loading object header prefix from disk */
typedef struct H5O_cache_ud_t {
- hbool_t made_attempt; /* Whether the deserialize routine was already attempted */
- unsigned v1_pfx_nmesgs; /* Number of messages from v1 prefix header */
- H5O_common_cache_ud_t common; /* Common object header cache callback info */
+ hbool_t made_attempt; /* Whether the deserialize routine was already attempted */
+ unsigned v1_pfx_nmesgs; /* Number of messages from v1 prefix header */
+ H5O_common_cache_ud_t common; /* Common object header cache callback info */
} H5O_cache_ud_t;
/* Structure representing each chunk in the cache */
typedef struct H5O_chunk_proxy_t {
- H5AC_info_t cache_info; /* Information for metadata cache functions, _must_ be */
- /* first field in structure */
+ H5AC_info_t cache_info; /* Information for metadata cache functions, _must_ be */
+ /* first field in structure */
- H5O_t *oh; /* Object header for this chunk */
- unsigned chunkno; /* Chunk number for this chunk */
+ H5O_t * oh; /* Object header for this chunk */
+ unsigned chunkno; /* Chunk number for this chunk */
} H5O_chunk_proxy_t;
/* Callback information for loading object header chunk from disk */
typedef struct H5O_chk_cache_ud_t {
- hbool_t decoding; /* Whether the object header is being decoded */
- H5O_t *oh; /* Object header for this chunk */
- unsigned chunkno; /* Index of chunk being brought in (for re-loads) */
- size_t size; /* Size of chunk in the file */
- H5O_common_cache_ud_t common; /* Common object header cache callback info */
+ hbool_t decoding; /* Whether the object header is being decoded */
+ H5O_t * oh; /* Object header for this chunk */
+ unsigned chunkno; /* Index of chunk being brought in (for re-loads) */
+ size_t size; /* Size of chunk in the file */
+ H5O_common_cache_ud_t common; /* Common object header cache callback info */
} H5O_chk_cache_ud_t;
-
/* H5O object header inherits cache-like properties from H5AC */
H5_DLLVAR const H5AC_class_t H5AC_OHDR[1];
@@ -506,7 +492,6 @@ H5_DLLVAR const H5O_msg_class_t H5O_MSG_REFCOUNT[1];
/* Placeholder for unknown message. (0x0017) */
H5_DLLVAR const H5O_msg_class_t H5O_MSG_UNKNOWN[1];
-
/*
* Object header "object" types
*/
@@ -520,88 +505,75 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1];
/* Datatype Object. (H5O_TYPE_NAMED_DATATYPE - 2) */
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1];
-
/* Package-local function prototypes */
H5_DLL herr_t H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg);
H5_DLL herr_t H5O_flush_msgs(H5F_t *f, H5O_t *oh);
-H5_DLL hid_t H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
+H5_DLL hid_t H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
H5_DLL herr_t H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_mesg_t *mesg);
-H5_DLL const H5O_obj_class_t * H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id);
-H5_DLL int H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted);
-H5_DLL herr_t H5O_inc_rc(H5O_t *oh);
-H5_DLL herr_t H5O_dec_rc(H5O_t *oh);
-H5_DLL herr_t H5O_free(H5O_t *oh);
+H5_DLL const H5O_obj_class_t *H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id);
+H5_DLL int H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted);
+H5_DLL herr_t H5O_inc_rc(H5O_t *oh);
+H5_DLL herr_t H5O_dec_rc(H5O_t *oh);
+H5_DLL herr_t H5O_free(H5O_t *oh);
/* Object header message routines */
-H5_DLL herr_t H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- const H5O_msg_class_t *type, unsigned *mesg_flags, void *mesg,
- size_t *mesg_idx);
-H5_DLL herr_t H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags,
- void *mesg);
-H5_DLL herr_t H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags,
- void *mesg);
-H5_DLL void *H5O_msg_free_real(const H5O_msg_class_t *type, void *mesg);
-H5_DLL herr_t H5O_msg_free_mesg(H5O_mesg_t *mesg);
+H5_DLL herr_t H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
+ unsigned *mesg_flags, void *mesg, size_t *mesg_idx);
+H5_DLL herr_t H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
+ unsigned mesg_flags, unsigned update_flags, void *mesg);
+H5_DLL herr_t H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
+ unsigned mesg_flags, unsigned update_flags, void *mesg);
+H5_DLL void * H5O_msg_free_real(const H5O_msg_class_t *type, void *mesg);
+H5_DLL herr_t H5O_msg_free_mesg(H5O_mesg_t *mesg);
H5_DLL unsigned H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type);
-H5_DLL herr_t H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
- int sequence, H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id);
-H5_DLL void *H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src,
- void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
- unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence,
+ H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id);
+H5_DLL void * H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
+ hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
+ void *udata, hid_t dxpl_id);
H5_DLL herr_t H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
- const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id);
+ const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id);
/* Object header chunk routines */
H5_DLL herr_t H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx);
-H5_DLL H5O_chunk_proxy_t *H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- unsigned idx);
-H5_DLL herr_t H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id,
- H5O_chunk_proxy_t *chk_proxy, hbool_t chk_dirtied);
+H5_DLL H5O_chunk_proxy_t *H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx);
+H5_DLL herr_t H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy, hbool_t chk_dirtied);
H5_DLL herr_t H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx);
H5_DLL herr_t H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy);
H5_DLL herr_t H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx);
/* Collect storage info for btree and heap */
-H5_DLL herr_t H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5_ih_info_t *bh_info);
+H5_DLL herr_t H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info);
/* Object header allocation routines */
H5_DLL herr_t H5O_alloc_msgs(H5O_t *oh, size_t min_alloc);
-H5_DLL herr_t H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- const H5O_msg_class_t *type, const void *mesg, size_t *mesg_idx);
+H5_DLL herr_t H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg,
+ size_t *mesg_idx);
H5_DLL herr_t H5O_condense_header(H5F_t *f, H5O_t *oh, hid_t dxpl_id);
-H5_DLL herr_t H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- H5O_mesg_t *mesg, hbool_t adj_link);
+H5_DLL herr_t H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link);
/* Shared object operators */
-H5_DLL void * H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned *ioflags, const uint8_t *buf, const H5O_msg_class_t *type);
-H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg);
+H5_DLL void *H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags, const uint8_t *buf,
+ const H5O_msg_class_t *type);
+H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_mesg);
H5_DLL size_t H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg);
-H5_DLL herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- const H5O_msg_class_t *mesg_type, H5O_shared_t *sh_mesg);
-H5_DLL herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- const H5O_msg_class_t *mesg_type, H5O_shared_t *sh_mesg);
-H5_DLL herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
- const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
- hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
- void *udata, hid_t dxpl_id);
-H5_DLL herr_t H5O_shared_post_copy_file (H5F_t *f,
- const H5O_msg_class_t *mesg_type, const H5O_shared_t *shared_src,
- H5O_shared_t *shared_dst, unsigned *mesg_flags, hid_t dxpl_id,
- H5O_copy_t *cpy_info);
-H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream,
- int indent, int fwidth);
+H5_DLL herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, const H5O_msg_class_t *mesg_type,
+ H5O_shared_t *sh_mesg);
+H5_DLL herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, const H5O_msg_class_t *mesg_type,
+ H5O_shared_t *sh_mesg);
+H5_DLL herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type,
+ const void *_native_src, void *_native_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
+H5_DLL herr_t H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
+ const H5O_shared_t *shared_src, H5O_shared_t *shared_dst,
+ unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info);
+H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth);
/* Attribute message operators */
H5_DLL herr_t H5O_attr_reset(void *_mesg);
H5_DLL herr_t H5O_attr_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
H5_DLL herr_t H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
-H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- hsize_t *nattrs);
-
+H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs);
/* These functions operate on object locations */
H5_DLL H5O_loc_t *H5O_get_loc(hid_t id);
@@ -621,7 +593,7 @@ H5_DLL herr_t H5O_get_rc(const H5O_loc_t *oloc, hid_t dxpl_id, unsigned *rc);
#ifdef H5O_DEBUG
H5_DLL herr_t H5O_assert(const H5O_t *oh);
#endif /* H5O_DEBUG */
-H5_DLL herr_t H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent,
+ int fwidth);
#endif /* _H5Opkg_H */
-
diff --git a/src/H5Opline.c b/src/H5Opline.c
index adaee33..fae2d9e 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -6,117 +6,114 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Wednesday, April 15, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, April 15, 1998
*
- * Purpose: Data filter pipeline message.
+ * Purpose: Data filter pipeline message.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5Z_PACKAGE /*suppress error about including H5Zpkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Zpkg.h" /* Data filters */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5Z_PACKAGE /*suppress error about including H5Zpkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Zpkg.h" /* Data filters */
/* PRIVATE PROTOTYPES */
static herr_t H5O_pline_encode(H5F_t *f, uint8_t *p, const void *mesg);
-static void *H5O_pline_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void *H5O_pline_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static void *H5O_pline_copy(const void *_mesg, void *_dest);
static size_t H5O_pline_size(const H5F_t *f, const void *_mesg);
static herr_t H5O_pline_reset(void *_mesg);
static herr_t H5O_pline_free(void *_mesg);
-static herr_t H5O_pline_pre_copy_file(H5F_t *file_src,
- const void *mesg_src, hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
-static herr_t H5O_pline_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_pline_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *_udata);
+static herr_t H5O_pline_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_PLINE
-#define H5O_SHARED_DECODE H5O_pline_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_pline_decode
-#define H5O_SHARED_ENCODE H5O_pline_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_pline_encode
-#define H5O_SHARED_SIZE H5O_pline_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_pline_size
-#define H5O_SHARED_DELETE H5O_pline_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_PLINE
+#define H5O_SHARED_DECODE H5O_pline_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_pline_decode
+#define H5O_SHARED_ENCODE H5O_pline_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_pline_encode
+#define H5O_SHARED_SIZE H5O_pline_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_pline_size
+#define H5O_SHARED_DELETE H5O_pline_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O_pline_shared_link
+#define H5O_SHARED_LINK H5O_pline_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O_pline_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O_pline_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
-#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_pline_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_pline_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#undef H5O_SHARED_POST_COPY_FILE_UPD
+#define H5O_SHARED_DEBUG H5O_pline_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O_pline_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_PLINE[1] = {{
- H5O_PLINE_ID, /* message id number */
- "filter pipeline", /* message name for debugging */
- sizeof(H5O_pline_t), /* native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_pline_shared_decode, /* decode message */
- H5O_pline_shared_encode, /* encode message */
- H5O_pline_copy, /* copy the native value */
- H5O_pline_shared_size, /* size of raw message */
- H5O_pline_reset, /* reset method */
- H5O_pline_free, /* free method */
- H5O_pline_shared_delete, /* file delete method */
- H5O_pline_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- H5O_pline_pre_copy_file, /* pre copy native value to file */
- H5O_pline_shared_copy_file, /* copy native value to file */
- H5O_pline_shared_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_pline_shared_debug /* debug the message */
+ H5O_PLINE_ID, /* message id number */
+ "filter pipeline", /* message name for debugging */
+ sizeof(H5O_pline_t), /* native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O_pline_shared_decode, /* decode message */
+ H5O_pline_shared_encode, /* encode message */
+ H5O_pline_copy, /* copy the native value */
+ H5O_pline_shared_size, /* size of raw message */
+ H5O_pline_reset, /* reset method */
+ H5O_pline_free, /* free method */
+ H5O_pline_shared_delete, /* file delete method */
+ H5O_pline_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ H5O_pline_pre_copy_file, /* pre copy native value to file */
+ H5O_pline_shared_copy_file, /* copy native value to file */
+ H5O_pline_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_pline_shared_debug /* debug the message */
}};
-
/* Declare a free list to manage the H5O_pline_t struct */
H5FL_DEFINE(H5O_pline_t);
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_decode
+ * Function: H5O_pline_decode
*
- * Purpose: Decodes a filter pipeline message.
+ * Purpose: Decodes a filter pipeline message.
*
- * Return: Success: Ptr to the native message.
- * Failure: NULL
+ * Return: Success: Ptr to the native message.
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
*/
static void *
H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t p_size,
+ const uint8_t *p)
{
- H5O_pline_t *pline = NULL; /* Pipeline message */
- H5Z_filter_info_t *filter; /* Filter to decode */
- size_t name_length; /* Length of filter name */
- size_t i; /* Local index variable */
- const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
- void *ret_value = NULL; /* Return value */
+ H5O_pline_t * pline = NULL; /* Pipeline message */
+ H5Z_filter_info_t *filter; /* Filter to decode */
+ size_t name_length; /* Length of filter name */
+ size_t i; /* Local index variable */
+ const uint8_t * p_end = p + p_size - 1; /* End of the p buffer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -124,17 +121,17 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
HDassert(p);
/* Allocate space for I/O pipeline message */
- if(NULL == (pline = H5FL_CALLOC(H5O_pline_t)))
+ if (NULL == (pline = H5FL_CALLOC(H5O_pline_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Version */
pline->version = *p++;
- if(pline->version < H5O_PLINE_VERSION_1 || pline->version > H5O_PLINE_VERSION_LATEST)
+ if (pline->version < H5O_PLINE_VERSION_1 || pline->version > H5O_PLINE_VERSION_LATEST)
HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "bad version number for filter pipeline message")
/* Number of filters */
pline->nused = *p++;
- if(pline->nused > H5Z_MAX_NFILTERS) {
+ if (pline->nused > H5Z_MAX_NFILTERS) {
/* Reset the number of filters used to avoid array traversal in error
* handling code.
@@ -145,25 +142,25 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
}
/* Reserved */
- if(pline->version == H5O_PLINE_VERSION_1)
+ if (pline->version == H5O_PLINE_VERSION_1)
p += 6;
/* Allocate array for filters */
pline->nalloc = pline->nused;
- if(NULL == (pline->filter = (H5Z_filter_info_t *)H5MM_calloc(pline->nalloc * sizeof(pline->filter[0]))))
+ if (NULL == (pline->filter = (H5Z_filter_info_t *)H5MM_calloc(pline->nalloc * sizeof(pline->filter[0]))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Decode filters */
- for(i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) {
+ for (i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) {
/* Filter ID */
UINT16DECODE(p, filter->id);
/* Length of filter name */
- if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED)
+ if (pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED)
name_length = 0;
else {
UINT16DECODE(p, name_length);
- if(pline->version == H5O_PLINE_VERSION_1 && name_length % 8)
+ if (pline->version == H5O_PLINE_VERSION_1 && name_length % 8)
HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter name length is not a multiple of eight")
} /* end if */
@@ -174,17 +171,17 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
UINT16DECODE(p, filter->cd_nelmts);
/* Filter name, if there is one */
- if(name_length) {
- size_t actual_name_length; /* Actual length of name */
+ if (name_length) {
+ size_t actual_name_length; /* Actual length of name */
/* Determine actual name length (without padding, but with null terminator) */
actual_name_length = HDstrlen((const char *)p) + 1;
HDassert(actual_name_length <= name_length);
/* Allocate space for the filter name, or use the internal buffer */
- if(actual_name_length > H5Z_COMMON_NAME_LEN) {
+ if (actual_name_length > H5Z_COMMON_NAME_LEN) {
filter->name = (char *)H5MM_malloc(actual_name_length);
- if(NULL == filter->name)
+ if (NULL == filter->name)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name")
} /* end if */
else
@@ -195,13 +192,13 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
} /* end if */
/* Filter parameters */
- if(filter->cd_nelmts) {
- size_t j; /* Local index variable */
+ if (filter->cd_nelmts) {
+ size_t j; /* Local index variable */
/* Allocate space for the client data elements, or use the internal buffer */
- if(filter->cd_nelmts > H5Z_COMMON_CD_VALUES) {
+ if (filter->cd_nelmts > H5Z_COMMON_CD_VALUES) {
filter->cd_values = (unsigned *)H5MM_malloc(filter->cd_nelmts * sizeof(unsigned));
- if(NULL == filter->cd_values)
+ if (NULL == filter->cd_values)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for client data")
} /* end if */
else
@@ -214,20 +211,22 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
if (p + 4 - 1 <= p_end)
UINT32DECODE(p, filter->cd_values[j])
else
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "ran off the end of the buffer: current p = %p, p_size = %zu, p_end = %p", p, p_size, p_end)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "ran off the end of the buffer: current p = %p, p_size = %zu, p_end = %p", p,
+ p_size, p_end)
}
- if(pline->version == H5O_PLINE_VERSION_1)
- if(filter->cd_nelmts % 2)
+ if (pline->version == H5O_PLINE_VERSION_1)
+ if (filter->cd_nelmts % 2)
p += 4; /*padding*/
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
/* Set return value */
ret_value = pline;
done:
- if(NULL == ret_value && pline) {
+ if (NULL == ret_value && pline) {
H5O_pline_reset(pline);
H5O_pline_free(pline);
} /* end if */
@@ -235,25 +234,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_decode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_encode
+ * Function: H5O_pline_encode
*
- * Purpose: Encodes message MESG into buffer P.
+ * Purpose: Encodes message MESG into buffer P.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
+H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
{
- const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */
- const H5Z_filter_info_t *filter; /* Filter to encode */
- size_t i, j; /* Local index variables */
+ const H5O_pline_t * pline = (const H5O_pline_t *)mesg; /* Pipeline message to encode */
+ const H5Z_filter_info_t *filter; /* Filter to encode */
+ size_t i, j; /* Local index variables */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -264,37 +262,37 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
/* Message header */
*p++ = (uint8_t)pline->version;
*p++ = (uint8_t)(pline->nused);
- if(pline->version == H5O_PLINE_VERSION_1) {
- *p++ = 0; /*reserved 1*/
- *p++ = 0; /*reserved 2*/
- *p++ = 0; /*reserved 3*/
- *p++ = 0; /*reserved 4*/
- *p++ = 0; /*reserved 5*/
- *p++ = 0; /*reserved 6*/
- } /* end if */
+ if (pline->version == H5O_PLINE_VERSION_1) {
+ *p++ = 0; /*reserved 1*/
+ *p++ = 0; /*reserved 2*/
+ *p++ = 0; /*reserved 3*/
+ *p++ = 0; /*reserved 4*/
+ *p++ = 0; /*reserved 5*/
+ *p++ = 0; /*reserved 6*/
+ } /* end if */
/* Encode filters */
- for(i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) {
- const char *name; /* Filter name */
- size_t name_length; /* Length of filter name */
+ for (i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) {
+ const char *name; /* Filter name */
+ size_t name_length; /* Length of filter name */
/* Filter ID */
- UINT16ENCODE(p, filter->id);
+ UINT16ENCODE(p, filter->id);
/* Skip writing the name length & name if the filter is an internal filter */
- if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) {
+ if (pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) {
name_length = 0;
- name = NULL;
+ name = NULL;
} /* end if */
else {
- H5Z_class2_t *cls; /* Filter class */
+ H5Z_class2_t *cls; /* Filter class */
/*
* Get the filter name. If the pipeline message has a name in it then
* use that one. Otherwise try to look up the filter and get the name
* as it was registered.
*/
- if(NULL == (name = filter->name) && (cls = H5Z_find(filter->id)))
+ if (NULL == (name = filter->name) && (cls = H5Z_find(filter->id)))
name = cls->name;
name_length = name ? HDstrlen(name) + 1 : 0;
@@ -303,140 +301,140 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
} /* end else */
/* Filter flags */
- UINT16ENCODE(p, filter->flags);
+ UINT16ENCODE(p, filter->flags);
/* # of filter parameters */
- UINT16ENCODE(p, filter->cd_nelmts);
+ UINT16ENCODE(p, filter->cd_nelmts);
/* Encode name, if there is one to encode */
- if(name_length > 0) {
+ if (name_length > 0) {
/* Store name, with null terminator */
- HDmemcpy(p, name, name_length);
- p += name_length;
+ HDmemcpy(p, name, name_length);
+ p += name_length;
/* Pad out name to alignment, in older versions */
- if(pline->version == H5O_PLINE_VERSION_1)
- while(name_length++ % 8)
+ if (pline->version == H5O_PLINE_VERSION_1)
+ while (name_length++ % 8)
*p++ = 0;
- } /* end if */
+ } /* end if */
/* Filter parameters */
- for(j = 0; j < filter->cd_nelmts; j++)
- UINT32ENCODE(p, filter->cd_values[j]);
+ for (j = 0; j < filter->cd_nelmts; j++)
+ UINT32ENCODE(p, filter->cd_values[j]);
/* Align the parameters for older versions of the format */
- if(pline->version == H5O_PLINE_VERSION_1)
- if(filter->cd_nelmts % 2)
+ if (pline->version == H5O_PLINE_VERSION_1)
+ if (filter->cd_nelmts % 2)
UINT32ENCODE(p, 0);
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_encode() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_copy
+ * Function: H5O_pline_copy
*
- * Purpose: Copies a filter pipeline message from SRC to DST allocating
- * DST if necessary. If DST is already allocated then we assume
- * that it isn't initialized.
+ * Purpose: Copies a filter pipeline message from SRC to DST allocating
+ * DST if necessary. If DST is already allocated then we assume
+ * that it isn't initialized.
*
- * Return: Success: Ptr to DST or allocated result.
+ * Return: Success: Ptr to DST or allocated result.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_pline_copy(const void *_src, void *_dst/*out*/)
+H5O_pline_copy(const void *_src, void *_dst /*out*/)
{
- const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */
- H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */
- size_t i; /* Local index variable */
- H5O_pline_t *ret_value; /* Return value */
+ const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */
+ H5O_pline_t * dst = (H5O_pline_t *)_dst; /* Destination pipeline message */
+ size_t i; /* Local index variable */
+ H5O_pline_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allocate pipeline message, if not provided */
- if(!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy basic fields */
*dst = *src;
/* Copy over filters, if any */
dst->nalloc = dst->nused;
- if(dst->nalloc) {
+ if (dst->nalloc) {
/* Allocate array to hold filters */
- if(NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0]))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0]))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Deep-copy filters */
- for(i = 0; i < src->nused; i++) {
+ for (i = 0; i < src->nused; i++) {
/* Basic filter information */
dst->filter[i] = src->filter[i];
/* Filter name */
- if(src->filter[i].name) {
- size_t namelen; /* Length of source filter name, including null terminator */
+ if (src->filter[i].name) {
+ size_t namelen; /* Length of source filter name, including null terminator */
namelen = HDstrlen(src->filter[i].name) + 1;
/* Allocate space for the filter name, or use the internal buffer */
- if(namelen > H5Z_COMMON_NAME_LEN) {
+ if (namelen > H5Z_COMMON_NAME_LEN) {
dst->filter[i].name = (char *)H5MM_strdup(src->filter[i].name);
- if(NULL == dst->filter[i].name)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name")
+ if (NULL == dst->filter[i].name)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for filter name")
} /* end if */
else
dst->filter[i].name = dst->filter[i]._name;
} /* end if */
/* Filter parameters */
- if(src->filter[i].cd_nelmts > 0) {
+ if (src->filter[i].cd_nelmts > 0) {
/* Allocate space for the client data elements, or use the internal buffer */
- if(src->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES) {
- if(NULL == (dst->filter[i].cd_values = (unsigned *)H5MM_malloc(src->filter[i].cd_nelmts* sizeof(unsigned))))
+ if (src->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES) {
+ if (NULL == (dst->filter[i].cd_values =
+ (unsigned *)H5MM_malloc(src->filter[i].cd_nelmts * sizeof(unsigned))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemcpy(dst->filter[i].cd_values, src->filter[i].cd_values,
- src->filter[i].cd_nelmts * sizeof(unsigned));
+ src->filter[i].cd_nelmts * sizeof(unsigned));
} /* end if */
else
dst->filter[i].cd_values = dst->filter[i]._cd_values;
} /* end if */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end if */
else
- dst->filter = NULL;
+ dst->filter = NULL;
/* Set return value */
ret_value = dst;
done:
- if(!ret_value && dst) {
+ if (!ret_value && dst) {
H5O_pline_reset(dst);
- if(!_dst)
+ if (!_dst)
H5O_pline_free(dst);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_copy() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_size
+ * Function: H5O_pline_size
*
- * Purpose: Determines the size of a raw filter pipeline message.
+ * Purpose: Determines the size of a raw filter pipeline message.
*
- * Return: Success: Size of message.
+ * Return: Success: Size of message.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@@ -444,59 +442,62 @@ done:
static size_t
H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
{
- const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */
- size_t i; /* Local index variable */
- size_t ret_value; /* Return value */
+ const H5O_pline_t *pline = (const H5O_pline_t *)mesg; /* Pipeline message */
+ size_t i; /* Local index variable */
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Message header */
- ret_value = 1 + /*version */
- 1 + /*number of filters */
- (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0); /*reserved */
+ ret_value = 1 + /*version */
+ 1 + /*number of filters */
+ (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0); /*reserved */
/* Calculate size of each filter in pipeline */
- for(i = 0; i < pline->nused; i++) {
- size_t name_len; /* Length of filter name */
- const char *name; /* Filter name */
+ for (i = 0; i < pline->nused; i++) {
+ size_t name_len; /* Length of filter name */
+ const char *name; /* Filter name */
/* Don't write the name length & name if the filter is an internal filter */
- if(pline->version > H5O_PLINE_VERSION_1 && pline->filter[i].id < H5Z_FILTER_RESERVED)
+ if (pline->version > H5O_PLINE_VERSION_1 && pline->filter[i].id < H5Z_FILTER_RESERVED)
name_len = 0;
else {
- H5Z_class2_t *cls; /* Filter class */
+ H5Z_class2_t *cls; /* Filter class */
/* Get the name of the filter, same as done with H5O_pline_encode() */
- if(NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id)))
+ if (NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id)))
name = cls->name;
name_len = name ? HDstrlen(name) + 1 : 0;
} /* end else */
- ret_value += 2 + /*filter identification number */
- (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */
- 2 + /*flags */
- 2 + /*number of client data values */
- (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */
-
- ret_value += pline->filter[i].cd_nelmts * 4;
- if(pline->version == H5O_PLINE_VERSION_1)
- if(pline->filter[i].cd_nelmts % 2)
+ ret_value +=
+ 2 + /*filter identification number */
+ (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED)
+ ? 2
+ : 0) + /*name length */
+ 2 + /*flags */
+ 2 + /*number of client data values */
+ (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len)
+ : name_len); /*length of the filter name */
+
+ ret_value += pline->filter[i].cd_nelmts * 4;
+ if (pline->version == H5O_PLINE_VERSION_1)
+ if (pline->filter[i].cd_nelmts % 2)
ret_value += 4;
} /* end for */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_size() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_reset
+ * Function: H5O_pline_reset
*
- * Purpose: Resets a filter pipeline message by clearing all filters.
- * The MESG buffer is not freed.
+ * Purpose: Resets a filter pipeline message by clearing all filters.
+ * The MESG buffer is not freed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@@ -504,8 +505,8 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
static herr_t
H5O_pline_reset(void *mesg)
{
- H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */
- size_t i; /* Local index variable */
+ H5O_pline_t *pline = (H5O_pline_t *)mesg; /* Pipeline message */
+ size_t i; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -517,16 +518,15 @@ H5O_pline_reset(void *mesg)
/* Free the filter information and array */
if (pline->filter) {
-
/* Free information for each filter */
- for(i = 0; i < pline->nused; i++) {
- if(pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
+ for (i = 0; i < pline->nused; i++) {
+ if (pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
HDassert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
- if(pline->filter[i].name != pline->filter[i]._name)
+ if (pline->filter[i].name != pline->filter[i]._name)
pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name);
- if(pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
+ if (pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
HDassert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES);
- if(pline->filter[i].cd_values != pline->filter[i]._cd_values)
+ if (pline->filter[i].cd_values != pline->filter[i]._cd_values)
pline->filter[i].cd_values = (unsigned *)H5MM_xfree(pline->filter[i].cd_values);
} /* end for */
@@ -543,15 +543,14 @@ H5O_pline_reset(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_reset() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_free
+ * Function: H5O_pline_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, March 11, 2000
*
*-------------------------------------------------------------------------
@@ -568,7 +567,6 @@ H5O_pline_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_pline_pre_copy_file
*
@@ -585,12 +583,12 @@ H5O_pline_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
+H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hbool_t H5_ATTR_UNUSED *deleted,
+ const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
{
- const H5O_pline_t *pline_src = (const H5O_pline_t *)mesg_src; /* Source datatype */
- H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_pline_t * pline_src = (const H5O_pline_t *)mesg_src; /* Source datatype */
+ H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -601,35 +599,34 @@ H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
* and make a copy of the filter pipeline for later in
* the object copying process.
*/
- if(udata)
- if(NULL == (udata->src_pline = (H5O_pline_t *)H5O_pline_copy(pline_src, NULL)))
+ if (udata)
+ if (NULL == (udata->src_pline = (H5O_pline_t *)H5O_pline_copy(pline_src, NULL)))
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to copy")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_pre_copy_file() */
-
/*-------------------------------------------------------------------------
- * Function: H5O_pline_debug
+ * Function: H5O_pline_debug
*
- * Purpose: Prints debugging information for filter pipeline message MESG
- * on output stream STREAM. Each line is indented INDENT
- * characters and the field name takes up FWIDTH characters.
+ * Purpose: Prints debugging information for filter pipeline message MESG
+ * on output stream STREAM. Each line is indented INDENT
+ * characters and the field name takes up FWIDTH characters.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5O_pline_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
- const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
- size_t i, j;
+ const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
+ size_t i, j;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -640,55 +637,46 @@ H5O_pline_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth,
- "Number of filters:",
- pline->nused,
- pline->nalloc);
+ HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth, "Number of filters:", pline->nused,
+ pline->nalloc);
/* Loop over all the filters */
- for(i = 0; i < pline->nused; i++) {
- char name[32];
-
- HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter identification:",
- (unsigned)(pline->filter[i].id));
- if(pline->filter[i].name)
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:",
- pline->filter[i].name);
- else
- HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:");
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Flags:",
- pline->filter[i].flags);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Num CD values:",
- pline->filter[i].cd_nelmts);
+ for (i = 0; i < pline->nused; i++) {
+ char name[32];
+
+ HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
+ HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter identification:", (unsigned)(pline->filter[i].id));
+ if (pline->filter[i].name)
+ HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter name:", pline->filter[i].name);
+ else
+ HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:");
+ HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Flags:", pline->filter[i].flags);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Num CD values:", pline->filter[i].cd_nelmts);
/* Filter parameters */
- for(j = 0; j < pline->filter[i].cd_nelmts; j++) {
- char field_name[32];
-
- HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6),
- field_name,
- pline->filter[i].cd_values[j]);
- } /* end for */
- } /* end for */
+ for (j = 0; j < pline->filter[i].cd_nelmts; j++) {
+ char field_name[32];
+
+ HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
+ HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
+ pline->filter[i].cd_values[j]);
+ } /* end for */
+ } /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_debug() */
-
/*-------------------------------------------------------------------------
* Function: H5O_pline_set_latest_version
*
* Purpose: Set the encoding for a I/O filter pipeline to the latest version.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Tuesday, July 24, 2007
@@ -708,4 +696,3 @@ H5O_pline_set_latest_version(H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_set_latest_version() */
-
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 1f51705..24bc962 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Oprivate.h
* Aug 5 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Object header private include file.
*
@@ -25,24 +25,24 @@
#define _H5Oprivate_H
/* Include the public header file for this API */
-#include "H5Opublic.h" /* Object header functions */
+#include "H5Opublic.h" /* Object header functions */
/* Public headers needed by this file */
-#include "H5Dpublic.h" /* Dataset functions */
-#include "H5Lpublic.h" /* Link functions */
-#include "H5Spublic.h" /* Dataspace functions */
+#include "H5Dpublic.h" /* Dataset functions */
+#include "H5Lpublic.h" /* Link functions */
+#include "H5Spublic.h" /* Dataspace functions */
/* Private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Fprivate.h" /* File access */
-#include "H5SLprivate.h" /* Skip lists */
-#include "H5Tprivate.h" /* Datatype functions */
-#include "H5Zprivate.h" /* I/O pipeline filters */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Fprivate.h" /* File access */
+#include "H5SLprivate.h" /* Skip lists */
+#include "H5Tprivate.h" /* Datatype functions */
+#include "H5Zprivate.h" /* I/O pipeline filters */
/* Forward references of package typedefs */
typedef struct H5O_msg_class_t H5O_msg_class_t;
-typedef struct H5O_mesg_t H5O_mesg_t;
-typedef struct H5O_t H5O_t;
+typedef struct H5O_mesg_t H5O_mesg_t;
+typedef struct H5O_t H5O_t;
/* Values used to create the shared message & attribute heaps */
/* (Note that these parameters have been tuned so that the resulting heap ID
@@ -50,33 +50,36 @@ typedef struct H5O_t H5O_t;
* directly in an 8 byte integer in memory, think carefully before changing it.
* -QAK)
*/
-#define H5O_FHEAP_MAN_WIDTH 4
-#define H5O_FHEAP_MAN_START_BLOCK_SIZE 1024
-#define H5O_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
-#define H5O_FHEAP_MAN_MAX_INDEX 40
-#define H5O_FHEAP_MAN_START_ROOT_ROWS 1
-#define H5O_FHEAP_CHECKSUM_DBLOCKS TRUE
-#define H5O_FHEAP_MAX_MAN_SIZE (4 * 1024)
-#define H5O_FHEAP_ID_LEN 8
+#define H5O_FHEAP_MAN_WIDTH 4
+#define H5O_FHEAP_MAN_START_BLOCK_SIZE 1024
+#define H5O_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
+#define H5O_FHEAP_MAN_MAX_INDEX 40
+#define H5O_FHEAP_MAN_START_ROOT_ROWS 1
+#define H5O_FHEAP_CHECKSUM_DBLOCKS TRUE
+#define H5O_FHEAP_MAX_MAN_SIZE (4 * 1024)
+#define H5O_FHEAP_ID_LEN 8
/* Object header macros */
-#define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */
-#define H5O_ALL (-1) /* Operate on all messages of type */
-#define H5O_FIRST (-2) /* Operate on first message of type */
+#define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */
+#define H5O_ALL (-1) /* Operate on all messages of type */
+#define H5O_FIRST (-2) /* Operate on first message of type */
/* Flags needed when encoding messages */
-#define H5O_MSG_FLAG_CONSTANT 0x01u
-#define H5O_MSG_FLAG_SHARED 0x02u
-#define H5O_MSG_FLAG_DONTSHARE 0x04u
+#define H5O_MSG_FLAG_CONSTANT 0x01u
+#define H5O_MSG_FLAG_SHARED 0x02u
+#define H5O_MSG_FLAG_DONTSHARE 0x04u
#define H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE 0x08u
-#define H5O_MSG_FLAG_MARK_IF_UNKNOWN 0x10u
-#define H5O_MSG_FLAG_WAS_UNKNOWN 0x20u
-#define H5O_MSG_FLAG_SHAREABLE 0x40u
-#define H5O_MSG_FLAG_BITS (H5O_MSG_FLAG_CONSTANT|H5O_MSG_FLAG_SHARED|H5O_MSG_FLAG_DONTSHARE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE|H5O_MSG_FLAG_MARK_IF_UNKNOWN|H5O_MSG_FLAG_WAS_UNKNOWN|H5O_MSG_FLAG_SHAREABLE)
+#define H5O_MSG_FLAG_MARK_IF_UNKNOWN 0x10u
+#define H5O_MSG_FLAG_WAS_UNKNOWN 0x20u
+#define H5O_MSG_FLAG_SHAREABLE 0x40u
+#define H5O_MSG_FLAG_BITS \
+ (H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_SHARED | H5O_MSG_FLAG_DONTSHARE | \
+ H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE | H5O_MSG_FLAG_MARK_IF_UNKNOWN | \
+ H5O_MSG_FLAG_WAS_UNKNOWN | H5O_MSG_FLAG_SHAREABLE)
/* Flags for updating messages */
-#define H5O_UPDATE_TIME 0x01u
-#define H5O_UPDATE_FORCE 0x02u /* Force updating the message */
+#define H5O_UPDATE_TIME 0x01u
+#define H5O_UPDATE_FORCE 0x02u /* Force updating the message */
/* Hash value constants */
#define H5O_HASH_SIZE 32
@@ -85,158 +88,164 @@ typedef struct H5O_t H5O_t;
/* #define H5O_ENABLE_BOGUS */
/* ========= Object Creation properties ============ */
-#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */
-#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */
-#define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */
-#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */
-#define H5O_CRT_PIPELINE_DEF {{0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL}
+#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */
+#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */
+#define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */
+#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */
+#define H5O_CRT_PIPELINE_DEF \
+ { \
+ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \
+ }
#ifdef H5O_ENABLE_BOGUS
-#define H5O_BOGUS_MSG_FLAGS_NAME "bogus msg flags" /* Flags for 'bogus' message */
-#define H5O_BOGUS_MSG_FLAGS_SIZE sizeof(uint8_t)
+#define H5O_BOGUS_MSG_FLAGS_NAME "bogus msg flags" /* Flags for 'bogus' message */
+#define H5O_BOGUS_MSG_FLAGS_SIZE sizeof(uint8_t)
/* bogus ID can be either (a) H5O_BOGUS_VALID_ID or (b) H5O_BOGUS_INVALID_ID */
-#define H5O_BOGUS_MSG_ID_NAME "bogus msg id" /* ID for 'bogus' message */
-#define H5O_BOGUS_MSG_ID_SIZE sizeof(unsigned)
+#define H5O_BOGUS_MSG_ID_NAME "bogus msg id" /* ID for 'bogus' message */
+#define H5O_BOGUS_MSG_ID_SIZE sizeof(unsigned)
#endif /* H5O_ENABLE_BOGUS */
+
#ifdef H5O_ENABLE_BAD_MESG_COUNT
-#define H5O_BAD_MESG_COUNT_NAME "bad message count" /* Flag setting bad message count */
-#define H5O_BAD_MESG_COUNT_SIZE sizeof(hbool_t)
+#define H5O_BAD_MESG_COUNT_NAME "bad message count" /* Flag setting bad message count */
+#define H5O_BAD_MESG_COUNT_SIZE sizeof(hbool_t)
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
/* ========= Object Copy properties ============ */
-#define H5O_CPY_OPTION_NAME "copy object" /* Copy options */
-#define H5O_CPY_MERGE_COMM_DT_LIST_NAME "merge committed dtype list" /* List of datatype paths to search in the dest file for merging */
-#define H5O_CPY_MCDT_SEARCH_CB_NAME "committed dtype list search" /* Callback function when the search for a matching committed datatype is complete */
+#define H5O_CPY_OPTION_NAME "copy object" /* Copy options */
+#define H5O_CPY_MERGE_COMM_DT_LIST_NAME \
+ "merge committed dtype list" /* List of datatype paths to search in the dest file for merging */
+#define H5O_CPY_MCDT_SEARCH_CB_NAME \
+ "committed dtype list search" /* Callback function when the search for a matching committed datatype is \
+ complete */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5O_PACKAGE
-#define H5O_OH_GET_ADDR(O) ((O)->chunk[0].addr)
+#define H5O_OH_GET_ADDR(O) ((O)->chunk[0].addr)
#else /* H5O_PACKAGE */
-#define H5O_OH_GET_ADDR(O) (H5O_get_oh_addr(O))
+#define H5O_OH_GET_ADDR(O) (H5O_get_oh_addr(O))
#endif /* H5O_PACKAGE */
/* Set the fields in a shared message structure */
-#define H5O_UPDATE_SHARED(SH_MESG, SH_TYPE, F, MSG_TYPE, CRT_IDX, OH_ADDR) \
- { \
- (SH_MESG)->type = (SH_TYPE); \
- (SH_MESG)->file = (F); \
- (SH_MESG)->msg_type_id = (MSG_TYPE); \
- (SH_MESG)->u.loc.index = (CRT_IDX); \
- (SH_MESG)->u.loc.oh_addr = (OH_ADDR); \
+#define H5O_UPDATE_SHARED(SH_MESG, SH_TYPE, F, MSG_TYPE, CRT_IDX, OH_ADDR) \
+ { \
+ (SH_MESG)->type = (SH_TYPE); \
+ (SH_MESG)->file = (F); \
+ (SH_MESG)->msg_type_id = (MSG_TYPE); \
+ (SH_MESG)->u.loc.index = (CRT_IDX); \
+ (SH_MESG)->u.loc.oh_addr = (OH_ADDR); \
} /* end block */
-
/* Fractal heap ID type for shared message & attribute heap IDs. */
typedef union {
- uint8_t id[H5O_FHEAP_ID_LEN]; /* Buffer to hold ID, for encoding/decoding */
- uint64_t val; /* Value, for quick comparisons */
+ uint8_t id[H5O_FHEAP_ID_LEN]; /* Buffer to hold ID, for encoding/decoding */
+ uint64_t val; /* Value, for quick comparisons */
} H5O_fheap_id_t;
/* The object location information for an object */
typedef struct H5O_loc_t {
- H5F_t *file; /* File that object header is located within */
- haddr_t addr; /* File address of object header */
- hbool_t holding_file; /* True if this object header has incremented
- * its file's count of open objects. */
+ H5F_t * file; /* File that object header is located within */
+ haddr_t addr; /* File address of object header */
+ hbool_t holding_file; /* True if this object header has incremented
+ * its file's count of open objects. */
} H5O_loc_t;
/* Typedef for linked list of datatype merge suggestions */
typedef struct H5O_copy_dtype_merge_list_t {
- char *path; /* Path to datatype in destination file */
+ char * path; /* Path to datatype in destination file */
struct H5O_copy_dtype_merge_list_t *next; /* Next object in list */
} H5O_copy_dtype_merge_list_t;
/* Structure for callback property before searching the global list of committed datatypes at destination */
typedef struct H5O_mcdt_cb_info_t {
- H5O_mcdt_search_cb_t func;
- void *user_data;
+ H5O_mcdt_search_cb_t func;
+ void * user_data;
} H5O_mcdt_cb_info_t;
/* Settings/flags for copying an object */
typedef struct H5O_copy_t {
- hbool_t copy_shallow; /* Flag to perform shallow hierarchy copy */
- hbool_t expand_soft_link; /* Flag to expand soft links */
- hbool_t expand_ext_link; /* Flag to expand external links */
- hbool_t expand_ref; /* Flag to expand object references */
- hbool_t copy_without_attr; /* Flag to not copy attributes */
- hbool_t preserve_null; /* Flag to not delete NULL messages */
- hbool_t merge_comm_dt; /* Flag to merge committed datatypes in dest file */
+ hbool_t copy_shallow; /* Flag to perform shallow hierarchy copy */
+ hbool_t expand_soft_link; /* Flag to expand soft links */
+ hbool_t expand_ext_link; /* Flag to expand external links */
+ hbool_t expand_ref; /* Flag to expand object references */
+ hbool_t copy_without_attr; /* Flag to not copy attributes */
+ hbool_t preserve_null; /* Flag to not delete NULL messages */
+ hbool_t merge_comm_dt; /* Flag to merge committed datatypes in dest file */
H5O_copy_dtype_merge_list_t *dst_dt_suggestion_list; /* Suggestions for merging committed datatypes */
- int curr_depth; /* Current depth in hierarchy copied */
- int max_depth; /* Maximum depth in hierarchy to copy */
- H5SL_t *map_list; /* Skip list to hold address mappings */
- H5SL_t *dst_dt_list; /* Skip list to hold committed datatypes in dest file */
- hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only populated with "suggestions" from H5Padd_merge_committed_dtype_path) */
- H5O_t *oh_dst; /* The destination object header */
- void *shared_fo; /* The shared pointer for the object */
- H5O_mcdt_search_cb_t mcdt_cb; /* The callback to invoke before searching the global list of committed datatypes at destination */
- void *mcdt_ud; /* User data passed to callback */
+ int curr_depth; /* Current depth in hierarchy copied */
+ int max_depth; /* Maximum depth in hierarchy to copy */
+ H5SL_t * map_list; /* Skip list to hold address mappings */
+ H5SL_t * dst_dt_list; /* Skip list to hold committed datatypes in dest file */
+ hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only
+ populated with "suggestions" from H5Padd_merge_committed_dtype_path) */
+ H5O_t * oh_dst; /* The destination object header */
+ void * shared_fo; /* The shared pointer for the object */
+ H5O_mcdt_search_cb_t mcdt_cb; /* The callback to invoke before searching the global list of committed
+ datatypes at destination */
+ void *mcdt_ud; /* User data passed to callback */
} H5O_copy_t;
/* Header message IDs */
-#define H5O_NULL_ID 0x0000 /* Null Message. */
-#define H5O_SDSPACE_ID 0x0001 /* Dataspace Message. */
-#define H5O_LINFO_ID 0x0002 /* Link info Message. */
-#define H5O_DTYPE_ID 0x0003 /* Datatype Message. */
-#define H5O_FILL_ID 0x0004 /* Fill Value Message. (Old) */
-#define H5O_FILL_NEW_ID 0x0005 /* Fill Value Message. (New) */
-#define H5O_LINK_ID 0x0006 /* Link Message. */
-#define H5O_EFL_ID 0x0007 /* External File List Message */
-#define H5O_LAYOUT_ID 0x0008 /* Data Layout Message. */
-#define H5O_BOGUS_VALID_ID 0x0009 /* "Bogus valid" Message. */
-#define H5O_GINFO_ID 0x000a /* Group info Message. */
-#define H5O_PLINE_ID 0x000b /* Filter pipeline message. */
-#define H5O_ATTR_ID 0x000c /* Attribute Message. */
-#define H5O_NAME_ID 0x000d /* Object name message. */
-#define H5O_MTIME_ID 0x000e /* Modification time message. (Old) */
-#define H5O_SHMESG_ID 0x000f /* Shared message "SOHM" table. */
-#define H5O_CONT_ID 0x0010 /* Object header continuation message. */
-#define H5O_STAB_ID 0x0011 /* Symbol table message. */
-#define H5O_MTIME_NEW_ID 0x0012 /* Modification time message. (New) */
-#define H5O_BTREEK_ID 0x0013 /* v1 B-tree 'K' values message. */
-#define H5O_DRVINFO_ID 0x0014 /* Driver info message. */
-#define H5O_AINFO_ID 0x0015 /* Attribute info message. */
-#define H5O_REFCOUNT_ID 0x0016 /* Reference count message. */
-#define H5O_UNKNOWN_ID 0x0017 /* Placeholder message ID for unknown message. */
- /* (this should never exist in a file) */
-
+#define H5O_NULL_ID 0x0000 /* Null Message. */
+#define H5O_SDSPACE_ID 0x0001 /* Dataspace Message. */
+#define H5O_LINFO_ID 0x0002 /* Link info Message. */
+#define H5O_DTYPE_ID 0x0003 /* Datatype Message. */
+#define H5O_FILL_ID 0x0004 /* Fill Value Message. (Old) */
+#define H5O_FILL_NEW_ID 0x0005 /* Fill Value Message. (New) */
+#define H5O_LINK_ID 0x0006 /* Link Message. */
+#define H5O_EFL_ID 0x0007 /* External File List Message */
+#define H5O_LAYOUT_ID 0x0008 /* Data Layout Message. */
+#define H5O_BOGUS_VALID_ID 0x0009 /* "Bogus valid" Message. */
+#define H5O_GINFO_ID 0x000a /* Group info Message. */
+#define H5O_PLINE_ID 0x000b /* Filter pipeline message. */
+#define H5O_ATTR_ID 0x000c /* Attribute Message. */
+#define H5O_NAME_ID 0x000d /* Object name message. */
+#define H5O_MTIME_ID 0x000e /* Modification time message. (Old) */
+#define H5O_SHMESG_ID 0x000f /* Shared message "SOHM" table. */
+#define H5O_CONT_ID 0x0010 /* Object header continuation message. */
+#define H5O_STAB_ID 0x0011 /* Symbol table message. */
+#define H5O_MTIME_NEW_ID 0x0012 /* Modification time message. (New) */
+#define H5O_BTREEK_ID 0x0013 /* v1 B-tree 'K' values message. */
+#define H5O_DRVINFO_ID 0x0014 /* Driver info message. */
+#define H5O_AINFO_ID 0x0015 /* Attribute info message. */
+#define H5O_REFCOUNT_ID 0x0016 /* Reference count message. */
+#define H5O_UNKNOWN_ID 0x0017 /* Placeholder message ID for unknown message. */
+ /* (this should never exist in a file) */
/*
* Note: Must increment H5O_MSG_TYPES in H5Opkg.h and update H5O_msg_class_g
* in H5O.c when creating a new message type. Also bump the value of
* H5O_BOGUS_INVALID_ID, below, to be one greater than the value of
- * H5O_UNKNOWN_ID.
+ * H5O_UNKNOWN_ID, and re-run gen_bogus.c.
*
* (this should never exist in a file)
*/
-#define H5O_BOGUS_INVALID_ID 0x0018 /* "Bogus invalid" Message. */
+#define H5O_BOGUS_INVALID_ID 0x0018 /* "Bogus invalid" Message. */
/* Shared object message types.
* Shared objects can be committed, in which case the shared message contains
* the location of the object header that holds the message, or shared in the
* heap, in which case the shared message holds their heap ID.
*/
-#define H5O_SHARE_TYPE_UNSHARED 0 /* Message is not shared */
-#define H5O_SHARE_TYPE_SOHM 1 /* Message is stored in SOHM heap */
-#define H5O_SHARE_TYPE_COMMITTED 2 /* Message is stored in another object header */
-#define H5O_SHARE_TYPE_HERE 3 /* Message is stored in this object header, but is sharable */
+#define H5O_SHARE_TYPE_UNSHARED 0 /* Message is not shared */
+#define H5O_SHARE_TYPE_SOHM 1 /* Message is stored in SOHM heap */
+#define H5O_SHARE_TYPE_COMMITTED 2 /* Message is stored in another object header */
+#define H5O_SHARE_TYPE_HERE 3 /* Message is stored in this object header, but is sharable */
/* Detect messages that aren't stored in message's object header */
-#define H5O_IS_STORED_SHARED(T) ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? TRUE : FALSE)
+#define H5O_IS_STORED_SHARED(T) \
+ ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? TRUE : FALSE)
/* Detect shared messages that are "tracked" in some other location */
#define H5O_IS_TRACKED_SHARED(T) ((T) > 0)
-
/* Specify the object header address and index needed
* to locate a message in another object header.
*/
typedef struct H5O_mesg_loc_t {
- H5O_msg_crt_idx_t index; /* index within object header */
- haddr_t oh_addr; /* address of object header */
+ H5O_msg_crt_idx_t index; /* index within object header */
+ haddr_t oh_addr; /* address of object header */
} H5O_mesg_loc_t;
-
/*
* Shared object header message info.
*
@@ -244,16 +253,15 @@ typedef struct H5O_mesg_loc_t {
* include a H5O_shared_t struct as the first field in their "native" type)
*/
typedef struct H5O_shared_t {
- unsigned type; /* Type describing how message is shared */
- H5F_t *file; /* File that message is located within */
- unsigned msg_type_id; /* Message's type ID */
+ unsigned type; /* Type describing how message is shared */
+ H5F_t * file; /* File that message is located within */
+ unsigned msg_type_id; /* Message's type ID */
union {
- H5O_mesg_loc_t loc; /* Object location info */
- H5O_fheap_id_t heap_id; /* ID within the SOHM heap */
+ H5O_mesg_loc_t loc; /* Object location info */
+ H5O_fheap_id_t heap_id; /* ID within the SOHM heap */
} u;
} H5O_shared_t;
-
/*
* Link Info Message.
* (Contains dynamic information about links in a group)
@@ -268,24 +276,24 @@ typedef struct H5O_shared_t {
*/
typedef struct H5O_linfo_t {
/* Creation order info */
- hbool_t track_corder; /* Are creation order values tracked on links? */
- hbool_t index_corder; /* Are creation order values indexed on links? */
- int64_t max_corder; /* Current max. creation order value for group */
- haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of links */
+ hbool_t track_corder; /* Are creation order values tracked on links? */
+ hbool_t index_corder; /* Are creation order values indexed on links? */
+ int64_t max_corder; /* Current max. creation order value for group */
+ haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of links */
/* Storage management info */
- hsize_t nlinks; /* Number of links in the group */
- haddr_t fheap_addr; /* Address of fractal heap for storing "dense" links */
- haddr_t name_bt2_addr; /* Address of v2 B-tree for indexing names of links */
+ hsize_t nlinks; /* Number of links in the group */
+ haddr_t fheap_addr; /* Address of fractal heap for storing "dense" links */
+ haddr_t name_bt2_addr; /* Address of v2 B-tree for indexing names of links */
} H5O_linfo_t;
/* Initial version of the "old" fill value information */
/* (It doesn't look like this value was ever used in the file -QAK) */
-#define H5O_FILL_VERSION_1 1
+#define H5O_FILL_VERSION_1 1
/* Revised version of the "new" fill value information */
-#define H5O_FILL_VERSION_2 2
+#define H5O_FILL_VERSION_2 2
/* Version of the "new" fill value information with smaller default format */
-#define H5O_FILL_VERSION_3 3
+#define H5O_FILL_VERSION_3 3
/* The latest version of the format. Look through the 'encode', 'decode'
* and 'size' callback for places to change when updating this. */
@@ -301,15 +309,15 @@ typedef struct H5O_linfo_t {
*/
typedef struct H5O_fill_t {
- H5O_shared_t sh_loc; /* Shared message info (must be first) */
-
- unsigned version; /* Encoding version number */
- H5T_t *type; /*type. Null implies same as dataset */
- ssize_t size; /*number of bytes in the fill value */
- void *buf; /*the fill value */
- H5D_alloc_time_t alloc_time; /* time to allocate space */
- H5D_fill_time_t fill_time; /* time to write fill value */
- hbool_t fill_defined; /* whether fill value is defined */
+ H5O_shared_t sh_loc; /* Shared message info (must be first) */
+
+ unsigned version; /* Encoding version number */
+ H5T_t * type; /*type. Null implies same as dataset */
+ ssize_t size; /*number of bytes in the fill value */
+ void * buf; /*the fill value */
+ H5D_alloc_time_t alloc_time; /* time to allocate space */
+ H5D_fill_time_t fill_time; /* time to write fill value */
+ hbool_t fill_defined; /* whether fill value is defined */
} H5O_fill_t;
/*
@@ -317,28 +325,28 @@ typedef struct H5O_fill_t {
* (Data structure in memory)
*/
typedef struct H5O_link_hard_t {
- haddr_t addr; /* Object header address */
+ haddr_t addr; /* Object header address */
} H5O_link_hard_t;
typedef struct H5O_link_soft_t {
- char *name; /* Destination name */
+ char *name; /* Destination name */
} H5O_link_soft_t;
typedef struct H5O_link_ud_t {
- void *udata; /* Opaque data supplied by the user */
- size_t size; /* Size of udata */
+ void * udata; /* Opaque data supplied by the user */
+ size_t size; /* Size of udata */
} H5O_link_ud_t;
typedef struct H5O_link_t {
- H5L_type_t type; /* Type of link */
- hbool_t corder_valid; /* Creation order for link is valid (not stored) */
- int64_t corder; /* Creation order for link (stored if it's valid) */
- H5T_cset_t cset; /* Character set of link name */
- char *name; /* Link name */
+ H5L_type_t type; /* Type of link */
+ hbool_t corder_valid; /* Creation order for link is valid (not stored) */
+ int64_t corder; /* Creation order for link (stored if it's valid) */
+ H5T_cset_t cset; /* Character set of link name */
+ char * name; /* Link name */
union {
- H5O_link_hard_t hard; /* Information for hard links */
- H5O_link_soft_t soft; /* Information for soft links */
- H5O_link_ud_t ud; /* Information for user-defined links */
+ H5O_link_hard_t hard; /* Information for hard links */
+ H5O_link_soft_t soft; /* Information for soft links */
+ H5O_link_ud_t ud; /* Information for user-defined links */
} u;
} H5O_link_t;
@@ -346,99 +354,97 @@ typedef struct H5O_link_t {
* External File List Message
* (Data structure in memory)
*/
-#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */
-#define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */
+#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */
+#define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */
typedef struct H5O_efl_entry_t {
- size_t name_offset; /*offset of name within heap */
- char *name; /*malloc'd name */
- off_t offset; /*offset of data within file */
- hsize_t size; /*size allocated within file */
+ size_t name_offset; /*offset of name within heap */
+ char * name; /*malloc'd name */
+ off_t offset; /*offset of data within file */
+ hsize_t size; /*size allocated within file */
} H5O_efl_entry_t;
typedef struct H5O_efl_t {
- haddr_t heap_addr; /*address of name heap */
- size_t nalloc; /*number of slots allocated */
- size_t nused; /*number of slots used */
- H5O_efl_entry_t *slot; /*array of external file entries */
+ haddr_t heap_addr; /*address of name heap */
+ size_t nalloc; /*number of slots allocated */
+ size_t nused; /*number of slots used */
+ H5O_efl_entry_t *slot; /*array of external file entries */
} H5O_efl_t;
-
/*
* Data Layout Message.
* (Data structure in file)
*/
-#define H5O_LAYOUT_NDIMS (H5S_MAX_RANK+1)
+#define H5O_LAYOUT_NDIMS (H5S_MAX_RANK + 1)
/* Initial version of the layout information. Used when space is allocated */
-#define H5O_LAYOUT_VERSION_1 1
+#define H5O_LAYOUT_VERSION_1 1
/* This version added support for delaying allocation */
-#define H5O_LAYOUT_VERSION_2 2
+#define H5O_LAYOUT_VERSION_2 2
/* This version is revised to store just the information needed for each
* storage type, and to straighten out problems with contiguous layout's
* sizes (was encoding them as 4-byte values when they were really n-byte
* values (where n usually is 8)).
*/
-#define H5O_LAYOUT_VERSION_3 3
-
+#define H5O_LAYOUT_VERSION_3 3
/* Forward declaration of structs used below */
-struct H5D_layout_ops_t; /* Defined in H5Dpkg.h */
-struct H5D_chunk_ops_t; /* Defined in H5Dpkg.h */
+struct H5D_layout_ops_t; /* Defined in H5Dpkg.h */
+struct H5D_chunk_ops_t; /* Defined in H5Dpkg.h */
typedef struct H5O_storage_contig_t {
- haddr_t addr; /* File address of data */
- hsize_t size; /* Size of data in bytes */
+ haddr_t addr; /* File address of data */
+ hsize_t size; /* Size of data in bytes */
} H5O_storage_contig_t;
typedef struct H5O_storage_chunk_btree_t {
- haddr_t dset_ohdr_addr; /* File address dataset's object header */
- H5RC_t *shared; /* Ref-counted shared info for B-tree nodes */
+ haddr_t dset_ohdr_addr; /* File address dataset's object header */
+ H5RC_t *shared; /* Ref-counted shared info for B-tree nodes */
} H5O_storage_chunk_btree_t;
typedef struct H5O_storage_chunk_t {
- H5D_chunk_index_t idx_type; /* Type of chunk index */
- haddr_t idx_addr; /* File address of chunk index */
- const struct H5D_chunk_ops_t *ops; /* Pointer to chunked storage operations */
+ H5D_chunk_index_t idx_type; /* Type of chunk index */
+ haddr_t idx_addr; /* File address of chunk index */
+ const struct H5D_chunk_ops_t *ops; /* Pointer to chunked storage operations */
union {
H5O_storage_chunk_btree_t btree; /* Information for v1 B-tree index */
} u;
} H5O_storage_chunk_t;
typedef struct H5O_storage_compact_t {
- hbool_t dirty; /* Dirty flag for compact dataset */
- size_t size; /* Size of buffer in bytes */
- void *buf; /* Buffer for compact dataset */
+ hbool_t dirty; /* Dirty flag for compact dataset */
+ size_t size; /* Size of buffer in bytes */
+ void * buf; /* Buffer for compact dataset */
} H5O_storage_compact_t;
typedef struct H5O_storage_t {
- H5D_layout_t type; /* Type of layout */
+ H5D_layout_t type; /* Type of layout */
union {
- H5O_storage_contig_t contig; /* Information for contiguous storage */
- H5O_storage_chunk_t chunk; /* Information for chunked storage */
- H5O_storage_compact_t compact; /* Information for compact storage */
+ H5O_storage_contig_t contig; /* Information for contiguous storage */
+ H5O_storage_chunk_t chunk; /* Information for chunked storage */
+ H5O_storage_compact_t compact; /* Information for compact storage */
} u;
} H5O_storage_t;
typedef struct H5O_layout_chunk_t {
- unsigned ndims; /* Num dimensions in chunk */
- uint32_t dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in elements */
- uint32_t size; /* Size of chunk in bytes */
- hsize_t nchunks; /* Number of chunks in dataset */
- hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in dataset dimensions */
- hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of chunks in each dimension */
+ unsigned ndims; /* Num dimensions in chunk */
+ uint32_t dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in elements */
+ uint32_t size; /* Size of chunk in bytes */
+ hsize_t nchunks; /* Number of chunks in dataset */
+ hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in dataset dimensions */
+ hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of chunks in each dimension */
} H5O_layout_chunk_t;
typedef struct H5O_layout_t {
- H5D_layout_t type; /* Type of layout */
- unsigned version; /* Version of message */
- const struct H5D_layout_ops_t *ops; /* Pointer to data layout I/O operations */
+ H5D_layout_t type; /* Type of layout */
+ unsigned version; /* Version of message */
+ const struct H5D_layout_ops_t *ops; /* Pointer to data layout I/O operations */
union {
- H5O_layout_chunk_t chunk; /* Information for chunked layout */
+ H5O_layout_chunk_t chunk; /* Information for chunked layout */
} u;
- H5O_storage_t storage; /* Information for storing dataset elements */
+ H5O_storage_t storage; /* Information for storing dataset elements */
} H5O_layout_t;
#ifdef H5O_ENABLE_BOGUS
@@ -446,9 +452,10 @@ typedef struct H5O_layout_t {
* "Bogus" Message.
* (Data structure in memory)
*/
-#define H5O_BOGUS_VALUE 0xdeadbeef
+#define H5O_BOGUS_VALUE 0xdeadbeef
typedef struct H5O_bogus_t {
- unsigned u; /* Hold the bogus info */
+ H5O_shared_t sh_loc; /* Shared message info (must be first) */
+ unsigned u; /* Hold the bogus info */
} H5O_bogus_t;
#endif /* H5O_ENABLE_BOGUS */
@@ -461,19 +468,19 @@ typedef struct H5O_bogus_t {
*/
typedef struct H5O_ginfo_t {
/* "Old" format group info (not stored) */
- uint32_t lheap_size_hint; /* Local heap size hint */
+ uint32_t lheap_size_hint; /* Local heap size hint */
/* "New" format group info (stored) */
/* (storage management info) */
- hbool_t store_link_phase_change;/* Whether to store the link phase change values */
- uint16_t max_compact; /* Maximum # of compact links */
- uint16_t min_dense; /* Minimum # of "dense" links */
+ hbool_t store_link_phase_change; /* Whether to store the link phase change values */
+ uint16_t max_compact; /* Maximum # of compact links */
+ uint16_t min_dense; /* Minimum # of "dense" links */
/* (initial object header size info) */
- hbool_t store_est_entry_info; /* Whether to store the est. entry values */
- uint16_t est_num_entries; /* Estimated # of entries in group */
- uint16_t est_name_len; /* Estimated length of entry name */
+ hbool_t store_est_entry_info; /* Whether to store the est. entry values */
+ uint16_t est_num_entries; /* Estimated # of entries in group */
+ uint16_t est_name_len; /* Estimated length of entry name */
} H5O_ginfo_t;
/*
@@ -482,25 +489,25 @@ typedef struct H5O_ginfo_t {
*/
/* The initial version of the format */
-#define H5O_PLINE_VERSION_1 1
+#define H5O_PLINE_VERSION_1 1
/* This version encodes the message fields more efficiently */
/* (Drops the reserved bytes, doesn't align the name and doesn't encode the
* filter name at all if it's a filter provided by the library)
*/
-#define H5O_PLINE_VERSION_2 2
+#define H5O_PLINE_VERSION_2 2
/* The latest version of the format. Look through the 'encode' and 'size'
* callbacks for places to change when updating this. */
#define H5O_PLINE_VERSION_LATEST H5O_PLINE_VERSION_2
typedef struct H5O_pline_t {
- H5O_shared_t sh_loc; /* Shared message info (must be first) */
+ H5O_shared_t sh_loc; /* Shared message info (must be first) */
- unsigned version; /* Encoding version number */
- size_t nalloc; /*num elements in `filter' array */
- size_t nused; /*num filters defined */
- H5Z_filter_info_t *filter; /*array of filters */
+ unsigned version; /* Encoding version number */
+ size_t nalloc; /*num elements in `filter' array */
+ size_t nused; /*num filters defined */
+ H5Z_filter_info_t *filter; /*array of filters */
} H5O_pline_t;
/*
@@ -509,7 +516,7 @@ typedef struct H5O_pline_t {
*/
typedef struct H5O_name_t {
- char *s; /*ptr to malloc'd memory */
+ char *s; /*ptr to malloc'd memory */
} H5O_name_t;
/*
@@ -519,9 +526,9 @@ typedef struct H5O_name_t {
* (Data structure in memory)
*/
typedef struct H5O_shmesg_table_t {
- haddr_t addr; /*file address of SOHM table */
- unsigned version; /*SOHM table version number */
- unsigned nindexes; /*number of indexes in the table */
+ haddr_t addr; /*file address of SOHM table */
+ unsigned version; /*SOHM table version number */
+ unsigned nindexes; /*number of indexes in the table */
} H5O_shmesg_table_t;
/*
@@ -530,11 +537,11 @@ typedef struct H5O_shmesg_table_t {
*/
typedef struct H5O_cont_t {
- haddr_t addr; /*address of continuation block */
- size_t size; /*size of continuation block */
+ haddr_t addr; /*address of continuation block */
+ size_t size; /*size of continuation block */
/* the following field(s) do not appear on disk */
- unsigned chunkno; /*chunk this mesg refers to */
+ unsigned chunkno; /*chunk this mesg refers to */
} H5O_cont_t;
/*
@@ -542,8 +549,8 @@ typedef struct H5O_cont_t {
* (Data structure in memory)
*/
typedef struct H5O_stab_t {
- haddr_t btree_addr; /*address of B-tree */
- haddr_t heap_addr; /*address of name heap */
+ haddr_t btree_addr; /*address of B-tree */
+ haddr_t heap_addr; /*address of name heap */
} H5O_stab_t;
/*
@@ -553,8 +560,8 @@ typedef struct H5O_stab_t {
* (Data structure in memory)
*/
typedef struct H5O_btreek_t {
- unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree internal node 'K' values */
- unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */
+ unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree internal node 'K' values */
+ unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */
} H5O_btreek_t;
/*
@@ -563,9 +570,9 @@ typedef struct H5O_btreek_t {
* (Data structure in memory)
*/
typedef struct H5O_drvinfo_t {
- char name[9]; /* Driver name */
- size_t len; /* Length of encoded buffer */
- uint8_t *buf; /* Buffer for encoded info */
+ char name[9]; /* Driver name */
+ size_t len; /* Length of encoded buffer */
+ uint8_t *buf; /* Buffer for encoded info */
} H5O_drvinfo_t;
/*
@@ -575,63 +582,61 @@ typedef struct H5O_drvinfo_t {
*/
typedef struct H5O_ainfo_t {
/* Creation order info */
- hbool_t track_corder; /* Are creation order values tracked on attributes? */
- hbool_t index_corder; /* Are creation order values indexed on attributes? */
- H5O_msg_crt_idx_t max_crt_idx; /* Maximum attribute creation index used */
- haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of "dense" attributes */
+ hbool_t track_corder; /* Are creation order values tracked on attributes? */
+ hbool_t index_corder; /* Are creation order values indexed on attributes? */
+ H5O_msg_crt_idx_t max_crt_idx; /* Maximum attribute creation index used */
+ haddr_t
+ corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of "dense" attributes */
/* Storage management info */
- hsize_t nattrs; /* Number of attributes on the object */
- haddr_t fheap_addr; /* Address of fractal heap for storing "dense" attributes */
- haddr_t name_bt2_addr; /* Address of v2 B-tree for indexing names of "dense" attributes */
+ hsize_t nattrs; /* Number of attributes on the object */
+ haddr_t fheap_addr; /* Address of fractal heap for storing "dense" attributes */
+ haddr_t name_bt2_addr; /* Address of v2 B-tree for indexing names of "dense" attributes */
} H5O_ainfo_t;
/*
* Reference Count Message.
* (Data structure in memory)
*/
-typedef uint32_t H5O_refcount_t; /* Contains # of links to object, if >1 */
+typedef uint32_t H5O_refcount_t; /* Contains # of links to object, if >1 */
/*
* "Unknown" Message.
* (Data structure in memory)
*/
-typedef unsigned H5O_unknown_t; /* Original message type ID */
-
+typedef unsigned H5O_unknown_t; /* Original message type ID */
/* Typedef for "application" iteration operations */
-typedef herr_t (*H5O_operator_t)(const void *mesg/*in*/, unsigned idx,
- void *operator_data/*in,out*/);
+typedef herr_t (*H5O_operator_t)(const void *mesg /*in*/, unsigned idx, void *operator_data /*in,out*/);
/* Typedef for "internal library" iteration operations */
-typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, unsigned *oh_modified/*out*/, void *operator_data/*in,out*/);
+typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned *oh_modified /*out*/, void *operator_data /*in,out*/);
/* Some syntactic sugar to make the compiler happy with two different kinds of iterator callbacks */
typedef enum H5O_mesg_operator_type_t {
- H5O_MESG_OP_APP, /* Application callback */
- H5O_MESG_OP_LIB /* Library internal callback */
+ H5O_MESG_OP_APP, /* Application callback */
+ H5O_MESG_OP_LIB /* Library internal callback */
} H5O_mesg_operator_type_t;
/* To indicate that the object header is just modified */
-#define H5O_MODIFY 0x01
+#define H5O_MODIFY 0x01
/* To indicate that the object header is modified and might possibly need to condense messages */
-#define H5O_MODIFY_CONDENSE 0x02
+#define H5O_MODIFY_CONDENSE 0x02
typedef struct {
H5O_mesg_operator_type_t op_type;
union {
- H5O_operator_t app_op; /* Application callback for each message */
- H5O_lib_operator_t lib_op; /* Library internal callback for each message */
+ H5O_operator_t app_op; /* Application callback for each message */
+ H5O_lib_operator_t lib_op; /* Library internal callback for each message */
} u;
} H5O_mesg_operator_t;
-
/* Typedef for abstract object creation */
typedef struct {
- H5O_type_t obj_type; /* Type of object to create */
- void *crt_info; /* Information for object creation callback */
- void *new_obj; /* Pointer to new object created */
+ H5O_type_t obj_type; /* Type of object to create */
+ void * crt_info; /* Information for object creation callback */
+ void * new_obj; /* Pointer to new object created */
} H5O_obj_create_t;
/* Forward declarations for prototype arguments */
@@ -639,96 +644,87 @@ struct H5P_genplist_t;
/* Object header routines */
H5_DLL herr_t H5O_init(void);
-H5_DLL herr_t H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint,
- size_t initial_rc, hid_t ocpl_id, H5O_loc_t *loc/*out*/);
+H5_DLL herr_t H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc, hid_t ocpl_id,
+ H5O_loc_t *loc /*out*/);
H5_DLL herr_t H5O_open(H5O_loc_t *loc);
H5_DLL herr_t H5O_close(H5O_loc_t *loc);
-H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id);
+H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id);
H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot);
H5_DLL H5O_t *H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id);
H5_DLL herr_t H5O_unpin(H5O_t *oh);
H5_DLL herr_t H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id);
-H5_DLL herr_t H5O_unprotect(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh,
- unsigned oh_flags);
+H5_DLL herr_t H5O_unprotect(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, unsigned oh_flags);
H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id);
-H5_DLL herr_t H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- hbool_t force);
+H5_DLL herr_t H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force);
#ifdef H5O_ENABLE_BOGUS
H5_DLL herr_t H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_id, unsigned mesg_flags);
#endif /* H5O_ENABLE_BOGUS */
H5_DLL herr_t H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
H5_DLL herr_t H5O_get_hdr_info(const H5O_loc_t *oloc, hid_t dxpl_id, H5O_hdr_info_t *hdr);
-H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, hid_t dxpl_id, hbool_t want_ih_info,
- H5O_info_t *oinfo);
+H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, hid_t dxpl_id, hbool_t want_ih_info, H5O_info_t *oinfo);
H5_DLL herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id);
H5_DLL herr_t H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, struct H5P_genplist_t *oc_plist);
-H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref);
+H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref);
H5_DLL herr_t H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks);
H5_DLL void *H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
H5_DLL haddr_t H5O_get_oh_addr(const H5O_t *oh);
-H5_DLL herr_t H5O_get_rc_and_type(const H5O_loc_t *oloc, hid_t dxpl_id, unsigned *rc, H5O_type_t *otype);
+H5_DLL herr_t H5O_get_rc_and_type(const H5O_loc_t *oloc, hid_t dxpl_id, unsigned *rc, H5O_type_t *otype);
/* Object header message routines */
H5_DLL herr_t H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
- unsigned update_flags, void *mesg, hid_t dxpl_id);
-H5_DLL herr_t H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
- unsigned mesg_flags, unsigned update_flags, void *mesg);
-H5_DLL herr_t H5O_msg_write(const H5O_loc_t *loc, unsigned type_id,
- unsigned mesg_flags, unsigned update_flags, void *mesg, hid_t dxpl_id);
-H5_DLL herr_t H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- unsigned type_id, unsigned mesg_flags, unsigned update_flags, void *mesg);
-H5_DLL void *H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg,
- hid_t dxpl_id);
-H5_DLL void *H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
- void *mesg);
+ unsigned update_flags, void *mesg, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, unsigned mesg_flags,
+ unsigned update_flags, void *mesg);
+H5_DLL herr_t H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
+ unsigned update_flags, void *mesg, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, unsigned mesg_flags,
+ unsigned update_flags, void *mesg);
+H5_DLL void * H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg, hid_t dxpl_id);
+H5_DLL void * H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, void *mesg);
H5_DLL herr_t H5O_msg_reset(unsigned type_id, void *native);
-H5_DLL void *H5O_msg_free(unsigned type_id, void *mesg);
-H5_DLL void *H5O_msg_copy(unsigned type_id, const void *mesg, void *dst);
-H5_DLL int H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
+H5_DLL void * H5O_msg_free(unsigned type_id, void *mesg);
+H5_DLL void * H5O_msg_copy(unsigned type_id, const void *mesg, void *dst);
+H5_DLL int H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
H5_DLL htri_t H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
H5_DLL htri_t H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id);
-H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence,
- hbool_t adj_link, hid_t dxpl_id);
-H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence,
- H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id);
-H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id,
- const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id);
-H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id,
- hbool_t disable_shared, const void *mesg);
-H5_DLL size_t H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id,
- const void *mesg, size_t extra_raw);
-H5_DLL size_t H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id,
- const void *mesg, size_t extra_raw);
+H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link,
+ hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_operator_t op,
+ void *op_data, hbool_t adj_link, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_t *op,
+ void *op_data, hid_t dxpl_id);
+H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const void *mesg);
+H5_DLL size_t H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg,
+ size_t extra_raw);
+H5_DLL size_t H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *mesg,
+ size_t extra_raw);
H5_DLL htri_t H5O_msg_is_shared(unsigned type_id, const void *mesg);
H5_DLL htri_t H5O_msg_can_share(unsigned type_id, const void *mesg);
H5_DLL htri_t H5O_msg_can_share_in_ohdr(unsigned type_id);
-H5_DLL herr_t H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share,
- void *mesg);
+H5_DLL herr_t H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg);
H5_DLL herr_t H5O_msg_reset_share(unsigned type_id, void *mesg);
-H5_DLL herr_t H5O_msg_get_crt_index(unsigned type_id, const void *mesg,
- H5O_msg_crt_idx_t *crt_idx);
-H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared,
- unsigned char *buf, const void *obj);
-H5_DLL void* H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned type_id, size_t buf_size, const unsigned char *buf);
-H5_DLL herr_t H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned type_id, void *mesg);
-H5_DLL int H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt_idx);
+H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf,
+ const void *obj);
+H5_DLL void * H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, size_t buf_size,
+ const unsigned char *buf);
+H5_DLL herr_t H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, void *mesg);
+H5_DLL int H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
H5_DLL herr_t H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
H5_DLL herr_t H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
/* Object copying routines */
-H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
- hid_t dxpl_id, H5O_copy_t *cpy_info, hbool_t inc_depth,
- H5O_type_t *obj_type, void **udata);
-H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
- H5F_t *file_dst, void *_dst_ref, size_t ref_count, H5R_type_t ref_type,
- H5O_copy_t *cpy_info);
+H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t dxpl_id,
+ H5O_copy_t *cpy_info, hbool_t inc_depth, H5O_type_t *obj_type,
+ void **udata);
+H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id, H5F_t *file_dst,
+ void *_dst_ref, size_t ref_count, H5R_type_t ref_type,
+ H5O_copy_t *cpy_info);
/* Debugging routines */
-H5_DLL herr_t H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
- int fwidth);
+H5_DLL herr_t H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
+ int indent, int fwidth);
+H5_DLL herr_t H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth);
/* These functions operate on object locations */
H5_DLL herr_t H5O_loc_reset(H5O_loc_t *loc);
@@ -745,8 +741,7 @@ H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, hbool_t *fill_chan
H5_DLL herr_t H5O_fill_set_latest_version(H5O_fill_t *fill);
/* Link operators */
-H5_DLL herr_t H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- void *_mesg);
+H5_DLL herr_t H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
/* Filter pipeline operators */
H5_DLL herr_t H5O_pline_set_latest_version(H5O_pline_t *pline);
@@ -755,4 +750,3 @@ H5_DLL herr_t H5O_pline_set_latest_version(H5O_pline_t *pline);
H5_DLL herr_t H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src);
#endif /* _H5Oprivate_H */
-
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 566d0c1..e658299 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: H5Opublic.h
* Aug 5 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5O (object header)
* package.
@@ -26,23 +26,23 @@
#define _H5Opublic_H
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Lpublic.h" /* Links */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5Lpublic.h" /* Links */
/*****************/
/* Public Macros */
/*****************/
/* Flags for object copy (H5Ocopy) */
-#define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /* Copy only immediate members */
-#define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /* Expand soft links into new objects */
-#define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /* Expand external links into new objects */
-#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */
-#define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /* Copy object without copying attributes */
-#define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /* Copy NULL messages (empty space) */
-#define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /* Merge committed datatypes in dest file */
-#define H5O_COPY_ALL (0x007Fu) /* All object copying flags (for internal checking) */
+#define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /* Copy only immediate members */
+#define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /* Expand soft links into new objects */
+#define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /* Expand external links into new objects */
+#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */
+#define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /* Copy object without copying attributes */
+#define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /* Copy NULL messages (empty space) */
+#define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /* Merge committed datatypes in dest file */
+#define H5O_COPY_ALL (0x007Fu) /* All object copying flags (for internal checking) */
/* Flags for shared message indexes.
* Pass these flags in using the mesg_type_flags parameter in
@@ -51,26 +51,30 @@
* but we need to assign each kind of message to a different bit so that
* one index can hold multiple types.)
*/
-#define H5O_SHMESG_NONE_FLAG 0x0000 /* No shared messages */
+#define H5O_SHMESG_NONE_FLAG 0x0000 /* No shared messages */
#define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /* Simple Dataspace Message. */
#define H5O_SHMESG_DTYPE_FLAG ((unsigned)1 << 0x0003) /* Datatype Message. */
#define H5O_SHMESG_FILL_FLAG ((unsigned)1 << 0x0005) /* Fill Value Message. */
#define H5O_SHMESG_PLINE_FLAG ((unsigned)1 << 0x000b) /* Filter pipeline message. */
#define H5O_SHMESG_ATTR_FLAG ((unsigned)1 << 0x000c) /* Attribute Message. */
-#define H5O_SHMESG_ALL_FLAG (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | H5O_SHMESG_ATTR_FLAG)
+#define H5O_SHMESG_ALL_FLAG \
+ (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | \
+ H5O_SHMESG_ATTR_FLAG)
/* Object header status flag definitions */
-#define H5O_HDR_CHUNK0_SIZE 0x03 /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
-#define H5O_HDR_ATTR_CRT_ORDER_TRACKED 0x04 /* Attribute creation order is tracked */
-#define H5O_HDR_ATTR_CRT_ORDER_INDEXED 0x08 /* Attribute creation order has index */
-#define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10 /* Non-default attribute storage phase change values stored */
-#define H5O_HDR_STORE_TIMES 0x20 /* Store access, modification, change & birth times for object */
-#define H5O_HDR_ALL_FLAGS (H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES)
+#define H5O_HDR_CHUNK0_SIZE 0x03 /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
+#define H5O_HDR_ATTR_CRT_ORDER_TRACKED 0x04 /* Attribute creation order is tracked */
+#define H5O_HDR_ATTR_CRT_ORDER_INDEXED 0x08 /* Attribute creation order has index */
+#define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10 /* Non-default attribute storage phase change values stored */
+#define H5O_HDR_STORE_TIMES 0x20 /* Store access, modification, change & birth times for object */
+#define H5O_HDR_ALL_FLAGS \
+ (H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | \
+ H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES)
/* Maximum shared message values. Number of indexes is 8 to allow room to add
* new types of messages.
*/
-#define H5O_SHMESG_MAX_NINDEXES 8
+#define H5O_SHMESG_MAX_NINDEXES 8
#define H5O_SHMESG_MAX_LIST_SIZE 5000
/*******************/
@@ -79,47 +83,47 @@
/* Types of objects in file */
typedef enum H5O_type_t {
- H5O_TYPE_UNKNOWN = -1, /* Unknown object type */
- H5O_TYPE_GROUP, /* Object is a group */
- H5O_TYPE_DATASET, /* Object is a dataset */
- H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */
- H5O_TYPE_NTYPES /* Number of different object types (must be last!) */
+ H5O_TYPE_UNKNOWN = -1, /* Unknown object type */
+ H5O_TYPE_GROUP, /* Object is a group */
+ H5O_TYPE_DATASET, /* Object is a dataset */
+ H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */
+ H5O_TYPE_NTYPES /* Number of different object types (must be last!) */
} H5O_type_t;
/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
typedef struct H5O_hdr_info_t {
- unsigned version; /* Version number of header format in file */
- unsigned nmesgs; /* Number of object header messages */
- unsigned nchunks; /* Number of object header chunks */
- unsigned flags; /* Object header status flags */
+ unsigned version; /* Version number of header format in file */
+ unsigned nmesgs; /* Number of object header messages */
+ unsigned nchunks; /* Number of object header chunks */
+ unsigned flags; /* Object header status flags */
struct {
- hsize_t total; /* Total space for storing object header in file */
- hsize_t meta; /* Space within header for object header metadata information */
- hsize_t mesg; /* Space within header for actual message information */
- hsize_t free; /* Free space within object header */
+ hsize_t total; /* Total space for storing object header in file */
+ hsize_t meta; /* Space within header for object header metadata information */
+ hsize_t mesg; /* Space within header for actual message information */
+ hsize_t free; /* Free space within object header */
} space;
struct {
- uint64_t present; /* Flags to indicate presence of message type in header */
- uint64_t shared; /* Flags to indicate message type is shared in header */
+ uint64_t present; /* Flags to indicate presence of message type in header */
+ uint64_t shared; /* Flags to indicate message type is shared in header */
} mesg;
} H5O_hdr_info_t;
/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
typedef struct H5O_info_t {
- unsigned long fileno; /* File number that object is located in */
- haddr_t addr; /* Object address in file */
- H5O_type_t type; /* Basic object type (group, dataset, etc.) */
- unsigned rc; /* Reference count of object */
- time_t atime; /* Access time */
- time_t mtime; /* Modification time */
- time_t ctime; /* Change time */
- time_t btime; /* Birth time */
- hsize_t num_attrs; /* # of attributes attached to object */
- H5O_hdr_info_t hdr; /* Object header information */
+ unsigned long fileno; /* File number that object is located in */
+ haddr_t addr; /* Object address in file */
+ H5O_type_t type; /* Basic object type (group, dataset, etc.) */
+ unsigned rc; /* Reference count of object */
+ time_t atime; /* Access time */
+ time_t mtime; /* Modification time */
+ time_t ctime; /* Change time */
+ time_t btime; /* Birth time */
+ hsize_t num_attrs; /* # of attributes attached to object */
+ H5O_hdr_info_t hdr; /* Object header information */
/* Extra metadata storage for obj & attributes */
struct {
- H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- H5_ih_info_t attr; /* v2 B-tree & heap for attributes */
+ H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ H5_ih_info_t attr; /* v2 B-tree & heap for attributes */
} meta_size;
} H5O_info_t;
@@ -127,58 +131,53 @@ typedef struct H5O_info_t {
typedef uint32_t H5O_msg_crt_idx_t;
/* Prototype for H5Ovisit/H5Ovisit_by_name() operator */
-typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info,
- void *op_data);
+typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info, void *op_data);
typedef enum H5O_mcdt_search_ret_t {
- H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */
- H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */
- H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but not merged. */
+ H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */
+ H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */
+ H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but
+ not merged. */
} H5O_mcdt_search_ret_t;
-/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */
+/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype
+ * list */
typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
/********************/
/* Public Variables */
/********************/
-
+/*********************/
+/* Public Prototypes */
+/*********************/
#ifdef __cplusplus
extern "C" {
#endif
-/*********************/
-/* Public Prototypes */
-/*********************/
-H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
-H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
+H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
+H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
+H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id);
H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
-H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo,
- hid_t lapl_id);
-H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
- hid_t lapl_id);
-H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name,
- hid_t lcpl_id, hid_t lapl_id);
+H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id);
+H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id);
+H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id);
H5_DLL herr_t H5Oincr_refcount(hid_t object_id);
H5_DLL herr_t H5Odecr_refcount(hid_t object_id);
-H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
- const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
+H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name,
+ hid_t ocpypl_id, hid_t lcpl_id);
H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment);
-H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name,
- const char *comment, hid_t lapl_id);
+H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id);
H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize);
-H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name,
- char *comment, size_t bufsize, hid_t lapl_id);
-H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
- H5O_iterate_t op, void *op_data);
-H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name,
- H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
- void *op_data, hid_t lapl_id);
+H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize,
+ hid_t lapl_id);
+H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
+ void *op_data);
+H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data, hid_t lapl_id);
H5_DLL herr_t H5Oclose(hid_t object_id);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
@@ -191,20 +190,18 @@ H5_DLL herr_t H5Oclose(hid_t object_id);
/* Typedefs */
-/* A struct that's part of the H5G_stat_t routine (deprecated) */
+/* A struct that's part of the H5G_stat_t structure (deprecated) */
typedef struct H5O_stat_t {
- hsize_t size; /* Total size of object header in file */
- hsize_t free; /* Free space within object header */
- unsigned nmesgs; /* Number of object header messages */
- unsigned nchunks; /* Number of object header chunks */
+ hsize_t size; /* Total size of object header in file */
+ hsize_t free; /* Free space within object header */
+ unsigned nmesgs; /* Number of object header messages */
+ unsigned nchunks; /* Number of object header chunks */
} H5O_stat_t;
/* Function prototypes */
-
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
}
#endif
#endif /* _H5Opublic_H */
-
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index 78ff791..7f11a20 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,64 +15,62 @@
*
* Created: H5Orefcount.c
* Mar 10 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object ref. count messages.
*
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_refcount_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_refcount_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_refcount_copy(const void *_mesg, void *_dest);
+static void * H5O_refcount_copy(const void *_mesg, void *_dest);
static size_t H5O_refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_refcount_free(void *_mesg);
-static herr_t H5O_refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
-static herr_t H5O_refcount_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *udata);
+static herr_t H5O_refcount_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_REFCOUNT[1] = {{
- H5O_REFCOUNT_ID, /*message id number */
- "refcount", /*message name for debugging */
- sizeof(H5O_refcount_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_refcount_decode, /*decode message */
- H5O_refcount_encode, /*encode message */
- H5O_refcount_copy, /*copy the native value */
- H5O_refcount_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_refcount_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- H5O_refcount_pre_copy_file, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_refcount_debug /*debug the message */
+ H5O_REFCOUNT_ID, /*message id number */
+ "refcount", /*message name for debugging */
+ sizeof(H5O_refcount_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_refcount_decode, /*decode message */
+ H5O_refcount_encode, /*encode message */
+ H5O_refcount_copy, /*copy the native value */
+ H5O_refcount_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_refcount_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ H5O_refcount_pre_copy_file, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_refcount_debug /*debug the message */
}};
/* Current version of ref. count information */
-#define H5O_REFCOUNT_VERSION 0
+#define H5O_REFCOUNT_VERSION 0
/* Declare a free list to manage the H5O_refcount_t struct */
H5FL_DEFINE_STATIC(H5O_refcount_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_decode
*
@@ -82,18 +80,17 @@ H5FL_DEFINE_STATIC(H5O_refcount_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static void *
H5O_refcount_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_refcount_t *refcount = NULL; /* Reference count */
- void *ret_value; /* Return value */
+ H5O_refcount_t *refcount = NULL; /* Reference count */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -102,12 +99,12 @@ H5O_refcount_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
HDassert(p);
/* Version of message */
- if(*p++ != H5O_REFCOUNT_VERSION)
+ if (*p++ != H5O_REFCOUNT_VERSION)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
/* Allocate space for message */
- if(NULL == (refcount = H5FL_MALLOC(H5O_refcount_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (refcount = H5FL_MALLOC(H5O_refcount_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get ref. count for object */
UINT32DECODE(p, *refcount)
@@ -116,13 +113,12 @@ H5O_refcount_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t
ret_value = refcount;
done:
- if(ret_value == NULL && refcount != NULL)
+ if (ret_value == NULL && refcount != NULL)
refcount = H5FL_FREE(H5O_refcount_t, refcount);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_refcount_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_encode
*
@@ -131,15 +127,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
- const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
+ const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -157,7 +153,6 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_refcount_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_copy
*
@@ -168,7 +163,6 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
@@ -176,16 +170,16 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
static void *
H5O_refcount_copy(const void *_mesg, void *_dest)
{
- const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- H5O_refcount_t *dest = (H5O_refcount_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
+ H5O_refcount_t * dest = (H5O_refcount_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(refcount);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_refcount_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_refcount_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *refcount;
@@ -197,7 +191,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_refcount_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_size
*
@@ -209,31 +202,29 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static size_t
H5O_refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
- const void H5_ATTR_UNUSED *_mesg)
+ const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
- ret_value = 1 /* Version */
- + 4; /* Ref. count */
+ ret_value = 1 /* Version */
+ + 4; /* Ref. count */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_refcount_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
@@ -254,7 +245,6 @@ H5O_refcount_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_refcount_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_pre_copy_file
*
@@ -271,7 +261,8 @@ H5O_refcount_free(void *mesg)
*/
static herr_t
H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
+ hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
+ void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -287,7 +278,6 @@ H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UN
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_refcount_pre_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refcount_debug
*
@@ -296,16 +286,15 @@ H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UN
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_refcount_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_refcount_t *refcount = (const H5O_refcount_t *) _mesg;
+ const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -316,9 +305,7 @@ H5O_refcount_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of links:", (unsigned)*refcount);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_refcount_debug() */
-
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 627ea19..e0091a4 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -6,80 +6,79 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5S_PACKAGE /*prevent warning from including H5Spkg.h */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Gprivate.h" /* Groups */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Spkg.h" /* Dataspaces */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5S_PACKAGE /*prevent warning from including H5Spkg.h */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Gprivate.h" /* Groups */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Spkg.h" /* Dataspaces */
/* PRIVATE PROTOTYPES */
-static void *H5O_sdspace_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_sdspace_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg);
-static void *H5O_sdspace_copy(const void *_mesg, void *_dest);
+static void * H5O_sdspace_copy(const void *_mesg, void *_dest);
static size_t H5O_sdspace_size(const H5F_t *f, const void *_mesg);
static herr_t H5O_sdspace_reset(void *_mesg);
static herr_t H5O_sdspace_free(void *_mesg);
-static herr_t H5O_sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
-static herr_t H5O_sdspace_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static herr_t H5O_sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *_udata);
+static herr_t H5O_sdspace_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_SDSPACE
-#define H5O_SHARED_DECODE H5O_sdspace_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_sdspace_decode
-#define H5O_SHARED_ENCODE H5O_sdspace_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_sdspace_encode
-#define H5O_SHARED_SIZE H5O_sdspace_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_sdspace_size
-#define H5O_SHARED_DELETE H5O_sdspace_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_SDSPACE
+#define H5O_SHARED_DECODE H5O_sdspace_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_sdspace_decode
+#define H5O_SHARED_ENCODE H5O_sdspace_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_sdspace_encode
+#define H5O_SHARED_SIZE H5O_sdspace_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_sdspace_size
+#define H5O_SHARED_DELETE H5O_sdspace_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O_sdspace_shared_link
+#define H5O_SHARED_LINK H5O_sdspace_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O_sdspace_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O_sdspace_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_sdspace_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_sdspace_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
-#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_sdspace_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O_sdspace_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#undef H5O_SHARED_POST_COPY_FILE_UPD
+#define H5O_SHARED_DEBUG H5O_sdspace_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O_sdspace_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{
- H5O_SDSPACE_ID, /* message id number */
- "dataspace", /* message name for debugging */
- sizeof(H5S_extent_t), /* native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_sdspace_shared_decode, /* decode message */
- H5O_sdspace_shared_encode, /* encode message */
- H5O_sdspace_copy, /* copy the native value */
- H5O_sdspace_shared_size, /* size of symbol table entry */
- H5O_sdspace_reset, /* default reset method */
- H5O_sdspace_free, /* free method */
- H5O_sdspace_shared_delete, /* file delete method */
- H5O_sdspace_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- H5O_sdspace_pre_copy_file, /* pre copy native value to file */
- H5O_sdspace_shared_copy_file,/* copy native value to file */
- H5O_sdspace_shared_post_copy_file,/* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_sdspace_shared_debug /* debug the message */
+ H5O_SDSPACE_ID, /* message id number */
+ "dataspace", /* message name for debugging */
+ sizeof(H5S_extent_t), /* native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O_sdspace_shared_decode, /* decode message */
+ H5O_sdspace_shared_encode, /* encode message */
+ H5O_sdspace_copy, /* copy the native value */
+ H5O_sdspace_shared_size, /* size of symbol table entry */
+ H5O_sdspace_reset, /* default reset method */
+ H5O_sdspace_free, /* free method */
+ H5O_sdspace_shared_delete, /* file delete method */
+ H5O_sdspace_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ H5O_sdspace_pre_copy_file, /* pre copy native value to file */
+ H5O_sdspace_shared_copy_file, /* copy native value to file */
+ H5O_sdspace_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_sdspace_shared_debug /* debug the message */
}};
/* Declare external the free list for H5S_extent_t's */
@@ -88,35 +87,34 @@ H5FL_EXTERN(H5S_extent_t);
/* Declare external the free list for hsize_t arrays */
H5FL_ARR_EXTERN(hsize_t);
-
/*--------------------------------------------------------------------------
NAME
H5O_sdspace_decode
PURPOSE
Decode a simple dimensionality message and return a pointer to a memory
- struct with the decoded information
+ struct with the decoded information
USAGE
void *H5O_sdspace_decode(f, dxpl_id, mesg_flags, p)
- H5F_t *f; IN: pointer to the HDF5 file struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
hid_t dxpl_id; IN: DXPL for any I/O
unsigned mesg_flags; IN: Message flags to influence decoding
- const uint8 *p; IN: the raw information buffer
+ const uint8 *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
DESCRIPTION
- This function decodes the "raw" disk form of a simple dimensionality
+ This function decodes the "raw" disk form of a simple dimensionality
message into a struct in memory native format. The struct is allocated
within this function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
H5O_sdspace_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5S_extent_t *sdim = NULL;/* New extent dimensionality structure */
- void *ret_value;
- unsigned i; /* local counting variable */
- unsigned flags, version;
+ H5S_extent_t *sdim = NULL; /* New extent dimensionality structure */
+ unsigned flags, version;
+ unsigned i; /* Local counting variable */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -125,29 +123,29 @@ H5O_sdspace_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED
HDassert(p);
/* decode */
- if(NULL == (sdim = H5FL_CALLOC(H5S_extent_t)))
+ if (NULL == (sdim = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, NULL, "dataspace structure allocation failed")
/* Check version */
version = *p++;
- if(version < H5O_SDSPACE_VERSION_1 || version > H5O_SDSPACE_VERSION_2)
+ if (version < H5O_SDSPACE_VERSION_1 || version > H5O_SDSPACE_VERSION_2)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "wrong version number in dataspace message")
sdim->version = version;
/* Get rank */
sdim->rank = *p++;
- if(sdim->rank > H5S_MAX_RANK)
+ if (sdim->rank > H5S_MAX_RANK)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "simple dataspace dimensionality is too large")
/* Get dataspace flags for later */
flags = *p++;
/* Get or determine the type of the extent */
- if(version >= H5O_SDSPACE_VERSION_2)
+ if (version >= H5O_SDSPACE_VERSION_2)
sdim->type = (H5S_class_t)*p++;
else {
/* Set the dataspace type to be simple or scalar as appropriate */
- if(sdim->rank > 0)
+ if (sdim->rank > 0)
sdim->type = H5S_SIMPLE;
else
sdim->type = H5S_SCALAR;
@@ -158,38 +156,38 @@ H5O_sdspace_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED
HDassert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2);
/* Only Version 1 has these reserved bytes */
- if(version == H5O_SDSPACE_VERSION_1)
+ if (version == H5O_SDSPACE_VERSION_1)
p += 4; /*reserved*/
/* Decode dimension sizes */
- if(sdim->rank > 0) {
- if(NULL == (sdim->size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
+ if (sdim->rank > 0) {
+ if (NULL == (sdim->size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- for(i = 0; i < sdim->rank; i++)
+ for (i = 0; i < sdim->rank; i++)
H5F_DECODE_LENGTH(f, p, sdim->size[i]);
- if(flags & H5S_VALID_MAX) {
- if(NULL == (sdim->max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
+ if (flags & H5S_VALID_MAX) {
+ if (NULL == (sdim->max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- for(i = 0; i < sdim->rank; i++)
- H5F_DECODE_LENGTH (f, p, sdim->max[i]);
+ for (i = 0; i < sdim->rank; i++)
+ H5F_DECODE_LENGTH(f, p, sdim->max[i]);
} /* end if */
- } /* end if */
+ } /* end if */
/* Compute the number of elements in the extent */
- if(sdim->type == H5S_NULL)
+ if (sdim->type == H5S_NULL)
sdim->nelem = 0;
else {
- for(i = 0, sdim->nelem = 1; i < sdim->rank; i++)
+ for (i = 0, sdim->nelem = 1; i < sdim->rank; i++)
sdim->nelem *= sdim->size[i];
} /* end else */
/* Set return value */
- ret_value = (void*)sdim; /*success*/
+ ret_value = (void *)sdim; /*success*/
done:
- if(!ret_value && sdim) {
+ if (!ret_value && sdim) {
H5S_extent_release(sdim);
sdim = H5FL_FREE(H5S_extent_t, sdim);
} /* end if */
@@ -197,7 +195,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_sdspace_decode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_sdspace_encode
@@ -205,22 +202,22 @@ done:
Encode a simple dimensionality message
USAGE
herr_t H5O_sdspace_encode(f, raw_size, p, mesg)
- H5F_t *f; IN: pointer to the HDF5 file struct
- size_t raw_size; IN: size of the raw information buffer
- const uint8 *p; IN: the raw information buffer
- const void *mesg; IN: Pointer to the extent dimensionality struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ size_t raw_size; IN: size of the raw information buffer
+ const uint8 *p; IN: the raw information buffer
+ const void *mesg; IN: Pointer to the extent dimensionality struct
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function encodes the native memory form of the simple
+ This function encodes the native memory form of the simple
dimensionality message in the "raw" disk form.
MODIFICATIONS
- Robb Matzke, 1998-04-09
- The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
- instead of just four bytes.
+ Robb Matzke, 1998-04-09
+ The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
+ instead of just four bytes.
- Robb Matzke, 1998-07-20
+ Robb Matzke, 1998-07-20
Added a version number and reformatted the message for aligment.
Raymond Lu
@@ -232,9 +229,9 @@ done:
static herr_t
H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
- const H5S_extent_t *sdim = (const H5S_extent_t *)_mesg;
- unsigned flags = 0;
- unsigned u; /* Local counting variable */
+ const H5S_extent_t *sdim = (const H5S_extent_t *)_mesg;
+ unsigned flags = 0;
+ unsigned u; /* Local counting variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -252,35 +249,34 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
*p++ = (uint8_t)sdim->rank;
/* Flags */
- if(sdim->max)
+ if (sdim->max)
flags |= H5S_VALID_MAX;
*p++ = (uint8_t)flags;
/* Dataspace type */
- if(sdim->version > H5O_SDSPACE_VERSION_1)
- *p++ = sdim->type;
+ if (sdim->version > H5O_SDSPACE_VERSION_1)
+ *p++ = (uint8_t)sdim->type;
else {
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
- } /* end else */
+ } /* end else */
/* Current & maximum dimensions */
- if(sdim->rank > 0) {
- for(u = 0; u < sdim->rank; u++)
+ if (sdim->rank > 0) {
+ for (u = 0; u < sdim->rank; u++)
H5F_ENCODE_LENGTH(f, p, sdim->size[u]);
- if(flags & H5S_VALID_MAX) {
- for(u = 0; u < sdim->rank; u++)
+ if (flags & H5S_VALID_MAX) {
+ for (u = 0; u < sdim->rank; u++)
H5F_ENCODE_LENGTH(f, p, sdim->max[u]);
} /* end if */
- } /* end if */
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_sdspace_encode() */
-
/*--------------------------------------------------------------------------
NAME
H5O_sdspace_copy
@@ -288,44 +284,43 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
Copies a message from MESG to DEST, allocating DEST if necessary.
USAGE
void *H5O_sdspace_copy(_mesg, _dest)
- const void *_mesg; IN: Pointer to the source extent dimensionality struct
- const void *_dest; IN: Pointer to the destination extent dimensionality struct
+ const void *_mesg; IN: Pointer to the source extent dimensionality struct
+ const void *_dest; IN: Pointer to the destination extent dimensionality struct
RETURNS
Pointer to DEST on success, NULL on failure
DESCRIPTION
- This function copies a native (memory) simple dimensionality message,
+ This function copies a native (memory) simple dimensionality message,
allocating the destination structure if necessary.
--------------------------------------------------------------------------*/
static void *
H5O_sdspace_copy(const void *_mesg, void *_dest)
{
- const H5S_extent_t *mesg = (const H5S_extent_t *)_mesg;
- H5S_extent_t *dest = (H5S_extent_t *)_dest;
- void *ret_value; /* Return value */
+ const H5S_extent_t *mesg = (const H5S_extent_t *)_mesg;
+ H5S_extent_t * dest = (H5S_extent_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
- if(!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy extent information */
- if(H5S_extent_copy(dest, mesg, TRUE) < 0)
+ if (H5S_extent_copy(dest, mesg, TRUE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent")
/* Set return value */
ret_value = dest;
done:
- if(NULL == ret_value)
- if(dest && NULL == _dest)
+ if (NULL == ret_value)
+ if (dest && NULL == _dest)
dest = H5FL_FREE(H5S_extent_t, dest);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_sdspace_copy() */
-
/*--------------------------------------------------------------------------
NAME
H5O_sdspace_size
@@ -333,34 +328,34 @@ done:
Return the raw message size in bytes
USAGE
void *H5O_sdspace_size(f, mesg)
- H5F_t *f; IN: pointer to the HDF5 file struct
- const void *mesg; IN: Pointer to the source extent dimensionality struct
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ const void *mesg; IN: Pointer to the source extent dimensionality struct
RETURNS
Size of message on success, zero on failure
DESCRIPTION
- This function returns the size of the raw simple dimensionality message on
+ This function returns the size of the raw simple dimensionality message on
success. (Not counting the message type or size fields, only the data
portion of the message). It doesn't take into account alignment.
MODIFICATIONS
- Robb Matzke, 1998-04-09
- The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
- instead of just four bytes.
+ Robb Matzke, 1998-04-09
+ The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
+ instead of just four bytes.
--------------------------------------------------------------------------*/
static size_t
H5O_sdspace_size(const H5F_t *f, const void *_mesg)
{
- const H5S_extent_t *space = (const H5S_extent_t *)_mesg;
- size_t ret_value;
+ const H5S_extent_t *space = (const H5S_extent_t *)_mesg;
+ size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Basic information for all dataspace messages */
- ret_value = 1 + /* Version */
- 1 + /* Rank */
- 1 + /* Flags */
- 1 + /* Dataspace type/reserved */
- ((space->version > H5O_SDSPACE_VERSION_1) ? 0 : 4); /* Eliminated/reserved */
+ ret_value = 1 + /* Version */
+ 1 + /* Rank */
+ 1 + /* Flags */
+ 1 + /* Dataspace type/reserved */
+ ((space->version > H5O_SDSPACE_VERSION_1) ? 0 : 4); /* Eliminated/reserved */
/* Add in the dimension sizes */
ret_value += space->rank * H5F_SIZEOF_SIZE(f);
@@ -371,7 +366,6 @@ H5O_sdspace_size(const H5F_t *f, const void *_mesg)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_sdspace_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_sdspace_reset
*
@@ -383,14 +377,12 @@ H5O_sdspace_size(const H5F_t *f, const void *_mesg)
* Programmer: Robb Matzke
* Thursday, April 30, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5O_sdspace_reset(void *_mesg)
{
- H5S_extent_t *mesg = (H5S_extent_t*)_mesg;
+ H5S_extent_t *mesg = (H5S_extent_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -399,11 +391,10 @@ H5O_sdspace_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5O_sdsdpace_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
@@ -424,7 +415,6 @@ H5O_sdspace_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_sdspace_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_sdspace_pre_copy_file
*
@@ -442,11 +432,12 @@ H5O_sdspace_free(void *mesg)
*/
static herr_t
H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
+ hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
+ void *_udata)
{
- const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */
- H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */
+ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -460,13 +451,13 @@ H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
* if the layout is an early version, but that information isn't
* available here, so we just make a copy of it in all cases)
*/
- if(udata) {
+ if (udata) {
/* Allocate copy of dataspace extent */
- if(NULL == (udata->src_space_extent = H5FL_CALLOC(H5S_extent_t)))
+ if (NULL == (udata->src_space_extent = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed")
/* Create a copy of the dataspace extent */
- if(H5S_extent_copy(udata->src_space_extent, src_space_extent, TRUE) < 0)
+ if (H5S_extent_copy(udata->src_space_extent, src_space_extent, TRUE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent")
} /* end if */
@@ -474,7 +465,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dspace_pre_copy_file() */
-
/*--------------------------------------------------------------------------
NAME
H5O_sdspace_debug
@@ -482,22 +472,22 @@ done:
Prints debugging information for a simple dimensionality message
USAGE
void *H5O_sdspace_debug(f, mesg, stream, indent, fwidth)
- H5F_t *f; IN: pointer to the HDF5 file struct
- const void *mesg; IN: Pointer to the source extent dimensionality struct
- FILE *stream; IN: Pointer to the stream for output data
- int indent; IN: Amount to indent information by
- int fwidth; IN: Field width (?)
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ const void *mesg; IN: Pointer to the source extent dimensionality struct
+ FILE *stream; IN: Pointer to the stream for output data
+ int indent; IN: Amount to indent information by
+ int fwidth; IN: Field width (?)
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function prints debugging output to the stream passed as a
+ This function prints debugging output to the stream passed as a
parameter.
--------------------------------------------------------------------------*/
static herr_t
-H5O_sdspace_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *mesg,
- FILE * stream, int indent, int fwidth)
+H5O_sdspace_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5S_extent_t *sdim = (const H5S_extent_t *)mesg;
+ const H5S_extent_t *sdim = (const H5S_extent_t *)mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -508,33 +498,30 @@ H5O_sdspace_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const v
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Rank:",
- (unsigned long) (sdim->rank));
+ HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank));
- if(sdim->rank > 0) {
- unsigned u; /* local counting variable */
+ if (sdim->rank > 0) {
+ unsigned u; /* local counting variable */
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
- for(u = 0; u < sdim->rank; u++)
- HDfprintf (stream, "%s%Hu", u?", ":"", sdim->size[u]);
- HDfprintf (stream, "}\n");
+ for (u = 0; u < sdim->rank; u++)
+ HDfprintf(stream, "%s%Hu", u ? ", " : "", sdim->size[u]);
+ HDfprintf(stream, "}\n");
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
- if(sdim->max) {
- HDfprintf (stream, "{");
- for(u = 0; u < sdim->rank; u++) {
- if(H5S_UNLIMITED==sdim->max[u])
- HDfprintf (stream, "%sUNLIM", u?", ":"");
+ if (sdim->max) {
+ HDfprintf(stream, "{");
+ for (u = 0; u < sdim->rank; u++) {
+ if (H5S_UNLIMITED == sdim->max[u])
+ HDfprintf(stream, "%sUNLIM", u ? ", " : "");
else
- HDfprintf (stream, "%s%Hu", u?", ":"", sdim->max[u]);
+ HDfprintf(stream, "%s%Hu", u ? ", " : "", sdim->max[u]);
} /* end for */
- HDfprintf (stream, "}\n");
+ HDfprintf(stream, "}\n");
} /* end if */
else
- HDfprintf (stream, "CONSTANT\n");
+ HDfprintf(stream, "CONSTANT\n");
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_sdspace_debug() */
-
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 2475dd5..3b32b75 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, April 1, 1998
*
* Purpose: Functions that operate on a shared message. The shared
@@ -28,65 +28,57 @@
/* Module Setup */
/****************/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5Gprivate.h" /* Groups */
-#include "H5HFprivate.h" /* Fractal heap */
-#include "H5Opkg.h" /* Object headers */
-#include "H5SMprivate.h" /* Shared object header messages */
-#include "H5WBprivate.h" /* Wrapped Buffers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gprivate.h" /* Groups */
+#include "H5HFprivate.h" /* Fractal heap */
+#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared object header messages */
+#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
/* Local Macros */
/****************/
/* First version, with full symbol table entry as link for object header sharing */
-#define H5O_SHARED_VERSION_1 1
+#define H5O_SHARED_VERSION_1 1
/* Older version, with just address of object as link for object header sharing */
-#define H5O_SHARED_VERSION_2 2
+#define H5O_SHARED_VERSION_2 2
/* Newest version, which recognizes messages that are stored in the SOHM heap */
-#define H5O_SHARED_VERSION_3 3
-#define H5O_SHARED_VERSION_LATEST H5O_SHARED_VERSION_3
+#define H5O_SHARED_VERSION_3 3
+#define H5O_SHARED_VERSION_LATEST H5O_SHARED_VERSION_3
/* Size of stack buffer for serialized messages */
-#define H5O_MESG_BUF_SIZE 128
-
+#define H5O_MESG_BUF_SIZE 128
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_read
*
@@ -98,19 +90,18 @@
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 24 2003
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
- const H5O_shared_t *shared, const H5O_msg_class_t *type)
+H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t *shared,
+ const H5O_msg_class_t *type)
{
H5HF_t *fheap = NULL;
- H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
+ H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
uint8_t mesg_buf[H5O_MESG_BUF_SIZE]; /* Buffer for deserializing messages */
- void *ret_value = NULL; /* Return value */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -126,77 +117,77 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
HDassert(H5O_IS_STORED_SHARED(shared->type));
/* Check for implicit shared object header message */
- if(shared->type == H5O_SHARE_TYPE_SOHM) {
- haddr_t fheap_addr; /* Address of SOHM heap */
- uint8_t *mesg_ptr; /* Pointer to raw message in heap */
- size_t mesg_size; /* Size of message */
+ if (shared->type == H5O_SHARE_TYPE_SOHM) {
+ haddr_t fheap_addr; /* Address of SOHM heap */
+ uint8_t *mesg_ptr; /* Pointer to raw message in heap */
+ size_t mesg_size; /* Size of message */
/* Retrieve the fractal heap address for shared messages */
- if(H5SM_get_fheap_addr(f, dxpl_id, type->id, &fheap_addr) < 0)
+ if (H5SM_get_fheap_addr(f, dxpl_id, type->id, &fheap_addr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get fheap address for shared messages")
/* Open the fractal heap */
- if(NULL == (fheap = H5HF_open(f, dxpl_id, fheap_addr)))
+ if (NULL == (fheap = H5HF_open(f, dxpl_id, fheap_addr)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap")
/* Get the size of the message in the heap */
- if(H5HF_get_obj_len(fheap, dxpl_id, &(shared->u.heap_id), &mesg_size) < 0)
+ if (H5HF_get_obj_len(fheap, dxpl_id, &(shared->u.heap_id), &mesg_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get message size from fractal heap.")
/* Wrap the local buffer for serialized message */
- if(NULL == (wb = H5WB_wrap(mesg_buf, sizeof(mesg_buf))))
+ if (NULL == (wb = H5WB_wrap(mesg_buf, sizeof(mesg_buf))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer")
/* Get a pointer to a buffer that's large enough for message */
- if(NULL == (mesg_ptr = (uint8_t *)H5WB_actual(wb, mesg_size)))
+ if (NULL == (mesg_ptr = (uint8_t *)H5WB_actual(wb, mesg_size)))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Retrieve the message from the heap */
- if(H5HF_read(fheap, dxpl_id, &(shared->u.heap_id), mesg_ptr) < 0)
+ if (H5HF_read(fheap, dxpl_id, &(shared->u.heap_id), mesg_ptr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap.")
/* Decode the message */
- if(NULL == (ret_value = (type->decode)(f, dxpl_id, open_oh, 0, ioflags, mesg_size, mesg_ptr)))
+ if (NULL == (ret_value = (type->decode)(f, dxpl_id, open_oh, 0, ioflags, mesg_size, mesg_ptr)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message.")
} /* end if */
else {
- H5O_loc_t oloc; /* Location for object header where message is stored */
+ H5O_loc_t oloc; /* Location for object header where message is stored */
HDassert(shared->type == H5O_SHARE_TYPE_COMMITTED);
/* Build the object location for the shared message's object header */
- oloc.file = f;
- oloc.addr = shared->u.loc.oh_addr;
+ oloc.file = f;
+ oloc.addr = shared->u.loc.oh_addr;
oloc.holding_file = FALSE;
- if(open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
+ if (open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
/* The shared message is in the already opened object header. This
* is possible, for example, if an attribute's datatype is shared in
* the same object header the attribute is in. Read the message
* directly. */
- if(NULL == (ret_value = H5O_msg_read_oh(f, dxpl_id, open_oh, type->id, NULL)))
+ if (NULL == (ret_value = H5O_msg_read_oh(f, dxpl_id, open_oh, type->id, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message")
- } else
+ }
+ else
/* The shared message is in another object header */
- if(NULL == (ret_value = H5O_msg_read(&oloc, type->id, NULL, dxpl_id)))
- HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message")
+ if (NULL == (ret_value = H5O_msg_read(&oloc, type->id, NULL, dxpl_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message")
} /* end else */
/* Mark the message as shared */
- if(H5O_msg_set_share(type->id, shared, ret_value) < 0)
+ if (H5O_msg_set_share(type->id, shared, ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information")
done:
/* Release resources */
- if(fheap && H5HF_close(fheap, dxpl_id) < 0)
+ if (fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "can't close fractal heap")
- if(wb && H5WB_unwrap(wb) < 0)
+ if (wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_read() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_link_adj
*
@@ -213,16 +204,15 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- const H5O_msg_class_t *type, H5O_shared_t *shared, int adjust)
+H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, const H5O_msg_class_t *type,
+ H5O_shared_t *shared, int adjust)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -231,8 +221,8 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HDassert(shared);
/* Check for type of shared message */
- if(shared->type == H5O_SHARE_TYPE_COMMITTED) {
- H5O_loc_t oloc; /* Location for object header where message is stored */
+ if (shared->type == H5O_SHARE_TYPE_COMMITTED) {
+ H5O_loc_t oloc; /* Location for object header where message is stored */
/*
* The shared message is stored in some object header.
@@ -253,46 +243,46 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "interfile hard links are not allowed")*/
/* Build the object location for the shared message's object header */
- oloc.file = f;
- oloc.addr = shared->u.loc.oh_addr;
+ oloc.file = f;
+ oloc.addr = shared->u.loc.oh_addr;
oloc.holding_file = FALSE;
- if(open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
+ if (open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
/* The shared message is in the already opened object header. This
* is possible, for example, if an attribute's datatype is shared in
* the same object header the attribute is in. Adjust the link
* count directly. */
hbool_t deleted = FALSE; /* This is used only to satisfy H5O_link_oh */
- if(H5O_link_oh(f, adjust, dxpl_id, open_oh, &deleted) < 0)
+ if (H5O_link_oh(f, adjust, dxpl_id, open_oh, &deleted) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
HDassert(!deleted);
- } else
+ }
+ else
/* The shared message is in another object header */
- if(H5O_link(&oloc, adjust, dxpl_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
+ if (H5O_link(&oloc, adjust, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
} /* end if */
else {
HDassert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE);
/* Check for decrementing reference count on shared message */
- if(adjust < 0) {
- if(H5SM_delete(f, dxpl_id, open_oh, shared) < 0)
+ if (adjust < 0) {
+ if (H5SM_delete(f, dxpl_id, open_oh, shared) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to delete message from SOHM table")
} /* end if */
/* Check for incrementing reference count on message */
- else if(adjust > 0) {
- if(H5SM_try_share(f, dxpl_id, open_oh, 0, type->id, shared, NULL) < 0)
+ else if (adjust > 0) {
+ if (H5SM_try_share(f, dxpl_id, open_oh, 0, type->id, shared, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message")
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_link_adj() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_decode
*
@@ -306,12 +296,12 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
- const uint8_t *buf, const H5O_msg_class_t *type)
+H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags, const uint8_t *buf,
+ const H5O_msg_class_t *type)
{
- H5O_shared_t sh_mesg; /* Shared message info */
- unsigned version; /* Shared message version */
- void *ret_value; /* Return value */
+ H5O_shared_t sh_mesg; /* Shared message info */
+ unsigned version; /* Shared message version */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -322,13 +312,13 @@ H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
/* Version */
version = *buf++;
- if(version < H5O_SHARED_VERSION_1 || version > H5O_SHARED_VERSION_LATEST)
+ if (version < H5O_SHARED_VERSION_1 || version > H5O_SHARED_VERSION_LATEST)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message")
/* Get the shared information type
* Flags are unused before version 3.
*/
- if(version >= H5O_SHARED_VERSION_2)
+ if (version >= H5O_SHARED_VERSION_2)
sh_mesg.type = *buf++;
else {
sh_mesg.type = H5O_SHARE_TYPE_COMMITTED;
@@ -336,23 +326,23 @@ H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
} /* end else */
/* Skip reserved bytes (for version 1) */
- if(version == H5O_SHARED_VERSION_1)
+ if (version == H5O_SHARED_VERSION_1)
buf += 6;
/* Body */
- if(version == H5O_SHARED_VERSION_1) {
+ if (version == H5O_SHARED_VERSION_1) {
/* Initialize other location fields */
sh_mesg.u.loc.index = 0;
/* Decode stored "symbol table entry" into message location */
- buf += H5F_SIZEOF_SIZE(f); /* Skip over local heap address */
+ buf += H5F_SIZEOF_SIZE(f); /* Skip over local heap address */
H5F_addr_decode(f, &buf, &(sh_mesg.u.loc.oh_addr));
} /* end if */
else if (version >= H5O_SHARED_VERSION_2) {
/* If this message is in the heap, copy a heap ID.
* Otherwise, it is a named datatype, so copy an H5O_loc_t.
*/
- if(sh_mesg.type == H5O_SHARE_TYPE_SOHM) {
+ if (sh_mesg.type == H5O_SHARE_TYPE_SOHM) {
HDassert(version >= H5O_SHARED_VERSION_3);
HDmemcpy(&sh_mesg.u.heap_id, buf, sizeof(sh_mesg.u.heap_id));
} /* end if */
@@ -360,27 +350,26 @@ H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
/* The H5O_COMMITTED_FLAG should be set if this message
* is from an older version before the flag existed.
*/
- if(version < H5O_SHARED_VERSION_3)
+ if (version < H5O_SHARED_VERSION_3)
sh_mesg.type = H5O_SHARE_TYPE_COMMITTED;
sh_mesg.u.loc.index = 0;
H5F_addr_decode(f, &buf, &sh_mesg.u.loc.oh_addr);
} /* end else */
- } /* end else if */
+ } /* end else if */
/* Set file pointer & message type for all types of shared messages */
- sh_mesg.file = f;
+ sh_mesg.file = f;
sh_mesg.msg_type_id = type->id;
/* Retrieve actual message, through decoded shared message info */
- if(NULL == (ret_value = H5O_shared_read(f, dxpl_id, open_oh, ioflags, &sh_mesg, type)))
+ if (NULL == (ret_value = H5O_shared_read(f, dxpl_id, open_oh, ioflags, &sh_mesg, type)))
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_encode
*
@@ -394,9 +383,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg)
+H5O_shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_mesg)
{
- unsigned version;
+ unsigned version;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -408,12 +397,12 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
/* If this message is shared in the heap, we need to use version 3 of the
* encoding and encode the SHARED_IN_HEAP flag.
*/
- if(sh_mesg->type == H5O_SHARE_TYPE_SOHM)
+ if (sh_mesg->type == H5O_SHARE_TYPE_SOHM)
version = H5O_SHARED_VERSION_LATEST;
else {
HDassert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED);
version = H5O_SHARED_VERSION_2; /* version 1 is no longer used */
- } /* end else */
+ } /* end else */
*buf++ = (uint8_t)version;
*buf++ = (uint8_t)sh_mesg->type;
@@ -421,7 +410,7 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
/* Encode either the heap ID of the message or the address of the
* object header that holds it.
*/
- if(sh_mesg->type == H5O_SHARE_TYPE_SOHM)
+ if (sh_mesg->type == H5O_SHARE_TYPE_SOHM)
HDmemcpy(buf, &(sh_mesg->u.heap_id), sizeof(sh_mesg->u.heap_id));
else
H5F_addr_encode(f, &buf, sh_mesg->u.loc.oh_addr);
@@ -429,7 +418,6 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_shared_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_set_shared
*
@@ -438,7 +426,6 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2003
*
*-------------------------------------------------------------------------
@@ -458,7 +445,6 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_set_shared() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_size
*
@@ -475,26 +461,25 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src)
size_t
H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED) {
- ret_value = (size_t)1 + /*version */
- (size_t)1 + /*the type field */
- (size_t)H5F_SIZEOF_ADDR(f); /*sharing by another obj hdr */
- } /* end if */
+ if (sh_mesg->type == H5O_SHARE_TYPE_COMMITTED) {
+ ret_value = (size_t)1 + /*version */
+ (size_t)1 + /*the type field */
+ (size_t)H5F_SIZEOF_ADDR(f); /*sharing by another obj hdr */
+ } /* end if */
else {
HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
- ret_value = 1 + /*version */
- 1 + /*the type field */
- H5O_FHEAP_ID_LEN; /* Shared in the heap */
- } /* end else */
+ ret_value = 1 + /*version */
+ 1 + /*the type field */
+ H5O_FHEAP_ID_LEN; /* Shared in the heap */
+ } /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_delete
*
@@ -508,10 +493,9 @@ H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- const H5O_msg_class_t *type, H5O_shared_t *sh_mesg)
+H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shared_t *sh_mesg)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -529,14 +513,13 @@ H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
*/
/* Decrement the reference count on the shared object */
- if(H5O_shared_link_adj(f, dxpl_id, open_oh, type, sh_mesg, -1) < 0)
+ if (H5O_shared_link_adj(f, dxpl_id, open_oh, type, sh_mesg, -1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_link
*
@@ -551,10 +534,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- const H5O_msg_class_t *type, H5O_shared_t *sh_mesg)
+H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shared_t *sh_mesg)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -563,21 +545,19 @@ H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HDassert(sh_mesg);
/* Increment the reference count on the shared object */
- if(H5O_shared_link_adj(f, dxpl_id, open_oh, type, sh_mesg, 1) < 0)
+ if (H5O_shared_link_adj(f, dxpl_id, open_oh, type, sh_mesg, 1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_link() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_copy_file
*
* Purpose: Copies a message from _MESG to _DEST in file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* January 22, 2007
@@ -585,14 +565,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
- const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
- void H5_ATTR_UNUSED *udata, hid_t dxpl_id)
+H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type,
+ const void *_native_src, void *_native_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata, hid_t dxpl_id)
{
- const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */
- H5O_shared_t *shared_dst = (H5O_shared_t *)_native_dst; /* Alias to shared info in native destination message */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_shared_t *shared_src =
+ (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */
+ H5O_shared_t *shared_dst =
+ (H5O_shared_t *)_native_dst; /* Alias to shared info in native destination message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -614,9 +595,9 @@ H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
* be updated (to allow calculation of the final size) but the message is
* not actually shared.
*/
- if(shared_src->type != H5O_SHARE_TYPE_COMMITTED) {
+ if (shared_src->type != H5O_SHARE_TYPE_COMMITTED) {
/* Simulate trying to share new message in the destination file. */
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, mesg_type->id, _native_dst, mesg_flags) < 0)
+ if (H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, mesg_type->id, _native_dst, mesg_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to determine if message should be shared")
} /* end if */
else {
@@ -630,31 +611,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_shared_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_post_copy_file
*
- * Purpose: Delate a shared message and replace with a new one.
+ * Purpose: Delete a shared message and replace with a new one.
* The function is needed at cases such as coping a shared reg_ref attribute.
* When a shared reg_ref attribute is copied from one file to
* another, the values in file need to be replaced. The only way
* to complish that is to delete the old message and write the
* new message with the correct values.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* May 24 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
- const H5O_shared_t *shared_src, H5O_shared_t *shared_dst,
- unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O_shared_t *shared_src,
+ H5O_shared_t *shared_dst, unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -664,7 +642,7 @@ H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
HDassert(shared_dst);
/* Copy the target of committed messages, try to share others */
- if(shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
+ if (shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
H5O_loc_t dst_oloc;
H5O_loc_t src_oloc;
@@ -673,8 +651,7 @@ H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
dst_oloc.file = f;
src_oloc.file = shared_src->file;
src_oloc.addr = shared_src->u.loc.oh_addr;
- if(H5O_copy_header_map(&src_oloc, &dst_oloc, dxpl_id, cpy_info, FALSE,
- NULL, NULL) < 0)
+ if (H5O_copy_header_map(&src_oloc, &dst_oloc, dxpl_id, cpy_info, FALSE, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
/* Set up destination message's shared info */
@@ -682,15 +659,13 @@ H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
} /* end if */
else
/* Share the message */
- if(H5SM_try_share(f, dxpl_id, NULL, H5SM_WAS_DEFERRED, mesg_type->id,
- shared_dst, mesg_flags) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message")
+ if (H5SM_try_share(f, dxpl_id, NULL, H5SM_WAS_DEFERRED, mesg_type->id, shared_dst, mesg_flags) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_debug
*
@@ -714,43 +689,30 @@ H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth)
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- switch(mesg->type) {
+ switch (mesg->type) {
case H5O_SHARE_TYPE_UNSHARED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Shared Message type:",
- "Unshared");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared");
break;
case H5O_SHARE_TYPE_COMMITTED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Shared Message type:",
- "Obj Hdr");
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Object address:",
- mesg->u.loc.oh_addr);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr");
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object address:", mesg->u.loc.oh_addr);
break;
case H5O_SHARE_TYPE_SOHM:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Shared Message type:",
- "SOHM");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM");
HDfprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth,
- "Heap ID:",
- (unsigned long long)mesg->u.heap_id.val);
+ "Heap ID:", (unsigned long long)mesg->u.heap_id.val);
break;
case H5O_SHARE_TYPE_HERE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Shared Message type:",
- "Here");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here");
break;
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
- "Shared Message type:",
- "Unknown", (unsigned)mesg->type);
+ HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown",
+ (unsigned)mesg->type);
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_shared_debug() */
-
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index e60d7ba..d9a862e 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -6,13 +6,13 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Friday, January 19, 2007
*
* Purpose: This file contains inline definitions for "generic" routines
@@ -27,7 +27,6 @@
#ifndef H5Oshared_H
#define H5Oshared_H
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_DECODE
*
@@ -46,10 +45,10 @@
*-------------------------------------------------------------------------
*/
static H5_INLINE void *
-H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
- unsigned *ioflags, size_t p_size, const uint8_t *p)
+H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p)
{
- void *ret_value; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -64,22 +63,22 @@ H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
#endif /* H5O_SHARED_DECODE_REAL */
/* Check for shared message */
- if(mesg_flags & H5O_MSG_FLAG_SHARED) {
+ if (mesg_flags & H5O_MSG_FLAG_SHARED) {
/* Retrieve native message info indirectly through shared message */
- if(NULL == (ret_value = H5O_shared_decode(f, dxpl_id, open_oh, ioflags, p, H5O_SHARED_TYPE)))
+ if (NULL == (ret_value = H5O_shared_decode(f, dxpl_id, open_oh, ioflags, p, H5O_SHARED_TYPE)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message")
- /* We currently do not support automatically fixing shared messages */
+ /* We currently do not support automatically fixing shared messages */
#ifdef H5_STRICT_FORMAT_CHECKS
- if(*ioflags & H5O_DECODEIO_DIRTY)
+ if (*ioflags & H5O_DECODEIO_DIRTY)
HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty")
-#else /* H5_STRICT_FORMAT_CHECKS */
+#else /* H5_STRICT_FORMAT_CHECKS */
*ioflags &= ~H5O_DECODEIO_DIRTY;
#endif /* H5_STRICT_FORMAT_CHECKS */
- } /* end if */
+ } /* end if */
else {
/* Decode native message directly */
- if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, open_oh, mesg_flags, ioflags, p_size, p)))
+ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, open_oh, mesg_flags, ioflags, p_size, p)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message")
} /* end else */
@@ -87,7 +86,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_DECODE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_ENCODE
*
@@ -108,8 +106,9 @@ done:
static H5_INLINE herr_t
H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_shared_t *sh_mesg =
+ (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -127,22 +126,21 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes
HDassert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
/* Check for message stored elsewhere */
- if(H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
+ if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
/* Encode shared message into buffer */
- if(H5O_shared_encode(f, p, sh_mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode shared message")
+ if (H5O_shared_encode(f, p, sh_mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode shared message")
} /* end if */
else {
/* Encode native message directly */
- if(H5O_SHARED_ENCODE_REAL(f, p, _mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode native message")
+ if (H5O_SHARED_ENCODE_REAL(f, p, _mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode native message")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_ENCODE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_SIZE
*
@@ -163,8 +161,9 @@ done:
static H5_INLINE size_t
H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)
{
- const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
- size_t ret_value; /* Return value */
+ const H5O_shared_t *sh_mesg =
+ (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -179,22 +178,21 @@ H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)
#endif /* H5O_SHARED_SIZE_REAL */
/* Check for message stored elsewhere */
- if(H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
+ if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
/* Retrieve encoded size of shared message */
- if(0 == (ret_value = H5O_shared_size(f, sh_mesg)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of shared message")
+ if (0 == (ret_value = H5O_shared_size(f, sh_mesg)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of shared message")
} /* end if */
else {
/* Retrieve size of native message directly */
- if(0 == (ret_value = H5O_SHARED_SIZE_REAL(f, _mesg)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of native message")
+ if (0 == (ret_value = H5O_SHARED_SIZE_REAL(f, _mesg)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of native message")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_SIZE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_DELETE
*
@@ -216,8 +214,8 @@ done:
static H5_INLINE herr_t
H5O_SHARED_DELETE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
- H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -229,24 +227,23 @@ H5O_SHARED_DELETE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
#endif /* H5O_SHARED_DELETE */
/* Check for message tracked elsewhere */
- if(H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
+ if (H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
/* Decrement the reference count on the shared message/object */
- if(H5O_shared_delete(f, dxpl_id, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for shared message")
+ if (H5O_shared_delete(f, dxpl_id, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for shared message")
} /* end if */
#ifdef H5O_SHARED_DELETE_REAL
else {
/* Decrement the reference count on the native message directly */
- if(H5O_SHARED_DELETE_REAL(f, dxpl_id, open_oh, _mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message")
- } /* end else */
+ if (H5O_SHARED_DELETE_REAL(f, dxpl_id, open_oh, _mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message")
+ } /* end else */
#endif /* H5O_SHARED_DELETE_REAL */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_DELETE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_LINK
*
@@ -268,8 +265,8 @@ done:
static H5_INLINE herr_t
H5O_SHARED_LINK(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
- H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -281,24 +278,23 @@ H5O_SHARED_LINK(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
#endif /* H5O_SHARED_LINK */
/* Check for message tracked elsewhere */
- if(H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
+ if (H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
/* Increment the reference count on the shared message/object */
- if(H5O_shared_link(f, dxpl_id, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for shared message")
+ if (H5O_shared_link(f, dxpl_id, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for shared message")
} /* end if */
#ifdef H5O_SHARED_LINK_REAL
else {
/* Increment the reference count on the native message directly */
- if(H5O_SHARED_LINK_REAL(f, dxpl_id, open_oh, _mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message")
- } /* end else */
+ if (H5O_SHARED_LINK_REAL(f, dxpl_id, open_oh, _mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message")
+ } /* end else */
#endif /* H5O_SHARED_LINK_REAL */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_LINK() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_COPY_FILE
*
@@ -317,12 +313,11 @@ done:
*-------------------------------------------------------------------------
*/
static H5_INLINE void *
-H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst,
- hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
- void *udata, hid_t dxpl_id)
+H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id)
{
- void *dst_mesg = NULL; /* Destination message */
- void *ret_value; /* Return value */
+ void *dst_mesg = NULL; /* Destination message */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -335,11 +330,12 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst,
#ifdef H5O_SHARED_COPY_FILE_REAL
/* Call native message's copy file callback to copy the message */
- if(NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata, dxpl_id)))
+ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst,
+ recompute_size, cpy_info, udata, dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file")
-#else /* H5O_SHARED_COPY_FILE_REAL */
+#else /* H5O_SHARED_COPY_FILE_REAL */
/* No copy file callback defined, just copy the message itself */
- if(NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL)))
+ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message")
#endif /* H5O_SHARED_COPY_FILE_REAL */
@@ -347,22 +343,21 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst,
HDmemset(dst_mesg, 0, sizeof(H5O_shared_t));
/* Handle sharing destination message */
- if(H5O_shared_copy_file(file_src, file_dst, H5O_SHARED_TYPE, _native_src,
- dst_mesg, recompute_size, mesg_flags, cpy_info, udata, dxpl_id) < 0)
+ if (H5O_shared_copy_file(file_src, file_dst, H5O_SHARED_TYPE, _native_src, dst_mesg, recompute_size,
+ mesg_flags, cpy_info, udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "unable to determine if message should be shared")
/* Set return value */
ret_value = dst_mesg;
done:
- if(!ret_value)
- if(dst_mesg)
+ if (!ret_value)
+ if (dst_mesg)
H5O_msg_free(H5O_SHARED_TYPE->id, dst_mesg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_COPY_FILE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_POST_COPY_FILE
*
@@ -381,13 +376,13 @@ done:
*-------------------------------------------------------------------------
*/
static H5_INLINE herr_t
-H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src,
- H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id,
- H5O_copy_t *cpy_info)
+H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src, H5O_loc_t *oloc_dst,
+ void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- const H5O_shared_t *shared_src = (const H5O_shared_t *)mesg_src; /* Alias to shared info in native source */
- H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst; /* Alias to shared info in native destination */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_shared_t *shared_src =
+ (const H5O_shared_t *)mesg_src; /* Alias to shared info in native source */
+ H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst; /* Alias to shared info in native destination */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -406,34 +401,33 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src,
#ifdef H5O_SHARED_POST_COPY_FILE_REAL
/* Call native message's post copy file callback to copy the message */
- if(H5O_SHARED_POST_COPY_FILE_REAL(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) <0 )
+ if (H5O_SHARED_POST_COPY_FILE_REAL(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy native message to another file")
#endif /* H5O_SHARED_POST_COPY_FILE_REAL */
/* Update shared message after the post copy - will short circuit in
* production if the DEFER pass determined it will not be shared; debug mode
* verifies that it is indeed the case */
- if(H5O_shared_post_copy_file(oloc_dst->file, H5O_SHARED_TYPE,
- shared_src, shared_dst, mesg_flags, dxpl_id, cpy_info) < 0)
+ if (H5O_shared_post_copy_file(oloc_dst->file, H5O_SHARED_TYPE, shared_src, shared_dst, mesg_flags,
+ dxpl_id, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy")
#ifdef H5O_SHARED_POST_COPY_FILE_UPD
/* Call native message's post copy file update callback to update the
* message */
- if(H5O_SHARED_POST_COPY_FILE_UPD(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) < 0)
+ if (H5O_SHARED_POST_COPY_FILE_UPD(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to update native message")
#endif /* H5O_SHARED_POST_COPY_FILE_UPD */
/* Make sure that if the the source or destination is committed, both are
* committed */
- HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED)
- == (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
+ HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED) ==
+ (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_SHARED_POST_COPY_FILE() */
-
/*-------------------------------------------------------------------------
* Function: H5O_SHARED_DEBUG
*
@@ -452,11 +446,11 @@ done:
*-------------------------------------------------------------------------
*/
static H5_INLINE herr_t
-H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth)
{
- const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_shared_t *sh_mesg =
+ (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -471,14 +465,14 @@ H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
#endif /* H5O_SHARED_DEBUG_REAL */
/* Check for message stored elsewhere */
- if(H5O_IS_STORED_SHARED(sh_mesg->type)) {
+ if (H5O_IS_STORED_SHARED(sh_mesg->type)) {
/* Print shared message information */
- if(H5O_shared_debug(sh_mesg, stream, indent, fwidth) < 0)
+ if (H5O_shared_debug(sh_mesg, stream, indent, fwidth) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display shared message info")
} /* end if */
/* Call native message's debug callback */
- if(H5O_SHARED_DEBUG_REAL(f, dxpl_id, _mesg, stream, indent, fwidth) < 0)
+ if (H5O_SHARED_DEBUG_REAL(f, dxpl_id, _mesg, stream, indent, fwidth) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display native message info")
done:
@@ -486,4 +480,3 @@ done:
} /* end H5O_SHARED_DEBUG() */
#endif /* H5Oshared_H */
-
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 489114a..c6cc736 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -6,12 +6,11 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
/* Programmer: James Laird <jlaird@hdfgroup.org>
* Monday, January 29, 2007
*
@@ -19,46 +18,45 @@
* information in the superblock extension.
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Opkg.h" /* Object headers */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Opkg.h" /* Object headers */
+#include "H5MMprivate.h" /* Memory management */
-static void *H5O_shmesg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_shmesg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_shmesg_copy(const void *_mesg, void *_dest);
+static void * H5O_shmesg_copy(const void *_mesg, void *_dest);
static size_t H5O_shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static herr_t H5O_shmesg_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O_shmesg_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_SHMESG[1] = {{
H5O_SHMESG_ID, /*message id number */
"shared message table", /*message name for debugging */
- sizeof(H5O_shmesg_table_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_shmesg_decode, /*decode message */
- H5O_shmesg_encode, /*encode message */
+ sizeof(H5O_shmesg_table_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_shmesg_decode, /*decode message */
+ H5O_shmesg_encode, /*encode message */
H5O_shmesg_copy, /*copy the native value */
- H5O_shmesg_size, /*raw message size */
+ H5O_shmesg_size, /*raw message size */
NULL, /*free internal memory */
NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_shmesg_debug /*debug the message */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_shmesg_debug /*debug the message */
}};
-
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_decode
*
@@ -75,11 +73,11 @@ const H5O_msg_class_t H5O_MSG_SHMESG[1] = {{
*/
static void *
H5O_shmesg_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_shmesg_table_t *mesg; /* Native message */
- void *ret_value; /* Return value */
+ H5O_shmesg_table_t *mesg; /* Native message */
+ void * ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -87,8 +85,9 @@ H5O_shmesg_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *
HDassert(f);
HDassert(p);
- if(NULL == (mesg = (H5O_shmesg_table_t *)H5MM_calloc(sizeof(H5O_shmesg_table_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for shared message table message")
+ if (NULL == (mesg = (H5O_shmesg_table_t *)H5MM_calloc(sizeof(H5O_shmesg_table_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for shared message table message")
/* Retrieve version, table address, and number of indexes */
mesg->version = *p++;
@@ -102,7 +101,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shmesg_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_encode
*
@@ -135,7 +133,6 @@ H5O_shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_shmesg_encode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_copy
*
@@ -153,17 +150,18 @@ H5O_shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
static void *
H5O_shmesg_copy(const void *_mesg, void *_dest)
{
- const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- H5O_shmesg_table_t *dest = (H5O_shmesg_table_t *)_dest;
- void *ret_value;
+ const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
+ H5O_shmesg_table_t * dest = (H5O_shmesg_table_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
- if(!dest && NULL == (dest = (H5O_shmesg_table_t *)H5MM_malloc(sizeof(H5O_shmesg_table_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for shared message table message")
+ if (!dest && NULL == (dest = (H5O_shmesg_table_t *)H5MM_malloc(sizeof(H5O_shmesg_table_t))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for shared message table message")
/* All this message requires is a shallow copy */
*dest = *mesg;
@@ -175,7 +173,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shmesg_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_size
*
@@ -193,21 +190,20 @@ done:
static size_t
H5O_shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value;
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
- ret_value = (size_t)(1 + /* Version number */
- H5F_SIZEOF_ADDR(f) + /* Table address */
- 1); /* Number of indexes */
+ ret_value = (size_t)(1 + /* Version number */
+ H5F_SIZEOF_ADDR(f) + /* Table address */
+ 1); /* Number of indexes */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shmesg_size() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_debug
*
@@ -222,7 +218,7 @@ H5O_shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
*/
static herr_t
H5O_shmesg_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
@@ -235,13 +231,9 @@ H5O_shmesg_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Version:", mesg->version);
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Shared message table address:", mesg->addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of indexes:", mesg->nindexes);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth, "Shared message table address:", mesg->addr);
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_shmesg_debug() */
-
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index cf8c96a..523801c 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,69 +15,66 @@
*
* Created: H5Ostab.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Symbol table messages.
*
*-------------------------------------------------------------------------
*/
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Opkg.h" /* Object headers */
+#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_stab_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
+static void * H5O_stab_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
+ size_t p_size, const uint8_t *p);
static herr_t H5O_stab_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_stab_copy(const void *_mesg, void *_dest);
+static void * H5O_stab_copy(const void *_mesg, void *_dest);
static size_t H5O_stab_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_stab_free(void *_mesg);
static herr_t H5O_stab_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
-static void *H5O_stab_copy_file(H5F_t *file_src, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
- H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id);
-static herr_t H5O_stab_post_copy_file(const H5O_loc_t *src_oloc,
- const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
- unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info);
-static herr_t H5O_stab_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
- FILE * stream, int indent, int fwidth);
+static void * H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *_udata, hid_t dxpl_id);
+static herr_t H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
+ void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id,
+ H5O_copy_t *cpy_info);
+static herr_t H5O_stab_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
+ int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_STAB[1] = {{
- H5O_STAB_ID, /*message id number */
- "stab", /*message name for debugging */
- sizeof(H5O_stab_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_stab_decode, /*decode message */
- H5O_stab_encode, /*encode message */
- H5O_stab_copy, /*copy the native value */
- H5O_stab_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_stab_free, /* free method */
- H5O_stab_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O_stab_copy_file, /* copy native value to file */
- H5O_stab_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_stab_debug /*debug the message */
+ H5O_STAB_ID, /*message id number */
+ "stab", /*message name for debugging */
+ sizeof(H5O_stab_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O_stab_decode, /*decode message */
+ H5O_stab_encode, /*encode message */
+ H5O_stab_copy, /*copy the native value */
+ H5O_stab_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_stab_free, /* free method */
+ H5O_stab_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ H5O_stab_copy_file, /* copy native value to file */
+ H5O_stab_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_stab_debug /*debug the message */
}};
/* Declare a free list to manage the H5O_stab_t struct */
H5FL_DEFINE_STATIC(H5O_stab_t);
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_decode
*
@@ -89,18 +86,17 @@ H5FL_DEFINE_STATIC(H5O_stab_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
*/
static void *
H5O_stab_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- H5O_stab_t *stab = NULL;
- void *ret_value; /* Return value */
+ H5O_stab_t *stab = NULL;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -109,8 +105,8 @@ H5O_stab_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
HDassert(p);
/* decode */
- if(NULL == (stab = H5FL_CALLOC(H5O_stab_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (stab = H5FL_CALLOC(H5O_stab_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5F_addr_decode(f, &p, &(stab->btree_addr));
H5F_addr_decode(f, &p, &(stab->heap_addr));
@@ -118,15 +114,13 @@ H5O_stab_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *op
ret_value = stab;
done:
- if(ret_value == NULL) {
- if(stab != NULL)
+ if (ret_value == NULL)
+ if (stab != NULL)
stab = H5FL_FREE(H5O_stab_t, stab);
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_stab_decode() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_encode
*
@@ -135,7 +129,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -143,7 +136,7 @@ done:
static herr_t
H5O_stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
+ const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -159,7 +152,6 @@ H5O_stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_copy
*
@@ -171,7 +163,6 @@ H5O_stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -179,16 +170,16 @@ H5O_stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
static void *
H5O_stab_copy(const void *_mesg, void *_dest)
{
- const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
- H5O_stab_t *dest = (H5O_stab_t *) _dest;
- void *ret_value; /* Return value */
+ const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
+ H5O_stab_t * dest = (H5O_stab_t *)_dest;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(stab);
- if(!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* copy */
*dest = *stab;
@@ -200,7 +191,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_stab_copy() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_size
*
@@ -213,7 +203,6 @@ done:
* Failure: zero
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -221,7 +210,7 @@ done:
static size_t
H5O_stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -231,7 +220,6 @@ H5O_stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
FUNC_LEAVE_NOAPI(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_free
*
@@ -242,8 +230,6 @@ H5O_stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
* Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -258,7 +244,6 @@ H5O_stab_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_stab_free() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_delete
*
@@ -274,7 +259,7 @@ H5O_stab_free(void *mesg)
static herr_t
H5O_stab_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -283,14 +268,13 @@ H5O_stab_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *me
HDassert(mesg);
/* Free the file space for the symbol table */
- if(H5G__stab_delete(f, dxpl_id, (const H5O_stab_t *)mesg) < 0)
+ if (H5G__stab_delete(f, dxpl_id, (const H5O_stab_t *)mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_stab_delete() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_copy_file
*
@@ -306,15 +290,15 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata, hid_t dxpl_id)
+H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ unsigned H5_ATTR_UNUSED *mesg_flags, H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata,
+ hid_t dxpl_id)
{
- H5O_stab_t *stab_src = (H5O_stab_t *) native_src;
- H5O_stab_t *stab_dst = NULL;
- H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
- size_t size_hint; /* Local heap initial size */
- void *ret_value; /* Return value */
+ H5O_stab_t * stab_src = (H5O_stab_t *)native_src;
+ H5O_stab_t * stab_dst = NULL;
+ H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
+ size_t size_hint; /* Local heap initial size */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -323,34 +307,33 @@ H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
HDassert(file_dst);
/* Allocate space for the destination stab */
- if(NULL == (stab_dst = H5FL_MALLOC(H5O_stab_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if (NULL == (stab_dst = H5FL_MALLOC(H5O_stab_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the old local heap's size and use that as the hint for the new heap */
- if(H5HL_get_size(file_src, dxpl_id, stab_src->heap_addr, &size_hint) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size")
+ if (H5HL_get_size(file_src, dxpl_id, stab_src->heap_addr, &size_hint) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size")
/* Create components of symbol table message */
- if(H5G__stab_create_components(file_dst, stab_dst, size_hint, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't create symbol table components")
+ if (H5G__stab_create_components(file_dst, stab_dst, size_hint, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't create symbol table components")
/* Cache stab in udata */
- udata->cache_type = H5G_CACHED_STAB;
+ udata->cache_type = H5G_CACHED_STAB;
udata->cache.stab.btree_addr = stab_dst->btree_addr;
- udata->cache.stab.heap_addr = stab_dst->heap_addr;
+ udata->cache.stab.heap_addr = stab_dst->heap_addr;
/* Set return value */
ret_value = stab_dst;
done:
- if(!ret_value)
- if(stab_dst)
+ if (!ret_value)
+ if (stab_dst)
stab_dst = H5FL_FREE(H5O_stab_t, stab_dst);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_stab_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_post_copy_file
*
@@ -364,14 +347,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
- H5O_loc_t *dst_oloc, void *mesg_dst, unsigned H5_ATTR_UNUSED *mesg_flags,
- hid_t dxpl_id, H5O_copy_t *cpy_info)
+H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
+ unsigned H5_ATTR_UNUSED *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- const H5O_stab_t *stab_src = (const H5O_stab_t *)mesg_src;
- H5O_stab_t *stab_dst = (H5O_stab_t *)mesg_dst;
- H5G_bt_it_cpy_t udata; /* B-tree user data */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_stab_t *stab_src = (const H5O_stab_t *)mesg_src;
+ H5O_stab_t * stab_dst = (H5O_stab_t *)mesg_dst;
+ H5G_bt_it_cpy_t udata; /* B-tree user data */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -383,25 +365,24 @@ H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
HDassert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
- if(cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
+ if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
HGOTO_DONE(SUCCEED)
/* Set up B-tree iteration user data */
- udata.src_oloc = src_oloc;
+ udata.src_oloc = src_oloc;
udata.src_heap_addr = stab_src->heap_addr;
- udata.dst_file = dst_oloc->file;
- udata.dst_stab = stab_dst;
- udata.cpy_info = cpy_info;
+ udata.dst_file = dst_oloc->file;
+ udata.dst_stab = stab_dst;
+ udata.cpy_info = cpy_info;
/* Iterate over objects in group, copying them */
- if((H5B_iterate(src_oloc->file, dxpl_id, H5B_SNODE, stab_src->btree_addr, H5G__node_copy, &udata)) < 0)
+ if ((H5B_iterate(src_oloc->file, dxpl_id, H5B_SNODE, stab_src->btree_addr, H5G__node_copy, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_stab_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_stab_debug
*
@@ -410,18 +391,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_stab_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth)
+H5O_stab_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+ int indent, int fwidth)
{
- const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
+ const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -432,12 +410,9 @@ H5O_stab_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "B-tree address:", stab->btree_addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "B-tree address:", stab->btree_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Name heap address:", stab->heap_addr);
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Name heap address:", stab->heap_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 12cb420..acd33f0 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, December 4, 2006
*
* Purpose: Object header testing functions.
@@ -21,57 +21,48 @@
/* Module Setup */
/****************/
-#define H5A_PACKAGE /*suppress error about including H5Apkg */
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-#define H5O_TESTING /*suppress warning about H5O testing funcs*/
-
+#define H5A_PACKAGE /*suppress error about including H5Apkg */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#define H5O_TESTING /*suppress warning about H5O testing funcs*/
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Opkg.h" /* Object headers */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Opkg.h" /* Object headers */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*--------------------------------------------------------------------------
NAME
H5O_is_attr_dense_test
@@ -94,31 +85,31 @@
htri_t
H5O_is_attr_dense_test(hid_t oid)
{
- H5O_t *oh = NULL; /* Object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- H5O_loc_t *loc; /* Pointer to object's location */
- htri_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ H5O_loc_t * loc; /* Pointer to object's location */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
- if(NULL == (loc = H5O_get_loc(oid)))
+ if (NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check if dense storage is being used */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
HDassert(H5O_msg_count_real(oh, H5O_MSG_ATTR) == 0);
@@ -128,13 +119,12 @@ H5O_is_attr_dense_test(hid_t oid)
ret_value = FALSE;
done:
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_dense_test() */
+} /* H5O_is_attr_dense_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_is_attr_empty_test
@@ -156,28 +146,28 @@ done:
htri_t
H5O_is_attr_empty_test(hid_t oid)
{
- H5O_t *oh = NULL; /* Object header */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
- H5O_loc_t *loc; /* Pointer to object's location */
- hsize_t nattrs; /* Number of attributes */
- htri_t ret_value; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ H5O_loc_t * loc; /* Pointer to object's location */
+ hsize_t nattrs; /* Number of attributes */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
- if(NULL == (loc = H5O_get_loc(oid)))
+ if (NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo)) < 0)
+ if ((ainfo_exists = H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -185,20 +175,21 @@ H5O_is_attr_empty_test(hid_t oid)
nattrs = H5O_msg_count_real(oh, H5O_MSG_ATTR);
/* Check for later version of object header format & attribute info available */
- if(oh->version > H5O_VERSION_1) {
- if(ainfo_exists) {
+ if (oh->version > H5O_VERSION_1) {
+ if (ainfo_exists) {
/* Check for using dense storage */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
HDassert(nattrs == 0);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
- if(H5B2_get_nrec(bt2_name, &nattrs) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
+ if (H5B2_get_nrec(bt2_name, &nattrs) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL,
+ "unable to retrieve # of records from name index")
} /* end if */
/* Verify that attribute count in object header is correct */
@@ -213,15 +204,14 @@ H5O_is_attr_empty_test(hid_t oid)
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_empty_test() */
+} /* H5O_is_attr_empty_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_num_attrs_test
@@ -244,28 +234,28 @@ done:
herr_t
H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
{
- H5O_t *oh = NULL; /* Object header */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- H5O_loc_t *loc; /* Pointer to object's location */
- hsize_t obj_nattrs; /* Number of attributes */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ H5O_loc_t * loc; /* Pointer to object's location */
+ hsize_t obj_nattrs; /* Number of attributes */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
- if(NULL == (loc = H5O_get_loc(oid)))
+ if (NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -273,18 +263,18 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
obj_nattrs = H5O_msg_count_real(oh, H5O_MSG_ATTR);
/* Check for later version of object header format */
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for using dense storage */
- if(H5F_addr_defined(ainfo.fheap_addr)) {
+ if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
HDassert(obj_nattrs == 0);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
- if(H5B2_get_nrec(bt2_name, &obj_nattrs) < 0)
+ if (H5B2_get_nrec(bt2_name, &obj_nattrs) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
} /* end if */
@@ -297,15 +287,14 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_num_attrs_test() */
+} /* H5O_num_attrs_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_attr_dense_info_test
@@ -330,71 +319,71 @@ done:
herr_t
H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
{
- H5O_t *oh = NULL; /* Object header */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- H5O_loc_t *loc; /* Pointer to object's location */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5B2_t * bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t * bt2_corder = NULL; /* v2 B-tree handle for creation order index */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ H5O_loc_t * loc; /* Pointer to object's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
- if(NULL == (loc = H5O_get_loc(oid)))
+ if (NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
- if(oh->version > H5O_VERSION_1) {
+ if (oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if (H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
/* Check for 'dense' attribute storage file addresses being defined */
- if(!H5F_addr_defined(ainfo.fheap_addr))
+ if (!H5F_addr_defined(ainfo.fheap_addr))
HGOTO_DONE(FAIL)
- if(!H5F_addr_defined(ainfo.name_bt2_addr))
+ if (!H5F_addr_defined(ainfo.name_bt2_addr))
HGOTO_DONE(FAIL)
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if (NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
- if(H5B2_get_nrec(bt2_name, name_count) < 0)
+ if (H5B2_get_nrec(bt2_name, name_count) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
/* Check if there is a creation order index */
- if(H5F_addr_defined(ainfo.corder_bt2_addr)) {
+ if (H5F_addr_defined(ainfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.corder_bt2_addr, NULL)))
+ if (NULL == (bt2_corder = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Retrieve # of records in creation order index */
- if(H5B2_get_nrec(bt2_corder, corder_count) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from creation order index")
+ if (H5B2_get_nrec(bt2_corder, corder_count) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL,
+ "unable to retrieve # of records from creation order index")
} /* end if */
else
*corder_count = 0;
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if (bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, H5AC_ind_dxpl_id) < 0)
+ if (bt2_corder && H5B2_close(bt2_corder, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_attr_dense_info_test() */
+} /* H5O_attr_dense_info_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_check_msg_marked_test
@@ -419,45 +408,45 @@ done:
herr_t
H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
{
- H5O_t *oh = NULL; /* Object header */
- H5O_loc_t *loc; /* Pointer to object's location */
- H5O_mesg_t *idx_msg; /* Pointer to message */
- unsigned idx; /* Index of message */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ H5O_loc_t * loc; /* Pointer to object's location */
+ H5O_mesg_t *idx_msg; /* Pointer to message */
+ unsigned idx; /* Index of message */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
- if(NULL == (loc = H5O_get_loc(oid)))
+ if (NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ if (NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate "unknown" message */
- for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(idx_msg->type->id == H5O_UNKNOWN_ID) {
+ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
+ if (idx_msg->type->id == H5O_UNKNOWN_ID) {
/* Check for "unknown" message having the correct flags */
- if(((idx_msg->flags & H5O_MSG_FLAG_WAS_UNKNOWN) > 0) != flag_val)
- HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "'unknown' message has incorrect 'was unknown' flag value")
+ if (((idx_msg->flags & H5O_MSG_FLAG_WAS_UNKNOWN) > 0) != flag_val)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL,
+ "'unknown' message has incorrect 'was unknown' flag value")
/* Break out of loop, to indicate that the "unknown" message was found */
break;
} /* end if */
/* Check for not finding an "unknown" message */
- if(idx == oh->nmesgs)
+ if (idx == oh->nmesgs)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "'unknown' message type not found")
done:
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ if (oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_check_msg_marked_test() */
+} /* H5O_check_msg_marked_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_expunge_chunks_test
@@ -482,41 +471,41 @@ done:
herr_t
H5O_expunge_chunks_test(const H5O_loc_t *loc, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Object header */
- haddr_t chk_addr[16]; /* Array of chunk addresses */
- size_t nchunks; /* Number of chunks in object header */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_t * oh = NULL; /* Object header */
+ haddr_t chk_addr[16]; /* Array of chunk addresses */
+ size_t nchunks; /* Number of chunks in object header */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Safety check */
nchunks = oh->nchunks;
HDassert(0 < nchunks && nchunks < NELMTS(chk_addr));
/* Iterate over all the chunks, saving the chunk addresses */
- for(u = 0; u < oh->nchunks; u++)
+ for (u = 0; u < oh->nchunks; u++)
chk_addr[u] = oh->chunk[u].addr;
/* Release the object header */
- if(H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ if (H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
/* Iterate over all the saved chunk addresses, evicting them from the cache */
/* (in reverse order, so that chunk #0 is unpinned) */
- for(u = nchunks - 1; u < nchunks; u--)
- if(H5AC_expunge_entry(loc->file, dxpl_id, (u == 0 ? H5AC_OHDR : H5AC_OHDR_CHK), chk_addr[u], H5AC__NO_FLAGS_SET) < 0)
+ for (u = nchunks - 1; u < nchunks; u--)
+ if (H5AC_expunge_entry(loc->file, dxpl_id, (u == 0 ? H5AC_OHDR : H5AC_OHDR_CHK), chk_addr[u],
+ H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTEXPUNGE, FAIL, "unable to expunge object header chunk")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
+} /* H5O_expunge_chunks_test() */
-
/*--------------------------------------------------------------------------
NAME
H5O_get_rc
@@ -541,7 +530,7 @@ done:
herr_t
H5O_get_rc(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc)
{
- H5O_t *oh = NULL; /* Object header */
+ H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -551,17 +540,16 @@ H5O_get_rc(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc)
HDassert(rc);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ if (NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Save the refcount for the object header */
*rc = oh->nlink;
done:
/* Release the object header */
- if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ if (oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
-
+} /* H5O_expunge_chunks_test() */
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index 704d4c0..593daa6 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,58 +15,56 @@
*
* Created: H5Ounknown.c
* Apr 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Handle unknown message classes in a minimal way.
*
*-------------------------------------------------------------------------
*/
-#define H5O_PACKAGE /*suppress error about including H5Opkg */
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Opkg.h" /* Object headers */
+#define H5O_PACKAGE /*suppress error about including H5Opkg */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
static herr_t H5O_unknown_free(void *_mesg);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_UNKNOWN[1] = {{
- H5O_UNKNOWN_ID, /*message id number */
- "unknown", /*message name for debugging */
- 0, /*native message size */
- 0, /* messages are sharable? */
- NULL, /*decode message */
- NULL, /*encode message */
- NULL, /*copy the native value */
- NULL, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_unknown_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- NULL /*debug the message */
+ H5O_UNKNOWN_ID, /*message id number */
+ "unknown", /*message name for debugging */
+ 0, /*native message size */
+ 0, /* messages are sharable? */
+ NULL, /*decode message */
+ NULL, /*encode message */
+ NULL, /*copy the native value */
+ NULL, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_unknown_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ NULL /*debug the message */
}};
/* Declare a free list to manage the H5O_unknown_t struct */
H5FL_DEFINE(H5O_unknown_t);
-
/*-------------------------------------------------------------------------
- * Function: H5O_unknown_free
+ * Function: H5O_unknown_free
*
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Tuesday, May 1, 2007
@@ -84,4 +82,3 @@ H5O_unknown_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_unknown_free() */
-
diff --git a/src/H5P.c b/src/H5P.c
index 4a09e2e..2bf9d13 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -6,12 +6,12 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
*
* Purpose: Generic Property Functions
*/
@@ -20,57 +20,50 @@
/* Module Setup */
/****************/
-#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+#define H5P_PACKAGE /*suppress error about including H5Ppkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5P__init_pub_interface
-
+#define H5_INTERFACE_INIT_FUNC H5P__init_pub_interface
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Ppkg.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Ppkg.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
/* Typedef for property iterator callback */
typedef struct {
- H5P_iterate_t iter_func; /* Iterator callback */
- hid_t id; /* Property list or class ID */
- void *iter_data; /* Iterator callback pointer */
+ H5P_iterate_t iter_func; /* Iterator callback */
+ hid_t id; /* Property list or class ID */
+ void * iter_data; /* Iterator callback pointer */
} H5P_iter_ud_t;
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
/*--------------------------------------------------------------------------
NAME
H5P__init_pub_interface -- Initialize interface-specific information
@@ -91,7 +84,6 @@ H5P__init_pub_interface(void)
FUNC_LEAVE_NOAPI(H5P_init())
} /* H5P__init_pub_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5P__term_pub_interface -- Terminate interface
@@ -115,7 +107,6 @@ H5P__term_pub_interface(void)
FUNC_LEAVE_NOAPI(0)
} /* H5P__term_pub_interface() */
-
/*--------------------------------------------------------------------------
NAME
H5Pcopy
@@ -126,7 +117,7 @@ H5P__term_pub_interface(void)
hid_t id; IN: Property list or class ID to copy
RETURNS
Success: valid property list ID on success (non-negative)
- Failure: negative
+ Failure: H5I_INVALID_HID (negative)
DESCRIPTION
Copy a property list or class and return the ID. This routine calls the
class 'copy' callback after any property 'copy' callbacks are called
@@ -140,46 +131,46 @@ H5P__term_pub_interface(void)
hid_t
H5Pcopy(hid_t id)
{
- void *obj; /* Property object to copy */
- hid_t ret_value=FALSE; /* return value */
+ void *obj; /* Property object to copy */
+ hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", id);
- if(H5P_DEFAULT==id)
+ if (H5P_DEFAULT == id)
HGOTO_DONE(H5P_DEFAULT);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property object");
- if(NULL == (obj = H5I_object(id)))
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist");
+ if (H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not property object");
+ if (NULL == (obj = H5I_object(id)))
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "property object doesn't exist");
/* Compare property lists */
- if(H5I_GENPROP_LST == H5I_get_type(id)) {
- if((ret_value = H5P_copy_plist((H5P_genplist_t *)obj, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property list");
+ if (H5I_GENPROP_LST == H5I_get_type(id)) {
+ if ((ret_value = H5P_copy_plist((H5P_genplist_t *)obj, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "can't copy property list");
} /* end if */
/* Must be property classes */
else {
- H5P_genclass_t *copy_class; /* Copy of class */
+ H5P_genclass_t *copy_class; /* Copy of class */
/* Copy the class */
- if((copy_class = H5P_copy_pclass((H5P_genclass_t *)obj)) == NULL)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property class");
+ if ((copy_class = H5P_copy_pclass((H5P_genclass_t *)obj)) == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "can't copy property class");
/* Get an atom for the copied class */
- if((ret_value = H5I_register(H5I_GENPROP_CLS, copy_class, TRUE)) < 0) {
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, copy_class, TRUE)) < 0) {
H5P_close_class(copy_class);
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID,
+ "unable to atomize property list class");
} /* end if */
- } /* end else */
+ } /* end else */
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pcopy() */
+} /* H5Pcopy() */
-
/*--------------------------------------------------------------------------
NAME
H5Pcreate_class
@@ -206,7 +197,7 @@ done:
void *close_data; IN: Pointer to user data to pass along to class
close callback.
RETURNS
- Returns a valid property list class ID on success, NULL on failure.
+ Returns a valid property list class ID on success, H5I_INVALID_HID on failure.
DESCRIPTION
Allocates memory and attaches a class to the property list class hierarchy.
GLOBAL VARIABLES
@@ -215,52 +206,49 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5Pcreate_class(hid_t parent, const char *name,
- H5P_cls_create_func_t cls_create, void *create_data,
- H5P_cls_copy_func_t cls_copy, void *copy_data,
- H5P_cls_close_func_t cls_close, void *close_data
- )
+H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create, void *create_data,
+ H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close,
+ void *close_data)
{
- H5P_genclass_t *par_class = NULL; /* Pointer to the parent class */
- H5P_genclass_t *pclass = NULL; /* Property list class created */
- hid_t ret_value; /* Return value */
+ H5P_genclass_t *par_class = NULL; /* Pointer to the parent class */
+ H5P_genclass_t *pclass = NULL; /* Property list class created */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE8("i", "i*sx*xx*xx*x", parent, name, cls_create, create_data, cls_copy,
- copy_data, cls_close, close_data);
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE8("i", "i*sx*xx*xx*x", parent, name, cls_create, create_data, cls_copy, copy_data, cls_close,
+ close_data);
/* Check arguments. */
- if(H5P_DEFAULT!=parent && (H5I_GENPROP_CLS!=H5I_get_type(parent)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name")
- if((create_data != NULL && cls_create == NULL)
- || (copy_data != NULL && cls_copy == NULL)
- || (close_data != NULL && cls_close == NULL))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "data specified, but no callback provided")
+ if (H5P_DEFAULT != parent && (H5I_GENPROP_CLS != H5I_get_type(parent)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list class")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid class name")
+ if ((create_data != NULL && cls_create == NULL) || (copy_data != NULL && cls_copy == NULL) ||
+ (close_data != NULL && cls_close == NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "data specified, but no callback provided")
/* Get the pointer to the parent class */
- if(parent == H5P_DEFAULT)
+ if (parent == H5P_DEFAULT)
par_class = NULL;
- else if(NULL == (par_class = (H5P_genclass_t *)H5I_object(parent)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't retrieve parent class")
+ else if (NULL == (par_class = (H5P_genclass_t *)H5I_object(parent)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve parent class")
/* Create the new property list class */
- if(NULL == (pclass = H5P_create_class(par_class, name, H5P_TYPE_USER, cls_create, create_data, cls_copy, copy_data, cls_close, close_data)))
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list class")
+ if (NULL == (pclass = H5P_create_class(par_class, name, H5P_TYPE_USER, cls_create, create_data, cls_copy,
+ copy_data, cls_close, close_data)))
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list class")
/* Get an atom for the class */
- if((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class")
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class")
done:
- if(ret_value < 0 && pclass)
+ if (H5I_INVALID_HID == ret_value && pclass)
H5P_close_class(pclass);
FUNC_LEAVE_API(ret_value)
-} /* H5Pcreate_class() */
+} /* H5Pcreate_class() */
-
/*--------------------------------------------------------------------------
NAME
H5Pcreate
@@ -270,7 +258,7 @@ done:
hid_t H5Pcreate(cls_id)
hid_t cls_id; IN: Property list class create list from
RETURNS
- Returns a valid property list ID on success, FAIL on failure.
+ Returns a valid property list ID on success, H5I_INVALID_HID on failure.
DESCRIPTION
Creates a property list of a given class. If a 'create' callback
exists for the property list class, it is called before the
@@ -286,25 +274,24 @@ done:
hid_t
H5Pcreate(hid_t cls_id)
{
- H5P_genclass_t *pclass; /* Property list class to modify */
- hid_t ret_value; /* return value */
+ H5P_genclass_t *pclass; /* Property list class to modify */
+ hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", cls_id);
/* Check arguments. */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class");
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list class");
/* Create the new property list */
- if((ret_value = H5P_create_id(pclass, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list");
+ if ((ret_value = H5P_create_id(pclass, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pcreate() */
+} /* H5Pcreate() */
-
/*--------------------------------------------------------------------------
NAME
H5Pregister2
@@ -443,7 +430,7 @@ done:
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
The 'set' callback function may be useful to range check the value being
- set for the property or may perform some tranformation/translation of the
+ set for the property or may perform some transformation/translation of the
value set. The 'get' callback would then [probably] reverse the
transformation, etc. A single 'get' or 'set' callback could handle
multiple properties by performing different actions based on the property
@@ -460,52 +447,51 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value,
- H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
- H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
- H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
- H5P_prp_close_func_t prp_close)
+H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_prp_create_func_t prp_create,
+ H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
+ H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close)
{
- H5P_genclass_t *pclass; /* Property list class to modify */
+ H5P_genclass_t *pclass; /* Property list class to modify */
H5P_genclass_t *orig_pclass; /* Original property class */
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE11("e", "i*sz*xxxxxxxx", cls_id, name, size, def_value, prp_create,
- prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close);
+ H5TRACE11("e", "i*sz*xxxxxxxx", cls_id, name, size, def_value, prp_create, prp_set, prp_get, prp_delete,
+ prp_copy, prp_cmp, prp_close);
/* Check arguments. */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS)))
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name")
- if(size > 0 && def_value == NULL)
+ if (size > 0 && def_value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default")
/* Create the new property list class */
orig_pclass = pclass;
- if((ret_value = H5P_register(&pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close)) < 0)
+ if ((ret_value = H5P_register(&pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete,
+ prp_copy, prp_cmp, prp_close)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class")
/* Check if the property class changed and needs to be substituted in the ID */
- if(pclass != orig_pclass) {
- H5P_genclass_t *old_pclass; /* Old property class */
+ if (pclass != orig_pclass) {
+ H5P_genclass_t *old_pclass; /* Old property class */
/* Substitute the new property class in the ID */
- if(NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
+ if (NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
HDassert(old_pclass == orig_pclass);
/* Close the previous class */
- if(H5P_close_class(old_pclass) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close original property class after substitution")
+ if (H5P_close_class(old_pclass) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL,
+ "unable to close original property class after substitution")
} /* end if */
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pregister2() */
+} /* H5Pregister2() */
-
/*--------------------------------------------------------------------------
NAME
H5Pinsert2
@@ -625,7 +611,7 @@ done:
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
The 'set' callback function may be useful to range check the value being
- set for the property or may perform some tranformation/translation of the
+ set for the property or may perform some transformation/translation of the
value set. The 'get' callback would then [probably] reverse the
transformation, etc. A single 'get' or 'set' callback could handle
multiple properties by performing different actions based on the property
@@ -646,35 +632,34 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value,
- H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
- H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
- H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close)
+H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t prp_set,
+ H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
+ H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close)
{
- H5P_genplist_t *plist; /* Property list to modify */
- herr_t ret_value; /* return value */
+ H5P_genplist_t *plist; /* Property list to modify */
+ herr_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
- H5TRACE10("e", "i*sz*xxxxxxx", plist_id, name, size, value, prp_set, prp_get,
- prp_delete, prp_copy, prp_cmp, prp_close);
+ H5TRACE10("e", "i*sz*xxxxxxx", plist_id, name, size, value, prp_set, prp_get, prp_delete, prp_copy,
+ prp_cmp, prp_close);
/* Check arguments. */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name")
- if(size > 0 && value == NULL)
+ if (size > 0 && value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default")
/* Create the new property list class */
- if((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close)) < 0)
+ if ((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, prp_delete, prp_copy, prp_cmp,
+ prp_close)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist")
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pinsert2() */
+} /* H5Pinsert2() */
-
/*--------------------------------------------------------------------------
NAME
H5Pset
@@ -709,29 +694,28 @@ done:
herr_t
H5Pset(hid_t plist_id, const char *name, void *value)
{
- H5P_genplist_t *plist; /* Property list to modify */
- herr_t ret_value=SUCCEED; /* return value */
+ H5P_genplist_t *plist; /* Property list to modify */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*x", plist_id, name, value);
/* Check arguments. */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
- if(value==NULL)
+ if (value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalied property value");
/* Go set the value */
- if(H5P_set(plist,name,value) < 0)
+ if (H5P_set(plist, name, value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to set value in plist");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pset() */
+} /* H5Pset() */
-
/*--------------------------------------------------------------------------
NAME
H5Pexist
@@ -757,41 +741,39 @@ done:
htri_t
H5Pexist(hid_t id, const char *name)
{
- H5P_genplist_t *plist; /* Property list to query */
- H5P_genclass_t *pclass; /* Property class to query */
- htri_t ret_value; /* return value */
+ H5P_genplist_t *plist; /* Property list to query */
+ H5P_genclass_t *pclass; /* Property class to query */
+ htri_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", id, name);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
+ if (H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
/* Check for the existance of the property in the list or class */
- if(H5I_GENPROP_LST == H5I_get_type(id)) {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
+ if (H5I_GENPROP_LST == H5I_get_type(id)) {
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if((ret_value = H5P_exist_plist(plist, name)) < 0)
+ if ((ret_value = H5P_exist_plist(plist, name)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property does not exist in list");
} /* end if */
+ else if (H5I_GENPROP_CLS == H5I_get_type(id)) {
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
+ if ((ret_value = H5P_exist_pclass(pclass, name)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property does not exist in class");
+ } /* end if */
else
- if(H5I_GENPROP_CLS == H5I_get_type(id)) {
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
- if((ret_value = H5P_exist_pclass(pclass, name)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property does not exist in class");
- } /* end if */
- else
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pexist() */
+} /* H5Pexist() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget_size
@@ -818,46 +800,44 @@ done:
herr_t
H5Pget_size(hid_t id, const char *name, size_t *size)
{
- H5P_genclass_t *pclass; /* Property class to query */
- H5P_genplist_t *plist; /* Property list to query */
- herr_t ret_value; /* return value */
+ H5P_genclass_t *pclass; /* Property class to query */
+ H5P_genplist_t *plist; /* Property list to query */
+ herr_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*z", id, name, size);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
+ if (H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
- if(size==NULL)
+ if (size == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property size");
- if(H5I_GENPROP_LST == H5I_get_type(id)) {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
+ if (H5I_GENPROP_LST == H5I_get_type(id)) {
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Check the property size */
- if((ret_value = H5P_get_size_plist(plist, name, size)) < 0)
+ if ((ret_value = H5P_get_size_plist(plist, name, size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query size in plist");
} /* end if */
- else
- if(H5I_GENPROP_CLS == H5I_get_type(id)) {
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ else if (H5I_GENPROP_CLS == H5I_get_type(id)) {
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- /* Check the property size */
- if((ret_value = H5P_get_size_pclass(pclass, name, size)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query size in plist");
- } /* end if */
- else
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
+ /* Check the property size */
+ if ((ret_value = H5P_get_size_pclass(pclass, name, size)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query size in plist");
+ } /* end if */
+ else
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pget_size() */
+} /* H5Pget_size() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget_class
@@ -868,7 +848,7 @@ done:
hid_t plist_id; IN: Property list to query
RETURNS
Success: ID of class object
- Failure: negative
+ Failure: H5I_INVALID_HID (negative)
DESCRIPTION
This routine retrieves the class of a property list.
@@ -881,37 +861,36 @@ done:
hid_t
H5Pget_class(hid_t plist_id)
{
- H5P_genplist_t *plist; /* Property list to query */
- H5P_genclass_t *pclass=NULL; /* Property list class */
- hid_t ret_value=FAIL; /* return value */
+ H5P_genplist_t *plist; /* Property list to query */
+ H5P_genclass_t *pclass = NULL; /* Property list class */
+ hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", plist_id);
/* Check arguments. */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list");
/* Retrieve the property list class */
- if((pclass = H5P_get_class(plist)) == NULL)
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to query class of property list");
+ if ((pclass = H5P_get_class(plist)) == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to query class of property list");
/* Increment the outstanding references to the class object */
- if(H5P_access_class(pclass, H5P_MOD_INC_REF) < 0)
- HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL,"Can't increment class ID ref count");
+ if (H5P_access_class(pclass, H5P_MOD_INC_REF) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count");
/* Get an atom for the class */
- if((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class");
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class");
done:
- if(ret_value<0 && pclass)
+ if (H5I_INVALID_HID == ret_value && pclass)
H5P_close_class(pclass);
FUNC_LEAVE_API(ret_value)
-} /* H5Pget_class() */
+} /* H5Pget_class() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget_nprops
@@ -938,40 +917,38 @@ done:
herr_t
H5Pget_nprops(hid_t id, size_t *nprops)
{
- H5P_genplist_t *plist; /* Property list to query */
- H5P_genclass_t *pclass; /* Property class to query */
- herr_t ret_value=SUCCEED; /* return value */
+ H5P_genplist_t *plist; /* Property list to query */
+ H5P_genclass_t *pclass; /* Property class to query */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*z", id, nprops);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
+ if (H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
- if(nprops==NULL)
+ if (nprops == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property nprops pointer");
- if(H5I_GENPROP_LST == H5I_get_type(id)) {
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
+ if (H5I_GENPROP_LST == H5I_get_type(id)) {
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if(H5P_get_nprops_plist(plist, nprops) < 0)
+ if (H5P_get_nprops_plist(plist, nprops) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query # of properties in plist");
} /* end if */
+ else if (H5I_GENPROP_CLS == H5I_get_type(id)) {
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
+ if (H5P_get_nprops_pclass(pclass, nprops, FALSE) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query # of properties in pclass");
+ } /* end if */
else
- if(H5I_GENPROP_CLS == H5I_get_type(id)) {
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
- if(H5P_get_nprops_pclass(pclass, nprops, FALSE) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query # of properties in pclass");
- } /* end if */
- else
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pget_nprops() */
+} /* H5Pget_nprops() */
-
/*--------------------------------------------------------------------------
NAME
H5Pequal
@@ -995,26 +972,26 @@ done:
htri_t
H5Pequal(hid_t id1, hid_t id2)
{
- void *obj1, *obj2; /* Property objects to compare */
- htri_t ret_value = FALSE; /* return value */
+ void * obj1, *obj2; /* Property objects to compare */
+ htri_t ret_value = FALSE; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", id1, id2);
/* Check arguments. */
- if((H5I_GENPROP_LST != H5I_get_type(id1) && H5I_GENPROP_CLS != H5I_get_type(id1))
- || (H5I_GENPROP_LST != H5I_get_type(id2) && H5I_GENPROP_CLS != H5I_get_type(id2)))
+ if ((H5I_GENPROP_LST != H5I_get_type(id1) && H5I_GENPROP_CLS != H5I_get_type(id1)) ||
+ (H5I_GENPROP_LST != H5I_get_type(id2) && H5I_GENPROP_CLS != H5I_get_type(id2)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects")
- if(H5I_get_type(id1) != H5I_get_type(id2))
+ if (H5I_get_type(id1) != H5I_get_type(id2))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects")
- if(NULL == (obj1 = H5I_object(id1)) || NULL == (obj2 = H5I_object(id2)))
+ if (NULL == (obj1 = H5I_object(id1)) || NULL == (obj2 = H5I_object(id2)))
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist")
/* Compare property lists */
- if(H5I_GENPROP_LST == H5I_get_type(id1)) {
+ if (H5I_GENPROP_LST == H5I_get_type(id1)) {
int cmp_ret = 0;
- if(H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2, &cmp_ret) < 0)
+ if (H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2, &cmp_ret) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists")
/* Set return value */
@@ -1022,15 +999,14 @@ H5Pequal(hid_t id1, hid_t id2)
} /* end if */
/* Must be property classes */
else {
- if(H5P_cmp_class((const H5P_genclass_t *)obj1, (const H5P_genclass_t *)obj2) == 0)
+ if (H5P_cmp_class((const H5P_genclass_t *)obj1, (const H5P_genclass_t *)obj2) == 0)
ret_value = TRUE;
} /* end else */
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pequal() */
+} /* H5Pequal() */
-
/*--------------------------------------------------------------------------
NAME
H5Pisa_class
@@ -1057,26 +1033,25 @@ done:
htri_t
H5Pisa_class(hid_t plist_id, hid_t pclass_id)
{
- htri_t ret_value; /* return value */
+ htri_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", plist_id, pclass_id);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(plist_id))
+ if (H5I_GENPROP_LST != H5I_get_type(plist_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if(H5I_GENPROP_CLS != H5I_get_type(pclass_id))
+ if (H5I_GENPROP_CLS != H5I_get_type(pclass_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
/* Compare the property list's class against the other class */
- if((ret_value = H5P_isa_class(plist_id, pclass_id)) < 0)
+ if ((ret_value = H5P_isa_class(plist_id, pclass_id)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pisa_class() */
+} /* H5Pisa_class() */
-
/*--------------------------------------------------------------------------
NAME
H5P__iterate_cb
@@ -1101,8 +1076,8 @@ property list or class.
static int
H5P__iterate_cb(H5P_genprop_t *prop, void *_udata)
{
- H5P_iter_ud_t *udata = (H5P_iter_ud_t *)_udata; /* Pointer to user data */
- int ret_value = 0; /* Return value */
+ H5P_iter_ud_t *udata = (H5P_iter_ud_t *)_udata; /* Pointer to user data */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1116,7 +1091,6 @@ H5P__iterate_cb(H5P_genprop_t *prop, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__iterate_cb() */
-
/*--------------------------------------------------------------------------
NAME
H5Piterate
@@ -1173,46 +1147,46 @@ iteration, the function's behavior is undefined.
int
H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data)
{
- H5P_iter_ud_t udata; /* User data for internal iterator callback */
- int fake_idx = 0; /* Index when user doesn't provide one */
- void *obj; /* Property object to copy */
- int ret_value; /* return value */
+ H5P_iter_ud_t udata; /* User data for internal iterator callback */
+ int fake_idx = 0; /* Index when user doesn't provide one */
+ void * obj; /* Property object to copy */
+ int ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("Is", "i*Isx*x", id, idx, iter_func, iter_data);
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
+ if (H5I_GENPROP_LST != H5I_get_type(id) && H5I_GENPROP_CLS != H5I_get_type(id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
- if(NULL == (obj = H5I_object(id)))
+ if (NULL == (obj = H5I_object(id)))
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist");
- if(iter_func == NULL)
+ if (iter_func == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration callback");
/* Set up user data */
udata.iter_func = iter_func;
- udata.id = id;
+ udata.id = id;
udata.iter_data = iter_data;
- if(H5I_GENPROP_LST == H5I_get_type(id)) {
+ if (H5I_GENPROP_LST == H5I_get_type(id)) {
/* Iterate over a property list */
- if((ret_value = H5P_iterate_plist((H5P_genplist_t *)obj, TRUE, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0)
+ if ((ret_value = H5P_iterate_plist((H5P_genplist_t *)obj, TRUE, (idx ? idx : &fake_idx),
+ H5P__iterate_cb, &udata)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list");
} /* end if */
+ else if (H5I_GENPROP_CLS == H5I_get_type(id)) {
+ /* Iterate over a property class */
+ if ((ret_value = H5P_iterate_pclass((H5P_genclass_t *)obj, (idx ? idx : &fake_idx), H5P__iterate_cb,
+ &udata)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over class");
+ } /* end if */
else
- if(H5I_GENPROP_CLS == H5I_get_type(id)) {
- /* Iterate over a property class */
- if((ret_value = H5P_iterate_pclass((H5P_genclass_t *)obj, (idx ? idx : &fake_idx), H5P__iterate_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over class");
- } /* end if */
- else
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Piterate() */
+} /* H5Piterate() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget
@@ -1244,29 +1218,28 @@ done:
herr_t
H5Pget(hid_t plist_id, const char *name, void *value)
{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*x", plist_id, name, value);
/* Check arguments. */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
- if(value==NULL)
+ if (value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalied property value");
/* Go get the value */
- if(H5P_get(plist,name,value) < 0)
+ if (H5P_get(plist, name, value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to query property value");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pget() */
+} /* H5Pget() */
-
/*--------------------------------------------------------------------------
NAME
H5Premove
@@ -1296,27 +1269,26 @@ done:
herr_t
H5Premove(hid_t plist_id, const char *name)
{
- H5P_genplist_t *plist; /* Property list to modify */
- herr_t ret_value; /* return value */
+ H5P_genplist_t *plist; /* Property list to modify */
+ herr_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", plist_id, name);
/* Check arguments. */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
+ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
/* Create the new property list class */
- if((ret_value = H5P_remove(plist_id,plist,name)) < 0)
+ if ((ret_value = H5P_remove(plist_id, plist, name)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Premove() */
+} /* H5Premove() */
-
/*--------------------------------------------------------------------------
NAME
H5Pcopy_prop
@@ -1358,41 +1330,40 @@ done:
herr_t
H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name)
{
- H5I_type_t src_id_type, dst_id_type; /* ID types */
- herr_t ret_value = SUCCEED; /* return value */
+ H5I_type_t src_id_type, dst_id_type; /* ID types */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*s", dst_id, src_id, name);
/* Check arguments. */
- if((src_id_type = H5I_get_type(src_id)) < 0)
+ if ((src_id_type = H5I_get_type(src_id)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid source ID")
- if((dst_id_type = H5I_get_type(dst_id)) < 0)
+ if ((dst_id_type = H5I_get_type(dst_id)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid destination ID")
- if((H5I_GENPROP_LST != src_id_type && H5I_GENPROP_CLS != src_id_type)
- || (H5I_GENPROP_LST != dst_id_type && H5I_GENPROP_CLS != dst_id_type))
+ if ((H5I_GENPROP_LST != src_id_type && H5I_GENPROP_CLS != src_id_type) ||
+ (H5I_GENPROP_LST != dst_id_type && H5I_GENPROP_CLS != dst_id_type))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects")
- if(src_id_type != dst_id_type)
+ if (src_id_type != dst_id_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects")
- if(!name || !*name)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
+ if (!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
/* Compare property lists */
- if(H5I_GENPROP_LST == src_id_type) {
- if(H5P_copy_prop_plist(dst_id, src_id, name) < 0)
+ if (H5I_GENPROP_LST == src_id_type) {
+ if (H5P_copy_prop_plist(dst_id, src_id, name) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between lists")
} /* end if */
/* Must be property classes */
else {
- if(H5P_copy_prop_pclass(dst_id, src_id, name) < 0)
+ if (H5P_copy_prop_pclass(dst_id, src_id, name) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between classes")
} /* end else */
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pcopy_prop() */
+} /* H5Pcopy_prop() */
-
/*--------------------------------------------------------------------------
NAME
H5Punregister
@@ -1417,27 +1388,26 @@ done:
herr_t
H5Punregister(hid_t pclass_id, const char *name)
{
- H5P_genclass_t *pclass; /* Property list class to modify */
- herr_t ret_value; /* return value */
+ H5P_genclass_t *pclass; /* Property list class to modify */
+ herr_t ret_value; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", pclass_id, name);
/* Check arguments. */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class");
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name");
/* Remove the property list from class */
- if((ret_value = H5P_unregister(pclass, name)) < 0)
+ if ((ret_value = H5P_unregister(pclass, name)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to remove property from class");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Punregister() */
+} /* H5Punregister() */
-
/*--------------------------------------------------------------------------
NAME
H5Pclose
@@ -1462,27 +1432,26 @@ done:
herr_t
H5Pclose(hid_t plist_id)
{
- herr_t ret_value = SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", plist_id);
/* Allow default property lists to pass through without throwing an error */
- if(H5P_DEFAULT != plist_id) {
+ if (H5P_DEFAULT != plist_id) {
/* Check arguments. */
- if(H5I_GENPROP_LST != H5I_get_type(plist_id))
+ if (H5I_GENPROP_LST != H5I_get_type(plist_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Close the property list */
- if(H5I_dec_app_ref(plist_id) < 0)
+ if (H5I_dec_app_ref(plist_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close")
} /* end if */
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pclose() */
+} /* H5Pclose() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget_class_name
@@ -1506,25 +1475,24 @@ done:
char *
H5Pget_class_name(hid_t pclass_id)
{
- H5P_genclass_t *pclass; /* Property class to query */
- char *ret_value; /* return value */
+ H5P_genclass_t *pclass; /* Property class to query */
+ char * ret_value; /* return value */
FUNC_ENTER_API(NULL)
H5TRACE1("*s", "i", pclass_id);
/* Check arguments. */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property class");
/* Get the property list class name */
- if((ret_value = H5P_get_class_name(pclass)) == NULL)
+ if ((ret_value = H5P_get_class_name(pclass)) == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "unable to query name of class");
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pget_class_name() */
+} /* H5Pget_class_name() */
-
/*--------------------------------------------------------------------------
NAME
H5Pget_class_parent
@@ -1535,7 +1503,7 @@ done:
hid_t pclass_id; IN: Property class to query
RETURNS
Success: ID of parent class object
- Failure: NULL
+ Failure: H5I_INVALID_HID (negative)
DESCRIPTION
This routine retrieves an ID for the parent class of a property class.
@@ -1547,37 +1515,36 @@ done:
hid_t
H5Pget_class_parent(hid_t pclass_id)
{
- H5P_genclass_t *pclass; /* Property class to query */
- H5P_genclass_t *parent = NULL; /* Parent's property class */
- hid_t ret_value; /* return value */
+ H5P_genclass_t *pclass; /* Property class to query */
+ H5P_genclass_t *parent = NULL; /* Parent's property class */
+ hid_t ret_value; /* return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", pclass_id);
/* Check arguments. */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class")
+ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property class")
/* Retrieve the property class's parent */
- if(NULL == (parent = H5P_get_class_parent(pclass)))
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to query class of property list")
+ if (NULL == (parent = H5P_get_class_parent(pclass)))
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to query class of property list")
/* Increment the outstanding references to the class object */
- if(H5P_access_class(parent, H5P_MOD_INC_REF) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Can't increment class ID ref count")
+ if (H5P_access_class(parent, H5P_MOD_INC_REF) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count")
/* Get an atom for the class */
- if((ret_value = H5I_register(H5I_GENPROP_CLS, parent, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class")
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, parent, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class")
done:
- if(ret_value < 0 && parent)
+ if (H5I_INVALID_HID == ret_value && parent)
H5P_close_class(parent);
FUNC_LEAVE_API(ret_value)
-} /* H5Pget_class_parent() */
+} /* H5Pget_class_parent() */
-
/*--------------------------------------------------------------------------
NAME
H5Pclose_class
@@ -1599,20 +1566,19 @@ done:
herr_t
H5Pclose_class(hid_t cls_id)
{
- hid_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", cls_id);
/* Check arguments */
- if(H5I_GENPROP_CLS != H5I_get_type(cls_id))
+ if (H5I_GENPROP_CLS != H5I_get_type(cls_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
/* Close the property list class */
- if(H5I_dec_app_ref(cls_id) < 0)
+ if (H5I_dec_app_ref(cls_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close")
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Pclose_class() */
-
+} /* H5Pclose_class() */
diff --git a/src/H5PL.c b/src/H5PL.c
index 5d750fa..c2cbc75 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c